diff --git a/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js b/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js index d9a0de313a0548f570aaada509e675b8aff6848c..1cdd4cc6b7b1c757e2e6c6b33a8c3c2a422bbef9 100644 --- a/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js +++ b/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js @@ -2,4 +2,4 @@ /*! * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md. - */(()=>{var e={"./node_modules/color-convert/conversions.js":(e,t,o)=>{const i=o("./node_modules/color-name/index.js"),s={};for(const e of Object.keys(i))s[i[e]]=e;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:o}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:o})}n.rgb.hsl=function(e){const t=e[0]/255,o=e[1]/255,i=e[2]/255,s=Math.min(t,o,i),n=Math.max(t,o,i),r=n-s;let a,c;n===s?a=0:t===n?a=(o-i)/r:o===n?a=2+(i-t)/r:i===n&&(a=4+(t-o)/r),a=Math.min(60*a,360),a<0&&(a+=360);const l=(s+n)/2;return c=n===s?0:l<=.5?r/(n+s):r/(2-n-s),[a,100*c,100*l]},n.rgb.hsv=function(e){let t,o,i,s,n;const r=e[0]/255,a=e[1]/255,c=e[2]/255,l=Math.max(r,a,c),d=l-Math.min(r,a,c),h=function(e){return(l-e)/6/d+.5};return 0===d?(s=0,n=0):(n=d/l,t=h(r),o=h(a),i=h(c),r===l?s=i-o:a===l?s=1/3+t-i:c===l&&(s=2/3+o-t),s<0?s+=1:s>1&&(s-=1)),[360*s,100*n,100*l]},n.rgb.hwb=function(e){const t=e[0],o=e[1];let i=e[2];const s=n.rgb.hsl(e)[0],r=1/255*Math.min(t,Math.min(o,i));return i=1-1/255*Math.max(t,Math.max(o,i)),[s,100*r,100*i]},n.rgb.cmyk=function(e){const t=e[0]/255,o=e[1]/255,i=e[2]/255,s=Math.min(1-t,1-o,1-i);return[100*((1-t-s)/(1-s)||0),100*((1-o-s)/(1-s)||0),100*((1-i-s)/(1-s)||0),100*s]},n.rgb.keyword=function(e){const t=s[e];if(t)return t;let o,n=1/0;for(const t of Object.keys(i)){const s=i[t],c=(a=s,((r=e)[0]-a[0])**2+(r[1]-a[1])**2+(r[2]-a[2])**2);c<n&&(n=c,o=t)}var r,a;return o},n.keyword.rgb=function(e){return i[e]},n.rgb.xyz=function(e){let t=e[0]/255,o=e[1]/255,i=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;return[100*(.4124*t+.3576*o+.1805*i),100*(.2126*t+.7152*o+.0722*i),100*(.0193*t+.1192*o+.9505*i)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let o=t[0],i=t[1],s=t[2];o/=95.047,i/=100,s/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;return[116*i-16,500*(o-i),200*(i-s)]},n.hsl.rgb=function(e){const t=e[0]/360,o=e[1]/100,i=e[2]/100;let s,n,r;if(0===o)return r=255*i,[r,r,r];s=i<.5?i*(1+o):i+o-i*o;const a=2*i-s,c=[0,0,0];for(let e=0;e<3;e++)n=t+1/3*-(e-1),n<0&&n++,n>1&&n--,r=6*n<1?a+6*(s-a)*n:2*n<1?s:3*n<2?a+(s-a)*(2/3-n)*6:a,c[e]=255*r;return c},n.hsl.hsv=function(e){const t=e[0];let o=e[1]/100,i=e[2]/100,s=o;const n=Math.max(i,.01);i*=2,o*=i<=1?i:2-i,s*=n<=1?n:2-n;return[t,100*(0===i?2*s/(n+s):2*o/(i+o)),100*((i+o)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,o=e[1]/100;let i=e[2]/100;const s=Math.floor(t)%6,n=t-Math.floor(t),r=255*i*(1-o),a=255*i*(1-o*n),c=255*i*(1-o*(1-n));switch(i*=255,s){case 0:return[i,c,r];case 1:return[a,i,r];case 2:return[r,i,c];case 3:return[r,a,i];case 4:return[c,r,i];case 5:return[i,r,a]}},n.hsv.hsl=function(e){const t=e[0],o=e[1]/100,i=e[2]/100,s=Math.max(i,.01);let n,r;r=(2-o)*i;const a=(2-o)*s;return n=o*s,n/=a<=1?a:2-a,n=n||0,r/=2,[t,100*n,100*r]},n.hwb.rgb=function(e){const t=e[0]/360;let o=e[1]/100,i=e[2]/100;const s=o+i;let n;s>1&&(o/=s,i/=s);const r=Math.floor(6*t),a=1-i;n=6*t-r,0!=(1&r)&&(n=1-n);const c=o+n*(a-o);let l,d,h;switch(r){default:case 6:case 0:l=a,d=c,h=o;break;case 1:l=c,d=a,h=o;break;case 2:l=o,d=a,h=c;break;case 3:l=o,d=c,h=a;break;case 4:l=c,d=o,h=a;break;case 5:l=a,d=o,h=c}return[255*l,255*d,255*h]},n.cmyk.rgb=function(e){const t=e[0]/100,o=e[1]/100,i=e[2]/100,s=e[3]/100;return[255*(1-Math.min(1,t*(1-s)+s)),255*(1-Math.min(1,o*(1-s)+s)),255*(1-Math.min(1,i*(1-s)+s))]},n.xyz.rgb=function(e){const t=e[0]/100,o=e[1]/100,i=e[2]/100;let s,n,r;return s=3.2406*t+-1.5372*o+-.4986*i,n=-.9689*t+1.8758*o+.0415*i,r=.0557*t+-.204*o+1.057*i,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,n=n>.0031308?1.055*n**(1/2.4)-.055:12.92*n,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,s=Math.min(Math.max(0,s),1),n=Math.min(Math.max(0,n),1),r=Math.min(Math.max(0,r),1),[255*s,255*n,255*r]},n.xyz.lab=function(e){let t=e[0],o=e[1],i=e[2];t/=95.047,o/=100,i/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*o-16,500*(t-o),200*(o-i)]},n.lab.xyz=function(e){let t,o,i;o=(e[0]+16)/116,t=e[1]/500+o,i=o-e[2]/200;const s=o**3,n=t**3,r=i**3;return o=s>.008856?s:(o-16/116)/7.787,t=n>.008856?n:(t-16/116)/7.787,i=r>.008856?r:(i-16/116)/7.787,t*=95.047,o*=100,i*=108.883,[t,o,i]},n.lab.lch=function(e){const t=e[0],o=e[1],i=e[2];let s;s=360*Math.atan2(i,o)/2/Math.PI,s<0&&(s+=360);return[t,Math.sqrt(o*o+i*i),s]},n.lch.lab=function(e){const t=e[0],o=e[1],i=e[2]/360*2*Math.PI;return[t,o*Math.cos(i),o*Math.sin(i)]},n.rgb.ansi16=function(e,t=null){const[o,i,s]=e;let r=null===t?n.rgb.hsv(e)[2]:t;if(r=Math.round(r/50),0===r)return 30;let a=30+(Math.round(s/255)<<2|Math.round(i/255)<<1|Math.round(o/255));return 2===r&&(a+=60),a},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],o=e[1],i=e[2];if(t===o&&o===i)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(i/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const o=.5*(1+~~(e>50));return[(1&t)*o*255,(t>>1&1)*o*255,(t>>2&1)*o*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let o=t[0];3===t[0].length&&(o=o.split("").map((e=>e+e)).join(""));const i=parseInt(o,16);return[i>>16&255,i>>8&255,255&i]},n.rgb.hcg=function(e){const t=e[0]/255,o=e[1]/255,i=e[2]/255,s=Math.max(Math.max(t,o),i),n=Math.min(Math.min(t,o),i),r=s-n;let a,c;return a=r<1?n/(1-r):0,c=r<=0?0:s===t?(o-i)/r%6:s===o?2+(i-t)/r:4+(t-o)/r,c/=6,c%=1,[360*c,100*r,100*a]},n.hsl.hcg=function(e){const t=e[1]/100,o=e[2]/100,i=o<.5?2*t*o:2*t*(1-o);let s=0;return i<1&&(s=(o-.5*i)/(1-i)),[e[0],100*i,100*s]},n.hsv.hcg=function(e){const t=e[1]/100,o=e[2]/100,i=t*o;let s=0;return i<1&&(s=(o-i)/(1-i)),[e[0],100*i,100*s]},n.hcg.rgb=function(e){const t=e[0]/360,o=e[1]/100,i=e[2]/100;if(0===o)return[255*i,255*i,255*i];const s=[0,0,0],n=t%1*6,r=n%1,a=1-r;let c=0;switch(Math.floor(n)){case 0:s[0]=1,s[1]=r,s[2]=0;break;case 1:s[0]=a,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=r;break;case 3:s[0]=0,s[1]=a,s[2]=1;break;case 4:s[0]=r,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=a}return c=(1-o)*i,[255*(o*s[0]+c),255*(o*s[1]+c),255*(o*s[2]+c)]},n.hcg.hsv=function(e){const t=e[1]/100,o=t+e[2]/100*(1-t);let i=0;return o>0&&(i=t/o),[e[0],100*i,100*o]},n.hcg.hsl=function(e){const t=e[1]/100,o=e[2]/100*(1-t)+.5*t;let i=0;return o>0&&o<.5?i=t/(2*o):o>=.5&&o<1&&(i=t/(2*(1-o))),[e[0],100*i,100*o]},n.hcg.hwb=function(e){const t=e[1]/100,o=t+e[2]/100*(1-t);return[e[0],100*(o-t),100*(1-o)]},n.hwb.hcg=function(e){const t=e[1]/100,o=1-e[2]/100,i=o-t;let s=0;return i<1&&(s=(o-i)/(1-i)),[e[0],100*i,100*s]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),o=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(o.length)+o},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},"./node_modules/color-convert/index.js":(e,t,o)=>{const i=o("./node_modules/color-convert/conversions.js"),s=o("./node_modules/color-convert/route.js"),n={};Object.keys(i).forEach((e=>{n[e]={},Object.defineProperty(n[e],"channels",{value:i[e].channels}),Object.defineProperty(n[e],"labels",{value:i[e].labels});const t=s(e);Object.keys(t).forEach((o=>{const i=t[o];n[e][o]=function(e){const t=function(...t){const o=t[0];if(null==o)return o;o.length>1&&(t=o);const i=e(t);if("object"==typeof i)for(let e=i.length,t=0;t<e;t++)i[t]=Math.round(i[t]);return i};return"conversion"in e&&(t.conversion=e.conversion),t}(i),n[e][o].raw=function(e){const t=function(...t){const o=t[0];return null==o?o:(o.length>1&&(t=o),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(i)}))})),e.exports=n},"./node_modules/color-convert/route.js":(e,t,o)=>{const i=o("./node_modules/color-convert/conversions.js");function s(e){const t=function(){const e={},t=Object.keys(i);for(let o=t.length,i=0;i<o;i++)e[t[i]]={distance:-1,parent:null};return e}(),o=[e];for(t[e].distance=0;o.length;){const e=o.pop(),s=Object.keys(i[e]);for(let i=s.length,n=0;n<i;n++){const i=s[n],r=t[i];-1===r.distance&&(r.distance=t[e].distance+1,r.parent=e,o.unshift(i))}}return t}function n(e,t){return function(o){return t(e(o))}}function r(e,t){const o=[t[e].parent,e];let s=i[t[e].parent][e],r=t[e].parent;for(;t[r].parent;)o.unshift(t[r].parent),s=n(i[t[r].parent][r],s),r=t[r].parent;return s.conversion=o,s}e.exports=function(e){const t=s(e),o={},i=Object.keys(t);for(let e=i.length,s=0;s<e;s++){const e=i[s];null!==t[e].parent&&(o[e]=r(e,t))}return o}},"./node_modules/color-name/index.js":e=>{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-clipboard/theme/clipboard.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,'.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}.ck.ck-clipboard-drop-target-line{pointer-events:none;position:absolute}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);margin-left:-1px;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{border-color:var(--ck-clipboard-drop-target-color) transparent transparent transparent;border-style:solid;border-width:calc(var(--ck-clipboard-drop-target-dot-height)) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5);content:"";display:block;height:0;left:50%;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);transform:translateX(-50%);width:0}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}.ck.ck-clipboard-drop-target-line{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);height:0;margin-top:-1px}',""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/placeholder.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text);cursor:text}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/renderer.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/button.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;justify-content:left;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{color:var(--ck-color-button-on-color)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/switchbutton.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:calc(1.07692em + 1px);--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2px);--ck-switch-button-inner-hover-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton,.ck.ck-button.ck-switchbutton.ck-on:active,.ck.ck-button.ck-switchbutton.ck-on:focus,.ck.ck-button.ck-switchbutton.ck-on:hover,.ck.ck-button.ck-switchbutton:active,.ck.ck-button.ck-switchbutton:focus,.ck.ck-button.ck-switchbutton:hover{background:transparent;color:inherit}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);border:1px solid transparent;transition:background .4s ease,box-shadow .2s ease-in-out,outline .2s ease-in-out;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:var(--ck-switch-button-inner-hover-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton:focus{border-color:transparent;box-shadow:none;outline:none}.ck.ck-button.ck-switchbutton:focus .ck-button__toggle{box-shadow:0 0 0 1px var(--ck-color-base-background),0 0 0 5px var(--ck-color-focus-outer-shadow);outline:var(--ck-focus-ring);outline-offset:1px}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorgrid/colorgrid.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#166fd4}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorpicker/colorpicker.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-input{min-width:unset}.color-picker-hex-input{width:max-content}.ck.ck-color-picker__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-color-picker__row .ck-color-picker__hash-view{padding-right:var(--ck-spacing-medium);padding-top:var(--ck-spacing-tiny)}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/dropdown.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-modal)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/listdropdown.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/splitbutton.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton>.ck-splitbutton__arrow:not(:focus){border-bottom-width:0;border-top-width:0}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:focus:after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:focus:after{--ck-color-split-button-hover-border:var(--ck-color-focus-border)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}',""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/editorui.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/formheader/formheader.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-form__header .ck-form__header__label{font-weight:700}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/icon/icon.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{cursor:inherit}.ck.ck-icon.ck-icon_inherit-color,.ck.ck-icon.ck-icon_inherit-color *{color:inherit}.ck.ck-icon.ck-icon_inherit-color :not([fill]){fill:currentColor}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/input/input.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/label/label.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-labeled-field-label-default-position-x:var(--ck-spacing-medium);--ck-labeled-field-label-default-position-y:calc(var(--ck-font-size-base)*0.6);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-labeled-field-label-default-position-x),var(--ck-labeled-field-label-default-position-y)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-labeled-field-label-default-position-x)*-1),var(--ck-labeled-field-label-default-position-y)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/list/list.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{background:var(--ck-color-list-background);list-style-type:none}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{border-radius:0;min-height:unset;padding:calc(var(--ck-line-height-base)*.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*.4*var(--ck-font-size-base));text-align:left;width:100%}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-switchbutton):not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;width:100%}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonpanel.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}',""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonrotator.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/fakepanel.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/stickypanel.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-modal)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/toolbar.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;background:var(--ck-color-toolbar-border);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-dropdown__panel{min-width:auto}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-button>.ck-button__label{max-width:7em;width:auto}.ck.ck-toolbar:focus{outline:none}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/tooltip/tooltip.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-balloon-panel.ck-tooltip{--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium);pointer-events:none;z-index:calc(var(--ck-z-modal) + 100)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/globals/globals.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-powered-by-line-height:10px;--ck-powered-by-padding-vertical:2px;--ck-powered-by-padding-horizontal:4px;--ck-powered-by-text-color:#4f4f4f;--ck-powered-by-border-radius:var(--ck-border-radius);--ck-powered-by-background:#fff;--ck-powered-by-border-color:var(--ck-color-focus-border)}.ck.ck-balloon-panel.ck-powered-by-balloon{--ck-border-radius:var(--ck-powered-by-border-radius);background:var(--ck-powered-by-background);border:0;box-shadow:none;min-height:unset}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by{line-height:var(--ck-powered-by-line-height)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by a{align-items:center;cursor:pointer;display:flex;filter:grayscale(80%);line-height:var(--ck-powered-by-line-height);opacity:.66;padding:var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-powered-by__label{color:var(--ck-powered-by-text-color);cursor:pointer;font-size:7.5px;font-weight:700;letter-spacing:-.2px;line-height:normal;margin-right:4px;padding-left:2px;text-transform:uppercase}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-icon{cursor:pointer;display:block}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by:hover a{filter:grayscale(0);opacity:1}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_border]{border:var(--ck-focus-ring);border-color:var(--ck-powered-by-border-color)}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-color-highlight-background:#ff0;--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{word-wrap:break-word;background:transparent;border:0;margin:0;padding:0;text-decoration:none;transition:none;vertical-align:middle}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widget.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{background-color:var(--ck-color-widget-editable-focus-background);border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgetresize.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgettypearound.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}',""]);const n=s},"./node_modules/css-loader/dist/runtime/api.js":e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=e(t);return t[2]?"@media ".concat(t[2]," {").concat(o,"}"):o})).join("")},t.i=function(e,o,i){"string"==typeof e&&(e=[[null,e,""]]);var s={};if(i)for(var n=0;n<this.length;n++){var r=this[n][0];null!=r&&(s[r]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);i&&s[c[0]]||(o&&(c[2]?c[2]="".concat(o," and ").concat(c[2]):c[2]=o),t.push(c))}},t}},"./packages/ckeditor5-core/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{mY:()=>r,_y:()=>d,eO:()=>h,W9:()=>_,ML:()=>g,xK:()=>w,AJ:()=>c,lR:()=>v,Sy:()=>s,P$:()=>b,icons:()=>y,Nu:()=>k});var i=o("./packages/ckeditor5-utils/src/index.ts");class s extends((0,i.Re)()){constructor(e){super(),this._disableStack=new Set,this.editor=e,this.set("isEnabled",!0)}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",n,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",n),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function n(e){e.return=!1,e.stop()}class r extends((0,i.Re)()){constructor(e){super(),this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._isEnabledBasedOnSelection=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",(()=>{this.refresh()})),this.listenTo(e,"change:isReadOnly",(()=>{this.refresh()})),this.on("set:isEnabled",(t=>{this.affectsData&&(e.isReadOnly||this._isEnabledBasedOnSelection&&!e.model.canEditAt(e.model.document.selection))&&(t.return=!1,t.stop())}),{priority:"highest"}),this.on("execute",(e=>{this.isEnabled||e.stop()}),{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",a,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",a),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function a(e){e.return=!1,e.stop()}class c extends r{constructor(){super(...arguments),this._childCommandsDefinitions=[]}refresh(){}execute(...e){const t=this._getFirstEnabledCommand();return!!t&&t.execute(e)}registerChildCommand(e,t={}){(0,i.VG)(this._childCommandsDefinitions,{command:e,priority:t.priority||"normal"}),e.on("change:isEnabled",(()=>this._checkEnabled())),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find((({command:e})=>e.isEnabled));return e&&e.command}}class l extends((0,i.ln)()){constructor(e,t=[],o=[]){super(),this._plugins=new Map,this._context=e,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of o)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new i.Bb("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],o=[]){const s=this,n=this._context;!function e(t,o=new Set){t.forEach((t=>{c(t)&&(o.has(t)||(o.add(t),t.pluginName&&!s._availablePlugins.has(t.pluginName)&&s._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,o)))}))}(e),u(e);const r=[...function e(t,o=new Set){return t.map((e=>c(e)?e:s._availablePlugins.get(e))).reduce(((t,i)=>o.has(i)?t:(o.add(i),i.requires&&(u(i.requires,i),e(i.requires,o).forEach((e=>t.add(e)))),t.add(i))),new Set)}(e.filter((e=>!d(e,t))))];!function(e,t){for(const o of t){if("function"!=typeof o)throw new i.Bb("plugincollection-replace-plugin-invalid-type",null,{pluginItem:o});const t=o.pluginName;if(!t)throw new i.Bb("plugincollection-replace-plugin-missing-name",null,{pluginItem:o});if(o.requires&&o.requires.length)throw new i.Bb("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const n=s._availablePlugins.get(t);if(!n)throw new i.Bb("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const r=e.indexOf(n);if(-1===r){if(s._contextPlugins.has(n))return;throw new i.Bb("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(n.requires&&n.requires.length)throw new i.Bb("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(r,1,o),s._availablePlugins.set(t,o)}}(r,o);const a=r.map((e=>{let t=s._contextPlugins.get(e);return t=t||new e(n),s._add(e,t),t}));return p(a,"init").then((()=>p(a,"afterInit"))).then((()=>a));function c(e){return"function"==typeof e}function l(e){return c(e)&&!!e.isContextPlugin}function d(e,t){return t.some((t=>t===e||(h(e)===t||h(t)===e)))}function h(e){return c(e)?e.pluginName||e.name:e}function u(e,o=null){e.map((e=>c(e)?e:s._availablePlugins.get(e)||e)).forEach((e=>{!function(e,t){if(c(e))return;if(t)throw new i.Bb("plugincollection-soft-required",n,{missingPlugin:e,requiredBy:h(t)});throw new i.Bb("plugincollection-plugin-not-found",n,{plugin:e})}(e,o),function(e,t){if(!l(t))return;if(l(e))return;throw new i.Bb("plugincollection-context-required",n,{plugin:h(e),requiredBy:h(t)})}(e,o),function(e,o){if(!o)return;if(!d(e,t))return;throw new i.Bb("plugincollection-required",n,{plugin:h(e),requiredBy:h(o)})}(e,o)}))}function p(e,t){return e.reduce(((e,o)=>o[t]?s._contextPlugins.has(o)?e:e.then(o[t].bind(o)):e),Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const o=e.pluginName;if(o){if(this._plugins.has(o))throw new i.Bb("plugincollection-plugin-name-conflict",null,{pluginName:o,plugin1:this._plugins.get(o).constructor,plugin2:e});this._plugins.set(o,t)}}}class d{constructor(e){this._contextOwner=null,this.config=new i.De(e,this.constructor.defaultConfig);const t=this.constructor.builtinPlugins;this.config.define("plugins",t),this.plugins=new l(this,t);const o=this.config.get("language")||{};this.locale=new i.go({uiLanguage:"string"==typeof o?o:o.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new i.FE}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const o of e.concat(t)){if("function"!=typeof o)throw new i.Bb("context-initplugins-constructor-only",null,{Plugin:o});if(!0!==o.isContextPlugin)throw new i.Bb("context-initplugins-invalid-plugin",null,{Plugin:o})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,(e=>e.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(e,t){if(this._contextOwner)throw new i.Bb("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise((t=>{const o=new this(e);t(o.initPlugins().then((()=>o)))}))}}class h extends((0,i.Re)()){constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}class u extends i.VD{constructor(e){super(),this.editor=e}set(e,t,o={}){if("string"==typeof t){const e=t;t=(t,o)=>{this.editor.execute(e),o()}}super.set(e,t,o)}}var p=o("./packages/ckeditor5-engine/src/index.ts");class f{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const o=this.get(e);if(!o)throw new i.Bb("commandcollection-command-not-found",this,{commandName:e});return o.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class g extends((0,i.Re)()){constructor(e={}){super();const t=this.constructor,o=e.language||t.defaultConfig&&t.defaultConfig.language;this._context=e.context||new d({language:o}),this._context._addEditor(this,!e.context);const s=Array.from(t.builtinPlugins||[]);this.config=new i.De(e,t.defaultConfig),this.config.define("plugins",s),this.config.define(this._context._getEditorConfig()),this.plugins=new l(this,s,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new f,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new p.Hn,this.on("change:isReadOnly",(()=>{this.model.document.isReadOnly=this.isReadOnly}));const n=new p.A_;this.data=new p.Yc(this.model,n),this.editing=new p.jH(this.model,n),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new p.uz([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new u(this),this.keystrokes.listenTo(this.editing.view.document)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new i.Bb("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new i.Bb("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new i.Bb("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}initPlugins(){const e=this.config,t=e.get("plugins"),o=e.get("removePlugins")||[],i=e.get("extraPlugins")||[],s=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(i),o,s)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise((e=>this.once("ready",e)))),e.then((()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()})).then((()=>this.plugins.destroy())).then((()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})).then((()=>this._context._removeEditor(this)))}execute(e,...t){try{return this.commands.execute(e,...t)}catch(e){i.Bb.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}}var m=o("./node_modules/lodash-es/isFunction.js");function b(e){if(!(0,m.Z)(e.updateSourceElement))throw new i.Bb("attachtoform-missing-elementapi-interface",e);const t=e.sourceElement;if(function(e){return!!e&&"textarea"===e.tagName.toLowerCase()}(t)&&t.form){let o;const i=t.form,s=()=>e.updateSourceElement();(0,m.Z)(i.submit)&&(o=i.submit,i.submit=()=>{s(),o.apply(i)}),i.addEventListener("submit",s),e.on("destroy",(()=>{i.removeEventListener("submit",s),o&&(i.submit=o)}))}}function _(e){return class extends e{setData(e){this.data.set(e)}getData(e){return this.data.get(e)}}}{const e=_(Object);_.setData=e.prototype.setData,_.getData=e.prototype.getData}function w(e){return class extends e{updateSourceElement(e=this.data.get()){if(!this.sourceElement)throw new i.Bb("editor-missing-sourceelement",this);const t=this.config.get("updateSourceElementOnDestroy"),o=this.sourceElement instanceof HTMLTextAreaElement;t||o?(0,i.jS)(this.sourceElement,e):(0,i.jS)(this.sourceElement,"")}}}function k(e,t){if(t.ckeditorInstance)throw new i.Bb("editor-source-element-already-used",e);t.ckeditorInstance=e,e.once("destroy",(()=>{delete t.ckeditorInstance}))}w.updateSourceElement=w(Object).prototype.updateSourceElement;class v extends h{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new i.FE({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new i.Bb("pendingactions-add-invalid-message",this);const t=new((0,i.Re)());return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const y={bold:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z"/></svg>',cancel:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z"/></svg>',caption:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2z"/><path d="M17 1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14zm0 1.5H3a.5.5 0 0 0-.492.41L2.5 3v9a.5.5 0 0 0 .41.492L3 12.5h14a.5.5 0 0 0 .492-.41L17.5 12V3a.5.5 0 0 0-.41-.492L17 2.5z" fill-opacity=".6"/></svg>',check:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z"/></svg>',cog:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.333 2 .19 2.263a5.899 5.899 0 0 1 1.458.604L14.714 3.4 16.6 5.286l-1.467 1.733c.263.452.468.942.605 1.46L18 8.666v2.666l-2.263.19a5.899 5.899 0 0 1-.604 1.458l1.467 1.733-1.886 1.886-1.733-1.467a5.899 5.899 0 0 1-1.46.605L11.334 18H8.667l-.19-2.263a5.899 5.899 0 0 1-1.458-.604L5.286 16.6 3.4 14.714l1.467-1.733a5.899 5.899 0 0 1-.604-1.458L2 11.333V8.667l2.262-.189a5.899 5.899 0 0 1 .605-1.459L3.4 5.286 5.286 3.4l1.733 1.467a5.899 5.899 0 0 1 1.46-.605L8.666 2h2.666zM10 6.267a3.733 3.733 0 1 0 0 7.466 3.733 3.733 0 0 0 0-7.466z"/></svg>',eraser:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053-2.147-.066z"/><path d="M4 18h5.523v-1H4zm-2 0h1v-1H2z"/></svg>',image:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.91 10.54c.26-.23.64-.21.88.03l3.36 3.14 2.23-2.06a.64.64 0 0 1 .87 0l2.52 2.97V4.5H3.2v10.12l3.71-4.08zm10.27-7.51c.6 0 1.09.47 1.09 1.05v11.84c0 .59-.49 1.06-1.09 1.06H2.79c-.6 0-1.09-.47-1.09-1.06V4.08c0-.58.49-1.05 1.1-1.05h14.38zm-5.22 5.56a1.96 1.96 0 1 1 3.4-1.96 1.96 1.96 0 0 1-3.4 1.96z"/></svg>',lowVision:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.085 6.22 2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.094 11.094 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.488.488 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304c-.258.11-.51.233-.757.365l6.239 6.24-.006.005.78.78c-.388.094-.78.166-1.174.215l-1.11-1.11h.011L4.55 8.197a7.2 7.2 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10.164 10.164 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a2.563 2.563 0 0 0-.124.2c-.043.077-.08.158-.108.241a.534.534 0 0 0-.028.133.29.29 0 0 0 .008.072.927.927 0 0 0 .082.226c.067.133.145.26.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93zm7.07.531a4.632 4.632 0 0 1 1.108 5.992l.345.344.046-.018a9.313 9.313 0 0 0 2-1.112c.256-.187.5-.392.727-.613.137-.134.27-.277.392-.431.072-.091.141-.185.203-.286.057-.093.107-.19.148-.292a.72.72 0 0 0 .036-.12.29.29 0 0 0 .008-.072.492.492 0 0 0-.028-.133.999.999 0 0 0-.036-.096 2.165 2.165 0 0 0-.071-.145 2.917 2.917 0 0 0-.125-.2 3.592 3.592 0 0 0-.263-.335 5.444 5.444 0 0 0-.53-.523 7.955 7.955 0 0 0-1.054-.768 9.766 9.766 0 0 0-1.879-.891c-.337-.118-.68-.219-1.027-.301zm-2.85.21-.069.002a.508.508 0 0 0-.254.097.496.496 0 0 0-.104.679.498.498 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.494.494 0 0 0 .45.287h.008a.496.496 0 0 0 .35-.158.482.482 0 0 0 .13-.335.638.638 0 0 0-.048-.219 3.379 3.379 0 0 0-.36-.723 3.438 3.438 0 0 0-2.791-1.543l-.028-.001h-.013z"/></svg>',importExport:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path clip-rule="evenodd" d="M19 4.5 14 0H3v12.673l.868-1.041c.185-.222.4-.402.632-.54V1.5h8v5h5v7.626a2.24 2.24 0 0 1 1.5.822V4.5ZM14 5V2l3.3 3H14Zm-3.692 12.5c.062.105.133.206.213.303L11.52 19H8v-.876a2.243 2.243 0 0 0 1.82-.624h.488Zm7.518-.657a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0l2.346-2.815Zm-15.056-.38a.75.75 0 0 1-.096-1.056l2.346-2.815a.95.95 0 0 1 1.46 0l2.346 2.815a.75.75 0 1 1-1.152.96L6.5 14.96V20H5v-5.04l-1.174 1.408a.75.75 0 0 1-1.056.096Z"/></g><defs><clipPath id="a"><path d="M0 0h20v20H0z"/></clipPath></defs></svg>',paragraph:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.5 5.5H7v5h3.5a2.5 2.5 0 1 0 0-5zM5 3h6.5v.025a5 5 0 0 1 0 9.95V13H7v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/></svg>',plus:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 2a1 1 0 0 0-1 1v6H3a1 1 0 1 0 0 2h6v6a1 1 0 1 0 2 0v-6h6a1 1 0 1 0 0-2h-6V3a1 1 0 0 0-1-1Z"/></svg>',text:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555Zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13Z"/><path clip-rule="evenodd" d="m12.09 17-.534-1.292.848-1.971.545 1.319L12.113 17h-.023Zm1.142-5.187.545 1.319L15.5 9.13l1.858 4.316h-3.45l.398.965h3.467L18.887 17H20l-3.873-9h-1.254l-1.641 3.813Z"/></g><defs><clipPath id="a"><path d="M0 0h20v20H0z"/></clipPath></defs></svg>',alignBottom:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.239 13.938-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.752.752 0 0 1-.511.187.752.752 0 0 1-.511-.187zM4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5H4.25z"/></svg>',alignMiddle:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.75 11.875a.752.752 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.752.752 0 0 1-.508.184.752.752 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75z"/></svg>',alignTop:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m10.261 7.062 2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .511-.187.752.752 0 0 1 .511.187zM15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5h10.5z"/></svg>',alignLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',alignCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75z"/></svg>',alignRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75zm0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75z"/></svg>',alignJustify:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',objectLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M15.003 7v5.5a1 1 0 0 1-1 1H5.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H6.5V12h6.997V7.5z"/></svg>',objectRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectFullWidth:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18 7v5.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1zm-1.505.5H3.504V12h12.991V7.5z"/></svg>',objectInline:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectSizeFull:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M18.095 2H1.905C.853 2 0 2.895 0 4v12c0 1.105.853 2 1.905 2h16.19C19.147 18 20 17.105 20 16V4c0-1.105-.853-2-1.905-2zm0 1.5c.263 0 .476.224.476.5v12c0 .276-.213.5-.476.5H1.905a.489.489 0 0 1-.476-.5V4c0-.276.213-.5.476-.5h16.19z"/></svg>',objectSizeLarge:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M13 6H2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5h11z"/></svg>',objectSizeSmall:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M7 10H2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5h5z"/></svg>',objectSizeMedium:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M10 8H2a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-6a.5.5 0 0 1 .5-.5h8z"/></svg>',pencil:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.3 17.37-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5 9.375 17H19v1.5H8z"/></svg>',pilcrow:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.999 2H15a1 1 0 0 1 0 2h-1.004v13a1 1 0 1 1-2 0V4H8.999v13a1 1 0 1 1-2 0v-7A4 4 0 0 1 3 6a4 4 0 0 1 3.999-4z"/></svg>',quote:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574z"/></svg>',threeVerticalDots:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="9.5" cy="4.5" r="1.5"/><circle cx="9.5" cy="10.5" r="1.5"/><circle cx="9.5" cy="16.5" r="1.5"/></svg>'}},"./packages/ckeditor5-engine/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{kW:()=>Ue,Yy:()=>Ys,r7:()=>ze,KU:()=>xr,uz:()=>Bs,Yc:()=>js,tn:()=>Eo,f4:()=>Qn,uj:()=>_i,pG:()=>It,dK:()=>Wt,qZ:()=>$t,qD:()=>st,jH:()=>is,W_:()=>Vo,Ay:()=>Sn,X5:()=>Rs,IZ:()=>Hs,jP:()=>mn,iE:()=>fi,zj:()=>Gs,xO:()=>P,lB:()=>Ks,Hn:()=>vr,dM:()=>Pr,$z:()=>qs,Pk:()=>Xs,Qj:()=>Lt,Bz:()=>sn,Ly:()=>zo,e6:()=>qo,sN:()=>Qs,Th:()=>Tt,_o:()=>en,tF:()=>tn,qh:()=>Us,A_:()=>xe,aY:()=>So,xv:()=>Bo,R:()=>Do,Po:()=>Io,yj:()=>Er,G7:()=>Oo,m1:()=>Ue,By:()=>Ce,Ux:()=>He,y_:()=>it,W2:()=>Oe,y9:()=>Te,pc:()=>Je,wx:()=>tt,FY:()=>Me,Xj:()=>v,dq:()=>Xe,QR:()=>Xr,sI:()=>Qr,vt:()=>la,J8:()=>da,DA:()=>l,ID:()=>c,KT:()=>fr,I8:()=>Gr,mq:()=>Kr,oz:()=>Ur,YG:()=>Se,m0:()=>Jr,uT:()=>Yr,$_:()=>h,SB:()=>$r,D5:()=>Mr,G9:()=>Vr,IT:()=>Br,zz:()=>Nr,WK:()=>Zr,Zb:()=>Fr,PX:()=>Hr,Q7:()=>u,NJ:()=>d,Rf:()=>ln});var i=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),s=o.n(i),n=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/placeholder.css"),r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};s()(n.Z,r);n.Z.locals;const a=new WeakMap;function c({view:e,element:t,text:o,isDirectHost:i=!0,keepOnFocus:s=!1}){const n=e.document;a.has(n)||(a.set(n,new Map),n.registerPostFixer((e=>p(n,e))),n.on("change:isComposing",(()=>{e.change((e=>p(n,e)))}),{priority:"high"})),a.get(n).set(t,{text:o,isDirectHost:i,keepOnFocus:s,hostElement:i?t:null}),e.change((e=>p(n,e)))}function l(e,t){const o=t.document;a.has(o)&&e.change((e=>{const i=a.get(o),s=i.get(t);e.removeAttribute("data-placeholder",s.hostElement),h(e,s.hostElement),i.delete(t)}))}function d(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}function h(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function u(e,t){if(!e.isAttached())return!1;if(Array.from(e.getChildren()).some((e=>!e.is("uiElement"))))return!1;const o=e.document,i=o.selection.anchor;return(!o.isComposing||!i||i.parent!==e)&&(!!t||(!o.isFocused||!!i&&i.parent!==e))}function p(e,t){const o=a.get(e),i=[];let s=!1;for(const[e,n]of o)n.isDirectHost&&(i.push(e),f(t,e,n)&&(s=!0));for(const[e,n]of o){if(n.isDirectHost)continue;const o=g(e);o&&(i.includes(o)||(n.hostElement=o,f(t,e,n)&&(s=!0)))}return s}function f(e,t,o){const{text:i,isDirectHost:s,hostElement:n}=o;let r=!1;n.getAttribute("data-placeholder")!==i&&(e.setAttribute("data-placeholder",i,n),r=!0);return(s||1==t.childCount)&&u(n,o.keepOnFocus)?d(e,n)&&(r=!0):h(e,n)&&(r=!0),r}function g(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}var m=o("./packages/ckeditor5-utils/src/index.ts");class b{is(){throw new Error("is() method is abstract")}}var _=o("./node_modules/lodash-es/_baseClone.js");const w=function(e){return(0,_.Z)(e,4)};o("./packages/ckeditor5-utils/src/version.ts");class k extends((0,m.ln)(b)){constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new m.Bb("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}getCommonAncestor(e,t={}){const o=this.getAncestors(t),i=e.getAncestors(t);let s=0;for(;o[s]==i[s]&&o[s];)s++;return 0===s?null:o[s-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),o=e.getPath(),i=(0,m.Rt)(t,o);switch(i){case"prefix":return!0;case"extension":return!1;default:return t[i]<o[i]}}isAfter(e){return this!=e&&(this.root===e.root&&!this.isBefore(e))}_remove(){this.parent._removeChildren(this.index)}_fireChange(e,t){this.fire(`change:${e}`,t),this.parent&&this.parent._fireChange(e,t)}toJSON(){const e=w(this);return delete e.parent,e}}k.prototype.is=function(e){return"node"===e||"view:node"===e};class v extends k{constructor(e,t){super(e),this._textData=t}get data(){return this._textData}get _data(){return this.data}set _data(e){this._fireChange("text",this),this._textData=e}isSimilar(e){return e instanceof v&&(this===e||this.data===e.data)}_clone(){return new v(this.document,this.data)}}v.prototype.is=function(e){return"$text"===e||"view:$text"===e||"text"===e||"view:text"===e||"node"===e||"view:node"===e};class y extends b{constructor(e,t,o){if(super(),this.textNode=e,t<0||t>e.data.length)throw new m.Bb("view-textproxy-wrong-offsetintext",this);if(o<0||t+o>e.data.length)throw new m.Bb("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+o),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const t=[];let o=e.includeSelf?this.textNode:this.parent;for(;null!==o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}}y.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e};var x=o("./node_modules/lodash-es/isPlainObject.js");class P{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const o=E(t,e);if(o)return{element:t,pattern:e,match:o}}return null}matchAll(...e){const t=[];for(const o of e)for(const e of this._patterns){const i=E(o,e);i&&t.push({element:o,pattern:e,match:i})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function E(e,t){if("function"==typeof t)return t(e);const o={};return t.name&&(o.name=function(e,t){if(e instanceof RegExp)return!!t.match(e);return e===t}(t.name,e.name),!o.name)||t.attributes&&(o.attributes=function(e,t){const o=new Set(t.getAttributeKeys());(0,x.Z)(e)?(void 0!==e.style&&(0,m.KE)("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&(0,m.KE)("matcher-pattern-deprecated-attributes-class-key",e)):(o.delete("style"),o.delete("class"));return T(e,o,(e=>t.getAttribute(e)))}(t.attributes,e),!o.attributes)||t.classes&&(o.classes=function(e,t){return T(e,t.getClassNames(),(()=>{}))}(t.classes,e),!o.classes)||t.styles&&(o.styles=function(e,t){return T(e,t.getStyleNames(!0),(e=>t.getStyle(e)))}(t.styles,e),!o.styles)?null:o}function T(e,t,o){const i=function(e){if(Array.isArray(e))return e.map((e=>(0,x.Z)(e)?(void 0!==e.key&&void 0!==e.value||(0,m.KE)("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0]));if((0,x.Z)(e))return Object.entries(e);return[[e,!0]]}(e),s=Array.from(t),n=[];if(i.forEach((([e,t])=>{s.forEach((i=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,i)&&function(e,t,o){if(!0===e)return!0;const i=o(t);return e===i||e instanceof RegExp&&!!String(i).match(e)}(t,i,o)&&n.push(i)}))})),i.length&&!(n.length<i.length))return n}var A=o("./node_modules/lodash-es/isObject.js"),C=o("./node_modules/lodash-es/isArray.js"),S=o("./node_modules/lodash-es/isSymbol.js"),O=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,R=/^\w*$/;const M=function(e,t){if((0,C.Z)(e))return!1;var o=typeof e;return!("number"!=o&&"symbol"!=o&&"boolean"!=o&&null!=e&&!(0,S.Z)(e))||(R.test(e)||!O.test(e)||null!=t&&e in Object(t))};var j=o("./node_modules/lodash-es/_MapCache.js");function B(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var o=function(){var i=arguments,s=t?t.apply(this,i):i[0],n=o.cache;if(n.has(s))return n.get(s);var r=e.apply(this,i);return o.cache=n.set(s,r)||n,r};return o.cache=new(B.Cache||j.Z),o}B.Cache=j.Z;const D=B;var V=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,I=/\\(\\)?/g;const N=function(e){var t=D(e,(function(e){return 500===o.size&&o.clear(),e})),o=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(V,(function(e,o,i,s){t.push(i?s.replace(I,"$1"):o||e)})),t}));var z=o("./node_modules/lodash-es/toString.js");const F=function(e,t){return(0,C.Z)(e)?e:M(e,t)?[e]:N((0,z.Z)(e))};const L=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};const Z=function(e){if("string"==typeof e||(0,S.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};const W=function(e,t){for(var o=0,i=(t=F(t,e)).length;null!=e&&o<i;)e=e[Z(t[o++])];return o&&o==i?e:void 0};const $=function(e,t,o){var i=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(o=o>s?s:o)<0&&(o+=s),s=t>o?0:o-t>>>0,t>>>=0;for(var n=Array(s);++i<s;)n[i]=e[i+t];return n};const q=function(e,t){return t.length<2?e:W(e,$(t,0,-1))};const H=function(e,t){return t=F(t,e),null==(e=q(e,t))||delete e[Z(L(t))]};const U=function(e,t){return null==e||H(e,t)};const K=function(e,t,o){var i=null==e?void 0:W(e,t);return void 0===i?o:i};var G=o("./node_modules/lodash-es/_Stack.js"),J=o("./node_modules/lodash-es/_baseAssignValue.js"),Y=o("./node_modules/lodash-es/eq.js");const X=function(e,t,o){(void 0!==o&&!(0,Y.Z)(e[t],o)||void 0===o&&!(t in e))&&(0,J.Z)(e,t,o)};const Q=function(e){return function(t,o,i){for(var s=-1,n=Object(t),r=i(t),a=r.length;a--;){var c=r[e?a:++s];if(!1===o(n[c],c,n))break}return t}}();var ee=o("./node_modules/lodash-es/_cloneBuffer.js"),te=o("./node_modules/lodash-es/_cloneTypedArray.js"),oe=o("./node_modules/lodash-es/_copyArray.js"),ie=o("./node_modules/lodash-es/_initCloneObject.js"),se=o("./node_modules/lodash-es/isArguments.js"),ne=o("./node_modules/lodash-es/isArrayLike.js"),re=o("./node_modules/lodash-es/isObjectLike.js");const ae=function(e){return(0,re.Z)(e)&&(0,ne.Z)(e)};var ce=o("./node_modules/lodash-es/isBuffer.js"),le=o("./node_modules/lodash-es/isFunction.js"),de=o("./node_modules/lodash-es/isTypedArray.js");const he=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var ue=o("./node_modules/lodash-es/_copyObject.js"),pe=o("./node_modules/lodash-es/keysIn.js");const fe=function(e){return(0,ue.Z)(e,(0,pe.Z)(e))};const ge=function(e,t,o,i,s,n,r){var a=he(e,o),c=he(t,o),l=r.get(c);if(l)X(e,o,l);else{var d=n?n(a,c,o+"",e,t,r):void 0,h=void 0===d;if(h){var u=(0,C.Z)(c),p=!u&&(0,ce.Z)(c),f=!u&&!p&&(0,de.Z)(c);d=c,u||p||f?(0,C.Z)(a)?d=a:ae(a)?d=(0,oe.Z)(a):p?(h=!1,d=(0,ee.Z)(c,!0)):f?(h=!1,d=(0,te.Z)(c,!0)):d=[]:(0,x.Z)(c)||(0,se.Z)(c)?(d=a,(0,se.Z)(a)?d=fe(a):(0,A.Z)(a)&&!(0,le.Z)(a)||(d=(0,ie.Z)(c))):h=!1}h&&(r.set(c,d),s(d,c,i,n,r),r.delete(c)),X(e,o,d)}};const me=function e(t,o,i,s,n){t!==o&&Q(o,(function(r,a){if(n||(n=new G.Z),(0,A.Z)(r))ge(t,o,a,i,e,s,n);else{var c=s?s(he(t,a),r,a+"",t,o,n):void 0;void 0===c&&(c=r),X(t,a,c)}}),pe.Z)};const be=(0,o("./node_modules/lodash-es/_createAssigner.js").Z)((function(e,t,o){me(e,t,o)}));var _e=o("./node_modules/lodash-es/_assignValue.js"),we=o("./node_modules/lodash-es/_isIndex.js");const ke=function(e,t,o,i){if(!(0,A.Z)(e))return e;for(var s=-1,n=(t=F(t,e)).length,r=n-1,a=e;null!=a&&++s<n;){var c=Z(t[s]),l=o;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(s!=r){var d=a[c];void 0===(l=i?i(d,c,a):void 0)&&(l=(0,A.Z)(d)?d:(0,we.Z)(t[s+1])?[]:{})}(0,_e.Z)(a,c,l),a=a[c]}return e};const ve=function(e,t,o){return null==e?e:ke(e,t,o)};class ye{constructor(e){this._styles={},this._styleProcessor=e}get isEmpty(){const e=Object.entries(this._styles);return!Array.from(e).length}get size(){return this.isEmpty?0:this.getStyleNames().length}setTo(e){this.clear();const t=Array.from(function(e){let t=null,o=0,i=0,s=null;const n=new Map;if(""===e)return n;";"!=e.charAt(e.length-1)&&(e+=";");for(let r=0;r<e.length;r++){const a=e.charAt(r);if(null===t)switch(a){case":":s||(s=e.substr(o,r-o),i=r+1);break;case'"':case"'":t=a;break;case";":{const t=e.substr(i,r-i);s&&n.set(s.trim(),t.trim()),s=null,o=r+1;break}}else a===t&&(t=null)}return n}(e).entries());for(const[e,o]of t)this._styleProcessor.toNormalizedForm(e,o,this._styles)}has(e){if(this.isEmpty)return!1;const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)}set(e,t){if((0,A.Z)(e))for(const[t,o]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,o,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=Pe(e);U(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map((e=>e.join(":"))).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!(0,A.Z)(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){if(this.isEmpty)return[];if(e)return this._styleProcessor.getStyleNames(this._styles);return this._getStylesEntries().map((([e])=>e))}clear(){this._styles={}}_getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const o of t)e.push(...this._styleProcessor.getReducedForm(o,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const o=t.splice(0,t.length-1).join("."),i=K(this._styles,o);if(!i)return;!Array.from(Object.keys(i)).length&&this.remove(o)}}class xe{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,o){if((0,A.Z)(t))Ee(o,Pe(e),t);else if(this._normalizers.has(e)){const i=this._normalizers.get(e),{path:s,value:n}=i(t);Ee(o,s,n)}else Ee(o,e,t)}getNormalized(e,t){if(!e)return be({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const o=this._extractors.get(e);if("string"==typeof o)return K(t,o);const i=o(e,t);if(i)return i}return K(t,Pe(e))}getReducedForm(e,t){const o=this.getNormalized(e,t);if(void 0===o)return[];if(this._reducers.has(e)){return this._reducers.get(e)(o)}return[[e,o]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter((t=>{const o=this.getNormalized(t,e);return o&&"object"==typeof o?Object.keys(o).length:o})),o=new Set([...t,...Object.keys(e)]);return Array.from(o.values())}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const o of t)this._mapStyleNames(o,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function Pe(e){return e.replace("-",".")}function Ee(e,t,o){let i=o;(0,A.Z)(o)&&(i=be({},K(e,t),o)),ve(e,t,i)}class Te extends k{constructor(e,t,o,i){if(super(e),this._unsafeAttributesToRender=[],this._customProperties=new Map,this.name=t,this._attrs=function(e){const t=(0,m.qL)(e);for(const[e,o]of t)null===o?t.delete(e):"string"!=typeof o&&t.set(e,String(o));return t}(o),this._children=[],i&&this._insertChild(0,i),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");Ae(this._classes,e),this._attrs.delete("class")}this._styles=new ye(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof Te))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,o]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==o)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new P(...e);let o=this.parent;for(;o&&!o.is("documentFragment");){if(t.match(o))return o;o=o.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),o=Array.from(this._attrs).map((e=>`${e[0]}="${e[1]}"`)).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==o?"":` ${o}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const o of this.getChildren())t.push(o._clone(e));const o=new this.constructor(this.document,this.name,this._attrs,t);return o._classes=new Set(this._classes),o._styles.set(this._styles.getNormalized()),o._customProperties=new Map(this._customProperties),o.getFillerOffset=this.getFillerOffset,o._unsafeAttributesToRender=this._unsafeAttributesToRender,o}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let o=0;const i=function(e,t){if("string"==typeof t)return[new v(e,t)];(0,m.TW)(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new v(e,t):t instanceof y?new v(e,t.data):t))}(this.document,t);for(const t of i)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,o++;return o}_removeChildren(e,t=1){this._fireChange("children",this);for(let o=e;o<e+t;o++)this._children[o].parent=null;return this._children.splice(e,t)}_setAttribute(e,t){const o=String(t);this._fireChange("attributes",this),"class"==e?Ae(this._classes,o):"style"==e?this._styles.setTo(o):this._attrs.set(e,o)}_removeAttribute(e){return this._fireChange("attributes",this),"class"==e?this._classes.size>0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of(0,m.qo)(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of(0,m.qo)(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),"string"!=typeof e?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of(0,m.qo)(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function Ae(e,t){const o=t.split(/\s+/);e.clear(),o.forEach((t=>e.add(t)))}Te.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ce extends Te{constructor(e,t,o,i){super(e,t,o,i),this.getFillerOffset=Se}}function Se(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}Ce.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Oe extends((0,m.Re)(Ce)){constructor(e,t,o,i){super(e,t,o,i),this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",(t=>t&&e.selection.editableElement==this)),this.listenTo(e.selection,"change",(()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this}))}destroy(){this.stopListening()}}Oe.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};const Re=Symbol("rootName");class Me extends Oe{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(Re)}set rootName(e){this._setCustomProperty(Re,e)}set _name(e){this.name=e}}Me.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class je{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new m.Bb("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new m.Bb("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this._position=Be._createAt(e.startPosition):this._position=Be._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,o;do{o=this.position,t=this.next()}while(!t.done&&e(t.value));t.done||(this._position=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,o=e.parent;if(null===o.parent&&e.offset===o.childCount)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let i;if(o instanceof v){if(e.isAtEnd)return this._position=Be._createAfter(o),this._next();i=o.data[e.offset]}else i=o.getChild(e.offset);if(i instanceof Te)return this.shallow?e.offset++:e=new Be(i,0),this._position=e,this._formatReturnValue("elementStart",i,t,e,1);if(i instanceof v){if(this.singleCharacters)return e=new Be(i,0),this._position=e,this._next();{let o,s=i.data.length;return i==this._boundaryEndParent?(s=this.boundaries.end.offset,o=new y(i,0,s),e=Be._createAfter(o)):(o=new y(i,0,i.data.length),e.offset++),this._position=e,this._formatReturnValue("text",o,t,e,s)}}if("string"==typeof i){let i;if(this.singleCharacters)i=1;else{i=(o===this._boundaryEndParent?this.boundaries.end.offset:o.data.length)-e.offset}const s=new y(o,e.offset,i);return e.offset+=i,this._position=e,this._formatReturnValue("text",s,t,e,i)}return e=Be._createAfter(o),this._position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",o,t,e)}_previous(){let e=this.position.clone();const t=this.position,o=e.parent;if(null===o.parent&&0===e.offset)return{done:!0,value:void 0};if(o==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let i;if(o instanceof v){if(e.isAtStart)return this._position=Be._createBefore(o),this._previous();i=o.data[e.offset-1]}else i=o.getChild(e.offset-1);if(i instanceof Te)return this.shallow?(e.offset--,this._position=e,this._formatReturnValue("elementStart",i,t,e,1)):(e=new Be(i,i.childCount),this._position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",i,t,e));if(i instanceof v){if(this.singleCharacters)return e=new Be(i,i.data.length),this._position=e,this._previous();{let o,s=i.data.length;if(i==this._boundaryStartParent){const t=this.boundaries.start.offset;o=new y(i,t,i.data.length-t),s=o.data.length,e=Be._createBefore(o)}else o=new y(i,0,i.data.length),e.offset--;return this._position=e,this._formatReturnValue("text",o,t,e,s)}}if("string"==typeof i){let i;if(this.singleCharacters)i=1;else{const t=o===this._boundaryStartParent?this.boundaries.start.offset:0;i=e.offset-t}e.offset-=i;const s=new y(o,e.offset,i);return this._position=e,this._formatReturnValue("text",s,t,e,i)}return e=Be._createBefore(o),this._position=e,this._formatReturnValue("elementStart",o,t,e,1)}_formatReturnValue(e,t,o,i,s){return t instanceof y&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?o=Be._createAfter(t.textNode):(i=Be._createAfter(t.textNode),this._position=i)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?o=Be._createBefore(t.textNode):(i=Be._createBefore(t.textNode),this._position=i))),{done:!1,value:{type:e,item:t,previousPosition:o,nextPosition:i,length:s}}}}class Be extends b{constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof Oe);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=Be._createAt(this),o=t.offset+e;return t.offset=o<0?0:o,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const o=new je(t);return o.skip(e),o.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),o=e.getAncestors();let i=0;for(;t[i]==o[i]&&t[i];)i++;return 0===i?null:t[i-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],o=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),o.push(e.offset);const i=(0,m.Rt)(t,o);switch(i){case"prefix":return"before";case"extension":return"after";default:return t[i]<o[i]?"before":"after"}}getWalker(e={}){return e.startPosition=this,new je(e)}clone(){return new Be(this.parent,this.offset)}static _createAt(e,t){if(e instanceof Be)return new this(e.parent,e.offset);{const o=e;if("end"==t)t=o.is("$text")?o.data.length:o.childCount;else{if("before"==t)return this._createBefore(o);if("after"==t)return this._createAfter(o);if(0!==t&&!t)throw new m.Bb("view-createpositionat-offset-required",o)}return new Be(o,t)}}static _createAfter(e){if(e.is("$textProxy"))return new Be(e.textNode,e.offsetInText+e.data.length);if(!e.parent)throw new m.Bb("view-position-after-root",e,{root:e});return new Be(e.parent,e.index+1)}static _createBefore(e){if(e.is("$textProxy"))return new Be(e.textNode,e.offsetInText);if(!e.parent)throw new m.Bb("view-position-before-root",e,{root:e});return new Be(e.parent,e.index)}}Be.prototype.is=function(e){return"position"===e||"view:position"===e};class De extends b{constructor(e,t=null){super(),this.start=e.clone(),this.end=t?t.clone():e.clone()}*[Symbol.iterator](){yield*new je({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let e=this.start.getLastMatchingPosition(Ve,{direction:"backward"}),t=this.end.getLastMatchingPosition(Ve);return e.parent.is("$text")&&e.isAtStart&&(e=Be._createBefore(e.parent)),t.parent.is("$text")&&t.isAtEnd&&(t=Be._createAfter(t.parent)),new De(e,t)}getTrimmed(){let e=this.start.getLastMatchingPosition(Ve);if(e.isAfter(this.end)||e.isEqual(this.end))return new De(e,e);let t=this.end.getLastMatchingPosition(Ve,{direction:"backward"});const o=e.nodeAfter,i=t.nodeBefore;return o&&o.is("$text")&&(e=new Be(o,0)),i&&i.is("$text")&&(t=new Be(i,i.data.length)),new De(e,t)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const o=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),i=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return o&&i}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new De(this.start,e.start)),this.containsPosition(e.end)&&t.push(new De(e.end,this.end))):t.push(this.clone()),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,o=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(o=e.end),new De(t,o)}return null}getWalker(e={}){return e.boundaries=this,new je(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let e=this.start.nodeAfter,t=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(e=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(t=this.end.parent.previousSibling),e&&e.is("element")&&e===t?e:null}clone(){return new De(this.start,this.end)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new je(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new je(e);yield t.position;for(const e of t)yield e.nextPosition}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}static _createFromParentsAndOffsets(e,t,o,i){return new this(new Be(e,t),new Be(o,i))}static _createFromPositionAndShift(e,t){const o=e,i=e.getShiftedBy(t);return t>0?new this(o,i):new this(i,o)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(Be._createBefore(e),t)}}function Ve(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}De.prototype.is=function(e){return"range"===e||"view:range"===e};class Ie extends((0,m.ln)(b)){constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let o=!1;for(const i of e._ranges)if(t.isEqual(i)){o=!0;break}if(!o)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=(0,m.QX)(this.getRanges());if(t!=(0,m.QX)(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let o=!1;for(let i of e.getRanges())if(i=i.getTrimmed(),t.start.isEqual(i.start)&&t.end.isEqual(i.end)){o=!0;break}if(!o)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...e){let[t,o,i]=e;if("object"==typeof o&&(i=o,o=void 0),null===t)this._setRanges([]),this._setFakeOptions(i);else if(t instanceof Ie||t instanceof Ne)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof De)this._setRanges([t],i&&i.backward),this._setFakeOptions(i);else if(t instanceof Be)this._setRanges([new De(t)]),this._setFakeOptions(i);else if(t instanceof k){const e=!!i&&!!i.backward;let s;if(void 0===o)throw new m.Bb("view-selection-setto-required-second-parameter",this);s="in"==o?De._createIn(t):"on"==o?De._createOn(t):new De(Be._createAt(t,o)),this._setRanges([s],e),this._setFakeOptions(i)}else{if(!(0,m.TW)(t))throw new m.Bb("view-selection-setto-not-selectable",this);this._setRanges(t,i&&i.backward),this._setFakeOptions(i)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new m.Bb("view-selection-setfocus-no-ranges",this);const o=Be._createAt(e,t);if("same"==o.compareWith(this.focus))return;const i=this.anchor;this._ranges.pop(),"before"==o.compareWith(i)?this._addRange(new De(o,i),!0):this._addRange(new De(i,o)),this.fire("change")}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof De))throw new m.Bb("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new m.Bb("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new De(e.start,e.end))}}Ie.prototype.is=function(e){return"selection"===e||"view:selection"===e};class Ne extends((0,m.ln)(b)){constructor(...e){super(),this._selection=new Ie,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,t){this._selection.setFocus(e,t)}}Ne.prototype.is=function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e};class ze extends m.M3{constructor(e,t,o){super(e,t),this.startRange=o,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const Fe=Symbol("bubbling contexts");function Le(e){return class extends e{fire(e,...t){try{const o=e instanceof m.M3?e:new m.M3(this,e),i=qe(this);if(!i.size)return;if(Ze(o,"capturing",this),We(i,"$capture",o,...t))return o.return;const s=o.startRange||this.selection.getFirstRange(),n=s?s.getContainedElement():null,r=!!n&&Boolean($e(i,n));let a=n||function(e){if(!e)return null;const t=e.start.parent,o=e.end.parent,i=t.getPath(),s=o.getPath();return i.length>s.length?t:o}(s);if(Ze(o,"atTarget",a),!r){if(We(i,"$text",o,...t))return o.return;Ze(o,"bubbling",a)}for(;a;){if(a.is("rootElement")){if(We(i,"$root",o,...t))return o.return}else if(a.is("element")&&We(i,a.name,o,...t))return o.return;if(We(i,a,o,...t))return o.return;a=a.parent,Ze(o,"bubbling",a)}return Ze(o,"bubbling",this),We(i,"$document",o,...t),o.return}catch(e){m.Bb.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,o){const i=(0,m.qo)(o.context||"$document"),s=qe(this);for(const n of i){let i=s.get(n);i||(i=new((0,m.ln)()),s.set(n,i)),this.listenTo(i,e,t,o)}}_removeEventListener(e,t){const o=qe(this);for(const i of o.values())this.stopListening(i,e,t)}}}{const e=Le(Object);["fire","_addEventListener","_removeEventListener"].forEach((t=>{Le[t]=e.prototype[t]}))}function Ze(e,t,o){e instanceof ze&&(e._eventPhase=t,e._currentTarget=o)}function We(e,t,o,...i){const s="string"==typeof t?e.get(t):$e(e,t);return!!s&&(s.fire(o,...i),o.stop.called)}function $e(e,t){for(const[o,i]of e)if("function"==typeof o&&o(t))return i;return null}function qe(e){return e[Fe]||(e[Fe]=new Map),e[Fe]}class He extends(Le((0,m.Re)())){constructor(e){super(),this._postFixers=new Set,this.selection=new Ne,this.roots=new m.FE({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.map((e=>e.destroy())),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const o of this._postFixers)if(t=o(e),t)break}while(t)}}class Ue extends Te{constructor(e,t,o,i){super(e,t,o,i),this._priority=10,this._id=null,this._clonesGroup=null,this.getFillerOffset=Ke}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new m.Bb("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e=!1){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function Ke(){if(Ge(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(Ge(e)>1)return null;e=e.parent}return!e||Ge(e)>1?null:this.childCount}function Ge(e){return Array.from(e.getChildren()).filter((e=>!e.is("uiElement"))).length}Ue.DEFAULT_PRIORITY=10,Ue.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Je extends Te{constructor(e,t,o,i){super(e,t,o,i),this.getFillerOffset=Ye}_insertChild(e,t){if(t&&(t instanceof k||Array.from(t).length>0))throw new m.Bb("view-emptyelement-cannot-add",[this,t]);return 0}}function Ye(){return null}Je.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Xe extends Te{constructor(e,t,o,i){super(e,t,o,i),this.getFillerOffset=et}_insertChild(e,t){if(t&&(t instanceof k||Array.from(t).length>0))throw new m.Bb("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function Qe(e){e.document.on("arrowKey",((t,o)=>function(e,t,o){if(t.keyCode==m.Do.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),i=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(i||t.shiftKey){const t=e.focusNode,s=e.focusOffset,n=o.domPositionToView(t,s);if(null===n)return;let r=!1;const a=n.getLastMatchingPosition((e=>(e.item.is("uiElement")&&(r=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement")))));if(r){const t=o.viewPositionToDom(a);i?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,o,e.domConverter)),{priority:"low"})}function et(){return null}Xe.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class tt extends Te{constructor(e,t,o,i){super(e,t,o,i),this.getFillerOffset=ot}_insertChild(e,t){if(t&&(t instanceof k||Array.from(t).length>0))throw new m.Bb("view-rawelement-cannot-add",[this,t]);return 0}render(e,t){}}function ot(){return null}tt.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class it extends((0,m.ln)(b)){constructor(e,t){super(),this._children=[],this._customProperties=new Map,this.document=e,t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}get name(){}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let o=0;const i=function(e,t){if("string"==typeof t)return[new v(e,t)];(0,m.TW)(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new v(e,t):t instanceof y?new v(e,t.data):t))}(this.document,t);for(const t of i)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,o++;return o}_removeChildren(e,t=1){this._fireChange("children",this);for(let o=e;o<e+t;o++)this._children[o].parent=null;return this._children.splice(e,t)}_fireChange(e,t){this.fire("change:"+e,t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}it.prototype.is=function(e){return"documentFragment"===e||"view:documentFragment"===e};class st{constructor(e){this._cloneGroups=new Map,this._slotFactory=null,this.document=e}setSelection(...e){this.document.selection._setTo(...e)}setSelectionFocus(e,t){this.document.selection._setFocus(e,t)}createDocumentFragment(e){return new it(this.document,e)}createText(e){return new v(this.document,e)}createAttributeElement(e,t,o={}){const i=new Ue(this.document,e,t);return"number"==typeof o.priority&&(i._priority=o.priority),o.id&&(i._id=o.id),o.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),i}createContainerElement(e,t,o={},i={}){let s=null;(0,x.Z)(o)?i=o:s=o;const n=new Ce(this.document,e,t,s);return i.renderUnsafeAttributes&&n._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),n}createEditableElement(e,t,o={}){const i=new Oe(this.document,e,t);return o.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),i}createEmptyElement(e,t,o={}){const i=new Je(this.document,e,t);return o.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),i}createUIElement(e,t,o){const i=new Xe(this.document,e,t);return o&&(i.render=o),i}createRawElement(e,t,o,i={}){const s=new tt(this.document,e,t);return o&&(s.render=o),i.renderUnsafeAttributes&&s._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),s}setAttribute(e,t,o){o._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,o){(0,x.Z)(e)&&void 0===o?t._setStyle(e):o._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,o){o._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof Be?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is("containerElement"))throw new m.Bb("view-writer-break-non-container-element",this.document);if(!t.parent)throw new m.Bb("view-writer-break-root",this.document);if(e.isAtStart)return Be._createBefore(t);if(!e.isAtEnd){const o=t._clone(!1);this.insert(Be._createAfter(t),o);const i=new De(e,Be._createAt(t,"end")),s=new Be(o,0);this.move(i,s)}return Be._createAfter(t)}mergeAttributes(e){const t=e.offset,o=e.parent;if(o.is("$text"))return e;if(o.is("attributeElement")&&0===o.childCount){const e=o.parent,t=o.index;return o._remove(),this._removeFromClonedElementsGroup(o),this.mergeAttributes(new Be(e,t))}const i=o.getChild(t-1),s=o.getChild(t);if(!i||!s)return e;if(i.is("$text")&&s.is("$text"))return lt(i,s);if(i.is("attributeElement")&&s.is("attributeElement")&&i.isSimilar(s)){const e=i.childCount;return i._appendChild(s.getChildren()),s._remove(),this._removeFromClonedElementsGroup(s),this.mergeAttributes(new Be(i,e))}return e}mergeContainers(e){const t=e.nodeBefore,o=e.nodeAfter;if(!(t&&o&&t.is("containerElement")&&o.is("containerElement")))throw new m.Bb("view-writer-merge-containers-invalid-position",this.document);const i=t.getChild(t.childCount-1),s=i instanceof v?Be._createAt(i,"end"):Be._createAt(t,"end");return this.move(De._createIn(o),Be._createAt(t,"end")),this.remove(De._createOn(o)),s}insert(e,t){ht(t=(0,m.TW)(t)?[...t]:[t],this.document);const o=t.reduce(((e,t)=>{const o=e[e.length-1],i=!t.is("uiElement");return o&&o.breakAttributes==i?o.nodes.push(t):e.push({breakAttributes:i,nodes:[t]}),e}),[]);let i=null,s=e;for(const{nodes:e,breakAttributes:t}of o){const o=this._insertNodes(s,e,t);i||(i=o.start),s=o.end}return i?new De(i,s):new De(e)}remove(e){const t=e instanceof De?e:De._createOn(e);if(pt(t,this.document),t.isCollapsed)return new it(this.document);const{start:o,end:i}=this._breakAttributesRange(t,!0),s=o.parent,n=i.offset-o.offset,r=s._removeChildren(o.offset,n);for(const e of r)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(o);return t.start=a,t.end=a.clone(),new it(this.document,r)}clear(e,t){pt(e,this.document);const o=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const i of o){const o=i.item;let s;if(o.is("element")&&t.isSimilar(o))s=De._createOn(o);else if(!i.nextPosition.isAfter(e.start)&&o.is("$textProxy")){const e=o.getAncestors().find((e=>e.is("element")&&t.isSimilar(e)));e&&(s=De._createIn(e))}s&&(s.end.isAfter(e.end)&&(s.end=e.end),s.start.isBefore(e.start)&&(s.start=e.start),this.remove(s))}}move(e,t){let o;if(t.isAfter(e.end)){const i=(t=this._breakAttributes(t,!0)).parent,s=i.childCount;e=this._breakAttributesRange(e,!0),o=this.remove(e),t.offset+=i.childCount-s}else o=this.remove(e);return this.insert(t,o)}wrap(e,t){if(!(t instanceof Ue))throw new m.Bb("view-writer-wrap-invalid-attribute",this.document);if(pt(e,this.document),e.isCollapsed){let i=e.start;i.parent.is("element")&&(o=i.parent,!Array.from(o.getChildren()).some((e=>!e.is("uiElement"))))&&(i=i.getLastMatchingPosition((e=>e.item.is("uiElement")))),i=this._wrapPosition(i,t);const s=this.document.selection;return s.isCollapsed&&s.getFirstPosition().isEqual(e.start)&&this.setSelection(i),new De(i)}return this._wrapRange(e,t);var o}unwrap(e,t){if(!(t instanceof Ue))throw new m.Bb("view-writer-unwrap-invalid-attribute",this.document);if(pt(e,this.document),e.isCollapsed)return e;const{start:o,end:i}=this._breakAttributesRange(e,!0),s=o.parent,n=this._unwrapChildren(s,o.offset,i.offset,t),r=this.mergeAttributes(n.start);r.isEqual(n.start)||n.end.offset--;const a=this.mergeAttributes(n.end);return new De(r,a)}rename(e,t){const o=new Ce(this.document,e,t.getAttributes());return this.insert(Be._createAfter(t),o),this.move(De._createIn(t),Be._createAt(o,0)),this.remove(De._createOn(t)),o}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return Be._createAt(e,t)}createPositionAfter(e){return Be._createAfter(e)}createPositionBefore(e){return Be._createBefore(e)}createRange(e,t){return new De(e,t)}createRangeOn(e){return De._createOn(e)}createRangeIn(e){return De._createIn(e)}createSelection(...e){return new Ie(...e)}createSlot(e="children"){if(!this._slotFactory)throw new m.Bb("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,o){let i,s;if(i=o?nt(e):e.parent.is("$text")?e.parent.parent:e.parent,!i)throw new m.Bb("view-writer-invalid-position-container",this.document);s=o?this._breakAttributes(e,!0):e.parent.is("$text")?ct(e):e;const n=i._insertChild(s.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const r=s.getShiftedBy(n),a=this.mergeAttributes(s);a.isEqual(s)||r.offset--;const c=this.mergeAttributes(r);return new De(a,c)}_wrapChildren(e,t,o,i){let s=t;const n=[];for(;s<o;){const t=e.getChild(s),o=t.is("$text"),r=t.is("attributeElement");if(r&&this._wrapAttributeElement(i,t))n.push(new Be(e,s));else if(o||!r||rt(i,t)){const o=i._clone();t._remove(),o._appendChild(t),e._insertChild(s,o),this._addToClonedElementsGroup(o),n.push(new Be(e,s))}else this._wrapChildren(t,0,t.childCount,i);s++}let r=0;for(const e of n){if(e.offset-=r,e.offset==t)continue;this.mergeAttributes(e).isEqual(e)||(r++,o--)}return De._createFromParentsAndOffsets(e,t,e,o)}_unwrapChildren(e,t,o,i){let s=t;const n=[];for(;s<o;){const t=e.getChild(s);if(t.is("attributeElement"))if(t.isSimilar(i)){const i=t.getChildren(),r=t.childCount;t._remove(),e._insertChild(s,i),this._removeFromClonedElementsGroup(t),n.push(new Be(e,s),new Be(e,s+r)),s+=r,o+=r-1}else this._unwrapAttributeElement(i,t)?(n.push(new Be(e,s),new Be(e,s+1)),s++):(this._unwrapChildren(t,0,t.childCount,i),s++);else s++}let r=0;for(const e of n){if(e.offset-=r,e.offset==t||e.offset==o)continue;this.mergeAttributes(e).isEqual(e)||(r++,o--)}return De._createFromParentsAndOffsets(e,t,e,o)}_wrapRange(e,t){const{start:o,end:i}=this._breakAttributesRange(e,!0),s=o.parent,n=this._wrapChildren(s,o.offset,i.offset,t),r=this.mergeAttributes(n.start);r.isEqual(n.start)||n.end.offset--;const a=this.mergeAttributes(n.end);return new De(r,a)}_wrapPosition(e,t){if(t.isSimilar(e.parent))return at(e.clone());e.parent.is("$text")&&(e=ct(e));const o=this.createAttributeElement("_wrapPosition-fake-element");o._priority=Number.POSITIVE_INFINITY,o.isSimilar=()=>!1,e.parent._insertChild(e.offset,o);const i=new De(e,e.getShiftedBy(1));this.wrap(i,t);const s=new Be(o.parent,o.index);o._remove();const n=s.nodeBefore,r=s.nodeAfter;return n instanceof v&&r instanceof v?lt(n,r):at(s)}_wrapAttributeElement(e,t){if(!ft(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const o of e.getAttributeKeys())if("class"!==o&&"style"!==o&&t.hasAttribute(o)&&t.getAttribute(o)!==e.getAttribute(o))return!1;for(const o of e.getStyleNames())if(t.hasStyle(o)&&t.getStyle(o)!==e.getStyle(o))return!1;for(const o of e.getAttributeKeys())"class"!==o&&"style"!==o&&(t.hasAttribute(o)||this.setAttribute(o,e.getAttribute(o),t));for(const o of e.getStyleNames())t.hasStyle(o)||this.setStyle(o,e.getStyle(o),t);for(const o of e.getClassNames())t.hasClass(o)||this.addClass(o,t);return!0}_unwrapAttributeElement(e,t){if(!ft(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const o of e.getAttributeKeys())if("class"!==o&&"style"!==o&&(!t.hasAttribute(o)||t.getAttribute(o)!==e.getAttribute(o)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const o of e.getStyleNames())if(!t.hasStyle(o)||t.getStyle(o)!==e.getStyle(o))return!1;for(const o of e.getAttributeKeys())"class"!==o&&"style"!==o&&this.removeAttribute(o,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const o=e.start,i=e.end;if(pt(e,this.document),e.isCollapsed){const o=this._breakAttributes(e.start,t);return new De(o,o)}const s=this._breakAttributes(i,t),n=s.parent.childCount,r=this._breakAttributes(o,t);return s.offset+=s.parent.childCount-n,new De(r,s)}_breakAttributes(e,t=!1){const o=e.offset,i=e.parent;if(e.parent.is("emptyElement"))throw new m.Bb("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new m.Bb("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new m.Bb("view-writer-cannot-break-raw-element",this.document);if(!t&&i.is("$text")&&ut(i.parent))return e.clone();if(ut(i))return e.clone();if(i.is("$text"))return this._breakAttributes(ct(e),t);if(o==i.childCount){const e=new Be(i.parent,i.index+1);return this._breakAttributes(e,t)}if(0===o){const e=new Be(i.parent,i.index);return this._breakAttributes(e,t)}{const e=i.index+1,s=i._clone();i.parent._insertChild(e,s),this._addToClonedElementsGroup(s);const n=i.childCount-o,r=i._removeChildren(o,n);s._appendChild(r);const a=new Be(i.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let o=this._cloneGroups.get(t);o||(o=new Set,this._cloneGroups.set(t,o)),o.add(e),e._clonesGroup=o}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const o=this._cloneGroups.get(t);o&&o.delete(e)}}function nt(e){let t=e.parent;for(;!ut(t);){if(!t)return;t=t.parent}return t}function rt(e,t){return e.priority<t.priority||!(e.priority>t.priority)&&e.getIdentity()<t.getIdentity()}function at(e){const t=e.nodeBefore;if(t&&t.is("$text"))return new Be(t,t.data.length);const o=e.nodeAfter;return o&&o.is("$text")?new Be(o,0):e}function ct(e){if(e.offset==e.parent.data.length)return new Be(e.parent.parent,e.parent.index+1);if(0===e.offset)return new Be(e.parent.parent,e.parent.index);const t=e.parent.data.slice(e.offset);return e.parent._data=e.parent.data.slice(0,e.offset),e.parent.parent._insertChild(e.parent.index+1,new v(e.root.document,t)),new Be(e.parent.parent,e.parent.index+1)}function lt(e,t){const o=e.data.length;return e._data+=t.data,t._remove(),new Be(e,o)}const dt=[v,Ue,Ce,Je,tt,Xe];function ht(e,t){for(const o of e){if(!dt.some((e=>o instanceof e)))throw new m.Bb("view-writer-insert-invalid-node-type",t);o.is("$text")||ht(o.getChildren(),t)}}function ut(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function pt(e,t){const o=nt(e.start),i=nt(e.end);if(!o||!i||o!==i)throw new m.Bb("view-writer-invalid-range-container",t)}function ft(e,t){return null===e.id&&null===t.id}const gt=e=>e.createTextNode(" "),mt=e=>{const t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText=" ",t},bt=e=>{const t=e.createElement("br");return t.dataset.ckeFiller="true",t},_t=7,wt="â ".repeat(_t);function kt(e){return(0,m.Gs)(e)&&e.data.substr(0,_t)===wt}function vt(e){return e.data.length==_t&&kt(e)}function yt(e){return kt(e)?e.data.slice(_t):e.data}function xt(e,t){if(t.keyCode==m.Do.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,o=e.getRangeAt(0).startOffset;kt(t)&&o<=_t&&e.collapse(t,0)}}}var Pt=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/renderer.css"),Et={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};s()(Pt.Z,Et);Pt.Z.locals;class Tt extends((0,m.Re)()){constructor(e,t){super(),this.domDocuments=new Set,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this._inlineFiller=null,this._fakeSelectionContainer=null,this.domConverter=e,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),m.OB.isBlink&&!m.OB.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this.set("isComposing",!1),this.on("change:isComposing",(()=>{this.isComposing||this.render()}))}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e){throw new m.Bb("view-renderer-unknown-type",this)}this.markedChildren.add(t)}}}render(){if(this.isComposing&&!m.OB.isAndroid)return;let e=null;const t=!(m.OB.isBlink&&!m.OB.isAndroid)||!this.isSelecting;for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=Be._createBefore(e.parent)));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),o=t.parent.ownerDocument;kt(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=At(o,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){if(!this.domConverter.mapViewToDom(e))return;const t=Array.from(this.domConverter.mapViewToDom(e).childNodes),o=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),i=this._diffNodeLists(t,o),s=this._findUpdateActions(i,t,o,Ct);if(-1!==s.indexOf("update")){const i={equal:0,insert:0,delete:0};for(const n of s)if("update"===n){const s=i.equal+i.insert,n=i.equal+i.delete,r=e.getChild(s);!r||r.is("uiElement")||r.is("rawElement")||this._updateElementMappings(r,t[n]),(0,m.Od)(o[s]),i.equal++}else i[n]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?Be._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&(0,m.Gs)(t.parent)&&kt(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!kt(e))throw new m.Bb("view-renderer-filler-was-lost",this);vt(e)?e.remove():e.data=e.data.substr(_t),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,o=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor((e=>e.hasAttribute("contenteditable")));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(o===t.getFillerOffset())return!1;const i=e.nodeBefore,s=e.nodeAfter;return!(i instanceof v||s instanceof v)&&(!m.OB.isAndroid||!i&&!s)}_updateText(e,t){const o=this.domConverter.findCorrespondingDomText(e);let i=this.domConverter.viewToDom(e).data;const s=t.inlineFillerPosition;s&&s.parent==e.parent&&s.offset==e.index&&(i=wt+i),Rt(o,i)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const o=Array.from(t.attributes).map((e=>e.name)),i=e.getAttributeKeys();for(const o of i)this.domConverter.setDomElementAttribute(t,o,e.getAttribute(o),e);for(const i of o)e.hasAttribute(i)||this.domConverter.removeDomElementAttribute(t,i)}_updateChildren(e,t){const o=this.domConverter.mapViewToDom(e);if(!o)return;if(m.OB.isAndroid){let e=null;for(const t of Array.from(o.childNodes)){if(e&&(0,m.Gs)(e)&&(0,m.Gs)(t)){o.normalize();break}e=t}}const i=t.inlineFillerPosition,s=o.childNodes,n=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));i&&i.parent===e&&At(o.ownerDocument,n,i.offset);const r=this._diffNodeLists(s,n),a=this._findUpdateActions(r,s,n,St);let c=0;const l=new Set;for(const e of a)"delete"===e?(l.add(s[c]),(0,m.Od)(s[c])):"equal"!==e&&"update"!==e||c++;c=0;for(const e of a)"insert"===e?((0,m.ZQ)(o,c,n[c]),c++):"update"===e?(Rt(s[c],n[c].data),c++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(n[c])),c++);for(const e of l)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return e=function(e,t){const o=Array.from(e);if(0==o.length||!t)return o;const i=o[o.length-1];i==t&&o.pop();return o}(e,this._fakeSelectionContainer),(0,m.Hg)(e,t,Ot.bind(null,this.domConverter))}_findUpdateActions(e,t,o,i){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let s=[],n=[],r=[];const a={equal:0,insert:0,delete:0};for(const c of e)"insert"===c?r.push(o[a.equal+a.insert]):"delete"===c?n.push(t[a.equal+a.delete]):(s=s.concat((0,m.Hg)(n,r,i).map((e=>"equal"===e?"update":e))),s.push("equal"),n=[],r=[]),a[c]++;return s.concat((0,m.Hg)(n,r,i).map((e=>"equal"===e?"update":e)))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(m.OB.isBlink&&!m.OB.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&m.OB.isAndroid||this._updateDomSelection(e))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const o=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(o,this.selection),!this._fakeSelectionNeedsUpdate(e))return;o.parentElement&&o.parentElement==e||e.appendChild(o),o.textContent=this.selection.fakeSelectionLabel||" ";const i=t.getSelection(),s=t.createRange();i.removeAllRanges(),s.selectNodeContents(o),i.addRange(s)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const o=this.domConverter.viewPositionToDom(this.selection.anchor),i=this.domConverter.viewPositionToDom(this.selection.focus);t.collapse(o.parent,o.offset),t.extend(i.parent,i.offset),m.OB.isGecko&&function(e,t){const o=e.parent;if(o.nodeType!=Node.ELEMENT_NODE||e.offset!=o.childNodes.length-1)return;const i=o.childNodes[e.offset];i&&"BR"==i.tagName&&t.addRange(t.getRangeAt(0))}(i,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,o=e.ownerDocument.getSelection();return!t||t.parentElement!==e||(o.anchorNode!==t&&!t.contains(o.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const o=e.activeElement,i=this.domConverter.mapDomToView(o);o&&i&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function At(e,t,o){const i=t instanceof Array?t:t.childNodes,s=i[o];if((0,m.Gs)(s))return s.data=wt+s.data,s;{const s=e.createTextNode(wt);return Array.isArray(t)?i.splice(o,0,s):(0,m.ZQ)(t,o,s),s}}function Ct(e,t){return(0,m.UG)(e)&&(0,m.UG)(t)&&!(0,m.Gs)(e)&&!(0,m.Gs)(t)&&!(0,m.C3)(e)&&!(0,m.C3)(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function St(e,t){return(0,m.UG)(e)&&(0,m.UG)(t)&&(0,m.Gs)(e)&&(0,m.Gs)(t)}function Ot(e,t,o){return t===o||((0,m.Gs)(t)&&(0,m.Gs)(o)?t.data===o.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(o)))}function Rt(e,t){const o=e.data;if(o==t)return;const i=(0,m.HZ)(o,t);for(const t of i)"insert"===t.type?e.insertData(t.index,t.values.join("")):e.deleteData(t.index,t.howMany)}const Mt=bt(m.global.document),jt=gt(m.global.document),Bt=mt(m.global.document),Dt="data-ck-unsafe-attribute-",Vt="data-ck-unsafe-element";class It{constructor(e,{blockFillerMode:t,renderingMode:o="editing"}={}){this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new P,this._encounteredRawContentDomNodes=new WeakSet,this.document=e,this.renderingMode=o,this.blockFillerMode=t||("editing"===o?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?m.global.document:m.global.document.implementation.createHTMLDocument("")}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new Ie(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.children))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,o){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&(("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===o&&("src"===e||"srcset"===e)||("source"===o&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const o=(new DOMParser).parseFromString(t,"text/html"),i=o.createDocumentFragment(),s=o.body.childNodes;for(;s.length>0;)i.appendChild(s[0]);const n=o.createTreeWalker(i,NodeFilter.SHOW_ELEMENT),r=[];let a;for(;a=n.nextNode();)r.push(a);for(const e of r){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(Ft(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(i)}viewToDom(e,t={}){if(e.is("$text")){const t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{if(this.mapViewToDom(e))return this.mapViewToDom(e);let o;if(e.is("documentFragment"))o=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(o,e);else{if(e.is("uiElement"))return o="$comment"===e.name?this._domDocument.createComment(e.getCustomProperty("$rawContent")):e.render(this._domDocument,this),t.bind&&this.bindElements(o,e),o;this._shouldRenameElement(e.name)?(Ft(e.name),o=this._createReplacementDomElement(e.name)):o=e.hasAttribute("xmlns")?this._domDocument.createElementNS(e.getAttribute("xmlns"),e.name):this._domDocument.createElement(e.name),e.is("rawElement")&&e.render(o,this),t.bind&&this.bindElements(o,e);for(const t of e.getAttributeKeys())this.setDomElementAttribute(o,t,e.getAttribute(t),e)}if(!1!==t.withChildren)for(const i of this.viewChildrenToDom(e,t))o.appendChild(i);return o}}setDomElementAttribute(e,t,o,i){const s=this.shouldRenderAttribute(t,o,e.tagName.toLowerCase())||i&&i.shouldRenderUnsafeAttribute(t);s||(0,m.KE)("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:o}),(0,m.$b)(t)?(e.hasAttribute(t)&&!s?e.removeAttribute(t):e.hasAttribute(Dt+t)&&s&&e.removeAttribute(Dt+t),e.setAttribute(s?t:Dt+t,o)):(0,m.KE)("domconverter-invalid-attribute-detected",{domElement:e,key:t,value:o})}removeDomElementAttribute(e,t){t!=Vt&&(e.removeAttribute(t),e.removeAttribute(Dt+t))}*viewChildrenToDom(e,t={}){const o=e.getFillerOffset&&e.getFillerOffset();let i=0;for(const s of e.getChildren()){o===i&&(yield this._getBlockFiller());const e=s.is("element")&&!!s.getCustomProperty("dataPipeline:transparentRendering")&&!(0,m.Ps)(s.getAttributes());e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(s,t):(e&&(0,m.KE)("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:s}),yield this.viewToDom(s,t)),i++}o===i&&(yield this._getBlockFiller())}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),o=this.viewPositionToDom(e.end),i=this._domDocument.createRange();return i.setStart(t.parent,t.offset),i.setEnd(o.parent,o.offset),i}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const o=this.findCorrespondingDomText(t);if(!o)return null;let i=e.offset;return kt(o)&&(i+=_t),{parent:o,offset:i}}{let o,i,s;if(0===e.offset){if(o=this.mapViewToDom(t),!o)return null;s=o.childNodes[0]}else{const t=e.nodeBefore;if(i=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t),!i)return null;o=i.parentNode,s=i.nextSibling}if((0,m.Gs)(s)&&kt(s))return{parent:s,offset:_t};return{parent:o,offset:i?(0,m.cq)(i)+1:0}}}domToView(e,t={}){if(this.isBlockFiller(e))return null;const o=this.getHostViewElement(e);if(o)return o;if((0,m.C3)(e)&&t.skipComments)return null;if((0,m.Gs)(e)){if(vt(e))return null;{const t=this._processDataFromDomText(e);return""===t?null:new v(this.document,t)}}{if(this.mapDomToView(e))return this.mapDomToView(e);let o;if(this.isDocumentFragment(e))o=new it(this.document),t.bind&&this.bindDocumentFragments(e,o);else{o=this._createViewElement(e,t),t.bind&&this.bindElements(e,o);const i=e.attributes;if(i)for(let e=i.length,t=0;t<e;t++)o._setAttribute(i[t].name,i[t].value);if(this._isViewElementWithRawContent(o,t)||(0,m.C3)(e)){const t=(0,m.C3)(e)?e.data:e.innerHTML;return o._setCustomProperty("$rawContent",t),this._encounteredRawContentDomNodes.add(e),o}}if(!1!==t.withChildren)for(const i of this.domChildrenToView(e,t))o._appendChild(i);return o}}*domChildrenToView(e,t){for(let o=0;o<e.childNodes.length;o++){const i=e.childNodes[o],s=this.domToView(i,t);null!==s&&(yield s)}}domSelectionToView(e){if(1===e.rangeCount){let t=e.getRangeAt(0).startContainer;(0,m.Gs)(t)&&(t=t.parentNode);const o=this.fakeSelectionToView(t);if(o)return o}const t=this.isDomSelectionBackward(e),o=[];for(let t=0;t<e.rangeCount;t++){const i=e.getRangeAt(t),s=this.domRangeToView(i);s&&o.push(s)}return new Ie(o,{backward:t})}domRangeToView(e){const t=this.domPositionToView(e.startContainer,e.startOffset),o=this.domPositionToView(e.endContainer,e.endOffset);return t&&o?new De(t,o):null}domPositionToView(e,t=0){if(this.isBlockFiller(e))return this.domPositionToView(e.parentNode,(0,m.cq)(e));const o=this.mapDomToView(e);if(o&&(o.is("uiElement")||o.is("rawElement")))return Be._createBefore(o);if((0,m.Gs)(e)){if(vt(e))return this.domPositionToView(e.parentNode,(0,m.cq)(e));const o=this.findCorrespondingViewText(e);let i=t;return o?(kt(e)&&(i-=_t,i=i<0?0:i),new Be(o,i)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new Be(t,0)}else{const o=e.childNodes[t-1];if((0,m.Gs)(o)&&vt(o)||o&&this.isBlockFiller(o))return this.domPositionToView(o.parentNode,(0,m.cq)(o));const i=(0,m.Gs)(o)?this.findCorrespondingViewText(o):this.mapDomToView(o);if(i&&i.parent)return new Be(i.parent,i.index+1)}return null}mapDomToView(e){return this.getHostViewElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(vt(e))return null;const t=this.getHostViewElement(e);if(t)return t;const o=e.previousSibling;if(o){if(!this.isElement(o))return null;const e=this.mapDomToView(o);if(e){const t=e.nextSibling;return t instanceof v?t:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof v?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:o}=m.global.window,i=[];Nt(t,(e=>{const{scrollLeft:t,scrollTop:o}=e;i.push([t,o])})),t.focus(),Nt(t,(e=>{const[t,o]=i.shift();e.scrollLeft=t,e.scrollTop=o})),m.global.window.scrollTo(e,o)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(Mt):!("BR"!==e.tagName||!zt(e,this.blockElements)||1!==e.parentNode.childNodes.length)||(e.isEqualNode(Bt)||function(e,t){const o=e.isEqualNode(jt);return o&&zt(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements))}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();try{t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset)}catch(e){return!1}const o=t.collapsed;return t.detach(),o}getHostViewElement(e){const t=(0,m.dk)(e);for(t.pop();t.length;){const e=t.pop(),o=this._domToViewMapping.get(e);if(o&&(o.is("uiElement")||o.is("rawElement")))return o}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return gt(this._domDocument);case"markedNbsp":return mt(this._domDocument);case"br":return bt(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if((0,m.Gs)(e)&&kt(e)&&t<_t)return!1;if(this.isElement(e)&&kt(e.childNodes[t]))return!1;const o=this.mapDomToView(e);return!o||!o.is("uiElement")&&!o.is("rawElement")}_processDataFromViewText(e){let t=e.data;if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return t;if(" "==t.charAt(0)){const o=this._getTouchingInlineViewNode(e,!1);!(o&&o.is("$textProxy")&&this._nodeEndsWithSpace(o))&&o||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const o=this._getTouchingInlineViewNode(e,!0),i=o&&o.is("$textProxy")&&" "==o.data.charAt(0);" "!=t.charAt(t.length-2)&&o&&!i||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(function(e,t){const o=(0,m.dk)(e);return o.some((e=>e.tagName&&t.includes(e.tagName.toLowerCase())))}(e,this.preElements))return yt(e);t=t.replace(/[ \n\t\r]{1,}/g," ");const o=this._getTouchingInlineDomNode(e,!1),i=this._getTouchingInlineDomNode(e,!0),s=this._checkShouldLeftTrimDomText(e,o),n=this._checkShouldRightTrimDomText(e,i);s&&(t=t.replace(/^ /,"")),n&&(t=t.replace(/ $/,"")),t=yt(new Text(t)),t=t.replace(/ \u00A0/g," ");const r=i&&this.isElement(i)&&"BR"!=i.tagName,a=i&&(0,m.Gs)(i)&&" "==i.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(t)||!i||r||a)&&(t=t.replace(/\u00A0$/," ")),(s||o&&this.isElement(o)&&"BR"!=o.tagName)&&(t=t.replace(/^\u00A0/," ")),t}_checkShouldLeftTrimDomText(e,t){return!t||(this.isElement(t)?"BR"===t.tagName:!this._encounteredRawContentDomNodes.has(e.previousSibling)&&/[^\S\u00A0]/.test(t.data.charAt(t.data.length-1)))}_checkShouldRightTrimDomText(e,t){return!t&&!kt(e)}_getTouchingInlineViewNode(e,t){const o=new je({startPosition:t?Be._createAfter(e):Be._createBefore(e),direction:t?"forward":"backward"});for(const e of o){if(e.item.is("element")&&this.inlineObjectElements.includes(e.item.name))return e.item;if(e.item.is("containerElement"))return null;if(e.item.is("element","br"))return null;if(e.item.is("$textProxy"))return e.item}return null}_getTouchingInlineDomNode(e,t){if(!e.parentNode)return null;const o=t?"firstChild":"lastChild",i=t?"nextSibling":"previousSibling";let s=!0,n=e;do{if(!s&&n[o]?n=n[o]:n[i]?(n=n[i],s=!1):(n=n.parentNode,s=!0),!n||this._isBlockElement(n))return null}while(!(0,m.Gs)(n)&&"BR"!=n.tagName&&!this._isInlineObjectElement(n));return n}_isBlockElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isInlineObjectElement(e){return this.isElement(e)&&this.inlineObjectElements.includes(e.tagName.toLowerCase())}_createViewElement(e,t){if((0,m.C3)(e))return new Xe(this.document,"$comment");const o=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new Te(this.document,o)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const o=this._domDocument.createElement("span");if(o.setAttribute(Vt,e),t){for(;t.firstChild;)o.appendChild(t.firstChild);for(const e of t.getAttributeNames())o.setAttribute(e,t.getAttribute(e))}return o}}function Nt(e,t){let o=e;for(;o;)t(o),o=o.parentElement}function zt(e,t){const o=e.parentNode;return!!o&&!!o.tagName&&t.includes(o.tagName.toLowerCase())}function Ft(e){"script"===e&&(0,m.KE)("domconverter-unsafe-script-element-detected"),"style"===e&&(0,m.KE)("domconverter-unsafe-style-element-detected")}class Lt extends((0,m.Xu)()){constructor(e){super(),this._isEnabled=!1,this.view=e,this.document=e.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}var Zt=o("./node_modules/lodash-es/assignIn.js");class Wt{constructor(e,t,o){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,(0,Zt.Z)(this,o)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class $t extends Lt{constructor(){super(...arguments),this.useCapture=!1}observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((t=>{this.listenTo(e,t,((e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)}),{useCapture:this.useCapture})}))}stopObserving(e){this.stopListening(e)}fire(e,t,o){this.isEnabled&&this.document.fire(e,new Wt(this.view,t,o))}}class qt extends $t{constructor(){super(...arguments),this.domEventType=["keydown","keyup"]}onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return(0,m.Cq)(this)}};this.fire(e.type,e,t)}}var Ht=o("./node_modules/lodash-es/debounce.js");class Ut extends Lt{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=(0,Ht.Z)((e=>{this.document.fire("selectionChangeDone",e)}),200)}observe(){const e=this.document;e.on("arrowKey",((t,o)=>{e.selection.isFake&&this.isEnabled&&o.preventDefault()}),{context:"$capture"}),e.on("arrowKey",((t,o)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(o.keyCode)}),{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,o=new Ie(t.getRanges(),{backward:t.isBackward,fake:!1});e!=m.Do.arrowleft&&e!=m.Do.arrowup||o.setTo(o.getFirstPosition()),e!=m.Do.arrowright&&e!=m.Do.arrowdown||o.setTo(o.getLastPosition());const i={oldSelection:t,newSelection:o,domSelection:null};this.document.fire("selectionChange",i),this._fireSelectionChangeDoneDebounced(i)}}const Kt=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const Gt=function(e){return this.__data__.has(e)};function Jt(e){var t=-1,o=null==e?0:e.length;for(this.__data__=new j.Z;++t<o;)this.add(e[t])}Jt.prototype.add=Jt.prototype.push=Kt,Jt.prototype.has=Gt;const Yt=Jt;const Xt=function(e,t){for(var o=-1,i=null==e?0:e.length;++o<i;)if(t(e[o],o,e))return!0;return!1};const Qt=function(e,t){return e.has(t)};const eo=function(e,t,o,i,s,n){var r=1&o,a=e.length,c=t.length;if(a!=c&&!(r&&c>a))return!1;var l=n.get(e),d=n.get(t);if(l&&d)return l==t&&d==e;var h=-1,u=!0,p=2&o?new Yt:void 0;for(n.set(e,t),n.set(t,e);++h<a;){var f=e[h],g=t[h];if(i)var m=r?i(g,f,h,t,e,n):i(f,g,h,e,t,n);if(void 0!==m){if(m)continue;u=!1;break}if(p){if(!Xt(t,(function(e,t){if(!Qt(p,t)&&(f===e||s(f,e,o,i,n)))return p.push(t)}))){u=!1;break}}else if(f!==g&&!s(f,g,o,i,n)){u=!1;break}}return n.delete(e),n.delete(t),u};var to=o("./node_modules/lodash-es/_Symbol.js"),oo=o("./node_modules/lodash-es/_Uint8Array.js");const io=function(e){var t=-1,o=Array(e.size);return e.forEach((function(e,i){o[++t]=[i,e]})),o};const so=function(e){var t=-1,o=Array(e.size);return e.forEach((function(e){o[++t]=e})),o};var no=to.Z?to.Z.prototype:void 0,ro=no?no.valueOf:void 0;const ao=function(e,t,o,i,s,n,r){switch(o){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!n(new oo.Z(e),new oo.Z(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,Y.Z)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=io;case"[object Set]":var c=1&i;if(a||(a=so),e.size!=t.size&&!c)return!1;var l=r.get(e);if(l)return l==t;i|=2,r.set(e,t);var d=eo(a(e),a(t),i,s,n,r);return r.delete(e),d;case"[object Symbol]":if(ro)return ro.call(e)==ro.call(t)}return!1};var co=o("./node_modules/lodash-es/_getAllKeys.js"),lo=Object.prototype.hasOwnProperty;const ho=function(e,t,o,i,s,n){var r=1&o,a=(0,co.Z)(e),c=a.length;if(c!=(0,co.Z)(t).length&&!r)return!1;for(var l=c;l--;){var d=a[l];if(!(r?d in t:lo.call(t,d)))return!1}var h=n.get(e),u=n.get(t);if(h&&u)return h==t&&u==e;var p=!0;n.set(e,t),n.set(t,e);for(var f=r;++l<c;){var g=e[d=a[l]],m=t[d];if(i)var b=r?i(m,g,d,t,e,n):i(g,m,d,e,t,n);if(!(void 0===b?g===m||s(g,m,o,i,n):b)){p=!1;break}f||(f="constructor"==d)}if(p&&!f){var _=e.constructor,w=t.constructor;_==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w||(p=!1)}return n.delete(e),n.delete(t),p};var uo=o("./node_modules/lodash-es/_getTag.js"),po="[object Arguments]",fo="[object Array]",go="[object Object]",mo=Object.prototype.hasOwnProperty;const bo=function(e,t,o,i,s,n){var r=(0,C.Z)(e),a=(0,C.Z)(t),c=r?fo:(0,uo.Z)(e),l=a?fo:(0,uo.Z)(t),d=(c=c==po?go:c)==go,h=(l=l==po?go:l)==go,u=c==l;if(u&&(0,ce.Z)(e)){if(!(0,ce.Z)(t))return!1;r=!0,d=!1}if(u&&!d)return n||(n=new G.Z),r||(0,de.Z)(e)?eo(e,t,o,i,s,n):ao(e,t,c,o,i,s,n);if(!(1&o)){var p=d&&mo.call(e,"__wrapped__"),f=h&&mo.call(t,"__wrapped__");if(p||f){var g=p?e.value():e,m=f?t.value():t;return n||(n=new G.Z),s(g,m,o,i,n)}}return!!u&&(n||(n=new G.Z),ho(e,t,o,i,s,n))};const _o=function e(t,o,i,s,n){return t===o||(null==t||null==o||!(0,re.Z)(t)&&!(0,re.Z)(o)?t!=t&&o!=o:bo(t,o,i,s,e,n))};const wo=function(e,t,o){var i=(o="function"==typeof o?o:void 0)?o(e,t):void 0;return void 0===i?_o(e,t,void 0,o):!!i};class ko extends Lt{constructor(e){super(e),this._config={childList:!0,characterData:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e._renderer,this._domElements=new Set,this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.add(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}stopObserving(e){if(this._domElements.delete(e),this.isEnabled){this._mutationObserver.disconnect();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(0===e.length)return;const t=this.domConverter,o=new Set,i=new Set;for(const o of e){const e=t.mapDomToView(o.target);e&&(e.is("uiElement")||e.is("rawElement")||"childList"!==o.type||this._isBogusBrMutation(o)||i.add(e))}for(const s of e){const e=t.mapDomToView(s.target);if((!e||!e.is("uiElement")&&!e.is("rawElement"))&&"characterData"===s.type){const e=t.findCorrespondingViewText(s.target);e&&!i.has(e.parent)?o.add(e):!e&&kt(s.target)&&i.add(t.mapDomToView(s.target.parentNode))}}let s=!1;for(const e of o)s=!0,this.renderer.markToSync("text",e);for(const e of i){const o=t.mapViewToDom(e),i=Array.from(e.getChildren()),n=Array.from(t.domChildrenToView(o,{withChildren:!1}));wo(i,n,vo)||(s=!0,this.renderer.markToSync("children",e))}s&&this.view.forceRender()}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is("element","br")}}function vo(e,t){if(!Array.isArray(e))return e===t||!(!e.is("$text")||!t.is("$text"))&&e.data===t.data}class yo extends $t{constructor(e){super(e),this._isFocusChanging=!1,this.domEventType=["focus","blur"],this.useCapture=!0;const t=this.document;t.on("focus",(()=>{this._isFocusChanging=!0,this._renderTimeoutId=setTimeout((()=>{this.flush(),e.change((()=>{}))}),50)})),t.on("blur",((o,i)=>{const s=t.selection.editableElement;null!==s&&s!==i.target||(t.isFocused=!1,this._isFocusChanging=!1,e.change((()=>{})))}))}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class xo extends Lt{constructor(e){super(e),this.mutationObserver=e.getObserver(ko),this.focusObserver=e.getObserver(yo),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=(0,Ht.Z)((e=>{this.document.fire("selectionChangeDone",e)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=(0,Ht.Z)((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,o=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(e,"keydown",o,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",o,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",o,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",((e,o)=>{this.document.isComposing&&!m.OB.isAndroid||(this._handleSelectionChange(o,t),this._documentIsSelectingInactivityTimeoutDebounced())})),this._documents.add(t))}stopObserving(e){this.stopListening(e)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(e,t){if(!this.isEnabled)return;const o=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(o.anchorNode))return;this.mutationObserver.flush();const i=this.domConverter.domSelectionToView(o);if(0!=i.rangeCount){if(this.view.hasDomSelection=!0,!this.selection.isEqual(i)||!this.domConverter.isDomSelectionCorrect(o))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.focusObserver.flush(),this.selection.isSimilar(i))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:i,domSelection:o};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class Po extends $t{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",(()=>{t.isComposing=!0}),{priority:"low"}),t.on("compositionend",(()=>{t.isComposing=!1}),{priority:"low"})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}class Eo{constructor(e,t={}){this._files=t.cacheFiles?To(e):null,this._native=e}get files(){return this._files||(this._files=To(this._native)),this._files}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}setDragImage(e,t,o){this._native.setDragImage(e,t,o)}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}function To(e){const t=Array.from(e.files||[]),o=Array.from(e.items||[]);return t.length?t:o.filter((e=>"file"===e.kind)).map((e=>e.getAsFile()))}class Ao extends $t{constructor(){super(...arguments),this.domEventType="beforeinput"}onDomEvent(e){const t=e.getTargetRanges(),o=this.view,i=o.document;let s=null,n=null,r=[];if(e.dataTransfer&&(s=new Eo(e.dataTransfer)),null!==e.data?n=e.data:s&&(n=s.getData("text/plain")),i.selection.isFake)r=Array.from(i.selection.getRanges());else if(t.length)r=t.map((e=>o.domConverter.domRangeToView(e)));else if(m.OB.isAndroid){const t=e.target.ownerDocument.defaultView.getSelection();r=Array.from(o.domConverter.domSelectionToView(t).getRanges())}if(m.OB.isAndroid&&"insertCompositionText"==e.inputType&&n&&n.endsWith("\n"))this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[o.createRange(r[0].end)]});else if("insertText"==e.inputType&&n&&n.includes("\n")){const t=n.split(/\n{1,2}/g);let o=r;for(let n=0;n<t.length;n++){const r=t[n];""!=r&&(this.fire(e.type,e,{data:r,dataTransfer:s,targetRanges:o,inputType:e.inputType,isComposing:e.isComposing}),o=[i.selection.getFirstRange()]),n+1<t.length&&(this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:o}),o=[i.selection.getFirstRange()])}}else this.fire(e.type,e,{data:n,dataTransfer:s,targetRanges:r,inputType:e.inputType,isComposing:e.isComposing})}}class Co extends Lt{constructor(e){super(e),this.document.on("keydown",((e,t)=>{if(this.isEnabled&&(0,m.dj)(t.keyCode)){const o=new ze(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(o,t),o.stop.called&&e.stop()}}))}observe(){}stopObserving(){}}class So extends Lt{constructor(e){super(e);const t=this.document;t.on("keydown",((e,o)=>{if(!this.isEnabled||o.keyCode!=m.Do.tab||o.ctrlKey)return;const i=new ze(t,"tab",t.selection.getFirstRange());t.fire(i,o),i.stop.called&&e.stop()}))}observe(){}stopObserving(){}}class Oo extends((0,m.Re)()){constructor(e){super(),this.domRoots=new Map,this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this.document=new He(e),this.domConverter=new It(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new Tt(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new st(this.document),this.addObserver(ko),this.addObserver(yo),this.addObserver(xo),this.addObserver(qt),this.addObserver(Ut),this.addObserver(Po),this.addObserver(Co),this.addObserver(Ao),this.addObserver(So),this.document.on("arrowKey",xt,{priority:"low"}),Qe(this),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0}))}attachDomRoot(e,t="main"){const o=this.document.getRoot(t);o._name=e.tagName.toLowerCase();const i={};for(const{name:t,value:s}of Array.from(e.attributes))i[t]=s,"class"===t?this._writer.addClass(s.split(" "),o):this._writer.setAttribute(t,s,o);this._initialDomRootAttributes.set(e,i);const s=()=>{this._writer.setAttribute("contenteditable",(!o.isReadOnly).toString(),o),o.isReadOnly?this._writer.addClass("ck-read-only",o):this._writer.removeClass("ck-read-only",o)};s(),this.domRoots.set(t,e),this.domConverter.bindElements(e,o),this._renderer.markToSync("children",o),this._renderer.markToSync("attributes",o),this._renderer.domDocuments.add(e.ownerDocument),o.on("change:children",((e,t)=>this._renderer.markToSync("children",t))),o.on("change:attributes",((e,t)=>this._renderer.markToSync("attributes",t))),o.on("change:text",((e,t)=>this._renderer.markToSync("text",t))),o.on("change:isReadOnly",(()=>this.change(s))),o.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const o of this._observers.values())o.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach((({name:e})=>t.removeAttribute(e)));const o=this._initialDomRootAttributes.get(t);for(const e in o)t.setAttribute(e,o[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t);for(const e of this._observers.values())e.stopObserving(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,o]of this.domRoots)t.observe(o,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection({alignToTop:e,forceScroll:t,viewportOffset:o=20,ancestorOffset:i=20}={}){const s=this.document.selection.getFirstRange();s&&(0,m.mR)({target:this.domConverter.viewRangeToDom(s),viewportOffset:o,ancestorOffset:i,alignToTop:e,forceScroll:t})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new m.Bb("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){m.Bb.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(yo).flush(),this.change((()=>{}))}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return Be._createAt(e,t)}createPositionAfter(e){return Be._createAfter(e)}createPositionBefore(e){return Be._createBefore(e)}createRange(e,t){return new De(e,t)}createRangeOn(e){return De._createOn(e)}createRangeIn(e){return De._createIn(e)}createSelection(...e){return new Ie(...e)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class Ro{is(){throw new Error("is() method is abstract")}}class Mo extends Ro{constructor(e){super(),this.parent=null,this._attrs=(0,m.qL)(e)}get document(){return null}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new m.Bb("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new m.Bb("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return null!==this.parent&&this.root.isAttached()}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}getCommonAncestor(e,t={}){const o=this.getAncestors(t),i=e.getAncestors(t);let s=0;for(;o[s]==i[s]&&o[s];)s++;return 0===s?null:o[s-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),o=e.getPath(),i=(0,m.Rt)(t,o);switch(i){case"prefix":return!0;case"extension":return!1;default:return t[i]<o[i]}}isAfter(e){return this!=e&&(this.root===e.root&&!this.isBefore(e))}hasAttribute(e){return this._attrs.has(e)}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const e={};return this._attrs.size&&(e.attributes=Array.from(this._attrs).reduce(((e,t)=>(e[t[0]]=t[1],e)),{})),e}_clone(e){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=(0,m.qL)(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}Mo.prototype.is=function(e){return"node"===e||"model:node"===e};class jo{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((e,t)=>e+t.offsetSize),0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce(((e,t)=>e+t.offsetSize),0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new m.Bb("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const o of this._nodes){if(e>=t&&e<t+o.offsetSize)return this.getNodeIndex(o);t+=o.offsetSize}if(t!=e)throw new m.Bb("model-nodelist-offset-out-of-bounds",this,{offset:e,nodeList:this});return this.length}_insertNodes(e,t){for(const e of t)if(!(e instanceof Mo))throw new m.Bb("model-nodelist-insertnodes-not-node",this);this._nodes=(0,m.x)(this._nodes,Array.from(t),e,0)}_removeNodes(e,t=1){return this._nodes.splice(e,t)}toJSON(){return this._nodes.map((e=>e.toJSON()))}}class Bo extends Mo{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new Bo(this.data,this.getAttributes())}static fromJSON(e){return new Bo(e.data,e.attributes)}}Bo.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e};class Do extends Ro{constructor(e,t,o){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new m.Bb("model-textproxy-wrong-offsetintext",this);if(o<0||t+o>e.offsetSize)throw new m.Bb("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+o),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}Do.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e};class Vo extends Mo{constructor(e,t,o){super(t),this._children=new jo,this.name=e,o&&this._insertChild(0,o)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const o of e)t=t.getChild(t.offsetToIndex(o));return t}findAncestor(e,t={}){let o=t.includeSelf?this:this.parent;for(;o;){if(o.name===e)return o;o=o.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map((e=>e._clone(!0))):void 0;return new Vo(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const o=function(e){if("string"==typeof e)return[new Bo(e)];(0,m.TW)(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Bo(e):e instanceof Do?new Bo(e.data,e.getAttributes()):e))}(t);for(const e of o)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,o)}_removeChildren(e,t=1){const o=this._children._removeNodes(e,t);for(const e of o)e.parent=null;return o}static fromJSON(e){let t;if(e.children){t=[];for(const o of e.children)o.name?t.push(Vo.fromJSON(o)):t.push(Bo.fromJSON(o))}return new Vo(e.name,e.attributes,t)}}Vo.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e};class Io{constructor(e){if(!e||!e.boundaries&&!e.startPosition)throw new m.Bb("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new m.Bb("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this._position=e.startPosition.clone():this._position=zo._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,o,i,s;do{i=this.position,s=this._visitedParent,({done:t,value:o}=this.next())}while(!t&&e(o));t||(this._position=i,this._visitedParent=s)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),o=this._visitedParent;if(null===o.parent&&t.offset===o.maxOffset)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const i=Fo(t,o),s=i||Lo(t,o,i);if(s instanceof Vo)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=s),this._position=t,No("elementStart",s,e,t,1);if(s instanceof Bo){let i;if(this.singleCharacters)i=1;else{let e=s.endOffset;this._boundaryEndParent==o&&this.boundaries.end.offset<e&&(e=this.boundaries.end.offset),i=e-t.offset}const n=t.offset-s.startOffset,r=new Do(s,n,i);return t.offset+=i,this._position=t,No("text",r,e,t,i)}return t.path.pop(),t.offset++,this._position=t,this._visitedParent=o.parent,this.ignoreElementEnd?this._next():No("elementEnd",o,e,t)}_previous(){const e=this.position,t=this.position.clone(),o=this._visitedParent;if(null===o.parent&&0===t.offset)return{done:!0,value:void 0};if(o==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0,value:void 0};const i=t.parent,s=Fo(t,i),n=s||Zo(t,i,s);if(n instanceof Vo)return t.offset--,this.shallow?(this._position=t,No("elementStart",n,e,t,1)):(t.path.push(n.maxOffset),this._position=t,this._visitedParent=n,this.ignoreElementEnd?this._previous():No("elementEnd",n,e,t));if(n instanceof Bo){let i;if(this.singleCharacters)i=1;else{let e=n.startOffset;this._boundaryStartParent==o&&this.boundaries.start.offset>e&&(e=this.boundaries.start.offset),i=t.offset-e}const s=t.offset-n.startOffset,r=new Do(n,s-i,i);return t.offset-=i,this._position=t,No("text",r,e,t,i)}return t.path.pop(),this._position=t,this._visitedParent=o.parent,No("elementStart",o,e,t,1)}}function No(e,t,o,i,s){return{done:!1,value:{type:e,item:t,previousPosition:o,nextPosition:i,length:s}}}class zo extends Ro{constructor(e,t,o="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new m.Bb("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new m.Bb("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=o}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t<this.path.length-1;t++)if(e=e.getChild(e.offsetToIndex(this.path[t])),!e)throw new m.Bb("model-position-path-incorrect",this,{position:this});if(e.is("$text"))throw new m.Bb("model-position-path-incorrect",this,{position:this});return e}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){return Fo(this,this.parent)}get nodeAfter(){const e=this.parent;return Lo(this,e,Fo(this,e))}get nodeBefore(){const e=this.parent;return Zo(this,e,Fo(this,e))}get isAtStart(){return 0===this.offset}get isAtEnd(){return this.offset==this.parent.maxOffset}compareWith(e){if(this.root!=e.root)return"different";const t=(0,m.Rt)(this.path,e.path);switch(t){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[t]<e.path[t]?"before":"after"}}getLastMatchingPosition(e,t={}){t.startPosition=this;const o=new Io(t);return o.skip(e),o.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){const e=this.parent;return e.is("documentFragment")?[e]:e.getAncestors({includeSelf:!0})}findAncestor(e){const t=this.parent;return t.is("element")?t.findAncestor(e,{includeSelf:!0}):null}getCommonPath(e){if(this.root!=e.root)return[];const t=(0,m.Rt)(this.path,e.path),o="string"==typeof t?Math.min(this.path.length,e.path.length):t;return this.path.slice(0,o)}getCommonAncestor(e){const t=this.getAncestors(),o=e.getAncestors();let i=0;for(;t[i]==o[i]&&t[i];)i++;return 0===i?null:t[i-1]}getShiftedBy(e){const t=this.clone(),o=t.offset+e;return t.offset=o<0?0:o,t}isAfter(e){return"after"==this.compareWith(e)}isBefore(e){return"before"==this.compareWith(e)}isEqual(e){return"same"==this.compareWith(e)}isTouching(e){if(this.root!==e.root)return!1;const t=Math.min(this.path.length,e.path.length);for(let o=0;o<t;o++){const t=this.path[o]-e.path[o];if(t<-1||t>1)return!1;if(1===t)return Wo(e,this,o);if(-1===t)return Wo(this,e,o)}return this.path.length===e.path.length||(this.path.length>e.path.length?$o(this.path,t):$o(e.path,t))}hasSameParentAs(e){if(this.root!==e.root)return!1;const t=this.getParentPath(),o=e.getParentPath();return"same"==(0,m.Rt)(t,o)}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=zo._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let o;return t.containsPosition(this)||t.start.isEqual(this)?(o=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(o=o._getTransformedByDeletion(e.deletionPosition,1))):o=this.isEqual(e.deletionPosition)?zo._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),o}_getTransformedByDeletion(e,t){const o=zo._createAt(this);if(this.root!=e.root)return o;if("same"==(0,m.Rt)(e.getParentPath(),this.getParentPath())){if(e.offset<this.offset){if(e.offset+t>this.offset)return null;o.offset-=t}}else if("prefix"==(0,m.Rt)(e.getParentPath(),this.getParentPath())){const i=e.path.length-1;if(e.offset<=this.path[i]){if(e.offset+t>this.path[i])return null;o.path[i]-=t}}return o}_getTransformedByInsertion(e,t){const o=zo._createAt(this);if(this.root!=e.root)return o;if("same"==(0,m.Rt)(e.getParentPath(),this.getParentPath()))(e.offset<this.offset||e.offset==this.offset&&"toPrevious"!=this.stickiness)&&(o.offset+=t);else if("prefix"==(0,m.Rt)(e.getParentPath(),this.getParentPath())){const i=e.path.length-1;e.offset<=this.path[i]&&(o.path[i]+=t)}return o}_getTransformedByMove(e,t,o){if(t=t._getTransformedByDeletion(e,o),e.isEqual(t))return zo._createAt(this);const i=this._getTransformedByDeletion(e,o);return null===i||e.isEqual(this)&&"toNext"==this.stickiness||e.getShiftedBy(o).isEqual(this)&&"toPrevious"==this.stickiness?this._getCombined(e,t):i._getTransformedByInsertion(t,o)}_getCombined(e,t){const o=e.path.length-1,i=zo._createAt(t);return i.stickiness=this.stickiness,i.offset=i.offset+this.path[o]-e.offset,i.path=[...i.path,...this.path.slice(o+1)],i}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(e,t,o="toNone"){if(e instanceof zo)return new zo(e.root,e.path,e.stickiness);{const i=e;if("end"==t)t=i.maxOffset;else{if("before"==t)return this._createBefore(i,o);if("after"==t)return this._createAfter(i,o);if(0!==t&&!t)throw new m.Bb("model-createpositionat-offset-required",[this,e])}if(!i.is("element")&&!i.is("documentFragment"))throw new m.Bb("model-position-parent-incorrect",[this,e]);const s=i.getPath();return s.push(t),new this(i.root,s,o)}}static _createAfter(e,t){if(!e.parent)throw new m.Bb("model-position-after-root",[this,e],{root:e});return this._createAt(e.parent,e.endOffset,t)}static _createBefore(e,t){if(!e.parent)throw new m.Bb("model-position-before-root",e,{root:e});return this._createAt(e.parent,e.startOffset,t)}static fromJSON(e,t){if("$graveyard"===e.root){const o=new zo(t.graveyard,e.path);return o.stickiness=e.stickiness,o}if(!t.getRoot(e.root))throw new m.Bb("model-position-fromjson-no-root",t,{rootName:e.root});return new zo(t.getRoot(e.root),e.path,e.stickiness)}}function Fo(e,t){const o=t.getChild(t.offsetToIndex(e.offset));return o&&o.is("$text")&&o.startOffset<e.offset?o:null}function Lo(e,t,o){return null!==o?null:t.getChild(t.offsetToIndex(e.offset))}function Zo(e,t,o){return null!==o?null:t.getChild(t.offsetToIndex(e.offset)-1)}function Wo(e,t,o){return o+1!==e.path.length&&(!!$o(t.path,o+1)&&!!function(e,t){let o=e.parent,i=e.path.length-1,s=0;for(;i>=t;){if(e.path[i]+s!==o.maxOffset)return!1;s=1,i--,o=o.parent}return!0}(e,o+1))}function $o(e,t){for(;t<e.length;){if(0!==e[t])return!1;t++}return!0}zo.prototype.is=function(e){return"position"===e||"model:position"===e};class qo extends Ro{constructor(e,t){super(),this.start=zo._createAt(e),this.end=t?zo._createAt(t):zo._createAt(e),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new Io({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){const e=this.start.getParentPath(),t=this.end.getParentPath();return"same"==(0,m.Rt)(e,t)}get root(){return this.start.root}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const o=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),i=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return o&&i}containsItem(e){const t=zo._createBefore(e);return this.containsPosition(t)||this.start.isEqual(t)}isEqual(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new qo(this.start,e.start)),this.containsPosition(e.end)&&t.push(new qo(e.end,this.end))):t.push(new qo(this.start,this.end)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,o=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(o=e.end),new qo(t,o)}return null}getJoined(e,t=!1){let o=this.isIntersecting(e);if(o||(o=this.start.isBefore(e.start)?t?this.end.isTouching(e.start):this.end.isEqual(e.start):t?e.end.isTouching(this.start):e.end.isEqual(this.start)),!o)return null;let i=this.start,s=this.end;return e.start.isBefore(i)&&(i=e.start),e.end.isAfter(s)&&(s=e.end),new qo(i,s)}getMinimalFlatRanges(){const e=[],t=this.start.getCommonPath(this.end).length,o=zo._createAt(this.start);let i=o.parent;for(;o.path.length>t+1;){const t=i.maxOffset-o.offset;0!==t&&e.push(new qo(o,o.getShiftedBy(t))),o.path=o.path.slice(0,-1),o.offset++,i=i.parent}for(;o.path.length<=this.end.path.length;){const t=this.end.path[o.path.length-1],i=t-o.offset;0!==i&&e.push(new qo(o,o.getShiftedBy(i))),o.offset=t,o.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new Io(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new Io(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new Io(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new qo(this.start,this.end)]}getTransformedByOperations(e){const t=[new qo(this.start,this.end)];for(const o of e)for(let e=0;e<t.length;e++){const i=t[e].getTransformedByOperation(o);t.splice(e,1,...i),e+=i.length-1}for(let e=0;e<t.length;e++){const o=t[e];for(let i=e+1;i<t.length;i++){const e=t[i];(o.containsRange(e)||e.containsRange(o)||o.isEqual(e))&&t.splice(i,1)}}return t}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;const e=this.start.nodeAfter,t=this.end.nodeBefore;return e&&e.is("element")&&e===t?e:null}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(e,t=!1){return this._getTransformedByInsertion(e.position,e.howMany,t)}_getTransformedByMoveOperation(e,t=!1){const o=e.sourcePosition,i=e.howMany,s=e.targetPosition;return this._getTransformedByMove(o,s,i,t)}_getTransformedBySplitOperation(e){const t=this.start._getTransformedBySplitOperation(e);let o=this.end._getTransformedBySplitOperation(e);return this.end.isEqual(e.insertionPosition)&&(o=this.end.getShiftedBy(1)),t.root!=o.root&&(o=this.end.getShiftedBy(-1)),new qo(t,o)}_getTransformedByMergeOperation(e){if(this.start.isEqual(e.targetPosition)&&this.end.isEqual(e.deletionPosition))return new qo(this.start);let t=this.start._getTransformedByMergeOperation(e),o=this.end._getTransformedByMergeOperation(e);return t.root!=o.root&&(o=this.end.getShiftedBy(-1)),t.isAfter(o)?(e.sourcePosition.isBefore(e.targetPosition)?(t=zo._createAt(o),t.offset=0):(e.deletionPosition.isEqual(t)||(o=e.deletionPosition),t=e.targetPosition),new qo(t,o)):new qo(t,o)}_getTransformedByInsertion(e,t,o=!1){if(o&&this.containsPosition(e))return[new qo(this.start,e),new qo(e.getShiftedBy(t),this.end._getTransformedByInsertion(e,t))];{const o=new qo(this.start,this.end);return o.start=o.start._getTransformedByInsertion(e,t),o.end=o.end._getTransformedByInsertion(e,t),[o]}}_getTransformedByMove(e,t,o,i=!1){if(this.isCollapsed){const i=this.start._getTransformedByMove(e,t,o);return[new qo(i)]}const s=qo._createFromPositionAndShift(e,o),n=t._getTransformedByDeletion(e,o);if(this.containsPosition(t)&&!i&&(s.containsPosition(this.start)||s.containsPosition(this.end))){const i=this.start._getTransformedByMove(e,t,o),s=this.end._getTransformedByMove(e,t,o);return[new qo(i,s)]}let r;const a=this.getDifference(s);let c=null;const l=this.getIntersection(s);if(1==a.length?c=new qo(a[0].start._getTransformedByDeletion(e,o),a[0].end._getTransformedByDeletion(e,o)):2==a.length&&(c=new qo(this.start,this.end._getTransformedByDeletion(e,o))),r=c?c._getTransformedByInsertion(n,o,null!==l||i):[],l){const e=new qo(l.start._getCombined(s.start,n),l.end._getCombined(s.start,n));2==r.length?r.splice(1,0,e):r.push(e)}return r}_getTransformedByDeletion(e,t){let o=this.start._getTransformedByDeletion(e,t),i=this.end._getTransformedByDeletion(e,t);return null==o&&null==i?null:(null==o&&(o=e),null==i&&(i=e),new qo(o,i))}static _createFromPositionAndShift(e,t){const o=e,i=e.getShiftedBy(t);return t>0?new this(o,i):new this(i,o)}static _createIn(e){return new this(zo._createAt(e,0),zo._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(zo._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new m.Bb("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort(((e,t)=>e.start.isAfter(t.start)?1:-1));const o=e.indexOf(t),i=new this(t.start,t.end);if(o>0)for(let t=o-1;e[t].end.isEqual(i.start);t++)i.start=zo._createAt(e[t].start);for(let t=o+1;t<e.length&&e[t].start.isEqual(i.end);t++)i.end=zo._createAt(e[t].end);return i}static fromJSON(e,t){return new this(zo.fromJSON(e.start,t),zo.fromJSON(e.end,t))}}qo.prototype.is=function(e){return"range"===e||"model:range"===e};class Ho extends((0,m.ln)()){constructor(){super(),this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._deferredBindingRemovals=new Map,this._unboundMarkerNames=new Set,this.on("modelToViewPosition",((e,t)=>{if(t.viewPosition)return;const o=this._modelToViewMapping.get(t.modelPosition.parent);if(!o)throw new m.Bb("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(o,t.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((e,t)=>{if(t.modelPosition)return;const o=this.findMappedViewAncestor(t.viewPosition),i=this._viewToModelMapping.get(o),s=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,o);t.modelPosition=zo._createAt(i,s)}),{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const o=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(o)==e&&this._modelToViewMapping.delete(o))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const o=this._markerNameToElements.get(t)||new Set;o.add(e);const i=this._elementToMarkerNames.get(e)||new Set;i.add(t),this._markerNameToElements.set(t,o),this._elementToMarkerNames.set(e,i)}unbindElementFromMarkerName(e,t){const o=this._markerNameToElements.get(t);o&&(o.delete(e),0==o.size&&this._markerNameToElements.delete(t));const i=this._elementToMarkerNames.get(e);i&&(i.delete(t),0==i.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new qo(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new De(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={}){const o={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",o),o.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const o=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())o.add(t);else o.add(e);return o}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,o){if(o!=e){return this._toModelOffset(e.parent,e.index,o)+this._toModelOffset(e,t,e)}if(e.is("$text"))return t;let i=0;for(let o=0;o<t;o++)i+=this.getModelLength(e.getChild(o));return i}getModelLength(e){if(this._viewToModelLengthCallbacks.get(e.name)){return this._viewToModelLengthCallbacks.get(e.name)(e)}if(this._viewToModelMapping.has(e))return 1;if(e.is("$text"))return e.data.length;if(e.is("uiElement"))return 0;{let t=0;for(const o of e.getChildren())t+=this.getModelLength(o);return t}}findPositionIn(e,t){let o,i=0,s=0,n=0;if(e.is("$text"))return new Be(e,t);for(;s<t;)o=e.getChild(n),i=this.getModelLength(o),s+=i,n++;return s==t?this._moveViewPositionToTextNode(new Be(e,n)):this.findPositionIn(o,t-(s-i))}_moveViewPositionToTextNode(e){const t=e.nodeBefore,o=e.nodeAfter;return t instanceof v?new Be(t,t.data.length):o instanceof v?new Be(o,0):e}}class Uo{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(e,t){t=Ko(t),e instanceof Do&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(t,!0)}consume(e,t){return t=Ko(t),e instanceof Do&&(e=this._getSymbolForTextProxy(e)),!!this.test(e,t)&&(this._consumable.get(e).set(t,!1),!0)}test(e,t){t=Ko(t),e instanceof Do&&(e=this._getSymbolForTextProxy(e));const o=this._consumable.get(e);if(void 0===o)return null;const i=o.get(t);return void 0===i?null:i}revert(e,t){t=Ko(t),e instanceof Do&&(e=this._getSymbolForTextProxy(e));const o=this.test(e,t);return!1===o?(this._consumable.get(e).set(t,!0),!0):!0!==o&&null}verifyAllConsumed(e){const t=[];for(const[o,i]of this._consumable)for(const[s,n]of i){const i=s.split(":")[0];n&&e==i&&t.push({event:s,item:o.name||o.description})}if(t.length)throw new m.Bb("conversion-model-consumable-not-consumed",null,{items:t})}_getSymbolForTextProxy(e){let t=null;const o=this._textProxyRegistry.get(e.startOffset);if(o){const i=o.get(e.endOffset);i&&(t=i.get(e.parent))}return t||(t=this._addSymbolForTextProxy(e)),t}_addSymbolForTextProxy(e){const t=e.startOffset,o=e.endOffset,i=e.parent,s=Symbol("$textProxy:"+e.data);let n,r;return n=this._textProxyRegistry.get(t),n||(n=new Map,this._textProxyRegistry.set(t,n)),r=n.get(o),r||(r=new Map,n.set(o,r)),r.set(i,s),s}}function Ko(e){const t=e.split(":");return"insert"==t[0]?t[0]:"addMarker"==t[0]||"removeMarker"==t[0]?e:t.length>1?t[0]+":"+t[1]:t[0]}var Go=Object.defineProperty,Jo=Object.defineProperties,Yo=Object.getOwnPropertyDescriptors,Xo=Object.getOwnPropertySymbols,Qo=Object.prototype.hasOwnProperty,ei=Object.prototype.propertyIsEnumerable,ti=(e,t,o)=>t in e?Go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,oi=(e,t)=>{for(var o in t||(t={}))Qo.call(t,o)&&ti(e,o,t[o]);if(Xo)for(var o of Xo(t))ei.call(t,o)&&ti(e,o,t[o]);return e},ii=(e,t)=>Jo(e,Yo(t));class si extends((0,m.ln)()){constructor(e){super(),this._conversionApi=oi({dispatcher:this},e),this._firedEventsMap=new WeakMap}convertChanges(e,t,o){const i=this._createConversionApi(o,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,i);const s=this._reduceChanges(e.getChanges());for(const e of s)"insert"===e.type?this._convertInsert(qo._createFromPositionAndShift(e.position,e.length),i):"reinsert"===e.type?this._convertReinsert(qo._createFromPositionAndShift(e.position,e.length),i):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,i):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,i);for(const e of i.mapper.flushUnboundMarkerNames()){const o=t.get(e).getRange();this._convertMarkerRemove(e,o,i),this._convertMarkerAdd(e,o,i)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,i);i.mapper.flushDeferredBindings(),i.consumable.verifyAllConsumed("insert")}convert(e,t,o,i={}){const s=this._createConversionApi(o,void 0,i);this._convertInsert(e,s);for(const[e,o]of t)this._convertMarkerAdd(e,o,s);s.consumable.verifyAllConsumed("insert")}convertSelection(e,t,o){const i=Array.from(t.getMarkersAtPosition(e.getFirstPosition())),s=this._createConversionApi(o);if(this._addConsumablesForSelection(s.consumable,e,i),this.fire("selection",{selection:e},s),e.isCollapsed){for(const t of i){const o=t.getRange();if(!ni(e.getFirstPosition(),t,s.mapper))continue;const i={item:e,markerName:t.name,markerRange:o};s.consumable.test(e,"addMarker:"+t.name)&&this.fire(`addMarker:${t.name}`,i,s)}for(const t of e.getAttributeKeys()){const o={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};s.consumable.test(e,"attribute:"+o.attributeKey)&&this.fire(`attribute:${o.attributeKey}:$text`,o,s)}}}_convertInsert(e,t,o={}){o.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,Array.from(e));for(const o of Array.from(e.getWalker({shallow:!0})).map(ri))this._testAndFire("insert",o,t)}_convertRemove(e,t,o,i){this.fire(`remove:${o}`,{position:e,length:t},i)}_convertAttribute(e,t,o,i,s){this._addConsumablesForRange(s.consumable,e,`attribute:${t}`);for(const n of e){const e={item:n.item,range:qo._createFromPositionAndShift(n.previousPosition,n.length),attributeKey:t,attributeOldValue:o,attributeNewValue:i};this._testAndFire(`attribute:${t}`,e,s)}}_convertReinsert(e,t){const o=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,o);for(const e of o.map(ri))this._testAndFire("insert",ii(oi({},e),{reconversion:!0}),t)}_convertMarkerAdd(e,t,o){if("$graveyard"==t.root.rootName)return;const i=`addMarker:${e}`;if(o.consumable.add(t,i),this.fire(i,{markerName:e,markerRange:t},o),o.consumable.consume(t,i)){this._addConsumablesForRange(o.consumable,t,i);for(const s of t.getItems()){if(!o.consumable.test(s,i))continue;const n={item:s,range:qo._createOn(s),markerName:e,markerRange:t};this.fire(i,n,o)}}}_convertMarkerRemove(e,t,o){"$graveyard"!=t.root.rootName&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},o)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const o of t){const t=o.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const o of t.getAttributeKeys())e.add(t,"attribute:"+o)}}return e}_addConsumablesForRange(e,t,o){for(const i of t.getItems())e.add(i,o);return e}_addConsumablesForSelection(e,t,o){e.add(t,"selection");for(const i of o)e.add(t,"addMarker:"+i.name);for(const o of t.getAttributeKeys())e.add(t,"attribute:"+o);return e}_testAndFire(e,t,o){const i=function(e,t){const o=t.item.is("element")?t.item.name:"$text";return`${e}:${o}`}(e,t),s=t.item.is("$textProxy")?o.consumable._getSymbolForTextProxy(t.item):t.item,n=this._firedEventsMap.get(o),r=n.get(s);if(r){if(r.has(i))return;r.add(i)}else n.set(s,new Set([i]));this.fire(i,t,o)}_testAndFireAddAttributes(e,t){const o={item:e,range:qo._createOn(e)};for(const e of o.item.getAttributeKeys())o.attributeKey=e,o.attributeOldValue=null,o.attributeNewValue=o.item.getAttribute(e),this._testAndFire(`attribute:${e}`,o,t)}_createConversionApi(e,t=new Set,o={}){const i=ii(oi({},this._conversionApi),{consumable:new Uo,writer:e,options:o,convertItem:e=>this._convertInsert(qo._createOn(e),i),convertChildren:e=>this._convertInsert(qo._createIn(e),i,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,i),canReuseView:e=>!t.has(i.mapper.toModelElement(e))});return this._firedEventsMap.set(i,new Map),i}}function ni(e,t,o){const i=t.getRange(),s=Array.from(e.getAncestors());s.shift(),s.reverse();return!s.some((e=>{if(i.containsItem(e)){return!!o.toViewElement(e).getCustomProperty("addHighlight")}}))}function ri(e){return{item:e.item,range:qo._createFromPositionAndShift(e.previousPosition,e.length)}}class ai extends((0,m.ln)(Ro)){constructor(...e){super(),this._lastRangeBackward=!1,this._attrs=new Map,this._ranges=[],e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let o=!1;for(const i of e._ranges)if(t.isEqual(i)){o=!0;break}if(!o)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new qo(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new qo(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new qo(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[t,o,i]=e;if("object"==typeof o&&(i=o,o=void 0),null===t)this._setRanges([]);else if(t instanceof ai)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof qo)this._setRanges([t],!!i&&!!i.backward);else if(t instanceof zo)this._setRanges([new qo(t)]);else if(t instanceof Mo){const e=!!i&&!!i.backward;let s;if("in"==o)s=qo._createIn(t);else if("on"==o)s=qo._createOn(t);else{if(void 0===o)throw new m.Bb("model-selection-setto-required-second-parameter",[this,t]);s=new qo(zo._createAt(t,o))}this._setRanges([s],e)}else{if(!(0,m.TW)(t))throw new m.Bb("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,i&&!!i.backward)}}_setRanges(e,t=!1){const o=Array.from(e),i=o.some((t=>{if(!(t instanceof qo))throw new m.Bb("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every((e=>!e.isEqual(t)))}));(o.length!==this._ranges.length||i)&&(this._replaceAllRanges(o),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new m.Bb("model-selection-setfocus-no-ranges",[this,e]);const o=zo._createAt(e,t);if("same"==o.compareWith(this.focus))return;const i=this.anchor;this._ranges.length&&this._popRange(),"before"==o.compareWith(i)?(this._pushRange(new qo(o,i)),this._lastRangeBackward=!0):(this._pushRange(new qo(i,o)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const o=di(t.start,e);ui(o,t)&&(yield o);for(const o of t.getWalker()){const i=o.item;"elementEnd"==o.type&&li(i,e,t)&&(yield i)}const i=di(t.end,e);pi(i,t)&&(yield i)}}containsEntireContent(e=this.anchor.root){const t=zo._createAt(e,0),o=zo._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&o.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new qo(e.start,e.end))}_checkRange(e){for(let t=0;t<this._ranges.length;t++)if(e.isIntersecting(this._ranges[t]))throw new m.Bb("model-selection-range-intersects",[this,e],{addedRange:e,intersectingRange:this._ranges[t]})}_replaceAllRanges(e){this._removeAllRanges();for(const t of e)this._pushRange(t)}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}function ci(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&!!e.parent)}function li(e,t,o){return ci(e,t)&&hi(e,o)}function di(e,t){const o=e.parent.root.document.model.schema,i=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let s=!1;const n=i.find((e=>!s&&(s=o.isLimit(e),!s&&ci(e,t))));return i.forEach((e=>t.add(e))),n}function hi(e,t){const o=function(e){const t=e.root.document.model.schema;let o=e.parent;for(;o;){if(t.isBlock(o))return o;o=o.parent}}(e);if(!o)return!0;return!t.containsRange(qo._createOn(o),!0)}function ui(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.start.isTouching(zo._createAt(e,e.maxOffset))&&hi(e,t))}function pi(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.end.isTouching(zo._createAt(e,0))&&hi(e,t))}ai.prototype.is=function(e){return"selection"===e||"model:selection"===e};class fi extends((0,m.ln)(qo)){constructor(e,t){super(e,t),gi.call(this)}detach(){this.stopListening()}toRange(){return new qo(this.start,this.end)}static fromRange(e){return new fi(e.start,e.end)}}function gi(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&mi.call(this,o)}),{priority:"low"})}function mi(e){const t=this.getTransformedByOperation(e),o=qo._createFromRanges(t),i=!o.isEqual(this),s=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let n=null;if(i){"$graveyard"==o.root.rootName&&(n="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=o.start,this.end=o.end,this.fire("change:range",t,{deletionPosition:n})}else s&&this.fire("change:content",this.toRange(),{deletionPosition:n})}fi.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e};const bi="selection:";class _i extends((0,m.ln)(Ro)){constructor(e){super(),this._selection=new wi(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return bi+e}static _isStoreAttributeKey(e){return e.startsWith(bi)}}_i.prototype.is=function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e};class wi extends ai{constructor(e){super(),this.markers=new m.FE({idProperty:"name"}),this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this._model=e.model,this._document=e,this.listenTo(this._model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&"marker"!=o.type&&"rename"!=o.type&&"noop"!=o.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((e,t,o,i)=>{this._updateMarker(t,i)})),this.listenTo(this._document,"change",((e,t)=>{!function(e,t){const o=e.document.differ;for(const i of o.getChanges()){if("insert"!=i.type)continue;const o=i.position.parent;i.length===o.maxOffset&&e.enqueueChange(t,(e=>{const t=Array.from(o.getAttributeKeys()).filter((e=>e.startsWith(bi)));for(const i of t)e.removeAttribute(i,o)}))}}(this._model,t)}))}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e<this._ranges.length;e++)this._ranges[e].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(...e){super.setTo(...e),this._updateAttributes(!0),this.updateMarkers()}setFocus(e,t){super.setFocus(e,t),this._updateAttributes(!0),this.updateMarkers()}setAttribute(e,t){if(this._setAttribute(e,t)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}removeAttribute(e){if(this._removeAttribute(e)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}overrideGravity(){const e=(0,m.hQ)();return this._overriddenGravityRegister.add(e),1===this._overriddenGravityRegister.size&&this._updateAttributes(!0),e}restoreGravity(e){if(!this._overriddenGravityRegister.has(e))throw new m.Bb("document-selection-gravity-wrong-restore",this,{uid:e});this._overriddenGravityRegister.delete(e),this.isGravityOverridden||this._updateAttributes(!0)}observeMarkers(e){this._observedMarkers.add(e),this.updateMarkers()}_replaceAllRanges(e){this._validateSelectionRanges(e),super._replaceAllRanges(e)}_popRange(){this._ranges.pop().detach()}_pushRange(e){const t=this._prepareRange(e);t&&this._ranges.push(t)}_validateSelectionRanges(e){for(const t of e)if(!this._document._validateSelectionRange(t))throw new m.Bb("document-selection-wrong-position",this,{range:t})}_prepareRange(e){if(this._checkRange(e),e.root==this._document.graveyard)return;const t=fi.fromRange(e);return t.on("change:range",((e,o,i)=>{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=i.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}})),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const o=t.name.split(":",1)[0];if(!this._observedMarkers.has(o))continue;const i=t.getRange();for(const o of this.getRanges())i.containsRange(o,!o.isCollapsed)&&e.push(t)}const o=Array.from(this.markers);for(const o of e)this.markers.has(o)||(this.markers.add(o),t=!0);for(const o of Array.from(this.markers))e.includes(o)||(this.markers.remove(o),t=!0);t&&this.fire("change:marker",{oldMarkers:o,directChange:!1})}_updateMarker(e,t){const o=e.name.split(":",1)[0];if(!this._observedMarkers.has(o))return;let i=!1;const s=Array.from(this.markers),n=this.markers.has(e);if(t){let o=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){o=!0;break}o&&!n?(this.markers.add(e),i=!0):!o&&n&&(this.markers.remove(e),i=!0)}else n&&(this.markers.remove(e),i=!0);i&&this.fire("change:marker",{oldMarkers:s,directChange:!1})}_updateAttributes(e){const t=(0,m.qL)(this._getSurroundingAttributes()),o=(0,m.qL)(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const i=[];for(const[e,t]of this.getAttributes())o.has(e)&&o.get(e)===t||i.push(e);for(const[e]of o)this.hasAttribute(e)||i.push(e);i.length>0&&this.fire("change:attribute",{attributeKeys:i,directChange:!1})}_setAttribute(e,t,o=!0){const i=o?"normal":"low";if("low"==i&&"normal"==this._attributePriority.get(e))return!1;return super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,i),!0)}_removeAttribute(e,t=!0){const o=t?"normal":"low";return("low"!=o||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,o),!!super.hasAttribute(e)&&(this._attrs.delete(e),!0))}_setAttributesTo(e){const t=new Set;for(const[t,o]of this.getAttributes())e.get(t)!==o&&this._removeAttribute(t,!1);for(const[o,i]of e){this._setAttribute(o,i,!1)&&t.add(o)}return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(bi)){const o=t.substr(10);yield[o,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;let o=null;if(this.isCollapsed){const i=e.textNode?e.textNode:e.nodeBefore,s=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(o=ki(i)),o||(o=ki(s)),!this.isGravityOverridden&&!o){let e=i;for(;e&&!t.isInline(e)&&!o;)e=e.previousSibling,o=ki(e)}if(!o){let e=s;for(;e&&!t.isInline(e)&&!o;)e=e.nextSibling,o=ki(e)}o||(o=this.getStoredAttributes())}else{const e=this.getFirstRange();for(const i of e){if(i.item.is("element")&&t.isObject(i.item))break;if("text"==i.type){o=i.item.getAttributes();break}}}return o}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function ki(e){return e instanceof Do||e instanceof Bo?e.getAttributes():null}class vi{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}const yi=function(e){return(0,_.Z)(e,5)};class xi extends vi{elementToElement(e){return this.add(function(e){const t=Ti(e.model),o=Ai(e.view,"container");t.attributes.length&&(t.children=!0);return i=>{i.on(`insert:${t.name}`,function(e,t=Di){return(o,i,s)=>{if(!t(i.item,s.consumable,{preflight:!0}))return;const n=e(i.item,s,i);if(!n)return;t(i.item,s.consumable);const r=s.mapper.toViewPosition(i.range.start);s.mapper.bindElements(i.item,n),s.writer.insert(r,n),s.convertAttributes(i.item),ji(n,i.item.getChildren(),s,{reconversion:i.reconversion})}}(o,Mi(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&i.on("reduceChanges",Ri(t),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){const t=Ti(e.model),o=Ai(e.view,"container");return t.children=!0,i=>{if(i._conversionApi.schema.checkChild(t.name,"$text"))throw new m.Bb("conversion-element-to-structure-disallowed-text",i,{elementName:t.name});var s,n;i.on(`insert:${t.name}`,(s=o,n=Mi(t),(e,t,o)=>{if(!n(t.item,o.consumable,{preflight:!0}))return;const i=new Map;o.writer._registerSlotFactory(function(e,t,o){return(i,s)=>{const n=i.createContainerElement("$slot");let r=null;if("children"===s)r=Array.from(e.getChildren());else{if("function"!=typeof s)throw new m.Bb("conversion-slot-mode-unknown",o.dispatcher,{modeOrFilter:s});r=Array.from(e.getChildren()).filter((e=>s(e)))}return t.set(n,r),n}}(t.item,i,o));const r=s(t.item,o,t);if(o.writer._clearSlotFactory(),!r)return;!function(e,t,o){const i=Array.from(t.values()).flat(),s=new Set(i);if(s.size!=i.length)throw new m.Bb("conversion-slot-filter-overlap",o.dispatcher,{element:e});if(s.size!=e.childCount)throw new m.Bb("conversion-slot-filter-incomplete",o.dispatcher,{element:e})}(t.item,i,o),n(t.item,o.consumable);const a=o.mapper.toViewPosition(t.range.start);o.mapper.bindElements(t.item,r),o.writer.insert(a,r),o.convertAttributes(t.item),function(e,t,o,i){o.mapper.on("modelToViewPosition",r,{priority:"highest"});let s=null,n=null;for([s,n]of t)ji(e,n,o,i),o.writer.move(o.writer.createRangeIn(s),o.writer.createPositionBefore(s)),o.writer.remove(s);function r(e,t){const o=t.modelPosition.nodeAfter,i=n.indexOf(o);i<0||(t.viewPosition=t.mapper.findPositionIn(s,i))}o.mapper.off("modelToViewPosition",r)}(r,i,o,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),i.on("reduceChanges",Ri(t),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){e=yi(e);let t=e.model;"string"==typeof t&&(t={key:t});let o=`attribute:${t.key}`;t.name&&(o+=":"+t.name);if(t.values)for(const o of t.values)e.view[o]=Ai(e.view[o],"attribute");else e.view=Ai(e.view,"attribute");const i=Ci(e);return t=>{t.on(o,function(e){return(t,o,i)=>{if(!i.consumable.test(o.item,t.name))return;const s=e(o.attributeOldValue,i,o),n=e(o.attributeNewValue,i,o);if(!s&&!n)return;i.consumable.consume(o.item,t.name);const r=i.writer,a=r.document.selection;if(o.item instanceof ai||o.item instanceof _i)r.wrap(a.getFirstRange(),n);else{let e=i.mapper.toViewRange(o.range);null!==o.attributeOldValue&&s&&(e=r.unwrap(e,s)),null!==o.attributeNewValue&&n&&r.wrap(e,n)}}}(i),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=yi(e);let t=e.model;"string"==typeof t&&(t={key:t});let o=`attribute:${t.key}`;t.name&&(o+=":"+t.name);if(t.values)for(const o of t.values)e.view[o]=Si(e.view[o]);else e.view=Si(e.view);const i=Ci(e);return t=>{var s;t.on(o,(s=i,(e,t,o)=>{if(!o.consumable.test(t.item,e.name))return;const i=s(t.attributeOldValue,o,t),n=s(t.attributeNewValue,o,t);if(!i&&!n)return;o.consumable.consume(t.item,e.name);const r=o.mapper.toViewElement(t.item),a=o.writer;if(!r)throw new m.Bb("conversion-attribute-to-attribute-on-text",o.dispatcher,t);if(null!==t.attributeOldValue&&i)if("class"==i.key){const e=(0,m.qo)(i.value);for(const t of e)a.removeClass(t,r)}else if("style"==i.key){const e=Object.keys(i.value);for(const t of e)a.removeStyle(t,r)}else a.removeAttribute(i.key,r);if(null!==t.attributeNewValue&&n)if("class"==n.key){const e=(0,m.qo)(n.value);for(const t of e)a.addClass(t,r)}else if("style"==n.key){const e=Object.keys(n.value);for(const t of e)a.setStyle(t,n.value[t],r)}else a.setAttribute(n.key,n.value,r)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){const t=Ai(e.view,"ui");return o=>{var i;o.on(`addMarker:${e.model}`,(i=t,(e,t,o)=>{t.isOpening=!0;const s=i(t,o);t.isOpening=!1;const n=i(t,o);if(!s||!n)return;const r=t.markerRange;if(r.isCollapsed&&!o.consumable.consume(r,e.name))return;for(const t of r)if(!o.consumable.consume(t.item,e.name))return;const a=o.mapper,c=o.writer;c.insert(a.toViewPosition(r.start),s),o.mapper.bindElementToMarker(s,t.markerName),r.isCollapsed||(c.insert(a.toViewPosition(r.end),n),o.mapper.bindElementToMarker(n,t.markerName)),e.stop()}),{priority:e.converterPriority||"normal"}),o.on(`removeMarker:${e.model}`,((e,t,o)=>{const i=o.mapper.markerNameToElements(t.markerName);if(i){for(const e of i)o.mapper.unbindElementFromMarkerName(e,t.markerName),o.writer.clear(o.writer.createRangeOn(e),e);o.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var o;t.on(`addMarker:${e.model}`,(o=e.view,(e,t,i)=>{if(!t.item)return;if(!(t.item instanceof ai||t.item instanceof _i||t.item.is("$textProxy")))return;const s=Oi(o,t,i);if(!s)return;if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,r=Pi(n,s),a=n.document.selection;if(t.item instanceof ai||t.item instanceof _i)n.wrap(a.getFirstRange(),r);else{const e=i.mapper.toViewRange(t.range),o=n.wrap(e,r);for(const e of o.getItems())if(e.is("attributeElement")&&e.isSimilar(r)){i.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on(`addMarker:${e.model}`,function(e){return(t,o,i)=>{if(!o.item)return;if(!(o.item instanceof Vo))return;const s=Oi(e,o,i);if(!s)return;if(!i.consumable.test(o.item,t.name))return;const n=i.mapper.toViewElement(o.item);if(n&&n.getCustomProperty("addHighlight")){i.consumable.consume(o.item,t.name);for(const e of qo._createIn(o.item))i.consumable.consume(e.item,t.name);n.getCustomProperty("addHighlight")(n,s,i.writer),i.mapper.bindElementToMarker(n,o.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on(`removeMarker:${e.model}`,function(e){return(t,o,i)=>{if(o.markerRange.isCollapsed)return;const s=Oi(e,o,i);if(!s)return;const n=Pi(i.writer,s),r=i.mapper.markerNameToElements(o.markerName);if(r){for(const e of r)if(i.mapper.unbindElementFromMarkerName(e,o.markerName),e.is("attributeElement"))i.writer.unwrap(i.writer.createRangeOn(e),n);else{e.getCustomProperty("removeHighlight")(e,s.id,i.writer)}i.writer.clearClonedElementsGroup(o.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){e=yi(e);const t=e.model;let o=e.view;o||(o=o=>({group:t,name:o.substr(e.model.length+1)}));return i=>{var s;i.on(`addMarker:${t}`,(s=o,(e,t,o)=>{const i=s(t.markerName,o);if(!i)return;const n=t.markerRange;o.consumable.consume(n,e.name)&&(Ei(n,!1,o,t,i),Ei(n,!0,o,t,i),e.stop())}),{priority:e.converterPriority||"normal"}),i.on(`removeMarker:${t}`,function(e){return(t,o,i)=>{const s=e(o.markerName,i);if(!s)return;const n=i.mapper.markerNameToElements(o.markerName);if(n){for(const e of n)i.mapper.unbindElementFromMarkerName(e,o.markerName),e.is("containerElement")?(r(`data-${s.group}-start-before`,e),r(`data-${s.group}-start-after`,e),r(`data-${s.group}-end-before`,e),r(`data-${s.group}-end-after`,e)):i.writer.clear(i.writer.createRangeOn(e),e);i.writer.clearClonedElementsGroup(o.markerName),t.stop()}function r(e,t){if(t.hasAttribute(e)){const o=new Set(t.getAttribute(e).split(","));o.delete(s.name),0==o.size?i.writer.removeAttribute(e,t):i.writer.setAttribute(e,Array.from(o).join(","),t)}}}}(o),{priority:e.converterPriority||"normal"})}}(e))}}function Pi(e,t){const o=e.createAttributeElement("span",t.attributes);return t.classes&&o._addClass(t.classes),"number"==typeof t.priority&&(o._priority=t.priority),o._id=t.id,o}function Ei(e,t,o,i,s){const n=t?e.start:e.end,r=n.nodeAfter&&n.nodeAfter.is("element")?n.nodeAfter:null,a=n.nodeBefore&&n.nodeBefore.is("element")?n.nodeBefore:null;if(r||a){let e,n;t&&r||!t&&!a?(e=r,n=!0):(e=a,n=!1);const c=o.mapper.toViewElement(e);if(c)return void function(e,t,o,i,s,n){const r=`data-${n.group}-${t?"start":"end"}-${o?"before":"after"}`,a=e.hasAttribute(r)?e.getAttribute(r).split(","):[];a.unshift(n.name),i.writer.setAttribute(r,a.join(","),e),i.mapper.bindElementToMarker(e,s.markerName)}(c,t,n,o,i,s)}!function(e,t,o,i,s){const n=`${s.group}-${t?"start":"end"}`,r=s.name?{name:s.name}:null,a=o.writer.createUIElement(n,r);o.writer.insert(e,a),o.mapper.bindElementToMarker(a,i.markerName)}(o.mapper.toViewPosition(n),t,o,i,s)}function Ti(e){return"string"==typeof e&&(e={name:e}),e.attributes?Array.isArray(e.attributes)||(e.attributes=[e.attributes]):e.attributes=[],e.children=!!e.children,e}function Ai(e,t){return"function"==typeof e?e:(o,i)=>function(e,t,o){"string"==typeof e&&(e={name:e});let i;const s=t.writer,n=Object.assign({},e.attributes);if("container"==o)i=s.createContainerElement(e.name,n);else if("attribute"==o){const t={priority:e.priority||Ue.DEFAULT_PRIORITY};i=s.createAttributeElement(e.name,n,t)}else i=s.createUIElement(e.name,n);if(e.styles){const t=Object.keys(e.styles);for(const o of t)s.setStyle(o,e.styles[o],i)}if(e.classes){const t=e.classes;if("string"==typeof t)s.addClass(t,i);else for(const e of t)s.addClass(e,i)}return i}(e,i,t)}function Ci(e){return e.model.values?(t,o,i)=>{const s=e.view[t];return s?s(t,o,i):null}:e.view}function Si(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function Oi(e,t,o){const i="function"==typeof e?e(t,o):e;return i?(i.priority||(i.priority=10),i.id||(i.id=t.markerName),i):null}function Ri(e){const t=function(e){return(t,o)=>{if(!t.is("element",e.name))return!1;if("attribute"==o.type){if(e.attributes.includes(o.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,o)=>{const i=[];o.reconvertedElements||(o.reconvertedElements=new Set);for(const e of o.changes){const s="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(s&&t(s,e)){if(!o.reconvertedElements.has(s)){o.reconvertedElements.add(s);const e=zo._createBefore(s);let t=i.length;for(let o=i.length-1;o>=0;o--){const s=i[o],n=("attribute"==s.type?s.range.start:s.position).compareWith(e);if("before"==n||"remove"==s.type&&"same"==n)break;t=o}i.splice(t,0,{type:"remove",name:s.name,position:e,length:1},{type:"reinsert",name:s.name,position:e,length:1})}}else i.push(e)}o.changes=i}}function Mi(e){return(t,o,i={})=>{const s=["insert"];for(const o of e.attributes)t.hasAttribute(o)&&s.push(`attribute:${o}`);return!!s.every((e=>o.test(t,e)))&&(i.preflight||s.forEach((e=>o.consume(t,e))),!0)}}function ji(e,t,o,i){for(const s of t)Bi(e.root,s,o,i)||o.convertItem(s)}function Bi(e,t,o,i){const{writer:s,mapper:n}=o;if(!i.reconversion)return!1;const r=n.toViewElement(t);return!(!r||r.root==e)&&(!!o.canReuseView(r)&&(s.move(s.createRangeOn(r),n.toViewPosition(zo._createBefore(t))),!0))}function Di(e,t,{preflight:o}={}){return o?t.test(e,"insert"):t.consume(e,"insert")}function Vi(e){const{schema:t,document:o}=e.model;for(const i of o.getRootNames()){const s=o.getRoot(i);if(s.isEmpty&&!t.checkChild(s,"$text")&&t.checkChild(s,"paragraph"))return e.insertElement("paragraph",s),!0}return!1}function Ii(e,t,o){const i=o.createContext(e);return!!o.checkChild(i,"paragraph")&&!!o.checkChild(i.push("paragraph"),t)}function Ni(e,t){const o=t.createElement("paragraph");return t.insert(o,e),t.createPositionAt(o,0)}var zi=Object.defineProperty,Fi=Object.defineProperties,Li=Object.getOwnPropertyDescriptors,Zi=Object.getOwnPropertySymbols,Wi=Object.prototype.hasOwnProperty,$i=Object.prototype.propertyIsEnumerable,qi=(e,t,o)=>t in e?zi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class Hi extends vi{elementToElement(e){return this.add(Ui(e))}elementToAttribute(e){return this.add(function(e){e=yi(e),Ji(e);const t=Yi(e,!1),o=Ki(e.view),i=o?`element:${o}`:"element";return o=>{o.on(i,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=yi(e);let t=null;("string"==typeof e.view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let o;if("class"==t||"style"==t){o={["class"==t?"classes":"styles"]:e.view.value}}else{o={attributes:{[t]:void 0===e.view.value?/[\s\S]*/:e.view.value}}}e.view.name&&(o.name=e.view.name);return e.view=o,t}(e));Ji(e,t);const o=Yi(e,!0);return t=>{t.on("element",o,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){const t=function(e){return(t,o)=>{const i="string"==typeof e?e:e(t,o);return o.writer.createElement("$marker",{"data-name":i})}}(e.model);return Ui((o=((e,t)=>{for(var o in t||(t={}))Wi.call(t,o)&&qi(e,o,t[o]);if(Zi)for(var o of Zi(t))$i.call(t,o)&&qi(e,o,t[o]);return e})({},e),i={model:t},Fi(o,Li(i))));var o,i}(e))}dataToMarker(e){return this.add(function(e){e=yi(e),e.model||(e.model=t=>t?e.view+":"+t:e.view);const t={view:e.view,model:e.model},o=Gi(Xi(t,"start")),i=Gi(Xi(t,"end"));return s=>{s.on(`element:${e.view}-start`,o,{priority:e.converterPriority||"normal"}),s.on(`element:${e.view}-end`,i,{priority:e.converterPriority||"normal"});const n=m.tA.get("low"),r=m.tA.get("highest"),a=m.tA.get(e.converterPriority)/r;s.on("element",function(e){return(t,o,i)=>{const s=`data-${e.view}`;function n(t,s){for(const n of s){const s=e.model(n,i),r=i.writer.createElement("$marker",{"data-name":s});i.writer.insert(r,t),o.modelCursor.isEqual(t)?o.modelCursor=o.modelCursor.getShiftedBy(1):o.modelCursor=o.modelCursor._getTransformedByInsertion(t,1),o.modelRange=o.modelRange._getTransformedByInsertion(t,1)[0]}}(i.consumable.test(o.viewItem,{attributes:s+"-end-after"})||i.consumable.test(o.viewItem,{attributes:s+"-start-after"})||i.consumable.test(o.viewItem,{attributes:s+"-end-before"})||i.consumable.test(o.viewItem,{attributes:s+"-start-before"}))&&(o.modelRange||Object.assign(o,i.convertChildren(o.viewItem,o.modelCursor)),i.consumable.consume(o.viewItem,{attributes:s+"-end-after"})&&n(o.modelRange.end,o.viewItem.getAttribute(s+"-end-after").split(",")),i.consumable.consume(o.viewItem,{attributes:s+"-start-after"})&&n(o.modelRange.end,o.viewItem.getAttribute(s+"-start-after").split(",")),i.consumable.consume(o.viewItem,{attributes:s+"-end-before"})&&n(o.modelRange.start,o.viewItem.getAttribute(s+"-end-before").split(",")),i.consumable.consume(o.viewItem,{attributes:s+"-start-before"})&&n(o.modelRange.start,o.viewItem.getAttribute(s+"-start-before").split(",")))}}(t),{priority:n+a})}}(e))}}function Ui(e){const t=Gi(e=yi(e)),o=Ki(e.view),i=o?`element:${o}`:"element";return o=>{o.on(i,t,{priority:e.converterPriority||"normal"})}}function Ki(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function Gi(e){const t=new P(e.view);return(o,i,s)=>{const n=t.match(i.viewItem);if(!n)return;const r=n.match;if(r.name=!0,!s.consumable.test(i.viewItem,r))return;const a=function(e,t,o){return e instanceof Function?e(t,o):o.writer.createElement(e)}(e.model,i.viewItem,s);a&&s.safeInsert(a,i.modelCursor)&&(s.consumable.consume(i.viewItem,r),s.convertChildren(i.viewItem,a),s.updateConversionResult(a,i))}}function Ji(e,t=null){const o=null===t||(e=>e.getAttribute(t)),i="object"!=typeof e.model?e.model:e.model.key,s="object"!=typeof e.model||void 0===e.model.value?o:e.model.value;e.model={key:i,value:s}}function Yi(e,t){const o=new P(e.view);return(i,s,n)=>{if(!s.modelRange&&t)return;const r=o.match(s.viewItem);if(!r)return;if(!function(e,t){const o="function"==typeof e?e(t):e;if("object"==typeof o&&!Ki(o))return!1;return!o.classes&&!o.attributes&&!o.styles}(e.view,s.viewItem)?delete r.match.name:r.match.name=!0,!n.consumable.test(s.viewItem,r.match))return;const a=e.model.key,c="function"==typeof e.model.value?e.model.value(s.viewItem,n):e.model.value;if(null===c)return;s.modelRange||Object.assign(s,n.convertChildren(s.viewItem,s.modelCursor));const l=function(e,t,o,i){let s=!1;for(const n of Array.from(e.getItems({shallow:o})))i.schema.checkAttribute(n,t.key)&&(s=!0,n.hasAttribute(t.key)||i.writer.setAttribute(t.key,t.value,n));return s}(s.modelRange,{key:a,value:c},t,n);l&&(n.consumable.test(s.viewItem,{name:!0})&&(r.match.name=!0),n.consumable.consume(s.viewItem,r.match))}}function Xi(e,t){return{view:`${e.view}-${t}`,model:(t,o)=>{const i=t.getAttribute("name"),s=e.model(i,o);return o.writer.createElement("$marker",{"data-name":s})}}}function Qi(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.selection,i=t.schema,s=[];let n=!1;for(const e of o.getRanges()){const t=es(e,i);t&&!t.isEqual(e)?(s.push(t),n=!0):s.push(e)}n&&e.setSelection(function(e){const t=[...e],o=new Set;let i=1;for(;i<t.length;){const e=t[i],s=t.slice(0,i);for(const[n,r]of s.entries())if(!o.has(n))if(e.isEqual(r))o.add(n);else if(e.isIntersecting(r)){o.add(n),o.add(i);const s=e.getJoined(r);t.push(s)}i++}return t.filter(((e,t)=>!o.has(t)))}(s),{backward:o.isBackward});return!1}(t,e)))}function es(e,t){return e.isCollapsed?function(e,t){const o=e.start,i=t.getNearestSelectionRange(o);if(!i){const e=o.getAncestors().reverse().find((e=>t.isObject(e)));return e?qo._createOn(e):null}if(!i.isCollapsed)return i;const s=i.start;if(o.isEqual(s))return null;return new qo(s)}(e,t):function(e,t){const{start:o,end:i}=e,s=t.checkChild(o,"$text"),n=t.checkChild(i,"$text"),r=t.getLimitElement(o),a=t.getLimitElement(i);if(r===a){if(s&&n)return null;if(function(e,t,o){const i=e.nodeAfter&&!o.isLimit(e.nodeAfter)||o.checkChild(e,"$text"),s=t.nodeBefore&&!o.isLimit(t.nodeBefore)||o.checkChild(t,"$text");return i||s}(o,i,t)){const e=o.nodeAfter&&t.isSelectable(o.nodeAfter)?null:t.getNearestSelectionRange(o,"forward"),s=i.nodeBefore&&t.isSelectable(i.nodeBefore)?null:t.getNearestSelectionRange(i,"backward"),n=e?e.start:o,r=s?s.end:i;return new qo(n,r)}}const c=r&&!r.is("rootElement"),l=a&&!a.is("rootElement");if(c||l){const e=o.nodeAfter&&i.nodeBefore&&o.nodeAfter.parent===i.nodeBefore.parent,s=c&&(!e||!os(o.nodeAfter,t)),n=l&&(!e||!os(i.nodeBefore,t));let d=o,h=i;return s&&(d=zo._createBefore(ts(r,t))),n&&(h=zo._createAfter(ts(a,t))),new qo(d,h)}return null}(e,t)}function ts(e,t){let o=e,i=o;for(;t.isLimit(i)&&i.parent;)o=i,i=i.parent;return o}function os(e,t){return e&&t.isSelectable(e)}class is extends((0,m.Re)()){constructor(e,t){super(),this.model=e,this.view=new Oo(t),this.mapper=new Ho,this.downcastDispatcher=new si({mapper:this.mapper,schema:e.schema});const o=this.model.document,i=o.selection,s=this.model.markers;var n,r,a;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(o,"change",(()=>{this.view.change((e=>{this.downcastDispatcher.convertChanges(o.differ,s,e),this.downcastDispatcher.convertSelection(i,s,e)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(o,i)=>{const s=i.newSelection,n=[];for(const e of s.getRanges())n.push(t.toModelRange(e));const r=e.createSelection(n,{backward:s.isBackward});r.isEqual(e.document.selection)||e.change((e=>{e.setSelection(r)}))}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(n=this.mapper,r=this.model.schema,a=this.view,(e,t)=>{if(!a.document.isComposing||m.OB.isAndroid)for(let e=0;e<t.targetRanges.length;e++){const o=t.targetRanges[e],i=n.toModelRange(o),s=es(i,r);s&&!s.isEqual(i)&&(t.targetRanges[e]=n.toViewRange(s))}}),{priority:"high"}),this.downcastDispatcher.on("insert:$text",((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const i=o.writer,s=o.mapper.toViewPosition(t.range.start),n=i.createText(t.item.data);i.insert(s,n)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((e,t,o)=>{const i=o.mapper.toViewPosition(t.position),s=t.position.getShiftedBy(t.length),n=o.mapper.toViewPosition(s,{isPhantom:!0}),r=o.writer.createRange(i,n),a=o.writer.remove(r.getTrimmed());for(const e of o.writer.createRangeIn(a).getItems())o.mapper.unbindViewElement(e,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,o)=>{const i=o.writer,s=i.document.selection;for(const e of s.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&o.writer.mergeAttributes(e.start);i.setSelection(null)}),{priority:"high"}),this.downcastDispatcher.on("selection",((e,t,o)=>{const i=t.selection;if(i.isCollapsed)return;if(!o.consumable.consume(i,"selection"))return;const s=[];for(const e of i.getRanges())s.push(o.mapper.toViewRange(e));o.writer.setSelection(s,{backward:i.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,o)=>{const i=t.selection;if(!i.isCollapsed)return;if(!o.consumable.consume(i,"selection"))return;const s=o.writer,n=i.getFirstPosition(),r=o.mapper.toViewPosition(n),a=s.breakAttributes(r);s.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((e=>{if("$graveyard"==e.rootName)return null;const t=new Me(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,o=this.model.markers.get(t);if(!o)throw new m.Bb("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change((()=>{this.model.markers._refresh(o)}))}reconvertItem(e){this.model.change((()=>{this.model.document.differ._refreshItem(e)}))}}class ss{constructor(){this._consumables=new Map}add(e,t){let o;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?o=this._consumables.get(e):(o=new rs(e),this._consumables.set(e,o)),o.add(t))}test(e,t){const o=this._consumables.get(e);return void 0===o?null:e.is("$text")||e.is("documentFragment")?o:o.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const o=this._consumables.get(e);void 0!==o&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):o.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},o=e.getAttributeKeys();for(const e of o)"style"!=e&&"class"!=e&&t.attributes.push(e);const i=e.getClassNames();for(const e of i)t.classes.push(e);const s=e.getStyleNames();for(const e of s)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new ss),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,ss.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const o of e.getChildren())t=ss.createFrom(o,t);return t}}const ns=["attributes","classes","styles"];class rs{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t of ns)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t of ns)if(t in e){const o=this._test(t,e[t]);if(!0!==o)return o}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t of ns)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t of ns)t in e&&this._revert(t,e[t])}_add(e,t){const o=(0,C.Z)(t)?t:[t],i=this._consumables[e];for(const t of o){if("attributes"===e&&("class"===t||"style"===t))throw new m.Bb("viewconsumable-invalid-attribute",this);if(i.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))i.set(e,!0)}}_test(e,t){const o=(0,C.Z)(t)?t:[t],i=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){const e=i.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",o=this._test(e,[...this._consumables[e].keys()]);if(!0!==o)return o}return!0}_consume(e,t){const o=(0,C.Z)(t)?t:[t],i=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){if(i.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))i.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const o=(0,C.Z)(t)?t:[t],i=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){!1===i.get(t)&&i.set(t,!0)}else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class as extends((0,m.Re)()){constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((e,t)=>{t[0]=new cs(t[0])}),{priority:"highest"}),this.on("checkChild",((e,t)=>{t[0]=new cs(t[0]),t[1]=this.getDefinition(t[1])}),{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new m.Bb("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new m.Bb("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!t&&!(!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!!t&&!(!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!!t&&!(!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const o=this.getDefinition(e.last);return!!o&&o.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof zo){const t=e.nodeBefore,o=e.nodeAfter;if(!(t instanceof Vo))throw new m.Bb("schema-check-merge-no-element-before",this);if(!(o instanceof Vo))throw new m.Bb("schema-check-merge-no-element-after",this);return this.checkMerge(t,o)}for(const o of t.getChildren())if(!this.checkChild(e,o))return!1;return!0}addChildCheck(e){this.on("checkChild",((t,[o,i])=>{if(!i)return;const s=e(o,i);"boolean"==typeof s&&(t.stop(),t.return=s)}),{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",((t,[o,i])=>{const s=e(o,i);"boolean"==typeof s&&(t.stop(),t.return=s)}),{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;if(e instanceof zo)t=e.parent;else{t=(e instanceof qo?[e]:Array.from(e.getRanges())).reduce(((e,t)=>{const o=t.getCommonAncestor();return e?e.getCommonAncestor(o,{includeSelf:!0}):o}),null)}for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const o=[...e.getFirstPosition().getAncestors(),new Bo("",e.getAttributes())];return this.checkAttribute(o,t)}{const o=e.getRanges();for(const e of o)for(const o of e)if(this.checkAttribute(o.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const o of e)yield*this._getValidRangesForRange(o,t)}getNearestSelectionRange(e,t="both"){if(this.checkChild(e,"$text"))return new qo(e);let o,i;const s=e.getAncestors().reverse().find((e=>this.isLimit(e)))||e.root;"both"!=t&&"backward"!=t||(o=new Io({boundaries:qo._createIn(s),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(i=new Io({boundaries:qo._createIn(s),startPosition:e}));for(const e of function*(e,t){let o=!1;for(;!o;){if(o=!0,e){const t=e.next();t.done||(o=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(o=!1,yield{walker:t,value:e.value})}}}(o,i)){const t=e.walker==o?"elementEnd":"elementStart",i=e.value;if(i.type==t&&this.isObject(i.item))return qo._createOn(i.item);if(this.checkChild(i.nextPosition,"$text"))return new qo(i.nextPosition)}return null}findAllowedParent(e,t){let o=e.parent;for(;o;){if(this.checkChild(o,t))return o;if(this.isLimit(o))return null;o=o.parent}return null}setAllowedAttributes(e,t,o){const i=o.model;for(const[s,n]of Object.entries(t))i.schema.checkAttribute(e,s)&&o.setAttribute(s,n,e)}removeDisallowedAttributes(e,t){for(const o of e)if(o.is("$text"))vs(this,o,t);else{const e=qo._createIn(o).getPositions();for(const o of e){vs(this,o.nodeBefore||o.parent,t)}}}getAttributesWithProperty(e,t,o){const i={};for(const[s,n]of e.getAttributes()){const e=this.getAttributeProperties(s);void 0!==e[t]&&(void 0!==o&&o!==e[t]||(i[s]=n))}return i}createContext(e){return new cs(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,o=Object.keys(t);for(const i of o)e[i]=ls(t[i],i);for(const t of o)ds(e,t);for(const t of o)hs(e,t);for(const t of o)us(e,t);for(const t of o)ps(e,t),fs(e,t);for(const t of o)gs(e,t),ms(e,t),bs(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,o=t.length-1){const i=t.getItem(o);if(e.allowIn.includes(i.name)){if(0==o)return!0;{const e=this.getDefinition(i);return this._checkContextMatch(e,t,o-1)}}return!1}*_getValidRangesForRange(e,t){let o=e.start,i=e.start;for(const s of e.getItems({shallow:!0}))s.is("element")&&(yield*this._getValidRangesForRange(qo._createIn(s),t)),this.checkAttribute(s,t)||(o.isEqual(i)||(yield new qo(o,i)),o=zo._createAfter(s)),i=zo._createAfter(s);o.isEqual(i)||(yield new qo(o,i))}}class cs{constructor(e){if(e instanceof cs)return e;let t;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(ks)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new cs([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e=>e.name))}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function ls(e,t){const o={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(e,t){for(const o of e){const e=Object.keys(o).filter((e=>e.startsWith("is")));for(const i of e)t[i]=!!o[i]}}(e,o),_s(e,o,"allowIn"),_s(e,o,"allowContentOf"),_s(e,o,"allowWhere"),_s(e,o,"allowAttributes"),_s(e,o,"allowAttributesOf"),_s(e,o,"allowChildren"),_s(e,o,"inheritTypesFrom"),function(e,t){for(const o of e){const e=o.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,o),o}function ds(e,t){const o=e[t];for(const i of o.allowChildren){const o=e[i];o&&o.allowIn.push(t)}o.allowChildren.length=0}function hs(e,t){for(const o of e[t].allowContentOf)if(e[o]){ws(e,o).forEach((e=>{e.allowIn.push(t)}))}delete e[t].allowContentOf}function us(e,t){for(const o of e[t].allowWhere){const i=e[o];if(i){const o=i.allowIn;e[t].allowIn.push(...o)}}delete e[t].allowWhere}function ps(e,t){for(const o of e[t].allowAttributesOf){const i=e[o];if(i){const o=i.allowAttributes;e[t].allowAttributes.push(...o)}}delete e[t].allowAttributesOf}function fs(e,t){const o=e[t];for(const t of o.inheritTypesFrom){const i=e[t];if(i){const e=Object.keys(i).filter((e=>e.startsWith("is")));for(const t of e)t in o||(o[t]=i[t])}}delete o.inheritTypesFrom}function gs(e,t){const o=e[t],i=o.allowIn.filter((t=>e[t]));o.allowIn=Array.from(new Set(i))}function ms(e,t){const o=e[t];for(const i of o.allowIn){e[i].allowChildren.push(t)}}function bs(e,t){const o=e[t];o.allowAttributes=Array.from(new Set(o.allowAttributes))}function _s(e,t,o){for(const i of e){const e=i[o];"string"==typeof e?t[o].push(e):Array.isArray(e)&&t[o].push(...e)}}function ws(e,t){const o=e[t];return(i=e,Object.keys(i).map((e=>i[e]))).filter((e=>e.allowIn.includes(o.name)));var i}function ks(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function vs(e,t,o){for(const i of t.getAttributeKeys())e.checkAttribute(t,i)||o.removeAttribute(i,t)}var ys=Object.defineProperty,xs=Object.defineProperties,Ps=Object.getOwnPropertyDescriptors,Es=Object.getOwnPropertySymbols,Ts=Object.prototype.hasOwnProperty,As=Object.prototype.propertyIsEnumerable,Cs=(e,t,o)=>t in e?ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class Ss extends((0,m.ln)()){constructor(e){var t;super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi=(t=((e,t)=>{for(var o in t||(t={}))Ts.call(t,o)&&Cs(e,o,t[o]);if(Es)for(var o of Es(t))As.call(t,o)&&Cs(e,o,t[o]);return e})({},e),xs(t,Ps({consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)})))}convert(e,t,o=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let o;for(const i of new cs(e)){const e={};for(const t of i.getAttributeKeys())e[t]=i.getAttribute(t);const s=t.createElement(i.name,e);o&&t.insert(s,o),o=zo._createAt(s,0)}return o}(o,t),this.conversionApi.writer=t,this.conversionApi.consumable=ss.createFrom(e),this.conversionApi.store={};const{modelRange:i}=this._convertItem(e,this._modelCursor),s=t.createDocumentFragment();if(i){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,s);s.markers=function(e,t){const o=new Set,i=new Map,s=qo._createIn(e).getItems();for(const e of s)e.is("element","$marker")&&o.add(e);for(const e of o){const o=e.getAttribute("data-name"),s=t.createPositionBefore(e);i.has(o)?i.get(o).end=s.clone():i.set(o,new qo(s.clone())),t.remove(e)}return i}(s,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,s}_convertItem(e,t){const o={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,o,this.conversionApi):e.is("$text")?this.fire("text",o,this.conversionApi):this.fire("documentFragment",o,this.conversionApi),o.modelRange&&!(o.modelRange instanceof qo))throw new m.Bb("view-conversion-dispatcher-incorrect-result",this);return{modelRange:o.modelRange,modelCursor:o.modelCursor}}_convertChildren(e,t){let o=t.is("position")?t:zo._createAt(t,0);const i=new qo(o);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,o);e.modelRange instanceof qo&&(i.end=e.modelRange.end,o=e.modelCursor)}return{modelRange:i,modelCursor:o}}_safeInsert(e,t){const o=this._splitToAllowedParent(e,t);return!!o&&(this.conversionApi.writer.insert(e,o.position),!0)}_updateConversionResult(e,t){const o=this._getSplitParts(e),i=this.conversionApi.writer;t.modelRange||(t.modelRange=i.createRange(i.createPositionBefore(e),i.createPositionAfter(o[o.length-1])));const s=this._cursorParents.get(e);t.modelCursor=s?i.createPositionAt(s,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:o,writer:i}=this.conversionApi;let s=o.findAllowedParent(t,e);if(s){if(s===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(s)&&(s=null)}if(!s)return Ii(t,e,o)?{position:Ni(t,i)}:null;const n=this.conversionApi.writer.split(t,s),r=[];for(const e of n.range.getWalker())if("elementEnd"==e.type)r.push(e.item);else{const t=r.pop(),o=e.item;this._registerSplitPair(t,o)}const a=n.range.end.parent;return this._cursorParents.set(e,a),{position:n.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const o=this._splitParts.get(e);this._splitParts.set(t,o),o.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}class Os{getHtml(e){const t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class Rs{constructor(e){this.skipComments=!0,this.domParser=new DOMParser,this.domConverter=new It(e,{renderingMode:"data"}),this.htmlWriter=new Os}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`<body>${e}</body>`);const t=this.domParser.parseFromString(e,"text/html"),o=t.createDocumentFragment(),i=t.body.childNodes;for(;i.length>0;)o.appendChild(i[0]);return o}}var Ms=o("./packages/ckeditor5-utils/src/ckeditorerror.ts");class js extends((0,m.ln)()){constructor(e,t){super(),this.model=e,this.mapper=new Ho,this.downcastDispatcher=new si({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const i=o.writer,s=o.mapper.toViewPosition(t.range.start),n=i.createText(t.item.data);i.insert(s,n)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),this.upcastDispatcher=new Ss({schema:e.schema}),this.viewDocument=new He(t),this.stylesProcessor=t,this.htmlProcessor=new Rs(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new st(this.viewDocument),this.upcastDispatcher.on("text",((e,t,{schema:o,consumable:i,writer:s})=>{let n=t.modelCursor;if(!i.test(t.viewItem))return;if(!o.checkChild(n,"$text")){if(!Ii(n,"$text",o))return;if(0==t.viewItem.data.trim().length)return;const e=n.nodeBefore;n=Ni(n,s),e&&e.is("element","$marker")&&(s.move(s.createRangeOn(e),n),n=s.createPositionAfter(e))}i.consume(t.viewItem);const r=s.createText(t.viewItem.data);s.insert(r,n),t.modelRange=s.createRange(n,n.getShiftedBy(r.offsetSize)),t.modelCursor=t.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((e,t,o)=>{if(!t.modelRange&&o.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:i}=o.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=i}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((e,t,o)=>{if(!t.modelRange&&o.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:i}=o.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=i}}),{priority:"lowest"}),(0,m.Re)().prototype.decorate.call(this,"init"),(0,m.Re)().prototype.decorate.call(this,"set"),(0,m.Re)().prototype.decorate.call(this,"get"),(0,m.Re)().prototype.decorate.call(this,"toView"),(0,m.Re)().prototype.decorate.call(this,"toModel"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},Vi)}),{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:o="empty"}=e;if(!this._checkIfRootsExists([t]))throw new m.Bb("datacontroller-get-non-existent-root",this);const i=this.model.document.getRoot(t);return i.isAttached()||(0,Ms.KE)("datacontroller-get-detached-root",this),"empty"!==o||this.model.hasContent(i,{ignoreWhitespaces:!0})?this.stringify(i,e):""}stringify(e,t={}){const o=this.toView(e,t);return this.processor.toData(o)}toView(e,t={}){const o=this.viewDocument,i=this._viewWriter;this.mapper.clearBindings();const s=qo._createIn(e),n=new it(o);this.mapper.bindElements(e,n);const r=e.is("documentFragment")?e.markers:function(e){const t=[],o=e.root.document;if(!o)return new Map;const i=qo._createIn(e);for(const e of o.model.markers){const o=e.getRange(),s=o.isCollapsed,n=o.start.isEqual(i.start)||o.end.isEqual(i.end);if(s&&n)t.push([e.name,o]);else{const s=i.getIntersection(o);s&&t.push([e.name,s])}}return t.sort((([e,t],[o,i])=>{if("after"!==t.end.compareWith(i.start))return 1;if("before"!==t.start.compareWith(i.end))return-1;switch(t.start.compareWith(i.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(i.end)){case"before":return 1;case"after":return-1;default:return o.localeCompare(e)}}})),new Map(t)}(e);return this.downcastDispatcher.convert(s,r,i,t),n}init(e){if(this.model.document.version)throw new m.Bb("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new m.Bb("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(e=>{for(const o of Object.keys(t)){const i=this.model.document.getRoot(o);e.insert(this.parse(t[o],i),i,0)}})),Promise.resolve()}set(e,t={}){let o={};if("string"==typeof e?o.main=e:o=e,!this._checkIfRootsExists(Object.keys(o)))throw new m.Bb("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},(e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(o)){const i=this.model.document.getRoot(t);e.remove(e.createRangeIn(i)),e.insert(this.parse(o[t],i),i,0)}}))}parse(e,t="$root"){const o=this.processor.toView(e);return this.toModel(o,t)}toModel(e,t="$root"){return this.model.change((o=>this.upcastDispatcher.convert(e,o,t)))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRoot(t))return!1;return!0}}class Bs{constructor(e,t){this._helpers=new Map,this._downcast=(0,m.qo)(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=(0,m.qo)(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const o=this._downcast.includes(t);if(!this._upcast.includes(t)&&!o)throw new m.Bb("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:o})}for(e){if(!this._helpers.has(e))throw new m.Bb("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:o}of Ds(e))this.for("upcast").elementToElement({model:t,view:o,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:o}of Ds(e))this.for("upcast").elementToAttribute({view:o,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:o}of Ds(e))this.for("upcast").attributeToAttribute({view:o,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:o}){if(this._helpers.has(e))throw new m.Bb("conversion-group-exists",this);const i=o?new xi(t):new Hi(t);this._helpers.set(e,i)}}function*Ds(e){if(e.model.values)for(const t of e.model.values){const o={key:e.model.key,value:t},i=e.view[t],s=e.upcastAlso?e.upcastAlso[t]:void 0;yield*Vs(o,i,s)}else yield*Vs(e.model,e.view,e.upcastAlso)}function*Vs(e,t,o){if(yield{model:e,view:t},o)for(const t of(0,m.qo)(o))yield{model:e,view:t}}class Is{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}function Ns(e,t){const o=Ls(t),i=o.reduce(((e,t)=>e+t.offsetSize),0),s=e.parent;Ws(e);const n=e.index;return s._insertChild(n,o),Zs(s,n+o.length),Zs(s,n),new qo(e,e.getShiftedBy(i))}function zs(e){if(!e.isFlat)throw new m.Bb("operation-utils-remove-range-not-flat",this);const t=e.start.parent;Ws(e.start),Ws(e.end);const o=t._removeChildren(e.start.index,e.end.index-e.start.index);return Zs(t,e.start.index),o}function Fs(e,t){if(!e.isFlat)throw new m.Bb("operation-utils-move-range-not-flat",this);const o=zs(e);return Ns(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),o)}function Ls(e){const t=[];!function e(o){if("string"==typeof o)t.push(new Bo(o));else if(o instanceof Do)t.push(new Bo(o.data,o.getAttributes()));else if(o instanceof Mo)t.push(o);else if((0,m.TW)(o))for(const t of o)e(t)}(e);for(let e=1;e<t.length;e++){const o=t[e],i=t[e-1];o instanceof Bo&&i instanceof Bo&&$s(o,i)&&(t.splice(e-1,2,new Bo(i.data+o.data,i.getAttributes())),e--)}return t}function Zs(e,t){const o=e.getChild(t-1),i=e.getChild(t);if(o&&i&&o.is("$text")&&i.is("$text")&&$s(o,i)){const s=new Bo(o.data+i.data,o.getAttributes());e._removeChildren(t-1,2),e._insertChild(t-1,s)}}function Ws(e){const t=e.textNode,o=e.parent;if(t){const i=e.offset-t.startOffset,s=t.index;o._removeChildren(s,1);const n=new Bo(t.data.substr(0,i),t.getAttributes()),r=new Bo(t.data.substr(i),t.getAttributes());o._insertChild(s,[n,r])}}function $s(e,t){const o=e.getAttributes(),i=t.getAttributes();for(const e of o){if(e[1]!==t.getAttribute(e[0]))return!1;i.next()}return i.next().done}class qs extends Is{constructor(e,t,o,i){super(i),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toNext",this.howMany=t,this.targetPosition=o.clone(),this.targetPosition.stickiness="toNone"}get type(){return"$graveyard"==this.targetPosition.root.rootName?"remove":"$graveyard"==this.sourcePosition.root.rootName?"reinsert":"move"}get affectedSelectable(){return[qo._createFromPositionAndShift(this.sourcePosition,this.howMany),qo._createFromPositionAndShift(this.targetPosition,0)]}clone(){return new qs(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new qs(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,o=this.sourcePosition.offset,i=this.targetPosition.offset;if(o+this.howMany>e.maxOffset)throw new m.Bb("move-operation-nodes-do-not-exist",this);if(e===t&&o<i&&i<o+this.howMany)throw new m.Bb("move-operation-range-into-itself",this);if(this.sourcePosition.root==this.targetPosition.root&&"prefix"==(0,m.Rt)(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())){const e=this.sourcePosition.path.length-1;if(this.targetPosition.path[e]>=o&&this.targetPosition.path[e]<o+this.howMany)throw new m.Bb("move-operation-node-into-itself",this)}}_execute(){Fs(qo._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e.targetPosition=this.targetPosition.toJSON(),e}static get className(){return"MoveOperation"}static fromJSON(e,t){const o=zo.fromJSON(e.sourcePosition,t),i=zo.fromJSON(e.targetPosition,t);return new this(o,e.howMany,i,e.baseVersion)}}class Hs extends Is{constructor(e,t,o){super(o),this.position=e.clone(),this.position.stickiness="toNone",this.nodes=new jo(Ls(t)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}get affectedSelectable(){return this.position.clone()}clone(){const e=new jo([...this.nodes].map((e=>e._clone(!0)))),t=new Hs(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new zo(e,[0]);return new qs(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffset<this.position.offset)throw new m.Bb("insert-operation-position-invalid",this)}_execute(){const e=this.nodes;this.nodes=new jo([...e].map((e=>e._clone(!0)))),Ns(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const o=[];for(const t of e.nodes)t.name?o.push(Vo.fromJSON(t)):o.push(Bo.fromJSON(t));const i=new Hs(zo.fromJSON(e.position,t),o,e.baseVersion);return i.shouldReceiveAttributes=e.shouldReceiveAttributes,i}}class Us extends Is{constructor(e,t,o,i,s){super(s),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=o,this.graveyardPosition=i?i.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new zo(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new qo(this.splitPosition,e)}get affectedSelectable(){const e=[qo._createFromPositionAndShift(this.splitPosition,0),qo._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&e.push(qo._createFromPositionAndShift(this.graveyardPosition,0)),e}clone(){return new Us(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new zo(e,[0]);return new Ks(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset<t)throw new m.Bb("split-operation-position-invalid",this);if(!e.parent)throw new m.Bb("split-operation-split-in-root",this);if(this.howMany!=e.maxOffset-this.splitPosition.offset)throw new m.Bb("split-operation-how-many-invalid",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new m.Bb("split-operation-graveyard-position-invalid",this)}_execute(){const e=this.splitPosition.parent;if(this.graveyardPosition)Fs(qo._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const t=e._clone();Ns(this.insertionPosition,t)}Fs(new qo(zo._createAt(e,this.splitPosition.offset),zo._createAt(e,e.maxOffset)),this.moveTargetPosition)}toJSON(){const e=super.toJSON();return e.splitPosition=this.splitPosition.toJSON(),e.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(e.graveyardPosition=this.graveyardPosition.toJSON()),e}static get className(){return"SplitOperation"}static getInsertionPosition(e){const t=e.path.slice(0,-1);return t[t.length-1]++,new zo(e.root,t,"toPrevious")}static fromJSON(e,t){const o=zo.fromJSON(e.splitPosition,t),i=zo.fromJSON(e.insertionPosition,t),s=e.graveyardPosition?zo.fromJSON(e.graveyardPosition,t):null;return new this(o,e.howMany,i,s,e.baseVersion)}}class Ks extends Is{constructor(e,t,o,i,s){super(s),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=o.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=i.clone()}get type(){return"merge"}get deletionPosition(){return new zo(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new qo(this.sourcePosition,e)}get affectedSelectable(){const e=this.sourcePosition.parent;return[qo._createOn(e),qo._createFromPositionAndShift(this.targetPosition,0),qo._createFromPositionAndShift(this.graveyardPosition,0)]}clone(){return new Ks(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),o=new zo(this.sourcePosition.root,t)._getTransformedByMergeOperation(this);return new Us(e,this.howMany,o,this.graveyardPosition,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent;if(!e.parent)throw new m.Bb("merge-operation-source-position-invalid",this);if(!t.parent)throw new m.Bb("merge-operation-target-position-invalid",this);if(this.howMany!=e.maxOffset)throw new m.Bb("merge-operation-how-many-invalid",this)}_execute(){const e=this.sourcePosition.parent;Fs(qo._createIn(e),this.targetPosition),Fs(qo._createOn(e),this.graveyardPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,t){const o=zo.fromJSON(e.sourcePosition,t),i=zo.fromJSON(e.targetPosition,t),s=zo.fromJSON(e.graveyardPosition,t);return new this(o,e.howMany,i,s,e.baseVersion)}}class Gs extends Is{constructor(e,t,o,i,s,n){super(n),this.name=e,this.oldRange=t?t.clone():null,this.newRange=o?o.clone():null,this.affectsData=s,this._markers=i}get type(){return"marker"}get affectedSelectable(){const e=[];return this.oldRange&&e.push(this.oldRange.clone()),this.newRange&&(this.oldRange?e.push(...this.newRange.getDifference(this.oldRange)):e.push(this.newRange.clone())),e}clone(){return new Gs(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new Gs(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){this.newRange?this._markers._set(this.name,this.newRange,!0,this.affectsData):this._markers._remove(this.name)}toJSON(){const e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,t){return new Gs(e.name,e.oldRange?qo.fromJSON(e.oldRange,t):null,e.newRange?qo.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}}const Js=function(e,t){return _o(e,t)};class Ys extends Is{constructor(e,t,o,i,s){super(s),this.range=e.clone(),this.key=t,this.oldValue=void 0===o?null:o,this.newValue=void 0===i?null:i}get type(){return null===this.oldValue?"addAttribute":null===this.newValue?"removeAttribute":"changeAttribute"}get affectedSelectable(){return this.range.clone()}clone(){return new Ys(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Ys(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const e=super.toJSON();return e.range=this.range.toJSON(),e}_validate(){if(!this.range.isFlat)throw new m.Bb("attribute-operation-range-not-flat",this);for(const e of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!Js(e.getAttribute(this.key),this.oldValue))throw new m.Bb("attribute-operation-wrong-old-value",this,{item:e,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&e.hasAttribute(this.key))throw new m.Bb("attribute-operation-attribute-exists",this,{node:e,key:this.key})}}_execute(){Js(this.oldValue,this.newValue)||function(e,t,o){Ws(e.start),Ws(e.end);for(const i of e.getItems({shallow:!0})){const e=i.is("$textProxy")?i.textNode:i;null!==o?e._setAttribute(t,o):e._removeAttribute(t),Zs(e.parent,e.index)}Zs(e.end.parent,e.end.index)}(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(e,t){return new Ys(qo.fromJSON(e.range,t),e.key,e.oldValue,e.newValue,e.baseVersion)}}class Xs extends Is{get type(){return"noop"}get affectedSelectable(){return null}clone(){return new Xs(this.baseVersion)}getReversed(){return new Xs(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}class Qs extends Is{constructor(e,t,o,i){super(i),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=o}get type(){return"rename"}get affectedSelectable(){return this.position.nodeAfter}clone(){return new Qs(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new Qs(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof Vo))throw new m.Bb("rename-operation-wrong-position",this);if(e.name!==this.oldName)throw new m.Bb("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,t){return new Qs(zo.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}class en extends Is{constructor(e,t,o,i,s){super(s),this.root=e,this.key=t,this.oldValue=void 0===o?null:o,this.newValue=void 0===i?null:i}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}get affectedSelectable(){return this.root}clone(){return new en(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new en(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new m.Bb("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new m.Bb("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new m.Bb("rootattribute-operation-attribute-exists",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,t){if(!t.getRoot(e.root))throw new m.Bb("rootattribute-operation-fromjson-no-root",this,{rootName:e.root});return new en(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}class tn extends Is{constructor(e,t,o,i,s){if(super(s),this.rootName=e,this.elementName=t,this.isAdd=o,this._document=i,!this._document.getRoot(this.rootName)){this._document.createRoot(this.elementName,this.rootName)._isAttached=!1}}get type(){return this.isAdd?"addRoot":"detachRoot"}get affectedSelectable(){return this._document.getRoot(this.rootName)}clone(){return new tn(this.rootName,this.elementName,this.isAdd,this._document,this.baseVersion)}getReversed(){return new tn(this.rootName,this.elementName,!this.isAdd,this._document,this.baseVersion+1)}_validate(){const e=this._document.getRoot(this.rootName);if(e.isAttached()&&this.isAdd)throw new m.Bb("root-operation-root-attached",this);if(!e.isAttached()&&!this.isAdd)throw new m.Bb("root-operation-root-detached",this)}_execute(){this._document.getRoot(this.rootName)._isAttached=this.isAdd}toJSON(){const e=super.toJSON();return delete e._document,e}static get className(){return"RootOperation"}static fromJSON(e,t){return new tn(e.rootName,e.elementName,e.isAdd,t,e.baseVersion)}}const on={};on[Ys.className]=Ys,on[Hs.className]=Hs,on[Gs.className]=Gs,on[qs.className]=qs,on[Xs.className]=Xs,on[Is.className]=Is,on[Qs.className]=Qs,on[en.className]=en,on[tn.className]=tn,on[Us.className]=Us,on[Ks.className]=Ks;class sn{static fromJSON(e,t){return on[e.__className].fromJSON(e,t)}}const nn=new Map;function rn(e,t,o){let i=nn.get(e);i||(i=new Map,nn.set(e,i)),i.set(t,o)}function an(e){return[e]}function cn(e,t,o={}){const i=function(e,t){const o=nn.get(e);return o&&o.has(t)?o.get(t):an}(e.constructor,t.constructor);try{return i(e=e.clone(),t,o)}catch(e){throw e}}function ln(e,t,o){e=e.slice(),t=t.slice();const i=new dn(o.document,o.useRelations,o.forceWeakRemove);i.setOriginalOperations(e),i.setOriginalOperations(t);const s=i.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:s};const n=new WeakMap;for(const t of e)n.set(t,0);const r={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length};let a=0;for(;a<e.length;){const o=e[a],s=n.get(o);if(s==t.length){a++;continue}const r=t[s],c=cn(o,r,i.getContext(o,r,!0)),l=cn(r,o,i.getContext(r,o,!1));i.updateRelation(o,r),i.setOriginalOperations(c,o),i.setOriginalOperations(l,r);for(const e of c)n.set(e,s+l.length);e.splice(a,1,...c),t.splice(s,1,...l)}if(o.padWithNoOps){const o=e.length-r.originalOperationsACount,i=t.length-r.originalOperationsBCount;un(e,i-o),un(t,o-i)}return hn(e,r.nextBaseVersionB),hn(t,r.nextBaseVersionA),{operationsA:e,operationsB:t,originalOperations:s}}class dn{constructor(e,t,o=!1){this.originalOperations=new Map,this._history=e.history,this._useRelations=t,this._forceWeakRemove=!!o,this._relations=new Map}setOriginalOperations(e,t=null){const o=t?this.originalOperations.get(t):null;for(const t of e)this.originalOperations.set(t,o||t)}updateRelation(e,t){if(e instanceof qs)t instanceof Ks?e.targetPosition.isEqual(t.sourcePosition)||t.movedRange.containsPosition(e.targetPosition)?this._setRelation(e,t,"insertAtSource"):e.targetPosition.isEqual(t.deletionPosition)?this._setRelation(e,t,"insertBetween"):e.targetPosition.isAfter(t.sourcePosition)&&this._setRelation(e,t,"moveTargetAfter"):t instanceof qs&&(e.targetPosition.isEqual(t.sourcePosition)||e.targetPosition.isBefore(t.sourcePosition)?this._setRelation(e,t,"insertBefore"):this._setRelation(e,t,"insertAfter"));else if(e instanceof Us){if(t instanceof Ks)e.splitPosition.isBefore(t.sourcePosition)&&this._setRelation(e,t,"splitBefore");else if(t instanceof qs)if(e.splitPosition.isEqual(t.sourcePosition)||e.splitPosition.isBefore(t.sourcePosition))this._setRelation(e,t,"splitBefore");else{const o=qo._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(e.splitPosition)){const i=o.end.offset-e.splitPosition.offset,s=e.splitPosition.offset-o.start.offset;this._setRelation(e,t,{howMany:i,offset:s})}}}else if(e instanceof Ks)t instanceof Ks?(e.targetPosition.isEqual(t.sourcePosition)||this._setRelation(e,t,"mergeTargetNotMoved"),e.sourcePosition.isEqual(t.targetPosition)&&this._setRelation(e,t,"mergeSourceNotMoved"),e.sourcePosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeSameElement")):t instanceof Us&&e.sourcePosition.isEqual(t.splitPosition)&&this._setRelation(e,t,"splitAtSource");else if(e instanceof Gs){const o=e.newRange;if(!o)return;if(t instanceof qs){const i=qo._createFromPositionAndShift(t.sourcePosition,t.howMany),s=i.containsPosition(o.start)||i.start.isEqual(o.start),n=i.containsPosition(o.end)||i.end.isEqual(o.end);!s&&!n||i.containsRange(o)||this._setRelation(e,t,{side:s?"left":"right",path:s?o.start.path.slice():o.end.path.slice()})}else if(t instanceof Ks){const i=o.start.isEqual(t.targetPosition),s=o.start.isEqual(t.deletionPosition),n=o.end.isEqual(t.deletionPosition),r=o.end.isEqual(t.sourcePosition);(i||s||n||r)&&this._setRelation(e,t,{wasInLeftElement:i,wasStartBeforeMergedElement:s,wasEndBeforeMergedElement:n,wasInRightElement:r})}}}getContext(e,t,o){return{aIsStrong:o,aWasUndone:this._wasUndone(e),bWasUndone:this._wasUndone(t),abRelation:this._useRelations?this._getRelation(e,t):null,baRelation:this._useRelations?this._getRelation(t,e):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(e){const t=this.originalOperations.get(e);return t.wasUndone||this._history.isUndoneOperation(t)}_getRelation(e,t){const o=this.originalOperations.get(t),i=this._history.getUndoneOperation(o);if(!i)return null;const s=this.originalOperations.get(e),n=this._relations.get(s);return n&&n.get(i)||null}_setRelation(e,t,o){const i=this.originalOperations.get(e),s=this.originalOperations.get(t);let n=this._relations.get(i);n||(n=new Map,this._relations.set(i,n)),n.set(s,o)}}function hn(e,t){for(const o of e)o.baseVersion=t++}function un(e,t){for(let o=0;o<t;o++)e.push(new Xs(0))}function pn(e,t,o){const i=e.nodes.getNode(0).getAttribute(t);if(i==o)return null;const s=new qo(e.position,e.position.getShiftedBy(e.howMany));return new Ys(s,t,i,o,0)}function fn(e,t){return null===e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany)}function gn(e,t){const o=[];for(let i=0;i<e.length;i++){const s=e[i],n=new qs(s.start,s.end.offset-s.start.offset,t,0);o.push(n);for(let t=i+1;t<e.length;t++)e[t]=e[t]._getTransformedByMove(n.sourcePosition,n.targetPosition,n.howMany)[0];t=t._getTransformedByMove(n.sourcePosition,n.targetPosition,n.howMany)}return o}rn(Ys,Ys,((e,t,o)=>{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const i=e.range.getDifference(t.range).map((t=>new Ys(t,e.key,e.oldValue,e.newValue,0))),s=e.range.getIntersection(t.range);return s&&o.aIsStrong&&i.push(new Ys(s,t.key,t.newValue,e.newValue,0)),0==i.length?[new Xs(0)]:i}return[e]})),rn(Ys,Hs,((e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const o=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map((t=>new Ys(t,e.key,e.oldValue,e.newValue,e.baseVersion)));if(t.shouldReceiveAttributes){const i=pn(t,e.key,e.oldValue);i&&o.unshift(i)}return o}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]})),rn(Ys,Ks,((e,t)=>{const o=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&o.push(qo._createFromPositionAndShift(t.graveyardPosition,1));const i=e.range._getTransformedByMergeOperation(t);return i.isCollapsed||o.push(i),o.map((t=>new Ys(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),rn(Ys,qs,((e,t)=>function(e,t){const o=qo._createFromPositionAndShift(t.sourcePosition,t.howMany);let i=null,s=[];o.containsRange(e,!0)?i=e:e.start.hasSameParentAs(o.start)?(s=e.getDifference(o),i=e.getIntersection(o)):s=[e];const n=[];for(let e of s){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const o=t.getMovedRangeStart(),i=e.start.hasSameParentAs(o),s=e._getTransformedByInsertion(o,t.howMany,i);n.push(...s)}i&&n.push(i._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]);return n}(e.range,t).map((t=>new Ys(t,e.key,e.oldValue,e.newValue,e.baseVersion))))),rn(Ys,Us,((e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const o=e.clone();return o.range=new qo(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,o]}return e.range=e.range._getTransformedBySplitOperation(t),[e]})),rn(Hs,Ys,((e,t)=>{const o=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const i=pn(e,t.key,t.newValue);i&&o.push(i)}return o})),rn(Hs,Hs,((e,t,o)=>(e.position.isEqual(t.position)&&o.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e]))),rn(Hs,qs,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),rn(Hs,Us,((e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e]))),rn(Hs,Ks,((e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e]))),rn(Gs,Hs,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e]))),rn(Gs,Gs,((e,t,o)=>{if(e.name==t.name){if(!o.aIsStrong)return[new Xs(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]})),rn(Gs,Ks,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e]))),rn(Gs,qs,((e,t,o)=>{if(e.oldRange&&(e.oldRange=qo._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(o.abRelation){const i=qo._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==o.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.end=i.end,e.newRange.start.path=o.abRelation.path,[e];if("right"==o.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=i.start,e.newRange.end.path=o.abRelation.path,[e]}e.newRange=qo._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]})),rn(Gs,Us,((e,t,o)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(o.abRelation){const i=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&o.abRelation.wasStartBeforeMergedElement?e.newRange.start=zo._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!o.abRelation.wasInLeftElement&&(e.newRange.start=zo._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&o.abRelation.wasInRightElement?e.newRange.end=zo._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&o.abRelation.wasEndBeforeMergedElement?e.newRange.end=zo._createAt(t.insertionPosition):e.newRange.end=i.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]})),rn(Ks,Hs,((e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e]))),rn(Ks,Ks,((e,t,o)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(o.bWasUndone){const o=t.graveyardPosition.path.slice();return o.push(0),e.sourcePosition=new zo(t.graveyardPosition.root,o),e.howMany=0,[e]}return[new Xs(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!o.bWasUndone&&"splitAtSource"!=o.abRelation){const i="$graveyard"==e.targetPosition.root.rootName,s="$graveyard"==t.targetPosition.root.rootName;if(s&&!i||!(i&&!s)&&o.aIsStrong){const o=t.targetPosition._getTransformedByMergeOperation(t),i=e.targetPosition._getTransformedByMergeOperation(t);return[new qs(o,e.howMany,i,0)]}return[new Xs(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&o.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),rn(Ks,qs,((e,t,o)=>{const i=qo._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!o.bWasUndone&&!o.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.sourcePosition)?[new Xs(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])})),rn(Ks,Us,((e,t,o)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const i=0!=t.howMany,s=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(i||s||"mergeTargetNotMoved"==o.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==o.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==o.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]})),rn(qs,Hs,((e,t)=>{const o=qo._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=o.start,e.howMany=o.end.offset-o.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]})),rn(qs,qs,((e,t,o)=>{const i=qo._createFromPositionAndShift(e.sourcePosition,e.howMany),s=qo._createFromPositionAndShift(t.sourcePosition,t.howMany);let n,r=o.aIsStrong,a=!o.aIsStrong;if("insertBefore"==o.abRelation||"insertAfter"==o.baRelation?a=!0:"insertAfter"!=o.abRelation&&"insertBefore"!=o.baRelation||(a=!1),n=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),fn(e,t)&&fn(t,e))return[t.getReversed()];if(i.containsPosition(t.targetPosition)&&i.containsRange(s,!0))return i.start=i.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),i.end=i.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),gn([i],n);if(s.containsPosition(e.targetPosition)&&s.containsRange(i,!0))return i.start=i.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),i.end=i.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),gn([i],n);const c=(0,m.Rt)(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==c||"extension"==c)return i.start=i.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),i.end=i.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),gn([i],n);"remove"!=e.type||"remove"==t.type||o.aWasUndone||o.forceWeakRemove?"remove"==e.type||"remove"!=t.type||o.bWasUndone||o.forceWeakRemove||(r=!1):r=!0;const l=[],d=i.getDifference(s);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const o="same"==(0,m.Rt)(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),i=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,o);l.push(...i)}const h=i.getIntersection(s);return null!==h&&r&&(h.start=h.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),h.end=h.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===l.length?l.push(h):1==l.length?s.start.isBefore(i.start)||s.start.isEqual(i.start)?l.unshift(h):l.push(h):l.splice(1,0,h)),0===l.length?[new Xs(e.baseVersion)]:gn(l,n)})),rn(qs,Us,((e,t,o)=>{let i=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=o.abRelation||(i=e.targetPosition._getTransformedBySplitOperation(t));const s=qo._createFromPositionAndShift(e.sourcePosition,e.howMany);if(s.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=i,[e];if(s.start.hasSameParentAs(t.splitPosition)&&s.containsPosition(t.splitPosition)){let e=new qo(t.splitPosition,s.end);e=e._getTransformedBySplitOperation(t);return gn([new qo(s.start,t.splitPosition),e],i)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==o.abRelation&&(i=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==o.abRelation&&(i=e.targetPosition);const n=[s._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const i=s.start.isEqual(t.graveyardPosition)||s.containsPosition(t.graveyardPosition);e.howMany>1&&i&&!o.aWasUndone&&n.push(qo._createFromPositionAndShift(t.insertionPosition,1))}return gn(n,i)})),rn(qs,Ks,((e,t,o)=>{const i=qo._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.sourcePosition))if("remove"!=e.type||o.forceWeakRemove){if(1==e.howMany)return o.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new Xs(0)]}else if(!o.aWasUndone){const o=[];let i=t.graveyardPosition.clone(),s=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(o.push(new qs(e.sourcePosition,e.howMany-1,e.targetPosition,0)),i=i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),s=s._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const n=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),r=new qs(i,1,n,0),a=r.getMovedRangeStart().path.slice();a.push(0);const c=new zo(r.targetPosition.root,a);s=s._getTransformedByMove(i,n,1);const l=new qs(s,t.howMany,c,0);return o.push(r),o.push(l),o}const s=qo._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=s.start,e.howMany=s.end.offset-s.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]})),rn(Qs,Hs,((e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e]))),rn(Qs,Ks,((e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e]))),rn(Qs,qs,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),rn(Qs,Qs,((e,t,o)=>{if(e.position.isEqual(t.position)){if(!o.aIsStrong)return[new Xs(0)];e.oldName=t.newName}return[e]})),rn(Qs,Us,((e,t)=>{const o=e.position.path,i=t.splitPosition.getParentPath();if("same"==(0,m.Rt)(o,i)&&!t.graveyardPosition){const t=new Qs(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]})),rn(en,en,((e,t,o)=>{if(e.root===t.root&&e.key===t.key){if(!o.aIsStrong||e.newValue===t.newValue)return[new Xs(0)];e.oldValue=t.newValue}return[e]})),rn(tn,tn,((e,t,o)=>e.rootName!==t.rootName||e.isAdd!==t.isAdd||o.bWasUndone?[e]:[new Xs(0)])),rn(Us,Hs,((e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset<t.position.offset&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByInsertOperation(t),e.insertionPosition=e.insertionPosition._getTransformedByInsertOperation(t),[e]))),rn(Us,Ks,((e,t,o)=>{if(!e.graveyardPosition&&!o.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const o=t.graveyardPosition.path.slice();o.push(0);const i=new zo(t.graveyardPosition.root,o),s=Us.getInsertionPosition(new zo(t.graveyardPosition.root,o)),n=new Us(i,0,s,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=Us.getInsertionPosition(e.splitPosition),e.graveyardPosition=n.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[n,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=Us.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),rn(Us,qs,((e,t,o)=>{const i=qo._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const s=i.start.isEqual(e.graveyardPosition)||i.containsPosition(e.graveyardPosition);if(!o.bWasUndone&&s){const o=e.splitPosition._getTransformedByMoveOperation(t),i=e.graveyardPosition._getTransformedByMoveOperation(t),s=i.path.slice();s.push(0);const n=new zo(i.root,s);return[new qs(o,e.howMany,n,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const s=e.splitPosition.isEqual(t.targetPosition);if(s&&("insertAtSource"==o.baRelation||"splitBefore"==o.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=Us.getInsertionPosition(e.splitPosition),[e];if(s&&o.abRelation&&o.abRelation.howMany){const{howMany:t,offset:i}=o.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(i),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.splitPosition)){const o=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=o,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany),e.splitPosition=t.sourcePosition.clone(),e.insertionPosition=Us.getInsertionPosition(e.splitPosition),[e]}return t.sourcePosition.isEqual(t.targetPosition)||(e.splitPosition.hasSameParentAs(t.sourcePosition)&&e.splitPosition.offset<=t.sourcePosition.offset&&(e.howMany-=t.howMany),e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany)),e.splitPosition.stickiness="toNone",e.splitPosition=e.splitPosition._getTransformedByMoveOperation(t),e.splitPosition.stickiness="toNext",e.graveyardPosition?e.insertionPosition=e.insertionPosition._getTransformedByMoveOperation(t):e.insertionPosition=Us.getInsertionPosition(e.splitPosition),[e]})),rn(Us,Us,((e,t,o)=>{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new Xs(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new Xs(0)];if("splitBefore"==o.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const i="$graveyard"==e.splitPosition.root.rootName,s="$graveyard"==t.splitPosition.root.rootName;if(s&&!i||!(i&&!s)&&o.aIsStrong){const o=[];return t.howMany&&o.push(new qs(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&o.push(new qs(e.splitPosition,e.howMany,e.moveTargetPosition,0)),o}return[new Xs(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==o.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==o.baRelation){const o=t.insertionPosition.path.slice();o.push(0);const i=new zo(t.insertionPosition.root,o);return[e,new qs(e.insertionPosition,1,i,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset<t.splitPosition.offset&&(e.howMany-=t.howMany),e.splitPosition=e.splitPosition._getTransformedBySplitOperation(t),e.insertionPosition=Us.getInsertionPosition(e.splitPosition),[e]}));class mn extends((0,m.ln)(zo)){constructor(e,t,o="toNone"){if(super(e,t,o),!this.root.is("rootElement"))throw new m.Bb("model-liveposition-root-not-rootelement",e);bn.call(this)}detach(){this.stopListening()}toPosition(){return new zo(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}function bn(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&_n.call(this,o)}),{priority:"low"})}function _n(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}mn.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e};class wn{constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},(0,m.KE)("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:o=!0,isUndo:i=!1,isTyping:s=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=o,this.isUndo=i,this.isTyping=s}get type(){return(0,m.KE)("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}var kn=Object.defineProperty,vn=Object.getOwnPropertySymbols,yn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,Pn=(e,t,o)=>t in e?kn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class En{constructor(e){this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changedRoots=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set,this._markerCollection=e}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size&&0==this._changedRoots.size}bufferOperation(e){const t=e;switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),o=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),o||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=qo._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const o=t.graveyardPosition.parent;this._markInsert(o,t.graveyardPosition.offset,1);const i=t.targetPosition.parent;this._isInInsertedElement(i)||this._markInsert(i,t.targetPosition.offset,e.maxOffset);break}case"detachRoot":case"addRoot":this._bufferRootStateChange(t.rootName,t.isAdd);break;case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{const e=t.root.rootName;this._bufferRootAttributeChange(e,t.key,t.oldValue,t.newValue);break}}this._cachedChanges=null}bufferMarkerChange(e,t,o){const i=this._changedMarkers.get(e);i?(i.newMarkerData=o,null==i.oldMarkerData.range&&null==o.range&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{newMarkerData:o,oldMarkerData:t})}getMarkersToRemove(){const e=[];for(const[t,o]of this._changedMarkers)null!=o.oldMarkerData.range&&e.push({name:t,range:o.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,o]of this._changedMarkers)null!=o.newMarkerData.range&&e.push({name:t,range:o.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map((([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}})))}hasDataChanges(){if(this._changesInElement.size>0)return!0;if(this._changedRoots.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const o=e.range&&!t.range,i=!e.range&&t.range,s=e.range&&t.range&&!e.range.isEqual(t.range);if(o||i||s)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const o=this._changesInElement.get(e).sort(((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offset<t.offset?-1:1)),i=this._elementSnapshots.get(e),s=Tn(e.getChildren()),n=An(i.length,o);let r=0,a=0;for(const o of n)if("i"===o)t.push(this._getInsertDiff(e,r,s[r])),r++;else if("r"===o)t.push(this._getRemoveDiff(e,r,i[a])),a++;else if("a"===o){const o=s[r].attributes,n=i[a].attributes;let c;if("$text"==s[r].name)c=new qo(zo._createAt(e,r),zo._createAt(e,r+1));else{const t=e.offsetToIndex(r);c=new qo(zo._createAt(e,r),zo._createAt(e.getChild(t),0))}t.push(...this._getAttributesDiff(c,n,o)),r++,a++}else r++,a++}t.sort(((e,t)=>e.position.root!=t.position.root?e.position.root.rootName<t.position.root.rootName?-1:1:e.position.isEqual(t.position)?e.changeCount-t.changeCount:e.position.isBefore(t.position)?-1:1));for(let e=1,o=0;e<t.length;e++){const i=t[o],s=t[e],n="remove"==i.type&&"remove"==s.type&&"$text"==i.name&&"$text"==s.name&&i.position.isEqual(s.position),r="insert"==i.type&&"insert"==s.type&&"$text"==i.name&&"$text"==s.name&&i.position.parent==s.position.parent&&i.position.offset+i.length==s.position.offset,a="attribute"==i.type&&"attribute"==s.type&&i.position.parent==s.position.parent&&i.range.isFlat&&s.range.isFlat&&i.position.offset+i.length==s.position.offset&&i.attributeKey==s.attributeKey&&i.attributeOldValue==s.attributeOldValue&&i.attributeNewValue==s.attributeNewValue;n||r||a?(i.length++,a&&(i.range.end=i.range.end.getShiftedBy(1)),t[e]=null):o=e}t=t.filter((e=>e));for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(Cn),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map((e=>{const t=((e,t)=>{for(var o in t||(t={}))yn.call(t,o)&&Pn(e,o,t[o]);if(vn)for(var o of vn(t))xn.call(t,o)&&Pn(e,o,t[o]);return e})({},e);return void 0!==t.state&&delete t.attributes,t}))}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_bufferRootStateChange(e,t){if(!this._changedRoots.has(e))return void this._changedRoots.set(e,{name:e,state:t?"attached":"detached"});const o=this._changedRoots.get(e);void 0!==o.state?(delete o.state,void 0===o.attributes&&this._changedRoots.delete(e)):o.state=t?"attached":"detached"}_bufferRootAttributeChange(e,t,o,i){const s=this._changedRoots.get(e)||{name:e},n=s.attributes||{};if(n[t]){const e=n[t];i===e.oldValue?delete n[t]:e.newValue=i}else n[t]={oldValue:o,newValue:i};0===Object.entries(n).length?(delete s.attributes,void 0===s.state&&this._changedRoots.delete(e)):(s.attributes=n,this._changedRoots.set(e,s))}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e);const t=qo._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_markInsert(e,t,o){const i={type:"insert",offset:t,howMany:o,count:this._changeCount++};this._markChange(e,i)}_markRemove(e,t,o){const i={type:"remove",offset:t,howMany:o,count:this._changeCount++};this._markChange(e,i),this._removeAllNestedChanges(e,t,o)}_markAttribute(e){const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);const o=this._getChangesForElement(e);this._handleChange(t,o),o.push(t);for(let e=0;e<o.length;e++)o[e].howMany<1&&(o.splice(e,1),e--)}_getChangesForElement(e){let t;return this._changesInElement.has(e)?t=this._changesInElement.get(e):(t=[],this._changesInElement.set(e,t)),t}_makeSnapshot(e){this._elementSnapshots.has(e)||this._elementSnapshots.set(e,Tn(e.getChildren()))}_handleChange(e,t){e.nodesToHandle=e.howMany;for(const o of t){const i=e.offset+e.howMany,s=o.offset+o.howMany;if("insert"==e.type&&("insert"==o.type&&(e.offset<=o.offset?o.offset+=e.howMany:e.offset<s&&(o.howMany+=e.nodesToHandle,e.nodesToHandle=0)),"remove"==o.type&&e.offset<o.offset&&(o.offset+=e.howMany),"attribute"==o.type))if(e.offset<=o.offset)o.offset+=e.howMany;else if(e.offset<s){const s=o.howMany;o.howMany=e.offset-o.offset,t.unshift({type:"attribute",offset:i,howMany:s-o.howMany,count:this._changeCount++})}if("remove"==e.type){if("insert"==o.type)if(i<=o.offset)o.offset-=e.howMany;else if(i<=s)if(e.offset<o.offset){const t=i-o.offset;o.offset=e.offset,o.howMany-=t,e.nodesToHandle-=t}else o.howMany-=e.nodesToHandle,e.nodesToHandle=0;else if(e.offset<=o.offset)e.nodesToHandle-=o.howMany,o.howMany=0;else if(e.offset<s){const t=s-e.offset;o.howMany-=t,e.nodesToHandle-=t}if("remove"==o.type&&(i<=o.offset?o.offset-=e.howMany:e.offset<o.offset&&(e.nodesToHandle+=o.howMany,o.howMany=0)),"attribute"==o.type)if(i<=o.offset)o.offset-=e.howMany;else if(e.offset<o.offset){const t=i-o.offset;o.offset=e.offset,o.howMany-=t}else if(e.offset<s)if(i<=s){const i=o.howMany;o.howMany=e.offset-o.offset;const s=i-o.howMany-e.nodesToHandle;t.unshift({type:"attribute",offset:e.offset,howMany:s,count:this._changeCount++})}else o.howMany-=s-e.offset}if("attribute"==e.type){if("insert"==o.type)if(e.offset<o.offset&&i>o.offset){if(i>s){const e={type:"attribute",offset:s,howMany:i-s,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=o.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=o.offset&&e.offset<s&&(i>s?(e.nodesToHandle=i-s,e.offset=s):e.nodesToHandle=0);if("remove"==o.type&&e.offset<o.offset&&i>o.offset){const s={type:"attribute",offset:o.offset,howMany:i-o.offset,count:this._changeCount++};this._handleChange(s,t),t.push(s),e.nodesToHandle=o.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==o.type&&(e.offset>=o.offset&&i<=s?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=o.offset&&i>=s&&(o.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,o){return{type:"insert",position:zo._createAt(e,t),name:o.name,attributes:new Map(o.attributes),length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,o){return{type:"remove",position:zo._createAt(e,t),name:o.name,attributes:new Map(o.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,o){const i=[];o=new Map(o);for(const[s,n]of t){const t=o.has(s)?o.get(s):null;t!==n&&i.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:s,attributeOldValue:n,attributeNewValue:t,changeCount:this._changeCount++}),o.delete(s)}for(const[t,s]of o)i.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:s,changeCount:this._changeCount++});return i}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const o=this._changesInElement.get(t),i=e.startOffset;if(o)for(const e of o)if("insert"==e.type&&i>=e.offset&&i<e.offset+e.howMany)return!0;return this._isInInsertedElement(t)}_removeAllNestedChanges(e,t,o){const i=new qo(zo._createAt(e,t),zo._createAt(e,t+o));for(const e of i.getItems({shallow:!0}))e.is("element")&&(this._elementSnapshots.delete(e),this._changesInElement.delete(e),this._removeAllNestedChanges(e,0,e.maxOffset))}}function Tn(e){const t=[];for(const o of e)if(o.is("$text"))for(let e=0;e<o.data.length;e++)t.push({name:"$text",attributes:new Map(o.getAttributes())});else t.push({name:o.name,attributes:new Map(o.getAttributes())});return t}function An(e,t){const o=[];let i=0,s=0;for(const e of t){if(e.offset>i){for(let t=0;t<e.offset-i;t++)o.push("e");s+=e.offset-i}if("insert"==e.type){for(let t=0;t<e.howMany;t++)o.push("i");i=e.offset+e.howMany}else if("remove"==e.type){for(let t=0;t<e.howMany;t++)o.push("r");i=e.offset,s+=e.howMany}else o.push(..."a".repeat(e.howMany).split("")),i=e.offset+e.howMany,s+=e.howMany}if(s<e)for(let t=0;t<e-s-i;t++)o.push("e");return o}function Cn(e){const t="position"in e&&"$graveyard"==e.position.root.rootName,o="range"in e&&"$graveyard"==e.range.root.rootName;return!t&&!o}class Sn{constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set,this._baseVersionToOperationIndex=new Map,this._version=0,this._gaps=new Map}get version(){return this._version}set version(e){this._operations.length&&e>this._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new m.Bb("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const o=this._operations[0];void 0===e&&(e=o.baseVersion);let i=t-1;for(const[t,o]of this._gaps)e>t&&e<o&&(e=o),i>t&&i<o&&(i=t-1);if(i<o.baseVersion||e>this.lastOperation.baseVersion)return[];let s=this._baseVersionToOperationIndex.get(e);void 0===s&&(s=0);let n=this._baseVersionToOperationIndex.get(i);return void 0===n&&(n=this._operations.length-1),this._operations.slice(s,n+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class On extends Vo{constructor(e,t,o="main"){super(t),this._isAttached=!0,this._document=e,this.rootName=o}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}On.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e};var Rn=Object.defineProperty,Mn=Object.defineProperties,jn=Object.getOwnPropertyDescriptors,Bn=Object.getOwnPropertySymbols,Dn=Object.prototype.hasOwnProperty,Vn=Object.prototype.propertyIsEnumerable,In=(e,t,o)=>t in e?Rn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Nn=(e,t)=>{for(var o in t||(t={}))Dn.call(t,o)&&In(e,o,t[o]);if(Bn)for(var o of Bn(t))Vn.call(t,o)&&In(e,o,t[o]);return e},zn=(e,t)=>Mn(e,jn(t));const Fn="$graveyard";class Ln extends((0,m.ln)()){constructor(e){super(),this.model=e,this.history=new Sn,this.selection=new _i(this),this.roots=new m.FE({idProperty:"rootName"}),this.differ=new En(e.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",Fn),this.listenTo(e,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&this.differ.bufferOperation(o)}),{priority:"high"}),this.listenTo(e,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&this.history.addOperation(o)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(e.markers,"update",((e,t,o,i,s)=>{const n=zn(Nn({},t.getData()),{range:i});this.differ.bufferMarkerChange(t.name,s,n),null===o&&t.on("change",((e,o)=>{const i=t.getData();this.differ.bufferMarkerChange(t.name,zn(Nn({},i),{range:o}),i)}))})),this.registerPostFixer((e=>{let t=!1;for(const o of this.roots)o.isAttached()||o.isEmpty||(e.remove(e.createRangeIn(o)),t=!0);for(const o of this.model.markers)o.getRange().root.isAttached()||(e.removeMarker(o),t=!0);return t}))}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(Fn)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new m.Bb("model-document-createroot-name-exists",this,{name:t});const o=new On(this,e,t);return this.roots.add(o),o}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(e=!1){return Array.from(this.roots).filter((t=>t.rootName!=Fn&&(e||t.isAttached()))).map((e=>e.rootName))}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=w(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,o=t.schema,i=t.createPositionFromPath(e,[0]);return o.getNearestSelectionRange(i)||t.createRange(i)}_validateSelectionRange(e){return Zn(e.start)&&Zn(e.end)}_callPostFixers(e){let t=!1;do{for(const o of this._postFixers)if(this.selection.refresh(),t=o(e),t)break}while(t)}}function Zn(e){const t=e.textNode;if(t){const o=t.data,i=e.offset-t.startOffset;return!(0,m.to)(o,i)&&!(0,m.pp)(o,i)}return!0}var Wn=Object.defineProperty,$n=Object.defineProperties,qn=Object.getOwnPropertyDescriptors,Hn=Object.getOwnPropertySymbols,Un=Object.prototype.hasOwnProperty,Kn=Object.prototype.propertyIsEnumerable,Gn=(e,t,o)=>t in e?Wn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class Jn extends((0,m.ln)()){constructor(){super(...arguments),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof Yn?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,o=!1,i=!1){const s=e instanceof Yn?e.name:e;if(s.includes(","))throw new m.Bb("markercollection-incorrect-marker-name",this);const n=this._markers.get(s);if(n){const e=n.getData(),r=n.getRange();let a=!1;return r.isEqual(t)||(n._attachLiveRange(fi.fromRange(t)),a=!0),o!=n.managedUsingOperations&&(n._managedUsingOperations=o,a=!0),"boolean"==typeof i&&i!=n.affectsData&&(n._affectsData=i,a=!0),a&&this.fire(`update:${s}`,n,r,t,e),n}const r=fi.fromRange(t),a=new Yn(s,r,o,i);var c;return this._markers.set(s,a),this.fire(`update:${s}`,a,null,t,(c=((e,t)=>{for(var o in t||(t={}))Un.call(t,o)&&Gn(e,o,t[o]);if(Hn)for(var o of Hn(t))Kn.call(t,o)&&Gn(e,o,t[o]);return e})({},a.getData()),$n(c,qn({range:null})))),a}_remove(e){const t=e instanceof Yn?e.name:e,o=this._markers.get(t);return!!o&&(this._markers.delete(t),this.fire(`update:${t}`,o,o.getRange(),null,o.getData()),this._destroyMarker(o),!0)}_refresh(e){const t=e instanceof Yn?e.name:e,o=this._markers.get(t);if(!o)throw new m.Bb("markercollection-refresh-marker-not-exists",this);const i=o.getRange();this.fire(`update:${t}`,o,i,i,o.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class Yn extends((0,m.ln)(Ro)){constructor(e,t,o,i){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=o,this._affectsData=i}get managedUsingOperations(){if(!this._liveRange)throw new m.Bb("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new m.Bb("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new m.Bb("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new m.Bb("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new m.Bb("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Yn.prototype.is=function(e){return"marker"===e||"model:marker"===e};class Xn extends Is{constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new m.Bb("detach-operation-on-document-node",this)}_execute(){zs(qo._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class Qn extends Ro{constructor(e){super(),this.markers=new Map,this._children=new jo,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const o of e)t=t.getChild(t.offsetToIndex(o));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const o of e)o.name?t.push(Vo.fromJSON(o)):t.push(Bo.fromJSON(o));return new Qn(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const o=function(e){if("string"==typeof e)return[new Bo(e)];(0,m.TW)(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Bo(e):e instanceof Do?new Bo(e.data,e.getAttributes()):e))}(t);for(const e of o)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,o)}_removeChildren(e,t=1){const o=this._children._removeNodes(e,t);for(const e of o)e.parent=null;return o}}Qn.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e};class er{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new Bo(e,t)}createElement(e,t){return new Vo(e,t)}createDocumentFragment(){return new Qn}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,o=0){if(this._assertWriterUsedCorrectly(),e instanceof Bo&&""==e.data)return;const i=zo._createAt(t,o);if(e.parent){if(nr(e.root,i.root))return void this.move(qo._createOn(e),i);if(e.root.document)throw new m.Bb("model-writer-insert-forbidden-move",this);this.remove(e)}const s=i.root.document?i.root.document.version:null,n=new Hs(i,e,s);if(e instanceof Bo&&(n.shouldReceiveAttributes=!0),this.batch.addOperation(n),this.model.applyOperation(n),e instanceof Qn)for(const[t,o]of e.markers){const e=zo._createAt(o.root,0),s={range:new qo(o.start._getCombined(e,i),o.end._getCombined(e,i)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,s):this.addMarker(t,s)}}insertText(e,t,o,i){t instanceof Qn||t instanceof Vo||t instanceof zo?this.insert(this.createText(e),t,o):this.insert(this.createText(e,t),o,i)}insertElement(e,t,o,i){t instanceof Qn||t instanceof Vo||t instanceof zo?this.insert(this.createElement(e),t,o):this.insert(this.createElement(e,t),o,i)}append(e,t){this.insert(e,t,"end")}appendText(e,t,o){t instanceof Qn||t instanceof Vo?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),o,"end")}appendElement(e,t,o){t instanceof Qn||t instanceof Vo?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),o,"end")}setAttribute(e,t,o){if(this._assertWriterUsedCorrectly(),o instanceof qo){const i=o.getMinimalFlatRanges();for(const o of i)tr(this,e,t,o)}else or(this,e,t,o)}setAttributes(e,t){for(const[o,i]of(0,m.qL)(e))this.setAttribute(o,i,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof qo){const o=t.getMinimalFlatRanges();for(const t of o)tr(this,e,null,t)}else or(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof qo)for(const o of e.getItems())t(o);else t(e)}move(e,t,o){if(this._assertWriterUsedCorrectly(),!(e instanceof qo))throw new m.Bb("writer-move-invalid-range",this);if(!e.isFlat)throw new m.Bb("writer-move-range-not-flat",this);const i=zo._createAt(t,o);if(i.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!nr(e.root,i.root))throw new m.Bb("writer-move-different-document",this);const s=e.root.document?e.root.document.version:null,n=new qs(e.start,e.end.offset-e.start.offset,i,s);this.batch.addOperation(n),this.model.applyOperation(n)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof qo?e:qo._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),sr(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,o=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof Vo))throw new m.Bb("writer-merge-no-element-before",this);if(!(o instanceof Vo))throw new m.Bb("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,o){return this.model.createPositionFromPath(e,t,o)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const t=e.nodeBefore,o=e.nodeAfter;this.move(qo._createIn(o),zo._createAt(t,"end")),this.remove(o)}_merge(e){const t=zo._createAt(e.nodeBefore,"end"),o=zo._createAt(e.nodeAfter,0),i=e.root.document.graveyard,s=new zo(i,[0]),n=e.root.document.version,r=new Ks(o,e.nodeAfter.maxOffset,t,s,n);this.batch.addOperation(r),this.model.applyOperation(r)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof Vo))throw new m.Bb("writer-rename-not-element-instance",this);const o=e.root.document?e.root.document.version:null,i=new Qs(zo._createBefore(e),e.name,t,o);this.batch.addOperation(i),this.model.applyOperation(i)}split(e,t){this._assertWriterUsedCorrectly();let o,i,s=e.parent;if(!s.parent)throw new m.Bb("writer-split-element-no-parent",this);if(t||(t=s.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new m.Bb("writer-split-invalid-limit-element",this);do{const t=s.root.document?s.root.document.version:null,n=s.maxOffset-e.offset,r=Us.getInsertionPosition(e),a=new Us(e,n,r,null,t);this.batch.addOperation(a),this.model.applyOperation(a),o||i||(o=s,i=e.parent.nextSibling),s=(e=this.createPositionAfter(e.parent)).parent}while(s!==t);return{position:e,range:new qo(zo._createAt(o,"end"),zo._createAt(i,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new m.Bb("writer-wrap-range-not-flat",this);const o=t instanceof Vo?t:new Vo(t);if(o.childCount>0)throw new m.Bb("writer-wrap-element-not-empty",this);if(null!==o.parent)throw new m.Bb("writer-wrap-element-attached",this);this.insert(o,e.start);const i=new qo(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(i,zo._createAt(o,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new m.Bb("writer-unwrap-element-no-parent",this);this.move(qo._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new m.Bb("writer-addmarker-no-usingoperation",this);const o=t.usingOperation,i=t.range,s=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new m.Bb("writer-addmarker-marker-exists",this);if(!i)throw new m.Bb("writer-addmarker-no-range",this);return o?(ir(this,e,null,i,s),this.model.markers.get(e)):this.model.markers._set(e,i,o,s)}updateMarker(e,t){this._assertWriterUsedCorrectly();const o="string"==typeof e?e:e.name,i=this.model.markers.get(o);if(!i)throw new m.Bb("writer-updatemarker-marker-not-exists",this);if(!t)return(0,m.KE)("writer-updatemarker-reconvert-using-editingcontroller",{markerName:o}),void this.model.markers._refresh(i);const s="boolean"==typeof t.usingOperation,n="boolean"==typeof t.affectsData,r=n?t.affectsData:i.affectsData;if(!s&&!t.range&&!n)throw new m.Bb("writer-updatemarker-wrong-options",this);const a=i.getRange(),c=t.range?t.range:a;s&&t.usingOperation!==i.managedUsingOperations?t.usingOperation?ir(this,o,null,c,r):(ir(this,o,a,null,r),this.model.markers._set(o,c,void 0,r)):i.managedUsingOperations?ir(this,o,a,c,r):this.model.markers._set(o,c,void 0,r)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new m.Bb("writer-removemarker-no-marker",this);const o=this.model.markers.get(t);if(!o.managedUsingOperations)return void this.model.markers._remove(t);ir(this,t,o.getRange(),null,o.affectsData)}addRoot(e,t="$root"){this._assertWriterUsedCorrectly();const o=this.model.document.getRoot(e);if(o&&o.isAttached())throw new m.Bb("writer-addroot-root-exists",this);const i=this.model.document,s=new tn(e,t,!0,i,i.version);return this.batch.addOperation(s),this.model.applyOperation(s),this.model.document.getRoot(e)}detachRoot(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?this.model.document.getRoot(e):e;if(!t||!t.isAttached())throw new m.Bb("writer-detachroot-no-root",this);for(const e of this.model.markers)e.getRange().root===t&&this.removeMarker(e);for(const e of t.getAttributeKeys())this.removeAttribute(e,t);this.remove(this.createRangeIn(t));const o=this.model.document,i=new tn(t.rootName,t.name,!1,o,o.version);this.batch.addOperation(i),this.model.applyOperation(i)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,o]of(0,m.qL)(e))this._setSelectionAttribute(t,o)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const o=this.model.document.selection;if(o.isCollapsed&&o.anchor.parent.isEmpty){const i=_i._getStoreAttributeKey(e);this.setAttribute(i,t,o.anchor.parent)}o._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const o=_i._getStoreAttributeKey(e);this.removeAttribute(o,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new m.Bb("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const o of this.model.markers){if(!o.managedUsingOperations)continue;const i=o.getRange();let s=!1;if("move"===e){const e=t;s=e.containsPosition(i.start)||e.start.isEqual(i.start)||e.containsPosition(i.end)||e.end.isEqual(i.end)}else{const e=t,o=e.nodeBefore,n=e.nodeAfter,r=i.start.parent==o&&i.start.isAtEnd,a=i.end.parent==n&&0==i.end.offset,c=i.end.nodeAfter==n,l=i.start.nodeAfter==n;s=r||a||c||l}s&&this.updateMarker(o.name,{range:i})}}}function tr(e,t,o,i){const s=e.model,n=s.document;let r,a,c,l=i.start;for(const e of i.getWalker({shallow:!0}))c=e.item.getAttribute(t),r&&a!=c&&(a!=o&&d(),l=r),r=e.nextPosition,a=c;function d(){const i=new qo(l,r),c=i.root.document?n.version:null,d=new Ys(i,t,a,o,c);e.batch.addOperation(d),s.applyOperation(d)}r instanceof zo&&r!=l&&a!=o&&d()}function or(e,t,o,i){const s=e.model,n=s.document,r=i.getAttribute(t);let a,c;if(r!=o){if(i.root===i){const e=i.document?n.version:null;c=new en(i,t,r,o,e)}else{a=new qo(zo._createBefore(i),e.createPositionAfter(i));const s=a.root.document?n.version:null;c=new Ys(a,t,r,o,s)}e.batch.addOperation(c),s.applyOperation(c)}}function ir(e,t,o,i,s){const n=e.model,r=n.document,a=new Gs(t,o,i,n.markers,!!s,r.version);e.batch.addOperation(a),n.applyOperation(a)}function sr(e,t,o,i){let s;if(e.root.document){const o=i.document,n=new zo(o.graveyard,[0]);s=new qs(e,t,n,o.version)}else s=new Xn(e,t);o.addOperation(s),i.applyOperation(s)}function nr(e,t){return e===t||e instanceof On&&t instanceof On}function rr(e,t,o={}){if(t.isCollapsed)return;const i=t.getFirstRange();if("$graveyard"==i.root.rootName)return;const s=e.schema;e.change((e=>{if(!o.doNotResetEntireContent&&function(e,t){const o=e.getLimitElement(t);if(!t.containsEntireContent(o))return!1;const i=t.getFirstRange();if(i.start.parent==i.end.parent)return!1;return e.checkChild(o,"paragraph")}(s,t))return void function(e,t){const o=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(o)),dr(e,e.createPositionAt(o,0),t)}(e,t);const n={};if(!o.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(n,s.getAttributesWithProperty(e,"copyOnReplace",!0))}const[r,a]=function(e){const t=e.root.document.model,o=e.start;let i=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const o=function(e){const t=e.parent,o=t.root.document.model.schema,i=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of i){if(o.isLimit(e))return null;if(o.isBlock(e))return e}}(i);if(o&&i.isTouching(t.createPositionAt(o,0))){const o=t.createSelection(e);t.modifySelection(o,{direction:"backward"});const s=o.getLastPosition(),n=t.createRange(s,i);t.hasContent(n,{ignoreMarkers:!0})||(i=s)}}return[mn.fromPosition(o,"toPrevious"),mn.fromPosition(i,"toNext")]}(i);r.isTouching(a)||e.remove(e.createRange(r,a)),o.leaveUnmerged||(!function(e,t,o){const i=e.model;if(!lr(e.model.schema,t,o))return;const[s,n]=function(e,t){const o=e.getAncestors(),i=t.getAncestors();let s=0;for(;o[s]&&o[s]==i[s];)s++;return[o[s],i[s]]}(t,o);if(!s||!n)return;!i.hasContent(s,{ignoreMarkers:!0})&&i.hasContent(n,{ignoreMarkers:!0})?cr(e,t,o,s.parent):ar(e,t,o,s.parent)}(e,r,a),s.removeDisallowedAttributes(r.parent.getChildren(),e)),hr(e,t,r),!o.doNotAutoparagraph&&function(e,t){const o=e.checkChild(t,"$text"),i=e.checkChild(t,"paragraph");return!o&&i}(s,r)&&dr(e,r,t,n),r.detach(),a.detach()}))}function ar(e,t,o,i){const s=t.parent,n=o.parent;if(s!=i&&n!=i){for(t=e.createPositionAfter(s),(o=e.createPositionBefore(n)).isEqual(t)||e.insert(n,t),e.merge(t);o.parent.isEmpty;){const t=o.parent;o=e.createPositionBefore(t),e.remove(t)}lr(e.model.schema,t,o)&&ar(e,t,o,i)}}function cr(e,t,o,i){const s=t.parent,n=o.parent;if(s!=i&&n!=i){for(t=e.createPositionAfter(s),(o=e.createPositionBefore(n)).isEqual(t)||e.insert(s,o);t.parent.isEmpty;){const o=t.parent;t=e.createPositionBefore(o),e.remove(o)}o=e.createPositionBefore(n),function(e,t){const o=t.nodeBefore,i=t.nodeAfter;o.name!=i.name&&e.rename(o,i.name);e.clearAttributes(o),e.setAttributes(Object.fromEntries(i.getAttributes()),o),e.merge(t)}(e,o),lr(e.model.schema,t,o)&&cr(e,t,o,i)}}function lr(e,t,o){const i=t.parent,s=o.parent;return i!=s&&(!e.isLimit(i)&&!e.isLimit(s)&&function(e,t,o){const i=new qo(e,t);for(const e of i.getWalker())if(o.isLimit(e.item))return!1;return!0}(t,o,e))}function dr(e,t,o,i={}){const s=e.createElement("paragraph");e.model.schema.setAllowedAttributes(s,i,e),e.insert(s,t),hr(e,o,e.createPositionAt(s,0))}function hr(e,t,o){t instanceof _i?e.setSelection(o):t.setTo(o)}function ur(e,t){const o=[];Array.from(e.getItems({direction:"backward"})).map((e=>t.createRangeOn(e))).filter((t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end)))).forEach((e=>{o.push(e.start.parent),t.remove(e)})),o.forEach((e=>{let o=e;for(;o.parent&&o.isEmpty;){const e=t.createRangeOn(o);o=o.parent,t.remove(e)}}))}class pr{constructor(e,t,o){this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null,this._nodeToSelect=null,this.model=e,this.writer=t,this.position=o,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0)}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),o=this.writer.createPositionAfter(e);if(o.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new m.Bb("insertcontent-invalid-insertion-position",this);this.position=o,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?qo._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new qo(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(this.schema.isObject(e))return void this._handleObject(e);let t=this._checkAndAutoParagraphToAllowedPosition(e);t||(t=this._checkAndSplitToAllowedPosition(e),t)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=mn.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleObject(e){this._checkAndSplitToAllowedPosition(e)?this._appendToFragment(e):this._tryAutoparagraphing(e)}_handleDisallowedNode(e){e.is("element")?this.handleNodes(e.getChildren()):this._tryAutoparagraphing(e)}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new m.Bb("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=mn.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=mn.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof Vo))return;if(!this._canMergeLeft(e))return;const t=mn._createBefore(e);t.stickiness="toNext";const o=mn.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=mn._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=mn._createAt(t.nodeBefore,"end","toNext")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof Vo))return;if(!this._canMergeRight(e))return;const t=mn._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new m.Bb("insertcontent-invalid-insertion-position",this);this.position=zo._createAt(t.nodeBefore,"end");const o=mn.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=mn._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=mn._createAt(t.nodeBefore,0,"toPrevious")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof Vo&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof Vo&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_tryAutoparagraphing(e){const t=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,t)&&this.schema.checkChild(t,e)&&(t._appendChild(e),this._handleNode(t))}_checkAndAutoParagraphToAllowedPosition(e){if(this.schema.checkChild(this.position.parent,e))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",e))return!1;this._insertPartialFragment();const t=this.writer.createElement("paragraph");return this.writer.insert(t,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=t,this.position=this.writer.createPositionAt(t,0),!0}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}function fr(e,t,o="auto"){const i=e.getSelectedElement();if(i&&t.schema.isObject(i)&&!t.schema.isInline(i))return"before"==o||"after"==o?t.createRange(t.createPositionAt(i,o)):t.createRangeOn(i);const s=(0,m.Ps)(e.getSelectedBlocks());if(!s)return t.createRange(e.focus);if(s.isEmpty)return t.createRange(t.createPositionAt(s,0));const n=t.createPositionAfter(s);return e.focus.isTouching(n)?t.createRange(n):t.createRange(t.createPositionBefore(s))}function gr(e,t,o,i={}){if(!e.schema.isObject(t))throw new m.Bb("insertobject-element-not-an-object",e,{object:t});const s=o||e.document.selection;let n=s;i.findOptimalPosition&&e.schema.isBlock(t)&&(n=e.createSelection(fr(s,e,i.findOptimalPosition)));const r=(0,m.Ps)(s.getSelectedBlocks()),a={};return r&&Object.assign(a,e.schema.getAttributesWithProperty(r,"copyOnReplace",!0)),e.change((o=>{n.isCollapsed||e.deleteContent(n,{doNotAutoparagraph:!0});let s=t;const r=n.anchor.parent;!e.schema.checkChild(r,t)&&e.schema.checkChild(r,"paragraph")&&e.schema.checkChild("paragraph",t)&&(s=o.createElement("paragraph"),o.insert(t,s)),e.schema.setAllowedAttributes(s,a,o);const c=e.insertContent(s,n);return c.isCollapsed||i.setSelection&&function(e,t,o,i){const s=e.model;if("on"==o)return void e.setSelection(t,"on");if("after"!=o)throw new m.Bb("insertobject-invalid-place-parameter-value",s);let n=t.nextSibling;if(s.schema.isInline(t))return void e.setSelection(t,"after");const r=n&&s.schema.checkChild(n,"$text");!r&&s.schema.checkChild(t.parent,"paragraph")&&(n=e.createElement("paragraph"),s.schema.setAllowedAttributes(n,i,e),s.insertContent(n,e.createPositionAfter(t)));n&&e.setSelection(n,0)}(o,t,i.setSelection,a),c}))}const mr=' ,.?!:;"-()';function br(e,t){const{isForward:o,walker:i,unit:s,schema:n,treatEmojiAsSingleUnit:r}=e,{type:a,item:c,nextPosition:l}=t;if("text"==a)return"word"===e.unit?function(e,t){let o=e.position.textNode;o||(o=t?e.position.nodeAfter:e.position.nodeBefore);for(;o&&o.is("$text");){const i=e.position.offset-o.startOffset;if(kr(o,i,t))o=t?e.position.nodeAfter:e.position.nodeBefore;else{if(wr(o.data,i,t))break;e.next()}}return e.position}(i,o):function(e,t,o){const i=e.position.textNode;if(i){const s=i.data;let n=e.position.offset-i.startOffset;for(;(0,m.to)(s,n)||"character"==t&&(0,m.pp)(s,n)||o&&(0,m.YK)(s,n);)e.next(),n=e.position.offset-i.startOffset}return e.position}(i,s,r);if(a==(o?"elementStart":"elementEnd")){if(n.isSelectable(c))return zo._createAt(c,o?"after":"before");if(n.checkChild(l,"$text"))return l}else{if(n.isLimit(c))return void i.skip((()=>!0));if(n.checkChild(l,"$text"))return l}}function _r(e,t){const o=e.root,i=zo._createAt(o,t?"end":0);return t?new qo(e,i):new qo(i,e)}function wr(e,t,o){const i=t+(o?0:-1);return mr.includes(e.charAt(i))}function kr(e,t,o){return t===(o?e.offsetSize:0)}class vr extends((0,m.Re)()){constructor(){super(),this.markers=new Jn,this.document=new Ln(this),this.schema=new as,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((e=>this.decorate(e))),this.on("applyOperation",((e,t)=>{t[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((e,t)=>{if("$marker"===t.name)return!0})),Qi(this),this.document.registerPostFixer(Vi),this.on("insertContent",((e,[t,o])=>{e.return=function(e,t,o){return e.change((i=>{const s=o||e.document.selection;s.isCollapsed||e.deleteContent(s,{doNotAutoparagraph:!0});const n=new pr(e,i,s.anchor),r=[];let a;if(t.is("documentFragment")){if(t.markers.size){const e=[];for(const[o,i]of t.markers){const{start:t,end:s}=i,n=t.isEqual(s);e.push({position:t,name:o,isCollapsed:n},{position:s,name:o,isCollapsed:n})}e.sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:o,name:s,isCollapsed:n}of e){let e=null,a=null;const c=o.parent===t&&o.isAtStart,l=o.parent===t&&o.isAtEnd;c||l?n&&(a=c?"start":"end"):(e=i.createElement("$marker"),i.insert(e,o)),r.push({name:s,element:e,collapsed:a})}}a=t.getChildren()}else a=[t];n.handleNodes(a);let c=n.getSelectionRange();if(t.is("documentFragment")&&r.length){const e=c?fi.fromRange(c):null,t={};for(let e=r.length-1;e>=0;e--){const{name:o,element:s,collapsed:a}=r[e],c=!t[o];if(c&&(t[o]=[]),s){const e=i.createPositionAt(s,"before");t[o].push(e),i.remove(s)}else{const e=n.getAffectedRange();if(!e){a&&t[o].push(n.position);continue}a?t[o].push(e[a]):t[o].push(c?e.start:e.end)}}for(const[e,[o,s]]of Object.entries(t))o&&s&&o.root===s.root&&i.addMarker(e,{usingOperation:!0,affectsData:!0,range:new qo(o,s)});e&&(c=e.toRange(),e.detach())}c&&(s instanceof _i?i.setSelection(c):s.setTo(c));const l=n.getAffectedRange()||e.createRange(s.anchor);return n.destroy(),l}))}(this,t,o)})),this.on("insertObject",((e,[t,o,i])=>{e.return=gr(this,t,o,i)})),this.on("canEditAt",(e=>{const t=!this.document.isReadOnly;e.return=t,t||e.stop()}))}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new wn,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){m.Bb.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new wn):e instanceof wn||(e=new wn(e)):e=new wn,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){m.Bb.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,o,...i){const s=yr(t,o);return this.fire("insertContent",[e,s,o,...i])}insertObject(e,t,o,i,...s){const n=yr(t,o);return this.fire("insertObject",[e,n,i,i,...s])}deleteContent(e,t){rr(this,e,t)}modifySelection(e,t){!function(e,t,o={}){const i=e.schema,s="backward"!=o.direction,n=o.unit?o.unit:"character",r=!!o.treatEmojiAsSingleUnit,a=t.focus,c=new Io({boundaries:_r(a,s),singleCharacters:!0,direction:s?"forward":"backward"}),l={walker:c,schema:i,isForward:s,unit:n,treatEmojiAsSingleUnit:r};let d;for(;d=c.next();){if(d.done)return;const o=br(l,d.value);if(o)return void(t instanceof _i?e.change((e=>{e.setSelectionFocus(o)})):t.setFocus(o))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change((e=>{const o=e.createDocumentFragment(),i=t.getFirstRange();if(!i||i.isCollapsed)return o;const s=i.start.root,n=i.start.getCommonPath(i.end),r=s.getNodeByPath(n);let a;a=i.start.parent==i.end.parent?i:e.createRange(e.createPositionAt(r,i.start.path[n.length]),e.createPositionAt(r,i.end.path[n.length]+1));const c=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),o):e.append(e.cloneElement(t,!0),o);if(a!=i){const t=i._getTransformedByMove(a.start,e.createPositionAt(o,0),c)[0],s=e.createRange(e.createPositionAt(o,0),t.start);ur(e.createRange(t.end,e.createPositionAt(o,"end")),e),ur(s,e)}return o}))}(this,e)}hasContent(e,t={}){const o=e instanceof qo?e:qo._createIn(e);if(o.isCollapsed)return!1;const{ignoreWhitespaces:i=!1,ignoreMarkers:s=!1}=t;if(!s)for(const e of this.markers.getMarkersIntersectingRange(o))if(e.affectsData)return!0;for(const e of o.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!i)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}canEditAt(e){const t=yr(e);return this.fire("canEditAt",[t])}createPositionFromPath(e,t,o){return new zo(e,t,o)}createPositionAt(e,t){return zo._createAt(e,t)}createPositionAfter(e){return zo._createAfter(e)}createPositionBefore(e){return zo._createBefore(e)}createRange(e,t){return new qo(e,t)}createRangeIn(e){return qo._createIn(e)}createRangeOn(e){return qo._createOn(e)}createSelection(...e){return new ai(...e)}createBatch(e){return new wn(e)}createOperationFromJSON(e){return sn.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new er(this,t);const o=this._pendingChanges[0].callback(this._currentWriter);e.push(o),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}}function yr(e,t){if(e)return e instanceof ai||e instanceof _i?e:e instanceof Mo?t||0===t?new ai(e,t):e.is("rootElement")?new ai(e,"in"):new ai(e,"on"):new ai(e)}class xr extends $t{constructor(){super(...arguments),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}class Pr extends $t{constructor(){super(...arguments),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(e){this.fire(e.type,e)}}class Er{constructor(e){this.document=e}createDocumentFragment(e){return new it(this.document,e)}createElement(e,t,o){return new Te(this.document,e,t,o)}createText(e){return new v(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,o){return o._insertChild(e,t)}removeChildren(e,t,o){return o._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const o=e.parent;if(o){const i=o.getChildIndex(e);return this.removeChildren(i,1,o),this.insertChild(i,t,o),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const o=t.getChildIndex(e);this.remove(e),this.insertChild(o,e.getChildren(),t)}}rename(e,t){const o=new Te(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,o)?o:null}setAttribute(e,t,o){o._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,o){(0,x.Z)(e)&&void 0===o?t._setStyle(e):o._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,o){o._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return Be._createAt(e,t)}createPositionAfter(e){return Be._createAfter(e)}createPositionBefore(e){return Be._createBefore(e)}createRange(e,t){return new De(e,t)}createRangeOn(e){return De._createOn(e)}createRangeIn(e){return De._createIn(e)}createSelection(...e){return new Ie(...e)}}const Tr=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Ar=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,Cr=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,Sr=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,Or=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,Rr=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function Mr(e){return e.startsWith("#")?Tr.test(e):e.startsWith("rgb")?Ar.test(e)||Cr.test(e):e.startsWith("hsl")?Sr.test(e)||Or.test(e):Rr.has(e.toLowerCase())}const jr=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function Br(e){return jr.includes(e)}const Dr=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function Vr(e){return Dr.test(e)}const Ir=/^[+-]?[0-9]*([.][0-9]+)?%$/;function Nr(e){return Ir.test(e)}const zr=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function Fr(e){return zr.includes(e)}const Lr=["center","top","bottom","left","right"];function Zr(e){return Lr.includes(e)}const Wr=["fixed","scroll","local"];function $r(e){return Wr.includes(e)}const qr=/^url\(/;function Hr(e){return qr.test(e)}function Ur(e=""){if(""===e)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const t=Yr(e),o=t[0],i=t[2]||o,s=t[1]||o;return{top:o,bottom:i,right:s,left:t[3]||s}}function Kr(e){return t=>{const{top:o,right:i,bottom:s,left:n}=t,r=[];return[o,i,n,s].every((e=>!!e))?r.push([e,Gr(t)]):(o&&r.push([e+"-top",o]),i&&r.push([e+"-right",i]),s&&r.push([e+"-bottom",s]),n&&r.push([e+"-left",n])),r}}function Gr({top:e,right:t,bottom:o,left:i}){const s=[];return i!==t?s.push(e,t,o,i):o!==e?s.push(e,t,o):t!==e?s.push(e,t):s.push(e),s.join(" ")}function Jr(e){return t=>({path:e,value:Ur(t)})}function Yr(e){return e.replace(/, /g,",").split(" ").map((e=>e.replace(/,/g,", ")))}function Xr(e){e.setNormalizer("background",(e=>{const t={},o=Yr(e);for(const e of o)Fr(e)?(t.repeat=t.repeat||[],t.repeat.push(e)):Zr(e)?(t.position=t.position||[],t.position.push(e)):$r(e)?t.attachment=e:Mr(e)?t.color=e:Hr(e)&&(t.image=e);return{path:"background",value:t}})),e.setNormalizer("background-color",(e=>({path:"background.color",value:e}))),e.setReducer("background",(e=>{const t=[];return t.push(["background-color",e.color]),t})),e.setStyleRelation("background",["background-color"])}function Qr(e){e.setNormalizer("border",(e=>{const{color:t,style:o,width:i}=ra(e);return{path:"border",value:{color:Ur(t),style:Ur(o),width:Ur(i)}}})),e.setNormalizer("border-top",ea("top")),e.setNormalizer("border-right",ea("right")),e.setNormalizer("border-bottom",ea("bottom")),e.setNormalizer("border-left",ea("left")),e.setNormalizer("border-color",ta("color")),e.setNormalizer("border-width",ta("width")),e.setNormalizer("border-style",ta("style")),e.setNormalizer("border-top-color",ia("color","top")),e.setNormalizer("border-top-style",ia("style","top")),e.setNormalizer("border-top-width",ia("width","top")),e.setNormalizer("border-right-color",ia("color","right")),e.setNormalizer("border-right-style",ia("style","right")),e.setNormalizer("border-right-width",ia("width","right")),e.setNormalizer("border-bottom-color",ia("color","bottom")),e.setNormalizer("border-bottom-style",ia("style","bottom")),e.setNormalizer("border-bottom-width",ia("width","bottom")),e.setNormalizer("border-left-color",ia("color","left")),e.setNormalizer("border-left-style",ia("style","left")),e.setNormalizer("border-left-width",ia("width","left")),e.setExtractor("border-top",sa("top")),e.setExtractor("border-right",sa("right")),e.setExtractor("border-bottom",sa("bottom")),e.setExtractor("border-left",sa("left")),e.setExtractor("border-top-color","border.color.top"),e.setExtractor("border-right-color","border.color.right"),e.setExtractor("border-bottom-color","border.color.bottom"),e.setExtractor("border-left-color","border.color.left"),e.setExtractor("border-top-width","border.width.top"),e.setExtractor("border-right-width","border.width.right"),e.setExtractor("border-bottom-width","border.width.bottom"),e.setExtractor("border-left-width","border.width.left"),e.setExtractor("border-top-style","border.style.top"),e.setExtractor("border-right-style","border.style.right"),e.setExtractor("border-bottom-style","border.style.bottom"),e.setExtractor("border-left-style","border.style.left"),e.setReducer("border-color",Kr("border-color")),e.setReducer("border-style",Kr("border-style")),e.setReducer("border-width",Kr("border-width")),e.setReducer("border-top",aa("top")),e.setReducer("border-right",aa("right")),e.setReducer("border-bottom",aa("bottom")),e.setReducer("border-left",aa("left")),e.setReducer("border",function(){return t=>{const o=na(t,"top"),i=na(t,"right"),s=na(t,"bottom"),n=na(t,"left"),r=[o,i,s,n],a={width:e(r,"width"),style:e(r,"style"),color:e(r,"color")},c=ca(a,"all");if(c.length)return c;return[...Object.entries(a).reduce(((e,[t,o])=>(o&&(e.push([`border-${t}`,o]),r.forEach((e=>delete e[t]))),e)),[]),...ca(o,"top"),...ca(i,"right"),...ca(s,"bottom"),...ca(n,"left")]};function e(e,t){return e.map((e=>e[t])).reduce(((e,t)=>e==t?e:null))}}()),e.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),e.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),e.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),e.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),e.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),e.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function ea(e){return t=>{const{color:o,style:i,width:s}=ra(t),n={};return void 0!==o&&(n.color={[e]:o}),void 0!==i&&(n.style={[e]:i}),void 0!==s&&(n.width={[e]:s}),{path:"border",value:n}}}function ta(e){return t=>({path:"border",value:oa(t,e)})}function oa(e,t){return{[t]:Ur(e)}}function ia(e,t){return o=>({path:"border",value:{[e]:{[t]:o}}})}function sa(e){return(t,o)=>{if(o.border)return na(o.border,e)}}function na(e,t){const o={};return e.width&&e.width[t]&&(o.width=e.width[t]),e.style&&e.style[t]&&(o.style=e.style[t]),e.color&&e.color[t]&&(o.color=e.color[t]),o}function ra(e){const t={},o=Yr(e);for(const e of o)Vr(e)||/thin|medium|thick/.test(e)?t.width=e:Br(e)?t.style=e:t.color=e;return t}function aa(e){return t=>ca(t,e)}function ca(e,t){const o=[];if(e&&e.width&&o.push("width"),e&&e.style&&o.push("style"),e&&e.color&&o.push("color"),3==o.length){const i=o.map((t=>e[t])).join(" ");return["all"==t?["border",i]:[`border-${t}`,i]]}return"all"==t?[]:o.map((o=>[`border-${t}-${o}`,e[o]]))}function la(e){e.setNormalizer("margin",Jr("margin")),e.setNormalizer("margin-top",(e=>({path:"margin.top",value:e}))),e.setNormalizer("margin-right",(e=>({path:"margin.right",value:e}))),e.setNormalizer("margin-bottom",(e=>({path:"margin.bottom",value:e}))),e.setNormalizer("margin-left",(e=>({path:"margin.left",value:e}))),e.setReducer("margin",Kr("margin")),e.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}function da(e){e.setNormalizer("padding",Jr("padding")),e.setNormalizer("padding-top",(e=>({path:"padding.top",value:e}))),e.setNormalizer("padding-right",(e=>({path:"padding.right",value:e}))),e.setNormalizer("padding-bottom",(e=>({path:"padding.bottom",value:e}))),e.setNormalizer("padding-left",(e=>({path:"padding.left",value:e}))),e.setReducer("padding",Kr("padding")),e.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}},"./packages/ckeditor5-enter/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{C:()=>h,G:()=>g});var i=o("./packages/ckeditor5-core/src/index.ts");function*s(e,t){for(const o of t)o&&e.getAttributeProperties(o[0]).copyOnEnter&&(yield o)}class n extends i.mY{execute(){this.editor.model.change((e=>{this.enterBlock(e),this.fire("afterExecute",{writer:e})}))}enterBlock(e){const t=this.editor.model,o=t.document.selection,i=t.schema,n=o.isCollapsed,a=o.getFirstRange(),c=a.start.parent,l=a.end.parent;if(i.isLimit(c)||i.isLimit(l))return n||c!=l||t.deleteContent(o),!1;if(n){const t=s(e.model.schema,o.getAttributes());return r(e,a.start),e.setSelectionAttribute(t),!0}{const i=!(a.start.isAtStart&&a.end.isAtEnd),s=c==l;if(t.deleteContent(o,{leaveUnmerged:i}),i){if(s)return r(e,o.focus),!0;e.setSelection(l,0)}}return!1}}function r(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}var a=o("./packages/ckeditor5-engine/src/index.ts"),c=o("./packages/ckeditor5-utils/src/index.ts");const l={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class d extends a.Qj{constructor(e){super(e);const t=this.document;let o=!1;t.on("keydown",((e,t)=>{o=t.shiftKey})),t.on("beforeinput",((i,s)=>{if(!this.isEnabled)return;let n=s.inputType;c.OB.isSafari&&o&&"insertParagraph"==n&&(n="insertLineBreak");const r=s.domEvent,d=l[n];if(!d)return;const h=new a.r7(t,"enter",s.targetRanges[0]);t.fire(h,new a.dK(e,r,{isSoft:d.isSoft})),h.stop.called&&i.stop()}))}observe(){}stopObserving(){}}class h extends i.Sy{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,o=t.document;t.addObserver(d),e.commands.add("enter",new n(e)),this.listenTo(o,"enter",((i,s)=>{o.isComposing||s.preventDefault(),s.isSoft||(e.execute("enter"),t.scrollToTheSelection())}),{priority:"low"})}}class u extends i.mY{execute(){const e=this.editor.model,t=e.document;e.change((o=>{!function(e,t,o){const i=o.isCollapsed,n=o.getFirstRange(),r=n.start.parent,a=n.end.parent,c=r==a;if(i){const i=s(e.schema,o.getAttributes());p(e,t,n.end),t.removeSelectionAttribute(o.getAttributeKeys()),t.setSelectionAttribute(i)}else{const i=!(n.start.isAtStart&&n.end.isAtEnd);e.deleteContent(o,{leaveUnmerged:i}),c?p(e,t,o.focus):i&&t.setSelection(a,0)}}(e,o,t.selection),this.fire("afterExecute",{writer:o})}))}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const o=t.anchor;if(!o||!e.checkChild(o,"softBreak"))return!1;const i=t.getFirstRange(),s=i.start.parent,n=i.end.parent;if((f(s,e)||f(n,e))&&s!==n)return!1;return!0}(e.schema,t.selection)}}function p(e,t,o){const i=t.createElement("softBreak");e.insertContent(i,o),t.setSelection(i,"after")}function f(e,t){return!e.is("rootElement")&&(t.isLimit(e)||f(e.parent,t))}class g extends i.Sy{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,o=e.conversion,i=e.editing.view,s=i.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),o.for("upcast").elementToElement({model:"softBreak",view:"br"}),o.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),i.addObserver(d),e.commands.add("shiftEnter",new u(e)),this.listenTo(s,"enter",((t,o)=>{s.isComposing||o.preventDefault(),o.isSoft&&(e.execute("shiftEnter"),i.scrollToTheSelection())}),{priority:"low"})}}},"./packages/ckeditor5-typing/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{HG:()=>w,II:()=>d,BT:()=>r,cL:()=>D,uL:()=>y,mh:()=>x,Mq:()=>k,VD:()=>F,r9:()=>L,Up:()=>v,Im:()=>Z});var i=o("./packages/ckeditor5-core/src/index.ts"),s=o("./packages/ckeditor5-utils/src/index.ts");class n{constructor(e,t=20){this._batch=null,this.model=e,this._size=0,this.limit=t,this._isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(e){this._size+=e,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e=!1){this.isLocked&&!e||(this._batch=null,this._size=0)}}class r extends i.mY{constructor(e,t){super(e),this._buffer=new n(e.model,t),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,o=t.document,i=e.text||"",s=i.length;let n=o.selection;if(e.selection?n=e.selection:e.range&&(n=t.createSelection(e.range)),!t.canEditAt(n))return;const r=e.resultRange;t.enqueueChange(this._buffer.batch,(e=>{this._buffer.lock(),t.deleteContent(n),i&&t.insertContent(e.createText(i,o.selection.getAttributes()),n),r?e.setSelection(r):n.is("documentSelection")||e.setSelection(n),this._buffer.unlock(),this._buffer.input(s)}))}}var a=o("./packages/ckeditor5-engine/src/index.ts");const c=["insertText","insertReplacementText"];class l extends a.Qj{constructor(e){super(e),s.OB.isAndroid&&c.push("insertCompositionText");const t=e.document;t.on("beforeinput",((o,i)=>{if(!this.isEnabled)return;const{data:n,targetRanges:r,inputType:l,domEvent:d}=i;if(!c.includes(l))return;const h=new s.M3(t,"insertText");t.fire(h,new a.dK(e,d,{text:n,selection:e.createSelection(r)})),h.stop.called&&o.stop()})),t.on("compositionend",((o,{data:i,domEvent:n})=>{this.isEnabled&&!s.OB.isAndroid&&i&&t.fire("insertText",new a.dK(e,n,{text:i,selection:t.selection}))}),{priority:"lowest"})}observe(){}stopObserving(){}}class d extends i.Sy{static get pluginName(){return"Input"}init(){const e=this.editor,t=e.model,o=e.editing.view,i=t.document.selection;o.addObserver(l);const n=new r(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",n),e.commands.add("input",n),this.listenTo(o.document,"insertText",((i,n)=>{o.document.isComposing||n.preventDefault();const{text:r,selection:a,resultRange:c}=n,l=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));let d=r;if(s.OB.isAndroid){const e=Array.from(l[0].getItems()).reduce(((e,t)=>e+(t.is("$textProxy")?t.data:"")),"");e&&(e.length<=d.length?d.startsWith(e)&&(d=d.substring(e.length),l[0].start=l[0].start.getShiftedBy(e.length)):e.startsWith(d)&&(l[0].start=l[0].start.getShiftedBy(d.length),d=""))}const h={text:d,selection:t.createSelection(l)};c&&(h.resultRange=e.editing.mapper.toModelRange(c)),e.execute("insertText",h)})),s.OB.isAndroid?this.listenTo(o.document,"keydown",((e,s)=>{!i.isCollapsed&&229==s.keyCode&&o.document.isComposing&&h(t,n)})):this.listenTo(o.document,"compositionstart",(()=>{i.isCollapsed||h(t,n)}))}}function h(e,t){if(!t.isEnabled)return;const o=t.buffer;o.lock(),e.enqueueChange(o.batch,(()=>{e.deleteContent(e.document.selection)})),o.unlock()}class u extends i.mY{constructor(e,t){super(e),this.direction=t,this._buffer=new n(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,o=t.document;t.enqueueChange(this._buffer.batch,(i=>{this._buffer.lock();const n=i.createSelection(e.selection||o.selection);if(!t.canEditAt(n))return;const r=e.sequence||1,a=n.isCollapsed;if(n.isCollapsed&&t.modifySelection(n,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(r))return void this._replaceEntireContentWithParagraph(i);if(this._shouldReplaceFirstBlockWithParagraph(n,r))return void this.editor.execute("paragraph",{selection:n});if(n.isCollapsed)return;let c=0;n.getFirstRange().getMinimalFlatRanges().forEach((e=>{c+=(0,s.QX)(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),t.deleteContent(n,{doNotResetEntireContent:a,direction:this.direction}),this._buffer.input(c),i.setSelection(n),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,o=t.document.selection,i=t.schema.getLimitElement(o);if(!(o.isCollapsed&&o.containsEntireContent(i)))return!1;if(!t.schema.checkChild(i,"paragraph"))return!1;const s=i.getChild(0);return!s||!s.is("element","paragraph")}_replaceEntireContentWithParagraph(e){const t=this.editor.model,o=t.document.selection,i=t.schema.getLimitElement(o),s=e.createElement("paragraph");e.remove(e.createRangeIn(i)),e.insert(s,i),e.setSelection(s,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const o=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const i=e.getFirstPosition(),s=o.schema.getLimitElement(i),n=s.getChild(0);return i.parent==n&&(!!e.containsEntireContent(n)&&(!!o.schema.checkChild(s,"paragraph")&&"paragraph"!=n.name))}}const p="word",f="selection",g="backward",m="forward",b={deleteContent:{unit:f,direction:g},deleteContentBackward:{unit:"codePoint",direction:g},deleteWordBackward:{unit:p,direction:g},deleteHardLineBackward:{unit:f,direction:g},deleteSoftLineBackward:{unit:f,direction:g},deleteContentForward:{unit:"character",direction:m},deleteWordForward:{unit:p,direction:m},deleteHardLineForward:{unit:f,direction:m},deleteSoftLineForward:{unit:f,direction:m}};class _ extends a.Qj{constructor(e){super(e);const t=e.document;let o=0;t.on("keydown",(()=>{o++})),t.on("keyup",(()=>{o=0})),t.on("beforeinput",((i,n)=>{if(!this.isEnabled)return;const{targetRanges:r,domEvent:c,inputType:l}=n,d=b[l];if(!d)return;const h={direction:d.direction,unit:d.unit,sequence:o};h.unit==f&&(h.selectionToRemove=e.createSelection(r[0])),"deleteContentBackward"===l&&(s.OB.isAndroid&&(h.sequence=1),function(e){if(1!=e.length||e[0].isCollapsed)return!1;const t=e[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let o=0;for(const{nextPosition:e}of t){if(e.parent.is("$text")){const t=e.parent.data,i=e.offset;if((0,s.to)(t,i)||(0,s.pp)(t,i)||(0,s.YK)(t,i))continue;o++}else o++;if(o>1)return!0}return!1}(r)&&(h.unit=f,h.selectionToRemove=e.createSelection(r)));const u=new a.r7(t,"delete",r[0]);t.fire(u,new a.dK(e,c,h)),u.stop.called&&i.stop()})),s.OB.isBlink&&function(e){const t=e.view,o=t.document;let i=null,n=!1;function r(e){return e==s.Do.backspace||e==s.Do.delete}function c(e){return e==s.Do.backspace?g:m}o.on("keydown",((e,{keyCode:t})=>{i=t,n=!1})),o.on("keyup",((s,{keyCode:l,domEvent:d})=>{const h=o.selection,u=e.isEnabled&&l==i&&r(l)&&!h.isCollapsed&&!n;if(i=null,u){const e=h.getFirstRange(),i=new a.r7(o,"delete",e),s={unit:f,direction:c(l),selectionToRemove:h};o.fire(i,new a.dK(t,d,s))}})),o.on("beforeinput",((e,{inputType:t})=>{const o=b[t];r(i)&&o&&o.direction==c(i)&&(n=!0)}),{priority:"high"}),o.on("beforeinput",((e,{inputType:t,data:o})=>{i==s.Do.delete&&"insertText"==t&&""==o&&e.stop()}),{priority:"high"})}(this)}observe(){}stopObserving(){}}class w extends i.Sy{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,o=t.document,i=e.model.document;t.addObserver(_),this._undoOnBackspace=!1;const s=new u(e,"forward");e.commands.add("deleteForward",s),e.commands.add("forwardDelete",s),e.commands.add("delete",new u(e,"backward")),this.listenTo(o,"delete",((i,s)=>{o.isComposing||s.preventDefault();const{direction:n,sequence:r,selectionToRemove:a,unit:c}=s,l="forward"===n?"deleteForward":"delete",d={sequence:r};if("selection"==c){const t=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));d.selection=e.model.createSelection(t)}else d.unit=c;e.execute(l,d),t.scrollToTheSelection()}),{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(o,"delete",((t,o)=>{this._undoOnBackspace&&"backward"==o.direction&&1==o.sequence&&"codePoint"==o.unit&&(this._undoOnBackspace=!1,e.execute("undo"),o.preventDefault(),t.stop())}),{context:"$capture"}),this.listenTo(i,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class k extends i.Sy{static get requires(){return[d,w]}static get pluginName(){return"Typing"}}function v(e,t){let o=e.start;return{text:Array.from(e.getItems()).reduce(((e,i)=>i.is("$text")||i.is("$textProxy")?e+i.data:(o=t.createPositionAfter(i),"")),""),range:t.createRange(o,e.end)}}class y extends((0,s.Re)()){constructor(e,t){super(),this.model=e,this.testCallback=t,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))})),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",((t,{directChange:o})=>{o&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))})),this.listenTo(e,"change:data",((e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})}))}_evaluateTextBeforeSelection(e,t={}){const o=this.model,i=o.document.selection,s=o.createRange(o.createPositionAt(i.focus.parent,0),i.focus),{text:n,range:r}=v(s,o),a=this.testCallback(n);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const o=Object.assign(t,{text:n,range:r});"object"==typeof a&&Object.assign(o,a),this.fire(`matched:${e}`,o)}}}class x extends i.Sy{constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}static get pluginName(){return"TwoStepCaretMovement"}init(){const e=this.editor,t=e.model,o=e.editing.view,i=e.locale,n=t.document.selection;this.listenTo(o.document,"arrowKey",((e,t)=>{if(!n.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const o=t.keyCode==s.Do.arrowright,r=t.keyCode==s.Do.arrowleft;if(!o&&!r)return;const a=i.contentLanguageDirection;let c=!1;c="ltr"===a&&o||"rtl"===a&&r?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===c&&e.stop()}),{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(n,"change:range",((e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&A(n.getFirstPosition(),this.attributes)||this._restoreGravity())}))}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,o=this.editor.model.document.selection,i=o.getFirstPosition();return!this._isGravityOverridden&&((!i.isAtStart||!P(o,t))&&(!!A(i,t)&&(T(e),this._overrideGravity(),!0)))}_handleBackwardMovement(e){const t=this.attributes,o=this.editor.model,i=o.document.selection,s=i.getFirstPosition();return this._isGravityOverridden?(T(e),this._restoreGravity(),E(o,t,s),!0):s.isAtStart?!!P(i,t)&&(T(e),E(o,t,s),!0):!!function(e,t){const o=e.getShiftedBy(-1);return A(o,t)}(s,t)&&(s.isAtEnd&&!P(i,t)&&A(s,t)?(T(e),E(o,t,s),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((e=>e.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function P(e,t){for(const o of t)if(e.hasAttribute(o))return!0;return!1}function E(e,t,o){const i=o.nodeBefore;e.change((e=>{i?e.setSelectionAttribute(i.getAttributes()):e.removeSelectionAttribute(t)}))}function T(e){e.preventDefault()}function A(e,t){const{nodeBefore:o,nodeAfter:i}=e;for(const e of t){const t=o?o.getAttribute(e):void 0;if((i?i.getAttribute(e):void 0)!==t)return!0}return!1}var C=o("./node_modules/lodash-es/toString.js"),S=/[\\^$.*+?()[\]{}|]/g,O=RegExp(S.source);const R=function(e){return(e=(0,C.Z)(e))&&O.test(e)?e.replace(S,"\\$&"):e},M={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"â„¢"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"â…“",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"â…”",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"â†"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:z('"'),to:[null,"“",null,"â€"]},quotesSecondary:{from:z("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:z("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:z('"'),to:[null,"“",null,"â€"]},quotesPrimaryPl:{from:z('"'),to:[null,"„",null,"â€"]},quotesSecondaryPl:{from:z("'"),to:[null,"‚",null,"’"]}},j={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},B=["symbols","mathematical","typography","quotes"];class D extends i.Sy{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}constructor(e){super(e),e.config.define("typing",{transformations:{include:B}})}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTransformationWatchers()}_enableTransformationWatchers(){const e=this.editor,t=e.model,o=e.plugins.get("Delete"),i=function(e){const t=e.extra||[],o=e.remove||[],i=e=>!o.includes(e);return function(e){const t=new Set;for(const o of e)if("string"==typeof o&&j[o])for(const e of j[o])t.add(e);else t.add(o);return Array.from(t)}(e.include.concat(t).filter(i)).filter(i).map((e=>"string"==typeof e&&M[e]?M[e]:e)).filter((e=>"object"==typeof e)).map((e=>({from:V(e.from),to:I(e.to)})))}(e.config.get("typing.transformations")),s=new y(e.model,(e=>{for(const t of i){if(t.from.test(e))return{normalizedTransformation:t}}}));s.on("matched:data",((e,i)=>{if(!i.batch.isTyping)return;const{from:s,to:n}=i.normalizedTransformation,r=s.exec(i.text),a=n(r.slice(1)),c=i.range;let l=r.index;t.enqueueChange((e=>{for(let o=1;o<r.length;o++){const i=r[o],s=a[o-1];if(null==s){l+=i.length;continue}const n=c.start.getShiftedBy(l),d=t.createRange(n,n.getShiftedBy(i.length)),h=N(n);t.insertContent(e.createText(s,h),d),l+=s.length}t.enqueueChange((()=>{o.requestUndoOnBackspace()}))}))})),s.bind("isEnabled").to(this)}}function V(e){return"string"==typeof e?new RegExp(`(${R(e)})$`):e}function I(e){return"string"==typeof e?()=>[e]:e instanceof Array?()=>e:e}function N(e){return(e.textNode?e.textNode:e.nodeAfter).getAttributes()}function z(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function F(e,t,o,i){return i.createRange(L(e,t,o,!0,i),L(e,t,o,!1,i))}function L(e,t,o,i,s){let n=e.textNode||(i?e.nodeBefore:e.nodeAfter),r=null;for(;n&&n.getAttribute(t)==o;)r=n,n=i?n.previousSibling:n.nextSibling;return r?s.createPositionAt(r,i?"before":"after"):e}function Z(e,t,o,i){const s=e.editing.view,n=new Set;s.document.registerPostFixer((s=>{const r=e.model.document.selection;let a=!1;if(r.hasAttribute(t)){const c=F(r.getFirstPosition(),t,r.getAttribute(t),e.model),l=e.editing.mapper.toViewRange(c);for(const e of l.getItems())e.is("element",o)&&!e.hasClass(i)&&(s.addClass(i,e),n.add(e),a=!0)}return a})),e.conversion.for("editingDowncast").add((e=>{function t(){s.change((e=>{for(const t of n.values())e.removeClass(i,t),n.delete(t)}))}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})}))}},"./packages/ckeditor5-ui/src/index.ts":(e,t,o)=>{"use strict";function i({emitter:e,activator:t,callback:o,contextElements:i}){e.listenTo(document,"mousedown",((e,s)=>{if(!t())return;const n="function"==typeof s.composedPath?s.composedPath():[],r="function"==typeof i?i():i;for(const e of r)if(e.contains(s.target)||n.includes(e))return;o()}))}function s(e){const t=e;t.set("_isCssTransitionsDisabled",!1),t.disableCssTransitions=()=>{t._isCssTransitionsDisabled=!0},t.enableCssTransitions=()=>{t._isCssTransitionsDisabled=!1},t.extendTemplate({attributes:{class:[t.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}function n(e){return class extends e{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...e){super(...e),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}}function r({view:e}){e.listenTo(e.element,"submit",((t,o)=>{o.preventDefault(),e.fire("submit")}),{useCapture:!0})}function a({keystrokeHandler:e,focusTracker:t,gridItems:o,numberOfColumns:i,uiLanguageDirection:s}){const n="number"==typeof i?()=>i:i;function r(e){return i=>{const s=o.find((e=>e.element===t.focusedElement)),n=o.getIndex(s),r=e(n,o);o.get(r).focus(),i.stopPropagation(),i.preventDefault()}}function a(e,t){return e===t-1?0:e+1}function c(e,t){return 0===e?t-1:e-1}e.set("arrowright",r(((e,t)=>"rtl"===s?c(e,t.length):a(e,t.length)))),e.set("arrowleft",r(((e,t)=>"rtl"===s?a(e,t.length):c(e,t.length)))),e.set("arrowup",r(((e,t)=>{let o=e-n();return o<0&&(o=e+n()*Math.floor(t.length/n()),o>t.length-1&&(o-=n())),o}))),e.set("arrowdown",r(((e,t)=>{let o=e+n();return o>t.length-1&&(o=e%n()),o})))}o.d(t,{no:()=>so,Jf:()=>ii,ee:()=>di,BK:()=>N,py:()=>Bo,r5:()=>q,J6:()=>te,su:()=>hi,J2:()=>zt,_9:()=>X,_Y:()=>$t,WB:()=>Go,RX:()=>n,J0:()=>Te,G2:()=>ke,_n:()=>Pe,S8:()=>So,fF:()=>jo,I0:()=>Ae,Gp:()=>zo,mO:()=>Z,VY:()=>Fo,r1:()=>Vo,Xs:()=>we,pq:()=>_e,Em:()=>be,Dn:()=>he,KP:()=>fe,dn:()=>$e,Bv:()=>We,Hn:()=>Wo,P_:()=>Lo,Rm:()=>Ke,lp:()=>ti,BM:()=>K,YS:()=>b,$y:()=>Se,jB:()=>Ie,gE:()=>uo,G7:()=>f,vX:()=>l,IJ:()=>a,Pm:()=>ot,up:()=>et,eC:()=>i,t9:()=>Qe,FH:()=>at,sh:()=>rt,R:()=>nt,Mh:()=>st,k6:()=>G,fe:()=>s,S1:()=>J,jY:()=>Y,iw:()=>Re,GI:()=>r});var c=o("./packages/ckeditor5-utils/src/index.ts");class l extends c.FE{constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",((e,t,o)=>{this._renderViewIntoCollectionParent(t,o)})),this.on("remove",((e,t)=>{t.element&&this._parentElement&&t.element.remove()})),this._parentElement=null}destroy(){this.map((e=>e.destroy()))}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!e.every((e=>"string"==typeof e)))throw new c.Bb("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const o of this)for(const i of e)o.delegate(i).to(t);this.on("add",((o,i)=>{for(const o of e)i.delegate(o).to(t)})),this.on("remove",((o,i)=>{for(const o of e)i.stopDelegating(o,t)}))}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}remove(e){return super.remove(e)}}var d=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),h=o.n(d),u=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/globals/globals.css"),p={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(u.Z,p);u.Z.locals;class f extends((0,c.Xu)((0,c.Re)())){constructor(e){super(),this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new c.FE,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((t,o)=>{o.locale=e,o.t=e&&e.t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=b.bind(this,this)}createCollection(e){const t=new l(e);return this._viewCollections.add(t),t}registerChild(e){(0,c.TW)(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){(0,c.TW)(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new b(e)}extendTemplate(e){b.extend(this.template,e)}render(){if(this.isRendered)throw new c.Bb("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((e=>e.destroy())),this.template&&this.template._revertData&&this.template.revert(this.element)}}var g=o("./node_modules/lodash-es/cloneDeepWith.js"),m=o("./node_modules/lodash-es/isObject.js");class b extends((0,c.ln)()){constructor(e){super(),Object.assign(this,A(T(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new c.Bb("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const o of t.children)j(o)?yield o:B(o)&&(yield*e(o))}(this)}static bind(e,t){return{to:(o,i)=>new w({eventNameOrFunction:o,attribute:o,observable:e,emitter:t,callback:i}),if:(o,i,s)=>new k({observable:e,emitter:t,attribute:o,valueIfTrue:i,callback:s})}}static extend(e,t){if(e._isRendered)throw new c.Bb("template-extend-render",[this,e]);R(e,A(T(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new c.Bb("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),v(this.text)?this._bindToObservable({schema:this.text,updater:x(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,o=e.revertData;for(const i in this.attributes){const s=t.getAttribute(i),n=this.attributes[i];o&&(o.attributes[i]=s);const r=V(n)?n[0].ns:null;if(v(n)){const a=V(n)?n[0].value:n;o&&I(i)&&a.unshift(s),this._bindToObservable({schema:a,updater:P(t,i,r),data:e})}else if("style"==i&&"string"!=typeof n[0])this._renderStyleAttribute(n[0],e);else{o&&s&&I(i)&&n.unshift(s);const e=n.map((e=>e&&e.value||e)).reduce(((e,t)=>e.concat(t)),[]).reduce(S,"");M(e)||t.setAttributeNS(r,i,e)}}}_renderStyleAttribute(e,t){const o=t.node;for(const i in e){const s=e[i];v(s)?this._bindToObservable({schema:[s],updater:E(o,i),data:t}):o.style[i]=s}}_renderElementChildren(e){const t=e.node,o=e.intoFragment?document.createDocumentFragment():t,i=e.isApplying;let s=0;for(const n of this.children)if(D(n)){if(!i){n.setParent(t);for(const e of n)o.appendChild(e.element)}}else if(j(n))i||(n.isRendered||n.render(),o.appendChild(n.element));else if((0,c.UG)(n))o.appendChild(n);else if(i){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),n._renderNode({intoFragment:!1,node:o.childNodes[s++],isApplying:!0,revertData:t})}else o.appendChild(n.render());e.intoFragment&&t.appendChild(o)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const o=this.eventListeners[t].map((o=>{const[i,s]=t.split("@");return o.activateDomEventListener(i,s,e)}));e.revertData&&e.revertData.bindings.push(o)}}_bindToObservable({schema:e,updater:t,data:o}){const i=o.revertData;y(e,t,o);const s=e.filter((e=>!M(e))).filter((e=>e.observable)).map((i=>i.activateAttributeListener(e,t,o)));i&&i.bindings.push(s)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)return void(e.textContent=t.text);const o=e;for(const e in t.attributes){const i=t.attributes[e];null===i?o.removeAttribute(e):o.setAttribute(e,i)}for(let e=0;e<t.children.length;++e)this._revertTemplateFromNode(o.childNodes[e],t.children[e])}}class _{constructor(e){this.attribute=e.attribute,this.observable=e.observable,this.emitter=e.emitter,this.callback=e.callback}getValue(e){const t=this.observable[this.attribute];return this.callback?this.callback(t,e):t}activateAttributeListener(e,t,o){const i=()=>y(e,t,o);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,i),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,i)}}}class w extends _{constructor(e){super(e),this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,o){const i=(e,o)=>{t&&!o.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(o):this.observable.fire(this.eventNameOrFunction,o))};return this.emitter.listenTo(o.node,e,i),()=>{this.emitter.stopListening(o.node,e,i)}}}class k extends _{constructor(e){super(e),this.valueIfTrue=e.valueIfTrue}getValue(e){return!M(super.getValue(e))&&(this.valueIfTrue||!0)}}function v(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(v):e instanceof _)}function y(e,t,{node:o}){const i=function(e,t){return e.map((e=>e instanceof _?e.getValue(t):e))}(e,o);let s;s=1==e.length&&e[0]instanceof k?i[0]:i.reduce(S,""),M(s)?t.remove():t.set(s)}function x(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function P(e,t,o){return{set(i){e.setAttributeNS(o,t,i)},remove(){e.removeAttributeNS(o,t)}}}function E(e,t){return{set(o){e.style[t]=o},remove(){e.style[t]=null}}}function T(e){return(0,g.Z)(e,(e=>{if(e&&(e instanceof _||B(e)||j(e)||D(e)))return e}))}function A(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=(0,c.qo)(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)C(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=(0,c.qo)(e[t].value)),C(e,t)}(e.attributes);const t=[];if(e.children)if(D(e.children))t.push(e.children);else for(const o of e.children)B(o)||j(o)||(0,c.UG)(o)?t.push(o):t.push(new b(o));e.children=t}return e}function C(e,t){e[t]=(0,c.qo)(e[t])}function S(e,t){return M(t)?e:M(e)?t:`${e} ${t}`}function O(e,t){for(const o in t)e[o]?e[o].push(...t[o]):e[o]=t[o]}function R(e,t){if(t.attributes&&(e.attributes||(e.attributes={}),O(e.attributes,t.attributes)),t.eventListeners&&(e.eventListeners||(e.eventListeners={}),O(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new c.Bb("ui-template-extend-children-mismatch",e);let o=0;for(const i of t.children)R(e.children[o++],i)}}function M(e){return!e&&0!==e}function j(e){return e instanceof f}function B(e){return e instanceof b}function D(e){return e instanceof l}function V(e){return(0,m.Z)(e[0])&&e[0].ns}function I(e){return"class"==e||"style"==e}class N extends l{constructor(e,t=[]){super(t),this.locale=e}attachToDom(){this._bodyCollectionContainer=new b({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=(0,c.az)(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}var z=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/icon/icon.css"),F={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(z.Z,F);z.Z.locals;const L=class extends f{constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon","ck-reset_all-excluded",e.if("isColorInherited","ck-icon_inherit-color")],viewBox:e.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",(()=>{this._updateXMLContent(),this._colorFillPaths()})),this.on("change:fillColor",(()=>{this._colorFillPaths()}))}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");t&&(this.viewBox=t);for(const{name:t,value:o}of Array.from(e.attributes))L.presentationalAttributeNames.includes(t)&&this.element.setAttribute(t,o);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((e=>{e.style.fill=this.fillColor}))}};let Z=L;Z.presentationalAttributeNames=["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"];var W=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/button.css"),$={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(W.Z,$);W.Z.locals;class q extends f{constructor(e){super(e),this._focusDelayed=null;const t=this.bindTemplate,o=(0,c.hQ)();this.set("ariaChecked",void 0),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${o}`),this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("role",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._createLabelView(),this.iconView=new Z,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const i={tag:"button",attributes:{class:["ck","ck-button",t.to("class"),t.if("isEnabled","ck-disabled",(e=>!e)),t.if("isVisible","ck-hidden",(e=>!e)),t.to("isOn",(e=>e?"ck-on":"ck-off")),t.if("withText","ck-button_with-text"),t.if("withKeystroke","ck-button_with-keystroke")],role:t.to("role"),type:t.to("type",(e=>e||"button")),tabindex:t.to("tabindex"),"aria-label":t.to("ariaLabel"),"aria-labelledby":t.to("ariaLabelledBy"),"aria-disabled":t.if("isEnabled",!0,(e=>!e)),"aria-checked":t.to("isOn"),"aria-pressed":t.to("isOn",(e=>!!this.isToggleable&&String(!!e))),"data-cke-tooltip-text":t.to("_tooltipString"),"data-cke-tooltip-position":t.to("tooltipPosition")},children:this.children,on:{click:t.to((e=>{this.isEnabled?this.fire("execute"):e.preventDefault()}))}};c.OB.isSafari&&(this._focusDelayed||(this._focusDelayed=(0,c.gw)((()=>this.focus()),0)),i.on.mousedown=t.to((()=>{this._focusDelayed()})),i.on.mouseup=t.to((()=>{this._focusDelayed.cancel()}))),this.setTemplate(i)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}destroy(){this._focusDelayed&&this._focusDelayed.cancel(),super.destroy()}_createLabelView(){const e=new f,t=this.bindTemplate;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:t.to("labelStyle"),id:this.ariaLabelledBy},children:[{text:t.to("label")}]}),e}_createKeystrokeView(){const e=new f;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(e=>(0,c.XU)(e)))}]}),e}_getTooltipString(e,t,o){return e?"string"==typeof e?e:(o&&(o=(0,c.XU)(o)),e instanceof Function?e(t,o):`${t}${o?` (${o})`:""}`):""}}var H=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/switchbutton.css"),U={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(H.Z,U);H.Z.locals;class K extends q{constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new f;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}function G(e,t){const o=e.t,i={Black:o("Black"),"Dim grey":o("Dim grey"),Grey:o("Grey"),"Light grey":o("Light grey"),White:o("White"),Red:o("Red"),Orange:o("Orange"),Yellow:o("Yellow"),"Light green":o("Light green"),Green:o("Green"),Aquamarine:o("Aquamarine"),Turquoise:o("Turquoise"),"Light blue":o("Light blue"),Blue:o("Blue"),Purple:o("Purple")};return t.map((e=>{const t=i[e.label];return t&&t!=e.label&&(e.label=t),e}))}function J(e){return e.map(Y).filter((e=>!!e))}function Y(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:`${e.color}`}}}}class X extends q{constructor(e){super(e);const t=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0z"/><path d="M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z"/></svg>',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color")},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-table__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}var Q=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorgrid/colorgrid.css"),ee={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Q.Z,ee);Q.Z.locals;class te extends f{constructor(e,t){super(e);const o=t&&t.colorDefinitions?t.colorDefinitions:[];this.columns=t&&t.columns?t.columns:5;const i={gridTemplateColumns:`repeat( ${this.columns}, 1fr)`};this.set("selectedColor",void 0),this.items=this.createCollection(),this.focusTracker=new c.Rh,this.keystrokes=new c.VD,this.items.on("add",((e,t)=>{t.isOn=t.color===this.selectedColor})),o.forEach((e=>{const t=new X;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",(()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})})),this.items.add(t)})),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:i}}),this.on("change:selectedColor",((e,t,o)=>{for(const e of this.items)e.isOn=e.color===o}))}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),a({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}var oe=o("./node_modules/color-name/index.js");const ie=function(e){var t,o,i=[],s=1;if("string"==typeof e)if(oe[e])i=oe[e].slice(),o="rgb";else if("transparent"===e)s=0,o="rgb",i=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var n=e.slice(1);s=1,(c=n.length)<=4?(i=[parseInt(n[0]+n[0],16),parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16)],4===c&&(s=parseInt(n[3]+n[3],16)/255)):(i=[parseInt(n[0]+n[1],16),parseInt(n[2]+n[3],16),parseInt(n[4]+n[5],16)],8===c&&(s=parseInt(n[6]+n[7],16)/255)),i[0]||(i[0]=0),i[1]||(i[1]=0),i[2]||(i[2]=0),o="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var r=t[1],a="rgb"===r;o=n=r.replace(/a$/,"");var c="cmyk"===n?4:"gray"===n?1:3;i=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===c?parseFloat(e)/100:"rgb"===n?255*parseFloat(e)/100:parseFloat(e);if("h"===n[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==se[e])return se[e]}return parseFloat(e)})),r===n&&i.push(1),s=a||void 0===i[c]?1:i[c],i=i.slice(0,c)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(i=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),o=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(i=[e[0],e[1],e[2]],o="rgb",s=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(o="rgb",i=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(o="hsl",i=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),s=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(s/=100)):(o="rgb",i=[e>>>16,(65280&e)>>>8,255&e]);return{space:o,values:i,alpha:s}};var se={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};var ne=o("./node_modules/color-convert/index.js");function re(e,t){if(!e)return"";const o=ae(e);if(!o)return"";if(o.space===t)return e;if(i=o,!Object.keys(ne).includes(i.space))return"";var i;const s=ne[o.space][t];if(!s)return"";return function(e,t){switch(t){case"hex":return`#${e}`;case"rgb":return`rgb( ${e[0]}, ${e[1]}, ${e[2]} )`;case"hsl":return`hsl( ${e[0]}, ${e[1]}%, ${e[2]}% )`;case"hwb":return`hwb( ${e[0]}, ${e[1]}, ${e[2]} )`;case"lab":return`lab( ${e[0]}% ${e[1]} ${e[2]} )`;case"lch":return`lch( ${e[0]}% ${e[1]} ${e[2]} )`;default:return""}}(s("hex"===o.space?o.hexValue:o.values),t)}function ae(e){if(e.startsWith("#")){const t=ie(e);return{space:"hex",values:t.values,hexValue:e,alpha:t.alpha}}const t=ie(e);return t.space?t:null}var ce=o("./node_modules/lodash-es/debounce.js"),le=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/label/label.css"),de={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(le.Z,de);le.Z.locals;class he extends f{constructor(e){super(e),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${(0,c.hQ)()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}var ue=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css"),pe={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(ue.Z,pe);ue.Z.locals;class fe extends f{constructor(e,t){super(e);const o=`ck-labeled-field-view-${(0,c.hQ)()}`,i=`ck-labeled-field-view-status-${(0,c.hQ)()}`;this.fieldView=t(this,o,i),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(o),this.statusView=this._createStatusView(i),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",((e,t)=>e||t));const s=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",s.to("class"),s.if("isEnabled","ck-disabled",(e=>!e)),s.if("isEmpty","ck-labeled-field-view_empty"),s.if("isFocused","ck-labeled-field-view_focused"),s.if("placeholder","ck-labeled-field-view_placeholder"),s.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(e){const t=new he(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new f(this.locale),o=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",o.if("errorText","ck-labeled-field-view__status_error"),o.if("_statusText","ck-hidden",(e=>!e))],id:e,role:o.if("errorText","alert")},children:[{text:o.to("_statusText")}]}),t}focus(){this.fieldView.focus()}}var ge=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/input/input.css"),me={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(ge.Z,me);ge.Z.locals;class be extends f{constructor(e){super(e),this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.focusTracker=new c.Rh,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0),this.set("inputMode","text");const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),readonly:t.to("isReadOnly"),inputmode:t.to("inputMode"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById")},on:{input:t.to(((...e)=>{this.fire("input",...e),this._updateIsEmpty()})),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",((e,t,o)=>{this._setDomElementValue(o),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(e){this.element.value=e||0===e?e:""}}class _e extends be{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class we extends be{constructor(e,{min:t,max:o,step:i}={}){super(e);const s=this.bindTemplate;this.set("min",t),this.set("max",o),this.set("step",i),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:s.to("min"),max:s.to("max"),step:s.to("step")}})}}class ke extends f{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",(e=>`ck-dropdown__panel_${e}`)),t.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:t.to((e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()}))}})}focus(){if(this.children.length){const e=this.children.first;"function"==typeof e.focus?e.focus():(0,c.KE)("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}var ve=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/dropdown.css"),ye={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(ve.Z,ye);ve.Z.locals;const xe=class extends f{constructor(e,t,o){super(e);const i=this.bindTemplate;this.buttonView=t,this.panelView=o,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.keystrokes=new c.VD,this.focusTracker=new c.Rh,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",i.to("class"),i.if("isEnabled","ck-disabled",(e=>!e))],id:i.to("id"),"aria-describedby":i.to("ariaDescribedById")},children:[t,o]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":i.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",(()=>{this.isOpen=!this.isOpen})),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",((e,t,o)=>{o&&("auto"===this.panelPosition?this.panelView.position=xe._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)})),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.isOpen=!1,t())};this.keystrokes.set("arrowdown",((e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())})),this.keystrokes.set("arrowright",((e,t)=>{this.isOpen&&t()})),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:o,southWest:i,northEast:s,northWest:n,southMiddleEast:r,southMiddleWest:a,northMiddleEast:c,northMiddleWest:l}=xe.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[o,i,r,a,e,s,n,c,l,t]:[i,o,a,r,e,n,s,l,c,t]}};let Pe=xe;Pe.defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-3*(t.width-e.width)/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-3*(t.width-e.width)/4,name:"nmw"})},Pe._getOptimalPosition=c.xZ;const Ee='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/></svg>';class Te extends q{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(e=>String(e)))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Z;return e.content=Ee,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}class Ae{constructor(e){if(this.focusables=e.focusables,this.focusTracker=e.focusTracker,this.keystrokeHandler=e.keystrokeHandler,this.actions=e.actions,e.actions&&e.keystrokeHandler)for(const t in e.actions){let o=e.actions[t];"string"==typeof o&&(o=[o]);for(const i of o)e.keystrokeHandler.set(i,((e,o)=>{this[t](),o()}))}}get first(){return this.focusables.find(Ce)||null}get last(){return this.focusables.filter(Ce).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((t,o)=>{const i=t.element===this.focusTracker.focusedElement;return i&&(e=o),i})),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,o=this.focusables.length;if(!o)return null;if(null===t)return this[1===e?"first":"last"];let i=(t+o+e)%o;do{const t=this.focusables.get(i);if(Ce(t))return t;i=(i+o+e)%o}while(i!==t);return null}}function Ce(e){return!(!e.focus||!(0,c.pn)(e.element))}class Se extends f{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class Oe extends f{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function Re(e){return Array.isArray(e)?{items:e,removeItems:[]}:e?Object.assign({items:[],removeItems:[]},e):{items:[],removeItems:[]}}var Me=o("./packages/ckeditor5-core/src/index.ts"),je=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/toolbar.css"),Be={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(je.Z,Be);je.Z.locals;const{threeVerticalDots:De}=Me.icons,Ve={alignLeft:Me.icons.alignLeft,bold:Me.icons.bold,importExport:Me.icons.importExport,paragraph:Me.icons.paragraph,plus:Me.icons.plus,text:Me.icons.text,threeVerticalDots:Me.icons.threeVerticalDots};class Ie extends f{constructor(e,t){super(e);const o=this.bindTemplate,i=this.t;this.options=t||{},this.set("ariaLabel",i("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new c.Rh,this.keystrokes=new c.VD,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new Ne(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const s="rtl"===e.uiLanguageDirection;this._focusCycler=new Ae({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[s?"arrowright":"arrowleft","arrowup"],focusNext:[s?"arrowleft":"arrowright","arrowdown"]}});const n=["ck","ck-toolbar",o.to("class"),o.if("isCompact","ck-toolbar_compact")];var r;this.options.shouldGroupWhenFull&&this.options.isFloating&&n.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:n,role:"toolbar","aria-label":o.to("ariaLabel"),style:{maxWidth:o.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:(r=this,r.bindTemplate.to((e=>{e.target===r.element&&e.preventDefault()})))}}),this._behavior=this.options.shouldGroupWhenFull?new Fe(this):new ze(this)}render(){super.render(),this.focusTracker.add(this.element);for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,o){this.items.addMany(this._buildItemsFromConfig(e,t,o))}_buildItemsFromConfig(e,t,o){const i=Re(e),s=o||i.removeItems;return this._cleanItemsConfiguration(i.items,t,s).map((e=>(0,m.Z)(e)?this._createNestedToolbarDropdown(e,t,s):"|"===e?new Se:"-"===e?new Oe:t.create(e))).filter((e=>!!e))}_cleanItemsConfiguration(e,t,o){const i=e.filter(((e,i,s)=>"|"===e||-1===o.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||((0,c.KE)("toolbarview-line-break-ignored-when-grouping-items",s),!1):!(!(0,m.Z)(e)&&!t.has(e))||((0,c.KE)("toolbarview-item-unavailable",{item:e}),!1))));return this._cleanSeparatorsAndLineBreaks(i)}_cleanSeparatorsAndLineBreaks(e){const t=e=>"-"!==e&&"|"!==e,o=e.length,i=e.findIndex(t);if(-1===i)return[];const s=o-e.slice().reverse().findIndex(t);return e.slice(i,s).filter(((e,o,i)=>{if(t(e))return!0;return!(o>0&&i[o-1]===e)}))}_createNestedToolbarDropdown(e,t,o){let{label:i,icon:s,items:n,tooltip:r=!0,withText:a=!1}=e;if(n=this._cleanItemsConfiguration(n,t,o),!n.length)return null;const l=Qe(this.locale);return i||(0,c.KE)("toolbarview-nested-toolbar-dropdown-missing-label",e),l.class="ck-toolbar__nested-toolbar-dropdown",l.buttonView.set({label:i,tooltip:r,withText:!!a}),!1!==s?l.buttonView.icon=Ve[s]||s||De:l.buttonView.withText=!0,et(l,(()=>l.toolbarView._buildItemsFromConfig(n,t,o))),l}}class Ne extends f{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class ze{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using((e=>e)),e.focusables.bindTo(e.items).using((e=>e)),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class Fe{constructor(e){this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),e.itemsView.children.bindTo(this.ungroupedItems).using((e=>e)),this.ungroupedItems.on("change",this._updateFocusCycleableItems.bind(this)),e.children.on("change",this._updateFocusCycleableItems.bind(this)),e.items.on("change",((e,t)=>{const o=t.index,i=Array.from(t.added);for(const e of t.removed)o>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=o;e<o+i.length;e++){const t=i[e-o];e>this.ungroupedItems.length?this.groupedItems.add(t,e-this.ungroupedItems.length):this.ungroupedItems.add(t,e)}this._updateGrouping()})),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!(0,c.pn)(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,o=new c.UL(e.lastChild),i=new c.UL(e);if(!this.cachedPadding){const o=c.global.window.getComputedStyle(e),i="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(o[i])}return"ltr"===t?o.right>i.right-this.cachedPadding:o.left<i.left+this.cachedPadding}_enableGroupingOnResize(){let e;this.resizeObserver=new c.do(this.viewElement,(t=>{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new Se),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,o=Qe(e);return o.class="ck-toolbar__grouped-dropdown",o.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",et(o,this.groupedItems),o.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:De}),o}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((e=>{this.viewFocusables.add(e)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}var Le=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/list/list.css"),Ze={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Le.Z,Ze);Le.Z.locals;class We extends f{constructor(e){super(e);const t=this.bindTemplate;this.items=this.createCollection(),this.focusTracker=new c.Rh,this.keystrokes=new c.VD,this._focusCycler=new Ae({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:t.to("role"),"aria-label":t.to("ariaLabel")},children:this.items})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class $e extends f{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",(e=>!e))],role:"presentation"},children:this.children})}focus(){this.children.first.focus()}}class qe extends f{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}var He=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/splitbutton.css"),Ue={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(He.Z,Ue);He.Z.locals;class Ke extends f{constructor(e){super(e);const t=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(),this.arrowView=this._createArrowView(),this.keystrokes=new c.VD,this.focusTracker=new c.Rh,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",t.to("class"),t.if("isVisible","ck-hidden",(e=>!e)),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",((e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())})),this.keystrokes.set("arrowleft",((e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(){const e=new q;return e.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),e.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),e.delegate("execute").to(this),e}_createArrowView(){const e=new q,t=e.bindTemplate;return e.icon=Ee,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}var Ge=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css"),Je={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Ge.Z,Je);Ge.Z.locals;var Ye=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/listdropdown.css"),Xe={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Ye.Z,Xe);Ye.Z.locals;function Qe(e,t=Te){const o=new t(e),s=new ke(e),n=new Pe(e,o,s);return o.bind("isEnabled").to(n),o instanceof Ke?o.arrowView.bind("isOn").to(n,"isOpen"):o.bind("isOn").to(n,"isOpen"),function(e){(function(e){e.on("render",(()=>{i({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})}))})(e),function(e){e.on("execute",(t=>{t.source instanceof K||(e.isOpen=!1)}))}(e),function(e){e.focusTracker.on("change:isFocused",((t,o,i)=>{e.isOpen&&!i&&(e.isOpen=!1)}))}(e),function(e){e.keystrokes.set("arrowdown",((t,o)=>{e.isOpen&&(e.panelView.focus(),o())})),e.keystrokes.set("arrowup",((t,o)=>{e.isOpen&&(e.panelView.focusLast(),o())}))}(e),function(e){e.on("change:isOpen",((t,o,i)=>{if(i)return;const s=e.panelView.element;s&&s.contains(c.global.document.activeElement)&&e.buttonView.focus()}))}(e),function(e){e.on("change:isOpen",((t,o,i)=>{i&&e.panelView.focus()}),{priority:"low"})}(e)}(n),n}function et(e,t,o={}){e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.isOpen?tt(e,t,o):e.once("change:isOpen",(()=>tt(e,t,o)),{priority:"highest"}),o.enableActiveItemFocusOnDropdownOpen&&st(e,(()=>e.toolbarView.items.find((e=>e.isOn))))}function tt(e,t,o){const i=e.locale,s=i.t,n=e.toolbarView=new Ie(i),r="function"==typeof t?t():t;n.ariaLabel=o.ariaLabel||s("Dropdown toolbar"),o.maxWidth&&(n.maxWidth=o.maxWidth),o.class&&(n.class=o.class),o.isCompact&&(n.isCompact=o.isCompact),o.isVertical&&(n.isVertical=!0),r instanceof l?n.items.bindTo(r).using((e=>e)):n.items.addMany(r),e.panelView.children.add(n),n.items.delegate("execute").to(e)}function ot(e,t,o={}){e.isOpen?it(e,t,o):e.once("change:isOpen",(()=>it(e,t,o)),{priority:"highest"}),st(e,(()=>e.listView.items.find((e=>e instanceof $e&&e.children.first.isOn))))}function it(e,t,o){const i=e.locale,s=e.listView=new We(i),n="function"==typeof t?t():t;s.ariaLabel=o.ariaLabel,s.role=o.role,s.items.bindTo(n).using((e=>{if("separator"===e.type)return new qe(i);if("button"===e.type||"switchbutton"===e.type){const t=new $e(i);let o;return o="button"===e.type?new q(i):new K(i),o.bind(...Object.keys(e.model)).to(e.model),o.delegate("execute").to(t),t.children.add(o),t}return null})),e.panelView.children.add(s),s.items.delegate("execute").to(e)}function st(e,t){e.on("change:isOpen",(()=>{if(!e.isOpen)return;const o=t();o&&("function"==typeof o.focus?o.focus():(0,c.KE)("ui-dropdown-focus-child-on-open-child-missing-focus",{view:o}))}),{priority:c.tA.low-10})}function nt(e,t,o){const i=new _e(e.locale);return i.set({id:t,ariaDescribedById:o}),i.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),i.bind("hasError").to(e,"errorText",(e=>!!e)),i.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(i),i}function rt(e,t,o){const i=new we(e.locale);return i.set({id:t,ariaDescribedById:o,inputMode:"numeric"}),i.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),i.bind("hasError").to(e,"errorText",(e=>!!e)),i.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(i),i}function at(e,t,o){const i=Qe(e.locale);return i.set({id:t,ariaDescribedById:o}),i.bind("isEnabled").to(e),i}const ct=(e,t=0,o=1)=>e>o?o:e<t?t:e,lt=(e,t=0,o=Math.pow(10,t))=>Math.round(o*e)/o,dt=(Math.PI,e=>("#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?lt(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?lt(parseInt(e.substring(6,8),16)/255,2):1})),ht=({h:e,s:t,v:o,a:i})=>{const s=(200-t)*o/100;return{h:lt(e),s:lt(s>0&&s<200?t*o/100/(s<=100?s:200-s)*100:0),l:lt(s/2),a:lt(i,2)}},ut=e=>{const{h:t,s:o,l:i}=ht(e);return`hsl(${t}, ${o}%, ${i}%)`},pt=({h:e,s:t,v:o,a:i})=>{e=e/360*6,t/=100,o/=100;const s=Math.floor(e),n=o*(1-t),r=o*(1-(e-s)*t),a=o*(1-(1-e+s)*t),c=s%6;return{r:lt(255*[o,r,n,n,a,o][c]),g:lt(255*[a,o,o,r,n,n][c]),b:lt(255*[n,n,a,o,o,r][c]),a:lt(i,2)}},ft=e=>{const t=e.toString(16);return t.length<2?"0"+t:t},gt=({r:e,g:t,b:o,a:i})=>{const s=i<1?ft(lt(255*i)):"";return"#"+ft(e)+ft(t)+ft(o)+s},mt=({r:e,g:t,b:o,a:i})=>{const s=Math.max(e,t,o),n=s-Math.min(e,t,o),r=n?s===e?(t-o)/n:s===t?2+(o-e)/n:4+(e-t)/n:0;return{h:lt(60*(r<0?r+6:r)),s:lt(s?n/s*100:0),v:lt(s/255*100),a:i}},bt=(e,t)=>{if(e===t)return!0;for(const o in e)if(e[o]!==t[o])return!1;return!0},_t={},wt=e=>{let t=_t[e];return t||(t=document.createElement("template"),t.innerHTML=e,_t[e]=t),t},kt=(e,t,o)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))};let vt=!1;const yt=e=>"touches"in e,xt=(e,t)=>{const o=yt(t)?t.touches[0]:t,i=e.el.getBoundingClientRect();kt(e.el,"move",e.getMove({x:ct((o.pageX-(i.left+window.pageXOffset))/i.width),y:ct((o.pageY-(i.top+window.pageYOffset))/i.height)}))};class Pt{constructor(e,t,o,i){const s=wt(`<div role="slider" tabindex="0" part="${t}" ${o}><div part="${t}-pointer"></div></div>`);e.appendChild(s.content.cloneNode(!0));const n=e.querySelector(`[part=${t}]`);n.addEventListener("mousedown",this),n.addEventListener("touchstart",this),n.addEventListener("keydown",this),this.el=n,this.xy=i,this.nodes=[n.firstChild,n]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(vt?"touchmove":"mousemove",this),t(vt?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!(e=>!(vt&&!yt(e)||(vt||(vt=yt(e)),0)))(e)||!vt&&0!=e.button)return;this.el.focus(),xt(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),xt(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":((e,t)=>{const o=t.keyCode;o>40||e.xy&&o<37||o<33||(t.preventDefault(),kt(e.el,"move",e.getMove({x:39===o?.01:37===o?-.01:34===o?.05:33===o?-.05:35===o?1:36===o?-1:0,y:40===o?.01:38===o?-.01:0},!0)))})(this,e)}}style(e){e.forEach(((e,t)=>{for(const o in e)this.nodes[t].style.setProperty(o,e[o])}))}}class Et extends Pt{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:e/360*100+"%",color:ut({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${lt(e)}`)}getMove(e,t){return{h:t?ct(this.h+360*e.x,0,360):360*e.x}}}class Tt extends Pt{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:100-e.v+"%",left:`${e.s}%`,color:ut(e)},{"background-color":ut({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${lt(e.s)}%, Brightness ${lt(e.v)}%`)}getMove(e,t){return{s:t?ct(this.hsva.s+100*e.x,0,100):100*e.x,v:t?ct(this.hsva.v-100*e.y,0,100):Math.round(100-100*e.y)}}}const At=Symbol("same"),Ct=Symbol("color"),St=Symbol("hsva"),Ot=Symbol("update"),Rt=Symbol("parts"),Mt=Symbol("css"),jt=Symbol("sliders");class Bt extends HTMLElement{static get observedAttributes(){return["color"]}get[Mt](){return[':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',"[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}","[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}"]}get[jt](){return[Tt,Et]}get color(){return this[Ct]}set color(e){if(!this[At](e)){const t=this.colorModel.toHsva(e);this[Ot](t),this[Ct]=e}}constructor(){super();const e=wt(`<style>${this[Mt].join("")}</style>`),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[Rt]=this[jt].map((e=>new e(t)))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,o){const i=this.colorModel.fromAttr(o);this[At](i)||(this.color=i)}handleEvent(e){const t=this[St],o={...t,...e.detail};let i;this[Ot](o),bt(o,t)||this[At](i=this.colorModel.fromHsva(o))||(this[Ct]=i,kt(this,"color-changed",{value:i}))}[At](e){return this.color&&this.colorModel.equal(e,this.color)}[Ot](e){this[St]=e,this[Rt].forEach((t=>t.update(e)))}}const Dt={defaultColor:"#000",toHsva:e=>mt(dt(e)),fromHsva:({h:e,s:t,v:o})=>gt(pt({h:e,s:t,v:o,a:1})),equal:(e,t)=>e.toLowerCase()===t.toLowerCase()||bt(dt(e),dt(t)),fromAttr:e=>e};class Vt extends Bt{get colorModel(){return Dt}}customElements.define("hex-color-picker",class extends Vt{});var It=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorpicker/colorpicker.css"),Nt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(It.Z,Nt);It.Z.locals;class zt extends f{constructor(e,t){super(e),this.set("color",""),this.set("_hexColor",""),this._format=t.format||"hsl",this.hexInputRow=this._createInputRow();const o=this.createCollection();o.add(this.hexInputRow),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker"],tabindex:-1},children:o}),this._debounceColorPickerEvent=(0,ce.Z)((e=>{this.set("color",e)}),150,{leading:!0}),this.on("set:color",((e,t,o)=>{e.return=re(o,this._format)})),this.on("change:color",(()=>{this._hexColor=Ft(this.color)})),this.on("change:_hexColor",(()=>{this.picker.setAttribute("color",this._hexColor),Ft(this.color)!=Ft(this._hexColor)&&(this.color=this._hexColor)}))}render(){if(super.render(),this.picker=c.global.document.createElement("hex-color-picker"),this.picker.setAttribute("class","hex-color-picker"),this.picker.setAttribute("tabindex","-1"),this._createSlidersView(),this.element){this.element.insertBefore(this.picker,this.hexInputRow.element);const e=document.createElement("style");e.textContent='[role="slider"]:focus [part$="pointer"] {border: 1px solid #fff;outline: 1px solid var(--ck-color-focus-border);box-shadow: 0 0 0 2px #fff;}',this.picker.shadowRoot.appendChild(e)}this.picker.addEventListener("color-changed",(e=>{const t=e.detail.value;this._debounceColorPickerEvent(t)}))}focus(){if(c.OB.isGecko||c.OB.isiOS||c.OB.isSafari){this.hexInputRow.children.get(1).focus()}this.slidersView.first.focus()}_createSlidersView(){const e=[...this.picker.shadowRoot.children].filter((e=>"slider"===e.getAttribute("role"))).map((e=>new Lt(e)));this.slidersView=this.createCollection(),e.forEach((e=>{this.slidersView.add(e)}))}_createInputRow(){const e=new Zt,t=this._createColorInput();return new Wt(this.locale,[e,t])}_createColorInput(){const e=new fe(this.locale,nt),{t}=this.locale;return e.set({label:t("HEX"),class:"color-picker-hex-input"}),e.fieldView.bind("value").to(this,"_hexColor",(t=>e.isFocused?e.fieldView.value:t.startsWith("#")?t.substring(1):t)),e.fieldView.on("input",(()=>{const t=e.fieldView.element.value;if(t){const e=t.trim(),o=e.startsWith("#")?e.substring(1):e;[3,4,6,8].includes(o.length)&&/(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})/.test(o)&&this._debounceColorPickerEvent("#"+o)}})),e}}function Ft(e){let t=function(e){if(!e)return"";const t=ae(e);return t?"hex"===t.space?t.hexValue:re(e,"hex"):"#000"}(e);return t||(t="#000"),4===t.length&&(t="#"+[t[1],t[1],t[2],t[2],t[3],t[3]].join("")),t.toLowerCase()}class Lt extends f{constructor(e){super(),this.element=e}focus(){this.element.focus()}}class Zt extends f{constructor(e){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__hash-view"]},children:"#"})}}class Wt extends f{constructor(e,t){super(e),this.children=this.createCollection(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__row"]},children:this.children})}}class $t{constructor(e){this._components=new Map,this.editor=e}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(qt(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new c.Bb("componentfactory-item-missing",this,{name:e});return this._components.get(qt(e)).callback(this.editor.locale)}has(e){return this._components.has(qt(e))}}function qt(e){return String(e).toLowerCase()}var Ht=o("./node_modules/lodash-es/isElement.js"),Ut=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonpanel.css"),Kt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Ut.Z,Kt);Ut.Z.locals;var Gt=Object.defineProperty,Jt=Object.getOwnPropertySymbols,Yt=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,Qt=(e,t,o)=>t in e?Gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,eo=(e,t)=>{for(var o in t||(t={}))Yt.call(t,o)&&Qt(e,o,t[o]);if(Jt)for(var o of Jt(t))Xt.call(t,o)&&Qt(e,o,t[o]);return e};const to=(0,c.nn)("px"),oo=c.global.document.body,io=class extends f{constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",(e=>`ck-balloon-panel_${e}`)),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",to),left:t.to("left",to)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=io.defaultPositions,o=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast,t.viewportStickyNorth],limiter:oo,fitInViewport:!0},e),i=io._getOptimalPosition(o),s=parseInt(i.left),n=parseInt(i.top),r=i.name,a=i.config||{},{withArrow:c=!0}=a;this.top=n,this.left=s,this.position=r,this.withArrow=c}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=no(e.target),o=e.limiter?no(e.limiter):oo;this.listenTo(c.global.document,"scroll",((i,s)=>{const n=s.target,r=t&&n.contains(t),a=o&&n.contains(o);!r&&!a&&t&&o||this.attachTo(e)}),{useCapture:!0}),this.listenTo(c.global.window,"resize",(()=>{this.attachTo(e)}))}_stopPinning(){this.stopListening(c.global.document,"scroll"),this.stopListening(c.global.window,"resize")}};let so=io;function no(e){return(0,Ht.Z)(e)?e:(0,c.bR)(e)?e.commonAncestorContainer:"function"==typeof e?no(e()):null}function ro(e={}){const{sideOffset:t=so.arrowSideOffset,heightOffset:o=so.arrowHeightOffset,stickyVerticalOffset:i=so.stickyVerticalOffset,config:s}=e;return{northWestArrowSouthWest:(e,o)=>eo({top:n(e,o),left:e.left-t,name:"arrow_sw"},s&&{config:s}),northWestArrowSouthMiddleWest:(e,o)=>eo({top:n(e,o),left:e.left-.25*o.width-t,name:"arrow_smw"},s&&{config:s}),northWestArrowSouth:(e,t)=>eo({top:n(e,t),left:e.left-t.width/2,name:"arrow_s"},s&&{config:s}),northWestArrowSouthMiddleEast:(e,o)=>eo({top:n(e,o),left:e.left-.75*o.width+t,name:"arrow_sme"},s&&{config:s}),northWestArrowSouthEast:(e,o)=>eo({top:n(e,o),left:e.left-o.width+t,name:"arrow_se"},s&&{config:s}),northArrowSouthWest:(e,o)=>eo({top:n(e,o),left:e.left+e.width/2-t,name:"arrow_sw"},s&&{config:s}),northArrowSouthMiddleWest:(e,o)=>eo({top:n(e,o),left:e.left+e.width/2-.25*o.width-t,name:"arrow_smw"},s&&{config:s}),northArrowSouth:(e,t)=>eo({top:n(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s"},s&&{config:s}),northArrowSouthMiddleEast:(e,o)=>eo({top:n(e,o),left:e.left+e.width/2-.75*o.width+t,name:"arrow_sme"},s&&{config:s}),northArrowSouthEast:(e,o)=>eo({top:n(e,o),left:e.left+e.width/2-o.width+t,name:"arrow_se"},s&&{config:s}),northEastArrowSouthWest:(e,o)=>eo({top:n(e,o),left:e.right-t,name:"arrow_sw"},s&&{config:s}),northEastArrowSouthMiddleWest:(e,o)=>eo({top:n(e,o),left:e.right-.25*o.width-t,name:"arrow_smw"},s&&{config:s}),northEastArrowSouth:(e,t)=>eo({top:n(e,t),left:e.right-t.width/2,name:"arrow_s"},s&&{config:s}),northEastArrowSouthMiddleEast:(e,o)=>eo({top:n(e,o),left:e.right-.75*o.width+t,name:"arrow_sme"},s&&{config:s}),northEastArrowSouthEast:(e,o)=>eo({top:n(e,o),left:e.right-o.width+t,name:"arrow_se"},s&&{config:s}),southWestArrowNorthWest:e=>eo({top:r(e),left:e.left-t,name:"arrow_nw"},s&&{config:s}),southWestArrowNorthMiddleWest:(e,o)=>eo({top:r(e),left:e.left-.25*o.width-t,name:"arrow_nmw"},s&&{config:s}),southWestArrowNorth:(e,t)=>eo({top:r(e),left:e.left-t.width/2,name:"arrow_n"},s&&{config:s}),southWestArrowNorthMiddleEast:(e,o)=>eo({top:r(e),left:e.left-.75*o.width+t,name:"arrow_nme"},s&&{config:s}),southWestArrowNorthEast:(e,o)=>eo({top:r(e),left:e.left-o.width+t,name:"arrow_ne"},s&&{config:s}),southArrowNorthWest:e=>eo({top:r(e),left:e.left+e.width/2-t,name:"arrow_nw"},s&&{config:s}),southArrowNorthMiddleWest:(e,o)=>eo({top:r(e),left:e.left+e.width/2-.25*o.width-t,name:"arrow_nmw"},s&&{config:s}),southArrowNorth:(e,t)=>eo({top:r(e),left:e.left+e.width/2-t.width/2,name:"arrow_n"},s&&{config:s}),southArrowNorthMiddleEast:(e,o)=>eo({top:r(e),left:e.left+e.width/2-.75*o.width+t,name:"arrow_nme"},s&&{config:s}),southArrowNorthEast:(e,o)=>eo({top:r(e),left:e.left+e.width/2-o.width+t,name:"arrow_ne"},s&&{config:s}),southEastArrowNorthWest:e=>eo({top:r(e),left:e.right-t,name:"arrow_nw"},s&&{config:s}),southEastArrowNorthMiddleWest:(e,o)=>eo({top:r(e),left:e.right-.25*o.width-t,name:"arrow_nmw"},s&&{config:s}),southEastArrowNorth:(e,t)=>eo({top:r(e),left:e.right-t.width/2,name:"arrow_n"},s&&{config:s}),southEastArrowNorthMiddleEast:(e,o)=>eo({top:r(e),left:e.right-.75*o.width+t,name:"arrow_nme"},s&&{config:s}),southEastArrowNorthEast:(e,o)=>eo({top:r(e),left:e.right-o.width+t,name:"arrow_ne"},s&&{config:s}),westArrowEast:(e,t)=>eo({top:e.top+e.height/2-t.height/2,left:e.left-t.width-o,name:"arrow_e"},s&&{config:s}),eastArrowWest:(e,t)=>eo({top:e.top+e.height/2-t.height/2,left:e.right+o,name:"arrow_w"},s&&{config:s}),viewportStickyNorth:(e,t,o)=>e.getIntersection(o)?{top:o.top+i,left:e.left+e.width/2-t.width/2,name:"arrowless",config:eo({withArrow:!1},s)}:null};function n(e,t){return e.top-t.height-o}function r(e){return e.bottom+o}}so.arrowSideOffset=25,so.arrowHeightOffset=10,so.stickyVerticalOffset=20,so._getOptimalPosition=c.xZ,so.defaultPositions=ro();var ao=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/tooltip/tooltip.css"),co={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(ao.Z,co);ao.Z.locals;const lo="ck-tooltip",ho=class extends((0,c.Xu)()){constructor(e){if(super(),this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver=null,ho._editors.add(e),ho._instance)return ho._instance;ho._instance=this,this.tooltipTextView=new f(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new so(e.locale),this.balloonPanelView.class=lo,this.balloonPanelView.content.add(this.tooltipTextView),this._pinTooltipDebounced=(0,ce.Z)(this._pinTooltip,600),this.listenTo(c.global.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(c.global.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(c.global.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(c.global.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(c.global.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const t=e.ui.view&&e.ui.view.body;ho._editors.delete(e),this.stopListening(e.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),ho._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),ho._instance=null)}static getPositioningFunctions(e){const t=ho.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[e]}_onEnterOrFocus(e,{target:t}){const o=po(t);var i;o&&(o!==this._currentElementWithTooltip&&(this._unpinTooltip(),this._pinTooltipDebounced(o,{text:(i=o).dataset.ckeTooltipText,position:i.dataset.ckeTooltipPosition||"s",cssClass:i.dataset.ckeTooltipClass||""})))}_onLeaveOrBlur(e,{target:t,relatedTarget:o}){if("mouseleave"===e.name){if(!(0,Ht.Z)(t))return;if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const e=po(t),i=po(o);e&&e!==i&&this._unpinTooltip()}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._unpinTooltip()}}_onScroll(e,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:t,position:o,cssClass:i}){const s=(0,c.Ps)(ho._editors.values()).ui.view.body;s.has(this.balloonPanelView)||s.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.pin({target:e,positions:ho.getPositioningFunctions(o)}),this._resizeObserver=new c.do(e,(()=>{(0,c.pn)(e)||this._unpinTooltip()})),this.balloonPanelView.class=[lo,i].filter((e=>e)).join(" ");for(const e of ho._editors)this.listenTo(e.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=o}_unpinTooltip(){this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of ho._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver&&this._resizeObserver.destroy()}_updateTooltipPosition(){(0,c.pn)(this._currentElementWithTooltip)?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:ho.getPositioningFunctions(this._currentTooltipPosition)}):this._unpinTooltip()}};let uo=ho;function po(e){return(0,Ht.Z)(e)?e.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}uo.defaultBalloonPositions=ro({heightOffset:5,sideOffset:13}),uo._editors=new Set,uo._instance=null;var fo=o("./node_modules/lodash-es/throttle.js");var go=Object.defineProperty,mo=Object.getOwnPropertySymbols,bo=Object.prototype.hasOwnProperty,_o=Object.prototype.propertyIsEnumerable,wo=(e,t,o)=>t in e?go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,ko=(e,t)=>{for(var o in t||(t={}))bo.call(t,o)&&wo(e,o,t[o]);if(mo)for(var o of mo(t))_o.call(t,o)&&wo(e,o,t[o]);return e};const vo=50,yo=350,xo="Powered by",Po={top:-99999,left:-99999,name:"invalid",config:{withArrow:!1}};class Eo extends((0,c.Xu)()){constructor(e){super(),this.editor=e,this._balloonView=null,this._lastFocusedEditableElement=null,this._showBalloonThrottled=(0,fo.Z)(this._showBalloon.bind(this),50,{leading:!0}),e.on("ready",this._handleEditorReady.bind(this))}destroy(){const e=this._balloonView;e&&(e.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const e=this.editor;"VALID"!==(0,c.Tx)(e.config.get("licenseKey"))&&e.ui.view&&(e.ui.focusTracker.on("change:isFocused",((e,t,o)=>{this._updateLastFocusedEditableElement(),o?this._showBalloon():this._hideBalloon()})),e.ui.focusTracker.on("change:focusedElement",((e,t,o)=>{this._updateLastFocusedEditableElement(),o&&this._showBalloon()})),e.ui.on("update",(()=>{this._showBalloonThrottled()})))}_createBalloonView(){const e=this.editor,t=this._balloonView=new so,o=Co(e),i=new To(e.locale,o.label);t.content.add(i),t.set({class:"ck-powered-by-balloon"}),e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this._balloonView=t}_showBalloon(){if(!this._lastFocusedEditableElement)return;const e=function(e,t){const o=Co(e),i="right"===o.side?function(e,t){return Ao(e,t,((e,o)=>e.left+e.width-o.width-t.horizontalOffset))}(t,o):function(e,t){return Ao(e,t,(e=>e.left+t.horizontalOffset))}(t,o);return{target:t,positions:[i]}}(this.editor,this._lastFocusedEditableElement);e&&(this._balloonView||this._createBalloonView(),this._balloonView.pin(e))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_updateLastFocusedEditableElement(){const e=this.editor,t=e.ui.focusTracker.isFocused,o=e.ui.focusTracker.focusedElement;if(!t||!o)return void(this._lastFocusedEditableElement=null);const i=Array.from(e.ui.getEditableElementsNames()).map((t=>e.ui.getEditableElement(t)));i.includes(o)?this._lastFocusedEditableElement=o:this._lastFocusedEditableElement=i[0]}}class To extends f{constructor(e,t){super(e);const o=new Z,i=this.bindTemplate;o.set({content:'<svg xmlns="http://www.w3.org/2000/svg" width="53" height="10" viewBox="0 0 53 10"><g clip-path="url(#a)"><path fill="#1C2331" d="M31.724 1.492a15.139 15.139 0 0 0 .045 1.16 2.434 2.434 0 0 0-.687-.34 3.68 3.68 0 0 0-1.103-.166 2.332 2.332 0 0 0-1.14.255 1.549 1.549 0 0 0-.686.87c-.15.41-.225.98-.225 1.712 0 .939.148 1.659.444 2.161.297.503.792.754 1.487.754.452.015.9-.094 1.294-.316.296-.174.557-.4.771-.669l.14.852h1.282V.007h-1.623v1.485ZM31 6.496a1.77 1.77 0 0 1-.494.061.964.964 0 0 1-.521-.127.758.758 0 0 1-.296-.466 3.984 3.984 0 0 1-.093-.992 4.208 4.208 0 0 1 .098-1.052.753.753 0 0 1 .307-.477 1.08 1.08 0 0 1 .55-.122c.233-.004.466.026.69.089l.483.144v2.553c-.11.076-.213.143-.307.2a1.73 1.73 0 0 1-.417.189ZM35.68 0l-.702.004c-.322.002-.482.168-.48.497l.004.581c.002.33.164.493.486.49l.702-.004c.322-.002.481-.167.48-.496L36.165.49c-.002-.33-.164-.493-.486-.491ZM36.145 2.313l-1.612.01.034 5.482 1.613-.01-.035-5.482ZM39.623.79 37.989.8 38 2.306l-.946.056.006 1.009.949-.006.024 2.983c.003.476.143.844.419 1.106.275.26.658.39 1.148.387.132 0 .293-.01.483-.03.19-.02.38-.046.57-.08.163-.028.324-.068.482-.119l-.183-1.095-.702.004a.664.664 0 0 1-.456-.123.553.553 0 0 1-.14-.422l-.016-2.621 1.513-.01-.006-1.064-1.514.01-.01-1.503ZM46.226 2.388c-.41-.184-.956-.274-1.636-.27-.673.004-1.215.101-1.627.29-.402.179-.72.505-.888.91-.18.419-.268.979-.264 1.68.004.688.1 1.24.285 1.655.172.404.495.724.9.894.414.18.957.268 1.63.264.68-.004 1.224-.099 1.632-.284.4-.176.714-.501.878-.905.176-.418.263-.971.258-1.658-.004-.702-.097-1.261-.28-1.677a1.696 1.696 0 0 0-.888-.9Zm-.613 3.607a.77.77 0 0 1-.337.501 1.649 1.649 0 0 1-1.317.009.776.776 0 0 1-.343-.497 4.066 4.066 0 0 1-.105-1.02 4.136 4.136 0 0 1 .092-1.03.786.786 0 0 1 .337-.507 1.59 1.59 0 0 1 1.316-.008.79.79 0 0 1 .344.502c.078.337.113.683.105 1.03.012.343-.019.685-.092 1.02ZM52.114 2.07a2.67 2.67 0 0 0-1.128.278c-.39.191-.752.437-1.072.73l-.157-.846-1.273.008.036 5.572 1.623-.01-.024-3.78c.35-.124.646-.22.887-.286.26-.075.53-.114.8-.118l.45-.003.144-1.546-.286.001ZM22.083 7.426l-1.576-2.532a2.137 2.137 0 0 0-.172-.253 1.95 1.95 0 0 0-.304-.29.138.138 0 0 1 .042-.04 1.7 1.7 0 0 0 .328-.374l1.75-2.71c.01-.015.025-.028.024-.048-.01-.01-.021-.007-.031-.007L20.49 1.17a.078.078 0 0 0-.075.045l-.868 1.384c-.23.366-.46.732-.688 1.099a.108.108 0 0 1-.112.06c-.098-.005-.196-.001-.294-.002-.018 0-.038.006-.055-.007.002-.02.002-.039.005-.058a4.6 4.6 0 0 0 .046-.701V1.203c0-.02-.009-.032-.03-.03h-.033L16.93 1.17c-.084 0-.073-.01-.073.076v6.491c-.001.018.006.028.025.027h1.494c.083 0 .072.007.072-.071v-2.19c0-.055-.003-.11-.004-.166a3.366 3.366 0 0 0-.05-.417h.06c.104 0 .209.002.313-.002a.082.082 0 0 1 .084.05c.535.913 1.07 1.824 1.607 2.736a.104.104 0 0 0 .103.062c.554-.003 1.107-.002 1.66-.002l.069-.003-.019-.032-.188-.304ZM27.112 6.555c-.005-.08-.004-.08-.082-.08h-2.414c-.053 0-.106-.003-.159-.011a.279.279 0 0 1-.246-.209.558.558 0 0 1-.022-.15c0-.382 0-.762-.002-1.143 0-.032.007-.049.042-.044h2.504c.029.003.037-.012.034-.038V3.814c0-.089.013-.078-.076-.078h-2.44c-.07 0-.062.003-.062-.06v-.837c0-.047.004-.093.013-.14a.283.283 0 0 1 .241-.246.717.717 0 0 1 .146-.011h2.484c.024.002.035-.009.036-.033l.003-.038.03-.496c.01-.183.024-.365.034-.548.005-.085.003-.087-.082-.094-.218-.018-.437-.038-.655-.05a17.845 17.845 0 0 0-.657-.026 72.994 72.994 0 0 0-1.756-.016 1.7 1.7 0 0 0-.471.064 1.286 1.286 0 0 0-.817.655c-.099.196-.149.413-.145.633v3.875c0 .072.003.144.011.216a1.27 1.27 0 0 0 .711 1.029c.228.113.48.167.734.158.757-.005 1.515.002 2.272-.042.274-.016.548-.034.82-.053.03-.002.043-.008.04-.041-.008-.104-.012-.208-.019-.312a69.964 69.964 0 0 1-.05-.768ZM16.14 7.415l-.127-1.075c-.004-.03-.014-.04-.044-.037a13.125 13.125 0 0 1-.998.073c-.336.01-.672.02-1.008.016-.116-.001-.233-.014-.347-.039a.746.746 0 0 1-.45-.262c-.075-.1-.132-.211-.167-.33a3.324 3.324 0 0 1-.126-.773 9.113 9.113 0 0 1-.015-.749c0-.285.022-.57.065-.852.023-.158.066-.312.127-.46a.728.728 0 0 1 .518-.443 1.64 1.64 0 0 1 .397-.048c.628-.001 1.255.003 1.882.05.022.001.033-.006.036-.026l.003-.031.06-.55c.019-.177.036-.355.057-.532.004-.034-.005-.046-.04-.056a5.595 5.595 0 0 0-1.213-.21 10.783 10.783 0 0 0-.708-.02c-.24-.003-.48.01-.719.041a3.477 3.477 0 0 0-.625.14 1.912 1.912 0 0 0-.807.497c-.185.2-.33.433-.424.688a4.311 4.311 0 0 0-.24 1.096c-.031.286-.045.572-.042.86-.006.43.024.86.091 1.286.04.25.104.497.193.734.098.279.26.53.473.734.214.205.473.358.756.446.344.11.702.17 1.063.177a8.505 8.505 0 0 0 1.578-.083 6.11 6.11 0 0 0 .766-.18c.03-.008.047-.023.037-.057a.157.157 0 0 1-.003-.025Z"/><path fill="#AFE229" d="M6.016 6.69a1.592 1.592 0 0 0-.614.21c-.23.132-.422.32-.56.546-.044.072-.287.539-.287.539l-.836 1.528.009.006c.038.025.08.046.123.063.127.046.26.07.395.073.505.023 1.011-.007 1.517-.003.29.009.58.002.869-.022a.886.886 0 0 0 .395-.116.962.962 0 0 0 .312-.286c.056-.083.114-.163.164-.249.24-.408.48-.816.718-1.226.075-.128.148-.257.222-.386l.112-.192a1.07 1.07 0 0 0 .153-.518l-1.304.023s-1.258-.005-1.388.01Z"/><path fill="#771BFF" d="m2.848 9.044.76-1.39.184-.352c-.124-.067-.245-.14-.367-.21-.346-.204-.706-.384-1.045-.6a.984.984 0 0 1-.244-.207c-.108-.134-.136-.294-.144-.46-.021-.409-.002-.818-.009-1.227-.003-.195 0-.39.003-.585.004-.322.153-.553.427-.713l.833-.488c.22-.13.44-.257.662-.385.05-.029.105-.052.158-.077.272-.128.519-.047.76.085l.044.028c.123.06.242.125.358.196.318.178.635.357.952.537.095.056.187.117.275.184.194.144.254.35.266.578.016.284.007.569.006.853-.001.28.004.558 0 .838.592-.003 1.259 0 1.259 0l.723-.013c-.003-.292-.007-.584-.007-.876 0-.524.015-1.048-.016-1.571-.024-.42-.135-.8-.492-1.067a5.02 5.02 0 0 0-.506-.339A400.52 400.52 0 0 0 5.94.787C5.722.664 5.513.524 5.282.423 5.255.406 5.228.388 5.2.373 4.758.126 4.305-.026 3.807.21c-.097.046-.197.087-.29.14A699.896 699.896 0 0 0 .783 1.948c-.501.294-.773.717-.778 1.31-.004.36-.009.718-.001 1.077.016.754-.017 1.508.024 2.261.016.304.07.6.269.848.127.15.279.28.448.382.622.4 1.283.734 1.92 1.11l.183.109Z"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h52.4v10H0z"/></clipPath></defs></svg>\n',isColorInherited:!1}),o.extendTemplate({attributes:{style:{width:"53px",height:"10px"}}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...t?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[t]}]:[],o],on:{dragstart:i.to((e=>e.preventDefault()))}}]})}}function Ao(e,t,o){return(i,s)=>{const n=i.getVisible();if(!n)return Po;if(i.width<yo||i.height<vo)return Po;let r;r="inside"===t.position?i.bottom-s.height:i.bottom-s.height/2,r-=t.verticalOffset;const a=o(i,s);if("inside"===t.position){const e=s.clone().moveTo(a,r);if(e.getIntersectionArea(n)<e.getArea())return Po}else{const t=(0,c.wm)(e);if(t){const e=new c.UL(t);if(n.bottom+s.height/2>e.bottom)return Po}}return{top:r,left:a,name:`position_${t.position}-side_${t.side}`,config:{withArrow:!1}}}}function Co(e){const t=e.config.get("ui.poweredBy"),o=t&&t.position||"border";return ko({position:o,label:xo,verticalOffset:"inside"===o?5:0,horizontalOffset:5,side:"ltr"===e.locale.contentLanguageDirection?"right":"left"},t)}class So extends((0,c.Re)()){constructor(e){super(),this.isReady=!1,this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[],this.editor=e,this.componentFactory=new $t(e),this.focusTracker=new c.Rh,this.tooltipManager=new uo(e),this.poweredBy=new Eo(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",(()=>{this.isReady=!0})),this.listenTo(e.editing.view.document,"layoutChanged",(()=>this.update())),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null,this.editor.keystrokes.stopListening(e);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);const o=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?o():this.once("ready",o)}removeEditableElement(e){const t=this._editableElementsMap.get(e);t&&(this._editableElementsMap.delete(e),this.editor.keystrokes.stopListening(t),this.focusTracker.remove(t),t.ckeditorInstance=null)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e,t={}){e.isRendered?(this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)):e.once("render",(()=>{this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)})),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const o=e.config.get("toolbar.viewportTopOffset");return o?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:o}):{top:0}}_initFocusTracking(){const e=this.editor,t=e.editing.view;let o,i;e.keystrokes.set("Alt+F10",((e,s)=>{const n=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(n)&&!Array.from(t.domRoots.values()).includes(n)&&(o=n);const r=this._getCurrentFocusedToolbarDefinition();r&&i||(i=this._getFocusableCandidateToolbarDefinitions());for(let e=0;e<i.length;e++){const e=i.shift();if(i.push(e),e!==r&&this._focusFocusableCandidateToolbar(e)){r&&r.options.afterBlur&&r.options.afterBlur();break}}s()})),e.keystrokes.set("Esc",((t,i)=>{const s=this._getCurrentFocusedToolbarDefinition();s&&(o?(o.focus(),o=null):e.editing.view.focus(),s.options.afterBlur&&s.options.afterBlur(),i())}))}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const t of this._focusableToolbarDefinitions){const{toolbarView:o,options:i}=t;((0,c.pn)(o.element)||i.beforeFocus)&&e.push(t)}return e.sort(((e,t)=>Oo(e)-Oo(t))),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:t,options:{beforeFocus:o}}=e;return o&&o(),!!(0,c.pn)(t.element)&&(t.focus(),!0)}}function Oo(e){const{toolbarView:t,options:o}=e;let i=10;return(0,c.pn)(t.element)&&i--,o.isContextual&&i--,i}var Ro=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/editorui.css"),Mo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Ro.Z,Mo);Ro.Z.locals;class jo extends f{constructor(e){super(e),this.body=new N(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class Bo extends jo{constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new he;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class Do extends f{constructor(e,t,o){super(e),this.name=null,this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=o,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",(()=>this._updateIsFocusedClasses())),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change((o=>{const i=e.document.getRoot(t.name);o.addClass(t.isFocused?"ck-focused":"ck-blurred",i),o.removeClass(t.isFocused?"ck-blurred":"ck-focused",i)}))}e.isRenderingInProgress?function o(i){e.once("change:isRenderingInProgress",((e,s,n)=>{n?o(i):t(i)}))}(this):t(this)}}class Vo extends Do{constructor(e,t,o,i={}){super(e,t,o);const s=e.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=i.label||(()=>s("Editor editing area: %0",this.name))}render(){super.render();const e=this._editingView;e.change((t=>{const o=e.document.getRoot(this.name);t.setAttribute("aria-label",this._generateLabel(this),o)}))}}var Io=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/formheader/formheader.css"),No={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Io.Z,No);Io.Z.locals;class zo extends f{constructor(e,t={}){super(e);const o=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",o.to("class")]},children:this.children});const i=new f(e);i.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"]},children:[{text:o.to("label")}]}),this.children.add(i)}}class Fo extends f{constructor(e){super(e);const t=this.bindTemplate;this.setTemplate({tag:"iframe",attributes:{class:["ck","ck-reset_all"],sandbox:"allow-same-origin allow-scripts"},on:{load:t.to("loaded")}})}render(){return new Promise((e=>(this.on("loaded",e),super.render())))}}class Lo extends Me.eO{static get pluginName(){return"Notification"}init(){this.on("show:warning",((e,t)=>{window.alert(t.message)}),{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=e.namespace?`show:${e.type}:${e.namespace}`:`show:${e.type}`;this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}var Zo=o("./node_modules/lodash-es/assignIn.js");class Wo extends((0,c.Re)()){constructor(e,t){super(),t&&(0,Zo.Z)(this,t),e&&this.set(e)}}var $o=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonrotator.css"),qo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()($o.Z,qo);$o.Z.locals;var Ho=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/fakepanel.css"),Uo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Ho.Z,Uo);Ho.Z.locals;const Ko=(0,c.nn)("px");class Go extends Me.Sy{constructor(e){super(e),this._viewToStack=new Map,this._idToStack=new Map,this._view=null,this._rotatorView=null,this._fakePanelsView=null,this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}static get pluginName(){return"ContextualBalloon"}destroy(){super.destroy(),this._view&&this._view.destroy(),this._rotatorView&&this._rotatorView.destroy(),this._fakePanelsView&&this._fakePanelsView.destroy()}get view(){return this._view||this._createPanelView(),this._view}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this._view||this._createPanelView(),this.hasView(e.view))throw new c.Bb("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const o=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),o.set(e.view,e),this._viewToStack.set(e.view,o),o===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new c.Bb("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new c.Bb("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}_createPanelView(){this._view=new so(this.editor.locale),this.editor.ui.view.body.add(this._view),this.editor.ui.focusTracker.add(this._view.element),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find((t=>t[1]===e))[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new Jo(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>1)),e.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((e,o)=>{if(o<2)return"";const i=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[i,o])})),e.buttonNextView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()})),e.buttonPrevView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()})),e}_createFakePanelsView(){const e=new Yo(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>=2?Math.min(e-1,2):0)),e.listenTo(this.view,"change:top",(()=>e.updatePosition())),e.listenTo(this.view,"change:left",(()=>e.updatePosition())),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:o=!0,singleViewMode:i=!1}){this.view.class=t,this.view.withArrow=o,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),i&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}}class Jo extends f{constructor(e){super(e);const t=e.t,o=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new c.Rh,this.buttonPrevView=this._createButtonView(t("Previous"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z"/></svg>'),this.buttonNextView=this._createButtonView(t("Next"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382l-4.043 4.042z"/></svg>'),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",o.to("isNavigationVisible",(e=>e?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:o.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const o=new q(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o}}class Yo extends f{constructor(e,t){super(e);const o=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",o.to("numberOfPanels",(e=>e?"":"ck-hidden"))],style:{top:o.to("top",Ko),left:o.to("left",Ko),width:o.to("width",Ko),height:o.to("height",Ko)}},children:this.content}),this.on("change:numberOfPanels",((e,t,o,i)=>{o>i?this._addPanels(o-i):this._removePanels(i-o),this.updatePosition()}))}_addPanels(e){for(;e--;){const e=new f;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:o,height:i}=new c.UL(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:o,height:i})}}}var Xo=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/stickypanel.css"),Qo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Xo.Z,Qo);Xo.Z.locals;const ei=(0,c.nn)("px");class ti extends f{constructor(e){super(e);const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheLimiter",!1),this.set("_hasViewportTopOffset",!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new b({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",(e=>e?"block":"none")),height:t.to("isSticky",(e=>e?ei(this._panelRect.height):null))}}}).render(),this._contentPanel=new b({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",(e=>e?ei(this._contentPanelPlaceholder.getBoundingClientRect().width):null)),top:t.to("_hasViewportTopOffset",(e=>e?ei(this.viewportTopOffset):null)),bottom:t.to("_isStickyToTheLimiter",(e=>e?ei(this.limiterBottomOffset):null)),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(c.global.window,"scroll",(()=>{this._checkIfShouldBeSticky()})),this.listenTo(this,"change:isActive",(()=>{this._checkIfShouldBeSticky()}))}_checkIfShouldBeSticky(){const e=this._panelRect=this._contentPanel.getBoundingClientRect();let t;this.limiterElement?(t=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&t.top<this.viewportTopOffset&&this._panelRect.height+this.limiterBottomOffset<t.height):this.isSticky=!1,this.isSticky?(this._isStickyToTheLimiter=t.bottom<e.height+this.limiterBottomOffset+this.viewportTopOffset,this._hasViewportTopOffset=!this._isStickyToTheLimiter&&!!this.viewportTopOffset,this._marginLeft=this._isStickyToTheLimiter?null:ei(-c.global.window.scrollX)):(this._isStickyToTheLimiter=!1,this._hasViewportTopOffset=!1,this._marginLeft=null)}}const oi=(0,c.nn)("px");class ii extends Me.Sy{constructor(e){super(e),this._resizeObserver=null,this._balloonConfig=Re(e.config.get("balloonToolbar")),this.toolbarView=this._createToolbarView(),this.focusTracker=new c.Rh,e.ui.once("ready",(()=>{this.focusTracker.add(e.ui.getEditableElement()),this.focusTracker.add(this.toolbarView.element)})),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this.show(!0),afterBlur:()=>this.hide(),isContextual:!0}),this._balloon=e.plugins.get(Go),this._fireSelectionChangeDebounced=(0,ce.Z)((()=>this.fire("_selectionChangeDebounced")),200),this.decorate("show")}static get pluginName(){return"BalloonToolbar"}static get requires(){return[Go]}init(){const e=this.editor,t=e.model.document.selection;this.listenTo(this.focusTracker,"change:isFocused",((e,t,o)=>{const i=this._balloon.visibleView===this.toolbarView;!o&&i?this.hide():o&&this.show()})),this.listenTo(t,"change:range",((e,o)=>{(o.directChange||t.isCollapsed)&&this.hide(),this._fireSelectionChangeDebounced()})),this.listenTo(this,"_selectionChangeDebounced",(()=>{this.editor.editing.view.document.isFocused&&this.show()})),this._balloonConfig.shouldNotGroupWhenFull||this.listenTo(e,"ready",(()=>{const t=e.ui.view.editable.element;this._resizeObserver=new c.do(t,(e=>{this.toolbarView.maxWidth=oi(.9*e.contentRect.width)}))})),this.listenTo(this.toolbarView,"groupedItemsUpdate",(()=>{this._updatePosition()}))}afterInit(){const e=this.editor.ui.componentFactory;this.toolbarView.fillFromConfig(this._balloonConfig,e)}_createToolbarView(){const e=this.editor.locale.t,t=!this._balloonConfig.shouldNotGroupWhenFull,o=new Ie(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return o.ariaLabel=e("Editor contextual toolbar"),o.render(),o}show(e=!1){const t=this.editor,o=t.model.document.selection,i=t.model.schema;this._balloon.hasView(this.toolbarView)||o.isCollapsed&&!e||function(e,t){if(1===e.rangeCount)return!1;return[...e.getRanges()].every((e=>{const o=e.getContainedElement();return o&&t.isSelectable(o)}))}(o,i)||Array.from(this.toolbarView.items).every((e=>void 0!==e.isEnabled&&!e.isEnabled))||(this.listenTo(this.editor.ui,"update",(()=>{this._updatePosition()})),this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"}))}hide(){this._balloon.hasView(this.toolbarView)&&(this.stopListening(this.editor.ui,"update"),this._balloon.remove(this.toolbarView))}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document,o=t.selection,i=t.selection.isBackward;return{target:()=>{const t=i?o.getFirstRange():o.getLastRange(),s=c.UL.getDomRangeRects(e.domConverter.viewRangeToDom(t));return i?s[0]:(s.length>1&&0===s[s.length-1].width&&s.pop(),s[s.length-1])},positions:this._getBalloonPositions(i)}}_updatePosition(){this._balloon.updatePosition(this._getBalloonPositionData())}destroy(){super.destroy(),this.stopListening(),this._fireSelectionChangeDebounced.cancel(),this.toolbarView.destroy(),this.focusTracker.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getBalloonPositions(e){const t=c.OB.isSafari&&c.OB.isiOS?ro({heightOffset:Math.max(so.arrowHeightOffset,Math.round(20/c.global.window.visualViewport.scale))}):so.defaultPositions;return e?[t.northWestArrowSouth,t.northWestArrowSouthWest,t.northWestArrowSouthEast,t.northWestArrowSouthMiddleEast,t.northWestArrowSouthMiddleWest,t.southWestArrowNorth,t.southWestArrowNorthWest,t.southWestArrowNorthEast,t.southWestArrowNorthMiddleWest,t.southWestArrowNorthMiddleEast]:[t.southEastArrowNorth,t.southEastArrowNorthEast,t.southEastArrowNorthWest,t.southEastArrowNorthMiddleEast,t.southEastArrowNorthMiddleWest,t.northEastArrowSouth,t.northEastArrowSouthEast,t.northEastArrowSouthWest,t.northEastArrowSouthMiddleEast,t.northEastArrowSouthMiddleWest]}}var si=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css"),ni={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(si.Z,ni);si.Z.locals;const ri=(0,c.nn)("px");class ai extends q{constructor(e){super(e);const t=this.bindTemplate;this.isVisible=!1,this.isToggleable=!0,this.set("top",0),this.set("left",0),this.extendTemplate({attributes:{class:"ck-block-toolbar-button",style:{top:t.to("top",(e=>ri(e))),left:t.to("left",(e=>ri(e)))}}})}}const ci=(0,c.nn)("px"),{pilcrow:li}=Me.icons;class di extends Me.Sy{constructor(e){super(e),this._resizeObserver=null,this._blockToolbarConfig=Re(this.editor.config.get("blockToolbar")),this.toolbarView=this._createToolbarView(),this.panelView=this._createPanelView(),this.buttonView=this._createButtonView(),i({emitter:this.panelView,contextElements:[this.panelView.element,this.buttonView.element],activator:()=>this.panelView.isVisible,callback:()=>this._hidePanel()})}static get pluginName(){return"BlockToolbar"}init(){const e=this.editor;this.listenTo(e.model.document.selection,"change:range",((e,t)=>{t.directChange&&this._hidePanel()})),this.listenTo(e.ui,"update",(()=>this._updateButton())),this.listenTo(e,"change:isReadOnly",(()=>this._updateButton()),{priority:"low"}),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>this._updateButton())),this.listenTo(this.buttonView,"change:isVisible",((e,t,o)=>{o?this.buttonView.listenTo(window,"resize",(()=>this._updateButton())):(this.buttonView.stopListening(window,"resize"),this._hidePanel())})),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this._showPanel(),afterBlur:()=>this._hidePanel()})}afterInit(){const e=this.editor.ui.componentFactory,t=this._blockToolbarConfig;this.toolbarView.fillFromConfig(t,e);for(const e of this.toolbarView.items)e.on("execute",(()=>this._hidePanel(!0)),{priority:"high"});t.shouldNotGroupWhenFull||this.listenTo(this.editor,"ready",(()=>{const e=this.editor.ui.view.editable.element;this._resizeObserver=new c.do(e,(()=>{this.toolbarView.maxWidth=this._getToolbarMaxWidth()}))}))}destroy(){super.destroy(),this.panelView.destroy(),this.buttonView.destroy(),this.toolbarView.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_createToolbarView(){const e=this.editor.locale.t,t=!this._blockToolbarConfig.shouldNotGroupWhenFull,o=new Ie(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return o.ariaLabel=e("Editor block content toolbar"),o}_createPanelView(){const e=this.editor,t=new so(e.locale);return t.content.add(this.toolbarView),t.class="ck-toolbar-container",e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this.toolbarView.keystrokes.set("Esc",((e,t)=>{this._hidePanel(!0),t()})),t}_createButtonView(){const e=this.editor,t=e.t,o=new ai(e.locale);return o.set({label:t("Edit block"),icon:li,withText:!1}),o.bind("isOn").to(this.panelView,"isVisible"),o.bind("tooltip").to(this.panelView,"isVisible",(e=>!e)),this.listenTo(o,"execute",(()=>{this.panelView.isVisible?this._hidePanel(!0):this._showPanel()})),e.ui.view.body.add(o),e.ui.focusTracker.add(o.element),o}_updateButton(){const e=this.editor,t=e.model,o=e.editing.view;if(!e.ui.focusTracker.isFocused)return void this._hideButton();if(!e.model.canEditAt(e.model.document.selection))return void this._hideButton();const i=Array.from(t.document.selection.getSelectedBlocks())[0];if(!i||Array.from(this.toolbarView.items).every((e=>!e.isEnabled)))return void this._hideButton();const s=o.domConverter.mapViewToDom(e.editing.mapper.toViewElement(i));this.buttonView.isVisible=!0,this._attachButtonToElement(s),this.panelView.isVisible&&this._showPanel()}_hideButton(){this.buttonView.isVisible=!1}_showPanel(){if(!this.buttonView.isVisible)return;const e=this.panelView.isVisible;this.panelView.show(),this.toolbarView.maxWidth=this._getToolbarMaxWidth(),this.panelView.pin({target:this.buttonView.element,limiter:this.editor.ui.getEditableElement()}),e||this.toolbarView.items.get(0).focus()}_hidePanel(e){this.panelView.isVisible=!1,e&&this.editor.editing.view.focus()}_attachButtonToElement(e){const t=window.getComputedStyle(e),o=new c.UL(this.editor.ui.getEditableElement()),i=parseInt(t.paddingTop,10),s=parseInt(t.lineHeight,10)||1.2*parseInt(t.fontSize,10),n=(0,c.xZ)({element:this.buttonView.element,target:e,positions:[(e,t)=>{let n;return n="ltr"===this.editor.locale.uiLanguageDirection?o.left-t.width:o.right,{top:e.top+i+(s-t.height)/2,left:n}}]});this.buttonView.top=n.top,this.buttonView.left=n.left}_getToolbarMaxWidth(){const e=this.editor.ui.view.editable.element,t=new c.UL(e),o=new c.UL(this.buttonView.element),i="rtl"===this.editor.locale.uiLanguageDirection?o.left-t.right+o.width:t.left-o.left;return ci(t.width+i)}}const hi='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.209 18.717A8.5 8.5 0 1 1 18.686 9.6h-.008l.002.12a3 3 0 0 1-2.866 2.997h-.268l-.046-.002v.002h-4.791a2 2 0 1 0 0 4 1 1 0 1 1-.128 1.992 8.665 8.665 0 0 1-.372.008Zm-3.918-7.01a1.25 1.25 0 1 0-2.415-.648 1.25 1.25 0 0 0 2.415.647ZM5.723 8.18a1.25 1.25 0 1 0 .647-2.414 1.25 1.25 0 0 0-.647 2.414ZM9.76 6.155a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415Zm4.028 1.759a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415Z"/></svg>'},"./packages/ckeditor5-utils/src/ckeditorerror.ts":(e,t,o)=>{"use strict";o.d(t,{H:()=>r,KE:()=>n,ZP:()=>s});const i="https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html";class s extends Error{constructor(e,t,o){super(function(e,t){const o=new WeakSet,i=(e,t)=>{if("object"==typeof t&&null!==t){if(o.has(t))return`[object ${t.constructor.name}]`;o.add(t)}return t},s=t?` ${JSON.stringify(t,i)}`:"",n=a(e);return e+s+n}(e,o)),this.name="CKEditorError",this.context=t,this.data=o}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const o=new s(e.message,t);throw o.stack=e.stack,o}}function n(e,t){console.warn(...c(e,t))}function r(e,t){console.error(...c(e,t))}function a(e){return`\nRead more: ${i}#error-${e}`}function c(e,t){const o=a(e);return t?[e,t,o]:[e,o]}},"./packages/ckeditor5-utils/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{Bb:()=>k.ZP,FE:()=>pt,De:()=>se,Xu:()=>de,a6:()=>H,ln:()=>E,M3:()=>f,Rh:()=>gt,VD:()=>mt,go:()=>ut,Re:()=>F,UL:()=>ye,do:()=>Ae,Rt:()=>K,QX:()=>U,az:()=>ee,gw:()=>kt,Hg:()=>d,Pk:()=>h,OB:()=>n,HZ:()=>a,wm:()=>ge,Ps:()=>ft,dk:()=>me,Cq:()=>ot,yy:()=>be,XU:()=>st,j9:()=>lt,mA:()=>rt,xZ:()=>Ie,global:()=>fe,cq:()=>Oe,ZQ:()=>Re,VG:()=>_,dj:()=>nt,tO:()=>yt,C3:()=>Me,Zt:()=>at,Cb:()=>xt,pp:()=>Tt,YK:()=>Ct,to:()=>Et,TW:()=>G,nA:()=>Pt,UG:()=>ae,bR:()=>we,Gs:()=>_e,$b:()=>je,pn:()=>Be,Do:()=>et,H:()=>k.H,KE:()=>k.KE,CD:()=>u,Zz:()=>it,tA:()=>b,Dm:()=>w.D,Od:()=>Fe,F0:()=>Ze,mR:()=>Le,jS:()=>Ce,x:()=>wt,qo:()=>dt,qL:()=>bt,nn:()=>Se,hQ:()=>m,Tx:()=>vt,i8:()=>w.Z});const i=function(){try{return navigator.userAgent.toLowerCase()}catch(e){return""}}();var s;const n={isMac:r(i),isWindows:(s=i,s.indexOf("windows")>-1),isGecko:function(e){return!!e.match(/gecko\/\d+/)}(i),isSafari:function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(i),isiOS:function(e){return!!e.match(/iphone|ipad/i)||r(e)&&navigator.maxTouchPoints>0}(i),isAndroid:function(e){return e.indexOf("android")>-1}(i),isBlink:function(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}(i),features:{isRegExpUnicodePropertySupported:function(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}()}};function r(e){return e.indexOf("macintosh")>-1}function a(e,t,o,i){o=o||function(e,t){return e===t};const s=Array.isArray(e)?e:Array.prototype.slice.call(e),n=Array.isArray(t)?t:Array.prototype.slice.call(t),r=function(e,t,o){const i=c(e,t,o);if(-1===i)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const s=l(e,i),n=l(t,i),r=c(s,n,o),a=e.length-r,d=t.length-r;return{firstIndex:i,lastIndexOld:a,lastIndexNew:d}}(s,n,o),a=i?function(e,t){const{firstIndex:o,lastIndexOld:i,lastIndexNew:s}=e;if(-1===o)return Array(t).fill("equal");let n=[];o>0&&(n=n.concat(Array(o).fill("equal")));s-o>0&&(n=n.concat(Array(s-o).fill("insert")));i-o>0&&(n=n.concat(Array(i-o).fill("delete")));s<t&&(n=n.concat(Array(t-s).fill("equal")));return n}(r,n.length):function(e,t){const o=[],{firstIndex:i,lastIndexOld:s,lastIndexNew:n}=t;n-i>0&&o.push({index:i,type:"insert",values:e.slice(i,n)});s-i>0&&o.push({index:i+(n-i),type:"delete",howMany:s-i});return o}(n,r);return a}function c(e,t,o){for(let i=0;i<Math.max(e.length,t.length);i++)if(void 0===e[i]||void 0===t[i]||!o(e[i],t[i]))return i;return-1}function l(e,t){return e.slice(t).reverse()}function d(e,t,o){o=o||function(e,t){return e===t};const i=e.length,s=t.length;if(i>200||s>200||i+s>300)return d.fastDiff(e,t,o,!0);let n,r;if(s<i){const o=e;e=t,t=o,n="delete",r="insert"}else n="insert",r="delete";const a=e.length,c=t.length,l=c-a,h={},u={};function p(i){const s=(void 0!==u[i-1]?u[i-1]:-1)+1,l=void 0!==u[i+1]?u[i+1]:-1,d=s>l?-1:1;h[i+d]&&(h[i]=h[i+d].slice(0)),h[i]||(h[i]=[]),h[i].push(s>l?n:r);let p=Math.max(s,l),f=p-i;for(;f<a&&p<c&&o(e[f],t[p]);)f++,p++,h[i].push("equal");return p}let f,g=0;do{for(f=-g;f<l;f++)u[f]=p(f);for(f=l+g;f>l;f--)u[f]=p(f);u[l]=p(l),g++}while(u[l]!==c);return h[l].slice(1)}function h(e,t){const o=[];let i=0,s=null;return e.forEach((e=>{"equal"==e?(n(),i++):"insert"==e?(s&&"insert"==s.type?s.values.push(t[i]):(n(),s={type:"insert",index:i,values:[t[i]]}),i++):s&&"delete"==s.type?s.howMany++:(n(),s={type:"delete",index:i,howMany:1})})),n(),o;function n(){s&&(o.push(s),s=null)}}function u(e,...t){t.forEach((t=>{const o=Object.getOwnPropertyNames(t),i=Object.getOwnPropertySymbols(t);o.concat(i).forEach((o=>{if(o in e.prototype)return;if("function"==typeof t&&("length"==o||"name"==o||"prototype"==o))return;const i=Object.getOwnPropertyDescriptor(t,o);i.enumerable=!1,Object.defineProperty(e.prototype,o,i)}))}))}d.fastDiff=a;const p=function(){return function e(){e.called=!0}};class f{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=p(),this.off=p()}}const g=new Array(256).fill("").map(((e,t)=>("0"+t.toString(16)).slice(-2)));function m(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0,i=4294967296*Math.random()>>>0;return"e"+g[e>>0&255]+g[e>>8&255]+g[e>>16&255]+g[e>>24&255]+g[t>>0&255]+g[t>>8&255]+g[t>>16&255]+g[t>>24&255]+g[o>>0&255]+g[o>>8&255]+g[o>>16&255]+g[o>>24&255]+g[i>>0&255]+g[i>>8&255]+g[i>>16&255]+g[i>>24&255]}const b={get(e="normal"){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function _(e,t){const o=b.get(t.priority);for(let i=0;i<e.length;i++)if(b.get(e[i].priority)<o)return void e.splice(i,0,t);e.push(t)}var w=o("./packages/ckeditor5-utils/src/version.ts"),k=o("./packages/ckeditor5-utils/src/ckeditorerror.ts");const v=Symbol("listeningTo"),y=Symbol("emitterId"),x=Symbol("delegations"),P=E(Object);function E(e){if(!e)return P;return class extends e{on(e,t,o){this.listenTo(this,e,t,o)}once(e,t,o){let i=!1;this.listenTo(this,e,((e,...o)=>{i||(i=!0,e.off(),t.call(this,e,...o))}),o)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,o,i={}){let s,n;this[v]||(this[v]={});const r=this[v];A(e)||T(e);const a=A(e);(s=r[a])||(s=r[a]={emitter:e,callbacks:{}}),(n=s.callbacks[t])||(n=s.callbacks[t]=[]),n.push(o),function(e,t,o,i,s){t._addEventListener?t._addEventListener(o,i,s):e._addEventListener.call(t,o,i,s)}(this,e,t,o,i)}stopListening(e,t,o){const i=this[v];let s=e&&A(e);const n=i&&s?i[s]:void 0,r=n&&t?n.callbacks[t]:void 0;if(!(!i||e&&!n||t&&!r))if(o){M(this,e,t,o);-1!==r.indexOf(o)&&(1===r.length?delete n.callbacks[t]:M(this,e,t,o))}else if(r){for(;o=r.pop();)M(this,e,t,o);delete n.callbacks[t]}else if(n){for(t in n.callbacks)this.stopListening(e,t);delete i[s]}else{for(s in i)this.stopListening(i[s].emitter);delete this[v]}}fire(e,...t){try{const o=e instanceof f?e:new f(this,e),i=o.name;let s=O(this,i);if(o.path.push(this),s){const e=[o,...t];s=Array.from(s);for(let t=0;t<s.length&&(s[t].callback.apply(this,e),o.off.called&&(delete o.off.called,this._removeEventListener(i,s[t].callback)),!o.stop.called);t++);}const n=this[x];if(n){const e=n.get(i),s=n.get("*");e&&R(e,o,t),s&&R(s,o,t)}return o.return}catch(e){k.ZP.rethrowUnexpectedError(e,this)}}delegate(...e){return{to:(t,o)=>{this[x]||(this[x]=new Map),e.forEach((e=>{const i=this[x].get(e);i?i.set(t,o):this[x].set(e,new Map([[t,o]]))}))}}}stopDelegating(e,t){if(this[x])if(e)if(t){const o=this[x].get(e);o&&o.delete(t)}else this[x].delete(e);else this[x].clear()}_addEventListener(e,t,o){!function(e,t){const o=C(e);if(o[t])return;let i=t,s=null;const n=[];for(;""!==i&&!o[i];)o[i]={callbacks:[],childEvents:[]},n.push(o[i]),s&&o[i].childEvents.push(s),s=i,i=i.substr(0,i.lastIndexOf(":"));if(""!==i){for(const e of n)e.callbacks=o[i].callbacks.slice();o[i].childEvents.push(s)}}(this,e);const i=S(this,e),s={callback:t,priority:b.get(o.priority)};for(const e of i)_(e,s)}_removeEventListener(e,t){const o=S(this,e);for(const e of o)for(let o=0;o<e.length;o++)e[o].callback==t&&(e.splice(o,1),o--)}}}function T(e,t){e[y]||(e[y]=t||m())}function A(e){return e[y]}function C(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function S(e,t){const o=C(e)[t];if(!o)return[];let i=[o.callbacks];for(let t=0;t<o.childEvents.length;t++){const s=S(e,o.childEvents[t]);i=i.concat(s)}return i}function O(e,t){let o;return e._events&&(o=e._events[t])&&o.callbacks.length?o.callbacks:t.indexOf(":")>-1?O(e,t.substr(0,t.lastIndexOf(":"))):null}function R(e,t,o){for(let[i,s]of e){s?"function"==typeof s&&(s=s(t.name)):s=t.name;const e=new f(t.source,s);e.path=[...t.path],i.fire(e,...o)}}function M(e,t,o,i){t._removeEventListener?t._removeEventListener(o,i):e._removeEventListener.call(t,o,i)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{E[e]=P.prototype[e]}));var j=o("./node_modules/lodash-es/isObject.js");const B=Symbol("observableProperties"),D=Symbol("boundObservables"),V=Symbol("boundProperties"),I=Symbol("decoratedMethods"),N=Symbol("decoratedOriginal"),z=F(E());function F(e){if(!e)return z;return class extends e{set(e,t){if((0,j.Z)(e))return void Object.keys(e).forEach((t=>{this.set(t,e[t])}),this);L(this);const o=this[B];if(e in this&&!o.has(e))throw new k.ZP("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>o.get(e),set(t){const i=o.get(e);let s=this.fire(`set:${e}`,e,t,i);void 0===s&&(s=t),i===s&&o.has(e)||(o.set(e,s),this.fire(`change:${e}`,e,s,i))}}),this[e]=t}bind(...e){if(!e.length||!$(e))throw new k.ZP("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new k.ZP("observable-bind-duplicate-properties",this);L(this);const t=this[V];e.forEach((e=>{if(t.has(e))throw new k.ZP("observable-bind-rebind",this)}));const o=new Map;return e.forEach((e=>{const i={property:e,to:[]};t.set(e,i),o.set(e,i)})),{to:Z,toMany:W,_observable:this,_bindProperties:e,_to:[],_bindings:o}}unbind(...e){if(!this[B])return;const t=this[V],o=this[D];if(e.length){if(!$(e))throw new k.ZP("observable-unbind-wrong-properties",this);e.forEach((e=>{const i=t.get(e);i&&(i.to.forEach((([e,t])=>{const s=o.get(e),n=s[t];n.delete(i),n.size||delete s[t],Object.keys(s).length||(o.delete(e),this.stopListening(e,"change"))})),t.delete(e))}))}else o.forEach(((e,t)=>{this.stopListening(t,"change")})),o.clear(),t.clear()}decorate(e){L(this);const t=this[e];if(!t)throw new k.ZP("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,((e,o)=>{e.return=t.apply(this,o)})),this[e]=function(...t){return this.fire(e,t)},this[e][N]=t,this[I]||(this[I]=[]),this[I].push(e)}stopListening(e,t,o){if(!e&&this[I]){for(const e of this[I])this[e]=this[e][N];delete this[I]}super.stopListening(e,t,o)}}}function L(e){e[B]||(Object.defineProperty(e,B,{value:new Map}),Object.defineProperty(e,D,{value:new Map}),Object.defineProperty(e,V,{value:new Map}))}function Z(...e){const t=function(...e){if(!e.length)throw new k.ZP("observable-bind-to-parse-error",null);const t={to:[]};let o;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach((e=>{if("string"==typeof e)o.properties.push(e);else{if("object"!=typeof e)throw new k.ZP("observable-bind-to-parse-error",null);o={observable:e,properties:[]},t.to.push(o)}})),t}(...e),o=Array.from(this._bindings.keys()),i=o.length;if(!t.callback&&t.to.length>1)throw new k.ZP("observable-bind-to-no-callback",this);if(i>1&&t.callback)throw new k.ZP("observable-bind-to-extra-callback",this);var s;t.to.forEach((e=>{if(e.properties.length&&e.properties.length!==i)throw new k.ZP("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)})),this._to=t.to,t.callback&&(this._bindings.get(o[0]).callback=t.callback),s=this._observable,this._to.forEach((e=>{const t=s[D];let o;t.get(e.observable)||s.listenTo(e.observable,"change",((i,n)=>{o=t.get(e.observable)[n],o&&o.forEach((e=>{q(s,e.property)}))}))})),function(e){let t;e._bindings.forEach(((o,i)=>{e._to.forEach((s=>{t=s.properties[o.callback?0:e._bindProperties.indexOf(i)],o.to.push([s.observable,t]),function(e,t,o,i){const s=e[D],n=s.get(o),r=n||{};r[i]||(r[i]=new Set);r[i].add(t),n||s.set(o,r)}(e._observable,o,s.observable,t)}))}))}(this),this._bindProperties.forEach((e=>{q(this._observable,e)}))}function W(e,t,o){if(this._bindings.size>1)throw new k.ZP("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const o=e.map((e=>[e,t]));return Array.prototype.concat.apply([],o)}(e,t),o)}function $(e){return e.every((e=>"string"==typeof e))}function q(e,t){const o=e[V].get(t);let i;o.callback?i=o.callback.apply(e,o.to.map((e=>e[0][e[1]]))):(i=o.to[0],i=i[0][i[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=i:e.set(t,i)}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{F[e]=z.prototype[e]}));class H{constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach((({element:e,newElement:t})=>{e.style.display="",t&&t.remove()})),this._replacedElements=[]}}function U(e){let t=0;for(const o of e)t++;return t}function K(e,t){const o=Math.min(e.length,t.length);for(let i=0;i<o;i++)if(e[i]!=t[i])return i;return e.length==t.length?"same":e.length<t.length?"prefix":"extension"}function G(e){return!(!e||!e[Symbol.iterator])}var J=o("./node_modules/lodash-es/_baseGetTag.js"),Y=o("./node_modules/lodash-es/isArray.js"),X=o("./node_modules/lodash-es/isObjectLike.js");const Q=function(e){return"string"==typeof e||!(0,Y.Z)(e)&&(0,X.Z)(e)&&"[object String]"==(0,J.Z)(e)};function ee(e,t,o={},i=[]){const s=o&&o.xmlns,n=s?e.createElementNS(s,t):e.createElement(t);for(const e in o)n.setAttribute(e,o[e]);!Q(i)&&G(i)||(i=[i]);for(let t of i)Q(t)&&(t=e.createTextNode(t)),n.appendChild(t);return n}var te=o("./node_modules/lodash-es/isPlainObject.js"),oe=o("./node_modules/lodash-es/cloneDeepWith.js"),ie=o("./node_modules/lodash-es/isElement.js");class se{constructor(e,t){this._config={},t&&this.define(ne(t)),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}*names(){for(const e of Object.keys(this._config))yield e}_setToTarget(e,t,o,i=!1){if((0,te.Z)(t))return void this._setObjectToTarget(e,t,i);const s=t.split(".");t=s.pop();for(const t of s)(0,te.Z)(e[t])||(e[t]={}),e=e[t];if((0,te.Z)(o))return(0,te.Z)(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,o,i);i&&void 0!==e[t]||(e[t]=o)}_getFromSource(e,t){const o=t.split(".");t=o.pop();for(const t of o){if(!(0,te.Z)(e[t])){e=null;break}e=e[t]}return e?ne(e[t]):void 0}_setObjectToTarget(e,t,o){Object.keys(t).forEach((i=>{this._setToTarget(e,i,t[i],o)}))}}function ne(e){return(0,oe.Z)(e,re)}function re(e){return(0,ie.Z)(e)?e:void 0}function ae(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function ce(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}const le=de(E());function de(e){if(!e)return le;return class extends e{listenTo(e,t,o,i={}){if(ae(e)||ce(e)){const s={capture:!!i.useCapture,passive:!!i.usePassive},n=this._getProxyEmitter(e,s)||new he(e,s);this.listenTo(n,t,o,i)}else super.listenTo(e,t,o,i)}stopListening(e,t,o){if(ae(e)||ce(e)){const i=this._getAllProxyEmitters(e);for(const e of i)this.stopListening(e,t,o)}else super.stopListening(e,t,o)}_getProxyEmitter(e,t){return function(e,t){const o=e[v];return o&&o[t]?o[t].emitter:null}(this,ue(e,t))}_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((t=>this._getProxyEmitter(e,t))).filter((e=>!!e))}}}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{de[e]=le.prototype[e]}));class he extends(E()){constructor(e,t){super(),T(this,ue(e,t)),this._domNode=e,this._options=t}attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()}_addEventListener(e,t,o){this.attach(e),E().prototype._addEventListener.call(this,e,t,o)}_removeEventListener(e,t){E().prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){const t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}}function ue(e,t){let o=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=m())}(e);for(const e of Object.keys(t).sort())t[e]&&(o+="-"+e);return o}let pe;try{pe={window,document}}catch(e){pe={window:{},document:{}}}const fe=pe;function ge(e){let t=e.parentElement;if(!t)return null;for(;"BODY"!=t.tagName;){const e=t.style.overflowY||fe.window.getComputedStyle(t).overflowY;if("auto"===e||"scroll"===e)break;if(t=t.parentElement,!t)return null}return t}function me(e){const t=[];let o=e;for(;o&&o.nodeType!=Node.DOCUMENT_NODE;)t.unshift(o),o=o.parentNode;return t}function be(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function _e(e){return"[object Text]"==Object.prototype.toString.call(e)}function we(e){return"[object Range]"==Object.prototype.toString.apply(e)}function ke(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}const ve=["top","right","bottom","left","width","height"];class ye{constructor(e){const t=we(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),Ee(e)||t)if(t){const t=ye.getDomRangeRects(e);xe(this,ye.getBoundingRect(t))}else xe(this,e.getBoundingClientRect());else if(ce(e)){const{innerWidth:t,innerHeight:o}=e;xe(this,{top:0,right:t,bottom:o,left:0,width:t,height:o})}else xe(this,e)}clone(){return new ye(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};return t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0?null:new ye(t)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!Pe(e)){let o=e.parentNode||e.commonAncestorContainer;for(;o&&!Pe(o);){const e=new ye(o),i=t.getIntersection(e);if(!i)return null;i.getArea()<t.getArea()&&(t=i),o=o.parentNode}}return t}isEqual(e){for(const t of ve)if(this[t]!==e[t])return!1;return!0}contains(e){const t=this.getIntersection(e);return!(!t||!t.isEqual(e))}excludeScrollbarsAndBorders(){const e=this._source;let t,o,i;if(ce(e))t=e.innerWidth-e.document.documentElement.clientWidth,o=e.innerHeight-e.document.documentElement.clientHeight,i=e.getComputedStyle(e.document.documentElement).direction;else{const s=ke(e);t=e.offsetWidth-e.clientWidth-s.left-s.right,o=e.offsetHeight-e.clientHeight-s.top-s.bottom,i=e.ownerDocument.defaultView.getComputedStyle(e).direction,this.left+=s.left,this.top+=s.top,this.right-=s.right,this.bottom-=s.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=t,"ltr"===i?this.right-=t:this.left+=t,this.height-=o,this.bottom-=o,this}static getDomRangeRects(e){const t=[],o=Array.from(e.getClientRects());if(o.length)for(const e of o)t.push(new ye(e));else{let o=e.startContainer;_e(o)&&(o=o.parentNode);const i=new ye(o.getBoundingClientRect());i.right=i.left,i.width=0,t.push(i)}return t}static getBoundingRect(e){const t={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,width:0,height:0};let o=0;for(const i of e)o++,t.left=Math.min(t.left,i.left),t.top=Math.min(t.top,i.top),t.right=Math.max(t.right,i.right),t.bottom=Math.max(t.bottom,i.bottom);return 0==o?null:(t.width=t.right-t.left,t.height=t.bottom-t.top,new ye(t))}}function xe(e,t){for(const o of ve)e[o]=t[o]}function Pe(e){return!!Ee(e)&&e===e.ownerDocument.body}function Ee(e){return null!==e&&"object"==typeof e&&1===e.nodeType&&"function"==typeof e.getBoundingClientRect}const Te=class{constructor(e,t){Te._observerInstance||Te._createObserver(),this._element=e,this._callback=t,Te._addElementCallback(e,t),Te._observerInstance.observe(e)}destroy(){Te._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,t){Te._elementCallbacks||(Te._elementCallbacks=new Map);let o=Te._elementCallbacks.get(e);o||(o=new Set,Te._elementCallbacks.set(e,o)),o.add(t)}static _deleteElementCallback(e,t){const o=Te._getElementCallbacks(e);o&&(o.delete(t),o.size||(Te._elementCallbacks.delete(e),Te._observerInstance.unobserve(e))),Te._elementCallbacks&&!Te._elementCallbacks.size&&(Te._observerInstance=null,Te._elementCallbacks=null)}static _getElementCallbacks(e){return Te._elementCallbacks?Te._elementCallbacks.get(e):null}static _createObserver(){Te._observerInstance=new fe.window.ResizeObserver((e=>{for(const t of e){const e=Te._getElementCallbacks(t.target);if(e)for(const o of e)o(t)}}))}};let Ae=Te;function Ce(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function Se(e){return t=>t+e}function Oe(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Re(e,t,o){e.insertBefore(o,e.childNodes[t]||null)}function Me(e){return e&&e.nodeType===Node.COMMENT_NODE}function je(e){try{fe.document.createAttribute(e)}catch(e){return!1}return!0}function Be(e){return!!(e&&e.getClientRects&&e.getClientRects().length)}Ae._observerInstance=null,Ae._elementCallbacks=null;var De=o("./node_modules/lodash-es/isFunction.js"),Ve=Math.pow;function Ie({element:e,target:t,positions:o,limiter:i,fitInViewport:s,viewportOffsetConfig:n}){(0,De.Z)(t)&&(t=t()),(0,De.Z)(i)&&(i=i());const r=function(e){return e&&e.parentNode?e.offsetParent===fe.document.body?null:e.offsetParent:null}(e),a=new ye(e),c=new ye(t);let l;const d=s&&function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new ye(fe.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(n)||null,h={targetRect:c,elementRect:a,positionedElementAncestor:r,viewportRect:d};if(i||s){const e=i&&new ye(i).getVisible();Object.assign(h,{limiterRect:e,viewportRect:d}),l=function(e,t){const{elementRect:o}=t,i=o.getArea(),s=e.map((e=>new ze(e,t))).filter((e=>!!e.name));let n=0,r=null;for(const e of s){const{limiterIntersectionArea:t,viewportIntersectionArea:o}=e;if(t===i)return e;const s=Ve(o,2)+Ve(t,2);s>n&&(n=s,r=e)}return r}(o,h)||new ze(o[0],h)}else l=new ze(o[0],h);return l}function Ne(e){const{scrollX:t,scrollY:o}=fe.window;return e.clone().moveBy(t,o)}class ze{constructor(e,t){const o=e(t.targetRect,t.elementRect,t.viewportRect);if(!o)return;const{left:i,top:s,name:n,config:r}=o;this.name=n,this.config=r,this._positioningFunctionCorrdinates={left:i,top:s},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const e=this._options.limiterRect;if(e){const t=this._options.viewportRect;if(!t)return e.getIntersectionArea(this._rect);{const o=e.getIntersection(t);if(o)return o.getIntersectionArea(this._rect)}}return 0}get viewportIntersectionArea(){const e=this._options.viewportRect;return e?e.getIntersectionArea(this._rect):0}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCorrdinates.left,this._positioningFunctionCorrdinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=Ne(this._rect),this._options.positionedElementAncestor&&function(e,t){const o=Ne(new ye(t)),i=ke(t);let s=0,n=0;s-=o.left,n-=o.top,s+=t.scrollLeft,n+=t.scrollTop,s-=i.left,n-=i.top,e.moveBy(s,n)}(this._cachedAbsoluteRect,this._options.positionedElementAncestor)),this._cachedAbsoluteRect}}function Fe(e){const t=e.parentNode;t&&t.removeChild(e)}function Le({target:e,viewportOffset:t=0,ancestorOffset:o=0,alignToTop:i,forceScroll:s}){const n=Ge(e);let r=n,a=null;for(;r;){let c;c=Je(r==n?e:a),$e({parent:c,getRect:()=>Ye(e,r),alignToTop:i,ancestorOffset:o,forceScroll:s});const l=Ye(e,r);if(We({window:r,rect:l,viewportOffset:t,alignToTop:i,forceScroll:s}),r.parent!=r){if(a=r.frameElement,r=r.parent,!a)return}else r=null}}function Ze(e,t){$e({parent:Je(e),getRect:()=>new ye(e),ancestorOffset:t})}function We({window:e,rect:t,alignToTop:o,forceScroll:i,viewportOffset:s}){const n=t.clone().moveBy(0,s),r=t.clone().moveBy(0,-s),a=new ye(e).excludeScrollbarsAndBorders(),c=o&&i,l=[r,n].every((e=>a.contains(e)));let{scrollX:d,scrollY:h}=e;const u=d,p=h;c?h-=a.top-t.top+s:l||(He(r,a)?h-=a.top-t.top+s:qe(n,a)&&(h+=o?t.top-a.top-s:t.bottom-a.bottom+s)),l||(Ue(t,a)?d-=a.left-t.left+s:Ke(t,a)&&(d+=t.right-a.right+s)),d==u&&h===p||e.scrollTo(d,h)}function $e({parent:e,getRect:t,alignToTop:o,forceScroll:i,ancestorOffset:s=0}){const n=Ge(e),r=o&&i;let a,c,l;for(;e!=n.document.body;)c=t(),a=new ye(e).excludeScrollbarsAndBorders(),l=a.contains(c),r?e.scrollTop-=a.top-c.top+s:l||(He(c,a)?e.scrollTop-=a.top-c.top+s:qe(c,a)&&(e.scrollTop+=o?c.top-a.top-s:c.bottom-a.bottom+s)),l||(Ue(c,a)?e.scrollLeft-=a.left-c.left+s:Ke(c,a)&&(e.scrollLeft+=c.right-a.right+s)),e=e.parentNode}function qe(e,t){return e.bottom>t.bottom}function He(e,t){return e.top<t.top}function Ue(e,t){return e.left<t.left}function Ke(e,t){return e.right>t.right}function Ge(e){return we(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function Je(e){if(we(e)){let t=e.commonAncestorContainer;return _e(t)&&(t=t.parentNode),t}return e.parentNode}function Ye(e,t){const o=Ge(e),i=new ye(e);if(o===t)return i;{let e=o;for(;e!=t;){const t=e.frameElement,o=new ye(t).excludeScrollbarsAndBorders();i.moveBy(o.left,o.top),e=e.parent}}return i}const Xe={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},Qe={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},et=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++){e[String.fromCharCode(t).toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;for(const t of"`-=[];',./\\")e[t]=t.charCodeAt(0);return e}(),tt=Object.fromEntries(Object.entries(et).map((([e,t])=>[t,e.charAt(0).toUpperCase()+e.slice(1)])));function ot(e){let t;if("string"==typeof e){if(t=et[e.toLowerCase()],!t)throw new k.ZP("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?et.alt:0)+(e.ctrlKey?et.ctrl:0)+(e.shiftKey?et.shift:0)+(e.metaKey?et.cmd:0);return t}function it(e){return"string"==typeof e&&(e=function(e){return e.split("+").map((e=>e.trim()))}(e)),e.map((e=>"string"==typeof e?function(e){if(e.endsWith("!"))return ot(e.slice(0,-1));const t=ot(e);return n.isMac&&t==et.ctrl?et.cmd:t}(e):e)).reduce(((e,t)=>t+e),0)}function st(e){let t=it(e);return Object.entries(n.isMac?Xe:Qe).reduce(((e,[o,i])=>(0!=(t&et[o])&&(t&=~et[o],e+=i),e)),"")+(t?tt[t]:"")}function nt(e){return e==et.arrowright||e==et.arrowleft||e==et.arrowup||e==et.arrowdown}function rt(e,t){const o="ltr"===t;switch(e){case et.arrowleft:return o?"left":"right";case et.arrowright:return o?"right":"left";case et.arrowup:return"up";case et.arrowdown:return"down"}}function at(e,t){const o=rt(e,t);return"down"===o||"right"===o}const ct=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function lt(e){return ct.includes(e)?"rtl":"ltr"}function dt(e){return Array.isArray(e)?e:[e]}function ht(e,t,o=1){if("number"!=typeof o)throw new k.ZP("translation-service-quantity-not-a-number",null,{quantity:o});const i=Object.keys(fe.window.CKEDITOR_TRANSLATIONS).length;1===i&&(e=Object.keys(fe.window.CKEDITOR_TRANSLATIONS)[0]);const s=t.id||t.string;if(0===i||!function(e,t){return!!fe.window.CKEDITOR_TRANSLATIONS[e]&&!!fe.window.CKEDITOR_TRANSLATIONS[e].dictionary[t]}(e,s))return 1!==o?t.plural:t.string;const n=fe.window.CKEDITOR_TRANSLATIONS[e].dictionary,r=fe.window.CKEDITOR_TRANSLATIONS[e].getPluralForm||(e=>1===e?0:1),a=n[s];if("string"==typeof a)return a;return a[Number(r(o))]}fe.window.CKEDITOR_TRANSLATIONS||(fe.window.CKEDITOR_TRANSLATIONS={});class ut{constructor({uiLanguage:e="en",contentLanguage:t}={}){this.uiLanguage=e,this.contentLanguage=t||this.uiLanguage,this.uiLanguageDirection=lt(this.uiLanguage),this.contentLanguageDirection=lt(this.contentLanguage),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){t=dt(t),"string"==typeof e&&(e={string:e});const o=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,((e,o)=>o<t.length?t[o]:e))}(ht(this.uiLanguage,e,o),t)}}class pt extends(E()){constructor(e={},t={}){super();const o=G(e);if(o||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],o)for(const t of e)this._items.push(t),this._itemMap.set(this._getItemIdBeforeAdding(t),t)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){return this.addMany([e],t)}addMany(e,t){if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new k.ZP("collection-add-item-invalid-index",this);let o=0;for(const i of e){const e=this._getItemIdBeforeAdding(i),s=t+o;this._items.splice(s,0,i),this._itemMap.set(e,i),this.fire("add",i,s),o++}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new k.ZP("collection-get-invalid-arg",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{const t=e[this._idProperty];return t&&this._itemMap.has(t)}}getIndex(e){let t;return t="string"==typeof e?this._itemMap.get(e):e,t?this._items.indexOf(t):-1}remove(e){const[t,o]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:o}),t}map(e,t){return this._items.map(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new k.ZP("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding((t=>new e(t)))},using:e=>{"function"==typeof e?this._setUpBindToBinding(e):this._setUpBindToBinding((t=>t[e]))}}}_setUpBindToBinding(e){const t=this._bindToCollection,o=(o,i,s)=>{const n=t._bindToCollection==this,r=t._bindToInternalToExternalMap.get(i);if(n&&r)this._bindToExternalToInternalMap.set(i,r),this._bindToInternalToExternalMap.set(r,i);else{const o=e(i);if(!o)return void this._skippedIndexesFromExternal.push(s);let n=s;for(const e of this._skippedIndexesFromExternal)s>e&&n--;for(const e of t._skippedIndexesFromExternal)n>=e&&n++;this._bindToExternalToInternalMap.set(i,o),this._bindToInternalToExternalMap.set(o,i),this.add(o,n);for(let e=0;e<t._skippedIndexesFromExternal.length;e++)n<=t._skippedIndexesFromExternal[e]&&t._skippedIndexesFromExternal[e]++}};for(const e of t)o(0,e,t.getIndex(e));this.listenTo(t,"add",o),this.listenTo(t,"remove",((e,t,o)=>{const i=this._bindToExternalToInternalMap.get(t);i&&this.remove(i),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((e,t)=>(o<t&&e.push(t-1),o>t&&e.push(t),e)),[])}))}_getItemIdBeforeAdding(e){const t=this._idProperty;let o;if(t in e){if(o=e[t],"string"!=typeof o)throw new k.ZP("collection-add-invalid-id",this);if(this.get(o))throw new k.ZP("collection-add-item-already-exists",this)}else e[t]=o=m();return o}_remove(e){let t,o,i,s=!1;const n=this._idProperty;if("string"==typeof e?(o=e,i=this._itemMap.get(o),s=!i,i&&(t=this._items.indexOf(i))):"number"==typeof e?(t=e,i=this._items[t],s=!i,i&&(o=i[n])):(i=e,o=i[n],t=this._items.indexOf(i),s=-1==t||!this._itemMap.get(o)),s)throw new k.ZP("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(o);const r=this._bindToInternalToExternalMap.get(i);return this._bindToInternalToExternalMap.delete(i),this._bindToExternalToInternalMap.delete(r),this.fire("remove",i,t),[i,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function ft(e){const t=e.next();return t.done?null:t.value}class gt extends(de(F())){constructor(){super(),this._elements=new Set,this._nextEventLoopTimeout=null,this.set("isFocused",!1),this.set("focusedElement",null)}add(e){if(this._elements.has(e))throw new k.ZP("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",(()=>this._focus(e)),{useCapture:!0}),this.listenTo(e,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}class mt{constructor(){this._listener=new(de())}listenTo(e){this._listener.listenTo(e,"keydown",((e,t)=>{this._listener.fire("_keydown:"+ot(t),t)}))}set(e,t,o={}){const i=it(e),s=o.priority;this._listener.listenTo(this._listener,"_keydown:"+i,((e,o)=>{t(o,(()=>{o.preventDefault(),o.stopPropagation(),e.stop()})),e.return=!0}),{priority:s})}press(e){return!!this._listener.fire("_keydown:"+ot(e),e)}stopListening(e){this._listener.stopListening(e)}destroy(){this.stopListening()}}function bt(e){return G(e)?new Map(e):function(e){const t=new Map;for(const o in e)t.set(o,e[o]);return t}(e)}const _t=1e4;function wt(e,t,o,i){if(Math.max(t.length,e.length)>_t)return e.slice(0,o).concat(t).concat(e.slice(o+i,e.length));{const s=Array.from(e);return s.splice(o,i,...t),s}}function kt(e,t){let o;function i(...s){i.cancel(),o=setTimeout((()=>e(...s)),t)}return i.cancel=()=>{clearTimeout(o)},i}function vt(e){function t(e){return e.match(/^[a-zA-Z0-9+/=$]+$/g)&&e.length>=40&&e.length<=255?"VALID":"INVALID"}let o="",i="";if(!e)return"INVALID";try{o=atob(e)}catch(e){return"INVALID"}const s=o.split("-"),n=s[0],r=s[1];if(!r)return t(e);try{atob(r)}catch(o){try{if(atob(n),!atob(n).length)return t(e)}catch(o){return t(e)}}if(n.length<40||n.length>255)return"INVALID";try{atob(n)}catch(e){return"INVALID"}try{i=atob(r)}catch(e){return"INVALID"}if(8!==i.length)return"INVALID";const a=Number(i.substring(0,4)),c=Number(i.substring(4,6))-1,l=Number(i.substring(6,8)),d=new Date(a,c,l);return d<w.D||isNaN(Number(d))?"INVALID":"VALID"}function yt(e){return!!e&&1==e.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(e)}function xt(e){return!!e&&1==e.length&&/[\ud800-\udbff]/.test(e)}function Pt(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}function Et(e,t){return xt(e.charAt(t-1))&&Pt(e.charAt(t))}function Tt(e,t){return yt(e.charAt(t))}const At=function(){const e=[new RegExp("\\p{Emoji}[\\u{E0020}-\\u{E007E}]+\\u{E007F}","u"),new RegExp("\\p{Emoji}\\u{FE0F}?\\u{20E3}","u"),new RegExp("\\p{Emoji}\\u{FE0F}","u"),new RegExp("(?=\\p{General_Category=Other_Symbol})\\p{Emoji}\\p{Emoji_Modifier}*","u")],t=new RegExp("\\p{Regional_Indicator}{2}","u").source,o="(?:"+e.map((e=>e.source)).join("|")+")";return new RegExp(`${t}|${o}(?:â€${o})*`,"ug")}();function Ct(e,t){const o=String(e).matchAll(At);return Array.from(o).some((e=>e.index<t&&t<e.index+e[0].length))}},"./packages/ckeditor5-utils/src/version.ts":(e,t,o)=>{"use strict";o.d(t,{D:()=>r,Z:()=>n});var i=o("./packages/ckeditor5-utils/src/ckeditorerror.ts");const s="38.0.0",n=s,r=new Date(2023,4,22),a="object"==typeof window?window:o.g;if(a.CKEDITOR_VERSION)throw new i.ZP("ckeditor-duplicated-modules",null);a.CKEDITOR_VERSION=s},"./packages/ckeditor5-widget/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{s4:()=>f,Uo:()=>g,$L:()=>W,WR:()=>ce,e8:()=>q,Ww:()=>I,KT:()=>P,id:()=>y,Qd:()=>m,em:()=>k,l6:()=>v,XC:()=>b,sC:()=>x,$n:()=>E});var i=o("./packages/ckeditor5-core/src/index.ts"),s=o("./packages/ckeditor5-engine/src/index.ts"),n=o("./packages/ckeditor5-typing/src/index.ts"),r=o("./packages/ckeditor5-utils/src/index.ts"),a=o("./packages/ckeditor5-ui/src/index.ts"),c=o("./packages/ckeditor5-enter/src/index.ts");class l extends((0,r.ln)()){constructor(){super(...arguments),this._stack=[]}add(e,t){const o=this._stack,i=o[0];this._insertDescriptor(e);const s=o[0];i===s||d(i,s)||this.fire("change:top",{oldDescriptor:i,newDescriptor:s,writer:t})}remove(e,t){const o=this._stack,i=o[0];this._removeDescriptor(e);const s=o[0];i===s||d(i,s)||this.fire("change:top",{oldDescriptor:i,newDescriptor:s,writer:t})}_insertDescriptor(e){const t=this._stack,o=t.findIndex((t=>t.id===e.id));if(d(e,t[o]))return;o>-1&&t.splice(o,1);let i=0;for(;t[i]&&h(t[i],e);)i++;t.splice(i,0,e)}_removeDescriptor(e){const t=this._stack,o=t.findIndex((t=>t.id===e));o>-1&&t.splice(o,1)}}function d(e,t){return e&&t&&e.priority==t.priority&&u(e.classes)==u(t.classes)}function h(e,t){return e.priority>t.priority||!(e.priority<t.priority)&&u(e.classes)>u(t.classes)}function u(e){return Array.isArray(e)?e.sort().join(","):e}const p='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z"/><path fill-opacity=".256" d="M1 1h14v14H1z"/><g class="ck-icon__selected-indicator"><path d="M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z"/><path fill-opacity=".254" d="M1 1h14v14H1z"/></g></svg>',f="ck-widget",g="ck-widget_selected";function m(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function b(e,t,o={}){if(!e.is("containerElement"))throw new r.Bb("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass(f,e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=T,t.setCustomProperty("widgetLabel",[],e),o.label&&v(e,o.label),o.hasSelectionHandle&&function(e,t){const o=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){const t=this.toDomElement(e),o=new a.mO;return o.set("content",p),o.render(),t.appendChild(o.element),t}));t.insert(t.createPositionAt(e,0),o),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),k(e,t),e}function _(e,t,o){if(t.classes&&o.addClass((0,r.qo)(t.classes),e),t.attributes)for(const i in t.attributes)o.setAttribute(i,t.attributes[i],e)}function w(e,t,o){if(t.classes&&o.removeClass((0,r.qo)(t.classes),e),t.attributes)for(const i in t.attributes)o.removeAttribute(i,e)}function k(e,t,o=_,i=w){const s=new l;s.on("change:top",((t,s)=>{s.oldDescriptor&&i(e,s.oldDescriptor,s.writer),s.newDescriptor&&o(e,s.newDescriptor,s.writer)}));t.setCustomProperty("addHighlight",((e,t,o)=>s.add(t,o)),e),t.setCustomProperty("removeHighlight",((e,t,o)=>s.remove(t,o)),e)}function v(e,t){e.getCustomProperty("widgetLabel").push(t)}function y(e){return e.getCustomProperty("widgetLabel").reduce(((e,t)=>"function"==typeof t?e?e+". "+t():t():e?e+". "+t:t),"")}function x(e,t,o={}){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("role","textbox",e),o.label&&t.setAttribute("aria-label",o.label,e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",((o,i,s)=>{t.setAttribute("contenteditable",s?"false":"true",e)})),e.on("change:isFocused",((o,i,s)=>{s?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)})),k(e,t),e}function P(e,t){const o=e.getSelectedElement();if(o){const i=S(e);if(i)return t.createRange(t.createPositionAt(o,i))}return(0,s.KT)(e,t)}function E(e,t){return(o,i)=>{const{mapper:s,viewPosition:n}=i,r=s.findMappedViewAncestor(n);if(!t(r))return;const a=s.toModelElement(r);i.modelPosition=e.createPositionAt(a,n.isAtStart?"before":"after")}}function T(){return null}const A="widget-type-around";function C(e,t,o){return!!e&&m(e)&&!o.isInline(t)}function S(e){return e.getAttribute(A)}var O=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),R=o.n(O),M=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgettypearound.css"),j={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};R()(M.Z,j);M.Z.locals;const B=["before","after"],D=(new DOMParser).parseFromString('<svg viewBox="0 0 10 8" xmlns="http://www.w3.org/2000/svg"><path d="M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038"/></svg>',"image/svg+xml").firstChild,V="ck-widget__type-around_disabled";class I extends i.Sy{constructor(){super(...arguments),this._currentFakeCaretModelElement=null}static get pluginName(){return"WidgetTypeAround"}static get requires(){return[c.C,n.HG]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",((o,i,s)=>{t.change((e=>{for(const o of t.document.roots)s?e.removeClass(V,o):e.addClass(V,o)})),s||e.model.change((e=>{e.removeSelectionAttribute(A)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const o=this.editor,i=o.editing.view,s=o.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);o.execute("insertParagraph",{position:o.model.createPositionAt(e,t),attributes:s}),i.focus(),i.scrollToTheSelection()}_listenToIfEnabled(e,t,o,i){this.listenTo(e,t,((...e)=>{this.isEnabled&&o(...e)}),i)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=S(e);if(!t)return!1;const o=e.getSelectedElement();return this._insertParagraph(o,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,o=e.locale.t,i={before:o("Insert paragraph before block"),after:o("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",((e,s,n)=>{const r=n.mapper.toViewElement(s.item);if(r&&C(r,s.item,t)){!function(e,t,o){const i=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){const o=this.toDomElement(e);return function(e,t){for(const o of B){const i=new a.YS({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${o}`],title:t[o],"aria-hidden":"true"},children:[e.ownerDocument.importNode(D,!0)]});e.appendChild(i.render())}}(o,t),function(e){const t=new a.YS({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(o),o}));e.insert(e.createPositionAt(o,"end"),i)}(n.writer,i,r);r.getCustomProperty("widgetLabel").push((()=>this.isEnabled?o("Press Enter to type after or press Shift + Enter to type before the widget"):""))}}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,o=t.document.selection,i=t.schema,s=e.editing.view;function n(e){return`ck-widget_type-around_show-fake-caret_${e}`}this._listenToIfEnabled(s.document,"arrowKey",((e,t)=>{this._handleArrowKeyPress(e,t)}),{context:[m,"$text"],priority:"high"}),this._listenToIfEnabled(o,"change:range",((t,o)=>{o.directChange&&e.model.change((e=>{e.removeSelectionAttribute(A)}))})),this._listenToIfEnabled(t.document,"change:data",(()=>{const t=o.getSelectedElement();if(t){if(C(e.editing.mapper.toViewElement(t),t,i))return}e.model.change((e=>{e.removeSelectionAttribute(A)}))})),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",((e,t,o)=>{const s=o.writer;if(this._currentFakeCaretModelElement){const e=o.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(s.removeClass(B.map(n),e),this._currentFakeCaretModelElement=null)}const r=t.selection.getSelectedElement();if(!r)return;const a=o.mapper.toViewElement(r);if(!C(a,r,i))return;const c=S(t.selection);c&&(s.addClass(n(c),a),this._currentFakeCaretModelElement=r)})),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",((t,o,i)=>{i||e.model.change((e=>{e.removeSelectionAttribute(A)}))}))}_handleArrowKeyPress(e,t){const o=this.editor,i=o.model,s=i.document.selection,n=i.schema,a=o.editing.view,c=t.keyCode,l=(0,r.Zt)(c,o.locale.contentLanguageDirection),d=a.document.selection.getSelectedElement();let h;C(d,o.editing.mapper.toModelElement(d),n)?h=this._handleArrowKeyPressOnSelectedWidget(l):s.isCollapsed?h=this._handleArrowKeyPressWhenSelectionNextToAWidget(l):t.shiftKey||(h=this._handleArrowKeyPressWhenNonCollapsedSelection(l)),h&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,o=S(t.document.selection);return t.change((t=>{if(!o)return t.setSelectionAttribute(A,e?"after":"before"),!0;if(!(o===(e?"after":"before")))return t.removeSelectionAttribute(A),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,o=t.model,i=o.schema,s=t.plugins.get("Widget"),n=s._getObjectElementNextToSelection(e);return!!C(t.editing.mapper.toViewElement(n),n,i)&&(o.change((t=>{s._setSelectionOverElement(n),t.setSelectionAttribute(A,e?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,o=t.model,i=o.schema,s=t.editing.mapper,n=o.document.selection,r=e?n.getLastPosition().nodeBefore:n.getFirstPosition().nodeAfter;return!!C(s.toViewElement(r),r,i)&&(o.change((t=>{t.setSelection(r,"on"),t.setSelectionAttribute(A,e?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",((o,i)=>{const s=i.domTarget.closest(".ck-widget__type-around__button");if(!s)return;const n=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(s),r=function(e,t){const o=e.closest(".ck-widget");return t.mapDomToView(o)}(s,t.domConverter),a=e.editing.mapper.toModelElement(r);this._insertParagraph(a,n),i.preventDefault(),o.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,o=e.editing.view;this._listenToIfEnabled(o.document,"enter",((o,i)=>{if("atTarget"!=o.eventPhase)return;const s=t.getSelectedElement(),n=e.editing.mapper.toViewElement(s),r=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:C(n,s,r)&&(this._insertParagraph(s,i.isSoft?"before":"after"),a=!0),a&&(i.preventDefault(),o.stop())}),{context:m})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view.document;this._listenToIfEnabled(e,"insertText",((t,o)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(o.selection=e.selection)}),{priority:"high"}),r.OB.isAndroid?this._listenToIfEnabled(e,"keydown",((e,t)=>{229==t.keyCode&&this._insertParagraphAccordingToFakeCaretPosition()})):this._listenToIfEnabled(e,"compositionstart",(()=>{this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,o=e.model,i=o.schema;this._listenToIfEnabled(t.document,"delete",((t,s)=>{if("atTarget"!=t.eventPhase)return;const n=S(o.document.selection);if(!n)return;const r=s.direction,a=o.document.selection.getSelectedElement(),c="forward"==r;if("before"===n===c)e.execute("delete",{selection:o.createSelection(a,"on")});else{const t=i.getNearestSelectionRange(o.createPositionAt(a,n),r);if(t)if(t.isCollapsed){const s=o.createSelection(t.start);if(o.modifySelection(s,{direction:r}),s.focus.isEqual(t.start)){const e=function(e,t){let o=t;for(const i of t.getAncestors({parentFirst:!0})){if(i.childCount>1||e.isLimit(i))break;o=i}return o}(i,t.start.parent);o.deleteContent(o.createSelection(e,"on"),{doNotAutoparagraph:!0})}else o.change((o=>{o.setSelection(t),e.execute(c?"deleteForward":"delete")}))}else o.change((o=>{o.setSelection(t),e.execute(c?"deleteForward":"delete")}))}s.preventDefault(),t.stop()}),{context:m})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,o=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",((e,[i,s])=>{if(s&&!s.is("documentSelection"))return;const n=S(o);return n?(e.stop(),t.change((e=>{const s=o.getSelectedElement(),r=t.createPositionAt(s,n),a=e.createSelection(r),c=t.insertContent(i,a);return e.setSelection(a),c}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",((e,o)=>{const[,i,s={}]=o;if(i&&!i.is("documentSelection"))return;const n=S(t);n&&(s.findOptimalPosition=n,o[3]=s)}),{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",((e,[o])=>{if(o&&!o.is("documentSelection"))return;S(t)&&e.stop()}),{priority:"high"})}}function N(e){const t=e.model;return(o,i)=>{const s=i.keyCode==r.Do.arrowup,n=i.keyCode==r.Do.arrowdown,a=i.shiftKey,c=t.document.selection;if(!s&&!n)return;const l=n;if(a&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(c,l))return;const d=function(e,t,o){const i=e.model;if(o){const e=t.isCollapsed?t.focus:t.getLastPosition(),o=z(i,e,"forward");if(!o)return null;const s=i.createRange(e,o),n=F(i.schema,s,"backward");return n?i.createRange(e,n):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),o=z(i,e,"backward");if(!o)return null;const s=i.createRange(o,e),n=F(i.schema,s,"forward");return n?i.createRange(n,e):null}}(e,c,l);if(d){if(d.isCollapsed){if(c.isCollapsed)return;if(a)return}(d.isCollapsed||function(e,t,o){const i=e.model,s=e.view.domConverter;if(o){const e=i.createSelection(t.start);i.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=i.createRange(e.focus,t.end))}const n=e.mapper.toViewRange(t),a=s.viewRangeToDom(n),c=r.UL.getDomRangeRects(a);let l;for(const e of c)if(void 0!==l){if(Math.round(e.top)>=l)return!1;l=Math.max(l,Math.round(e.bottom))}else l=Math.round(e.bottom);return!0}(e,d,l))&&(t.change((e=>{const o=l?d.end:d.start;if(a){const i=t.createSelection(c.anchor);i.setFocus(o),e.setSelection(i)}else e.setSelection(o)})),o.stop(),i.preventDefault(),i.stopPropagation())}}}function z(e,t,o){const i=e.schema,s=e.createRangeIn(t.root),n="forward"==o?"elementStart":"elementEnd";for(const{previousPosition:e,item:r,type:a}of s.getWalker({startPosition:t,direction:o})){if(i.isLimit(r)&&!i.isInline(r))return e;if(a==n&&i.isBlock(r))return null}return null}function F(e,t,o){const i="backward"==o?t.end:t.start;if(e.checkChild(i,"$text"))return i;for(const{nextPosition:i}of t.getWalker({direction:o}))if(e.checkChild(i,"$text"))return i;return null}var L=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widget.css"),Z={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};R()(L.Z,Z);L.Z.locals;class W extends i.Sy{constructor(){super(...arguments),this._previouslySelected=new Set}static get pluginName(){return"Widget"}static get requires(){return[I,n.HG]}init(){const e=this.editor,t=e.editing.view,o=t.document;this.editor.editing.downcastDispatcher.on("selection",((t,o,i)=>{const s=i.writer,n=o.selection;if(n.isCollapsed)return;const r=n.getSelectedElement();if(!r)return;const a=e.editing.mapper.toViewElement(r);m(a)&&i.consumable.consume(n,"selection")&&s.setSelection(s.createRangeOn(a),{fake:!0,label:y(a)})})),this.editor.editing.downcastDispatcher.on("selection",((e,t,o)=>{this._clearPreviouslySelectedWidgets(o.writer);const i=o.writer,s=i.document.selection;let n=null;for(const e of s.getRanges())for(const t of e){const e=t.item;m(e)&&!$(e,n)&&(i.addClass(g,e),this._previouslySelected.add(e),n=e)}}),{priority:"low"}),t.addObserver(s.dM),this.listenTo(o,"mousedown",((...e)=>this._onMousedown(...e))),this.listenTo(o,"arrowKey",((...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)}),{context:[m,"$text"]}),this.listenTo(o,"arrowKey",((...e)=>{this._preventDefaultOnArrowKeyPress(...e)}),{context:"$root"}),this.listenTo(o,"arrowKey",N(this.editor.editing),{context:"$text"}),this.listenTo(o,"delete",((e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())}),{context:"$root"})}_onMousedown(e,t){const o=this.editor,i=o.editing.view,s=i.document;let n=t.target;if(function(e){let t=e;for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if(m(t))return!1;t=t.parent}return!1}(n)){if((r.OB.isSafari||r.OB.isGecko)&&t.domEvent.detail>=3){const e=o.editing.mapper,i=n.is("attributeElement")?n.findAncestor((e=>!e.is("attributeElement"))):n,s=e.toModelElement(i);t.preventDefault(),this.editor.model.change((e=>{e.setSelection(s,"in")}))}return}if(!m(n)&&(n=n.findAncestor(m),!n))return;r.OB.isAndroid&&t.preventDefault(),s.isFocused||i.focus();const a=o.editing.mapper.toModelElement(n);this._setSelectionOverElement(a)}_handleSelectionChangeOnArrowKeyPress(e,t){const o=t.keyCode,i=this.editor.model,s=i.schema,n=i.document.selection,a=n.getSelectedElement(),c=(0,r.mA)(o,this.editor.locale.contentLanguageDirection),l="down"==c||"right"==c,d="up"==c||"down"==c;if(a&&s.isObject(a)){const o=l?n.getLastPosition():n.getFirstPosition(),r=s.getNearestSelectionRange(o,l?"forward":"backward");return void(r&&(i.change((e=>{e.setSelection(r)})),t.preventDefault(),e.stop()))}if(!n.isCollapsed&&!t.shiftKey){const o=n.getFirstPosition(),r=n.getLastPosition(),a=o.nodeAfter,c=r.nodeBefore;return void((a&&s.isObject(a)||c&&s.isObject(c))&&(i.change((e=>{e.setSelection(l?r:o)})),t.preventDefault(),e.stop()))}if(!n.isCollapsed)return;const h=this._getObjectElementNextToSelection(l);if(h&&s.isObject(h)){if(s.isInline(h)&&d)return;this._setSelectionOverElement(h),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const o=this.editor.model,i=o.schema,s=o.document.selection.getSelectedElement();s&&i.isObject(s)&&(t.preventDefault(),e.stop())}_handleDelete(e){const t=this.editor.model.document.selection;if(!this.editor.model.canEditAt(t))return;if(!t.isCollapsed)return;const o=this._getObjectElementNextToSelection(e);return o?(this.editor.model.change((e=>{let i=t.anchor.parent;for(;i.isEmpty;){const t=i;i=t.parent,e.remove(t)}this._setSelectionOverElement(o)})),!0):void 0}_setSelectionOverElement(e){this.editor.model.change((t=>{t.setSelection(t.createRangeOn(e))}))}_getObjectElementNextToSelection(e){const t=this.editor.model,o=t.schema,i=t.document.selection,s=t.createSelection(i);if(t.modifySelection(s,{direction:e?"forward":"backward"}),s.isEqual(i))return null;const n=e?s.focus.nodeBefore:s.focus.nodeAfter;return n&&o.isObject(n)?n:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(g,t);this._previouslySelected.clear()}}function $(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}class q extends i.Sy{constructor(){super(...arguments),this._toolbarDefinitions=new Map}static get requires(){return[a.WB]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",(t=>{(function(e){const t=e.getSelectedElement();return!(!t||!m(t))})(e.editing.view.document.selection)&&t.stop()}),{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:o,getRelatedElement:i,balloonClassName:s="ck-toolbar-container"}){if(!o.length)return void(0,r.KE)("widget-toolbar-no-items",{toolbarId:e});const n=this.editor,c=n.t,l=new a.jB(n.locale);if(l.ariaLabel=t||c("Widget toolbar"),this._toolbarDefinitions.has(e))throw new r.Bb("widget-toolbar-duplicated",this,{toolbarId:e});const d={view:l,getRelatedElement:i,balloonClassName:s,itemsConfig:o,initialized:!1};n.ui.addToolbar(l,{isContextual:!0,beforeFocus:()=>{const e=i(n.editing.view.document.selection);e&&this._showToolbar(d,e)},afterBlur:()=>{this._hideToolbar(d)}}),this._toolbarDefinitions.set(e,d)}_updateToolbarsVisibility(){let e=0,t=null,o=null;for(const i of this._toolbarDefinitions.values()){const s=i.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&s)if(this.editor.ui.focusTracker.isFocused){const n=s.getAncestors().length;n>e&&(e=n,t=s,o=i)}else this._isToolbarVisible(i)&&this._hideToolbar(i);else this._isToolbarInBalloon(i)&&this._hideToolbar(i)}o&&this._showToolbar(o,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?H(this.editor,t):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:U(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);H(this.editor,t)}})))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function H(e,t){const o=e.plugins.get("ContextualBalloon"),i=U(e,t);o.updatePosition(i)}function U(e,t){const o=e.editing.view,i=a.no.defaultPositions;return{target:o.domConverter.mapViewToDom(t),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast,i.viewportStickyNorth]}}class K extends((0,r.Re)()){constructor(e){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,t,o){const i=new r.UL(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const o of t)if(e.classList.contains(G(o)))return o}(e),this._referenceCoordinates=function(e,t){const o=new r.UL(e),i=t.split("-"),s={x:"right"==i[1]?o.right:o.left,y:"bottom"==i[0]?o.bottom:o.top};return s.x+=e.ownerDocument.defaultView.scrollX,s.y+=e.ownerDocument.defaultView.scrollY,s}(t,function(e){const t=e.split("-"),o={top:"bottom",bottom:"top",left:"right",right:"left"};return`${o[t[0]]}-${o[t[1]]}`}(this.activeHandlePosition)),this._originalWidth=i.width,this._originalHeight=i.height,this._aspectRatio=i.width/i.height;const s=o.style.width;s&&s.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(s):this._originalWidthPercents=function(e,t){const o=e.parentElement;let i=parseFloat(o.ownerDocument.defaultView.getComputedStyle(o).width);const s=5;let n=0,r=o;for(;isNaN(i);){if(r=r.parentElement,++n>s)return 0;i=parseFloat(o.ownerDocument.defaultView.getComputedStyle(r).width)}return t.width/i*100}(o,i)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function G(e){return`ck-widget__resizer__handle-${e}`}class J extends a.G7{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",(e=>e?`ck-orientation-${e}`:""))],style:{display:e.if("_isVisible","none",(e=>!e))}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",((e,t)=>null!==e&&null!==t)),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",((t,o,i)=>"px"===e.unit?`${t}×${o}`:`${i}%`)),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",((e,t,o)=>t<50||o<50?"above-center":e))}_dismiss(){this.unbind(),this._isVisible=!1}}var Y=Object.defineProperty,X=Object.defineProperties,Q=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ie=(e,t,o)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class se extends((0,r.Re)()){constructor(e){super(),this._viewResizerWrapper=null,this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",((e,t)=>e&&t)),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",(e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())}),{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change((e=>{e.removeClass("ck-hidden",this._viewResizerWrapper)}))}hide(){this._options.editor.editing.view.change((e=>{e.addClass("ck-hidden",this._viewResizerWrapper)}))}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change((o=>{const i=o.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(t){const o=this.toDomElement(t);return e._appendHandles(o),e._appendSizeUI(o),o}));o.insert(o.createPositionAt(t,"end"),i),o.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=i,this.isVisible||this.hide()})),this.on("change:isVisible",(()=>{this.isVisible?(this.show(),this.redraw()):this.hide()}))}begin(e){this._state=new K(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change((e=>{const o=this._options.unit||"%",i=("%"===o?t.widthPercents:t.width)+o;e.setStyle("width",i,this._options.viewElement)}));const o=this._getHandleHost(),i=new r.UL(o),s=Math.round(i.width),n=Math.round(i.height),a=new r.UL(o);var c;t.width=Math.round(a.width),t.height=Math.round(a.height),this.redraw(i),this.state.update((c=((e,t)=>{for(var o in t||(t={}))te.call(t,o)&&ie(e,o,t[o]);if(ee)for(var o of ee(t))oe.call(t,o)&&ie(e,o,t[o]);return e})({},t),X(c,Q({handleHostWidth:s,handleHostHeight:n}))))}commit(){const e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change((()=>{this._cleanup(),this._options.onCommit(t)}))}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!((o=t)&&o.ownerDocument&&o.ownerDocument.contains(o)))return;var o;const i=t.parentElement,s=this._getHandleHost(),n=this._viewResizerWrapper,a=[n.getStyle("width"),n.getStyle("height"),n.getStyle("left"),n.getStyle("top")];let c;if(i.isSameNode(s)){const t=e||new r.UL(s);c=[t.width+"px",t.height+"px",void 0,void 0]}else c=[s.offsetWidth+"px",s.offsetHeight+"px",s.offsetLeft+"px",s.offsetTop+"px"];"same"!==(0,r.Rt)(a,c)&&this._options.editor.editing.view.change((e=>{e.setStyle({width:c[0],height:c[1],left:c[2],top:c[3]},n)}))}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss();this._options.editor.editing.view.change((e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)}))}_proposeNewSize(e){const t=this.state,o={x:(i=e).pageX,y:i.pageY};var i;const s=!this._options.isCentered||this._options.isCentered(this),n={x:t._referenceCoordinates.x-(o.x+t.originalWidth),y:o.y-t.originalHeight-t._referenceCoordinates.y};s&&t.activeHandlePosition.endsWith("-right")&&(n.x=o.x-(t._referenceCoordinates.x+t.originalWidth)),s&&(n.x*=2);let r=Math.abs(t.originalWidth+n.x),a=Math.abs(t.originalHeight+n.y);return"width"==(r/t.aspectRatio>a?"width":"height")?a=r/t.aspectRatio:r=a*t.aspectRatio,{width:Math.round(r),height:Math.round(a),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*r*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const i of t)e.appendChild(new a.YS({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(o=i,`ck-widget__resizer__handle-${o}`)}}).render());var o}_appendSizeUI(e){this._sizeView=new J,this._sizeView.render(),e.appendChild(this._sizeView.element)}}var ne=o("./node_modules/lodash-es/throttle.js"),re=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgetresize.css"),ae={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};R()(re.Z,ae);re.Z.locals;class ce extends i.Sy{constructor(){super(...arguments),this._resizers=new Map}static get pluginName(){return"WidgetResize"}init(){const e=this.editor.editing,t=r.global.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(s.dM),this._observer=new((0,r.Xu)()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=(0,ne.Z)((()=>this.redrawSelectedResizer()),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",(()=>{for(const[e,t]of this._resizers)e.isAttached()||(this._resizers.delete(e),t.destroy())}),{priority:"lowest"}),this._observer.listenTo(r.global.window,"resize",this._redrawSelectedResizerThrottled);const o=this.editor.editing.view.document.selection;o.on("change",(()=>{const e=o.getSelectedElement(),t=this.getResizerByViewElement(e)||null;t?this.select(t):this.deselect()}))}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new se(e),o=this.editor.plugins;if(t.attach(),o.has("WidgetToolbarRepository")){const e=o.get("WidgetToolbarRepository");t.on("begin",(()=>{e.forceDisabled("resize")}),{priority:"lowest"}),t.on("cancel",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"}),t.on("commit",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"})}this._resizers.set(e.viewElement,t);const i=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(i)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const o=t.domTarget;se.isResizeHandle(o)&&(this._activeResizer=this._getResizerByHandle(o)||null,this._activeResizer&&(this._activeResizer.begin(o),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":(e,t,o)=>{"use strict";var i,s=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},n=function(){var e={};return function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}e[t]=o}return e[t]}}(),r=[];function a(e){for(var t=-1,o=0;o<r.length;o++)if(r[o].identifier===e){t=o;break}return t}function c(e,t){for(var o={},i=[],s=0;s<e.length;s++){var n=e[s],c=t.base?n[0]+t.base:n[0],l=o[c]||0,d="".concat(c," ").concat(l);o[c]=l+1;var h=a(d),u={css:n[1],media:n[2],sourceMap:n[3]};-1!==h?(r[h].references++,r[h].updater(u)):r.push({identifier:d,updater:m(u,t),references:1}),i.push(d)}return i}function l(e){var t=document.createElement("style"),i=e.attributes||{};if(void 0===i.nonce){var s=o.nc;s&&(i.nonce=s)}if(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),"function"==typeof e.insert)e.insert(t);else{var r=n(e.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}return t}var d,h=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function u(e,t,o,i){var s=o?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(e.styleSheet)e.styleSheet.cssText=h(t,s);else{var n=document.createTextNode(s),r=e.childNodes;r[t]&&e.removeChild(r[t]),r.length?e.insertBefore(n,r[t]):e.appendChild(n)}}function p(e,t,o){var i=o.css,s=o.media,n=o.sourceMap;if(s?e.setAttribute("media",s):e.removeAttribute("media"),n&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var f=null,g=0;function m(e,t){var o,i,s;if(t.singleton){var n=g++;o=f||(f=l(t)),i=u.bind(null,o,n,!1),s=u.bind(null,o,n,!0)}else o=l(t),i=p.bind(null,o,t),s=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(o)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else s()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=s());var o=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i<o.length;i++){var s=a(o[i]);r[s].references--}for(var n=c(e,t),l=0;l<o.length;l++){var d=a(o[l]);0===r[d].references&&(r[d].updater(),r.splice(d,1))}o=n}}}},"./src/clipboard.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Clipboard:()=>v,ClipboardPipeline:()=>l,DragDrop:()=>m,DragDropBlockToolbar:()=>L,DragDropExperimental:()=>R,DragDropTarget:()=>E,PastePlainText:()=>k});var i=o("./packages/ckeditor5-core/src/index.ts"),s=o("./packages/ckeditor5-utils/src/index.ts"),n=o("./packages/ckeditor5-engine/src/index.ts");class r extends n.qZ{constructor(e){super(e),this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];const t=this.document;function o(e){return(o,i)=>{i.preventDefault();const n=i.dropRange?[i.dropRange]:null,r=new s.M3(t,e);t.fire(r,{dataTransfer:i.dataTransfer,method:o.name,targetRanges:n,target:i.target,domEvent:i.domEvent}),r.stop.called&&i.stopPropagation()}}this.listenTo(t,"paste",o("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",o("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",o("dragging"),{priority:"low"})}onDomEvent(e){const t="clipboardData"in e?e.clipboardData:e.dataTransfer,o="drop"==e.type||"paste"==e.type,i={dataTransfer:new n.tn(t,{cacheFiles:o})};"drop"!=e.type&&"dragover"!=e.type||(i.dropRange=function(e,t){const o=t.target.ownerDocument,i=t.clientX,s=t.clientY;let n;o.caretRangeFromPoint&&o.caretRangeFromPoint(i,s)?n=o.caretRangeFromPoint(i,s):t.rangeParent&&(n=o.createRange(),n.setStart(t.rangeParent,t.rangeOffset),n.collapse(!0));if(n)return e.domConverter.domRangeToView(n);return null}(this.view,e)),this.fire(e.type,e,i)}}const a=["figcaption","li"];function c(e){let t="";if(e.is("$text")||e.is("$textProxy"))t=e.data;else if(e.is("element","img")&&e.hasAttribute("alt"))t=e.getAttribute("alt");else if(e.is("element","br"))t="\n";else{let o=null;for(const i of e.getChildren()){const e=c(i);o&&(o.is("containerElement")||i.is("containerElement"))&&(a.includes(o.name)||a.includes(i.name)?t+="\n":t+="\n\n"),t+=e,o=i}}return t}class l extends i.Sy{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(r),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){const e=this.editor,t=e.model,o=e.editing.view,i=o.document;this.listenTo(i,"clipboardInput",((t,o)=>{"paste"!=o.method||e.model.canEditAt(e.model.document.selection)||t.stop()}),{priority:"highest"}),this.listenTo(i,"clipboardInput",((e,t)=>{const i=t.dataTransfer;let n;if(t.content)n=t.content;else{let e="";i.getData("text/html")?e=function(e){return e.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,((e,t)=>1==t.length?" ":t)).replace(/<!--[\s\S]*?-->/g,"")}(i.getData("text/html")):i.getData("text/plain")&&(((r=(r=i.getData("text/plain")).replace(/</g,"<").replace(/>/g,">").replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br>").replace(/\t/g," ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g," ")).includes("</p><p>")||r.includes("<br>"))&&(r=`<p>${r}</p>`),e=r),n=this.editor.data.htmlProcessor.toView(e)}var r;const a=new s.M3(this,"inputTransformation");this.fire(a,{content:n,dataTransfer:i,targetRanges:t.targetRanges,method:t.method}),a.stop.called&&e.stop(),o.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,o)=>{if(o.content.isEmpty)return;const i=this.editor.data.toModel(o.content,"$clipboardHolder");0!=i.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:i,method:o.method,dataTransfer:o.dataTransfer,targetRanges:o.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,o)=>{o.resultRange=t.insertContent(o.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,o=e.editing.view.document,i=(i,s)=>{const n=s.dataTransfer;s.preventDefault();const r=e.data.toView(e.model.getSelectedContent(t.selection));o.fire("clipboardOutput",{dataTransfer:n,content:r,method:i.name})};this.listenTo(o,"copy",i,{priority:"low"}),this.listenTo(o,"cut",((t,o)=>{e.model.canEditAt(e.model.document.selection)?i(t,o):o.preventDefault()}),{priority:"low"}),this.listenTo(o,"clipboardOutput",((o,i)=>{i.content.isEmpty||(i.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(i.content)),i.dataTransfer.setData("text/plain",c(i.content))),"cut"==i.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}var d=o("./packages/ckeditor5-widget/src/index.ts"),h=o("./node_modules/lodash-es/throttle.js"),u=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),p=o.n(u),f=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-clipboard/theme/clipboard.css"),g={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};p()(f.Z,g);f.Z.locals;class m extends i.Sy{static get pluginName(){return"DragDrop"}static get requires(){return[l,d.$L]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=(0,h.Z)((e=>this._updateDropMarker(e)),40),this._removeDropMarkerDelayed=(0,s.gw)((()=>this._removeDropMarker()),40),this._clearDraggableAttributesDelayed=(0,s.gw)((()=>this._clearDraggableAttributes()),40),e.plugins.has("DragDropExperimental")?this.forceDisabled("DragDropExperimental"):(t.addObserver(r),t.addObserver(n.dM),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,o)=>{o?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,o)=>{o||this._finalizeDragging(!1)})),s.OB.isAndroid&&this.forceDisabled("noAndroidSupport"))}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,o=t.document,i=e.editing.view,r=i.document;this.listenTo(r,"dragstart",((i,a)=>{const c=o.selection;if(a.target&&a.target.is("editableElement"))return void a.preventDefault();const l=a.target?w(a.target):null;if(l){const o=e.editing.mapper.toModelElement(l);if(this._draggedRange=n.iE.fromRange(t.createRangeOn(o)),e.plugins.has("WidgetToolbarRepository")){e.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}}else if(!r.selection.isCollapsed){const e=r.selection.getSelectedElement();e&&(0,d.Qd)(e)||(this._draggedRange=n.iE.fromRange(c.getFirstRange()))}if(!this._draggedRange)return void a.preventDefault();this._draggingUid=(0,s.hQ)();const h=this.isEnabled&&e.model.canEditAt(this._draggedRange);a.dataTransfer.effectAllowed=h?"copyMove":"copy",a.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const u=t.createSelection(this._draggedRange.toRange()),p=e.data.toView(t.getSelectedContent(u));r.fire("clipboardOutput",{dataTransfer:a.dataTransfer,content:p,method:"dragstart"}),h||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(r,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this.listenTo(r,"dragenter",(()=>{this.isEnabled&&i.focus()})),this.listenTo(r,"dragleave",(()=>{this._removeDropMarkerDelayed()})),this.listenTo(r,"dragging",((t,o)=>{if(!this.isEnabled)return void(o.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const i=b(e,o.targetRanges,o.target);e.model.canEditAt(i)?(this._draggedRange||(o.dataTransfer.dropEffect="copy"),s.OB.isGecko||("copy"==o.dataTransfer.effectAllowed?o.dataTransfer.dropEffect="copy":["all","copyMove"].includes(o.dataTransfer.effectAllowed)&&(o.dataTransfer.dropEffect="move")),i&&this._updateDropMarkerThrottled(i)):o.dataTransfer.dropEffect="none"}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"clipboardInput",((t,o)=>{if("drop"!=o.method)return;const i=b(e,o.targetRanges,o.target);if(this._removeDropMarker(),!i||!e.model.canEditAt(i))return this._finalizeDragging(!1),void t.stop();this._draggedRange&&this._draggingUid!=o.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==_(o.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(i,!0))return this._finalizeDragging(!1),void t.stop();o.targetRanges=[e.editing.mapper.toViewRange(i)]}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(l);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(o)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o="move"==_(t.dataTransfer),i=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(i&&o)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,o=t.document;this.listenTo(o,"mousedown",((i,n)=>{if(s.OB.isAndroid||!n)return;this._clearDraggableAttributesDelayed.cancel();let r=w(n.target);if(s.OB.isBlink&&!r&&!o.selection.isCollapsed){const e=o.selection.getSelectedElement();if(!e||!(0,d.Qd)(e)){const e=o.selection.editableElement;e&&!e.isReadOnly&&(r=e)}}r&&(t.change((e=>{e.setAttribute("draggable","true",r)})),this._draggableElement=e.editing.mapper.toModelElement(r))})),this.listenTo(o,"mouseup",(()=>{s.OB.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_setupDropMarker(){const e=this.editor;e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:o})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return o.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("â ",e.createElement("span"),"â "),t}))}})}_updateDropMarker(e){const t=this.editor,o=t.model.markers;t.model.change((t=>{o.has("drop-target")?o.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_removeDropMarker(){const e=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),e.markers.has("drop-target")&&e.change((e=>{e.removeMarker("drop-target")}))}_finalizeDragging(e){const t=this.editor,o=t.model;if(this._removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop")}this._draggingUid="",this._draggedRange&&(e&&this.isEnabled&&o.deleteContent(o.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function b(e,t,o){const i=e.model,n=e.editing.mapper;let r=null;const a=t?t[0].start:null;if(o.is("uiElement")&&(o=o.parent),r=function(e,t){const o=e.model,i=e.editing.mapper;if((0,d.Qd)(t))return o.createRangeOn(i.toModelElement(t));if(!t.is("editableElement")){const e=t.findAncestor((e=>(0,d.Qd)(e)||e.is("editableElement")));if((0,d.Qd)(e))return o.createRangeOn(i.toModelElement(e))}return null}(e,o),r)return r;const c=function(e,t){const o=e.editing.mapper,i=e.editing.view,s=o.toModelElement(t);if(s)return s;const n=i.createPositionBefore(t),r=o.findMappedViewAncestor(n);return o.toModelElement(r)}(e,o),l=a?n.toModelPosition(a):null;return l?(r=function(e,t,o){const i=e.model;if(!i.schema.checkChild(o,"$block"))return null;const s=i.createPositionAt(o,0),n=t.path.slice(0,s.path.length),r=i.createPositionFromPath(t.root,n),a=r.nodeAfter;if(a&&i.schema.isObject(a))return i.createRangeOn(a);return null}(e,l,c),r||(r=i.schema.getNearestSelectionRange(l,s.OB.isGecko?"forward":"backward"),r||function(e,t){const o=e.model;let i=t;for(;i;){if(o.schema.isObject(i))return o.createRangeOn(i);i=i.parent}return null}(e,l.parent))):function(e,t){const o=e.model,i=o.schema,s=o.createPositionAt(t,0);return i.getNearestSelectionRange(s,"forward")}(e,c)}function _(e){return s.OB.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function w(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(d.Qd);if((0,d.Qd)(e))return e;const t=e.findAncestor((e=>(0,d.Qd)(e)||e.is("editableElement")));return(0,d.Qd)(t)?t:null}class k extends i.Sy{static get pluginName(){return"PastePlainText"}static get requires(){return[l]}init(){const e=this.editor,t=e.model,o=e.editing.view,i=o.document,s=t.document.selection;let n=!1;o.addObserver(r),this.listenTo(i,"keydown",((e,t)=>{n=t.shiftKey})),e.plugins.get(l).on("contentInsertion",((e,o)=>{(n||function(e,t){if(e.childCount>1)return!1;const o=e.getChild(0);if(t.isObject(o))return!1;return 0==Array.from(o.getAttributeKeys()).length}(o.content,t.schema))&&t.change((e=>{const i=Array.from(s.getAttributes()).filter((([e])=>t.schema.getAttributeProperties(e).isFormatting));s.isCollapsed||t.deleteContent(s,{doNotAutoparagraph:!0}),i.push(...s.getAttributes());const n=e.createRangeIn(o.content);for(const t of n.getItems())t.is("$textProxy")&&e.setAttributes(i,t)}))}))}}class v extends i.Sy{static get pluginName(){return"Clipboard"}static get requires(){return[l,m,k]}}var y=o("./packages/ckeditor5-ui/src/index.ts");const x=(0,s.nn)("px");class P extends y.G7{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,left:null,top:null,width:null}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-clipboard-drop-target-line",e.if("isVisible","ck-hidden",(e=>!e))],style:{left:e.to("left",(e=>x(e))),top:e.to("top",(e=>x(e))),width:e.to("width",(e=>x(e)))}}})}}class E extends i.Sy{constructor(){super(...arguments),this.removeDropMarkerDelayed=(0,s.gw)((()=>this.removeDropMarker()),40),this._updateDropMarkerThrottled=(0,h.Z)((e=>this._updateDropMarker(e)),40),this._reconvertMarkerThrottled=(0,h.Z)((()=>{this.editor.model.markers.has("drop-target")&&this.editor.editing.reconvertMarker("drop-target")}),0),this._dropTargetLineView=new P,this._domEmitter=new((0,s.Xu)()),this._scrollables=new Map}static get pluginName(){return"DragDropTarget"}init(){this._setupDropMarker()}destroy(){this._domEmitter.stopListening();for(const{resizeObserver:e}of this._scrollables.values())e.destroy();return this._updateDropMarkerThrottled.cancel(),this.removeDropMarkerDelayed.cancel(),this._reconvertMarkerThrottled.cancel(),super.destroy()}updateDropMarker(e,t,o,i,s){this.removeDropMarkerDelayed.cancel();const n=T(this.editor,e,t,o,i,s);n&&this._updateDropMarkerThrottled(n)}getFinalDropRange(e,t,o,i,s){const n=T(this.editor,e,t,o,i,s);return this.removeDropMarker(),n}removeDropMarker(){const e=this.editor.model;this.removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),this._dropTargetLineView.isVisible=!1,e.markers.has("drop-target")&&e.change((e=>{e.removeMarker("drop-target")}))}_setupDropMarker(){const e=this.editor;e.ui.view.body.add(this._dropTargetLineView),e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:o})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return this._dropTargetLineView.isVisible=!1,this._createDropTargetPosition(o);t.markerRange.isCollapsed?this._updateDropTargetLine(t.markerRange):this._dropTargetLineView.isVisible=!1}})}_updateDropMarker(e){const t=this.editor,o=t.model.markers;t.model.change((t=>{o.has("drop-target")?o.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_createDropTargetPosition(e){return e.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("â ",e.createElement("span"),"â "),t}))}_updateDropTargetLine(e){const t=this.editor.editing,o=e.start.nodeBefore,i=e.start.nodeAfter,n=e.start.parent,r=o?t.mapper.toViewElement(o):null,a=r?t.view.domConverter.mapViewToDom(r):null,c=i?t.mapper.toViewElement(i):null,l=c?t.view.domConverter.mapViewToDom(c):null,d=t.mapper.toViewElement(n),h=t.view.domConverter.mapViewToDom(d),u=this._getScrollableRect(d),{scrollX:p,scrollY:f}=s.global.window,g=a?new s.UL(a):null,m=l?new s.UL(l):null,b=new s.UL(h).excludeScrollbarsAndBorders(),_=g?g.bottom:b.top,w=m?m.top:b.bottom,k=s.global.window.getComputedStyle(h),v=_<=w?(_+w)/2:w;if(u.top<v&&v<u.bottom){const e=b.left+parseFloat(k.paddingLeft),t=b.right-parseFloat(k.paddingRight),o=Math.max(e+p,u.left),i=Math.min(t+p,u.right);this._dropTargetLineView.set({isVisible:!0,left:o,top:v+f,width:i-o})}else this._dropTargetLineView.isVisible=!1}_getScrollableRect(e){const t=e.root.rootName;let o;if(this._scrollables.has(t))o=this._scrollables.get(t).domElement;else{o=function(e){let t=e;do{t=t.parentElement;const e=s.global.window.getComputedStyle(t).overflowY;if("auto"==e||"scroll"==e)break}while("BODY"!=t.tagName);return t}(this.editor.editing.view.domConverter.mapViewToDom(e)),this._domEmitter.listenTo(o,"scroll",this._reconvertMarkerThrottled,{usePassive:!0});const i=new s.do(o,this._reconvertMarkerThrottled);this._scrollables.set(t,{domElement:o,resizeObserver:i})}return new s.UL(o).excludeScrollbarsAndBorders()}}function T(e,t,o,i,s,n){const r=e.model,a=e.editing.mapper,c=O(e,t);let l=c;for(;l;){if(!n)if(r.schema.checkChild(l,"$text")){const t=o?o[0].start:null,n=t?a.toModelPosition(t):null;if(n){if(r.schema.checkChild(n,"$text"))return r.createRange(n);if(t)return C(e,O(e,t.parent),i,s)}}else if(r.schema.isInline(l))return C(e,l,i,s);if(r.schema.isBlock(l))return C(e,l,i,s);if(r.schema.checkChild(l,"$block")){const t=Array.from(l.getChildren()).filter((t=>t.is("element")&&!A(e,t)));let o=0,n=t.length;for(;o<n-1;){const r=Math.floor((o+n)/2);"before"==S(e,t[r],i,s)?n=r:o=r}return C(e,t[o],i,s)}l=l.parent}return console.warn("none:",c.name),null}function A(e,t){const o=e.editing.mapper,i=e.editing.view.domConverter,n=o.toViewElement(t),r=i.mapViewToDom(n);return"none"!=s.global.window.getComputedStyle(r).float}function C(e,t,o,i){const s=e.model;return s.createRange(s.createPositionAt(t,S(e,t,o,i)))}function S(e,t,o,i){const n=e.editing.mapper,r=e.editing.view.domConverter,a=n.toViewElement(t),c=r.mapViewToDom(a),l=new s.UL(c);return e.model.schema.isInline(t)?o<(l.left+l.right)/2?"before":"after":i<(l.top+l.bottom)/2?"before":"after"}function O(e,t){const o=e.editing.mapper,i=e.editing.view,s=o.toModelElement(t);if(s)return s;const n=i.createPositionBefore(t),r=o.findMappedViewAncestor(n);return o.toModelElement(r)}class R extends i.Sy{constructor(){super(...arguments),this._clearDraggableAttributesDelayed=(0,s.gw)((()=>this._clearDraggableAttributes()),40),this._blockMode=!1,this._domEmitter=new((0,s.Xu)())}static get pluginName(){return"DragDropExperimental"}static get requires(){return[l,d.$L,E]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,t.addObserver(r),t.addObserver(n.dM),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,o)=>{o?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,o)=>{o||this._finalizeDragging(!1)})),s.OB.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._previewContainer&&this._previewContainer.remove(),this._domEmitter.stopListening(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,o=e.editing.view,i=o.document,n=e.plugins.get(E);this.listenTo(i,"dragstart",((o,n)=>{if(n.target&&n.target.is("editableElement"))return void n.preventDefault();if(this._prepareDraggedRange(n.target),!this._draggedRange)return void n.preventDefault();this._draggingUid=(0,s.hQ)(),n.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",n.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const r=t.createSelection(this._draggedRange.toRange()),a=e.data.toView(t.getSelectedContent(r));i.fire("clipboardOutput",{dataTransfer:n.dataTransfer,content:a,method:"dragstart"}),this._updatePreview(n.dataTransfer),n.stopPropagation(),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(i,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this._domEmitter.listenTo(s.global.document,"dragend",(()=>{this._blockMode=!1}),{useCapture:!0}),this.listenTo(i,"dragenter",(()=>{this.isEnabled&&o.focus()})),this.listenTo(i,"dragleave",(()=>{n.removeDropMarkerDelayed()})),this.listenTo(i,"dragging",((e,t)=>{if(!this.isEnabled)return void(t.dataTransfer.dropEffect="none");const{clientX:o,clientY:i}=t.domEvent;n.updateDropMarker(t.target,t.targetRanges,o,i,this._blockMode),this._draggedRange||(t.dataTransfer.dropEffect="copy"),s.OB.isGecko||("copy"==t.dataTransfer.effectAllowed?t.dataTransfer.dropEffect="copy":["all","copyMove"].includes(t.dataTransfer.effectAllowed)&&(t.dataTransfer.dropEffect="move")),e.stop()}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document,o=e.plugins.get(E);this.listenTo(t,"clipboardInput",((t,i)=>{if("drop"!=i.method)return;const{clientX:s,clientY:n}=i.domEvent,r=o.getFinalDropRange(i.target,i.targetRanges,s,n,this._blockMode);if(!r)return this._finalizeDragging(!1),void t.stop();this._draggedRange&&this._draggingUid!=i.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==M(i.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(r,!0))return this._finalizeDragging(!1),void t.stop();i.targetRanges=[e.editing.mapper.toViewRange(r)]}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(l);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(o)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o="move"==M(t.dataTransfer),i=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(i&&o)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,o=t.document;this.listenTo(o,"mousedown",((i,n)=>{if(s.OB.isAndroid||!n)return;this._clearDraggableAttributesDelayed.cancel();let r=j(n.target);if(s.OB.isBlink&&!e.isReadOnly&&!r&&!o.selection.isCollapsed){const e=o.selection.getSelectedElement();e&&(0,d.Qd)(e)||(r=o.selection.editableElement)}r&&(t.change((e=>{e.setAttribute("draggable","true",r)})),this._draggableElement=e.editing.mapper.toModelElement(r))})),this.listenTo(o,"mouseup",(()=>{s.OB.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_finalizeDragging(e){const t=this.editor,o=t.model;if(t.plugins.get(E).removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop")}this._draggingUid="",this._previewContainer&&(this._previewContainer.remove(),this._previewContainer=void 0),this._draggedRange&&(e&&this.isEnabled&&o.deleteContent(o.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}_prepareDraggedRange(e){const t=this.editor,o=t.model,i=o.document.selection,s=e?j(e):null;if(s){const e=t.editing.mapper.toModelElement(s);if(this._draggedRange=n.iE.fromRange(o.createRangeOn(e)),this._blockMode=o.schema.isBlock(e),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}}else if(!i.isCollapsed||i.getFirstPosition().parent.isEmpty){const e=Array.from(i.getSelectedBlocks());if(e.length>1)this._draggedRange=n.iE.fromRange(o.createRange(o.createPositionBefore(e[0]),o.createPositionAfter(e[e.length-1]))),o.change((e=>e.setSelection(this._draggedRange.toRange()))),this._blockMode=!0;else if(1==e.length){const t=i.getFirstRange(),s=o.createRange(o.createPositionBefore(e[0]),o.createPositionAfter(e[0]));t.start.isTouching(s.start)&&t.end.isTouching(s.end)?(this._draggedRange=n.iE.fromRange(s),this._blockMode=!0):(this._draggedRange=n.iE.fromRange(i.getFirstRange()),this._blockMode=!1)}}}_updatePreview(e){const t=this.editor.editing.view,o=t.document.selection.editableElement,i=t.domConverter.mapViewToDom(o),n=s.global.window.getComputedStyle(i);this._previewContainer?this._previewContainer.removeChild(this._previewContainer.firstElementChild):(this._previewContainer=(0,s.az)(s.global.document,"div",{style:"position: fixed; left: -999999px;"}),s.global.document.body.appendChild(this._previewContainer));const r=(0,s.az)(s.global.document,"div");r.className="ck ck-content",r.style.width=n.width,r.innerHTML=e.getData("text/html"),e.setDragImage(r,0,0),this._previewContainer.appendChild(r)}}function M(e){return s.OB.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function j(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(d.Qd);if((0,d.Qd)(e))return e;const t=e.findAncestor((e=>(0,d.Qd)(e)||e.is("editableElement")));return(0,d.Qd)(t)?t:null}var B=Object.defineProperty,D=Object.defineProperties,V=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,F=(e,t,o)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class L extends i.Sy{constructor(){super(...arguments),this._isBlockDragging=!1,this._domEmitter=new((0,s.Xu)())}static get pluginName(){return"DragDropBlockToolbar"}init(){const e=this.editor;if(this.listenTo(e,"change:isReadOnly",((e,t,o)=>{o?(this.forceDisabled("readOnlyMode"),this._isBlockDragging=!1):this.clearForceDisabled("readOnlyMode")})),s.OB.isAndroid&&this.forceDisabled("noAndroidSupport"),e.plugins.has("BlockToolbar")){const t=e.plugins.get("BlockToolbar").buttonView.element;t.setAttribute("draggable","true"),this._domEmitter.listenTo(t,"dragstart",((e,t)=>this._handleBlockDragStart(t))),this._domEmitter.listenTo(s.global.document,"dragover",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(s.global.document,"drop",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(s.global.document,"dragend",(()=>this._handleBlockDragEnd()),{useCapture:!0})}}destroy(){return this._domEmitter.stopListening(),super.destroy()}_handleBlockDragStart(e){if(!this.isEnabled)return;const t=this.editor.model,o=t.document.selection,i=Array.from(o.getSelectedBlocks()),s=t.createRange(t.createPositionBefore(i[0]),t.createPositionAfter(i[i.length-1]));t.change((e=>e.setSelection(s))),this._isBlockDragging=!0,this.editor.editing.view.getObserver(r).onDomEvent(e)}_handleBlockDragging(e){if(!this.isEnabled||!this._isBlockDragging)return;const t=e.clientX+100,o=e.clientY,i=document.elementFromPoint(t,o);var s,n;i&&i.closest(".ck-editor__editable")&&this.editor.editing.view.getObserver(r).onDomEvent((s=((e,t)=>{for(var o in t||(t={}))N.call(t,o)&&F(e,o,t[o]);if(I)for(var o of I(t))z.call(t,o)&&F(e,o,t[o]);return e})({},e),n={type:e.type,dataTransfer:e.dataTransfer,target:i,clientX:t,clientY:o,preventDefault:()=>e.preventDefault(),stopPropagation:()=>e.stopPropagation()},D(s,V(n))))}_handleBlockDragEnd(){this._isBlockDragging=!1}}},"./src/core.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Command:()=>i.mY,Context:()=>i._y,ContextPlugin:()=>i.eO,DataApiMixin:()=>i.W9,Editor:()=>i.ML,ElementApiMixin:()=>i.xK,MultiCommand:()=>i.AJ,PendingActions:()=>i.lR,Plugin:()=>i.Sy,attachToForm:()=>i.P$,icons:()=>i.icons,secureSourceElement:()=>i.Nu});var i=o("./packages/ckeditor5-core/src/index.ts")},"./src/engine.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{AttributeElement:()=>i.kW,AttributeOperation:()=>i.Yy,BubblingEventInfo:()=>i.r7,ClickObserver:()=>i.KU,Conversion:()=>i.uz,DataController:()=>i.Yc,DataTransfer:()=>i.tn,DocumentFragment:()=>i.f4,DocumentSelection:()=>i.uj,DomConverter:()=>i.pG,DomEventData:()=>i.dK,DomEventObserver:()=>i.qZ,DowncastWriter:()=>i.qD,EditingController:()=>i.jH,Element:()=>i.W_,History:()=>i.Ay,HtmlDataProcessor:()=>i.X5,InsertOperation:()=>i.IZ,LivePosition:()=>i.jP,LiveRange:()=>i.iE,MarkerOperation:()=>i.zj,Matcher:()=>i.xO,MergeOperation:()=>i.lB,Model:()=>i.Hn,MouseObserver:()=>i.dM,MoveOperation:()=>i.$z,NoOperation:()=>i.Pk,Observer:()=>i.Qj,OperationFactory:()=>i.Bz,Position:()=>i.Ly,Range:()=>i.e6,RenameOperation:()=>i.sN,Renderer:()=>i.Th,RootAttributeOperation:()=>i._o,RootOperation:()=>i.tF,SplitOperation:()=>i.qh,StylesProcessor:()=>i.A_,TabObserver:()=>i.aY,Text:()=>i.xv,TextProxy:()=>i.R,TreeWalker:()=>i.Po,UpcastWriter:()=>i.yj,View:()=>i.G7,ViewAttributeElement:()=>i.m1,ViewContainerElement:()=>i.By,ViewDocument:()=>i.Ux,ViewDocumentFragment:()=>i.y_,ViewEditableElement:()=>i.W2,ViewElement:()=>i.y9,ViewEmptyElement:()=>i.pc,ViewRawElement:()=>i.wx,ViewRootEditableElement:()=>i.FY,ViewText:()=>i.Xj,ViewUIElement:()=>i.dq,addBackgroundRules:()=>i.QR,addBorderRules:()=>i.sI,addMarginRules:()=>i.vt,addPaddingRules:()=>i.J8,disablePlaceholder:()=>i.DA,enablePlaceholder:()=>i.ID,findOptimalInsertionRange:()=>i.KT,getBoxSidesShorthandValue:()=>i.I8,getBoxSidesValueReducer:()=>i.mq,getBoxSidesValues:()=>i.oz,getFillerOffset:()=>i.YG,getPositionShorthandNormalizer:()=>i.m0,getShorthandValues:()=>i.uT,hidePlaceholder:()=>i.$_,isAttachment:()=>i.SB,isColor:()=>i.D5,isLength:()=>i.G9,isLineStyle:()=>i.IT,isPercentage:()=>i.zz,isPosition:()=>i.WK,isRepeat:()=>i.Zb,isURL:()=>i.PX,needsPlaceholder:()=>i.Q7,showPlaceholder:()=>i.NJ,transformSets:()=>i.Rf});var i=o("./packages/ckeditor5-engine/src/index.ts")},"./src/enter.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Enter:()=>i.C,ShiftEnter:()=>i.G});var i=o("./packages/ckeditor5-enter/src/index.ts")},"./src/paragraph.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Paragraph:()=>l,ParagraphButtonUI:()=>u});var i=o("./packages/ckeditor5-core/src/index.ts"),s=o("./packages/ckeditor5-utils/src/index.ts");class n extends i.mY{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,t=e.document,o=(0,s.Ps)(t.selection.getSelectedBlocks());this.value=!!o&&o.is("element","paragraph"),this.isEnabled=!!o&&r(o,e.schema)}execute(e={}){const t=this.editor.model,o=t.document,i=e.selection||o.selection;t.canEditAt(i)&&t.change((e=>{const o=i.getSelectedBlocks();for(const i of o)!i.is("element","paragraph")&&r(i,t.schema)&&e.rename(i,"paragraph")}))}}function r(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class a extends i.mY{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}execute(e){const t=this.editor.model,o=e.attributes;let i=e.position;t.canEditAt(i)&&t.change((e=>{const s=e.createElement("paragraph");if(o&&t.schema.setAllowedAttributes(s,o,e),!t.schema.checkChild(i.parent,s)){const o=t.schema.findAllowedParent(i,s);if(!o)return;i=e.split(i,o).position}t.insertContent(s,i),e.setSelection(s,"in")}))}}const c=class extends i.Sy{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new n(e)),e.commands.add("insertParagraph",new a(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>c.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}};let l=c;l.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);var d=o("./packages/ckeditor5-ui/src/index.ts");const h=i.icons.paragraph;class u extends i.Sy{static get requires(){return[l]}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("paragraph",(o=>{const i=new d.r5(o),s=e.commands.get("paragraph");return i.label=t("Paragraph"),i.icon=h,i.tooltip=!0,i.isToggleable=!0,i.bind("isEnabled").to(s),i.bind("isOn").to(s,"value"),i.on("execute",(()=>{e.execute("paragraph")})),i}))}}},"./src/select-all.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{SelectAll:()=>h,SelectAllEditing:()=>c,SelectAllUI:()=>d});var i=o("./packages/ckeditor5-core/src/index.ts"),s=o("./packages/ckeditor5-utils/src/index.ts");class n extends i.mY{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let o=e.schema.getLimitElement(t);if(t.containsEntireContent(o)||!r(e.schema,o))do{if(o=o.parent,!o)return}while(!r(e.schema,o));e.change((e=>{e.setSelection(o,"in")}))}}function r(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const a=(0,s.Zz)("Ctrl+A");class c extends i.Sy{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new n(e)),this.listenTo(t,"keydown",((t,o)=>{(0,s.Cq)(o)===a&&(e.execute("selectAll"),o.preventDefault())}))}}var l=o("./packages/ckeditor5-ui/src/index.ts");class d extends i.Sy{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",(t=>{const o=e.commands.get("selectAll"),i=new l.r5(t),s=t.t;return i.set({label:s("Select all"),icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75zm18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75zm-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5h8.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5h2.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5h5.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0h2.25zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5h2.25zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6z"/></svg>',keystroke:"Ctrl+A",tooltip:!0}),i.bind("isEnabled").to(o,"isEnabled"),this.listenTo(i,"execute",(()=>{e.execute("selectAll"),e.editing.view.focus()})),i}))}}class h extends i.Sy{static get requires(){return[c,d]}static get pluginName(){return"SelectAll"}}},"./src/typing.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Delete:()=>i.HG,Input:()=>i.II,InsertTextCommand:()=>i.BT,TextTransformation:()=>i.cL,TextWatcher:()=>i.uL,TwoStepCaretMovement:()=>i.mh,Typing:()=>i.Mq,findAttributeRange:()=>i.VD,findAttributeRangeBound:()=>i.r9,getLastTextLine:()=>i.Up,inlineHighlight:()=>i.Im});var i=o("./packages/ckeditor5-typing/src/index.ts")},"./src/ui.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{BalloonPanelView:()=>i.no,BalloonToolbar:()=>i.Jf,BlockToolbar:()=>i.ee,BodyCollection:()=>i.BK,BoxedEditorUIView:()=>i.py,ButtonView:()=>i.r5,ColorGridView:()=>i.J6,ColorPaletteIcon:()=>i.su,ColorPickerView:()=>i.J2,ColorTileView:()=>i._9,ComponentFactory:()=>i._Y,ContextualBalloon:()=>i.WB,CssTransitionDisablerMixin:()=>i.RX,DropdownButtonView:()=>i.J0,DropdownPanelView:()=>i.G2,DropdownView:()=>i._n,EditorUI:()=>i.S8,EditorUIView:()=>i.fF,FocusCycler:()=>i.I0,FormHeaderView:()=>i.Gp,IconView:()=>i.mO,IframeView:()=>i.VY,InlineEditableUIView:()=>i.r1,InputNumberView:()=>i.Xs,InputTextView:()=>i.pq,InputView:()=>i.Em,LabelView:()=>i.Dn,LabeledFieldView:()=>i.KP,ListItemView:()=>i.dn,ListView:()=>i.Bv,Model:()=>i.Hn,Notification:()=>i.P_,SplitButtonView:()=>i.Rm,StickyPanelView:()=>i.lp,SwitchButtonView:()=>i.BM,Template:()=>i.YS,ToolbarSeparatorView:()=>i.$y,ToolbarView:()=>i.jB,TooltipManager:()=>i.gE,View:()=>i.G7,ViewCollection:()=>i.vX,addKeyboardHandlingForGrid:()=>i.IJ,addListToDropdown:()=>i.Pm,addToolbarToDropdown:()=>i.up,clickOutsideHandler:()=>i.eC,createDropdown:()=>i.t9,createLabeledDropdown:()=>i.FH,createLabeledInputNumber:()=>i.sh,createLabeledInputText:()=>i.R,focusChildOnDropdownOpen:()=>i.Mh,getLocalizedColorOptions:()=>i.k6,injectCssTransitionDisabler:()=>i.fe,normalizeColorOptions:()=>i.S1,normalizeSingleColorDefinition:()=>i.jY,normalizeToolbarConfig:()=>i.iw,submitHandler:()=>i.GI});var i=o("./packages/ckeditor5-ui/src/index.ts")},"./src/undo.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Undo:()=>k,UndoEditing:()=>g,UndoUI:()=>w});var i=o("./packages/ckeditor5-core/src/index.ts"),s=o("./packages/ckeditor5-engine/src/index.ts"),n=Object.defineProperty,r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,l=(e,t,o)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class d extends i.mY{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(e.data,"set",((e,t)=>{t[1]=((e,t)=>{for(var o in t||(t={}))a.call(t,o)&&l(e,o,t[o]);if(r)for(var o of r(t))c.call(t,o)&&l(e,o,t[o]);return e})({},t[1]);const o=t[1];o.batchType||(o.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(e.data,"set",((e,t)=>{t[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(e){const t=this.editor.model.document.selection,o={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:o}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,o){const i=this.editor.model,s=i.document,n=[],r=e.map((e=>e.getTransformedByOperations(o))),a=r.flat();for(const e of r){const t=e.filter((e=>e.root!=s.graveyard)).filter((e=>!u(e,a)));t.length&&(h(t),n.push(t[0]))}n.length&&i.change((e=>{e.setSelection(n,{backward:t})}))}_undo(e,t){const o=this.editor.model,i=o.document;this._createdBatches.add(t);const n=e.operations.slice().filter((e=>e.isDocumentOperation));n.reverse();for(const e of n){const n=e.baseVersion+1,r=Array.from(i.history.getOperations(n)),a=(0,s.Rf)([e.getReversed()],r,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(let n of a){const r=n.affectedSelectable;r&&!o.canEditAt(r)&&(n=new s.Pk(n.baseVersion)),t.addOperation(n),o.applyOperation(n),i.history.setOperationAsUndone(e,n)}}}}function h(e){e.sort(((e,t)=>e.start.isBefore(t.start)?-1:1));for(let t=1;t<e.length;t++){const o=e[t-1].getJoined(e[t],!0);o&&(t--,e.splice(t,2,o))}}function u(e,t){return t.some((t=>t!==e&&t.containsRange(e,!0)))}class p extends d{execute(e=null){const t=e?this._stack.findIndex((t=>t.batch==e)):this._stack.length-1,o=this._stack.splice(t,1)[0],i=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(i,(()=>{this._undo(o.batch,i);const e=this.editor.model.document.history.getOperations(o.batch.baseVersion);this._restoreSelection(o.selection.ranges,o.selection.isBackward,e),this.fire("revert",o.batch,i)})),this.refresh()}}class f extends d{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,(()=>{const o=e.batch.operations[e.batch.operations.length-1].baseVersion+1,i=this.editor.model.document.history.getOperations(o);this._restoreSelection(e.selection.ranges,e.selection.isBackward,i),this._undo(e.batch,t)})),this.refresh()}}class g extends i.Sy{constructor(){super(...arguments),this._batchRegistry=new WeakSet}static get pluginName(){return"UndoEditing"}init(){const e=this.editor;this._undoCommand=new p(e),this._redoCommand=new f(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",((e,t)=>{const o=t[0];if(!o.isDocumentOperation)return;const i=o.batch,s=this._redoCommand.createdBatches.has(i),n=this._undoCommand.createdBatches.has(i);this._batchRegistry.has(i)||(this._batchRegistry.add(i),i.isUndoable&&(s?this._undoCommand.addBatch(i):n||(this._undoCommand.addBatch(i),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((e,t,o)=>{this._redoCommand.addBatch(o)})),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo")}}var m=o("./packages/ckeditor5-ui/src/index.ts");const b='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z"/></svg>',_='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z"/></svg>';class w extends i.Sy{static get pluginName(){return"UndoUI"}init(){const e=this.editor,t=e.locale,o=e.t,i="ltr"==t.uiLanguageDirection?b:_,s="ltr"==t.uiLanguageDirection?_:b;this._addButton("undo",o("Undo"),"CTRL+Z",i),this._addButton("redo",o("Redo"),"CTRL+Y",s)}_addButton(e,t,o,i){const s=this.editor;s.ui.componentFactory.add(e,(n=>{const r=s.commands.get(e),a=new m.r5(n);return a.set({label:t,icon:i,keystroke:o,tooltip:!0}),a.bind("isEnabled").to(r,"isEnabled"),this.listenTo(a,"execute",(()=>{s.execute(e),s.editing.view.focus()})),a}))}}class k extends i.Sy{static get requires(){return[g,w]}static get pluginName(){return"Undo"}}},"./src/upload.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Base64UploadAdapter:()=>h,FileDialogButtonView:()=>l,FileRepository:()=>r,SimpleUploadAdapter:()=>k});var i=o("./packages/ckeditor5-core/src/index.ts"),s=o("./packages/ckeditor5-utils/src/index.ts");class n extends((0,s.Re)()){constructor(){super();const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise(((o,i)=>{t.onload=()=>{const e=t.result;this._data=e,o(e)},t.onerror=()=>{i("error")},t.onabort=()=>{i("aborted")},this._reader.readAsDataURL(e)}))}abort(){this._reader.abort()}}class r extends i.Sy{constructor(){super(...arguments),this.loaders=new s.FE,this._loadersMap=new Map,this._pendingAction=null}static get pluginName(){return"FileRepository"}static get requires(){return[i.lR]}init(){this.loaders.on("change",(()=>this._updatePendingAction())),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0))}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return(0,s.KE)("filerepository-no-upload-adapter"),null;const t=new a(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then((e=>{this._loadersMap.set(e,t)})).catch((()=>{})),t.on("change:uploaded",(()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e})),t.on("change:uploadTotal",(()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e})),t}destroyLoader(e){const t=e instanceof a?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach(((e,o)=>{e===t&&this._loadersMap.delete(o)}))}_updatePendingAction(){const e=this.editor.plugins.get(i.lR);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,o=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(o(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",o)}}else e.remove(this._pendingAction),this._pendingAction=null}}class a extends((0,s.Re)()){constructor(e,t){super(),this.id=(0,s.hQ)(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new n,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((e=>this._filePromiseWrapper?e:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new s.Bb("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((e=>this._reader.read(e))).then((e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e})).catch((e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e}))}upload(){if("idle"!=this.status)throw new s.Bb("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((e=>(this.uploadResponse=e,this.status="idle",e))).catch((e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e}))}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch((()=>{})),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise(((o,i)=>{t.rejecter=i,t.isFulfilled=!1,e.then((e=>{t.isFulfilled=!0,o(e)})).catch((e=>{t.isFulfilled=!0,i(e)}))})),t}}var c=o("./packages/ckeditor5-ui/src/index.ts");class l extends c.G7{constructor(e){super(e),this.buttonView=new c.r5(e),this._fileInputView=new d(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on("execute",(()=>{this._fileInputView.open()}))}focus(){this.buttonView.focus()}}class d extends c.G7{constructor(e){super(e),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}class h extends i.Sy{static get requires(){return[r]}static get pluginName(){return"Base64UploadAdapter"}init(){this.editor.plugins.get(r).createUploadAdapter=e=>new u(e)}}class u{constructor(e){this.loader=e}upload(){return new Promise(((e,t)=>{const o=this.reader=new window.FileReader;o.addEventListener("load",(()=>{e({default:o.result})})),o.addEventListener("error",(e=>{t(e)})),o.addEventListener("abort",(()=>{t()})),this.loader.file.then((e=>{o.readAsDataURL(e)}))}))}abort(){this.reader.abort()}}var p=Object.defineProperty,f=Object.defineProperties,g=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,w=(e,t,o)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class k extends i.Sy{static get requires(){return[r]}static get pluginName(){return"SimpleUploadAdapter"}init(){const e=this.editor.config.get("simpleUpload");e&&(e.uploadUrl?this.editor.plugins.get(r).createUploadAdapter=t=>new v(t,e):(0,s.KE)("simple-upload-adapter-missing-uploadurl"))}}class v{constructor(e,t){this.loader=e,this.options=t}upload(){return this.loader.file.then((e=>new Promise(((t,o)=>{this._initRequest(),this._initListeners(t,o,e),this._sendRequest(e)}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.options.uploadUrl,!0),e.responseType="json"}_initListeners(e,t,o){const i=this.xhr,s=this.loader,n=`Couldn't upload file: ${o.name}.`;i.addEventListener("error",(()=>t(n))),i.addEventListener("abort",(()=>t())),i.addEventListener("load",(()=>{const o=i.response;if(!o||o.error)return t(o&&o.error&&o.error.message?o.error.message:n);const s=o.url?{default:o.url}:o.urls;var r;e((r=((e,t)=>{for(var o in t||(t={}))b.call(t,o)&&w(e,o,t[o]);if(m)for(var o of m(t))_.call(t,o)&&w(e,o,t[o]);return e})({},o),f(r,g({urls:s}))))})),i.upload&&i.upload.addEventListener("progress",(e=>{e.lengthComputable&&(s.uploadTotal=e.total,s.uploaded=e.loaded)}))}_sendRequest(e){const t=this.options.headers||{},o=this.options.withCredentials||!1;for(const e of Object.keys(t))this.xhr.setRequestHeader(e,t[e]);this.xhr.withCredentials=o;const i=new FormData;i.append("upload",e),this.xhr.send(i)}}},"./src/utils.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{CKEditorError:()=>i.Bb,Collection:()=>i.FE,Config:()=>i.De,DomEmitterMixin:()=>i.Xu,ElementReplacer:()=>i.a6,EmitterMixin:()=>i.ln,EventInfo:()=>i.M3,FocusTracker:()=>i.Rh,KeystrokeHandler:()=>i.VD,Locale:()=>i.go,ObservableMixin:()=>i.Re,Rect:()=>i.UL,ResizeObserver:()=>i.do,compareArrays:()=>i.Rt,count:()=>i.QX,createElement:()=>i.az,delay:()=>i.gw,diff:()=>i.Hg,diffToChanges:()=>i.Pk,env:()=>i.OB,fastDiff:()=>i.HZ,findClosestScrollableAncestor:()=>i.wm,first:()=>i.Ps,getAncestors:()=>i.dk,getCode:()=>i.Cq,getDataFromElement:()=>i.yy,getEnvKeystrokeText:()=>i.XU,getLanguageDirection:()=>i.j9,getLocalizedArrowKeyCodeDirection:()=>i.mA,getOptimalPosition:()=>i.xZ,global:()=>i.global,indexOf:()=>i.cq,insertAt:()=>i.ZQ,insertToPriorityArray:()=>i.VG,isArrowKeyCode:()=>i.dj,isCombiningMark:()=>i.tO,isComment:()=>i.C3,isForwardArrowKeyCode:()=>i.Zt,isHighSurrogateHalf:()=>i.Cb,isInsideCombinedSymbol:()=>i.pp,isInsideEmojiSequence:()=>i.YK,isInsideSurrogatePair:()=>i.to,isIterable:()=>i.TW,isLowSurrogateHalf:()=>i.nA,isNode:()=>i.UG,isRange:()=>i.bR,isText:()=>i.Gs,isValidAttributeName:()=>i.$b,isVisible:()=>i.pn,keyCodes:()=>i.Do,logError:()=>i.H,logWarning:()=>i.KE,mix:()=>i.CD,parseKeystroke:()=>i.Zz,priorities:()=>i.tA,releaseDate:()=>i.Dm,remove:()=>i.Od,scrollAncestorsToShowTarget:()=>i.F0,scrollViewportToShowTarget:()=>i.mR,setDataInElement:()=>i.jS,spliceArray:()=>i.x,toArray:()=>i.qo,toMap:()=>i.qL,toUnit:()=>i.nn,uid:()=>i.hQ,verifyLicense:()=>i.Tx,version:()=>i.i8});var i=o("./packages/ckeditor5-utils/src/index.ts")},"./src/watchdog.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{ContextWatchdog:()=>u,EditorWatchdog:()=>d,Watchdog:()=>i});class i{constructor(e){if(this.crashes=[],this.state="initializing",this._now=Date.now,this.crashes=[],this._crashNumberLimit="number"==typeof e.crashNumberLimit?e.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof e.minimumNonErrorTimePeriod?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=e=>{const t="error"in e?e.error:e.reason;t instanceof Error&&this._handleError(t,e)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]=this._listeners[e].filter((e=>e!==t))}_fire(e,...t){const o=this._listeners[e]||[];for(const e of o)e.apply(this,[null,...t])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,t){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:t instanceof ErrorEvent?t.filename:void 0,lineno:t instanceof ErrorEvent?t.lineno:void 0,colno:t instanceof ErrorEvent?t.colno:void 0,date:this._now()});const o=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:o}),o?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&void 0!==e.context&&null!==e.context&&"ready"===this.state&&this._isErrorComingFromThisItem(e)}_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;return(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function s(e,t=new Set){const o=[e],i=new Set;let s=0;for(;o.length>s;){const e=o[s++];if(!i.has(e)&&n(e)&&!t.has(e))if(i.add(e),Symbol.iterator in e)try{for(const t of e)o.push(t)}catch(e){}else for(const t in e)"defaultValue"!==t&&o.push(e[t])}return i}function n(e){const t=Object.prototype.toString.call(e),o=typeof e;return!("number"===o||"boolean"===o||"string"===o||"symbol"===o||"function"===o||"[object Date]"===t||"[object RegExp]"===t||"[object Module]"===t||null==e||e._watchdogExcluded||e instanceof EventTarget||e instanceof Event)}function r(e,t,o=new Set){if(e===t&&("object"==typeof(i=e)&&null!==i))return!0;var i;const n=s(e,o),r=s(t,o);for(const e of n)if(r.has(e))return!0;return!1}var a=o("./node_modules/lodash-es/throttle.js"),c=o("./node_modules/lodash-es/cloneDeepWith.js"),l=o("./node_modules/lodash-es/isElement.js");class d extends i{constructor(e,t={}){super(t),this._editor=null,this._throttledSave=(0,a.Z)(this._save.bind(this),"number"==typeof t.saveInterval?t.saveInterval:5e3),e&&(this._creator=(t,o)=>e.create(t,o)),this._destructor=e=>e.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((e=>{console.error("An error happened during the editor destroying.",e)})).then((()=>{if("string"==typeof this._elementOrData)return this.create(this._data,this._config,this._config.context);{const e=Object.assign({},this._config,{initialData:this._data});return this.create(this._elementOrData,e,e.context)}})).then((()=>{this._fire("restart")}))}create(e=this._elementOrData,t=this._config,o){return Promise.resolve().then((()=>(super._startErrorHandling(),this._elementOrData=e,this._config=this._cloneEditorConfiguration(t)||{},this._config.context=o,this._creator(e,this._config)))).then((e=>{this._editor=e,e.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=e.model.document.version,this._data=this._getData(),this.state="ready",this._fire("stateChange")}))}destroy(){return Promise.resolve().then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.flush();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)}))}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._lastDocumentVersion=e}catch(e){console.error(e,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e={};for(const t of this._editor.model.document.getRootNames())e[t]=this._editor.data.get({rootName:t});return e}_isErrorComingFromThisItem(e){return r(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return(0,c.Z)(e,((e,t)=>(0,l.Z)(e)||"context"===t?e:void 0))}}const h=Symbol("MainQueueId");class u extends i{constructor(e,t={}){super(t),this._watchdogs=new Map,this._context=null,this._contextProps=new Set,this._actionQueues=new p,this._watchdogConfig=t,this._creator=t=>e.create(t),this._destructor=e=>e.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}get context(){return this._context}create(e={}){return this._actionQueues.enqueue(h,(()=>(this._contextConfig=e,this._create())))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const t=f(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e.id,(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let t;if(this._watchdogs.has(e.id))throw new Error(`Item with the given id is already added: '${e.id}'.`);if("editor"===e.type)return t=new d(null,this._watchdogConfig),t.setCreator(e.creator),t._setExcludedProperties(this._contextProps),e.destructor&&t.setDestructor(e.destructor),this._watchdogs.set(e.id,t),t.on("error",((o,{error:i,causesRestart:s})=>{this._fire("itemError",{itemId:e.id,error:i}),s&&this._actionQueues.enqueue(e.id,(()=>new Promise((o=>{const i=()=>{t.off("restart",i),this._fire("itemRestart",{itemId:e.id}),o()};t.on("restart",i)}))))})),t.create(e.sourceElementOrData,e.config,this._context);throw new Error(`Not supported item type: '${e.type}'.`)})))))}remove(e){const t=f(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e,(()=>{const t=this._getWatchdog(e);return this._watchdogs.delete(e),t.destroy()})))))}destroy(){return this._actionQueues.enqueue(h,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue(h,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((e=>{console.error("An error happened during destroying the context or items.",e)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((e=>(this._context=e,this._contextProps=s(this._context),Promise.all(Array.from(this._watchdogs.values()).map((e=>(e._setExcludedProperties(this._contextProps),e.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((e=>e.destroy()))).then((()=>this._destructor(e)))}))}_getWatchdog(e){const t=this._watchdogs.get(e);if(!t)throw new Error(`Item with the given id was not registered: ${e}.`);return t}_isErrorComingFromThisItem(e){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(e))return!1;return r(this._context,e.context)}}class p{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._activeActions=0}onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,t){const o=e===h;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const i=(o?Promise.all(this._queues.values()):Promise.all([this._queues.get(h),this._queues.get(e)])).then(t),s=i.catch((()=>{}));return this._queues.set(e,s),i.finally((()=>{this._activeActions--,this._queues.get(e)===s&&0===this._activeActions&&this._onEmptyCallbacks.forEach((e=>e()))}))}}function f(e){return Array.isArray(e)?e:[e]}},"./src/widget.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{WIDGET_CLASS_NAME:()=>i.s4,WIDGET_SELECTED_CLASS_NAME:()=>i.Uo,Widget:()=>i.$L,WidgetResize:()=>i.WR,WidgetToolbarRepository:()=>i.e8,WidgetTypeAround:()=>i.Ww,findOptimalInsertionRange:()=>i.KT,getLabel:()=>i.id,isWidget:()=>i.Qd,setHighlightHandling:()=>i.em,setLabel:()=>i.l6,toWidget:()=>i.XC,toWidgetEditable:()=>i.sC,viewToModelPositionOutsideModelElement:()=>i.$n});var i=o("./packages/ckeditor5-widget/src/index.ts")},"?7cdd":(e,t,o)=>{e.exports=o},"./node_modules/lodash-es/_ListCache.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>u});const i=function(){this.__data__=[],this.size=0};var s=o("./node_modules/lodash-es/eq.js");const n=function(e,t){for(var o=e.length;o--;)if((0,s.Z)(e[o][0],t))return o;return-1};var r=Array.prototype.splice;const a=function(e){var t=this.__data__,o=n(t,e);return!(o<0)&&(o==t.length-1?t.pop():r.call(t,o,1),--this.size,!0)};const c=function(e){var t=this.__data__,o=n(t,e);return o<0?void 0:t[o][1]};const l=function(e){return n(this.__data__,e)>-1};const d=function(e,t){var o=this.__data__,i=n(o,e);return i<0?(++this.size,o.push([e,t])):o[i][1]=t,this};function h(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var i=e[t];this.set(i[0],i[1])}}h.prototype.clear=i,h.prototype.delete=a,h.prototype.get=c,h.prototype.has=l,h.prototype.set=d;const u=h},"./node_modules/lodash-es/_Map.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/_getNative.js"),s=o("./node_modules/lodash-es/_root.js");const n=(0,i.Z)(s.Z,"Map")},"./node_modules/lodash-es/_MapCache.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>x});const i=(0,o("./node_modules/lodash-es/_getNative.js").Z)(Object,"create");const s=function(){this.__data__=i?i(null):{},this.size=0};const n=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var r=Object.prototype.hasOwnProperty;const a=function(e){var t=this.__data__;if(i){var o=t[e];return"__lodash_hash_undefined__"===o?void 0:o}return r.call(t,e)?t[e]:void 0};var c=Object.prototype.hasOwnProperty;const l=function(e){var t=this.__data__;return i?void 0!==t[e]:c.call(t,e)};const d=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this};function h(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var i=e[t];this.set(i[0],i[1])}}h.prototype.clear=s,h.prototype.delete=n,h.prototype.get=a,h.prototype.has=l,h.prototype.set=d;const u=h;var p=o("./node_modules/lodash-es/_ListCache.js"),f=o("./node_modules/lodash-es/_Map.js");const g=function(){this.size=0,this.__data__={hash:new u,map:new(f.Z||p.Z),string:new u}};const m=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const b=function(e,t){var o=e.__data__;return m(t)?o["string"==typeof t?"string":"hash"]:o.map};const _=function(e){var t=b(this,e).delete(e);return this.size-=t?1:0,t};const w=function(e){return b(this,e).get(e)};const k=function(e){return b(this,e).has(e)};const v=function(e,t){var o=b(this,e),i=o.size;return o.set(e,t),this.size+=o.size==i?0:1,this};function y(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var i=e[t];this.set(i[0],i[1])}}y.prototype.clear=g,y.prototype.delete=_,y.prototype.get=w,y.prototype.has=k,y.prototype.set=v;const x=y},"./node_modules/lodash-es/_Stack.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>u});var i=o("./node_modules/lodash-es/_ListCache.js");const s=function(){this.__data__=new i.Z,this.size=0};const n=function(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o};const r=function(e){return this.__data__.get(e)};const a=function(e){return this.__data__.has(e)};var c=o("./node_modules/lodash-es/_Map.js"),l=o("./node_modules/lodash-es/_MapCache.js");const d=function(e,t){var o=this.__data__;if(o instanceof i.Z){var s=o.__data__;if(!c.Z||s.length<199)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new l.Z(s)}return o.set(e,t),this.size=o.size,this};function h(e){var t=this.__data__=new i.Z(e);this.size=t.size}h.prototype.clear=s,h.prototype.delete=n,h.prototype.get=r,h.prototype.has=a,h.prototype.set=d;const u=h},"./node_modules/lodash-es/_Symbol.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=o("./node_modules/lodash-es/_root.js").Z.Symbol},"./node_modules/lodash-es/_Uint8Array.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=o("./node_modules/lodash-es/_root.js").Z.Uint8Array},"./node_modules/lodash-es/_arrayLikeKeys.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>d});const i=function(e,t){for(var o=-1,i=Array(e);++o<e;)i[o]=t(o);return i};var s=o("./node_modules/lodash-es/isArguments.js"),n=o("./node_modules/lodash-es/isArray.js"),r=o("./node_modules/lodash-es/isBuffer.js"),a=o("./node_modules/lodash-es/_isIndex.js"),c=o("./node_modules/lodash-es/isTypedArray.js"),l=Object.prototype.hasOwnProperty;const d=function(e,t){var o=(0,n.Z)(e),d=!o&&(0,s.Z)(e),h=!o&&!d&&(0,r.Z)(e),u=!o&&!d&&!h&&(0,c.Z)(e),p=o||d||h||u,f=p?i(e.length,String):[],g=f.length;for(var m in e)!t&&!l.call(e,m)||p&&("length"==m||h&&("offset"==m||"parent"==m)||u&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||(0,a.Z)(m,g))||f.push(m);return f}},"./node_modules/lodash-es/_arrayPush.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e,t){for(var o=-1,i=t.length,s=e.length;++o<i;)e[s+o]=t[o];return e}},"./node_modules/lodash-es/_assignValue.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>r});var i=o("./node_modules/lodash-es/_baseAssignValue.js"),s=o("./node_modules/lodash-es/eq.js"),n=Object.prototype.hasOwnProperty;const r=function(e,t,o){var r=e[t];n.call(e,t)&&(0,s.Z)(r,o)&&(void 0!==o||t in e)||(0,i.Z)(e,t,o)}},"./node_modules/lodash-es/_baseAssignValue.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=o("./node_modules/lodash-es/_defineProperty.js");const s=function(e,t,o){"__proto__"==t&&i.Z?(0,i.Z)(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}},"./node_modules/lodash-es/_baseClone.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>Q});var i=o("./node_modules/lodash-es/_Stack.js");const s=function(e,t){for(var o=-1,i=null==e?0:e.length;++o<i&&!1!==t(e[o],o,e););return e};var n=o("./node_modules/lodash-es/_assignValue.js"),r=o("./node_modules/lodash-es/_copyObject.js"),a=o("./node_modules/lodash-es/keys.js");const c=function(e,t){return e&&(0,r.Z)(t,(0,a.Z)(t),e)};var l=o("./node_modules/lodash-es/keysIn.js");const d=function(e,t){return e&&(0,r.Z)(t,(0,l.Z)(t),e)};var h=o("./node_modules/lodash-es/_cloneBuffer.js"),u=o("./node_modules/lodash-es/_copyArray.js"),p=o("./node_modules/lodash-es/_getSymbols.js");const f=function(e,t){return(0,r.Z)(e,(0,p.Z)(e),t)};var g=o("./node_modules/lodash-es/_arrayPush.js"),m=o("./node_modules/lodash-es/_getPrototype.js"),b=o("./node_modules/lodash-es/stubArray.js");const _=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,g.Z)(t,(0,p.Z)(e)),e=(0,m.Z)(e);return t}:b.Z;const w=function(e,t){return(0,r.Z)(e,_(e),t)};var k=o("./node_modules/lodash-es/_getAllKeys.js"),v=o("./node_modules/lodash-es/_baseGetAllKeys.js");const y=function(e){return(0,v.Z)(e,l.Z,_)};var x=o("./node_modules/lodash-es/_getTag.js"),P=Object.prototype.hasOwnProperty;const E=function(e){var t=e.length,o=new e.constructor(t);return t&&"string"==typeof e[0]&&P.call(e,"index")&&(o.index=e.index,o.input=e.input),o};var T=o("./node_modules/lodash-es/_cloneArrayBuffer.js");const A=function(e,t){var o=t?(0,T.Z)(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)};var C=/\w*$/;const S=function(e){var t=new e.constructor(e.source,C.exec(e));return t.lastIndex=e.lastIndex,t};var O=o("./node_modules/lodash-es/_Symbol.js"),R=O.Z?O.Z.prototype:void 0,M=R?R.valueOf:void 0;const j=function(e){return M?Object(M.call(e)):{}};var B=o("./node_modules/lodash-es/_cloneTypedArray.js");const D=function(e,t,o){var i=e.constructor;switch(t){case"[object ArrayBuffer]":return(0,T.Z)(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return A(e,o);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,B.Z)(e,o);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return S(e);case"[object Symbol]":return j(e)}};var V=o("./node_modules/lodash-es/_initCloneObject.js"),I=o("./node_modules/lodash-es/isArray.js"),N=o("./node_modules/lodash-es/isBuffer.js"),z=o("./node_modules/lodash-es/isObjectLike.js");const F=function(e){return(0,z.Z)(e)&&"[object Map]"==(0,x.Z)(e)};var L=o("./node_modules/lodash-es/_baseUnary.js"),Z=o("./node_modules/lodash-es/_nodeUtil.js"),W=Z.Z&&Z.Z.isMap;const $=W?(0,L.Z)(W):F;var q=o("./node_modules/lodash-es/isObject.js");const H=function(e){return(0,z.Z)(e)&&"[object Set]"==(0,x.Z)(e)};var U=Z.Z&&Z.Z.isSet;const K=U?(0,L.Z)(U):H;var G="[object Arguments]",J="[object Function]",Y="[object Object]",X={};X[G]=X["[object Array]"]=X["[object ArrayBuffer]"]=X["[object DataView]"]=X["[object Boolean]"]=X["[object Date]"]=X["[object Float32Array]"]=X["[object Float64Array]"]=X["[object Int8Array]"]=X["[object Int16Array]"]=X["[object Int32Array]"]=X["[object Map]"]=X["[object Number]"]=X[Y]=X["[object RegExp]"]=X["[object Set]"]=X["[object String]"]=X["[object Symbol]"]=X["[object Uint8Array]"]=X["[object Uint8ClampedArray]"]=X["[object Uint16Array]"]=X["[object Uint32Array]"]=!0,X["[object Error]"]=X[J]=X["[object WeakMap]"]=!1;const Q=function e(t,o,r,p,g,m){var b,_=1&o,v=2&o,P=4&o;if(r&&(b=g?r(t,p,g,m):r(t)),void 0!==b)return b;if(!(0,q.Z)(t))return t;var T=(0,I.Z)(t);if(T){if(b=E(t),!_)return(0,u.Z)(t,b)}else{var A=(0,x.Z)(t),C=A==J||"[object GeneratorFunction]"==A;if((0,N.Z)(t))return(0,h.Z)(t,_);if(A==Y||A==G||C&&!g){if(b=v||C?{}:(0,V.Z)(t),!_)return v?w(t,d(b,t)):f(t,c(b,t))}else{if(!X[A])return g?t:{};b=D(t,A,_)}}m||(m=new i.Z);var S=m.get(t);if(S)return S;m.set(t,b),K(t)?t.forEach((function(i){b.add(e(i,o,r,i,t,m))})):$(t)&&t.forEach((function(i,s){b.set(s,e(i,o,r,s,t,m))}));var O=P?v?y:k.Z:v?l.Z:a.Z,R=T?void 0:O(t);return s(R||t,(function(i,s){R&&(i=t[s=i]),(0,n.Z)(b,s,e(i,o,r,s,t,m))})),b}},"./node_modules/lodash-es/_baseGetAllKeys.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/_arrayPush.js"),s=o("./node_modules/lodash-es/isArray.js");const n=function(e,t,o){var n=t(e);return(0,s.Z)(e)?n:(0,i.Z)(n,o(e))}},"./node_modules/lodash-es/_baseGetTag.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>u});var i=o("./node_modules/lodash-es/_Symbol.js"),s=Object.prototype,n=s.hasOwnProperty,r=s.toString,a=i.Z?i.Z.toStringTag:void 0;const c=function(e){var t=n.call(e,a),o=e[a];try{e[a]=void 0;var i=!0}catch(e){}var s=r.call(e);return i&&(t?e[a]=o:delete e[a]),s};var l=Object.prototype.toString;const d=function(e){return l.call(e)};var h=i.Z?i.Z.toStringTag:void 0;const u=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?c(e):d(e)}},"./node_modules/lodash-es/_baseUnary.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e){return function(t){return e(t)}}},"./node_modules/lodash-es/_cloneArrayBuffer.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=o("./node_modules/lodash-es/_Uint8Array.js");const s=function(e){var t=new e.constructor(e.byteLength);return new i.Z(t).set(new i.Z(e)),t}},"./node_modules/lodash-es/_cloneBuffer.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>c});var i=o("./node_modules/lodash-es/_root.js"),s="object"==typeof exports&&exports&&!exports.nodeType&&exports,n=s&&"object"==typeof module&&module&&!module.nodeType&&module,r=n&&n.exports===s?i.Z.Buffer:void 0,a=r?r.allocUnsafe:void 0;const c=function(e,t){if(t)return e.slice();var o=e.length,i=a?a(o):new e.constructor(o);return e.copy(i),i}},"./node_modules/lodash-es/_cloneTypedArray.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=o("./node_modules/lodash-es/_cloneArrayBuffer.js");const s=function(e,t){var o=t?(0,i.Z)(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}},"./node_modules/lodash-es/_copyArray.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e,t){var o=-1,i=e.length;for(t||(t=Array(i));++o<i;)t[o]=e[o];return t}},"./node_modules/lodash-es/_copyObject.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/_assignValue.js"),s=o("./node_modules/lodash-es/_baseAssignValue.js");const n=function(e,t,o,n){var r=!o;o||(o={});for(var a=-1,c=t.length;++a<c;){var l=t[a],d=n?n(o[l],e[l],l,o,e):void 0;void 0===d&&(d=e[l]),r?(0,s.Z)(o,l,d):(0,i.Z)(o,l,d)}return o}},"./node_modules/lodash-es/_createAssigner.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>_});const i=function(e){return e};const s=function(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)};var n=Math.max;const r=function(e,t,o){return t=n(void 0===t?e.length-1:t,0),function(){for(var i=arguments,r=-1,a=n(i.length-t,0),c=Array(a);++r<a;)c[r]=i[t+r];r=-1;for(var l=Array(t+1);++r<t;)l[r]=i[r];return l[t]=o(c),s(e,this,l)}};const a=function(e){return function(){return e}};var c=o("./node_modules/lodash-es/_defineProperty.js");const l=c.Z?function(e,t){return(0,c.Z)(e,"toString",{configurable:!0,enumerable:!1,value:a(t),writable:!0})}:i;var d=Date.now;const h=function(e){var t=0,o=0;return function(){var i=d(),s=16-(i-o);if(o=i,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(l);const u=function(e,t){return h(r(e,t,i),e+"")};var p=o("./node_modules/lodash-es/eq.js"),f=o("./node_modules/lodash-es/isArrayLike.js"),g=o("./node_modules/lodash-es/_isIndex.js"),m=o("./node_modules/lodash-es/isObject.js");const b=function(e,t,o){if(!(0,m.Z)(o))return!1;var i=typeof t;return!!("number"==i?(0,f.Z)(o)&&(0,g.Z)(t,o.length):"string"==i&&t in o)&&(0,p.Z)(o[t],e)};const _=function(e){return u((function(t,o){var i=-1,s=o.length,n=s>1?o[s-1]:void 0,r=s>2?o[2]:void 0;for(n=e.length>3&&"function"==typeof n?(s--,n):void 0,r&&b(o[0],o[1],r)&&(n=s<3?void 0:n,s=1),t=Object(t);++i<s;){var a=o[i];a&&e(t,a,i,n)}return t}))}},"./node_modules/lodash-es/_defineProperty.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=o("./node_modules/lodash-es/_getNative.js");const s=function(){try{var e=(0,i.Z)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},"./node_modules/lodash-es/_freeGlobal.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i="object"==typeof global&&global&&global.Object===Object&&global},"./node_modules/lodash-es/_getAllKeys.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>r});var i=o("./node_modules/lodash-es/_baseGetAllKeys.js"),s=o("./node_modules/lodash-es/_getSymbols.js"),n=o("./node_modules/lodash-es/keys.js");const r=function(e){return(0,i.Z)(e,n.Z,s.Z)}},"./node_modules/lodash-es/_getNative.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>_});var i=o("./node_modules/lodash-es/isFunction.js");const s=o("./node_modules/lodash-es/_root.js").Z["__core-js_shared__"];var n,r=(n=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";const a=function(e){return!!r&&r in e};var c=o("./node_modules/lodash-es/isObject.js"),l=o("./node_modules/lodash-es/_toSource.js"),d=/^\[object .+?Constructor\]$/,h=Function.prototype,u=Object.prototype,p=h.toString,f=u.hasOwnProperty,g=RegExp("^"+p.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const m=function(e){return!(!(0,c.Z)(e)||a(e))&&((0,i.Z)(e)?g:d).test((0,l.Z)(e))};const b=function(e,t){return null==e?void 0:e[t]};const _=function(e,t){var o=b(e,t);return m(o)?o:void 0}},"./node_modules/lodash-es/_getPrototype.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=(0,o("./node_modules/lodash-es/_overArg.js").Z)(Object.getPrototypeOf,Object)},"./node_modules/lodash-es/_getSymbols.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});const i=function(e,t){for(var o=-1,i=null==e?0:e.length,s=0,n=[];++o<i;){var r=e[o];t(r,o,e)&&(n[s++]=r)}return n};var s=o("./node_modules/lodash-es/stubArray.js"),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;const a=r?function(e){return null==e?[]:(e=Object(e),i(r(e),(function(t){return n.call(e,t)})))}:s.Z},"./node_modules/lodash-es/_getTag.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>x});var i=o("./node_modules/lodash-es/_getNative.js"),s=o("./node_modules/lodash-es/_root.js");const n=(0,i.Z)(s.Z,"DataView");var r=o("./node_modules/lodash-es/_Map.js");const a=(0,i.Z)(s.Z,"Promise");const c=(0,i.Z)(s.Z,"Set");const l=(0,i.Z)(s.Z,"WeakMap");var d=o("./node_modules/lodash-es/_baseGetTag.js"),h=o("./node_modules/lodash-es/_toSource.js"),u="[object Map]",p="[object Promise]",f="[object Set]",g="[object WeakMap]",m="[object DataView]",b=(0,h.Z)(n),_=(0,h.Z)(r.Z),w=(0,h.Z)(a),k=(0,h.Z)(c),v=(0,h.Z)(l),y=d.Z;(n&&y(new n(new ArrayBuffer(1)))!=m||r.Z&&y(new r.Z)!=u||a&&y(a.resolve())!=p||c&&y(new c)!=f||l&&y(new l)!=g)&&(y=function(e){var t=(0,d.Z)(e),o="[object Object]"==t?e.constructor:void 0,i=o?(0,h.Z)(o):"";if(i)switch(i){case b:return m;case _:return u;case w:return p;case k:return f;case v:return g}return t});const x=y},"./node_modules/lodash-es/_initCloneObject.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>c});var i=o("./node_modules/lodash-es/isObject.js"),s=Object.create;const n=function(){function e(){}return function(t){if(!(0,i.Z)(t))return{};if(s)return s(t);e.prototype=t;var o=new e;return e.prototype=void 0,o}}();var r=o("./node_modules/lodash-es/_getPrototype.js"),a=o("./node_modules/lodash-es/_isPrototype.js");const c=function(e){return"function"!=typeof e.constructor||(0,a.Z)(e)?{}:n((0,r.Z)(e))}},"./node_modules/lodash-es/_isIndex.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=/^(?:0|[1-9]\d*)$/;const s=function(e,t){var o=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&i.test(e))&&e>-1&&e%1==0&&e<t}},"./node_modules/lodash-es/_isPrototype.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=Object.prototype;const s=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||i)}},"./node_modules/lodash-es/_nodeUtil.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var i=o("./node_modules/lodash-es/_freeGlobal.js"),s="object"==typeof exports&&exports&&!exports.nodeType&&exports,n=s&&"object"==typeof module&&module&&!module.nodeType&&module,r=n&&n.exports===s&&i.Z.process;const a=function(){try{var e=n&&n.require&&n.require("util").types;return e||r&&r.binding&&r.binding("util")}catch(e){}}()},"./node_modules/lodash-es/_overArg.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e,t){return function(o){return e(t(o))}}},"./node_modules/lodash-es/_root.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/_freeGlobal.js"),s="object"==typeof self&&self&&self.Object===Object&&self;const n=i.Z||s||Function("return this")()},"./node_modules/lodash-es/_toSource.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=Function.prototype.toString;const s=function(e){if(null!=e){try{return i.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},"./node_modules/lodash-es/assignIn.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>r});var i=o("./node_modules/lodash-es/_copyObject.js"),s=o("./node_modules/lodash-es/_createAssigner.js"),n=o("./node_modules/lodash-es/keysIn.js");const r=(0,s.Z)((function(e,t){(0,i.Z)(t,(0,n.Z)(t),e)}))},"./node_modules/lodash-es/cloneDeepWith.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=o("./node_modules/lodash-es/_baseClone.js");const s=function(e,t){return t="function"==typeof t?t:void 0,(0,i.Z)(e,5,t)}},"./node_modules/lodash-es/debounce.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>_});var i=o("./node_modules/lodash-es/isObject.js"),s=o("./node_modules/lodash-es/_root.js");const n=function(){return s.Z.Date.now()};var r=/\s/;const a=function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t};var c=/^\s+/;const l=function(e){return e?e.slice(0,a(e)+1).replace(c,""):e};var d=o("./node_modules/lodash-es/isSymbol.js"),h=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,p=/^0o[0-7]+$/i,f=parseInt;const g=function(e){if("number"==typeof e)return e;if((0,d.Z)(e))return NaN;if((0,i.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,i.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=l(e);var o=u.test(e);return o||p.test(e)?f(e.slice(2),o?2:8):h.test(e)?NaN:+e};var m=Math.max,b=Math.min;const _=function(e,t,o){var s,r,a,c,l,d,h=0,u=!1,p=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function _(t){var o=s,i=r;return s=r=void 0,h=t,c=e.apply(i,o)}function w(e){var o=e-d;return void 0===d||o>=t||o<0||p&&e-h>=a}function k(){var e=n();if(w(e))return v(e);l=setTimeout(k,function(e){var o=t-(e-d);return p?b(o,a-(e-h)):o}(e))}function v(e){return l=void 0,f&&s?_(e):(s=r=void 0,c)}function y(){var e=n(),o=w(e);if(s=arguments,r=this,d=e,o){if(void 0===l)return function(e){return h=e,l=setTimeout(k,t),u?_(e):c}(d);if(p)return clearTimeout(l),l=setTimeout(k,t),_(d)}return void 0===l&&(l=setTimeout(k,t)),c}return t=g(t)||0,(0,i.Z)(o)&&(u=!!o.leading,a=(p="maxWait"in o)?m(g(o.maxWait)||0,t):a,f="trailing"in o?!!o.trailing:f),y.cancel=function(){void 0!==l&&clearTimeout(l),h=0,s=d=r=l=void 0},y.flush=function(){return void 0===l?c:v(n())},y}},"./node_modules/lodash-es/eq.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e,t){return e===t||e!=e&&t!=t}},"./node_modules/lodash-es/isArguments.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var i=o("./node_modules/lodash-es/_baseGetTag.js"),s=o("./node_modules/lodash-es/isObjectLike.js");const n=function(e){return(0,s.Z)(e)&&"[object Arguments]"==(0,i.Z)(e)};var r=Object.prototype,a=r.hasOwnProperty,c=r.propertyIsEnumerable;const l=n(function(){return arguments}())?n:function(e){return(0,s.Z)(e)&&a.call(e,"callee")&&!c.call(e,"callee")}},"./node_modules/lodash-es/isArray.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=Array.isArray},"./node_modules/lodash-es/isArrayLike.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/isFunction.js"),s=o("./node_modules/lodash-es/isLength.js");const n=function(e){return null!=e&&(0,s.Z)(e.length)&&!(0,i.Z)(e)}},"./node_modules/lodash-es/isBuffer.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>c});var i=o("./node_modules/lodash-es/_root.js");const s=function(){return!1};var n="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=r&&r.exports===n?i.Z.Buffer:void 0;const c=(a?a.isBuffer:void 0)||s},"./node_modules/lodash-es/isElement.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/isObjectLike.js"),s=o("./node_modules/lodash-es/isPlainObject.js");const n=function(e){return(0,i.Z)(e)&&1===e.nodeType&&!(0,s.Z)(e)}},"./node_modules/lodash-es/isFunction.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/_baseGetTag.js"),s=o("./node_modules/lodash-es/isObject.js");const n=function(e){if(!(0,s.Z)(e))return!1;var t=(0,i.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},"./node_modules/lodash-es/isLength.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},"./node_modules/lodash-es/isObject.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},"./node_modules/lodash-es/isObjectLike.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e){return null!=e&&"object"==typeof e}},"./node_modules/lodash-es/isPlainObject.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>h});var i=o("./node_modules/lodash-es/_baseGetTag.js"),s=o("./node_modules/lodash-es/_getPrototype.js"),n=o("./node_modules/lodash-es/isObjectLike.js"),r=Function.prototype,a=Object.prototype,c=r.toString,l=a.hasOwnProperty,d=c.call(Object);const h=function(e){if(!(0,n.Z)(e)||"[object Object]"!=(0,i.Z)(e))return!1;var t=(0,s.Z)(e);if(null===t)return!0;var o=l.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&c.call(o)==d}},"./node_modules/lodash-es/isSymbol.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/_baseGetTag.js"),s=o("./node_modules/lodash-es/isObjectLike.js");const n=function(e){return"symbol"==typeof e||(0,s.Z)(e)&&"[object Symbol]"==(0,i.Z)(e)}},"./node_modules/lodash-es/isTypedArray.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>h});var i=o("./node_modules/lodash-es/_baseGetTag.js"),s=o("./node_modules/lodash-es/isLength.js"),n=o("./node_modules/lodash-es/isObjectLike.js"),r={};r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1;const a=function(e){return(0,n.Z)(e)&&(0,s.Z)(e.length)&&!!r[(0,i.Z)(e)]};var c=o("./node_modules/lodash-es/_baseUnary.js"),l=o("./node_modules/lodash-es/_nodeUtil.js"),d=l.Z&&l.Z.isTypedArray;const h=d?(0,c.Z)(d):a},"./node_modules/lodash-es/keys.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var i=o("./node_modules/lodash-es/_arrayLikeKeys.js"),s=o("./node_modules/lodash-es/_isPrototype.js");const n=(0,o("./node_modules/lodash-es/_overArg.js").Z)(Object.keys,Object);var r=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,s.Z)(e))return n(e);var t=[];for(var o in Object(e))r.call(e,o)&&"constructor"!=o&&t.push(o);return t};var c=o("./node_modules/lodash-es/isArrayLike.js");const l=function(e){return(0,c.Z)(e)?(0,i.Z)(e):a(e)}},"./node_modules/lodash-es/keysIn.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>d});var i=o("./node_modules/lodash-es/_arrayLikeKeys.js"),s=o("./node_modules/lodash-es/isObject.js"),n=o("./node_modules/lodash-es/_isPrototype.js");const r=function(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t};var a=Object.prototype.hasOwnProperty;const c=function(e){if(!(0,s.Z)(e))return r(e);var t=(0,n.Z)(e),o=[];for(var i in e)("constructor"!=i||!t&&a.call(e,i))&&o.push(i);return o};var l=o("./node_modules/lodash-es/isArrayLike.js");const d=function(e){return(0,l.Z)(e)?(0,i.Z)(e,!0):c(e)}},"./node_modules/lodash-es/stubArray.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(){return[]}},"./node_modules/lodash-es/throttle.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/debounce.js"),s=o("./node_modules/lodash-es/isObject.js");const n=function(e,t,o){var n=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return(0,s.Z)(o)&&(n="leading"in o?!!o.leading:n,r="trailing"in o?!!o.trailing:r),(0,i.Z)(e,t,{leading:n,maxWait:t,trailing:r})}},"./node_modules/lodash-es/toString.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>d});var i=o("./node_modules/lodash-es/_Symbol.js");const s=function(e,t){for(var o=-1,i=null==e?0:e.length,s=Array(i);++o<i;)s[o]=t(e[o],o,e);return s};var n=o("./node_modules/lodash-es/isArray.js"),r=o("./node_modules/lodash-es/isSymbol.js"),a=i.Z?i.Z.prototype:void 0,c=a?a.toString:void 0;const l=function e(t){if("string"==typeof t)return t;if((0,n.Z)(t))return s(t,e)+"";if((0,r.Z)(t))return c?c.call(t):"";var o=t+"";return"0"==o&&1/t==-Infinity?"-0":o};const d=function(e){return null==e?"":l(e)}}},t={};function o(i){var s=t[i];if(void 0!==s)return s.exports;var n=t[i]={id:i,exports:{}};return e[i](n,n.exports,o),n.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var i=o("?7cdd");(window.CKEditor5=window.CKEditor5||{}).dll=i})(),function(e){e.CKEditor5=e.CKEditor5||{};const t=["utils","core","engine","ui","clipboard","enter","paragraph","select-all","typing","undo","upload","widget","watchdog"];for(const o of t){const t=o.replace(/-([a-z])/g,((e,t)=>t.toUpperCase()));e.CKEditor5[t]=e.CKEditor5.dll(`./src/${o}.js`)}}(window); \ No newline at end of file + */(()=>{var e={"./node_modules/color-convert/conversions.js":(e,t,o)=>{const i=o("./node_modules/color-name/index.js"),s={};for(const e of Object.keys(i))s[i[e]]=e;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:o}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:o})}n.rgb.hsl=function(e){const t=e[0]/255,o=e[1]/255,i=e[2]/255,s=Math.min(t,o,i),n=Math.max(t,o,i),r=n-s;let a,c;n===s?a=0:t===n?a=(o-i)/r:o===n?a=2+(i-t)/r:i===n&&(a=4+(t-o)/r),a=Math.min(60*a,360),a<0&&(a+=360);const l=(s+n)/2;return c=n===s?0:l<=.5?r/(n+s):r/(2-n-s),[a,100*c,100*l]},n.rgb.hsv=function(e){let t,o,i,s,n;const r=e[0]/255,a=e[1]/255,c=e[2]/255,l=Math.max(r,a,c),d=l-Math.min(r,a,c),h=function(e){return(l-e)/6/d+.5};return 0===d?(s=0,n=0):(n=d/l,t=h(r),o=h(a),i=h(c),r===l?s=i-o:a===l?s=1/3+t-i:c===l&&(s=2/3+o-t),s<0?s+=1:s>1&&(s-=1)),[360*s,100*n,100*l]},n.rgb.hwb=function(e){const t=e[0],o=e[1];let i=e[2];const s=n.rgb.hsl(e)[0],r=1/255*Math.min(t,Math.min(o,i));return i=1-1/255*Math.max(t,Math.max(o,i)),[s,100*r,100*i]},n.rgb.cmyk=function(e){const t=e[0]/255,o=e[1]/255,i=e[2]/255,s=Math.min(1-t,1-o,1-i);return[100*((1-t-s)/(1-s)||0),100*((1-o-s)/(1-s)||0),100*((1-i-s)/(1-s)||0),100*s]},n.rgb.keyword=function(e){const t=s[e];if(t)return t;let o,n=1/0;for(const t of Object.keys(i)){const s=i[t],c=(a=s,((r=e)[0]-a[0])**2+(r[1]-a[1])**2+(r[2]-a[2])**2);c<n&&(n=c,o=t)}var r,a;return o},n.keyword.rgb=function(e){return i[e]},n.rgb.xyz=function(e){let t=e[0]/255,o=e[1]/255,i=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;return[100*(.4124*t+.3576*o+.1805*i),100*(.2126*t+.7152*o+.0722*i),100*(.0193*t+.1192*o+.9505*i)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let o=t[0],i=t[1],s=t[2];o/=95.047,i/=100,s/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;return[116*i-16,500*(o-i),200*(i-s)]},n.hsl.rgb=function(e){const t=e[0]/360,o=e[1]/100,i=e[2]/100;let s,n,r;if(0===o)return r=255*i,[r,r,r];s=i<.5?i*(1+o):i+o-i*o;const a=2*i-s,c=[0,0,0];for(let e=0;e<3;e++)n=t+1/3*-(e-1),n<0&&n++,n>1&&n--,r=6*n<1?a+6*(s-a)*n:2*n<1?s:3*n<2?a+(s-a)*(2/3-n)*6:a,c[e]=255*r;return c},n.hsl.hsv=function(e){const t=e[0];let o=e[1]/100,i=e[2]/100,s=o;const n=Math.max(i,.01);i*=2,o*=i<=1?i:2-i,s*=n<=1?n:2-n;return[t,100*(0===i?2*s/(n+s):2*o/(i+o)),100*((i+o)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,o=e[1]/100;let i=e[2]/100;const s=Math.floor(t)%6,n=t-Math.floor(t),r=255*i*(1-o),a=255*i*(1-o*n),c=255*i*(1-o*(1-n));switch(i*=255,s){case 0:return[i,c,r];case 1:return[a,i,r];case 2:return[r,i,c];case 3:return[r,a,i];case 4:return[c,r,i];case 5:return[i,r,a]}},n.hsv.hsl=function(e){const t=e[0],o=e[1]/100,i=e[2]/100,s=Math.max(i,.01);let n,r;r=(2-o)*i;const a=(2-o)*s;return n=o*s,n/=a<=1?a:2-a,n=n||0,r/=2,[t,100*n,100*r]},n.hwb.rgb=function(e){const t=e[0]/360;let o=e[1]/100,i=e[2]/100;const s=o+i;let n;s>1&&(o/=s,i/=s);const r=Math.floor(6*t),a=1-i;n=6*t-r,0!=(1&r)&&(n=1-n);const c=o+n*(a-o);let l,d,h;switch(r){default:case 6:case 0:l=a,d=c,h=o;break;case 1:l=c,d=a,h=o;break;case 2:l=o,d=a,h=c;break;case 3:l=o,d=c,h=a;break;case 4:l=c,d=o,h=a;break;case 5:l=a,d=o,h=c}return[255*l,255*d,255*h]},n.cmyk.rgb=function(e){const t=e[0]/100,o=e[1]/100,i=e[2]/100,s=e[3]/100;return[255*(1-Math.min(1,t*(1-s)+s)),255*(1-Math.min(1,o*(1-s)+s)),255*(1-Math.min(1,i*(1-s)+s))]},n.xyz.rgb=function(e){const t=e[0]/100,o=e[1]/100,i=e[2]/100;let s,n,r;return s=3.2406*t+-1.5372*o+-.4986*i,n=-.9689*t+1.8758*o+.0415*i,r=.0557*t+-.204*o+1.057*i,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,n=n>.0031308?1.055*n**(1/2.4)-.055:12.92*n,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,s=Math.min(Math.max(0,s),1),n=Math.min(Math.max(0,n),1),r=Math.min(Math.max(0,r),1),[255*s,255*n,255*r]},n.xyz.lab=function(e){let t=e[0],o=e[1],i=e[2];t/=95.047,o/=100,i/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*o-16,500*(t-o),200*(o-i)]},n.lab.xyz=function(e){let t,o,i;o=(e[0]+16)/116,t=e[1]/500+o,i=o-e[2]/200;const s=o**3,n=t**3,r=i**3;return o=s>.008856?s:(o-16/116)/7.787,t=n>.008856?n:(t-16/116)/7.787,i=r>.008856?r:(i-16/116)/7.787,t*=95.047,o*=100,i*=108.883,[t,o,i]},n.lab.lch=function(e){const t=e[0],o=e[1],i=e[2];let s;s=360*Math.atan2(i,o)/2/Math.PI,s<0&&(s+=360);return[t,Math.sqrt(o*o+i*i),s]},n.lch.lab=function(e){const t=e[0],o=e[1],i=e[2]/360*2*Math.PI;return[t,o*Math.cos(i),o*Math.sin(i)]},n.rgb.ansi16=function(e,t=null){const[o,i,s]=e;let r=null===t?n.rgb.hsv(e)[2]:t;if(r=Math.round(r/50),0===r)return 30;let a=30+(Math.round(s/255)<<2|Math.round(i/255)<<1|Math.round(o/255));return 2===r&&(a+=60),a},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],o=e[1],i=e[2];if(t===o&&o===i)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(i/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const o=.5*(1+~~(e>50));return[(1&t)*o*255,(t>>1&1)*o*255,(t>>2&1)*o*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let o=t[0];3===t[0].length&&(o=o.split("").map((e=>e+e)).join(""));const i=parseInt(o,16);return[i>>16&255,i>>8&255,255&i]},n.rgb.hcg=function(e){const t=e[0]/255,o=e[1]/255,i=e[2]/255,s=Math.max(Math.max(t,o),i),n=Math.min(Math.min(t,o),i),r=s-n;let a,c;return a=r<1?n/(1-r):0,c=r<=0?0:s===t?(o-i)/r%6:s===o?2+(i-t)/r:4+(t-o)/r,c/=6,c%=1,[360*c,100*r,100*a]},n.hsl.hcg=function(e){const t=e[1]/100,o=e[2]/100,i=o<.5?2*t*o:2*t*(1-o);let s=0;return i<1&&(s=(o-.5*i)/(1-i)),[e[0],100*i,100*s]},n.hsv.hcg=function(e){const t=e[1]/100,o=e[2]/100,i=t*o;let s=0;return i<1&&(s=(o-i)/(1-i)),[e[0],100*i,100*s]},n.hcg.rgb=function(e){const t=e[0]/360,o=e[1]/100,i=e[2]/100;if(0===o)return[255*i,255*i,255*i];const s=[0,0,0],n=t%1*6,r=n%1,a=1-r;let c=0;switch(Math.floor(n)){case 0:s[0]=1,s[1]=r,s[2]=0;break;case 1:s[0]=a,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=r;break;case 3:s[0]=0,s[1]=a,s[2]=1;break;case 4:s[0]=r,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=a}return c=(1-o)*i,[255*(o*s[0]+c),255*(o*s[1]+c),255*(o*s[2]+c)]},n.hcg.hsv=function(e){const t=e[1]/100,o=t+e[2]/100*(1-t);let i=0;return o>0&&(i=t/o),[e[0],100*i,100*o]},n.hcg.hsl=function(e){const t=e[1]/100,o=e[2]/100*(1-t)+.5*t;let i=0;return o>0&&o<.5?i=t/(2*o):o>=.5&&o<1&&(i=t/(2*(1-o))),[e[0],100*i,100*o]},n.hcg.hwb=function(e){const t=e[1]/100,o=t+e[2]/100*(1-t);return[e[0],100*(o-t),100*(1-o)]},n.hwb.hcg=function(e){const t=e[1]/100,o=1-e[2]/100,i=o-t;let s=0;return i<1&&(s=(o-i)/(1-i)),[e[0],100*i,100*s]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),o=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(o.length)+o},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},"./node_modules/color-convert/index.js":(e,t,o)=>{const i=o("./node_modules/color-convert/conversions.js"),s=o("./node_modules/color-convert/route.js"),n={};Object.keys(i).forEach((e=>{n[e]={},Object.defineProperty(n[e],"channels",{value:i[e].channels}),Object.defineProperty(n[e],"labels",{value:i[e].labels});const t=s(e);Object.keys(t).forEach((o=>{const i=t[o];n[e][o]=function(e){const t=function(...t){const o=t[0];if(null==o)return o;o.length>1&&(t=o);const i=e(t);if("object"==typeof i)for(let e=i.length,t=0;t<e;t++)i[t]=Math.round(i[t]);return i};return"conversion"in e&&(t.conversion=e.conversion),t}(i),n[e][o].raw=function(e){const t=function(...t){const o=t[0];return null==o?o:(o.length>1&&(t=o),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(i)}))})),e.exports=n},"./node_modules/color-convert/route.js":(e,t,o)=>{const i=o("./node_modules/color-convert/conversions.js");function s(e){const t=function(){const e={},t=Object.keys(i);for(let o=t.length,i=0;i<o;i++)e[t[i]]={distance:-1,parent:null};return e}(),o=[e];for(t[e].distance=0;o.length;){const e=o.pop(),s=Object.keys(i[e]);for(let i=s.length,n=0;n<i;n++){const i=s[n],r=t[i];-1===r.distance&&(r.distance=t[e].distance+1,r.parent=e,o.unshift(i))}}return t}function n(e,t){return function(o){return t(e(o))}}function r(e,t){const o=[t[e].parent,e];let s=i[t[e].parent][e],r=t[e].parent;for(;t[r].parent;)o.unshift(t[r].parent),s=n(i[t[r].parent][r],s),r=t[r].parent;return s.conversion=o,s}e.exports=function(e){const t=s(e),o={},i=Object.keys(t);for(let e=i.length,s=0;s<e;s++){const e=i[s];null!==t[e].parent&&(o[e]=r(e,t))}return o}},"./node_modules/color-name/index.js":e=>{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-clipboard/theme/clipboard.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,'.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}.ck.ck-clipboard-drop-target-line{pointer-events:none;position:absolute}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);margin-left:-1px;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{border-color:var(--ck-clipboard-drop-target-color) transparent transparent transparent;border-style:solid;border-width:calc(var(--ck-clipboard-drop-target-dot-height)) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5);content:"";display:block;height:0;left:50%;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);transform:translateX(-50%);width:0}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}.ck.ck-clipboard-drop-target-line{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);height:0;margin-top:-1px}',""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/placeholder.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text);cursor:text}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/renderer.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/button.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;justify-content:left;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{color:var(--ck-color-button-on-color)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/switchbutton.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:calc(1.07692em + 1px);--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2px);--ck-switch-button-inner-hover-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton,.ck.ck-button.ck-switchbutton.ck-on:active,.ck.ck-button.ck-switchbutton.ck-on:focus,.ck.ck-button.ck-switchbutton.ck-on:hover,.ck.ck-button.ck-switchbutton:active,.ck.ck-button.ck-switchbutton:focus,.ck.ck-button.ck-switchbutton:hover{background:transparent;color:inherit}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);border:1px solid transparent;transition:background .4s ease,box-shadow .2s ease-in-out,outline .2s ease-in-out;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:var(--ck-switch-button-inner-hover-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton:focus{border-color:transparent;box-shadow:none;outline:none}.ck.ck-button.ck-switchbutton:focus .ck-button__toggle{box-shadow:0 0 0 1px var(--ck-color-base-background),0 0 0 5px var(--ck-color-focus-outer-shadow);outline:var(--ck-focus-ring);outline-offset:1px}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorgrid/colorgrid.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#166fd4}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorpicker/colorpicker.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-input{min-width:unset}.color-picker-hex-input{width:max-content}.ck.ck-color-picker__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-color-picker__row .ck-color-picker__hash-view{padding-right:var(--ck-spacing-medium);padding-top:var(--ck-spacing-tiny)}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/dropdown.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-modal)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/listdropdown.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/splitbutton.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton>.ck-splitbutton__arrow:not(:focus){border-bottom-width:0;border-top-width:0}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:focus:after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:focus:after{--ck-color-split-button-hover-border:var(--ck-color-focus-border)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}',""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/editorui.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/formheader/formheader.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-form__header .ck-form__header__label{font-weight:700}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/icon/icon.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{cursor:inherit}.ck.ck-icon.ck-icon_inherit-color,.ck.ck-icon.ck-icon_inherit-color *{color:inherit}.ck.ck-icon.ck-icon_inherit-color :not([fill]){fill:currentColor}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/input/input.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/label/label.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-labeled-field-label-default-position-x:var(--ck-spacing-medium);--ck-labeled-field-label-default-position-y:calc(var(--ck-font-size-base)*0.6);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-labeled-field-label-default-position-x),var(--ck-labeled-field-label-default-position-y)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-labeled-field-label-default-position-x)*-1),var(--ck-labeled-field-label-default-position-y)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/list/list.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{background:var(--ck-color-list-background);list-style-type:none}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{border-radius:0;min-height:unset;padding:calc(var(--ck-line-height-base)*.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*.4*var(--ck-font-size-base));text-align:left;width:100%}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-switchbutton):not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;width:100%}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonpanel.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}',""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonrotator.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/fakepanel.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/stickypanel.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-modal)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/toolbar.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;background:var(--ck-color-toolbar-border);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-dropdown__panel{min-width:auto}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-button>.ck-button__label{max-width:7em;width:auto}.ck.ck-toolbar:focus{outline:none}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/tooltip/tooltip.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck.ck-balloon-panel.ck-tooltip{--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium);pointer-events:none;z-index:calc(var(--ck-z-modal) + 100)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/globals/globals.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-powered-by-line-height:10px;--ck-powered-by-padding-vertical:2px;--ck-powered-by-padding-horizontal:4px;--ck-powered-by-text-color:#4f4f4f;--ck-powered-by-border-radius:var(--ck-border-radius);--ck-powered-by-background:#fff;--ck-powered-by-border-color:var(--ck-color-focus-border)}.ck.ck-balloon-panel.ck-powered-by-balloon{--ck-border-radius:var(--ck-powered-by-border-radius);background:var(--ck-powered-by-background);border:0;box-shadow:none;min-height:unset}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by{line-height:var(--ck-powered-by-line-height)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by a{align-items:center;cursor:pointer;display:flex;filter:grayscale(80%);line-height:var(--ck-powered-by-line-height);opacity:.66;padding:var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-powered-by__label{color:var(--ck-powered-by-text-color);cursor:pointer;font-size:7.5px;font-weight:700;letter-spacing:-.2px;line-height:normal;margin-right:4px;padding-left:2px;text-transform:uppercase}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-icon{cursor:pointer;display:block}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by:hover a{filter:grayscale(0);opacity:1}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_border]{border:var(--ck-focus-ring);border-color:var(--ck-powered-by-border-color)}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-color-highlight-background:#ff0;--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{word-wrap:break-word;background:transparent;border:0;margin:0;padding:0;text-decoration:none;transition:none;vertical-align:middle}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widget.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{background-color:var(--ck-color-widget-editable-focus-background);border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgetresize.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}",""]);const n=s},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgettypearound.css":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/css-loader/dist/runtime/api.js"),s=o.n(i)()((function(e){return e[1]}));s.push([e.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}',""]);const n=s},"./node_modules/css-loader/dist/runtime/api.js":e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=e(t);return t[2]?"@media ".concat(t[2]," {").concat(o,"}"):o})).join("")},t.i=function(e,o,i){"string"==typeof e&&(e=[[null,e,""]]);var s={};if(i)for(var n=0;n<this.length;n++){var r=this[n][0];null!=r&&(s[r]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);i&&s[c[0]]||(o&&(c[2]?c[2]="".concat(o," and ").concat(c[2]):c[2]=o),t.push(c))}},t}},"./packages/ckeditor5-core/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{mY:()=>r,_y:()=>d,eO:()=>h,W9:()=>_,ML:()=>g,xK:()=>w,AJ:()=>c,lR:()=>v,Sy:()=>s,P$:()=>b,icons:()=>y,Nu:()=>k});var i=o("./packages/ckeditor5-utils/src/index.ts");class s extends((0,i.Re)()){constructor(e){super(),this._disableStack=new Set,this.editor=e,this.set("isEnabled",!0)}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",n,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",n),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function n(e){e.return=!1,e.stop()}class r extends((0,i.Re)()){constructor(e){super(),this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._isEnabledBasedOnSelection=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",(()=>{this.refresh()})),this.listenTo(e,"change:isReadOnly",(()=>{this.refresh()})),this.on("set:isEnabled",(t=>{this.affectsData&&(e.isReadOnly||this._isEnabledBasedOnSelection&&!e.model.canEditAt(e.model.document.selection))&&(t.return=!1,t.stop())}),{priority:"highest"}),this.on("execute",(e=>{this.isEnabled||e.stop()}),{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",a,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",a),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function a(e){e.return=!1,e.stop()}class c extends r{constructor(){super(...arguments),this._childCommandsDefinitions=[]}refresh(){}execute(...e){const t=this._getFirstEnabledCommand();return!!t&&t.execute(e)}registerChildCommand(e,t={}){(0,i.VG)(this._childCommandsDefinitions,{command:e,priority:t.priority||"normal"}),e.on("change:isEnabled",(()=>this._checkEnabled())),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find((({command:e})=>e.isEnabled));return e&&e.command}}class l extends((0,i.ln)()){constructor(e,t=[],o=[]){super(),this._plugins=new Map,this._context=e,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of o)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new i.Bb("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],o=[]){const s=this,n=this._context;!function e(t,o=new Set){t.forEach((t=>{c(t)&&(o.has(t)||(o.add(t),t.pluginName&&!s._availablePlugins.has(t.pluginName)&&s._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,o)))}))}(e),u(e);const r=[...function e(t,o=new Set){return t.map((e=>c(e)?e:s._availablePlugins.get(e))).reduce(((t,i)=>o.has(i)?t:(o.add(i),i.requires&&(u(i.requires,i),e(i.requires,o).forEach((e=>t.add(e)))),t.add(i))),new Set)}(e.filter((e=>!d(e,t))))];!function(e,t){for(const o of t){if("function"!=typeof o)throw new i.Bb("plugincollection-replace-plugin-invalid-type",null,{pluginItem:o});const t=o.pluginName;if(!t)throw new i.Bb("plugincollection-replace-plugin-missing-name",null,{pluginItem:o});if(o.requires&&o.requires.length)throw new i.Bb("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const n=s._availablePlugins.get(t);if(!n)throw new i.Bb("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const r=e.indexOf(n);if(-1===r){if(s._contextPlugins.has(n))return;throw new i.Bb("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(n.requires&&n.requires.length)throw new i.Bb("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(r,1,o),s._availablePlugins.set(t,o)}}(r,o);const a=r.map((e=>{let t=s._contextPlugins.get(e);return t=t||new e(n),s._add(e,t),t}));return p(a,"init").then((()=>p(a,"afterInit"))).then((()=>a));function c(e){return"function"==typeof e}function l(e){return c(e)&&!!e.isContextPlugin}function d(e,t){return t.some((t=>t===e||(h(e)===t||h(t)===e)))}function h(e){return c(e)?e.pluginName||e.name:e}function u(e,o=null){e.map((e=>c(e)?e:s._availablePlugins.get(e)||e)).forEach((e=>{!function(e,t){if(c(e))return;if(t)throw new i.Bb("plugincollection-soft-required",n,{missingPlugin:e,requiredBy:h(t)});throw new i.Bb("plugincollection-plugin-not-found",n,{plugin:e})}(e,o),function(e,t){if(!l(t))return;if(l(e))return;throw new i.Bb("plugincollection-context-required",n,{plugin:h(e),requiredBy:h(t)})}(e,o),function(e,o){if(!o)return;if(!d(e,t))return;throw new i.Bb("plugincollection-required",n,{plugin:h(e),requiredBy:h(o)})}(e,o)}))}function p(e,t){return e.reduce(((e,o)=>o[t]?s._contextPlugins.has(o)?e:e.then(o[t].bind(o)):e),Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const o=e.pluginName;if(o){if(this._plugins.has(o))throw new i.Bb("plugincollection-plugin-name-conflict",null,{pluginName:o,plugin1:this._plugins.get(o).constructor,plugin2:e});this._plugins.set(o,t)}}}class d{constructor(e){this._contextOwner=null,this.config=new i.De(e,this.constructor.defaultConfig);const t=this.constructor.builtinPlugins;this.config.define("plugins",t),this.plugins=new l(this,t);const o=this.config.get("language")||{};this.locale=new i.go({uiLanguage:"string"==typeof o?o:o.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new i.FE}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const o of e.concat(t)){if("function"!=typeof o)throw new i.Bb("context-initplugins-constructor-only",null,{Plugin:o});if(!0!==o.isContextPlugin)throw new i.Bb("context-initplugins-invalid-plugin",null,{Plugin:o})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,(e=>e.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(e,t){if(this._contextOwner)throw new i.Bb("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise((t=>{const o=new this(e);t(o.initPlugins().then((()=>o)))}))}}class h extends((0,i.Re)()){constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}class u extends i.VD{constructor(e){super(),this.editor=e}set(e,t,o={}){if("string"==typeof t){const e=t;t=(t,o)=>{this.editor.execute(e),o()}}super.set(e,t,o)}}var p=o("./packages/ckeditor5-engine/src/index.ts");class f{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const o=this.get(e);if(!o)throw new i.Bb("commandcollection-command-not-found",this,{commandName:e});return o.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class g extends((0,i.Re)()){constructor(e={}){super();const t=this.constructor,o=e.language||t.defaultConfig&&t.defaultConfig.language;this._context=e.context||new d({language:o}),this._context._addEditor(this,!e.context);const s=Array.from(t.builtinPlugins||[]);this.config=new i.De(e,t.defaultConfig),this.config.define("plugins",s),this.config.define(this._context._getEditorConfig()),this.plugins=new l(this,s,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new f,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new p.Hn,this.on("change:isReadOnly",(()=>{this.model.document.isReadOnly=this.isReadOnly}));const n=new p.A_;this.data=new p.Yc(this.model,n),this.editing=new p.jH(this.model,n),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new p.uz([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new u(this),this.keystrokes.listenTo(this.editing.view.document)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new i.Bb("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new i.Bb("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new i.Bb("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}initPlugins(){const e=this.config,t=e.get("plugins"),o=e.get("removePlugins")||[],i=e.get("extraPlugins")||[],s=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(i),o,s)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise((e=>this.once("ready",e)))),e.then((()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()})).then((()=>this.plugins.destroy())).then((()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})).then((()=>this._context._removeEditor(this)))}execute(e,...t){try{return this.commands.execute(e,...t)}catch(e){i.Bb.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}}var m=o("./node_modules/lodash-es/isFunction.js");function b(e){if(!(0,m.Z)(e.updateSourceElement))throw new i.Bb("attachtoform-missing-elementapi-interface",e);const t=e.sourceElement;if(function(e){return!!e&&"textarea"===e.tagName.toLowerCase()}(t)&&t.form){let o;const i=t.form,s=()=>e.updateSourceElement();(0,m.Z)(i.submit)&&(o=i.submit,i.submit=()=>{s(),o.apply(i)}),i.addEventListener("submit",s),e.on("destroy",(()=>{i.removeEventListener("submit",s),o&&(i.submit=o)}))}}function _(e){return class extends e{setData(e){this.data.set(e)}getData(e){return this.data.get(e)}}}{const e=_(Object);_.setData=e.prototype.setData,_.getData=e.prototype.getData}function w(e){return class extends e{updateSourceElement(e=this.data.get()){if(!this.sourceElement)throw new i.Bb("editor-missing-sourceelement",this);const t=this.config.get("updateSourceElementOnDestroy"),o=this.sourceElement instanceof HTMLTextAreaElement;t||o?(0,i.jS)(this.sourceElement,e):(0,i.jS)(this.sourceElement,"")}}}function k(e,t){if(t.ckeditorInstance)throw new i.Bb("editor-source-element-already-used",e);t.ckeditorInstance=e,e.once("destroy",(()=>{delete t.ckeditorInstance}))}w.updateSourceElement=w(Object).prototype.updateSourceElement;class v extends h{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new i.FE({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new i.Bb("pendingactions-add-invalid-message",this);const t=new((0,i.Re)());return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const y={bold:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z"/></svg>',cancel:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z"/></svg>',caption:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2z"/><path d="M17 1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14zm0 1.5H3a.5.5 0 0 0-.492.41L2.5 3v9a.5.5 0 0 0 .41.492L3 12.5h14a.5.5 0 0 0 .492-.41L17.5 12V3a.5.5 0 0 0-.41-.492L17 2.5z" fill-opacity=".6"/></svg>',check:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z"/></svg>',cog:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.333 2 .19 2.263a5.899 5.899 0 0 1 1.458.604L14.714 3.4 16.6 5.286l-1.467 1.733c.263.452.468.942.605 1.46L18 8.666v2.666l-2.263.19a5.899 5.899 0 0 1-.604 1.458l1.467 1.733-1.886 1.886-1.733-1.467a5.899 5.899 0 0 1-1.46.605L11.334 18H8.667l-.19-2.263a5.899 5.899 0 0 1-1.458-.604L5.286 16.6 3.4 14.714l1.467-1.733a5.899 5.899 0 0 1-.604-1.458L2 11.333V8.667l2.262-.189a5.899 5.899 0 0 1 .605-1.459L3.4 5.286 5.286 3.4l1.733 1.467a5.899 5.899 0 0 1 1.46-.605L8.666 2h2.666zM10 6.267a3.733 3.733 0 1 0 0 7.466 3.733 3.733 0 0 0 0-7.466z"/></svg>',eraser:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053-2.147-.066z"/><path d="M4 18h5.523v-1H4zm-2 0h1v-1H2z"/></svg>',image:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.91 10.54c.26-.23.64-.21.88.03l3.36 3.14 2.23-2.06a.64.64 0 0 1 .87 0l2.52 2.97V4.5H3.2v10.12l3.71-4.08zm10.27-7.51c.6 0 1.09.47 1.09 1.05v11.84c0 .59-.49 1.06-1.09 1.06H2.79c-.6 0-1.09-.47-1.09-1.06V4.08c0-.58.49-1.05 1.1-1.05h14.38zm-5.22 5.56a1.96 1.96 0 1 1 3.4-1.96 1.96 1.96 0 0 1-3.4 1.96z"/></svg>',lowVision:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.085 6.22 2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.094 11.094 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.488.488 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304c-.258.11-.51.233-.757.365l6.239 6.24-.006.005.78.78c-.388.094-.78.166-1.174.215l-1.11-1.11h.011L4.55 8.197a7.2 7.2 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10.164 10.164 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a2.563 2.563 0 0 0-.124.2c-.043.077-.08.158-.108.241a.534.534 0 0 0-.028.133.29.29 0 0 0 .008.072.927.927 0 0 0 .082.226c.067.133.145.26.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93zm7.07.531a4.632 4.632 0 0 1 1.108 5.992l.345.344.046-.018a9.313 9.313 0 0 0 2-1.112c.256-.187.5-.392.727-.613.137-.134.27-.277.392-.431.072-.091.141-.185.203-.286.057-.093.107-.19.148-.292a.72.72 0 0 0 .036-.12.29.29 0 0 0 .008-.072.492.492 0 0 0-.028-.133.999.999 0 0 0-.036-.096 2.165 2.165 0 0 0-.071-.145 2.917 2.917 0 0 0-.125-.2 3.592 3.592 0 0 0-.263-.335 5.444 5.444 0 0 0-.53-.523 7.955 7.955 0 0 0-1.054-.768 9.766 9.766 0 0 0-1.879-.891c-.337-.118-.68-.219-1.027-.301zm-2.85.21-.069.002a.508.508 0 0 0-.254.097.496.496 0 0 0-.104.679.498.498 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.494.494 0 0 0 .45.287h.008a.496.496 0 0 0 .35-.158.482.482 0 0 0 .13-.335.638.638 0 0 0-.048-.219 3.379 3.379 0 0 0-.36-.723 3.438 3.438 0 0 0-2.791-1.543l-.028-.001h-.013z"/></svg>',importExport:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path clip-rule="evenodd" d="M19 4.5 14 0H3v12.673l.868-1.041c.185-.222.4-.402.632-.54V1.5h8v5h5v7.626a2.24 2.24 0 0 1 1.5.822V4.5ZM14 5V2l3.3 3H14Zm-3.692 12.5c.062.105.133.206.213.303L11.52 19H8v-.876a2.243 2.243 0 0 0 1.82-.624h.488Zm7.518-.657a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0l2.346-2.815Zm-15.056-.38a.75.75 0 0 1-.096-1.056l2.346-2.815a.95.95 0 0 1 1.46 0l2.346 2.815a.75.75 0 1 1-1.152.96L6.5 14.96V20H5v-5.04l-1.174 1.408a.75.75 0 0 1-1.056.096Z"/></g><defs><clipPath id="a"><path d="M0 0h20v20H0z"/></clipPath></defs></svg>',paragraph:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.5 5.5H7v5h3.5a2.5 2.5 0 1 0 0-5zM5 3h6.5v.025a5 5 0 0 1 0 9.95V13H7v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/></svg>',plus:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 2a1 1 0 0 0-1 1v6H3a1 1 0 1 0 0 2h6v6a1 1 0 1 0 2 0v-6h6a1 1 0 1 0 0-2h-6V3a1 1 0 0 0-1-1Z"/></svg>',text:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555Zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13Z"/><path clip-rule="evenodd" d="m12.09 17-.534-1.292.848-1.971.545 1.319L12.113 17h-.023Zm1.142-5.187.545 1.319L15.5 9.13l1.858 4.316h-3.45l.398.965h3.467L18.887 17H20l-3.873-9h-1.254l-1.641 3.813Z"/></g><defs><clipPath id="a"><path d="M0 0h20v20H0z"/></clipPath></defs></svg>',alignBottom:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.239 13.938-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.752.752 0 0 1-.511.187.752.752 0 0 1-.511-.187zM4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5H4.25z"/></svg>',alignMiddle:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.75 11.875a.752.752 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.752.752 0 0 1-.508.184.752.752 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75z"/></svg>',alignTop:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m10.261 7.062 2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .511-.187.752.752 0 0 1 .511.187zM15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5h10.5z"/></svg>',alignLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',alignCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75z"/></svg>',alignRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75zm0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75z"/></svg>',alignJustify:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',objectLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M15.003 7v5.5a1 1 0 0 1-1 1H5.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H6.5V12h6.997V7.5z"/></svg>',objectRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectFullWidth:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18 7v5.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1zm-1.505.5H3.504V12h12.991V7.5z"/></svg>',objectInline:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectSizeFull:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M18.095 2H1.905C.853 2 0 2.895 0 4v12c0 1.105.853 2 1.905 2h16.19C19.147 18 20 17.105 20 16V4c0-1.105-.853-2-1.905-2zm0 1.5c.263 0 .476.224.476.5v12c0 .276-.213.5-.476.5H1.905a.489.489 0 0 1-.476-.5V4c0-.276.213-.5.476-.5h16.19z"/></svg>',objectSizeLarge:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M13 6H2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5h11z"/></svg>',objectSizeSmall:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M7 10H2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5h5z"/></svg>',objectSizeMedium:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M10 8H2a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-6a.5.5 0 0 1 .5-.5h8z"/></svg>',pencil:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.3 17.37-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5 9.375 17H19v1.5H8z"/></svg>',pilcrow:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.999 2H15a1 1 0 0 1 0 2h-1.004v13a1 1 0 1 1-2 0V4H8.999v13a1 1 0 1 1-2 0v-7A4 4 0 0 1 3 6a4 4 0 0 1 3.999-4z"/></svg>',quote:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574z"/></svg>',threeVerticalDots:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="9.5" cy="4.5" r="1.5"/><circle cx="9.5" cy="10.5" r="1.5"/><circle cx="9.5" cy="16.5" r="1.5"/></svg>'}},"./packages/ckeditor5-engine/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{kW:()=>Ue,Yy:()=>Ys,r7:()=>ze,KU:()=>xr,uz:()=>Bs,Yc:()=>js,tn:()=>Eo,f4:()=>Qn,uj:()=>_i,pG:()=>It,dK:()=>Wt,qZ:()=>$t,qD:()=>st,jH:()=>is,W_:()=>Vo,Ay:()=>Sn,X5:()=>Rs,IZ:()=>Hs,jP:()=>mn,iE:()=>fi,zj:()=>Gs,xO:()=>P,lB:()=>Ks,Hn:()=>vr,dM:()=>Pr,$z:()=>qs,Pk:()=>Xs,Qj:()=>Lt,Bz:()=>sn,Ly:()=>zo,e6:()=>qo,sN:()=>Qs,Th:()=>Tt,_o:()=>en,tF:()=>tn,qh:()=>Us,A_:()=>xe,aY:()=>So,xv:()=>Bo,R:()=>Do,Po:()=>Io,yj:()=>Er,G7:()=>Oo,m1:()=>Ue,By:()=>Ce,Ux:()=>He,y_:()=>it,W2:()=>Oe,y9:()=>Te,pc:()=>Je,wx:()=>tt,FY:()=>Me,Xj:()=>v,dq:()=>Xe,QR:()=>Xr,sI:()=>Qr,vt:()=>la,J8:()=>da,DA:()=>l,ID:()=>c,KT:()=>fr,I8:()=>Gr,mq:()=>Kr,oz:()=>Ur,YG:()=>Se,m0:()=>Jr,uT:()=>Yr,$_:()=>h,SB:()=>$r,D5:()=>Mr,G9:()=>Vr,IT:()=>Br,zz:()=>Nr,WK:()=>Zr,Zb:()=>Fr,PX:()=>Hr,Q7:()=>u,NJ:()=>d,Rf:()=>ln});var i=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),s=o.n(i),n=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/placeholder.css"),r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};s()(n.Z,r);n.Z.locals;const a=new WeakMap;function c({view:e,element:t,text:o,isDirectHost:i=!0,keepOnFocus:s=!1}){const n=e.document;a.has(n)||(a.set(n,new Map),n.registerPostFixer((e=>p(n,e))),n.on("change:isComposing",(()=>{e.change((e=>p(n,e)))}),{priority:"high"})),a.get(n).set(t,{text:o,isDirectHost:i,keepOnFocus:s,hostElement:i?t:null}),e.change((e=>p(n,e)))}function l(e,t){const o=t.document;a.has(o)&&e.change((e=>{const i=a.get(o),s=i.get(t);e.removeAttribute("data-placeholder",s.hostElement),h(e,s.hostElement),i.delete(t)}))}function d(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}function h(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function u(e,t){if(!e.isAttached())return!1;if(Array.from(e.getChildren()).some((e=>!e.is("uiElement"))))return!1;const o=e.document,i=o.selection.anchor;return(!o.isComposing||!i||i.parent!==e)&&(!!t||(!o.isFocused||!!i&&i.parent!==e))}function p(e,t){const o=a.get(e),i=[];let s=!1;for(const[e,n]of o)n.isDirectHost&&(i.push(e),f(t,e,n)&&(s=!0));for(const[e,n]of o){if(n.isDirectHost)continue;const o=g(e);o&&(i.includes(o)||(n.hostElement=o,f(t,e,n)&&(s=!0)))}return s}function f(e,t,o){const{text:i,isDirectHost:s,hostElement:n}=o;let r=!1;n.getAttribute("data-placeholder")!==i&&(e.setAttribute("data-placeholder",i,n),r=!0);return(s||1==t.childCount)&&u(n,o.keepOnFocus)?d(e,n)&&(r=!0):h(e,n)&&(r=!0),r}function g(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}var m=o("./packages/ckeditor5-utils/src/index.ts");class b{is(){throw new Error("is() method is abstract")}}var _=o("./node_modules/lodash-es/_baseClone.js");const w=function(e){return(0,_.Z)(e,4)};o("./packages/ckeditor5-utils/src/version.ts");class k extends((0,m.ln)(b)){constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new m.Bb("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}getCommonAncestor(e,t={}){const o=this.getAncestors(t),i=e.getAncestors(t);let s=0;for(;o[s]==i[s]&&o[s];)s++;return 0===s?null:o[s-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),o=e.getPath(),i=(0,m.Rt)(t,o);switch(i){case"prefix":return!0;case"extension":return!1;default:return t[i]<o[i]}}isAfter(e){return this!=e&&(this.root===e.root&&!this.isBefore(e))}_remove(){this.parent._removeChildren(this.index)}_fireChange(e,t){this.fire(`change:${e}`,t),this.parent&&this.parent._fireChange(e,t)}toJSON(){const e=w(this);return delete e.parent,e}}k.prototype.is=function(e){return"node"===e||"view:node"===e};class v extends k{constructor(e,t){super(e),this._textData=t}get data(){return this._textData}get _data(){return this.data}set _data(e){this._fireChange("text",this),this._textData=e}isSimilar(e){return e instanceof v&&(this===e||this.data===e.data)}_clone(){return new v(this.document,this.data)}}v.prototype.is=function(e){return"$text"===e||"view:$text"===e||"text"===e||"view:text"===e||"node"===e||"view:node"===e};class y extends b{constructor(e,t,o){if(super(),this.textNode=e,t<0||t>e.data.length)throw new m.Bb("view-textproxy-wrong-offsetintext",this);if(o<0||t+o>e.data.length)throw new m.Bb("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+o),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const t=[];let o=e.includeSelf?this.textNode:this.parent;for(;null!==o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}}y.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e};var x=o("./node_modules/lodash-es/isPlainObject.js");class P{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const o=E(t,e);if(o)return{element:t,pattern:e,match:o}}return null}matchAll(...e){const t=[];for(const o of e)for(const e of this._patterns){const i=E(o,e);i&&t.push({element:o,pattern:e,match:i})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function E(e,t){if("function"==typeof t)return t(e);const o={};return t.name&&(o.name=function(e,t){if(e instanceof RegExp)return!!t.match(e);return e===t}(t.name,e.name),!o.name)||t.attributes&&(o.attributes=function(e,t){const o=new Set(t.getAttributeKeys());(0,x.Z)(e)?(void 0!==e.style&&(0,m.KE)("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&(0,m.KE)("matcher-pattern-deprecated-attributes-class-key",e)):(o.delete("style"),o.delete("class"));return T(e,o,(e=>t.getAttribute(e)))}(t.attributes,e),!o.attributes)||t.classes&&(o.classes=function(e,t){return T(e,t.getClassNames(),(()=>{}))}(t.classes,e),!o.classes)||t.styles&&(o.styles=function(e,t){return T(e,t.getStyleNames(!0),(e=>t.getStyle(e)))}(t.styles,e),!o.styles)?null:o}function T(e,t,o){const i=function(e){if(Array.isArray(e))return e.map((e=>(0,x.Z)(e)?(void 0!==e.key&&void 0!==e.value||(0,m.KE)("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0]));if((0,x.Z)(e))return Object.entries(e);return[[e,!0]]}(e),s=Array.from(t),n=[];if(i.forEach((([e,t])=>{s.forEach((i=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,i)&&function(e,t,o){if(!0===e)return!0;const i=o(t);return e===i||e instanceof RegExp&&!!String(i).match(e)}(t,i,o)&&n.push(i)}))})),i.length&&!(n.length<i.length))return n}var A=o("./node_modules/lodash-es/isObject.js"),C=o("./node_modules/lodash-es/isArray.js"),S=o("./node_modules/lodash-es/isSymbol.js"),O=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,R=/^\w*$/;const M=function(e,t){if((0,C.Z)(e))return!1;var o=typeof e;return!("number"!=o&&"symbol"!=o&&"boolean"!=o&&null!=e&&!(0,S.Z)(e))||(R.test(e)||!O.test(e)||null!=t&&e in Object(t))};var j=o("./node_modules/lodash-es/_MapCache.js");function B(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var o=function(){var i=arguments,s=t?t.apply(this,i):i[0],n=o.cache;if(n.has(s))return n.get(s);var r=e.apply(this,i);return o.cache=n.set(s,r)||n,r};return o.cache=new(B.Cache||j.Z),o}B.Cache=j.Z;const D=B;var V=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,I=/\\(\\)?/g;const N=function(e){var t=D(e,(function(e){return 500===o.size&&o.clear(),e})),o=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(V,(function(e,o,i,s){t.push(i?s.replace(I,"$1"):o||e)})),t}));var z=o("./node_modules/lodash-es/toString.js");const F=function(e,t){return(0,C.Z)(e)?e:M(e,t)?[e]:N((0,z.Z)(e))};const L=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};const Z=function(e){if("string"==typeof e||(0,S.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};const W=function(e,t){for(var o=0,i=(t=F(t,e)).length;null!=e&&o<i;)e=e[Z(t[o++])];return o&&o==i?e:void 0};const $=function(e,t,o){var i=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(o=o>s?s:o)<0&&(o+=s),s=t>o?0:o-t>>>0,t>>>=0;for(var n=Array(s);++i<s;)n[i]=e[i+t];return n};const q=function(e,t){return t.length<2?e:W(e,$(t,0,-1))};const H=function(e,t){return t=F(t,e),null==(e=q(e,t))||delete e[Z(L(t))]};const U=function(e,t){return null==e||H(e,t)};const K=function(e,t,o){var i=null==e?void 0:W(e,t);return void 0===i?o:i};var G=o("./node_modules/lodash-es/_Stack.js"),J=o("./node_modules/lodash-es/_baseAssignValue.js"),Y=o("./node_modules/lodash-es/eq.js");const X=function(e,t,o){(void 0!==o&&!(0,Y.Z)(e[t],o)||void 0===o&&!(t in e))&&(0,J.Z)(e,t,o)};const Q=function(e){return function(t,o,i){for(var s=-1,n=Object(t),r=i(t),a=r.length;a--;){var c=r[e?a:++s];if(!1===o(n[c],c,n))break}return t}}();var ee=o("./node_modules/lodash-es/_cloneBuffer.js"),te=o("./node_modules/lodash-es/_cloneTypedArray.js"),oe=o("./node_modules/lodash-es/_copyArray.js"),ie=o("./node_modules/lodash-es/_initCloneObject.js"),se=o("./node_modules/lodash-es/isArguments.js"),ne=o("./node_modules/lodash-es/isArrayLike.js"),re=o("./node_modules/lodash-es/isObjectLike.js");const ae=function(e){return(0,re.Z)(e)&&(0,ne.Z)(e)};var ce=o("./node_modules/lodash-es/isBuffer.js"),le=o("./node_modules/lodash-es/isFunction.js"),de=o("./node_modules/lodash-es/isTypedArray.js");const he=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var ue=o("./node_modules/lodash-es/_copyObject.js"),pe=o("./node_modules/lodash-es/keysIn.js");const fe=function(e){return(0,ue.Z)(e,(0,pe.Z)(e))};const ge=function(e,t,o,i,s,n,r){var a=he(e,o),c=he(t,o),l=r.get(c);if(l)X(e,o,l);else{var d=n?n(a,c,o+"",e,t,r):void 0,h=void 0===d;if(h){var u=(0,C.Z)(c),p=!u&&(0,ce.Z)(c),f=!u&&!p&&(0,de.Z)(c);d=c,u||p||f?(0,C.Z)(a)?d=a:ae(a)?d=(0,oe.Z)(a):p?(h=!1,d=(0,ee.Z)(c,!0)):f?(h=!1,d=(0,te.Z)(c,!0)):d=[]:(0,x.Z)(c)||(0,se.Z)(c)?(d=a,(0,se.Z)(a)?d=fe(a):(0,A.Z)(a)&&!(0,le.Z)(a)||(d=(0,ie.Z)(c))):h=!1}h&&(r.set(c,d),s(d,c,i,n,r),r.delete(c)),X(e,o,d)}};const me=function e(t,o,i,s,n){t!==o&&Q(o,(function(r,a){if(n||(n=new G.Z),(0,A.Z)(r))ge(t,o,a,i,e,s,n);else{var c=s?s(he(t,a),r,a+"",t,o,n):void 0;void 0===c&&(c=r),X(t,a,c)}}),pe.Z)};const be=(0,o("./node_modules/lodash-es/_createAssigner.js").Z)((function(e,t,o){me(e,t,o)}));var _e=o("./node_modules/lodash-es/_assignValue.js"),we=o("./node_modules/lodash-es/_isIndex.js");const ke=function(e,t,o,i){if(!(0,A.Z)(e))return e;for(var s=-1,n=(t=F(t,e)).length,r=n-1,a=e;null!=a&&++s<n;){var c=Z(t[s]),l=o;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(s!=r){var d=a[c];void 0===(l=i?i(d,c,a):void 0)&&(l=(0,A.Z)(d)?d:(0,we.Z)(t[s+1])?[]:{})}(0,_e.Z)(a,c,l),a=a[c]}return e};const ve=function(e,t,o){return null==e?e:ke(e,t,o)};class ye{constructor(e){this._styles={},this._styleProcessor=e}get isEmpty(){const e=Object.entries(this._styles);return!Array.from(e).length}get size(){return this.isEmpty?0:this.getStyleNames().length}setTo(e){this.clear();const t=Array.from(function(e){let t=null,o=0,i=0,s=null;const n=new Map;if(""===e)return n;";"!=e.charAt(e.length-1)&&(e+=";");for(let r=0;r<e.length;r++){const a=e.charAt(r);if(null===t)switch(a){case":":s||(s=e.substr(o,r-o),i=r+1);break;case'"':case"'":t=a;break;case";":{const t=e.substr(i,r-i);s&&n.set(s.trim(),t.trim()),s=null,o=r+1;break}}else a===t&&(t=null)}return n}(e).entries());for(const[e,o]of t)this._styleProcessor.toNormalizedForm(e,o,this._styles)}has(e){if(this.isEmpty)return!1;const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)}set(e,t){if((0,A.Z)(e))for(const[t,o]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,o,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=Pe(e);U(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map((e=>e.join(":"))).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!(0,A.Z)(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){if(this.isEmpty)return[];if(e)return this._styleProcessor.getStyleNames(this._styles);return this._getStylesEntries().map((([e])=>e))}clear(){this._styles={}}_getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const o of t)e.push(...this._styleProcessor.getReducedForm(o,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const o=t.splice(0,t.length-1).join("."),i=K(this._styles,o);if(!i)return;!Array.from(Object.keys(i)).length&&this.remove(o)}}class xe{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,o){if((0,A.Z)(t))Ee(o,Pe(e),t);else if(this._normalizers.has(e)){const i=this._normalizers.get(e),{path:s,value:n}=i(t);Ee(o,s,n)}else Ee(o,e,t)}getNormalized(e,t){if(!e)return be({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const o=this._extractors.get(e);if("string"==typeof o)return K(t,o);const i=o(e,t);if(i)return i}return K(t,Pe(e))}getReducedForm(e,t){const o=this.getNormalized(e,t);if(void 0===o)return[];if(this._reducers.has(e)){return this._reducers.get(e)(o)}return[[e,o]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter((t=>{const o=this.getNormalized(t,e);return o&&"object"==typeof o?Object.keys(o).length:o})),o=new Set([...t,...Object.keys(e)]);return Array.from(o.values())}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const o of t)this._mapStyleNames(o,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function Pe(e){return e.replace("-",".")}function Ee(e,t,o){let i=o;(0,A.Z)(o)&&(i=be({},K(e,t),o)),ve(e,t,i)}class Te extends k{constructor(e,t,o,i){if(super(e),this._unsafeAttributesToRender=[],this._customProperties=new Map,this.name=t,this._attrs=function(e){const t=(0,m.qL)(e);for(const[e,o]of t)null===o?t.delete(e):"string"!=typeof o&&t.set(e,String(o));return t}(o),this._children=[],i&&this._insertChild(0,i),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");Ae(this._classes,e),this._attrs.delete("class")}this._styles=new ye(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof Te))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,o]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==o)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new P(...e);let o=this.parent;for(;o&&!o.is("documentFragment");){if(t.match(o))return o;o=o.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),o=Array.from(this._attrs).map((e=>`${e[0]}="${e[1]}"`)).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==o?"":` ${o}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const o of this.getChildren())t.push(o._clone(e));const o=new this.constructor(this.document,this.name,this._attrs,t);return o._classes=new Set(this._classes),o._styles.set(this._styles.getNormalized()),o._customProperties=new Map(this._customProperties),o.getFillerOffset=this.getFillerOffset,o._unsafeAttributesToRender=this._unsafeAttributesToRender,o}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let o=0;const i=function(e,t){if("string"==typeof t)return[new v(e,t)];(0,m.TW)(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new v(e,t):t instanceof y?new v(e,t.data):t))}(this.document,t);for(const t of i)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,o++;return o}_removeChildren(e,t=1){this._fireChange("children",this);for(let o=e;o<e+t;o++)this._children[o].parent=null;return this._children.splice(e,t)}_setAttribute(e,t){const o=String(t);this._fireChange("attributes",this),"class"==e?Ae(this._classes,o):"style"==e?this._styles.setTo(o):this._attrs.set(e,o)}_removeAttribute(e){return this._fireChange("attributes",this),"class"==e?this._classes.size>0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of(0,m.qo)(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of(0,m.qo)(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),"string"!=typeof e?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of(0,m.qo)(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function Ae(e,t){const o=t.split(/\s+/);e.clear(),o.forEach((t=>e.add(t)))}Te.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ce extends Te{constructor(e,t,o,i){super(e,t,o,i),this.getFillerOffset=Se}}function Se(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}Ce.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Oe extends((0,m.Re)(Ce)){constructor(e,t,o,i){super(e,t,o,i),this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",(t=>t&&e.selection.editableElement==this)),this.listenTo(e.selection,"change",(()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this}))}destroy(){this.stopListening()}}Oe.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};const Re=Symbol("rootName");class Me extends Oe{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(Re)}set rootName(e){this._setCustomProperty(Re,e)}set _name(e){this.name=e}}Me.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class je{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new m.Bb("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new m.Bb("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this._position=Be._createAt(e.startPosition):this._position=Be._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,o;do{o=this.position,t=this.next()}while(!t.done&&e(t.value));t.done||(this._position=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,o=e.parent;if(null===o.parent&&e.offset===o.childCount)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let i;if(o instanceof v){if(e.isAtEnd)return this._position=Be._createAfter(o),this._next();i=o.data[e.offset]}else i=o.getChild(e.offset);if(i instanceof Te)return this.shallow?e.offset++:e=new Be(i,0),this._position=e,this._formatReturnValue("elementStart",i,t,e,1);if(i instanceof v){if(this.singleCharacters)return e=new Be(i,0),this._position=e,this._next();{let o,s=i.data.length;return i==this._boundaryEndParent?(s=this.boundaries.end.offset,o=new y(i,0,s),e=Be._createAfter(o)):(o=new y(i,0,i.data.length),e.offset++),this._position=e,this._formatReturnValue("text",o,t,e,s)}}if("string"==typeof i){let i;if(this.singleCharacters)i=1;else{i=(o===this._boundaryEndParent?this.boundaries.end.offset:o.data.length)-e.offset}const s=new y(o,e.offset,i);return e.offset+=i,this._position=e,this._formatReturnValue("text",s,t,e,i)}return e=Be._createAfter(o),this._position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",o,t,e)}_previous(){let e=this.position.clone();const t=this.position,o=e.parent;if(null===o.parent&&0===e.offset)return{done:!0,value:void 0};if(o==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let i;if(o instanceof v){if(e.isAtStart)return this._position=Be._createBefore(o),this._previous();i=o.data[e.offset-1]}else i=o.getChild(e.offset-1);if(i instanceof Te)return this.shallow?(e.offset--,this._position=e,this._formatReturnValue("elementStart",i,t,e,1)):(e=new Be(i,i.childCount),this._position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",i,t,e));if(i instanceof v){if(this.singleCharacters)return e=new Be(i,i.data.length),this._position=e,this._previous();{let o,s=i.data.length;if(i==this._boundaryStartParent){const t=this.boundaries.start.offset;o=new y(i,t,i.data.length-t),s=o.data.length,e=Be._createBefore(o)}else o=new y(i,0,i.data.length),e.offset--;return this._position=e,this._formatReturnValue("text",o,t,e,s)}}if("string"==typeof i){let i;if(this.singleCharacters)i=1;else{const t=o===this._boundaryStartParent?this.boundaries.start.offset:0;i=e.offset-t}e.offset-=i;const s=new y(o,e.offset,i);return this._position=e,this._formatReturnValue("text",s,t,e,i)}return e=Be._createBefore(o),this._position=e,this._formatReturnValue("elementStart",o,t,e,1)}_formatReturnValue(e,t,o,i,s){return t instanceof y&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?o=Be._createAfter(t.textNode):(i=Be._createAfter(t.textNode),this._position=i)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?o=Be._createBefore(t.textNode):(i=Be._createBefore(t.textNode),this._position=i))),{done:!1,value:{type:e,item:t,previousPosition:o,nextPosition:i,length:s}}}}class Be extends b{constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof Oe);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=Be._createAt(this),o=t.offset+e;return t.offset=o<0?0:o,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const o=new je(t);return o.skip(e),o.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),o=e.getAncestors();let i=0;for(;t[i]==o[i]&&t[i];)i++;return 0===i?null:t[i-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],o=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),o.push(e.offset);const i=(0,m.Rt)(t,o);switch(i){case"prefix":return"before";case"extension":return"after";default:return t[i]<o[i]?"before":"after"}}getWalker(e={}){return e.startPosition=this,new je(e)}clone(){return new Be(this.parent,this.offset)}static _createAt(e,t){if(e instanceof Be)return new this(e.parent,e.offset);{const o=e;if("end"==t)t=o.is("$text")?o.data.length:o.childCount;else{if("before"==t)return this._createBefore(o);if("after"==t)return this._createAfter(o);if(0!==t&&!t)throw new m.Bb("view-createpositionat-offset-required",o)}return new Be(o,t)}}static _createAfter(e){if(e.is("$textProxy"))return new Be(e.textNode,e.offsetInText+e.data.length);if(!e.parent)throw new m.Bb("view-position-after-root",e,{root:e});return new Be(e.parent,e.index+1)}static _createBefore(e){if(e.is("$textProxy"))return new Be(e.textNode,e.offsetInText);if(!e.parent)throw new m.Bb("view-position-before-root",e,{root:e});return new Be(e.parent,e.index)}}Be.prototype.is=function(e){return"position"===e||"view:position"===e};class De extends b{constructor(e,t=null){super(),this.start=e.clone(),this.end=t?t.clone():e.clone()}*[Symbol.iterator](){yield*new je({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let e=this.start.getLastMatchingPosition(Ve,{direction:"backward"}),t=this.end.getLastMatchingPosition(Ve);return e.parent.is("$text")&&e.isAtStart&&(e=Be._createBefore(e.parent)),t.parent.is("$text")&&t.isAtEnd&&(t=Be._createAfter(t.parent)),new De(e,t)}getTrimmed(){let e=this.start.getLastMatchingPosition(Ve);if(e.isAfter(this.end)||e.isEqual(this.end))return new De(e,e);let t=this.end.getLastMatchingPosition(Ve,{direction:"backward"});const o=e.nodeAfter,i=t.nodeBefore;return o&&o.is("$text")&&(e=new Be(o,0)),i&&i.is("$text")&&(t=new Be(i,i.data.length)),new De(e,t)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const o=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),i=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return o&&i}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new De(this.start,e.start)),this.containsPosition(e.end)&&t.push(new De(e.end,this.end))):t.push(this.clone()),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,o=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(o=e.end),new De(t,o)}return null}getWalker(e={}){return e.boundaries=this,new je(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let e=this.start.nodeAfter,t=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(e=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(t=this.end.parent.previousSibling),e&&e.is("element")&&e===t?e:null}clone(){return new De(this.start,this.end)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new je(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new je(e);yield t.position;for(const e of t)yield e.nextPosition}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}static _createFromParentsAndOffsets(e,t,o,i){return new this(new Be(e,t),new Be(o,i))}static _createFromPositionAndShift(e,t){const o=e,i=e.getShiftedBy(t);return t>0?new this(o,i):new this(i,o)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(Be._createBefore(e),t)}}function Ve(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}De.prototype.is=function(e){return"range"===e||"view:range"===e};class Ie extends((0,m.ln)(b)){constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let o=!1;for(const i of e._ranges)if(t.isEqual(i)){o=!0;break}if(!o)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=(0,m.QX)(this.getRanges());if(t!=(0,m.QX)(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let o=!1;for(let i of e.getRanges())if(i=i.getTrimmed(),t.start.isEqual(i.start)&&t.end.isEqual(i.end)){o=!0;break}if(!o)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...e){let[t,o,i]=e;if("object"==typeof o&&(i=o,o=void 0),null===t)this._setRanges([]),this._setFakeOptions(i);else if(t instanceof Ie||t instanceof Ne)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof De)this._setRanges([t],i&&i.backward),this._setFakeOptions(i);else if(t instanceof Be)this._setRanges([new De(t)]),this._setFakeOptions(i);else if(t instanceof k){const e=!!i&&!!i.backward;let s;if(void 0===o)throw new m.Bb("view-selection-setto-required-second-parameter",this);s="in"==o?De._createIn(t):"on"==o?De._createOn(t):new De(Be._createAt(t,o)),this._setRanges([s],e),this._setFakeOptions(i)}else{if(!(0,m.TW)(t))throw new m.Bb("view-selection-setto-not-selectable",this);this._setRanges(t,i&&i.backward),this._setFakeOptions(i)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new m.Bb("view-selection-setfocus-no-ranges",this);const o=Be._createAt(e,t);if("same"==o.compareWith(this.focus))return;const i=this.anchor;this._ranges.pop(),"before"==o.compareWith(i)?this._addRange(new De(o,i),!0):this._addRange(new De(i,o)),this.fire("change")}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof De))throw new m.Bb("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new m.Bb("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new De(e.start,e.end))}}Ie.prototype.is=function(e){return"selection"===e||"view:selection"===e};class Ne extends((0,m.ln)(b)){constructor(...e){super(),this._selection=new Ie,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,t){this._selection.setFocus(e,t)}}Ne.prototype.is=function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e};class ze extends m.M3{constructor(e,t,o){super(e,t),this.startRange=o,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const Fe=Symbol("bubbling contexts");function Le(e){return class extends e{fire(e,...t){try{const o=e instanceof m.M3?e:new m.M3(this,e),i=qe(this);if(!i.size)return;if(Ze(o,"capturing",this),We(i,"$capture",o,...t))return o.return;const s=o.startRange||this.selection.getFirstRange(),n=s?s.getContainedElement():null,r=!!n&&Boolean($e(i,n));let a=n||function(e){if(!e)return null;const t=e.start.parent,o=e.end.parent,i=t.getPath(),s=o.getPath();return i.length>s.length?t:o}(s);if(Ze(o,"atTarget",a),!r){if(We(i,"$text",o,...t))return o.return;Ze(o,"bubbling",a)}for(;a;){if(a.is("rootElement")){if(We(i,"$root",o,...t))return o.return}else if(a.is("element")&&We(i,a.name,o,...t))return o.return;if(We(i,a,o,...t))return o.return;a=a.parent,Ze(o,"bubbling",a)}return Ze(o,"bubbling",this),We(i,"$document",o,...t),o.return}catch(e){m.Bb.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,o){const i=(0,m.qo)(o.context||"$document"),s=qe(this);for(const n of i){let i=s.get(n);i||(i=new((0,m.ln)()),s.set(n,i)),this.listenTo(i,e,t,o)}}_removeEventListener(e,t){const o=qe(this);for(const i of o.values())this.stopListening(i,e,t)}}}{const e=Le(Object);["fire","_addEventListener","_removeEventListener"].forEach((t=>{Le[t]=e.prototype[t]}))}function Ze(e,t,o){e instanceof ze&&(e._eventPhase=t,e._currentTarget=o)}function We(e,t,o,...i){const s="string"==typeof t?e.get(t):$e(e,t);return!!s&&(s.fire(o,...i),o.stop.called)}function $e(e,t){for(const[o,i]of e)if("function"==typeof o&&o(t))return i;return null}function qe(e){return e[Fe]||(e[Fe]=new Map),e[Fe]}class He extends(Le((0,m.Re)())){constructor(e){super(),this._postFixers=new Set,this.selection=new Ne,this.roots=new m.FE({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.map((e=>e.destroy())),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const o of this._postFixers)if(t=o(e),t)break}while(t)}}class Ue extends Te{constructor(e,t,o,i){super(e,t,o,i),this._priority=10,this._id=null,this._clonesGroup=null,this.getFillerOffset=Ke}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new m.Bb("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e=!1){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function Ke(){if(Ge(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(Ge(e)>1)return null;e=e.parent}return!e||Ge(e)>1?null:this.childCount}function Ge(e){return Array.from(e.getChildren()).filter((e=>!e.is("uiElement"))).length}Ue.DEFAULT_PRIORITY=10,Ue.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Je extends Te{constructor(e,t,o,i){super(e,t,o,i),this.getFillerOffset=Ye}_insertChild(e,t){if(t&&(t instanceof k||Array.from(t).length>0))throw new m.Bb("view-emptyelement-cannot-add",[this,t]);return 0}}function Ye(){return null}Je.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Xe extends Te{constructor(e,t,o,i){super(e,t,o,i),this.getFillerOffset=et}_insertChild(e,t){if(t&&(t instanceof k||Array.from(t).length>0))throw new m.Bb("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function Qe(e){e.document.on("arrowKey",((t,o)=>function(e,t,o){if(t.keyCode==m.Do.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),i=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(i||t.shiftKey){const t=e.focusNode,s=e.focusOffset,n=o.domPositionToView(t,s);if(null===n)return;let r=!1;const a=n.getLastMatchingPosition((e=>(e.item.is("uiElement")&&(r=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement")))));if(r){const t=o.viewPositionToDom(a);i?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,o,e.domConverter)),{priority:"low"})}function et(){return null}Xe.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class tt extends Te{constructor(e,t,o,i){super(e,t,o,i),this.getFillerOffset=ot}_insertChild(e,t){if(t&&(t instanceof k||Array.from(t).length>0))throw new m.Bb("view-rawelement-cannot-add",[this,t]);return 0}render(e,t){}}function ot(){return null}tt.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class it extends((0,m.ln)(b)){constructor(e,t){super(),this._children=[],this._customProperties=new Map,this.document=e,t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}get name(){}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let o=0;const i=function(e,t){if("string"==typeof t)return[new v(e,t)];(0,m.TW)(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new v(e,t):t instanceof y?new v(e,t.data):t))}(this.document,t);for(const t of i)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,o++;return o}_removeChildren(e,t=1){this._fireChange("children",this);for(let o=e;o<e+t;o++)this._children[o].parent=null;return this._children.splice(e,t)}_fireChange(e,t){this.fire("change:"+e,t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}it.prototype.is=function(e){return"documentFragment"===e||"view:documentFragment"===e};class st{constructor(e){this._cloneGroups=new Map,this._slotFactory=null,this.document=e}setSelection(...e){this.document.selection._setTo(...e)}setSelectionFocus(e,t){this.document.selection._setFocus(e,t)}createDocumentFragment(e){return new it(this.document,e)}createText(e){return new v(this.document,e)}createAttributeElement(e,t,o={}){const i=new Ue(this.document,e,t);return"number"==typeof o.priority&&(i._priority=o.priority),o.id&&(i._id=o.id),o.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),i}createContainerElement(e,t,o={},i={}){let s=null;(0,x.Z)(o)?i=o:s=o;const n=new Ce(this.document,e,t,s);return i.renderUnsafeAttributes&&n._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),n}createEditableElement(e,t,o={}){const i=new Oe(this.document,e,t);return o.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),i}createEmptyElement(e,t,o={}){const i=new Je(this.document,e,t);return o.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),i}createUIElement(e,t,o){const i=new Xe(this.document,e,t);return o&&(i.render=o),i}createRawElement(e,t,o,i={}){const s=new tt(this.document,e,t);return o&&(s.render=o),i.renderUnsafeAttributes&&s._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),s}setAttribute(e,t,o){o._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,o){(0,x.Z)(e)&&void 0===o?t._setStyle(e):o._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,o){o._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof Be?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is("containerElement"))throw new m.Bb("view-writer-break-non-container-element",this.document);if(!t.parent)throw new m.Bb("view-writer-break-root",this.document);if(e.isAtStart)return Be._createBefore(t);if(!e.isAtEnd){const o=t._clone(!1);this.insert(Be._createAfter(t),o);const i=new De(e,Be._createAt(t,"end")),s=new Be(o,0);this.move(i,s)}return Be._createAfter(t)}mergeAttributes(e){const t=e.offset,o=e.parent;if(o.is("$text"))return e;if(o.is("attributeElement")&&0===o.childCount){const e=o.parent,t=o.index;return o._remove(),this._removeFromClonedElementsGroup(o),this.mergeAttributes(new Be(e,t))}const i=o.getChild(t-1),s=o.getChild(t);if(!i||!s)return e;if(i.is("$text")&&s.is("$text"))return lt(i,s);if(i.is("attributeElement")&&s.is("attributeElement")&&i.isSimilar(s)){const e=i.childCount;return i._appendChild(s.getChildren()),s._remove(),this._removeFromClonedElementsGroup(s),this.mergeAttributes(new Be(i,e))}return e}mergeContainers(e){const t=e.nodeBefore,o=e.nodeAfter;if(!(t&&o&&t.is("containerElement")&&o.is("containerElement")))throw new m.Bb("view-writer-merge-containers-invalid-position",this.document);const i=t.getChild(t.childCount-1),s=i instanceof v?Be._createAt(i,"end"):Be._createAt(t,"end");return this.move(De._createIn(o),Be._createAt(t,"end")),this.remove(De._createOn(o)),s}insert(e,t){ht(t=(0,m.TW)(t)?[...t]:[t],this.document);const o=t.reduce(((e,t)=>{const o=e[e.length-1],i=!t.is("uiElement");return o&&o.breakAttributes==i?o.nodes.push(t):e.push({breakAttributes:i,nodes:[t]}),e}),[]);let i=null,s=e;for(const{nodes:e,breakAttributes:t}of o){const o=this._insertNodes(s,e,t);i||(i=o.start),s=o.end}return i?new De(i,s):new De(e)}remove(e){const t=e instanceof De?e:De._createOn(e);if(pt(t,this.document),t.isCollapsed)return new it(this.document);const{start:o,end:i}=this._breakAttributesRange(t,!0),s=o.parent,n=i.offset-o.offset,r=s._removeChildren(o.offset,n);for(const e of r)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(o);return t.start=a,t.end=a.clone(),new it(this.document,r)}clear(e,t){pt(e,this.document);const o=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const i of o){const o=i.item;let s;if(o.is("element")&&t.isSimilar(o))s=De._createOn(o);else if(!i.nextPosition.isAfter(e.start)&&o.is("$textProxy")){const e=o.getAncestors().find((e=>e.is("element")&&t.isSimilar(e)));e&&(s=De._createIn(e))}s&&(s.end.isAfter(e.end)&&(s.end=e.end),s.start.isBefore(e.start)&&(s.start=e.start),this.remove(s))}}move(e,t){let o;if(t.isAfter(e.end)){const i=(t=this._breakAttributes(t,!0)).parent,s=i.childCount;e=this._breakAttributesRange(e,!0),o=this.remove(e),t.offset+=i.childCount-s}else o=this.remove(e);return this.insert(t,o)}wrap(e,t){if(!(t instanceof Ue))throw new m.Bb("view-writer-wrap-invalid-attribute",this.document);if(pt(e,this.document),e.isCollapsed){let i=e.start;i.parent.is("element")&&(o=i.parent,!Array.from(o.getChildren()).some((e=>!e.is("uiElement"))))&&(i=i.getLastMatchingPosition((e=>e.item.is("uiElement")))),i=this._wrapPosition(i,t);const s=this.document.selection;return s.isCollapsed&&s.getFirstPosition().isEqual(e.start)&&this.setSelection(i),new De(i)}return this._wrapRange(e,t);var o}unwrap(e,t){if(!(t instanceof Ue))throw new m.Bb("view-writer-unwrap-invalid-attribute",this.document);if(pt(e,this.document),e.isCollapsed)return e;const{start:o,end:i}=this._breakAttributesRange(e,!0),s=o.parent,n=this._unwrapChildren(s,o.offset,i.offset,t),r=this.mergeAttributes(n.start);r.isEqual(n.start)||n.end.offset--;const a=this.mergeAttributes(n.end);return new De(r,a)}rename(e,t){const o=new Ce(this.document,e,t.getAttributes());return this.insert(Be._createAfter(t),o),this.move(De._createIn(t),Be._createAt(o,0)),this.remove(De._createOn(t)),o}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return Be._createAt(e,t)}createPositionAfter(e){return Be._createAfter(e)}createPositionBefore(e){return Be._createBefore(e)}createRange(e,t){return new De(e,t)}createRangeOn(e){return De._createOn(e)}createRangeIn(e){return De._createIn(e)}createSelection(...e){return new Ie(...e)}createSlot(e="children"){if(!this._slotFactory)throw new m.Bb("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,o){let i,s;if(i=o?nt(e):e.parent.is("$text")?e.parent.parent:e.parent,!i)throw new m.Bb("view-writer-invalid-position-container",this.document);s=o?this._breakAttributes(e,!0):e.parent.is("$text")?ct(e):e;const n=i._insertChild(s.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const r=s.getShiftedBy(n),a=this.mergeAttributes(s);a.isEqual(s)||r.offset--;const c=this.mergeAttributes(r);return new De(a,c)}_wrapChildren(e,t,o,i){let s=t;const n=[];for(;s<o;){const t=e.getChild(s),o=t.is("$text"),r=t.is("attributeElement");if(r&&this._wrapAttributeElement(i,t))n.push(new Be(e,s));else if(o||!r||rt(i,t)){const o=i._clone();t._remove(),o._appendChild(t),e._insertChild(s,o),this._addToClonedElementsGroup(o),n.push(new Be(e,s))}else this._wrapChildren(t,0,t.childCount,i);s++}let r=0;for(const e of n){if(e.offset-=r,e.offset==t)continue;this.mergeAttributes(e).isEqual(e)||(r++,o--)}return De._createFromParentsAndOffsets(e,t,e,o)}_unwrapChildren(e,t,o,i){let s=t;const n=[];for(;s<o;){const t=e.getChild(s);if(t.is("attributeElement"))if(t.isSimilar(i)){const i=t.getChildren(),r=t.childCount;t._remove(),e._insertChild(s,i),this._removeFromClonedElementsGroup(t),n.push(new Be(e,s),new Be(e,s+r)),s+=r,o+=r-1}else this._unwrapAttributeElement(i,t)?(n.push(new Be(e,s),new Be(e,s+1)),s++):(this._unwrapChildren(t,0,t.childCount,i),s++);else s++}let r=0;for(const e of n){if(e.offset-=r,e.offset==t||e.offset==o)continue;this.mergeAttributes(e).isEqual(e)||(r++,o--)}return De._createFromParentsAndOffsets(e,t,e,o)}_wrapRange(e,t){const{start:o,end:i}=this._breakAttributesRange(e,!0),s=o.parent,n=this._wrapChildren(s,o.offset,i.offset,t),r=this.mergeAttributes(n.start);r.isEqual(n.start)||n.end.offset--;const a=this.mergeAttributes(n.end);return new De(r,a)}_wrapPosition(e,t){if(t.isSimilar(e.parent))return at(e.clone());e.parent.is("$text")&&(e=ct(e));const o=this.createAttributeElement("_wrapPosition-fake-element");o._priority=Number.POSITIVE_INFINITY,o.isSimilar=()=>!1,e.parent._insertChild(e.offset,o);const i=new De(e,e.getShiftedBy(1));this.wrap(i,t);const s=new Be(o.parent,o.index);o._remove();const n=s.nodeBefore,r=s.nodeAfter;return n instanceof v&&r instanceof v?lt(n,r):at(s)}_wrapAttributeElement(e,t){if(!ft(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const o of e.getAttributeKeys())if("class"!==o&&"style"!==o&&t.hasAttribute(o)&&t.getAttribute(o)!==e.getAttribute(o))return!1;for(const o of e.getStyleNames())if(t.hasStyle(o)&&t.getStyle(o)!==e.getStyle(o))return!1;for(const o of e.getAttributeKeys())"class"!==o&&"style"!==o&&(t.hasAttribute(o)||this.setAttribute(o,e.getAttribute(o),t));for(const o of e.getStyleNames())t.hasStyle(o)||this.setStyle(o,e.getStyle(o),t);for(const o of e.getClassNames())t.hasClass(o)||this.addClass(o,t);return!0}_unwrapAttributeElement(e,t){if(!ft(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const o of e.getAttributeKeys())if("class"!==o&&"style"!==o&&(!t.hasAttribute(o)||t.getAttribute(o)!==e.getAttribute(o)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const o of e.getStyleNames())if(!t.hasStyle(o)||t.getStyle(o)!==e.getStyle(o))return!1;for(const o of e.getAttributeKeys())"class"!==o&&"style"!==o&&this.removeAttribute(o,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const o=e.start,i=e.end;if(pt(e,this.document),e.isCollapsed){const o=this._breakAttributes(e.start,t);return new De(o,o)}const s=this._breakAttributes(i,t),n=s.parent.childCount,r=this._breakAttributes(o,t);return s.offset+=s.parent.childCount-n,new De(r,s)}_breakAttributes(e,t=!1){const o=e.offset,i=e.parent;if(e.parent.is("emptyElement"))throw new m.Bb("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new m.Bb("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new m.Bb("view-writer-cannot-break-raw-element",this.document);if(!t&&i.is("$text")&&ut(i.parent))return e.clone();if(ut(i))return e.clone();if(i.is("$text"))return this._breakAttributes(ct(e),t);if(o==i.childCount){const e=new Be(i.parent,i.index+1);return this._breakAttributes(e,t)}if(0===o){const e=new Be(i.parent,i.index);return this._breakAttributes(e,t)}{const e=i.index+1,s=i._clone();i.parent._insertChild(e,s),this._addToClonedElementsGroup(s);const n=i.childCount-o,r=i._removeChildren(o,n);s._appendChild(r);const a=new Be(i.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let o=this._cloneGroups.get(t);o||(o=new Set,this._cloneGroups.set(t,o)),o.add(e),e._clonesGroup=o}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const o=this._cloneGroups.get(t);o&&o.delete(e)}}function nt(e){let t=e.parent;for(;!ut(t);){if(!t)return;t=t.parent}return t}function rt(e,t){return e.priority<t.priority||!(e.priority>t.priority)&&e.getIdentity()<t.getIdentity()}function at(e){const t=e.nodeBefore;if(t&&t.is("$text"))return new Be(t,t.data.length);const o=e.nodeAfter;return o&&o.is("$text")?new Be(o,0):e}function ct(e){if(e.offset==e.parent.data.length)return new Be(e.parent.parent,e.parent.index+1);if(0===e.offset)return new Be(e.parent.parent,e.parent.index);const t=e.parent.data.slice(e.offset);return e.parent._data=e.parent.data.slice(0,e.offset),e.parent.parent._insertChild(e.parent.index+1,new v(e.root.document,t)),new Be(e.parent.parent,e.parent.index+1)}function lt(e,t){const o=e.data.length;return e._data+=t.data,t._remove(),new Be(e,o)}const dt=[v,Ue,Ce,Je,tt,Xe];function ht(e,t){for(const o of e){if(!dt.some((e=>o instanceof e)))throw new m.Bb("view-writer-insert-invalid-node-type",t);o.is("$text")||ht(o.getChildren(),t)}}function ut(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function pt(e,t){const o=nt(e.start),i=nt(e.end);if(!o||!i||o!==i)throw new m.Bb("view-writer-invalid-range-container",t)}function ft(e,t){return null===e.id&&null===t.id}const gt=e=>e.createTextNode(" "),mt=e=>{const t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText=" ",t},bt=e=>{const t=e.createElement("br");return t.dataset.ckeFiller="true",t},_t=7,wt="â ".repeat(_t);function kt(e){return(0,m.Gs)(e)&&e.data.substr(0,_t)===wt}function vt(e){return e.data.length==_t&&kt(e)}function yt(e){return kt(e)?e.data.slice(_t):e.data}function xt(e,t){if(t.keyCode==m.Do.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,o=e.getRangeAt(0).startOffset;kt(t)&&o<=_t&&e.collapse(t,0)}}}var Pt=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/renderer.css"),Et={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};s()(Pt.Z,Et);Pt.Z.locals;class Tt extends((0,m.Re)()){constructor(e,t){super(),this.domDocuments=new Set,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this._inlineFiller=null,this._fakeSelectionContainer=null,this.domConverter=e,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),m.OB.isBlink&&!m.OB.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this.set("isComposing",!1),this.on("change:isComposing",(()=>{this.isComposing||this.render()}))}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e){throw new m.Bb("view-renderer-unknown-type",this)}this.markedChildren.add(t)}}}render(){if(this.isComposing&&!m.OB.isAndroid)return;let e=null;const t=!(m.OB.isBlink&&!m.OB.isAndroid)||!this.isSelecting;for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=Be._createBefore(e.parent)));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),o=t.parent.ownerDocument;kt(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=At(o,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){if(!this.domConverter.mapViewToDom(e))return;const t=Array.from(this.domConverter.mapViewToDom(e).childNodes),o=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),i=this._diffNodeLists(t,o),s=this._findUpdateActions(i,t,o,Ct);if(-1!==s.indexOf("update")){const i={equal:0,insert:0,delete:0};for(const n of s)if("update"===n){const s=i.equal+i.insert,n=i.equal+i.delete,r=e.getChild(s);!r||r.is("uiElement")||r.is("rawElement")||this._updateElementMappings(r,t[n]),(0,m.Od)(o[s]),i.equal++}else i[n]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?Be._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&(0,m.Gs)(t.parent)&&kt(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!kt(e))throw new m.Bb("view-renderer-filler-was-lost",this);vt(e)?e.remove():e.data=e.data.substr(_t),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,o=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor((e=>e.hasAttribute("contenteditable")));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(o===t.getFillerOffset())return!1;const i=e.nodeBefore,s=e.nodeAfter;return!(i instanceof v||s instanceof v)&&(!m.OB.isAndroid||!i&&!s)}_updateText(e,t){const o=this.domConverter.findCorrespondingDomText(e);let i=this.domConverter.viewToDom(e).data;const s=t.inlineFillerPosition;s&&s.parent==e.parent&&s.offset==e.index&&(i=wt+i),Rt(o,i)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const o=Array.from(t.attributes).map((e=>e.name)),i=e.getAttributeKeys();for(const o of i)this.domConverter.setDomElementAttribute(t,o,e.getAttribute(o),e);for(const i of o)e.hasAttribute(i)||this.domConverter.removeDomElementAttribute(t,i)}_updateChildren(e,t){const o=this.domConverter.mapViewToDom(e);if(!o)return;if(m.OB.isAndroid){let e=null;for(const t of Array.from(o.childNodes)){if(e&&(0,m.Gs)(e)&&(0,m.Gs)(t)){o.normalize();break}e=t}}const i=t.inlineFillerPosition,s=o.childNodes,n=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));i&&i.parent===e&&At(o.ownerDocument,n,i.offset);const r=this._diffNodeLists(s,n),a=this._findUpdateActions(r,s,n,St);let c=0;const l=new Set;for(const e of a)"delete"===e?(l.add(s[c]),(0,m.Od)(s[c])):"equal"!==e&&"update"!==e||c++;c=0;for(const e of a)"insert"===e?((0,m.ZQ)(o,c,n[c]),c++):"update"===e?(Rt(s[c],n[c].data),c++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(n[c])),c++);for(const e of l)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return e=function(e,t){const o=Array.from(e);if(0==o.length||!t)return o;const i=o[o.length-1];i==t&&o.pop();return o}(e,this._fakeSelectionContainer),(0,m.Hg)(e,t,Ot.bind(null,this.domConverter))}_findUpdateActions(e,t,o,i){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let s=[],n=[],r=[];const a={equal:0,insert:0,delete:0};for(const c of e)"insert"===c?r.push(o[a.equal+a.insert]):"delete"===c?n.push(t[a.equal+a.delete]):(s=s.concat((0,m.Hg)(n,r,i).map((e=>"equal"===e?"update":e))),s.push("equal"),n=[],r=[]),a[c]++;return s.concat((0,m.Hg)(n,r,i).map((e=>"equal"===e?"update":e)))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(m.OB.isBlink&&!m.OB.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&m.OB.isAndroid||this._updateDomSelection(e))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const o=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(o,this.selection),!this._fakeSelectionNeedsUpdate(e))return;o.parentElement&&o.parentElement==e||e.appendChild(o),o.textContent=this.selection.fakeSelectionLabel||" ";const i=t.getSelection(),s=t.createRange();i.removeAllRanges(),s.selectNodeContents(o),i.addRange(s)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const o=this.domConverter.viewPositionToDom(this.selection.anchor),i=this.domConverter.viewPositionToDom(this.selection.focus);t.collapse(o.parent,o.offset),t.extend(i.parent,i.offset),m.OB.isGecko&&function(e,t){const o=e.parent;if(o.nodeType!=Node.ELEMENT_NODE||e.offset!=o.childNodes.length-1)return;const i=o.childNodes[e.offset];i&&"BR"==i.tagName&&t.addRange(t.getRangeAt(0))}(i,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,o=e.ownerDocument.getSelection();return!t||t.parentElement!==e||(o.anchorNode!==t&&!t.contains(o.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const o=e.activeElement,i=this.domConverter.mapDomToView(o);o&&i&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function At(e,t,o){const i=t instanceof Array?t:t.childNodes,s=i[o];if((0,m.Gs)(s))return s.data=wt+s.data,s;{const s=e.createTextNode(wt);return Array.isArray(t)?i.splice(o,0,s):(0,m.ZQ)(t,o,s),s}}function Ct(e,t){return(0,m.UG)(e)&&(0,m.UG)(t)&&!(0,m.Gs)(e)&&!(0,m.Gs)(t)&&!(0,m.C3)(e)&&!(0,m.C3)(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function St(e,t){return(0,m.UG)(e)&&(0,m.UG)(t)&&(0,m.Gs)(e)&&(0,m.Gs)(t)}function Ot(e,t,o){return t===o||((0,m.Gs)(t)&&(0,m.Gs)(o)?t.data===o.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(o)))}function Rt(e,t){const o=e.data;if(o==t)return;const i=(0,m.HZ)(o,t);for(const t of i)"insert"===t.type?e.insertData(t.index,t.values.join("")):e.deleteData(t.index,t.howMany)}const Mt=bt(m.global.document),jt=gt(m.global.document),Bt=mt(m.global.document),Dt="data-ck-unsafe-attribute-",Vt="data-ck-unsafe-element";class It{constructor(e,{blockFillerMode:t,renderingMode:o="editing"}={}){this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new P,this._encounteredRawContentDomNodes=new WeakSet,this.document=e,this.renderingMode=o,this.blockFillerMode=t||("editing"===o?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?m.global.document:m.global.document.implementation.createHTMLDocument("")}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new Ie(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.children))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,o){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&(("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===o&&("src"===e||"srcset"===e)||("source"===o&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const o=(new DOMParser).parseFromString(t,"text/html"),i=o.createDocumentFragment(),s=o.body.childNodes;for(;s.length>0;)i.appendChild(s[0]);const n=o.createTreeWalker(i,NodeFilter.SHOW_ELEMENT),r=[];let a;for(;a=n.nextNode();)r.push(a);for(const e of r){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(Ft(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(i)}viewToDom(e,t={}){if(e.is("$text")){const t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{if(this.mapViewToDom(e))return this.mapViewToDom(e);let o;if(e.is("documentFragment"))o=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(o,e);else{if(e.is("uiElement"))return o="$comment"===e.name?this._domDocument.createComment(e.getCustomProperty("$rawContent")):e.render(this._domDocument,this),t.bind&&this.bindElements(o,e),o;this._shouldRenameElement(e.name)?(Ft(e.name),o=this._createReplacementDomElement(e.name)):o=e.hasAttribute("xmlns")?this._domDocument.createElementNS(e.getAttribute("xmlns"),e.name):this._domDocument.createElement(e.name),e.is("rawElement")&&e.render(o,this),t.bind&&this.bindElements(o,e);for(const t of e.getAttributeKeys())this.setDomElementAttribute(o,t,e.getAttribute(t),e)}if(!1!==t.withChildren)for(const i of this.viewChildrenToDom(e,t))o.appendChild(i);return o}}setDomElementAttribute(e,t,o,i){const s=this.shouldRenderAttribute(t,o,e.tagName.toLowerCase())||i&&i.shouldRenderUnsafeAttribute(t);s||(0,m.KE)("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:o}),(0,m.$b)(t)?(e.hasAttribute(t)&&!s?e.removeAttribute(t):e.hasAttribute(Dt+t)&&s&&e.removeAttribute(Dt+t),e.setAttribute(s?t:Dt+t,o)):(0,m.KE)("domconverter-invalid-attribute-detected",{domElement:e,key:t,value:o})}removeDomElementAttribute(e,t){t!=Vt&&(e.removeAttribute(t),e.removeAttribute(Dt+t))}*viewChildrenToDom(e,t={}){const o=e.getFillerOffset&&e.getFillerOffset();let i=0;for(const s of e.getChildren()){o===i&&(yield this._getBlockFiller());const e=s.is("element")&&!!s.getCustomProperty("dataPipeline:transparentRendering")&&!(0,m.Ps)(s.getAttributes());e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(s,t):(e&&(0,m.KE)("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:s}),yield this.viewToDom(s,t)),i++}o===i&&(yield this._getBlockFiller())}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),o=this.viewPositionToDom(e.end),i=this._domDocument.createRange();return i.setStart(t.parent,t.offset),i.setEnd(o.parent,o.offset),i}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const o=this.findCorrespondingDomText(t);if(!o)return null;let i=e.offset;return kt(o)&&(i+=_t),{parent:o,offset:i}}{let o,i,s;if(0===e.offset){if(o=this.mapViewToDom(t),!o)return null;s=o.childNodes[0]}else{const t=e.nodeBefore;if(i=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t),!i)return null;o=i.parentNode,s=i.nextSibling}if((0,m.Gs)(s)&&kt(s))return{parent:s,offset:_t};return{parent:o,offset:i?(0,m.cq)(i)+1:0}}}domToView(e,t={}){if(this.isBlockFiller(e))return null;const o=this.getHostViewElement(e);if(o)return o;if((0,m.C3)(e)&&t.skipComments)return null;if((0,m.Gs)(e)){if(vt(e))return null;{const t=this._processDataFromDomText(e);return""===t?null:new v(this.document,t)}}{if(this.mapDomToView(e))return this.mapDomToView(e);let o;if(this.isDocumentFragment(e))o=new it(this.document),t.bind&&this.bindDocumentFragments(e,o);else{o=this._createViewElement(e,t),t.bind&&this.bindElements(e,o);const i=e.attributes;if(i)for(let e=i.length,t=0;t<e;t++)o._setAttribute(i[t].name,i[t].value);if(this._isViewElementWithRawContent(o,t)||(0,m.C3)(e)){const t=(0,m.C3)(e)?e.data:e.innerHTML;return o._setCustomProperty("$rawContent",t),this._encounteredRawContentDomNodes.add(e),o}}if(!1!==t.withChildren)for(const i of this.domChildrenToView(e,t))o._appendChild(i);return o}}*domChildrenToView(e,t){for(let o=0;o<e.childNodes.length;o++){const i=e.childNodes[o],s=this.domToView(i,t);null!==s&&(yield s)}}domSelectionToView(e){if(1===e.rangeCount){let t=e.getRangeAt(0).startContainer;(0,m.Gs)(t)&&(t=t.parentNode);const o=this.fakeSelectionToView(t);if(o)return o}const t=this.isDomSelectionBackward(e),o=[];for(let t=0;t<e.rangeCount;t++){const i=e.getRangeAt(t),s=this.domRangeToView(i);s&&o.push(s)}return new Ie(o,{backward:t})}domRangeToView(e){const t=this.domPositionToView(e.startContainer,e.startOffset),o=this.domPositionToView(e.endContainer,e.endOffset);return t&&o?new De(t,o):null}domPositionToView(e,t=0){if(this.isBlockFiller(e))return this.domPositionToView(e.parentNode,(0,m.cq)(e));const o=this.mapDomToView(e);if(o&&(o.is("uiElement")||o.is("rawElement")))return Be._createBefore(o);if((0,m.Gs)(e)){if(vt(e))return this.domPositionToView(e.parentNode,(0,m.cq)(e));const o=this.findCorrespondingViewText(e);let i=t;return o?(kt(e)&&(i-=_t,i=i<0?0:i),new Be(o,i)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new Be(t,0)}else{const o=e.childNodes[t-1];if((0,m.Gs)(o)&&vt(o)||o&&this.isBlockFiller(o))return this.domPositionToView(o.parentNode,(0,m.cq)(o));const i=(0,m.Gs)(o)?this.findCorrespondingViewText(o):this.mapDomToView(o);if(i&&i.parent)return new Be(i.parent,i.index+1)}return null}mapDomToView(e){return this.getHostViewElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(vt(e))return null;const t=this.getHostViewElement(e);if(t)return t;const o=e.previousSibling;if(o){if(!this.isElement(o))return null;const e=this.mapDomToView(o);if(e){const t=e.nextSibling;return t instanceof v?t:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof v?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:o}=m.global.window,i=[];Nt(t,(e=>{const{scrollLeft:t,scrollTop:o}=e;i.push([t,o])})),t.focus(),Nt(t,(e=>{const[t,o]=i.shift();e.scrollLeft=t,e.scrollTop=o})),m.global.window.scrollTo(e,o)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(Mt):!("BR"!==e.tagName||!zt(e,this.blockElements)||1!==e.parentNode.childNodes.length)||(e.isEqualNode(Bt)||function(e,t){const o=e.isEqualNode(jt);return o&&zt(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements))}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();try{t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset)}catch(e){return!1}const o=t.collapsed;return t.detach(),o}getHostViewElement(e){const t=(0,m.dk)(e);for(t.pop();t.length;){const e=t.pop(),o=this._domToViewMapping.get(e);if(o&&(o.is("uiElement")||o.is("rawElement")))return o}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return gt(this._domDocument);case"markedNbsp":return mt(this._domDocument);case"br":return bt(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if((0,m.Gs)(e)&&kt(e)&&t<_t)return!1;if(this.isElement(e)&&kt(e.childNodes[t]))return!1;const o=this.mapDomToView(e);return!o||!o.is("uiElement")&&!o.is("rawElement")}_processDataFromViewText(e){let t=e.data;if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return t;if(" "==t.charAt(0)){const o=this._getTouchingInlineViewNode(e,!1);!(o&&o.is("$textProxy")&&this._nodeEndsWithSpace(o))&&o||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const o=this._getTouchingInlineViewNode(e,!0),i=o&&o.is("$textProxy")&&" "==o.data.charAt(0);" "!=t.charAt(t.length-2)&&o&&!i||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(function(e,t){const o=(0,m.dk)(e);return o.some((e=>e.tagName&&t.includes(e.tagName.toLowerCase())))}(e,this.preElements))return yt(e);t=t.replace(/[ \n\t\r]{1,}/g," ");const o=this._getTouchingInlineDomNode(e,!1),i=this._getTouchingInlineDomNode(e,!0),s=this._checkShouldLeftTrimDomText(e,o),n=this._checkShouldRightTrimDomText(e,i);s&&(t=t.replace(/^ /,"")),n&&(t=t.replace(/ $/,"")),t=yt(new Text(t)),t=t.replace(/ \u00A0/g," ");const r=i&&this.isElement(i)&&"BR"!=i.tagName,a=i&&(0,m.Gs)(i)&&" "==i.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(t)||!i||r||a)&&(t=t.replace(/\u00A0$/," ")),(s||o&&this.isElement(o)&&"BR"!=o.tagName)&&(t=t.replace(/^\u00A0/," ")),t}_checkShouldLeftTrimDomText(e,t){return!t||(this.isElement(t)?"BR"===t.tagName:!this._encounteredRawContentDomNodes.has(e.previousSibling)&&/[^\S\u00A0]/.test(t.data.charAt(t.data.length-1)))}_checkShouldRightTrimDomText(e,t){return!t&&!kt(e)}_getTouchingInlineViewNode(e,t){const o=new je({startPosition:t?Be._createAfter(e):Be._createBefore(e),direction:t?"forward":"backward"});for(const e of o){if(e.item.is("element")&&this.inlineObjectElements.includes(e.item.name))return e.item;if(e.item.is("containerElement"))return null;if(e.item.is("element","br"))return null;if(e.item.is("$textProxy"))return e.item}return null}_getTouchingInlineDomNode(e,t){if(!e.parentNode)return null;const o=t?"firstChild":"lastChild",i=t?"nextSibling":"previousSibling";let s=!0,n=e;do{if(!s&&n[o]?n=n[o]:n[i]?(n=n[i],s=!1):(n=n.parentNode,s=!0),!n||this._isBlockElement(n))return null}while(!(0,m.Gs)(n)&&"BR"!=n.tagName&&!this._isInlineObjectElement(n));return n}_isBlockElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isInlineObjectElement(e){return this.isElement(e)&&this.inlineObjectElements.includes(e.tagName.toLowerCase())}_createViewElement(e,t){if((0,m.C3)(e))return new Xe(this.document,"$comment");const o=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new Te(this.document,o)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const o=this._domDocument.createElement("span");if(o.setAttribute(Vt,e),t){for(;t.firstChild;)o.appendChild(t.firstChild);for(const e of t.getAttributeNames())o.setAttribute(e,t.getAttribute(e))}return o}}function Nt(e,t){let o=e;for(;o;)t(o),o=o.parentElement}function zt(e,t){const o=e.parentNode;return!!o&&!!o.tagName&&t.includes(o.tagName.toLowerCase())}function Ft(e){"script"===e&&(0,m.KE)("domconverter-unsafe-script-element-detected"),"style"===e&&(0,m.KE)("domconverter-unsafe-style-element-detected")}class Lt extends((0,m.Xu)()){constructor(e){super(),this._isEnabled=!1,this.view=e,this.document=e.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}var Zt=o("./node_modules/lodash-es/assignIn.js");class Wt{constructor(e,t,o){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,(0,Zt.Z)(this,o)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class $t extends Lt{constructor(){super(...arguments),this.useCapture=!1}observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((t=>{this.listenTo(e,t,((e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)}),{useCapture:this.useCapture})}))}stopObserving(e){this.stopListening(e)}fire(e,t,o){this.isEnabled&&this.document.fire(e,new Wt(this.view,t,o))}}class qt extends $t{constructor(){super(...arguments),this.domEventType=["keydown","keyup"]}onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return(0,m.Cq)(this)}};this.fire(e.type,e,t)}}var Ht=o("./node_modules/lodash-es/debounce.js");class Ut extends Lt{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=(0,Ht.Z)((e=>{this.document.fire("selectionChangeDone",e)}),200)}observe(){const e=this.document;e.on("arrowKey",((t,o)=>{e.selection.isFake&&this.isEnabled&&o.preventDefault()}),{context:"$capture"}),e.on("arrowKey",((t,o)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(o.keyCode)}),{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,o=new Ie(t.getRanges(),{backward:t.isBackward,fake:!1});e!=m.Do.arrowleft&&e!=m.Do.arrowup||o.setTo(o.getFirstPosition()),e!=m.Do.arrowright&&e!=m.Do.arrowdown||o.setTo(o.getLastPosition());const i={oldSelection:t,newSelection:o,domSelection:null};this.document.fire("selectionChange",i),this._fireSelectionChangeDoneDebounced(i)}}const Kt=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const Gt=function(e){return this.__data__.has(e)};function Jt(e){var t=-1,o=null==e?0:e.length;for(this.__data__=new j.Z;++t<o;)this.add(e[t])}Jt.prototype.add=Jt.prototype.push=Kt,Jt.prototype.has=Gt;const Yt=Jt;const Xt=function(e,t){for(var o=-1,i=null==e?0:e.length;++o<i;)if(t(e[o],o,e))return!0;return!1};const Qt=function(e,t){return e.has(t)};const eo=function(e,t,o,i,s,n){var r=1&o,a=e.length,c=t.length;if(a!=c&&!(r&&c>a))return!1;var l=n.get(e),d=n.get(t);if(l&&d)return l==t&&d==e;var h=-1,u=!0,p=2&o?new Yt:void 0;for(n.set(e,t),n.set(t,e);++h<a;){var f=e[h],g=t[h];if(i)var m=r?i(g,f,h,t,e,n):i(f,g,h,e,t,n);if(void 0!==m){if(m)continue;u=!1;break}if(p){if(!Xt(t,(function(e,t){if(!Qt(p,t)&&(f===e||s(f,e,o,i,n)))return p.push(t)}))){u=!1;break}}else if(f!==g&&!s(f,g,o,i,n)){u=!1;break}}return n.delete(e),n.delete(t),u};var to=o("./node_modules/lodash-es/_Symbol.js"),oo=o("./node_modules/lodash-es/_Uint8Array.js");const io=function(e){var t=-1,o=Array(e.size);return e.forEach((function(e,i){o[++t]=[i,e]})),o};const so=function(e){var t=-1,o=Array(e.size);return e.forEach((function(e){o[++t]=e})),o};var no=to.Z?to.Z.prototype:void 0,ro=no?no.valueOf:void 0;const ao=function(e,t,o,i,s,n,r){switch(o){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!n(new oo.Z(e),new oo.Z(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,Y.Z)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=io;case"[object Set]":var c=1&i;if(a||(a=so),e.size!=t.size&&!c)return!1;var l=r.get(e);if(l)return l==t;i|=2,r.set(e,t);var d=eo(a(e),a(t),i,s,n,r);return r.delete(e),d;case"[object Symbol]":if(ro)return ro.call(e)==ro.call(t)}return!1};var co=o("./node_modules/lodash-es/_getAllKeys.js"),lo=Object.prototype.hasOwnProperty;const ho=function(e,t,o,i,s,n){var r=1&o,a=(0,co.Z)(e),c=a.length;if(c!=(0,co.Z)(t).length&&!r)return!1;for(var l=c;l--;){var d=a[l];if(!(r?d in t:lo.call(t,d)))return!1}var h=n.get(e),u=n.get(t);if(h&&u)return h==t&&u==e;var p=!0;n.set(e,t),n.set(t,e);for(var f=r;++l<c;){var g=e[d=a[l]],m=t[d];if(i)var b=r?i(m,g,d,t,e,n):i(g,m,d,e,t,n);if(!(void 0===b?g===m||s(g,m,o,i,n):b)){p=!1;break}f||(f="constructor"==d)}if(p&&!f){var _=e.constructor,w=t.constructor;_==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w||(p=!1)}return n.delete(e),n.delete(t),p};var uo=o("./node_modules/lodash-es/_getTag.js"),po="[object Arguments]",fo="[object Array]",go="[object Object]",mo=Object.prototype.hasOwnProperty;const bo=function(e,t,o,i,s,n){var r=(0,C.Z)(e),a=(0,C.Z)(t),c=r?fo:(0,uo.Z)(e),l=a?fo:(0,uo.Z)(t),d=(c=c==po?go:c)==go,h=(l=l==po?go:l)==go,u=c==l;if(u&&(0,ce.Z)(e)){if(!(0,ce.Z)(t))return!1;r=!0,d=!1}if(u&&!d)return n||(n=new G.Z),r||(0,de.Z)(e)?eo(e,t,o,i,s,n):ao(e,t,c,o,i,s,n);if(!(1&o)){var p=d&&mo.call(e,"__wrapped__"),f=h&&mo.call(t,"__wrapped__");if(p||f){var g=p?e.value():e,m=f?t.value():t;return n||(n=new G.Z),s(g,m,o,i,n)}}return!!u&&(n||(n=new G.Z),ho(e,t,o,i,s,n))};const _o=function e(t,o,i,s,n){return t===o||(null==t||null==o||!(0,re.Z)(t)&&!(0,re.Z)(o)?t!=t&&o!=o:bo(t,o,i,s,e,n))};const wo=function(e,t,o){var i=(o="function"==typeof o?o:void 0)?o(e,t):void 0;return void 0===i?_o(e,t,void 0,o):!!i};class ko extends Lt{constructor(e){super(e),this._config={childList:!0,characterData:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e._renderer,this._domElements=new Set,this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.add(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}stopObserving(e){if(this._domElements.delete(e),this.isEnabled){this._mutationObserver.disconnect();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(0===e.length)return;const t=this.domConverter,o=new Set,i=new Set;for(const o of e){const e=t.mapDomToView(o.target);e&&(e.is("uiElement")||e.is("rawElement")||"childList"!==o.type||this._isBogusBrMutation(o)||i.add(e))}for(const s of e){const e=t.mapDomToView(s.target);if((!e||!e.is("uiElement")&&!e.is("rawElement"))&&"characterData"===s.type){const e=t.findCorrespondingViewText(s.target);e&&!i.has(e.parent)?o.add(e):!e&&kt(s.target)&&i.add(t.mapDomToView(s.target.parentNode))}}let s=!1;for(const e of o)s=!0,this.renderer.markToSync("text",e);for(const e of i){const o=t.mapViewToDom(e),i=Array.from(e.getChildren()),n=Array.from(t.domChildrenToView(o,{withChildren:!1}));wo(i,n,vo)||(s=!0,this.renderer.markToSync("children",e))}s&&this.view.forceRender()}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is("element","br")}}function vo(e,t){if(!Array.isArray(e))return e===t||!(!e.is("$text")||!t.is("$text"))&&e.data===t.data}class yo extends $t{constructor(e){super(e),this._isFocusChanging=!1,this.domEventType=["focus","blur"],this.useCapture=!0;const t=this.document;t.on("focus",(()=>{this._isFocusChanging=!0,this._renderTimeoutId=setTimeout((()=>{this.flush(),e.change((()=>{}))}),50)})),t.on("blur",((o,i)=>{const s=t.selection.editableElement;null!==s&&s!==i.target||(t.isFocused=!1,this._isFocusChanging=!1,e.change((()=>{})))}))}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class xo extends Lt{constructor(e){super(e),this.mutationObserver=e.getObserver(ko),this.focusObserver=e.getObserver(yo),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=(0,Ht.Z)((e=>{this.document.fire("selectionChangeDone",e)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=(0,Ht.Z)((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,o=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(e,"keydown",o,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",o,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",o,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",((e,o)=>{this.document.isComposing&&!m.OB.isAndroid||(this._handleSelectionChange(o,t),this._documentIsSelectingInactivityTimeoutDebounced())})),this._documents.add(t))}stopObserving(e){this.stopListening(e)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(e,t){if(!this.isEnabled)return;const o=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(o.anchorNode))return;this.mutationObserver.flush();const i=this.domConverter.domSelectionToView(o);if(0!=i.rangeCount){if(this.view.hasDomSelection=!0,!this.selection.isEqual(i)||!this.domConverter.isDomSelectionCorrect(o))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.focusObserver.flush(),this.selection.isSimilar(i))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:i,domSelection:o};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class Po extends $t{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",(()=>{t.isComposing=!0}),{priority:"low"}),t.on("compositionend",(()=>{t.isComposing=!1}),{priority:"low"})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}class Eo{constructor(e,t={}){this._files=t.cacheFiles?To(e):null,this._native=e}get files(){return this._files||(this._files=To(this._native)),this._files}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}setDragImage(e,t,o){this._native.setDragImage(e,t,o)}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}function To(e){const t=Array.from(e.files||[]),o=Array.from(e.items||[]);return t.length?t:o.filter((e=>"file"===e.kind)).map((e=>e.getAsFile()))}class Ao extends $t{constructor(){super(...arguments),this.domEventType="beforeinput"}onDomEvent(e){const t=e.getTargetRanges(),o=this.view,i=o.document;let s=null,n=null,r=[];if(e.dataTransfer&&(s=new Eo(e.dataTransfer)),null!==e.data?n=e.data:s&&(n=s.getData("text/plain")),i.selection.isFake)r=Array.from(i.selection.getRanges());else if(t.length)r=t.map((e=>o.domConverter.domRangeToView(e)));else if(m.OB.isAndroid){const t=e.target.ownerDocument.defaultView.getSelection();r=Array.from(o.domConverter.domSelectionToView(t).getRanges())}if(m.OB.isAndroid&&"insertCompositionText"==e.inputType&&n&&n.endsWith("\n"))this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[o.createRange(r[0].end)]});else if("insertText"==e.inputType&&n&&n.includes("\n")){const t=n.split(/\n{1,2}/g);let o=r;for(let n=0;n<t.length;n++){const r=t[n];""!=r&&(this.fire(e.type,e,{data:r,dataTransfer:s,targetRanges:o,inputType:e.inputType,isComposing:e.isComposing}),o=[i.selection.getFirstRange()]),n+1<t.length&&(this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:o}),o=[i.selection.getFirstRange()])}}else this.fire(e.type,e,{data:n,dataTransfer:s,targetRanges:r,inputType:e.inputType,isComposing:e.isComposing})}}class Co extends Lt{constructor(e){super(e),this.document.on("keydown",((e,t)=>{if(this.isEnabled&&(0,m.dj)(t.keyCode)){const o=new ze(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(o,t),o.stop.called&&e.stop()}}))}observe(){}stopObserving(){}}class So extends Lt{constructor(e){super(e);const t=this.document;t.on("keydown",((e,o)=>{if(!this.isEnabled||o.keyCode!=m.Do.tab||o.ctrlKey)return;const i=new ze(t,"tab",t.selection.getFirstRange());t.fire(i,o),i.stop.called&&e.stop()}))}observe(){}stopObserving(){}}class Oo extends((0,m.Re)()){constructor(e){super(),this.domRoots=new Map,this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this.document=new He(e),this.domConverter=new It(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new Tt(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new st(this.document),this.addObserver(ko),this.addObserver(yo),this.addObserver(xo),this.addObserver(qt),this.addObserver(Ut),this.addObserver(Po),this.addObserver(Co),this.addObserver(Ao),this.addObserver(So),this.document.on("arrowKey",xt,{priority:"low"}),Qe(this),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0}))}attachDomRoot(e,t="main"){const o=this.document.getRoot(t);o._name=e.tagName.toLowerCase();const i={};for(const{name:t,value:s}of Array.from(e.attributes))i[t]=s,"class"===t?this._writer.addClass(s.split(" "),o):this._writer.setAttribute(t,s,o);this._initialDomRootAttributes.set(e,i);const s=()=>{this._writer.setAttribute("contenteditable",(!o.isReadOnly).toString(),o),o.isReadOnly?this._writer.addClass("ck-read-only",o):this._writer.removeClass("ck-read-only",o)};s(),this.domRoots.set(t,e),this.domConverter.bindElements(e,o),this._renderer.markToSync("children",o),this._renderer.markToSync("attributes",o),this._renderer.domDocuments.add(e.ownerDocument),o.on("change:children",((e,t)=>this._renderer.markToSync("children",t))),o.on("change:attributes",((e,t)=>this._renderer.markToSync("attributes",t))),o.on("change:text",((e,t)=>this._renderer.markToSync("text",t))),o.on("change:isReadOnly",(()=>this.change(s))),o.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const o of this._observers.values())o.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach((({name:e})=>t.removeAttribute(e)));const o=this._initialDomRootAttributes.get(t);for(const e in o)t.setAttribute(e,o[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t);for(const e of this._observers.values())e.stopObserving(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,o]of this.domRoots)t.observe(o,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection({alignToTop:e,forceScroll:t,viewportOffset:o=20,ancestorOffset:i=20}={}){const s=this.document.selection.getFirstRange();s&&(0,m.mR)({target:this.domConverter.viewRangeToDom(s),viewportOffset:o,ancestorOffset:i,alignToTop:e,forceScroll:t})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new m.Bb("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){m.Bb.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(yo).flush(),this.change((()=>{}))}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return Be._createAt(e,t)}createPositionAfter(e){return Be._createAfter(e)}createPositionBefore(e){return Be._createBefore(e)}createRange(e,t){return new De(e,t)}createRangeOn(e){return De._createOn(e)}createRangeIn(e){return De._createIn(e)}createSelection(...e){return new Ie(...e)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class Ro{is(){throw new Error("is() method is abstract")}}class Mo extends Ro{constructor(e){super(),this.parent=null,this._attrs=(0,m.qL)(e)}get document(){return null}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new m.Bb("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new m.Bb("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return null!==this.parent&&this.root.isAttached()}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}getCommonAncestor(e,t={}){const o=this.getAncestors(t),i=e.getAncestors(t);let s=0;for(;o[s]==i[s]&&o[s];)s++;return 0===s?null:o[s-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),o=e.getPath(),i=(0,m.Rt)(t,o);switch(i){case"prefix":return!0;case"extension":return!1;default:return t[i]<o[i]}}isAfter(e){return this!=e&&(this.root===e.root&&!this.isBefore(e))}hasAttribute(e){return this._attrs.has(e)}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const e={};return this._attrs.size&&(e.attributes=Array.from(this._attrs).reduce(((e,t)=>(e[t[0]]=t[1],e)),{})),e}_clone(e){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=(0,m.qL)(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}Mo.prototype.is=function(e){return"node"===e||"model:node"===e};class jo{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((e,t)=>e+t.offsetSize),0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce(((e,t)=>e+t.offsetSize),0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new m.Bb("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const o of this._nodes){if(e>=t&&e<t+o.offsetSize)return this.getNodeIndex(o);t+=o.offsetSize}if(t!=e)throw new m.Bb("model-nodelist-offset-out-of-bounds",this,{offset:e,nodeList:this});return this.length}_insertNodes(e,t){for(const e of t)if(!(e instanceof Mo))throw new m.Bb("model-nodelist-insertnodes-not-node",this);this._nodes=(0,m.x)(this._nodes,Array.from(t),e,0)}_removeNodes(e,t=1){return this._nodes.splice(e,t)}toJSON(){return this._nodes.map((e=>e.toJSON()))}}class Bo extends Mo{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new Bo(this.data,this.getAttributes())}static fromJSON(e){return new Bo(e.data,e.attributes)}}Bo.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e};class Do extends Ro{constructor(e,t,o){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new m.Bb("model-textproxy-wrong-offsetintext",this);if(o<0||t+o>e.offsetSize)throw new m.Bb("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+o),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}Do.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e};class Vo extends Mo{constructor(e,t,o){super(t),this._children=new jo,this.name=e,o&&this._insertChild(0,o)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const o of e)t=t.getChild(t.offsetToIndex(o));return t}findAncestor(e,t={}){let o=t.includeSelf?this:this.parent;for(;o;){if(o.name===e)return o;o=o.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map((e=>e._clone(!0))):void 0;return new Vo(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const o=function(e){if("string"==typeof e)return[new Bo(e)];(0,m.TW)(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Bo(e):e instanceof Do?new Bo(e.data,e.getAttributes()):e))}(t);for(const e of o)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,o)}_removeChildren(e,t=1){const o=this._children._removeNodes(e,t);for(const e of o)e.parent=null;return o}static fromJSON(e){let t;if(e.children){t=[];for(const o of e.children)o.name?t.push(Vo.fromJSON(o)):t.push(Bo.fromJSON(o))}return new Vo(e.name,e.attributes,t)}}Vo.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e};class Io{constructor(e){if(!e||!e.boundaries&&!e.startPosition)throw new m.Bb("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new m.Bb("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this._position=e.startPosition.clone():this._position=zo._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,o,i,s;do{i=this.position,s=this._visitedParent,({done:t,value:o}=this.next())}while(!t&&e(o));t||(this._position=i,this._visitedParent=s)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),o=this._visitedParent;if(null===o.parent&&t.offset===o.maxOffset)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const i=Fo(t,o),s=i||Lo(t,o,i);if(s instanceof Vo)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=s),this._position=t,No("elementStart",s,e,t,1);if(s instanceof Bo){let i;if(this.singleCharacters)i=1;else{let e=s.endOffset;this._boundaryEndParent==o&&this.boundaries.end.offset<e&&(e=this.boundaries.end.offset),i=e-t.offset}const n=t.offset-s.startOffset,r=new Do(s,n,i);return t.offset+=i,this._position=t,No("text",r,e,t,i)}return t.path.pop(),t.offset++,this._position=t,this._visitedParent=o.parent,this.ignoreElementEnd?this._next():No("elementEnd",o,e,t)}_previous(){const e=this.position,t=this.position.clone(),o=this._visitedParent;if(null===o.parent&&0===t.offset)return{done:!0,value:void 0};if(o==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0,value:void 0};const i=t.parent,s=Fo(t,i),n=s||Zo(t,i,s);if(n instanceof Vo)return t.offset--,this.shallow?(this._position=t,No("elementStart",n,e,t,1)):(t.path.push(n.maxOffset),this._position=t,this._visitedParent=n,this.ignoreElementEnd?this._previous():No("elementEnd",n,e,t));if(n instanceof Bo){let i;if(this.singleCharacters)i=1;else{let e=n.startOffset;this._boundaryStartParent==o&&this.boundaries.start.offset>e&&(e=this.boundaries.start.offset),i=t.offset-e}const s=t.offset-n.startOffset,r=new Do(n,s-i,i);return t.offset-=i,this._position=t,No("text",r,e,t,i)}return t.path.pop(),this._position=t,this._visitedParent=o.parent,No("elementStart",o,e,t,1)}}function No(e,t,o,i,s){return{done:!1,value:{type:e,item:t,previousPosition:o,nextPosition:i,length:s}}}class zo extends Ro{constructor(e,t,o="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new m.Bb("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new m.Bb("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=o}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t<this.path.length-1;t++)if(e=e.getChild(e.offsetToIndex(this.path[t])),!e)throw new m.Bb("model-position-path-incorrect",this,{position:this});if(e.is("$text"))throw new m.Bb("model-position-path-incorrect",this,{position:this});return e}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){return Fo(this,this.parent)}get nodeAfter(){const e=this.parent;return Lo(this,e,Fo(this,e))}get nodeBefore(){const e=this.parent;return Zo(this,e,Fo(this,e))}get isAtStart(){return 0===this.offset}get isAtEnd(){return this.offset==this.parent.maxOffset}compareWith(e){if(this.root!=e.root)return"different";const t=(0,m.Rt)(this.path,e.path);switch(t){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[t]<e.path[t]?"before":"after"}}getLastMatchingPosition(e,t={}){t.startPosition=this;const o=new Io(t);return o.skip(e),o.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){const e=this.parent;return e.is("documentFragment")?[e]:e.getAncestors({includeSelf:!0})}findAncestor(e){const t=this.parent;return t.is("element")?t.findAncestor(e,{includeSelf:!0}):null}getCommonPath(e){if(this.root!=e.root)return[];const t=(0,m.Rt)(this.path,e.path),o="string"==typeof t?Math.min(this.path.length,e.path.length):t;return this.path.slice(0,o)}getCommonAncestor(e){const t=this.getAncestors(),o=e.getAncestors();let i=0;for(;t[i]==o[i]&&t[i];)i++;return 0===i?null:t[i-1]}getShiftedBy(e){const t=this.clone(),o=t.offset+e;return t.offset=o<0?0:o,t}isAfter(e){return"after"==this.compareWith(e)}isBefore(e){return"before"==this.compareWith(e)}isEqual(e){return"same"==this.compareWith(e)}isTouching(e){if(this.root!==e.root)return!1;const t=Math.min(this.path.length,e.path.length);for(let o=0;o<t;o++){const t=this.path[o]-e.path[o];if(t<-1||t>1)return!1;if(1===t)return Wo(e,this,o);if(-1===t)return Wo(this,e,o)}return this.path.length===e.path.length||(this.path.length>e.path.length?$o(this.path,t):$o(e.path,t))}hasSameParentAs(e){if(this.root!==e.root)return!1;const t=this.getParentPath(),o=e.getParentPath();return"same"==(0,m.Rt)(t,o)}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=zo._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let o;return t.containsPosition(this)||t.start.isEqual(this)?(o=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(o=o._getTransformedByDeletion(e.deletionPosition,1))):o=this.isEqual(e.deletionPosition)?zo._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),o}_getTransformedByDeletion(e,t){const o=zo._createAt(this);if(this.root!=e.root)return o;if("same"==(0,m.Rt)(e.getParentPath(),this.getParentPath())){if(e.offset<this.offset){if(e.offset+t>this.offset)return null;o.offset-=t}}else if("prefix"==(0,m.Rt)(e.getParentPath(),this.getParentPath())){const i=e.path.length-1;if(e.offset<=this.path[i]){if(e.offset+t>this.path[i])return null;o.path[i]-=t}}return o}_getTransformedByInsertion(e,t){const o=zo._createAt(this);if(this.root!=e.root)return o;if("same"==(0,m.Rt)(e.getParentPath(),this.getParentPath()))(e.offset<this.offset||e.offset==this.offset&&"toPrevious"!=this.stickiness)&&(o.offset+=t);else if("prefix"==(0,m.Rt)(e.getParentPath(),this.getParentPath())){const i=e.path.length-1;e.offset<=this.path[i]&&(o.path[i]+=t)}return o}_getTransformedByMove(e,t,o){if(t=t._getTransformedByDeletion(e,o),e.isEqual(t))return zo._createAt(this);const i=this._getTransformedByDeletion(e,o);return null===i||e.isEqual(this)&&"toNext"==this.stickiness||e.getShiftedBy(o).isEqual(this)&&"toPrevious"==this.stickiness?this._getCombined(e,t):i._getTransformedByInsertion(t,o)}_getCombined(e,t){const o=e.path.length-1,i=zo._createAt(t);return i.stickiness=this.stickiness,i.offset=i.offset+this.path[o]-e.offset,i.path=[...i.path,...this.path.slice(o+1)],i}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(e,t,o="toNone"){if(e instanceof zo)return new zo(e.root,e.path,e.stickiness);{const i=e;if("end"==t)t=i.maxOffset;else{if("before"==t)return this._createBefore(i,o);if("after"==t)return this._createAfter(i,o);if(0!==t&&!t)throw new m.Bb("model-createpositionat-offset-required",[this,e])}if(!i.is("element")&&!i.is("documentFragment"))throw new m.Bb("model-position-parent-incorrect",[this,e]);const s=i.getPath();return s.push(t),new this(i.root,s,o)}}static _createAfter(e,t){if(!e.parent)throw new m.Bb("model-position-after-root",[this,e],{root:e});return this._createAt(e.parent,e.endOffset,t)}static _createBefore(e,t){if(!e.parent)throw new m.Bb("model-position-before-root",e,{root:e});return this._createAt(e.parent,e.startOffset,t)}static fromJSON(e,t){if("$graveyard"===e.root){const o=new zo(t.graveyard,e.path);return o.stickiness=e.stickiness,o}if(!t.getRoot(e.root))throw new m.Bb("model-position-fromjson-no-root",t,{rootName:e.root});return new zo(t.getRoot(e.root),e.path,e.stickiness)}}function Fo(e,t){const o=t.getChild(t.offsetToIndex(e.offset));return o&&o.is("$text")&&o.startOffset<e.offset?o:null}function Lo(e,t,o){return null!==o?null:t.getChild(t.offsetToIndex(e.offset))}function Zo(e,t,o){return null!==o?null:t.getChild(t.offsetToIndex(e.offset)-1)}function Wo(e,t,o){return o+1!==e.path.length&&(!!$o(t.path,o+1)&&!!function(e,t){let o=e.parent,i=e.path.length-1,s=0;for(;i>=t;){if(e.path[i]+s!==o.maxOffset)return!1;s=1,i--,o=o.parent}return!0}(e,o+1))}function $o(e,t){for(;t<e.length;){if(0!==e[t])return!1;t++}return!0}zo.prototype.is=function(e){return"position"===e||"model:position"===e};class qo extends Ro{constructor(e,t){super(),this.start=zo._createAt(e),this.end=t?zo._createAt(t):zo._createAt(e),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new Io({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){const e=this.start.getParentPath(),t=this.end.getParentPath();return"same"==(0,m.Rt)(e,t)}get root(){return this.start.root}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const o=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),i=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return o&&i}containsItem(e){const t=zo._createBefore(e);return this.containsPosition(t)||this.start.isEqual(t)}isEqual(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new qo(this.start,e.start)),this.containsPosition(e.end)&&t.push(new qo(e.end,this.end))):t.push(new qo(this.start,this.end)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,o=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(o=e.end),new qo(t,o)}return null}getJoined(e,t=!1){let o=this.isIntersecting(e);if(o||(o=this.start.isBefore(e.start)?t?this.end.isTouching(e.start):this.end.isEqual(e.start):t?e.end.isTouching(this.start):e.end.isEqual(this.start)),!o)return null;let i=this.start,s=this.end;return e.start.isBefore(i)&&(i=e.start),e.end.isAfter(s)&&(s=e.end),new qo(i,s)}getMinimalFlatRanges(){const e=[],t=this.start.getCommonPath(this.end).length,o=zo._createAt(this.start);let i=o.parent;for(;o.path.length>t+1;){const t=i.maxOffset-o.offset;0!==t&&e.push(new qo(o,o.getShiftedBy(t))),o.path=o.path.slice(0,-1),o.offset++,i=i.parent}for(;o.path.length<=this.end.path.length;){const t=this.end.path[o.path.length-1],i=t-o.offset;0!==i&&e.push(new qo(o,o.getShiftedBy(i))),o.offset=t,o.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new Io(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new Io(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new Io(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new qo(this.start,this.end)]}getTransformedByOperations(e){const t=[new qo(this.start,this.end)];for(const o of e)for(let e=0;e<t.length;e++){const i=t[e].getTransformedByOperation(o);t.splice(e,1,...i),e+=i.length-1}for(let e=0;e<t.length;e++){const o=t[e];for(let i=e+1;i<t.length;i++){const e=t[i];(o.containsRange(e)||e.containsRange(o)||o.isEqual(e))&&t.splice(i,1)}}return t}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;const e=this.start.nodeAfter,t=this.end.nodeBefore;return e&&e.is("element")&&e===t?e:null}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(e,t=!1){return this._getTransformedByInsertion(e.position,e.howMany,t)}_getTransformedByMoveOperation(e,t=!1){const o=e.sourcePosition,i=e.howMany,s=e.targetPosition;return this._getTransformedByMove(o,s,i,t)}_getTransformedBySplitOperation(e){const t=this.start._getTransformedBySplitOperation(e);let o=this.end._getTransformedBySplitOperation(e);return this.end.isEqual(e.insertionPosition)&&(o=this.end.getShiftedBy(1)),t.root!=o.root&&(o=this.end.getShiftedBy(-1)),new qo(t,o)}_getTransformedByMergeOperation(e){if(this.start.isEqual(e.targetPosition)&&this.end.isEqual(e.deletionPosition))return new qo(this.start);let t=this.start._getTransformedByMergeOperation(e),o=this.end._getTransformedByMergeOperation(e);return t.root!=o.root&&(o=this.end.getShiftedBy(-1)),t.isAfter(o)?(e.sourcePosition.isBefore(e.targetPosition)?(t=zo._createAt(o),t.offset=0):(e.deletionPosition.isEqual(t)||(o=e.deletionPosition),t=e.targetPosition),new qo(t,o)):new qo(t,o)}_getTransformedByInsertion(e,t,o=!1){if(o&&this.containsPosition(e))return[new qo(this.start,e),new qo(e.getShiftedBy(t),this.end._getTransformedByInsertion(e,t))];{const o=new qo(this.start,this.end);return o.start=o.start._getTransformedByInsertion(e,t),o.end=o.end._getTransformedByInsertion(e,t),[o]}}_getTransformedByMove(e,t,o,i=!1){if(this.isCollapsed){const i=this.start._getTransformedByMove(e,t,o);return[new qo(i)]}const s=qo._createFromPositionAndShift(e,o),n=t._getTransformedByDeletion(e,o);if(this.containsPosition(t)&&!i&&(s.containsPosition(this.start)||s.containsPosition(this.end))){const i=this.start._getTransformedByMove(e,t,o),s=this.end._getTransformedByMove(e,t,o);return[new qo(i,s)]}let r;const a=this.getDifference(s);let c=null;const l=this.getIntersection(s);if(1==a.length?c=new qo(a[0].start._getTransformedByDeletion(e,o),a[0].end._getTransformedByDeletion(e,o)):2==a.length&&(c=new qo(this.start,this.end._getTransformedByDeletion(e,o))),r=c?c._getTransformedByInsertion(n,o,null!==l||i):[],l){const e=new qo(l.start._getCombined(s.start,n),l.end._getCombined(s.start,n));2==r.length?r.splice(1,0,e):r.push(e)}return r}_getTransformedByDeletion(e,t){let o=this.start._getTransformedByDeletion(e,t),i=this.end._getTransformedByDeletion(e,t);return null==o&&null==i?null:(null==o&&(o=e),null==i&&(i=e),new qo(o,i))}static _createFromPositionAndShift(e,t){const o=e,i=e.getShiftedBy(t);return t>0?new this(o,i):new this(i,o)}static _createIn(e){return new this(zo._createAt(e,0),zo._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(zo._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new m.Bb("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort(((e,t)=>e.start.isAfter(t.start)?1:-1));const o=e.indexOf(t),i=new this(t.start,t.end);if(o>0)for(let t=o-1;e[t].end.isEqual(i.start);t++)i.start=zo._createAt(e[t].start);for(let t=o+1;t<e.length&&e[t].start.isEqual(i.end);t++)i.end=zo._createAt(e[t].end);return i}static fromJSON(e,t){return new this(zo.fromJSON(e.start,t),zo.fromJSON(e.end,t))}}qo.prototype.is=function(e){return"range"===e||"model:range"===e};class Ho extends((0,m.ln)()){constructor(){super(),this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._deferredBindingRemovals=new Map,this._unboundMarkerNames=new Set,this.on("modelToViewPosition",((e,t)=>{if(t.viewPosition)return;const o=this._modelToViewMapping.get(t.modelPosition.parent);if(!o)throw new m.Bb("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(o,t.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((e,t)=>{if(t.modelPosition)return;const o=this.findMappedViewAncestor(t.viewPosition),i=this._viewToModelMapping.get(o),s=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,o);t.modelPosition=zo._createAt(i,s)}),{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const o=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(o)==e&&this._modelToViewMapping.delete(o))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const o=this._markerNameToElements.get(t)||new Set;o.add(e);const i=this._elementToMarkerNames.get(e)||new Set;i.add(t),this._markerNameToElements.set(t,o),this._elementToMarkerNames.set(e,i)}unbindElementFromMarkerName(e,t){const o=this._markerNameToElements.get(t);o&&(o.delete(e),0==o.size&&this._markerNameToElements.delete(t));const i=this._elementToMarkerNames.get(e);i&&(i.delete(t),0==i.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new qo(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new De(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={}){const o={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",o),o.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const o=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())o.add(t);else o.add(e);return o}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,o){if(o!=e){return this._toModelOffset(e.parent,e.index,o)+this._toModelOffset(e,t,e)}if(e.is("$text"))return t;let i=0;for(let o=0;o<t;o++)i+=this.getModelLength(e.getChild(o));return i}getModelLength(e){if(this._viewToModelLengthCallbacks.get(e.name)){return this._viewToModelLengthCallbacks.get(e.name)(e)}if(this._viewToModelMapping.has(e))return 1;if(e.is("$text"))return e.data.length;if(e.is("uiElement"))return 0;{let t=0;for(const o of e.getChildren())t+=this.getModelLength(o);return t}}findPositionIn(e,t){let o,i=0,s=0,n=0;if(e.is("$text"))return new Be(e,t);for(;s<t;)o=e.getChild(n),i=this.getModelLength(o),s+=i,n++;return s==t?this._moveViewPositionToTextNode(new Be(e,n)):this.findPositionIn(o,t-(s-i))}_moveViewPositionToTextNode(e){const t=e.nodeBefore,o=e.nodeAfter;return t instanceof v?new Be(t,t.data.length):o instanceof v?new Be(o,0):e}}class Uo{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(e,t){t=Ko(t),e instanceof Do&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(t,!0)}consume(e,t){return t=Ko(t),e instanceof Do&&(e=this._getSymbolForTextProxy(e)),!!this.test(e,t)&&(this._consumable.get(e).set(t,!1),!0)}test(e,t){t=Ko(t),e instanceof Do&&(e=this._getSymbolForTextProxy(e));const o=this._consumable.get(e);if(void 0===o)return null;const i=o.get(t);return void 0===i?null:i}revert(e,t){t=Ko(t),e instanceof Do&&(e=this._getSymbolForTextProxy(e));const o=this.test(e,t);return!1===o?(this._consumable.get(e).set(t,!0),!0):!0!==o&&null}verifyAllConsumed(e){const t=[];for(const[o,i]of this._consumable)for(const[s,n]of i){const i=s.split(":")[0];n&&e==i&&t.push({event:s,item:o.name||o.description})}if(t.length)throw new m.Bb("conversion-model-consumable-not-consumed",null,{items:t})}_getSymbolForTextProxy(e){let t=null;const o=this._textProxyRegistry.get(e.startOffset);if(o){const i=o.get(e.endOffset);i&&(t=i.get(e.parent))}return t||(t=this._addSymbolForTextProxy(e)),t}_addSymbolForTextProxy(e){const t=e.startOffset,o=e.endOffset,i=e.parent,s=Symbol("$textProxy:"+e.data);let n,r;return n=this._textProxyRegistry.get(t),n||(n=new Map,this._textProxyRegistry.set(t,n)),r=n.get(o),r||(r=new Map,n.set(o,r)),r.set(i,s),s}}function Ko(e){const t=e.split(":");return"insert"==t[0]?t[0]:"addMarker"==t[0]||"removeMarker"==t[0]?e:t.length>1?t[0]+":"+t[1]:t[0]}var Go=Object.defineProperty,Jo=Object.defineProperties,Yo=Object.getOwnPropertyDescriptors,Xo=Object.getOwnPropertySymbols,Qo=Object.prototype.hasOwnProperty,ei=Object.prototype.propertyIsEnumerable,ti=(e,t,o)=>t in e?Go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,oi=(e,t)=>{for(var o in t||(t={}))Qo.call(t,o)&&ti(e,o,t[o]);if(Xo)for(var o of Xo(t))ei.call(t,o)&&ti(e,o,t[o]);return e},ii=(e,t)=>Jo(e,Yo(t));class si extends((0,m.ln)()){constructor(e){super(),this._conversionApi=oi({dispatcher:this},e),this._firedEventsMap=new WeakMap}convertChanges(e,t,o){const i=this._createConversionApi(o,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,i);const s=this._reduceChanges(e.getChanges());for(const e of s)"insert"===e.type?this._convertInsert(qo._createFromPositionAndShift(e.position,e.length),i):"reinsert"===e.type?this._convertReinsert(qo._createFromPositionAndShift(e.position,e.length),i):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,i):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,i);for(const e of i.mapper.flushUnboundMarkerNames()){const o=t.get(e).getRange();this._convertMarkerRemove(e,o,i),this._convertMarkerAdd(e,o,i)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,i);i.mapper.flushDeferredBindings(),i.consumable.verifyAllConsumed("insert")}convert(e,t,o,i={}){const s=this._createConversionApi(o,void 0,i);this._convertInsert(e,s);for(const[e,o]of t)this._convertMarkerAdd(e,o,s);s.consumable.verifyAllConsumed("insert")}convertSelection(e,t,o){const i=Array.from(t.getMarkersAtPosition(e.getFirstPosition())),s=this._createConversionApi(o);if(this._addConsumablesForSelection(s.consumable,e,i),this.fire("selection",{selection:e},s),e.isCollapsed){for(const t of i){const o=t.getRange();if(!ni(e.getFirstPosition(),t,s.mapper))continue;const i={item:e,markerName:t.name,markerRange:o};s.consumable.test(e,"addMarker:"+t.name)&&this.fire(`addMarker:${t.name}`,i,s)}for(const t of e.getAttributeKeys()){const o={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};s.consumable.test(e,"attribute:"+o.attributeKey)&&this.fire(`attribute:${o.attributeKey}:$text`,o,s)}}}_convertInsert(e,t,o={}){o.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,Array.from(e));for(const o of Array.from(e.getWalker({shallow:!0})).map(ri))this._testAndFire("insert",o,t)}_convertRemove(e,t,o,i){this.fire(`remove:${o}`,{position:e,length:t},i)}_convertAttribute(e,t,o,i,s){this._addConsumablesForRange(s.consumable,e,`attribute:${t}`);for(const n of e){const e={item:n.item,range:qo._createFromPositionAndShift(n.previousPosition,n.length),attributeKey:t,attributeOldValue:o,attributeNewValue:i};this._testAndFire(`attribute:${t}`,e,s)}}_convertReinsert(e,t){const o=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,o);for(const e of o.map(ri))this._testAndFire("insert",ii(oi({},e),{reconversion:!0}),t)}_convertMarkerAdd(e,t,o){if("$graveyard"==t.root.rootName)return;const i=`addMarker:${e}`;if(o.consumable.add(t,i),this.fire(i,{markerName:e,markerRange:t},o),o.consumable.consume(t,i)){this._addConsumablesForRange(o.consumable,t,i);for(const s of t.getItems()){if(!o.consumable.test(s,i))continue;const n={item:s,range:qo._createOn(s),markerName:e,markerRange:t};this.fire(i,n,o)}}}_convertMarkerRemove(e,t,o){"$graveyard"!=t.root.rootName&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},o)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const o of t){const t=o.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const o of t.getAttributeKeys())e.add(t,"attribute:"+o)}}return e}_addConsumablesForRange(e,t,o){for(const i of t.getItems())e.add(i,o);return e}_addConsumablesForSelection(e,t,o){e.add(t,"selection");for(const i of o)e.add(t,"addMarker:"+i.name);for(const o of t.getAttributeKeys())e.add(t,"attribute:"+o);return e}_testAndFire(e,t,o){const i=function(e,t){const o=t.item.is("element")?t.item.name:"$text";return`${e}:${o}`}(e,t),s=t.item.is("$textProxy")?o.consumable._getSymbolForTextProxy(t.item):t.item,n=this._firedEventsMap.get(o),r=n.get(s);if(r){if(r.has(i))return;r.add(i)}else n.set(s,new Set([i]));this.fire(i,t,o)}_testAndFireAddAttributes(e,t){const o={item:e,range:qo._createOn(e)};for(const e of o.item.getAttributeKeys())o.attributeKey=e,o.attributeOldValue=null,o.attributeNewValue=o.item.getAttribute(e),this._testAndFire(`attribute:${e}`,o,t)}_createConversionApi(e,t=new Set,o={}){const i=ii(oi({},this._conversionApi),{consumable:new Uo,writer:e,options:o,convertItem:e=>this._convertInsert(qo._createOn(e),i),convertChildren:e=>this._convertInsert(qo._createIn(e),i,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,i),canReuseView:e=>!t.has(i.mapper.toModelElement(e))});return this._firedEventsMap.set(i,new Map),i}}function ni(e,t,o){const i=t.getRange(),s=Array.from(e.getAncestors());s.shift(),s.reverse();return!s.some((e=>{if(i.containsItem(e)){return!!o.toViewElement(e).getCustomProperty("addHighlight")}}))}function ri(e){return{item:e.item,range:qo._createFromPositionAndShift(e.previousPosition,e.length)}}class ai extends((0,m.ln)(Ro)){constructor(...e){super(),this._lastRangeBackward=!1,this._attrs=new Map,this._ranges=[],e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let o=!1;for(const i of e._ranges)if(t.isEqual(i)){o=!0;break}if(!o)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new qo(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new qo(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new qo(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[t,o,i]=e;if("object"==typeof o&&(i=o,o=void 0),null===t)this._setRanges([]);else if(t instanceof ai)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof qo)this._setRanges([t],!!i&&!!i.backward);else if(t instanceof zo)this._setRanges([new qo(t)]);else if(t instanceof Mo){const e=!!i&&!!i.backward;let s;if("in"==o)s=qo._createIn(t);else if("on"==o)s=qo._createOn(t);else{if(void 0===o)throw new m.Bb("model-selection-setto-required-second-parameter",[this,t]);s=new qo(zo._createAt(t,o))}this._setRanges([s],e)}else{if(!(0,m.TW)(t))throw new m.Bb("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,i&&!!i.backward)}}_setRanges(e,t=!1){const o=Array.from(e),i=o.some((t=>{if(!(t instanceof qo))throw new m.Bb("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every((e=>!e.isEqual(t)))}));(o.length!==this._ranges.length||i)&&(this._replaceAllRanges(o),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new m.Bb("model-selection-setfocus-no-ranges",[this,e]);const o=zo._createAt(e,t);if("same"==o.compareWith(this.focus))return;const i=this.anchor;this._ranges.length&&this._popRange(),"before"==o.compareWith(i)?(this._pushRange(new qo(o,i)),this._lastRangeBackward=!0):(this._pushRange(new qo(i,o)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const o=di(t.start,e);ui(o,t)&&(yield o);for(const o of t.getWalker()){const i=o.item;"elementEnd"==o.type&&li(i,e,t)&&(yield i)}const i=di(t.end,e);pi(i,t)&&(yield i)}}containsEntireContent(e=this.anchor.root){const t=zo._createAt(e,0),o=zo._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&o.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new qo(e.start,e.end))}_checkRange(e){for(let t=0;t<this._ranges.length;t++)if(e.isIntersecting(this._ranges[t]))throw new m.Bb("model-selection-range-intersects",[this,e],{addedRange:e,intersectingRange:this._ranges[t]})}_replaceAllRanges(e){this._removeAllRanges();for(const t of e)this._pushRange(t)}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}function ci(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&!!e.parent)}function li(e,t,o){return ci(e,t)&&hi(e,o)}function di(e,t){const o=e.parent.root.document.model.schema,i=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let s=!1;const n=i.find((e=>!s&&(s=o.isLimit(e),!s&&ci(e,t))));return i.forEach((e=>t.add(e))),n}function hi(e,t){const o=function(e){const t=e.root.document.model.schema;let o=e.parent;for(;o;){if(t.isBlock(o))return o;o=o.parent}}(e);if(!o)return!0;return!t.containsRange(qo._createOn(o),!0)}function ui(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.start.isTouching(zo._createAt(e,e.maxOffset))&&hi(e,t))}function pi(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.end.isTouching(zo._createAt(e,0))&&hi(e,t))}ai.prototype.is=function(e){return"selection"===e||"model:selection"===e};class fi extends((0,m.ln)(qo)){constructor(e,t){super(e,t),gi.call(this)}detach(){this.stopListening()}toRange(){return new qo(this.start,this.end)}static fromRange(e){return new fi(e.start,e.end)}}function gi(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&mi.call(this,o)}),{priority:"low"})}function mi(e){const t=this.getTransformedByOperation(e),o=qo._createFromRanges(t),i=!o.isEqual(this),s=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let n=null;if(i){"$graveyard"==o.root.rootName&&(n="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=o.start,this.end=o.end,this.fire("change:range",t,{deletionPosition:n})}else s&&this.fire("change:content",this.toRange(),{deletionPosition:n})}fi.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e};const bi="selection:";class _i extends((0,m.ln)(Ro)){constructor(e){super(),this._selection=new wi(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return bi+e}static _isStoreAttributeKey(e){return e.startsWith(bi)}}_i.prototype.is=function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e};class wi extends ai{constructor(e){super(),this.markers=new m.FE({idProperty:"name"}),this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this._model=e.model,this._document=e,this.listenTo(this._model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&"marker"!=o.type&&"rename"!=o.type&&"noop"!=o.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((e,t,o,i)=>{this._updateMarker(t,i)})),this.listenTo(this._document,"change",((e,t)=>{!function(e,t){const o=e.document.differ;for(const i of o.getChanges()){if("insert"!=i.type)continue;const o=i.position.parent;i.length===o.maxOffset&&e.enqueueChange(t,(e=>{const t=Array.from(o.getAttributeKeys()).filter((e=>e.startsWith(bi)));for(const i of t)e.removeAttribute(i,o)}))}}(this._model,t)}))}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e<this._ranges.length;e++)this._ranges[e].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(...e){super.setTo(...e),this._updateAttributes(!0),this.updateMarkers()}setFocus(e,t){super.setFocus(e,t),this._updateAttributes(!0),this.updateMarkers()}setAttribute(e,t){if(this._setAttribute(e,t)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}removeAttribute(e){if(this._removeAttribute(e)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}overrideGravity(){const e=(0,m.hQ)();return this._overriddenGravityRegister.add(e),1===this._overriddenGravityRegister.size&&this._updateAttributes(!0),e}restoreGravity(e){if(!this._overriddenGravityRegister.has(e))throw new m.Bb("document-selection-gravity-wrong-restore",this,{uid:e});this._overriddenGravityRegister.delete(e),this.isGravityOverridden||this._updateAttributes(!0)}observeMarkers(e){this._observedMarkers.add(e),this.updateMarkers()}_replaceAllRanges(e){this._validateSelectionRanges(e),super._replaceAllRanges(e)}_popRange(){this._ranges.pop().detach()}_pushRange(e){const t=this._prepareRange(e);t&&this._ranges.push(t)}_validateSelectionRanges(e){for(const t of e)if(!this._document._validateSelectionRange(t))throw new m.Bb("document-selection-wrong-position",this,{range:t})}_prepareRange(e){if(this._checkRange(e),e.root==this._document.graveyard)return;const t=fi.fromRange(e);return t.on("change:range",((e,o,i)=>{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=i.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}})),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const o=t.name.split(":",1)[0];if(!this._observedMarkers.has(o))continue;const i=t.getRange();for(const o of this.getRanges())i.containsRange(o,!o.isCollapsed)&&e.push(t)}const o=Array.from(this.markers);for(const o of e)this.markers.has(o)||(this.markers.add(o),t=!0);for(const o of Array.from(this.markers))e.includes(o)||(this.markers.remove(o),t=!0);t&&this.fire("change:marker",{oldMarkers:o,directChange:!1})}_updateMarker(e,t){const o=e.name.split(":",1)[0];if(!this._observedMarkers.has(o))return;let i=!1;const s=Array.from(this.markers),n=this.markers.has(e);if(t){let o=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){o=!0;break}o&&!n?(this.markers.add(e),i=!0):!o&&n&&(this.markers.remove(e),i=!0)}else n&&(this.markers.remove(e),i=!0);i&&this.fire("change:marker",{oldMarkers:s,directChange:!1})}_updateAttributes(e){const t=(0,m.qL)(this._getSurroundingAttributes()),o=(0,m.qL)(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const i=[];for(const[e,t]of this.getAttributes())o.has(e)&&o.get(e)===t||i.push(e);for(const[e]of o)this.hasAttribute(e)||i.push(e);i.length>0&&this.fire("change:attribute",{attributeKeys:i,directChange:!1})}_setAttribute(e,t,o=!0){const i=o?"normal":"low";if("low"==i&&"normal"==this._attributePriority.get(e))return!1;return super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,i),!0)}_removeAttribute(e,t=!0){const o=t?"normal":"low";return("low"!=o||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,o),!!super.hasAttribute(e)&&(this._attrs.delete(e),!0))}_setAttributesTo(e){const t=new Set;for(const[t,o]of this.getAttributes())e.get(t)!==o&&this._removeAttribute(t,!1);for(const[o,i]of e){this._setAttribute(o,i,!1)&&t.add(o)}return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(bi)){const o=t.substr(10);yield[o,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;let o=null;if(this.isCollapsed){const i=e.textNode?e.textNode:e.nodeBefore,s=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(o=ki(i)),o||(o=ki(s)),!this.isGravityOverridden&&!o){let e=i;for(;e&&!t.isInline(e)&&!o;)e=e.previousSibling,o=ki(e)}if(!o){let e=s;for(;e&&!t.isInline(e)&&!o;)e=e.nextSibling,o=ki(e)}o||(o=this.getStoredAttributes())}else{const e=this.getFirstRange();for(const i of e){if(i.item.is("element")&&t.isObject(i.item))break;if("text"==i.type){o=i.item.getAttributes();break}}}return o}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function ki(e){return e instanceof Do||e instanceof Bo?e.getAttributes():null}class vi{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}const yi=function(e){return(0,_.Z)(e,5)};class xi extends vi{elementToElement(e){return this.add(function(e){const t=Ti(e.model),o=Ai(e.view,"container");t.attributes.length&&(t.children=!0);return i=>{i.on(`insert:${t.name}`,function(e,t=Di){return(o,i,s)=>{if(!t(i.item,s.consumable,{preflight:!0}))return;const n=e(i.item,s,i);if(!n)return;t(i.item,s.consumable);const r=s.mapper.toViewPosition(i.range.start);s.mapper.bindElements(i.item,n),s.writer.insert(r,n),s.convertAttributes(i.item),ji(n,i.item.getChildren(),s,{reconversion:i.reconversion})}}(o,Mi(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&i.on("reduceChanges",Ri(t),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){const t=Ti(e.model),o=Ai(e.view,"container");return t.children=!0,i=>{if(i._conversionApi.schema.checkChild(t.name,"$text"))throw new m.Bb("conversion-element-to-structure-disallowed-text",i,{elementName:t.name});var s,n;i.on(`insert:${t.name}`,(s=o,n=Mi(t),(e,t,o)=>{if(!n(t.item,o.consumable,{preflight:!0}))return;const i=new Map;o.writer._registerSlotFactory(function(e,t,o){return(i,s)=>{const n=i.createContainerElement("$slot");let r=null;if("children"===s)r=Array.from(e.getChildren());else{if("function"!=typeof s)throw new m.Bb("conversion-slot-mode-unknown",o.dispatcher,{modeOrFilter:s});r=Array.from(e.getChildren()).filter((e=>s(e)))}return t.set(n,r),n}}(t.item,i,o));const r=s(t.item,o,t);if(o.writer._clearSlotFactory(),!r)return;!function(e,t,o){const i=Array.from(t.values()).flat(),s=new Set(i);if(s.size!=i.length)throw new m.Bb("conversion-slot-filter-overlap",o.dispatcher,{element:e});if(s.size!=e.childCount)throw new m.Bb("conversion-slot-filter-incomplete",o.dispatcher,{element:e})}(t.item,i,o),n(t.item,o.consumable);const a=o.mapper.toViewPosition(t.range.start);o.mapper.bindElements(t.item,r),o.writer.insert(a,r),o.convertAttributes(t.item),function(e,t,o,i){o.mapper.on("modelToViewPosition",r,{priority:"highest"});let s=null,n=null;for([s,n]of t)ji(e,n,o,i),o.writer.move(o.writer.createRangeIn(s),o.writer.createPositionBefore(s)),o.writer.remove(s);function r(e,t){const o=t.modelPosition.nodeAfter,i=n.indexOf(o);i<0||(t.viewPosition=t.mapper.findPositionIn(s,i))}o.mapper.off("modelToViewPosition",r)}(r,i,o,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),i.on("reduceChanges",Ri(t),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){e=yi(e);let t=e.model;"string"==typeof t&&(t={key:t});let o=`attribute:${t.key}`;t.name&&(o+=":"+t.name);if(t.values)for(const o of t.values)e.view[o]=Ai(e.view[o],"attribute");else e.view=Ai(e.view,"attribute");const i=Ci(e);return t=>{t.on(o,function(e){return(t,o,i)=>{if(!i.consumable.test(o.item,t.name))return;const s=e(o.attributeOldValue,i,o),n=e(o.attributeNewValue,i,o);if(!s&&!n)return;i.consumable.consume(o.item,t.name);const r=i.writer,a=r.document.selection;if(o.item instanceof ai||o.item instanceof _i)r.wrap(a.getFirstRange(),n);else{let e=i.mapper.toViewRange(o.range);null!==o.attributeOldValue&&s&&(e=r.unwrap(e,s)),null!==o.attributeNewValue&&n&&r.wrap(e,n)}}}(i),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=yi(e);let t=e.model;"string"==typeof t&&(t={key:t});let o=`attribute:${t.key}`;t.name&&(o+=":"+t.name);if(t.values)for(const o of t.values)e.view[o]=Si(e.view[o]);else e.view=Si(e.view);const i=Ci(e);return t=>{var s;t.on(o,(s=i,(e,t,o)=>{if(!o.consumable.test(t.item,e.name))return;const i=s(t.attributeOldValue,o,t),n=s(t.attributeNewValue,o,t);if(!i&&!n)return;o.consumable.consume(t.item,e.name);const r=o.mapper.toViewElement(t.item),a=o.writer;if(!r)throw new m.Bb("conversion-attribute-to-attribute-on-text",o.dispatcher,t);if(null!==t.attributeOldValue&&i)if("class"==i.key){const e=(0,m.qo)(i.value);for(const t of e)a.removeClass(t,r)}else if("style"==i.key){const e=Object.keys(i.value);for(const t of e)a.removeStyle(t,r)}else a.removeAttribute(i.key,r);if(null!==t.attributeNewValue&&n)if("class"==n.key){const e=(0,m.qo)(n.value);for(const t of e)a.addClass(t,r)}else if("style"==n.key){const e=Object.keys(n.value);for(const t of e)a.setStyle(t,n.value[t],r)}else a.setAttribute(n.key,n.value,r)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){const t=Ai(e.view,"ui");return o=>{var i;o.on(`addMarker:${e.model}`,(i=t,(e,t,o)=>{t.isOpening=!0;const s=i(t,o);t.isOpening=!1;const n=i(t,o);if(!s||!n)return;const r=t.markerRange;if(r.isCollapsed&&!o.consumable.consume(r,e.name))return;for(const t of r)if(!o.consumable.consume(t.item,e.name))return;const a=o.mapper,c=o.writer;c.insert(a.toViewPosition(r.start),s),o.mapper.bindElementToMarker(s,t.markerName),r.isCollapsed||(c.insert(a.toViewPosition(r.end),n),o.mapper.bindElementToMarker(n,t.markerName)),e.stop()}),{priority:e.converterPriority||"normal"}),o.on(`removeMarker:${e.model}`,((e,t,o)=>{const i=o.mapper.markerNameToElements(t.markerName);if(i){for(const e of i)o.mapper.unbindElementFromMarkerName(e,t.markerName),o.writer.clear(o.writer.createRangeOn(e),e);o.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var o;t.on(`addMarker:${e.model}`,(o=e.view,(e,t,i)=>{if(!t.item)return;if(!(t.item instanceof ai||t.item instanceof _i||t.item.is("$textProxy")))return;const s=Oi(o,t,i);if(!s)return;if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,r=Pi(n,s),a=n.document.selection;if(t.item instanceof ai||t.item instanceof _i)n.wrap(a.getFirstRange(),r);else{const e=i.mapper.toViewRange(t.range),o=n.wrap(e,r);for(const e of o.getItems())if(e.is("attributeElement")&&e.isSimilar(r)){i.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on(`addMarker:${e.model}`,function(e){return(t,o,i)=>{if(!o.item)return;if(!(o.item instanceof Vo))return;const s=Oi(e,o,i);if(!s)return;if(!i.consumable.test(o.item,t.name))return;const n=i.mapper.toViewElement(o.item);if(n&&n.getCustomProperty("addHighlight")){i.consumable.consume(o.item,t.name);for(const e of qo._createIn(o.item))i.consumable.consume(e.item,t.name);n.getCustomProperty("addHighlight")(n,s,i.writer),i.mapper.bindElementToMarker(n,o.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on(`removeMarker:${e.model}`,function(e){return(t,o,i)=>{if(o.markerRange.isCollapsed)return;const s=Oi(e,o,i);if(!s)return;const n=Pi(i.writer,s),r=i.mapper.markerNameToElements(o.markerName);if(r){for(const e of r)if(i.mapper.unbindElementFromMarkerName(e,o.markerName),e.is("attributeElement"))i.writer.unwrap(i.writer.createRangeOn(e),n);else{e.getCustomProperty("removeHighlight")(e,s.id,i.writer)}i.writer.clearClonedElementsGroup(o.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){e=yi(e);const t=e.model;let o=e.view;o||(o=o=>({group:t,name:o.substr(e.model.length+1)}));return i=>{var s;i.on(`addMarker:${t}`,(s=o,(e,t,o)=>{const i=s(t.markerName,o);if(!i)return;const n=t.markerRange;o.consumable.consume(n,e.name)&&(Ei(n,!1,o,t,i),Ei(n,!0,o,t,i),e.stop())}),{priority:e.converterPriority||"normal"}),i.on(`removeMarker:${t}`,function(e){return(t,o,i)=>{const s=e(o.markerName,i);if(!s)return;const n=i.mapper.markerNameToElements(o.markerName);if(n){for(const e of n)i.mapper.unbindElementFromMarkerName(e,o.markerName),e.is("containerElement")?(r(`data-${s.group}-start-before`,e),r(`data-${s.group}-start-after`,e),r(`data-${s.group}-end-before`,e),r(`data-${s.group}-end-after`,e)):i.writer.clear(i.writer.createRangeOn(e),e);i.writer.clearClonedElementsGroup(o.markerName),t.stop()}function r(e,t){if(t.hasAttribute(e)){const o=new Set(t.getAttribute(e).split(","));o.delete(s.name),0==o.size?i.writer.removeAttribute(e,t):i.writer.setAttribute(e,Array.from(o).join(","),t)}}}}(o),{priority:e.converterPriority||"normal"})}}(e))}}function Pi(e,t){const o=e.createAttributeElement("span",t.attributes);return t.classes&&o._addClass(t.classes),"number"==typeof t.priority&&(o._priority=t.priority),o._id=t.id,o}function Ei(e,t,o,i,s){const n=t?e.start:e.end,r=n.nodeAfter&&n.nodeAfter.is("element")?n.nodeAfter:null,a=n.nodeBefore&&n.nodeBefore.is("element")?n.nodeBefore:null;if(r||a){let e,n;t&&r||!t&&!a?(e=r,n=!0):(e=a,n=!1);const c=o.mapper.toViewElement(e);if(c)return void function(e,t,o,i,s,n){const r=`data-${n.group}-${t?"start":"end"}-${o?"before":"after"}`,a=e.hasAttribute(r)?e.getAttribute(r).split(","):[];a.unshift(n.name),i.writer.setAttribute(r,a.join(","),e),i.mapper.bindElementToMarker(e,s.markerName)}(c,t,n,o,i,s)}!function(e,t,o,i,s){const n=`${s.group}-${t?"start":"end"}`,r=s.name?{name:s.name}:null,a=o.writer.createUIElement(n,r);o.writer.insert(e,a),o.mapper.bindElementToMarker(a,i.markerName)}(o.mapper.toViewPosition(n),t,o,i,s)}function Ti(e){return"string"==typeof e&&(e={name:e}),e.attributes?Array.isArray(e.attributes)||(e.attributes=[e.attributes]):e.attributes=[],e.children=!!e.children,e}function Ai(e,t){return"function"==typeof e?e:(o,i)=>function(e,t,o){"string"==typeof e&&(e={name:e});let i;const s=t.writer,n=Object.assign({},e.attributes);if("container"==o)i=s.createContainerElement(e.name,n);else if("attribute"==o){const t={priority:e.priority||Ue.DEFAULT_PRIORITY};i=s.createAttributeElement(e.name,n,t)}else i=s.createUIElement(e.name,n);if(e.styles){const t=Object.keys(e.styles);for(const o of t)s.setStyle(o,e.styles[o],i)}if(e.classes){const t=e.classes;if("string"==typeof t)s.addClass(t,i);else for(const e of t)s.addClass(e,i)}return i}(e,i,t)}function Ci(e){return e.model.values?(t,o,i)=>{const s=e.view[t];return s?s(t,o,i):null}:e.view}function Si(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function Oi(e,t,o){const i="function"==typeof e?e(t,o):e;return i?(i.priority||(i.priority=10),i.id||(i.id=t.markerName),i):null}function Ri(e){const t=function(e){return(t,o)=>{if(!t.is("element",e.name))return!1;if("attribute"==o.type){if(e.attributes.includes(o.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,o)=>{const i=[];o.reconvertedElements||(o.reconvertedElements=new Set);for(const e of o.changes){const s="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(s&&t(s,e)){if(!o.reconvertedElements.has(s)){o.reconvertedElements.add(s);const e=zo._createBefore(s);let t=i.length;for(let o=i.length-1;o>=0;o--){const s=i[o],n=("attribute"==s.type?s.range.start:s.position).compareWith(e);if("before"==n||"remove"==s.type&&"same"==n)break;t=o}i.splice(t,0,{type:"remove",name:s.name,position:e,length:1},{type:"reinsert",name:s.name,position:e,length:1})}}else i.push(e)}o.changes=i}}function Mi(e){return(t,o,i={})=>{const s=["insert"];for(const o of e.attributes)t.hasAttribute(o)&&s.push(`attribute:${o}`);return!!s.every((e=>o.test(t,e)))&&(i.preflight||s.forEach((e=>o.consume(t,e))),!0)}}function ji(e,t,o,i){for(const s of t)Bi(e.root,s,o,i)||o.convertItem(s)}function Bi(e,t,o,i){const{writer:s,mapper:n}=o;if(!i.reconversion)return!1;const r=n.toViewElement(t);return!(!r||r.root==e)&&(!!o.canReuseView(r)&&(s.move(s.createRangeOn(r),n.toViewPosition(zo._createBefore(t))),!0))}function Di(e,t,{preflight:o}={}){return o?t.test(e,"insert"):t.consume(e,"insert")}function Vi(e){const{schema:t,document:o}=e.model;for(const i of o.getRootNames()){const s=o.getRoot(i);if(s.isEmpty&&!t.checkChild(s,"$text")&&t.checkChild(s,"paragraph"))return e.insertElement("paragraph",s),!0}return!1}function Ii(e,t,o){const i=o.createContext(e);return!!o.checkChild(i,"paragraph")&&!!o.checkChild(i.push("paragraph"),t)}function Ni(e,t){const o=t.createElement("paragraph");return t.insert(o,e),t.createPositionAt(o,0)}var zi=Object.defineProperty,Fi=Object.defineProperties,Li=Object.getOwnPropertyDescriptors,Zi=Object.getOwnPropertySymbols,Wi=Object.prototype.hasOwnProperty,$i=Object.prototype.propertyIsEnumerable,qi=(e,t,o)=>t in e?zi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class Hi extends vi{elementToElement(e){return this.add(Ui(e))}elementToAttribute(e){return this.add(function(e){e=yi(e),Ji(e);const t=Yi(e,!1),o=Ki(e.view),i=o?`element:${o}`:"element";return o=>{o.on(i,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=yi(e);let t=null;("string"==typeof e.view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let o;if("class"==t||"style"==t){o={["class"==t?"classes":"styles"]:e.view.value}}else{o={attributes:{[t]:void 0===e.view.value?/[\s\S]*/:e.view.value}}}e.view.name&&(o.name=e.view.name);return e.view=o,t}(e));Ji(e,t);const o=Yi(e,!0);return t=>{t.on("element",o,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){const t=function(e){return(t,o)=>{const i="string"==typeof e?e:e(t,o);return o.writer.createElement("$marker",{"data-name":i})}}(e.model);return Ui((o=((e,t)=>{for(var o in t||(t={}))Wi.call(t,o)&&qi(e,o,t[o]);if(Zi)for(var o of Zi(t))$i.call(t,o)&&qi(e,o,t[o]);return e})({},e),i={model:t},Fi(o,Li(i))));var o,i}(e))}dataToMarker(e){return this.add(function(e){e=yi(e),e.model||(e.model=t=>t?e.view+":"+t:e.view);const t={view:e.view,model:e.model},o=Gi(Xi(t,"start")),i=Gi(Xi(t,"end"));return s=>{s.on(`element:${e.view}-start`,o,{priority:e.converterPriority||"normal"}),s.on(`element:${e.view}-end`,i,{priority:e.converterPriority||"normal"});const n=m.tA.get("low"),r=m.tA.get("highest"),a=m.tA.get(e.converterPriority)/r;s.on("element",function(e){return(t,o,i)=>{const s=`data-${e.view}`;function n(t,s){for(const n of s){const s=e.model(n,i),r=i.writer.createElement("$marker",{"data-name":s});i.writer.insert(r,t),o.modelCursor.isEqual(t)?o.modelCursor=o.modelCursor.getShiftedBy(1):o.modelCursor=o.modelCursor._getTransformedByInsertion(t,1),o.modelRange=o.modelRange._getTransformedByInsertion(t,1)[0]}}(i.consumable.test(o.viewItem,{attributes:s+"-end-after"})||i.consumable.test(o.viewItem,{attributes:s+"-start-after"})||i.consumable.test(o.viewItem,{attributes:s+"-end-before"})||i.consumable.test(o.viewItem,{attributes:s+"-start-before"}))&&(o.modelRange||Object.assign(o,i.convertChildren(o.viewItem,o.modelCursor)),i.consumable.consume(o.viewItem,{attributes:s+"-end-after"})&&n(o.modelRange.end,o.viewItem.getAttribute(s+"-end-after").split(",")),i.consumable.consume(o.viewItem,{attributes:s+"-start-after"})&&n(o.modelRange.end,o.viewItem.getAttribute(s+"-start-after").split(",")),i.consumable.consume(o.viewItem,{attributes:s+"-end-before"})&&n(o.modelRange.start,o.viewItem.getAttribute(s+"-end-before").split(",")),i.consumable.consume(o.viewItem,{attributes:s+"-start-before"})&&n(o.modelRange.start,o.viewItem.getAttribute(s+"-start-before").split(",")))}}(t),{priority:n+a})}}(e))}}function Ui(e){const t=Gi(e=yi(e)),o=Ki(e.view),i=o?`element:${o}`:"element";return o=>{o.on(i,t,{priority:e.converterPriority||"normal"})}}function Ki(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function Gi(e){const t=new P(e.view);return(o,i,s)=>{const n=t.match(i.viewItem);if(!n)return;const r=n.match;if(r.name=!0,!s.consumable.test(i.viewItem,r))return;const a=function(e,t,o){return e instanceof Function?e(t,o):o.writer.createElement(e)}(e.model,i.viewItem,s);a&&s.safeInsert(a,i.modelCursor)&&(s.consumable.consume(i.viewItem,r),s.convertChildren(i.viewItem,a),s.updateConversionResult(a,i))}}function Ji(e,t=null){const o=null===t||(e=>e.getAttribute(t)),i="object"!=typeof e.model?e.model:e.model.key,s="object"!=typeof e.model||void 0===e.model.value?o:e.model.value;e.model={key:i,value:s}}function Yi(e,t){const o=new P(e.view);return(i,s,n)=>{if(!s.modelRange&&t)return;const r=o.match(s.viewItem);if(!r)return;if(!function(e,t){const o="function"==typeof e?e(t):e;if("object"==typeof o&&!Ki(o))return!1;return!o.classes&&!o.attributes&&!o.styles}(e.view,s.viewItem)?delete r.match.name:r.match.name=!0,!n.consumable.test(s.viewItem,r.match))return;const a=e.model.key,c="function"==typeof e.model.value?e.model.value(s.viewItem,n):e.model.value;if(null===c)return;s.modelRange||Object.assign(s,n.convertChildren(s.viewItem,s.modelCursor));const l=function(e,t,o,i){let s=!1;for(const n of Array.from(e.getItems({shallow:o})))i.schema.checkAttribute(n,t.key)&&(s=!0,n.hasAttribute(t.key)||i.writer.setAttribute(t.key,t.value,n));return s}(s.modelRange,{key:a,value:c},t,n);l&&(n.consumable.test(s.viewItem,{name:!0})&&(r.match.name=!0),n.consumable.consume(s.viewItem,r.match))}}function Xi(e,t){return{view:`${e.view}-${t}`,model:(t,o)=>{const i=t.getAttribute("name"),s=e.model(i,o);return o.writer.createElement("$marker",{"data-name":s})}}}function Qi(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.selection,i=t.schema,s=[];let n=!1;for(const e of o.getRanges()){const t=es(e,i);t&&!t.isEqual(e)?(s.push(t),n=!0):s.push(e)}n&&e.setSelection(function(e){const t=[...e],o=new Set;let i=1;for(;i<t.length;){const e=t[i],s=t.slice(0,i);for(const[n,r]of s.entries())if(!o.has(n))if(e.isEqual(r))o.add(n);else if(e.isIntersecting(r)){o.add(n),o.add(i);const s=e.getJoined(r);t.push(s)}i++}return t.filter(((e,t)=>!o.has(t)))}(s),{backward:o.isBackward});return!1}(t,e)))}function es(e,t){return e.isCollapsed?function(e,t){const o=e.start,i=t.getNearestSelectionRange(o);if(!i){const e=o.getAncestors().reverse().find((e=>t.isObject(e)));return e?qo._createOn(e):null}if(!i.isCollapsed)return i;const s=i.start;if(o.isEqual(s))return null;return new qo(s)}(e,t):function(e,t){const{start:o,end:i}=e,s=t.checkChild(o,"$text"),n=t.checkChild(i,"$text"),r=t.getLimitElement(o),a=t.getLimitElement(i);if(r===a){if(s&&n)return null;if(function(e,t,o){const i=e.nodeAfter&&!o.isLimit(e.nodeAfter)||o.checkChild(e,"$text"),s=t.nodeBefore&&!o.isLimit(t.nodeBefore)||o.checkChild(t,"$text");return i||s}(o,i,t)){const e=o.nodeAfter&&t.isSelectable(o.nodeAfter)?null:t.getNearestSelectionRange(o,"forward"),s=i.nodeBefore&&t.isSelectable(i.nodeBefore)?null:t.getNearestSelectionRange(i,"backward"),n=e?e.start:o,r=s?s.end:i;return new qo(n,r)}}const c=r&&!r.is("rootElement"),l=a&&!a.is("rootElement");if(c||l){const e=o.nodeAfter&&i.nodeBefore&&o.nodeAfter.parent===i.nodeBefore.parent,s=c&&(!e||!os(o.nodeAfter,t)),n=l&&(!e||!os(i.nodeBefore,t));let d=o,h=i;return s&&(d=zo._createBefore(ts(r,t))),n&&(h=zo._createAfter(ts(a,t))),new qo(d,h)}return null}(e,t)}function ts(e,t){let o=e,i=o;for(;t.isLimit(i)&&i.parent;)o=i,i=i.parent;return o}function os(e,t){return e&&t.isSelectable(e)}class is extends((0,m.Re)()){constructor(e,t){super(),this.model=e,this.view=new Oo(t),this.mapper=new Ho,this.downcastDispatcher=new si({mapper:this.mapper,schema:e.schema});const o=this.model.document,i=o.selection,s=this.model.markers;var n,r,a;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(o,"change",(()=>{this.view.change((e=>{this.downcastDispatcher.convertChanges(o.differ,s,e),this.downcastDispatcher.convertSelection(i,s,e)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(o,i)=>{const s=i.newSelection,n=[];for(const e of s.getRanges())n.push(t.toModelRange(e));const r=e.createSelection(n,{backward:s.isBackward});r.isEqual(e.document.selection)||e.change((e=>{e.setSelection(r)}))}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(n=this.mapper,r=this.model.schema,a=this.view,(e,t)=>{if(!a.document.isComposing||m.OB.isAndroid)for(let e=0;e<t.targetRanges.length;e++){const o=t.targetRanges[e],i=n.toModelRange(o),s=es(i,r);s&&!s.isEqual(i)&&(t.targetRanges[e]=n.toViewRange(s))}}),{priority:"high"}),this.downcastDispatcher.on("insert:$text",((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const i=o.writer,s=o.mapper.toViewPosition(t.range.start),n=i.createText(t.item.data);i.insert(s,n)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((e,t,o)=>{const i=o.mapper.toViewPosition(t.position),s=t.position.getShiftedBy(t.length),n=o.mapper.toViewPosition(s,{isPhantom:!0}),r=o.writer.createRange(i,n),a=o.writer.remove(r.getTrimmed());for(const e of o.writer.createRangeIn(a).getItems())o.mapper.unbindViewElement(e,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,o)=>{const i=o.writer,s=i.document.selection;for(const e of s.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&o.writer.mergeAttributes(e.start);i.setSelection(null)}),{priority:"high"}),this.downcastDispatcher.on("selection",((e,t,o)=>{const i=t.selection;if(i.isCollapsed)return;if(!o.consumable.consume(i,"selection"))return;const s=[];for(const e of i.getRanges())s.push(o.mapper.toViewRange(e));o.writer.setSelection(s,{backward:i.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,o)=>{const i=t.selection;if(!i.isCollapsed)return;if(!o.consumable.consume(i,"selection"))return;const s=o.writer,n=i.getFirstPosition(),r=o.mapper.toViewPosition(n),a=s.breakAttributes(r);s.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((e=>{if("$graveyard"==e.rootName)return null;const t=new Me(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,o=this.model.markers.get(t);if(!o)throw new m.Bb("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change((()=>{this.model.markers._refresh(o)}))}reconvertItem(e){this.model.change((()=>{this.model.document.differ._refreshItem(e)}))}}class ss{constructor(){this._consumables=new Map}add(e,t){let o;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?o=this._consumables.get(e):(o=new rs(e),this._consumables.set(e,o)),o.add(t))}test(e,t){const o=this._consumables.get(e);return void 0===o?null:e.is("$text")||e.is("documentFragment")?o:o.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const o=this._consumables.get(e);void 0!==o&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):o.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},o=e.getAttributeKeys();for(const e of o)"style"!=e&&"class"!=e&&t.attributes.push(e);const i=e.getClassNames();for(const e of i)t.classes.push(e);const s=e.getStyleNames();for(const e of s)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new ss),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,ss.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const o of e.getChildren())t=ss.createFrom(o,t);return t}}const ns=["attributes","classes","styles"];class rs{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t of ns)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t of ns)if(t in e){const o=this._test(t,e[t]);if(!0!==o)return o}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t of ns)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t of ns)t in e&&this._revert(t,e[t])}_add(e,t){const o=(0,C.Z)(t)?t:[t],i=this._consumables[e];for(const t of o){if("attributes"===e&&("class"===t||"style"===t))throw new m.Bb("viewconsumable-invalid-attribute",this);if(i.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))i.set(e,!0)}}_test(e,t){const o=(0,C.Z)(t)?t:[t],i=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){const e=i.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",o=this._test(e,[...this._consumables[e].keys()]);if(!0!==o)return o}return!0}_consume(e,t){const o=(0,C.Z)(t)?t:[t],i=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){if(i.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))i.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const o=(0,C.Z)(t)?t:[t],i=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){!1===i.get(t)&&i.set(t,!0)}else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class as extends((0,m.Re)()){constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((e,t)=>{t[0]=new cs(t[0])}),{priority:"highest"}),this.on("checkChild",((e,t)=>{t[0]=new cs(t[0]),t[1]=this.getDefinition(t[1])}),{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new m.Bb("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new m.Bb("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!t&&!(!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!!t&&!(!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!!t&&!(!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const o=this.getDefinition(e.last);return!!o&&o.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof zo){const t=e.nodeBefore,o=e.nodeAfter;if(!(t instanceof Vo))throw new m.Bb("schema-check-merge-no-element-before",this);if(!(o instanceof Vo))throw new m.Bb("schema-check-merge-no-element-after",this);return this.checkMerge(t,o)}for(const o of t.getChildren())if(!this.checkChild(e,o))return!1;return!0}addChildCheck(e){this.on("checkChild",((t,[o,i])=>{if(!i)return;const s=e(o,i);"boolean"==typeof s&&(t.stop(),t.return=s)}),{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",((t,[o,i])=>{const s=e(o,i);"boolean"==typeof s&&(t.stop(),t.return=s)}),{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;if(e instanceof zo)t=e.parent;else{t=(e instanceof qo?[e]:Array.from(e.getRanges())).reduce(((e,t)=>{const o=t.getCommonAncestor();return e?e.getCommonAncestor(o,{includeSelf:!0}):o}),null)}for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const o=[...e.getFirstPosition().getAncestors(),new Bo("",e.getAttributes())];return this.checkAttribute(o,t)}{const o=e.getRanges();for(const e of o)for(const o of e)if(this.checkAttribute(o.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const o of e)yield*this._getValidRangesForRange(o,t)}getNearestSelectionRange(e,t="both"){if(this.checkChild(e,"$text"))return new qo(e);let o,i;const s=e.getAncestors().reverse().find((e=>this.isLimit(e)))||e.root;"both"!=t&&"backward"!=t||(o=new Io({boundaries:qo._createIn(s),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(i=new Io({boundaries:qo._createIn(s),startPosition:e}));for(const e of function*(e,t){let o=!1;for(;!o;){if(o=!0,e){const t=e.next();t.done||(o=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(o=!1,yield{walker:t,value:e.value})}}}(o,i)){const t=e.walker==o?"elementEnd":"elementStart",i=e.value;if(i.type==t&&this.isObject(i.item))return qo._createOn(i.item);if(this.checkChild(i.nextPosition,"$text"))return new qo(i.nextPosition)}return null}findAllowedParent(e,t){let o=e.parent;for(;o;){if(this.checkChild(o,t))return o;if(this.isLimit(o))return null;o=o.parent}return null}setAllowedAttributes(e,t,o){const i=o.model;for(const[s,n]of Object.entries(t))i.schema.checkAttribute(e,s)&&o.setAttribute(s,n,e)}removeDisallowedAttributes(e,t){for(const o of e)if(o.is("$text"))vs(this,o,t);else{const e=qo._createIn(o).getPositions();for(const o of e){vs(this,o.nodeBefore||o.parent,t)}}}getAttributesWithProperty(e,t,o){const i={};for(const[s,n]of e.getAttributes()){const e=this.getAttributeProperties(s);void 0!==e[t]&&(void 0!==o&&o!==e[t]||(i[s]=n))}return i}createContext(e){return new cs(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,o=Object.keys(t);for(const i of o)e[i]=ls(t[i],i);for(const t of o)ds(e,t);for(const t of o)hs(e,t);for(const t of o)us(e,t);for(const t of o)ps(e,t),fs(e,t);for(const t of o)gs(e,t),ms(e,t),bs(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,o=t.length-1){const i=t.getItem(o);if(e.allowIn.includes(i.name)){if(0==o)return!0;{const e=this.getDefinition(i);return this._checkContextMatch(e,t,o-1)}}return!1}*_getValidRangesForRange(e,t){let o=e.start,i=e.start;for(const s of e.getItems({shallow:!0}))s.is("element")&&(yield*this._getValidRangesForRange(qo._createIn(s),t)),this.checkAttribute(s,t)||(o.isEqual(i)||(yield new qo(o,i)),o=zo._createAfter(s)),i=zo._createAfter(s);o.isEqual(i)||(yield new qo(o,i))}}class cs{constructor(e){if(e instanceof cs)return e;let t;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(ks)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new cs([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e=>e.name))}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function ls(e,t){const o={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(e,t){for(const o of e){const e=Object.keys(o).filter((e=>e.startsWith("is")));for(const i of e)t[i]=!!o[i]}}(e,o),_s(e,o,"allowIn"),_s(e,o,"allowContentOf"),_s(e,o,"allowWhere"),_s(e,o,"allowAttributes"),_s(e,o,"allowAttributesOf"),_s(e,o,"allowChildren"),_s(e,o,"inheritTypesFrom"),function(e,t){for(const o of e){const e=o.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,o),o}function ds(e,t){const o=e[t];for(const i of o.allowChildren){const o=e[i];o&&o.allowIn.push(t)}o.allowChildren.length=0}function hs(e,t){for(const o of e[t].allowContentOf)if(e[o]){ws(e,o).forEach((e=>{e.allowIn.push(t)}))}delete e[t].allowContentOf}function us(e,t){for(const o of e[t].allowWhere){const i=e[o];if(i){const o=i.allowIn;e[t].allowIn.push(...o)}}delete e[t].allowWhere}function ps(e,t){for(const o of e[t].allowAttributesOf){const i=e[o];if(i){const o=i.allowAttributes;e[t].allowAttributes.push(...o)}}delete e[t].allowAttributesOf}function fs(e,t){const o=e[t];for(const t of o.inheritTypesFrom){const i=e[t];if(i){const e=Object.keys(i).filter((e=>e.startsWith("is")));for(const t of e)t in o||(o[t]=i[t])}}delete o.inheritTypesFrom}function gs(e,t){const o=e[t],i=o.allowIn.filter((t=>e[t]));o.allowIn=Array.from(new Set(i))}function ms(e,t){const o=e[t];for(const i of o.allowIn){e[i].allowChildren.push(t)}}function bs(e,t){const o=e[t];o.allowAttributes=Array.from(new Set(o.allowAttributes))}function _s(e,t,o){for(const i of e){const e=i[o];"string"==typeof e?t[o].push(e):Array.isArray(e)&&t[o].push(...e)}}function ws(e,t){const o=e[t];return(i=e,Object.keys(i).map((e=>i[e]))).filter((e=>e.allowIn.includes(o.name)));var i}function ks(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function vs(e,t,o){for(const i of t.getAttributeKeys())e.checkAttribute(t,i)||o.removeAttribute(i,t)}var ys=Object.defineProperty,xs=Object.defineProperties,Ps=Object.getOwnPropertyDescriptors,Es=Object.getOwnPropertySymbols,Ts=Object.prototype.hasOwnProperty,As=Object.prototype.propertyIsEnumerable,Cs=(e,t,o)=>t in e?ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class Ss extends((0,m.ln)()){constructor(e){var t;super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi=(t=((e,t)=>{for(var o in t||(t={}))Ts.call(t,o)&&Cs(e,o,t[o]);if(Es)for(var o of Es(t))As.call(t,o)&&Cs(e,o,t[o]);return e})({},e),xs(t,Ps({consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)})))}convert(e,t,o=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let o;for(const i of new cs(e)){const e={};for(const t of i.getAttributeKeys())e[t]=i.getAttribute(t);const s=t.createElement(i.name,e);o&&t.insert(s,o),o=zo._createAt(s,0)}return o}(o,t),this.conversionApi.writer=t,this.conversionApi.consumable=ss.createFrom(e),this.conversionApi.store={};const{modelRange:i}=this._convertItem(e,this._modelCursor),s=t.createDocumentFragment();if(i){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,s);s.markers=function(e,t){const o=new Set,i=new Map,s=qo._createIn(e).getItems();for(const e of s)e.is("element","$marker")&&o.add(e);for(const e of o){const o=e.getAttribute("data-name"),s=t.createPositionBefore(e);i.has(o)?i.get(o).end=s.clone():i.set(o,new qo(s.clone())),t.remove(e)}return i}(s,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,s}_convertItem(e,t){const o={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,o,this.conversionApi):e.is("$text")?this.fire("text",o,this.conversionApi):this.fire("documentFragment",o,this.conversionApi),o.modelRange&&!(o.modelRange instanceof qo))throw new m.Bb("view-conversion-dispatcher-incorrect-result",this);return{modelRange:o.modelRange,modelCursor:o.modelCursor}}_convertChildren(e,t){let o=t.is("position")?t:zo._createAt(t,0);const i=new qo(o);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,o);e.modelRange instanceof qo&&(i.end=e.modelRange.end,o=e.modelCursor)}return{modelRange:i,modelCursor:o}}_safeInsert(e,t){const o=this._splitToAllowedParent(e,t);return!!o&&(this.conversionApi.writer.insert(e,o.position),!0)}_updateConversionResult(e,t){const o=this._getSplitParts(e),i=this.conversionApi.writer;t.modelRange||(t.modelRange=i.createRange(i.createPositionBefore(e),i.createPositionAfter(o[o.length-1])));const s=this._cursorParents.get(e);t.modelCursor=s?i.createPositionAt(s,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:o,writer:i}=this.conversionApi;let s=o.findAllowedParent(t,e);if(s){if(s===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(s)&&(s=null)}if(!s)return Ii(t,e,o)?{position:Ni(t,i)}:null;const n=this.conversionApi.writer.split(t,s),r=[];for(const e of n.range.getWalker())if("elementEnd"==e.type)r.push(e.item);else{const t=r.pop(),o=e.item;this._registerSplitPair(t,o)}const a=n.range.end.parent;return this._cursorParents.set(e,a),{position:n.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const o=this._splitParts.get(e);this._splitParts.set(t,o),o.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}class Os{getHtml(e){const t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class Rs{constructor(e){this.skipComments=!0,this.domParser=new DOMParser,this.domConverter=new It(e,{renderingMode:"data"}),this.htmlWriter=new Os}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`<body>${e}</body>`);const t=this.domParser.parseFromString(e,"text/html"),o=t.createDocumentFragment(),i=t.body.childNodes;for(;i.length>0;)o.appendChild(i[0]);return o}}var Ms=o("./packages/ckeditor5-utils/src/ckeditorerror.ts");class js extends((0,m.ln)()){constructor(e,t){super(),this.model=e,this.mapper=new Ho,this.downcastDispatcher=new si({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const i=o.writer,s=o.mapper.toViewPosition(t.range.start),n=i.createText(t.item.data);i.insert(s,n)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),this.upcastDispatcher=new Ss({schema:e.schema}),this.viewDocument=new He(t),this.stylesProcessor=t,this.htmlProcessor=new Rs(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new st(this.viewDocument),this.upcastDispatcher.on("text",((e,t,{schema:o,consumable:i,writer:s})=>{let n=t.modelCursor;if(!i.test(t.viewItem))return;if(!o.checkChild(n,"$text")){if(!Ii(n,"$text",o))return;if(0==t.viewItem.data.trim().length)return;const e=n.nodeBefore;n=Ni(n,s),e&&e.is("element","$marker")&&(s.move(s.createRangeOn(e),n),n=s.createPositionAfter(e))}i.consume(t.viewItem);const r=s.createText(t.viewItem.data);s.insert(r,n),t.modelRange=s.createRange(n,n.getShiftedBy(r.offsetSize)),t.modelCursor=t.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((e,t,o)=>{if(!t.modelRange&&o.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:i}=o.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=i}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((e,t,o)=>{if(!t.modelRange&&o.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:i}=o.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=i}}),{priority:"lowest"}),(0,m.Re)().prototype.decorate.call(this,"init"),(0,m.Re)().prototype.decorate.call(this,"set"),(0,m.Re)().prototype.decorate.call(this,"get"),(0,m.Re)().prototype.decorate.call(this,"toView"),(0,m.Re)().prototype.decorate.call(this,"toModel"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},Vi)}),{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:o="empty"}=e;if(!this._checkIfRootsExists([t]))throw new m.Bb("datacontroller-get-non-existent-root",this);const i=this.model.document.getRoot(t);return i.isAttached()||(0,Ms.KE)("datacontroller-get-detached-root",this),"empty"!==o||this.model.hasContent(i,{ignoreWhitespaces:!0})?this.stringify(i,e):""}stringify(e,t={}){const o=this.toView(e,t);return this.processor.toData(o)}toView(e,t={}){const o=this.viewDocument,i=this._viewWriter;this.mapper.clearBindings();const s=qo._createIn(e),n=new it(o);this.mapper.bindElements(e,n);const r=e.is("documentFragment")?e.markers:function(e){const t=[],o=e.root.document;if(!o)return new Map;const i=qo._createIn(e);for(const e of o.model.markers){const o=e.getRange(),s=o.isCollapsed,n=o.start.isEqual(i.start)||o.end.isEqual(i.end);if(s&&n)t.push([e.name,o]);else{const s=i.getIntersection(o);s&&t.push([e.name,s])}}return t.sort((([e,t],[o,i])=>{if("after"!==t.end.compareWith(i.start))return 1;if("before"!==t.start.compareWith(i.end))return-1;switch(t.start.compareWith(i.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(i.end)){case"before":return 1;case"after":return-1;default:return o.localeCompare(e)}}})),new Map(t)}(e);return this.downcastDispatcher.convert(s,r,i,t),n}init(e){if(this.model.document.version)throw new m.Bb("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new m.Bb("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(e=>{for(const o of Object.keys(t)){const i=this.model.document.getRoot(o);e.insert(this.parse(t[o],i),i,0)}})),Promise.resolve()}set(e,t={}){let o={};if("string"==typeof e?o.main=e:o=e,!this._checkIfRootsExists(Object.keys(o)))throw new m.Bb("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},(e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(o)){const i=this.model.document.getRoot(t);e.remove(e.createRangeIn(i)),e.insert(this.parse(o[t],i),i,0)}}))}parse(e,t="$root"){const o=this.processor.toView(e);return this.toModel(o,t)}toModel(e,t="$root"){return this.model.change((o=>this.upcastDispatcher.convert(e,o,t)))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRoot(t))return!1;return!0}}class Bs{constructor(e,t){this._helpers=new Map,this._downcast=(0,m.qo)(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=(0,m.qo)(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const o=this._downcast.includes(t);if(!this._upcast.includes(t)&&!o)throw new m.Bb("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:o})}for(e){if(!this._helpers.has(e))throw new m.Bb("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:o}of Ds(e))this.for("upcast").elementToElement({model:t,view:o,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:o}of Ds(e))this.for("upcast").elementToAttribute({view:o,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:o}of Ds(e))this.for("upcast").attributeToAttribute({view:o,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:o}){if(this._helpers.has(e))throw new m.Bb("conversion-group-exists",this);const i=o?new xi(t):new Hi(t);this._helpers.set(e,i)}}function*Ds(e){if(e.model.values)for(const t of e.model.values){const o={key:e.model.key,value:t},i=e.view[t],s=e.upcastAlso?e.upcastAlso[t]:void 0;yield*Vs(o,i,s)}else yield*Vs(e.model,e.view,e.upcastAlso)}function*Vs(e,t,o){if(yield{model:e,view:t},o)for(const t of(0,m.qo)(o))yield{model:e,view:t}}class Is{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}function Ns(e,t){const o=Ls(t),i=o.reduce(((e,t)=>e+t.offsetSize),0),s=e.parent;Ws(e);const n=e.index;return s._insertChild(n,o),Zs(s,n+o.length),Zs(s,n),new qo(e,e.getShiftedBy(i))}function zs(e){if(!e.isFlat)throw new m.Bb("operation-utils-remove-range-not-flat",this);const t=e.start.parent;Ws(e.start),Ws(e.end);const o=t._removeChildren(e.start.index,e.end.index-e.start.index);return Zs(t,e.start.index),o}function Fs(e,t){if(!e.isFlat)throw new m.Bb("operation-utils-move-range-not-flat",this);const o=zs(e);return Ns(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),o)}function Ls(e){const t=[];!function e(o){if("string"==typeof o)t.push(new Bo(o));else if(o instanceof Do)t.push(new Bo(o.data,o.getAttributes()));else if(o instanceof Mo)t.push(o);else if((0,m.TW)(o))for(const t of o)e(t)}(e);for(let e=1;e<t.length;e++){const o=t[e],i=t[e-1];o instanceof Bo&&i instanceof Bo&&$s(o,i)&&(t.splice(e-1,2,new Bo(i.data+o.data,i.getAttributes())),e--)}return t}function Zs(e,t){const o=e.getChild(t-1),i=e.getChild(t);if(o&&i&&o.is("$text")&&i.is("$text")&&$s(o,i)){const s=new Bo(o.data+i.data,o.getAttributes());e._removeChildren(t-1,2),e._insertChild(t-1,s)}}function Ws(e){const t=e.textNode,o=e.parent;if(t){const i=e.offset-t.startOffset,s=t.index;o._removeChildren(s,1);const n=new Bo(t.data.substr(0,i),t.getAttributes()),r=new Bo(t.data.substr(i),t.getAttributes());o._insertChild(s,[n,r])}}function $s(e,t){const o=e.getAttributes(),i=t.getAttributes();for(const e of o){if(e[1]!==t.getAttribute(e[0]))return!1;i.next()}return i.next().done}class qs extends Is{constructor(e,t,o,i){super(i),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toNext",this.howMany=t,this.targetPosition=o.clone(),this.targetPosition.stickiness="toNone"}get type(){return"$graveyard"==this.targetPosition.root.rootName?"remove":"$graveyard"==this.sourcePosition.root.rootName?"reinsert":"move"}get affectedSelectable(){return[qo._createFromPositionAndShift(this.sourcePosition,this.howMany),qo._createFromPositionAndShift(this.targetPosition,0)]}clone(){return new qs(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new qs(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,o=this.sourcePosition.offset,i=this.targetPosition.offset;if(o+this.howMany>e.maxOffset)throw new m.Bb("move-operation-nodes-do-not-exist",this);if(e===t&&o<i&&i<o+this.howMany)throw new m.Bb("move-operation-range-into-itself",this);if(this.sourcePosition.root==this.targetPosition.root&&"prefix"==(0,m.Rt)(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())){const e=this.sourcePosition.path.length-1;if(this.targetPosition.path[e]>=o&&this.targetPosition.path[e]<o+this.howMany)throw new m.Bb("move-operation-node-into-itself",this)}}_execute(){Fs(qo._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e.targetPosition=this.targetPosition.toJSON(),e}static get className(){return"MoveOperation"}static fromJSON(e,t){const o=zo.fromJSON(e.sourcePosition,t),i=zo.fromJSON(e.targetPosition,t);return new this(o,e.howMany,i,e.baseVersion)}}class Hs extends Is{constructor(e,t,o){super(o),this.position=e.clone(),this.position.stickiness="toNone",this.nodes=new jo(Ls(t)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}get affectedSelectable(){return this.position.clone()}clone(){const e=new jo([...this.nodes].map((e=>e._clone(!0)))),t=new Hs(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new zo(e,[0]);return new qs(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffset<this.position.offset)throw new m.Bb("insert-operation-position-invalid",this)}_execute(){const e=this.nodes;this.nodes=new jo([...e].map((e=>e._clone(!0)))),Ns(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const o=[];for(const t of e.nodes)t.name?o.push(Vo.fromJSON(t)):o.push(Bo.fromJSON(t));const i=new Hs(zo.fromJSON(e.position,t),o,e.baseVersion);return i.shouldReceiveAttributes=e.shouldReceiveAttributes,i}}class Us extends Is{constructor(e,t,o,i,s){super(s),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=o,this.graveyardPosition=i?i.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new zo(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new qo(this.splitPosition,e)}get affectedSelectable(){const e=[qo._createFromPositionAndShift(this.splitPosition,0),qo._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&e.push(qo._createFromPositionAndShift(this.graveyardPosition,0)),e}clone(){return new Us(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new zo(e,[0]);return new Ks(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset<t)throw new m.Bb("split-operation-position-invalid",this);if(!e.parent)throw new m.Bb("split-operation-split-in-root",this);if(this.howMany!=e.maxOffset-this.splitPosition.offset)throw new m.Bb("split-operation-how-many-invalid",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new m.Bb("split-operation-graveyard-position-invalid",this)}_execute(){const e=this.splitPosition.parent;if(this.graveyardPosition)Fs(qo._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const t=e._clone();Ns(this.insertionPosition,t)}Fs(new qo(zo._createAt(e,this.splitPosition.offset),zo._createAt(e,e.maxOffset)),this.moveTargetPosition)}toJSON(){const e=super.toJSON();return e.splitPosition=this.splitPosition.toJSON(),e.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(e.graveyardPosition=this.graveyardPosition.toJSON()),e}static get className(){return"SplitOperation"}static getInsertionPosition(e){const t=e.path.slice(0,-1);return t[t.length-1]++,new zo(e.root,t,"toPrevious")}static fromJSON(e,t){const o=zo.fromJSON(e.splitPosition,t),i=zo.fromJSON(e.insertionPosition,t),s=e.graveyardPosition?zo.fromJSON(e.graveyardPosition,t):null;return new this(o,e.howMany,i,s,e.baseVersion)}}class Ks extends Is{constructor(e,t,o,i,s){super(s),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=o.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=i.clone()}get type(){return"merge"}get deletionPosition(){return new zo(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new qo(this.sourcePosition,e)}get affectedSelectable(){const e=this.sourcePosition.parent;return[qo._createOn(e),qo._createFromPositionAndShift(this.targetPosition,0),qo._createFromPositionAndShift(this.graveyardPosition,0)]}clone(){return new Ks(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),o=new zo(this.sourcePosition.root,t)._getTransformedByMergeOperation(this);return new Us(e,this.howMany,o,this.graveyardPosition,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent;if(!e.parent)throw new m.Bb("merge-operation-source-position-invalid",this);if(!t.parent)throw new m.Bb("merge-operation-target-position-invalid",this);if(this.howMany!=e.maxOffset)throw new m.Bb("merge-operation-how-many-invalid",this)}_execute(){const e=this.sourcePosition.parent;Fs(qo._createIn(e),this.targetPosition),Fs(qo._createOn(e),this.graveyardPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,t){const o=zo.fromJSON(e.sourcePosition,t),i=zo.fromJSON(e.targetPosition,t),s=zo.fromJSON(e.graveyardPosition,t);return new this(o,e.howMany,i,s,e.baseVersion)}}class Gs extends Is{constructor(e,t,o,i,s,n){super(n),this.name=e,this.oldRange=t?t.clone():null,this.newRange=o?o.clone():null,this.affectsData=s,this._markers=i}get type(){return"marker"}get affectedSelectable(){const e=[];return this.oldRange&&e.push(this.oldRange.clone()),this.newRange&&(this.oldRange?e.push(...this.newRange.getDifference(this.oldRange)):e.push(this.newRange.clone())),e}clone(){return new Gs(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new Gs(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){this.newRange?this._markers._set(this.name,this.newRange,!0,this.affectsData):this._markers._remove(this.name)}toJSON(){const e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,t){return new Gs(e.name,e.oldRange?qo.fromJSON(e.oldRange,t):null,e.newRange?qo.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}}const Js=function(e,t){return _o(e,t)};class Ys extends Is{constructor(e,t,o,i,s){super(s),this.range=e.clone(),this.key=t,this.oldValue=void 0===o?null:o,this.newValue=void 0===i?null:i}get type(){return null===this.oldValue?"addAttribute":null===this.newValue?"removeAttribute":"changeAttribute"}get affectedSelectable(){return this.range.clone()}clone(){return new Ys(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Ys(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const e=super.toJSON();return e.range=this.range.toJSON(),e}_validate(){if(!this.range.isFlat)throw new m.Bb("attribute-operation-range-not-flat",this);for(const e of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!Js(e.getAttribute(this.key),this.oldValue))throw new m.Bb("attribute-operation-wrong-old-value",this,{item:e,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&e.hasAttribute(this.key))throw new m.Bb("attribute-operation-attribute-exists",this,{node:e,key:this.key})}}_execute(){Js(this.oldValue,this.newValue)||function(e,t,o){Ws(e.start),Ws(e.end);for(const i of e.getItems({shallow:!0})){const e=i.is("$textProxy")?i.textNode:i;null!==o?e._setAttribute(t,o):e._removeAttribute(t),Zs(e.parent,e.index)}Zs(e.end.parent,e.end.index)}(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(e,t){return new Ys(qo.fromJSON(e.range,t),e.key,e.oldValue,e.newValue,e.baseVersion)}}class Xs extends Is{get type(){return"noop"}get affectedSelectable(){return null}clone(){return new Xs(this.baseVersion)}getReversed(){return new Xs(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}class Qs extends Is{constructor(e,t,o,i){super(i),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=o}get type(){return"rename"}get affectedSelectable(){return this.position.nodeAfter}clone(){return new Qs(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new Qs(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof Vo))throw new m.Bb("rename-operation-wrong-position",this);if(e.name!==this.oldName)throw new m.Bb("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,t){return new Qs(zo.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}class en extends Is{constructor(e,t,o,i,s){super(s),this.root=e,this.key=t,this.oldValue=void 0===o?null:o,this.newValue=void 0===i?null:i}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}get affectedSelectable(){return this.root}clone(){return new en(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new en(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new m.Bb("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new m.Bb("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new m.Bb("rootattribute-operation-attribute-exists",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,t){if(!t.getRoot(e.root))throw new m.Bb("rootattribute-operation-fromjson-no-root",this,{rootName:e.root});return new en(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}class tn extends Is{constructor(e,t,o,i,s){if(super(s),this.rootName=e,this.elementName=t,this.isAdd=o,this._document=i,!this._document.getRoot(this.rootName)){this._document.createRoot(this.elementName,this.rootName)._isAttached=!1}}get type(){return this.isAdd?"addRoot":"detachRoot"}get affectedSelectable(){return this._document.getRoot(this.rootName)}clone(){return new tn(this.rootName,this.elementName,this.isAdd,this._document,this.baseVersion)}getReversed(){return new tn(this.rootName,this.elementName,!this.isAdd,this._document,this.baseVersion+1)}_validate(){const e=this._document.getRoot(this.rootName);if(e.isAttached()&&this.isAdd)throw new m.Bb("root-operation-root-attached",this);if(!e.isAttached()&&!this.isAdd)throw new m.Bb("root-operation-root-detached",this)}_execute(){this._document.getRoot(this.rootName)._isAttached=this.isAdd}toJSON(){const e=super.toJSON();return delete e._document,e}static get className(){return"RootOperation"}static fromJSON(e,t){return new tn(e.rootName,e.elementName,e.isAdd,t,e.baseVersion)}}const on={};on[Ys.className]=Ys,on[Hs.className]=Hs,on[Gs.className]=Gs,on[qs.className]=qs,on[Xs.className]=Xs,on[Is.className]=Is,on[Qs.className]=Qs,on[en.className]=en,on[tn.className]=tn,on[Us.className]=Us,on[Ks.className]=Ks;class sn{static fromJSON(e,t){return on[e.__className].fromJSON(e,t)}}const nn=new Map;function rn(e,t,o){let i=nn.get(e);i||(i=new Map,nn.set(e,i)),i.set(t,o)}function an(e){return[e]}function cn(e,t,o={}){const i=function(e,t){const o=nn.get(e);return o&&o.has(t)?o.get(t):an}(e.constructor,t.constructor);try{return i(e=e.clone(),t,o)}catch(e){throw e}}function ln(e,t,o){e=e.slice(),t=t.slice();const i=new dn(o.document,o.useRelations,o.forceWeakRemove);i.setOriginalOperations(e),i.setOriginalOperations(t);const s=i.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:s};const n=new WeakMap;for(const t of e)n.set(t,0);const r={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length};let a=0;for(;a<e.length;){const o=e[a],s=n.get(o);if(s==t.length){a++;continue}const r=t[s],c=cn(o,r,i.getContext(o,r,!0)),l=cn(r,o,i.getContext(r,o,!1));i.updateRelation(o,r),i.setOriginalOperations(c,o),i.setOriginalOperations(l,r);for(const e of c)n.set(e,s+l.length);e.splice(a,1,...c),t.splice(s,1,...l)}if(o.padWithNoOps){const o=e.length-r.originalOperationsACount,i=t.length-r.originalOperationsBCount;un(e,i-o),un(t,o-i)}return hn(e,r.nextBaseVersionB),hn(t,r.nextBaseVersionA),{operationsA:e,operationsB:t,originalOperations:s}}class dn{constructor(e,t,o=!1){this.originalOperations=new Map,this._history=e.history,this._useRelations=t,this._forceWeakRemove=!!o,this._relations=new Map}setOriginalOperations(e,t=null){const o=t?this.originalOperations.get(t):null;for(const t of e)this.originalOperations.set(t,o||t)}updateRelation(e,t){if(e instanceof qs)t instanceof Ks?e.targetPosition.isEqual(t.sourcePosition)||t.movedRange.containsPosition(e.targetPosition)?this._setRelation(e,t,"insertAtSource"):e.targetPosition.isEqual(t.deletionPosition)?this._setRelation(e,t,"insertBetween"):e.targetPosition.isAfter(t.sourcePosition)&&this._setRelation(e,t,"moveTargetAfter"):t instanceof qs&&(e.targetPosition.isEqual(t.sourcePosition)||e.targetPosition.isBefore(t.sourcePosition)?this._setRelation(e,t,"insertBefore"):this._setRelation(e,t,"insertAfter"));else if(e instanceof Us){if(t instanceof Ks)e.splitPosition.isBefore(t.sourcePosition)&&this._setRelation(e,t,"splitBefore");else if(t instanceof qs)if(e.splitPosition.isEqual(t.sourcePosition)||e.splitPosition.isBefore(t.sourcePosition))this._setRelation(e,t,"splitBefore");else{const o=qo._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(e.splitPosition)){const i=o.end.offset-e.splitPosition.offset,s=e.splitPosition.offset-o.start.offset;this._setRelation(e,t,{howMany:i,offset:s})}}}else if(e instanceof Ks)t instanceof Ks?(e.targetPosition.isEqual(t.sourcePosition)||this._setRelation(e,t,"mergeTargetNotMoved"),e.sourcePosition.isEqual(t.targetPosition)&&this._setRelation(e,t,"mergeSourceNotMoved"),e.sourcePosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeSameElement")):t instanceof Us&&e.sourcePosition.isEqual(t.splitPosition)&&this._setRelation(e,t,"splitAtSource");else if(e instanceof Gs){const o=e.newRange;if(!o)return;if(t instanceof qs){const i=qo._createFromPositionAndShift(t.sourcePosition,t.howMany),s=i.containsPosition(o.start)||i.start.isEqual(o.start),n=i.containsPosition(o.end)||i.end.isEqual(o.end);!s&&!n||i.containsRange(o)||this._setRelation(e,t,{side:s?"left":"right",path:s?o.start.path.slice():o.end.path.slice()})}else if(t instanceof Ks){const i=o.start.isEqual(t.targetPosition),s=o.start.isEqual(t.deletionPosition),n=o.end.isEqual(t.deletionPosition),r=o.end.isEqual(t.sourcePosition);(i||s||n||r)&&this._setRelation(e,t,{wasInLeftElement:i,wasStartBeforeMergedElement:s,wasEndBeforeMergedElement:n,wasInRightElement:r})}}}getContext(e,t,o){return{aIsStrong:o,aWasUndone:this._wasUndone(e),bWasUndone:this._wasUndone(t),abRelation:this._useRelations?this._getRelation(e,t):null,baRelation:this._useRelations?this._getRelation(t,e):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(e){const t=this.originalOperations.get(e);return t.wasUndone||this._history.isUndoneOperation(t)}_getRelation(e,t){const o=this.originalOperations.get(t),i=this._history.getUndoneOperation(o);if(!i)return null;const s=this.originalOperations.get(e),n=this._relations.get(s);return n&&n.get(i)||null}_setRelation(e,t,o){const i=this.originalOperations.get(e),s=this.originalOperations.get(t);let n=this._relations.get(i);n||(n=new Map,this._relations.set(i,n)),n.set(s,o)}}function hn(e,t){for(const o of e)o.baseVersion=t++}function un(e,t){for(let o=0;o<t;o++)e.push(new Xs(0))}function pn(e,t,o){const i=e.nodes.getNode(0).getAttribute(t);if(i==o)return null;const s=new qo(e.position,e.position.getShiftedBy(e.howMany));return new Ys(s,t,i,o,0)}function fn(e,t){return null===e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany)}function gn(e,t){const o=[];for(let i=0;i<e.length;i++){const s=e[i],n=new qs(s.start,s.end.offset-s.start.offset,t,0);o.push(n);for(let t=i+1;t<e.length;t++)e[t]=e[t]._getTransformedByMove(n.sourcePosition,n.targetPosition,n.howMany)[0];t=t._getTransformedByMove(n.sourcePosition,n.targetPosition,n.howMany)}return o}rn(Ys,Ys,((e,t,o)=>{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const i=e.range.getDifference(t.range).map((t=>new Ys(t,e.key,e.oldValue,e.newValue,0))),s=e.range.getIntersection(t.range);return s&&o.aIsStrong&&i.push(new Ys(s,t.key,t.newValue,e.newValue,0)),0==i.length?[new Xs(0)]:i}return[e]})),rn(Ys,Hs,((e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const o=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map((t=>new Ys(t,e.key,e.oldValue,e.newValue,e.baseVersion)));if(t.shouldReceiveAttributes){const i=pn(t,e.key,e.oldValue);i&&o.unshift(i)}return o}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]})),rn(Ys,Ks,((e,t)=>{const o=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&o.push(qo._createFromPositionAndShift(t.graveyardPosition,1));const i=e.range._getTransformedByMergeOperation(t);return i.isCollapsed||o.push(i),o.map((t=>new Ys(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),rn(Ys,qs,((e,t)=>function(e,t){const o=qo._createFromPositionAndShift(t.sourcePosition,t.howMany);let i=null,s=[];o.containsRange(e,!0)?i=e:e.start.hasSameParentAs(o.start)?(s=e.getDifference(o),i=e.getIntersection(o)):s=[e];const n=[];for(let e of s){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const o=t.getMovedRangeStart(),i=e.start.hasSameParentAs(o),s=e._getTransformedByInsertion(o,t.howMany,i);n.push(...s)}i&&n.push(i._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]);return n}(e.range,t).map((t=>new Ys(t,e.key,e.oldValue,e.newValue,e.baseVersion))))),rn(Ys,Us,((e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const o=e.clone();return o.range=new qo(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,o]}return e.range=e.range._getTransformedBySplitOperation(t),[e]})),rn(Hs,Ys,((e,t)=>{const o=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const i=pn(e,t.key,t.newValue);i&&o.push(i)}return o})),rn(Hs,Hs,((e,t,o)=>(e.position.isEqual(t.position)&&o.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e]))),rn(Hs,qs,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),rn(Hs,Us,((e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e]))),rn(Hs,Ks,((e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e]))),rn(Gs,Hs,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e]))),rn(Gs,Gs,((e,t,o)=>{if(e.name==t.name){if(!o.aIsStrong)return[new Xs(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]})),rn(Gs,Ks,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e]))),rn(Gs,qs,((e,t,o)=>{if(e.oldRange&&(e.oldRange=qo._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(o.abRelation){const i=qo._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==o.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.end=i.end,e.newRange.start.path=o.abRelation.path,[e];if("right"==o.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=i.start,e.newRange.end.path=o.abRelation.path,[e]}e.newRange=qo._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]})),rn(Gs,Us,((e,t,o)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(o.abRelation){const i=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&o.abRelation.wasStartBeforeMergedElement?e.newRange.start=zo._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!o.abRelation.wasInLeftElement&&(e.newRange.start=zo._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&o.abRelation.wasInRightElement?e.newRange.end=zo._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&o.abRelation.wasEndBeforeMergedElement?e.newRange.end=zo._createAt(t.insertionPosition):e.newRange.end=i.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]})),rn(Ks,Hs,((e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e]))),rn(Ks,Ks,((e,t,o)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(o.bWasUndone){const o=t.graveyardPosition.path.slice();return o.push(0),e.sourcePosition=new zo(t.graveyardPosition.root,o),e.howMany=0,[e]}return[new Xs(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!o.bWasUndone&&"splitAtSource"!=o.abRelation){const i="$graveyard"==e.targetPosition.root.rootName,s="$graveyard"==t.targetPosition.root.rootName;if(s&&!i||!(i&&!s)&&o.aIsStrong){const o=t.targetPosition._getTransformedByMergeOperation(t),i=e.targetPosition._getTransformedByMergeOperation(t);return[new qs(o,e.howMany,i,0)]}return[new Xs(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&o.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),rn(Ks,qs,((e,t,o)=>{const i=qo._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!o.bWasUndone&&!o.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.sourcePosition)?[new Xs(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])})),rn(Ks,Us,((e,t,o)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const i=0!=t.howMany,s=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(i||s||"mergeTargetNotMoved"==o.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==o.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==o.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]})),rn(qs,Hs,((e,t)=>{const o=qo._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=o.start,e.howMany=o.end.offset-o.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]})),rn(qs,qs,((e,t,o)=>{const i=qo._createFromPositionAndShift(e.sourcePosition,e.howMany),s=qo._createFromPositionAndShift(t.sourcePosition,t.howMany);let n,r=o.aIsStrong,a=!o.aIsStrong;if("insertBefore"==o.abRelation||"insertAfter"==o.baRelation?a=!0:"insertAfter"!=o.abRelation&&"insertBefore"!=o.baRelation||(a=!1),n=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),fn(e,t)&&fn(t,e))return[t.getReversed()];if(i.containsPosition(t.targetPosition)&&i.containsRange(s,!0))return i.start=i.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),i.end=i.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),gn([i],n);if(s.containsPosition(e.targetPosition)&&s.containsRange(i,!0))return i.start=i.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),i.end=i.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),gn([i],n);const c=(0,m.Rt)(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==c||"extension"==c)return i.start=i.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),i.end=i.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),gn([i],n);"remove"!=e.type||"remove"==t.type||o.aWasUndone||o.forceWeakRemove?"remove"==e.type||"remove"!=t.type||o.bWasUndone||o.forceWeakRemove||(r=!1):r=!0;const l=[],d=i.getDifference(s);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const o="same"==(0,m.Rt)(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),i=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,o);l.push(...i)}const h=i.getIntersection(s);return null!==h&&r&&(h.start=h.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),h.end=h.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===l.length?l.push(h):1==l.length?s.start.isBefore(i.start)||s.start.isEqual(i.start)?l.unshift(h):l.push(h):l.splice(1,0,h)),0===l.length?[new Xs(e.baseVersion)]:gn(l,n)})),rn(qs,Us,((e,t,o)=>{let i=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=o.abRelation||(i=e.targetPosition._getTransformedBySplitOperation(t));const s=qo._createFromPositionAndShift(e.sourcePosition,e.howMany);if(s.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=i,[e];if(s.start.hasSameParentAs(t.splitPosition)&&s.containsPosition(t.splitPosition)){let e=new qo(t.splitPosition,s.end);e=e._getTransformedBySplitOperation(t);return gn([new qo(s.start,t.splitPosition),e],i)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==o.abRelation&&(i=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==o.abRelation&&(i=e.targetPosition);const n=[s._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const i=s.start.isEqual(t.graveyardPosition)||s.containsPosition(t.graveyardPosition);e.howMany>1&&i&&!o.aWasUndone&&n.push(qo._createFromPositionAndShift(t.insertionPosition,1))}return gn(n,i)})),rn(qs,Ks,((e,t,o)=>{const i=qo._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.sourcePosition))if("remove"!=e.type||o.forceWeakRemove){if(1==e.howMany)return o.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new Xs(0)]}else if(!o.aWasUndone){const o=[];let i=t.graveyardPosition.clone(),s=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(o.push(new qs(e.sourcePosition,e.howMany-1,e.targetPosition,0)),i=i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),s=s._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const n=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),r=new qs(i,1,n,0),a=r.getMovedRangeStart().path.slice();a.push(0);const c=new zo(r.targetPosition.root,a);s=s._getTransformedByMove(i,n,1);const l=new qs(s,t.howMany,c,0);return o.push(r),o.push(l),o}const s=qo._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=s.start,e.howMany=s.end.offset-s.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]})),rn(Qs,Hs,((e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e]))),rn(Qs,Ks,((e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e]))),rn(Qs,qs,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),rn(Qs,Qs,((e,t,o)=>{if(e.position.isEqual(t.position)){if(!o.aIsStrong)return[new Xs(0)];e.oldName=t.newName}return[e]})),rn(Qs,Us,((e,t)=>{const o=e.position.path,i=t.splitPosition.getParentPath();if("same"==(0,m.Rt)(o,i)&&!t.graveyardPosition){const t=new Qs(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]})),rn(en,en,((e,t,o)=>{if(e.root===t.root&&e.key===t.key){if(!o.aIsStrong||e.newValue===t.newValue)return[new Xs(0)];e.oldValue=t.newValue}return[e]})),rn(tn,tn,((e,t,o)=>e.rootName!==t.rootName||e.isAdd!==t.isAdd||o.bWasUndone?[e]:[new Xs(0)])),rn(Us,Hs,((e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset<t.position.offset&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByInsertOperation(t),e.insertionPosition=e.insertionPosition._getTransformedByInsertOperation(t),[e]))),rn(Us,Ks,((e,t,o)=>{if(!e.graveyardPosition&&!o.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const o=t.graveyardPosition.path.slice();o.push(0);const i=new zo(t.graveyardPosition.root,o),s=Us.getInsertionPosition(new zo(t.graveyardPosition.root,o)),n=new Us(i,0,s,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=Us.getInsertionPosition(e.splitPosition),e.graveyardPosition=n.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[n,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=Us.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),rn(Us,qs,((e,t,o)=>{const i=qo._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const s=i.start.isEqual(e.graveyardPosition)||i.containsPosition(e.graveyardPosition);if(!o.bWasUndone&&s){const o=e.splitPosition._getTransformedByMoveOperation(t),i=e.graveyardPosition._getTransformedByMoveOperation(t),s=i.path.slice();s.push(0);const n=new zo(i.root,s);return[new qs(o,e.howMany,n,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const s=e.splitPosition.isEqual(t.targetPosition);if(s&&("insertAtSource"==o.baRelation||"splitBefore"==o.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=Us.getInsertionPosition(e.splitPosition),[e];if(s&&o.abRelation&&o.abRelation.howMany){const{howMany:t,offset:i}=o.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(i),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.splitPosition)){const o=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=o,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany),e.splitPosition=t.sourcePosition.clone(),e.insertionPosition=Us.getInsertionPosition(e.splitPosition),[e]}return t.sourcePosition.isEqual(t.targetPosition)||(e.splitPosition.hasSameParentAs(t.sourcePosition)&&e.splitPosition.offset<=t.sourcePosition.offset&&(e.howMany-=t.howMany),e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany)),e.splitPosition.stickiness="toNone",e.splitPosition=e.splitPosition._getTransformedByMoveOperation(t),e.splitPosition.stickiness="toNext",e.graveyardPosition?e.insertionPosition=e.insertionPosition._getTransformedByMoveOperation(t):e.insertionPosition=Us.getInsertionPosition(e.splitPosition),[e]})),rn(Us,Us,((e,t,o)=>{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new Xs(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new Xs(0)];if("splitBefore"==o.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const i="$graveyard"==e.splitPosition.root.rootName,s="$graveyard"==t.splitPosition.root.rootName;if(s&&!i||!(i&&!s)&&o.aIsStrong){const o=[];return t.howMany&&o.push(new qs(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&o.push(new qs(e.splitPosition,e.howMany,e.moveTargetPosition,0)),o}return[new Xs(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==o.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==o.baRelation){const o=t.insertionPosition.path.slice();o.push(0);const i=new zo(t.insertionPosition.root,o);return[e,new qs(e.insertionPosition,1,i,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset<t.splitPosition.offset&&(e.howMany-=t.howMany),e.splitPosition=e.splitPosition._getTransformedBySplitOperation(t),e.insertionPosition=Us.getInsertionPosition(e.splitPosition),[e]}));class mn extends((0,m.ln)(zo)){constructor(e,t,o="toNone"){if(super(e,t,o),!this.root.is("rootElement"))throw new m.Bb("model-liveposition-root-not-rootelement",e);bn.call(this)}detach(){this.stopListening()}toPosition(){return new zo(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}function bn(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&_n.call(this,o)}),{priority:"low"})}function _n(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}mn.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e};class wn{constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},(0,m.KE)("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:o=!0,isUndo:i=!1,isTyping:s=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=o,this.isUndo=i,this.isTyping=s}get type(){return(0,m.KE)("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}var kn=Object.defineProperty,vn=Object.getOwnPropertySymbols,yn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,Pn=(e,t,o)=>t in e?kn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class En{constructor(e){this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changedRoots=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set,this._markerCollection=e}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size&&0==this._changedRoots.size}bufferOperation(e){const t=e;switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),o=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),o||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=qo._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const o=t.graveyardPosition.parent;this._markInsert(o,t.graveyardPosition.offset,1);const i=t.targetPosition.parent;this._isInInsertedElement(i)||this._markInsert(i,t.targetPosition.offset,e.maxOffset);break}case"detachRoot":case"addRoot":this._bufferRootStateChange(t.rootName,t.isAdd);break;case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{const e=t.root.rootName;this._bufferRootAttributeChange(e,t.key,t.oldValue,t.newValue);break}}this._cachedChanges=null}bufferMarkerChange(e,t,o){const i=this._changedMarkers.get(e);i?(i.newMarkerData=o,null==i.oldMarkerData.range&&null==o.range&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{newMarkerData:o,oldMarkerData:t})}getMarkersToRemove(){const e=[];for(const[t,o]of this._changedMarkers)null!=o.oldMarkerData.range&&e.push({name:t,range:o.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,o]of this._changedMarkers)null!=o.newMarkerData.range&&e.push({name:t,range:o.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map((([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}})))}hasDataChanges(){if(this._changesInElement.size>0)return!0;if(this._changedRoots.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const o=e.range&&!t.range,i=!e.range&&t.range,s=e.range&&t.range&&!e.range.isEqual(t.range);if(o||i||s)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const o=this._changesInElement.get(e).sort(((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offset<t.offset?-1:1)),i=this._elementSnapshots.get(e),s=Tn(e.getChildren()),n=An(i.length,o);let r=0,a=0;for(const o of n)if("i"===o)t.push(this._getInsertDiff(e,r,s[r])),r++;else if("r"===o)t.push(this._getRemoveDiff(e,r,i[a])),a++;else if("a"===o){const o=s[r].attributes,n=i[a].attributes;let c;if("$text"==s[r].name)c=new qo(zo._createAt(e,r),zo._createAt(e,r+1));else{const t=e.offsetToIndex(r);c=new qo(zo._createAt(e,r),zo._createAt(e.getChild(t),0))}t.push(...this._getAttributesDiff(c,n,o)),r++,a++}else r++,a++}t.sort(((e,t)=>e.position.root!=t.position.root?e.position.root.rootName<t.position.root.rootName?-1:1:e.position.isEqual(t.position)?e.changeCount-t.changeCount:e.position.isBefore(t.position)?-1:1));for(let e=1,o=0;e<t.length;e++){const i=t[o],s=t[e],n="remove"==i.type&&"remove"==s.type&&"$text"==i.name&&"$text"==s.name&&i.position.isEqual(s.position),r="insert"==i.type&&"insert"==s.type&&"$text"==i.name&&"$text"==s.name&&i.position.parent==s.position.parent&&i.position.offset+i.length==s.position.offset,a="attribute"==i.type&&"attribute"==s.type&&i.position.parent==s.position.parent&&i.range.isFlat&&s.range.isFlat&&i.position.offset+i.length==s.position.offset&&i.attributeKey==s.attributeKey&&i.attributeOldValue==s.attributeOldValue&&i.attributeNewValue==s.attributeNewValue;n||r||a?(i.length++,a&&(i.range.end=i.range.end.getShiftedBy(1)),t[e]=null):o=e}t=t.filter((e=>e));for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(Cn),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map((e=>{const t=((e,t)=>{for(var o in t||(t={}))yn.call(t,o)&&Pn(e,o,t[o]);if(vn)for(var o of vn(t))xn.call(t,o)&&Pn(e,o,t[o]);return e})({},e);return void 0!==t.state&&delete t.attributes,t}))}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_bufferRootStateChange(e,t){if(!this._changedRoots.has(e))return void this._changedRoots.set(e,{name:e,state:t?"attached":"detached"});const o=this._changedRoots.get(e);void 0!==o.state?(delete o.state,void 0===o.attributes&&this._changedRoots.delete(e)):o.state=t?"attached":"detached"}_bufferRootAttributeChange(e,t,o,i){const s=this._changedRoots.get(e)||{name:e},n=s.attributes||{};if(n[t]){const e=n[t];i===e.oldValue?delete n[t]:e.newValue=i}else n[t]={oldValue:o,newValue:i};0===Object.entries(n).length?(delete s.attributes,void 0===s.state&&this._changedRoots.delete(e)):(s.attributes=n,this._changedRoots.set(e,s))}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e);const t=qo._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_markInsert(e,t,o){const i={type:"insert",offset:t,howMany:o,count:this._changeCount++};this._markChange(e,i)}_markRemove(e,t,o){const i={type:"remove",offset:t,howMany:o,count:this._changeCount++};this._markChange(e,i),this._removeAllNestedChanges(e,t,o)}_markAttribute(e){const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);const o=this._getChangesForElement(e);this._handleChange(t,o),o.push(t);for(let e=0;e<o.length;e++)o[e].howMany<1&&(o.splice(e,1),e--)}_getChangesForElement(e){let t;return this._changesInElement.has(e)?t=this._changesInElement.get(e):(t=[],this._changesInElement.set(e,t)),t}_makeSnapshot(e){this._elementSnapshots.has(e)||this._elementSnapshots.set(e,Tn(e.getChildren()))}_handleChange(e,t){e.nodesToHandle=e.howMany;for(const o of t){const i=e.offset+e.howMany,s=o.offset+o.howMany;if("insert"==e.type&&("insert"==o.type&&(e.offset<=o.offset?o.offset+=e.howMany:e.offset<s&&(o.howMany+=e.nodesToHandle,e.nodesToHandle=0)),"remove"==o.type&&e.offset<o.offset&&(o.offset+=e.howMany),"attribute"==o.type))if(e.offset<=o.offset)o.offset+=e.howMany;else if(e.offset<s){const s=o.howMany;o.howMany=e.offset-o.offset,t.unshift({type:"attribute",offset:i,howMany:s-o.howMany,count:this._changeCount++})}if("remove"==e.type){if("insert"==o.type)if(i<=o.offset)o.offset-=e.howMany;else if(i<=s)if(e.offset<o.offset){const t=i-o.offset;o.offset=e.offset,o.howMany-=t,e.nodesToHandle-=t}else o.howMany-=e.nodesToHandle,e.nodesToHandle=0;else if(e.offset<=o.offset)e.nodesToHandle-=o.howMany,o.howMany=0;else if(e.offset<s){const t=s-e.offset;o.howMany-=t,e.nodesToHandle-=t}if("remove"==o.type&&(i<=o.offset?o.offset-=e.howMany:e.offset<o.offset&&(e.nodesToHandle+=o.howMany,o.howMany=0)),"attribute"==o.type)if(i<=o.offset)o.offset-=e.howMany;else if(e.offset<o.offset){const t=i-o.offset;o.offset=e.offset,o.howMany-=t}else if(e.offset<s)if(i<=s){const i=o.howMany;o.howMany=e.offset-o.offset;const s=i-o.howMany-e.nodesToHandle;t.unshift({type:"attribute",offset:e.offset,howMany:s,count:this._changeCount++})}else o.howMany-=s-e.offset}if("attribute"==e.type){if("insert"==o.type)if(e.offset<o.offset&&i>o.offset){if(i>s){const e={type:"attribute",offset:s,howMany:i-s,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=o.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=o.offset&&e.offset<s&&(i>s?(e.nodesToHandle=i-s,e.offset=s):e.nodesToHandle=0);if("remove"==o.type&&e.offset<o.offset&&i>o.offset){const s={type:"attribute",offset:o.offset,howMany:i-o.offset,count:this._changeCount++};this._handleChange(s,t),t.push(s),e.nodesToHandle=o.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==o.type&&(e.offset>=o.offset&&i<=s?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=o.offset&&i>=s&&(o.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,o){return{type:"insert",position:zo._createAt(e,t),name:o.name,attributes:new Map(o.attributes),length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,o){return{type:"remove",position:zo._createAt(e,t),name:o.name,attributes:new Map(o.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,o){const i=[];o=new Map(o);for(const[s,n]of t){const t=o.has(s)?o.get(s):null;t!==n&&i.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:s,attributeOldValue:n,attributeNewValue:t,changeCount:this._changeCount++}),o.delete(s)}for(const[t,s]of o)i.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:s,changeCount:this._changeCount++});return i}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const o=this._changesInElement.get(t),i=e.startOffset;if(o)for(const e of o)if("insert"==e.type&&i>=e.offset&&i<e.offset+e.howMany)return!0;return this._isInInsertedElement(t)}_removeAllNestedChanges(e,t,o){const i=new qo(zo._createAt(e,t),zo._createAt(e,t+o));for(const e of i.getItems({shallow:!0}))e.is("element")&&(this._elementSnapshots.delete(e),this._changesInElement.delete(e),this._removeAllNestedChanges(e,0,e.maxOffset))}}function Tn(e){const t=[];for(const o of e)if(o.is("$text"))for(let e=0;e<o.data.length;e++)t.push({name:"$text",attributes:new Map(o.getAttributes())});else t.push({name:o.name,attributes:new Map(o.getAttributes())});return t}function An(e,t){const o=[];let i=0,s=0;for(const e of t){if(e.offset>i){for(let t=0;t<e.offset-i;t++)o.push("e");s+=e.offset-i}if("insert"==e.type){for(let t=0;t<e.howMany;t++)o.push("i");i=e.offset+e.howMany}else if("remove"==e.type){for(let t=0;t<e.howMany;t++)o.push("r");i=e.offset,s+=e.howMany}else o.push(..."a".repeat(e.howMany).split("")),i=e.offset+e.howMany,s+=e.howMany}if(s<e)for(let t=0;t<e-s-i;t++)o.push("e");return o}function Cn(e){const t="position"in e&&"$graveyard"==e.position.root.rootName,o="range"in e&&"$graveyard"==e.range.root.rootName;return!t&&!o}class Sn{constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set,this._baseVersionToOperationIndex=new Map,this._version=0,this._gaps=new Map}get version(){return this._version}set version(e){this._operations.length&&e>this._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new m.Bb("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const o=this._operations[0];void 0===e&&(e=o.baseVersion);let i=t-1;for(const[t,o]of this._gaps)e>t&&e<o&&(e=o),i>t&&i<o&&(i=t-1);if(i<o.baseVersion||e>this.lastOperation.baseVersion)return[];let s=this._baseVersionToOperationIndex.get(e);void 0===s&&(s=0);let n=this._baseVersionToOperationIndex.get(i);return void 0===n&&(n=this._operations.length-1),this._operations.slice(s,n+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class On extends Vo{constructor(e,t,o="main"){super(t),this._isAttached=!0,this._document=e,this.rootName=o}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}On.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e};var Rn=Object.defineProperty,Mn=Object.defineProperties,jn=Object.getOwnPropertyDescriptors,Bn=Object.getOwnPropertySymbols,Dn=Object.prototype.hasOwnProperty,Vn=Object.prototype.propertyIsEnumerable,In=(e,t,o)=>t in e?Rn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Nn=(e,t)=>{for(var o in t||(t={}))Dn.call(t,o)&&In(e,o,t[o]);if(Bn)for(var o of Bn(t))Vn.call(t,o)&&In(e,o,t[o]);return e},zn=(e,t)=>Mn(e,jn(t));const Fn="$graveyard";class Ln extends((0,m.ln)()){constructor(e){super(),this.model=e,this.history=new Sn,this.selection=new _i(this),this.roots=new m.FE({idProperty:"rootName"}),this.differ=new En(e.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",Fn),this.listenTo(e,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&this.differ.bufferOperation(o)}),{priority:"high"}),this.listenTo(e,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&this.history.addOperation(o)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(e.markers,"update",((e,t,o,i,s)=>{const n=zn(Nn({},t.getData()),{range:i});this.differ.bufferMarkerChange(t.name,s,n),null===o&&t.on("change",((e,o)=>{const i=t.getData();this.differ.bufferMarkerChange(t.name,zn(Nn({},i),{range:o}),i)}))})),this.registerPostFixer((e=>{let t=!1;for(const o of this.roots)o.isAttached()||o.isEmpty||(e.remove(e.createRangeIn(o)),t=!0);for(const o of this.model.markers)o.getRange().root.isAttached()||(e.removeMarker(o),t=!0);return t}))}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(Fn)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new m.Bb("model-document-createroot-name-exists",this,{name:t});const o=new On(this,e,t);return this.roots.add(o),o}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(e=!1){return Array.from(this.roots).filter((t=>t.rootName!=Fn&&(e||t.isAttached()))).map((e=>e.rootName))}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=w(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,o=t.schema,i=t.createPositionFromPath(e,[0]);return o.getNearestSelectionRange(i)||t.createRange(i)}_validateSelectionRange(e){return Zn(e.start)&&Zn(e.end)}_callPostFixers(e){let t=!1;do{for(const o of this._postFixers)if(this.selection.refresh(),t=o(e),t)break}while(t)}}function Zn(e){const t=e.textNode;if(t){const o=t.data,i=e.offset-t.startOffset;return!(0,m.to)(o,i)&&!(0,m.pp)(o,i)}return!0}var Wn=Object.defineProperty,$n=Object.defineProperties,qn=Object.getOwnPropertyDescriptors,Hn=Object.getOwnPropertySymbols,Un=Object.prototype.hasOwnProperty,Kn=Object.prototype.propertyIsEnumerable,Gn=(e,t,o)=>t in e?Wn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class Jn extends((0,m.ln)()){constructor(){super(...arguments),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof Yn?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,o=!1,i=!1){const s=e instanceof Yn?e.name:e;if(s.includes(","))throw new m.Bb("markercollection-incorrect-marker-name",this);const n=this._markers.get(s);if(n){const e=n.getData(),r=n.getRange();let a=!1;return r.isEqual(t)||(n._attachLiveRange(fi.fromRange(t)),a=!0),o!=n.managedUsingOperations&&(n._managedUsingOperations=o,a=!0),"boolean"==typeof i&&i!=n.affectsData&&(n._affectsData=i,a=!0),a&&this.fire(`update:${s}`,n,r,t,e),n}const r=fi.fromRange(t),a=new Yn(s,r,o,i);var c;return this._markers.set(s,a),this.fire(`update:${s}`,a,null,t,(c=((e,t)=>{for(var o in t||(t={}))Un.call(t,o)&&Gn(e,o,t[o]);if(Hn)for(var o of Hn(t))Kn.call(t,o)&&Gn(e,o,t[o]);return e})({},a.getData()),$n(c,qn({range:null})))),a}_remove(e){const t=e instanceof Yn?e.name:e,o=this._markers.get(t);return!!o&&(this._markers.delete(t),this.fire(`update:${t}`,o,o.getRange(),null,o.getData()),this._destroyMarker(o),!0)}_refresh(e){const t=e instanceof Yn?e.name:e,o=this._markers.get(t);if(!o)throw new m.Bb("markercollection-refresh-marker-not-exists",this);const i=o.getRange();this.fire(`update:${t}`,o,i,i,o.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class Yn extends((0,m.ln)(Ro)){constructor(e,t,o,i){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=o,this._affectsData=i}get managedUsingOperations(){if(!this._liveRange)throw new m.Bb("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new m.Bb("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new m.Bb("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new m.Bb("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new m.Bb("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Yn.prototype.is=function(e){return"marker"===e||"model:marker"===e};class Xn extends Is{constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new m.Bb("detach-operation-on-document-node",this)}_execute(){zs(qo._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class Qn extends Ro{constructor(e){super(),this.markers=new Map,this._children=new jo,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const o of e)t=t.getChild(t.offsetToIndex(o));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const o of e)o.name?t.push(Vo.fromJSON(o)):t.push(Bo.fromJSON(o));return new Qn(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const o=function(e){if("string"==typeof e)return[new Bo(e)];(0,m.TW)(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Bo(e):e instanceof Do?new Bo(e.data,e.getAttributes()):e))}(t);for(const e of o)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,o)}_removeChildren(e,t=1){const o=this._children._removeNodes(e,t);for(const e of o)e.parent=null;return o}}Qn.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e};class er{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new Bo(e,t)}createElement(e,t){return new Vo(e,t)}createDocumentFragment(){return new Qn}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,o=0){if(this._assertWriterUsedCorrectly(),e instanceof Bo&&""==e.data)return;const i=zo._createAt(t,o);if(e.parent){if(nr(e.root,i.root))return void this.move(qo._createOn(e),i);if(e.root.document)throw new m.Bb("model-writer-insert-forbidden-move",this);this.remove(e)}const s=i.root.document?i.root.document.version:null,n=new Hs(i,e,s);if(e instanceof Bo&&(n.shouldReceiveAttributes=!0),this.batch.addOperation(n),this.model.applyOperation(n),e instanceof Qn)for(const[t,o]of e.markers){const e=zo._createAt(o.root,0),s={range:new qo(o.start._getCombined(e,i),o.end._getCombined(e,i)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,s):this.addMarker(t,s)}}insertText(e,t,o,i){t instanceof Qn||t instanceof Vo||t instanceof zo?this.insert(this.createText(e),t,o):this.insert(this.createText(e,t),o,i)}insertElement(e,t,o,i){t instanceof Qn||t instanceof Vo||t instanceof zo?this.insert(this.createElement(e),t,o):this.insert(this.createElement(e,t),o,i)}append(e,t){this.insert(e,t,"end")}appendText(e,t,o){t instanceof Qn||t instanceof Vo?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),o,"end")}appendElement(e,t,o){t instanceof Qn||t instanceof Vo?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),o,"end")}setAttribute(e,t,o){if(this._assertWriterUsedCorrectly(),o instanceof qo){const i=o.getMinimalFlatRanges();for(const o of i)tr(this,e,t,o)}else or(this,e,t,o)}setAttributes(e,t){for(const[o,i]of(0,m.qL)(e))this.setAttribute(o,i,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof qo){const o=t.getMinimalFlatRanges();for(const t of o)tr(this,e,null,t)}else or(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof qo)for(const o of e.getItems())t(o);else t(e)}move(e,t,o){if(this._assertWriterUsedCorrectly(),!(e instanceof qo))throw new m.Bb("writer-move-invalid-range",this);if(!e.isFlat)throw new m.Bb("writer-move-range-not-flat",this);const i=zo._createAt(t,o);if(i.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!nr(e.root,i.root))throw new m.Bb("writer-move-different-document",this);const s=e.root.document?e.root.document.version:null,n=new qs(e.start,e.end.offset-e.start.offset,i,s);this.batch.addOperation(n),this.model.applyOperation(n)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof qo?e:qo._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),sr(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,o=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof Vo))throw new m.Bb("writer-merge-no-element-before",this);if(!(o instanceof Vo))throw new m.Bb("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,o){return this.model.createPositionFromPath(e,t,o)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const t=e.nodeBefore,o=e.nodeAfter;this.move(qo._createIn(o),zo._createAt(t,"end")),this.remove(o)}_merge(e){const t=zo._createAt(e.nodeBefore,"end"),o=zo._createAt(e.nodeAfter,0),i=e.root.document.graveyard,s=new zo(i,[0]),n=e.root.document.version,r=new Ks(o,e.nodeAfter.maxOffset,t,s,n);this.batch.addOperation(r),this.model.applyOperation(r)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof Vo))throw new m.Bb("writer-rename-not-element-instance",this);const o=e.root.document?e.root.document.version:null,i=new Qs(zo._createBefore(e),e.name,t,o);this.batch.addOperation(i),this.model.applyOperation(i)}split(e,t){this._assertWriterUsedCorrectly();let o,i,s=e.parent;if(!s.parent)throw new m.Bb("writer-split-element-no-parent",this);if(t||(t=s.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new m.Bb("writer-split-invalid-limit-element",this);do{const t=s.root.document?s.root.document.version:null,n=s.maxOffset-e.offset,r=Us.getInsertionPosition(e),a=new Us(e,n,r,null,t);this.batch.addOperation(a),this.model.applyOperation(a),o||i||(o=s,i=e.parent.nextSibling),s=(e=this.createPositionAfter(e.parent)).parent}while(s!==t);return{position:e,range:new qo(zo._createAt(o,"end"),zo._createAt(i,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new m.Bb("writer-wrap-range-not-flat",this);const o=t instanceof Vo?t:new Vo(t);if(o.childCount>0)throw new m.Bb("writer-wrap-element-not-empty",this);if(null!==o.parent)throw new m.Bb("writer-wrap-element-attached",this);this.insert(o,e.start);const i=new qo(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(i,zo._createAt(o,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new m.Bb("writer-unwrap-element-no-parent",this);this.move(qo._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new m.Bb("writer-addmarker-no-usingoperation",this);const o=t.usingOperation,i=t.range,s=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new m.Bb("writer-addmarker-marker-exists",this);if(!i)throw new m.Bb("writer-addmarker-no-range",this);return o?(ir(this,e,null,i,s),this.model.markers.get(e)):this.model.markers._set(e,i,o,s)}updateMarker(e,t){this._assertWriterUsedCorrectly();const o="string"==typeof e?e:e.name,i=this.model.markers.get(o);if(!i)throw new m.Bb("writer-updatemarker-marker-not-exists",this);if(!t)return(0,m.KE)("writer-updatemarker-reconvert-using-editingcontroller",{markerName:o}),void this.model.markers._refresh(i);const s="boolean"==typeof t.usingOperation,n="boolean"==typeof t.affectsData,r=n?t.affectsData:i.affectsData;if(!s&&!t.range&&!n)throw new m.Bb("writer-updatemarker-wrong-options",this);const a=i.getRange(),c=t.range?t.range:a;s&&t.usingOperation!==i.managedUsingOperations?t.usingOperation?ir(this,o,null,c,r):(ir(this,o,a,null,r),this.model.markers._set(o,c,void 0,r)):i.managedUsingOperations?ir(this,o,a,c,r):this.model.markers._set(o,c,void 0,r)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new m.Bb("writer-removemarker-no-marker",this);const o=this.model.markers.get(t);if(!o.managedUsingOperations)return void this.model.markers._remove(t);ir(this,t,o.getRange(),null,o.affectsData)}addRoot(e,t="$root"){this._assertWriterUsedCorrectly();const o=this.model.document.getRoot(e);if(o&&o.isAttached())throw new m.Bb("writer-addroot-root-exists",this);const i=this.model.document,s=new tn(e,t,!0,i,i.version);return this.batch.addOperation(s),this.model.applyOperation(s),this.model.document.getRoot(e)}detachRoot(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?this.model.document.getRoot(e):e;if(!t||!t.isAttached())throw new m.Bb("writer-detachroot-no-root",this);for(const e of this.model.markers)e.getRange().root===t&&this.removeMarker(e);for(const e of t.getAttributeKeys())this.removeAttribute(e,t);this.remove(this.createRangeIn(t));const o=this.model.document,i=new tn(t.rootName,t.name,!1,o,o.version);this.batch.addOperation(i),this.model.applyOperation(i)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,o]of(0,m.qL)(e))this._setSelectionAttribute(t,o)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const o=this.model.document.selection;if(o.isCollapsed&&o.anchor.parent.isEmpty){const i=_i._getStoreAttributeKey(e);this.setAttribute(i,t,o.anchor.parent)}o._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const o=_i._getStoreAttributeKey(e);this.removeAttribute(o,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new m.Bb("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const o of this.model.markers){if(!o.managedUsingOperations)continue;const i=o.getRange();let s=!1;if("move"===e){const e=t;s=e.containsPosition(i.start)||e.start.isEqual(i.start)||e.containsPosition(i.end)||e.end.isEqual(i.end)}else{const e=t,o=e.nodeBefore,n=e.nodeAfter,r=i.start.parent==o&&i.start.isAtEnd,a=i.end.parent==n&&0==i.end.offset,c=i.end.nodeAfter==n,l=i.start.nodeAfter==n;s=r||a||c||l}s&&this.updateMarker(o.name,{range:i})}}}function tr(e,t,o,i){const s=e.model,n=s.document;let r,a,c,l=i.start;for(const e of i.getWalker({shallow:!0}))c=e.item.getAttribute(t),r&&a!=c&&(a!=o&&d(),l=r),r=e.nextPosition,a=c;function d(){const i=new qo(l,r),c=i.root.document?n.version:null,d=new Ys(i,t,a,o,c);e.batch.addOperation(d),s.applyOperation(d)}r instanceof zo&&r!=l&&a!=o&&d()}function or(e,t,o,i){const s=e.model,n=s.document,r=i.getAttribute(t);let a,c;if(r!=o){if(i.root===i){const e=i.document?n.version:null;c=new en(i,t,r,o,e)}else{a=new qo(zo._createBefore(i),e.createPositionAfter(i));const s=a.root.document?n.version:null;c=new Ys(a,t,r,o,s)}e.batch.addOperation(c),s.applyOperation(c)}}function ir(e,t,o,i,s){const n=e.model,r=n.document,a=new Gs(t,o,i,n.markers,!!s,r.version);e.batch.addOperation(a),n.applyOperation(a)}function sr(e,t,o,i){let s;if(e.root.document){const o=i.document,n=new zo(o.graveyard,[0]);s=new qs(e,t,n,o.version)}else s=new Xn(e,t);o.addOperation(s),i.applyOperation(s)}function nr(e,t){return e===t||e instanceof On&&t instanceof On}function rr(e,t,o={}){if(t.isCollapsed)return;const i=t.getFirstRange();if("$graveyard"==i.root.rootName)return;const s=e.schema;e.change((e=>{if(!o.doNotResetEntireContent&&function(e,t){const o=e.getLimitElement(t);if(!t.containsEntireContent(o))return!1;const i=t.getFirstRange();if(i.start.parent==i.end.parent)return!1;return e.checkChild(o,"paragraph")}(s,t))return void function(e,t){const o=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(o)),dr(e,e.createPositionAt(o,0),t)}(e,t);const n={};if(!o.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(n,s.getAttributesWithProperty(e,"copyOnReplace",!0))}const[r,a]=function(e){const t=e.root.document.model,o=e.start;let i=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const o=function(e){const t=e.parent,o=t.root.document.model.schema,i=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of i){if(o.isLimit(e))return null;if(o.isBlock(e))return e}}(i);if(o&&i.isTouching(t.createPositionAt(o,0))){const o=t.createSelection(e);t.modifySelection(o,{direction:"backward"});const s=o.getLastPosition(),n=t.createRange(s,i);t.hasContent(n,{ignoreMarkers:!0})||(i=s)}}return[mn.fromPosition(o,"toPrevious"),mn.fromPosition(i,"toNext")]}(i);r.isTouching(a)||e.remove(e.createRange(r,a)),o.leaveUnmerged||(!function(e,t,o){const i=e.model;if(!lr(e.model.schema,t,o))return;const[s,n]=function(e,t){const o=e.getAncestors(),i=t.getAncestors();let s=0;for(;o[s]&&o[s]==i[s];)s++;return[o[s],i[s]]}(t,o);if(!s||!n)return;!i.hasContent(s,{ignoreMarkers:!0})&&i.hasContent(n,{ignoreMarkers:!0})?cr(e,t,o,s.parent):ar(e,t,o,s.parent)}(e,r,a),s.removeDisallowedAttributes(r.parent.getChildren(),e)),hr(e,t,r),!o.doNotAutoparagraph&&function(e,t){const o=e.checkChild(t,"$text"),i=e.checkChild(t,"paragraph");return!o&&i}(s,r)&&dr(e,r,t,n),r.detach(),a.detach()}))}function ar(e,t,o,i){const s=t.parent,n=o.parent;if(s!=i&&n!=i){for(t=e.createPositionAfter(s),(o=e.createPositionBefore(n)).isEqual(t)||e.insert(n,t),e.merge(t);o.parent.isEmpty;){const t=o.parent;o=e.createPositionBefore(t),e.remove(t)}lr(e.model.schema,t,o)&&ar(e,t,o,i)}}function cr(e,t,o,i){const s=t.parent,n=o.parent;if(s!=i&&n!=i){for(t=e.createPositionAfter(s),(o=e.createPositionBefore(n)).isEqual(t)||e.insert(s,o);t.parent.isEmpty;){const o=t.parent;t=e.createPositionBefore(o),e.remove(o)}o=e.createPositionBefore(n),function(e,t){const o=t.nodeBefore,i=t.nodeAfter;o.name!=i.name&&e.rename(o,i.name);e.clearAttributes(o),e.setAttributes(Object.fromEntries(i.getAttributes()),o),e.merge(t)}(e,o),lr(e.model.schema,t,o)&&cr(e,t,o,i)}}function lr(e,t,o){const i=t.parent,s=o.parent;return i!=s&&(!e.isLimit(i)&&!e.isLimit(s)&&function(e,t,o){const i=new qo(e,t);for(const e of i.getWalker())if(o.isLimit(e.item))return!1;return!0}(t,o,e))}function dr(e,t,o,i={}){const s=e.createElement("paragraph");e.model.schema.setAllowedAttributes(s,i,e),e.insert(s,t),hr(e,o,e.createPositionAt(s,0))}function hr(e,t,o){t instanceof _i?e.setSelection(o):t.setTo(o)}function ur(e,t){const o=[];Array.from(e.getItems({direction:"backward"})).map((e=>t.createRangeOn(e))).filter((t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end)))).forEach((e=>{o.push(e.start.parent),t.remove(e)})),o.forEach((e=>{let o=e;for(;o.parent&&o.isEmpty;){const e=t.createRangeOn(o);o=o.parent,t.remove(e)}}))}class pr{constructor(e,t,o){this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null,this._nodeToSelect=null,this.model=e,this.writer=t,this.position=o,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0)}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),o=this.writer.createPositionAfter(e);if(o.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new m.Bb("insertcontent-invalid-insertion-position",this);this.position=o,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?qo._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new qo(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(this.schema.isObject(e))return void this._handleObject(e);let t=this._checkAndAutoParagraphToAllowedPosition(e);t||(t=this._checkAndSplitToAllowedPosition(e),t)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=mn.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleObject(e){this._checkAndSplitToAllowedPosition(e)?this._appendToFragment(e):this._tryAutoparagraphing(e)}_handleDisallowedNode(e){e.is("element")?this.handleNodes(e.getChildren()):this._tryAutoparagraphing(e)}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new m.Bb("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=mn.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=mn.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof Vo))return;if(!this._canMergeLeft(e))return;const t=mn._createBefore(e);t.stickiness="toNext";const o=mn.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=mn._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=mn._createAt(t.nodeBefore,"end","toNext")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof Vo))return;if(!this._canMergeRight(e))return;const t=mn._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new m.Bb("insertcontent-invalid-insertion-position",this);this.position=zo._createAt(t.nodeBefore,"end");const o=mn.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=mn._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=mn._createAt(t.nodeBefore,0,"toPrevious")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof Vo&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof Vo&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_tryAutoparagraphing(e){const t=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,t)&&this.schema.checkChild(t,e)&&(t._appendChild(e),this._handleNode(t))}_checkAndAutoParagraphToAllowedPosition(e){if(this.schema.checkChild(this.position.parent,e))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",e))return!1;this._insertPartialFragment();const t=this.writer.createElement("paragraph");return this.writer.insert(t,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=t,this.position=this.writer.createPositionAt(t,0),!0}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}function fr(e,t,o="auto"){const i=e.getSelectedElement();if(i&&t.schema.isObject(i)&&!t.schema.isInline(i))return"before"==o||"after"==o?t.createRange(t.createPositionAt(i,o)):t.createRangeOn(i);const s=(0,m.Ps)(e.getSelectedBlocks());if(!s)return t.createRange(e.focus);if(s.isEmpty)return t.createRange(t.createPositionAt(s,0));const n=t.createPositionAfter(s);return e.focus.isTouching(n)?t.createRange(n):t.createRange(t.createPositionBefore(s))}function gr(e,t,o,i={}){if(!e.schema.isObject(t))throw new m.Bb("insertobject-element-not-an-object",e,{object:t});const s=o||e.document.selection;let n=s;i.findOptimalPosition&&e.schema.isBlock(t)&&(n=e.createSelection(fr(s,e,i.findOptimalPosition)));const r=(0,m.Ps)(s.getSelectedBlocks()),a={};return r&&Object.assign(a,e.schema.getAttributesWithProperty(r,"copyOnReplace",!0)),e.change((o=>{n.isCollapsed||e.deleteContent(n,{doNotAutoparagraph:!0});let s=t;const r=n.anchor.parent;!e.schema.checkChild(r,t)&&e.schema.checkChild(r,"paragraph")&&e.schema.checkChild("paragraph",t)&&(s=o.createElement("paragraph"),o.insert(t,s)),e.schema.setAllowedAttributes(s,a,o);const c=e.insertContent(s,n);return c.isCollapsed||i.setSelection&&function(e,t,o,i){const s=e.model;if("on"==o)return void e.setSelection(t,"on");if("after"!=o)throw new m.Bb("insertobject-invalid-place-parameter-value",s);let n=t.nextSibling;if(s.schema.isInline(t))return void e.setSelection(t,"after");const r=n&&s.schema.checkChild(n,"$text");!r&&s.schema.checkChild(t.parent,"paragraph")&&(n=e.createElement("paragraph"),s.schema.setAllowedAttributes(n,i,e),s.insertContent(n,e.createPositionAfter(t)));n&&e.setSelection(n,0)}(o,t,i.setSelection,a),c}))}const mr=' ,.?!:;"-()';function br(e,t){const{isForward:o,walker:i,unit:s,schema:n,treatEmojiAsSingleUnit:r}=e,{type:a,item:c,nextPosition:l}=t;if("text"==a)return"word"===e.unit?function(e,t){let o=e.position.textNode;o||(o=t?e.position.nodeAfter:e.position.nodeBefore);for(;o&&o.is("$text");){const i=e.position.offset-o.startOffset;if(kr(o,i,t))o=t?e.position.nodeAfter:e.position.nodeBefore;else{if(wr(o.data,i,t))break;e.next()}}return e.position}(i,o):function(e,t,o){const i=e.position.textNode;if(i){const s=i.data;let n=e.position.offset-i.startOffset;for(;(0,m.to)(s,n)||"character"==t&&(0,m.pp)(s,n)||o&&(0,m.YK)(s,n);)e.next(),n=e.position.offset-i.startOffset}return e.position}(i,s,r);if(a==(o?"elementStart":"elementEnd")){if(n.isSelectable(c))return zo._createAt(c,o?"after":"before");if(n.checkChild(l,"$text"))return l}else{if(n.isLimit(c))return void i.skip((()=>!0));if(n.checkChild(l,"$text"))return l}}function _r(e,t){const o=e.root,i=zo._createAt(o,t?"end":0);return t?new qo(e,i):new qo(i,e)}function wr(e,t,o){const i=t+(o?0:-1);return mr.includes(e.charAt(i))}function kr(e,t,o){return t===(o?e.offsetSize:0)}class vr extends((0,m.Re)()){constructor(){super(),this.markers=new Jn,this.document=new Ln(this),this.schema=new as,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((e=>this.decorate(e))),this.on("applyOperation",((e,t)=>{t[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((e,t)=>{if("$marker"===t.name)return!0})),Qi(this),this.document.registerPostFixer(Vi),this.on("insertContent",((e,[t,o])=>{e.return=function(e,t,o){return e.change((i=>{const s=o||e.document.selection;s.isCollapsed||e.deleteContent(s,{doNotAutoparagraph:!0});const n=new pr(e,i,s.anchor),r=[];let a;if(t.is("documentFragment")){if(t.markers.size){const e=[];for(const[o,i]of t.markers){const{start:t,end:s}=i,n=t.isEqual(s);e.push({position:t,name:o,isCollapsed:n},{position:s,name:o,isCollapsed:n})}e.sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:o,name:s,isCollapsed:n}of e){let e=null,a=null;const c=o.parent===t&&o.isAtStart,l=o.parent===t&&o.isAtEnd;c||l?n&&(a=c?"start":"end"):(e=i.createElement("$marker"),i.insert(e,o)),r.push({name:s,element:e,collapsed:a})}}a=t.getChildren()}else a=[t];n.handleNodes(a);let c=n.getSelectionRange();if(t.is("documentFragment")&&r.length){const e=c?fi.fromRange(c):null,t={};for(let e=r.length-1;e>=0;e--){const{name:o,element:s,collapsed:a}=r[e],c=!t[o];if(c&&(t[o]=[]),s){const e=i.createPositionAt(s,"before");t[o].push(e),i.remove(s)}else{const e=n.getAffectedRange();if(!e){a&&t[o].push(n.position);continue}a?t[o].push(e[a]):t[o].push(c?e.start:e.end)}}for(const[e,[o,s]]of Object.entries(t))o&&s&&o.root===s.root&&i.addMarker(e,{usingOperation:!0,affectsData:!0,range:new qo(o,s)});e&&(c=e.toRange(),e.detach())}c&&(s instanceof _i?i.setSelection(c):s.setTo(c));const l=n.getAffectedRange()||e.createRange(s.anchor);return n.destroy(),l}))}(this,t,o)})),this.on("insertObject",((e,[t,o,i])=>{e.return=gr(this,t,o,i)})),this.on("canEditAt",(e=>{const t=!this.document.isReadOnly;e.return=t,t||e.stop()}))}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new wn,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){m.Bb.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new wn):e instanceof wn||(e=new wn(e)):e=new wn,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){m.Bb.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,o,...i){const s=yr(t,o);return this.fire("insertContent",[e,s,o,...i])}insertObject(e,t,o,i,...s){const n=yr(t,o);return this.fire("insertObject",[e,n,i,i,...s])}deleteContent(e,t){rr(this,e,t)}modifySelection(e,t){!function(e,t,o={}){const i=e.schema,s="backward"!=o.direction,n=o.unit?o.unit:"character",r=!!o.treatEmojiAsSingleUnit,a=t.focus,c=new Io({boundaries:_r(a,s),singleCharacters:!0,direction:s?"forward":"backward"}),l={walker:c,schema:i,isForward:s,unit:n,treatEmojiAsSingleUnit:r};let d;for(;d=c.next();){if(d.done)return;const o=br(l,d.value);if(o)return void(t instanceof _i?e.change((e=>{e.setSelectionFocus(o)})):t.setFocus(o))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change((e=>{const o=e.createDocumentFragment(),i=t.getFirstRange();if(!i||i.isCollapsed)return o;const s=i.start.root,n=i.start.getCommonPath(i.end),r=s.getNodeByPath(n);let a;a=i.start.parent==i.end.parent?i:e.createRange(e.createPositionAt(r,i.start.path[n.length]),e.createPositionAt(r,i.end.path[n.length]+1));const c=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),o):e.append(e.cloneElement(t,!0),o);if(a!=i){const t=i._getTransformedByMove(a.start,e.createPositionAt(o,0),c)[0],s=e.createRange(e.createPositionAt(o,0),t.start);ur(e.createRange(t.end,e.createPositionAt(o,"end")),e),ur(s,e)}return o}))}(this,e)}hasContent(e,t={}){const o=e instanceof qo?e:qo._createIn(e);if(o.isCollapsed)return!1;const{ignoreWhitespaces:i=!1,ignoreMarkers:s=!1}=t;if(!s)for(const e of this.markers.getMarkersIntersectingRange(o))if(e.affectsData)return!0;for(const e of o.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!i)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}canEditAt(e){const t=yr(e);return this.fire("canEditAt",[t])}createPositionFromPath(e,t,o){return new zo(e,t,o)}createPositionAt(e,t){return zo._createAt(e,t)}createPositionAfter(e){return zo._createAfter(e)}createPositionBefore(e){return zo._createBefore(e)}createRange(e,t){return new qo(e,t)}createRangeIn(e){return qo._createIn(e)}createRangeOn(e){return qo._createOn(e)}createSelection(...e){return new ai(...e)}createBatch(e){return new wn(e)}createOperationFromJSON(e){return sn.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new er(this,t);const o=this._pendingChanges[0].callback(this._currentWriter);e.push(o),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}}function yr(e,t){if(e)return e instanceof ai||e instanceof _i?e:e instanceof Mo?t||0===t?new ai(e,t):e.is("rootElement")?new ai(e,"in"):new ai(e,"on"):new ai(e)}class xr extends $t{constructor(){super(...arguments),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}class Pr extends $t{constructor(){super(...arguments),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(e){this.fire(e.type,e)}}class Er{constructor(e){this.document=e}createDocumentFragment(e){return new it(this.document,e)}createElement(e,t,o){return new Te(this.document,e,t,o)}createText(e){return new v(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,o){return o._insertChild(e,t)}removeChildren(e,t,o){return o._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const o=e.parent;if(o){const i=o.getChildIndex(e);return this.removeChildren(i,1,o),this.insertChild(i,t,o),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const o=t.getChildIndex(e);this.remove(e),this.insertChild(o,e.getChildren(),t)}}rename(e,t){const o=new Te(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,o)?o:null}setAttribute(e,t,o){o._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,o){(0,x.Z)(e)&&void 0===o?t._setStyle(e):o._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,o){o._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return Be._createAt(e,t)}createPositionAfter(e){return Be._createAfter(e)}createPositionBefore(e){return Be._createBefore(e)}createRange(e,t){return new De(e,t)}createRangeOn(e){return De._createOn(e)}createRangeIn(e){return De._createIn(e)}createSelection(...e){return new Ie(...e)}}const Tr=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Ar=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,Cr=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,Sr=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,Or=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,Rr=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function Mr(e){return e.startsWith("#")?Tr.test(e):e.startsWith("rgb")?Ar.test(e)||Cr.test(e):e.startsWith("hsl")?Sr.test(e)||Or.test(e):Rr.has(e.toLowerCase())}const jr=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function Br(e){return jr.includes(e)}const Dr=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function Vr(e){return Dr.test(e)}const Ir=/^[+-]?[0-9]*([.][0-9]+)?%$/;function Nr(e){return Ir.test(e)}const zr=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function Fr(e){return zr.includes(e)}const Lr=["center","top","bottom","left","right"];function Zr(e){return Lr.includes(e)}const Wr=["fixed","scroll","local"];function $r(e){return Wr.includes(e)}const qr=/^url\(/;function Hr(e){return qr.test(e)}function Ur(e=""){if(""===e)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const t=Yr(e),o=t[0],i=t[2]||o,s=t[1]||o;return{top:o,bottom:i,right:s,left:t[3]||s}}function Kr(e){return t=>{const{top:o,right:i,bottom:s,left:n}=t,r=[];return[o,i,n,s].every((e=>!!e))?r.push([e,Gr(t)]):(o&&r.push([e+"-top",o]),i&&r.push([e+"-right",i]),s&&r.push([e+"-bottom",s]),n&&r.push([e+"-left",n])),r}}function Gr({top:e,right:t,bottom:o,left:i}){const s=[];return i!==t?s.push(e,t,o,i):o!==e?s.push(e,t,o):t!==e?s.push(e,t):s.push(e),s.join(" ")}function Jr(e){return t=>({path:e,value:Ur(t)})}function Yr(e){return e.replace(/, /g,",").split(" ").map((e=>e.replace(/,/g,", ")))}function Xr(e){e.setNormalizer("background",(e=>{const t={},o=Yr(e);for(const e of o)Fr(e)?(t.repeat=t.repeat||[],t.repeat.push(e)):Zr(e)?(t.position=t.position||[],t.position.push(e)):$r(e)?t.attachment=e:Mr(e)?t.color=e:Hr(e)&&(t.image=e);return{path:"background",value:t}})),e.setNormalizer("background-color",(e=>({path:"background.color",value:e}))),e.setReducer("background",(e=>{const t=[];return t.push(["background-color",e.color]),t})),e.setStyleRelation("background",["background-color"])}function Qr(e){e.setNormalizer("border",(e=>{const{color:t,style:o,width:i}=ra(e);return{path:"border",value:{color:Ur(t),style:Ur(o),width:Ur(i)}}})),e.setNormalizer("border-top",ea("top")),e.setNormalizer("border-right",ea("right")),e.setNormalizer("border-bottom",ea("bottom")),e.setNormalizer("border-left",ea("left")),e.setNormalizer("border-color",ta("color")),e.setNormalizer("border-width",ta("width")),e.setNormalizer("border-style",ta("style")),e.setNormalizer("border-top-color",ia("color","top")),e.setNormalizer("border-top-style",ia("style","top")),e.setNormalizer("border-top-width",ia("width","top")),e.setNormalizer("border-right-color",ia("color","right")),e.setNormalizer("border-right-style",ia("style","right")),e.setNormalizer("border-right-width",ia("width","right")),e.setNormalizer("border-bottom-color",ia("color","bottom")),e.setNormalizer("border-bottom-style",ia("style","bottom")),e.setNormalizer("border-bottom-width",ia("width","bottom")),e.setNormalizer("border-left-color",ia("color","left")),e.setNormalizer("border-left-style",ia("style","left")),e.setNormalizer("border-left-width",ia("width","left")),e.setExtractor("border-top",sa("top")),e.setExtractor("border-right",sa("right")),e.setExtractor("border-bottom",sa("bottom")),e.setExtractor("border-left",sa("left")),e.setExtractor("border-top-color","border.color.top"),e.setExtractor("border-right-color","border.color.right"),e.setExtractor("border-bottom-color","border.color.bottom"),e.setExtractor("border-left-color","border.color.left"),e.setExtractor("border-top-width","border.width.top"),e.setExtractor("border-right-width","border.width.right"),e.setExtractor("border-bottom-width","border.width.bottom"),e.setExtractor("border-left-width","border.width.left"),e.setExtractor("border-top-style","border.style.top"),e.setExtractor("border-right-style","border.style.right"),e.setExtractor("border-bottom-style","border.style.bottom"),e.setExtractor("border-left-style","border.style.left"),e.setReducer("border-color",Kr("border-color")),e.setReducer("border-style",Kr("border-style")),e.setReducer("border-width",Kr("border-width")),e.setReducer("border-top",aa("top")),e.setReducer("border-right",aa("right")),e.setReducer("border-bottom",aa("bottom")),e.setReducer("border-left",aa("left")),e.setReducer("border",function(){return t=>{const o=na(t,"top"),i=na(t,"right"),s=na(t,"bottom"),n=na(t,"left"),r=[o,i,s,n],a={width:e(r,"width"),style:e(r,"style"),color:e(r,"color")},c=ca(a,"all");if(c.length)return c;return[...Object.entries(a).reduce(((e,[t,o])=>(o&&(e.push([`border-${t}`,o]),r.forEach((e=>delete e[t]))),e)),[]),...ca(o,"top"),...ca(i,"right"),...ca(s,"bottom"),...ca(n,"left")]};function e(e,t){return e.map((e=>e[t])).reduce(((e,t)=>e==t?e:null))}}()),e.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),e.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),e.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),e.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),e.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),e.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function ea(e){return t=>{const{color:o,style:i,width:s}=ra(t),n={};return void 0!==o&&(n.color={[e]:o}),void 0!==i&&(n.style={[e]:i}),void 0!==s&&(n.width={[e]:s}),{path:"border",value:n}}}function ta(e){return t=>({path:"border",value:oa(t,e)})}function oa(e,t){return{[t]:Ur(e)}}function ia(e,t){return o=>({path:"border",value:{[e]:{[t]:o}}})}function sa(e){return(t,o)=>{if(o.border)return na(o.border,e)}}function na(e,t){const o={};return e.width&&e.width[t]&&(o.width=e.width[t]),e.style&&e.style[t]&&(o.style=e.style[t]),e.color&&e.color[t]&&(o.color=e.color[t]),o}function ra(e){const t={},o=Yr(e);for(const e of o)Vr(e)||/thin|medium|thick/.test(e)?t.width=e:Br(e)?t.style=e:t.color=e;return t}function aa(e){return t=>ca(t,e)}function ca(e,t){const o=[];if(e&&e.width&&o.push("width"),e&&e.style&&o.push("style"),e&&e.color&&o.push("color"),3==o.length){const i=o.map((t=>e[t])).join(" ");return["all"==t?["border",i]:[`border-${t}`,i]]}return"all"==t?[]:o.map((o=>[`border-${t}-${o}`,e[o]]))}function la(e){e.setNormalizer("margin",Jr("margin")),e.setNormalizer("margin-top",(e=>({path:"margin.top",value:e}))),e.setNormalizer("margin-right",(e=>({path:"margin.right",value:e}))),e.setNormalizer("margin-bottom",(e=>({path:"margin.bottom",value:e}))),e.setNormalizer("margin-left",(e=>({path:"margin.left",value:e}))),e.setReducer("margin",Kr("margin")),e.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}function da(e){e.setNormalizer("padding",Jr("padding")),e.setNormalizer("padding-top",(e=>({path:"padding.top",value:e}))),e.setNormalizer("padding-right",(e=>({path:"padding.right",value:e}))),e.setNormalizer("padding-bottom",(e=>({path:"padding.bottom",value:e}))),e.setNormalizer("padding-left",(e=>({path:"padding.left",value:e}))),e.setReducer("padding",Kr("padding")),e.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}},"./packages/ckeditor5-enter/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{C:()=>h,G:()=>g});var i=o("./packages/ckeditor5-core/src/index.ts");function*s(e,t){for(const o of t)o&&e.getAttributeProperties(o[0]).copyOnEnter&&(yield o)}class n extends i.mY{execute(){this.editor.model.change((e=>{this.enterBlock(e),this.fire("afterExecute",{writer:e})}))}enterBlock(e){const t=this.editor.model,o=t.document.selection,i=t.schema,n=o.isCollapsed,a=o.getFirstRange(),c=a.start.parent,l=a.end.parent;if(i.isLimit(c)||i.isLimit(l))return n||c!=l||t.deleteContent(o),!1;if(n){const t=s(e.model.schema,o.getAttributes());return r(e,a.start),e.setSelectionAttribute(t),!0}{const i=!(a.start.isAtStart&&a.end.isAtEnd),s=c==l;if(t.deleteContent(o,{leaveUnmerged:i}),i){if(s)return r(e,o.focus),!0;e.setSelection(l,0)}}return!1}}function r(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}var a=o("./packages/ckeditor5-engine/src/index.ts"),c=o("./packages/ckeditor5-utils/src/index.ts");const l={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class d extends a.Qj{constructor(e){super(e);const t=this.document;let o=!1;t.on("keydown",((e,t)=>{o=t.shiftKey})),t.on("beforeinput",((i,s)=>{if(!this.isEnabled)return;let n=s.inputType;c.OB.isSafari&&o&&"insertParagraph"==n&&(n="insertLineBreak");const r=s.domEvent,d=l[n];if(!d)return;const h=new a.r7(t,"enter",s.targetRanges[0]);t.fire(h,new a.dK(e,r,{isSoft:d.isSoft})),h.stop.called&&i.stop()}))}observe(){}stopObserving(){}}class h extends i.Sy{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,o=t.document;t.addObserver(d),e.commands.add("enter",new n(e)),this.listenTo(o,"enter",((i,s)=>{o.isComposing||s.preventDefault(),s.isSoft||(e.execute("enter"),t.scrollToTheSelection())}),{priority:"low"})}}class u extends i.mY{execute(){const e=this.editor.model,t=e.document;e.change((o=>{!function(e,t,o){const i=o.isCollapsed,n=o.getFirstRange(),r=n.start.parent,a=n.end.parent,c=r==a;if(i){const i=s(e.schema,o.getAttributes());p(e,t,n.end),t.removeSelectionAttribute(o.getAttributeKeys()),t.setSelectionAttribute(i)}else{const i=!(n.start.isAtStart&&n.end.isAtEnd);e.deleteContent(o,{leaveUnmerged:i}),c?p(e,t,o.focus):i&&t.setSelection(a,0)}}(e,o,t.selection),this.fire("afterExecute",{writer:o})}))}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const o=t.anchor;if(!o||!e.checkChild(o,"softBreak"))return!1;const i=t.getFirstRange(),s=i.start.parent,n=i.end.parent;if((f(s,e)||f(n,e))&&s!==n)return!1;return!0}(e.schema,t.selection)}}function p(e,t,o){const i=t.createElement("softBreak");e.insertContent(i,o),t.setSelection(i,"after")}function f(e,t){return!e.is("rootElement")&&(t.isLimit(e)||f(e.parent,t))}class g extends i.Sy{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,o=e.conversion,i=e.editing.view,s=i.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),o.for("upcast").elementToElement({model:"softBreak",view:"br"}),o.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),i.addObserver(d),e.commands.add("shiftEnter",new u(e)),this.listenTo(s,"enter",((t,o)=>{s.isComposing||o.preventDefault(),o.isSoft&&(e.execute("shiftEnter"),i.scrollToTheSelection())}),{priority:"low"})}}},"./packages/ckeditor5-typing/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{HG:()=>w,II:()=>d,BT:()=>r,cL:()=>D,uL:()=>y,mh:()=>x,Mq:()=>k,VD:()=>F,r9:()=>L,Up:()=>v,Im:()=>Z});var i=o("./packages/ckeditor5-core/src/index.ts"),s=o("./packages/ckeditor5-utils/src/index.ts");class n{constructor(e,t=20){this._batch=null,this.model=e,this._size=0,this.limit=t,this._isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(e){this._size+=e,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e=!1){this.isLocked&&!e||(this._batch=null,this._size=0)}}class r extends i.mY{constructor(e,t){super(e),this._buffer=new n(e.model,t),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,o=t.document,i=e.text||"",s=i.length;let n=o.selection;if(e.selection?n=e.selection:e.range&&(n=t.createSelection(e.range)),!t.canEditAt(n))return;const r=e.resultRange;t.enqueueChange(this._buffer.batch,(e=>{this._buffer.lock(),t.deleteContent(n),i&&t.insertContent(e.createText(i,o.selection.getAttributes()),n),r?e.setSelection(r):n.is("documentSelection")||e.setSelection(n),this._buffer.unlock(),this._buffer.input(s)}))}}var a=o("./packages/ckeditor5-engine/src/index.ts");const c=["insertText","insertReplacementText"];class l extends a.Qj{constructor(e){super(e),s.OB.isAndroid&&c.push("insertCompositionText");const t=e.document;t.on("beforeinput",((o,i)=>{if(!this.isEnabled)return;const{data:n,targetRanges:r,inputType:l,domEvent:d}=i;if(!c.includes(l))return;const h=new s.M3(t,"insertText");t.fire(h,new a.dK(e,d,{text:n,selection:e.createSelection(r)})),h.stop.called&&o.stop()})),t.on("compositionend",((o,{data:i,domEvent:n})=>{this.isEnabled&&!s.OB.isAndroid&&i&&t.fire("insertText",new a.dK(e,n,{text:i,selection:t.selection}))}),{priority:"lowest"})}observe(){}stopObserving(){}}class d extends i.Sy{static get pluginName(){return"Input"}init(){const e=this.editor,t=e.model,o=e.editing.view,i=t.document.selection;o.addObserver(l);const n=new r(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",n),e.commands.add("input",n),this.listenTo(o.document,"insertText",((i,n)=>{o.document.isComposing||n.preventDefault();const{text:r,selection:a,resultRange:c}=n,l=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));let d=r;if(s.OB.isAndroid){const e=Array.from(l[0].getItems()).reduce(((e,t)=>e+(t.is("$textProxy")?t.data:"")),"");e&&(e.length<=d.length?d.startsWith(e)&&(d=d.substring(e.length),l[0].start=l[0].start.getShiftedBy(e.length)):e.startsWith(d)&&(l[0].start=l[0].start.getShiftedBy(d.length),d=""))}const h={text:d,selection:t.createSelection(l)};c&&(h.resultRange=e.editing.mapper.toModelRange(c)),e.execute("insertText",h)})),s.OB.isAndroid?this.listenTo(o.document,"keydown",((e,s)=>{!i.isCollapsed&&229==s.keyCode&&o.document.isComposing&&h(t,n)})):this.listenTo(o.document,"compositionstart",(()=>{i.isCollapsed||h(t,n)}))}}function h(e,t){if(!t.isEnabled)return;const o=t.buffer;o.lock(),e.enqueueChange(o.batch,(()=>{e.deleteContent(e.document.selection)})),o.unlock()}class u extends i.mY{constructor(e,t){super(e),this.direction=t,this._buffer=new n(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,o=t.document;t.enqueueChange(this._buffer.batch,(i=>{this._buffer.lock();const n=i.createSelection(e.selection||o.selection);if(!t.canEditAt(n))return;const r=e.sequence||1,a=n.isCollapsed;if(n.isCollapsed&&t.modifySelection(n,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(r))return void this._replaceEntireContentWithParagraph(i);if(this._shouldReplaceFirstBlockWithParagraph(n,r))return void this.editor.execute("paragraph",{selection:n});if(n.isCollapsed)return;let c=0;n.getFirstRange().getMinimalFlatRanges().forEach((e=>{c+=(0,s.QX)(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),t.deleteContent(n,{doNotResetEntireContent:a,direction:this.direction}),this._buffer.input(c),i.setSelection(n),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,o=t.document.selection,i=t.schema.getLimitElement(o);if(!(o.isCollapsed&&o.containsEntireContent(i)))return!1;if(!t.schema.checkChild(i,"paragraph"))return!1;const s=i.getChild(0);return!s||!s.is("element","paragraph")}_replaceEntireContentWithParagraph(e){const t=this.editor.model,o=t.document.selection,i=t.schema.getLimitElement(o),s=e.createElement("paragraph");e.remove(e.createRangeIn(i)),e.insert(s,i),e.setSelection(s,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const o=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const i=e.getFirstPosition(),s=o.schema.getLimitElement(i),n=s.getChild(0);return i.parent==n&&(!!e.containsEntireContent(n)&&(!!o.schema.checkChild(s,"paragraph")&&"paragraph"!=n.name))}}const p="word",f="selection",g="backward",m="forward",b={deleteContent:{unit:f,direction:g},deleteContentBackward:{unit:"codePoint",direction:g},deleteWordBackward:{unit:p,direction:g},deleteHardLineBackward:{unit:f,direction:g},deleteSoftLineBackward:{unit:f,direction:g},deleteContentForward:{unit:"character",direction:m},deleteWordForward:{unit:p,direction:m},deleteHardLineForward:{unit:f,direction:m},deleteSoftLineForward:{unit:f,direction:m}};class _ extends a.Qj{constructor(e){super(e);const t=e.document;let o=0;t.on("keydown",(()=>{o++})),t.on("keyup",(()=>{o=0})),t.on("beforeinput",((i,n)=>{if(!this.isEnabled)return;const{targetRanges:r,domEvent:c,inputType:l}=n,d=b[l];if(!d)return;const h={direction:d.direction,unit:d.unit,sequence:o};h.unit==f&&(h.selectionToRemove=e.createSelection(r[0])),"deleteContentBackward"===l&&(s.OB.isAndroid&&(h.sequence=1),function(e){if(1!=e.length||e[0].isCollapsed)return!1;const t=e[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let o=0;for(const{nextPosition:e}of t){if(e.parent.is("$text")){const t=e.parent.data,i=e.offset;if((0,s.to)(t,i)||(0,s.pp)(t,i)||(0,s.YK)(t,i))continue;o++}else o++;if(o>1)return!0}return!1}(r)&&(h.unit=f,h.selectionToRemove=e.createSelection(r)));const u=new a.r7(t,"delete",r[0]);t.fire(u,new a.dK(e,c,h)),u.stop.called&&i.stop()})),s.OB.isBlink&&function(e){const t=e.view,o=t.document;let i=null,n=!1;function r(e){return e==s.Do.backspace||e==s.Do.delete}function c(e){return e==s.Do.backspace?g:m}o.on("keydown",((e,{keyCode:t})=>{i=t,n=!1})),o.on("keyup",((s,{keyCode:l,domEvent:d})=>{const h=o.selection,u=e.isEnabled&&l==i&&r(l)&&!h.isCollapsed&&!n;if(i=null,u){const e=h.getFirstRange(),i=new a.r7(o,"delete",e),s={unit:f,direction:c(l),selectionToRemove:h};o.fire(i,new a.dK(t,d,s))}})),o.on("beforeinput",((e,{inputType:t})=>{const o=b[t];r(i)&&o&&o.direction==c(i)&&(n=!0)}),{priority:"high"}),o.on("beforeinput",((e,{inputType:t,data:o})=>{i==s.Do.delete&&"insertText"==t&&""==o&&e.stop()}),{priority:"high"})}(this)}observe(){}stopObserving(){}}class w extends i.Sy{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,o=t.document,i=e.model.document;t.addObserver(_),this._undoOnBackspace=!1;const s=new u(e,"forward");e.commands.add("deleteForward",s),e.commands.add("forwardDelete",s),e.commands.add("delete",new u(e,"backward")),this.listenTo(o,"delete",((i,s)=>{o.isComposing||s.preventDefault();const{direction:n,sequence:r,selectionToRemove:a,unit:c}=s,l="forward"===n?"deleteForward":"delete",d={sequence:r};if("selection"==c){const t=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));d.selection=e.model.createSelection(t)}else d.unit=c;e.execute(l,d),t.scrollToTheSelection()}),{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(o,"delete",((t,o)=>{this._undoOnBackspace&&"backward"==o.direction&&1==o.sequence&&"codePoint"==o.unit&&(this._undoOnBackspace=!1,e.execute("undo"),o.preventDefault(),t.stop())}),{context:"$capture"}),this.listenTo(i,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class k extends i.Sy{static get requires(){return[d,w]}static get pluginName(){return"Typing"}}function v(e,t){let o=e.start;return{text:Array.from(e.getItems()).reduce(((e,i)=>i.is("$text")||i.is("$textProxy")?e+i.data:(o=t.createPositionAfter(i),"")),""),range:t.createRange(o,e.end)}}class y extends((0,s.Re)()){constructor(e,t){super(),this.model=e,this.testCallback=t,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))})),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",((t,{directChange:o})=>{o&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))})),this.listenTo(e,"change:data",((e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})}))}_evaluateTextBeforeSelection(e,t={}){const o=this.model,i=o.document.selection,s=o.createRange(o.createPositionAt(i.focus.parent,0),i.focus),{text:n,range:r}=v(s,o),a=this.testCallback(n);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const o=Object.assign(t,{text:n,range:r});"object"==typeof a&&Object.assign(o,a),this.fire(`matched:${e}`,o)}}}class x extends i.Sy{constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}static get pluginName(){return"TwoStepCaretMovement"}init(){const e=this.editor,t=e.model,o=e.editing.view,i=e.locale,n=t.document.selection;this.listenTo(o.document,"arrowKey",((e,t)=>{if(!n.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const o=t.keyCode==s.Do.arrowright,r=t.keyCode==s.Do.arrowleft;if(!o&&!r)return;const a=i.contentLanguageDirection;let c=!1;c="ltr"===a&&o||"rtl"===a&&r?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===c&&e.stop()}),{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(n,"change:range",((e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&A(n.getFirstPosition(),this.attributes)||this._restoreGravity())}))}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,o=this.editor.model.document.selection,i=o.getFirstPosition();return!this._isGravityOverridden&&((!i.isAtStart||!P(o,t))&&(!!A(i,t)&&(T(e),this._overrideGravity(),!0)))}_handleBackwardMovement(e){const t=this.attributes,o=this.editor.model,i=o.document.selection,s=i.getFirstPosition();return this._isGravityOverridden?(T(e),this._restoreGravity(),E(o,t,s),!0):s.isAtStart?!!P(i,t)&&(T(e),E(o,t,s),!0):!!function(e,t){const o=e.getShiftedBy(-1);return A(o,t)}(s,t)&&(s.isAtEnd&&!P(i,t)&&A(s,t)?(T(e),E(o,t,s),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((e=>e.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function P(e,t){for(const o of t)if(e.hasAttribute(o))return!0;return!1}function E(e,t,o){const i=o.nodeBefore;e.change((e=>{i?e.setSelectionAttribute(i.getAttributes()):e.removeSelectionAttribute(t)}))}function T(e){e.preventDefault()}function A(e,t){const{nodeBefore:o,nodeAfter:i}=e;for(const e of t){const t=o?o.getAttribute(e):void 0;if((i?i.getAttribute(e):void 0)!==t)return!0}return!1}var C=o("./node_modules/lodash-es/toString.js"),S=/[\\^$.*+?()[\]{}|]/g,O=RegExp(S.source);const R=function(e){return(e=(0,C.Z)(e))&&O.test(e)?e.replace(S,"\\$&"):e},M={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"â„¢"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"â…“",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"â…”",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"â†"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:z('"'),to:[null,"“",null,"â€"]},quotesSecondary:{from:z("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:z("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:z('"'),to:[null,"“",null,"â€"]},quotesPrimaryPl:{from:z('"'),to:[null,"„",null,"â€"]},quotesSecondaryPl:{from:z("'"),to:[null,"‚",null,"’"]}},j={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},B=["symbols","mathematical","typography","quotes"];class D extends i.Sy{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}constructor(e){super(e),e.config.define("typing",{transformations:{include:B}})}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTransformationWatchers()}_enableTransformationWatchers(){const e=this.editor,t=e.model,o=e.plugins.get("Delete"),i=function(e){const t=e.extra||[],o=e.remove||[],i=e=>!o.includes(e);return function(e){const t=new Set;for(const o of e)if("string"==typeof o&&j[o])for(const e of j[o])t.add(e);else t.add(o);return Array.from(t)}(e.include.concat(t).filter(i)).filter(i).map((e=>"string"==typeof e&&M[e]?M[e]:e)).filter((e=>"object"==typeof e)).map((e=>({from:V(e.from),to:I(e.to)})))}(e.config.get("typing.transformations")),s=new y(e.model,(e=>{for(const t of i){if(t.from.test(e))return{normalizedTransformation:t}}}));s.on("matched:data",((e,i)=>{if(!i.batch.isTyping)return;const{from:s,to:n}=i.normalizedTransformation,r=s.exec(i.text),a=n(r.slice(1)),c=i.range;let l=r.index;t.enqueueChange((e=>{for(let o=1;o<r.length;o++){const i=r[o],s=a[o-1];if(null==s){l+=i.length;continue}const n=c.start.getShiftedBy(l),d=t.createRange(n,n.getShiftedBy(i.length)),h=N(n);t.insertContent(e.createText(s,h),d),l+=s.length}t.enqueueChange((()=>{o.requestUndoOnBackspace()}))}))})),s.bind("isEnabled").to(this)}}function V(e){return"string"==typeof e?new RegExp(`(${R(e)})$`):e}function I(e){return"string"==typeof e?()=>[e]:e instanceof Array?()=>e:e}function N(e){return(e.textNode?e.textNode:e.nodeAfter).getAttributes()}function z(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function F(e,t,o,i){return i.createRange(L(e,t,o,!0,i),L(e,t,o,!1,i))}function L(e,t,o,i,s){let n=e.textNode||(i?e.nodeBefore:e.nodeAfter),r=null;for(;n&&n.getAttribute(t)==o;)r=n,n=i?n.previousSibling:n.nextSibling;return r?s.createPositionAt(r,i?"before":"after"):e}function Z(e,t,o,i){const s=e.editing.view,n=new Set;s.document.registerPostFixer((s=>{const r=e.model.document.selection;let a=!1;if(r.hasAttribute(t)){const c=F(r.getFirstPosition(),t,r.getAttribute(t),e.model),l=e.editing.mapper.toViewRange(c);for(const e of l.getItems())e.is("element",o)&&!e.hasClass(i)&&(s.addClass(i,e),n.add(e),a=!0)}return a})),e.conversion.for("editingDowncast").add((e=>{function t(){s.change((e=>{for(const t of n.values())e.removeClass(i,t),n.delete(t)}))}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})}))}},"./packages/ckeditor5-ui/src/index.ts":(e,t,o)=>{"use strict";function i({emitter:e,activator:t,callback:o,contextElements:i}){e.listenTo(document,"mousedown",((e,s)=>{if(!t())return;const n="function"==typeof s.composedPath?s.composedPath():[],r="function"==typeof i?i():i;for(const e of r)if(e.contains(s.target)||n.includes(e))return;o()}))}function s(e){const t=e;t.set("_isCssTransitionsDisabled",!1),t.disableCssTransitions=()=>{t._isCssTransitionsDisabled=!0},t.enableCssTransitions=()=>{t._isCssTransitionsDisabled=!1},t.extendTemplate({attributes:{class:[t.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}function n(e){return class extends e{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...e){super(...e),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}}function r({view:e}){e.listenTo(e.element,"submit",((t,o)=>{o.preventDefault(),e.fire("submit")}),{useCapture:!0})}function a({keystrokeHandler:e,focusTracker:t,gridItems:o,numberOfColumns:i,uiLanguageDirection:s}){const n="number"==typeof i?()=>i:i;function r(e){return i=>{const s=o.find((e=>e.element===t.focusedElement)),n=o.getIndex(s),r=e(n,o);o.get(r).focus(),i.stopPropagation(),i.preventDefault()}}function a(e,t){return e===t-1?0:e+1}function c(e,t){return 0===e?t-1:e-1}e.set("arrowright",r(((e,t)=>"rtl"===s?c(e,t.length):a(e,t.length)))),e.set("arrowleft",r(((e,t)=>"rtl"===s?a(e,t.length):c(e,t.length)))),e.set("arrowup",r(((e,t)=>{let o=e-n();return o<0&&(o=e+n()*Math.floor(t.length/n()),o>t.length-1&&(o-=n())),o}))),e.set("arrowdown",r(((e,t)=>{let o=e+n();return o>t.length-1&&(o=e%n()),o})))}o.d(t,{no:()=>so,Jf:()=>ii,ee:()=>di,BK:()=>N,py:()=>Bo,r5:()=>q,J6:()=>te,J2:()=>zt,_9:()=>X,_Y:()=>$t,WB:()=>Go,RX:()=>n,J0:()=>Te,G2:()=>ke,_n:()=>Pe,S8:()=>So,fF:()=>jo,I0:()=>Ae,Gp:()=>zo,mO:()=>Z,VY:()=>Fo,r1:()=>Vo,Xs:()=>we,pq:()=>_e,Em:()=>be,Dn:()=>he,KP:()=>fe,dn:()=>$e,Bv:()=>We,Hn:()=>Wo,P_:()=>Lo,Rm:()=>Ke,lp:()=>ti,BM:()=>K,YS:()=>b,$y:()=>Se,jB:()=>Ie,gE:()=>uo,G7:()=>f,vX:()=>l,IJ:()=>a,Pm:()=>ot,up:()=>et,eC:()=>i,t9:()=>Qe,FH:()=>at,sh:()=>rt,R:()=>nt,Mh:()=>st,k6:()=>G,ci:()=>hi,fe:()=>s,S1:()=>J,jY:()=>Y,iw:()=>Re,GI:()=>r});var c=o("./packages/ckeditor5-utils/src/index.ts");class l extends c.FE{constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",((e,t,o)=>{this._renderViewIntoCollectionParent(t,o)})),this.on("remove",((e,t)=>{t.element&&this._parentElement&&t.element.remove()})),this._parentElement=null}destroy(){this.map((e=>e.destroy()))}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!e.every((e=>"string"==typeof e)))throw new c.Bb("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const o of this)for(const i of e)o.delegate(i).to(t);this.on("add",((o,i)=>{for(const o of e)i.delegate(o).to(t)})),this.on("remove",((o,i)=>{for(const o of e)i.stopDelegating(o,t)}))}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}remove(e){return super.remove(e)}}var d=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),h=o.n(d),u=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/globals/globals.css"),p={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(u.Z,p);u.Z.locals;class f extends((0,c.Xu)((0,c.Re)())){constructor(e){super(),this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new c.FE,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((t,o)=>{o.locale=e,o.t=e&&e.t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=b.bind(this,this)}createCollection(e){const t=new l(e);return this._viewCollections.add(t),t}registerChild(e){(0,c.TW)(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){(0,c.TW)(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new b(e)}extendTemplate(e){b.extend(this.template,e)}render(){if(this.isRendered)throw new c.Bb("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((e=>e.destroy())),this.template&&this.template._revertData&&this.template.revert(this.element)}}var g=o("./node_modules/lodash-es/cloneDeepWith.js"),m=o("./node_modules/lodash-es/isObject.js");class b extends((0,c.ln)()){constructor(e){super(),Object.assign(this,A(T(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new c.Bb("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const o of t.children)j(o)?yield o:B(o)&&(yield*e(o))}(this)}static bind(e,t){return{to:(o,i)=>new w({eventNameOrFunction:o,attribute:o,observable:e,emitter:t,callback:i}),if:(o,i,s)=>new k({observable:e,emitter:t,attribute:o,valueIfTrue:i,callback:s})}}static extend(e,t){if(e._isRendered)throw new c.Bb("template-extend-render",[this,e]);R(e,A(T(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new c.Bb("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),v(this.text)?this._bindToObservable({schema:this.text,updater:x(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,o=e.revertData;for(const i in this.attributes){const s=t.getAttribute(i),n=this.attributes[i];o&&(o.attributes[i]=s);const r=V(n)?n[0].ns:null;if(v(n)){const a=V(n)?n[0].value:n;o&&I(i)&&a.unshift(s),this._bindToObservable({schema:a,updater:P(t,i,r),data:e})}else if("style"==i&&"string"!=typeof n[0])this._renderStyleAttribute(n[0],e);else{o&&s&&I(i)&&n.unshift(s);const e=n.map((e=>e&&e.value||e)).reduce(((e,t)=>e.concat(t)),[]).reduce(S,"");M(e)||t.setAttributeNS(r,i,e)}}}_renderStyleAttribute(e,t){const o=t.node;for(const i in e){const s=e[i];v(s)?this._bindToObservable({schema:[s],updater:E(o,i),data:t}):o.style[i]=s}}_renderElementChildren(e){const t=e.node,o=e.intoFragment?document.createDocumentFragment():t,i=e.isApplying;let s=0;for(const n of this.children)if(D(n)){if(!i){n.setParent(t);for(const e of n)o.appendChild(e.element)}}else if(j(n))i||(n.isRendered||n.render(),o.appendChild(n.element));else if((0,c.UG)(n))o.appendChild(n);else if(i){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),n._renderNode({intoFragment:!1,node:o.childNodes[s++],isApplying:!0,revertData:t})}else o.appendChild(n.render());e.intoFragment&&t.appendChild(o)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const o=this.eventListeners[t].map((o=>{const[i,s]=t.split("@");return o.activateDomEventListener(i,s,e)}));e.revertData&&e.revertData.bindings.push(o)}}_bindToObservable({schema:e,updater:t,data:o}){const i=o.revertData;y(e,t,o);const s=e.filter((e=>!M(e))).filter((e=>e.observable)).map((i=>i.activateAttributeListener(e,t,o)));i&&i.bindings.push(s)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)return void(e.textContent=t.text);const o=e;for(const e in t.attributes){const i=t.attributes[e];null===i?o.removeAttribute(e):o.setAttribute(e,i)}for(let e=0;e<t.children.length;++e)this._revertTemplateFromNode(o.childNodes[e],t.children[e])}}class _{constructor(e){this.attribute=e.attribute,this.observable=e.observable,this.emitter=e.emitter,this.callback=e.callback}getValue(e){const t=this.observable[this.attribute];return this.callback?this.callback(t,e):t}activateAttributeListener(e,t,o){const i=()=>y(e,t,o);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,i),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,i)}}}class w extends _{constructor(e){super(e),this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,o){const i=(e,o)=>{t&&!o.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(o):this.observable.fire(this.eventNameOrFunction,o))};return this.emitter.listenTo(o.node,e,i),()=>{this.emitter.stopListening(o.node,e,i)}}}class k extends _{constructor(e){super(e),this.valueIfTrue=e.valueIfTrue}getValue(e){return!M(super.getValue(e))&&(this.valueIfTrue||!0)}}function v(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(v):e instanceof _)}function y(e,t,{node:o}){const i=function(e,t){return e.map((e=>e instanceof _?e.getValue(t):e))}(e,o);let s;s=1==e.length&&e[0]instanceof k?i[0]:i.reduce(S,""),M(s)?t.remove():t.set(s)}function x(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function P(e,t,o){return{set(i){e.setAttributeNS(o,t,i)},remove(){e.removeAttributeNS(o,t)}}}function E(e,t){return{set(o){e.style[t]=o},remove(){e.style[t]=null}}}function T(e){return(0,g.Z)(e,(e=>{if(e&&(e instanceof _||B(e)||j(e)||D(e)))return e}))}function A(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=(0,c.qo)(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)C(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=(0,c.qo)(e[t].value)),C(e,t)}(e.attributes);const t=[];if(e.children)if(D(e.children))t.push(e.children);else for(const o of e.children)B(o)||j(o)||(0,c.UG)(o)?t.push(o):t.push(new b(o));e.children=t}return e}function C(e,t){e[t]=(0,c.qo)(e[t])}function S(e,t){return M(t)?e:M(e)?t:`${e} ${t}`}function O(e,t){for(const o in t)e[o]?e[o].push(...t[o]):e[o]=t[o]}function R(e,t){if(t.attributes&&(e.attributes||(e.attributes={}),O(e.attributes,t.attributes)),t.eventListeners&&(e.eventListeners||(e.eventListeners={}),O(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new c.Bb("ui-template-extend-children-mismatch",e);let o=0;for(const i of t.children)R(e.children[o++],i)}}function M(e){return!e&&0!==e}function j(e){return e instanceof f}function B(e){return e instanceof b}function D(e){return e instanceof l}function V(e){return(0,m.Z)(e[0])&&e[0].ns}function I(e){return"class"==e||"style"==e}class N extends l{constructor(e,t=[]){super(t),this.locale=e}attachToDom(){this._bodyCollectionContainer=new b({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=(0,c.az)(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}var z=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/icon/icon.css"),F={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(z.Z,F);z.Z.locals;const L=class extends f{constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon","ck-reset_all-excluded",e.if("isColorInherited","ck-icon_inherit-color")],viewBox:e.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",(()=>{this._updateXMLContent(),this._colorFillPaths()})),this.on("change:fillColor",(()=>{this._colorFillPaths()}))}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");t&&(this.viewBox=t);for(const{name:t,value:o}of Array.from(e.attributes))L.presentationalAttributeNames.includes(t)&&this.element.setAttribute(t,o);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((e=>{e.style.fill=this.fillColor}))}};let Z=L;Z.presentationalAttributeNames=["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"];var W=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/button.css"),$={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(W.Z,$);W.Z.locals;class q extends f{constructor(e){super(e),this._focusDelayed=null;const t=this.bindTemplate,o=(0,c.hQ)();this.set("ariaChecked",void 0),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${o}`),this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("role",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._createLabelView(),this.iconView=new Z,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const i={tag:"button",attributes:{class:["ck","ck-button",t.to("class"),t.if("isEnabled","ck-disabled",(e=>!e)),t.if("isVisible","ck-hidden",(e=>!e)),t.to("isOn",(e=>e?"ck-on":"ck-off")),t.if("withText","ck-button_with-text"),t.if("withKeystroke","ck-button_with-keystroke")],role:t.to("role"),type:t.to("type",(e=>e||"button")),tabindex:t.to("tabindex"),"aria-label":t.to("ariaLabel"),"aria-labelledby":t.to("ariaLabelledBy"),"aria-disabled":t.if("isEnabled",!0,(e=>!e)),"aria-checked":t.to("isOn"),"aria-pressed":t.to("isOn",(e=>!!this.isToggleable&&String(!!e))),"data-cke-tooltip-text":t.to("_tooltipString"),"data-cke-tooltip-position":t.to("tooltipPosition")},children:this.children,on:{click:t.to((e=>{this.isEnabled?this.fire("execute"):e.preventDefault()}))}};c.OB.isSafari&&(this._focusDelayed||(this._focusDelayed=(0,c.gw)((()=>this.focus()),0)),i.on.mousedown=t.to((()=>{this._focusDelayed()})),i.on.mouseup=t.to((()=>{this._focusDelayed.cancel()}))),this.setTemplate(i)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}destroy(){this._focusDelayed&&this._focusDelayed.cancel(),super.destroy()}_createLabelView(){const e=new f,t=this.bindTemplate;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:t.to("labelStyle"),id:this.ariaLabelledBy},children:[{text:t.to("label")}]}),e}_createKeystrokeView(){const e=new f;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(e=>(0,c.XU)(e)))}]}),e}_getTooltipString(e,t,o){return e?"string"==typeof e?e:(o&&(o=(0,c.XU)(o)),e instanceof Function?e(t,o):`${t}${o?` (${o})`:""}`):""}}var H=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/switchbutton.css"),U={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(H.Z,U);H.Z.locals;class K extends q{constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new f;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}function G(e,t){const o=e.t,i={Black:o("Black"),"Dim grey":o("Dim grey"),Grey:o("Grey"),"Light grey":o("Light grey"),White:o("White"),Red:o("Red"),Orange:o("Orange"),Yellow:o("Yellow"),"Light green":o("Light green"),Green:o("Green"),Aquamarine:o("Aquamarine"),Turquoise:o("Turquoise"),"Light blue":o("Light blue"),Blue:o("Blue"),Purple:o("Purple")};return t.map((e=>{const t=i[e.label];return t&&t!=e.label&&(e.label=t),e}))}function J(e){return e.map(Y).filter((e=>!!e))}function Y(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:`${e.color}`}}}}class X extends q{constructor(e){super(e);const t=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0z"/><path d="M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z"/></svg>',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color")},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-table__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}var Q=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorgrid/colorgrid.css"),ee={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Q.Z,ee);Q.Z.locals;class te extends f{constructor(e,t){super(e);const o=t&&t.colorDefinitions?t.colorDefinitions:[];this.columns=t&&t.columns?t.columns:5;const i={gridTemplateColumns:`repeat( ${this.columns}, 1fr)`};this.set("selectedColor",void 0),this.items=this.createCollection(),this.focusTracker=new c.Rh,this.keystrokes=new c.VD,this.items.on("add",((e,t)=>{t.isOn=t.color===this.selectedColor})),o.forEach((e=>{const t=new X;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",(()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})})),this.items.add(t)})),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:i}}),this.on("change:selectedColor",((e,t,o)=>{for(const e of this.items)e.isOn=e.color===o}))}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),a({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}var oe=o("./node_modules/color-name/index.js");const ie=function(e){var t,o,i=[],s=1;if("string"==typeof e)if(oe[e])i=oe[e].slice(),o="rgb";else if("transparent"===e)s=0,o="rgb",i=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var n=e.slice(1);s=1,(c=n.length)<=4?(i=[parseInt(n[0]+n[0],16),parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16)],4===c&&(s=parseInt(n[3]+n[3],16)/255)):(i=[parseInt(n[0]+n[1],16),parseInt(n[2]+n[3],16),parseInt(n[4]+n[5],16)],8===c&&(s=parseInt(n[6]+n[7],16)/255)),i[0]||(i[0]=0),i[1]||(i[1]=0),i[2]||(i[2]=0),o="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var r=t[1],a="rgb"===r;o=n=r.replace(/a$/,"");var c="cmyk"===n?4:"gray"===n?1:3;i=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===c?parseFloat(e)/100:"rgb"===n?255*parseFloat(e)/100:parseFloat(e);if("h"===n[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==se[e])return se[e]}return parseFloat(e)})),r===n&&i.push(1),s=a||void 0===i[c]?1:i[c],i=i.slice(0,c)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(i=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),o=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(i=[e[0],e[1],e[2]],o="rgb",s=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(o="rgb",i=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(o="hsl",i=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),s=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(s/=100)):(o="rgb",i=[e>>>16,(65280&e)>>>8,255&e]);return{space:o,values:i,alpha:s}};var se={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};var ne=o("./node_modules/color-convert/index.js");function re(e,t){if(!e)return"";const o=ae(e);if(!o)return"";if(o.space===t)return e;if(i=o,!Object.keys(ne).includes(i.space))return"";var i;const s=ne[o.space][t];if(!s)return"";return function(e,t){switch(t){case"hex":return`#${e}`;case"rgb":return`rgb( ${e[0]}, ${e[1]}, ${e[2]} )`;case"hsl":return`hsl( ${e[0]}, ${e[1]}%, ${e[2]}% )`;case"hwb":return`hwb( ${e[0]}, ${e[1]}, ${e[2]} )`;case"lab":return`lab( ${e[0]}% ${e[1]} ${e[2]} )`;case"lch":return`lch( ${e[0]}% ${e[1]} ${e[2]} )`;default:return""}}(s("hex"===o.space?o.hexValue:o.values),t)}function ae(e){if(e.startsWith("#")){const t=ie(e);return{space:"hex",values:t.values,hexValue:e,alpha:t.alpha}}const t=ie(e);return t.space?t:null}var ce=o("./node_modules/lodash-es/debounce.js"),le=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/label/label.css"),de={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(le.Z,de);le.Z.locals;class he extends f{constructor(e){super(e),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${(0,c.hQ)()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}var ue=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css"),pe={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(ue.Z,pe);ue.Z.locals;class fe extends f{constructor(e,t){super(e);const o=`ck-labeled-field-view-${(0,c.hQ)()}`,i=`ck-labeled-field-view-status-${(0,c.hQ)()}`;this.fieldView=t(this,o,i),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(o),this.statusView=this._createStatusView(i),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",((e,t)=>e||t));const s=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",s.to("class"),s.if("isEnabled","ck-disabled",(e=>!e)),s.if("isEmpty","ck-labeled-field-view_empty"),s.if("isFocused","ck-labeled-field-view_focused"),s.if("placeholder","ck-labeled-field-view_placeholder"),s.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(e){const t=new he(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new f(this.locale),o=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",o.if("errorText","ck-labeled-field-view__status_error"),o.if("_statusText","ck-hidden",(e=>!e))],id:e,role:o.if("errorText","alert")},children:[{text:o.to("_statusText")}]}),t}focus(){this.fieldView.focus()}}var ge=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/input/input.css"),me={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(ge.Z,me);ge.Z.locals;class be extends f{constructor(e){super(e),this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.focusTracker=new c.Rh,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0),this.set("inputMode","text");const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),readonly:t.to("isReadOnly"),inputmode:t.to("inputMode"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById")},on:{input:t.to(((...e)=>{this.fire("input",...e),this._updateIsEmpty()})),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",((e,t,o)=>{this._setDomElementValue(o),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(e){this.element.value=e||0===e?e:""}}class _e extends be{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class we extends be{constructor(e,{min:t,max:o,step:i}={}){super(e);const s=this.bindTemplate;this.set("min",t),this.set("max",o),this.set("step",i),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:s.to("min"),max:s.to("max"),step:s.to("step")}})}}class ke extends f{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",(e=>`ck-dropdown__panel_${e}`)),t.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:t.to((e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()}))}})}focus(){if(this.children.length){const e=this.children.first;"function"==typeof e.focus?e.focus():(0,c.KE)("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}var ve=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/dropdown.css"),ye={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(ve.Z,ye);ve.Z.locals;const xe=class extends f{constructor(e,t,o){super(e);const i=this.bindTemplate;this.buttonView=t,this.panelView=o,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.keystrokes=new c.VD,this.focusTracker=new c.Rh,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",i.to("class"),i.if("isEnabled","ck-disabled",(e=>!e))],id:i.to("id"),"aria-describedby":i.to("ariaDescribedById")},children:[t,o]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":i.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",(()=>{this.isOpen=!this.isOpen})),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",((e,t,o)=>{o&&("auto"===this.panelPosition?this.panelView.position=xe._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)})),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.isOpen=!1,t())};this.keystrokes.set("arrowdown",((e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())})),this.keystrokes.set("arrowright",((e,t)=>{this.isOpen&&t()})),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:o,southWest:i,northEast:s,northWest:n,southMiddleEast:r,southMiddleWest:a,northMiddleEast:c,northMiddleWest:l}=xe.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[o,i,r,a,e,s,n,c,l,t]:[i,o,a,r,e,n,s,l,c,t]}};let Pe=xe;Pe.defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-3*(t.width-e.width)/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-3*(t.width-e.width)/4,name:"nmw"})},Pe._getOptimalPosition=c.xZ;const Ee='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/></svg>';class Te extends q{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(e=>String(e)))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Z;return e.content=Ee,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}class Ae{constructor(e){if(this.focusables=e.focusables,this.focusTracker=e.focusTracker,this.keystrokeHandler=e.keystrokeHandler,this.actions=e.actions,e.actions&&e.keystrokeHandler)for(const t in e.actions){let o=e.actions[t];"string"==typeof o&&(o=[o]);for(const i of o)e.keystrokeHandler.set(i,((e,o)=>{this[t](),o()}))}}get first(){return this.focusables.find(Ce)||null}get last(){return this.focusables.filter(Ce).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((t,o)=>{const i=t.element===this.focusTracker.focusedElement;return i&&(e=o),i})),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,o=this.focusables.length;if(!o)return null;if(null===t)return this[1===e?"first":"last"];let i=(t+o+e)%o;do{const t=this.focusables.get(i);if(Ce(t))return t;i=(i+o+e)%o}while(i!==t);return null}}function Ce(e){return!(!e.focus||!(0,c.pn)(e.element))}class Se extends f{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class Oe extends f{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function Re(e){return Array.isArray(e)?{items:e,removeItems:[]}:e?Object.assign({items:[],removeItems:[]},e):{items:[],removeItems:[]}}var Me=o("./packages/ckeditor5-core/src/index.ts"),je=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/toolbar.css"),Be={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(je.Z,Be);je.Z.locals;const{threeVerticalDots:De}=Me.icons,Ve={alignLeft:Me.icons.alignLeft,bold:Me.icons.bold,importExport:Me.icons.importExport,paragraph:Me.icons.paragraph,plus:Me.icons.plus,text:Me.icons.text,threeVerticalDots:Me.icons.threeVerticalDots};class Ie extends f{constructor(e,t){super(e);const o=this.bindTemplate,i=this.t;this.options=t||{},this.set("ariaLabel",i("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new c.Rh,this.keystrokes=new c.VD,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new Ne(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const s="rtl"===e.uiLanguageDirection;this._focusCycler=new Ae({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[s?"arrowright":"arrowleft","arrowup"],focusNext:[s?"arrowleft":"arrowright","arrowdown"]}});const n=["ck","ck-toolbar",o.to("class"),o.if("isCompact","ck-toolbar_compact")];var r;this.options.shouldGroupWhenFull&&this.options.isFloating&&n.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:n,role:"toolbar","aria-label":o.to("ariaLabel"),style:{maxWidth:o.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:(r=this,r.bindTemplate.to((e=>{e.target===r.element&&e.preventDefault()})))}}),this._behavior=this.options.shouldGroupWhenFull?new Fe(this):new ze(this)}render(){super.render(),this.focusTracker.add(this.element);for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,o){this.items.addMany(this._buildItemsFromConfig(e,t,o))}_buildItemsFromConfig(e,t,o){const i=Re(e),s=o||i.removeItems;return this._cleanItemsConfiguration(i.items,t,s).map((e=>(0,m.Z)(e)?this._createNestedToolbarDropdown(e,t,s):"|"===e?new Se:"-"===e?new Oe:t.create(e))).filter((e=>!!e))}_cleanItemsConfiguration(e,t,o){const i=e.filter(((e,i,s)=>"|"===e||-1===o.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||((0,c.KE)("toolbarview-line-break-ignored-when-grouping-items",s),!1):!(!(0,m.Z)(e)&&!t.has(e))||((0,c.KE)("toolbarview-item-unavailable",{item:e}),!1))));return this._cleanSeparatorsAndLineBreaks(i)}_cleanSeparatorsAndLineBreaks(e){const t=e=>"-"!==e&&"|"!==e,o=e.length,i=e.findIndex(t);if(-1===i)return[];const s=o-e.slice().reverse().findIndex(t);return e.slice(i,s).filter(((e,o,i)=>{if(t(e))return!0;return!(o>0&&i[o-1]===e)}))}_createNestedToolbarDropdown(e,t,o){let{label:i,icon:s,items:n,tooltip:r=!0,withText:a=!1}=e;if(n=this._cleanItemsConfiguration(n,t,o),!n.length)return null;const l=Qe(this.locale);return i||(0,c.KE)("toolbarview-nested-toolbar-dropdown-missing-label",e),l.class="ck-toolbar__nested-toolbar-dropdown",l.buttonView.set({label:i,tooltip:r,withText:!!a}),!1!==s?l.buttonView.icon=Ve[s]||s||De:l.buttonView.withText=!0,et(l,(()=>l.toolbarView._buildItemsFromConfig(n,t,o))),l}}class Ne extends f{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class ze{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using((e=>e)),e.focusables.bindTo(e.items).using((e=>e)),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class Fe{constructor(e){this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),e.itemsView.children.bindTo(this.ungroupedItems).using((e=>e)),this.ungroupedItems.on("change",this._updateFocusCycleableItems.bind(this)),e.children.on("change",this._updateFocusCycleableItems.bind(this)),e.items.on("change",((e,t)=>{const o=t.index,i=Array.from(t.added);for(const e of t.removed)o>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=o;e<o+i.length;e++){const t=i[e-o];e>this.ungroupedItems.length?this.groupedItems.add(t,e-this.ungroupedItems.length):this.ungroupedItems.add(t,e)}this._updateGrouping()})),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!(0,c.pn)(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,o=new c.UL(e.lastChild),i=new c.UL(e);if(!this.cachedPadding){const o=c.global.window.getComputedStyle(e),i="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(o[i])}return"ltr"===t?o.right>i.right-this.cachedPadding:o.left<i.left+this.cachedPadding}_enableGroupingOnResize(){let e;this.resizeObserver=new c.do(this.viewElement,(t=>{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new Se),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,o=Qe(e);return o.class="ck-toolbar__grouped-dropdown",o.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",et(o,this.groupedItems),o.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:De}),o}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((e=>{this.viewFocusables.add(e)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}var Le=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/list/list.css"),Ze={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Le.Z,Ze);Le.Z.locals;class We extends f{constructor(e){super(e);const t=this.bindTemplate;this.items=this.createCollection(),this.focusTracker=new c.Rh,this.keystrokes=new c.VD,this._focusCycler=new Ae({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:t.to("role"),"aria-label":t.to("ariaLabel")},children:this.items})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class $e extends f{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",(e=>!e))],role:"presentation"},children:this.children})}focus(){this.children.first.focus()}}class qe extends f{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}var He=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/splitbutton.css"),Ue={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(He.Z,Ue);He.Z.locals;class Ke extends f{constructor(e){super(e);const t=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(),this.arrowView=this._createArrowView(),this.keystrokes=new c.VD,this.focusTracker=new c.Rh,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",t.to("class"),t.if("isVisible","ck-hidden",(e=>!e)),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",((e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())})),this.keystrokes.set("arrowleft",((e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(){const e=new q;return e.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),e.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),e.delegate("execute").to(this),e}_createArrowView(){const e=new q,t=e.bindTemplate;return e.icon=Ee,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}var Ge=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css"),Je={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Ge.Z,Je);Ge.Z.locals;var Ye=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/listdropdown.css"),Xe={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Ye.Z,Xe);Ye.Z.locals;function Qe(e,t=Te){const o=new t(e),s=new ke(e),n=new Pe(e,o,s);return o.bind("isEnabled").to(n),o instanceof Ke?o.arrowView.bind("isOn").to(n,"isOpen"):o.bind("isOn").to(n,"isOpen"),function(e){(function(e){e.on("render",(()=>{i({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})}))})(e),function(e){e.on("execute",(t=>{t.source instanceof K||(e.isOpen=!1)}))}(e),function(e){e.focusTracker.on("change:isFocused",((t,o,i)=>{e.isOpen&&!i&&(e.isOpen=!1)}))}(e),function(e){e.keystrokes.set("arrowdown",((t,o)=>{e.isOpen&&(e.panelView.focus(),o())})),e.keystrokes.set("arrowup",((t,o)=>{e.isOpen&&(e.panelView.focusLast(),o())}))}(e),function(e){e.on("change:isOpen",((t,o,i)=>{if(i)return;const s=e.panelView.element;s&&s.contains(c.global.document.activeElement)&&e.buttonView.focus()}))}(e),function(e){e.on("change:isOpen",((t,o,i)=>{i&&e.panelView.focus()}),{priority:"low"})}(e)}(n),n}function et(e,t,o={}){e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.isOpen?tt(e,t,o):e.once("change:isOpen",(()=>tt(e,t,o)),{priority:"highest"}),o.enableActiveItemFocusOnDropdownOpen&&st(e,(()=>e.toolbarView.items.find((e=>e.isOn))))}function tt(e,t,o){const i=e.locale,s=i.t,n=e.toolbarView=new Ie(i),r="function"==typeof t?t():t;n.ariaLabel=o.ariaLabel||s("Dropdown toolbar"),o.maxWidth&&(n.maxWidth=o.maxWidth),o.class&&(n.class=o.class),o.isCompact&&(n.isCompact=o.isCompact),o.isVertical&&(n.isVertical=!0),r instanceof l?n.items.bindTo(r).using((e=>e)):n.items.addMany(r),e.panelView.children.add(n),n.items.delegate("execute").to(e)}function ot(e,t,o={}){e.isOpen?it(e,t,o):e.once("change:isOpen",(()=>it(e,t,o)),{priority:"highest"}),st(e,(()=>e.listView.items.find((e=>e instanceof $e&&e.children.first.isOn))))}function it(e,t,o){const i=e.locale,s=e.listView=new We(i),n="function"==typeof t?t():t;s.ariaLabel=o.ariaLabel,s.role=o.role,s.items.bindTo(n).using((e=>{if("separator"===e.type)return new qe(i);if("button"===e.type||"switchbutton"===e.type){const t=new $e(i);let o;return o="button"===e.type?new q(i):new K(i),o.bind(...Object.keys(e.model)).to(e.model),o.delegate("execute").to(t),t.children.add(o),t}return null})),e.panelView.children.add(s),s.items.delegate("execute").to(e)}function st(e,t){e.on("change:isOpen",(()=>{if(!e.isOpen)return;const o=t();o&&("function"==typeof o.focus?o.focus():(0,c.KE)("ui-dropdown-focus-child-on-open-child-missing-focus",{view:o}))}),{priority:c.tA.low-10})}function nt(e,t,o){const i=new _e(e.locale);return i.set({id:t,ariaDescribedById:o}),i.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),i.bind("hasError").to(e,"errorText",(e=>!!e)),i.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(i),i}function rt(e,t,o){const i=new we(e.locale);return i.set({id:t,ariaDescribedById:o,inputMode:"numeric"}),i.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),i.bind("hasError").to(e,"errorText",(e=>!!e)),i.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(i),i}function at(e,t,o){const i=Qe(e.locale);return i.set({id:t,ariaDescribedById:o}),i.bind("isEnabled").to(e),i}const ct=(e,t=0,o=1)=>e>o?o:e<t?t:e,lt=(e,t=0,o=Math.pow(10,t))=>Math.round(o*e)/o,dt=(Math.PI,e=>("#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?lt(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?lt(parseInt(e.substring(6,8),16)/255,2):1})),ht=({h:e,s:t,v:o,a:i})=>{const s=(200-t)*o/100;return{h:lt(e),s:lt(s>0&&s<200?t*o/100/(s<=100?s:200-s)*100:0),l:lt(s/2),a:lt(i,2)}},ut=e=>{const{h:t,s:o,l:i}=ht(e);return`hsl(${t}, ${o}%, ${i}%)`},pt=({h:e,s:t,v:o,a:i})=>{e=e/360*6,t/=100,o/=100;const s=Math.floor(e),n=o*(1-t),r=o*(1-(e-s)*t),a=o*(1-(1-e+s)*t),c=s%6;return{r:lt(255*[o,r,n,n,a,o][c]),g:lt(255*[a,o,o,r,n,n][c]),b:lt(255*[n,n,a,o,o,r][c]),a:lt(i,2)}},ft=e=>{const t=e.toString(16);return t.length<2?"0"+t:t},gt=({r:e,g:t,b:o,a:i})=>{const s=i<1?ft(lt(255*i)):"";return"#"+ft(e)+ft(t)+ft(o)+s},mt=({r:e,g:t,b:o,a:i})=>{const s=Math.max(e,t,o),n=s-Math.min(e,t,o),r=n?s===e?(t-o)/n:s===t?2+(o-e)/n:4+(e-t)/n:0;return{h:lt(60*(r<0?r+6:r)),s:lt(s?n/s*100:0),v:lt(s/255*100),a:i}},bt=(e,t)=>{if(e===t)return!0;for(const o in e)if(e[o]!==t[o])return!1;return!0},_t={},wt=e=>{let t=_t[e];return t||(t=document.createElement("template"),t.innerHTML=e,_t[e]=t),t},kt=(e,t,o)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))};let vt=!1;const yt=e=>"touches"in e,xt=(e,t)=>{const o=yt(t)?t.touches[0]:t,i=e.el.getBoundingClientRect();kt(e.el,"move",e.getMove({x:ct((o.pageX-(i.left+window.pageXOffset))/i.width),y:ct((o.pageY-(i.top+window.pageYOffset))/i.height)}))};class Pt{constructor(e,t,o,i){const s=wt(`<div role="slider" tabindex="0" part="${t}" ${o}><div part="${t}-pointer"></div></div>`);e.appendChild(s.content.cloneNode(!0));const n=e.querySelector(`[part=${t}]`);n.addEventListener("mousedown",this),n.addEventListener("touchstart",this),n.addEventListener("keydown",this),this.el=n,this.xy=i,this.nodes=[n.firstChild,n]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(vt?"touchmove":"mousemove",this),t(vt?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!(e=>!(vt&&!yt(e)||(vt||(vt=yt(e)),0)))(e)||!vt&&0!=e.button)return;this.el.focus(),xt(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),xt(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":((e,t)=>{const o=t.keyCode;o>40||e.xy&&o<37||o<33||(t.preventDefault(),kt(e.el,"move",e.getMove({x:39===o?.01:37===o?-.01:34===o?.05:33===o?-.05:35===o?1:36===o?-1:0,y:40===o?.01:38===o?-.01:0},!0)))})(this,e)}}style(e){e.forEach(((e,t)=>{for(const o in e)this.nodes[t].style.setProperty(o,e[o])}))}}class Et extends Pt{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:e/360*100+"%",color:ut({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${lt(e)}`)}getMove(e,t){return{h:t?ct(this.h+360*e.x,0,360):360*e.x}}}class Tt extends Pt{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:100-e.v+"%",left:`${e.s}%`,color:ut(e)},{"background-color":ut({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${lt(e.s)}%, Brightness ${lt(e.v)}%`)}getMove(e,t){return{s:t?ct(this.hsva.s+100*e.x,0,100):100*e.x,v:t?ct(this.hsva.v-100*e.y,0,100):Math.round(100-100*e.y)}}}const At=Symbol("same"),Ct=Symbol("color"),St=Symbol("hsva"),Ot=Symbol("update"),Rt=Symbol("parts"),Mt=Symbol("css"),jt=Symbol("sliders");class Bt extends HTMLElement{static get observedAttributes(){return["color"]}get[Mt](){return[':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',"[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}","[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}"]}get[jt](){return[Tt,Et]}get color(){return this[Ct]}set color(e){if(!this[At](e)){const t=this.colorModel.toHsva(e);this[Ot](t),this[Ct]=e}}constructor(){super();const e=wt(`<style>${this[Mt].join("")}</style>`),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[Rt]=this[jt].map((e=>new e(t)))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,o){const i=this.colorModel.fromAttr(o);this[At](i)||(this.color=i)}handleEvent(e){const t=this[St],o={...t,...e.detail};let i;this[Ot](o),bt(o,t)||this[At](i=this.colorModel.fromHsva(o))||(this[Ct]=i,kt(this,"color-changed",{value:i}))}[At](e){return this.color&&this.colorModel.equal(e,this.color)}[Ot](e){this[St]=e,this[Rt].forEach((t=>t.update(e)))}}const Dt={defaultColor:"#000",toHsva:e=>mt(dt(e)),fromHsva:({h:e,s:t,v:o})=>gt(pt({h:e,s:t,v:o,a:1})),equal:(e,t)=>e.toLowerCase()===t.toLowerCase()||bt(dt(e),dt(t)),fromAttr:e=>e};class Vt extends Bt{get colorModel(){return Dt}}customElements.define("hex-color-picker",class extends Vt{});var It=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorpicker/colorpicker.css"),Nt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(It.Z,Nt);It.Z.locals;class zt extends f{constructor(e,t){super(e),this.set("color",""),this.set("_hexColor",""),this._format=t.format||"hsl",this.hexInputRow=this._createInputRow();const o=this.createCollection();o.add(this.hexInputRow),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker"],tabindex:-1},children:o}),this._debounceColorPickerEvent=(0,ce.Z)((e=>{this.set("color",e)}),150,{leading:!0}),this.on("set:color",((e,t,o)=>{e.return=re(o,this._format)})),this.on("change:color",(()=>{this._hexColor=Ft(this.color)})),this.on("change:_hexColor",(()=>{this.picker.setAttribute("color",this._hexColor),Ft(this.color)!=Ft(this._hexColor)&&(this.color=this._hexColor)}))}render(){if(super.render(),this.picker=c.global.document.createElement("hex-color-picker"),this.picker.setAttribute("class","hex-color-picker"),this.picker.setAttribute("tabindex","-1"),this._createSlidersView(),this.element){this.element.insertBefore(this.picker,this.hexInputRow.element);const e=document.createElement("style");e.textContent='[role="slider"]:focus [part$="pointer"] {border: 1px solid #fff;outline: 1px solid var(--ck-color-focus-border);box-shadow: 0 0 0 2px #fff;}',this.picker.shadowRoot.appendChild(e)}this.picker.addEventListener("color-changed",(e=>{const t=e.detail.value;this._debounceColorPickerEvent(t)}))}focus(){if(c.OB.isGecko||c.OB.isiOS||c.OB.isSafari){this.hexInputRow.children.get(1).focus()}this.slidersView.first.focus()}_createSlidersView(){const e=[...this.picker.shadowRoot.children].filter((e=>"slider"===e.getAttribute("role"))).map((e=>new Lt(e)));this.slidersView=this.createCollection(),e.forEach((e=>{this.slidersView.add(e)}))}_createInputRow(){const e=new Zt,t=this._createColorInput();return new Wt(this.locale,[e,t])}_createColorInput(){const e=new fe(this.locale,nt),{t}=this.locale;return e.set({label:t("HEX"),class:"color-picker-hex-input"}),e.fieldView.bind("value").to(this,"_hexColor",(t=>e.isFocused?e.fieldView.value:t.startsWith("#")?t.substring(1):t)),e.fieldView.on("input",(()=>{const t=e.fieldView.element.value;if(t){const e=t.trim(),o=e.startsWith("#")?e.substring(1):e;[3,4,6,8].includes(o.length)&&/(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})/.test(o)&&this._debounceColorPickerEvent("#"+o)}})),e}}function Ft(e){let t=function(e){if(!e)return"";const t=ae(e);return t?"hex"===t.space?t.hexValue:re(e,"hex"):"#000"}(e);return t||(t="#000"),4===t.length&&(t="#"+[t[1],t[1],t[2],t[2],t[3],t[3]].join("")),t.toLowerCase()}class Lt extends f{constructor(e){super(),this.element=e}focus(){this.element.focus()}}class Zt extends f{constructor(e){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__hash-view"]},children:"#"})}}class Wt extends f{constructor(e,t){super(e),this.children=this.createCollection(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__row"]},children:this.children})}}class $t{constructor(e){this._components=new Map,this.editor=e}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(qt(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new c.Bb("componentfactory-item-missing",this,{name:e});return this._components.get(qt(e)).callback(this.editor.locale)}has(e){return this._components.has(qt(e))}}function qt(e){return String(e).toLowerCase()}var Ht=o("./node_modules/lodash-es/isElement.js"),Ut=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonpanel.css"),Kt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Ut.Z,Kt);Ut.Z.locals;var Gt=Object.defineProperty,Jt=Object.getOwnPropertySymbols,Yt=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,Qt=(e,t,o)=>t in e?Gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,eo=(e,t)=>{for(var o in t||(t={}))Yt.call(t,o)&&Qt(e,o,t[o]);if(Jt)for(var o of Jt(t))Xt.call(t,o)&&Qt(e,o,t[o]);return e};const to=(0,c.nn)("px"),oo=c.global.document.body,io=class extends f{constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",(e=>`ck-balloon-panel_${e}`)),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",to),left:t.to("left",to)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=io.defaultPositions,o=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast,t.viewportStickyNorth],limiter:oo,fitInViewport:!0},e),i=io._getOptimalPosition(o),s=parseInt(i.left),n=parseInt(i.top),r=i.name,a=i.config||{},{withArrow:c=!0}=a;this.top=n,this.left=s,this.position=r,this.withArrow=c}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=no(e.target),o=e.limiter?no(e.limiter):oo;this.listenTo(c.global.document,"scroll",((i,s)=>{const n=s.target,r=t&&n.contains(t),a=o&&n.contains(o);!r&&!a&&t&&o||this.attachTo(e)}),{useCapture:!0}),this.listenTo(c.global.window,"resize",(()=>{this.attachTo(e)}))}_stopPinning(){this.stopListening(c.global.document,"scroll"),this.stopListening(c.global.window,"resize")}};let so=io;function no(e){return(0,Ht.Z)(e)?e:(0,c.bR)(e)?e.commonAncestorContainer:"function"==typeof e?no(e()):null}function ro(e={}){const{sideOffset:t=so.arrowSideOffset,heightOffset:o=so.arrowHeightOffset,stickyVerticalOffset:i=so.stickyVerticalOffset,config:s}=e;return{northWestArrowSouthWest:(e,o)=>eo({top:n(e,o),left:e.left-t,name:"arrow_sw"},s&&{config:s}),northWestArrowSouthMiddleWest:(e,o)=>eo({top:n(e,o),left:e.left-.25*o.width-t,name:"arrow_smw"},s&&{config:s}),northWestArrowSouth:(e,t)=>eo({top:n(e,t),left:e.left-t.width/2,name:"arrow_s"},s&&{config:s}),northWestArrowSouthMiddleEast:(e,o)=>eo({top:n(e,o),left:e.left-.75*o.width+t,name:"arrow_sme"},s&&{config:s}),northWestArrowSouthEast:(e,o)=>eo({top:n(e,o),left:e.left-o.width+t,name:"arrow_se"},s&&{config:s}),northArrowSouthWest:(e,o)=>eo({top:n(e,o),left:e.left+e.width/2-t,name:"arrow_sw"},s&&{config:s}),northArrowSouthMiddleWest:(e,o)=>eo({top:n(e,o),left:e.left+e.width/2-.25*o.width-t,name:"arrow_smw"},s&&{config:s}),northArrowSouth:(e,t)=>eo({top:n(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s"},s&&{config:s}),northArrowSouthMiddleEast:(e,o)=>eo({top:n(e,o),left:e.left+e.width/2-.75*o.width+t,name:"arrow_sme"},s&&{config:s}),northArrowSouthEast:(e,o)=>eo({top:n(e,o),left:e.left+e.width/2-o.width+t,name:"arrow_se"},s&&{config:s}),northEastArrowSouthWest:(e,o)=>eo({top:n(e,o),left:e.right-t,name:"arrow_sw"},s&&{config:s}),northEastArrowSouthMiddleWest:(e,o)=>eo({top:n(e,o),left:e.right-.25*o.width-t,name:"arrow_smw"},s&&{config:s}),northEastArrowSouth:(e,t)=>eo({top:n(e,t),left:e.right-t.width/2,name:"arrow_s"},s&&{config:s}),northEastArrowSouthMiddleEast:(e,o)=>eo({top:n(e,o),left:e.right-.75*o.width+t,name:"arrow_sme"},s&&{config:s}),northEastArrowSouthEast:(e,o)=>eo({top:n(e,o),left:e.right-o.width+t,name:"arrow_se"},s&&{config:s}),southWestArrowNorthWest:e=>eo({top:r(e),left:e.left-t,name:"arrow_nw"},s&&{config:s}),southWestArrowNorthMiddleWest:(e,o)=>eo({top:r(e),left:e.left-.25*o.width-t,name:"arrow_nmw"},s&&{config:s}),southWestArrowNorth:(e,t)=>eo({top:r(e),left:e.left-t.width/2,name:"arrow_n"},s&&{config:s}),southWestArrowNorthMiddleEast:(e,o)=>eo({top:r(e),left:e.left-.75*o.width+t,name:"arrow_nme"},s&&{config:s}),southWestArrowNorthEast:(e,o)=>eo({top:r(e),left:e.left-o.width+t,name:"arrow_ne"},s&&{config:s}),southArrowNorthWest:e=>eo({top:r(e),left:e.left+e.width/2-t,name:"arrow_nw"},s&&{config:s}),southArrowNorthMiddleWest:(e,o)=>eo({top:r(e),left:e.left+e.width/2-.25*o.width-t,name:"arrow_nmw"},s&&{config:s}),southArrowNorth:(e,t)=>eo({top:r(e),left:e.left+e.width/2-t.width/2,name:"arrow_n"},s&&{config:s}),southArrowNorthMiddleEast:(e,o)=>eo({top:r(e),left:e.left+e.width/2-.75*o.width+t,name:"arrow_nme"},s&&{config:s}),southArrowNorthEast:(e,o)=>eo({top:r(e),left:e.left+e.width/2-o.width+t,name:"arrow_ne"},s&&{config:s}),southEastArrowNorthWest:e=>eo({top:r(e),left:e.right-t,name:"arrow_nw"},s&&{config:s}),southEastArrowNorthMiddleWest:(e,o)=>eo({top:r(e),left:e.right-.25*o.width-t,name:"arrow_nmw"},s&&{config:s}),southEastArrowNorth:(e,t)=>eo({top:r(e),left:e.right-t.width/2,name:"arrow_n"},s&&{config:s}),southEastArrowNorthMiddleEast:(e,o)=>eo({top:r(e),left:e.right-.75*o.width+t,name:"arrow_nme"},s&&{config:s}),southEastArrowNorthEast:(e,o)=>eo({top:r(e),left:e.right-o.width+t,name:"arrow_ne"},s&&{config:s}),westArrowEast:(e,t)=>eo({top:e.top+e.height/2-t.height/2,left:e.left-t.width-o,name:"arrow_e"},s&&{config:s}),eastArrowWest:(e,t)=>eo({top:e.top+e.height/2-t.height/2,left:e.right+o,name:"arrow_w"},s&&{config:s}),viewportStickyNorth:(e,t,o)=>e.getIntersection(o)?{top:o.top+i,left:e.left+e.width/2-t.width/2,name:"arrowless",config:eo({withArrow:!1},s)}:null};function n(e,t){return e.top-t.height-o}function r(e){return e.bottom+o}}so.arrowSideOffset=25,so.arrowHeightOffset=10,so.stickyVerticalOffset=20,so._getOptimalPosition=c.xZ,so.defaultPositions=ro();var ao=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/tooltip/tooltip.css"),co={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(ao.Z,co);ao.Z.locals;const lo="ck-tooltip",ho=class extends((0,c.Xu)()){constructor(e){if(super(),this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver=null,ho._editors.add(e),ho._instance)return ho._instance;ho._instance=this,this.tooltipTextView=new f(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new so(e.locale),this.balloonPanelView.class=lo,this.balloonPanelView.content.add(this.tooltipTextView),this._pinTooltipDebounced=(0,ce.Z)(this._pinTooltip,600),this.listenTo(c.global.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(c.global.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(c.global.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(c.global.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(c.global.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const t=e.ui.view&&e.ui.view.body;ho._editors.delete(e),this.stopListening(e.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),ho._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),ho._instance=null)}static getPositioningFunctions(e){const t=ho.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[e]}_onEnterOrFocus(e,{target:t}){const o=po(t);var i;o&&(o!==this._currentElementWithTooltip&&(this._unpinTooltip(),this._pinTooltipDebounced(o,{text:(i=o).dataset.ckeTooltipText,position:i.dataset.ckeTooltipPosition||"s",cssClass:i.dataset.ckeTooltipClass||""})))}_onLeaveOrBlur(e,{target:t,relatedTarget:o}){if("mouseleave"===e.name){if(!(0,Ht.Z)(t))return;if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const e=po(t),i=po(o);e&&e!==i&&this._unpinTooltip()}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._unpinTooltip()}}_onScroll(e,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:t,position:o,cssClass:i}){const s=(0,c.Ps)(ho._editors.values()).ui.view.body;s.has(this.balloonPanelView)||s.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.pin({target:e,positions:ho.getPositioningFunctions(o)}),this._resizeObserver=new c.do(e,(()=>{(0,c.pn)(e)||this._unpinTooltip()})),this.balloonPanelView.class=[lo,i].filter((e=>e)).join(" ");for(const e of ho._editors)this.listenTo(e.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=o}_unpinTooltip(){this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of ho._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver&&this._resizeObserver.destroy()}_updateTooltipPosition(){(0,c.pn)(this._currentElementWithTooltip)?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:ho.getPositioningFunctions(this._currentTooltipPosition)}):this._unpinTooltip()}};let uo=ho;function po(e){return(0,Ht.Z)(e)?e.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}uo.defaultBalloonPositions=ro({heightOffset:5,sideOffset:13}),uo._editors=new Set,uo._instance=null;var fo=o("./node_modules/lodash-es/throttle.js");var go=Object.defineProperty,mo=Object.getOwnPropertySymbols,bo=Object.prototype.hasOwnProperty,_o=Object.prototype.propertyIsEnumerable,wo=(e,t,o)=>t in e?go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,ko=(e,t)=>{for(var o in t||(t={}))bo.call(t,o)&&wo(e,o,t[o]);if(mo)for(var o of mo(t))_o.call(t,o)&&wo(e,o,t[o]);return e};const vo=50,yo=350,xo="Powered by",Po={top:-99999,left:-99999,name:"invalid",config:{withArrow:!1}};class Eo extends((0,c.Xu)()){constructor(e){super(),this.editor=e,this._balloonView=null,this._lastFocusedEditableElement=null,this._showBalloonThrottled=(0,fo.Z)(this._showBalloon.bind(this),50,{leading:!0}),e.on("ready",this._handleEditorReady.bind(this))}destroy(){const e=this._balloonView;e&&(e.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const e=this.editor;"VALID"!==(0,c.Tx)(e.config.get("licenseKey"))&&e.ui.view&&(e.ui.focusTracker.on("change:isFocused",((e,t,o)=>{this._updateLastFocusedEditableElement(),o?this._showBalloon():this._hideBalloon()})),e.ui.focusTracker.on("change:focusedElement",((e,t,o)=>{this._updateLastFocusedEditableElement(),o&&this._showBalloon()})),e.ui.on("update",(()=>{this._showBalloonThrottled()})))}_createBalloonView(){const e=this.editor,t=this._balloonView=new so,o=Co(e),i=new To(e.locale,o.label);t.content.add(i),t.set({class:"ck-powered-by-balloon"}),e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this._balloonView=t}_showBalloon(){if(!this._lastFocusedEditableElement)return;const e=function(e,t){const o=Co(e),i="right"===o.side?function(e,t){return Ao(e,t,((e,o)=>e.left+e.width-o.width-t.horizontalOffset))}(t,o):function(e,t){return Ao(e,t,(e=>e.left+t.horizontalOffset))}(t,o);return{target:t,positions:[i]}}(this.editor,this._lastFocusedEditableElement);e&&(this._balloonView||this._createBalloonView(),this._balloonView.pin(e))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_updateLastFocusedEditableElement(){const e=this.editor,t=e.ui.focusTracker.isFocused,o=e.ui.focusTracker.focusedElement;if(!t||!o)return void(this._lastFocusedEditableElement=null);const i=Array.from(e.ui.getEditableElementsNames()).map((t=>e.ui.getEditableElement(t)));i.includes(o)?this._lastFocusedEditableElement=o:this._lastFocusedEditableElement=i[0]}}class To extends f{constructor(e,t){super(e);const o=new Z,i=this.bindTemplate;o.set({content:'<svg xmlns="http://www.w3.org/2000/svg" width="53" height="10" viewBox="0 0 53 10"><g clip-path="url(#a)"><path fill="#1C2331" d="M31.724 1.492a15.139 15.139 0 0 0 .045 1.16 2.434 2.434 0 0 0-.687-.34 3.68 3.68 0 0 0-1.103-.166 2.332 2.332 0 0 0-1.14.255 1.549 1.549 0 0 0-.686.87c-.15.41-.225.98-.225 1.712 0 .939.148 1.659.444 2.161.297.503.792.754 1.487.754.452.015.9-.094 1.294-.316.296-.174.557-.4.771-.669l.14.852h1.282V.007h-1.623v1.485ZM31 6.496a1.77 1.77 0 0 1-.494.061.964.964 0 0 1-.521-.127.758.758 0 0 1-.296-.466 3.984 3.984 0 0 1-.093-.992 4.208 4.208 0 0 1 .098-1.052.753.753 0 0 1 .307-.477 1.08 1.08 0 0 1 .55-.122c.233-.004.466.026.69.089l.483.144v2.553c-.11.076-.213.143-.307.2a1.73 1.73 0 0 1-.417.189ZM35.68 0l-.702.004c-.322.002-.482.168-.48.497l.004.581c.002.33.164.493.486.49l.702-.004c.322-.002.481-.167.48-.496L36.165.49c-.002-.33-.164-.493-.486-.491ZM36.145 2.313l-1.612.01.034 5.482 1.613-.01-.035-5.482ZM39.623.79 37.989.8 38 2.306l-.946.056.006 1.009.949-.006.024 2.983c.003.476.143.844.419 1.106.275.26.658.39 1.148.387.132 0 .293-.01.483-.03.19-.02.38-.046.57-.08.163-.028.324-.068.482-.119l-.183-1.095-.702.004a.664.664 0 0 1-.456-.123.553.553 0 0 1-.14-.422l-.016-2.621 1.513-.01-.006-1.064-1.514.01-.01-1.503ZM46.226 2.388c-.41-.184-.956-.274-1.636-.27-.673.004-1.215.101-1.627.29-.402.179-.72.505-.888.91-.18.419-.268.979-.264 1.68.004.688.1 1.24.285 1.655.172.404.495.724.9.894.414.18.957.268 1.63.264.68-.004 1.224-.099 1.632-.284.4-.176.714-.501.878-.905.176-.418.263-.971.258-1.658-.004-.702-.097-1.261-.28-1.677a1.696 1.696 0 0 0-.888-.9Zm-.613 3.607a.77.77 0 0 1-.337.501 1.649 1.649 0 0 1-1.317.009.776.776 0 0 1-.343-.497 4.066 4.066 0 0 1-.105-1.02 4.136 4.136 0 0 1 .092-1.03.786.786 0 0 1 .337-.507 1.59 1.59 0 0 1 1.316-.008.79.79 0 0 1 .344.502c.078.337.113.683.105 1.03.012.343-.019.685-.092 1.02ZM52.114 2.07a2.67 2.67 0 0 0-1.128.278c-.39.191-.752.437-1.072.73l-.157-.846-1.273.008.036 5.572 1.623-.01-.024-3.78c.35-.124.646-.22.887-.286.26-.075.53-.114.8-.118l.45-.003.144-1.546-.286.001ZM22.083 7.426l-1.576-2.532a2.137 2.137 0 0 0-.172-.253 1.95 1.95 0 0 0-.304-.29.138.138 0 0 1 .042-.04 1.7 1.7 0 0 0 .328-.374l1.75-2.71c.01-.015.025-.028.024-.048-.01-.01-.021-.007-.031-.007L20.49 1.17a.078.078 0 0 0-.075.045l-.868 1.384c-.23.366-.46.732-.688 1.099a.108.108 0 0 1-.112.06c-.098-.005-.196-.001-.294-.002-.018 0-.038.006-.055-.007.002-.02.002-.039.005-.058a4.6 4.6 0 0 0 .046-.701V1.203c0-.02-.009-.032-.03-.03h-.033L16.93 1.17c-.084 0-.073-.01-.073.076v6.491c-.001.018.006.028.025.027h1.494c.083 0 .072.007.072-.071v-2.19c0-.055-.003-.11-.004-.166a3.366 3.366 0 0 0-.05-.417h.06c.104 0 .209.002.313-.002a.082.082 0 0 1 .084.05c.535.913 1.07 1.824 1.607 2.736a.104.104 0 0 0 .103.062c.554-.003 1.107-.002 1.66-.002l.069-.003-.019-.032-.188-.304ZM27.112 6.555c-.005-.08-.004-.08-.082-.08h-2.414c-.053 0-.106-.003-.159-.011a.279.279 0 0 1-.246-.209.558.558 0 0 1-.022-.15c0-.382 0-.762-.002-1.143 0-.032.007-.049.042-.044h2.504c.029.003.037-.012.034-.038V3.814c0-.089.013-.078-.076-.078h-2.44c-.07 0-.062.003-.062-.06v-.837c0-.047.004-.093.013-.14a.283.283 0 0 1 .241-.246.717.717 0 0 1 .146-.011h2.484c.024.002.035-.009.036-.033l.003-.038.03-.496c.01-.183.024-.365.034-.548.005-.085.003-.087-.082-.094-.218-.018-.437-.038-.655-.05a17.845 17.845 0 0 0-.657-.026 72.994 72.994 0 0 0-1.756-.016 1.7 1.7 0 0 0-.471.064 1.286 1.286 0 0 0-.817.655c-.099.196-.149.413-.145.633v3.875c0 .072.003.144.011.216a1.27 1.27 0 0 0 .711 1.029c.228.113.48.167.734.158.757-.005 1.515.002 2.272-.042.274-.016.548-.034.82-.053.03-.002.043-.008.04-.041-.008-.104-.012-.208-.019-.312a69.964 69.964 0 0 1-.05-.768ZM16.14 7.415l-.127-1.075c-.004-.03-.014-.04-.044-.037a13.125 13.125 0 0 1-.998.073c-.336.01-.672.02-1.008.016-.116-.001-.233-.014-.347-.039a.746.746 0 0 1-.45-.262c-.075-.1-.132-.211-.167-.33a3.324 3.324 0 0 1-.126-.773 9.113 9.113 0 0 1-.015-.749c0-.285.022-.57.065-.852.023-.158.066-.312.127-.46a.728.728 0 0 1 .518-.443 1.64 1.64 0 0 1 .397-.048c.628-.001 1.255.003 1.882.05.022.001.033-.006.036-.026l.003-.031.06-.55c.019-.177.036-.355.057-.532.004-.034-.005-.046-.04-.056a5.595 5.595 0 0 0-1.213-.21 10.783 10.783 0 0 0-.708-.02c-.24-.003-.48.01-.719.041a3.477 3.477 0 0 0-.625.14 1.912 1.912 0 0 0-.807.497c-.185.2-.33.433-.424.688a4.311 4.311 0 0 0-.24 1.096c-.031.286-.045.572-.042.86-.006.43.024.86.091 1.286.04.25.104.497.193.734.098.279.26.53.473.734.214.205.473.358.756.446.344.11.702.17 1.063.177a8.505 8.505 0 0 0 1.578-.083 6.11 6.11 0 0 0 .766-.18c.03-.008.047-.023.037-.057a.157.157 0 0 1-.003-.025Z"/><path fill="#AFE229" d="M6.016 6.69a1.592 1.592 0 0 0-.614.21c-.23.132-.422.32-.56.546-.044.072-.287.539-.287.539l-.836 1.528.009.006c.038.025.08.046.123.063.127.046.26.07.395.073.505.023 1.011-.007 1.517-.003.29.009.58.002.869-.022a.886.886 0 0 0 .395-.116.962.962 0 0 0 .312-.286c.056-.083.114-.163.164-.249.24-.408.48-.816.718-1.226.075-.128.148-.257.222-.386l.112-.192a1.07 1.07 0 0 0 .153-.518l-1.304.023s-1.258-.005-1.388.01Z"/><path fill="#771BFF" d="m2.848 9.044.76-1.39.184-.352c-.124-.067-.245-.14-.367-.21-.346-.204-.706-.384-1.045-.6a.984.984 0 0 1-.244-.207c-.108-.134-.136-.294-.144-.46-.021-.409-.002-.818-.009-1.227-.003-.195 0-.39.003-.585.004-.322.153-.553.427-.713l.833-.488c.22-.13.44-.257.662-.385.05-.029.105-.052.158-.077.272-.128.519-.047.76.085l.044.028c.123.06.242.125.358.196.318.178.635.357.952.537.095.056.187.117.275.184.194.144.254.35.266.578.016.284.007.569.006.853-.001.28.004.558 0 .838.592-.003 1.259 0 1.259 0l.723-.013c-.003-.292-.007-.584-.007-.876 0-.524.015-1.048-.016-1.571-.024-.42-.135-.8-.492-1.067a5.02 5.02 0 0 0-.506-.339A400.52 400.52 0 0 0 5.94.787C5.722.664 5.513.524 5.282.423 5.255.406 5.228.388 5.2.373 4.758.126 4.305-.026 3.807.21c-.097.046-.197.087-.29.14A699.896 699.896 0 0 0 .783 1.948c-.501.294-.773.717-.778 1.31-.004.36-.009.718-.001 1.077.016.754-.017 1.508.024 2.261.016.304.07.6.269.848.127.15.279.28.448.382.622.4 1.283.734 1.92 1.11l.183.109Z"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h52.4v10H0z"/></clipPath></defs></svg>\n',isColorInherited:!1}),o.extendTemplate({attributes:{style:{width:"53px",height:"10px"}}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...t?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[t]}]:[],o],on:{dragstart:i.to((e=>e.preventDefault()))}}]})}}function Ao(e,t,o){return(i,s)=>{const n=i.getVisible();if(!n)return Po;if(i.width<yo||i.height<vo)return Po;let r;r="inside"===t.position?i.bottom-s.height:i.bottom-s.height/2,r-=t.verticalOffset;const a=o(i,s);if("inside"===t.position){const e=s.clone().moveTo(a,r);if(e.getIntersectionArea(n)<e.getArea())return Po}else{const t=(0,c.wm)(e);if(t){const e=new c.UL(t);if(n.bottom+s.height/2>e.bottom)return Po}}return{top:r,left:a,name:`position_${t.position}-side_${t.side}`,config:{withArrow:!1}}}}function Co(e){const t=e.config.get("ui.poweredBy"),o=t&&t.position||"border";return ko({position:o,label:xo,verticalOffset:"inside"===o?5:0,horizontalOffset:5,side:"ltr"===e.locale.contentLanguageDirection?"right":"left"},t)}class So extends((0,c.Re)()){constructor(e){super(),this.isReady=!1,this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[],this.editor=e,this.componentFactory=new $t(e),this.focusTracker=new c.Rh,this.tooltipManager=new uo(e),this.poweredBy=new Eo(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",(()=>{this.isReady=!0})),this.listenTo(e.editing.view.document,"layoutChanged",(()=>this.update())),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null,this.editor.keystrokes.stopListening(e);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);const o=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?o():this.once("ready",o)}removeEditableElement(e){const t=this._editableElementsMap.get(e);t&&(this._editableElementsMap.delete(e),this.editor.keystrokes.stopListening(t),this.focusTracker.remove(t),t.ckeditorInstance=null)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e,t={}){e.isRendered?(this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)):e.once("render",(()=>{this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)})),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const o=e.config.get("toolbar.viewportTopOffset");return o?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:o}):{top:0}}_initFocusTracking(){const e=this.editor,t=e.editing.view;let o,i;e.keystrokes.set("Alt+F10",((e,s)=>{const n=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(n)&&!Array.from(t.domRoots.values()).includes(n)&&(o=n);const r=this._getCurrentFocusedToolbarDefinition();r&&i||(i=this._getFocusableCandidateToolbarDefinitions());for(let e=0;e<i.length;e++){const e=i.shift();if(i.push(e),e!==r&&this._focusFocusableCandidateToolbar(e)){r&&r.options.afterBlur&&r.options.afterBlur();break}}s()})),e.keystrokes.set("Esc",((t,i)=>{const s=this._getCurrentFocusedToolbarDefinition();s&&(o?(o.focus(),o=null):e.editing.view.focus(),s.options.afterBlur&&s.options.afterBlur(),i())}))}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const t of this._focusableToolbarDefinitions){const{toolbarView:o,options:i}=t;((0,c.pn)(o.element)||i.beforeFocus)&&e.push(t)}return e.sort(((e,t)=>Oo(e)-Oo(t))),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:t,options:{beforeFocus:o}}=e;return o&&o(),!!(0,c.pn)(t.element)&&(t.focus(),!0)}}function Oo(e){const{toolbarView:t,options:o}=e;let i=10;return(0,c.pn)(t.element)&&i--,o.isContextual&&i--,i}var Ro=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/editorui.css"),Mo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Ro.Z,Mo);Ro.Z.locals;class jo extends f{constructor(e){super(e),this.body=new N(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class Bo extends jo{constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new he;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class Do extends f{constructor(e,t,o){super(e),this.name=null,this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=o,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",(()=>this._updateIsFocusedClasses())),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change((o=>{const i=e.document.getRoot(t.name);o.addClass(t.isFocused?"ck-focused":"ck-blurred",i),o.removeClass(t.isFocused?"ck-blurred":"ck-focused",i)}))}e.isRenderingInProgress?function o(i){e.once("change:isRenderingInProgress",((e,s,n)=>{n?o(i):t(i)}))}(this):t(this)}}class Vo extends Do{constructor(e,t,o,i={}){super(e,t,o);const s=e.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=i.label||(()=>s("Editor editing area: %0",this.name))}render(){super.render();const e=this._editingView;e.change((t=>{const o=e.document.getRoot(this.name);t.setAttribute("aria-label",this._generateLabel(this),o)}))}}var Io=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/formheader/formheader.css"),No={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Io.Z,No);Io.Z.locals;class zo extends f{constructor(e,t={}){super(e);const o=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",o.to("class")]},children:this.children});const i=new f(e);i.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"]},children:[{text:o.to("label")}]}),this.children.add(i)}}class Fo extends f{constructor(e){super(e);const t=this.bindTemplate;this.setTemplate({tag:"iframe",attributes:{class:["ck","ck-reset_all"],sandbox:"allow-same-origin allow-scripts"},on:{load:t.to("loaded")}})}render(){return new Promise((e=>(this.on("loaded",e),super.render())))}}class Lo extends Me.eO{static get pluginName(){return"Notification"}init(){this.on("show:warning",((e,t)=>{window.alert(t.message)}),{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=e.namespace?`show:${e.type}:${e.namespace}`:`show:${e.type}`;this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}var Zo=o("./node_modules/lodash-es/assignIn.js");class Wo extends((0,c.Re)()){constructor(e,t){super(),t&&(0,Zo.Z)(this,t),e&&this.set(e)}}var $o=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonrotator.css"),qo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()($o.Z,qo);$o.Z.locals;var Ho=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/fakepanel.css"),Uo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Ho.Z,Uo);Ho.Z.locals;const Ko=(0,c.nn)("px");class Go extends Me.Sy{constructor(e){super(e),this._viewToStack=new Map,this._idToStack=new Map,this._view=null,this._rotatorView=null,this._fakePanelsView=null,this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}static get pluginName(){return"ContextualBalloon"}destroy(){super.destroy(),this._view&&this._view.destroy(),this._rotatorView&&this._rotatorView.destroy(),this._fakePanelsView&&this._fakePanelsView.destroy()}get view(){return this._view||this._createPanelView(),this._view}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this._view||this._createPanelView(),this.hasView(e.view))throw new c.Bb("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const o=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),o.set(e.view,e),this._viewToStack.set(e.view,o),o===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new c.Bb("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new c.Bb("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}_createPanelView(){this._view=new so(this.editor.locale),this.editor.ui.view.body.add(this._view),this.editor.ui.focusTracker.add(this._view.element),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find((t=>t[1]===e))[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new Jo(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>1)),e.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((e,o)=>{if(o<2)return"";const i=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[i,o])})),e.buttonNextView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()})),e.buttonPrevView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()})),e}_createFakePanelsView(){const e=new Yo(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>=2?Math.min(e-1,2):0)),e.listenTo(this.view,"change:top",(()=>e.updatePosition())),e.listenTo(this.view,"change:left",(()=>e.updatePosition())),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:o=!0,singleViewMode:i=!1}){this.view.class=t,this.view.withArrow=o,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),i&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}}class Jo extends f{constructor(e){super(e);const t=e.t,o=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new c.Rh,this.buttonPrevView=this._createButtonView(t("Previous"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z"/></svg>'),this.buttonNextView=this._createButtonView(t("Next"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382l-4.043 4.042z"/></svg>'),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",o.to("isNavigationVisible",(e=>e?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:o.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const o=new q(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o}}class Yo extends f{constructor(e,t){super(e);const o=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",o.to("numberOfPanels",(e=>e?"":"ck-hidden"))],style:{top:o.to("top",Ko),left:o.to("left",Ko),width:o.to("width",Ko),height:o.to("height",Ko)}},children:this.content}),this.on("change:numberOfPanels",((e,t,o,i)=>{o>i?this._addPanels(o-i):this._removePanels(i-o),this.updatePosition()}))}_addPanels(e){for(;e--;){const e=new f;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:o,height:i}=new c.UL(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:o,height:i})}}}var Xo=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/stickypanel.css"),Qo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(Xo.Z,Qo);Xo.Z.locals;const ei=(0,c.nn)("px");class ti extends f{constructor(e){super(e);const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheLimiter",!1),this.set("_hasViewportTopOffset",!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new b({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",(e=>e?"block":"none")),height:t.to("isSticky",(e=>e?ei(this._panelRect.height):null))}}}).render(),this._contentPanel=new b({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",(e=>e?ei(this._contentPanelPlaceholder.getBoundingClientRect().width):null)),top:t.to("_hasViewportTopOffset",(e=>e?ei(this.viewportTopOffset):null)),bottom:t.to("_isStickyToTheLimiter",(e=>e?ei(this.limiterBottomOffset):null)),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(c.global.window,"scroll",(()=>{this._checkIfShouldBeSticky()})),this.listenTo(this,"change:isActive",(()=>{this._checkIfShouldBeSticky()}))}_checkIfShouldBeSticky(){const e=this._panelRect=this._contentPanel.getBoundingClientRect();let t;this.limiterElement?(t=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&t.top<this.viewportTopOffset&&this._panelRect.height+this.limiterBottomOffset<t.height):this.isSticky=!1,this.isSticky?(this._isStickyToTheLimiter=t.bottom<e.height+this.limiterBottomOffset+this.viewportTopOffset,this._hasViewportTopOffset=!this._isStickyToTheLimiter&&!!this.viewportTopOffset,this._marginLeft=this._isStickyToTheLimiter?null:ei(-c.global.window.scrollX)):(this._isStickyToTheLimiter=!1,this._hasViewportTopOffset=!1,this._marginLeft=null)}}const oi=(0,c.nn)("px");class ii extends Me.Sy{constructor(e){super(e),this._resizeObserver=null,this._balloonConfig=Re(e.config.get("balloonToolbar")),this.toolbarView=this._createToolbarView(),this.focusTracker=new c.Rh,e.ui.once("ready",(()=>{this.focusTracker.add(e.ui.getEditableElement()),this.focusTracker.add(this.toolbarView.element)})),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this.show(!0),afterBlur:()=>this.hide(),isContextual:!0}),this._balloon=e.plugins.get(Go),this._fireSelectionChangeDebounced=(0,ce.Z)((()=>this.fire("_selectionChangeDebounced")),200),this.decorate("show")}static get pluginName(){return"BalloonToolbar"}static get requires(){return[Go]}init(){const e=this.editor,t=e.model.document.selection;this.listenTo(this.focusTracker,"change:isFocused",((e,t,o)=>{const i=this._balloon.visibleView===this.toolbarView;!o&&i?this.hide():o&&this.show()})),this.listenTo(t,"change:range",((e,o)=>{(o.directChange||t.isCollapsed)&&this.hide(),this._fireSelectionChangeDebounced()})),this.listenTo(this,"_selectionChangeDebounced",(()=>{this.editor.editing.view.document.isFocused&&this.show()})),this._balloonConfig.shouldNotGroupWhenFull||this.listenTo(e,"ready",(()=>{const t=e.ui.view.editable.element;this._resizeObserver=new c.do(t,(e=>{this.toolbarView.maxWidth=oi(.9*e.contentRect.width)}))})),this.listenTo(this.toolbarView,"groupedItemsUpdate",(()=>{this._updatePosition()}))}afterInit(){const e=this.editor.ui.componentFactory;this.toolbarView.fillFromConfig(this._balloonConfig,e)}_createToolbarView(){const e=this.editor.locale.t,t=!this._balloonConfig.shouldNotGroupWhenFull,o=new Ie(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return o.ariaLabel=e("Editor contextual toolbar"),o.render(),o}show(e=!1){const t=this.editor,o=t.model.document.selection,i=t.model.schema;this._balloon.hasView(this.toolbarView)||o.isCollapsed&&!e||function(e,t){if(1===e.rangeCount)return!1;return[...e.getRanges()].every((e=>{const o=e.getContainedElement();return o&&t.isSelectable(o)}))}(o,i)||Array.from(this.toolbarView.items).every((e=>void 0!==e.isEnabled&&!e.isEnabled))||(this.listenTo(this.editor.ui,"update",(()=>{this._updatePosition()})),this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"}))}hide(){this._balloon.hasView(this.toolbarView)&&(this.stopListening(this.editor.ui,"update"),this._balloon.remove(this.toolbarView))}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document,o=t.selection,i=t.selection.isBackward;return{target:()=>{const t=i?o.getFirstRange():o.getLastRange(),s=c.UL.getDomRangeRects(e.domConverter.viewRangeToDom(t));return i?s[0]:(s.length>1&&0===s[s.length-1].width&&s.pop(),s[s.length-1])},positions:this._getBalloonPositions(i)}}_updatePosition(){this._balloon.updatePosition(this._getBalloonPositionData())}destroy(){super.destroy(),this.stopListening(),this._fireSelectionChangeDebounced.cancel(),this.toolbarView.destroy(),this.focusTracker.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getBalloonPositions(e){const t=c.OB.isSafari&&c.OB.isiOS?ro({heightOffset:Math.max(so.arrowHeightOffset,Math.round(20/c.global.window.visualViewport.scale))}):so.defaultPositions;return e?[t.northWestArrowSouth,t.northWestArrowSouthWest,t.northWestArrowSouthEast,t.northWestArrowSouthMiddleEast,t.northWestArrowSouthMiddleWest,t.southWestArrowNorth,t.southWestArrowNorthWest,t.southWestArrowNorthEast,t.southWestArrowNorthMiddleWest,t.southWestArrowNorthMiddleEast]:[t.southEastArrowNorth,t.southEastArrowNorthEast,t.southEastArrowNorthWest,t.southEastArrowNorthMiddleEast,t.southEastArrowNorthMiddleWest,t.northEastArrowSouth,t.northEastArrowSouthEast,t.northEastArrowSouthWest,t.northEastArrowSouthMiddleEast,t.northEastArrowSouthMiddleWest]}}var si=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css"),ni={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(si.Z,ni);si.Z.locals;const ri=(0,c.nn)("px");class ai extends q{constructor(e){super(e);const t=this.bindTemplate;this.isVisible=!1,this.isToggleable=!0,this.set("top",0),this.set("left",0),this.extendTemplate({attributes:{class:"ck-block-toolbar-button",style:{top:t.to("top",(e=>ri(e))),left:t.to("left",(e=>ri(e)))}}})}}const ci=(0,c.nn)("px"),{pilcrow:li}=Me.icons;class di extends Me.Sy{constructor(e){super(e),this._resizeObserver=null,this._blockToolbarConfig=Re(this.editor.config.get("blockToolbar")),this.toolbarView=this._createToolbarView(),this.panelView=this._createPanelView(),this.buttonView=this._createButtonView(),i({emitter:this.panelView,contextElements:[this.panelView.element,this.buttonView.element],activator:()=>this.panelView.isVisible,callback:()=>this._hidePanel()})}static get pluginName(){return"BlockToolbar"}init(){const e=this.editor;this.listenTo(e.model.document.selection,"change:range",((e,t)=>{t.directChange&&this._hidePanel()})),this.listenTo(e.ui,"update",(()=>this._updateButton())),this.listenTo(e,"change:isReadOnly",(()=>this._updateButton()),{priority:"low"}),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>this._updateButton())),this.listenTo(this.buttonView,"change:isVisible",((e,t,o)=>{o?this.buttonView.listenTo(window,"resize",(()=>this._updateButton())):(this.buttonView.stopListening(window,"resize"),this._hidePanel())})),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this._showPanel(),afterBlur:()=>this._hidePanel()})}afterInit(){const e=this.editor.ui.componentFactory,t=this._blockToolbarConfig;this.toolbarView.fillFromConfig(t,e);for(const e of this.toolbarView.items)e.on("execute",(()=>this._hidePanel(!0)),{priority:"high"});t.shouldNotGroupWhenFull||this.listenTo(this.editor,"ready",(()=>{const e=this.editor.ui.view.editable.element;this._resizeObserver=new c.do(e,(()=>{this.toolbarView.maxWidth=this._getToolbarMaxWidth()}))}))}destroy(){super.destroy(),this.panelView.destroy(),this.buttonView.destroy(),this.toolbarView.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_createToolbarView(){const e=this.editor.locale.t,t=!this._blockToolbarConfig.shouldNotGroupWhenFull,o=new Ie(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return o.ariaLabel=e("Editor block content toolbar"),o}_createPanelView(){const e=this.editor,t=new so(e.locale);return t.content.add(this.toolbarView),t.class="ck-toolbar-container",e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this.toolbarView.keystrokes.set("Esc",((e,t)=>{this._hidePanel(!0),t()})),t}_createButtonView(){const e=this.editor,t=e.t,o=new ai(e.locale);return o.set({label:t("Edit block"),icon:li,withText:!1}),o.bind("isOn").to(this.panelView,"isVisible"),o.bind("tooltip").to(this.panelView,"isVisible",(e=>!e)),this.listenTo(o,"execute",(()=>{this.panelView.isVisible?this._hidePanel(!0):this._showPanel()})),e.ui.view.body.add(o),e.ui.focusTracker.add(o.element),o}_updateButton(){const e=this.editor,t=e.model,o=e.editing.view;if(!e.ui.focusTracker.isFocused)return void this._hideButton();if(!e.model.canEditAt(e.model.document.selection))return void this._hideButton();const i=Array.from(t.document.selection.getSelectedBlocks())[0];if(!i||Array.from(this.toolbarView.items).every((e=>!e.isEnabled)))return void this._hideButton();const s=o.domConverter.mapViewToDom(e.editing.mapper.toViewElement(i));this.buttonView.isVisible=!0,this._attachButtonToElement(s),this.panelView.isVisible&&this._showPanel()}_hideButton(){this.buttonView.isVisible=!1}_showPanel(){if(!this.buttonView.isVisible)return;const e=this.panelView.isVisible;this.panelView.show(),this.toolbarView.maxWidth=this._getToolbarMaxWidth(),this.panelView.pin({target:this.buttonView.element,limiter:this.editor.ui.getEditableElement()}),e||this.toolbarView.items.get(0).focus()}_hidePanel(e){this.panelView.isVisible=!1,e&&this.editor.editing.view.focus()}_attachButtonToElement(e){const t=window.getComputedStyle(e),o=new c.UL(this.editor.ui.getEditableElement()),i=parseInt(t.paddingTop,10),s=parseInt(t.lineHeight,10)||1.2*parseInt(t.fontSize,10),n=(0,c.xZ)({element:this.buttonView.element,target:e,positions:[(e,t)=>{let n;return n="ltr"===this.editor.locale.uiLanguageDirection?o.left-t.width:o.right,{top:e.top+i+(s-t.height)/2,left:n}}]});this.buttonView.top=n.top,this.buttonView.left=n.left}_getToolbarMaxWidth(){const e=this.editor.ui.view.editable.element,t=new c.UL(e),o=new c.UL(this.buttonView.element),i="rtl"===this.editor.locale.uiLanguageDirection?o.left-t.right+o.width:t.left-o.left;return ci(t.width+i)}}const hi={colorPaletteIcon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.209 18.717A8.5 8.5 0 1 1 18.686 9.6h-.008l.002.12a3 3 0 0 1-2.866 2.997h-.268l-.046-.002v.002h-4.791a2 2 0 1 0 0 4 1 1 0 1 1-.128 1.992 8.665 8.665 0 0 1-.372.008Zm-3.918-7.01a1.25 1.25 0 1 0-2.415-.648 1.25 1.25 0 0 0 2.415.647ZM5.723 8.18a1.25 1.25 0 1 0 .647-2.414 1.25 1.25 0 0 0-.647 2.414ZM9.76 6.155a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415Zm4.028 1.759a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415Z"/></svg>'}},"./packages/ckeditor5-utils/src/ckeditorerror.ts":(e,t,o)=>{"use strict";o.d(t,{H:()=>r,KE:()=>n,ZP:()=>s});const i="https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html";class s extends Error{constructor(e,t,o){super(function(e,t){const o=new WeakSet,i=(e,t)=>{if("object"==typeof t&&null!==t){if(o.has(t))return`[object ${t.constructor.name}]`;o.add(t)}return t},s=t?` ${JSON.stringify(t,i)}`:"",n=a(e);return e+s+n}(e,o)),this.name="CKEditorError",this.context=t,this.data=o}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const o=new s(e.message,t);throw o.stack=e.stack,o}}function n(e,t){console.warn(...c(e,t))}function r(e,t){console.error(...c(e,t))}function a(e){return`\nRead more: ${i}#error-${e}`}function c(e,t){const o=a(e);return t?[e,t,o]:[e,o]}},"./packages/ckeditor5-utils/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{Bb:()=>k.ZP,FE:()=>pt,De:()=>se,Xu:()=>de,a6:()=>H,ln:()=>E,M3:()=>f,Rh:()=>gt,VD:()=>mt,go:()=>ut,Re:()=>F,UL:()=>ye,do:()=>Ae,Rt:()=>K,QX:()=>U,az:()=>ee,gw:()=>kt,Hg:()=>d,Pk:()=>h,OB:()=>n,HZ:()=>a,wm:()=>ge,Ps:()=>ft,dk:()=>me,Cq:()=>ot,yy:()=>be,XU:()=>st,j9:()=>lt,mA:()=>rt,xZ:()=>Ie,global:()=>fe,cq:()=>Oe,ZQ:()=>Re,VG:()=>_,dj:()=>nt,tO:()=>yt,C3:()=>Me,Zt:()=>at,Cb:()=>xt,pp:()=>Tt,YK:()=>Ct,to:()=>Et,TW:()=>G,nA:()=>Pt,UG:()=>ae,bR:()=>we,Gs:()=>_e,$b:()=>je,pn:()=>Be,Do:()=>et,H:()=>k.H,KE:()=>k.KE,CD:()=>u,Zz:()=>it,tA:()=>b,Dm:()=>w.D,Od:()=>Fe,F0:()=>Ze,mR:()=>Le,jS:()=>Ce,x:()=>wt,qo:()=>dt,qL:()=>bt,nn:()=>Se,hQ:()=>m,Tx:()=>vt,i8:()=>w.Z});const i=function(){try{return navigator.userAgent.toLowerCase()}catch(e){return""}}();var s;const n={isMac:r(i),isWindows:(s=i,s.indexOf("windows")>-1),isGecko:function(e){return!!e.match(/gecko\/\d+/)}(i),isSafari:function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(i),isiOS:function(e){return!!e.match(/iphone|ipad/i)||r(e)&&navigator.maxTouchPoints>0}(i),isAndroid:function(e){return e.indexOf("android")>-1}(i),isBlink:function(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}(i),features:{isRegExpUnicodePropertySupported:function(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}()}};function r(e){return e.indexOf("macintosh")>-1}function a(e,t,o,i){o=o||function(e,t){return e===t};const s=Array.isArray(e)?e:Array.prototype.slice.call(e),n=Array.isArray(t)?t:Array.prototype.slice.call(t),r=function(e,t,o){const i=c(e,t,o);if(-1===i)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const s=l(e,i),n=l(t,i),r=c(s,n,o),a=e.length-r,d=t.length-r;return{firstIndex:i,lastIndexOld:a,lastIndexNew:d}}(s,n,o),a=i?function(e,t){const{firstIndex:o,lastIndexOld:i,lastIndexNew:s}=e;if(-1===o)return Array(t).fill("equal");let n=[];o>0&&(n=n.concat(Array(o).fill("equal")));s-o>0&&(n=n.concat(Array(s-o).fill("insert")));i-o>0&&(n=n.concat(Array(i-o).fill("delete")));s<t&&(n=n.concat(Array(t-s).fill("equal")));return n}(r,n.length):function(e,t){const o=[],{firstIndex:i,lastIndexOld:s,lastIndexNew:n}=t;n-i>0&&o.push({index:i,type:"insert",values:e.slice(i,n)});s-i>0&&o.push({index:i+(n-i),type:"delete",howMany:s-i});return o}(n,r);return a}function c(e,t,o){for(let i=0;i<Math.max(e.length,t.length);i++)if(void 0===e[i]||void 0===t[i]||!o(e[i],t[i]))return i;return-1}function l(e,t){return e.slice(t).reverse()}function d(e,t,o){o=o||function(e,t){return e===t};const i=e.length,s=t.length;if(i>200||s>200||i+s>300)return d.fastDiff(e,t,o,!0);let n,r;if(s<i){const o=e;e=t,t=o,n="delete",r="insert"}else n="insert",r="delete";const a=e.length,c=t.length,l=c-a,h={},u={};function p(i){const s=(void 0!==u[i-1]?u[i-1]:-1)+1,l=void 0!==u[i+1]?u[i+1]:-1,d=s>l?-1:1;h[i+d]&&(h[i]=h[i+d].slice(0)),h[i]||(h[i]=[]),h[i].push(s>l?n:r);let p=Math.max(s,l),f=p-i;for(;f<a&&p<c&&o(e[f],t[p]);)f++,p++,h[i].push("equal");return p}let f,g=0;do{for(f=-g;f<l;f++)u[f]=p(f);for(f=l+g;f>l;f--)u[f]=p(f);u[l]=p(l),g++}while(u[l]!==c);return h[l].slice(1)}function h(e,t){const o=[];let i=0,s=null;return e.forEach((e=>{"equal"==e?(n(),i++):"insert"==e?(s&&"insert"==s.type?s.values.push(t[i]):(n(),s={type:"insert",index:i,values:[t[i]]}),i++):s&&"delete"==s.type?s.howMany++:(n(),s={type:"delete",index:i,howMany:1})})),n(),o;function n(){s&&(o.push(s),s=null)}}function u(e,...t){t.forEach((t=>{const o=Object.getOwnPropertyNames(t),i=Object.getOwnPropertySymbols(t);o.concat(i).forEach((o=>{if(o in e.prototype)return;if("function"==typeof t&&("length"==o||"name"==o||"prototype"==o))return;const i=Object.getOwnPropertyDescriptor(t,o);i.enumerable=!1,Object.defineProperty(e.prototype,o,i)}))}))}d.fastDiff=a;const p=function(){return function e(){e.called=!0}};class f{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=p(),this.off=p()}}const g=new Array(256).fill("").map(((e,t)=>("0"+t.toString(16)).slice(-2)));function m(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0,i=4294967296*Math.random()>>>0;return"e"+g[e>>0&255]+g[e>>8&255]+g[e>>16&255]+g[e>>24&255]+g[t>>0&255]+g[t>>8&255]+g[t>>16&255]+g[t>>24&255]+g[o>>0&255]+g[o>>8&255]+g[o>>16&255]+g[o>>24&255]+g[i>>0&255]+g[i>>8&255]+g[i>>16&255]+g[i>>24&255]}const b={get(e="normal"){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function _(e,t){const o=b.get(t.priority);for(let i=0;i<e.length;i++)if(b.get(e[i].priority)<o)return void e.splice(i,0,t);e.push(t)}var w=o("./packages/ckeditor5-utils/src/version.ts"),k=o("./packages/ckeditor5-utils/src/ckeditorerror.ts");const v=Symbol("listeningTo"),y=Symbol("emitterId"),x=Symbol("delegations"),P=E(Object);function E(e){if(!e)return P;return class extends e{on(e,t,o){this.listenTo(this,e,t,o)}once(e,t,o){let i=!1;this.listenTo(this,e,((e,...o)=>{i||(i=!0,e.off(),t.call(this,e,...o))}),o)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,o,i={}){let s,n;this[v]||(this[v]={});const r=this[v];A(e)||T(e);const a=A(e);(s=r[a])||(s=r[a]={emitter:e,callbacks:{}}),(n=s.callbacks[t])||(n=s.callbacks[t]=[]),n.push(o),function(e,t,o,i,s){t._addEventListener?t._addEventListener(o,i,s):e._addEventListener.call(t,o,i,s)}(this,e,t,o,i)}stopListening(e,t,o){const i=this[v];let s=e&&A(e);const n=i&&s?i[s]:void 0,r=n&&t?n.callbacks[t]:void 0;if(!(!i||e&&!n||t&&!r))if(o){M(this,e,t,o);-1!==r.indexOf(o)&&(1===r.length?delete n.callbacks[t]:M(this,e,t,o))}else if(r){for(;o=r.pop();)M(this,e,t,o);delete n.callbacks[t]}else if(n){for(t in n.callbacks)this.stopListening(e,t);delete i[s]}else{for(s in i)this.stopListening(i[s].emitter);delete this[v]}}fire(e,...t){try{const o=e instanceof f?e:new f(this,e),i=o.name;let s=O(this,i);if(o.path.push(this),s){const e=[o,...t];s=Array.from(s);for(let t=0;t<s.length&&(s[t].callback.apply(this,e),o.off.called&&(delete o.off.called,this._removeEventListener(i,s[t].callback)),!o.stop.called);t++);}const n=this[x];if(n){const e=n.get(i),s=n.get("*");e&&R(e,o,t),s&&R(s,o,t)}return o.return}catch(e){k.ZP.rethrowUnexpectedError(e,this)}}delegate(...e){return{to:(t,o)=>{this[x]||(this[x]=new Map),e.forEach((e=>{const i=this[x].get(e);i?i.set(t,o):this[x].set(e,new Map([[t,o]]))}))}}}stopDelegating(e,t){if(this[x])if(e)if(t){const o=this[x].get(e);o&&o.delete(t)}else this[x].delete(e);else this[x].clear()}_addEventListener(e,t,o){!function(e,t){const o=C(e);if(o[t])return;let i=t,s=null;const n=[];for(;""!==i&&!o[i];)o[i]={callbacks:[],childEvents:[]},n.push(o[i]),s&&o[i].childEvents.push(s),s=i,i=i.substr(0,i.lastIndexOf(":"));if(""!==i){for(const e of n)e.callbacks=o[i].callbacks.slice();o[i].childEvents.push(s)}}(this,e);const i=S(this,e),s={callback:t,priority:b.get(o.priority)};for(const e of i)_(e,s)}_removeEventListener(e,t){const o=S(this,e);for(const e of o)for(let o=0;o<e.length;o++)e[o].callback==t&&(e.splice(o,1),o--)}}}function T(e,t){e[y]||(e[y]=t||m())}function A(e){return e[y]}function C(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function S(e,t){const o=C(e)[t];if(!o)return[];let i=[o.callbacks];for(let t=0;t<o.childEvents.length;t++){const s=S(e,o.childEvents[t]);i=i.concat(s)}return i}function O(e,t){let o;return e._events&&(o=e._events[t])&&o.callbacks.length?o.callbacks:t.indexOf(":")>-1?O(e,t.substr(0,t.lastIndexOf(":"))):null}function R(e,t,o){for(let[i,s]of e){s?"function"==typeof s&&(s=s(t.name)):s=t.name;const e=new f(t.source,s);e.path=[...t.path],i.fire(e,...o)}}function M(e,t,o,i){t._removeEventListener?t._removeEventListener(o,i):e._removeEventListener.call(t,o,i)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{E[e]=P.prototype[e]}));var j=o("./node_modules/lodash-es/isObject.js");const B=Symbol("observableProperties"),D=Symbol("boundObservables"),V=Symbol("boundProperties"),I=Symbol("decoratedMethods"),N=Symbol("decoratedOriginal"),z=F(E());function F(e){if(!e)return z;return class extends e{set(e,t){if((0,j.Z)(e))return void Object.keys(e).forEach((t=>{this.set(t,e[t])}),this);L(this);const o=this[B];if(e in this&&!o.has(e))throw new k.ZP("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>o.get(e),set(t){const i=o.get(e);let s=this.fire(`set:${e}`,e,t,i);void 0===s&&(s=t),i===s&&o.has(e)||(o.set(e,s),this.fire(`change:${e}`,e,s,i))}}),this[e]=t}bind(...e){if(!e.length||!$(e))throw new k.ZP("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new k.ZP("observable-bind-duplicate-properties",this);L(this);const t=this[V];e.forEach((e=>{if(t.has(e))throw new k.ZP("observable-bind-rebind",this)}));const o=new Map;return e.forEach((e=>{const i={property:e,to:[]};t.set(e,i),o.set(e,i)})),{to:Z,toMany:W,_observable:this,_bindProperties:e,_to:[],_bindings:o}}unbind(...e){if(!this[B])return;const t=this[V],o=this[D];if(e.length){if(!$(e))throw new k.ZP("observable-unbind-wrong-properties",this);e.forEach((e=>{const i=t.get(e);i&&(i.to.forEach((([e,t])=>{const s=o.get(e),n=s[t];n.delete(i),n.size||delete s[t],Object.keys(s).length||(o.delete(e),this.stopListening(e,"change"))})),t.delete(e))}))}else o.forEach(((e,t)=>{this.stopListening(t,"change")})),o.clear(),t.clear()}decorate(e){L(this);const t=this[e];if(!t)throw new k.ZP("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,((e,o)=>{e.return=t.apply(this,o)})),this[e]=function(...t){return this.fire(e,t)},this[e][N]=t,this[I]||(this[I]=[]),this[I].push(e)}stopListening(e,t,o){if(!e&&this[I]){for(const e of this[I])this[e]=this[e][N];delete this[I]}super.stopListening(e,t,o)}}}function L(e){e[B]||(Object.defineProperty(e,B,{value:new Map}),Object.defineProperty(e,D,{value:new Map}),Object.defineProperty(e,V,{value:new Map}))}function Z(...e){const t=function(...e){if(!e.length)throw new k.ZP("observable-bind-to-parse-error",null);const t={to:[]};let o;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach((e=>{if("string"==typeof e)o.properties.push(e);else{if("object"!=typeof e)throw new k.ZP("observable-bind-to-parse-error",null);o={observable:e,properties:[]},t.to.push(o)}})),t}(...e),o=Array.from(this._bindings.keys()),i=o.length;if(!t.callback&&t.to.length>1)throw new k.ZP("observable-bind-to-no-callback",this);if(i>1&&t.callback)throw new k.ZP("observable-bind-to-extra-callback",this);var s;t.to.forEach((e=>{if(e.properties.length&&e.properties.length!==i)throw new k.ZP("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)})),this._to=t.to,t.callback&&(this._bindings.get(o[0]).callback=t.callback),s=this._observable,this._to.forEach((e=>{const t=s[D];let o;t.get(e.observable)||s.listenTo(e.observable,"change",((i,n)=>{o=t.get(e.observable)[n],o&&o.forEach((e=>{q(s,e.property)}))}))})),function(e){let t;e._bindings.forEach(((o,i)=>{e._to.forEach((s=>{t=s.properties[o.callback?0:e._bindProperties.indexOf(i)],o.to.push([s.observable,t]),function(e,t,o,i){const s=e[D],n=s.get(o),r=n||{};r[i]||(r[i]=new Set);r[i].add(t),n||s.set(o,r)}(e._observable,o,s.observable,t)}))}))}(this),this._bindProperties.forEach((e=>{q(this._observable,e)}))}function W(e,t,o){if(this._bindings.size>1)throw new k.ZP("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const o=e.map((e=>[e,t]));return Array.prototype.concat.apply([],o)}(e,t),o)}function $(e){return e.every((e=>"string"==typeof e))}function q(e,t){const o=e[V].get(t);let i;o.callback?i=o.callback.apply(e,o.to.map((e=>e[0][e[1]]))):(i=o.to[0],i=i[0][i[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=i:e.set(t,i)}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{F[e]=z.prototype[e]}));class H{constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach((({element:e,newElement:t})=>{e.style.display="",t&&t.remove()})),this._replacedElements=[]}}function U(e){let t=0;for(const o of e)t++;return t}function K(e,t){const o=Math.min(e.length,t.length);for(let i=0;i<o;i++)if(e[i]!=t[i])return i;return e.length==t.length?"same":e.length<t.length?"prefix":"extension"}function G(e){return!(!e||!e[Symbol.iterator])}var J=o("./node_modules/lodash-es/_baseGetTag.js"),Y=o("./node_modules/lodash-es/isArray.js"),X=o("./node_modules/lodash-es/isObjectLike.js");const Q=function(e){return"string"==typeof e||!(0,Y.Z)(e)&&(0,X.Z)(e)&&"[object String]"==(0,J.Z)(e)};function ee(e,t,o={},i=[]){const s=o&&o.xmlns,n=s?e.createElementNS(s,t):e.createElement(t);for(const e in o)n.setAttribute(e,o[e]);!Q(i)&&G(i)||(i=[i]);for(let t of i)Q(t)&&(t=e.createTextNode(t)),n.appendChild(t);return n}var te=o("./node_modules/lodash-es/isPlainObject.js"),oe=o("./node_modules/lodash-es/cloneDeepWith.js"),ie=o("./node_modules/lodash-es/isElement.js");class se{constructor(e,t){this._config={},t&&this.define(ne(t)),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}*names(){for(const e of Object.keys(this._config))yield e}_setToTarget(e,t,o,i=!1){if((0,te.Z)(t))return void this._setObjectToTarget(e,t,i);const s=t.split(".");t=s.pop();for(const t of s)(0,te.Z)(e[t])||(e[t]={}),e=e[t];if((0,te.Z)(o))return(0,te.Z)(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,o,i);i&&void 0!==e[t]||(e[t]=o)}_getFromSource(e,t){const o=t.split(".");t=o.pop();for(const t of o){if(!(0,te.Z)(e[t])){e=null;break}e=e[t]}return e?ne(e[t]):void 0}_setObjectToTarget(e,t,o){Object.keys(t).forEach((i=>{this._setToTarget(e,i,t[i],o)}))}}function ne(e){return(0,oe.Z)(e,re)}function re(e){return(0,ie.Z)(e)?e:void 0}function ae(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function ce(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}const le=de(E());function de(e){if(!e)return le;return class extends e{listenTo(e,t,o,i={}){if(ae(e)||ce(e)){const s={capture:!!i.useCapture,passive:!!i.usePassive},n=this._getProxyEmitter(e,s)||new he(e,s);this.listenTo(n,t,o,i)}else super.listenTo(e,t,o,i)}stopListening(e,t,o){if(ae(e)||ce(e)){const i=this._getAllProxyEmitters(e);for(const e of i)this.stopListening(e,t,o)}else super.stopListening(e,t,o)}_getProxyEmitter(e,t){return function(e,t){const o=e[v];return o&&o[t]?o[t].emitter:null}(this,ue(e,t))}_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((t=>this._getProxyEmitter(e,t))).filter((e=>!!e))}}}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{de[e]=le.prototype[e]}));class he extends(E()){constructor(e,t){super(),T(this,ue(e,t)),this._domNode=e,this._options=t}attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()}_addEventListener(e,t,o){this.attach(e),E().prototype._addEventListener.call(this,e,t,o)}_removeEventListener(e,t){E().prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){const t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}}function ue(e,t){let o=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=m())}(e);for(const e of Object.keys(t).sort())t[e]&&(o+="-"+e);return o}let pe;try{pe={window,document}}catch(e){pe={window:{},document:{}}}const fe=pe;function ge(e){let t=e.parentElement;if(!t)return null;for(;"BODY"!=t.tagName;){const e=t.style.overflowY||fe.window.getComputedStyle(t).overflowY;if("auto"===e||"scroll"===e)break;if(t=t.parentElement,!t)return null}return t}function me(e){const t=[];let o=e;for(;o&&o.nodeType!=Node.DOCUMENT_NODE;)t.unshift(o),o=o.parentNode;return t}function be(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function _e(e){return"[object Text]"==Object.prototype.toString.call(e)}function we(e){return"[object Range]"==Object.prototype.toString.apply(e)}function ke(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}const ve=["top","right","bottom","left","width","height"];class ye{constructor(e){const t=we(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),Ee(e)||t)if(t){const t=ye.getDomRangeRects(e);xe(this,ye.getBoundingRect(t))}else xe(this,e.getBoundingClientRect());else if(ce(e)){const{innerWidth:t,innerHeight:o}=e;xe(this,{top:0,right:t,bottom:o,left:0,width:t,height:o})}else xe(this,e)}clone(){return new ye(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};return t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0?null:new ye(t)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!Pe(e)){let o=e.parentNode||e.commonAncestorContainer;for(;o&&!Pe(o);){const e=new ye(o),i=t.getIntersection(e);if(!i)return null;i.getArea()<t.getArea()&&(t=i),o=o.parentNode}}return t}isEqual(e){for(const t of ve)if(this[t]!==e[t])return!1;return!0}contains(e){const t=this.getIntersection(e);return!(!t||!t.isEqual(e))}excludeScrollbarsAndBorders(){const e=this._source;let t,o,i;if(ce(e))t=e.innerWidth-e.document.documentElement.clientWidth,o=e.innerHeight-e.document.documentElement.clientHeight,i=e.getComputedStyle(e.document.documentElement).direction;else{const s=ke(e);t=e.offsetWidth-e.clientWidth-s.left-s.right,o=e.offsetHeight-e.clientHeight-s.top-s.bottom,i=e.ownerDocument.defaultView.getComputedStyle(e).direction,this.left+=s.left,this.top+=s.top,this.right-=s.right,this.bottom-=s.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=t,"ltr"===i?this.right-=t:this.left+=t,this.height-=o,this.bottom-=o,this}static getDomRangeRects(e){const t=[],o=Array.from(e.getClientRects());if(o.length)for(const e of o)t.push(new ye(e));else{let o=e.startContainer;_e(o)&&(o=o.parentNode);const i=new ye(o.getBoundingClientRect());i.right=i.left,i.width=0,t.push(i)}return t}static getBoundingRect(e){const t={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,width:0,height:0};let o=0;for(const i of e)o++,t.left=Math.min(t.left,i.left),t.top=Math.min(t.top,i.top),t.right=Math.max(t.right,i.right),t.bottom=Math.max(t.bottom,i.bottom);return 0==o?null:(t.width=t.right-t.left,t.height=t.bottom-t.top,new ye(t))}}function xe(e,t){for(const o of ve)e[o]=t[o]}function Pe(e){return!!Ee(e)&&e===e.ownerDocument.body}function Ee(e){return null!==e&&"object"==typeof e&&1===e.nodeType&&"function"==typeof e.getBoundingClientRect}const Te=class{constructor(e,t){Te._observerInstance||Te._createObserver(),this._element=e,this._callback=t,Te._addElementCallback(e,t),Te._observerInstance.observe(e)}destroy(){Te._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,t){Te._elementCallbacks||(Te._elementCallbacks=new Map);let o=Te._elementCallbacks.get(e);o||(o=new Set,Te._elementCallbacks.set(e,o)),o.add(t)}static _deleteElementCallback(e,t){const o=Te._getElementCallbacks(e);o&&(o.delete(t),o.size||(Te._elementCallbacks.delete(e),Te._observerInstance.unobserve(e))),Te._elementCallbacks&&!Te._elementCallbacks.size&&(Te._observerInstance=null,Te._elementCallbacks=null)}static _getElementCallbacks(e){return Te._elementCallbacks?Te._elementCallbacks.get(e):null}static _createObserver(){Te._observerInstance=new fe.window.ResizeObserver((e=>{for(const t of e){const e=Te._getElementCallbacks(t.target);if(e)for(const o of e)o(t)}}))}};let Ae=Te;function Ce(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function Se(e){return t=>t+e}function Oe(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Re(e,t,o){e.insertBefore(o,e.childNodes[t]||null)}function Me(e){return e&&e.nodeType===Node.COMMENT_NODE}function je(e){try{fe.document.createAttribute(e)}catch(e){return!1}return!0}function Be(e){return!!(e&&e.getClientRects&&e.getClientRects().length)}Ae._observerInstance=null,Ae._elementCallbacks=null;var De=o("./node_modules/lodash-es/isFunction.js"),Ve=Math.pow;function Ie({element:e,target:t,positions:o,limiter:i,fitInViewport:s,viewportOffsetConfig:n}){(0,De.Z)(t)&&(t=t()),(0,De.Z)(i)&&(i=i());const r=function(e){return e&&e.parentNode?e.offsetParent===fe.document.body?null:e.offsetParent:null}(e),a=new ye(e),c=new ye(t);let l;const d=s&&function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new ye(fe.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(n)||null,h={targetRect:c,elementRect:a,positionedElementAncestor:r,viewportRect:d};if(i||s){const e=i&&new ye(i).getVisible();Object.assign(h,{limiterRect:e,viewportRect:d}),l=function(e,t){const{elementRect:o}=t,i=o.getArea(),s=e.map((e=>new ze(e,t))).filter((e=>!!e.name));let n=0,r=null;for(const e of s){const{limiterIntersectionArea:t,viewportIntersectionArea:o}=e;if(t===i)return e;const s=Ve(o,2)+Ve(t,2);s>n&&(n=s,r=e)}return r}(o,h)||new ze(o[0],h)}else l=new ze(o[0],h);return l}function Ne(e){const{scrollX:t,scrollY:o}=fe.window;return e.clone().moveBy(t,o)}class ze{constructor(e,t){const o=e(t.targetRect,t.elementRect,t.viewportRect);if(!o)return;const{left:i,top:s,name:n,config:r}=o;this.name=n,this.config=r,this._positioningFunctionCorrdinates={left:i,top:s},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const e=this._options.limiterRect;if(e){const t=this._options.viewportRect;if(!t)return e.getIntersectionArea(this._rect);{const o=e.getIntersection(t);if(o)return o.getIntersectionArea(this._rect)}}return 0}get viewportIntersectionArea(){const e=this._options.viewportRect;return e?e.getIntersectionArea(this._rect):0}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCorrdinates.left,this._positioningFunctionCorrdinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=Ne(this._rect),this._options.positionedElementAncestor&&function(e,t){const o=Ne(new ye(t)),i=ke(t);let s=0,n=0;s-=o.left,n-=o.top,s+=t.scrollLeft,n+=t.scrollTop,s-=i.left,n-=i.top,e.moveBy(s,n)}(this._cachedAbsoluteRect,this._options.positionedElementAncestor)),this._cachedAbsoluteRect}}function Fe(e){const t=e.parentNode;t&&t.removeChild(e)}function Le({target:e,viewportOffset:t=0,ancestorOffset:o=0,alignToTop:i,forceScroll:s}){const n=Ge(e);let r=n,a=null;for(;r;){let c;c=Je(r==n?e:a),$e({parent:c,getRect:()=>Ye(e,r),alignToTop:i,ancestorOffset:o,forceScroll:s});const l=Ye(e,r);if(We({window:r,rect:l,viewportOffset:t,alignToTop:i,forceScroll:s}),r.parent!=r){if(a=r.frameElement,r=r.parent,!a)return}else r=null}}function Ze(e,t){$e({parent:Je(e),getRect:()=>new ye(e),ancestorOffset:t})}function We({window:e,rect:t,alignToTop:o,forceScroll:i,viewportOffset:s}){const n=t.clone().moveBy(0,s),r=t.clone().moveBy(0,-s),a=new ye(e).excludeScrollbarsAndBorders(),c=o&&i,l=[r,n].every((e=>a.contains(e)));let{scrollX:d,scrollY:h}=e;const u=d,p=h;c?h-=a.top-t.top+s:l||(He(r,a)?h-=a.top-t.top+s:qe(n,a)&&(h+=o?t.top-a.top-s:t.bottom-a.bottom+s)),l||(Ue(t,a)?d-=a.left-t.left+s:Ke(t,a)&&(d+=t.right-a.right+s)),d==u&&h===p||e.scrollTo(d,h)}function $e({parent:e,getRect:t,alignToTop:o,forceScroll:i,ancestorOffset:s=0}){const n=Ge(e),r=o&&i;let a,c,l;for(;e!=n.document.body;)c=t(),a=new ye(e).excludeScrollbarsAndBorders(),l=a.contains(c),r?e.scrollTop-=a.top-c.top+s:l||(He(c,a)?e.scrollTop-=a.top-c.top+s:qe(c,a)&&(e.scrollTop+=o?c.top-a.top-s:c.bottom-a.bottom+s)),l||(Ue(c,a)?e.scrollLeft-=a.left-c.left+s:Ke(c,a)&&(e.scrollLeft+=c.right-a.right+s)),e=e.parentNode}function qe(e,t){return e.bottom>t.bottom}function He(e,t){return e.top<t.top}function Ue(e,t){return e.left<t.left}function Ke(e,t){return e.right>t.right}function Ge(e){return we(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function Je(e){if(we(e)){let t=e.commonAncestorContainer;return _e(t)&&(t=t.parentNode),t}return e.parentNode}function Ye(e,t){const o=Ge(e),i=new ye(e);if(o===t)return i;{let e=o;for(;e!=t;){const t=e.frameElement,o=new ye(t).excludeScrollbarsAndBorders();i.moveBy(o.left,o.top),e=e.parent}}return i}const Xe={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},Qe={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},et=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++){e[String.fromCharCode(t).toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;for(const t of"`-=[];',./\\")e[t]=t.charCodeAt(0);return e}(),tt=Object.fromEntries(Object.entries(et).map((([e,t])=>[t,e.charAt(0).toUpperCase()+e.slice(1)])));function ot(e){let t;if("string"==typeof e){if(t=et[e.toLowerCase()],!t)throw new k.ZP("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?et.alt:0)+(e.ctrlKey?et.ctrl:0)+(e.shiftKey?et.shift:0)+(e.metaKey?et.cmd:0);return t}function it(e){return"string"==typeof e&&(e=function(e){return e.split("+").map((e=>e.trim()))}(e)),e.map((e=>"string"==typeof e?function(e){if(e.endsWith("!"))return ot(e.slice(0,-1));const t=ot(e);return n.isMac&&t==et.ctrl?et.cmd:t}(e):e)).reduce(((e,t)=>t+e),0)}function st(e){let t=it(e);return Object.entries(n.isMac?Xe:Qe).reduce(((e,[o,i])=>(0!=(t&et[o])&&(t&=~et[o],e+=i),e)),"")+(t?tt[t]:"")}function nt(e){return e==et.arrowright||e==et.arrowleft||e==et.arrowup||e==et.arrowdown}function rt(e,t){const o="ltr"===t;switch(e){case et.arrowleft:return o?"left":"right";case et.arrowright:return o?"right":"left";case et.arrowup:return"up";case et.arrowdown:return"down"}}function at(e,t){const o=rt(e,t);return"down"===o||"right"===o}const ct=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function lt(e){return ct.includes(e)?"rtl":"ltr"}function dt(e){return Array.isArray(e)?e:[e]}function ht(e,t,o=1){if("number"!=typeof o)throw new k.ZP("translation-service-quantity-not-a-number",null,{quantity:o});const i=Object.keys(fe.window.CKEDITOR_TRANSLATIONS).length;1===i&&(e=Object.keys(fe.window.CKEDITOR_TRANSLATIONS)[0]);const s=t.id||t.string;if(0===i||!function(e,t){return!!fe.window.CKEDITOR_TRANSLATIONS[e]&&!!fe.window.CKEDITOR_TRANSLATIONS[e].dictionary[t]}(e,s))return 1!==o?t.plural:t.string;const n=fe.window.CKEDITOR_TRANSLATIONS[e].dictionary,r=fe.window.CKEDITOR_TRANSLATIONS[e].getPluralForm||(e=>1===e?0:1),a=n[s];if("string"==typeof a)return a;return a[Number(r(o))]}fe.window.CKEDITOR_TRANSLATIONS||(fe.window.CKEDITOR_TRANSLATIONS={});class ut{constructor({uiLanguage:e="en",contentLanguage:t}={}){this.uiLanguage=e,this.contentLanguage=t||this.uiLanguage,this.uiLanguageDirection=lt(this.uiLanguage),this.contentLanguageDirection=lt(this.contentLanguage),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){t=dt(t),"string"==typeof e&&(e={string:e});const o=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,((e,o)=>o<t.length?t[o]:e))}(ht(this.uiLanguage,e,o),t)}}class pt extends(E()){constructor(e={},t={}){super();const o=G(e);if(o||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],o)for(const t of e)this._items.push(t),this._itemMap.set(this._getItemIdBeforeAdding(t),t)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){return this.addMany([e],t)}addMany(e,t){if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new k.ZP("collection-add-item-invalid-index",this);let o=0;for(const i of e){const e=this._getItemIdBeforeAdding(i),s=t+o;this._items.splice(s,0,i),this._itemMap.set(e,i),this.fire("add",i,s),o++}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new k.ZP("collection-get-invalid-arg",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{const t=e[this._idProperty];return t&&this._itemMap.has(t)}}getIndex(e){let t;return t="string"==typeof e?this._itemMap.get(e):e,t?this._items.indexOf(t):-1}remove(e){const[t,o]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:o}),t}map(e,t){return this._items.map(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new k.ZP("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding((t=>new e(t)))},using:e=>{"function"==typeof e?this._setUpBindToBinding(e):this._setUpBindToBinding((t=>t[e]))}}}_setUpBindToBinding(e){const t=this._bindToCollection,o=(o,i,s)=>{const n=t._bindToCollection==this,r=t._bindToInternalToExternalMap.get(i);if(n&&r)this._bindToExternalToInternalMap.set(i,r),this._bindToInternalToExternalMap.set(r,i);else{const o=e(i);if(!o)return void this._skippedIndexesFromExternal.push(s);let n=s;for(const e of this._skippedIndexesFromExternal)s>e&&n--;for(const e of t._skippedIndexesFromExternal)n>=e&&n++;this._bindToExternalToInternalMap.set(i,o),this._bindToInternalToExternalMap.set(o,i),this.add(o,n);for(let e=0;e<t._skippedIndexesFromExternal.length;e++)n<=t._skippedIndexesFromExternal[e]&&t._skippedIndexesFromExternal[e]++}};for(const e of t)o(0,e,t.getIndex(e));this.listenTo(t,"add",o),this.listenTo(t,"remove",((e,t,o)=>{const i=this._bindToExternalToInternalMap.get(t);i&&this.remove(i),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((e,t)=>(o<t&&e.push(t-1),o>t&&e.push(t),e)),[])}))}_getItemIdBeforeAdding(e){const t=this._idProperty;let o;if(t in e){if(o=e[t],"string"!=typeof o)throw new k.ZP("collection-add-invalid-id",this);if(this.get(o))throw new k.ZP("collection-add-item-already-exists",this)}else e[t]=o=m();return o}_remove(e){let t,o,i,s=!1;const n=this._idProperty;if("string"==typeof e?(o=e,i=this._itemMap.get(o),s=!i,i&&(t=this._items.indexOf(i))):"number"==typeof e?(t=e,i=this._items[t],s=!i,i&&(o=i[n])):(i=e,o=i[n],t=this._items.indexOf(i),s=-1==t||!this._itemMap.get(o)),s)throw new k.ZP("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(o);const r=this._bindToInternalToExternalMap.get(i);return this._bindToInternalToExternalMap.delete(i),this._bindToExternalToInternalMap.delete(r),this.fire("remove",i,t),[i,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function ft(e){const t=e.next();return t.done?null:t.value}class gt extends(de(F())){constructor(){super(),this._elements=new Set,this._nextEventLoopTimeout=null,this.set("isFocused",!1),this.set("focusedElement",null)}add(e){if(this._elements.has(e))throw new k.ZP("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",(()=>this._focus(e)),{useCapture:!0}),this.listenTo(e,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}class mt{constructor(){this._listener=new(de())}listenTo(e){this._listener.listenTo(e,"keydown",((e,t)=>{this._listener.fire("_keydown:"+ot(t),t)}))}set(e,t,o={}){const i=it(e),s=o.priority;this._listener.listenTo(this._listener,"_keydown:"+i,((e,o)=>{t(o,(()=>{o.preventDefault(),o.stopPropagation(),e.stop()})),e.return=!0}),{priority:s})}press(e){return!!this._listener.fire("_keydown:"+ot(e),e)}stopListening(e){this._listener.stopListening(e)}destroy(){this.stopListening()}}function bt(e){return G(e)?new Map(e):function(e){const t=new Map;for(const o in e)t.set(o,e[o]);return t}(e)}const _t=1e4;function wt(e,t,o,i){if(Math.max(t.length,e.length)>_t)return e.slice(0,o).concat(t).concat(e.slice(o+i,e.length));{const s=Array.from(e);return s.splice(o,i,...t),s}}function kt(e,t){let o;function i(...s){i.cancel(),o=setTimeout((()=>e(...s)),t)}return i.cancel=()=>{clearTimeout(o)},i}function vt(e){function t(e){return e.match(/^[a-zA-Z0-9+/=$]+$/g)&&e.length>=40&&e.length<=255?"VALID":"INVALID"}let o="",i="";if(!e)return"INVALID";try{o=atob(e)}catch(e){return"INVALID"}const s=o.split("-"),n=s[0],r=s[1];if(!r)return t(e);try{atob(r)}catch(o){try{if(atob(n),!atob(n).length)return t(e)}catch(o){return t(e)}}if(n.length<40||n.length>255)return"INVALID";try{atob(n)}catch(e){return"INVALID"}try{i=atob(r)}catch(e){return"INVALID"}if(8!==i.length)return"INVALID";const a=Number(i.substring(0,4)),c=Number(i.substring(4,6))-1,l=Number(i.substring(6,8)),d=new Date(a,c,l);return d<w.D||isNaN(Number(d))?"INVALID":"VALID"}function yt(e){return!!e&&1==e.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(e)}function xt(e){return!!e&&1==e.length&&/[\ud800-\udbff]/.test(e)}function Pt(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}function Et(e,t){return xt(e.charAt(t-1))&&Pt(e.charAt(t))}function Tt(e,t){return yt(e.charAt(t))}const At=function(){const e=[new RegExp("\\p{Emoji}[\\u{E0020}-\\u{E007E}]+\\u{E007F}","u"),new RegExp("\\p{Emoji}\\u{FE0F}?\\u{20E3}","u"),new RegExp("\\p{Emoji}\\u{FE0F}","u"),new RegExp("(?=\\p{General_Category=Other_Symbol})\\p{Emoji}\\p{Emoji_Modifier}*","u")],t=new RegExp("\\p{Regional_Indicator}{2}","u").source,o="(?:"+e.map((e=>e.source)).join("|")+")";return new RegExp(`${t}|${o}(?:â€${o})*`,"ug")}();function Ct(e,t){const o=String(e).matchAll(At);return Array.from(o).some((e=>e.index<t&&t<e.index+e[0].length))}},"./packages/ckeditor5-utils/src/version.ts":(e,t,o)=>{"use strict";o.d(t,{D:()=>r,Z:()=>n});var i=o("./packages/ckeditor5-utils/src/ckeditorerror.ts");const s="38.0.1",n=s,r=new Date(2023,4,23),a="object"==typeof window?window:o.g;if(a.CKEDITOR_VERSION)throw new i.ZP("ckeditor-duplicated-modules",null);a.CKEDITOR_VERSION=s},"./packages/ckeditor5-widget/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{s4:()=>f,Uo:()=>g,$L:()=>W,WR:()=>ce,e8:()=>q,Ww:()=>I,KT:()=>P,id:()=>y,Qd:()=>m,em:()=>k,l6:()=>v,XC:()=>b,sC:()=>x,$n:()=>E});var i=o("./packages/ckeditor5-core/src/index.ts"),s=o("./packages/ckeditor5-engine/src/index.ts"),n=o("./packages/ckeditor5-typing/src/index.ts"),r=o("./packages/ckeditor5-utils/src/index.ts"),a=o("./packages/ckeditor5-ui/src/index.ts"),c=o("./packages/ckeditor5-enter/src/index.ts");class l extends((0,r.ln)()){constructor(){super(...arguments),this._stack=[]}add(e,t){const o=this._stack,i=o[0];this._insertDescriptor(e);const s=o[0];i===s||d(i,s)||this.fire("change:top",{oldDescriptor:i,newDescriptor:s,writer:t})}remove(e,t){const o=this._stack,i=o[0];this._removeDescriptor(e);const s=o[0];i===s||d(i,s)||this.fire("change:top",{oldDescriptor:i,newDescriptor:s,writer:t})}_insertDescriptor(e){const t=this._stack,o=t.findIndex((t=>t.id===e.id));if(d(e,t[o]))return;o>-1&&t.splice(o,1);let i=0;for(;t[i]&&h(t[i],e);)i++;t.splice(i,0,e)}_removeDescriptor(e){const t=this._stack,o=t.findIndex((t=>t.id===e));o>-1&&t.splice(o,1)}}function d(e,t){return e&&t&&e.priority==t.priority&&u(e.classes)==u(t.classes)}function h(e,t){return e.priority>t.priority||!(e.priority<t.priority)&&u(e.classes)>u(t.classes)}function u(e){return Array.isArray(e)?e.sort().join(","):e}const p='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z"/><path fill-opacity=".256" d="M1 1h14v14H1z"/><g class="ck-icon__selected-indicator"><path d="M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z"/><path fill-opacity=".254" d="M1 1h14v14H1z"/></g></svg>',f="ck-widget",g="ck-widget_selected";function m(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function b(e,t,o={}){if(!e.is("containerElement"))throw new r.Bb("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass(f,e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=T,t.setCustomProperty("widgetLabel",[],e),o.label&&v(e,o.label),o.hasSelectionHandle&&function(e,t){const o=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){const t=this.toDomElement(e),o=new a.mO;return o.set("content",p),o.render(),t.appendChild(o.element),t}));t.insert(t.createPositionAt(e,0),o),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),k(e,t),e}function _(e,t,o){if(t.classes&&o.addClass((0,r.qo)(t.classes),e),t.attributes)for(const i in t.attributes)o.setAttribute(i,t.attributes[i],e)}function w(e,t,o){if(t.classes&&o.removeClass((0,r.qo)(t.classes),e),t.attributes)for(const i in t.attributes)o.removeAttribute(i,e)}function k(e,t,o=_,i=w){const s=new l;s.on("change:top",((t,s)=>{s.oldDescriptor&&i(e,s.oldDescriptor,s.writer),s.newDescriptor&&o(e,s.newDescriptor,s.writer)}));t.setCustomProperty("addHighlight",((e,t,o)=>s.add(t,o)),e),t.setCustomProperty("removeHighlight",((e,t,o)=>s.remove(t,o)),e)}function v(e,t){e.getCustomProperty("widgetLabel").push(t)}function y(e){return e.getCustomProperty("widgetLabel").reduce(((e,t)=>"function"==typeof t?e?e+". "+t():t():e?e+". "+t:t),"")}function x(e,t,o={}){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("role","textbox",e),o.label&&t.setAttribute("aria-label",o.label,e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",((o,i,s)=>{t.setAttribute("contenteditable",s?"false":"true",e)})),e.on("change:isFocused",((o,i,s)=>{s?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)})),k(e,t),e}function P(e,t){const o=e.getSelectedElement();if(o){const i=S(e);if(i)return t.createRange(t.createPositionAt(o,i))}return(0,s.KT)(e,t)}function E(e,t){return(o,i)=>{const{mapper:s,viewPosition:n}=i,r=s.findMappedViewAncestor(n);if(!t(r))return;const a=s.toModelElement(r);i.modelPosition=e.createPositionAt(a,n.isAtStart?"before":"after")}}function T(){return null}const A="widget-type-around";function C(e,t,o){return!!e&&m(e)&&!o.isInline(t)}function S(e){return e.getAttribute(A)}var O=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),R=o.n(O),M=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgettypearound.css"),j={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};R()(M.Z,j);M.Z.locals;const B=["before","after"],D=(new DOMParser).parseFromString('<svg viewBox="0 0 10 8" xmlns="http://www.w3.org/2000/svg"><path d="M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038"/></svg>',"image/svg+xml").firstChild,V="ck-widget__type-around_disabled";class I extends i.Sy{constructor(){super(...arguments),this._currentFakeCaretModelElement=null}static get pluginName(){return"WidgetTypeAround"}static get requires(){return[c.C,n.HG]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",((o,i,s)=>{t.change((e=>{for(const o of t.document.roots)s?e.removeClass(V,o):e.addClass(V,o)})),s||e.model.change((e=>{e.removeSelectionAttribute(A)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const o=this.editor,i=o.editing.view,s=o.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);o.execute("insertParagraph",{position:o.model.createPositionAt(e,t),attributes:s}),i.focus(),i.scrollToTheSelection()}_listenToIfEnabled(e,t,o,i){this.listenTo(e,t,((...e)=>{this.isEnabled&&o(...e)}),i)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=S(e);if(!t)return!1;const o=e.getSelectedElement();return this._insertParagraph(o,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,o=e.locale.t,i={before:o("Insert paragraph before block"),after:o("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",((e,s,n)=>{const r=n.mapper.toViewElement(s.item);if(r&&C(r,s.item,t)){!function(e,t,o){const i=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){const o=this.toDomElement(e);return function(e,t){for(const o of B){const i=new a.YS({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${o}`],title:t[o],"aria-hidden":"true"},children:[e.ownerDocument.importNode(D,!0)]});e.appendChild(i.render())}}(o,t),function(e){const t=new a.YS({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(o),o}));e.insert(e.createPositionAt(o,"end"),i)}(n.writer,i,r);r.getCustomProperty("widgetLabel").push((()=>this.isEnabled?o("Press Enter to type after or press Shift + Enter to type before the widget"):""))}}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,o=t.document.selection,i=t.schema,s=e.editing.view;function n(e){return`ck-widget_type-around_show-fake-caret_${e}`}this._listenToIfEnabled(s.document,"arrowKey",((e,t)=>{this._handleArrowKeyPress(e,t)}),{context:[m,"$text"],priority:"high"}),this._listenToIfEnabled(o,"change:range",((t,o)=>{o.directChange&&e.model.change((e=>{e.removeSelectionAttribute(A)}))})),this._listenToIfEnabled(t.document,"change:data",(()=>{const t=o.getSelectedElement();if(t){if(C(e.editing.mapper.toViewElement(t),t,i))return}e.model.change((e=>{e.removeSelectionAttribute(A)}))})),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",((e,t,o)=>{const s=o.writer;if(this._currentFakeCaretModelElement){const e=o.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(s.removeClass(B.map(n),e),this._currentFakeCaretModelElement=null)}const r=t.selection.getSelectedElement();if(!r)return;const a=o.mapper.toViewElement(r);if(!C(a,r,i))return;const c=S(t.selection);c&&(s.addClass(n(c),a),this._currentFakeCaretModelElement=r)})),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",((t,o,i)=>{i||e.model.change((e=>{e.removeSelectionAttribute(A)}))}))}_handleArrowKeyPress(e,t){const o=this.editor,i=o.model,s=i.document.selection,n=i.schema,a=o.editing.view,c=t.keyCode,l=(0,r.Zt)(c,o.locale.contentLanguageDirection),d=a.document.selection.getSelectedElement();let h;C(d,o.editing.mapper.toModelElement(d),n)?h=this._handleArrowKeyPressOnSelectedWidget(l):s.isCollapsed?h=this._handleArrowKeyPressWhenSelectionNextToAWidget(l):t.shiftKey||(h=this._handleArrowKeyPressWhenNonCollapsedSelection(l)),h&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,o=S(t.document.selection);return t.change((t=>{if(!o)return t.setSelectionAttribute(A,e?"after":"before"),!0;if(!(o===(e?"after":"before")))return t.removeSelectionAttribute(A),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,o=t.model,i=o.schema,s=t.plugins.get("Widget"),n=s._getObjectElementNextToSelection(e);return!!C(t.editing.mapper.toViewElement(n),n,i)&&(o.change((t=>{s._setSelectionOverElement(n),t.setSelectionAttribute(A,e?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,o=t.model,i=o.schema,s=t.editing.mapper,n=o.document.selection,r=e?n.getLastPosition().nodeBefore:n.getFirstPosition().nodeAfter;return!!C(s.toViewElement(r),r,i)&&(o.change((t=>{t.setSelection(r,"on"),t.setSelectionAttribute(A,e?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",((o,i)=>{const s=i.domTarget.closest(".ck-widget__type-around__button");if(!s)return;const n=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(s),r=function(e,t){const o=e.closest(".ck-widget");return t.mapDomToView(o)}(s,t.domConverter),a=e.editing.mapper.toModelElement(r);this._insertParagraph(a,n),i.preventDefault(),o.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,o=e.editing.view;this._listenToIfEnabled(o.document,"enter",((o,i)=>{if("atTarget"!=o.eventPhase)return;const s=t.getSelectedElement(),n=e.editing.mapper.toViewElement(s),r=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:C(n,s,r)&&(this._insertParagraph(s,i.isSoft?"before":"after"),a=!0),a&&(i.preventDefault(),o.stop())}),{context:m})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view.document;this._listenToIfEnabled(e,"insertText",((t,o)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(o.selection=e.selection)}),{priority:"high"}),r.OB.isAndroid?this._listenToIfEnabled(e,"keydown",((e,t)=>{229==t.keyCode&&this._insertParagraphAccordingToFakeCaretPosition()})):this._listenToIfEnabled(e,"compositionstart",(()=>{this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,o=e.model,i=o.schema;this._listenToIfEnabled(t.document,"delete",((t,s)=>{if("atTarget"!=t.eventPhase)return;const n=S(o.document.selection);if(!n)return;const r=s.direction,a=o.document.selection.getSelectedElement(),c="forward"==r;if("before"===n===c)e.execute("delete",{selection:o.createSelection(a,"on")});else{const t=i.getNearestSelectionRange(o.createPositionAt(a,n),r);if(t)if(t.isCollapsed){const s=o.createSelection(t.start);if(o.modifySelection(s,{direction:r}),s.focus.isEqual(t.start)){const e=function(e,t){let o=t;for(const i of t.getAncestors({parentFirst:!0})){if(i.childCount>1||e.isLimit(i))break;o=i}return o}(i,t.start.parent);o.deleteContent(o.createSelection(e,"on"),{doNotAutoparagraph:!0})}else o.change((o=>{o.setSelection(t),e.execute(c?"deleteForward":"delete")}))}else o.change((o=>{o.setSelection(t),e.execute(c?"deleteForward":"delete")}))}s.preventDefault(),t.stop()}),{context:m})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,o=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",((e,[i,s])=>{if(s&&!s.is("documentSelection"))return;const n=S(o);return n?(e.stop(),t.change((e=>{const s=o.getSelectedElement(),r=t.createPositionAt(s,n),a=e.createSelection(r),c=t.insertContent(i,a);return e.setSelection(a),c}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",((e,o)=>{const[,i,s={}]=o;if(i&&!i.is("documentSelection"))return;const n=S(t);n&&(s.findOptimalPosition=n,o[3]=s)}),{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",((e,[o])=>{if(o&&!o.is("documentSelection"))return;S(t)&&e.stop()}),{priority:"high"})}}function N(e){const t=e.model;return(o,i)=>{const s=i.keyCode==r.Do.arrowup,n=i.keyCode==r.Do.arrowdown,a=i.shiftKey,c=t.document.selection;if(!s&&!n)return;const l=n;if(a&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(c,l))return;const d=function(e,t,o){const i=e.model;if(o){const e=t.isCollapsed?t.focus:t.getLastPosition(),o=z(i,e,"forward");if(!o)return null;const s=i.createRange(e,o),n=F(i.schema,s,"backward");return n?i.createRange(e,n):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),o=z(i,e,"backward");if(!o)return null;const s=i.createRange(o,e),n=F(i.schema,s,"forward");return n?i.createRange(n,e):null}}(e,c,l);if(d){if(d.isCollapsed){if(c.isCollapsed)return;if(a)return}(d.isCollapsed||function(e,t,o){const i=e.model,s=e.view.domConverter;if(o){const e=i.createSelection(t.start);i.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=i.createRange(e.focus,t.end))}const n=e.mapper.toViewRange(t),a=s.viewRangeToDom(n),c=r.UL.getDomRangeRects(a);let l;for(const e of c)if(void 0!==l){if(Math.round(e.top)>=l)return!1;l=Math.max(l,Math.round(e.bottom))}else l=Math.round(e.bottom);return!0}(e,d,l))&&(t.change((e=>{const o=l?d.end:d.start;if(a){const i=t.createSelection(c.anchor);i.setFocus(o),e.setSelection(i)}else e.setSelection(o)})),o.stop(),i.preventDefault(),i.stopPropagation())}}}function z(e,t,o){const i=e.schema,s=e.createRangeIn(t.root),n="forward"==o?"elementStart":"elementEnd";for(const{previousPosition:e,item:r,type:a}of s.getWalker({startPosition:t,direction:o})){if(i.isLimit(r)&&!i.isInline(r))return e;if(a==n&&i.isBlock(r))return null}return null}function F(e,t,o){const i="backward"==o?t.end:t.start;if(e.checkChild(i,"$text"))return i;for(const{nextPosition:i}of t.getWalker({direction:o}))if(e.checkChild(i,"$text"))return i;return null}var L=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widget.css"),Z={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};R()(L.Z,Z);L.Z.locals;class W extends i.Sy{constructor(){super(...arguments),this._previouslySelected=new Set}static get pluginName(){return"Widget"}static get requires(){return[I,n.HG]}init(){const e=this.editor,t=e.editing.view,o=t.document;this.editor.editing.downcastDispatcher.on("selection",((t,o,i)=>{const s=i.writer,n=o.selection;if(n.isCollapsed)return;const r=n.getSelectedElement();if(!r)return;const a=e.editing.mapper.toViewElement(r);m(a)&&i.consumable.consume(n,"selection")&&s.setSelection(s.createRangeOn(a),{fake:!0,label:y(a)})})),this.editor.editing.downcastDispatcher.on("selection",((e,t,o)=>{this._clearPreviouslySelectedWidgets(o.writer);const i=o.writer,s=i.document.selection;let n=null;for(const e of s.getRanges())for(const t of e){const e=t.item;m(e)&&!$(e,n)&&(i.addClass(g,e),this._previouslySelected.add(e),n=e)}}),{priority:"low"}),t.addObserver(s.dM),this.listenTo(o,"mousedown",((...e)=>this._onMousedown(...e))),this.listenTo(o,"arrowKey",((...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)}),{context:[m,"$text"]}),this.listenTo(o,"arrowKey",((...e)=>{this._preventDefaultOnArrowKeyPress(...e)}),{context:"$root"}),this.listenTo(o,"arrowKey",N(this.editor.editing),{context:"$text"}),this.listenTo(o,"delete",((e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())}),{context:"$root"})}_onMousedown(e,t){const o=this.editor,i=o.editing.view,s=i.document;let n=t.target;if(function(e){let t=e;for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if(m(t))return!1;t=t.parent}return!1}(n)){if((r.OB.isSafari||r.OB.isGecko)&&t.domEvent.detail>=3){const e=o.editing.mapper,i=n.is("attributeElement")?n.findAncestor((e=>!e.is("attributeElement"))):n,s=e.toModelElement(i);t.preventDefault(),this.editor.model.change((e=>{e.setSelection(s,"in")}))}return}if(!m(n)&&(n=n.findAncestor(m),!n))return;r.OB.isAndroid&&t.preventDefault(),s.isFocused||i.focus();const a=o.editing.mapper.toModelElement(n);this._setSelectionOverElement(a)}_handleSelectionChangeOnArrowKeyPress(e,t){const o=t.keyCode,i=this.editor.model,s=i.schema,n=i.document.selection,a=n.getSelectedElement(),c=(0,r.mA)(o,this.editor.locale.contentLanguageDirection),l="down"==c||"right"==c,d="up"==c||"down"==c;if(a&&s.isObject(a)){const o=l?n.getLastPosition():n.getFirstPosition(),r=s.getNearestSelectionRange(o,l?"forward":"backward");return void(r&&(i.change((e=>{e.setSelection(r)})),t.preventDefault(),e.stop()))}if(!n.isCollapsed&&!t.shiftKey){const o=n.getFirstPosition(),r=n.getLastPosition(),a=o.nodeAfter,c=r.nodeBefore;return void((a&&s.isObject(a)||c&&s.isObject(c))&&(i.change((e=>{e.setSelection(l?r:o)})),t.preventDefault(),e.stop()))}if(!n.isCollapsed)return;const h=this._getObjectElementNextToSelection(l);if(h&&s.isObject(h)){if(s.isInline(h)&&d)return;this._setSelectionOverElement(h),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const o=this.editor.model,i=o.schema,s=o.document.selection.getSelectedElement();s&&i.isObject(s)&&(t.preventDefault(),e.stop())}_handleDelete(e){const t=this.editor.model.document.selection;if(!this.editor.model.canEditAt(t))return;if(!t.isCollapsed)return;const o=this._getObjectElementNextToSelection(e);return o?(this.editor.model.change((e=>{let i=t.anchor.parent;for(;i.isEmpty;){const t=i;i=t.parent,e.remove(t)}this._setSelectionOverElement(o)})),!0):void 0}_setSelectionOverElement(e){this.editor.model.change((t=>{t.setSelection(t.createRangeOn(e))}))}_getObjectElementNextToSelection(e){const t=this.editor.model,o=t.schema,i=t.document.selection,s=t.createSelection(i);if(t.modifySelection(s,{direction:e?"forward":"backward"}),s.isEqual(i))return null;const n=e?s.focus.nodeBefore:s.focus.nodeAfter;return n&&o.isObject(n)?n:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(g,t);this._previouslySelected.clear()}}function $(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}class q extends i.Sy{constructor(){super(...arguments),this._toolbarDefinitions=new Map}static get requires(){return[a.WB]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",(t=>{(function(e){const t=e.getSelectedElement();return!(!t||!m(t))})(e.editing.view.document.selection)&&t.stop()}),{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:o,getRelatedElement:i,balloonClassName:s="ck-toolbar-container"}){if(!o.length)return void(0,r.KE)("widget-toolbar-no-items",{toolbarId:e});const n=this.editor,c=n.t,l=new a.jB(n.locale);if(l.ariaLabel=t||c("Widget toolbar"),this._toolbarDefinitions.has(e))throw new r.Bb("widget-toolbar-duplicated",this,{toolbarId:e});const d={view:l,getRelatedElement:i,balloonClassName:s,itemsConfig:o,initialized:!1};n.ui.addToolbar(l,{isContextual:!0,beforeFocus:()=>{const e=i(n.editing.view.document.selection);e&&this._showToolbar(d,e)},afterBlur:()=>{this._hideToolbar(d)}}),this._toolbarDefinitions.set(e,d)}_updateToolbarsVisibility(){let e=0,t=null,o=null;for(const i of this._toolbarDefinitions.values()){const s=i.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&s)if(this.editor.ui.focusTracker.isFocused){const n=s.getAncestors().length;n>e&&(e=n,t=s,o=i)}else this._isToolbarVisible(i)&&this._hideToolbar(i);else this._isToolbarInBalloon(i)&&this._hideToolbar(i)}o&&this._showToolbar(o,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?H(this.editor,t):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:U(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);H(this.editor,t)}})))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function H(e,t){const o=e.plugins.get("ContextualBalloon"),i=U(e,t);o.updatePosition(i)}function U(e,t){const o=e.editing.view,i=a.no.defaultPositions;return{target:o.domConverter.mapViewToDom(t),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast,i.viewportStickyNorth]}}class K extends((0,r.Re)()){constructor(e){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,t,o){const i=new r.UL(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const o of t)if(e.classList.contains(G(o)))return o}(e),this._referenceCoordinates=function(e,t){const o=new r.UL(e),i=t.split("-"),s={x:"right"==i[1]?o.right:o.left,y:"bottom"==i[0]?o.bottom:o.top};return s.x+=e.ownerDocument.defaultView.scrollX,s.y+=e.ownerDocument.defaultView.scrollY,s}(t,function(e){const t=e.split("-"),o={top:"bottom",bottom:"top",left:"right",right:"left"};return`${o[t[0]]}-${o[t[1]]}`}(this.activeHandlePosition)),this._originalWidth=i.width,this._originalHeight=i.height,this._aspectRatio=i.width/i.height;const s=o.style.width;s&&s.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(s):this._originalWidthPercents=function(e,t){const o=e.parentElement;let i=parseFloat(o.ownerDocument.defaultView.getComputedStyle(o).width);const s=5;let n=0,r=o;for(;isNaN(i);){if(r=r.parentElement,++n>s)return 0;i=parseFloat(o.ownerDocument.defaultView.getComputedStyle(r).width)}return t.width/i*100}(o,i)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function G(e){return`ck-widget__resizer__handle-${e}`}class J extends a.G7{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",(e=>e?`ck-orientation-${e}`:""))],style:{display:e.if("_isVisible","none",(e=>!e))}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",((e,t)=>null!==e&&null!==t)),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",((t,o,i)=>"px"===e.unit?`${t}×${o}`:`${i}%`)),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",((e,t,o)=>t<50||o<50?"above-center":e))}_dismiss(){this.unbind(),this._isVisible=!1}}var Y=Object.defineProperty,X=Object.defineProperties,Q=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ie=(e,t,o)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class se extends((0,r.Re)()){constructor(e){super(),this._viewResizerWrapper=null,this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",((e,t)=>e&&t)),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",(e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())}),{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change((e=>{e.removeClass("ck-hidden",this._viewResizerWrapper)}))}hide(){this._options.editor.editing.view.change((e=>{e.addClass("ck-hidden",this._viewResizerWrapper)}))}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change((o=>{const i=o.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(t){const o=this.toDomElement(t);return e._appendHandles(o),e._appendSizeUI(o),o}));o.insert(o.createPositionAt(t,"end"),i),o.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=i,this.isVisible||this.hide()})),this.on("change:isVisible",(()=>{this.isVisible?(this.show(),this.redraw()):this.hide()}))}begin(e){this._state=new K(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change((e=>{const o=this._options.unit||"%",i=("%"===o?t.widthPercents:t.width)+o;e.setStyle("width",i,this._options.viewElement)}));const o=this._getHandleHost(),i=new r.UL(o),s=Math.round(i.width),n=Math.round(i.height),a=new r.UL(o);var c;t.width=Math.round(a.width),t.height=Math.round(a.height),this.redraw(i),this.state.update((c=((e,t)=>{for(var o in t||(t={}))te.call(t,o)&&ie(e,o,t[o]);if(ee)for(var o of ee(t))oe.call(t,o)&&ie(e,o,t[o]);return e})({},t),X(c,Q({handleHostWidth:s,handleHostHeight:n}))))}commit(){const e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change((()=>{this._cleanup(),this._options.onCommit(t)}))}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!((o=t)&&o.ownerDocument&&o.ownerDocument.contains(o)))return;var o;const i=t.parentElement,s=this._getHandleHost(),n=this._viewResizerWrapper,a=[n.getStyle("width"),n.getStyle("height"),n.getStyle("left"),n.getStyle("top")];let c;if(i.isSameNode(s)){const t=e||new r.UL(s);c=[t.width+"px",t.height+"px",void 0,void 0]}else c=[s.offsetWidth+"px",s.offsetHeight+"px",s.offsetLeft+"px",s.offsetTop+"px"];"same"!==(0,r.Rt)(a,c)&&this._options.editor.editing.view.change((e=>{e.setStyle({width:c[0],height:c[1],left:c[2],top:c[3]},n)}))}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss();this._options.editor.editing.view.change((e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)}))}_proposeNewSize(e){const t=this.state,o={x:(i=e).pageX,y:i.pageY};var i;const s=!this._options.isCentered||this._options.isCentered(this),n={x:t._referenceCoordinates.x-(o.x+t.originalWidth),y:o.y-t.originalHeight-t._referenceCoordinates.y};s&&t.activeHandlePosition.endsWith("-right")&&(n.x=o.x-(t._referenceCoordinates.x+t.originalWidth)),s&&(n.x*=2);let r=Math.abs(t.originalWidth+n.x),a=Math.abs(t.originalHeight+n.y);return"width"==(r/t.aspectRatio>a?"width":"height")?a=r/t.aspectRatio:r=a*t.aspectRatio,{width:Math.round(r),height:Math.round(a),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*r*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const i of t)e.appendChild(new a.YS({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(o=i,`ck-widget__resizer__handle-${o}`)}}).render());var o}_appendSizeUI(e){this._sizeView=new J,this._sizeView.render(),e.appendChild(this._sizeView.element)}}var ne=o("./node_modules/lodash-es/throttle.js"),re=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgetresize.css"),ae={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};R()(re.Z,ae);re.Z.locals;class ce extends i.Sy{constructor(){super(...arguments),this._resizers=new Map}static get pluginName(){return"WidgetResize"}init(){const e=this.editor.editing,t=r.global.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(s.dM),this._observer=new((0,r.Xu)()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=(0,ne.Z)((()=>this.redrawSelectedResizer()),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",(()=>{for(const[e,t]of this._resizers)e.isAttached()||(this._resizers.delete(e),t.destroy())}),{priority:"lowest"}),this._observer.listenTo(r.global.window,"resize",this._redrawSelectedResizerThrottled);const o=this.editor.editing.view.document.selection;o.on("change",(()=>{const e=o.getSelectedElement(),t=this.getResizerByViewElement(e)||null;t?this.select(t):this.deselect()}))}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new se(e),o=this.editor.plugins;if(t.attach(),o.has("WidgetToolbarRepository")){const e=o.get("WidgetToolbarRepository");t.on("begin",(()=>{e.forceDisabled("resize")}),{priority:"lowest"}),t.on("cancel",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"}),t.on("commit",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"})}this._resizers.set(e.viewElement,t);const i=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(i)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const o=t.domTarget;se.isResizeHandle(o)&&(this._activeResizer=this._getResizerByHandle(o)||null,this._activeResizer&&(this._activeResizer.begin(o),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":(e,t,o)=>{"use strict";var i,s=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},n=function(){var e={};return function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}e[t]=o}return e[t]}}(),r=[];function a(e){for(var t=-1,o=0;o<r.length;o++)if(r[o].identifier===e){t=o;break}return t}function c(e,t){for(var o={},i=[],s=0;s<e.length;s++){var n=e[s],c=t.base?n[0]+t.base:n[0],l=o[c]||0,d="".concat(c," ").concat(l);o[c]=l+1;var h=a(d),u={css:n[1],media:n[2],sourceMap:n[3]};-1!==h?(r[h].references++,r[h].updater(u)):r.push({identifier:d,updater:m(u,t),references:1}),i.push(d)}return i}function l(e){var t=document.createElement("style"),i=e.attributes||{};if(void 0===i.nonce){var s=o.nc;s&&(i.nonce=s)}if(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),"function"==typeof e.insert)e.insert(t);else{var r=n(e.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}return t}var d,h=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function u(e,t,o,i){var s=o?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(e.styleSheet)e.styleSheet.cssText=h(t,s);else{var n=document.createTextNode(s),r=e.childNodes;r[t]&&e.removeChild(r[t]),r.length?e.insertBefore(n,r[t]):e.appendChild(n)}}function p(e,t,o){var i=o.css,s=o.media,n=o.sourceMap;if(s?e.setAttribute("media",s):e.removeAttribute("media"),n&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var f=null,g=0;function m(e,t){var o,i,s;if(t.singleton){var n=g++;o=f||(f=l(t)),i=u.bind(null,o,n,!1),s=u.bind(null,o,n,!0)}else o=l(t),i=p.bind(null,o,t),s=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(o)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else s()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=s());var o=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i<o.length;i++){var s=a(o[i]);r[s].references--}for(var n=c(e,t),l=0;l<o.length;l++){var d=a(o[l]);0===r[d].references&&(r[d].updater(),r.splice(d,1))}o=n}}}},"./src/clipboard.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Clipboard:()=>v,ClipboardPipeline:()=>l,DragDrop:()=>m,DragDropBlockToolbar:()=>L,DragDropExperimental:()=>R,DragDropTarget:()=>E,PastePlainText:()=>k});var i=o("./packages/ckeditor5-core/src/index.ts"),s=o("./packages/ckeditor5-utils/src/index.ts"),n=o("./packages/ckeditor5-engine/src/index.ts");class r extends n.qZ{constructor(e){super(e),this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];const t=this.document;function o(e){return(o,i)=>{i.preventDefault();const n=i.dropRange?[i.dropRange]:null,r=new s.M3(t,e);t.fire(r,{dataTransfer:i.dataTransfer,method:o.name,targetRanges:n,target:i.target,domEvent:i.domEvent}),r.stop.called&&i.stopPropagation()}}this.listenTo(t,"paste",o("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",o("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",o("dragging"),{priority:"low"})}onDomEvent(e){const t="clipboardData"in e?e.clipboardData:e.dataTransfer,o="drop"==e.type||"paste"==e.type,i={dataTransfer:new n.tn(t,{cacheFiles:o})};"drop"!=e.type&&"dragover"!=e.type||(i.dropRange=function(e,t){const o=t.target.ownerDocument,i=t.clientX,s=t.clientY;let n;o.caretRangeFromPoint&&o.caretRangeFromPoint(i,s)?n=o.caretRangeFromPoint(i,s):t.rangeParent&&(n=o.createRange(),n.setStart(t.rangeParent,t.rangeOffset),n.collapse(!0));if(n)return e.domConverter.domRangeToView(n);return null}(this.view,e)),this.fire(e.type,e,i)}}const a=["figcaption","li"];function c(e){let t="";if(e.is("$text")||e.is("$textProxy"))t=e.data;else if(e.is("element","img")&&e.hasAttribute("alt"))t=e.getAttribute("alt");else if(e.is("element","br"))t="\n";else{let o=null;for(const i of e.getChildren()){const e=c(i);o&&(o.is("containerElement")||i.is("containerElement"))&&(a.includes(o.name)||a.includes(i.name)?t+="\n":t+="\n\n"),t+=e,o=i}}return t}class l extends i.Sy{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(r),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){const e=this.editor,t=e.model,o=e.editing.view,i=o.document;this.listenTo(i,"clipboardInput",((t,o)=>{"paste"!=o.method||e.model.canEditAt(e.model.document.selection)||t.stop()}),{priority:"highest"}),this.listenTo(i,"clipboardInput",((e,t)=>{const i=t.dataTransfer;let n;if(t.content)n=t.content;else{let e="";i.getData("text/html")?e=function(e){return e.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,((e,t)=>1==t.length?" ":t)).replace(/<!--[\s\S]*?-->/g,"")}(i.getData("text/html")):i.getData("text/plain")&&(((r=(r=i.getData("text/plain")).replace(/</g,"<").replace(/>/g,">").replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br>").replace(/\t/g," ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g," ")).includes("</p><p>")||r.includes("<br>"))&&(r=`<p>${r}</p>`),e=r),n=this.editor.data.htmlProcessor.toView(e)}var r;const a=new s.M3(this,"inputTransformation");this.fire(a,{content:n,dataTransfer:i,targetRanges:t.targetRanges,method:t.method}),a.stop.called&&e.stop(),o.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,o)=>{if(o.content.isEmpty)return;const i=this.editor.data.toModel(o.content,"$clipboardHolder");0!=i.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:i,method:o.method,dataTransfer:o.dataTransfer,targetRanges:o.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,o)=>{o.resultRange=t.insertContent(o.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,o=e.editing.view.document,i=(i,s)=>{const n=s.dataTransfer;s.preventDefault();const r=e.data.toView(e.model.getSelectedContent(t.selection));o.fire("clipboardOutput",{dataTransfer:n,content:r,method:i.name})};this.listenTo(o,"copy",i,{priority:"low"}),this.listenTo(o,"cut",((t,o)=>{e.model.canEditAt(e.model.document.selection)?i(t,o):o.preventDefault()}),{priority:"low"}),this.listenTo(o,"clipboardOutput",((o,i)=>{i.content.isEmpty||(i.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(i.content)),i.dataTransfer.setData("text/plain",c(i.content))),"cut"==i.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}var d=o("./packages/ckeditor5-widget/src/index.ts"),h=o("./node_modules/lodash-es/throttle.js"),u=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),p=o.n(u),f=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-clipboard/theme/clipboard.css"),g={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};p()(f.Z,g);f.Z.locals;class m extends i.Sy{static get pluginName(){return"DragDrop"}static get requires(){return[l,d.$L]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=(0,h.Z)((e=>this._updateDropMarker(e)),40),this._removeDropMarkerDelayed=(0,s.gw)((()=>this._removeDropMarker()),40),this._clearDraggableAttributesDelayed=(0,s.gw)((()=>this._clearDraggableAttributes()),40),e.plugins.has("DragDropExperimental")?this.forceDisabled("DragDropExperimental"):(t.addObserver(r),t.addObserver(n.dM),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,o)=>{o?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,o)=>{o||this._finalizeDragging(!1)})),s.OB.isAndroid&&this.forceDisabled("noAndroidSupport"))}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,o=t.document,i=e.editing.view,r=i.document;this.listenTo(r,"dragstart",((i,a)=>{const c=o.selection;if(a.target&&a.target.is("editableElement"))return void a.preventDefault();const l=a.target?w(a.target):null;if(l){const o=e.editing.mapper.toModelElement(l);if(this._draggedRange=n.iE.fromRange(t.createRangeOn(o)),e.plugins.has("WidgetToolbarRepository")){e.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}}else if(!r.selection.isCollapsed){const e=r.selection.getSelectedElement();e&&(0,d.Qd)(e)||(this._draggedRange=n.iE.fromRange(c.getFirstRange()))}if(!this._draggedRange)return void a.preventDefault();this._draggingUid=(0,s.hQ)();const h=this.isEnabled&&e.model.canEditAt(this._draggedRange);a.dataTransfer.effectAllowed=h?"copyMove":"copy",a.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const u=t.createSelection(this._draggedRange.toRange()),p=e.data.toView(t.getSelectedContent(u));r.fire("clipboardOutput",{dataTransfer:a.dataTransfer,content:p,method:"dragstart"}),h||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(r,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this.listenTo(r,"dragenter",(()=>{this.isEnabled&&i.focus()})),this.listenTo(r,"dragleave",(()=>{this._removeDropMarkerDelayed()})),this.listenTo(r,"dragging",((t,o)=>{if(!this.isEnabled)return void(o.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const i=b(e,o.targetRanges,o.target);e.model.canEditAt(i)?(this._draggedRange||(o.dataTransfer.dropEffect="copy"),s.OB.isGecko||("copy"==o.dataTransfer.effectAllowed?o.dataTransfer.dropEffect="copy":["all","copyMove"].includes(o.dataTransfer.effectAllowed)&&(o.dataTransfer.dropEffect="move")),i&&this._updateDropMarkerThrottled(i)):o.dataTransfer.dropEffect="none"}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"clipboardInput",((t,o)=>{if("drop"!=o.method)return;const i=b(e,o.targetRanges,o.target);if(this._removeDropMarker(),!i||!e.model.canEditAt(i))return this._finalizeDragging(!1),void t.stop();this._draggedRange&&this._draggingUid!=o.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==_(o.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(i,!0))return this._finalizeDragging(!1),void t.stop();o.targetRanges=[e.editing.mapper.toViewRange(i)]}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(l);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(o)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o="move"==_(t.dataTransfer),i=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(i&&o)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,o=t.document;this.listenTo(o,"mousedown",((i,n)=>{if(s.OB.isAndroid||!n)return;this._clearDraggableAttributesDelayed.cancel();let r=w(n.target);if(s.OB.isBlink&&!r&&!o.selection.isCollapsed){const e=o.selection.getSelectedElement();if(!e||!(0,d.Qd)(e)){const e=o.selection.editableElement;e&&!e.isReadOnly&&(r=e)}}r&&(t.change((e=>{e.setAttribute("draggable","true",r)})),this._draggableElement=e.editing.mapper.toModelElement(r))})),this.listenTo(o,"mouseup",(()=>{s.OB.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_setupDropMarker(){const e=this.editor;e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:o})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return o.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("â ",e.createElement("span"),"â "),t}))}})}_updateDropMarker(e){const t=this.editor,o=t.model.markers;t.model.change((t=>{o.has("drop-target")?o.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_removeDropMarker(){const e=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),e.markers.has("drop-target")&&e.change((e=>{e.removeMarker("drop-target")}))}_finalizeDragging(e){const t=this.editor,o=t.model;if(this._removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop")}this._draggingUid="",this._draggedRange&&(e&&this.isEnabled&&o.deleteContent(o.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function b(e,t,o){const i=e.model,n=e.editing.mapper;let r=null;const a=t?t[0].start:null;if(o.is("uiElement")&&(o=o.parent),r=function(e,t){const o=e.model,i=e.editing.mapper;if((0,d.Qd)(t))return o.createRangeOn(i.toModelElement(t));if(!t.is("editableElement")){const e=t.findAncestor((e=>(0,d.Qd)(e)||e.is("editableElement")));if((0,d.Qd)(e))return o.createRangeOn(i.toModelElement(e))}return null}(e,o),r)return r;const c=function(e,t){const o=e.editing.mapper,i=e.editing.view,s=o.toModelElement(t);if(s)return s;const n=i.createPositionBefore(t),r=o.findMappedViewAncestor(n);return o.toModelElement(r)}(e,o),l=a?n.toModelPosition(a):null;return l?(r=function(e,t,o){const i=e.model;if(!i.schema.checkChild(o,"$block"))return null;const s=i.createPositionAt(o,0),n=t.path.slice(0,s.path.length),r=i.createPositionFromPath(t.root,n),a=r.nodeAfter;if(a&&i.schema.isObject(a))return i.createRangeOn(a);return null}(e,l,c),r||(r=i.schema.getNearestSelectionRange(l,s.OB.isGecko?"forward":"backward"),r||function(e,t){const o=e.model;let i=t;for(;i;){if(o.schema.isObject(i))return o.createRangeOn(i);i=i.parent}return null}(e,l.parent))):function(e,t){const o=e.model,i=o.schema,s=o.createPositionAt(t,0);return i.getNearestSelectionRange(s,"forward")}(e,c)}function _(e){return s.OB.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function w(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(d.Qd);if((0,d.Qd)(e))return e;const t=e.findAncestor((e=>(0,d.Qd)(e)||e.is("editableElement")));return(0,d.Qd)(t)?t:null}class k extends i.Sy{static get pluginName(){return"PastePlainText"}static get requires(){return[l]}init(){const e=this.editor,t=e.model,o=e.editing.view,i=o.document,s=t.document.selection;let n=!1;o.addObserver(r),this.listenTo(i,"keydown",((e,t)=>{n=t.shiftKey})),e.plugins.get(l).on("contentInsertion",((e,o)=>{(n||function(e,t){if(e.childCount>1)return!1;const o=e.getChild(0);if(t.isObject(o))return!1;return 0==Array.from(o.getAttributeKeys()).length}(o.content,t.schema))&&t.change((e=>{const i=Array.from(s.getAttributes()).filter((([e])=>t.schema.getAttributeProperties(e).isFormatting));s.isCollapsed||t.deleteContent(s,{doNotAutoparagraph:!0}),i.push(...s.getAttributes());const n=e.createRangeIn(o.content);for(const t of n.getItems())t.is("$textProxy")&&e.setAttributes(i,t)}))}))}}class v extends i.Sy{static get pluginName(){return"Clipboard"}static get requires(){return[l,m,k]}}var y=o("./packages/ckeditor5-ui/src/index.ts");const x=(0,s.nn)("px");class P extends y.G7{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,left:null,top:null,width:null}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-clipboard-drop-target-line",e.if("isVisible","ck-hidden",(e=>!e))],style:{left:e.to("left",(e=>x(e))),top:e.to("top",(e=>x(e))),width:e.to("width",(e=>x(e)))}}})}}class E extends i.Sy{constructor(){super(...arguments),this.removeDropMarkerDelayed=(0,s.gw)((()=>this.removeDropMarker()),40),this._updateDropMarkerThrottled=(0,h.Z)((e=>this._updateDropMarker(e)),40),this._reconvertMarkerThrottled=(0,h.Z)((()=>{this.editor.model.markers.has("drop-target")&&this.editor.editing.reconvertMarker("drop-target")}),0),this._dropTargetLineView=new P,this._domEmitter=new((0,s.Xu)()),this._scrollables=new Map}static get pluginName(){return"DragDropTarget"}init(){this._setupDropMarker()}destroy(){this._domEmitter.stopListening();for(const{resizeObserver:e}of this._scrollables.values())e.destroy();return this._updateDropMarkerThrottled.cancel(),this.removeDropMarkerDelayed.cancel(),this._reconvertMarkerThrottled.cancel(),super.destroy()}updateDropMarker(e,t,o,i,s){this.removeDropMarkerDelayed.cancel();const n=T(this.editor,e,t,o,i,s);n&&this._updateDropMarkerThrottled(n)}getFinalDropRange(e,t,o,i,s){const n=T(this.editor,e,t,o,i,s);return this.removeDropMarker(),n}removeDropMarker(){const e=this.editor.model;this.removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),this._dropTargetLineView.isVisible=!1,e.markers.has("drop-target")&&e.change((e=>{e.removeMarker("drop-target")}))}_setupDropMarker(){const e=this.editor;e.ui.view.body.add(this._dropTargetLineView),e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:o})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return this._dropTargetLineView.isVisible=!1,this._createDropTargetPosition(o);t.markerRange.isCollapsed?this._updateDropTargetLine(t.markerRange):this._dropTargetLineView.isVisible=!1}})}_updateDropMarker(e){const t=this.editor,o=t.model.markers;t.model.change((t=>{o.has("drop-target")?o.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_createDropTargetPosition(e){return e.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("â ",e.createElement("span"),"â "),t}))}_updateDropTargetLine(e){const t=this.editor.editing,o=e.start.nodeBefore,i=e.start.nodeAfter,n=e.start.parent,r=o?t.mapper.toViewElement(o):null,a=r?t.view.domConverter.mapViewToDom(r):null,c=i?t.mapper.toViewElement(i):null,l=c?t.view.domConverter.mapViewToDom(c):null,d=t.mapper.toViewElement(n),h=t.view.domConverter.mapViewToDom(d),u=this._getScrollableRect(d),{scrollX:p,scrollY:f}=s.global.window,g=a?new s.UL(a):null,m=l?new s.UL(l):null,b=new s.UL(h).excludeScrollbarsAndBorders(),_=g?g.bottom:b.top,w=m?m.top:b.bottom,k=s.global.window.getComputedStyle(h),v=_<=w?(_+w)/2:w;if(u.top<v&&v<u.bottom){const e=b.left+parseFloat(k.paddingLeft),t=b.right-parseFloat(k.paddingRight),o=Math.max(e+p,u.left),i=Math.min(t+p,u.right);this._dropTargetLineView.set({isVisible:!0,left:o,top:v+f,width:i-o})}else this._dropTargetLineView.isVisible=!1}_getScrollableRect(e){const t=e.root.rootName;let o;if(this._scrollables.has(t))o=this._scrollables.get(t).domElement;else{o=function(e){let t=e;do{t=t.parentElement;const e=s.global.window.getComputedStyle(t).overflowY;if("auto"==e||"scroll"==e)break}while("BODY"!=t.tagName);return t}(this.editor.editing.view.domConverter.mapViewToDom(e)),this._domEmitter.listenTo(o,"scroll",this._reconvertMarkerThrottled,{usePassive:!0});const i=new s.do(o,this._reconvertMarkerThrottled);this._scrollables.set(t,{domElement:o,resizeObserver:i})}return new s.UL(o).excludeScrollbarsAndBorders()}}function T(e,t,o,i,s,n){const r=e.model,a=e.editing.mapper,c=O(e,t);let l=c;for(;l;){if(!n)if(r.schema.checkChild(l,"$text")){const t=o?o[0].start:null,n=t?a.toModelPosition(t):null;if(n){if(r.schema.checkChild(n,"$text"))return r.createRange(n);if(t)return C(e,O(e,t.parent),i,s)}}else if(r.schema.isInline(l))return C(e,l,i,s);if(r.schema.isBlock(l))return C(e,l,i,s);if(r.schema.checkChild(l,"$block")){const t=Array.from(l.getChildren()).filter((t=>t.is("element")&&!A(e,t)));let o=0,n=t.length;for(;o<n-1;){const r=Math.floor((o+n)/2);"before"==S(e,t[r],i,s)?n=r:o=r}return C(e,t[o],i,s)}l=l.parent}return console.warn("none:",c.name),null}function A(e,t){const o=e.editing.mapper,i=e.editing.view.domConverter,n=o.toViewElement(t),r=i.mapViewToDom(n);return"none"!=s.global.window.getComputedStyle(r).float}function C(e,t,o,i){const s=e.model;return s.createRange(s.createPositionAt(t,S(e,t,o,i)))}function S(e,t,o,i){const n=e.editing.mapper,r=e.editing.view.domConverter,a=n.toViewElement(t),c=r.mapViewToDom(a),l=new s.UL(c);return e.model.schema.isInline(t)?o<(l.left+l.right)/2?"before":"after":i<(l.top+l.bottom)/2?"before":"after"}function O(e,t){const o=e.editing.mapper,i=e.editing.view,s=o.toModelElement(t);if(s)return s;const n=i.createPositionBefore(t),r=o.findMappedViewAncestor(n);return o.toModelElement(r)}class R extends i.Sy{constructor(){super(...arguments),this._clearDraggableAttributesDelayed=(0,s.gw)((()=>this._clearDraggableAttributes()),40),this._blockMode=!1,this._domEmitter=new((0,s.Xu)())}static get pluginName(){return"DragDropExperimental"}static get requires(){return[l,d.$L,E]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,t.addObserver(r),t.addObserver(n.dM),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,o)=>{o?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,o)=>{o||this._finalizeDragging(!1)})),s.OB.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._previewContainer&&this._previewContainer.remove(),this._domEmitter.stopListening(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,o=e.editing.view,i=o.document,n=e.plugins.get(E);this.listenTo(i,"dragstart",((o,n)=>{if(n.target&&n.target.is("editableElement"))return void n.preventDefault();if(this._prepareDraggedRange(n.target),!this._draggedRange)return void n.preventDefault();this._draggingUid=(0,s.hQ)(),n.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",n.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const r=t.createSelection(this._draggedRange.toRange()),a=e.data.toView(t.getSelectedContent(r));i.fire("clipboardOutput",{dataTransfer:n.dataTransfer,content:a,method:"dragstart"}),this._updatePreview(n.dataTransfer),n.stopPropagation(),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(i,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this._domEmitter.listenTo(s.global.document,"dragend",(()=>{this._blockMode=!1}),{useCapture:!0}),this.listenTo(i,"dragenter",(()=>{this.isEnabled&&o.focus()})),this.listenTo(i,"dragleave",(()=>{n.removeDropMarkerDelayed()})),this.listenTo(i,"dragging",((e,t)=>{if(!this.isEnabled)return void(t.dataTransfer.dropEffect="none");const{clientX:o,clientY:i}=t.domEvent;n.updateDropMarker(t.target,t.targetRanges,o,i,this._blockMode),this._draggedRange||(t.dataTransfer.dropEffect="copy"),s.OB.isGecko||("copy"==t.dataTransfer.effectAllowed?t.dataTransfer.dropEffect="copy":["all","copyMove"].includes(t.dataTransfer.effectAllowed)&&(t.dataTransfer.dropEffect="move")),e.stop()}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document,o=e.plugins.get(E);this.listenTo(t,"clipboardInput",((t,i)=>{if("drop"!=i.method)return;const{clientX:s,clientY:n}=i.domEvent,r=o.getFinalDropRange(i.target,i.targetRanges,s,n,this._blockMode);if(!r)return this._finalizeDragging(!1),void t.stop();this._draggedRange&&this._draggingUid!=i.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==M(i.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(r,!0))return this._finalizeDragging(!1),void t.stop();i.targetRanges=[e.editing.mapper.toViewRange(r)]}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(l);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(o)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o="move"==M(t.dataTransfer),i=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(i&&o)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,o=t.document;this.listenTo(o,"mousedown",((i,n)=>{if(s.OB.isAndroid||!n)return;this._clearDraggableAttributesDelayed.cancel();let r=j(n.target);if(s.OB.isBlink&&!e.isReadOnly&&!r&&!o.selection.isCollapsed){const e=o.selection.getSelectedElement();e&&(0,d.Qd)(e)||(r=o.selection.editableElement)}r&&(t.change((e=>{e.setAttribute("draggable","true",r)})),this._draggableElement=e.editing.mapper.toModelElement(r))})),this.listenTo(o,"mouseup",(()=>{s.OB.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_finalizeDragging(e){const t=this.editor,o=t.model;if(t.plugins.get(E).removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop")}this._draggingUid="",this._previewContainer&&(this._previewContainer.remove(),this._previewContainer=void 0),this._draggedRange&&(e&&this.isEnabled&&o.deleteContent(o.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}_prepareDraggedRange(e){const t=this.editor,o=t.model,i=o.document.selection,s=e?j(e):null;if(s){const e=t.editing.mapper.toModelElement(s);if(this._draggedRange=n.iE.fromRange(o.createRangeOn(e)),this._blockMode=o.schema.isBlock(e),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}}else if(!i.isCollapsed||i.getFirstPosition().parent.isEmpty){const e=Array.from(i.getSelectedBlocks());if(e.length>1)this._draggedRange=n.iE.fromRange(o.createRange(o.createPositionBefore(e[0]),o.createPositionAfter(e[e.length-1]))),o.change((e=>e.setSelection(this._draggedRange.toRange()))),this._blockMode=!0;else if(1==e.length){const t=i.getFirstRange(),s=o.createRange(o.createPositionBefore(e[0]),o.createPositionAfter(e[0]));t.start.isTouching(s.start)&&t.end.isTouching(s.end)?(this._draggedRange=n.iE.fromRange(s),this._blockMode=!0):(this._draggedRange=n.iE.fromRange(i.getFirstRange()),this._blockMode=!1)}}}_updatePreview(e){const t=this.editor.editing.view,o=t.document.selection.editableElement,i=t.domConverter.mapViewToDom(o),n=s.global.window.getComputedStyle(i);this._previewContainer?this._previewContainer.removeChild(this._previewContainer.firstElementChild):(this._previewContainer=(0,s.az)(s.global.document,"div",{style:"position: fixed; left: -999999px;"}),s.global.document.body.appendChild(this._previewContainer));const r=(0,s.az)(s.global.document,"div");r.className="ck ck-content",r.style.width=n.width,r.innerHTML=e.getData("text/html"),e.setDragImage(r,0,0),this._previewContainer.appendChild(r)}}function M(e){return s.OB.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function j(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(d.Qd);if((0,d.Qd)(e))return e;const t=e.findAncestor((e=>(0,d.Qd)(e)||e.is("editableElement")));return(0,d.Qd)(t)?t:null}var B=Object.defineProperty,D=Object.defineProperties,V=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,F=(e,t,o)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class L extends i.Sy{constructor(){super(...arguments),this._isBlockDragging=!1,this._domEmitter=new((0,s.Xu)())}static get pluginName(){return"DragDropBlockToolbar"}init(){const e=this.editor;if(this.listenTo(e,"change:isReadOnly",((e,t,o)=>{o?(this.forceDisabled("readOnlyMode"),this._isBlockDragging=!1):this.clearForceDisabled("readOnlyMode")})),s.OB.isAndroid&&this.forceDisabled("noAndroidSupport"),e.plugins.has("BlockToolbar")){const t=e.plugins.get("BlockToolbar").buttonView.element;t.setAttribute("draggable","true"),this._domEmitter.listenTo(t,"dragstart",((e,t)=>this._handleBlockDragStart(t))),this._domEmitter.listenTo(s.global.document,"dragover",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(s.global.document,"drop",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(s.global.document,"dragend",(()=>this._handleBlockDragEnd()),{useCapture:!0})}}destroy(){return this._domEmitter.stopListening(),super.destroy()}_handleBlockDragStart(e){if(!this.isEnabled)return;const t=this.editor.model,o=t.document.selection,i=Array.from(o.getSelectedBlocks()),s=t.createRange(t.createPositionBefore(i[0]),t.createPositionAfter(i[i.length-1]));t.change((e=>e.setSelection(s))),this._isBlockDragging=!0,this.editor.editing.view.getObserver(r).onDomEvent(e)}_handleBlockDragging(e){if(!this.isEnabled||!this._isBlockDragging)return;const t=e.clientX+100,o=e.clientY,i=document.elementFromPoint(t,o);var s,n;i&&i.closest(".ck-editor__editable")&&this.editor.editing.view.getObserver(r).onDomEvent((s=((e,t)=>{for(var o in t||(t={}))N.call(t,o)&&F(e,o,t[o]);if(I)for(var o of I(t))z.call(t,o)&&F(e,o,t[o]);return e})({},e),n={type:e.type,dataTransfer:e.dataTransfer,target:i,clientX:t,clientY:o,preventDefault:()=>e.preventDefault(),stopPropagation:()=>e.stopPropagation()},D(s,V(n))))}_handleBlockDragEnd(){this._isBlockDragging=!1}}},"./src/core.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Command:()=>i.mY,Context:()=>i._y,ContextPlugin:()=>i.eO,DataApiMixin:()=>i.W9,Editor:()=>i.ML,ElementApiMixin:()=>i.xK,MultiCommand:()=>i.AJ,PendingActions:()=>i.lR,Plugin:()=>i.Sy,attachToForm:()=>i.P$,icons:()=>i.icons,secureSourceElement:()=>i.Nu});var i=o("./packages/ckeditor5-core/src/index.ts")},"./src/engine.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{AttributeElement:()=>i.kW,AttributeOperation:()=>i.Yy,BubblingEventInfo:()=>i.r7,ClickObserver:()=>i.KU,Conversion:()=>i.uz,DataController:()=>i.Yc,DataTransfer:()=>i.tn,DocumentFragment:()=>i.f4,DocumentSelection:()=>i.uj,DomConverter:()=>i.pG,DomEventData:()=>i.dK,DomEventObserver:()=>i.qZ,DowncastWriter:()=>i.qD,EditingController:()=>i.jH,Element:()=>i.W_,History:()=>i.Ay,HtmlDataProcessor:()=>i.X5,InsertOperation:()=>i.IZ,LivePosition:()=>i.jP,LiveRange:()=>i.iE,MarkerOperation:()=>i.zj,Matcher:()=>i.xO,MergeOperation:()=>i.lB,Model:()=>i.Hn,MouseObserver:()=>i.dM,MoveOperation:()=>i.$z,NoOperation:()=>i.Pk,Observer:()=>i.Qj,OperationFactory:()=>i.Bz,Position:()=>i.Ly,Range:()=>i.e6,RenameOperation:()=>i.sN,Renderer:()=>i.Th,RootAttributeOperation:()=>i._o,RootOperation:()=>i.tF,SplitOperation:()=>i.qh,StylesProcessor:()=>i.A_,TabObserver:()=>i.aY,Text:()=>i.xv,TextProxy:()=>i.R,TreeWalker:()=>i.Po,UpcastWriter:()=>i.yj,View:()=>i.G7,ViewAttributeElement:()=>i.m1,ViewContainerElement:()=>i.By,ViewDocument:()=>i.Ux,ViewDocumentFragment:()=>i.y_,ViewEditableElement:()=>i.W2,ViewElement:()=>i.y9,ViewEmptyElement:()=>i.pc,ViewRawElement:()=>i.wx,ViewRootEditableElement:()=>i.FY,ViewText:()=>i.Xj,ViewUIElement:()=>i.dq,addBackgroundRules:()=>i.QR,addBorderRules:()=>i.sI,addMarginRules:()=>i.vt,addPaddingRules:()=>i.J8,disablePlaceholder:()=>i.DA,enablePlaceholder:()=>i.ID,findOptimalInsertionRange:()=>i.KT,getBoxSidesShorthandValue:()=>i.I8,getBoxSidesValueReducer:()=>i.mq,getBoxSidesValues:()=>i.oz,getFillerOffset:()=>i.YG,getPositionShorthandNormalizer:()=>i.m0,getShorthandValues:()=>i.uT,hidePlaceholder:()=>i.$_,isAttachment:()=>i.SB,isColor:()=>i.D5,isLength:()=>i.G9,isLineStyle:()=>i.IT,isPercentage:()=>i.zz,isPosition:()=>i.WK,isRepeat:()=>i.Zb,isURL:()=>i.PX,needsPlaceholder:()=>i.Q7,showPlaceholder:()=>i.NJ,transformSets:()=>i.Rf});var i=o("./packages/ckeditor5-engine/src/index.ts")},"./src/enter.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Enter:()=>i.C,ShiftEnter:()=>i.G});var i=o("./packages/ckeditor5-enter/src/index.ts")},"./src/paragraph.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Paragraph:()=>l,ParagraphButtonUI:()=>u});var i=o("./packages/ckeditor5-core/src/index.ts"),s=o("./packages/ckeditor5-utils/src/index.ts");class n extends i.mY{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,t=e.document,o=(0,s.Ps)(t.selection.getSelectedBlocks());this.value=!!o&&o.is("element","paragraph"),this.isEnabled=!!o&&r(o,e.schema)}execute(e={}){const t=this.editor.model,o=t.document,i=e.selection||o.selection;t.canEditAt(i)&&t.change((e=>{const o=i.getSelectedBlocks();for(const i of o)!i.is("element","paragraph")&&r(i,t.schema)&&e.rename(i,"paragraph")}))}}function r(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class a extends i.mY{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}execute(e){const t=this.editor.model,o=e.attributes;let i=e.position;t.canEditAt(i)&&t.change((e=>{const s=e.createElement("paragraph");if(o&&t.schema.setAllowedAttributes(s,o,e),!t.schema.checkChild(i.parent,s)){const o=t.schema.findAllowedParent(i,s);if(!o)return;i=e.split(i,o).position}t.insertContent(s,i),e.setSelection(s,"in")}))}}const c=class extends i.Sy{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new n(e)),e.commands.add("insertParagraph",new a(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>c.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}};let l=c;l.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);var d=o("./packages/ckeditor5-ui/src/index.ts");const h=i.icons.paragraph;class u extends i.Sy{static get requires(){return[l]}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("paragraph",(o=>{const i=new d.r5(o),s=e.commands.get("paragraph");return i.label=t("Paragraph"),i.icon=h,i.tooltip=!0,i.isToggleable=!0,i.bind("isEnabled").to(s),i.bind("isOn").to(s,"value"),i.on("execute",(()=>{e.execute("paragraph")})),i}))}}},"./src/select-all.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{SelectAll:()=>h,SelectAllEditing:()=>c,SelectAllUI:()=>d});var i=o("./packages/ckeditor5-core/src/index.ts"),s=o("./packages/ckeditor5-utils/src/index.ts");class n extends i.mY{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let o=e.schema.getLimitElement(t);if(t.containsEntireContent(o)||!r(e.schema,o))do{if(o=o.parent,!o)return}while(!r(e.schema,o));e.change((e=>{e.setSelection(o,"in")}))}}function r(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const a=(0,s.Zz)("Ctrl+A");class c extends i.Sy{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new n(e)),this.listenTo(t,"keydown",((t,o)=>{(0,s.Cq)(o)===a&&(e.execute("selectAll"),o.preventDefault())}))}}var l=o("./packages/ckeditor5-ui/src/index.ts");class d extends i.Sy{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",(t=>{const o=e.commands.get("selectAll"),i=new l.r5(t),s=t.t;return i.set({label:s("Select all"),icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75zm18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75zm-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5h8.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5h2.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5h5.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0h2.25zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5h2.25zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6z"/></svg>',keystroke:"Ctrl+A",tooltip:!0}),i.bind("isEnabled").to(o,"isEnabled"),this.listenTo(i,"execute",(()=>{e.execute("selectAll"),e.editing.view.focus()})),i}))}}class h extends i.Sy{static get requires(){return[c,d]}static get pluginName(){return"SelectAll"}}},"./src/typing.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Delete:()=>i.HG,Input:()=>i.II,InsertTextCommand:()=>i.BT,TextTransformation:()=>i.cL,TextWatcher:()=>i.uL,TwoStepCaretMovement:()=>i.mh,Typing:()=>i.Mq,findAttributeRange:()=>i.VD,findAttributeRangeBound:()=>i.r9,getLastTextLine:()=>i.Up,inlineHighlight:()=>i.Im});var i=o("./packages/ckeditor5-typing/src/index.ts")},"./src/ui.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{BalloonPanelView:()=>i.no,BalloonToolbar:()=>i.Jf,BlockToolbar:()=>i.ee,BodyCollection:()=>i.BK,BoxedEditorUIView:()=>i.py,ButtonView:()=>i.r5,ColorGridView:()=>i.J6,ColorPickerView:()=>i.J2,ColorTileView:()=>i._9,ComponentFactory:()=>i._Y,ContextualBalloon:()=>i.WB,CssTransitionDisablerMixin:()=>i.RX,DropdownButtonView:()=>i.J0,DropdownPanelView:()=>i.G2,DropdownView:()=>i._n,EditorUI:()=>i.S8,EditorUIView:()=>i.fF,FocusCycler:()=>i.I0,FormHeaderView:()=>i.Gp,IconView:()=>i.mO,IframeView:()=>i.VY,InlineEditableUIView:()=>i.r1,InputNumberView:()=>i.Xs,InputTextView:()=>i.pq,InputView:()=>i.Em,LabelView:()=>i.Dn,LabeledFieldView:()=>i.KP,ListItemView:()=>i.dn,ListView:()=>i.Bv,Model:()=>i.Hn,Notification:()=>i.P_,SplitButtonView:()=>i.Rm,StickyPanelView:()=>i.lp,SwitchButtonView:()=>i.BM,Template:()=>i.YS,ToolbarSeparatorView:()=>i.$y,ToolbarView:()=>i.jB,TooltipManager:()=>i.gE,View:()=>i.G7,ViewCollection:()=>i.vX,addKeyboardHandlingForGrid:()=>i.IJ,addListToDropdown:()=>i.Pm,addToolbarToDropdown:()=>i.up,clickOutsideHandler:()=>i.eC,createDropdown:()=>i.t9,createLabeledDropdown:()=>i.FH,createLabeledInputNumber:()=>i.sh,createLabeledInputText:()=>i.R,focusChildOnDropdownOpen:()=>i.Mh,getLocalizedColorOptions:()=>i.k6,icons:()=>i.ci,injectCssTransitionDisabler:()=>i.fe,normalizeColorOptions:()=>i.S1,normalizeSingleColorDefinition:()=>i.jY,normalizeToolbarConfig:()=>i.iw,submitHandler:()=>i.GI});var i=o("./packages/ckeditor5-ui/src/index.ts")},"./src/undo.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Undo:()=>k,UndoEditing:()=>g,UndoUI:()=>w});var i=o("./packages/ckeditor5-core/src/index.ts"),s=o("./packages/ckeditor5-engine/src/index.ts"),n=Object.defineProperty,r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,l=(e,t,o)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class d extends i.mY{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(e.data,"set",((e,t)=>{t[1]=((e,t)=>{for(var o in t||(t={}))a.call(t,o)&&l(e,o,t[o]);if(r)for(var o of r(t))c.call(t,o)&&l(e,o,t[o]);return e})({},t[1]);const o=t[1];o.batchType||(o.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(e.data,"set",((e,t)=>{t[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(e){const t=this.editor.model.document.selection,o={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:o}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,o){const i=this.editor.model,s=i.document,n=[],r=e.map((e=>e.getTransformedByOperations(o))),a=r.flat();for(const e of r){const t=e.filter((e=>e.root!=s.graveyard)).filter((e=>!u(e,a)));t.length&&(h(t),n.push(t[0]))}n.length&&i.change((e=>{e.setSelection(n,{backward:t})}))}_undo(e,t){const o=this.editor.model,i=o.document;this._createdBatches.add(t);const n=e.operations.slice().filter((e=>e.isDocumentOperation));n.reverse();for(const e of n){const n=e.baseVersion+1,r=Array.from(i.history.getOperations(n)),a=(0,s.Rf)([e.getReversed()],r,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(let n of a){const r=n.affectedSelectable;r&&!o.canEditAt(r)&&(n=new s.Pk(n.baseVersion)),t.addOperation(n),o.applyOperation(n),i.history.setOperationAsUndone(e,n)}}}}function h(e){e.sort(((e,t)=>e.start.isBefore(t.start)?-1:1));for(let t=1;t<e.length;t++){const o=e[t-1].getJoined(e[t],!0);o&&(t--,e.splice(t,2,o))}}function u(e,t){return t.some((t=>t!==e&&t.containsRange(e,!0)))}class p extends d{execute(e=null){const t=e?this._stack.findIndex((t=>t.batch==e)):this._stack.length-1,o=this._stack.splice(t,1)[0],i=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(i,(()=>{this._undo(o.batch,i);const e=this.editor.model.document.history.getOperations(o.batch.baseVersion);this._restoreSelection(o.selection.ranges,o.selection.isBackward,e),this.fire("revert",o.batch,i)})),this.refresh()}}class f extends d{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,(()=>{const o=e.batch.operations[e.batch.operations.length-1].baseVersion+1,i=this.editor.model.document.history.getOperations(o);this._restoreSelection(e.selection.ranges,e.selection.isBackward,i),this._undo(e.batch,t)})),this.refresh()}}class g extends i.Sy{constructor(){super(...arguments),this._batchRegistry=new WeakSet}static get pluginName(){return"UndoEditing"}init(){const e=this.editor;this._undoCommand=new p(e),this._redoCommand=new f(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",((e,t)=>{const o=t[0];if(!o.isDocumentOperation)return;const i=o.batch,s=this._redoCommand.createdBatches.has(i),n=this._undoCommand.createdBatches.has(i);this._batchRegistry.has(i)||(this._batchRegistry.add(i),i.isUndoable&&(s?this._undoCommand.addBatch(i):n||(this._undoCommand.addBatch(i),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((e,t,o)=>{this._redoCommand.addBatch(o)})),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo")}}var m=o("./packages/ckeditor5-ui/src/index.ts");const b='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z"/></svg>',_='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z"/></svg>';class w extends i.Sy{static get pluginName(){return"UndoUI"}init(){const e=this.editor,t=e.locale,o=e.t,i="ltr"==t.uiLanguageDirection?b:_,s="ltr"==t.uiLanguageDirection?_:b;this._addButton("undo",o("Undo"),"CTRL+Z",i),this._addButton("redo",o("Redo"),"CTRL+Y",s)}_addButton(e,t,o,i){const s=this.editor;s.ui.componentFactory.add(e,(n=>{const r=s.commands.get(e),a=new m.r5(n);return a.set({label:t,icon:i,keystroke:o,tooltip:!0}),a.bind("isEnabled").to(r,"isEnabled"),this.listenTo(a,"execute",(()=>{s.execute(e),s.editing.view.focus()})),a}))}}class k extends i.Sy{static get requires(){return[g,w]}static get pluginName(){return"Undo"}}},"./src/upload.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Base64UploadAdapter:()=>h,FileDialogButtonView:()=>l,FileRepository:()=>r,SimpleUploadAdapter:()=>k});var i=o("./packages/ckeditor5-core/src/index.ts"),s=o("./packages/ckeditor5-utils/src/index.ts");class n extends((0,s.Re)()){constructor(){super();const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise(((o,i)=>{t.onload=()=>{const e=t.result;this._data=e,o(e)},t.onerror=()=>{i("error")},t.onabort=()=>{i("aborted")},this._reader.readAsDataURL(e)}))}abort(){this._reader.abort()}}class r extends i.Sy{constructor(){super(...arguments),this.loaders=new s.FE,this._loadersMap=new Map,this._pendingAction=null}static get pluginName(){return"FileRepository"}static get requires(){return[i.lR]}init(){this.loaders.on("change",(()=>this._updatePendingAction())),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0))}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return(0,s.KE)("filerepository-no-upload-adapter"),null;const t=new a(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then((e=>{this._loadersMap.set(e,t)})).catch((()=>{})),t.on("change:uploaded",(()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e})),t.on("change:uploadTotal",(()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e})),t}destroyLoader(e){const t=e instanceof a?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach(((e,o)=>{e===t&&this._loadersMap.delete(o)}))}_updatePendingAction(){const e=this.editor.plugins.get(i.lR);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,o=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(o(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",o)}}else e.remove(this._pendingAction),this._pendingAction=null}}class a extends((0,s.Re)()){constructor(e,t){super(),this.id=(0,s.hQ)(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new n,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((e=>this._filePromiseWrapper?e:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new s.Bb("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((e=>this._reader.read(e))).then((e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e})).catch((e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e}))}upload(){if("idle"!=this.status)throw new s.Bb("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((e=>(this.uploadResponse=e,this.status="idle",e))).catch((e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e}))}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch((()=>{})),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise(((o,i)=>{t.rejecter=i,t.isFulfilled=!1,e.then((e=>{t.isFulfilled=!0,o(e)})).catch((e=>{t.isFulfilled=!0,i(e)}))})),t}}var c=o("./packages/ckeditor5-ui/src/index.ts");class l extends c.G7{constructor(e){super(e),this.buttonView=new c.r5(e),this._fileInputView=new d(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on("execute",(()=>{this._fileInputView.open()}))}focus(){this.buttonView.focus()}}class d extends c.G7{constructor(e){super(e),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}class h extends i.Sy{static get requires(){return[r]}static get pluginName(){return"Base64UploadAdapter"}init(){this.editor.plugins.get(r).createUploadAdapter=e=>new u(e)}}class u{constructor(e){this.loader=e}upload(){return new Promise(((e,t)=>{const o=this.reader=new window.FileReader;o.addEventListener("load",(()=>{e({default:o.result})})),o.addEventListener("error",(e=>{t(e)})),o.addEventListener("abort",(()=>{t()})),this.loader.file.then((e=>{o.readAsDataURL(e)}))}))}abort(){this.reader.abort()}}var p=Object.defineProperty,f=Object.defineProperties,g=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,w=(e,t,o)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;class k extends i.Sy{static get requires(){return[r]}static get pluginName(){return"SimpleUploadAdapter"}init(){const e=this.editor.config.get("simpleUpload");e&&(e.uploadUrl?this.editor.plugins.get(r).createUploadAdapter=t=>new v(t,e):(0,s.KE)("simple-upload-adapter-missing-uploadurl"))}}class v{constructor(e,t){this.loader=e,this.options=t}upload(){return this.loader.file.then((e=>new Promise(((t,o)=>{this._initRequest(),this._initListeners(t,o,e),this._sendRequest(e)}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.options.uploadUrl,!0),e.responseType="json"}_initListeners(e,t,o){const i=this.xhr,s=this.loader,n=`Couldn't upload file: ${o.name}.`;i.addEventListener("error",(()=>t(n))),i.addEventListener("abort",(()=>t())),i.addEventListener("load",(()=>{const o=i.response;if(!o||o.error)return t(o&&o.error&&o.error.message?o.error.message:n);const s=o.url?{default:o.url}:o.urls;var r;e((r=((e,t)=>{for(var o in t||(t={}))b.call(t,o)&&w(e,o,t[o]);if(m)for(var o of m(t))_.call(t,o)&&w(e,o,t[o]);return e})({},o),f(r,g({urls:s}))))})),i.upload&&i.upload.addEventListener("progress",(e=>{e.lengthComputable&&(s.uploadTotal=e.total,s.uploaded=e.loaded)}))}_sendRequest(e){const t=this.options.headers||{},o=this.options.withCredentials||!1;for(const e of Object.keys(t))this.xhr.setRequestHeader(e,t[e]);this.xhr.withCredentials=o;const i=new FormData;i.append("upload",e),this.xhr.send(i)}}},"./src/utils.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{CKEditorError:()=>i.Bb,Collection:()=>i.FE,Config:()=>i.De,DomEmitterMixin:()=>i.Xu,ElementReplacer:()=>i.a6,EmitterMixin:()=>i.ln,EventInfo:()=>i.M3,FocusTracker:()=>i.Rh,KeystrokeHandler:()=>i.VD,Locale:()=>i.go,ObservableMixin:()=>i.Re,Rect:()=>i.UL,ResizeObserver:()=>i.do,compareArrays:()=>i.Rt,count:()=>i.QX,createElement:()=>i.az,delay:()=>i.gw,diff:()=>i.Hg,diffToChanges:()=>i.Pk,env:()=>i.OB,fastDiff:()=>i.HZ,findClosestScrollableAncestor:()=>i.wm,first:()=>i.Ps,getAncestors:()=>i.dk,getCode:()=>i.Cq,getDataFromElement:()=>i.yy,getEnvKeystrokeText:()=>i.XU,getLanguageDirection:()=>i.j9,getLocalizedArrowKeyCodeDirection:()=>i.mA,getOptimalPosition:()=>i.xZ,global:()=>i.global,indexOf:()=>i.cq,insertAt:()=>i.ZQ,insertToPriorityArray:()=>i.VG,isArrowKeyCode:()=>i.dj,isCombiningMark:()=>i.tO,isComment:()=>i.C3,isForwardArrowKeyCode:()=>i.Zt,isHighSurrogateHalf:()=>i.Cb,isInsideCombinedSymbol:()=>i.pp,isInsideEmojiSequence:()=>i.YK,isInsideSurrogatePair:()=>i.to,isIterable:()=>i.TW,isLowSurrogateHalf:()=>i.nA,isNode:()=>i.UG,isRange:()=>i.bR,isText:()=>i.Gs,isValidAttributeName:()=>i.$b,isVisible:()=>i.pn,keyCodes:()=>i.Do,logError:()=>i.H,logWarning:()=>i.KE,mix:()=>i.CD,parseKeystroke:()=>i.Zz,priorities:()=>i.tA,releaseDate:()=>i.Dm,remove:()=>i.Od,scrollAncestorsToShowTarget:()=>i.F0,scrollViewportToShowTarget:()=>i.mR,setDataInElement:()=>i.jS,spliceArray:()=>i.x,toArray:()=>i.qo,toMap:()=>i.qL,toUnit:()=>i.nn,uid:()=>i.hQ,verifyLicense:()=>i.Tx,version:()=>i.i8});var i=o("./packages/ckeditor5-utils/src/index.ts")},"./src/watchdog.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{ContextWatchdog:()=>u,EditorWatchdog:()=>d,Watchdog:()=>i});class i{constructor(e){if(this.crashes=[],this.state="initializing",this._now=Date.now,this.crashes=[],this._crashNumberLimit="number"==typeof e.crashNumberLimit?e.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof e.minimumNonErrorTimePeriod?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=e=>{const t="error"in e?e.error:e.reason;t instanceof Error&&this._handleError(t,e)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]=this._listeners[e].filter((e=>e!==t))}_fire(e,...t){const o=this._listeners[e]||[];for(const e of o)e.apply(this,[null,...t])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,t){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:t instanceof ErrorEvent?t.filename:void 0,lineno:t instanceof ErrorEvent?t.lineno:void 0,colno:t instanceof ErrorEvent?t.colno:void 0,date:this._now()});const o=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:o}),o?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&void 0!==e.context&&null!==e.context&&"ready"===this.state&&this._isErrorComingFromThisItem(e)}_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;return(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function s(e,t=new Set){const o=[e],i=new Set;let s=0;for(;o.length>s;){const e=o[s++];if(!i.has(e)&&n(e)&&!t.has(e))if(i.add(e),Symbol.iterator in e)try{for(const t of e)o.push(t)}catch(e){}else for(const t in e)"defaultValue"!==t&&o.push(e[t])}return i}function n(e){const t=Object.prototype.toString.call(e),o=typeof e;return!("number"===o||"boolean"===o||"string"===o||"symbol"===o||"function"===o||"[object Date]"===t||"[object RegExp]"===t||"[object Module]"===t||null==e||e._watchdogExcluded||e instanceof EventTarget||e instanceof Event)}function r(e,t,o=new Set){if(e===t&&("object"==typeof(i=e)&&null!==i))return!0;var i;const n=s(e,o),r=s(t,o);for(const e of n)if(r.has(e))return!0;return!1}var a=o("./node_modules/lodash-es/throttle.js"),c=o("./node_modules/lodash-es/cloneDeepWith.js"),l=o("./node_modules/lodash-es/isElement.js");class d extends i{constructor(e,t={}){super(t),this._editor=null,this._throttledSave=(0,a.Z)(this._save.bind(this),"number"==typeof t.saveInterval?t.saveInterval:5e3),e&&(this._creator=(t,o)=>e.create(t,o)),this._destructor=e=>e.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((e=>{console.error("An error happened during the editor destroying.",e)})).then((()=>{if("string"==typeof this._elementOrData)return this.create(this._data,this._config,this._config.context);{const e=Object.assign({},this._config,{initialData:this._data});return this.create(this._elementOrData,e,e.context)}})).then((()=>{this._fire("restart")}))}create(e=this._elementOrData,t=this._config,o){return Promise.resolve().then((()=>(super._startErrorHandling(),this._elementOrData=e,this._config=this._cloneEditorConfiguration(t)||{},this._config.context=o,this._creator(e,this._config)))).then((e=>{this._editor=e,e.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=e.model.document.version,this._data=this._getData(),this.state="ready",this._fire("stateChange")}))}destroy(){return Promise.resolve().then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.flush();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)}))}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._lastDocumentVersion=e}catch(e){console.error(e,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e={};for(const t of this._editor.model.document.getRootNames())e[t]=this._editor.data.get({rootName:t});return e}_isErrorComingFromThisItem(e){return r(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return(0,c.Z)(e,((e,t)=>(0,l.Z)(e)||"context"===t?e:void 0))}}const h=Symbol("MainQueueId");class u extends i{constructor(e,t={}){super(t),this._watchdogs=new Map,this._context=null,this._contextProps=new Set,this._actionQueues=new p,this._watchdogConfig=t,this._creator=t=>e.create(t),this._destructor=e=>e.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}get context(){return this._context}create(e={}){return this._actionQueues.enqueue(h,(()=>(this._contextConfig=e,this._create())))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const t=f(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e.id,(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let t;if(this._watchdogs.has(e.id))throw new Error(`Item with the given id is already added: '${e.id}'.`);if("editor"===e.type)return t=new d(null,this._watchdogConfig),t.setCreator(e.creator),t._setExcludedProperties(this._contextProps),e.destructor&&t.setDestructor(e.destructor),this._watchdogs.set(e.id,t),t.on("error",((o,{error:i,causesRestart:s})=>{this._fire("itemError",{itemId:e.id,error:i}),s&&this._actionQueues.enqueue(e.id,(()=>new Promise((o=>{const i=()=>{t.off("restart",i),this._fire("itemRestart",{itemId:e.id}),o()};t.on("restart",i)}))))})),t.create(e.sourceElementOrData,e.config,this._context);throw new Error(`Not supported item type: '${e.type}'.`)})))))}remove(e){const t=f(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e,(()=>{const t=this._getWatchdog(e);return this._watchdogs.delete(e),t.destroy()})))))}destroy(){return this._actionQueues.enqueue(h,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue(h,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((e=>{console.error("An error happened during destroying the context or items.",e)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((e=>(this._context=e,this._contextProps=s(this._context),Promise.all(Array.from(this._watchdogs.values()).map((e=>(e._setExcludedProperties(this._contextProps),e.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((e=>e.destroy()))).then((()=>this._destructor(e)))}))}_getWatchdog(e){const t=this._watchdogs.get(e);if(!t)throw new Error(`Item with the given id was not registered: ${e}.`);return t}_isErrorComingFromThisItem(e){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(e))return!1;return r(this._context,e.context)}}class p{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._activeActions=0}onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,t){const o=e===h;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const i=(o?Promise.all(this._queues.values()):Promise.all([this._queues.get(h),this._queues.get(e)])).then(t),s=i.catch((()=>{}));return this._queues.set(e,s),i.finally((()=>{this._activeActions--,this._queues.get(e)===s&&0===this._activeActions&&this._onEmptyCallbacks.forEach((e=>e()))}))}}function f(e){return Array.isArray(e)?e:[e]}},"./src/widget.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{WIDGET_CLASS_NAME:()=>i.s4,WIDGET_SELECTED_CLASS_NAME:()=>i.Uo,Widget:()=>i.$L,WidgetResize:()=>i.WR,WidgetToolbarRepository:()=>i.e8,WidgetTypeAround:()=>i.Ww,findOptimalInsertionRange:()=>i.KT,getLabel:()=>i.id,isWidget:()=>i.Qd,setHighlightHandling:()=>i.em,setLabel:()=>i.l6,toWidget:()=>i.XC,toWidgetEditable:()=>i.sC,viewToModelPositionOutsideModelElement:()=>i.$n});var i=o("./packages/ckeditor5-widget/src/index.ts")},"?7cdd":(e,t,o)=>{e.exports=o},"./node_modules/lodash-es/_ListCache.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>u});const i=function(){this.__data__=[],this.size=0};var s=o("./node_modules/lodash-es/eq.js");const n=function(e,t){for(var o=e.length;o--;)if((0,s.Z)(e[o][0],t))return o;return-1};var r=Array.prototype.splice;const a=function(e){var t=this.__data__,o=n(t,e);return!(o<0)&&(o==t.length-1?t.pop():r.call(t,o,1),--this.size,!0)};const c=function(e){var t=this.__data__,o=n(t,e);return o<0?void 0:t[o][1]};const l=function(e){return n(this.__data__,e)>-1};const d=function(e,t){var o=this.__data__,i=n(o,e);return i<0?(++this.size,o.push([e,t])):o[i][1]=t,this};function h(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var i=e[t];this.set(i[0],i[1])}}h.prototype.clear=i,h.prototype.delete=a,h.prototype.get=c,h.prototype.has=l,h.prototype.set=d;const u=h},"./node_modules/lodash-es/_Map.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/_getNative.js"),s=o("./node_modules/lodash-es/_root.js");const n=(0,i.Z)(s.Z,"Map")},"./node_modules/lodash-es/_MapCache.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>x});const i=(0,o("./node_modules/lodash-es/_getNative.js").Z)(Object,"create");const s=function(){this.__data__=i?i(null):{},this.size=0};const n=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var r=Object.prototype.hasOwnProperty;const a=function(e){var t=this.__data__;if(i){var o=t[e];return"__lodash_hash_undefined__"===o?void 0:o}return r.call(t,e)?t[e]:void 0};var c=Object.prototype.hasOwnProperty;const l=function(e){var t=this.__data__;return i?void 0!==t[e]:c.call(t,e)};const d=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this};function h(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var i=e[t];this.set(i[0],i[1])}}h.prototype.clear=s,h.prototype.delete=n,h.prototype.get=a,h.prototype.has=l,h.prototype.set=d;const u=h;var p=o("./node_modules/lodash-es/_ListCache.js"),f=o("./node_modules/lodash-es/_Map.js");const g=function(){this.size=0,this.__data__={hash:new u,map:new(f.Z||p.Z),string:new u}};const m=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const b=function(e,t){var o=e.__data__;return m(t)?o["string"==typeof t?"string":"hash"]:o.map};const _=function(e){var t=b(this,e).delete(e);return this.size-=t?1:0,t};const w=function(e){return b(this,e).get(e)};const k=function(e){return b(this,e).has(e)};const v=function(e,t){var o=b(this,e),i=o.size;return o.set(e,t),this.size+=o.size==i?0:1,this};function y(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var i=e[t];this.set(i[0],i[1])}}y.prototype.clear=g,y.prototype.delete=_,y.prototype.get=w,y.prototype.has=k,y.prototype.set=v;const x=y},"./node_modules/lodash-es/_Stack.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>u});var i=o("./node_modules/lodash-es/_ListCache.js");const s=function(){this.__data__=new i.Z,this.size=0};const n=function(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o};const r=function(e){return this.__data__.get(e)};const a=function(e){return this.__data__.has(e)};var c=o("./node_modules/lodash-es/_Map.js"),l=o("./node_modules/lodash-es/_MapCache.js");const d=function(e,t){var o=this.__data__;if(o instanceof i.Z){var s=o.__data__;if(!c.Z||s.length<199)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new l.Z(s)}return o.set(e,t),this.size=o.size,this};function h(e){var t=this.__data__=new i.Z(e);this.size=t.size}h.prototype.clear=s,h.prototype.delete=n,h.prototype.get=r,h.prototype.has=a,h.prototype.set=d;const u=h},"./node_modules/lodash-es/_Symbol.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=o("./node_modules/lodash-es/_root.js").Z.Symbol},"./node_modules/lodash-es/_Uint8Array.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=o("./node_modules/lodash-es/_root.js").Z.Uint8Array},"./node_modules/lodash-es/_arrayLikeKeys.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>d});const i=function(e,t){for(var o=-1,i=Array(e);++o<e;)i[o]=t(o);return i};var s=o("./node_modules/lodash-es/isArguments.js"),n=o("./node_modules/lodash-es/isArray.js"),r=o("./node_modules/lodash-es/isBuffer.js"),a=o("./node_modules/lodash-es/_isIndex.js"),c=o("./node_modules/lodash-es/isTypedArray.js"),l=Object.prototype.hasOwnProperty;const d=function(e,t){var o=(0,n.Z)(e),d=!o&&(0,s.Z)(e),h=!o&&!d&&(0,r.Z)(e),u=!o&&!d&&!h&&(0,c.Z)(e),p=o||d||h||u,f=p?i(e.length,String):[],g=f.length;for(var m in e)!t&&!l.call(e,m)||p&&("length"==m||h&&("offset"==m||"parent"==m)||u&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||(0,a.Z)(m,g))||f.push(m);return f}},"./node_modules/lodash-es/_arrayPush.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e,t){for(var o=-1,i=t.length,s=e.length;++o<i;)e[s+o]=t[o];return e}},"./node_modules/lodash-es/_assignValue.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>r});var i=o("./node_modules/lodash-es/_baseAssignValue.js"),s=o("./node_modules/lodash-es/eq.js"),n=Object.prototype.hasOwnProperty;const r=function(e,t,o){var r=e[t];n.call(e,t)&&(0,s.Z)(r,o)&&(void 0!==o||t in e)||(0,i.Z)(e,t,o)}},"./node_modules/lodash-es/_baseAssignValue.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=o("./node_modules/lodash-es/_defineProperty.js");const s=function(e,t,o){"__proto__"==t&&i.Z?(0,i.Z)(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}},"./node_modules/lodash-es/_baseClone.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>Q});var i=o("./node_modules/lodash-es/_Stack.js");const s=function(e,t){for(var o=-1,i=null==e?0:e.length;++o<i&&!1!==t(e[o],o,e););return e};var n=o("./node_modules/lodash-es/_assignValue.js"),r=o("./node_modules/lodash-es/_copyObject.js"),a=o("./node_modules/lodash-es/keys.js");const c=function(e,t){return e&&(0,r.Z)(t,(0,a.Z)(t),e)};var l=o("./node_modules/lodash-es/keysIn.js");const d=function(e,t){return e&&(0,r.Z)(t,(0,l.Z)(t),e)};var h=o("./node_modules/lodash-es/_cloneBuffer.js"),u=o("./node_modules/lodash-es/_copyArray.js"),p=o("./node_modules/lodash-es/_getSymbols.js");const f=function(e,t){return(0,r.Z)(e,(0,p.Z)(e),t)};var g=o("./node_modules/lodash-es/_arrayPush.js"),m=o("./node_modules/lodash-es/_getPrototype.js"),b=o("./node_modules/lodash-es/stubArray.js");const _=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,g.Z)(t,(0,p.Z)(e)),e=(0,m.Z)(e);return t}:b.Z;const w=function(e,t){return(0,r.Z)(e,_(e),t)};var k=o("./node_modules/lodash-es/_getAllKeys.js"),v=o("./node_modules/lodash-es/_baseGetAllKeys.js");const y=function(e){return(0,v.Z)(e,l.Z,_)};var x=o("./node_modules/lodash-es/_getTag.js"),P=Object.prototype.hasOwnProperty;const E=function(e){var t=e.length,o=new e.constructor(t);return t&&"string"==typeof e[0]&&P.call(e,"index")&&(o.index=e.index,o.input=e.input),o};var T=o("./node_modules/lodash-es/_cloneArrayBuffer.js");const A=function(e,t){var o=t?(0,T.Z)(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)};var C=/\w*$/;const S=function(e){var t=new e.constructor(e.source,C.exec(e));return t.lastIndex=e.lastIndex,t};var O=o("./node_modules/lodash-es/_Symbol.js"),R=O.Z?O.Z.prototype:void 0,M=R?R.valueOf:void 0;const j=function(e){return M?Object(M.call(e)):{}};var B=o("./node_modules/lodash-es/_cloneTypedArray.js");const D=function(e,t,o){var i=e.constructor;switch(t){case"[object ArrayBuffer]":return(0,T.Z)(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return A(e,o);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,B.Z)(e,o);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return S(e);case"[object Symbol]":return j(e)}};var V=o("./node_modules/lodash-es/_initCloneObject.js"),I=o("./node_modules/lodash-es/isArray.js"),N=o("./node_modules/lodash-es/isBuffer.js"),z=o("./node_modules/lodash-es/isObjectLike.js");const F=function(e){return(0,z.Z)(e)&&"[object Map]"==(0,x.Z)(e)};var L=o("./node_modules/lodash-es/_baseUnary.js"),Z=o("./node_modules/lodash-es/_nodeUtil.js"),W=Z.Z&&Z.Z.isMap;const $=W?(0,L.Z)(W):F;var q=o("./node_modules/lodash-es/isObject.js");const H=function(e){return(0,z.Z)(e)&&"[object Set]"==(0,x.Z)(e)};var U=Z.Z&&Z.Z.isSet;const K=U?(0,L.Z)(U):H;var G="[object Arguments]",J="[object Function]",Y="[object Object]",X={};X[G]=X["[object Array]"]=X["[object ArrayBuffer]"]=X["[object DataView]"]=X["[object Boolean]"]=X["[object Date]"]=X["[object Float32Array]"]=X["[object Float64Array]"]=X["[object Int8Array]"]=X["[object Int16Array]"]=X["[object Int32Array]"]=X["[object Map]"]=X["[object Number]"]=X[Y]=X["[object RegExp]"]=X["[object Set]"]=X["[object String]"]=X["[object Symbol]"]=X["[object Uint8Array]"]=X["[object Uint8ClampedArray]"]=X["[object Uint16Array]"]=X["[object Uint32Array]"]=!0,X["[object Error]"]=X[J]=X["[object WeakMap]"]=!1;const Q=function e(t,o,r,p,g,m){var b,_=1&o,v=2&o,P=4&o;if(r&&(b=g?r(t,p,g,m):r(t)),void 0!==b)return b;if(!(0,q.Z)(t))return t;var T=(0,I.Z)(t);if(T){if(b=E(t),!_)return(0,u.Z)(t,b)}else{var A=(0,x.Z)(t),C=A==J||"[object GeneratorFunction]"==A;if((0,N.Z)(t))return(0,h.Z)(t,_);if(A==Y||A==G||C&&!g){if(b=v||C?{}:(0,V.Z)(t),!_)return v?w(t,d(b,t)):f(t,c(b,t))}else{if(!X[A])return g?t:{};b=D(t,A,_)}}m||(m=new i.Z);var S=m.get(t);if(S)return S;m.set(t,b),K(t)?t.forEach((function(i){b.add(e(i,o,r,i,t,m))})):$(t)&&t.forEach((function(i,s){b.set(s,e(i,o,r,s,t,m))}));var O=P?v?y:k.Z:v?l.Z:a.Z,R=T?void 0:O(t);return s(R||t,(function(i,s){R&&(i=t[s=i]),(0,n.Z)(b,s,e(i,o,r,s,t,m))})),b}},"./node_modules/lodash-es/_baseGetAllKeys.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/_arrayPush.js"),s=o("./node_modules/lodash-es/isArray.js");const n=function(e,t,o){var n=t(e);return(0,s.Z)(e)?n:(0,i.Z)(n,o(e))}},"./node_modules/lodash-es/_baseGetTag.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>u});var i=o("./node_modules/lodash-es/_Symbol.js"),s=Object.prototype,n=s.hasOwnProperty,r=s.toString,a=i.Z?i.Z.toStringTag:void 0;const c=function(e){var t=n.call(e,a),o=e[a];try{e[a]=void 0;var i=!0}catch(e){}var s=r.call(e);return i&&(t?e[a]=o:delete e[a]),s};var l=Object.prototype.toString;const d=function(e){return l.call(e)};var h=i.Z?i.Z.toStringTag:void 0;const u=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?c(e):d(e)}},"./node_modules/lodash-es/_baseUnary.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e){return function(t){return e(t)}}},"./node_modules/lodash-es/_cloneArrayBuffer.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=o("./node_modules/lodash-es/_Uint8Array.js");const s=function(e){var t=new e.constructor(e.byteLength);return new i.Z(t).set(new i.Z(e)),t}},"./node_modules/lodash-es/_cloneBuffer.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>c});var i=o("./node_modules/lodash-es/_root.js"),s="object"==typeof exports&&exports&&!exports.nodeType&&exports,n=s&&"object"==typeof module&&module&&!module.nodeType&&module,r=n&&n.exports===s?i.Z.Buffer:void 0,a=r?r.allocUnsafe:void 0;const c=function(e,t){if(t)return e.slice();var o=e.length,i=a?a(o):new e.constructor(o);return e.copy(i),i}},"./node_modules/lodash-es/_cloneTypedArray.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=o("./node_modules/lodash-es/_cloneArrayBuffer.js");const s=function(e,t){var o=t?(0,i.Z)(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}},"./node_modules/lodash-es/_copyArray.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e,t){var o=-1,i=e.length;for(t||(t=Array(i));++o<i;)t[o]=e[o];return t}},"./node_modules/lodash-es/_copyObject.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/_assignValue.js"),s=o("./node_modules/lodash-es/_baseAssignValue.js");const n=function(e,t,o,n){var r=!o;o||(o={});for(var a=-1,c=t.length;++a<c;){var l=t[a],d=n?n(o[l],e[l],l,o,e):void 0;void 0===d&&(d=e[l]),r?(0,s.Z)(o,l,d):(0,i.Z)(o,l,d)}return o}},"./node_modules/lodash-es/_createAssigner.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>_});const i=function(e){return e};const s=function(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)};var n=Math.max;const r=function(e,t,o){return t=n(void 0===t?e.length-1:t,0),function(){for(var i=arguments,r=-1,a=n(i.length-t,0),c=Array(a);++r<a;)c[r]=i[t+r];r=-1;for(var l=Array(t+1);++r<t;)l[r]=i[r];return l[t]=o(c),s(e,this,l)}};const a=function(e){return function(){return e}};var c=o("./node_modules/lodash-es/_defineProperty.js");const l=c.Z?function(e,t){return(0,c.Z)(e,"toString",{configurable:!0,enumerable:!1,value:a(t),writable:!0})}:i;var d=Date.now;const h=function(e){var t=0,o=0;return function(){var i=d(),s=16-(i-o);if(o=i,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(l);const u=function(e,t){return h(r(e,t,i),e+"")};var p=o("./node_modules/lodash-es/eq.js"),f=o("./node_modules/lodash-es/isArrayLike.js"),g=o("./node_modules/lodash-es/_isIndex.js"),m=o("./node_modules/lodash-es/isObject.js");const b=function(e,t,o){if(!(0,m.Z)(o))return!1;var i=typeof t;return!!("number"==i?(0,f.Z)(o)&&(0,g.Z)(t,o.length):"string"==i&&t in o)&&(0,p.Z)(o[t],e)};const _=function(e){return u((function(t,o){var i=-1,s=o.length,n=s>1?o[s-1]:void 0,r=s>2?o[2]:void 0;for(n=e.length>3&&"function"==typeof n?(s--,n):void 0,r&&b(o[0],o[1],r)&&(n=s<3?void 0:n,s=1),t=Object(t);++i<s;){var a=o[i];a&&e(t,a,i,n)}return t}))}},"./node_modules/lodash-es/_defineProperty.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=o("./node_modules/lodash-es/_getNative.js");const s=function(){try{var e=(0,i.Z)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},"./node_modules/lodash-es/_freeGlobal.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i="object"==typeof global&&global&&global.Object===Object&&global},"./node_modules/lodash-es/_getAllKeys.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>r});var i=o("./node_modules/lodash-es/_baseGetAllKeys.js"),s=o("./node_modules/lodash-es/_getSymbols.js"),n=o("./node_modules/lodash-es/keys.js");const r=function(e){return(0,i.Z)(e,n.Z,s.Z)}},"./node_modules/lodash-es/_getNative.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>_});var i=o("./node_modules/lodash-es/isFunction.js");const s=o("./node_modules/lodash-es/_root.js").Z["__core-js_shared__"];var n,r=(n=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";const a=function(e){return!!r&&r in e};var c=o("./node_modules/lodash-es/isObject.js"),l=o("./node_modules/lodash-es/_toSource.js"),d=/^\[object .+?Constructor\]$/,h=Function.prototype,u=Object.prototype,p=h.toString,f=u.hasOwnProperty,g=RegExp("^"+p.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const m=function(e){return!(!(0,c.Z)(e)||a(e))&&((0,i.Z)(e)?g:d).test((0,l.Z)(e))};const b=function(e,t){return null==e?void 0:e[t]};const _=function(e,t){var o=b(e,t);return m(o)?o:void 0}},"./node_modules/lodash-es/_getPrototype.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=(0,o("./node_modules/lodash-es/_overArg.js").Z)(Object.getPrototypeOf,Object)},"./node_modules/lodash-es/_getSymbols.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});const i=function(e,t){for(var o=-1,i=null==e?0:e.length,s=0,n=[];++o<i;){var r=e[o];t(r,o,e)&&(n[s++]=r)}return n};var s=o("./node_modules/lodash-es/stubArray.js"),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;const a=r?function(e){return null==e?[]:(e=Object(e),i(r(e),(function(t){return n.call(e,t)})))}:s.Z},"./node_modules/lodash-es/_getTag.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>x});var i=o("./node_modules/lodash-es/_getNative.js"),s=o("./node_modules/lodash-es/_root.js");const n=(0,i.Z)(s.Z,"DataView");var r=o("./node_modules/lodash-es/_Map.js");const a=(0,i.Z)(s.Z,"Promise");const c=(0,i.Z)(s.Z,"Set");const l=(0,i.Z)(s.Z,"WeakMap");var d=o("./node_modules/lodash-es/_baseGetTag.js"),h=o("./node_modules/lodash-es/_toSource.js"),u="[object Map]",p="[object Promise]",f="[object Set]",g="[object WeakMap]",m="[object DataView]",b=(0,h.Z)(n),_=(0,h.Z)(r.Z),w=(0,h.Z)(a),k=(0,h.Z)(c),v=(0,h.Z)(l),y=d.Z;(n&&y(new n(new ArrayBuffer(1)))!=m||r.Z&&y(new r.Z)!=u||a&&y(a.resolve())!=p||c&&y(new c)!=f||l&&y(new l)!=g)&&(y=function(e){var t=(0,d.Z)(e),o="[object Object]"==t?e.constructor:void 0,i=o?(0,h.Z)(o):"";if(i)switch(i){case b:return m;case _:return u;case w:return p;case k:return f;case v:return g}return t});const x=y},"./node_modules/lodash-es/_initCloneObject.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>c});var i=o("./node_modules/lodash-es/isObject.js"),s=Object.create;const n=function(){function e(){}return function(t){if(!(0,i.Z)(t))return{};if(s)return s(t);e.prototype=t;var o=new e;return e.prototype=void 0,o}}();var r=o("./node_modules/lodash-es/_getPrototype.js"),a=o("./node_modules/lodash-es/_isPrototype.js");const c=function(e){return"function"!=typeof e.constructor||(0,a.Z)(e)?{}:n((0,r.Z)(e))}},"./node_modules/lodash-es/_isIndex.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=/^(?:0|[1-9]\d*)$/;const s=function(e,t){var o=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&i.test(e))&&e>-1&&e%1==0&&e<t}},"./node_modules/lodash-es/_isPrototype.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=Object.prototype;const s=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||i)}},"./node_modules/lodash-es/_nodeUtil.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var i=o("./node_modules/lodash-es/_freeGlobal.js"),s="object"==typeof exports&&exports&&!exports.nodeType&&exports,n=s&&"object"==typeof module&&module&&!module.nodeType&&module,r=n&&n.exports===s&&i.Z.process;const a=function(){try{var e=n&&n.require&&n.require("util").types;return e||r&&r.binding&&r.binding("util")}catch(e){}}()},"./node_modules/lodash-es/_overArg.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e,t){return function(o){return e(t(o))}}},"./node_modules/lodash-es/_root.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/_freeGlobal.js"),s="object"==typeof self&&self&&self.Object===Object&&self;const n=i.Z||s||Function("return this")()},"./node_modules/lodash-es/_toSource.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=Function.prototype.toString;const s=function(e){if(null!=e){try{return i.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},"./node_modules/lodash-es/assignIn.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>r});var i=o("./node_modules/lodash-es/_copyObject.js"),s=o("./node_modules/lodash-es/_createAssigner.js"),n=o("./node_modules/lodash-es/keysIn.js");const r=(0,s.Z)((function(e,t){(0,i.Z)(t,(0,n.Z)(t),e)}))},"./node_modules/lodash-es/cloneDeepWith.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var i=o("./node_modules/lodash-es/_baseClone.js");const s=function(e,t){return t="function"==typeof t?t:void 0,(0,i.Z)(e,5,t)}},"./node_modules/lodash-es/debounce.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>_});var i=o("./node_modules/lodash-es/isObject.js"),s=o("./node_modules/lodash-es/_root.js");const n=function(){return s.Z.Date.now()};var r=/\s/;const a=function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t};var c=/^\s+/;const l=function(e){return e?e.slice(0,a(e)+1).replace(c,""):e};var d=o("./node_modules/lodash-es/isSymbol.js"),h=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,p=/^0o[0-7]+$/i,f=parseInt;const g=function(e){if("number"==typeof e)return e;if((0,d.Z)(e))return NaN;if((0,i.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,i.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=l(e);var o=u.test(e);return o||p.test(e)?f(e.slice(2),o?2:8):h.test(e)?NaN:+e};var m=Math.max,b=Math.min;const _=function(e,t,o){var s,r,a,c,l,d,h=0,u=!1,p=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function _(t){var o=s,i=r;return s=r=void 0,h=t,c=e.apply(i,o)}function w(e){var o=e-d;return void 0===d||o>=t||o<0||p&&e-h>=a}function k(){var e=n();if(w(e))return v(e);l=setTimeout(k,function(e){var o=t-(e-d);return p?b(o,a-(e-h)):o}(e))}function v(e){return l=void 0,f&&s?_(e):(s=r=void 0,c)}function y(){var e=n(),o=w(e);if(s=arguments,r=this,d=e,o){if(void 0===l)return function(e){return h=e,l=setTimeout(k,t),u?_(e):c}(d);if(p)return clearTimeout(l),l=setTimeout(k,t),_(d)}return void 0===l&&(l=setTimeout(k,t)),c}return t=g(t)||0,(0,i.Z)(o)&&(u=!!o.leading,a=(p="maxWait"in o)?m(g(o.maxWait)||0,t):a,f="trailing"in o?!!o.trailing:f),y.cancel=function(){void 0!==l&&clearTimeout(l),h=0,s=d=r=l=void 0},y.flush=function(){return void 0===l?c:v(n())},y}},"./node_modules/lodash-es/eq.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e,t){return e===t||e!=e&&t!=t}},"./node_modules/lodash-es/isArguments.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var i=o("./node_modules/lodash-es/_baseGetTag.js"),s=o("./node_modules/lodash-es/isObjectLike.js");const n=function(e){return(0,s.Z)(e)&&"[object Arguments]"==(0,i.Z)(e)};var r=Object.prototype,a=r.hasOwnProperty,c=r.propertyIsEnumerable;const l=n(function(){return arguments}())?n:function(e){return(0,s.Z)(e)&&a.call(e,"callee")&&!c.call(e,"callee")}},"./node_modules/lodash-es/isArray.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=Array.isArray},"./node_modules/lodash-es/isArrayLike.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/isFunction.js"),s=o("./node_modules/lodash-es/isLength.js");const n=function(e){return null!=e&&(0,s.Z)(e.length)&&!(0,i.Z)(e)}},"./node_modules/lodash-es/isBuffer.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>c});var i=o("./node_modules/lodash-es/_root.js");const s=function(){return!1};var n="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=r&&r.exports===n?i.Z.Buffer:void 0;const c=(a?a.isBuffer:void 0)||s},"./node_modules/lodash-es/isElement.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/isObjectLike.js"),s=o("./node_modules/lodash-es/isPlainObject.js");const n=function(e){return(0,i.Z)(e)&&1===e.nodeType&&!(0,s.Z)(e)}},"./node_modules/lodash-es/isFunction.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/_baseGetTag.js"),s=o("./node_modules/lodash-es/isObject.js");const n=function(e){if(!(0,s.Z)(e))return!1;var t=(0,i.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},"./node_modules/lodash-es/isLength.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},"./node_modules/lodash-es/isObject.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},"./node_modules/lodash-es/isObjectLike.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(e){return null!=e&&"object"==typeof e}},"./node_modules/lodash-es/isPlainObject.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>h});var i=o("./node_modules/lodash-es/_baseGetTag.js"),s=o("./node_modules/lodash-es/_getPrototype.js"),n=o("./node_modules/lodash-es/isObjectLike.js"),r=Function.prototype,a=Object.prototype,c=r.toString,l=a.hasOwnProperty,d=c.call(Object);const h=function(e){if(!(0,n.Z)(e)||"[object Object]"!=(0,i.Z)(e))return!1;var t=(0,s.Z)(e);if(null===t)return!0;var o=l.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&c.call(o)==d}},"./node_modules/lodash-es/isSymbol.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/_baseGetTag.js"),s=o("./node_modules/lodash-es/isObjectLike.js");const n=function(e){return"symbol"==typeof e||(0,s.Z)(e)&&"[object Symbol]"==(0,i.Z)(e)}},"./node_modules/lodash-es/isTypedArray.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>h});var i=o("./node_modules/lodash-es/_baseGetTag.js"),s=o("./node_modules/lodash-es/isLength.js"),n=o("./node_modules/lodash-es/isObjectLike.js"),r={};r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1;const a=function(e){return(0,n.Z)(e)&&(0,s.Z)(e.length)&&!!r[(0,i.Z)(e)]};var c=o("./node_modules/lodash-es/_baseUnary.js"),l=o("./node_modules/lodash-es/_nodeUtil.js"),d=l.Z&&l.Z.isTypedArray;const h=d?(0,c.Z)(d):a},"./node_modules/lodash-es/keys.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var i=o("./node_modules/lodash-es/_arrayLikeKeys.js"),s=o("./node_modules/lodash-es/_isPrototype.js");const n=(0,o("./node_modules/lodash-es/_overArg.js").Z)(Object.keys,Object);var r=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,s.Z)(e))return n(e);var t=[];for(var o in Object(e))r.call(e,o)&&"constructor"!=o&&t.push(o);return t};var c=o("./node_modules/lodash-es/isArrayLike.js");const l=function(e){return(0,c.Z)(e)?(0,i.Z)(e):a(e)}},"./node_modules/lodash-es/keysIn.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>d});var i=o("./node_modules/lodash-es/_arrayLikeKeys.js"),s=o("./node_modules/lodash-es/isObject.js"),n=o("./node_modules/lodash-es/_isPrototype.js");const r=function(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t};var a=Object.prototype.hasOwnProperty;const c=function(e){if(!(0,s.Z)(e))return r(e);var t=(0,n.Z)(e),o=[];for(var i in e)("constructor"!=i||!t&&a.call(e,i))&&o.push(i);return o};var l=o("./node_modules/lodash-es/isArrayLike.js");const d=function(e){return(0,l.Z)(e)?(0,i.Z)(e,!0):c(e)}},"./node_modules/lodash-es/stubArray.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});const i=function(){return[]}},"./node_modules/lodash-es/throttle.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>n});var i=o("./node_modules/lodash-es/debounce.js"),s=o("./node_modules/lodash-es/isObject.js");const n=function(e,t,o){var n=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return(0,s.Z)(o)&&(n="leading"in o?!!o.leading:n,r="trailing"in o?!!o.trailing:r),(0,i.Z)(e,t,{leading:n,maxWait:t,trailing:r})}},"./node_modules/lodash-es/toString.js":(e,t,o)=>{"use strict";o.d(t,{Z:()=>d});var i=o("./node_modules/lodash-es/_Symbol.js");const s=function(e,t){for(var o=-1,i=null==e?0:e.length,s=Array(i);++o<i;)s[o]=t(e[o],o,e);return s};var n=o("./node_modules/lodash-es/isArray.js"),r=o("./node_modules/lodash-es/isSymbol.js"),a=i.Z?i.Z.prototype:void 0,c=a?a.toString:void 0;const l=function e(t){if("string"==typeof t)return t;if((0,n.Z)(t))return s(t,e)+"";if((0,r.Z)(t))return c?c.call(t):"";var o=t+"";return"0"==o&&1/t==-Infinity?"-0":o};const d=function(e){return null==e?"":l(e)}}},t={};function o(i){var s=t[i];if(void 0!==s)return s.exports;var n=t[i]={id:i,exports:{}};return e[i](n,n.exports,o),n.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var i=o("?7cdd");(window.CKEditor5=window.CKEditor5||{}).dll=i})(),function(e){e.CKEditor5=e.CKEditor5||{};const t=["utils","core","engine","ui","clipboard","enter","paragraph","select-all","typing","undo","upload","widget","watchdog"];for(const o of t){const t=o.replace(/-([a-z])/g,((e,t)=>t.toUpperCase()));e.CKEditor5[t]=e.CKEditor5.dll(`./src/${o}.js`)}}(window); \ No newline at end of file diff --git a/core/core.libraries.yml b/core/core.libraries.yml index a68391e90f929a22077c0d84b4ba6843cf2572d3..20d90f95b478ba7d97ed30ca4615bdce67568d63 100644 --- a/core/core.libraries.yml +++ b/core/core.libraries.yml @@ -19,10 +19,10 @@ internal.backbone: ckeditor5: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: # This file is not aggregated to force the creation of a new aggregate file @@ -36,10 +36,10 @@ ckeditor5: ckeditor5.editorClassic: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/editor-classic/editor-classic.js: { minified: true } @@ -48,10 +48,10 @@ ckeditor5.editorClassic: ckeditor5.editorDecoupled: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/editor-decoupled/editor-decoupled.js: { minified: true } @@ -74,10 +74,10 @@ ckeditor5.essentials: ckeditor5.heading: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/heading/heading.js: { minified: true } @@ -87,10 +87,10 @@ ckeditor5.heading: ckeditor5.basic: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/basic-styles/basic-styles.js: { minified: true } @@ -100,10 +100,10 @@ ckeditor5.basic: ckeditor5.specialCharacters: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/special-characters/special-characters.js: { minified: true } @@ -113,10 +113,10 @@ ckeditor5.specialCharacters: ckeditor5.blockquote: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/block-quote/block-quote.js: { minified: true } @@ -126,10 +126,10 @@ ckeditor5.blockquote: ckeditor5.image: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/image/image.js: { minified: true } @@ -139,10 +139,10 @@ ckeditor5.image: ckeditor5.link: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/link/link.js: { minified: true } @@ -152,10 +152,10 @@ ckeditor5.link: ckeditor5.list: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/list/list.js: { minified: true } @@ -165,10 +165,10 @@ ckeditor5.list: ckeditor5.horizontalLine: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/horizontal-line/horizontal-line.js: { minified: true } @@ -178,10 +178,10 @@ ckeditor5.horizontalLine: ckeditor5.htmlSupport: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/html-support/html-support.js: { minified: true } @@ -191,10 +191,10 @@ ckeditor5.htmlSupport: ckeditor5.alignment: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/alignment/alignment.js: { minified: true } @@ -204,10 +204,10 @@ ckeditor5.alignment: ckeditor5.removeFormat: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/remove-format/remove-format.js: { minified: true } @@ -217,10 +217,10 @@ ckeditor5.removeFormat: ckeditor5.pasteFromOffice: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/paste-from-office/paste-from-office.js: { minified: true } @@ -229,10 +229,10 @@ ckeditor5.pasteFromOffice: ckeditor5.indent: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/indent/indent.js: { minified: true } @@ -242,10 +242,10 @@ ckeditor5.indent: ckeditor5.sourceEditing: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/source-editing/source-editing.js: { minified: true } @@ -255,10 +255,10 @@ ckeditor5.sourceEditing: ckeditor5.table: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/table/table.js: { minified: true } @@ -268,10 +268,10 @@ ckeditor5.table: ckeditor5.language: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/language/language.js: { minified: true } @@ -281,10 +281,10 @@ ckeditor5.language: ckeditor5.codeBlock: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/code-block/code-block.js: { minified: true } @@ -294,10 +294,10 @@ ckeditor5.codeBlock: ckeditor5.style: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/style/style.js: { minified: true } @@ -316,10 +316,10 @@ ckeditor5.translations: ckeditor5.autoformat: remote: https://github.com/ckeditor/ckeditor5 - version: "38.0.0" + version: "38.0.1" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v38.0.1/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/autoformat/autoformat.js: { minified: true } diff --git a/core/package.json b/core/package.json index 8c8d4e802d8aba26b71a0920ad6ea66ee5eaf50b..3c05a6a4d775f01f5195ed0eac2ed0147a7ded71 100644 --- a/core/package.json +++ b/core/package.json @@ -32,32 +32,32 @@ "watch:ckeditor5-dev": "yarn watch:ckeditor5 --mode=development" }, "devDependencies": { - "@ckeditor/ckeditor5-alignment": "~38.0.0", - "@ckeditor/ckeditor5-autoformat": "~38.0.0", - "@ckeditor/ckeditor5-basic-styles": "~38.0.0", - "@ckeditor/ckeditor5-block-quote": "~38.0.0", - "@ckeditor/ckeditor5-code-block": "~38.0.0", - "@ckeditor/ckeditor5-editor-classic": "~38.0.0", - "@ckeditor/ckeditor5-editor-decoupled": "~38.0.0", - "@ckeditor/ckeditor5-essentials": "~38.0.0", - "@ckeditor/ckeditor5-heading": "~38.0.0", - "@ckeditor/ckeditor5-horizontal-line": "~38.0.0", - "@ckeditor/ckeditor5-html-support": "~38.0.0", - "@ckeditor/ckeditor5-image": "~38.0.0", - "@ckeditor/ckeditor5-indent": "~38.0.0", - "@ckeditor/ckeditor5-language": "~38.0.0", - "@ckeditor/ckeditor5-link": "~38.0.0", - "@ckeditor/ckeditor5-list": "~38.0.0", - "@ckeditor/ckeditor5-paste-from-office": "~38.0.0", - "@ckeditor/ckeditor5-remove-format": "~38.0.0", - "@ckeditor/ckeditor5-source-editing": "~38.0.0", - "@ckeditor/ckeditor5-special-characters": "~38.0.0", - "@ckeditor/ckeditor5-style": "~38.0.0", - "@ckeditor/ckeditor5-table": "~38.0.0", + "@ckeditor/ckeditor5-alignment": "~38.0.1", + "@ckeditor/ckeditor5-autoformat": "~38.0.1", + "@ckeditor/ckeditor5-basic-styles": "~38.0.1", + "@ckeditor/ckeditor5-block-quote": "~38.0.1", + "@ckeditor/ckeditor5-code-block": "~38.0.1", + "@ckeditor/ckeditor5-editor-classic": "~38.0.1", + "@ckeditor/ckeditor5-editor-decoupled": "~38.0.1", + "@ckeditor/ckeditor5-essentials": "~38.0.1", + "@ckeditor/ckeditor5-heading": "~38.0.1", + "@ckeditor/ckeditor5-horizontal-line": "~38.0.1", + "@ckeditor/ckeditor5-html-support": "~38.0.1", + "@ckeditor/ckeditor5-image": "~38.0.1", + "@ckeditor/ckeditor5-indent": "~38.0.1", + "@ckeditor/ckeditor5-language": "~38.0.1", + "@ckeditor/ckeditor5-link": "~38.0.1", + "@ckeditor/ckeditor5-list": "~38.0.1", + "@ckeditor/ckeditor5-paste-from-office": "~38.0.1", + "@ckeditor/ckeditor5-remove-format": "~38.0.1", + "@ckeditor/ckeditor5-source-editing": "~38.0.1", + "@ckeditor/ckeditor5-special-characters": "~38.0.1", + "@ckeditor/ckeditor5-style": "~38.0.1", + "@ckeditor/ckeditor5-table": "~38.0.1", "@drupal/once": "1.0.x", "backbone": "1.4.x", "chokidar": "^3.3.1", - "ckeditor5": "~38.0.0", + "ckeditor5": "~38.0.1", "cspell": "^6.0.0", "dotenv-safe": "^8.2.0", "eslint": "^8.9.0", diff --git a/core/yarn.lock b/core/yarn.lock index 5083ac235299bba09ea8dad99064daf111faa0bb..8c2cefeb6063de4b428e2d2562e02f8292aba70f 100644 --- a/core/yarn.lock +++ b/core/yarn.lock @@ -23,299 +23,299 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@ckeditor/ckeditor5-alignment@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-alignment/-/ckeditor5-alignment-38.0.0.tgz#6352d89837f3837a4cd641e2ada088f4a2f33ce0" - integrity sha512-d+7egnNgfTC8rZpJ9+wQAcK0+bMmC/CSrRcn6GIi8IDfzVv61P+RUm3vZTwpKHxsCRzoS96YNRb02tSWP1bhBw== +"@ckeditor/ckeditor5-alignment@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-alignment/-/ckeditor5-alignment-38.0.1.tgz#821169870c13e0caeb67c8a1e9127aaeca2c67d9" + integrity sha512-0AIJh9ZNyy2KgjnQ0En28k+iu9NpYrE+X8zmdKkSlMIEIkeThDNs2WiLJxLf2nNoKh8euGGdfQyAggVDqcF5MQ== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" -"@ckeditor/ckeditor5-autoformat@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-autoformat/-/ckeditor5-autoformat-38.0.0.tgz#e717f3898787aa61e2f816486d9036c3882fc732" - integrity sha512-IEYpd2swlzh9AeoKRGteghi8KrwCIbiwlctRpziqIDK1xg8l3JqNd2DTpu+M9wXwNbOvGD2yANE1nc5a8UyG/Q== +"@ckeditor/ckeditor5-autoformat@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-autoformat/-/ckeditor5-autoformat-38.0.1.tgz#3202cd6aed037b9b33294427c67a7d7bba927d9f" + integrity sha512-yNV4Nh9Ltrr21sVE0yYUCKZZgwHrR719PkbU0KtiZMfX9MmJcHCqql3k8K0akiPwePMjs9HzfdEYZfuonzPUzg== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" -"@ckeditor/ckeditor5-basic-styles@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-basic-styles/-/ckeditor5-basic-styles-38.0.0.tgz#122972a568fd3bd0db4f562a33158c7539482ead" - integrity sha512-IaeJ99LlG8iGcOdoAab0rH5cNP3czF2Ya5yQvkWLzw63fodxWbunLPRaZ9WW6dnfTHPop+E9TpLQEuP33DazzQ== +"@ckeditor/ckeditor5-basic-styles@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-basic-styles/-/ckeditor5-basic-styles-38.0.1.tgz#9867a808666fc4ce3474caf50f8896d5841934be" + integrity sha512-y5K7nbCtpjkKuimRnUa4oq1Xk7rCUMDlW/HUJew3vYKnS0YVfVc4cxRdw/daI70iRN88tQrxsy+xr/4dzzQCHQ== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" -"@ckeditor/ckeditor5-block-quote@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-block-quote/-/ckeditor5-block-quote-38.0.0.tgz#67d47353e856b76775767eebb7d204a92908547d" - integrity sha512-xETTFP27XCx0esAOzQlSVC0/7SdgmuiGPZKvgKI5ocmB3kgKb5xCg9W0AXyaT3vRRdwMDNMbyRvwJ6o2D/zOSA== +"@ckeditor/ckeditor5-block-quote@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-block-quote/-/ckeditor5-block-quote-38.0.1.tgz#21244f473ff927dd8a83643611bd180d90824980" + integrity sha512-UL2sPeivNJuE7GpuNi8kS0O+DPcWKnHrefR9KRGknM9/oBtZJYqbSRUFOzmivdKjPTAlkTzpQgeoj+Ki1rXY7g== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" -"@ckeditor/ckeditor5-clipboard@^38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-clipboard/-/ckeditor5-clipboard-38.0.0.tgz#545b05082ac1f4e6a2240be68dbac486c6351a6e" - integrity sha512-uY6NH2V67PGFoPwgHlpPJXgluZ9ObHakkSHQYR+qKon71gJ5aJ+zI88Lpz9NMosMah9pAEUNdT7tgFPowfCtjw== +"@ckeditor/ckeditor5-clipboard@^38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-clipboard/-/ckeditor5-clipboard-38.0.1.tgz#6b2dbdff1fd49643c751b74cd7236118ed4bd933" + integrity sha512-yAlif+UYoHH3gl/A1wNmXcMU98jJhmuLOSjVYWEIaVJQQbOtGesnDrDVXwST2KBZhyp/qBsblQnLyW4oqEJvug== dependencies: - "@ckeditor/ckeditor5-core" "^38.0.0" - "@ckeditor/ckeditor5-engine" "^38.0.0" - "@ckeditor/ckeditor5-ui" "^38.0.0" - "@ckeditor/ckeditor5-utils" "^38.0.0" - "@ckeditor/ckeditor5-widget" "^38.0.0" + "@ckeditor/ckeditor5-core" "^38.0.1" + "@ckeditor/ckeditor5-engine" "^38.0.1" + "@ckeditor/ckeditor5-ui" "^38.0.1" + "@ckeditor/ckeditor5-utils" "^38.0.1" + "@ckeditor/ckeditor5-widget" "^38.0.1" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-code-block@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-code-block/-/ckeditor5-code-block-38.0.0.tgz#9d745775cdd925933b80cb8a3cb7642150e2ddb3" - integrity sha512-6lOjY/9RIbVuME0PLYWS+vyDeM1tT18SvbrDJE8X3TwzHDWDbU9E0L4ZWkZ7LGpYU+h0AtK56P+f/kIkEYSYuA== +"@ckeditor/ckeditor5-code-block@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-code-block/-/ckeditor5-code-block-38.0.1.tgz#824c2f888b77a49294690ea2edd1ffeae248a8bf" + integrity sha512-fh+m/pcnY204NlRDMzuB4PNm74MjLYCWUWg1hP0gEqy5ZBsS5dWcC92UBMxj3VRcO+OzJox4kpkS6dH8kg+OKg== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" -"@ckeditor/ckeditor5-core@^38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-core/-/ckeditor5-core-38.0.0.tgz#fc57c3d45170005d904c4f1963a08eb33998c92d" - integrity sha512-J+OP35tA6Ia86L2JGdpl9MpUGPwDVGujiPuF+ktXVHzkeYYB9bFDnuXw4MVN8E+eTAAwmDY/TSz9cL5RP6OkFA== +"@ckeditor/ckeditor5-core@^38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-core/-/ckeditor5-core-38.0.1.tgz#1d4d9f5e32b14ff793f5d1f4a80e3fd3a4ef4ec3" + integrity sha512-DL3dp5Rlb0aGGtyQuE8AEQ/a1rfnQghNjn6EdOJhGlzt61JeP3hovY11JQQJ0qh8ZWDt//ZU2c5XmVqJeED08w== dependencies: - "@ckeditor/ckeditor5-engine" "^38.0.0" - "@ckeditor/ckeditor5-utils" "^38.0.0" + "@ckeditor/ckeditor5-engine" "^38.0.1" + "@ckeditor/ckeditor5-utils" "^38.0.1" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-editor-classic@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-classic/-/ckeditor5-editor-classic-38.0.0.tgz#fcf60f7aa9bd546a04b55094d383c5c8f7161e2b" - integrity sha512-BY5lFCOTDVdDhac+rYCNZ3EfKs3T9ywxyIFSY2VTq0JvknjCtRnHZFOH6cfq+jMhD5DPs4EhL4lIK8OGpkg8qw== +"@ckeditor/ckeditor5-editor-classic@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-classic/-/ckeditor5-editor-classic-38.0.1.tgz#a758f19dfed3cf3ac9f499cce4a17fb9407290d1" + integrity sha512-jE1mKrFvW2Go8mlfp5Ei5Mk5CNCBVKUnbrO6nJJPZQBSVGGz9fAd1bu/OjS7KgE/B4JJd7cdc9i1+8KlGeeqjw== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-editor-decoupled@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-decoupled/-/ckeditor5-editor-decoupled-38.0.0.tgz#0fd26b902e8663418a3fbe8a99f1d68cd6f348f0" - integrity sha512-/dGr02lt/IOkL3Xc6SRLX73PzvSWtoig7j9cdDiEL0alav8KTWfb5zY4ogfljEBH3Gk4nNBJ02WMbQr1oweDhA== +"@ckeditor/ckeditor5-editor-decoupled@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-decoupled/-/ckeditor5-editor-decoupled-38.0.1.tgz#cc26b3abd0479f793f95c6e1fba02736b37c3174" + integrity sha512-UYESbLaetAnidPcELQWFdYzO8RmRkXAjXMfGwBt7CB7eInJwSUbJog1L6btMJH9mYLPwbO5nTHbU8W3ybZSRQw== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-engine@^38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-engine/-/ckeditor5-engine-38.0.0.tgz#90c0494f6ded32e7780b3b2236f24c6dd234fcfa" - integrity sha512-xwtHcfuf75tjhajZ7OU9I2hQCMpo7jxacVfX+9Yr1m/1PSkrE3Rm4NaqK2rmLRM/4bp/GjFJSijPdoKYlUvpzQ== +"@ckeditor/ckeditor5-engine@^38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-engine/-/ckeditor5-engine-38.0.1.tgz#a656f6f0dfc4c78b0baaf029930242166bd21cb2" + integrity sha512-7gGcSv1TQ78G1dc0IAknGkWCou1xWbuSmZwT40bcLWnF+vz7hYY1i1Hj4Npp8SLVMkyisiYCdiSJrJrHjvXnyg== dependencies: - "@ckeditor/ckeditor5-utils" "^38.0.0" + "@ckeditor/ckeditor5-utils" "^38.0.1" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-enter@^38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-enter/-/ckeditor5-enter-38.0.0.tgz#d575e0d2a45fdcd6172085c56f949705f99454a1" - integrity sha512-GdDuhAcpRUtfTeLrMOe2KUTK1G+TNpvdPJ+WTAK7YfBZZXUc8kk/0REpmIp+2p20Tc2c++xuocZSx2J9ePq9zA== +"@ckeditor/ckeditor5-enter@^38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-enter/-/ckeditor5-enter-38.0.1.tgz#82c84c3c7cdb00563bfd7e60eaf80351129add4f" + integrity sha512-RIrx2eoV9k1JpHrXp9QdCKP0k+9jr3wqgplhdTj5Ae5BNZdulD4nFi+9NKOr4t9dHprL2RqcolD7DJtOD8I2GQ== dependencies: - "@ckeditor/ckeditor5-core" "^38.0.0" - "@ckeditor/ckeditor5-engine" "^38.0.0" - "@ckeditor/ckeditor5-utils" "^38.0.0" + "@ckeditor/ckeditor5-core" "^38.0.1" + "@ckeditor/ckeditor5-engine" "^38.0.1" + "@ckeditor/ckeditor5-utils" "^38.0.1" -"@ckeditor/ckeditor5-essentials@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-essentials/-/ckeditor5-essentials-38.0.0.tgz#14d88ed14a180333621a33b860bc9fd10bbd84f5" - integrity sha512-dA9WnH8lS+gvlgwOts2eCp8MIHvqgeC9Xp+HR3uCG2kleNrJ9cMQL0sQNFgj5Nmqtk/krypWBIQH6fqTL2urag== +"@ckeditor/ckeditor5-essentials@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-essentials/-/ckeditor5-essentials-38.0.1.tgz#cba17d58c903f342eb6435bf2f3ef281f373a6b7" + integrity sha512-V6DxWtC0CKVIK6BY4Dp6BqVf35pKJ0y2iNIUjStVosB0PaaIg8dHCHv+Y2DRgmM0EGYKih4zjzk7YVWuinHO9Q== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" -"@ckeditor/ckeditor5-heading@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-heading/-/ckeditor5-heading-38.0.0.tgz#a73f85cc33bef12facdfa530e2c4afaa3703796f" - integrity sha512-qEEniLcGJjtVfDb+KkYjL/bjjpajuS0mukFTwemLY3IXLz9i/dJY/a6nokTysc7YVNPfPobHR6F362PU39CdUg== +"@ckeditor/ckeditor5-heading@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-heading/-/ckeditor5-heading-38.0.1.tgz#98408965c04ff057b25fa0937aa2894654e77907" + integrity sha512-pNGQyMAbinXZfk28kJJ5ITlEX7wlZ9zacFIaXbtEFUJpKgTYicDpBYMRc87548hP1Pombx/BJyMlJbhxUr4N5w== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" -"@ckeditor/ckeditor5-horizontal-line@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-horizontal-line/-/ckeditor5-horizontal-line-38.0.0.tgz#dd8a524f7fa84360a83b0727d665955253fb4a6e" - integrity sha512-Ib5SB+OItY2cdPBw0I5kOd+MWY/x2IEATjGwTwEMobj3dG1KRQq7mKuwATRqTEJxjL5gDu2gr3QqzyfufFecgg== +"@ckeditor/ckeditor5-horizontal-line@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-horizontal-line/-/ckeditor5-horizontal-line-38.0.1.tgz#560bc8f1393d682548b244b9d579581d51f5be70" + integrity sha512-jRZuHcB5HBCMZx+9Cjb72HmxVDO6h3Q6XQsaHdzuNB/HIqhmurkSFyUr9qHUuF+/bNXvN5SxXQPPEb4pEFQbug== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" -"@ckeditor/ckeditor5-html-support@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-html-support/-/ckeditor5-html-support-38.0.0.tgz#dfd55ac16d1ff620546c6ea3ea9a9e3a28c82e4c" - integrity sha512-p/NSLHq7GX4/elba8iJULSBVBjhCm1JPhvzG2AZ4Yw8ZEEmbzIB0knXZ+lNaYjHTtwUDoel+vIuZ/bP7Bfl+kg== +"@ckeditor/ckeditor5-html-support@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-html-support/-/ckeditor5-html-support-38.0.1.tgz#edb4bb2c1e8af3a8334b474a243ca16150dc0f98" + integrity sha512-2FD4+KZ9ZKPUBeZmj4GRVHRmdQmdtCujWR+uMRspkzncdSZnpwSmZ7LY6ydo5/jskA1XQO6U1iUavvsza1rung== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-image@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-image/-/ckeditor5-image-38.0.0.tgz#8a4ad70fae3ebdc354efaa561c68c4cbcd1739f6" - integrity sha512-QVT6jGBJ4dukgf1DBIE5aK3tr6M+lwhL97Nd4A2eaQvPicJpYKPwJfMqoNI9U3yt39X8lwisRD5eKyfrPE3pPw== +"@ckeditor/ckeditor5-image@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-image/-/ckeditor5-image-38.0.1.tgz#e6e892f6db61569ce13e900c8c29720602c578a9" + integrity sha512-/Jx3LRBDCw17/8I0PFqNWnDc0k1YZbuVjYSWLioff8HrV+aBx4N9PwVfiB0Q7y6Ss4GkWE/A5E1eMgAuiiVIIg== dependencies: - "@ckeditor/ckeditor5-ui" "^38.0.0" - ckeditor5 "^38.0.0" + "@ckeditor/ckeditor5-ui" "^38.0.1" + ckeditor5 "^38.0.1" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-indent@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-indent/-/ckeditor5-indent-38.0.0.tgz#631ab1af39b512174ac4e3a31123c2d0f3f4dc2e" - integrity sha512-DBSqF3+mBcoWSno3B783JI+697aU2pH9GjbPgKLZmHg3/oJTJVjarSnvc36c9PdNx6WylwaCJkLLzLOS1p/zMA== +"@ckeditor/ckeditor5-indent@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-indent/-/ckeditor5-indent-38.0.1.tgz#62bbd0a52274b00c70e75c1ed54ce1523f2f8898" + integrity sha512-pHjbqi6rbdg+V73/WV4cTfhD6CmgJDHuvAHNdJwz8SW7spvcj+gTBf7X+c5+ZSCCPY7BCO7lhSS27JhDgQ/CzA== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" -"@ckeditor/ckeditor5-language@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-language/-/ckeditor5-language-38.0.0.tgz#3dc9e81cc1e1cc657c1d1ff4a3a3fc2126e0a96e" - integrity sha512-BLFWsWv9ACHyUj3Ah7LH8KT8MnrP7vN6x93y75JxrN3f+dEzIKMhPx/ABXK3MrvGWZsVSgMGKwl9cBrYl4IT4g== +"@ckeditor/ckeditor5-language@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-language/-/ckeditor5-language-38.0.1.tgz#ee5ff75909854f7328063ec48346e0df82a06224" + integrity sha512-MhVIF+oIMwIAUV/4CByaFuUCjQlcZlqG6H6mlD+0dYN0EVi6aN7V2pTRrpWufxDC0dDC2ye0Xlabn1bbvQ6erA== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" -"@ckeditor/ckeditor5-link@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-link/-/ckeditor5-link-38.0.0.tgz#8925071bae900215b3f11957e74b313a9ae3c123" - integrity sha512-UuSSddSDQO3EkHx4ZmuyGQ0RGsLoNAaUXmJk2/ZRE9P/oUdZoihMCTifGxZ92JX4pIKDqqEB8SzgGXIRHZ73wQ== +"@ckeditor/ckeditor5-link@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-link/-/ckeditor5-link-38.0.1.tgz#66e0ef76914a9bb403352af92cd1ece832484d92" + integrity sha512-Ktu30/vw8ZUBJX6r5PWcDEKON6aggYQUIlyVG038abC+Fxipvd0wCiGoMOU/nUHsXqqKaNj66aB43FzfW1JURQ== dependencies: - "@ckeditor/ckeditor5-ui" "^38.0.0" - ckeditor5 "^38.0.0" + "@ckeditor/ckeditor5-ui" "^38.0.1" + ckeditor5 "^38.0.1" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-list@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-list/-/ckeditor5-list-38.0.0.tgz#b6e156906052a84a1982d666a848f2573a6a8369" - integrity sha512-u7bP5hc9+LZfOtQQQdG8p/mUiIYRWG/G4/6iOfZz+G7K3oVYMhtR6shwxutRb/jxBRK9PdOphtWg245T7rzK3A== +"@ckeditor/ckeditor5-list@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-list/-/ckeditor5-list-38.0.1.tgz#f778790445bbb00c656e653a7655381fe020640a" + integrity sha512-MK2pq2bpq/8bW4WZsiCizEVcJVOlpryYjQNIdGo632ayl+zrttJuxJSCJkOjQpqBlXTmCunG9i+Vxe+uvm/k1w== dependencies: - "@ckeditor/ckeditor5-ui" "^38.0.0" - ckeditor5 "^38.0.0" + "@ckeditor/ckeditor5-ui" "^38.0.1" + ckeditor5 "^38.0.1" -"@ckeditor/ckeditor5-paragraph@^38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-paragraph/-/ckeditor5-paragraph-38.0.0.tgz#bfb3b2fb700f7a889b8bd1d09ae17368b1265fea" - integrity sha512-HPDS7MxNB/5Zf3X+vHcAQOqvN4dDl/ZdmxLlLNjGqFmSsoRLxN4FoRLHnbIifCjis/fFmClSxzzfc5AifKA2Vg== +"@ckeditor/ckeditor5-paragraph@^38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-paragraph/-/ckeditor5-paragraph-38.0.1.tgz#553a9129df5ecaec677a1069b67159b2354d5df9" + integrity sha512-LgI/NhWT8F8ntmzhGfhY/SP50jBMcm5IEGHslFceYhvPijOYldm+R+Ip2kjkJJDWR+PcgS3QRZLx60qMJLXxqA== dependencies: - "@ckeditor/ckeditor5-core" "^38.0.0" - "@ckeditor/ckeditor5-ui" "^38.0.0" - "@ckeditor/ckeditor5-utils" "^38.0.0" + "@ckeditor/ckeditor5-core" "^38.0.1" + "@ckeditor/ckeditor5-ui" "^38.0.1" + "@ckeditor/ckeditor5-utils" "^38.0.1" -"@ckeditor/ckeditor5-paste-from-office@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-paste-from-office/-/ckeditor5-paste-from-office-38.0.0.tgz#312bd5d7cde4d9eae12c36923ec97fe63606fa06" - integrity sha512-VvtGdf8PEBZ6tndxHkskd5/H05Pj+iSVj3Woh7VKtEbC7EZ7ztG4JfQGV0wqDDuVXkPtIVH8589RqHEGt1Wb7Q== +"@ckeditor/ckeditor5-paste-from-office@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-paste-from-office/-/ckeditor5-paste-from-office-38.0.1.tgz#655292f4ef6972a7abe70d98f824adffee357c1c" + integrity sha512-BRIwDkQhbSUFo4v1HDK02CtfQUFpsgc+nIo1/XBmZXVNksGUr2+Pz2KrtAkblQygU2MsKPzBWtTzT5X2qzgx1Q== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" -"@ckeditor/ckeditor5-remove-format@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-remove-format/-/ckeditor5-remove-format-38.0.0.tgz#73f975b2695015597173c738a9eccc55c1d2fb1d" - integrity sha512-QJ6VbJJziw79NWz8z2XNjE6CShoHjDOXzqujcV5XdS9UMdbs6qzk2jwTWI/jHiL4eicC7at3dmowpw4RsTHUyw== +"@ckeditor/ckeditor5-remove-format@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-remove-format/-/ckeditor5-remove-format-38.0.1.tgz#bcbad56df5ae4673c95c9a81951c600aa86f54fb" + integrity sha512-uqkAKzmqB0hIOX+23pNrZM7P9KYuWEMruz00Ylp035raLnFk1R4FYTbzJiHDv3rm0Yz0AsBpx+/P9mXGVwx1vw== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" -"@ckeditor/ckeditor5-select-all@^38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-select-all/-/ckeditor5-select-all-38.0.0.tgz#6e87758105897b01a7ccfb0dee4ad08498308499" - integrity sha512-VVucBIUrDuAEHnObmW0HVF+/O8Gr1yuUjgAHoBeMX4vroMfO8cHJzjuuV6ksrmblRzpdR2mIe96qx9E5oiqWMg== +"@ckeditor/ckeditor5-select-all@^38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-select-all/-/ckeditor5-select-all-38.0.1.tgz#717efa78bdbf1ca631107bce1ac2d7ff06473922" + integrity sha512-rFkeA27Poa3PzjpBP8f5hiQY0/81yzYDF2Zz6Zfah9yN103A6e+CXUBoo/BfBH6wBDFNJHG7/7sKL99AMJvmLQ== dependencies: - "@ckeditor/ckeditor5-core" "^38.0.0" - "@ckeditor/ckeditor5-ui" "^38.0.0" - "@ckeditor/ckeditor5-utils" "^38.0.0" + "@ckeditor/ckeditor5-core" "^38.0.1" + "@ckeditor/ckeditor5-ui" "^38.0.1" + "@ckeditor/ckeditor5-utils" "^38.0.1" -"@ckeditor/ckeditor5-source-editing@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-source-editing/-/ckeditor5-source-editing-38.0.0.tgz#79f5065a47f7f93ff28e263f41eda44927de59ea" - integrity sha512-D3Y0ndEwynObjxmmaFbv47JNoVG6c5+/XnbCeUc7Pu+hnSnsRIZbbjguvqDxeLn5eZUp7fjntjmDX0WrmZmqxg== +"@ckeditor/ckeditor5-source-editing@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-source-editing/-/ckeditor5-source-editing-38.0.1.tgz#5ea6d5bee974cd1807430d13d158f827f36efd98" + integrity sha512-lJOyH7/hKDSSGTJMIkdyWY3l/FGxGj+P1i2/qBaiqcxxOFS7o29Q3W7Fz5L4XQalHjWeXaZ5zgpLNSrvoNdlcQ== dependencies: - "@ckeditor/ckeditor5-theme-lark" "^38.0.0" - ckeditor5 "^38.0.0" + "@ckeditor/ckeditor5-theme-lark" "^38.0.1" + ckeditor5 "^38.0.1" -"@ckeditor/ckeditor5-special-characters@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-special-characters/-/ckeditor5-special-characters-38.0.0.tgz#9c0761505fd38b6a0462353423de93e6186e74bd" - integrity sha512-Tqz9c7rn1DbXY/Y8OkmQwTUK5IPS1WqsKYBzbidjDv2S3lBvH1Ut1cfa92lHf+PJ3ilgYxwma9AlF0xL+5OYJQ== +"@ckeditor/ckeditor5-special-characters@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-special-characters/-/ckeditor5-special-characters-38.0.1.tgz#b2b864367c7957a373e344684bb62f30e7671f84" + integrity sha512-Y9GSDUXsntXdF90GZfzXiazkfziusBIp0pimjgXttZEnAYvQZCUYf5vqydALz1aclv8VnvQk7ryEHvBTXpIm8A== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" -"@ckeditor/ckeditor5-style@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-style/-/ckeditor5-style-38.0.0.tgz#12b87ac8c8d28d916cab8b2dd9796e966b72d111" - integrity sha512-YUwZOr0Cn7Me4+bDhZSk1tJ9LW0CktbdjDT9qsYgIh3nbJaI/RJEM0qJL0asHWm1ci04eYxCtcwS+HpC3xh+Iw== +"@ckeditor/ckeditor5-style@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-style/-/ckeditor5-style-38.0.1.tgz#4c96917084dd459277dc66096e55dfa57585b556" + integrity sha512-aKnbPBaMEWkb9ZwNJu2oc5KzUGspsuqqTr3HcSjqU9hsX/EPYncRQ6nLFSTDVaf3ry9XvZbqhe/pQ3K/L977qQ== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-table@~38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-table/-/ckeditor5-table-38.0.0.tgz#d1ce42eeb367955520587201ba286c5c334f89c6" - integrity sha512-RYPzMm2ocQAt86IW9yvehF15j5bvfFlNuaOpkp3q3+NTSOLycMHDPXQkNDJJM51J+urdDl3FrPgxHwcnjjCQHw== +"@ckeditor/ckeditor5-table@~38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-table/-/ckeditor5-table-38.0.1.tgz#0957f22955e4fa8e76dae8fd0b883d2d889d6fab" + integrity sha512-GWlS0EzeEAvGzMjLtydqGvLP1G8OSpR/PDYEzTFzVXTVzWN0P0nI/aCdkLDb/rfRe03Yszb7bKupl9PyK+kDQQ== dependencies: - ckeditor5 "^38.0.0" + ckeditor5 "^38.0.1" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-theme-lark@^38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-theme-lark/-/ckeditor5-theme-lark-38.0.0.tgz#d60be799570302de3caa4154730ffc5c71c00ff1" - integrity sha512-jFxN4ASUUhMXW//CCNudKbYSQNfnfoibBkIKko4vWCoBnXvd2qvHHfpTHYhii3MD8CDfTaEFdtD/XqwVmmr0LQ== +"@ckeditor/ckeditor5-theme-lark@^38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-theme-lark/-/ckeditor5-theme-lark-38.0.1.tgz#45358270d80dde83eb25ab2a1aedbc2086dc1fd7" + integrity sha512-mXL/6cIsTjShWbYKHGuY1YqllouFCfiDHVIaAZxJzgHjwJnDDiZtSvNQ/5XbM3KpPalkJYXoW2VNTvvQn6KuOg== dependencies: - "@ckeditor/ckeditor5-ui" "^38.0.0" + "@ckeditor/ckeditor5-ui" "^38.0.1" -"@ckeditor/ckeditor5-typing@^38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-typing/-/ckeditor5-typing-38.0.0.tgz#ff0a3d66acd8121c92fea9e72b9097fe87a84b9f" - integrity sha512-Ts2e1BohJjBU8debU5rrnTqIN7uvunKrsNPPW6H7sjh+zXolqMK+nqpS8ZNYiYZZ7G3wwN2Ws1kF9cm/wz5dew== +"@ckeditor/ckeditor5-typing@^38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-typing/-/ckeditor5-typing-38.0.1.tgz#a86fc2f74c84a0a7857c7da107e7277e1cceec83" + integrity sha512-717JKThNYRkLxH4L/5AGDqexFc8L2rvkFMbflQSvGRhPpl5d40o+DAduTENkMN0WWuFTovAYDjEwMrjjbUKO7w== dependencies: - "@ckeditor/ckeditor5-core" "^38.0.0" - "@ckeditor/ckeditor5-engine" "^38.0.0" - "@ckeditor/ckeditor5-utils" "^38.0.0" + "@ckeditor/ckeditor5-core" "^38.0.1" + "@ckeditor/ckeditor5-engine" "^38.0.1" + "@ckeditor/ckeditor5-utils" "^38.0.1" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-ui@^38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-ui/-/ckeditor5-ui-38.0.0.tgz#8f334b94e407e43dffbe9c80b7eaf38e433e347c" - integrity sha512-Q6suIOozT1YWejH07dPMB0wDc7oqoKCzh8yU7Co8NGFv3M34Qjk4AXmPXedXsoaM/0S0zvFX1m5UrbdAAhzUtg== +"@ckeditor/ckeditor5-ui@^38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-ui/-/ckeditor5-ui-38.0.1.tgz#af340d8288ebf6787b34a958a24198ea498ad197" + integrity sha512-7ufB/DkIkkJDFAmSMVc5FgohxLs02+s2KAAlIoCopA+6nPTnJEQjIoHgFaqB28QTW6C9z5VSE21lpHwz+zb/fg== dependencies: - "@ckeditor/ckeditor5-core" "^38.0.0" - "@ckeditor/ckeditor5-utils" "^38.0.0" + "@ckeditor/ckeditor5-core" "^38.0.1" + "@ckeditor/ckeditor5-utils" "^38.0.1" color-convert "2.0.1" color-parse "1.4.2" lodash-es "^4.17.15" vanilla-colorful "0.7.2" -"@ckeditor/ckeditor5-undo@^38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-undo/-/ckeditor5-undo-38.0.0.tgz#6c3795c8f03b99347af412fdf7575c59c09096c6" - integrity sha512-IDQ7LABZFpwKfPkme+lfEadmiNoO2C1CTli/lV+vWF+U/WFUl8u2c+R12GlHHfOKeeCbgexjbijHWWAvF94cMw== +"@ckeditor/ckeditor5-undo@^38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-undo/-/ckeditor5-undo-38.0.1.tgz#2ffa074bc519e621329a85082e11c4a832507b75" + integrity sha512-nd6jlycoNYguJpiLEqc5wzFV6VE7y2Bieop9pn//ak0uiTHuup81sZH3aHCw2c/2Qq46O8k5eqoYgeB1Pm2+WQ== dependencies: - "@ckeditor/ckeditor5-core" "^38.0.0" - "@ckeditor/ckeditor5-engine" "^38.0.0" - "@ckeditor/ckeditor5-ui" "^38.0.0" + "@ckeditor/ckeditor5-core" "^38.0.1" + "@ckeditor/ckeditor5-engine" "^38.0.1" + "@ckeditor/ckeditor5-ui" "^38.0.1" -"@ckeditor/ckeditor5-upload@^38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-upload/-/ckeditor5-upload-38.0.0.tgz#f6d016bc65a0619ff1ca058872081ceb09228961" - integrity sha512-kgp2YBXnF5dWEyHT7CdJsoGFREUVzYOt6WeuQiCXSe2VzGfvEdxATx1noDgZlWtm5hJoOx7xrBVicpcvcXGr5g== +"@ckeditor/ckeditor5-upload@^38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-upload/-/ckeditor5-upload-38.0.1.tgz#52ff761c910d8719a44249375e08fc4e225cd7cf" + integrity sha512-vwcs5DZcjDW3ynnCVMXjHWCpLBZ9r544tlo5Gbe287X253vMAse2DDJ9pD9KYqPv1k3QNGaKRa4CtjuKarpUWw== dependencies: - "@ckeditor/ckeditor5-core" "^38.0.0" - "@ckeditor/ckeditor5-ui" "^38.0.0" - "@ckeditor/ckeditor5-utils" "^38.0.0" + "@ckeditor/ckeditor5-core" "^38.0.1" + "@ckeditor/ckeditor5-ui" "^38.0.1" + "@ckeditor/ckeditor5-utils" "^38.0.1" -"@ckeditor/ckeditor5-utils@^38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-utils/-/ckeditor5-utils-38.0.0.tgz#20e397758ea3a962a9e090f10778208c1859ec28" - integrity sha512-bT8Aao2ThonIf9Z4VgFTiL8UGd7q/75okYDu35vQEzHXmfxI5uoVNcvbFjqW1hZ7ALoMk4bsf41MZeZbzgZmGA== +"@ckeditor/ckeditor5-utils@^38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-utils/-/ckeditor5-utils-38.0.1.tgz#2bd17e3d49b66f0fa6694d69bd59446fecb2a13a" + integrity sha512-biJ7yBUSumPDPq14FvZFW4+lHD2LfcZLWgJ7KesoseSOo2BgXAznUGozndEgeHYlnevs9bJAjQOGlTd5bYOW0w== dependencies: lodash-es "^4.17.15" -"@ckeditor/ckeditor5-watchdog@^38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-watchdog/-/ckeditor5-watchdog-38.0.0.tgz#12d850389c7e7fde87425c50f4e50e15ad4d2dc6" - integrity sha512-0ymky3wShXFrTeJkYZzH5+nAzfOse4uOSqAyqLVPK0DVduKXgbEyqo9v0Pg+zHL+HyS1KBGWjLTSXmJzsvy4QQ== +"@ckeditor/ckeditor5-watchdog@^38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-watchdog/-/ckeditor5-watchdog-38.0.1.tgz#a526a404f8ae6de80d064919739a05ceb96074e6" + integrity sha512-Q2QeUbDpoA4gIYpd0BicnP0k7ZxuY09x6+8AYNG45xI9NvcFhyyry/dw41AwFmqcZbU3NfPxV47vJzIQ2ZOqQg== dependencies: lodash-es "^4.17.15" -"@ckeditor/ckeditor5-widget@^38.0.0": - version "38.0.0" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-widget/-/ckeditor5-widget-38.0.0.tgz#2350fe1c13588096683f85316b2bb84a58c8cb95" - integrity sha512-9aFIcGeEpfV+ZB9qq1fgwBO/l/sUMgARl0sBPPh+DSHAaT2WNHRIopY2jc40gXxgX6ji80ZVn1NZujTiaedqvQ== - dependencies: - "@ckeditor/ckeditor5-core" "^38.0.0" - "@ckeditor/ckeditor5-engine" "^38.0.0" - "@ckeditor/ckeditor5-enter" "^38.0.0" - "@ckeditor/ckeditor5-typing" "^38.0.0" - "@ckeditor/ckeditor5-ui" "^38.0.0" - "@ckeditor/ckeditor5-utils" "^38.0.0" +"@ckeditor/ckeditor5-widget@^38.0.1": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-widget/-/ckeditor5-widget-38.0.1.tgz#e2f82ee9a1678fcfce73a44754e049bf918d0c6b" + integrity sha512-2XxSXzS9doFWGX7Lb5U5+sLr6tJQOUP17lGBC2PwaNPfZWTk73ibq3vUlboAJJB5Hv3JrIa971KH6rcFIdr1Hg== + dependencies: + "@ckeditor/ckeditor5-core" "^38.0.1" + "@ckeditor/ckeditor5-engine" "^38.0.1" + "@ckeditor/ckeditor5-enter" "^38.0.1" + "@ckeditor/ckeditor5-typing" "^38.0.1" + "@ckeditor/ckeditor5-ui" "^38.0.1" + "@ckeditor/ckeditor5-utils" "^38.0.1" lodash-es "^4.17.15" "@colors/colors@1.5.0": @@ -1626,24 +1626,24 @@ ci-info@3.3.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== -ckeditor5@^38.0.0, ckeditor5@~38.0.0: - version "38.0.0" - resolved "https://registry.yarnpkg.com/ckeditor5/-/ckeditor5-38.0.0.tgz#c18f5fa9dbd4122aeca9badbff7ac6334d42c5e0" - integrity sha512-BpoV/hBI/b+JkLMyB+OVW1OkoQqn3SvkawWCLe25gUFRceKsio/YUUHqeBGbKCOHVYfYr9pINSjMihVS7HZQFw== - dependencies: - "@ckeditor/ckeditor5-clipboard" "^38.0.0" - "@ckeditor/ckeditor5-core" "^38.0.0" - "@ckeditor/ckeditor5-engine" "^38.0.0" - "@ckeditor/ckeditor5-enter" "^38.0.0" - "@ckeditor/ckeditor5-paragraph" "^38.0.0" - "@ckeditor/ckeditor5-select-all" "^38.0.0" - "@ckeditor/ckeditor5-typing" "^38.0.0" - "@ckeditor/ckeditor5-ui" "^38.0.0" - "@ckeditor/ckeditor5-undo" "^38.0.0" - "@ckeditor/ckeditor5-upload" "^38.0.0" - "@ckeditor/ckeditor5-utils" "^38.0.0" - "@ckeditor/ckeditor5-watchdog" "^38.0.0" - "@ckeditor/ckeditor5-widget" "^38.0.0" +ckeditor5@^38.0.1, ckeditor5@~38.0.1: + version "38.0.1" + resolved "https://registry.yarnpkg.com/ckeditor5/-/ckeditor5-38.0.1.tgz#ab50532c436e019f2e1fd95fde5f981d124d3f03" + integrity sha512-r1axtjYlQZxcyWyF9vbiPiZYZSYBd40ITlo6gC7L5bOLSlFNreEif7b7IRKg4e5aGn4c1FopTk7WoLsZ/CnSoA== + dependencies: + "@ckeditor/ckeditor5-clipboard" "^38.0.1" + "@ckeditor/ckeditor5-core" "^38.0.1" + "@ckeditor/ckeditor5-engine" "^38.0.1" + "@ckeditor/ckeditor5-enter" "^38.0.1" + "@ckeditor/ckeditor5-paragraph" "^38.0.1" + "@ckeditor/ckeditor5-select-all" "^38.0.1" + "@ckeditor/ckeditor5-typing" "^38.0.1" + "@ckeditor/ckeditor5-ui" "^38.0.1" + "@ckeditor/ckeditor5-undo" "^38.0.1" + "@ckeditor/ckeditor5-upload" "^38.0.1" + "@ckeditor/ckeditor5-utils" "^38.0.1" + "@ckeditor/ckeditor5-watchdog" "^38.0.1" + "@ckeditor/ckeditor5-widget" "^38.0.1" clear-module@^4.1.2: version "4.1.2"