PageSourceSearch

https://www.fashionpersonnel.co.uk/_next/static/chunks/97f8326a.a5d1cb37d2c3e76f.js

js fashionpersonnel.co.uk collected 2026-10-05 21:37:15 UTC 50,336 bytes, 2 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a0570de2-6bdc-41f8-bf9a-daa07e1da4e0",e._sentryDebugIdIdentifier="sentry-dbid-a0570de2-6bdc-41f8-bf9a-daa07e1da4e0")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[629],{63314:(e,t,i)=>{i.d(t,{$D:()=>y,AB:()=>$,Bn:()=>L,Cf:()=>k,DJ:()=>Z,FG:()=>Y,GS:()=>f,HL:()=>h,IK:()=>X,IO:()=>_,IU:()=>R,OZ:()=>P,PQ:()=>ei,QE:()=>D,Qg:()=>g,RA:()=>v,Ru:()=>V,Sv:()=>G,Vr:()=>S,WW:()=>E,Xi:()=>eo,Xj:()=>W,Zk:()=>et,_E:()=>K,d1:()=>j,em:()=>O,im:()=>p,jQ:()=>I,n7:()=>ee,rV:()=>A,sy:()=>F,uZ:()=>H,w6:()=>b,yo:()=>q,zB:()=>C,zh:()=>N});var l=i(72494),r=i(18430),o=i(53509),n=i(68019),s=i(30104),m=i(75273),a=i(59304),d=i(47942),u=i(54542),c=i(33915);function h(e,t,i,l){t&&b(e,t,l),i&&g(e,i,l)}function g(e,t,i){if(t.attributes)for(let[l,r]of Object.entries(t.attributes))e.setAttribute(l,r,i);t.styles&&e.setStyle(t.styles,i),t.classes&&e.addClass(t.classes,i)}function b(e,t,i){if(t.attributes)for(let[l]of Object.entries(t.attributes))e.removeAttribute(l,i);if(t.styles)for(let l of Object.keys(t.styles))e.removeStyle(l,i);t.classes&&e.removeClass(t.classes,i)}function f(e,t){let i=(0,s.m)(e),l="attributes";for(l in t)"classes"==l?i[l]=Array.from(new Set([...e[l]||[],...t[l]])):i[l]={...e[l],...t[l]};return i}function p(e,t,i,l,r){let o=t.getAttribute(i),n={};for(let e of["attributes","styles","classes"]){if(e!=l){o&&o[e]&&(n[e]=o[e]);continue}if("classes"==l){let t=new Set(o&&o.classes||[]);r(t),t.size&&(n[e]=Array.from(t));continue}let t=new Map(Object.entries(o&&o[e]||{}));r(t),t.size&&(n[e]=Object.fromEntries(t))}Object.keys(n).length?t.is("documentSelection")?e.setSelectionAttribute(i,n):e.setAttribute(i,n,t):o&&(t.is("documentSelection")?e.removeSelectionAttribute(i):e.removeAttribute(i,t))}function w(e,t,i){for(let l of t.getItems({shallow:!0})){let t=l.getAttribute(e);t&&t.attributes&&Object.keys(t.attributes).length?Object.keys(t).length>1&&i.setAttribute(e,{attributes:t.attributes},l):i.removeAttribute(e,l)}}function A(e){return(0,m.N)(e).replace(/ /g,"")}function v(e){return`html${A(e)}Attributes`}function y({model:e}){return(t,i)=>i.writer.createElement(e,{htmlContent:t.getCustomProperty("$rawContent")})}function E(e,{view:t,isInline:i}){let l=e.t;return(e,{writer:r})=>{let o=l("HTML object"),s=k(t,e,r),m=e.getAttribute(v(t));r.addClass("html-object-embed__content",s),m&&g(r,m,s);let a=r.createContainerElement(i?"span":"div",{class:"html-object-embed","data-html-object-embed-label":o},s);return(0,n.Ex)(a,r,{label:o})}}function k(e,t,i){return i.createRawElement(e,null,(e,i)=>{i.setContentOf(e,t.getAttribute("htmlContent"))})}function S({view:e,model:t,allowEmpty:i},l){return t=>{t.on(`element:${e}`,(e,t,o)=>{let n=l.processViewAttributes(t.viewItem,o);if(n||o.consumable.test(t.viewItem,{name:!0})){if(n=n||{},o.consumable.consume(t.viewItem,{name:!0}),t.modelRange||(t=Object.assign(t,o.convertChildren(t.viewItem,t.modelCursor))),i&&t.modelRange.isCollapsed&&Object.keys(n).length){let e=o.writer.createElement("htmlEmptyElement");if(!o.safeInsert(e,t.modelCursor))return;let i=o.getSplitParts(e);t.modelRange=o.writer.createRange(t.modelRange.start,o.writer.createPositionAfter(i[i.length-1])),o.updateConversionResult(e,t),r(e,n,o);return}for(let e of t.modelRange.getItems())r(e,n,o)}},{priority:"low"})};function r(e,i,l){if(l.schema.checkAttribute(e,t)){let r=f(i,e.getAttribute(t)||{});l.writer.setAttribute(t,r,e)}}}function C({model:e,view:t},i){return(l,{writer:r,consumable:o})=>{if(!l.hasAttribute(e))return null;let s=r.createContainerElement(t),m=l.getAttribute(e);return o.consume(l,`attribute:${e}`),g(r,m,s),s.getFillerOffset=()=>null,i?(0,n.Ex)(s,r):s}}function F({priority:e,view:t}){return(i,l)=>{if(!i)return;let{writer:r}=l,o=r.createAttributeElement(t,null,{priority:e});return g(r,i,o),o}}function O({view:e},t){return i=>{i.on(`element:${e}`,(e,i,l)=>{if(!i.modelRange||i.modelRange.isCollapsed)return;let r=t.processViewAttributes(i.viewItem,l);r&&l.writer.setAttribute(v(i.viewItem.name),r,i.modelRange)},{priority:"low"})}}function $({view:e,model:t}){return i=>{i.on(`attribute:${v(e)}:${t}`,(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;let{attributeOldValue:l,attributeNewValue:r}=t;h(i.writer,l,r,i.mapper.toViewElement(t.item))})}}let P={block:[{model:"codeBlock",view:"pre"},{model:"paragraph",view:"p"},{model:"blockQuote",view:"blockquote"},{model:"listItem",view:"li"},{model:"pageBreak",view:"div"},{model:"rawHtml",view:"div"},{model:"table",view:"table"},{model:"tableRow",view:"tr"},{model:"tableCell",view:"td"},{model:"tableCell",view:"th"},{model:"tableColumnGroup",view:"colgroup"},{model:"tableColumn",view:"col"},{model:"caption",view:"caption"},{model:"caption",view:"figcaption"},{model:"imageBlock",view:"img"},{model:"imageInline",view:"img"},{model:"horizontalLine",view:"hr"}
1,{model:"htmlP",view:"p",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlBlockquote",view:"blockquote",modelSchema:{inheritAllFrom:"$container"}},{model:"htmlTable",view:"table",modelSchema:{allowWhere:"$block",isBlock:!0}},{model:"htmlTbody",view:"tbody",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlThead",view:"thead",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlTfoot",view:"tfoot",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlCaption",view:"caption",modelSchema:{allowIn:"htmlTable",allowChildren:"$text",isBlock:!1}},{model:"htmlColgroup",view:"colgroup",modelSchema:{allowIn:"htmlTable",allowChildren:"col",isBlock:!1}},{model:"htmlCol",view:"col",modelSchema:{allowIn:"htmlColgroup",isBlock:!1}},{model:"htmlTr",view:"tr",modelSchema:{allowIn:["htmlTable","htmlThead","htmlTbody"],isLimit:!0}},{model:"htmlTd",view:"td",modelSchema:{allowIn:"htmlTr",allowContentOf:"$container",isLimit:!0,isBlock:!1}},{model:"htmlTh",view:"th",modelSchema:{allowIn:"htmlTr",allowContentOf:"$container",isLimit:!0,isBlock:!1}},{model:"htmlFigure",view:"figure",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlFigcaption",view:"figcaption",modelSchema:{allowIn:"htmlFigure",allowChildren:"$text",isBlock:!1}},{model:"htmlAddress",view:"address",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlAside",view:"aside",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlMain",view:"main",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlDetails",view:"details",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlSummary",view:"summary",modelSchema:{allowChildren:["htmlH1","htmlH2","htmlH3","htmlH4","htmlH5","htmlH6","$text"],allowIn:"htmlDetails",isBlock:!1}},{model:"htmlDiv",view:"div",paragraphLikeModel:"htmlDivParagraph",modelSchema:{inheritAllFrom:"$container"}},{model:"htmlFieldset",view:"fieldset",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlLegend",view:"legend",modelSchema:{allowIn:"htmlFieldset",allowChildren:"$text"}},{model:"htmlHeader",view:"header",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlFooter",view:"footer",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlForm",view:"form",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlHgroup",view:"hgroup",modelSchema:{allowIn:["$root","$container"],allowChildren:["paragraph","htmlP","htmlH1","htmlH2","htmlH3","htmlH4","htmlH5","htmlH6"],isBlock:!1}},{model:"htmlH1",view:"h1",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH2",view:"h2",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH3",view:"h3",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH4",view:"h4",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH5",view:"h5",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH6",view:"h6",modelSchema:{inheritAllFrom:"$block"}},{model:"$htmlList",modelSchema:{allowWhere:"$container",allowChildren:["$htmlList","htmlLi"],isBlock:!1}},{model:"htmlDir",view:"dir",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlMenu",view:"menu",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlUl",view:"ul",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlOl",view:"ol",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlLi",view:"li",modelSchema:{allowIn:"$htmlList",allowChildren:"$text",isBlock:!1}},{model:"htmlPre",view:"pre",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlArticle",view:"article",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlSection",view:"section",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlNav",view:"nav",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlDl",view:"dl",modelSchema:{allowWhere:"$container",allowChildren:["htmlDt","htmlDd","htmlDiv"],isBlock:!1}},{model:"htmlDt",view:"dt",modelSchema:{allowChildren:"$block",allowIn:"htmlDiv",isBlock:!1}},{model:"htmlDd",view:"dd",modelSchema:{allowChildren:"$block",allowIn:"htmlDiv",isBlock:!1}},{model:"htmlCenter",view:"center",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlHr",view:"hr",isEmpty:!0,modelSchema:{inheritAllFrom
1:"$blockObject"}}],inline:[{model:"htmlLiAttributes",view:"li",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlOlAttributes",view:"ol",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlUlAttributes",view:"ul",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlFigureAttributes",view:"figure",appliesToBlock:"table"},{model:"htmlTheadAttributes",view:"thead",appliesToBlock:"table"},{model:"htmlTbodyAttributes",view:"tbody",appliesToBlock:"table"},{model:"htmlFigureAttributes",view:"figure",appliesToBlock:"imageBlock"},{model:"htmlAcronym",view:"acronym",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlTt",view:"tt",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlFont",view:"font",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlTime",view:"time",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlVar",view:"var",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBig",view:"big",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSmall",view:"small",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSamp",view:"samp",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlQ",view:"q",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlOutput",view:"output",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlKbd",view:"kbd",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBdi",view:"bdi",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBdo",view:"bdo",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlAbbr",view:"abbr",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlA",view:"a",priority:5,coupledAttribute:"linkHref",attributeProperties:{isFormatting:!0}},{model:"htmlStrong",view:"strong",coupledAttribute:"bold",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlB",view:"b",coupledAttribute:"bold",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlI",view:"i",coupledAttribute:"italic",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlEm",view:"em",coupledAttribute:"italic",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlS",view:"s",coupledAttribute:"strikethrough",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlDel",view:"del",coupledAttribute:"strikethrough",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlIns",view:"ins",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlU",view:"u",coupledAttribute:"underline",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSub",view:"sub",coupledAttribute:"subscript",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSup",view:"sup",coupledAttribute:"superscript",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlCode",view:"code",coupledAttribute:"code",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlMark",view:"mark",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSpan",view:"span",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlCite",view:"cite",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlLabel",view:"label",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlDfn",view:"dfn",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlObject",view:"object",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlIframe",view:"iframe",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlInput",view:"input",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlButton",view:"button",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlTextarea",view:"textarea",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlSelect",view:"select",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlVideo",view:"video",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlEmbed",view:"embed",isObject:!0,modelSchema:{inheritAllFrom
1:"$inlineObject"}},{model:"htmlOembed",view:"oembed",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlAudio",view:"audio",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlImg",view:"img",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlCanvas",view:"canvas",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlMeter",view:"meter",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlProgress",view:"progress",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlScript",view:"script",modelSchema:{allowWhere:["$text","$block"],isInline:!0}},{model:"htmlStyle",view:"style",modelSchema:{allowWhere:["$text","$block"],isInline:!0}},{model:"htmlCustomElement",view:"$customElement",modelSchema:{allowWhere:["$text","$block"],allowAttributesOf:"$inlineObject",isInline:!0}}]};class _ extends l.k_{_definitions=[];static get pluginName(){return"DataSchema"}static get isOfficialPlugin(){return!0}init(){for(let e of P.block)this.registerBlockElement(e);for(let e of P.inline)this.registerInlineElement(e)}registerBlockElement(e){this._definitions.push({...e,isBlock:!0})}registerInlineElement(e){this._definitions.push({...e,isInline:!0})}extendBlockElement(e){this._extendDefinition({...e,isBlock:!0})}extendInlineElement(e){this._extendDefinition({...e,isInline:!0})}getDefinitionsForView(e,t=!1){let i=new Set;for(let l of this._getMatchingViewDefinitions(e)){if(t)for(let e of this._getReferences(l.model))i.add(e);i.add(l)}return i}getDefinitionsForModel(e){return this._definitions.filter(t=>t.model==e)}_getMatchingViewDefinitions(e){return this._definitions.filter(t=>{var i,l;return t.view&&(i=e,l=t.view,"string"==typeof i?i===l:i instanceof RegExp&&i.test(l))})}*_getReferences(e){let t=["inheritAllFrom","inheritTypesFrom","allowWhere","allowContentOf","allowAttributesOf"];for(let{modelSchema:i}of this._definitions.filter(t=>t.model==e))if(i)for(let l of t)for(let t of(0,r.$r)(i[l]||[]))for(let i of this._definitions.filter(e=>e.model==t))t!==e&&(yield*this._getReferences(i.model),yield i)}_extendDefinition(e){let t=Array.from(this._definitions.entries()).filter(([,t])=>t.model==e.model);if(0==t.length)return void this._definitions.push(e);for(let[i,l]of t)this._definitions[i]=(0,a.X)({},l,e,(e,t)=>Array.isArray(e)?e.concat(t):void 0)}}class I extends l.k_{_dataSchema;_allowedAttributes;_disallowedAttributes;_allowedElements;_disallowedElements;_dataInitialized;_coupledAttributes;constructor(e){super(e),this._dataSchema=e.plugins.get("DataSchema"),this._allowedAttributes=new o.PNe,this._disallowedAttributes=new o.PNe,this._allowedElements=new Set,this._disallowedElements=new Set,this._dataInitialized=!1,this._coupledAttributes=null,this._registerElementsAfterInit(),this._registerElementHandlers(),this._registerCoupledAttributesPostFixer(),this._registerAssociatedHtmlAttributesPostFixer()}static get pluginName(){return"DataFilter"}static get isOfficialPlugin(){return!0}static get requires(){return[_,n.x0]}loadAllowedConfig(e){for(let t of e){let e=t.name||/[\s\S]+/,i=B(t);this.allowElement(e),i.forEach(e=>this.allowAttributes(e))}}loadDisallowedConfig(e){for(let t of e){let e=t.name||/[\s\S]+/,i=B(t);0==i.length?this.disallowElement(e):i.forEach(e=>this.disallowAttributes(e))}}loadAllowedEmptyElementsConfig(e){for(let t of e)this.allowEmptyElement(t)}allowElement(e){for(let t of this._dataSchema.getDefinitionsForView(e,!0))this._addAllowedElement(t),this._coupledAttributes=null}disallowElement(e){for(let t of this._dataSchema.getDefinitionsForView(e,!1))this._disallowedElements.add(t.view)}allowEmptyElement(e){for(let t of this._dataSchema.getDefinitionsForView(e,!0))t.isInline&&this._dataSchema.extendInlineElement({...t,allowEmpty:!0})}allowAttributes(e){this._allowedAttributes.add(e)}disallowAttributes(e){this._disallowedAttributes.add(e)}processViewAttributes(e,t){let{consumable:i}=t;return x(e,this._disallowedAttributes,i),function(e,{attributes:t,classes:i,styles:l}){return t.length||i.length||l.length?{...t.length&&{attributes:function(e,t){let i={};for(let l of t){let t=e.getAttribute(l);void 0!==t&&(0,r.i8)(l)&&(i[l]=t)}return i}(e,t)},...l.length&&{styles:function(e,t){let i=new o.DGI(e.document.stylesProcessor);for(let l of t){let t=e.getStyle(l);void 0!==t&&i.set(l,t)}
1return Object.fromEntries(i.getStylesEntries())}(e,l)},...i.length&&{classes:i}}:null}(e,x(e,this._allowedAttributes,i))}_addAllowedElement(e){if(!this._allowedElements.has(e)){if(this._allowedElements.add(e),"appliesToBlock"in e&&"string"==typeof e.appliesToBlock)for(let t of this._dataSchema.getDefinitionsForModel(e.appliesToBlock))t.isBlock&&this._addAllowedElement(t);this._dataInitialized&&this.editor.data.once("set",()=>{this._fireRegisterEvent(e)},{priority:r.vx.highest+1})}}_registerElementsAfterInit(){this.editor.data.on("init",()=>{for(let e of(this._dataInitialized=!0,this._allowedElements))this._fireRegisterEvent(e)},{priority:r.vx.highest+1})}_registerElementHandlers(){this.on("register",(e,t)=>{let i=this.editor.model.schema;if(t.isObject&&!i.isRegistered(t.model))this._registerObjectElement(t);else if(t.isBlock)this._registerBlockElement(t);else if(t.isInline)this._registerInlineElement(t);else throw new r.Yb("data-filter-invalid-definition",null,t);e.stop()},{priority:"lowest"})}_registerCoupledAttributesPostFixer(){let e=this.editor.model,t=e.document.selection;e.document.registerPostFixer(t=>{let i=e.document.differ.getChanges(),l=!1,r=this._getCoupledAttributesMap();for(let e of i){if("attribute"!=e.type||null!==e.attributeNewValue)continue;let i=r.get(e.attributeKey);if(i)for(let{item:r}of e.range.getWalker())for(let e of i)r.hasAttribute(e)&&(t.removeAttribute(e,r),l=!0)}return l}),this.listenTo(t,"change:attribute",(i,{attributeKeys:l})=>{let r=new Set,o=this._getCoupledAttributesMap();for(let e of l){if(t.hasAttribute(e))continue;let i=o.get(e);if(i)for(let e of i)t.hasAttribute(e)&&r.add(e)}0!=r.size&&e.change(e=>{for(let t of r)e.removeSelectionAttribute(t)})})}_registerAssociatedHtmlAttributesPostFixer(){let e=this.editor.model;e.document.registerPostFixer(t=>{let i=e.document.differ.getChanges(),l=!1;for(let r of i)if("insert"===r.type&&"$text"!==r.name)for(let i of r.attributes.keys())i.startsWith("html")&&i.endsWith("Attributes")&&(e.schema.checkAttribute(r.name,i)||(t.removeAttribute(i,r.position.nodeAfter),l=!0));return l})}_getCoupledAttributesMap(){if(this._coupledAttributes)return this._coupledAttributes;for(let e of(this._coupledAttributes=new Map,this._allowedElements))if(e.coupledAttribute&&e.model){let t=this._coupledAttributes.get(e.coupledAttribute);t?t.push(e.model):this._coupledAttributes.set(e.coupledAttribute,[e.model])}return this._coupledAttributes}_fireRegisterEvent(e){e.view&&this._disallowedElements.has(e.view)||this.fire(e.view?`register:${e.view}`:"register",e)}_registerObjectElement(e){let t=this.editor,i=t.model.schema,l=t.conversion,{view:o,model:n}=e;i.register(n,e.modelSchema),o&&(i.extend(e.model,{allowAttributes:[v(o),"htmlContent"]}),t.data.registerRawContentMatcher({name:o}),l.for("upcast").elementToElement({view:o,model:y(e),converterPriority:r.vx.low+2}),l.for("upcast").add(O(e,this)),l.for("editingDowncast").elementToStructure({model:{name:n,attributes:[v(o)]},view:E(t,e)}),l.for("dataDowncast").elementToElement({model:n,view:(e,{writer:t})=>k(o,e,t)}),l.for("dataDowncast").add($(e)))}_registerBlockElement(e){let t=this.editor,i=t.model.schema,l=t.conversion,{view:o,model:n}=e;if(!i.isRegistered(e.model)){if(!e.modelSchema||(i.register(e.model,e.modelSchema),!o))return;l.for("upcast").elementToElement({model:n,view:o,converterPriority:r.vx.low+2}),l.for("downcast").elementToElement({model:n,view:(t,{writer:i})=>e.isEmpty?i.createEmptyElement(o):i.createContainerElement(o)})}o&&(i.extend(e.model,{allowAttributes:v(o)}),l.for("upcast").add(O(e,this)),l.for("downcast").add($(e)))}_registerInlineElement(e){let t=this.editor,i=t.model.schema,l=t.conversion,r=e.model;if(!e.appliesToBlock&&(i.extend("$text",{allowAttributes:r}),e.attributeProperties&&i.setAttributeProperties(r,e.attributeProperties),l.for("upcast").add(S(e,this)),l.for("downcast").attributeToElement({model:r,view:F(e)}),e.allowEmpty)){if(i.setAttributeProperties(r,{copyFromObject:!1}),!i.isRegistered("htmlEmptyElement")){i.register("htmlEmptyElement",{inheritAllFrom:"$inlineObject"});let e=e=>Array.from(e.getAttributeKeys()).some(e=>e.startsWith("html"));t.model.document.registerPostFixer(i=>{let l=t.model.document.differ.getChanges(),r=new Set;for(let t of l)if("remove"!==t.type){if("attribute"===t.type&&null===t.attributeNewValue)for(let{item:i}of t.range)i.is("element","htmlEmptyElement")&&!e(i)&&r.add(i);if("insert"===t.type&&t.position.nodeAfter){let l=t.position.nodeAfter;for(let{item:t}of i.createRangeOn(l))t.is("element","htmlEmptyElement")&&!e(t)&&r.add(t)}}for(let e of r)i.remove(e);return r.size>0})}t.data.htmlProcessor.domConverter.registerInlineObjectMatcher(t=>
1t.name==e.view&&t.isEmpty&&Array.from(t.getAttributeKeys()).length?{name:!0}:null),l.for("editingDowncast").elementToElement({model:"htmlEmptyElement",view:C(e,!0)}),l.for("dataDowncast").elementToElement({model:"htmlEmptyElement",view:C(e)})}}}function x(e,t,i){let l=t.matchAll(e)||[],r=e.document.stylesProcessor;return l.reduce((t,{match:l})=>{for(let[o,n]of l.attributes||[])if("style"==o){let l=n;for(let o of r.getRelatedStyles(l).filter(e=>e.split("-").length>l.split("-").length).sort((e,t)=>t.split("-").length-e.split("-").length))i.consume(e,{styles:[o]})&&t.styles.push(o);i.consume(e,{styles:[l]})&&t.styles.push(l)}else"class"==o?i.consume(e,{classes:[n]})&&t.classes.push(n):i.consume(e,{attributes:[o]})&&t.attributes.push(o);return t},{attributes:[],classes:[],styles:[]})}function T(e,t){let{name:i}=e,l=e[t];return(0,d.Q)(l)?Object.entries(l).map(([e,l])=>({name:i,[t]:{[e]:l}})):Array.isArray(l)?l.map(e=>({name:i,[t]:[e]})):[e]}function B(e){let{name:t,attributes:i,classes:l,styles:r}=e,o=[];return i&&o.push(...T({name:t,attributes:i},"attributes")),l&&o.push(...T({name:t,classes:l},"classes")),r&&o.push(...T({name:t,styles:r},"styles")),o}class D extends l.k_{static get requires(){return[I]}static get pluginName(){return"CodeBlockElementSupport"}static get isOfficialPlugin(){return!0}init(){if(!this.editor.plugins.has("CodeBlockEditing"))return;let e=this.editor.plugins.get(I);e.on("register:pre",(t,i)=>{var l;if("codeBlock"!==i.model)return;let r=this.editor,o=r.model.schema,n=r.conversion;o.extend("codeBlock",{allowAttributes:["htmlPreAttributes","htmlContentAttributes"]}),n.for("upcast").add((l=e,e=>{e.on("element:code",(e,t,i)=>{let r=t.viewItem,o=r.parent;function n(e,r){let o=l.processViewAttributes(e,i);o&&i.writer.setAttribute(r,o,t.modelRange)}o&&o.is("element","pre")&&(n(o,"htmlPreAttributes"),n(r,"htmlContentAttributes"))},{priority:"low"})})),n.for("downcast").add(e=>{e.on("attribute:htmlPreAttributes:codeBlock",(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;let{attributeOldValue:l,attributeNewValue:r}=t,o=i.mapper.toViewElement(t.item).parent;h(i.writer,l,r,o)}),e.on("attribute:htmlContentAttributes:codeBlock",(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;let{attributeOldValue:l,attributeNewValue:r}=t,o=i.mapper.toViewElement(t.item);h(i.writer,l,r,o)})}),t.stop()})}}class R extends l.k_{static get requires(){return[I]}static get pluginName(){return"DualContentModelElementSupport"}static get isOfficialPlugin(){return!0}init(){this.editor.plugins.get(I).on("register",(e,t)=>{let i=this.editor,l=i.model.schema,o=i.conversion;if(!t.paragraphLikeModel||l.isRegistered(t.model)||l.isRegistered(t.paragraphLikeModel))return;let n={model:t.paragraphLikeModel,view:t.view};l.register(t.model,t.modelSchema),l.register(n.model,{inheritAllFrom:"$block"}),o.for("upcast").elementToElement({view:t.view,model:(e,{writer:i})=>this._hasBlockContent(e)?i.createElement(t.model):i.createElement(n.model),converterPriority:r.vx.low+.5}),o.for("downcast").elementToElement({view:t.view,model:t.model}),this._addAttributeConversion(t),o.for("downcast").elementToElement({view:n.view,model:n.model}),this._addAttributeConversion(n),e.stop()})}_hasBlockContent(e){let t=this.editor.editing.view,i=t.domConverter.blockElements;for(let l of t.createRangeIn(e).getItems())if(l.is("element")&&i.includes(l.name))return!0;return!1}_addAttributeConversion(e){let t=this.editor,i=t.conversion,l=t.plugins.get(I);t.model.schema.extend(e.model,{allowAttributes:v(e.view)}),i.for("upcast").add(O(e,l)),i.for("downcast").add($(e))}}class H extends l.k_{static get requires(){return[_,c.xy]}static get pluginName(){return"HeadingElementSupport"}static get isOfficialPlugin(){return!0}init(){let e=this.editor;if(!e.plugins.has("HeadingEditing"))return;let t=e.config.get("heading.options");this.registerHeadingElements(e,t)}registerHeadingElements(e,t){let i=e.plugins.get(_),l=[];for(let e of t)"model"in e&&"view"in e&&(i.registerBlockElement({view:e.view,model:e.model}),l.push(e.model));i.extendBlockElement({model:"htmlHgroup",modelSchema:{allowChildren:l}}),i.extendBlockElement({model:"htmlSummary",modelSchema:{allowChildren:l}})}}function j(e,t,i){for(let{item:l}of e.createRangeOn(t).getWalker())if(l.is("element",i))return l}class N extends l.k_{static get requires(){return[I]}static get pluginName(){return"ImageElementSupport"}static get isOfficialPlugin(){return!0}init(){let e=this.editor;if(!e.plugins.has("ImageInlineEditing")&&!e.plugins.has("ImageBlockEditing"))return;let t=e.model.schema,i=e.conversion,l=e.plugins.get(I);l.on("register:figure",()=>{var e;
1i.for("upcast").add((e=l,t=>{t.on("element:figure",(t,i,l)=>{let r=i.viewItem;if(!i.modelRange||!r.hasClass("image"))return;let o=e.processViewAttributes(r,l);o&&l.writer.setAttribute("htmlFigureAttributes",o,i.modelRange)},{priority:"low"})}))}),l.on("register:img",(r,o)=>{var n,s;let m;("imageBlock"===o.model||"imageInline"===o.model)&&(t.isRegistered("imageBlock")&&t.extend("imageBlock",{allowAttributes:["htmlImgAttributes","htmlFigureAttributes","htmlLinkAttributes"]}),t.isRegistered("imageInline")&&t.extend("imageInline",{allowAttributes:["htmlA","htmlImgAttributes"]}),i.for("upcast").add((n=l,e=>{e.on("element:img",(e,t,i)=>{if(!t.modelRange)return;let l=t.viewItem,r=n.processViewAttributes(l,i);r&&i.writer.setAttribute("htmlImgAttributes",r,t.modelRange)},{priority:"low"})})),i.for("downcast").add(e=>{e.on("attribute:htmlImgAttributes:imageInline",(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;let{attributeOldValue:l,attributeNewValue:r}=t,o=i.mapper.toViewElement(t.item);h(i.writer,l,r,o)},{priority:"low"}),t("img","htmlImgAttributes"),t("figure","htmlFigureAttributes"),t("a","htmlLinkAttributes");function t(t,i){e.on(`attribute:${i}:imageBlock`,(e,i,l)=>{if(!l.consumable.test(i.item,e.name))return;let{attributeOldValue:r,attributeNewValue:o}=i,n=l.mapper.toViewElement(i.item),s=j(l.writer,n,t);s&&(h(l.writer,r,o,s),l.consumable.consume(i.item,e.name))},{priority:"low"}),"a"===t&&e.on("attribute:linkHref:imageBlock",(e,t,i)=>{if(!i.consumable.consume(t.item,"attribute:htmlLinkAttributes:imageBlock"))return;let l=i.mapper.toViewElement(t.item),r=j(i.writer,l,"a");g(i.writer,t.item.getAttribute("htmlLinkAttributes"),r)},{priority:"low"})}}),e.plugins.has("LinkImage")&&i.for("upcast").add((s=l,m=e.plugins.get("ImageUtils"),e=>{e.on("element:a",(e,t,i)=>{let l=t.viewItem;if(!m.findViewImgElement(l))return;let r=t.modelCursor.parent;if(!r.is("element","imageBlock"))return;let o=s.processViewAttributes(l,i);o&&i.writer.setAttribute("htmlLinkAttributes",o,r)},{priority:"low"})})),r.stop())})}}class L extends l.k_{static get requires(){return[I]}static get pluginName(){return"MediaEmbedElementSupport"}static get isOfficialPlugin(){return!0}init(){let e=this.editor;if(!e.plugins.has("MediaEmbed")||e.config.get("mediaEmbed.previewsInData"))return;let t=e.model.schema,i=e.conversion,l=this.editor.plugins.get(I),r=this.editor.plugins.get(_),o=e.config.get("mediaEmbed.elementName");r.registerBlockElement({model:"media",view:o}),l.on("register:figure",()=>{var e;i.for("upcast").add((e=l,t=>{t.on("element:figure",(t,i,l)=>{let r=i.viewItem;if(!i.modelRange||!r.hasClass("media"))return;let o=e.processViewAttributes(r,l);o&&l.writer.setAttribute("htmlFigureAttributes",o,i.modelRange)},{priority:"low"})}))}),l.on(`register:${o}`,(e,r)=>{var n,s,m;let a;"media"===r.model&&(t.extend("media",{allowAttributes:[v(o),"htmlFigureAttributes"]}),i.for("upcast").add((n=l,s=o,a=(e,t,i)=>{var l,r;let o;l=t.viewItem,r=v(s),(o=n.processViewAttributes(l,i))&&i.writer.setAttribute(r,o,t.modelRange)},e=>{e.on(`element:${s}`,a,{priority:"low"})})),i.for("dataDowncast").add((m=o,e=>{function t(t,i){e.on(`attribute:${i}:media`,(e,i,l)=>{if(!l.consumable.consume(i.item,e.name))return;let{attributeOldValue:r,attributeNewValue:o}=i,n=l.mapper.toViewElement(i.item),s=j(l.writer,n,t);h(l.writer,r,o,s)})}t(m,v(m)),t("figure","htmlFigureAttributes")})),e.stop())})}}class V extends l.k_{static get requires(){return[I]}static get pluginName(){return"ScriptElementSupport"}static get isOfficialPlugin(){return!0}init(){let e=this.editor.plugins.get(I);e.on("register:script",(t,i)=>{let l=this.editor,r=l.model.schema,o=l.conversion;r.register("htmlScript",i.modelSchema),r.extend("htmlScript",{allowAttributes:["htmlScriptAttributes","htmlContent"],isContent:!0}),l.data.registerRawContentMatcher({name:"script"}),o.for("upcast").elementToElement({view:"script",model:y(i)}),o.for("upcast").add(O(i,e)),o.for("downcast").elementToElement({model:"htmlScript",view:(e,{writer:t})=>k("script",e,t)}),o.for("downcast").add($(i)),t.stop()})}}let M=["width","max-width","min-width","height","min-height","max-height"];class q extends l.k_{static get requires(){return[I]}static get pluginName(){return"TableElementSupport"}static get isOfficialPlugin(){return!0}init(){let e=this.editor;if(!e.plugins.has("TableEditing"))return;let t=e.model.schema,i=e.conversion,l=e.plugins.get(I),r=e.plugins.get("TableUtils");l.on("register:figure",()=>{var e;
1i.for("upcast").add((e=l,t=>{t.on("element:figure",(t,i,l)=>{let r=i.viewItem;if(!i.modelRange||!r.hasClass("table"))return;let o=e.processViewAttributes(r,l);o&&l.writer.setAttribute("htmlFigureAttributes",o,i.modelRange)},{priority:"low"})}))}),l.on("register:table",(o,n)=>{var s,m,a;"table"===n.model&&(t.extend("table",{allowAttributes:["htmlTableAttributes","htmlFigureAttributes","htmlTheadAttributes","htmlTbodyAttributes"]}),i.for("upcast").add((s=l,e=>{e.on("element:table",(e,t,i)=>{if(!t.modelRange)return;let l=t.viewItem;for(let e of(i.consumable.consume(l,{classes:"table"}),r(l,"htmlTableAttributes"),l.getChildren()))e.is("element","thead")&&r(e,"htmlTheadAttributes"),e.is("element","tbody")&&r(e,"htmlTbodyAttributes");function r(e,l){let r=s.processViewAttributes(e,i);r&&i.writer.setAttribute(l,r,t.modelRange)}},{priority:"low"})})),i.for("downcast").add(e=>{function t(t,i){e.on(`attribute:${i}:table`,(e,l,r)=>{if(!r.consumable.test(l.item,e.name))return;let o=r.mapper.toViewElement(l.item),n=j(r.writer,o,t);if(n)if(r.consumable.consume(l.item,e.name),"htmlTableAttributes"===i&&o!==n){let e=z(l.attributeOldValue),t=z(l.attributeNewValue);h(r.writer,e.tableAttributes,t.tableAttributes,n),h(r.writer,e.figureAttributes,t.figureAttributes,o)}else h(r.writer,l.attributeOldValue,l.attributeNewValue,n)})}t("table","htmlTableAttributes"),t("figure","htmlFigureAttributes"),t("thead","htmlTheadAttributes"),t("tbody","htmlTbodyAttributes")}),e.model.document.registerPostFixer((m=e.model,a=r,e=>{let t=m.document.differ.getChanges(),i=!1;for(let l of t){if("attribute"!=l.type||"headingRows"!=l.attributeKey)continue;let t=l.range.start.nodeAfter,r=t.getAttribute("htmlTheadAttributes"),o=t.getAttribute("htmlTbodyAttributes");r&&!l.attributeNewValue?(e.removeAttribute("htmlTheadAttributes",t),i=!0):o&&l.attributeNewValue==a.getRows(t)&&(e.removeAttribute("htmlTbodyAttributes",t),i=!0)}return i})),o.stop())})}}function z(e){let t={},i={...e};if(!e||!("styles"in e))return{figureAttributes:t,tableAttributes:i};for(let[l,r]of(i.styles={},Object.entries(e.styles)))M.includes(l)?t.styles={...t.styles,[l]:r}:i.styles={...i.styles,[l]:r};return{figureAttributes:t,tableAttributes:i}}class W extends l.k_{static get requires(){return[I]}static get pluginName(){return"StyleElementSupport"}static get isOfficialPlugin(){return!0}init(){let e=this.editor.plugins.get(I);e.on("register:style",(t,i)=>{let l=this.editor,r=l.model.schema,o=l.conversion;r.register("htmlStyle",i.modelSchema),r.extend("htmlStyle",{allowAttributes:["htmlStyleAttributes","htmlContent"],isContent:!0}),l.data.registerRawContentMatcher({name:"style"}),o.for("upcast").elementToElement({view:"style",model:y(i)}),o.for("upcast").add(O(i,e)),o.for("downcast").elementToElement({model:"htmlStyle",view:(e,{writer:t})=>k("style",e,t)}),o.for("downcast").add($(i)),t.stop()})}}class G extends l.k_{static get requires(){return[I]}static get pluginName(){return"ListElementSupport"}static get isOfficialPlugin(){return!0}init(){let e=this.editor;if(!e.plugins.has("ListEditing"))return;let t=e.model.schema,i=e.conversion,l=e.plugins.get(I),r=e.plugins.get("ListEditing"),o=e.plugins.get("ListUtils"),n=["ul","ol","li"];r.registerDowncastStrategy({scope:"item",attributeName:"htmlLiAttributes",setAttributeOnDowncast:g}),r.registerDowncastStrategy({scope:"list",attributeName:"htmlUlAttributes",setAttributeOnDowncast:g}),r.registerDowncastStrategy({scope:"list",attributeName:"htmlOlAttributes",setAttributeOnDowncast:g}),l.on("register",(e,r)=>{if(!n.includes(r.view)||(e.stop(),t.checkAttribute("$block","htmlLiAttributes")))return;let o=n.map(e=>v(e));t.extend("$listItem",{allowAttributes:o}),i.for("upcast").add(e=>{e.on("element:ul",U("htmlUlAttributes",l),{priority:"low"}),e.on("element:ol",U("htmlOlAttributes",l),{priority:"low"}),e.on("element:li",U("htmlLiAttributes",l),{priority:"low"})})}),r.on("postFixer",(e,{listNodes:t,writer:i})=>{for(let{node:l,previousNodeInList:r}of t)if(r){if(r.getAttribute("listType")==l.getAttribute("listType")){let t=Q(r.getAttribute("listType")),o=r.getAttribute(t);!(0,u.n)(l.getAttribute(t),o)&&i.model.schema.checkAttribute(l,t)&&(i.setAttribute(t,o,l),e.return=!0)}if(r.getAttribute("listItemId")==l.getAttribute("listItemId")){let t=r.getAttribute("htmlLiAttributes");!(0,u.n)(l.getAttribute("htmlLiAttributes"),t)&&i.model.schema.checkAttribute(l,"htmlLiAttributes")&&(i.setAttribute("htmlLiAttributes",t,l),e.return=!0)}}}),r.on("postFixer",(e,{listNodes:t,writer:i})=>{for(let{node:l}of t){let t=l.getAttribute("listType");!o.isNumberedListType(t)&&l.getAttribute("htmlOlAttributes")&&(i.removeAttribute("htmlOlAttributes",l),e.return=!0),o.isNumberedListType(t)&&l.getAttribute("htmlUlAttributes")&&(i.removeAttribute("htmlUlAttributes",l),e.return=!0)}})}afterInit(){let e=this.editor;if(!e.commands.get("indentList"))return;let t=e.commands.get("indentList");this.listenTo(t,"afterExecute",(t,i)=>{e.model.change(t=>{for(let l of i){let i=Q(l.getAttribute("listType"));e.model.schema.checkAttribute(l,i)&&t.setAttribute(i,{},l)}})})}}function U(e,t){return(i,l,r)=>{let o=l.viewItem;l.modelRange||Object.assign(l,r.convertChildren(l.viewItem,l.modelCursor));let n=t.processViewAttributes(o,r);for(let t of l.modelRange.getItems({shallow:!0}))t.hasAttribute("listItemId")&&!(t.hasAttribute("htmlUlAttributes")||t.hasAttribute("htmlOlAttributes"))&&r.writer.model.schema.checkAttribute(t,e)&&r.writer.setAttribute(e,n||{},t)}}function Q(e){return"numbered"===e||"customNumbered"==e?"htmlOlAttributes":"htmlUlAttributes"}class K extends l.k_{static get requires(){return[I]}static get pluginName(){return"HorizontalLineElementSupport"}static get isOfficialPlugin(){return!0}init(){let e=this.editor;if(!e.plugins.has("HorizontalLineEditing"))return;let t=e.model.schema,i=e.conversion,l=e.plugins.get(I);l.on("register:hr",(e,r)=>{"horizontalLine"===r.model&&(t.extend("horizontalLine",{allowAttributes:["htmlHrAttributes"]}),i.for("upcast").add(O(r,l)),i.for("downcast").add(e=>{e.on("attribute:htmlHrAttributes:horizontalLine",(e,t,i)=>{if(!i.consumable.test(t.item,e.name))return;let{attributeOldValue:l,attributeNewValue:r}=t,o=i.mapper.toViewElement(t.item),n=j(i.writer,o,"hr");n&&(h(i.writer,l,r,n),i.consumable.consume(t.item,e.name))},{priority:"low"})}),e.stop())})}}class X extends l.k_{static get requires(){return[I]}static get pluginName(){return"IframeElementSupport"}static get isOfficialPlugin(){return!0}init(){this.editor.config.define("htmlSupport.htmlIframeSandbox",!0),this._setupSandboxConversion()}_setupSandboxConversion(){let{plugins:e,config:t,conversion:i}=this.editor,l=e.get(I),r=t.get("htmlSupport.htmlIframeSandbox");if(!1===r)return;let o=Array.isArray(r)?Array.from(r):[];l.on("register:iframe",(e,t)=>
1{i.for("editingDowncast").add(e=>{e.on(`insert:${t.model}`,(e,t,i)=>{let{mapper:l,writer:r}=i,n=l.toViewElement(t.item);for(let{item:e}of r.createRangeOn(n))if(e.is("element","iframe"))if(e.hasAttribute("sandbox")){let t=new Set;for(let i of e.getAttribute("sandbox").trim().split(/\s+/))o.includes(i)&&t.add(i);r.setAttribute("sandbox",Array.from(t).join(" "),e)}else r.setAttribute("sandbox",o.join(" "),e)},{priority:"lowest"})})})}}class Z extends l.k_{static get requires(){return[I,_]}static get pluginName(){return"CustomElementSupport"}static get isOfficialPlugin(){return!0}init(){let e=this.editor.plugins.get(I),t=this.editor.plugins.get(_);e.on("register:$customElement",(i,l)=>{i.stop();let r=this.editor,n=r.model.schema,s=r.conversion,m=r.editing.view.domConverter.unsafeElements,a=r.data.htmlProcessor.domConverter.preElements;n.register(l.model,l.modelSchema),n.extend(l.model,{allowAttributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"],isContent:!0}),r.data.htmlProcessor.domConverter.registerRawContentMatcher({name:"template"}),s.for("upcast").elementToElement({view:/.*/,model:(i,n)=>{let s;if("$comment"==i.name||!function(e){try{document.createElement(e)}catch{return!1}return!0}(i.name)||t.getDefinitionsForView(i.name).size)return null;m.includes(i.name)||m.push(i.name),a.includes(i.name)||a.push(i.name);let d=n.writer.createElement(l.model,{htmlElementName:i.name}),u=e.processViewAttributes(i,n);if(u&&n.writer.setAttribute("htmlCustomElementAttributes",u,d),i.is("element","template")&&i.getCustomProperty("$rawContent"))s=i.getCustomProperty("$rawContent");else{let e=new o.HZz(i.document).createDocumentFragment(i),t=r.data.htmlProcessor.domConverter.viewToDom(e),l=t.firstChild;for(;l.firstChild;)t.appendChild(l.firstChild);l.remove(),s=r.data.htmlProcessor.htmlWriter.getHtml(t)}for(let{item:e}of(n.writer.setAttribute("htmlContent",s,d),r.editing.view.createRangeIn(i)))n.consumable.consume(e,{name:!0});return d},converterPriority:"low"}),s.for("editingDowncast").elementToElement({model:{name:l.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(e,{writer:t})=>{let i=e.getAttribute("htmlElementName"),l=t.createRawElement(i);return e.hasAttribute("htmlCustomElementAttributes")&&g(t,e.getAttribute("htmlCustomElementAttributes"),l),l}}),s.for("dataDowncast").elementToElement({model:{name:l.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(e,{writer:t})=>{let i=e.getAttribute("htmlElementName"),l=e.getAttribute("htmlContent"),r=t.createRawElement(i,null,(e,t)=>{t.setContentOf(e,l)});return e.hasAttribute("htmlCustomElementAttributes")&&g(t,e.getAttribute("htmlCustomElementAttributes"),r),r}})})}}class Y extends l.k_{static get pluginName(){return"GeneralHtmlSupport"}static get isOfficialPlugin(){return!0}static get requires(){return[I,D,R,H,N,L,V,q,W,G,K,X,Z]}init(){let e=this.editor,t=e.plugins.get(I);t.loadAllowedEmptyElementsConfig(e.config.get("htmlSupport.allowEmpty")||[]),t.loadAllowedConfig(e.config.get("htmlSupport.allow")||[]),t.loadDisallowedConfig(e.config.get("htmlSupport.disallow")||[])}afterInit(){let e=this.editor.commands.get("removeFormat");e?.registerCustomAttribute(e=>e.startsWith("html")&&e.endsWith("Attributes"),w)}getGhsAttributeNameForElement(e){let t=Array.from(this.editor.plugins.get("DataSchema").getDefinitionsForView(e,!1)),i=t.find(e=>e.isInline&&!t[0].isObject);return i?i.model:v(e)}addModelHtmlClass(e,t,i){let l=this.editor.model,o=this.getGhsAttributeNameForElement(e);l.change(e=>{for(let n of J(l,i,o))p(e,n,o,"classes",e=>{for(let i of(0,r.$r)(t))e.add(i)})})}removeModelHtmlClass(e,t,i){let l=this.editor.model,o=this.getGhsAttributeNameForElement(e);l.change(e=>{for(let n of J(l,i,o))p(e,n,o,"classes",e=>{for(let i of(0,r.$r)(t))e.delete(i)})})}setModelHtmlAttributes(e,t,i){let l=this.editor.model,r=this.getGhsAttributeNameForElement(e);l.change(e=>{for(let o of J(l,i,r))p(e,o,r,"attributes",e=>{for(let[i,l]of Object.entries(t))e.set(i,l)})})}removeModelHtmlAttributes(e,t,i){let l=this.editor.model,o=this.getGhsAttributeNameForElement(e);l.change(e=>{for(let n of J(l,i,o))p(e,n,o,"attributes",e=>{for(let i of(0,r.$r)(t))e.delete(i)})})}setModelHtmlStyles(e,t,i){let l=this.editor.model,r=this.getGhsAttributeNameForElement(e);l.change(e=>{for(let o of J(l,i,r))p(e,o,r,"styles",e=>{for(let[i,l]of Object.entries(t))e.set(i,l)})})}removeModelHtmlStyles(e,t,i){let l=this.editor.model,o=this.getGhsAttributeNameForElement(e);l.change(e=>{for(let n of J(l,i,o))p(e,n,o,"styles",e=>{for(let i of(0,r.$r)(t))e.delete(i)})})}}function*J(e,t,i){if(t)if(!(Symbol.iterator in t)&&t.is("documentSelection")&&t.isCollapsed)e.schema.checkAttributeInSelection(t,i)&&(yield t);else{var l,r,o;for(let n of(l=e,r=t,o=i,!(Symbol.iterator in r)&&(r.is("node")||r.is("$text")||r.is("$textProxy"))?l.schema.checkAttribute(r,o)?[l.createRangeOn(r)]:[]:l.schema.getValidRanges(l.createSelection(r).getRanges(),o)))yield*n.getItems({shallow:!0})}}class ee extends l.k_{static get pluginName(){return"HtmlComment"}static get isOfficialPlugin(){return!0}init(){let e=this.editor,t=new Map;e.data.processor.skipComments=!1,e.model.schema.addAttributeCheck((e,t)=>{if(e.endsWith("$root")&&t.startsWith("$comment"))return!0}),e.conversion.for("upcast").elementToMarker({view:"$comment",model:e=>{let i=(0,r.Ld)(),l=`$comment:${i}`,o=e.getCustomProperty("$rawContent");return t.set(l,o),l}}),e.conversion.for("dataDowncast").markerToElement({model:"$comment",view:(e,{writer
1:t})=>{let i;for(let t of this.editor.model.document.getRootNames())if((i=this.editor.model.document.getRoot(t)).hasAttribute(e.markerName))break;let l=e.markerName,r=i.getAttribute(l),o=t.createUIElement("$comment");return t.setCustomProperty("$rawContent",r,o),o}}),e.model.document.registerPostFixer(i=>{let l=!1;for(let r of e.model.document.differ.getChangedMarkers().filter(e=>e.name.startsWith("$comment:"))){let{oldRange:e,newRange:o}=r.data;if(!e||!o||e.root!=o.root){if(e){let t=e.root;t.hasAttribute(r.name)&&(i.removeAttribute(r.name,t),l=!0)}if(o){let e=o.root;"$graveyard"==e.rootName?(i.removeMarker(r.name),l=!0):e.hasAttribute(r.name)||(i.setAttribute(r.name,t.get(r.name)||"",e),l=!0)}}}return l}),e.data.on("set",()=>{for(let t of e.model.markers.getMarkersGroup("$comment"))this.removeHtmlComment(t.name)},{priority:"high"}),e.model.on("deleteContent",(t,[i])=>{for(let t of i.getRanges()){let i=e.model.schema.getLimitElement(t),l=e.model.createPositionAt(i,0),r=e.model.createPositionAt(i,"end");for(let i of l.isTouching(t.start)&&r.isTouching(t.end)?this.getHtmlCommentsInRange(e.model.createRange(l,r)):this.getHtmlCommentsInRange(t,{skipBoundaries:!0}))this.removeHtmlComment(i)}},{priority:"high"})}createHtmlComment(e,t){let i=(0,r.Ld)(),l=this.editor.model,o=l.document.getRoot(e.root.rootName),n=`$comment:${i}`;return l.change(i=>{let l=i.createRange(e);return i.addMarker(n,{usingOperation:!0,affectsData:!0,range:l}),i.setAttribute(n,t,o),n})}removeHtmlComment(e){let t=this.editor,i=t.model.markers.get(e);return!!i&&(t.model.change(e=>{e.removeMarker(i)}),!0)}getHtmlCommentData(e){let t=this.editor.model.markers.get(e);if(!t)return null;let i="";for(let t of this.editor.model.document.getRoots())if(t.hasAttribute(e)){i=t.getAttribute(e);break}return{content:i,position:t.getStart()}}getHtmlCommentsInRange(e,{skipBoundaries:t=!1}={}){let i=!t;return Array.from(this.editor.model.markers.getMarkersGroup("$comment")).filter(t=>{var l,r;let o;return l=t,r=e,((o=l.getRange().start).isAfter(r.start)||i&&o.isEqual(r.start))&&(o.isBefore(r.end)||i&&o.isEqual(r.end))}).map(e=>e.name)}}class et extends o.q6B{toView(e){if(!/<(?:html|body|head|meta)(?:\s[^>]*)?>/i.test(e.trim().slice(0,1e4)))return super.toView(e);let t="",i="";e=(e=e.trim().replace(/<\?xml\s[^?]*\?>/i,e=>(i=e,""))).trim().replace(/^<!DOCTYPE\s[^>]*?>/i,e=>(t=e,""));let l=this._toDom(e),r=this.domConverter.domToView(l,{skipComments:this.skipComments}),n=new o.HZz(r.document);n.setCustomProperty("$fullPageDocument",l.ownerDocument.documentElement.outerHTML,r);let s=Array.from(l.ownerDocument.querySelectorAll("head style"));return n.setCustomProperty("$fullPageHeadStyles",s,r),t&&n.setCustomProperty("$fullPageDocType",t,r),i&&n.setCustomProperty("$fullPageXmlDeclaration",i,r),r}toData(e){let t=super.toData(e),i=e.getCustomProperty("$fullPageDocument"),l=e.getCustomProperty("$fullPageDocType"),r=e.getCustomProperty("$fullPageXmlDeclaration");return i&&(t=i.replace(/<\/body\s*>/,t+"$&"),l&&(t=l+"\n"+t),r&&(t=r+"\n"+t)),t}}class ei extends l.k_{static get pluginName(){return"FullPage"}static get licenseFeatureCode(){return"FPH"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}constructor(e){super(e),e.config.define("htmlSupport.fullPage",{allowRenderStylesFromHead:!1,sanitizeCss:e=>((0,r.FF)("css-full-page-provide-sanitize-function"),{css:e,hasChanged:!1})}),e.data.processor=new et(e.data.viewDocument)}init(){let e=this.editor,t=["$fullPageDocument","$fullPageDocType","$fullPageXmlDeclaration","$fullPageHeadStyles"];e.model.schema.extend("$root",{allowAttributes:t}),e.data.on("toModel",(i,[l])=>{let r=e.model.document.getRoot();e.model.change(e=>{for(let i of t){let t=l.getCustomProperty(i);t&&e.setAttribute(i,t,r)}}),el(e)&&this._renderStylesFromHead(r)},{priority:"low"}),e.data.on("toView",(e,[i])=>{if(!i.is("rootElement"))return;let l=e.return;if(!i.hasAttribute("$fullPageDocument"))return;let r=new o.HZz(l.document);for(let e of t){let t=i.getAttribute(e);t&&r.setCustomProperty(e,t,l)}},{priority:"low"}),e.data.on("set",()=>{let i=e.model.document.getRoot();e.model.change(e=>{for(let l of t)i.hasAttribute(l)&&e.removeAttribute(l,i)})},{priority:"high"}),e.data.on("get",(e,t)=>{t[0]||(t[0]={}),t[0].trim=!1},{priority:"high"})}destroy(){super.destroy(),el(this.editor)&&this._removeStyleElementsFromDom()}_removeStyleElementsFromDom(){for(let e of Array.from(r.Sf.document.querySelectorAll(`[data-full-page-style-id="${this.editor.id}"]`)))e.remove()}_renderStyleElementsInDom(e){let t=this.editor,i=e.getAttribute("$fullPageHeadStyles");if(!i)return;let l=t.config.get("htmlSupport.fullPage.sanitizeCss");for(let e of i){e.setAttribute("data-full-page-style-id",t.id);let i=l(e.innerText);i.hasChanged&&(e.innerText=i.css),r.Sf.document.head.append(e)}}_renderStylesFromHead(e){this._removeStyleElementsFromDom(),this._renderStyleElementsInDom(e)}}function el(e){return e.config.get("htmlSupport.fullPage.allowRenderStylesFromHead")}let er="htmlEmptyBlock";class eo extends l.k_{static get pluginName(){return"EmptyBlock"}static get isOfficialPlugin(){return!0}afterInit(){var e;let{model:t,conversion:i,plugins:l,config:r}=this.editor,o=t.schema,n=r.get("htmlSupport.preserveEmptyBlocksInEditingView");o.extend("$block",{allowAttributes:[er]}),o.extend("$container",{allowAttributes:[er]}),o.isRegistered("tableCell")&&o.extend("tableCell",{allowAttributes:[er]}),n?i.for("downcast").add(en()):i.for("dataDowncast").add(en()),i.for("upcast").add((e=o,t=>{t.on("element",(t,i,l)=>{let{viewItem:r,modelRange:o}=i;if(!r.is("element")||!r.isEmpty||r.getCustomProperty("$hasBlockFiller"))return;let n=o&&o.start.nodeAfter;if(!n||!e.checkAttribute(n,er)||(l.writer.setAttribute(er,!0,n),1!=n.childCount))return;let s=n.getChild(0);s.is("element","paragraph")&&e.checkAttribute(s,er)&&l.writer.setAttribute(er,!0,s)},{priority:"lowest"})})),l.has("ClipboardPipeline")&&this._registerClipboardPastingHandler()}_registerClipboardPastingHandler(){let e=this.editor.plugins.get("ClipboardPipeline");this.listenTo(e,"contentInsertion",(e,t)=>{t.sourceEditorId!==this.editor.id&&this.editor.model.change(e=>{for(let{item:i}of e.createRangeIn(t.content))i.is("element")&&i.hasAttribute(er)&&e.removeAttribute(er,i)})})}}function en(){return e=>{e.on(`attribute:${er}`,(e,t,i)=>{let{mapper:l,consumable:r}=i,{item:o}=t;if(!r.consume(o,e.name))return;let n=l.toViewElement(o);n&&t.attributeNewValue&&(n.getFillerOffset=()=>null)})}}}}]);
2//# sourceMappingURL=97f8326a.a5d1cb37d2c3e76f.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.