* perf(cropper): enhance image cropping functionality and add output type support
* perf(cropper): enhance image cropping functionality and add output type support
- Introduced a new CSS variable `--menu-font-size` calculated from the base font size.
- Updated `PreferenceManager` to trigger CSS variable updates when `fontSize` is modified.
- Adjusted `updateCSSVariables` to set the new `--menu-font-size` based on the theme's font size.
- Ensured that the menu components utilize the updated font size with `!important` to maintain styling consistency.
- Updated demo-preview and preview-group components for better error handling and layout.
- Enhanced drawer and modal components for improved auto-height functionality.
- Refactored layout components including header, footer, sidebar, and tabbar for better responsiveness and usability.
- Adjusted tooltip and help tooltip components for better user guidance.
- Fixed issues in various UI components to ensure consistent styling and functionality across the application.
Previously, the generated URL for opening routes in a new window did not include the router base,
which led to incorrect paths when the app was deployed under a subdirectory (e.g., /admin/).
This change ensures that the resolved path includes the configured base by using
router.resolve(path).href.
* feat: add function support for formItemClass prop
* feat: add try-catch to formItemClass function
* fix: formItemClass function ts error
---------
Co-authored-by: sqchen <chenshiqi@sshlx.com>
* fix: When defaultHomePage is inconsistent with user.homePath, the page refresh route jump will be abnormal
* fix: When defaultHomePage is inconsistent with user.homePath, the page refresh route jump will be abnormal
* fix: Fix inconsistent spacing around search form (issue #5429)
* fix: repair the unexpected default value in validated form.(issue #5451)
* Update packages/@core/ui-kit/form-ui/src/use-form-context.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---------
Co-authored-by: Jin Mao <50581550+jinmao88@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* feat(VbenAvatar): add fit property to VbenAvatar component
* feat(VbenLogo): add fit property to VbenLogo component
* feat(VbenLogo): add logo fit preference configuration
- Add preferences.logo.fit setting for logo display control
- Include corresponding documentation for the new preference
* feat(preferences): add default value for logo.fit preference
- Set default configuration for logo fit behavior
- Ensures consistent logo display across applications
* test(preferences): update configuration snapshots
---------
Co-authored-by: wyc001122 <wangyongchao@testor.com.cn>
* feat: ellipsis text automatically displays tooltip based on ellipsis
* feat: ellipsis text automatically displays tooltip based on ellipsis
---------
Co-authored-by: sqchen <9110848@qq.com>
Co-authored-by: sqchen <chenshiqi@sshlx.com>
* perf: perf the control logic of Tab
* 每个标签页Tab使用唯一的key来控制关闭打开等逻辑
* 统一函数获取tab的key
* 通过3种方式设置tab key:1、使用router query参数pageKey 2、使用路由meta参数fullPathKey设置使用fullPath或path作为key
* 单个路由可以打开多个标签页
* 如果设置fullPathKey为false,则query变更不会打开新的标签(这很实用)
* perf: perf the control logic of Tab
* perf: perf the control logic of Tab
* 测试用例适配
* perf: perf the control logic of Tab
* 解决AI提示的警告
* fix(@vben-core/shadcn-ui): fix disabled functionality not working in VbenTree component
* fix(@vben-core/shadcn-ui): add cursor-not-allowed className when disabled and disable onfocus
---------
Co-authored-by: wyc001122 <wangyongchao@testor.com.cn>
Co-authored-by: Jin Mao <50581550+jinmao88@users.noreply.github.com>
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
!function(){"use strict";vart=tinymce.util.Tools.resolve("tinymce.PluginManager");conste=(t,e,s)=>{constr="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===s?null:{"list-style-type":s})},s=t=>e=>e.options.get(t),r=s("advlist_number_styles"),n=s("advlist_bullet_styles"),i=t=>null==t,l=t=>!i(t);varo=tinymce.util.Tools.resolve("tinymce.util.Tools");classa{constructor(t,e){this.tag=t,this.value=e}staticsome(t){returnnewa(!0,t)}staticnone(){returna.singletonNone}fold(t,e){returnthis.tag?e(this.value):t()}isSome(){returnthis.tag}isNone(){return!this.tag}map(t){returnthis.tag?a.some(t(this.value)):a.none()}bind(t){returnthis.tag?t(this.value):a.none()}exists(t){returnthis.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){returnthis.tag?this.value:t}or(t){returnthis.tag?this:t}getOrThunk(t){returnthis.tag?this.value:t()}orThunk(t){returnthis.tag?this:t()}getOrDie(t){if(this.tag)returnthis.value;thrownewError(null!=t?t:"Called getOrDie on None")}staticfrom(t){returnl(t)?a.some(t):a.none()}getOrNull(){returnthis.tag?this.value:null}getOrUndefined(){returnthis.value}each(t){this.tag&&t(this.value)}toArray(){returnthis.tag?[this.value]:[]}toString(){returnthis.tag?`some(${this.value})`:"none()"}}a.singletonNone=newa(!1);constu=t=>e=>l(e)&&t.test(e.nodeName),d=u(/^(OL|UL|DL)$/),g=u(/^(TH|TD)$/),c=t=>i(t)||"default"===t?"":t,h=(t,e)=>s=>((t,e)=>{consts=t.selection.getNode();returne({parents:t.dom.getParents(s),element:s}),t.on("NodeChange",e),()=>t.off("NodeChange",e)})(t,(r=>((t,r)=>{constn=t.selection.getStart(!0);s.setActive(((t,e,s)=>((t,e,s)=>{for(lete=0,n=t.length;e<n;e++){constn=t[e];if(d(r=n)&&!/\btox\-/.test(r.className))returna.some(n);if(s(n,e))break}varr;returna.none()})(e,0,g).exists((e=>e.nodeName===s&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))))(t,r,e)),s.setEnabled(!((t,e)=>{consts=t.dom.getParent(e,"ol,ul,dl");return((t,e)=>null!==e&&!t.dom.isEditable(e))(t,s)&&t.selection.isEditable()})(t,n)&&t.selection.isEditable())})(t,r.parents))),m=(t,s,r,n,i,l)=>{l.length>1?((t,s,r,n,i,l)=>{t.ui.registry.addSplitButton(s,{tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:t=>{t(o.map(l,(t=>{conste="OL"===i?"num":"bull",s="disc"===t||"decimal"===t?"default":t,r=c(t),n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:r,icon:"list-"+e+"-"+s,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(s,r)=>{e(t,i,r)},select:e=>{consts=(t=>{conste=t.dom.getParent(t.selection.getNode(),"ol,ul"),s=t.dom.getStyle(e,"listStyleType");returna.from(s)})(t);returns.map((t=>e===t)).getOr(!1)},onSetup:h(t,i)})})(t,s,r,n,i,l):((t,s,r,n,i,l)=>{t.ui.registry.addToggleButton(s,{active:!1,tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:h(t,i),onAction:()=>t.queryCommandState(n)||""===l?t.execCommand(n):e(t,i,l)})})(t,s,r,n,i,c(l[0]))};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{conste=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(t),(t=>{m(t,"numlist","Numbered list","InsertOrderedList","OL",r(t)),m(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((s,r)=>{e(t,"UL",r["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((s,r)=>{e(t,"OL",r["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the List Styles plugin.")}))}();
!function(){"use strict";vart=tinymce.util.Tools.resolve("tinymce.PluginManager");conste=(t,e,s)=>{constr="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===s?null:{"list-style-type":s})},s=t=>e=>e.options.get(t),r=s("advlist_number_styles"),n=s("advlist_bullet_styles"),l=t=>null==t,i=t=>!l(t);classo{constructor(t,e){this.tag=t,this.value=e}staticsome(t){returnnewo(!0,t)}staticnone(){returno.singletonNone}fold(t,e){returnthis.tag?e(this.value):t()}isSome(){returnthis.tag}isNone(){return!this.tag}map(t){returnthis.tag?o.some(t(this.value)):o.none()}bind(t){returnthis.tag?t(this.value):o.none()}exists(t){returnthis.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:o.none()}getOr(t){returnthis.tag?this.value:t}or(t){returnthis.tag?this:t}getOrThunk(t){returnthis.tag?this.value:t()}orThunk(t){returnthis.tag?this:t()}getOrDie(t){if(this.tag)returnthis.value;thrownewError(null!=t?t:"Called getOrDie on None")}staticfrom(t){returni(t)?o.some(t):o.none()}getOrNull(){returnthis.tag?this.value:null}getOrUndefined(){returnthis.value}each(t){this.tag&&t(this.value)}toArray(){returnthis.tag?[this.value]:[]}toString(){returnthis.tag?`some(${this.value})`:"none()"}}o.singletonNone=newo(!1);consta=Array.prototype.indexOf,u=Object.keys;vard=tinymce.util.Tools.resolve("tinymce.util.Tools");constc=t=>e=>i(e)&&t.test(e.nodeName),h=c(/^(OL|UL|DL)$/),g=c(/^(TH|TD)$/),p=t=>l(t)||"default"===t?"":t,m=(t,e)=>s=>((t,e)=>{consts=t.selection.getNode();returne({parents:t.dom.getParents(s),element:s}),t.on("NodeChange",e),()=>t.off("NodeChange",e)})(t,(r=>((t,r)=>{constn=t.selection.getStart(!0);s.setActive(((t,e,s)=>((t,e,s)=>{for(lete=0,n=t.length;e<n;e++){constn=t[e];if(h(r=n)&&!/\btox\-/.test(r.className))returno.some(n);if(s(n,e))break}varr;returno.none()})(e,0,g).exists((e=>e.nodeName===s&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))))(t,r,e)),s.setEnabled(!((t,e)=>{consts=t.dom.getParent(e,"ol,ul,dl");return((t,e)=>null!==e&&!t.dom.isEditable(e))(t,s)||!t.selection.isEditable()})(t,n))})(t,r.parents))),v=(t,s,r,n,l,i)=>{constc={"lower-latin":"lower-alpha","upper-latin":"upper-alpha","lower-alpha":"lower-latin","upper-alpha":"upper-latin"},h=(g=t=>{returne=i,s=t,a.call(e,s)>-1;vare,s},((t,e)=>{consts={};return((t,e)=>{consts=u(t);for(letr=0,n=s.length;r<n;r++){constn=s[r];e(t[n],n)}})(t,((t,r)=>{constn=e(t,r);s[n.k]=n.v})),s})(c,((t,e)=>({k:e,v:g(t)}))));varg;t.ui.registry.addSplitButton(s,{tooltip:r,icon:"OL"===l?"ordered-list":"unordered-list",presets:"listpreview",columns:"OL"===l?3:4,fetch:t=>{t(d.map(i,(t=>{conste="OL"===l?"num":"bull",s="decimal"===t?"default":t,r=p(t),n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:r,icon:"list-"+e+"-"+s,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(s,r)=>{e(t,l,r)},select:e=>{consts=(t=>{conste=t.dom.getParent(t.selection.getNode(),"ol,ul"),s=t.dom.getStyle(e,"listStyleType");returno.from(s)})(t);returns.exists((t=>e===t||c[t]===e&&!h[e]))},onSetup:m(t,l)})},y=(t,s,r,n,l,i)=>{i.length>1?v(t,s,r,n,l,i):((t,s,r,n,l,i)=>{t.ui.registry.addToggleButton(s,{active:!1,tooltip:r,icon:"OL"===l?"ordered-list":"unordered-list",onSetup:m(t,l),onAction:()=>t.queryCommandState(n)||""===i?t.execCommand(n):e(t,l,i)})})(t,s,r,n,l,p(i[0]))};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{conste=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,disc,circle,square".split(",")})})(t),(t=>{y(t,"numlist","Numbered list","InsertOrderedList","OL",r(t)),y(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((s,r)=>{e(t,"UL",r["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((s,r)=>{e(t,"OL",r["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the List Styles plugin.")}))}();
!function(){"use strict";vare=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");constn=("allow_html_in_named_anchor",e=>e.options.get("allow_html_in_named_anchor"));consta="a:not([href])",r=e=>!e,i=e=>e.getAttribute("id")||e.getAttribute("name")||"",l=e=>(e=>"a"===e.nodeName.toLowerCase())(e)&&!e.getAttribute("href")&&""!==i(e),s=e=>e.dom.getParent(e.selection.getStart(),a),d=(e,a)=>{constr=s(e);r?((e,t,o)=>{o.removeAttribute("name"),o.id=t,e.addVisual(),e.undoManager.add()})(e,a,r):((e,a)=>{e.undoManager.transact((()=>{n(e)||e.selection.collapse(!0),e.selection.isCollapsed()?e.insertContent(e.dom.createHTML("a",{id:a})):((e=>{constn=e.dom;t(n).walk(e.selection.getRng(),(e=>{o.each(e,(e=>{vart;l(t=e)&&!t.firstChild&&n.remove(e,!1)}))}))})(e),e.formatter.remove("namedAnchor",void0,void0,!0),e.formatter.apply("namedAnchor",{value:a}),e.addVisual())}))})(e,a),e.focus()},c=e=>(e=>r(e.attr("href"))&&!r(e.attr("id")||e.attr("name")))(e)&&!e.firstChild,m=e=>t=>{for(leto=0;o<t.length;o++){constn=t[o];c(n)&&n.attr("contenteditable",e)}},u=e=>t=>{consto=()=>{t.setEnabled(e.selection.isEditable())};returne.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}};e.add("anchor",(e=>{(e=>{(0,e.options.register)("allow_html_in_named_anchor",{processor:"boolean",default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("a",m("false")),e.serializer.addNodeFilter("a",m(null))}))})(e),(e=>{e.addCommand("mceAnchor",(()=>{(e=>{constt=(e=>{constt=s(e);returnt?i(t):""})(e);e.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:t=>{((e,t)=>/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)?(d(e,t),!0):(e.windowManager.alert("ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1))(e,t.getData().id)&&t.close()}})})(e)}))})(e),(e=>{constt=()=>e.execCommand("mceAnchor");e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:t,onSetup:t=>{consto=e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind,n=u(e)(t);return()=>{o(),n()}}}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:t,onSetup:u(e)})})(e),e.on("PreInit",(()=>{(e=>{e.formatter.register("namedAnchor",{inline:"a",selector:a,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:(e,t,o)=>l(e)})})(e)}))}))}();
!function(){"use strict";vare=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");constn=e=>e.options.get("allow_html_in_named_anchor");consta="a:not([href])",r=e=>!e,i=e=>e.getAttribute("id")||e.getAttribute("name")||"",l=e=>(e=>"a"===e.nodeName.toLowerCase())(e)&&!e.getAttribute("href")&&""!==i(e),s=e=>e.dom.getParent(e.selection.getStart(),a),d=(e,a)=>{constr=s(e);r?((e,t,o)=>{o.removeAttribute("name"),o.id=t,e.addVisual(),e.undoManager.add()})(e,a,r):((e,a)=>{e.undoManager.transact((()=>{n(e)||e.selection.collapse(!0),e.selection.isCollapsed()?e.insertContent(e.dom.createHTML("a",{id:a})):((e=>{constn=e.dom;t(n).walk(e.selection.getRng(),(e=>{o.each(e,(e=>{vart;l(t=e)&&!t.firstChild&&n.remove(e,!1)}))}))})(e),e.formatter.remove("namedAnchor",void0,void0,!0),e.formatter.apply("namedAnchor",{value:a}),e.addVisual())}))})(e,a),e.focus()},c=e=>(e=>r(e.attr("href"))&&!r(e.attr("id")||e.attr("name")))(e)&&!e.firstChild,m=e=>t=>{for(leto=0;o<t.length;o++){constn=t[o];c(n)&&n.attr("contenteditable",e)}},u=e=>t=>{consto=()=>{t.setEnabled(e.selection.isEditable())};returne.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}};e.add("anchor",(e=>{(e=>{(0,e.options.register)("allow_html_in_named_anchor",{processor:"boolean",default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("a",m("false")),e.serializer.addNodeFilter("a",m(null))}))})(e),(e=>{e.addCommand("mceAnchor",(()=>{(e=>{constt=(e=>{constt=s(e);returnt?i(t):""})(e);e.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:t=>{((e,t)=>/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)?(d(e,t),!0):(e.windowManager.alert("ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1))(e,t.getData().id)&&t.close()}})})(e)}))})(e),(e=>{constt=()=>e.execCommand("mceAnchor");e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:t,onSetup:t=>{consto=e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind,n=u(e)(t);return()=>{o(),n()}}}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:t,onSetup:u(e)})})(e),e.on("PreInit",(()=>{(e=>{e.formatter.register("namedAnchor",{inline:"a",selector:a,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:(e,t,o)=>l(e)})})(e)}))}))}();
!function(){"use strict";vart=tinymce.util.Tools.resolve("tinymce.PluginManager");conste=("string",t=>"string"===(t=>{conste=typeoft;returnnull===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(r=o=t,(a=String).prototype.isPrototypeOf(r)||(null===(s=o.constructor)||void0===s?void0:s.name)===a.name)?"string":e;varr,o,a,s})(t));constr=(void0,t=>undefined===t);varo=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),s=tinymce.util.Tools.resolve("tinymce.util.Tools");constn=t=>{conste=/^(\d+)([ms]?)$/.exec(t);return(e&&e[2]?{s:1e3,m:6e4}[e[2]]:1)*parseInt(t,10)},i=t=>e=>e.options.get(t),u=i("autosave_ask_before_unload"),l=i("autosave_restore_when_empty"),c=i("autosave_interval"),d=i("autosave_retention"),m=t=>{conste=document.location;returnt.options.get("autosave_prefix").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},v=(t,e)=>{if(r(e))returnt.dom.isEmpty(t.getBody());{constr=s.trim(e);if(""===r)return!0;{conste=(newDOMParser).parseFromString(r,"text/html");returnt.dom.isEmpty(e)}}},f=t=>{vare;constr=parseInt(null!==(e=a.getItem(m(t)+"time"))&&void0!==e?e:"0",10)||0;return!((newDate).getTime()-r>d(t)&&(p(t,!1),1))},p=(t,e)=>{constr=m(t);a.removeItem(r+"draft"),a.removeItem(r+"time"),!1!==e&&(t=>{t.dispatch("RemoveDraft")})(t)},g=t=>{conste=m(t);!v(t)&&t.isDirty()&&(a.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),a.setItem(e+"time",(newDate).getTime().toString()),(t=>{t.dispatch("StoreDraft")})(t))},y=t=>{vare;constr=m(t);f(t)&&(t.setContent(null!==(e=a.getItem(r+"draft"))&&void0!==e?e:"",{format:"raw"}),(t=>{t.dispatch("RestoreDraft")})(t))};varD=tinymce.util.Tools.resolve("tinymce.EditorManager");consth=t=>e=>{e.setEnabled(f(t));constr=()=>e.setEnabled(f(t));returnt.on("StoreDraft RestoreDraft RemoveDraft",r),()=>t.off("StoreDraft RestoreDraft RemoveDraft",r)};t.add("autosave",(t=>((t=>{constr=t.options.register,o=t=>{constr=e(t);returnr?{value:n(t),valid:r}:{valid:!1,message:"Must be a string."}};r("autosave_ask_before_unload",{processor:"boolean",default:!0}),r("autosave_prefix",{processor:"string",default:"tinymce-autosave-{path}{query}{hash}-{id}-"}),r("autosave_restore_when_empty",{processor:"boolean",default:!1}),r("autosave_interval",{processor:o,default:"30s"}),r("autosave_retention",{processor:o,default:"20m"})})(t),(t=>{t.editorManager.on("BeforeUnload",(t=>{lete;s.each(D.get(),(t=>{t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&u(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))})),e&&(t.preventDefault(),t.returnValue=e)}))})(t),(t=>{(t=>{conste=c(t);o.setEditorInterval(t,(()=>{g(t)}),e)})(t);conste=()=>{(t=>{t.undoManager.transact((()=>{y(t),p(t)})),t.focus()})(t)};t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:h(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:h(t)})})(t),t.on("init",(()=>{l(t)&&t.dom.isEmpty(t.getBody())&&y(t)})),(t=>({hasDraft:()=>f(t),storeDraft:()=>g(t),restoreDraft:()=>y(t),removeDraft:e=>p(t,e),isEmpty:e=>v(t,e)}))(t))))}();
!function(){"use strict";vart=tinymce.util.Tools.resolve("tinymce.PluginManager");conste=t=>"string"===(t=>{conste=typeoft;returnnull===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(r=o=t,(a=String).prototype.isPrototypeOf(r)||(null===(s=o.constructor)||void0===s?void0:s.name)===a.name)?"string":e;varr,o,a,s})(t);constr=t=>undefined===t;varo=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),s=tinymce.util.Tools.resolve("tinymce.util.Tools");constn=t=>{conste=/^(\d+)([ms]?)$/.exec(t);return(e&&e[2]?{s:1e3,m:6e4}[e[2]]:1)*parseInt(t,10)},i=t=>e=>e.options.get(t),u=i("autosave_ask_before_unload"),l=i("autosave_restore_when_empty"),c=i("autosave_interval"),d=i("autosave_retention"),m=t=>{conste=document.location;returnt.options.get("autosave_prefix").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},v=(t,e)=>{if(r(e))returnt.dom.isEmpty(t.getBody());{constr=s.trim(e);if(""===r)return!0;{conste=(newDOMParser).parseFromString(r,"text/html");returnt.dom.isEmpty(e)}}},f=t=>{vare;constr=parseInt(null!==(e=a.getItem(m(t)+"time"))&&void0!==e?e:"0",10)||0;return!((newDate).getTime()-r>d(t)&&(p(t,!1),1))},p=(t,e)=>{constr=m(t);a.removeItem(r+"draft"),a.removeItem(r+"time"),!1!==e&&(t=>{t.dispatch("RemoveDraft")})(t)},y=t=>{conste=m(t);!v(t)&&t.isDirty()&&(a.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),a.setItem(e+"time",(newDate).getTime().toString()),(t=>{t.dispatch("StoreDraft")})(t))},g=t=>{vare;constr=m(t);f(t)&&(t.setContent(null!==(e=a.getItem(r+"draft"))&&void0!==e?e:"",{format:"raw"}),(t=>{t.dispatch("RestoreDraft")})(t))};varD=tinymce.util.Tools.resolve("tinymce.EditorManager");consth=t=>e=>{constr=()=>f(t)&&!t.mode.isReadOnly();e.setEnabled(r());consto=()=>e.setEnabled(r());returnt.on("StoreDraft RestoreDraft RemoveDraft",o),()=>t.off("StoreDraft RestoreDraft RemoveDraft",o)};t.add("autosave",(t=>((t=>{constr=t.options.register,o=t=>{constr=e(t);returnr?{value:n(t),valid:r}:{valid:!1,message:"Must be a string."}};r("autosave_ask_before_unload",{processor:"boolean",default:!0}),r("autosave_prefix",{processor:"string",default:"tinymce-autosave-{path}{query}{hash}-{id}-"}),r("autosave_restore_when_empty",{processor:"boolean",default:!1}),r("autosave_interval",{processor:o,default:"30s"}),r("autosave_retention",{processor:o,default:"20m"})})(t),(t=>{t.editorManager.on("BeforeUnload",(t=>{lete;s.each(D.get(),(t=>{t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&u(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))})),e&&(t.preventDefault(),t.returnValue=e)}))})(t),(t=>{(t=>{conste=c(t);o.setEditorInterval(t,(()=>{y(t)}),e)})(t);conste=()=>{(t=>{t.undoManager.transact((()=>{g(t),p(t)})),t.focus()})(t)};t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:h(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:h(t)})})(t),t.on("init",(()=>{l(t)&&t.dom.isEmpty(t.getBody())&&g(t)})),(t=>({hasDraft:()=>f(t),storeDraft:()=>y(t),restoreDraft:()=>g(t),removeDraft:e=>p(t,e),isEmpty:e=>v(t,e)}))(t))))}();
!function(){"use strict";vart=tinymce.util.Tools.resolve("tinymce.PluginManager");conste=t=>e=>typeofe===t,o=t=>"string"===(t=>{conste=typeoft;returnnull===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(o=r=t,(n=String).prototype.isPrototypeOf(o)||(null===(i=r.constructor)||void0===i?void0:i.name)===n.name)?"string":e;varo,r,n,i})(t),r=e("boolean"),n=t=>!(t=>null==t)(t),i=e("function"),s=e("number"),l=(!1,()=>false);classa{constructor(t,e){this.tag=t,this.value=e}staticsome(t){returnnewa(!0,t)}staticnone(){returna.singletonNone}fold(t,e){returnthis.tag?e(this.value):t()}isSome(){returnthis.tag}isNone(){return!this.tag}map(t){returnthis.tag?a.some(t(this.value)):a.none()}bind(t){returnthis.tag?t(this.value):a.none()}exists(t){returnthis.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){returnthis.tag?this.value:t}or(t){returnthis.tag?this:t}getOrThunk(t){returnthis.tag?this.value:t()}orThunk(t){returnthis.tag?this:t()}getOrDie(t){if(this.tag)returnthis.value;thrownewError(null!=t?t:"Called getOrDie on None")}staticfrom(t){returnn(t)?a.some(t):a.none()}getOrNull(){returnthis.tag?this.value:null}getOrUndefined(){returnthis.value}each(t){this.tag&&t(this.value)}toArray(){returnthis.tag?[this.value]:[]}toString(){returnthis.tag?`some(${this.value})`:"none()"}}a.singletonNone=newa(!1);constu=(t,e)=>{for(leto=0,r=t.length;o<r;o++)e(t[o],o)},c=t=>{if(null==t)thrownewError("Node cannot be null or undefined");return{dom:t}},d=c,h=(t,e)=>{consto=t.dom;if(1!==o.nodeType)return!1;{constt=o;if(void0!==t.matches)returnt.matches(e);if(void0!==t.msMatchesSelector)returnt.msMatchesSelector(e);if(void0!==t.webkitMatchesSelector)returnt.webkitMatchesSelector(e);if(void0!==t.mozMatchesSelector)returnt.mozMatchesSelector(e);thrownewError("Browser lacks native selectors")}};"undefined"!=typeofwindow?window:Function("return this;")();constm=t=>e=>(t=>t.dom.nodeType)(e)===t,g=m(1),f=m(3),v=m(9),y=m(11),p=(t,e)=>{t.dom.removeAttribute(e)},w=i(Element.prototype.attachShadow)&&i(Node.prototype.getRootNode)?t=>d(t.dom.getRootNode()):t=>v(t)?t:d(t.dom.ownerDocument),b=t=>d(t.dom.host),N=t=>{conste=f(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;consto=e.ownerDocument;return(t=>{conste=w(t);returny(o=e)&&n(o.dom.host)?a.some(e):a.none();varo})(d(e)).fold((()=>o.body.contains(e)),(r=N,i=b,t=>r(i(t))));varr,i},S=t=>"rtl"===((t,e)=>{consto=t.dom,r=window.getComputedStyle(o).getPropertyValue(e);return""!==r||N(t)?r:((t,e)=>(t=>void0!==t.style&&i(t.style.getPropertyValue))(t)?t.style.getPropertyValue(e):"")(o,e)})(t,"direction")?"rtl":"ltr",A=(t,e)=>((t,o)=>((t,e)=>{consto=[];for(letr=0,n=t.length;r<n;r++){constn=t[r];e(n,r)&&o.push(n)}returno})(((t,e)=>{consto=t.length,r=newArray(o);for(letn=0;n<o;n++){consto=t[n];r[n]=e(o,n)}returnr})(t.dom.childNodes,d),(t=>h(t,e))))(t),E=("li",t=>g(t)&&"li"===t.dom.nodeName.toLowerCase());constT=(t,e,n)=>{u(e,(e=>{constc=d(e),m=E(c),f=((t,e)=>{return(e?(o=t,r="ol,ul",((t,e,o)=>{letn=t.dom;consts=i(o)?o:l;for(;n.parentNode;){n=n.parentNode;constt=d(n);if(h(t,r))returna.some(t);if(s(t))break}returna.none()})(o,0,n)):a.some(t)).getOr(t);varo,r,n})(c,m);varv;(v=f,(t=>a.from(t.dom.parentNode).map(d))(v).filter(g)).each((e=>{if(t.setStyle(f.dom,"direction",null),S(e)===n?p(f,"dir"):((t,e,n)=>{((t,e,n)=>{if(!(o(n)||r(n)||s(n)))throwconsole.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),newError("Attribute value was not simple");t.setAttribute(e,n+"")})(t.dom,e,n)})(f,"dir",n),S(f)!==n&&t.setStyle(f.dom,"direction",n),m){conste=A(f,"li[dir],li[style]");u(e,(e=>{p(e,"dir"),t.setStyle(e.dom,"direction",null)}))}}))}))},C=(t,e)=>{t.selection.isEditable()&&(T(t.dom,t.selection.getSelectedBlocks(),e),t.nodeChanged())},D=(t,e)=>o=>{constr=r=>{constn=d(r.element);o.setActive(S(n)===e),o.setEnabled(t.selection.isEditable())};returnt.on("NodeChange",r),o.setEnabled(t.selection.isEditable()),()=>t.off("NodeChange",r)};t.add("directionality",(t=>{(t=>{t.addCommand("mceDirectionLTR",(()=>{C(t,"ltr")})),t.addCommand("mceDirectionRTL",(()=>{C(t,"rtl")}))})(t),(t=>{t.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:()=>t.execCommand("mceDirectionLTR"),onSetup:D(t,"ltr")}),t.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:()=>t.execCommand("mceDirectionRTL"),onSetup:D(t,"rtl")})})(t)}))}();
!function(){"use strict";vart=tinymce.util.Tools.resolve("tinymce.PluginManager");conste=t=>e=>typeofe===t,r=t=>"string"===(t=>{conste=typeoft;returnnull===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(r=o=t,(n=String).prototype.isPrototypeOf(r)||(null===(i=o.constructor)||void0===i?void0:i.name)===n.name)?"string":e;varr,o,n,i})(t),o=e("boolean"),n=t=>!(t=>null==t)(t),i=e("function"),s=e("number"),l=()=>false;classa{constructor(t,e){this.tag=t,this.value=e}staticsome(t){returnnewa(!0,t)}staticnone(){returna.singletonNone}fold(t,e){returnthis.tag?e(this.value):t()}isSome(){returnthis.tag}isNone(){return!this.tag}map(t){returnthis.tag?a.some(t(this.value)):a.none()}bind(t){returnthis.tag?t(this.value):a.none()}exists(t){returnthis.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){returnthis.tag?this.value:t}or(t){returnthis.tag?this:t}getOrThunk(t){returnthis.tag?this.value:t()}orThunk(t){returnthis.tag?this:t()}getOrDie(t){if(this.tag)returnthis.value;thrownewError(null!=t?t:"Called getOrDie on None")}staticfrom(t){returnn(t)?a.some(t):a.none()}getOrNull(){returnthis.tag?this.value:null}getOrUndefined(){returnthis.value}each(t){this.tag&&t(this.value)}toArray(){returnthis.tag?[this.value]:[]}toString(){returnthis.tag?`some(${this.value})`:"none()"}}a.singletonNone=newa(!1),Array.prototype.slice;constu=(t,e)=>{for(letr=0,o=t.length;r<o;r++)e(t[r],r)};i(Array.from)&&Array.from;constc=t=>{if(null==t)thrownewError("Node cannot be null or undefined");return{dom:t}},d=c,h=(t,e)=>{constr=t.dom;if(1!==r.nodeType)return!1;{constt=r;if(void0!==t.matches)returnt.matches(e);if(void0!==t.msMatchesSelector)returnt.msMatchesSelector(e);if(void0!==t.webkitMatchesSelector)returnt.webkitMatchesSelector(e);if(void0!==t.mozMatchesSelector)returnt.mozMatchesSelector(e);thrownewError("Browser lacks native selectors")}},m=t=>e=>(t=>t.dom.nodeType)(e)===t,g=m(1),f=m(3),v=m(11),y=t=>d(t.dom.host),p=(t,e)=>{t.dom.removeAttribute(e)},w=t=>{conste=f(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;constr=e.ownerDocument;return(t=>{conste=(t=>d(t.dom.getRootNode()))(t);returnv(r=e)&&n(r.dom.host)?a.some(e):a.none();varr})(d(e)).fold((()=>r.body.contains(e)),(o=w,i=y,t=>o(i(t))));varo,i},b=t=>"rtl"===((t,e)=>{constr=t.dom,o=window.getComputedStyle(r).getPropertyValue(e);return""!==o||w(t)?o:((t,e)=>(t=>void0!==t.style&&i(t.style.getPropertyValue))(t)?t.style.getPropertyValue(e):"")(r,e)})(t,"direction")?"rtl":"ltr",S=(t,e)=>(t=>((t,e)=>{constr=[];for(leto=0,n=t.length;o<n;o++){constn=t[o];e(n,o)&&r.push(n)}returnr})(((t,e)=>{constr=t.length,o=newArray(r);for(letn=0;n<r;n++){constr=t[n];o[n]=e(r,n)}returno})(t.dom.childNodes,d),(t=>h(t,e))))(t),N=t=>g(t)&&"li"===t.dom.nodeName.toLowerCase();constA=(t,e,n)=>{u(e,(e=>{constc=d(e),m=N(c),f=((t,e)=>{return(e?(r=t,o="ol,ul",((t,e,r)=>{letn=t.dom;consts=i(r)?r:l;for(;n.parentNode;){n=n.parentNode;constt=d(n);if(h(t,o))returna.some(t);if(s(t))break}returna.none()})(r,0,n)):a.some(t)).getOr(t);varr,o,n})(c,m);varv;(v=f,(t=>a.from(t.dom.parentNode).map(d))(v).filter(g)).each((e=>{if(t.setStyle(f.dom,"direction",null),b(e)===n?p(f,"dir"):((t,e,n)=>{((t,e,n)=>{if(!(r(n)||o(n)||s(n)))throwconsole.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),newError("Attribute value was not simple");t.setAttribute(e,n+"")})(t.dom,e,n)})(f,"dir",n),b(f)!==n&&t.setStyle(f.dom,"direction",n),m){conste=S(f,"li[dir],li[style]");u(e,(e=>{p(e,"dir"),t.setStyle(e.dom,"direction",null)}))}}))}))},T=(t,e)=>{t.selection.isEditable()&&(A(t.dom,t.selection.getSelectedBlocks(),e),t.nodeChanged())},C=(t,e)=>r=>{consto=o=>{constn=d(o.element);r.setActive(b(n)===e),r.setEnabled(t.selection.isEditable())};returnt.on("NodeChange",o),r.setEnabled(t.selection.isEditable()),()=>t.off("NodeChange",o)};t.add("directionality",(t=>{(t=>{t.addCommand("mceDirectionLTR",(()=>{T(t,"ltr")})),t.addCommand("mceDirectionRTL",(()=>{T(t,"rtl")}))})(t),(t=>{t.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:()=>t.execCommand("mceDirectionLTR"),onSetup:C(t,"ltr")}),t.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:()=>t.execCommand("mceDirectionRTL"),onSetup:C(t,"rtl")})})(t)}))}();
!function(){"use strict";vare=tinymce.util.Tools.resolve("tinymce.PluginManager");constt=e=>t=>(e=>{constt=typeofe;returnnull===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(s=r=e,(o=String).prototype.isPrototypeOf(s)||(null===(n=r.constructor)||void0===n?void0:n.name)===o.name)?"string":t;vars,r,o,n})(t)===e,s=t("string"),r=t("object"),o=t("array"),n=("function",e=>"function"==typeofe);varc=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=tinymce.util.Tools.resolve("tinymce.EditorManager"),l=tinymce.util.Tools.resolve("tinymce.Env"),a=tinymce.util.Tools.resolve("tinymce.util.Tools");constp=e=>t=>t.options.get(e),u=p("importcss_merge_classes"),m=p("importcss_exclusive"),f=p("importcss_selector_converter"),y=p("importcss_selector_filter"),d=p("importcss_groups"),h=p("importcss_append"),g=p("importcss_file_filter"),_=p("skin"),v=p("skin_url"),b=Array.prototype.push,x=/^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/,T=e=>s(e)?t=>-1!==t.indexOf(e):einstanceofRegExp?t=>e.test(t):e,S=(e,t)=>{lets={};constr=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(!r)return;consto=r[1],n=r[2].substr(1).split(".").join(" "),c=a.makeMap("a,img");returnr[1]?(s={title:t},e.schema.getTextBlockElements()[o]?s.block=o:e.schema.getBlockElements()[o]||c[o.toLowerCase()]?s.selector=o:s.inline=o):r[2]&&(s={inline:"span",title:t.substr(1),classes:n}),u(e)?s.classes=n:s.attributes={class:n},s},k=(e,t)=>null===t||m(e),M=e=>{e.on("init",(()=>{constt=(()=>{conste=[],t=[],s={};return{addItemToGroup:(e,r)=>{s[e]?s[e].push(r):(t.push(e),s[e]=[r])},addItem:t=>{e.push(t)},toFormats:()=>{return(r=t,n=e=>{constt=s[e];return0===t.length?[]:[{title:e,items:t}]},(e=>{constt=[];for(lets=0,r=e.length;s<r;++s){if(!o(e[s]))thrownewError("Arr.flatten item "+s+" was not an array, input: "+e);b.apply(t,e[s])}returnt})(((e,t)=>{consts=e.length,r=newArray(s);for(leto=0;o<s;o++){consts=e[o];r[o]=t(s,o)}returnr})(r,n))).concat(e);varr,n}}})(),r={},n=T(y(e)),p=(e=>a.map(e,(e=>a.extend({},e,{original:e,selectors:{},filter:T(e.filter)}))))(d(e)),u=(t,s)=>{if(((e,t,s,r)=>!(k(e,s)?tinr:tins.selectors))(e,t,s,r)){((e,t,s,r)=>{k(e,s)?r[t]=!0:s.selectors[t]=!0})(e,t,s,r);consto=((e,t,s,r)=>{leto;constn=f(e);returno=r&&r.selector_converter?r.selector_converter:n||(()=>S(e,s)),o.call(t,s,r)})(e,e.plugins.importcss,t,s);if(o){constt=o.name||c.DOM.uniqueId();returne.formatter.register(t,o),{title:o.title,format:t}}}returnnull};a.each(((e,t,r)=>{consto=[],n={},c=(t,n)=>{letp,u=t.href;if(u=(e=>{constt=l.cacheSuffix;returns(e)&&(e=e.replace("?"+t,"").replace("&"+t,"")),e})(u),u&&(!r||r(u,n))&&!((e,t)=>{consts=_(e);if(s){constr=v(e),o=r?e.documentBaseURI.toAbsolute(r):i.baseURL+"/skins/ui/"+s,n=i.baseURL+"/skins/content/",c=e.editorManager.suffix;returnt===o+"/content"+(e.inline?".inline":"")+`${c}.css`||-1!==t.indexOf(n)}return!1})(e,u)){a.each(t.imports,(e=>{c(e,!0)}));try{p=t.cssRules||t.rules}catch(e){}a.each(p,(e=>{e.styleSheet&&e.styleSheet?c(e.styleSheet,!0):e.selectorText&&a.each(e.selectorText.split(","),(e=>{o.push(a.trim(e))}))}))}};a.each(e.contentCSS,(e=>{n[e]=!0})),r||(r=(e,t)=>t||n[e]);try{a.each(t.styleSheets,(e=>{c(e)}))}catch(e){}returno})(e,e.getDoc(),T(g(e))),(e=>{if(!x.test(e)&&(!n||n(e))){consts=((e,t)=>a.grep(e,(e=>!e.filter||e.filter(t))))(p,e);if(s.length>0)a.each(s,(s=>{constr=u(e,s);r&&t.addItemToGroup(s.title,r)}));else{consts=u(e,null);s&&t.addItem(s)}}}));constm=t.toFormats();e.dispatch("addStyleModifications",{items:m,replace:!h(e)})}))};e.add("importcss",(e=>((e=>{constt=e.options.register,o=e=>s(e)||n(e)||r(e);t("importcss_merge_classes",{processor:"boolean",default:!0}),t("importcss_exclusive",{processor:"boolean",default:!0}),t("importcss_selector_converter",{processor:"function"}),t("importcss_selector_filter",{processor:o}),t("importcss_file_filter",{processor:o}),t("importcss_groups",{processor:"object[]"}),t("importcss_append",{processor:"boolean",default:!1})})(e),M(e),(e=>({convertSelectorToFormat:t=>S(e,t)}))(e))))}();
!function(){"use strict";vare=tinymce.util.Tools.resolve("tinymce.PluginManager");constt=e=>t=>(e=>{constt=typeofe;returnnull===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(s=r=e,(o=String).prototype.isPrototypeOf(s)||(null===(n=r.constructor)||void0===n?void0:n.name)===o.name)?"string":t;vars,r,o,n})(t)===e,s=t("string"),r=t("object"),o=t("array"),n=e=>"function"==typeofe;Array.prototype.slice;constc=Array.prototype.push;n(Array.from)&&Array.from;vari=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),l=tinymce.util.Tools.resolve("tinymce.EditorManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),p=tinymce.util.Tools.resolve("tinymce.util.Tools");constu=e=>t=>t.options.get(e),m=u("importcss_merge_classes"),f=u("importcss_exclusive"),y=u("importcss_selector_converter"),d=u("importcss_selector_filter"),h=u("importcss_groups"),g=u("importcss_append"),_=u("importcss_file_filter"),v=u("skin"),b=u("skin_url"),x=/^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/,T=e=>s(e)?t=>-1!==t.indexOf(e):einstanceofRegExp?t=>e.test(t):e,S=(e,t)=>{lets={};constr=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(!r)return;consto=r[1],n=r[2].substr(1).split(".").join(" "),c=p.makeMap("a,img");returnr[1]?(s={title:t},e.schema.getTextBlockElements()[o]?s.block=o:e.schema.getBlockElements()[o]||c[o.toLowerCase()]?s.selector=o:s.inline=o):r[2]&&(s={inline:"span",title:t.substr(1),classes:n}),m(e)?s.classes=n:s.attributes={class:n},s},A=(e,t)=>null===t||f(e),k=e=>{e.on("init",(()=>{constt=(()=>{conste=[],t=[],s={};return{addItemToGroup:(e,r)=>{s[e]?s[e].push(r):(t.push(e),s[e]=[r])},addItem:t=>{e.push(t)},toFormats:()=>{return(r=t,n=e=>{constt=s[e];return0===t.length?[]:[{title:e,items:t}]},(e=>{constt=[];for(lets=0,r=e.length;s<r;++s){if(!o(e[s]))thrownewError("Arr.flatten item "+s+" was not an array, input: "+e);c.apply(t,e[s])}returnt})(((e,t)=>{consts=e.length,r=newArray(s);for(leto=0;o<s;o++){consts=e[o];r[o]=t(s,o)}returnr})(r,n))).concat(e);varr,n}}})(),r={},n=T(d(e)),u=(e=>p.map(e,(e=>p.extend({},e,{original:e,selectors:{},filter:T(e.filter)}))))(h(e)),m=(t,s)=>{if(((e,t,s,r)=>!(A(e,s)?tinr:tins.selectors))(e,t,s,r)){((e,t,s,r)=>{A(e,s)?r[t]=!0:s.selectors[t]=!0})(e,t,s,r);consto=((e,t,s,r)=>{leto;constn=y(e);returno=r&&r.selector_converter?r.selector_converter:n||(()=>S(e,s)),o.call(t,s,r)})(e,e.plugins.importcss,t,s);if(o){constt=o.name||i.DOM.uniqueId();returne.formatter.register(t,o),{title:o.title,format:t}}}returnnull};p.each(((e,t,r)=>{consto=[],n={},c=(t,n)=>{leti,u=t.href;if(u=(e=>{constt=a.cacheSuffix;returns(e)&&(e=e.replace("?"+t,"").replace("&"+t,"")),e})(u),u&&(!r||r(u,n))&&!((e,t)=>{consts=v(e);if(s){constr=b(e),o=r?e.documentBaseURI.toAbsolute(r):l.baseURL+"/skins/ui/"+s,n=l.baseURL+"/skins/content/",c=e.editorManager.suffix;returnt===o+"/content"+(e.inline?".inline":"")+`${c}.css`||-1!==t.indexOf(n)}return!1})(e,u)){p.each(t.imports,(e=>{c(e,!0)}));try{i=t.cssRules||t.rules}catch(e){}p.each(i,(e=>{e.styleSheet&&e.styleSheet?c(e.styleSheet,!0):e.selectorText&&p.each(e.selectorText.split(","),(e=>{o.push(p.trim(e))}))}))}};p.each(e.contentCSS,(e=>{n[e]=!0})),r||(r=(e,t)=>t||n[e]);try{p.each(t.styleSheets,(e=>{c(e)}))}catch(e){}returno})(e,e.getDoc(),T(_(e))),(e=>{if(!x.test(e)&&(!n||n(e))){consts=((e,t)=>p.grep(e,(e=>!e.filter||e.filter(t))))(u,e);if(s.length>0)p.each(s,(s=>{constr=m(e,s);r&&t.addItemToGroup(s.title,r)}));else{consts=m(e,null);s&&t.addItem(s)}}}));constf=t.toFormats();e.dispatch("addStyleModifications",{items:f,replace:!g(e)})}))};e.add("importcss",(e=>((e=>{constt=e.options.register,o=e=>s(e)||n(e)||r(e);t("importcss_merge_classes",{processor:"boolean",default:!0}),t("importcss_exclusive",{processor:"boolean",default:!0}),t("importcss_selector_converter",{processor:"function"}),t("importcss_selector_filter",{processor:o}),t("importcss_file_filter",{processor:o}),t("importcss_groups",{processor:"object[]"}),t("importcss_append",{processor:"boolean",default:!1})})(e),k(e),(e=>({convertSelectorToFormat:t=>S(e,t)}))(e))))}();
!function(){"use strict";vare=tinymce.util.Tools.resolve("tinymce.PluginManager");constt=e=>t=>t.options.get(e),a=t("insertdatetime_dateformat"),n=t("insertdatetime_timeformat"),r=t("insertdatetime_formats"),s=t("insertdatetime_element"),i="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),o="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),l="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),m="January February March April May June July August September October November December".split(" "),c=(e,t)=>{if((e=""+e).length<t)for(leta=0;a<t-e.length;a++)e="0"+e;returne},d=(e,t,a=newDate)=>(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+a.getFullYear())).replace("%y",""+a.getYear())).replace("%m",c(a.getMonth()+1,2))).replace("%d",c(a.getDate(),2))).replace("%H",""+c(a.getHours(),2))).replace("%M",""+c(a.getMinutes(),2))).replace("%S",""+c(a.getSeconds(),2))).replace("%I",""+((a.getHours()+11)%12+1))).replace("%p",a.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(m[a.getMonth()]))).replace("%b",""+e.translate(l[a.getMonth()]))).replace("%A",""+e.translate(o[a.getDay()]))).replace("%a",""+e.translate(i[a.getDay()]))).replace("%%","%"),u=(e,t)=>{if(s(e)){consta=d(e,t);letn;n=/%[HMSIp]/.test(t)?d(e,"%Y-%m-%dT%H:%M"):d(e,"%Y-%m-%d");constr=e.dom.getParent(e.selection.getStart(),"time");r?((e,t,a,n)=>{constr=e.dom.create("time",{datetime:a},n);e.dom.replace(r,t),e.selection.select(r,!0),e.selection.collapse(!1)})(e,r,n,a):e.insertContent('<time datetime="'+n+'">'+a+"</time>")}elsee.insertContent(d(e,t))};varp=tinymce.util.Tools.resolve("tinymce.util.Tools");constg=e=>t=>{consta=()=>{t.setEnabled(e.selection.isEditable())};returne.on("NodeChange",a),a(),()=>{e.off("NodeChange",a)}};e.add("insertdatetime",(e=>{(e=>{constt=e.options.register;t("insertdatetime_dateformat",{processor:"string",default:e.translate("%Y-%m-%d")}),t("insertdatetime_timeformat",{processor:"string",default:e.translate("%H:%M:%S")}),t("insertdatetime_formats",{processor:"string[]",default:["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"]}),t("insertdatetime_element",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mceInsertDate",((t,n)=>{u(e,null!=n?n:a(e))})),e.addCommand("mceInsertTime",((t,a)=>{u(e,null!=a?a:n(e))}))})(e),(e=>{constt=r(e),a=(e=>{lett=e;return{get:()=>t,set:e=>{t=e}}})((e=>{constt=r(e);returnt.length>0?t[0]:n(e)})(e)),s=t=>e.execCommand("mceInsertDate",!1,t);e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:e=>e===a.get(),fetch:a=>{a(p.map(t,(t=>({type:"choiceitem",text:d(e,t),value:t}))))},onAction:e=>{s(a.get())},onItemAction:(e,t)=>{a.set(t),s(t)},onSetup:g(e)});consti=e=>()=>{a.set(e),s(e)};e.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:()=>p.map(t,(t=>({type:"menuitem",text:d(e,t),onAction:i(t)}))),onSetup:g(e)})})(e)}))}();
!function(){"use strict";vare=tinymce.util.Tools.resolve("tinymce.PluginManager");constt=e=>t=>t.options.get(e),a=t("insertdatetime_dateformat"),n=t("insertdatetime_timeformat"),r=t("insertdatetime_formats"),s=t("insertdatetime_element"),i="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),o="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),l="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),m="January February March April May June July August September October November December".split(" "),c=(e,t)=>{if((e=""+e).length<t)for(leta=0;a<t-e.length;a++)e="0"+e;returne},d=(e,t,a=newDate)=>(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+a.getFullYear())).replace("%y",""+a.getYear())).replace("%m",c(a.getMonth()+1,2))).replace("%d",c(a.getDate(),2))).replace("%H",""+c(a.getHours(),2))).replace("%M",""+c(a.getMinutes(),2))).replace("%S",""+c(a.getSeconds(),2))).replace("%I",""+((a.getHours()+11)%12+1))).replace("%p",a.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(m[a.getMonth()]))).replace("%b",""+e.translate(l[a.getMonth()]))).replace("%A",""+e.translate(o[a.getDay()]))).replace("%a",""+e.translate(i[a.getDay()]))).replace("%%","%"),u=(e,t)=>{if(s(e)&&e.selection.isEditable()){consta=d(e,t);letn;n=/%[HMSIp]/.test(t)?d(e,"%Y-%m-%dT%H:%M"):d(e,"%Y-%m-%d");constr=e.dom.getParent(e.selection.getStart(),"time");r?((e,t,a,n)=>{constr=e.dom.create("time",{datetime:a},n);e.dom.replace(r,t),e.selection.select(r,!0),e.selection.collapse(!1)})(e,r,n,a):e.insertContent('<time datetime="'+n+'">'+a+"</time>")}elsee.insertContent(d(e,t))};varp=tinymce.util.Tools.resolve("tinymce.util.Tools");constg=e=>t=>{consta=()=>{t.setEnabled(e.selection.isEditable())};returne.on("NodeChange",a),a(),()=>{e.off("NodeChange",a)}};e.add("insertdatetime",(e=>{(e=>{constt=e.options.register;t("insertdatetime_dateformat",{processor:"string",default:e.translate("%Y-%m-%d")}),t("insertdatetime_timeformat",{processor:"string",default:e.translate("%H:%M:%S")}),t("insertdatetime_formats",{processor:"string[]",default:["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"]}),t("insertdatetime_element",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mceInsertDate",((t,n)=>{u(e,null!=n?n:a(e))})),e.addCommand("mceInsertTime",((t,a)=>{u(e,null!=a?a:n(e))}))})(e),(e=>{constt=r(e),a=(e=>{lett=e;return{get:()=>t,set:e=>{t=e}}})((e=>{constt=r(e);returnt.length>0?t[0]:n(e)})(e)),s=t=>e.execCommand("mceInsertDate",!1,t);e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:e=>e===a.get(),fetch:a=>{a(p.map(t,(t=>({type:"choiceitem",text:d(e,t),value:t}))))},onAction:e=>{s(a.get())},onItemAction:(e,t)=>{a.set(t),s(t)},onSetup:g(e)});consti=e=>()=>{a.set(e),s(e)};e.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:()=>p.map(t,(t=>({type:"menuitem",text:d(e,t),onAction:i(t)}))),onSetup:g(e)})})(e)}))}();
!function(){"use strict";varn=tinymce.util.Tools.resolve("tinymce.PluginManager");conste=n=>e=>typeofe===n,o=e("boolean"),a=e("number"),t=n=>e=>e.options.get(n),i=t("nonbreaking_force_tab"),s=t("nonbreaking_wrap"),r=(n,e)=>{leto="";for(leta=0;a<e;a++)o+=n;returno},c=(n,e)=>{consto=s(n)||n.plugins.visualchars?`<span class="${(n=>!!n.plugins.visualchars&&n.plugins.visualchars.isEnabled())(n)?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap"}" contenteditable="false">${r(" ",e)}</span>`:r(" ",e);n.undoManager.transact((()=>n.insertContent(o)))};varl=tinymce.util.Tools.resolve("tinymce.util.VK");constu=n=>e=>{consto=()=>{e.setEnabled(n.selection.isEditable())};returnn.on("NodeChange",o),o(),()=>{n.off("NodeChange",o)}};n.add("nonbreaking",(n=>{(n=>{conste=n.options.register;e("nonbreaking_force_tab",{processor:n=>o(n)?{value:n?3:0,valid:!0}:a(n)?{value:n,valid:!0}:{valid:!1,message:"Must be a boolean or number."},default:!1}),e("nonbreaking_wrap",{processor:"boolean",default:!0})})(n),(n=>{n.addCommand("mceNonBreaking",(()=>{c(n,1)}))})(n),(n=>{conste=()=>n.execCommand("mceNonBreaking");n.ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:e,onSetup:u(n)}),n.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:e,onSetup:u(n)})})(n),(n=>{conste=i(n);e>0&&n.on("keydown",(o=>{if(o.keyCode===l.TAB&&!o.isDefaultPrevented()){if(o.shiftKey)return;o.preventDefault(),o.stopImmediatePropagation(),c(n,e)}}))})(n)}))}();
!function(){"use strict";vare=tinymce.util.Tools.resolve("tinymce.PluginManager");consto=("function",e=>"function"==typeofe);varn=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),t=tinymce.util.Tools.resolve("tinymce.util.Tools");consta=e=>o=>o.options.get(e),c=a("save_enablewhendirty"),i=a("save_onsavecallback"),s=a("save_oncancelcallback"),r=(e,o)=>{e.notificationManager.open({text:o,type:"error"})},l=e=>o=>{constn=()=>{o.setEnabled(!c(e)||e.isDirty())};returnn(),e.on("NodeChange dirty",n),()=>e.off("NodeChange dirty",n)};e.add("save",(e=>{(e=>{consto=e.options.register;o("save_enablewhendirty",{processor:"boolean",default:!0}),o("save_onsavecallback",{processor:"function"}),o("save_oncancelcallback",{processor:"function"})})(e),(e=>{e.ui.registry.addButton("save",{icon:"save",tooltip:"Save",enabled:!1,onAction:()=>e.execCommand("mceSave"),onSetup:l(e),shortcut:"Meta+S"}),e.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",enabled:!1,onAction:()=>e.execCommand("mceCancel"),onSetup:l(e)}),e.addShortcut("Meta+S","","mceSave")})(e),(e=>{e.addCommand("mceSave",(()=>{(e=>{constt=n.DOM.getParent(e.id,"form");if(c(e)&&!e.isDirty())return;e.save();consta=i(e);if(o(a))returna.call(e,e),voide.nodeChanged();t?(e.setDirty(!1),t.onsubmit&&!t.onsubmit()||("function"==typeoft.submit?t.submit():r(e,"Error: Form submit field collision.")),e.nodeChanged()):r(e,"Error: No form element found.")})(e)})),e.addCommand("mceCancel",(()=>{(e=>{constn=t.trim(e.startContent),a=s(e);o(a)?a.call(e,e):e.resetContent(n)})(e)}))})(e)}))}();
!function(){"use strict";vare=tinymce.util.Tools.resolve("tinymce.PluginManager");consto=e=>"function"==typeofe;vart=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),n=tinymce.util.Tools.resolve("tinymce.util.Tools");consta=e=>o=>o.options.get(e),c=a("save_enablewhendirty"),i=a("save_onsavecallback"),s=a("save_oncancelcallback"),r=(e,o)=>{e.notificationManager.open({text:o,type:"error"})},l=e=>o=>{constt=()=>{o.setEnabled(!c(e)||e.isDirty())};returnt(),e.on("NodeChange dirty",t),()=>e.off("NodeChange dirty",t)};e.add("save",(e=>{(e=>{consto=e.options.register;o("save_enablewhendirty",{processor:"boolean",default:!0}),o("save_onsavecallback",{processor:"function"}),o("save_oncancelcallback",{processor:"function"})})(e),(e=>{e.ui.registry.addButton("save",{icon:"save",tooltip:"Save",enabled:!1,onAction:()=>e.execCommand("mceSave"),onSetup:l(e),shortcut:"Meta+S"}),e.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",enabled:!1,onAction:()=>e.execCommand("mceCancel"),onSetup:l(e)}),e.addShortcut("Meta+S","","mceSave")})(e),(e=>{e.addCommand("mceSave",(()=>{(e=>{constn=t.DOM.getParent(e.id,"form");if(c(e)&&!e.isDirty())return;e.save();consta=i(e);if(o(a))returna.call(e,e),voide.nodeChanged();n?(e.setDirty(!1),n.onsubmit&&!n.onsubmit()||("function"==typeofn.submit?n.submit():r(e,"Error: Form submit field collision.")),e.nodeChanged()):r(e,"Error: No form element found.")})(e)})),e.addCommand("mceCancel",(()=>{(e=>{constt=n.trim(e.startContent),a=s(e);o(a)?a.call(e,e):e.resetContent(t)})(e)}))})(e)}))}();
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.