/*! For license information please see admin-v6.1.js.LICENSE.txt */
(()=>{var e,t,n={63:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(7044),o=n(1127),i=n(551),a=864e5;function s(e,t){(0,i.A)(2,arguments);var n=(0,o.default)(e),s=(0,o.default)(t),l=n.getTime()-(0,r.A)(n),c=s.getTime()-(0,r.A)(s);return Math.round((l-c)/a)}},115:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function i(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){if(e.constructor!==a.constructor)return!1;var s,l,c,d;if(Array.isArray(e)){if((s=e.length)!=a.length)return!1;for(l=s;0!==l--;)if(!i(e[l],a[l]))return!1;return!0}if(n&&e instanceof Map&&a instanceof Map){if(e.size!==a.size)return!1;for(d=e.entries();!(l=d.next()).done;)if(!a.has(l.value[0]))return!1;for(d=e.entries();!(l=d.next()).done;)if(!i(l.value[1],a.get(l.value[0])))return!1;return!0}if(r&&e instanceof Set&&a instanceof Set){if(e.size!==a.size)return!1;for(d=e.entries();!(l=d.next()).done;)if(!a.has(l.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(a)){if((s=e.length)!=a.length)return!1;for(l=s;0!==l--;)if(e[l]!==a[l])return!1;return!0}if(e.constructor===RegExp)return e.source===a.source&&e.flags===a.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof a.valueOf)return e.valueOf()===a.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof a.toString)return e.toString()===a.toString();if((s=(c=Object.keys(e)).length)!==Object.keys(a).length)return!1;for(l=s;0!==l--;)if(!Object.prototype.hasOwnProperty.call(a,c[l]))return!1;if(t&&e instanceof Element)return!1;for(l=s;0!==l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!e.$$typeof)&&!i(e[c[l]],a[c[l]]))return!1;return!0}return e!=e&&a!=a}e.exports=function(e,t){try{return i(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},119:function(e,t,n){!function(e){"use strict";var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysShort:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"%d ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,function(e){return n[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(n(5093))},123:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2284),o=n(551);function i(e){(0,o.A)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,r.A)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},158:function(e,t,n){!function(e){"use strict";var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(5093))},217:function(e,t,n){!function(e){"use strict";e.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:!0,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n(5093))},274:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(123),o=n(551);function i(e){return(0,o.A)(1,arguments),(0,r.default)(e).getDate()}},304:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(5093))},306:function(e,t,n){!function(e){"use strict";e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"за %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"една минута",mm:"%d минути",h:"еден час",hh:"%d часа",d:"еден ден",dd:"%d дена",M:"еден месец",MM:"%d месеци",y:"една година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(n(5093))},311:e=>{"use strict";e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27%23212529%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpath d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e"},312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(1720))&&r.__esModule?r:{default:r};t.default=o.default,e.exports=t.default},411:(e,t,n)=>{var r;!function(){"use strict";var o=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:o,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen};void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},464:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(123),o=n(551),i=n(9742),a=n(4188),s=n(1858);function l(e,t){var n,l,c,d,u,p,m,h;(0,o.A)(1,arguments);var f=(0,r.default)(e),g=f.getUTCFullYear(),b=(0,s.q)(),v=(0,a.A)(null!==(n=null!==(l=null!==(c=null!==(d=null==t?void 0:t.firstWeekContainsDate)&&void 0!==d?d:null==t||null===(u=t.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==c?c:b.firstWeekContainsDate)&&void 0!==l?l:null===(m=b.locale)||void 0===m||null===(h=m.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==n?n:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(g+1,0,v),y.setUTCHours(0,0,0,0);var _=(0,i.A)(y,t),w=new Date(0);w.setUTCFullYear(g,0,v),w.setUTCHours(0,0,0,0);var k=(0,i.A)(w,t);return f.getTime()>=_.getTime()?g+1:f.getTime()>=k.getTime()?g:g-1}},527:function(e,t,n){!function(e){"use strict";var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),n=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function r(e,r,o,i){var a="";switch(o){case"s":return i?"muutaman sekunnin":"muutama sekunti";case"ss":a=i?"sekunnin":"sekuntia";break;case"m":return i?"minuutin":"minuutti";case"mm":a=i?"minuutin":"minuuttia";break;case"h":return i?"tunnin":"tunti";case"hh":a=i?"tunnin":"tuntia";break;case"d":return i?"päivän":"päivä";case"dd":a=i?"päivän":"päivää";break;case"M":return i?"kuukauden":"kuukausi";case"MM":a=i?"kuukauden":"kuukautta";break;case"y":return i?"vuoden":"vuosi";case"yy":a=i?"vuoden":"vuotta"}return function(e,r){return e<10?r?n[e]:t[e]:e}(e,i)+" "+a}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(5093))},540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},543:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(123),o=n(551);function i(e){(0,o.A)(1,arguments);var t=(0,r.default)(e);return t.setDate(1),t.setHours(0,0,0,0),t}},548:(e,t,n)=>{"use strict";t.a=void 0;var r,o=function(){function e(e,t){for(var n=0;n{"use strict";function r(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}n.d(t,{A:()=>r})},579:(e,t,n)=>{var r=n(3738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},609:function(e,t,n){!function(e){"use strict";var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function n(e,t,n,r){var o=e;switch(n){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"ss":return o+(r||t)?" másodperc":" másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return o+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return o+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return o+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return o+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return o+(r||t?" év":" éve")}return""}function r(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return r.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return r.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(5093))},644:e=>{"use strict";e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0%27/%3e%3c/svg%3e"},667:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(123),o=n(551);function i(e,t){(0,o.A)(2,arguments);var n=(0,r.default)(e),i=(0,r.default)(t);return 12*(n.getFullYear()-i.getFullYear())+(n.getMonth()-i.getMonth())}},708:function(e,t,n){!function(e){"use strict";var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})}(n(5093))},748:function(e,t,n){!function(e){"use strict";e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(n(5093))},774:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(1601),o=n.n(r),i=n(6314),a=n.n(i)()(o());a.push([e.id,'@charset "UTF-8";\n.fod4ZeXNMNcj6nbuusiY,\n.cBCI2huT9lOsb_gc5epr,\n.VakY0Xks34qzb4hYa3qg, .CJNS2t3pDg318Lmfp0H9::before {\n border-color: #ccc;\n border-style: solid;\n border-width: 3px 3px 0 0;\n content: "";\n display: block;\n height: 9px;\n position: absolute;\n top: 6px;\n width: 9px;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement^=top] .XLn4952nMF55Jw0GXDmb, .S7qP0N5diUkHRbpmBhGp[data-placement^=bottom] .XLn4952nMF55Jw0GXDmb {\n margin-left: -4px;\n position: absolute;\n width: 0;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement^=top] .XLn4952nMF55Jw0GXDmb::before, .S7qP0N5diUkHRbpmBhGp[data-placement^=bottom] .XLn4952nMF55Jw0GXDmb::before, .S7qP0N5diUkHRbpmBhGp[data-placement^=top] .XLn4952nMF55Jw0GXDmb::after, .S7qP0N5diUkHRbpmBhGp[data-placement^=bottom] .XLn4952nMF55Jw0GXDmb::after {\n box-sizing: content-box;\n position: absolute;\n border: 8px solid transparent;\n height: 0;\n width: 1px;\n content: "";\n z-index: -1;\n border-width: 8px;\n left: -8px;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement^=top] .XLn4952nMF55Jw0GXDmb::before, .S7qP0N5diUkHRbpmBhGp[data-placement^=bottom] .XLn4952nMF55Jw0GXDmb::before {\n border-bottom-color: #aeaeae;\n}\n\n.S7qP0N5diUkHRbpmBhGp[data-placement^=bottom] .XLn4952nMF55Jw0GXDmb {\n top: 0;\n margin-top: -8px;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement^=bottom] .XLn4952nMF55Jw0GXDmb::before, .S7qP0N5diUkHRbpmBhGp[data-placement^=bottom] .XLn4952nMF55Jw0GXDmb::after {\n border-top: none;\n border-bottom-color: #f0f0f0;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement^=bottom] .XLn4952nMF55Jw0GXDmb::after {\n top: 0;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement^=bottom] .XLn4952nMF55Jw0GXDmb::before {\n top: -1px;\n border-bottom-color: #aeaeae;\n}\n\n.S7qP0N5diUkHRbpmBhGp[data-placement^=top] .XLn4952nMF55Jw0GXDmb {\n bottom: 0;\n margin-bottom: -8px;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement^=top] .XLn4952nMF55Jw0GXDmb::before, .S7qP0N5diUkHRbpmBhGp[data-placement^=top] .XLn4952nMF55Jw0GXDmb::after {\n border-bottom: none;\n border-top-color: #fff;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement^=top] .XLn4952nMF55Jw0GXDmb::after {\n bottom: 0;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement^=top] .XLn4952nMF55Jw0GXDmb::before {\n bottom: -1px;\n border-top-color: #aeaeae;\n}\n\n.KakHaSX4szBEEjcf70vM {\n display: inline-block;\n padding: 0;\n border: 0;\n}\n\n.IXJ5rwop2w6dAFg0xwha {\n font-family: "Helvetica Neue", helvetica, arial, sans-serif;\n font-size: 0.8rem;\n background-color: #fff;\n color: #000;\n border: 1px solid #aeaeae;\n border-radius: 0.3rem;\n display: inline-block;\n position: relative;\n}\n\n.BBU7nch3AaQONwoSb0AF .XLn4952nMF55Jw0GXDmb {\n left: 35px;\n}\n.BBU7nch3AaQONwoSb0AF .wiigGjECCEfYQqcWh1CC {\n border-left: 0;\n}\n.BBU7nch3AaQONwoSb0AF .kdNnFH7h141xWlJBNBAE,\n.BBU7nch3AaQONwoSb0AF .xR09WX3KWETugy4MjvAw {\n border-bottom-left-radius: 0.3rem;\n border-bottom-right-radius: 0.3rem;\n}\n\n.XLn4952nMF55Jw0GXDmb {\n position: absolute;\n left: 50px;\n}\n\n.S7qP0N5diUkHRbpmBhGp {\n z-index: 1;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement^=bottom] {\n padding-top: 10px;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement=bottom-end] .XLn4952nMF55Jw0GXDmb, .S7qP0N5diUkHRbpmBhGp[data-placement=top-end] .XLn4952nMF55Jw0GXDmb {\n left: auto;\n right: 50px;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement^=top] {\n padding-bottom: 10px;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement^=right] {\n padding-left: 8px;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement^=right] .XLn4952nMF55Jw0GXDmb {\n left: auto;\n right: 42px;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement^=left] {\n padding-right: 8px;\n}\n.S7qP0N5diUkHRbpmBhGp[data-placement^=left] .XLn4952nMF55Jw0GXDmb {\n left: 42px;\n right: auto;\n}\n\n.iSaeUIwlaf7GnGRPKypq {\n text-align: center;\n background-color: #f0f0f0;\n border-bottom: 1px solid #aeaeae;\n border-top-left-radius: 0.3rem;\n padding: 8px 0;\n position: relative;\n}\n.gpmx6nWYaXqRSIzTTzYK {\n padding-bottom: 8px;\n padding-left: 5px;\n padding-right: 5px;\n}\n.gpmx6nWYaXqRSIzTTzYK:not(.YpdCRhelcevXY3xKetGV) {\n border-top-left-radius: 0;\n}\n.iSaeUIwlaf7GnGRPKypq:not(.lHn6puFtyRMP5BznAWwg) {\n border-top-right-radius: 0.3rem;\n}\n\n.cq12I7owD4CQPLDFlmQH,\n.chGdB2_ty_cPqlfG0ovB,\n.n0apu1iBCuGqvCTW5dHj,\n.k_3yaNBi95YQT4LGcSVh,\n.vuBHhxTox3tZZ9JuJEZB,\n.okTx1gFNVyTTtBVZEEGk {\n display: inline-block;\n margin: 0 15px;\n}\n\n.iL95B_TSozIO0CpDlWrL,\n.iI17TarD3Z6Umn9z3Juw,\n.E9rpIAEJtJEl7pa7qEuo {\n margin-top: 0;\n color: #000;\n font-weight: bold;\n font-size: 0.944rem;\n}\n\n.iI17TarD3Z6Umn9z3Juw {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.srZWcT5CWg8vgM3hH18g {\n align-items: center;\n background: none;\n display: flex;\n justify-content: center;\n text-align: center;\n cursor: pointer;\n position: absolute;\n top: 2px;\n padding: 0;\n border: none;\n z-index: 1;\n height: 32px;\n width: 32px;\n text-indent: -999em;\n overflow: hidden;\n}\n.Sco1tMPmXf7wCrIZTUKP {\n left: 2px;\n}\n.CokSq81sNmxUOfIuUmBk {\n right: 2px;\n}\n.C6QgDjDW9XkzSeKBiKsx:not(.BjHpYPVhimASeZ9rqIIE) {\n right: 85px;\n}\n.EfYxQSkZvNas6WzjRi3w {\n position: relative;\n top: 0;\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n.iQchZaRRh3iv5Xc7GMrS {\n top: 4px;\n}\n.vXkrR7AEOAP1Ssk8TC9_ {\n top: -4px;\n}\n.srZWcT5CWg8vgM3hH18g:hover *::before {\n border-color: #a6a6a6;\n}\n\n.CJNS2t3pDg318Lmfp0H9 {\n position: relative;\n top: -1px;\n font-size: 20px;\n width: 0;\n}\n.jka_ZXFD_brEsiSoH1XM {\n left: -2px;\n}\n.jka_ZXFD_brEsiSoH1XM::before {\n transform: rotate(45deg);\n left: -7px;\n}\n.Ds74F7ygh8GcuhGmz9Pe {\n right: -2px;\n}\n.Ds74F7ygh8GcuhGmz9Pe::before {\n transform: rotate(225deg);\n right: -7px;\n}\n\n.oS48bGzCWqZ3d2E20CsJ {\n float: left;\n}\n\n.tmQzD5x5ld7nSjH7ZUnO {\n margin: 0.4rem;\n text-align: center;\n}\n.fWsedLE2WlI0Uva4Lqaw {\n display: flex;\n flex-wrap: wrap;\n max-width: 180px;\n}\n.tmQzD5x5ld7nSjH7ZUnO .zw5Lhb9GbDzOt6f7r926 {\n display: inline-block;\n width: 4rem;\n margin: 2px;\n}\n\n.zv_wKFwQTdGgX3q3IP4v {\n margin: 0.4rem;\n text-align: center;\n}\n.zv_wKFwQTdGgX3q3IP4v .i6PQIW5c6RuAjK40D4Hg,\n.zv_wKFwQTdGgX3q3IP4v .WdZyAV1QQN1ioR2gqqsj {\n display: inline-block;\n width: 4rem;\n margin: 2px;\n}\n\n.Fo84qakRcEGX6GooYA5e {\n clear: both;\n width: 100%;\n float: left;\n margin: 5px 0 10px 15px;\n text-align: left;\n}\n.Fo84qakRcEGX6GooYA5e .XXXv83f7WOuLmbm1H05J {\n display: inline-block;\n}\n.Fo84qakRcEGX6GooYA5e .BLUTkwvPbaQOwHa3X43u {\n display: inline-block;\n}\n.Fo84qakRcEGX6GooYA5e .BLUTkwvPbaQOwHa3X43u .jnHR3UyoNnIADznASJG9 {\n display: inline-block;\n margin-left: 10px;\n}\n.Fo84qakRcEGX6GooYA5e .BLUTkwvPbaQOwHa3X43u .jnHR3UyoNnIADznASJG9 input {\n width: auto;\n}\n.Fo84qakRcEGX6GooYA5e .BLUTkwvPbaQOwHa3X43u .jnHR3UyoNnIADznASJG9 input[type=time]::-webkit-inner-spin-button,\n.Fo84qakRcEGX6GooYA5e .BLUTkwvPbaQOwHa3X43u .jnHR3UyoNnIADznASJG9 input[type=time]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.Fo84qakRcEGX6GooYA5e .BLUTkwvPbaQOwHa3X43u .jnHR3UyoNnIADznASJG9 input[type=time] {\n -moz-appearance: textfield;\n}\n.Fo84qakRcEGX6GooYA5e .BLUTkwvPbaQOwHa3X43u .N_j3rdvPcQs4hA205_Ec {\n margin-left: 5px;\n display: inline-block;\n}\n\n.wiigGjECCEfYQqcWh1CC {\n float: right;\n border-left: 1px solid #aeaeae;\n width: 85px;\n}\n.VNQdab5EQ_Xily2VgT4y {\n display: inline;\n border: 1px solid #aeaeae;\n border-radius: 0.3rem;\n position: absolute;\n right: -87px;\n top: 0;\n}\n.wiigGjECCEfYQqcWh1CC .kdNnFH7h141xWlJBNBAE {\n position: relative;\n background: white;\n border-bottom-right-radius: 0.3rem;\n}\n.wiigGjECCEfYQqcWh1CC .kdNnFH7h141xWlJBNBAE .xR09WX3KWETugy4MjvAw {\n width: 85px;\n overflow-x: hidden;\n margin: 0 auto;\n text-align: center;\n border-bottom-right-radius: 0.3rem;\n}\n.wiigGjECCEfYQqcWh1CC .kdNnFH7h141xWlJBNBAE .xR09WX3KWETugy4MjvAw ul.U6IqAY2mhiwTZLSOKNDj {\n list-style: none;\n margin: 0;\n height: calc(195px + 1.7rem / 2);\n overflow-y: scroll;\n padding-right: 0;\n padding-left: 0;\n width: 100%;\n box-sizing: content-box;\n}\n.wiigGjECCEfYQqcWh1CC .kdNnFH7h141xWlJBNBAE .xR09WX3KWETugy4MjvAw ul.U6IqAY2mhiwTZLSOKNDj li.bplWpSY4gEUYCDwSdBta {\n height: 30px;\n padding: 5px 10px;\n white-space: nowrap;\n}\n.wiigGjECCEfYQqcWh1CC .kdNnFH7h141xWlJBNBAE .xR09WX3KWETugy4MjvAw ul.U6IqAY2mhiwTZLSOKNDj li.bplWpSY4gEUYCDwSdBta:hover {\n cursor: pointer;\n background-color: #f0f0f0;\n}\n.wiigGjECCEfYQqcWh1CC .kdNnFH7h141xWlJBNBAE .xR09WX3KWETugy4MjvAw ul.U6IqAY2mhiwTZLSOKNDj li.hQdfMP5iUlLX3fG_xVfB {\n background-color: #216ba5;\n color: white;\n font-weight: bold;\n}\n.wiigGjECCEfYQqcWh1CC .kdNnFH7h141xWlJBNBAE .xR09WX3KWETugy4MjvAw ul.U6IqAY2mhiwTZLSOKNDj li.hQdfMP5iUlLX3fG_xVfB:hover {\n background-color: #216ba5;\n}\n.wiigGjECCEfYQqcWh1CC .kdNnFH7h141xWlJBNBAE .xR09WX3KWETugy4MjvAw ul.U6IqAY2mhiwTZLSOKNDj li.dsKNk2Mc_V41Wl7QFllJ {\n color: #ccc;\n}\n.wiigGjECCEfYQqcWh1CC .kdNnFH7h141xWlJBNBAE .xR09WX3KWETugy4MjvAw ul.U6IqAY2mhiwTZLSOKNDj li.dsKNk2Mc_V41Wl7QFllJ:hover {\n cursor: default;\n background-color: transparent;\n}\n\n.s0x5FtIR7jZlJGI6ON6A {\n color: #ccc;\n display: inline-block;\n width: 1.7rem;\n line-height: 1.7rem;\n text-align: center;\n margin: 0.166rem;\n}\n.s0x5FtIR7jZlJGI6ON6A.FX5T_2nGFgyIX40YwWlP {\n cursor: pointer;\n}\n.s0x5FtIR7jZlJGI6ON6A.FX5T_2nGFgyIX40YwWlP:not(.hHlKSv8vBMYNdzQ4SGrB,\n.uppPl_vEFrDA3Z1Lh5VA):hover {\n border-radius: 0.3rem;\n background-color: #f0f0f0;\n}\n.hHlKSv8vBMYNdzQ4SGrB {\n border-radius: 0.3rem;\n background-color: #216ba5;\n color: #fff;\n}\n.hHlKSv8vBMYNdzQ4SGrB:hover {\n background-color: #1d5d90;\n}\n.uppPl_vEFrDA3Z1Lh5VA {\n border-radius: 0.3rem;\n background-color: #2a87d0;\n color: #fff;\n}\n.uppPl_vEFrDA3Z1Lh5VA:hover {\n background-color: #1d5d90;\n}\n\n.mHCnDUBiAlkyJzXQ4uhR {\n white-space: nowrap;\n margin-bottom: -8px;\n}\n\n.uJcDoRPy_nkk5kpdk6jT {\n white-space: nowrap;\n}\n\n.g20E84oit5VcucrOetdt,\n.FBbzZs9SCSAIjYuoSyRG,\n.PRmwxRjTBpTwLFvAPXRj {\n color: #000;\n display: inline-block;\n width: 1.7rem;\n line-height: 1.7rem;\n text-align: center;\n margin: 0.166rem;\n}\n\n.FBbzZs9SCSAIjYuoSyRG,\n.i6PQIW5c6RuAjK40D4Hg,\n.WdZyAV1QQN1ioR2gqqsj,\n.zw5Lhb9GbDzOt6f7r926 {\n cursor: pointer;\n}\n.FBbzZs9SCSAIjYuoSyRG:hover,\n.i6PQIW5c6RuAjK40D4Hg:hover,\n.WdZyAV1QQN1ioR2gqqsj:hover,\n.zw5Lhb9GbDzOt6f7r926:hover {\n border-radius: 0.3rem;\n background-color: #f0f0f0;\n}\n.GVs2fEogxVFWLeQF1otT,\n.cR5J0ggY8bx7hTBLoco8,\n._8BLyOvIc3pzANrZmKTUE,\n.l_kLoN_9kcZpEdzGaUIx {\n font-weight: bold;\n}\n.xxW4z0V81RNyMOJaMhJm,\n.W2A3obRM54JNaf_J0c4_,\n._WQpnBeri_7kudCBXQgr,\n.jiIOfz2jg2V5wpgPTa6z {\n border-radius: 0.3rem;\n background-color: #3dcc4a;\n color: #fff;\n}\n.xxW4z0V81RNyMOJaMhJm:hover,\n.W2A3obRM54JNaf_J0c4_:hover,\n._WQpnBeri_7kudCBXQgr:hover,\n.jiIOfz2jg2V5wpgPTa6z:hover {\n background-color: #32be3f;\n}\n.GFRbNuTzWqST3J4gLyn2,\n.TlPVIfju4H7pAyrEZ2qr,\n.hTNIRkA1WOJ0lQ05ichL,\n.DJziLB9iaq8dRvJ6SwlJ {\n color: magenta;\n}\n.b7jJrxJyLVE5GiYugi9Q,\n.FDlW0IBQzRVImfVzT4VP,\n.Ci7Bb8uw8HtlH7_eiIR4,\n.GIuiIf0cMEN6p6fEcDIG {\n color: green;\n}\n.OumOYsBrrNR0j7vhpkuW,\n.tXgYeGYy3t_75LMHVbZn,\n.zZDApuUInndtQzSKik7G,\n._3RXS5fmtTfatoP0jG_R {\n position: relative;\n border-radius: 0.3rem;\n background-color: #ff6803;\n color: #fff;\n}\n.OumOYsBrrNR0j7vhpkuW .MuqpaITSDzGhnuE17MqW,\n.tXgYeGYy3t_75LMHVbZn .MuqpaITSDzGhnuE17MqW,\n.zZDApuUInndtQzSKik7G .MuqpaITSDzGhnuE17MqW,\n._3RXS5fmtTfatoP0jG_R .MuqpaITSDzGhnuE17MqW {\n position: absolute;\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n background-color: #333;\n color: #fff;\n padding: 4px;\n border-radius: 4px;\n white-space: nowrap;\n visibility: hidden;\n opacity: 0;\n transition: visibility 0s, opacity 0.3s ease-in-out;\n}\n.OumOYsBrrNR0j7vhpkuW:hover,\n.tXgYeGYy3t_75LMHVbZn:hover,\n.zZDApuUInndtQzSKik7G:hover,\n._3RXS5fmtTfatoP0jG_R:hover {\n background-color: #cf5300;\n}\n.OumOYsBrrNR0j7vhpkuW:hover .MuqpaITSDzGhnuE17MqW,\n.tXgYeGYy3t_75LMHVbZn:hover .MuqpaITSDzGhnuE17MqW,\n.zZDApuUInndtQzSKik7G:hover .MuqpaITSDzGhnuE17MqW,\n._3RXS5fmtTfatoP0jG_R:hover .MuqpaITSDzGhnuE17MqW {\n visibility: visible;\n opacity: 1;\n}\n.b7YWalbftblur37KulHN, .Q1ftJ3MzAhg_VDXOZ5VQ, .Ju5BJuRfDtQHEXsJTMKb,\n.uCtgRNlb4ATKF9EyUr65,\n.X6qOOvB9S1_BA0jzyi5v,\n.cx0tKN7_pVYTjFbmhXbn,\n.Ebbec1ld974uRNs89kr7,\n.Wd3S5hJp25_5ZjIWe88P,\n.o2WadGf7GxEAvMIgF_z8,\n.ikStZgOtZYloOhYUCfz7,\n.uC47fzgOGLIx_IK53nSA,\n._A2Q5L6DGrg3kVyyBaKv {\n border-radius: 0.3rem;\n background-color: #216ba5;\n color: #fff;\n}\n.b7YWalbftblur37KulHN:hover, .Q1ftJ3MzAhg_VDXOZ5VQ:hover, .Ju5BJuRfDtQHEXsJTMKb:hover,\n.uCtgRNlb4ATKF9EyUr65:hover,\n.X6qOOvB9S1_BA0jzyi5v:hover,\n.cx0tKN7_pVYTjFbmhXbn:hover,\n.Ebbec1ld974uRNs89kr7:hover,\n.Wd3S5hJp25_5ZjIWe88P:hover,\n.o2WadGf7GxEAvMIgF_z8:hover,\n.ikStZgOtZYloOhYUCfz7:hover,\n.uC47fzgOGLIx_IK53nSA:hover,\n._A2Q5L6DGrg3kVyyBaKv:hover {\n background-color: #1d5d90;\n}\n.wGQHAGY7JCfLGRfl21EA,\n.UhZiFX8PaDQQAzdZp_pp,\n.iOnHPZtk6CV7CDVlYcBX,\n.Dmi0JaX5xZedWQRQ0JTg {\n border-radius: 0.3rem;\n background-color: #bad9f1;\n color: rgb(0, 0, 0);\n}\n.wGQHAGY7JCfLGRfl21EA:hover,\n.UhZiFX8PaDQQAzdZp_pp:hover,\n.iOnHPZtk6CV7CDVlYcBX:hover,\n.Dmi0JaX5xZedWQRQ0JTg:hover {\n background-color: #1d5d90;\n}\n.Q1ftJ3MzAhg_VDXOZ5VQ:not(.Ju5BJuRfDtQHEXsJTMKb,\n.cx0tKN7_pVYTjFbmhXbn,\n.o2WadGf7GxEAvMIgF_z8,\n._A2Q5L6DGrg3kVyyBaKv),\n.X6qOOvB9S1_BA0jzyi5v:not(.Ju5BJuRfDtQHEXsJTMKb,\n.cx0tKN7_pVYTjFbmhXbn,\n.o2WadGf7GxEAvMIgF_z8,\n._A2Q5L6DGrg3kVyyBaKv),\n.Wd3S5hJp25_5ZjIWe88P:not(.Ju5BJuRfDtQHEXsJTMKb,\n.cx0tKN7_pVYTjFbmhXbn,\n.o2WadGf7GxEAvMIgF_z8,\n._A2Q5L6DGrg3kVyyBaKv),\n.uC47fzgOGLIx_IK53nSA:not(.Ju5BJuRfDtQHEXsJTMKb,\n.cx0tKN7_pVYTjFbmhXbn,\n.o2WadGf7GxEAvMIgF_z8,\n._A2Q5L6DGrg3kVyyBaKv) {\n background-color: rgba(33, 107, 165, 0.5);\n}\n.d5y26CJYP9lKuYORd5rB .Ju5BJuRfDtQHEXsJTMKb:not(.Q1ftJ3MzAhg_VDXOZ5VQ,\n.X6qOOvB9S1_BA0jzyi5v,\n.Wd3S5hJp25_5ZjIWe88P,\n.uC47fzgOGLIx_IK53nSA), .irUIHx_LKh5NBOBiMG9W .Ju5BJuRfDtQHEXsJTMKb:not(.Q1ftJ3MzAhg_VDXOZ5VQ,\n.X6qOOvB9S1_BA0jzyi5v,\n.Wd3S5hJp25_5ZjIWe88P,\n.uC47fzgOGLIx_IK53nSA),\n.d5y26CJYP9lKuYORd5rB .cx0tKN7_pVYTjFbmhXbn:not(.Q1ftJ3MzAhg_VDXOZ5VQ,\n.X6qOOvB9S1_BA0jzyi5v,\n.Wd3S5hJp25_5ZjIWe88P,\n.uC47fzgOGLIx_IK53nSA),\n.irUIHx_LKh5NBOBiMG9W .cx0tKN7_pVYTjFbmhXbn:not(.Q1ftJ3MzAhg_VDXOZ5VQ,\n.X6qOOvB9S1_BA0jzyi5v,\n.Wd3S5hJp25_5ZjIWe88P,\n.uC47fzgOGLIx_IK53nSA),\n.d5y26CJYP9lKuYORd5rB .o2WadGf7GxEAvMIgF_z8:not(.Q1ftJ3MzAhg_VDXOZ5VQ,\n.X6qOOvB9S1_BA0jzyi5v,\n.Wd3S5hJp25_5ZjIWe88P,\n.uC47fzgOGLIx_IK53nSA),\n.irUIHx_LKh5NBOBiMG9W .o2WadGf7GxEAvMIgF_z8:not(.Q1ftJ3MzAhg_VDXOZ5VQ,\n.X6qOOvB9S1_BA0jzyi5v,\n.Wd3S5hJp25_5ZjIWe88P,\n.uC47fzgOGLIx_IK53nSA),\n.d5y26CJYP9lKuYORd5rB ._A2Q5L6DGrg3kVyyBaKv:not(.Q1ftJ3MzAhg_VDXOZ5VQ,\n.X6qOOvB9S1_BA0jzyi5v,\n.Wd3S5hJp25_5ZjIWe88P,\n.uC47fzgOGLIx_IK53nSA),\n.irUIHx_LKh5NBOBiMG9W ._A2Q5L6DGrg3kVyyBaKv:not(.Q1ftJ3MzAhg_VDXOZ5VQ,\n.X6qOOvB9S1_BA0jzyi5v,\n.Wd3S5hJp25_5ZjIWe88P,\n.uC47fzgOGLIx_IK53nSA) {\n background-color: #f0f0f0;\n color: #000;\n}\n.AyCbvATBsvSyVII4VIrl,\n.lPcA2LuRC0pDFxajNwjf,\n.nImoWFtYm4ocLFSWCWcE,\n.Ijw3xyZAKdOg2WPgShkn {\n cursor: default;\n color: #ccc;\n}\n.AyCbvATBsvSyVII4VIrl:hover,\n.lPcA2LuRC0pDFxajNwjf:hover,\n.nImoWFtYm4ocLFSWCWcE:hover,\n.Ijw3xyZAKdOg2WPgShkn:hover {\n background-color: transparent;\n}\n\n.XwdxwUM4y2YUg9kXlKQe {\n position: relative;\n display: inline-block;\n width: 100%;\n}\n.XwdxwUM4y2YUg9kXlKQe .K25_pnd90XMTZ4Klx1Jh {\n position: absolute;\n padding: 0.5rem;\n box-sizing: content-box;\n}\n\n.iWuYGpCUnk5twZdl2uvD input {\n padding: 6px 10px 5px 25px;\n}\n\n.Fkimhkf2WnEYkNNoUVCO,\n.XDnxj4prbVjXf09dmO2f,\n.iGBHdm9SWTcCZyPrMKrl {\n border: 1px solid transparent;\n border-radius: 0.3rem;\n position: relative;\n}\n.Fkimhkf2WnEYkNNoUVCO:hover,\n.XDnxj4prbVjXf09dmO2f:hover,\n.iGBHdm9SWTcCZyPrMKrl:hover {\n cursor: pointer;\n}\n.Fkimhkf2WnEYkNNoUVCO:hover .fod4ZeXNMNcj6nbuusiY,\n.Fkimhkf2WnEYkNNoUVCO:hover .cBCI2huT9lOsb_gc5epr,\n.XDnxj4prbVjXf09dmO2f:hover .fod4ZeXNMNcj6nbuusiY,\n.XDnxj4prbVjXf09dmO2f:hover .cBCI2huT9lOsb_gc5epr,\n.iGBHdm9SWTcCZyPrMKrl:hover .fod4ZeXNMNcj6nbuusiY,\n.iGBHdm9SWTcCZyPrMKrl:hover .cBCI2huT9lOsb_gc5epr {\n border-top-color: #b3b3b3;\n}\n.fod4ZeXNMNcj6nbuusiY,\n.cBCI2huT9lOsb_gc5epr,\n.VakY0Xks34qzb4hYa3qg {\n transform: rotate(135deg);\n right: -16px;\n top: 0;\n}\n\n.nPyWy6q3VNkyeHuHxCU3,\n.wpu6iZ6eW6gt86vneGLD,\n.MseDnPQLK08nULYxTp7R {\n background-color: #f0f0f0;\n position: absolute;\n width: 50%;\n left: 25%;\n top: 30px;\n z-index: 1;\n text-align: center;\n border-radius: 0.3rem;\n border: 1px solid #aeaeae;\n}\n.nPyWy6q3VNkyeHuHxCU3:hover,\n.wpu6iZ6eW6gt86vneGLD:hover,\n.MseDnPQLK08nULYxTp7R:hover {\n cursor: pointer;\n}\n.CbXoXMUXkXAML5OqdZmQ,\n.ffm5d01D2HXskVm_fqCZ,\n.G_TaXgQlZnbwlh1iM6kJ {\n height: 150px;\n overflow-y: scroll;\n}\n\n.vSPtQXIYk99aJdzaS4Nc,\n.yCdWKlKLLXlxVH5hBovg,\n.l3hVVTcCgh7K2unknwjR {\n line-height: 20px;\n width: 100%;\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n.vSPtQXIYk99aJdzaS4Nc:first-of-type,\n.yCdWKlKLLXlxVH5hBovg:first-of-type,\n.l3hVVTcCgh7K2unknwjR:first-of-type {\n border-top-left-radius: 0.3rem;\n border-top-right-radius: 0.3rem;\n}\n.vSPtQXIYk99aJdzaS4Nc:last-of-type,\n.yCdWKlKLLXlxVH5hBovg:last-of-type,\n.l3hVVTcCgh7K2unknwjR:last-of-type {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n border-bottom-left-radius: 0.3rem;\n border-bottom-right-radius: 0.3rem;\n}\n.vSPtQXIYk99aJdzaS4Nc:hover,\n.yCdWKlKLLXlxVH5hBovg:hover,\n.l3hVVTcCgh7K2unknwjR:hover {\n background-color: #ccc;\n}\n.vSPtQXIYk99aJdzaS4Nc:hover .vXkrR7AEOAP1Ssk8TC9_,\n.yCdWKlKLLXlxVH5hBovg:hover .vXkrR7AEOAP1Ssk8TC9_,\n.l3hVVTcCgh7K2unknwjR:hover .vXkrR7AEOAP1Ssk8TC9_ {\n border-bottom-color: #b3b3b3;\n}\n.vSPtQXIYk99aJdzaS4Nc:hover .iQchZaRRh3iv5Xc7GMrS,\n.yCdWKlKLLXlxVH5hBovg:hover .iQchZaRRh3iv5Xc7GMrS,\n.l3hVVTcCgh7K2unknwjR:hover .iQchZaRRh3iv5Xc7GMrS {\n border-top-color: #b3b3b3;\n}\n.khuHk_hKBwLaJcMWdZu7,\n.GVruxXY96_JULBgjhzoV,\n.iMNaCIF9KpgJ2giyG6Xp {\n position: absolute;\n left: 15px;\n}\n\n.TB6k3Ln3SQGLjvKpzk00 {\n cursor: pointer;\n background-color: transparent;\n border: 0;\n outline: 0;\n padding: 0 6px 0 0;\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n display: table-cell;\n vertical-align: middle;\n}\n.TB6k3Ln3SQGLjvKpzk00::after {\n cursor: pointer;\n background-color: #216ba5;\n color: #fff;\n border-radius: 50%;\n height: 16px;\n width: 16px;\n padding: 2px;\n font-size: 12px;\n line-height: 1;\n text-align: center;\n display: table-cell;\n vertical-align: middle;\n content: "×";\n}\n.o6Uk6UM38NSgEvUYssPO {\n cursor: default;\n}\n.o6Uk6UM38NSgEvUYssPO::after {\n cursor: default;\n background-color: #ccc;\n}\n\n.NqiyGsI_arwBCpjv5BtO {\n background: #f0f0f0;\n border-top: 1px solid #aeaeae;\n cursor: pointer;\n text-align: center;\n font-weight: bold;\n padding: 5px 0;\n clear: left;\n}\n\n.b3tzogZSm7e4XApLipQ4 {\n position: fixed;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.8);\n left: 0;\n top: 0;\n justify-content: center;\n align-items: center;\n display: flex;\n z-index: 2147483647;\n}\n.b3tzogZSm7e4XApLipQ4 .g20E84oit5VcucrOetdt,\n.b3tzogZSm7e4XApLipQ4 .FBbzZs9SCSAIjYuoSyRG,\n.b3tzogZSm7e4XApLipQ4 .PRmwxRjTBpTwLFvAPXRj {\n width: 3rem;\n line-height: 3rem;\n}\n@media (max-width: 400px), (max-height: 550px) {\n .b3tzogZSm7e4XApLipQ4 .g20E84oit5VcucrOetdt,\n .b3tzogZSm7e4XApLipQ4 .FBbzZs9SCSAIjYuoSyRG,\n .b3tzogZSm7e4XApLipQ4 .PRmwxRjTBpTwLFvAPXRj {\n width: 2rem;\n line-height: 2rem;\n }\n}\n.b3tzogZSm7e4XApLipQ4 .iL95B_TSozIO0CpDlWrL,\n.b3tzogZSm7e4XApLipQ4 .iI17TarD3Z6Umn9z3Juw {\n font-size: 1.44rem;\n}\n\n.Y4vQp415O7L4E9czhiVM {\n width: 13.8rem;\n margin: 0.4rem;\n padding-right: 0.2rem;\n padding-left: 0.2rem;\n height: auto;\n}\n\n.CoOG3Hp1BwIXTQyqpdE3 {\n position: absolute;\n clip-path: circle(0);\n border: 0;\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n width: 1px;\n white-space: nowrap;\n}\n\n.K25_pnd90XMTZ4Klx1Jh {\n width: 1em;\n height: 1em;\n vertical-align: -0.125em;\n}\n',""]),a.locals={"react-datepicker__year-read-view--down-arrow":"fod4ZeXNMNcj6nbuusiY","react-datepicker__month-read-view--down-arrow":"cBCI2huT9lOsb_gc5epr","react-datepicker__month-year-read-view--down-arrow":"VakY0Xks34qzb4hYa3qg","react-datepicker__navigation-icon":"CJNS2t3pDg318Lmfp0H9","react-datepicker-popper":"S7qP0N5diUkHRbpmBhGp","react-datepicker__triangle":"XLn4952nMF55Jw0GXDmb","react-datepicker-wrapper":"KakHaSX4szBEEjcf70vM","react-datepicker":"IXJ5rwop2w6dAFg0xwha","react-datepicker--time-only":"BBU7nch3AaQONwoSb0AF","react-datepicker__time-container":"wiigGjECCEfYQqcWh1CC","react-datepicker__time":"kdNnFH7h141xWlJBNBAE","react-datepicker__time-box":"xR09WX3KWETugy4MjvAw","react-datepicker__header":"iSaeUIwlaf7GnGRPKypq","react-datepicker__header--time":"gpmx6nWYaXqRSIzTTzYK","react-datepicker__header--time--only":"YpdCRhelcevXY3xKetGV","react-datepicker__header--has-time-select":"lHn6puFtyRMP5BznAWwg","react-datepicker__year-dropdown-container--select":"cq12I7owD4CQPLDFlmQH","react-datepicker__month-dropdown-container--select":"chGdB2_ty_cPqlfG0ovB","react-datepicker__month-year-dropdown-container--select":"n0apu1iBCuGqvCTW5dHj","react-datepicker__year-dropdown-container--scroll":"k_3yaNBi95YQT4LGcSVh","react-datepicker__month-dropdown-container--scroll":"vuBHhxTox3tZZ9JuJEZB","react-datepicker__month-year-dropdown-container--scroll":"okTx1gFNVyTTtBVZEEGk","react-datepicker__current-month":"iL95B_TSozIO0CpDlWrL","react-datepicker-time__header":"iI17TarD3Z6Umn9z3Juw","react-datepicker-year-header":"E9rpIAEJtJEl7pa7qEuo","react-datepicker__navigation":"srZWcT5CWg8vgM3hH18g","react-datepicker__navigation--previous":"Sco1tMPmXf7wCrIZTUKP","react-datepicker__navigation--next":"CokSq81sNmxUOfIuUmBk","react-datepicker__navigation--next--with-time":"C6QgDjDW9XkzSeKBiKsx","react-datepicker__navigation--next--with-today-button":"BjHpYPVhimASeZ9rqIIE","react-datepicker__navigation--years":"EfYxQSkZvNas6WzjRi3w","react-datepicker__navigation--years-previous":"iQchZaRRh3iv5Xc7GMrS","react-datepicker__navigation--years-upcoming":"vXkrR7AEOAP1Ssk8TC9_","react-datepicker__navigation-icon--next":"jka_ZXFD_brEsiSoH1XM","react-datepicker__navigation-icon--previous":"Ds74F7ygh8GcuhGmz9Pe","react-datepicker__month-container":"oS48bGzCWqZ3d2E20CsJ","react-datepicker__year":"tmQzD5x5ld7nSjH7ZUnO","react-datepicker__year-wrapper":"fWsedLE2WlI0Uva4Lqaw","react-datepicker__year-text":"zw5Lhb9GbDzOt6f7r926","react-datepicker__month":"zv_wKFwQTdGgX3q3IP4v","react-datepicker__month-text":"i6PQIW5c6RuAjK40D4Hg","react-datepicker__quarter-text":"WdZyAV1QQN1ioR2gqqsj","react-datepicker__input-time-container":"Fo84qakRcEGX6GooYA5e","react-datepicker-time__caption":"XXXv83f7WOuLmbm1H05J","react-datepicker-time__input-container":"BLUTkwvPbaQOwHa3X43u","react-datepicker-time__input":"jnHR3UyoNnIADznASJG9","react-datepicker-time__delimiter":"N_j3rdvPcQs4hA205_Ec","react-datepicker__time-container--with-today-button":"VNQdab5EQ_Xily2VgT4y","react-datepicker__time-list":"U6IqAY2mhiwTZLSOKNDj","react-datepicker__time-list-item":"bplWpSY4gEUYCDwSdBta","react-datepicker__time-list-item--selected":"hQdfMP5iUlLX3fG_xVfB","react-datepicker__time-list-item--disabled":"dsKNk2Mc_V41Wl7QFllJ","react-datepicker__week-number":"s0x5FtIR7jZlJGI6ON6A","react-datepicker__week-number--clickable":"FX5T_2nGFgyIX40YwWlP","react-datepicker__week-number--selected":"hHlKSv8vBMYNdzQ4SGrB","react-datepicker__week-number--keyboard-selected":"uppPl_vEFrDA3Z1Lh5VA","react-datepicker__day-names":"mHCnDUBiAlkyJzXQ4uhR","react-datepicker__week":"uJcDoRPy_nkk5kpdk6jT","react-datepicker__day-name":"g20E84oit5VcucrOetdt","react-datepicker__day":"FBbzZs9SCSAIjYuoSyRG","react-datepicker__time-name":"PRmwxRjTBpTwLFvAPXRj","react-datepicker__day--today":"GVs2fEogxVFWLeQF1otT","react-datepicker__month-text--today":"cR5J0ggY8bx7hTBLoco8","react-datepicker__quarter-text--today":"_8BLyOvIc3pzANrZmKTUE","react-datepicker__year-text--today":"l_kLoN_9kcZpEdzGaUIx","react-datepicker__day--highlighted":"xxW4z0V81RNyMOJaMhJm","react-datepicker__month-text--highlighted":"W2A3obRM54JNaf_J0c4_","react-datepicker__quarter-text--highlighted":"_WQpnBeri_7kudCBXQgr","react-datepicker__year-text--highlighted":"jiIOfz2jg2V5wpgPTa6z","react-datepicker__day--highlighted-custom-1":"GFRbNuTzWqST3J4gLyn2","react-datepicker__month-text--highlighted-custom-1":"TlPVIfju4H7pAyrEZ2qr","react-datepicker__quarter-text--highlighted-custom-1":"hTNIRkA1WOJ0lQ05ichL","react-datepicker__year-text--highlighted-custom-1":"DJziLB9iaq8dRvJ6SwlJ","react-datepicker__day--highlighted-custom-2":"b7jJrxJyLVE5GiYugi9Q","react-datepicker__month-text--highlighted-custom-2":"FDlW0IBQzRVImfVzT4VP","react-datepicker__quarter-text--highlighted-custom-2":"Ci7Bb8uw8HtlH7_eiIR4","react-datepicker__year-text--highlighted-custom-2":"GIuiIf0cMEN6p6fEcDIG","react-datepicker__day--holidays":"OumOYsBrrNR0j7vhpkuW","react-datepicker__month-text--holidays":"tXgYeGYy3t_75LMHVbZn","react-datepicker__quarter-text--holidays":"zZDApuUInndtQzSKik7G","react-datepicker__year-text--holidays":"_3RXS5fmtTfatoP0jG_R","holiday-overlay":"MuqpaITSDzGhnuE17MqW","react-datepicker__day--selected":"b7YWalbftblur37KulHN","react-datepicker__day--in-selecting-range":"Q1ftJ3MzAhg_VDXOZ5VQ","react-datepicker__day--in-range":"Ju5BJuRfDtQHEXsJTMKb","react-datepicker__month-text--selected":"uCtgRNlb4ATKF9EyUr65","react-datepicker__month-text--in-selecting-range":"X6qOOvB9S1_BA0jzyi5v","react-datepicker__month-text--in-range":"cx0tKN7_pVYTjFbmhXbn","react-datepicker__quarter-text--selected":"Ebbec1ld974uRNs89kr7","react-datepicker__quarter-text--in-selecting-range":"Wd3S5hJp25_5ZjIWe88P","react-datepicker__quarter-text--in-range":"o2WadGf7GxEAvMIgF_z8","react-datepicker__year-text--selected":"ikStZgOtZYloOhYUCfz7","react-datepicker__year-text--in-selecting-range":"uC47fzgOGLIx_IK53nSA","react-datepicker__year-text--in-range":"_A2Q5L6DGrg3kVyyBaKv","react-datepicker__day--keyboard-selected":"wGQHAGY7JCfLGRfl21EA","react-datepicker__month-text--keyboard-selected":"UhZiFX8PaDQQAzdZp_pp","react-datepicker__quarter-text--keyboard-selected":"iOnHPZtk6CV7CDVlYcBX","react-datepicker__year-text--keyboard-selected":"Dmi0JaX5xZedWQRQ0JTg","react-datepicker__month--selecting-range":"d5y26CJYP9lKuYORd5rB","react-datepicker__year--selecting-range":"irUIHx_LKh5NBOBiMG9W","react-datepicker__day--disabled":"AyCbvATBsvSyVII4VIrl","react-datepicker__month-text--disabled":"lPcA2LuRC0pDFxajNwjf","react-datepicker__quarter-text--disabled":"nImoWFtYm4ocLFSWCWcE","react-datepicker__year-text--disabled":"Ijw3xyZAKdOg2WPgShkn","react-datepicker__input-container":"XwdxwUM4y2YUg9kXlKQe","react-datepicker__calendar-icon":"K25_pnd90XMTZ4Klx1Jh","react-datepicker__view-calendar-icon":"iWuYGpCUnk5twZdl2uvD","react-datepicker__year-read-view":"Fkimhkf2WnEYkNNoUVCO","react-datepicker__month-read-view":"XDnxj4prbVjXf09dmO2f","react-datepicker__month-year-read-view":"iGBHdm9SWTcCZyPrMKrl","react-datepicker__year-dropdown":"nPyWy6q3VNkyeHuHxCU3","react-datepicker__month-dropdown":"wpu6iZ6eW6gt86vneGLD","react-datepicker__month-year-dropdown":"MseDnPQLK08nULYxTp7R","react-datepicker__year-dropdown--scrollable":"CbXoXMUXkXAML5OqdZmQ","react-datepicker__month-dropdown--scrollable":"ffm5d01D2HXskVm_fqCZ","react-datepicker__month-year-dropdown--scrollable":"G_TaXgQlZnbwlh1iM6kJ","react-datepicker__year-option":"vSPtQXIYk99aJdzaS4Nc","react-datepicker__month-option":"yCdWKlKLLXlxVH5hBovg","react-datepicker__month-year-option":"l3hVVTcCgh7K2unknwjR","react-datepicker__year-option--selected":"khuHk_hKBwLaJcMWdZu7","react-datepicker__month-option--selected":"GVruxXY96_JULBgjhzoV","react-datepicker__month-year-option--selected":"iMNaCIF9KpgJ2giyG6Xp","react-datepicker__close-icon":"TB6k3Ln3SQGLjvKpzk00","react-datepicker__close-icon--disabled":"o6Uk6UM38NSgEvUYssPO","react-datepicker__today-button":"NqiyGsI_arwBCpjv5BtO","react-datepicker__portal":"b3tzogZSm7e4XApLipQ4","react-datepicker__children-container":"Y4vQp415O7L4E9czhiVM","react-datepicker__aria-live":"CoOG3Hp1BwIXTQyqpdE3"};const s=a},816:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2284);function o(e){var t=function(e){if("object"!=(0,r.A)(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=(0,r.A)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,r.A)(t)?t:t+""}},834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var r,o=((r=n(411))&&r.__esModule?r:{default:r}).default,i=o.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=o.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=o.canUseDOM?window.NodeList:{},t.canUseDOM=o.canUseDOM,t.default=i},838:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],o=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(5093))},887:(e,t,n)=>{var r=n(6993),o=n(1791);e.exports=function(e,t,n,i,a){return new o(r().w(e,t,n,i),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},961:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(2551)},979:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(2998),o=n(551),i=n(4188);function a(e,t){(0,o.A)(2,arguments);var n=(0,i.A)(t);return(0,r.default)(e,-n)}},992:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(6757),o=n(551);function i(e,t){(0,o.A)(2,arguments);var n=(0,r.default)(e),i=(0,r.default)(t);return n.getTime()===i.getTime()}},1011:function(e,t,n){!function(e){"use strict";e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?":e":1===t||2===t?":a":":e")},week:{dow:1,doy:4}})}(n(5093))},1020:(e,t,n)=>{"use strict";n(5228);var r=n(6540),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,d=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:d,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},1025:function(e,t,n){!function(e){"use strict";var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t||"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})}(n(5093))},1052:function(e,t,n){!function(e){"use strict";var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(e,n,r,o){var i=function(e){var n=Math.floor(e%1e3/100),r=Math.floor(e%100/10),o=e%10,i="";return n>0&&(i+=t[n]+"vatlh"),r>0&&(i+=(""!==i?" ":"")+t[r]+"maH"),o>0&&(i+=(""!==i?" ":"")+t[o]),""===i?"pagh":i}(e);switch(r){case"ss":return i+" lup";case"mm":return i+" tup";case"hh":return i+" rep";case"dd":return i+" jaj";case"MM":return i+" jar";case"yy":return i+" DIS"}}e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var t=e;return-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"},past:function(e){var t=e;return-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"},s:"puS lup",ss:n,m:"wa’ tup",mm:n,h:"wa’ rep",hh:n,d:"wa’ jaj",dd:n,M:"wa’ jar",MM:n,y:"wa’ DIS",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(5093))},1053:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(123),o=n(9411),i=n(4127),a=n(551),s=6048e5;function l(e){(0,a.A)(1,arguments);var t=(0,r.default)(e),n=(0,o.A)(t).getTime()-function(e){(0,a.A)(1,arguments);var t=(0,i.A)(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),(0,o.A)(n)}(t).getTime();return Math.round(n/s)+1}},1104:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(4188),o=n(123),i=n(551);function a(e,t){(0,i.A)(2,arguments);var n=(0,o.default)(e),a=(0,r.A)(t),s=n.getFullYear(),l=n.getDate(),c=new Date(0);c.setFullYear(s,a,15),c.setHours(0,0,0,0);var d=function(e){(0,i.A)(1,arguments);var t=(0,o.default)(e),n=t.getFullYear(),r=t.getMonth(),a=new Date(0);return a.setFullYear(n,r+1,0),a.setHours(0,0,0,0),a.getDate()}(c);return n.setMonth(a,Math.min(l,d)),n}},1109:(e,t,n)=>{"use strict";n.d(t,{ef:()=>i,lJ:()=>s,xM:()=>a});var r=["D","DD"],o=["YY","YYYY"];function i(e){return-1!==r.indexOf(e)}function a(e){return-1!==o.indexOf(e)}function s(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}},1113:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},1127:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(123),o=n(551);function i(e){(0,o.A)(1,arguments);var t=(0,r.default)(e);return t.setHours(0,0,0,0),t}},1135:function(e,t,n){!function(e){"use strict";e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần trước lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",w:"một tuần",ww:"%d tuần",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(5093))},1221:function(e,t,n){!function(e){"use strict";var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(5093))},1290:function(e,t,n){!function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,n){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}})}(n(5093))},1345:(e,t,n)=>{"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var d=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;d.call(this,e,t,r)}}return e}n.r(t),n.d(t,{polyfill:()=>a}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},1368:e=>{"use strict";e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708%27/%3e%3c/svg%3e"},1451:e=>{"use strict";e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27%23052c65%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpath d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e"},1470:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(6540))&&r.__esModule?r:{default:r};function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){for(var n=0;n=3&&e%100<=10?3:e%100>=11?4:5},n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(e){return function(r,o,i,a){var s=t(r),l=n[e][t(r)];return 2===s&&(l=l[o?0:1]),l.replace(/%d/i,r)}},o=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-dz",{months:o,monthsShort:o,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:0,doy:4}})}(n(5093))},1509:function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},o={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},i=function(e){return function(t,n,i,a){var s=r(t),l=o[e][r(t)];return 2===s&&(l=l[n?0:1]),l.replace(/%d/i,t)}},a=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return n[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(5093))},1524:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(4188),o=n(7767),i=n(551),a=36e5;function s(e,t){(0,i.A)(2,arguments);var n=(0,r.A)(t);return(0,o.A)(e,n*a)}},1541:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(5093))},1545:function(e,t,n){!function(e){"use strict";var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:!0,weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})}(n(5093))},1591:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(4188),o=n(123),i=n(551);function a(e,t){(0,i.A)(2,arguments);var n=(0,o.default)(e),a=(0,r.A)(t);return n.setSeconds(a),n}},1601:e=>{"use strict";e.exports=function(e){return e[1]}},1632:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1200?"上午":1200===r?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(5093))},1713:function(e,t,n){!function(e){"use strict";e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?n?'לפנה"צ':"לפני הצהריים":e<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}})}(n(5093))},1720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var r=Object.assign||function(e){for(var t=1;t{"use strict";n.d(t,{A:()=>i});var r=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},o=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}};const i={p:o,P:function(e,t){var n,i=e.match(/(P+)(p+)?/)||[],a=i[1],s=i[2];if(!s)return r(e,t);switch(a){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",r(a,t)).replace("{{time}}",o(s,t))}}},1791:(e,t,n)=>{var r=n(5172),o=n(5546);e.exports=function e(t,n){function i(e,o,a,s){try{var l=t[e](o),c=l.value;return c instanceof r?n.resolve(c.v).then(function(e){i("next",e,a,s)},function(e){i("throw",e,a,s)}):n.resolve(c).then(function(e){l.value=e,a(l)},function(e){return i("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,t,r){function o(){return new n(function(t,n){i(e,r,t,n)})}return a=a?a.then(o,o):o()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},1794:function(e,t,n){!function(e){"use strict";e.defineLocale("ka",{months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,function(e,t,n){return"ი"===n?t+"ში":t+n+"ში"})},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):e},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}})}(n(5093))},1806:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(7499),o=n(551),i=n(4188);function a(e,t){var n;(0,o.A)(1,arguments);var a=(0,i.A)(null!==(n=null==t?void 0:t.additionalDigits)&&void 0!==n?n:2);if(2!==a&&1!==a&&0!==a)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var f,g=function(e){var t,n={},r=e.split(s.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],s.timeZoneDelimiter.test(n.date)&&(n.date=e.split(s.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t){var o=s.timezone.exec(t);o?(n.time=t.replace(o[1],""),n.timezone=o[1]):n.time=t}return n}(e);if(g.date){var b=function(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var o=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:null===i?o:100*i,restDateString:e.slice((r[1]||r[2]).length)}}(g.date,a);f=function(e,t){if(null===t)return new Date(NaN);var n=e.match(l);if(!n)return new Date(NaN);var r=!!n[4],o=u(n[1]),i=u(n[2])-1,a=u(n[3]),s=u(n[4]),c=u(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,c)?function(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var o=7*(t-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+o),r}(t,s,c):new Date(NaN);var d=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(m[t]||(h(e)?29:28))}(t,i,a)&&function(e,t){return t>=1&&t<=(h(e)?366:365)}(t,o)?(d.setUTCFullYear(t,i,Math.max(o,a)),d):new Date(NaN)}(b.restDateString,b.year)}if(!f||isNaN(f.getTime()))return new Date(NaN);var v,y=f.getTime(),_=0;if(g.time&&(_=function(e){var t=e.match(c);if(!t)return NaN;var n=p(t[1]),o=p(t[2]),i=p(t[3]);return function(e,t,n){return 24===e?0===t&&0===n:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,o,i)?n*r.s0+o*r.Cg+1e3*i:NaN}(g.time),isNaN(_)))return new Date(NaN);if(!g.timezone){var w=new Date(y+_),k=new Date(0);return k.setFullYear(w.getUTCFullYear(),w.getUTCMonth(),w.getUTCDate()),k.setHours(w.getUTCHours(),w.getUTCMinutes(),w.getUTCSeconds(),w.getUTCMilliseconds()),k}return v=function(e){if("Z"===e)return 0;var t=e.match(d);if(!t)return 0;var n="+"===t[1]?-1:1,o=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,i)?n*(o*r.s0+i*r.Cg):NaN}(g.timezone),isNaN(v)?new Date(NaN):new Date(y+_+v)}var s={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},l=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,c=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,d=/^([+-])(\d{2})(?::?(\d{2}))?$/;function u(e){return e?parseInt(e):1}function p(e){return e&&parseFloat(e.replace(",","."))||0}var m=[31,null,31,30,31,30,31,31,30,31,30,31];function h(e){return e%400==0||e%4==0&&e%100!=0}},1810:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(1127),o=n(551);function i(e,t){(0,o.A)(2,arguments);var n=(0,r.default)(e),i=(0,r.default)(t);return n.getTime()===i.getTime()}},1827:function(e,t,n){!function(e){"use strict";e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){return 0===this.day()?"[la scorsa] dddd [alle] LT":"[lo scorso] dddd [alle] LT"},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(5093))},1848:function(e,t,n){!function(e){"use strict";e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(5093))},1858:(e,t,n)=>{"use strict";n.d(t,{q:()=>o});var r={};function o(){return r}},1885:function(e,t,n){!function(e){"use strict";e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})}(n(5093))},1893:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function o(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var i,a={date:o({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:o({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:o({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},s={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function l(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function c(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,s=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(var n=0;n0?"in "+o:o+" ago":o},formatLong:a,formatRelative:function(e,t,n,r){return s[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:l({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:l({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:l({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:l({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:l({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(i={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(i.matchPattern);if(!n)return null;var r=n[0],o=e.match(i.parsePattern);if(!o)return null;var a=i.valueCallback?i.valueCallback(o[0]):o[0];return{value:a=t.valueCallback?t.valueCallback(a):a,rest:e.slice(r.length)}}),era:c({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:c({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:c({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:c({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:c({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}}},1928:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},2002:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(123),o=n(551);function i(e,t){(0,o.A)(2,arguments);var n=(0,r.default)(e),i=(0,r.default)(t);return n.getFullYear()-i.getFullYear()}},2012:(e,t,n)=>{"use strict";var r=n(9516),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},2044:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(123),o=n(551);function i(e){return(0,o.A)(1,arguments),(0,r.default)(e).getMonth()}},2118:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(4188),o=n(123),i=n(551);function a(e,t){(0,i.A)(2,arguments);var n=(0,o.default)(e),a=(0,r.A)(t);if(isNaN(a))return new Date(NaN);if(!a)return n;var s=n.getDate(),l=new Date(n.getTime());return l.setMonth(n.getMonth()+a+1,0),s>=l.getDate()?l:(n.setFullYear(l.getFullYear(),l.getMonth(),s),n)}},2124:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var o={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return r?o[n][0]:o[n][1]}e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार".split("_"),weekdaysShort:"आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.".split("_"),weekdaysMin:"आ_सो_मं_बु_ब्रे_सु_शे".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [वाजतां]",LTS:"A h:mm:ss [वाजतां]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [वाजतां]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM YYYY, A h:mm [वाजतां]"},calendar:{sameDay:"[आयज] LT",nextDay:"[फाल्यां] LT",nextWeek:"[फुडलो] dddd[,] LT",lastDay:"[काल] LT",lastWeek:"[फाटलो] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s आदीं",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,t){return"D"===t?e+"वेर":e},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,t){return 12===e&&(e=0),"राती"===t?e<4?e:e+12:"सकाळीं"===t?e:"दनपारां"===t?e>12?e:e+12:"सांजे"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"राती":e<12?"सकाळीं":e<16?"दनपारां":e<20?"सांजे":"राती"}})}(n(5093))},2218:function(e,t,n){!function(e){"use strict";e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})}(n(5093))},2238:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(4188),o=n(2998),i=n(551);function a(e,t){(0,i.A)(2,arguments);var n=7*(0,r.A)(t);return(0,o.default)(e,n)}},2247:e=>{"use strict";e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%2833, 37, 41, 0.75%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},2264:function(e,t,n){!function(e){"use strict";var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},week:{dow:1,doy:4}})}(n(5093))},2268:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Manager:()=>a,Popper:()=>w,Reference:()=>E,usePopper:()=>b});var r=n(6540),o=r.createContext(),i=r.createContext();function a(e){var t=e.children,n=r.useState(null),a=n[0],s=n[1],l=r.useRef(!1);r.useEffect(function(){return function(){l.current=!0}},[]);var c=r.useCallback(function(e){l.current||s(e)},[]);return r.createElement(o.Provider,{value:a},r.createElement(i.Provider,{value:c},t))}var s=function(e){return Array.isArray(e)?e[0]:e},l=function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=2&&r%10<=4&&(r%100<10||r%100>=20)?o[1]:o[2]);var r,o}var n=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:t,m:t,mm:t,h:"час",hh:t,d:"день",dd:t,w:"неделя",ww:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}})}(n(5093))},2274:function(e,t,n){!function(e){"use strict";e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"én time",hh:"%d timer",d:"én dag",dd:"%d dager",w:"én uke",ww:"%d uker",M:"én måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(5093))},2284:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},2297:function(e,t,n){!function(e){"use strict";e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(5093))},2346:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>O});var r=n(6828),o=n(5654),i=n(123),a=n(551),s=n(1053),l=n(4127),c=n(6894),d=n(464);function u(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?n:1-n;return u("yy"===t?r%100:r,t.length)},m=function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):u(n+1,2)},h=function(e,t){return u(e.getUTCDate(),t.length)},f=function(e,t){return u(e.getUTCHours()%12||12,t.length)},g=function(e,t){return u(e.getUTCHours(),t.length)},b=function(e,t){return u(e.getUTCMinutes(),t.length)},v=function(e,t){return u(e.getUTCSeconds(),t.length)},y=function(e,t){var n=t.length,r=e.getUTCMilliseconds();return u(Math.floor(r*Math.pow(10,n-3)),t.length)};function _(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+u(i,2)}function w(e,t){return e%60==0?(e>0?"-":"+")+u(Math.abs(e)/60,2):k(e,t)}function k(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+u(Math.floor(o/60),2)+n+u(o%60,2)}const x={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return p(e,t)},Y:function(e,t,n,r){var o=(0,d.A)(e,r),i=o>0?o:1-o;return"YY"===t?u(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):u(i,t.length)},R:function(e,t){return u((0,l.A)(e),t.length)},u:function(e,t){return u(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return u(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return u(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return m(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return u(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=(0,c.A)(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):u(o,t.length)},I:function(e,t,n){var r=(0,s.A)(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):u(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):h(e,t)},D:function(e,t,n){var r=function(e){(0,a.A)(1,arguments);var t=(0,i.default)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):u(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return u(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return u(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return u(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return f(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):g(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):u(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):u(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):b(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):v(e,t)},S:function(e,t){return y(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return w(o);case"XXXX":case"XX":return k(o);default:return k(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return w(o);case"xxxx":case"xx":return k(o);default:return k(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+_(o,":");default:return"GMT"+k(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+_(o,":");default:return"GMT"+k(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return u(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return u((r._originalDate||e).getTime(),t.length)}};var E=n(1788),S=n(7044),M=n(1109),C=n(4188),T=n(1858),A=n(1893),D=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,L=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,P=/^'([^]*?)'?$/,I=/''/g,N=/[a-zA-Z]/;function O(e,t,n){var s,l,c,d,u,p,m,h,f,g,b,v,y,_,w,k,O,R;(0,a.A)(2,arguments);var F=String(t),j=(0,T.q)(),Y=null!==(s=null!==(l=null==n?void 0:n.locale)&&void 0!==l?l:j.locale)&&void 0!==s?s:A.A,z=(0,C.A)(null!==(c=null!==(d=null!==(u=null!==(p=null==n?void 0:n.firstWeekContainsDate)&&void 0!==p?p:null==n||null===(m=n.locale)||void 0===m||null===(h=m.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==u?u:j.firstWeekContainsDate)&&void 0!==d?d:null===(f=j.locale)||void 0===f||null===(g=f.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==c?c:1);if(!(z>=1&&z<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var H=(0,C.A)(null!==(b=null!==(v=null!==(y=null!==(_=null==n?void 0:n.weekStartsOn)&&void 0!==_?_:null==n||null===(w=n.locale)||void 0===w||null===(k=w.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==y?y:j.weekStartsOn)&&void 0!==v?v:null===(O=j.locale)||void 0===O||null===(R=O.options)||void 0===R?void 0:R.weekStartsOn)&&void 0!==b?b:0);if(!(H>=0&&H<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!Y.localize)throw new RangeError("locale must contain localize property");if(!Y.formatLong)throw new RangeError("locale must contain formatLong property");var B=(0,i.default)(e);if(!(0,r.default)(B))throw new RangeError("Invalid time value");var V=(0,S.A)(B),W=(0,o.A)(B,V),U={firstWeekContainsDate:z,weekStartsOn:H,locale:Y,_originalDate:B};return F.match(L).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,E.A[t])(e,Y.formatLong):e}).join("").match(D).map(function(r){if("''"===r)return"'";var o,i,a=r[0];if("'"===a)return(i=(o=r).match(P))?i[1].replace(I,"'"):o;var s=x[a];if(s)return null!=n&&n.useAdditionalWeekYearTokens||!(0,M.xM)(r)||(0,M.lJ)(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!(0,M.ef)(r)||(0,M.lJ)(r,t,String(e)),s(W,r,Y.localize,U);if(a.match(N))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return r}).join("")}},2353:function(e,t,n){!function(e){"use strict";var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},o=function(e){return function(t,o,i,a){var s=n(t),l=r[e][n(t)];return 2===s&&(l=l[o?0:1]),l.replace(/%d/i,t)}},i=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-ly",{months:i,monthsShort:i,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:o("s"),ss:o("s"),m:o("m"),mm:o("m"),h:o("h"),hh:o("h"),d:o("d"),dd:o("d"),M:o("M"),MM:o("M"),y:o("y"),yy:o("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(5093))},2379:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(123),o=n(551);function i(e){return(0,o.A)(1,arguments),(0,r.default)(e).getFullYear()}},2411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce(function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])},[]).filter(a)};var n="none",r="contents",o=/^(input|select|textarea|button|object|iframe)$/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var o=window.getComputedStyle(e),i=o.getPropertyValue("display");return t?i!==r&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,o):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function a(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(o.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},2475:function(e,t,n){!function(e){"use strict";e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(n(5093))},2477:function(e,t,n){!function(e){"use strict";e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(5093))},2505:(e,t,n)=>{e.exports=n(8015)},2551:(e,t,n)=>{"use strict";var r=n(6540),o=n(5228),i=n(9982);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!m.call(f,e)||!m.call(h,e)&&(p.test(e)?f[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(v,y);b[t]=new g(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(v,y);b[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(v,y);b[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)});var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=60103,x=60106,E=60107,S=60108,M=60114,C=60109,T=60110,A=60112,D=60113,L=60120,P=60115,I=60116,N=60121,O=60128,R=60129,F=60130,j=60131;if("function"==typeof Symbol&&Symbol.for){var Y=Symbol.for;k=Y("react.element"),x=Y("react.portal"),E=Y("react.fragment"),S=Y("react.strict_mode"),M=Y("react.profiler"),C=Y("react.provider"),T=Y("react.context"),A=Y("react.forward_ref"),D=Y("react.suspense"),L=Y("react.suspense_list"),P=Y("react.memo"),I=Y("react.lazy"),N=Y("react.block"),Y("react.scope"),O=Y("react.opaque.id"),R=Y("react.debug_trace_mode"),F=Y("react.offscreen"),j=Y("react.legacy_hidden")}var z,H="function"==typeof Symbol&&Symbol.iterator;function B(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=H&&e[H]||e["@@iterator"])?e:null}function V(e){if(void 0===z)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||""}return"\n"+z+e}var W=!1;function U(e,t){if(!e||W)return"";W=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var o=e.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{W=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?V(e):""}function G(e){switch(e.tag){case 5:return V(e.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return U(e.type,!1);case 11:return U(e.type.render,!1);case 22:return U(e.type._render,!1);case 1:return U(e.type,!0);default:return""}}function q(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case E:return"Fragment";case x:return"Portal";case M:return"Profiler";case S:return"StrictMode";case D:return"Suspense";case L:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case A:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case P:return q(e.type);case N:return q(e._render);case I:t=e._payload,e=e._init;try{return q(e(t))}catch(e){}}return null}function K(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function X(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Q(e){e._valueTracker||(e._valueTracker=function(e){var t=X(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function J(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=X(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Z(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function $(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=K(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&_(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=K(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&Z(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,function(e){null!=e&&(t+=e)}),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:K(n)}}function ce(e,t){var n=K(t.value),r=K(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function de(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var ue="http://www.w3.org/1999/xhtml";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function me(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var he,fe,ge=(fe=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((he=he||document.createElement("div")).innerHTML="",t=he.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return fe(e,t)})}:fe);function be(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ve={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","ms","Moz","O"];function _e(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}function we(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=_e(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(ve).forEach(function(e){ye.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ve[t]=ve[e]})});var ke=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function xe(e,t){if(t){if(ke[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function Ee(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Se(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Me=null,Ce=null,Te=null;function Ae(e){if(e=no(e)){if("function"!=typeof Me)throw Error(a(280));var t=e.stateNode;t&&(t=oo(t),Me(e.stateNode,e.type,t))}}function De(e){Ce?Te?Te.push(e):Te=[e]:Ce=e}function Le(){if(Ce){var e=Ce,t=Te;if(Te=Ce=null,Ae(e),t)for(e=0;e(r=31-Vt(r))?0:1<n;n++)t.push(e);return t}function Bt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Vt(t)]=n}var Vt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Wt(e)/Ut|0)|0},Wt=Math.log,Ut=Math.LN2,Gt=i.unstable_UserBlockingPriority,qt=i.unstable_runWithPriority,Kt=!0;function Xt(e,t,n,r){Re||Ne();var o=Jt,i=Re;Re=!0;try{Ie(o,e,t,n,r)}finally{(Re=i)||je()}}function Qt(e,t,n,r){qt(Gt,Jt.bind(null,e,t,n,r))}function Jt(e,t,n,r){var o;if(Kt)if((o=!(4&t))&&0=Fn),zn=String.fromCharCode(32),Hn=!1;function Bn(e,t){switch(e){case"keyup":return-1!==On.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Wn=!1,Un={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Un[e.type]:"textarea"===t}function qn(e,t,n,r){De(r),0<(t=Rr(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kn=null,Xn=null;function Qn(e){Tr(e,0)}function Jn(e){if(J(ro(e)))return e}function Zn(e,t){if("change"===e)return t}var $n=!1;if(u){var er;if(u){var tr="oninput"in document;if(!tr){var nr=document.createElement("div");nr.setAttribute("oninput","return;"),tr="function"==typeof nr.oninput}er=tr}else er=!1;$n=er&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pr(r)}}function hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fr(){for(var e=window,t=Z();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Z((e=t.contentWindow).document)}return t}function gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var br=u&&"documentMode"in document&&11>=document.documentMode,vr=null,yr=null,_r=null,wr=!1;function kr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;wr||null==vr||vr!==Z(r)||(r="selectionStart"in(r=vr)&&gr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},_r&&ur(_r,r)||(_r=r,0<(r=Rr(yr,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}Nt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Nt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Nt(It,2);for(var xr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Er=0;Erso||(e.current=ao[so],ao[so]=null,so--)}function uo(e,t){so++,ao[so]=e.current,e.current=t}var po={},mo=lo(po),ho=lo(!1),fo=po;function go(e,t){var n=e.type.contextTypes;if(!n)return po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function bo(e){return null!=e.childContextTypes}function vo(){co(ho),co(mo)}function yo(e,t,n){if(mo.current!==po)throw Error(a(168));uo(mo,t),uo(ho,n)}function _o(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,q(t)||"Unknown",i));return o({},n,r)}function wo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||po,fo=mo.current,uo(mo,e),uo(ho,ho.current),!0}function ko(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=_o(e,t,fo),r.__reactInternalMemoizedMergedChildContext=e,co(ho),co(mo),uo(mo,e)):co(ho),uo(ho,n)}var xo=null,Eo=null,So=i.unstable_runWithPriority,Mo=i.unstable_scheduleCallback,Co=i.unstable_cancelCallback,To=i.unstable_shouldYield,Ao=i.unstable_requestPaint,Do=i.unstable_now,Lo=i.unstable_getCurrentPriorityLevel,Po=i.unstable_ImmediatePriority,Io=i.unstable_UserBlockingPriority,No=i.unstable_NormalPriority,Oo=i.unstable_LowPriority,Ro=i.unstable_IdlePriority,Fo={},jo=void 0!==Ao?Ao:function(){},Yo=null,zo=null,Ho=!1,Bo=Do(),Vo=1e4>Bo?Do:function(){return Do()-Bo};function Wo(){switch(Lo()){case Po:return 99;case Io:return 98;case No:return 97;case Oo:return 96;case Ro:return 95;default:throw Error(a(332))}}function Uo(e){switch(e){case 99:return Po;case 98:return Io;case 97:return No;case 96:return Oo;case 95:return Ro;default:throw Error(a(332))}}function Go(e,t){return e=Uo(e),So(e,t)}function qo(e,t,n){return e=Uo(e),Mo(e,t,n)}function Ko(){if(null!==zo){var e=zo;zo=null,Co(e)}Xo()}function Xo(){if(!Ho&&null!==Yo){Ho=!0;var e=0;try{var t=Yo;Go(99,function(){for(;ef?(g=u,u=null):g=u.sibling;var b=m(o,u,s[f],l);if(null===b){null===u&&(u=g);break}e&&u&&null===b.alternate&&t(o,u),a=i(b,a,f),null===d?c=b:d.sibling=b,d=b,u=g}if(f===s.length)return n(o,u),c;if(null===u){for(;fg?(b=f,f=null):b=f.sibling;var y=m(o,f,v.value,c);if(null===y){null===f&&(f=b);break}e&&f&&null===y.alternate&&t(o,f),s=i(y,s,g),null===u?d=y:u.sibling=y,u=y,f=b}if(v.done)return n(o,f),d;if(null===f){for(;!v.done;g++,v=l.next())null!==(v=p(o,v.value,c))&&(s=i(v,s,g),null===u?d=v:u.sibling=v,u=v);return d}for(f=r(o,f);!v.done;g++,v=l.next())null!==(v=h(f,o,g,v.value,c))&&(e&&null!==v.alternate&&f.delete(null===v.key?g:v.key),s=i(v,s,g),null===u?d=v:u.sibling=v,u=v);return e&&f.forEach(function(e){return t(o,e)}),d}return function(e,r,i,l){var c="object"==typeof i&&null!==i&&i.type===E&&null===i.key;c&&(i=i.props.children);var d="object"==typeof i&&null!==i;if(d)switch(i.$$typeof){case k:e:{for(d=i.key,c=r;null!==c;){if(c.key===d){if(7===c.tag){if(i.type===E){n(e,c.sibling),(r=o(c,i.props.children)).return=e,e=r;break e}}else if(c.elementType===i.type){n(e,c.sibling),(r=o(c,i.props)).ref=xi(e,c,i),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===E?((r=Gl(i.props.children,e.mode,l,i.key)).return=e,e=r):((l=Ul(i.type,i.key,i.props,null,e.mode,l)).ref=xi(e,r,i),l.return=e,e=l)}return s(e);case x:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Xl(i,e.mode,l)).return=e,e=r}return s(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Kl(i,e.mode,l)).return=e,e=r),s(e);if(ki(i))return f(e,r,i,l);if(B(i))return g(e,r,i,l);if(d&&Ei(e,i),void 0===i&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,q(e.type)||"Component"))}return n(e,r)}}var Mi=Si(!0),Ci=Si(!1),Ti={},Ai=lo(Ti),Di=lo(Ti),Li=lo(Ti);function Pi(e){if(e===Ti)throw Error(a(174));return e}function Ii(e,t){switch(uo(Li,t),uo(Di,e),uo(Ai,Ti),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:me(null,"");break;default:t=me(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}co(Ai),uo(Ai,t)}function Ni(){co(Ai),co(Di),co(Li)}function Oi(e){Pi(Li.current);var t=Pi(Ai.current),n=me(t,e.type);t!==n&&(uo(Di,e),uo(Ai,n))}function Ri(e){Di.current===e&&(co(Ai),co(Di))}var Fi=lo(0);function ji(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(64&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Yi=null,zi=null,Hi=!1;function Bi(e,t){var n=Bl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Vi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Wi(e){if(Hi){var t=zi;if(t){var n=t;if(!Vi(e,t)){if(!(t=qr(n.nextSibling))||!Vi(e,t))return e.flags=-1025&e.flags|2,Hi=!1,void(Yi=e);Bi(Yi,n)}Yi=e,zi=qr(t.firstChild)}else e.flags=-1025&e.flags|2,Hi=!1,Yi=e}}function Ui(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Yi=e}function Gi(e){if(e!==Yi)return!1;if(!Hi)return Ui(e),Hi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Vr(t,e.memoizedProps))for(t=zi;t;)Bi(e,t),t=qr(t.nextSibling);if(Ui(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){zi=qr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}zi=null}}else zi=Yi?qr(e.stateNode.nextSibling):null;return!0}function qi(){zi=Yi=null,Hi=!1}var Ki=[];function Xi(){for(var e=0;ei))throw Error(a(301));i+=1,ta=ea=null,t.updateQueue=null,Qi.current=Na,e=n(r,o)}while(ra)}if(Qi.current=La,t=null!==ea&&null!==ea.next,Zi=0,ta=ea=$i=null,na=!1,t)throw Error(a(300));return e}function sa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ta?$i.memoizedState=ta=e:ta=ta.next=e,ta}function la(){if(null===ea){var e=$i.alternate;e=null!==e?e.memoizedState:null}else e=ea.next;var t=null===ta?$i.memoizedState:ta.next;if(null!==t)ta=t,ea=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ea=e).memoizedState,baseState:ea.baseState,baseQueue:ea.baseQueue,queue:ea.queue,next:null},null===ta?$i.memoizedState=ta=e:ta=ta.next=e}return ta}function ca(e,t){return"function"==typeof t?t(e):t}function da(e){var t=la(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ea,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var l=s=i=null,c=o;do{var d=c.lane;if((Zi&d)===d)null!==l&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var u={lane:d,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(s=l=u,i=r):l=l.next=u,$i.lanes|=d,Ys|=d}c=c.next}while(null!==c&&c!==o);null===l?i=r:l.next=s,cr(r,t.memoizedState)||(Ra=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ua(e){var t=la(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);cr(i,t.memoizedState)||(Ra=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function pa(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Zi&e)===e)&&(t._workInProgressVersionPrimary=r,Ki.push(t))),e)return n(t._source);throw Ki.push(t),Error(a(350))}function ma(e,t,n,r){var o=Ls;if(null===o)throw Error(a(349));var i=t._getVersion,s=i(t._source),l=Qi.current,c=l.useState(function(){return pa(o,t,n)}),d=c[1],u=c[0];c=ta;var p=e.memoizedState,m=p.refs,h=m.getSnapshot,f=p.source;p=p.subscribe;var g=$i;return e.memoizedState={refs:m,source:t,subscribe:r},l.useEffect(function(){m.getSnapshot=n,m.setSnapshot=d;var e=i(t._source);if(!cr(s,e)){e=n(t._source),cr(u,e)||(d(e),e=ul(g),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0n?98:n,function(){e(!0)}),Go(97<\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Jr]=t,e[Zr]=r,qa(e,t,!1,!1),t.stateNode=e,c=Ee(n,r),n){case"dialog":Ar("cancel",e),Ar("close",e),i=r;break;case"iframe":case"object":case"embed":Ar("load",e),i=r;break;case"video":case"audio":for(i=0;iWs&&(t.flags|=64,s=!0,os(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=ji(c))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),os(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Hi)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Vo()-r.renderingStartTime>Ws&&1073741824!==n&&(t.flags|=64,s=!0,os(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Vo(),n.sibling=null,t=Fi.current,uo(Fi,s?1&t|2:1&t),n):null;case 23:case 24:return wl(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function as(e){switch(e.tag){case 1:bo(e.type)&&vo();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Ni(),co(ho),co(mo),Xi(),64&(t=e.flags))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Ri(e),null;case 13:return co(Fi),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return co(Fi),null;case 4:return Ni(),null;case 10:return ri(e),null;case 23:case 24:return wl(),null;default:return null}}function ss(e,t){try{var n="",r=t;do{n+=G(r),r=r.return}while(r);var o=n}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o}}function ls(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}qa=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ka=function(){},Xa=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Pi(Ai.current);var a,s=null;switch(n){case"input":i=$(e,i),r=$(e,r),s=[];break;case"option":i=ie(e,i),r=ie(e,r),s=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),s=[];break;case"textarea":i=se(e,i),r=se(e,r),s=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Yr)}for(u in xe(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var c=i[u];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(l.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var d=r[u];if(c=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&d!==c&&(null!=d||null!=c))if("style"===u)if(c){for(a in c)!c.hasOwnProperty(a)||d&&d.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in d)d.hasOwnProperty(a)&&c[a]!==d[a]&&(n||(n={}),n[a]=d[a])}else n||(s||(s=[]),s.push(u,n)),n=d;else"dangerouslySetInnerHTML"===u?(d=d?d.__html:void 0,c=c?c.__html:void 0,null!=d&&c!==d&&(s=s||[]).push(u,d)):"children"===u?"string"!=typeof d&&"number"!=typeof d||(s=s||[]).push(u,""+d):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(l.hasOwnProperty(u)?(null!=d&&"onScroll"===u&&Ar("scroll",e),s||c===d||(s=[])):"object"==typeof d&&null!==d&&d.$$typeof===O?d.toString():(s=s||[]).push(u,d))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Qa=function(e,t,n,r){n!==r&&(t.flags|=4)};var cs="function"==typeof WeakMap?WeakMap:Map;function ds(e,t,n){(n=di(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ks||(Ks=!0,Xs=r),ls(0,t)},n}function us(e,t,n){(n=di(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return ls(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Qs?Qs=new Set([this]):Qs.add(this),ls(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var ps="function"==typeof WeakSet?WeakSet:Set;function ms(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){jl(e,t)}else t.current=null}function hs(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Jo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Gr(t.stateNode.containerInfo))}throw Error(a(163))}function fs(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(!(3&~e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,4&(o=o.tag)&&1&o&&(Ol(n,e),Nl(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Jo(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&hi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}hi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Br(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&wt(n)))))}throw Error(a(163))}function gs(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=null!=o&&o.hasOwnProperty("display")?o.display:null,r.style.display=_e("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function bs(e,t){if(Eo&&"function"==typeof Eo.onCommitFiberUnmount)try{Eo.onCommitFiberUnmount(xo,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(4&r)Ol(t,n);else{r=t;try{o()}catch(e){jl(r,e)}}n=n.next}while(n!==e)}break;case 1:if(ms(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){jl(t,e)}break;case 5:ms(t);break;case 4:xs(e,t)}}function vs(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function ys(e){return 5===e.tag||3===e.tag||4===e.tag}function _s(e){e:{for(var t=e.return;null!==t;){if(ys(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(be(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ys(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?ws(e,n,t):ks(e,n,t)}function ws(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Yr));else if(4!==r&&null!==(e=e.child))for(ws(e,t,n),e=e.sibling;null!==e;)ws(e,t,n),e=e.sibling}function ks(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ks(e,t,n),e=e.sibling;null!==e;)ks(e,t,n),e=e.sibling}function xs(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var s=e,l=o,c=l;;)if(bs(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===l)break e;for(;null===c.sibling;){if(null===c.return||c.return===l)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(s=n,l=o.stateNode,8===s.nodeType?s.parentNode.removeChild(l):s.removeChild(l)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(bs(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function Es(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{!(3&~r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Zr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Ee(e,o),t=Ee(e,r),o=0;oo&&(o=s),n&=~i}if(n=o,10<(n=(120>(n=Vo()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Cs(n/1960))-n)){e.timeoutHandle=Wr(Dl.bind(null,e),n);break}Dl(e);break;default:throw Error(a(329))}}return hl(e,Vo()),e.callbackNode===t?fl.bind(null,e):null}function gl(e,t){for(t&=~Hs,t&=~zs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Rs&&(Rs=2),l=ss(l,s),p=a;do{switch(p.tag){case 3:i=l,p.flags|=4096,t&=-t,p.lanes|=t,pi(p,ds(0,i,t));break e;case 1:i=l;var w=p.type,k=p.stateNode;if(!(64&p.flags||"function"!=typeof w.getDerivedStateFromError&&(null===k||"function"!=typeof k.componentDidCatch||null!==Qs&&Qs.has(k)))){p.flags|=4096,t&=-t,p.lanes|=t,pi(p,us(p,i,t));break e}}p=p.return}while(null!==p)}Al(n)}catch(e){t=e,Ps===n&&null!==n&&(Ps=n=n.return);continue}break}}function El(){var e=Ts.current;return Ts.current=La,null===e?La:e}function Sl(e,t){var n=Ds;Ds|=16;var r=El();for(Ls===e&&Is===t||kl(e,t);;)try{Ml();break}catch(t){xl(e,t)}if(ni(),Ds=n,Ts.current=r,null!==Ps)throw Error(a(261));return Ls=null,Is=0,Rs}function Ml(){for(;null!==Ps;)Tl(Ps)}function Cl(){for(;null!==Ps&&!To();)Tl(Ps)}function Tl(e){var t=Gs(e.alternate,e,Ns);e.memoizedProps=e.pendingProps,null===t?Al(e):Ps=t,As.current=null}function Al(e){var t=e;do{var n=t.alternate;if(e=t.return,2048&t.flags){if(null!==(n=as(t)))return n.flags&=2047,void(Ps=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(null!==(n=is(n,t,Ns)))return void(Ps=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||1073741824&Ns||!(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&!(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1s&&(l=s,s=k,k=l),l=mr(y,k),i=mr(y,s),l&&i&&(1!==w.rangeCount||w.anchorNode!==l.node||w.anchorOffset!==l.offset||w.focusNode!==i.node||w.focusOffset!==i.offset)&&((_=_.createRange()).setStart(l.node,l.offset),w.removeAllRanges(),k>s?(w.addRange(_),w.extend(i.node,i.offset)):(_.setEnd(i.node,i.offset),w.addRange(_))))),_=[];for(w=y;w=w.parentNode;)1===w.nodeType&&_.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"==typeof y.focus&&y.focus(),y=0;y<_.length;y++)(w=_[y]).element.scrollLeft=w.left,w.element.scrollTop=w.top}Kt=!!zr,Hr=zr=null,e.current=n,qs=r;do{try{for(y=e;null!==qs;){var x=qs.flags;if(36&x&&fs(y,qs.alternate,qs),128&x){_=void 0;var E=qs.ref;if(null!==E){var S=qs.stateNode;qs.tag,_=S,"function"==typeof E?E(_):E.current=_}}qs=qs.nextEffect}}catch(e){if(null===qs)throw Error(a(330));jl(qs,e),qs=qs.nextEffect}}while(null!==qs);qs=null,jo(),Ds=o}else e.current=n;if(Js)Js=!1,Zs=e,$s=t;else for(qs=r;null!==qs;)t=qs.nextEffect,qs.nextEffect=null,8&qs.flags&&((x=qs).sibling=null,x.stateNode=null),qs=t;if(0===(r=e.pendingLanes)&&(Qs=null),1===r?e===ol?rl++:(rl=0,ol=e):rl=0,n=n.stateNode,Eo&&"function"==typeof Eo.onCommitFiberRoot)try{Eo.onCommitFiberRoot(xo,n,void 0,!(64&~n.current.flags))}catch(e){}if(hl(e,Vo()),Ks)throw Ks=!1,e=Xs,Xs=null,e;return 8&Ds||Ko(),null}function Pl(){for(;null!==qs;){var e=qs.alternate;cl||null===ll||(8&qs.flags?$e(qs,ll)&&(cl=!0):13===qs.tag&&Ms(e,qs)&&$e(qs,ll)&&(cl=!0));var t=qs.flags;256&t&&hs(e,qs),!(512&t)||Js||(Js=!0,qo(97,function(){return Il(),null})),qs=qs.nextEffect}}function Il(){if(90!==$s){var e=97<$s?97:$s;return $s=90,Go(e,Rl)}return!1}function Nl(e,t){el.push(t,e),Js||(Js=!0,qo(97,function(){return Il(),null}))}function Ol(e,t){tl.push(t,e),Js||(Js=!0,qo(97,function(){return Il(),null}))}function Rl(){if(null===Zs)return!1;var e=Zs;if(Zs=null,48&Ds)throw Error(a(331));var t=Ds;Ds|=32;var n=tl;tl=[];for(var r=0;rVo()-Vs?kl(e,0):Hs|=n),hl(e,t)}function zl(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(2&(t=e.mode)?4&t?(0===al&&(al=js),0===(t=zt(62914560&~al))&&(t=4194304)):t=99===Wo()?1:2:t=1),n=dl(),null!==(e=ml(e,t))&&(Bt(e,t,n),hl(e,n))}function Hl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Bl(e,t,n,r){return new Hl(e,t,n,r)}function Vl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Wl(e,t){var n=e.alternate;return null===n?((n=Bl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ul(e,t,n,r,o,i){var s=2;if(r=e,"function"==typeof e)Vl(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case E:return Gl(n.children,o,i,t);case R:s=8,o|=16;break;case S:s=8,o|=1;break;case M:return(e=Bl(12,n,t,8|o)).elementType=M,e.type=M,e.lanes=i,e;case D:return(e=Bl(13,n,t,o)).type=D,e.elementType=D,e.lanes=i,e;case L:return(e=Bl(19,n,t,o)).elementType=L,e.lanes=i,e;case F:return ql(n,o,i,t);case j:return(e=Bl(24,n,t,o)).elementType=j,e.lanes=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case C:s=10;break e;case T:s=9;break e;case A:s=11;break e;case P:s=14;break e;case I:s=16,r=null;break e;case N:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Bl(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Gl(e,t,n,r){return(e=Bl(7,e,r,t)).lanes=n,e}function ql(e,t,n,r){return(e=Bl(23,e,r,t)).elementType=F,e.lanes=n,e}function Kl(e,t,n){return(e=Bl(6,e,null,t)).lanes=n,e}function Xl(e,t,n){return(t=Bl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ql(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ht(0),this.expirationTimes=Ht(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ht(0),this.mutableSourceEagerHydrationData=null}function Jl(e,t,n,r){var o=t.current,i=dl(),s=ul(o);e:if(n){t:{if(Xe(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(bo(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var c=n.type;if(bo(c)){n=_o(n,c,l);break e}}n=l}else n=po;return null===t.context?t.context=n:t.pendingContext=n,(t=di(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),ui(o,t),pl(o,s,i),s}function Zl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function $l(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(123),o=n(551);function i(e){return(0,o.A)(1,arguments),(0,r.default)(e).getMinutes()}},2572:function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],o=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(5093))},2648:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(n(5093))},2657:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(4188),o=n(9852),i=n(551);function a(e,t){(0,i.A)(2,arguments);var n=(0,r.A)(t);return(0,o.default)(e,-n)}},2682:function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return n[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:0,doy:6}})}(n(5093))},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},2702:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(123),o=n(551);function i(e,t){(0,o.A)(2,arguments);var n=(0,r.default)(e),i=(0,r.default)(t);return n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()}},2711:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Ze});var r=n(2284),o=n(7800);function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,o.A)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}var a=n(1893),s=n(5654),l=n(123);function c(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}var d=n(1788),u=n(7044),p=n(1109),m=n(4188),h=n(551),f=n(9417),g=n(5501),b=n(8293),v=n(3029),y=n(2901),_=n(4467),w=function(){function e(){(0,v.A)(this,e),(0,_.A)(this,"priority",void 0),(0,_.A)(this,"subPriority",0)}return(0,y.A)(e,[{key:"validate",value:function(e,t){return!0}}]),e}(),k=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(e,r,o,i,a){var s;return(0,v.A)(this,n),(s=t.call(this)).value=e,s.validateValue=r,s.setValue=o,s.priority=i,a&&(s.subPriority=a),s}return(0,y.A)(n,[{key:"validate",value:function(e,t){return this.validateValue(e,this.value,t)}},{key:"set",value:function(e,t,n){return this.setValue(e,t,this.value,n)}}]),n}(w),x=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i0,o=r?t:1-t;if(o<=50)n=e||100;else{var i=o+50;n=e+100*Math.floor(i/100)-(e>=i%100?100:0)}return r?n:1-n}function ie(e){return e%400==0||e%4==0&&e%100!=0}var ae=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i0}},{key:"set",value:function(e,t,n){var r=e.getUTCFullYear();if(n.isTwoDigitYear){var o=oe(n.year,r);return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}var i="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e}}]),n}(E),se=n(464),le=n(9742),ce=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i0}},{key:"set",value:function(e,t,n,r){var o=(0,se.A)(e,r);if(n.isTwoDigitYear){var i=oe(n.year,o);return e.setUTCFullYear(i,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,le.A)(e,r)}var a="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(a,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,le.A)(e,r)}}]),n}(E),de=n(9411),ue=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}(E),he=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}(E),fe=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}(E),ge=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}(E),be=n(6894),ve=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=1&&t<=53}},{key:"set",value:function(e,t,n,r){return(0,le.A)(function(e,t,n){(0,h.A)(2,arguments);var r=(0,l.default)(e),o=(0,m.A)(t),i=(0,be.A)(r,n)-o;return r.setUTCDate(r.getUTCDate()-7*i),r}(e,n,r),r)}}]),n}(E),ye=n(1053),_e=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=1&&t<=53}},{key:"set",value:function(e,t,n){return(0,de.A)(function(e,t){(0,h.A)(2,arguments);var n=(0,l.default)(e),r=(0,m.A)(t),o=(0,ye.A)(n)-r;return n.setUTCDate(n.getUTCDate()-7*o),n}(e,n))}}]),n}(E),we=[31,28,31,30,31,30,31,31,30,31,30,31],ke=[31,29,31,30,31,30,31,31,30,31,30,31],xe=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=1&&t<=ke[r]:t>=1&&t<=we[r]}},{key:"set",value:function(e,t,n){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e}}]),n}(E),Ee=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=1&&t<=366:t>=1&&t<=365}},{key:"set",value:function(e,t,n){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e}}]),n}(E),Se=n(1858);function Me(e,t,n){var r,o,i,a,s,c,d,u;(0,h.A)(2,arguments);var p=(0,Se.q)(),f=(0,m.A)(null!==(r=null!==(o=null!==(i=null!==(a=null==n?void 0:n.weekStartsOn)&&void 0!==a?a:null==n||null===(s=n.locale)||void 0===s||null===(c=s.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==i?i:p.weekStartsOn)&&void 0!==o?o:null===(d=p.locale)||void 0===d||null===(u=d.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==r?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=(0,l.default)(e),b=(0,m.A)(t),v=((b%7+7)%7=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=Me(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(E),Te=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=Me(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(E),Ae=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=Me(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(E),De=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=1&&t<=7}},{key:"set",value:function(e,t,n){return e=function(e,t){(0,h.A)(2,arguments);var n=(0,m.A)(t);n%7==0&&(n-=7);var r=(0,l.default)(e),o=((n%7+7)%7<1?7:0)+n-r.getUTCDay();return r.setUTCDate(r.getUTCDate()+o),r}(e,n),e.setUTCHours(0,0,0,0),e}}]),n}(E),Le=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=1&&t<=12}},{key:"set",value:function(e,t,n){var r=e.getUTCHours()>=12;return r&&n<12?e.setUTCHours(n+12,0,0,0):r||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e}}]),n}(E),Oe=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=0&&t<=23}},{key:"set",value:function(e,t,n){return e.setUTCHours(n,0,0,0),e}}]),n}(E),Re=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=0&&t<=11}},{key:"set",value:function(e,t,n){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e}}]),n}(E),Fe=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=1&&t<=24}},{key:"set",value:function(e,t,n){var r=n<=24?n%24:n;return e.setUTCHours(r,0,0,0),e}}]),n}(E),je=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCMinutes(n,0,0),e}}]),n}(E),Ye=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCSeconds(n,0),e}}]),n}(E),ze=function(e){(0,g.A)(n,e);var t=(0,b.A)(n);function n(){var e;(0,v.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Y=(0,m.A)(null!==(M=null!==(C=null!==(T=null!==(A=null==o?void 0:o.weekStartsOn)&&void 0!==A?A:null==o||null===(D=o.locale)||void 0===D||null===(L=D.options)||void 0===L?void 0:L.weekStartsOn)&&void 0!==T?T:R.weekStartsOn)&&void 0!==C?C:null===(P=R.locale)||void 0===P||null===(I=P.options)||void 0===I?void 0:I.weekStartsOn)&&void 0!==M?M:0);if(!(Y>=0&&Y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===O)return""===N?(0,l.default)(n):new Date(NaN);var z,H={firstWeekContainsDate:j,weekStartsOn:Y,locale:F},B=[new x],V=O.match(qe).map(function(e){var t=e[0];return t in d.A?(0,d.A[t])(e,F.formatLong):e}).join("").match(Ge),W=[],U=i(V);try{var G=function(){var t=z.value;null!=o&&o.useAdditionalWeekYearTokens||!(0,p.xM)(t)||(0,p.lJ)(t,O,e),null!=o&&o.useAdditionalDayOfYearTokens||!(0,p.ef)(t)||(0,p.lJ)(t,O,e);var n=t[0],r=Ue[n];if(r){var i=r.incompatibleTokens;if(Array.isArray(i)){var a=W.find(function(e){return i.includes(e.token)||e.token===n});if(a)throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(t,"` at the same time"))}else if("*"===r.incompatibleTokens&&W.length>0)throw new RangeError("The format string mustn't contain `".concat(t,"` and any other token at the same time"));W.push({token:n,fullToken:t});var s=r.run(N,t,F.match,H);if(!s)return{v:new Date(NaN)};B.push(s.setter),N=s.rest}else{if(n.match(Je))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===t?t="'":"'"===n&&(t=t.match(Ke)[1].replace(Xe,"'")),0!==N.indexOf(t))return{v:new Date(NaN)};N=N.slice(t.length)}};for(U.s();!(z=U.n()).done;){var q=G();if("object"===(0,r.A)(q))return q.v}}catch(e){U.e(e)}finally{U.f()}if(N.length>0&&Qe.test(N))return new Date(NaN);var K=B.map(function(e){return e.priority}).sort(function(e,t){return t-e}).filter(function(e,t,n){return n.indexOf(e)===t}).map(function(e){return B.filter(function(t){return t.priority===e}).sort(function(e,t){return t.subPriority-e.subPriority})}).map(function(e){return e[0]}),X=(0,l.default)(n);if(isNaN(X.getTime()))return new Date(NaN);var Q,J=(0,s.A)(X,(0,u.A)(X)),Z={},$=i(K);try{for($.s();!(Q=$.n()).done;){var ee=Q.value;if(!ee.validate(J,H))return new Date(NaN);var te=ee.set(J,Z,H);Array.isArray(te)?(J=te[0],c(Z,te[1])):J=te}}catch(e){$.e(e)}finally{$.f()}return J}},2799:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");n=Symbol.for("react.module.reference"),t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===a||e===p||e===m||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===l||e.$$typeof===c||e.$$typeof===u||e.$$typeof===n||void 0!==e.getModuleId)},t.typeOf=function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case s:case a:case p:case m:return e;default:switch(e=e&&e.$$typeof){case d:case c:case u:case f:case h:case l:return e;default:return t}}case o:return t}}}},2819:(e,t)=>{!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1",Aquamarine:"Aquamarine",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold","Break text":"Break text","Bulleted List":"Bulleted List",Cancel:"Cancel","Cannot upload file:":"Cannot upload file:","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Column:"Column","Could not insert image at the current position.":"Could not insert image at the current position.","Could not obtain resized image URL.":"Could not obtain resized image URL.","Decrease indent":"Decrease indent","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Downloadable:"Downloadable","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Full size image":"Full size image",Green:"Green",Grey:"Grey","Header column":"Header column","Header row":"Header row",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image or file":"Insert image or file","Insert media":"Insert media","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table","Inserting image failed":"Inserting image failed",Italic:"Italic","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link URL":"Link URL","Media URL":"Media URL","media widget":"media widget","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells",Next:"Next","Numbered List":"Numbered List","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Paragraph:"Paragraph","Paste the media URL in the input.":"Paste the media URL in the input.",Previous:"Previous",Purple:"Purple",Red:"Red",Redo:"Redo","Rich Text Editor":"Rich Text Editor","Rich Text Editor, %0":"Rich Text Editor, %0","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Selecting resized image failed":"Selecting resized image failed","Show more items":"Show more items","Side image":"Side image","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically","Table toolbar":"Table toolbar","Text alternative":"Text alternative","The URL must not be empty.":"The URL must not be empty.","This link has no URL":"This link has no URL","This media URL is not supported.":"This media URL is not supported.","Tip: Paste the URL into the content to embed faster.":"Tip: Paste the URL into the content to embed faster.","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on",Turquoise:"Turquoise",Undo:"Undo",Unlink:"Unlink","Upload failed":"Upload failed","Upload in progress":"Upload in progress",White:"White","Widget toolbar":"Widget toolbar","Wrap text":"Wrap text",Yellow:"Yellow"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=110)}([function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o});class r extends Error{constructor(e,t,n){super(function(e,t){const n=new WeakSet,r=t?" "+JSON.stringify(t,(e,t)=>{if("object"==typeof t&&null!==t){if(n.has(t))return`[object ${t.constructor.name}]`;n.add(t)}return t}):"";return e+r+i(e)}(e,n)),this.name="CKEditorError",this.context=t,this.data=n}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const n=new r(e.message,t);throw n.stack=e.stack,n}}function o(e,t){console.warn(...function(e,t){const n=i(e);return t?[e,t,n]:[e,n]}(e,t))}function i(e){return"\nRead more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-"+e}},function(e,t,n){"use strict";var r,o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function a(e){for(var t=-1,n=0;n.ck-button .ck-tooltip{display:none}: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-top-right-radius:unset;border-bottom-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-top-left-radius:unset;border-bottom-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-top-left-radius:unset;border-bottom-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-top-right-radius:unset;border-bottom-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.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{content:"";position:absolute;width:1px;height:100%;background-color:var(--ck-color-split-button-hover-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}'},function(e,t,n){var r=n(1),o=n(32);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=":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-button.ck-dropdown__button.ck-on .ck-tooltip{display:none}.ck.ck-dropdown .ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;z-index:var(--ck-z-modal);max-width:var(--ck-dropdown-max-width);position:absolute}.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{top:100%;bottom:auto}.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{right:var(--ck-spacing-standard);margin-left: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{width:7em;overflow:hidden;text-overflow:ellipsis}.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{box-shadow:var(--ck-drop-shadow),0 0;background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom: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}"},function(e,t,n){var r=n(1),o=n(34);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-toolbar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-flow:row nowrap;align-items:center}.ck.ck-toolbar>.ck-toolbar__items{display:flex;flex-flow:row wrap;align-items:center;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);padding:0 var(--ck-spacing-small);border:1px solid var(--ck-color-toolbar-border)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;width:1px;min-width:1px;background:var(--ck-color-toolbar-border);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.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-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{width:100%;margin:0;border-radius:0;border:0}.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-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[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){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[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-right:var(--ck-spacing-small)}"},function(e,t,n){var r=n(1),o=n(36);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column}.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{list-style-type:none;background:var(--ck-color-list-background)}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{min-height:unset;width:100%;text-align:left;border-radius:0;padding:calc(var(--ck-line-height-base)*0.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*0.4*var(--ck-font-size-base))}.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-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{height:1px;width:100%;background:var(--ck-color-base-border)}"},function(e,t,n){var r=n(1),o=n(38);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{width:max-content;max-width:var(--ck-toolbar-dropdown-max-width)}.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}"},function(e,t,n){var r=n(1),o=n(40);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".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-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-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}"},function(e,t,n){var r=n(1),o=n(42);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=":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:not(.ck-editor__nested-editable).ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-focused{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0}.ck.ck-editor__editable_inline{overflow:auto;padding:0 var(--ck-spacing-standard);border:1px solid transparent}.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)}"},function(e,t,n){var r=n(1),o=n(44);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}"},function(e,t,n){var r=n(1),o=n(46);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-form__header{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{padding:var(--ck-spacing-small) var(--ck-spacing-large);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-form__header .ck-form__header__label{font-weight:700}"},function(e,t,n){var r=n(1),o=n(48);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=":root{--ck-input-text-width:18em}.ck.ck-input-text{border-radius:0}.ck-rounded-corners .ck.ck-input-text,.ck.ck-input-text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-text{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);min-width:var(--ck-input-text-width);min-height:var(--ck-ui-component-min-height);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input-text:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-input-text[readonly]{border:1px solid var(--ck-color-input-disabled-border);background:var(--ck-color-input-disabled-background);color:var(--ck-color-input-disabled-text)}.ck.ck-input-text[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input-text.ck-error{border-color:var(--ck-color-input-error-border);animation:ck-text-input-shake .3s ease both}.ck.ck-input-text.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-text-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}"},function(e,t,n){var r=n(1),o=n(50);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".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-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{pointer-events:none;transform-origin:0 0;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);background:var(--ck-color-labeled-field-label-background);padding:0 calc(var(--ck-font-size-tiny)*0.5);line-height:normal;font-weight:400;text-overflow:ellipsis;overflow:hidden;max-width:100%;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-spacing-medium),calc(var(--ck-font-size-base)*0.6)) 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-spacing-medium)*-1),calc(var(--ck-font-size-base)*0.6)) 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{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));background:transparent;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))}"},function(e,t,n){var r=n(1),o=n(52);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=':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-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{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{width:0;height:0;border-style:solid}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:var(--ck-balloon-arrow-height);border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:0}.ck.ck-balloon-panel[class*=arrow_n]:before{border-bottom-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-color:transparent;border-right-color:transparent;border-top-color:transparent}.ck.ck-balloon-panel[class*=arrow_n]:after{border-bottom-color:var(--ck-color-panel-background);margin-top:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:0;border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-top-color:var(--ck-color-panel-border);filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent}.ck.ck-balloon-panel[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background);margin-bottom:var(--ck-balloon-arrow-offset)}.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{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{right:25%;margin-right:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{right:25%;margin-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_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)}'},function(e,t,n){var r=n(1),o=n(54);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-balloon-rotator__navigation{display:flex;align-items:center;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-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}"},function(e,t,n){var r=n(1),o=n(56);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".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{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);width:100%;height: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}"},function(e,t,n){var r=n(1),o=n(58);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{z-index:var(--ck-z-modal);position:fixed;top:0}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{top:auto;position:absolute}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{box-shadow:var(--ck-drop-shadow),0 0;border-width:0 1px 1px;border-top-left-radius:0;border-top-right-radius:0}"},function(e,t,n){var r=n(1),o=n(60);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".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)}"},function(e,t,n){var r=n(1),o=n(62);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-placeholder,.ck .ck-placeholder{position:relative}.ck.ck-placeholder:before,.ck .ck-placeholder:before{position:absolute;left:0;right:0;content:attr(data-placeholder);pointer-events:none}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-placeholder:before,.ck .ck-placeholder:before{cursor:text;color:var(--ck-color-engine-placeholder-text)}"},function(e,t,n){var r=n(1),o=n(64);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}"},function(e,t,n){var r=n(1),o=n(66);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports='.ck .ck-widget .ck-widget__type-around__button{display:block;position:absolute;overflow:hidden;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{position:absolute;top:50%;left:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{top:calc(var(--ck-widget-outline-thickness)*-0.5);left:min(10%,30px);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-0.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;position:absolute;top:1px;left:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;position:absolute;left:0;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{top:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.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{width:var(--ck-widget-type-around-button-size);height:var(--ck-widget-type-around-button-size);background:var(--ck-color-widget-type-around-button);border-radius:100px;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);opacity:0;pointer-events:none}.ck .ck-widget .ck-widget__type-around__button svg{width:10px;height:8px;transform:translate(-50%,-50%);transition:transform .5s ease;margin-top:1px}.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{width:calc(var(--ck-widget-type-around-button-size) - 2px);height:calc(var(--ck-widget-type-around-button-size) - 2px);border-radius:100px;background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3))}.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{pointer-events:none;height:1px;animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;outline:1px solid hsla(0,0%,100%,.5);background:var(--ck-color-base-text)}.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_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_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 .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_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer{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}}'},function(e,t,n){var r=n(1),o=n(68);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=":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);color:var(--ck-color-resizer-tooltip-text);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);font-size:var(--ck-font-size-tiny);display:block;padding:0 var(--ck-spacing-small);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height)}.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{top:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{top:var(--ck-resizer-tooltip-offset);right: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{top:calc(var(--ck-resizer-tooltip-height)*-1);left:50%;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-width:var(--ck-widget-outline-thickness);outline-style:solid;outline-color:transparent;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{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;background-color:var(--ck-color-widget-editable-focus-background)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{padding:4px;box-sizing:border-box;background-color:transparent;opacity:0;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);border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;transform:translateY(-100%);left:calc(0px - var(--ck-widget-outline-thickness));top:0}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{width:var(--ck-widget-handler-icon-size);height:var(--ck-widget-handler-icon-size);color:var(--ck-color-widget-drag-handler-icon-color)}.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{opacity:1;background-color:var(--ck-color-widget-hover-border)}.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{opacity:1;background-color:var(--ck-color-focus-border)}.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>.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,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}"},function(e,t,n){var r=n(1),o=n(70);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports='.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;position:relative;pointer-events:none}.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}: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{bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);top:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);border:1px solid var(--ck-clipboard-drop-target-color);background:var(--ck-clipboard-drop-target-color);margin-left:-1px}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{content:"";width:0;height:0;display:block;position:absolute;left:50%;top:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);transform:translateX(-50%);border-left:calc(var(--ck-clipboard-drop-target-dot-width)*0.5) solid transparent;border-bottom:0 solid transparent;border-right:calc(var(--ck-clipboard-drop-target-dot-width)*0.5) solid transparent;border-top:calc(var(--ck-clipboard-drop-target-dot-height)) solid var(--ck-clipboard-drop-target-color)}.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}'},function(e,t,n){var r=n(1),o=n(72);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;margin-right:0;font-style:italic;border-left:5px solid #ccc}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}"},function(e,t){e.exports=".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}"},function(e,t,n){var r=n(1),o=n(75);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;position:absolute;pointer-events:none;left:0;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{position:absolute;pointer-events:all}.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{width:var(--ck-resizer-size);height:var(--ck-resizer-size);background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{top:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{top:var(--ck-resizer-offset);right: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)}"},function(e,t,n){var r=n(1),o=n(77);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}"},function(e,t){e.exports='.ck-vertical-form .ck-button:after{content:"";width:0;position:absolute;right:-1px;top:var(--ck-spacing-small);bottom:var(--ck-spacing-small);z-index:1}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{content:"";width:0;position:absolute;right:-1px;top:var(--ck-spacing-small);bottom:var(--ck-spacing-small);z-index:1}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-text-width)*0.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-large);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after,[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}'},function(e,t){e.exports=".ck-content .image{display:table;clear:both;text-align:center;margin:.9em auto;min-width:50px}.ck-content .image img{display:block;margin:0 auto;max-width:100%;min-width:100%}.ck-content .image-inline{display:inline-flex;max-width:100%;align-items:flex-start}.ck-content .image-inline picture{display:flex}.ck-content .image-inline img,.ck-content .image-inline picture{flex-grow:1;flex-shrink:1;max-width:100%}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{padding-left:inherit;padding-right:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ck.ck-editor__editable .image-inline.ck-widget_selected,.ck.ck-editor__editable .image.ck-widget_selected{z-index:1}.ck.ck-editor__editable .image-inline.ck-widget_selected ::selection{display:none}.ck.ck-editor__editable td .image-inline img,.ck.ck-editor__editable th .image-inline img{max-width:none}"},function(e,t,n){var r=n(1),o=n(81);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=":root{--ck-color-image-caption-background:#f7f7f7;--ck-color-image-caption-text:#333;--ck-color-image-caption-highligted-background:#fd0}.ck-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:var(--ck-color-image-caption-text);background-color:var(--ck-color-image-caption-background);padding:.6em;font-size:.75em;outline-offset:-1px}.ck.ck-editor__editable .image>figcaption.image__caption_highlighted{animation:ck-image-caption-highlight .6s ease-out}@keyframes ck-image-caption-highlight{0%{background-color:var(--ck-color-image-caption-highligted-background)}to{background-color:var(--ck-color-image-caption-background)}}"},function(e,t,n){var r=n(1),o=n(83);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=":root{--ck-image-style-spacing:1.5em;--ck-inline-image-style-spacing:calc(var(--ck-image-style-spacing)/2)}.ck-content .image-style-block-align-left,.ck-content .image-style-block-align-right{max-width:calc(100% - var(--ck-image-style-spacing))}.ck-content .image-style-align-left,.ck-content .image-style-align-right{clear:none}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-block-align-right{margin-right:0;margin-left:auto}.ck-content .image-style-block-align-left{margin-left:0;margin-right:auto}.ck-content p+.image-style-align-left,.ck-content p+.image-style-align-right,.ck-content p+.image-style-side{margin-top:0}.ck-content .image-inline.image-style-align-left,.ck-content .image-inline.image-style-align-right{margin-top:var(--ck-inline-image-style-spacing);margin-bottom:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-left{margin-right:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-right{margin-left:var(--ck-inline-image-style-spacing)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-background)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after{display:none}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-hover-background)}"},function(e,t,n){var r=n(1),o=n(85);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-editor__editable .image,.ck.ck-editor__editable .image-inline{position:relative}.ck.ck-editor__editable .image-inline .ck-progress-bar,.ck.ck-editor__editable .image .ck-progress-bar{position:absolute;top:0;left:0}.ck.ck-editor__editable .image-inline.ck-appear,.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image-inline .ck-progress-bar,.ck.ck-editor__editable .image .ck-progress-bar{height:2px;width:0;background:var(--ck-color-upload-bar-background);transition:width .1s}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}"},function(e,t,n){var r=n(1),o=n(87);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports='.ck-image-upload-complete-icon{display:block;position:absolute;top:min(var(--ck-spacing-medium),6%);right:min(var(--ck-spacing-medium),6%);border-radius:50%;z-index:1}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20;--ck-image-upload-icon-width:2px;--ck-image-upload-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck-image-upload-complete-icon{opacity:0;background:var(--ck-color-image-upload-icon-background);animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;animation-fill-mode:forwards,forwards;animation-duration:.5s,.5s;font-size:calc(1px*var(--ck-image-upload-icon-size));animation-delay:0ms,3s;overflow:hidden;width:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size));height:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size))}.ck-image-upload-complete-icon:after{left:25%;top:50%;opacity:0;height:0;width:0;transform:scaleX(-1) rotate(135deg);transform-origin:left top;border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);animation-name:ck-upload-complete-icon-check;animation-duration:.5s;animation-delay:.5s;animation-fill-mode:forwards;box-sizing:border-box}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{opacity:1;width:0;height:0}33%{width:.3em;height:0}to{opacity:1;width:.3em;height:.45em}}'},function(e,t,n){var r=n(1),o=n(89);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports='.ck .ck-upload-placeholder-loader{position:absolute;display:flex;align-items:center;justify-content:center;top:0;left:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px;--ck-upload-placeholder-image-aspect-ratio:2.8}.ck .ck-image-upload-placeholder{width:100%;margin:0}.ck .ck-image-upload-placeholder.image-inline{width:calc(var(--ck-upload-placeholder-loader-size)*2*var(--ck-upload-placeholder-image-aspect-ratio))}.ck .ck-image-upload-placeholder img{aspect-ratio:var(--ck-upload-placeholder-image-aspect-ratio)}.ck .ck-upload-placeholder-loader{width:100%;height:100%}.ck .ck-upload-placeholder-loader:before{width:var(--ck-upload-placeholder-loader-size);height:var(--ck-upload-placeholder-loader-size);border-radius:50%;border-top:3px solid var(--ck-color-upload-placeholder-loader);border-right:2px solid transparent;animation:ck-upload-placeholder-loader 1s linear infinite}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}'},function(e,t,n){var r=n(1),o=n(91);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{height:100%;border-right:1px solid var(--ck-color-base-text);margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}"},function(e,t,n){var r=n(1),o=n(93);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{padding:0;min-width:var(--ck-input-text-width)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical .ck-button{padding:var(--ck-spacing-standard);margin:0;border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border);width:50%}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button,[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{border:0;padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}"},function(e,t,n){var r=n(1),o=n(95);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{padding:0 var(--ck-spacing-medium);color:var(--ck-color-link-default);text-overflow:ellipsis;cursor:pointer;max-width:var(--ck-input-text-width);min-width:3em;text-align:center}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{min-width:0;max-width:100%}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview),[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}"},function(e,t,n){var r=n(1),o=n(97);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports='.ck-media__wrapper .ck-media__placeholder{display:flex;flex-direction:column;align-items:center}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:block}@media (hover:none){.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:none}}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url{max-width:100%;position:relative}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url:hover .ck-tooltip{visibility:visible;opacity:1}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{overflow:hidden;display:block}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="goo.gl/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="maps.app.goo.gl"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="maps.google.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck-media__placeholder__icon *{display:none}.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper>:not(.ck-media__placeholder),.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder{pointer-events:none}:root{--ck-media-embed-placeholder-icon-size:3em;--ck-color-media-embed-placeholder-url-text:#757575;--ck-color-media-embed-placeholder-url-text-hover:var(--ck-color-base-text)}.ck-media__wrapper{margin:0 auto}.ck-media__wrapper .ck-media__placeholder{padding:calc(var(--ck-spacing-standard)*3);background:var(--ck-color-base-foreground)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon{min-width:var(--ck-media-embed-placeholder-icon-size);height:var(--ck-media-embed-placeholder-icon-size);margin-bottom:var(--ck-spacing-large);background-position:50%;background-size:cover}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon .ck-icon{width:100%;height:100%}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text{color:var(--ck-color-media-embed-placeholder-url-text);white-space:nowrap;text-align:center;font-style:italic;text-overflow:ellipsis}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:var(--ck-color-media-embed-placeholder-url-text-hover);cursor:pointer;text-decoration:underline}.ck-media__wrapper[data-oembed-url*="open.spotify.com"]{max-width:300px;max-height:380px}.ck-media__wrapper[data-oembed-url*="goo.gl/maps"] .ck-media__placeholder__icon,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon,.ck-media__wrapper[data-oembed-url*="maps.app.goo.gl"] .ck-media__placeholder__icon,.ck-media__wrapper[data-oembed-url*="maps.google.com"] .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMDAzLjc4IDEuNjFoNDkuNjIxYzEuNjk0IDAgMy4xOS0uNzk4IDQuMTQ2LTIuMDM3eiIgZmlsbD0iIzVjODhjNSIvPjxwYXRoIGQ9Ik0yMjYuNzQyIDIyMi45ODhjLTkuMjY2IDAtMTYuNzc3IDcuMTctMTYuNzc3IDE2LjAxNC4wMDcgMi43NjIuNjYzIDUuNDc0IDIuMDkzIDcuODc1LjQzLjcwMy44MyAxLjQwOCAxLjE5IDIuMTA3LjMzMy41MDIuNjUgMS4wMDUuOTUgMS41MDguMzQzLjQ3Ny42NzMuOTU3Ljk4OCAxLjQ0IDEuMzEgMS43NjkgMi41IDMuNTAyIDMuNjM3IDUuMTY4Ljc5MyAxLjI3NSAxLjY4MyAyLjY0IDIuNDY2IDMuOTkgMi4zNjMgNC4wOTQgNC4wMDcgOC4wOTIgNC42IDEzLjkxNHYuMDEyYy4xODIuNDEyLjUxNi42NjYuODc5LjY2Ny40MDMtLjAwMS43NjgtLjMxNC45My0uNzk5LjYwMy01Ljc1NiAyLjIzOC05LjcyOSA0LjU4NS0xMy43OTQuNzgyLTEuMzUgMS42NzMtMi43MTUgMi40NjUtMy45OSAxLjEzNy0xLjY2NiAyLjMyOC0zLjQgMy42MzgtNS4xNjkuMzE1LS40ODIuNjQ1LS45NjIuOTg4LTEuNDM5LjMtLjUwMy42MTctMS4wMDYuOTUtMS41MDguMzU5LS43Ljc2LTEuNDA0IDEuMTktMi4xMDcgMS40MjYtMi40MDIgMi01LjExNCAyLjAwNC03Ljg3NSAwLTguODQ0LTcuNTExLTE2LjAxNC0xNi43NzYtMTYuMDE0eiIgZmlsbD0iI2RkNGIzZSIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48ZWxsaXBzZSByeT0iNS41NjQiIHJ4PSI1LjgyOCIgY3k9IjIzOS4wMDIiIGN4PSIyMjYuNzQyIiBmaWxsPSIjODAyZDI3IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0xOTAuMzAxIDIzNy4yODNjLTQuNjcgMC04LjQ1NyAzLjg1My04LjQ1NyA4LjYwNnMzLjc4NiA4LjYwNyA4LjQ1NyA4LjYwN2MzLjA0MyAwIDQuODA2LS45NTggNi4zMzctMi41MTYgMS41My0xLjU1NyAyLjA4Ny0zLjkxMyAyLjA4Ny02LjI5IDAtLjM2Mi0uMDIzLS43MjItLjA2NC0xLjA3OWgtOC4yNTd2My4wNDNoNC44NWMtLjE5Ny43NTktLjUzMSAxLjQ1LTEuMDU4IDEuOTg2LS45NDIuOTU4LTIuMDI4IDEuNTQ4LTMuOTAxIDEuNTQ4LTIuODc2IDAtNS4yMDgtMi4zNzItNS4yMDgtNS4yOTkgMC0yLjkyNiAyLjMzMi01LjI5OSA1LjIwOC01LjI5OSAxLjM5OSAwIDIuNjE4LjQwNyAzLjU4NCAxLjI5M2wyLjM4MS0yLjM4YzAtLjAwMi0uMDAzLS4wMDQtLjAwNC0uMDA1LTEuNTg4LTEuNTI0LTMuNjItMi4yMTUtNS45NTUtMi4yMTV6bTQuNDMgNS42NmwuMDAzLjAwNnYtLjAwM3oiIGZpbGw9IiNmZmYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxNS4xODQgMjUxLjkyOWwtNy45OCA3Ljk3OSAyOC40NzcgMjguNDc1YTUuMjMzIDUuMjMzIDAgMDAuNDQ5LTIuMTIzdi0zMS4xNjVjLS40NjkuNjc1LS45MzQgMS4zNDktMS4zODIgMi4wMDUtLjc5MiAxLjI3NS0xLjY4MiAyLjY0LTIuNDY1IDMuOTktMi4zNDcgNC4wNjUtMy45ODIgOC4wMzgtNC41ODUgMTMuNzk0LS4xNjIuNDg1LS41MjcuNzk4LS45My43OTktLjM2My0uMDAxLS42OTctLjI1NS0uODc5LS42Njd2LS4wMTJjLS41OTMtNS44MjItMi4yMzctOS44Mi00LjYtMTMuOTE0LS43ODMtMS4zNS0xLjY3My0yLjcxNS0yLjQ2Ni0zLjk5LTEuMTM3LTEuNjY2LTIuMzI3LTMuNC0zLjYzNy01LjE2OWwtLjAwMi0uMDAzeiIgZmlsbD0iI2MzYzNjMyIvPjxwYXRoIGQ9Ik0yMTIuOTgzIDI0OC40OTVsLTM2Ljk1MiAzNi45NTN2LjgxMmE1LjIyNyA1LjIyNyAwIDAwNS4yMzggNS4yMzhoMS4wMTVsMzUuNjY2LTM1LjY2NmExMzYuMjc1IDEzNi4yNzUgMCAwMC0yLjc2NC0zLjkgMzcuNTc1IDM3LjU3NSAwIDAwLS45ODktMS40NCAzNS4xMjcgMzUuMTI3IDAgMDAtLjk1LTEuNTA4Yy0uMDgzLS4xNjItLjE3Ni0uMzI2LS4yNjQtLjQ4OXoiIGZpbGw9IiNmZGRjNGYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxMS45OTggMjYxLjA4M2wtNi4xNTIgNi4xNTEgMjQuMjY0IDI0LjI2NGguNzgxYTUuMjI3IDUuMjI3IDAgMDA1LjIzOS01LjIzOHYtMS4wNDV6IiBmaWxsPSIjZmZmIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjwvZz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder{background:#4268b3}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik05NjcuNDg0IDBINTYuNTE3QzI1LjMwNCAwIDAgMjUuMzA0IDAgNTYuNTE3djkxMC45NjZDMCA5OTguNjk0IDI1LjI5NyAxMDI0IDU2LjUyMiAxMDI0SDU0N1Y2MjhINDE0VjQ3M2gxMzNWMzU5LjAyOWMwLTEzMi4yNjIgODAuNzczLTIwNC4yODIgMTk4Ljc1Ni0yMDQuMjgyIDU2LjUxMyAwIDEwNS4wODYgNC4yMDggMTE5LjI0NCA2LjA4OVYyOTlsLTgxLjYxNi4wMzdjLTYzLjk5MyAwLTc2LjM4NCAzMC40OTItNzYuMzg0IDc1LjIzNlY0NzNoMTUzLjQ4N2wtMTkuOTg2IDE1NUg3MDd2Mzk2aDI2MC40ODRjMzEuMjEzIDAgNTYuNTE2LTI1LjMwMyA1Ni41MTYtNTYuNTE2VjU2LjUxNUMxMDI0IDI1LjMwMyA5OTguNjk3IDAgOTY3LjQ4NCAwIiBmaWxsPSIjRkZGRkZFIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#cdf}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder{background:linear-gradient(-135deg,#1400c7,#b800b1,#f50000)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTA0IiBoZWlnaHQ9IjUwNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIC4xNTloNTAzLjg0MVY1MDMuOTRIMHoiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48cGF0aCBkPSJNMjUxLjkyMS4xNTljLTY4LjQxOCAwLTc2Ljk5Ny4yOS0xMDMuODY3IDEuNTE2LTI2LjgxNCAxLjIyMy00NS4xMjcgNS40ODItNjEuMTUxIDExLjcxLTE2LjU2NiA2LjQzNy0zMC42MTUgMTUuMDUxLTQ0LjYyMSAyOS4wNTYtMTQuMDA1IDE0LjAwNi0yMi42MTkgMjguMDU1LTI5LjA1NiA0NC42MjEtNi4yMjggMTYuMDI0LTEwLjQ4NyAzNC4zMzctMTEuNzEgNjEuMTUxQy4yOSAxNzUuMDgzIDAgMTgzLjY2MiAwIDI1Mi4wOGMwIDY4LjQxNy4yOSA3Ni45OTYgMS41MTYgMTAzLjg2NiAxLjIyMyAyNi44MTQgNS40ODIgNDUuMTI3IDExLjcxIDYxLjE1MSA2LjQzNyAxNi41NjYgMTUuMDUxIDMwLjYxNSAyOS4wNTYgNDQuNjIxIDE0LjAwNiAxNC4wMDUgMjguMDU1IDIyLjYxOSA0NC42MjEgMjkuMDU3IDE2LjAyNCA2LjIyNyAzNC4zMzcgMTAuNDg2IDYxLjE1MSAxMS43MDkgMjYuODcgMS4yMjYgMzUuNDQ5IDEuNTE2IDEwMy44NjcgMS41MTYgNjguNDE3IDAgNzYuOTk2LS4yOSAxMDMuODY2LTEuNTE2IDI2LjgxNC0xLjIyMyA0NS4xMjctNS40ODIgNjEuMTUxLTExLjcwOSAxNi41NjYtNi40MzggMzAuNjE1LTE1LjA1MiA0NC42MjEtMjkuMDU3IDE0LjAwNS0xNC4wMDYgMjIuNjE5LTI4LjA1NSAyOS4wNTctNDQuNjIxIDYuMjI3LTE2LjAyNCAxMC40ODYtMzQuMzM3IDExLjcwOS02MS4xNTEgMS4yMjYtMjYuODcgMS41MTYtMzUuNDQ5IDEuNTE2LTEwMy44NjYgMC02OC40MTgtLjI5LTc2Ljk5Ny0xLjUxNi0xMDMuODY3LTEuMjIzLTI2LjgxNC01LjQ4Mi00NS4xMjctMTEuNzA5LTYxLjE1MS02LjQzOC0xNi41NjYtMTUuMDUyLTMwLjYxNS0yOS4wNTctNDQuNjIxLTE0LjAwNi0xNC4wMDUtMjguMDU1LTIyLjYxOS00NC42MjEtMjkuMDU2LTE2LjAyNC02LjIyOC0zNC4zMzctMTAuNDg3LTYxLjE1MS0xMS43MUMzMjguOTE3LjQ0OSAzMjAuMzM4LjE1OSAyNTEuOTIxLjE1OXptMCA0NS4zOTFjNjcuMjY1IDAgNzUuMjMzLjI1NyAxMDEuNzk3IDEuNDY5IDI0LjU2MiAxLjEyIDM3LjkwMSA1LjIyNCA0Ni43NzggOC42NzQgMTEuNzU5IDQuNTcgMjAuMTUxIDEwLjAyOSAyOC45NjYgMTguODQ1IDguODE2IDguODE1IDE0LjI3NSAxNy4yMDcgMTguODQ1IDI4Ljk2NiAzLjQ1IDguODc3IDcuNTU0IDIyLjIxNiA4LjY3NCA0Ni43NzggMS4yMTIgMjYuNTY0IDEuNDY5IDM0LjUzMiAxLjQ2OSAxMDEuNzk4IDAgNjcuMjY1LS4yNTcgNzUuMjMzLTEuNDY5IDEwMS43OTctMS4xMiAyNC41NjItNS4yMjQgMzcuOTAxLTguNjc0IDQ2Ljc3OC00LjU3IDExLjc1OS0xMC4wMjkgMjAuMTUxLTE4Ljg0NSAyOC45NjYtOC44MTUgOC44MTYtMTcuMjA3IDE0LjI3NS0yOC45NjYgMTguODQ1LTguODc3IDMuNDUtMjIuMjE2IDcuNTU0LTQ2Ljc3OCA4LjY3NC0yNi41NiAxLjIxMi0zNC41MjcgMS40NjktMTAxLjc5NyAxLjQ2OS02Ny4yNzEgMC03NS4yMzctLjI1Ny0xMDEuNzk4LTEuNDY5LTI0LjU2Mi0xLjEyLTM3LjkwMS01LjIyNC00Ni43NzgtOC42NzQtMTEuNzU5LTQuNTctMjAuMTUxLTEwLjAyOS0yOC45NjYtMTguODQ1LTguODE1LTguODE1LTE0LjI3NS0xNy4yMDctMTguODQ1LTI4Ljk2Ni0zLjQ1LTguODc3LTcuNTU0LTIyLjIxNi04LjY3NC00Ni43NzgtMS4yMTItMjYuNTY0LTEuNDY5LTM0LjUzMi0xLjQ2OS0xMDEuNzk3IDAtNjcuMjY2LjI1Ny03NS4yMzQgMS40NjktMTAxLjc5OCAxLjEyLTI0LjU2MiA1LjIyNC0zNy45MDEgOC42NzQtNDYuNzc4IDQuNTctMTEuNzU5IDEwLjAyOS0yMC4xNTEgMTguODQ1LTI4Ljk2NiA4LjgxNS04LjgxNiAxNy4yMDctMTQuMjc1IDI4Ljk2Ni0xOC44NDUgOC44NzctMy40NSAyMi4yMTYtNy41NTQgNDYuNzc4LTguNjc0IDI2LjU2NC0xLjIxMiAzNC41MzItMS40NjkgMTAxLjc5OC0xLjQ2OXoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48cGF0aCBkPSJNMjUxLjkyMSAzMzYuMDUzYy00Ni4zNzggMC04My45NzQtMzcuNTk2LTgzLjk3NC04My45NzMgMC00Ni4zNzggMzcuNTk2LTgzLjk3NCA4My45NzQtODMuOTc0IDQ2LjM3NyAwIDgzLjk3MyAzNy41OTYgODMuOTczIDgzLjk3NCAwIDQ2LjM3Ny0zNy41OTYgODMuOTczLTgzLjk3MyA4My45NzN6bTAtMjEzLjMzOGMtNzEuNDQ3IDAtMTI5LjM2NSA1Ny45MTgtMTI5LjM2NSAxMjkuMzY1IDAgNzEuNDQ2IDU3LjkxOCAxMjkuMzY0IDEyOS4zNjUgMTI5LjM2NCA3MS40NDYgMCAxMjkuMzY0LTU3LjkxOCAxMjkuMzY0LTEyOS4zNjQgMC03MS40NDctNTcuOTE4LTEyOS4zNjUtMTI5LjM2NC0xMjkuMzY1ek00MTYuNjI3IDExNy42MDRjMCAxNi42OTYtMTMuNTM1IDMwLjIzLTMwLjIzMSAzMC4yMy0xNi42OTUgMC0zMC4yMy0xMy41MzQtMzAuMjMtMzAuMjMgMC0xNi42OTYgMTMuNTM1LTMwLjIzMSAzMC4yMy0zMC4yMzEgMTYuNjk2IDAgMzAuMjMxIDEzLjUzNSAzMC4yMzEgMzAuMjMxIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#ffe0fe}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder{background:linear-gradient(90deg,#71c6f4,#0d70a5)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgNDAwIj48cGF0aCBkPSJNNDAwIDIwMGMwIDExMC41LTg5LjUgMjAwLTIwMCAyMDBTMCAzMTAuNSAwIDIwMCA4OS41IDAgMjAwIDBzMjAwIDg5LjUgMjAwIDIwMHpNMTYzLjQgMzA1LjVjODguNyAwIDEzNy4yLTczLjUgMTM3LjItMTM3LjIgMC0yLjEgMC00LjItLjEtNi4yIDkuNC02LjggMTcuNi0xNS4zIDI0LjEtMjUtOC42IDMuOC0xNy45IDYuNC0yNy43IDcuNiAxMC02IDE3LjYtMTUuNCAyMS4yLTI2LjctOS4zIDUuNS0xOS42IDkuNS0zMC42IDExLjctOC44LTkuNC0yMS4zLTE1LjItMzUuMi0xNS4yLTI2LjYgMC00OC4yIDIxLjYtNDguMiA0OC4yIDAgMy44LjQgNy41IDEuMyAxMS00MC4xLTItNzUuNi0yMS4yLTk5LjQtNTAuNC00LjEgNy4xLTYuNSAxNS40LTYuNSAyNC4yIDAgMTYuNyA4LjUgMzEuNSAyMS41IDQwLjEtNy45LS4yLTE1LjMtMi40LTIxLjgtNnYuNmMwIDIzLjQgMTYuNiA0Mi44IDM4LjcgNDcuMy00IDEuMS04LjMgMS43LTEyLjcgMS43LTMuMSAwLTYuMS0uMy05LjEtLjkgNi4xIDE5LjIgMjMuOSAzMy4xIDQ1IDMzLjUtMTYuNSAxMi45LTM3LjMgMjAuNi01OS45IDIwLjYtMy45IDAtNy43LS4yLTExLjUtLjcgMjEuMSAxMy44IDQ2LjUgMjEuOCA3My43IDIxLjgiIGZpbGw9IiNmZmYiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text{color:#b8e6ff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}'},function(e,t,n){var r=n(1),o=n(99);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck.ck-media-form{display:flex;align-items:flex-start;flex-direction:row;flex-wrap:nowrap}.ck.ck-media-form .ck-labeled-field-view{display:inline-block}.ck.ck-media-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-media-form{flex-wrap:wrap}.ck.ck-media-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-media-form .ck-button{flex-basis:50%}}"},function(e,t,n){var r=n(1),o=n(101);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck-content .media{clear:both;margin:.9em 0;display:block;min-width:15em}"},function(e,t,n){var r=n(1),o=n(103);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=":root{--ck-color-table-focused-cell-background:rgba(158,207,250,0.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}"},function(e,t,n){var r=n(1),o=n(105);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2);padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0}.ck .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{width:var(--ck-insert-table-dropdown-box-width);height:var(--ck-insert-table-dropdown-box-height);margin:var(--ck-insert-table-dropdown-box-margin);border:1px solid var(--ck-color-base-border);border-radius:1px}.ck .ck-insert-table-dropdown-grid-box.ck-on{border-color:var(--ck-color-focus-border);background:var(--ck-color-focus-outer-shadow)}"},function(e,t,n){var r=n(1),o=n(107);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=':root{--ck-table-selected-cell-background:rgba(158,207,250,0.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{position:relative;caret-color:transparent;outline:unset;box-shadow:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{content:"";pointer-events:none;background-color:var(--ck-table-selected-cell-background);position:absolute;top:0;left:0;right:0;bottom:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}'},function(e,t,n){var r=n(1),o=n(109);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]),r(o,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),e.exports=o.locals||{}},function(e,t){e.exports=".ck-content .table{margin:.9em auto;display:table}.ck-content .table table{border-collapse:collapse;border-spacing:0;width:100%;height:100%;border:1px double #b3b3b3}.ck-content .table table td,.ck-content .table table th{min-width:2em;padding:.4em;border:1px solid #bfbfbf}.ck-content .table table th{font-weight:700;background:hsla(0,0%,0%,5%)}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}"},function(e,t,n){"use strict";n.r(t),n.d(t,"default",function(){return ab});class r{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=function e(){e.called=!0},this.off=function e(){e.called=!0}}}const o=new Array(256).fill().map((e,t)=>("0"+t.toString(16)).slice(-2));function i(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0,r=4294967296*Math.random()>>>0;return"e"+o[255&e]+o[e>>8&255]+o[e>>16&255]+o[e>>24&255]+o[255&t]+o[t>>8&255]+o[t>>16&255]+o[t>>24&255]+o[255&n]+o[n>>8&255]+o[n>>16&255]+o[n>>24&255]+o[255&r]+o[r>>8&255]+o[r>>16&255]+o[r>>24&255]}var a={get(e){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5},s=(n(6),n(0));const l=Symbol("listeningTo"),c=Symbol("emitterId");var d={on(e,t,n={}){this.listenTo(this,e,t,n)},once(e,t,n){let r=!1;this.listenTo(this,e,function(e,...n){r||(r=!0,e.off(),t.call(this,e,...n))},n)},off(e,t){this.stopListening(this,e,t)},listenTo(e,t,n,r={}){let o,i;this[l]||(this[l]={});const a=this[l];p(e)||u(e);const s=p(e);(o=a[s])||(o=a[s]={emitter:e,callbacks:{}}),(i=o.callbacks[t])||(i=o.callbacks[t]=[]),i.push(n),function(e,t,n,r,o){t._addEventListener?t._addEventListener(n,r,o):e._addEventListener.call(t,n,r,o)}(this,e,t,n,r)},stopListening(e,t,n){const r=this[l];let o=e&&p(e);const i=r&&o&&r[o],a=i&&t&&i.callbacks[t];if(!(!r||e&&!i||t&&!a))if(n)g(this,e,t,n),-1!==a.indexOf(n)&&(1===a.length?delete i.callbacks[t]:g(this,e,t,n));else if(a){for(;n=a.pop();)g(this,e,t,n);delete i.callbacks[t]}else if(i){for(t in i.callbacks)this.stopListening(e,t);delete r[o]}else{for(o in r)this.stopListening(r[o].emitter);delete this[l]}},fire(e,...t){try{const n=e instanceof r?e:new r(this,e),o=n.name;let i=function e(t,n){let r;return t._events&&(r=t._events[n])&&r.callbacks.length?r.callbacks:n.indexOf(":")>-1?e(t,n.substr(0,n.lastIndexOf(":"))):null}(this,o);if(n.path.push(this),i){const e=[n,...t];i=Array.from(i);for(let t=0;t{this._delegations||(this._delegations=new Map),e.forEach(e=>{const r=this._delegations.get(e);r?r.set(t,n):this._delegations.set(e,new Map([[t,n]]))})}}},stopDelegating(e,t){if(this._delegations)if(e)if(t){const n=this._delegations.get(e);n&&n.delete(t)}else this._delegations.delete(e);else this._delegations.clear()},_addEventListener(e,t,n){!function(e,t){const n=m(e);if(n[t])return;let r=t,o=null;const i=[];for(;""!==r&&!n[r];)n[r]={callbacks:[],childEvents:[]},i.push(n[r]),o&&n[r].childEvents.push(o),o=r,r=r.substr(0,r.lastIndexOf(":"));if(""!==r){for(const e of i)e.callbacks=n[r].callbacks.slice();n[r].childEvents.push(o)}}(this,e);const r=h(this,e),o=a.get(n.priority),i={callback:t,priority:o};for(const e of r){let t=!1;for(let n=0;n0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Q),$=function(e,t){return Z(function(e,t,n){return t=K(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=K(r.length-t,0),a=Array(i);++o-1&&e%1==0&&e<=9007199254740991},te=function(e){return null!=e&&ee(e.length)&&!T(e)},ne=/^(?:0|[1-9]\d*)$/,re=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ne.test(e))&&e>-1&&e%1==0&&e1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&function(e,t,n){if(!v(n))return!1;var r=typeof t;return!!("number"==r?te(n)&&re(t,n.length):"string"==r&&t in n)&&V(n[t],e)}(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r{this.set(t,e[t])},this);Ie(this);const n=this[Me];if(e in this&&!n.has(e))throw new s.a("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>n.get(e),set(t){const r=n.get(e);let o=this.fire("set:"+e,e,t,r);void 0===o&&(o=t),r===o&&n.has(e)||(n.set(e,o),this.fire("change:"+e,e,o,r))}}),this[e]=t},bind(...e){if(!e.length||!Re(e))throw new s.a("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new s.a("observable-bind-duplicate-properties",this);Ie(this);const t=this[Te];e.forEach(e=>{if(t.has(e))throw new s.a("observable-bind-rebind",this)});const n=new Map;return e.forEach(e=>{const r={property:e,to:[]};t.set(e,r),n.set(e,r)}),{to:Ne,toMany:Oe,_observable:this,_bindProperties:e,_to:[],_bindings:n}},unbind(...e){if(!this[Me])return;const t=this[Te],n=this[Ce];if(e.length){if(!Re(e))throw new s.a("observable-unbind-wrong-properties",this);e.forEach(e=>{const r=t.get(e);if(!r)return;let o,i,a,s;r.to.forEach(e=>{o=e[0],i=e[1],a=n.get(o),s=a[i],s.delete(r),s.size||delete a[i],Object.keys(a).length||(n.delete(o),this.stopListening(o,"change"))}),t.delete(e)})}else n.forEach((e,t)=>{this.stopListening(t,"change")}),n.clear(),t.clear()},decorate(e){const t=this[e];if(!t)throw new s.a("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,(e,n)=>{e.return=t.apply(this,n)}),this[e]=function(...t){return this.fire(e,t)},this[e][De]=t,this[Ae]||(this[Ae]=[]),this[Ae].push(e)}};Se(Le,d),Le.stopListening=function(e,t,n){if(!e&&this[Ae]){for(const e of this[Ae])this[e]=this[e][De];delete this[Ae]}d.stopListening.call(this,e,t,n)};var Pe=Le;function Ie(e){e[Me]||(Object.defineProperty(e,Me,{value:new Map}),Object.defineProperty(e,Ce,{value:new Map}),Object.defineProperty(e,Te,{value:new Map}))}function Ne(...e){const t=function(...e){if(!e.length)throw new s.a("observable-bind-to-parse-error",null);const t={to:[]};let n;return"function"==typeof e[e.length-1]&&(t.callback=e.pop()),e.forEach(e=>{if("string"==typeof e)n.properties.push(e);else{if("object"!=typeof e)throw new s.a("observable-bind-to-parse-error",null);n={observable:e,properties:[]},t.to.push(n)}}),t}(...e),n=Array.from(this._bindings.keys()),r=n.length;if(!t.callback&&t.to.length>1)throw new s.a("observable-bind-to-no-callback",this);if(r>1&&t.callback)throw new s.a("observable-bind-to-extra-callback",this);var o;t.to.forEach(e=>{if(e.properties.length&&e.properties.length!==r)throw new s.a("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),o=this._observable,this._to.forEach(e=>{const t=o[Ce];let n;t.get(e.observable)||o.listenTo(e.observable,"change",(r,i)=>{n=t.get(e.observable)[i],n&&n.forEach(e=>{Fe(o,e.property)})})}),function(e){let t;e._bindings.forEach((n,r)=>{e._to.forEach(o=>{t=o.properties[n.callback?0:e._bindProperties.indexOf(r)],n.to.push([o.observable,t]),function(e,t,n,r){const o=e[Ce],i=o.get(n),a=i||{};a[r]||(a[r]=new Set),a[r].add(t),i||o.set(n,a)}(e._observable,n,o.observable,t)})})}(this),this._bindProperties.forEach(e=>{Fe(this._observable,e)})}function Oe(e,t,n){if(this._bindings.size>1)throw new s.a("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const n=e.map(e=>[e,t]);return Array.prototype.concat.apply([],n)}(e,t),n)}function Re(e){return e.every(e=>"string"==typeof e)}function Fe(e,t){const n=e[Te].get(t);let r;n.callback?r=n.callback.apply(e,n.to.map(e=>e[0][e[1]])):(r=n.to[0],r=r[0][r[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=r:e.set(t,r)}function je(e,...t){t.forEach(t=>{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach(n=>{if(n in e.prototype)return;const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable=!1,Object.defineProperty(e.prototype,n,r)})})}class Ye{constructor(e){this.editor=e,this.set("isEnabled",!0),this._disableStack=new Set}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",ze,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",ze),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function ze(e){e.return=!1,e.stop()}je(Ye,Pe);class He{constructor(e){this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this.affectsData=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",()=>{this.refresh()}),this.on("execute",e=>{this.isEnabled||e.stop()},{priority:"high"}),this.listenTo(e,"change:isReadOnly",(e,t,n)=>{n&&this.affectsData?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",Be,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",Be),this.refresh())}execute(){}destroy(){this.stopListening()}}function Be(e){e.return=!1,e.stop()}je(He,Pe);class Ve extends He{constructor(e){super(e),this._childCommands=[]}refresh(){}execute(...e){const t=this._getFirstEnabledCommand();return null!=t&&t.execute(e)}registerChildCommand(e){this._childCommands.push(e),e.on("change:isEnabled",()=>this._checkEnabled()),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){return this._childCommands.find(e=>e.isEnabled)}}var We=function(e,t){return function(n){return e(t(n))}},Ue=We(Object.getPrototypeOf,Object),Ge=Function.prototype,qe=Object.prototype,Ke=Ge.toString,Xe=qe.hasOwnProperty,Qe=Ke.call(Object),Je=function(e){if(!ie(e)||"[object Object]"!=C(e))return!1;var t=Ue(e);if(null===t)return!0;var n=Xe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ke.call(n)==Qe},Ze=function(e,t){for(var n=e.length;n--;)if(V(e[n][0],t))return n;return-1},$e=Array.prototype.splice;function et(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},et.prototype.set=function(e,t){var n=this.__data__,r=Ze(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var tt=et,nt=z(y.a,"Map"),rt=z(Object,"create"),ot=Object.prototype.hasOwnProperty,it=Object.prototype.hasOwnProperty;function at(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{this._setToTarget(e,r,t[r],n)})}}function on(e){return tn(e,an)}function an(e){return nn(e)?e:void 0}function sn(e){return!(!e||!e[Symbol.iterator])}class ln{constructor(e={},t={}){const n=sn(e);if(n||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],n)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 s.a("collection-add-item-invalid-index",this);for(let n=0;n{this._setUpBindToBinding(t=>new e(t))},using:e=>{"function"==typeof e?this._setUpBindToBinding(t=>e(t)):this._setUpBindToBinding(t=>t[e])}}}_setUpBindToBinding(e){const t=this._bindToCollection,n=(n,r,o)=>{const i=t._bindToCollection==this,a=t._bindToInternalToExternalMap.get(r);if(i&&a)this._bindToExternalToInternalMap.set(r,a),this._bindToInternalToExternalMap.set(a,r);else{const n=e(r);if(!n)return void this._skippedIndexesFromExternal.push(o);let i=o;for(const e of this._skippedIndexesFromExternal)o>e&&i--;for(const e of t._skippedIndexesFromExternal)i>=e&&i++;this._bindToExternalToInternalMap.set(r,n),this._bindToInternalToExternalMap.set(n,r),this.add(n,i);for(let e=0;e{const r=this._bindToExternalToInternalMap.get(t);r&&this.remove(r),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((e,t)=>(nt&&e.push(t),e),[])})}_getItemIdBeforeAdding(e){const t=this._idProperty;let n;if(t in e){if(n=e[t],"string"!=typeof n)throw new s.a("collection-add-invalid-id",this);if(this.get(n))throw new s.a("collection-add-item-already-exists",this)}else e[t]=n=i();return n}_remove(e){let t,n,r,o=!1;const i=this._idProperty;if("string"==typeof e?(n=e,r=this._itemMap.get(n),o=!r,r&&(t=this._items.indexOf(r))):"number"==typeof e?(t=e,r=this._items[t],o=!r,r&&(n=r[i])):(r=e,n=r[i],t=this._items.indexOf(r),o=-1==t||!this._itemMap.get(n)),o)throw new s.a("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(n);const a=this._bindToInternalToExternalMap.get(r);return this._bindToInternalToExternalMap.delete(r),this._bindToExternalToInternalMap.delete(a),this.fire("remove",r,t),[r,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}je(ln,d);class cn{constructor(e,t=[],n=[]){this._context=e,this._plugins=new Map,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 n)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 s.a("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],n=[]){const r=this,o=this._context;!function e(t,n=new Set){t.forEach(t=>{l(t)&&(n.has(t)||(n.add(t),t.pluginName&&!r._availablePlugins.has(t.pluginName)&&r._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,n)))})}(e),p(e);const i=[...function e(t,n=new Set){return t.map(e=>l(e)?e:r._availablePlugins.get(e)).reduce((t,r)=>n.has(r)?t:(n.add(r),r.requires&&(p(r.requires,r),e(r.requires,n).forEach(e=>t.add(e))),t.add(r)),new Set)}(e.filter(e=>!d(e,t)))];!function(e,t){for(const n of t){if("function"!=typeof n)throw new s.a("plugincollection-replace-plugin-invalid-type",null,{pluginItem:n});const t=n.pluginName;if(!t)throw new s.a("plugincollection-replace-plugin-missing-name",null,{pluginItem:n});if(n.requires&&n.requires.length)throw new s.a("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const o=r._availablePlugins.get(t);if(!o)throw new s.a("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const i=e.indexOf(o);if(-1===i){if(r._contextPlugins.has(o))return;throw new s.a("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(o.requires&&o.requires.length)throw new s.a("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(i,1,n),r._availablePlugins.set(t,n)}}(i,n);const a=function(e){return e.map(e=>{const t=r._contextPlugins.get(e)||new e(o);return r._add(e,t),t})}(i);return m(a,"init").then(()=>m(a,"afterInit")).then(()=>a);function l(e){return"function"==typeof e}function c(e){return l(e)&&e.isContextPlugin}function d(e,t){return t.some(t=>t===e||u(e)===t||u(t)===e)}function u(e){return l(e)?e.pluginName||e.name:e}function p(e,n=null){e.map(e=>l(e)?e:r._availablePlugins.get(e)||e).forEach(e=>{!function(e,t){if(!l(e)){if(t)throw new s.a("plugincollection-soft-required",o,{missingPlugin:e,requiredBy:u(t)});throw new s.a("plugincollection-plugin-not-found",o,{plugin:e})}}(e,n),function(e,t){if(c(t)&&!c(e))throw new s.a("plugincollection-context-required",o,{plugin:u(e),requiredBy:u(t)})}(e,n),function(e,n){if(n&&d(e,t))throw new s.a("plugincollection-required",o,{plugin:u(e),requiredBy:u(n)})}(e,n)})}function m(e,t){return e.reduce((e,n)=>n[t]?r._contextPlugins.has(n)?e:e.then(n[t].bind(n)):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 n=e.pluginName;if(n){if(this._plugins.has(n))throw new s.a("plugincollection-plugin-name-conflict",null,{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:e});this._plugins.set(n,t)}}}function dn(e){return Array.isArray(e)?e:[e]}je(cn,d),window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});const un=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function pn(e){return un.includes(e)?"rtl":"ltr"}class mn{constructor(e={}){this.uiLanguage=e.uiLanguage||"en",this.contentLanguage=e.contentLanguage||this.uiLanguage,this.uiLanguageDirection=pn(this.uiLanguage),this.contentLanguageDirection=pn(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=dn(t),"string"==typeof e&&(e={string:e});const n=e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,(e,n)=>n1===e?0:1);if("string"==typeof i[o])return i[o];const l=Number(a(n));return i[o][l]}(this.uiLanguage,e,n),t)}}class hn{constructor(e){this.config=new rn(e,this.constructor.defaultConfig);const t=this.constructor.builtinPlugins;this.config.define("plugins",t),this.plugins=new cn(this,t);const n=this.config.get("language")||{};this.locale=new mn({uiLanguage:"string"==typeof n?n:n.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new ln,this._contextOwner=null}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const n of e.concat(t)){if("function"!=typeof n)throw new s.a("context-initplugins-constructor-only",null,{Plugin:n});if(!0!==n.isContextPlugin)throw new s.a("context-initplugins-invalid-plugin",null,{Plugin:n})}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 s.a("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 n=new this(e);t(n.initPlugins().then(()=>n))})}}class fn{constructor(e){this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}function gn(e,t){const n=Math.min(e.length,t.length);for(let r=0;re.data.length)throw new s.a("view-textproxy-wrong-offsetintext",this);if(n<0||t+n>e.data.length)throw new s.a("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+n),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}is(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let n=e.includeSelf?this.textNode:this.parent;for(;null!==n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}}function wn(e){return sn(e)?new Map(e):function(e){const t=new Map;for(const n in e)t.set(n,e[n]);return t}(e)}class kn{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 n=xn(t,e);if(n)return{element:t,pattern:e,match:n}}return null}matchAll(...e){const t=[];for(const n of e)for(const e of this._patterns){const r=xn(n,e);r&&t.push({element:n,pattern:e,match:r})}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 xn(e,t){if("function"==typeof t)return t(e);const n={};return t.name&&(n.name=function(e,t){return e instanceof RegExp?!!t.match(e):e===t}(t.name,e.name),!n.name)||t.attributes&&(n.attributes=function(e,t){const n=new Set(t.getAttributeKeys());return Je(e)?(void 0!==e.style&&Object(s.b)("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&Object(s.b)("matcher-pattern-deprecated-attributes-class-key",e)):(n.delete("style"),n.delete("class")),En(e,n,e=>t.getAttribute(e))}(t.attributes,e),!n.attributes)?null:!(t.classes&&(n.classes=function(e,t){return En(e,t.getClassNames())}(t.classes,e),!n.classes))&&!(t.styles&&(n.styles=function(e,t){return En(e,t.getStyleNames(!0),e=>t.getStyle(e))}(t.styles,e),!n.styles))&&n}function En(e,t,n){const r=function(e){return Array.isArray(e)?e.map(e=>Je(e)?(void 0!==e.key&&void 0!==e.value||Object(s.b)("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0]):Je(e)?Object.entries(e):[[e,!0]]}(e),o=Array.from(t),i=[];return r.forEach(([e,t])=>{o.forEach(r=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,r)&&function(e,t,n){if(!0===e)return!0;const r=n(t);return e===r||e instanceof RegExp&&!!String(r).match(e)}(t,r,n)&&i.push(r)})}),!r.length||i.lengtho?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++rt===e);return Array.isArray(t)}set(e,t){if(v(e))for(const[t,n]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,n,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=Zn(e);(function(e,t){null==e||Hn(e,t)})(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]&&!v(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){return this.isEmpty?[]:e?this._styleProcessor.getStyleNames(this._styles):this._getStylesEntries().map(([e])=>e)}clear(){this._styles={}}_getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const n of t)e.push(...this._styleProcessor.getReducedForm(n,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const n=t.splice(0,t.length-1).join("."),r=Bn(this._styles,n);r&&!Array.from(Object.keys(r)).length&&this.remove(n)}}class Jn{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,n){if(v(t))$n(n,Zn(e),t);else if(this._normalizers.has(e)){const r=this._normalizers.get(e),{path:o,value:i}=r(t);$n(n,o,i)}else $n(n,e,t)}getNormalized(e,t){if(!e)return Kn({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const n=this._extractors.get(e);if("string"==typeof n)return Bn(t,n);const r=n(e,t);if(r)return r}return Bn(t,Zn(e))}getReducedForm(e,t){const n=this.getNormalized(e,t);return void 0===n?[]:this._reducers.has(e)?this._reducers.get(e)(n):[[e,n]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter(t=>{const n=this.getNormalized(t,e);return n&&"object"==typeof n?Object.keys(n).length:n}),n=new Set([...t,...Object.keys(e)]);return Array.from(n.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 n of t)this._mapStyleNames(n,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function Zn(e){return e.replace("-",".")}function $n(e,t,n){let r=n;v(n)&&(r=Kn({},Bn(e,t),n)),Xn(e,t,r)}class er extends vn{constructor(e,t,n,r){if(super(e),this.name=t,this._attrs=function(e){e=wn(e);for(const[t,n]of e)null===n?e.delete(t):"string"!=typeof n&&e.set(t,String(n));return e}(n),this._children=[],r&&this._insertChild(0,r),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");tr(this._classes,e),this._attrs.delete("class")}this._styles=new Qn(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map,this._isAllowedInsideAttributeElement=!1,this._unsafeAttributesToRender=[]}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}get isAllowedInsideAttributeElement(){return this._isAllowedInsideAttributeElement}is(e,t=null){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e}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 er))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this.isAllowedInsideAttributeElement!=e.isAllowedInsideAttributeElement)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,n]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==n)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=!1){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 kn(...e);let n=this.parent;for(;n;){if(t.match(n))return n;n=n.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(),n=Array.from(this._attrs).map(e=>`${e[0]}="${e[1]}"`).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==n?"":" "+n)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const n of this.getChildren())t.push(n._clone(e));const n=new this.constructor(this.document,this.name,this._attrs,t);return n._classes=new Set(this._classes),n._styles.set(this._styles.getNormalized()),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n._isAllowedInsideAttributeElement=this.isAllowedInsideAttributeElement,n}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let n=0;const r=function(e,t){return"string"==typeof t?[new yn(e,t)]:(sn(t)||(t=[t]),Array.from(t).map(t=>"string"==typeof t?new yn(e,t):t instanceof _n?new yn(e,t.data):t))}(this.document,t);for(const t of r)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,n++;return n}_removeChildren(e,t=1){this._fireChange("children",this);for(let n=e;n0&&(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 dn(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of dn(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of dn(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function tr(e,t){const n=t.split(/\s+/);e.clear(),n.forEach(t=>e.add(t))}class nr extends er{constructor(e,t,n,r){super(e,t,n,r),this.getFillerOffset=rr}is(e,t=null){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}}function rr(){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}class or extends nr{constructor(e,t,n,r){super(e,t,n,r),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})}is(e,t=null){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}destroy(){this.stopListening()}}je(or,Pe);const ir=Symbol("rootName");class ar extends or{constructor(e,t){super(e,t),this.rootName="main"}is(e,t=null){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}get rootName(){return this.getCustomProperty(ir)}set rootName(e){this._setCustomProperty(ir,e)}set _name(e){this.name=e}}class sr{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new s.a("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new s.a("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this.position=lr._createAt(e.startPosition):this.position=lr._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}skip(e){let t,n,r;do{r=this.position,({done:t,value:n}=this.next())}while(!t&&e(n));t||(this.position=r)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,n=e.parent;if(null===n.parent&&e.offset===n.childCount)return{done:!0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};let r;if(n instanceof yn){if(e.isAtEnd)return this.position=lr._createAfter(n),this._next();r=n.data[e.offset]}else r=n.getChild(e.offset);if(r instanceof er)return this.shallow?e.offset++:e=new lr(r,0),this.position=e,this._formatReturnValue("elementStart",r,t,e,1);if(r instanceof yn){if(this.singleCharacters)return e=new lr(r,0),this.position=e,this._next();{let n,o=r.data.length;return r==this._boundaryEndParent?(o=this.boundaries.end.offset,n=new _n(r,0,o),e=lr._createAfter(n)):(n=new _n(r,0,r.data.length),e.offset++),this.position=e,this._formatReturnValue("text",n,t,e,o)}}if("string"==typeof r){let r;r=this.singleCharacters?1:(n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length)-e.offset;const o=new _n(n,e.offset,r);return e.offset+=r,this.position=e,this._formatReturnValue("text",o,t,e,r)}return e=lr._createAfter(n),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",n,t,e)}_previous(){let e=this.position.clone();const t=this.position,n=e.parent;if(null===n.parent&&0===e.offset)return{done:!0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};let r;if(n instanceof yn){if(e.isAtStart)return this.position=lr._createBefore(n),this._previous();r=n.data[e.offset-1]}else r=n.getChild(e.offset-1);if(r instanceof er)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue("elementStart",r,t,e,1)):(e=new lr(r,r.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",r,t,e));if(r instanceof yn){if(this.singleCharacters)return e=new lr(r,r.data.length),this.position=e,this._previous();{let n,o=r.data.length;if(r==this._boundaryStartParent){const t=this.boundaries.start.offset;n=new _n(r,t,r.data.length-t),o=n.data.length,e=lr._createBefore(n)}else n=new _n(r,0,r.data.length),e.offset--;return this.position=e,this._formatReturnValue("text",n,t,e,o)}}if("string"==typeof r){let r;if(this.singleCharacters)r=1;else{const t=n===this._boundaryStartParent?this.boundaries.start.offset:0;r=e.offset-t}e.offset-=r;const o=new _n(n,e.offset,r);return this.position=e,this._formatReturnValue("text",o,t,e,r)}return e=lr._createBefore(n),this.position=e,this._formatReturnValue("elementStart",n,t,e,1)}_formatReturnValue(e,t,n,r,o){return t instanceof _n&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=lr._createAfter(t.textNode):(r=lr._createAfter(t.textNode),this.position=r)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=lr._createBefore(t.textNode):(r=lr._createBefore(t.textNode),this.position=r))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:r,length:o}}}}class lr{constructor(e,t){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 or);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=lr._createAt(this),n=t.offset+e;return t.offset=n<0?0:n,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new sr(t);return n.skip(e),n.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let r=0;for(;t[r]==n[r]&&t[r];)r++;return 0===r?null:t[r-1]}is(e){return"position"===e||"view:position"===e}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():[],n=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),n.push(e.offset);const r=gn(t,n);switch(r){case"prefix":return"before";case"extension":return"after";default:return t[r]0?new this(n,r):new this(r,n)}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(lr._createBefore(e),t)}}function dr(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}function ur(e){let t=0;for(const n of e)t++;return t}class pr{constructor(e=null,t,n){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",this.setTo(e,t,n)}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 n=!1;for(const r of e._ranges)if(t.isEqual(r)){n=!0;break}if(!n)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=ur(this.getRanges());if(t!=ur(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let n=!1;for(let r of e.getRanges())if(r=r.getTrimmed(),t.start.isEqual(r.start)&&t.end.isEqual(r.end)){n=!0;break}if(!n)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(e,t,n){if(null===e)this._setRanges([]),this._setFakeOptions(t);else if(e instanceof pr||e instanceof mr)this._setRanges(e.getRanges(),e.isBackward),this._setFakeOptions({fake:e.isFake,label:e.fakeSelectionLabel});else if(e instanceof cr)this._setRanges([e],t&&t.backward),this._setFakeOptions(t);else if(e instanceof lr)this._setRanges([new cr(e)]),this._setFakeOptions(t);else if(e instanceof vn){const r=!!n&&!!n.backward;let o;if(void 0===t)throw new s.a("view-selection-setto-required-second-parameter",this);o="in"==t?cr._createIn(e):"on"==t?cr._createOn(e):new cr(lr._createAt(e,t)),this._setRanges([o],r),this._setFakeOptions(n)}else{if(!sn(e))throw new s.a("view-selection-setto-not-selectable",this);this._setRanges(e,t&&t.backward),this._setFakeOptions(t)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new s.a("view-selection-setfocus-no-ranges",this);const n=lr._createAt(e,t);if("same"==n.compareWith(this.focus))return;const r=this.anchor;this._ranges.pop(),"before"==n.compareWith(r)?this._addRange(new cr(n,r),!0):this._addRange(new cr(r,n)),this.fire("change")}is(e){return"selection"===e||"view:selection"===e}_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 cr))throw new s.a("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 s.a("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new cr(e.start,e.end))}}je(pr,d);class mr{constructor(e=null,t,n){this._selection=new pr,this._selection.delegate("change").to(this),this._selection.setTo(e,t,n)}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)}is(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e}_setTo(e,t,n){this._selection.setTo(e,t,n)}_setFocus(e,t){this._selection.setFocus(e,t)}}je(mr,d);class hr extends r{constructor(e,t,n){super(e,t),this.startRange=n,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const fr=Symbol("bubbling contexts");var gr={fire(e,...t){try{const n=e instanceof r?e:new r(this,e),o=_r(this);if(!o.size)return;if(br(n,"capturing",this),vr(o,"$capture",n,...t))return n.return;const i=n.startRange||this.selection.getFirstRange(),a=i?i.getContainedElement():null,s=!!a&&Boolean(yr(o,a));let l=a||function(e){if(!e)return null;const t=e.start.parent,n=e.end.parent,r=t.getPath(),o=n.getPath();return r.length>o.length?t:n}(i);if(br(n,"atTarget",l),!s){if(vr(o,"$text",n,...t))return n.return;br(n,"bubbling",l)}for(;l;){if(l.is("rootElement")){if(vr(o,"$root",n,...t))return n.return}else if(l.is("element")&&vr(o,l.name,n,...t))return n.return;if(vr(o,l,n,...t))return n.return;l=l.parent,br(n,"bubbling",l)}return br(n,"bubbling",this),vr(o,"$document",n,...t),n.return}catch(e){s.a.rethrowUnexpectedError(e,this)}},_addEventListener(e,t,n){const r=dn(n.context||"$document"),o=_r(this);for(const i of r){let r=o.get(i);r||(r=Object.create(d),o.set(i,r)),this.listenTo(r,e,t,n)}},_removeEventListener(e,t){const n=_r(this);for(const r of n.values())this.stopListening(r,e,t)}};function br(e,t,n){e instanceof hr&&(e._eventPhase=t,e._currentTarget=n)}function vr(e,t,n,...r){const o="string"==typeof t?e.get(t):yr(e,t);return!!o&&(o.fire(n,...r),n.stop.called)}function yr(e,t){for(const[n,r]of e)if("function"==typeof n&&n(t))return r;return null}function _r(e){return e[fr]||(e[fr]=new Map),e[fr]}class wr{constructor(e){this.selection=new mr,this.roots=new ln({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1),this._postFixers=new Set}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 n of this._postFixers)if(t=n(e),t)break}while(t)}}je(wr,gr),je(wr,Pe);class kr extends er{constructor(e,t,n,r){super(e,t,n,r),this.getFillerOffset=xr,this._priority=10,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new s.a("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}is(e,t=null){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}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function xr(){if(Er(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(Er(e)>1)return null;e=e.parent}return!e||Er(e)>1?null:this.childCount}function Er(e){return Array.from(e.getChildren()).filter(e=>!e.is("uiElement")).length}kr.DEFAULT_PRIORITY=10;class Sr extends er{constructor(e,t,n,r){super(e,t,n,r),this._isAllowedInsideAttributeElement=!0,this.getFillerOffset=Mr}is(e,t=null){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}_insertChild(e,t){if(t&&(t instanceof vn||Array.from(t).length>0))throw new s.a("view-emptyelement-cannot-add",[this,t])}}function Mr(){return null}const Cr=navigator.userAgent.toLowerCase();var Tr=Nr(Cr),Ar=function(e){return e.indexOf("windows")>-1}(Cr),Dr=function(e){return!!e.match(/gecko\/\d+/)}(Cr),Lr=function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(Cr),Pr=(function(e){!!e.match(/iphone|ipad/i)||Nr(e)&&navigator.maxTouchPoints}(Cr),function(e){return e.indexOf("android")>-1}(Cr)),Ir=function(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}(Cr);!function(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}}();function Nr(e){return e.indexOf("macintosh")>-1}const Or={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},Rr={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},Fr=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}(),jr=Object.fromEntries(Object.entries(Fr).map(([e,t])=>[t,e.charAt(0).toUpperCase()+e.slice(1)]));function Yr(e){let t;if("string"==typeof e){if(t=Fr[e.toLowerCase()],!t)throw new s.a("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?Fr.alt:0)+(e.ctrlKey?Fr.ctrl:0)+(e.shiftKey?Fr.shift:0)+(e.metaKey?Fr.cmd:0);return t}function zr(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 Yr(e.slice(0,-1));const t=Yr(e);return Tr&&t==Fr.ctrl?Fr.cmd:t}(e):e).reduce((e,t)=>t+e,0)}function Hr(e){let t=zr(e);return Object.entries(Tr?Or:Rr).reduce((e,[n,r])=>(0!=(t&Fr[n])&&(t&=~Fr[n],e+=r),e),"")+(t?jr[t]:"")}function Br(e,t){const n="ltr"===t;switch(e){case Fr.arrowleft:return n?"left":"right";case Fr.arrowright:return n?"right":"left";case Fr.arrowup:return"up";case Fr.arrowdown:return"down"}}class Vr extends er{constructor(e,t,n,r){super(e,t,n,r),this._isAllowedInsideAttributeElement=!0,this.getFillerOffset=Wr}is(e,t=null){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}_insertChild(e,t){if(t&&(t instanceof vn||Array.from(t).length>0))throw new s.a("view-uielement-cannot-add",this)}render(e){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 Wr(){return null}class Ur extends er{constructor(e,t,n,r){super(e,t,n,r),this._isAllowedInsideAttributeElement=!0,this.getFillerOffset=Gr}is(e,t=null){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}_insertChild(e,t){if(t&&(t instanceof vn||Array.from(t).length>0))throw new s.a("view-rawelement-cannot-add",[this,t])}}function Gr(){return null}class qr{constructor(e,t){this.document=e,this._children=[],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}is(e){return"documentFragment"===e||"view:documentFragment"===e}_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 n=0;const r=function(e,t){return"string"==typeof t?[new yn(e,t)]:(sn(t)||(t=[t]),Array.from(t).map(t=>"string"==typeof t?new yn(e,t):t instanceof _n?new yn(e,t.data):t))}(this.document,t);for(const t of r)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,n++;return n}_removeChildren(e,t=1){this._fireChange("children",this);for(let n=e;n{}),void 0!==r.isAllowedInsideAttributeElement&&(o._isAllowedInsideAttributeElement=r.isAllowedInsideAttributeElement),r.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...r.renderUnsafeAttributes),o}setAttribute(e,t,n){n._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,n){Je(e)&&void 0===n&&(n=t),n._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,n){n._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof lr?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is("containerElement"))throw new s.a("view-writer-break-non-container-element",this.document);if(!t.parent)throw new s.a("view-writer-break-root",this.document);if(e.isAtStart)return lr._createBefore(t);if(!e.isAtEnd){const n=t._clone(!1);this.insert(lr._createAfter(t),n);const r=new cr(e,lr._createAt(t,"end")),o=new lr(n,0);this.move(r,o)}return lr._createAfter(t)}mergeAttributes(e){const t=e.offset,n=e.parent;if(n.is("$text"))return e;if(n.is("attributeElement")&&0===n.childCount){const e=n.parent,t=n.index;return n._remove(),this._removeFromClonedElementsGroup(n),this.mergeAttributes(new lr(e,t))}const r=n.getChild(t-1),o=n.getChild(t);if(!r||!o)return e;if(r.is("$text")&&o.is("$text"))return $r(r,o);if(r.is("attributeElement")&&o.is("attributeElement")&&r.isSimilar(o)){const e=r.childCount;return r._appendChild(o.getChildren()),o._remove(),this._removeFromClonedElementsGroup(o),this.mergeAttributes(new lr(r,e))}return e}mergeContainers(e){const t=e.nodeBefore,n=e.nodeAfter;if(!(t&&n&&t.is("containerElement")&&n.is("containerElement")))throw new s.a("view-writer-merge-containers-invalid-position",this.document);const r=t.getChild(t.childCount-1),o=r instanceof yn?lr._createAt(r,"end"):lr._createAt(t,"end");return this.move(cr._createIn(n),lr._createAt(t,"end")),this.remove(cr._createOn(n)),o}insert(e,t){!function e(t,n){for(const r of t){if(!eo.some(e=>r instanceof e))throw new s.a("view-writer-insert-invalid-node-type",n);r.is("$text")||e(r.getChildren(),n)}}(t=sn(t)?[...t]:[t],this.document);const n=t.reduce((e,t)=>{const n=e[e.length-1],r=!(t.is("uiElement")&&t.isAllowedInsideAttributeElement);return n&&n.breakAttributes==r?n.nodes.push(t):e.push({breakAttributes:r,nodes:[t]}),e},[]);let r=null,o=e;for(const{nodes:e,breakAttributes:t}of n){const n=this._insertNodes(o,e,t);r||(r=n.start),o=n.end}return r?new cr(r,o):new cr(e)}remove(e){const t=e instanceof cr?e:cr._createOn(e);if(no(t,this.document),t.isCollapsed)return new qr(this.document);const{start:n,end:r}=this._breakAttributesRange(t,!0),o=n.parent,i=r.offset-n.offset,a=o._removeChildren(n.offset,i);for(const e of a)this._removeFromClonedElementsGroup(e);const s=this.mergeAttributes(n);return t.start=s,t.end=s.clone(),new qr(this.document,a)}clear(e,t){no(e,this.document);const n=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const r of n){const n=r.item;let o;if(n.is("element")&&t.isSimilar(n))o=cr._createOn(n);else if(!r.nextPosition.isAfter(e.start)&&n.is("$textProxy")){const e=n.getAncestors().find(e=>e.is("element")&&t.isSimilar(e));e&&(o=cr._createIn(e))}o&&(o.end.isAfter(e.end)&&(o.end=e.end),o.start.isBefore(e.start)&&(o.start=e.start),this.remove(o))}}move(e,t){let n;if(t.isAfter(e.end)){const r=(t=this._breakAttributes(t,!0)).parent,o=r.childCount;e=this._breakAttributesRange(e,!0),n=this.remove(e),t.offset+=r.childCount-o}else n=this.remove(e);return this.insert(t,n)}wrap(e,t){if(!(t instanceof kr))throw new s.a("view-writer-wrap-invalid-attribute",this.document);if(no(e,this.document),e.isCollapsed){let r=e.start;r.parent.is("element")&&(n=r.parent,!Array.from(n.getChildren()).some(e=>!e.is("uiElement")))&&(r=r.getLastMatchingPosition(e=>e.item.is("uiElement"))),r=this._wrapPosition(r,t);const o=this.document.selection;return o.isCollapsed&&o.getFirstPosition().isEqual(e.start)&&this.setSelection(r),new cr(r)}return this._wrapRange(e,t);var n}unwrap(e,t){if(!(t instanceof kr))throw new s.a("view-writer-unwrap-invalid-attribute",this.document);if(no(e,this.document),e.isCollapsed)return e;const{start:n,end:r}=this._breakAttributesRange(e,!0),o=n.parent,i=this._unwrapChildren(o,n.offset,r.offset,t),a=this.mergeAttributes(i.start);a.isEqual(i.start)||i.end.offset--;const l=this.mergeAttributes(i.end);return new cr(a,l)}rename(e,t){const n=new nr(this.document,e,t.getAttributes());return this.insert(lr._createAfter(t),n),this.move(cr._createIn(t),lr._createAt(n,0)),this.remove(cr._createOn(t)),n}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return lr._createAt(e,t)}createPositionAfter(e){return lr._createAfter(e)}createPositionBefore(e){return lr._createBefore(e)}createRange(e,t){return new cr(e,t)}createRangeOn(e){return cr._createOn(e)}createRangeIn(e){return cr._createIn(e)}createSelection(e,t,n){return new pr(e,t,n)}_insertNodes(e,t,n){let r,o;if(r=n?Xr(e):e.parent.is("$text")?e.parent.parent:e.parent,!r)throw new s.a("view-writer-invalid-position-container",this.document);o=n?this._breakAttributes(e,!0):e.parent.is("$text")?Zr(e):e;const i=r._insertChild(o.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const a=o.getShiftedBy(i),l=this.mergeAttributes(o);l.isEqual(o)||a.offset--;const c=this.mergeAttributes(a);return new cr(l,c)}_wrapChildren(e,t,n,r){let o=t;const i=[];for(;o!1,e.parent._insertChild(e.offset,n);const r=new cr(e,e.getShiftedBy(1));this.wrap(r,t);const o=new lr(n.parent,n.index);n._remove();const i=o.nodeBefore,a=o.nodeAfter;return i instanceof yn&&a instanceof yn?$r(i,a):Jr(o)}_wrapAttributeElement(e,t){if(!ro(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if("class"!==n&&"style"!==n&&t.hasAttribute(n)&&t.getAttribute(n)!==e.getAttribute(n))return!1;for(const n of e.getStyleNames())if(t.hasStyle(n)&&t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())"class"!==n&&"style"!==n&&(t.hasAttribute(n)||this.setAttribute(n,e.getAttribute(n),t));for(const n of e.getStyleNames())t.hasStyle(n)||this.setStyle(n,e.getStyle(n),t);for(const n of e.getClassNames())t.hasClass(n)||this.addClass(n,t);return!0}_unwrapAttributeElement(e,t){if(!ro(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if("class"!==n&&"style"!==n&&(!t.hasAttribute(n)||t.getAttribute(n)!==e.getAttribute(n)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const n of e.getStyleNames())if(!t.hasStyle(n)||t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())"class"!==n&&"style"!==n&&this.removeAttribute(n,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const n=e.start,r=e.end;if(no(e,this.document),e.isCollapsed){const n=this._breakAttributes(e.start,t);return new cr(n,n)}const o=this._breakAttributes(r,t),i=o.parent.childCount,a=this._breakAttributes(n,t);return o.offset+=o.parent.childCount-i,new cr(a,o)}_breakAttributes(e,t=!1){const n=e.offset,r=e.parent;if(e.parent.is("emptyElement"))throw new s.a("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new s.a("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new s.a("view-writer-cannot-break-raw-element",this.document);if(!t&&r.is("$text")&&to(r.parent))return e.clone();if(to(r))return e.clone();if(r.is("$text"))return this._breakAttributes(Zr(e),t);if(n==r.childCount){const e=new lr(r.parent,r.index+1);return this._breakAttributes(e,t)}if(0===n){const e=new lr(r.parent,r.index);return this._breakAttributes(e,t)}{const e=r.index+1,o=r._clone();r.parent._insertChild(e,o),this._addToClonedElementsGroup(o);const i=r.childCount-n,a=r._removeChildren(n,i);o._appendChild(a);const s=new lr(r.parent,e);return this._breakAttributes(s,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 n=this._cloneGroups.get(t);n||(n=new Set,this._cloneGroups.set(t,n)),n.add(e),e._clonesGroup=n}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const n=this._cloneGroups.get(t);n&&n.delete(e)}}function Xr(e){let t=e.parent;for(;!to(t);){if(!t)return;t=t.parent}return t}function Qr(e,t){return e.priorityt.priority)&&e.getIdentity()e.createTextNode(" "),ao=e=>{const t=e.createElement("span");return t.dataset.ckeFiller=!0,t.innerHTML=" ",t},so=e=>{const t=e.createElement("br");return t.dataset.ckeFiller=!0,t},lo="".repeat(7);function co(e){return oo(e)&&e.data.substr(0,7)===lo}function uo(e){return 7==e.data.length&&co(e)}function po(e){return co(e)?e.data.slice(7):e.data}function mo(e,t){if(t.keyCode==Fr.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,n=e.getRangeAt(0).startOffset;co(t)&&n<=7&&e.collapse(t,0)}}}function ho(e,t,n,r=!1){n=n||function(e,t){return e===t},Array.isArray(e)||(e=Array.prototype.slice.call(e)),Array.isArray(t)||(t=Array.prototype.slice.call(t));const o=function(e,t,n){const r=fo(e,t,n);if(-1===r)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const o=fo(go(e,r),go(t,r),n);return{firstIndex:r,lastIndexOld:e.length-o,lastIndexNew:t.length-o}}(e,t,n);return r?function(e,t){const{firstIndex:n,lastIndexOld:r,lastIndexNew:o}=e;if(-1===n)return Array(t).fill("equal");let i=[];return n>0&&(i=i.concat(Array(n).fill("equal"))),o-n>0&&(i=i.concat(Array(o-n).fill("insert"))),r-n>0&&(i=i.concat(Array(r-n).fill("delete"))),o0&&n.push({index:r,type:"insert",values:e.slice(r,i)}),o-r>0&&n.push({index:r+(i-r),type:"delete",howMany:o-r}),n}(t,o)}function fo(e,t,n){for(let r=0;r200||o>200||r+o>300)return bo.fastDiff(e,t,n,!0);let i,a;if(oc?-1:1;d[r+p]&&(d[r]=d[r+p].slice(0)),d[r]||(d[r]=[]),d[r].push(o>c?i:a);let m=Math.max(o,c),h=m-r;for(;hc;m--)u[m]=p(m);u[c]=p(c),h++}while(u[c]!==l);return d[c].slice(1)}function vo(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}function yo(e){const t=e.parentNode;t&&t.removeChild(e)}function _o(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}bo.fastDiff=ho,n(15);class wo{constructor(e,t){this.domDocuments=new Set,this.domConverter=e,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),Ir&&!Pr&&this.on("change:isSelecting",()=>{this.isSelecting||this.render()}),this._inlineFiller=null,this._fakeSelectionContainer=null}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 s.a("view-renderer-unknown-type",this);this.markedChildren.add(t)}}}render(){let e;const t=!(Ir&&!Pr&&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));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),n=t.parent.ownerDocument;co(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=ko(n,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const n=Array.from(this.domConverter.mapViewToDom(e).childNodes),r=Array.from(this.domConverter.viewChildrenToDom(e,t.ownerDocument,{withChildren:!1})),o=this._diffNodeLists(n,r),i=this._findReplaceActions(o,n,r);if(-1!==i.indexOf("replace")){const t={equal:0,insert:0,delete:0};for(const o of i)if("replace"===o){const o=t.equal+t.insert,i=t.equal+t.delete,a=e.getChild(o);!a||a.is("uiElement")||a.is("rawElement")||this._updateElementMappings(a,n[i]),yo(r[o]),t.equal++}else t[o]++}}_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")?lr._createBefore(this.selection.getFirstPosition().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&&oo(t.parent)&&co(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!co(e))throw new s.a("view-renderer-filler-was-lost",this);uo(e)?e.remove():e.data=e.data.substr(7),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,n=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(n===t.getFillerOffset())return!1;const r=e.nodeBefore,o=e.nodeAfter;return!(r instanceof yn||o instanceof yn)}_updateText(e,t){const n=this.domConverter.findCorrespondingDomText(e),r=this.domConverter.viewToDom(e,n.ownerDocument),o=n.data;let i=r.data;const a=t.inlineFillerPosition;if(a&&a.parent==e.parent&&a.offset==e.index&&(i=lo+i),o!=i){const e=ho(o,i);for(const t of e)"insert"===t.type?n.insertData(t.index,t.values.join("")):n.deleteData(t.index,t.howMany)}}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const n=Array.from(t.attributes).map(e=>e.name),r=e.getAttributeKeys();for(const n of r)this.domConverter.setDomElementAttribute(t,n,e.getAttribute(n),e);for(const r of n)e.hasAttribute(r)||this.domConverter.removeDomElementAttribute(t,r)}_updateChildren(e,t){const n=this.domConverter.mapViewToDom(e);if(!n)return;const r=t.inlineFillerPosition,o=this.domConverter.mapViewToDom(e).childNodes,i=Array.from(this.domConverter.viewChildrenToDom(e,n.ownerDocument,{bind:!0}));r&&r.parent===e&&ko(n.ownerDocument,i,r.offset);const a=this._diffNodeLists(o,i);let s=0;const l=new Set;for(const e of a)"delete"===e?(l.add(o[s]),yo(o[s])):"equal"===e&&s++;s=0;for(const e of a)"insert"===e?(vo(n,s,i[s]),s++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(i[s])),s++);for(const e of l)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return bo(e=function(e,t){const n=Array.from(e);return 0!=n.length&&t?(n[n.length-1]==t&&n.pop(),n):n}(e,this._fakeSelectionContainer),t,Eo.bind(null,this.domConverter))}_findReplaceActions(e,t,n){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let r=[],o=[],i=[];const a={equal:0,insert:0,delete:0};for(const s of e)"insert"===s?i.push(n[a.equal+a.insert]):"delete"===s?o.push(t[a.equal+a.delete]):(r=r.concat(bo(o,i,xo).map(e=>"equal"===e?"replace":e)),r.push("equal"),o=[],i=[]),a[s]++;return r.concat(bo(o,i,xo).map(e=>"equal"===e?"replace":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(Ir&&!Pr&&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._removeFakeSelection(),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 n=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(n,this.selection),!this._fakeSelectionNeedsUpdate(e))return;n.parentElement&&n.parentElement==e||e.appendChild(n),n.textContent=this.selection.fakeSelectionLabel||" ";const r=t.getSelection(),o=t.createRange();r.removeAllRanges(),o.selectNodeContents(n),r.addRange(o)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const n=this.domConverter.viewPositionToDom(this.selection.anchor),r=this.domConverter.viewPositionToDom(this.selection.focus);t.collapse(n.parent,n.offset),t.extend(r.parent,r.offset),Dr&&function(e,t){const n=e.parent;if(n.nodeType!=Node.ELEMENT_NODE||e.offset!=n.childNodes.length-1)return;const r=n.childNodes[e.offset];r&&"BR"==r.tagName&&t.addRange(t.getRangeAt(0))}(r,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,n=e.ownerDocument.getSelection();return!t||t.parentElement!==e||n.anchorNode!==t&&!t.contains(n.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel}_removeDomSelection(){for(const e of this.domDocuments)if(e.getSelection().rangeCount){const t=e.activeElement,n=this.domConverter.mapDomToView(t);t&&n&&e.getSelection().removeAllRanges()}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function ko(e,t,n){const r=t instanceof Array?t:t.childNodes,o=r[n];if(oo(o))return o.data=lo+o.data,o;{const o=e.createTextNode(lo);return Array.isArray(t)?r.splice(n,0,o):vo(t,n,o),o}}function xo(e,t){return _o(e)&&_o(t)&&!oo(e)&&!oo(t)&&e.nodeType!==Node.COMMENT_NODE&&t.nodeType!==Node.COMMENT_NODE&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function Eo(e,t,n){return t===n||(oo(t)&&oo(n)?t.data===n.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(n)))}je(wo,Pe);var So={window,document};function Mo(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Co(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}const To=so(document),Ao=io(document),Do=ao(document);class Lo{constructor(e,t={}){this.document=e,this.renderingMode=t.renderingMode||"editing",this.blockFillerMode=t.blockFillerMode||("editing"===this.renderingMode?"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._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new kn,this._encounteredRawContentDomNodes=new WeakSet}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new pr(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 e.childNodes)this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,n){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===n&&("src"===e||"srcset"===e)||"source"===n&&"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 n=(new DOMParser).parseFromString(t,"text/html"),r=n.createDocumentFragment(),o=n.body.childNodes;for(;o.length>0;)r.appendChild(o[0]);const i=n.createTreeWalker(r,NodeFilter.SHOW_ELEMENT),a=[];let l;for(;l=i.nextNode();)a.push(l);for(const e of a){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(Object(s.b)("domconverter-unsafe-element-detected",{unsafeElement:e}),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(r)}viewToDom(e,t,n={}){if(e.is("$text")){const n=this._processDataFromViewText(e);return t.createTextNode(n)}{if(this.mapViewToDom(e))return this.mapViewToDom(e);let r;if(e.is("documentFragment"))r=t.createDocumentFragment(),n.bind&&this.bindDocumentFragments(r,e);else{if(e.is("uiElement"))return r="$comment"===e.name?t.createComment(e.getCustomProperty("$rawContent")):e.render(t,this),n.bind&&this.bindElements(r,e),r;this._shouldRenameElement(e.name)?(Object(s.b)("domconverter-unsafe-element-detected",{unsafeElement:e}),r=this._createReplacementDomElement(e.name)):r=e.hasAttribute("xmlns")?t.createElementNS(e.getAttribute("xmlns"),e.name):t.createElement(e.name),e.is("rawElement")&&e.render(r,this),n.bind&&this.bindElements(r,e);for(const t of e.getAttributeKeys())this.setDomElementAttribute(r,t,e.getAttribute(t),e)}if(!1!==n.withChildren)for(const o of this.viewChildrenToDom(e,t,n))r.appendChild(o);return r}}setDomElementAttribute(e,t,n,r=null){const o=this.shouldRenderAttribute(t,n,e.tagName.toLowerCase())||r&&r.shouldRenderUnsafeAttribute(t);o||Object(s.b)("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:n}),e.hasAttribute(t)&&!o?e.removeAttribute(t):e.hasAttribute("data-ck-unsafe-attribute-"+t)&&o&&e.removeAttribute("data-ck-unsafe-attribute-"+t),e.setAttribute(o?t:"data-ck-unsafe-attribute-"+t,n)}removeDomElementAttribute(e,t){"data-ck-unsafe-element"!=t&&(e.removeAttribute(t),e.removeAttribute("data-ck-unsafe-attribute-"+t))}*viewChildrenToDom(e,t,n={}){const r=e.getFillerOffset&&e.getFillerOffset();let o=0;for(const i of e.getChildren())r===o&&(yield this._getBlockFiller(t)),yield this.viewToDom(i,t,n),o++;r===o&&(yield this._getBlockFiller(t))}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),n=this.viewPositionToDom(e.end),r=document.createRange();return r.setStart(t.parent,t.offset),r.setEnd(n.parent,n.offset),r}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const n=this.findCorrespondingDomText(t);if(!n)return null;let r=e.offset;return co(n)&&(r+=7),{parent:n,offset:r}}{let n,r,o;if(0===e.offset){if(n=this.mapViewToDom(t),!n)return null;o=n.childNodes[0]}else{const t=e.nodeBefore;if(r=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(e.nodeBefore),!r)return null;n=r.parentNode,o=r.nextSibling}return oo(o)&&co(o)?{parent:o,offset:7}:{parent:n,offset:r?Mo(r)+1:0}}}domToView(e,t={}){if(this.isBlockFiller(e))return null;const n=this.getHostViewElement(e);if(n)return n;if(this.isComment(e)&&t.skipComments)return null;if(oo(e)){if(uo(e))return null;{const t=this._processDataFromDomText(e);return""===t?null:new yn(this.document,t)}}{if(this.mapDomToView(e))return this.mapDomToView(e);let n;if(this.isDocumentFragment(e))n=new qr(this.document),t.bind&&this.bindDocumentFragments(e,n);else{n=this._createViewElement(e,t),t.bind&&this.bindElements(e,n);const r=e.attributes;if(r)for(let e=r.length-1;e>=0;e--)n._setAttribute(r[e].name,r[e].value);if(this._isViewElementWithRawContent(n,t)||this.isComment(e)){const t=this.isComment(e)?e.data:e.innerHTML;return n._setCustomProperty("$rawContent",t),this._encounteredRawContentDomNodes.add(e),n}}if(!1!==t.withChildren)for(const r of this.domChildrenToView(e,t))n._appendChild(r);return n}}*domChildrenToView(e,t={}){for(let n=0;n{const{scrollLeft:t,scrollTop:n}=e;r.push([t,n])}),t.focus(),Po(t,e=>{const[t,n]=r.shift();e.scrollLeft=t,e.scrollTop=n}),So.window.scrollTo(e,n)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(e){return e&&e.nodeType==Node.COMMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(To):!("BR"!==e.tagName||!Io(e,this.blockElements)||1!==e.parentNode.childNodes.length)||e.isEqualNode(Do)||function(e,t){return e.isEqualNode(Ao)&&Io(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements)}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=document.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const n=t.collapsed;return t.detach(),n}getHostViewElement(e){const t=Co(e);for(t.pop();t.length;){const e=t.pop(),n=this._domToViewMapping.get(e);if(n&&(n.is("uiElement")||n.is("rawElement")))return n}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}_getBlockFiller(e){switch(this.blockFillerMode){case"nbsp":return io(e);case"markedNbsp":return ao(e);case"br":return so(e)}}_isDomSelectionPositionCorrect(e,t){if(oo(e)&&co(e)&&t<7)return!1;if(this.isElement(e)&&co(e.childNodes[t]))return!1;const n=this.mapDomToView(e);return!n||!n.is("uiElement")&&!n.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 n=this._getTouchingInlineViewNode(e,!1);!(n&&n.is("$textProxy")&&this._nodeEndsWithSpace(n))&&n||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const n=this._getTouchingInlineViewNode(e,!0),r=n&&n.is("$textProxy")&&" "==n.data.charAt(0);" "!=t.charAt(t.length-2)&&n&&!r||(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){return Co(e).some(e=>e.tagName&&t.includes(e.tagName.toLowerCase()))}(e,this.preElements))return po(e);t=t.replace(/[ \n\t\r]{1,}/g," ");const n=this._getTouchingInlineDomNode(e,!1),r=this._getTouchingInlineDomNode(e,!0),o=this._checkShouldLeftTrimDomText(e,n),i=this._checkShouldRightTrimDomText(e,r);o&&(t=t.replace(/^ /,"")),i&&(t=t.replace(/ $/,"")),t=po(new Text(t)),t=t.replace(/ \u00A0/g," ");const a=r&&this.isElement(r)&&"BR"!=r.tagName,s=r&&oo(r)&&" "==r.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(t)||!r||a||s)&&(t=t.replace(/\u00A0$/," ")),(o||n&&this.isElement(n)&&"BR"!=n.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&&!co(e)}_getTouchingInlineViewNode(e,t){const n=new sr({startPosition:t?lr._createAfter(e):lr._createBefore(e),direction:t?"forward":"backward"});for(const e of n){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 n=t?"firstChild":"lastChild",r=t?"nextSibling":"previousSibling";let o=!0;do{if(!o&&e[n]?e=e[n]:e[r]?(e=e[r],o=!1):(e=e.parentNode,o=!0),!e||this._isBlockElement(e))return null}while(!oo(e)&&"BR"!=e.tagName&&!this._isInlineObjectElement(e));return e}_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(this.isComment(e))return new Vr(this.document,"$comment");const n=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new er(this.document,n)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){return"editing"==this.renderingMode&&"script"==e.toLowerCase()}_createReplacementDomElement(e,t=null){const n=document.createElement("span");if(n.setAttribute("data-ck-unsafe-element",e),t){for(;t.firstChild;)n.appendChild(t.firstChild);for(const e of t.getAttributeNames())n.setAttribute(e,t.getAttribute(e))}return n}}function Po(e,t){for(;e&&e!=So.document;)t(e),e=e.parentNode}function Io(e,t){const n=e.parentNode;return n&&n.tagName&&t.includes(n.tagName.toLowerCase())}function No(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}var Oo=Se({},d,{listenTo(e,t,n,r={}){if(_o(e)||No(e)){const o={capture:!!r.useCapture,passive:!!r.usePassive},i=this._getProxyEmitter(e,o)||new Ro(e,o);this.listenTo(i,t,n,r)}else d.listenTo.call(this,e,t,n,r)},stopListening(e,t,n){if(_o(e)||No(e)){const r=this._getAllProxyEmitters(e);for(const e of r)this.stopListening(e,t,n)}else d.stopListening.call(this,e,t,n)},_getProxyEmitter(e,t){return n=this,r=Fo(e,t),n[l]&&n[l][r]?n[l][r].emitter:null;var n,r},_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)}});class Ro{constructor(e,t){u(this,Fo(e,t)),this._domNode=e,this._options=t}}function Fo(e,t){let n=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=i())}(e);for(const e of Object.keys(t).sort())t[e]&&(n+="-"+e);return n}Se(Ro.prototype,d,{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,n){this.attach(e),d._addEventListener.call(this,e,t,n)},_removeEventListener(e,t){d._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}});class jo{constructor(e){this.view=e,this.document=e.document,this.isEnabled=!1}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] *")}}je(jo,Oo);function Yo(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new dt;++ts))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var u=-1,p=!0,m=2&n?new zo:void 0;for(i.set(e,t),i.set(t,e);++u{this.listenTo(e,t,(e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)},{useCapture:this.useCapture})})}fire(e,t,n){this.isEnabled&&this.document.fire(e,new ei(this.view,t,n))}}class ni extends ti{constructor(e){super(e),this.domEventType=["keydown","keyup"]}onDomEvent(e){this.fire(e.type,e,{keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return Yr(this)}})}}var ri=function(){return y.a.Date.now()},oi=/\s/,ii=/^\s+/,ai=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&oi.test(e.charAt(t)););return t}(e)+1).replace(ii,""):e},si=/^[-+]0x[0-9a-f]+$/i,li=/^0b[01]+$/i,ci=/^0o[0-7]+$/i,di=parseInt,ui=function(e){if("number"==typeof e)return e;if(Sn(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=ai(e);var n=li.test(e);return n||ci.test(e)?di(e.slice(2),n?2:8):si.test(e)?NaN:+e},pi=Math.max,mi=Math.min,hi=function(e,t,n){var r,o,i,a,s,l,c=0,d=!1,u=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=r,i=o;return r=o=void 0,c=t,a=e.apply(i,n)}function h(e){var n=e-l;return void 0===l||n>=t||n<0||u&&e-c>=i}function f(){var e=ri();if(h(e))return g(e);s=setTimeout(f,function(e){var n=t-(e-l);return u?mi(n,i-(e-c)):n}(e))}function g(e){return s=void 0,p&&r?m(e):(r=o=void 0,a)}function b(){var e=ri(),n=h(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(f,t),d?m(e):a}(l);if(u)return clearTimeout(s),s=setTimeout(f,t),m(l)}return void 0===s&&(s=setTimeout(f,t)),a}return t=ui(t)||0,v(n)&&(d=!!n.leading,i=(u="maxWait"in n)?pi(ui(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),b.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=o=s=void 0},b.flush=function(){return void 0===s?a:g(ri())},b};class fi extends jo{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=hi(e=>this.document.fire("selectionChangeDone",e),200)}observe(){const e=this.document;e.on("arrowKey",(t,n)=>{e.selection.isFake&&this.isEnabled&&n.preventDefault()},{context:"$capture"}),e.on("arrowKey",(t,n)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(n.keyCode)},{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,n=new pr(t.getRanges(),{backward:t.isBackward,fake:!1});e!=Fr.arrowleft&&e!=Fr.arrowup||n.setTo(n.getFirstPosition()),e!=Fr.arrowright&&e!=Fr.arrowdown||n.setTo(n.getLastPosition());const r={oldSelection:t,newSelection:n,domSelection:null};this.document.fire("selectionChange",r),this._fireSelectionChangeDoneDebounced(r)}}class gi extends jo{constructor(e){super(e),this.mutationObserver=e.getObserver($o),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=hi(e=>this.document.fire("selectionChangeDone",e),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._documentIsSelectingInactivityTimeoutDebounced=hi(()=>this.document.isSelecting=!1,5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,n=()=>{this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel()};this.listenTo(e,"selectstart",()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()},{priority:"highest"}),this.listenTo(e,"keydown",n,{priority:"highest"}),this.listenTo(e,"keyup",n,{priority:"highest"}),this._documents.has(t)||(this.listenTo(t,"mouseup",n,{priority:"highest"}),this.listenTo(t,"selectionchange",(e,n)=>{this._handleSelectionChange(n,t),this._documentIsSelectingInactivityTimeoutDebounced()}),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_handleSelectionChange(e,t){if(!this.isEnabled)return;const n=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(n.anchorNode))return;this.mutationObserver.flush();const r=this.domConverter.domSelectionToView(n);if(0!=r.rangeCount){if(this.view.hasDomSelection=!0,!(this.selection.isEqual(r)&&this.domConverter.isDomSelectionCorrect(n)||++this._loopbackCounter>60))if(this.selection.isSimilar(r))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:r,domSelection:n};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class bi extends ti{constructor(e){super(e),this.domEventType=["focus","blur"],this.useCapture=!0;const t=this.document;t.on("focus",()=>{t.isFocused=!0,this._renderTimeoutId=setTimeout(()=>e.change(()=>{}),50)}),t.on("blur",(n,r)=>{const o=t.selection.editableElement;null!==o&&o!==r.target||(t.isFocused=!1,e.change(()=>{}))})}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class vi extends ti{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",()=>{t.isComposing=!0}),t.on("compositionend",()=>{t.isComposing=!1})}onDomEvent(e){this.fire(e.type,e)}}class yi extends ti{constructor(e){super(e),this.domEventType=["beforeinput"]}onDomEvent(e){this.fire(e.type,e)}}class _i{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=[]}}var wi=function(e){return"string"==typeof e||!ue(e)&&ie(e)&&"[object String]"==C(e)};function ki(e){return"[object Range]"==Object.prototype.toString.apply(e)}function xi(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 Ei=["top","right","bottom","left","width","height"];class Si{constructor(e){const t=ki(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),nn(e)||t)if(t){const t=Si.getDomRangeRects(e);Mi(this,Si.getBoundingRect(t))}else Mi(this,e.getBoundingClientRect());else if(No(e)){const{innerWidth:t,innerHeight:n}=e;Mi(this,{top:0,right:t,bottom:n,left:0,width:t,height:n})}else Mi(this,e)}clone(){return new Si(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)};return t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0?null:new Si(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(!Ci(e)){let n=e.parentNode||e.commonAncestorContainer;for(;n&&!Ci(n);){const e=new Si(n),r=t.getIntersection(e);if(!r)return null;r.getArea(){for(const t of e){const e=Ti._getElementCallbacks(t.target);if(e)for(const n of e)n(t)}})}}Ti._observerInstance=null,Ti._elementCallbacks=null;class Ai{constructor(e){this._callback=e,this._elements=new Set,this._previousRects=new Map,this._periodicCheckTimeout=null}observe(e){this._elements.add(e),this._checkElementRectsAndExecuteCallback(),1===this._elements.size&&this._startPeriodicCheck()}unobserve(e){this._elements.delete(e),this._previousRects.delete(e),this._elements.size||this._stopPeriodicCheck()}_startPeriodicCheck(){const e=()=>{this._checkElementRectsAndExecuteCallback(),this._periodicCheckTimeout=setTimeout(e,100)};this.listenTo(So.window,"resize",()=>{this._checkElementRectsAndExecuteCallback()}),this._periodicCheckTimeout=setTimeout(e,100)}_stopPeriodicCheck(){clearTimeout(this._periodicCheckTimeout),this.stopListening(),this._previousRects.clear()}_checkElementRectsAndExecuteCallback(){const e=[];for(const t of this._elements)this._hasRectChanged(t)&&e.push({target:t,contentRect:this._previousRects.get(t)});e.length&&this._callback(e)}_hasRectChanged(e){if(!e.ownerDocument.body.contains(e))return!1;const t=new Si(e),n=this._previousRects.get(e),r=!n||!n.isEqual(t);return this._previousRects.set(e,t),r}}function Di(e){return t=>t+e}function Li(e){const t=e.next();return t.done?null:t.value}je(Ai,Oo);class Pi{constructor(){this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(e){if(this._elements.has(e))throw new s.a("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(e),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)}}je(Pi,Oo),je(Pi,Pe);class Ii{constructor(){this._listener=Object.create(Oo)}listenTo(e){this._listener.listenTo(e,"keydown",(e,t)=>{this._listener.fire("_keydown:"+Yr(t),t)})}set(e,t,n={}){const r=zr(e),o=n.priority;this._listener.listenTo(this._listener,"_keydown:"+r,(e,n)=>{t(n,()=>{n.preventDefault(),n.stopPropagation(),e.stop()}),e.return=!0},{priority:o})}press(e){return!!this._listener.fire("_keydown:"+Yr(e),e)}destroy(){this._listener.stopListening()}}class Ni extends jo{constructor(e){super(e),this.document.on("keydown",(e,t)=>{if(this.isEnabled&&((n=t.keyCode)==Fr.arrowright||n==Fr.arrowleft||n==Fr.arrowup||n==Fr.arrowdown)){const n=new hr(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(n,t),n.stop.called&&e.stop()}var n})}observe(){}}function Oi({target:e,viewportOffset:t=0}){const n=Bi(e);let r=n,o=null;for(;r;){let i;i=Vi(r==n?e:o),Fi(i,()=>Wi(e,r));const a=Wi(e,r);if(Ri(r,a,t),r.parent!=r){if(o=r.frameElement,r=r.parent,!o)return}else r=null}}function Ri(e,t,n){const r=t.clone().moveBy(0,n),o=t.clone().moveBy(0,-n),i=new Si(e).excludeScrollbarsAndBorders();if(![o,r].every(e=>i.contains(e))){let{scrollX:a,scrollY:s}=e;Yi(o,i)?s-=i.top-t.top+n:ji(r,i)&&(s+=t.bottom-i.bottom+n),zi(t,i)?a-=i.left-t.left+n:Hi(t,i)&&(a+=t.right-i.right+n),e.scrollTo(a,s)}}function Fi(e,t){const n=Bi(e);let r,o;for(;e!=n.document.body;)o=t(),r=new Si(e).excludeScrollbarsAndBorders(),r.contains(o)||(Yi(o,r)?e.scrollTop-=r.top-o.top:ji(o,r)&&(e.scrollTop+=o.bottom-r.bottom),zi(o,r)?e.scrollLeft-=r.left-o.left:Hi(o,r)&&(e.scrollLeft+=o.right-r.right)),e=e.parentNode}function ji(e,t){return e.bottom>t.bottom}function Yi(e,t){return e.topt.right}function Bi(e){return ki(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function Vi(e){if(ki(e)){let t=e.commonAncestorContainer;return oo(t)&&(t=t.parentNode),t}return e.parentNode}function Wi(e,t){const n=Bi(e),r=new Si(e);if(n===t)return r;{let e=n;for(;e!=t;){const t=e.frameElement,n=new Si(t).excludeScrollbarsAndBorders();r.moveBy(n.left,n.top),e=e.parent}}return r}Object.assign({},{scrollViewportToShowTarget:Oi,scrollAncestorsToShowTarget:function(e){Fi(Vi(e),()=>new Si(e))}});class Ui{constructor(e){this.document=new wr(e),this.domConverter=new Lo(this.document),this.domRoots=new Map,this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new wo(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting").to(this.document),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new Kr(this.document),this.addObserver($o),this.addObserver(gi),this.addObserver(bi),this.addObserver(ni),this.addObserver(fi),this.addObserver(vi),this.addObserver(Ni),Pr&&this.addObserver(yi),this.document.on("arrowKey",mo,{priority:"low"}),function(e){e.document.on("arrowKey",(t,n)=>function(e,t,n){if(t.keyCode==Fr.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),r=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(r||t.shiftKey){const t=e.focusNode,o=e.focusOffset,i=n.domPositionToView(t,o);if(null===i)return;let a=!1;const s=i.getLastMatchingPosition(e=>(e.item.is("uiElement")&&(a=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement"))));if(a){const t=n.viewPositionToDom(s);r?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,n,e.domConverter),{priority:"low"})}(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 n=this.document.getRoot(t);n._name=e.tagName.toLowerCase();const r={};for(const{name:t,value:o}of Array.from(e.attributes))r[t]=o,"class"===t?this._writer.addClass(o.split(" "),n):this._writer.setAttribute(t,o,n);this._initialDomRootAttributes.set(e,r);const o=()=>{this._writer.setAttribute("contenteditable",!n.isReadOnly,n),n.isReadOnly?this._writer.addClass("ck-read-only",n):this._writer.removeClass("ck-read-only",n)};o(),this.domRoots.set(t,e),this.domConverter.bindElements(e,n),this._renderer.markToSync("children",n),this._renderer.markToSync("attributes",n),this._renderer.domDocuments.add(e.ownerDocument),n.on("change:children",(e,t)=>this._renderer.markToSync("children",t)),n.on("change:attributes",(e,t)=>this._renderer.markToSync("attributes",t)),n.on("change:text",(e,t)=>this._renderer.markToSync("text",t)),n.on("change:isReadOnly",()=>this.change(o)),n.on("change",()=>{this._hasChangedSinceTheLastRendering=!0});for(const n of this._observers.values())n.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach(({name:e})=>t.removeAttribute(e));const n=this._initialDomRootAttributes.get(t);for(const e in n)t.setAttribute(e,n[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(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,n]of this.domRoots)t.observe(n,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(){const e=this.document.selection.getFirstRange();e&&Oi({target:this.domConverter.viewRangeToDom(e),viewportOffset:20})}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 s.a("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){s.a.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.change(()=>{})}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return lr._createAt(e,t)}createPositionAfter(e){return lr._createAfter(e)}createPositionBefore(e){return lr._createBefore(e)}createRange(e,t){return new cr(e,t)}createRangeOn(e){return cr._createOn(e)}createRangeIn(e){return cr._createIn(e)}createSelection(e,t,n){return new pr(e,t,n)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}je(Ui,Pe);class Gi{constructor(e){this.parent=null,this._attrs=wn(e)}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new s.a("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 s.a("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 this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),r=e.getAncestors(t);let o=0;for(;n[o]==r[o]&&n[o];)o++;return 0===o?null:n[o-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),n=e.getPath(),r=gn(t,n);switch(r){case"prefix":return!0;case"extension":return!1;default:return t[r](e[t[0]]=t[1],e),{})),e}is(e){return"node"===e||"model:node"===e}_clone(){return new Gi(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=wn(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}class qi extends Gi{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}is(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new qi(this.data,this.getAttributes())}static fromJSON(e){return new qi(e.data,e.attributes)}}class Ki{constructor(e,t,n){if(this.textNode=e,t<0||t>e.offsetSize)throw new s.a("model-textproxy-wrong-offsetintext",this);if(n<0||t+n>e.offsetSize)throw new s.a("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+n),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}is(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.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()}}class Xi{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 s.a("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const n of this._nodes){if(e>=t&&ee.toJSON())}}class Qi extends Gi{constructor(e,t,n){super(t),this.name=e,this._children=new Xi,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(e,t=null){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e}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 n of e)t=t.getChild(t.offsetToIndex(n));return t}findAncestor(e,t={includeSelf:!1}){let n=t.includeSelf?this:this.parent;for(;n;){if(n.name===e)return n;n=n.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)):null;return new Qi(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=function(e){return"string"==typeof e?[new qi(e)]:(sn(e)||(e=[e]),Array.from(e).map(e=>"string"==typeof e?new qi(e):e instanceof Ki?new qi(e.data,e.getAttributes()):e))}(t);for(const e of n)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const e of n)e.parent=null;return n}static fromJSON(e){let t=null;if(e.children){t=[];for(const n of e.children)n.name?t.push(Qi.fromJSON(n)):t.push(qi.fromJSON(n))}return new Qi(e.name,e.attributes,t)}}class Ji{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new s.a("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new s.a("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=$i._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}skip(e){let t,n,r,o;do{r=this.position,o=this._visitedParent,({done:t,value:n}=this.next())}while(!t&&e(n));t||(this.position=r,this._visitedParent=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),n=this._visitedParent;if(null===n.parent&&t.offset===n.maxOffset)return{done:!0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};const r=t.parent,o=ea(t,r),i=o||ta(t,r,o);if(i instanceof Qi)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=i),this.position=t,Zi("elementStart",i,e,t,1);if(i instanceof qi){let r;if(this.singleCharacters)r=1;else{let e=i.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),r=t.offset-e}const o=t.offset-i.startOffset,a=new Ki(i,o-r,r);return t.offset-=r,this.position=t,Zi("text",a,e,t,r)}return t.path.pop(),this.position=t,this._visitedParent=n.parent,Zi("elementStart",n,e,t,1)}}function Zi(e,t,n,r,o){return{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:r,length:o}}}class $i{constructor(e,t,n="toNone"){if(!e.is("element")&&!e.is("documentFragment"))throw new s.a("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new s.a("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=n}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;tn.path.length){if(t.offset!==r.maxOffset)return!1;t.path=t.path.slice(0,-1),r=r.parent,t.offset++}else{if(0!==n.offset)return!1;n.path=n.path.slice(0,-1)}}}is(e){return"position"===e||"model:position"===e}hasSameParentAs(e){return this.root===e.root&&"same"==gn(this.getParentPath(),e.getParentPath())}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=$i._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 n;return t.containsPosition(this)||t.start.isEqual(this)?(n=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(n=n._getTransformedByDeletion(e.deletionPosition,1))):n=this.isEqual(e.deletionPosition)?$i._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),n}_getTransformedByDeletion(e,t){const n=$i._createAt(this);if(this.root!=e.root)return n;if("same"==gn(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;n.offset-=t}}else if("prefix"==gn(e.getParentPath(),this.getParentPath())){const r=e.path.length-1;if(e.offset<=this.path[r]){if(e.offset+t>this.path[r])return null;n.path[r]-=t}}return n}_getTransformedByInsertion(e,t){const n=$i._createAt(this);if(this.root!=e.root)return n;if("same"==gn(e.getParentPath(),this.getParentPath()))(e.offsett+1;){const t=r.maxOffset-n.offset;0!==t&&e.push(new ra(n,n.getShiftedBy(t))),n.path=n.path.slice(0,-1),n.offset++,r=r.parent}for(;n.path.length<=this.end.path.length;){const t=this.end.path[n.path.length-1],r=t-n.offset;0!==r&&e.push(new ra(n,n.getShiftedBy(r))),n.offset=t,n.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new Ji(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new Ji(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new Ji(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 ra(this.start,this.end)]}getTransformedByOperations(e){const t=[new ra(this.start,this.end)];for(const n of e)for(let e=0;e0?new this(n,r):new this(r,n)}static _createIn(e){return new this($i._createAt(e,0),$i._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift($i._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new s.a("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 n=e.indexOf(t),r=new this(t.start,t.end);if(n>0)for(let t=n-1;e[t].end.isEqual(r.start);t++)r.start=$i._createAt(e[t].start);for(let t=n+1;t{if(t.viewPosition)return;const n=this._modelToViewMapping.get(t.modelPosition.parent);t.viewPosition=this.findPositionIn(n,t.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(e,t)=>{if(t.modelPosition)return;const n=this.findMappedViewAncestor(t.viewPosition),r=this._viewToModelMapping.get(n),o=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,n);t.modelPosition=$i._createAt(r,o)},{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e){const t=this.toModelElement(e);if(this._viewToModelMapping.delete(e),this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);this._modelToViewMapping.get(t)==e&&this._modelToViewMapping.delete(t)}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const n=this._markerNameToElements.get(t)||new Set;n.add(e);const r=this._elementToMarkerNames.get(e)||new Set;r.add(t),this._markerNameToElements.set(t,n),this._elementToMarkerNames.set(e,r)}unbindElementFromMarkerName(e,t){const n=this._markerNameToElements.get(t);n&&(n.delete(e),0==n.size&&this._markerNameToElements.delete(t));const r=this._elementToMarkerNames.get(e);r&&(r.delete(t),0==r.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new ra(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new cr(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={isPhantom:!1}){const n={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",n),n.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const n=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())n.add(t);else n.add(e);return n}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,n){if(n!=e)return this._toModelOffset(e.parent,e.index,n)+this._toModelOffset(e,t,e);if(e.is("$text"))return t;let r=0;for(let n=0;n1?t[0]+":"+t[1]:t[0]}class sa{constructor(e){this.conversionApi=Object.assign({dispatcher:this},e),this._reconversionEventsMapping=new Map}convertChanges(e,t,n){for(const t of e.getMarkersToRemove())this.convertMarkerRemove(t.name,t.range,n);const r=this._mapChangesWithAutomaticReconversion(e);for(const e of r)"insert"===e.type?this.convertInsert(ra._createFromPositionAndShift(e.position,e.length),n):"remove"===e.type?this.convertRemove(e.position,e.length,e.name,n):"reconvert"===e.type?this.reconvertElement(e.element,n):this.convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,n);for(const e of this.conversionApi.mapper.flushUnboundMarkerNames()){const r=t.get(e).getRange();this.convertMarkerRemove(e,r,n),this.convertMarkerAdd(e,r,n)}for(const t of e.getMarkersToAdd())this.convertMarkerAdd(t.name,t.range,n)}convertInsert(e,t){this.conversionApi.writer=t,this.conversionApi.consumable=this._createInsertConsumable(e);for(const t of Array.from(e).map(ca))this._convertInsertWithAttributes(t);this._clearConversionApi()}convertRemove(e,t,n,r){this.conversionApi.writer=r,this.fire("remove:"+n,{position:e,length:t},this.conversionApi),this._clearConversionApi()}convertAttribute(e,t,n,r,o){this.conversionApi.writer=o,this.conversionApi.consumable=this._createConsumableForRange(e,"attribute:"+t);for(const o of e){const e={item:o.item,range:ra._createFromPositionAndShift(o.previousPosition,o.length),attributeKey:t,attributeOldValue:n,attributeNewValue:r};this._testAndFire("attribute:"+t,e)}this._clearConversionApi()}reconvertElement(e,t){const n=ra._createOn(e);this.conversionApi.writer=t,this.conversionApi.consumable=this._createInsertConsumable(n);const r=this.conversionApi.mapper,o=r.toViewElement(e);t.remove(o),this._convertInsertWithAttributes({item:e,range:n});const i=r.toViewElement(e);for(const n of ra._createIn(e)){const{item:e}=n,o=da(e,r);o?o.root!==i.root&&t.move(t.createRangeOn(o),r.toViewPosition($i._createBefore(e))):this._convertInsertWithAttributes(ca(n))}r.unbindViewElement(o),this._clearConversionApi()}convertSelection(e,t,n){const r=Array.from(t.getMarkersAtPosition(e.getFirstPosition()));if(this.conversionApi.writer=n,this.conversionApi.consumable=this._createSelectionConsumable(e,r),this.fire("selection",{selection:e},this.conversionApi),e.isCollapsed){for(const t of r){const n=t.getRange();if(!la(e.getFirstPosition(),t,this.conversionApi.mapper))continue;const r={item:e,markerName:t.name,markerRange:n};this.conversionApi.consumable.test(e,"addMarker:"+t.name)&&this.fire("addMarker:"+t.name,r,this.conversionApi)}for(const t of e.getAttributeKeys()){const n={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};this.conversionApi.consumable.test(e,"attribute:"+n.attributeKey)&&this.fire("attribute:"+n.attributeKey+":$text",n,this.conversionApi)}this._clearConversionApi()}else this._clearConversionApi()}convertMarkerAdd(e,t,n){if("$graveyard"==t.root.rootName)return;this.conversionApi.writer=n;const r="addMarker:"+e,o=new ia;if(o.add(t,r),this.conversionApi.consumable=o,this.fire(r,{markerName:e,markerRange:t},this.conversionApi),o.test(t,r)){this.conversionApi.consumable=this._createConsumableForRange(t,r);for(const n of t.getItems()){if(!this.conversionApi.consumable.test(n,r))continue;const o={item:n,range:ra._createOn(n),markerName:e,markerRange:t};this.fire(r,o,this.conversionApi)}this._clearConversionApi()}else this._clearConversionApi()}convertMarkerRemove(e,t,n){"$graveyard"!=t.root.rootName&&(this.conversionApi.writer=n,this.fire("removeMarker:"+e,{markerName:e,markerRange:t},this.conversionApi),this._clearConversionApi())}_mapReconversionTriggerEvent(e,t){this._reconversionEventsMapping.set(t,e)}_createInsertConsumable(e){const t=new ia;for(const n of e){const e=n.item;t.add(e,"insert");for(const n of e.getAttributeKeys())t.add(e,"attribute:"+n)}return t}_createConsumableForRange(e,t){const n=new ia;for(const r of e.getItems())n.add(r,t);return n}_createSelectionConsumable(e,t){const n=new ia;n.add(e,"selection");for(const r of t)n.add(e,"addMarker:"+r.name);for(const t of e.getAttributeKeys())n.add(e,"attribute:"+t);return n}_testAndFire(e,t){this.conversionApi.consumable.test(t.item,e)&&this.fire(function(e,t){return`${e}:${t.item.name||"$text"}`}(e,t),t,this.conversionApi)}_clearConversionApi(){delete this.conversionApi.writer,delete this.conversionApi.consumable}_convertInsertWithAttributes(e){this._testAndFire("insert",e);for(const t of e.item.getAttributeKeys())e.attributeKey=t,e.attributeOldValue=null,e.attributeNewValue=e.item.getAttribute(t),this._testAndFire("attribute:"+t,e)}_mapChangesWithAutomaticReconversion(e){const t=new Set,n=[];for(const r of e.getChanges()){const e=r.position||r.range.start,o=e.parent;if(ea(e,o)){n.push(r);continue}const i="attribute"===r.type?ta(e,o,null):o;if(i.is("$text")){n.push(r);continue}let a;if(a="attribute"===r.type?`attribute:${r.attributeKey}:${i.name}`:`${r.type}:${r.name}`,this._isReconvertTriggerEvent(a,i.name)){if(t.has(i))continue;t.add(i),n.push({type:"reconvert",element:i})}else n.push(r)}return n}_isReconvertTriggerEvent(e,t){return this._reconversionEventsMapping.get(e)===t}}function la(e,t,n){const r=t.getRange(),o=Array.from(e.getAncestors());return o.shift(),o.reverse(),!o.some(e=>{if(r.containsItem(e))return!!n.toViewElement(e).getCustomProperty("addHighlight")})}function ca(e){return{item:e.item,range:ra._createFromPositionAndShift(e.previousPosition,e.length)}}function da(e,t){if(e.is("textProxy")){const n=t.toViewPosition($i._createBefore(e)).parent;return n.is("$text")?n:null}return t.toViewElement(e)}je(sa,d);class ua{constructor(e,t,n){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,e&&this.setTo(e,t,n)}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 n=!1;for(const r of e._ranges)if(t.isEqual(r)){n=!0;break}if(!n)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new ra(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 ra(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 ra(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,t,n){if(null===e)this._setRanges([]);else if(e instanceof ua)this._setRanges(e.getRanges(),e.isBackward);else if(e&&"function"==typeof e.getRanges)this._setRanges(e.getRanges(),e.isBackward);else if(e instanceof ra)this._setRanges([e],!!t&&!!t.backward);else if(e instanceof $i)this._setRanges([new ra(e)]);else if(e instanceof Gi){const r=!!n&&!!n.backward;let o;if("in"==t)o=ra._createIn(e);else if("on"==t)o=ra._createOn(e);else{if(void 0===t)throw new s.a("model-selection-setto-required-second-parameter",[this,e]);o=new ra($i._createAt(e,t))}this._setRanges([o],r)}else{if(!sn(e))throw new s.a("model-selection-setto-not-selectable",[this,e]);this._setRanges(e,t&&!!t.backward)}}_setRanges(e,t=!1){const n=(e=Array.from(e)).some(t=>{if(!(t instanceof ra))throw new s.a("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every(e=>!e.isEqual(t))});if(e.length!==this._ranges.length||n){this._removeAllRanges();for(const t of e)this._pushRange(t);this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0})}}setFocus(e,t){if(null===this.anchor)throw new s.a("model-selection-setfocus-no-ranges",[this,e]);const n=$i._createAt(e,t);if("same"==n.compareWith(this.focus))return;const r=this.anchor;this._ranges.length&&this._popRange(),"before"==n.compareWith(r)?(this._pushRange(new ra(n,r)),this._lastRangeBackward=!0):(this._pushRange(new ra(r,n)),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()}is(e){return"selection"===e||"model:selection"===e}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const n=ha(t.start,e);n&&fa(n,t)&&(yield n);for(const n of t.getWalker()){const r=n.item;"elementEnd"==n.type&&ma(r,e,t)&&(yield r)}const r=ha(t.end,e);r&&!t.end.isTouching($i._createAt(r,0))&&fa(r,t)&&(yield r)}}containsEntireContent(e=this.anchor.root){const t=$i._createAt(e,0),n=$i._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new ra(e.start,e.end))}_checkRange(e){for(let t=0;t0;)this._popRange()}_popRange(){this._ranges.pop()}}function pa(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&e.parent)}function ma(e,t,n){return pa(e,t)&&fa(e,n)}function ha(e,t){const n=e.parent.root.document.model.schema,r=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let o=!1;const i=r.find(e=>!o&&(o=n.isLimit(e),!o&&pa(e,t)));return r.forEach(e=>t.add(e)),i}function fa(e,t){const n=function(e){const t=e.root.document.model.schema;let n=e.parent;for(;n;){if(t.isBlock(n))return n;n=n.parent}}(e);return!n||!t.containsRange(ra._createOn(n),!0)}je(ua,d);class ga extends ra{constructor(e,t){super(e,t),ba.call(this)}detach(){this.stopListening()}is(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e}toRange(){return new ra(this.start,this.end)}static fromRange(e){return new ga(e.start,e.end)}}function ba(){this.listenTo(this.root.document.model,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&va.call(this,n)},{priority:"low"})}function va(e){const t=this.getTransformedByOperation(e),n=ra._createFromRanges(t),r=!n.isEqual(this),o=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 i=null;if(r){"$graveyard"==n.root.rootName&&(i="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=n.start,this.end=n.end,this.fire("change:range",t,{deletionPosition:i})}else o&&this.fire("change:content",this.toRange(),{deletionPosition:i})}je(ga,d);class ya{constructor(e){this._selection=new _a(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)}is(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(e,t,n){this._selection.setTo(e,t,n)}_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"selection:"+e}static _isStoreAttributeKey(e){return e.startsWith("selection:")}}je(ya,d);class _a extends ua{constructor(e){super(),this.markers=new ln({idProperty:"name"}),this._model=e.model,this._document=e,this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this.listenTo(this._model,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&"marker"!=n.type&&"rename"!=n.type&&"noop"!=n.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",()=>{for(const e of this.getRanges())if(!this._document._validateSelectionRange(e))throw new s.a("document-selection-wrong-position",this,{range:e})}),this.listenTo(this._model.markers,"update",(e,t,n,r)=>{this._updateMarker(t,r)}),this.listenTo(this._document,"change",(e,t)=>{!function(e,t){const n=e.document.differ;for(const r of n.getChanges()){if("insert"!=r.type)continue;const n=r.position.parent;r.length===n.maxOffset&&e.enqueueChange(t,e=>{const t=Array.from(n.getAttributeKeys()).filter(e=>e.startsWith("selection:"));for(const r of t)e.removeAttribute(r,n)})}}(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{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=r.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 n=t.name.split(":",1)[0];if(!this._observedMarkers.has(n))continue;const r=t.getRange();for(const n of this.getRanges())r.containsRange(n,!n.isCollapsed)&&e.push(t)}const n=Array.from(this.markers);for(const n of e)this.markers.has(n)||(this.markers.add(n),t=!0);for(const n of Array.from(this.markers))e.includes(n)||(this.markers.remove(n),t=!0);t&&this.fire("change:marker",{oldMarkers:n,directChange:!1})}_updateMarker(e,t){const n=e.name.split(":",1)[0];if(!this._observedMarkers.has(n))return;let r=!1;const o=Array.from(this.markers),i=this.markers.has(e);if(t){let n=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){n=!0;break}n&&!i?(this.markers.add(e),r=!0):!n&&i&&(this.markers.remove(e),r=!0)}else i&&(this.markers.remove(e),r=!0);r&&this.fire("change:marker",{oldMarkers:o,directChange:!1})}_updateAttributes(e){const t=wn(this._getSurroundingAttributes()),n=wn(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 r=[];for(const[e,t]of this.getAttributes())n.has(e)&&n.get(e)===t||r.push(e);for(const[e]of n)this.hasAttribute(e)||r.push(e);r.length>0&&this.fire("change:attribute",{attributeKeys:r,directChange:!1})}_setAttribute(e,t,n=!0){const r=n?"normal":"low";return("low"!=r||"normal"!=this._attributePriority.get(e))&&super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,r),!0)}_removeAttribute(e,t=!0){const n=t?"normal":"low";return!("low"==n&&"normal"==this._attributePriority.get(e)||(this._attributePriority.set(e,n),!super.hasAttribute(e)||(this._attrs.delete(e),0)))}_setAttributesTo(e){const t=new Set;for(const[t,n]of this.getAttributes())e.get(t)!==n&&this._removeAttribute(t,!1);for(const[n,r]of e)this._setAttribute(n,r,!1)&&t.add(n);return t}*_getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith("selection:")){const n=t.substr(10);yield[n,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;let n=null;if(this.isCollapsed){const r=e.textNode?e.textNode:e.nodeBefore,o=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(n=wa(r)),n||(n=wa(o)),!this.isGravityOverridden&&!n){let e=r;for(;e&&!t.isInline(e)&&!n;)e=e.previousSibling,n=wa(e)}if(!n){let e=o;for(;e&&!t.isInline(e)&&!n;)e=e.nextSibling,n=wa(e)}n||(n=this._getStoredAttributes())}else{const e=this.getFirstRange();for(const r of e){if(r.item.is("element")&&t.isObject(r.item))break;if("text"==r.type){n=r.item.getAttributes();break}}}return n}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function wa(e){return e instanceof Ki||e instanceof qi?e.getAttributes():null}class ka{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}var xa=function(e){return en(e,5)};class Ea extends ka{elementToElement(e){return this.add(function(e){return(e=xa(e)).view=Ca(e.view,"container"),t=>{var n;if(t.on("insert:"+e.model,(n=e.view,(e,t,r)=>{const o=n(t.item,r);if(!o)return;if(!r.consumable.consume(t.item,"insert"))return;const i=r.mapper.toViewPosition(t.range.start);r.mapper.bindElements(t.item,o),r.writer.insert(i,o)}),{priority:e.converterPriority||"normal"}),e.triggerBy){if(e.triggerBy.attributes)for(const n of e.triggerBy.attributes)t._mapReconversionTriggerEvent(e.model,`attribute:${n}:${e.model}`);if(e.triggerBy.children)for(const n of e.triggerBy.children)t._mapReconversionTriggerEvent(e.model,"insert:"+n),t._mapReconversionTriggerEvent(e.model,"remove:"+n)}}}(e))}attributeToElement(e){return this.add(function(e){let t="attribute:"+((e=xa(e)).model.key?e.model.key:e.model);if(e.model.name&&(t+=":"+e.model.name),e.model.values)for(const t of e.model.values)e.view[t]=Ca(e.view[t],"attribute");else e.view=Ca(e.view,"attribute");const n=Ta(e);return r=>{r.on(t,function(e){return(t,n,r)=>{const o=e(n.attributeOldValue,r),i=e(n.attributeNewValue,r);if(!o&&!i)return;if(!r.consumable.consume(n.item,t.name))return;const a=r.writer,s=a.document.selection;if(n.item instanceof ua||n.item instanceof ya)a.wrap(s.getFirstRange(),i);else{let e=r.mapper.toViewRange(n.range);null!==n.attributeOldValue&&o&&(e=a.unwrap(e,o)),null!==n.attributeNewValue&&i&&a.wrap(e,i)}}}(n),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t="attribute:"+((e=xa(e)).model.key?e.model.key:e.model);if(e.model.name&&(t+=":"+e.model.name),e.model.values)for(const t of e.model.values)e.view[t]=Aa(e.view[t]);else e.view=Aa(e.view);const n=Ta(e);return r=>{var o;r.on(t,(o=n,(e,t,n)=>{const r=o(t.attributeOldValue,n),i=o(t.attributeNewValue,n);if(!r&&!i)return;if(!n.consumable.consume(t.item,e.name))return;const a=n.mapper.toViewElement(t.item),l=n.writer;if(!a)throw new s.a("conversion-attribute-to-attribute-on-text",[t,n]);if(null!==t.attributeOldValue&&r)if("class"==r.key){const e=dn(r.value);for(const t of e)l.removeClass(t,a)}else if("style"==r.key){const e=Object.keys(r.value);for(const t of e)l.removeStyle(t,a)}else l.removeAttribute(r.key,a);if(null!==t.attributeNewValue&&i)if("class"==i.key){const e=dn(i.value);for(const t of e)l.addClass(t,a)}else if("style"==i.key){const e=Object.keys(i.value);for(const t of e)l.setStyle(t,i.value[t],a)}else l.setAttribute(i.key,i.value,a)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){return(e=xa(e)).view=Ca(e.view,"ui"),t=>{var n;t.on("addMarker:"+e.model,(n=e.view,(e,t,r)=>{t.isOpening=!0;const o=n(t,r);t.isOpening=!1;const i=n(t,r);if(!o||!i)return;const a=t.markerRange;if(a.isCollapsed&&!r.consumable.consume(a,e.name))return;for(const t of a)if(!r.consumable.consume(t.item,e.name))return;const s=r.mapper,l=r.writer;l.insert(s.toViewPosition(a.start),o),r.mapper.bindElementToMarker(o,t.markerName),a.isCollapsed||(l.insert(s.toViewPosition(a.end),i),r.mapper.bindElementToMarker(i,t.markerName)),e.stop()}),{priority:e.converterPriority||"normal"}),t.on("removeMarker:"+e.model,(e.view,(e,t,n)=>{const r=n.mapper.markerNameToElements(t.markerName);if(r){for(const e of r)n.mapper.unbindElementFromMarkerName(e,t.markerName),n.writer.clear(n.writer.createRangeOn(e),e);n.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var n;t.on("addMarker:"+e.model,(n=e.view,(e,t,r)=>{if(!t.item)return;if(!(t.item instanceof ua||t.item instanceof ya||t.item.is("$textProxy")))return;const o=Da(n,t,r);if(!o)return;if(!r.consumable.consume(t.item,e.name))return;const i=r.writer,a=Sa(i,o),s=i.document.selection;if(t.item instanceof ua||t.item instanceof ya)i.wrap(s.getFirstRange(),a,s);else{const e=r.mapper.toViewRange(t.range),n=i.wrap(e,a);for(const e of n.getItems())if(e.is("attributeElement")&&e.isSimilar(a)){r.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on("addMarker:"+e.model,function(e){return(t,n,r)=>{if(!n.item)return;if(!(n.item instanceof Qi))return;const o=Da(e,n,r);if(!o)return;if(!r.consumable.test(n.item,t.name))return;const i=r.mapper.toViewElement(n.item);if(i&&i.getCustomProperty("addHighlight")){r.consumable.consume(n.item,t.name);for(const e of ra._createIn(n.item))r.consumable.consume(e.item,t.name);i.getCustomProperty("addHighlight")(i,o,r.writer),r.mapper.bindElementToMarker(i,n.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on("removeMarker:"+e.model,function(e){return(t,n,r)=>{if(n.markerRange.isCollapsed)return;const o=Da(e,n,r);if(!o)return;const i=Sa(r.writer,o),a=r.mapper.markerNameToElements(n.markerName);if(a){for(const e of a)r.mapper.unbindElementFromMarkerName(e,n.markerName),e.is("attributeElement")?r.writer.unwrap(r.writer.createRangeOn(e),i):e.getCustomProperty("removeHighlight")(e,o.id,r.writer);r.writer.clearClonedElementsGroup(n.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){const t=(e=xa(e)).model;return e.view||(e.view=n=>({group:t,name:n.substr(e.model.length+1)})),n=>{var r;n.on("addMarker:"+t,(r=e.view,(e,t,n)=>{const o=r(t.markerName,n);if(!o)return;const i=t.markerRange;n.consumable.consume(i,e.name)&&(Ma(i,!1,n,t,o),Ma(i,!0,n,t,o),e.stop())}),{priority:e.converterPriority||"normal"}),n.on("removeMarker:"+t,function(e){return(t,n,r)=>{const o=e(n.markerName,r);if(!o)return;const i=r.mapper.markerNameToElements(n.markerName);if(i){for(const e of i)r.mapper.unbindElementFromMarkerName(e,n.markerName),e.is("containerElement")?(a(`data-${o.group}-start-before`,e),a(`data-${o.group}-start-after`,e),a(`data-${o.group}-end-before`,e),a(`data-${o.group}-end-after`,e)):r.writer.clear(r.writer.createRangeOn(e),e);r.writer.clearClonedElementsGroup(n.markerName),t.stop()}function a(e,t){if(t.hasAttribute(e)){const n=new Set(t.getAttribute(e).split(","));n.delete(o.name),0==n.size?r.writer.removeAttribute(e,t):r.writer.setAttribute(e,Array.from(n).join(","),t)}}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}}function Sa(e,t){const n=e.createAttributeElement("span",t.attributes);return t.classes&&n._addClass(t.classes),"number"==typeof t.priority&&(n._priority=t.priority),n._id=t.id,n}function Ma(e,t,n,r,o){const i=t?e.start:e.end,a=i.nodeAfter&&i.nodeAfter.is("element")?i.nodeAfter:null,s=i.nodeBefore&&i.nodeBefore.is("element")?i.nodeBefore:null;if(a||s){let e,i;t&&a||!t&&!s?(e=a,i=!0):(e=s,i=!1);const l=n.mapper.toViewElement(e);if(l)return void function(e,t,n,r,o,i){const a=`data-${i.group}-${t?"start":"end"}-${n?"before":"after"}`,s=e.hasAttribute(a)?e.getAttribute(a).split(","):[];s.unshift(i.name),r.writer.setAttribute(a,s.join(","),e),r.mapper.bindElementToMarker(e,o.markerName)}(l,t,i,n,r,o)}!function(e,t,n,r,o){const i=`${o.group}-${t?"start":"end"}`,a=o.name?{name:o.name}:null,s=n.writer.createUIElement(i,a);n.writer.insert(e,s),n.mapper.bindElementToMarker(s,r.markerName)}(n.mapper.toViewPosition(i),t,n,r,o)}function Ca(e,t){return"function"==typeof e?e:(n,r)=>function(e,t,n){let r;"string"==typeof e&&(e={name:e});const o=t.writer,i=Object.assign({},e.attributes);if("container"==n)r=o.createContainerElement(e.name,i);else if("attribute"==n){const t={priority:e.priority||kr.DEFAULT_PRIORITY};r=o.createAttributeElement(e.name,i,t)}else r=o.createUIElement(e.name,i);if(e.styles){const t=Object.keys(e.styles);for(const n of t)o.setStyle(n,e.styles[n],r)}if(e.classes){const t=e.classes;if("string"==typeof t)o.addClass(t,r);else for(const e of t)o.addClass(e,r)}return r}(e,r,t)}function Ta(e){return e.model.values?(t,n)=>{const r=e.view[t];return r?r(t,n):null}:e.view}function Aa(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function Da(e,t,n){const r="function"==typeof e?e(t,n):e;return r?(r.priority||(r.priority=10),r.id||(r.id=t.markerName),r):null}function La(e){const{schema:t,document:n}=e.model;for(const r of n.getRootNames()){const o=n.getRoot(r);if(o.isEmpty&&!t.checkChild(o,"$text")&&t.checkChild(o,"paragraph"))return e.insertElement("paragraph",o),!0}return!1}function Pa(e,t,n){const r=n.createContext(e);return!!n.checkChild(r,"paragraph")&&!!n.checkChild(r.push("paragraph"),t)}function Ia(e,t){const n=t.createElement("paragraph");return t.insert(n,e),t.createPositionAt(n,0)}class Na extends ka{elementToElement(e){return this.add(Oa(e))}elementToAttribute(e){return this.add(function(e){ja(e=xa(e));const t=Ya(e,!1),n=Ra(e.view),r=n?"element:"+n:"element";return n=>{n.on(r,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t=null;("string"==typeof(e=xa(e)).view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let n;if("class"==t||"style"==t)n={["class"==t?"classes":"styles"]:e.view.value};else{const r=void 0===e.view.value?/[\s\S]*/:e.view.value;n={attributes:{[t]:r}}}return e.view.name&&(n.name=e.view.name),e.view=n,t}(e)),ja(e,t);const n=Ya(e,!0);return t=>{t.on("element",n,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){return function(e){const t=e.model;e.model=(e,n)=>{const r="string"==typeof t?t:t(e,n);return n.writer.createElement("$marker",{"data-name":r})}}(e=xa(e)),Oa(e)}(e))}dataToMarker(e){return this.add(function(e){(e=xa(e)).model||(e.model=t=>t?e.view+":"+t:e.view);const t=Fa(za(e,"start")),n=Fa(za(e,"end"));return r=>{r.on("element:"+e.view+"-start",t,{priority:e.converterPriority||"normal"}),r.on("element:"+e.view+"-end",n,{priority:e.converterPriority||"normal"});const o=a.get("low"),i=a.get("highest"),s=a.get(e.converterPriority)/i;r.on("element",function(e){return(t,n,r)=>{const o="data-"+e.view;function i(t,o){for(const i of o){const o=e.model(i,r),a=r.writer.createElement("$marker",{"data-name":o});r.writer.insert(a,t),n.modelCursor.isEqual(t)?n.modelCursor=n.modelCursor.getShiftedBy(1):n.modelCursor=n.modelCursor._getTransformedByInsertion(t,1),n.modelRange=n.modelRange._getTransformedByInsertion(t,1)[0]}}(r.consumable.test(n.viewItem,{attributes:o+"-end-after"})||r.consumable.test(n.viewItem,{attributes:o+"-start-after"})||r.consumable.test(n.viewItem,{attributes:o+"-end-before"})||r.consumable.test(n.viewItem,{attributes:o+"-start-before"}))&&(n.modelRange||Object.assign(n,r.convertChildren(n.viewItem,n.modelCursor)),r.consumable.consume(n.viewItem,{attributes:o+"-end-after"})&&i(n.modelRange.end,n.viewItem.getAttribute(o+"-end-after").split(",")),r.consumable.consume(n.viewItem,{attributes:o+"-start-after"})&&i(n.modelRange.end,n.viewItem.getAttribute(o+"-start-after").split(",")),r.consumable.consume(n.viewItem,{attributes:o+"-end-before"})&&i(n.modelRange.start,n.viewItem.getAttribute(o+"-end-before").split(",")),r.consumable.consume(n.viewItem,{attributes:o+"-start-before"})&&i(n.modelRange.start,n.viewItem.getAttribute(o+"-start-before").split(",")))}}(e),{priority:o+s})}}(e))}}function Oa(e){const t=Fa(e=xa(e)),n=Ra(e.view),r=n?"element:"+n:"element";return n=>{n.on(r,t,{priority:e.converterPriority||"normal"})}}function Ra(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function Fa(e){const t=new kn(e.view);return(n,r,o)=>{const i=t.match(r.viewItem);if(!i)return;const a=i.match;if(a.name=!0,!o.consumable.test(r.viewItem,a))return;const s=function(e,t,n){return e instanceof Function?e(t,n):n.writer.createElement(e)}(e.model,r.viewItem,o);s&&o.safeInsert(s,r.modelCursor)&&(o.consumable.consume(r.viewItem,a),o.convertChildren(r.viewItem,s),o.updateConversionResult(s,r))}}function ja(e,t=null){const n=null===t||(e=>e.getAttribute(t)),r="object"!=typeof e.model?e.model:e.model.key,o="object"!=typeof e.model||void 0===e.model.value?n:e.model.value;e.model={key:r,value:o}}function Ya(e,t){const n=new kn(e.view);return(r,o,i)=>{const a=n.match(o.viewItem);if(!a)return;if(function(e,t){const n="function"==typeof e?e(t):e;return!("object"==typeof n&&!Ra(n)||n.classes||n.attributes||n.styles)}(e.view,o.viewItem)?a.match.name=!0:delete a.match.name,!i.consumable.test(o.viewItem,a.match))return;const s=e.model.key,l="function"==typeof e.model.value?e.model.value(o.viewItem,i):e.model.value;null!==l&&(o.modelRange||Object.assign(o,i.convertChildren(o.viewItem,o.modelCursor)),function(e,t,n,r){let o=!1;for(const i of Array.from(e.getItems({shallow:n})))r.schema.checkAttribute(i,t.key)&&(o=!0,i.hasAttribute(t.key)||r.writer.setAttribute(t.key,t.value,i));return o}(o.modelRange,{key:s,value:l},t,i)&&i.consumable.consume(o.viewItem,a.match))}}function za(e,t){const n={};return n.view=e.view+"-"+t,n.model=(t,n)=>{const r=t.getAttribute("name"),o=e.model(r,n);return n.writer.createElement("$marker",{"data-name":o})},n}class Ha{constructor(e,t){this.model=e,this.view=new Ui(t),this.mapper=new oa,this.downcastDispatcher=new sa({mapper:this.mapper,schema:e.schema});const n=this.model.document,r=n.selection,o=this.model.markers;this.listenTo(this.model,"_beforeChanges",()=>{this.view._disableRendering(!0)},{priority:"highest"}),this.listenTo(this.model,"_afterChanges",()=>{this.view._disableRendering(!1)},{priority:"lowest"}),this.listenTo(n,"change",()=>{this.view.change(e=>{this.downcastDispatcher.convertChanges(n.differ,o,e),this.downcastDispatcher.convertSelection(r,o,e)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(n,r)=>{const o=r.newSelection,i=[];for(const e of o.getRanges())i.push(t.toModelRange(e));const a=e.createSelection(i,{backward:o.isBackward});a.isEqual(e.document.selection)||e.change(e=>{e.setSelection(a)})}}(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",(e,t,n)=>{if(!n.consumable.consume(t.item,"insert"))return;const r=n.writer,o=n.mapper.toViewPosition(t.range.start),i=r.createText(t.item.data);r.insert(o,i)},{priority:"lowest"}),this.downcastDispatcher.on("remove",(e,t,n)=>{const r=n.mapper.toViewPosition(t.position),o=t.position.getShiftedBy(t.length),i=n.mapper.toViewPosition(o,{isPhantom:!0}),a=n.writer.createRange(r,i),s=n.writer.remove(a.getTrimmed());for(const e of n.writer.createRangeIn(s).getItems())n.mapper.unbindViewElement(e)},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,n)=>{const r=n.writer,o=r.document.selection;for(const e of o.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&n.writer.mergeAttributes(e.start);r.setSelection(null)},{priority:"high"}),this.downcastDispatcher.on("selection",(e,t,n)=>{const r=t.selection;if(r.isCollapsed)return;if(!n.consumable.consume(r,"selection"))return;const o=[];for(const e of r.getRanges()){const t=n.mapper.toViewRange(e);o.push(t)}n.writer.setSelection(o,{backward:r.isBackward})},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,n)=>{const r=t.selection;if(!r.isCollapsed)return;if(!n.consumable.consume(r,"selection"))return;const o=n.writer,i=r.getFirstPosition(),a=n.mapper.toViewPosition(i),s=o.breakAttributes(a);o.setSelection(s)},{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(e=>{if("$graveyard"==e.rootName)return null;const t=new ar(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t})}destroy(){this.view.destroy(),this.stopListening()}}je(Ha,Pe);class Ba{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const n=this.get(e);if(!n)throw new s.a("commandcollection-command-not-found",this,{commandName:e});return n.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 Va{constructor(){this._consumables=new Map}add(e,t){let n;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?n=this._consumables.get(e):(n=new Wa(e),this._consumables.set(e,n)),n.add(t))}test(e,t){const n=this._consumables.get(e);return void 0===n?null:e.is("$text")||e.is("documentFragment")?n:n.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 n=this._consumables.get(e);void 0!==n&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):n.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},n=e.getAttributeKeys();for(const e of n)"style"!=e&&"class"!=e&&t.attributes.push(e);const r=e.getClassNames();for(const e of r)t.classes.push(e);const o=e.getStyleNames();for(const e of o)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new Va(e)),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,Va.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const n of e.getChildren())t=Va.createFrom(n,t);return t}}class Wa{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 in this._consumables)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t in this._consumables)if(t in e){const n=this._test(t,e[t]);if(!0!==n)return n}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t in this._consumables)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t in this._consumables)t in e&&this._revert(t,e[t])}_add(e,t){const n=ue(t)?t:[t],r=this._consumables[e];for(const t of n){if("attributes"===e&&("class"===t||"style"===t))throw new s.a("viewconsumable-invalid-attribute",this);if(r.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))r.set(e,!0)}}_test(e,t){const n=ue(t)?t:[t],r=this._consumables[e];for(const t of n)if("attributes"!==e||"class"!==t&&"style"!==t){const e=r.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",n=this._test(e,[...this._consumables[e].keys()]);if(!0!==n)return n}return!0}_consume(e,t){const n=ue(t)?t:[t],r=this._consumables[e];for(const t of n)if("attributes"!==e||"class"!==t&&"style"!==t){if(r.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))r.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const n=ue(t)?t:[t],r=this._consumables[e];for(const t of n)if("attributes"!==e||"class"!==t&&"style"!==t)!1===r.get(t)&&r.set(t,!0);else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class Ua{constructor(){this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",(e,t)=>{t[0]=new Ga(t[0])},{priority:"highest"}),this.on("checkChild",(e,t)=>{t[0]=new Ga(t[0]),t[1]=this.getDefinition(t[1])},{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new s.a("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 s.a("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:e.is&&(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 n=this.getDefinition(e.last);return!!n&&n.allowAttributes.includes(t)}checkMerge(e,t=null){if(e instanceof $i){const t=e.nodeBefore,n=e.nodeAfter;if(!(t instanceof Qi))throw new s.a("schema-check-merge-no-element-before",this);if(!(n instanceof Qi))throw new s.a("schema-check-merge-no-element-after",this);return this.checkMerge(t,n)}for(const n of t.getChildren())if(!this.checkChild(e,n))return!1;return!0}addChildCheck(e){this.on("checkChild",(t,[n,r])=>{if(!r)return;const o=e(n,r);"boolean"==typeof o&&(t.stop(),t.return=o)},{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",(t,[n,r])=>{const o=e(n,r);"boolean"==typeof o&&(t.stop(),t.return=o)},{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;for(t=e instanceof $i?e.parent:(e instanceof ra?[e]:Array.from(e.getRanges())).reduce((e,t)=>{const n=t.getCommonAncestor();return e?e.getCommonAncestor(n,{includeSelf:!0}):n},null);!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const n=[...e.getFirstPosition().getAncestors(),new qi("",e.getAttributes())];return this.checkAttribute(n,t)}{const n=e.getRanges();for(const e of n)for(const n of e)if(this.checkAttribute(n.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const n of e)yield*this._getValidRangesForRange(n,t)}getNearestSelectionRange(e,t="both"){if(this.checkChild(e,"$text"))return new ra(e);let n,r;const o=e.getAncestors().reverse().find(e=>this.isLimit(e))||e.root;"both"!=t&&"backward"!=t||(n=new Ji({boundaries:ra._createIn(o),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(r=new Ji({boundaries:ra._createIn(o),startPosition:e}));for(const e of function*(e,t){let n=!1;for(;!n;){if(n=!0,e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}}}(n,r)){const t=e.walker==n?"elementEnd":"elementStart",r=e.value;if(r.type==t&&this.isObject(r.item))return ra._createOn(r.item);if(this.checkChild(r.nextPosition,"$text"))return new ra(r.nextPosition)}return null}findAllowedParent(e,t){let n=e.parent;for(;n;){if(this.checkChild(n,t))return n;if(this.isLimit(n))return null;n=n.parent}return null}removeDisallowedAttributes(e,t){for(const n of e)if(n.is("$text"))is(this,n,t);else{const e=ra._createIn(n).getPositions();for(const n of e)is(this,n.nodeBefore||n.parent,t)}}createContext(e){return new Ga(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,n=Object.keys(t);for(const r of n)e[r]=qa(t[r],r);for(const t of n)Ka(e,t);for(const t of n)Xa(e,t);for(const t of n)Qa(e,t);for(const t of n)Ja(e,t),Za(e,t);for(const t of n)$a(e,t),es(e,t),ts(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,n=t.length-1){const r=t.getItem(n);if(e.allowIn.includes(r.name)){if(0==n)return!0;{const e=this.getDefinition(r);return this._checkContextMatch(e,t,n-1)}}return!1}*_getValidRangesForRange(e,t){let n=e.start,r=e.start;for(const o of e.getItems({shallow:!0}))o.is("element")&&(yield*this._getValidRangesForRange(ra._createIn(o),t)),this.checkAttribute(o,t)||(n.isEqual(r)||(yield new ra(n,r)),n=$i._createAfter(o)),r=$i._createAfter(o);n.isEqual(r)||(yield new ra(n,r))}}je(Ua,Pe);class Ga{constructor(e){if(e instanceof Ga)return e;"string"==typeof e?e=[e]:Array.isArray(e)||(e=e.getAncestors({includeSelf:!0})),this._items=e.map(os)}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 Ga([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 qa(e,t){const n={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(e,t){for(const n of e){const e=Object.keys(n).filter(e=>e.startsWith("is"));for(const r of e)t[r]=n[r]}}(e,n),ns(e,n,"allowIn"),ns(e,n,"allowContentOf"),ns(e,n,"allowWhere"),ns(e,n,"allowAttributes"),ns(e,n,"allowAttributesOf"),ns(e,n,"allowChildren"),ns(e,n,"inheritTypesFrom"),function(e,t){for(const n of e){const e=n.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,n),n}function Ka(e,t){const n=e[t];for(const r of n.allowChildren){const n=e[r];n&&n.allowIn.push(t)}n.allowChildren.length=0}function Xa(e,t){for(const n of e[t].allowContentOf)e[n]&&rs(e,n).forEach(e=>{e.allowIn.push(t)});delete e[t].allowContentOf}function Qa(e,t){for(const n of e[t].allowWhere){const r=e[n];if(r){const n=r.allowIn;e[t].allowIn.push(...n)}}delete e[t].allowWhere}function Ja(e,t){for(const n of e[t].allowAttributesOf){const r=e[n];if(r){const n=r.allowAttributes;e[t].allowAttributes.push(...n)}}delete e[t].allowAttributesOf}function Za(e,t){const n=e[t];for(const t of n.inheritTypesFrom){const r=e[t];if(r){const e=Object.keys(r).filter(e=>e.startsWith("is"));for(const t of e)t in n||(n[t]=r[t])}}delete n.inheritTypesFrom}function $a(e,t){const n=e[t],r=n.allowIn.filter(t=>e[t]);n.allowIn=Array.from(new Set(r))}function es(e,t){const n=e[t];for(const r of n.allowIn)e[r].allowChildren.push(t)}function ts(e,t){const n=e[t];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function ns(e,t,n){for(const r of e)"string"==typeof r[n]?t[n].push(r[n]):Array.isArray(r[n])&&t[n].push(...r[n])}function rs(e,t){const n=e[t];return(r=e,Object.keys(r).map(e=>r[e])).filter(e=>e.allowIn.includes(n.name));var r}function os(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 is(e,t,n){for(const r of t.getAttributeKeys())e.checkAttribute(t,r)||n.removeAttribute(r,t)}class as{constructor(e={}){this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this.conversionApi=Object.assign({},e),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this),this.conversionApi.safeInsert=this._safeInsert.bind(this),this.conversionApi.updateConversionResult=this._updateConversionResult.bind(this),this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this),this.conversionApi.getSplitParts=this._getSplitParts.bind(this)}convert(e,t,n=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let n;for(const r of new Ga(e)){const e={};for(const t of r.getAttributeKeys())e[t]=r.getAttribute(t);const o=t.createElement(r.name,e);n&&t.append(o,n),n=$i._createAt(o,0)}return n}(n,t),this.conversionApi.writer=t,this.conversionApi.consumable=Va.createFrom(e),this.conversionApi.store={};const{modelRange:r}=this._convertItem(e,this._modelCursor),o=t.createDocumentFragment();if(r){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,o);o.markers=function(e,t){const n=new Set,r=new Map,o=ra._createIn(e).getItems();for(const e of o)"$marker"==e.name&&n.add(e);for(const e of n){const n=e.getAttribute("data-name"),o=t.createPositionBefore(e);r.has(n)?r.get(n).end=o.clone():r.set(n,new ra(o.clone())),t.remove(e)}return r}(o,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,o}_convertItem(e,t){const n=Object.assign({viewItem:e,modelCursor:t,modelRange:null});if(e.is("element")?this.fire("element:"+e.name,n,this.conversionApi):e.is("$text")?this.fire("text",n,this.conversionApi):this.fire("documentFragment",n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof ra))throw new s.a("view-conversion-dispatcher-incorrect-result",this);return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(e,t){let n=t.is("position")?t:$i._createAt(t,0);const r=new ra(n);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,n);e.modelRange instanceof ra&&(r.end=e.modelRange.end,n=e.modelCursor)}return{modelRange:r,modelCursor:n}}_safeInsert(e,t){const n=this._splitToAllowedParent(e,t);return!!n&&(this.conversionApi.writer.insert(e,n.position),!0)}_updateConversionResult(e,t){const n=this._getSplitParts(e),r=this.conversionApi.writer;t.modelRange||(t.modelRange=r.createRange(r.createPositionBefore(e),r.createPositionAfter(n[n.length-1])));const o=this._cursorParents.get(e);t.modelCursor=o?r.createPositionAt(o,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:n,writer:r}=this.conversionApi;let o=n.findAllowedParent(t,e);if(o){if(o===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(o)&&(o=null)}if(!o)return Pa(t,e,n)?{position:Ia(t,r)}:null;const i=this.conversionApi.writer.split(t,o),a=[];for(const e of i.range.getWalker())if("elementEnd"==e.type)a.push(e.item);else{const t=a.pop(),n=e.item;this._registerSplitPair(t,n)}const s=i.range.end.parent;return this._cursorParents.set(e,s),{position:i.position,cursorParent:s}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const n=this._splitParts.get(e);this._splitParts.set(t,n),n.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}je(as,d);class ss{getHtml(e){const t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class ls{constructor(e){this.domParser=new DOMParser,this.domConverter=new Lo(e,{renderingMode:"data"}),this.htmlWriter=new ss}toData(e){const t=this.domConverter.viewToDom(e,document);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t)}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){const t=this.domParser.parseFromString(e,"text/html"),n=t.createDocumentFragment();let r=t.firstChild;for(;!r.isSameNode(t.documentElement);){const e=r;r=r.nextSibling,e.nodeType==Node.COMMENT_NODE&&n.appendChild(e)}const o=t.body.childNodes;for(;o.length>0;)n.appendChild(o[0]);return n}}class cs{constructor(e,t){this.model=e,this.mapper=new oa,this.downcastDispatcher=new sa({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",(e,t,n)=>{if(!n.consumable.consume(t.item,"insert"))return;const r=n.writer,o=n.mapper.toViewPosition(t.range.start),i=r.createText(t.item.data);r.insert(o,i)},{priority:"lowest"}),this.upcastDispatcher=new as({schema:e.schema}),this.viewDocument=new wr(t),this.stylesProcessor=t,this.htmlProcessor=new ls(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new Kr(this.viewDocument),this.upcastDispatcher.on("text",(e,t,{schema:n,consumable:r,writer:o})=>{let i=t.modelCursor;if(!r.test(t.viewItem))return;if(!n.checkChild(i,"$text")){if(!Pa(i,"$text",n))return;i=Ia(i,o)}r.consume(t.viewItem);const a=o.createText(t.viewItem.data);o.insert(a,i),t.modelRange=o.createRange(i,i.getShiftedBy(a.offsetSize)),t.modelCursor=t.modelRange.end},{priority:"lowest"}),this.upcastDispatcher.on("element",(e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:r}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=r}},{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",(e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:r}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=r}},{priority:"lowest"}),this.decorate("init"),this.decorate("set"),this.decorate("get"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"}),this.on("ready",()=>{this.model.enqueueChange("transparent",La)},{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:n="empty"}=e;if(!this._checkIfRootsExists([t]))throw new s.a("datacontroller-get-non-existent-root",this);const r=this.model.document.getRoot(t);return"empty"!==n||this.model.hasContent(r,{ignoreWhitespaces:!0})?this.stringify(r,e):""}stringify(e,t={}){const n=this.toView(e,t);return this.processor.toData(n)}toView(e,t={}){const n=this.viewDocument,r=this._viewWriter;this.mapper.clearBindings();const o=ra._createIn(e),i=new qr(n);this.mapper.bindElements(e,i),this.downcastDispatcher.conversionApi.options=t,this.downcastDispatcher.convertInsert(o,r);const a=e.is("documentFragment")?Array.from(e.markers):function(e){const t=[],n=e.root.document;if(!n)return[];const r=ra._createIn(e);for(const e of n.model.markers){const n=e.getRange(),o=n.isCollapsed,i=n.start.isEqual(r.start)||n.end.isEqual(r.end);if(o&&i)t.push([e.name,n]);else{const o=r.getIntersection(n);o&&t.push([e.name,o])}}return t.sort(([e,t],[n,r])=>{if("after"!==t.end.compareWith(r.start))return 1;if("before"!==t.start.compareWith(r.end))return-1;switch(t.start.compareWith(r.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(r.end)){case"before":return 1;case"after":return-1;default:return n.localeCompare(e)}}})}(e);for(const[e,t]of a)this.downcastDispatcher.convertMarkerAdd(e,t,r);return delete this.downcastDispatcher.conversionApi.options,i}init(e){if(this.model.document.version)throw new s.a("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new s.a("datacontroller-init-non-existent-root",this);return this.model.enqueueChange("transparent",e=>{for(const n of Object.keys(t)){const r=this.model.document.getRoot(n);e.insert(this.parse(t[n],r),r,0)}}),Promise.resolve()}set(e,t={}){let n={};if("string"==typeof e?n.main=e:n=e,!this._checkIfRootsExists(Object.keys(n)))throw new s.a("datacontroller-set-non-existent-root",this);const r=t.batchType||"default";this.model.enqueueChange(r,e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(n)){const r=this.model.document.getRoot(t);e.remove(e.createRangeIn(r)),e.insert(this.parse(n[t],r),r,0)}})}parse(e,t="$root"){const n=this.processor.toView(e);return this.toModel(n,t)}toModel(e,t="$root"){return this.model.change(n=>this.upcastDispatcher.convert(e,n,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.getRootNames().includes(t))return!1;return!0}}je(cs,Pe);class ds{constructor(e,t){this._helpers=new Map,this._downcast=dn(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=dn(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const n=this._downcast.includes(t);if(!this._upcast.includes(t)&&!n)throw new s.a("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:n})}for(e){if(!this._helpers.has(e))throw new s.a("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:n}of us(e))this.for("upcast").elementToElement({model:t,view:n,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:n}of us(e))this.for("upcast").elementToAttribute({view:n,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:n}of us(e))this.for("upcast").attributeToAttribute({view:n,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:n}){if(this._helpers.has(e))throw new s.a("conversion-group-exists",this);const r=n?new Ea(t):new Na(t);this._helpers.set(e,r)}}function*us(e){if(e.model.values)for(const t of e.model.values){const n={key:e.model.key,value:t},r=e.view[t],o=e.upcastAlso?e.upcastAlso[t]:void 0;yield*ps(n,r,o)}else yield*ps(e.model,e.view,e.upcastAlso)}function*ps(e,t,n){if(yield{model:e,view:t},n)for(const t of dn(n))yield{model:e,view:t}}class ms{constructor(e="default"){this.operations=[],this.type=e}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}}class hs{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){return new this(e.baseVersion)}}class fs{constructor(e){this.markers=new Map,this._children=new Xi,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 root(){return this}get parent(){return null}is(e){return"documentFragment"===e||"model:documentFragment"===e}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 n of e)t=t.getChild(t.offsetToIndex(n));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 n of e)n.name?t.push(Qi.fromJSON(n)):t.push(qi.fromJSON(n));return new fs(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=function(e){return"string"==typeof e?[new qi(e)]:(sn(e)||(e=[e]),Array.from(e).map(e=>"string"==typeof e?new qi(e):e instanceof Ki?new qi(e.data,e.getAttributes()):e))}(t);for(const e of n)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const e of n)e.parent=null;return n}}function gs(e,t){const n=(t=ys(t)).reduce((e,t)=>e+t.offsetSize,0),r=e.parent;ws(e);const o=e.index;return r._insertChild(o,t),_s(r,o+t.length),_s(r,o),new ra(e,e.getShiftedBy(n))}function bs(e){if(!e.isFlat)throw new s.a("operation-utils-remove-range-not-flat",this);const t=e.start.parent;ws(e.start),ws(e.end);const n=t._removeChildren(e.start.index,e.end.index-e.start.index);return _s(t,e.start.index),n}function vs(e,t){if(!e.isFlat)throw new s.a("operation-utils-move-range-not-flat",this);const n=bs(e);return gs(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),n)}function ys(e){const t=[];e instanceof Array||(e=[e]);for(let n=0;ne.maxOffset)throw new s.a("move-operation-nodes-do-not-exist",this);if(e===t&&n=n&&this.targetPosition.path[e]e._clone(!0))),t=new Cs(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new $i(e,[0]);return new Ms(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0))),gs(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 n=[];for(const t of e.nodes)t.name?n.push(Qi.fromJSON(t)):n.push(qi.fromJSON(t));const r=new Cs($i.fromJSON(e.position,t),n,e.baseVersion);return r.shouldReceiveAttributes=e.shouldReceiveAttributes,r}}class Ts extends hs{constructor(e,t,n,r,o,i){super(i),this.name=e,this.oldRange=t?t.clone():null,this.newRange=n?n.clone():null,this.affectsData=o,this._markers=r}get type(){return"marker"}clone(){return new Ts(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new Ts(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){const e=this.newRange?"_set":"_remove";this._markers[e](this.name,this.newRange,!0,this.affectsData)}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 Ts(e.name,e.oldRange?ra.fromJSON(e.oldRange,t):null,e.newRange?ra.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}}class As extends hs{constructor(e,t,n,r){super(r),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=n}get type(){return"rename"}clone(){return new As(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new As(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof Qi))throw new s.a("rename-operation-wrong-position",this);if(e.name!==this.oldName)throw new s.a("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 As($i.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}class Ds extends hs{constructor(e,t,n,r,o){super(o),this.root=e,this.key=t,this.oldValue=n,this.newValue=r}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new Ds(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Ds(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new s.a("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 s.a("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 s.a("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 s.a("rootattribute-operation-fromjson-no-root",this,{rootName:e.root});return new Ds(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}class Ls extends hs{constructor(e,t,n,r,o){super(o),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=r.clone()}get type(){return"merge"}get deletionPosition(){return new $i(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new ra(this.sourcePosition,e)}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),n=new $i(this.sourcePosition.root,t)._getTransformedByMergeOperation(this);return new Ps(e,this.howMany,n,this.graveyardPosition,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent;if(!e.parent)throw new s.a("merge-operation-source-position-invalid",this);if(!t.parent)throw new s.a("merge-operation-target-position-invalid",this);if(this.howMany!=e.maxOffset)throw new s.a("merge-operation-how-many-invalid",this)}_execute(){const e=this.sourcePosition.parent;vs(ra._createIn(e),this.targetPosition),vs(ra._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 n=$i.fromJSON(e.sourcePosition,t),r=$i.fromJSON(e.targetPosition,t),o=$i.fromJSON(e.graveyardPosition,t);return new this(n,e.howMany,r,o,e.baseVersion)}}class Ps extends hs{constructor(e,t,n,r,o){super(o),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=n,this.graveyardPosition=r?r.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 $i(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new ra(this.splitPosition,e)}clone(){return new this.constructor(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new $i(e,[0]);return new Ls(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof ra)for(const n of e.getItems())t(n);else t(e)}move(e,t,n){if(this._assertWriterUsedCorrectly(),!(e instanceof ra))throw new s.a("writer-move-invalid-range",this);if(!e.isFlat)throw new s.a("writer-move-range-not-flat",this);const r=$i._createAt(t,n);if(r.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!Ys(e.root,r.root))throw new s.a("writer-move-different-document",this);const o=e.root.document?e.root.document.version:null,i=new Ms(e.start,e.end.offset-e.start.offset,r,o);this.batch.addOperation(i),this.model.applyOperation(i)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof ra?e:ra._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),js(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,n=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof Qi))throw new s.a("writer-merge-no-element-before",this);if(!(n instanceof Qi))throw new s.a("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,n){return this.model.createPositionFromPath(e,t,n)}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,t,n){return this.model.createSelection(e,t,n)}_mergeDetached(e){const t=e.nodeBefore,n=e.nodeAfter;this.move(ra._createIn(n),$i._createAt(t,"end")),this.remove(n)}_merge(e){const t=$i._createAt(e.nodeBefore,"end"),n=$i._createAt(e.nodeAfter,0),r=e.root.document.graveyard,o=new $i(r,[0]),i=e.root.document.version,a=new Ls(n,e.nodeAfter.maxOffset,t,o,i);this.batch.addOperation(a),this.model.applyOperation(a)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof Qi))throw new s.a("writer-rename-not-element-instance",this);const n=e.root.document?e.root.document.version:null,r=new As($i._createBefore(e),e.name,t,n);this.batch.addOperation(r),this.model.applyOperation(r)}split(e,t){this._assertWriterUsedCorrectly();let n,r,o=e.parent;if(!o.parent)throw new s.a("writer-split-element-no-parent",this);if(t||(t=o.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new s.a("writer-split-invalid-limit-element",this);do{const t=o.root.document?o.root.document.version:null,i=o.maxOffset-e.offset,a=Ps.getInsertionPosition(e),s=new Ps(e,i,a,null,t);this.batch.addOperation(s),this.model.applyOperation(s),n||r||(n=o,r=e.parent.nextSibling),o=(e=this.createPositionAfter(e.parent)).parent}while(o!==t);return{position:e,range:new ra($i._createAt(n,"end"),$i._createAt(r,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new s.a("writer-wrap-range-not-flat",this);const n=t instanceof Qi?t:new Qi(t);if(n.childCount>0)throw new s.a("writer-wrap-element-not-empty",this);if(null!==n.parent)throw new s.a("writer-wrap-element-attached",this);this.insert(n,e.start);const r=new ra(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(r,$i._createAt(n,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new s.a("writer-unwrap-element-no-parent",this);this.move(ra._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new s.a("writer-addmarker-no-usingoperation",this);const n=t.usingOperation,r=t.range,o=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new s.a("writer-addmarker-marker-exists",this);if(!r)throw new s.a("writer-addmarker-no-range",this);return n?(Fs(this,e,null,r,o),this.model.markers.get(e)):this.model.markers._set(e,r,n,o)}updateMarker(e,t){this._assertWriterUsedCorrectly();const n="string"==typeof e?e:e.name,r=this.model.markers.get(n);if(!r)throw new s.a("writer-updatemarker-marker-not-exists",this);if(!t)return void this.model.markers._refresh(r);const o="boolean"==typeof t.usingOperation,i="boolean"==typeof t.affectsData,a=i?t.affectsData:r.affectsData;if(!o&&!t.range&&!i)throw new s.a("writer-updatemarker-wrong-options",this);const l=r.getRange(),c=t.range?t.range:l;o&&t.usingOperation!==r.managedUsingOperations?t.usingOperation?Fs(this,n,null,c,a):(Fs(this,n,l,null,a),this.model.markers._set(n,c,void 0,a)):r.managedUsingOperations?Fs(this,n,l,c,a):this.model.markers._set(n,c,void 0,a)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new s.a("writer-removemarker-no-marker",this);const n=this.model.markers.get(t);n.managedUsingOperations?Fs(this,t,n.getRange(),null,n.affectsData):this.model.markers._remove(t)}setSelection(e,t,n){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(e,t,n)}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,n]of wn(e))this._setSelectionAttribute(t,n)}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 n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const r=ya._getStoreAttributeKey(e);this.setAttribute(r,t,n.anchor.parent)}n._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const n=ya._getStoreAttributeKey(e);this.removeAttribute(n,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new s.a("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const n of this.model.markers){if(!n.managedUsingOperations)continue;const r=n.getRange();let o=!1;if("move"===e)o=t.containsPosition(r.start)||t.start.isEqual(r.start)||t.containsPosition(r.end)||t.end.isEqual(r.end);else{const e=t.nodeBefore,n=t.nodeAfter,i=r.start.parent==e&&r.start.isAtEnd,a=r.end.parent==n&&0==r.end.offset,s=r.end.nodeAfter==n,l=r.start.nodeAfter==n;o=i||a||s||l}o&&this.updateMarker(n.name,{range:r})}}}function Os(e,t,n,r){const o=e.model,i=o.document;let a,s,l,c=r.start;for(const e of r.getWalker({shallow:!0}))l=e.item.getAttribute(t),a&&s!=l&&(s!=n&&d(),c=a),a=e.nextPosition,s=l;function d(){const r=new ra(c,a),l=r.root.document?i.version:null,d=new Es(r,t,s,n,l);e.batch.addOperation(d),o.applyOperation(d)}a instanceof $i&&a!=c&&s!=n&&d()}function Rs(e,t,n,r){const o=e.model,i=o.document,a=r.getAttribute(t);let s,l;if(a!=n){if(r.root===r){const e=r.document?i.version:null;l=new Ds(r,t,a,n,e)}else{s=new ra($i._createBefore(r),e.createPositionAfter(r));const o=s.root.document?i.version:null;l=new Es(s,t,a,n,o)}e.batch.addOperation(l),o.applyOperation(l)}}function Fs(e,t,n,r,o){const i=e.model,a=i.document,s=new Ts(t,n,r,i.markers,o,a.version);e.batch.addOperation(s),i.applyOperation(s)}function js(e,t,n,r){let o;if(e.root.document){const n=r.document,i=new $i(n.graveyard,[0]);o=new Ms(e,t,i,n.version)}else o=new Ss(e,t);n.addOperation(o),r.applyOperation(o)}function Ys(e,t){return e===t||e instanceof Is&&t instanceof Is}class zs{constructor(e){this._markerCollection=e,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize);const t=ra._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getRange();this.bufferMarkerChange(e.name,t,t,e.affectsData)}this._cachedChanges=null}bufferOperation(e){switch(e.type){case"insert":if(this._isInInsertedElement(e.position.parent))return;this._markInsert(e.position.parent,e.position.offset,e.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const t of e.range.getItems({shallow:!0}))this._isInInsertedElement(t.parent)||this._markAttribute(t);break;case"remove":case"move":case"reinsert":{if(e.sourcePosition.isEqual(e.targetPosition)||e.sourcePosition.getShiftedBy(e.howMany).isEqual(e.targetPosition))return;const t=this._isInInsertedElement(e.sourcePosition.parent),n=this._isInInsertedElement(e.targetPosition.parent);t||this._markRemove(e.sourcePosition.parent,e.sourcePosition.offset,e.howMany),n||this._markInsert(e.targetPosition.parent,e.getMovedRangeStart().offset,e.howMany);break}case"rename":{if(this._isInInsertedElement(e.position.parent))return;this._markRemove(e.position.parent,e.position.offset,1),this._markInsert(e.position.parent,e.position.offset,1);const t=ra._createFromPositionAndShift(e.position,1);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getRange();this.bufferMarkerChange(e.name,t,t,e.affectsData)}break}case"split":{const t=e.splitPosition.parent;this._isInInsertedElement(t)||this._markRemove(t,e.splitPosition.offset,e.howMany),this._isInInsertedElement(e.insertionPosition.parent)||this._markInsert(e.insertionPosition.parent,e.insertionPosition.offset,1),e.graveyardPosition&&this._markRemove(e.graveyardPosition.parent,e.graveyardPosition.offset,1);break}case"merge":{const t=e.sourcePosition.parent;this._isInInsertedElement(t.parent)||this._markRemove(t.parent,t.startOffset,1);const n=e.graveyardPosition.parent;this._markInsert(n,e.graveyardPosition.offset,1);const r=e.targetPosition.parent;this._isInInsertedElement(r)||this._markInsert(r,e.targetPosition.offset,t.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(e,t,n,r){const o=this._changedMarkers.get(e);o?(o.newRange=n,o.affectsData=r,null==o.oldRange&&null==o.newRange&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{oldRange:t,newRange:n,affectsData:r})}getMarkersToRemove(){const e=[];for(const[t,n]of this._changedMarkers)null!=n.oldRange&&e.push({name:t,range:n.oldRange});return e}getMarkersToAdd(){const e=[];for(const[t,n]of this._changedMarkers)null!=n.newRange&&e.push({name:t,range:n.newRange});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map(e=>({name:e[0],data:{oldRange:e[1].oldRange,newRange:e[1].newRange}}))}hasDataChanges(){for(const[,e]of this._changedMarkers)if(e.affectsData)return!0;return this._changesInElement.size>0}getChanges(e={includeChangesInGraveyard:!1}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const n=this._changesInElement.get(e).sort((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offsete.position.root!=t.position.root?e.position.root.rootNamee);for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t.slice(),this._cachedChanges=t.filter(Vs),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard:this._cachedChanges}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._cachedChanges=null}_markInsert(e,t,n){const r={type:"insert",offset:t,howMany:n,count:this._changeCount++};this._markChange(e,r)}_markRemove(e,t,n){const r={type:"remove",offset:t,howMany:n,count:this._changeCount++};this._markChange(e,r),this._removeAllNestedChanges(e,t,n)}_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 n=this._getChangesForElement(e);this._handleChange(t,n),n.push(t);for(let e=0;en.offset){if(r>o){const e={type:"attribute",offset:o,howMany:r-o,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=n.offset&&e.offseto?(e.nodesToHandle=r-o,e.offset=o):e.nodesToHandle=0);if("remove"==n.type&&e.offsetn.offset){const o={type:"attribute",offset:n.offset,howMany:r-n.offset,count:this._changeCount++};this._handleChange(o,t),t.push(o),e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==n.type&&(e.offset>=n.offset&&r<=o?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=n.offset&&r>=o&&(n.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,n){return{type:"insert",position:$i._createAt(e,t),name:n,length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,n){return{type:"remove",position:$i._createAt(e,t),name:n,length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,n){const r=[];n=new Map(n);for(const[o,i]of t){const t=n.has(o)?n.get(o):null;t!==i&&r.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:o,attributeOldValue:i,attributeNewValue:t,changeCount:this._changeCount++}),n.delete(o)}for(const[t,o]of n)r.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:o,changeCount:this._changeCount++});return r}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const n=this._changesInElement.get(t),r=e.startOffset;if(n)for(const e of n)if("insert"==e.type&&r>=e.offset&&rr){for(let t=0;t=e&&r.baseVersion{const n=t[0];if(n.isDocumentOperation&&n.baseVersion!==this.version)throw new s.a("model-document-applyoperation-wrong-version",this,{operation:n})},{priority:"highest"}),this.listenTo(e,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&this.differ.bufferOperation(n)},{priority:"high"}),this.listenTo(e,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&(this.version++,this.history.addOperation(n))},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(e.markers,"update",(e,t,n,r)=>{this.differ.bufferMarkerChange(t.name,n,r,t.affectsData),null===n&&t.on("change",(e,n)=>{this.differ.bufferMarkerChange(t.name,n,t.getRange(),t.affectsData)})})}get graveyard(){return this.getRoot("$graveyard")}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new s.a("model-document-createroot-name-exists",this,{name:t});const n=new Is(this,e,t);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(){return Array.from(this.roots,e=>e.rootName).filter(e=>"$graveyard"!=e)}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=bn(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,n=t.schema,r=t.createPositionFromPath(e,[0]);return n.getNearestSelectionRange(r)||t.createRange(r)}_validateSelectionRange(e){return Ks(e.start)&&Ks(e.end)}_callPostFixers(e){let t=!1;do{for(const n of this._postFixers)if(this.selection.refresh(),t=n(e),t)break}while(t)}}function Ks(e){const t=e.textNode;if(t){const n=t.data,r=e.offset-t.startOffset;return!Us(n,r)&&!Gs(n,r)}return!0}je(qs,d);class Xs{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof Qs?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,n=!1,r=!1){const o=e instanceof Qs?e.name:e;if(o.includes(","))throw new s.a("markercollection-incorrect-marker-name",this);const i=this._markers.get(o);if(i){const e=i.getRange();let a=!1;return e.isEqual(t)||(i._attachLiveRange(ga.fromRange(t)),a=!0),n!=i.managedUsingOperations&&(i._managedUsingOperations=n,a=!0),"boolean"==typeof r&&r!=i.affectsData&&(i._affectsData=r,a=!0),a&&this.fire("update:"+o,i,e,t),i}const a=ga.fromRange(t),l=new Qs(o,a,n,r);return this._markers.set(o,l),this.fire("update:"+o,l,null,t),l}_remove(e){const t=e instanceof Qs?e.name:e,n=this._markers.get(t);return!!n&&(this._markers.delete(t),this.fire("update:"+t,n,n.getRange(),null),this._destroyMarker(n),!0)}_refresh(e){const t=e instanceof Qs?e.name:e,n=this._markers.get(t);if(!n)throw new s.a("markercollection-refresh-marker-not-exists",this);const r=n.getRange();this.fire("update:"+t,n,r,r,n.managedUsingOperations,n.affectsData)}*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()}}je(Xs,d);class Qs{constructor(e,t,n,r){this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=n,this._affectsData=r}get managedUsingOperations(){if(!this._liveRange)throw new s.a("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new s.a("marker-destroyed",this);return this._affectsData}getStart(){if(!this._liveRange)throw new s.a("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new s.a("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new s.a("marker-destroyed",this);return this._liveRange.toRange()}is(e){return"marker"===e||"model:marker"===e}_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}}je(Qs,d);class Js extends hs{get type(){return"noop"}clone(){return new Js(this.baseVersion)}getReversed(){return new Js(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}const Zs={};Zs[Es.className]=Es,Zs[Cs.className]=Cs,Zs[Ts.className]=Ts,Zs[Ms.className]=Ms,Zs[Js.className]=Js,Zs[hs.className]=hs,Zs[As.className]=As,Zs[Ds.className]=Ds,Zs[Ps.className]=Ps,Zs[Ls.className]=Ls;class $s extends $i{constructor(e,t,n="toNone"){if(super(e,t,n),!this.root.is("rootElement"))throw new s.a("model-liveposition-root-not-rootelement",e);el.call(this)}detach(){this.stopListening()}is(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e}toPosition(){return new $i(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}function el(){this.listenTo(this.root.document.model,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&tl.call(this,n)},{priority:"low"})}function tl(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)}}je($s,d);class nl{constructor(e,t,n){this.model=e,this.writer=t,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0),this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}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),n=this.writer.createPositionAfter(e);if(n.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new s.a("insertcontent-invalid-insertion-position",this);this.position=n,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this.nodeToSelect?ra._createOn(this.nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new ra(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=$s.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 s.a("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=$s.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=$s.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof Qi))return;if(!this._canMergeLeft(e))return;const t=$s._createBefore(e);t.stickiness="toNext";const n=$s.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=$s._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=$s._createAt(t.nodeBefore,"end","toNext")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof Qi))return;if(!this._canMergeRight(e))return;const t=$s._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new s.a("insertcontent-invalid-insertion-position",this);this.position=$i._createAt(t.nodeBefore,"end");const n=$s.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=$s._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=$s._createAt(t.nodeBefore,0,"toPrevious")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof Qi&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof Qi&&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 rl(e,t,n){const r=t.parent,o=n.parent;return r!=o&&!e.isLimit(r)&&!e.isLimit(o)&&function(e,t,n){const r=new ra(e,t);for(const e of r.getWalker())if(n.isLimit(e.item))return!1;return!0}(t,n,e)}function ol(e,t,n){const r=e.createElement("paragraph");e.insert(r,t),il(e,n,e.createPositionAt(r,0))}function il(e,t,n){t instanceof ya?e.setSelection(n):t.setTo(n)}function al(e,t){const{isForward:n,walker:r,unit:o,schema:i}=e,{type:a,item:s,nextPosition:l}=t;if("text"==a)return"word"===e.unit?function(e,t){let n=e.position.textNode;if(n){let r=e.position.offset-n.startOffset;for(;!ll(n.data,r,t)&&!cl(n,r,t);){e.next();const o=t?e.position.nodeAfter:e.position.nodeBefore;if(o&&o.is("$text")){const r=o.data.charAt(t?0:o.data.length-1);' ,.?!:;"-()'.includes(r)||(e.next(),n=e.position.textNode)}r=e.position.offset-n.startOffset}}return e.position}(r,n):function(e,t){const n=e.position.textNode;if(n){const r=n.data;let o=e.position.offset-n.startOffset;for(;Us(r,o)||"character"==t&&Gs(r,o);)e.next(),o=e.position.offset-n.startOffset}return e.position}(r,o);if(a==(n?"elementStart":"elementEnd")){if(i.isSelectable(s))return $i._createAt(s,n?"after":"before");if(i.checkChild(l,"$text"))return l}else{if(i.isLimit(s))return void r.skip(()=>!0);if(i.checkChild(l,"$text"))return l}}function sl(e,t){const n=e.root,r=$i._createAt(n,t?"end":0);return t?new ra(e,r):new ra(r,e)}function ll(e,t,n){const r=t+(n?0:-1);return' ,.?!:;"-()'.includes(e.charAt(r))}function cl(e,t,n){return t===(n?e.endOffset:0)}function dl(e,t){const n=[];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=>{n.push(e.start.parent),t.remove(e)}),n.forEach(e=>{let n=e;for(;n.parent&&n.isEmpty;){const e=t.createRangeOn(n);n=n.parent,t.remove(e)}})}function ul(e,t){return e.isCollapsed?function(e,t){const n=e.start,r=t.getNearestSelectionRange(n);if(!r){const e=n.getAncestors().reverse().find(e=>t.isObject(e));return e?ra._createOn(e):null}if(!r.isCollapsed)return r;const o=r.start;return n.isEqual(o)?null:new ra(o)}(e,t):function(e,t){const{start:n,end:r}=e,o=t.checkChild(n,"$text"),i=t.checkChild(r,"$text"),a=t.getLimitElement(n),s=t.getLimitElement(r);if(a===s){if(o&&i)return null;if(function(e,t,n){const r=e.nodeAfter&&!n.isLimit(e.nodeAfter)||n.checkChild(e,"$text"),o=t.nodeBefore&&!n.isLimit(t.nodeBefore)||n.checkChild(t,"$text");return r||o}(n,r,t)){const e=n.nodeAfter&&t.isSelectable(n.nodeAfter)?null:t.getNearestSelectionRange(n,"forward"),o=r.nodeBefore&&t.isSelectable(r.nodeBefore)?null:t.getNearestSelectionRange(r,"backward"),i=e?e.start:n,a=o?o.end:r;return new ra(i,a)}}const l=a&&!a.is("rootElement"),c=s&&!s.is("rootElement");if(l||c){const e=n.nodeAfter&&r.nodeBefore&&n.nodeAfter.parent===r.nodeBefore.parent,o=l&&(!e||!ml(n.nodeAfter,t)),i=c&&(!e||!ml(r.nodeBefore,t));let d=n,u=r;return o&&(d=$i._createBefore(pl(a,t))),i&&(u=$i._createAfter(pl(s,t))),new ra(d,u)}return null}(e,t)}function pl(e,t){let n=e,r=n;for(;t.isLimit(r)&&r.parent;)n=r,r=r.parent;return n}function ml(e,t){return e&&t.isSelectable(e)}class hl{constructor(){this.markers=new Xs,this.document=new qs(this),this.schema=new Ua,this._pendingChanges=[],this._currentWriter=null,["insertContent","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("$block",{allowIn:"$root",isBlock:!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}),function(e){e.document.registerPostFixer(t=>function(e,t){const n=t.document.selection,r=t.schema,o=[];let i=!1;for(const e of n.getRanges()){const t=ul(e,r);t&&!t.isEqual(e)?(o.push(t),i=!0):o.push(e)}i&&e.setSelection(function(e){const t=[...e],n=new Set;let r=1;for(;r!n.has(t))}(o),{backward:n.isBackward})}(t,e))}(this),this.document.registerPostFixer(La)}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new ms,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){s.a.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{"string"==typeof e?e=new ms(e):"function"==typeof e&&(t=e,e=new ms),this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){s.a.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,n){return function(e,t,n,r){return e.change(o=>{let i;i=n?n instanceof ua||n instanceof ya?n:o.createSelection(n,r):e.document.selection,i.isCollapsed||e.deleteContent(i,{doNotAutoparagraph:!0});const a=new nl(e,o,i.anchor);let s;s=t.is("documentFragment")?t.getChildren():[t],a.handleNodes(s);const l=a.getSelectionRange();l&&(i instanceof ya?o.setSelection(l):i.setTo(l));const c=a.getAffectedRange()||e.createRange(i.anchor);return a.destroy(),c})}(this,e,t,n)}deleteContent(e,t){!function(e,t,n={}){if(t.isCollapsed)return;const r=t.getFirstRange();if("$graveyard"==r.root.rootName)return;const o=e.schema;e.change(e=>{if(!n.doNotResetEntireContent&&function(e,t){const n=e.getLimitElement(t);if(!t.containsEntireContent(n))return!1;const r=t.getFirstRange();return r.start.parent!=r.end.parent&&e.checkChild(n,"paragraph")}(o,t))return void function(e,t){const n=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(n)),ol(e,e.createPositionAt(n,0),t)}(e,t);const[i,a]=function(e){const t=e.root.document.model,n=e.start;let r=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const n=function(e){const t=e.parent,n=t.root.document.model.schema,r=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of r){if(n.isLimit(e))return null;if(n.isBlock(e))return e}}(r);if(n&&r.isTouching(t.createPositionAt(n,0))){const n=t.createSelection(e);t.modifySelection(n,{direction:"backward"});const o=n.getLastPosition(),i=t.createRange(o,r);t.hasContent(i,{ignoreMarkers:!0})||(r=o)}}return[$s.fromPosition(n,"toPrevious"),$s.fromPosition(r,"toNext")]}(r);i.isTouching(a)||e.remove(e.createRange(i,a)),n.leaveUnmerged||(function(e,t,n){const r=e.model;if(!rl(e.model.schema,t,n))return;const[o,i]=function(e,t){const n=e.getAncestors(),r=t.getAncestors();let o=0;for(;n[o]&&n[o]==r[o];)o++;return[n[o],r[o]]}(t,n);o&&i&&(!r.hasContent(o,{ignoreMarkers:!0})&&r.hasContent(i,{ignoreMarkers:!0})?function e(t,n,r,o){const i=n.parent,a=r.parent;if(i!=o&&a!=o){for(n=t.createPositionAfter(i),(r=t.createPositionBefore(a)).isEqual(n)||t.insert(i,r);n.parent.isEmpty;){const e=n.parent;n=t.createPositionBefore(e),t.remove(e)}r=t.createPositionBefore(a),function(e,t){const n=t.nodeBefore,r=t.nodeAfter;n.name!=r.name&&e.rename(n,r.name),e.clearAttributes(n),e.setAttributes(Object.fromEntries(r.getAttributes()),n),e.merge(t)}(t,r),rl(t.model.schema,n,r)&&e(t,n,r,o)}}(e,t,n,o.parent):function e(t,n,r,o){const i=n.parent,a=r.parent;if(i!=o&&a!=o){for(n=t.createPositionAfter(i),(r=t.createPositionBefore(a)).isEqual(n)||t.insert(a,n),t.merge(n);r.parent.isEmpty;){const e=r.parent;r=t.createPositionBefore(e),t.remove(e)}rl(t.model.schema,n,r)&&e(t,n,r,o)}}(e,t,n,o.parent))}(e,i,a),o.removeDisallowedAttributes(i.parent.getChildren(),e)),il(e,t,i),!n.doNotAutoparagraph&&function(e,t){const n=e.checkChild(t,"$text"),r=e.checkChild(t,"paragraph");return!n&&r}(o,i)&&ol(e,i,t),i.detach(),a.detach()})}(this,e,t)}modifySelection(e,t){!function(e,t,n={}){const r=e.schema,o="backward"!=n.direction,i=n.unit?n.unit:"character",a=t.focus,s=new Ji({boundaries:sl(a,o),singleCharacters:!0,direction:o?"forward":"backward"}),l={walker:s,schema:r,isForward:o,unit:i};let c;for(;c=s.next();){if(c.done)return;const n=al(l,c.value);if(n)return void(t instanceof ya?e.change(e=>{e.setSelectionFocus(n)}):t.setFocus(n))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change(e=>{const n=e.createDocumentFragment(),r=t.getFirstRange();if(!r||r.isCollapsed)return n;const o=r.start.root,i=r.start.getCommonPath(r.end),a=o.getNodeByPath(i);let s;s=r.start.parent==r.end.parent?r:e.createRange(e.createPositionAt(a,r.start.path[i.length]),e.createPositionAt(a,r.end.path[i.length]+1));const l=s.end.offset-s.start.offset;for(const t of s.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),n):e.append(e.cloneElement(t,!0),n);if(s!=r){const t=r._getTransformedByMove(s.start,e.createPositionAt(n,0),l)[0],o=e.createRange(e.createPositionAt(n,0),t.start);dl(e.createRange(t.end,e.createPositionAt(n,"end")),e),dl(o,e)}return n})}(this,e)}hasContent(e,t={}){const n=e instanceof Qi?ra._createIn(e):e;if(n.isCollapsed)return!1;const{ignoreWhitespaces:r=!1,ignoreMarkers:o=!1}=t;if(!o)for(const e of this.markers.getMarkersIntersectingRange(n))if(e.affectsData)return!0;for(const e of n.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!r)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}createPositionFromPath(e,t,n){return new $i(e,t,n)}createPositionAt(e,t){return $i._createAt(e,t)}createPositionAfter(e){return $i._createAfter(e)}createPositionBefore(e){return $i._createBefore(e)}createRange(e,t){return new ra(e,t)}createRangeIn(e){return ra._createIn(e)}createRangeOn(e){return ra._createOn(e)}createSelection(e,t,n){return new ua(e,t,n)}createBatch(e){return new ms(e)}createOperationFromJSON(e){return class{static fromJSON(e,t){return Zs[e.__className].fromJSON(e,t)}}.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];for(this.fire("_beforeChanges");this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new Ns(this,t);const n=this._pendingChanges[0].callback(this._currentWriter);e.push(n),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return this.fire("_afterChanges"),e}}je(hl,Pe);class fl extends Ii{constructor(e){super(),this.editor=e}set(e,t,n={}){if("string"==typeof t){const e=t;t=(t,n)=>{this.editor.execute(e),n()}}super.set(e,t,n)}}class gl{constructor(e={}){const t=e.language||this.constructor.defaultConfig&&this.constructor.defaultConfig.language;this._context=e.context||new hn({language:t}),this._context._addEditor(this,!e.context);const n=Array.from(this.constructor.builtinPlugins||[]);this.config=new rn(e,this.constructor.defaultConfig),this.config.define("plugins",n),this.config.define(this._context._getEditorConfig()),this.plugins=new cn(this,n,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this.commands=new Ba,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.set("isReadOnly",!1),this.model=new hl;const r=new Jn;this.data=new cs(this.model,r),this.editing=new Ha(this.model,r),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new ds([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 fl(this),this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){const e=this.config,t=e.get("plugins"),n=e.get("removePlugins")||[],r=e.get("extraPlugins")||[],o=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(r),n,o)}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){try{return this.commands.execute(...e)}catch(e){s.a.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}}je(gl,Pe);class bl{constructor(e){this.editor=e,this._components=new Map}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(vl(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new s.a("componentfactory-item-missing",this,{name:e});return this._components.get(vl(e)).callback(this.editor.locale)}has(e){return this._components.has(vl(e))}}function vl(e){return String(e).toLowerCase()}class yl{constructor(e){this.editor=e,this.componentFactory=new bl(e),this.focusTracker=new Pi,this.set("viewportOffset",this._readViewportOffsetFromConfig()),this._editableElementsMap=new Map,this.listenTo(e.editing.view.document,"layoutChanged",()=>this.update())}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null;this._editableElementsMap=new Map}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}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 n=e.config.get("toolbar.viewportTopOffset");return n?(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:n}):{top:0}}}je(yl,Pe);var _l={setData(e){this.data.set(e)},getData(e){return this.data.get(e)}},wl={updateSourceElement(){if(!this.sourceElement)throw new s.a("editor-missing-sourceelement",this);var e,t;e=this.sourceElement,t=this.data.get(),e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}};class kl extends fn{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new ln({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new s.a("pendingactions-add-invalid-message",this);const t=Object.create(Pe);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]()}}var xl='';const El={cancel:'',caption:'',check:'',cog:'',eraser:'',lowVision:'',image:'',alignBottom:'',alignMiddle:'',alignTop:'',alignLeft:'',alignCenter:'',alignRight:'',alignJustify:'',objectLeft:'',objectCenter:'',objectRight:'',objectFullWidth:'',objectInline:'',objectBlockLeft:'',objectBlockRight:'',objectSizeFull:'',objectSizeLarge:'',objectSizeSmall:'',objectSizeMedium:'',pencil:'',pilcrow:'',quote:'',threeVerticalDots:xl};function Sl({emitter:e,activator:t,callback:n,contextElements:r}){e.listenTo(document,"mousedown",(e,o)=>{if(!t())return;const i="function"==typeof o.composedPath?o.composedPath():[];for(const e of r)if(e.contains(o.target)||i.includes(e))return;n()})}function Ml(e){e.set("_isCssTransitionsDisabled",!1),e.disableCssTransitions=()=>{e._isCssTransitionsDisabled=!0},e.enableCssTransitions=()=>{e._isCssTransitionsDisabled=!1},e.extendTemplate({attributes:{class:[e.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}function Cl({view:e}){e.listenTo(e.element,"submit",(t,n)=>{n.preventDefault(),e.fire("submit")},{useCapture:!0})}class Tl extends ln{constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",(e,t,n)=>{this._renderViewIntoCollectionParent(t,n)}),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 s.a("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const n of this)for(const r of e)n.delegate(r).to(t);this.on("add",(n,r)=>{for(const n of e)r.delegate(n).to(t)}),this.on("remove",(n,r)=>{for(const n of e)r.stopDelegating(n,t)})}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}}n(17);class Al{constructor(e){this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new ln,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(t,n)=>{n.locale=e}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Dl.bind(this,this)}createCollection(e){const t=new Tl(e);return this._viewCollections.add(t),t}registerChild(e){sn(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){sn(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new Dl(e)}extendTemplate(e){Dl.extend(this.template,e)}render(){if(this.isRendered)throw new s.a("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)}}je(Al,Oo),je(Al,Pe);class Dl{constructor(e){Object.assign(this,zl(Yl(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,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new s.a("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const n of t.children)Ul(n)?yield n:Gl(n)&&(yield*e(n))}(this)}static bind(e,t){return{to:(n,r)=>new Pl({eventNameOrFunction:n,attribute:n,observable:e,emitter:t,callback:r}),if:(n,r,o)=>new Il({observable:e,emitter:t,attribute:n,valueIfTrue:r,callback:o})}}static extend(e,t){if(e._isRendered)throw new s.a("template-extend-render",[this,e]);!function e(t,n){if(n.attributes&&(t.attributes||(t.attributes={}),Vl(t.attributes,n.attributes)),n.eventListeners&&(t.eventListeners||(t.eventListeners={}),Vl(t.eventListeners,n.eventListeners)),n.text&&t.text.push(...n.text),n.children&&n.children.length){if(t.children.length!=n.children.length)throw new s.a("ui-template-extend-children-mismatch",t);let r=0;for(const o of n.children)e(t.children[r++],o)}}(e,zl(Yl(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new s.a("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(""),Nl(this.text)?this._bindToObservable({schema:this.text,updater:Rl(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){let t,n,r,o;if(!this.attributes)return;const i=e.node,a=e.revertData;for(t in this.attributes)if(r=i.getAttribute(t),n=this.attributes[t],a&&(a.attributes[t]=r),o=v(n[0])&&n[0].ns?n[0].ns:null,Nl(n)){const s=o?n[0].value:n;a&&Kl(t)&&s.unshift(r),this._bindToObservable({schema:s,updater:Fl(i,t,o),data:e})}else"style"==t&&"string"!=typeof n[0]?this._renderStyleAttribute(n[0],e):(a&&r&&Kl(t)&&n.unshift(r),n=n.map(e=>e&&e.value||e).reduce((e,t)=>e.concat(t),[]).reduce(Bl,""),Wl(n)||i.setAttributeNS(o,t,n))}_renderStyleAttribute(e,t){const n=t.node;for(const r in e){const o=e[r];Nl(o)?this._bindToObservable({schema:[o],updater:jl(n,r),data:t}):n.style[r]=o}}_renderElementChildren(e){const t=e.node,n=e.intoFragment?document.createDocumentFragment():t,r=e.isApplying;let o=0;for(const i of this.children)if(ql(i)){if(!r){i.setParent(t);for(const e of i)n.appendChild(e.element)}}else if(Ul(i))r||(i.isRendered||i.render(),n.appendChild(i.element));else if(_o(i))n.appendChild(i);else if(r){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),i._renderNode({node:n.childNodes[o++],isApplying:!0,revertData:t})}else n.appendChild(i.render());e.intoFragment&&t.appendChild(n)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const n=this.eventListeners[t].map(n=>{const[r,o]=t.split("@");return n.activateDomEventListener(r,o,e)});e.revertData&&e.revertData.bindings.push(n)}}_bindToObservable({schema:e,updater:t,data:n}){const r=n.revertData;Ol(e,t,n);const o=e.filter(e=>!Wl(e)).filter(e=>e.observable).map(r=>r.activateAttributeListener(e,t,n));r&&r.bindings.push(o)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)e.textContent=t.text;else{for(const n in t.attributes){const r=t.attributes[n];null===r?e.removeAttribute(n):e.setAttribute(n,r)}for(let n=0;nOl(e,t,n);return this.emitter.listenTo(this.observable,"change:"+this.attribute,r),()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,r)}}}class Pl extends Ll{activateDomEventListener(e,t,n){const r=(e,n)=>{t&&!n.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,e,r),()=>{this.emitter.stopListening(n.node,e,r)}}}class Il extends Ll{getValue(e){return!Wl(super.getValue(e))&&(this.valueIfTrue||!0)}}function Nl(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(Nl):e instanceof Ll)}function Ol(e,t,{node:n}){let r=function(e,t){return e.map(e=>e instanceof Ll?e.getValue(t):e)}(e,n);r=1==e.length&&e[0]instanceof Il?r[0]:r.reduce(Bl,""),Wl(r)?t.remove():t.set(r)}function Rl(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function Fl(e,t,n){return{set(r){e.setAttributeNS(n,t,r)},remove(){e.removeAttributeNS(n,t)}}}function jl(e,t){return{set(n){e.style[t]=n},remove(){e.style[t]=null}}}function Yl(e){return tn(e,e=>{if(e&&(e instanceof Ll||Gl(e)||Ul(e)||ql(e)))return e})}function zl(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=dn(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)Hl(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=dn(e[t].value)),Hl(e,t)}(e.attributes);const t=[];if(e.children)if(ql(e.children))t.push(e.children);else for(const n of e.children)Gl(n)||Ul(n)||_o(n)?t.push(n):t.push(new Dl(n));e.children=t}return e}function Hl(e,t){e[t]=dn(e[t])}function Bl(e,t){return Wl(t)?e:Wl(e)?t:`${e} ${t}`}function Vl(e,t){for(const n in t)e[n]?e[n].push(...t[n]):e[n]=t[n]}function Wl(e){return!e&&0!==e}function Ul(e){return e instanceof Al}function Gl(e){return e instanceof Dl}function ql(e){return e instanceof Tl}function Kl(e){return"class"==e||"style"==e}class Xl extends Tl{constructor(e,t=[]){super(t),this.locale=e}attachToDom(){this._bodyCollectionContainer=new Dl({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=function(e,t,n={},r=[]){const o=n&&n.xmlns,i=o?e.createElementNS(o,t):e.createElement(t);for(const e in n)i.setAttribute(e,n[e]);!wi(r)&&sn(r)||(r=[r]);for(let t of r)wi(t)&&(t=e.createTextNode(t)),i.appendChild(t);return i}(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()}}n(19);class Ql extends Al{constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon"],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");for(t&&(this.viewBox=t),this.element.innerHTML="";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})}}n(21);class Jl extends Al{constructor(e){super(e),this.set("text",""),this.set("position","s");const t=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip",t.to("position",e=>"ck-tooltip_"+e),t.if("text","ck-hidden",e=>!e.trim())]},children:[{tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:t.to("text")}]}]})}}n(23);class Zl extends Al{constructor(e){super(e);const t=this.bindTemplate,n=i();this.set("class"),this.set("labelStyle"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(n),this.iconView=new Ql,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)),this.setTemplate({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")],type:t.to("type",e=>e||"button"),tabindex:t.to("tabindex"),"aria-labelledby":"ck-editor__aria-label_"+n,"aria-disabled":t.if("isEnabled",!0,e=>!e),"aria-pressed":t.to("isOn",e=>!!this.isToggleable&&String(e))},children:this.children,on:{mousedown:t.to(e=>{e.preventDefault()}),click:t.to(e=>{this.isEnabled?this.fire("execute"):e.preventDefault()})}})}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.tooltipView),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}_createTooltipView(){const e=new Jl;return e.bind("text").to(this,"_tooltipString"),e.bind("position").to(this,"tooltipPosition"),e}_createLabelView(e){const t=new Al,n=this.bindTemplate;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:n.to("labelStyle"),id:"ck-editor__aria-label_"+e},children:[{text:this.bindTemplate.to("label")}]}),t}_createKeystrokeView(){const e=new Al;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",e=>Hr(e))}]}),e}_getTooltipString(e,t,n){return e?"string"==typeof e?e:(n&&(n=Hr(n)),e instanceof Function?e(t,n):`${t}${n?` (${n})`:""}`):""}}n(25);class $l extends Zl{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 Al;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}class ec{constructor(e){if(Object.assign(this,e),e.actions&&e.keystrokeHandler)for(const t in e.actions){let n=e.actions[t];"string"==typeof n&&(n=[n]);for(const r of n)e.keystrokeHandler.set(r,(e,n)=>{this[t](),n()})}}get first(){return this.focusables.find(tc)||null}get last(){return this.focusables.filter(tc).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,n)=>{const r=t.element===this.focusTracker.focusedElement;return r&&(e=n),r}),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,n=this.focusables.length;if(!n)return null;if(null===t)return this[1===e?"first":"last"];let r=(t+n+e)%n;do{const t=this.focusables.get(r);if(tc(t))return t;r=(r+n+e)%n}while(r!==t);return null}}function tc(e){return!(!e.focus||"none"==So.window.getComputedStyle(e.element).display)}n(27);var nc='';class rc extends Zl{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Ql;return e.content=nc,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}n(29);class oc extends Al{constructor(e){super(e);const t=this.bindTemplate;this.set("class"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),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 Ii,this.focusTracker=new Pi,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 Zl;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 Zl,t=e.bindTemplate;return e.icon=nc,e.extendTemplate({attributes:{class:"ck-splitbutton__arrow","aria-haspopup":!0,"aria-expanded":t.to("isOn",e=>String(e))}}),e.bind("isEnabled").to(this),e.delegate("execute").to(this,"open"),e}}class ic extends Al{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=>e.preventDefault())}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}function ac({element:e,target:t,positions:n,limiter:r,fitInViewport:o,viewportOffsetConfig:i}){T(t)&&(t=t()),T(r)&&(r=r());const a=function(e){return e&&e.parentNode?e.offsetParent===So.document.body?null:e.offsetParent:null}(e),s=new Si(e);let l;const c={targetRect:new Si(t),elementRect:s,positionedElementAncestor:a};if(r||o){const e=r&&new Si(r).getVisible(),t=o&&function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new Si(So.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(i);Object.assign(c,{limiterRect:e,viewportRect:t}),l=function(e,t){const{elementRect:n}=t,r=n.getArea(),o=e.map(e=>new lc(e,t)).filter(e=>!!e.name);let i=0,a=null;for(const e of o){const{_limiterIntersectionArea:t,_viewportIntersectionArea:n}=e;if(t===r)return e;const o=n**2+t**2;o>i&&(i=o,a=e)}return a}(n,c)||new lc(n[0],c)}else l=new lc(n[0],c);return l}function sc(e){const{scrollX:t,scrollY:n}=So.window;return e.clone().moveBy(t,n)}n(31);class lc{constructor(e,t){const n=e(t.targetRect,t.elementRect,t.viewportRect);if(!n)return;const{left:r,top:o,name:i,config:a}=n;Object.assign(this,{name:i,config:a}),this._positioningFunctionCorrdinates={left:r,top:o},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 n=e.getIntersection(t);if(n)return n.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=sc(this._rect),this._options.positionedElementAncestor&&function(e,t){const n=sc(new Si(t)),r=xi(t);let o=0,i=0;o-=n.left,i-=n.top,o+=t.scrollLeft,i+=t.scrollTop,o-=r.left,i-=r.top,e.moveBy(o,i)}(this._cachedAbsoluteRect,this._options.positionedElementAncestor)),this._cachedAbsoluteRect}}class cc extends Al{constructor(e,t,n){super(e);const r=this.bindTemplate;this.buttonView=t,this.panelView=n,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class"),this.set("id"),this.set("panelPosition","auto"),this.keystrokes=new Ii,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",r.to("class"),r.if("isEnabled","ck-disabled",e=>!e)],id:r.to("id"),"aria-describedby":r.to("ariaDescribedById")},children:[t,n]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"]}})}render(){super.render(),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",()=>{this.isOpen&&("auto"===this.panelPosition?this.panelView.position=cc._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.buttonView.focus(),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:n,southWest:r,northEast:o,northWest:i,southMiddleEast:a,southMiddleWest:s,northMiddleEast:l,northMiddleWest:c}=cc.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[n,r,a,s,e,o,i,l,c,t]:[r,n,s,a,e,i,o,c,l,t]}}cc.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"})},cc._getOptimalPosition=ac;class dc extends Al{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class uc extends Al{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function pc(e){return Array.isArray(e)?{items:e,removeItems:[]}:e?Object.assign({items:[],removeItems:[]},e):{items:[],removeItems:[]}}n(33);class mc extends Al{constructor(e,t){super(e);const n=this.bindTemplate,r=this.t;this.options=t||{},this.set("ariaLabel",r("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new Pi,this.keystrokes=new Ii,this.set("class"),this.set("isCompact",!1),this.itemsView=new hc(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const o="rtl"===e.uiLanguageDirection;this._focusCycler=new ec({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[o?"arrowright":"arrowleft","arrowup"],focusNext:[o?"arrowleft":"arrowright","arrowdown"]}});const i=["ck","ck-toolbar",n.to("class"),n.if("isCompact","ck-toolbar_compact")];var a;this.options.shouldGroupWhenFull&&this.options.isFloating&&i.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:i,role:"toolbar","aria-label":n.to("ariaLabel"),style:{maxWidth:n.to("maxWidth")}},children:this.children,on:{mousedown:(a=this,a.bindTemplate.to(e=>{e.target===a.element&&e.preventDefault()}))}}),this._behavior=this.options.shouldGroupWhenFull?new gc(this):new fc(this)}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),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){const n=pc(e),r=n.items.filter((e,r,o)=>"|"===e||-1===n.removeItems.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||(Object(s.b)("toolbarview-line-break-ignored-when-grouping-items",o),!1):!!t.has(e)||(Object(s.b)("toolbarview-item-unavailable",{name:e}),!1))),o=this._cleanSeparators(r).map(e=>"|"===e?new dc:"-"===e?new uc:t.create(e));this.items.addMany(o)}_cleanSeparators(e){const t=e=>"-"!==e&&"|"!==e,n=e.length,r=e.findIndex(t),o=n-e.slice().reverse().findIndex(t);return e.slice(r,o).filter((e,n,r)=>!!t(e)||!(n>0&&r[n-1]===e))}}class hc extends Al{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class fc{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 gc{constructor(e){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(),this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,e.itemsView.children.bindTo(this.ungroupedItems).using(e=>e),this.ungroupedItems.on("add",this._updateFocusCycleableItems.bind(this)),this.ungroupedItems.on("remove",this._updateFocusCycleableItems.bind(this)),e.children.on("add",this._updateFocusCycleableItems.bind(this)),e.children.on("remove",this._updateFocusCycleableItems.bind(this)),e.items.on("change",(e,t)=>{const n=t.index;for(const e of t.removed)n>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=n;ethis.ungroupedItems.length?this.groupedItems.add(r,e-this.ungroupedItems.length):this.ungroupedItems.add(r,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(!this.viewElement.offsetParent)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,n=new Si(e.lastChild),r=new Si(e);if(!this.cachedPadding){const n=So.window.getComputedStyle(e),r="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(n[r])}return"ltr"===t?n.right>r.right-this.cachedPadding:n.left{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 dc),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,n=_c(e);return n.class="ck-toolbar__grouped-dropdown",n.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",wc(n,[]),n.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:xl}),n.toolbarView.items.bindTo(this.groupedItems).using(e=>e),n}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(e=>{this.viewFocusables.add(e)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}n(35);class bc extends Al{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new Pi,this.keystrokes=new Ii,this._focusCycler=new ec({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"]},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 vc extends Al{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item"]},children:this.children})}focus(){this.children.first.focus()}}class yc extends Al{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}function _c(e,t=rc){const n=new t(e),r=new ic(e),o=new cc(e,n,r);return n.bind("isEnabled").to(o),n instanceof rc?n.bind("isOn").to(o,"isOpen"):n.arrowView.bind("isOn").to(o,"isOpen"),function(e){(function(e){e.on("render",()=>{Sl({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})})})(e),function(e){e.on("execute",t=>{t.source instanceof $l||(e.isOpen=!1)})}(e),function(e){e.keystrokes.set("arrowdown",(t,n)=>{e.isOpen&&(e.panelView.focus(),n())}),e.keystrokes.set("arrowup",(t,n)=>{e.isOpen&&(e.panelView.focusLast(),n())})}(e)}(o),o}function wc(e,t){const n=e.locale,r=n.t,o=e.toolbarView=new mc(n);o.set("ariaLabel",r("Dropdown toolbar")),e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),t.map(e=>o.items.add(e)),e.panelView.children.add(o),o.items.delegate("execute").to(e)}function kc(e,t){const n=e.locale,r=e.listView=new bc(n);r.items.bindTo(t).using(({type:e,model:t})=>{if("separator"===e)return new yc(n);if("button"===e||"switchbutton"===e){const r=new vc(n);let o;return o="button"===e?new Zl(n):new $l(n),o.bind(...Object.keys(t)).to(t),o.delegate("execute").to(r),r.children.add(o),r}}),e.panelView.children.add(r),r.items.delegate("execute").to(e)}n(37),n(39),n(41);class xc extends Al{constructor(e){super(e),this.body=new Xl(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}n(43);class Ec extends Al{constructor(e){super(e),this.set("text"),this.set("for"),this.id="ck-editor__label_"+i();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")}]})}}class Sc extends xc{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 Ec;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class Mc extends Al{constructor(e,t,n){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=n,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()}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change(n=>{const r=e.document.getRoot(t.name);n.addClass(t.isFocused?"ck-focused":"ck-blurred",r),n.removeClass(t.isFocused?"ck-blurred":"ck-focused",r)})}e.isRenderingInProgress?function n(r){e.once("change:isRenderingInProgress",(e,o,i)=>{i?n(r):t(r)})}(this):t(this)}}class Cc extends Mc{constructor(e,t,n){super(e,t,n),this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const e=this._editingView,t=this.t;e.change(n=>{const r=e.document.getRoot(this.name);n.setAttribute("aria-label",t("Rich Text Editor, %0",this.name),r)})}}n(45),n(47);class Tc extends Al{constructor(e){super(e),this.set("value"),this.set("id"),this.set("placeholder"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById"),this.focusTracker=new Pi,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{type:"text",class:["ck","ck-input","ck-input-text",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"),"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,n)=>{this._setDomElementValue(n),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:""}}n(49);class Ac extends Al{constructor(e,t){super(e);const n="ck-labeled-field-view-"+i(),r="ck-labeled-field-view-status-"+i();this.fieldView=t(this,n,r),this.set("label"),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class"),this.set("placeholder"),this.labelView=this._createLabelView(n),this.statusView=this._createStatusView(r),this.bind("_statusText").to(this,"errorText",this,"infoText",(e,t)=>e||t);const o=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",o.to("class"),o.if("isEnabled","ck-disabled",e=>!e),o.if("isEmpty","ck-labeled-field-view_empty"),o.if("isFocused","ck-labeled-field-view_focused"),o.if("placeholder","ck-labeled-field-view_placeholder"),o.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:[this.fieldView,this.labelView]},this.statusView]})}_createLabelView(e){const t=new Ec(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new Al(this.locale),n=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",n.if("errorText","ck-labeled-field-view__status_error"),n.if("_statusText","ck-hidden",e=>!e)],id:e,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),t}focus(){this.fieldView.focus()}}function Dc(e,t,n){const r=new Tc(e.locale);return r.set({id:t,ariaDescribedById:n}),r.bind("isReadOnly").to(e,"isEnabled",e=>!e),r.bind("hasError").to(e,"errorText",e=>!!e),r.on("input",()=>{e.errorText=null}),e.bind("isEmpty","isFocused","placeholder").to(r),r}class Lc extends fn{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="show:"+e.type+(e.namespace?":"+e.namespace:"");this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}class Pc{constructor(e,t){t&&Se(this,t),e&&this.set(e)}}je(Pc,Pe),n(51);const Ic=Di("px"),Nc=So.document.body;class Oc extends Al{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"),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",Ic),left:t.to("left",Ic)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=Oc.defaultPositions,n=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:Nc,fitInViewport:!0},e),r=Oc._getOptimalPosition(n),o=parseInt(r.left),i=parseInt(r.top),{name:a,config:s={}}=r,{withArrow:l=!0}=s;Object.assign(this,{top:i,left:o,position:a,withArrow:l})}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=Rc(e.target),n=e.limiter?Rc(e.limiter):Nc;this.listenTo(So.document,"scroll",(r,o)=>{const i=o.target,a=t&&i.contains(t),s=n&&i.contains(n);!a&&!s&&t&&n||this.attachTo(e)},{useCapture:!0}),this.listenTo(So.window,"resize",()=>{this.attachTo(e)})}_stopPinning(){this.stopListening(So.document,"scroll"),this.stopListening(So.window,"resize")}}function Rc(e){return nn(e)?e:ki(e)?e.commonAncestorContainer:"function"==typeof e?Rc(e()):null}Oc.arrowHorizontalOffset=25,Oc.arrowVerticalOffset=10,Oc.stickyVerticalOffset=20,Oc._getOptimalPosition=ac,Oc.defaultPositions=function({horizontalOffset:e=Oc.arrowHorizontalOffset,verticalOffset:t=Oc.arrowVerticalOffset,stickyVerticalOffset:n=Oc.stickyVerticalOffset,config:r}={}){return{northWestArrowSouthWest:(t,n)=>({top:o(t,n),left:t.left-e,name:"arrow_sw",...r&&{config:r}}),northWestArrowSouthMiddleWest:(t,n)=>({top:o(t,n),left:t.left-.25*n.width-e,name:"arrow_smw",...r&&{config:r}}),northWestArrowSouth:(e,t)=>({top:o(e,t),left:e.left-t.width/2,name:"arrow_s",...r&&{config:r}}),northWestArrowSouthMiddleEast:(t,n)=>({top:o(t,n),left:t.left-.75*n.width+e,name:"arrow_sme",...r&&{config:r}}),northWestArrowSouthEast:(t,n)=>({top:o(t,n),left:t.left-n.width+e,name:"arrow_se",...r&&{config:r}}),northArrowSouthWest:(t,n)=>({top:o(t,n),left:t.left+t.width/2-e,name:"arrow_sw",...r&&{config:r}}),northArrowSouthMiddleWest:(t,n)=>({top:o(t,n),left:t.left+t.width/2-.25*n.width-e,name:"arrow_smw",...r&&{config:r}}),northArrowSouth:(e,t)=>({top:o(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s",...r&&{config:r}}),northArrowSouthMiddleEast:(t,n)=>({top:o(t,n),left:t.left+t.width/2-.75*n.width+e,name:"arrow_sme",...r&&{config:r}}),northArrowSouthEast:(t,n)=>({top:o(t,n),left:t.left+t.width/2-n.width+e,name:"arrow_se",...r&&{config:r}}),northEastArrowSouthWest:(t,n)=>({top:o(t,n),left:t.right-e,name:"arrow_sw",...r&&{config:r}}),northEastArrowSouthMiddleWest:(t,n)=>({top:o(t,n),left:t.right-.25*n.width-e,name:"arrow_smw",...r&&{config:r}}),northEastArrowSouth:(e,t)=>({top:o(e,t),left:e.right-t.width/2,name:"arrow_s",...r&&{config:r}}),northEastArrowSouthMiddleEast:(t,n)=>({top:o(t,n),left:t.right-.75*n.width+e,name:"arrow_sme",...r&&{config:r}}),northEastArrowSouthEast:(t,n)=>({top:o(t,n),left:t.right-n.width+e,name:"arrow_se",...r&&{config:r}}),southWestArrowNorthWest:(t,n)=>({top:i(t),left:t.left-e,name:"arrow_nw",...r&&{config:r}}),southWestArrowNorthMiddleWest:(t,n)=>({top:i(t),left:t.left-.25*n.width-e,name:"arrow_nmw",...r&&{config:r}}),southWestArrowNorth:(e,t)=>({top:i(e),left:e.left-t.width/2,name:"arrow_n",...r&&{config:r}}),southWestArrowNorthMiddleEast:(t,n)=>({top:i(t),left:t.left-.75*n.width+e,name:"arrow_nme",...r&&{config:r}}),southWestArrowNorthEast:(t,n)=>({top:i(t),left:t.left-n.width+e,name:"arrow_ne",...r&&{config:r}}),southArrowNorthWest:(t,n)=>({top:i(t),left:t.left+t.width/2-e,name:"arrow_nw",...r&&{config:r}}),southArrowNorthMiddleWest:(t,n)=>({top:i(t),left:t.left+t.width/2-.25*n.width-e,name:"arrow_nmw",...r&&{config:r}}),southArrowNorth:(e,t)=>({top:i(e),left:e.left+e.width/2-t.width/2,name:"arrow_n",...r&&{config:r}}),southArrowNorthMiddleEast:(t,n)=>({top:i(t),left:t.left+t.width/2-.75*n.width+e,name:"arrow_nme",...r&&{config:r}}),southArrowNorthEast:(t,n)=>({top:i(t),left:t.left+t.width/2-n.width+e,name:"arrow_ne",...r&&{config:r}}),southEastArrowNorthWest:(t,n)=>({top:i(t),left:t.right-e,name:"arrow_nw",...r&&{config:r}}),southEastArrowNorthMiddleWest:(t,n)=>({top:i(t),left:t.right-.25*n.width-e,name:"arrow_nmw",...r&&{config:r}}),southEastArrowNorth:(e,t)=>({top:i(e),left:e.right-t.width/2,name:"arrow_n",...r&&{config:r}}),southEastArrowNorthMiddleEast:(t,n)=>({top:i(t),left:t.right-.75*n.width+e,name:"arrow_nme",...r&&{config:r}}),southEastArrowNorthEast:(t,n)=>({top:i(t),left:t.right-n.width+e,name:"arrow_ne",...r&&{config:r}}),viewportStickyNorth:(e,t,o)=>e.getIntersection(o)?{top:o.top+n,left:e.left+e.width/2-t.width/2,name:"arrowless",config:{withArrow:!1,...r}}:null};function o(e,n){return e.top-n.height-t}function i(e){return e.bottom+t}}(),n(53),n(55);const Fc=Di("px");class jc extends Ye{static get pluginName(){return"ContextualBalloon"}constructor(e){super(e),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.view=new Oc(e.locale),e.ui.view.body.add(this.view),e.ui.focusTracker.add(this.view.element),this._viewToStack=new Map,this._idToStack=new Map,this.set("_numberOfStacks",0),this.set("_singleViewMode",!1),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}destroy(){super.destroy(),this.view.destroy(),this._rotatorView.destroy(),this._fakePanelsView.destroy()}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this.hasView(e.view))throw new s.a("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 n=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),n.set(e.view,e),this._viewToStack.set(e.view,n),n===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new s.a("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 s.a("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}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 Yc(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,n)=>{if(n<2)return"";const r=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[r,n])}),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 zc(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:n=!0,singleViewMode:r=!1}){this.view.class=t,this.view.withArrow=n,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),r&&(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 Yc extends Al{constructor(e){super(e);const t=e.t,n=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new Pi,this.buttonPrevView=this._createButtonView(t("Previous"),''),this.buttonNextView=this._createButtonView(t("Next"),''),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",n.to("isNavigationVisible",e=>e?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:n.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 n=new Zl(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n}}class zc extends Al{constructor(e,t){super(e);const n=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",n.to("numberOfPanels",e=>e?"":"ck-hidden")],style:{top:n.to("top",Fc),left:n.to("left",Fc),width:n.to("width",Fc),height:n.to("height",Fc)}},children:this.content}),this.on("change:numberOfPanels",(e,t,n,r)=>{n>r?this._addPanels(n-r):this._removePanels(r-n),this.updatePosition()})}_addPanels(e){for(;e--;){const e=new Al;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:n,height:r}=new Si(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:n,height:r})}}}n(57);const Hc=Di("px");class Bc extends Al{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 Dl({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",e=>e?"block":"none"),height:t.to("isSticky",e=>e?Hc(this._panelRect.height):null)}}}).render(),this._contentPanel=new Dl({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?Hc(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:t.to("_hasViewportTopOffset",e=>e?Hc(this.viewportTopOffset):null),bottom:t.to("_isStickyToTheLimiter",e=>e?Hc(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(So.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.topUc(a,e))),Vc.get(a).set(n,{text:r,isDirectHost:o,keepOnFocus:i,hostElement:o?n:null}),t.change(e=>Uc(a,e))}function Uc(e,t){const n=Vc.get(e),r=[];let o=!1;for(const[e,i]of n)i.isDirectHost&&(r.push(e),Gc(t,e,i)&&(o=!0));for(const[e,i]of n){if(i.isDirectHost)continue;const n=qc(e);n&&(r.includes(n)||(i.hostElement=n,Gc(t,e,i)&&(o=!0)))}return o}function Gc(e,t,n){const{text:r,isDirectHost:o,hostElement:i}=n;let a=!1;return i.getAttribute("data-placeholder")!==r&&(e.setAttribute("data-placeholder",r,i),a=!0),(o||1==t.childCount)&&function(e,t){if(!e.isAttached())return!1;if(Array.from(e.getChildren()).some(e=>!e.is("uiElement")))return!1;if(t)return!0;const n=e.document;if(!n.isFocused)return!0;const r=n.selection.anchor;return r&&r.parent!==e}(i,n.keepOnFocus)?function(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}(e,i)&&(a=!0):function(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}(e,i)&&(a=!0),a}function qc(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement"))return t}return null}const Kc=new Map;function Xc(e,t,n){let r=Kc.get(e);r||(r=new Map,Kc.set(e,r)),r.set(t,n)}function Qc(e){return[e]}function Jc(e,t,n={}){const r=function(e,t){const n=Kc.get(e);return n&&n.has(t)?n.get(t):Qc}(e.constructor,t.constructor);try{return r(e=e.clone(),t,n)}catch(e){throw e}}function Zc(e,t,n){e=e.slice(),t=t.slice();const r=new $c(n.document,n.useRelations,n.forceWeakRemove);r.setOriginalOperations(e),r.setOriginalOperations(t);const o=r.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:o};const i=new WeakMap;for(const t of e)i.set(t,0);const a={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length};let s=0;for(;s{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const r=e.range.getDifference(t.range).map(t=>new Es(t,e.key,e.oldValue,e.newValue,0)),o=e.range.getIntersection(t.range);return o&&n.aIsStrong&&r.push(new Es(o,t.key,t.newValue,e.newValue,0)),0==r.length?[new Js(0)]:r}return[e]}),Xc(Es,Cs,(e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const n=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map(t=>new Es(t,e.key,e.oldValue,e.newValue,e.baseVersion));if(t.shouldReceiveAttributes){const r=nd(t,e.key,e.oldValue);r&&n.unshift(r)}return n}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]}),Xc(Es,Ls,(e,t)=>{const n=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&n.push(ra._createFromPositionAndShift(t.graveyardPosition,1));const r=e.range._getTransformedByMergeOperation(t);return r.isCollapsed||n.push(r),n.map(t=>new Es(t,e.key,e.oldValue,e.newValue,e.baseVersion))}),Xc(Es,Ms,(e,t)=>function(e,t){const n=ra._createFromPositionAndShift(t.sourcePosition,t.howMany);let r=null,o=[];n.containsRange(e,!0)?r=e:e.start.hasSameParentAs(n.start)?(o=e.getDifference(n),r=e.getIntersection(n)):o=[e];const i=[];for(let e of o){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const n=t.getMovedRangeStart(),r=e.start.hasSameParentAs(n);e=e._getTransformedByInsertion(n,t.howMany,r),i.push(...e)}return r&&i.push(r._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]),i}(e.range,t).map(t=>new Es(t,e.key,e.oldValue,e.newValue,e.baseVersion))),Xc(Es,Ps,(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 n=e.clone();return n.range=new ra(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,n]}return e.range=e.range._getTransformedBySplitOperation(t),[e]}),Xc(Cs,Es,(e,t)=>{const n=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const r=nd(e,t.key,t.newValue);r&&n.push(r)}return n}),Xc(Cs,Cs,(e,t,n)=>(e.position.isEqual(t.position)&&n.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e])),Xc(Cs,Ms,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),Xc(Cs,Ps,(e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e])),Xc(Cs,Ls,(e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e])),Xc(Ts,Cs,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e])),Xc(Ts,Ts,(e,t,n)=>{if(e.name==t.name){if(!n.aIsStrong)return[new Js(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]}),Xc(Ts,Ls,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e])),Xc(Ts,Ms,(e,t,n)=>{if(e.oldRange&&(e.oldRange=ra._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(n.abRelation){const r=ra._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==n.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.start.path=n.abRelation.path,e.newRange.end=r.end,[e];if("right"==n.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=r.start,e.newRange.end.path=n.abRelation.path,[e]}e.newRange=ra._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]}),Xc(Ts,Ps,(e,t,n)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(n.abRelation){const r=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&n.abRelation.wasStartBeforeMergedElement?e.newRange.start=$i._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!n.abRelation.wasInLeftElement&&(e.newRange.start=$i._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&n.abRelation.wasInRightElement?e.newRange.end=$i._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&n.abRelation.wasEndBeforeMergedElement?e.newRange.end=$i._createAt(t.insertionPosition):e.newRange.end=r.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]}),Xc(Ls,Cs,(e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e])),Xc(Ls,Ls,(e,t,n)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(n.bWasUndone){const n=t.graveyardPosition.path.slice();return n.push(0),e.sourcePosition=new $i(t.graveyardPosition.root,n),e.howMany=0,[e]}return[new Js(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!n.bWasUndone&&"splitAtSource"!=n.abRelation){const r="$graveyard"==e.targetPosition.root.rootName,o="$graveyard"==t.targetPosition.root.rootName;if(o&&!r||(!r||o)&&n.aIsStrong){const n=t.targetPosition._getTransformedByMergeOperation(t),r=e.targetPosition._getTransformedByMergeOperation(t);return[new Ms(n,e.howMany,r,0)]}return[new Js(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)&&n.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),Xc(Ls,Ms,(e,t,n)=>{const r=ra._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!n.bWasUndone&&!n.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&r.containsPosition(e.sourcePosition)?[new Js(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])}),Xc(Ls,Ps,(e,t,n)=>{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 r=0!=t.howMany,o=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(r||o||"mergeTargetNotMoved"==n.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==n.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==n.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]}),Xc(Ms,Cs,(e,t)=>{const n=ra._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=n.start,e.howMany=n.end.offset-n.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]}),Xc(Ms,Ms,(e,t,n)=>{const r=ra._createFromPositionAndShift(e.sourcePosition,e.howMany),o=ra._createFromPositionAndShift(t.sourcePosition,t.howMany);let i,a=n.aIsStrong,s=!n.aIsStrong;if("insertBefore"==n.abRelation||"insertAfter"==n.baRelation?s=!0:"insertAfter"!=n.abRelation&&"insertBefore"!=n.baRelation||(s=!1),i=e.targetPosition.isEqual(t.targetPosition)&&s?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),rd(e,t)&&rd(t,e))return[t.getReversed()];if(r.containsPosition(t.targetPosition)&&r.containsRange(o,!0))return r.start=r.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),r.end=r.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),od([r],i);if(o.containsPosition(e.targetPosition)&&o.containsRange(r,!0))return r.start=r.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),r.end=r.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),od([r],i);const l=gn(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return r.start=r.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),r.end=r.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),od([r],i);"remove"!=e.type||"remove"==t.type||n.aWasUndone||n.forceWeakRemove?"remove"==e.type||"remove"!=t.type||n.bWasUndone||n.forceWeakRemove||(a=!1):a=!0;const c=[],d=r.getDifference(o);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const n="same"==gn(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),r=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,n);c.push(...r)}const u=r.getIntersection(o);return null!==u&&a&&(u.start=u.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),u.end=u.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===c.length?c.push(u):1==c.length?o.start.isBefore(r.start)||o.start.isEqual(r.start)?c.unshift(u):c.push(u):c.splice(1,0,u)),0===c.length?[new Js(e.baseVersion)]:od(c,i)}),Xc(Ms,Ps,(e,t,n)=>{let r=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=n.abRelation||(r=e.targetPosition._getTransformedBySplitOperation(t));const o=ra._createFromPositionAndShift(e.sourcePosition,e.howMany);if(o.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=r,[e];if(o.start.hasSameParentAs(t.splitPosition)&&o.containsPosition(t.splitPosition)){let e=new ra(t.splitPosition,o.end);return e=e._getTransformedBySplitOperation(t),od([new ra(o.start,t.splitPosition),e],r)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==n.abRelation&&(r=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==n.abRelation&&(r=e.targetPosition);const i=[o._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const r=o.start.isEqual(t.graveyardPosition)||o.containsPosition(t.graveyardPosition);e.howMany>1&&r&&!n.aWasUndone&&i.push(ra._createFromPositionAndShift(t.insertionPosition,1))}return od(i,r)}),Xc(Ms,Ls,(e,t,n)=>{const r=ra._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&r.containsPosition(t.sourcePosition))if("remove"!=e.type||n.forceWeakRemove){if(1==e.howMany)return n.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new Js(0)]}else if(!n.aWasUndone){const n=[];let r=t.graveyardPosition.clone(),o=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(n.push(new Ms(e.sourcePosition,e.howMany-1,e.targetPosition,0)),r=r._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),o=o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const i=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),a=new Ms(r,1,i,0),s=a.getMovedRangeStart().path.slice();s.push(0);const l=new $i(a.targetPosition.root,s);o=o._getTransformedByMove(r,i,1);const c=new Ms(o,t.howMany,l,0);return n.push(a),n.push(c),n}const o=ra._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=o.start,e.howMany=o.end.offset-o.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]}),Xc(As,Cs,(e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e])),Xc(As,Ls,(e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e])),Xc(As,Ms,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),Xc(As,As,(e,t,n)=>{if(e.position.isEqual(t.position)){if(!n.aIsStrong)return[new Js(0)];e.oldName=t.newName}return[e]}),Xc(As,Ps,(e,t)=>{if("same"==gn(e.position.path,t.splitPosition.getParentPath())&&!t.graveyardPosition){const t=new As(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]}),Xc(Ds,Ds,(e,t,n)=>{if(e.root===t.root&&e.key===t.key){if(!n.aIsStrong||e.newValue===t.newValue)return[new Js(0)];e.oldValue=t.newValue}return[e]}),Xc(Ps,Cs,(e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset{if(!e.graveyardPosition&&!n.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const n=t.graveyardPosition.path.slice();n.push(0);const r=new $i(t.graveyardPosition.root,n),o=Ps.getInsertionPosition(new $i(t.graveyardPosition.root,n)),i=new Ps(r,0,o,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=Ps.getInsertionPosition(e.splitPosition),e.graveyardPosition=i.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[i,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=Ps.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),Xc(Ps,Ms,(e,t,n)=>{const r=ra._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const o=r.start.isEqual(e.graveyardPosition)||r.containsPosition(e.graveyardPosition);if(!n.bWasUndone&&o){const n=e.splitPosition._getTransformedByMoveOperation(t),r=e.graveyardPosition._getTransformedByMoveOperation(t),o=r.path.slice();o.push(0);const i=new $i(r.root,o);return[new Ms(n,e.howMany,i,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const o=e.splitPosition.isEqual(t.targetPosition);if(o&&("insertAtSource"==n.baRelation||"splitBefore"==n.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=Ps.getInsertionPosition(e.splitPosition),[e];if(o&&n.abRelation&&n.abRelation.howMany){const{howMany:t,offset:r}=n.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(r),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&r.containsPosition(e.splitPosition)){const n=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=n,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new Js(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new Js(0)];if("splitBefore"==n.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const r="$graveyard"==e.splitPosition.root.rootName,o="$graveyard"==t.splitPosition.root.rootName;if(o&&!r||(!r||o)&&n.aIsStrong){const n=[];return t.howMany&&n.push(new Ms(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&n.push(new Ms(e.splitPosition,e.howMany,e.moveTargetPosition,0)),n}return[new Js(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==n.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==n.baRelation){const n=t.insertionPosition.path.slice();n.push(0);const r=new $i(t.insertionPosition.root,n);return[e,new Ms(e.insertionPosition,1,r,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offsete),t.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),function({origin:e,originKeystrokeHandler:t,originFocusTracker:n,toolbar:r,beforeFocus:o,afterBlur:i}){n.add(r.element),t.set("Alt+F10",(e,t)=>{n.isFocused&&!r.focusTracker.isFocused&&(o&&o(),r.focus(),t())}),r.keystrokes.set("Esc",(t,n)=>{r.focusTracker.isFocused&&(e.focus(),i&&i(),n())})}({origin:n,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:t.toolbar})}_initPlaceholder(){const e=this.editor,t=e.editing.view,n=t.document.getRoot(),r=e.sourceElement,o=e.config.get("placeholder")||r&&"textarea"===r.tagName.toLowerCase()&&r.getAttribute("placeholder");o&&Wc({view:t,element:n,text:o,isDirectHost:!1,keepOnFocus:!0})}}n(63);class cd extends Sc{constructor(e,t,n={}){super(e),this.stickyPanel=new Bc(e),this.toolbar=new mc(e,{shouldGroupWhenFull:n.shouldToolbarGroupWhenFull}),this.editable=new Cc(e,t)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class dd extends gl{constructor(e,t){super(t),nn(e)&&(this.sourceElement=e),this.model.document.createRoot();const n=!this.config.get("toolbar.shouldNotGroupWhenFull"),r=new cd(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:n});this.ui=new ld(this,r),function(e){if(!T(e.updateSourceElement))throw new s.a("attachtoform-missing-elementapi-interface",e);const t=e.sourceElement;if(t&&"textarea"===t.tagName.toLowerCase()&&t.form){let n;const r=t.form,o=()=>e.updateSourceElement();T(r.submit)&&(n=r.submit,r.submit=()=>{o(),n.apply(r)}),r.addEventListener("submit",o),e.on("destroy",()=>{r.removeEventListener("submit",o),n&&(r.submit=n)})}}(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise(n=>{const r=new this(e,t);n(r.initPlugins().then(()=>r.ui.init(nn(e)?e:null)).then(()=>{if(!nn(e)&&t.initialData)throw new s.a("editor-create-initial-data",null);const n=void 0!==t.initialData?t.initialData:function(e){return nn(e)?(t=e)instanceof HTMLTextAreaElement?t.value:t.innerHTML:e;var t}(e);return r.data.init(n)}).then(()=>r.fire("ready")).then(()=>r))})}}je(dd,_l),je(dd,wl);class ud{constructor(e){this.files=function(e){const t=Array.from(e.files||[]),n=Array.from(e.items||[]);return t.length?t:n.filter(e=>"file"===e.kind).map(e=>e.getAsFile())}(e),this._native=e}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}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}class pd extends ti{constructor(e){super(e);const t=this.document;function n(e){return(n,o)=>{o.preventDefault();const i=o.dropRange?[o.dropRange]:null,a=new r(t,e);t.fire(a,{dataTransfer:o.dataTransfer,method:n.name,targetRanges:i,target:o.target}),a.stop.called&&o.stopPropagation()}}this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"],this.listenTo(t,"paste",n("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",n("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",n("dragging"),{priority:"low"})}onDomEvent(e){const t={dataTransfer:new ud(e.clipboardData?e.clipboardData:e.dataTransfer)};"drop"!=e.type&&"dragover"!=e.type||(t.dropRange=function(e,t){const n=t.target.ownerDocument,r=t.clientX,o=t.clientY;let i;return n.caretRangeFromPoint&&n.caretRangeFromPoint(r,o)?i=n.caretRangeFromPoint(r,o):t.rangeParent&&(i=n.createRange(),i.setStart(t.rangeParent,t.rangeOffset),i.collapse(!0)),i?e.domConverter.domRangeToView(i):null}(this.view,e)),this.fire(e.type,e,t)}}const md=["figcaption","li"];class hd extends Ye{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(pd),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){const e=this.editor,t=e.model,n=e.editing.view,o=n.document;this.listenTo(o,"clipboardInput",t=>{e.isReadOnly&&t.stop()},{priority:"highest"}),this.listenTo(o,"clipboardInput",(e,t)=>{const o=t.dataTransfer;let i=t.content||"";var a;i||(o.getData("text/html")?i=function(e){return e.replace(/(\s+)<\/span>/g,(e,t)=>1==t.length?" ":t).replace(//g,"")}(o.getData("text/html")):o.getData("text/plain")&&(((a=(a=o.getData("text/plain")).replace(//g,">").replace(/\r?\n\r?\n/g,"
").replace(/\r?\n/g,"
").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g," ")).includes("
")||a.includes("
"))&&(a=`
${a}
`),i=a),i=this.editor.data.htmlProcessor.toView(i));const s=new r(this,"inputTransformation");this.fire(s,{content:i,dataTransfer:o,targetRanges:t.targetRanges,method:t.method}),s.stop.called&&e.stop(),n.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(e,n)=>{if(n.content.isEmpty)return;const r=this.editor.data.toModel(n.content,"$clipboardHolder");0!=r.childCount&&(e.stop(),t.change(()=>{this.fire("contentInsertion",{content:r,method:n.method,dataTransfer:n.dataTransfer,targetRanges:n.targetRanges})}))},{priority:"low"}),this.listenTo(this,"contentInsertion",(e,n)=>{n.resultRange=t.insertContent(n.content)},{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,n=e.editing.view.document;function r(r,o){const i=o.dataTransfer;o.preventDefault();const a=e.data.toView(e.model.getSelectedContent(t.selection));n.fire("clipboardOutput",{dataTransfer:i,content:a,method:r.name})}this.listenTo(n,"copy",r,{priority:"low"}),this.listenTo(n,"cut",(t,n)=>{e.isReadOnly?n.preventDefault():r(t,n)},{priority:"low"}),this.listenTo(n,"clipboardOutput",(n,r)=>{r.content.isEmpty||(r.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(r.content)),r.dataTransfer.setData("text/plain",function e(t){let n="";if(t.is("$text")||t.is("$textProxy"))n=t.data;else if(t.is("element","img")&&t.hasAttribute("alt"))n=t.getAttribute("alt");else if(t.is("element","br"))n="\n";else{let r=null;for(const o of t.getChildren()){const t=e(o);r&&(r.is("containerElement")||o.is("containerElement"))&&(md.includes(r.name)||md.includes(o.name)?n+="\n":n+="\n\n"),n+=t,r=o}}return n}(r.content))),"cut"==r.method&&e.model.deleteContent(t.selection)},{priority:"low"})}}function*fd(e,t){for(const n of t)n&&e.getAttributeProperties(n[0]).copyOnEnter&&(yield n)}class gd extends He{execute(){const e=this.editor.model,t=e.document;e.change(n=>{!function(e,t,n,r){const o=n.isCollapsed,i=n.getFirstRange(),a=i.start.parent,s=i.end.parent;if(r.isLimit(a)||r.isLimit(s))o||a!=s||e.deleteContent(n);else if(o){const e=fd(t.model.schema,n.getAttributes());bd(t,i.start),t.setSelectionAttribute(e)}else{const r=!(i.start.isAtStart&&i.end.isAtEnd),o=a==s;e.deleteContent(n,{leaveUnmerged:r}),r&&(o?bd(t,n.focus):t.setSelection(s,0))}}(this.editor.model,n,t.selection,e.schema),this.fire("afterExecute",{writer:n})})}}function bd(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}class vd extends jo{constructor(e){super(e);const t=this.document;t.on("keydown",(e,n)=>{if(this.isEnabled&&n.keyCode==Fr.enter){const r=new hr(t,"enter",t.selection.getFirstRange());t.fire(r,new ei(t,n.domEvent,{isSoft:n.shiftKey})),r.stop.called&&e.stop()}})}observe(){}}class yd extends Ye{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,n=t.document;t.addObserver(vd),e.commands.add("enter",new gd(e)),this.listenTo(n,"enter",(n,r)=>{r.preventDefault(),r.isSoft||(e.execute("enter"),t.scrollToTheSelection())},{priority:"low"})}}class _d{constructor(e,t=20){this.model=e,this.size=0,this.limit=t,this.isLocked=!1,this._changeCallback=(e,t)=>{"transparent"!=t.type&&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()),this._batch}input(e){this.size+=e,this.size>=this.limit&&this._reset(!0)}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){this.isLocked&&!e||(this._batch=null,this.size=0)}}class wd extends He{constructor(e,t){super(e),this.direction=t,this._buffer=new _d(e.model,e.config.get("typing.undoStep"))}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,n=t.document;t.enqueueChange(this._buffer.batch,r=>{this._buffer.lock();const o=r.createSelection(e.selection||n.selection),i=e.sequence||1,a=o.isCollapsed;if(o.isCollapsed&&t.modifySelection(o,{direction:this.direction,unit:e.unit}),this._shouldEntireContentBeReplacedWithParagraph(i))return void this._replaceEntireContentWithParagraph(r);if(this._shouldReplaceFirstBlockWithParagraph(o,i))return void this.editor.execute("paragraph",{selection:o});if(o.isCollapsed)return;let s=0;o.getFirstRange().getMinimalFlatRanges().forEach(e=>{s+=ur(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),t.deleteContent(o,{doNotResetEntireContent:a,direction:this.direction}),this._buffer.input(s),r.setSelection(o),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,n=t.document.selection,r=t.schema.getLimitElement(n);if(!n.isCollapsed||!n.containsEntireContent(r))return!1;if(!t.schema.checkChild(r,"paragraph"))return!1;const o=r.getChild(0);return!o||"paragraph"!==o.name}_replaceEntireContentWithParagraph(e){const t=this.editor.model,n=t.document.selection,r=t.schema.getLimitElement(n),o=e.createElement("paragraph");e.remove(e.createRangeIn(r)),e.insert(o,r),e.setSelection(o,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const n=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const r=e.getFirstPosition(),o=n.schema.getLimitElement(r),i=o.getChild(0);return r.parent==i&&!!e.containsEntireContent(i)&&!!n.schema.checkChild(o,"paragraph")&&"paragraph"!=i.name}}function kd(e){if(e.newChildren.length-e.oldChildren.length!=1)return;const t=function(e,t){const n=[];let r,o=0;return e.forEach(e=>{"equal"==e?(i(),o++):"insert"==e?(a("insert")?r.values.push(t[o]):(i(),r={type:"insert",index:o,values:[t[o]]}),o++):a("delete")?r.howMany++:(i(),r={type:"delete",index:o,howMany:1})}),i(),n;function i(){r&&(n.push(r),r=null)}function a(e){return r&&r.type==e}}(bo(e.oldChildren,e.newChildren,xd),e.newChildren);if(t.length>1)return;const n=t[0];return n.values[0]&&n.values[0].is("$text")?n:void 0}function xd(e,t){return e&&e.is("$text")&&t&&t.is("$text")?e.data===t.data:e===t}function Ed(e,t){const n=t.selection,r=e.shiftKey&&e.keyCode===Fr.delete,o=!n.isCollapsed;return r&&o}class Sd extends jo{constructor(e){super(e);const t=e.document;let n=0;function r(e,n,r){const o=new hr(t,"delete",t.selection.getFirstRange());t.fire(o,new ei(t,n,r)),o.stop.called&&e.stop()}t.on("keyup",(e,t)=>{t.keyCode!=Fr.delete&&t.keyCode!=Fr.backspace||(n=0)}),t.on("keydown",(e,o)=>{if(Ar&&Ed(o,t))return;const i={};if(o.keyCode==Fr.delete)i.direction="forward",i.unit="character";else{if(o.keyCode!=Fr.backspace)return;i.direction="backward",i.unit="codePoint"}const a=Tr?o.altKey:o.ctrlKey;i.unit=a?"word":i.unit,i.sequence=++n,r(e,o.domEvent,i)}),Pr&&t.on("beforeinput",(t,n)=>{if("deleteContentBackward"!=n.domEvent.inputType)return;const o={unit:"codepoint",direction:"backward",sequence:1},i=n.domTarget.ownerDocument.defaultView.getSelection();i.anchorNode==i.focusNode&&i.anchorOffset+1!=i.focusOffset&&(o.selectionToRemove=e.domConverter.domSelectionToView(i)),r(t,n.domEvent,o)})}observe(){}}class Md extends Ye{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,n=t.document,r=e.model.document;t.addObserver(Sd),this._undoOnBackspace=!1;const o=new wd(e,"forward");if(e.commands.add("deleteForward",o),e.commands.add("forwardDelete",o),e.commands.add("delete",new wd(e,"backward")),this.listenTo(n,"delete",(n,r)=>{const o={unit:r.unit,sequence:r.sequence};if(r.selectionToRemove){const t=e.model.createSelection(),n=[];for(const t of r.selectionToRemove.getRanges())n.push(e.editing.mapper.toModelRange(t));t.setTo(n),o.selection=t}e.execute("forward"==r.direction?"deleteForward":"delete",o),r.preventDefault(),t.scrollToTheSelection()},{priority:"low"}),Pr){let e=null;this.listenTo(n,"delete",(t,n)=>{const r=n.domTarget.ownerDocument.defaultView.getSelection();e={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}},{priority:"lowest"}),this.listenTo(n,"keyup",(t,n)=>{if(e){const t=n.domTarget.ownerDocument.defaultView.getSelection();t.collapse(e.anchorNode,e.anchorOffset),t.extend(e.focusNode,e.focusOffset),e=null}})}this.editor.plugins.has("UndoEditing")&&(this.listenTo(n,"delete",(t,n)=>{this._undoOnBackspace&&"backward"==n.direction&&1==n.sequence&&"codePoint"==n.unit&&(this._undoOnBackspace=!1,e.execute("undo"),n.preventDefault(),t.stop())},{context:"$capture"}),this.listenTo(r,"change",()=>{this._undoOnBackspace=!1}))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class Cd{constructor(){this._stack=[]}add(e,t){const n=this._stack,r=n[0];this._insertDescriptor(e);const o=n[0];r===o||Td(r,o)||this.fire("change:top",{oldDescriptor:r,newDescriptor:o,writer:t})}remove(e,t){const n=this._stack,r=n[0];this._removeDescriptor(e);const o=n[0];r===o||Td(r,o)||this.fire("change:top",{oldDescriptor:r,newDescriptor:o,writer:t})}_insertDescriptor(e){const t=this._stack,n=t.findIndex(t=>t.id===e.id);if(Td(e,t[n]))return;n>-1&&t.splice(n,1);let r=0;for(;t[r]&&Ad(t[r],e);)r++;t.splice(r,0,e)}_removeDescriptor(e){const t=this._stack,n=t.findIndex(t=>t.id===e);n>-1&&t.splice(n,1)}}function Td(e,t){return e&&t&&e.priority==t.priority&&Dd(e.classes)==Dd(t.classes)}function Ad(e,t){return e.priority>t.priority||!(e.priorityDd(t.classes)}function Dd(e){return Array.isArray(e)?e.sort().join(","):e}function Ld(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function Pd(e,t,n={}){if(!e.is("containerElement"))throw new s.a("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass("ck-widget",e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=Yd,n.label&&function(e,t,n){n.setCustomProperty("widgetLabel",t,e)}(e,n.label,t),n.hasSelectionHandle&&function(e,t){const n=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},function(e){const t=this.toDomElement(e),n=new Ql;return n.set("content",''),n.render(),t.appendChild(n.element),t});t.insert(t.createPositionAt(e,0),n),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),Od(e,t),e}function Id(e,t,n){if(t.classes&&n.addClass(dn(t.classes),e),t.attributes)for(const r in t.attributes)n.setAttribute(r,t.attributes[r],e)}function Nd(e,t,n){if(t.classes&&n.removeClass(dn(t.classes),e),t.attributes)for(const r in t.attributes)n.removeAttribute(r,e)}function Od(e,t,n=Id,r=Nd){const o=new Cd;o.on("change:top",(t,o)=>{o.oldDescriptor&&r(e,o.oldDescriptor,o.writer),o.newDescriptor&&n(e,o.newDescriptor,o.writer)}),t.setCustomProperty("addHighlight",(e,t,n)=>o.add(t,n),e),t.setCustomProperty("removeHighlight",(e,t,n)=>o.remove(t,n),e)}function Rd(e){const t=e.getCustomProperty("widgetLabel");return t?"function"==typeof t?t():t:""}function Fd(e,t){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",(n,r,o)=>{t.setAttribute("contenteditable",o?"false":"true",e)}),e.on("change:isFocused",(n,r,o)=>{o?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)}),Od(e,t),e}function jd(e,t){const n=e.getSelectedElement();if(n){const r=Hd(e);if(r)return t.createRange(t.createPositionAt(n,r));if(t.schema.isObject(n)&&!t.schema.isInline(n))return t.createRangeOn(n)}const r=e.getSelectedBlocks().next().value;if(r){if(r.isEmpty)return t.createRange(t.createPositionAt(r,0));const n=t.createPositionAfter(r);return e.focus.isTouching(n)?t.createRange(n):t.createRange(t.createPositionBefore(r))}return t.createRange(e.focus)}function Yd(){return null}function zd(e,t,n){return e&&Ld(e)&&!n.isInline(t)}function Hd(e){return e.getAttribute("widget-type-around")}je(Cd,d);const Bd=[Yr("arrowUp"),Yr("arrowRight"),Yr("arrowDown"),Yr("arrowLeft"),9,16,17,18,19,20,27,33,34,35,36,45,91,93,144,145,173,174,175,176,177,178,179,255];for(let e=112;e<=135;e++)Bd.push(e);function Vd(e){return!(!e.ctrlKey&&!e.metaKey)||Bd.includes(e.keyCode)}n(65);const Wd=["before","after"],Ud=(new DOMParser).parseFromString('',"image/svg+xml").firstChild;class Gd extends Ye{static get pluginName(){return"WidgetTypeAround"}static get requires(){return[yd,Md]}constructor(e){super(e),this._currentFakeCaretModelElement=null}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",(n,r,o)=>{t.change(e=>{for(const n of t.document.roots)o?e.removeClass("ck-widget__type-around_disabled",n):e.addClass("ck-widget__type-around_disabled",n)}),o||e.model.change(e=>{e.removeSelectionAttribute("widget-type-around")})}),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableDeleteContentIntegration()}destroy(){this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const n=this.editor,r=n.editing.view;n.execute("insertParagraph",{position:n.model.createPositionAt(e,t)}),r.focus(),r.scrollToTheSelection()}_listenToIfEnabled(e,t,n,r){this.listenTo(e,t,(...e)=>{this.isEnabled&&n(...e)},r)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=Hd(e);if(!t)return!1;const n=e.getSelectedElement();return this._insertParagraph(n,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,n=e.locale.t,r={before:n("Insert paragraph before block"),after:n("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",(e,n,o)=>{const i=o.mapper.toViewElement(n.item);zd(i,n.item,t)&&function(e,t,n){const r=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},function(e){const n=this.toDomElement(e);return function(e,t){for(const n of Wd){const r=new Dl({tag:"div",attributes:{class:["ck","ck-widget__type-around__button","ck-widget__type-around__button_"+n],title:t[n]},children:[e.ownerDocument.importNode(Ud,!0)]});e.appendChild(r.render())}}(n,t),function(e){const t=new Dl({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(n),n});e.insert(e.createPositionAt(n,"end"),r)}(o.writer,r,i)},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,n=t.document.selection,r=t.schema,o=e.editing.view;function i(e){return"ck-widget_type-around_show-fake-caret_"+e}this._listenToIfEnabled(o.document,"arrowKey",(e,t)=>{this._handleArrowKeyPress(e,t)},{context:[Ld,"$text"],priority:"high"}),this._listenToIfEnabled(n,"change:range",(t,n)=>{n.directChange&&e.model.change(e=>{e.removeSelectionAttribute("widget-type-around")})}),this._listenToIfEnabled(t.document,"change:data",()=>{const t=n.getSelectedElement();t&&zd(e.editing.mapper.toViewElement(t),t,r)||e.model.change(e=>{e.removeSelectionAttribute("widget-type-around")})}),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",(e,t,n)=>{const o=n.writer;if(this._currentFakeCaretModelElement){const e=n.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(o.removeClass(Wd.map(i),e),this._currentFakeCaretModelElement=null)}const a=t.selection.getSelectedElement();if(!a)return;const s=n.mapper.toViewElement(a);if(!zd(s,a,r))return;const l=Hd(t.selection);l&&(o.addClass(i(l),s),this._currentFakeCaretModelElement=a)}),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",(t,n,r)=>{r||e.model.change(e=>{e.removeSelectionAttribute("widget-type-around")})})}_handleArrowKeyPress(e,t){const n=this.editor,r=n.model,o=r.document.selection,i=r.schema,a=n.editing.view,s=function(e,t){const n=Br(e,t);return"down"===n||"right"===n}(t.keyCode,n.locale.contentLanguageDirection),l=a.document.selection.getSelectedElement();let c;zd(l,n.editing.mapper.toModelElement(l),i)?c=this._handleArrowKeyPressOnSelectedWidget(s):o.isCollapsed?c=this._handleArrowKeyPressWhenSelectionNextToAWidget(s):t.shiftKey||(c=this._handleArrowKeyPressWhenNonCollapsedSelection(s)),c&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,n=Hd(t.document.selection);return t.change(t=>n?n!==(e?"after":"before")&&(t.removeSelectionAttribute("widget-type-around"),!0):(t.setSelectionAttribute("widget-type-around",e?"after":"before"),!0))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,n=t.model,r=n.schema,o=t.plugins.get("Widget"),i=o._getObjectElementNextToSelection(e);return!!zd(t.editing.mapper.toViewElement(i),i,r)&&(n.change(t=>{o._setSelectionOverElement(i),t.setSelectionAttribute("widget-type-around",e?"before":"after")}),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,n=t.model,r=n.schema,o=t.editing.mapper,i=n.document.selection,a=e?i.getLastPosition().nodeBefore:i.getFirstPosition().nodeAfter;return!!zd(o.toViewElement(a),a,r)&&(n.change(t=>{t.setSelection(a,"on"),t.setSelectionAttribute("widget-type-around",e?"after":"before")}),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",(n,r)=>{const o=r.domTarget.closest(".ck-widget__type-around__button");if(!o)return;const i=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(o),a=function(e,t){const n=e.closest(".ck-widget");return t.mapDomToView(n)}(o,t.domConverter),s=e.editing.mapper.toModelElement(a);this._insertParagraph(s,i),r.preventDefault(),n.stop()})}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,n=e.editing.view;this._listenToIfEnabled(n.document,"enter",(n,r)=>{if("atTarget"!=n.eventPhase)return;const o=t.getSelectedElement(),i=e.editing.mapper.toViewElement(o),a=e.model.schema;let s;this._insertParagraphAccordingToFakeCaretPosition()?s=!0:zd(i,o,a)&&(this._insertParagraph(o,r.isSoft?"before":"after"),s=!0),s&&(r.preventDefault(),n.stop())},{context:Ld})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view,t=[Fr.enter,Fr.delete,Fr.backspace];this._listenToIfEnabled(e.document,"keydown",(e,n)=>{t.includes(n.keyCode)||Vd(n)||this._insertParagraphAccordingToFakeCaretPosition()},{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,n=e.model,r=n.schema;this._listenToIfEnabled(t.document,"delete",(t,o)=>{if("atTarget"!=t.eventPhase)return;const i=Hd(n.document.selection);if(!i)return;const a=o.direction,s=n.document.selection.getSelectedElement(),l="forward"==a;if("before"===i===l)e.execute("delete",{selection:n.createSelection(s,"on")});else{const t=r.getNearestSelectionRange(n.createPositionAt(s,i),a);if(t)if(t.isCollapsed){const o=n.createSelection(t.start);if(n.modifySelection(o,{direction:a}),o.focus.isEqual(t.start)){const e=function(e,t){let n=t;for(const r of t.getAncestors({parentFirst:!0})){if(r.childCount>1||e.isLimit(r))break;n=r}return n}(r,t.start.parent);n.deleteContent(n.createSelection(e,"on"),{doNotAutoparagraph:!0})}else n.change(n=>{n.setSelection(t),e.execute(l?"deleteForward":"delete")})}else n.change(n=>{n.setSelection(t),e.execute(l?"deleteForward":"delete")})}o.preventDefault(),t.stop()},{context:Ld})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,n=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",(e,[r,o])=>{if(o&&!o.is("documentSelection"))return;const i=Hd(n);return i?(e.stop(),t.change(e=>{const o=n.getSelectedElement(),a=t.createPositionAt(o,i),s=e.createSelection(a),l=t.insertContent(r,s);return e.setSelection(s),l})):void 0},{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",(e,[n])=>{n&&!n.is("documentSelection")||Hd(t)&&e.stop()},{priority:"high"})}}function qd(e,t,n){const r=e.schema,o=e.createRangeIn(t.root),i="forward"==n?"elementStart":"elementEnd";for(const{previousPosition:e,item:a,type:s}of o.getWalker({startPosition:t,direction:n})){if(r.isLimit(a)&&!r.isInline(a))return e;if(s==i&&r.isBlock(a))return null}return null}function Kd(e,t,n){const r="backward"==n?t.end:t.start;if(e.checkChild(r,"$text"))return r;for(const{nextPosition:r}of t.getWalker({direction:n}))if(e.checkChild(r,"$text"))return r;return null}n(67);class Xd extends Ye{static get pluginName(){return"Widget"}static get requires(){return[Gd,Md]}init(){const e=this.editor,t=e.editing.view,n=t.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",(t,n,r)=>{const o=r.writer,i=n.selection;if(i.isCollapsed)return;const a=i.getSelectedElement();if(!a)return;const s=e.editing.mapper.toViewElement(a);Ld(s)&&r.consumable.consume(i,"selection")&&o.setSelection(o.createRangeOn(s),{fake:!0,label:Rd(s)})}),this.editor.editing.downcastDispatcher.on("selection",(e,t,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const r=n.writer,o=r.document.selection;let i=null;for(const e of o.getRanges())for(const t of e){const e=t.item;Ld(e)&&!Qd(e,i)&&(r.addClass("ck-widget_selected",e),this._previouslySelected.add(e),i=e)}},{priority:"low"}),t.addObserver(ad),this.listenTo(n,"mousedown",(...e)=>this._onMousedown(...e)),this.listenTo(n,"arrowKey",(...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)},{context:[Ld,"$text"]}),this.listenTo(n,"arrowKey",(...e)=>{this._preventDefaultOnArrowKeyPress(...e)},{context:"$root"}),this.listenTo(n,"arrowKey",function(e){const t=e.model;return(n,r)=>{const o=r.keyCode==Fr.arrowup,i=r.keyCode==Fr.arrowdown,a=r.shiftKey,s=t.document.selection;if(!o&&!i)return;const l=i;if(a&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(s,l))return;const c=function(e,t,n){const r=e.model;if(n){const e=t.isCollapsed?t.focus:t.getLastPosition(),n=qd(r,e,"forward");if(!n)return null;const o=r.createRange(e,n),i=Kd(r.schema,o,"backward");return i?r.createRange(e,i):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),n=qd(r,e,"backward");if(!n)return null;const o=r.createRange(n,e),i=Kd(r.schema,o,"forward");return i?r.createRange(i,e):null}}(e,s,l);if(c){if(c.isCollapsed){if(s.isCollapsed)return;if(a)return}(c.isCollapsed||function(e,t,n){const r=e.model,o=e.view.domConverter;if(n){const e=r.createSelection(t.start);r.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=r.createRange(e.focus,t.end))}const i=e.mapper.toViewRange(t),a=o.viewRangeToDom(i),s=Si.getDomRangeRects(a);let l;for(const e of s)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,c,l))&&(t.change(e=>{const n=l?c.end:c.start;if(a){const r=t.createSelection(s.anchor);r.setFocus(n),e.setSelection(r)}else e.setSelection(n)}),n.stop(),r.preventDefault(),r.stopPropagation())}}}(this.editor.editing),{context:"$text"}),this.listenTo(n,"delete",(e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())},{context:"$root"})}_onMousedown(e,t){const n=this.editor,r=n.editing.view,o=r.document;let i=t.target;if(function(e){for(;e;){if(e.is("editableElement")&&!e.is("rootElement"))return!0;if(Ld(e))return!1;e=e.parent}return!1}(i)){if((Lr||Dr)&&t.domEvent.detail>=3){const e=n.editing.mapper,r=i.is("attributeElement")?i.findAncestor(e=>!e.is("attributeElement")):i,o=e.toModelElement(r);t.preventDefault(),this.editor.model.change(e=>{e.setSelection(o,"in")})}return}if(!Ld(i)&&(i=i.findAncestor(Ld),!i))return;Pr&&t.preventDefault(),o.isFocused||r.focus();const a=n.editing.mapper.toModelElement(i);this._setSelectionOverElement(a)}_handleSelectionChangeOnArrowKeyPress(e,t){const n=t.keyCode,r=this.editor.model,o=r.schema,i=r.document.selection,a=i.getSelectedElement(),s=Br(n,this.editor.locale.contentLanguageDirection),l="down"==s||"right"==s,c="up"==s||"down"==s;if(a&&o.isObject(a)){const n=l?i.getLastPosition():i.getFirstPosition(),a=o.getNearestSelectionRange(n,l?"forward":"backward");return void(a&&(r.change(e=>{e.setSelection(a)}),t.preventDefault(),e.stop()))}if(!i.isCollapsed&&!t.shiftKey){const n=i.getFirstPosition(),a=i.getLastPosition(),s=n.nodeAfter,c=a.nodeBefore;return void((s&&o.isObject(s)||c&&o.isObject(c))&&(r.change(e=>{e.setSelection(l?a:n)}),t.preventDefault(),e.stop()))}if(!i.isCollapsed)return;const d=this._getObjectElementNextToSelection(l);if(d&&o.isObject(d)){if(o.isInline(d)&&c)return;this._setSelectionOverElement(d),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const n=this.editor.model,r=n.schema,o=n.document.selection.getSelectedElement();o&&r.isObject(o)&&(t.preventDefault(),e.stop())}_handleDelete(e){if(this.editor.isReadOnly)return;const t=this.editor.model.document.selection;if(!t.isCollapsed)return;const n=this._getObjectElementNextToSelection(e);return n?(this.editor.model.change(e=>{let r=t.anchor.parent;for(;r.isEmpty;){const t=r;r=t.parent,e.remove(t)}this._setSelectionOverElement(n)}),!0):void 0}_setSelectionOverElement(e){this.editor.model.change(t=>{t.setSelection(t.createRangeOn(e))})}_getObjectElementNextToSelection(e){const t=this.editor.model,n=t.schema,r=t.document.selection,o=t.createSelection(r);if(t.modifySelection(o,{direction:e?"forward":"backward"}),o.isEqual(r))return null;const i=e?o.focus.nodeBefore:o.focus.nodeAfter;return i&&n.isObject(i)?i:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass("ck-widget_selected",t);this._previouslySelected.clear()}}function Qd(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}var Jd=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return v(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),hi(e,t,{leading:r,maxWait:t,trailing:o})};n(69);class Zd extends Ye{static get pluginName(){return"DragDrop"}static get requires(){return[hd,Xd]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=Jd(e=>this._updateDropMarker(e),40),this._removeDropMarkerDelayed=tu(()=>this._removeDropMarker(),40),this._clearDraggableAttributesDelayed=tu(()=>this._clearDraggableAttributes(),40),t.addObserver(pd),t.addObserver(ad),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",(e,t,n)=>{n?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}),this.on("change:isEnabled",(e,t,n)=>{n||this._finalizeDragging(!1)}),Pr&&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,n=t.document,r=e.editing.view,o=r.document;this.listenTo(o,"dragstart",(r,a)=>{const s=n.selection;if(a.target&&a.target.is("editableElement"))return void a.preventDefault();const l=a.target?nu(a.target):null;if(l){const n=e.editing.mapper.toModelElement(l);this._draggedRange=ga.fromRange(t.createRangeOn(n)),e.plugins.has("WidgetToolbarRepository")&&e.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}else if(!o.selection.isCollapsed){const e=o.selection.getSelectedElement();e&&Ld(e)||(this._draggedRange=ga.fromRange(s.getFirstRange()))}if(!this._draggedRange)return void a.preventDefault();this._draggingUid=i(),a.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",a.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const c=t.createSelection(this._draggedRange.toRange()),d=e.data.toView(t.getSelectedContent(c));o.fire("clipboardOutput",{dataTransfer:a.dataTransfer,content:d,method:r.name}),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")},{priority:"low"}),this.listenTo(o,"dragend",(e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)},{priority:"low"}),this.listenTo(o,"dragenter",()=>{this.isEnabled&&r.focus()}),this.listenTo(o,"dragleave",()=>{this._removeDropMarkerDelayed()}),this.listenTo(o,"dragging",(t,n)=>{if(!this.isEnabled)return void(n.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const r=$d(e,n.targetRanges,n.target);this._draggedRange||(n.dataTransfer.dropEffect="copy"),Dr||("copy"==n.dataTransfer.effectAllowed?n.dataTransfer.dropEffect="copy":["all","copyMove"].includes(n.dataTransfer.effectAllowed)&&(n.dataTransfer.dropEffect="move")),r&&this._updateDropMarkerThrottled(r)},{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"clipboardInput",(t,n)=>{if("drop"!=n.method)return;const r=$d(e,n.targetRanges,n.target);return this._removeDropMarker(),r?(this._draggedRange&&this._draggingUid!=n.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid=""),"move"==eu(n.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(r,!0)?(this._finalizeDragging(!1),void t.stop()):void(n.targetRanges=[e.editing.mapper.toViewRange(r)])):(this._finalizeDragging(!1),void t.stop())},{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(hd);e.on("contentInsertion",(e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const n=t.targetRanges.map(e=>this.editor.editing.mapper.toModelRange(e));this.editor.model.change(e=>e.setSelection(n))},{priority:"high"}),e.on("contentInsertion",(e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const n="move"==eu(t.dataTransfer),r=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(r&&n)},{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,n=t.document;this.listenTo(n,"mousedown",(r,o)=>{if(Pr||!o)return;this._clearDraggableAttributesDelayed.cancel();let i=nu(o.target);if(Ir&&!e.isReadOnly&&!i&&!n.selection.isCollapsed){const e=n.selection.getSelectedElement();e&&Ld(e)||(i=n.selection.editableElement)}i&&(t.change(e=>{e.setAttribute("draggable","true",i)}),this._draggableElement=e.editing.mapper.toModelElement(i))}),this.listenTo(n,"mouseup",()=>{Pr||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:n})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return n.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},function(e){const t=this.toDomElement(e);return t.innerHTML="⁠⁠",t})}})}_updateDropMarker(e){const t=this.editor,n=t.model.markers;t.model.change(t=>{n.has("drop-target")?n.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,n=t.model;this._removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._draggedRange&&(e&&this.isEnabled&&n.deleteContent(n.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function $d(e,t,n){const r=e.model,o=e.editing.mapper;let i=null;const a=t?t[0].start:null;if(n.is("uiElement")&&(n=n.parent),i=function(e,t){const n=e.model,r=e.editing.mapper;if(Ld(t))return n.createRangeOn(r.toModelElement(t));if(!t.is("editableElement")){const e=t.findAncestor(e=>Ld(e)||e.is("editableElement"));if(Ld(e))return n.createRangeOn(r.toModelElement(e))}return null}(e,n),i)return i;const s=function(e,t){const n=e.editing.mapper,r=e.editing.view,o=n.toModelElement(t);if(o)return o;const i=r.createPositionBefore(t),a=n.findMappedViewAncestor(i);return n.toModelElement(a)}(e,n),l=a?o.toModelPosition(a):null;return l?(i=function(e,t,n){const r=e.model;if(!r.schema.checkChild(n,"$block"))return null;const o=r.createPositionAt(n,0),i=t.path.slice(0,o.path.length),a=r.createPositionFromPath(t.root,i).nodeAfter;return a&&r.schema.isObject(a)?r.createRangeOn(a):null}(e,l,s),i||(i=r.schema.getNearestSelectionRange(l,Dr?"forward":"backward"),i||function(e,t){const n=e.model;for(;t;){if(n.schema.isObject(t))return n.createRangeOn(t);t=t.parent}}(e,l.parent))):function(e,t){const n=e.model,r=n.schema,o=n.createPositionAt(t,0);return r.getNearestSelectionRange(o,"forward")}(e,s)}function eu(e){return Dr?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function tu(e,t){let n;function r(...o){r.cancel(),n=setTimeout(()=>e(...o),t)}return r.cancel=()=>{clearTimeout(n)},r}function nu(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(Ld);if(Ld(e))return e;const t=e.findAncestor(e=>Ld(e)||e.is("editableElement"));return Ld(t)?t:null}class ru extends Ye{static get pluginName(){return"PastePlainText"}static get requires(){return[hd]}init(){const e=this.editor,t=e.model,n=e.editing.view,r=n.document,o=t.document.selection;let i=!1;n.addObserver(pd),this.listenTo(r,"keydown",(e,t)=>{i=t.shiftKey}),e.plugins.get(hd).on("contentInsertion",(e,n)=>{(i||function(e,t){if(e.childCount>1)return!1;const n=e.getChild(0);return!t.isObject(n)&&0==[...n.getAttributeKeys()].length}(n.content,t.schema))&&t.change(e=>{const r=Array.from(o.getAttributes()).filter(([e])=>t.schema.getAttributeProperties(e).isFormatting);o.isCollapsed||t.deleteContent(o,{doNotAutoparagraph:!0}),r.push(...o.getAttributes());const i=e.createRangeIn(n.content);for(const t of i.getItems())t.is("$textProxy")&&e.setAttributes(r,t)})})}}class ou extends Ye{static get pluginName(){return"Clipboard"}static get requires(){return[hd,Zd,ru]}}class iu extends He{execute(){const e=this.editor.model,t=e.document;e.change(n=>{!function(e,t,n){const r=n.isCollapsed,o=n.getFirstRange(),i=o.start.parent,a=o.end.parent,s=i==a;if(r){const r=fd(e.schema,n.getAttributes());au(e,t,o.end),t.removeSelectionAttribute(n.getAttributeKeys()),t.setSelectionAttribute(r)}else{const r=!(o.start.isAtStart&&o.end.isAtEnd);e.deleteContent(n,{leaveUnmerged:r}),s?au(e,t,n.focus):r&&t.setSelection(a,0)}}(e,n,t.selection),this.fire("afterExecute",{writer:n})})}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const n=t.anchor;if(!n||!e.checkChild(n,"softBreak"))return!1;const r=t.getFirstRange(),o=r.start.parent,i=r.end.parent;return!su(o,e)&&!su(i,e)||o===i}(e.schema,t.selection)}}function au(e,t,n){const r=t.createElement("softBreak");e.insertContent(r,n),t.setSelection(r,"after")}function su(e,t){return!e.is("rootElement")&&(t.isLimit(e)||su(e.parent,t))}class lu extends Ye{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,n=e.conversion,r=e.editing.view,o=r.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),r.addObserver(vd),e.commands.add("shiftEnter",new iu(e)),this.listenTo(o,"enter",(t,n)=>{n.preventDefault(),n.isSoft&&(e.execute("shiftEnter"),r.scrollToTheSelection())},{priority:"low"})}}class cu extends He{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let n=e.schema.getLimitElement(t);if(t.containsEntireContent(n)||!du(e.schema,n))do{if(n=n.parent,!n)return}while(!du(e.schema,n));e.change(e=>{e.setSelection(n,"in")})}}function du(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const uu=zr("Ctrl+A");class pu extends Ye{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new cu(e)),this.listenTo(t,"keydown",(t,n)=>{Yr(n)===uu&&(e.execute("selectAll"),n.preventDefault())})}}class mu extends Ye{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",t=>{const n=e.commands.get("selectAll"),r=new Zl(t),o=t.t;return r.set({label:o("Select all"),icon:'',keystroke:"Ctrl+A",tooltip:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",()=>{e.execute("selectAll"),e.editing.view.focus()}),r})}}class hu extends Ye{static get requires(){return[pu,mu]}static get pluginName(){return"SelectAll"}}class fu extends He{constructor(e,t){super(e),this._buffer=new _d(e.model,t),this._batches=new WeakSet}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,n=t.document,r=e.text||"",o=r.length,i=e.range?t.createSelection(e.range):n.selection,a=e.resultRange;t.enqueueChange(this._buffer.batch,e=>{this._buffer.lock(),this._batches.add(this._buffer.batch),t.deleteContent(i),r&&t.insertContent(e.createText(r,n.selection.getAttributes()),i),a?e.setSelection(a):i.is("documentSelection")||e.setSelection(i),this._buffer.unlock(),this._buffer.input(o)})}}class gu{constructor(e){this.editor=e,this.editing=this.editor.editing}handle(e,t){if(function(e){if(0==e.length)return!1;for(const t of e)if("children"===t.type&&!kd(t))return!0;return!1}(e))this._handleContainerChildrenMutations(e,t);else for(const n of e)this._handleTextMutation(n,t),this._handleTextNodeInsertion(n)}_handleContainerChildrenMutations(e,t){const n=function(e){const t=e.map(e=>e.node).reduce((e,t)=>e.getCommonAncestor(t,{includeSelf:!0}));if(t)return t.getAncestors({includeSelf:!0,parentFirst:!0}).find(e=>e.is("containerElement")||e.is("rootElement"))}(e);if(!n)return;const r=this.editor.editing.view.domConverter.mapViewToDom(n),o=new Lo(this.editor.editing.view.document),i=this.editor.data.toModel(o.domToView(r)).getChild(0),a=this.editor.editing.mapper.toModelElement(n);if(!a)return;const s=Array.from(i.getChildren()),l=Array.from(a.getChildren()),c=s[s.length-1],d=l[l.length-1],u=c&&c.is("element","softBreak"),p=d&&!d.is("element","softBreak");u&&p&&s.pop();const m=this.editor.model.schema;if(!bu(s,m)||!bu(l,m))return;const h=s.map(e=>e.is("$text")?e.data:"@").join("").replace(/\u00A0/g," "),f=l.map(e=>e.is("$text")?e.data:"@").join("").replace(/\u00A0/g," ");if(f===h)return;const g=bo(f,h),{firstChangeAt:b,insertions:v,deletions:y}=vu(g);let _=null;t&&(_=this.editing.mapper.toModelRange(t.getFirstRange()));const w=h.substr(b,v),k=this.editor.model.createRange(this.editor.model.createPositionAt(a,b),this.editor.model.createPositionAt(a,b+y));this.editor.execute("input",{text:w,range:k,resultRange:_})}_handleTextMutation(e,t){if("text"!=e.type)return;const n=e.newText.replace(/\u00A0/g," "),r=e.oldText.replace(/\u00A0/g," ");if(r===n)return;const o=bo(r,n),{firstChangeAt:i,insertions:a,deletions:s}=vu(o);let l=null;t&&(l=this.editing.mapper.toModelRange(t.getFirstRange()));const c=this.editing.view.createPositionAt(e.node,i),d=this.editing.mapper.toModelPosition(c),u=this.editor.model.createRange(d,d.getShiftedBy(s)),p=n.substr(i,a);this.editor.execute("input",{text:p,range:u,resultRange:l})}_handleTextNodeInsertion(e){if("children"!=e.type)return;const t=kd(e),n=this.editing.view.createPositionAt(e.node,t.index),r=this.editing.mapper.toModelPosition(n),o=t.values[0].data;this.editor.execute("input",{text:o.replace(/\u00A0/g," "),range:this.editor.model.createRange(r)})}}function bu(e,t){return e.every(e=>t.isInline(e))}function vu(e){let t=null,n=null;for(let r=0;r{n.deleteContent(n.document.selection)}),e.unlock()}Pr?r.document.on("beforeinput",(e,t)=>i(t),{priority:"lowest"}):r.document.on("keydown",(e,t)=>i(t),{priority:"lowest"}),r.document.on("compositionstart",function(){const e=n.document,t=1!==e.selection.rangeCount||e.selection.getFirstRange().isFlat;e.selection.isCollapsed||t||a()},{priority:"lowest"}),r.document.on("compositionend",()=>{t=n.createSelection(n.document.selection)},{priority:"lowest"})}(e),function(e){e.editing.view.document.on("mutations",(t,n,r)=>{new gu(e).handle(n,r)})}(e)}isInput(e){return this.editor.commands.get("input")._batches.has(e)}}class _u extends Ye{static get requires(){return[yu,Md]}static get pluginName(){return"Typing"}}function wu(e,t){let n=e.start;return{text:Array.from(e.getItems()).reduce((e,r)=>r.is("$text")||r.is("$textProxy")?e+r.data:(n=t.createPositionAfter(r),""),""),range:t.createRange(n,e.end)}}class ku{constructor(e,t){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()}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",(t,{directChange:n})=>{n&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this.hasMatch=!1))}),this.listenTo(e,"change:data",(e,t)=>{"transparent"!=t.type&&this._evaluateTextBeforeSelection("data",{batch:t})})}_evaluateTextBeforeSelection(e,t={}){const n=this.model,r=n.document.selection,o=n.createRange(n.createPositionAt(r.focus.parent,0),r.focus),{text:i,range:a}=wu(o,n),s=this.testCallback(i);if(!s&&this.hasMatch&&this.fire("unmatched"),this.hasMatch=!!s,s){const n=Object.assign(t,{text:i,range:a});"object"==typeof s&&Object.assign(n,s),this.fire("matched:"+e,n)}}}je(ku,Pe);class xu extends Ye{static get pluginName(){return"TwoStepCaretMovement"}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,n=e.editing.view,r=e.locale,o=t.document.selection;this.listenTo(n.document,"arrowKey",(e,t)=>{if(!o.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const n=t.keyCode==Fr.arrowright,i=t.keyCode==Fr.arrowleft;if(!n&&!i)return;const a=r.contentLanguageDirection;let s=!1;s="ltr"===a&&n||"rtl"===a&&i?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===s&&e.stop()},{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(o,"change:range",(e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&Cu(o.getFirstPosition(),this.attributes)||this._restoreGravity())})}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,n=this.editor.model.document.selection,r=n.getFirstPosition();return!this._isGravityOverridden&&(!r.isAtStart||!Eu(n,t))&&(Cu(r,t)?(Mu(e),this._overrideGravity(),!0):void 0)}_handleBackwardMovement(e){const t=this.attributes,n=this.editor.model,r=n.document.selection,o=r.getFirstPosition();return this._isGravityOverridden?(Mu(e),this._restoreGravity(),Su(n,t,o),!0):o.isAtStart?!!Eu(r,t)&&(Mu(e),Su(n,t,o),!0):function(e,t){return Cu(e.getShiftedBy(-1),t)}(o,t)?o.isAtEnd&&!Eu(r,t)&&Cu(o,t)?(Mu(e),Su(n,t,o),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):void 0}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 Eu(e,t){for(const n of t)if(e.hasAttribute(n))return!0;return!1}function Su(e,t,n){const r=n.nodeBefore;e.change(e=>{r?e.setSelectionAttribute(r.getAttributes()):e.removeSelectionAttribute(t)})}function Mu(e){e.preventDefault()}function Cu(e,t){const{nodeBefore:n,nodeAfter:r}=e;for(const e of t){const t=n?n.getAttribute(e):void 0;if((r?r.getAttribute(e):void 0)!==t)return!0}return!1}var Tu=/[\\^$.*+?()[\]{}|]/g,Au=RegExp(Tu.source);const Du={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:Ru('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:Ru("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:Ru("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:Ru('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:Ru('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:Ru("'"),to:[null,"‚",null,"’"]}},Lu={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},Pu=["symbols","mathematical","typography","quotes"];function Iu(e){return"string"==typeof e?new RegExp(`(${function(e){return(e=Rn(e))&&Au.test(e)?e.replace(Tu,"\\$&"):e}(e)})$`):e}function Nu(e){return"string"==typeof e?()=>[e]:e instanceof Array?()=>e:e}function Ou(e){return(e.textNode?e.textNode:e.nodeAfter).getAttributes()}function Ru(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function Fu(e,t,n,r){return r.createRange(ju(e,t,n,!0,r),ju(e,t,n,!1,r))}function ju(e,t,n,r,o){let i=e.textNode||(r?e.nodeBefore:e.nodeAfter),a=null;for(;i&&i.getAttribute(t)==n;)a=i,i=r?i.previousSibling:i.nextSibling;return a?o.createPositionAt(a,r?"before":"after"):e}class Yu extends He{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this.listenTo(e.data,"set",(e,t)=>{t[1]={...t[1]};const n=t[1];n.batchType||(n.batchType="transparent")},{priority:"high"}),this.listenTo(e.data,"set",(e,t)=>{"transparent"===t[1].batchType&&this.clearStack()})}refresh(){this.isEnabled=this._stack.length>0}addBatch(e){const t=this.editor.model.document.selection,n={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,n){const r=this.editor.model,o=r.document,i=[],a=e.map(e=>e.getTransformedByOperations(n)),s=a.flat();for(const e of a){const t=e.filter(e=>e.root!=o.graveyard).filter(e=>!Hu(e,s));t.length&&(zu(t),i.push(t[0]))}i.length&&r.change(e=>{e.setSelection(i,{backward:t})})}_undo(e,t){const n=this.editor.model,r=n.document;this._createdBatches.add(t);const o=e.operations.slice().filter(e=>e.isDocumentOperation);o.reverse();for(const e of o){const o=e.baseVersion+1,i=Array.from(r.history.getOperations(o)),a=Zc([e.getReversed()],i,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const o of a)t.addOperation(o),n.applyOperation(o),r.history.setOperationAsUndone(e,o)}}}function zu(e){e.sort((e,t)=>e.start.isBefore(t.start)?-1:1);for(let t=1;tt!==e&&t.containsRange(e,!0))}class Bu extends Yu{execute(e=null){const t=e?this._stack.findIndex(t=>t.batch==e):this._stack.length-1,n=this._stack.splice(t,1)[0],r=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(r,()=>{this._undo(n.batch,r);const e=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,e),this.fire("revert",n.batch,r)}),this.refresh()}}class Vu extends Yu{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(t,()=>{const n=e.batch.operations[e.batch.operations.length-1].baseVersion+1,r=this.editor.model.document.history.getOperations(n);this._restoreSelection(e.selection.ranges,e.selection.isBackward,r),this._undo(e.batch,t)}),this.refresh()}}class Wu extends Ye{static get pluginName(){return"UndoEditing"}constructor(e){super(e),this._batchRegistry=new WeakSet}init(){const e=this.editor;this._undoCommand=new Bu(e),this._redoCommand=new Vu(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",(e,t)=>{const n=t[0];if(!n.isDocumentOperation)return;const r=n.batch,o=this._redoCommand._createdBatches.has(r),i=this._undoCommand._createdBatches.has(r);this._batchRegistry.has(r)||"transparent"==r.type&&!o&&!i||(o?this._undoCommand.addBatch(r):i||(this._undoCommand.addBatch(r),this._redoCommand.clearStack()),this._batchRegistry.add(r))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(e,t,n)=>{this._redoCommand.addBatch(n)}),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo")}}var Uu='',Gu='';class qu extends Ye{static get pluginName(){return"UndoUI"}init(){const e=this.editor,t=e.locale,n=e.t,r="ltr"==t.uiLanguageDirection?Uu:Gu,o="ltr"==t.uiLanguageDirection?Gu:Uu;this._addButton("undo",n("Undo"),"CTRL+Z",r),this._addButton("redo",n("Redo"),"CTRL+Y",o)}_addButton(e,t,n,r){const o=this.editor;o.ui.componentFactory.add(e,i=>{const a=o.commands.get(e),s=new Zl(i);return s.set({label:t,icon:r,keystroke:n,tooltip:!0}),s.bind("isEnabled").to(a,"isEnabled"),this.listenTo(s,"execute",()=>{o.execute(e),o.editing.view.focus()}),s})}}class Ku extends Ye{static get requires(){return[Wu,qu]}static get pluginName(){return"Undo"}}class Xu{constructor(){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((n,r)=>{t.onload=()=>{const e=t.result;this._data=e,n(e)},t.onerror=()=>{r("error")},t.onabort=()=>{r("aborted")},this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}}je(Xu,Pe);class Qu extends Ye{static get pluginName(){return"FileRepository"}static get requires(){return[kl]}init(){this.loaders=new ln,this.loaders.on("add",()=>this._updatePendingAction()),this.loaders.on("remove",()=>this._updatePendingAction()),this._loadersMap=new Map,this._pendingAction=null,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 Object(s.b)("filerepository-no-upload-adapter"),null;const t=new Ju(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 Ju?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach((e,n)=>{e===t&&this._loadersMap.delete(n)})}_updatePendingAction(){const e=this.editor.plugins.get(kl);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,n=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(n(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",n)}}else e.remove(this._pendingAction),this._pendingAction=null}}je(Qu,Pe);class Ju{constructor(e,t){this.id=i(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new Xu,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.a("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.a("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((n,r)=>{t.rejecter=r,t.isFulfilled=!1,e.then(e=>{t.isFulfilled=!0,n(e)}).catch(e=>{t.isFulfilled=!0,r(e)})}),t}}je(Ju,Pe);class Zu extends Al{constructor(e){super(e),this.buttonView=new Zl(e),this._fileInputView=new $u(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 $u extends Al{constructor(e){super(e),this.set("acceptedType"),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 ep{constructor(e,t,n){this.loader=e,this.url=t,this.t=n}upload(){return this.loader.file.then(e=>new Promise((t,n)=>{this._initRequest(),this._initListeners(t,n,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.url,!0),e.responseType="json"}_initListeners(e,t,n){const r=this.xhr,o=this.loader,i=(0,this.t)("Cannot upload file:")+` ${n.name}.`;r.addEventListener("error",()=>t(i)),r.addEventListener("abort",()=>t()),r.addEventListener("load",()=>{const n=r.response;if(!n||!n.uploaded)return t(n&&n.error&&n.error.message?n.error.message:i);e({default:n.url})}),r.upload&&r.upload.addEventListener("progress",e=>{e.lengthComputable&&(o.uploadTotal=e.total,o.uploaded=e.loaded)})}_sendRequest(e){const t=new FormData;t.append("upload",e),t.append("ckCsrfToken",function(){let e=function(e){e=e.toLowerCase();const t=document.cookie.split(";");for(const n of t){const t=n.split("=");if(decodeURIComponent(t[0].trim().toLowerCase())===e)return decodeURIComponent(t[1])}return null}("ckCsrfToken");var t;return e&&40==e.length||(e=function(){let e="";const t=new Uint8Array(40);window.crypto.getRandomValues(t);for(let n=0;n.5?r.toUpperCase():r}return e}(),t=e,document.cookie=encodeURIComponent("ckCsrfToken")+"="+encodeURIComponent(t)+";path=/"),e}()),this.xhr.send(t)}}function tp(e,t,n,r){let o,i=null;"function"==typeof r?o=r:(i=e.commands.get(r),o=()=>{e.execute(r)}),e.model.document.on("change:data",(a,s)=>{if(i&&!i.isEnabled||!t.isEnabled)return;const l=Li(e.model.document.selection.getRanges());if(!l.isCollapsed)return;if("transparent"==s.type)return;const c=Array.from(e.model.document.differ.getChanges()),d=c[0];if(1!=c.length||"insert"!==d.type||"$text"!=d.name||1!=d.length)return;const u=d.position.parent;if(u.is("element","codeBlock"))return;if(u.is("element","listItem")&&"function"!=typeof r&&!["numberedList","bulletedList","todoList"].includes(r))return;if(i&&!0===i.value)return;const p=u.getChild(0),m=e.model.createRangeOn(p);if(!m.containsRange(l)&&!l.end.isEqual(m.end))return;const h=n.exec(p.data.substr(0,l.end.offset));h&&e.model.enqueueChange(t=>{const n=t.createPositionAt(u,0),r=t.createPositionAt(u,h[0].length),i=new ga(n,r);if(!1!==o({match:h})){t.remove(i);const n=e.model.document.selection.getFirstRange(),r=t.createRangeIn(u);!u.isEmpty||r.isEqual(n)||r.containsRange(n,!0)||t.remove(u)}i.detach(),e.model.enqueueChange(()=>{e.plugins.get("Delete").requestUndoOnBackspace()})})})}function np(e,t,n,r){let o,i;n instanceof RegExp?o=n:i=n,i=i||(e=>{let t;const n=[],r=[];for(;null!==(t=o.exec(e))&&!(t&&t.length<4);){let{index:e,1:o,2:i,3:a}=t;const s=o+i+a;e+=t[0].length-s.length;const l=[e,e+o.length],c=[e+o.length+i.length,e+o.length+i.length+a.length];n.push(l),n.push(c),r.push([e+o.length,e+o.length+i.length])}return{remove:n,format:r}}),e.model.document.on("change:data",(n,o)=>{if("transparent"==o.type||!t.isEnabled)return;const a=e.model,s=a.document.selection;if(!s.isCollapsed)return;const l=Array.from(a.document.differ.getChanges()),c=l[0];if(1!=l.length||"insert"!==c.type||"$text"!=c.name||1!=c.length)return;const d=s.focus,u=d.parent,{text:p,range:m}=function(e,t){let n=e.start;return{text:Array.from(e.getItems()).reduce((e,r)=>!r.is("$text")&&!r.is("$textProxy")||r.getAttribute("code")?(n=t.createPositionAfter(r),""):e+r.data,""),range:t.createRange(n,e.end)}}(a.createRange(a.createPositionAt(u,0),d),a),h=i(p),f=rp(m.start,h.format,a),g=rp(m.start,h.remove,a);f.length&&g.length&&a.enqueueChange(t=>{if(!1!==r(t,f)){for(const e of g.reverse())t.remove(e);a.enqueueChange(()=>{e.plugins.get("Delete").requestUndoOnBackspace()})}})})}function rp(e,t,n){return t.filter(e=>void 0!==e[0]&&void 0!==e[1]).map(t=>n.createRange(e.getShiftedBy(t[0]),e.getShiftedBy(t[1])))}function op(e,t){return(n,r)=>{if(!e.commands.get(t).isEnabled)return!1;const o=e.model.schema.getValidRanges(r,t);for(const e of o)n.setAttribute(t,!0,e);n.removeSelectionAttribute(t)}}class ip extends He{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,n=t.document.selection,r=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{if(n.isCollapsed)r?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const o=t.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const t of o)r?e.setAttribute(this.attributeKey,r,t):e.removeAttribute(this.attributeKey,t)}})}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,n=e.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(const e of n.getRanges())for(const n of e.getItems())if(t.checkAttribute(n,this.attributeKey))return n.hasAttribute(this.attributeKey);return!1}}class ap extends Ye{static get pluginName(){return"BoldEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"bold"}),e.model.schema.setAttributeProperties("bold",{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:"bold",view:"strong",upcastAlso:["b",e=>{const t=e.getStyle("font-weight");return t?"bold"==t||Number(t)>=600?{name:!0,styles:["font-weight"]}:void 0:null}]}),e.commands.add("bold",new ip(e,"bold")),e.keystrokes.set("CTRL+B","bold")}}class sp extends Ye{static get pluginName(){return"BoldUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("bold",n=>{const r=e.commands.get("bold"),o=new Zl(n);return o.set({label:t("Bold"),icon:'',keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(o,"execute",()=>{e.execute("bold"),e.editing.view.focus()}),o})}}class lp extends Ye{static get pluginName(){return"ItalicEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"italic"}),e.model.schema.setAttributeProperties("italic",{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:"italic",view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add("italic",new ip(e,"italic")),e.keystrokes.set("CTRL+I","italic")}}class cp extends Ye{static get pluginName(){return"ItalicUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("italic",n=>{const r=e.commands.get("italic"),o=new Zl(n);return o.set({label:t("Italic"),icon:'',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(o,"execute",()=>{e.execute("italic"),e.editing.view.focus()}),o})}}class dp extends He{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,n=t.schema,r=t.document.selection,o=Array.from(r.getSelectedBlocks()),i=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{if(i){const t=o.filter(e=>up(e)||mp(n,e));this._applyQuote(e,t)}else this._removeQuote(e,o.filter(up))})}_getValue(){const e=Li(this.editor.model.document.selection.getSelectedBlocks());return!(!e||!up(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,n=Li(e.getSelectedBlocks());return!!n&&mp(t,n)}_removeQuote(e,t){pp(e,t).reverse().forEach(t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const n=e.createPositionBefore(t.start.parent);return void e.move(t,n)}t.end.isAtEnd||e.split(t.end);const n=e.createPositionAfter(t.end.parent);e.move(t,n)})}_applyQuote(e,t){const n=[];pp(e,t).reverse().forEach(t=>{let r=up(t.start);r||(r=e.createElement("blockQuote"),e.wrap(t,r)),n.push(r)}),n.reverse().reduce((t,n)=>t.nextSibling==n?(e.merge(e.createPositionAfter(t)),t):n)}}function up(e){return"blockQuote"==e.parent.name?e.parent:null}function pp(e,t){let n,r=0;const o=[];for(;r{const r=e.model.document.differ.getChanges();for(const e of r)if("insert"==e.type){const r=e.position.nodeAfter;if(!r)continue;if(r.is("element","blockQuote")&&r.isEmpty)return n.remove(r),!0;if(r.is("element","blockQuote")&&!t.checkChild(e.position,r))return n.unwrap(r),!0;if(r.is("element")){const e=n.createRangeIn(r);for(const r of e.getItems())if(r.is("element","blockQuote")&&!t.checkChild(n.createPositionBefore(r),r))return n.unwrap(r),!0}}else if("remove"==e.type){const t=e.position.parent;if(t.is("element","blockQuote")&&t.isEmpty)return n.remove(t),!0}return!1});const n=this.editor.editing.view.document,r=e.model.document.selection,o=e.commands.get("blockQuote");this.listenTo(n,"enter",(t,n)=>{r.isCollapsed&&o.value&&r.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),n.preventDefault(),t.stop())},{context:"blockquote"}),this.listenTo(n,"delete",(t,n)=>{if("backward"!=n.direction||!r.isCollapsed||!o.value)return;const i=r.getLastPosition().parent;i.isEmpty&&!i.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),n.preventDefault(),t.stop())},{context:"blockquote"})}}n(71);class fp extends Ye{static get pluginName(){return"BlockQuoteUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("blockQuote",n=>{const r=e.commands.get("blockQuote"),o=new Zl(n);return o.set({label:t("Block quote"),icon:El.quote,tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(o,"execute",()=>{e.execute("blockQuote"),e.editing.view.focus()}),o})}}class gp extends Ye{static get pluginName(){return"CKFinderUI"}init(){const e=this.editor,t=e.ui.componentFactory,n=e.t;t.add("ckfinder",t=>{const r=e.commands.get("ckfinder"),o=new Zl(t);return o.set({label:n("Insert image or file"),icon:'',tooltip:!0}),o.bind("isEnabled").to(r),o.on("execute",()=>{e.execute("ckfinder"),e.editing.view.focus()}),o})}}class bp extends He{constructor(e){super(e),this.stopListening(this.editor.model.document,"change"),this.listenTo(this.editor.model.document,"change",()=>this.refresh(),{priority:"low"})}refresh(){const e=this.editor.commands.get("insertImage"),t=this.editor.commands.get("link");this.isEnabled=e.isEnabled||t.isEnabled}execute(){const e=this.editor,t=this.editor.config.get("ckfinder.openerMethod")||"modal";if("popup"!=t&&"modal"!=t)throw new s.a("ckfinder-unknown-openermethod",e);const n=this.editor.config.get("ckfinder.options")||{};n.chooseFiles=!0;const r=n.onInit;n.language||(n.language=e.locale.uiLanguage),n.onInit=t=>{r&&r(t),t.on("files:choose",n=>{const r=n.data.files.toArray(),o=r.filter(e=>!e.isImage()),i=r.filter(e=>e.isImage());for(const t of o)e.execute("link",t.getUrl());const a=[];for(const e of i){const n=e.getUrl();a.push(n||t.request("file:getProxyUrl",{file:e}))}a.length&&vp(e,a)}),t.on("file:choose:resizedImage",t=>{const n=t.data.resizedUrl;if(n)vp(e,[n]);else{const t=e.plugins.get("Notification"),n=e.locale.t;t.showWarning(n("Could not obtain resized image URL."),{title:n("Selecting resized image failed"),namespace:"ckfinder"})}})},window.CKFinder[t](n)}}function vp(e,t){if(e.commands.get("insertImage").isEnabled)e.execute("insertImage",{source:t});else{const t=e.plugins.get("Notification"),n=e.locale.t;t.showWarning(n("Could not insert image at the current position."),{title:n("Inserting image failed"),namespace:"ckfinder"})}}class yp extends Ye{static get pluginName(){return"CKFinderEditing"}static get requires(){return[Lc,"LinkEditing"]}init(){const e=this.editor;if(!e.plugins.has("ImageBlockEditing")&&!e.plugins.has("ImageInlineEditing"))throw new s.a("ckfinder-missing-image-plugin",e);e.commands.add("ckfinder",new bp(e))}}class _p extends Ye{static get pluginName(){return"CloudServicesUploadAdapter"}static get requires(){return["CloudServices",Qu]}init(){const e=this.editor,t=e.plugins.get("CloudServices"),n=t.token,r=t.uploadUrl;n&&(this._uploadGateway=e.plugins.get("CloudServicesCore").createUploadGateway(n,r),e.plugins.get(Qu).createUploadAdapter=e=>new wp(this._uploadGateway,e))}}class wp{constructor(e,t){this.uploadGateway=e,this.loader=t}upload(){return this.loader.file.then(e=>(this.fileUploader=this.uploadGateway.upload(e),this.fileUploader.on("progress",(e,t)=>{this.loader.uploadTotal=t.total,this.loader.uploaded=t.uploaded}),this.fileUploader.send()))}abort(){this.fileUploader.abort()}}class kp extends He{refresh(){const e=this.editor.model,t=Li(e.document.selection.getSelectedBlocks());this.value=!!t&&t.is("element","paragraph"),this.isEnabled=!!t&&xp(t,e.schema)}execute(e={}){const t=this.editor.model,n=t.document;t.change(r=>{const o=(e.selection||n.selection).getSelectedBlocks();for(const e of o)!e.is("element","paragraph")&&xp(e,t.schema)&&r.rename(e,"paragraph")})}}function xp(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class Ep extends He{execute(e){const t=this.editor.model;let n=e.position;t.change(e=>{const r=e.createElement("paragraph");if(!t.schema.checkChild(n.parent,r)){const o=t.schema.findAllowedParent(n,r);if(!o)return;n=e.split(n,o).position}t.insertContent(r,n),e.setSelection(r,"in")})}}class Sp extends Ye{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new kp(e)),e.commands.add("insertParagraph",new Ep(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>Sp.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}Sp.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);class Mp extends He{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=Li(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some(t=>Cp(e,t,this.editor.model.schema))}execute(e){const t=this.editor.model,n=t.document,r=e.value;t.change(e=>{const o=Array.from(n.selection.getSelectedBlocks()).filter(e=>Cp(e,r,t.schema));for(const t of o)t.is("element",r)||e.rename(t,r)})}}function Cp(e,t,n){return n.checkChild(e.parent,t)&&!n.isObject(e)}class Tp extends Ye{static get pluginName(){return"HeadingEditing"}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[Sp]}init(){const e=this.editor,t=e.config.get("heading.options"),n=[];for(const r of t)"paragraph"!==r.model&&(e.model.schema.register(r.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(r),n.push(r.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new Mp(e,n))}afterInit(){const e=this.editor,t=e.commands.get("enter"),n=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",(t,r)=>{const o=e.model.document.selection.getFirstPosition().parent;n.some(e=>o.is("element",e.model))&&!o.is("element","paragraph")&&0===o.childCount&&r.writer.rename(o,"paragraph")})}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:a.get("low")+1})}}n(13);class Ap extends Ye{static get pluginName(){return"HeadingUI"}init(){const e=this.editor,t=e.t,n=function(e){const t=e.t,n={Paragraph:t("Paragraph"),"Heading 1":t("Heading 1"),"Heading 2":t("Heading 2"),"Heading 3":t("Heading 3"),"Heading 4":t("Heading 4"),"Heading 5":t("Heading 5"),"Heading 6":t("Heading 6")};return e.config.get("heading.options").map(e=>{const t=n[e.title];return t&&t!=e.title&&(e.title=t),e})}(e),r=t("Choose heading"),o=t("Heading");e.ui.componentFactory.add("heading",t=>{const i={},a=new ln,s=e.commands.get("heading"),l=e.commands.get("paragraph"),c=[s];for(const e of n){const t={type:"button",model:new Pc({label:e.title,class:e.class,withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(l,"value"),t.model.set("commandName","paragraph"),c.push(l)):(t.model.bind("isOn").to(s,"value",t=>t===e.model),t.model.set({commandName:"heading",commandValue:e.model})),a.add(t),i[e.model]=e.title}const d=_c(t);return kc(d,a),d.buttonView.set({isOn:!1,withText:!0,tooltip:o}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(c,"isEnabled",(...e)=>e.some(e=>e)),d.buttonView.bind("label").to(s,"value",l,"value",(e,t)=>{const n=e||t&&"paragraph";return i[n]?i[n]:r}),this.listenTo(d,"execute",t=>{e.execute(t.source.commandName,t.source.commandValue?{value:t.source.commandValue}:void 0),e.editing.view.focus()}),d})}}class Dp extends Ye{static get requires(){return[jc]}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||!Ld(t))})(e.editing.view.document.selection)&&t.stop()},{priority:"high"})}this._toolbarDefinitions=new Map,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:n,getRelatedElement:r,balloonClassName:o="ck-toolbar-container"}){if(!n.length)return void Object(s.b)("widget-toolbar-no-items",{toolbarId:e});const i=this.editor,a=i.t,l=new mc(i.locale);if(l.ariaLabel=t||a("Widget toolbar"),this._toolbarDefinitions.has(e))throw new s.a("widget-toolbar-duplicated",this,{toolbarId:e});l.fillFromConfig(n,i.ui.componentFactory),this._toolbarDefinitions.set(e,{view:l,getRelatedElement:r,balloonClassName:o})}_updateToolbarsVisibility(){let e=0,t=null,n=null;for(const r of this._toolbarDefinitions.values()){const o=r.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&o)if(this.editor.ui.focusTracker.isFocused){const i=o.getAncestors().length;i>e&&(e=i,t=o,n=r)}else this._isToolbarVisible(r)&&this._hideToolbar(r);else this._isToolbarInBalloon(r)&&this._hideToolbar(r)}n&&this._showToolbar(n,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?Lp(this.editor,t):this._isToolbarInBalloon(e)||(this._balloon.add({view:e.view,position:Pp(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);Lp(this.editor,t)}}))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function Lp(e,t){const n=e.plugins.get("ContextualBalloon"),r=Pp(e,t);n.updatePosition(r)}function Pp(e,t){const n=e.editing.view,r=Oc.defaultPositions;return{target:n.domConverter.mapViewToDom(t),positions:[r.northArrowSouth,r.northArrowSouthWest,r.northArrowSouthEast,r.southArrowNorth,r.southArrowNorthWest,r.southArrowNorthEast,r.viewportStickyNorth]}}class Ip{constructor(e){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}begin(e,t,n){const r=new Si(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const n of t)if(e.classList.contains("ck-widget__resizer__handle-"+n))return n}(e),this._referenceCoordinates=function(e,t){const n=new Si(e),r=t.split("-"),o={x:"right"==r[1]?n.right:n.left,y:"bottom"==r[0]?n.bottom:n.top};return o.x+=e.ownerDocument.defaultView.scrollX,o.y+=e.ownerDocument.defaultView.scrollY,o}(t,function(e){const t=e.split("-"),n={top:"bottom",bottom:"top",left:"right",right:"left"};return`${n[t[0]]}-${n[t[1]]}`}(this.activeHandlePosition)),this.originalWidth=r.width,this.originalHeight=r.height,this.aspectRatio=r.width/r.height;const o=n.style.width;o&&o.match(/^\d+(\.\d*)?%$/)?this.originalWidthPercents=parseFloat(o):this.originalWidthPercents=function(e,t){const n=e.parentElement,r=parseFloat(n.ownerDocument.defaultView.getComputedStyle(n).width);return t.width/r*100}(n,r)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}je(Ip,Pe);class Np extends Al{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,n,r)=>"px"===e.unit?`${t}×${n}`:r+"%"),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",(e,t,n)=>t<50||n<50?"above-center":e)}_dismiss(){this.unbind(),this._isVisible=!1}}class Op{constructor(e){this._options=e,this._viewResizerWrapper=null,this.set("isEnabled",!0),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"}),this.on("change:isEnabled",()=>{this.isEnabled&&this.redraw()})}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change(n=>{const r=n.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},function(t){const n=this.toDomElement(t);return e._appendHandles(n),e._appendSizeUI(n),e.on("change:isEnabled",(e,t,r)=>{n.style.display=r?"":"none"}),n.style.display=e.isEnabled?"":"none",n});n.insert(n.createPositionAt(t,"end"),r),n.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=r})}begin(e){this.state=new Ip(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 n=this._options.unit||"%",r=("%"===n?t.widthPercents:t.width)+n;e.setStyle("width",r,this._options.viewElement)});const n=this._getHandleHost(),r=new Si(n);t.handleHostWidth=Math.round(r.width),t.handleHostHeight=Math.round(r.height);const o=new Si(n);t.width=Math.round(o.width),t.height=Math.round(o.height),this.redraw(r),this.state.update(t)}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(!((n=t)&&n.ownerDocument&&n.ownerDocument.contains(n)))return;var n;const r=t.parentElement,o=this._getHandleHost(),i=this._viewResizerWrapper,a=[i.getStyle("width"),i.getStyle("height"),i.getStyle("left"),i.getStyle("top")];let s;if(r.isSameNode(o)){const t=e||new Si(o);s=[t.width+"px",t.height+"px",void 0,void 0]}else s=[o.offsetWidth+"px",o.offsetHeight+"px",o.offsetLeft+"px",o.offsetTop+"px"];"same"!==gn(a,s)&&this._options.editor.editing.view.change(e=>{e.setStyle({width:s[0],height:s[1],left:s[2],top:s[3]},i)})}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,n=(o=e).pageX,r=o.pageY;var o;const i=!this._options.isCentered||this._options.isCentered(this),a={x:t._referenceCoordinates.x-(n+t.originalWidth),y:r-t.originalHeight-t._referenceCoordinates.y};i&&t.activeHandlePosition.endsWith("-right")&&(a.x=n-(t._referenceCoordinates.x+t.originalWidth)),i&&(a.x*=2);const s={width:Math.abs(t.originalWidth+a.x),height:Math.abs(t.originalHeight+a.y)};s.dominant=s.width/t.aspectRatio>s.height?"width":"height",s.max=s[s.dominant];const l={width:s.width,height:s.height};return"width"==s.dominant?l.height=l.width/t.aspectRatio:l.width=l.height*t.aspectRatio,{width:Math.round(l.width),height:Math.round(l.height),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*l.width*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 r of t)e.appendChild(new Dl({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(n=r,"ck-widget__resizer__handle-"+n)}}).render());var n}_appendSizeUI(e){this._sizeView=new Np,this._sizeView.render(),e.appendChild(this._sizeView.element)}}je(Op,Pe),n(74),je(class extends Ye{static get pluginName(){return"WidgetResize"}init(){const e=this.editor.editing,t=So.window.document;this.set("visibleResizer",null),this.set("_activeResizer",null),this._resizers=new Map,e.view.addObserver(ad),this._observer=Object.create(Oo),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));const n=()=>{this.visibleResizer&&this.visibleResizer.redraw()};this._redrawFocusedResizerThrottled=Jd(n,200),this.on("change:visibleResizer",n),this.editor.ui.on("update",this._redrawFocusedResizerThrottled),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(So.window,"resize",this._redrawFocusedResizerThrottled);const r=this.editor.editing.view.document.selection;r.on("change",()=>{const e=r.getSelectedElement();this.visibleResizer=this.getResizerByViewElement(e)||null})}destroy(){this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawFocusedResizerThrottled.cancel()}attachTo(e){const t=new Op(e),n=this.editor.plugins;if(t.attach(),n.has("WidgetToolbarRepository")){const e=n.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 r=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(r)==t&&(this.visibleResizer=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 n=t.domTarget;Op.isResizeHandle(n)&&(this._activeResizer=this._getResizerByHandle(n),this._activeResizer&&(this._activeResizer.begin(n),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}},Pe);class Rp extends He{refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor,n=t.plugins.get("ImageUtils"),r=t.model,o=n.getClosestSelectedImageElement(r.document.selection);r.change(t=>{t.setAttribute("alt",e.newValue,o)})}}function Fp(e,t){const n=e.createEmptyElement("img"),r="imageBlock"===t?e.createContainerElement("figure",{class:"image"}):e.createContainerElement("span",{class:"image-inline"},{isAllowedInsideAttributeElement:!0});return e.insert(e.createPositionAt(r,0),n),r}function jp(e,t){if(e.plugins.has("ImageInlineEditing")!==e.plugins.has("ImageBlockEditing"))return{name:"img"};const n=e.plugins.get("ImageUtils");return e=>n.isInlineImageView(e)?(e.findAncestor(n.isBlockImageView)?"imageBlock":"imageInline")!==t?null:{name:!0}:null}function Yp(e,t){const n=Li(t.getSelectedBlocks());return!n||e.isObject(n)||n.isEmpty&&"listItem"!=n.name?"imageBlock":"imageInline"}class zp extends Ye{static get pluginName(){return"ImageUtils"}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(e={},t=null,n=null){const r=this.editor,o=r.model,i=o.document.selection;n=Hp(r,t||i,n),e={...Object.fromEntries(i.getAttributes()),...e};for(const t in e)o.schema.checkAttribute(n,t)||delete e[t];return o.change(r=>{const a=r.createElement(n,e);return t||"imageInline"==n||(t=jd(i,o)),o.insertContent(a,t),a.parent?(r.setSelection(a,"on"),a):null})}getClosestSelectedImageWidget(e){const t=e.getSelectedElement();if(t&&this.isImageWidget(t))return t;let n=e.getFirstPosition().parent;for(;n;){if(n.is("element")&&this.isImageWidget(n))return n;n=n.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}isImageAllowed(){const e=this.editor.model.document.selection;return function(e,t){if("imageBlock"==Hp(e,t)){const n=function(e,t){const n=jd(e,t).start.parent;return n.isEmpty&&!n.is("element","$root")?n.parent:n}(t,e.model);if(e.model.schema.checkChild(n,"imageBlock"))return!0}else if(e.model.schema.checkChild(t.focus,"imageInline"))return!0;return!1}(this.editor,e)&&function(e){return[...e.focus.getAncestors()].every(e=>!e.is("element","imageBlock"))}(e)}toImageWidget(e,t,n){return t.setCustomProperty("image",!0,e),Pd(e,t,{label:()=>{const t=this.findViewImgElement(e).getAttribute("alt");return t?`${t} ${n}`:n}})}isImageWidget(e){return!!e.getCustomProperty("image")&&Ld(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const t=this.editor.editing.view;for(const{item:n}of t.createRangeIn(e))if(this.isInlineImageView(n))return n}}function Hp(e,t,n){const r=e.model.schema,o=e.config.get("image.insert.type");return e.plugins.has("ImageBlockEditing")?e.plugins.has("ImageInlineEditing")?n||("inline"===o?"imageInline":"block"===o?"imageBlock":t.is("selection")?Yp(r,t):r.checkChild(t,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}class Bp extends Ye{static get requires(){return[zp]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new Rp(this.editor))}}n(76),n(7);class Vp extends Al{constructor(e){super(e);const t=this.locale.t;this.focusTracker=new Pi,this.keystrokes=new Ii,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("Save"),El.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("Cancel"),El.cancel,"ck-button-cancel","cancel"),this._focusables=new Tl,this._focusCycler=new ec({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]}),Ml(this)}render(){super.render(),this.keystrokes.listenTo(this.element),Cl({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(e,t,n,r){const o=new Zl(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),r&&o.delegate("execute").to(this,r),o}_createLabeledInputView(){const e=this.locale.t,t=new Ac(this.locale,Dc);return t.label=e("Text alternative"),t}}function Wp(e){const t=e.editing.view,n=Oc.defaultPositions,r=e.plugins.get("ImageUtils");return{target:t.domConverter.viewToDom(r.getClosestSelectedImageWidget(t.document.selection)),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class Up extends Ye{static get requires(){return[jc]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton(),this._createForm()}destroy(){super.destroy(),this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",n=>{const r=e.commands.get("imageTextAlternative"),o=new Zl(n);return o.set({label:t("Change image text alternative"),icon:El.lowVision,tooltip:!0}),o.bind("isEnabled").to(r,"isEnabled"),this.listenTo(o,"execute",()=>{this._showForm()}),o})}_createForm(){const e=this.editor,t=e.editing.view.document,n=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new Vp(e.locale),this._form.render(),this.listenTo(this._form,"submit",()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),this._form.keystrokes.set("Esc",(e,t)=>{this._hideForm(!0),t()}),this.listenTo(e.ui,"update",()=>{n.getClosestSelectedImageWidget(t.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(e.plugins.get("ImageUtils").getClosestSelectedImageWidget(e.editing.view.document.selection)){const n=Wp(e);t.updatePosition(n)}}(e):this._hideForm(!0)}),Sl({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;const e=this.editor,t=e.commands.get("imageTextAlternative"),n=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:Wp(e)}),n.fieldView.value=n.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView===this._form}get _isInBalloon(){return this._balloon.hasView(this._form)}}class Gp extends Ye{static get requires(){return[Bp,Up]}static get pluginName(){return"ImageTextAlternative"}}function qp(e,t){return e=>{e.on("attribute:srcset:"+t,n)};function n(t,n,r){if(!r.consumable.consume(n.item,t.name))return;const o=r.writer,i=r.mapper.toViewElement(n.item),a=e.findViewImgElement(i);if(null===n.attributeNewValue){const e=n.attributeOldValue;e.data&&(o.removeAttribute("srcset",a),o.removeAttribute("sizes",a),e.width&&o.removeAttribute("width",a))}else{const e=n.attributeNewValue;e.data&&(o.setAttribute("srcset",e.data,a),o.setAttribute("sizes","100vw",a),e.width&&o.setAttribute("width",e.width,a))}}}function Kp(e,t,n){return e=>{e.on(`attribute:${n}:${t}`,r)};function r(t,n,r){if(!r.consumable.consume(n.item,t.name))return;const o=r.writer,i=r.mapper.toViewElement(n.item),a=e.findViewImgElement(i);o.setAttribute(n.attributeKey,n.attributeNewValue||"",a)}}class Xp extends jo{observe(e){this.listenTo(e,"load",(e,t)=>{const n=t.target;this.checkShouldIgnoreEventFromTarget(n)||"IMG"==n.tagName&&this._fireEvents(t)},{useCapture:!0})}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class Qp extends He{constructor(e){super(e);const t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||"block"===t&&Object(s.b)("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||"inline"===t&&Object(s.b)("image-inline-plugin-required")}refresh(){this.isEnabled=this.editor.plugins.get("ImageUtils").isImageAllowed()}execute(e){const t=dn(e.source),n=this.editor.model.document.selection,r=this.editor.plugins.get("ImageUtils"),o=Object.fromEntries(n.getAttributes());t.forEach((e,t)=>{const i=n.getSelectedElement();if("string"==typeof e&&(e={src:e}),t&&i&&r.isImage(i)){const t=this.editor.model.createPositionAfter(i);r.insertImage({...e,...o},t)}else r.insertImage({...e,...o})})}}class Jp extends Ye{static get requires(){return[zp]}static get pluginName(){return"ImageEditing"}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(Xp),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:e=>{const t={data:e.getAttribute("srcset")};return e.hasAttribute("width")&&(t.width=e.getAttribute("width")),t}}});const n=new Qp(e);e.commands.add("insertImage",n),e.commands.add("imageInsert",n)}}class Zp extends He{constructor(e,t){super(e),this._modelElementName=t}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=e.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=e.isInlineImage(t):this.isEnabled=e.isBlockImage(t)}execute(){const e=this.editor,t=this.editor.model,n=e.plugins.get("ImageUtils"),r=n.getClosestSelectedImageElement(t.document.selection),o=Object.fromEntries(r.getAttributes());return o.src||o.uploadId?t.change(e=>{const i=Array.from(t.markers).filter(e=>e.getRange().containsItem(r)),a=n.insertImage(o,t.createSelection(r,"on"),this._modelElementName);if(!a)return null;const s=e.createRangeOn(a);for(const t of i){const n=t.getRange(),r="$graveyard"!=n.root.rootName?n.getJoined(s,!0):s;e.updateMarker(t,{range:r})}return{oldElement:r,newElement:a}}):null}}class $p extends Ye{static get requires(){return[Jp,zp,hd]}static get pluginName(){return"ImageBlockEditing"}init(){const e=this.editor;e.model.schema.register("imageBlock",{isObject:!0,isBlock:!0,allowWhere:"$block",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new Zp(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,n=e.conversion,r=e.plugins.get("ImageUtils");n.for("dataDowncast").elementToElement({model:"imageBlock",view:(e,{writer:t})=>Fp(t,"imageBlock")}),n.for("editingDowncast").elementToElement({model:"imageBlock",view:(e,{writer:n})=>r.toImageWidget(Fp(n,"imageBlock"),n,t("image widget"))}),n.for("downcast").add(Kp(r,"imageBlock","src")).add(Kp(r,"imageBlock","alt")).add(qp(r,"imageBlock")),n.for("upcast").elementToElement({view:jp(e,"imageBlock"),model:(e,{writer:t})=>t.createElement("imageBlock",e.hasAttribute("src")?{src:e.getAttribute("src")}:null)}).add(function(e){return e=>{e.on("element:figure",t)};function t(t,n,r){if(!r.consumable.test(n.viewItem,{name:!0,classes:"image"}))return;const o=e.findViewImgElement(n.viewItem);if(!o||!r.consumable.test(o,{name:!0}))return;r.consumable.consume(n.viewItem,{name:!0,classes:"image"});const i=Li(r.convertItem(o,n.modelCursor).modelRange.getItems());i?(r.convertChildren(n.viewItem,i),r.updateConversionResult(i,n)):r.consumable.revert(n.viewItem,{name:!0,classes:"image"})}}(r))}_setupClipboardIntegration(){const e=this.editor,t=e.model,n=e.editing.view,r=e.plugins.get("ImageUtils");this.listenTo(e.plugins.get("ClipboardPipeline"),"inputTransformation",(o,i)=>{const a=Array.from(i.content.getChildren());let s;if(!a.every(r.isInlineImageView))return;s=i.targetRanges?e.editing.mapper.toModelRange(i.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(s);if("imageBlock"===Yp(t.schema,l)){const e=new sd(n.document),t=a.map(t=>e.createElement("figure",{class:"image"},t));i.content=e.createDocumentFragment(t)}})}}n(11);class em extends Ye{static get requires(){return[$p,Xd,Gp]}static get pluginName(){return"ImageBlock"}}class tm extends Ye{static get requires(){return[Jp,zp,hd]}static get pluginName(){return"ImageInlineEditing"}init(){const e=this.editor,t=e.model.schema;t.register("imageInline",{isObject:!0,isInline:!0,allowWhere:"$text",allowAttributesOf:"$text",allowAttributes:["alt","src","srcset"]}),t.addChildCheck((e,t)=>{if(e.endsWith("caption")&&"imageInline"===t.name)return!1}),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new Zp(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,n=e.conversion,r=e.plugins.get("ImageUtils");n.for("dataDowncast").elementToElement({model:"imageInline",view:(e,{writer:t})=>t.createEmptyElement("img")}),n.for("editingDowncast").elementToElement({model:"imageInline",view:(e,{writer:n})=>r.toImageWidget(Fp(n,"imageInline"),n,t("image widget"))}),n.for("downcast").add(Kp(r,"imageInline","src")).add(Kp(r,"imageInline","alt")).add(qp(r,"imageInline")),n.for("upcast").elementToElement({view:jp(e,"imageInline"),model:(e,{writer:t})=>t.createElement("imageInline",e.hasAttribute("src")?{src:e.getAttribute("src")}:null)})}_setupClipboardIntegration(){const e=this.editor,t=e.model,n=e.editing.view,r=e.plugins.get("ImageUtils");this.listenTo(e.plugins.get("ClipboardPipeline"),"inputTransformation",(o,i)=>{const a=Array.from(i.content.getChildren());let s;if(!a.every(r.isBlockImageView))return;s=i.targetRanges?e.editing.mapper.toModelRange(i.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(s);if("imageInline"===Yp(t.schema,l)){const e=new sd(n.document),t=a.map(t=>1===t.childCount?(Array.from(t.getAttributes()).forEach(n=>e.setAttribute(...n,r.findViewImgElement(t))),t.getChild(0)):t);i.content=e.createDocumentFragment(t)}})}}class nm extends Ye{static get requires(){return[tm,Xd,Gp]}static get pluginName(){return"ImageInline"}}function rm(e){for(const t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}function om(e,t){const n=t.getFirstPosition().findAncestor("caption");return n&&e.isBlockImage(n.parent)?n:null}class im extends He{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils");if(!e.plugins.has($p))return this.isEnabled=!1,void(this.value=!1);const n=e.model.document.selection,r=n.getSelectedElement();if(!r){const e=om(t,n);return this.isEnabled=!!e,void(this.value=!!e)}this.isEnabled=this.editor.plugins.get("ImageUtils").isImage(r),this.isEnabled?this.value=!!rm(r):this.value=!1}execute(e={}){const{focusCaptionOnShow:t}=e;this.editor.model.change(e=>{this.value?this._hideImageCaption(e):this._showImageCaption(e,t)})}_showImageCaption(e,t){const n=this.editor.model.document.selection,r=this.editor.plugins.get("ImageCaptionEditing");let o=n.getSelectedElement();const i=r._getSavedCaption(o);this.editor.plugins.get("ImageUtils").isInlineImage(o)&&(this.editor.execute("imageTypeBlock"),o=n.getSelectedElement());const a=i||e.createElement("caption");e.append(a,o),t&&e.setSelection(a,"in")}_hideImageCaption(e){const t=this.editor,n=t.model.document.selection,r=t.plugins.get("ImageCaptionEditing"),o=t.plugins.get("ImageUtils");let i,a=n.getSelectedElement();a?i=rm(a):(i=om(o,n),a=i.parent),r._saveCaption(a,i),e.setSelection(a,"on"),e.remove(i)}}class am extends Ye{static get requires(){return[zp]}static get pluginName(){return"ImageCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema;t.isRegistered("caption")?t.extend("caption",{allowIn:"imageBlock"}):t.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleImageCaption",new im(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration()}_setupConversion(){const e=this.editor,t=e.editing.view,n=e.plugins.get("ImageUtils"),r=e.t;e.conversion.for("upcast").elementToElement({view:e=>function(e,t){return"figcaption"==t.name&&e.isBlockImageView(t.parent)?{name:!0}:null}(n,e),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>n.isBlockImage(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:o})=>{if(!n.isBlockImage(e.parent))return null;const i=o.createEditableElement("figcaption");return o.setCustomProperty("imageCaption",!0,i),Wc({view:t,element:i,text:r("Enter image caption"),keepOnFocus:!0}),Fd(i,o)}}),e.editing.mapper.on("modelToViewPosition",sm(t)),e.data.mapper.on("modelToViewPosition",sm(t))}_setupImageTypeCommandsIntegration(){const e=this.editor,t=e.plugins.get("ImageUtils"),n=e.commands.get("imageTypeInline"),r=e.commands.get("imageTypeBlock"),o=e=>{if(!e.return)return;const{oldElement:n,newElement:r}=e.return;if(!n)return;if(t.isBlockImage(n)){const e=rm(n);if(e)return void this._saveCaption(r,e)}const o=this._getSavedCaption(n);o&&this._saveCaption(r,o)};n&&this.listenTo(n,"execute",o,{priority:"low"}),r&&this.listenTo(r,"execute",o,{priority:"low"})}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?Qi.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}}function sm(e){return(t,n)=>{const r=n.modelPosition,o=r.parent;if(!o.is("element","imageBlock"))return;const i=n.mapper.toViewElement(o);n.viewPosition=e.createPositionAt(i,r.offset+1)}}class lm extends Ye{static get requires(){return[zp]}static get pluginName(){return"ImageCaptionUI"}init(){const e=this.editor,t=e.editing.view,n=e.plugins.get("ImageUtils"),r=e.t;e.ui.componentFactory.add("toggleImageCaption",o=>{const i=e.commands.get("toggleImageCaption"),a=new Zl(o);return a.set({icon:El.caption,tooltip:!0,isToggleable:!0}),a.bind("isOn","isEnabled").to(i,"value","isEnabled"),a.bind("label").to(i,"value",e=>r(e?"Toggle caption off":"Toggle caption on")),this.listenTo(a,"execute",()=>{e.execute("toggleImageCaption",{focusCaptionOnShow:!0});const r=om(n,e.model.document.selection);if(r){const n=e.editing.mapper.toViewElement(r);t.scrollToTheSelection(),t.change(e=>{e.addClass("image__caption_highlighted",n)})}}),a})}}n(80);class cm extends He{constructor(e,t){super(e),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(t.map(e=>{if(e.isDefault)for(const t of e.modelElements)this._defaultStyles[t]=e.name;return[e.name,e]}))}refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?e.hasAttribute("imageStyle")?this.value=e.getAttribute("imageStyle"):this.value=this._defaultStyles[e.name]:this.value=!1}execute(e={}){const t=this.editor,n=t.model,r=t.plugins.get("ImageUtils");n.change(t=>{const o=e.value;let i=r.getClosestSelectedImageElement(n.document.selection);o&&this.shouldConvertImageType(o,i)&&(this.editor.execute(r.isBlockImage(i)?"imageTypeInline":"imageTypeBlock"),i=r.getClosestSelectedImageElement(n.document.selection)),!o||this._styles.get(o).isDefault?t.removeAttribute("imageStyle",i):t.setAttribute("imageStyle",o,i)})}shouldConvertImageType(e,t){return!this._styles.get(e).modelElements.includes(t.name)}}const{objectFullWidth:dm,objectInline:um,objectLeft:pm,objectRight:mm,objectCenter:hm,objectBlockLeft:fm,objectBlockRight:gm}=El,bm={inline:{name:"inline",title:"In line",icon:um,modelElements:["imageInline"],isDefault:!0},alignLeft:{name:"alignLeft",title:"Left aligned image",icon:pm,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"},alignBlockLeft:{name:"alignBlockLeft",title:"Left aligned image",icon:fm,modelElements:["imageBlock"],className:"image-style-block-align-left"},alignCenter:{name:"alignCenter",title:"Centered image",icon:hm,modelElements:["imageBlock"],className:"image-style-align-center"},alignRight:{name:"alignRight",title:"Right aligned image",icon:mm,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"},alignBlockRight:{name:"alignBlockRight",title:"Right aligned image",icon:gm,modelElements:["imageBlock"],className:"image-style-block-align-right"},block:{name:"block",title:"Centered image",icon:hm,modelElements:["imageBlock"],isDefault:!0},side:{name:"side",title:"Side image",icon:mm,modelElements:["imageBlock"],className:"image-style-side"}},vm={full:dm,left:fm,right:gm,center:hm,inlineLeft:pm,inlineRight:mm,inline:um},ym=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function _m(e){Object(s.b)("image-style-configuration-definition-invalid",e)}var wm={normalizeStyles:function(e){return(e.configuredStyles.options||[]).map(e=>function(e){return e="string"==typeof e?bm[e]?{...bm[e]}:{name:e}:function(e,t){const n={...t};for(const r in e)Object.prototype.hasOwnProperty.call(t,r)||(n[r]=e[r]);return n}(bm[e.name],e),"string"==typeof e.icon&&(e.icon=vm[e.icon]||e.icon),e}(e)).filter(t=>function(e,{isBlockPluginLoaded:t,isInlinePluginLoaded:n}){const{modelElements:r,name:o}=e;if(!(r&&r.length&&o))return _m({style:e}),!1;{const o=[t?"imageBlock":null,n?"imageInline":null];if(!r.some(e=>o.includes(e)))return Object(s.b)("image-style-missing-dependency",{style:e,missingPlugins:r.map(e=>"imageBlock"===e?"ImageBlockEditing":"ImageInlineEditing")}),!1}return!0}(t,e))},getDefaultStylesConfiguration:function(e,t){return e&&t?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:e?{options:["block","side"]}:t?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(e){return e.has("ImageBlockEditing")&&e.has("ImageInlineEditing")?[...ym]:[]},warnInvalidStyle:_m,DEFAULT_OPTIONS:bm,DEFAULT_ICONS:vm,DEFAULT_DROPDOWN_DEFINITIONS:ym};function km(e,t){for(const n of t)if(n.name===e)return n}class xm extends Ye{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[zp]}init(){const{normalizeStyles:e,getDefaultStylesConfiguration:t}=wm,n=this.editor,r=n.plugins.has("ImageBlockEditing"),o=n.plugins.has("ImageInlineEditing");n.config.define("image.styles",t(r,o)),this.normalizedStyles=e({configuredStyles:n.config.get("image.styles"),isBlockPluginLoaded:r,isInlinePluginLoaded:o}),this._setupConversion(r,o),this._setupPostFixer(),n.commands.add("imageStyle",new cm(n,this.normalizedStyles))}_setupConversion(e,t){const n=this.editor,r=n.model.schema,o=(i=this.normalizedStyles,(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const r=km(t.attributeNewValue,i),o=km(t.attributeOldValue,i),a=n.mapper.toViewElement(t.item),s=n.writer;o&&s.removeClass(o.className,a),r&&s.addClass(r.className,a)});var i;const a=function(e){const t={imageInline:e.filter(e=>!e.isDefault&&e.modelElements.includes("imageInline")),imageBlock:e.filter(e=>!e.isDefault&&e.modelElements.includes("imageBlock"))};return(e,n,r)=>{if(!n.modelRange)return;const o=n.viewItem,i=Li(n.modelRange.getItems());if(i&&r.schema.checkAttribute(i,"imageStyle"))for(const e of t[i.name])r.consumable.consume(o,{classes:e.className})&&r.writer.setAttribute("imageStyle",e.name,i)}}(this.normalizedStyles);n.editing.downcastDispatcher.on("attribute:imageStyle",o),n.data.downcastDispatcher.on("attribute:imageStyle",o),e&&(r.extend("imageBlock",{allowAttributes:"imageStyle"}),n.data.upcastDispatcher.on("element:figure",a,{priority:"low"})),t&&(r.extend("imageInline",{allowAttributes:"imageStyle"}),n.data.upcastDispatcher.on("element:img",a,{priority:"low"}))}_setupPostFixer(){const e=this.editor,t=e.model.document,n=e.plugins.get(zp),r=new Map(this.normalizedStyles.map(e=>[e.name,e]));t.registerPostFixer(e=>{let o=!1;for(const i of t.differ.getChanges())if("insert"==i.type||"attribute"==i.type&&"imageStyle"==i.attributeKey){let t="insert"==i.type?i.position.nodeAfter:i.range.start.nodeAfter;if(t&&t.is("element","paragraph")&&t.childCount>0&&(t=t.getChild(0)),!n.isImage(t))continue;const a=t.getAttribute("imageStyle");if(!a)continue;const s=r.get(a);s&&s.modelElements.includes(t.name)||(e.removeAttribute("imageStyle",t),o=!0)}return o})}}n(82);class Em extends Ye{static get requires(){return[xm]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Wrap text":e("Wrap text"),"Break text":e("Break text"),"In line":e("In line"),"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=this.editor.plugins,t=this.editor.config.get("image.toolbar")||[],n=Sm(e.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const e of n)this._createButton(e);const r=Sm([...t.filter(v),...wm.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles);for(const e of r)this._createDropdown(e,n)}_createDropdown(e,t){const n=this.editor.ui.componentFactory;n.add(e.name,r=>{let o;const{defaultItem:i,items:a,title:s}=e,l=a.filter(e=>t.find(({name:t})=>Mm(t)===e)).map(e=>{const t=n.create(e);return e===i&&(o=t),t});a.length!==l.length&&wm.warnInvalidStyle({dropdown:e});const c=_c(r,oc),d=c.buttonView;return wc(c,l),d.set({label:Cm(s,o.label),class:null,tooltip:!0}),d.bind("icon").toMany(l,"isOn",(...e)=>{const t=e.findIndex(q);return t<0?o.icon:l[t].icon}),d.bind("label").toMany(l,"isOn",(...e)=>{const t=e.findIndex(q);return Cm(s,t<0?o.label:l[t].label)}),d.bind("isOn").toMany(l,"isOn",(...e)=>e.some(q)),d.bind("class").toMany(l,"isOn",(...e)=>e.some(q)?"ck-splitbutton_flatten":null),d.on("execute",()=>{l.some(({isOn:e})=>e)?c.isOpen=!c.isOpen:o.fire("execute")}),c.bind("isEnabled").toMany(l,"isEnabled",(...e)=>e.some(q)),c})}_createButton(e){const t=e.name;this.editor.ui.componentFactory.add(Mm(t),n=>{const r=this.editor.commands.get("imageStyle"),o=new Zl(n);return o.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(r,"isEnabled"),o.bind("isOn").to(r,"value",e=>e===t),o.on("execute",this._executeCommand.bind(this,t)),o})}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function Sm(e,t){for(const n of e)t[n.title]&&(n.title=t[n.title]);return e}function Mm(e){return"imageStyle:"+e}function Cm(e,t){return(e?e+": ":"")+t}function Tm(e){const t=e.map(e=>e.replace("+","\\+"));return new RegExp(`^image\\/(${t.join("|")})$`)}function Am(e){return new Promise((t,n)=>{const r=e.getAttribute("src");fetch(r).then(e=>e.blob()).then(e=>{const n=Dm(e,r),o=n.replace("image/",""),i=new File([e],"image."+o,{type:n});t(i)}).catch(e=>e&&"TypeError"===e.name?function(e){return function(e){return new Promise((t,n)=>{const r=So.document.createElement("img");r.addEventListener("load",()=>{const e=So.document.createElement("canvas");e.width=r.width,e.height=r.height,e.getContext("2d").drawImage(r,0,0),e.toBlob(e=>e?t(e):n())}),r.addEventListener("error",()=>n()),r.src=e})}(e).then(t=>{const n=Dm(t,e),r=n.replace("image/","");return new File([t],"image."+r,{type:n})})}(r).then(t).catch(n):n(e))})}function Dm(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class Lm extends Ye{static get pluginName(){return"ImageUploadUI"}init(){const e=this.editor,t=e.t,n=n=>{const r=new Zu(n),o=e.commands.get("uploadImage"),i=e.config.get("image.upload.types"),a=Tm(i);return r.set({acceptedType:i.map(e=>"image/"+e).join(","),allowMultipleFiles:!0}),r.buttonView.set({label:t("Insert image"),icon:El.image,tooltip:!0}),r.buttonView.bind("isEnabled").to(o),r.on("done",(t,n)=>{const r=Array.from(n).filter(e=>a.test(e.type));r.length&&e.execute("uploadImage",{file:r})}),r};e.ui.componentFactory.add("uploadImage",n),e.ui.componentFactory.add("imageUpload",n)}}n(84),n(86),n(88);class Pm extends Ye{static get pluginName(){return"ImageUploadProgress"}constructor(e){super(e),this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",(...e)=>this.uploadStatusChange(...e)),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",(...e)=>this.uploadStatusChange(...e))}uploadStatusChange(e,t,n){const r=this.editor,o=t.item,i=o.getAttribute("uploadId");if(!n.consumable.consume(t.item,e.name))return;const a=r.plugins.get("ImageUtils"),s=r.plugins.get(Qu),l=i?t.attributeNewValue:null,c=this.placeholder,d=r.editing.mapper.toViewElement(o),u=n.writer;if("reading"==l)return Im(d,u),void Nm(a,c,d,u);if("uploading"==l){const e=s.loaders.get(i);return Im(d,u),void(e?(Om(d,u),function(e,t,n,r){const o=function(e){const t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),o),n.on("change:uploadedPercent",(e,t,n)=>{r.change(e=>{e.setStyle("width",n+"%",o)})})}(d,u,e,r.editing.view),function(e,t,n,r){if(r.data){const o=e.findViewImgElement(t);n.setAttribute("src",r.data,o)}}(a,d,u,e)):Nm(a,c,d,u))}"complete"==l&&s.loaders.get(i)&&function(e,t,n){const r=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),r),setTimeout(()=>{n.change(e=>e.remove(e.createRangeOn(r)))},3e3)}(d,u,r.editing.view),function(e,t){Fm(e,t,"progressBar")}(d,u),Om(d,u),function(e,t){t.removeClass("ck-appear",e)}(d,u)}}function Im(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function Nm(e,t,n,r){n.hasClass("ck-image-upload-placeholder")||r.addClass("ck-image-upload-placeholder",n);const o=e.findViewImgElement(n);o.getAttribute("src")!==t&&r.setAttribute("src",t,o),Rm(n,"placeholder")||r.insert(r.createPositionAfter(o),function(e){const t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(r))}function Om(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),Fm(e,t,"placeholder")}function Rm(e,t){for(const n of e.getChildren())if(n.getCustomProperty(t))return n}function Fm(e,t,n){const r=Rm(e,n);r&&t.remove(t.createRangeOn(r))}class jm extends He{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils"),n=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(n)}execute(e){const t=dn(e.file),n=this.editor.model.document.selection,r=this.editor.plugins.get("ImageUtils"),o=Object.fromEntries(n.getAttributes());t.forEach((e,t)=>{const i=n.getSelectedElement();if(t&&i&&r.isImage(i)){const t=this.editor.model.createPositionAfter(i);this._uploadImage(e,o,t)}else this._uploadImage(e,o)})}_uploadImage(e,t,n){const r=this.editor,o=r.plugins.get(Qu).createLoader(e),i=r.plugins.get("ImageUtils");o&&i.insertImage({...t,uploadId:o.id},n)}}class Ym extends Ye{static get requires(){return[Qu,Lc,hd,zp]}static get pluginName(){return"ImageUploadEditing"}constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,t=e.model.document,n=e.conversion,r=e.plugins.get(Qu),o=e.plugins.get("ImageUtils"),i=Tm(e.config.get("image.upload.types")),a=new jm(e);e.commands.add("uploadImage",a),e.commands.add("imageUpload",a),n.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(e.editing.view.document,"clipboardInput",(t,n)=>{if(r=n.dataTransfer,Array.from(r.types).includes("text/html")&&""!==r.getData("text/html"))return;var r;const o=Array.from(n.dataTransfer.files).filter(e=>!!e&&i.test(e.type));o.length&&(t.stop(),e.model.change(t=>{n.targetRanges&&t.setSelection(n.targetRanges.map(t=>e.editing.mapper.toModelRange(t))),e.model.enqueueChange("default",()=>{e.execute("uploadImage",{file:o})})}))}),this.listenTo(e.plugins.get("ClipboardPipeline"),"inputTransformation",(t,n)=>{const i=Array.from(e.editing.view.createRangeIn(n.content)).filter(e=>function(e,t){return!(!e.isInlineImageView(t)||!t.getAttribute("src"))&&(t.getAttribute("src").match(/^data:image\/\w+;base64,/g)||t.getAttribute("src").match(/^blob:/g))}(o,e.item)&&!e.item.getAttribute("uploadProcessed")).map(e=>({promise:Am(e.item),imageElement:e.item}));if(!i.length)return;const a=new sd(e.editing.view.document);for(const e of i){a.setAttribute("uploadProcessed",!0,e.imageElement);const t=r.createLoader(e.promise);t&&(a.setAttribute("src","",e.imageElement),a.setAttribute("uploadId",t.id,e.imageElement))}}),e.editing.view.document.on("dragover",(e,t)=>{t.preventDefault()}),t.on("change",()=>{const n=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),o=new Set;for(const t of n)if("insert"==t.type&&"$text"!=t.name){const n=t.position.nodeAfter,i="$graveyard"==t.position.root.rootName;for(const t of zm(e,n)){const e=t.getAttribute("uploadId");if(!e)continue;const n=r.loaders.get(e);n&&(i?o.has(e)||n.abort():(o.add(e),this._uploadImageElements.set(e,t),"idle"==n.status&&this._readAndUpload(n)))}}}),this.on("uploadComplete",(e,{imageElement:t,data:n})=>{const r=n.urls?n.urls:n;this.editor.model.change(e=>{e.setAttribute("src",r.default,t),this._parseAndSetSrcsetAttributeOnImage(r,t,e)})},{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(e){const t=this.editor,n=t.model,r=t.locale.t,o=t.plugins.get(Qu),i=t.plugins.get(Lc),a=t.plugins.get("ImageUtils"),s=this._uploadImageElements;return n.enqueueChange("transparent",t=>{t.setAttribute("uploadStatus","reading",s.get(e.id))}),e.read().then(()=>{const r=e.upload(),o=s.get(e.id);if(Lr){const e=t.editing.mapper.toViewElement(o),n=a.findViewImgElement(e);t.editing.view.once("render",()=>{if(!n.parent)return;const e=t.editing.view.domConverter.mapViewToDom(n.parent);if(!e)return;const r=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=r})}return n.enqueueChange("transparent",e=>{e.setAttribute("uploadStatus","uploading",o)}),r}).then(t=>{n.enqueueChange("transparent",n=>{const r=s.get(e.id);n.setAttribute("uploadStatus","complete",r),this.fire("uploadComplete",{data:t,imageElement:r})}),l()}).catch(t=>{if("error"!==e.status&&"aborted"!==e.status)throw t;"error"==e.status&&t&&i.showWarning(t,{title:r("Upload failed"),namespace:"upload"}),n.enqueueChange("transparent",t=>{t.remove(s.get(e.id))}),l()});function l(){n.enqueueChange("transparent",t=>{const n=s.get(e.id);t.removeAttribute("uploadId",n),t.removeAttribute("uploadStatus",n),s.delete(e.id)}),o.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,n){let r=0;const o=Object.keys(e).filter(e=>{const t=parseInt(e,10);if(!isNaN(t))return r=Math.max(r,t),!0}).map(t=>`${e[t]} ${t}w`).join(", ");""!=o&&n.setAttribute("srcset",{data:o,width:r},t)}}function zm(e,t){const n=e.plugins.get("ImageUtils");return Array.from(e.model.createRangeOn(t)).filter(e=>n.isImage(e.item)).map(e=>e.item)}class Hm extends Ye{static get pluginName(){return"IndentEditing"}init(){const e=this.editor;e.commands.add("indent",new Ve(e)),e.commands.add("outdent",new Ve(e))}}var Bm='',Vm='';class Wm extends Ye{static get pluginName(){return"IndentUI"}init(){const e=this.editor,t=e.locale,n=e.t,r="ltr"==t.uiLanguageDirection?Bm:Vm,o="ltr"==t.uiLanguageDirection?Vm:Bm;this._defineButton("indent",n("Increase indent"),r),this._defineButton("outdent",n("Decrease indent"),o)}_defineButton(e,t,n){const r=this.editor;r.ui.componentFactory.add(e,o=>{const i=r.commands.get(e),a=new Zl(o);return a.set({label:t,icon:n,tooltip:!0}),a.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(a,"execute",()=>{r.execute(e),r.editing.view.focus()}),a})}}class Um{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach(e=>this._definitions.add(e)):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",(e,t,n)=>{if(!n.consumable.test(t.item,"attribute:linkHref"))return;const r=n.writer,o=r.document.selection;for(const e of this._definitions){const i=r.createAttributeElement("a",e.attributes,{priority:5});e.classes&&r.addClass(e.classes,i);for(const t in e.styles)r.setStyle(t,e.styles[t],i);r.setCustomProperty("link",!0,i),e.callback(t.attributeNewValue)?t.item.is("selection")?r.wrap(o.getFirstRange(),i):r.wrap(n.mapper.toViewRange(t.range),i):r.unwrap(n.mapper.toViewRange(t.range),i)}},{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",(e,t,{writer:n,mapper:r})=>{const o=r.toViewElement(t.item),i=Array.from(o.getChildren()).find(e=>"a"===e.name);for(const e of this._definitions){const r=wn(e.attributes);if(e.callback(t.attributeNewValue)){for(const[e,t]of r)"class"===e?n.addClass(t,i):n.setAttribute(e,t,i);e.classes&&n.addClass(e.classes,i);for(const t in e.styles)n.setStyle(t,e.styles[t],i)}else{for(const[e,t]of r)"class"===e?n.removeClass(t,i):n.removeAttribute(e,i);e.classes&&n.removeClass(e.classes,i);for(const t in e.styles)n.removeStyle(t,i)}}})}}}var Gm=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),qm=function(e){return Gm.test(e)},Km="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Xm="\\ud83c[\\udffb-\\udfff]",Qm="[^\\ud800-\\udfff]",Jm="(?:\\ud83c[\\udde6-\\uddff]){2}",Zm="[\\ud800-\\udbff][\\udc00-\\udfff]",$m="(?:"+Km+"|"+Xm+")?",eh="[\\ufe0e\\ufe0f]?"+$m+"(?:\\u200d(?:"+[Qm,Jm,Zm].join("|")+")[\\ufe0e\\ufe0f]?"+$m+")*",th="(?:"+[Qm+Km+"?",Km,Jm,Zm,"[\\ud800-\\udfff]"].join("|")+")",nh=RegExp(Xm+"(?="+Xm+")|"+th+eh,"g"),rh=function(e){return qm(e)?function(e){return e.match(nh)||[]}(e):function(e){return e.split("")}(e)},oh=function(e){e=Rn(e);var t=qm(e)?rh(e):void 0,n=t?t[0]:e.charAt(0),r=t?function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:zn(e,t,n)}(t,1).join(""):e.slice(1);return n.toUpperCase()+r};const ih=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,ah=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,sh=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,lh=/^((\w+:(\/{2,})?)|(\W))/i;function ch(e,{writer:t}){const n=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,n),n}function dh(e){return function(e){return e.replace(ih,"").match(ah)}(e=String(e))?e:"#"}function uh(e,t){return!!e&&t.checkAttribute(e.name,"linkHref")}function ph(e,t){const n=(r=e,sh.test(r)?"mailto:":t);var r;const o=!!n&&!lh.test(e);return e&&o?n+e:e}function mh(e){window.open(e,"_blank","noopener")}class hh extends He{constructor(e){super(e),this.manualDecorators=new ln,this.automaticDecorators=new Um}restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document.selection,n=t.getSelectedElement()||Li(t.getSelectedBlocks());uh(n,e.schema)?(this.value=n.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(n,"linkHref")):(this.value=t.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref"));for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}execute(e,t={}){const n=this.editor.model,r=n.document.selection,o=[],i=[];for(const e in t)t[e]?o.push(e):i.push(e);n.change(t=>{if(r.isCollapsed){const a=r.getFirstPosition();if(r.hasAttribute("linkHref")){const s=Fu(a,"linkHref",r.getAttribute("linkHref"),n);t.setAttribute("linkHref",e,s),o.forEach(e=>{t.setAttribute(e,!0,s)}),i.forEach(e=>{t.removeAttribute(e,s)}),t.setSelection(t.createPositionAfter(s.end.nodeBefore))}else if(""!==e){const i=wn(r.getAttributes());i.set("linkHref",e),o.forEach(e=>{i.set(e,!0)});const{end:s}=n.insertContent(t.createText(e,i),a);t.setSelection(s)}["linkHref",...o,...i].forEach(e=>{t.removeSelectionAttribute(e)})}else{const a=n.schema.getValidRanges(r.getRanges(),"linkHref"),s=[];for(const e of r.getSelectedBlocks())n.schema.checkAttribute(e,"linkHref")&&s.push(t.createRangeOn(e));const l=s.slice();for(const e of a)this._isRangeToUpdate(e,s)&&l.push(e);for(const n of l)t.setAttribute("linkHref",e,n),o.forEach(e=>{t.setAttribute(e,!0,n)}),i.forEach(e=>{t.removeAttribute(e,n)})}})}_getDecoratorStateFromModel(e){const t=this.editor.model,n=t.document.selection,r=n.getSelectedElement();return uh(r,t.schema)?r.getAttribute(e):n.getAttribute(e)}_isRangeToUpdate(e,t){for(const n of t)if(n.containsRange(e))return!1;return!0}}class fh extends He{refresh(){const e=this.editor.model,t=e.document.selection,n=t.getSelectedElement();uh(n,e.schema)?this.isEnabled=e.schema.checkAttribute(n,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,n=t.document.selection,r=e.commands.get("link");t.change(e=>{const o=n.isCollapsed?[Fu(n.getFirstPosition(),"linkHref",n.getAttribute("linkHref"),t)]:t.schema.getValidRanges(n.getRanges(),"linkHref");for(const t of o)if(e.removeAttribute("linkHref",t),r)for(const n of r.manualDecorators)e.removeAttribute(n.id,t)})}}class gh{constructor({id:e,label:t,attributes:n,classes:r,styles:o,defaultValue:i}){this.id=e,this.set("value"),this.defaultValue=i,this.label=t,this.attributes=n,this.classes=r,this.styles=o}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}je(gh,Pe),n(90);const bh=/^(https?:)?\/\//;class vh extends Ye{static get pluginName(){return"LinkEditing"}static get requires(){return[xu,yu,hd]}constructor(e){super(e),e.config.define("link",{addTargetToExternalLinks:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:ch}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>ch(dh(e),t)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new hh(e)),e.commands.add("unlink",new fh(e));const t=function(e,t){const n={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach(e=>(e.label&&n[e.label]&&(e.label=n[e.label]),e)),t}(e.t,function(e){const t=[];if(e)for(const[n,r]of Object.entries(e)){const e=Object.assign({},r,{id:"link"+oh(n)});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(t.filter(e=>"automatic"===e.mode)),this._enableManualDecorators(t.filter(e=>"manual"===e.mode)),e.plugins.get(xu).registerAttribute("linkHref"),function(e,t,n,r){const o=e.editing.view,i=new Set;o.document.registerPostFixer(n=>{const o=e.model.document.selection;let a=!1;if(o.hasAttribute(t)){const s=Fu(o.getFirstPosition(),t,o.getAttribute(t),e.model),l=e.editing.mapper.toViewRange(s);for(const e of l.getItems())e.is("element","a")&&!e.hasClass(r)&&(n.addClass(r,e),i.add(e),a=!0)}return a}),e.conversion.for("editingDowncast").add(e=>{function t(){o.change(e=>{for(const t of i.values())e.removeClass(r,t),i.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"})})}(e,"linkHref",0,"ck-link_selected"),this._enableLinkOpen(),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink()}_enableAutomaticDecorators(e){const t=this.editor,n=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:"automatic",callback:e=>bh.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(e),n.length&&t.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,n=t.commands.get("link").manualDecorators;e.forEach(e=>{t.model.schema.extend("$text",{allowAttributes:e.id}),e=new gh(e),n.add(e),t.conversion.for("downcast").attributeToElement({model:e.id,view:(t,{writer:n})=>{if(t){const t=n.createAttributeElement("a",e.attributes,{priority:5});e.classes&&n.addClass(e.classes,t);for(const r in e.styles)n.setStyle(r,e.styles[r],t);return n.setCustomProperty("link",!0,t),t}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...e._createPattern()},model:{key:e.id}})})}_enableLinkOpen(){const e=this.editor,t=e.editing.view.document,n=e.model.document;this.listenTo(t,"click",(e,t)=>{if(!(Tr?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let n=t.domTarget;if("a"!=n.tagName.toLowerCase()&&(n=n.closest("a")),!n)return;const r=n.getAttribute("href");r&&(e.stop(),t.preventDefault(),mh(r))},{context:"$capture"}),this.listenTo(t,"enter",(e,t)=>{const r=n.selection,o=r.getSelectedElement(),i=o?o.getAttribute("linkHref"):r.getAttribute("linkHref");i&&t.domEvent.altKey&&(e.stop(),mh(i))},{context:"a"})}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection;this.listenTo(e,"insertContent",()=>{const n=t.anchor.nodeBefore,r=t.anchor.nodeAfter;t.hasAttribute("linkHref")&&n&&n.hasAttribute("linkHref")&&(r&&r.hasAttribute("linkHref")||e.change(t=>{yh(t,wh(e.schema))}))},{priority:"low"})}_enableClickingAfterLink(){const e=this.editor,t=e.model;e.editing.view.addObserver(ad);let n=!1;this.listenTo(e.editing.view.document,"mousedown",()=>{n=!0}),this.listenTo(e.editing.view.document,"selectionChange",()=>{if(!n)return;n=!1;const e=t.document.selection;if(!e.isCollapsed)return;if(!e.hasAttribute("linkHref"))return;const r=e.getFirstPosition(),o=Fu(r,"linkHref",e.getAttribute("linkHref"),t);(r.isTouching(o.start)||r.isTouching(o.end))&&t.change(e=>{yh(e,wh(t.schema))})})}_enableTypingOverLink(){const e=this.editor,t=e.editing.view;let n,r;this.listenTo(t.document,"delete",()=>{r=!0},{priority:"high"}),this.listenTo(e.model,"deleteContent",()=>{const t=e.model.document.selection;t.isCollapsed||(r?r=!1:_h(e)&&function(e){const t=e.document.selection,n=t.getFirstPosition(),r=t.getLastPosition(),o=n.nodeAfter;return!!o&&!!o.is("$text")&&!!o.hasAttribute("linkHref")&&(o===(r.textNode||r.nodeBefore)||Fu(n,"linkHref",o.getAttribute("linkHref"),e).containsRange(e.createRange(n,r),!0))}(e.model)&&(n=t.getAttributes()))},{priority:"high"}),this.listenTo(e.model,"insertContent",(t,[o])=>{r=!1,_h(e)&&n&&(e.model.change(e=>{for(const[t,r]of n)e.setAttribute(t,r,o)}),n=null)},{priority:"high"})}_handleDeleteContentAfterLink(){const e=this.editor,t=e.model,n=t.document.selection,r=e.editing.view;let o=!1,i=!1;this.listenTo(r.document,"delete",(e,t)=>{i=t.domEvent.keyCode===Fr.backspace},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{o=!1;const e=n.getFirstPosition(),r=n.getAttribute("linkHref");if(!r)return;const i=Fu(e,"linkHref",r,t);o=i.containsPosition(e)||i.end.isEqual(e)},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{i&&(i=!1,o||e.model.enqueueChange(e=>{yh(e,wh(t.schema))}))},{priority:"low"})}}function yh(e,t){e.removeSelectionAttribute("linkHref");for(const n of t)e.removeSelectionAttribute(n)}function _h(e){return e.plugins.get("Input").isInput(e.model.change(e=>e.batch))}function wh(e){return e.getDefinition("$text").allowAttributes.filter(e=>e.startsWith("link"))}n(92);class kh extends Al{constructor(e,t){super(e);const n=e.t;this.focusTracker=new Pi,this.keystrokes=new Ii,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),El.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),El.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t.manualDecorators),this._focusables=new Tl,this._focusCycler=new ec({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const r=["ck","ck-link-form","ck-responsive-form"];t.manualDecorators.length&&r.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:r,tabindex:"-1"},children:this.children}),Ml(this)}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((e,t)=>(e[t.name]=t.isOn,e),{})}render(){super.render(),Cl({view:this}),[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new Ac(this.locale,Dc);return t.label=e("Link URL"),t}_createButton(e,t,n,r){const o=new Zl(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),r&&o.delegate("execute").to(this,r),o}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const n of e.manualDecorators){const r=new $l(this.locale);r.set({name:n.id,label:n.label,withText:!0}),r.bind("isOn").toMany([n,e],"value",(e,t)=>void 0===t&&void 0===e?n.defaultValue:e),r.on("execute",()=>{n.set("value",!r.isOn)}),t.add(r)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new Al;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map(e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}})),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}n(94);class xh extends Al{constructor(e){super(e);const t=e.t;this.focusTracker=new Pi,this.keystrokes=new Ii,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(t("Unlink"),'',"unlink"),this.editButtonView=this._createButton(t("Edit link"),El.pencil,"edit"),this.set("href"),this._focusables=new Tl,this._focusCycler=new ec({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render(),[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(e,t,n){const r=new Zl(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.delegate("execute").to(this,n),r}_createPreviewButton(){const e=new Zl(this.locale),t=this.bindTemplate,n=this.t;return e.set({withText:!0,tooltip:n("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",e=>e&&dh(e)),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",e=>e||n("This link has no URL")),e.bind("isEnabled").to(this,"href",e=>!!e),e.template.tag="a",e.template.eventListeners={},e}}class Eh extends Ye{static get requires(){return[jc]}static get pluginName(){return"LinkUI"}init(){const e=this.editor;e.editing.view.addObserver(id),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=e.plugins.get(jc),this._createToolbarLinkButton(),this._enableUserBalloonInteractions(),e.conversion.for("editingDowncast").markerToHighlight({model:"link-ui",view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:"link-ui",view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){const e=this.editor,t=new xh(e.locale),n=e.commands.get("link"),r=e.commands.get("unlink");return t.bind("href").to(n,"value"),t.editButtonView.bind("isEnabled").to(n),t.unlinkButtonView.bind("isEnabled").to(r),this.listenTo(t,"edit",()=>{this._addFormView()}),this.listenTo(t,"unlink",()=>{e.execute("unlink"),this._hideUI()}),t.keystrokes.set("Esc",(e,t)=>{this._hideUI(),t()}),t.keystrokes.set("Ctrl+K",(e,t)=>{this._addFormView(),t()}),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),n=e.config.get("link.defaultProtocol"),r=new kh(e.locale,t);return r.urlInputView.fieldView.bind("value").to(t,"value"),r.urlInputView.bind("isReadOnly").to(t,"isEnabled",e=>!e),r.saveButtonView.bind("isEnabled").to(t),this.listenTo(r,"submit",()=>{const{value:t}=r.urlInputView.fieldView.element,o=ph(t,n);e.execute("link",o,r.getDecoratorSwitchesState()),this._closeFormView()}),this.listenTo(r,"cancel",()=>{this._closeFormView()}),r.keystrokes.set("Esc",(e,t)=>{this._closeFormView(),t()}),r}_createToolbarLinkButton(){const e=this.editor,t=e.commands.get("link"),n=e.t;e.keystrokes.set("Ctrl+K",(e,n)=>{n(),t.isEnabled&&this._showUI(!0)}),e.ui.componentFactory.add("link",e=>{const r=new Zl(e);return r.isEnabled=!0,r.label=n("Link"),r.icon='',r.keystroke="Ctrl+K",r.tooltip=!0,r.isToggleable=!0,r.bind("isEnabled").to(t,"isEnabled"),r.bind("isOn").to(t,"value",e=>!!e),this.listenTo(r,"execute",()=>this._showUI(!0)),r})}_enableUserBalloonInteractions(){const e=this.editor.editing.view.document;this.listenTo(e,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),this.editor.keystrokes.set("Tab",(e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())},{priority:"high"}),this.editor.keystrokes.set("Esc",(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),Sl({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=e.value||""}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let n=this._getSelectedLinkElement(),r=i();const o=()=>{const e=this._getSelectedLinkElement(),t=i();n&&!e||!n&&t!==r?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),n=e,r=t};function i(){return t.selection.focus.getAncestors().reverse().find(e=>e.is("element"))}this.listenTo(e.ui,"update",o),this.listenTo(this._balloon,"change:visibleView",o)}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){return this._balloon.visibleView==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,n=e.document;let r=null;if(t.markers.has("link-ui")){const t=Array.from(this.editor.editing.mapper.markerNameToElements("link-ui")),n=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));r=e.domConverter.viewRangeToDom(n)}else r=()=>{const t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(n.selection.getFirstRange())};return{target:r}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,n=t.getSelectedElement();if(t.isCollapsed||n&&Ld(n))return Sh(t.getFirstPosition());{const n=t.getFirstRange().getTrimmed(),r=Sh(n.start),o=Sh(n.end);return r&&r==o&&e.createRangeIn(r).getTrimmed().isEqual(n)?r:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change(t=>{const n=e.document.selection.getFirstRange();if(e.markers.has("link-ui"))t.updateMarker("link-ui",{range:n});else if(n.start.isAtEnd){const r=n.start.getLastMatchingPosition(({item:t})=>!e.schema.isContent(t),{boundaries:n});t.addMarker("link-ui",{usingOperation:!1,affectsData:!1,range:t.createRange(r,n.end)})}else t.addMarker("link-ui",{usingOperation:!1,affectsData:!1,range:n})})}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has("link-ui")&&e.change(e=>{e.removeMarker("link-ui")})}}function Sh(e){return e.getAncestors().find(e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t})}const Mh=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class Ch extends Ye{static get requires(){return[Md]}static get pluginName(){return"AutoLink"}init(){const e=this.editor.model.document.selection;e.on("change:range",()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")}),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const e=this.editor,t=new ku(e.model,e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=Th(e.substr(0,e.length-1));return t?{url:t}:void 0}),n=e.plugins.get("Input");t.on("matched:data",(t,r)=>{const{batch:o,range:i,url:a}=r;if(!n.isInput(o))return;const s=i.end.getShiftedBy(-1),l=s.getShiftedBy(-a.length),c=e.model.createRange(l,s);this._applyAutoLink(a,c)}),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,n=e.commands.get("enter");n&&n.on("execute",()=>{const e=t.document.selection.getFirstPosition();if(!e.parent.previousSibling)return;const n=t.createRangeIn(e.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(n)})}_enableShiftEnterHandling(){const e=this.editor,t=e.model,n=e.commands.get("shiftEnter");n&&n.on("execute",()=>{const e=t.document.selection.getFirstPosition(),n=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(n)})}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:n,range:r}=wu(e,t),o=Th(n);if(o){const e=t.createRange(r.end.getShiftedBy(-o.length),r.end);this._applyAutoLink(o,e)}}_applyAutoLink(e,t){const n=this.editor.model,r=this.editor.plugins.get("Delete");this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,n)&&n.enqueueChange(o=>{const i=this.editor.config.get("link.defaultProtocol"),a=ph(e,i);o.setAttribute("linkHref",a,t),n.enqueueChange(()=>{r.requestUndoOnBackspace()})})}}function Th(e){const t=Mh.exec(e);return t?t[2]:null}class Ah extends He{constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,n=t.document,r=Array.from(n.selection.getSelectedBlocks()).filter(e=>Lh(e,t.schema)),o=void 0!==e.forceValue?!e.forceValue:this.value;t.change(e=>{if(o){let t=r[r.length-1].nextSibling,n=Number.POSITIVE_INFINITY,o=[];for(;t&&"listItem"==t.name&&0!==t.getAttribute("listIndent");){const e=t.getAttribute("listIndent");e=n;)i>o.getAttribute("listIndent")&&(i=o.getAttribute("listIndent")),o.getAttribute("listIndent")==i&&e[t?"unshift":"push"](o),o=o[t?"previousSibling":"nextSibling"]}}function Lh(e,t){return t.checkChild(e.parent,"listItem")&&!t.isObject(e)}class Ph extends He{constructor(e,t){super(e),this._indentBy="forward"==t?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document;let n=Array.from(t.selection.getSelectedBlocks());e.change(e=>{const t=n[n.length-1];let r=t.nextSibling;for(;r&&"listItem"==r.name&&r.getAttribute("listIndent")>t.getAttribute("listIndent");)n.push(r),r=r.nextSibling;this._indentBy<0&&(n=n.reverse());for(const t of n){const n=t.getAttribute("listIndent")+this._indentBy;n<0?e.rename(t,"paragraph"):e.setAttribute("listIndent",n,t)}this.fire("_executeCleanup",n)})}_checkEnabled(){const e=Li(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is("element","listItem"))return!1;if(this._indentBy>0){const t=e.getAttribute("listIndent"),n=e.getAttribute("listType");let r=e.previousSibling;for(;r&&r.is("element","listItem")&&r.getAttribute("listIndent")>=t;){if(r.getAttribute("listIndent")==t)return r.getAttribute("listType")==n;r=r.previousSibling}return!1}return!0}}function Ih(e,t,n,r){const o=t.parent,i=n.mapper,a=n.writer;let s=i.toViewPosition(r.createPositionBefore(e));const l=Rh(e.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:e.getAttribute("listIndent")}),c=e.previousSibling;if(l&&l.getAttribute("listIndent")==e.getAttribute("listIndent")){const e=i.toViewElement(l);s=a.breakContainer(a.createPositionAfter(e))}else if(c&&"listItem"==c.name){s=i.toViewPosition(r.createPositionAt(c,"end"));const e=i.findMappedViewAncestor(s),t=function(e){for(const t of e.getChildren())if("ul"==t.name||"ol"==t.name)return t;return null}(e);s=t?a.createPositionBefore(t):a.createPositionAt(e,"end")}else s=i.toViewPosition(r.createPositionBefore(e));if(s=Oh(s),a.insert(s,o),c&&"listItem"==c.name){const e=i.toViewElement(c),n=a.createRange(a.createPositionAt(e,0),s).getWalker({ignoreElementEnd:!0});for(const e of n)if(e.item.is("element","li")){const r=a.breakContainer(a.createPositionBefore(e.item)),o=e.item.parent,i=a.createPositionAt(t,"end");Nh(a,i.nodeBefore,i.nodeAfter),a.move(a.createRangeOn(o),i),n.position=r}}else{const n=o.nextSibling;if(n&&(n.is("element","ul")||n.is("element","ol"))){let r=null;for(const t of n.getChildren()){const n=i.toModelElement(t);if(!(n&&n.getAttribute("listIndent")>e.getAttribute("listIndent")))break;r=t}r&&(a.breakContainer(a.createPositionAfter(r)),a.move(a.createRangeOn(r.parent),a.createPositionAt(t,"end")))}}Nh(a,o,o.nextSibling),Nh(a,o.previousSibling,o)}function Nh(e,t,n){return!t||!n||"ul"!=t.name&&"ol"!=t.name||t.name!=n.name||t.getAttribute("class")!==n.getAttribute("class")?null:e.mergeContainers(e.createPositionAfter(t))}function Oh(e){return e.getLastMatchingPosition(e=>e.item.is("uiElement"))}function Rh(e,t){const n=!!t.sameIndent,r=!!t.smallerIndent,o=t.listIndent;let i=e;for(;i&&"listItem"==i.name;){const e=i.getAttribute("listIndent");if(n&&o==e||r&&o>e)return i;i="forward"===t.direction?i.nextSibling:i.previousSibling}return null}function Fh(e,t,n,r){e.ui.componentFactory.add(t,o=>{const i=e.commands.get(t),a=new Zl(o);return a.set({label:n,icon:r,tooltip:!0,isToggleable:!0}),a.bind("isOn","isEnabled").to(i,"value","isEnabled"),a.on("execute",()=>{e.execute(t),e.editing.view.focus()}),a})}function jh(){const e=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||e?0:rr.call(this)}function Yh(e){return(t,n,r)=>{const o=r.consumable;if(!o.test(n.item,"insert")||!o.test(n.item,"attribute:listType")||!o.test(n.item,"attribute:listIndent"))return;o.consume(n.item,"insert"),o.consume(n.item,"attribute:listType"),o.consume(n.item,"attribute:listIndent");const i=n.item;Ih(i,function(e,t){const n=t.mapper,r=t.writer,o="numbered"==e.getAttribute("listType")?"ol":"ul",i=function(e){const t=e.createContainerElement("li");return t.getFillerOffset=jh,t}(r),a=r.createContainerElement(o,null);return r.insert(r.createPositionAt(a,0),i),n.bindElements(e,i),i}(i,r),r,e)}}function zh(e,t,n){if(!n.consumable.consume(t.item,"attribute:listType"))return;const r=n.mapper.toViewElement(t.item),o=n.writer;o.breakContainer(o.createPositionBefore(r)),o.breakContainer(o.createPositionAfter(r));const i=r.parent,a="numbered"==t.attributeNewValue?"ol":"ul";o.rename(a,i)}function Hh(e,t,n){const r=n.mapper.toViewElement(t.item).parent,o=n.writer;Nh(o,r,r.nextSibling),Nh(o,r.previousSibling,r);for(const e of t.item.getChildren())n.consumable.consume(e,"insert")}function Bh(e,t,n){if("listItem"!=t.item.name){let e=n.mapper.toViewPosition(t.range.start);const r=n.writer,o=[];for(;("ul"==e.parent.name||"ol"==e.parent.name)&&(e=r.breakContainer(e),"li"==e.parent.name);){const t=e,n=r.createPositionAt(e.parent,"end");if(!t.isEqual(n)){const e=r.remove(r.createRange(t,n));o.push(e)}e=r.createPositionAfter(e.parent)}if(o.length>0){for(let t=0;t0){const t=Nh(r,n,n.nextSibling);t&&t.parent==n&&e.offset--}}Nh(r,e.nodeBefore,e.nodeAfter)}}}function Vh(e,t,n){const r=n.mapper.toViewPosition(t.position),o=r.nodeBefore,i=r.nodeAfter;Nh(n.writer,o,i)}function Wh(e,t,n){if(n.consumable.consume(t.viewItem,{name:!0})){const e=n.writer,r=e.createElement("listItem"),o=function(e){let t=0,n=e.parent;for(;n;){if(n.is("element","li"))t++;else{const e=n.previousSibling;e&&e.is("element","li")&&t++}n=n.parent}return t}(t.viewItem);e.setAttribute("listIndent",o,r);const i=t.viewItem.parent&&"ol"==t.viewItem.parent.name?"numbered":"bulleted";if(e.setAttribute("listType",i,r),!n.safeInsert(r,t.modelCursor))return;const a=function(e,t,n){const{writer:r,schema:o}=n;let i=r.createPositionAfter(e);for(const a of t)if("ul"==a.name||"ol"==a.name)i=n.convertItem(a,i).modelCursor;else{const t=n.convertItem(a,r.createPositionAt(e,"end")),s=t.modelRange.start.nodeAfter;s&&s.is("element")&&!o.checkChild(e,s.name)&&(e=t.modelCursor.parent.is("element","listItem")?t.modelCursor.parent:Xh(t.modelCursor),i=r.createPositionAfter(e))}return i}(r,t.viewItem.getChildren(),n);t.modelRange=e.createRange(t.modelCursor,a),n.updateConversionResult(r,t)}}function Uh(e,t,n){if(n.consumable.test(t.viewItem,{name:!0})){const e=Array.from(t.viewItem.getChildren());for(const t of e)!t.is("element","li")&&!Jh(t)&&t._remove()}}function Gh(e,t,n){if(n.consumable.test(t.viewItem,{name:!0})){if(0===t.viewItem.childCount)return;const e=[...t.viewItem.getChildren()];let n=!1;for(const t of e)n&&!Jh(t)&&t._remove(),Jh(t)&&(n=!0)}}function qh(e){return(t,n)=>{if(n.isPhantom)return;const r=n.modelPosition.nodeBefore;if(r&&r.is("element","listItem")){const t=n.mapper.toViewElement(r),o=t.getAncestors().find(Jh),i=e.createPositionAt(t,0).getWalker();for(const e of i){if("elementStart"==e.type&&e.item.is("element","li")){n.viewPosition=e.previousPosition;break}if("elementEnd"==e.type&&e.item==o){n.viewPosition=e.nextPosition;break}}}}}function Kh(e,[t,n]){let r,o=t.is("documentFragment")?t.getChild(0):t;if(r=n?this.createSelection(n):this.document.selection,o&&o.is("element","listItem")){const e=r.getFirstPosition();let t=null;if(e.parent.is("element","listItem")?t=e.parent:e.nodeBefore&&e.nodeBefore.is("element","listItem")&&(t=e.nodeBefore),t){const e=t.getAttribute("listIndent");if(e>0)for(;o&&o.is("element","listItem");)o._setAttribute("listIndent",o.getAttribute("listIndent")+e),o=o.nextSibling}}}function Xh(e){const t=new Ji({startPosition:e});let n;do{n=t.next()}while(!n.value.item.is("element","listItem"));return n.value.item}function Qh(e,t,n,r,o,i){const a=Rh(t.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:e,foo:"b"}),s=o.mapper,l=o.writer,c=a?a.getAttribute("listIndent"):null;let d;if(a)if(c==e){const e=s.toViewElement(a).parent;d=l.createPositionAfter(e)}else{const e=i.createPositionAt(a,"end");d=s.toViewPosition(e)}else d=n;d=Oh(d);for(const e of[...r.getChildren()])Jh(e)&&(d=l.move(l.createRangeOn(e),d).end,Nh(l,e,e.nextSibling),Nh(l,e.previousSibling,e))}function Jh(e){return e.is("element","ol")||e.is("element","ul")}class Zh extends Ye{static get pluginName(){return"ListEditing"}static get requires(){return[yd,Md]}init(){const e=this.editor;e.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const t=e.data,n=e.editing;var r;e.model.document.registerPostFixer(t=>function(e,t){const n=e.document.differ.getChanges(),r=new Map;let o=!1;for(const r of n)if("insert"==r.type&&"listItem"==r.name)i(r.position);else if("insert"==r.type&&"listItem"!=r.name){if("$text"!=r.name){const n=r.position.nodeAfter;n.hasAttribute("listIndent")&&(t.removeAttribute("listIndent",n),o=!0),n.hasAttribute("listType")&&(t.removeAttribute("listType",n),o=!0),n.hasAttribute("listStyle")&&(t.removeAttribute("listStyle",n),o=!0);for(const t of Array.from(e.createRangeIn(n)).filter(e=>e.item.is("element","listItem")))i(t.previousPosition)}i(r.position.getShiftedBy(r.length))}else"remove"==r.type&&"listItem"==r.name?i(r.position):("attribute"==r.type&&"listIndent"==r.attributeKey||"attribute"==r.type&&"listType"==r.attributeKey)&&i(r.range.start);for(const e of r.values())a(e),s(e);return o;function i(e){const t=e.nodeBefore;if(t&&t.is("element","listItem")){let e=t;if(r.has(e))return;for(let t=e.previousSibling;t&&t.is("element","listItem");t=e.previousSibling)if(e=t,r.has(e))return;r.set(t,e)}else{const t=e.nodeAfter;t&&t.is("element","listItem")&&r.set(t,t)}}function a(e){let n=0,r=null;for(;e&&e.is("element","listItem");){const i=e.getAttribute("listIndent");if(i>n){let a;null===r?(r=i-n,a=n):(r>i&&(r=i),a=i-r),t.setAttribute("listIndent",a,e),o=!0}else r=null,n=e.getAttribute("listIndent")+1;e=e.nextSibling}}function s(e){let n=[],r=null;for(;e&&e.is("element","listItem");){const i=e.getAttribute("listIndent");if(r&&r.getAttribute("listIndent")>i&&(n=n.slice(0,i+1)),0!=i)if(n[i]){const r=n[i];e.getAttribute("listType")!=r&&(t.setAttribute("listType",r,e),o=!0)}else n[i]=e.getAttribute("listType");r=e,e=e.nextSibling}}}(e.model,t)),n.mapper.registerViewToModelLength("li",$h),t.mapper.registerViewToModelLength("li",$h),n.mapper.on("modelToViewPosition",qh(n.view)),n.mapper.on("viewToModelPosition",(r=e.model,(e,t)=>{const n=t.viewPosition,o=n.parent,i=t.mapper;if("ul"==o.name||"ol"==o.name){if(n.isAtEnd){const e=i.toModelElement(n.nodeBefore),o=i.getModelLength(n.nodeBefore);t.modelPosition=r.createPositionBefore(e).getShiftedBy(o)}else{const e=i.toModelElement(n.nodeAfter);t.modelPosition=r.createPositionBefore(e)}e.stop()}else if("li"==o.name&&n.nodeBefore&&("ul"==n.nodeBefore.name||"ol"==n.nodeBefore.name)){const a=i.toModelElement(o);let s=1,l=n.nodeBefore;for(;l&&Jh(l);)s+=i.getModelLength(l),l=l.previousSibling;t.modelPosition=r.createPositionBefore(a).getShiftedBy(s),e.stop()}})),t.mapper.on("modelToViewPosition",qh(n.view)),e.conversion.for("editingDowncast").add(t=>{t.on("insert",Bh,{priority:"high"}),t.on("insert:listItem",Yh(e.model)),t.on("attribute:listType:listItem",zh,{priority:"high"}),t.on("attribute:listType:listItem",Hh,{priority:"low"}),t.on("attribute:listIndent:listItem",function(e){return(t,n,r)=>{if(!r.consumable.consume(n.item,"attribute:listIndent"))return;const o=r.mapper.toViewElement(n.item),i=r.writer;i.breakContainer(i.createPositionBefore(o)),i.breakContainer(i.createPositionAfter(o));const a=o.parent,s=a.previousSibling,l=i.createRangeOn(a);i.remove(l),s&&s.nextSibling&&Nh(i,s,s.nextSibling),Qh(n.attributeOldValue+1,n.range.start,l.start,o,r,e),Ih(n.item,o,r,e);for(const e of n.item.getChildren())r.consumable.consume(e,"insert")}}(e.model)),t.on("remove:listItem",function(e){return(t,n,r)=>{const o=r.mapper.toViewPosition(n.position).getLastMatchingPosition(e=>!e.item.is("element","li")).nodeAfter,i=r.writer;i.breakContainer(i.createPositionBefore(o)),i.breakContainer(i.createPositionAfter(o));const a=o.parent,s=a.previousSibling,l=i.createRangeOn(a),c=i.remove(l);s&&s.nextSibling&&Nh(i,s,s.nextSibling),Qh(r.mapper.toModelElement(o).getAttribute("listIndent")+1,n.position,l.start,o,r,e);for(const e of i.createRangeIn(c).getItems())r.mapper.unbindViewElement(e);t.stop()}}(e.model)),t.on("remove",Vh,{priority:"low"})}),e.conversion.for("dataDowncast").add(t=>{t.on("insert",Bh,{priority:"high"}),t.on("insert:listItem",Yh(e.model))}),e.conversion.for("upcast").add(e=>{e.on("element:ul",Uh,{priority:"high"}),e.on("element:ol",Uh,{priority:"high"}),e.on("element:li",Gh,{priority:"high"}),e.on("element:li",Wh)}),e.model.on("insertContent",Kh,{priority:"high"}),e.commands.add("numberedList",new Ah(e,"numbered")),e.commands.add("bulletedList",new Ah(e,"bulleted")),e.commands.add("indentList",new Ph(e,"forward")),e.commands.add("outdentList",new Ph(e,"backward"));const o=n.view.document;this.listenTo(o,"enter",(e,t)=>{const n=this.editor.model.document,r=n.selection.getLastPosition().parent;n.selection.isCollapsed&&"listItem"==r.name&&r.isEmpty&&(this.editor.execute("outdentList"),t.preventDefault(),e.stop())},{context:"li"}),this.listenTo(o,"delete",(e,t)=>{if("backward"!==t.direction)return;const n=this.editor.model.document.selection;if(!n.isCollapsed)return;const r=n.getFirstPosition();if(!r.isAtStart)return;const o=r.parent;"listItem"===o.name&&(o.previousSibling&&"listItem"===o.previousSibling.name||(this.editor.execute("outdentList"),t.preventDefault(),e.stop()))},{context:"li"});const i=e=>(t,n)=>{this.editor.commands.get(e).isEnabled&&(this.editor.execute(e),n())};e.keystrokes.set("Tab",i("indentList")),e.keystrokes.set("Shift+Tab",i("outdentList"))}afterInit(){const e=this.editor.commands,t=e.get("indent"),n=e.get("outdent");t&&t.registerChildCommand(e.get("indentList")),n&&n.registerChildCommand(e.get("outdentList"))}}function $h(e){let t=1;for(const n of e.getChildren())if("ul"==n.name||"ol"==n.name)for(const e of n.getChildren())t+=$h(e);return t}class ef extends Ye{static get pluginName(){return"ListUI"}init(){const e=this.editor.t;Fh(this.editor,"numberedList",e("Numbered List"),''),Fh(this.editor,"bulletedList",e("Bulleted List"),'')}}function tf(e,t){return e=>{e.on("attribute:url:media",n)};function n(n,r,o){if(!o.consumable.consume(r.item,n.name))return;const i=r.attributeNewValue,a=o.writer,s=o.mapper.toViewElement(r.item),l=[...s.getChildren()].find(e=>e.getCustomProperty("media-content"));a.remove(l);const c=e.getMediaViewElement(a,i,t);a.insert(a.createPositionAt(s,0),c)}}function nf(e,t,n,r){const o=e.createContainerElement("figure",{class:"media"});return e.insert(e.createPositionAt(o,0),t.getMediaViewElement(e,n,r)),o}function rf(e){const t=e.getSelectedElement();return t&&t.is("element","media")?t:null}function of(e,t,n){e.change(r=>{const o=r.createElement("media",{url:t});e.insertContent(o,n),r.setSelection(o,"on")})}class af extends He{refresh(){const e=this.editor.model,t=e.document.selection,n=rf(t);this.value=n?n.getAttribute("url"):null,this.isEnabled=function(e){const t=e.getSelectedElement();return!!t&&"media"===t.name}(t)||function(e,t){let n=jd(e,t).start.parent;return n.isEmpty&&!t.schema.isLimit(n)&&(n=n.parent),t.schema.checkChild(n,"media")}(t,e)}execute(e){const t=this.editor.model,n=t.document.selection,r=rf(n);r?t.change(t=>{t.setAttribute("url",e,r)}):of(t,e,jd(n,t))}}class sf{constructor(e,t){const n=t.providers,r=t.extraProviders||[],o=new Set(t.removeProviders),i=n.concat(r).filter(e=>{const t=e.name;return t?!o.has(t):(Object(s.b)("media-embed-no-provider-name",{provider:e}),!1)});this.locale=e,this.providerDefinitions=i}hasMedia(e){return!!this._getMedia(e)}getMediaViewElement(e,t,n){return this._getMedia(t).getViewElement(e,n)}_getMedia(e){if(!e)return new lf(this.locale);e=e.trim();for(const t of this.providerDefinitions){const n=t.html,r=dn(t.url);for(const t of r){const r=this._getUrlMatches(e,t);if(r)return new lf(this.locale,e,r,n)}}return null}_getUrlMatches(e,t){let n=e.match(t);if(n)return n;let r=e.replace(/^https?:\/\//,"");return n=r.match(t),n||(r=r.replace(/^www\./,""),n=r.match(t),n||null)}}class lf{constructor(e,t,n,r){this.url=this._getValidUrl(t),this._t=e.t,this._match=n,this._previewRenderer=r}getViewElement(e,t){const n={};let r;if(t.renderForEditingView||t.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(n["data-oembed-url"]=this.url),t.renderForEditingView&&(n.class="ck-media__wrapper");const o=this._getPreviewHtml(t);r=e.createRawElement("div",n,(e,t)=>{t.setContentOf(e,o)})}else this.url&&(n.url=this.url),r=e.createEmptyElement(t.elementName,n);return e.setCustomProperty("media-content",!0,r),r}_getPreviewHtml(e){return this._previewRenderer?this._previewRenderer(this._match):this.url&&e.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){const e=new Jl,t=new Ql;return e.text=this._t("Open media in new tab"),t.content='',t.viewBox="0 0 64 42",new Dl({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[t]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]},e]}]}).render().outerHTML}_getValidUrl(e){return e?e.match(/^https?/)?e:"https://"+e:null}}n(96);class cf extends Ye{static get pluginName(){return"MediaEmbedEditing"}constructor(e){super(e),e.config.define("mediaEmbed",{elementName:"oembed",providers:[{name:"dailymotion",url:/^dailymotion\.com\/video\/(\w+)/,html:e=>``},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:e=>``},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)/,/^youtube\.com\/embed\/([\w-]+)/,/^youtu\.be\/([\w-]+)/],html:e=>``},{name:"vimeo",url:[/^vimeo\.com\/(\d+)/,/^vimeo\.com\/[^/]+\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/album\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/channels\/[^/]+\/(\d+)/,/^vimeo\.com\/groups\/[^/]+\/videos\/(\d+)/,/^vimeo\.com\/ondemand\/[^/]+\/(\d+)/,/^player\.vimeo\.com\/video\/(\d+)/],html:e=>``},{name:"instagram",url:/^instagram\.com\/p\/(\w+)/},{name:"twitter",url:/^twitter\.com/},{name:"googleMaps",url:[/^google\.com\/maps/,/^goo\.gl\/maps/,/^maps\.google\.com/,/^maps\.app\.goo\.gl/]},{name:"flickr",url:/^flickr\.com/},{name:"facebook",url:/^facebook\.com/}]}),this.registry=new sf(e.locale,e.config.get("mediaEmbed"))}init(){const e=this.editor,t=e.model.schema,n=e.t,r=e.conversion,o=e.config.get("mediaEmbed.previewsInData"),i=e.config.get("mediaEmbed.elementName"),a=this.registry;e.commands.add("mediaEmbed",new af(e)),t.register("media",{isObject:!0,isBlock:!0,allowWhere:"$block",allowAttributes:["url"]}),r.for("dataDowncast").elementToElement({model:"media",view:(e,{writer:t})=>{const n=e.getAttribute("url");return nf(t,a,n,{elementName:i,renderMediaPreview:n&&o})}}),r.for("dataDowncast").add(tf(a,{elementName:i,renderMediaPreview:o})),r.for("editingDowncast").elementToElement({model:"media",view:(e,{writer:t})=>{const r=e.getAttribute("url");return function(e,t,n){return t.setCustomProperty("media",!0,e),Pd(e,t,{label:n})}(nf(t,a,r,{elementName:i,renderForEditingView:!0}),t,n("media widget"))}}),r.for("editingDowncast").add(tf(a,{elementName:i,renderForEditingView:!0})),r.for("upcast").elementToElement({view:e=>["oembed",i].includes(e.name)&&e.getAttribute("url")?{name:!0}:null,model:(e,{writer:t})=>{const n=e.getAttribute("url");if(a.hasMedia(n))return t.createElement("media",{url:n})}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(e,{writer:t})=>{const n=e.getAttribute("data-oembed-url");if(a.hasMedia(n))return t.createElement("media",{url:n})}}).add(e=>{e.on("element:figure",function(e,t,n){if(!n.consumable.consume(t.viewItem,{name:!0,classes:"media"}))return;const{modelRange:r,modelCursor:o}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=r,t.modelCursor=o,Li(r.getItems())||n.consumable.revert(t.viewItem,{name:!0,classes:"media"})})})}}const df=/^(?:http(s)?:\/\/)?[\w-]+\.[\w-.~:/?#[\]@!$&'()*+,;=%]+$/;class uf extends Ye{static get requires(){return[ou,Md,Ku]}static get pluginName(){return"AutoMediaEmbed"}constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,t=e.model.document;this.listenTo(e.plugins.get("ClipboardPipeline"),"inputTransformation",()=>{const e=t.selection.getFirstRange(),n=$s.fromPosition(e.start);n.stickiness="toPrevious";const r=$s.fromPosition(e.end);r.stickiness="toNext",t.once("change:data",()=>{this._embedMediaBetweenPositions(n,r),n.detach(),r.detach()},{priority:"high"})}),e.commands.get("undo").on("execute",()=>{this._timeoutId&&(So.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:"high"})}_embedMediaBetweenPositions(e,t){const n=this.editor,r=n.plugins.get(cf).registry,o=new ga(e,t),i=o.getWalker({ignoreElementEnd:!0});let a="";for(const e of i)e.item.is("$textProxy")&&(a+=e.item.data);a=a.trim(),a.match(df)&&r.hasMedia(a)&&n.commands.get("mediaEmbed").isEnabled?(this._positionToInsert=$s.fromPosition(e),this._timeoutId=So.window.setTimeout(()=>{n.model.change(e=>{let t;this._timeoutId=null,e.remove(o),o.detach(),"$graveyard"!==this._positionToInsert.root.rootName&&(t=this._positionToInsert),of(n.model,a,t),this._positionToInsert.detach(),this._positionToInsert=null}),n.plugins.get("Delete").requestUndoOnBackspace()},100)):o.detach()}}n(98);class pf extends Al{constructor(e,t){super(t);const n=t.t;this.focusTracker=new Pi,this.keystrokes=new Ii,this.set("mediaURLInputValue",""),this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),El.check,"ck-button-save"),this.saveButtonView.type="submit",this.saveButtonView.bind("isEnabled").to(this,"mediaURLInputValue",e=>!!e),this.cancelButtonView=this._createButton(n("Cancel"),El.cancel,"ck-button-cancel","cancel"),this._focusables=new Tl,this._focusCycler=new ec({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._validators=e,this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form","ck-responsive-form"],tabindex:"-1"},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]}),Ml(this)}render(){super.render(),Cl({view:this}),[this.urlInputView,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element);const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e),this.listenTo(this.urlInputView.element,"selectstart",(e,t)=>{t.stopPropagation()},{priority:"high"})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.fieldView.element.value.trim()}set url(e){this.urlInputView.fieldView.element.value=e.trim()}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.urlInputView.errorText=t,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const e=this.locale.t,t=new Ac(this.locale,Dc),n=t.fieldView;return this._urlInputViewInfoDefault=e("Paste the media URL in the input."),this._urlInputViewInfoTip=e("Tip: Paste the URL into the content to embed faster."),t.label=e("Media URL"),t.infoText=this._urlInputViewInfoDefault,n.on("input",()=>{t.infoText=n.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault,this.mediaURLInputValue=n.element.value.trim()}),t}_createButton(e,t,n,r){const o=new Zl(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),r&&o.delegate("execute").to(this,r),o}}class mf extends Ye{static get requires(){return[cf]}static get pluginName(){return"MediaEmbedUI"}init(){const e=this.editor,t=e.commands.get("mediaEmbed"),n=e.plugins.get(cf).registry;e.ui.componentFactory.add("mediaEmbed",r=>{const o=_c(r),i=new pf(function(e,t){return[t=>{if(!t.url.length)return e("The URL must not be empty.")},n=>{if(!t.hasMedia(n.url))return e("This media URL is not supported.")}]}(e.t,n),e.locale);return this._setUpDropdown(o,i,t,e),this._setUpForm(o,i,t),o})}_setUpDropdown(e,t,n){const r=this.editor,o=r.t,i=e.buttonView;function a(){r.editing.view.focus(),e.isOpen=!1}e.bind("isEnabled").to(n),e.panelView.children.add(t),i.set({label:o("Insert media"),icon:'',tooltip:!0}),i.on("open",()=>{t.disableCssTransitions(),t.url=n.value||"",t.urlInputView.fieldView.select(),t.focus(),t.enableCssTransitions()},{priority:"low"}),e.on("submit",()=>{t.isValid()&&(r.execute("mediaEmbed",t.url),a())}),e.on("change:isOpen",()=>t.resetFormStatus()),e.on("cancel",()=>a())}_setUpForm(e,t,n){t.delegate("submit","cancel").to(e),t.urlInputView.bind("value").to(n,"value"),t.urlInputView.bind("isReadOnly").to(n,"isEnabled",e=>!e)}}function hf(e){switch(e){case"arabic-leading-zero":return"decimal-leading-zero";case"alpha-upper":return"upper-alpha";case"alpha-lower":return"lower-alpha";case"roman-upper":return"upper-roman";case"roman-lower":return"lower-roman";case"circle":case"disc":case"square":return e;default:return null}}function ff(e,t,n){const r=t.parent,o=n.createElement(e.type),i=r.getChildIndex(t)+1;return n.insertChild(i,o,r),e.style&&n.setStyle("list-style-type",e.style,o),o}function gf(e){const t={},n=e.getStyle("mso-list");if(n){const e=n.match(/(^|\s{1,100})l(\d+)/i),r=n.match(/\s{0,100}lfo(\d+)/i),o=n.match(/\s{0,100}level(\d+)/i);e&&r&&o&&(t.id=e[2],t.order=r[1],t.indent=o[1])}return t}n(100);const bf=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class vf{constructor(e){this.document=e}isActive(e){return bf.test(e)}execute(e){const t=new sd(this.document),{body:n}=e._parsedData;!function(e,t){for(const n of e.getChildren())if(n.is("element","b")&&"normal"===n.getStyle("font-weight")){const r=e.getChildIndex(n);t.remove(n),t.insertChild(r,n.getChildren(),e)}}(n,t),function(e,t){for(const n of t.createRangeIn(e)){const e=n.item;if(e.is("element","li")){const n=e.getChild(0);n&&n.is("element","p")&&t.unwrapElement(n)}}}(n,t),e.content=n}}const yf=//i,_f=/xmlns:o="urn:schemas-microsoft-com/i;class wf{constructor(e){this.document=e}isActive(e){return yf.test(e)||_f.test(e)}execute(e){const{body:t,stylesString:n}=e._parsedData;(function(e,t){if(!e.childCount)return;const n=new sd(e.document),r=function(e,t){const n=t.createRangeIn(e),r=new kn({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),o=[];for(const e of n)if("elementStart"===e.type&&r.match(e.item)){const t=gf(e.item);o.push({element:e.item,id:t.id,order:t.order,indent:t.indent})}return o}(e,n);if(!r.length)return;let o=null,i=1;r.forEach((e,a)=>{const s=function(e,t){if(!e)return!0;if(e.id!==t.id)return t.indent-e.indent!=1;const n=t.element.previousSibling;return!n||!((r=n).is("element","ol")||r.is("element","ul"));var r}(r[a-1],e),l=(d=e,(c=s?null:r[a-1])?d.indent-c.indent:d.indent-1);var c,d;if(s&&(o=null,i=1),!o||0!==l){const r=function(e,t){const n=/mso-level-number-format:([^;]{0,100});/gi,r=new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`,"gi").exec(t);let o="decimal",i="ol";if(r&&r[1]){const t=n.exec(r[1]);if(t&&t[1]&&(o=t[1].trim(),i="bullet"!==o&&"image"!==o?"ol":"ul"),"bullet"===o){const t=function(e){const t=function(e){if(e.getChild(0).is("$text"))return null;for(const t of e.getChildren()){if(!t.is("element","span"))continue;const e=t.getChild(0);return e.is("$text")?e:e.getChild(0)}}(e);if(!t)return null;const n=t._data;return"o"===n?"circle":"·"===n?"disc":"§"===n?"square":null}(e.element);t&&(o=t)}}return{type:i,style:hf(o)}}(e,t);if(o){if(e.indent>i){const e=o.getChild(o.childCount-1),t=e.getChild(e.childCount-1);o=ff(r,t,n),i+=1}else if(e.indente.indexOf(t)>-1)?i.push(n):n.getAttribute("src")||i.push(n)}for(const e of i)n.remove(e)}(function(e,t){const n=t.createRangeIn(e),r=new kn({name:/v:(.+)/}),o=[];for(const e of n){if("elementStart"!=e.type)continue;const t=e.item,n=t.previousSibling&&t.previousSibling.name||null;r.match(t)&&t.getAttribute("o:gfxdata")&&"v:shapetype"!==n&&o.push(e.item.getAttribute("id"))}return o}(e,n),e,n),function(e,t){const n=t.createRangeIn(e),r=new kn({name:/v:(.+)/}),o=[];for(const e of n)"elementStart"==e.type&&r.match(e.item)&&o.push(e.item);for(const e of o)t.remove(e)}(e,n);const r=function(e,t){const n=t.createRangeIn(e),r=new kn({name:"img"}),o=[];for(const e of n)r.match(e.item)&&e.item.getAttribute("src").startsWith("file://")&&o.push(e.item);return o}(e,n);r.length&&function(e,t,n){if(e.length===t.length)for(let o=0;oString.fromCharCode(parseInt(e,16))).join(""))}`;n.setAttribute("src",i,e[o])}var r}(r,function(e){if(!e)return[];const t=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,n=new RegExp("(?:("+t.source+"))([\\da-fA-F\\s]+)\\}","g"),r=e.match(n),o=[];if(r)for(const e of r){let n=!1;e.includes("\\pngblip")?n="image/png":e.includes("\\jpegblip")&&(n="image/jpeg"),n&&o.push({hex:e.replace(t,"").replace(/[^\da-fA-F]/g,""),type:n})}return o}(t),n)}(t,e.dataTransfer.getData("text/rtf")),e.content=t}}function kf(e){return e.replace(/(\s+)<\/span>/g,(e,t)=>1===t.length?" ":Array(t.length+1).join(" ").substr(0,t.length))}function xf(e,t,n,r,o=1){t>o?r.setAttribute(e,t,n):r.removeAttribute(e,n)}function Ef(e,t,n={}){const r=e.createElement("tableCell",n);return e.insertElement("paragraph",r),e.insert(r,t),r}function Sf(e,t){const n=t.parent.parent,r=parseInt(n.getAttribute("headingColumns")||0),{column:o}=e.getCellLocation(t);return!!r&&o{t.on("element:"+e,(e,t,n)=>{if(t.modelRange&&t.viewItem.isEmpty){const e=t.modelRange.start.nodeAfter,r=n.writer.createPositionAt(e,0);n.writer.insertElement("paragraph",r)}},{priority:"low"})}}function Cf(e){let t=0,n=0;const r=Array.from(e.getChildren()).filter(e=>"th"===e.name||"td"===e.name);for(;n1||o>1)&&this._recordSpans(n,o,r),this._shouldSkipSlot()||(t=this._formatOutValue(n)),this._nextCellAtColumn=this._column+r}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._rowIndex++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return void 0!==this._endRow&&this._row>this._endRow}_isOverEndColumn(){return void 0!==this._endColumn&&this._column>this._endColumn}_formatOutValue(e,t=this._row,n=this._column){return{done:!1,value:new Af(this,e,t,n)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._rowthis._endColumn;return e||t||n||r}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,n){const r={cell:e,row:this._row,column:this._column};for(let e=this._row;et.on("insert:table",(t,n,r)=>{const o=n.item;if(!r.consumable.consume(o,"insert"))return;r.consumable.consume(o,"attribute:headingRows:table"),r.consumable.consume(o,"attribute:headingColumns:table");const i=e&&e.asWidget,a=r.writer.createContainerElement("figure",{class:"table"}),s=r.writer.createContainerElement("table");let l;var c,d;r.writer.insert(r.writer.createPositionAt(a,0),s),i&&(c=a,(d=r.writer).setCustomProperty("table",!0,c),l=Pd(c,d,{hasSelectionHandle:!0}));const u=new Tf(o),p={headingRows:o.getAttribute("headingRows")||0,headingColumns:o.getAttribute("headingColumns")||0},m=new Map;for(const t of u){const{row:n,cell:i}=t,a=o.getChild(n),l=m.get(n)||Of(s,a,n,p,r);m.set(n,l),r.consumable.consume(i,"insert"),Nf(t,p,r.writer.createPositionAt(l,"end"),r,e)}for(const e of o.getChildren()){const t=e.index;e.is("element","tableRow")&&!m.has(t)&&m.set(t,Of(s,e,t,p,r))}const h=r.mapper.toViewPosition(n.range.start);r.mapper.bindElements(o,i?l:a),r.writer.insert(h,i?l:a)})}function Lf(e,t){const{writer:n}=t;if(e.parent.is("element","tableCell"))return Pf(e)?n.createContainerElement("span",{class:"ck-table-bogus-paragraph"}):n.createContainerElement("p")}function Pf(e){return 1===e.parent.childCount&&!Yf(e)}function If(e,t,n){const{cell:r}=e,o=Rf(e,t),i=n.mapper.toViewElement(r);i&&i.name!==o&&function(e,t,n){const r=n.writer,o=n.mapper.toViewElement(e),i=Fd(r.createEditableElement(t,o.getAttributes()),r);r.insert(r.createPositionAfter(o),i),r.move(r.createRangeIn(o),r.createPositionAt(i,0)),r.remove(r.createRangeOn(o)),n.mapper.unbindViewElement(o),n.mapper.bindElements(e,i)}(r,o,n)}function Nf(e,t,n,r,o){const i=o&&o.asWidget,a=Rf(e,t),s=i?Fd(r.writer.createEditableElement(a),r.writer):r.writer.createContainerElement(a),l=e.cell,c=l.getChild(0),d=1===l.childCount&&"paragraph"===c.name;if(r.writer.insert(n,s),r.mapper.bindElements(l,s),!i&&d&&!Yf(c)){const e=l.getChild(0);r.consumable.consume(e,"insert"),r.mapper.bindElements(e,s)}}function Of(e,t,n,r,o){o.consumable.consume(t,"insert");const i=t.isEmpty?o.writer.createEmptyElement("tr"):o.writer.createContainerElement("tr");o.mapper.bindElements(t,i);const a=r.headingRows,s=function(e,t,n){return Ff(e,t)||function(e,t,n){const r=n.writer.createContainerElement(e),o=n.writer.createPositionAt(t,"tbody"==e?"end":0);return n.writer.insert(o,r),r}(e,t,n)}(function(e,t){return e0&&n>=a?n-a:n,c=o.writer.createPositionAt(s,l);return o.writer.insert(c,i),i}function Rf(e,t){const{row:n,column:r}=e,{headingColumns:o,headingRows:i}=t;return i&&i>n||o&&o>r?"th":"td"}function Ff(e,t){for(const n of t.getChildren())if(n.name==e)return n}function jf(e,t,n){const r=Ff(e,t);r&&0===r.childCount&&n.writer.remove(n.writer.createRangeOn(r))}function Yf(e){return!![...e.getAttributeKeys()].length}class zf extends He{refresh(){const e=this.editor.model,t=e.document.selection,n=e.schema;this.isEnabled=function(e,t){const n=e.getFirstPosition().parent,r=n===n.root?n:n.parent;return t.checkChild(r,"table")}(t,n)}execute(e={}){const t=this.editor.model,n=t.document.selection,r=this.editor.plugins.get("TableUtils"),o=this.editor.config.get("table"),i=jd(n,t),a=o.defaultHeadings.rows,s=o.defaultHeadings.columns;void 0===e.headingRows&&a&&(e.headingRows=a),void 0===e.headingColumns&&s&&(e.headingColumns=s),t.change(n=>{const o=r.createTable(n,e);t.insertContent(o,i),n.setSelection(n.createPositionAt(o.getNodeByPath([0,0,0]),0))})}}function Hf(e){const t=[];for(const n of qf(e.getRanges())){const e=n.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}function Bf(e){const t=[];for(const n of e.getRanges()){const e=n.start.findAncestor("tableCell");e&&t.push(e)}return t}function Vf(e){const t=Hf(e);return t.length?t:Bf(e)}function Wf(e){return Kf(e.map(e=>e.parent.index))}function Uf(e){const t=e[0].findAncestor("table");return Kf([...new Tf(t)].filter(t=>e.includes(t.cell)).map(e=>e.column))}function Gf(e,t){if(e.length<2||!function(e){const t=e[0].findAncestor("table");if(!Qf(Wf(e),parseInt(t.getAttribute("headingRows")||0)))return!1;const n=parseInt(t.getAttribute("headingColumns")||0);return Qf(Uf(e),n)}(e))return!1;const n=new Set,r=new Set;let o=0;for(const i of e){const{row:e,column:a}=t.getCellLocation(i),s=parseInt(i.getAttribute("rowspan")||1),l=parseInt(i.getAttribute("colspan")||1);n.add(e),r.add(a),s>1&&n.add(e+s-1),l>1&&r.add(a+l-1),o+=s*l}return function(e,t){const n=Array.from(e.values()),r=Array.from(t.values());return(Math.max(...n)-Math.min(...n)+1)*(Math.max(...r)-Math.min(...r)+1)}(n,r)==o}function qf(e){return Array.from(e).sort(Xf)}function Kf(e){const t=e.sort((e,t)=>e-t);return{first:t[0],last:t[t.length-1]}}function Xf(e,t){const n=e.start,r=t.start;return n.isBefore(r)?-1:1}function Qf({first:e,last:t},n){return e0&&xf("headingRows",i-n,e,o,0);const a=parseInt(t.getAttribute("headingColumns")||0);a>0&&xf("headingColumns",a-r,e,o,0)}(s,e,r,o,n),s}function tg(e,t,n=0){const r=[],o=new Tf(e,{startRow:n,endRow:t-1});for(const e of o){const{row:n,cellHeight:o}=e;n1&&(s.rowspan=l);const c=parseInt(e.getAttribute("colspan")||1);c>1&&(s.colspan=c);const d=i+a,u=[...new Tf(o,{startRow:i,endRow:d,includeAllSlots:!0})];let p,m=null;for(const t of u){const{row:r,column:o,cell:i}=t;i===e&&void 0===p&&(p=o),void 0!==p&&p===o&&r===d&&(m=Ef(n,t.getPositionBefore(),s))}return xf("rowspan",a,e,n),m}function rg(e,t){const n=[],r=new Tf(e);for(const e of r){const{column:r,cellWidth:o}=e;r1&&(i.colspan=a);const s=parseInt(e.getAttribute("rowspan")||1);s>1&&(i.rowspan=s);const l=Ef(r,r.createPositionAfter(e),i);return xf("colspan",o,e,r),l}function ig(e,t,n,r,o,i){const a=parseInt(e.getAttribute("colspan")||1),s=parseInt(e.getAttribute("rowspan")||1);n+a-1>o&&xf("colspan",o-n+1,e,i,1),t+s-1>r&&xf("rowspan",r-t+1,e,i,1)}function ag(e,t){const n=t.getColumns(e),r=new Array(n).fill(0);for(const{column:t}of new Tf(e))r[t]++;const o=r.reduce((e,t,n)=>t?e:[...e,n],[]);if(o.length>0){const n=o[o.length-1];return t.removeColumns(e,{at:n}),!0}return!1}function sg(e,t){const n=[],r=t.getRows(e);for(let t=0;t0){const r=n[n.length-1];return t.removeRows(e,{at:r}),!0}return!1}function lg(e,t){ag(e,t)||sg(e,t)}function cg(e,t){const n=Array.from(new Tf(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(n.every(({cellHeight:e})=>1===e))return t.lastRow;const r=n[0].cellHeight-1;return t.lastRow+r}function dg(e,t){const n=Array.from(new Tf(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(n.every(({cellWidth:e})=>1===e))return t.lastColumn;const r=n[0].cellWidth-1;return t.lastColumn+r}class ug extends He{constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,t=Bf(e.document.selection)[0],n=this.value,r=this.direction;e.change(e=>{const o="right"==r||"down"==r,i=o?t:n,a=o?n:t,s=a.parent;!function(e,t,n){pg(e)||(pg(t)&&n.remove(n.createRangeIn(t)),n.move(n.createRangeIn(e),n.createPositionAt(t,"end"))),n.remove(e)}(a,i,e);const l=this.isHorizontal?"colspan":"rowspan",c=parseInt(t.getAttribute(l)||1),d=parseInt(n.getAttribute(l)||1);e.setAttribute(l,c+d,i),e.setSelection(e.createRangeIn(i));const u=this.editor.plugins.get("TableUtils");lg(s.findAncestor("table"),u)})}_getMergeableCell(){const e=Bf(this.editor.model.document.selection)[0];if(!e)return;const t=this.editor.plugins.get("TableUtils"),n=this.isHorizontal?function(e,t,n){const r=e.parent.parent,o="right"==t?e.nextSibling:e.previousSibling,i=(r.getAttribute("headingColumns")||0)>0;if(!o)return;const a="right"==t?e:o,s="right"==t?o:e,{column:l}=n.getCellLocation(a),{column:c}=n.getCellLocation(s),d=parseInt(a.getAttribute("colspan")||1),u=Sf(n,a),p=Sf(n,s);return i&&u!=p?void 0:l+d===c?o:void 0}(e,this.direction,t):function(e,t,n){const r=e.parent,o=r.parent,i=o.getChildIndex(r);if("down"==t&&i===n.getRows(o)-1||"up"==t&&0===i)return;const a=parseInt(e.getAttribute("rowspan")||1),s=o.getAttribute("headingRows")||0;if(s&&("down"==t&&i+a===s||"up"==t&&i===s))return;const l=parseInt(e.getAttribute("rowspan")||1),c="down"==t?i+l:i,d=[...new Tf(o,{endRow:c})],u=d.find(t=>t.cell===e).column,p=d.find(({row:e,cellHeight:n,column:r})=>r===u&&("down"==t?e===c:c===e+n));return p&&p.cell}(e,this.direction,t);if(!n)return;const r=this.isHorizontal?"rowspan":"colspan",o=parseInt(e.getAttribute(r)||1);return parseInt(n.getAttribute(r)||1)===o?n:void 0}}function pg(e){return 1==e.childCount&&e.getChild(0).is("element","paragraph")&&e.getChild(0).isEmpty}class mg extends He{refresh(){const e=Vf(this.editor.model.document.selection),t=e[0];if(t){const n=t.findAncestor("table"),r=this.editor.plugins.get("TableUtils").getRows(n)-1,o=Wf(e),i=0===o.first&&o.last===r;this.isEnabled=!i}else this.isEnabled=!1}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),n=Vf(e.document.selection),r=Wf(n),o=n[0],i=o.findAncestor("table"),a=t.getCellLocation(o).column;e.change(e=>{const n=r.last-r.first+1;t.removeRows(i,{at:r.first,rows:n});const o=function(e,t,n,r){const o=e.getChild(Math.min(t,r-1));let i=o.getChild(0),a=0;for(const e of o.getChildren()){if(a>n)return i;i=e,a+=parseInt(e.getAttribute("colspan")||1)}return i}(i,r.first,a,t.getRows(i));e.setSelection(e.createPositionAt(o,0))})}}class hg extends He{refresh(){const e=Vf(this.editor.model.document.selection),t=e[0];if(t){const n=t.findAncestor("table"),r=this.editor.plugins.get("TableUtils").getColumns(n),{first:o,last:i}=Uf(e);this.isEnabled=i-ot.cell===e).column,last:r.find(e=>e.cell===t).column},i=function(e,t,n,r){return parseInt(n.getAttribute("colspan")||1)>1?n:t.previousSibling||n.nextSibling?n.nextSibling||t.previousSibling:r.first?e.reverse().find(({column:e})=>ee>r.last).cell}(r,e,t,o);this.editor.model.change(e=>{const t=o.last-o.first+1;this.editor.plugins.get("TableUtils").removeColumns(n,{at:o.first,columns:t}),e.setSelection(e.createPositionAt(i,0))})}}class fg extends He{refresh(){const e=Vf(this.editor.model.document.selection),t=e.length>0;this.isEnabled=t,this.value=t&&e.every(e=>this._isInHeading(e,e.parent.parent))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.model,n=Vf(t.document.selection),r=n[0].findAncestor("table"),{first:o,last:i}=Wf(n),a=this.value?o:i+1,s=r.getAttribute("headingRows")||0;t.change(e=>{if(a){const t=tg(r,a,a>s?s:0);for(const{cell:n}of t)ng(n,a,e)}xf("headingRows",a,r,e,0)})}_isInHeading(e,t){const n=parseInt(t.getAttribute("headingRows")||0);return!!n&&e.parent.index0;this.isEnabled=n,this.value=n&&e.every(e=>Sf(t,e))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.model,n=Vf(t.document.selection),r=n[0].findAncestor("table"),{first:o,last:i}=Uf(n),a=this.value?o:i+1;t.change(e=>{if(a){const t=rg(r,a);for(const{cell:n,column:r}of t)og(n,r,a,e)}xf("headingColumns",a,r,e,0)})}}class bg extends Ye{static get pluginName(){return"TableUtils"}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const t=e.parent,n=t.parent,r=n.getChildIndex(t),o=new Tf(n,{row:r});for(const{cell:t,row:n,column:r}of o)if(t===e)return{row:n,column:r}}createTable(e,t){const n=e.createElement("table"),r=parseInt(t.rows)||2,o=parseInt(t.columns)||2;return vg(e,n,0,r,o),t.headingRows&&xf("headingRows",Math.min(t.headingRows,r),n,e,0),t.headingColumns&&xf("headingColumns",Math.min(t.headingColumns,o),n,e,0),n}insertRows(e,t={}){const n=this.editor.model,r=t.at||0,o=t.rows||1,i=void 0!==t.copyStructureFromAbove,a=t.copyStructureFromAbove?r-1:r,l=this.getRows(e),c=this.getColumns(e);if(r>l)throw new s.a("tableutils-insertrows-insert-out-of-range",this,{options:t});n.change(t=>{const n=e.getAttribute("headingRows")||0;if(n>r&&xf("headingRows",n+o,e,t,0),!i&&(0===r||r===l))return void vg(t,e,r,o,c);const s=i?Math.max(r,a):r,d=new Tf(e,{endRow:s}),u=new Array(c).fill(1);for(const{row:e,column:n,cellHeight:s,cellWidth:l,cell:c}of d){const d=e+s-1,p=e<=a&&a<=d;e0&&Ef(t,o,r>1?{colspan:r}:null),e+=Math.abs(r)-1}}})}insertColumns(e,t={}){const n=this.editor.model,r=t.at||0,o=t.columns||1;n.change(t=>{const n=e.getAttribute("headingColumns");ro-1)throw new s.a("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});n.change(t=>{const{cellsToMove:n,cellsToTrim:r}=function(e,t,n){const r=new Map,o=[];for(const{row:i,column:a,cellHeight:s,cell:l}of new Tf(e,{endRow:n})){const e=i+s-1;if(i>=t&&i<=n&&e>n){const e=s-(n-i+1);r.set(a,{cell:l,rowspan:e})}if(i=t){let r;r=e>=n?n-t+1:e-t+1,o.push({cell:l,rowspan:s-r})}}return{cellsToMove:r,cellsToTrim:o}}(e,i,a);n.size&&function(e,t,n,r){const o=[...new Tf(e,{includeAllSlots:!0,row:t})],i=e.getChild(t);let a;for(const{column:e,cell:t,isAnchor:s}of o)if(n.has(e)){const{cell:t,rowspan:o}=n.get(e),s=a?r.createPositionAfter(a):r.createPositionAt(i,0);r.move(r.createRangeOn(t),s),xf("rowspan",o,t,r),a=t}else s&&(a=t)}(e,a+1,n,t);for(let n=a;n>=i;n--)t.remove(e.getChild(n));for(const{rowspan:e,cell:n}of r)xf("rowspan",e,n,t);!function(e,t,n,r){const o=e.getAttribute("headingRows")||0;t{!function(e,t,n){const r=e.getAttribute("headingColumns")||0;if(r&&t.first=r;n--)for(const{cell:r,column:o,cellWidth:i}of[...new Tf(e)])o<=n&&i>1&&o+i>n?xf("colspan",i-1,r,t):o===n&&t.remove(r);sg(e,this)||ag(e,this)})}splitCellVertically(e,t=2){const n=this.editor.model,r=e.parent.parent,o=parseInt(e.getAttribute("rowspan")||1),i=parseInt(e.getAttribute("colspan")||1);n.change(n=>{if(i>1){const{newCellsSpan:r,updatedSpan:a}=_g(i,t);xf("colspan",a,e,n);const s={};r>1&&(s.colspan=r),o>1&&(s.rowspan=o),yg(i>t?t-1:i-1,n,n.createPositionAfter(e),s)}if(it===e),c=s.filter(({cell:t,cellWidth:n,column:r})=>t!==e&&r===l||rl);for(const{cell:e,cellWidth:t}of c)n.setAttribute("colspan",t+a,e);const d={};o>1&&(d.rowspan=o),yg(a,n,n.createPositionAfter(e),d);const u=r.getAttribute("headingColumns")||0;u>l&&xf("headingColumns",u+a,r,n)}})}splitCellHorizontally(e,t=2){const n=this.editor.model,r=e.parent,o=r.parent,i=o.getChildIndex(r),a=parseInt(e.getAttribute("rowspan")||1),s=parseInt(e.getAttribute("colspan")||1);n.change(n=>{if(a>1){const r=[...new Tf(o,{startRow:i,endRow:i+a-1,includeAllSlots:!0})],{newCellsSpan:l,updatedSpan:c}=_g(a,t);xf("rowspan",c,e,n);const{column:d}=r.find(({cell:t})=>t===e),u={};l>1&&(u.rowspan=l),s>1&&(u.colspan=s);for(const e of r){const{column:t,row:r}=e;r>=i+c&&t===d&&(r+i+c)%l==0&&yg(1,n,e.getPositionBefore(),u)}}if(ai){const e=o+r;n.setAttribute("rowspan",e,t)}const c={};s>1&&(c.colspan=s),vg(n,o,i+1,r,1,c);const d=o.getAttribute("headingRows")||0;d>i&&xf("headingRows",d+r,o,n)}})}getColumns(e){return[...e.getChild(0).getChildren()].reduce((e,t)=>e+parseInt(t.getAttribute("colspan")||1),0)}getRows(e){return Array.from(e.getChildren()).reduce((e,t)=>t.is("element","tableRow")?e+1:e,0)}}function vg(e,t,n,r,o,i={}){for(let a=0;a{const r=Hf(e.document.selection),o=r.shift(),{mergeWidth:i,mergeHeight:a}=function(e,t,n){let r=0,o=0;for(const e of t){const{row:t,column:i}=n.getCellLocation(e);r=Eg(e,i,r,"colspan"),o=Eg(e,t,o,"rowspan")}const{row:i,column:a}=n.getCellLocation(e);return{mergeWidth:r-a,mergeHeight:o-i}}(o,r,t);xf("colspan",i,o,n),xf("rowspan",a,o,n);for(const e of r)kg(e,o,n);lg(o.findAncestor("table"),t),n.setSelection(o,"in")})}}function kg(e,t,n){xg(e)||(xg(t)&&n.remove(n.createRangeIn(t)),n.move(n.createRangeIn(e),n.createPositionAt(t,"end"))),n.remove(e)}function xg(e){return 1==e.childCount&&e.getChild(0).is("element","paragraph")&&e.getChild(0).isEmpty}function Eg(e,t,n,r){const o=parseInt(e.getAttribute(r)||1);return Math.max(n,t+o)}class Sg extends He{constructor(e){super(e),this.affectsData=!1}refresh(){const e=Vf(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=Vf(e.document.selection),n=Wf(t),r=t[0].findAncestor("table"),o=[];for(let t=n.first;t<=n.last;t++)for(const n of r.getChild(t).getChildren())o.push(e.createRangeOn(n));e.change(e=>{e.setSelection(o)})}}class Mg extends He{constructor(e){super(e),this.affectsData=!1}refresh(){const e=Vf(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=Vf(e.document.selection),n=t[0],r=t.pop(),o=n.findAncestor("table"),i=this.editor.plugins.get("TableUtils"),a=i.getCellLocation(n),s=i.getCellLocation(r),l=Math.min(a.column,s.column),c=Math.max(a.column,s.column),d=[];for(const t of new Tf(o,{startColumn:l,endColumn:c}))d.push(e.createRangeOn(t.cell));e.change(e=>{e.setSelection(d)})}}function Cg(e,t){let n=!1;const r=function(e){const t=parseInt(e.getAttribute("headingRows")||0),n=Array.from(e.getChildren()).reduce((e,t)=>t.is("element","tableRow")?e+1:e,0),r=[];for(const{row:o,cell:i,cellHeight:a}of new Tf(e)){if(a<2)continue;const e=oe){const t=e-o;r.push({cell:i,rowspan:t})}}return r}(e);if(r.length){n=!0;for(const e of r)xf("rowspan",e.rowspan,e.cell,t,1)}return n}function Tg(e,t){let n=!1;const r=function(e){const t=new Array(e.childCount).fill(0);for(const{rowIndex:n}of new Tf(e,{includeAllSlots:!0}))t[n]++;return t}(e),o=[];for(const[t,n]of r.entries())!n&&e.getChild(t).is("element","tableRow")&&o.push(t);if(o.length){n=!0;for(const n of o.reverse())t.remove(e.getChild(n)),r.splice(n,1)}const i=r.filter((t,n)=>e.getChild(n).is("element","tableRow")),a=i[0];if(!i.every(e=>e===a)){const r=i.reduce((e,t)=>t>e?t:e,0);for(const[o,a]of i.entries()){const i=r-a;if(i){for(let n=0;ne.is("$text"));for(const e of n)t.wrap(t.createRangeOn(e),"paragraph");return!!n.length}function Ig(e){return!(!e.position||!e.position.parent.is("element","tableCell"))&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function Ng(e,t){if(!e.is("element","paragraph"))return!1;const n=t.toViewElement(e);return!!n&&Pf(e)!==n.is("element","span")}n(102);class Og extends Ye{static get pluginName(){return"TableEditing"}init(){const e=this.editor,t=e.model,n=t.schema,r=e.conversion;n.register("table",{allowWhere:"$block",allowAttributes:["headingRows","headingColumns"],isObject:!0,isBlock:!0}),n.register("tableRow",{allowIn:"table",isLimit:!0}),n.register("tableCell",{allowIn:"tableRow",allowChildren:"$block",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),r.for("upcast").add(e=>{e.on("element:figure",(e,t,n)=>{if(!n.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const r=function(e){for(const t of e.getChildren())if(t.is("element","table"))return t}(t.viewItem);if(!r||!n.consumable.test(r,{name:!0}))return;n.consumable.consume(t.viewItem,{name:!0,classes:"table"});const o=Li(n.convertItem(r,t.modelCursor).modelRange.getItems());o?(n.convertChildren(t.viewItem,n.writer.createPositionAt(o,"end")),n.updateConversionResult(o,t)):n.consumable.revert(t.viewItem,{name:!0,classes:"table"})})}),r.for("upcast").add(e=>{e.on("element:table",(e,t,n)=>{const r=t.viewItem;if(!n.consumable.test(r,{name:!0}))return;const{rows:o,headingRows:i,headingColumns:a}=function(e){const t={headingRows:0,headingColumns:0},n=[],r=[];let o;for(const i of Array.from(e.getChildren()))if("tbody"===i.name||"thead"===i.name||"tfoot"===i.name){"thead"!==i.name||o||(o=i);const e=Array.from(i.getChildren()).filter(e=>e.is("element","tr"));for(const i of e)if("thead"===i.parent.name&&i.parent===o)t.headingRows++,n.push(i);else{r.push(i);const e=Cf(i);e>t.headingColumns&&(t.headingColumns=e)}}return t.rows=[...n,...r],t}(r),s={};a&&(s.headingColumns=a),i&&(s.headingRows=i);const l=n.writer.createElement("table",s);if(n.safeInsert(l,t.modelCursor)){if(n.consumable.consume(r,{name:!0}),o.forEach(e=>n.convertItem(e,n.writer.createPositionAt(l,"end"))),n.convertChildren(r,n.writer.createPositionAt(l,"end")),l.isEmpty){const e=n.writer.createElement("tableRow");n.writer.insert(e,n.writer.createPositionAt(l,"end")),Ef(n.writer,n.writer.createPositionAt(e,"end"))}n.updateConversionResult(l,t)}})}),r.for("editingDowncast").add(Df({asWidget:!0})),r.for("dataDowncast").add(Df()),r.for("upcast").elementToElement({model:"tableRow",view:"tr"}),r.for("upcast").add(e=>{e.on("element:tr",(e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()},{priority:"high"})}),r.for("editingDowncast").add(e=>e.on("insert:tableRow",(e,t,n)=>{const r=t.item;if(!n.consumable.consume(r,"insert"))return;const o=r.parent,i=function(e){for(const t of e.getChildren())if("table"===t.name)return t}(n.mapper.toViewElement(o)),a=o.getChildIndex(r),s=new Tf(o,{row:a}),l={headingRows:o.getAttribute("headingRows")||0,headingColumns:o.getAttribute("headingColumns")||0},c=new Map;for(const e of s){const t=c.get(a)||Of(i,r,a,l,n);c.set(a,t),n.consumable.consume(e.cell,"insert"),Nf(e,l,n.writer.createPositionAt(t,"end"),n,{asWidget:!0})}})),r.for("editingDowncast").add(e=>e.on("remove:tableRow",(e,t,n)=>{e.stop();const r=n.writer,o=n.mapper,i=o.toViewPosition(t.position).getLastMatchingPosition(e=>!e.item.is("element","tr")).nodeAfter,a=i.parent.parent,s=r.createRangeOn(i),l=r.remove(s);for(const e of r.createRangeIn(l).getItems())o.unbindViewElement(e);jf("thead",a,n),jf("tbody",a,n)},{priority:"higher"})),r.for("upcast").elementToElement({model:"tableCell",view:"td"}),r.for("upcast").elementToElement({model:"tableCell",view:"th"}),r.for("upcast").add(Mf("td")),r.for("upcast").add(Mf("th")),r.for("editingDowncast").add(e=>e.on("insert:tableCell",(e,t,n)=>{const r=t.item;if(!n.consumable.consume(r,"insert"))return;const o=r.parent,i=o.parent,a=i.getChildIndex(o),s=new Tf(i,{row:a}),l={headingRows:i.getAttribute("headingRows")||0,headingColumns:i.getAttribute("headingColumns")||0};for(const e of s)if(e.cell===r){const t=n.mapper.toViewElement(o);return void Nf(e,l,n.writer.createPositionAt(t,o.getChildIndex(r)),n,{asWidget:!0})}})),r.for("editingDowncast").elementToElement({model:"paragraph",view:Lf,converterPriority:"high"}),r.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),r.for("upcast").attributeToAttribute({model:{key:"colspan",value:Rg("colspan")},view:"colspan"}),r.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),r.for("upcast").attributeToAttribute({model:{key:"rowspan",value:Rg("rowspan")},view:"rowspan"}),r.for("editingDowncast").add(e=>e.on("attribute:headingColumns:table",(e,t,n)=>{const r=t.item;if(!n.consumable.consume(t.item,e.name))return;const o={headingRows:r.getAttribute("headingRows")||0,headingColumns:r.getAttribute("headingColumns")||0},i=t.attributeOldValue,a=t.attributeNewValue,s=(i>a?i:a)-1;for(const e of new Tf(r,{endColumn:s}))If(e,o,n)})),e.data.mapper.on("modelToViewPosition",(e,t)=>{const n=t.modelPosition.parent,r=t.modelPosition.nodeBefore;if(!n.is("element","tableCell"))return;if(!r||!r.is("element","paragraph"))return;const o=t.mapper.toViewElement(r),i=t.mapper.toViewElement(n);o===i&&(t.viewPosition=t.mapper.findPositionIn(i,r.maxOffset))}),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.commands.add("insertTable",new zf(e)),e.commands.add("insertTableRowAbove",new Jf(e,{order:"above"})),e.commands.add("insertTableRowBelow",new Jf(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new Zf(e,{order:"left"})),e.commands.add("insertTableColumnRight",new Zf(e,{order:"right"})),e.commands.add("removeTableRow",new mg(e)),e.commands.add("removeTableColumn",new hg(e)),e.commands.add("splitTableCellVertically",new $f(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new $f(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new wg(e)),e.commands.add("mergeTableCellRight",new ug(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new ug(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new ug(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new ug(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new gg(e)),e.commands.add("setTableRowHeader",new fg(e)),e.commands.add("selectTableRow",new Sg(e)),e.commands.add("selectTableColumn",new Mg(e)),function(e){e.document.registerPostFixer(()=>function(e){const t=e.document.differ,n=new Set;for(const e of t.getChanges())if("attribute"===e.type){const t=e.range.start.nodeAfter;t&&t.is("element","table")&&"headingRows"===e.attributeKey&&n.add(t)}else if("insert"===e.type||"remove"===e.type)if("tableRow"===e.name){const t=e.position.findAncestor("table"),r=t.getAttribute("headingRows")||0;e.position.offsetfunction(e,t){const n=t.document.differ.getChanges();let r=!1;const o=new Set;for(const t of n){let n;"table"==t.name&&"insert"==t.type&&(n=t.position.nodeAfter),"tableRow"!=t.name&&"tableCell"!=t.name||(n=t.position.findAncestor("table")),Ag(t)&&(n=t.range.start.findAncestor("table")),n&&!o.has(n)&&(r=Cg(n,e)||r,r=Tg(n,e)||r,o.add(n))}return r}(t,e))}(t),function(e,t){e.document.registerPostFixer(()=>function(e,t){const n=new Set;for(const t of e.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","tableCell")&&n.add(e)}for(const r of n.values())for(const n of[...r.getChildren()].filter(e=>Ng(e,t)))e.refreshItem(n);return!1}(e.document.differ,t))}(t,e.editing.mapper),function(e){e.document.registerPostFixer(t=>function(e,t){const n=t.document.differ.getChanges();let r=!1;for(const t of n)"insert"==t.type&&"table"==t.name&&(r=Dg(t.position.nodeAfter,e)||r),"insert"==t.type&&"tableRow"==t.name&&(r=Lg(t.position.nodeAfter,e)||r),"insert"==t.type&&"tableCell"==t.name&&(r=Pg(t.position.nodeAfter,e)||r),Ig(t)&&(r=Pg(t.position.parent,e)||r);return r}(t,e))}(t)}static get requires(){return[bg]}}function Rg(e){return t=>{const n=parseInt(t.getAttribute(e));return Number.isNaN(n)||n<=0?null:n}}n(104);class Fg extends Al{constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",(e,t)=>`${t} × ${e}`),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":t.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck-insert-table-dropdown__label"]},children:[{text:t.to("label")}]}],on:{mousedown:t.to(e=>{e.preventDefault()}),click:t.to(()=>{this.fire("execute")})}}),this.on("boxover",(e,t)=>{const{row:n,column:r}=t.target.dataset;this.set({rows:parseInt(n),columns:parseInt(r)})}),this.on("change:columns",()=>{this._highlightGridBoxes()}),this.on("change:rows",()=>{this._highlightGridBoxes()})}focus(){}focusLast(){}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map((n,r)=>{const o=Math.floor(r/10){const r=e.commands.get("insertTable"),o=_c(n);let i;return o.bind("isEnabled").to(r),o.buttonView.set({icon:'',label:t("Insert table"),tooltip:!0}),o.on("change:isOpen",()=>{i||(i=new Fg(n),o.panelView.children.add(i),i.delegate("execute").to(o),o.buttonView.on("open",()=>{i.rows=0,i.columns=0}),o.on("execute",()=>{e.execute("insertTable",{rows:i.rows,columns:i.columns}),e.editing.view.focus()}))}),o}),e.ui.componentFactory.add("tableColumn",e=>{const r=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:n?"insertTableColumnLeft":"insertTableColumnRight",label:t("Insert column left")}},{type:"button",model:{commandName:n?"insertTableColumnRight":"insertTableColumnLeft",label:t("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:t("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:t("Select column")}}];return this._prepareDropdown(t("Column"),'',r,e)}),e.ui.componentFactory.add("tableRow",e=>{const n=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:t("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:t("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:t("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:t("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:t("Select row")}}];return this._prepareDropdown(t("Row"),'',n,e)}),e.ui.componentFactory.add("mergeTableCells",e=>{const r=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("Merge cell up")}},{type:"button",model:{commandName:n?"mergeTableCellRight":"mergeTableCellLeft",label:t("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("Merge cell down")}},{type:"button",model:{commandName:n?"mergeTableCellLeft":"mergeTableCellRight",label:t("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:t("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:t("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(t("Merge cells"),'',r,e)})}_prepareDropdown(e,t,n,r){const o=this.editor,i=_c(r),a=this._fillDropdownWithListOptions(i,n);return i.buttonView.set({label:e,icon:t,tooltip:!0}),i.bind("isEnabled").toMany(a,"isEnabled",(...e)=>e.some(e=>e)),this.listenTo(i,"execute",e=>{o.execute(e.source.commandName),o.editing.view.focus()}),i}_prepareMergeSplitButtonDropdown(e,t,n,r){const o=this.editor,i=_c(r,oc),a=o.commands.get("mergeTableCells"),s=this._fillDropdownWithListOptions(i,n);return i.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),i.bind("isEnabled").toMany([a,...s],"isEnabled",(...e)=>e.some(e=>e)),this.listenTo(i.buttonView,"execute",()=>{o.execute("mergeTableCells"),o.editing.view.focus()}),this.listenTo(i,"execute",e=>{o.execute(e.source.commandName),o.editing.view.focus()}),i}_fillDropdownWithListOptions(e,t){const n=this.editor,r=[],o=new ln;for(const e of t)zg(e,n,r,o);return kc(e,o,n.ui.componentFactory),r}}function zg(e,t,n,r){const o=e.model=new Pc(e.model),{commandName:i,bindIsOn:a}=e.model;if("button"===e.type||"switchbutton"===e.type){const e=t.commands.get(i);n.push(e),o.set({commandName:i}),o.bind("isEnabled").to(e),a&&o.bind("isOn").to(e,"value")}o.set({withText:!0}),r.add(e)}n(106);class Hg extends Ye{static get pluginName(){return"TableSelection"}static get requires(){return[bg]}init(){const e=this.editor.model;this.listenTo(e,"deleteContent",(e,t)=>this._handleDeleteContent(e,t),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=Hf(this.editor.model.document.selection);return 0==e.length?null:e}getSelectionAsFragment(){const e=this.getSelectedTableCells();return e?this.editor.model.change(t=>{const n=t.createDocumentFragment(),r=this.editor.plugins.get("TableUtils"),{first:o,last:i}=Uf(e),{first:a,last:s}=Wf(e),l=e[0].findAncestor("table");let c=s,d=i;if(Gf(e,r)){const e={firstColumn:o,lastColumn:i,firstRow:a,lastRow:s};c=cg(l,e),d=dg(l,e)}const u=eg(l,{startRow:a,startColumn:o,endRow:c,endColumn:d},t);return t.insert(u,n,0),n}):null}setCellSelection(e,t){const n=this._getCellsToSelect(e,t);this.editor.model.change(e=>{e.setSelection(n.cells.map(t=>e.createRangeOn(t)),{backward:n.backward})})}getFocusCell(){const e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){const e=Li(this.editor.model.document.selection.getRanges()).getContainedElement();return e&&e.is("element","tableCell")?e:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add(e=>e.on("selection",(e,n,r)=>{const o=r.writer;!function(e){for(const n of t)e.removeClass("ck-editor__editable_selected",n);t.clear()}(o);const i=this.getSelectedTableCells();if(!i)return;for(const e of i){const n=r.mapper.toViewElement(e);o.addClass("ck-editor__editable_selected",n),t.add(n)}const a=r.mapper.toViewElement(i[i.length-1]);o.setSelection(a,0)},{priority:"lowest"}))}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",()=>{if(!this.isEnabled){const t=this.getSelectedTableCells();if(!t)return;e.model.change(n=>{const r=n.createPositionAt(t[0],0),o=e.model.schema.getNearestSelectionRange(r);n.setSelection(o)})}})}_handleDeleteContent(e,t){const[n,r]=t,o=this.editor.model,i=!r||"backward"==r.direction,a=Hf(n);a.length&&(e.stop(),o.change(e=>{const t=a[i?a.length-1:0];o.change(e=>{for(const t of a)o.deleteContent(e.createSelection(t,"in"))});const r=o.schema.getNearestSelectionRange(e.createPositionAt(t,0));n.is("documentSelection")?e.setSelection(r):n.setTo(r)}))}_getCellsToSelect(e,t){const n=this.editor.plugins.get("TableUtils"),r=n.getCellLocation(e),o=n.getCellLocation(t),i=Math.min(r.row,o.row),a=Math.max(r.row,o.row),s=Math.min(r.column,o.column),l=Math.max(r.column,o.column),c=new Array(a-i+1).fill(null).map(()=>[]),d={startRow:i,endRow:a,startColumn:s,endColumn:l};for(const{row:t,cell:n}of new Tf(e.findAncestor("table"),d))c[t-i].push(n);const u=o.rowe.reverse()),{cells:c.flat(),backward:u||p}}}class Bg extends Ye{static get pluginName(){return"TableClipboard"}static get requires(){return[Hg,bg]}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"copy",(e,t)=>this._onCopyCut(e,t)),this.listenTo(t,"cut",(e,t)=>this._onCopyCut(e,t)),this.listenTo(e.model,"insertContent",(e,t)=>this._onInsertContent(e,...t),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(e,t){const n=this.editor.plugins.get(Hg);if(!n.getSelectedTableCells())return;if("cut"==e.name&&this.editor.isReadOnly)return;t.preventDefault(),e.stop();const r=this.editor.data,o=this.editor.editing.view.document,i=r.toView(n.getSelectionAsFragment());o.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:i,method:e.name})}_onInsertContent(e,t,n){if(n&&!n.is("documentSelection"))return;const r=this.editor.model,o=this.editor.plugins.get(bg);let i=function(e,t){if(!e.is("documentFragment")&&!e.is("element"))return null;if(e.is("element","table"))return e;if(1==e.childCount&&e.getChild(0).is("element","table"))return e.getChild(0);const n=t.createRangeIn(e);for(const e of n.getItems())if(e.is("element","table")){const r=t.createRange(n.start,t.createPositionBefore(e));if(t.hasContent(r,{ignoreWhitespaces:!0}))return null;const o=t.createRange(t.createPositionAfter(e),n.end);return t.hasContent(o,{ignoreWhitespaces:!0})?null:e}return null}(t,r);if(!i)return;const a=Vf(r.document.selection);a.length?(e.stop(),r.change(e=>{const t={width:o.getColumns(i),height:o.getRows(i)},n=function(e,t,n,r){const o=e[0].findAncestor("table"),i=Uf(e),a=Wf(e),s={firstColumn:i.first,lastColumn:i.last,firstRow:a.first,lastRow:a.last},l=1===e.length;return l&&(s.lastRow+=t.height-1,s.lastColumn+=t.width-1,function(e,t,n,r){const o=r.getColumns(e),i=r.getRows(e);n>o&&r.insertColumns(e,{at:o,columns:n-o}),t>i&&r.insertRows(e,{at:i,rows:t-i})}(o,s.lastRow+1,s.lastColumn+1,r)),l||!Gf(e,r)?function(e,t,n){const{firstRow:r,lastRow:o,firstColumn:i,lastColumn:a}=t,s={first:r,last:o},l={first:i,last:a};Wg(e,i,s,n),Wg(e,a+1,s,n),Vg(e,r,l,n),Vg(e,o+1,l,n,r)}(o,s,n):(s.lastRow=cg(o,s),s.lastColumn=dg(o,s)),s}(a,t,e,o),r=n.lastRow-n.firstRow+1,s=n.lastColumn-n.firstColumn+1,l={startRow:0,startColumn:0,endRow:Math.min(r,t.height)-1,endColumn:Math.min(s,t.width)-1};i=eg(i,l,e);const c=a[0].findAncestor("table"),d=this._replaceSelectedCellsWithPasted(i,t,c,n,e);if(this.editor.plugins.get("TableSelection").isEnabled){const t=qf(d.map(t=>e.createRangeOn(t)));e.setSelection(t)}else e.setSelection(d[0],0)})):lg(i,o)}_replaceSelectedCellsWithPasted(e,t,n,r,o){const{width:i,height:a}=t,s=function(e,t,n){const r=new Array(n).fill(null).map(()=>new Array(t).fill(null));for(const{column:t,row:n,cell:o}of new Tf(e))r[n][t]=o;return r}(e,i,a),l=[...new Tf(n,{startRow:r.firstRow,endRow:r.lastRow,startColumn:r.firstColumn,endColumn:r.lastColumn,includeAllSlots:!0})],c=[];let d;for(const e of l){const{row:t,column:n}=e;n===r.firstColumn&&(d=e.getPositionBefore());const l=t-r.firstRow,u=n-r.firstColumn,p=s[l%a][u%i],m=p?o.cloneElement(p):null,h=this._replaceTableSlotCell(e,m,d,o);h&&(ig(h,t,n,r.lastRow,r.lastColumn,o),c.push(h),d=o.createPositionAfter(h))}const u=parseInt(n.getAttribute("headingRows")||0),p=parseInt(n.getAttribute("headingColumns")||0),m=r.firstRowUg(e,t,n)).map(({cell:e})=>ng(e,t,r))}function Wg(e,t,n,r){if(!(t<1))return rg(e,t).filter(({row:e,cellHeight:t})=>Ug(e,t,n)).map(({cell:e,column:n})=>og(e,n,t,r))}function Ug(e,t,n){const r=e+t-1,{first:o,last:i}=n;return e>=o&&e<=i||e=o}class Gg extends Ye{static get pluginName(){return"TableKeyboard"}static get requires(){return[Hg]}init(){const e=this.editor.editing.view.document;this.editor.keystrokes.set("Tab",(...e)=>this._handleTabOnSelectedTable(...e),{priority:"low"}),this.editor.keystrokes.set("Tab",this._getTabHandler(!0),{priority:"low"}),this.editor.keystrokes.set("Shift+Tab",this._getTabHandler(!1),{priority:"low"}),this.listenTo(e,"arrowKey",(...e)=>this._onArrowKey(...e),{context:"table"})}_handleTabOnSelectedTable(e,t){const n=this.editor,r=n.model.document.selection.getSelectedElement();r&&r.is("element","table")&&(t(),n.model.change(e=>{e.setSelection(e.createRangeIn(r.getChild(0).getChild(0)))}))}_getTabHandler(e){const t=this.editor;return(n,r)=>{let o=Bf(t.model.document.selection)[0];if(o||(o=this.editor.plugins.get("TableSelection").getFocusCell()),!o)return;r();const i=o.parent,a=i.parent,s=a.getChildIndex(i),l=i.getChildIndex(o),c=0===l;if(!e&&c&&0===s)return void t.model.change(e=>{e.setSelection(e.createRangeOn(a))});const d=this.editor.plugins.get("TableUtils"),u=l===i.childCount-1,p=s===d.getRows(a)-1;if(e&&p&&u&&(t.execute("insertTableRowBelow"),s===d.getRows(a)-1))return void t.model.change(e=>{e.setSelection(e.createRangeOn(a))});let m;if(e&&u){const e=a.getChild(s+1);m=e.getChild(0)}else if(!e&&c){const e=a.getChild(s-1);m=e.getChild(e.childCount-1)}else m=i.getChild(l+(e?1:-1));t.model.change(e=>{e.setSelection(e.createRangeIn(m))})}}_onArrowKey(e,t){const n=this.editor,r=Br(t.keyCode,n.locale.contentLanguageDirection);this._handleArrowKeys(r,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const n=this.editor.model,r=n.document.selection,o=["right","down"].includes(e),i=Hf(r);if(i.length){let n;return n=t?this.editor.plugins.get("TableSelection").getFocusCell():o?i[i.length-1]:i[0],this._navigateFromCellInDirection(n,e,t),!0}const a=r.focus.findAncestor("tableCell");if(!a)return!1;if(!r.isCollapsed)if(t){if(r.isBackward==o&&!r.containsEntireContent(a))return!1}else{const e=r.getSelectedElement();if(!e||!n.schema.isObject(e))return!1}return!!this._isSelectionAtCellEdge(r,a,o)&&(this._navigateFromCellInDirection(a,e,t),!0)}_isSelectionAtCellEdge(e,t,n){const r=this.editor.model,o=this.editor.model.schema,i=n?e.getLastPosition():e.getFirstPosition();if(!o.getLimitElement(i).is("element","tableCell"))return r.createPositionAt(t,n?"end":0).isTouching(i);const a=r.createSelection(i);return r.modifySelection(a,{direction:n?"forward":"backward"}),i.isEqual(a.focus)}_navigateFromCellInDirection(e,t,n=!1){const r=this.editor.model,o=e.findAncestor("table"),i=[...new Tf(o,{includeAllSlots:!0})],{row:a,column:s}=i[i.length-1],l=i.find(({cell:t})=>t==e);let{row:c,column:d}=l;switch(t){case"left":d--;break;case"up":c--;break;case"right":d+=l.cellWidth;break;case"down":c+=l.cellHeight}if(c<0||c>a||d<0&&c<=0||d>s&&c>=a)return void r.change(e=>{e.setSelection(e.createRangeOn(o))});d<0?(d=n?0:s,c--):d>s&&(d=n?s:0,c++);const u=i.find(e=>e.row==c&&e.column==d).cell,p=["right","down"].includes(t),m=this.editor.plugins.get("TableSelection");if(n&&m.isEnabled){const t=m.getAnchorCell()||e;m.setCellSelection(t,u)}else{const e=r.createPositionAt(u,p?0:"end");r.change(t=>{t.setSelection(e)})}}}class qg extends ti{constructor(e){super(e),this.domEventType=["mousemove","mouseleave"]}onDomEvent(e){this.fire(e.type,e)}}class Kg extends Ye{static get pluginName(){return"TableMouse"}static get requires(){return[Hg]}init(){this.editor.editing.view.addObserver(qg),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor;let t=!1;const n=e.plugins.get(Hg);this.listenTo(e.editing.view.document,"mousedown",(r,o)=>{if(!this.isEnabled||!n.isEnabled)return;if(!o.domEvent.shiftKey)return;const i=n.getAnchorCell()||Bf(e.model.document.selection)[0];if(!i)return;const a=this._getModelTableCellFromDomEvent(o);a&&Xg(i,a)&&(t=!0,n.setCellSelection(i,a),o.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{t=!1}),this.listenTo(e.editing.view.document,"selectionChange",e=>{t&&e.stop()},{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,n,r=!1,o=!1;const i=e.plugins.get(Hg);this.listenTo(e.editing.view.document,"mousedown",(e,n)=>{this.isEnabled&&i.isEnabled&&(n.domEvent.shiftKey||n.domEvent.ctrlKey||n.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(n)))}),this.listenTo(e.editing.view.document,"mousemove",(e,a)=>{if(!a.domEvent.buttons)return;if(!t)return;const s=this._getModelTableCellFromDomEvent(a);s&&Xg(t,s)&&(n=s,r||n==t||(r=!0)),r&&(o=!0,i.setCellSelection(t,n),a.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{r=!1,o=!1,t=null,n=null}),this.listenTo(e.editing.view.document,"selectionChange",e=>{o&&e.stop()},{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,n=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(n).parent.findAncestor("tableCell",{includeSelf:!0})}}function Xg(e,t){return e.parent.parent==t.parent.parent}function Qg(e){const t=e.getSelectedElement();return t&&Zg(t)?t:null}function Jg(e){let t=e.getFirstPosition().parent;for(;t;){if(t.is("element")&&Zg(t))return t;t=t.parent}return null}function Zg(e){return!!e.getCustomProperty("table")&&Ld(e)}n(108);const $g={autoRefresh:!0};class eb{constructor(e,t=$g){if(!e)throw new s.a("token-missing-token-url",this);t.initValue&&this._validateTokenValue(t.initValue),this.set("value",t.initValue),this._refresh="function"==typeof e?e:()=>{return t=e,new Promise((e,n)=>{const r=new XMLHttpRequest;r.open("GET",t),r.addEventListener("load",()=>{const t=r.status,o=r.response;return t<200||t>299?n(new s.a("token-cannot-download-new-token",null)):e(o)}),r.addEventListener("error",()=>n(new Error("Network Error"))),r.addEventListener("abort",()=>n(new Error("Abort"))),r.send()});var t},this._options=Object.assign({},$g,t)}init(){return new Promise((e,t)=>{this.value?(this._options.autoRefresh&&this._registerRefreshTokenTimeout(),e(this)):this.refreshToken().then(e).catch(t)})}refreshToken(){return this._refresh().then(e=>{this._validateTokenValue(e),this.set("value",e),this._options.autoRefresh&&this._registerRefreshTokenTimeout()}).then(()=>this)}destroy(){clearTimeout(this._tokenRefreshTimeout)}_validateTokenValue(e){const t="string"==typeof e,n=!/^".*"$/.test(e),r=t&&3===e.split(".").length;if(!n||!r)throw new s.a("token-not-in-jwt-format",this)}_registerRefreshTokenTimeout(){const e=this._getTokenRefreshTimeoutTime();clearTimeout(this._tokenRefreshTimeout),this._tokenRefreshTimeout=setTimeout(()=>{this.refreshToken()},e)}_getTokenRefreshTimeoutTime(){try{const[,e]=this.value.split("."),{exp:t}=JSON.parse(atob(e));return t?Math.floor((1e3*t-Date.now())/2):36e5}catch(e){return 36e5}}static create(e,t=$g){return new eb(e,t).init()}}je(eb,Pe);var tb=eb;const nb=/^data:(\S*?);base64,/;class rb{constructor(e,t,n){if(!e)throw new s.a("fileuploader-missing-file",null);if(!t)throw new s.a("fileuploader-missing-token",null);if(!n)throw new s.a("fileuploader-missing-api-address",null);this.file=function(e){if("string"!=typeof e)return!1;const t=e.match(nb);return!(!t||!t.length)}(e)?function(e,t=512){try{const n=e.match(nb)[1],r=atob(e.replace(nb,"")),o=[];for(let e=0;ee(n)),this}onError(e){return this.once("error",(t,n)=>e(n)),this}abort(){this.xhr.abort()}send(){return this._prepareRequest(),this._attachXHRListeners(),this._sendRequest()}_prepareRequest(){const e=new XMLHttpRequest;e.open("POST",this._apiAddress),e.setRequestHeader("Authorization",this._token.value),e.responseType="json",this.xhr=e}_attachXHRListeners(){const e=this,t=this.xhr;function n(t){return()=>e.fire("error",t)}t.addEventListener("error",n("Network Error")),t.addEventListener("abort",n("Abort")),t.upload&&t.upload.addEventListener("progress",e=>{e.lengthComputable&&this.fire("progress",{total:e.total,uploaded:e.loaded})}),t.addEventListener("load",()=>{const e=t.status,n=t.response;if(e<200||e>299)return this.fire("error",n.message||n.error)})}_sendRequest(){const e=new FormData,t=this.xhr;return e.append("file",this.file),new Promise((n,r)=>{t.addEventListener("load",()=>{const e=t.status,o=t.response;return e<200||e>299?o.message?r(new s.a("fileuploader-uploading-data-failed",this,{message:o.message})):r(o.error):n(o)}),t.addEventListener("error",()=>r(new Error("Network Error"))),t.addEventListener("abort",()=>r(new Error("Abort"))),t.send(e)})}}je(rb,d);class ob{constructor(e,t){if(!e)throw new s.a("uploadgateway-missing-token",null);if(!t)throw new s.a("uploadgateway-missing-api-address",null);this._token=e,this._apiAddress=t}upload(e){return new rb(e,this._token,this._apiAddress)}}class ib extends fn{static get pluginName(){return"CloudServicesCore"}createToken(e,t){return new tb(e,t)}createUploadGateway(e,t){return new ob(e,t)}}class ab extends dd{}ab.builtinPlugins=[class extends Ye{static get requires(){return[ou,yd,hu,lu,_u,Ku]}static get pluginName(){return"Essentials"}},class extends Ye{static get requires(){return[Qu]}static get pluginName(){return"CKFinderUploadAdapter"}init(){const e=this.editor.config.get("ckfinder.uploadUrl");e&&(this.editor.plugins.get(Qu).createUploadAdapter=t=>new ep(t,e,this.editor.t))}},class extends Ye{static get requires(){return[Md]}static get pluginName(){return"Autoformat"}afterInit(){this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats(),this._addCodeBlockAutoformats(),this._addHorizontalLineAutoformats()}_addListAutoformats(){const e=this.editor.commands;e.get("bulletedList")&&tp(this.editor,this,/^[*-]\s$/,"bulletedList"),e.get("numberedList")&&tp(this.editor,this,/^1[.|)]\s$/,"numberedList"),e.get("todoList")&&tp(this.editor,this,/^\[\s?\]\s$/,"todoList"),e.get("checkTodoList")&&tp(this.editor,this,/^\[\s?x\s?\]\s$/,()=>{this.editor.execute("todoList"),this.editor.execute("checkTodoList")})}_addBasicStylesAutoformats(){const e=this.editor.commands;if(e.get("bold")){const e=op(this.editor,"bold");np(this.editor,this,/(?:^|\s)(\*\*)([^*]+)(\*\*)$/g,e),np(this.editor,this,/(?:^|\s)(__)([^_]+)(__)$/g,e)}if(e.get("italic")){const e=op(this.editor,"italic");np(this.editor,this,/(?:^|\s)(\*)([^*_]+)(\*)$/g,e),np(this.editor,this,/(?:^|\s)(_)([^_]+)(_)$/g,e)}if(e.get("code")){const e=op(this.editor,"code");np(this.editor,this,/(`)([^`]+)(`)$/g,e)}if(e.get("strikethrough")){const e=op(this.editor,"strikethrough");np(this.editor,this,/(~~)([^~]+)(~~)$/g,e)}}_addHeadingAutoformats(){const e=this.editor.commands.get("heading");e&&e.modelElements.filter(e=>e.match(/^heading[1-6]$/)).forEach(t=>{const n=t[7],r=new RegExp(`^(#{${n}})\\s$`);tp(this.editor,this,r,()=>{if(!e.isEnabled||e.value===t)return!1;this.editor.execute("heading",{value:t})})})}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&tp(this.editor,this,/^>\s$/,"blockQuote")}_addCodeBlockAutoformats(){const e=this.editor,t=e.model.document.selection;e.commands.get("codeBlock")&&tp(e,this,/^```$/,()=>{if(t.getFirstPosition().parent.is("element","listItem"))return!1;this.editor.execute("codeBlock",{usePreviousLanguageChoice:!0})})}_addHorizontalLineAutoformats(){this.editor.commands.get("horizontalLine")&&tp(this.editor,this,/^---$/,"horizontalLine")}},class extends Ye{static get requires(){return[ap,sp]}static get pluginName(){return"Bold"}},class extends Ye{static get requires(){return[lp,cp]}static get pluginName(){return"Italic"}},class extends Ye{static get requires(){return[hp,fp]}static get pluginName(){return"BlockQuote"}},class extends Ye{static get pluginName(){return"CKFinder"}static get requires(){return["Link","CKFinderUploadAdapter",yp,gp]}},class extends fn{static get pluginName(){return"CloudServices"}static get requires(){return[ib]}init(){const e=this.context.config.get("cloudServices")||{};for(const t in e)this[t]=e[t];if(this._tokens=new Map,this.tokenUrl)return this.token=this.context.plugins.get("CloudServicesCore").createToken(this.tokenUrl),this._tokens.set(this.tokenUrl,this.token),this.token.init();this.token=null}registerTokenUrl(e){if(this._tokens.has(e))return Promise.resolve(this.getTokenFor(e));const t=this.context.plugins.get("CloudServicesCore").createToken(e);return this._tokens.set(e,t),t.init()}getTokenFor(e){const t=this._tokens.get(e);if(!t)throw new s.a("cloudservices-token-not-registered",this);return t}destroy(){super.destroy();for(const e of this._tokens.values())e.destroy()}},class extends Ye{static get requires(){return[_p,"ImageUpload"]}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")||e.plugins.has("ImageInlineEditing")||Object(s.b)("easy-image-image-feature-missing",e)}static get pluginName(){return"EasyImage"}},class extends Ye{static get requires(){return[Tp,Ap]}static get pluginName(){return"Heading"}},class extends Ye{static get requires(){return[em,nm]}static get pluginName(){return"Image"}},class extends Ye{static get requires(){return[am,lm]}static get pluginName(){return"ImageCaption"}},class extends Ye{static get requires(){return[xm,Em]}static get pluginName(){return"ImageStyle"}},class extends Ye{static get requires(){return[Dp,zp]}static get pluginName(){return"ImageToolbar"}afterInit(){const e=this.editor,t=e.t,n=e.plugins.get(Dp),r=e.plugins.get("ImageUtils");var o;n.register("image",{ariaLabel:t("Image toolbar"),items:(o=e.config.get("image.toolbar")||[],o.map(e=>v(e)?e.name:e)),getRelatedElement:e=>r.getClosestSelectedImageWidget(e)})}},class extends Ye{static get pluginName(){return"ImageUpload"}static get requires(){return[Ym,Lm,Pm]}},class extends Ye{static get pluginName(){return"Indent"}static get requires(){return[Hm,Wm]}},class extends Ye{static get requires(){return[vh,Eh,Ch]}static get pluginName(){return"Link"}},class extends Ye{static get requires(){return[Zh,ef]}static get pluginName(){return"List"}},class extends Ye{static get requires(){return[cf,mf,uf,Xd]}static get pluginName(){return"MediaEmbed"}},Sp,class extends Ye{static get pluginName(){return"PasteFromOffice"}static get requires(){return[hd]}init(){const e=this.editor,t=e.editing.view.document,n=[];n.push(new wf(t)),n.push(new vf(t)),e.plugins.get("ClipboardPipeline").on("inputTransformation",(e,r)=>{if(r._isTransformedWithPasteFromOffice)return;const o=r.dataTransfer.getData("text/html"),i=n.find(e=>e.isActive(o));i&&(r._parsedData=function(e,t){const n=new DOMParser,r=function(e){return kf(kf(e)).replace(/([^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<\/span>/g,"").replace(/ <\//g," ").replace(/ <\/o:p>/g," ").replace(/( |\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)<")}(function(e){const t=e.indexOf("