@fvc/richtext 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import*as e from"react";import*as t from"react-dom";var i=function(){return i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var n="ej2_instances",o=0;function r(e,t){var i=t;return i.unshift(void 0),new(Function.prototype.bind.apply(e,i))}function s(e){var t,i=new Uint16Array(5);(window.msCrypto||window.crypto).getRandomValues(i);var n="ej2"+function(e){for(var t="",i=0;i<5;i++)t+=(i?",":"")+e[parseInt(i.toString(),10)];return t}(i),o=function(i){i.source===window&&"string"==typeof i.data&&i.data.length<=32&&i.data===n&&(e(),t())};return window.addEventListener("message",o,!1),window.postMessage(n,"*"),t=function(){window.removeEventListener("message",o),e=o=n=void 0}}function a(e,t){for(var i=t,n=e.replace(/\[/g,".").replace(/\]/g,"").split("."),o=0;o<n.length&&!f(i);o++)i=i[n[parseInt(o.toString(),10)]];return i}function l(e,t,i){var n,o,r=e.replace(/\[/g,".").replace(/\]/g,"").split("."),s=i||{},a=s,l=r.length;for(n=0;n<l;n++)o=r[parseInt(n.toString(),10)],n+1===l?a[""+o]=void 0===t?{}:t:g(a[""+o])&&(a[""+o]={}),a=a[""+o];return s}function c(e,t){delete e[""+t]}var h="undefined"!=typeof window?window:{};function d(e){return!g(e)&&e.constructor==={}.constructor}function p(e,t){return e[""+t]}function u(e,t){if(!g(t))for(var i=e,n=t,o="deepMerge",r=0,s=Object.keys(t);r<s.length;r++){var a=s[r];g(i[""+o])||-1===i[""+o].indexOf(a)||!d(n[""+a])&&!Array.isArray(n[""+a])?i[""+a]=n[""+a]:m(i[""+a],i[""+a],n[""+a],!0)}}function m(e,t,i,n){var o=e&&"object"==typeof e?e:{},r=arguments.length,s=[e,t,i,n];n&&(r-=1);for(var a=function(e){if(!s[parseInt(e.toString(),10)])return"continue";var t=s[parseInt(e.toString(),10)];Object.keys(t).forEach((function(e){var i,r=o[""+e],s=t[""+e];Array.isArray(s)&&Array.isArray(r)&&(s.length,r.length);n&&(d(s)||Array.isArray(s))?d(s)?(i=r||{},Array.isArray(i)&&Object.prototype.hasOwnProperty.call(i,"isComplexArray")?m(i,{},s,n):o[""+e]=m(i,{},s,n)):(i=r||[],o[""+e]=m([],i,s,i&&i.length||s&&s.length)):o[""+e]=s}))},l=1;l<r;l++)a(l);return o}function g(e){return null==e}function f(e){return void 0===e}function y(e){return e+"_"+o++}function v(e,t){var i;return function(){for(var n=this,o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];clearTimeout(i),i=setTimeout((function(){return i=null,e.apply(n,o)}),t)}}function b(e,t){return e===t||!(e===document||!e)&&b(e.parentNode,t)}function M(e){try{throw new Error(e)}catch(e){throw new Error(e.message+"\n"+e.stack)}}function N(e){var t=e+"";return t.match(/auto|cm|mm|in|px|pt|pc|%|em|ex|ch|rem|vw|vh|vmin|vmax/)?t:t+"px"}function C(){return false}function E(e,t){var i="string"==typeof e?document.querySelector(e):e;if(i[""+n])for(var o=0,r=i[""+n];o<r.length;o++){var s=r[o];if(s instanceof t)return s}return null}var D={latn:{_digits:"0123456789",_type:"numeric"}},T={decimal:".",group:",",percentSign:"%",plusSign:"+",minusSign:"-",infinity:"∞",nan:"NaN",exponential:"E"},L=[0,1,2,3,4,5,6,7,8,9],S=function(){function e(){}return e.getMainObject=function(e,t){return a("main."+t,e)},e.getNumberingSystem=function(e){return a("supplemental.numberingSystems",e)||this.numberingSystems},e.reverseObject=function(e,t){for(var i={},n=0,o=t||Object.keys(e);n<o.length;n++){var r=o[n];Object.prototype.hasOwnProperty.call(i,e[""+r])||(i[e[""+r]]=r)}return i},e.getSymbolRegex=function(e){var t=e.map((function(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")})).join("|");return new RegExp(t,"g")},e.getSymbolMatch=function(e){for(var t={},i=0,n=Object.keys(T);i<n.length;i++){var o=n[i];t[e[""+o]]=T[""+o]}return t},e.constructRegex=function(e){for(var t=e.length,i="",n=0;n<t;n++)i+=n!==t-1?e[parseInt(n.toString(),10)]+"|":e[parseInt(n.toString(),10)];return i},e.convertValueParts=function(e,t,i){return e.replace(t,(function(e){return i[""+e]}))},e.getDefaultNumberingSystem=function(e){var t={};return t.obj=a("numbers",e),t.nSystem=a("defaultNumberingSystem",t.obj),t},e.getCurrentNumericOptions=function(e,t,i,n){var o={},r=this.getDefaultNumberingSystem(e);if(!f(r.nSystem)||n){var s=n?a("obj.mapperDigits",r):a(r.nSystem+"._digits",t);if(!f(s)){o.numericPair=this.reverseObject(s,L);var l=RegExp;o.numberParseRegex=new l(this.constructRegex(s),"g"),o.numericRegex="["+s[0]+"-"+s[9]+"]",i&&(o.numericRegex=s[0]+"-"+s[9],o.symbolNumberSystem=a(n?"numberSymbols":"symbols-numberSystem-"+r.nSystem,r.obj),o.symbolMatch=this.getSymbolMatch(o.symbolNumberSystem),o.numberSystem=r.nSystem)}}return o},e.getNumberMapper=function(e,t,i){var n={mapper:{}},o=this.getDefaultNumberingSystem(e);if(!f(o.nSystem)){n.numberSystem=o.nSystem,n.numberSymbols=a("symbols-numberSystem-"+o.nSystem,o.obj),n.timeSeparator=a("timeSeparator",n.numberSymbols);var r=a(o.nSystem+"._digits",t);if(!f(r))for(var s=0,l=L;s<l.length;s++){var c=l[s];n.mapper[parseInt(c.toString(),10)]=r[parseInt(c.toString(),10)]}}return n},e.nPair="numericPair",e.nRegex="numericRegex",e.numberingSystems=D,e}(),I={DJF:"Fdj",ERN:"Nfk",ETB:"Br",NAD:"$",ZAR:"R",XAF:"FCFA",GHS:"GH₵",XDR:"XDR",AED:"د.إ.",BHD:"د.ب.",DZD:"د.ج.",EGP:"ج.م.",ILS:"₪",IQD:"د.ع.",JOD:"د.ا.",KMF:"CF",KWD:"د.ك.",LBP:"ل.ل.",LYD:"د.ل.",MAD:"د.م.",MRU:"أ.م.",OMR:"ر.ع.",QAR:"ر.ق.",SAR:"ر.س.",SDG:"ج.س.",SOS:"S",SSP:"£",SYP:"ل.س.",TND:"د.ت.",YER:"ر.ي.",CLP:"$",INR:"₹",TZS:"TSh",EUR:"€",AZN:"₼",RUB:"₽",BYN:"Br",ZMW:"K",BGN:"лв.",NGN:"₦",XOF:"CFA",BDT:"৳",CNY:"¥",BAM:"КМ",UGX:"USh",USD:"$",CZK:"Kč",GBP:"£",DKK:"kr.",KES:"Ksh",CHF:"CHF",MVR:"ރ.",BTN:"Nu.",XCD:"EC$",AUD:"$",BBD:"$",BIF:"FBu",BMD:"$",BSD:"$",BWP:"P",BZD:"$",CAD:"$",NZD:"$",FJD:"$",FKP:"£",GIP:"£",GMD:"D",GYD:"$",HKD:"$",IDR:"Rp",JMD:"$",KYD:"$",LRD:"$",MGA:"Ar",MOP:"MOP$",MUR:"Rs",MWK:"MK",MYR:"RM",PGK:"K",PHP:"₱",PKR:"Rs",RWF:"RF",SBD:"$",SCR:"SR",SEK:"kr",SGD:"$",SHP:"£",SLL:"Le",ANG:"NAf.",SZL:"E",TOP:"T$",TTD:"$",VUV:"VT",WST:"WS$",ARS:"$",BOB:"Bs",BRL:"R$",COP:"$",CRC:"₡",CUP:"$",DOP:"$",GTQ:"Q",HNL:"L",MXN:"$",NIO:"C$",PAB:"B/.",PEN:"S/",PYG:"₲",UYU:"$",VES:"Bs.S",IRR:"ريال",GNF:"FG",CDF:"FC",HTG:"G",XPF:"FCFP",HRK:"kn",HUF:"Ft",AMD:"֏",ISK:"kr",JPY:"¥",GEL:"₾",CVE:"​",KZT:"₸",KHR:"៛",KPW:"₩",KRW:"₩",KGS:"сом",AOA:"Kz",LAK:"₭",MZN:"MTn",MKD:"ден",MNT:"₮",BND:"$",MMK:"K",NOK:"kr",NPR:"रु",AWG:"Afl.",SRD:"$",PLN:"zł",AFN:"؋",STN:"Db",MDL:"L",RON:"lei",UAH:"₴",LKR:"රු.",ALL:"Lekë",RSD:"дин.",TJS:"смн",THB:"฿",TMT:"m.",TRY:"₺",UZS:"сўм",VND:"₫",TWD:"NT$"};var w="USD",x=null,j=null;var O,z=RegExp,A={"en-US":{d:"M/d/y",D:"EEEE, MMMM d, y",f:"EEEE, MMMM d, y h:mm a",F:"EEEE, MMMM d, y h:mm:s a",g:"M/d/y h:mm a",G:"M/d/yyyy h:mm:ss tt",m:"MMMM d",M:"MMMM d",r:"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",R:"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",t:"h:mm tt",T:"h:m:s tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",U:"dddd, MMMM d, yyyy h:mm:ss tt",y:"MMMM yyyy",Y:"MMMM yyyy"}};!function(e){e.negativeDataRegex=/^(('[^']+'|''|[^*#@0,.E])*)(\*.)?((([#,]*[0,]*0+)(\.0*[0-9]*#*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/,e.customRegex=/^(('[^']+'|''|[^*#@0,.])*)(\*.)?((([0#,]*[0,]*[0#]*[0# ]*)(\.[0#]*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/,e.latnParseRegex=/0|1|2|3|4|5|6|7|8|9/g;var t=/[0-9]/g;e.defaultCurrency="$";var i=["infinity","nan","group","decimal"],n=/G|M|L|H|c|'| a|yy|y|EEEE|E/g,o={G:"",M:"m",L:"m",H:"h",c:"d","'":'"'," a":" AM/PM",yy:"yy",y:"yyyy",EEEE:"dddd",E:"ddd"};e.dateConverterMapper=/dddd|ddd/gi;e.islamicRegex=/^islamic/;var r={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};e.formatRegex=new z("(^[ncpae]{1})([0-1]?[0-9]|20)?$","i"),e.currencyFormatRegex=new z("(^[ca]{1})([0-1]?[0-9]|20)?$","i"),e.curWithoutNumberRegex=/(c|a)$/gi;var s={$:"isCurrency","%":"isPercent","-":"isNegative",0:"nlead",1:"nend"};function l(t,i,n,o,r){var s,l=n||"date";if(r)s=p({skeleton:t},r).format||p({skeleton:"d"},"en-US").format;else{if(-1!==e.basicPatterns.indexOf(t)){if(s=a(l+"Formats."+t,i),"dateTime"===l){var c=a("dateFormats."+t,i),h=a("timeFormats."+t,i);s=s.replace("{1}",c).replace("{0}",h)}}else s=a("dateTimeFormats.availableFormats."+t,i);f(s)&&"yMd"===t&&(s="M/d/y")}return s}function c(t,i,n,o){var r={},s=n||"gregorian";if(r.parserObject=S.getMainObject(t,i)||e.defaultObject,o)r.numericObject=a("numbers",r.parserObject);else{var l="dates.calendars."+s;r.dateObject=a(l,r.parserObject)}return r}function h(e,t,i,n){return a(e+"Formats-numberSystem-"+t+(n?".accounting":".standard"),i)||(n?a(e+"Formats-numberSystem-"+t+".standard",i):"")}function d(t){return t.match(e.dateConverterMapper),t}function p(e,t){var i=e.format||e.skeleton,n=a((t||"en-US")+"."+i,A);return n||(n=a("en-US."+i,A)),n&&(n=d(n),e.format=n.replace(/tt/,"a")),e}function u(t){var i=t.match(e.formatRegex),n={},o=i[1].toUpperCase();return n.isAccount="A"===o,n.type=e.patternMatcher[""+o],t.length>1&&(n.fractionDigits=parseInt(i[2],10)),n}function y(i,n,o,r){var s=r?{}:{nlead:"",nend:""},a=i.match(e.customRegex);if(a){r||(s.nlead=v(a[1],o),s.nend=v(a[10],o),s.groupPattern=a[4]);var l=a[7];if(l&&n){var c=l.match(t);g(c)?s.minimumFraction=0:s.minimumFraction=c.length,s.maximumFraction=l.length-1}}return s}function v(t,i){return t?(t=t.replace(e.defaultCurrency,i),""===i?t.trim():t):""}function b(e,t,i,n){return n?"$":a("currencies."+t+(i?"."+i:".symbol"),e)||a("currencies."+t+".symbol-alt-narrow",e)||"$"}function M(t,n,o){var r={type:"decimal",minimumFractionDigits:0,maximumFractionDigits:0},s=t.match(e.customRegex);if(g(s)||""===s[5]&&"N/A"!==t)return r.type=void 0,r;r.nlead=s[1],r.nend=s[10];var a=s[6],l=!!a.match(/ $/g),c=-1!==a.replace(/ $/g,"").indexOf(" ");r.useGrouping=-1!==a.indexOf(",")||c,a=a.replace(/,/g,""),a=/\s$/.test(a)?a.replace(/ /g,""):a;var d=s[7];if(-1!==a.indexOf("0")&&(r.minimumIntegerDigits=a.length-a.indexOf("0")),g(d)||(r.minimumFractionDigits=d.lastIndexOf("0"),r.maximumFractionDigits=d.lastIndexOf("#"),-1===r.minimumFractionDigits&&(r.minimumFractionDigits=0),(-1===r.maximumFractionDigits||r.maximumFractionDigits<r.minimumFractionDigits)&&(r.maximumFractionDigits=r.minimumFractionDigits)),g(n)?m(r,N([r.nlead,r.nend],"%","%")):(n.isCustomFormat=!0,m(r,N([r.nlead,r.nend],"$",n.currencySymbol)),r.isCurrency||m(r,N([r.nlead,r.nend],"%",n.percentSymbol))),!g(o)){var p=h(r.type,n.numberMapper.numberSystem,o,!1);r.useGrouping&&(r.groupSeparator=c?" ":n.numberMapper.numberSymbols[i[2]],r.groupData=x.getGroupingDetails(p.split(";")[0])),r.nlead=r.nlead.replace(/'/g,""),r.nend=l?" "+r.nend.replace(/'/g,""):r.nend.replace(/'/g,"")}return r}function N(e,t,i){for(var n={nlead:e[0],nend:e[1]},o=0;o<2;o++){var r=e[parseInt(o.toString(),10)],a=r.indexOf(t);if(-1!==a&&(a<r.indexOf("'")||a>r.lastIndexOf("'"))){n[""+s[parseInt(o.toString(),10)]]=r.substr(0,a)+i+r.substr(a+1),n[""+s[""+t]]=!0,n.type=n.isCurrency?"currency":"percent";break}}return n}function C(e,t){if(-1!==e.indexOf(",")){var i=e.split(",");e=i[0]+a("numberMapper.numberSymbols.group",t)+i[1].replace(".",a("numberMapper.numberSymbols.decimal",t))}else e=e.replace(".",a("numberMapper.numberSymbols.decimal",t));return e}function E(e,t,i){e+=".";for(var n=0;n<t;n++)e+="0";if(t<i)for(var o=i-t,r=0;r<o;r++)e+="#";return e}function D(e,t){for(var i=e.split("."),n="",o=0;o<t;o++)n+="0";return i[1]?n+"."+i[1]:n}function T(e){var t=e.split("."),i=t[0],n=3-i.length%3;e="";for(var o=(i=(n&&1===n?"#":2===n?"##":"")+i).length-1;o>0;o-=3)e=","+i[o-2]+i[o-1]+i[parseInt(o.toString(),10)]+e;return e=e.slice(1),t[1]?e+"."+t[1]:e}e.dateParseRegex=/([a-z])\1*|'([^']|'')+'|''|./gi,e.basicPatterns=["short","medium","long","full"],e.defaultObject={dates:{calendars:{gregorian:{months:{"stand-alone":{abbreviated:{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},narrow:{1:"J",2:"F",3:"M",4:"A",5:"M",6:"J",7:"J",8:"A",9:"S",10:"O",11:"N",12:"D"},wide:{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"}}},days:{"stand-alone":{abbreviated:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},narrow:{sun:"S",mon:"M",tue:"T",wed:"W",thu:"T",fri:"F",sat:"S"},short:{sun:"Su",mon:"Mo",tue:"Tu",wed:"We",thu:"Th",fri:"Fr",sat:"Sa"},wide:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"}}},dayPeriods:{format:{wide:{am:"AM",pm:"PM"}}},eras:{eraNames:{0:"Before Christ","0-alt-variant":"Before Common Era",1:"Anno Domini","1-alt-variant":"Common Era"},eraAbbr:{0:"BC","0-alt-variant":"BCE",1:"AD","1-alt-variant":"CE"},eraNarrow:{0:"B","0-alt-variant":"BCE",1:"A","1-alt-variant":"CE"}},dateFormats:{full:"EEEE, MMMM d, y",long:"MMMM d, y",medium:"MMM d, y",short:"M/d/yy"},timeFormats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats:{full:"{1} 'at' {0}",long:"{1} 'at' {0}",medium:"{1}, {0}",short:"{1}, {0}",availableFormats:{d:"d",E:"ccc",Ed:"d E",Ehm:"E h:mm a",EHm:"E HH:mm",Ehms:"E h:mm:ss a",EHms:"E HH:mm:ss",Gy:"y G",GyMMM:"MMM y G",GyMMMd:"MMM d, y G",GyMMMEd:"E, MMM d, y G",h:"h a",H:"HH",hm:"h:mm a",Hm:"HH:mm",hms:"h:mm:ss a",Hms:"HH:mm:ss",hmsv:"h:mm:ss a v",Hmsv:"HH:mm:ss v",hmv:"h:mm a v",Hmv:"HH:mm v",M:"L",Md:"M/d",MEd:"E, M/d",MMM:"LLL",MMMd:"MMM d",MMMEd:"E, MMM d",MMMMd:"MMMM d",ms:"mm:ss",y:"y",yM:"M/y",yMd:"M/d/y",yMEd:"E, M/d/y",yMMM:"MMM y",yMMMd:"MMM d, y",yMMMEd:"E, MMM d, y",yMMMM:"MMMM y"}}},islamic:{months:{"stand-alone":{abbreviated:{1:"Muh.",2:"Saf.",3:"Rab. I",4:"Rab. II",5:"Jum. I",6:"Jum. II",7:"Raj.",8:"Sha.",9:"Ram.",10:"Shaw.",11:"Dhuʻl-Q.",12:"Dhuʻl-H."},narrow:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},wide:{1:"Muharram",2:"Safar",3:"Rabiʻ I",4:"Rabiʻ II",5:"Jumada I",6:"Jumada II",7:"Rajab",8:"Shaʻban",9:"Ramadan",10:"Shawwal",11:"Dhuʻl-Qiʻdah",12:"Dhuʻl-Hijjah"}}},days:{"stand-alone":{abbreviated:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},narrow:{sun:"S",mon:"M",tue:"T",wed:"W",thu:"T",fri:"F",sat:"S"},short:{sun:"Su",mon:"Mo",tue:"Tu",wed:"We",thu:"Th",fri:"Fr",sat:"Sa"},wide:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"}}},dayPeriods:{format:{wide:{am:"AM",pm:"PM"}}},eras:{eraNames:{0:"AH"},eraAbbr:{0:"AH"},eraNarrow:{0:"AH"}},dateFormats:{full:"EEEE, MMMM d, y G",long:"MMMM d, y G",medium:"MMM d, y G",short:"M/d/y GGGGG"},timeFormats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats:{full:"{1} 'at' {0}",long:"{1} 'at' {0}",medium:"{1}, {0}",short:"{1}, {0}",availableFormats:{d:"d",E:"ccc",Ed:"d E",Ehm:"E h:mm a",EHm:"E HH:mm",Ehms:"E h:mm:ss a",EHms:"E HH:mm:ss",Gy:"y G",GyMMM:"MMM y G",GyMMMd:"MMM d, y G",GyMMMEd:"E, MMM d, y G",h:"h a",H:"HH",hm:"h:mm a",Hm:"HH:mm",hms:"h:mm:ss a",Hms:"HH:mm:ss",M:"L",Md:"M/d",MEd:"E, M/d",MMM:"LLL",MMMd:"MMM d",MMMEd:"E, MMM d",MMMMd:"MMMM d",ms:"mm:ss",y:"y G",yyyy:"y G",yyyyM:"M/y GGGGG",yyyyMd:"M/d/y GGGGG",yyyyMEd:"E, M/d/y GGGGG",yyyyMMM:"MMM y G",yyyyMMMd:"MMM d, y G",yyyyMMMEd:"E, MMM d, y G",yyyyMMMM:"MMMM y G",yyyyQQQ:"QQQ y G",yyyyQQQQ:"QQQQ y G"}}}},timeZoneNames:{hourFormat:"+HH:mm;-HH:mm",gmtFormat:"GMT{0}",gmtZeroFormat:"GMT"}},numbers:{currencies:{USD:{displayName:"US Dollar",symbol:"$","symbol-alt-narrow":"$"},EUR:{displayName:"Euro",symbol:"€","symbol-alt-narrow":"€"},GBP:{displayName:"British Pound","symbol-alt-narrow":"£"}},defaultNumberingSystem:"latn",minimumGroupingDigits:"1","symbols-numberSystem-latn":{decimal:".",group:",",list:";",percentSign:"%",plusSign:"+",minusSign:"-",exponential:"E",superscriptingExponent:"×",perMille:"‰",infinity:"∞",nan:"NaN",timeSeparator:":"},"decimalFormats-numberSystem-latn":{standard:"#,##0.###"},"percentFormats-numberSystem-latn":{standard:"#,##0%"},"currencyFormats-numberSystem-latn":{standard:"¤#,##0.00",accounting:"¤#,##0.00;(¤#,##0.00)"},"scientificFormats-numberSystem-latn":{standard:"#E0"}}},e.blazorDefaultObject={numbers:{mapper:{0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},mapperDigits:"0123456789",numberSymbols:{decimal:".",group:",",plusSign:"+",minusSign:"-",percentSign:"%",nan:"NaN",timeSeparator:":",infinity:"∞"},timeSeparator:":",currencySymbol:"$",currencypData:{nlead:"$",nend:"",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},percentpData:{nlead:"",nend:"%",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},percentnData:{nlead:"-",nend:"%",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},currencynData:{nlead:"($",nend:")",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},decimalnData:{nlead:"-",nend:"",groupData:{primary:3},maximumFraction:2,minimumFraction:2},decimalpData:{nlead:"",nend:"",groupData:{primary:3},maximumFraction:2,minimumFraction:2}},dates:{dayPeriods:{am:"AM",pm:"PM"},dateSeperator:"/",days:{abbreviated:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},short:{sun:"Su",mon:"Mo",tue:"Tu",wed:"We",thu:"Th",fri:"Fr",sat:"Sa"},wide:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"}},months:{abbreviated:{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},wide:{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"}},eras:{1:"AD"}}},e.monthIndex={3:"abbreviated",4:"wide",5:"narrow",1:"abbreviated"},e.month="months",e.days="days",e.patternMatcher={C:"currency",P:"percent",N:"decimal",A:"currency",E:"scientific"},e.getResultantPattern=l,e.getDependables=c,e.getSymbolPattern=h,e.ConvertDateToWeekFormat=d,e.compareBlazorDateFormats=p,e.getProperNumericSkeleton=u,e.getFormatData=y,e.changeCurrencySymbol=v,e.getCurrencySymbol=b,e.customFormat=function(e,t,i){for(var n={},o=e.split(";"),r=["pData","nData","zeroData"],s=0;s<o.length;s++)n[""+r[parseInt(s.toString(),10)]]=M(o[parseInt(s.toString(),10)],t,i);return g(n.nData)&&(n.nData=m({},n.pData),n.nData.nlead=g(t)?"-"+n.nData.nlead:t.minusSymbol+n.nData.nlead),n},e.customNumberFormat=M,e.isCurrencyPercent=N,e.getDateSeparator=function(e){var t=(a("dateFormats.short",e)||"").match(/[dM]([^dM])[dM]/i);return t?t[1]:"/"},e.getActualDateTimeFormat=function(e,t,i,r){var s=c(i,e,t.calendar),h=t.format||l(t.skeleton,s.dateObject,t.type);if(r){if(h=h.replace(n,(function(e){return o[""+e]})),-1!==h.indexOf("z")){var d=h.match(/z/g).length,p=void 0,u={timeZone:{}};u.numMapper=S.getNumberMapper(s.parserObject,S.getNumberingSystem(i)),u.timeZone=a("dates.timeZoneNames",s.parserObject);var m=(new Date).getTimezoneOffset(),g=d<4?"+H;-H":u.timeZone.hourFormat;g=g.replace(/:/g,u.numMapper.timeSeparator),0===m?p=u.timeZone.gmtZeroFormat:(p=j.getTimeZoneValue(m,g),p=u.timeZone.gmtFormat.replace(/\{0\}/,p)),h=h.replace(/[z]+/,'"'+p+'"')}h=h.replace(/ $/,"")}return h},e.processSymbol=C,e.getActualNumberFormat=function(t,i,n,o){var r,s=c(n,t,"",!0),a={custom:!0};s.numericObject;var l={},d=(i.format||"").match(e.currencyFormatRegex);!e.formatRegex.test(i.format)||u(i.format||"N");var p,g={};if(d){g.numberMapper=S.getNumberMapper(s.parserObject,S.getNumberingSystem(n),!0);var f=b(s.numericObject,i.currency||w,i.altSymbol),v=h("currency",g.numberMapper.numberSystem,s.numericObject,/a/i.test(i.format)),M=(v=v.replace(/\u00A4/g,f)).split(";");l.hasNegativePattern=M.length>1,l.nData=y(M[1]||"-"+M[0],!0,f),l.pData=y(M[0],!1,f),d[2]||i.minimumFractionDigits||i.maximumFractionDigits||(r=y(v.split(";")[0],!0,"",!0).minimumFraction)}if(e.formatRegex.test(i.format)||!i.format){if(m(a,u(i.format||"N")),a.custom=!1,p="###0",a.fractionDigits||i.minimumFractionDigits||i.maximumFractionDigits||r){a.fractionDigits&&(i.minimumFractionDigits=i.maximumFractionDigits=a.fractionDigits),p=E(p,r||a.fractionDigits||i.minimumFractionDigits||0,i.maximumFractionDigits||0)}if(i.minimumIntegerDigits&&(p=D(p,i.minimumIntegerDigits)),i.useGrouping&&(p=T(p)),"currency"===a.type||(a.type,0)){var N=p;p=l.pData.nlead+N+l.pData.nend,l.hasNegativePattern&&(p+=";"+l.nData.nlead+N+l.nData.nend)}"percent"===a.type&&(p+=" %")}else p=i.format.replace(/'/g,'"');return Object.keys(g).length>0&&(p=o?p:C(p,g)),p},e.fractionDigitsPattern=E,e.minimumIntegerPattern=D,e.groupingPattern=T,e.getWeekData=function(e,t){var i="sun",n=a("supplemental.weekData.firstDay",t),o=e;return/en-/.test(o)&&(o=o.slice(3)),o=o.slice(0,2).toUpperCase()+o.substr(2),n&&(i=n[""+o]||n[o.slice(0,2)]||"sun"),r[""+i]},e.replaceBlazorCurrency=function(e,t,i){var n=a(i||"",I);if(t!==n)for(var o=0,r=e;o<r.length;o++){var s=r[o];s.nend=s.nend.replace(t,n),s.nlead=s.nlead.replace(t,n)}},e.getWeekOfYear=function(e,t){var i,n=new Date(e.getFullYear(),0,1),o=n.getDay();o=o>=0?o:o+7;var r=Math.floor((e.getTime()-n.getTime()-6e4*(e.getTimezoneOffset()-n.getTimezoneOffset()))/864e5)+1;if(o<4){if((i=Math.floor((r+o-t-1)/7)+1)>52){var s=new Date(e.getFullYear()+1,0,1).getDay();i=(s=s>=0?s:s+7)<4?1:53}}else i=Math.floor((r+o-t-1)/7);return i}}(O||(O={}));var k=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i,P=/msie|trident/i,R=/Trident\/7\./,B=/(ipad|iphone|ipod touch)/i,H=/(ipad|iphone|ipod touch);.*os 7_\d|(ipad|iphone|ipod touch);.*os 8_\d/i,U=/android/i,F=/trident|windows phone|edge/i,Y=/(version)[ /]([\w.]+)/i,V={OPERA:/(opera|opr)(?:.*version|)[ /]([\w.]+)/i,EDGE:/(edge)(?:.*version|)[ /]([\w.]+)/i,CHROME:/(chrome|crios)[ /]([\w.]+)/i,PANTHOMEJS:/(phantomjs)[ /]([\w.]+)/i,SAFARI:/(safari)[ /]([\w.]+)/i,WEBKIT:/(webkit)[ /]([\w.]+)/i,MSIE:/(msie|trident) ([\w.]+)/i,MOZILLA:/(mozilla)(?:.*? rv:([\w.]+)|)/i};"undefined"!=typeof window&&(window.browserDetails=window.browserDetails||{});var Q=function(){function e(){}return e.extractBrowserDetail=function(){for(var t={culture:{}},i=[],n=0,o=Object.keys(V);n<o.length;n++){var r=o[n];if(i=e.userAgent.match(V[""+r])){if(t.name="opr"===i[1].toLowerCase()?"opera":i[1].toLowerCase(),t.name="crios"===i[1].toLowerCase()?"chrome":t.name,t.version=i[2],t.culture.name=t.culture.language=navigator.language,e.userAgent.match(R)){t.name="msie";break}var s=e.userAgent.match(Y);"safari"===t.name&&s&&(t.version=s[2]);break}}return t},e.getEvent=function(t){var i={start:{isPointer:"pointerdown",isTouch:"touchstart",isDevice:"mousedown"},move:{isPointer:"pointermove",isTouch:"touchmove",isDevice:"mousemove"},end:{isPointer:"pointerup",isTouch:"touchend",isDevice:"mouseup"},cancel:{isPointer:"pointercancel",isTouch:"touchcancel",isDevice:"mouseleave"}};return e.isPointer?i[""+t].isPointer:e.isTouch?i[""+t].isTouch+(e.isDevice?"":" "+i[""+t].isDevice):i[""+t].isDevice},e.getTouchStartEvent=function(){return e.getEvent("start")},e.getTouchEndEvent=function(){return e.getEvent("end")},e.getTouchMoveEvent=function(){return e.getEvent("move")},e.getTouchCancelEvent=function(){return e.getEvent("cancel")},e.isSafari=function(){return e.isDevice&&e.isIos&&e.isTouch&&"undefined"!=typeof window&&-1===window.navigator.userAgent.toLowerCase().indexOf("iphone")&&window.navigator.userAgent.toLowerCase().indexOf("safari")>-1},e.getValue=function(t,i){var n="undefined"!=typeof window?window.browserDetails:{};return"undefined"!=typeof navigator&&"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1&&!0===e.isTouch&&!V.CHROME.test(navigator.userAgent)&&(n.isIos=!0,n.isDevice=!0,n.isTouch=!0,n.isPointer=!0,n.isPointer="pointerEnabled"in window.navigator),"undefined"!=typeof window&&window.Capacitor&&"ios"===window.Capacitor.getPlatform()&&(n.isPointer=!1),void 0===n[""+t]?n[""+t]=i.test(e.userAgent):n[""+t]},Object.defineProperty(e,"userAgent",{get:function(){return e.uA},set:function(t){e.uA=t,window.browserDetails={}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"info",{get:function(){return f(window.browserDetails.info)?window.browserDetails.info=e.extractBrowserDetail():window.browserDetails.info},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isIE",{get:function(){return e.getValue("isIE",P)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isTouch",{get:function(){return f(window.browserDetails.isTouch)?window.browserDetails.isTouch="ontouchstart"in window.navigator||window&&window.navigator&&window.navigator.maxTouchPoints>0||"ontouchstart"in window:window.browserDetails.isTouch},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isPointer",{get:function(){return f(window.browserDetails.isPointer)?window.browserDetails.isPointer="pointerEnabled"in window.navigator:window.browserDetails.isPointer},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isMSPointer",{get:function(){return f(window.browserDetails.isMSPointer)?window.browserDetails.isMSPointer="msPointerEnabled"in window.navigator:window.browserDetails.isMSPointer},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isDevice",{get:function(){return e.getValue("isDevice",k)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isIos",{get:function(){return e.getValue("isIos",B)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isIos7",{get:function(){return e.getValue("isIos7",H)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isAndroid",{get:function(){return e.getValue("isAndroid",U)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isWebView",{get:function(){return f(window.browserDetails.isWebView)?(window.browserDetails.isWebView=!(f(window.cordova)&&f(window.PhoneGap)&&f(window.phonegap)&&"object"!==window.forge),window.browserDetails.isWebView):window.browserDetails.isWebView},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isWindows",{get:function(){return e.getValue("isWindows",F)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"touchStartEvent",{get:function(){return f(window.browserDetails.touchStartEvent)?window.browserDetails.touchStartEvent=e.getTouchStartEvent():window.browserDetails.touchStartEvent},enumerable:!0,configurable:!0}),Object.defineProperty(e,"touchMoveEvent",{get:function(){return f(window.browserDetails.touchMoveEvent)?window.browserDetails.touchMoveEvent=e.getTouchMoveEvent():window.browserDetails.touchMoveEvent},enumerable:!0,configurable:!0}),Object.defineProperty(e,"touchEndEvent",{get:function(){return f(window.browserDetails.touchEndEvent)?window.browserDetails.touchEndEvent=e.getTouchEndEvent():window.browserDetails.touchEndEvent},enumerable:!0,configurable:!0}),Object.defineProperty(e,"touchCancelEvent",{get:function(){return f(window.browserDetails.touchCancelEvent)?window.browserDetails.touchCancelEvent=e.getTouchCancelEvent():window.browserDetails.touchCancelEvent},enumerable:!0,configurable:!0}),e.uA="undefined"!=typeof navigator?navigator.userAgent:"",e}(),q=function(){function e(){}return e.addOrGetEventData=function(e){return"__eventList"in e?e.__eventList.events:(e.__eventList={},e.__eventList.events=[])},e.add=function(t,i,n,o,r){var s,a=e.addOrGetEventData(t);s=r?v(n,r):n,o&&(s=s.bind(o));for(var l=i.split(" "),c=0;c<l.length;c++)a.push({name:l[parseInt(c.toString(),10)],listener:n,debounce:s}),Q.isIE?t.addEventListener(l[parseInt(c.toString(),10)],s):t.addEventListener(l[parseInt(c.toString(),10)],s,{passive:!1});return s},e.remove=function(t,i,n){for(var o=e.addOrGetEventData(t),r=i.split(" "),s=function(e){var i,s=-1;o&&0!==o.length&&o.some((function(t,o){return t.name===r[parseInt(e.toString(),10)]&&t.listener===n&&(s=o,i=t.debounce,!0)})),-1!==s&&o.splice(s,1),i&&t.removeEventListener(r[parseInt(e.toString(),10)],i)},a=0;a<r.length;a++)s(a)},e.clearEvents=function(t){for(var i=e.addOrGetEventData(t),n=m([],void 0,i),o=0;o<n.length;o++){var r=n[parseInt(o.toString(),10)];t.removeEventListener(r.name,r.debounce),i.shift()}},e.trigger=function(t,i,n){for(var o=0,r=e.addOrGetEventData(t);o<r.length;o++){var s=r[o];s.name===i&&s.debounce.call(this,n)}},e}(),W=/^svg|^path|^g/;function _(e,t){var i=W.test(e)?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return void 0===t||(i.innerHTML=t.innerHTML?t.innerHTML:"",void 0!==t.className&&(i.className=t.className),void 0!==t.id&&(i.id=t.id),void 0!==t.styles&&i.setAttribute("style",t.styles),void 0!==t.attrs&&ie(i,t.attrs)),i}function G(e,t){for(var i=K(t),n=RegExp,o=0,r=e;o<r.length;o++)for(var s=r[o],c=0,h=i;c<h.length;c++){var p=h[c];if(d(s)){var u=a("attributes.className",s);g(u)?l("attributes.className",p,s):new n("\\b"+p+"\\b","i").test(u)||l("attributes.className",u+" "+p,s)}else s.classList.contains(p)||s.classList.add(p)}return e}function X(e,t){for(var i=K(t),n=0,o=e;n<o.length;n++){var r=o[n],s=d(r);if(s?a("attributes.className",r):""!==r.className)for(var c=0,h=i;c<h.length;c++){var p=h[c];if(s){var u=a("attributes.className",r).split(" "),m=u.indexOf(p);-1!==m&&u.splice(m,1),l("attributes.className",u.join(" "),r)}else r.classList.remove(p)}}return e}function K(e){var t=[];return"string"==typeof e?t.push(e):t=e,t}function Z(e){var t=e;return""===t.style.visibility&&t.offsetWidth>0}function J(e,t,i){for(var n=document.createDocumentFragment(),o=0,r=e;o<r.length;o++){var s=r[o];n.appendChild(s)}return t.insertBefore(n,t.firstElementChild),e}function $(e,t,i){var n=document.createDocumentFragment();if(e instanceof NodeList)for(;e.length>0;)n.appendChild(e[0]);else for(var o=0,r=e;o<r.length;o++){var s=r[o];n.appendChild(s)}return t.appendChild(n),e}function ee(e){var t=e.parentNode;if(t)return t.removeChild(e)}function te(e){var t=e.parentNode;q.clearEvents(e),t.removeChild(e)}function ie(e,t){for(var i=e,n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];if(d(i)){var s=r;"tabindex"===r&&(s="tabIndex"),i.attributes[""+s]=t[""+r]}else i.setAttribute(r,t[""+r])}return i}function ne(e,t,i){return void 0===t&&(t=document),e=re(e),t.querySelector(e)}function oe(e,t,i){return void 0===t&&(t=document),e=re(e),t.querySelectorAll(e)}function re(e){var t=/(!|"|\$|%|&|'|\(|\)|\*|\/|:|;|<|=|\?|@|\]|\^|`|{|}|\||\+|~)/g;if(e.match(/#[0-9]/g)||e.match(t)){for(var i=e.split(","),n=0;n<i.length;n++){for(var o=i[parseInt(n.toString(),10)].split(" "),r=0;r<o.length;r++)if(o[parseInt(r.toString(),10)].indexOf("#")>-1&&!o[parseInt(r.toString(),10)].match(/\[.*\]/)){var s=o[parseInt(r.toString(),10)].split("#");if(s[1].match(/^\d/)||s[1].match(t)){var a=o[parseInt(r.toString(),10)].split(".");a[0]=a[0].replace(/#/,"[id='")+"']",o[parseInt(r.toString(),10)]=a.join(".")}}i[parseInt(n.toString(),10)]=o.join(" ")}return i.join(",")}return e}function se(e,t){var i=e;if("function"==typeof i.closest)return i.closest(t);for(;i&&1===i.nodeType;){if(ce(i,t))return i;i=i.parentNode}return null}function ae(e,t){void 0!==t&&Object.keys(t).forEach((function(i){e.style[""+i]=t[""+i]}))}function le(e,t,i){G([e],t),X([e],i)}function ce(e,t){var i=e.matches||e.msMatchesSelector||e.webkitMatchesSelector;return i?i.call(e,t):-1!==[].indexOf.call(document.querySelectorAll(t),e)}var he=function(){function e(e){this.ranArray=[],this.boundedEvents={},g(e)||(this.context=e)}return e.prototype.on=function(e,t,i,n){if(!g(t)){var o=i||this.context;this.notExist(e)?this.boundedEvents[""+e]=[{handler:t,context:o,id:n}]:g(n)?this.isHandlerPresent(this.boundedEvents[""+e],t)||this.boundedEvents[""+e].push({handler:t,context:o}):-1===this.ranArray.indexOf(n)&&(this.ranArray.push(n),this.boundedEvents[""+e].push({handler:t,context:o,id:n}))}},e.prototype.off=function(e,t,i){if(!this.notExist(e)){var n=a(e,this.boundedEvents);if(t){for(var o=0;o<n.length;o++)if(i){if(n[parseInt(o.toString(),10)].id===i){n.splice(o,1);var r=this.ranArray.indexOf(i);-1!==r&&this.ranArray.splice(r,1);break}}else if(t===n[parseInt(o.toString(),10)].handler){n.splice(o,1);break}}else delete this.boundedEvents[""+e]}},e.prototype.notify=function(e,t,i,n){if(this.notExist(e))i&&i.call(this,t);else{t&&(t.name=e);var o=a(e,this.boundedEvents).slice(0);if(window.Blazor)return this.blazorCallback(o,t,i,n,0);for(var r=0,s=o;r<s.length;r++){var l=s[r];l.handler.call(l.context,t)}i&&i.call(this,t)}},e.prototype.blazorCallback=function(e,t,i,n,o){var r=this,s=o===e.length-1;if(o<e.length){var a=e[parseInt(o.toString(),10)],l=a.handler.call(a.context,t);if(l&&"function"==typeof l.then){if(!i)return l;l.then((function(l){if(l="string"==typeof l&&r.isJson(l)?JSON.parse(l,r.dateReviver):l,m(t,t,l,!0),!i||!s)return r.blazorCallback(e,t,i,n,o+1);i.call(a.context,t)})).catch((function(e){n&&n.call(a.context,"string"==typeof e&&r.isJson(e)?JSON.parse(e,r.dateReviver):e)}))}else{if(!i||!s)return this.blazorCallback(e,t,i,n,o+1);i.call(a.context,t)}}},e.prototype.dateReviver=function(e,t){return C&&"string"==typeof t&&null!==t.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/)?new Date(t):t},e.prototype.isJson=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},e.prototype.destroy=function(){this.boundedEvents=this.context=void 0},e.prototype.offIntlEvents=function(){var e=this.boundedEvents.notifyExternalChange;if(e){for(var t=0;t<e.length;t++){var i=e[parseInt(t.toString(),10)].context;i&&i.detectFunction&&i.randomId&&i.isReactMock&&(this.off("notifyExternalChange",i.detectFunction,i.randomId),t--)}this.boundedEvents.notifyExternalChange.length||delete this.boundedEvents.notifyExternalChange}},e.prototype.notExist=function(e){return!1===Object.prototype.hasOwnProperty.call(this.boundedEvents,e)||this.boundedEvents[""+e].length<=0},e.prototype.isHandlerPresent=function(e,t){for(var i=0,n=e;i<n.length;i++){if(n[i].handler===t)return!0}return!1},e}(),de=new RegExp("]"),pe=function(){function e(e,t){this.isRendered=!1,this.isComplexArraySetter=!1,this.isServerRendered=!1,this.allowServerDataBinding=!0,this.isProtectedOnChange=!0,this.properties={},this.changedProperties={},this.oldProperties={},this.bulkChanges={},this.refreshing=!1,this.ignoreCollectionWatch=!1,this.finalUpdate=function(){},this.childChangedProperties={},this.modelObserver=new he(this),f(t)||(this.element="string"==typeof t?document.querySelector(t):t,g(this.element)||(this.isProtectedOnChange=!1,this.addInstance())),f(e)||this.setProperties(e,!0),this.isDestroyed=!1}return e.prototype.setProperties=function(e,t){var i=this.isProtectedOnChange;this.isProtectedOnChange=!!t,u(this,e),!0!==t&&(u(this.changedProperties,e),this.dataBind()),this.finalUpdate(),this.changedProperties={},this.oldProperties={},this.isProtectedOnChange=i},e.callChildDataBind=function(e,t){for(var i=0,n=Object.keys(e);i<n.length;i++){var o=n[i];if(t[""+o]instanceof Array)for(var r=0,s=t[""+o];r<s.length;r++){var a=s[r];void 0!==a.dataBind&&a.dataBind()}else t[""+o].dataBind()}},e.prototype.clearChanges=function(){this.finalUpdate(),this.changedProperties={},this.oldProperties={},this.childChangedProperties={}},e.prototype.dataBind=function(){if(e.callChildDataBind(this.childChangedProperties,this),Object.getOwnPropertyNames(this.changedProperties).length){var t=this.isProtectedOnChange,i=this.changedProperties,n=this.oldProperties;this.clearChanges(),this.isProtectedOnChange=!0,this.onPropertyChanged(i,n),this.isProtectedOnChange=t}},e.prototype.serverDataBind=function(e){},e.prototype.saveChanges=function(e,t,i){this.isProtectedOnChange||(this.oldProperties[""+e]=i,this.changedProperties[""+e]=t,this.finalUpdate(),this.finalUpdate=s(this.dataBind.bind(this)))},e.prototype.addEventListener=function(e,t){this.modelObserver.on(e,t)},e.prototype.removeEventListener=function(e,t){this.modelObserver.off(e,t)},e.prototype.trigger=function(e,t,i,n){var o=this;if(!0!==this.isDestroyed){var r=this.isProtectedOnChange;this.isProtectedOnChange=!1;var s=this.modelObserver.notify(e,t,i,n);if(de.test(e)){var l=a(e,this);if(l){if(window.Blazor){var c=l.call(this,t);c&&"function"==typeof c.then?i?c.then((function(e){i&&(e="string"==typeof e&&o.modelObserver.isJson(e)?JSON.parse(e):e,i.call(o,e))})).catch((function(e){n&&(e="string"==typeof e&&o.modelObserver.isJson(e)?JSON.parse(e):e,n.call(o,e))})):s=c:i&&i.call(this,t)}else l.call(this,t),i&&i.call(this,t)}else i&&i.call(this,t)}return this.isProtectedOnChange=r,s}},e.prototype.addInstance=function(){var e="e-"+this.getModuleName().toLowerCase();G([this.element],["e-lib",e]),g(this.element.ej2_instances)?l("ej2_instances",[this],this.element):this.element.ej2_instances.push(this)},e.prototype.destroy=function(){var e=this;this.element.ej2_instances=this.element.ej2_instances?this.element.ej2_instances.filter((function(t){return t!==e})):[],X([this.element],["e-"+this.getModuleName()]),0===this.element.ej2_instances.length&&X([this.element],["e-lib"]),this.clearChanges(),this.modelObserver.destroy(),this.isDestroyed=!0},e}();function ue(e,t){var i,n,o="string"==typeof e?document.getElementById(e):e;for(n=0;n<o.ej2_instances.length;n++){if(i=o.ej2_instances[parseInt(n.toString(),10)],"string"==typeof t){if(t===i.getModuleName())return i}else if(i instanceof t)return i}}function me(e,t,i,n){return Object.prototype.hasOwnProperty.call(e.properties,t)&&e.properties[""+t]instanceof n||(e.properties[""+t]=r(n,[e,t,i])),e.properties[""+t]}function ge(e,t,i,n,o,s){for(var a=[],l=i?i.length:0,c=0;c<l;c++){var h=n;if(o){var d=r(h,[e,t,{},!0]);d.setProperties(i[parseInt(c.toString(),10)],!0),a.push(d)}else a.push(r(h,[e,t,i[parseInt(c.toString(),10)],!1]))}return a}function fe(e,t){return function(){return Object.prototype.hasOwnProperty.call(this.properties,t)||(this.properties[""+t]=e),this.properties[""+t]}}function ye(e,t){return function(i){if(this.properties[""+t]!==i){var n=Object.prototype.hasOwnProperty.call(this.properties,t)?this.properties[""+t]:e;this.saveChanges(t,i,n),this.properties[""+t]=i}}}function ve(e,t,i){return function(){return me(this,t,e,i)}}function be(e,t,i){return function(n){me(this,t,e,i).setProperties(n)}}function Me(e,t,i){return function(){var n=this;if(!Object.prototype.hasOwnProperty.call(this.properties,t)){var o=ge(this,t,e,i,!1);this.properties[""+t]=o}var r=void 0!==this.controlParent&&this.controlParent.ignoreCollectionWatch||this.ignoreCollectionWatch;return Object.prototype.hasOwnProperty.call(this.properties[""+t],"push")||r||["push","pop"].forEach((function(e){var o={value:Ce(e,t,i,n.properties[""+t]).bind(n),configurable:!0};Object.defineProperty(n.properties[""+t],e,o)})),Object.prototype.hasOwnProperty.call(this.properties[""+t],"isComplexArray")||Object.defineProperty(this.properties[""+t],"isComplexArray",{value:!0}),this.properties[""+t]}}function Ne(e,t,i){return function(n){this.isComplexArraySetter=!0;var o=ge(this,t,e,i,!1),r=ge(this,t,n,i,!0);this.isComplexArraySetter=!1,this.saveChanges(t,r,o),this.properties[""+t]=r}}function Ce(e,t,i,n){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var r=this.propName?this.getParentKey()+"."+t+"-":t+"-";switch(e){case"push":for(var s=0;s<i.length;s++){var a=i[parseInt(s.toString(),10)];Array.prototype[""+e].apply(n,[a]);var l=Ee(r+(n.length-1),a,!this.controlParent,e);this.serverDataBind(l,i[parseInt(s.toString(),10)],!1,e)}break;case"pop":Array.prototype[""+e].apply(n);l=Ee(r+n.length,null,!this.controlParent,e);this.serverDataBind(l,{ejsAction:"pop"},!1,e)}return n}}function Ee(e,t,i,n){var o=e;if(i&&((o={})[""+e]=t,t&&"object"==typeof t)){o[""+e].ejsAction=n}return o}function De(e){return function(t,i){var n={set:ye(e,i),get:fe(e,i),enumerable:!0,configurable:!0};Object.defineProperty(t,i,n),we(t,i,"prop",e)}}function Te(e,t){return function(i,n){var o={set:be(e,n,t),get:ve(e,n,t),enumerable:!0,configurable:!0};Object.defineProperty(i,n,o),we(i,n,"complexProp",e,t)}}function Le(e,t){return function(i,n){var o={set:Ne(e,n,t),get:Me(e,n,t),enumerable:!0,configurable:!0};Object.defineProperty(i,n,o),we(i,n,"colProp",e,t)}}function Se(){return function(e,t){var i={set:function(e){var i=this.properties[""+t];if(i!==e){var n=xe(this,t);!1===f(i)&&n.context.removeEventListener(n.prefix,i),n.context.addEventListener(n.prefix,e),this.properties[""+t]=e}},get:fe(void 0,t),enumerable:!0,configurable:!0};Object.defineProperty(e,t,i),we(e,t,"event")}}function Ie(e){}function we(e,t,i,n,o){f(e.propList)&&(e.propList={props:[],complexProps:[],colProps:[],events:[],propNames:[],complexPropNames:[],colPropNames:[],eventNames:[]}),e.propList[i+"s"].push({propertyName:t,defaultValue:n,type:o}),e.propList[i+"Names"].push(t)}function xe(e,t){if(!1===Object.prototype.hasOwnProperty.call(e,"parentObj"))return{context:e,prefix:t};var i=a("propName",e);return i&&(t=i+"-"+t),xe(a("parentObj",e),t)}var je,Oe,ze,Ae=(je=function(e,t){return je=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},je(e,t)},function(e,t){function i(){this.constructor=e}je(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),ke=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Pe=function(e){function t(t){var i=e.call(this,t,void 0)||this;return i.easing={ease:"cubic-bezier(0.250, 0.100, 0.250, 1.000)",linear:"cubic-bezier(0.250, 0.250, 0.750, 0.750)",easeIn:"cubic-bezier(0.420, 0.000, 1.000, 1.000)",easeOut:"cubic-bezier(0.000, 0.000, 0.580, 1.000)",easeInOut:"cubic-bezier(0.420, 0.000, 0.580, 1.000)",elasticInOut:"cubic-bezier(0.5,-0.58,0.38,1.81)",elasticIn:"cubic-bezier(0.17,0.67,0.59,1.81)",elasticOut:"cubic-bezier(0.7,-0.75,0.99,1.01)"},i}var i;return Ae(t,e),i=t,t.prototype.animate=function(e,t){t=t||{};var n=this.getModel(t);if("string"==typeof e)for(var o=0,r=Array.prototype.slice.call(oe(e,document));o<r.length;o++){var s=r[o];n.element=s,i.delayAnimation(n)}else n.element=e,i.delayAnimation(n)},t.stop=function(e,t){e.style.animation="",e.removeAttribute("e-animate");var i=e.getAttribute("e-animation-id");if(i){var n=parseInt(i,10);cancelAnimationFrame(n),e.removeAttribute("e-animation-id")}t&&t.end&&t.end.call(this,t)},t.delayAnimation=function(e){Oe===ze.Disable?(e.begin&&e.begin.call(this,e),e.end&&e.end.call(this,e)):e.delay?setTimeout((function(){i.applyAnimation(e)}),e.delay):i.applyAnimation(e)},t.applyAnimation=function(e){var t=this;e.timeStamp=0;var i=0,n=0,o=0,r=e.duration;e.element.setAttribute("e-animate","true");var s=function(a){try{if(a){o=0===o?a:o,e.timeStamp=a+e.timeStamp-o,o=a,!i&&e.begin&&e.begin.call(t,e),i+=1;var l=e.timeStamp/i;e.timeStamp<r&&e.timeStamp+l<r&&e.element.getAttribute("e-animate")?(e.element.style.animation=e.name+" "+e.duration+"ms "+e.timingFunction,e.progress&&e.progress.call(t,e),requestAnimationFrame(s)):(cancelAnimationFrame(n),e.element.removeAttribute("e-animation-id"),e.element.removeAttribute("e-animate"),e.element.style.animation="",e.end&&e.end.call(t,e))}else n=requestAnimationFrame(s),e.element.setAttribute("e-animation-id",n.toString())}catch(i){cancelAnimationFrame(n),e.element.removeAttribute("e-animation-id"),e.fail&&e.fail.call(t,i)}};s()},t.prototype.getModel=function(e){return{name:e.name||this.name,delay:e.delay||this.delay,duration:void 0!==e.duration?e.duration:this.duration,begin:e.begin||this.begin,end:e.end||this.end,fail:e.fail||this.fail,progress:e.progress||this.progress,timingFunction:this.easing[e.timingFunction]?this.easing[e.timingFunction]:e.timingFunction||this.easing[this.timingFunction]}},t.prototype.onPropertyChanged=function(e,t){},t.prototype.getModuleName=function(){return"animation"},t.prototype.destroy=function(){},ke([De("FadeIn")],t.prototype,"name",void 0),ke([De(400)],t.prototype,"duration",void 0),ke([De("ease")],t.prototype,"timingFunction",void 0),ke([De(0)],t.prototype,"delay",void 0),ke([Se()],t.prototype,"progress",void 0),ke([Se()],t.prototype,"begin",void 0),ke([Se()],t.prototype,"end",void 0),ke([Se()],t.prototype,"fail",void 0),t=i=ke([Ie],t)}(pe);function Re(e,t,i){var n=function(e){var t={selector:e&&e.selector?e.selector:null,ignore:e&&e.ignore?e.ignore:null,rippleFlag:e&&e.rippleFlag,isCenterRipple:e&&e.isCenterRipple,duration:e&&e.duration?e.duration:350};return t}(t);return!1===n.rippleFlag||void 0===n.rippleFlag?function(){}:(e.setAttribute("data-ripple","true"),q.add(e,"mousedown",Be,{parent:e,rippleOptions:n}),q.add(e,"mouseup",He,{parent:e,rippleOptions:n,done:i}),q.add(e,"mouseleave",Ue,{parent:e,rippleOptions:n}),Q.isPointer&&q.add(e,"transitionend",Ue,{parent:e,rippleOptions:n}),function(){e.removeAttribute("data-ripple"),q.remove(e,"mousedown",Be),q.remove(e,"mouseup",He),q.remove(e,"mouseleave",Ue),q.remove(e,"transitionend",Ue)})}function Be(e){var t=e.target,i=this.rippleOptions.selector,n=i?se(t,i):t;if(!(!n||this.rippleOptions&&se(t,this.rippleOptions.ignore))){var o=n.getBoundingClientRect(),r=e.pageX-document.body.scrollLeft,s=e.pageY-(!document.body.scrollTop&&document.documentElement?document.documentElement.scrollTop:document.body.scrollTop),a=Math.max(Math.abs(r-o.left),Math.abs(r-o.right)),l=Math.max(Math.abs(s-o.top),Math.abs(s-o.bottom)),c=Math.sqrt(a*a+l*l),h=2*c+"px",d=r-o.left-c,p=s-o.top-c;this.rippleOptions&&this.rippleOptions.isCenterRipple&&(d=0,p=0,h="100%"),n.classList.add("e-ripple");var u=_("div",{className:"e-ripple-element",styles:"width: "+h+";height: "+h+";left: "+d+"px;top: "+p+"px;transition-duration: "+this.rippleOptions.duration.toString()+"ms;"});n.appendChild(u),window.getComputedStyle(u).getPropertyValue("opacity"),u.style.transform="scale(1)",n!==this.parent&&q.add(n,"mouseleave",Ue,{parent:this.parent,rippleOptions:this.rippleOptions})}}function He(e){Fe(e,this)}function Ue(e){Fe(e,this)}function Fe(e,t){var i=t.rippleOptions.duration,n=e.target,o=t.rippleOptions.selector,r=o?se(n,o):n;if(r&&(!r||-1!==r.className.indexOf("e-ripple"))){var s=oe(".e-ripple-element",r),a=s[s.length-1];a&&(a.style.opacity="0.5"),t.parent!==r&&q.remove(r,"mouseleave",Ue),setTimeout((function(){a&&a.parentNode&&a.parentNode.removeChild(a),r.getElementsByClassName("e-ripple-element").length||r.classList.remove("e-ripple"),t.done&&t.done(e)}),i)}}!function(e){e.Default="Default",e.Enable="Enable",e.Disable="Disable"}(ze||(ze={}));var Ye,Ve=function(){function e(e){this.loadedModules=[],this.parent=e}return e.prototype.inject=function(e,t){var i=e.length;if(0!==i){this.loadedModules.length&&this.clearUnusedModule(e);for(var n=0;n<i;n++)for(var o=e[parseInt(n.toString(),10)],s=0,a=t;s<a.length;s++){var c=a[s],h=o.member;if(c&&c.prototype.getModuleName()===o.member&&!this.isModuleLoaded(h)){var d=r(c,o.args),p=this.getMemberName(h);o.isProperty?l(p,c,this.parent):l(p,d,this.parent);var u=o;u.member=p,this.loadedModules.push(u)}}}else this.clean()},e.prototype.clean=function(){for(var e=0,t=this.loadedModules;e<t.length;e++){var i=t[e];i.isProperty||a(i.member,this.parent).destroy()}this.loadedModules=[]},e.prototype.getNonInjectedModules=function(e){var t=this;return e.filter((function(e){return!t.isModuleLoaded(e.member)}))},e.prototype.clearUnusedModule=function(e){for(var t=this,i=e.map((function(e){return t.getMemberName(e.member)})),n=0,o=this.loadedModules.filter((function(e){return-1===i.indexOf(e.member)}));n<o.length;n++){var r=o[n];r.isProperty||a(r.member,this.parent).destroy(),this.loadedModules.splice(this.loadedModules.indexOf(r),1),c(this.parent,r.member)}},e.prototype.getMemberName=function(e){return e[0].toLowerCase()+e.substring(1)+"Module"},e.prototype.isModuleLoaded=function(e){for(var t=0,i=this.loadedModules;t<i.length;t++){if(i[t].member===this.getMemberName(e))return!0}return!1},e}(),Qe=function(){function e(e,t,i,n){this.isComplexArraySetter=!1,this.properties={},this.changedProperties={},this.childChangedProperties={},this.oldProperties={},this.finalUpdate=function(){},this.callChildDataBind=a("callChildDataBind",pe),this.parentObj=e,this.controlParent=this.parentObj.controlParent||this.parentObj,this.propName=t,this.isParentArray=n,this.setProperties(i,!0)}return e.prototype.updateChange=function(e,t){!0===e?this.parentObj.childChangedProperties[""+t]=e:delete this.parentObj.childChangedProperties[""+t],this.parentObj.updateChange&&this.parentObj.updateChange(e,this.parentObj.propName)},e.prototype.updateTimeOut=function(){if(this.parentObj.updateTimeOut)this.parentObj.finalUpdate(),this.parentObj.updateTimeOut();else{var e=setTimeout(this.parentObj.dataBind.bind(this.parentObj));this.finalUpdate=function(){clearTimeout(e)}}},e.prototype.clearChanges=function(){this.finalUpdate(),this.updateChange(!1,this.propName),this.oldProperties={},this.changedProperties={}},e.prototype.setProperties=function(e,t){!0===t?(u(this,e),this.updateChange(!1,this.propName),this.clearChanges()):u(this,e)},e.prototype.dataBind=function(){if(this.callChildDataBind(this.childChangedProperties,this),this.isParentArray){var e=this.parentObj[this.propName].indexOf(this);Object.keys(this.changedProperties).length&&(l(this.propName+"."+e,this.changedProperties,this.parentObj.changedProperties),l(this.propName+"."+e,this.oldProperties,this.parentObj.oldProperties))}else this.parentObj.changedProperties[this.propName]=this.changedProperties,this.parentObj.oldProperties[this.propName]=this.oldProperties;this.clearChanges()},e.prototype.saveChanges=function(e,t,i,n){this.controlParent.isProtectedOnChange||(n||this.serverDataBind(e,t,!0),this.oldProperties[""+e]=i,this.changedProperties[""+e]=t,this.updateChange(!0,this.propName),this.finalUpdate(),this.updateTimeOut())},e.prototype.serverDataBind=function(e,t,i,n){},e.prototype.getParentKey=function(e){var t="",i=this.propName;if(this.isParentArray){t=this.parentObj[this.propName].indexOf(this);var n=this.parentObj[this.propName].length;n=e?n:n>0?n-1:0,i+=t=-1!==t?"-"+t:"-"+n}return this.controlParent!==this.parentObj&&(i=this.parentObj.getParentKey()+"."+this.propName+t),i},e}();!function(e){var t=[28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990];e.getHijriDate=function(e){var i=e.getDate(),n=e.getMonth(),o=e.getFullYear(),r=n+1,s=o;r<3&&(s-=1,r+=12);var a=Math.floor(s/100),l=a-Math.floor(a/4)-2,c=Math.floor(365.25*(s+4716))+Math.floor(30.6001*(r+1))+i-l-1524,h=c+(l=(a=Math.floor((c-1867216.25)/36524.25))-Math.floor(a/4)+1)+1524,d=Math.floor((h-122.1)/365.25),p=Math.floor(365.25*d),u=Math.floor((h-p)/30.6001);i=h-p-Math.floor(30.6001*u),(n=Math.floor((h-p)/20.6001))>13&&(d+=1,n-=12),n-=1,o=d-4716;var m=c-24e5,g=10631/30,f=c-1948084,y=Math.floor(f/10631);f-=10631*y;var v=Math.floor((f-.1335)/g),b=30*y+v;f-=Math.floor(v*g+.1335);var M=Math.floor((f+28.5001)/29.5);13===M&&(M=12);for(var N=f-Math.floor(29.5001*M-29),C=0;C<t.length&&!(t[parseInt(C.toString(),10)]>m);C++);var E=C+16260,D=Math.floor((E-1)/12),T=D+1,L=E-12*D,S=m-t[C-1]+1;return(S+"").length>2&&(S=N,L=M,T=b),{year:T,month:L,date:S}},e.toGregorian=function(e,i,n){var o=n+t[12*(e-1)+1+(i-1)-16260-1]-1+24e5,r=Math.floor(o+.5),s=Math.floor((r-1867216.25)/36524.25),a=(s=r+1+s-Math.floor(s/4))+1524,l=Math.floor((a-122.1)/365.25),c=Math.floor(365.25*l),h=Math.floor((a-c)/30.6001),d=a-c-Math.floor(30.6001*h),p=h-(h>13.5?13:1),u=l-(p>2.5?4716:4715);return u<=0&&p--,new Date(u+"/"+p+"/"+d)}}(Ye||(Ye={}));var qe=/\/MMMMM|MMMM|MMM|a|LLLL|LLL|EEEEE|EEEE|E|K|cccc|ccc|WW|W|G+|z+/gi,We="stand-alone",_e=["sun","mon","tue","wed","thu","fri","sat"],Ge={m:"getMinutes",h:"getHours",H:"getHours",s:"getSeconds",d:"getDate",f:"getMilliseconds"},Xe={M:"month",d:"day",E:"weekday",c:"weekday",y:"year",m:"minute",h:"hour",H:"hour",s:"second",L:"month",a:"designator",z:"timeZone",Z:"timeZone",G:"era",f:"milliseconds"},Ke=function(){function e(){}return e.dateFormat=function(e,t,i){var n=this,o=O.getDependables(i,e,t.calendar);a("parserObject.numbers",o);var r=o.dateObject,s={isIslamic:O.islamicRegex.test(t.calendar)};s.firstDayOfWeek=O.getWeekData(e,i);var l=t.format||O.getResultantPattern(t.skeleton,o.dateObject,t.type,!1,"");if(s.dateSeperator=O.getDateSeparator(o.dateObject),f(l))M("Format options or type given must be invalid");else{l=O.ConvertDateToWeekFormat(l),s.pattern=l,s.numMapper=S.getNumberMapper(o.parserObject,S.getNumberingSystem(i));for(var c=0,h=l.match(qe)||[];c<h.length;c++){var d=h[c],p=d.length,u=d[0];switch("K"===u&&(u="h"),u){case"E":case"c":s.weekday=o.dateObject[""+O.days][""+We][O.monthIndex[""+p]];break;case"M":case"L":s.month=o.dateObject[""+O.month][""+We][O.monthIndex[""+p]];break;case"a":s.designator=a("dayPeriods.format.wide",r);break;case"G":var m=p<=3?"eraAbbr":4===p?"eraNames":"eraNarrow";s.era=a("eras."+m,o.dateObject);break;case"z":s.timeZone=a("dates.timeZoneNames",o.parserObject)}}}return function(e){return isNaN(e.getDate())?null:n.intDateFormatter(e,s)}},e.intDateFormatter=function(e,t){for(var i="",n=t.pattern.match(O.dateParseRegex),o=this.getCurrentDateValue(e,t.isIslamic),r=0,s=n;r<s.length;r++){var a=s[r],l=a.length,c=a[0];"K"===c&&(c="h");var h=void 0,d="",p=void 0,u=void 0,m="";switch(c){case"M":case"L":h=o.month,l>2?i+=t.month[""+h]:p=!0;break;case"E":case"c":i+=t.weekday[""+_e[e.getDay()]];break;case"H":case"h":case"m":case"s":case"d":case"f":if(p=!0,"d"===c)h=o.date;else if("f"===c){p=!1,u=!0;var f=(d=(d=e[""+Ge[""+c]]().toString()).substring(0,l)).length;if(l!==f){if(l>3)continue;for(var y=0;y<l-f;y++)d="0"+d.toString()}m+=d}else h=e[""+Ge[""+c]]();"h"===c&&(h=h%12||12);break;case"y":u=!0,m+=o.year,2===l&&(m=m.substr(m.length-2));break;case"a":var v=e.getHours()<12?"am":"pm";i+=t.designator[""+v];break;case"G":var b=e.getFullYear()<0?0:1,M=t.era[""+b];g(M)&&(M=t.era[b?0:1]),i+=M||"";break;case"'":i+="''"===a?"'":a.replace(/'/g,"");break;case"z":var N=e.getTimezoneOffset(),C=l<4?"+H;-H":t.timeZone.hourFormat;C=C.replace(/:/g,t.numMapper.timeSeparator),0===N?i+=t.timeZone.gmtZeroFormat:(u=!0,m=this.getTimeZoneValue(N,C)),m=t.timeZone.gmtFormat.replace(/\{0\}/,m);break;case":":i+=t.numMapper.numberSymbols.timeSeparator;break;case"/":i+=t.dateSeperator;break;case"W":p=!0,h=O.getWeekOfYear(e,t.firstDayOfWeek);break;default:i+=a}p&&(u=!0,m=this.checkTwodigitNumber(h,l)),u&&(i+=S.convertValueParts(m,O.latnParseRegex,t.numMapper.mapper))}return i},e.getCurrentDateValue=function(e,t){return t?Ye.getHijriDate(e):{year:e.getFullYear(),month:e.getMonth()+1,date:e.getDate()}},e.checkTwodigitNumber=function(e,t){var i=e+"";return 2===t&&2!==i.length?"0"+i:i},e.getTimeZoneValue=function(e,t){var i=this,n=t.split(";")[e>0?1:0],o=Math.abs(e);return n.replace(/HH?|mm/g,(function(e){var t=e.length,n=-1!==e.indexOf("H");return i.checkTwodigitNumber(Math.floor(n?o/60:o%60),t)}))},e}();j=Ke;var Ze={ms:"minimumSignificantDigits",ls:"maximumSignificantDigits",mf:"minimumFractionDigits",lf:"maximumFractionDigits"},Je=["infinity","nan","group","decimal","exponential"],$e=function(){function e(){}return e.numberFormatter=function(e,t,i){var n,o=this,r=m({},t),s={},a={},l=O.getDependables(i,e,"",!0);l.numericObject,a.numberMapper=S.getNumberMapper(l.parserObject,S.getNumberingSystem(i),!0),a.currencySymbol=O.getCurrencySymbol(l.numericObject,r.currency||w,t.altSymbol,t.ignoreCurrency),a.percentSymbol=a.numberMapper.numberSymbols.percentSign,a.minusSymbol=a.numberMapper.numberSymbols.minusSign;var c=a.numberMapper.numberSymbols;if(t.format&&!O.formatRegex.test(t.format))s=O.customFormat(t.format,a,l.numericObject),!f(r.useGrouping)&&r.useGrouping&&(r.useGrouping=s.pData.useGrouping);else{m(r,O.getProperNumericSkeleton(t.format||"N")),r.isCurrency="currency"===r.type,r.isPercent="percent"===r.type,n=O.getSymbolPattern(r.type,a.numberMapper.numberSystem,l.numericObject,r.isAccount),r.groupOne=this.checkValueRange(r.maximumSignificantDigits,r.minimumSignificantDigits,!0),this.checkValueRange(r.maximumFractionDigits,r.minimumFractionDigits,!1,!0),f(r.fractionDigits)||(r.minimumFractionDigits=r.maximumFractionDigits=r.fractionDigits),f(r.useGrouping)&&(r.useGrouping=!0),r.isCurrency&&(n=n.replace(/\u00A4/g,O.defaultCurrency));var h=n.split(";");if(s.nData=O.getFormatData(h[1]||"-"+h[0],!0,a.currencySymbol),s.pData=O.getFormatData(h[0],!1,a.currencySymbol),r.useGrouping&&(r.groupSeparator=c[Je[2]],r.groupData=this.getGroupingDetails(h[0])),f(r.minimumFractionDigits)&&(r.minimumFractionDigits=s.nData.minimumFraction),f(r.maximumFractionDigits)){var d=s.nData.maximumFraction;r.maximumFractionDigits=f(d)&&r.isPercent?0:d}var p=r.minimumFractionDigits,u=r.maximumFractionDigits;f(p)||f(u)||p>u&&(r.maximumFractionDigits=p)}return m(s.nData,r),m(s.pData,r),function(e){return isNaN(e)?c[Je[1]]:isFinite(e)?o.intNumberFormatter(e,s,a,t):c[Je[0]]}},e.getGroupingDetails=function(e){var t={},i=e.match(O.negativeDataRegex);if(i&&i[4]){var n=i[4],o=n.lastIndexOf(",");if(-1!==o){var r=n.split(".")[0];t.primary=r.length-o-1;var s=n.lastIndexOf(",",o-1);-1!==s&&(t.secondary=o-1-s)}}return t},e.checkValueRange=function(e,t,i,n){var o=n?"f":"s",r=0,s=Ze["l"+o],a=Ze["m"+o];if(f(e)||(this.checkRange(e,s,n),r++),f(t)||(this.checkRange(t,a,n),r++),2===r){if(!(e<t))return!0;M(a+"specified must be less than the"+s)}else i&&1===r&&M("Both"+a+"and"+a+"must be present");return!1},e.checkRange=function(e,t,i){var n=i?[0,20]:[1,21];(e<n[0]||e>n[1])&&M(t+"value must be within the range"+n[0]+"to"+n[1])},e.intNumberFormatter=function(e,t,i,n){var o;if(!f(t.nData.type)){e<0?(e*=-1,o=t.nData):o=0===e&&t.zeroData||t.pData;var r="";if(o.isPercent&&(e*=100),o.groupOne)r=this.processSignificantDigits(e,o.minimumSignificantDigits,o.maximumSignificantDigits);else if(r=this.processFraction(e,o.minimumFractionDigits,o.maximumFractionDigits,n),o.minimumIntegerDigits&&(r=this.processMinimumIntegers(r,o.minimumIntegerDigits)),i.isCustomFormat&&o.minimumFractionDigits<o.maximumFractionDigits&&/\d+\.\d+/.test(r)){for(var s=r.split("."),a=s[1],l=a.length-1;l>=0&&("0"===a[parseInt(l.toString(),10)]&&l>=o.minimumFractionDigits);l--)a=a.slice(0,l);r=s[0]+"."+a}return"scientific"===o.type&&(r=(r=e.toExponential(o.maximumFractionDigits)).replace("e",i.numberMapper.numberSymbols[Je[4]])),r=r.replace(".",i.numberMapper.numberSymbols[Je[3]]),r="#,###,,;(#,###,,)"===o.format?this.customPivotFormat(parseInt(r,10)):r,o.useGrouping&&(r=this.groupNumbers(r,o.groupData.primary,o.groupSeparator||",",i.numberMapper.numberSymbols[Je[3]]||".",o.groupData.secondary)),r=S.convertValueParts(r,O.latnParseRegex,i.numberMapper.mapper),"N/A"===o.nlead?o.nlead:"0"===r&&n&&"0"===n.format?r+o.nend:o.nlead+r+o.nend}},e.processSignificantDigits=function(e,t,i){var n=e+"";return n.length<t?e.toPrecision(t):+(n=e.toPrecision(i))+""},e.groupNumbers=function(e,t,i,n,o){for(var r=!g(o)&&0!==o,s=e.split(n),a=s[0],l=a.length,c="";l>t;)c=a.slice(l-t,l)+(c.length?i+c:""),l-=t,r&&(t=o,r=!1);return s[0]=a.slice(0,l)+(c.length?i:"")+c,s.join(n)},e.processFraction=function(e,t,i,n){var o=(e+"").split(".")[1],r=o?o.length:0;if(t&&r<t){var s="";if(0!==r){s+=e;for(var a=0;a<t-r;a++)s+="0";return s}return s=e.toFixed(t),e.toFixed(t)}if(!g(i)&&(r>i||0===i))return e.toFixed(i);var l=e+"";return"0"===l[0]&&n&&"###.00"===n.format&&(l=l.slice(1)),l},e.processMinimumIntegers=function(e,t){var i=e.split("."),n=i[0],o=n.length;if(o<t){for(var r=0;r<t-o;r++)n="0"+n;i[0]=n}return i.join(".")},e.customPivotFormat=function(e){if(e>=5e5){var t=(e/=1e6).toString().split(".");t[0];var i=t[1];return i&&+i.substring(0,1)>=5?Math.ceil(e).toString():Math.floor(e).toString()}return""},e}();!function(e){x=e}($e);var et="stand-alone",tt=/^[0-9]*$/,it={minute:"setMinutes",hour:"setHours",second:"setSeconds",day:"setDate",month:"setMonth",milliseconds:"setMilliseconds"},nt=function(){function e(){}return e.dateParser=function(e,t,i){var n,o=this,r=O.getDependables(i,e,t.calendar),s=S.getCurrentNumericOptions(r.parserObject,S.getNumberingSystem(i),!1,!1),l={},c=t.format||O.getResultantPattern(t.skeleton,r.dateObject,t.type,!1,""),h="";if(f(c))M("Format options or type given must be invalid");else{c=O.ConvertDateToWeekFormat(c),l={isIslamic:O.islamicRegex.test(t.calendar),pattern:c,evalposition:{},culture:e};for(var d=c.match(O.dateParseRegex)||[],p=d.length,u=0,m=0,y=!1,v=s.numericRegex,b=S.getNumberMapper(r.parserObject,S.getNumberingSystem(i)),N=0;N<p;N++){var C=d[parseInt(N.toString(),10)],E=C.length,D="K"===C[0]?"h":C[0],T=void 0,L=void 0,I=Xe[""+D],w=2===E?"":"?";switch(y&&(u=m,y=!1),D){case"E":case"c":var x;x=r.dateObject[""+O.days][""+et][O.monthIndex[""+E]];var j=S.reverseObject(x);h+="("+Object.keys(j).join("|")+")";break;case"M":case"L":case"d":case"m":case"s":case"h":case"H":case"f":if(L=!0,("M"===D||"L"===D)&&E>2){var z;z=r.dateObject.months[""+et][O.monthIndex[""+E]],l[""+I]=S.reverseObject(z),h+="("+Object.keys(l[""+I]).join("|")+")"}else if("f"===D){if(E>3)continue;T=!0,h+="("+v+v+"?"+v+"?)"}else T=!0,h+="("+v+v+w+")";"h"===D&&(l.hour12=!0);break;case"W":h+="("+v+(1===E?"?":"")+v+")";break;case"y":L=T=!0,h+=2===E?"("+v+v+")":"("+v+"{"+E+",})";break;case"a":L=!0;var A=a("dayPeriods.format.wide",r.dateObject);l[""+I]=S.reverseObject(A),h+="("+Object.keys(l[""+I]).join("|")+")";break;case"G":L=!0;var k=E<=3?"eraAbbr":4===E?"eraNames":"eraNarrow";l[""+I]=S.reverseObject(a("eras."+k,r.dateObject)),h+="("+Object.keys(l[""+I]).join("|")+"?)";break;case"z":L=0!==(new Date).getTimezoneOffset(),l[""+I]=a("dates.timeZoneNames",r.parserObject);var P=l[""+I],R=(n=E<4)?"+H;-H":P.hourFormat;R=R.replace(/:/g,b.timeSeparator),h+="("+this.parseTimeZoneRegx(R,P,v)+")?",y=!0,m=n?6:12;break;case"'":h+="("+C.replace(/'/g,"")+")?";break;default:h+="([\\D])"}if(L&&(l.evalposition[""+I]={isNumber:T,pos:N+1+u,hourOnly:n}),N===p-1&&!g(h)){var B=RegExp;l.parserRegex=new B("^"+h+"$","i")}}}return function(e){var t=o.internalDateParse(e,l,s);if(g(t)||!Object.keys(t).length)return null;if(l.isIslamic){var i={},n=t.year,r=t.day,a=t.month,c=n?n+"":"",h=2===c.length;n&&a&&r&&!h||(i=Ye.getHijriDate(new Date)),h&&(n=parseInt((i.year+"").slice(0,2)+c,10));var d=Ye.toGregorian(n||i.year,a||i.month,r||i.date);t.year=d.getFullYear(),t.month=d.getMonth()+1,t.day=d.getDate()}return o.getDateObject(t)}},e.getDateObject=function(e,t){var i=t||new Date;i.setMilliseconds(0);var n=e.year,o=e.designator,r=e.timeZone;if(!f(n)){if((n+"").length<=2)n+=100*Math.floor(i.getFullYear()/100);i.setFullYear(n)}for(var s=0,a=["hour","minute","second","milliseconds","month","day"];s<a.length;s++){var l=a[s],c=e[""+l];if(f(c)&&"day"===l&&i.setDate(1),!f(c))if("month"===l){if((c-=1)<0||c>11)return new Date("invalid");var h=i.getDate();i.setDate(1),i[it[""+l]](c);var d=new Date(i.getFullYear(),c+1,0).getDate();i.setDate(h<d?h:d)}else{if("day"===l){var p=new Date(i.getFullYear(),i.getMonth()+1,0).getDate();if(c<1||c>p)return null}i[""+it[""+l]](c)}}if(!f(o)){var u=i.getHours();"pm"===o?i.setHours(u+(12===u?0:12)):12===u&&i.setHours(0)}if(!f(r)){var m=r-i.getTimezoneOffset();0!==m&&i.setMinutes(i.getMinutes()+m)}return i},e.internalDateParse=function(e,t,i){var n=e.match(t.parserRegex),o={hour:0,minute:0,second:0};if(g(n))return null;for(var r=0,s=Object.keys(t.evalposition);r<s.length;r++){var a=s[r],l=t.evalposition[""+a],c=n[l.pos];if(l.isNumber)o[""+a]=this.internalNumberParser(c,i);else if("timeZone"!==a||f(c)){c="month"!==a||t.isIslamic||"en"!==t.culture&&"en-GB"!==t.culture&&"en-US"!==t.culture?c:c[0].toUpperCase()+c.substring(1).toLowerCase(),c="month"!==a&&"designator"===a&&t.culture&&-1!==t.culture.indexOf("en-")&&-1===["en-US","en-MH","en-MP"].indexOf(t.culture)?c.toLowerCase():c,o[""+a]=t[""+a][""+c]}else{var h=l.pos,d=void 0,p=n[h+1],u=!f(p);l.hourOnly?d=60*this.getZoneValue(u,p,n[h+4],i):(d=60*this.getZoneValue(u,p,n[h+7],i),d+=this.getZoneValue(u,n[h+4],n[h+10],i)),g(d)||(o[""+a]=d)}}return t.hour12&&(o.hour12=!0),o},e.internalNumberParser=function(e,t){return e=S.convertValueParts(e,t.numberParseRegex,t.numericPair),tt.test(e)?+e:null},e.parseTimeZoneRegx=function(e,t,i){var n,o=t.gmtFormat,r="("+i+")("+i+")";n=e.replace("+","\\+");var s=(n=-1!==e.indexOf("HH")?n.replace(/HH|mm/g,"("+r+")"):n.replace(/H|m/g,"("+r+"?)")).split(";").map((function(e){return o.replace("{0}",e)}));return n=s.join("|")+"|"+t.gmtZeroFormat},e.getZoneValue=function(e,t,i,n){var o=e?t:i;if(!o)return 0;var r=this.internalNumberParser(o,n);return e?-r:r},e}(),ot=new RegExp("^([^0-9]*)(([0-9,]*[0-9]+)(.[0-9]+)?)([Ee][+-]?[0-9]+)?([^0-9]*)$"),rt=/,/g,st=["minusSign","infinity"],at=function(){function e(){}return e.numberParser=function(e,t,i){var n=this,o=O.getDependables(i,e,"",!0),r={custom:!0};O.formatRegex.test(t.format)||!t.format?(m(r,O.getProperNumericSkeleton(t.format||"N")),r.custom=!1,r.fractionDigits||t.maximumFractionDigits&&(r.maximumFractionDigits=t.maximumFractionDigits)):m(r,O.customFormat(t.format,null,null)),a("numbers",o.parserObject);var s,l=S.getCurrentNumericOptions(o.parserObject,S.getNumberingSystem(i),!0,!1);if(r.symbolRegex=S.getSymbolRegex(Object.keys(l.symbolMatch)),r.infinity=l.symbolNumberSystem[st[1]],s=O.getSymbolPattern(r.type,l.numberSystem,o.numericObject,r.isAccount)){var c=(s=s.replace(/\u00A4/g,O.defaultCurrency)).split(";");r.nData=O.getFormatData(c[1]||"-"+c[0],!0,""),r.pData=O.getFormatData(c[0],!0,"")}return function(e){return n.getParsedNumber(e,r,l)}},e.getParsedNumber=function(e,t,i){var n,o,r,s,a,l;if(-1!==e.indexOf(t.infinity))return 1/0;e=S.convertValueParts(e,t.symbolRegex,i.symbolMatch),0===(e=-1!==(e=S.convertValueParts(e,i.numberParseRegex,i.numericPair)).indexOf("-")?e.replace("-.","-0."):e).indexOf(".")&&(e="0"+e);var c=e.match(ot);if(g(c))return NaN;s=c[1],r=c[2];var h=c[5];return a=c[6],o=(n=t.custom?s===t.nData.nlead&&a===t.nData.nend:-1!==s.indexOf(t.nData.nlead)&&-1!==a.indexOf(t.nData.nend))?t.nData.isPercent:t.pData.isPercent,r=r.replace(rt,""),h&&(r+=h),l=+r,("percent"===t.type||o)&&(l/=100),(t.custom||t.fractionDigits)&&(l=parseFloat(l.toFixed(t.custom?n?t.nData.maximumFractionDigits:t.pData.maximumFractionDigits:t.fractionDigits))),t.maximumFractionDigits&&(l=this.convertMaxFracDigits(r,t,l,n)),n&&(l*=-1),l},e.convertMaxFracDigits=function(e,t,i,n){var o=e.split(".");return o[1]&&o[1].length>t.maximumFractionDigits&&(i=+i.toFixed(t.custom?n?t.nData.maximumFractionDigits:t.pData.maximumFractionDigits:t.maximumFractionDigits)),i},e}(),lt=new he,ct={},ht="en-US",dt=["numericObject","dateObject"],pt=function(){function e(e){e&&(this.culture=e)}return e.prototype.getDateFormat=function(e){return Ke.dateFormat(this.getCulture(),e||{type:"date",skeleton:"short"},ct)},e.prototype.getNumberFormat=function(e){return e&&!e.currency&&(e.currency=w),$e.numberFormatter(this.getCulture(),e||{},ct)},e.prototype.getDateParser=function(e){return nt.dateParser(this.getCulture(),e||{skeleton:"short",type:"date"},ct)},e.prototype.getNumberParser=function(e){return at.numberParser(this.getCulture(),e||{format:"N"},ct)},e.prototype.formatNumber=function(e,t){return this.getNumberFormat(t)(e)},e.prototype.formatDate=function(e,t){return this.getDateFormat(t)(e)},e.prototype.parseDate=function(e,t){return this.getDateParser(t)(e)},e.prototype.parseNumber=function(e,t){return this.getNumberParser(t)(e)},e.prototype.getDatePattern=function(e,t){return O.getActualDateTimeFormat(this.getCulture(),e,ct,t)},e.prototype.getNumberPattern=function(e,t){return O.getActualNumberFormat(this.getCulture(),e,ct,t)},e.prototype.getFirstDayOfWeek=function(){return O.getWeekData(this.getCulture(),ct)},e.prototype.getCulture=function(){return this.culture||ht},e}();function ut(e,t){var i=O.getDependables(ct,e,"",!0)[dt[0]],n=O.getDependables(ct,e,"")[dt[1]],o=a("defaultNumberingSystem",i),r=a("symbols-numberSystem-"+o,i),s=O.getSymbolPattern("decimal",o,i,!1);return m(r,O.getFormatData(s,!0,"",!0),{dateSeparator:O.getDateSeparator(n)})}var mt,gt=["grid","pivotview","treegrid","spreadsheet","rangeNavigator","DocumentEditor","listbox","inplaceeditor","PdfViewer","richtexteditor","DashboardLayout","chart","stockChart","circulargauge","diagram","heatmap","lineargauge","maps","slider","smithchart","barcode","sparkline","treemap","bulletChart","kanban","daterangepicker","schedule","gantt","signature","query-builder","drop-down-tree","carousel","filemanager","uploader","accordion","tab","treeview"],ft=[115,121,110,99,102,117,115,105,111,110,46,105,115,76,105,99,86,97,108,105,100,97,116,101,100],yt=new(function(){function e(e){var t;this.isValidated=!1,this.isLicensed=!0,this.version="28",this.platform=/JavaScript|ASPNET|ASPNETCORE|ASPNETMVC|FileFormats|essentialstudio/i,this.errors={noLicense:"<span>This application was built using a trial version of Syncfusion<sup>®</sup> Essential Studio<sup>®</sup>. To remove the license validation message permanently, a valid license key must be included.</span>",trailExpired:"<span>This application was built using a trial version of Syncfusion<sup>®</sup> Essential Studio<sup>®</sup>. To remove the license validation message permanently, a valid license key must be included.</span>",versionMismatched:"<span>The included Syncfusion<sup>®</sup> license key is invalid.</span>",platformMismatched:"<span>The included Syncfusion<sup>®</sup> license key is invalid.</span>",invalidKey:"<span>The included Syncfusion<sup>®</sup> license key is invalid.</span>"},this.manager=(t=null,{setKey:function(e){t=e},getKey:function(){return t}}),this.npxManager={getKey:function(){return"npxKeyReplace"}},this.manager.setKey(e)}return e.prototype.validate=function(){if(!this.isValidated&&h&&!a(vt(ft),h)&&!a("Blazor",h)){var e=void 0,t=void 0;if(this.manager&&this.manager.getKey()||this.npxManager&&"npxKeyReplace"!==this.npxManager.getKey()){var i=this.getInfoFromKey();if(i&&i.length)for(var n=0,o=i;n<o.length;n++){var r=o[n];if(!this.platform.test(r.platform)||r.invalidPlatform)e=this.errors.platformMismatched;else if(-1===r.version.indexOf(this.version))e=(e=(e=this.errors.versionMismatched).replace("##LicenseVersion",r.version)).replace("##Requireversion",this.version+".x");else if(r.expiryDate){var s=new Date(r.expiryDate),c=new Date;if(!(s!==c&&s<c))break;e=this.errors.trailExpired}}else e=this.errors.invalidKey}else{var d=a(vt([115,121,110,99,102,117,115,105,111,110,46,108,105,99,101,110,115,101,67,111,110,116,101,110,116]),h);t=a(vt([115,121,110,99,102,117,115,105,111,110,46,99,108,97,105,109,65,99,99,111,117,110,116,85,82,76]),h),e=d&&""!==d?d:this.errors.noLicense}if(e&&"undefined"!=typeof document&&!g(document))_("div",{innerHTML:"<img src='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzE5OV80KSI+CjxwYXRoIGQ9Ik0xMiAyMUMxNi45NzA2IDIxIDIxIDE2Ljk3MDYgMjEgMTJDMjEgNy4wMjk0NCAxNi45NzA2IDMgMTIgM0M3LjAyOTQ0IDMgMyA3LjAyOTQ0IDMgMTJDMyAxNi45NzA2IDcuMDI5NDQgMjEgMTIgMjFaIiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBmaWxsPSIjNjE2MDYzIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS44MTI1IDlDMTIuNDMzOCA5IDEyLjkzNzUgOC40OTYzMiAxMi45Mzc1IDcuODc1QzEyLjkzNzUgNy4yNTM2OCAxMi40MzM4IDYuNzUgMTEuODEyNSA2Ljc1QzExLjE5MTIgNi43NSAxMC42ODc1IDcuMjUzNjggMTAuNjg3NSA3Ljg3NUMxMC42ODc1IDguNDk2MzIgMTEuMTkxMiA5IDExLjgxMjUgOVoiIGZpbGw9IiM3MzczNzMiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xOTlfNCI+CjxyZWN0IHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K' style=\"top: 6px;\n position: absolute;\n left: 16px;\n width: 24px;\n height: 24px;\"/>"+e+' <a style="text-decoration: none;color: #0D6EFD;font-weight: 500;" href='+(mt=t&&""!==t?t:"https://www.syncfusion.com/account/claim-license-key?pl=SmF2YVNjcmlwdA==&vs=Mjg=&utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information")+">Claim your free account</a>"}).setAttribute("style","position: fixed;\n top: 10px;\n left: 10px;\n right: 10px;\n font-size: 14px;\n background: #EEF2FF;\n color: #222222;\n z-index: 999999999;\n text-align: left;\n border: 1px solid #EEEEEE;\n padding: 10px 11px 10px 50px;\n border-radius: 8px;\n font-family: Helvetica Neue, Helvetica, Arial;"),this.isLicensed=!1;this.isValidated=!0,l(vt(ft),this.isValidated,h)}return!0},e.prototype.getDecryptedData=function(e){try{return atob(e)}catch(e){return""}},e.prototype.getInfoFromKey=function(){try{var e="",t=[5439488,7929856,5111808,6488064,4587520,7667712,5439488,6881280,5177344,7208960,4194304,4456448,6619136,7733248,5242880,7077888,6356992,7602176,4587520,7274496,7471104,7143424],i=[],n=[],o=!1,r=!1;this.manager.getKey()?e=this.manager.getKey():(r=!0,e=this.npxManager.getKey().split("npxKeyReplace")[1]);for(var s=e.split(";"),a=0,l=s;a<l.length;a++){var c=l[a],h=this.getDecryptedData(c);if(h){var d=0,p="";if(r){var u=h[h.length-1],m=[];for(g=0;g<h.length;g++)m[parseInt(g.toString(),10)]=h[parseInt(g.toString(),10)].charCodeAt(0)-u.charCodeAt(0);for(g=0;g<m.length;g++)p+=String.fromCharCode(m[parseInt(g.toString(),10)])}else for(var g=0;g<h.length;g++,d++){d===t.length&&(d=0);var f=h.charCodeAt(g);p+=String.fromCharCode(f^t[parseInt(d.toString(),10)]>>16)}this.platform.test(p)?(i=p.split(";"),o=!1,i.length>3&&n.push({platform:i[0],version:i[1],expiryDate:i[2]})):p&&p.split(";").length>3&&(o=!0)}}return o&&!n.length?[{invalidPlatform:o}]:n.length?n:null}catch(e){return null}},e}());function vt(e){for(var t="",i=0,n=e;i<n.length;i++){var o=n[i];t+=String.fromCharCode(o)}return t}var bt,Mt=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Nt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ct=0,Et=0,Dt=0,Tt=!0,Lt=!1,St=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.randomId=function(){if("undefined"!=typeof window){var e=new Uint16Array(5);return(window.msCrypto||window.crypto).getRandomValues(e)}}(),n.isStringTemplate=!1,n.needsID=!1,n.isReactHybrid=!1,n.isAngular=!1,n.isReact=!1,n.isVue=!1,g(n.enableRtl)&&n.setProperties({enableRtl:false},!0),g(n.locale)&&n.setProperties({locale:ht},!0),n.moduleLoader=new Ve(n),n.localObserver=new he(n),lt.on("notifyExternalChange",n.detectFunction,n,n.randomId),"undefined"==typeof window||"undefined"==typeof document||yt.validate()||-1!==gt.indexOf(n.getModuleName())&&(Dt+=1)>5&&(Tt=!1),f(i)||n.appendTo(),n}return Mt(t,e),t.prototype.requiredModules=function(){return[]},t.prototype.destroy=function(){this.isDestroyed||(this.enablePersistence&&(this.setPersistData(),this.detachUnloadEvent()),this.localObserver.destroy(),this.refreshing||(X([this.element],["e-control"]),this.trigger("destroyed",{cancel:!1}),e.prototype.destroy.call(this),this.moduleLoader.clean(),lt.off("notifyExternalChange",this.detectFunction,this.randomId)))},t.prototype.refresh=function(){this.refreshing=!0,this.moduleLoader.clean(),this.destroy(),this.clearChanges(),this.localObserver=new he(this),this.preRender(),this.injectModules(),this.render(),this.refreshing=!1},t.prototype.accessMount=function(){this.mount&&!this.isReactHybrid&&this.mount()},t.prototype.getRootElement=function(){return this.isReactHybrid?this.actualElement:this.element},t.prototype.getLocalData=function(){var e=this.getModuleName()+this.element.id;return window.localStorage.getItem(e)},t.prototype.attachUnloadEvent=function(){this.handleUnload=this.handleUnload.bind(this),window.addEventListener("pagehide",this.handleUnload)},t.prototype.handleUnload=function(){this.setPersistData()},t.prototype.detachUnloadEvent=function(){window.removeEventListener("pagehide",this.handleUnload)},t.prototype.appendTo=function(t){if(g(t)||"string"!=typeof t?g(t)||(this.element=t):this.element=ne(t,document),!g(this.element)){var i="e-"+this.getModuleName().toLowerCase();G([this.element],["e-control",i]),this.isProtectedOnChange=!1,this.needsID&&!this.element.id&&(this.element.id=this.getUniqueID(this.getModuleName())),this.enablePersistence&&(this.mergePersistData(),this.attachUnloadEvent());var n=a("ej2_instances",this.element);n&&-1!==n.indexOf(this)||e.prototype.addInstance.call(this),this.preRender(),this.injectModules();var o={schedule:"all",diagram:"all",PdfViewer:"all",grid:["logger"],richtexteditor:["link","table","image","audio","video","formatPainter","emojiPicker","pasteCleanup","htmlEditor","toolbar","importExport"],treegrid:["filter"],gantt:["tooltip"],chart:["Export","Zoom"],accumulationchart:["Export"],"query-builder":"all"},r=this.getModuleName();if(this.requiredModules&&(!o[""+r]||"all"!==o[""+r]))for(var s=this.requiredModules(),l=0,c=this.moduleLoader.getNonInjectedModules(s);l<c.length;l++){var h=c[l],d=h.name?h.name:h.member;if(!o[""+r]||-1===o[""+r].indexOf(h.member)){var p=r.charAt(0).toUpperCase()+r.slice(1);console.warn('[WARNING] :: Module "'+d+'" is not available in '+p+" component! You either misspelled the module name or forgot to load it.")}}Tt||Lt||(!function(){var e='\n <div style="\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 99999;\n ">\n <div style="\n background: #FFFFFF;\n height: 455px;\n width: 840px;\n font-family: Helvetica Neue, Helvetica, Arial;\n color: #000000;\n box-shadow: 0px 4.8px 14.4px rgb(0 0 0 / 18%), 0px 25.6px 57.6px rgb(0 0 0 / 22%);\n display: block;\n margin: 8% auto;\n border-radius: 20px;\n ">\n <div style="\n position: absolute;\nwidth: 838px;\nheight: 62px;\nbackground-color: #F9F9F9;\nborder: 1px solid #EEEEEE;\nborder-top-left-radius: 20px;\nborder-top-right-radius: 20px;\n">\n <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQ2IiBoZWlnaHQ9IjMyIiB2aWV3Qm94PSIwIDAgMTQ2IDMyIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNNDAuNTk2NSAxNS4wMDc4SDMyLjQyNUMzMS41NTU3IDE1LjAwNzggMzAuOTAzNyAxNS4xODEyIDMwLjUxMjUgMTUuNDg0NkMzMC4xMjEzIDE1LjgzMTQgMjkuOTA0IDE2LjMwODIgMjkuOTA0IDE3LjA0NTFDMjkuOTA0IDE3LjYwODYgMzAuMDc3OCAxOC4wNDIxIDMwLjQyNTYgMTguMzAyMkMzMC43NzMzIDE4LjYwNTYgMzEuMjk0OSAxOC43MzU2IDMxLjk5MDMgMTguNzM1NkgzNi4zMzY5QzM4LjExODkgMTguNzM1NiAzOS40MjI5IDE5LjA4MjQgNDAuMTYxOCAxOS43MzI2QzQwLjk0NDIgMjAuNDI2MiA0MS4yOTE5IDIxLjU1MzIgNDEuMjkxOSAyMy4xMTM3QzQxLjI5MTkgMjQuNzE3NiA0MC44NTcyIDI1Ljg4OCAzOS45ODc5IDI2LjY2ODJDMzkuMTE4NiAyNy40MDUxIDM3LjcyNzcgMjcuNzk1MyAzNS44NTg3IDI3Ljc5NTNIMjcuMDc4N1YyNS4wMjFIMzUuMzM3MkMzNi4yOTM0IDI1LjAyMSAzNi45NDU0IDI0Ljg5MSAzNy4zMzY2IDI0LjYzMDlDMzcuNzI3NyAyNC4zNzA4IDM3LjkwMTYgMjMuODk0IDM3LjkwMTYgMjMuMjg3MUMzNy45MDE2IDIyLjYzNjkgMzcuNzI3NyAyMi4xNjAxIDM3LjM4IDIxLjlDMzcuMDMyMyAyMS42Mzk5IDM2LjQyMzggMjEuNDY2NSAzNS41NTQ1IDIxLjQ2NjVIMzEuNjQyNkMyOS44NjA1IDIxLjQ2NjUgMjguNTEzMSAyMS4xMTk4IDI3LjY4NzMgMjAuMzgyOEMyNi44NjE0IDE5LjY0NTkgMjYuNDI2OCAxOC41MTg5IDI2LjQyNjggMTcuMDAxN0MyNi40MjY4IDE1LjM1NDUgMjYuODYxNCAxNC4xNDA4IDI3LjczMDcgMTMuMzYwNkMyOC42IDEyLjU4MDMgMjkuOTkwOSAxMi4yMzM1IDMxLjkwMzQgMTIuMjMzNUg0MC41OTY1VjE1LjAwNzhaIiBmaWxsPSIjMzU0M0E4Ii8+CjxwYXRoIGQ9Ik00OC4wNzI3IDI1LjI4MTFINTAuNTA2OFYxNi4zOTQ5SDUzLjU0OTNWMjcuNTM1MkM1My41NDkzIDI5LjA1MjQgNTMuMjAxNiAzMC4xNzk0IDUyLjUwNjIgMzAuOTE2M0M1MS44MTA3IDMxLjY1MzIgNTAuNzI0MSAzMiA0OS4yNDYzIDMySDQzLjMzNVYyOS42NTkySDQ4LjcyNDdDNDkuMjg5NyAyOS42NTkyIDQ5Ljc2NzkgMjkuNTI5MiA1MC4wNzIxIDI5LjIyNThDNTAuMzc2NCAyOC45NjU3IDUwLjU1MDIgMjguNTMyMiA1MC41NTAyIDI4LjAxMlYyNy44Mzg2SDQ3Ljg5ODlDNDYuMjAzNyAyNy44Mzg2IDQ0Ljk0MzIgMjcuNDkxOSA0NC4yNDc4IDI2Ljg0MTZDNDMuNTA4OSAyNi4xNDgxIDQzLjE2MTEgMjUuMDY0NCA0My4xNjExIDIzLjQ2MDVWMTYuMzk0OUg0Ni4xNjAyVjIzLjIwMDVDNDYuMTYwMiAyNC4wNjc0IDQ2LjI5MDYgMjQuNjMwOSA0Ni41NTE0IDI0Ljg5MUM0Ni43MjUzIDI1LjE1MTEgNDcuMjQ2OSAyNS4yODExIDQ4LjA3MjcgMjUuMjgxMVoiIGZpbGw9IiMzNTQzQTgiLz4KPHBhdGggZD0iTTU1Ljg5NjUgMTYuMzk0OUg2MS41OTA0QzYzLjMyOTEgMTYuMzk0OSA2NC41NDYxIDE2LjY5ODMgNjUuMjg1IDE3LjM0ODVDNjYuMDIzOSAxNy45OTg4IDY2LjM3MTYgMTkuMDgyNCA2Ni4zNzE2IDIwLjU1NjNWMjcuNzk1M0g2My4zMjkxVjIwLjk0NjRDNjMuMzI5MSAyMC4wNzk0IDYzLjE5ODcgMTkuNTE1OSA2Mi45Mzc5IDE5LjI5OTJDNjIuNjc3MSAxOS4wMzkxIDYyLjE1NTUgMTguOTA5MSA2MS4zMjk3IDE4LjkwOTFINTguODk1NlYyNy44Mzg2SDU1Ljg1M1YxNi4zOTQ5SDU1Ljg5NjVaIiBmaWxsPSIjMzU0M0E4Ii8+CjxwYXRoIGQ9Ik03NC45MzQyIDI1LjM2NzhINzguMTUwNlYyNy43OTUySDc0LjAyMTRDNzIuOTc4MiAyNy43OTUyIDcyLjEwODkgMjcuNjY1MiA3MS40NTcgMjcuNDkxOEM3MC44MDUgMjcuMjc1IDcwLjE5NjUgMjYuOTI4MyA2OS43MTgzIDI2LjQ1MTRDNjkuMTk2OCAyNS45MzEzIDY4Ljc2MjEgMjUuMjgxMSA2OC40NTc4IDI0LjU0NDJDNjguMTUzNiAyMy44MDcyIDY4LjAyMzIgMjIuOTgzNiA2OC4wMjMyIDIyLjE2QzY4LjAyMzIgMjEuMjkzMSA2OC4xNTM2IDIwLjQ2OTUgNjguNDU3OCAxOS42ODkyQzY4Ljc2MjEgMTguOTA5IDY5LjE1MzMgMTguMzAyMSA2OS43MTgzIDE3Ljc4MTlDNzAuMjM5OSAxNy4zMDUxIDcwLjgwNSAxNi45NTgzIDcxLjUwMDQgMTYuNzQxNkM3Mi4xOTU5IDE2LjUyNDkgNzMuMDIxNyAxNi40MzgyIDc0LjA2NDkgMTYuNDM4Mkg3OC4xOTQxVjE4LjkwOUg3NC45MzQyQzczLjQ5OTggMTguOTA5IDcyLjU0MzYgMTkuMTY5MSA3MS45Nzg1IDE5LjY0NTlDNzEuNDU2OSAyMC4xMjI3IDcxLjE1MjcgMjAuOTg5NyA3MS4xNTI3IDIyLjIwMzRDNzEuMTUyNyAyMi44OTY5IDcxLjI4MzEgMjMuNDYwNSA3MS41MDA0IDIzLjkzNzNDNzEuNzE3NyAyNC40MTQxIDcyLjA2NTUgMjQuNzYwOSA3Mi41MDAxIDI1LjA2NDNDNzIuNzE3NCAyNS4xOTQ0IDcyLjk3ODIgMjUuMjgxMSA3My4yODI1IDI1LjM2NzhDNzMuNjMwMiAyNS4zMjQ0IDc0LjE1MTggMjUuMzY3OCA3NC45MzQyIDI1LjM2NzhaIiBmaWxsPSIjMzU0M0E4Ii8+CjxwYXRoIGQ9Ik04MC44NDU2IDE4LjY0ODlINzguNjcyNFYxNi4zNTE1SDgwLjg0NTZWMTUuMTgxMUM4MC44NDU2IDE0LjAxMDggODEuMDYzIDEzLjIzMDUgODEuNDk3NiAxMi44NDA0QzgxLjkzMjMgMTIuNDUwMyA4Mi43NTgxIDEyLjIzMzUgODMuOTc1MSAxMi4yMzM1SDg2Ljg0MzhWMTQuNDAwOUg4NS40MDk1Qzg0Ljg4NzkgMTQuNDAwOSA4NC41NDAyIDE0LjQ4NzYgODQuMzIyOSAxNC42NjFDODQuMTA1NSAxNC44MzQ0IDgzLjk3NTEgMTUuMDk0NSA4My45NzUxIDE1LjQ0MTJWMTYuMzUxNUg4Ni44NDM4VjE4LjY0ODlIODMuOTc1MVYyNy43OTUzSDgwLjg0NTZWMTguNjQ4OVoiIGZpbGw9IiMzNTQzQTgiLz4KPHBhdGggZD0iTTk4LjQwNTYgMjcuNzk1M0g5Mi43MTE2QzkxLjAxNjUgMjcuNzk1MyA4OS44NDI5IDI3LjQ0ODUgODkuMDYwNSAyNi43OTgzQzg4LjMyMTYgMjYuMTQ4MSA4Ny45MzA0IDI1LjA2NDQgODcuOTMwNCAyMy41OTA2VjE2LjM5NDlIOTAuOTI5NVYyMy40MTcyQzkwLjkyOTUgMjQuMTk3NCA5MS4wNTk5IDI0LjY3NDMgOTEuMzIwNyAyNC45MzQ0QzkxLjU4MTUgMjUuMTk0NCA5Mi4xMDMxIDI1LjMyNDUgOTIuOTI4OSAyNS4zMjQ1SDk1LjM2M1YxNi4zOTQ5SDk4LjQwNTZWMjcuNzk1M1oiIGZpbGw9IiMzNTQzQTgiLz4KPHBhdGggZD0iTTEwMC42MjIgMjUuNDExMkgxMDcuMDExQzEwNy41NzcgMjUuNDExMiAxMDguMDExIDI1LjMyNDUgMTA4LjI3MiAyNS4xNTExQzEwOC41MzMgMjQuOTc3NyAxMDguNjYzIDI0LjY3NDMgMTA4LjY2MyAyNC4zMjc1QzEwOC42NjMgMjMuOTM3NCAxMDguNTMzIDIzLjY3NzMgMTA4LjI3MiAyMy40NjA1QzEwOC4wMTEgMjMuMjg3MSAxMDcuNTc3IDIzLjIwMDUgMTA3LjA1NSAyMy4yMDA1SDEwNC40NDdDMTAyLjg4MiAyMy4yMDA1IDEwMS44MzkgMjIuOTgzNyAxMDEuMzE4IDIyLjUwNjlDMTAwLjc1MiAyMi4wMzAxIDEwMC40OTIgMjEuMjA2NSAxMDAuNDkyIDE5Ljk5MjdDMTAwLjQ5MiAxOC43NzkgMTAwLjgzOSAxNy44Njg3IDEwMS40OTEgMTcuMjYxOEMxMDIuMTQzIDE2LjY5ODMgMTAzLjE4NyAxNi4zOTQ5IDEwNC41MzQgMTYuMzk0OUgxMTEuMDU0VjE4Ljc3OUgxMDUuNzA4QzEwNC44MzggMTguNzc5IDEwNC4yNzMgMTguODY1NyAxMDQuMDEyIDE4Ljk5NTdDMTAzLjc1MiAxOS4xNjkxIDEwMy42MjEgMTkuNDI5MiAxMDMuNjIxIDE5LjgxOTRDMTAzLjYyMSAyMC4xNjYxIDEwMy43NTIgMjAuNDI2MiAxMDMuOTY5IDIwLjU5OTZDMTA0LjE4NiAyMC43NzMgMTA0LjU3NyAyMC44NTk3IDEwNS4wNTYgMjAuODU5N0gxMDcuNzk0QzEwOS4wNTQgMjAuODU5NyAxMTAuMDExIDIxLjE2MzEgMTEwLjY2MyAyMS43MjY2QzExMS4zMTUgMjIuMjkwMiAxMTEuNjYyIDIzLjE1NzEgMTExLjY2MiAyNC4yNDA4QzExMS42NjIgMjUuMjgxMSAxMTEuMzU4IDI2LjE0ODEgMTEwLjc5MyAyNi43OTgzQzExMC4yMjggMjcuNDQ4NSAxMDkuNDQ2IDI3Ljc5NTMgMTA4LjUzMyAyNy43OTUzSDEwMC43MDlWMjUuNDExMkgxMDAuNjIyWiIgZmlsbD0iIzM1NDNBOCIvPgo8cGF0aCBkPSJNMTE2LjU3NCAxNS4wOTQ0SDExMy40MDFWMTIuMjc2OUgxMTYuNTc0VjE1LjA5NDRaTTExNi41NzQgMjcuNzk1M0gxMTMuNDAxVjE2LjM5NDlIMTE2LjU3NFYyNy43OTUzWiIgZmlsbD0iIzM1NDNBOCIvPgo8cGF0aCBkPSJNMTMwLjMwOSAyMi4xMTY3QzEzMC4zMDkgMjMuODkzOSAxMjkuNzQ0IDI1LjMyNDQgMTI4LjY1NyAyNi40MDgxQzEyNy41NzEgMjcuNDkxOCAxMjYuMDkzIDI4LjAxMiAxMjQuMjI0IDI4LjAxMkMxMjIuMzU1IDI4LjAxMiAxMjAuODc3IDI3LjQ5MTggMTE5Ljc5IDI2LjQwODFDMTE4LjcwNCAyNS4zMjQ0IDExOC4xMzkgMjMuODkzOSAxMTguMTM5IDIyLjExNjdDMTE4LjEzOSAyMC4zMzk0IDExOC43MDQgMTguOTA5IDExOS43OSAxNy44MjUzQzEyMC44NzcgMTYuNzQxNiAxMjIuMzk4IDE2LjIyMTQgMTI0LjIyNCAxNi4yMjE0QzEyNi4wNDkgMTYuMjIxNCAxMjcuNTI3IDE2Ljc0MTYgMTI4LjY1NyAxNy44MjUzQzEyOS43NDQgMTguODY1NiAxMzAuMzA5IDIwLjI5NjEgMTMwLjMwOSAyMi4xMTY3Wk0xMjEuMjY4IDIyLjExNjdDMTIxLjI2OCAyMy4yMDA0IDEyMS41MjkgMjQuMDY3MyAxMjIuMDUxIDI0LjY3NDJDMTIyLjU3MiAyNS4yODExIDEyMy4yNjggMjUuNTg0NSAxMjQuMTggMjUuNTg0NUMxMjUuMDkzIDI1LjU4NDUgMTI1Ljc4OSAyNS4yODExIDEyNi4zMSAyNC42NzQyQzEyNi44MzIgMjQuMDY3MyAxMjcuMDkzIDIzLjIwMDQgMTI3LjA5MyAyMi4xMTY3QzEyNy4wOTMgMjEuMDMzIDEyNi44MzIgMjAuMTY2MSAxMjYuMzEgMTkuNjAyNUMxMjUuNzg5IDE4Ljk5NTcgMTI1LjA5MyAxOC42OTIyIDEyNC4xMzcgMTguNjkyMkMxMjMuMjI0IDE4LjY5MjIgMTIyLjUyOSAxOC45OTU3IDEyMi4wMDcgMTkuNjAyNUMxMjEuNTI5IDIwLjE2NjEgMTIxLjI2OCAyMS4wMzMgMTIxLjI2OCAyMi4xMTY3WiIgZmlsbD0iIzM1NDNBOCIvPgo8cGF0aCBkPSJNMTMxLjc4NyAxNi4zOTQ5SDEzNy40ODFDMTM5LjIxOSAxNi4zOTQ5IDE0MC40MzYgMTYuNjk4MyAxNDEuMTc1IDE3LjM0ODVDMTQxLjkxNCAxNy45OTg4IDE0Mi4yNjIgMTkuMDgyNCAxNDIuMjYyIDIwLjU1NjNWMjcuNzk1M0gxMzkuMjE5VjIwLjk0NjRDMTM5LjIxOSAyMC4wNzk0IDEzOS4wODkgMTkuNTE1OSAxMzguODI4IDE5LjI5OTJDMTM4LjU2NyAxOS4wMzkxIDEzOC4wNDYgMTguOTA5MSAxMzcuMjIgMTguOTA5MUgxMzQuNzg2VjI3LjgzODZIMTMxLjc0M1YxNi4zOTQ5SDEzMS43ODdaIiBmaWxsPSIjMzU0M0E4Ii8+CjxwYXRoIGQ9Ik03LjEyODMxIDMuNzM3NDNIMFYxMC44NDY0SDcuMTI4MzFWMy43Mzc0M1oiIGZpbGw9IiMzNTQzQTgiLz4KPHBhdGggZD0iTTIzLjI1MTMgLTIuMTU3MjVlLTA1TDE4LjU1MTMgNS41MTY4NUwyNC4wODMxIDEwLjIwNDFMMjguNzgzMSA0LjY4NzI1TDIzLjI1MTMgLTIuMTU3MjVlLTA1WiIgZmlsbD0iI0ZGODYwMCIvPgo8cGF0aCBkPSJNMTUuNjA0MSAzLjczNzQzSDguNDc1ODNWMTAuODQ2NEgxNS42MDQxVjMuNzM3NDNaIiBmaWxsPSIjMzU0M0E4Ii8+CjxwYXRoIGQ9Ik03LjEyODMxIDEyLjE5MDJIMFYxOS4yOTkySDcuMTI4MzFWMTIuMTkwMloiIGZpbGw9IiMzNTQzQTgiLz4KPHBhdGggZD0iTTE1LjYwNDEgMTIuMTkwMkg4LjQ3NTgzVjE5LjI5OTJIMTUuNjA0MVYxMi4xOTAyWiIgZmlsbD0iIzM1NDNBOCIvPgo8cGF0aCBkPSJNMjQuMDc5NyAxMi4xOTAySDE2Ljk1MTRWMTkuMjk5MkgyNC4wNzk3VjEyLjE5MDJaIiBmaWxsPSIjRkY4NjAwIi8+CjxwYXRoIGQ9Ik03LjEyODMxIDIwLjY4NjNIMFYyNy43OTUzSDcuMTI4MzFWMjAuNjg2M1oiIGZpbGw9IiMzNTQzQTgiLz4KPHBhdGggZD0iTTE1LjYwNDEgMjAuNjg2M0g4LjQ3NTgzVjI3Ljc5NTNIMTUuNjA0MVYyMC42ODYzWiIgZmlsbD0iIzM1NDNBOCIvPgo8cGF0aCBkPSJNMjQuMTIzMiAyMC42ODYzSDE2Ljk5NDlWMjcuNzk1M0gyNC4xMjMyVjIwLjY4NjNaIiBmaWxsPSIjMzU0M0E4Ii8+CjxwYXRoIGQ9Ik0xNDYgMTUuODMxM0MxNDYgMTYuODcxNyAxNDUuMTc0IDE3LjY5NTMgMTQ0LjEzMSAxNy42OTUzQzE0My4wODggMTcuNjk1MyAxNDIuMjYyIDE2Ljg3MTcgMTQyLjI2MiAxNS44MzEzQzE0Mi4yNjIgMTQuNzkxIDE0My4wODggMTQuMDEwNyAxNDQuMTMxIDE0LjAxMDdDMTQ1LjEzMSAxMy45Njc0IDE0NiAxNC43OTEgMTQ2IDE1LjgzMTNaTTE0Mi45NTcgMTQuNzkxQzE0Mi42OTcgMTUuMDUxMSAxNDIuNTY2IDE1LjQ0MTIgMTQyLjU2NiAxNS44MzEzQzE0Mi41NjYgMTYuNjk4MyAxNDMuMjYyIDE3LjM5MTggMTQ0LjEzMSAxNy4zOTE4QzE0NSAxNy4zOTE4IDE0NS42OTYgMTYuNjk4MyAxNDUuNjk2IDE1LjgzMTNDMTQ1LjY5NiAxNS4wMDc3IDE0NSAxNC4yNzA4IDE0NC4xNzQgMTQuMjcwOEMxNDMuNjUzIDE0LjI3MDggMTQzLjI2MiAxNC40NDQyIDE0Mi45NTcgMTQuNzkxWk0xNDQuODcgMTYuOTE1SDE0NC40NzlMMTQzLjkxNCAxNi4wOTE0VjE2LjkxNUgxNDMuNjA5VjE0Ljc0NzZIMTQzLjk1N0MxNDQuNDM1IDE0Ljc0NzYgMTQ0LjY1MyAxNC45NjQ0IDE0NC42NTMgMTUuMzU0NUMxNDQuNjUzIDE1LjY1NzkgMTQ0LjQ3OSAxNS44NzQ3IDE0NC4xNzQgMTUuOTYxNEwxNDQuODcgMTYuOTE1Wk0xNDQuMDQ0IDE1LjY1NzlDMTQ0LjI2MSAxNS42NTc5IDE0NC4zOTIgMTUuNTI3OSAxNDQuMzkyIDE1LjM1NDVDMTQ0LjM5MiAxNS4xMzc4IDE0NC4yNjEgMTUuMDUxMSAxNDQuMDAxIDE1LjA1MTFIMTQzLjkxNFYxNS42NTc5SDE0NC4wNDRaIiBmaWxsPSIjMzU0M0E4Ii8+Cjwvc3ZnPgo=" style="\n text-align: left;\n width: 146px;\n position: absolute;\n top: 14px;\n left: 31px;\n">\n </div>\n <div style="\n position: relative;\n top: 80px;\n left: 32px;\n font-size: 20px;\n text-align: left;\n font-weight: 700;\n letter-spacing: 0.02em;\n font-style: normal;\n line-height: 125%;\n ">Claim your FREE account and get a key in less than a minute</div>\n <ul style="\n font-size: 15px;\n font-weight: 400;\n color: #333333;\n letter-spacing: 0.01em;\n position: relative;\n left: 32px;\n top: 88px;\n line-height: 180%;\n ">\n <li><span>Access to a 30-day free trial of any of our products.</span></li>\n <li><span>Access to 24x5 support by developers via the <a href="https://support.syncfusion.com/create?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n color: #0D6EFD;\n font-weight: 500;">support tickets</a>, <a href="https://www.syncfusion.com/forums?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n color: #0D6EFD;\n font-weight: 500;">forum</a>, <a href="https://www.syncfusion.com/feedback?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information\n " style="text-decoration: none;\n color: #0D6EFD;\n font-weight: 500;">feature &amp; feedback page</a> and chat.</span></li>\n <li><span>200+ <a href="https://www.syncfusion.com/succinctly-free-ebooks?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n color: #0D6EFD;\n font-weight: 500;">ebooks </a>on the latest technologies, industry trends, and research topics.</span>\n </li>\n <li><span>Largest collection of over 7,000 flat and wireframe icons for free with Syncfusion<sup>®</sup> <a href="https://www.syncfusion.com/downloads/metrostudio?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information\n " style="text-decoration: none;\n color: #0D6EFD;\n font-weight: 500;">Metro Studio.</a></span></li>\n <li><span>Free and unlimited access to Syncfusion<sup>®</sup> technical <a href="https://www.syncfusion.com/blogs/?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information\n " style="text-decoration: none;\n color: #0D6EFD;\n font-weight: 500;">blogs</a> and <a href="https://www.syncfusion.com/resources/techportal/whitepapers?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n color: #0D6EFD;\n font-weight: 500;">whitepapers.</a></span></li>\n </ul>\n <div style="\n font-size: 18px;\n font-weight: 700;\n position: relative;\n line-height: 125%;\n letter-spacing: 0.02em;\n top: 90px;\n left: 32px;\n ">Syncfusion is trusted by 29,000+ businesses worldwide</div>\n <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODIwIiBoZWlnaHQ9IjU2IiB2aWV3Qm94PSIwIDAgODIwIDU2IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00MjcuNjE3IDIyLjU2NTlWMjQuNzIyNkM0MjYuNTU4IDI0LjM2MzggNDI1LjM5OCAyNC4xNTQ0IDQyNC40NzQgMjQuMTU0NEM0MjMuMzMzIDI0LjE1NDQgNDIyLjY5OCAyNC40OTEyIDQyMi42OTggMjUuMDk2M0M0MjIuNjk4IDI1LjQ4MjQgNDIyLjk3NiAyNS43MzgzIDQyMy43NzMgMjYuMDg1NEw0MjUuOTE3IDI3LjAxNzRDNDI3LjYzMyAyNy43NjM5IDQyOC40OTcgMjguODUzIDQyOC40OTcgMzAuMjY4MUM0MjguNDk3IDMyLjQ1MjIgNDI2LjU0NiAzMy44MyA0MjMuNDUyIDMzLjgzQzQyMi4zMjQgMzMuODMgNDIxLjAxOCAzMy42NzM2IDQxOS42MzYgMzMuMzcwOVYzMS4xNDE2QzQyMS4wMDYgMzEuNTAyOCA0MjIuMjYyIDMxLjY5NTcgNDIzLjIzOSAzMS42OTU3QzQyNC41MTggMzEuNjk1NyA0MjUuMjAzIDMxLjM1MDYgNDI1LjIwMyAzMC43MDc0QzQyNS4yMDMgMzAuMzIwOCA0MjQuOTM1IDMwLjAzNjcgNDI0LjMyMiAyOS43NzE3TDQyMS45NzUgMjguNzU5M0M0MjAuMjM2IDI4LjAwNzggNDE5LjQzMyAyNi45OTU0IDQxOS40MzMgMjUuNTUyMUM0MTkuNDMzIDIzLjQ4MzcgNDIxLjMxNCAyMi4xNjQ5IDQyNC4yNjUgMjIuMTY0OUM0MjUuMjk4IDIyLjE2NDkgNDI2LjU3IDIyLjMxNzEgNDI3LjYxNyAyMi41NjU5VjIyLjU2NTlaTTQzMC4xNjcgMjIuMzkwOUg0MzMuNjM1VjMzLjYwMzlINDMwLjE2N1YyMi4zOTA5Wk00NDQuOTExIDIyLjM5MDlWMjQuNDQ1MUg0MzkuNjc1VjI2Ljk3NDJINDQ0LjI0OVYyOC44MzIzSDQzOS42NzVWMzEuNDU0M0g0NDQuOTc4VjMzLjYwMzlINDM2LjMwNVYyMi4zOTA5SDQ0NC45MTFaTTQ2MS4yOTQgMjIuMzkwOVYzMy42MDM5SDQ1Ny45MzlWMjYuMjIzNkw0NTQuNjUyIDMzLjY5MTVINDUyLjUzMUw0NDkuMjY2IDI2LjIyMzZWMzMuNjAzOUg0NDYuOTQ5VjIyLjM5MDlINDUxLjE4NEw0NTQuMTc4IDI5LjIxMTRMNDU3LjE1NiAyMi4zOTA5SDQ2MS4yOTRWMjIuMzkwOVpNNDcyLjU3OSAyMi4zOTA5VjI0LjQ0NTFINDY3LjMzNVYyNi45NzQySDQ3MS45MDhWMjguODMyM0g0NjcuMzM1VjMxLjQ1NDNINDcyLjYzOFYzMy42MDM5SDQ2My45NTdWMjIuMzkwOUg0NzIuNTc5Wk00ODQuNzk0IDIyLjM5MDlWMzMuNjAzOUg0ODEuMDkzTDQ3Ni45MjYgMjYuNDEyM1YzMy42MDM5SDQ3NC42MDhWMjIuMzkwOUg0NzguNDA3TDQ4Mi40ODQgMjkuNDg3NlYyMi4zOTA5SDQ4NC43OTRaTTQ5NC44NTggMjIuNTY1OVYyNC43MjI2QzQ5My44MDcgMjQuMzY2MyA0OTIuNjQgMjQuMTU0NCA0OTEuNzMyIDI0LjE1NDRDNDkwLjU3MyAyNC4xNTQ0IDQ4OS45MzkgMjQuNDg1OCA0ODkuOTM5IDI1LjA5M0M0ODkuOTM5IDI1LjQ4ODYgNDkwLjE5OCAyNS43MjUgNDkxLjAyMyAyNi4wODU5TDQ5My4xNTcgMjcuMDE3OEM0OTQuODg1IDI3Ljc3MjIgNDk1LjczOSAyOC44NTE4IDQ5NS43MzkgMzAuMjgzNUM0OTUuNzM5IDMyLjQ1NTkgNDkzLjc4NiAzMy44MzA4IDQ5MC42OTkgMzMuODMwOEM0ODkuNTY5IDMzLjgzMDggNDg4LjI1OSAzMy42NzM2IDQ4Ni44NzggMzMuMzcxN1YzMS4xNDI0QzQ4OC4yNDcgMzEuNTAyOCA0ODkuNDk5IDMxLjY5NjUgNDkwLjQ3IDMxLjY5NjVDNDkxLjc0IDMxLjY5NjUgNDkyLjQ0NCAzMS4zNTE1IDQ5Mi40NDQgMzAuNzI4NUM0OTIuNDQ0IDMwLjMxNjMgNDkyLjE5NyAzMC4wNTA0IDQ5MS41NTUgMjkuNzcyNUw0ODkuMjE4IDI4Ljc2MDFDNDg3LjQ2NyAyOC4wMDI4IDQ4Ni42NzQgMjcuMDAyIDQ4Ni42NzQgMjUuNTUzM0M0ODYuNjc0IDIzLjQ4NjIgNDg4LjU1NiAyMi4xNjY1IDQ5MS41IDIyLjE2NjVDNDkyLjUzNiAyMi4xNjUzIDQ5My44MTMgMjIuMzE3MSA0OTQuODU4IDIyLjU2NTlWMjIuNTY1OVoiIGZpbGw9IiMwMEEwQjAiLz4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMzUyLjQxMyAyNi44MTlDMzUwLjk5MiAyNS4yNzU5IDM0OS42MzggMjMuODMxNSAzNDguMzQ5IDIyLjE1NzRMMzQ3LjkyIDIxLjU5OTVDMzQ5LjQwNiAyMS4zNjkzIDM1MC42OTUgMjAuMzg0OCAzNTAuNjk1IDE4Ljc0MzNDMzUwLjY5NSAxNy4yMzMxIDM0OS41MzkgMTYuMjQ4MiAzNDcuODIxIDE2LjI0ODJDMzQ2LjU5OCAxNi4yNDgyIDM0NS43MDYgMTYuMzEzNyAzNDUuMjQzIDE2LjMxMzdDMzQ0LjcxNSAxNi4zMTM3IDM0NC4yODUgMTYuMzEzNyAzNDMuNzkgMTYuMjgwOEMzNDMuODU2IDE4LjE1MjEgMzQzLjg4OSAxOC4yODM0IDM0My44ODkgMTkuNDMyMlYyMy42MzQzQzM0My44ODkgMjQuNDU1MyAzNDMuODU2IDI1LjI3NTkgMzQzLjc5IDI2LjgxODZDMzQ0LjE1MyAyNi43MjAyIDM0NC41MTcgMjYuNzIwMiAzNDQuNzgxIDI2LjcyMDJDMzQ1LjA0NSAyNi43MjAyIDM0NS40MDkgMjYuNzUzMSAzNDUuNzA2IDI2LjgxODZDMzQ1LjY0IDI1Ljc2NzkgMzQ1LjYwNyAyNC4wMjgzIDM0NS42MDcgMjMuNjM0M1YyMS4yMDUxQzM0Ny4xNiAyMy4yMDc3IDM0OS4yMDkgMjUuNjY5NSAzNTAuMDAxIDI2LjgxODZDMzUwLjM5OCAyNi43MjAyIDM1MC43MjggMjYuNzIwMiAzNTEuMTI0IDI2LjcyMDJDMzUxLjQ1NSAyNi43MjA2IDM1MS45MTggMjYuNzIwNiAzNTIuNDEzIDI2LjgxOVYyNi44MTlaTTM0OC44NzggMTkuMDA2QzM0OC44NzggMjAuMDIzNCAzNDguMzE3IDIxLjIwNTQgMzQ2Ljc5NyAyMS4yMDU0QzM0Ni40IDIxLjIwNTQgMzQ2LjAwMyAyMS4yMDU0IDM0NS42MDcgMjEuMTcyNVYxNy4wNjg4QzM0Ni4wMDMgMTYuOTcwNCAzNDYuNDk5IDE2LjkwNDYgMzQ2Ljc2MyAxNi45MDQ2QzM0OC4wODUgMTYuOTA0OSAzNDguODc4IDE3LjY2IDM0OC44NzggMTkuMDA2VjE5LjAwNlpNMzgyLjM4IDI2Ljg4NDVDMzgxLjgxOSAyNi4yOTM2IDM4MC45NiAyNS4zNDE3IDM4MC4xMzQgMjQuNDIyM0MzODAuODI4IDIzLjY2NzIgMzgxLjU1NSAyMi41NTEgMzgxLjk4NCAyMS41OTkxQzM4MS43MTkgMjEuNDY3OCAzODEuMzU2IDIxLjIwNTEgMzgxLjA5MiAyMC45NzUzQzM4MC45OTMgMjEuNzk1OSAzODAuNDMyIDIyLjg3OTIgMzc5LjYzOSAyMy44MzE1QzM3OC41MTUgMjIuNTE4NSAzNzguMjE4IDIyLjE1NzQgMzc3LjE5MyAyMC43Nzg1QzM3OC41ODEgMTkuODkyMSAzNzkuMjQyIDE4Ljg3NDMgMzc5LjI0MiAxOC4wNTM3QzM3OS4yNDIgMTcuMTAxNyAzNzguNTgxIDE2LjExNjkgMzc2Ljk2MiAxNi4xMTY5QzM3NS4yMTEgMTYuMTE2OSAzNzQuMzUyIDE3LjIwMDIgMzc0LjM1MiAxOC40ODAzQzM3NC4zNTIgMTkuMjM1NCAzNzQuNTUgMTkuODkxNyAzNzUuMzc2IDIwLjk3NTNDMzc0LjA1NCAyMS42OTc1IDM3Mi43NjYgMjIuNzQ3OSAzNzIuNzY2IDI0LjQyMjNDMzcyLjc2NiAyNi4wNjM5IDM3NC4wODcgMjYuOTE3NCAzNzUuNzA3IDI2LjkxNzRDMzc3LjE5MyAyNi45MTc0IDM3OC4xNTEgMjYuMzI2NiAzNzguOTEyIDI1LjYzNjlMMzc5LjkwMiAyNi44MTlDMzgwLjIgMjYuNzg2MSAzODAuNTMxIDI2LjcyMDYgMzgwLjg2MSAyNi43MjA2QzM4MS4zMjQgMjYuNzIwNiAzODEuODUyIDI2Ljc4NjEgMzgyLjM4IDI2Ljg4NDVWMjYuODg0NVpNMzgzLjM3MiA0MC4wMTU4QzM4MS45MTggMzguNDczIDM4MC41OTcgMzcuMDYxMiAzNzkuMzA4IDM1LjM4NzFMMzc4Ljg3OCAzNC44Mjg4QzM4MC4zMzIgMzQuNTk5MSAzODEuNjU0IDMzLjYxNSAzODEuNjU0IDMxLjk0MDFDMzgxLjY1NCAzMC40NjMyIDM4MC40OTggMjkuNDQ1NCAzNzguNzc5IDI5LjQ0NTRDMzc3LjU1NyAyOS40NDU0IDM3Ni42MzIgMjkuNTQzNSAzNzYuMTY5IDI5LjU0MzVDMzc1LjY3MyAyOS41NDM1IDM3NS4yNDQgMjkuNTQzNSAzNzQuNzQ4IDI5LjQ3NzZDMzc0LjgxNCAzMS4zODIyIDM3NC44NDggMzEuNDgwMiAzNzQuODQ4IDMyLjYyOTRWMzYuODMxMUMzNzQuODQ4IDM3LjY1MjQgMzc0LjgxNCAzOC41MDUyIDM3NC43NDggNDAuMDE1NEMzNzUuMTEyIDM5Ljk0OTYgMzc1LjQ3NSAzOS45NDk2IDM3NS43MDcgMzkuOTQ5NkMzNzYuMDA0IDM5Ljk0OTYgMzc2LjM2OCAzOS45NDk2IDM3Ni42MzIgNDAuMDE1NEMzNzYuNTY1IDM4Ljk5OCAzNzYuNTMzIDM3LjI1ODEgMzc2LjUzMyAzNi44MzExVjM0LjQzNDhDMzc4LjExOSAzNi40MDQyIDM4MC4xNjcgMzguODk5NiAzODAuOTYgNDAuMDE1NEMzODEuMzU2IDM5Ljk0OTYgMzgxLjY4NyAzOS45NDk2IDM4Mi4wODMgMzkuOTQ5NkMzODIuMzggMzkuOTUgMzgyLjg3NiAzOS45NSAzODMuMzcyIDQwLjAxNThaTTM2Mi4xNiAyNi44MTlDMzYwLjk3MSAyNS41NzE1IDM1OC44ODkgMjIuOTc4IDM1OC4wNjMgMjEuOTkzNUwzNTcuMjM3IDIwLjk3NTdDMzU4LjA5NiAxOS45NTgzIDM1OC42OSAxOS4zMzQxIDM1OS4zMTkgMTguNTc5QzM2MC4wNDUgMTcuNzkxIDM2MC43MDYgMTYuOTcwNCAzNjEuNDk5IDE2LjI0ODJDMzYxLjEzNiAxNi4zMTM3IDM2MC45MzcgMTYuMzEzNyAzNjAuNzM5IDE2LjMxMzdDMzYwLjU0MSAxNi4zMTM3IDM2MC4zNDMgMTYuMzEzNyAzNjAuMTQ0IDE2LjI0ODJDMzU5LjkxMyAxNi42MDkzIDM1OS41NSAxNy4wNjg4IDM1OS4xNTMgMTcuNTI4N0MzNTguNzU2IDE3Ljk1NTYgMzU4LjM2IDE4LjM4MjIgMzU4LjA2MyAxOC43NDMzQzM1Ny4yMzYgMTkuNjk1MiAzNTYuNzc0IDIwLjE1NDcgMzU1LjU4NSAyMS4yNzA5VjE5LjQ2NTVDMzU1LjU4NSAxOC40MTUxIDM1NS41ODUgMTcuNzI1NSAzNTUuNjUxIDE2LjI0ODJDMzU1LjMyMSAxNi4zMTM3IDM1NC45NTcgMTYuMzEzNyAzNTQuNzI2IDE2LjMxMzdDMzU0LjQ2MSAxNi4zMTM3IDM1NC4wMzIgMTYuMzEzNyAzNTMuNzY4IDE2LjI0ODJDMzUzLjgzMyAxNy44MjM5IDM1My44NjcgMTguMjgzNCAzNTMuODY3IDE5LjQzMjVWMjMuNjM0N0MzNTMuODY3IDI0LjY4NSAzNTMuODMzIDI1LjMwODggMzUzLjc2OCAyNi44MTlDMzU0LjE2NCAyNi43MjA2IDM1NC40OTUgMjYuNzIwNiAzNTQuNzI2IDI2LjcyMDZDMzU0Ljk1NyAyNi43MjA2IDM1NS4zNTMgMjYuNzUzNSAzNTUuNjUxIDI2LjgxOUMzNTUuNTg1IDI1LjE0NDkgMzU1LjU4NSAyNC4xNTk3IDM1NS41ODUgMjMuNjM0N1YyMS40MzUyQzM1Ni44MDcgMjIuODc5NiAzNTguNjkgMjUuMjQzMyAzNTkuNzQ4IDI2LjgxOUMzNjAuMTMgMjYuNzU2MyAzNjAuNTE3IDI2LjcyMzQgMzYwLjkwNSAyNi43MjA2QzM2MS4yMDIgMjYuNzIwNiAzNjEuNjY1IDI2LjcyMDYgMzYyLjE2IDI2LjgxOVYyNi44MTlaTTM3Mi42MDEgNDAuMDE1OEMzNzIuNTY4IDM5Ljg1MTkgMzcyLjUzNSAzOS43MjA2IDM3Mi41MzUgMzkuNTIzNEMzNzIuNTM1IDM5LjM5MjggMzcyLjU2OCAzOS4yMjgxIDM3Mi42MDEgMzkuMDk2NEMzNzEuMjggMzkuMTI5NyAzNjguOTAxIDM5LjE5NTIgMzY4LjM3MiAzOS4xOTUyVjM0LjY2NDlDMzY5LjY5NCAzNC42NjQ5IDM3MC45ODIgMzQuNjY0OSAzNzIuMjcgMzQuNzk2M0MzNzIuMjM4IDM0LjYzMjQgMzcyLjIwNCAzNC40Njc3IDM3Mi4yMDQgMzQuMzM2NEMzNzIuMjA0IDM0LjIwNTggMzcyLjIwNCAzNC4wNDE5IDM3Mi4yNyAzMy44NDQ3QzM3MS4zNDYgMzMuOTQyOCAzNjkuMTk4IDMzLjk3NiAzNjguMzcyIDMzLjk3NlYzMC4yNjZDMzY5LjgyNiAzMC4yNjYgMzcwLjY4NSAzMC4yNjYgMzcxLjE4IDMwLjI5OTNMMzcyLjUwMiAzMC4zNjUxQzM3Mi40MzYgMzAuMTY3OSAzNzIuNDM2IDMwLjA2OTIgMzcyLjQzNiAyOS45MDUzQzM3Mi40MzYgMjkuNzQxNCAzNzIuNDM2IDI5LjcwODEgMzcyLjUwMiAyOS40NDU4QzM3MS40MTEgMjkuNDc4MyAzNjkuOTI1IDI5LjU0MzggMzY5LjI2NCAyOS41NDM4QzM2OC44MDIgMjkuNTQzOCAzNjcuMzQ4IDI5LjUxMTMgMzY2LjU4NyAyOS40NDU4QzM2Ni42NTQgMzAuMjY2NCAzNjYuNjg2IDMxLjYxMjMgMzY2LjY4NiAzMi41NjQyVjM2Ljg2NTFDMzY2LjY4NiAzNy40ODg1IDM2Ni42MiAzOC43MzU3IDM2Ni41ODcgNDAuMDE2MkMzNjcuNTEzIDM5Ljk1MDMgMzY4LjgwMiAzOS45NTAzIDM2OS4yNjQgMzkuOTUwM0MzNzAuMDI0IDM5Ljk1IDM3MS42NDMgMzkuOTUgMzcyLjYwMSA0MC4wMTU4Wk0zNjQuNjA1IDM5LjEyOTRDMzY0LjQ0IDM4LjgwMDggMzY0LjM0MSAzOC4zMDg4IDM2NC4yNzUgMzguMDQ2MUMzNjIuOTIgMzkuMTYxOSAzNjEuOTk1IDM5LjM5MjQgMzYwLjkzOCAzOS4zOTI0QzM1OC41OTIgMzkuMzkyNCAzNTcuMzM3IDM3LjI5MTMgMzU3LjMzNyAzNC42NjQ5QzM1Ny4zMzcgMzEuNzQzNiAzNTguNzU3IDMwLjAzNjIgMzYxLjE2OSAzMC4wMzYyQzM2Mi40MjUgMzAuMDM2MiAzNjMuNjE0IDMwLjU5NDUgMzY0LjE3NiAzMS4xNTI4QzM2NC4yMDggMzAuODg5OCAzNjQuMzA4IDMwLjM2NDggMzY0LjQ3MyAzMC4wNjg4QzM2My4zMTYgMjkuNTExMyAzNjIuMjU5IDI5LjM0NjYgMzYxLjEwMiAyOS4zNDY2QzM1Ny4yMzcgMjkuMzQ2NiAzNTUuNDUzIDMxLjc0MzYgMzU1LjQ1MyAzNC44Mjg4QzM1NS40NTMgMzguMzA5MSAzNTcuNzk4IDQwLjE0NzEgMzYwLjczOSA0MC4xNDcxQzM2Mi40MjUgNDAuMTQ3MSAzNjMuODEyIDM5LjYyMjIgMzY0LjYwNSAzOS4xMjk0VjM5LjEyOTRaTTM0Mi4zMDMgMjYuODE5QzM0MC41MTkgMjMuNDA0OSAzMzguOCAxOS4xMzczIDMzNy41NzggMTYuMTE2OUgzMzcuMzhDMzM2LjU4NyAxOC4wMjA3IDMzNS4xMzMgMjEuMjcwOSAzMzQuNzM3IDIyLjE4OTlDMzM0LjI3NCAyMy4zMDYxIDMzMy4yNSAyNS41MDU2IDMzMi41ODkgMjYuODE4NkMzMzIuODAzIDI2Ljc1MzggMzMzLjAyNiAyNi43MjA2IDMzMy4yNSAyNi43MjAyQzMzMy40NDggMjYuNzIwMiAzMzMuNjEzIDI2Ljc1MzEgMzMzLjg0NSAyNi44MTg2QzMzNC4xNzUgMjUuOTMyMiAzMzQuNjM4IDI0LjgxNiAzMzUuMTMzIDIzLjYzNDNDMzM1Ljc5NCAyMy42MDE0IDMzNi4zODkgMjMuNTY4OCAzMzYuOTg0IDIzLjU2ODhDMzM3LjYxMiAyMy41Njg4IDMzOC4yNzIgMjMuNjAxNCAzMzguOTMzIDIzLjYzNDNMMzM5LjU5NCAyNS4yMUwzNDAuMjU1IDI2LjgxODZDMzQwLjcxNyAyNi43MjAyIDM0MS4wOCAyNi43MjAyIDM0MS4zMTIgMjYuNzIwMkMzNDEuNjA5IDI2LjcyMDYgMzQxLjg3MyAyNi43MjA2IDM0Mi4zMDMgMjYuODE5VjI2LjgxOVpNMzUzLjYzNiAyOS40NDU0QzM1My40MzggMjkuNTExMyAzNTMuMjczIDI5LjU0MzUgMzUzLjEwNyAyOS41NDM1QzM1Mi45MDkgMjkuNTQzNSAzNTIuNzQ0IDI5LjUxMDkgMzUyLjU0NiAyOS40NDU0QzM1Mi42NDQgMzAuNzU4NCAzNTIuNjc4IDMyLjA3MTQgMzUyLjY3OCAzMy4zNTE5VjM2LjczMzRDMzUyLjE0OSAzNi4yNzM2IDM1MC44NiAzNS4wOTE5IDM0OS4zNzQgMzMuNzEzQzM0Ny44NiAzMi4zMDc0IDM0Ni4zOTQgMzAuODUxMSAzNDQuOTc5IDI5LjM0NjZIMzQ0Ljc0OEMzNDQuNzgxIDMwLjgyNDMgMzQ0LjgxNCAzMi40IDM0NC44MTQgMzMuODExNFYzNS44Nzk5QzM0NC44MTQgMzcuNjUyOCAzNDQuODE0IDM4LjYwNDcgMzQ0LjcxNSA0MC4wMTYyQzM0NC45OCAzOS45NTAzIDM0NS4xMTIgMzkuOTUwMyAzNDUuMzEgMzkuOTUwM0MzNDUuNDQyIDM5Ljk1MDMgMzQ1LjU3NSAzOS45NTAzIDM0NS44MDYgNDAuMDE2MkMzNDUuNzQgMzguNjcwNiAzNDUuNzA3IDM2LjQ3MDggMzQ1LjcwNyAzNS44Nzk5VjMyLjU5NjhDMzQ4LjE4NSAzNC44NjI1IDM1MS4yMjQgMzcuODgyNiAzNTMuNDcxIDQwLjE0NzVIMzUzLjYwM0MzNTMuNjAzIDM4LjkzMjkgMzUzLjUzNyAzNy43MTc5IDM1My41MzcgMzYuNTA0VjM0LjYzMjdDMzUzLjUzNiAzMi40MzI1IDM1My41MzYgMzEuMzQ5MyAzNTMuNjM2IDI5LjQ0NTRaTTM0Mi41NjcgNDAuMDE1OEMzNDIuNTM0IDM5Ljg1MTkgMzQyLjUwMSAzOS43MjA2IDM0Mi41MDEgMzkuNTIzNEMzNDIuNTAxIDM5LjM5MjggMzQyLjUzNCAzOS4yMjgxIDM0Mi41NjcgMzkuMDk2NEMzNDEuMjQ2IDM5LjEyOTcgMzM4Ljg2NyAzOS4xOTUyIDMzOC4zNzEgMzkuMTk1MlYzNC42NjQ5QzMzOS42NiAzNC42NjQ5IDM0MC45NDggMzQuNjY0OSAzNDIuMjM3IDM0Ljc5NjNDMzQyLjIwNCAzNC42MzI0IDM0Mi4xNzEgMzQuNDY3NyAzNDIuMTcxIDM0LjMzNjRDMzQyLjE3MSAzNC4yMDU4IDM0Mi4xNzEgMzQuMDQxOSAzNDIuMjM3IDMzLjg0NDdDMzQxLjMxMiAzMy45NDI4IDMzOS4xOTcgMzMuOTc2IDMzOC4zNzEgMzMuOTc2VjMwLjI2NkMzMzkuNzkyIDMwLjI2NiAzNDAuNjUxIDMwLjI2NiAzNDEuMTc5IDMwLjI5OTNMMzQyLjQ2OCAzMC4zNjUxQzM0Mi40MzUgMzAuMTY3OSAzNDIuNDM1IDMwLjA2OTIgMzQyLjQzNSAyOS45MDUzQzM0Mi40MzUgMjkuNzQxNCAzNDIuNDM1IDI5LjY3NTUgMzQyLjQ2OCAyOS40NDU4QzM0MS4zNzggMjkuNDc4MyAzMzkuODkxIDI5LjU0MzggMzM5LjIzIDI5LjU0MzhDMzM4Ljc2NyAyOS41NDM4IDMzNy4zMTQgMjkuNTExMyAzMzYuNTU0IDI5LjQ0NThDMzM2LjYyIDMwLjI2NjQgMzM2LjY1MyAzMS42MTIzIDMzNi42NTMgMzIuNTY0MlYzNi44NjUxQzMzNi42NTMgMzcuNDg4NSAzMzYuNTg3IDM4LjczNTcgMzM2LjU1NCA0MC4wMTYyQzMzNy41MTIgMzkuOTUwMyAzMzguNzY3IDM5Ljk1MDMgMzM5LjIzIDM5Ljk1MDNDMzM5Ljk5IDM5Ljk1IDM0MS42NDIgMzkuOTUgMzQyLjU2NyA0MC4wMTU4VjQwLjAxNThaTTMzMS4yMDEgMjYuODE5QzMzMC42NzMgMjMuMjQwNiAzMzAuMjEgMTkuNDk4NCAzMjkuODQ3IDE2LjExNjlDMzI5Ljc0OCAxNi4xNDk4IDMyOS43MTQgMTYuMTQ5OCAzMjkuNjQ5IDE2LjExNjlDMzI4Ljk1NSAxNy4zMzE1IDMyOC4xNjIgMTguNjQ0NSAzMjcuNTY3IDE5LjU2MzlDMzI3LjAwNiAyMC40NTAzIDMyNi4zNDUgMjEuNTAwNyAzMjUuNTg1IDIyLjYxNjlDMzIzLjk5OSAyMC41ODE3IDMyMi4zNDcgMTguMDIxMSAzMjEuMjU2IDE2LjExNjlDMzIxLjE5IDE2LjE0OTggMzIxLjE1NyAxNi4xMTY5IDMyMS4wOTEgMTYuMTE2OUMzMjAuNzI4IDE5LjQ5OCAzMjAuMjMyIDIzLjI3MzIgMzE5LjczNiAyNi44MTlDMzIwLjAwMSAyNi43MjA2IDMyMC4xNjYgMjYuNzIwNiAzMjAuMjk4IDI2LjcyMDZDMzIwLjQ5NiAyNi43MjA2IDMyMC42MjggMjYuNzUzNSAzMjAuODU5IDI2LjgxOUMzMjAuOTkyIDI0LjQ1NTMgMzIxLjI1NiAyMi4xMjQ0IDMyMS41NTMgMTkuNjYyM0MzMjIuODQyIDIxLjUzMzYgMzIzLjk2NSAyMy4xNDIyIDMyNS4yMjEgMjQuODQ5M0MzMjYuMjc4IDIzLjIwNzcgMzI3LjM2OCAyMS40MzQ4IDMyOC41NTggMTkuNjI5NEMzMjguODg4IDIyLjE1NyAzMjkuMTg2IDI0LjQ1NTMgMzI5LjM1MSAyNi44MTlDMzI5Ljc4IDI2LjcyMDYgMzMwLjA3OCAyNi43MjA2IDMzMC4yNzYgMjYuNzIwNkMzMzAuNTQgMjYuNzIwNiAzMzAuODA1IDI2LjcyMDYgMzMxLjIwMSAyNi44MTlWMjYuODE5Wk0zMzQuOTY4IDMyLjIwMjhDMzM0Ljk2OCAzMC4yOTg5IDMzMy40NDggMjkuNDQ1NCAzMzEuNTk4IDI5LjQ0NTRDMzMwLjc3MiAyOS40NDU0IDMyOS44OCAyOS41NDM1IDMyOS4yNTIgMjkuNTQzNUMzMjkuMDIxIDI5LjU0MzUgMzI4LjUyNSAyOS41NDM1IDMyNy45OTcgMjkuNDc3NkMzMjguMDMgMzAuNTI4MyAzMjguMDk2IDMxLjQxNDggMzI4LjA5NiAzMi40MzIyVjM2LjkyOTVDMzI4LjA5NiAzNy45MTQ4IDMyOC4wMyAzOC45OTggMzI3Ljk5NyA0MC4wMTU0QzMyOC40MjYgMzkuOTQ5NiAzMjguNzI0IDM5Ljk0OTYgMzI4LjkyMiAzOS45NDk2QzMyOS4xNTMgMzkuOTQ5NiAzMjkuNDg0IDM5Ljk0OTYgMzI5Ljg4IDQwLjAxNTRDMzI5LjgxNSAzOS4wMzE5IDMyOS43ODIgMzguMDQ2NSAzMjkuNzgxIDM3LjA2MDlWMzUuNDJDMzMwLjE0NSAzNS40NTI2IDMzMC41MDggMzUuNDUyNiAzMzAuOTA1IDM1LjQ1MjZDMzMyLjgyIDM1LjQ1MjYgMzM0Ljk2OCAzNC43MzA0IDMzNC45NjggMzIuMjAyOFYzMi4yMDI4Wk0zMjYuMDE0IDM2Ljg5NzNDMzI2LjAxNCAzNS4yNTU4IDMyNC45MjQgMzQuNTMzNiAzMjMuMDQgMzMuNzQ1NkMzMjEuNjg2IDMzLjE4OCAzMjAuOTkyIDMyLjY5NTYgMzIwLjk5MiAzMS42NDQ1QzMyMC45OTIgMzAuNjYgMzIxLjc1MiAzMC4wMzYyIDMyMy4wMDggMzAuMDM2MkMzMjMuODM0IDMwLjAzNjIgMzI0LjU2MSAzMC4zMzE1IDMyNS4yMjIgMzAuODU2OEMzMjUuMjg3IDMwLjQ5NTcgMzI1LjQ1MyAzMC4xMzQ3IDMyNS42NTEgMjkuODM5NEMzMjQuODU4IDI5LjQ3ODMgMzIzLjk5OSAyOS4zNDcgMzIzLjA3NCAyOS4zNDdDMzIwLjM2NSAyOS4zNDcgMzE5LjUwNSAzMC44OTA1IDMxOS41MDUgMzIuMjAzNUMzMTkuNTA1IDMzLjgxMTggMzIwLjI5OSAzNC41NjcyIDMyMi4zNDcgMzUuMzU1M0MzMjMuNjM2IDM1Ljg0NyAzMjQuMjk2IDM2LjQ3MTEgMzI0LjI5NiAzNy41NTQ0QzMyNC4yOTYgMzguNzAzNSAzMjMuNDM3IDM5LjQyNTcgMzIyLjI0OCAzOS40MjU3QzMyMS41NTQgMzkuNDI1NyAzMjAuMzY1IDM5LjA2NDYgMzE5LjUzOSAzOC4zMDk5QzMxOS41MDUgMzguNzM2MSAzMTkuNTA1IDM5LjEzMDQgMzE5LjM3MyAzOS40OTE1QzMxOS45MDIgMzkuNzU0NiAzMjEuMTI1IDQwLjE0NzkgMzIyLjIxNSA0MC4xNDc5QzMyNC45OSA0MC4xNDcxIDMyNi4wMTQgMzguNDM5NyAzMjYuMDE0IDM2Ljg5NzNWMzYuODk3M1pNMzc4LjE1MiAxNy45ODgyQzM3OC4xNTIgMTguOTczIDM3Ny40NTggMTkuNjYyMyAzNzYuNzY0IDIwLjIyMDJDMzc2LjMwMSAxOS41NjM5IDM3NS43NCAxOC42NzcxIDM3NS43NCAxNy45ODgyQzM3NS43NCAxNy4yMzMxIDM3Ni4yNjggMTYuODA2MSAzNzYuOTk1IDE2LjgwNjFDMzc3Ljk4NyAxNi44MDY1IDM3OC4xNTIgMTcuNjkyNiAzNzguMTUyIDE3Ljk4ODJWMTcuOTg4MlpNMzc4LjQ4MiAyNS4wMTMyQzM3OC4xMTkgMjUuMzQxNyAzNzcuMjYgMjUuOTY1NSAzNzYuNTMzIDI1Ljk2NTVDMzc1LjU3NCAyNS45NjU1IDM3NC40MTggMjUuMjc1OSAzNzQuNDE4IDIzLjc5ODZDMzc0LjQxOCAyMi40ODU1IDM3NS4yNzcgMjEuODk0NyAzNzUuODA2IDIxLjU2NjVDMzc3LjAyOCAyMy4yNDA2IDM3Ny4wOTUgMjMuMzM5MSAzNzguNDgyIDI1LjAxMzJaTTM3OS44MDQgMzIuMjAyOEMzNzkuODA0IDMzLjI1MzUgMzc5LjI3NSAzNC40MDI2IDM3Ny43NTUgMzQuNDAyNkMzNzcuMzI2IDM0LjQwMjYgMzc2LjkyOSAzNC40MDI2IDM3Ni41MzMgMzQuMzY5M1YzMC4yNjU2QzM3Ni45MjkgMzAuMTY3NiAzNzcuNDI1IDMwLjEzNDMgMzc3LjcyMiAzMC4xMzQzQzM3OS4wMTEgMzAuMTM0MyAzNzkuODA0IDMwLjg4OTggMzc5LjgwNCAzMi4yMDI4Wk0zMzguNjAyIDIyLjgxNDFDMzM3LjkwOSAyMi44NDY2IDMzNy41NDUgMjIuODQ2NiAzMzcuMDgyIDIyLjg0NjZDMzM2LjUyMSAyMi44NDY2IDMzNi4xOSAyMi44NDY2IDMzNS40NjMgMjIuODE0MUwzMzcuMDgyIDE5LjAwNkwzMzguNjAyIDIyLjgxNDFaTTMzMy4xNTEgMzIuMzAwOEMzMzMuMTUxIDMzLjgxMTEgMzMyLjI1OCAzNC43OTU5IDMzMC44MDUgMzQuNzk1OUMzMzAuNTA3IDM0Ljc5NTkgMzMwLjE3NyAzNC43OTU5IDMyOS43OCAzNC43MzAxVjMwLjIzMjdDMzMwLjI0MyAzMC4xNjY5IDMzMC42MzkgMzAuMTMzOSAzMzEuMDM2IDMwLjEzMzlDMzMyLjQyNCAzMC4xMzQzIDMzMy4xNTEgMzEuMDIxMSAzMzMuMTUxIDMyLjMwMDhaTTM2OS41MjggMjMuNjY3NkMzNjkuNTI4IDIyLjAyNiAzNjguNDM4IDIxLjMwMzkgMzY2LjU1NSAyMC41MTYyQzM2NS4yIDE5Ljk1ODMgMzY0LjUwNiAxOS40OTg4IDM2NC41MDYgMTguNDE1MUMzNjQuNTA2IDE3LjQ2MzIgMzY1LjI2NiAxNi44MDY1IDM2Ni41MjEgMTYuODA2NUMzNjcuMzQ4IDE2LjgwNjUgMzY4LjA3NSAxNy4xMDE3IDM2OC43MzUgMTcuNjI3NUMzNjguODAyIDE3LjI2NjQgMzY4Ljk2NyAxNi45MDQ5IDM2OS4xMzEgMTYuNjQyMkMzNjguMzcyIDE2LjI4MTEgMzY3LjQ3OSAxNi4xMTcyIDM2Ni41ODcgMTYuMTE3MkMzNjMuOTQ0IDE2LjExNzIgMzYyLjk4NiAxNy42NiAzNjIuOTg2IDE5LjAwNkMzNjIuOTg2IDIwLjU4MTcgMzYzLjgxMiAyMS4zMzY4IDM2NS44NjEgMjIuMTI0NEMzNjcuMTQ5IDIyLjYxNjkgMzY3LjgxIDIzLjI0MDYgMzY3LjgxIDI0LjM1NjhDMzY3LjgxIDI1LjQ3MyAzNjYuOTUxIDI2LjE5NTIgMzY1Ljc2MiAyNi4xOTUyQzM2NS4wMzUgMjYuMTk1MiAzNjMuODc5IDI1LjgzNDEgMzYzLjA1MiAyNS4xMTE5QzM2My4wMiAyNS41Mzg5IDM2Mi45ODYgMjUuOSAzNjIuODg3IDI2LjI2MTFDMzYzLjM4MyAyNi41MjM4IDM2NC42MDYgMjYuOTE3NCAzNjUuNzI5IDI2LjkxNzRDMzY4LjUwNCAyNi45MTc0IDM2OS41MjggMjUuMjQzMyAzNjkuNTI4IDIzLjY2NzZWMjMuNjY3NloiIGZpbGw9IiMwMzY1NTUiLz4NCjxwYXRoIGQ9Ik02NDAuNDE2IDIwLjU1NzNDNjM4LjY3MSAxOS44MzU0IDYzNy42MzEgMTkuNTU1MSA2MzYuNTk4IDE5LjU1NTFDNjM1LjUxNCAxOS41NTUxIDYzNC44MTkgMTkuOTE3IDYzNC44MTkgMjAuNDc2NUM2MzQuODE5IDIyLjE2NDUgNjQwLjk2MiAyMS42ODkzIDY0MC45NjIgMjUuNTkzNkM2NDAuOTYyIDI3Ljc0NjQgNjM5LjAyNCAyOC45OTc0IDYzNi4zMzIgMjguOTk3NEM2MzQuMjIgMjguOTk3NCA2MzMuMTggMjguNDg4IDYzMS45ODMgMjcuOTExNlYyNS40OTYyQzYzMy43MSAyNi41NjM1IDYzNC43NjggMjYuOTQwMSA2MzYuMTAxIDI2Ljk0MDFDNjM3LjI1NiAyNi45NDAxIDYzNy44NzkgMjYuNTYzNSA2MzcuODc5IDI1LjkwNjNDNjM3Ljg3OSAyNC4wNjg1IDYzMS43MzcgMjQuNzQxNSA2MzEuNzM3IDIwLjcyMTNDNjMxLjczNyAxOC43ODI3IDYzMy41MzQgMTcuNDk5IDYzNi4zMzIgMTcuNDk5QzYzNy42ODIgMTcuNDk5IDYzOC45MDEgMTcuNzYzNSA2NDAuNDE2IDE4LjM3MDdWMjAuNTU3M1pNNjQ5LjAxNiAyOC40ODQxQzY0Ny45OTIgMjguODMwNiA2NDcuMTI2IDI4Ljk5NTQgNjQ2LjI2MiAyOC45OTU0QzY0My40MDIgMjguOTk1NCA2NDEuNTUyIDI3LjQ0MjIgNjQxLjU1MiAyNS4wNzkyQzY0MS41NTIgMjIuNzU5NCA2NDMuNDczIDIxLjEyMDIgNjQ2LjE1NiAyMS4xMjAyQzY0Ni45ODUgMjEuMTIwMiA2NDguMDQ0IDIxLjMxODIgNjQ4Ljg5MSAyMS42MTIzVjIzLjM4ODFDNjQ4LjIyMSAyMy4wNTYyIDY0Ny40NDQgMjIuODc0MSA2NDYuODA5IDIyLjg3NDFDNjQ1LjI3MyAyMi44NzQxIDY0NC4yODYgMjMuNzM0MyA2NDQuMjg2IDI1LjA2MTlDNjQ0LjI4NiAyNi40MDggNjQ1LjI1NiAyNy4yOTQgNjQ2LjcyIDI3LjI5NEM2NDcuMzM3IDI3LjI5NCA2NDcuODg2IDI3LjE2MjMgNjQ5LjAxNiAyNi43NjhMNjQ5LjAxNiAyOC40ODQxWk02NzEuMzIgMjQuMjA5QzY3MS40MjUgMjMuMTU0OCA2NzIuMDgxIDIyLjU0NTcgNjczLjA4NyAyMi41NDU3QzY3NC4wNzYgMjIuNTQ1NyA2NzQuNzQ2IDIzLjE3MjEgNjc0Ljg1MiAyNC4yMDlINjcxLjMyWk02NzIuOTEgMjEuMTIyOUM2NzAuNCAyMS4xMjI5IDY2OC42MTQgMjIuNzc1NSA2NjguNjE0IDI1LjEwMTJDNjY4LjYxNCAyNy40NDQxIDY3MC40NzEgMjguOTk1NCA2NzMuMzM1IDI4Ljk5NTRDNjczLjk3IDI4Ljk5NTQgNjc1LjUwNCAyOC45OTU0IDY3Ni45NjYgMjcuOTg3VjI2LjUwNDJDNjc1Ljc2OSAyNy4yOTkzIDY3NC45NzcgMjcuNTczMSA2NzMuOTU1IDI3LjU3MzFDNjcyLjM0MSAyNy41NzMxIDY3MS4zNTQgMjYuNzk0OSA2NzEuMjY1IDI1LjQ2NjZINjc3LjExQzY3Ny4yMzIgMjIuNjkzOSA2NzUuMjc5IDIxLjEyMjkgNjcyLjkxIDIxLjEyMjlWMjEuMTIyOVpNNjc4LjA5OSAyOC44NTcySDY4MC42NTRWMjEuMjYyN0g2NzguMDk5VjI4Ljg1NzJaTTY4Ny43NjcgMjYuNzgxNUM2ODcuMjM0IDI3LjIyODEgNjg2Ljc5MiAyNy40MDcyIDY4Ni4yNDYgMjcuNDA3MkM2ODUuMDQzIDI3LjQwNzIgNjg0LjI4MSAyNi40ODM4IDY4NC4yODEgMjUuMTAwNEM2ODQuMjgxIDIzLjU4NDEgNjg1LjA0MyAyMi43MTAxIDY4Ni4zMzEgMjIuNzEwMUM2ODYuNzkyIDIyLjcxMDEgNjg3LjM5NCAyMi45MDggNjg3Ljc2NyAyMy4xNTU5VjI2Ljc4MTVaTTY4Ny43NjcgMTcuNjM5MVYyMS41OTU4QzY4Ny4wNzYgMjEuMjg0NyA2ODYuMzg4IDIxLjEyMDIgNjg1LjY0NCAyMS4xMjAyQzY4My4zMTMgMjEuMTIwMiA2ODEuNyAyMi43MjY2IDY4MS43IDI1LjA1MDdDNjgxLjcgMjcuMzI0OCA2ODMuMzEzIDI4Ljk5NzQgNjg1LjUgMjguOTk3NEM2ODYuMzY3IDI4Ljk5NzQgNjg3LjAzNyAyOC43ODU2IDY4Ny43NjcgMjguMjQzNVYyOC44NTQ5SDY5MC4zMjJWMTcuNjM5MUg2ODcuNzY3Wk02OTQuMTA1IDI0LjIwOUM2OTQuMjExIDIzLjE1NDggNjk0Ljg2NCAyMi41NDU3IDY5NS44NjggMjIuNTQ1N0M2OTYuODU4IDIyLjU0NTcgNjk3LjUzNSAyMy4xNzIxIDY5Ny42NDEgMjQuMjA5SDY5NC4xMDVaTTY5NS42OTQgMjEuMTIyOUM2OTMuMTg0IDIxLjEyMjkgNjkxLjQgMjIuNzc1NSA2OTEuNCAyNS4xMDEyQzY5MS40IDI3LjQ0NDEgNjkzLjI1OSAyOC45OTU0IDY5Ni4xMTkgMjguOTk1NEM2OTYuNzUzIDI4Ljk5NTQgNjk4LjI5IDI4Ljk5NTQgNjk5Ljc1NSAyNy45ODdWMjYuNTA0MkM2OTguNTU3IDI3LjI5OTMgNjk3Ljc2MyAyNy41NzMxIDY5Ni43MzYgMjcuNTczMUM2OTUuMTMxIDI3LjU3MzEgNjk0LjE0IDI2Ljc5NDkgNjk0LjA1MSAyNS40NjY2SDY5OS44OTRDNzAwLjAxNSAyMi42OTM5IDY5OC4wNjEgMjEuMTIyOSA2OTUuNjk0IDIxLjEyMjkiIGZpbGw9IiMwMDlFNEQiLz4NCjxwYXRoIGQ9Ik03MDMuNzIxIDIzLjQzNjhINzAzLjc1OEM3MDQuNTE3IDIxLjg1NjIgNzA1LjM2NiAyMS4xMTUgNzA2LjM1MiAyMS4xMTVDNzA2Ljg2MiAyMS4xMTUgNzA3LjMwMyAyMS4yOTY0IDcwOC4wNDQgMjEuODA3Nkw3MDcuMzQxIDIzLjkxMzNDNzA2LjY3IDIzLjUxODYgNzA2LjIyOSAyMy4zNTM1IDcwNS44MjMgMjMuMzUzNUM3MDQuODg2IDIzLjM1MzUgNzA0LjI4NiAyNC4xNzc1IDcwMy43MjEgMjUuNTcwNFYyOC44NDY2SDcwMS4xNjJWMjEuMjU0MUg3MDMuNzIxVjIzLjQzNjhaTTY4MC43NzUgMTguMDY3NEM2ODEuMDE1IDE4LjY1NzUgNjgwLjU4MyAxOS40ODA1IDY3OS44MTQgMTkuOTA0QzY3OS4wNDEgMjAuMzI3MSA2NzguMjI0IDIwLjE5MjggNjc3Ljk4NiAxOS42MDI3QzY3Ny43NDMgMTkuMDExNyA2NzguMTczIDE4LjE4NzcgNjc4Ljk0NSAxNy43NjY2QzY3OS43MTYgMTcuMzQxMSA2ODAuNTMzIDE3LjQ3NTkgNjgwLjc3NSAxOC4wNjc0WiIgZmlsbD0iIzAwOUU0RCIvPg0KPHBhdGggZD0iTTY1OC4yMiAyNC4wMjMxQzY1OC4yMiAyMS45NjUxIDY1Ni43MTkgMjEuMTIyNiA2NTUuMjM5IDIxLjEyMjZDNjU0LjIzMiAyMS4xMjI2IDY1My40MDQgMjEuNTE4NCA2NTIuNjY0IDIyLjM5MjFINjUyLjYyOVYxNy42MzkySDY1MC4wNzFWMjguODM1M0g2NTIuNjI5VjI0LjAyMzFDNjUzLjIyOCAyMy4yMTYxIDY1My43MzggMjIuODcxMSA2NTQuMzM4IDIyLjg3MTFDNjU1LjEzNCAyMi44NzExIDY1NS42NjIgMjMuMzk4NiA2NTUuNjYyIDI0LjUzMjlWMjcuMjAwOEM2NTYuNTIgMjYuNzg5NiA2NTcuMzkzIDI2LjUzNzQgNjU4LjIyIDI2LjQ0MzhWMjQuMDIzMVpNNjY0LjYzNiAyMS4xMTk5QzY2My41OTQgMjEuMTE5OSA2NjIuNzk5IDIxLjQ4MTEgNjYxLjk4NCAyMi4zNDkzVjIxLjI2MjRINjU5LjQyOFYyNi40MjM0QzY2MC4zMTMgMjYuNTA1OCA2NjEuNDQzIDI2Ljg4NDcgNjYxLjk4NCAyNy41MTA0VjIzLjk2MzRDNjYyLjY1NyAyMy4wMjMyIDY2My4xMzQgMjIuNzA5NyA2NjMuNzcgMjIuNzA5N0M2NjQuNDk0IDIyLjcwOTcgNjY1LjA0NSAyMy4xNTU2IDY2NS4wNDUgMjQuMjI2NFYyOC44MzcySDY2Ny42MDJWMjQuMDI4OUM2NjcuNjAyIDIxLjc5MjYgNjY1LjkwOCAyMS4xMTk5IDY2NC42MzYgMjEuMTE5OVYyMS4xMTk5Wk02NjkuMDE1IDMxLjAxODFINjY2LjA0M1YzMi45ODY0SDY2OC45MDlWMzMuODMxMkg2NjYuMDQzVjM1Ljg2MTlINjY5LjEwM1YzNi43MDU1SDY2NS4wNDZWMzAuMTc1Mkg2NjkuMDE1TDY2OS4wMTUgMzEuMDE4MVpNNjcxLjQ0MiAzNi43MDkzSDY3Mi4zNTJWMzAuMTczM0g2NzEuNDQyVjM2LjcwOTNaTTY3Ni44NTkgMzMuMDQ4NEM2NzcuNTA0IDMzLjA0ODQgNjc3LjkwNCAzMy40NjMxIDY3Ny45MzUgMzQuMTE0Mkg2NzUuNjE2QzY3NS43NDIgMzMuNDM0MiA2NzYuMTYxIDMzLjA0ODQgNjc2Ljg1OSAzMy4wNDg0Wk02NzUuNiAzNC42ODFINjc4Ljg0MkM2NzguODQyIDMzLjA4NjkgNjc4LjA2MiAzMi4zMTggNjc2LjgzOCAzMi4zMThDNjc1LjU2OSAzMi4zMTggNjc0LjY4OCAzMy4xOTI0IDY3NC42ODggMzQuNDk2OUM2NzQuNjg4IDM1LjY4OSA2NzUuNDg0IDM2Ljc4OTggNjc2LjkxNyAzNi43ODk4QzY3Ny42OTggMzYuNzg5OCA2NzguMjAzIDM2LjYyODEgNjc4Ljc2MyAzNi4yODJWMzUuNDU2QzY3OC4yMjIgMzUuNzg1NiA2NzcuNjk4IDM1Ljk3NTggNjc3LjE0NyAzNS45NzU4QzY3Ni4yNjUgMzUuOTc1OCA2NzUuNzQyIDM1LjUzNSA2NzUuNiAzNC42ODA2VjM0LjY4MVpNNjg0Ljc4NiAzMy41MzA5QzY4NC4yNjMgMzMuMTk2NiA2ODMuOTE0IDMzLjA5ODUgNjgzLjUxNSAzMy4wOTg1QzY4Mi42ODIgMzMuMDk4NSA2ODIuMTA1IDMzLjY5NDUgNjgyLjEwNSAzNC41NjdDNjgyLjEwNSAzNS40NTYgNjgyLjcxOSAzNS45OTE2IDY4My42NjggMzUuOTkxNkM2ODQuMDU4IDM1Ljk5MTYgNjg0LjQzIDM1Ljg5NzMgNjg0Ljg4OCAzNS43MDU5VjM2LjU0MjZDNjg0LjU4MiAzNi42Nzc0IDY4My45OTcgMzYuNzg5OCA2ODMuNTE1IDM2Ljc4OThDNjgyLjEzNiAzNi43ODk4IDY4MS4xOCAzNS45MDYyIDY4MS4xOCAzNC42NDMyQzY4MS4xOCAzMy4yMTc4IDY4Mi4wNTQgMzIuMzE4IDY4My40NTMgMzIuMzE4QzY4My45ODcgMzIuMzE4IDY4NC4zNDYgMzIuNDMzOSA2ODQuNzg3IDMyLjYxNDVMNjg0Ljc4NiAzMy41MzA5Wk02ODguOTM0IDMyLjQwMDRINjkwLjM5NVYzMy4xNjUxSDY4OC45MzRWMzUuMzc1MkM2ODguOTM0IDM1Ljg4MTEgNjg5LjMyNyAzNi4wMjc0IDY4OS41OTMgMzYuMDI3NEM2ODkuOTIyIDM2LjAyNzQgNjkwLjI2MiAzNS45MiA2OTAuNjMgMzUuNzA3OVYzNi41MDM3QzY5MC4zMSAzNi42Njc4IDY4OS44MiAzNi43ODk4IDY4OS41MTkgMzYuNzg5OEM2ODguNTI4IDM2Ljc4OTggNjg4LjAyNyAzNi4yMTYxIDY4OC4wMjcgMzUuNDM5MVYzMy4xNjUxSDY4Ny4yMjRWMzMuMDcwM0w2ODguOTM0IDMxLjUxMDJWMzIuNDAwNFpNNjkzLjg3NiAzMi40MDA0VjMzLjM5NjlINjkzLjg5NUM2OTQuMzU5IDMyLjYzNDUgNjk0LjggMzIuMzE4IDY5NS4yMyAzMi4zMThDNjk1LjYwMSAzMi4zMTggNjk1Ljk0NyAzMi40ODAxIDY5Ni4zMjkgMzIuODE2Nkw2OTUuODQ3IDMzLjU2NDRDNjk1LjU3IDMzLjMwOTEgNjk1LjIxMSAzMy4xMzMxIDY5NC45OTUgMzMuMTMzMUM2OTQuMzY4IDMzLjEzMzEgNjkzLjg3NiAzMy43MjY4IDY5My44NzYgMzQuNDYyNlYzNi43MDkzSDY5Mi45NjdWMzIuNDAwNEg2OTMuODc2Wk03MDUuNjU3IDMzLjUzMDlDNzA1LjEzMSAzMy4xOTY2IDcwNC43ODIgMzMuMDk4NSA3MDQuMzgxIDMzLjA5ODVDNzAzLjU0OSAzMy4wOTg1IDcwMi45NzcgMzMuNjk0NSA3MDIuOTc3IDM0LjU2N0M3MDIuOTc3IDM1LjQ1NiA3MDMuNTkyIDM1Ljk5MTYgNzA0LjUzNSAzNS45OTE2QzcwNC45MjUgMzUuOTkxNiA3MDUuMjk1IDM1Ljg5NzMgNzA1Ljc2IDM1LjcwNTlWMzYuNTQyNkM3MDUuNDQ3IDM2LjY3NzQgNzA0Ljg2MiAzNi43ODk4IDcwNC4zOCAzNi43ODk4QzcwMy4wMDQgMzYuNzg5OCA3MDIuMDQ0IDM1LjkwNjIgNzAyLjA0NCAzNC42NDMyQzcwMi4wNDQgMzMuMjE3OCA3MDIuOTIyIDMyLjMxOCA3MDQuMzIgMzIuMzE4QzcwNC44NTUgMzIuMzE4IDcwNS4yMTIgMzIuNDMzOSA3MDUuNjU3IDMyLjYxNDVMNzA1LjY1NyAzMy41MzA5Wk02OTguNzQyIDM2LjcwOTNINjk5LjY1MlYzMi40MDA4SDY5OC43NDJWMzYuNzA5M1oiIGZpbGw9IiMwMDlFNEQiLz4NCjxwYXRoIGQ9Ik02OTkuNjg0IDMwLjg1MjVDNjk5Ljc3MyAzMS4wNjA0IDY5OS42MTggMzEuMzU0NCA2OTkuMzQ0IDMxLjUwNDFDNjk5LjA2OCAzMS42NTQzIDY5OC43NzYgMzEuNjA2MiA2OTguNjkzIDMxLjM5NzhDNjk4LjYxIDMxLjE4NzQgNjk4Ljc2MSAzMC44OTU4IDY5OS4wMzggMzAuNzQ1NkM2OTkuMzExIDMwLjU5MzUgNjk5LjYwMSAzMC42NDIxIDY5OS42ODQgMzAuODUyNVYzMC44NTI1Wk02NTguOTQgMzEuMjAwOUM2NTguNzc5IDMxLjIwMDkgNjU4LjcxMSAzMS4yMjU1IDY1OC42NDYgMzEuMjkzOEM2NTguNjIgMzEuMzIwMyA2NTguNjEgMzEuMzQ3MiA2NTguNiAzMS40MDExTDY1Ny43ODQgMzQuMjg3QzY1Ny41OTMgMzUuMjk5MiA2NTYuMjU5IDM2LjMwOTkgNjU0LjUyMSAzNi4zMDk5SDY1Mi4xMDRMNjUyLjUyMyAzNC44MjdINjU0LjA3NkM2NTQuMjM0IDM0LjgyNyA2NTQuMzU4IDM0Ljc3MjEgNjU0LjQ2MiAzNC42NjQzQzY1NC41IDM0LjYyMjUgNjU0LjU1IDM0LjU1NyA2NTQuNTU2IDM0LjQ4OTZMNjU1LjIwMSAzMS45NjgxQzY1NS4zOTEgMzAuOTU1NSA2NTYuNTM4IDI5LjgzNjkgNjU4LjI3NiAyOS44MzY5SDY2MC43NTFMNjYwLjQzNSAzMS4yMDA5SDY1OC45NFpNNjU5LjQ5NyAzMi45NTk2TDY1OS43NzMgMzIuMDI1OUg2NjIuMjg4QzY2Mi41OTggMzAuNjcyIDY2Mi4zNTQgMjkuNDE3NyA2NjEuNDczIDI4LjU5NjFDNjU5LjY4OSAyNi45MzMyIDY1NS45NTcgMjcuNDk4MyA2NTMuMTc3IDI5Ljk3NzlDNjUyLjc0MyAzMC4zNjMgNjUyLjM3NiAzMC43NzkzIDY1Mi4wNDIgMzEuMjA0OEg2NTMuNTU2TDY1My4yMDQgMzIuMTQwNEg2NTEuMzk1QzY1MS4yMjIgMzIuNDM1NCA2NTEuMDYgMzIuNzI4MSA2NTAuOTM2IDMzLjAyNUg2NTMuMDgxTDY1Mi43MzcgMzMuOTYwN0g2NTAuNjNDNjUwLjI2OSAzNS4zOTAxIDY1MC40OTkgMzYuNzIzMyA2NTEuNDA2IDM3LjU2OTlDNjUzLjE2NyAzOS4yMTE2IDY1Ni44ODggMzguNjM0NiA2NTkuNjY3IDM2LjE1NTRDNjYwLjE1MyAzNS43MjQyIDY2MC41NTUgMzUuMjU4NyA2NjAuOTE4IDM0Ljc4MDhINjU4Ljk3M0w2NTkuMjY5IDMzLjg0NzFINjYxLjU0M0M2NjEuNzEgMzMuNTUwMSA2NjEuODYzIDMzLjI1NjUgNjYxLjk4MyAzMi45NTk2SDY1OS40OTdaIiBmaWxsPSIjMDA5RTREIi8+DQo8ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfNThfMTExKSI+DQo8cGF0aCBkPSJNNzc1LjA2OCA0MS4yMjc0Qzc2Ni4yODUgNDIuMDQ2MyA3NTcuMTMxIDQwLjc1NjQgNzU1Ljg0OCAzMy44MTlDNzU1LjIyMSAzMC4zOTkgNzU2Ljc2NSAyNi43NzI1IDc1OC44MSAyNC41MTg0VjIzLjMxNDhDNzU1LjEyNiAyNi41OCA3NTMuMTMgMzAuNzExNSA3NTQuMjggMzUuNTkyQzc1NS43NDggNDEuODUxOCA3NjMuNjAzIDQ1LjM5NjcgNzc1LjU5NSA0NC4yMTk1Qzc4MC4zNDIgNDMuNzU0NSA3ODYuNTUgNDIuMjEyIDc5MC44NjkgMzkuODE0NFYzNi40MTA5Qzc4Ni45NDkgMzguNzcxMyA3ODAuNDY4IDQwLjcyMTEgNzc1LjA2OCA0MS4yMjc0VjQxLjIyNzRaTTc5OC4yMDUgMjMuMjMzNUM3OTYuMTIyIDEyLjk1MzMgNzc2LjM3MyAxMi4zMDE2IDc2My42NDMgMjAuMTMzOFYyMC45OTg5Qzc3Ni4zNTkgMTQuMzkxNSA3OTQuMzk1IDE0LjQzMTcgNzk2LjAzNyAyMy45MDE2Qzc5Ni41ODkgMjcuMDM0MiA3OTQuODQzIDMwLjI5NzggNzkxLjcyMyAzMi4xNzdWMzQuNjM0MkM3OTUuNDc2IDMzLjI0MzIgNzk5LjMyNCAyOC43NDQyIDc5OC4yMDUgMjMuMjMzNVYyMy4yMzM1WiIgZmlsbD0iIzBFN0RDMiIvPg0KPHBhdGggZD0iTTc5MC4xNTkgMjEuNzM2OEg3ODcuODU2VjMyLjEwM0M3ODcuODU2IDMzLjMxNzkgNzg4LjQzNyAzNC4zNzQ0IDc5MC4xNTkgMzQuNTQzMlYyMS43MzY4Wk03NjIuNzM5IDI1LjUyMTdINzYwLjQzMkw3NjAuNDMxIDMyLjI5NDNDNzYwLjQzMSAzMy41MTM0IDc2MS4wMTMgMzQuNTY4OCA3NjIuNzM5IDM0LjczNDRWMjUuNTIxN1YyNS41MjE3Wk03NjAuNDMyIDIyLjA1MjFINzYyLjczMlYyNC4yNTg0SDc2MC40MzJWMjIuMDUyMVpNNzc2LjUzIDM0LjYyNzJDNzc0LjY2NiAzNC42MjcyIDc3My44NzcgMzMuMzE3NyA3NzMuODc3IDMyLjAyOFYyMy4wMzU1SDc3Ni4xNlYyNS41MjE3SDc3Ny44NzlWMjcuMzg1M0g3NzYuMTZWMzEuODg1NEM3NzYuMTYgMzIuNDExMyA3NzYuNDA3IDMyLjcwNDQgNzc2Ljk1IDMyLjcwNDRINzc3Ljg3OVYzNC42MjcyTDc3Ni41MyAzNC42MjcyVjM0LjYyNzJaTTc4MC43MzEgMzAuNzk2MUM3ODAuNzMxIDMxLjk3NjggNzgxLjQ2MSAzMi44NDQ2IDc4Mi43NTQgMzIuODQ0NkM3ODMuNzY2IDMyLjg0NDYgNzg0LjI2NiAzMi41NjA1IDc4NC44NSAzMS45NzY4TDc4Ni4yNjEgMzMuMzM0OUM3ODUuMzU3IDM0LjIzNzkgNzg0LjQwOSAzNC43ODcgNzgyLjczNyAzNC43ODdDNzgwLjU1MiAzNC43ODcgNzc4LjQ1OSAzMy41ODE5IDc3OC40NTkgMzAuMDY4NkM3NzguNDU5IDI3LjA2NTEgNzgwLjI4OCAyNS4zNjczIDc4Mi42ODYgMjUuMzY3M0M3ODUuMTI0IDI1LjM2NzMgNzg2LjUyNSAyNy4zNTQ5IDc4Ni41MjUgMjkuOTYzOVYzMC43OTYzSDc4MC43MzFWMzAuNzk2MVpNNzgyLjU4NiAyNy4yNzU2Qzc4MS44MDUgMjcuMjc1NiA3ODEuMjA0IDI3LjY4MjMgNzgwLjk1IDI4LjIzMDlDNzgwLjgwMiAyOC41NjA3IDc4MC43NDcgMjguODE3NyA3ODAuNzMxIDI5LjIyMjlINzg0LjI0OUM3ODQuMjA0IDI4LjIzMDkgNzgzLjc1OSAyNy4yNzU2IDc4Mi41ODYgMjcuMjc1NlpNNzY4LjkzOSAyNy4zODUzQzc2OS42MDggMjcuMzg1MyA3NjkuODg3IDI3LjcxOTggNzY5Ljg4NyAyOC4yNjI2VjM0LjY0MDZINzcyLjE3VjI4LjI0OTJDNzcyLjE3IDI2Ljk1NDIgNzcxLjQ4NyAyNS41MjQxIDc2OS40ODIgMjUuNTI0MUw3NjQuNzY2IDI1LjUyMTdWMzQuNjQwNkg3NjcuMDVWMjcuMzg1M0g3NjguOTM5VjI3LjM4NTNaTTc5Mi42MzcgMjMuNTg5MUM3OTIuMTI5IDIzLjU4OTEgNzkxLjcyNCAyMy4xNzU0IDc5MS43MjQgMjIuNjYyOUM3OTEuNzI0IDIyLjE1MjkgNzkyLjEyOSAyMS43MzY4IDc5Mi42MzcgMjEuNzM2OEM3OTMuMTQyIDIxLjczNjggNzkzLjU1NiAyMi4xNTI5IDc5My41NTYgMjIuNjYyOUM3OTMuNTU2IDIzLjE3NTQgNzkzLjE0MiAyMy41ODkxIDc5Mi42MzcgMjMuNTg5MVpNNzkyLjYzNyAyMS44OTEyQzc5Mi4yMTggMjEuODkxMiA3OTEuODgyIDIyLjI0MDcgNzkxLjg4MiAyMi42NjI5Qzc5MS44ODIgMjMuMDg3NiA3OTIuMjE4IDIzLjQzMDkgNzkyLjYzNyAyMy40MzA5Qzc5My4wNTUgMjMuNDMwOSA3OTMuNDAyIDIzLjA4NzYgNzkzLjQwMiAyMi42NjI5Qzc5My40MDIgMjIuMjQwNyA3OTMuMDU1IDIxLjg5MTIgNzkyLjYzNyAyMS44OTEyWk03OTMuMDQzIDIzLjIxOEg3OTIuODcyQzc5Mi44NjQgMjMuMjE3OSA3OTIuODU3IDIzLjIxNTcgNzkyLjg1MSAyMy4yMTE2Qzc5Mi44NDUgMjMuMjA3NSA3OTIuODQgMjMuMjAxNyA3OTIuODM3IDIzLjE5NDlMNzkyLjYwNSAyMi43OTdDNzkyLjU5OCAyMi43ODg1IDc5Mi41NzkgMjIuNzc4OCA3OTIuNTczIDIyLjc3ODhINzkyLjQ2N1YyMy4xNzU0Qzc5Mi40NjcgMjMuMTk1IDc5Mi40NTMgMjMuMjE4MSA3OTIuNDI4IDIzLjIxODFINzkyLjI3NEM3OTIuMjUxIDIzLjIxODEgNzkyLjIzNSAyMy4xOTUgNzkyLjIzNSAyMy4xNzU0VjIyLjE3NDlDNzkyLjIzNSAyMi4xMTY0IDc5Mi4yNTQgMjIuMDkyNCA3OTIuMzA1IDIyLjA4NUM3OTIuMzYxIDIyLjA3OSA3OTIuNTA1IDIyLjA3MTYgNzkyLjU4NiAyMi4wNzE2Qzc5Mi44NzIgMjIuMDcxNiA3OTMuMDM5IDIyLjE1NjYgNzkzLjAzOSAyMi40MjQ0VjIyLjQ0NEM3OTMuMDM5IDIyLjYwOTQgNzkyLjk1OSAyMi42OTk1IDc5Mi44MzMgMjIuNzM5N0w3OTMuMDc0IDIzLjE1NDdDNzkzLjA3OCAyMy4xNjQgNzkzLjA4IDIzLjE3MzkgNzkzLjA4IDIzLjE4NEM3OTMuMDggMjMuMTk5NyA3OTMuMDcyIDIzLjIxOCA3OTMuMDQzIDIzLjIxOFYyMy4yMThaTTc5Mi44MjEgMjIuNDI0NEM3OTIuODIxIDIyLjMxMjcgNzkyLjc1MiAyMi4yNzczIDc5Mi42MDUgMjIuMjc3M0g3OTIuNDU5VjIyLjU5NDdDNzkyLjQ4MiAyMi41OTQ3IDc5Mi41ODYgMjIuNTk5NiA3OTIuNjA1IDIyLjU5OTZDNzkyLjc1MiAyMi41OTk2IDc5Mi44MjEgMjIuNTUgNzkyLjgyMSAyMi40NDRWMjIuNDI0NFoiIGZpbGw9IiMwRTdEQzIiLz4NCjwvZz4NCjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMV81OF8xMTEpIj4NCjxwYXRoIGQ9Ik01MzMuNzczIDIwLjk5MTFDNTI5LjI2MyAyMC45OTExIDUyNS41OTkgMjQuNjU0NyA1MjUuNTk5IDI5LjE2NDRDNTI1LjU5OSAzMy42NzQxIDUyOS4yNjMgMzcuMzM3NyA1MzMuNzczIDM3LjMzNzdDNTM4LjI4MiAzNy4zMzc3IDU0MS45NDYgMzMuNjc0MSA1NDEuOTQ2IDI5LjE2NDRDNTQxLjk0NiAyNC42NTQ3IDUzOC4yODIgMjAuOTkxMSA1MzMuNzczIDIwLjk5MTFaTTUzMy43NzMgMzYuNTE4NkM1MjkuNzEzIDM2LjUxODYgNTI2LjQxOSAzMy4yMTUgNTI2LjQxOSAyOS4xNjQ0QzUyNi40MTkgMjUuMTEzNyA1MjkuNzEzIDIxLjgxMDIgNTMzLjc3MyAyMS44MTAyQzUzNy44MzIgMjEuODEwMiA1NDEuMTI3IDI1LjExMzcgNTQxLjEyNyAyOS4xNjQ0QzU0MS4xMjcgMzMuMjE1IDUzNy44MzIgMzYuNTE4NiA1MzMuNzczIDM2LjUxODZaIiBmaWxsPSJibGFjayIvPg0KPHBhdGggZD0iTTUzNi42OSAyMy45MjUyQzUzNi42NjMgMjMuOTA3MiA1MzYuNjI3IDIzLjg5ODIgNTM2LjU5MSAyMy44OTgyQzUzNi40ODMgMjMuODk4MiA1MzYuNDAyIDIzLjk3OTIgNTM2LjQwMiAyNC4wODczVjI2LjY0MzdDNTM2LjQwMiAyNi43MzM3IDUzNi4zMyAyNi44MDU3IDUzNi4yNCAyNi44MDU3SDUzMS4yOUM1MzEuMiAyNi44MDU3IDUzMS4xMzcgMjYuNzMzNyA1MzEuMTI4IDI2LjY0MzdWMjQuMDg3M0M1MzEuMTI4IDI0LjA1MTMgNTMxLjExOSAyNC4wMjQyIDUzMS4xMDEgMjMuOTg4MkM1MzEuMDQ3IDIzLjg5ODIgNTMwLjkzIDIzLjg3MTIgNTMwLjgzOSAyMy45MjUyQzUyOS4wMTIgMjUuMDUwNCA1MjcuOTA1IDI3LjAwMzcgNTI3LjkwNSAyOS4xNjQxQzUyNy45MDUgMzEuMzI0NCA1MjkuMDEyIDMzLjI3NzcgNTMwLjg1NyAzNC40MDI5QzUzMC44ODUgMzQuNDIwOSA1MzAuOTIxIDM0LjQyOTkgNTMwLjk1NyAzNC40Mjk5QzUzMS4wNjUgMzQuNDI5OSA1MzEuMTQ2IDM0LjM0ODkgNTMxLjE0NiAzNC4yNDA5VjMxLjY4NDVDNTMxLjE0NiAzMS41OTQ0IDUzMS4yMTggMzEuNTMxNCA1MzEuMzA4IDMxLjUyMjRINTM2LjI1OEM1MzYuMzQ4IDMxLjUyMjQgNTM2LjQyIDMxLjU5NDQgNTM2LjQyIDMxLjY4NDVWMzQuMjQwOUM1MzYuNDIgMzQuMjc2OSA1MzYuNDI5IDM0LjMwMzkgNTM2LjQ0NyAzNC4zMzk5QzUzNi41MDEgMzQuNDI5OSA1MzYuNjE4IDM0LjQ1NjkgNTM2LjcwOCAzNC40MDI5QzUzOC41NTQgMzMuMjc3NyA1MzkuNjYxIDMxLjMyNDQgNTM5LjY2MSAyOS4xNjQxQzUzOS42NjEgMjcuMDAzNyA1MzguNTM2IDI1LjA1MDQgNTM2LjY5IDIzLjkyNTJWMjMuOTI1MlpNNTMwLjE5MSAzMi4zNjg2TDUzMC4yMTggMzIuNjc0Nkw1MzAuMDIgMzIuNDMxNkM1MjguNDk5IDMwLjUxNDMgNTI4LjQ5OSAyNy44MDQ4IDUzMC4wMiAyNS44ODc1TDUzMC4xOTEgMjUuNjcxNUw1MzAuMjE4IDI1LjY0NDVMNTMwLjE5MSAyNS45NTk2QzUzMC4xNjQgMjYuMjExNiA1MzAuMTU1IDI2LjQ3MjYgNTMwLjE1NSAyNi43MzM3VjMxLjU4NTRDNTMwLjE1NSAzMS44NDY1IDUzMC4xNzMgMzIuMTA3NSA1MzAuMTkxIDMyLjM2ODZaTTUzNi40MDIgMzAuMzg4M0M1MzYuNDAyIDMwLjQ3ODMgNTM2LjMzIDMwLjU1MDMgNTM2LjI0IDMwLjU1MDNINTMxLjI5QzUzMS4yIDMwLjU1MDMgNTMxLjEzNyAzMC40NzgzIDUzMS4xMjggMzAuMzg4M1YyNy45Mzk5QzUzMS4xMjggMjcuODQ5OSA1MzEuMiAyNy43Nzc4IDUzMS4yOSAyNy43Nzc4SDUzNi4yNEM1MzYuMzMgMjcuNzc3OCA1MzYuNDAyIDI3Ljg0OTkgNTM2LjQwMiAyNy45Mzk5VjMwLjM4ODNaTTUzNy41MTkgMzIuNDMxNkw1MzcuMzIxIDMyLjY3NDZMNTM3LjM0OCAzMi4zNjg2QzUzNy4zNzUgMzIuMTE2NSA1MzcuMzg0IDMxLjg1NTUgNTM3LjM4NCAzMS41OTQ0VjI2LjczMzdDNTM3LjM4NCAyNi40NzI2IDUzNy4zNzUgMjYuMjExNiA1MzcuMzQ4IDI1Ljk1OTZMNTM3LjMzOSAyNS44MjQ1TDUzNy4zMyAyNS42ODA1VjI1LjY0NDVMNTM3LjUxOSAyNS44ODc1QzUzOC4yNTcgMjYuODA1NyA1MzguNjYyIDI3Ljk3NTkgNTM4LjY2MiAyOS4xNTUxQzUzOC42NjIgMzAuMzM0MiA1MzguMjU3IDMxLjUxMzQgNTM3LjUxOSAzMi40MzE2VjMyLjQzMTZaIiBmaWxsPSJibGFjayIvPg0KPHBhdGggZD0iTTU1NC4yNzYgMjkuMDIwMkM1NTQuMjMxIDI5LjAwMjIgNTU0LjE3NyAyOC45ODQyIDU1NC4xNzcgMjguOTMwMkM1NTQuMTc3IDI4Ljg5NDIgNTU0LjE5NSAyOC44NjcyIDU1NC4yMzEgMjguODQ5MkM1NTQuMjk0IDI4LjgyMjIgNTU1Ljg1MSAyOC4yNjQxIDU1NS44NTEgMjYuNDI3OEM1NTUuODUxIDI0LjM4NDUgNTU0LjQ3NCAyMy4xNjkzIDU1Mi4xNTIgMjMuMTY5M0g1NDYuNTI2VjM1LjE3NzJINTUyLjY2NUM1NTQuNDU2IDM1LjE3NzIgNTU2LjM4MiAzMy45MDggNTU2LjM4MiAzMS44NjQ2QzU1Ni4zODIgMjkuOTExMyA1NTQuOTA2IDI5LjIyNzIgNTU0LjI3NiAyOS4wMjAyVjI5LjAyMDJaTTU0OS4zNjEgMjUuNjI2N0M1NDkuMzYxIDI1LjU4MTcgNTQ5LjM5NyAyNS41NDU2IDU0OS40NDIgMjUuNTQ1Nkg1NTEuNjc1QzU1Mi40MTMgMjUuNTQ1NiA1NTIuOTE3IDI2LjA0MDcgNTUyLjkxNyAyNi43Nzg4QzU1Mi45MTcgMjcuMzU0OSA1NTIuNDY3IDI3Ljk3NiA1NTEuNjIxIDI3Ljk3Nkg1NDkuNDQyQzU0OS4zOTcgMjcuOTc2IDU0OS4zNjEgMjcuOTQgNTQ5LjM2MSAyNy44OTVWMjUuNjI2N1pNNTUxLjY3NSAzMi44MDk4SDU0OS40NDJDNTQ5LjM5NyAzMi44MDk4IDU0OS4zNjEgMzIuNzczOCA1NDkuMzYxIDMyLjcyODhWMzAuMzM0NEM1NDkuMzYxIDMwLjI4OTQgNTQ5LjM5NyAzMC4yNTM0IDU0OS40NDIgMzAuMjUzNEg1NTEuNjIxQzU1Mi42OTIgMzAuMjUzNCA1NTMuMzA0IDMwLjcxMjUgNTUzLjMwNCAzMS41MjI2QzU1My4zMDQgMzIuMzU5NyA1NTIuNzM3IDMyLjgwOTggNTUxLjY3NSAzMi44MDk4VjMyLjgwOThaTTU3NS4zODQgMjcuOTQ5TDU3NC45NTIgMjcuODU5QzU3My45OCAyNy42NTIgNTczLjAzNSAyNy4zOTA5IDU3My4wMzUgMjYuNTUzOEM1NzMuMDM1IDI1LjcxNjcgNTczLjgxOCAyNS4zMzg2IDU3NC41OTIgMjUuMzM4NkM1NzUuNTAxIDI1LjMzODYgNTc2LjQwMSAyNS43NDM3IDU3Ny4wODYgMjYuNDQ1OEw1NzguODY4IDI0LjY4MTVDNTc4LjEwMyAyMy44MzU0IDU3Ni43NDQgMjIuODYzMiA1NzQuNTQ3IDIyLjg2MzJDNTcxLjkwMSAyMi44NjMyIDU3MC4xMTggMjQuMzY2NSA1NzAuMTE4IDI2LjYwNzhDNTcwLjExOCAyOC45NzUyIDU3MS45ODIgMjkuODY2MyA1NzMuNTQ4IDMwLjE5OTRMNTczLjk3MSAzMC4yODk0QzU3NS40OTIgMzAuNjEzNSA1NzYuMjEyIDMwLjg1NjUgNTc2LjIxMiAzMS43MjA2QzU3Ni4yMTIgMzIuNDk0NyA1NzUuNTE5IDMzLjAwNzggNTc0LjQ5MyAzMy4wMDc4QzU3My4yODcgMzMuMDA3OCA1NzIuMjE2IDMyLjQ3NjcgNTcxLjQwNiAzMS40Nzc2TDU2OS41NzggMzMuMjY4OUM1NzAuNTUxIDM0LjQyMTEgNTcxLjgzOCAzNS40NjUyIDU3NC41MjkgMzUuNDY1MkM1NzYuODI1IDM1LjQ2NTIgNTc5LjE1NiAzNC4xMzMgNTc5LjE1NiAzMS41NzY2QzU3OS4xNDcgMjguOTU3MiA1NzcuMzY1IDI4LjM2MzEgNTc1LjM4NCAyNy45NDlWMjcuOTQ5Wk01OTkuMTAzIDIzLjE2OTNWMjcuNTYyQzU5OS4xMDMgMjcuNjA3IDU5OS4wNjcgMjcuNjQzIDU5OS4wMjIgMjcuNjQzSDU5NS4zMzFDNTk1LjI4NiAyNy42NDMgNTk1LjI1IDI3LjYwNyA1OTUuMjUgMjcuNTYyVjIzLjE2OTNINTkyLjIyNlYzNS4xNzcySDU5NS4yNVYzMC40NjA0QzU5NS4yNSAzMC40MTU0IDU5NS4yODYgMzAuMzc5NCA1OTUuMzMxIDMwLjM3OTRINTk5LjAyMkM1OTkuMDY3IDMwLjM3OTQgNTk5LjEwMyAzMC40MTU0IDU5OS4xMDMgMzAuNDYwNFYzNS4xNzcySDYwMi4xNDZWMjMuMTY5M0g1OTkuMTAzWk01ODYuMTQxIDMyLjcxOThDNTg0Ljc4MiAzMi43MTk4IDU4My4zMTUgMzEuNTg1NiA1ODMuMzE1IDI5LjA5MjJDNTgzLjMxNSAyNi44MTQ4IDU4NC42OTIgMjUuNjI2NyA1ODYuMDUxIDI1LjYyNjdDNTg3LjA0MSAyNS42MjY3IDU4Ny43MzQgMjYuMDQwNyA1ODguMjgzIDI2Ljk1ODlMNTkwLjYwNiAyNS40MTk2QzU4OS40MTggMjMuNjczMyA1ODguMDA0IDIyLjg4MTIgNTg2LjAzMyAyMi44ODEyQzU4Mi4xNzEgMjIuODgxMiA1ODAuNDQzIDI2LjAwNDcgNTgwLjQ0MyAyOS4wOTIyQzU4MC40NDMgMzIuODQ1OCA1ODIuNzI5IDM1LjQ2NTIgNTg1Ljk5NyAzNS40NjUyQzU4OC40MjcgMzUuNDY1MiA1ODkuNTM1IDM0LjU3NDEgNTkwLjY5NiAzMi45MjY4TDU4OC4zNTUgMzEuMzUxNkM1ODcuODMzIDMyLjE5NzcgNTg3LjI2NiAzMi43MTk4IDU4Ni4xNDEgMzIuNzE5OFpNNTYzLjE3OCAyMi44NjMyQzU1OS44NzUgMjIuODYzMiA1NTcuNjYxIDI1LjM5MjYgNTU3LjY2MSAyOS4xNjQyQzU1Ny42NjEgMzIuOTM1OCA1NTkuODc1IDM1LjQ2NTIgNTYzLjE3OCAzNS40NjUyQzU2Ni40ODIgMzUuNDY1MiA1NjguNjk2IDMyLjkzNTggNTY4LjY5NiAyOS4xNjQyQzU2OC42OTYgMjUuMzkyNiA1NjYuNDgyIDIyLjg2MzIgNTYzLjE3OCAyMi44NjMyVjIyLjg2MzJaTTU2My4xNzggMzIuNzE5OEM1NjEuNTU4IDMyLjcxOTggNTYwLjUxNCAzMS4zMjQ2IDU2MC41MTQgMjkuMTY0MkM1NjAuNTE0IDI3LjAxMjkgNTYxLjU1OCAyNS42MjY3IDU2My4xNzggMjUuNjI2N0M1NjQuODA4IDI1LjYyNjcgNTY1Ljg2MSAyNy4wMTI5IDU2NS44NjEgMjkuMTY0MkM1NjUuODYxIDMxLjMyNDYgNTY0LjgwOCAzMi43MTk4IDU2My4xNzggMzIuNzE5OFoiIGZpbGw9IiNGODAwMDAiLz4NCjwvZz4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTQ2LjM0NCAyMi4xODExQzE0Ny41OTUgMjIuMjg1NCAxNDguODQ1IDIxLjU1NTMgMTQ5LjYyNyAyMC42Mjk4QzE1MC4zOTUgMTkuNjc4MSAxNTAuOTAzIDE4LjQwMDUgMTUwLjc3MyAxNy4wOTY5QzE0OS42NjYgMTcuMTQ5MSAxNDguMjk4IDE3LjgyNjkgMTQ3LjUxNyAxOC43Nzg2QzE0Ni44IDE5LjU5OTkgMTQ2LjE4OCAyMC45Mjk2IDE0Ni4zNDQgMjIuMTgxMVpNMTQ3Ljg0MSAyMy4wNzk3QzE0OC42NTMgMjIuNzYwNiAxNDkuNjU4IDIyLjM2NTYgMTUwLjc2IDIyLjQyOTFDMTUxLjQ2MyAyMi40ODEyIDE1My40OTUgMjIuNjg5OCAxNTQuNzk4IDI0LjYxOTJDMTU0Ljc5MiAyNC42MjM3IDE1NC43NzggMjQuNjMyMyAxNTQuNzU5IDI0LjY0NUMxNTQuNDM2IDI0Ljg1NDggMTUyLjM5IDI2LjE4NzEgMTUyLjQxNCAyOC44MTY5QzE1Mi40MzkgMzEuOTQ5OSAxNTQuOTg4IDMzLjExODMgMTU1LjMyMiAzMy4yNzExQzE1NS4zNDQgMzMuMjgxMSAxNTUuMzU2IDMzLjI4NjcgMTU1LjM1OCAzMy4yODgzQzE1NS4zNTYgMzMuMjkyNiAxNTUuMzU0IDMzLjMwMSAxNTUuMzUgMzMuMzEzM0MxNTUuMjgzIDMzLjUyODggMTU0Ljg0NSAzNC45NDg5IDE1My44NDcgMzYuNDA0QzE1Mi45MjIgMzcuNzU5OCAxNTEuOTcxIDM5LjA4OTUgMTUwLjQ2IDM5LjExNTZDMTQ5Ljc0OSAzOS4xMjgzIDE0OS4yNyAzOC45MjExIDE0OC43NzIgMzguNzA1NEMxNDguMjQ3IDM4LjQ3ODUgMTQ3LjcwMSAzOC4yNDIyIDE0Ni44NCAzOC4yNDIyQzE0NS45NDcgMzguMjQyMiAxNDUuMzc2IDM4LjQ4NDggMTQ0LjgyNiAzOC43MTg0QzE0NC4zNDggMzguOTIxNCAxNDMuODg3IDM5LjExNzQgMTQzLjI0NSAzOS4xNDE3QzE0MS43ODYgMzkuMTkzOCAxNDAuNjc5IDM3LjcwNzcgMTM5Ljc1NCAzNi4zNTE5QzEzNy44NjYgMzMuNjE0MyAxMzYuNDIgMjguNjM0NCAxMzguMzc0IDI1LjI3MUMxMzkuMzI1IDIzLjU4OTMgMTQxLjA1NyAyMi41MzM0IDE0Mi45MTkgMjIuNTA3M0MxNDMuNzMyIDIyLjQ5MjUgMTQ0LjUwNyAyMi44MDA2IDE0NS4xODQgMjMuMDcwMUMxNDUuNzAyIDIzLjI3NTggMTQ2LjE2MiAyMy40NTg5IDE0Ni41NCAyMy40NTg5QzE0Ni44NzcgMjMuNDU4OSAxNDcuMzE5IDIzLjI4NTEgMTQ3Ljg0MSAyMy4wNzk3WiIgZmlsbD0iYmxhY2siLz4NCjxwYXRoIGQ9Ik0zNi44NTg3IDM3LjUyNDFIMzEuOTg3NEwzNS4wMzQyIDE5LjY2NjhIMzkuOTA1MkwzNi44NTg3IDM3LjUyNDFaIiBmaWxsPSIjMDA1NzlGIi8+DQo8cGF0aCBkPSJNNTQuNTE1NyAyMC4xMDQxQzUzLjU1NDkgMTkuNzQyOCA1Mi4wMzA5IDE5LjM0MzggNTAuMTQ2NiAxOS4zNDM4QzQ1LjMzNjEgMTkuMzQzOCA0MS45NDg2IDIxLjc3NTMgNDEuOTI3OCAyNS4yNTE2QzQxLjg4NzggMjcuODE2NSA0NC4zNTMxIDI5LjI0MSA0Ni4xOTcgMzAuMDk2MkM0OC4wODE2IDMwLjk3MDEgNDguNzIyMyAzMS41NDA1IDQ4LjcyMjMgMzIuMzE5NEM0OC43MDMxIDMzLjUxNTcgNDcuMTk5NCAzNC4wNjcyIDQ1Ljc5NjkgMzQuMDY3MkM0My44NTIxIDM0LjA2NzIgNDIuODEgMzMuNzgyOSA0MS4yMjY0IDMzLjExNzNMNDAuNTg1IDMyLjgzMkwzOS45MDMzIDM2Ljg0MDZDNDEuMDQ1OCAzNy4zMzM5IDQzLjE1MDcgMzcuNzcxNyA0NS4zMzYxIDM3Ljc5MDlDNTAuNDQ3MyAzNy43OTA5IDUzLjc3NDkgMzUuMzk3MSA1My44MTQzIDMxLjY5MjVDNTMuODMzOCAyOS42NTk3IDUyLjUzMiAyOC4xMDIgNDkuNzI1NCAyNi44MjkyQzQ4LjAyMTcgMjYuMDEyMSA0Ni45NzgzIDI1LjQ2MTIgNDYuOTc4MyAyNC42MjUyQzQ2Ljk5ODMgMjMuODY1MiA0Ny44NjA4IDIzLjA4NjggNDkuNzg0IDIzLjA4NjhDNTEuMzY3NyAyMy4wNDg2IDUyLjUzMTIgMjMuNDA5NCA1My40MTI2IDIzLjc3MDVMNTMuODUzMiAyMy45NjAxTDU0LjUxNTcgMjAuMTA0MVoiIGZpbGw9IiMwMDU3OUYiLz4NCjxwYXRoIGQ9Ik02MC45OTI0IDMxLjE5NzlDNjEuMzkzNiAzMC4xNzIgNjIuOTM3MiAyNi4yMDE2IDYyLjkzNzIgMjYuMjAxNkM2Mi45MTcgMjYuMjM5NyA2My4zMzc2IDI1LjE1NjggNjMuNTc4MSAyNC40OTE5TDYzLjkxODYgMjYuMDMwNkM2My45MTg2IDI2LjAzMDYgNjQuODQxIDMwLjMwNTEgNjUuMDQxNCAzMS4xOTc5QzY0LjI4IDMxLjE5NzkgNjEuOTU0NiAzMS4xOTc5IDYwLjk5MjQgMzEuMTk3OVpNNjcuMDA1NCAxOS42NjY4SDYzLjIzNzRDNjIuMDc1NSAxOS42NjY4IDYxLjE5MjcgMTkuOTg5NSA2MC42OTE0IDIxLjE0ODRMNTMuNDU1OCAzNy41MjM5SDU4LjU2NzFDNTguNTY3MSAzNy41MjM5IDU5LjQwODUgMzUuMzE5OSA1OS41ODk0IDM0Ljg0NTJDNjAuMTUwMSAzNC44NDUyIDY1LjEyMjMgMzQuODQ1MiA2NS44NDM3IDM0Ljg0NTJDNjUuOTgzNSAzNS40NzIxIDY2LjQyNDkgMzcuNTIzOSA2Ni40MjQ5IDM3LjUyMzlINzAuOTM1Mkw2Ny4wMDU0IDE5LjY2NjhWMTkuNjY2OFoiIGZpbGw9IiMwMDU3OUYiLz4NCjxwYXRoIGQ9Ik0yNy45MTggMTkuNjY2OEwyMy4xNDc1IDMxLjg0MzhMMjIuNjI2MiAyOS4zNzQxQzIxLjc0NDIgMjYuNTI0NSAxOC45NzgxIDIzLjQyODQgMTUuODkxNCAyMS44ODlMMjAuMjYxIDM3LjUwNTJIMjUuNDEyMkwzMy4wNjkgMTkuNjY2OEgyNy45MThWMTkuNjY2OFoiIGZpbGw9IiMwMDU3OUYiLz4NCjxwYXRoIGQ9Ik0xOC43MTg0IDE5LjY2NjhIMTAuODgxMUwxMC44MDA5IDIwLjAyNzZDMTYuOTE0NSAyMS41MDk1IDIwLjk2MzUgMjUuMDgxNSAyMi42MjcgMjkuMzc0OUwyMC45MjMyIDIxLjE2NzlDMjAuNjQyNyAyMC4wMjc0IDE5Ljc4MDcgMTkuNzA0NCAxOC43MTg0IDE5LjY2NjhaIiBmaWxsPSIjRkFBNjFBIi8+DQo8ZyBjbGlwLXBhdGg9InVybCgjY2xpcDJfNThfMTExKSI+DQo8cGF0aCBkPSJNMjIxLjE1OCAxNy40OTlWMTguOTM1NkgyMzEuMzA2VjE3LjQ5OUgyMjEuMTU4Wk0yMzIuNzQ0IDE3LjQ5OVYxOC45MzU2SDI0Ny4yMDZDMjQ3LjIwNiAxOC45MzU2IDI0NS43MjkgMTcuNDk5IDI0My43NzMgMTcuNDk5SDIzMi43NDRaTTI1MC4wNDMgMTcuNDk5VjE4LjkzNTZIMjU4Ljc5M0wyNTguMjczIDE3LjQ5OUgyNTAuMDQzWk0yNjUuMDY1IDE3LjQ5OUwyNjQuNTQ2IDE4LjkzNTZIMjczLjIxNlYxNy40OTlIMjY1LjA2NVpNMjIxLjE1OCAyMC4yOTI5VjIxLjcyOTZIMjMxLjMwNlYyMC4yOTI5SDIyMS4xNThaTTIzMi43NDQgMjAuMjk1VjIxLjcyOTdIMjQ4Ljg4NEMyNDguODg0IDIxLjcyOTcgMjQ4LjY5NiAyMC42MjM5IDI0OC4zNjcgMjAuMjk1SDIzMi43NDRaTTI1MC4wNDMgMjAuMjk1VjIxLjcyOTdIMjU5Ljc1MkwyNTkuMjcxIDIwLjI5NUgyNTAuMDQzWk0yNjQuMDI3IDIwLjI5NUwyNjMuNTQ2IDIxLjcyOTdIMjczLjIxNlYyMC4yOTVIMjY0LjAyN1YyMC4yOTVaTTIyNC4wNzQgMjMuMDg2OVYyNC41MjU3SDIyOC40NjlWMjMuMDg2OUgyMjQuMDc0VjIzLjA4NjlaTTIzNS42NjEgMjMuMDg2OVYyNC41MjU3SDI0MC4wNTZWMjMuMDg2OUgyMzUuNjYxVjIzLjA4NjlaTTI0NC4zMzEgMjMuMDg2OVYyNC41MjU3SDI0OC43MjZDMjQ4LjcyNiAyNC41MjU3IDI0OS4wMDUgMjMuNzY1OSAyNDkuMDA1IDIzLjA4NjlIMjQ0LjMzMVYyMy4wODY5Wk0yNTIuOTYgMjMuMDg2OVYyNC41MjU3SDI2MC43NTJMMjYwLjIzMiAyMy4wODY5SDI1Mi45NlYyMy4wODY5Wk0yNjMuMDY5IDIzLjA4NjlMMjYyLjU0OCAyNC41MjU3SDI3MC4zNzlWMjMuMDg2OUgyNjMuMDY5VjIzLjA4NjlaTTIyNC4wNzQgMjUuODgzVjI3LjMxOTdIMjI4LjQ2OVYyNS44ODNIMjI0LjA3NFYyNS44ODNaTTIzNS42NjEgMjUuODgzVjI3LjMxOTdIMjQ2Ljg4N0MyNDYuODg3IDI3LjMxOTcgMjQ3LjgyNiAyNi41ODI1IDI0OC4xMjUgMjUuODgzSDIzNS42NjFaTTI1Mi45NiAyNS44ODNWMjcuMzE5N0gyNTcuMzU1VjI2LjUyTDI1Ny42MzQgMjcuMzE5N0gyNjUuNjg0TDI2NS45ODQgMjYuNTJWMjcuMzE5N0gyNzAuMzc5VjI1Ljg4M0gyNjIuMTI5TDI2MS42OTEgMjcuMDk5OUwyNjEuMjUxIDI1Ljg4M0gyNTIuOTZaTTIyNC4wNzQgMjguNjc3VjMwLjExMzdIMjI4LjQ2OVYyOC42NzdIMjI0LjA3NFpNMjM1LjY2MSAyOC42NzdWMzAuMTEzN0gyNDguMTI1QzI0Ny44MjYgMjkuNDE2NSAyNDYuODg3IDI4LjY3NyAyNDYuODg3IDI4LjY3N0gyMzUuNjYxWk0yNTIuOTYgMjguNjc3VjMwLjExMzdIMjU3LjM1NVYyOC42NzdIMjUyLjk2Wk0yNTguMTUzIDI4LjY3N0wyNTguNjg1IDMwLjExMzdIMjY0LjcyMUwyNjUuMjI2IDI4LjY3N0gyNTguMTUzWk0yNjUuOTg0IDI4LjY3N1YzMC4xMTM3SDI3MC4zNzlWMjguNjc3SDI2NS45ODRaTTIyNC4wNzQgMzEuNDcxVjMyLjkwNzZIMjI4LjQ2OVYzMS40NzFIMjI0LjA3NFpNMjM1LjY2MSAzMS40NzFWMzIuOTA3NkgyNDAuMDU2VjMxLjQ3MUgyMzUuNjYxWk0yNDQuMzMxIDMxLjQ3MVYzMi45MDc2SDI0OS4wMDVDMjQ5LjAwNSAzMi4yMjk2IDI0OC43MjYgMzEuNDcxIDI0OC43MjYgMzEuNDcxSDI0NC4zMzFWMzEuNDcxWk0yNTIuOTYgMzEuNDcxVjMyLjkwNzZIMjU3LjM1NVYzMS40NzFIMjUyLjk2Wk0yNTkuMTUxIDMxLjQ3MUwyNTkuNjY2IDMyLjkwNzZIMjYzLjcxM0wyNjQuMjMyIDMxLjQ3MUgyNTkuMTUxWk0yNjUuOTg0IDMxLjQ3MVYzMi45MDc2SDI3MC4zNzlWMzEuNDcxSDI2NS45ODRaTTIyMS4yMzcgMzQuMjY1VjM1LjcwMzdIMjMxLjM4NlYzNC4yNjVIMjIxLjIzN1pNMjMyLjc0NCAzNC4yNjVWMzUuNzAzN0gyNDguMzY3QzI0OC42OTYgMzUuMzc0MyAyNDguODg0IDM0LjI2NSAyNDguODg0IDM0LjI2NUgyMzIuNzQ0VjM0LjI2NVpNMjUwLjEyMyAzNC4yNjVWMzUuNzAzN0gyNTcuMzU1VjM0LjI2NUgyNTAuMTIzWk0yNjAuMTUxIDM0LjI2NUwyNjAuNjggMzUuNzAzN0gyNjIuNzM5TDI2My4yMzYgMzQuMjY1SDI2MC4xNTFaTTI2NS45ODQgMzQuMjY1VjM1LjcwMzdIMjczLjI5NVYzNC4yNjVIMjY1Ljk4NFpNMjIxLjIzNyAzNy4wNjFWMzguNDk3N0gyMzEuMzg2VjM3LjA2MUgyMjEuMjM3Wk0yMzIuNzQ0IDM3LjA2MVYzOC40OTU2SDI0My43NzNDMjQ1LjcyOSAzOC40OTU2IDI0Ny4yMDYgMzcuMDYxIDI0Ny4yMDYgMzcuMDYxSDIzMi43NDRaTTI1MC4xMjMgMzcuMDYxVjM4LjQ5NzdIMjU3LjM1NVYzNy4wNjFIMjUwLjEyM1pNMjYxLjE1NSAzNy4wNjFMMjYxLjY2NCAzOC40OTM2TDI2MS43NTIgMzguNDk1NkwyNjIuMjY5IDM3LjA2MUgyNjEuMTU1VjM3LjA2MVpNMjY1Ljk4NCAzNy4wNjFWMzguNDk3N0gyNzMuMjk1VjM3LjA2MUgyNjUuOTg0WiIgZmlsbD0iIzFGNzBDMSIvPg0KPC9nPg0KPGRlZnM+DQo8Y2xpcFBhdGggaWQ9ImNsaXAwXzU4XzExMSI+DQo8cmVjdCB3aWR0aD0iNDQuNDQ3MyIgaGVpZ2h0PSIyOS42MzE1IiBmaWxsPSJ3aGl0ZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNzUzLjk1NSAxNC44MTU1KSIvPg0KPC9jbGlwUGF0aD4NCjxjbGlwUGF0aCBpZD0iY2xpcDFfNThfMTExIj4NCjxyZWN0IHdpZHRoPSI3Ni41NDgxIiBoZWlnaHQ9IjE2LjM1MDciIGZpbGw9IndoaXRlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MjUuNTk5IDIwLjk4ODkpIi8+DQo8L2NsaXBQYXRoPg0KPGNsaXBQYXRoIGlkPSJjbGlwMl81OF8xMTEiPg0KPHJlY3Qgd2lkdGg9IjUyLjEzNzIiIGhlaWdodD0iMjAuOTk4NyIgZmlsbD0id2hpdGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIyMS4xNTggMTcuNDk5KSIvPg0KPC9jbGlwUGF0aD4NCjwvZGVmcz4NCjwvc3ZnPg0K" style="\n width: 742.5px;\n position: relative;\n top: 107px;\n left: 32px;\n ">\n <a href='+mt+' style="\n float: left;\n border-radius: 56px;\n background: #0D6EFD;\n padding-top: 8px;\n width: 280px;\n height: 38px;\n text-align: center;\n position: relative;\n top: 127px;\n left: 274px;\n font-size: 16px;\n color: white;\n text-decoration: none;\n letter-spacing: 0.02em;\n ">Claim your FREE account</a>\n <div style="\n font-size: 14px;\n position: relative;\n top: 180px;\n left: 19px;\n letter-spacing: 0.02em;\n font-weight: 500;\n line-height: 125%;\n">have a Syncfusion<sup>®</sup> account? <a href="https://www.syncfusion.com/account/login?ReturnUrl=/account/login" style="text-decoration: none;\ncolor: #0D6EFD;\nfont-weight: 500;">Sign In</a></div>\n </div>\n </div>';if("undefined"!=typeof document&&!g(document)){var t=_("div",{innerHTML:e});document.body.appendChild(t)}}(),Lt=!0),this.render(),this.mount?this.accessMount():this.trigger("created")}},t.prototype.renderComplete=function(e){this.isRendered=!0},t.prototype.dataBind=function(){this.injectModules(),e.prototype.dataBind.call(this)},t.prototype.on=function(e,t,i){if("string"==typeof e)this.localObserver.on(e,t,i);else for(var n=0,o=e;n<o.length;n++){var r=o[n];this.localObserver.on(r.event,r.handler,r.context)}},t.prototype.off=function(e,t){if("string"==typeof e)this.localObserver.off(e,t);else for(var i=0,n=e;i<n.length;i++){var o=n[i];this.localObserver.off(o.event,o.handler)}},t.prototype.notify=function(e,t){!0!==this.isDestroyed&&this.localObserver.notify(e,t)},t.prototype.getInjectedModules=function(){return this.injectedModules},t.Inject=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.prototype.injectedModules||(this.prototype.injectedModules=[]);for(var i=0;i<e.length;i++)-1===this.prototype.injectedModules.indexOf(e[parseInt(i.toString(),10)])&&this.prototype.injectedModules.push(e[parseInt(i.toString(),10)])},t.prototype.createElement=function(e,t,i){return _(e,t)},t.prototype.triggerStateChange=function(e,t){this.isReactHybrid&&(this.setState(),this.currentContext={calls:e,args:t})},t.prototype.injectModules=function(){this.injectedModules&&this.injectedModules.length&&this.moduleLoader.inject(this.requiredModules(),this.injectedModules)},t.prototype.detectFunction=function(e){var t=Object.keys(e);t.length&&(this[t[0]]=e[t[0]])},t.prototype.mergePersistData=function(){var e;g(e=window.localStorage.getItem(this.getModuleName()+this.element.id))||""===e||this.setProperties(JSON.parse(e),!0)},t.prototype.setPersistData=function(){this.isDestroyed||window.localStorage.setItem(this.getModuleName()+this.element.id,this.getPersistData())},t.prototype.renderReactTemplates=function(e){g(e)||e()},t.prototype.clearTemplate=function(e,t){},t.prototype.getUniqueID=function(e){return this.isHistoryChanged()&&(Ct=0),bt=this.pageID(location.href),Et=history.length,e+"_"+bt+"_"+Ct++},t.prototype.pageID=function(e){var t=0;if(0===e.length)return t;for(var i=0;i<e.length;i++){t=(t<<5)-t+e.charCodeAt(i),t|=0}return Math.abs(t)},t.prototype.isHistoryChanged=function(){return bt!==this.pageID(location.href)||Et!==history.length},t.prototype.addOnPersist=function(e){for(var t=this,i={},n=0,o=e;n<o.length;n++){var r=o[n],s=a(r,this);f(s)||l(r,this.getActualProperties(s),i)}return JSON.stringify(i,(function(e,i){return t.getActualProperties(i)}))},t.prototype.getActualProperties=function(e){return e instanceof Qe?a("properties",e):e},t.prototype.ignoreOnPersist=function(e){return JSON.stringify(this.iterateJsonProperties(this.properties,e))},t.prototype.iterateJsonProperties=function(e,t){for(var i={},n=function(n){if(-1===t.indexOf(n)){var r=e[""+n];if("object"!=typeof r||r instanceof Array)i[""+n]=r;else{var s=t.filter((function(e){return new RegExp(n+".").test(e)})).map((function(e){return e.replace(n+".","")}));i[""+n]=o.iterateJsonProperties(o.getActualProperties(r),s)}}},o=this,r=0,s=Object.keys(e);r<s.length;r++){n(s[r])}return i},Nt([De(!1)],t.prototype,"enablePersistence",void 0),Nt([De()],t.prototype,"enableRtl",void 0),Nt([De()],t.prototype,"locale",void 0),t=Nt([Ie],t)}(pe);"undefined"!=typeof window&&window.addEventListener("popstate",(function(){Ct=0}));var It=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},xt={left:0,top:0,bottom:0,right:0},jt={isDragged:!1},Ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return It(t,e),wt([De(0)],t.prototype,"left",void 0),wt([De(0)],t.prototype,"top",void 0),t}(Qe),zt=function(e){function t(t,n){var o=e.call(this,n,t)||this;return o.dragLimit=i.getDefaultPosition(),o.borderWidth=i.getDefaultPosition(),o.padding=i.getDefaultPosition(),o.diffX=0,o.prevLeft=0,o.prevTop=0,o.dragProcessStarted=!1,o.eleTop=0,o.tapHoldTimer=0,o.externalInitialize=!1,o.diffY=0,o.parentScrollX=0,o.parentScrollY=0,o.droppables={},o.bind(),o}var i;return It(t,e),i=t,t.prototype.bind=function(){this.toggleEvents(),Q.isIE&&G([this.element],"e-block-touch"),this.droppables[this.scope]={}},t.getDefaultPosition=function(){return m({},xt)},t.prototype.toggleEvents=function(e){var t;f(this.handle)||(t=ne(this.handle,this.element));var i=this.enableTapHold&&Q.isDevice&&Q.isTouch?this.mobileInitialize:this.initialize;e?q.remove(t||this.element,Q.isSafari()?"touchstart":Q.touchStartEvent,i):q.add(t||this.element,Q.isSafari()?"touchstart":Q.touchStartEvent,i,this)},t.prototype.mobileInitialize=function(e){var t=this,i=e.currentTarget;this.tapHoldTimer=setTimeout((function(){t.externalInitialize=!0,t.removeTapholdTimer(),t.initialize(e,i)}),this.tapHoldThreshold),q.add(document,Q.isSafari()?"touchmove":Q.touchMoveEvent,this.removeTapholdTimer,this),q.add(document,Q.isSafari()?"touchend":Q.touchEndEvent,this.removeTapholdTimer,this)},t.prototype.removeTapholdTimer=function(){clearTimeout(this.tapHoldTimer),q.remove(document,Q.isSafari()?"touchmove":Q.touchMoveEvent,this.removeTapholdTimer),q.remove(document,Q.isSafari()?"touchend":Q.touchEndEvent,this.removeTapholdTimer)},t.prototype.getScrollableParent=function(e,t){return g(e)?null:e[{vertical:"scrollHeight",horizontal:"scrollWidth"}[""+t]]>e[{vertical:"clientHeight",horizontal:"clientWidth"}[""+t]]&&("vertical"===t?e.scrollTop>0:e.scrollLeft>0)?("vertical"===t?(this.parentScrollY=this.parentScrollY+(0===this.parentScrollY?e.scrollTop:e.scrollTop-this.parentScrollY),this.tempScrollHeight=e.scrollHeight):(this.parentScrollX=this.parentScrollX+(0===this.parentScrollX?e.scrollLeft:e.scrollLeft-this.parentScrollX),this.tempScrollWidth=e.scrollWidth),g(e)?e:this.getScrollableParent(e.parentNode,t)):this.getScrollableParent(e.parentNode,t)},t.prototype.getScrollableValues=function(){this.parentScrollX=0,this.parentScrollY=0,this.element.classList.contains("e-dialog")&&this.element.classList.contains("e-dlg-modal"),this.getScrollableParent(this.element.parentNode,"vertical"),this.getScrollableParent(this.element.parentNode,"horizontal")},t.prototype.initialize=function(e,t){if(this.currentStateTarget=e.target,!this.isDragStarted()){if(this.isDragStarted(!0),this.externalInitialize=!1,this.target=e.currentTarget||t,this.dragProcessStarted=!1,this.abort){var i=this.abort;"string"==typeof i&&(i=[i]);for(var n=0;n<i.length;n++)if(!g(se(e.target,i[parseInt(n.toString(),10)])))return void(this.isDragStarted()&&this.isDragStarted(!0))}this.preventDefault&&!f(e.changedTouches)&&"touchstart"!==e.type&&e.preventDefault(),this.element.setAttribute("aria-grabbed","true");var o=this.getCoordinates(e);if(this.initialPosition={x:o.pageX,y:o.pageY},!this.clone){var r=this.element.getBoundingClientRect();this.getScrollableValues(),e.clientX===e.pageX&&(this.parentScrollX=0),e.clientY===e.pageY&&(this.parentScrollY=0),this.relativeXPosition=o.pageX-(r.left+this.parentScrollX),this.relativeYPosition=o.pageY-(r.top+this.parentScrollY)}this.externalInitialize?this.intDragStart(e):(q.add(document,Q.isSafari()?"touchmove":Q.touchMoveEvent,this.intDragStart,this),q.add(document,Q.isSafari()?"touchend":Q.touchEndEvent,this.intDestroy,this)),this.toggleEvents(!0),"touchstart"!==e.type&&this.isPreventSelect&&document.body.classList.add("e-prevent-select"),this.externalInitialize=!1,q.trigger(document.documentElement,Q.isSafari()?"touchstart":Q.touchStartEvent,e)}},t.prototype.intDragStart=function(e){this.removeTapholdTimer();var t=!f(e.changedTouches);if(!t||1===e.changedTouches.length){var i,n=this.getCoordinates(e),o=getComputedStyle(this.element);this.margin={left:parseInt(o.marginLeft,10),top:parseInt(o.marginTop,10),right:parseInt(o.marginRight,10),bottom:parseInt(o.marginBottom,10)};var r=this.element;if(this.clone&&this.dragTarget){var s=se(e.target,this.dragTarget);g(s)||(r=s)}this.isReplaceDragEle&&(r=this.currentStateCheck(e.target,r)),this.offset=this.calculateParentPosition(r),this.position=this.getMousePosition(e,this.isDragScroll);var a=this.initialPosition.x-n.pageX,l=this.initialPosition.y-n.pageY;if(Math.sqrt(a*a+l*l)>=this.distance||this.externalInitialize){var c=this.getHelperElement(e);if(!c||g(c))return;t&&e.preventDefault();var h=this.helperElement=c;if(this.parentClientRect=this.calculateParentPosition(h.offsetParent),this.dragStart){var d={event:e,element:r,target:this.getProperTargetElement(e),bindEvents:null,dragElement:h};this.trigger("dragStart",d)}this.dragArea?this.setDragArea():(this.dragLimit={left:0,right:0,bottom:0,top:0},this.borderWidth={top:0,left:0}),i={left:this.position.left-this.parentClientRect.left,top:this.position.top-this.parentClientRect.top},this.clone&&!this.enableTailMode&&(this.diffX=this.position.left-this.offset.left,this.diffY=this.position.top-this.offset.top),this.getScrollableValues();var p=getComputedStyle(r),u=parseFloat(p.marginTop);this.clone&&0!==u&&(i.top+=u),this.eleTop=isNaN(parseFloat(p.top))?0:parseFloat(p.top)-this.offset.top,this.enableScrollHandler&&!this.clone&&(i.top-=this.parentScrollY,i.left-=this.parentScrollX);var m=this.getProcessedPositionValue({top:i.top-this.diffY+"px",left:i.left-this.diffX+"px"});this.dragArea&&"string"!=typeof this.dragArea&&this.dragArea.classList.contains("e-kanban-content")&&"relative"===this.dragArea.style.position&&(i.top+=this.dragArea.scrollTop),this.dragElePosition={top:i.top,left:i.left},ae(h,this.getDragPosition({position:"absolute",left:m.left,top:m.top})),q.remove(document,Q.isSafari()?"touchmove":Q.touchMoveEvent,this.intDragStart),q.remove(document,Q.isSafari()?"touchend":Q.touchEndEvent,this.intDestroy),this.bindDragEvents(h)}}},t.prototype.bindDragEvents=function(e){Z(e)?(q.add(document,Q.isSafari()?"touchmove":Q.touchMoveEvent,this.intDrag,this),q.add(document,Q.isSafari()?"touchend":Q.touchEndEvent,this.intDragStop,this),this.setGlobalDroppables(!1,this.element,e)):(this.toggleEvents(),document.body.classList.remove("e-prevent-select"))},t.prototype.elementInViewport=function(e){for(this.top=e.offsetTop,this.left=e.offsetLeft,this.width=e.offsetWidth,this.height=e.offsetHeight;e.offsetParent;)e=e.offsetParent,this.top+=e.offsetTop,this.left+=e.offsetLeft;return this.top>=window.pageYOffset&&this.left>=window.pageXOffset&&this.top+this.height<=window.pageYOffset+window.innerHeight&&this.left+this.width<=window.pageXOffset+window.innerWidth},t.prototype.getProcessedPositionValue=function(e){return this.queryPositionInfo?this.queryPositionInfo(e):e},t.prototype.calculateParentPosition=function(e){if(g(e))return{left:0,top:0};var t=e.getBoundingClientRect(),i=getComputedStyle(e);return{left:t.left+window.pageXOffset-parseInt(i.marginLeft,10),top:t.top+window.pageYOffset-parseInt(i.marginTop,10)}},t.prototype.intDrag=function(e){if(f(e.changedTouches)||1===e.changedTouches.length){var t,i;this.clone&&e.changedTouches&&Q.isDevice&&Q.isTouch&&e.preventDefault(),this.position=this.getMousePosition(e,this.isDragScroll);var n=this.getDocumentWidthHeight("Height");n<this.position.top&&(this.position.top=n);var o=this.getDocumentWidthHeight("Width");if(o<this.position.left&&(this.position.left=o),this.drag){var r=this.getProperTargetElement(e);this.trigger("drag",{event:e,element:this.element,target:r})}var s=this.checkTargetElement(e);if(s.target&&s.instance){var a=!0;this.hoverObject&&(this.hoverObject.instance!==s.instance?this.triggerOutFunction(e,s):a=!1),a&&(s.instance.dragData[this.scope]=this.droppables[this.scope],s.instance.intOver(e,s.target),this.hoverObject=s)}else this.hoverObject&&this.triggerOutFunction(e,s);var l=this.droppables[this.scope].helper;this.parentClientRect=this.calculateParentPosition(this.helperElement.offsetParent);var c=this.parentClientRect.left,h=this.parentClientRect.top,d=this.getCoordinates(e),p=d.pageX,u=d.pageY,m=this.position.left-this.diffX,y=this.position.top-this.diffY,v=getComputedStyle(l);if(this.dragArea){if(this.enableAutoScroll&&this.setDragArea(),this.pageX!==p||this.skipDistanceCheck){var b=l.offsetWidth+(parseFloat(v.marginLeft)+parseFloat(v.marginRight));t=this.dragLimit.left>m&&m>0?this.dragLimit.left:this.dragLimit.right+window.pageXOffset<m+b&&m>0?m-(m-this.dragLimit.right)+window.pageXOffset-b:m<0?this.dragLimit.left:m}if(this.pageY!==u||this.skipDistanceCheck){var M=l.offsetHeight+(parseFloat(v.marginTop)+parseFloat(v.marginBottom));i=this.dragLimit.top>y&&y>0?this.dragLimit.top:this.dragLimit.bottom+window.pageYOffset<y+M&&y>0?y-(y-this.dragLimit.bottom)+window.pageYOffset-M:y<0?this.dragLimit.top:y}}else t=m,i=y;var N,C,E=h+this.borderWidth.top,D=c+this.borderWidth.left;if(this.dragProcessStarted&&(g(i)&&(i=this.prevTop),g(t)&&(t=this.prevLeft)),this.helperElement.classList.contains("e-treeview"))this.dragArea?(this.dragLimit.top=this.clone?this.dragLimit.top:0,N=i-E<0?this.dragLimit.top:i-this.borderWidth.top,C=t-D<0?this.dragLimit.left:t-this.borderWidth.left):(N=i-this.borderWidth.top,C=t-this.borderWidth.left);else if(this.dragArea){var T=this.helperElement.classList.contains("e-dialog");this.dragLimit.top=this.clone?this.dragLimit.top:0,N=i-E<0?this.dragLimit.top:i-E,C=t-D<0?T?t-(D-this.borderWidth.left):this.dragElePosition.left:t-D}else N=i-E,C=t-D;var L=parseFloat(getComputedStyle(this.element).marginTop);if(L>0&&(this.clone&&(N+=L,y<0&&(L+y>=0?N=L+y:N-=L),this.dragArea&&(N=this.dragLimit.bottom<N?this.dragLimit.bottom:N)),i-E<0))if(y+L+(l.offsetHeight-E)>=0){var S=this.dragLimit.top+y-E;S+L+E<0?N-=L+E:N=S}else N-=L+E;if(this.dragArea&&this.helperElement.classList.contains("e-treeview"))N=N+(M=l.offsetHeight+(parseFloat(v.marginTop)+parseFloat(v.marginBottom)))>this.dragLimit.bottom?this.dragLimit.bottom-M:N;this.enableScrollHandler&&!this.clone&&(N-=this.parentScrollY,C-=this.parentScrollX),this.dragArea&&"string"!=typeof this.dragArea&&this.dragArea.classList.contains("e-kanban-content")&&"relative"===this.dragArea.style.position&&(N+=this.dragArea.scrollTop);var I=this.getProcessedPositionValue({top:N+"px",left:C+"px"});this.isPreventScroll&&(I=this.getProcessedPositionValue({top:this.position.top-this.parentClientRect.top-2+"px",left:this.position.left-this.parentClientRect.left-2+"px"})),ae(l,this.getDragPosition(I)),this.elementInViewport(l)||!this.enableAutoScroll||this.helperElement.classList.contains("e-treeview")||this.helperElement.scrollIntoView();var w=document.querySelectorAll(":hover");if(this.enableAutoScroll&&this.helperElement.classList.contains("e-treeview")){0===w.length&&(w=this.getPathElements(e));var x=this.getScrollParent(w,!1);this.elementInViewport(this.helperElement)?this.getScrollPosition(x,N):this.elementInViewport(this.helperElement)||(0===(w=[].slice.call(document.querySelectorAll(":hover"))).length&&(w=this.getPathElements(e)),x=this.getScrollParent(w,!0),this.getScrollPosition(x,N))}this.dragProcessStarted=!0,this.prevLeft=t,this.prevTop=i,this.position.left=t,this.position.top=i,this.pageX=p,this.pageY=u}},t.prototype.getScrollParent=function(e,t){for(var i,n=t?e.reverse():e,o=n.length-1;o>=0;o--)if(("auto"===(i=window.getComputedStyle(n[parseInt(o.toString(),10)])["overflow-y"])||"scroll"===i)&&n[parseInt(o.toString(),10)].scrollHeight>n[parseInt(o.toString(),10)].clientHeight)return n[parseInt(o.toString(),10)];if("visible"===(i=window.getComputedStyle(document.scrollingElement)["overflow-y"]))return document.scrollingElement.style.overflow="auto",document.scrollingElement},t.prototype.getScrollPosition=function(e,t){if(e&&e===document.scrollingElement)e.clientHeight+document.scrollingElement.scrollTop-this.helperElement.clientHeight<t&&e.getBoundingClientRect().height+this.parentClientRect.top>t?e.scrollTop+=this.helperElement.clientHeight:e.scrollTop>t-this.helperElement.clientHeight&&(e.scrollTop-=this.helperElement.clientHeight);else if(e&&e!==document.scrollingElement){var i=document.scrollingElement.scrollTop,n=this.helperElement.clientHeight;e.clientHeight+e.getBoundingClientRect().top-n+i<t?e.scrollTop+=this.helperElement.clientHeight:e.getBoundingClientRect().top>t-n-i&&(e.scrollTop-=this.helperElement.clientHeight)}},t.prototype.getPathElements=function(e){var t=e.clientX>0?e.clientX:0,i=e.clientY>0?e.clientY:0;return document.elementsFromPoint(t,i)},t.prototype.triggerOutFunction=function(e,t){this.hoverObject.instance.intOut(e,t.target),this.hoverObject.instance.dragData[this.scope]=null,this.hoverObject=null},t.prototype.getDragPosition=function(e){var t=m({},e);return this.axis&&("x"===this.axis?delete t.top:"y"===this.axis&&delete t.left),t},t.prototype.getDocumentWidthHeight=function(e){var t=document.body,i=document.documentElement;return Math.max(t["scroll"+e],i["scroll"+e],t["offset"+e],i["offset"+e],i["client"+e])},t.prototype.intDragStop=function(e){if(this.dragProcessStarted=!1,f(e.changedTouches)||1===e.changedTouches.length){if(-1!==["touchend","pointerup","mouseup"].indexOf(e.type)){if(this.dragStop){var t=this.getProperTargetElement(e);this.trigger("dragStop",{event:e,element:this.element,target:t,helper:this.helperElement})}this.intDestroy(e)}else this.element.setAttribute("aria-grabbed","false");var i=this.checkTargetElement(e);i.target&&i.instance&&(i.instance.dragStopCalled=!0,i.instance.dragData[this.scope]=this.droppables[this.scope],i.instance.intDrop(e,i.target)),this.setGlobalDroppables(!0),document.body.classList.remove("e-prevent-select")}},t.prototype.intDestroy=function(e){this.dragProcessStarted=!1,this.toggleEvents(),document.body.classList.remove("e-prevent-select"),this.element.setAttribute("aria-grabbed","false"),q.remove(document,Q.isSafari()?"touchmove":Q.touchMoveEvent,this.intDragStart),q.remove(document,Q.isSafari()?"touchend":Q.touchEndEvent,this.intDragStop),q.remove(document,Q.isSafari()?"touchend":Q.touchEndEvent,this.intDestroy),q.remove(document,Q.isSafari()?"touchmove":Q.touchMoveEvent,this.intDrag),this.isDragStarted()&&this.isDragStarted(!0)},t.prototype.onPropertyChanged=function(e,t){},t.prototype.getModuleName=function(){return"draggable"},t.prototype.isDragStarted=function(e){return e&&(jt.isDragged=!jt.isDragged),jt.isDragged},t.prototype.setDragArea=function(){var e,t,i,n=0,o=0;if(i="string"===typeof this.dragArea?ne(this.dragArea):this.dragArea){var r=i.getBoundingClientRect();e=i.scrollWidth?i.scrollWidth:r.right-r.left,t=i.scrollHeight?this.dragArea&&!g(this.helperElement)&&this.helperElement.classList.contains("e-treeview")?i.clientHeight:i.scrollHeight:r.bottom-r.top;for(var s=["Top","Left","Bottom","Right"],a=getComputedStyle(i),l=0;l<s.length;l++){var c=s[parseInt(l.toString(),10)],h=a["border"+c+"Width"],d=a["padding"+c],p=c.toLowerCase();this.borderWidth[""+p]=isNaN(parseFloat(h))?0:parseFloat(h),this.padding[""+p]=isNaN(parseFloat(d))?0:parseFloat(d)}n=this.dragArea&&!g(this.helperElement)&&this.helperElement.classList.contains("e-treeview")?r.top+document.scrollingElement.scrollTop:r.top,o=r.left,this.dragLimit.left=o+this.borderWidth.left+this.padding.left,this.dragLimit.top=i.offsetTop+this.borderWidth.top+this.padding.top,this.dragLimit.right=o+e-(this.borderWidth.right+this.padding.right),this.dragLimit.bottom=n+t-(this.borderWidth.bottom+this.padding.bottom)}},t.prototype.getProperTargetElement=function(e){var t,i=this.getCoordinates(e),n=this.helperElement.style.pointerEvents||"",o=-1!==e.type.indexOf("pointer")&&"safari"===Q.info.name&&parseInt(Q.info.version,10)>12;return b(e.target,this.helperElement)||-1!==e.type.indexOf("touch")||o?(this.helperElement.style.pointerEvents="none",t=document.elementFromPoint(i.clientX,i.clientY),this.helperElement.style.pointerEvents=n):t=e.target,t},t.prototype.currentStateCheck=function(e,t){return g(this.currentStateTarget)||this.currentStateTarget===e?g(t)?e:t:this.currentStateTarget},t.prototype.getMousePosition=function(e,t){var i,n,o=void 0!==e.srcElement?e.srcElement:e.target,r=this.getCoordinates(e),s=g(o.offsetParent);if(t?(i=this.clone?r.pageX:r.pageX+(s?0:o.offsetParent.scrollLeft)-this.relativeXPosition,n=this.clone?r.pageY:r.pageY+(s?0:o.offsetParent.scrollTop)-this.relativeYPosition):(i=this.clone?r.pageX:r.pageX+window.pageXOffset-this.relativeXPosition,n=this.clone?r.pageY:r.pageY+window.pageYOffset-this.relativeYPosition),document.scrollingElement&&!t&&!this.clone){var a=document.scrollingElement,l=a.scrollHeight>0&&a.scrollHeight>a.clientHeight&&a.scrollTop>0;i=a.scrollWidth>0&&a.scrollWidth>a.clientWidth&&a.scrollLeft>0?i-a.scrollLeft:i,n=l?n-a.scrollTop:n}return{left:i-(this.margin.left+this.cursorAt.left),top:n-(this.margin.top+this.cursorAt.top)}},t.prototype.getCoordinates=function(e){return e.type.indexOf("touch")>-1?e.changedTouches[0]:e},t.prototype.getHelperElement=function(e){var t;return this.clone?this.helper?t=this.helper({sender:e,element:this.target}):(t=_("div",{className:"e-drag-helper e-block-touch",innerHTML:"Draggable"}),document.body.appendChild(t)):t=this.element,t},t.prototype.setGlobalDroppables=function(e,t,i){this.droppables[this.scope]=e?null:{draggable:t,helper:i,draggedElement:this.element}},t.prototype.checkTargetElement=function(e){var t=this.getProperTargetElement(e),i=this.getDropInstance(t);if(!i&&t&&!g(t.parentNode)){var n=se(t.parentNode,".e-droppable")||t.parentElement;n&&(i=this.getDropInstance(n))}return{target:t,instance:i}},t.prototype.getDropInstance=function(e){var t,i=e&&e.ej2_instances;if(i)for(var n=0,o=i;n<o.length;n++){var r=o[n];if("droppable"===r.getModuleName()){t=r;break}}return t},t.prototype.destroy=function(){this.toggleEvents(!0),e.prototype.destroy.call(this)},wt([Te({},Ot)],t.prototype,"cursorAt",void 0),wt([De(!0)],t.prototype,"clone",void 0),wt([De()],t.prototype,"dragArea",void 0),wt([De()],t.prototype,"isDragScroll",void 0),wt([De()],t.prototype,"isReplaceDragEle",void 0),wt([De(!0)],t.prototype,"isPreventSelect",void 0),wt([De(!1)],t.prototype,"isPreventScroll",void 0),wt([Se()],t.prototype,"drag",void 0),wt([Se()],t.prototype,"dragStart",void 0),wt([Se()],t.prototype,"dragStop",void 0),wt([De(1)],t.prototype,"distance",void 0),wt([De()],t.prototype,"handle",void 0),wt([De()],t.prototype,"abort",void 0),wt([De()],t.prototype,"helper",void 0),wt([De("default")],t.prototype,"scope",void 0),wt([De("")],t.prototype,"dragTarget",void 0),wt([De()],t.prototype,"axis",void 0),wt([De()],t.prototype,"queryPositionInfo",void 0),wt([De(!1)],t.prototype,"enableTailMode",void 0),wt([De(!1)],t.prototype,"skipDistanceCheck",void 0),wt([De(!0)],t.prototype,"preventDefault",void 0),wt([De(!1)],t.prototype,"enableAutoScroll",void 0),wt([De(!1)],t.prototype,"enableTapHold",void 0),wt([De(750)],t.prototype,"tapHoldThreshold",void 0),wt([De(!1)],t.prototype,"enableScrollHandler",void 0),t=i=wt([Ie],t)}(pe),At=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),kt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};!function(e){function t(t,i){var n=e.call(this,i,t)||this;return n.mouseOver=!1,n.dragData={},n.dragStopCalled=!1,n.bind(),n}At(t,e),t.prototype.bind=function(){this.wireEvents()},t.prototype.wireEvents=function(){q.add(this.element,Q.isSafari()?"touchend":Q.touchEndEvent,this.intDrop,this)},t.prototype.onPropertyChanged=function(e,t){},t.prototype.getModuleName=function(){return"droppable"},t.prototype.intOver=function(e,t){if(!this.mouseOver){var i=this.dragData[this.scope];this.trigger("over",{event:e,target:t,dragData:i}),this.mouseOver=!0}},t.prototype.intOut=function(e,t){this.mouseOver&&(this.trigger("out",{evt:e,target:t}),this.mouseOver=!1)},t.prototype.intDrop=function(e,t){if(this.dragStopCalled){this.dragStopCalled=!1;var i,n=!0,o=this.dragData[this.scope],r=!!o&&(o.helper&&Z(o.helper));r&&(i=this.isDropArea(e,o.helper,t),this.accept&&(n=ce(o.helper,this.accept))),r&&this.drop&&i.canDrop&&n&&this.trigger("drop",{event:e,target:i.target,droppedElement:o.helper,dragData:o}),this.mouseOver=!1}},t.prototype.isDropArea=function(e,t,i){var n={canDrop:!0,target:i||e.target},o="touchend"===e.type;if(o||n.target===t){t.style.display="none";var r=o?e.changedTouches[0]:e,s=document.elementFromPoint(r.clientX,r.clientY);n.canDrop=!1,n.canDrop=b(s,this.element),n.canDrop&&(n.target=s),t.style.display=""}return n},t.prototype.destroy=function(){q.remove(this.element,Q.isSafari()?"touchend":Q.touchEndEvent,this.intDrop),e.prototype.destroy.call(this)},kt([De()],t.prototype,"accept",void 0),kt([De("default")],t.prototype,"scope",void 0),kt([Se()],t.prototype,"drop",void 0),kt([Se()],t.prototype,"over",void 0),kt([Se()],t.prototype,"out",void 0),t=kt([Ie],t)}(pe);var Pt=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Rt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Bt={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,space:32,escape:27,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,semicolon:186,plus:187,comma:188,minus:189,dot:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},Ht=function(e){function t(t,n){var o=e.call(this,n,t)||this;return o.keyPressHandler=function(e){for(var t=e.altKey,n=e.ctrlKey,r=e.shiftKey,s=e.which,a=0,l=Object.keys(o.keyConfigs);a<l.length;a++)for(var c=l[a],h=0,d=o.keyConfigs[""+c].split(",");h<d.length;h++){var p=d[h],u=i.getKeyConfigData(p.trim());t===u.altKey&&n===u.ctrlKey&&r===u.shiftKey&&s===u.keyCode&&(e.action=c,o.keyAction&&o.keyAction(e))}},o.bind(),o}var i;return Pt(t,e),i=t,t.prototype.destroy=function(){this.unwireEvents(),e.prototype.destroy.call(this)},t.prototype.onPropertyChanged=function(e,t){},t.prototype.bind=function(){this.wireEvents()},t.prototype.getModuleName=function(){return"keyboard"},t.prototype.wireEvents=function(){this.element.addEventListener(this.eventName,this.keyPressHandler)},t.prototype.unwireEvents=function(){this.element.removeEventListener(this.eventName,this.keyPressHandler)},t.getKeyConfigData=function(e){if(e in this.configCache)return this.configCache[""+e];var t=e.toLowerCase().split("+"),n={altKey:-1!==t.indexOf("alt"),ctrlKey:-1!==t.indexOf("ctrl"),shiftKey:-1!==t.indexOf("shift"),keyCode:null};return t[t.length-1].length>1&&Number(t[t.length-1])?n.keyCode=Number(t[t.length-1]):n.keyCode=i.getKeyCode(t[t.length-1]),i.configCache[""+e]=n,n},t.getKeyCode=function(e){return Bt[""+e]||e.toUpperCase().charCodeAt(0)},t.configCache={},Rt([De({})],t.prototype,"keyConfigs",void 0),Rt([De("keyup")],t.prototype,"eventName",void 0),Rt([Se()],t.prototype,"keyAction",void 0),t=i=Rt([Ie],t)}(pe),Ut=function(){function e(e,t,i){this.controlName=e,this.localeStrings=t,this.setLocale(i||ht)}return e.prototype.setLocale=function(t){var i=this.intGetControlConstant(e.locale,t);this.currentLocale=i||this.localeStrings},e.load=function(e){this.locale=m(this.locale,e,{},!0)},e.prototype.getConstant=function(e){return g(this.currentLocale[""+e])?this.localeStrings[""+e]||"":this.currentLocale[""+e]},e.prototype.intGetControlConstant=function(e,t){return e[""+t]?e[""+t][this.controlName]:null},e.locale={},e}(),Ft=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Yt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Vt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ft(t,e),Yt([De(50)],t.prototype,"swipeThresholdDistance",void 0),t}(Qe),Qt=/(Up|Down)/,qt=function(e){function t(t,i){var n=e.call(this,i,t)||this;return n.touchAction=!0,n.tapCount=0,n.startEvent=function(e){if(!0===n.touchAction){var t=n.updateChangeTouches(e);void 0!==e.changedTouches&&(n.touchAction=!1),n.isTouchMoved=!1,n.movedDirection="",n.startPoint=n.lastMovedPoint={clientX:t.clientX,clientY:t.clientY},n.startEventData=t,n.hScrollLocked=n.vScrollLocked=!1,n.tStampStart=Date.now(),n.timeOutTapHold=setTimeout((function(){n.tapHoldEvent(e)}),n.tapHoldThreshold),q.add(n.element,Q.touchMoveEvent,n.moveEvent,n),q.add(n.element,Q.touchEndEvent,n.endEvent,n),q.add(n.element,Q.touchCancelEvent,n.cancelEvent,n)}},n.moveEvent=function(e){var t=n.updateChangeTouches(e);n.movedPoint=t,n.isTouchMoved=!(t.clientX===n.startPoint.clientX&&t.clientY===n.startPoint.clientY);var i={};n.isTouchMoved&&(clearTimeout(n.timeOutTapHold),n.calcScrollPoints(e),i=m(i,{},{startEvents:n.startEventData,originalEvent:e,startX:n.startPoint.clientX,startY:n.startPoint.clientY,distanceX:n.distanceX,distanceY:n.distanceY,scrollDirection:n.scrollDirection,velocity:n.getVelocity(t)}),n.trigger("scroll",i),n.lastMovedPoint={clientX:t.clientX,clientY:t.clientY})},n.cancelEvent=function(e){clearTimeout(n.timeOutTapHold),clearTimeout(n.timeOutTap),n.tapCount=0,n.swipeFn(e),q.remove(n.element,Q.touchCancelEvent,n.cancelEvent)},n.endEvent=function(e){n.swipeFn(e),n.isTouchMoved||"function"==typeof n.tap&&(n.trigger("tap",{originalEvent:e,tapCount:++n.tapCount}),n.timeOutTap=setTimeout((function(){n.tapCount=0}),n.tapThreshold)),n.modeclear()},n.swipeFn=function(e){clearTimeout(n.timeOutTapHold),clearTimeout(n.timeOutTap);var t=n.updateChangeTouches(e),i=t.clientX-n.startPoint.clientX,o=t.clientY-n.startPoint.clientY;i=Math.floor(i<0?-1*i:i),o=Math.floor(o<0?-1*o:i),n.isTouchMoved=i>1||o>1,/Firefox/.test(Q.userAgent)&&0===t.clientX&&0===t.clientY&&"mouseup"===e.type&&(n.isTouchMoved=!1),n.endPoint=t,n.calcPoints(e);var r={originalEvent:e,startEvents:n.startEventData,startX:n.startPoint.clientX,startY:n.startPoint.clientY,distanceX:n.distanceX,distanceY:n.distanceY,swipeDirection:n.movedDirection,velocity:n.getVelocity(t)};if(n.isTouchMoved){var s=n.swipeSettings.swipeThresholdDistance,a=m(void 0,n.defaultArgs,r),l=!1,c=n.element,h=n.isScrollable(c),d=Qt.test(n.movedDirection);(s<n.distanceX&&!d||s<n.distanceY&&d)&&(l=!h||n.checkSwipe(c,d)),l&&n.trigger("swipe",a)}n.modeclear()},n.modeclear=function(){n.modeClear=setTimeout((function(){n.touchAction=!0}),"function"!=typeof n.tap?0:20),n.lastTapTime=(new Date).getTime(),q.remove(n.element,Q.touchMoveEvent,n.moveEvent),q.remove(n.element,Q.touchEndEvent,n.endEvent),q.remove(n.element,Q.touchCancelEvent,n.cancelEvent)},n.bind(),n}return Ft(t,e),t.prototype.onPropertyChanged=function(e,t){},t.prototype.bind=function(){this.wireEvents(),Q.isIE&&this.element.classList.add("e-block-touch")},t.prototype.destroy=function(){this.unwireEvents(),e.prototype.destroy.call(this)},t.prototype.wireEvents=function(){q.add(this.element,Q.touchStartEvent,this.startEvent,this)},t.prototype.unwireEvents=function(){q.remove(this.element,Q.touchStartEvent,this.startEvent)},t.prototype.getModuleName=function(){return"touch"},t.prototype.isScrollable=function(e){var t=getComputedStyle(e),i=t.overflow+t.overflowX+t.overflowY;return!!/(auto|scroll)/.test(i)},t.prototype.tapHoldEvent=function(e){this.tapCount=0,this.touchAction=!0,q.remove(this.element,Q.touchMoveEvent,this.moveEvent),q.remove(this.element,Q.touchEndEvent,this.endEvent);var t={originalEvent:e};this.trigger("tapHold",t),q.remove(this.element,Q.touchCancelEvent,this.cancelEvent)},t.prototype.calcPoints=function(e){var t=this.updateChangeTouches(e);this.defaultArgs={originalEvent:e},this.distanceX=Math.abs(Math.abs(t.clientX)-Math.abs(this.startPoint.clientX)),this.distanceY=Math.abs(Math.abs(t.clientY)-Math.abs(this.startPoint.clientY)),this.distanceX>this.distanceY?this.movedDirection=t.clientX>this.startPoint.clientX?"Right":"Left":this.movedDirection=t.clientY<this.startPoint.clientY?"Up":"Down"},t.prototype.calcScrollPoints=function(e){var t=this.updateChangeTouches(e);this.defaultArgs={originalEvent:e},this.distanceX=Math.abs(Math.abs(t.clientX)-Math.abs(this.lastMovedPoint.clientX)),this.distanceY=Math.abs(Math.abs(t.clientY)-Math.abs(this.lastMovedPoint.clientY)),(this.distanceX>this.distanceY||!0===this.hScrollLocked)&&!1===this.vScrollLocked?(this.scrollDirection=t.clientX>this.lastMovedPoint.clientX?"Right":"Left",this.hScrollLocked=!0):(this.scrollDirection=t.clientY<this.lastMovedPoint.clientY?"Up":"Down",this.vScrollLocked=!0)},t.prototype.getVelocity=function(e){var t=e.clientX,i=e.clientY,n=Date.now(),o=t-this.startPoint.clientX,r=i-this.startPoint.clientX,s=n-this.tStampStart;return Math.sqrt(o*o+r*r)/s},t.prototype.checkSwipe=function(e,t){var i=["scroll","offset"],n=t?["Height","Top"]:["Width","Left"];return e[i[0]+n[0]]<=e[i[1]+n[0]]||(0===e[i[0]+n[1]]||e[i[1]+n[0]]+e[i[0]+n[1]]>=e[i[0]+n[0]])},t.prototype.updateChangeTouches=function(e){return e.changedTouches&&0!==e.changedTouches.length?e.changedTouches[0]:e},Yt([Se()],t.prototype,"tap",void 0),Yt([Se()],t.prototype,"tapHold",void 0),Yt([Se()],t.prototype,"swipe",void 0),Yt([Se()],t.prototype,"scroll",void 0),Yt([De(350)],t.prototype,"tapThreshold",void 0),Yt([De(750)],t.prototype,"tapHoldThreshold",void 0),Yt([Te({},Vt)],t.prototype,"swipeSettings",void 0),t=Yt([Ie],t)}(pe),Wt=new RegExp("\\n|\\r|\\s\\s+","g"),_t=new RegExp(/'|"/g),Gt=new RegExp("if ?\\("),Xt=new RegExp("else if ?\\("),Kt=new RegExp("else"),Zt=new RegExp("for ?\\("),Jt=new RegExp("(/if|/for)"),$t=new RegExp("\\((.*)\\)",""),ei=new RegExp("^[0-9]+$","g"),ti=new RegExp("[\\w\"'.\\s+]+","g"),ii=new RegExp('"(.*?)"',"g"),ni=new RegExp("[\\w\"'@#$.\\s-+]+","g"),oi=new RegExp("\\${([^}]*)}","g"),ri=/^\..*/gm,si=/\\/gi,ai=/\\\\/gi,li=new RegExp("[\\w\"'@#$.\\s+]+","g"),ci=/\window\./gm;function hi(e,t,i){if("function"==typeof e)return e;var n="data",o=function(e,t,i){var n=0,o=[],r=e.match(/class="([^"]+|)\s{2}/g),s="";r&&r.forEach((function(t){s=t.replace(/\s\s+/g," "),e=e.replace(t,s)}));if(oi.test(e)){for(var a=!1,l="",c=0;c<e.length;c++)"$"===e[c+""]&&"{"===e[c+1]?a=!0:"}"===e[c+""]&&(a=!1),l+='"'!==e[c+""]||a?e[c+""]:'\\"';e=l}else e=e.replace(/\\?"/g,'\\"');return e.replace(Wt,"").replace(ii,"'$1'").replace(oi,(function(e,r,s,a){var l=/@|#|\$/gm,c=r.match($t);if(c){var h=c[1];if(Xt.test(r))r='";} '+r.replace(c[1],h.replace(ti,(function(e){return di(e=e.trim(),!_t.test(e)&&-1===o.indexOf(e),t,o)})))+'{ \n str = str + "';else if(Gt.test(r))r='"; '+r.replace(c[1],h.replace(ni,(function(e){return mi(e,t,o)})))+'{ \n str = str + "';else if(Zt.test(r)){var d=c[1].split(" of ");r='"; '+r.replace(c[1],(function(e){return o.push(d[0]),o.push(d[0]+"Index"),"var i"+(n+=1)+"=0; i"+n+" < "+di(d[1],!0,t,o)+".length; i"+n+"++"}))+"{ \n "+d[0]+"= "+di(d[1],!0,t,o)+"[i"+n+"]; \n var "+d[0]+"Index=i"+n+'; \n str = str + "'}else{var p=r.split("("),u=i&&Object.prototype.hasOwnProperty.call(i,p[0])?"this.":"global";u=/\./.test(p[0])?"":u;var m=c[1].split(",");0===c[1].length||/data/.test(m[0])||/window./.test(m[0])||(c[1]="global"===u?t+"."+c[1]:c[1]);var g=/@|\$|#/gm,f=/\]\./gm;if(ci.test(r)&&f.test(r)||g.test(r))/@|\$|#|\]\./gm.test(r)&&(r='"+ '+("global"===u?"":u)+r.replace(c[1],h.replace(li,(function(e){return mi(e,t,o)})))+'+ "');else r='" + '+("global"===u?"":u)+r.replace(h,di(c[1].replace(/,( |)data.|,/gi,","+t+".").replace(/,( |)data.window/gi,",window"),"global"!==u,t,o))+'+"'}}else Kt.test(r)?r='"; '+r.replace(Kt,'} else { \n str = str + "'):r.match(Jt)?r=r.replace(Jt,'"; \n } \n str = str + "'):l.test(r)?(r.match(si)&&(r=ui(r)),r='"+'+pi(r,-1===o.indexOf(r),t,o)+'"]+"'):r=r.match(si)?'"+'+pi(r=ui(r),-1===o.indexOf(r),t,o)+'"]+"':""!==r?'"+'+di(r.replace(/,/gi,"+"+t+"."),-1===o.indexOf(r),t,o)+'+"':"${}";return r}))}(e,n,t);return new Function(n,'var str="'+o+"\";var valueRegEx = (/value=\\'([A-Za-z0-9 _]*)((.)([\\w)(!-;?-■\\s]+)['])/g);\n var hrefRegex = (/(?:href)([\\s='\"./]+)([\\w-./?=&\\\\#\"]+)((.)([\\w)(!-;/?-■\\s]+)['])/g);\n if(str.match(valueRegEx)){\n var check = str.match(valueRegEx);\n var str1 = str;\n for (var i=0; i < check.length; i++) {\n var check1 = str.match(valueRegEx)[i].split('value=')[1];\n var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;\n change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;\n str1 = str1.replace(check1, change);\n }\n str = str.replace(str, str1);\n }\n else if (str.match(/(?:href='')/) === null) {\n if(str.match(hrefRegex)) {\n var check = str.match(hrefRegex);\n var str1 = str;\n for (var i=0; i < check.length; i++) {\n var check1 = str.match(hrefRegex)[i].split('href=')[1];\n if (check1) {\n var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;\n change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;\n str1 = str1.replace(check1, change);\n }\n }\n str = str.replace(str, str1);\n }\n }\n return str;").bind(t)}function di(e,t,i,n,o){return t&&!ei.test(e)&&-1===n.indexOf(e.split(".")[0])&&"true"!==e&&"false"!==e?i+"."+e:e}function pi(e,t,i,n){return t&&!ei.test(e)&&-1===n.indexOf(e.split(".")[0])?i+'["'+e:e}function ui(e){return e.match(ai)?e:e.replace(si,"\\\\")}function mi(e,t,i,n){e=e.trim();if(/\window\./gm.test(e))return e;var o=/'|"/gm;return/@|\$|#/gm.test(e)&&(e=pi(e,-1===i.indexOf(e),t,i)+'"]'),ri.test(e)?function(e,t,i,n){return!t||ei.test(e)||-1!==n.indexOf(e.split(".")[0])||/^\..*/gm.test(e)?e:i+"."+e}(e,!o.test(e)&&-1===i.indexOf(e),t,i):di(e,!o.test(e)&&-1===i.indexOf(e),t,i)}var gi=/^[\n\r.]+<tr|^<tr/,fi=/^[\n\r.]+<svg|^<path|^<g/;function yi(e,t,i){var n=Ei.compile(e,t,i);return function(e,t,i,o,r,s,a,l){var c=n(e,t,i,a,l);return"string"==typeof c?fi.test(c)?_("svg",{innerHTML:c}).childNodes:_(gi.test(c)?"table":"div",{innerHTML:c}).childNodes:c}}function vi(e,t){var i;return e.prototype.CSPTemplate=!0,g(t)?i=e:(i=e.bind(t)).prototype=Object.create(e.prototype),i}var bi,Mi,Ni,Ci,Ei={compile:(new(function(){function e(){}return e.prototype.compile=function(e,t,i){return void 0===t&&(t={}),hi(e,t)},e}())).compile},Di=["script","style","iframe[src]",'link[href*="javascript:"]','object[type="text/x-scriptlet"]','object[data^="data:text/html;base64"]','img[src^="data:text/html;base64"]','[src^="javascript:"]','[dynsrc^="javascript:"]','[lowsrc^="javascript:"]','[type^="application/x-shockwave-flash"]'],Ti=[{attribute:"href",selector:'[href*="javascript:"]'},{attribute:"href",selector:"a[href]"},{attribute:"background",selector:'[background^="javascript:"]'},{attribute:"style",selector:'[style*="javascript:"]'},{attribute:"style",selector:'[style*="expression("]'},{attribute:"href",selector:'a[href^="data:text/html;base64"]'}],Li=["onchange","onclick","onmouseover","onmouseout","onkeydown","onload","onerror","onblur","onfocus","onbeforeload","onbeforeunload","onkeyup","onsubmit","onafterprint","onbeforeonload","onbeforeprint","oncanplay","oncanplaythrough","oncontextmenu","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onformchange","onforminput","onhaschange","oninput","oninvalid","onkeypress","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmousedown","onmousemove","onmouseup","onmousewheel","onoffline","onoine","ononline","onpagehide","onpageshow","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreadystatechange","onredo","onresize","onscroll","onseeked","onseeking","onselect","onstalled","onstorage","onsuspend","ontimeupdate","onundo","onunload","onvolumechange","onwaiting","onmouseenter","onmouseleave","onstart","onpropertychange","oncopy","ontoggle","onpointerout","onpointermove","onpointerleave","onpointerenter","onpointerrawupdate","onpointerover","onbeforecopy","onbeforecut","onbeforeinput"],Si=function(){function e(){}return e.beforeSanitize=function(){return{selectors:{tags:Di,attributes:Ti}}},e.sanitize=function(e){if(g(e))return e;var t=this.beforeSanitize();return this.serializeValue(t,e)},e.serializeValue=function(e,t){this.removeAttrs=e.selectors.attributes,this.removeTags=e.selectors.tags,this.wrapElement=document.createElement("div"),this.wrapElement.innerHTML=t,this.removeXssTags(),this.removeJsEvents(),this.removeXssAttrs();var i=this.wrapElement.innerHTML;return this.removeElement(),this.wrapElement=null,i.replace(/&amp;/g,"&")},e.removeElement=function(){for(var e=this.wrapElement.children,t=0;t<e.length;t++)for(var i=e[parseInt(t.toString(),10)].attributes,n=0;n<i.length;n++)this.wrapElement.children[parseInt(t.toString(),10)].removeAttribute(i[parseInt(n.toString(),10)].localName)},e.removeXssTags=function(){var e=this.wrapElement.querySelectorAll(this.removeTags.join(","));e.length>0&&e.forEach((function(e){ee(e)}))},e.removeJsEvents=function(){var e=this.wrapElement.querySelectorAll("["+Li.join("],[")+"]");e.length>0&&e.forEach((function(e){Li.forEach((function(t){e.hasAttribute(t)&&e.removeAttribute(t)}))}))},e.removeXssAttrs=function(){var e=this;this.removeAttrs.forEach((function(t,i){var n=e.wrapElement.querySelectorAll(t.selector);n.length>0&&("a[href]"===t.selector?n.forEach((function(e){-1!==e.getAttribute(t.attribute).replace(/\t|\s|&/,"").indexOf("javascript:alert")&&e.removeAttribute(t.attribute)})):n.forEach((function(e){e.removeAttribute(t.attribute)})))}))},e}(),Ii="tableclass",wi="initial-load",xi="content-changed",ji="initial-end",Oi="iframe-click",zi="destroy",Ai="toolbarClick",ki="toolbar-refresh",Pi="refresh-begin",Ri="toolbar-updated",Bi="bind-on-end",Hi="html-toolbar-click",Ui="model-changed",Fi="keyUp",Yi="keyDown",Vi="onExport",Qi="toolbarRenderComplete",qi="enableFullScreen",Wi="disableFullScreen",_i="dropDownSelect",Gi="beforeDropDownItemRender",Xi="execCommandCallBack",Ki="actionBegin",Zi="actionComplete",Ji="updateToolbarItem",$i="sourceCode",en="updateSource",tn="beforeDropDownOpen",nn="selection-save",on="selection-restore",rn="mouseDown",sn="sourceCodeMouseDown",an="editAreaClick",ln="colorPickerChanged",cn="focusChange",hn="selectAll",dn="selectRange",pn="getSelectedHtml",un="paste-content",mn="rtl-mode",gn="readOnlyMode",fn="enterHandler",yn="hideTableQuickToolbar",vn="xhtmlValidation",bn="resizeInitialized",Mn="updateTbItemsStatus",Nn="bindCssClass",Cn="emojiPicker",En="destroyTooltip",Dn="cleanupResizeElements",Tn="updateValueOnIdle",Ln="documentClickClosedBy",Sn="showColorPicker",In="closeTooltip",wn="autoResize",xn=["px","em","rem","pt","cm","mm","in","pc","vw","vh","vmin","vmax"],jn={px:{px:1,em:.0625,rem:.0625,pt:.75,cm:.0264583,mm:.0026458,in:.0104167,pc:.0625,vw:.00625,vh:.00625,vmin:.00625,vmax:.00625},em:{px:16,em:1,rem:1,pt:12,cm:.423333,mm:.0423333,in:.166667,pc:.0625,vw:1,vh:1,vmin:1,vmax:1},rem:{px:16,em:1,rem:1,pt:12,cm:.423333,mm:.0423333,in:.166667,pc:.0625,vw:1,vh:1,vmin:1,vmax:1},pt:{px:1.33333,em:.0833333,rem:.0833333,pt:1,cm:.0352778,mm:.0035278,in:.0138889,pc:.0416667,vw:.00416667,vh:.00416667,vmin:.00416667,vmax:.00416667},cm:{px:37.7953,em:2.3622,rem:2.3622,pt:28.3465,cm:1,mm:.1,in:.393701,pc:.148148,vw:.0377953,vh:.0377953,vmin:.0377953,vmax:.0377953},mm:{px:3.77953,em:.23622,rem:.23622,pt:2.83465,cm:10,mm:1,in:.0393701,pc:.0148148,vw:.00377953,vh:.00377953,vmin:.00377953,vmax:.00377953},in:{px:96,em:6,rem:6,pt:72,cm:2.54,mm:25.4,in:1,pc:.375,vw:.09375,vh:.09375,vmin:.09375,vmax:.09375},pc:{px:16,em:1,rem:1,pt:12,cm:.423333,mm:.0423333,in:.166667,pc:1,vw:.0625,vh:.0625,vmin:.0625,vmax:.0625},vw:{px:160,em:10,rem:10,pt:120,cm:4.23333,mm:.423333,in:1.66667,pc:.625,vw:1,vh:1,vmin:1,vmax:1},vh:{px:160,em:10,rem:10,pt:120,cm:4.23333,mm:.423333,in:1.66667,pc:.625,vw:1,vh:1,vmin:1,vmax:1},vmin:{px:160,em:10,rem:10,pt:120,cm:4.23333,mm:.423333,in:1.66667,pc:.625,vw:1,vh:1,vmin:1,vmax:1},vmax:{px:160,em:10,rem:10,pt:120,cm:4.23333,mm:.423333,in:1.66667,pc:.625,vw:1,vh:1,vmin:1,vmax:1}},On="onHandleFontsizeChange",zn="e-richtexteditor",An="e-rtl",kn="e-disabled",Pn="rte-iframe-script-sheet",Rn="rte-iframe-style-sheet",Bn="e-rte-toolbar",Hn="e-rte-tb-fixed",Un="e-rte-tb-float",Fn="e-rte-tb-expand",Yn="e-rte-full-screen",Vn="e-rte-quick-toolbar",Qn="e-quick-dropdown",qn="e-rte-inline-dropdown",Wn="e-rte-dropdown-popup",_n="e-rte-dropdown-icons",Gn="e-rte-dropdown-items",Xn="e-rte-dropdown-btn",Kn="e-toolbar-item",Zn="e-toolbar-wrapper",Jn="e-show",$n="e-visible",eo="e-focused",to="e-clickelem",io="e-audio-wrap",no="e-video-wrap",oo="e-imginline",ro="e-icons",so="e-active",ao="e-expand-open",lo="e-rte-elements",co="e-tbar-btn",ho="e-tbar-ios-fixed",po="e-rte-list-primary-content",uo="e-rte-color-content",mo="e-rte-readonly",go="e-cell-select",fo="e-cell-select-end",yo="e-multi-cells-select",vo="e-rte-hidden",bo="e-rte-image",Mo="e-rte-fixed-tb-expand",No="e-rte-toolbar-enabled",Co="e-rte-srctextarea";!function(e){e[e.Toolbar=0]="Toolbar",e[e.Content=1]="Content",e[e.Popup=2]="Popup",e[e.LinkToolbar=3]="LinkToolbar",e[e.TextToolbar=4]="TextToolbar",e[e.ImageToolbar=5]="ImageToolbar",e[e.AudioToolbar=6]="AudioToolbar",e[e.VideoToolbar=7]="VideoToolbar",e[e.InlineToolbar=8]="InlineToolbar",e[e.TableToolbar=9]="TableToolbar"}(bi||(bi={})),function(e){e.Expand="Expand",e.MultiRow="MultiRow",e.Scrollable="Scrollable"}(Mi||(Mi={})),function(e){e.InsertLink="InsertLink",e.InsertImage="InsertImage",e.InsertAudio="InsertAudio",e.InsertVideo="InsertVideo",e.InsertTable="InsertTable"}(Ni||(Ni={})),function(e){e.Uploaded="Uploaded",e.Dropped="Dropped",e.Pasted="Pasted"}(Ci||(Ci={}));var Eo=["alignments","formats","fontname","fontsize","fontcolor","backgroundcolor","align","display","audiolayoutoption","videolayoutoption","videoalign","tablerows","tablecolumns","tablecell","tablecellhorizontalalign","tablecellverticalalign","styles","numberformatlist","bulletformatlist"],Do={alignments:{id:"Alignments",icon:"e-alignments",tooltip:"Alignments",command:"Alignments",subCommand:"Alignments"},justifyleft:{id:"JustifyLeft",icon:"e-justify-left",tooltip:"JustifyLeft",command:"Alignments",subCommand:"JustifyLeft"},justifycenter:{id:"JustifyCenter",icon:"e-justify-center",tooltip:"JustifyCenter",command:"Alignments",subCommand:"JustifyCenter"},justifyright:{id:"JustifyRight",icon:"e-justify-right",tooltip:"JustifyRight",command:"Alignments",subCommand:"JustifyRight"},justifyfull:{id:"JustifyFull",icon:"e-justify-full",tooltip:"JustifyFull",command:"Alignments",subCommand:"JustifyFull"},fontname:{id:"FontName",icon:"e-font-name",tooltip:"Font Name",command:"Font",subCommand:"FontName"},fontsize:{id:"FontSize",icon:"e-font-size",tooltip:"Font Size",command:"Font",subCommand:"FontSize"},fontcolor:{id:"FontColor",icon:"e-rte-font-color",tooltip:"Font Color",command:"Font",subCommand:"FontColor",value:"#ff0000ff"},backgroundcolor:{id:"BackgroundColor",icon:"e-background-color",tooltip:"Background Color",command:"Font",subCommand:"BackgroundColor",value:"#ffff00ff"},importword:{id:"ImportWord",icon:"e-rte-import-doc",tooltip:"Import from Word",command:"Import",subCommand:"ImportWord"},exportword:{id:"ExportWord",icon:"e-rte-export-doc",tooltip:"Export to Word",command:"Export",subCommand:"ExportWord"},exportpdf:{id:"ExportPdf",icon:"e-rte-export-pdf",tooltip:"Export to PDF",command:"Export",subCommand:"ExportPdf"},bold:{id:"Bold",icon:"e-bold",tooltip:"Bold",command:"Style",subCommand:"Bold"},italic:{id:"Italic",icon:"e-italic",tooltip:"Italic",command:"Style",subCommand:"Italic"},underline:{id:"Underline",icon:"e-underline",tooltip:"Underline",command:"Style",subCommand:"Underline"},strikethrough:{id:"StrikeThrough",icon:"e-strike-through",tooltip:"StrikeThrough",command:"Style",subCommand:"StrikeThrough"},clearformat:{id:"ClearFormat",icon:"e-clear-format",tooltip:"Clear Format",command:"Clear",subCommand:"ClearFormat"},clearall:{id:"ClearAll",icon:"e-clear-all",tooltip:"Clear All",command:"Clear",subCommand:"ClearAll"},cut:{id:"Cut",icon:"e-cut",tooltip:"Cut",command:"ClipBoard",subCommand:"Cut"},copy:{id:"Copy",icon:"e-copy",tooltip:"Copy",command:"ClipBoard",subCommand:"Copy"},paste:{id:"Paste",icon:"e-paste",tooltip:"Paste",command:"ClipBoard",subCommand:"Paste"},unorderedlist:{id:"UnorderedList",icon:"e-unorder-list",tooltip:"Bulleted List",command:"Lists",subCommand:"UL"},orderedlist:{id:"OrderedList",icon:"e-order-list",tooltip:"Numbered List",command:"Lists",subCommand:"OL"},numberformatlist:{id:"NumberFormatList",icon:"e-order-list",tooltip:"Number Format List",command:"NumberFormatList",subCommand:"NumberFormatList"},bulletformatlist:{id:"BulletFormatList",icon:"e-unorder-list",tooltip:"Bullet Format List",command:"BulletFormatList",subCommand:"BulletFormatList"},indent:{id:"Indent",icon:"e-indent",tooltip:"Increase Indent",command:"Indents",subCommand:"Indent"},outdent:{id:"Outdent",icon:"e-outdent",tooltip:"Decrease Indent",command:"Indents",subCommand:"Outdent"},undo:{id:"Undo",icon:"e-undo",tooltip:"Undo",command:"Actions",subCommand:"Undo"},redo:{id:"Redo",icon:"e-redo",tooltip:"Redo",command:"Actions",subCommand:"Redo"},superscript:{id:"SuperScript",icon:"e-super-script",tooltip:"Superscript",command:"Effects",subCommand:"SuperScript"},subscript:{id:"SubScript",icon:"e-sub-script",tooltip:"Subscript",command:"Effects",subCommand:"SubScript"},createlink:{id:"CreateLink",icon:"e-create-link",tooltip:"Insert Hyperlink",command:"Links",subCommand:"CreateLink"},openlink:{id:"OpenLink",icon:"e-open-link",tooltip:"Open Link",command:"Links",subCommand:"OpenLink"},editlink:{id:"EditLink",icon:"e-edit-link",tooltip:"Edit Link",command:"Links",subCommand:"EditLink"},removelink:{id:"RemoveLink",icon:"e-remove-link",tooltip:"Remove Link",command:"Links",subCommand:"RemoveLink"},image:{id:"Image",icon:"e-image",tooltip:"Insert Image",command:"Images",subCommand:"Image"},audio:{id:"Audio",icon:"e-audio",tooltip:"Insert Audio",command:"Audios",subCommand:"Audio"},video:{id:"Video",icon:"e-video",tooltip:"Insert Video",command:"Videos",subCommand:"Video"},filemanager:{id:"FileManager",icon:"e-rte-file-manager",tooltip:"File Manager",command:"Files",subCommand:"File"},createtable:{id:"CreateTable",icon:"e-create-table",tooltip:"Create Table",command:"Table",subCommand:"CreateTable"},removetable:{id:"removeTable",icon:"e-remove-table",tooltip:"Remove Table",command:"removeTable",subCommand:"removeTable"},replace:{id:"Replace",icon:"e-replace",tooltip:"Replace",command:"Images",subCommand:"Replace"},audioreplace:{id:"AudioReplace",icon:"e-audio-replace",tooltip:"Audio Replace",command:"Audios",subCommand:"AudioReplace"},audioremove:{id:"AudioRemove",icon:"e-audio-remove",tooltip:"Audio Remove",command:"Audios",subCommand:"AudioRemove"},audiolayoutoption:{id:"AudioLayoutOption",icon:"e-audio-display",tooltip:"Audio LayoutOption",command:"Audios",subCommand:"AudioLayoutOption"},videoreplace:{id:"VideoReplace",icon:"e-video-replace",tooltip:"Video Replace",command:"Videos",subCommand:"VideoReplace"},videoalign:{id:"VideoAlign",icon:"e-video-align",tooltip:"Video Align",command:"Videos",subCommand:"VideoAlign"},videoremove:{id:"VideoRemove",icon:"e-video-remove",tooltip:"Video Remove",command:"Videos",subCommand:"VideoRemove"},videolayoutoption:{id:"VideoLayoutOption",icon:"e-video-display",tooltip:"Video LayoutOption",command:"Videos",subCommand:"VideoLayoutOption"},videodimension:{id:"VideoDimension",icon:"e-video-dimension",tooltip:"Video Dimension",command:"Videos",subCommand:"VideoDimension"},align:{id:"Align",icon:"e-align",tooltip:"Align",command:"Images",subCommand:"Align"},caption:{id:"Caption",icon:"e-caption",tooltip:"Image Caption",command:"Images",subCommand:"Caption"},remove:{id:"Remove",icon:"e-remove",tooltip:"Remove",command:"Images",subCommand:"Remove"},openimagelink:{id:"OpenImageLink",icon:"e-open-link",tooltip:"Open Link",command:"Images",subCommand:"OpenImageLink"},editimagelink:{id:"EditImageLink",icon:"e-edit-link",tooltip:"Edit Link",command:"Images",subCommand:"EditImageLink"},removeimagelink:{id:"RemoveImageLink",icon:"e-remove-link",tooltip:"Remove Link",command:"Images",subCommand:"RemoveImageLink"},insertlink:{id:"InsertLink",icon:"e-insert-link",tooltip:"Insert Link",command:"Images",subCommand:"InsertLink"},display:{id:"Display",icon:"e-display",tooltip:"Display",command:"Images",subCommand:"Display"},alttext:{id:"AltText",icon:"e-alt-text",tooltip:"Alternative Text",command:"Images",subCommand:"AltText"},dimension:{id:"Dimension",icon:"e-img-dimension",tooltip:"Change Size",command:"Images",subCommand:"Dimension"},fullscreen:{id:"Maximize",icon:"e-maximize",tooltip:"Maximize",command:"View",subCommand:"Maximize"},maximize:{id:"Maximize",icon:"e-maximize",tooltip:"Maximize",command:"FullScreen",subCommand:"Maximize"},minimize:{id:"Minimize",icon:"e-minimize",tooltip:"Minimize",command:"FullScreen",subCommand:"Minimize"},lowercase:{id:"LowerCase",icon:"e-lower-case",tooltip:"Lower Case",command:"Casing",subCommand:"LowerCase"},uppercase:{id:"UpperCase",icon:"e-upper-case",tooltip:"Upper Case",command:"Casing",subCommand:"UpperCase"},print:{id:"Print",icon:"e-print",tooltip:"Print",command:"Print",subCommand:"Print"},formats:{id:"Formats",icon:"e-formats",tooltip:"Formats",command:"Formats",subCommand:"Formats"},sourcecode:{id:"SourceCode",icon:"e-source-code",tooltip:"Code View (Ctrl+Shift+H)",command:"SourceCode",subCommand:"SourceCode"},preview:{id:"Preview",icon:"e-preview",tooltip:"Preview (Ctrl+Shift+H)",command:"Preview",subCommand:"Preview"},viewside:{id:"ViewSide",icon:"e-view-side",tooltip:"ViewSide",command:"ViewSide",subCommand:"ViewSide"},insertcode:{id:"InsertCode",icon:"e-preformat-code",tooltip:"Insert Code",command:"Formats",subCommand:"Pre"},blockquote:{id:"Blockquote",icon:"e-blockquote",tooltip:"Blockquote",command:"Formats",subCommand:"blockquote"},tableheader:{id:"TableHeader",icon:"e-table-header",tooltip:"Table Header",command:"Table",subCommand:"TableHeader"},tableremove:{id:"TableRemove",icon:"e-table-remove",tooltip:"Table Remove",command:"Table",subCommand:"TableRemove"},tablerows:{id:"TableRows",icon:"e-table-rows",tooltip:"Table Rows",command:"Table",subCommand:"TableRows"},tablecolumns:{id:"TableColumns",icon:"e-table-columns",tooltip:"Table Columns",command:"Table",subCommand:"TableColumns"},tablecell:{id:"TableCell",icon:"e-table-cell",tooltip:"Table Cell",command:"Table",subCommand:"TableCell"},tablecellbackground:{id:"TableCellBackground",icon:"e-table-cell-background",tooltip:"Table Cell Background",command:"Table",subCommand:"TableCellBackground"},tablecellhorizontalalign:{id:"TableCellHorizontalAlign",icon:"e-table-cell-horizontalAlign",tooltip:"Table Cell HorizontalAlign",command:"Table",subCommand:"TableCellHorizontalAlign"},tablecellverticalalign:{id:"TableCellVerticalAlign",icon:"e-table-cell-verticalAlign",tooltip:"Table Cell VerticalAlign",command:"Table",subCommand:"TableCellVerticalAlign"},tableeditproperties:{id:"TableEditProperties",icon:"e-table-edit-properties",tooltip:"Table Edit Properties",command:"Table",subCommand:"TableEditProperties"},styles:{id:"Styles",icon:"e-table-styles",tooltip:"Styles",command:"Table",subCommand:"Styles"},formatpainter:{id:"FormatPainter",icon:"e-rte-format-painter",tooltip:"Format Painter",command:"FormatPainter",subCommand:"FormatPainter"},emojipicker:{id:"EmojiPicker",icon:"e-emoji",tooltip:"Emoji Icon",command:"EmojiPicker",subCommand:"EmojiPicker"},inlinecode:{id:"inlineCode",icon:"e-inline-code",tooltip:"inlineCode",command:"Style",subCommand:"InlineCode"}},To=[{locale:"alignmentsDropDownLeft",value:"JustifyLeft"},{locale:"alignmentsDropDownCenter",value:"JustifyCenter"},{locale:"alignmentsDropDownRight",value:"JustifyRight"},{locale:"alignmentsDropDownJustify",value:"JustifyFull"}],Lo=[{iconCss:"e-icons e-justify-left",text:"Align Left",command:"Alignments",subCommand:"JustifyLeft"},{iconCss:"e-icons e-justify-center",text:"Align Center",command:"Alignments",subCommand:"JustifyCenter"},{iconCss:"e-icons e-justify-right",text:"Align Right",command:"Alignments",subCommand:"JustifyRight"},{iconCss:"e-icons e-justify-full",text:"Align Justify",command:"Alignments",subCommand:"JustifyFull"}],So=[{iconCss:"e-icons e-justify-left",command:"Images",subCommand:"JustifyLeft"},{iconCss:"e-icons e-justify-center",command:"Images",subCommand:"JustifyCenter"},{iconCss:"e-icons e-justify-right",command:"Images",subCommand:"JustifyRight"}],Io=[{iconCss:"e-icons e-justify-left",command:"Videos",subCommand:"JustifyLeft"},{iconCss:"e-icons e-justify-center",command:"Videos",subCommand:"JustifyCenter"},{iconCss:"e-icons e-justify-right",command:"Videos",subCommand:"JustifyRight"}],wo=[{locale:"imageDisplayDropDownInline",value:"Inline"},{locale:"imageDisplayDropDownBreak",value:"Break"}],xo=[{locale:"audioLayoutOptionDropDownInline",value:"Inline"},{locale:"audioLayoutOptionDropDownBreak",value:"Break"}],jo=[{locale:"videoLayoutOptionDropDownInline",value:"Inline"},{locale:"videoLayoutOptionDropDownBreak",value:"Break"}],Oo=[{text:"Inline",cssClass:"e-inline",command:"Images",subCommand:"Inline"},{text:"Break",cssClass:"e-break",command:"Images",subCommand:"Break"}],zo=[{text:"Inline",cssClass:"e-audio-inline",command:"Audios",subCommand:"Inline"},{text:"Break",cssClass:"e-audio-break",command:"Audios",subCommand:"Break"}],Ao=[{text:"Inline",cssClass:"e-video-inline",command:"Videos",subCommand:"Inline"},{text:"Break",cssClass:"e-video-break",command:"Videos",subCommand:"Break"}],ko=[{iconCss:"e-icons e-cell-merge",text:"Merge cells",command:"Table",subCommand:"Merge"},{iconCss:"e-icons e-cell-horizontal-split",text:"Horizontal split",command:"Table",subCommand:"HorizontalSplit"},{iconCss:"e-icons e-cell-vertical-split",text:"Vertical split",command:"Table",subCommand:"VerticalSplit"}],Po=[{locale:"tableInsertRowDropDownBefore",value:"InsertRowBefore"},{locale:"tableInsertRowDropDownAfter",value:"InsertRowAfter"},{locale:"tableInsertRowDropDownDelete",value:"DeleteRow"}],Ro=[{iconCss:"e-icons e-insert-row-before",text:"Insert row before",command:"Table",subCommand:"InsertRowBefore"},{iconCss:"e-icons e-insert-row-after",text:"Insert row after",command:"Table",subCommand:"InsertRowAfter"},{iconCss:"e-icons e-delete-row",text:"Delete row",command:"Table",subCommand:"DeleteRow"}],Bo=[{locale:"tableInsertColumnDropDownLeft",value:"InsertColumnLeft"},{locale:"tableInsertColumnDropDownRight",value:"InsertColumnRight"},{locale:"tableInsertColumnDropDownDelete",value:"DeleteColumn"}],Ho=[{iconCss:"e-icons e-insert-column-left",text:"Insert column left",command:"Table",subCommand:"InsertColumnLeft"},{iconCss:"e-icons e-insert-column-right",text:"Insert column right",command:"Table",subCommand:"InsertColumnRight"},{iconCss:"e-icons e-delete-column",text:"Delete column",command:"Table",subCommand:"DeleteColumn"}],Uo=[{locale:"tableVerticalAlignDropDownTop",value:"AlignTop"},{locale:"tableVerticalAlignDropDownMiddle",value:"AlignMiddle"},{locale:"tableVerticalAlignDropDownBottom",value:"AlignBottom"}],Fo=[{iconCss:"e-icons e-align-top",text:"Align Top",command:"Table",subCommand:"AlignTop"},{iconCss:"e-icons e-align-middle",text:"Align Middle",command:"Table",subCommand:"AlignMiddle"},{iconCss:"e-icons e-align-bottom",text:"Align Bottom",command:"Table",subCommand:"AlignBottom"}],Yo=[{locale:"tableStylesDropDownDashedBorder",value:"Dashed"},{locale:"tableStylesDropDownAlternateRows",value:"Alternate"}],Vo=[{text:"Dashed Borders",cssClass:"e-dashed-borders",command:"Table",subCommand:"Dashed"},{text:"Alternate Rows",cssClass:"e-alternate-rows",command:"Table",subCommand:"Alternate"}],Qo=["Bold","Italic","Underline","|","Formats","Alignments","Blockquote","OrderedList","UnorderedList","|","CreateLink","Image","|","SourceCode","Undo","Redo"],qo=[{cssClass:"e-default",text:"Default",command:"Font",subCommand:"FontName",value:""},{cssClass:"e-segoe-ui",text:"Segoe UI",command:"Font",subCommand:"FontName",value:"Segoe UI"},{cssClass:"e-arial",text:"Arial",command:"Font",subCommand:"FontName",value:"Arial,Helvetica,sans-serif"},{cssClass:"e-georgia",text:"Georgia",command:"Font",subCommand:"FontName",value:"Georgia,serif"},{cssClass:"e-impact",text:"Impact",command:"Font",subCommand:"FontName",value:"Impact,Charcoal,sans-serif"},{cssClass:"e-tahoma",text:"Tahoma",command:"Font",subCommand:"FontName",value:"Tahoma,Geneva,sans-serif"},{cssClass:"e-times-new-roman",text:"Times New Roman",command:"Font",subCommand:"FontName",value:"Times New Roman,Times,serif"},{cssClass:"e-verdana",text:"Verdana",command:"Font",subCommand:"FontName",value:"Verdana,Geneva,sans-serif"}],Wo=[{text:"Default",value:""},{text:"8 pt",value:"8pt"},{text:"10 pt",value:"10pt"},{text:"12 pt",value:"12pt"},{text:"14 pt",value:"14pt"},{text:"18 pt",value:"18pt"},{text:"24 pt",value:"24pt"},{text:"36 pt",value:"36pt"}],_o=[{cssClass:"e-paragraph",text:"Paragraph",command:"Formats",subCommand:"P",value:"P"},{cssClass:"e-h1",text:"Heading 1",command:"Formats",subCommand:"H1",value:"H1"},{cssClass:"e-h2",text:"Heading 2",command:"Formats",subCommand:"H2",value:"H2"},{cssClass:"e-h3",text:"Heading 3",command:"Formats",subCommand:"H3",value:"H3"},{cssClass:"e-h4",text:"Heading 4",command:"Formats",subCommand:"H4",value:"H4"},{cssClass:"e-code",text:"preformatted",command:"Formats",subCommand:"Pre",value:"Pre"}],Go={Custom:["","#000000","#e7e6e6","#44546a","#4472c4","#ed7d31","#a5a5a5","#ffc000","#70ad47","#ff0000","#f2f2f2","#808080","#cfcdcd","#d5dce4","#d9e2f3","#fbe4d5","#ededed","#fff2cc","#e2efd9","#ffcccc","#d9d9d9","#595959","#aeaaaa","#acb9ca","#b4c6e7","#f7caac","#dbdbdb","#ffe599","#c5e0b3","#ff8080","#bfbfbf","#404040","#747070","#8496b0","#8eaadb","#f4b083","#c9c9c9","#ffd966","#a8d08d","#ff3333","#a6a6a6","#262626","#3b3838","#323e4f","#2f5496","#c45911","#7b7b7b","#bf8f00","#538135","#b30000","#7f7f7f","#0d0d0d","#161616","#212934","#1f3763","#823b0b","#525252","#7f5f00","#375623","#660000"]},Xo={Custom:["","#000000","#ffff00","#00ff00","#00ffff","#0000ff","#ff0000","#000080","#800080","#996633","#f2f2f2","#808080","#ffffcc","#b3ffb3","#ccffff","#ccccff","#ffcccc","#ccccff","#ff80ff","#f2e6d9","#d9d9d9","#595959","#ffff80","#80ff80","#b3ffff","#8080ff","#ff8080","#8080ff","#ff00ff","#dfbf9f","#bfbfbf","#404040","#ffff33","#33ff33","#33ffff","#3333ff","#ff3333","#0000b3","#b300b3","#c68c53","#a6a6a6","#262626","#e6e600","#00b300","#009999","#000099","#b30000","#000066","#660066","#86592d","#7f7f7f","#0d0d0d","#999900","#006600","#006666","#000066","#660000","#00004d","#4d004d","#734d26"]},Ko=[{text:"None",command:"Lists",subCommand:"NumberFormatList",value:"none"},{text:"Number",command:"Lists",subCommand:"NumberFormatList",value:"decimal"},{text:"Lower Greek",command:"Lists",subCommand:"NumberFormatList",value:"lowerGreek"},{text:"Lower Roman",command:"Lists",subCommand:"NumberFormatList",value:"lowerRoman"},{text:"Upper Alpha",command:"Lists",subCommand:"NumberFormatList",value:"upperAlpha"},{text:"Lower Alpha",command:"Lists",subCommand:"NumberFormatList",value:"lowerAlpha"},{text:"Upper Roman",command:"Lists",subCommand:"NumberFormatList",value:"upperRoman"}],Zo=[{text:"None",command:"Lists",subCommand:"BulletFormatList",value:"none"},{text:"Disc",command:"Lists",subCommand:"BulletFormatList",value:"disc"},{text:"Circle",command:"Lists",subCommand:"BulletFormatList",value:"circle"},{text:"Square",command:"Lists",subCommand:"BulletFormatList",value:"square"}];function Jo(e,t,i){for(var n=0;t.length>n;n++)if(t[n].value===i.subCommand)return e.localeObj.getConstant(t[n].locale);return i.text}var $o={CreateLink:"Ctrl+K",Image:"Ctrl+Shift+I",CreateTable:"Ctrl+Shift+E",Undo:"Ctrl+Z",Redo:"Ctrl+Y",Copy:"Ctrl+C",Cut:"Ctrl+X",Paste:"Ctrl+V",Bold:"Ctrl+B",Italic:"Ctrl+I",Underline:"Ctrl+U",StrikeThrough:"Ctrl+Shift+S",UpperCase:"Ctrl+Shift+U",LowerCase:"Ctrl+Shift+L",SuperScript:"Ctrl+Shift+=",SubScript:"Ctrl+=",SourceCode:"Ctrl+Shift+H",Maximize:"Ctrl+Shift+F",Minimize:"Esc",ClearFormat:"Ctrl+Shift+R",OL:"Ctrl+Shift+O",UL:"Ctrl+Alt+O",NumberFormatList:"Ctrl+Shift+O",BulletFormatList:"Ctrl+Alt+O",Audio:"Ctrl+Shift+A",Video:"Ctrl+Alt+V",Indent:"Ctrl+]",Outdent:"Ctrl+[","Decrease Fontsize":"Ctrl+Shift+<","Increase Fontsize":"Ctrl+Shift+>",JustifyCenter:"Ctrl+E",JustifyFull:"Ctrl+J",JustifyLeft:"Ctrl+L",JustifyRight:"Ctrl+R",FormatPainter:"Alt+Shift+C, Alt+Shift+V",InlineCode:"Ctrl+`"},er=[{name:"Smilies & People",code:"1F600",iconCss:"e-emoji",icons:[{code:"1F600",desc:"Grinning face"},{code:"1F603",desc:"Grinning face with big eyes"},{code:"1F604",desc:"Grinning face with smiling eyes"},{code:"1F606",desc:"Grinning squinting face"},{code:"1F605",desc:"Grinning face with sweat"},{code:"1F602",desc:"Face with tears of joy"},{code:"1F923",desc:"Rolling on the floor laughing"},{code:"1F60A",desc:"Smiling face with smiling eyes"},{code:"1F607",desc:"Smiling face with halo"},{code:"1F642",desc:"Slightly smiling face"},{code:"1F643",desc:"Upside-down face"},{code:"1F60D",desc:"Smiling face with heart-eyes"},{code:"1F618",desc:"Face blowing a kiss"},{code:"1F61B",desc:"Face with tongue"},{code:"1F61C",desc:"Winking face with tongue"},{code:"1F604",desc:"Grinning face with smiling eyes"},{code:"1F469",desc:"Woman"},{code:"1F468",desc:"Man"},{code:"1F467",desc:"Girl"},{code:"1F466",desc:"Boy"},{code:"1F476",desc:"Baby"},{code:"1F475",desc:"Old woman"},{code:"1F474",desc:"Old man"},{code:"1F46E",desc:"Police officer"},{code:"1F477",desc:"Construction worker"},{code:"1F482",desc:"Guard"},{code:"1F575",desc:"Detective"},{code:"1F9D1",desc:"Cook"}]},{name:"Animals & Nature",code:"1F435",iconCss:"e-animals",icons:[{code:"1F436",desc:"Dog face"},{code:"1F431",desc:"Cat face"},{code:"1F42D",desc:"Mouse face"},{code:"1F439",desc:"Hamster face"},{code:"1F430",desc:"Rabbit face"},{code:"1F98A",desc:"Fox face"},{code:"1F43B",desc:"Bear face"},{code:"1F43C",desc:"Panda face"},{code:"1F428",desc:"Koala"},{code:"1F42F",desc:"Tiger face"},{code:"1F981",desc:"Lion face"},{code:"1F42E",desc:"Cow face"},{code:"1F437",desc:"Pig face"},{code:"1F43D",desc:"Pig nose"},{code:"1F438",desc:"Frog face"},{code:"1F435",desc:"Monkey face"},{code:"1F649",desc:"Hear-no-evil monkey"},{code:"1F64A",desc:"Speak-no-evil monkey"},{code:"1F412",desc:"Monkey"},{code:"1F414",desc:"Chicken"},{code:"1F427",desc:"Penguin"},{code:"1F426",desc:"Bird"},{code:"1F424",desc:"Baby chick"},{code:"1F986",desc:"Duck"},{code:"1F985",desc:"Eagle"}]},{name:"Food & Drink",code:"1F347",iconCss:"e-food-and-drinks",icons:[{code:"1F34E",desc:"Red apple"},{code:"1F34C",desc:"Banana"},{code:"1F347",desc:"Grapes"},{code:"1F353",desc:"Strawberry"},{code:"1F35E",desc:"Bread"},{code:"1F950",desc:"Croissant"},{code:"1F955",desc:"Carrot"},{code:"1F354",desc:"Hamburger"},{code:"1F355",desc:"Pizza"},{code:"1F32D",desc:"Hot dog"},{code:"1F35F",desc:"French fries"},{code:"1F37F",desc:"Popcorn"},{code:"1F366",desc:"Soft ice cream"},{code:"1F367",desc:"Shaved ice"},{code:"1F36A",desc:"Cookie"},{code:"1F382",desc:"Birthday cake"},{code:"1F370",desc:"Shortcake"},{code:"1F36B",desc:"Chocolate bar"},{code:"1F369",desc:"Donut"},{code:"1F36E",desc:"Custard"},{code:"1F36D",desc:"Lollipop"},{code:"1F36C",desc:"Candy"},{code:"1F377",desc:"Wine glass"},{code:"1F37A",desc:"Beer mug"},{code:"1F37E",desc:"Bottle with popping cork"}]},{name:"Activities",code:"1F383",iconCss:"e-activities",icons:[{code:"26BD",desc:"Soccer ball"},{code:"1F3C0",desc:"Basketball"},{code:"1F3C8",desc:"American football"},{code:"26BE",desc:"Baseball"},{code:"1F3BE",desc:"Tennis"},{code:"1F3D0",desc:"Volleyball"},{code:"1F3C9",desc:"Rugby football"},{code:"1F3B1",desc:"Pool 8 ball"},{code:"1F3D3",desc:"Ping pong"},{code:"1F3F8",desc:"Badminton"},{code:"1F94A",desc:"Boxing glove"},{code:"1F3CA",desc:"Swimmer"},{code:"1F3CB",desc:"Weightlifter"},{code:"1F6B4",desc:"Bicyclist"},{code:"1F6F9",desc:"Skateboard"},{code:"1F3AE",desc:"Video game"},{code:"1F579",desc:"Joystick"},{code:"1F3CF",desc:"Cricket"},{code:"1F3C7",desc:"Horse racing"},{code:"1F3AF",desc:"Direct hit"},{code:"1F3D1",desc:"Field hockey"},{code:"1F3B0",desc:"Slot machine"},{code:"1F3B3",desc:"Bowling"},{code:"1F3B2",desc:"Game die"},{code:"265F",desc:"Chess pawn"}]},{name:"Travel & Places",code:"1F30D",iconCss:"e-travel-and-places",icons:[{code:"2708",desc:"Airplane"},{code:"1F697",desc:"Automobile"},{code:"1F695",desc:"Taxi"},{code:"1F6B2",desc:"Bicycle"},{code:"1F68C",desc:"Bus"},{code:"1F682",desc:"Locomotive"},{code:"1F6F3",desc:"Passenger ship"},{code:"1F680",desc:"Rocket"},{code:"1F681",desc:"Helicopter"},{code:"1F6A2",desc:"Ship"},{code:"1F3DF",desc:"Stadium"},{code:"1F54C",desc:"Mosque"},{code:"26EA",desc:"Church"},{code:"1F6D5",desc:"Hindu Temple"},{code:"1F3D4",desc:"Snow-capped mountain"},{code:"1F3EB",desc:"School"},{code:"1F30B",desc:"Volcano"},{code:"1F3D6",desc:"Beach with umbrella"},{code:"1F3DD",desc:"Desert island"},{code:"1F3DE",desc:"National park"},{code:"1F3F0",desc:"Castle"},{code:"1F5FC",desc:"Tokyo tower"},{code:"1F5FD",desc:"Statue of liberty"},{code:"26E9",desc:"Shinto shrine"},{code:"1F3EF",desc:"Japanese castle"},{code:"1F3A2",desc:"Roller coaster"}]},{name:"Objects",code:"1F507",iconCss:"e-objects",icons:[{code:"1F4A1",desc:"Light bulb"},{code:"1F526",desc:"Flashlight"},{code:"1F4BB",desc:"Laptop computer"},{code:"1F5A5",desc:"Desktop computer"},{code:"1F5A8",desc:"Printer"},{code:"1F4F7",desc:"Camera"},{code:"1F4F8",desc:"Camera with flash"},{code:"1F4FD",desc:"Film projector"},{code:"1F3A5",desc:"Movie camera"},{code:"1F4FA",desc:"Television"},{code:"1F4FB",desc:"Radio"},{code:"1F50B",desc:"Battery"},{code:"231A",desc:"Watch"},{code:"1F4F1",desc:"Mobile phone"},{code:"260E",desc:"Telephone"},{code:"1F4BE",desc:"Floppy disk"},{code:"1F4BF",desc:"Optical disk"},{code:"1F4C0",desc:"Digital versatile disc"},{code:"1F4BD",desc:"Computer disk"},{code:"1F3A7",desc:"Headphone"},{code:"1F3A4",desc:"Microphone"},{code:"1F3B6",desc:"Multiple musical notes"},{code:"1F4DA",desc:"Books"}]},{name:"Symbols",code:"1F3E7",iconCss:"e-symbols",icons:[{code:"274C",desc:"Cross mark"},{code:"2714",desc:"Check mark"},{code:"26A0",desc:"Warning sign"},{code:"1F6AB",desc:"Prohibited"},{code:"2139",desc:"Information"},{code:"267B",desc:"Recycling symbol"},{code:"1F6AD",desc:"No smoking"},{code:"1F4F5",desc:"No mobile phones"},{code:"1F6AF",desc:"No littering"},{code:"1F6B3",desc:"No bicycles"},{code:"1F6B7",desc:"No pedestrians"},{code:"2795",desc:"Plus"},{code:"2796",desc:"Minus"},{code:"2797",desc:"Divide"},{code:"2716",desc:"Multiplication"},{code:"1F4B2",desc:"Dollar banknote"},{code:"1F4AC",desc:"Speech balloon"},{code:"2755",desc:"White exclamation mark"},{code:"2754",desc:"White question mark"},{code:"2764",desc:"Heart"}]}],tr={alignments:"Alignments",justifyLeft:"Align Left",justifyCenter:"Align Center",justifyRight:"Align Right",justifyFull:"Align Justify",fontName:"Font Name",fontSize:"Font Size",fontColor:"Font Color",backgroundColor:"Background Color",importWord:"Import from Word",exportWord:"Export to Word",exportPdf:"Export to PDF",bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",clearFormat:"Clear Format",clearAll:"Clear All",cut:"Cut",copy:"Copy",paste:"Paste",unorderedList:"Bulleted List",orderedList:"Numbered List",indent:"Increase Indent",outdent:"Decrease Indent",undo:"Undo",redo:"Redo",superscript:"Superscript",subscript:"Subscript",createLink:"Insert Link",openLink:"Open Link",editLink:"Edit Link",removeLink:"Remove Link",image:"Insert Image",audio:"Insert Audio",video:"Insert Video",replace:"Replace",numberFormatList:"Number Format List",bulletFormatList:"Bullet Format List",audioReplace:"Replace",videoReplace:"Replace",videoAlign:"Align",videoDimension:"Dimension",audioRemove:"Remove",videoRemove:"Remove",audioLayoutOption:"Layout option",videoLayoutOption:"Layout option",align:"Align",caption:"Caption",remove:"Remove",insertLink:"Insert Link",display:"Display",altText:"Alternative text",dimension:"Change Size",fullscreen:"Maximize",maximize:"Maximize",minimize:"Minimize",lowerCase:"Lower Case",upperCase:"Upper Case",print:"Print",formats:"Formats",sourcecode:"Code View",preview:"Preview",viewside:"ViewSide",insertCode:"Insert Code",blockquote:"Blockquote",linkText:"Display text",linkTooltipLabel:"Title",linkWebUrl:"Web address",linkTitle:"Enter a title",linkurl:"https://example.com",linkOpenInNewWindow:"Open link in new window",linkHeader:"Insert Link",dialogInsert:"Insert",dialogCancel:"Cancel",dialogUpdate:"Update",imageHeader:"Insert Image",audioHeader:"Insert Audio",videoHeader:"Insert Video",imageLinkHeader:"You can also provide a link from the web",audioLinkHeader:"You can also provide a link from the web",videoLinkHeader:"Web URL",embedVideoLinkHeader:"Media Embed URL",mdimageLink:"Please provide a URL for your image",imageUploadMessage:"Drop image here or browse to upload",audioUploadMessage:"Drop an audio file or browse to upload",videoUploadMessage:"Drop a video file or browse to upload",imageDeviceUploadMessage:"Click here to upload",audioDeviceUploadMessage:"Click here to upload",videoDeviceUploadMessage:"Click here to upload",imageAlternateText:"Alternate Text",alternateHeader:"Alternative Text",browse:"Browse",imageUrl:"https://example.com/image.png",audioUrl:"https://example.com/audio.mp3",videoUrl:"https://example.com/video.mp4",webUrl:"Web URL",embedUrl:"Embed Code",imageCaption:"Caption",imageSizeHeader:"Image Size",videoSizeHeader:"Video Size",imageHeight:"Height",imageWidth:"Width",videoHeight:"Height",videoWidth:"Width",textPlaceholder:"Enter text",inserttablebtn:"Insert Table",tabledialogHeader:"Insert Table",tableWidth:"Width",cellpadding:"Cell Padding",cellspacing:"Cell Spacing",columns:"Number of columns",rows:"Number of rows",tableRows:"Row",tableColumns:"Column",tableCellHorizontalAlign:"Table Cell Horizontal Align",tableCellVerticalAlign:"Vertical Align",createTable:"Create Table",removeTable:"Remove Table",tableHeader:"Header Row",tableRemove:"Delete Table",tableCellBackground:"Table Cell Background",tableEditProperties:"Table Edit Properties",styles:"Styles",insertColumnLeft:"Insert Column Left",insertColumnRight:"Insert Column Right",deleteColumn:"Delete Column",insertRowBefore:"Insert Row Before",insertRowAfter:"Insert Row After",deleteRow:"Delete Row",tableEditHeader:"Edit Table",TableHeadingText:"Heading",TableColText:"Col",imageInsertLinkHeader:"Insert Link",editImageHeader:"Edit Image",editAudioHeader:"Edit Audio",editVideoHeader:"Edit Video",alignmentsDropDownLeft:"Align Left",alignmentsDropDownCenter:"Align Center",alignmentsDropDownRight:"Align Right",alignmentsDropDownJustify:"Align Justify",imageDisplayDropDownInline:"Inline",imageDisplayDropDownBreak:"Break",audioLayoutOptionDropDownInline:"Inline",audioLayoutOptionDropDownBreak:"Break",videoLayoutOptionDropDownInline:"Inline",videoLayoutOptionDropDownBreak:"Break",tableInsertRowDropDownBefore:"Insert row before",tableInsertRowDropDownAfter:"Insert row after",tableInsertRowDropDownDelete:"Delete row",tableInsertColumnDropDownLeft:"Insert column left",tableInsertColumnDropDownRight:"Insert column right",tableInsertColumnDropDownDelete:"Delete column",tableVerticalAlignDropDownTop:"Align Top",tableVerticalAlignDropDownMiddle:"Align Middle",tableVerticalAlignDropDownBottom:"Align Bottom",tableStylesDropDownDashedBorder:"Dashed Borders",tableStylesDropDownAlternateRows:"Alternate Rows",pasteFormat:"Paste Format",pasteFormatContent:"Choose the formatting action",plainText:"Plain Text",cleanFormat:"Clean",keepFormat:"Keep",pasteDialogOk:"OK",pasteDialogCancel:"Cancel",fileManager:"File Manager",fileDialogHeader:"File Browser",formatsDropDownParagraph:"Paragraph",formatsDropDownCode:"Preformatted",formatsDropDownQuotation:"Blockquote",formatsDropDownHeading1:"Heading 1",formatsDropDownHeading2:"Heading 2",formatsDropDownHeading3:"Heading 3",formatsDropDownHeading4:"Heading 4",fontNameSegoeUI:"Segoe UI",fontNameArial:"Arial",fontNameGeorgia:"Georgia",fontNameImpact:"Impact",fontNameTahoma:"Tahoma",fontNameTimesNewRoman:"Times New Roman",fontNameVerdana:"Verdana",numberFormatListNumber:"Number",numberFormatListLowerAlpha:"Lower Alpha",numberFormatListUpperAlpha:"Upper Alpha",numberFormatListLowerRoman:"Lower Roman",numberFormatListUpperRoman:"Upper Roman",numberFormatListLowerGreek:"Lower Greek",bulletFormatListDisc:"Disc",bulletFormatListCircle:"Circle",bulletFormatListSquare:"Square",numberFormatListNone:"None",bulletFormatListNone:"None",formatPainter:"Format Painter",emojiPicker:"Emoji Picker",embeddedCode:"Embedded code",pasteEmbeddedCodeHere:"Paste embedded code here",emojiPickerTypeToFind:"Type to find",emojiPickerNoResultFound:"No results found",emojiPickerTrySomethingElse:"Try something else",linkAriaLabel:"Open in new window",imageLinkAriaLabel:"Open in new window",unsupportedImage:"Unsupported file format",mergecells:"Merge cells",verticalsplit:"Vertical split",horizontalsplit:"Horizontal split",inlinecode:"Inline Code",slashMenuItemHeadingOneText:"Heading 1",slashMenuItemHeadingOneDescription:"Use this for a top level heading or title.",slashMenuItemHeadingTwoText:"Heading 2",slashMenuItemHeadingTwoDescription:"Use this for key sections.",slashMenuItemHeadingThreeText:"Heading 3",slashMenuItemHeadingThreeDescription:"Use this for sub sections and group headings.",slashMenuItemHeadingFourText:"Heading 4",slashMenuItemHeadingFourDescription:"Use this for the key points of the sub topics.",slashMenuItemParagraphText:"Paragraph",slashMenuItemParagraphDescription:"Writing with paragraphs.",slashMenuItemBlockquoteText:"Blockquote",slashMenuItemBlockquoteDescription:"Create a quote or citation.",slashMenuItemOrderedListText:"Ordered List",slashMenuItemOrderedListDescription:"Create an ordered list.",slashMenuItemUnorderedListText:"Unordered List",slashMenuItemUnorderedListDescription:"Create an unordered list.",slashMenuItemCodeText:"CodeBlock",slashMenuItemCodeDescription:"Create a preformatted code block.",slashMenuItemTableText:"Table",slashMenuItemTableDescription:"Insert a table.",slashMenuItemLinkText:"Link",slashMenuItemLinkDescription:"Insert a link.",slashMenuItemImageText:"Image",slashMenuItemImageDescription:"Insert an image.",slashMenuItemAudioText:"Audio",slashMenuItemAudioDescription:"Insert an audio.",slashMenuItemVideoText:"Video",slashMenuItemVideoDescription:"Insert a video.",slashMenuItemEmojiText:"Emojipicker",slashMenuItemEmojiDescription:"Use emojis to express ideas and emoticons."},ir={alignments:"alignments",justifyleft:"justifyLeft",justifycenter:"justifyCenter",justifyright:"justifyRight",justifyfull:"justifyFull",fontname:"fontName",fontsize:"fontSize",fontcolor:"fontColor",backgroundcolor:"backgroundColor",importword:"importWord",exportword:"exportWord",exportpdf:"exportPdf",bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",clearformat:"clearFormat",clearall:"clearAll",cut:"cut",copy:"copy",paste:"paste",unorderedlist:"unorderedList",orderedlist:"orderedList",indent:"indent",outdent:"outdent",numberformatlist:"numberFormatList",bulletformatlist:"bulletFormatList",undo:"undo",redo:"redo",filemanager:"fileManager",superscript:"superscript",subscript:"subscript",createlink:"createLink",openlink:"openLink",editlink:"editLink",removelink:"removeLink",openimagelink:"openLink",editimagelink:"editLink",removeimagelink:"removeLink",image:"image",audio:"audio",video:"video",replace:"replace",audioreplace:"audioReplace",videoreplace:"videoReplace",videoalign:"videoAlign",videodimension:"videoDimension",audioremove:"audioRemove",videoremove:"videoRemove",audiolayoutoption:"audioLayoutOption",videolayoutoption:"videoLayoutOption",align:"align",caption:"caption",remove:"remove",insertlink:"insertLink",display:"display",alttext:"imageAlternateText",dimension:"dimension",fullscreen:"fullscreen",maximize:"maximize",minimize:"minimize",lowercase:"lowerCase",uppercase:"upperCase",print:"print",formats:"formats",sourcecode:"sourcecode",preview:"preview",viewside:"viewside",insertcode:"insertCode",blockquote:"blockquote",tablerows:"tableRows",tablecolumns:"tableColumns",tablecellhorizontalalign:"tableCellHorizontalAlign",tablecellverticalalign:"tableCellVerticalAlign",createtable:"createTable",removetable:"removeTable",tableheader:"tableHeader",tableremove:"tableRemove",tablecellbackground:"tableCellBackground",tableeditproperties:"tableEditProperties",styles:"styles",insertcolumnleft:"insertColumnLeft",insertcolumnright:"insertColumnRight",deletecolumn:"deleteColumn",aligntop:"AlignTop",alignmiddle:"AlignMiddle",alignbottom:"AlignBottom",insertrowbefore:"insertRowBefore",insertrowafter:"insertRowAfter",deleterow:"deleteRow",formatpainter:"formatPainter",emojipicker:"emojiPicker",embeddedCode:"Embedded code",pasteEmbeddedCodeHere:"Paste embedded code here",emojiPickerTypeToFind:"Type to find",emojiPickerNoResultFound:"No results found",emojiPickerTrySomethingElse:"Try something else",inlinecode:"inlinecode"},nr=[{locale:"fontNameSegoeUI",value:"Segoe UI"},{locale:"fontNameArial",value:"Arial,Helvetica,sans-serif"},{locale:"fontNameGeorgia",value:"Georgia,serif"},{locale:"fontNameImpact",value:"Impact,Charcoal,sans-serif"},{locale:"fontNameTahoma",value:"Tahoma,Geneva,sans-serif"},{locale:"fontNameTimesNewRoman",value:"Times New Roman,Times,serif"},{locale:"fontNameVerdana",value:"Verdana,Geneva,sans-serif"}],or=[{locale:"formatsDropDownParagraph",value:"P"},{locale:"formatsDropDownCode",value:"Pre"},{locale:"formatsDropDownHeading1",value:"H1"},{locale:"formatsDropDownHeading2",value:"H2"},{locale:"formatsDropDownHeading3",value:"H3"},{locale:"formatsDropDownHeading4",value:"H4"}],rr=[{locale:"numberFormatListNone",value:"none"},{locale:"numberFormatListNumber",value:"decimal"},{locale:"numberFormatListLowerAlpha",value:"lowerAlpha"},{locale:"numberFormatListUpperAlpha",value:"upperAlpha"},{locale:"numberFormatListLowerRoman",value:"lowerRoman"},{locale:"numberFormatListUpperRoman",value:"upperRoman"},{locale:"numberFormatListLowerGreek",value:"lowerGreek"}],sr=[{locale:"bulletFormatListNone",value:"none"},{locale:"bulletFormatListDisc",value:"disc"},{locale:"bulletFormatListCircle",value:"circle"},{locale:"bulletFormatListSquare",value:"square"}],ar=["Undo","Redo"],lr=["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","font","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","strike","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"];function cr(e,t){var i=-1;return t.some((function(t,n){return"string"==typeof t&&e===t.toLocaleLowerCase()&&(i=n,!0)})),i}function hr(e,t,i,n){var o,r;if(0===e.length&&"FontSize"===t)return"Font Size";for(var s=0;s<e.length;s++){if("value"===i&&e[s].value.toLocaleLowerCase()===t.toLocaleLowerCase()){o=e[s];break}if("text"===i&&e[s].text.toLocaleLowerCase()===t.toLocaleLowerCase()){o=e[s];break}if("subCommand"===i&&e[s].subCommand.toLocaleLowerCase()===t.toLocaleLowerCase()){o=e[s];break}}if(!g(o))switch(n){case"text":r=o.text;break;case"value":r=o.value;break;case"iconCss":r=o.iconCss}return r}function dr(){var e=!1;return Q.isDevice&&Q.isIos&&(e=!0),e}function pr(e){return g(e)?"":e}function ur(e,t){var i=t.getService("rteLocale"),n=ir[""+e];return i.getConstant(n)}function mr(e){return"object"==typeof e?e:[e]}function gr(e,t){for(var i=[],n=0;n<e.length;n++)for(var o=0;o<t.length;o++)if("Separator"!==t[o].type){if(("OrderedList"===e[n]||"NumberFormatList"===e[n])&&"OL"===t[o].subCommand){i.push(o);break}if(("UnorderedList"===e[n]||"BulletFormatList"===e[n])&&"UL"===t[o].subCommand){i.push(o);break}if("InsertCode"===e[n]&&"Pre"===t[o].subCommand){i.push(o);break}if("Blockquote"===e[n]&&"blockquote"===t[o].subCommand){i.push(o);break}if("FileManager"===e[n]&&"File"===t[o].subCommand){i.push(o);break}if("object"==typeof e[n]&&"Custom"===e[n].command){i.push(n);break}if(e[n]===t[o].subCommand){i.push(o);break}}return i}function fr(e,t){for(var i=0,n=gr(mr(ar),e.toolbarObj.items),o=oe("."+Kn,e.toolbarObj.element),r=0,s=Object.keys(t);r<s.length;r++){var a=s[r],l=o[n[i]];l&&e.toolbarObj.enableItems(l,t[""+a]),i++}}function yr(e,t){var i=[];for(t=t.firstChild;t;t=t.nextSibling)3===t.nodeType?i.push(t):i=i.concat(yr(e,t));return i}function vr(e){for(var t={},i=Object.keys(e),n=0;n<Object.keys(e).length;n++)t[i[n].toLocaleLowerCase()]=e[i[n]];return t}function br(e,t){var i;return null!==e&&""!==e?(i=t.enableHtmlEncode?Mr(Er(e),t):Mr(e,t),t.setProperties({value:i},!0)):i="DIV"===t.enterKey?t.enableHtmlEncode?"&lt;div&gt;&lt;br/&gt;&lt;/div&gt;":"<div><br/></div>":"BR"===t.enterKey?t.enableHtmlEncode?"&lt;br/&gt;":"<br/>":t.enableHtmlEncode?"&lt;p&gt;&lt;br/&gt;&lt;/p&gt;":"<p><br/></p>",i}function Mr(e,t){var i=document.createElement("div"),n=document.createElement("div"),o=i.childNodes;if(i.innerHTML=e,i.setAttribute("class","tempDiv"),o.length>0){for(var r=void 0,s=void 0,a=void 0;i.firstChild;){for(var l=i.querySelectorAll("address:empty, article:empty, aside:empty, blockquote:empty,\n details:empty, dd:empty, div:empty, dl:empty, dt:empty, fieldset:empty, footer:empty,form:empty, h1:empty,\n h2:empty, h3:empty, h4:empty, h5:empty, h6:empty, header:empty, hgroup:empty, li:empty, main:empty, nav:empty,\n noscript:empty, output:empty, p:empty, pre:empty, section:empty, td:empty, th:empty"),c=0;c<l.length;c++)l[c].innerHTML="<br>";var h=i.querySelectorAll("p");for(c=0;c<h.length;c++)0===h[c].textContent.trim().length&&1===h[c].childNodes.length&&"#text"===h[c].childNodes[0].nodeName&&g(h[c].childNodes[0].textContent.match(/\u00a0/g))&&(h[c].innerHTML="<br>");var d=i.querySelectorAll("a:empty, abbr:empty, acronym:empty, b:empty, bdi:empty, bdo:empty, big:empty, button:empty,\ncanvas:empty, cite:empty, code:empty, data:empty, datalist:empty, del:empty, dfn:empty, em:empty, font:empty, i:empty, iframe:empty,\nins:empty, kbd:empty, label:empty, map:empty, mark:empty, meter:empty, noscript:empty, object:empty, output:empty, picture:empty, progress:empty,\nq:empty, ruby:empty, s:empty, samp:empty, script:empty, select:empty, slot:empty, small:empty, span:empty, strong:empty, strike:empty, sub:empty, sup:empty, svg:empty,\ntemplate:empty, textarea:empty, time:empty, u:empty, tt:empty, var:empty, wbr:empty");for(c=0;c<d.length;c++)d[c].innerHTML="&ZeroWidthSpace;";"BR"!==t.enterKey&&("#text"===i.firstChild.nodeName&&(i.firstChild.textContent.indexOf("\n")<0||""!==i.firstChild.textContent.trim())||lr.indexOf(i.firstChild.nodeName.toLocaleLowerCase())>=0)?(r?s.appendChild(i.firstChild):(a="DIV"===t.enterKey?_("div"):_("p"),n.appendChild(a),a.appendChild(i.firstChild)),s=a,r=!0):"#text"===i.firstChild.nodeName&&("\n"===i.firstChild.textContent||i.firstChild.textContent.indexOf("\n")>=0&&""===i.firstChild.textContent.trim())?ee(i.firstChild):(n.appendChild(i.firstChild),r=!1)}var p=n.querySelectorAll("img");for(c=0;c<p.length;c++)p[c].classList.contains("e-rte-image-unsupported")||(p[c].classList.contains(bo)||p[c].classList.add(bo),p[c].classList.contains(oo)||p[c].classList.contains("e-imgbreak")||p[c].classList.contains("e-imgleft")||p[c].classList.contains("e-imgright")||p[c].classList.contains("e-imgcenter")||p[c].classList.add(oo))}return n.innerHTML}function Nr(e){return"DIV"===e.enterKey?e.enableHtmlEncode?"&lt;div&gt;&lt;br/&gt;&lt;/div&gt;":"<div><br/></div>":"BR"===e.enterKey?e.enableHtmlEncode?"&lt;br/&gt;":"<br/>":e.enableHtmlEncode?"&lt;p&gt;&lt;br/&gt;&lt;/p&gt;":"<p><br/></p>"}function Cr(e){return"<p><br></p>"===e||"&lt;p&gt;&lt;br&gt;&lt;/p&gt;"===e||"<div><br></div>"===e||"&lt;div&gt;&lt;br&gt;&lt;/div&gt;"===e||"<br>"===e||"&lt;br&gt;"===e||""===e}function Er(e){return e.replace(/&amp;/g,"&").replace(/&amp;lt;/g,"<").replace(/&lt;/g,"<").replace(/&amp;gt;/g,">").replace(/&gt;/g,">").replace(/&nbsp;/g," ").replace(/&amp;nbsp;/g," ").replace(/&quot;/g,"")}function Dr(e,t){if(t.enableHtmlSanitizer){var i=Si.beforeSanitize();i.selectors.tags[2]&&i.selectors.tags[2].indexOf("iframe")>-1&&(i.selectors.tags[2]="iframe:not(.e-rte-embed-url)");m(i,i,{cancel:!1,helper:null}),t.trigger("beforeSanitizeHtml",i),i.cancel&&!g(i.helper)?e=i.helper(e):i.cancel||(e=Si.serializeValue(i,e))}return e=function(e){var t=_("div");e=e.replace(/&(times|divide|ne)/g,"&amp;amp;$1"),t.innerHTML=e,t.querySelectorAll("font").forEach((function(e){var t=document.createElement("span"),i=(e.getAttribute("style")||"").replace(/style:/gi,"").trim();g(i)||""===i.trim()||i.endsWith(";")||(i+=";"),Array.from(e.attributes).forEach((function(e){var t=e.name.toLowerCase(),n=e.value;switch(t){case"size":i+="font-size:"+n+";";break;case"face":i+="font-family:"+n+";";break;case"bgcolor":i+="background-color:"+n+";";break;case"style":break;default:i+=t+":"+n+";"}})),g(i)||""===i.trim()||(i=i.replace(/;;+/g,";"),t.setAttribute("style",i)),t.innerHTML=e.innerHTML,g(e.parentNode)||e.parentNode.replaceChild(t,e)}));var i=t.innerHTML;return t.remove(),i}(e)}function Tr(e,t,i){for(var n=0;t.length>n;n++)if(t[n].value===i.value||t[n].value===i.subCommand)return e.localeObj.getConstant(t[n].locale);return i.text}function Lr(e,t){if(t&&"HTML"===t&&e){var i=document.createElement("div");i.innerHTML=e,i.querySelectorAll(".e-img-inner").forEach((function(e){e.setAttribute("contenteditable","true")})),e=i.innerHTML,i.remove()}return e}function Sr(e,t){if(e&&t){var i=document.createElement("div");if("HTML"===t){i.innerHTML=e,i.querySelectorAll(".e-img-inner").forEach((function(e){e.setAttribute("contenteditable","false")}));var n=i.querySelectorAll(".e-column-resize, .e-row-resize, .e-table-box, .e-table-rhelper, .e-img-resize, .e-vid-resize");if(n.length>0)for(var o=0;o<n.length;o++)ee(n[o]);Ir(i)}else i.textContent=e;return"Markdown"===t?i.innerHTML.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&"):i.innerHTML}return e}function Ir(e){for(var t=["e-img-focus",go,yo,fo,"e-video-focus","e-audio-focus","e-resize","e-rte-drag-image"],i=0;i<t.length;i++){var n=e.querySelectorAll("."+t[i]);if(X(n,t[i]),0!==n.length)for(var o=0;o<n.length;o++)0===n[o].classList.length&&n[o].removeAttribute("class"),"IMG"!==n[o].nodeName&&"VIDEO"!==n[o].nodeName||""===n[o].style.outline||(n[o].style.outline="")}e.querySelectorAll('[class=""]').forEach((function(e){e.removeAttribute("class")}))}function wr(e){qo.forEach((function(t,i){qo[i].text=Tr(e,nr,qo[i])})),_o.forEach((function(t,i){_o[i].text=Tr(e,or,_o[i])})),Ko.forEach((function(t,i){Ko[i].text=Tr(e,rr,Ko[i])})),Zo.forEach((function(t,i){Zo[i].text=Tr(e,sr,Zo[i])}))}var xr=function(){function e(e){this.parent=e}return e.prototype.renderPanel=function(){var e=this.parent,t=this.parent.createElement("div",{className:"e-rte-content",id:this.parent.getID()+"rte-view"}),i=br(e.value,e);this.editableElement=this.parent.createElement("div",{className:"e-content",id:this.parent.getID()+"_rte-edit-view",attrs:{contenteditable:"true"}}),g(this.parent.fontFamily.default)||(this.editableElement.style.fontFamily=this.parent.fontFamily.default),g(this.parent.fontSize.default)||(this.editableElement.style.fontSize=this.parent.fontSize.default),this.editableElement.innerHTML=i,t.appendChild(this.editableElement),this.setPanel(t),e.rootContainer.appendChild(t)},e.prototype.getPanel=function(){return this.contentPanel},e.prototype.getEditPanel=function(){return this.editableElement},e.prototype.getText=function(){var e=this.getEditPanel().innerText;return"\n"===e?"":e},e.prototype.setPanel=function(e){this.contentPanel=e},e.prototype.getDocument=function(){return this.getEditPanel().ownerDocument},e}(),jr=function(){function e(e,t){this.parent=e,this.locator=t,this.renderer=this.locator.getService("rendererFactory"),this.addEventListener()}return e.prototype.render=function(){this.parent,this.contentRenderer=this.renderer.getRenderer(bi.Content),this.contentRenderer.renderPanel()},e.prototype.refresh=function(e){void 0===e&&(e={requestType:"refresh"}),this.parent.notify(e.requestType+"-begin",e)},e.prototype.destroy=function(){g(this.parent)||(this.removeEventListener(),this.locator.destroy(),this.renderer.destroy())},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(Ui,this.refresh,this),this.parent.on(Fi,this.keyUp,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Ui,this.refresh),this.parent.off(Fi,this.keyUp))},e.prototype.keyUp=function(e){if("HTML"===this.parent.editorMode)switch(e.args.which){case 46:case 8:var t=this.parent.contentModule.getEditPanel().childNodes;if(0===t.length||1===t.length&&0===t[0].childNodes.length&&("BR"===t[0].tagName||("P"===t[0].tagName||"DIV"===t[0].tagName)&&""===t[0].textContent)){var i=this.parent.contentModule.getEditPanel();"DIV"===this.parent.enterKey?i.innerHTML="<div><br/></div>":"BR"===this.parent.enterKey?i.innerHTML="<br/>":i.innerHTML="<p><br/></p>",this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),i.childNodes[0],0)}}},e}(),Or=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),zr=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ar="e-rtl",kr="e-overlay",Pr="e-nav-arrow",Rr="e-nav-right-arrow",Br="e-nav-left-arrow",Hr="e-scroll-nav",Ur="e-scroll-right-nav",Fr="e-scroll-left-nav",Yr="e-scroll-device",Vr="e-scroll-overlay",Qr="e-scroll-right-overlay",qr="e-scroll-left-overlay",Wr=function(e){function t(t,i){return e.call(this,t,i)||this}return Or(t,e),t.prototype.preRender=function(){this.browser=Q.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=Q.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=y("hscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add(Ar)},t.prototype.render=function(){this.touchModule=new qt(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),q.add(this.scrollEle,"scroll",this.scrollHandler,this),this.isDevice?(this.element.classList.add(Yr),this.createOverlay(this.element)):this.createNavIcon(this.element),this.setScrollState()},t.prototype.setScrollState=function(){g(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetWidth,this.customStep=!1):this.customStep=!0},t.prototype.initialize=function(){var e=this.createElement("div",{className:"e-hscroll-content"}),t=this.createElement("div",{className:"e-hscroll-bar"});t.setAttribute("tabindex","-1");for(var i=this.element,n=0,o=[].slice.call(i.children);n<o.length;n++){var r=o[n];e.appendChild(r)}t.appendChild(e),i.appendChild(t),t.style.overflowX="hidden",this.scrollEle=t,this.scrollItems=e},t.prototype.getPersistData=function(){return this.addOnPersist(["scrollStep"])},t.prototype.getModuleName=function(){return"hScroll"},t.prototype.destroy=function(){var t=this.element;t.style.display="",t.classList.remove("e-hscroll"),t.classList.remove(Yr),t.classList.remove(Ar);var i=oe(".e-"+t.id+"_nav."+Hr,t),n=oe("."+Vr,t);[].slice.call(n).forEach((function(e){ee(e)}));for(var o=0,r=[].slice.call(this.scrollItems.children);o<r.length;o++){var s=r[o];t.appendChild(s)}this.uniqueId&&this.element.removeAttribute("id"),ee(this.scrollEle),i.length>0&&(ee(i[0]),g(i[1])||ee(i[1])),q.remove(this.scrollEle,"scroll",this.scrollHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},t.prototype.disable=function(e){var t=oe(".e-scroll-nav:not(."+kr+")",this.element);e?this.element.classList.add(kr):this.element.classList.remove(kr),[].slice.call(t).forEach((function(t){t.setAttribute("tabindex",e?"-1":"0")}))},t.prototype.createOverlay=function(e){var t=e.id.concat("_nav"),i=this.createElement("div",{className:Vr+" "+Qr}),n="e-"+e.id.concat("_nav "+Hr+" "+Ur),o=this.createElement("div",{id:t.concat("_right"),className:n}),r=this.createElement("div",{className:Rr+" "+Pr+" e-icons"});o.appendChild(r);var s=this.createElement("div",{className:Vr+" "+qr});this.ieCheck&&o.classList.add("e-ie-align"),e.appendChild(i),e.appendChild(o),e.insertBefore(s,e.firstChild),this.eventBinding([o])},t.prototype.createNavIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav "+Hr+" "+Ur),n={role:"button",id:t.concat("_right"),"aria-label":"Scroll right"},o=this.createElement("div",{className:i,attrs:n});o.setAttribute("aria-disabled","false");var r=this.createElement("div",{className:Rr+" "+Pr+" e-icons"}),s="e-"+e.id.concat("_nav "+Hr+" "+Fr),a={role:"button",id:t.concat("_left"),"aria-label":"Scroll left"},l=this.createElement("div",{className:s+" "+kr,attrs:a});l.setAttribute("aria-disabled","true");var c=this.createElement("div",{className:Br+" "+Pr+" e-icons"});l.appendChild(c),o.appendChild(r),e.appendChild(o),e.insertBefore(l,e.firstChild),this.ieCheck&&(o.classList.add("e-ie-align"),l.classList.add("e-ie-align")),this.eventBinding([o,l])},t.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){this.keyTimer=window.setTimeout((function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)}),100)}},t.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},t.prototype.eventBinding=function(e){var t=this;[].slice.call(e).forEach((function(e){new qt(e,{tapHold:t.tabHoldHandler.bind(t),tapHoldThreshold:500}),e.addEventListener("keydown",t.onKeyPress.bind(t)),e.addEventListener("keyup",t.onKeyUp.bind(t)),e.addEventListener("mouseup",t.repeatScroll.bind(t)),e.addEventListener("touchend",t.repeatScroll.bind(t)),e.addEventListener("contextmenu",(function(e){e.preventDefault()})),q.add(e,"click",t.clickEventHandler,t)}))},t.prototype.repeatScroll=function(){clearInterval(this.timeout)},t.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,Hr)?i.firstElementChild:i;this.timeout=window.setInterval((function(){t.eleScrolling(10,i,!0)}),50)},t.prototype.contains=function(e,t){return e.classList.contains(t)},t.prototype.eleScrolling=function(e,t,i){var n=this.element,o=t.classList;o.contains(Hr)&&(o=t.querySelector("."+Pr).classList),this.contains(n,Ar)&&this.browserCheck&&(e=-e),!this.contains(n,Ar)||this.browserCheck||this.ieCheck?o.contains(Rr)?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i):o.contains(Br)?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i)},t.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},t.prototype.swipeHandler=function(e){var t,i=this.scrollEle;t=e.velocity<=1?e.distanceX/(10*e.velocity):e.distanceX/e.velocity;var n=.5,o=function(){var r=Math.sin(n);r<=0?window.cancelAnimationFrame(r):("Left"===e.swipeDirection?i.scrollLeft+=t*r:"Right"===e.swipeDirection&&(i.scrollLeft-=t*r),n-=.5,window.requestAnimationFrame(o))};o()},t.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollLeft+=e:this.scrollEle.scrollLeft-=e,this.enableRtl&&this.scrollEle.scrollLeft>0&&(this.scrollEle.scrollLeft=0)},t.prototype.frameScrollRequest=function(e,t,i){var n=this;if(i)this.scrollUpdating(e,t);else{this.customStep||[].slice.call(oe("."+Vr,this.element)).forEach((function(t){e-=t.offsetWidth}));var o=function(){var i,r;n.contains(n.element,Ar)&&n.browserCheck?(i=-e,r=-10):(i=e,r=10),i<10?window.cancelAnimationFrame(r):(n.scrollUpdating(r,t),e-=r,window.requestAnimationFrame(o))};o()}},t.prototype.touchHandler=function(e){var t=this.scrollEle,i=e.distanceX;this.ieCheck&&this.contains(this.element,Ar)&&(i=-i),"Left"===e.scrollDirection?t.scrollLeft=t.scrollLeft+i:"Right"===e.scrollDirection&&(t.scrollLeft=t.scrollLeft-i)},t.prototype.arrowDisabling=function(e,t){if(this.isDevice){var i=(g(e)?t:e).querySelector("."+Pr);g(e)?le(i,[Rr],[Br]):le(i,[Br],[Rr])}else e&&t&&(e.classList.add(kr),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),t.classList.remove(kr),t.setAttribute("aria-disabled","false"),t.setAttribute("tabindex","0"));this.repeatScroll()},t.prototype.scrollHandler=function(e){var t=e.target,i=t.offsetWidth;this.element;var n=this.element.querySelector("."+Fr),o=this.element.querySelector("."+Ur),r=this.element.querySelector("."+qr),s=this.element.querySelector("."+Qr),a=t.scrollLeft;if(a<=0&&(a=-a),this.isDevice&&(!this.enableRtl||this.browserCheck||this.ieCheck||(r=this.element.querySelector("."+Qr),s=this.element.querySelector("."+qr)),r.style.width=a<40?a+"px":"40px",t.scrollWidth-Math.ceil(i+a)<40?s.style.width=t.scrollWidth-Math.ceil(i+a)+"px":s.style.width="40px"),0===a)this.arrowDisabling(n,o);else if(Math.ceil(i+a+.1)>=t.scrollWidth)this.arrowDisabling(o,n);else{var l=this.element.querySelector("."+Hr+"."+kr);l&&(l.classList.remove(kr),l.setAttribute("aria-disabled","false"),l.setAttribute("tabindex","0"))}},t.prototype.onPropertyChanged=function(e,t){for(var i=0,n=Object.keys(e);i<n.length;i++){switch(n[i]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add(Ar):this.element.classList.remove(Ar)}}},zr([De(null)],t.prototype,"scrollStep",void 0),t=zr([Ie],t)}(St),_r=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Gr=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Xr="e-rtl",Kr="e-overlay",Zr="e-nav-arrow",Jr="e-nav-up-arrow",$r="e-nav-down-arrow",es="e-scroll-nav",ts="e-scroll-up-nav",is="e-scroll-down-nav",ns="e-scroll-device",os="e-scroll-overlay",rs="e-scroll-up-overlay",ss="e-scroll-down-overlay",as=function(e){function t(t,i){return e.call(this,t,i)||this}return _r(t,e),t.prototype.preRender=function(){this.browser=Q.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=Q.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=y("vscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add(Xr)},t.prototype.render=function(){this.touchModule=new qt(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),q.add(this.scrollEle,"scroll",this.scrollEventHandler,this),this.isDevice?(this.element.classList.add(ns),this.createOverlayElement(this.element)):this.createNavIcon(this.element),this.setScrollState(),q.add(this.element,"wheel",this.wheelEventHandler,this)},t.prototype.setScrollState=function(){g(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetHeight,this.customStep=!1):this.customStep=!0},t.prototype.initialize=function(){var e=_("div",{className:"e-vscroll-content"}),t=_("div",{className:"e-vscroll-bar"});t.setAttribute("tabindex","-1");for(var i=this.element,n=0,o=[].slice.call(i.children);n<o.length;n++){var r=o[n];e.appendChild(r)}t.appendChild(e),i.appendChild(t),t.style.overflow="hidden",this.scrollEle=t,this.scrollItems=e},t.prototype.getPersistData=function(){return this.addOnPersist(["scrollStep"])},t.prototype.getModuleName=function(){return"vScroll"},t.prototype.destroy=function(){var t=this.element;t.style.display="",X([this.element],["e-vscroll",ns,Xr]);var i=oe(".e-"+t.id+"_nav."+es,t),n=oe("."+os,t);[].slice.call(n).forEach((function(e){ee(e)}));for(var o=0,r=[].slice.call(this.scrollItems.children);o<r.length;o++){var s=r[o];t.appendChild(s)}this.uniqueId&&this.element.removeAttribute("id"),ee(this.scrollEle),i.length>0&&(ee(i[0]),g(i[1])||ee(i[1])),q.remove(this.scrollEle,"scroll",this.scrollEventHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},t.prototype.disable=function(e){var t=oe(".e-scroll-nav:not(."+Kr+")",this.element);e?this.element.classList.add(Kr):this.element.classList.remove(Kr),[].slice.call(t).forEach((function(t){t.setAttribute("tabindex",e?"-1":"0")}))},t.prototype.createOverlayElement=function(e){var t=e.id.concat("_nav"),i=_("div",{className:os+" "+ss}),n="e-"+e.id.concat("_nav "+es+" "+is),o=_("div",{id:t.concat("down"),className:n}),r=_("div",{className:$r+" "+Zr+" e-icons"});o.appendChild(r);var s=_("div",{className:os+" "+rs});this.ieCheck&&o.classList.add("e-ie-align"),e.appendChild(i),e.appendChild(o),e.insertBefore(s,e.firstChild),this.eventBinding([o])},t.prototype.createNavIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav "+es+" "+is),n=_("div",{id:t.concat("_down"),className:i});n.setAttribute("aria-disabled","false");var o=_("div",{className:$r+" "+Zr+" e-icons"}),r="e-"+e.id.concat("_nav "+es+" "+ts),s=_("div",{id:t.concat("_up"),className:r+" "+Kr});s.setAttribute("aria-disabled","true");var a=_("div",{className:Jr+" "+Zr+" e-icons"});s.appendChild(a),n.appendChild(o),n.setAttribute("tabindex","0"),e.appendChild(n),e.insertBefore(s,e.firstChild),this.ieCheck&&(n.classList.add("e-ie-align"),s.classList.add("e-ie-align")),this.eventBinding([n,s])},t.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){this.keyTimer=window.setTimeout((function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)}),100)}},t.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},t.prototype.eventBinding=function(e){var t=this;[].slice.call(e).forEach((function(e){new qt(e,{tapHold:t.tabHoldHandler.bind(t),tapHoldThreshold:500}),e.addEventListener("keydown",t.onKeyPress.bind(t)),e.addEventListener("keyup",t.onKeyUp.bind(t)),e.addEventListener("mouseup",t.repeatScroll.bind(t)),e.addEventListener("touchend",t.repeatScroll.bind(t)),e.addEventListener("contextmenu",(function(e){e.preventDefault()})),q.add(e,"click",t.clickEventHandler,t)}))},t.prototype.repeatScroll=function(){clearInterval(this.timeout)},t.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,es)?i.firstElementChild:i;this.timeout=window.setInterval((function(){t.eleScrolling(10,i,!0)}),50)},t.prototype.contains=function(e,t){return e.classList.contains(t)},t.prototype.eleScrolling=function(e,t,i){var n=t.classList;n.contains(es)&&(n=t.querySelector("."+Zr).classList),n.contains($r)?this.frameScrollRequest(e,"add",i):n.contains(Jr)&&this.frameScrollRequest(e,"",i)},t.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},t.prototype.wheelEventHandler=function(e){e.preventDefault(),this.frameScrollRequest(this.scrollStep,e.deltaY>0?"add":"",!1)},t.prototype.swipeHandler=function(e){var t,i=this.scrollEle;t=e.velocity<=1?e.distanceY/(10*e.velocity):e.distanceY/e.velocity;var n=.5,o=function(){var r=Math.sin(n);r<=0?window.cancelAnimationFrame(r):("Up"===e.swipeDirection?i.scrollTop+=t*r:"Down"===e.swipeDirection&&(i.scrollTop-=t*r),n-=.02,window.requestAnimationFrame(o))};o()},t.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollTop+=e:this.scrollEle.scrollTop-=e},t.prototype.frameScrollRequest=function(e,t,i){var n=this;if(i)this.scrollUpdating(e,t);else{this.customStep||[].slice.call(oe("."+os,this.element)).forEach((function(t){e-=t.offsetHeight}));var o=function(){e<10?window.cancelAnimationFrame(10):(n.scrollUpdating(10,t),e-=10,window.requestAnimationFrame(o))};o()}},t.prototype.touchHandler=function(e){var t=this.scrollEle,i=e.distanceY;"Up"===e.scrollDirection?t.scrollTop=t.scrollTop+i:"Down"===e.scrollDirection&&(t.scrollTop=t.scrollTop-i)},t.prototype.arrowDisabling=function(e,t){if(this.isDevice){var i=(g(e)?t:e).querySelector("."+Zr);g(e)?le(i,[$r],[Jr]):le(i,[Jr],[$r])}else e.classList.add(Kr),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),t.classList.remove(Kr),t.setAttribute("aria-disabled","false"),t.setAttribute("tabindex","0");this.repeatScroll()},t.prototype.scrollEventHandler=function(e){var t=e.target,i=t.offsetHeight,n=this.element.querySelector("."+ts),o=this.element.querySelector("."+is),r=this.element.querySelector("."+rs),s=this.element.querySelector("."+ss),a=t.scrollTop;if(a<=0&&(a=-a),this.isDevice&&(r.style.height=a<40?a+"px":"40px",t.scrollHeight-Math.ceil(i+a)<40?s.style.height=t.scrollHeight-Math.ceil(i+a)+"px":s.style.height="40px"),0===a)this.arrowDisabling(n,o);else if(Math.ceil(i+a+.1)>=t.scrollHeight)this.arrowDisabling(o,n);else{var l=this.element.querySelector("."+es+"."+Kr);l&&(l.classList.remove(Kr),l.setAttribute("aria-disabled","false"),l.setAttribute("tabindex","0"))}},t.prototype.onPropertyChanged=function(e,t){for(var i=0,n=Object.keys(e);i<n.length;i++){switch(n[i]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add(Xr):this.element.classList.remove(Xr)}}},Gr([De(null)],t.prototype,"scrollStep",void 0),t=Gr([Ie],t)}(St);function ls(e){for(var t,i=e.childNodes,n=0;n<i.length;n++)if(3===(t=i[n]).nodeType)return t;return null}var cs,hs=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ds=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};!function(e){e.Left="Left",e.Right="Right",e.Top="Top",e.Bottom="Bottom"}(cs||(cs={}));var ps,us,ms,gs,fs,ys,vs="e-rtl",bs="e-btn",Ms="e-primary",Ns="e-icon-btn",Cs=function(e){function t(t,i){return e.call(this,t,i)||this}return hs(t,e),t.prototype.preRender=function(){},t.prototype.render=function(){this.initialize(),this.removeRippleEffect=Re(this.element,{selector:"."+bs}),this.renderComplete()},t.prototype.initialize=function(){if(this.cssClass&&G([this.element],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.isPrimary&&this.element.classList.add(Ms),this.content){var e=this.enableHtmlSanitizer?Si.sanitize(this.content):this.content;this.element.innerHTML=e}this.setIconCss(),this.enableRtl&&this.element.classList.add(vs),this.disabled?this.controlStatus(this.disabled):this.wireEvents()},t.prototype.controlStatus=function(e){this.element.disabled=e},t.prototype.setIconCss=function(){if(this.iconCss){var e=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(e.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add(Ns);var t=this.element.childNodes[0];!t||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?this.element.appendChild(e):this.element.insertBefore(e,t)}},t.prototype.wireEvents=function(){this.isToggle&&q.add(this.element,"click",this.btnClickHandler,this)},t.prototype.unWireEvents=function(){this.isToggle&&q.remove(this.element,"click",this.btnClickHandler)},t.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},t.prototype.destroy=function(){var t=[Ms,vs,Ns,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round","e-top-icon-btn","e-bottom-icon-btn"];this.cssClass&&(t=t.concat(this.cssClass.split(/\s+/).filter((function(e){return e.length>0})))),e.prototype.destroy.call(this),X([this.element],t),this.element.getAttribute("class")||this.element.removeAttribute("class"),this.disabled&&this.element.removeAttribute("disabled"),this.content&&(this.element.innerHTML=this.element.innerHTML.replace(this.content,""));var i=this.element.querySelector("span.e-btn-icon");i&&ee(i),this.unWireEvents()},t.prototype.getModuleName=function(){return"btn"},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.Inject=function(){},t.prototype.onPropertyChanged=function(e,t){for(var i=this.element.querySelector("span.e-btn-icon"),n=0,o=Object.keys(e);n<o.length;n++){switch(o[n]){case"isPrimary":e.isPrimary?this.element.classList.add(Ms):this.element.classList.remove(Ms);break;case"disabled":this.controlStatus(e.disabled);break;case"iconCss":(i=this.element.querySelector("span.e-btn-icon"))?e.iconCss?(i.className="e-btn-icon "+e.iconCss,this.element.textContent.trim()&&("Left"===this.iconPosition?i.classList.add("e-icon-left"):i.classList.add("e-icon-right"))):ee(i):this.setIconCss();break;case"iconPosition":X([this.element],["e-top-icon-btn","e-bottom-icon-btn"]),(i=this.element.querySelector("span.e-btn-icon"))&&ee(i),this.setIconCss();break;case"cssClass":t.cssClass&&X([this.element],t.cssClass.split(/\s+/).filter((function(e){return e.length>0}))),e.cssClass&&G([this.element],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(vs):this.element.classList.remove(vs);break;case"content":ls(this.element)||this.element.classList.remove(Ns),this.enableHtmlSanitizer&&(e.content=Si.sanitize(e.content)),this.element.innerHTML=e.content,this.setIconCss();break;case"isToggle":e.isToggle?q.add(this.element,"click",this.btnClickHandler,this):(q.remove(this.element,"click",this.btnClickHandler),X([this.element],["e-active"]))}}},t.prototype.click=function(){this.element.click()},t.prototype.focusIn=function(){this.element.focus()},ds([De("Left")],t.prototype,"iconPosition",void 0),ds([De("")],t.prototype,"iconCss",void 0),ds([De(!1)],t.prototype,"disabled",void 0),ds([De(!1)],t.prototype,"isPrimary",void 0),ds([De("")],t.prototype,"cssClass",void 0),ds([De("")],t.prototype,"content",void 0),ds([De(!1)],t.prototype,"isToggle",void 0),ds([De()],t.prototype,"locale",void 0),ds([De(!0)],t.prototype,"enableHtmlSanitizer",void 0),ds([Se()],t.prototype,"created",void 0),t=ds([Ie],t)}(St),Es=!1;function Ds(e,t,i,n,o){if(us=void 0,us=o,Es=!!n,!e)return{left:0,top:0};t||(t="left"),i||(i="top"),gs=e.ownerDocument,ms=e;return function(e,t,i){switch(ps=ms.getBoundingClientRect(),t+e){case"topcenter":Ts(As(),i),Ls(js(),i);break;case"topright":Ts(zs(),i),Ls(js(),i);break;case"centercenter":Ts(As(),i),Ls(xs(),i);break;case"centerright":Ts(zs(),i),Ls(xs(),i);break;case"centerleft":Ts(Os(),i),Ls(xs(),i);break;case"bottomcenter":Ts(As(),i),Ls(ws(),i);break;case"bottomright":Ts(zs(),i),Ls(ws(),i);break;case"bottomleft":Ts(Os(),i),Ls(ws(),i);break;default:Ts(Os(),i),Ls(js(),i)}return ms=null,i}(t.toLowerCase(),i.toLowerCase(),{left:0,top:0})}function Ts(e,t){t.left=e}function Ls(e,t){t.top=e}function Ss(){return gs.documentElement.scrollTop||gs.body.scrollTop}function Is(){return gs.documentElement.scrollLeft||gs.body.scrollLeft}function ws(){return Es?ps.bottom:ps.bottom+Ss()}function xs(){return js()+ps.height/2}function js(){return Es?ps.top:ps.top+Ss()}function Os(){return ps.left+Is()}function zs(){var e=ms&&((ms.classList.contains("e-date-wrapper")||ms.classList.contains("e-datetime-wrapper"))&&ms.classList.contains("e-rtl")||ms.classList.contains("e-ddl")&&ms.classList.contains("e-rtl")||ms.classList.contains("e-date-range-wrapper"))?us?us.width:0:us&&ps.width>=us.width?us.width:0;return ms&&ms.classList.contains("e-rtl")&&ms.classList.contains("e-multiselect")&&(e=us.width),ps.right+Is()-e}function As(){return Os()+ps.width/2}function ks(e,t,i,n){if(void 0===t&&(t=null),void 0===i&&(i={X:!1,Y:!1}),!i.Y&&!i.X)return{left:0,top:0};var o=e.getBoundingClientRect();if(ys=t,fs=e.ownerDocument,n||(n=Ds(e,"left","top")),i.X){var r=ys?qs():ia(),s=Ks(),a=Zs(),l=s-n.left,c=n.left+o.width-a;o.width>r?n.left=l>0&&c<=0?a-o.width:c>0&&l<=0?s:l>c?a-o.width:s:l>0?n.left+=l:c>0&&(n.left-=c)}if(i.Y){var h=ys?Ws():ta(),d=Xs(),p=Js(),u=d-n.top,m=n.top+o.height-p;o.height>h?n.top=u>0&&m<=0?p-o.height:m>0&&u<=0?d:u>m?p-o.height:d:u>0?n.top+=u:m>0&&(n.top-=m)}return n}function Ps(e,t,i,n){void 0===t&&(t=null);var o=Ds(e,"left","top");i&&(o.left=i),n&&(o.top=n);var r=[];ys=t,fs=e.ownerDocument;var s=e.getBoundingClientRect(),a=o.top,l=o.left,c=o.left+s.width,h=Qs(a,o.top+s.height),d=Fs(l,c);return h.topSide&&r.push("top"),d.rightSide&&r.push("right"),d.leftSide&&r.push("left"),h.bottomSide&&r.push("bottom"),r}function Rs(e,t,i,n,o,r,s,a,l){if(void 0===s&&(s=null),void 0===a&&(a={X:!0,Y:!0}),t&&e&&o&&r&&(a.X||a.Y)){var c,h={TL:null,TR:null,BL:null,BR:null},d={TL:null,TR:null,BL:null,BR:null};if("none"===window.getComputedStyle(e).display){var p=e.style.visibility;e.style.visibility="hidden",e.style.display="block",c=e.getBoundingClientRect(),e.style.removeProperty("display"),e.style.visibility=p}else c=e.getBoundingClientRect();var u={posX:o,posY:r,offsetX:i,offsetY:n,position:{left:0,top:0}};ys=s,fs=t.ownerDocument,function(e,t,i,n,o){i.position=Ds(e,i.posX,i.posY,n,o),t.TL=Ds(e,"left","top",n,o),t.TR=Ds(e,"right","top",n,o),t.BR=Ds(e,"left","bottom",n,o),t.BL=Ds(e,"right","bottom",n,o)}(t,h,u,l,c),Us(d,u,c),a.X&&Ys(t,d,h,u,c,!0),a.Y&&h.TL.top>-1&&Vs(t,d,h,u,c,!0),function(e,t,i){var n=0,o=0;if(null!=e.offsetParent&&("absolute"===getComputedStyle(e.offsetParent).position||"relative"===getComputedStyle(e.offsetParent).position)){var r=Ds(e.offsetParent,"left","top",!1,i);n=r.left,o=r.top}var s=1,a=1,l=Hs(e);if(l){var c=getComputedStyle(l).transform;if("none"!==c){var h=new DOMMatrix(c);s=h.a,a=h.d}if("none"!==getComputedStyle(l).zoom){var d=Bs(document.body);s*=d,a*=d}}e.style.top=t.position.top/a+t.offsetY-o/a+"px",e.style.left=t.position.left/s+t.offsetX-n/s+"px"}(e,u,c)}}function Bs(e){var t=getComputedStyle(e).zoom;return parseFloat(t)||1}function Hs(e){for(;e;){var t=window.getComputedStyle(e).transform,i=Bs(document.body);if(t&&"none"!==t||i&&1!==i)return e;if(e===document.body)return null;e=e.offsetParent||e.parentElement}return null}function Us(e,t,i){e.TL={top:t.position.top+t.offsetY,left:t.position.left+t.offsetX},e.TR={top:e.TL.top,left:e.TL.left+i.width},e.BL={top:e.TL.top+i.height,left:e.TL.left},e.BR={top:e.TL.top+i.height,left:e.TL.left+i.width}}function Fs(e,t){var i=!1,n=!1;return e-ea()<Ks()&&(i=!0),t>Zs()&&(n=!0),{leftSide:i,rightSide:n}}function Ys(e,t,i,n,o,r){var s=Fs(t.TL.left,t.TR.left);i.TL.left-ea()<=Ks()&&(s.leftSide=!1),i.TR.left>Zs()&&(s.rightSide=!1),(s.leftSide&&!s.rightSide||!s.leftSide&&s.rightSide)&&("right"===n.posX?n.posX="left":n.posX="right",n.offsetX=n.offsetX+o.width,n.offsetX=-1*n.offsetX,n.position=Ds(e,n.posX,n.posY,!1),Us(t,n,o),r&&Ys(e,t,i,n,o,!1))}function Vs(e,t,i,n,o,r){var s=Qs(t.TL.top,t.BL.top);i.TL.top-$s()<=Xs()&&(s.topSide=!1),i.BL.top>=Js()&&e.getBoundingClientRect().bottom<window.innerHeight&&(s.bottomSide=!1),(s.topSide&&!s.bottomSide||!s.topSide&&s.bottomSide)&&("top"===n.posY?n.posY="bottom":n.posY="top",n.offsetY=n.offsetY+o.height,n.offsetY=-1*n.offsetY,n.position=Ds(e,n.posX,n.posY,!1,o),Us(t,n,o),r&&Vs(e,t,i,n,o,!1))}function Qs(e,t){var i=!1,n=!1;return e-$s()<Xs()&&(i=!0),t>Js()&&(n=!0),{topSide:i,bottomSide:n}}function qs(){return ys.getBoundingClientRect().width}function Ws(){return ys.getBoundingClientRect().height}function _s(){return ys.getBoundingClientRect().left}function Gs(){return ys.getBoundingClientRect().top}function Xs(){return ys?Gs():0}function Ks(){return ys?_s():0}function Zs(){return ys?ea()+_s()+qs():ea()+ia()}function Js(){return ys?$s()+Gs()+Ws():$s()+ta()}function $s(){return fs.documentElement.scrollTop||fs.body.scrollTop}function ea(){return fs.documentElement.scrollLeft||fs.body.scrollLeft}function ta(){return window.innerHeight}function ia(){var e=window.innerWidth,t=document.documentElement.getBoundingClientRect();return e-(e-(g(document.documentElement)?0:t.width))}function na(){ys=null,fs=null}var oa=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ra=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},sa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oa(t,e),ra([De("left")],t.prototype,"X",void 0),ra([De("top")],t.prototype,"Y",void 0),t}(Qe),aa="e-popup",la="e-rtl",ca="e-popup-open",ha="e-popup-close",da=function(e){function t(t,i){return e.call(this,i,t)||this}return oa(t,e),t.prototype.onPropertyChanged=function(e,t){for(var i=0,n=Object.keys(e);i<n.length;i++){switch(n[i]){case"width":ae(this.element,{width:N(e.width)});break;case"height":ae(this.element,{height:N(e.height)});break;case"zIndex":ae(this.element,{zIndex:e.zIndex});break;case"enableRtl":this.setEnableRtl();break;case"position":case"relateTo":this.refreshPosition();break;case"offsetX":var o=e.offsetX-t.offsetX;this.element.style.left=(parseInt(this.element.style.left,10)+o).toString()+"px";break;case"offsetY":var r=e.offsetY-t.offsetY;this.element.style.top=(parseInt(this.element.style.top,10)+r).toString()+"px";break;case"content":this.setContent();break;case"actionOnScroll":"none"!==e.actionOnScroll?this.wireScrollEvents():this.unwireScrollEvents()}}},t.prototype.getModuleName=function(){return"popup"},t.prototype.resolveCollision=function(){this.checkCollision()},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.destroy=function(){this.element.classList.contains("e-popup-open")&&this.unwireEvents(),this.element.classList.remove(aa,la,ca,ha),this.content=null,this.relateTo=null,na(),e.prototype.destroy.call(this)},t.prototype.render=function(){this.element.classList.add(aa);var e={};1e3!==this.zIndex&&(e.zIndex=this.zIndex),"auto"!==this.width&&(e.width=N(this.width)),"auto"!==this.height&&(e.height=N(this.height)),ae(this.element,e),this.fixedParent=!1,this.setEnableRtl(),this.setContent()},t.prototype.wireEvents=function(){Q.isDevice&&q.add(window,"orientationchange",this.orientationOnChange,this),"none"!==this.actionOnScroll&&this.wireScrollEvents()},t.prototype.wireScrollEvents=function(){if(this.getRelateToElement())for(var e=0,t=this.getScrollableParent(this.getRelateToElement());e<t.length;e++){var i=t[e];q.add(i,"scroll",this.scrollRefresh,this)}},t.prototype.unwireEvents=function(){Q.isDevice&&q.remove(window,"orientationchange",this.orientationOnChange),"none"!==this.actionOnScroll&&this.unwireScrollEvents()},t.prototype.unwireScrollEvents=function(){if(this.getRelateToElement())for(var e=0,t=this.getScrollableParent(this.getRelateToElement());e<t.length;e++){var i=t[e];q.remove(i,"scroll",this.scrollRefresh)}},t.prototype.getRelateToElement=function(){var e=""===this.relateTo||g(this.relateTo)?document.body:this.relateTo;return this.setProperties({relateTo:e},!0),"string"==typeof this.relateTo?document.querySelector(this.relateTo):this.relateTo},t.prototype.scrollRefresh=function(e){if("reposition"===this.actionOnScroll?g(this.element)||this.element.offsetParent===e.target||this.element.offsetParent&&"BODY"===this.element.offsetParent.tagName&&null==e.target.parentElement||this.refreshPosition():"hide"===this.actionOnScroll&&this.hide(),"none"!==this.actionOnScroll&&this.getRelateToElement()){var t=this.isElementOnViewport(this.getRelateToElement(),e.target);t||this.targetInvisibleStatus?t&&(this.targetInvisibleStatus=!1):(this.trigger("targetExitViewport"),this.targetInvisibleStatus=!0)}},t.prototype.isElementOnViewport=function(e,t){for(var i=this.getScrollableParent(e),n=0;n<i.length;n++)if(!this.isElementVisible(e,i[n]))return!1;return!0},t.prototype.isElementVisible=function(e,t){var i=this.checkGetBoundingClientRect(e);if(!i.height||!i.width)return!1;if(g(this.checkGetBoundingClientRect(t))){var n=window,o={top:n.scrollY,left:n.scrollX,right:n.scrollX+n.outerWidth,bottom:n.scrollY+n.outerHeight},r=Ds(e),s={top:r.top,left:r.left,right:r.left+i.width,bottom:r.top+i.height},a={top:o.bottom-s.top,left:o.right-s.left,bottom:s.bottom-o.top,right:s.right-o.left};return a.top>0&&a.left>0&&a.right>0&&a.bottom>0}var l=t.getBoundingClientRect();return!(i.bottom<l.top||i.bottom>l.bottom||i.right>l.right||i.left<l.left)},t.prototype.preRender=function(){},t.prototype.setEnableRtl=function(){this.reposition(),this.enableRtl?this.element.classList.add(la):this.element.classList.remove(la)},t.prototype.setContent=function(){if(!g(this.content))if(this.element.innerHTML="","string"==typeof this.content)this.element.textContent=this.content;else{var e=this.getRelateToElement(),t=this.content.props;e.classList.contains("e-dropdown-btn")&&!g(t)||this.element.appendChild(this.content)}},t.prototype.orientationOnChange=function(){var e=this;setTimeout((function(){e.refreshPosition()}),200)},t.prototype.refreshPosition=function(e,t){g(e)||this.checkFixedParent(e),this.reposition(),t||this.checkCollision()},t.prototype.reposition=function(){var e,t,i=this.getRelateToElement();if("number"==typeof this.position.X&&"number"==typeof this.position.Y)e={left:this.position.X,top:this.position.Y};else if("string"==typeof this.position.X&&"number"==typeof this.position.Y||"number"==typeof this.position.X&&"string"==typeof this.position.Y){var n=void 0,o=this.element.style.display;this.element.style.display="block",this.element.classList.contains("e-dlg-modal")&&(n=this.element.parentElement.style.display,this.element.parentElement.style.display="block"),t=this.getAnchorPosition(i,this.element,this.position,this.offsetX,this.offsetY),e="string"==typeof this.position.X?{left:t.left,top:this.position.Y}:{left:this.position.X,top:t.top},this.element.style.display=o,this.element.classList.contains("e-dlg-modal")&&(this.element.parentElement.style.display=n)}else if(i){var r=this.element.clientHeight;o=this.element.style.display;this.element.style.display="block",e=this.getAnchorPosition(i,this.element,this.position,this.offsetX,this.offsetY,r),this.element.style.display=o}else e={left:0,top:0};g(e)||(this.element.style.left=e.left+"px",this.element.style.top=e.top+"px")},t.prototype.checkGetBoundingClientRect=function(e){try{return e.getBoundingClientRect()}catch(e){return null}},t.prototype.getAnchorPosition=function(e,t,i,n,o,r){void 0===r&&(r=0);var s=this.checkGetBoundingClientRect(t),a=this.checkGetBoundingClientRect(e);if(g(s)||g(a))return null;var l=e,c={left:0,top:0};switch(t.offsetParent&&"BODY"===t.offsetParent.tagName&&"BODY"===e.tagName?c=Ds(e):(t.classList.contains("e-dlg-modal")&&"BODY"!==l.tagName&&(t=t.parentElement),c=function(e,t){var i=!1,n={left:0,top:0},o=e;if(!e||!t)return n;for(g(t.offsetParent)&&"fixed"===t.style.position&&(i=!0);(t.offsetParent||i)&&e&&t.offsetParent!==e;)n.left+=e.offsetLeft,n.top+=e.offsetTop,e=e.offsetParent;for(e=o;(t.offsetParent||i)&&e&&t.offsetParent!==e;)n.left-=e.scrollLeft,n.top-=e.scrollTop,e=e.parentElement;return n}(l,t)),i.X){default:case"left":break;case"center":t.classList.contains("e-dlg-modal")&&"BODY"===l.tagName&&"container"===this.targetType?c.left+=window.innerWidth/2-s.width/2:"container"===this.targetType?c.left+=a.width/2-s.width/2:c.left+=a.width/2;break;case"right":if(t.classList.contains("e-dlg-modal")&&"BODY"===l.tagName&&"container"===this.targetType)c.left+=window.innerWidth-s.width;else if("container"===this.targetType){var h=1,d=Hs(t);if(d){var p=getComputedStyle(d).transform;if("none"!==p)h=new DOMMatrix(p).a;if("none"!==getComputedStyle(d).zoom)h*=Bs(document.body)}c.left+=(a.width-s.width)/h}else c.left+=a.width}switch(i.Y){default:case"top":break;case"center":t.classList.contains("e-dlg-modal")&&"BODY"===l.tagName&&"container"===this.targetType?c.top+=window.innerHeight/2-s.height/2:"container"===this.targetType?c.top+=a.height/2-s.height/2:c.top+=a.height/2;break;case"bottom":t.classList.contains("e-dlg-modal")&&"BODY"===l.tagName&&"container"===this.targetType?c.top+=window.innerHeight-s.height:"container"!==this.targetType||t.classList.contains("e-dialog")?"container"===this.targetType&&t.classList.contains("e-dialog")?c.top+=a.height-r:c.top+=a.height:c.top+=a.height-s.height}return c.left+=n,c.top+=o,c},t.prototype.callFlip=function(e){var t=this.getRelateToElement();Rs(this.element,t,this.offsetX,this.offsetY,this.position.X,this.position.Y,this.viewPortElement,e,this.fixedParent)},t.prototype.callFit=function(e){if(0!==Ps(this.element,this.viewPortElement).length)if(g(this.viewPortElement)){var t=ks(this.element,this.viewPortElement,e);e.X&&(this.element.style.left=t.left+"px"),e.Y&&(this.element.style.top=t.top+"px")}else{var i=this.checkGetBoundingClientRect(this.element),n=this.checkGetBoundingClientRect(this.viewPortElement);if(g(i)||g(n))return null;e&&!0===e.Y&&(n.top>i.top?this.element.style.top="0px":n.bottom<i.bottom&&(this.element.style.top=parseInt(this.element.style.top,10)-(i.bottom-n.bottom)+"px")),e&&!0===e.X&&(n.right<i.right?this.element.style.left=parseInt(this.element.style.left,10)-(i.right-n.right)+"px":n.left>i.left&&(this.element.style.left=parseInt(this.element.style.left,10)+(n.left-i.left)+"px"))}},t.prototype.checkCollision=function(){var e=this.collision.X,t=this.collision.Y;"none"===e&&"none"===t||("flip"===e&&"flip"===t?this.callFlip({X:!0,Y:!0}):"fit"===e&&"fit"===t?this.callFit({X:!0,Y:!0}):("flip"===e?this.callFlip({X:!0,Y:!1}):"flip"===t&&this.callFlip({Y:!0,X:!1}),"fit"===e?this.callFit({X:!0,Y:!1}):"fit"===t&&this.callFit({X:!1,Y:!0})))},t.prototype.show=function(e,t){var i=this;if(this.getRelateToElement().classList.contains("e-filemanager")&&(this.fmDialogContainer=this.element.getElementsByClassName("e-file-select-wrap")[0]),this.wireEvents(),g(this.fmDialogContainer)||!Q.isIos&&"safari"!==Q.info.name||(this.fmDialogContainer.style.display="block"),1e3===this.zIndex||!g(t)){var n=g(t)?this.element:t;this.zIndex=ua(n),ae(this.element,{zIndex:this.zIndex})}e=g(e)||"object"!=typeof e?this.showAnimation:e,"none"===this.collision.X&&"none"===this.collision.Y||(X([this.element],ha),G([this.element],ca),this.checkCollision(),X([this.element],ca),G([this.element],ha)),g(e)?(X([this.element],ha),G([this.element],ca),this.trigger("open")):(e.begin=function(){i.isDestroyed||(X([i.element],ha),G([i.element],ca))},e.end=function(){i.isDestroyed||i.trigger("open")},new Pe(e).animate(this.element))},t.prototype.hide=function(e){var t=this;e=g(e)||"object"!=typeof e?this.hideAnimation:e,g(e)?(X([this.element],ca),G([this.element],ha),this.trigger("close")):(e.end=function(){t.isDestroyed||(X([t.element],ca),G([t.element],ha),t.trigger("close"))},new Pe(e).animate(this.element)),this.unwireEvents()},t.prototype.getScrollableParent=function(e){return this.checkFixedParent(e),pa(e,this.fixedParent)},t.prototype.checkFixedParent=function(e){for(var t=e.parentElement;t&&"HTML"!==t.tagName;){var i=getComputedStyle(t);"fixed"!==i.position&&"sticky"!==i.position||g(this.element)||!this.element.offsetParent||"BODY"!==this.element.offsetParent.tagName||"hidden"===getComputedStyle(this.element.offsetParent).overflow||(this.element.style.top=window.scrollY>parseInt(this.element.style.top,10)?N(window.scrollY-parseInt(this.element.style.top,10)):N(parseInt(this.element.style.top,10)-window.scrollY),this.element.style.position="fixed",this.fixedParent=!0),t=t.parentElement,!g(this.element)&&g(this.element.offsetParent)&&"fixed"===i.position&&"fixed"===this.element.style.position&&(this.fixedParent=!0)}},ra([De("auto")],t.prototype,"height",void 0),ra([De("auto")],t.prototype,"width",void 0),ra([De(null)],t.prototype,"content",void 0),ra([De("container")],t.prototype,"targetType",void 0),ra([De(null)],t.prototype,"viewPortElement",void 0),ra([De({X:"none",Y:"none"})],t.prototype,"collision",void 0),ra([De("")],t.prototype,"relateTo",void 0),ra([Te({},sa)],t.prototype,"position",void 0),ra([De(0)],t.prototype,"offsetX",void 0),ra([De(0)],t.prototype,"offsetY",void 0),ra([De(1e3)],t.prototype,"zIndex",void 0),ra([De(!1)],t.prototype,"enableRtl",void 0),ra([De("reposition")],t.prototype,"actionOnScroll",void 0),ra([De(null)],t.prototype,"showAnimation",void 0),ra([De(null)],t.prototype,"hideAnimation",void 0),ra([Se()],t.prototype,"open",void 0),ra([Se()],t.prototype,"close",void 0),ra([Se()],t.prototype,"targetExitViewport",void 0),t=ra([Ie],t)}(St);function pa(e,t){for(var i=getComputedStyle(e),n=[],o=/(auto|scroll)/,r=e.parentElement;r&&"HTML"!==r.tagName;){var s=getComputedStyle(r);"absolute"===i.position&&"static"===s.position||!o.test(s.overflow+s.overflowY+s.overflowX)||n.push(r),r=r.parentElement}return t||n.push(document),n}function ua(e){for(var t=e.parentElement,i=[];t&&"BODY"!==t.tagName;){var n=document.defaultView.getComputedStyle(t,null).getPropertyValue("z-index"),o=document.defaultView.getComputedStyle(t,null).getPropertyValue("position");"auto"!==n&&"static"!==o&&i.push(n),t=t.parentElement}for(var r=[],s=0;s<document.body.children.length;s++)if(!e.isEqualNode(document.body.children[s])){n=document.defaultView.getComputedStyle(document.body.children[s],null).getPropertyValue("z-index"),o=document.defaultView.getComputedStyle(document.body.children[s],null).getPropertyValue("position");"auto"!==n&&"static"!==o&&r.push(n)}r.push("999");var a=[];if(!g(e.parentElement)&&"BODY"!==e.parentElement.tagName){var l=[].slice.call(e.parentElement.children);for(s=0;s<l.length;s++)if(!e.isEqualNode(l[s])){n=document.defaultView.getComputedStyle(l[s],null).getPropertyValue("z-index"),o=document.defaultView.getComputedStyle(l[s],null).getPropertyValue("position");"auto"!==n&&"static"!==o&&a.push(n)}}var c=i.concat(r,a),h=Math.max.apply(Math,c)+1;return h>2147483647?2147483647:h}var ma,ga,fa,ya,va,ba,Ma,Na,Ca=["north-west","north","north-east","west","east","south-west","south","south-east"],Ea="e-resize-handle",Da="e-focused-handle",Ta=["e-restrict-left"],La="e-resize-viewport",Sa=["north","west","east","south"],Ia=0,wa=0,xa=0,ja=0,Oa=0,za=0,Aa=null,ka=null,Pa=null,Ra=!0,Ba=0,Ha=!0;function Ua(e){Wa();var t=_("span",{attrs:{unselectable:"on",contenteditable:"false"}});t.setAttribute("class","e-dialog-border-resize e-"+e),"south"===e&&(t.style.height="2px",t.style.width="100%",t.style.bottom="0px",t.style.left="0px"),"north"===e&&(t.style.height="2px",t.style.width="100%",t.style.top="0px",t.style.left="0px"),"east"===e&&(t.style.height="100%",t.style.width="2px",t.style.right="0px",t.style.top="0px"),"west"===e&&(t.style.height="100%",t.style.width="2px",t.style.left="0px",t.style.top="0px"),ma.appendChild(t)}function Fa(e){var t;return g(e)||(t="string"==typeof e?document.querySelector(e):e),t}function Ya(e){for(var t=e||this,i=ma.querySelectorAll("."+Ea),n=0;n<i.length;n++){ga=i[n],q.add(ga,"mousedown",Qa,t);var o="msie"===Q.info.name?"pointerdown":"touchstart";q.add(ga,o,_a,t)}var r=ma.querySelectorAll(".e-dialog-border-resize");if(!g(r))for(n=0;n<r.length;n++){ga=r[n],q.add(ga,"mousedown",Qa,t);o="msie"===Q.info.name?"pointerdown":"touchstart";q.add(ga,o,_a,t)}}function Va(e){return e.indexOf("mouse")>-1?"mouse":"touch"}function Qa(e){if(e.preventDefault(),ma=e.target.parentElement,Wa(),Oa=e.pageX,za=e.pageY,e.target.classList.add(Da),!g(Aa)){if(!0===Aa(e,this))return}this.targetEle&&ma&&ma.querySelector(".e-dlg-resizable")&&(Ma="body"===this.target?null:this.targetEle,ba=this.targetEle.clientWidth,ya=this.targetEle.clientHeight);var t=g(Ma)?document:Ma;q.add(t,"mousemove",Ga,this),q.add(document,"mouseup",qa,this);for(var i=0;i<Ta.length;i++)Ra=!ma.classList.contains(Ta[i])}function qa(e){var t="msie"===Q.info.name?"pointermove":"touchmove",i="msie"===Q.info.name?"pointerup":"touchend",n=g(Ma)?document:Ma,o="msie"===Q.info.name?"pointerdown":"touchstart";if(q.remove(n,"mousemove",Ga),q.remove(n,t,Ga),q.remove(n,o,Ga),g(document.body.querySelector("."+Da))||document.body.querySelector("."+Da).classList.remove(Da),!g(Pa)){Pa(e,this)}q.remove(document,"mouseup",qa),q.remove(document,i,qa)}function Wa(){Ia=parseFloat(getComputedStyle(ma,null).getPropertyValue("width").replace("px","")),wa=parseFloat(getComputedStyle(ma,null).getPropertyValue("height").replace("px","")),xa=ma.getBoundingClientRect().left,ja=ma.getBoundingClientRect().top}function _a(e){ma=e.target.parentElement,Wa();var t=ma.classList.contains("e-dialog");(e.target.classList.contains(Ea)||e.target.classList.contains("e-dialog-border-resize"))&&t&&e.target.classList.add(Da);var i=e.touches?e.changedTouches[0]:e;if(Oa=i.pageX,za=i.pageY,!g(Aa)){if(!0===Aa(e,this))return}var n="msie"===Q.info.name?"pointermove":"touchmove",o="msie"===Q.info.name?"pointerup":"touchend",r=g(Ma)?document:Ma;q.add(r,n,Ga,this),q.add(document,o,qa,this)}function Ga(e){if(e.target.classList.contains(Ea)&&e.target.classList.contains(Da)?ga=e.target:g(document.body.querySelector("."+Da))||(ga=document.body.querySelector("."+Da)),!g(ga)){for(var t="",i=0;i<Ca.length;i++)ga.classList.contains("e-"+Ca[i])&&(t=Ca[i]);if(!g(ka)){ka(e,this)}switch(t){case"south":Ka(e);break;case"north":Za(e);break;case"west":Ja(e);break;case"east":$a(e);break;case"south-east":Ka(e),$a(e);break;case"south-west":Ka(e),Ja(e);break;case"north-east":Za(e),$a(e);break;case"north-west":Za(e),Ja(e)}}}function Xa(e){return e.getBoundingClientRect()}function Ka(e){var t,i=document.documentElement.clientHeight,n=!1,o=(e.touches?e.changedTouches[0]:e).pageY,r=Xa(ma);g(Ma)||(t=Xa(Ma)),g(Ma)?g(Ma)&&(i-o>=0||r.top<0)&&(n=!0):n=!0;var s=wa+(o-za);s=s>fa?s:fa;var a=0;g(Ma)||(a=t.top);var l=g(Ma)?0:Ma.offsetHeight-Ma.clientHeight,c=r.top-a-l/2;if(c=c<0?0:c,r.top>0&&c+s>ya){if(n=!1,ma.classList.contains(La))return;ma.style.height=ya-parseInt(c.toString(),10)+"px"}else{var h=0;if(n){r.top<0&&i+(r.height+r.top)>0&&s+(h=r.top)<=30&&(s=r.height-(r.height+r.top)+30),s+r.top>=ya&&(ma.style.height=r.height+(i-(r.height+r.top))+"px");var d=g(Ma)?h:c;s>=fa&&s+d<=ya&&(ma.style.height=s+"px")}}}function Za(e){var t,i=!1,n="mouse"===Va(e.type)?e.pageY:e.touches[0].pageY,o=Xa(ma),r=g(Ma)?0:Ma.offsetHeight-Ma.clientHeight;g(Ma)||(t=Xa(Ma)),(!g(Ma)&&o.top-t.top>0||g(Ma)&&n>0||!g(Ma)&&Math.floor(o.top-t.top+o.height+(t.bottom-o.bottom))-r<=ya)&&(i=!0);var s=wa-(n-za);if(i&&s>=fa&&s<=ya){var a=0;g(Ma)||(a=t.top);var l=ja-a+(n-za);l=l>0?l:1,ma.style.height=s+"px",ma.style.top=l+"px"}}function Ja(e){var t,i=document.documentElement.clientWidth,n=!1;g(Ma)||(t=Xa(Ma));var o="mouse"===Va(e.type)?e.pageX:e.touches[0].pageX,r=Xa(ma),s=g(Ma)?0:Ma.offsetWidth-Ma.clientWidth,a=g(Ma)?0:t.left,l=g(Ma)?0:t.width;g(Na)&&(g(Ma)?Na=i:(Na=r.left-a-s/2+r.width,Na+=l-s-Na)),(!g(Ma)&&Math.floor(r.left-t.left+r.width+(t.right-r.right))-s<=ba||g(Ma)&&o>=0)&&(n=!0);var c=Ia-(o-Oa);if(Ra&&(c=c>Na?Na:c),n&&c>=va&&c<=ba){var h=0;g(Ma)||(h=t.left);var d=xa-h+(o-Oa);d=d>0?d:1,c!==Ba&&Ha&&(ma.style.width=c+"px"),Ra&&(ma.style.left=d+"px",Ha=1!==d)}Ba=c}function $a(e){var t,i=document.documentElement.clientWidth,n=!1;g(Ma)||(t=Xa(Ma));var o=(e.touches?e.changedTouches[0]:e).pageX,r=Xa(ma);(!g(Ma)&&(r.left-t.left+r.width<=ba||r.right-t.left>=r.width)||g(Ma)&&i-o>0)&&(n=!0);var s=Ia+(o-Oa),a=0;if(g(Ma)||(a=t.left),r.left-a+s>ba){if(n=!1,ma.classList.contains(La))return;ma.style.width=ba-(r.left-a)+"px"}n&&s>=va&&s<=ba&&(ma.style.width=s+"px")}function el(){for(var e=ma.querySelectorAll("."+Ea),t=0;t<e.length;t++)ee(e[t]);var i=ma.querySelectorAll(".e-dialog-border-resize");if(!g(i))for(t=0;t<i.length;t++)ee(i[t])}var tl,il=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),nl=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ol=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return il(t,e),nl([De(!0)],t.prototype,"isFlat",void 0),nl([De()],t.prototype,"buttonModel",void 0),nl([De("Button")],t.prototype,"type",void 0),nl([Se()],t.prototype,"click",void 0),t}(Qe),rl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return il(t,e),nl([De("Fade")],t.prototype,"effect",void 0),nl([De(400)],t.prototype,"duration",void 0),nl([De(0)],t.prototype,"delay",void 0),t}(Qe),sl="e-dialog",al="e-rtl",ll="e-dlg-header-content",cl="e-dlg-header",hl="e-footer-content",dl="e-dlg-modal",pl="e-icon-dlg-close",ul="e-dlg-target",ml="e-scroll-disabled",gl="e-device",fl="e-dlg-fullscreen",yl="e-dlg-closeicon-btn",vl="e-popup-open",bl="Information",Ml="e-scroll-disabled",Nl="e-alert-dialog",Cl="e-confirm-dialog",El="e-dlg-resizable",Dl="e-restrict-left",Tl="e-resize-viewport",Ll="user action",Sl=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.needsID=!0,n}return il(t,e),t.prototype.render=function(){this.initialize(),this.initRender(),this.wireEvents(),"100%"===this.width&&(this.element.style.width=""),""!==this.minHeight&&(this.element.style.minHeight=N(this.minHeight)),this.enableResize&&(this.setResize(),this.isModal&&(this.isModelResize=!0),"None"===this.animationSettings.effect&&this.getMinHeight()),this.renderComplete()},t.prototype.initializeValue=function(){this.dlgClosedBy=Ll},t.prototype.preRender=function(){var e=this;this.initializeValue(),this.headerContent=null,this.allowMaxHeight=!0,this.preventVisibility=!0,this.clonedEle=this.element.cloneNode(!0),this.closeIconClickEventHandler=function(t){e.dlgClosedBy="close icon",e.hide(t)},this.dlgOverlayClickEventHandler=function(t){e.dlgClosedBy="overlayClick",t.preventFocus=!1,e.trigger("overlayClick",t,(function(t){t.preventFocus||e.focusContent(),e.dlgClosedBy=Ll}))};if(this.l10n=new Ut("dialog",{close:"Close"},this.locale),this.checkPositionData(),g(this.target)){var t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.target=document.body,this.isProtectedOnChange=t}},t.prototype.updatePersistData=function(){this.enablePersistence&&this.setProperties({width:parseFloat(this.element.style.width),height:parseFloat(this.element.style.height),position:{X:parseFloat(this.dragObj.element.style.left),Y:parseFloat(this.dragObj.element.style.top)}},!0)},t.prototype.isNumberValue=function(e){return/^[-+]?\d*\.?\d+$/.test(e)},t.prototype.checkPositionData=function(){if(!g(this.position)){if(!g(this.position.X)&&"number"!=typeof this.position.X)if(this.isNumberValue(this.position.X)){var e=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.position.X=parseFloat(this.position.X),this.isProtectedOnChange=e}if(!g(this.position.Y)&&"number"!=typeof this.position.Y)if(this.isNumberValue(this.position.Y)){e=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.position.Y=parseFloat(this.position.Y),this.isProtectedOnChange=e}}},t.prototype.getEle=function(e,t){for(var i=void 0,n=0;n<e.length;n++)if(e[n].classList.contains(t)){i=e[n];break}return i},t.prototype.getMinHeight=function(){var e="0px",t="0px";g(this.element.querySelector("."+ll))||(e=getComputedStyle(this.headerContent).height);var i=this.getEle(this.element.children,hl);g(i)||(t=getComputedStyle(i).height);var n,o=parseInt(e.slice(0,e.indexOf("p")),10),r=parseInt(t.slice(0,t.indexOf("p")),10);return n=o+30+(isNaN(r)?0:r),fa=n,o+30+r},t.prototype.onResizeStart=function(e,t){if(t.trigger("resizeStart",e),!e.cancel&&this.isModelResize&&!g(this.dlgContainer)&&this.dlgContainer.classList.contains("e-dlg-"+this.position.X+"-"+this.position.Y)){this.setPopupPosition(),this.dlgContainer.classList.remove("e-dlg-"+this.position.X+"-"+this.position.Y);var i=this.getTargetContainer(this.target);if(i instanceof Element)"rtl"===window.getComputedStyle(i).getPropertyValue("direction")?this.element.style.position="absolute":this.element.style.position="relative";else this.element.style.position="relative";this.element.classList.contains(Dl)&&this.element.classList.remove(Dl),this.isModelResize=!1}return e.cancel},t.prototype.onResizing=function(e,t){t.trigger("resizing",e)},t.prototype.onResizeComplete=function(e,t){t.trigger("resizeStop",e),this.updatePersistData()},t.prototype.setResize=function(){if(this.enableResize){this.element.classList.add(El);for(var e=getComputedStyle(this.element).minHeight,t=getComputedStyle(this.element).minWidth,i="",n=0;n<this.resizeHandles.length;n++){if("All"===this.resizeHandles[n]){i="south north east west north-east north-west south-east south-west";break}var o="";switch(this.resizeHandles[n].toString()){case"SouthEast":o="south-east";break;case"SouthWest":o="south-west";break;case"NorthEast":o="north-east";break;case"NorthWest":o="north-west";break;default:o=this.resizeHandles[n].toString()}i+=o.toLocaleLowerCase()+" "}this.enableRtl&&"south-east"===i.trim()?i="south-west":this.enableRtl&&"south-west"===i.trim()&&(i="south-east"),this.isModal&&this.enableRtl?this.element.classList.add(Dl):this.isModal&&this.target===document.body&&this.element.classList.add(Tl),function(e){Aa=e.resizeBegin,ka=e.resizing,Pa=e.resizeComplete,ma=Fa(e.element),Ma=Fa(e.boundary);for(var t=e.direction.split(" "),i=0;i<t.length;i++)if(Sa.indexOf(t[i])>=0&&t[i])Ua(t[i]);else if(""!==t[i].trim()){var n=_("div",{className:"e-icons "+Ea+" e-"+t[i]});ma.appendChild(n)}fa=e.minHeight,va=e.minWidth,ba=e.maxWidth,ya=e.maxHeight,e.proxy&&e.proxy.element&&e.proxy.element.classList.contains("e-dialog")?Ya(e.proxy):Ya()}({element:this.element,direction:i,minHeight:parseInt(e.slice(0,t.indexOf("p")),10),maxHeight:this.targetEle.clientHeight,minWidth:parseInt(t.slice(0,t.indexOf("p")),10),maxWidth:this.targetEle.clientWidth,boundary:this.target===document.body?null:this.targetEle,resizeBegin:this.onResizeStart.bind(this),resizeComplete:this.onResizeComplete.bind(this),resizing:this.onResizing.bind(this),proxy:this}),this.wireWindowResizeEvent()}else el(),this.unWireWindowResizeEvent(),this.isModal?this.element.classList.remove(Dl):this.element.classList.remove(Tl),this.element.classList.remove(El)},t.prototype.getFocusElement=function(e){var t=e.querySelectorAll('input,select,textarea,button:enabled,a,[contenteditable="true"],[tabindex]');return{element:t[t.length-1]}},t.prototype.keyDown=function(e){var t=this;if(9===e.keyCode&&this.isModal){var i=void 0;g(this.btnObj)||(i=this.btnObj[this.btnObj.length-1]),g(this.btnObj)&&!g(this.ftrTemplateContent)&&(i=this.getFocusElement(this.ftrTemplateContent)),g(this.btnObj)&&g(this.ftrTemplateContent)&&!g(this.contentEle)&&(i=this.getFocusElement(this.contentEle)),g(i)||document.activeElement!==i.element||e.shiftKey||(e.preventDefault(),this.focusableElements(this.element).focus()),document.activeElement===this.focusableElements(this.element)&&e.shiftKey&&(e.preventDefault(),g(i)||i.element.focus())}var n,o=document.activeElement,r=["input","textarea"].indexOf(o.tagName.toLowerCase())>-1,s=!1;if(r||(s=o.hasAttribute("contenteditable")&&"true"===o.getAttribute("contenteditable")),27===e.keyCode&&this.closeOnEscape){this.dlgClosedBy="escape";var a=document.querySelector(".e-popup-open:not(.e-dialog)");(g(a)||a.classList.contains("e-toolbar-pop")||a.classList.contains("e-slider-tooltip"))&&this.hide(e)}(13===e.keyCode&&!e.ctrlKey&&"textarea"!==o.tagName.toLowerCase()&&r&&!g(this.primaryButtonEle)||13===e.keyCode&&e.ctrlKey&&("textarea"===o.tagName.toLowerCase()||s)&&!g(this.primaryButtonEle))&&(this.buttons.some((function(e,t){n=t;var i=e.buttonModel;return!g(i)&&!0===i.isPrimary}))&&"function"==typeof this.buttons[n].click&&!this.primaryButtonEle.disabled&&setTimeout((function(){t.buttons[n].click.call(t,e)})))},t.prototype.initialize=function(){g(this.target)||(this.targetEle="string"==typeof this.target?document.querySelector(this.target):this.target),this.isBlazorServerRender()||G([this.element],sl),Q.isDevice&&G([this.element],gl),this.isBlazorServerRender()||this.setCSSClass(),this.setMaxHeight()},t.prototype.initRender=function(){var e=this;if(this.initialRender=!0,this.isBlazorServerRender()||ie(this.element,{role:"dialog"}),1e3===this.zIndex?(this.setzIndex(this.element,!1),this.calculatezIndex=!0):this.calculatezIndex=!1,this.setTargetContent(),""===this.header||g(this.header)||this.setHeader(),this.renderCloseIcon(),this.setContent(),""===this.footerTemplate||g(this.footerTemplate)?g(this.buttons[0])||g(this.buttons[0].buttonModel)||this.setButton():this.setFooterTemplate(),this.allowDragging&&!g(this.headerContent)&&this.setAllowDragging(),ie(this.element,{"aria-modal":this.isModal?"true":"false"}),this.isModal&&this.setIsModal(),!0!==this.element.classList.contains(Nl)&&!0!==this.element.classList.contains(Cl)&&!g(this.element.parentElement)){var t=this.isModal?this.dlgContainer.parentElement:this.element.parentElement;this.refElement=this.createElement("div",{className:"e-dlg-ref-element"}),t.insertBefore(this.refElement,this.isModal?this.dlgContainer:this.element)}if(g(this.targetEle)||(this.isModal?this.targetEle.appendChild(this.dlgContainer):this.targetEle.appendChild(this.element)),this.popupObj=new da(this.element,{height:this.height,width:this.width,zIndex:this.zIndex,relateTo:this.target,actionOnScroll:"none",enableRtl:this.enableRtl,open:function(t){var i={container:e.isModal?e.dlgContainer:e.element,element:e.element,target:e.target,preventFocus:!1};e.enableResize&&e.resetResizeIcon(),e.trigger("open",i,(function(t){t.preventFocus||e.focusContent()}))},close:function(t){e.isModal&&G([e.dlgOverlay],"e-fade"),e.unBindEvent(e.element),e.isModal&&(e.dlgContainer.style.display="none"),e.trigger("close",e.closeArgs);var i=document.activeElement;g(i)||g(i.blur)||i.blur(),g(e.storeActiveElement)||g(e.storeActiveElement.focus)||e.storeActiveElement.focus()}}),this.positionChange(),this.setEnableRTL(),this.isBlazorServerRender()||(G([this.element],"e-popup-close"),this.isModal&&this.setOverlayZindex()),this.visible){if(this.show(),this.isModal){var i=this.getTargetContainer(this.target);if(i instanceof Element)"rtl"===window.getComputedStyle(i).getPropertyValue("direction")&&this.setPopupPosition()}}else this.isModal&&(this.dlgOverlay.style.display="none");this.initialRender=!1},t.prototype.getTargetContainer=function(e){var t=null;if("string"==typeof e)if(e.startsWith("#"))t=document.getElementById(e.substring(1));else if(e.startsWith(".")){var i=document.getElementsByClassName(e.substring(1));t=i.length>0?i[0]:null}else e instanceof HTMLElement||e===document.body||(t=document.querySelector(e));else e instanceof HTMLElement&&(t=e);return t},t.prototype.resetResizeIcon=function(){var e=this.getMinHeight();if(this.targetEle.offsetHeight<e){var t=this.enableRtl?"e-south-west":"e-south-east",i=this.element.querySelector("."+t);g(i)||(i.style.bottom="-"+e.toString()+"px")}},t.prototype.setOverlayZindex=function(e){var t;t=g(e)?parseInt(this.element.style.zIndex,10)?parseInt(this.element.style.zIndex,10):this.zIndex:e,this.dlgOverlay.style.zIndex=(t-1).toString(),this.dlgContainer.style.zIndex=t.toString()},t.prototype.positionChange=function(){this.isModal&&(isNaN(parseFloat(this.position.X))||isNaN(parseFloat(this.position.Y)))?!isNaN(parseFloat(this.position.X))&&isNaN(parseFloat(this.position.Y))||isNaN(parseFloat(this.position.X))&&!isNaN(parseFloat(this.position.Y))?this.setPopupPosition():(this.element.style.top="0px",this.element.style.left="0px",this.dlgContainer.classList.add("e-dlg-"+this.position.X+"-"+this.position.Y)):this.setPopupPosition()},t.prototype.setPopupPosition=function(){this.popupObj.setProperties({position:{X:this.position.X,Y:this.position.Y}})},t.prototype.setAllowDragging=function(){var e=this,t="."+ll;this.element.classList.contains("e-draggable")||(this.dragObj=new zt(this.element,{clone:!1,isDragScroll:!0,abort:".e-dlg-closeicon-btn",handle:t,dragStart:function(t){e.trigger("dragStart",t,(function(e){}))},dragStop:function(t){if(e.isModal){e.IsDragStop=!0,g(e.position)||e.dlgContainer.classList.remove("e-dlg-"+e.position.X+"-"+e.position.Y);var i=e.getTargetContainer(e.target);if(i instanceof Element)"rtl"===window.getComputedStyle(i).getPropertyValue("direction")?e.element.style.position="absolute":e.element.style.position="relative";else e.element.style.position="relative"}e.trigger("dragStop",t),e.isModelResize=!1,e.element.classList.remove(Dl),e.updatePersistData()},drag:function(t){e.trigger("drag",t)}}),g(this.targetEle)||(this.dragObj.dragArea=this.targetEle))},t.prototype.setButton=function(){if(!this.isBlazorServerRender()){this.buttonContent=[],this.btnObj=[];for(var e=0;e<this.buttons.length;e++)if(!g(this.buttons[e].buttonModel)){var t=g(this.buttons[e].type)?"button":this.buttons[e].type.toLowerCase(),i=this.createElement("button",{className:this.cssClass,attrs:{type:t,tabindex:"0"}});this.buttonContent.push(i.outerHTML)}this.setFooterTemplate()}e=0;for(var n,o=this.element.children;e<o.length;e++)o[e].classList.contains(hl)&&(n=o[e].querySelectorAll("button"));for(e=0;e<this.buttons.length;e++)g(this.buttons[e].buttonModel)||(this.isBlazorServerRender()||(this.btnObj[e]=new Cs(this.buttons[e].buttonModel)),!g(this.ftrTemplateContent)&&n.length>0&&("function"==typeof this.buttons[e].click&&q.add(n[e],"click",this.buttons[e].click,this),"object"==typeof this.buttons[e].click&&q.add(n[e],"click",this.buttonClickHandler.bind(this,e),this)),this.isBlazorServerRender()||g(this.ftrTemplateContent)||(this.btnObj[e].appendTo(this.ftrTemplateContent.children[e]),this.buttons[e].isFlat&&this.btnObj[e].element.classList.add("e-flat"),this.primaryButtonEle=this.element.getElementsByClassName("e-primary")[0]))},t.prototype.buttonClickHandler=function(e){this.trigger("buttons["+e+"].click",{})},t.prototype.setContent=function(){this.contentEle=this.createElement("div",{className:"e-dlg-content",id:this.element.id+"_dialog-content"}),this.headerEle?ie(this.element,{"aria-describedby":this.element.id+"_title "+this.element.id+"_dialog-content"}):ie(this.element,{"aria-describedby":this.element.id+"_dialog-content"}),this.innerContentElement?this.contentEle.appendChild(this.innerContentElement):(g(this.content)||""===this.content)&&this.initialRender||("string"==typeof this.content?this.setTemplate(this.content,this.contentEle,"content"):this.content instanceof HTMLElement?this.contentEle.appendChild(this.content):this.setTemplate(this.content,this.contentEle,"content")),g(this.headerContent)?this.element.insertBefore(this.contentEle,this.element.children[0]):this.element.insertBefore(this.contentEle,this.element.children[1]),"auto"===this.height&&(this.isBlazorServerRender()||!Q.isIE||""!==this.element.style.width||g(this.width)||(this.element.style.width=N(this.width)),this.setMaxHeight())},t.prototype.setTemplate=function(e,t,i){var n,o;o=t.classList.contains(cl)?this.element.id+"header":t.classList.contains(hl)?this.element.id+"footerTemplate":this.element.id+"content",g(e.outerHTML)?"string"!=typeof e&&"string"==typeof e||("string"==typeof e&&(e=this.sanitizeHelper(e)),this.isVue||"string"!=typeof e?n=yi(e):t.innerHTML=e):t.appendChild(e);var r=[];if(!g(n)){for(var s=0,a=n({},this,i,o,!0);s<a.length;s++){var l=a[s];r.push(l)}$([].slice.call(r),t)}},t.prototype.sanitizeHelper=function(e){if(this.enableHtmlSanitizer){var t=Si.beforeSanitize();m(t,t,{cancel:!1,helper:null}),this.trigger("beforeSanitizeHtml",t),t.cancel&&!g(t.helper)?e=t.helper(e):t.cancel||(e=Si.serializeValue(t,e))}return e},t.prototype.setMaxHeight=function(){if(this.allowMaxHeight){var e=this.element.style.display;this.element.style.display="none",this.element.style.maxHeight=!g(this.target)&&this.targetEle.offsetHeight<window.innerHeight?this.targetEle.offsetHeight-20+"px":window.innerHeight-20+"px",this.element.style.display=e,Q.isIE&&"auto"===this.height&&!g(this.contentEle)&&this.element.offsetHeight<this.contentEle.offsetHeight&&(this.element.style.height="inherit")}},t.prototype.setEnableRTL=function(){this.isBlazorServerRender()||(this.enableRtl?G([this.element],al):X([this.element],al)),g(this.element.querySelector(".e-resize-handle"))||(el(),this.setResize())},t.prototype.setTargetContent=function(){var e=this;if(g(this.content)||""===this.content){var t=""!==this.element.innerHTML.replace(/\s|<(\/?|\/?)(!--!--)>/g,"");(this.element.children.length>0||t)&&(this.innerContentElement=document.createDocumentFragment(),[].slice.call(this.element.childNodes).forEach((function(t){8!==t.nodeType&&e.innerContentElement.appendChild(t)})))}},t.prototype.setHeader=function(){this.headerEle?this.headerEle.innerHTML="":this.headerEle=this.createElement("div",{id:this.element.id+"_title",className:cl}),this.createHeaderContent(),this.headerContent.appendChild(this.headerEle),this.setTemplate(this.header,this.headerEle,"header"),ie(this.element,{"aria-describedby":this.element.id+"_title"}),ie(this.element,{"aria-labelledby":this.element.id+"_dialog-header"}),this.element.insertBefore(this.headerContent,this.element.children[0]),this.allowDragging&&!g(this.headerContent)&&this.setAllowDragging()},t.prototype.setFooterTemplate=function(){this.ftrTemplateContent?this.ftrTemplateContent.innerHTML="":this.ftrTemplateContent=this.createElement("div",{className:hl}),""===this.footerTemplate||g(this.footerTemplate)?this.ftrTemplateContent.innerHTML=this.buttonContent.join(""):this.setTemplate(this.footerTemplate,this.ftrTemplateContent,"footerTemplate"),this.element.appendChild(this.ftrTemplateContent)},t.prototype.createHeaderContent=function(){g(this.headerContent)&&(this.headerContent=this.createElement("div",{id:this.element.id+"_dialog-header",className:ll}))},t.prototype.renderCloseIcon=function(){this.showCloseIcon&&(this.closeIcon=this.createElement("button",{className:yl,attrs:{type:"button"}}),this.closeIconBtnObj=new Cs({cssClass:"e-flat",iconCss:pl+" e-icons"}),this.closeIconTitle(),g(this.headerContent)?(this.createHeaderContent(),J([this.closeIcon],this.headerContent),this.element.insertBefore(this.headerContent,this.element.children[0])):J([this.closeIcon],this.headerContent),this.closeIconBtnObj.appendTo(this.closeIcon))},t.prototype.closeIconTitle=function(){this.l10n.setLocale(this.locale);var e=this.l10n.getConstant("close");this.closeIcon.setAttribute("title",e),this.closeIcon.setAttribute("aria-label",e)},t.prototype.setCSSClass=function(e){e&&(X([this.element],e.split(" ")),this.isModal&&!g(this.dlgContainer)&&X([this.dlgContainer],e.split(" "))),this.cssClass&&(G([this.element],this.cssClass.split(" ")),this.isModal&&!g(this.dlgContainer)&&G([this.dlgContainer],this.cssClass.split(" ")))},t.prototype.setIsModal=function(){this.dlgContainer=this.createElement("div",{className:"e-dlg-container"}),this.setCSSClass(),this.element.classList.remove(vl),this.element.parentNode.insertBefore(this.dlgContainer,this.element),this.dlgContainer.appendChild(this.element),G([this.element],dl),this.dlgOverlay=this.createElement("div",{className:"e-dlg-overlay"}),this.dlgOverlay.style.zIndex=(this.zIndex-1).toString(),this.dlgContainer.appendChild(this.dlgOverlay)},t.prototype.getValidFocusNode=function(e){for(var t,i=0;i<e.length;i++){if(((t=e[i]).clientHeight>0||"a"===t.tagName.toLowerCase()&&t.hasAttribute("href"))&&t.tabIndex>-1&&!t.disabled&&!this.disableElement(t,'[disabled],[aria-disabled="true"],[type="hidden"]'))return t;t=null}return t},t.prototype.focusableElements=function(e){if(!g(e)){var t=e.querySelectorAll('input,select,textarea,button,a,[contenteditable="true"],[tabindex]');return this.getValidFocusNode(t)}return null},t.prototype.getAutoFocusNode=function(e){var t=e.querySelector("."+yl),i=e.querySelectorAll("[autofocus]"),n=this.getValidFocusNode(i);if(g(n)){if(!g(n=this.focusableElements(this.contentEle)))return n;if(!g(this.primaryButtonEle))return this.element.querySelector(".e-primary")}else t=n;return t},t.prototype.disableElement=function(e,t){var i=e?e.matches||e.webkitMatchesSelector||e.msGetRegionContent:null;if(i)for(;e;e=e.parentNode)if(e instanceof Element&&i.call(e,t))return e;return null},t.prototype.focusContent=function(){var e=this.getAutoFocusNode(this.element),t=g(e)?this.element:e,i=Q.userAgent;(i.indexOf("MSIE ")>0||i.indexOf("Trident/")>0)&&this.element.focus(),t.focus(),this.unBindEvent(this.element),this.bindEvent(this.element)},t.prototype.bindEvent=function(e){q.add(e,"keydown",this.keyDown,this)},t.prototype.unBindEvent=function(e){q.remove(e,"keydown",this.keyDown)},t.prototype.updateSanitizeContent=function(){this.isBlazorServerRender()||(this.contentEle.innerHTML=this.sanitizeHelper(this.content))},t.prototype.isBlazorServerRender=function(){return!1},t.prototype.getModuleName=function(){return"dialog"},t.prototype.onPropertyChanged=function(e,t){if(this.element.classList.contains(sl))for(var i=0,n=Object.keys(e);i<n.length;i++){switch(n[i]){case"content":g(this.content)||""===this.content?g(this.contentEle)||(ee(this.contentEle),this.contentEle=null):(this.isBlazorServerRender()&&(this.contentEle=this.element.querySelector(".e-dlg-content")),g(this.contentEle)||"dialog"===this.contentEle.getAttribute("role")?this.setContent():(this.isBlazorServerRender()||(this.contentEle.innerHTML=""),"function"==typeof this.content?(this.clearTemplate(["content"]),ee(this.contentEle),this.contentEle=null,this.setContent()):"string"==typeof this.content?this.updateSanitizeContent():this.contentEle.appendChild(this.content),this.setMaxHeight()));break;case"header":""===this.header||g(this.header)?this.headerEle&&(ee(this.headerEle),this.headerEle=null):this.setHeader();break;case"footerTemplate":if(""===this.footerTemplate||g(this.footerTemplate)){if(!this.ftrTemplateContent)return;ee(this.ftrTemplateContent),this.ftrTemplateContent=null,this.buttons=[{}]}else this.setFooterTemplate(),this.buttons=[{}];break;case"showCloseIcon":this.element.getElementsByClassName(pl).length>0?this.showCloseIcon||""!==this.header&&!g(this.header)?this.showCloseIcon||ee(this.closeIcon):(ee(this.headerContent),this.headerContent=null):(this.renderCloseIcon(),this.wireEvents());break;case"locale":this.showCloseIcon&&this.closeIconTitle();break;case"visible":this.visible?this.show():this.hide();break;case"isModal":this.updateIsModal();break;case"height":ae(this.element,{height:N(e.height)}),this.updatePersistData();break;case"width":ae(this.element,{width:N(e.width)}),this.updatePersistData();break;case"zIndex":this.popupObj.zIndex=this.zIndex,this.isModal&&this.setOverlayZindex(this.zIndex),this.element.style.zIndex!==this.zIndex.toString()&&(this.calculatezIndex=!1);break;case"cssClass":this.setCSSClass(t.cssClass);break;case"buttons":this.unWireButtonEvents(),this.destroyButtons(),g(this.ftrTemplateContent)||(ee(this.ftrTemplateContent),this.ftrTemplateContent=null),this.footerTemplate="",this.setButton();break;case"allowDragging":this.allowDragging&&!g(this.headerContent)?this.setAllowDragging():this.dragObj.destroy();break;case"target":this.setTarget(e.target);break;case"position":if(this.checkPositionData(),this.isModal){var o=this.position.X,r=this.position.Y;g(t.position)||(g(t.position.X)||(o=t.position.X),g(t.position.Y)||(r=t.position.Y)),this.dlgContainer.classList.contains("e-dlg-"+o+"-"+r)&&this.dlgContainer.classList.remove("e-dlg-"+o+"-"+r)}this.positionChange(),this.updatePersistData();break;case"enableRtl":this.setEnableRTL();break;case"enableResize":this.setResize(),this.isModelResize=this.enableResize&&this.isModal,this.enableResize&&this.dialogOpen&&this.resetResizeIcon();break;case"minHeight":""!==this.minHeight&&(this.element.style.minHeight=N(this.minHeight))}}},t.prototype.setTarget=function(e){this.popupObj.relateTo=e,this.target=e,this.targetEle="string"==typeof this.target?document.querySelector(this.target):this.target,this.dragObj&&(this.dragObj.dragArea=this.targetEle),this.setMaxHeight(),this.isModal&&this.updateIsModal(),this.enableResize&&this.setResize(),g(this.targetEle)||(this.isModal&&!g(this.dlgContainer)?this.targetEle.appendChild(this.dlgContainer):g(this.element)||this.targetEle.appendChild(this.element))},t.prototype.updateIsModal=function(){if(this.element.setAttribute("aria-modal",this.isModal?"true":"false"),this.isModal)g(this.dlgOverlay)&&(this.setIsModal(),this.element.style.top="0px",this.element.style.left="0px",g(this.targetEle)||this.targetEle.appendChild(this.dlgContainer));else{for(X([this.element],dl),X([document.body],[ul,ml]),ee(this.dlgOverlay);this.dlgContainer.firstChild;)this.dlgContainer.parentElement.insertBefore(this.dlgContainer.firstChild,this.dlgContainer);this.dlgContainer.parentElement.removeChild(this.dlgContainer)}this.visible&&this.show(),this.positionChange(),this.isModal&&this.dlgOverlay&&q.add(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler,this)},t.prototype.setzIndex=function(e,t){var i=this.isProtectedOnChange;this.isProtectedOnChange=!0;var n=ua(e);this.zIndex=n>this.zIndex?n:this.zIndex,this.isProtectedOnChange=i,t&&(this.popupObj.zIndex=this.zIndex)},t.prototype.windowResizeHandler=function(){!function(e){ba=e}(this.targetEle.clientWidth),function(e){ya=e}(this.targetEle.clientHeight),this.setMaxHeight()},t.prototype.getPersistData=function(){return this.addOnPersist(["width","height","position"])},t.prototype.removeAllChildren=function(e){for(;e.children[0];)this.removeAllChildren(e.children[0]),e.removeChild(e.children[0])},t.prototype.destroy=function(){if(!this.isDestroyed){var t=[al,dl,El,Dl,fl,gl],i=["role","aria-modal","aria-labelledby","aria-describedby","aria-grabbed","tabindex","style"];X([this.targetEle],[ul,ml]),!g(this.element)&&this.element.classList.contains(fl)&&X([document.body],[ul,ml]),this.isModal&&X([g(this.targetEle)?document.body:this.targetEle],ml),this.unWireEvents(),this.unWireButtonEvents(),this.destroyButtons(),g(this.closeIconBtnObj)||this.closeIconBtnObj.destroy(),g(this.dragObj)||this.dragObj.destroy(),!g(this.popupObj.element)&&this.popupObj.element.classList.contains("e-popup")&&this.popupObj.destroy(),X([this.element],t),g(this.cssClass)||""===this.cssClass||X([this.element],this.cssClass.split(" ")),g(this.refElement)||g(this.refElement.parentElement)||(this.refElement.parentElement.insertBefore(this.isModal?this.dlgContainer:this.element,this.refElement),ee(this.refElement),this.refElement=void 0),this.isModal&&(ee(this.dlgOverlay),this.dlgContainer.parentNode.insertBefore(this.element,this.dlgContainer),ee(this.dlgContainer)),this.element.innerHTML=this.clonedEle.innerHTML;for(var n=0;n<i.length;n++)this.element.removeAttribute(i[n]);this.ftrTemplateContent=null,this.headerContent=null,this.isReact||this.isVue||g(this.contentEle)||this.removeAllChildren(this.contentEle),this.contentEle=null,ma=null,ga=null,Ma=null,Na=null,Aa=null,ka=null,Pa=null,e.prototype.destroy.call(this),this.isReact&&this.clearTemplate()}},t.prototype.wireWindowResizeEvent=function(){this.boundWindowResizeHandler=this.windowResizeHandler.bind(this),window.addEventListener("resize",this.boundWindowResizeHandler)},t.prototype.unWireWindowResizeEvent=function(){window.removeEventListener("resize",this.boundWindowResizeHandler),this.boundWindowResizeHandler=null},t.prototype.wireEvents=function(){this.showCloseIcon&&q.add(this.closeIcon,"click",this.closeIconClickEventHandler,this),this.isModal&&this.dlgOverlay&&q.add(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler,this)},t.prototype.unWireEvents=function(){this.showCloseIcon&&q.remove(this.closeIcon,"click",this.closeIconClickEventHandler),this.isModal&&q.remove(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler)},t.prototype.refreshPosition=function(){this.popupObj.refreshPosition(),this.element.classList.contains(dl)&&this.positionChange()},t.prototype.getDimension=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},t.prototype.show=function(e){var t=this;if(this.element.classList.contains(sl)){if(!this.element.classList.contains(vl)||!g(e)){g(e)||this.fullScreen(e);var i={cancel:!1,element:this.element,container:this.isModal?this.dlgContainer:this.element,target:this.target,maxHeight:this.element.style.maxHeight};this.trigger("beforeOpen",i,(function(e){if(!e.cancel){if(t.element.style.maxHeight!==i.maxHeight&&(t.allowMaxHeight=!1,t.element.style.maxHeight=i.maxHeight),t.enableResize&&null==t.boundWindowResizeHandler&&!t.initialRender&&t.wireWindowResizeEvent(),t.storeActiveElement=document.activeElement,t.element.tabIndex=-1,t.isModal&&!g(t.dlgOverlay))if(t.dlgOverlay.style.display="block",t.dlgContainer.style.display="flex",X([t.dlgOverlay],"e-fade"),g(t.targetEle))G([document.body],[ul,ml]);else{if(t.targetEle===document.body?t.dlgContainer.style.position="fixed":t.dlgContainer.style.position="absolute",t.dlgOverlay.style.position="absolute",(n=t.getTargetContainer(t.target))instanceof Element)"rtl"===window.getComputedStyle(n).getPropertyValue("direction")?t.element.style.position="absolute":t.element.style.position="relative";else t.element.style.position="relative";G([t.targetEle],[ul,ml])}var n,o={name:(t.animationSettings.effect,t.animationSettings.effect+"In"),duration:t.animationSettings.duration,delay:t.animationSettings.delay},r=t.isModal?t.element.parentElement:t.element;if(t.calculatezIndex&&(t.setzIndex(r,!0),ae(t.element,{zIndex:t.zIndex}),t.isModal&&t.setOverlayZindex(t.zIndex)),t.animationSettings.effect,"None"===t.animationSettings.effect?t.popupObj.show():t.popupObj.show(o),t.isModal)if((n=t.getTargetContainer(t.target))instanceof Element)"rtl"!==window.getComputedStyle(n).getPropertyValue("direction")||t.IsDragStop||t.setPopupPosition();t.dialogOpen=!0;var s=t.isProtectedOnChange;t.isProtectedOnChange=!0,t.visible=!0,t.preventVisibility=!0,t.isProtectedOnChange=s}}))}this.isReact&&this.renderReactTemplates()}},t.prototype.hide=function(e){var t=this;if(this.element.classList.contains(sl)&&this.preventVisibility){var i={cancel:!1,isInteracted:!!e,element:this.element,target:this.target,container:this.isModal?this.dlgContainer:this.element,event:e,closedBy:this.dlgClosedBy};this.closeArgs=i,this.trigger("beforeClose",i,(function(e){if(!e.cancel){t.enableResize&&t.unWireWindowResizeEvent();var i={name:(t.animationSettings.effect,t.animationSettings.effect+"Out"),duration:t.animationSettings.duration,delay:t.animationSettings.delay};t.animationSettings.effect,"None"===t.animationSettings.effect?t.popupObj.hide():t.popupObj.hide(i),setTimeout((function(){t.isModal&&!g(t.targetEle)&&t.targetEle.classList.contains(ul)&&t.targetEle.classList.contains(ml)&&X([t.targetEle],[ul,ml]),document.body.classList.contains(ul)&&document.body.classList.contains(ml)&&X([document.body],[ul,ml])}),t.animationSettings.duration+t.animationSettings.delay),t.dialogOpen=!1;var n=t.isProtectedOnChange;t.isProtectedOnChange=!0,t.visible=!1,t.preventVisibility=!1,t.isProtectedOnChange=n}t.dlgClosedBy=Ll}))}},t.prototype.fullScreen=function(e){if(this.element.offsetTop,this.element.offsetLeft,e){this.isModal||(this.element.style.top=document.scrollingElement.scrollTop+"px"),G([this.element],fl);var t=this.element.style.display;this.element.style.display="none",this.element.style.maxHeight=g(this.target)?window.innerHeight+"px":this.targetEle.offsetHeight+"px",this.element.style.display=t,G([document.body],[ul,ml]),this.allowDragging&&!g(this.dragObj)&&this.dragObj.destroy()}else X([this.element],fl),X([document.body],[ul,ml]),this.allowDragging&&!g(this.headerContent)&&this.setAllowDragging();return e},t.prototype.getButtons=function(e){return g(e)?this.btnObj:this.btnObj[e]},t.prototype.unWireButtonEvents=function(){if(this.buttons.length>0&&""===this.footerTemplate&&this.ftrTemplateContent)for(var e=0;e<this.buttons.length;e++)this.buttons[e].click&&"function"==typeof this.buttons[e].click&&this.ftrTemplateContent.children[e]&&q.remove(this.ftrTemplateContent.children[e],"click",this.buttons[e].click)},t.prototype.destroyButtons=function(){if(!g(this.btnObj))for(var e=0;e<this.btnObj.length;e++)this.btnObj[e]&&!this.btnObj[e].isDestroyed&&this.btnObj[e].destroy()},nl([De("")],t.prototype,"content",void 0),nl([De(!0)],t.prototype,"enableHtmlSanitizer",void 0),nl([De(!1)],t.prototype,"enablePersistence",void 0),nl([De(!1)],t.prototype,"showCloseIcon",void 0),nl([De(!1)],t.prototype,"isModal",void 0),nl([De("")],t.prototype,"header",void 0),nl([De(!0)],t.prototype,"visible",void 0),nl([De(!1)],t.prototype,"enableResize",void 0),nl([De(["South-East"])],t.prototype,"resizeHandles",void 0),nl([De("auto")],t.prototype,"height",void 0),nl([De("")],t.prototype,"minHeight",void 0),nl([De("100%")],t.prototype,"width",void 0),nl([De("")],t.prototype,"cssClass",void 0),nl([De(1e3)],t.prototype,"zIndex",void 0),nl([De(null)],t.prototype,"target",void 0),nl([De("")],t.prototype,"footerTemplate",void 0),nl([De(!1)],t.prototype,"allowDragging",void 0),nl([Le([{}],ol)],t.prototype,"buttons",void 0),nl([De(!0)],t.prototype,"closeOnEscape",void 0),nl([Te({},rl)],t.prototype,"animationSettings",void 0),nl([Te({X:"center",Y:"center"},sa)],t.prototype,"position",void 0),nl([Se()],t.prototype,"created",void 0),nl([Se()],t.prototype,"open",void 0),nl([Se()],t.prototype,"beforeSanitizeHtml",void 0),nl([Se()],t.prototype,"beforeOpen",void 0),nl([Se()],t.prototype,"close",void 0),nl([Se()],t.prototype,"beforeClose",void 0),nl([Se()],t.prototype,"dragStart",void 0),nl([Se()],t.prototype,"dragStop",void 0),nl([Se()],t.prototype,"drag",void 0),nl([Se()],t.prototype,"overlayClick",void 0),nl([Se()],t.prototype,"resizeStart",void 0),nl([Se()],t.prototype,"resizing",void 0),nl([Se()],t.prototype,"resizeStop",void 0),nl([Se()],t.prototype,"destroyed",void 0),t=nl([Ie],t)}(St);!function(e){function t(e,t){var i=new Sl(e);return i.appendTo(t),i}function i(e,t){return e.header=g(t.title)?null:t.title,e.content=g(t.content)?"":t.content,e.isModal=!!g(t.isModal)||t.isModal,e.showCloseIcon=!g(t.showCloseIcon)&&t.showCloseIcon,e.allowDragging=!g(t.isDraggable)&&t.isDraggable,e.closeOnEscape=!g(t.closeOnEscape)&&t.closeOnEscape,e.position=g(t.position)?{X:"center",Y:"top"}:t.position,e.animationSettings=g(t.animationSettings)?{effect:"Fade",duration:400,delay:0}:t.animationSettings,e.cssClass=g(t.cssClass)?"":t.cssClass,e.zIndex=g(t.zIndex)?1e3:t.zIndex,e.open=g(t.open)?null:t.open,e.width=g(t.width)?"auto":t.width,e.height=g(t.height)?"auto":t.height,e}function n(e,t,i){var n=i;return g(t.text)||(n.buttonModel.content=t.text),g(t.icon)||(n.buttonModel.iconCss=t.icon),g(t.cssClass)||(n.buttonModel.cssClass=t.cssClass),g(t.click)||(n.click=t.click),g(t.isFlat)||(n.isFlat=t.isFlat),n}e.alert=function(e){var o,r,s=_("div",{className:Nl});return document.body.appendChild(s),(o=t("string"==typeof e?{content:e,position:{X:"center",Y:"top"},isModal:!0,header:bl,buttons:[{buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}}]}:function(e,t){var i=[{buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}}];return g(t.okButton)?e.buttons=i:e.buttons[0]=n(e.buttons[0],t.okButton,i[0]),e}(i({buttons:[]},r=e),r),s)).close=function(){e&&e.close&&e.close.apply(o),o.destroy(),o.element.classList.contains("e-dlg-modal")?(o.element.parentElement.remove(),o.target.classList.remove(Ml)):o.element.remove()},o},e.confirm=function(e){var o,r,s=_("div",{className:Cl});return document.body.appendChild(s),(o=t("string"==typeof e?{position:{X:"center",Y:"top"},content:e,isModal:!0,header:bl,buttons:[{buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}},{buttonModel:{content:"Cancel"},click:function(){this.hide()}}]}:function(e,t){var i={buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}},o={buttonModel:{content:"Cancel"},click:function(){this.hide()}};return g(t.okButton)?e.buttons[0]=i:e.buttons[0]=n(e.buttons[0],t.okButton,i),g(t.cancelButton)?e.buttons[1]=o:e.buttons[1]=n(e.buttons[1],t.cancelButton,o),e}(i({buttons:[]},r=e),r),s)).close=function(){e&&e.close&&e.close.apply(o),o.destroy(),o.element.classList.contains("e-dlg-modal")?(o.element.parentElement.remove(),o.target.classList.remove(Ml)):o.element.remove()},o}}(tl||(tl={}));var Il,wl=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xl=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},jl="e-tooltip",Ol="e-rtl",zl="e-icons",Al="e-tooltip-close",kl="e-tooltip-wrap",Pl="e-tip-content",Rl="e-arrow-tip",Bl="e-arrow-tip-outer",Hl="e-arrow-tip-inner",Ul="e-tip-bottom",Fl="e-tip-top",Yl="e-tip-left",Vl="e-tip-right",Ql="e-popup",ql="e-popup-open",Wl="e-popup-close",_l="e-lib",Gl="e-tooltip-popup-container",Xl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return wl(t,e),xl([De({effect:"FadeIn",duration:150,delay:0})],t.prototype,"open",void 0),xl([De({effect:"FadeOut",duration:150,delay:0})],t.prototype,"close",void 0),t}(Qe),Kl=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.mouseMoveEvent=null,n.mouseMoveTarget=null,n.containerElement=null,n.isBodyContainer=!0,n}return wl(t,e),t.prototype.initialize=function(){this.formatPosition(),G([this.element],jl)},t.prototype.formatPosition=function(){var e,t;this.position&&(0===this.position.indexOf("Top")||0===this.position.indexOf("Bottom")?(e=this.position.split(/(?=[A-Z])/),this.tooltipPositionY=e[0],this.tooltipPositionX=e[1]):(t=this.position.split(/(?=[A-Z])/),this.tooltipPositionX=t[0],this.tooltipPositionY=t[1]))},t.prototype.renderArrow=function(){this.setTipClass(this.position);var e=this.createElement("div",{className:Rl+" "+this.tipClass});e.appendChild(this.createElement("div",{className:Bl+" "+this.tipClass})),e.appendChild(this.createElement("div",{className:Hl+" "+this.tipClass})),this.tooltipEle.appendChild(e)},t.prototype.setTipClass=function(e){0===e.indexOf("Right")?this.tipClass=Yl:0===e.indexOf("Bottom")?this.tipClass=Fl:0===e.indexOf("Left")?this.tipClass=Vl:this.tipClass=Ul},t.prototype.renderPopup=function(e){var t=this.mouseTrail?{top:0,left:0}:this.getTooltipPosition(e);this.tooltipEle.classList.remove(_l),this.popupObj=new da(this.tooltipEle,{height:this.height,width:this.width,position:{X:t.left,Y:t.top},enableRtl:this.enableRtl,open:this.openPopupHandler.bind(this),close:this.closePopupHandler.bind(this)})},t.prototype.getScalingFactor=function(e){if(!e)return{x:1,y:1};var t={x:1,y:1},i=e.closest('[style*="transform: scale"]');if(i&&i!==this.tooltipEle&&i.contains(this.tooltipEle)){var n=window.getComputedStyle(i).getPropertyValue("transform").match(/matrix\(([^)]+)\)/)[1].split(",").map(parseFloat);t.x=n[0],t.y=n[3]}return t},t.prototype.getTooltipPosition=function(e){this.tooltipEle.style.display="block";var t=this.element.closest('[style*="zoom"]');t&&(t.contains(this.tooltipEle)||(this.tooltipEle.style.zoom=getComputedStyle(t).zoom));var i=Ds(e,this.tooltipPositionX,this.tooltipPositionY,!this.isBodyContainer,this.isBodyContainer?null:this.containerElement.getBoundingClientRect()),n=this.getScalingFactor(e),o=this.calculateTooltipOffset(this.position,n.x,n.y),r=this.calculateElementPosition(i,o),s=r[0],a=r[1],l=this.collisionFlipFit(e,s,a);return l.left=l.left/n.x,l.top=l.top/n.y,this.tooltipEle.style.display="",l},t.prototype.windowResize=function(){this.reposition(this.findTarget())},t.prototype.reposition=function(e){if(this.popupObj&&e){var t=this.getTooltipPosition(e);this.popupObj.position={X:t.left,Y:t.top},this.popupObj.dataBind()}},t.prototype.openPopupHandler=function(){!this.mouseTrail&&this.needTemplateReposition()&&this.reposition(this.findTarget()),this.trigger("afterOpen",this.tooltipEventArgs),this.tooltipEventArgs=null},t.prototype.closePopupHandler=function(){this.isReact&&"Click"!==this.opensOn&&"function"!=typeof this.content&&this.clearTemplate(["content"]),this.clear();var e={type:this.tooltipEventArgs.event?this.tooltipEventArgs.event.type:null,cancel:!1,target:this.tooltipEventArgs.target,event:this.tooltipEventArgs.event?this.tooltipEventArgs.event:null,element:this.tooltipEle,isInteracted:!g(this.tooltipEventArgs.event)};this.trigger("afterClose",e),e=null},t.prototype.calculateTooltipOffset=function(e,t,i){void 0===t&&(t=1),void 0===i&&(i=1);var n,o,r,s,a,l,c,h,d={top:0,left:0};if(1!==t||1!==i){var p=this.tooltipEle.getBoundingClientRect(),u=void 0;r=Math.round(p.width),s=Math.round(p.height),(a=ne("."+Rl,this.tooltipEle))&&(u=a.getBoundingClientRect()),n=a?Math.round(u.width):0,o=a?Math.round(u.height):0,l=this.showTipPointer?0:8,c=o/2+2+(s-this.tooltipEle.clientHeight*i),h=n/2+2+(r-this.tooltipEle.clientWidth*t)}else r=this.tooltipEle.offsetWidth,s=this.tooltipEle.offsetHeight,n=(a=ne("."+Rl,this.tooltipEle))?a.offsetWidth:0,o=a?a.offsetHeight:0,l=this.showTipPointer?0:8,c=o/2+2+(this.tooltipEle.offsetHeight-this.tooltipEle.clientHeight),h=n/2+2+(this.tooltipEle.offsetWidth-this.tooltipEle.clientWidth);switch(this.mouseTrail&&(l+=2),e){case"RightTop":d.left+=n+l,d.top-=s-c;break;case"RightCenter":d.left+=n+l,d.top-=s/2;break;case"RightBottom":d.left+=n+l,d.top-=c;break;case"BottomRight":d.top+=o+l,d.left-=h;break;case"BottomCenter":d.top+=o+l,d.left-=r/2;break;case"BottomLeft":d.top+=o+l,d.left-=r-h;break;case"LeftBottom":d.left-=n+r+l,d.top-=c;break;case"LeftCenter":d.left-=n+r+l,d.top-=s/2;break;case"LeftTop":d.left-=n+r+l,d.top-=s-c;break;case"TopLeft":d.top-=s+o+l,d.left-=r-h;break;case"TopRight":d.top-=s+o+l,d.left-=h;break;default:d.top-=s+o+l,d.left-=r/2}return d.left+=this.offsetX,d.top+=this.offsetY,d},t.prototype.updateTipPosition=function(e){var t=oe("."+Rl+",."+Bl+",."+Hl,this.tooltipEle);X(t,[Ul,Fl,Yl,Vl]),this.setTipClass(e),G(t,this.tipClass)},t.prototype.adjustArrow=function(e,t,i,n){var o=ne("."+Rl,this.tooltipEle);if(!1!==this.showTipPointer&&null!==o){var r,s;this.updateTipPosition(t),this.tooltipEle.style.display="block";var a,l=this.tooltipEle.clientWidth,c=this.tooltipEle.clientHeight,h=ne("."+Hl,this.tooltipEle),d=o.offsetWidth,p=o.offsetHeight;if(this.tooltipEle.style.display="",this.tipClass===Ul||this.tipClass===Fl){if(this.tipClass===Ul?(s="99.9%",h.style.top="-"+(p-2)+"px"):(s=-(p-1)+"px",h.style.top="-"+(p-6)+"px"),e)r=(a="Center"!==i||l>e.offsetWidth||this.mouseTrail)&&"Left"===i||!a&&"End"===this.tipPointerPosition?l-d-2+"px":a&&"Right"===i||!a&&"Start"===this.tipPointerPosition?"2px":!a||"End"!==this.tipPointerPosition&&"Start"!==this.tipPointerPosition?l/2-d/2+"px":"End"===this.tipPointerPosition?e.offsetWidth+(this.tooltipEle.offsetWidth-e.offsetWidth)/2-d/2-2+"px":(this.tooltipEle.offsetWidth-e.offsetWidth)/2-d/2+2+"px"}else this.tipClass===Vl?(r="99.9%",h.style.left="-"+(d-2)+"px"):(r=-(d-1)+"px",h.style.left=d-2-d+"px"),s=(a="Center"!==n||c>e.offsetHeight||this.mouseTrail)&&"Top"===n||!a&&"End"===this.tipPointerPosition?c-p-2+"px":a&&"Bottom"===n||!a&&"Start"===this.tipPointerPosition?"2px":c/2-p/2+"px";o.style.top=s,o.style.left=r}},t.prototype.renderContent=function(e){var t=this,i=ne("."+Pl,this.tooltipEle);if(this.cssClass&&G([this.tooltipEle],this.cssClass.split(" ")),e&&!g(e.getAttribute("title"))&&(e.setAttribute("data-content",e.getAttribute("title")),e.removeAttribute("title")),g(this.content))e&&!g(e.getAttribute("data-content"))&&(i.innerHTML=e.getAttribute("data-content"));else if(i.innerHTML="",this.content instanceof HTMLElement)i.appendChild(this.content);else if("string"==typeof this.content){if(this.isAngular?this.setProperties({content:Si.sanitize(this.content)},!0):this.content=this.enableHtmlSanitizer?Si.sanitize(this.content):this.content,this.enableHtmlParse)(n=yi(this.content)({},this,"content",this.element.id+"content",void 0,void 0,i,this.root))&&$(n,i);else i.textContent=this.content}else{var n;(n=yi(this.content)({},this,"content",this.element.id+"content",void 0,void 0,i))&&(this.isAngular&&setTimeout((function(){t.reposition(e)}),1),$(n,i)),this.renderReactTemplates()}},t.prototype.renderCloseIcon=function(){if(this.isSticky){var e=this.createElement("div",{className:zl+" "+Al,attrs:{role:"button","aria-label":"Press escape to close the Tooltip"}});this.tooltipEle.appendChild(e),q.add(e,Q.touchStartEvent,this.onStickyClose,this)}else{var t=this.tooltipEle.querySelector("."+zl+"."+Al);t&&te(t)}},t.prototype.addDescribedBy=function(e,t){var i=(e.getAttribute("aria-describedby")||"").split(/\s+/);i.indexOf(t)<0&&i.push(t),ie(e,{"aria-describedby":i.join(" ").trim(),"data-tooltip-id":t})},t.prototype.removeDescribedBy=function(e){var t=e.getAttribute("data-tooltip-id"),i=(e.getAttribute("aria-describedby")||"").split(/\s+/),n=i.indexOf(t);-1!==n&&i.splice(n,1),e.removeAttribute("data-tooltip-id");var o=i.join(" ").trim();o?e.setAttribute("aria-describedby",o):e.removeAttribute("aria-describedby")},t.prototype.tapHoldHandler=function(e){clearTimeout(this.autoCloseTimer),this.targetHover(e.originalEvent)},t.prototype.touchEndHandler=function(){var e=this;if(!this.isSticky){this.autoCloseTimer=setTimeout((function(){e.close()}),1500)}},t.prototype.targetClick=function(e){var t;if(!g(t=this.target?se(e.target,this.target):this.element)){var i=e;null===t.getAttribute("data-tooltip-id")?"mousedown"===i.type&&2===i.button||this.targetHover(e):this.isSticky||this.hideTooltip(this.animation.close,e,t)}},t.prototype.targetHover=function(e){var t;if(!(g(t=this.target?se(e.target,this.target):this.element)||null!==t.getAttribute("data-tooltip-id")&&0===this.closeDelay)){for(var i=0,n=[].slice.call(oe('[data-tooltip-id= "'+this.ctrlId+'_content"]',document));i<n.length;i++){var o=n[i];this.restoreElement(o)}this.showTooltip(t,this.animation.open,e)}},t.prototype.mouseMoveBeforeOpen=function(e){this.mouseMoveEvent=e},t.prototype.mouseMoveBeforeRemove=function(){this.mouseMoveTarget&&q.remove(this.mouseMoveTarget,"mousemove touchstart",this.mouseMoveBeforeOpen)},t.prototype.showTooltip=function(e,t,i){var n=this;clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.openDelay&&this.mouseTrail&&(this.mouseMoveBeforeRemove(),this.mouseMoveTarget=e,q.add(this.mouseMoveTarget,"mousemove touchstart",this.mouseMoveBeforeOpen,this)),this.tooltipEventArgs={type:i?i.type:null,cancel:!1,target:e,event:i||null,element:this.tooltipEle,isInteracted:!g(i)};this.trigger("beforeRender",this.tooltipEventArgs,function(o){n.beforeRenderCallback(o,e,i,t)}.bind(this))},t.prototype.beforeRenderCallback=function(e,t,i,n){e.cancel?(this.isHidden=!0,this.clear(),this.mouseMoveBeforeRemove()):(this.isHidden=!1,g(this.tooltipEle)?(this.ctrlId=this.element.getAttribute("id")?y(this.element.getAttribute("id")):y("tooltip"),this.tooltipEle=this.createElement("div",{className:kl+" "+Ql+" "+_l,attrs:{role:"tooltip","aria-hidden":"false",id:this.ctrlId+"_content"},styles:"width:"+N(this.width)+";height:"+N(this.height)+";position:absolute;"}),this.tooltipBeforeRender(t,this),this.tooltipAfterRender(t,i,n,this)):t&&(this.adjustArrow(t,this.position,this.tooltipPositionX,this.tooltipPositionY),this.addDescribedBy(t,this.ctrlId+"_content"),this.renderContent(t),Pe.stop(this.tooltipEle),this.reposition(t),this.tooltipAfterRender(t,i,n,this)))},t.prototype.appendContainer=function(e){"string"==typeof this.container?"body"===this.container?this.containerElement=document.body:(this.isBodyContainer=!1,this.containerElement=ne(this.container,document)):this.container instanceof HTMLElement&&(this.containerElement=this.container,this.isBodyContainer="BODY"===this.containerElement.tagName),this.isBodyContainer||G([this.containerElement],Gl),this.containerElement.appendChild(e.tooltipEle)},t.prototype.tooltipBeforeRender=function(e,t){e&&(Q.isDevice&&G([t.tooltipEle],"e-bigger"),"auto"!==t.width&&(t.tooltipEle.style.maxWidth=N(t.width)),t.tooltipEle.appendChild(t.createElement("div",{className:Pl})),this.appendContainer(t),X([t.tooltipEle],"e-hidden"),t.addDescribedBy(e,t.ctrlId+"_content"),t.renderContent(e),G([t.tooltipEle],ql),t.showTipPointer&&t.renderArrow(),t.renderCloseIcon(),t.renderPopup(e),t.adjustArrow(e,t.position,t.tooltipPositionX,t.tooltipPositionY),Pe.stop(t.tooltipEle),t.reposition(e))},t.prototype.tooltipAfterRender=function(e,t,i,n){if(e){X([n.tooltipEle],ql),G([n.tooltipEle],Wl),n.tooltipEventArgs={type:t?t.type:null,cancel:!1,target:e,event:t||null,element:n.tooltipEle,isInteracted:!g(t)},n.needTemplateReposition()&&!n.mouseTrail&&("None"===i.effect||"FadeIn"===i.effect||this.isReact&&"string"!=typeof n.content)&&(n.tooltipEle.style.display="none");n.trigger("beforeOpen",n.tooltipEventArgs,function(o){n.beforeOpenCallback(o,e,i,t)}.bind(n))}},t.prototype.beforeOpenCallback=function(e,t,i,n){var o=this;if(e.cancel)this.isHidden=!0,this.clear(),this.mouseMoveBeforeRemove(),this.restoreElement(t);else{var r={name:(i.effect,this.animation.open.effect),duration:i.duration,delay:i.delay,timingFunction:"easeOut"};if("None"===i.effect&&(r=void 0),this.openDelay>0){this.showTimer=setTimeout((function(){o.mouseTrail&&q.add(t,"mousemove touchstart mouseenter",o.onMouseMove,o),o.popupObj&&(o.popupObj.show(r,t),o.mouseMoveEvent&&o.mouseTrail&&o.onMouseMove(o.mouseMoveEvent))}),this.openDelay)}else this.popupObj&&this.popupObj.show(r,t)}n&&this.wireMouseEvents(n,t)},t.prototype.needTemplateReposition=function(){return!g(this.viewContainerRef)&&"string"!=typeof this.viewContainerRef||this.isReact},t.prototype.checkCollision=function(e,t,i){var n={left:t,top:i,position:this.position,horizontal:this.tooltipPositionX,vertical:this.tooltipPositionY},o=Ps(this.tooltipEle,this.checkCollideTarget(),t,i);return o.length>0&&(n.horizontal=o.indexOf("left")>=0?"Right":o.indexOf("right")>=0?"Left":this.tooltipPositionX,n.vertical=o.indexOf("top")>=0?"Bottom":o.indexOf("bottom")>=0?"Top":this.tooltipPositionY),n},t.prototype.calculateElementPosition=function(e,t){return[this.isBodyContainer?e.left+t.left:e.left-this.containerElement.getBoundingClientRect().left+t.left+window.pageXOffset+this.containerElement.scrollLeft,this.isBodyContainer?e.top+t.top:e.top-this.containerElement.getBoundingClientRect().top+t.top+window.pageYOffset+this.containerElement.scrollTop]},t.prototype.collisionFlipFit=function(e,t,i){var n=this.checkCollision(e,t,i),o=n.position;if(this.tooltipPositionY!==n.vertical&&(o=0===this.position.indexOf("Bottom")||0===this.position.indexOf("Top")?n.vertical+this.tooltipPositionX:this.tooltipPositionX+n.vertical),this.tooltipPositionX!==n.horizontal&&(0===o.indexOf("Left")&&(n.vertical="LeftTop"===o||"LeftCenter"===o?"Top":"Bottom",o=n.vertical+"Left"),0===o.indexOf("Right")&&(n.vertical="RightTop"===o||"RightCenter"===o?"Top":"Bottom",o=n.vertical+"Right"),n.horizontal=this.tooltipPositionX),this.tooltipEventArgs={type:null,cancel:!1,target:e,event:null,element:this.tooltipEle,collidedPosition:o},this.trigger("beforeCollision",this.tooltipEventArgs),this.tooltipEventArgs.cancel)o=this.position;else{var r=n.vertical,s=n.horizontal;if(n.position!==o){var a=Ds(e,s,r,!this.isBodyContainer,this.isBodyContainer?null:this.containerElement.getBoundingClientRect());this.adjustArrow(e,o,s,r);var l=this.getScalingFactor(e),c=this.calculateTooltipOffset(o,l.x,l.y);c.top-=this.getOffSetPosition("TopBottom",o,this.offsetY),c.left-=this.getOffSetPosition("RightLeft",o,this.offsetX),n.position=o;var h=this.calculateElementPosition(a,c);n.left=h[0],n.top=h[1]}else this.adjustArrow(e,o,s,r)}var d={left:n.left,top:n.top},p=this.isBodyContainer?ks(this.tooltipEle,this.checkCollideTarget(),{X:!0,Y:this.windowCollision},d):d;this.tooltipEle.style.display="block";var u=ne("."+Rl,this.tooltipEle);if(this.showTipPointer&&null!=u&&(0===o.indexOf("Bottom")||0===o.indexOf("Top"))){var m=parseInt(u.style.left,10)-(p.left-n.left);m<0?m=0:m+u.offsetWidth>this.tooltipEle.clientWidth&&(m=this.tooltipEle.clientWidth-u.offsetWidth),u.style.left=m.toString()+"px"}return this.tooltipEle.style.display="",d.left=p.left,d.top=p.top,d},t.prototype.getOffSetPosition=function(e,t,i){return-1!==e.indexOf(this.position.split(/(?=[A-Z])/)[0])&&-1!==e.indexOf(t.split(/(?=[A-Z])/)[0])?2*i:0},t.prototype.checkCollideTarget=function(){return!this.windowCollision&&this.target?this.element:null},t.prototype.hideTooltip=function(e,t,i){var n=this;if(this.closeDelay>0){clearTimeout(this.hideTimer),clearTimeout(this.showTimer);this.hideTimer=setTimeout((function(){n.closeDelay&&n.tooltipEle&&n.isTooltipOpen||n.tooltipHide(e,t,i)}),this.closeDelay)}else this.tooltipHide(e,t,i)},t.prototype.tooltipHide=function(e,t,i){var n,o=this;n=t?this.target?i||t.target:this.element:ne('[data-tooltip-id= "'+this.ctrlId+'_content"]',document),this.tooltipEventArgs={type:t?t.type:null,cancel:!1,target:n,event:t||null,element:this.tooltipEle,isInteracted:!g(t)},this.trigger("beforeClose",this.tooltipEventArgs,(function(i){i.cancel?o.isHidden=!1:(o.mouseMoveBeforeRemove(),o.popupHide(e,n,t))}))},t.prototype.popupHide=function(e,t,i){t&&i&&this.restoreElement(t),this.isHidden=!0;var n={name:(e.effect,this.animation.close.effect),duration:e.duration,delay:e.delay,timingFunction:"easeIn"};"None"===e.effect&&(n=void 0),this.popupObj&&this.popupObj.hide(n)},t.prototype.restoreElement=function(e){this.unwireMouseEvents(e),g(e.getAttribute("data-content"))||(e.setAttribute("title",e.getAttribute("data-content")),e.removeAttribute("data-content")),this.removeDescribedBy(e)},t.prototype.clear=function(){var e=this.findTarget();e&&this.restoreElement(e),this.tooltipEle&&(X([this.tooltipEle],Wl),G([this.tooltipEle],ql)),this.isHidden&&(this.popupObj&&this.popupObj.destroy(),this.tooltipEle&&te(this.tooltipEle),this.tooltipEle=null,this.popupObj=null)},t.prototype.tooltipHover=function(){this.tooltipEle&&(this.isTooltipOpen=!0)},t.prototype.tooltipMouseOut=function(e){this.isTooltipOpen=!1,this.hideTooltip(this.animation.close,e,this.findTarget())},t.prototype.onMouseOut=function(e){var t=e.relatedTarget;if(t&&!this.mouseTrail){var i=se(t,"."+kl+"."+_l+"."+Ql);i?q.add(i,"mouseleave",this.tooltipElementMouseOut,this):(this.hideTooltip(this.animation.close,e,this.findTarget()),0===this.closeDelay&&("None"===this.animation.close.effect||this.isReact&&"string"!=typeof this.content)&&this.clear())}else this.hideTooltip(this.animation.close,e,this.findTarget()),this.clear();this.popupObj&&!this.popupObj.element.classList.contains(ql)&&this.clear()},t.prototype.tooltipElementMouseOut=function(e){this.hideTooltip(this.animation.close,e,this.findTarget()),q.remove(this.element,"mouseleave",this.tooltipElementMouseOut),this.clear()},t.prototype.onStickyClose=function(){this.close()},t.prototype.onMouseMove=function(e){var t=0,i=0;if(e.type.indexOf("touch")>-1?(e.preventDefault(),t=e.touches[0].pageX,i=e.touches[0].pageY):(t=e.pageX,i=e.pageY),!g(this.tooltipEle)){Pe.stop(this.tooltipEle),X([this.tooltipEle],Wl),G([this.tooltipEle],ql),this.adjustArrow(e.target,this.position,this.tooltipPositionX,this.tooltipPositionY);var n=this.getScalingFactor(e.target),o=this.calculateTooltipOffset(this.position,n.x,n.y),r=t+o.left+this.offsetX,s=i+o.top+this.offsetY,a=this.checkCollision(e.target,r,s);if(this.tooltipPositionX!==a.horizontal||this.tooltipPositionY!==a.vertical){var l=0===this.position.indexOf("Bottom")||0===this.position.indexOf("Top")?a.vertical+a.horizontal:a.horizontal+a.vertical;a.position=l,this.adjustArrow(e.target,a.position,a.horizontal,a.vertical);var c=this.calculateTooltipOffset(a.position,n.x,n.y);a.left=t+c.left-this.offsetX,a.top=i+c.top-this.offsetY}this.tooltipEle.style.left=a.left+"px",this.tooltipEle.style.top=a.top+"px"}},t.prototype.keyDown=function(e){this.tooltipEle&&27===e.keyCode&&this.close()},t.prototype.touchEnd=function(e){this.tooltipEle&&null===se(e.target,"."+jl)&&!this.isSticky&&this.close()},t.prototype.scrollHandler=function(e){this.tooltipEle&&!this.isSticky&&(se(e.target,"."+kl+"."+_l+"."+Ql)||this.isSticky||this.close())},t.prototype.render=function(){this.initialize(),this.wireEvents(this.opensOn),this.renderComplete()},t.prototype.preRender=function(){this.tipClass=Ul,this.tooltipPositionX="Center",this.tooltipPositionY="Top",this.isHidden=!0},t.prototype.wireEvents=function(e){for(var t=0,i=this.getTriggerList(e);t<i.length;t++){var n=i[t];if("Custom"===n)return;"Focus"===n&&this.wireFocusEvents(),"Click"===n&&q.add(this.element,Q.touchStartEvent,this.targetClick,this),"Hover"===n&&(Q.isDevice?(this.touchModule=new qt(this.element,{tapHoldThreshold:500,tapHold:this.tapHoldHandler.bind(this)}),q.add(this.element,Q.touchEndEvent,this.touchEndHandler,this)):q.add(this.element,"mouseover",this.targetHover,this))}this.windowResizeBound=this.windowResize.bind(this),this.keyDownBound=this.keyDown.bind(this),this.touchEndBound=this.touchEnd.bind(this),this.scrollWheelBound=this.scrollHandler.bind(this),document.addEventListener("wheel",this.scrollWheelBound),document.addEventListener("scroll",this.scrollWheelBound),document.addEventListener("touchend",this.touchEndBound),document.addEventListener("keydown",this.keyDownBound),window.addEventListener("resize",this.windowResizeBound)},t.prototype.getTriggerList=function(e){return e?("Auto"===e&&(e=Q.isDevice?"Hover":"Hover Focus"),e.split(" ")):[]},t.prototype.wireFocusEvents=function(){if(g(this.target))q.add(this.element,"focusin",this.targetHover,this);else{var e=[].slice.call(oe(this.target,this.element));if(this.targetsList=e,!g(this.targetsList)&&this.targetsList.length>0)for(var t=0,i=e;t<i.length;t++){var n=i[t];q.add(n,"focus",this.targetHover,this)}else q.add(this.element,"focusin",this.targetHover,this)}},t.prototype.wireMouseEvents=function(e,t){this.tooltipEle&&(this.isSticky||("focus"===e.type&&q.add(t,"blur",this.onMouseOut,this),"focusin"===e.type&&q.add(t,"focusout",this.onMouseOut,this),"mouseover"===e.type&&q.add(t,"mouseleave",this.onMouseOut,this),this.closeDelay&&(q.add(this.tooltipEle,"mouseenter",this.tooltipHover,this),q.add(this.tooltipEle,"mouseleave",this.tooltipMouseOut,this))),this.mouseTrail&&0===this.openDelay&&q.add(t,"mousemove touchstart mouseenter",this.onMouseMove,this))},t.prototype.unwireEvents=function(e){for(var t=0,i=this.getTriggerList(e);t<i.length;t++){var n=i[t];if("Custom"===n)return;"Focus"===n&&this.unwireFocusEvents(),"Click"===n&&q.remove(this.element,Q.touchStartEvent,this.targetClick),"Hover"===n&&(Q.isDevice?(this.touchModule&&this.touchModule.destroy(),q.remove(this.element,Q.touchEndEvent,this.touchEndHandler)):q.remove(this.element,"mouseover",this.targetHover))}document.removeEventListener("touchend",this.touchEndBound),this.touchEndBound=null,document.removeEventListener("wheel",this.scrollWheelBound),document.removeEventListener("scroll",this.scrollWheelBound),this.scrollWheelBound=null,window.removeEventListener("resize",this.windowResizeBound),this.windowResizeBound=null,document.removeEventListener("keydown",this.keyDownBound),this.keyDownBound=null},t.prototype.unwireFocusEvents=function(){if(g(this.target))q.remove(this.element,"focusin",this.targetHover);else{var e=[].slice.call(oe(this.target,this.element));if(!g(this.targetsList)&&this.targetsList.length>0)for(var t=0,i=e;t<i.length;t++){var n=i[t];q.remove(n,"focus",this.targetHover)}else q.remove(this.element,"focusin",this.targetHover)}},t.prototype.unwireMouseEvents=function(e){if(!this.isSticky){for(var t=0,i=this.getTriggerList(this.opensOn);t<i.length;t++){var n=i[t];"Focus"===n&&(q.remove(e,"blur",this.onMouseOut),q.remove(e,"focusout",this.onMouseOut)),"Hover"!==n||Q.isDevice||q.remove(e,"mouseleave",this.onMouseOut)}this.closeDelay&&(q.remove(e,"mouseenter",this.tooltipHover),q.remove(e,"mouseleave",this.tooltipMouseOut))}this.mouseTrail&&q.remove(e,"mousemove touchstart mouseenter",this.onMouseMove)},t.prototype.findTarget=function(){return ne('[data-tooltip-id= "'+this.ctrlId+'_content"]',document)},t.prototype.getModuleName=function(){return"tooltip"},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.onPropertyChanged=function(e,t){for(var i=this.findTarget(),n=0,o=Object.keys(e);n<o.length;n++){switch(o[n]){case"width":this.tooltipEle&&i&&(this.tooltipEle.style.width=this.tooltipEle.style.maxWidth=N(e.width),this.reposition(i));break;case"height":this.tooltipEle&&i&&(this.tooltipEle.style.height=N(e.height),this.reposition(i));break;case"content":this.tooltipEle&&this.renderContent();break;case"opensOn":this.unwireEvents(t.opensOn),this.wireEvents(e.opensOn);break;case"position":if(this.formatPosition(),this.tooltipEle&&i){var r=ne("."+Hl,this.tooltipEle);r&&(r.style.top=r.style.left=null),this.reposition(i)}break;case"tipPointerPosition":this.tooltipEle&&i&&this.reposition(i);break;case"offsetX":if(this.tooltipEle){var s=e.offsetX-t.offsetX;this.tooltipEle.style.left=(parseInt(this.tooltipEle.style.left,10)+s).toString()+"px"}break;case"offsetY":if(this.tooltipEle){var a=e.offsetY-t.offsetY;this.tooltipEle.style.top=(parseInt(this.tooltipEle.style.top,10)+a).toString()+"px"}break;case"cssClass":this.tooltipEle&&(t.cssClass&&X([this.tooltipEle],t.cssClass.split(" ")),e.cssClass&&G([this.tooltipEle],e.cssClass.split(" ")));break;case"enableRtl":this.tooltipEle&&(this.enableRtl?G([this.tooltipEle],Ol):X([this.tooltipEle],Ol));break;case"isSticky":this.tooltipEle&&i&&(this.renderCloseIcon(),this.reposition(i));break;case"container":g(this.containerElement)||X([this.containerElement],Gl),this.container=e.container,this.tooltipEle&&i&&(this.appendContainer(this),this.reposition(i))}}},t.prototype.open=function(e,t){g(t)&&(t=this.animation.open),g(e)&&(e=this.element),"none"!==e.style.display&&this.showTooltip(e,t)},t.prototype.close=function(e){e||(e=this.animation.close),this.hideTooltip(e)},t.prototype.refresh=function(e){(this.tooltipEle&&this.renderContent(e),this.popupObj&&e&&this.reposition(e),g(this.targetsList)||g(this.target))||oe(this.target,this.element).length!==this.targetsList.length&&(this.unwireEvents(this.opensOn),this.wireEvents(this.opensOn))},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltipEle&&te(this.tooltipEle),this.popupObj&&this.popupObj.destroy(),na(),X([this.element],jl),this.unwireEvents(this.opensOn),this.unwireMouseEvents(this.element),this.tooltipEle=null,this.popupObj=null;for(var t=0,i=oe('[data-tooltip-id= "'+this.ctrlId+'_content"]',this.element);t<i.length;t++){var n=i[t];this.restoreElement(n)}this.containerElement=null,this.tipClass=null,this.tooltipPositionX=null,this.tooltipPositionY=null,this.ctrlId=null,this.tooltipEventArgs=null,this.touchModule=null,this.mouseMoveEvent=null,this.mouseMoveTarget=null,this.containerElement=null,this.targetsList=null},xl([De("auto")],t.prototype,"width",void 0),xl([De("auto")],t.prototype,"height",void 0),xl([De()],t.prototype,"content",void 0),xl([De("body")],t.prototype,"container",void 0),xl([De()],t.prototype,"target",void 0),xl([De("TopCenter")],t.prototype,"position",void 0),xl([De(0)],t.prototype,"offsetX",void 0),xl([De(0)],t.prototype,"offsetY",void 0),xl([De(!0)],t.prototype,"showTipPointer",void 0),xl([De(!0)],t.prototype,"enableHtmlParse",void 0),xl([De(!1)],t.prototype,"windowCollision",void 0),xl([De("Auto")],t.prototype,"tipPointerPosition",void 0),xl([De("Auto")],t.prototype,"opensOn",void 0),xl([De(!1)],t.prototype,"mouseTrail",void 0),xl([De(!1)],t.prototype,"isSticky",void 0),xl([Te({},Xl)],t.prototype,"animation",void 0),xl([De(0)],t.prototype,"openDelay",void 0),xl([De(0)],t.prototype,"closeDelay",void 0),xl([De()],t.prototype,"cssClass",void 0),xl([De(!0)],t.prototype,"enableHtmlSanitizer",void 0),xl([De("")],t.prototype,"htmlAttributes",void 0),xl([Se()],t.prototype,"beforeRender",void 0),xl([Se()],t.prototype,"beforeOpen",void 0),xl([Se()],t.prototype,"afterOpen",void 0),xl([Se()],t.prototype,"beforeClose",void 0),xl([Se()],t.prototype,"afterClose",void 0),xl([Se()],t.prototype,"beforeCollision",void 0),xl([Se()],t.prototype,"created",void 0),xl([Se()],t.prototype,"destroyed",void 0),t=xl([Ie],t)}(St),Zl=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Jl=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},$l="e-vertical",ec="e-toolbar-items",tc="e-toolbar-item",ic="e-rtl",nc="e-separator",oc="e-popup-up-icon",rc="e-popup-down-icon",sc="e-popup-open",ac="e-template",lc="e-overlay",cc="e-toolbar-text",hc="e-popup-text",dc="e-overflow-show",pc="e-overflow-hide",uc="e-hor-nav",mc="e-scroll-nav",gc="e-toolbar-center",fc="e-tbar-pos",yc="e-hscroll-bar",vc="e-toolbar-pop",bc="e-toolbar-popup",Mc="e-nav-active",Nc="e-ignore",Cc="e-popup-alone",Ec="e-hidden",Dc="e-toolbar-multirow",Tc="e-multirow-pos",Lc="e-multirow-separator",Sc="e-extended-separator",Ic="e-extended-toolbar",wc="e-toolbar-extended",xc="e-tbar-extended",jc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Zl(t,e),Jl([De("")],t.prototype,"id",void 0),Jl([De("")],t.prototype,"text",void 0),Jl([De("auto")],t.prototype,"width",void 0),Jl([De("")],t.prototype,"cssClass",void 0),Jl([De(!1)],t.prototype,"showAlwaysInPopup",void 0),Jl([De(!1)],t.prototype,"disabled",void 0),Jl([De("")],t.prototype,"prefixIcon",void 0),Jl([De("")],t.prototype,"suffixIcon",void 0),Jl([De(!0)],t.prototype,"visible",void 0),Jl([De("None")],t.prototype,"overflow",void 0),Jl([De("")],t.prototype,"template",void 0),Jl([De("Button")],t.prototype,"type",void 0),Jl([De("Both")],t.prototype,"showTextOn",void 0),Jl([De(null)],t.prototype,"htmlAttributes",void 0),Jl([De("")],t.prototype,"tooltipText",void 0),Jl([De("Left")],t.prototype,"align",void 0),Jl([Se()],t.prototype,"click",void 0),Jl([De(-1)],t.prototype,"tabIndex",void 0),t}(Qe),Oc=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.resizeContext=n.resize.bind(n),n.orientationChangeContext=n.orientationChange.bind(n),n.keyConfigs={moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow",popupOpen:"enter",popupClose:"escape",tab:"tab",home:"home",end:"end"},n}return Zl(t,e),t.prototype.destroy=function(){var t=this;(this.isReact||this.isAngular)&&this.clearTemplate();var i=this.element.querySelectorAll(".e-control.e-btn");for([].slice.call(i).forEach((function(e){g(e)||g(e.ej2_instances)||g(e.ej2_instances[0])||e.ej2_instances[0].isDestroyed||e.ej2_instances[0].destroy()})),this.unwireEvents(),this.tempId.forEach((function(e){g(t.element.querySelector(e))||(document.body.appendChild(t.element.querySelector(e)).style.display="none")})),this.destroyItems();this.element.lastElementChild;)this.element.removeChild(this.element.lastElementChild);this.trgtEle&&(this.element.appendChild(this.ctrlTem),this.trgtEle=null,this.ctrlTem=null),this.popObj&&(this.popObj.destroy(),ee(this.popObj.element)),this.activeEle&&(this.activeEle=null),this.popObj=null,this.tbarAlign=null,this.tbarItemsCol=[],this.remove(this.element,"e-toolpop"),this.cssClass&&X([this.element],this.cssClass.split(" ")),this.element.removeAttribute("style"),["aria-disabled","aria-orientation","role"].forEach((function(e){return t.element.removeAttribute(e)})),e.prototype.destroy.call(this)},t.prototype.preRender=function(){var e={enableCollision:this.enableCollision,scrollStep:this.scrollStep};this.trigger("beforeCreate",e),this.enableCollision=e.enableCollision,this.scrollStep=e.scrollStep,this.scrollModule=null,this.popObj=null,this.tempId=[],this.tbarItemsCol=this.items,this.isVertical=!!this.element.classList.contains($l),this.isExtendedOpen=!1,this.popupPriCount=0,this.enableRtl&&this.add(this.element,ic)},t.prototype.wireEvents=function(){q.add(this.element,"click",this.clickHandler,this),window.addEventListener("resize",this.resizeContext),window.addEventListener("orientationchange",this.orientationChangeContext),this.allowKeyboard&&this.wireKeyboardEvent()},t.prototype.wireKeyboardEvent=function(){this.keyModule=new Ht(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs}),q.add(this.element,"keydown",this.docKeyDown,this),this.updateTabIndex("0")},t.prototype.updateTabIndex=function(e){var t=this.element.querySelector("."+tc+":not(."+lc+" ):not(."+nc+" ):not(."+Ec+" )");if(!g(t)&&!g(t.firstElementChild)){var i=t.firstElementChild.getAttribute("data-tabindex");i&&"-1"===i&&"INPUT"!==t.firstElementChild.tagName&&t.firstElementChild.setAttribute("tabindex",e)}},t.prototype.unwireKeyboardEvent=function(){this.keyModule&&(q.remove(this.element,"keydown",this.docKeyDown),this.keyModule.destroy(),this.keyModule=null)},t.prototype.docKeyDown=function(e){if("INPUT"!==e.target.tagName){var t=!g(this.popObj)&&Z(this.popObj.element)&&"Extended"!==this.overflowMode;9===e.keyCode&&!0===e.target.classList.contains("e-hor-nav")&&t&&this.popObj.hide({name:"FadeOut",duration:100}),(40===e.keyCode||38===e.keyCode||35===e.keyCode||36===e.keyCode)&&e.preventDefault()}},t.prototype.unwireEvents=function(){q.remove(this.element,"click",this.clickHandler),this.destroyScroll(),this.unwireKeyboardEvent(),window.removeEventListener("resize",this.resizeContext),window.removeEventListener("orientationchange",this.orientationChangeContext),document.removeEventListener("scroll",this.clickEvent),document.removeEventListener("click",this.scrollEvent),this.scrollEvent=null,this.clickEvent=null},t.prototype.clearProperty=function(){this.tbarEle=[],this.tbarAlgEle={lefts:[],centers:[],rights:[]}},t.prototype.docEvent=function(e){var t=se(e.target,".e-popup");this.popObj&&Z(this.popObj.element)&&!t&&"Popup"===this.overflowMode&&this.popObj.hide({name:"FadeOut",duration:100})},t.prototype.destroyScroll=function(){this.scrollModule&&(this.tbarAlign&&this.add(this.scrollModule.element,fc),this.scrollModule.destroy(),this.scrollModule=null)},t.prototype.destroyItems=function(){if(this.element&&[].slice.call(this.element.querySelectorAll("."+tc)).forEach((function(e){ee(e)})),this.tbarAlign){var e=this.element.querySelector("."+ec);[].slice.call(e.children).forEach((function(e){ee(e)})),this.tbarAlign=!1,this.remove(e,fc)}this.clearProperty()},t.prototype.destroyMode=function(){this.scrollModule&&(this.remove(this.scrollModule.element,ic),this.destroyScroll()),this.remove(this.element,xc),this.remove(this.element,Ic);var e=this.element.querySelector(".e-toolbar-multirow");e&&this.remove(e,Dc),this.popObj&&this.popupRefresh(this.popObj.element,!0)},t.prototype.add=function(e,t){e.classList.add(t)},t.prototype.remove=function(e,t){e.classList.remove(t)},t.prototype.elementFocus=function(e){var t=e.firstElementChild;t?(t.focus(),this.activeEleSwitch(e)):e.focus()},t.prototype.clstElement=function(e,t){return e&&this.popObj&&Z(this.popObj.element)?this.popObj.element.querySelector("."+tc):this.element===t||e?this.element.querySelector("."+tc+":not(."+lc+" ):not(."+nc+" ):not(."+Ec+" )"):se(t,"."+tc)},t.prototype.keyHandling=function(e,t,i,n,o){var r,s,a=this.popObj,l=this.element,c={name:"FadeOut",duration:100},h="moveUp"===t.action?"previous":"next";switch(t.action){case"moveRight":if(this.isVertical)return;l===i?this.elementFocus(e):n||this.eleFocus(e,"next");break;case"moveLeft":if(this.isVertical)return;n||this.eleFocus(e,"previous");break;case"home":case"end":if(e){var d=se(e,".e-popup"),p=this.element.querySelector("."+wc);"Extended"===this.overflowMode&&p&&p.classList.contains("e-popup-open")&&(d="end"===t.action?p:null),d?Z(this.popObj.element)&&(s=[].slice.call(d.children),r="home"===t.action?this.focusFirstVisibleEle(s):this.focusLastVisibleEle(s)):(s=this.element.querySelectorAll("."+ec+" ."+tc+":not(."+nc+")"),r="home"===t.action?this.focusFirstVisibleEle(s):this.focusLastVisibleEle(s)),r&&this.elementFocus(r)}break;case"moveUp":case"moveDown":if(this.isVertical)"moveUp"===t.action?this.eleFocus(e,"previous"):this.eleFocus(e,"next");else if(a&&se(i,".e-popup")){var u=a.element,m=u.firstElementChild;"previous"===h&&m===e?u.lastElementChild.firstChild.focus():"next"===h&&u.lastElementChild===e?m.firstChild.focus():this.eleFocus(e,h)}else"moveDown"===t.action&&a&&Z(a.element)&&this.elementFocus(e);break;case"tab":if(!o&&!n){var g=e.firstElementChild;l===i&&(this.activeEle?this.activeEle.focus():(this.activeEleRemove(g),g.focus()))}break;case"popupClose":a&&"Extended"!==this.overflowMode&&a.hide(c);break;case"popupOpen":if(!n)return;a&&!Z(a.element)?(a.element.style.top=l.offsetHeight+"px",a.show({name:"FadeIn",duration:100})):a.hide(c)}},t.prototype.keyActionHandler=function(e){var t=e.target;if("INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!this.element.classList.contains(lc)){e.preventDefault();var i=t.classList.contains(uc),n=t.classList.contains(mc),o=this.clstElement(i,t);(o||n)&&this.keyHandling(o,e,t,i,n)}},t.prototype.disable=function(e){var t=this.element;e?t.classList.add(lc):t.classList.remove(lc),this.activeEle&&this.activeEle.setAttribute("tabindex",this.activeEle.getAttribute("data-tabindex")),this.scrollModule&&this.scrollModule.disable(e),this.popObj&&(Z(this.popObj.element)&&"Extended"!==this.overflowMode&&this.popObj.hide(),t.querySelector("#"+t.id+"_nav").setAttribute("tabindex",e?"-1":"0"))},t.prototype.eleContains=function(e){return e.classList.contains(nc)||e.classList.contains(lc)||e.getAttribute("disabled")||e.classList.contains(Ec)||!Z(e)||!e.classList.contains(tc)},t.prototype.focusFirstVisibleEle=function(e){for(var t=0;t<e.length;){var i=e[parseInt(t.toString(),10)];if(!i.classList.contains(Ec)&&!i.classList.contains(lc))return i;t++}},t.prototype.focusLastVisibleEle=function(e){for(var t=e.length-1;t>=0;){var i=e[parseInt(t.toString(),10)];if(!i.classList.contains(Ec)&&!i.classList.contains(lc))return i;t--}},t.prototype.eleFocus=function(e,t){var i=Object(e)[t+"ElementSibling"];if(i){if(this.eleContains(i))return void this.eleFocus(i,t);this.elementFocus(i)}else if(this.tbarAlign){var n=Object(e.parentElement)[t+"ElementSibling"];if(g(n)||0!==n.children.length||(n=Object(n)[t+"ElementSibling"]),!g(n)&&n.children.length>0)if("next"===t){var o=n.querySelector("."+tc);this.eleContains(o)?this.eleFocus(o,t):(o.firstElementChild.focus(),this.activeEleSwitch(o))}else{o=n.lastElementChild;this.eleContains(o)?this.eleFocus(o,t):this.elementFocus(o)}}else if(!g(e)){var r=this.element.querySelectorAll("."+ec+" ."+tc+":not(."+nc+"):not(."+lc+"):not(."+Ec+")");"next"===t&&r?this.elementFocus(r[0]):"previous"===t&&r&&this.elementFocus(r[r.length-1])}},t.prototype.clickHandler=function(e){var t,i=this,n=e.target,o=this.element,r=!g(se(n,"."+vc)),s=n.classList,a=se(n,"."+uc);a||(a=n),o.children[0].classList.contains("e-hscroll")||o.children[0].classList.contains("e-vscroll")||!s.contains(uc)||(s=n.querySelector(".e-icons").classList),(s.contains(oc)||s.contains(rc))&&this.popupClickHandler(o,a,ic);var l=se(e.target,"."+tc);if(!g(l)&&!l.classList.contains(lc)||a.classList.contains(uc)){if(l)t=this.items[this.tbarEle.indexOf(l)];var c={originalEvent:e,item:t};(t&&!g(t.click)&&"object"==typeof t.click?!g(t.click.observers)&&t.click.observers.length>0:!g(t)&&!g(t.click))&&this.trigger("items["+this.tbarEle.indexOf(l)+"].click",c),c.cancel||this.trigger("clicked",c,(function(e){!g(i.popObj)&&r&&!e.cancel&&"Popup"===i.overflowMode&&e.item&&"Input"!==e.item.type&&i.popObj.hide({name:"FadeOut",duration:100})}))}},t.prototype.popupClickHandler=function(e,t,i){var n=this.popObj;Z(n.element)?(t.classList.remove(Mc),n.hide({name:"FadeOut",duration:100})):(e.classList.contains(i)&&(n.enableRtl=!0,n.position={X:"left",Y:"top"}),0!==n.offsetX||e.classList.contains(i)||(n.enableRtl=!1,n.position={X:"right",Y:"top"}),"Extended"===this.overflowMode&&(n.element.style.minHeight="0px",n.width=this.getToolbarPopupWidth(this.element)),n.dataBind(),n.refreshPosition(),n.element.style.top=this.getElementOffsetY()+"px",t.classList.add(Mc),n.show({name:"FadeIn",duration:100}))},t.prototype.getToolbarPopupWidth=function(e){var t=window.getComputedStyle(e);return parseFloat(t.width)+2*parseFloat(t.borderRightWidth)},t.prototype.render=function(){var e=this;this.initialize(),this.renderControl(),this.wireEvents(),this.clickEvent=this.docEvent.bind(this),this.scrollEvent=this.docEvent.bind(this),this.renderComplete(),this.isReact&&this.portals&&this.portals.length>0&&this.renderReactTemplates((function(){e.refreshOverflow()}))},t.prototype.initialize=function(){var e=N(this.width),t=N(this.height);"msie"===Q.info.name&&"auto"===this.height&&"MultiRow"!==this.overflowMode||ae(this.element,{height:t}),ae(this.element,{width:e});var i={role:"toolbar","aria-disabled":"false","aria-orientation":this.isVertical?"vertical":"horizontal"};ie(this.element,i),this.cssClass&&G([this.element],this.cssClass.split(" "))},t.prototype.renderControl=function(){var e=this.element;this.trgtEle=e.children.length>0?e.querySelector("div"):null,this.tbarAlgEle={lefts:[],centers:[],rights:[]},this.renderItems(),this.renderLayout()},t.prototype.renderLayout=function(){this.renderOverflowMode(),this.tbarAlign&&this.itemPositioning(),this.popObj&&this.popObj.element.childElementCount>1&&this.checkPopupRefresh(this.element,this.popObj.element)&&this.popupRefresh(this.popObj.element,!1),this.separator()},t.prototype.itemsAlign=function(e,t){var i,n;this.tbarEle||(this.tbarEle=[]);for(var o=0;o<e.length;o++)i=this.renderSubComponent(e[parseInt(o.toString(),10)],o),-1===this.tbarEle.indexOf(i)&&this.tbarEle.push(i),this.tbarAlign||this.tbarItemAlign(e[parseInt(o.toString(),10)],t,o),(n=t.querySelector(".e-toolbar-"+e[parseInt(o.toString(),10)].align.toLowerCase()))?(e[parseInt(o.toString(),10)].showAlwaysInPopup&&"Show"!==e[parseInt(o.toString(),10)].overflow||this.tbarAlgEle[(e[parseInt(o.toString(),10)].align+"s").toLowerCase()].push(i),n.appendChild(i)):t.appendChild(i);if(this.isReact){this.notify("render-react-toolbar-template",this.portals),this.renderReactTemplates()}},t.prototype.changeOrientation=function(){var e=this.element;this.isVertical?(e.classList.remove($l),this.isVertical=!1,"auto"!==this.height&&"100%"!==this.height||(e.style.height=this.height),e.setAttribute("aria-orientation","horizontal")):(e.classList.add($l),this.isVertical=!0,e.setAttribute("aria-orientation","vertical"),ae(this.element,{height:N(this.height),width:N(this.width)})),this.destroyMode(),this.refreshOverflow()},t.prototype.initScroll=function(e,t){if(!this.scrollModule&&this.checkOverflow(e,t[0])){this.tbarAlign&&this.element.querySelector("."+ec+" ."+gc).removeAttribute("style"),this.isVertical?this.scrollModule=new as({scrollStep:this.scrollStep,enableRtl:this.enableRtl},t[0]):this.scrollModule=new Wr({scrollStep:this.scrollStep,enableRtl:this.enableRtl},t[0]),this.cssClass&&G([t[0]],this.cssClass.split(" "));var i=this.scrollModule.element.querySelector("."+yc+", .e-vscroll-bar");i&&i.removeAttribute("tabindex"),this.remove(this.scrollModule.element,fc),ae(this.element,{overflow:"hidden"})}},t.prototype.itemWidthCal=function(e){var t,i=this,n=0;return[].slice.call(oe("."+tc,e)).forEach((function(e){Z(e)&&(t=window.getComputedStyle(e),n+=i.isVertical?e.offsetHeight:e.offsetWidth,n+=parseFloat(i.isVertical?t.marginTop:t.marginRight),n+=parseFloat(i.isVertical?t.marginBottom:t.marginLeft))})),n},t.prototype.getScrollCntEle=function(e){var t=this.isVertical?".e-vscroll-content":".e-hscroll-content";return e.querySelector(t)},t.prototype.checkOverflow=function(e,t){if(g(e)||g(t)||!Z(e))return!1;var i=this.isVertical?e.offsetHeight:e.offsetWidth,n=this.isVertical?t.offsetHeight:t.offsetWidth;(this.tbarAlign||this.scrollModule||i===n)&&(n=this.itemWidthCal(this.scrollModule?this.getScrollCntEle(t):t));var o=e.querySelector("."+uc),r=e.querySelector("."+mc),s=0;return o?s=this.isVertical?o.offsetHeight:o.offsetWidth:r&&(s=this.isVertical?2*r.offsetHeight:2*r.offsetWidth),!(i>=n&&r)&&n>i-s},t.prototype.refreshOverflow=function(){this.resize()},t.prototype.toolbarAlign=function(e){this.tbarAlign&&(this.add(e,fc),this.itemPositioning())},t.prototype.renderOverflowMode=function(){var e=this.element,t=e.querySelector("."+ec),i=this.popupPriCount>0;if(e&&e.children.length>0)switch(this.offsetWid=e.offsetWidth,this.remove(this.element,"e-toolpop"),"msie"===Q.info.name&&"auto"===this.height&&(e.style.height=""),this.overflowMode){case"Scrollable":g(this.scrollModule)&&this.initScroll(e,[].slice.call(e.getElementsByClassName(ec)));break;case"Popup":this.add(this.element,"e-toolpop"),this.tbarAlign&&this.removePositioning(),(this.checkOverflow(e,t)||i)&&this.setOverflowAttributes(e),this.toolbarAlign(t);break;case"MultiRow":this.add(t,Dc),this.checkOverflow(e,t)&&this.tbarAlign&&(this.removePositioning(),this.add(t,Tc)),"hidden"===e.style.overflow&&(e.style.overflow=""),"msie"!==Q.info.name&&"auto"===e.style.height||(e.style.height="auto");break;case"Extended":this.add(this.element,Ic),(this.checkOverflow(e,t)||i)&&(this.tbarAlign&&this.removePositioning(),this.setOverflowAttributes(e)),this.toolbarAlign(t)}},t.prototype.setOverflowAttributes=function(e){this.createPopupEle(e,[].slice.call(oe("."+ec+" ."+tc,e)));ie(this.element.querySelector("."+uc),{tabindex:"0",role:"button","aria-haspopup":"true","aria-label":"overflow"})},t.prototype.separator=function(){var e=this.element,t=[].slice.call(e.querySelectorAll("."+nc)),i=e.querySelector("."+Lc),n=e.querySelector("."+Sc),o="MultiRow"===this.overflowMode?i:n;null!==o&&("MultiRow"===this.overflowMode?o.classList.remove(Lc):"Extended"===this.overflowMode&&o.classList.remove(Sc));for(var r=0;r<=t.length-1;r++)t[parseInt(r.toString(),10)].offsetLeft<30&&0!==t[parseInt(r.toString(),10)].offsetLeft&&("MultiRow"===this.overflowMode?t[parseInt(r.toString(),10)].classList.add(Lc):"Extended"===this.overflowMode&&t[parseInt(r.toString(),10)].classList.add(Sc))},t.prototype.createPopupEle=function(e,t){var i=e.querySelector("."+uc),n=this.isVertical;i||this.createPopupIcon(e),i=e.querySelector("."+uc);var o=n?i.offsetHeight:i.offsetWidth,r=(n?e.offsetHeight:e.offsetWidth)-o;this.element.classList.remove("e-rtl"),ae(this.element,{direction:"initial"}),this.checkPriority(e,t,r,!0),this.enableRtl&&this.element.classList.add("e-rtl"),this.element.style.removeProperty("direction"),this.createPopup()},t.prototype.pushingPoppedEle=function(e,t,i,n,o){var r=e.element,s=[].slice.call(oe("."+bc,r.querySelector("."+ec))),a=oe("."+dc,i),l=0,c=0;s.forEach((function(r,s){a=oe("."+dc,i),r.classList.contains(dc)&&a.length>0?e.tbResize&&a.length>s?(i.insertBefore(r,a[parseInt(s.toString(),10)]),++c):(i.insertBefore(r,i.children[a.length]),++c):r.classList.contains(dc)||e.tbResize&&r.classList.contains(pc)&&i.children.length>0&&0===a.length?(i.insertBefore(r,i.firstChild),++c):r.classList.contains(pc)?t.push(r):e.tbResize?(i.insertBefore(r,i.childNodes[l+c]),++l):i.appendChild(r),r.classList.contains(nc)?ae(r,{display:"",height:o+"px"}):ae(r,{display:"",height:n+"px"})})),t.forEach((function(e){i.appendChild(e)}));for(var h=oe("."+tc,r.querySelector("."+ec)),d=h.length-1;d>=0;d--){var p=h[parseInt(d.toString(),10)];if(!p.classList.contains(nc)||"Extended"===this.overflowMode)break;ae(p,{display:"none"})}},t.prototype.createPopup=function(){var e,t,i=this.element;"Extended"===this.overflowMode&&(t=i.querySelector("."+nc),e="auto"===i.style.height||""===i.style.height?null:t&&t.offsetHeight);var n,o=i.querySelector("."+tc+":not(."+nc+"):not(."+bc+")"),r="auto"===i.style.height||""===i.style.height?null:o&&o.offsetHeight;if(ne("#"+i.id+"_popup."+vc,i))n=ne("#"+i.id+"_popup."+vc,i);else{var s=this.createElement("div",{id:i.id+"_popup",className:vc+" "+wc}),a=this.createElement("div",{id:i.id+"_popup",className:vc});n="Extended"===this.overflowMode?s:a}this.pushingPoppedEle(this,[],n,r,e),this.popupInit(i,n)},t.prototype.getElementOffsetY=function(){return"Extended"===this.overflowMode&&"border-box"===window.getComputedStyle(this.element).getPropertyValue("box-sizing")?this.element.clientHeight:this.element.offsetHeight},t.prototype.popupInit=function(e,t){if(this.popObj){if("Extended"!==this.overflowMode){var i=this.popObj.element;ae(i,{maxHeight:"",display:"block"}),ae(i,{maxHeight:i.offsetHeight+"px",display:""})}}else{e.appendChild(t),this.cssClass&&G([t],this.cssClass.split(" ")),ae(this.element,{overflow:""});var n=new da(null,{relateTo:this.element,offsetY:this.isVertical?0:this.getElementOffsetY(),enableRtl:this.enableRtl,open:this.popupOpen.bind(this),close:this.popupClose.bind(this),collision:{Y:this.enableCollision?"flip":"none"},position:this.enableRtl?{X:"left",Y:"top"}:{X:"right",Y:"top"}});if("Extended"===this.overflowMode&&(n.width=this.getToolbarPopupWidth(this.element),n.offsetX=0),n.appendTo(t),document.addEventListener("scroll",this.clickEvent),document.addEventListener("click",this.scrollEvent),"Extended"!==this.overflowMode&&(n.element.style.maxHeight=n.element.offsetHeight+"px"),this.isVertical&&(n.element.style.visibility="hidden"),this.isExtendedOpen){var o=this.element.querySelector("."+uc);o.classList.add(Mc),le(o.firstElementChild,[oc],[rc]),this.element.querySelector("."+wc).classList.add(sc)}else n.hide();this.popObj=n}},t.prototype.tbarPopupHandler=function(e){"Extended"===this.overflowMode&&(e?this.add(this.element,xc):this.remove(this.element,xc))},t.prototype.popupOpen=function(e){var t=this.popObj;this.isVertical||(t.offsetY=this.getElementOffsetY(),t.dataBind());var i=this.popObj.element,n=this.popObj.element.parentElement,o=n.querySelector("."+uc);o.setAttribute("aria-expanded","true"),"Extended"===this.overflowMode?t.element.style.minHeight="":(ae(t.element,{height:"auto",maxHeight:""}),t.element.style.maxHeight=t.element.offsetHeight+"px");var r=i.offsetTop+i.offsetHeight+Ds(n).top,s=o.firstElementChild;o.classList.add(Mc),le(s,[oc],[rc]),this.tbarPopupHandler(!0);var a=g(window.scrollY)?0:window.scrollY;if(!this.isVertical&&window.innerHeight+a<r&&this.element.offsetTop<i.offsetHeight){var l=i.offsetHeight-(r-window.innerHeight-a+5);t.height=l+"px";for(var c=0;c<=i.childElementCount;c++){var h=i.children[parseInt(c.toString(),10)];if(h.offsetTop+h.offsetHeight>l){l=h.offsetTop;break}}"Extended"!==this.overflowMode&&ae(t.element,{maxHeight:l+"px"})}else if(this.isVertical&&"Extended"!==this.overflowMode){var d=this.element.getBoundingClientRect();ae(t.element,{maxHeight:d.top+this.element.offsetHeight+"px",bottom:0,visibility:""})}if(t){var p=i.getBoundingClientRect();p.right>document.documentElement.clientWidth&&p.width>n.getBoundingClientRect().width&&(t.collision={Y:"none"},t.dataBind()),t.refreshPosition()}},t.prototype.popupClose=function(e){var t=this.element.querySelector("."+uc);t.setAttribute("aria-expanded","false");var i=t.firstElementChild;t.classList.remove(Mc),le(i,[rc],[oc]),this.tbarPopupHandler(!1)},t.prototype.checkPriority=function(e,t,i,n){for(var o,r=this.popupPriCount>0,s=i,a=0,l=0,c=0,h=function(e,t){var i=!1;return t.forEach((function(t){e.classList.contains(t)&&(i=!0)})),i},d=t.length-1;d>=0;d--){var p=void 0,u=window.getComputedStyle(t[parseInt(d.toString(),10)]);this.isVertical?(p=parseFloat(u.marginTop),p+=parseFloat(u.marginBottom)):(p=parseFloat(u.marginRight),p+=parseFloat(u.marginLeft));var m=t[parseInt(d.toString(),10)]===this.tbarEle[0];m&&(this.tbarEleMrgn=p),o=this.isVertical?t[parseInt(d.toString(),10)].offsetHeight:t[parseInt(d.toString(),10)].offsetWidth;var g=m?o+p:o;if(h(t[parseInt(d.toString(),10)],[Cc])&&r&&(t[parseInt(d.toString(),10)].classList.add(bc),this.isVertical?ae(t[parseInt(d.toString(),10)],{display:"none",minHeight:g+"px"}):ae(t[parseInt(d.toString(),10)],{display:"none",minWidth:g+"px"}),c++),this.isVertical?t[parseInt(d.toString(),10)].offsetTop+t[parseInt(d.toString(),10)].offsetHeight+p>i:t[parseInt(d.toString(),10)].offsetLeft+t[parseInt(d.toString(),10)].offsetWidth+p>i){if(t[parseInt(d.toString(),10)].classList.contains(nc)){if("Extended"===this.overflowMode)h(f=t[parseInt(d.toString(),10)],[nc,Nc])&&(t[parseInt(d.toString(),10)].classList.add(bc),c++),l++;else if("Popup"===this.overflowMode){var f;if(a>0&&l===c)h(f=t[d+l+(a-1)],[nc,Nc])&&ae(f,{display:"none"});a++,l=0,c=0}}else l++;t[parseInt(d.toString(),10)].classList.contains(dc)&&n||h(t[parseInt(d.toString(),10)],[nc,Nc])?i-=(this.isVertical?t[parseInt(d.toString(),10)].offsetHeight:t[parseInt(d.toString(),10)].offsetWidth)+p:(t[parseInt(d.toString(),10)].classList.add(bc),this.isVertical?ae(t[parseInt(d.toString(),10)],{display:"none",minHeight:g+"px"}):ae(t[parseInt(d.toString(),10)],{display:"none",minWidth:g+"px"}),c++)}}if(n){var y=oe("."+tc+":not(."+bc+")",this.element);this.checkPriority(e,y,s,!1)}},t.prototype.createPopupIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav e-hor-nav");i="Extended"===this.overflowMode?i+" e-expended-nav":i;var n=this.createElement("div",{id:t,className:i});"msie"!==Q.info.name&&"edge"!==Q.info.name||n.classList.add("e-ie-align");var o=this.createElement("div",{className:rc+" e-icons"});n.appendChild(o),n.setAttribute("tabindex","0"),n.setAttribute("role","button"),e.appendChild(n)},t.prototype.tbarPriRef=function(e,t,i,n,o,r,s,a,l){var c=a,h=this.popObj.element,d="."+tc+":not(."+nc+"):not(."+dc+")",p=oe("."+bc+":not(."+dc+")",h).length,u=function(e,t){return e.classList.contains(t)};if(0===oe(d,e).length){var m=e.children[t-(t-i)-1],f=!g(m)&&u(m,Nc);if(!g(m)&&u(m,nc)&&!Z(m)||f){m.style.display="unset";var y=m.offsetWidth+2*parseFloat(window.getComputedStyle(m).marginRight),v=m.previousElementSibling;r+y<s||o?(e.insertBefore(n,e.children[t+c-(t-i)]),g(v)||(v.style.display="")):(ae(n,l),v.classList.contains(nc)&&(v.style.display="none")),m.style.display=""}else e.insertBefore(n,e.children[t+c-(t-i)])}else e.insertBefore(n,e.children[t+c-p])},t.prototype.popupRefresh=function(e,t){var i=this,n=this.element,o=this.isVertical,r=n.querySelector("."+ec),s=n.querySelector("."+uc);if(!g(s)){var a;r.removeAttribute("style"),e.style.display="block",a=o?n.offsetHeight-(s.offsetHeight+r.offsetHeight):n.offsetWidth-(s.offsetWidth+r.offsetWidth);var l=0;[].slice.call(e.children).forEach((function(e){l+=i.popupEleWidth(e),ae(e,{position:""})})),a+(o?s.offsetHeight:s.offsetWidth)>l&&0===this.popupPriCount&&(t=!0),this.popupEleRefresh(a,e,t),e.style.display="",0===e.children.length&&s&&this.popObj&&(ee(s),s=null,this.popObj.destroy(),ee(this.popObj.element),this.popObj=null)}},t.prototype.ignoreEleFetch=function(e,t){var i=[].slice.call(t.querySelectorAll("."+Nc)),n=[],o=0;return i.length>0?(i.forEach((function(e){n.push([].slice.call(t.children).indexOf(e))})),n.forEach((function(t){t<=e&&o++})),o):0},t.prototype.checkPopupRefresh=function(e,t){t.style.display="block";var i=this.popupEleWidth(t.firstElementChild);t.firstElementChild.style.removeProperty("Position");var n=e.offsetWidth-e.querySelector("."+uc).offsetWidth,o=e.querySelector("."+ec).offsetWidth;return t.style.removeProperty("display"),n>i+o},t.prototype.popupEleWidth=function(e){e.style.position="absolute";var t=this.isVertical?e.offsetHeight:e.offsetWidth,i=e.querySelector(".e-tbar-btn-text");if(e.classList.contains("e-tbtn-align")||e.classList.contains(hc)){var n=e.children[0];!g(i)&&e.classList.contains(hc)?i.style.display="none":!g(i)&&e.classList.contains(cc)&&(i.style.display="block"),n.style.minWidth="0%",t=parseFloat(this.isVertical?e.style.minHeight:e.style.minWidth),n.style.minWidth="",n.style.minHeight="",g(i)||(i.style.display="")}return t},t.prototype.popupEleRefresh=function(e,t,i){for(var n,o,r=this.popupPriCount>0,s=this.tbarEle,a=this.element.querySelector("."+ec),l=0,c=function(t){if(t.classList.contains(Cc)&&r&&!i)return"continue";var c=h.popupEleWidth(t);if(t===h.tbarEle[0]&&(c+=h.tbarEleMrgn),t.style.position="",!(c<e||i))return"break";var d={minWidth:t.style.minWidth,height:t.style.height,minHeight:t.style.minHeight};if(ae(t,{minWidth:"",height:"",minHeight:""}),t.classList.contains(pc)||t.classList.remove(bc),o=h.tbarEle.indexOf(t),h.tbarAlign){var p=h.items[parseInt(o.toString(),10)].align;o=h.tbarAlgEle[(p+"s").toLowerCase()].indexOf(t),s=h.tbarAlgEle[(p+"s").toLowerCase()],a=h.element.querySelector("."+ec+" .e-toolbar-"+p.toLowerCase())}var u=0;"Extended"!==h.overflowMode&&s.slice(0,o).forEach((function(t){(t.classList.contains(dc)||t.classList.contains(nc))&&(t.classList.contains(nc)&&(t.style.display="",e-=t.offsetWidth),u++)})),l=h.ignoreEleFetch(o,a),t.classList.contains(dc)?(h.tbarPriRef(a,o,u,t,i,c,e,l,d),e-=t.offsetWidth):0===o?(a.insertBefore(t,a.firstChild),e-=t.offsetWidth):(n=oe("."+dc,h.popObj.element).length,a.insertBefore(t,a.children[o+l-n]),e-=t.offsetWidth),t.style.height=""},h=this,d=0,p=[].slice.call(t.children);d<p.length;d++){if("break"===c(p[d]))break}this.checkOverflow(this.element,this.element.getElementsByClassName(ec)[0])&&!i&&this.renderOverflowMode()},t.prototype.removePositioning=function(){var e=this.element.querySelector("."+ec);if(!g(e)&&e.classList.contains(fc)){this.remove(e,fc);var t=[].slice.call(e.childNodes);t[1].removeAttribute("style"),t[2].removeAttribute("style")}},t.prototype.refreshPositioning=function(){var e=this.element.querySelector("."+ec);this.add(e,fc),this.itemPositioning()},t.prototype.itemPositioning=function(){var e,t=this.element.querySelector("."+ec);if(!g(t)&&t.classList.contains(fc)){var i,n=this.element.querySelector("."+uc);if(this.scrollModule){var o=this.isVertical?"e-vscroll-content":"e-hscroll-content";i=[].slice.call(t.querySelector("."+o).children)}else i=[].slice.call(t.childNodes);e=this.isVertical?i[0].offsetHeight+i[2].offsetHeight:i[0].offsetWidth+i[2].offsetWidth;var r=this.isVertical?this.element.offsetHeight:this.element.offsetWidth;if(n){r-=this.isVertical?n.offsetHeight:n.offsetWidth;var s=(this.isVertical?n.offsetHeight:n.offsetWidth)+"px";i[2].removeAttribute("style"),this.isVertical?this.enableRtl?i[2].style.top=s:i[2].style.bottom=s:this.enableRtl?i[2].style.left=s:i[2].style.right=s}if(!(r<=e)){var a=(r-e-(this.isVertical?i[1].offsetHeight:i[1].offsetWidth))/2;i[1].removeAttribute("style");var l=(this.isVertical?i[0].offsetHeight:i[0].offsetWidth)+a+"px";this.isVertical?this.enableRtl?i[1].style.marginBottom=l:i[1].style.marginTop=l:this.enableRtl?i[1].style.marginRight=l:i[1].style.marginLeft=l}}},t.prototype.tbarItemAlign=function(e,t,i){var n=this;if(!e.showAlwaysInPopup||"Show"===e.overflow){var o=[];if(o.push(this.createElement("div",{className:"e-toolbar-left",attrs:{role:"group"}})),o.push(this.createElement("div",{className:gc,attrs:{role:"group"}})),o.push(this.createElement("div",{className:"e-toolbar-right",attrs:{role:"group"}})),0===i&&"Left"!==e.align)o.forEach((function(e){t.appendChild(e)})),this.tbarAlign=!0,this.add(t,fc);else if("Left"!==e.align){var r=t.childNodes,s=o[0];[].slice.call(r).forEach((function(e){n.tbarAlgEle.lefts.push(e),s.appendChild(e)})),t.appendChild(s),t.appendChild(o[1]),t.appendChild(o[2]),this.tbarAlign=!0,this.add(t,fc)}}},t.prototype.ctrlTemplate=function(){var e=this;this.ctrlTem=this.trgtEle.cloneNode(!0),this.add(this.trgtEle,ec),this.tbarEle=[],[].slice.call(this.trgtEle.children).forEach((function(t){"DIV"===t.tagName&&(e.tbarEle.push(t),g(t.firstElementChild)||t.firstElementChild.setAttribute("aria-disabled","false"),e.add(t,tc))}))},t.prototype.renderItems=function(){var e=this.element,t=this.items;if(null!=this.trgtEle)this.ctrlTemplate();else if(e&&t.length>0){var i=void 0;e&&e.children.length>0&&(i=e.querySelector("."+ec)),i||(i=this.createElement("div",{className:ec})),this.itemsAlign(t,i),e.appendChild(i)}},t.prototype.setAttr=function(e,t){for(var i,n=Object.keys(e),o=0;o<n.length;o++)"class"===(i=n[parseInt(o.toString(),10)])?this.add(t,e[""+i]):t.setAttribute(i,e[""+i])},t.prototype.enableItems=function(e,t){var i,n=e,o=n.length;g(t)&&(t=!0);var r=function(e,t){e?(t.classList.remove(lc),g(t.firstElementChild)||t.firstElementChild.setAttribute("aria-disabled","false")):(t.classList.add(lc),g(t.firstElementChild)||t.firstElementChild.setAttribute("aria-disabled","true"))};if(!g(o)&&o>=1){for(var s=0,a=[].slice.call(n);s<o;s++){var l=a[parseInt(s.toString(),10)];if("number"==typeof l){if(g(i=this.getElementByIndex(l)))return;n[parseInt(s.toString(),10)]=i}else i=l;r(t,i)}t?X(n,lc):G(n,lc)}else{if("number"==typeof n){if(g(i=this.getElementByIndex(n)))return}else i=e;r(t,i)}},t.prototype.getElementByIndex=function(e){return this.tbarEle[parseInt(e.toString(),10)]?this.tbarEle[parseInt(e.toString(),10)]:null},t.prototype.addItems=function(e,t){var i;this.extendedOpen();var n=this.element.querySelector("."+ec);if(g(n))this.itemsRerender(e);else{var o,r="Left";g(t)&&(t=0),e.forEach((function(e){g(e.align)||"Left"===e.align||"Left"!==r||(r=e.align)}));for(var s=0,a=e;s<a.length;s++){var l=a[s];if(g(l.type)&&(l.type="Button"),i=oe("."+tc,this.element),l.align=r,o=this.renderSubComponent(l,t),this.tbarEle.length>=t&&i.length>=0){g(this.scrollModule)&&this.destroyMode();var c="L"===l.align[0]?0:"C"===l.align[0]?1:2,h=void 0;this.tbarAlign||"Left"===r?this.tbarAlign?((h=se(i[0],"."+ec).children[parseInt(c.toString(),10)]).insertBefore(o,h.children[parseInt(t.toString(),10)]),this.tbarAlgEle[(l.align+"s").toLowerCase()].splice(t,0,o),this.refreshPositioning()):0===i.length?(i=oe("."+ec,this.element))[0].appendChild(o):i[0].parentNode.insertBefore(o,i[parseInt(t.toString(),10)]):(this.tbarItemAlign(l,n,1),this.tbarAlign=!0,(h=se(i[0],"."+ec).children[parseInt(c.toString(),10)]).appendChild(o),this.tbarAlgEle[(l.align+"s").toLowerCase()].push(o),this.refreshPositioning()),this.items.splice(t,0,l),l.template&&this.tbarEle.splice(this.tbarEle.length-1,1),this.tbarEle.splice(t,0,o),t++,this.offsetWid=n.offsetWidth}}n.style.width="",this.renderOverflowMode(),this.isReact&&this.renderReactTemplates()}},t.prototype.removeItems=function(e){var t,i=e,n=[].slice.call(oe("."+tc,this.element));if("number"==typeof i)t=parseInt(e.toString(),10),this.removeItemByIndex(t,n);else if(i&&i.length>1)for(var o=0,r=[].slice.call(i);o<r.length;o++){var s=r[o];t=this.tbarEle.indexOf(s),this.removeItemByIndex(t,n),n=oe("."+tc,this.element)}else{s=i&&i.length&&1===i.length?i[0]:e;t=n.indexOf(s),this.removeItemByIndex(t,n)}this.resize()},t.prototype.removeItemByIndex=function(e,t){if(this.tbarEle[parseInt(e.toString(),10)]&&t[parseInt(e.toString(),10)]){var i=this.tbarEle.indexOf(t[parseInt(e.toString(),10)]);if(this.tbarAlign){var n=this.tbarAlgEle[(this.items[parseInt(i.toString(),10)].align+"s").toLowerCase()].indexOf(this.tbarEle[parseInt(i.toString(),10)]);this.tbarAlgEle[(this.items[parseInt(i.toString(),10)].align+"s").toLowerCase()].splice(parseInt(n.toString(),10),1)}this.isReact&&this.clearToolbarTemplate(t[parseInt(e.toString(),10)]);var o=t[parseInt(e.toString(),10)].querySelector(".e-control.e-btn");g(o)||g(o.ej2_instances[0])||o.ej2_instances[0].isDestroyed||o.ej2_instances[0].destroy(),ee(t[parseInt(e.toString(),10)]),this.items.splice(i,1),this.tbarEle.splice(i,1)}},t.prototype.templateRender=function(e,t,i,n){var o,r=i.type,s=e;if("object"==typeof e&&(o="function"==typeof s.appendTo),"string"!=typeof e&&o){if("Input"===r){h=this.createElement("input");i.id?h.id=i.id:h.id=y("tbr-ipt"),t.appendChild(h),s.appendTo(h)}}else{var a,l=void 0,c=new RegExp(/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i);a="string"==typeof e?e.trim():e;try{if("object"!=typeof e||g(e.tagName))if("string"==typeof e&&c.test(a))t.innerHTML=a;else if(document.querySelectorAll(a).length){var h,d=(h=document.querySelector(a)).outerHTML.trim();t.appendChild(h),h.style.display="",g(d)||this.tempId.push(a)}else l=yi(a);else t.appendChild(e)}catch(e){l=yi(a)}var p=void 0;if(!g(l))p=l({},this,"template",this.element.id+n+"_template",this.isStringTemplate,void 0,void 0,this.root);!g(p)&&p.length>0&&[].slice.call(p).forEach((function(e){g(e.tagName)||(e.style.display=""),t.appendChild(e)}))}this.add(t,ac);var u=t.firstElementChild;g(u)||(u.setAttribute("tabindex",g(u.getAttribute("tabIndex"))?"-1":this.getDataTabindex(u)),u.setAttribute("data-tabindex",g(u.getAttribute("tabIndex"))?"-1":this.getDataTabindex(u))),this.tbarEle.push(t)},t.prototype.buttonRendering=function(e,t){var i=this.createElement("button",{className:"e-tbar-btn"});i.setAttribute("type","button");var n,o,r=e.text;e.id?i.id=e.id:i.id=y("e-tbr-btn");var s=this.createElement("span",{className:"e-tbar-btn-text"});r?(s.innerHTML=this.enableHtmlSanitizer?Si.sanitize(r):r,i.appendChild(s),i.classList.add("e-tbtn-txt")):this.add(t,"e-tbtn-align"),(e.prefixIcon||e.suffixIcon)&&(e.prefixIcon&&e.suffixIcon||e.prefixIcon?(n=e.prefixIcon+" e-icons",o="Left"):(n=e.suffixIcon+" e-icons",o="Right"));var a=new Cs({iconCss:n,iconPosition:o});return a.createElement=this.createElement,a.appendTo(i),e.width&&ae(i,{width:N(e.width)}),i},t.prototype.renderSubComponent=function(e,t){var i,n=this.createElement("div",{className:tc}),o=this.createElement("div",{innerHTML:this.enableHtmlSanitizer&&!g(e.tooltipText)?Si.sanitize(e.tooltipText):e.tooltipText});if(this.tbarEle||(this.tbarEle=[]),e.htmlAttributes&&this.setAttr(e.htmlAttributes,n),e.tooltipText&&n.setAttribute("title",o.textContent),e.cssClass&&(n.className=n.className+" "+e.cssClass),e.template)this.templateRender(e.template,n,e,t);else switch(e.type){case"Button":(i=this.buttonRendering(e,n)).setAttribute("tabindex",g(e.tabIndex)?"-1":e.tabIndex.toString()),i.setAttribute("data-tabindex",g(e.tabIndex)?"-1":e.tabIndex.toString()),i.setAttribute("aria-label",e.text||e.tooltipText),i.setAttribute("aria-disabled","false"),n.appendChild(i),n.addEventListener("click",this.itemClick.bind(this));break;case"Separator":this.add(n,nc)}if(e.showTextOn){var r=e.showTextOn;"Toolbar"===r?(this.add(n,cc),this.add(n,"e-tbtn-align")):"Overflow"===r&&this.add(n,hc)}if(e.overflow){var s=e.overflow;"Show"===s?this.add(n,dc):"Hide"===s&&(n.classList.contains(nc)||this.add(n,pc))}return"Show"!==e.overflow&&e.showAlwaysInPopup&&!n.classList.contains(nc)&&(this.add(n,Cc),this.popupPriCount++),e.disabled&&this.add(n,lc),!1===e.visible&&this.add(n,Ec),n},t.prototype.getDataTabindex=function(e){return g(e.getAttribute("data-tabindex"))?"-1":e.getAttribute("data-tabindex")},t.prototype.itemClick=function(e){this.activeEleSwitch(e.currentTarget)},t.prototype.activeEleSwitch=function(e){this.activeEleRemove(e.firstElementChild),this.activeEle.focus()},t.prototype.activeEleRemove=function(e){var t=this.element.querySelector("."+tc+":not(."+lc+" ):not(."+nc+" ):not(."+Ec+" )");if(g(this.activeEle)||(this.activeEle.setAttribute("tabindex",this.getDataTabindex(this.activeEle)),t&&t.removeAttribute("tabindex"),t=this.activeEle),this.activeEle=e,"-1"===this.getDataTabindex(this.activeEle))if(g(this.trgtEle)&&!e.parentElement.classList.contains(ac)){if(!g(this.element.querySelector(".e-hor-nav"))&&this.element.querySelector(".e-hor-nav").classList.contains("e-nav-active")){this.updateTabIndex("0");var i="-1"===this.getDataTabindex(t)?"0":this.getDataTabindex(t);t.setAttribute("tabindex",i)}else this.updateTabIndex("-1");e.removeAttribute("tabindex")}else{var n=parseInt(this.getDataTabindex(this.activeEle),10)+1;this.activeEle.setAttribute("tabindex",n.toString())}},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.getModuleName=function(){return"toolbar"},t.prototype.itemsRerender=function(e){this.items=this.tbarItemsCol,(this.isReact||this.isAngular)&&this.clearTemplate(),this.destroyMode(),this.destroyItems(),this.items=e,this.tbarItemsCol=this.items,this.renderItems(),this.renderOverflowMode(),this.isReact&&this.renderReactTemplates()},t.prototype.resize=function(){var e=this.element;this.tbResize=!0,this.tbarAlign&&this.itemPositioning(),this.popObj&&"Popup"===this.overflowMode&&this.popObj.hide();var t=this.checkOverflow(e,e.getElementsByClassName(ec)[0]);if(!t){this.destroyScroll();var i=e.querySelector("."+ec);g(i)||(this.remove(i,Tc),this.tbarAlign&&this.add(i,fc))}t&&this.scrollModule&&this.offsetWid===e.offsetWidth||((this.offsetWid>e.offsetWidth||t)&&this.renderOverflowMode(),this.popObj&&("Extended"===this.overflowMode&&(this.popObj.width=this.getToolbarPopupWidth(this.element)),this.tbarAlign&&this.removePositioning(),this.popupRefresh(this.popObj.element,!1),this.tbarAlign&&this.refreshPositioning()),this.element.querySelector("."+yc)&&(this.scrollStep=this.element.querySelector("."+yc).offsetWidth),this.offsetWid=e.offsetWidth,this.tbResize=!1,this.separator())},t.prototype.orientationChange=function(){var e=this;setTimeout((function(){e.resize()}),500)},t.prototype.extendedOpen=function(){var e=this.element.querySelector("."+wc);"Extended"===this.overflowMode&&e&&(this.isExtendedOpen=e.classList.contains(sc))},t.prototype.updateHideEleTabIndex=function(e,t,i,n,o){i&&(n=o.indexOf(e));for(var r=o[++n];r;){if(!this.eleContains(r)){var s=r.firstElementChild.getAttribute("data-tabindex");t&&"-1"===s?r.firstElementChild.setAttribute("tabindex","0"):s!==r.firstElementChild.getAttribute("tabindex")&&r.firstElementChild.setAttribute("tabindex",s);break}r=o[++n]}},t.prototype.clearToolbarTemplate=function(e){if(this.registeredTemplate&&this.registeredTemplate.template)for(var t=this.registeredTemplate,i=0;i<t.template.length;i++){if(!g(o=se(t.template[parseInt(i.toString(),10)].rootNodes[0],"."+tc))&&o===e){this.clearTemplate(["template"],[t.template[parseInt(i.toString(),10)]]);break}}else if(this.portals&&this.portals.length>0){var n=this.portals;for(i=0;i<n.length;i++){var o;if(!g(o=se(n[parseInt(i.toString(),10)].containerInfo,"."+tc))&&o===e){this.clearTemplate(["template"],i);break}}}},t.prototype.onPropertyChanged=function(e,t){var i=this.element;this.extendedOpen();for(var n=0,o=Object.keys(e);n<o.length;n++){switch(o[n]){case"items":if(e.items instanceof Array&&t.items instanceof Array)this.itemsRerender(e.items);else for(var r=Object.keys(e.items),s=0;s<r.length;s++){var a=parseInt(Object.keys(e.items)[parseInt(s.toString(),10)],10),l=Object.keys(e.items[parseInt(a.toString(),10)])[0],c=Object(e.items[parseInt(a.toString(),10)])[""+l];if(this.tbarAlign||"align"===l){this.refresh(),this.trigger("created");break}var h="showAlwaysInPopup"===l&&!c,d="overflow"===l&&0!==this.popupPriCount;(h||this.items[parseInt(a.toString(),10)].showAlwaysInPopup&&d)&&--this.popupPriCount,g(this.scrollModule)&&this.destroyMode();var p=[].slice.call(oe("."+ec+" ."+tc,i));this.isReact&&this.items[parseInt(a.toString(),10)].template&&this.clearToolbarTemplate(p[parseInt(a.toString(),10)]),ee(p[parseInt(a.toString(),10)]),this.tbarEle.splice(a,1),this.addItems([this.items[parseInt(a.toString(),10)]],a),this.items.splice(a,1),this.items[parseInt(a.toString(),10)].template&&this.tbarEle.splice(this.items.length,1)}break;case"width":ae(i,{width:N(e.width)}),this.refreshOverflow();break;case"height":ae(this.element,{height:N(e.height)});break;case"overflowMode":this.destroyMode(),this.renderOverflowMode(),this.enableRtl&&this.add(i,ic),this.refreshOverflow();break;case"enableRtl":e.enableRtl?this.add(i,ic):this.remove(i,ic),g(this.scrollModule)||(e.enableRtl?this.add(this.scrollModule.element,ic):this.remove(this.scrollModule.element,ic)),g(this.popObj)||(e.enableRtl?this.add(this.popObj.element,ic):this.remove(this.popObj.element,ic)),this.tbarAlign&&this.itemPositioning();break;case"scrollStep":this.scrollModule&&(this.scrollModule.scrollStep=this.scrollStep);break;case"enableCollision":this.popObj&&(this.popObj.collision={Y:this.enableCollision?"flip":"none"});break;case"cssClass":t.cssClass&&X([this.element],t.cssClass.split(" ")),e.cssClass&&G([this.element],e.cssClass.split(" "));break;case"allowKeyboard":this.unwireKeyboardEvent(),e.allowKeyboard&&this.wireKeyboardEvent()}}},t.prototype.hideItem=function(e,t){var i,n="object"==typeof e,o=e;if(n||!g(o)){var r=[].slice.call(oe("."+tc,this.element));if(n)i=e;else if(this.tbarEle[parseInt(o.toString(),10)]){i=[].slice.call(oe("."+tc,this.element))[parseInt(o.toString(),10)]}i&&(t?(i.classList.add(Ec),i.classList.contains(nc)||(g(i.firstElementChild.getAttribute("tabindex"))||"-1"!==i.firstElementChild.getAttribute("tabindex"))&&this.updateHideEleTabIndex(i,t,n,o,r)):(i.classList.remove(Ec),i.classList.contains(nc)||this.updateHideEleTabIndex(i,t,n,o,r)),this.refreshOverflow())}},Jl([Le([],jc)],t.prototype,"items",void 0),Jl([De("auto")],t.prototype,"width",void 0),Jl([De("auto")],t.prototype,"height",void 0),Jl([De("")],t.prototype,"cssClass",void 0),Jl([De("Scrollable")],t.prototype,"overflowMode",void 0),Jl([De()],t.prototype,"scrollStep",void 0),Jl([De(!0)],t.prototype,"enableCollision",void 0),Jl([De(!0)],t.prototype,"enableHtmlSanitizer",void 0),Jl([De(!0)],t.prototype,"allowKeyboard",void 0),Jl([Se()],t.prototype,"clicked",void 0),Jl([Se()],t.prototype,"created",void 0),Jl([Se()],t.prototype,"destroyed",void 0),Jl([Se()],t.prototype,"beforeCreate",void 0),t=Jl([Ie],t)}(St),zc="e-rtl",Ac="e-disabled",kc="e-input",Pc="e-multi-line-input",Rc="e-input-group",Bc="e-float-input",Hc="e-float-line",Uc="e-float-text",Fc="e-float-text-content",Yc="e-clear-icon",Vc="e-clear-icon-hide",Qc="e-label-top",qc="e-label-bottom",Wc="e-no-float-label",_c="e-input-custom-tag",Gc="e-float-custom-tag",Xc=["title","style","class"];!function(e){var t=!0;function i(t){n(t.floatLabelType,t.element);var i=function(){return function(t){var i=u(t.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.add("e-input-focus"),"Never"!==t.floatLabelType&&setTimeout((function(){e.calculateWidth(t.element,i)}),80)}(t)},o=function(){return function(t){var i=u(t.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.remove("e-input-focus"),"Never"!==t.floatLabelType&&setTimeout((function(){e.calculateWidth(t.element,i)}),80)}(t)},r=function(){return function(e){n(e.floatLabelType,e.element)}(t)};t.element.addEventListener("focus",i),t.element.addEventListener("blur",o),t.element.addEventListener("input",r),t.element.__eventHandlers.inputFocusHandler={focusHandler:i},t.element.__eventHandlers.inputBlurHandler={blurHandler:o},t.element.__eventHandlers.inputHandler={inputHandler:r}}function n(e,t){var i=t.value,n=t.parentElement,o=n&&n.parentElement;""===i||g(i)?"Always"!==e&&(n&&n.classList.contains("e-input-group")?n.classList.remove("e-valid-input"):o&&o.classList.contains("e-input-group")&&o.classList.remove("e-valid-input")):n&&n.classList.contains("e-input-group")?n.classList.add("e-valid-input"):o&&o.classList.contains("e-input-group")&&o.classList.add("e-valid-input")}function o(){var e=u(this).getElementsByClassName("e-float-text")[0];g(e)||(G([e],Qc),e.classList.contains(qc)&&X([e],qc))}function r(){var e=u(this);if(e.getElementsByTagName("textarea")[0]?""===e.getElementsByTagName("textarea")[0].value:""===e.getElementsByTagName("input")[0].value){var t=e.getElementsByClassName("e-float-text")[0];g(t)||(t.classList.contains(Qc)&&X([t],Qc),G([t],qc))}}function s(e){e.addEventListener("focus",o),e.addEventListener("blur",r)}function a(e){g(e)||(e.removeEventListener("focus",o),e.removeEventListener("blur",r))}function l(e,t,i){var n=g(i)?_:i;"Auto"===e.floatLabelType&&s(e.element),g(t.container)?(t.container=y(e,Bc,Gc,"div",n),t.container.classList.add(Rc),e.element.parentNode&&e.element.parentNode.insertBefore(t.container,e.element)):(g(e.customTag)||t.container.classList.add(Gc),t.container.classList.add(Bc));var o=n("span",{className:Hc}),r=n("label",{className:Uc});if(g(e.element.id)||""===e.element.id||(r.id="label_"+e.element.id.replace(/ /g,"_"),ie(e.element,{"aria-labelledby":r.id})),g(e.element.placeholder)||""===e.element.placeholder||(r.innerText=v(e.element.placeholder),e.element.removeAttribute("placeholder")),g(e.properties)||g(e.properties.placeholder)||""===e.properties.placeholder||(r.innerText=v(e.properties.placeholder)),r.innerText||t.container.classList.add(Wc),t.container.classList.contains("e-float-icon-left")){var a=t.container.querySelector(".e-input-in-wrap");a.appendChild(e.element),a.appendChild(o),a.appendChild(r)}else t.container.appendChild(e.element),t.container.appendChild(o),t.container.appendChild(r);if(p(e.element.value,r),"Always"===e.floatLabelType&&(r.classList.contains(qc)&&X([r],qc),G([r],Qc)),"Auto"===e.floatLabelType){var l=function(){return function(e){f(e.element,e.floatLabelType)}(e)},h=function(){return function(e){f(e.element,e.floatLabelType)}(e)};e.element.addEventListener("input",l),e.element.addEventListener("blur",h),e.element.__eventHandlers.floatInputHandler={inputFloatHandler:l},e.element.__eventHandlers.floatBlurHandler={blurFloatHandler:h}}else c(e);g(e.element.getAttribute("id"))||r.setAttribute("for",e.element.getAttribute("id"))}function c(e){if(!(g(e.element)||g(e.element.__eventHandlers)||g(e.element.__eventHandlers.floatInputHandler)||g(e.element.__eventHandlers.floatBlurHandler))){var t=e.element.__eventHandlers.floatInputHandler.inputFloatHandler,i=e.element.__eventHandlers.floatBlurHandler.blurFloatHandler;e.element.removeEventListener("input",t),e.element.removeEventListener("blur",i),delete e.element.__eventHandlers.floatInputHandler,delete e.element.__eventHandlers.floatBlurHandler}}function h(e,t){"Always"===e&&t.classList.contains("e-outline")&&t.classList.add("e-valid-input")}function d(e,t,i){g(t)||(e&&!i?X([t],Vc):G([t],Vc))}function p(e,t,i){(void 0===i&&(i=null),e)?(G([t],Qc),t.classList.contains(qc)&&X([t],qc)):(null==i||i!==document.activeElement)&&(t.classList.contains(Qc)&&X([t],Qc),G([t],qc))}function u(e){var t=g(e.parentNode)?e:e.parentNode;return t&&t.classList.contains("e-input-in-wrap")&&(t=t.parentNode),t}function m(e,i,n){if(void 0===t||t){var o=function(t){return function(e,t,i){t.classList.contains(Ac)||t.readOnly||(e.preventDefault(),t!==document.activeElement&&t.focus(),t.value="",G([i],Vc))}(t,e,i)};i.addEventListener("click",o),e.__eventHandlers.clearClickHandler={clickHandlerEvent:o}}var r=function(){return function(e,t){d(e.value,t)}(e,i)},s=function(){return function(e,t){d(e.value,t,e.readOnly)}(e,i)},a=function(){return function(e,t){setTimeout((function(){g(t)||(G([t],Vc),t=!g(e)&&e.classList.contains("e-combobox")?null:t)}),200)}(e,i)};e.addEventListener("input",r),e.addEventListener("focus",s),e.addEventListener("blur",a),e.__eventHandlers.clearInputHandler={inputHandlerEvent:r},e.__eventHandlers.clearFocusHandler={focusHandlerEvent:s},e.__eventHandlers.clearBlurHandler={blurHandlerEvent:a}}function f(e,t){if(u(e).classList.contains(Bc)&&"Auto"===t){var i=u(e).getElementsByClassName("e-float-text")[0];p(e.value,i,e)}}function y(e,t,i,n,o){var r,s=g(o)?_:o;return g(e.customTag)?r=s(n,{className:t}):(r=s(e.customTag,{className:t})).classList.add(i),r.classList.add("e-control-wrapper"),r}function v(e){var t="";if(!g(e)&&""!==e){var i=document.createElement("span");i.innerHTML='<input placeholder="'+e+'"/>',t=i.children[0].placeholder}return t}function b(e,t,i){g(i)||""===i||X(t,i.split(" ")),g(e)||""===e||G(t,e.split(" "))}function M(e,t,i){if("multiselect"===i||function(e){if(!e)return!1;var t=e;for(;t&&t!==document.body;){if("none"===window.getComputedStyle(t).display)return!1;t=t.parentElement}return!0}(e)){var n="multiselect"===i?e:e.clientWidth-parseInt(getComputedStyle(e,null).getPropertyValue("padding-left"),10);g(t)||g(t.getElementsByClassName("e-float-text-content")[0])||(t.getElementsByClassName("e-float-text-content")[0].classList.contains("e-float-text-overflow")&&t.getElementsByClassName("e-float-text-content")[0].classList.remove("e-float-text-overflow"),(n<t.getElementsByClassName("e-float-text-content")[0].clientWidth||n===t.getElementsByClassName("e-float-text-content")[0].clientWidth)&&t.getElementsByClassName("e-float-text-content")[0].classList.add("e-float-text-overflow"))}}function C(e,t){e=v(e);var i,n=u(t);n.classList.contains(Bc)?g(e)||""===e?(n.classList.add(Wc),(i=n.getElementsByClassName("e-float-text-content")[0])?i.children[0].textContent="":n.getElementsByClassName(Uc)[0].textContent=""):((i=n.getElementsByClassName("e-float-text-content")[0])&&i.children[0]?i.children[0].textContent=e:n.getElementsByClassName(Uc)[0].textContent=e,n.classList.remove(Wc),t.removeAttribute("placeholder")):g(e)||""===e?t.removeAttribute("placeholder"):ie(t,{placeholder:e})}function E(e,t,i){e?ie(t,{readonly:""}):t.removeAttribute("readonly"),g(i)||f(t,i)}function D(e,t){e?G(t,zc):X(t,zc)}function T(e,t,i,n){var o={disabled:"","aria-disabled":"true"},r=!g(n);e?(t.classList.remove(Ac),S(o,t),r&&X([n],Ac)):(t.classList.add(Ac),I(o,t),r&&G([n],Ac)),g(i)||f(t,i)}function L(e,t,i,n,o){var r=g(o)?_:o;e?i.clearButton=function(e,t,i,n){var o=(g(n)?_:n)("span",{className:Yc}),r=t.container;return g(i)?(t.container.classList.contains(Bc)?t.container.querySelector("."+Uc):e).insertAdjacentElement("afterend",o):r.appendChild(o),G([o],Vc),m(e,o),o.setAttribute("aria-label","close"),o}(t,i,n,r):(te(i.clearButton),i.clearButton=null)}function S(e,t){for(var i=0,n=Object.keys(e);i<n.length;i++){var o=n[i],r=u(t);"disabled"===o&&t.classList.remove(Ac),"disabled"===o&&r.classList.contains(Rc)&&r.classList.remove(Ac),"placeholder"===o&&r.classList.contains(Bc)?r.getElementsByClassName(Uc)[0].textContent="":t.removeAttribute(o)}}function I(e,t){for(var i=0,n=Object.keys(e);i<n.length;i++){var o=n[i],r=u(t);"disabled"===o&&t.classList.add(Ac),"disabled"===o&&r.classList.contains(Rc)&&r.classList.add(Ac),"placeholder"===o&&r.classList.contains(Bc)?r.getElementsByClassName(Uc)[0].textContent=e[""+o]:t.setAttribute(o,e[""+o])}}function w(e,t){if(e.classList.contains("e-outline")&&e.getElementsByClassName("e-float-text")[0]){var i=t("span",{className:Fc});i.innerHTML=e.getElementsByClassName("e-float-text")[0].innerHTML,e.getElementsByClassName("e-float-text")[0].innerHTML="",e.getElementsByClassName("e-float-text")[0].appendChild(i)}}function x(e,t,i){var n=[];n.push(i);var o=g(i)?t.querySelectorAll(".e-input-group-icon"):n;if(e&&o.length>0)for(var r=0;r<o.length;r++)o[parseInt(r.toString(),10)].addEventListener("mousedown",j,!1),o[parseInt(r.toString(),10)].addEventListener("mouseup",O,!1);else if(o.length>0)for(r=0;r<o.length;r++)o[parseInt(r.toString(),10)].removeEventListener("mousedown",j,this),o[parseInt(r.toString(),10)].removeEventListener("mouseup",O,this)}function j(){for(var e,t,i=this.parentElement;!i.classList.contains("e-input-group");)i=i.parentElement;t=this,(e=i).classList.contains("e-disabled")||e.querySelector("input").readOnly||t.classList.add("e-input-btn-ripple")}function O(){var e=this;setTimeout((function(){e.classList.remove("e-input-btn-ripple")}),500)}function z(e,t){var i=t("span",{className:e});return i.classList.add("e-input-group-icon"),i}function A(e,t,i,n){var o=g(n)?_:n,r=z(e,o);t.classList.add("e-float-icon-left");var s=t.querySelector(".e-input-in-wrap");if(g(s)){s=o("span",{className:"e-input-in-wrap"}),i.parentNode.insertBefore(s,i);var a=t.querySelectorAll(i.tagName+" ~ *");s.appendChild(i);for(var l=0;l<a.length;l++){var c=a[parseInt(l.toString(),10)],h=s.parentElement;c.classList.contains("e-float-line")&&(h&&h.classList.contains("e-filled")||!h)||s.appendChild(c)}}return s.parentNode.insertBefore(r,s),x(!0,t,r),r}function k(e,t,i){var n=z(e,g(i)?_:i);return(t.classList.contains("e-float-icon-left")?t.querySelector(".e-input-in-wrap"):t).appendChild(n),x(!0,t,n),n}function P(e,t){"hidden"===t.type?e.classList.add("e-hidden"):e.classList.contains("e-hidden")&&e.classList.remove("e-hidden")}function R(e){var t=e;return g(e)||""===e||(t=e.replace(/\s+/g," ").trim()),t}e.createInput=function(e,n){e.element.__eventHandlers={};var o=g(n)?_:n,r={container:null,buttons:[],clearButton:null};if(e.floatLabelType,t=e.bindClearAction,g(e.floatLabelType)||"Never"===e.floatLabelType?(r.container=y(e,Rc,_c,"span",o),e.element.parentNode.insertBefore(r.container,e.element),G([e.element],kc),r.container.appendChild(e.element)):l(e,r,o),i(e),g(e.properties)||g(e.properties.showClearButton)||!e.properties.showClearButton||(L(e.properties.showClearButton,e.element,r,!0,o),r.clearButton.setAttribute("role","button"),r.container.classList.contains(Bc)&&G([r.container],Rc)),!g(e.buttons))for(var s=0;s<e.buttons.length;s++)r.buttons.push(k(e.buttons[s],r.container,o));return g(e.element)||"TEXTAREA"!==e.element.tagName||G([r.container],Pc),P(r.container,e.element),w((r=function(e,t){if(!g(e.properties))for(var i=0,n=Object.keys(e.properties);i<n.length;i++){switch(n[i]){case"cssClass":b(e.properties.cssClass,[t.container]),h(e.floatLabelType,t.container);break;case"enabled":T(e.properties.enabled,e.element,e.floatLabelType,t.container);break;case"enableRtl":D(e.properties.enableRtl,[t.container]);break;case"placeholder":C(e.properties.placeholder,e.element);break;case"readonly":E(e.properties.readonly,e.element)}}return t}(e,r)).container,o),r},e.bindInitialEvent=i,e.wireFloatingEvents=s,e.wireClearBtnEvents=m,e.destroy=function(e,i){void 0===i&&(i=null),function(e){if(!g(e.element)&&!(g(e.element.__eventHandlers)||g(e.element.__eventHandlers.inputFocusHandler)||g(e.element.__eventHandlers.inputBlurHandler)||g(e.element.__eventHandlers.inputHandler))){var t=e.element.__eventHandlers.inputFocusHandler.focusHandler,i=e.element.__eventHandlers.inputBlurHandler.blurHandler,n=e.element.__eventHandlers.inputHandler.inputHandler;e.element.removeEventListener("focus",t),e.element.removeEventListener("blur",i),e.element.removeEventListener("input",n),delete e.element.__eventHandlers.inputFocusHandler,delete e.element.__eventHandlers.inputBlurHandler,delete e.element.__eventHandlers.inputHandler}}(e),"Auto"===e.floatLabelType&&c(e),e.properties.showClearButton&&function(e,i){if(!g(e)&&!g(e.__eventHandlers)){if(!g(e.__eventHandlers.clearClickHandler)){var n=e.__eventHandlers.clearClickHandler.clickHandlerEvent;(void 0===t||t)&&(g(i)||i.removeEventListener("click",n)),delete e.__eventHandlers.clearClickHandler}if(!g(e.__eventHandlers.clearInputHandler)&&!g(e.__eventHandlers.clearFocusHandler)&&!g(e.__eventHandlers.clearBlurHandler)){var o=e.__eventHandlers.clearInputHandler.inputHandlerEvent,r=e.__eventHandlers.clearFocusHandler.focusHandlerEvent,s=e.__eventHandlers.clearBlurHandler.blurHandlerEvent;e.removeEventListener("input",o),e.removeEventListener("focus",r),e.removeEventListener("blur",s),delete e.__eventHandlers.clearInputHandler,delete e.__eventHandlers.clearFocusHandler,delete e.__eventHandlers.clearBlurHandler}}}(e.element,i),g(e.buttons)||x(!1,null,e.buttons),a(e.element),g(e.element)||(delete e.element.__eventHandlers,e.element.classList.contains(kc)&&e.element.classList.remove(kc))},e.setValue=function(e,t,i,o){if(t.value=e,"Never"!==i&&M(t,t.parentElement),g(i)||"Auto"!==i||f(t,i),!g(o)&&o){var r=u(t);if(!g(r)){var s=r.getElementsByClassName(Yc)[0];g(s)||(t.value&&!g(r)&&r.classList.contains("e-input-focus")?X([s],Vc):G([s],Vc))}}n(i,t)},e.setCssClass=b,e.calculateWidth=M,e.setWidth=function(e,t){"number"==typeof e?t.style.width=N(e):"string"==typeof e&&(t.style.width=e.match(/px|%|em/)?e:N(e)),M(t.firstChild,t)},e.setPlaceholder=C,e.setReadonly=E,e.setEnableRtl=D,e.setEnabled=T,e.setClearButton=L,e.removeAttributes=S,e.addAttributes=I,e.removeFloating=function(e){var t=e.container;if(!g(t)&&t.classList.contains(Bc)){var i=t.querySelector("textarea")?t.querySelector("textarea"):t.querySelector("input"),n=t.querySelector("."+Uc).textContent,o=null!==t.querySelector(".e-clear-icon");ee(t.querySelector("."+Hc)),ee(t.querySelector("."+Uc)),le(t,[Rc],[Bc]),a(i),ie(i,{placeholder:n}),i.classList.add(kc),o||"INPUT"!==i.tagName||i.removeAttribute("required")}},e.addFloating=function(e,t,i,n){var o=g(n)?_:n,r=se(e,"."+Rc),s=r.tagName,a={element:e,floatLabelType:t,customTag:s="DIV"!==s&&"SPAN"!==s?s:null,properties:{placeholder:i}};if("Never"!==t){var d=r.querySelector(".e-clear-icon"),p={container:r};e.classList.remove(kc),l(a,p,o),w(p.container,o),M(a.element,p.container);var u=r.classList.contains("e-float-icon-left");if(g(d))if(u)d=r.querySelector(".e-input-in-wrap").querySelector(".e-input-group-icon");else d=r.querySelector(".e-input-group-icon");if(g(d))u&&(d=r.querySelector(".e-input-group-icon"));else{var m=r.querySelector("."+Hc),f=r.querySelector("."+Uc),y=u?r.querySelector(".e-input-in-wrap"):r;y.insertBefore(e,d),y.insertBefore(m,d),y.insertBefore(f,d)}}else c(a);h(t,e.parentElement)},e.createSpanElement=w,e.setRipple=function(e,t){for(var i=0;i<t.length;i++)x(e,t[parseInt(i.toString(),10)].container)},e.addIcon=function(e,t,i,n,o){var r="string"==typeof t?t.split(","):t;if("append"===e.toLowerCase())for(var s=0,a=r;s<a.length;s++){k(a[s],i,o)}else for(var l=0,c=r;l<c.length;l++){A(c[l],i,n,o)}i.getElementsByClassName("e-input-group-icon")[0]&&i.getElementsByClassName("e-float-text-overflow")[0]&&i.getElementsByClassName("e-float-text-overflow")[0].classList.add("e-icon")},e.prependSpan=A,e.appendSpan=k,e.validateInputType=P,e.updateHTMLAttributesToElement=function(e,t){if(!g(e))for(var i=0,n=Object.keys(e);i<n.length;i++){var o=n[i];Xc.indexOf(o)<0&&t.setAttribute(o,e[""+o])}},e.updateCssClass=function(e,t,i){b(R(e),[i],R(t))},e.getInputValidClassList=R,e.updateHTMLAttributesToWrapper=function(e,t){if(!g(e))for(var i=0,n=Object.keys(e);i<n.length;i++){var o=n[i];if(Xc.indexOf(o)>-1)if("class"===o){var r=this.getInputValidClassList(e[""+o]);""!==r&&G([t],r.split(" "))}else if("style"===o){var s=t.getAttribute(o);s=g(s)?e[""+o]:s+e[""+o],t.setAttribute(o,s)}else t.setAttribute(o,e[""+o])}},e.isBlank=function(e){return!e||/^\s*$/.test(e)}}(Il||(Il={}));var Kc=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zc=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Jc="e-input-group-icon",$c="e-spin-up",eh="e-error",th="increment",ih="decrement",nh=new RegExp("^(-)?(\\d*)$"),oh="e-input-focus",rh=["title","style","class"],sh=0,ah=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.preventChange=!1,n.isDynamicChange=!1,n.numericOptions=t,n}return Kc(t,e),t.prototype.preRender=function(){this.isPrevFocused=!1,this.decimalSeparator=".",this.intRegExp=new RegExp("/^(-)?(d*)$/"),this.isCalled=!1;var e=a("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),X([this.cloneElement],["e-control","e-numerictextbox","e-lib"]),this.angularTagName=null,this.formEle=se(this.element,"form"),"EJS-NUMERICTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;for(var t=this.createElement("input"),i=0;i<this.element.attributes.length;i++){var n=this.element.attributes[i].nodeName;"id"!==n&&"class"!==n?(t.setAttribute(this.element.attributes[i].nodeName,this.element.attributes[i].nodeValue),t.innerHTML=this.element.innerHTML):"class"===n&&t.setAttribute(n,this.element.className.split(" ").filter((function(e){return 0!==e.indexOf("ng-")})).join(" "))}this.element.hasAttribute("name")&&this.element.removeAttribute("name"),this.element.classList.remove("e-control","e-numerictextbox"),this.element.appendChild(t),this.element=t,l("ej2_instances",e,this.element)}ie(this.element,{role:"spinbutton",tabindex:"0",autocomplete:"off"});var o={incrementTitle:"Increment value",decrementTitle:"Decrement value",placeholder:this.placeholder};this.l10n=new Ut("numerictextbox",o,this.locale),""!==this.l10n.getConstant("placeholder")&&this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.element.hasAttribute("id")||this.element.setAttribute("id",y("numerictextbox")),this.isValidState=!0,this.inputStyle=null,this.inputName=null,this.cultureInfo={},this.initCultureInfo(),this.initCultureFunc(),this.prevValue=this.value,this.updateHTMLAttrToElement(),this.checkAttributes(!1),this.formEle&&(this.inputEleValue=this.value),this.validateMinMax(),this.validateStep(),null===this.placeholder&&this.updatePlaceholder()},t.prototype.render=function(){"input"===this.element.tagName.toLowerCase()&&(this.createWrapper(),this.showSpinButton&&this.spinBtnCreation(),this.setElementWidth(this.width),this.container.classList.contains("e-input-group")||this.container.classList.add("e-input-group"),this.changeValue(null===this.value||isNaN(this.value)?null:this.strictMode?this.trimValue(this.value):this.value),this.wireEvents(),null===this.value||isNaN(this.value)||this.decimals&&this.setProperties({value:this.roundNumber(this.value,this.decimals)},!0),(this.element.getAttribute("value")||this.value)&&(this.element.setAttribute("value",this.element.value),this.hiddenInput.setAttribute("value",this.hiddenInput.value)),this.elementPrevValue=this.element.value,this.element.hasAttribute("data-val")&&this.element.setAttribute("data-val","false"),this.element.hasAttribute("aria-labelledby")||this.element.hasAttribute("placeholder")||this.element.hasAttribute("aria-label")||this.element.setAttribute("aria-label","numerictextbox"),!g(se(this.element,"fieldset"))&&se(this.element,"fieldset").disabled&&(this.enabled=!1),this.renderComplete())},t.prototype.checkAttributes=function(e){for(var t=0,i=e?g(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["value","min","max","step","disabled","readonly","style","name","placeholder"];t<i.length;t++){var n=i[t];if(!g(this.element.getAttribute(n)))switch(n){case"disabled":if(g(this.numericOptions)||void 0===this.numericOptions.enabled||e){var o="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:o},!e)}break;case"readonly":if(g(this.numericOptions)||void 0===this.numericOptions.readonly||e){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!e)}break;case"placeholder":(g(this.numericOptions)||void 0===this.numericOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"value":if(g(this.numericOptions)||void 0===this.numericOptions.value||e){var s=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));this.setProperties(l(n,s,{}),!e)}break;case"min":if(g(this.numericOptions)||void 0===this.numericOptions.min||e){var a=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===a||isNaN(a)||this.setProperties(l(n,a,{}),!e)}break;case"max":if(g(this.numericOptions)||void 0===this.numericOptions.max||e){var c=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===c||isNaN(c)||this.setProperties(l(n,c,{}),!e)}break;case"step":if(g(this.numericOptions)||void 0===this.numericOptions.step||e){var h=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===h||isNaN(h)||this.setProperties(l(n,h,{}),!e)}break;case"style":this.inputStyle=this.element.getAttribute(n);break;case"name":this.inputName=this.element.getAttribute(n);break;default:var d=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));(null!==d&&!isNaN(d)||"value"===n)&&this.setProperties(l(n,d,{}),!0)}}},t.prototype.updatePlaceholder=function(){this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0)},t.prototype.initCultureFunc=function(){this.instance=new pt(this.locale)},t.prototype.initCultureInfo=function(){this.cultureInfo.format=this.format,null!==a("currency",this)&&(l("currency",this.currency,this.cultureInfo),this.setProperties({currencyCode:this.currency},!0))},t.prototype.createWrapper=function(){var e=this.cssClass;g(this.cssClass)||""===this.cssClass||(e=this.getNumericValidClassList(this.cssClass));var t=Il.createInput({element:this.element,floatLabelType:this.floatLabelType,properties:{readonly:this.readonly,placeholder:this.placeholder,cssClass:e,enableRtl:this.enableRtl,showClearButton:this.showClearButton,enabled:this.enabled}},this.createElement);this.inputWrapper=t,this.container=t.container,this.container.setAttribute("class","e-control-wrapper e-numeric "+this.container.getAttribute("class")),this.updateHTMLAttrToWrapper(),this.readonly&&ie(this.element,{"aria-readonly":"true"}),this.hiddenInput=this.createElement("input",{attrs:{type:"text",validateHidden:"true","aria-label":"hidden",class:"e-numeric-hidden"}}),this.inputName=null!==this.inputName?this.inputName:this.element.id,this.element.removeAttribute("name"),this.isAngular&&"EJS-NUMERICTEXTBOX"===this.angularTagName&&this.cloneElement.id.length>0?ie(this.hiddenInput,{name:this.cloneElement.id}):ie(this.hiddenInput,{name:this.inputName}),this.container.insertBefore(this.hiddenInput,this.container.childNodes[1]),this.updateDataAttribute(!1),null!==this.inputStyle&&ie(this.container,{style:this.inputStyle})},t.prototype.updateDataAttribute=function(e){var t={};if(e)t=this.htmlAttributes;else for(var i=0;i<this.element.attributes.length;i++)t[this.element.attributes[i].name]=this.element.getAttribute(this.element.attributes[i].name);for(var n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];0===r.indexOf("data")&&this.hiddenInput.setAttribute(r,t[""+r])}},t.prototype.updateHTMLAttrToElement=function(){if(!g(this.htmlAttributes))for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var i=t[e];rh.indexOf(i)<0&&this.element.setAttribute(i,this.htmlAttributes[""+i])}},t.prototype.updateCssClass=function(e,t){Il.setCssClass(this.getNumericValidClassList(e),[this.container],this.getNumericValidClassList(t))},t.prototype.getNumericValidClassList=function(e){var t=e;return g(e)||""===e||(t=e.replace(/\s+/g," ").trim()),t},t.prototype.updateHTMLAttrToWrapper=function(){if(!g(this.htmlAttributes))for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var i=t[e];if(rh.indexOf(i)>-1)if("class"===i){var n=this.getNumericValidClassList(this.htmlAttributes[""+i]);""!==n&&G([this.container],n.split(" "))}else if("style"===i){var o=this.container.getAttribute(i);o=g(o)?this.htmlAttributes[""+i]:o+this.htmlAttributes[""+i],this.container.setAttribute(i,o)}else this.container.setAttribute(i,this.htmlAttributes[""+i])}},t.prototype.setElementWidth=function(e){g(e)||("number"==typeof e?this.container.style.width=N(e):"string"==typeof e&&(this.container.style.width=e.match(/px|%|em/)?e:N(e)))},t.prototype.spinBtnCreation=function(){this.spinDown=Il.appendSpan(Jc+" e-spin-down",this.container,this.createElement),ie(this.spinDown,{title:this.l10n.getConstant("decrementTitle")}),this.spinUp=Il.appendSpan(Jc+" "+$c,this.container,this.createElement),ie(this.spinUp,{title:this.l10n.getConstant("incrementTitle")}),this.wireSpinBtnEvents()},t.prototype.validateMinMax=function(){("number"!=typeof this.min||isNaN(this.min))&&this.setProperties({min:-Number.MAX_VALUE},!0),("number"!=typeof this.max||isNaN(this.max))&&this.setProperties({max:Number.MAX_VALUE},!0),null!==this.decimals&&(this.min!==-Number.MAX_VALUE&&this.setProperties({min:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.min))},!0),this.max!==Number.MAX_VALUE&&this.setProperties({max:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.max))},!0)),this.setProperties({min:this.min>this.max?this.max:this.min},!0),this.min!==-Number.MAX_VALUE&&ie(this.element,{"aria-valuemin":this.min.toString()}),this.max!==Number.MAX_VALUE&&ie(this.element,{"aria-valuemax":this.max.toString()})},t.prototype.formattedValue=function(e,t){return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(t)},t.prototype.validateStep=function(){null!==this.decimals&&this.setProperties({step:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.step))},!0)},t.prototype.action=function(e,t){this.isInteract=!0;var i=this.isFocused?this.instance.getNumberParser({format:"n"})(this.element.value):this.value;this.changeValue(this.performAction(i,this.step,e)),this.raiseChangeEvent(t)},t.prototype.checkErrorClass=function(){this.isValidState?X([this.container],eh):G([this.container],eh),ie(this.element,{"aria-invalid":this.isValidState?"false":"true"})},t.prototype.bindClearEvent=function(){this.showClearButton&&q.add(this.inputWrapper.clearButton,"mousedown touchstart",this.resetHandler,this)},t.prototype.resetHandler=function(e){e.preventDefault(),this.inputWrapper.clearButton.classList.contains("e-clear-icon-hide")&&!this.inputWrapper.container.classList.contains("e-static-clear")||this.clear(e),this.isInteract=!0,this.raiseChangeEvent(e)},t.prototype.clear=function(e){if(this.setProperties({value:null},!0),this.setElementValue(""),this.hiddenInput.value="",se(this.element,"form")){var t=this.element.nextElementSibling,i=document.createEvent("KeyboardEvent");i.initEvent("keyup",!1,!0),t.dispatchEvent(i)}},t.prototype.resetFormHandler=function(){"EJS-NUMERICTEXTBOX"===this.element.tagName?this.updateValue(null):this.updateValue(this.inputEleValue)},t.prototype.setSpinButton=function(){g(this.spinDown)||ie(this.spinDown,{title:this.l10n.getConstant("decrementTitle"),"aria-label":this.l10n.getConstant("decrementTitle")}),g(this.spinUp)||ie(this.spinUp,{title:this.l10n.getConstant("incrementTitle"),"aria-label":this.l10n.getConstant("incrementTitle")})},t.prototype.wireEvents=function(){q.add(this.element,"focus",this.focusHandler,this),q.add(this.element,"blur",this.focusOutHandler,this),q.add(this.element,"keydown",this.keyDownHandler,this),q.add(this.element,"keyup",this.keyUpHandler,this),q.add(this.element,"input",this.inputHandler,this),q.add(this.element,"keypress",this.keyPressHandler,this),q.add(this.element,"change",this.changeHandler,this),q.add(this.element,"paste",this.pasteHandler,this),this.enabled&&(this.bindClearEvent(),this.formEle&&q.add(this.formEle,"reset",this.resetFormHandler,this))},t.prototype.wireSpinBtnEvents=function(){q.add(this.spinUp,Q.touchStartEvent,this.mouseDownOnSpinner,this),q.add(this.spinDown,Q.touchStartEvent,this.mouseDownOnSpinner,this),q.add(this.spinUp,Q.touchEndEvent,this.mouseUpOnSpinner,this),q.add(this.spinDown,Q.touchEndEvent,this.mouseUpOnSpinner,this),q.add(this.spinUp,Q.touchMoveEvent,this.touchMoveOnSpinner,this),q.add(this.spinDown,Q.touchMoveEvent,this.touchMoveOnSpinner,this)},t.prototype.unwireEvents=function(){q.remove(this.element,"focus",this.focusHandler),q.remove(this.element,"blur",this.focusOutHandler),q.remove(this.element,"keyup",this.keyUpHandler),q.remove(this.element,"input",this.inputHandler),q.remove(this.element,"keydown",this.keyDownHandler),q.remove(this.element,"keypress",this.keyPressHandler),q.remove(this.element,"change",this.changeHandler),q.remove(this.element,"paste",this.pasteHandler),this.formEle&&q.remove(this.formEle,"reset",this.resetFormHandler)},t.prototype.unwireSpinBtnEvents=function(){q.remove(this.spinUp,Q.touchStartEvent,this.mouseDownOnSpinner),q.remove(this.spinDown,Q.touchStartEvent,this.mouseDownOnSpinner),q.remove(this.spinUp,Q.touchEndEvent,this.mouseUpOnSpinner),q.remove(this.spinDown,Q.touchEndEvent,this.mouseUpOnSpinner),q.remove(this.spinUp,Q.touchMoveEvent,this.touchMoveOnSpinner),q.remove(this.spinDown,Q.touchMoveEvent,this.touchMoveOnSpinner)},t.prototype.changeHandler=function(e){e.stopPropagation(),this.element.value.length||this.setProperties({value:null},!0);var t=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(t,e)},t.prototype.raiseChangeEvent=function(e){if(this.inputValue=g(this.inputValue)||isNaN(this.inputValue)?null:this.inputValue,this.prevValue!==this.value||this.prevValue!==this.inputValue){var t={};this.changeEventArgs={value:this.value,previousValue:this.prevValue,isInteracted:this.isInteract,isInteraction:this.isInteract,event:e},e&&(this.changeEventArgs.event=e),void 0===this.changeEventArgs.event&&(this.changeEventArgs.isInteracted=!1,this.changeEventArgs.isInteraction=!1),u(t,this.changeEventArgs),this.prevValue=this.value,this.isInteract=!1,this.elementPrevValue=this.element.value,this.preventChange=!1,this.trigger("change",t)}},t.prototype.pasteHandler=function(){var e=this;if(this.enabled&&!this.readonly){var t=this.element.value;setTimeout((function(){e.numericRegex().test(e.element.value)||e.setElementValue(t)}))}},t.prototype.preventHandler=function(){var e=this,t=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);setTimeout((function(){if(e.element.selectionStart>0){var i=e.element.selectionStart,n=e.element.selectionStart-1,o=e.element.value.split(""),r=a("decimal",ut(e.locale)),s=r.charCodeAt(0);" "===e.element.value[n]&&e.element.selectionStart>0&&!t?(g(e.prevVal)?e.element.value=e.element.value.trim():0!==n?e.element.value=e.prevVal:0===n&&(e.element.value=e.element.value.trim()),e.element.setSelectionRange(n,n)):isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&45!==e.element.value[e.element.selectionStart-1].charCodeAt(0)?(o.indexOf(e.element.value[e.element.selectionStart-1])!==o.lastIndexOf(e.element.value[e.element.selectionStart-1])&&e.element.value[e.element.selectionStart-1].charCodeAt(0)===s||e.element.value[e.element.selectionStart-1].charCodeAt(0)!==s)&&(e.element.value=e.element.value.substring(0,n)+e.element.value.substring(i,e.element.value.length),e.element.setSelectionRange(n,n),isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&e.element.selectionStart>0&&e.element.value.length&&e.preventHandler()):isNaN(parseFloat(e.element.value[e.element.selectionStart-2]))&&e.element.selectionStart>1&&45!==e.element.value[e.element.selectionStart-2].charCodeAt(0)&&(o.indexOf(e.element.value[e.element.selectionStart-2])!==o.lastIndexOf(e.element.value[e.element.selectionStart-2])&&e.element.value[e.element.selectionStart-2].charCodeAt(0)===s||e.element.value[e.element.selectionStart-2].charCodeAt(0)!==s)&&(e.element.setSelectionRange(n,n),e.nextEle=e.element.value[e.element.selectionStart],e.cursorPosChanged=!0,e.preventHandler()),!0===e.cursorPosChanged&&e.element.value[e.element.selectionStart]===e.nextEle&&isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&(e.element.setSelectionRange(e.element.selectionStart+1,e.element.selectionStart+1),e.cursorPosChanged=!1,e.nextEle=null),""===e.element.value.trim()&&e.element.setSelectionRange(0,0),e.element.selectionStart>0&&(45===e.element.value[e.element.selectionStart-1].charCodeAt(0)&&e.element.selectionStart>1&&(g(e.prevVal)||(e.element.value=e.prevVal),e.element.setSelectionRange(e.element.selectionStart,e.element.selectionStart)),e.element.value[e.element.selectionStart-1]===r&&0===e.decimals&&e.validateDecimalOnType&&(e.element.value=e.element.value.substring(0,n)+e.element.value.substring(i,e.element.value.length))),e.prevVal=e.element.value}}))},t.prototype.keyUpHandler=function(){if(this.enabled&&!this.readonly){!(!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))&&Q.isDevice&&this.preventHandler();var e=this.instance.getNumberParser({format:"n"})(this.element.value);if(e=null===e||isNaN(e)?null:e,this.hiddenInput.value=e||0===e?e.toString():null,se(this.element,"form")){var t=this.element.nextElementSibling,i=document.createEvent("KeyboardEvent");i.initEvent("keyup",!1,!0),t.dispatchEvent(i)}}},t.prototype.inputHandler=function(e){if(this.enabled&&!this.readonly){var t=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);if((navigator.userAgent.toLowerCase().indexOf("firefox")>-1||t)&&Q.isDevice&&this.preventHandler(),this.isAngular&&this.element.value!==a("decimal",ut(this.locale))&&this.element.value!==a("minusSign",ut(this.locale))){var i=this.instance.getNumberParser({format:"n"})(this.element.value);i=isNaN(i)?null:i,this.localChange({value:i}),this.preventChange=!0}if(this.isVue){var n=this.instance.getNumberParser({format:"n"})(this.element.value),o=this.instance.getNumberParser({format:"n"})(this.elementPrevValue);(new RegExp("[^0-9]+$").test(this.element.value)||(-1!==this.elementPrevValue.indexOf(".")||-1!==this.elementPrevValue.indexOf("-"))&&"0"===this.element.value[this.element.value.length-1])&&(n=this.value);var r={event:e,value:null===n||isNaN(n)?null:n,previousValue:null===o||isNaN(o)?null:o};this.preventChange=!0,this.elementPrevValue=this.element.value,this.trigger("input",r)}}},t.prototype.keyDownHandler=function(e){if(!this.readonly)switch(e.keyCode){case 38:e.preventDefault(),this.action(th,e);break;case 40:e.preventDefault(),this.action(ih,e)}},t.prototype.performAction=function(e,t,i){(null===e||isNaN(e))&&(e=0);var n=i===th?e+t:e-t;return n=this.correctRounding(e,t,n),this.strictMode?this.trimValue(n):n},t.prototype.correctRounding=function(e,t,i){var n=new RegExp("[,.](.*)"),o=n.test(e.toString()),r=n.test(t.toString());if(o||r){var s=o?n.exec(e.toString())[0].length:0,a=r?n.exec(t.toString())[0].length:0,l=Math.max(s,a);return this.roundValue(i,l)}return i},t.prototype.roundValue=function(e,t){t=t||0;var i=Math.pow(10,t);return e*=i,Math.round(e)/i},t.prototype.updateValue=function(e,t){t&&(this.isInteract=!0),null===e||isNaN(e)||this.decimals&&(e=this.roundNumber(e,this.decimals)),this.inputValue=e,this.changeValue(null===e||isNaN(e)?null:this.strictMode?this.trimValue(e):e),this.isDynamicChange||this.raiseChangeEvent(t)},t.prototype.updateCurrency=function(e,t){l(e,t,this.cultureInfo),this.updateValue(this.value)},t.prototype.changeValue=function(e){if(e||0===e){var t=this.getNumberOfDecimals(e);this.setProperties({value:this.roundNumber(e,t)},!0)}else e=null,this.setProperties({value:e},!0);this.modifyText(),this.strictMode||this.validateState()},t.prototype.modifyText=function(){if(this.value||0===this.value){var e=this.formatNumber(),t=this.isFocused?e:this.instance.getNumberFormat(this.cultureInfo)(this.value);this.setElementValue(t),ie(this.element,{"aria-valuenow":e}),g(this.hiddenInput)||(this.hiddenInput.value=this.value.toString(),null!==this.value&&this.serverDecimalSeparator&&(this.hiddenInput.value=this.hiddenInput.value.replace(".",this.serverDecimalSeparator)))}else this.setElementValue(""),this.element.removeAttribute("aria-valuenow"),this.hiddenInput.value=null},t.prototype.setElementValue=function(e,t){Il.setValue(e,t||this.element,this.floatLabelType,this.showClearButton)},t.prototype.validateState=function(){this.isValidState=!0,(this.value||0===this.value)&&(this.isValidState=!(this.value>this.max||this.value<this.min)),this.checkErrorClass()},t.prototype.getNumberOfDecimals=function(e){var t,i=new RegExp("[eE][-+]?([0-9]+)"),n=e.toString();if(i.test(n)){var o=i.exec(n);g(o)||(n=e.toFixed(Math.min(parseInt(o[1],10),20)))}var r=n.split(".")[1];return t=r&&r.length?r.length:0,null!==this.decimals&&(t=t<this.decimals?t:this.decimals),t},t.prototype.formatNumber=function(){var e=this.getNumberOfDecimals(this.value);return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(this.value)},t.prototype.trimValue=function(e){return e>this.max?this.max:e<this.min?this.min:e},t.prototype.roundNumber=function(e,t){var i=e,n=t||0,o=i.toString().split("e"),r=(i=Math.round(Number(o[0]+"e"+(o[1]?Number(o[1])+n:n)))).toString().split("e");return i=Number(r[0]+"e"+(r[1]?Number(r[1])-n:-n)),Number(i.toFixed(n))},t.prototype.cancelEvent=function(e){return e.preventDefault(),!1},t.prototype.keyPressHandler=function(e){if(!this.enabled||this.readonly)return!0;if(!Q.isDevice&&"11.0"===Q.info.version&&13===e.keyCode){var t=this.instance.getNumberParser({format:"n"})(this.element.value);return this.updateValue(t,e),!0}if(0===e.which||e.metaKey||e.ctrlKey||8===e.keyCode||13===e.keyCode)return!0;var i=String.fromCharCode(e.which),n=a("decimal",ut(this.locale)),o="NumpadDecimal"===e.code&&i!==n;o&&(i=n);var r=this.element.value;if(r=r.substring(0,this.element.selectionStart)+i+r.substring(this.element.selectionEnd),this.numericRegex().test(r)){if(o){var s=this.element.selectionStart+1;this.element.value=r,this.element.setSelectionRange(s,s),e.preventDefault(),e.stopPropagation()}return!0}return e.preventDefault(),e.stopPropagation(),!1},t.prototype.numericRegex=function(){var e=a("decimal",ut(this.locale)),t="*";return"."===e&&(e="\\"+e),0===this.decimals&&this.validateDecimalOnType?nh:(this.decimals&&this.validateDecimalOnType&&(t="{0,"+this.decimals+"}"),new RegExp("^\\s*(-)?(((\\d+("+e+"\\d"+t+")?)|("+e+"\\d"+t+")))?$"))},t.prototype.mouseWheel=function(e){var t;e.preventDefault();var i=e;i.wheelDelta?t=i.wheelDelta/120:i.detail&&(t=-i.detail/3),t>0?this.action(th,e):t<0&&this.action(ih,e),this.cancelEvent(e)},t.prototype.focusHandler=function(e){var t=this;if(clearTimeout(sh),this.focusEventArgs={event:e,value:this.value,container:this.container},this.trigger("focus",this.focusEventArgs),this.enabled&&!this.readonly){if(this.isFocused=!0,this.prevValue=this.value,this.value||0===this.value){var i=this.formatNumber();if(this.setElementValue(i),!this.isPrevFocused)if(Q.isDevice||"11.0"!==Q.info.version){var n=Q.isDevice&&Q.isIos?600:0;sh=setTimeout((function(){t.element.setSelectionRange(0,i.length)}),n)}else this.element.setSelectionRange(0,i.length)}Q.isDevice||q.add(this.element,"mousewheel DOMMouseScroll",this.mouseWheel,this)}},t.prototype.focusOutHandler=function(e){var t=this;if(this.blurEventArgs={event:e,value:this.value,container:this.container},this.trigger("blur",this.blurEventArgs),this.enabled&&!this.readonly){if(this.isPrevFocused){if(e.preventDefault(),Q.isDevice){var i=this.element.value;this.element.focus(),this.isPrevFocused=!1;var n=this.element;setTimeout((function(){t.setElementValue(i,n)}),200)}}else{this.isFocused=!1,this.element.value.length||this.setProperties({value:null},!0);var o=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(o),Q.isDevice||q.remove(this.element,"mousewheel DOMMouseScroll",this.mouseWheel)}if(se(this.element,"form")){var r=this.element.nextElementSibling,s=document.createEvent("FocusEvent");s.initEvent("focusout",!1,!0),r.dispatchEvent(s)}}},t.prototype.mouseDownOnSpinner=function(e){var t=this;if(this.isFocused&&(this.isPrevFocused=!0,e.preventDefault()),this.getElementData(e)){this.getElementData(e);var i=e.currentTarget,n=i.classList.contains($c)?th:ih;q.add(i,"mouseleave",this.mouseUpClick,this),this.timeOut=setInterval((function(){t.isCalled=!0,t.action(n,e)}),150),q.add(document,"mouseup",this.mouseUpClick,this)}},t.prototype.touchMoveOnSpinner=function(e){var t;if("touchmove"===e.type){var i=e.touches;t=i.length&&document.elementFromPoint(i[0].pageX,i[0].pageY)}else t=document.elementFromPoint(e.clientX,e.clientY);t.classList.contains(Jc)||clearInterval(this.timeOut)},t.prototype.mouseUpOnSpinner=function(e){if(this.prevValue=this.value,this.isPrevFocused&&(this.element.focus(),Q.isDevice||(this.isPrevFocused=!1)),Q.isDevice||e.preventDefault(),this.getElementData(e)){var t=e.currentTarget,i=t.classList.contains($c)?th:ih;if(q.remove(t,"mouseleave",this.mouseUpClick),this.isCalled||this.action(i,e),this.isCalled=!1,q.remove(document,"mouseup",this.mouseUpClick),se(this.element,"form")){var n=this.element.nextElementSibling,o=document.createEvent("KeyboardEvent");o.initEvent("keyup",!1,!0),n.dispatchEvent(o)}}},t.prototype.getElementData=function(e){return!(e.which&&3===e.which||e.button&&2===e.button||!this.enabled||this.readonly)&&(clearInterval(this.timeOut),!0)},t.prototype.floatLabelTypeUpdate=function(){Il.removeFloating(this.inputWrapper);var e=this.hiddenInput;this.hiddenInput.remove(),Il.addFloating(this.element,this.floatLabelType,this.placeholder,this.createElement),this.container.insertBefore(e,this.container.childNodes[1])},t.prototype.mouseUpClick=function(e){e.stopPropagation(),clearInterval(this.timeOut),this.isCalled=!1,this.spinUp&&q.remove(this.spinUp,"mouseleave",this.mouseUpClick),this.spinDown&&q.remove(this.spinDown,"mouseleave",this.mouseUpClick)},t.prototype.increment=function(e){void 0===e&&(e=this.step),this.isInteract=!1,this.changeValue(this.performAction(this.value,e,th)),this.raiseChangeEvent()},t.prototype.decrement=function(e){void 0===e&&(e=this.step),this.isInteract=!1,this.changeValue(this.performAction(this.value,e,ih)),this.raiseChangeEvent()},t.prototype.destroy=function(){this.unwireEvents(),this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]),ee(this.hiddenInput),this.showSpinButton&&(this.unwireSpinBtnEvents(),ee(this.spinUp),ee(this.spinDown));for(var t=["aria-labelledby","role","autocomplete","aria-readonly","aria-disabled","autocapitalize","spellcheck","aria-autocomplete","tabindex","aria-valuemin","aria-valuemax","aria-valuenow","aria-invalid"],i=0;i<t.length;i++)this.element.removeAttribute(t[i]);this.element.classList.remove("e-input"),this.container.insertAdjacentElement("afterend",this.element),ee(this.container),this.spinUp=null,this.spinDown=null,this.container=null,this.hiddenInput=null,this.changeEventArgs=null,this.blurEventArgs=null,this.focusEventArgs=null,this.inputWrapper=null,Il.destroy({element:this.element,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),e.prototype.destroy.call(this)},t.prototype.getText=function(){return this.element.value},t.prototype.focusIn=function(){document.activeElement!==this.element&&this.enabled&&(this.element.focus(),G([this.container],[oh]))},t.prototype.focusOut=function(){document.activeElement===this.element&&this.enabled&&(this.element.blur(),X([this.container],[oh]))},t.prototype.getPersistData=function(){return this.addOnPersist(["value"])},t.prototype.onPropertyChanged=function(e,t){for(var i=0,n=Object.keys(e);i<n.length;i++){var o=n[i];switch(o){case"width":this.setElementWidth(e.width),Il.calculateWidth(this.element,this.container);break;case"cssClass":this.updateCssClass(e.cssClass,t.cssClass);break;case"enabled":Il.setEnabled(e.enabled,this.element),this.bindClearEvent();break;case"enableRtl":Il.setEnableRtl(e.enableRtl,[this.container]);break;case"readonly":Il.setReadonly(e.readonly,this.element),this.readonly?ie(this.element,{"aria-readonly":"true"}):this.element.removeAttribute("aria-readonly");break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.updateDataAttribute(!0),this.checkAttributes(!0),Il.validateInputType(this.container,this.element);break;case"placeholder":Il.setPlaceholder(e.placeholder,this.element),Il.calculateWidth(this.element,this.container);break;case"step":this.step=e.step,this.validateStep();break;case"showSpinButton":this.updateSpinButton(e);break;case"showClearButton":this.updateClearButton(e);break;case"floatLabelType":this.floatLabelType=e.floatLabelType,this.floatLabelTypeUpdate();break;case"value":this.isDynamicChange=(this.isAngular||this.isVue)&&this.preventChange,this.updateValue(e.value),this.isDynamicChange&&(this.preventChange=!1,this.isDynamicChange=!1);break;case"min":case"max":l(o,a(o,e),this),this.validateMinMax(),this.updateValue(this.value);break;case"strictMode":this.strictMode=e.strictMode,this.updateValue(this.value),this.validateState();break;case"locale":this.initCultureFunc(),this.l10n.setLocale(this.locale),this.setSpinButton(),this.updatePlaceholder(),Il.setPlaceholder(this.placeholder,this.element),this.updateValue(this.value);break;case"currency":var r=a(o,e);this.setProperties({currencyCode:r},!0),this.updateCurrency(o,r);break;case"currencyCode":var s=a(o,e);this.setProperties({currency:s},!0),this.updateCurrency("currency",s);break;case"format":l(o,a(o,e),this),this.initCultureInfo(),this.updateValue(this.value);break;case"decimals":this.decimals=e.decimals,this.updateValue(this.value)}}},t.prototype.updateClearButton=function(e){Il.setClearButton(e.showClearButton,this.element,this.inputWrapper,void 0,this.createElement),this.bindClearEvent()},t.prototype.updateSpinButton=function(e){e.showSpinButton?this.spinBtnCreation():(ee(this.spinUp),ee(this.spinDown))},t.prototype.getModuleName=function(){return"numerictextbox"},Zc([De("")],t.prototype,"cssClass",void 0),Zc([De(null)],t.prototype,"value",void 0),Zc([De(-Number.MAX_VALUE)],t.prototype,"min",void 0),Zc([De(Number.MAX_VALUE)],t.prototype,"max",void 0),Zc([De(1)],t.prototype,"step",void 0),Zc([De(null)],t.prototype,"width",void 0),Zc([De(null)],t.prototype,"placeholder",void 0),Zc([De({})],t.prototype,"htmlAttributes",void 0),Zc([De(!0)],t.prototype,"showSpinButton",void 0),Zc([De(!1)],t.prototype,"readonly",void 0),Zc([De(!0)],t.prototype,"enabled",void 0),Zc([De(!1)],t.prototype,"showClearButton",void 0),Zc([De(!1)],t.prototype,"enablePersistence",void 0),Zc([De("n2")],t.prototype,"format",void 0),Zc([De(null)],t.prototype,"decimals",void 0),Zc([De(null)],t.prototype,"currency",void 0),Zc([De(null)],t.prototype,"currencyCode",void 0),Zc([De(!0)],t.prototype,"strictMode",void 0),Zc([De(!1)],t.prototype,"validateDecimalOnType",void 0),Zc([De("Never")],t.prototype,"floatLabelType",void 0),Zc([Se()],t.prototype,"created",void 0),Zc([Se()],t.prototype,"destroyed",void 0),Zc([Se()],t.prototype,"change",void 0),Zc([Se()],t.prototype,"focus",void 0),Zc([Se()],t.prototype,"blur",void 0),t=Zc([Ie],t)}(St),lh=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ch=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},hh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lh(t,e),ch([De("None")],t.prototype,"placement",void 0),ch([De(10)],t.prototype,"largeStep",void 0),ch([De(1)],t.prototype,"smallStep",void 0),ch([De(!1)],t.prototype,"showSmallTicks",void 0),ch([De(null)],t.prototype,"format",void 0),t}(Qe),dh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lh(t,e),ch([De(null)],t.prototype,"color",void 0),ch([De(null)],t.prototype,"start",void 0),ch([De(null)],t.prototype,"end",void 0),t}(Qe),ph=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lh(t,e),ch([De(!1)],t.prototype,"enabled",void 0),ch([De(null)],t.prototype,"minStart",void 0),ch([De(null)],t.prototype,"minEnd",void 0),ch([De(null)],t.prototype,"maxStart",void 0),ch([De(null)],t.prototype,"maxEnd",void 0),ch([De(!1)],t.prototype,"startHandleFixed",void 0),ch([De(!1)],t.prototype,"endHandleFixed",void 0),t}(Qe),uh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lh(t,e),ch([De("")],t.prototype,"cssClass",void 0),ch([De("Before")],t.prototype,"placement",void 0),ch([De("Focus")],t.prototype,"showOn",void 0),ch([De(!1)],t.prototype,"isVisible",void 0),ch([De(null)],t.prototype,"format",void 0),t}(Qe),mh="e-slider",gh="e-rtl",fh="e-slider-input",yh="e-control-wrapper",vh="e-handle",bh="e-range",Mh="e-slider-button",Nh="e-first-button",Ch="e-second-button",Eh="e-scale",Dh="e-tick",Th="e-large",Lh="e-tick-value",Sh="e-slider-tooltip",Ih="e-slider-hover",wh="e-handle-first",xh="e-handle-second",jh="e-disabled",Oh="e-slider-container",zh="e-slider-horizontal-before",Ah="e-slider-horizontal-after",kh="e-slider-vertical-before",Ph="e-slider-vertical-after",Rh="e-material-tooltip-open",Bh="e-tooltip-active",Hh="e-material-slider",Uh="e-slider-track",Fh="e-slider-horizantal-color",Yh="e-slider-vertical-color",Vh="e-handle-focused",Qh="e-vertical",qh="e-horizontal",Wh="e-handle-start",_h="e-material-tooltip-start",Gh="e-tab-handle",Xh="e-button-icon",Kh="e-small-size",Zh="e-tick-pos",Jh="e-first-tick",$h="e-last-tick",ed="e-slider-btn",td="e-tab-track",id="e-tab-range",nd="e-handle-active",od="e-material-handle",rd="e-material-range",sd="e-material-default",ad="e-material-tooltip-show",ld="e-material-tooltip-hide",cd="e-read-only",hd="e-limits",dd="e-limit-bar",pd="e-limit-first",ud="e-limit-second",md="e-drag-horizontal",gd="e-drag-vertical",fd=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.horDir="left",n.verDir="bottom",n.transition={handle:"left .4s cubic-bezier(.25, .8, .25, 1), right .4s cubic-bezier(.25, .8, .25, 1), top .4s cubic-bezier(.25, .8, .25, 1) , bottom .4s cubic-bezier(.25, .8, .25, 1)",rangeBar:"all .4s cubic-bezier(.25, .8, .25, 1)"},n.transitionOnMaterialTooltip={handle:"left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out, top 1ms ease-out",rangeBar:"left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out, width 1ms ease-out, height 1ms ease-out"},n.scaleTransform="transform .4s cubic-bezier(.25, .8, .25, 1)",n.customAriaText=null,n.drag=!0,n.isDragComplete=!1,n.initialTooltip=!0,n}return lh(t,e),t.prototype.preRender=function(){this.l10n=new Ut("slider",{incrementTitle:"Increase",decrementTitle:"Decrease"},this.locale),this.isElementFocused=!1,this.tickElementCollection=[],this.tooltipFormatInfo={},this.ticksFormatInfo={},this.initCultureInfo(),this.initCultureFunc(),this.formChecker()},t.prototype.formChecker=function(){var e=se(this.element,"form");e?(this.isForm=!0,g(this.formResetValue)||this.setProperties({value:this.formResetValue},!0),this.formResetValue=this.value,"Range"!==this.type||!g(this.formResetValue)&&"object"==typeof this.formResetValue?g(this.formResetValue)&&(this.formResetValue=parseFloat(N(this.min))):this.formResetValue=[parseFloat(N(this.min)),parseFloat(N(this.max))],this.formElement=e):this.isForm=!1},t.prototype.initCultureFunc=function(){this.internationalization=new pt(this.locale)},t.prototype.initCultureInfo=function(){this.tooltipFormatInfo.format=g(this.tooltip.format)?null:this.tooltip.format,this.ticksFormatInfo.format=g(this.ticks.format)?null:this.ticks.format},t.prototype.formatString=function(e,t){var i=null,n=null;if(e||0===e){i=this.formatNumber(e);var o=this.numberOfDecimals(e);n=this.internationalization.getNumberFormat(t)(this.makeRoundNumber(e,o))}return{elementVal:i,formatString:n}},t.prototype.formatNumber=function(e){var t=this.numberOfDecimals(e);return this.internationalization.getNumberFormat({maximumFractionDigits:t,minimumFractionDigits:t,useGrouping:!1})(e)},t.prototype.numberOfDecimals=function(e){var t=e.toString().split(".")[1];return t&&t.length?t.length:0},t.prototype.makeRoundNumber=function(e,t){var i=t||0;return Number(e.toFixed(i))},t.prototype.fractionalToInteger=function(e){e=0===this.numberOfDecimals(e)?Number(e).toFixed(this.noOfDecimals):e;for(var t=1,i=0;i<this.noOfDecimals;i++)t*=10;return e=Number((e*t).toFixed(0))},t.prototype.render=function(){var e=this;this.initialize(),this.initRender(),this.wireEvents(),this.setZindex(),this.renderComplete(),"EJS-SLIDER"===this.element.tagName&&"none"===this.getTheme(this.sliderContainer)&&setTimeout((function(){e.refresh()}),0)},t.prototype.initialize=function(){G([this.element],mh),this.setCSSClass()},t.prototype.setElementWidth=function(e){g(e)||g(this.sliderContainer)||("number"==typeof e?this.sliderContainer.style.width=N(e):"string"==typeof e&&(this.sliderContainer.style.width=e.match(/px|%|em/)?e:N(e)))},t.prototype.setCSSClass=function(e){e&&X([this.element],e.split(" ")),this.cssClass&&G([this.element],this.cssClass.split(" "))},t.prototype.setEnabled=function(){this.enabled?(X([this.sliderContainer],[jh]),this.tooltip.isVisible&&this.tooltipElement&&"Always"===this.tooltip.showOn&&this.tooltipElement.classList.remove(jh),this.wireEvents()):(G([this.sliderContainer],[jh]),this.tooltip.isVisible&&this.tooltipElement&&"Always"===this.tooltip.showOn&&this.tooltipElement.classList.add(jh),this.unwireEvents())},t.prototype.getTheme=function(e){return window.getComputedStyle(e,":after").getPropertyValue("content").replace(/['"]+/g,"")},t.prototype.initRender=function(){this.sliderContainer=this.createElement("div",{className:Oh+" "+yh}),this.element.parentNode.insertBefore(this.sliderContainer,this.element),this.sliderContainer.appendChild(this.element),this.sliderTrack=this.createElement("div",{className:Uh}),this.element.appendChild(this.sliderTrack),this.setElementWidth(this.width),this.element.tabIndex=-1,this.getThemeInitialization(),this.setHandler(),this.createRangeBar(),this.limits.enabled&&this.createLimitBar(),this.setOrientClass(),this.hiddenInput=this.createElement("input",{attrs:{type:"hidden",value:g(this.value)?g(this.min)?"0":this.min.toString():this.value.toString(),name:this.element.getAttribute("name")||this.element.getAttribute("id")||"_"+(1e3*Math.random()).toFixed(0)+"slider",class:fh}}),this.hiddenInput.tabIndex=-1,this.sliderContainer.appendChild(this.hiddenInput),this.showButtons&&this.setButtons(),this.setEnableRTL(),"Range"===this.type?this.rangeValueUpdate():this.value=g(this.value)?g(this.min)?0:parseFloat(N(this.min.toString())):this.value,this.previousVal="Range"!==this.type?this.checkHandleValue(parseFloat(N(this.value.toString()))):[this.checkHandleValue(parseFloat(N(this.value[0].toString()))),this.checkHandleValue(parseFloat(N(this.value[1].toString())))],this.previousChanged=this.previousVal,g(this.element.hasAttribute("name"))||this.element.removeAttribute("name"),this.setValue(),this.limits.enabled&&this.setLimitBar(),"None"!==this.ticks.placement&&this.renderScale(),this.tooltip.isVisible&&this.renderTooltip(),this.enabled?X([this.sliderContainer],[jh]):G([this.sliderContainer],[jh]),this.readonly?G([this.sliderContainer],[cd]):X([this.sliderContainer],[cd])},t.prototype.getThemeInitialization=function(){this.isMaterial="material"===this.getTheme(this.sliderContainer)||"material-dark"===this.getTheme(this.sliderContainer),this.isMaterial3="Material3"===this.getTheme(this.sliderContainer)||"Material3-dark"===this.getTheme(this.sliderContainer),this.isBootstrap="bootstrap"===this.getTheme(this.sliderContainer)||"bootstrap-dark"===this.getTheme(this.sliderContainer),this.isBootstrap4="bootstrap4"===this.getTheme(this.sliderContainer),this.isTailwind="tailwind"===this.getTheme(this.sliderContainer)||"tailwind-dark"===this.getTheme(this.sliderContainer),this.isTailwind3="tailwind3"===this.getTheme(this.sliderContainer)||"tailwind3-dark"===this.getTheme(this.sliderContainer),this.isBootstrap5="bootstrap5"===this.getTheme(this.sliderContainer),this.isFluent="FluentUI"===this.getTheme(this.sliderContainer),this.isFluent2="fluent2"===this.getTheme(this.sliderContainer),this.isBootstrap5Dot3="bootstrap5.3"===this.getTheme(this.sliderContainer),this.isMaterialTooltip=(this.isMaterial||this.isMaterial3)&&"Range"!==this.type&&this.tooltip.isVisible},t.prototype.createRangeBar=function(){"Default"!==this.type&&(this.rangeBar=this.createElement("div",{attrs:{class:bh}}),this.element.appendChild(this.rangeBar),this.drag&&"Range"===this.type&&("Horizontal"===this.orientation?this.rangeBar.classList.add(md):this.rangeBar.classList.add(gd)))},t.prototype.createLimitBar=function(){var e="Range"!==this.type?dd:pd;e+=" "+hd,this.limitBarFirst=this.createElement("div",{attrs:{class:e}}),this.element.appendChild(this.limitBarFirst),"Range"===this.type&&(this.limitBarSecond=this.createElement("div",{attrs:{class:ud+" "+hd}}),this.element.appendChild(this.limitBarSecond))},t.prototype.setOrientClass=function(){"Vertical"!==this.orientation?(this.sliderContainer.classList.remove(Qh),this.sliderContainer.classList.add(qh),this.firstHandle.setAttribute("aria-orientation","horizontal"),"Range"===this.type&&this.secondHandle.setAttribute("aria-orientation","horizontal")):(this.sliderContainer.classList.remove(qh),this.sliderContainer.classList.add(Qh),this.firstHandle.setAttribute("aria-orientation","vertical"),"Range"===this.type&&this.secondHandle.setAttribute("aria-orientation","vertical"))},t.prototype.setAriaAttributes=function(e){var t=this,i=this.min,n=this.max;(!g(this.customValues)&&this.customValues.length>0&&(i=this.customValues[0],n=this.customValues[this.customValues.length-1]),"Range"!==this.type)?ie(e,{"aria-valuemin":g(i)?"0":i.toString(),"aria-valuemax":g(n)?"100":n.toString()}):(!g(this.customValues)&&this.customValues.length>0?[[i.toString(),this.customValues[this.value[1]].toString()],[this.customValues[this.value[0]].toString(),n.toString()]]:[[i.toString(),this.value[1].toString()],[this.value[0].toString(),n.toString()]]).forEach((function(e,i){var n=0===i?t.firstHandle:t.secondHandle;n&&ie(n,{"aria-valuemin":e[0],"aria-valuemax":e[1]})}))},t.prototype.createSecondHandle=function(){this.secondHandle=this.createElement("div",{attrs:{class:vh,role:"slider",tabIndex:"0","aria-label":"slider"}}),this.secondHandle.classList.add(xh),this.element.appendChild(this.secondHandle)},t.prototype.createFirstHandle=function(){this.firstHandle=this.createElement("div",{attrs:{class:vh,role:"slider",tabIndex:"0","aria-label":"slider"}}),this.firstHandle.classList.add(wh),this.element.appendChild(this.firstHandle),this.isMaterialTooltip&&(this.materialHandle=this.createElement("div",{attrs:{class:vh+" "+od}}),this.element.appendChild(this.materialHandle))},t.prototype.wireFirstHandleEvt=function(e){e?(q.remove(this.firstHandle,"mousedown touchstart",this.handleFocus),q.remove(this.firstHandle,"transitionend",this.transitionEnd),q.remove(this.firstHandle,"mouseenter touchenter",this.handleOver),q.remove(this.firstHandle,"mouseleave touchend",this.handleLeave)):(q.add(this.firstHandle,"mousedown touchstart",this.handleFocus,this),q.add(this.firstHandle,"transitionend",this.transitionEnd,this),q.add(this.firstHandle,"mouseenter touchenter",this.handleOver,this),q.add(this.firstHandle,"mouseleave touchend",this.handleLeave,this))},t.prototype.wireSecondHandleEvt=function(e){e?(q.remove(this.secondHandle,"mousedown touchstart",this.handleFocus),q.remove(this.secondHandle,"transitionend",this.transitionEnd),q.remove(this.secondHandle,"mouseenter touchenter",this.handleOver),q.remove(this.secondHandle,"mouseleave touchend",this.handleLeave)):(q.add(this.secondHandle,"mousedown touchstart",this.handleFocus,this),q.add(this.secondHandle,"transitionend",this.transitionEnd,this),q.add(this.secondHandle,"mouseenter touchenter",this.handleOver,this),q.add(this.secondHandle,"mouseleave touchend",this.handleLeave,this))},t.prototype.handleStart=function(){"Range"!==this.type&&(this.firstHandle.classList[0===this.handlePos1?"add":"remove"](Wh),this.isMaterialTooltip&&(this.materialHandle.classList[0===this.handlePos1?"add":"remove"](Wh),this.tooltipElement&&this.tooltipElement.classList[0===this.handlePos1?"add":"remove"](_h)))},t.prototype.transitionEnd=function(e){"transform"!==e.propertyName&&(this.handleStart(),this.enableAnimation||(this.getHandle().style.transition="none"),"Default"!==this.type&&(this.rangeBar.style.transition="none"),(this.isMaterial||this.isMaterial3)&&this.tooltip.isVisible&&"Default"===this.type&&(this.tooltipElement.style.transition=this.transition.handle),this.tooltipToggle(this.getHandle()),this.closeTooltip())},t.prototype.handleFocusOut=function(){this.firstHandle.classList.contains(Vh)&&this.firstHandle.classList.remove(Vh),"Range"===this.type&&this.secondHandle.classList.contains(Vh)&&this.secondHandle.classList.remove(Vh)},t.prototype.handleFocus=function(e){this.focusSliderElement(),this.sliderBarClick(e),e.currentTarget===this.firstHandle?(this.firstHandle.classList.add(Vh),this.firstHandle.classList.add(Gh)):(this.secondHandle.classList.add(Vh),this.secondHandle.classList.add(Gh)),q.add(document,"mousemove touchmove",this.sliderBarMove,this),q.add(document,"mouseup touchend",this.sliderBarUp,this)},t.prototype.handleOver=function(e){this.tooltip.isVisible&&"Hover"===this.tooltip.showOn&&this.tooltipToggle(e.currentTarget),"Default"===this.type&&this.tooltipToggle(this.getHandle())},t.prototype.handleLeave=function(e){!this.tooltip.isVisible||"Hover"!==this.tooltip.showOn||e.currentTarget.classList.contains(Vh)||e.currentTarget.classList.contains(Gh)||this.closeTooltip()},t.prototype.setHandler=function(){this.createFirstHandle(),"Range"===this.type&&this.createSecondHandle()},t.prototype.setEnableRTL=function(){this.enableRtl&&"Vertical"!==this.orientation?G([this.sliderContainer],gh):X([this.sliderContainer],gh);var e="Vertical"!==this.orientation?this.horDir:this.verDir;this.enableRtl?(this.horDir="right",this.verDir="bottom"):(this.horDir="left",this.verDir="bottom"),e!==("Vertical"!==this.orientation?this.horDir:this.verDir)&&"Horizontal"===this.orientation&&(ae(this.firstHandle,{right:"",left:"auto"}),"Range"===this.type&&ae(this.secondHandle,{top:"",left:"auto"})),this.setBarColor()},t.prototype.tooltipValue=function(){var e,t=this,i={value:this.value,text:""};this.initialTooltip&&(this.initialTooltip=!1,this.setTooltipContent(),i.text=e="function"==typeof this.tooltipObj.content?this.tooltipObj.content():this.tooltipObj.content,this.trigger("tooltipChange",i,(function(i){if(t.addTooltipClass(i.text),e!==i.text){t.customAriaText=i.text,t.enableHtmlSanitizer?i.text=Si.sanitize(i.text.toString()):i.text=i.text.toString();t.tooltipObj.content=vi((function(){return i.text})),t.setAriaAttrValue(t.firstHandle),"Range"===t.type&&t.setAriaAttrValue(t.secondHandle)}})),this.isMaterialTooltip&&this.setPreviousVal("change",this.value))},t.prototype.setTooltipContent=function(){var e=this.formatContent(this.tooltipFormatInfo,!1);this.tooltipObj.content=vi((function(){return e}))},t.prototype.formatContent=function(e,t){var i="",n=this.handleVal1,o=this.handleVal2;return!g(this.customValues)&&this.customValues.length>0&&(n=this.customValues[this.handleVal1],o=this.customValues[this.handleVal2]),t?("Range"===this.type?i=this.enableRtl&&"Vertical"!==this.orientation?g(this.tooltip)||g(this.tooltip.format)?o.toString()+" - "+n.toString():this.formatString(o,e).elementVal+" - "+this.formatString(n,e).elementVal:g(this.tooltip)||g(this.tooltip.format)?n.toString()+" - "+o.toString():this.formatString(n,e).elementVal+" - "+this.formatString(o,e).elementVal:g(n)||(i=g(this.tooltip)||g(this.tooltip.format)?n.toString():this.formatString(n,e).elementVal),i):("Range"===this.type?i=this.enableRtl&&"Vertical"!==this.orientation?g(e.format)?o.toString()+" - "+n.toString():this.formatString(o,e).formatString+" - "+this.formatString(n,e).formatString:g(e.format)?n.toString()+" - "+o.toString():this.formatString(n,e).formatString+" - "+this.formatString(o,e).formatString:g(n)||(i=g(e.format)?n.toString():this.formatString(n,e).formatString),i)},t.prototype.addTooltipClass=function(e){if(this.isMaterialTooltip){var t=e.toString().length;if(this.tooltipElement){i=t>4?{oldCss:sd,newCss:rd}:{oldCss:rd,newCss:sd};this.tooltipElement.classList.remove(i.oldCss),this.tooltipElement.classList.contains(i.newCss)||(this.tooltipElement.classList.add(i.newCss),this.tooltipElement.style.transform=t>4?"scale(1)":this.getTooltipTransformProperties(this.previousTooltipClass).rotate)}else{var i=t>4?rd:sd;this.tooltipObj.cssClass=Sh+" "+i}}},t.prototype.tooltipPlacement=function(){return"Horizontal"===this.orientation?"Before"===this.tooltip.placement?"TopCenter":"BottomCenter":"Before"===this.tooltip.placement?"LeftCenter":"RightCenter"},t.prototype.tooltipBeforeOpen=function(e){this.tooltipElement=e.element,this.tooltip.cssClass&&G([this.tooltipElement],this.tooltip.cssClass.split(" ").filter((function(e){return e}))),e.target.removeAttribute("aria-describedby"),this.isMaterialTooltip&&(this.tooltipElement.firstElementChild.classList.add(ld),this.handleStart(),this.setTooltipTransform())},t.prototype.tooltipCollision=function(e){if(this.isBootstrap||this.isBootstrap4||(this.isMaterial||this.isMaterial3)&&!this.isMaterialTooltip){var t=this.isBootstrap4?3:6;switch(e){case"TopCenter":this.tooltipObj.setProperties({offsetY:-t},!1);break;case"BottomCenter":this.tooltipObj.setProperties({offsetY:t},!1);break;case"LeftCenter":this.tooltipObj.setProperties({offsetX:-t},!1);break;case"RightCenter":this.tooltipObj.setProperties({offsetX:t},!1)}}},t.prototype.materialTooltipEventCallBack=function(e){this.sliderBarClick(e),q.add(document,"mousemove touchmove",this.sliderBarMove,this),q.add(document,"mouseup touchend",this.sliderBarUp,this)},t.prototype.wireMaterialTooltipEvent=function(e){this.isMaterialTooltip&&(e?q.remove(this.tooltipElement,"mousedown touchstart",this.materialTooltipEventCallBack):q.add(this.tooltipElement,"mousedown touchstart",this.materialTooltipEventCallBack,this))},t.prototype.tooltipPositionCalculation=function(e){var t;switch(e){case"TopCenter":t=zh;break;case"BottomCenter":t=Ah;break;case"LeftCenter":t=kh;break;case"RightCenter":t=Ph}return t},t.prototype.getTooltipTransformProperties=function(e){var t;if(this.tooltipElement){var i="Horizontal"===this.orientation?this.tooltipElement.clientHeight+14-this.tooltipElement.clientHeight/2:this.tooltipElement.clientWidth+14-this.tooltipElement.clientWidth/2;t="Horizontal"===this.orientation?e===zh?{rotate:"rotate(45deg)",translate:"translateY("+i+"px)"}:{rotate:"rotate(225deg)",translate:"translateY("+-i+"px)"}:e===kh?{rotate:"rotate(-45deg)",translate:"translateX("+i+"px)"}:{rotate:"rotate(-225deg)",translate:"translateX("+-i+"px)"}}return t},t.prototype.openMaterialTooltip=function(){var e=this;if(this.isMaterialTooltip){this.refreshTooltip(this.firstHandle);var t=this.tooltipElement.firstElementChild;t.classList.remove(ld),t.classList.add(ad),this.firstHandle.style.cursor="default",this.tooltipElement.style.transition=this.scaleTransform,this.tooltipElement.classList.add(Rh),this.materialHandle.style.transform="scale(0)",t.innerText.length>4?this.tooltipElement.style.transform="scale(1)":this.tooltipElement.style.transform=this.getTooltipTransformProperties(this.previousTooltipClass).rotate,"Default"===this.type?setTimeout((function(){e.tooltipElement&&(e.tooltipElement.style.transition=e.transition.handle)}),2500):setTimeout((function(){e.tooltipElement&&(e.tooltipElement.style.transition="none")}),2500)}},t.prototype.closeMaterialTooltip=function(){var e=this;if(this.isMaterialTooltip){var t=this.tooltipElement.firstElementChild;this.tooltipElement.style.transition=this.scaleTransform,t.classList.remove(ad),t.classList.add(ld),this.firstHandle.style.cursor="-webkit-grab",this.firstHandle.style.cursor="grab",this.materialHandle&&(this.materialHandle.style.transform="scale(1)"),this.tooltipElement.classList.remove(Rh),this.setTooltipTransform(),this.tooltipTarget=void 0,setTimeout((function(){e.tooltipElement&&(e.tooltipElement.style.transition="none")}),2500)}},t.prototype.checkTooltipPosition=function(e){var t=this.tooltipPositionCalculation(e.collidedPosition);void 0!==this.tooltipCollidedPosition&&this.tooltipCollidedPosition===e.collidedPosition&&e.element.classList.contains(t)||(this.isMaterialTooltip&&(void 0!==t&&(e.element.classList.remove(this.previousTooltipClass),e.element.classList.add(t),this.previousTooltipClass=t),e.element.style.transform&&e.element.classList.contains(Rh)&&e.element.firstElementChild.innerText.length<=4&&(e.element.style.transform=this.getTooltipTransformProperties(this.previousTooltipClass).rotate)),this.tooltipCollidedPosition=e.collidedPosition),this.isMaterialTooltip&&this.tooltipElement&&-1!==this.tooltipElement.style.transform.indexOf("translate")&&this.setTooltipTransform()},t.prototype.setTooltipTransform=function(){var e=this.getTooltipTransformProperties(this.previousTooltipClass);g(this.tooltipElement)||(this.tooltipElement.firstElementChild.innerText.length>4?this.tooltipElement.style.transform=e.translate+" scale(0.01)":this.tooltipElement.style.transform=e.translate+" "+e.rotate+" scale(0.01)")},t.prototype.renderTooltip=function(){this.tooltipObj=new Kl({showTipPointer:this.isBootstrap||this.isMaterial||this.isMaterial3||this.isBootstrap4||this.isTailwind||this.isTailwind3||this.isBootstrap5||this.isFluent||this.isFluent2||this.isBootstrap5Dot3,cssClass:Sh,height:this.isMaterial||this.isMaterial3?30:"auto",animation:{open:{effect:"None"},close:{effect:"FadeOut",duration:500}},opensOn:"Custom",beforeOpen:this.tooltipBeforeOpen.bind(this),beforeCollision:this.checkTooltipPosition.bind(this),beforeClose:this.tooltipBeforeClose.bind(this),enableHtmlSanitizer:this.enableHtmlSanitizer}),this.tooltipObj.appendTo(this.firstHandle),this.initializeTooltipProps()},t.prototype.initializeTooltipProps=function(){var e="Auto"===this.tooltip.showOn?"Hover":this.tooltip.showOn;this.setProperties({tooltip:{showOn:e}},!0),this.tooltipObj.position=this.tooltipPlacement(),this.tooltipCollision(this.tooltipObj.position),[this.firstHandle,this.rangeBar,this.secondHandle].forEach((function(e){g(e)||(e.style.transition="none")})),this.isMaterialTooltip&&(this.sliderContainer.classList.add(Hh),this.tooltipValue(),this.tooltipObj.animation.close.effect="None",this.tooltipObj.open(this.firstHandle))},t.prototype.tooltipBeforeClose=function(){this.tooltipElement=void 0,this.tooltipCollidedPosition=void 0},t.prototype.setButtons=function(){this.firstBtn=this.createElement("div",{className:Mh+" "+Nh}),this.firstBtn.appendChild(this.createElement("span",{className:Xh})),(this.isTailwind||this.isTailwind3)&&this.firstBtn.querySelector("span").classList.add("e-icons"),this.firstBtn.tabIndex=-1,this.secondBtn=this.createElement("div",{className:Mh+" "+Ch}),this.secondBtn.appendChild(this.createElement("span",{className:Xh})),(this.isTailwind||this.isTailwind3)&&this.secondBtn.querySelector("span").classList.add("e-icons"),this.secondBtn.tabIndex=-1,this.sliderContainer.classList.add(ed),this.sliderContainer.appendChild(this.firstBtn),this.sliderContainer.appendChild(this.secondBtn),this.sliderContainer.appendChild(this.element),this.buttonTitle()},t.prototype.buttonTitle=function(){var e=this.enableRtl&&"Vertical"!==this.orientation;this.l10n.setLocale(this.locale);var t=this.l10n.getConstant("decrementTitle"),i=this.l10n.getConstant("incrementTitle");ie(e?this.secondBtn:this.firstBtn,{"aria-label":t,title:t}),ie(e?this.firstBtn:this.secondBtn,{"aria-label":i,title:i})},t.prototype.buttonFocusOut=function(){(this.isMaterial||this.isMaterial3)&&this.getHandle().classList.remove("e-large-thumb-size")},t.prototype.repeatButton=function(e){var t,i=this.handleValueUpdate(),n=this.enableRtl&&"Vertical"!==this.orientation;e.target.parentElement.classList.contains(Nh)||e.target.classList.contains(Nh)?t=n?this.add(i,parseFloat(this.step.toString()),!0):this.add(i,parseFloat(this.step.toString()),!1):(e.target.parentElement.classList.contains(Ch)||e.target.classList.contains(Ch))&&(t=n?this.add(i,parseFloat(this.step.toString()),!1):this.add(i,parseFloat(this.step.toString()),!0)),this.limits.enabled&&(t=this.getLimitCorrectedValues(t)),t>=this.min&&t<=this.max&&(this.changeHandleValue(t),this.tooltipToggle(this.getHandle()))},t.prototype.repeatHandlerMouse=function(e){e.preventDefault(),"mousedown"!==e.type&&"touchstart"!==e.type||(this.buttonClick(e),this.repeatInterval=setInterval(this.repeatButton.bind(this),180,e))},t.prototype.materialChange=function(){this.getHandle().classList.contains("e-large-thumb-size")||this.getHandle().classList.add("e-large-thumb-size")},t.prototype.focusHandle=function(){this.getHandle().classList.contains(Gh)||this.getHandle().classList.add(Gh)},t.prototype.repeatHandlerUp=function(e){this.changeEvent("changed",e),this.closeTooltip(),clearInterval(this.repeatInterval),this.getHandle().focus()},t.prototype.customTickCounter=function(e){var t=4;return!g(this.customValues)&&this.customValues.length>0&&(e>4&&(t=3),e>7&&(t=2),e>14&&(t=1),e>28&&(t=0)),t},t.prototype.renderScale=function(){var e="Vertical"===this.orientation?"v":"h";this.noOfDecimals=this.numberOfDecimals(this.step),this.ul=this.createElement("ul",{className:Eh+" e-"+e+"-scale "+Dh+"-"+this.ticks.placement.toLowerCase(),attrs:{role:"presentation","aria-hidden":"true"}}),this.ul.style.zIndex="-1",Q.isAndroid&&"h"===e&&this.ul.classList.add(Zh);var t=this.ticks.smallStep;this.ticks.showSmallTicks?t<=0&&(t=parseFloat(N(this.step))):t=this.ticks.largeStep>0?this.ticks.largeStep:parseFloat(N(this.max))-parseFloat(N(this.min));var i,n=this.fractionalToInteger(this.min),o=this.fractionalToInteger(this.max),r=this.fractionalToInteger(t),s=!g(this.customValues)&&this.customValues.length>0&&this.customValues.length-1,a=this.customTickCounter(s),l=!g(this.customValues)&&this.customValues.length>0?s*a+s:Math.abs((o-n)/r);this.element.appendChild(this.ul);var c=parseFloat(this.min.toString());"v"===e&&(c=parseFloat(this.max.toString()));var h,d=0,p=100/l;p===1/0&&(p=5);for(var u=0,m=!g(this.customValues)&&this.customValues.length>0?this.customValues.length-1:0,f=0;u<=l;u++){if(i=this.createElement("li",{attrs:{class:Dh,role:"presentation","aria-hidden":"true"}}),!g(this.customValues)&&this.customValues.length>0)(h=u%(a+1)==0)&&("h"===e?(c=this.customValues[f],f++):(c=this.customValues[m],m--),i.setAttribute("title",c.toString()));else if(i.setAttribute("title",c.toString()),0===this.numberOfDecimals(this.max)&&0===this.numberOfDecimals(this.min)&&0===this.numberOfDecimals(this.step))h="h"===e?(c-parseFloat(this.min.toString()))%this.ticks.largeStep==0:Math.abs(c-parseFloat(this.max.toString()))%this.ticks.largeStep==0;else{var y=this.fractionalToInteger(this.ticks.largeStep),v=this.fractionalToInteger(c);h="h"===e?(v-n)%y==0:Math.abs(v-parseFloat(o.toString()))%y==0}h&&i.classList.add(Th),"h"===e?i.style.width=p+"%":i.style.height=p+"%";var b=h?"Both"===this.ticks.placement?2:1:0;if(h)for(var M=0;M<b;M++)this.createTick(i,c);else g(this.customValues)&&this.formatTicksValue(i,c);this.ul.appendChild(i),this.tickElementCollection.push(i);var C=void 0;g(this.customValues)&&(C=this.numberOfDecimals(t)>this.numberOfDecimals(c)?this.numberOfDecimals(t):this.numberOfDecimals(c),c="h"===e||this.min>this.max?this.makeRoundNumber(c+t,C):this.makeRoundNumber(c-t,C),d=this.makeRoundNumber(d+t,C))}this.ticksAlignment(e,p)},t.prototype.ticksAlignment=function(e,t,i){void 0===i&&(i=!0),this.firstChild=this.ul.firstElementChild,this.lastChild=this.ul.lastElementChild,this.firstChild.classList.add(Jh),this.lastChild.classList.add($h),this.sliderContainer.classList.add(Eh+"-"+this.ticks.placement.toLowerCase()),"h"===e?(this.firstChild.style.width=t/2+"%",this.lastChild.style.width=t/2+"%"):(this.firstChild.style.height=t/2+"%",this.lastChild.style.height=t/2+"%");var n={ticksWrapper:this.ul,tickElements:this.tickElementCollection};i&&this.trigger("renderedTicks",n),this.scaleAlignment()},t.prototype.createTick=function(e,t){var i=this.createElement("span",{className:Lh+" "+Dh+"-"+this.ticks.placement.toLowerCase(),attrs:{role:"presentation","aria-hidden":"true"}});e.appendChild(i),g(this.customValues)?this.formatTicksValue(e,t,i):this.enableHtmlSanitizer?i.innerHTML=Si.sanitize(t.toString()):i.innerHTML=t.toString()},t.prototype.formatTicksValue=function(e,t,i){var n=this,o=this.formatNumber(t),r={value:t,text:g(this.ticks)||g(this.ticks.format)?o:this.formatString(t,this.ticksFormatInfo).formatString,tickElement:e};this.trigger("renderingTicks",r,(function(t){e.setAttribute("title",t.text.toString()),i&&(n.enableHtmlSanitizer?i.innerHTML=Si.sanitize(t.text.toString()):i.innerHTML=t.text.toString())}))},t.prototype.scaleAlignment=function(){this.tickValuePosition(),"Vertical"===this.orientation?this.element.getBoundingClientRect().width<=15?this.sliderContainer.classList.add(Kh):this.sliderContainer.classList.remove(Kh):this.element.getBoundingClientRect().height<=15?this.sliderContainer.classList.add(Kh):this.sliderContainer.classList.remove(Kh)},t.prototype.tickValuePosition=function(){this.firstChild=this.element.querySelector("ul").children[0];var e,t,i=this.firstChild.getBoundingClientRect(),n=this.ticks.smallStep,o=Math.abs(parseFloat(N(this.max))-parseFloat(N(this.min)))/n;this.firstChild.children.length>0&&(e=this.firstChild.children[0].getBoundingClientRect());var r,s=[this.sliderContainer.querySelectorAll("."+Dh+"."+Th+" ."+Lh)];r="Both"===this.ticks.placement?[].slice.call(s[0],2):[].slice.call(s[0],1);for(var a="Vertical"===this.orientation?2*i.height:2*i.width,l=0;l<this.firstChild.children.length;l++)"Vertical"===this.orientation?this.firstChild.children[l].style.top=-e.height/2+"px":this.enableRtl?this.firstChild.children[l].style.left=(a-this.firstChild.children[l].getBoundingClientRect().width)/2+"px":this.firstChild.children[l].style.left=-e.width/2+"px";for(l=0;l<r.length;l++)t=r[l].getBoundingClientRect(),"Vertical"===this.orientation?ae(r[l],{top:(a-t.height)/2+"px"}):ae(r[l],{left:(a-t.width)/2+"px"});this.enableRtl&&this.lastChild.children.length&&0!==o&&(this.lastChild.children[0].style.left=-this.lastChild.getBoundingClientRect().width/2+"px","Both"===this.ticks.placement&&(this.lastChild.children[1].style.left=-this.lastChild.getBoundingClientRect().width/2+"px")),0===o&&("Horizontal"===this.orientation&&(this.enableRtl?(this.firstChild.classList.remove($h),this.firstChild.style.right=this.firstHandle.style.right,this.firstChild.children[0].style.left=this.firstChild.getBoundingClientRect().width/2+2+"px","Both"===this.ticks.placement&&(this.firstChild.children[1].style.left=this.firstChild.getBoundingClientRect().width/2+2+"px")):(this.firstChild.classList.remove($h),this.firstChild.style.left=this.firstHandle.style.left)),"Vertical"===this.orientation&&this.firstChild.classList.remove($h))},t.prototype.setAriaAttrValue=function(e){var t,i=!g(this.ticks)&&!g(this.ticks.format),n=i?this.formatContent(this.tooltipFormatInfo,!1):this.formatContent(this.ticksFormatInfo,!1),o=i?this.formatContent(this.ticksFormatInfo,!0):this.formatContent(this.tooltipFormatInfo,!0);t=2===(n=this.customAriaText?this.customAriaText:n).split(" - ").length?n.split(" - "):[n,n],this.setAriaAttributes(e),"Range"!==this.type?ie(e,{"aria-valuenow":o,"aria-valuetext":n}):this.enableRtl?e===this.firstHandle?ie(e,{"aria-valuenow":o.split(" - ")[1],"aria-valuetext":t[1]}):ie(e,{"aria-valuenow":o.split(" - ")[0],"aria-valuetext":t[0]}):e===this.firstHandle?ie(e,{"aria-valuenow":o.split(" - ")[0],"aria-valuetext":t[0]}):ie(e,{"aria-valuenow":o.split(" - ")[1],"aria-valuetext":t[1]})},t.prototype.handleValueUpdate=function(){return"Range"===this.type?1===this.activeHandle?this.handleVal1:this.handleVal2:this.handleVal1},t.prototype.getLimitCorrectedValues=function(e){return e="MinRange"===this.type||"Default"===this.type||1===this.activeHandle?this.getLimitValueAndPosition(e,this.limits.minStart,this.limits.minEnd)[0]:this.getLimitValueAndPosition(e,this.limits.maxStart,this.limits.maxEnd)[0]},t.prototype.focusSliderElement=function(){this.isElementFocused||(this.element.focus(),this.isElementFocused=!0)},t.prototype.buttonClick=function(e){var t;this.focusSliderElement();var i=this.enableRtl&&"Vertical"!==this.orientation,n=this.handleValueUpdate();40===e.keyCode||37===e.keyCode||e.currentTarget.classList.contains(Nh)?t=i?this.add(n,parseFloat(this.step.toString()),!0):this.add(n,parseFloat(this.step.toString()),!1):38===e.keyCode||39===e.keyCode||e.currentTarget.classList.contains(Ch)?t=i?this.add(n,parseFloat(this.step.toString()),!1):this.add(n,parseFloat(this.step.toString()),!0):33===e.keyCode||e.currentTarget.classList.contains(Nh)?t=i?this.add(n,parseFloat(this.ticks.largeStep.toString()),!1):this.add(n,parseFloat(this.ticks.largeStep.toString()),!0):34===e.keyCode||e.currentTarget.classList.contains(Ch)?t=i?this.add(n,parseFloat(this.ticks.largeStep.toString()),!0):this.add(n,parseFloat(this.ticks.largeStep.toString()),!1):36===e.keyCode?t=parseFloat(this.min<this.max?this.min.toString():this.max.toString()):35===e.keyCode&&(t=parseFloat(this.min<this.max?this.max.toString():this.min.toString())),this.limits.enabled&&(t=this.getLimitCorrectedValues(t)),this.changeHandleValue(t),!this.isMaterial&&!this.isMaterial3||this.tooltip.isVisible||this.getHandle().classList.contains(Gh)||this.materialChange(),this.tooltipToggle(this.getHandle()),this.getHandle().focus(),this.focusHandle(),e.currentTarget.classList.contains(Nh)&&q.add(this.firstBtn,"mouseup touchend",this.buttonUp,this),e.currentTarget.classList.contains(Ch)&&q.add(this.secondBtn,"mouseup touchend",this.buttonUp,this)},t.prototype.tooltipToggle=function(e){this.isMaterialTooltip?this.tooltipElement.classList.contains(Rh)?this.refreshTooltip(this.firstHandle):this.openMaterialTooltip():this.tooltipElement?this.refreshTooltip(e):this.openTooltip(e)},t.prototype.buttonUp=function(e){e.currentTarget.classList.contains(Nh)&&q.remove(this.firstBtn,"mouseup touchend",this.buttonUp),e.currentTarget.classList.contains(Ch)&&q.remove(this.secondBtn,"mouseup touchend",this.buttonUp)},t.prototype.setRangeBar=function(){"Horizontal"!==this.orientation||g(this.rangeBar)?g(this.rangeBar)||("MinRange"===this.type?(this.rangeBar.style.bottom=this.min>this.max?this.handlePos1+"px":"0px",ae(this.rangeBar,{height:g(this.handlePos1)?0:this.min>this.max?this.element.clientHeight-this.handlePos1+"px":this.handlePos1+"px"})):(this.rangeBar.style.bottom=this.min>this.max?this.handlePos2+"px":this.handlePos1+"px",ae(this.rangeBar,{height:this.min>this.max?this.handlePos1-this.handlePos2+"px":this.handlePos2-this.handlePos1+"px"}))):"MinRange"===this.type?(this.enableRtl?this.rangeBar.style.right="0px":this.rangeBar.style.left="0px",ae(this.rangeBar,{width:g(this.handlePos1)?0:this.handlePos1+"px"})):(this.enableRtl?this.rangeBar.style.right=this.handlePos1+"px":this.rangeBar.style.left=this.handlePos1+"px",ae(this.rangeBar,{width:this.handlePos2-this.handlePos1+"px"}))},t.prototype.checkValidValueAndPos=function(e){return e=this.checkHandleValue(e),e=this.checkHandlePosition(e)},t.prototype.setLimitBarPositions=function(e,t,i,n){"Horizontal"===this.orientation?this.enableRtl?(this.limitBarFirst.style.right=e+"px",this.limitBarFirst.style.width=t-e+"px"):(this.limitBarFirst.style.left=e+"px",this.limitBarFirst.style.width=t-e+"px"):(this.limitBarFirst.style.bottom=(this.min<this.max?e:t)+"px",this.limitBarFirst.style.height=(this.min<this.max?t-e:e-t)+"px"),"Range"===this.type&&("Horizontal"===this.orientation?this.enableRtl?(this.limitBarSecond.style.right=i+"px",this.limitBarSecond.style.width=n-i+"px"):(this.limitBarSecond.style.left=i+"px",this.limitBarSecond.style.width=n-i+"px"):(this.limitBarSecond.style.bottom=(this.min<this.max?i:n)+"px",this.limitBarSecond.style.height=(this.min<this.max?n-i:i-n)+"px"))},t.prototype.setLimitBar=function(){if("Default"===this.type||"MinRange"===this.type){var e=this.getLimitValueAndPosition(this.limits.minStart,this.limits.minStart,this.limits.minEnd,!0)[0];e=this.checkValidValueAndPos(e);var t=this.getLimitValueAndPosition(this.limits.minEnd,this.limits.minStart,this.limits.minEnd,!0)[0];t=this.checkValidValueAndPos(t),this.setLimitBarPositions(e,t)}else if("Range"===this.type){var i=this.getLimitValueAndPosition(this.limits.minStart,this.limits.minStart,this.limits.minEnd,!0)[0];i=this.checkValidValueAndPos(i);var n=this.getLimitValueAndPosition(this.limits.minEnd,this.limits.minStart,this.limits.minEnd,!0)[0];n=this.checkValidValueAndPos(n);var o=this.getLimitValueAndPosition(this.limits.maxStart,this.limits.maxStart,this.limits.maxEnd,!0)[0];o=this.checkValidValueAndPos(o);var r=this.getLimitValueAndPosition(this.limits.maxEnd,this.limits.maxStart,this.limits.maxEnd,!0)[0];r=this.checkValidValueAndPos(r),this.setLimitBarPositions(i,n,o,r)}},t.prototype.getLimitValueAndPosition=function(e,t,i,n){return g(t)&&(t=this.min<this.max?this.min:this.max,g(e)&&n&&(e=t)),g(i)&&(i=this.min<this.max?this.max:this.min,g(e)&&n&&(e=i)),e<t&&(e=t),e>i&&(e=i),[e,this.checkHandlePosition(e)]},t.prototype.setValue=function(){if(!g(this.customValues)&&this.customValues.length>0&&(this.min=0,this.max=this.customValues.length-1,this.setBarColor()),this.setAriaAttributes(this.firstHandle),this.handleVal1=g(this.value)?this.checkHandleValue(parseFloat(this.min.toString())):this.checkHandleValue(parseFloat(this.value.toString())),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.preHandlePos1=this.handlePos1,g(this.activeHandle)&&(this.activeHandle="Range"===this.type?2:1),"Default"===this.type||"MinRange"===this.type){if(this.limits.enabled){var e=this.getLimitValueAndPosition(this.handleVal1,this.limits.minStart,this.limits.minEnd);this.handleVal1=e[0],this.handlePos1=e[1],this.preHandlePos1=this.handlePos1}this.setHandlePosition(null),this.handleStart(),this.value=this.handleVal1,this.setAriaAttrValue(this.firstHandle),this.changeEvent("changed",null)}else this.validateRangeValue();"Default"!==this.type&&this.setRangeBar(),this.limits.enabled&&this.setLimitBar()},t.prototype.rangeValueUpdate=function(){null!==this.value&&"object"==typeof this.value||(this.value=[parseFloat(N(this.min)),parseFloat(N(this.max))])},t.prototype.validateRangeValue=function(){this.rangeValueUpdate(),this.setRangeValue()},t.prototype.modifyZindex=function(){"Range"!==this.type||g(this.firstHandle)||g(this.secondHandle)?this.isMaterialTooltip&&this.tooltipElement&&(this.tooltipElement.style.zIndex=ua(this.element)+""):1===this.activeHandle?(this.firstHandle.style.zIndex=this.zIndex+4+"",this.secondHandle.style.zIndex=this.zIndex+3+""):(this.firstHandle.style.zIndex=this.zIndex+3+"",this.secondHandle.style.zIndex=this.zIndex+4+"")},t.prototype.setHandlePosition=function(e){var t,i=this,n=1===this.activeHandle?this.handlePos1:this.handlePos2;t=this.isMaterialTooltip?[this.firstHandle,this.materialHandle]:[this.getHandle()],this.handleStart(),t.forEach((function(e){g(e)||("Horizontal"===i.orientation?i.enableRtl?e.style.right=n+"px":e.style.left=n+"px":e.style.bottom=n+"px")})),this.changeEvent("change",e)},t.prototype.getHandle=function(){return 1===this.activeHandle?this.firstHandle:this.secondHandle},t.prototype.setRangeValue=function(){this.updateRangeValue(),this.activeHandle=1,this.setHandlePosition(null),this.activeHandle=2,this.setHandlePosition(null),this.activeHandle=1},t.prototype.changeEvent=function(e,t){var i="change"===e?this.previousVal:this.previousChanged;if("Range"!==this.type)this.setProperties({value:this.handleVal1},!0),i===this.value||this.isMaterialTooltip&&this.initialTooltip||(this.trigger(e,this.changeEventArgs(e,t)),this.initialTooltip=!0,this.setPreviousVal(e,this.value)),this.setAriaAttrValue(this.firstHandle);else{var n=this.value=[this.handleVal1,this.handleVal2];this.setProperties({value:n},!0),(i.length===this.value.length&&this.value[0]!==i[0]||this.value[1]!==i[1])&&(this.initialTooltip=!1,this.trigger(e,this.changeEventArgs(e,t)),this.initialTooltip=!0,this.setPreviousVal(e,this.value)),this.setAriaAttrValue(this.getHandle())}this.hiddenInput.value=this.value.toString()},t.prototype.changeEventArgs=function(e,t){var i;return this.tooltip.isVisible&&this.tooltipObj&&this.initialTooltip?(this.tooltipValue(),i={value:this.value,previousValue:"change"===e?this.previousVal:this.previousChanged,action:e,text:"function"==typeof this.tooltipObj.content?this.tooltipObj.content():this.tooltipObj.content,isInteracted:!g(t)}):i={value:this.value,previousValue:"change"===e?this.previousVal:this.previousChanged,action:e,text:g(this.ticksFormatInfo.format)?this.value.toString():"Range"!==this.type?this.formatString(this.value,this.ticksFormatInfo).formatString:this.formatString(this.value[0],this.ticksFormatInfo).formatString+" - "+this.formatString(this.value[1],this.ticksFormatInfo).formatString,isInteracted:!g(t)},i},t.prototype.setPreviousVal=function(e,t){"change"===e?this.previousVal=t:this.previousChanged=t},t.prototype.updateRangeValue=function(){var e=this.value.toString().split(",").map(Number);if(this.enableRtl&&"Vertical"!==this.orientation||this.rtl?this.value=[e[1],e[0]]:this.value=[e[0],e[1]],this.enableRtl&&"Vertical"!==this.orientation?(this.handleVal1=this.checkHandleValue(this.value[1]),this.handleVal2=this.checkHandleValue(this.value[0])):(this.handleVal1=this.checkHandleValue(this.value[0]),this.handleVal2=this.checkHandleValue(this.value[1])),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.handlePos2=this.checkHandlePosition(this.handleVal2),this.min<this.max&&this.handlePos1>this.handlePos2&&(this.handlePos1=this.handlePos2,this.handleVal1=this.handleVal2),this.min>this.max&&this.handlePos1<this.handlePos2&&(this.handlePos2=this.handlePos1,this.handleVal2=this.handleVal1),this.preHandlePos1=this.handlePos1,this.preHandlePos2=this.handlePos2,this.limits.enabled){this.activeHandle=1;var t=this.getLimitValueAndPosition(this.handleVal1,this.limits.minStart,this.limits.minEnd);this.handleVal1=t[0],this.handlePos1=t[1],this.preHandlePos1=this.handlePos1,this.activeHandle=2,t=this.getLimitValueAndPosition(this.handleVal2,this.limits.maxStart,this.limits.maxEnd),this.handleVal2=t[0],this.handlePos2=t[1],this.preHandlePos2=this.handlePos2}},t.prototype.checkHandlePosition=function(e){var t;return e=100*(e-parseFloat(N(this.min)))/(parseFloat(N(this.max))-parseFloat(N(this.min))),t="Horizontal"===this.orientation?this.element.getBoundingClientRect().width*(e/100):this.element.getBoundingClientRect().height*(e/100),parseFloat(N(this.max))===parseFloat(N(this.min))&&(t="Horizontal"===this.orientation?this.element.getBoundingClientRect().width:this.element.getBoundingClientRect().height),t},t.prototype.checkHandleValue=function(e){if(this.min===this.max)return parseFloat(N(this.max));var t=this.tempStartEnd();return e<t.start?e=t.start:e>t.end&&(e=t.end),e},t.prototype.reposition=function(){var e=this;g(this.firstHandle)||(this.firstHandle.style.transition="none"),"Default"===this.type||g(this.rangeBar)||(this.rangeBar.style.transition="none"),"Range"!==this.type||g(this.secondHandle)||(this.secondHandle.style.transition="none"),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.handleVal2&&(this.handlePos2=this.checkHandlePosition(this.handleVal2)),"Horizontal"===this.orientation?(this.enableRtl?this.firstHandle.style.right=this.handlePos1+"px":this.firstHandle.style.left=this.handlePos1+"px",this.isMaterialTooltip&&!g(this.materialHandle)&&(this.enableRtl?this.materialHandle.style.right=this.handlePos1+"px":this.materialHandle.style.left=this.handlePos1+"px"),"MinRange"!==this.type||g(this.rangeBar)?"Range"!==this.type||g(this.secondHandle)||g(this.rangeBar)||(this.enableRtl?(this.secondHandle.style.right=this.handlePos2+"px",this.rangeBar.style.right=this.handlePos1+"px"):(this.secondHandle.style.left=this.handlePos2+"px",this.rangeBar.style.left=this.handlePos1+"px"),ae(this.rangeBar,{width:this.handlePos2-this.handlePos1+"px"})):(this.enableRtl?this.rangeBar.style.right="0px":this.rangeBar.style.left="0px",ae(this.rangeBar,{width:g(this.handlePos1)?0:this.handlePos1+"px"}))):(this.firstHandle.style.bottom=this.handlePos1+"px",this.isMaterialTooltip&&(this.materialHandle.style.bottom=this.handlePos1+"px"),"MinRange"===this.type?(this.rangeBar.style.bottom=this.min>this.max?this.handlePos1+"px":"0px",ae(this.rangeBar,{height:g(this.handlePos1)?0:this.min>this.max?this.element.clientHeight-this.handlePos1+"px":this.handlePos1+"px"})):"Range"===this.type&&(this.secondHandle.style.bottom=this.handlePos2+"px",this.rangeBar.style.bottom=this.min>this.max?this.handlePos2+"px":this.handlePos1+"px",ae(this.rangeBar,{height:this.min>this.max?this.handlePos1-this.handlePos2+"px":this.handlePos2-this.handlePos1+"px"}))),this.limits.enabled&&this.setLimitBar(),"None"!==this.ticks.placement&&this.ul&&(this.removeElement(this.ul),this.ul=void 0,this.renderScale()),this.handleStart(),this.tooltip.isVisible||setTimeout((function(){g(e.firstHandle)||(e.firstHandle.style.transition=e.scaleTransform),"Range"!==e.type||g(e.secondHandle)||(e.secondHandle.style.transition=e.scaleTransform)})),this.refreshTooltip(this.tooltipTarget),this.setBarColor()},t.prototype.changeHandleValue=function(e){var t=null;1===this.activeHandle?(this.limits.enabled&&this.limits.startHandleFixed||(this.handleVal1=this.checkHandleValue(e),this.handlePos1=this.checkHandlePosition(this.handleVal1),"Range"===this.type&&(this.handlePos1>this.handlePos2&&this.min<this.max||this.handlePos1<this.handlePos2&&this.min>this.max)&&(this.handlePos1=this.handlePos2,this.handleVal1=this.handleVal2),this.handlePos1!==this.preHandlePos1&&(t=this.preHandlePos1=this.handlePos1)),this.modifyZindex()):(this.limits.enabled&&this.limits.endHandleFixed||(this.handleVal2=this.checkHandleValue(e),this.handlePos2=this.checkHandlePosition(this.handleVal2),"Range"===this.type&&(this.handlePos2<this.handlePos1&&this.min<this.max||this.handlePos2>this.handlePos1&&this.min>this.max)&&(this.handlePos2=this.handlePos1,this.handleVal2=this.handleVal1),this.handlePos2!==this.preHandlePos2&&(t=this.preHandlePos2=this.handlePos2)),this.modifyZindex()),null!==t&&("Default"!==this.type&&this.setRangeBar(),this.setHandlePosition(null))},t.prototype.tempStartEnd=function(){return this.min>this.max?{start:this.max,end:this.min}:{start:this.min,end:this.max}},t.prototype.xyToPosition=function(e){if(this.min===this.max)return 100;if("Horizontal"===this.orientation){var t=e.x-this.element.getBoundingClientRect().left,i=this.element.offsetWidth/100;this.val=t/i}else{var n=e.y-this.element.getBoundingClientRect().top;i=this.element.offsetHeight/100;this.val=100-n/i}var o=this.stepValueCalculation(this.val);return o<0?o=0:o>100&&(o=100),this.enableRtl&&"Vertical"!==this.orientation&&(o=100-o),"Horizontal"===this.orientation?this.element.getBoundingClientRect().width*(o/100):this.element.getBoundingClientRect().height*(o/100)},t.prototype.stepValueCalculation=function(e){0===this.step&&(this.step=1);var t=parseFloat(N(this.step))/((parseFloat(N(this.max))-parseFloat(N(this.min)))/100),i=e%Math.abs(t);return 0!==i&&(t/2>i?e-=i:e+=Math.abs(t)-i),e},t.prototype.add=function(e,t,i){var n=Math.pow(10,3);return i?(Math.round(e*n)+Math.round(t*n))/n:(Math.round(e*n)-Math.round(t*n))/n},t.prototype.positionToValue=function(e){var t,i=parseFloat(N(this.max))-parseFloat(N(this.min));return t="Horizontal"===this.orientation?e/this.element.getBoundingClientRect().width*i:e/this.element.getBoundingClientRect().height*i,this.add(t,parseFloat(this.min.toString()),!0)},t.prototype.sliderBarClick=function(e){var t;e.preventDefault(),"mousedown"===e.type||"mouseup"===e.type||"click"===e.type?t={x:e.clientX,y:e.clientY}:"touchend"!==e.type&&"touchstart"!==e.type||(t={x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY});var i=this.xyToPosition(t),n=this.positionToValue(i);if("Range"===this.type&&(this.min<this.max&&this.handlePos2-i<i-this.handlePos1||this.min>this.max&&this.handlePos1-i>i-this.handlePos2)){if(this.activeHandle=2,!this.limits.enabled||!this.limits.endHandleFixed){if(this.limits.enabled)n=(o=this.getLimitValueAndPosition(n,this.limits.maxStart,this.limits.maxEnd))[0],i=o[1];this.secondHandle.classList.add(nd),this.handlePos2=this.preHandlePos2=i,this.handleVal2=n}this.modifyZindex(),this.secondHandle.focus()}else{if(this.activeHandle=1,!this.limits.enabled||!this.limits.startHandleFixed){var o;if(this.limits.enabled)n=(o=this.getLimitValueAndPosition(n,this.limits.minStart,this.limits.minEnd))[0],i=o[1];this.firstHandle.classList.add(nd),this.handlePos1=this.preHandlePos1=i,this.handleVal1=n}this.modifyZindex(),this.firstHandle.focus()}this.isMaterialTooltip&&this.tooltipElement.classList.add(Bh);var r=this.element.querySelector("."+Gh);r&&this.getHandle()!==r&&r.classList.remove(Gh);var s=1===this.activeHandle?this.firstHandle:this.secondHandle;if(("click"===e.type||"mousedown"===e.type)&&e.target===s){var a=e.clientX,l=e.clientY;document.elementFromPoint(a,l)}if(this.checkRepeatedValue(n)){var c=(this.isMaterial||this.isMaterial3)&&this.tooltip.isVisible?this.transitionOnMaterialTooltip:this.transition;this.getHandle().style.transition=c.handle,"Default"!==this.type&&(this.rangeBar.style.transition=c.rangeBar),this.setHandlePosition(e),this.isMaterialTooltip&&(this.initialTooltip=!1),e.target!==s&&this.changeEvent("changed",e),"Default"!==this.type&&this.setRangeBar()}},t.prototype.handleValueAdjust=function(e,t,i){1===i?(this.handleVal1=t,this.handleVal2=this.handleVal1+this.minDiff):2===i&&(this.handleVal2=t,this.handleVal1=this.handleVal2-this.minDiff),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.handlePos2=this.checkHandlePosition(this.handleVal2)},t.prototype.dragRangeBarMove=function(e){var t,i,n,o,r;if("touchmove"!==e.type&&e.preventDefault(),this.rangeBarDragged=!0,this.rangeBar.style.transition="none",this.firstHandle.style.transition="none",this.secondHandle.style.transition="none","mousemove"===e.type?(o=(t=[e.clientX,e.clientY])[0],r=t[1]):(o=(i=[e.changedTouches[0].clientX,e.changedTouches[0].clientY])[0],r=i[1]),!(this.limits.enabled&&this.limits.startHandleFixed||this.limits.enabled&&this.limits.endHandleFixed)){if(n=this.enableRtl?{x:o+this.secondPartRemain,y:r+this.secondPartRemain}:{x:o-this.firstPartRemain,y:r+this.secondPartRemain},this.min>this.max?(this.handlePos2=this.xyToPosition(n),this.handleVal2=this.positionToValue(this.handlePos2)):(this.handlePos1=this.xyToPosition(n),this.handleVal1=this.positionToValue(this.handlePos1)),n=this.enableRtl?{x:o-this.firstPartRemain,y:r-this.firstPartRemain}:{x:o+this.secondPartRemain,y:r-this.firstPartRemain},this.min>this.max?(this.handlePos1=this.xyToPosition(n),this.handleVal1=this.positionToValue(this.handlePos1)):(this.handlePos2=this.xyToPosition(n),this.handleVal2=this.positionToValue(this.handlePos2)),this.limits.enabled){var s=this.getLimitValueAndPosition(this.handleVal1,this.limits.minStart,this.limits.minEnd);this.handleVal1=s[0],this.handlePos1=s[1],this.handleVal1===this.limits.minEnd&&this.handleValueAdjust(this.handleVal1,this.limits.minEnd,1),this.handleVal1===this.limits.minStart&&this.handleValueAdjust(this.handleVal1,this.limits.minStart,1),s=this.getLimitValueAndPosition(this.handleVal2,this.limits.maxStart,this.limits.maxEnd),this.handleVal2=s[0],this.handlePos2=s[1],this.handleVal2===this.limits.maxStart&&this.handleValueAdjust(this.handleVal2,this.limits.maxStart,2),this.handleVal2===this.limits.maxEnd&&this.handleValueAdjust(this.handleVal2,this.limits.maxEnd,2)}this.handleVal2===(this.min>this.max?this.min:this.max)&&this.handleValueAdjust(this.handleVal2,this.min>this.max?this.min:this.max,2),this.handleVal1===(this.min>this.max?this.max:this.min)&&this.handleValueAdjust(this.handleVal1,this.min>this.max?this.max:this.min,1)}this.activeHandle=1,this.setHandlePosition(e),this.activeHandle=2,this.setHandlePosition(e),this.tooltipToggle(this.rangeBar),this.setRangeBar()},t.prototype.sliderBarUp=function(e){this.changeEvent("changed",e),this.handleFocusOut(),this.firstHandle.classList.remove(nd),"Range"===this.type&&(this.initialTooltip=!1,this.secondHandle.classList.remove(nd)),this.closeTooltip(),(this.isMaterial||this.isMaterial3)&&(this.getHandle().classList.remove("e-large-thumb-size"),this.isMaterialTooltip&&this.tooltipElement.classList.remove(Bh)),q.remove(document,"mousemove touchmove",this.sliderBarMove),q.remove(document,"mouseup touchend",this.sliderBarUp)},t.prototype.sliderBarMove=function(e){var t;"touchmove"!==e.type&&e.preventDefault(),t="mousemove"===e.type?{x:e.clientX,y:e.clientY}:{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY};var i=this.xyToPosition(t),n=this.positionToValue(i);if(i=Math.round(i),"Range"!==this.type&&1===this.activeHandle){if(!this.limits.enabled||!this.limits.startHandleFixed){if(this.limits.enabled){var o=this.getLimitValueAndPosition(n,this.limits.minStart,this.limits.minEnd);i=o[1],n=o[0]}this.handlePos1=i,this.handleVal1=n}this.firstHandle.classList.add(nd)}if("Range"===this.type)if(1===this.activeHandle){if(this.firstHandle.classList.add(nd),!(this.limits.enabled&&this.limits.startHandleFixed||((this.min<this.max&&i>this.handlePos2||this.min>this.max&&i<this.handlePos2)&&(i=this.handlePos2,n=this.handleVal2),i===this.preHandlePos1))){if(this.limits.enabled)n=(r=this.getLimitValueAndPosition(n,this.limits.minStart,this.limits.minEnd))[0],i=r[1];this.handlePos1=this.preHandlePos1=i,this.handleVal1=n,this.activeHandle=1}}else if(2===this.activeHandle&&(this.secondHandle.classList.add(nd),!(this.limits.enabled&&this.limits.endHandleFixed||((this.min<this.max&&i<this.handlePos1||this.min>this.max&&i>this.handlePos1)&&(i=this.handlePos1,n=this.handleVal1),i===this.preHandlePos2)))){var r;if(this.limits.enabled)n=(r=this.getLimitValueAndPosition(n,this.limits.maxStart,this.limits.maxEnd))[0],i=r[1];this.handlePos2=this.preHandlePos2=i,this.handleVal2=n,this.activeHandle=2}this.checkRepeatedValue(n)&&(this.getHandle().style.transition=this.scaleTransform,"Default"!==this.type&&(this.rangeBar.style.transition="none"),this.setHandlePosition(e),!this.isMaterial&&!this.isMaterial3||this.tooltip.isVisible||this.getHandle().classList.contains(Gh)||this.materialChange(),this.tooltipToggle(this.getHandle()),"Default"!==this.type&&this.setRangeBar())},t.prototype.dragRangeBarUp=function(e){this.rangeBarDragged?this.isDragComplete=!0:(this.focusSliderElement(),this.sliderBarClick(e)),this.changeEvent("changed",e),this.closeTooltip(),q.remove(document,"mousemove touchmove",this.dragRangeBarMove),q.remove(document,"mouseup touchend",this.dragRangeBarUp),this.rangeBarDragged=!1},t.prototype.checkRepeatedValue=function(e){if("Range"===this.type){if(e===(this.enableRtl&&"Vertical"!==this.orientation?1===this.activeHandle?this.previousVal[1]:this.previousVal[0]:1===this.activeHandle?this.previousVal[0]:this.previousVal[1]))return 0}else if(e===this.previousVal)return 0;return 1},t.prototype.refreshTooltip=function(e){this.tooltip.isVisible&&this.tooltipObj&&(this.tooltipValue(),e&&(this.tooltipObj.refresh(e),this.tooltipTarget=e))},t.prototype.openTooltip=function(e){this.tooltip.isVisible&&this.tooltipObj&&!this.isMaterialTooltip&&(this.tooltipValue(),this.tooltipObj.open(e),this.tooltipTarget=e)},t.prototype.closeTooltip=function(){this.tooltip.isVisible&&this.tooltipObj&&"Always"!==this.tooltip.showOn&&!this.isMaterialTooltip&&(this.tooltipValue(),this.tooltipObj.close(),this.tooltipTarget=void 0)},t.prototype.keyDown=function(e){switch(e.keyCode){case 37:case 38:case 39:case 40:case 33:case 34:case 36:case 35:e.preventDefault(),this.buttonClick(e)}},t.prototype.wireButtonEvt=function(e){e?(q.remove(this.firstBtn,"mouseleave touchleave",this.buttonFocusOut),q.remove(this.secondBtn,"mouseleave touchleave",this.buttonFocusOut),q.remove(this.firstBtn,"mousedown touchstart",this.repeatHandlerMouse),q.remove(this.firstBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp),q.remove(this.secondBtn,"mousedown touchstart",this.repeatHandlerMouse),q.remove(this.secondBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp),q.remove(this.firstBtn,"focusout",this.sliderFocusOut),q.remove(this.secondBtn,"focusout",this.sliderFocusOut)):(q.add(this.firstBtn,"mouseleave touchleave",this.buttonFocusOut,this),q.add(this.secondBtn,"mouseleave touchleave",this.buttonFocusOut,this),q.add(this.firstBtn,"mousedown touchstart",this.repeatHandlerMouse,this),q.add(this.firstBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp,this),q.add(this.secondBtn,"mousedown touchstart",this.repeatHandlerMouse,this),q.add(this.secondBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp,this),q.add(this.firstBtn,"focusout",this.sliderFocusOut,this),q.add(this.secondBtn,"focusout",this.sliderFocusOut,this))},t.prototype.rangeBarMousedown=function(e){var t,i;if(e.preventDefault(),this.focusSliderElement(),"Range"===this.type&&this.drag&&e.target===this.rangeBar){var n=void 0,o=void 0;"mousedown"===e.type?(n=(t=[e.clientX,e.clientY])[0],o=t[1]):"touchstart"===e.type&&(n=(i=[e.changedTouches[0].clientX,e.changedTouches[0].clientY])[0],o=i[1]),"Horizontal"===this.orientation?(this.firstPartRemain=n-this.rangeBar.getBoundingClientRect().left,this.secondPartRemain=this.rangeBar.getBoundingClientRect().right-n):(this.firstPartRemain=o-this.rangeBar.getBoundingClientRect().top,this.secondPartRemain=this.rangeBar.getBoundingClientRect().bottom-o),this.minDiff=this.handleVal2-this.handleVal1,this.tooltipToggle(this.rangeBar);var r=this.element.querySelector("."+Gh);r&&r.classList.remove(Gh),q.add(document,"mousemove touchmove",this.dragRangeBarMove,this),q.add(document,"mouseup touchend",this.dragRangeBarUp,this)}},t.prototype.elementClick=function(e){this.isDragComplete?this.isDragComplete=!1:(e.preventDefault(),this.focusSliderElement(),this.sliderBarClick(e),this.focusHandle())},t.prototype.wireEvents=function(){this.onresize=this.reposition.bind(this),window.addEventListener("resize",this.onresize),this.enabled&&!this.readonly&&(q.add(this.element,"click",this.elementClick,this),"Range"===this.type&&this.drag&&q.add(this.rangeBar,"mousedown touchstart",this.rangeBarMousedown,this),q.add(this.sliderContainer,"keydown",this.keyDown,this),q.add(this.sliderContainer,"keyup",this.keyUp,this),q.add(this.element,"focusout",this.sliderFocusOut,this),q.add(this.sliderContainer,"mouseover mouseout touchstart touchend",this.hover,this),this.wireFirstHandleEvt(!1),"Range"===this.type&&this.wireSecondHandleEvt(!1),this.showButtons&&this.wireButtonEvt(!1),this.wireMaterialTooltipEvent(!1),this.isForm&&q.add(this.formElement,"reset",this.formResetHandler,this))},t.prototype.unwireEvents=function(){q.remove(this.element,"click",this.elementClick),"Range"===this.type&&this.drag&&q.remove(this.rangeBar,"mousedown touchstart",this.rangeBarMousedown),q.remove(this.sliderContainer,"keydown",this.keyDown),q.remove(this.sliderContainer,"keyup",this.keyUp),q.remove(this.element,"focusout",this.sliderFocusOut),q.remove(this.sliderContainer,"mouseover mouseout touchstart touchend",this.hover),this.wireFirstHandleEvt(!0),"Range"===this.type&&this.wireSecondHandleEvt(!0),this.showButtons&&this.wireButtonEvt(!0),this.wireMaterialTooltipEvent(!0),q.remove(this.element,"reset",this.formResetHandler)},t.prototype.formResetHandler=function(){this.setProperties({value:this.formResetValue},!0),this.setValue()},t.prototype.keyUp=function(e){if(9===e.keyCode&&e.target.classList.contains(vh)&&(this.focusSliderElement(),!e.target.classList.contains(Gh))){this.element.querySelector("."+Gh)&&this.element.querySelector("."+Gh).classList.remove(Gh),e.target.classList.add(Gh);var t=e.target.parentElement;if(t===this.element&&(t.querySelector("."+Uh).classList.add(td),"Range"!==this.type&&"MinRange"!==this.type||t.querySelector("."+bh).classList.add(id)),"Range"===this.type){var i=e.target.previousSibling;i&&i.classList.contains(vh)?this.activeHandle=2:this.activeHandle=1}this.getHandle().focus(),this.tooltipToggle(this.getHandle())}this.closeTooltip(),this.changeEvent("changed",e)},t.prototype.hover=function(e){if(!g(e))if("mouseover"===e.type||"touchmove"===e.type||"mousemove"===e.type||"pointermove"===e.type||"touchstart"===e.type)this.sliderContainer.classList.add(Ih);else{this.sliderContainer.classList.remove(Ih);var t=e.currentTarget;this.tooltip.isVisible&&"Always"!==this.tooltip.showOn&&this.tooltipObj&&this.isMaterialTooltip&&!t.classList.contains(Vh)&&!t.classList.contains(Gh)&&this.closeMaterialTooltip()}},t.prototype.sliderFocusOut=function(e){e.relatedTarget!==this.secondHandle&&e.relatedTarget!==this.firstHandle&&e.relatedTarget!==this.element&&e.relatedTarget!==this.firstBtn&&e.relatedTarget!==this.secondBtn&&(this.closeMaterialTooltip(),this.closeTooltip(),this.element.querySelector("."+Gh)&&this.element.querySelector("."+Gh).classList.remove(Gh),this.element.querySelector("."+td)&&(this.element.querySelector("."+td).classList.remove(td),"Range"!==this.type&&"MinRange"!==this.type||!this.element.querySelector("."+id)||this.element.querySelector("."+id).classList.remove(id)),this.hiddenInput.focus(),this.hiddenInput.blur(),this.isElementFocused=!1)},t.prototype.removeElement=function(e){e.parentNode&&e.parentNode.removeChild(e)},t.prototype.changeSliderType=function(e,t){this.isMaterialTooltip&&this.materialHandle&&(this.sliderContainer.classList.remove(Hh),this.removeElement(this.materialHandle),this.materialHandle=void 0),this.removeElement(this.firstHandle),this.firstHandle=void 0,"Default"!==e&&("Range"===e&&(this.removeElement(this.secondHandle),this.secondHandle=void 0),this.removeElement(this.rangeBar),this.rangeBar=void 0),this.tooltip.isVisible&&!g(this.tooltipObj)&&(this.tooltipObj.destroy(),this.tooltipElement=void 0,this.tooltipCollidedPosition=void 0),this.limits.enabled&&("MinRange"===e||"Default"===e?g(this.limitBarFirst)||(this.removeElement(this.limitBarFirst),this.limitBarFirst=void 0):g(this.limitBarSecond)||(this.removeElement(this.limitBarSecond),this.limitBarSecond=void 0)),this.activeHandle=1,this.getThemeInitialization(),"Range"===this.type&&this.rangeValueUpdate(),this.createRangeBar(),this.limits.enabled&&this.createLimitBar(),this.setHandler(),this.setOrientClass(),this.wireFirstHandleEvt(!this.enabled),"Range"===this.type&&this.wireSecondHandleEvt(!this.enabled),this.setValue(),this.tooltip.isVisible&&(this.renderTooltip(),this.wireMaterialTooltipEvent(!1)),this.setBarColor(),"tooltip"!==t&&this.updateConfig(),this.readonly&&(this.sliderContainer.classList.remove(cd),this.setReadOnly())},t.prototype.changeRtl=function(){if(this.enableRtl||"Range"!==this.type||(this.value=[this.handleVal2,this.handleVal1]),this.updateConfig(),this.tooltip.isVisible&&this.tooltipObj.refresh(this.firstHandle),this.showButtons){var e=this.enableRtl&&"Vertical"!==this.orientation;ie(e?this.secondBtn:this.firstBtn,{"aria-label":"Decrease",title:"Decrease"}),ie(e?this.firstBtn:this.secondBtn,{"aria-label":"Increase",title:"Increase"})}},t.prototype.changeOrientation=function(){this.changeSliderType(this.type,"null")},t.prototype.updateConfig=function(){this.setEnableRTL(),this.setValue(),this.tooltip.isVisible&&this.refreshTooltip(this.tooltipTarget),"None"!==this.ticks.placement&&this.ul&&(this.removeElement(this.ul),this.ul=void 0,this.renderScale()),this.limitsPropertyChange()},t.prototype.limitsPropertyChange=function(){this.limits.enabled?(g(this.limitBarFirst)&&"Range"!==this.type&&this.createLimitBar(),g(this.limitBarFirst)&&g(this.limitBarSecond)&&"Range"===this.type&&this.createLimitBar(),this.setLimitBar(),this.setValue()):(g(this.limitBarFirst)||ee(this.limitBarFirst),g(this.limitBarSecond)||ee(this.limitBarSecond))},t.prototype.getPersistData=function(){return this.addOnPersist(["value"])},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.unwireEvents(),window.removeEventListener("resize",this.onresize),X([this.sliderContainer],[jh]),this.firstHandle.removeAttribute("aria-orientation"),"Range"===this.type&&this.secondHandle.removeAttribute("aria-orientation"),this.sliderContainer.parentNode&&this.sliderContainer.parentNode.insertBefore(this.element,this.sliderContainer),ee(this.sliderContainer),this.tooltip.isVisible&&this.tooltipObj.destroy(),this.element.innerHTML="",this.hiddenInput=null,this.sliderContainer=null,this.sliderTrack=null,this.rangeBar=null,this.firstHandle=null,this.secondHandle=null,this.tickElementCollection=null,this.ul=null,this.firstBtn=null,this.secondBtn=null,this.materialHandle=null,this.tooltipObj=null,this.tooltipTarget=null,this.limitBarFirst=null,this.limitBarSecond=null,this.firstChild=null,this.lastChild=null,this.tooltipElement=null},t.prototype.onPropertyChanged=function(e,t){for(var i=this,n=0,o=Object.keys(e);n<o.length;n++){var r=o[n];switch(r){case"cssClass":this.setCSSClass(t.cssClass);break;case"value":if(e&&t){var s=g(e.value)?"Range"===this.type?[this.min,this.max]:this.min:e.value;this.setProperties({value:s},!0),g(t.value)||t.value.toString()===s.toString()||(this.setValue(),this.refreshTooltip(this.tooltipTarget),"Range"===this.type&&(g(e.value)||t.value[1]===s[1]?this.activeHandle=1:this.activeHandle=2))}break;case"min":case"step":case"max":this.setMinMaxValue();break;case"tooltip":g(e.tooltip)||g(t.tooltip)||(this.initialTooltip=!0,this.setTooltip(r),this.showButtons||this.wireEvents());break;case"type":g(t)||!Object.keys(t).length||g(t.type)||(this.changeSliderType(t.type,r),this.setZindex());break;case"enableRtl":t.enableRtl!==e.enableRtl&&"Vertical"!==this.orientation&&(this.rtl=t.enableRtl,this.changeRtl());break;case"limits":this.limitsPropertyChange();break;case"orientation":this.changeOrientation();break;case"ticks":g(this.sliderContainer.querySelector("."+Eh))||(ee(this.ul),Array.prototype.forEach.call(this.sliderContainer.classList,(function(e){e.match(/e-scale-/)&&i.sliderContainer.classList.remove(e)}))),"None"!==this.ticks.placement&&(this.renderScale(),this.setZindex());break;case"locale":this.showButtons&&this.buttonTitle();break;case"showButtons":e.showButtons?(this.setButtons(),this.reposition(),this.enabled&&!this.readonly&&this.wireButtonEvt(!1)):this.firstBtn&&this.secondBtn&&(this.sliderContainer.removeChild(this.firstBtn),this.sliderContainer.removeChild(this.secondBtn),this.sliderContainer.classList.remove(ed),this.firstBtn=void 0,this.secondBtn=void 0,this.reposition());break;case"enabled":this.setEnabled();break;case"readonly":this.setReadOnly();break;case"customValues":this.setValue(),this.reposition();break;case"colorRange":this.reposition();break;case"width":this.setElementWidth(e.width),this.setMinMaxValue(),this.limits&&this.limitsPropertyChange()}}},t.prototype.setReadOnly=function(){this.readonly?(this.unwireEvents(),this.sliderContainer.classList.add(cd)):(this.wireEvents(),this.sliderContainer.classList.remove(cd))},t.prototype.setMinMaxValue=function(){var e=this;this.setValue(),this.refreshTooltip(this.tooltipTarget),g(this.sliderContainer.querySelector("."+Eh))||this.ul&&(ee(this.ul),Array.prototype.forEach.call(this.sliderContainer.classList,(function(t){t.match(/e-scale-/)&&e.sliderContainer.classList.remove(t)}))),"None"!==this.ticks.placement&&(this.renderScale(),this.setZindex())},t.prototype.setZindex=function(){this.zIndex=6,g(this.ticks)||"None"===this.ticks.placement||g(this.ul)||g(this.element)||(this.ul.style.zIndex=this.zIndex+-7+"",this.element.style.zIndex=this.zIndex+2+""),this.isMaterial||this.isMaterial3||g(this.ticks)||"Both"!==this.ticks.placement||(this.element.style.zIndex=this.zIndex+2+""),g(this.firstHandle)||(this.firstHandle.style.zIndex=this.zIndex+3+""),"Range"!==this.type||g(this.secondHandle)||(this.secondHandle.style.zIndex=this.zIndex+4+"")},t.prototype.setTooltip=function(e){this.changeSliderType(this.type,e)},t.prototype.setBarColor=function(){for(var e,t,i=this.sliderTrack.lastElementChild;i;)this.sliderTrack.removeChild(i),i=this.sliderTrack.lastElementChild;for(var n=0;n<this.colorRange.length;n++)if(!g(this.colorRange[n].start)&&!g(this.colorRange[n].end)&&this.colorRange[n].end>this.colorRange[n].start){this.colorRange[n].start<this.min&&(this.colorRange[n].start=this.min),this.colorRange[n].end>this.max&&(this.colorRange[n].end=this.max);var o=this.checkHandlePosition(this.colorRange[n].start),r=this.checkHandlePosition(this.colorRange[n].end),s=this.createElement("div");s.style.backgroundColor=this.colorRange[n].color,s.style.border="1px solid "+this.colorRange[n].color,"Horizontal"===this.orientation?(t=Fh,e=this.enableRtl?g(this.customValues)?this.checkHandlePosition(this.max)-this.checkHandlePosition(this.colorRange[n].end):this.checkHandlePosition(this.customValues.length-this.colorRange[n].end-1):this.checkHandlePosition(this.colorRange[n].start),s.style.width=r-o+"px",s.style.left=e+"px"):(t=Yh,e=this.checkHandlePosition(this.colorRange[n].start),s.style.height=r-o+"px",s.style.bottom=e+"px"),s.classList.add(t),this.sliderTrack.appendChild(s)}},t.prototype.getModuleName=function(){return"slider"},ch([De(null)],t.prototype,"value",void 0),ch([De(null)],t.prototype,"customValues",void 0),ch([De(1)],t.prototype,"step",void 0),ch([De(null)],t.prototype,"width",void 0),ch([De(0)],t.prototype,"min",void 0),ch([De(100)],t.prototype,"max",void 0),ch([De(!1)],t.prototype,"readonly",void 0),ch([De("Default")],t.prototype,"type",void 0),ch([Le([{}],dh)],t.prototype,"colorRange",void 0),ch([Te({},hh)],t.prototype,"ticks",void 0),ch([Te({},ph)],t.prototype,"limits",void 0),ch([De(!0)],t.prototype,"enabled",void 0),ch([Te({},uh)],t.prototype,"tooltip",void 0),ch([De(!1)],t.prototype,"showButtons",void 0),ch([De(!0)],t.prototype,"enableAnimation",void 0),ch([De("Horizontal")],t.prototype,"orientation",void 0),ch([De("")],t.prototype,"cssClass",void 0),ch([De(!0)],t.prototype,"enableHtmlSanitizer",void 0),ch([Se()],t.prototype,"created",void 0),ch([Se()],t.prototype,"change",void 0),ch([Se()],t.prototype,"changed",void 0),ch([Se()],t.prototype,"renderingTicks",void 0),ch([Se()],t.prototype,"renderedTicks",void 0),ch([Se()],t.prototype,"tooltipChange",void 0),t=ch([Ie],t)}(St),yd=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vd=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};function bd(e,t){for(var i=m({},e),n=0,o=Object.keys(i);n<o.length;n++){var r=o[n];t.indexOf(r)<0&&c(i,r)}return i}function Md(e,t){var i=40===t?0:e.childElementCount-1,n=i,o=e.querySelector(".e-selected");o&&o.classList.remove("e-selected");for(var r=0,s=e.children.length;r<s;r++)e.children[r].classList.contains("e-focused")&&(n=r,e.children[r].classList.remove("e-focused"),40===t?n++:n--,n===(40===t?e.childElementCount:-1)&&(n=i));-1!==(n=Nd(e,e.children[n],n,t))&&(G([e.children[n]],"e-focused"),e.children[n].focus())}function Nd(e,t,i,n,o){if(void 0===o&&(o=0),(t.classList.contains("e-separator")||t.classList.contains("e-disabled"))&&(i===(40===n?e.childElementCount-1:0)?i=40===n?0:e.childElementCount-1:40===n?i++:i--),(t=e.children[i]).classList.contains("e-separator")||t.classList.contains("e-disabled")){if(++o===e.childElementCount)return-1;i=Nd(e,t,i,n,o)}return i}var Cd=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yd(t,e),vd([De("")],t.prototype,"iconCss",void 0),vd([De("")],t.prototype,"id",void 0),vd([De(!1)],t.prototype,"separator",void 0),vd([De("")],t.prototype,"text",void 0),vd([De("")],t.prototype,"url",void 0),vd([De(!1)],t.prototype,"disabled",void 0),t}(Qe),Ed=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Dd=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Td="e-menu-icon",Ld="e-item",Sd="e-dropdown-popup",Id="e-separator",wd="e-vertical",xd="e-dropdown-popup-width",jd=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ed(t,e),Dd([De("SlideDown")],t.prototype,"effect",void 0),Dd([De(400)],t.prototype,"duration",void 0),Dd([De("ease")],t.prototype,"easing",void 0),t}(Qe),Od=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.isPopupCreated=!0,n}return Ed(t,e),t.prototype.preRender=function(){},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.createPopupOnClick&&!this.isPopupCreated?(this.createPopup(),this.openPopUp()):this.closePopup()},t.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},t.prototype.addItems=function(e,t){for(var i,n=this.items.length,o=0,r=this.items.length;o<r;o++)if(t===this.items[o].text){n=o;break}for(var s=e.length-1;s>=0;s--)i=new Cd(this,"items",e[s],!0),this.items.splice(n,0,i);this.canOpen()||this.createItems()},t.prototype.removeItems=function(e,t){for(var i=!1,n=0,o=e.length;n<o;n++)for(var r=0,s=this.items.length;r<s;r++)if(e[n]===(t?this.items[r].id:this.items[r].text)){this.items.splice(r,1),i=!0;break}i&&this.getULElement()&&this.createItems()},t.prototype.createPopup=function(){var e,t=this.createElement("div",{className:"auto"!==this.popupWidth?Sd+" "+xd:Sd,id:this.element.id+"-popup"});if(document.body.appendChild(t),this.dropDown=new da(t,{width:this.popupWidth,relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),this.dropDown.element.setAttribute("role","dialog"),this.dropDown.element.setAttribute("aria-label","dropdown menu"),g(this.popupContent)||(this.popupContent.style.display=""),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),ie(this.element,((e={})["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e.type="button",e)),this.cssClass&&G([t],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.isPopupCreated=!0,this.createPopupOnClick){var i=ue(this.activeElem[0],"split-btn");i&&(i.isPopupCreated=!0)}},t.prototype.getTargetElement=function(){return!this.createPopupOnClick||this.isColorPicker()||g(this.popupContent)?"string"==typeof this.target?ne(this.target):this.target:this.popupContent},t.prototype.createItems=function(e){var t,i,n,o,r=this,s=this.items,a=this.hasIcon(this.items,"iconCss"),l=this.getULElement();if(l?l.innerHTML="":l=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}}),this.itemTemplate){var c=this.compiletemplate(this.itemTemplate);s.forEach((function(e){var t=r.createElement("li",{className:e.separator?Ld+" "+Id:Ld,attrs:e.separator?{role:"separator",tabindex:"-1","aria-label":"separator","aria-hidden":"true"}:{role:"menuitem",tabindex:"-1","aria-label":e.text},id:e.id?e.id:y("e-"+r.getModuleName()+"-item")}),i=c(e,r,"template",null,!1,null,t);i&&$(i,t),e.disabled&&t.classList.add("e-disabled");var n={item:e,element:t};r.trigger("beforeItemRender",n),n.item.disabled!==e.disabled&&t.classList[n.item.disabled?"add":"remove"]("e-disabled"),l.appendChild(t)})),this.isReact&&this.renderReactTemplates()}else for(var h=0;h<s.length;h++){var d=(i=s[h]).text;n=this.createElement("li",{innerHTML:i.url?"":d,className:i.separator?Ld+" "+Id:Ld,attrs:i.separator?{role:"separator",tabindex:"-1","aria-label":"separator","aria-hidden":"true"}:{role:"menuitem",tabindex:"-1","aria-label":d},id:i.id?i.id:y("e-"+this.getModuleName()+"-item")}),this.enableHtmlSanitizer?n.textContent=i.url?"":d:n.innerHTML=i.url?"":d,i.url&&(n.appendChild(this.createAnchor(i)),n.classList.add("e-url")),i.iconCss?(t=this.createElement("span",{className:Td+" "+i.iconCss}),i.url?n.childNodes[0].appendChild(t):n.insertBefore(t,n.childNodes[0])):a&&!i.separator&&n.classList.add("e-blank-icon");var p=i.disabled;i.disabled&&n.classList.add("e-disabled"),o={item:i,element:n},this.trigger("beforeItemRender",o),p!==o.item.disabled&&(o.item.disabled?n.classList.add("e-disabled"):n.classList.remove("e-disabled")),l.appendChild(n)}e&&this.getPopUpElement().appendChild(l),a&&function(e){var t=[].slice.call(e.getElementsByClassName("e-blank-icon"));if(t.length){var i=e.querySelector(".e-item:not(.e-blank-icon):not(.e-separator)");if(!g(i)){i.classList.contains("e-url")&&(i=i.querySelector(".e-menu-url"));var n,o=i.querySelector(".e-menu-icon"),r=e.classList.contains("e-rtl");n=r?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"};var s=parseInt(getComputedStyle(o).fontSize,10)+parseInt(getComputedStyle(o)[n.margin],10)+parseInt(getComputedStyle(i).paddingLeft,10)+"px";t.forEach((function(e){e.classList.contains("e-url")&&e.querySelector(".e-menu-url")?e.querySelector(".e-menu-url").style[n.padding]=s:e.style[n.padding]=s}))}}}(this.getPopUpElement())},t.prototype.compiletemplate=function(e){if(this.itemTemplate)try{if("function"!=typeof this.itemTemplate){var t=document.querySelector(this.itemTemplate);if(t)return yi(t.innerHTML.trim())}return yi(e)}catch(t){return yi(e)}},t.prototype.hasIcon=function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i][""+t])return!0;return!1},t.prototype.createAnchor=function(e){var t=this.enableHtmlSanitizer?Si.sanitize(e.text):e.text;return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:t,attrs:{href:e.url}})},t.prototype.initialize=function(){this.button=new Cs({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=y("e-"+this.getModuleName())),this.appendArrowSpan(),this.setActiveElem([this.element]),this.element.setAttribute("tabindex","0"),this.element.setAttribute("aria-label",this.element.textContent?this.element.textContent:"dropdownbutton"),this.target&&!this.isColorPicker()&&!this.createPopupOnClick||!this.createPopupOnClick?this.createPopup():(this.isPopupCreated=!1,this.target&&!this.isColorPicker()&&this.createPopupOnClick&&(this.popupContent=this.getTargetElement(),this.popupContent.style.display="none"))},t.prototype.isColorPicker=function(){if(!this.element)return!1;var e=this.element.previousSibling;return!!(e&&e.classList&&e.classList.contains("e-split-colorpicker"))},t.prototype.appendArrowSpan=function(){this.cssClass=g(this.cssClass)?"":this.cssClass,this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(wd)>-1?"bottom":"right")+" e-caret"}))},t.prototype.setActiveElem=function(e){this.activeElem=e},t.prototype.getModuleName=function(){return"dropdown-btn"},t.prototype.canOpen=function(){var e=!1;return this.isPopupCreated&&(e=this.getPopUpElement().classList.contains("e-popup-close")),e},t.prototype.destroy=function(){var t,i=this;(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName())&&(this.element.querySelector("span.e-caret")&&ee(this.element.querySelector("span.e-caret")),this.cssClass&&(t=this.cssClass.split(" ")),this.button.destroy(),t&&X([this.element],t),X(this.activeElem,["e-active"]),(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach((function(e){i.element.removeAttribute(e)})),this.popupUnWireEvents(),this.destroyPopup(),this.isPopupCreated=!1,this.disabled||this.unWireEvents())},t.prototype.destroyPopup=function(){if(this.isPopupCreated){if(this.dropDown.destroy(),this.getPopUpElement()){var e=document.getElementById(this.getPopUpElement().id);e&&(X([e],["e-popup-open","e-popup-close"]),ee(e))}q.remove(this.getPopUpElement(),"click",this.clickHandler),q.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.isPopupCreated&&this.dropDown&&(this.dropDown.element=null,this.dropDown=void 0)}this.isPopupCreated=!1;var t=ue(this.activeElem[0],"split-btn");if(this.createPopupOnClick&&t){var i=ue(this.activeElem[1],"dropdown-btn");i&&(i.isPopupCreated=!1)}},t.prototype.getPopUpElement=function(){var e=null;if(!this.dropDown&&this.activeElem[0].classList.contains("e-split-btn")){var t=ue(this.activeElem[1],"dropdown-btn");t&&(this.dropDown=t.dropDown)}return this.dropDown&&(e=this.dropDown.element),e},t.prototype.getULElement=function(){var e=null;return this.getPopUpElement()&&(e=this.getPopUpElement().children[0]),e},t.prototype.wireEvents=function(){this.delegateMousedownHandler=this.mousedownHandler.bind(this),this.createPopupOnClick||q.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),q.add(this.element,"click",this.clickHandler,this),q.add(this.element,"keydown",this.keyBoardHandler,this),q.add(window,"resize",this.windowResize,this)},t.prototype.windowResize=function(){!this.canOpen()&&this.dropDown&&this.dropDown.refreshPosition(this.element)},t.prototype.popupWireEvents=function(){this.delegateMousedownHandler||(this.delegateMousedownHandler=this.mousedownHandler.bind(this));var e=this.getPopUpElement();this.createPopupOnClick&&q.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),e&&(q.add(e,"click",this.clickHandler,this),q.add(e,"keydown",this.keyBoardHandler,this),this.closeActionEvents&&q.add(e,this.closeActionEvents,this.focusoutHandler,this)),this.rippleFn=Re(e,{selector:"."+Ld})},t.prototype.popupUnWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&q.remove(document,"mousedown touchstart",this.delegateMousedownHandler),e&&e.parentElement&&(q.remove(e,"click",this.clickHandler),q.remove(e,"keydown",this.keyBoardHandler),this.closeActionEvents&&q.remove(e,this.closeActionEvents,this.focusoutHandler))},t.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},t.prototype.isSafari=function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},t.prototype.upDownKeyHandler=function(e){(!this.target||38!==e.keyCode&&40!==e.keyCode)&&(e.preventDefault(),Md(this.getULElement(),e.keyCode))},t.prototype.keyEventHandler=function(e){if(!this.target||13!==e.keyCode&&9!==e.keyCode)return 13===e.keyCode&&this.activeElem[0].classList.contains("e-split-btn")?(this.triggerSelect(e),void this.activeElem[0].focus()):void(e.target&&e.target.className.indexOf("e-edit-template")>-1&&32===e.keyCode||(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e)))},t.prototype.getLI=function(e){return"LI"===e.tagName?e:se(e,"li")},t.prototype.mousedownHandler=function(e){var t=e.target;!this.dropDown||this.canOpen()||!this.getPopUpElement()||se(t,'[id="'+this.getPopUpElement().id+'"]')||se(t,'[id="'+this.element.id+'"]')||this.closePopup(e)},t.prototype.focusoutHandler=function(e){if(this.isPopupCreated&&!this.canOpen()){var t=e.relatedTarget||e.target;if(t&&t.className.indexOf("e-item")>-1){var i=this.getLI(t);if(i){var n=Array.prototype.indexOf.call(this.getULElement().children,i),o=this.items[n];if(o){var r={element:i,item:o,event:e};this.trigger("select",r)}}}this.closePopup(e)}},t.prototype.clickHandler=function(e){var t=e.target;se(t,'[id="'+this.element.id+'"]')?!this.createPopupOnClick||this.target&&""!==this.target&&!this.isColorPicker()&&!this.createPopupOnClick?this.getPopUpElement().classList.contains("e-popup-close")?this.openPopUp(e):this.closePopup(e):this.isPopupCreated?this.closePopup(e,this.activeElem[0]):(this.createPopup(),this.openPopUp(e)):se(t,'[id="'+this.getPopUpElement().id+'"]')&&this.getLI(e.target)&&(this.triggerSelect(e),this.closePopup(e,this.activeElem[0]))},t.prototype.triggerSelect=function(e){var t,i,n,o=this.getLI(e.target);o&&(i=Array.prototype.indexOf.call(this.getULElement().children,o),(n=this.items[i])&&(t={element:o,item:n,event:e},this.trigger("select",t)))},t.prototype.openPopUp=function(e){var t=this;void 0===e&&(e=null);var i=this.getPopUpElement();if(this.activeElem[0]&&this.activeElem[0].classList.contains("e-dropdown-btn")&&i.style.width&&"auto"!==i.style.width&&this.setWidth(i),this.target)if(this.activeElem.length>1){var n=ue(this.activeElem[0],"split-btn");n.isReact&&i.childNodes.length<1&&(n.appendReactElement&&n.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates())}else this.isReact&&i.childNodes.length<1&&(this.appendReactElement&&this.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates());else this.createItems(!0);var o=this.getULElement();this.popupWireEvents();var r={element:o,items:this.items,event:e,cancel:!1};this.trigger("beforeOpen",r,(function(e){if(!e.cancel){var i=t.getULElement(),n="None"!==t.animationSettings.effect?{name:t.animationSettings.effect,duration:t.animationSettings.duration,timingFunction:t.animationSettings.easing}:null;if(n&&t.animatePopup(n,i),t.dropDown.show(null,t.element),G([t.element],"e-active"),t.element.setAttribute("aria-expanded","true"),t.element.setAttribute("aria-owns",t.getPopUpElement().id),i&&!t.isSafari()&&i.focus(),t.enableRtl&&"0px"!==i.parentElement.style.left){var o=void 0;o=t.element.parentElement&&t.element.parentElement.classList.contains("e-split-btn-wrapper")?t.element.parentElement.offsetWidth:t.element.offsetWidth;var r=i.parentElement.offsetWidth-o,s=parseFloat(i.parentElement.style.left)-r;s<0&&(s=0),i.parentElement.style.left=s+"px"}var a={element:i,items:t.items};t.trigger("open",a),i&&t.isSafari()&&i.focus()}}))},t.prototype.animatePopup=function(e,t){new Pe(e).animate(t,{begin:function(e){e.element.parentElement.style.height=e.element.parentElement.offsetHeight+"px"}})},t.prototype.setWidth=function(e){var t=N(e.style.width);if(t.indexOf("%")>-1){var i=this.element.offsetWidth*parseFloat(t)/100;e.style.width=i+"px"}},t.prototype.closePopup=function(e,t){var i=this;void 0===e&&(e=null);var n=this.getULElement(),o={element:n,items:this.items,event:e,cancel:!1};this.trigger("beforeClose",o,(function(e){if(e.cancel)n&&n.focus();else{var o=i.getPopUpElement();o&&q.remove(o,"keydown",i.keyBoardHandler),i.popupUnWireEvents();var r=i.getULElement(),s=void 0;r&&(s=r.querySelector(".e-selected")),s&&s.classList.remove("e-selected"),i.dropDown&&i.dropDown.hide(),X(i.activeElem,"e-active"),i.element.setAttribute("aria-expanded","false"),i.element.removeAttribute("aria-owns"),t&&t.focus();var a={element:r,items:i.items};i.trigger("close",a),!i.target&&r&&ee(r),(!i.target||i.isColorPicker()||i.target&&!i.isColorPicker())&&i.createPopupOnClick&&i.destroyPopup()}}))},t.prototype.unWireEvents=function(){this.createPopupOnClick||q.remove(document,"mousedown touchstart",this.delegateMousedownHandler),q.remove(this.element,"click",this.clickHandler),q.remove(this.element,"keydown",this.keyBoardHandler),this.isPopupCreated&&(q.remove(this.getPopUpElement(),"click",this.clickHandler),q.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler)),q.remove(window,"resize",this.windowResize)},t.prototype.onPropertyChanged=function(e,t){var i;this.button.setProperties(bd(e,["content","cssClass","iconCss","iconPosition","disabled","enableRtl"])),this.isPopupCreated&&(i=this.getPopUpElement(),this.dropDown.setProperties(bd(e,["enableRtl"])));for(var n=0,o=Object.keys(e);n<o.length;n++){switch(o[n]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.isPopupCreated&&!this.canOpen()&&this.closePopup()):this.wireEvents();break;case"cssClass":if(t.cssClass=g(t.cssClass)?"":t.cssClass,e.cssClass.indexOf(wd)>-1||t.cssClass.indexOf(wd)>-1){this.element.querySelector("span.e-caret")||this.appendArrowSpan();var r=this.element.querySelector("span.e-caret");e.cssClass.indexOf(wd)>-1?le(r,["e-icon-bottom"],["e-icon-right"]):le(r,["e-icon-right"],["e-icon-bottom"])}this.isPopupCreated&&(t.cssClass&&X([i],t.cssClass.split(" ")),e.cssClass&&G([i],e.cssClass.replace(/\s+/g," ").trim().split(" ")));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.isPopupCreated&&this.getULElement()&&this.createItems();break;case"createPopupOnClick":e.createPopupOnClick?this.destroyPopup():this.createPopup()}}},t.prototype.focusIn=function(){this.element.focus()},Dd([De("")],t.prototype,"content",void 0),Dd([De("")],t.prototype,"cssClass",void 0),Dd([De(!1)],t.prototype,"disabled",void 0),Dd([De("")],t.prototype,"iconCss",void 0),Dd([De("Left")],t.prototype,"iconPosition",void 0),Dd([De(!0)],t.prototype,"enableHtmlSanitizer",void 0),Dd([Le([],Cd)],t.prototype,"items",void 0),Dd([De(!1)],t.prototype,"createPopupOnClick",void 0),Dd([De("")],t.prototype,"target",void 0),Dd([De("")],t.prototype,"closeActionEvents",void 0),Dd([De(null)],t.prototype,"itemTemplate",void 0),Dd([De("auto")],t.prototype,"popupWidth",void 0),Dd([Te({effect:"None"},jd)],t.prototype,"animationSettings",void 0),Dd([Se()],t.prototype,"beforeItemRender",void 0),Dd([Se()],t.prototype,"beforeOpen",void 0),Dd([Se()],t.prototype,"beforeClose",void 0),Dd([Se()],t.prototype,"close",void 0),Dd([Se()],t.prototype,"open",void 0),Dd([Se()],t.prototype,"select",void 0),Dd([Se()],t.prototype,"created",void 0),t=Dd([Ie],t)}(St),zd=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ad=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},kd="e-rtl",Pd="EJS-SPLITBUTTON",Rd=function(e){function t(t,i){return e.call(this,t,i)||this}return zd(t,e),t.prototype.preRender=function(){var e=this.element;if(e.tagName===Pd){for(var t=a("ej2_instances",e),i=this.createElement("button",{attrs:{type:"button"}}),n=this.createElement(Pd,{className:"e-"+this.getModuleName()+"-wrapper"}),o=0,r=e.attributes.length;o<r;o++)i.setAttribute(e.attributes[o].nodeName,e.attributes[o].nodeValue);e.parentNode.insertBefore(n,e),ee(e),e=i,n.appendChild(e),l("ej2_instances",t,e),this.wrapper=n,this.element=e}this.element.id||(this.element.id=y("e-"+this.getModuleName()))},t.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.renderControl()},t.prototype.renderControl=function(){this.createSecondaryButton(),this.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents(),this.renderComplete()},t.prototype.addItems=function(t,i){e.prototype.addItems.call(this,t,i),this.secondaryBtnObj.items=this.items},t.prototype.removeItems=function(t,i){e.prototype.removeItems.call(this,t,i),this.secondaryBtnObj.items=this.items},t.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add(kd),this.cssClass&&G([this.wrapper],this.cssClass.replace(/\s+/g," ").trim().split(" "))},t.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new Cs(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},t.prototype.createSecondaryButton=function(){var e=this,t=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(t);var i={cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,createPopupOnClick:this.createPopupOnClick,beforeItemRender:function(t){e.createPopupOnClick&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown),e.trigger("beforeItemRender",t)},open:function(t){e.trigger("open",t)},close:function(t){e.trigger("close",t)},select:function(t){e.trigger("select",t)},beforeOpen:function(t){e.createPopupOnClick&&0===e.items.length&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown);var i=new Bd;return e.trigger("beforeOpen",t,(function(e){i.resolve(e)})),i},beforeClose:function(t){var i=new Bd;return e.trigger("beforeClose",t,(function(e){i.resolve(e)})),i}};this.secondaryBtnObj=new Od(i),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(t),this.createPopupOnClick||(this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown),this.isPopupCreated=this.secondaryBtnObj.isPopupCreated,this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.element],this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right"),this.disabled&&this.wrapper.classList.add("e-splitbtn-disabled")},t.prototype.setAria=function(){ie(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent?this.element.textContent+" splitbutton":"splitbutton","aria-owns":this.element.id+"_dropdownbtn-popup"})},t.prototype.getModuleName=function(){return"split-btn"},t.prototype.toggle=function(){this.secondaryBtnObj.toggle()},t.prototype.destroy=function(){var t=this,i=[kd];if(this.cssClass&&(i=i.concat(this.cssClass.split(" "))),this.element){var n=document.getElementById(this.element.id);n&&n.parentElement===this.wrapper&&(this.wrapper.tagName===Pd?(this.wrapper.innerHTML="",X([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),X([this.wrapper],this.cssClass.split(" "))):(X([this.element],i),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach((function(e){t.element.removeAttribute(e)})),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),te(this.wrapper)),this.unWireEvents())}this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element&&!this.element.getAttribute("class")&&this.element.removeAttribute("class"),this.refreshing&&this.isAngular&&(this.element=this.wrapper,["e-control","e-split-btn","e-lib"].forEach((function(e){t.element.classList.add(e)})),l("ej2_instances",[this],this.element)),this.wrapper=null},t.prototype.wireEvents=function(){q.add(this.element,"click",this.primaryBtnClickHandler,this),new Ht(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow",enter:"enter"}})},t.prototype.unWireEvents=function(){q.remove(this.element,"click",this.primaryBtnClickHandler),E(this.element,Ht).destroy()},t.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},t.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e);break;case"enter":this.clickHandler(e),this.getPopUpElement()&&!this.getPopUpElement().classList.contains("e-popup-close")?(this.element.classList.remove("e-active"),this.secondaryBtnObj.element.classList.add("e-active")):this.secondaryBtnObj.element.classList.remove("e-active")}},t.prototype.onPropertyChanged=function(e,t){var i=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(bd(e,i)),i=["beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl","createPopupOnClick"],Object.keys(e).indexOf("items")>-1&&(this.secondaryBtnObj.items=e.items,this.secondaryBtnObj.dataBind()),this.secondaryBtnObj.setProperties(bd(e,i));for(var n=0,o=Object.keys(e);n<o.length;n++){switch(o[n]){case"cssClass":t.cssClass&&X([this.wrapper],t.cssClass.split(" ")),G([this.wrapper],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?G([this.wrapper],kd):X([this.wrapper],kd);break;case"disabled":e.disabled?G([this.wrapper],"e-splitbtn-disabled"):X([this.wrapper],"e-splitbtn-disabled")}}},t.prototype.focusIn=function(){this.element.focus()},Ad([De("")],t.prototype,"content",void 0),Ad([De("")],t.prototype,"cssClass",void 0),Ad([De(!1)],t.prototype,"disabled",void 0),Ad([De("")],t.prototype,"iconCss",void 0),Ad([De("Left")],t.prototype,"iconPosition",void 0),Ad([De(!1)],t.prototype,"createPopupOnClick",void 0),Ad([Le([],Cd)],t.prototype,"items",void 0),Ad([De("")],t.prototype,"target",void 0),Ad([Se()],t.prototype,"beforeItemRender",void 0),Ad([Se()],t.prototype,"beforeOpen",void 0),Ad([Se()],t.prototype,"beforeClose",void 0),Ad([Se()],t.prototype,"click",void 0),Ad([Se()],t.prototype,"close",void 0),Ad([Se()],t.prototype,"open",void 0),Ad([Se()],t.prototype,"select",void 0),Ad([Se()],t.prototype,"created",void 0),t=Ad([Ie],t)}(Od),Bd=function(){var e=this;this.promise=new Promise((function(t,i){e.resolve=t,e.reject=i})),this.catch=this.promise.catch.bind(this.promise),this.then=this.promise.then.bind(this.promise)},Hd=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ud=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Fd="e-apply",Yd="e-cancel",Vd="e-current",Qd="e-ctrl-btn",qd="e-switch-ctrl-btn",Wd="e-disabled",_d="e-value-switch-btn",Gd="e-handler",Xd="e-hex",Kd="e-hide-hex-value",Zd="e-hide-opacity",Jd="e-hide-switchable-value",$d="e-hide-value",ep="e-hide-valueswitcher",tp="e-hsv-color",ip="e-hsv-container",np="e-selected-value",op="e-mode-switch-btn",rp="e-nocolor-item",sp="e-opacity-value",ap="e-palette",lp="e-color-palette",cp="e-color-picker",hp="e-preview-container",dp="e-previous",pp="e-show-value",up="e-selected",mp="e-split-preview",gp="e-tile",fp=["#000000","#f44336","#e91e63","#9c27b0","#673ab7","#2196f3","#03a9f4","#00bcd4","#009688","#ffeb3b","#ffffff","#ffebee","#fce4ec","#f3e5f5","#ede7f6","#e3f2fd","#e1f5fe","#e0f7fa","#e0f2f1","#fffde7","#f2f2f2","#ffcdd2","#f8bbd0","#e1bee7","#d1c4e9","#bbdefb","#b3e5fc","#b2ebf2","#b2dfdb","#fff9c4","#e6e6e6","#ef9a9a","#f48fb1","#ce93d8","#b39ddb","#90caf9","#81d4fa","#80deea","#80cbc4","#fff59d","#cccccc","#e57373","#f06292","#ba68c8","#9575cd","#64b5f6","#4fc3f7","#4dd0e1","#4db6ac","#fff176","#b3b3b3","#ef5350","#ec407a","#ab47bc","#7e57c2","#42a5f5","#29b6f6","#26c6da","#26a69a","#ffee58","#999999","#e53935","#d81b60","#8e24aa","#5e35b1","#1e88e5","#039be5","#00acc1","#00897b","#fdd835","#808080","#d32f2f","#c2185b","#7b1fa2","#512da8","#1976d2","#0288d1","#0097a7","#00796b","#fbc02d","#666666","#c62828","#ad1457","#6a1b9a","#4527a0","#1565c0","#0277bd","#00838f","#00695c","#f9a825","#4d4d4d","#b71c1c","#880e4f","#4a148c","#311b92","#0d47a1","#01579b","#006064","#004d40","#f57f17"],yp=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.recentColors=[],n}return Hd(t,e),t.prototype.preRender=function(){var e=this.element;this.formElement=se(this.element,"form"),this.formElement&&q.add(this.formElement,"reset",this.formResetHandler,this);this.l10n=new Ut("colorpicker",{Apply:"Apply",Cancel:"Cancel",ModeSwitcher:"Switch Mode",RecentColors:"Recent colors"},this.locale),e.getAttribute("ejs-for")&&!e.getAttribute("name")&&e.setAttribute("name",e.id)},t.prototype.render=function(){this.initWrapper(),this.inline?this.createWidget():this.createSplitBtn(),this.enableOpacity||G([this.container.parentElement],Zd),this.renderComplete()},t.prototype.initWrapper=function(){var e=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"});this.element.parentNode.insertBefore(e,this.element),e.appendChild(this.element),ie(this.element,{tabindex:"-1",spellcheck:"false","aria-label":"colorpicker"}),this.container=this.createElement("div",{className:"e-container"}),this.getWrapper().appendChild(this.container);var t=this.value?this.roundValue(this.value).toLowerCase():"#008000ff";this.noColor&&"Palette"===this.mode&&""===this.value&&(t="");var i=t.slice(0,7);g(this.initialInputValue)&&(this.initialInputValue=i),this.element.value=i,this.enableOpacity?this.setProperties({value:t},!0):this.setProperties({value:i},!0),this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&G([e],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.tileRipple=Re(this.container,{selector:"."+gp}),this.ctrlBtnRipple=Re(this.container,{selector:".e-btn"})},t.prototype.getWrapper=function(){return this.element.parentElement},t.prototype.createWidget=function(){"Palette"===this.mode?(this.createPalette(),this.inline||this.firstPaletteFocus()):(this.createPicker(),this.inline||this.getDragHandler().focus()),this.isRgb=!0,this.createInput(),this.createCtrlBtn(),this.disabled||this.wireEvents(),this.inline&&this.disabled&&this.toggleDisabled(!0),Q.isDevice&&this.refreshPopupPos()},t.prototype.createSplitBtn=function(){var e=this,t=this.createElement("button",{className:"e-split-colorpicker"});this.getWrapper().appendChild(t),this.splitBtn=new Rd({iconCss:"e-selected-color",target:this.container,disabled:this.disabled,enableRtl:this.enableRtl,createPopupOnClick:this.createPopupOnClick,open:this.onOpen.bind(this),click:function(){var t=new MouseEvent("click",{bubbles:!0,cancelable:!1});e.trigger("change",{currentValue:{hex:e.value.slice(0,7),rgba:e.convertToRgbString(e.hexToRgb(e.value))},previousValue:{hex:null,rgba:null},value:e.value,event:t})}}),this.splitBtn.createElement=this.createElement,this.splitBtn.appendTo(t),this.splitBtn.element.setAttribute("aria-label","colorpicker");var i=this.createElement("span",{className:mp});ne(".e-selected-color",t).appendChild(i),i.style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value));var n=this.getPopupEle();if(G([n],"e-colorpicker-popup"),this.cssClass&&G([n],this.cssClass.replace(/\s+/g," ").trim().split(" ")),Q.isDevice&&!this.createPopupOnClick){var o=this.getPopupInst();o.relateTo=document.body,o.position={X:"center",Y:"center"},o.targetType="container",o.collision={X:"fit",Y:"fit"},o.offsetY=4,n.style.zIndex=ua(this.splitBtn.element).toString()}this.bindCallBackEvent()},t.prototype.onOpen=function(){if(this.trigger("open",{element:this.container}),!Q.isDevice){var e=this.getPopupInst();Ps(e.element).length>0&&(e.collision={X:"flip",Y:"fit"},e.position={X:"right",Y:"bottom"},e.targetType="container")}},t.prototype.getPopupInst=function(){return E(this.getPopupEle(),da)},t.prototype.bindCallBackEvent=function(){var e=this;this.splitBtn.beforeOpen=function(t){var i=new Bd;return e.trigger("beforeOpen",t,(function(n){if(!n.cancel){var o=e.getPopupEle();if(o.style.top=N(0+pageYOffset),o.style.left=N(0+pageXOffset),o.style.display="block",e.createWidget(),o.style.display="",Q.isDevice){if(e.createPopupOnClick){var r=e.getPopupInst();r.relateTo=document.body,r.position={X:"center",Y:"center"},r.targetType="container",r.collision={X:"fit",Y:"fit"},r.offsetY=4,o.style.zIndex=ua(e.splitBtn.element).toString()}e.modal=e.createElement("div"),e.modal.className="e-"+e.getModuleName()+" e-modal",e.modal.style.display="none",document.body.insertBefore(e.modal,o),document.body.className+=" e-colorpicker-overflow",e.modal.style.display="block",e.modal.style.zIndex=(Number(o.style.zIndex)-1).toString()}}t.cancel=n.cancel,i.resolve(n)})),i},this.splitBtn.beforeClose=function(t){var i=new Bd;if(g(t.event))i.resolve(t);else{var n={element:e.container,event:t.event,cancel:!1};e.trigger("beforeClose",n,(function(n){Q.isDevice&&t.event.target===e.modal&&(n.cancel=!0),n.cancel||e.onPopupClose(),t.cancel=n.cancel,i.resolve(n)}))}return i}},t.prototype.onPopupClose=function(){this.unWireEvents(),this.destroyOtherComp(),this.container.style.width="",ne("."+mp,this.splitBtn.element).style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value)),this.container.innerHTML="",X([this.container],[cp,lp]),Q.isDevice&&this.modal&&(X([document.body],"e-colorpicker-overflow"),this.modal.style.display="none",this.modal.outerHTML="",this.modal=null)},t.prototype.createPalette=function(){if(le(this.container,[lp],[cp]),this.presetColors){var e=this.createElement("div",{className:"e-custom-palette"});this.appendElement(e);var t=Object.keys(this.presetColors);if(1===t.length)this.appendPalette(this.presetColors[t[0]],t[0],e);else for(var i=0,n=t.length;i<n;i++)this.appendPalette(this.presetColors[t[i]],t[i],e);oe(".e-row",e).length>10&&G([e],"e-palette-group")}else this.appendPalette(fp,"default");"Palette"===this.mode&&!this.modeSwitcher&&this.noColor&&this.setNoColor(),this.showRecentColors&&this.recentColors&&this.recentColors.length>0&&this.renderRecentColor();var o=parseInt(getComputedStyle(this.container).borderBottomWidth,10);this.container.style.width=N(this.container.children[0].offsetWidth+o+o),this.rgb=this.hexToRgb(this.roundValue(this.value)),this.hsv=this.rgbToHsv.apply(this,this.rgb)},t.prototype.renderRecentColor=function(){var e=this,t=this.container.querySelector(".e-clr-pal-rec-wpr");t&&ee(t);var i=this.createElement("div",{className:"e-clr-pal-rec-wpr"}),n=this.container.querySelector(".e-switch-ctrl-btn");n?this.container.insertBefore(i,n):this.container.appendChild(i);var o=this.createElement("label",{className:"e-recent-clr-span"});if(o.textContent=this.l10n.getConstant("RecentColors"),i.appendChild(o),this.recentColors.length>0){for(this.recentColors=this.recentColors.filter((function(t,i){return e.recentColors.indexOf(t)===i}));this.recentColors.length>10;)this.recentColors.pop();this.appendPalette(this.recentColors,"recent-color",i)}},t.prototype.firstPaletteFocus=function(){ne("."+up,this.container.children[0])||oe("."+ap,this.container)[0].focus()},t.prototype.appendPalette=function(e,t,i){var n,o,r,s=this.createElement("div",{className:ap,attrs:{tabindex:"0",role:"grid"}});"recent-color"===t&&s.classList.add("e-recent-palette"),i?i.appendChild(s):this.appendElement(s);for(var a=0,l=e.length;a<l;a++)0!==a&&a%this.columns!=0||(n=this.createElement("div",{className:"e-row",attrs:{role:"row"}}),s.appendChild(n)),r=this.roundValue(e[a]).toLowerCase(),o=this.createElement("span",{className:gp,attrs:{role:"gridcell","aria-label":r,"aria-selected":"false"}}),this.trigger("beforeTileRender",{element:o,presetName:t,value:e[a]}),n.appendChild(o),this.value===r&&"recent-color"!==t&&(this.addTileSelection(o),s.focus()),o.style.backgroundColor=this.convertToRgbString(this.hexToRgb(r))},t.prototype.setNoColor=function(){var e=this.container.querySelector(".e-row").children[0];e.classList.add(rp),this.value||(e.classList.add(up),se(e,"."+ap).focus()),["aria-selected","aria-label"].forEach((function(t){e.removeAttribute(t)})),e.style.backgroundColor=""},t.prototype.appendElement=function(e,t){void 0===t&&(t=0);var i=this.container.children[t];i?this.container.insertBefore(e,i):this.container.appendChild(e)},t.prototype.addTileSelection=function(e){e&&(e.classList.add(up),e.setAttribute("aria-selected","true"))},t.prototype.createPicker=function(){le(this.container,[cp],[lp]);var e=this.createElement("div",{className:ip});this.appendElement(e),e.appendChild(this.createElement("div",{className:tp}));var t=this.createElement("span",{className:Gd,attrs:{tabindex:"0"}});e.appendChild(t),null!==this.value&&""!==this.value||(this.value="#008000ff"),this.rgb=this.hexToRgb(this.value),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.setHsvContainerBg(),this.setHandlerPosition(),this.createSlider(),this.createDragTooltip()},t.prototype.setHsvContainerBg=function(e){void 0===e&&(e=this.hsv[0]),this.getHsvContainer().style.backgroundColor=this.convertToRgbString(this.hsvToRgb(e,100,100,1))},t.prototype.getHsvContainer=function(){return ne("."+ip,this.container)},t.prototype.setHandlerPosition=function(){var e=this.getDragHandler(),t=ne("."+tp,this.container);this.enableRtl?e.style.left=N((t.offsetWidth-e.offsetWidth/2.5)*Math.abs(100-this.hsv[1])/100):e.style.left=N((t.offsetWidth-e.offsetWidth/2.5)*this.hsv[1]/100),e.style.top=N((t.offsetHeight-e.offsetHeight/2.5)*(100-this.hsv[2])/100)},t.prototype.createSlider=function(){var e=this.createElement("div",{className:"e-slider-preview"});this.appendElement(e,1),this.createPreview(e);var t=this.createElement("div",{className:"e-colorpicker-slider"});e.insertBefore(t,e.children[0]);var i=this.createElement("div",{className:"e-hue-slider"});t.appendChild(i),this.hueSlider=new fd({value:this.hsv[0],min:0,max:359,enableRtl:this.enableRtl,enabled:!this.disabled,change:this.hueChange.bind(this)}),this.hueSlider.createElement=this.createElement,this.hueSlider.appendTo(i),this.enableOpacity&&(i=this.createElement("div",{className:"e-opacity-slider"}),t.appendChild(i),this.createOpacitySlider(i))},t.prototype.createOpacitySlider=function(e){this.opacitySlider=new fd({value:100*this.rgb[3],min:0,max:100,enableRtl:this.enableRtl,enabled:!this.disabled,change:this.opacityChange.bind(this)}),this.opacitySlider.createElement=this.createElement,this.opacitySlider.appendTo(e);var t=this.createElement("div",{className:"e-opacity-empty-track"});e.appendChild(t),this.updateOpacitySliderBg()},t.prototype.updateOpacitySliderBg=function(){var e=this.enableRtl?"to left":"to right",t=ne(".e-opacity-empty-track",this.opacitySlider.element);t&&(t.style.background="linear-gradient("+e+", rgba("+this.rgb.slice(0,3)+", 0) 0%, "+this.convertToRgbString(this.rgb.slice(0,3))+" 100%)")},t.prototype.hueChange=function(e){this.hsv[0]=e.value,this.setHsvContainerBg(),this.convertToOtherFormat()},t.prototype.opacityChange=function(e){var t=e.value,i=this.rgbToHex(this.rgb);this.hsv[3]=t/100,this.rgb[3]=t/100;var n=this.rgbToHex(this.rgb);this.updateOpacityInput(t);var o=this.convertToRgbString(this.rgb);this.updatePreview(o),this.triggerEvent(n,i,o)},t.prototype.updateOpacityInput=function(e){if(this.enableOpacity&&!this.getWrapper().classList.contains($d)){var t=E(ne("."+sp,this.container),ah);t.value=e,t.dataBind()}},t.prototype.createPreview=function(e){var t=this.createElement("div",{className:hp});e.appendChild(t);var i=this.createElement("span",{className:"e-preview "+Vd});t.appendChild(i);var n=this.convertToRgbString(this.rgb);i.style.backgroundColor=n,i=this.createElement("span",{className:"e-preview "+dp}),t.appendChild(i),i.style.backgroundColor=n},t.prototype.isPicker=function(){return!this.container.classList.contains(lp)},t.prototype.getPopupEle=function(){return this.container.parentElement},t.prototype.createNumericInput=function(e,t,i,n){var o=this,r=new ah({value:t,placeholder:i,min:0,max:n,format:"###.##",showSpinButton:!1,floatLabelType:"Always",enableRtl:this.enableRtl,enabled:!this.disabled,readonly:!this.isPicker(),change:function(e){e.event&&o.inputHandler(e.event)}});r.createElement=this.createElement,r.appendTo(e)},t.prototype.createInput=function(){var e=this.isPicker(),t=this.getWrapper();if(e&&!t.classList.contains($d)||!e&&t.classList.contains(pp)){var i=this.createElement("div",{className:np});e?this.appendElement(i,2):this.appendElement(i,1);var n=this.createElement("div",{className:"e-input-container"});if(i.appendChild(n),t.classList.contains(ep)||this.appendValueSwitchBtn(i),!t.classList.contains(Kd)){var o=this.createElement("input",{className:Xd,attrs:{maxlength:"7",spellcheck:"false","aria-label":"HEX"}});n.appendChild(o),Il.createInput({element:o,floatLabelType:"Always",properties:{placeholder:"HEX",enableRtl:this.enableRtl,enabled:!this.disabled,readonly:!this.isPicker()}},this.createElement),Il.setValue(this.value.slice(0,7),o),o.addEventListener("input",this.inputHandler.bind(this))}if(!t.classList.contains(Jd)){var r=void 0,s=void 0;this.isRgb?(r="RGB",s=this.rgb):(r="HSV",s=this.hsv);for(var a=["rh","gs","bv"],l=0;l<3;l++)this.createNumericInput(n.appendChild(this.createElement("input",{className:"e-"+a[l]+"-value"})),s[l],r[l],255);this.enableOpacity&&this.appendOpacityValue(n)}}},t.prototype.appendOpacityValue=function(e){this.createNumericInput(e.appendChild(this.createElement("input",{className:sp})),100*this.rgb[3],"A",100)},t.prototype.appendValueSwitchBtn=function(e){var t=this.createElement("button",{className:"e-icons e-css e-btn e-flat e-icon-btn "+_d,attrs:{title:"Toggle format"}});e.appendChild(t),this.isPicker()&&!this.getWrapper().classList.contains(Jd)&&t.addEventListener("click",this.formatSwitchHandler.bind(this))},t.prototype.createCtrlBtn=function(){if(this.modeSwitcher||this.showButtons){this.l10n.setLocale(this.locale);var e=this.createElement("div",{className:qd});if(this.container.appendChild(e),this.showButtons){var t=this.createElement("div",{className:Qd});e.appendChild(t);var i=this.l10n.getConstant("Apply");t.appendChild(this.createElement("button",{innerHTML:i,className:"e-btn e-css e-flat e-primary e-small "+Fd,attrs:{title:i}}));var n=this.l10n.getConstant("Cancel");t.appendChild(this.createElement("button",{innerHTML:n,className:"e-btn e-css e-flat e-small "+Yd,attrs:{title:n}}))}this.modeSwitcher&&this.appendModeSwitchBtn()}},t.prototype.appendModeSwitchBtn=function(){var e=this.createElement("button",{className:"e-icons e-btn e-flat e-icon-btn "+op,attrs:{title:this.l10n.getConstant("ModeSwitcher")}});ne("."+qd,this.container).insertBefore(e,ne("."+Qd,this.container))},t.prototype.createDragTooltip=function(){var e=this,t=new Kl({opensOn:"Custom",showTipPointer:!1,cssClass:"e-color-picker-tooltip",htmlAttributes:{title:"tooltip"},beforeOpen:function(t){e.tooltipEle=t.element},animation:{open:{effect:"None"},close:{effect:"None"}}});t.createElement=this.createElement,t.appendTo(this.container),t.open(this.container),this.tooltipEle.style.zIndex=ua(this.tooltipEle).toString(),this.tooltipEle.setAttribute("aria-label","colorpicker-tooltip"),ne(".e-tip-content",this.tooltipEle).appendChild(this.createElement("div",{className:"e-tip-transparent"}))},t.prototype.getTooltipInst=function(){return E(this.container,Kl)},t.prototype.setTooltipOffset=function(e){this.getTooltipInst().offsetY=e},t.prototype.toggleDisabled=function(e){e?this.getWrapper().classList.add(Wd):this.getWrapper().classList.remove(Wd),this.showButtons&&[].slice.call(oe(".e-btn",this.container)).forEach((function(t){e?ie(t,{disabled:""}):t.removeAttribute("disabled")}))},t.prototype.convertToRgbString=function(e){return e.length?4===e.length?"rgba("+e.join()+")":"rgb("+e.join()+")":""},t.prototype.convertToHsvString=function(e){return 4===e.length?"hsva("+e.join()+")":"hsv("+e.join()+")"},t.prototype.updateHsv=function(){this.hsv[1]=this.hsv[1]>100?100:this.hsv[1],this.hsv[2]=this.hsv[2]>100?100:this.hsv[2],this.setHandlerPosition()},t.prototype.convertToOtherFormat=function(e,t){void 0===e&&(e=!1);var i=this.rgbToHex(this.rgb);this.rgb=this.hsvToRgb.apply(this,this.hsv);var n=this.rgbToHex(this.rgb),o=this.convertToRgbString(this.rgb);this.updatePreview(o),this.updateInput(n),this.triggerEvent(n,i,o,e,t)},t.prototype.updateInput=function(e){var t=this.getWrapper();t.classList.contains($d)||(t.classList.contains(Kd)||Il.setValue(e.substr(0,7),ne("."+Xd,this.container)),t.classList.contains(Jd)||(this.isRgb?this.updateValue(this.rgb,!1):this.updateValue(this.hsv,!1)))},t.prototype.updatePreview=function(e){this.enableOpacity&&this.updateOpacitySliderBg(),ne(".e-tip-transparent",this.tooltipEle).style.backgroundColor=e,ne("."+hp+" ."+Vd,this.container).style.backgroundColor=e,ne("."+hp+" ."+dp,this.container).style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value))},t.prototype.getDragHandler=function(){return ne("."+Gd,this.container)},t.prototype.removeTileSelection=function(){[].slice.call(oe("."+up,this.container)).forEach((function(e){e.classList.remove(up),e.setAttribute("aria-selected","false")}))},t.prototype.convertRgbToNumberArray=function(e){return e.slice(e.indexOf("(")+1,e.indexOf(")")).split(",").map((function(e,t){return 3!==t?parseInt(e,10):parseFloat(e)}))},t.prototype.getValue=function(e,t){if(e||(e=this.value),t=t?t.toLowerCase():"hex","r"===e[0]){var i=this.convertRgbToNumberArray(e);if("hex"===t||"hexa"===t){var n=this.rgbToHex(i);return"hex"===t?n.slice(0,7):n}return"hsv"===t?this.convertToHsvString(this.rgbToHsv.apply(this,i.slice(0,3))):"hsva"===t?this.convertToHsvString(this.rgbToHsv.apply(this,i)):"null"}if("h"===e[0]){i=this.hsvToRgb.apply(this,this.convertRgbToNumberArray(e));if("rgba"===t)return this.convertToRgbString(i);if("hex"===t||"hexa"===t){n=this.rgbToHex(i);return"hex"===t?n.slice(0,7):n}return"rgb"===t?this.convertToRgbString(i.slice(0,3)):"null"}e=this.roundValue(e);var o=this.hexToRgb(e);return"rgb"!==t&&"hsv"!==t||(o=o.slice(0,3)),"rgba"===t||"rgb"===t?this.convertToRgbString(o):"hsva"===t||"hsv"===t?this.convertToHsvString(this.rgbToHsv.apply(this,o)):"hex"===t?e.slice(0,7):"a"===t?o[3].toString():"null"},t.prototype.toggle=function(){this.container.parentElement.classList.contains("e-popup-close")?this.splitBtn.toggle():this.closePopup(null)},t.prototype.getModuleName=function(){return"colorpicker"},t.prototype.getPersistData=function(){return this.addOnPersist(["value"])},t.prototype.wireEvents=function(){if(this.isPicker()){var e=this.getDragHandler();q.add(e,"keydown",this.pickerKeyDown,this);var t=ne("."+Qd,this.container);t&&q.add(t,"keydown",this.ctrlBtnKeyDown,this),q.add(this.getHsvContainer(),"mousedown touchstart",this.handlerDown,this),(this.modeSwitcher||this.showButtons)&&this.addCtrlSwitchEvent(),q.add(ne("."+dp,this.container),"click",this.previewHandler,this)}else q.add(this.container,"click",this.paletteClickHandler,this),q.add(this.container,"keydown",this.paletteKeyDown,this)},t.prototype.formResetHandler=function(){this.value=this.initialInputValue,ie(this.element,{value:this.initialInputValue})},t.prototype.addCtrlSwitchEvent=function(){var e=ne("."+qd,this.container);e&&q.add(e,"click",this.btnClickHandler,this)},t.prototype.ctrlBtnKeyDown=function(e){if(13===e.keyCode){if(ne("."+Fd,this.container)){var t=this.rgbToHex(this.rgb);this.triggerChangeEvent(t)}this.splitBtn.element.focus()}},t.prototype.pickerKeyDown=function(e){switch(e.keyCode){case 39:this.handlerDragPosition(1,this.enableRtl?-1:1,e);break;case 37:this.handlerDragPosition(1,this.enableRtl?1:-1,e);break;case 38:this.handlerDragPosition(2,1,e);break;case 40:this.handlerDragPosition(2,-1,e);break;case 13:e.preventDefault();var t=this.rgbToHex(this.rgb);this.enterKeyHandler(t)}},t.prototype.enterKeyHandler=function(e){this.triggerChangeEvent(e),this.inline||this.splitBtn.element.focus()},t.prototype.closePopup=function(e){var t=this,i={element:this.container,event:e,cancel:!1};this.trigger("beforeClose",i,(function(e){e.cancel||(t.splitBtn.toggle(),t.onPopupClose())}))},t.prototype.triggerChangeEvent=function(e,t){var i=e.slice(0,7);this.trigger("change",{currentValue:{hex:i,rgba:this.convertToRgbString(this.rgb)},event:t,previousValue:{hex:this.value.slice(0,7),rgba:this.convertToRgbString(this.hexToRgb(this.value))},value:this.enableOpacity?e:i}),this.showRecentColors&&(this.recentColors.unshift(i),this.inline&&this.renderRecentColor()),this.enableOpacity?this.setProperties({value:e},!0):this.setProperties({value:i},!0),this.element.value=i||"#000000"},t.prototype.handlerDragPosition=function(e,t,i){i.preventDefault(),this.hsv[e]+=t*(i.ctrlKey?1:3),this.hsv[e]<0&&(this.hsv[e]=0),this.updateHsv(),this.convertToOtherFormat(!0,i)},t.prototype.handlerDown=function(e){e.preventDefault(),"mousedown"===e.type?(this.clientX=Math.abs(e.pageX-pageXOffset),this.clientY=Math.abs(e.pageY-pageYOffset),this.setTooltipOffset(8)):(this.clientX=Math.abs(e.changedTouches[0].pageX-pageXOffset),this.clientY=Math.abs(e.changedTouches[0].pageY-pageYOffset),this.setTooltipOffset(-8)),this.setHsv(this.clientX,this.clientY),this.getDragHandler().style.transition="left .4s cubic-bezier(.25, .8, .25, 1), top .4s cubic-bezier(.25, .8, .25, 1)",this.updateHsv(),this.convertToOtherFormat(!1,e),this.getDragHandler().focus(),q.add(document,"mousemove touchmove",this.handlerMove,this),q.add(document,"mouseup touchend",this.handlerEnd,this)},t.prototype.handlerMove=function(e){var t,i;"touchmove"!==e.type&&e.preventDefault(),"mousemove"===e.type?(t=Math.abs(e.pageX-pageXOffset),i=Math.abs(e.pageY-pageYOffset)):(t=Math.abs(e.changedTouches[0].pageX-pageXOffset),i=Math.abs(e.changedTouches[0].pageY-pageYOffset)),this.setHsv(t,i);var n=this.getDragHandler();this.updateHsv(),this.convertToOtherFormat(!1,e),this.getTooltipInst().refresh(n),this.tooltipEle.style.transform||(Math.abs(this.clientX-t)>8||Math.abs(this.clientY-i)>8)&&(ne("."+tp,this.container).style.cursor="pointer",n.style.transition="none",this.inline||(this.tooltipEle.style.zIndex=(parseInt(this.getPopupEle().style.zIndex,10)+1).toString()),this.tooltipEle.style.transform="rotate(45deg)",n.classList.add("e-hide-handler"))},t.prototype.setHsv=function(e,t){var i=ne("."+tp,this.container),n=i.getBoundingClientRect();e=this.enableRtl?e>n.right?0:Math.abs(e-n.right):e>n.left?Math.abs(e-n.left):0,t=t>n.top?Math.abs(t-n.top):0,this.hsv[2]=Math.round(10*Number(100*(i.offsetHeight-Math.max(0,Math.min(i.offsetHeight,t-i.offsetTop)))/i.offsetHeight))/10,this.hsv[1]=Math.round(10*Number(100*Math.max(0,Math.min(i.offsetWidth,e-i.offsetLeft))/i.offsetWidth))/10},t.prototype.handlerEnd=function(e){"touchend"!==e.type&&e.preventDefault(),q.remove(document,"mousemove touchmove",this.handlerMove),q.remove(document,"mouseup touchend",this.handlerEnd);var t=this.getDragHandler();ne("."+tp,this.container).style.cursor="",this.tooltipEle.style.transform&&(this.tooltipEle.style.transform="",t.classList.remove("e-hide-handler")),this.inline||this.showButtons||this.closePopup(e)},t.prototype.btnClickHandler=function(e){var t=e.target;se(t,"."+op)?(e.stopPropagation(),this.switchToPalette()):(t.classList.contains(Fd)||t.classList.contains(Yd))&&this.ctrlBtnClick(t,e)},t.prototype.switchToPalette=function(){this.trigger("beforeModeSwitch",{element:this.container,mode:"Palette"}),this.unWireEvents(),this.destroyOtherComp(),ee(ne(".e-slider-preview",this.container)),this.getWrapper().classList.contains($d)||te(ne("."+np,this.container)),ee(this.getHsvContainer()),this.createPalette(),this.firstPaletteFocus(),this.createInput(),this.refreshPopupPos(),this.element.parentElement&&this.element.parentElement.parentElement&&this.element.parentElement.parentElement.classList.contains("e-ie-ddb-popup")&&this.refreshImageEditorPopupPos(),this.wireEvents(),this.trigger("onModeSwitch",{element:this.container,mode:"Palette"})},t.prototype.refreshImageEditorPopupPos=function(){if(Q.isDevice){var e=this.getPopupEle();e.style.left=N(0+pageXOffset),e.style.top=N(0+pageYOffset);var t=document.querySelector("#"+this.element.parentElement.parentElement.id.split("-popup")[0]);t&&e.parentElement.ej2_instances[0].refreshPosition(t)}},t.prototype.refreshPopupPos=function(){if(!this.inline){var e=this.getPopupEle();e.style.left=N(0+pageXOffset),e.style.top=N(0+pageYOffset),this.getPopupInst().refreshPosition(this.splitBtn.element.parentElement)}},t.prototype.formatSwitchHandler=function(){this.isRgb?(this.updateValue(this.hsv,!0,3,[360,100,100]),this.isRgb=!1):(this.updateValue(this.rgb,!0,2),this.isRgb=!0)},t.prototype.updateValue=function(e,t,i,n){for(var o,r=["e-rh-value","e-gs-value","e-bv-value"],s=0,a=r.length;s<a;s++)(o=E(ne("."+r[s],this.container),ah)).value=Math.round(e[s]),t&&(o.placeholder=r[s].substr(i,1).toUpperCase(),o.max=n?n[s]:255),o.dataBind()},t.prototype.previewHandler=function(e){var t=e.target,i=this.rgbToHex(this.rgb);this.rgb=this.convertRgbToNumberArray(t.style.backgroundColor),this.rgb[3]||(this.rgb[3]=1);var n=this.rgbToHex(this.rgb),o=this.rgbToHsv.apply(this,this.rgb);o[0]!==this.hsv[0]&&(this.hueSlider.setProperties({value:o[0]},!0),this.hueSlider.refresh()),this.setHsvContainerBg(o[0]),this.enableOpacity&&o[3]!==this.hsv[3]&&(this.opacitySlider.setProperties({value:100*o[3]},!0),this.opacitySlider.refresh(),this.updateOpacitySliderBg()),this.hsv=o,this.setHandlerPosition(),this.updateInput(n),ne("."+hp+" ."+Vd,this.container).style.backgroundColor=this.convertToRgbString(this.rgb),this.triggerEvent(n,i,this.convertToRgbString(this.rgb),!1,e)},t.prototype.paletteClickHandler=function(e){e.preventDefault();var t=e.target;if(t.classList.contains(gp)){if(this.removeTileSelection(),this.addTileSelection(t),t.classList.contains(rp))this.noColorTile();else{var i=t.getAttribute("aria-label"),n=this.rgbToHex(this.rgb);this.rgb=this.hexToRgb(this.roundValue(i)),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.getWrapper().classList.contains(pp)&&this.updateInput(i),this.triggerEvent(i,n,this.convertToRgbString(this.rgb),!1,e)}this.inline||this.showButtons||this.closePopup(e)}else se(t,"."+op)?this.switchToPicker():t.classList.contains(Fd)||t.classList.contains(Yd)?this.ctrlBtnClick(t,e):this.getWrapper().classList.contains(pp)&&se(t,"."+_d)&&this.formatSwitchHandler()},t.prototype.noColorTile=function(e){void 0===e&&(e=!1);var t=this.rgbToHex(this.rgb);this.rgb=[],this.hsv=[],this.triggerEvent("",t,"",e)},t.prototype.switchToPicker=function(){var e=this.getWrapper();this.trigger("beforeModeSwitch",{element:this.container,mode:"Picker"}),this.unWireEvents(),[].slice.call(oe("."+ap,this.container)).forEach((function(e){ee(e)})),this.container.querySelector(".e-clr-pal-rec-wpr")&&ee(this.container.querySelector(".e-clr-pal-rec-wpr")),e.classList.contains(pp)&&ee(ne("."+np,this.container)),this.container.style.width="";var t=ne(".e-custom-palette",this.container);this.presetColors&&te(t),this.createPicker(),this.getDragHandler().focus(),this.createInput(),this.refreshPopupPos(),this.element.parentElement&&this.element.parentElement.parentElement&&this.element.parentElement.parentElement.classList.contains("e-ie-ddb-popup")&&this.refreshImageEditorPopupPos(),this.wireEvents(),this.trigger("onModeSwitch",{element:this.container,mode:"Picker"})},t.prototype.ctrlBtnClick=function(e,t){if(e.classList.contains(Fd)){var i=this.rgbToHex(this.rgb);this.triggerChangeEvent(i,t)}if(this.inline){if(e.classList.contains(Yd)){var n={element:this.container,event:t,cancel:!1};this.trigger("beforeClose",n)}}else this.closePopup(t),this.splitBtn.element.focus()},t.prototype.paletteKeyDown=function(e){var t=e.target;if(t.classList.contains(ap)){var i,n,o=[].slice.call(oe("."+gp,t)),r=o.filter((function(e){return e.classList.contains("e-selected")})).pop();switch(!e.altKey&&e.keyCode){case 39:e.preventDefault(),i=r?o[this.tilePosition(o,r,this.enableRtl?-1:1)]:o[this.enableRtl?o.length-1:0],this.keySelectionChanges(i);break;case 37:e.preventDefault(),i=r?o[this.tilePosition(o,r,this.enableRtl?1:-1)]:o[this.enableRtl?0:o.length-1],this.keySelectionChanges(i);break;case 38:e.preventDefault(),i=o[n=r?this.tilePosition(o,r,-this.columns):0]?o[n]:o[n-this.columns],this.keySelectionChanges(i);break;case 40:e.preventDefault(),o[n=r?this.tilePosition(o,r,this.columns):o.length-1]?i=o[n]:(n%=o.length,i=o[n+=o[o.length-1].parentElement.childElementCount]),this.keySelectionChanges(i);break;case 13:if(e.preventDefault(),r){var s=r.getAttribute("aria-label");this.enterKeyHandler(s||"")}}}},t.prototype.keySelectionChanges=function(e){if(this.removeTileSelection(),this.addTileSelection(e),e.classList.contains(rp))this.noColorTile(!0);else{var t=e.getAttribute("aria-label"),i=this.rgbToHex(this.rgb);this.rgb=this.hexToRgb(t),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.getWrapper().classList.contains(pp)&&this.updateInput(t),this.triggerEvent(t,i,this.convertToRgbString(this.rgb),!0)}},t.prototype.tilePosition=function(e,t,i){var n=(e=Array.prototype.slice.call(e)).length,o=this.columns-e[n-1].parentElement.childElementCount,r=e.indexOf(t);return(r+=i)<0?r+=n+o:r%=n+o,r},t.prototype.inputHandler=function(e){var t,i,n=e.target;if(n.value.length)switch(ne(".e-float-text",n.parentElement).textContent){case"HEX":var o="";if(("#"===n.value[0]&&5!==n.value.length||"#"!==n.value[0]&&4!==n.value.length)&&(o=this.roundValue(n.value)),9!==o.length)return;i=this.rgbToHex(this.rgb),this.rgb=this.hexToRgb(o+o.substr(-2)),this.inputValueChange(this.rgbToHsv.apply(this,this.rgb),i,n.value,e);break;case"R":this.rgb[0]!==Number(n.value)&&(i=this.rgbToHex(this.rgb),this.rgb[0]=Number(n.value),t=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(t,i,null,e));break;case"G":this.rgb[1]!==Number(n.value)&&(i=this.rgbToHex(this.rgb),this.rgb[1]=Number(n.value),t=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(t,i,null,e));break;case"B":this.rgb[2]!==Number(n.value)&&(i=this.rgbToHex(this.rgb),this.rgb[2]=Number(n.value),t=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(t,i,null,e));break;case"H":this.hueSlider.value=Number(n.value);break;case"S":this.hsv[1]!==Number(n.value)&&(this.hsv[1]=Number(n.value),this.updateHsv(),this.convertToOtherFormat(!1,e));break;case"V":this.hsv[2]!==Number(n.value)&&(this.hsv[2]=Number(n.value),this.updateHsv(),this.convertToOtherFormat(!1,e));break;case"A":this.opacitySlider.value=Number(n.value)}},t.prototype.inputValueChange=function(e,t,i,n){e[0]!==this.hsv[0]&&(this.hueSlider.setProperties({value:e[0]},!0),this.hueSlider.refresh(),this.setHsvContainerBg(e[0])),this.hsv=e;var o=this.rgbToHex(this.rgb);this.setHandlerPosition(),this.updateInput(i||o);var r=this.convertToRgbString(this.rgb);this.updatePreview(r),this.triggerEvent(o,t,r,!1,n)},t.prototype.triggerEvent=function(e,t,i,n,o){void 0===n&&(n=!1);var r=e.slice(0,7);g(o)&&(o=new MouseEvent("click",{bubbles:!0,cancelable:!1})),this.showButtons||n?this.trigger("select",{currentValue:{hex:r,rgba:i},event:o,previousValue:{hex:t.slice(0,7),rgba:this.convertToRgbString(this.hexToRgb(t))}}):(this.trigger("change",{currentValue:{hex:r,rgba:i},event:o,previousValue:{hex:this.value.slice(0,7),rgba:this.convertToRgbString(this.hexToRgb(this.value))},value:e}),this.showRecentColors&&(this.recentColors.unshift(r),this.inline&&this.renderRecentColor()),this.enableOpacity?this.setProperties({value:e},!0):this.setProperties({value:r},!0),this.element.value=r||"#000000")},t.prototype.destroy=function(){var t=this,i=this.getWrapper();e.prototype.destroy.call(this),["tabindex","spellcheck"].forEach((function(e){t.element.removeAttribute(e)})),this.inline?(this.unWireEvents(),this.destroyOtherComp()):(this.isPopupOpen()&&(this.unWireEvents(),this.destroyOtherComp()),this.splitBtn.destroy(),this.splitBtn=null),this.tileRipple(),this.tileRipple=null,this.ctrlBtnRipple(),this.ctrlBtnRipple=null,this.element.nextElementSibling&&ee(this.element.nextElementSibling),i&&(i.parentElement.insertBefore(this.element,i),ee(i)),this.container=null,this.formElement&&q.remove(this.formElement,"reset",this.formResetHandler)},t.prototype.destroyOtherComp=function(){if(this.isPicker()){for(var e=se(this.hueSlider.element,".e-color-picker").querySelectorAll(".e-numerictextbox"),t=0;t<e.length;t++)E(e[t],ah).destroy();this.hueSlider.destroy(),this.enableOpacity&&(this.opacitySlider.destroy(),this.opacitySlider=null),this.hueSlider=null;var i=this.getTooltipInst();i.close(),i.destroy(),this.tooltipEle=null}},t.prototype.isPopupOpen=function(){return this.getPopupEle().classList.contains("e-popup-open")},t.prototype.unWireEvents=function(){if(this.isPicker()){var e=this.getDragHandler();q.remove(e,"keydown",this.pickerKeyDown);var t=ne("."+Qd,this.container);t&&q.remove(t,"keydown",this.ctrlBtnKeyDown),q.remove(this.getHsvContainer(),"mousedown touchstart",this.handlerDown),(this.modeSwitcher||this.showButtons)&&q.remove(ne("."+qd,this.container),"click",this.btnClickHandler),q.remove(ne("."+dp,this.container),"click",this.previewHandler)}else q.remove(this.container,"click",this.paletteClickHandler),q.remove(this.container,"keydown",this.paletteKeyDown)},t.prototype.roundValue=function(e){if(!e)return"";"#"!==e[0]&&(e="#"+e);var t=e.length;if(4===t&&(e+="f",t=5),5===t){for(var i="",n=1,o=e.length;n<o;n++)i+=e.charAt(n)+e.charAt(n);e="#"+i,t=9}return 7===t&&(e+="ff"),e},t.prototype.hexToRgb=function(e){if(!e)return[];9!==(e=e.trim()).length&&(e=this.roundValue(e));var t=Number((parseInt(e.slice(-2),16)/255).toFixed(2));e=e.slice(1,7);var i=parseInt(e,16),n=[];return n.push(i>>16&255),n.push(i>>8&255),n.push(255&i),n.push(t),n},t.prototype.rgbToHsv=function(e,t,i,n){if(this.rgb&&!this.rgb.length)return[];e/=255,t/=255,i/=255;var o,r=Math.max(e,t,i),s=Math.min(e,t,i),a=r,l=r-s,c=0===r?0:l/r;if(r===s)o=0;else{switch(r){case e:o=(t-i)/l+(t<i?6:0);break;case t:o=(i-e)/l+2;break;case i:o=(e-t)/l+4}o/=6}var h=[Math.round(360*o),Math.round(1e3*c)/10,Math.round(1e3*a)/10];return g(n)||h.push(n),h},t.prototype.hsvToRgb=function(e,t,i,n){var o,r,s;if(i/=100,0===(t/=100))return o=r=s=i,[Math.round(255*o),Math.round(255*r),Math.round(255*s),n];e/=60;var a=Math.floor(e),l=e-a,c=i*(1-t),h=i*(1-t*l),d=i*(1-t*(1-l));switch(a){case 0:o=i,r=d,s=c;break;case 1:o=h,r=i,s=c;break;case 2:o=c,r=i,s=d;break;case 3:o=c,r=h,s=i;break;case 4:o=d,r=c,s=i;break;default:o=i,r=c,s=h}var p=[Math.round(255*o),Math.round(255*r),Math.round(255*s)];return g(n)||p.push(n),p},t.prototype.rgbToHex=function(e){return e.length?"#"+this.hex(e[0])+this.hex(e[1])+this.hex(e[2])+(g(e[3])?"":0!==e[3]?(Math.round(255*e[3])+65536).toString(16).substr(-2):"00"):""},t.prototype.hex=function(e){return("0"+e.toString(16)).slice(-2)},t.prototype.changeModeSwitcherProp=function(e){var t=ne("."+qd,this.container);e?t?this.appendModeSwitchBtn():(this.createCtrlBtn(),this.isPicker()&&!this.disabled&&this.addCtrlSwitchEvent()):t&&(this.showButtons?ee(ne("."+op,t)):te(t))},t.prototype.changeShowBtnProps=function(e){var t=ne("."+qd,this.container);e?(t&&te(t),this.createCtrlBtn(),this.isPicker()&&!this.disabled&&this.addCtrlSwitchEvent()):this.modeSwitcher?ee(ne("."+Qd,t)):te(t)},t.prototype.changeValueProp=function(e){if(this.isPicker())this.rgb=this.hexToRgb(e),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.setHandlerPosition(),ee(se(this.hueSlider.element,".e-slider-preview")),this.createSlider(),this.setHsvContainerBg(),this.updateInput(e),4===this.rgb.length&&this.updateOpacityInput(100*this.rgb[3]);else{this.removeTileSelection();var t=this.container.querySelector('span[aria-label="'+this.roundValue(e)+'"]');t&&this.addTileSelection(t)}},t.prototype.setInputEleProps=function(){te(ne("."+np,this.container)),this.createInput()},t.prototype.changeDisabledProp=function(e){this.isPicker()&&(this.hueSlider.enabled=!e,this.opacitySlider.enabled=!e,this.setInputEleProps()),e?(this.toggleDisabled(!0),this.unWireEvents()):(this.toggleDisabled(!1),this.wireEvents())},t.prototype.changeCssClassProps=function(e,t){var i=this.getWrapper(),n=this.getPopupEle();t&&X([i,n],t.split(" ")),e&&G([i,n],e.replace(/\s+/g," ").trim().split(" "))},t.prototype.changeRtlProps=function(e){e?G([this.getWrapper()],"e-rtl"):X([this.getWrapper()],"e-rtl")},t.prototype.changePaletteProps=function(){ee(this.container.children[0]),this.container.style.width="",this.createPalette()},t.prototype.changeOpacityProps=function(e){var t=this.getWrapper();e?(X([this.container.parentElement],Zd),this.createOpacitySlider(ne(".e-colorpicker-slider",this.container).appendChild(this.createElement("div",{className:"e-opacity-slider"}))),t.classList.contains($d)||t.classList.contains(Jd)||this.appendOpacityValue(ne(".e-input-container",this.container))):(G([this.container.parentElement],Zd),this.opacitySlider.destroy(),te(this.opacitySlider.element),this.opacitySlider=null,t.classList.contains($d)||t.classList.contains(Jd)||te(ne("."+sp,this.container).parentElement))},t.prototype.onPropertyChanged=function(e,t){var i=this;if(!g(e.value)){var n=this.roundValue(e.value);if(9===n.length)this.element.value=this.roundValue(n).slice(0,7),(o=this.splitBtn&&ne("."+mp,this.splitBtn.element))&&(o.style.backgroundColor=this.convertToRgbString(this.hexToRgb(e.value)));else if(this.noColor&&"Palette"===this.mode&&""===this.value){var o;(o=this.splitBtn&&ne("."+mp,this.splitBtn.element)).style.backgroundColor=""}else this.value=t.value}if(!this.inline&&g(e.inline)){if(this.splitBtn.setProperties(bd(e,["disabled","enableRtl"])),!this.isPopupOpen())return this.changeCssClassProps(e.cssClass,t.cssClass),void this.changeRtlProps(e.enableRtl)}for(var r=function(n){switch(n){case"inline":e.inline?(s.getWrapper().appendChild(s.container),s.splitBtn.destroy(),ee(s.element.nextElementSibling),s.container.children.length||s.createWidget()):(s.destroyOtherComp(),s.unWireEvents(),s.container.innerHTML="",s.createSplitBtn());break;case"cssClass":s.changeCssClassProps(e.cssClass,t.cssClass);var o=e.cssClass.split(" ").concat(t.cssClass.split(" "));o=o.reduce((function(e,t){return e.indexOf(t)<0&&e.push(t),e}),[]);var r=0;o.forEach((function(e){0!==r||e!==$d&&e!==ep&&e!==pp&&e!==Kd&&e!==Jd||(ne("."+np,i.container)&&te(ne("."+np,i.container)),i.createInput(),r++)}));break;case"enableRtl":s.isPicker()&&(s.hueSlider.enableRtl=e.enableRtl,s.enableOpacity&&(s.opacitySlider.enableRtl=e.enableRtl),s.setInputEleProps()),s.changeRtlProps(e.enableRtl);break;case"disabled":s.changeDisabledProp(e.disabled);break;case"value":s.value!==t.value&&s.changeValueProp(e.value);break;case"showButtons":s.changeShowBtnProps(e.showButtons);break;case"mode":"Picker"===e.mode?s.switchToPicker():s.switchToPalette();break;case"modeSwitcher":s.changeModeSwitcherProp(e.modeSwitcher);break;case"columns":case"presetColors":s.isPicker()||s.changePaletteProps();break;case"noColor":e.noColor?"Palette"!==s.mode||s.modeSwitcher||s.setNoColor():s.changePaletteProps();break;case"enableOpacity":s.changeOpacityProps(e.enableOpacity);break;case"showRecentColors":if(!e.showRecentColors){var a=s.container.querySelector(".e-clr-pal-rec-wpr");a&&ee(a)}s.recentColors=[]}},s=this,a=0,l=Object.keys(e);a<l.length;a++){r(l[a])}},t.prototype.focusIn=function(){this.element.parentElement.focus()},Ud([De("#008000ff")],t.prototype,"value",void 0),Ud([De("")],t.prototype,"cssClass",void 0),Ud([De(!1)],t.prototype,"disabled",void 0),Ud([De("Picker")],t.prototype,"mode",void 0),Ud([De(!0)],t.prototype,"modeSwitcher",void 0),Ud([De(null)],t.prototype,"presetColors",void 0),Ud([De(!0)],t.prototype,"showButtons",void 0),Ud([De(10)],t.prototype,"columns",void 0),Ud([De(!1)],t.prototype,"inline",void 0),Ud([De(!1)],t.prototype,"noColor",void 0),Ud([De(!1)],t.prototype,"enablePersistence",void 0),Ud([De(!0)],t.prototype,"enableOpacity",void 0),Ud([De(!1)],t.prototype,"createPopupOnClick",void 0),Ud([De(!1)],t.prototype,"showRecentColors",void 0),Ud([Se()],t.prototype,"select",void 0),Ud([Se()],t.prototype,"change",void 0),Ud([Se()],t.prototype,"beforeTileRender",void 0),Ud([Se()],t.prototype,"beforeOpen",void 0),Ud([Se()],t.prototype,"open",void 0),Ud([Se()],t.prototype,"beforeClose",void 0),Ud([Se()],t.prototype,"beforeModeSwitch",void 0),Ud([Se()],t.prototype,"onModeSwitch",void 0),Ud([Se()],t.prototype,"created",void 0),t=Ud([Ie],t)}(St),vp=function(){function e(){}return e.prototype.getFormattedNode=function(e,t,i){var n=this.getFormatParent(e,t,i);return null!==n&&n!==i?n:null},e.prototype.getFormatParent=function(e,t,i){do{e=e.parentNode}while(e&&e!==i&&!this.isFormattedNode(e,t));return e},e.prototype.isFormattedNode=function(t,i){switch(i){case"bold":return e.isBold(t);case"italic":return e.isItalic(t);case"underline":return e.isUnderline(t);case"strikethrough":return e.isStrikethrough(t);case"superscript":return e.isSuperscript(t);case"subscript":return e.isSubscript(t);case"fontcolor":return this.isFontColor(t);case"fontname":return this.isFontName(t);case"fontsize":return this.isFontSize(t);case"backgroundcolor":return this.isBackgroundColor(t);case"inlinecode":return e.isCode(t);default:return!1}},e.isBold=function(e){return-1!==["strong","b"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"bold"!==e.style.fontWeight)},e.isItalic=function(e){return-1!==["em","i"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"italic"!==e.style.fontStyle)},e.isUnderline=function(e){return-1!==["u"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"underline"!==e.style.textDecoration&&"underline"!==e.style.textDecorationLine)},e.isStrikethrough=function(e){return-1!==["del","strike","s"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"line-through"!==e.style.textDecoration&&"line-through"!==e.style.textDecorationLine)},e.isSuperscript=function(e){return-1!==["sup"].indexOf(e.nodeName.toLowerCase())},e.isSubscript=function(e){return-1!==["sub"].indexOf(e.nodeName.toLowerCase())},e.prototype.isFontColor=function(t){var i=t.style&&t.style.color;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==i&&""!==i&&void 0!==i},e.prototype.isBackgroundColor=function(t){var i=t.style&&t.style.backgroundColor;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==i&&""!==i&&void 0!==i},e.prototype.isFontSize=function(t){var i=t.style&&t.style.fontSize;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==i&&""!==i&&void 0!==i},e.prototype.isFontName=function(t){var i=t.style&&t.style.fontFamily;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==i&&""!==i&&void 0!==i},e.isCode=function(e){return-1!==["code"].indexOf(e.nodeName.toLowerCase())},e.inlineTags=["a","abbr","acronym","b","bdo","big","cite","code","dfn","em","font","i","kbd","label","q","samp","small","span","strong","sub","sup","tt","u","var","del"],e}(),bp="INSERT-IMAGE",Mp="INSERT-AUDIO",Np="INSERT-VIDEO",Cp="INSERT-TABLE",Ep="INSERT-LINK",Dp="INSERT-ROW",Tp="INSERT-COLUMN",Lp="DELETE-ROW",Sp="DELETE-COLUMN",Ip="REMOVE-TABLE",wp="TABLE-HEADER",xp="TABLE_VERTICAL_ALIGN",jp="TABLE_MERGE",Op="TABLE_VERTICAL_SPLIT",zp="TABLE_HORIZONTAL_SPLIT",Ap="TABLE_DASHED",kp="TABLE_ALTERNATE",Pp="TABLE_BACKGROUND_COLOR",Rp="TABLE_MOVE",Bp="alignment-type",Hp="indent-type",Up="p",Fp=["address","article","aside","audio","blockquote","canvas","details","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","section","table","tbody","td","tfoot","th","thead","tr","ul","video","body"],Yp=["td","th"],Vp=["table","tbody","td","tfoot","th","thead","tr"],Qp="selection-type",qp="inserthtml-type",Wp="insert-text-type",_p="clear-type",Gp=["area","base","br","embed","hr","img","input","param","source","track","wbr","iframe","td","table"],Xp=["word","excel","onenote"],Kp=["article","aside","blockquote","body","canvas","details","div","fieldset","figure","footer","form","header","li","main","nav","noscript","section"],Zp={"toolbar-focus":"alt+f10",escape:"escape",backspace:"backspace","insert-link":"ctrl+k","insert-image":"ctrl+shift+i","insert-audio":"ctrl+shift+a","insert-video":"ctrl+alt+v","insert-table":"ctrl+shift+e",undo:"ctrl+z",redo:"ctrl+y",copy:"ctrl+c",cut:"ctrl+x",paste:"ctrl+v",bold:"ctrl+b",italic:"ctrl+i",underline:"ctrl+u",strikethrough:"ctrl+shift+s",uppercase:"ctrl+shift+u",lowercase:"ctrl+shift+l",superscript:"ctrl+shift+=",subscript:"ctrl+=",indents:"ctrl+]",outdents:"ctrl+[","html-source":"ctrl+shift+h","full-screen":"ctrl+shift+f","decrease-fontsize":"ctrl+shift+<","increase-fontsize":"ctrl+shift+>","justify-center":"ctrl+e","justify-full":"ctrl+j","justify-left":"ctrl+l","justify-right":"ctrl+r","clear-format":"ctrl+shift+r","ordered-list":"ctrl+shift+o","unordered-list":"ctrl+alt+o",space:"space",enter:"enter",tab:"tab",delete:"delete","format-copy":"alt+shift+c","format-paste":"alt+shift+v",inlinecode:"ctrl+`"},Jp=["BR","IMG"],$p=["ArrowUp","ArrowDown","Enter","Tab","Escape"];function eu(){var e=!1;return Q.isDevice&&Q.isIos&&(e=!0),e}function tu(e,t){if("BODY"===e.nodeName&&!g(t)){var i=top.window.document.querySelector(t);g(i)||i.contentWindow.focus()}}function iu(e,t){var i="BODY"===t.nodeName?t.ownerDocument.defaultView.frameElement.closest(".e-richtexteditor"):t.closest(".e-richtexteditor"),n=i.style.height;if(0!==e.getSelection().rangeCount){var o=e.getSelection().getRangeAt(0),r="#text"===o.startContainer.nodeName?o.startContainer.parentElement:o.startContainer,s=r.getBoundingClientRect(),a=s.top,l=s.bottom,c=i.getBoundingClientRect(),h=i.querySelectorAll(".e-count-enabled, .e-resize-enabled").length>0;"BODY"===t.nodeName?"auto"===n?window.innerHeight<a&&r.scrollIntoView(!1):(a>t.getBoundingClientRect().height||l>c.bottom)&&r.scrollIntoView({block:"nearest",inline:"nearest"}):"auto"===n?window.innerHeight<a&&r.scrollIntoView({block:"end",inline:"nearest"}):l>c.bottom&&(i.querySelector(".e-rte-content").scrollTop+=l-c.bottom+(h?20:0));var d=t.closest('div[style*="overflow-y: scroll"]');if(!g(d)){var p=d.getBoundingClientRect();l>p.bottom&&(d.scrollTop+=l-p.bottom)}}}function nu(e,t,i){for(var n=0;n<t.length;n++)0===n?e.splice(i+n,1,t[n]):e.splice(i+n,0,t[n]);return e}function ou(e,t){X(e,t);for(var i=0;i<e.length;i++)0===e[i].classList.length&&e[i].getAttribute("class")&&e[i].removeAttribute("class");return e}function ru(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}var su=function(){function e(e,t){this.BLOCK_TAGS=["p","h1","h2","h3","h4","h5","h6","blockquote","li","pre","td","th","div","hr","section","figure"],this.BASIC_FORMATS=["p","h1","h2","h3","h4","h5","h6","blockquote","pre"],this.root=e,this.currentDocument=t}return e.prototype.getBlockNodes=function(){var e=[];if(g(this.root.querySelector(".e-cell-select")))return e;var t=this.root.querySelector(".e-cell-select").closest("table").querySelectorAll(".e-cell-select");if(g(t)||t.length<2)return e;for(var i=0;i<t.length;i++)this.addBlockNodes(t[i],e);return this.wrapParagraphNodes(e),e},e.prototype.addBlockNodes=function(e,t){var i=e.childNodes;if(0!==i.length)for(var n=0;n<i.length;n++){var o=i[n];t.indexOf(o.parentElement)>=0||(!o.parentElement||"TD"!==o.parentElement.nodeName&&"TH"!==o.parentElement.nodeName||1!==o.parentElement.childNodes.length||"BR"===o.nodeName||(o.nodeType,Node.TEXT_NODE),t.push(o.parentElement))}else t.push(e)},e.prototype.getTextNodes=function(){var e=[];if(g(this.root.querySelector(".e-cell-select")))return e;var t=this.root.querySelector(".e-cell-select").closest("table").querySelectorAll(".e-cell-select");if(g(t)||t.length<2)return e;for(var i=0;i<t.length;i++)this.addTextNodes(t[i],e);return e},e.prototype.addTextNodes=function(e,t){var i=e.childNodes;if(0===i.length&&("TD"===e.nodeName||"TH"===e.nodeName)){var n=this.currentDocument.createTextNode("​");return e.appendChild(n),void t.push(n)}if(1===i.length&&("TD"===e.nodeName||"TH"===e.nodeName)&&"BR"===i[0].nodeName){n=this.currentDocument.createTextNode("​");return e.insertBefore(n,i[0]),void t.push(n)}for(var o=0;o<i.length;o++){var r=i[o];r.nodeType===Node.TEXT_NODE?t.push(r):r.nodeType===Node.ELEMENT_NODE&&this.addTextNodes(r,t)}},e.prototype.wrapParagraphNodes=function(e){for(var t=Array.from(e),i=0;i<t.length;i++){var n=t[i];if("TD"===n.nodeName||"TH"===n.nodeName)if(1!==n.childNodes.length||"BR"!==n.childNodes[0].nodeName&&n.childNodes[0].nodeType!==Node.TEXT_NODE){var o=e.indexOf(n);this.wrapInlineNodes(n,e,o)}else{var r=n.childNodes[0],s=_("p");r.parentElement.insertBefore(s,r),s.appendChild(r);var a=e.indexOf(n);e[a]=s}}for(i=0;i<e.length;i++){var l=e[i];if("LI"===l.nodeName&&1===l.childNodes.length){var c=l.childNodes[0];c.nodeType===Node.ELEMENT_NODE&&this.BASIC_FORMATS.indexOf(c.nodeName.toLocaleLowerCase())>=0&&c.textContent===l.textContent&&(e[i]=c)}}},e.prototype.wrapInlineNodes=function(e,t,i){var n=e.childNodes[0],o=_("p"),r=[];if(g(n))return e.appendChild(o),r.push(o),void nu(t,r,i);for(;n;)if("BR"===n.nodeName)n.parentNode.insertBefore(o,n),o.appendChild(n),o.childNodes.length>0&&r.indexOf(o)<0&&r.push(o),n=o.nextSibling,o=_("p");else if(this.BLOCK_TAGS.indexOf(n.nodeName.toLocaleLowerCase())>=0)if(r.push(n),o.childNodes.length>0)n=o.nextSibling;else{if(n&&"LI"===n.nodeName&&n.querySelectorAll("li").length>0)for(var s=n.querySelectorAll("li"),a=0;a<s.length;a++)r.push(s[a]);n="LI"===n.nodeName&&g(n.nextSibling)?n.parentElement.nextSibling:n.nextSibling}else if(n.nodeType===Node.TEXT_NODE){if(""===n.textContent.trim()&&n.textContent.indexOf("​")<0){var l=n.nextSibling;ee(n),n=l;continue}n.parentNode.insertBefore(o,n);var c=n;o.appendChild(c),o.childNodes.length>0&&r.indexOf(o)<0&&r.push(o),n=o.nextSibling}else if("TABLE"===n.nodeName||"UL"===n.nodeName||"OL"===n.nodeName)if("TABLE"===n.nodeName){var h=[],d=n.querySelectorAll("td, th");for(a=0;a<d.length;a++)this.addBlockNodes(d[a],h);this.wrapParagraphNodes(h);for(a=0;a<h.length;a++)r.push(h[a]);n=n.nextSibling}else n=n.firstElementChild;else this.BLOCK_TAGS.indexOf(n.nodeName.toLocaleLowerCase())<0&&(n.parentNode.insertBefore(o,n),o.appendChild(n),o.childNodes.length>0&&r.indexOf(o)<0&&r.push(o),n=o.nextSibling);nu(t,r,i)},e}(),au="e-editor-select-start",lu="e-editor-select-end",cu=function(){function e(e,t){this.parent=e,this.nodeSelection=new bm(e),this.currentDocument=t,this.tableSelection=new su(e,t)}return e.prototype.contents=function(e){return e&&"IFRAME"!==e.tagName?Array.prototype.slice.call(e.childNodes||[]):[]},e.prototype.isBlockNode=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&Fp.indexOf(e.tagName.toLowerCase())>=0},e.prototype.isLink=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&"a"===e.tagName.toLowerCase()},e.prototype.blockParentNode=function(e){for(;e&&e.parentNode!==this.parent&&(!e.parentNode||!this.hasClass(e.parentNode,"e-node-inner"));null)if(e=e.parentNode,this.isBlockNode(e))return e;return e},e.prototype.rawAttributes=function(e){var t={},i=e.attributes;if(i.length>0)for(var n=0;n<i.length;n++){var o=i[n];t[o.nodeName]=o.value}return t},e.prototype.attributes=function(e){if(!e)return"";for(var t="",i=this.rawAttributes(e),n=Object.keys(i).sort(),o=0;o<n.length;o++){var r=n[o],s=i[""+r];s.indexOf("'")<0&&s.indexOf('"')>=0?t+=" "+r+"='"+s+"'":s.indexOf('"')>=0&&s.indexOf("'")>=0?t+=" "+r+'="'+(s=s.replace(/"/g,"&quot;"))+'"':t+=" "+r+'="'+s+'"'}return t},e.prototype.clearAttributes=function(e){for(var t=e.attributes,i=t.length-1;i>=0;i--){var n=t[i];e.removeAttribute(n.nodeName)}},e.prototype.openTagString=function(e){return"<"+e.tagName.toLowerCase()+this.attributes(e)+">"},e.prototype.closeTagString=function(e){return"</"+e.tagName.toLowerCase()+">"},e.prototype.createTagString=function(e,t,i){return"<"+e.toLowerCase()+this.attributes(t)+">"+i+"</"+e.toLowerCase()+">"},e.prototype.isList=function(e){return!!e&&["UL","OL"].indexOf(e.tagName)>=0},e.prototype.isElement=function(e){return e===this.parent},e.prototype.isEditable=function(e){return(!e.getAttribute||"true"===e.getAttribute("contenteditable"))&&["STYLE","SCRIPT"].indexOf(e.tagName)<0},e.prototype.hasClass=function(e,t){return e&&e.classList&&e.classList.contains(t)},e.prototype.replaceWith=function(e,t){e.parentNode.insertBefore(this.parseHTMLFragment(t),e),ee(e)},e.prototype.parseHTMLFragment=function(e){var t=_("template");return t.innerHTML=e,t.content instanceof DocumentFragment?t.content:document.createRange().createContextualFragment(e)},e.prototype.wrap=function(e,t){return e.parentNode.insertBefore(t,e),(t=e.previousSibling).appendChild(e),t},e.prototype.insertAfter=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},e.prototype.wrapInner=function(e,t){for(e.appendChild(t),(t=e.querySelector(".e-rte-wrap-inner")).classList.remove("e-rte-wrap-inner"),0===t.classList.length&&t.removeAttribute("class");e.firstChild!==t;)t.appendChild(e.firstChild);return t},e.prototype.unWrap=function(e){var t=e&&e.parentNode;if(!t)return[];for(var i=[];e.firstChild&&" "!==e.textContent;)i.push(e.firstChild),t.insertBefore(e.firstChild,e);return i=i.length>0?i:[e.parentNode],t.removeChild(e),i},e.prototype.getSelectedNode=function(e,t){return e.nodeType===Node.ELEMENT_NODE&&e.childNodes.length>0&&e.childNodes[t-1]&&e.childNodes[t-1].nodeType===Node.ELEMENT_NODE&&(e.childNodes[t-1].classList.contains(au)||e.childNodes[t-1].classList.contains(lu))?e=e.childNodes[t-1]:e.nodeType===Node.ELEMENT_NODE&&e.childNodes.length>0&&e.childNodes[t]&&(e=e.childNodes[t]),e.nodeType===Node.TEXT_NODE&&(e=e.parentNode),e},e.prototype.nodeFinds=function(e,t){for(var i=[],n=0;n<t.length;n++)e.contains(t[n])&&e!==t[n]&&i.push(t[n]);return i},e.prototype.isEditorArea=function(){var e;for(e=this.getRangePoint(0).commonAncestorContainer;e&&!this.isElement(e);null)e=e.parentNode;return!!this.isElement(e)},e.prototype.getRangePoint=function(e){var t=this.getSelection(),i=[];if(t&&t.getRangeAt&&t.rangeCount){i=[];for(var n=0;n<t.rangeCount;n++)i.push(t.getRangeAt(n))}else i=[this.currentDocument.createRange()];return void 0!==e?i[e]:i},e.prototype.getSelection=function(){return this.nodeSelection.get(this.currentDocument)},e.prototype.getPreviousNode=function(e){for(e=e.previousElementSibling;e&&"\n"===e.textContent;null)e=e.previousElementSibling;return e},e.prototype.encode=function(e){var t=document.createElement("div");return t.innerText=e,t.innerHTML.replace(/<br\s*[\/]?>/gi,"\n")},e.prototype.saveMarker=function(e){var t,i,n=this.parent.querySelector("."+au),o=this.parent.querySelector("."+lu);if(this.hasClass(n,au)&&n.classList.length>1){var r=this.createTagString(Up,n,this.encode(n.textContent));this.replaceWith(n,r),(n=this.parent.querySelector("."+au)).classList.remove(au),t=n.childNodes[0]}else t=this.unWrap(n)[0];if(this.hasClass(o,lu)&&o.classList.length>1){r=this.createTagString(Up,o,this.encode(o.textContent));this.replaceWith(o,r),(o=this.parent.querySelector("."+lu)).classList.remove(lu),i=o.childNodes[0]}else i=o?this.unWrap(o)[0]:t;return e.startContainer=e.getNodeArray(t,!0),e.endContainer=e.getNodeArray(i,!1),e},e.prototype.marker=function(e,t){return'<span class="'+e+'">'+t+"</span>"},e.prototype.setMarker=function(e){var t=e.range,i=t.startContainer.childNodes,n=i.length>1&&"TABLE"===i[0].nodeName&&0===t.startOffset,o=i.length>1&&"IMAGE"===i[0].nodeName&&1===t.endOffset&&"#text"===t.endContainer.nodeName&&0===t.endContainer.textContent.length,r=(n?function(e){var t=e;do{t.childNodes.length>0&&(t=t.childNodes[0])}while(t.childNodes.length>0);return t}(i[t.startOffset+1]):i[t.startOffset>0?t.startOffset-1:t.startOffset])||t.startContainer,s=t.endContainer.childNodes[t.endOffset>0?o?t.endOffset:t.endOffset-1:t.endOffset]||t.endContainer;if(r.nodeType===Node.ELEMENT_NODE&&s.nodeType===Node.ELEMENT_NODE&&(r.contains(s)||s.contains(r))){var a=r.contains(s)?r:s;if(a.nodeType!==Node.TEXT_NODE){for(var l=[],c=[],h=a;a.contains(h);null)l.indexOf(h)<0&&h.childNodes&&h.childNodes.length?(l.push(h),h=h.childNodes[0]):h.nextSibling?h=h.nextSibling:h.parentNode&&(h=h.parentNode,l.push(h)),c.indexOf(h)<0&&(h.nodeType===Node.TEXT_NODE||Yp.indexOf(h.parentNode.tagName.toLocaleLowerCase())>=0&&("BR"===h.tagName||"IMG"===h.tagName))&&c.push(h);c.length&&(r=r.contains(s)?c[0]:r,s=c[c.length-1])}}if(r!==s){if(r.nodeType!==Node.TEXT_NODE&&("BR"===r.tagName&&Yp.indexOf(r.parentNode.tagName.toLocaleLowerCase())>=0||"IMG"===r.tagName))this.replaceWith(r,this.marker(au,this.encode(r.textContent))),t.startContainer.querySelector("."+au).appendChild(r);else if(3!==r.nodeType&&"#text"!==r.nodeName&&"BR"!==r.nodeName){var d=this.marker(au,"");$([this.parseHTMLFragment(d)],r)}else this.replaceWith(r,this.marker(au,this.encode(r.textContent)));if(s.nodeType!==Node.TEXT_NODE&&"BR"===s.tagName&&Yp.indexOf(s.parentNode.tagName.toLocaleLowerCase())>=0)this.replaceWith(s,this.marker(lu,this.encode(s.textContent))),t.endContainer.querySelector("."+lu).appendChild(s);else this.ensureSelfClosingTag(s,lu,t)}else this.ensureSelfClosingTag(r,au,t)},e.prototype.ensureSelfClosingTag=function(e,t,i){var n=!1;if(3===e.nodeType)this.replaceWith(e,this.marker(t,this.encode(e.textContent)));else if("BR"===e.tagName){this.replaceWith(e,this.marker(t,this.encode(e.textContent)));var o=i.startContainer.querySelector("."+t);o&&o.parentElement.appendChild(e)}else{var r=g(e.parentElement)?"":e.parentElement.tagName.toLocaleLowerCase();if("IMG"===e.tagName&&"p"!==r&&"div"!==r){var s=document.createElement("p");e.parentElement.insertBefore(s,e),s.appendChild(e),e=s.children[0]}if("TABLE"===e.tagName)if(n=!0,""===e.textContent){var a=e.querySelectorAll("td");e=g((e=a[a.length-1]).childNodes[0])?e:e.childNodes[0]}else{for(var l=e.lastChild;3!==l.nodeType&&"#text"!==l.nodeName&&"BR"!==l.nodeName;)l=l.lastChild;e=l}for(var c=0;c<Jp.length;c++)e=e.tagName!==Jp[c]||n?e:e.parentNode;if(3===e.nodeType&&"#text"===e.nodeName)this.replaceWith(e,this.marker(t,this.encode(e.textContent)));else if("BR"===e.nodeName){this.replaceWith(e,this.marker(lu,this.encode(e.textContent))),i.endContainer.querySelector("."+lu).appendChild(e)}else{var h=this.marker(t,"");$([this.parseHTMLFragment(h)],e)}}},e.prototype.createTempNode=function(e){var t=e.textContent;if("BR"===e.tagName){var i="<p></p>",n=e.parentNode;Yp.indexOf(n.tagName.toLocaleLowerCase())>=0&&(e=this.wrap(e,this.parseHTMLFragment(i)))}else if(e.nodeType!==Node.TEXT_NODE&&(e.classList.contains(au)||e.classList.contains(lu))||t.replace(/\n/g,"").replace(/(^ *)|( *$)/g,"").length>0||t.length&&t.indexOf("\n")<0){i="<p></p>";var o=e;e=this.wrap(e,this.parseHTMLFragment(i)),!(o.nodeType===Node.ELEMENT_NODE&&o.firstChild&&"BR"===o.firstChild.nodeName&&(o.classList.contains(au)||o.classList.contains(lu)))&&e.nextElementSibling&&"BR"===e.nextElementSibling.tagName&&e.appendChild(e.nextElementSibling)}return e},e.prototype.getImageTagInSelection=function(){var e=this.getSelection();return this.isEditorArea()&&e.rangeCount?e.focusNode.querySelectorAll("img"):null},e.prototype.gatherElementsAround=function(e,t){var i=_(t),n=e.previousSibling,o=e.parentElement;"e-editor-select-start"===o.className?o.parentNode.insertBefore(i,o):o&&o.insertBefore(i,e);for(var r=0;null!==n&&"BR"!==n.nodeName&&!this.isBlockNode(n);){var s=n.previousSibling;3!==n.nodeType&&1!==n.nodeType||(0===r?i.appendChild(n):i.insertBefore(n,i.firstChild)),n=s,r++}for(i.appendChild(e),n=i.nextSibling?i.nextSibling:i.parentElement.nextSibling;null!==n&&"BR"!==n.nodeName&&!this.isBlockNode(n);){var a=n.nextSibling?n.nextSibling:n.parentElement.nextSibling;3!==n.nodeType&&1!==n.nodeType||i.appendChild(n),n=a}return i},e.prototype.convertToBlockNodes=function(e,t){if(e.length>1)for(var i=0,n=e[0];!g(n);){if("BR"===n.nodeName){var o=n.nextSibling;ee(n),n=o}if(!g(n)){e[i]=t?"LI"===n.nodeName||this.isBlockNode(n)?n:this.gatherElementsAround(n,t?"p":"div"):this.isBlockNode(e[i])?e[i]:this.gatherElementsAround(n,t?"p":"div");var r="LI"===e[i].nodeName?e[i].parentElement:e[i];null!==(n=g(("#text"===r.nodeName?r.parentElement:r).querySelector(".e-editor-select-end"))&&g(se(n,".e-editor-select-end"))?r.nextSibling:null)||g(r.nextSibling)||"BR"!==r.nextSibling.nodeName||ee(r.nextSibling)}i++}else this.isBlockNode(e[0])||(e[0]=this.gatherElementsAround(e[0],t?"p":"div"),g(e[0].nextSibling)||"BR"!==e[0].nextSibling.nodeName||ee(e[0].nextSibling));return e},e.prototype.blockNodes=function(e){var t=[],i=this.getSelection(),n=this.tableSelection.getBlockNodes();if(n.length>0)return n;if(this.isEditorArea()&&i.rangeCount)for(var o=this.getRangePoint(),r=function(i){var n=void 0,r=o[i],a=s.getSelectedNode(r.startContainer,r.startOffset),l=s.getSelectedNode(r.endContainer,r.endOffset);s.isBlockNode(a)&&t.indexOf(a)<0&&t.push(a),n=s.blockParentNode(a);var c=s.blockParentNode(l);if(n&&t.indexOf(n)<0)if(!g(e)&&e){var h=["TD","TH"];if([r.commonAncestorContainer,n,c].some((function(e){return-1!==h.indexOf(e.nodeName)}))){var d=s.getPreBlockNodeCollection(r);d.length>1?s.wrapWithBlockNode(d,t):d.length>0&&(a!==l&&"BR"!==a.nodeName||a===l&&"SPAN"===a.nodeName&&(a.classList.contains(au)||a.classList.contains(lu)))&&t.push(s.createTempNode(a))}else t.push(n)}else if(Yp.indexOf(n.tagName.toLocaleLowerCase())>=0&&("BR"===a.tagName||a.nodeType===Node.TEXT_NODE||a.classList.contains(au)||a.classList.contains(lu))){var p=a.previousSibling&&a.previousSibling.nodeType===Node.TEXT_NODE?a.previousSibling:a;a.nextSibling||a.previousSibling||"BR"!==a.tagName?t.push(s.createTempNode(p)):t.push(p)}else t.push(n);for(var u=[],m=a;m!==l&&m!==s.parent;null)u.indexOf(m)<0&&m.childNodes&&m.childNodes.length?(u.push(m),m=m.childNodes[0]):m&&8!==m.nodeType&&("BR"===m.tagName||m.nodeType===Node.TEXT_NODE&&""!==m.textContent.trim()||m.nodeType!==Node.TEXT_NODE&&(m.classList.contains(au)||m.classList.contains(lu)))&&Yp.indexOf(m.parentNode.tagName.toLocaleLowerCase())>=0?m=s.createTempNode(m):m.nextSibling&&8!==m.nextSibling.nodeType&&("BR"===m.nextSibling.tagName||m.nextSibling.nodeType===Node.TEXT_NODE||m.nextSibling.classList.contains(au)||m.nextSibling.classList.contains(lu))&&Yp.indexOf(m.nextSibling.parentNode.tagName.toLocaleLowerCase())>=0?m=s.createTempNode(m.nextSibling):m.nextSibling?m=m.nextSibling:m.parentNode&&(m=m.parentNode,u.push(m)),t.indexOf(m)<0&&m.nodeType===Node.ELEMENT_NODE&&Yp.indexOf(m.parentNode.tagName.toLocaleLowerCase())>=0&&(m.classList.contains(au)||m.classList.contains(lu))&&t.push(s.createTempNode(m)),s.isBlockNode(m)&&s.ignoreTableTag(m)&&u.indexOf(m)<0&&t.indexOf(m)<0&&(m!==l||r.endOffset>0)&&t.push(m),"IMG"===m.nodeName&&"true"===m.parentElement.contentEditable&&t.push(m);(n=s.blockParentNode(l))&&s.ignoreTableTag(n)&&t.indexOf(n)<0&&!g(n.previousElementSibling)&&"IMG"!==n.previousElementSibling.tagName&&t.push(n)},s=this,a=0;a<o.length;a++)r(a);for(var l=t.length-1;l>0;l--){if(this.nodeFinds(t[l],t).length){var c=t[l].querySelectorAll("ul, ol");if("LI"===t[l].tagName&&c.length>0)continue;t.splice(l,1)}}return t},e.prototype.ignoreTableTag=function(e){return!(Vp.indexOf(e.tagName.toLocaleLowerCase())>=0)},e.prototype.getPreBlockNodeCollection=function(e){var t=this.getSelectedNode(e.startContainer,e.startOffset),i=this.getSelectedNode(e.endContainer,e.endOffset),n=[],o=t.closest("td, th");if(g(o))return n;for(var r=Array.from(o.childNodes),s=!0,a=this.getClosestInlineParent(t,o,!0),l=this.getClosestInlineParent(i,o,!1),c=0;c<r.length;c++){var h=r[c];a===l&&h===a?(n.push(h),s=!0):h===a?s=!1:h===l&&(n.push(h),s=!0),s||n.push(h)}return n},e.prototype.getClosestInlineParent=function(e,t,i){if(e.nodeType===Node.TEXT_NODE)return e;if(this.isBlockNode(e))return e;for(var n=e,o=!1;n;){var r=n;if(o){if(this.isBlockNode(n))return r;if(i&&n.previousSibling){if(this.isBlockNode(n.previousSibling)||"BR"===n.previousSibling.nodeName)return r;n=n.previousSibling}else{if(i||!n.nextSibling)return n;if(this.isBlockNode(n.nextSibling)||"BR"===n.nextSibling.nodeName)return r;n=n.nextSibling}}else(n=n.parentElement)===t&&(n=r,o=!0)}return null},e.prototype.wrapWithBlockNode=function(e,t){for(var i=_("p"),n=0;n<e.length;n++){var o=e[n];if("BR"===o.nodeName)o.parentNode.insertBefore(i,o),i.appendChild(o),i.childNodes.length>0&&t.push(i),i=_("p");else{if(this.isBlockNode(o))t.push(o);else{if("#text"===o.nodeName&&""===o.textContent.trim())continue;0===i.childElementCount?(o.parentNode.insertBefore(i,o),i.appendChild(o)):i.appendChild(o)}n===e.length-1&&i.nextElementSibling&&0===i.querySelectorAll("br").length&&"BR"===i.nextElementSibling.nodeName&&i.appendChild(i.nextElementSibling)}}i.childNodes.length>0&&t.indexOf(i)<0&&t.push(i)},e}(),hu="keydown",du="action",pu="format-type",uu="keydown-handler",mu="list-type",gu="keyup-handler",fu="keyup",yu="model_changed_plugin",vu="model_changed",bu="ms_word_cleanup_plugin",Mu="ms_word_cleanup",Nu="onBegin",Cu="actionBegin",Eu="format_painter_actions",Du="emoji_picker_actions",Tu="mouseDown",Lu="destroy",Su="internal_destroy",Iu=function(){function e(){}return e.WrapBefore=function(e,t,i){return t.innerText=e.textContent,i?this.AppendBefore(t,e,!0):this.AppendBefore(t,e),e.parentNode&&e.parentNode.removeChild(e),t.childNodes[0]},e.Wrap=function(e,t){return this.AppendBefore(t,e),t.appendChild(e),e},e.unwrap=function(e){for(var t=e.parentNode,i=[];e.firstChild;null)i.push(t.insertBefore(e.firstChild,e));return t.removeChild(e),i},e.AppendBefore=function(e,t,i){return t.parentNode?i?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.insertBefore(e,t):t},e}(),wu=function(){function e(){this.enterAction="P",this.position=-1,this.nodeSelection=new bm}return e.prototype.GetSpliceNode=function(e,t){return t=this.SplitNode(e,t,!0),t=this.SplitNode(e,t,!1)},e.prototype.SplitNode=function(e,t,i){if(t){var n=e.cloneRange(),o=t.parentNode,r=this.nodeSelection.getIndex(t);n.collapse(i),i?n.setStartBefore(t):n.setEndAfter(t);var s=n.extractContents();if(i){if(t=o.childNodes[r],(s=this.spliceEmptyNode(s,!1))&&s.childNodes.length>0)if(!!(1!==s.childNodes.length||"IMG"===s.childNodes[0].nodeName||s.querySelectorAll("img").length>0||!this.isRteElm(s)||""!==s.textContent.trim()||32===s.textContent.charCodeAt(0)||160===s.textContent.charCodeAt(0)))if(t)Iu.AppendBefore(s,t);else o.appendChild(s),(a=document.createElement("div")).innerHTML="&#65279;&#65279;",t=a.firstChild,o.appendChild(t)}else if(t=o.childNodes.length>1?o.childNodes[r]:o.childNodes[0],(s=this.spliceEmptyNode(s,!0))&&s.childNodes.length>0)if(!!(1!==s.childNodes.length||"IMG"===s.childNodes[0].nodeName||!this.isRteElm(s)||""!==s.textContent.trim()||32===s.textContent.charCodeAt(0)||160===s.textContent.charCodeAt(0)))if(t)Iu.AppendBefore(s,t,!0);else if(o.childNodes.length>1&&o.childNodes.length!==r)t=o.childNodes[o.childNodes.length-1],Iu.AppendBefore(s,t,!0),t=t.nextSibling;else{var a;o.appendChild(s),(a=document.createElement("div")).innerHTML="&#65279;&#65279;",o.insertBefore(a.firstChild,o.firstChild),t=o.firstChild}return t}return null},e.prototype.isRteElm=function(e){var t=!0;if(1===e.childNodes.length&&"IMG"!==e.childNodes[0].nodeName)for(var i=e.childNodes[0],n=0;!g(i.childNodes)&&n<i.childNodes.length;n++)("IMG"===i.childNodes[n].nodeName||"SPAN"===i.childNodes[n].nodeName&&(i.childNodes[n].classList.contains("e-video-wrap")||i.childNodes[n].classList.contains("e-embed-video-wrap")||i.childNodes[n].classList.contains("e-audio-wrap")))&&(t=!1);else t=!0;return t},e.prototype.spliceEmptyNode=function(e,t){var i;return(i=1===e.childNodes.length&&"#text"===e.childNodes[0].nodeName&&""===e.childNodes[0].textContent||""===e.textContent?-1:e.childNodes.length-1)>-1&&!t?this.spliceEmptyNode(e.childNodes[i],t):i>-1?this.spliceEmptyNode(e.childNodes[0],t):3===e.nodeType||11===e.nodeType||"IMG"===e.nodeName||e.querySelectorAll("img").length>0||e.classList.contains("e-video-wrap")||e.classList.contains("e-audio-wrap")||e.parentNode.removeChild(e),e},e.prototype.GetCursorStart=function(e,t,i){for(var n=(e=i?e:e.reverse())[0],o=0;o<e.length&&(i?e[o]<t:e[o]>=t);o++)n=e[o];return n},e.prototype.GetCursorRange=function(e,t,i){var n=e.createRange(),o=[];o.push(0);for(var r=this.TrimLineBreak(i.data),s=r.indexOf(" ",0);-1!==s;)o.indexOf(s)<0&&o.push(s),new RegExp("\\s").test(r[s-1])&&o.indexOf(s-1)<0&&o.push(s-1),new RegExp("\\s").test(r[s+1])&&o.push(s+1),s=r.indexOf(" ",s+1);if(o.push(r.length),o.indexOf(t.startOffset)>=0||o.indexOf(t.startOffset-1)>=0&&(1!==t.startOffset||1===t.startOffset&&new RegExp("\\s").test(r[0]))||o[o.length-1]-1===t.startOffset&&t.endOffset!==r.length-1&&!new RegExp("\\s").test(r[0]))n=t,this.position=1;else{var a=this.GetCursorStart(o,t.startOffset,!0);0!==a&&r[a]&&" "===r[a]&&(a+=1),this.position=t.startOffset-a,n.setStart(t.startContainer,a),n.setEnd(t.startContainer,this.GetCursorStart(o,t.startOffset,!1))}return n},e.prototype.GetCursorNode=function(e,t,i){return this.GetSpliceNode(this.GetCursorRange(e,t,i),i)},e.prototype.TrimLineBreak=function(e){return e.replace(/(\r\n\t|\n|\r\t)/gm," ")},e}(),xu=function(){function e(){}return e.Insert=function(e,t,i,n,o){var r,s;"string"==typeof t?((s=document.createElement("div")).innerHTML=t.replace(/&(times|divide|ne)(;?)/g,"&amp;$1$2"),r=n?s:s.firstChild):n&&(g(t)||g(t.classList)||!t.classList.contains("pasteContent"))?((s=document.createElement("div")).appendChild(t),r=s):r=t;var a=g(i)?0:i.scrollHeight,l=new bm(i),c=new wu,h=l.getRange(e);if(h.startContainer!==i||h.startContainer!==h.endContainer||0!==h.startOffset||h.startOffset!==h.endOffset||0!==i.textContent.length||"P"!==i.children[0].tagName&&"DIV"!==i.children[0].tagName&&"BR"!==i.children[0].tagName||(l.setSelectionText(e,h.startContainer.children[0],h.startContainer.children[0],0,0),h=l.getRange(e)),h.startContainer===i&&h.startContainer===h.endContainer&&0===h.startOffset&&h.startOffset===h.endOffset&&i.textContent.trim().length>0){var d=this.findFirstTextNode(h.startContainer);g(d)||(l.setSelectionText(e,d,d,0,0),h=l.getRange(e))}if("BR"===h.startContainer.nodeName&&0===h.startOffset&&h.startOffset===h.endOffset&&h.startContainer===h.endContainer){var p=Array.prototype.slice.call(h.startContainer.parentElement.childNodes).indexOf(h.startContainer);l.setSelectionText(e,h.startContainer.parentElement,h.startContainer.parentElement,p,p),h=l.getRange(e)}var u=h.startOffset===h.endOffset&&0===h.startOffset&&h.startContainer===h.endContainer,m=h.collapsed,f=this.getNodeCollection(h,l,r),y="table"===r.nodeName.toLowerCase()?g(f[0])?h.startContainer:this.closestEle(f[0].parentNode,i):f[0];if(y&&"LI"===y.nodeName&&"table"===r.nodeName.toLowerCase())this.insertTableInList(h,r,y,f[0],c);else if(!u||""!==h.startContainer.textContent||"BR"===h.startContainer.nodeName||"BR"===o||"#text"===r.nodeName||g(r.children[0])||g(r.children[0].tagName)||"IMG"!==r.children[0].tagName||1!==r.children.length||(h.startContainer.innerHTML=""),n||!g(r)&&!g(r.classList)&&r.classList.contains("pasteContent"))this.pasteInsertHTML(f,r,h,l,c,e,m,y,i,o);else{if(i!==h.startContainer&&(!m&&(y.nodeType!==Node.ELEMENT_NODE||-1===Vp.indexOf(y.tagName.toLocaleLowerCase()))||"table"===r.nodeName.toLowerCase()&&y&&-1===Vp.indexOf(y.tagName.toLocaleLowerCase()))){var v=c.GetSpliceNode(h,y),b=v.previousSibling,M=v.parentNode;if(1===f.length||"table"===r.nodeName.toLowerCase()&&0===v.childElementCount)l.setSelectionContents(e,v),h=l.getRange(e);else{var N=c.GetSpliceNode(h,f[f.length-1].parentElement);N=g(N)?v:N,l.setSelectionText(e,v,N,0,3===N.nodeType?N.textContent.length:N.childNodes.length),h=l.getRange(e)}if(null!==h.startContainer.parentElement.closest("ol,ul")&&null!==h.endContainer.parentElement.closest("ol,ul")?function(e){if(null!==e.startContainer.parentElement.closest("ol,ul")&&null!==e.endContainer.parentElement.closest("ol,ul")){for(e.extractContents();("#text"===e.startContainer.nodeName?e.startContainer.parentElement:e.startContainer).querySelectorAll("li :empty").length>0||("#text"===e.startContainer.nodeName?e.startContainer.parentElement:e.startContainer).querySelectorAll("ol :empty").length>0;){var t=("#text"===e.startContainer.nodeName?e.startContainer.parentElement:e.startContainer).querySelectorAll("li :empty");if(!(t.length>0))break;t.forEach((function(e){e.remove()}))}var i=("#text"===e.startContainer.nodeName?e.startContainer.parentElement:e.startContainer).querySelectorAll("li");i.length>0&&i.forEach((function(e){g(e.firstChild)||"OL"!==e.firstChild.nodeName&&"UL"!==e.firstChild.nodeName||(e.style.listStyleType="none")}))}}(h):h.extractContents(),"TABLE"===t.tagName){var C=se(h.startContainer,"blockquote");if(!g(C)&&C.childNodes.length>0)for(var E=C.childNodes.length-1;E>=0;E--){var D=C.childNodes[E];g(D)||""!==D.innerText.trim()||ee(D)}this.removeEmptyElements(i,!1,C)}for(var T=0;T<f.length;T++)if(3!==f[T].nodeType&&null!=f[T].parentNode){if("IMG"===f[T].nodeName)continue;f[T].parentNode.removeChild(f[T])}if(g(b)||g(b.parentNode)){for(var L=null;M!==i&&M.firstChild&&""===M.textContent.trim();){L=M,M=M.parentNode}null!==L&&(M=L),M.firstChild&&(M!==i||"TABLE"===r.nodeName&&u&&M===h.startContainer&&M===h.endContainer)?""===M.textContent.trim()&&M!==i?(Iu.AppendBefore(r,M,!1),ee(M)):Iu.AppendBefore(r,M.firstChild,!1):g(v.previousSibling)&&"TABLE"===t.tagName?M.prepend(r):M.appendChild(r)}else e.contains(b)?Iu.AppendBefore(r,b,!0):h.insertNode(r);"IMG"===r.nodeName?this.imageFocus(r,l,e):3!==r.nodeType?l.setSelectionText(e,r,r,0,r.childNodes.length):l.setSelectionText(e,r,r,0,r.textContent.length)}else{if(h.deleteContents(),u&&""===h.startContainer.textContent&&"BR"!==h.startContainer.nodeName&&(h.startContainer.innerHTML=""),Q.isIE){var S=e.createDocumentFragment();S.appendChild(r),h.insertNode(S)}else if(1===h.startContainer.nodeType&&"hr"===h.startContainer.nodeName.toLowerCase()&&"hr"===h.endContainer.nodeName.toLowerCase()){var I=h.startContainer.nextElementSibling;I&&(I.querySelector("br")&&ee(I.querySelector("br")),I.appendChild(r))}else"BR"===h.startContainer.nodeName?h.startContainer.parentElement.insertBefore(r,h.startContainer):h.insertNode(r);3!==r.nodeType&&r.childNodes.length>0?l.setSelectionText(e,r,r,1,1):"IMG"===r.nodeName?this.imageFocus(r,l,e):3!==r.nodeType?l.setSelectionContents(e,r):l.setSelectionText(e,r,r,r.textContent.length,r.textContent.length)}g(i)||!(a<i.scrollHeight)||1!==r.nodeType||"IMG"!==r.nodeName&&g(r.querySelector("img"))||iu(e,i)}},e.findFirstTextNode=function(e){if(e.nodeType===Node.TEXT_NODE)return e;for(var t=0;t<e.childNodes.length;t++){var i=this.findFirstTextNode(e.childNodes[t]);if(!g(i))return i}return null},e.pasteInsertHTML=function(e,t,i,n,o,r,s,a,l,c){var h,d,p,u,m=i.startOffset===i.endOffset&&i.startContainer===i.endContainer;if(m&&i.startContainer===l&&""===l.textContent&&0===i.startOffset&&0===i.endOffset){var f=this.getImmediateBlockNode(e[e.length-1],l);n.setSelectionText(r,f,f,0,0),i=n.getRange(r)}l!==i.startContainer&&(!s&&(a.nodeType!==Node.ELEMENT_NODE||-1===Vp.indexOf(a.tagName.toLocaleLowerCase()))||"table"===t.nodeName.toLowerCase()&&a&&-1===Vp.indexOf(a.tagName.toLocaleLowerCase()))&&(g(u=o.GetSpliceNode(i,a))||(d=g(u.previousSibling)?u.parentNode.previousSibling:u.previousSibling,1===e.length?(n.setSelectionContents(r,u),i=n.getRange(r),p=!0):(h=g(h=o.GetSpliceNode(i,e[e.length-1].parentElement))?u:h,n.setSelectionText(r,u,h,0,3===h.nodeType?h.textContent.length:h.childNodes.length),i=n.getRange(r),p=!1)));var y=!1;this.removingComments(t);for(var v,b=t.childNodes,M=0;M<b.length;M++)if(Fp.indexOf(b[M].nodeName.toLocaleLowerCase())>=0){y=!0;break}var N=document.createDocumentFragment();if(y){for(var C=i.startContainer;!g(C)&&"PRE"!==C.nodeName&&C!==l;)C=C.parentElement;if(g(t)||g(C)||"PRE"!==C.nodeName){this.insertTempNode(i,t,e,o,l);var E=!0,D=void 0,T=void 0,L=void 0;for(this.contentsDeleted||(s||0!==i.startContainer.parentElement.textContent.length||"BR"!==i.startContainer.nodeName||"P"!==i.startContainer.parentElement.nodeName||l.removeChild(i.startContainer.parentElement),i.deleteContents());t.firstChild;)if("#text"!==t.firstChild.nodeName||""!==t.firstChild.textContent.trim())if("#text"===t.firstChild.nodeName&&E||this.inlineNode.indexOf(t.firstChild.nodeName.toLocaleLowerCase())>=0&&E){if(v=t.firstChild,g(t.previousElementSibling)){var S=_("DIV"===c?"div":"p");t.parentElement.insertBefore(S,t)}"BR"===t.previousElementSibling.nodeName?t.parentElement.insertBefore(t.firstChild,t):t.previousElementSibling.appendChild(t.firstChild)}else v=t.firstChild,"#text"===t.firstChild.nodeName||this.inlineNode.indexOf(t.firstChild.nodeName.toLocaleLowerCase())>=0?(D?(L.appendChild(t.firstChild),N.appendChild(L)):((T=_("DIV"===c?"div":"p")).appendChild(t.firstChild),N.appendChild(T)),L=T,D=!0):(N.appendChild(t.firstChild),D=!1),E=!1;else ee(t.firstChild);t.parentNode.replaceChild(N,t)}else i.insertNode(t),v=t.lastChild}else if(m){var I=_("span",{className:"tempSpan"}),w=se(i.startContainer.parentElement,"a");if(3===i.startContainer.nodeType&&w&&se(w,"span")){var x=this.getImmediateBlockNode(i.startContainer,l);x.querySelectorAll("br").length>0&&ee(x.querySelector("br")),se(w,"span").appendChild(I)}else"#text"===e[0].nodeName&&e[0].nodeValue.includes("​")&&!g(e[0].parentElement)&&!g(e[0].parentElement.previousElementSibling)&&e[0].parentElement.previousElementSibling.classList.contains("e-mention-chip")?i.startContainer.parentElement.insertAdjacentElement("afterend",I):i.insertNode(I);for(;t.firstChild;)v=t.firstChild,N.appendChild(t.firstChild);var j=this.getClosestMatchingElement(I.parentNode,N);if(1===N.childNodes.length&&N.firstChild&&j){var O=document.createElement("div"),z=N.firstChild.textContent||"";O.innerHTML=N.firstChild.innerHTML||"";var A=v=O.firstChild;if(A&&(j.replaceChild(A,I),j.parentNode&&A.nodeType===Node.TEXT_NODE&&(A.previousSibling&&A.previousSibling.nodeType===Node.TEXT_NODE||A.nextSibling&&A.nextSibling.nodeType===Node.TEXT_NODE))){j.parentNode.normalize();var k=i.startOffset+z.length;n.setCursorPoint(r,j.firstChild,k),v=null}O.remove()}else I.parentNode.replaceChild(N,I)}else{for(;t.firstChild;)v=t.firstChild,N.appendChild(t.firstChild);if(p)i.deleteContents(),this.removeEmptyElements(l,!0),i.insertNode(N);else{var P=l===i.startContainer?i.startContainer:i.startContainer.parentNode,R=Array.prototype.indexOf.call(P.childNodes,-1!==Q.userAgent.indexOf("Firefox")&&l===i.startContainer?i.startContainer.firstChild:i.startContainer);i.deleteContents(),-1!==R&&(i.setStart(P,R),i.setEnd(P,R)),g(h)||h===l||(ee(h),this.removeEmptyElements(l,!0)),g(d)?i.insertNode(N):d.parentNode===l?d.appendChild(N):d.parentNode.appendChild(N)}}if(v instanceof Element&&"GOOGLE-SHEETS-HTML-ORIGIN"===v.nodeName){var B=v.querySelector("table"),H=B.querySelector("colgroup");if(H)for(M=0;M<B.rows.length;M++)for(var U=0;U<B.rows[M].cells.length;U++)if(H.querySelectorAll("col")[U].hasAttribute("width")){var F=H.querySelectorAll("col")[U].getAttribute("width");B.rows[M].cells[U].style.width=F+"px"}}if(v&&"TABLE"===v.nodeName){var Y=_("p");Y.appendChild(_("br")),v.parentElement.insertBefore(Y,v.nextSibling),v=Y}if(v&&"#text"===v.nodeName)this.placeCursorEnd(v,t,n,r,l);else if(v&&"HR"===v.nodeName){var V=v.nextSibling?v.nextSibling:null,q=_("DIV"===c?"div":"p");q.appendChild(_("br")),g(V)||"HR"!==V.nodeName?g(V)?(v.parentNode.appendChild(q),v.parentNode.insertBefore(v,q),v=q):v=V:(v.parentNode.insertBefore(q,V),v=q),n.setSelectionText(r,v,v,0,0)}else v&&this.cursorPos(v,t,n,r,l);this.alignCheck(l),this.listCleanUp(n,r)},e.compareParentElements=function(e,t){return!(!e||!t)&&(e.tagName===t.tagName&&this.getFilteredAttributes(e)===this.getFilteredAttributes(t))},e.getFilteredAttributes=function(e){return Array.from(e.attributes).map((function(e){if("class"===e.name){var t=e.value.split(" ").filter((function(e){return"pasteContent_RTE"!==e})).join(" ");return t?"class='"+t+"'":""}return e.name+"='"+e.value+"'"})).filter((function(e){return e.length>0})).sort().join(" ")},e.getClosestMatchingElement=function(e,t){for(var i=e;i;){if(this.findMatchingChild(t,i))return i;i=i.parentElement}return null},e.findMatchingChild=function(e,t){for(var i=0,n=Array.from(e.children);i<n.length;i++){var o=n[i];if(this.compareParentElements(o,t))return o;var r=this.findMatchingChild(o,t);if(r)return r}return null},e.listCleanUp=function(e,t){var i=e.getRange(t),n=i.startContainer,o=i.startOffset,r=i.startContainer.parentElement,s=i.endContainer.parentElement;if(!g(r)&&!g(s)){var a=r.closest("ol, ul"),l=s.closest("ol, ul");if(!g(a)&&!g(l)){var c=this.cleanUpListItems(a),h=this.cleanUpListContainer(a);(c||h)&&(i.setStart(n,o),i.setEnd(n,o))}}},e.cleanUpListItems=function(e){var t,i=this,n=!1;if(g(e.closest("ol, ul"))||(t=e.closest("ol, ul").querySelectorAll("li")),g(t)||0===t.length)return!1;var o=null;t.forEach((function(e){var t=e.parentElement;if(!g(t)&&"OL"!==t.nodeName&&"UL"!==t.nodeName&&(g(o)&&(o=t.closest("li")),!g(o))){var r=e.nextSibling;if(!g(r)&&"LI"!==r.nodeName){for(var s=Array.prototype.indexOf.call(t.childNodes,r),a=t.cloneNode(!1),l=t.childNodes.length,c=s;c<l;c++)a.appendChild(t.childNodes[s]);if(a.childNodes.length>0){var h=document.createElement("li");h.appendChild(a),o.insertAdjacentElement("afterend",h)}else a.remove()}var d=t.closest("ol, ul");o.insertAdjacentElement("afterend",e),o=o.nextSibling,g(d)||i.removeEmptyElements(d),n=!0}}));var r=this.cleanUpFlattenListContainer(e);return n=r||n},e.cleanUpFlattenListContainer=function(e){var t,i=!1;return g(e.closest("ol, ul"))||(t=e.closest("ol, ul").querySelectorAll("li")),!g(t)&&0!==t.length&&(t.forEach((function(e){g(e.firstChild)||"OL"!==e.firstChild.nodeName&&"UL"!==e.firstChild.nodeName||(e.style.listStyleType="none");var t=Array.from(e.children).find((function(e){return"LI"===e.tagName&&e.parentElement&&"OL"!==e.parentElement.tagName&&"UL"!==e.parentElement.tagName}));g(t)||g(e.parentNode)||(e.parentNode.replaceChild(t,e),(g(t.textContent)||""===t.textContent.trim())&&t.remove(),i=!0)})),i)},e.cleanUpListContainer=function(e){var t=!1,i=[],n=[];return g(e)||(e.childNodes.forEach((function(t){"LI"!==t.nodeName.toLocaleUpperCase()&&i.push(t),("LI"===t.nodeName.toLocaleUpperCase()||e.lastChild===t)&&i.length>0&&(n.push({elements:i.slice()}),i=[])})),n.forEach((function(i){var n=i.elements,o=document.createElement("li");n[0].parentNode.replaceChild(o,n[0]),n.forEach((function(e){return o.appendChild(e)})),o.textContent&&""===o.textContent.trim()&&!o.querySelector("img")&&e.removeChild(o),t=!0}))),t},e.placeCursorEnd=function(e,t,i,n,o){for(e="BR"===e.nodeName?g(e.previousSibling)?e.parentNode:e.previousSibling:e;!g(e)&&"#text"!==e.nodeName&&"IMG"!==e.nodeName&&"BR"!==e.nodeName&&"HR"!==e.nodeName;){if(!g(e.lastChild)&&"P"===e.lastChild.nodeName&&""===e.lastChild.innerHTML){var r=_("br");e.lastChild.appendChild(r)}e=e.lastChild}"IMG"===(e=g(e)?t:e).nodeName?this.imageFocus(e,i,n):i.setSelectionText(n,e,e,e.textContent.length,e.textContent.length),this.removeEmptyElements(o)},e.getNodeCollection=function(e,t,i){var n=[];return e.startOffset===e.endOffset&&e.startContainer===e.endContainer&&"BR"!==e.startContainer.nodeName&&e.startContainer.childNodes.length>0&&("TD"===e.startContainer.nodeName||3!==e.startContainer.nodeType&&i.classList&&i.classList.contains("pasteContent"))?n.push(e.startContainer.childNodes[e.endOffset]):n=t.getInsertNodeCollection(e),n},e.insertTempNode=function(e,t,i,n,o){if(e.startContainer!==o||g(e.startContainer.childNodes[e.endOffset-1])||"TABLE"!==e.startContainer.childNodes[e.endOffset-1].nodeName)if(e.startContainer!==o||g(e.startContainer.childNodes[e.endOffset])||"TABLE"!==e.startContainer.childNodes[e.endOffset].nodeName)if(e.startContainer===e.endContainer&&3!==e.startContainer.nodeType&&"HR"===t.firstChild.nodeName)e.startContainer.classList.contains("e-content")||"BODY"===e.startContainer.nodeName?e.startContainer.appendChild(t):e.startContainer.parentNode.insertBefore(t,e.startContainer);else{var r=this.getImmediateBlockNode(i[i.length-1],o);if((g(r)||g(r.parentElement))&&3!==e.endContainer.nodeType&&(r=e.endContainer,e.setEnd(r,e.endContainer.textContent.length)),(r&&"BODY"===r.nodeName||"DIV"===r.nodeName&&e.startContainer===e.endContainer&&1===e.startContainer.nodeType)&&(r=e.startContainer),r&&r.closest("LI")&&o.contains(r.closest("LI"))&&"TD"!==r.nodeName&&"TH"!==r.nodeName&&"TR"!==r.nodeName&&t&&t.firstElementChild&&("OL"===t.firstElementChild.tagName||"UL"===t.firstElementChild.tagName))for(var s=void 0;t.firstElementChild.lastElementChild&&"LI"===t.firstElementChild.lastElementChild.tagName;)(s=t.firstElementChild.lastElementChild).style.removeProperty("margin-left"),s.style.removeProperty("margin-top"),s.style.removeProperty("margin-bottom"),t.firstElementChild.insertAdjacentElement("afterend",s);if(r&&"TD"===r.nodeName||"TH"===r.nodeName||"TR"===r.nodeName){for(var a=e.startContainer;!g(a)&&a.parentElement!==r;)a=a.parentElement;return e.deleteContents(),(h=n.GetSpliceNode(e,a))?h.parentNode.replaceChild(t,h):e.insertNode(t),void(this.contentsDeleted=!0)}var l=new bm(o),c=this.getNodeCollection(e,l,t)[this.getNodeCollection(e,l,t).length-1],h=void 0;if(!c||"BR"!==c.nodeName&&"HR"!==c.nodeName&&("#text"!==c.nodeName||g(c.parentElement)||"LI"!==c.parentElement.nodeName)||g(c.parentElement)||0!==c.parentElement.textContent.trim().length){if(c&&("#text"===c.nodeName||"BR"===c.nodeName)&&!g(c.parentElement)&&("LI"===c.parentElement.nodeName||c.parentElement.closest("LI")||r===o&&c.parentElement===r)&&c.parentElement.textContent.trim().length>0){if(h=c,"LI"!==c.parentElement.nodeName||g(c.nextSibling)||"BR"!==c.nextSibling.nodeName||ee(c.nextSibling),!e.collapsed){var d=e.startContainer,p=e.startOffset;this.removeListfromPaste(e),e.setStart(d,p),e.setEnd(d,p)}return e.insertNode(t),void(this.contentsDeleted=!0)}h=n.GetSpliceNode(e,r)}else if(h=c,"LI"!==c.parentElement.nodeName||g(c.nextSibling)||"BR"!==c.nextSibling.nodeName||ee(c.nextSibling),"LI"===c.parentElement.nodeName&&""===c.parentElement.textContent)return this.removeListfromPaste(e),e.insertNode(t),void(this.contentsDeleted=!0);h.parentNode.replaceChild(t,h)}else e.startContainer.insertBefore(t,e.startContainer.childNodes[e.endOffset]);else g(e.startContainer.childNodes[e.endOffset-1].nextSibling)?e.startContainer.appendChild(t):e.startContainer.insertBefore(t,e.startContainer.childNodes[e.endOffset-1].nextSibling)},e.cursorPos=function(e,t,i,n,o){e.classList.add("lastNode"),o.innerHTML=function(e){var t=document.createElement("div");t.innerHTML=e;for(var i=t.querySelectorAll("table"),n=0;n<i.length;n++)if(i[n].classList.length>0&&!i[n].classList.contains("e-rte-table")&&!i[n].classList.contains("e-rte-custom-table")){if(i[n].classList.add("e-rte-paste-table"),i[n].classList.contains("e-rte-paste-word-table")){i[n].classList.remove("e-rte-paste-word-table");continue}if(i[n].classList.contains("e-rte-paste-excel-table")){i[n].classList.remove("e-rte-paste-excel-table"),"0"===i[n].getAttribute("border")&&i[n].removeAttribute("border");for(var o=i[n].querySelectorAll("td"),r=0;r<o.length;r++)"none"===o[r].style.borderLeft&&o[r].style.removeProperty("border-left"),"none"===o[r].style.borderRight&&o[r].style.removeProperty("border-right"),"none"===o[r].style.borderBottom&&o[r].style.removeProperty("border-bottom"),"none"===o[r].style.borderTop&&o[r].style.removeProperty("border-top"),"none"===o[r].style.border&&o[r].style.removeProperty("border")}else{if(i[n].classList.contains("e-rte-paste-onenote-table")){i[n].classList.remove("e-rte-paste-onenote-table");continue}if(i[n].classList.contains("e-rte-paste-html-table")){i[n].classList.remove("e-rte-paste-html-table");continue}}}var s=t.querySelectorAll("img");for(n=0;n<s.length;n++)s[n].classList.contains("e-rte-image-unsupported")||(s[n].classList.contains("e-rte-image")||s[n].classList.add("e-rte-image"),s[n].classList.contains("e-imginline")||s[n].classList.contains("e-imgbreak")||s[n].classList.add("e-imginline"));return t.innerHTML}(o.innerHTML),g(e=o.querySelector(".lastNode"))||(this.placeCursorEnd(e,t,i,n,o),e.classList.remove("lastNode"),0===e.classList.length&&e.removeAttribute("class"))},e.imageFocus=function(e,t,i){var n=document.createTextNode(" ");if(e.parentNode&&"A"===e.parentNode.nodeName){var o=e.parentNode,r=o.parentNode;r.insertBefore(n,o.nextSibling),r.insertBefore(e,n)}else e.parentNode.insertBefore(n,e.nextSibling);t.setSelectionText(i,e.nextSibling,e.nextSibling,0,0)},e.getImmediateBlockNode=function(e,t){for(;e&&Fp.indexOf(e.nodeName.toLocaleLowerCase())<0;)e=e.parentNode;return e},e.removingComments=function(e){var t=e.innerHTML;t=t.replace(/<!--[\s\S]*?-->/g,""),e.innerHTML=t},e.findDetachEmptyElem=function(e,t){var i;(void 0===t&&(t=!1),g(e.parentElement))?i=null:i=!(e.parentElement.textContent.length>0&&e.parentElement.textContent.match(/\u00a0/g)&&e.parentElement.textContent.match(/\u00a0/g).length>0)&&""===e.parentElement.textContent.trim()&&"true"!==e.parentElement.contentEditable&&g(e.parentElement.querySelector("img"))&&"TD"!==e.parentElement.nodeName&&"TH"!==e.parentElement.nodeName?t&&-1!==Fp.indexOf(e.parentElement.tagName.toLowerCase())?e:this.findDetachEmptyElem(e.parentElement,t):t&&-1!==Fp.indexOf(e.tagName.toLowerCase())?null:e;return i},e.removeEmptyElements=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=null);for(var n=e.querySelectorAll(":empty"),o=Array.from(n).filter((function(e){var t=e.tagName.toLowerCase();return!(e.closest("svg")||e.closest("canvas")||["td","th","textarea","input","img","video","audio","br","hr","iframe"].indexOf(t)>-1)})),r=0;r<o.length;r++){var s=!0,a=o[r];if("DIV"===a.tagName&&(s="none"===a.style.borderBottom||""===a.style.borderBottom),"COL"!==a.nodeName){var l=!g(i)&&a===i;if(Gp.indexOf(a.tagName.toLowerCase())<0&&s&&!l){var c=this.findDetachEmptyElem(a,t);g(c)||c.nodeType===Node.ELEMENT_NODE&&"TEXTAREA"===c.nodeName.toUpperCase()||ee(c)}}else{ee(a.parentElement)}}},e.closestEle=function(e,t){var i=e;if(se(i,"li"))return se(i,"li");for(;i&&1===i.nodeType;){if(i.parentNode===t||!g(i.parentNode.tagName)&&(-1!==Yp.indexOf(i.parentNode.tagName.toLocaleLowerCase())||-1!==Kp.indexOf(i.parentNode.tagName.toLocaleLowerCase())))return i;i=i.parentNode}return null},e.insertTableInList=function(e,t,i,n,o){if(e.collapsed){var r=0===e.startOffset,s=e.startContainer.textContent.trimEnd().length===e.startOffset;if(r||s)r?Iu.AppendBefore(t,n,!1):Iu.AppendBefore(t,n,!0);else o.SplitNode(e,i,!0).previousSibling.appendChild(t)}else e.deleteContents(),i.appendChild(t);t.classList.add("ignore-table")},e.alignCheck=function(e){for(var t=e.querySelectorAll('span[style*="text-align"]'),i=0;i<t.length;i++){var n=t[i];if(n){var o=this.getImmediateBlockNode(n,null);if(o){for(var r="",s=0;s<t.length;s++){var a=t[s];o.contains(a)&&(r+=a.textContent)}o.textContent.trim()===r.trim()&&(o.style.textAlign=n.style.textAlign)}}}},e.removeListfromPaste=function(e){e.deleteContents();var t=e.startContainer;g(t)||"LI"!==t.nodeName||g(t.parentElement)||"OL"!==t.parentElement.nodeName&&"UL"!==t.parentElement.nodeName||""!==t.textContent.trim()||t.parentElement.querySelectorAll("li").forEach((function(e){""===e.textContent.trim()&&e!==t&&e.remove()}))},e.inlineNode=["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","font","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"],e.contentsDeleted=!1,e}(),ju=function(){function e(e){this.listTabIndentation=!1,this.parent=e,this.domNode=this.parent.domNode,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(mu,this.applyListsHandler,this),this.parent.observer.on(gu,this.onKeyUp,this),this.parent.observer.on(uu,this.keyDownHandler,this),this.parent.observer.on(Cu,this.spaceKeyAction,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(mu,this.applyListsHandler),this.parent.observer.off(gu,this.onKeyUp),this.parent.observer.off(uu,this.keyDownHandler),this.parent.observer.off(Cu,this.spaceKeyAction),this.parent.observer.off(Su,this.destroy)},e.prototype.testList=function(e){var t=[/^[\d]+[.]+$/,/^(?=[MDCLXVI])M*(C[MD]|D?C{0,3})(X[CL]|L?X{0,3})(I[XV]|V?I{0,3})[.]$/gi,/^[a-zA-Z][.]+$/],i=g(e)?null:e.innerText.trim().split(".")[0]+".";if(!g(i))for(var n=0;n<t.length;n++)if(t[n].test(i))return!0;return!1},e.prototype.testCurrentList=function(e){var t=[/^[1]+[.]+$/,/^[i]+[.]+$/,/^[a]+[.]+$/];if(!g(e.startContainer.textContent.slice(0,e.startOffset)))for(var i=e.startContainer.textContent.replace(/\u200B/g,"").slice(0,e.startOffset).trim(),n=0;n<t.length;n++)if(t[n].test(i)&&2===i.length)return!0;return!1},e.prototype.createAutoList=function(e,t){var i={BR:{BR:!0,P:!0,DIV:!0},P:{BR:!1,P:!0,DIV:!0},DIV:{BR:!1,P:!0,DIV:!0}};return!(!i[e]||void 0===i[e][t])&&i[e][t]},e.prototype.isInsideSameListType=function(e,t){if(!e)return!1;var i=e.closest("li");if(!i)return!1;var n=i.closest("ul, ol");return!!n&&("OL"===n.tagName&&t||"UL"===n.tagName&&!t)},e.prototype.spaceList=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument);this.saveSelection=this.parent.nodeSelection.save(t,this.parent.currentDocument);var i=this.parent.domNode.getSelectedNode(t.startContainer,t.startOffset);this.parent.domNode.getSelectedNode(t.endContainer,t.endOffset);var n=i.previousElementSibling,o=i.nextElementSibling,r=g(n)?null:n.innerText.trim().substring(0,1),s=g(o)?null:o.innerText.trim().substring(0,1),a=this.testCurrentList(t),l=this.testList(n),c=this.testList(o),h=this.isInsideSameListType(i,a),d=t.startContainer.previousElementSibling&&"BR"===t.startContainer.previousElementSibling.tagName;if(!h&&!l&&!c&&"*"!==r&&"*"!==s&&(this.createAutoList(e.enterKey,e.shiftEnterKey)||!d)){var p=_("br");a?(t.startContainer.textContent=t.startContainer.textContent.slice(t.startOffset,t.startContainer.textContent.length),"#text"===t.startContainer.nodeName&&0===t.startContainer.textContent.length&&this.parent.domNode.insertAfter(p,t.startContainer),this.applyListsHandler({subCommand:"OL",callBack:e.callBack}),e.event.preventDefault()):"*"!==t.startContainer.textContent.replace(/\u200B/g,"").slice(0,t.startOffset).trim()&&"-"!==t.startContainer.textContent.replace(/\u200B/g,"").slice(0,t.startOffset).trim()||(t.startContainer.textContent=t.startContainer.textContent.slice(t.startOffset,t.startContainer.textContent.length),"#text"===t.startContainer.nodeName&&0===t.startContainer.textContent.length&&this.parent.domNode.insertAfter(p,t.startContainer),this.applyListsHandler({subCommand:"UL",callBack:e.callBack}),e.event.preventDefault())}},e.prototype.enterList=function(e){var t,i,n=this.parent.nodeSelection.getRange(this.parent.currentDocument),o="LI"===n.startContainer.nodeName?n.startContainer:n.startContainer.parentElement.closest("LI"),r="LI"===n.endContainer.nodeName?n.endContainer:n.endContainer.parentElement.closest("LI"),s=!1;if(!g(o)){var a=o.querySelectorAll(".e-video-clickelem"),l=a.length>0&&"IFRAME"===a[0].childNodes[0].nodeName;s=o.querySelectorAll("IMG").length>0||o.querySelectorAll("AUDIO").length>0||o.querySelectorAll("VIDEO").length>0||l}o&&(t=o.parentElement)&&(i=t.parentElement);var c=g(o)?null:o.querySelector("TABLE");if(!g(o)&&!g(r)&&o===r&&"LI"===o.tagName&&""===o.textContent.trim()&&!s&&g(c)){if(o.innerHTML.indexOf("&nbsp;")>=0)return;if(65279===o.textContent.charCodeAt(0)&&(o.textContent=""),g(i.closest("UL"))&&g(i.closest("OL"))){if(!g(o.nextElementSibling)){var h=this.parent.domNode.blockParentNode(o);this.parent.nodeCutter.GetSpliceNode(n,h)}var d=void 0;"DIV"===e.enterAction?(d=_("div")).innerHTML="<br>":"P"===e.enterAction?(d=_("p")).innerHTML="<br>":d=_("br"),g(i)||"BLOCKQUOTE"!==i.nodeName||this.parent.observer.notify("blockquote_list_handled",{}),this.parent.domNode.insertAfter(d,t),e.event.preventDefault(),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,d,0),""===t.textContent&&0===t.querySelectorAll("audio,video").length?ee(t):ee(o)}g(i)||g(i.closest("UL"))&&g(i.closest("OL"))||"LI"!==i.nodeName||"none"!==i.style.listStyleType||""!==i.textContent||""!==o.textContent||o!==t.firstElementChild||!g(o.nextSibling)||(ee(t),i.style.removeProperty("list-style-type"),e.event.preventDefault())}this.handleNestedEnterKeyForLists(e,i,o,t)},e.prototype.handleNestedEnterKeyForLists=function(e,t,i,n){var o=!1;if(!g(i)&&i.querySelectorAll("audio,video,table,img").length>0&&(o=!0),!g(t)&&(!g(t.closest("UL"))||!g(t.closest("OL"))||"UL"===n.nodeName||"OL"===n.nodeName)&&("LI"===t.nodeName||"LI"===i.nodeName)&&("none"===t.style.listStyleType||""===t.style.listStyleType)&&""!==t.textContent&&(""!==i.textContent||!g(i.nextSibling))&&i.firstElementChild&&""===i.firstElementChild.textContent&&!o&&(i===n.firstElementChild||"LI"===i.nodeName)){var r=this.parent.nodeSelection.getRange(this.parent.currentDocument);this.saveSelection=this.parent.nodeSelection.save(r,this.parent.currentDocument),this.domNode.setMarker(this.saveSelection),e.event.preventDefault();var s=[];i===n.firstElementChild?s.push(n.firstElementChild):"LI"===i.nodeName&&s.push(i),this.revertList(s,e),this.revertClean(),this.saveSelection=this.domNode.saveMarker(this.saveSelection),this.saveSelection.restore()}},e.prototype.backspaceList=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=this.parent.domNode.getSelectedNode(t.startContainer,t.startOffset),n=this.parent.domNode.getSelectedNode(t.endContainer,t.endOffset);if(i="BR"===i.nodeName?i.parentElement:i,n="BR"===n.nodeName?n.parentElement:n,!g(i)&&i.closest("li")){var o=this.getListCursorInfo(t),r=null===i.previousElementSibling,s=this.parent.domNode.blockNodes(),a=this.isAllListNodesSelected(i.closest("li").parentElement),l="StartNested"===o.position&&i&&i.parentElement&&i.parentElement.closest("li")&&i.parentElement.closest("li").getAttribute("style")&&-1!==i.parentElement.closest("li").getAttribute("style").indexOf("list-style-type: none;");if(r&&(["StartParent"].indexOf(o.position)>-1||l)){e.event.preventDefault();var c=this.parent.nodeSelection.save(t,this.parent.currentDocument);return this.domNode.setMarker(c),this.revertList([s[0]],e),this.revertClean(),void(c=this.domNode.saveMarker(c)).restore()}if(["SingleFull","MultipleFull"].indexOf(o.selectionState)>-1&&a){if(e.event.preventDefault(),s[0].innerHTML="",t.deleteContents(),s.length>1)for(var h=0;h<s.length;h++){if(0!==h)ee(s[h])}return void this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,s[0],0)}}if(i===n&&!g(se(i,"li"))&&(""===i.textContent.trim()&&65279===i.textContent.charCodeAt(0)||1===i.textContent.length&&8203===i.textContent.charCodeAt(0))&&(i.textContent=""),i===n&&"LI"===i.tagName&&0===i.textContent.length&&g(i.previousElementSibling)&&i.removeAttribute("style"),i===n&&""===i.textContent){if("LI"===i.parentElement.tagName&&"LI"===n.parentElement.tagName)ee(i);else if(i.closest("ul")||i.closest("ol")){if((d=g(i.closest("ul"))?i.closest("ol"):i.closest("ul")).firstElementChild===i&&!g(d.children[1])&&("OL"===d.children[1].tagName||"UL"===d.children[1].tagName))if(d.tagName===d.children[1].tagName){for(;d.children[1].lastChild;)this.parent.domNode.insertAfter(d.children[1].lastChild,d.children[1]);ee(d.children[1])}else d.parentElement.insertBefore(d.children[1],d)}}else if(!(g(i.firstChild)||"BR"!==i.firstChild.nodeName||g(i.childNodes[1])||"UL"!==i.childNodes[1].nodeName&&"OL"!==i.childNodes[1].nodeName)){var d;if((d=g(i.closest("ul"))?i.closest("ol"):i.closest("ul")).tagName===i.childNodes[1].nodeName){for(;i.childNodes[1].lastChild;)this.parent.domNode.insertAfter(i.children[1].lastChild,i);ee(i.childNodes[1])}else d.parentElement.insertBefore(i.children[1],d)}if(i===n&&"LI"===i.tagName&&this.isAtListStart(i,t)&&!g(i.closest("ul, ol"))){var p=i.closest("ul, ol"),u=p.parentElement,m=i.previousElementSibling,f=i.querySelector("ol, ul");(!g(u)&&"LI"===u.tagName&&!g(p.previousSibling)||!g(m)&&"LI"===m.nodeName)&&(g(f)||!g(m)&&g(m)||(e.event.preventDefault(),this.handleNestedListRearrangement(i,p,u,m,f)))}this.removeList(t,e),this.firstListBackSpace(t,e)},e.prototype.handleNestedListRearrangement=function(e,t,i,n,o){for(var r=this.parent.nodeSelection.findLastTextPosition(g(n)?t.previousSibling:n),s=Array.from(e.childNodes),a=0;a<s.length;a++){var l=s[a];if(l===o&&o)for(;o.firstChild;){t.insertBefore(o.firstChild,e),e.querySelector("OL:empty,UL:empty")&&e.remove()}else g(n)?i.insertBefore(l,t):r.node.parentElement.closest("li").appendChild(l)}this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,r.node,r.offset)},e.prototype.removeList=function(e,t){var i=this.parent.domNode.getSelectedNode(e.startContainer,e.startOffset),n=!g(e.endContainer.parentElement.closest("li"))&&e.endContainer.parentElement.closest("li").childElementCount>1&&"#text"===e.endContainer.nodeName?e.endContainer:this.parent.domNode.getSelectedNode(e.endContainer,e.endOffset),o="#text"===e.startContainer.nodeName?e.startContainer.parentElement.closest("li"):e.startContainer.closest("li"),r="";if(g(o)||g(o.firstChild)||o.childNodes.forEach((function(e){r+=e.textContent})),i="BR"===i.nodeName?i.parentElement:i,n="BR"===n.nodeName?n.parentElement:n,i="LI"===i.nodeName||g(i.closest("LI"))?i:i.closest("LI"),n="LI"===n.nodeName||"#text"===n.nodeName||g(n.closest("LI"))?n:n.closest("LI"),(("OL"===e.commonAncestorContainer.nodeName||"UL"===e.commonAncestorContainer.nodeName||"LI"===e.commonAncestorContainer.nodeName)&&g(n.nextElementSibling)&&n.textContent.length===e.endOffset&&g(i.previousElementSibling)&&0===e.startOffset||-1!==Q.userAgent.indexOf("Firefox")&&e.startContainer===e.endContainer&&e.startContainer===this.parent.editableElement&&0===e.startOffset&&1===e.endOffset)&&(-1!==Q.userAgent.indexOf("Firefox")?ee(e.commonAncestorContainer.childNodes[0]):"LI"===e.commonAncestorContainer.nodeName?ee(e.commonAncestorContainer.parentElement):ee(e.commonAncestorContainer),t.event.preventDefault(),o="#text"===e.startContainer.nodeName?e.startContainer.parentElement.closest("li"):e.startContainer.closest("li")),!g(o)&&(!e.collapsed||""===o.textContent.trim()&&g(o.previousElementSibling)&&g(o.nextElementSibling))&&o.textContent===r){e.deleteContents();for(var s=this.parent.editableElement.querySelectorAll("li"),a=function(e){g(s[e].childNodes)||s[e].childNodes.forEach((function(t){"A"===t.nodeName&&""===t.textContent&&s[e].removeChild(t)})),s[e].firstChild&&""!==s[e].textContent.trim()||s[e]!==i&&s[e]!==n||s[e].parentNode.removeChild(s[e])},l=0;l<s.length;l++)a(l);this.parent.editableElement.querySelectorAll("ol").forEach((function(e){e.firstChild&&""!==e.textContent.trim()||e.parentNode.removeChild(e)})),this.parent.editableElement.querySelectorAll("ul").forEach((function(e){e.firstChild&&""!==e.textContent.trim()||e.parentNode.removeChild(e)})),t.event.preventDefault()}},e.prototype.onKeyUp=function(e){if(!g(this.commonLIParent)&&!g(this.commonLIParent.querySelector(".removeList"))){for(var t=this.commonLIParent.querySelector(".removeList");!g(t.firstChild);)this.parent.domNode.insertAfter(t.firstChild,t);ee(t)}if(13===e.event.keyCode)for(var i=this.parent.editableElement.querySelectorAll("UL, OL"),n=0;n<i.length;n++)g(i[n])||g(i[n].parentElement)||g(i[n].previousElementSibling)||"UL"!==i[n].parentElement.nodeName&&"OL"!==i[n].parentElement.nodeName||i[n].previousElementSibling.appendChild(i[n])},e.prototype.firstListBackSpace=function(e,t){var i=this.parent.domNode.getSelectedNode(e.startContainer,e.startOffset),n=i.closest("LI");if((g(n)||this.isAtListStart(n,e))&&(g(i.closest("OL"))?g(i.closest("UL"))||(this.commonLIParent=i.closest("UL")):this.commonLIParent=i.closest("OL"),!g(n)&&0===e.startOffset&&0===e.endOffset&&g(i.previousSibling)&&!g(this.commonLIParent)&&g(this.commonLIParent.previousSibling)&&g(this.commonLIParent.parentElement.closest("OL"))&&g(this.commonLIParent.parentElement.closest("UL"))&&g(this.commonLIParent.parentElement.closest("LI")))){var o=_("P");o.innerHTML="&#8203;",i.classList.add("removeList"),this.commonLIParent.parentElement.insertBefore(o,this.commonLIParent)}},e.prototype.isAtListStart=function(e,t){if("LI"!==e.nodeName)return!1;var i=e;return this.getFirstTextNode(i)===t.startContainer&&0===t.startOffset},e.prototype.getFirstTextNode=function(e){if(e.nodeType===Node.TEXT_NODE)return e;for(var t=0;t<e.childNodes.length;t++){var i=this.getFirstTextNode(e.childNodes[t]);if(i)return i}return null},e.prototype.keyDownHandler=function(e){if(13===e.event.which&&this.enterList(e),32===e.event.which&&this.spaceList(e),8===e.event.which&&this.backspaceList(e),46===e.event.which&&"delete"===e.event.action){var t=(s=this.parent.nodeSelection.getRange(this.parent.currentDocument)).commonAncestorContainer,i=s.startContainer,n=s.endContainer,o=3===i.nodeType?this.domNode.blockParentNode(i):i,r=3===n.nodeType?this.domNode.blockParentNode(n):n;"UL"!==t.nodeName&&"OL"!==t.nodeName||o===r||g(se(o,"ul"))&&g(se(o,"ol"))||g(se(r,"ul"))&&g(se(r,"ol"))||t.lastElementChild!==se(r,"li")||t.lastChild===r||s.collapsed||this.areAllListItemsSelected(t,s)&&ee(t),this.removeList(s,e)}if(9===e.event.which){var s=this.parent.nodeSelection.getRange(this.parent.currentDocument);e.event.action&&"indent"===e.event.action||(this.saveSelection=this.parent.nodeSelection.save(s,this.parent.currentDocument)),e.enableTabKey&&this.handleListIndentation();var a=void 0;if(s.startOffset,s.endOffset,(o=this.parent.domNode.getSelectedNode(s.startContainer,s.startOffset))===(r=this.parent.domNode.getSelectedNode(s.endContainer,s.endOffset))&&("BR"===o.nodeName||"#text"===o.nodeName)&&Yp.indexOf(o.parentNode.tagName.toLocaleLowerCase())>=0)return;e.event.action&&"indent"===e.event.action||this.listTabIndentation||this.domNode.setMarker(this.saveSelection),a=this.domNode.blockNodes();for(var l=[],c=!0,h=0;h<a.length;h++)"LI"===a[h].parentNode.tagName?l.push(a[h].parentNode):se(a[h],"OL")||se(a[h],"UL")||!se(a[h],"LI")?"LI"===a[h].tagName&&"P"!==a[h].childNodes[0].tagName&&"OL"!==a[h].childNodes[0].tagName&&"UL"!==a[h].childNodes[0].tagName&&l.push(a[h]):l.push(se(a[h],"LI"));l.length>1||1===l.length?(e.event.preventDefault(),e.event.stopPropagation(),this.currentAction=this.getAction(l[0]),e.event.shiftKey&&(!e.enableTabKey||e.enableTabKey&&!this.listTabIndentation)?(this.revertList(l,e),this.revertClean()):(!e.enableTabKey||e.enableTabKey&&!this.listTabIndentation)&&(c=this.nestedList(l)),c&&(this.cleanNode(),this.parent.editableElement.focus({preventScroll:!0})),e.event.action&&"indent"===e.event.action||this.listTabIndentation||(this.saveSelection=this.domNode.saveMarker(this.saveSelection),this.saveSelection.restore(),e.callBack&&e.callBack({requestType:this.currentAction,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes(),event:e.event}))):e.event.action&&"indent"===e.event.action||this.listTabIndentation||(e.event&&e.event.shiftKey&&"Tab"===e.event.key&&(e.event.action="tab"),this.saveSelection=this.domNode.saveMarker(this.saveSelection),this.saveSelection.restore()),this.listTabIndentation=!1}else switch(e.event.action){case"ordered-list":this.applyListsHandler({subCommand:"OL",callBack:e.callBack}),e.event.preventDefault();break;case"unordered-list":this.applyListsHandler({subCommand:"UL",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.handleListIndentation=function(){var e=this.parent.nodeSelection.getRange(this.parent.currentDocument),t=this.saveSelection.getParentNodeCollection(e);if(("LI"===t[0].nodeName||se(t[0],"li"))&&!this.isCursorAtStartOfLI(e)){var i=t[t.length-1],n=t[0],o=e.startContainer;if(i&&n){if(e.deleteContents(),i!==n){for(var r=o;r.parentElement;){if(this.parent.domNode.isBlockNode(r.parentElement)){r=r.parentElement;break}r=r.parentElement}var s=void 0;this.parent.domNode.isBlockNode(i.lastChild)?(o.nodeValue+="    ",s=o.nodeValue.length):i.innerHTML+='&nbsp;&nbsp;&nbsp;&nbsp;<span class="rte-tab-space"></span>';var a=n.firstChild;if(a&&this.parent.domNode.isBlockNode(a)){for(;a.firstChild;)r.appendChild(a.firstChild);a.remove()}for(;n.firstChild;)this.parent.domNode.isBlockNode(n.firstChild)?this.parent.domNode.insertAfter(n.firstChild,r):i.appendChild(n.firstChild);n.remove();var l=i.querySelector(".rte-tab-space");l&&l.previousSibling?(this.saveSelection.setCursorPoint(this.parent.currentDocument,l.previousSibling,l.previousSibling.textContent.length),l.parentNode.removeChild(l)):this.saveSelection.setCursorPoint(this.parent.currentDocument,o,s)}else xu.Insert(this.parent.currentDocument,"&nbsp;&nbsp;&nbsp;&nbsp;");this.listTabIndentation=!0}}},e.prototype.isCursorAtStartOfLI=function(e){for(var t=e.startContainer;t&&"LI"!==t.nodeName;)t=t.parentNode;if(!t)return!1;var i=e.cloneRange();return i.selectNodeContents(t),i.setEnd(e.startContainer,e.startOffset),""===i.toString().trim()},e.prototype.spaceKeyAction=function(e){32===e.event.which&&this.spaceList(e)},e.prototype.getAction=function(e){return"OL"===e.parentNode.nodeName?"OL":"UL"},e.prototype.revertClean=function(){for(var e=this.parent.editableElement.querySelectorAll("ul, ol"),t=0;t<e.length;t++){var i=e[t].querySelectorAll("ul, ol");if(i.length>0)for(var n=0;n<i.length;n++){var o=i[n].previousSibling;o&&"LI"===o.tagName&&o.appendChild(i[n])}}},e.prototype.noPreviousElement=function(e){var t,i,n=e.querySelectorAll("ol, ul"),o=e.querySelectorAll("li"),r=this.domNode.contents(o[0])[0];if(o.length>0&&("OL"===r.nodeName||"UL"===r.nodeName)?t=o[0]:i=n[0],t)for(var s=this.domNode.contents(e)[0];s&&!this.domNode.isList(s);null){var a=s.nextSibling;J([s],t),ae(e,{"list-style-type":"none"}),ae(t,{"list-style-type":""}),s=a}else if(i){J([c=_("li")],i);for(s=this.domNode.contents(e)[0];s&&!this.domNode.isList(s);null){a=s.nextSibling;c.appendChild(s),s=a}J([i],e.parentNode),ee(e),J([l=_("li",{styles:"list-style-type: none;"})],i.parentNode),$([i],l)}else{var l,c;J([l=_("li",{styles:"list-style-type: none;"})],e.parentNode),J([c=_(e.parentNode.tagName)],l),$([e],c)}},e.prototype.nestedList=function(e){for(var t=!1,i=0;i<e.length;i++){var n=this.domNode.getPreviousNode(e[i]);if(n){t=!0;var o=void 0,r=void 0,s=e[i].querySelectorAll("ol, ul"),a=e[i].querySelectorAll("li"),l=this.domNode.contents(a[0])[0];if(a.length>0&&("OL"===l.nodeName||"UL"===l.nodeName)?r=a[0]:o=s[0],o){J([d=_("li")],o);for(var c=this.domNode.contents(e[i])[0];c&&!this.domNode.isList(c);null){var h=c.nextSibling;d.appendChild(c),c=h}$([o],n),ee(e[i])}else if(r){if("LI"===n.tagName){for(c=this.domNode.contents(e[i])[0];c&&!this.domNode.isList(c);null){h=c.nextSibling;J([c],r),ae(e[i],{"list-style-type":"none"}),ae(r,{"list-style-type":""}),c=h}$([r.parentNode],n),ee(e[i])}}else{var d;if("LI"===n.tagName)(d=_(e[i].parentNode.tagName)).style.listStyleType=e[i].parentNode.style.listStyleType,$([d],n),$([e[i]],d);else"OL"!==n.tagName&&"UL"!==n.tagName||$([e[i]],n)}}else{var p=e[i];t=!0,this.noPreviousElement(p)}}return t},e.prototype.isCursorBeforeTable=function(e){return e.startOffset===e.endOffset&&e.startContainer.childNodes.length>0&&!g(e.startContainer.childNodes[e.startOffset])&&"TABLE"===e.startContainer.childNodes[e.startOffset].nodeName},e.prototype.isCursorAtEndOfTable=function(e){return e.startOffset===e.endOffset&&e.startContainer.childNodes.length>0&&!g(e.startContainer.childNodes[e.startOffset-1])&&"TABLE"===e.startContainer.childNodes[e.startOffset-1].nodeName},e.prototype.isListItemWithTableChild=function(e){return"LI"===e.nodeName&&!g(e.firstChild)&&"TABLE"===e.firstChild.nodeName},e.prototype.applyListsHandler=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument);if(-1!==Q.userAgent.indexOf("Firefox")&&t.startContainer===t.endContainer&&t.startContainer===this.parent.editableElement){for(var i=t.startContainer.childNodes[t.startOffset>0?t.startOffset-1:t.startOffset]||t.startContainer,n=t.endContainer.childNodes[t.endOffset>0?t.endOffset-1:t.endOffset]||t.endContainer,o="BR"===n.lastChild.nodeName?g(n.lastChild.previousSibling)?n:n.lastChild.previousSibling:n.lastChild;!g(o)&&"#text"!==o.nodeName&&"IMG"!==o.nodeName&&"BR"!==o.nodeName&&"HR"!==o.nodeName;)o=o.lastChild;this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,i,o,0,o.textContent.length),t=this.parent.nodeSelection.getRange(this.parent.currentDocument)}if(t.startContainer===t.endContainer&&t.startContainer===this.parent.editableElement&&t.startOffset===t.endOffset&&0===t.startOffset&&0===this.parent.editableElement.textContent.length&&"TABLE"!==this.parent.editableElement.childNodes[0].nodeName&&"IMG"!==this.parent.editableElement.childNodes[0].nodeName){var r=t.startContainer.childNodes[0];this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,r,r,0,0),t=this.parent.nodeSelection.getRange(this.parent.currentDocument)}this.saveSelection=this.parent.nodeSelection.save(t,this.parent.currentDocument),this.currentAction=e.subCommand,this.currentAction=e.subCommand="NumberFormatList"===this.currentAction?"OL":"BulletFormatList"===this.currentAction?"UL":this.currentAction,this.domNode.setMarker(this.saveSelection);var s=this.domNode.blockNodes(!0);"BR"===e.enterAction&&(this.isCursorBeforeTable(t)?s=[t.startContainer.childNodes[t.startOffset]]:this.isCursorAtEndOfTable(t)?s=[t.startContainer.childNodes[t.startOffset-1]]:1===s.length&&this.isListItemWithTableChild(s[0])?s[0]=s[0].firstChild:(this.setSelectionBRConfig(),this.parent.domNode.convertToBlockNodes(this.parent.domNode.blockNodes(),!0),this.setSelectionBRConfig(),s=this.parent.domNode.blockNodes()));for(var a=0;a<s.length;a++)"TABLE"!==s[a].tagName||t.collapsed||s.splice(a,1),s.length>0&&"LI"!==s[a].tagName&&"LI"===s[a].parentNode.tagName&&(s[a]=s[a].parentNode);this.applyLists(s,this.currentAction,e.selector,e.item,e),e.callBack&&e.callBack({requestType:this.currentAction,event:e.event,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes()})},e.prototype.setSelectionBRConfig=function(){var e=this.parent.editableElement.querySelector("."+au),t=this.parent.editableElement.querySelector("."+lu);g(t)?this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,e,0):this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,e,t,0,0)},e.prototype.applyLists=function(e,t,i,n,o){if(this.isRevert(e,t,n)&&g(n))this.revertList(e,o),this.removeEmptyListElements();else{this.checkLists(e,t,n);var r="";""!==e[0].style.marginLeft&&(r=' style = "margin-left: '+e[0].style.marginLeft+';"');for(var s=0;s<e.length;s++){g(n)||g(n.listStyle)||("listImage"===n.listStyle?ae(e[s],{"list-style-image":n.listImage}):(ae(e[s],{"list-style-image":"none"}),ae(e[s],{"list-style-type":n.listStyle.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}))),e[s].style.removeProperty("margin-left");var a="IMG"===e[s].tagName||e[s].classList.contains("e-editor-select-start")?"":this.domNode.attributes(e[s]);if("true"===e[s].getAttribute("contenteditable")&&1===e[s].childNodes.length&&"TABLE"===e[s].childNodes[0].nodeName){var l=document.createElement(t);l.innerHTML="<li><br/></li>",e[s].appendChild(l)}else if("LI"!==e[s].tagName&&g(n)&&"BLOCKQUOTE"===e[s].nodeName){var c="<"+t+r+">",h="</"+t+">",d="li"+a,p=e[s].innerHTML,u=c+(m=this.domNode.createTagString(d,null,p))+h;e[s].innerHTML=u}else if("LI"!==e[s].tagName&&g(n)){c="<"+t+r+">",h="</"+t+">",d="li"+a,p=e[s].tagName.toLowerCase()===Up?e[s].innerHTML:e[s].outerHTML;var m=this.domNode.createTagString(d,null,p);u=c+(m=this.setStyle(m))+h;this.domNode.replaceWith(e[s],u)}else if(!g(n)&&"LI"!==e[s].tagName){c="<"+t+("IMG"===e[s].tagName?"":this.domNode.attributes(e[s]))+">",h="</"+t+">",d="li",p=e[s].tagName.toLowerCase()===Up?e[s].innerHTML:e[s].outerHTML,u=c+(m=this.domNode.createTagString(d,null,p))+h;this.domNode.replaceWith(e[s],u)}}}(this.cleanNode(),"BR"===o.enterAction)&&document.querySelectorAll("span#removeSpan").forEach((function(e){for(var t=document.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e)}));this.parent.editableElement.focus({preventScroll:!0}),eu()&&tu(this.parent.editableElement,i),this.saveSelection=this.domNode.saveMarker(this.saveSelection),this.saveSelection.restore()},e.prototype.setStyle=function(e){var t=document.createElement("div");t.innerHTML=e.trim();var i=t.querySelector("li"),n=i;if(i&&1===i.children.length){for(var o=function(){var e=i.firstChild;if(e&&(e.style.cssText||"B"===e.tagName.toUpperCase()||"STRONG"===e.tagName.toUpperCase()||"I"===e.tagName.toUpperCase()||"EM"===e.tagName.toUpperCase())){var t=["font-size","font-family","color","font-weight"],o=e.style.cssText.split(";").map((function(e){return e.trim()})).filter((function(e){var i=g(e.split(":")[0])?"":e.split(":")[0].trim();return i&&-1!==t.indexOf(i)})).join(";");o?n.style.cssText+=(n.style.cssText?";":"")+o:"B"===e.tagName.toUpperCase()||"STRONG"===e.tagName.toUpperCase()?(o="font-weight: bold;",n.style.cssText+=(n.style.cssText?";":"")+o):"I"!==e.tagName.toUpperCase()&&"EM"!==e.tagName.toUpperCase()||(o="font-style: italic;",n.style.cssText+=(n.style.cssText?";":"")+o)}i=e};i&&1===i.children.length&&i.firstChild&&i.firstChild.nodeType!==Node.TEXT_NODE;)o();e=t.innerHTML}return e},e.prototype.removeEmptyListElements=function(){for(var e=this.parent.editableElement.querySelectorAll("ol, ul"),t=0;t<e.length;t++)""===e[t].textContent.trim()&&ee(e[t])},e.prototype.isRevert=function(e,t,i){for(var n=!0,o=0;o<e.length;o++){if("LI"!==e[o].tagName)return!1;(e[o].parentNode.tagName!==t||g(i)&&""!==e[o].parentNode.style.listStyleType)&&(n=!1),e[o].parentNode.tagName===t&&""!==e[o].parentNode.style.listStyleType&&(n=!0)}return n},e.prototype.checkLists=function(e,t,i){for(var n=[],o=0;o<e.length;o++){var r=e[o].parentNode;g(i)||"LI"!==e[o].tagName||g(i.listStyle)||("listImage"===i.listStyle?ae(r,{"list-style-image":i.listImage}):(ae(r,{"list-style-image":"none"}),ae(r,{"list-style-type":i.listStyle.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}))),("LI"===e[o].tagName&&r.tagName!==t&&n.indexOf(r)<0||"LI"===e[o].tagName&&r.tagName===t&&n.indexOf(r)<0&&null!==i)&&n.push(r),g(i)&&(r.tagName===t||("UL"===r.tagName||"OL"===r.tagName)&&r.hasAttribute("style"))&&r.hasAttribute("style")&&r.removeAttribute("style")}for(var s=n.length-1;s>=0;s--){var a=n[s],l="<"+t.toLowerCase()+" "+this.domNode.attributes(a)+">"+a.innerHTML+"</"+t.toLowerCase()+">";this.domNode.replaceWith(n[s],l)}},e.prototype.cleanNode=function(){for(var e,t,i=this.parent.editableElement.querySelectorAll("ol + ol, ul + ul"),n=0;n<i.length;n++){for(var o=i[n],r=!0,s=o;s.parentElement&&(!s.parentElement||"LI"===s.parentElement.tagName||"OL"===s.parentElement.tagName||"UL"===s.parentElement.tagName);)s=s.parentElement;if(r&&("OL"===i[n].parentElement.parentElement.nodeName||"UL"===i[n].parentElement.parentElement.nodeName))r=!1,e=i[n].parentElement.parentElement.style.listStyleType,t=o.previousElementSibling;if(this.domNode.isList(o.previousElementSibling)&&this.domNode.openTagString(o)===this.domNode.openTagString(o.previousElementSibling)){for(var a=this.domNode.contents(o),l=0;l<a.length;l++)o.previousElementSibling.appendChild(a[l]);o.parentNode.removeChild(o)}else if(g(o.getAttribute("level"))){if(this.domNode.isList(o.previousElementSibling)&&s.contains(o.previousElementSibling)&&("OL"===o.tagName||"UL"===o.tagName)&&("OL"===o.previousElementSibling.nodeName||"UL"===o.previousElementSibling.nodeName)){for(a=this.domNode.contents(o),l=0;l<a.length;l++)o.previousElementSibling.appendChild(a[l]);o.parentNode.removeChild(o)}}else o.tagName===o.previousElementSibling.tagName&&o.previousElementSibling.lastChild.append(o)}if(t){t.style.listStyleType=e;var c=this.parent.nodeSelection.getRange(this.parent.currentDocument),h=[];"UL"===c.commonAncestorContainer.nodeName||"OL"===c.commonAncestorContainer.nodeName?(c.commonAncestorContainer instanceof Element&&h.push(c.commonAncestorContainer),h=h.concat(Array.from(c.commonAncestorContainer.querySelectorAll("ol, ul")))):h=Array.from(c.commonAncestorContainer.querySelectorAll("ol, ul"));for(var d=0;d<h.length;d++)for(var p=void 0,u=h[d];u;)"OL"!==u.nodeName&&"OL"!==u.nodeName||(""!==u.style.listStyleType&&"none"!==u.style.listStyleType&&"LI"!==u.nodeName?p=u.style.listStyleType:g(p)||""!==u.style.listStyleType&&"none"!==u.style.listStyleType||"LI"===u.nodeName||"UL"!==u.nodeName&&"OL"!==u.nodeName||(u.style.listStyleType=p)),u=u.querySelector("UL,OL")}},e.prototype.findUnSelected=function(e,t){if((e=e.slice().reverse()).length>0){var i=[],n=[],o=[],r=[];o=t[t.length-1].childNodes;for(var s=0;s<o.length;s++)if("OL"===o[s].tagName||"UL"===o[s].tagName){var a=o[s].querySelectorAll("li");if(a.length>0)for(var l=0;l<a.length;l++)r.push(a[l])}for(var c=0;c<r.length;c++){for(var h=0,d=0;d<e.length;d++)r[c].contains(e[d])||(h+=1);h===e.length&&n.push(r[c])}if(n.length>0)for(var p=0;p<n.length;p++)"OL"!==this.domNode.contents(n[p])[0].nodeName&&"UL"!==this.domNode.contents(n[p])[0].nodeName&&i.push(n[p]);i.length>0&&this.nestedList(i)}},e.prototype.revertList=function(e,t){for(var i=[],n=e.length-1;n>=0;n--)for(var o=n-1;o>=0;o--)if(e[o].contains(e[n])||e[o]===e[n]){i.push(e[n]),e.splice(n,1);break}this.findUnSelected(i,e);var r=[];for(n=0;n<e.length;n++){var s=e[n];3===this.domNode.contents(s)[0].nodeType&&0===this.domNode.contents(s)[0].textContent.trim().length&&ee(this.domNode.contents(s)[0]);var a=e[n].parentNode,l=s.getAttribute("class");if(0===i.length){var c=e[n].querySelectorAll("ul, ol")[0];if(c)if(c.querySelectorAll("li")){var h=_(c.tagName);$([h],c.parentNode);var d=_("li",{styles:"list-style-type: none;"});$([d],h),$([c],d)}}if(s.parentNode.insertBefore(this.closeTag(a.tagName),s),"LI"===a.parentNode.tagName||"OL"===a.parentNode.tagName||"UL"===a.parentNode.tagName)s.parentNode.insertBefore(this.closeTag("LI"),s);else{var p=this.getClosestListParentMargin(s);if(0===s.querySelectorAll(Fp.join(", ")).length){var u=g(l)?' class="e-rte-wrap-inner"':' class="'+l+' e-rte-wrap-inner"',m=a;e.length===m.querySelectorAll("li").length&&(g(m.style.listStyleType)||a.style.removeProperty("list-style-type"),g(m.style.listStyleImage)||a.style.removeProperty("list-style-image"),0===m.style.length&&a.removeAttribute("style"));var f=g(t.enterAction)?Up:t.enterAction,y="<"+f+u+this.domNode.attributes(s)+"></"+f+">",v=document.createElement("div");if(v.innerHTML=y,""!==p&&(v.firstElementChild.style.marginLeft=p),"BR"!==t.enterAction)this.domNode.wrapInner(s,this.domNode.parseHTMLFragment(v.innerHTML));else{var b=document.createElement("br");this.domNode.wrapInner(s,this.domNode.parseHTMLFragment("<span class=e-rte-wrap-inner id=removeSpan></span>")),s.appendChild(b)}}else if(3===this.domNode.contents(s)[0].nodeType){var M=this.domNode.createTagString(Up,a,this.parent.domNode.encode(this.domNode.contents(s)[0].textContent));this.domNode.replaceWith(this.domNode.contents(s)[0],M)}else if(this.domNode.contents(s)[0].classList.contains(au)||this.domNode.contents(s)[0].classList.contains(lu)){M=this.domNode.createTagString(Up,a,"<br>"+this.domNode.contents(s)[0].outerHTML);this.domNode.contents(s)[1]&&"BR"===this.domNode.contents(s)[1].tagName?(this.domNode.contents(s)[1].remove(),M=this.domNode.createTagString(Up,a,"<br>"+this.domNode.contents(s)[0].outerHTML)):M=this.domNode.createTagString(Up,a,this.domNode.contents(s)[0].outerHTML),this.domNode.replaceWith(this.domNode.contents(s)[0],M)}else{var N=s.firstChild;if(N){var C=s.parentElement.attributes;if(C.length>0)for(var E=0;E<C.length;E++){var D=C[E],T=function(e){return e?e.split(";").filter((function(e){return!/list-style-(image|type):/.test(e.trim())})).join(";").trim():""},L=T(N.getAttribute(D.nodeName)),S=T(s.parentElement.getAttribute(D.nodeName));L&&L!==S?N.setAttribute(D.nodeName,L?S+" "+L:S):N.setAttribute(D.nodeName,S),0===N.style.length&&N.removeAttribute("style")}}(l=N.getAttribute("class"))&&N.getAttribute("class")&&l!==N.getAttribute("class")&&ie(N,{class:l+" "+N.getAttribute("class")})}$([this.openTag("LI")],s),J([this.closeTag("LI")],s)}this.domNode.insertAfter(this.openTag(a.tagName),s),"LI"===a.parentNode.tagName&&(a=a.parentNode.parentNode),r.indexOf(a)<0&&r.push(a)}for(n=0;n<r.length;n++){var I=r[n],w=I.innerHTML;w=(w=w.replace(/<span class="e-rte-list-close-([a-z]*)"><\/span>/g,"</$1>")).replace(/<span class="e-rte-list-open-([a-z]*)"><\/span>/g,"<$1 "+this.domNode.attributes(I)+">"),this.domNode.replaceWith(I,this.domNode.openTagString(I)+w.trim()+this.domNode.closeTagString(I))}var x=this.parent.editableElement.querySelectorAll("ul:empty, ol:empty");for(n=0;n<x.length;n++)ee(x[n]);var j=this.parent.editableElement.querySelectorAll("li:empty");for(n=0;n<j.length;n++)ee(j[n])},e.prototype.getClosestListParentMargin=function(e){for(var t=e;t&&t!==this.parent.editableElement;){if("UL"===t.nodeName||"OL"===t.nodeName)return t.style.marginLeft;t=t.parentElement}return""},e.prototype.openTag=function(e){return this.domNode.parseHTMLFragment('<span class="e-rte-list-open-'+e.toLowerCase()+'"></span>')},e.prototype.closeTag=function(e){return this.domNode.parseHTMLFragment('<span class="e-rte-list-close-'+e.toLowerCase()+'"></span>')},e.prototype.destroy=function(){this.removeEventListener(),this.domNode&&(this.domNode=null)},e.prototype.areAllListItemsSelected=function(e,t){for(var i=e.querySelectorAll("li"),n=0;n<i.length;n++){var o=i[n];if(this.parent.currentDocument.createRange().selectNodeContents(o),!t.intersectsNode(o))return!1}return!0},e.prototype.getListCursorInfo=function(e){var t,i,n=e.startContainer.nodeType===Node.TEXT_NODE?e.startContainer.parentElement:e.startContainer,o=e.endContainer.nodeType===Node.TEXT_NODE?e.endContainer.parentElement:e.endContainer,r=!e.collapsed,s=n.closest("li"),a=o.closest("li"),l=this.checkIsNestedList(s.closest("ol, ul")),c=this.checkIsNestedList(a.closest("ol, ul")),h=this.parent.domNode.blockNodes(),d=h.length,p=this.getListSelectionType(l?"Nested":"Parent",c?"Nested":"Parent");return r?(i=1===h.length?0===e.startOffset&&e.endOffset===s.textContent.length?"SingleFull":"SinglePartial":0===e.startOffset&&e.endOffset===h[d-1].textContent.length?"MultipleFull":"MultiplePartial",t="None"):(t=0===e.startOffset?l?"StartNested":"StartParent":e.startOffset===s.textContent.length?l?"EndNested":"EndParent":l?"MiddleNested":"MiddleParent",i="None"),{position:t,selectionState:i,itemType:p}},e.prototype.checkIsNestedList=function(e){return!(e.parentElement===this.parent.editableElement)&&!!e.closest("li")},e.prototype.getListSelectionType=function(e,t){return"Nested"===e&&"Nested"===t?"Nested":"Parent"===e&&"Parent"===t?"Parent":"Mixed"},e.prototype.isAllListNodesSelected=function(e){for(var t=this.parent.currentDocument.getSelection(),i=!1,n=e.querySelectorAll("li"),o=0;o<n.length;o++){if(!t.containsNode(n[o],!1)){i=!1;break}i=!0}return i},e}(),Ou=function(){function e(e){this.blockquotePrevent=!1,this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(pu,this.applyFormats,this),this.parent.observer.on(gu,this.onKeyUp,this),this.parent.observer.on(uu,this.onKeyDown,this),this.parent.observer.on("blockquote_list_handled",this.blockQuotesHandled,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(pu,this.applyFormats),this.parent.observer.off(gu,this.onKeyUp),this.parent.observer.off(uu,this.onKeyDown),this.parent.observer.off(Su,this.destroy)},e.prototype.getParentNode=function(e){for(var t=e,i=["DIV","SECTION","ARTICLE","ASIDE","FOOTER","HEADER","NAV","MAIN"];e.parentNode&&e.parentNode!==this.parent.editableElement;null)e=e.parentNode;if(-1!==i.indexOf(e.nodeName.toUpperCase()))for(e=t;-1===i.indexOf(e.nodeName.toUpperCase())&&-1===i.indexOf(e.parentNode.nodeName.toUpperCase());)e=e.parentNode;return e},e.prototype.blockQuotesHandled=function(){this.blockquotePrevent=!0},e.prototype.onKeyUp=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=t.endContainer,n=i.lastChild;if(13===e.event.which&&t.startContainer===i&&3!==i.nodeType)if((r=_("p")).innerHTML="<br>",!g(n)&&n&&"BR"===n.nodeName&&n.previousSibling&&"TABLE"===n.previousSibling.nodeName)i.replaceChild(r,n),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,r,0);else{var o=this.parent.nodeSelection.getSelectionNodeCollectionBr(t)[0];!g(o)&&"BR"===o.nodeName&&o.previousSibling&&"TABLE"===o.previousSibling.nodeName&&(i.replaceChild(r,o),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,r,0))}if("BR"!==e.enterAction&&!g(t.startContainer)&&!g(t.startContainer.parentElement)&&t.startContainer===t.endContainer&&"#text"===t.startContainer.nodeName&&t.startContainer.parentElement.classList.contains("e-content")&&t.startContainer.parentElement.isContentEditable){var r=_(e.enterAction);t.startContainer.parentElement.insertBefore(r,t.startContainer),r.appendChild(t.startContainer),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,r,1)}},e.prototype.getBlockParent=function(e,t){for(var i=e;e!==t;)i=e,e=e.parentElement;return i},e.prototype.onKeyDown=function(e){if(13===e.event.which&&!this.blockquotePrevent){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=0===t.startContainer.textContent.length||"PRE"===t.startContainer.nodeName?t.startContainer:t.startContainer.parentElement,n=0===t.endContainer.textContent.length||"PRE"===t.endContainer.nodeName?t.endContainer:t.endContainer.parentElement,o=se(i,"pre"),r=se(n,"pre"),s=se(i,"blockquote"),a=se(n,"blockquote");if(!g(o)&&!g(o.parentElement)&&"LI"===o.parentElement.tagName)return;if((g(o)&&!g(r)||!g(o)&&g(r))&&(e.event.preventDefault(),this.deleteContent(t),this.removeCodeContent(t),t=this.parent.nodeSelection.getRange(this.parent.currentDocument),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,n,0)),13===e.event.which&&(!g(s)&&!g(a)||!g(s)&&g(a)))if(8203===(h=this.getBlockParent(t.startContainer,s)).textContent.charCodeAt(0)&&1===h.textContent.length||0===h.textContent.length&&0===h.querySelectorAll("img").length&&0===h.querySelectorAll("table").length)if(e.event.preventDefault(),g(h.nextElementSibling))this.paraFocus(h.parentElement===this.parent.editableElement?h:h.parentElement);else(new wu).SplitNode(t,h.parentElement,!1).cloneNode(!0),this.paraFocus(h.parentElement===this.parent.editableElement?h:h.parentElement);if(13===e.event.which&&!g(o)&&!g(r)){e.event.preventDefault(),this.deleteContent(t),this.removeCodeContent(t);var l=(t=this.parent.nodeSelection.getRange(this.parent.currentDocument)).startContainer.childNodes[t.endOffset],c=t.startContainer.childNodes[t.endOffset-1],h=t.startContainer;if(g(l)||g(c)||!g(l.nextSibling)||"BR"!==l.nodeName||"BR"!==c.nodeName)if(8203===h.textContent.charCodeAt(0)&&1===h.textContent.length||0===h.textContent.length){for(;"PRE"!==h.parentElement.nodeName&&(1===h.textContent.length||0===h.textContent.length);)h=h.parentElement;!g(h.previousSibling)&&"BR"===h.previousSibling.nodeName&&g(h.nextSibling)?this.paraFocus(h.parentElement):this.isNotEndCursor(o,t)}else this.isNotEndCursor(o,t);else this.paraFocus(t.startContainer,e.enterAction)}}this.blockquotePrevent=!1},e.prototype.removeCodeContent=function(e){var t=new RegExp("\ufeff","g");if(!g(e.endContainer.textContent.match(t))){var i=65279===e.endContainer.textContent.charCodeAt(e.endOffset-1)?e.endOffset-2:e.endOffset;e.endContainer.textContent=e.endContainer.textContent.replace(t,""),""===e.endContainer.textContent?this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,e.endContainer.parentElement,0):this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,e.endContainer,i)}},e.prototype.deleteContent=function(e){e.startContainer===e.endContainer&&e.startOffset===e.endOffset||e.deleteContents()},e.prototype.paraFocus=function(e,t){var i;"DIV"===t?(i=_("div")).innerHTML="<br>":"BR"===t?i=_("br"):(i=_("p")).innerHTML="<br>",this.parent.domNode.insertAfter(i,e),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,i,0),ee(e.lastChild)},e.prototype.isNotEndCursor=function(e,t){var i=new wu,n=t.startOffset===e.lastChild.textContent.length&&e.lastChild.textContent===t.startContainer.textContent;if(0===e.textContent.indexOf(t.startContainer.textContent)&&(0===t.startOffset&&0===t.endOffset||"PRE"===t.startContainer.nodeName)){this.insertMarker(e,t);var o=_("br");e.childNodes[t.endOffset].parentElement.insertBefore(o,e.childNodes[t.endOffset])}else{var r=i.SplitNode(t,e,!0);this.insertMarker(e,t);var s=e.previousElementSibling;"PRE"===s.tagName&&(s.insertAdjacentHTML("beforeend","<br>"+r.innerHTML),ee(e))}this.setCursorPosition(n,e)},e.prototype.setCursorPosition=function(e,t){var i=!1,n=this.parent.editableElement.querySelector(".tempSpan"),o=n.parentElement;if(""===n.parentNode.textContent?i=!0:this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,n,0),e)if(i)o===t?(this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,n,0),ee(n)):this.focusSelectionParent(n,o);else{var r=_("br");this.parent.domNode.insertAfter(r,n),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,n,0),ee(n)}else i?this.focusSelectionParent(n,o):ee(n)},e.prototype.focusSelectionParent=function(e,t){ee(e),t.innerHTML="​",this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,t,0)},e.prototype.insertMarker=function(e,t){var i=_("span",{className:"tempSpan"});"PRE"===t.startContainer.nodeName?e.childNodes[t.endOffset].parentElement.insertBefore(i,e.childNodes[t.endOffset]):t.startContainer.parentElement.insertBefore(i,t.startContainer)},e.prototype.applyFormats=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=this.parent.nodeSelection.processedTableImageCursor(t);if(!i.start&&!i.end||"TABLE"!==i.startName&&"TABLE"!==i.endName){var n=!1;this.parent.editableElement!==t.endContainer||g(this.parent.editableElement.children[t.endOffset-1])||"TABLE"!==this.parent.editableElement.children[t.endOffset-1].tagName||t.collapsed||(n=!0);var o=this.parent.nodeSelection.save(t,this.parent.currentDocument);this.parent.domNode.setMarker(o);var r=this.parent.domNode.blockNodes(!0);if("BR"===e.enterAction){this.setSelectionBRConfig();var s=this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument),a=this.parent.nodeSelection.getSelectionNodes(s),l=[];0===a.length&&a.push(r[0]);for(var c=0;c<a.length;c++){for(var h=a[c],d=void 0;!this.parent.domNode.isBlockNode(h)&&h!==this.parent.editableElement;)d=h,h=h.parentElement;this.parent.domNode.isBlockNode(h)&&h===this.parent.editableElement&&l.push(d)}for(c=0;c<l.length;c++)if(!this.parent.domNode.isBlockNode(l[c])){for(var p=h=l[c];h===this.parent.editableElement;)p=h,h=h.parentElement;var u=void 0;this.parent.domNode.isBlockNode(p.parentElement)&&p.parentElement===this.parent.editableElement?(u=_("div"),p.parentElement.insertBefore(u,p),u.appendChild(p),0===p.textContent.length&&p.appendChild(_("br"))):u=p;for(var m=u.previousSibling;!g(m)&&"BR"!==m.nodeName&&!this.parent.domNode.isBlockNode(m);)u.firstChild.parentElement.insertBefore(m,u.firstChild),m=u.previousSibling;g(m)||"BR"!==m.nodeName||ee(m);for(var f=u.nextSibling;!g(f)&&"BR"!==f.nodeName&&!this.parent.domNode.isBlockNode(f);)u.appendChild(f),f=u.nextSibling;g(f)||"BR"!==f.nodeName||ee(f)}this.setSelectionBRConfig(),r=this.parent.domNode.blockNodes()}var y=!1,v=!1;for(c=0;c<r.length;c++)(g(se(r[0],"blockquote"))||g(se(r[r.length-1],"blockquote")))&&(v=!0);for(c=0;c<r.length;c++){var b=void 0,M=void 0;if("blockquote"===e.subCommand.toLowerCase()?(b=this.getParentNode(r[c]),M="BR"===e.enterAction?b.innerHTML:!g(se(r[c],"table"))&&this.parent.editableElement.contains(se(r[c],"table"))?g(se(r[c],"blockquote"))?r[c].outerHTML:se(r[c],"blockquote").outerHTML:b.outerHTML):M=(b=r[c]).innerHTML,!("blockquote"===e.subCommand.toLowerCase()&&e.subCommand.toLowerCase()===b.tagName.toLowerCase()&&v||e.subCommand.toLowerCase()===b.tagName.toLowerCase()&&("pre"!==e.subCommand.toLowerCase()&&"blockquote"!==e.subCommand.toLowerCase()||!g(e.exeValue)&&"dropDownSelect"===e.exeValue.name)||g(b.parentNode)||"TABLE"===b.tagName&&"pre"===e.subCommand.toLowerCase())){this.cleanFormats(b,e.subCommand);var N="pre"===e.subCommand.toLowerCase()&&"pre"===b.tagName.toLowerCase()?"p":e.subCommand,C=e.subCommand.toLowerCase()===b.tagName.toLowerCase()&&"blockquote"===e.subCommand.toLowerCase()&&!g(se(r[c],"li")),E="TABLE"===b.tagName?g(se(r[c],"blockquote"))?b:se(r[c],"blockquote"):b,D=e.subCommand.toLowerCase()===E.tagName.toLowerCase()&&"blockquote"===e.subCommand.toLowerCase(),T=void 0,L=this.getNode(r[c]),S=this.getNode(r[r.length-1]);if((g(se(r[c],"table"))||g(se(r[c],"td"))&&g(se(r[c],"th"))?D&&b.firstChild===L&&b.lastChild===S:this.hasOnlyBlockquotes(se(r[c],"td")||se(r[c],"th")))?T=M.replace(/<blockquote[^>]*>|<\/blockquote>/g,""):C?(y=!0,0===c&&this.createBlockquoteSpan("e-rte-blockquote-close",L,"before"),c===r.length-1&&this.createBlockquoteSpan("e-rte-blockquote-open",S,"after")):D&&se(r[0],"blockquote")&&se(r[r.length-1],"blockquote")?(y=!0,0===c&&this.createBlockquoteSpan("e-rte-blockquote-close",r[c],"before"),c===r.length-1&&this.createBlockquoteSpan("e-rte-blockquote-open",r[c],"after")):T=this.parent.domNode.createTagString(N,"blockquote"===e.subCommand.toLowerCase()?null:b,M.replace(/>\s+</g,"><")),"LI"===b.tagName)b.innerHTML="",b.insertAdjacentHTML("beforeend",T);else if(!y){var I=!g(se(r[c],"table"))&&this.parent.editableElement.contains(se(r[c],"table"))?g(se(r[c],"blockquote"))?r[c]:se(r[c],"blockquote"):b;this.parent.domNode.replaceWith(I,T)}}}if(y){var w=this.parent.editableElement.querySelectorAll(".e-rte-blockquote-open, .e-rte-blockquote-close");for(c=0;c<w.length;c++){var x=w[c].parentElement,j=x.innerHTML;if(j=(j=j.replace(/<span class="e-rte-blockquote-open"><\/span>/g,"<blockquote>")).replace(/<span class="e-rte-blockquote-close"><\/span>/g,"</blockquote>"),w[0].parentElement===w[1].parentElement){this.parent.domNode.replaceWith(x,this.parent.domNode.openTagString(x)+j.trim()+this.parent.domNode.closeTagString(x));break}c!==w.length-1||g(w[c])||g(w[c-1])||w[c].parentElement===w[c-1].parentElement?this.parent.domNode.replaceWith(x,this.parent.domNode.openTagString(x)+j.trim()+this.parent.domNode.closeTagString(x)):this.parent.domNode.replaceWith(x,j.trim())}}this.preFormatMerge(),this.blockquotesFormatMerge(e.enterAction);var O=this.parent.editableElement.querySelector("."+au),z=this.parent.editableElement.querySelector("."+lu);g(O)||g(z)||(O=O.lastChild,z=z.lastChild),o=this.parent.domNode.saveMarker(o),eu()&&tu(this.parent.editableElement,e.selector),n?this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,O,z,0,z.textContent.length):o.restore(),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes()})}else{var A=i.start?i.startNode:i.endNode;this.applyTableSidesFormat(e,i.start,A)}},e.prototype.hasOnlyBlockquotes=function(e){for(var t=!1,i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];if(n.nodeType===Node.TEXT_NODE){if(""!==n.textContent.replace(/[\u200B\u200C\u200D]/g,"").trim())return!1}else if(n.nodeType===Node.ELEMENT_NODE){if("BLOCKQUOTE"!==n.tagName)return!1;t=!0}}return t},e.prototype.getNode=function(e){if("BLOCKQUOTE"===e.nodeName)return e=e.firstChild;for(;e.parentNode&&"BLOCKQUOTE"!==e.parentNode.nodeName;null)e=e.parentNode;return e},e.prototype.createBlockquoteSpan=function(e,t,i){var n=_("span");return n.classList.add(e),"before"===i?t.parentNode.insertBefore(n,t):this.parent.domNode.insertAfter(n,t),n},e.prototype.setSelectionBRConfig=function(){var e=this.parent.editableElement.querySelector("."+au),t=this.parent.editableElement.querySelector("."+lu);g(t)?this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,e,0):this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,e,t,0,0)},e.prototype.preFormatMerge=function(){var e=this.parent.editableElement.querySelectorAll("PRE");if(!g(e))for(var t=0;t<e.length;t++){var i=e[t].previousElementSibling;g(i)||"PRE"!==i.tagName||(i.insertAdjacentHTML("beforeend","<br>"+e[t].innerHTML),ee(e[t]))}},e.prototype.blockquotesFormatMerge=function(e){var t=this.parent.editableElement.querySelectorAll("BLOCKQUOTE");if(!g(t))for(var i=0;i<t.length;i++){""===t[i].innerHTML.trim()&&ee(t[i]);var n=t[i].previousElementSibling;g(n)||"BLOCKQUOTE"!==n.tagName||(n.insertAdjacentHTML("beforeend",("BR"===e?"<br>":"")+t[i].innerHTML),ee(t[i]))}},e.prototype.cleanFormats=function(e,t){var i=["display","font-size","margin-top","margin-bottom","margin-left","margin-right","font-weight"];t=t.toLowerCase();for(var n=0;n<i.length&&"p"!==t&&"blockquote"!==t&&"pre"!==t;n++)e.style.removeProperty(i[n])},e.prototype.applyTableSidesFormat=function(e,t,i){var n=_(e.subCommand);"BR"!==e.enterAction&&n.appendChild(_("br")),i.insertAdjacentElement(t?"beforebegin":"afterend",n),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,n,0),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes()})},e.prototype.destroy=function(){this.removeEventListener()},e}(),zu=function(){function e(e){this.directRangeElems=["IMG","TABLE","AUDIO","VIDEO","HR"],this.BLOCK_TAGS=["address","article","aside","audio","blockquote","canvas","details","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","output","p","pre","section","td","tfoot","th","video","body"],this.editableElement=e,this.currentDocument=e.ownerDocument}return e.prototype.getBlockNode=function(){var e=this,t=[],i=this.currentDocument.getSelection().getRangeAt(0);if(i.startContainer===this.editableElement&&i.startContainer===i.endContainer&&"#text"!==i.startContainer.nodeName){if(i.startOffset===i.endOffset)this.editableElement.childNodes[i.startOffset]&&this.directRangeElems.indexOf(this.editableElement.childNodes[i.startOffset].nodeName)>-1&&t.push(this.editableElement.childNodes[i.startOffset]);else i.endOffset===i.startOffset+1&&t.push(this.editableElement.childNodes[i.startOffset]);if(t.length>0)return t}else{var n=i.startContainer.nodeType===Node.TEXT_NODE?i.startContainer.parentElement:i.startContainer,o=i.endContainer.nodeType===Node.TEXT_NODE?i.endContainer.parentElement:i.endContainer,r=this.isBlockNode(o)?o:this.getParentBlockNode(o),s=this.currentDocument.createTreeWalker(this.editableElement,NodeFilter.SHOW_ELEMENT,{acceptNode:function(t){return i.intersectsNode(t)?e.isBlockNode(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP:NodeFilter.FILTER_REJECT}});for(s.currentNode=n;s.currentNode;)if(this.isBlockNode(s.currentNode)?(this.addToBlockCollection(t,s,i),s.nextNode()):s.previousNode(),s.currentNode===o||s.currentNode===r){this.addToBlockCollection(t,s,i);break}}return t},e.prototype.addToBlockCollection=function(e,t,i){var n=t.currentNode;if(t.currentNode&&-1===e.indexOf(t.currentNode))if("LI"===n.nodeName)if(!n.parentNode.closest("li"))e.push(t.currentNode);else{var o=i.commonAncestorContainer;if(!!("OL"!==o.nodeName&&"UL"!==o.nodeName||!o.closest("li")))return;e.push(t.currentNode)}else e.push(t.currentNode)},e.prototype.getTextNodes=function(e){for(var t=[],i=this.currentDocument.getSelection().getRangeAt(0),n=this.currentDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:function(e){return i.intersectsNode(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),o=n.nextNode();o;)t.push(o),o=n.nextNode();return t},e.prototype.isBlockNode=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&this.BLOCK_TAGS.indexOf(e.tagName.toLowerCase())>=0},e.prototype.getLastTextNode=function(e){for(var t=this.currentDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),i=null,n=t.nextNode();n;)i=n,n=t.nextNode();return i},e.prototype.getFirstTextNode=function(e){return this.currentDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT,null).nextNode()},e.prototype.getParentBlockNode=function(e){var t=this,i=this.currentDocument.createTreeWalker(this.editableElement,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){return t.isBlockNode(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return i.currentNode=e,i.parentNode()},e.prototype.getTopMostNode=function(t){var i=new e(this.editableElement);if(i.isBlockNode(t.parentNode))return t;for(var n=t.parentNode;n;){if(i.isBlockNode(n.parentNode)||t.textContent!==n.textContent)return n;n=n.parentNode}return n},e}(),Au=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(Ep,this.linkCommand,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(Ep,this.linkCommand),this.parent.observer.off(Su,this.destroy)},e.prototype.linkCommand=function(e){switch(e.value.toString().toLocaleLowerCase()){case"createlink":case"editlink":this.createLink(e);break;case"openlink":this.openLink(e);break;case"removelink":this.removeLink(e)}},e.prototype.createLink=function(e){var t=!g(e.item.selectParent)&&1===e.item.selectParent.length&&se(e.item.selectParent[0],"a");if(t=g(t)?g(e.item.selectParent)||1!==e.item.selectParent.length?null:e.item.selectParent[0]:t,g(t)||"A"!==t.tagName){var i=new bm(this.parent.editableElement),n=i.getRange(this.parent.currentDocument);"#text"!==n.endContainer.nodeName||n.startContainer.textContent.length!==n.endOffset+1||" "!==n.endContainer.textContent.charAt(n.endOffset)||g(n.endContainer.nextSibling)||"A"!==n.endContainer.nextSibling.nodeName||(i.setSelectionText(this.parent.currentDocument,n.startContainer,n.endContainer,n.startOffset,n.endOffset+1),n=i.getRange(this.parent.currentDocument));var o=!!g(e.item.text)||e.item.text.replace(/ /g,"").localeCompare(n.toString().replace(/\n/g," ").replace(/ /g,""))<0;if(e.event&&"keydown"===e.event.type&&(32===e.event.keyCode||13===e.event.keyCode)||"Paste"===e.item.action||n.collapsed||o){var r=this.createAchorNode(e);r.innerText=""===e.item.text?e.item.url:e.item.text;var s=r.innerText.replace(/ +/g,(function(e){return" ".repeat(e.length)}));r.innerText=s,e.item.selection.restore(),xu.Insert(this.parent.currentDocument,r,this.parent.editableElement),g(r.parentElement)||"LI"!==r.parentElement.nodeName||g(r.parentNode.childNodes)||""!==r.parentNode.childNodes[0].textContent||r.parentNode.removeChild(r.parentNode.childNodes[0]);if(e.event&&"keydown"===e.event.type&&(32===e.event.keyCode||13===e.event.keyCode||/[^\w\s\\/\\.\\:]/g.test(e.event.key))){var a=e.item.selection.range.startContainer;a.textContent=this.removeText(a.textContent,e.item.text)}else{h="Paste"===e.item.action?r.childNodes[0].textContent.length:0;e.item.selection.setSelectionText(this.parent.currentDocument,r.childNodes[0],r.childNodes[0],h,r.childNodes[0].textContent.length)}}else this.handleLinkFormat(e)}else{var l=t,c="";if(g(e.item.url)||l.setAttribute("href",e.item.url),g(e.item.title)||l.setAttribute("title",e.item.title),g(e.item.text)||""===e.item.text||(c=l.innerText,"#text"===l.firstChild.nodeName?l.innerText=e.item.text:l.firstChild.innerText=e.item.text),g(e.item.target)?(l.removeAttribute("target"),l.removeAttribute("aria-label")):(l.setAttribute("target",e.item.target),l.setAttribute("aria-label",e.item.ariaLabel)),c===e.item.text)e.item.selection.setSelectionText(this.parent.currentDocument,l,l,1,1),e.item.selection.restore();else{var h="Paste"===e.item.action?l.childNodes[0].textContent.length:0,d="#text"===l.firstChild.nodeName?l.childNodes[0].textContent.length:l.childNodes.length;e.item.selection.setSelectionText(this.parent.currentDocument,l.childNodes[0],l.childNodes[0],h,d)}}e.callBack&&e.callBack({requestType:"Links",editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.createAchorNode=function(e){var t=_("a",{className:"e-rte-anchor",attrs:{href:e.item.url,title:g(e.item.title)||""===e.item.title?e.item.url:e.item.title}});return g(e.item.target)||t.setAttribute("target",e.item.target),g(e.item.ariaLabel)||t.setAttribute("aria-label",e.item.ariaLabel),t},e.prototype.removeText=function(e,t){for(var i=e.split(" "),n=0;n<i.length;n++)i[n]===t&&(i.splice(n,1),n--);return i.join(" ")+" "},e.prototype.openLink=function(e){document.defaultView.open(e.item.url,e.item.target),this.callBack(e)},e.prototype.removeLink=function(e){var t=this.parent.domNode.blockNodes();if(t.length<2){this.parent.domNode.setMarker(e.item.selection);for(var i=se(e.item.selectParent[0],"a"),n=i||e.item.selectParent[0],o=n.parentNode,r=[];n.firstChild&&o;null)r.push(o.insertBefore(n.firstChild,n));o.removeChild(n),r&&1===r.length&&(e.item.selection.startContainer=e.item.selection.getNodeArray(r[r.length-1],!0),e.item.selection.endContainer=e.item.selection.startContainer,e.item.selection.startOffset=0,e.item.selection.endOffset=r[r.length-1].textContent.length),e.item.selection=this.parent.domNode.saveMarker(e.item.selection)}else for(var s=0;s<t.length;s++)for(var a=t[s].querySelectorAll("a"),l=0;l<a.length;l++)this.parent.currentDocument.getSelection().containsNode(a[l],!0)&&(a[l].outerHTML=a[l].innerHTML);e.item.selection.restore(),this.callBack(e)},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.handleLinkFormat=function(e){var t=this.parent.editableElement,i=this.parent.nodeSelection.getRange(t.ownerDocument),n=this.parent.currentDocument.getSelection();if(n&&0!==n.rangeCount){var o,r,s,a=new zu(t),l="BR"===e.enterAction?[this.parent.editableElement]:a.getBlockNode(),c=[],h=["IMG","AUDIO","VIDEO"];if(1===i.startContainer.nodeType)o=(s=i.startContainer.childNodes[i.startOffset])&&h.indexOf(s.nodeName)>-1?s:null;if(1===i.endContainer.nodeType)r=(s=i.endContainer.childNodes[i.endContainer.childNodes.length>1?i.endOffset-1:i.endOffset])&&h.indexOf(s.nodeName)>-1?s:null;for(var d={startContainer:i.startContainer,endContainer:i.endContainer,endOffset:i.endOffset,startOffset:i.startOffset,collapsed:i.collapsed},p=0;p<l.length;p++){var u=l[p];this.unwrapLink(u),u.normalize(),this.applyLinkToBlockNode(u,e,c)}if(0!==c.length)if(o||r){var m=o?o.parentElement:d.startContainer,g=r?r.parentElement:d.endContainer,f=o?0:d.startOffset,y=d.endOffset;this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,m,g,f,y)}else 1===c.length?this.parent.nodeSelection.setSelectionContents(this.parent.currentDocument,c[0]):this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,c[0],c[c.length-1],0,c[c.length-1].textContent.length)}},e.prototype.applyLinkToBlockNode=function(e,t,i){for(var n=new zu(this.parent.editableElement),o=n.getTextNodes(e),r=e.querySelectorAll("*"),s=this.parent.nodeSelection.getRange(this.parent.currentDocument),a=[],l=0===r.length,c=0;c<o.length;c++){var h=void 0,d=o[c],p=(new vp).getFormattedNode(d,"fontcolor",e);if(l)h=this.getSplitNode(d,s),i.push(Iu.Wrap(h,this.createAchorNode(t)));else if(p)a.length>0&&this.replaceElementsWithAnchor(a,this.createAchorNode(t),t.enterAction),h=this.getSplitNode(p,s),s.intersectsNode(p)&&(Iu.Wrap(p.firstChild,this.createAchorNode(t)),i.push(d));else{var u="#text"===s.startContainer.nodeName&&s.startContainer===d&&0!==s.startOffset,m="#text"===s.endContainer.nodeName&&s.endContainer===d&&s.endOffset!==s.startContainer.textContent.length;if(c>0)("BR"===t.enterAction?this.parent.editableElement:n.getParentBlockNode(d))!==e&&this.replaceElementsWithAnchor(a,this.createAchorNode(t),t.enterAction);if(u||m){var g=n.getTopMostNode(d);h=this.getSplitNode(g,s),i.push(d),a.push(d)}else i.push(d),a.push(d);c===o.length-1&&this.replaceElementsWithAnchor(a,this.createAchorNode(t),t.enterAction)}}},e.prototype.unwrapLink=function(e){var t=e.querySelectorAll("a");if(0!==t.length){var i=this.parent.nodeSelection.getRange(this.parent.currentDocument),n=i.startContainer,o=i.endContainer,r=i.startOffset,s=i.endOffset;this.parent.nodeSelection.save(i,this.parent.currentDocument);for(var a=this.parent.nodeSelection.get(this.parent.currentDocument),l=0;l<t.length;l++)if(i.intersectsNode(t[l]))if(a.containsNode(t[l],!1))Iu.unwrap(t[l]);else{var c=t[l]&&t[l].textContent;c&&i.startContainer.textContent&&-1!==c.indexOf(i.startContainer.textContent)&&(r=0);var h=this.getSplitNode(t[l],i);Iu.unwrap(h)}i.setStart(n,r),i.setEnd(o,s)}},e.prototype.replaceElementsWithAnchor=function(e,t,i){for(var n=new zu(this.parent.editableElement),o=[],r=0;r<e.length;r++){var s=e[r];o.push(n.getTopMostNode(s))}e.length=0;var a,l=o[0],c=t.cloneNode(!0);l.parentElement.insertBefore(t,l);for(var h=0;h<o.length;h++){var d=o[h];if("BR"===i)if(0===h)t.appendChild(d);else if(g(a)){var p=c.cloneNode(!0);d.parentElement.insertBefore(p,d),p.appendChild(d),a=p}else{var u=d.nextSibling&&"BR"===d.nextSibling.nodeName||n.isBlockNode(d.nextSibling),m=d.previousSibling&&"BR"===d.previousSibling.nodeName||n.isBlockNode(d.previousSibling),f=this.parent.editableElement.lastChild===d,y=n.isBlockNode(d.parentElement);if(u&&m){p=c.cloneNode(!0);d.parentElement.insertBefore(p,d),p.appendChild(d),a=p}else if(f){p=c.cloneNode(!0);d.parentElement.insertBefore(p,d),p.appendChild(d)}else if(y){p=c.cloneNode(!0);d.parentElement.insertBefore(p,d),p.appendChild(d),a=p}else a.appendChild(d)}else t.appendChild(d)}},e.prototype.getSplitNode=function(e,t){var i=new wu;return t.collapsed?i.SplitNode(t,e,!0):i.GetSpliceNode(t,e)},e}(),ku=function(){function e(e){this.alignments={JustifyLeft:"left",JustifyCenter:"center",JustifyRight:"right",JustifyFull:"justify"},this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(Bp,this.applyAlignment,this),this.parent.observer.on(uu,this.onKeyDown,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(Bp,this.applyAlignment),this.parent.observer.off(uu,this.onKeyDown),this.parent.observer.off(Su,this.destroy)},e.prototype.onKeyDown=function(e){switch(e.event.action){case"justify-center":this.applyAlignment({subCommand:"JustifyCenter",callBack:e.callBack}),e.event.preventDefault();break;case"justify-full":this.applyAlignment({subCommand:"JustifyFull",callBack:e.callBack}),e.event.preventDefault();break;case"justify-left":this.applyAlignment({subCommand:"JustifyLeft",callBack:e.callBack}),e.event.preventDefault();break;case"justify-right":this.applyAlignment({subCommand:"JustifyRight",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.getTableNode=function(e){return[se(e.startContainer.nodeType===Node.ELEMENT_NODE?e.startContainer:e.startContainer.parentNode,"td,th")]},e.prototype.applyAlignment=function(e){var t="Table"===e.value,i=this.parent.nodeSelection.getRange(this.parent.currentDocument),n=this.parent.nodeSelection.save(i,this.parent.currentDocument);if(t)ae(this.getTableNode(i)[0],{"text-align":this.alignments[e.subCommand]});else{this.parent.domNode.setMarker(n);var o=this.parent.domNode.blockNodes();"BR"===e.enterAction&&(o=this.parent.domNode.convertToBlockNodes(o,!1));for(var r=0;r<o.length;r++){ae(o[r],{"text-align":this.alignments[e.subCommand]})}var s=this.parent.domNode.getImageTagInSelection();for(r=0;r<s.length;r++){var a=[];a.push(s[r]),this.parent.imgObj.imageCommand({item:{selectNode:a},subCommand:e.subCommand,value:e.subCommand,callBack:e.callBack,selector:e.selector})}this.parent.editableElement.focus({preventScroll:!0}),n=this.parent.domNode.saveMarker(n),eu()&&tu(this.parent.editableElement,e.selector),n.restore()}e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:t?this.getTableNode(i):this.parent.domNode.blockNodes()})},e.prototype.destroy=function(){this.removeEventListener()},e}(),Pu=function(){function e(e){this.indentValue=20,this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(Hp,this.applyIndents,this),this.parent.observer.on(uu,this.onKeyDown,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(Hp,this.applyIndents),this.parent.observer.off(uu,this.onKeyDown),this.parent.observer.off(Su,this.destroy)},e.prototype.onKeyDown=function(e){switch(e.event.action){case"indents":this.applyIndents({subCommand:"Indent",callBack:e.callBack}),e.event.preventDefault();break;case"outdents":this.applyIndents({subCommand:"Outdent",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.applyIndents=function(e){var t=this.parent.editableElement,i=t.classList.contains("e-rtl"),n=this.parent.nodeSelection.getRange(this.parent.currentDocument),o=this.parent.nodeSelection.save(n,this.parent.currentDocument);this.parent.domNode.setMarker(o);var r=this.parent.domNode.blockNodes();"BR"===e.enterAction&&(r=this.parent.domNode.convertToBlockNodes(r,!1));for(var s=r.slice(),a=[],l=0;l<s.length;l++)"LI"!==s[l].tagName&&"LI"===s[l].parentNode.tagName?(r.splice(r.indexOf(s[l]),1),a.push(s[l].parentNode)):"LI"===s[l].tagName&&(r.splice(r.indexOf(s[l]),1),a.push(s[l]));a.length>0&&this.parent.observer.notify(uu,{event:{preventDefault:function(){},stopPropagation:function(){},shiftKey:"Indent"!==e.subCommand,which:9,action:"indent"}});for(l=0;l<r.length;l++){var c=r[l],h=i?c.style.marginRight:c.style.marginLeft,d=void 0;"Indent"===e.subCommand?(d=""===h?this.indentValue+"px":parseInt(h,null)+this.indentValue+"px",i?c.style.marginRight=d:c.style.marginLeft=d):(d=""===h||"0px"===h||"0in"===h?"":parseInt(h,null)-this.indentValue<0?"0px":parseInt(h,null)-this.indentValue+"px",i?c.style.marginRight=d:c.style.marginLeft=d)}t.focus({preventScroll:!0}),eu()&&tu(t,e.selector),(0===r.length||r[0]&&"TABLE"!==r[0].nodeName)&&(o=this.parent.domNode.saveMarker(o)).restore(),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes()})},e.prototype.destroy=function(){this.removeEventListener()},e}(),Ru="e-imgright",Bu="e-imgleft",Hu="e-imgcenter",Uu="e-video-right",Fu="e-video-left",Yu="e-video-center",Vu="e-imgbreak",Qu="e-video-break",qu="e-img-caption",Wu="e-caption-inline",_u="e-audio-inline",Gu="e-clickelem",Xu="e-video-clickelem",Ku="e-rte-audio",Zu="e-rte-video",Ju="e-audio-wrap",$u="e-embed-video-wrap",em="e-audio-focus",tm="e-video-focus",im="e-video-inline",nm=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(bp,this.imageCommand,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(bp,this.imageCommand),this.parent.observer.off(Su,this.destroy)},e.prototype.imageCommand=function(e){switch(e.value.toString().toLowerCase()){case"image":case"replace":this.createImage(e);break;case"insertlink":this.insertImageLink(e);break;case"openimagelink":this.openImageLink(e);break;case"editimagelink":this.editImageLink(e);break;case"removeimagelink":this.removeImageLink(e);break;case"remove":this.removeImage(e);break;case"alttext":this.insertAltTextImage(e);break;case"dimension":this.imageDimension(e);break;case"caption":this.imageCaption(e);break;case"justifyleft":this.imageJustifyLeft(e);break;case"justifycenter":this.imageJustifyCenter(e);break;case"justifyright":this.imageJustifyRight(e);break;case"inline":this.imageInline(e);break;case"break":this.imageBreak(e)}},e.prototype.createImage=function(e){var t=this,i=!1;if(e.item.url=g(e.item.url)||"undefined"===e.item.url?e.item.src:e.item.url,g(e.item.selectParent)||"IMG"!==e.item.selectParent[0].tagName){var n=_("img");this.setStyle(n,e),g(e.item.selection)||e.item.selection.restore(),g(e.selector)||"pasteCleanupModule"!==e.selector?xu.Insert(this.parent.currentDocument,n,this.parent.editableElement):g(this.parent.currentDocument)||e.callBack({requestType:"Images",editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:[n]})}else{var o=e.item.selectParent[0];i=!0,this.setStyle(o,e,i)}if(e.callBack&&(g(e.selector)||!g(e.selector)&&"pasteCleanupModule"!==e.selector)){var r=this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0],s="Replace"===e.value||i?e.item.selectParent[0]:Q.isIE?r.previousSibling:r.previousElementSibling,a=function(){if(!g(t.parent.currentDocument)){ru()&&iu(t.parent.currentDocument,t.parent.editableElement);var i=s.getAttribute("width"),n=s.getAttribute("height");(g(i)||"auto"===i)&&s.setAttribute("width",s.offsetWidth.toString()),(g(n)||"auto"===n)&&s.setAttribute("height",s.offsetHeight.toString()),e.callBack({requestType:"Replace"===e.value?(e.item.subCommand="Replace","Replace"):"Images",editorMode:"HTML",event:e.event,range:t.parent.nodeSelection.getRange(t.parent.currentDocument),elements:[s]})}s.removeEventListener("load",a)};s.addEventListener("load",a)}},e.prototype.setStyle=function(e,t,i){var n;if(g(t.item.url)||e.setAttribute("src",t.item.url),i)for(var o={"e-imgcenter":"e-imgcenter","e-imgright":"e-imgright","e-imgleft":"e-imgleft"},r=e.classList,s=0;s<r.length;s++)g(o[r[s]])||(n=o[r[s]]);e.setAttribute("class","e-rte-image"+(g(t.item.cssClass)?"":" "+t.item.cssClass)+(g(n)?"":" "+n)),g(t.item.altText)||e.setAttribute("alt",t.item.altText.replace(/\.[a-zA-Z0-9]+$/,"")),g(t.item.width)||g(t.item.width.width)||e.setAttribute("width",this.calculateStyleValue(t.item.width.width)),g(t.item.height)||g(t.item.height.height)||e.setAttribute("height",this.calculateStyleValue(t.item.height.height)),g(t.item.width)||g(t.item.width.minWidth)||(e.style.minWidth=this.calculateStyleValue(t.item.width.minWidth)),g(t.item.width)||g(t.item.width.maxWidth)||(e.style.maxWidth=this.calculateStyleValue(t.item.width.maxWidth)),g(t.item.height)||g(t.item.height.minHeight)||(e.style.minHeight=this.calculateStyleValue(t.item.height.minHeight)),g(t.item.height)||g(t.item.height.maxHeight)||(e.style.maxHeight=this.calculateStyleValue(t.item.height.maxHeight))},e.prototype.calculateStyleValue=function(e){return"string"==typeof e&&(e.indexOf("px")||e.indexOf("%")||e.indexOf("auto"))?e:e+"px"},e.prototype.insertImageLink=function(e){var t=_("a",{attrs:{href:e.item.url}});e.item.selectNode[0].parentElement.classList.contains("e-img-wrap")&&(e.item.selection.restore(),t.setAttribute("contenteditable","true")),t.appendChild(e.item.selectNode[0]),g(e.item.target)||t.setAttribute("target",e.item.target),g(e.item.ariaLabel)||t.setAttribute("aria-label",e.item.ariaLabel),xu.Insert(this.parent.currentDocument,t,this.parent.editableElement),this.callBack(e)},e.prototype.openImageLink=function(e){document.defaultView.open(e.item.url,e.item.target),this.callBack(e)},e.prototype.removeImageLink=function(e){var t=e.item.selectParent[0];if(t.classList.contains("e-img-caption")){var i=ne(".e-img-wrap",t),n=ne(".e-img-inner",t),o=n.cloneNode(!0);ee(ne("a",t)),ee(n),i.appendChild(e.item.insertElement),i.appendChild(o)}else ee(t),Q.isIE&&e.item.selection&&e.item.selection.restore(),xu.Insert(this.parent.currentDocument,e.item.insertElement,this.parent.editableElement);this.callBack(e)},e.prototype.editImageLink=function(e){e.item.selectNode[0].parentElement.href=e.item.url,g(e.item.target)?(e.item.selectNode[0].parentElement.removeAttribute("target"),e.item.selectNode[0].parentElement.removeAttribute("aria-label")):(e.item.selectNode[0].parentElement.target=e.item.target,e.item.selectNode[0].parentElement.setAttribute("aria-label",e.item.ariaLabel)),this.callBack(e)},e.prototype.removeImage=function(e){se(e.item.selectNode[0],"a")&&("A"!==e.item.selectNode[0].parentElement.nodeName||g(e.item.selectNode[0].parentElement.innerText))?ee(se(e.item.selectNode[0],"a")):g(se(e.item.selectNode[0],"."+qu))?ee(e.item.selectNode[0]):ee(se(e.item.selectNode[0],"."+qu)),this.callBack(e)},e.prototype.insertAltTextImage=function(e){e.item.selectNode[0].setAttribute("alt",e.item.altText),this.callBack(e)},e.prototype.imageDimension=function(e){var t=e.item.selectNode[0];t.style.height="",t.style.width="","auto"!==e.item.width?t.style.width=N(e.item.width):t.removeAttribute("width"),"auto"!==e.item.height?t.style.height=N(e.item.height):t.removeAttribute("height"),this.callBack(e)},e.prototype.imageCaption=function(e){xu.Insert(this.parent.currentDocument,e.item.insertElement,this.parent.editableElement),this.callBack(e)},e.prototype.imageJustifyLeft=function(e){var t=e.item.selectNode[0];g(t)||(t.removeAttribute("class"),G([t],"e-rte-image"),g(se(t,"."+qu))||(X([se(t,"."+qu)],Ru),G([se(t,"."+qu)],Bu)),"A"===t.parentElement.nodeName?(X([t.parentElement],Ru),G([t.parentElement],Bu),G([t],Bu)):null!=t.parentElement.nextElementSibling?(G([t],Bu),t.parentElement.nextElementSibling.style.clear="left"):G([t],Bu),this.callBack(e))},e.prototype.imageJustifyCenter=function(e){var t=e.item.selectNode[0];g(t)||(t.removeAttribute("class"),G([t],"e-rte-image"),g(se(t,"."+qu))||(X([se(t,"."+qu)],Bu),X([se(t,"."+qu)],Ru),G([se(t,"."+qu)],Hu)),"A"===t.parentElement.nodeName?(X([t.parentElement],Bu),X([t.parentElement],Ru),G([t.parentElement],Hu),G([t],Hu)):G([t],Hu),this.callBack(e))},e.prototype.imageJustifyRight=function(e){var t=e.item.selectNode[0];g(t)||(t.removeAttribute("class"),G([t],"e-rte-image"),g(se(t,"."+qu))||(X([se(t,"."+qu)],Bu),G([se(t,"."+qu)],Ru)),"A"===t.parentElement.nodeName?(X([t.parentElement],Bu),G([t.parentElement],Ru),G([t],Ru)):null!=t.parentElement.nextElementSibling?(G([t],Ru),t.parentElement.nextElementSibling.style.clear="right"):G([t],Ru),this.callBack(e))},e.prototype.imageInline=function(e){var t=e.item.selectNode[0];t.removeAttribute("class"),G([t],"e-rte-image"),G([t],"e-imginline"),g(se(t,"."+qu))||(X([se(t,"."+qu)],Vu),X([se(t,"."+qu)],Hu),X([se(t,"."+qu)],Bu),X([se(t,"."+qu)],Ru),G([se(t,"."+qu)],Wu)),this.callBack(e)},e.prototype.imageBreak=function(e){var t=e.item.selectNode[0];t.removeAttribute("class"),G([t],Vu),G([t],"e-rte-image"),g(se(t,"."+qu))||(X([se(t,"."+qu)],Wu),X([se(t,"."+qu)],Hu),X([se(t,"."+qu)],Bu),X([se(t,"."+qu)],Ru),G([se(t,"."+qu)],Vu)),this.callBack(e)},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.destroy=function(){this.removeEventListener()},e}(),om=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(Mp,this.audioCommand,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(Mp,this.audioCommand),this.parent.observer.off(Su,this.destroy)},e.prototype.audioCommand=function(e){var t,i,n=e.value.toString().toLowerCase();switch("inline"!==n&&"break"!==n&&"audioremove"!==n||(i=(t=e.item.selectNode[0]).closest("."+Ju)),n){case"audio":case"audioreplace":this.createAudio(e);break;case"inline":t.removeAttribute("class"),i.style.display="inline-block",G([t],[Ku,_u,em]),this.callBack(e);break;case"break":t.removeAttribute("class"),i.style.display="block",G([t],["e-audio-break",Ku,em]),this.callBack(e);break;case"audioremove":ee(i||t),this.callBack(e)}},e.prototype.createAudio=function(e){var t,i=this,n=!1;if(!g(e.item.selectParent)&&e.item.selectParent[0].classList&&(e.item.selectParent[0].classList.contains(Gu)||e.item.selectParent[0].classList.contains(Ju))){var o=e.item.selectParent[0].querySelector("source");this.setStyle(o,e),n=!0}else{t=_("span",{className:Ju,attrs:{contentEditable:"false",title:g(e.item.title)?g(e.item.fileName)?"":e.item.fileName:e.item.title}});var r=_("audio",{className:Ku+" "+_u,attrs:{controls:""}}),s=_("source"),a=_("span",{className:Gu});if(this.setStyle(s,e),r.appendChild(s),a.appendChild(r),t.appendChild(a),g(e.item.selection)||e.item.selection.restore(),xu.Insert(this.parent.currentDocument,t,this.parent.editableElement),!g(e.item.selection)){var l=e.item.selection.getRange(this.parent.currentDocument);e.item.selection.save(l,this.parent.currentDocument)}if(null===t.nextElementSibling){var c=_("br");t.parentNode.insertBefore(c,t.nextSibling)}}if(e.callBack&&(g(e.selector)||!g(e.selector)&&"pasteCleanupModule"!==e.selector)){var h=this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0],d="AudioReplace"===e.value||n?e.item.selectParent[0].querySelector("audio"):Q.isIE?h:h.querySelector("audio");d.addEventListener("loadeddata",(function(){"AudioReplace"===e.value&&n||g(i.parent.currentDocument)||(ru()&&iu(i.parent.currentDocument,i.parent.editableElement),e.callBack({requestType:"Audios",editorMode:"HTML",event:e.event,range:i.parent.nodeSelection.getRange(i.parent.currentDocument),elements:[d]}))})),n&&d.load()}},e.prototype.setStyle=function(e,t){g(t.item.url)||e.setAttribute("src",t.item.url);var i=t.item.fileName?t.item.fileName.split(".").pop().toLowerCase():t.item.url?t.item.url.split(".").pop().toLowerCase():"";e.type="opus"===i?"audio/ogg":"m4a"===i?"audio/mp4":t.item.fileName&&t.item.fileName.split(".").length>0?"audio/"+t.item.fileName.split(".")[t.item.fileName.split(".").length-1]:t.item.url&&t.item.url.split(".").length>0?"audio/"+t.item.url.split(".")[t.item.url.split(".").length-1]:""},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.destroy=function(){this.removeEventListener()},e}(),rm=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(Np,this.videoCommand,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(Np,this.videoCommand),this.parent.observer.off(Su,this.destroy)},e.prototype.videoCommand=function(e){var t,i,n,o="",r=e.value.toString().toLowerCase();switch("video"!==r&&"videoreplace"!==r&&(i=(t=e.item.selectNode[0]).closest("."+$u),n=t.closest("."+Xu)),t&&(o=t.classList.contains("e-rte-embed-url")?"e-rte-embed-url":""),r){case"video":case"videoreplace":this.createVideo(e);break;case"videodimension":this.videoDimension(e);break;case"inline":t.removeAttribute("class"),i&&(i.style.display="inline-block"),n&&(t.parentElement.style.cssFloat=""),G([t],[Zu,im,tm]),this.callBack(e);break;case"break":t.removeAttribute("class"),i&&(i.style.display="block"),n&&(t.parentElement.style.cssFloat=""),G([t],[Qu,Zu,tm]),this.callBack(e);break;case"justifyleft":t.removeAttribute("class"),i&&(i.style.display="block"),n?t.parentElement.style.cssFloat="left":null!=t.parentElement.nextElementSibling?(G([t],""===o?[Zu,Fu]:[Zu,Fu,o]),t.parentElement.nextElementSibling.style.clear="left"):G([t],""===o?[Zu,Fu]:[Zu,Fu,o]),this.callBack(e);break;case"justifycenter":t.removeAttribute("class"),i&&(i.style.display="block"),n&&(t.parentElement.style.cssFloat=""),G([t],""===o?[Zu,Yu]:[Zu,Yu,o]),this.callBack(e);break;case"justifyright":t.removeAttribute("class"),i&&(i.style.display="block"),n?t.parentElement.style.cssFloat="right":null!=t.parentElement.nextElementSibling?(G([t],""===o?[Zu,Uu]:[Zu,Fu,o]),t.parentElement.nextElementSibling.style.clear="right"):G([t],""===o?[Zu,Uu]:[Zu,Uu,o]),this.callBack(e);break;case"videoremove":ee(t.parentElement),this.callBack(e)}},e.prototype.wrapVideo=function(e){var t,i;if(e.item.isEmbedUrl){t=_("span",{className:$u,attrs:{contentEditable:"false"}});var n=_("span",{className:Xu}),o=_("template");o.innerHTML=e.item.fileName,n.appendChild(o.content),this.vidElement=i=n.firstElementChild,this.setStyle(i,e,this.vidElement),t.style.display=e.item.cssClass===im?"inline-block":"block",t.appendChild(n)}else t=_("span",{className:"e-video-wrap",attrs:{contentEditable:"false",title:g(e.item.title)?g(e.item.fileName)?"":e.item.fileName:e.item.title}}),this.vidElement=_("video",{className:Zu+" "+im,attrs:{controls:""}}),i=_("source"),this.setStyle(i,e,this.vidElement),this.vidElement.appendChild(i),t.appendChild(this.vidElement);return t},e.prototype.createVideo=function(e){var t,i=this,n=!1;if("VideoReplace"!==e.value||g(e.item.selectParent)||"VIDEO"!==e.item.selectParent[0].tagName)if("VideoReplace"===e.value&&!g(e.item.selectParent)&&g(e.item.selectParent[0].querySelector("iframe"))&&e.item.selectParent[0].classList&&e.item.selectParent[0].classList.contains(Xu))e.item.selectParent[0].innerHTML=e.item.fileName,this.setStyle(e.item.selectParent[0].firstElementChild,e,e.item.selectParent[0].firstElementChild);else if("VideoReplace"!==e.value||g(e.item.selectParent)||g(e.item.selectParent[0].querySelector("iframe"))||e.item.isEmbedUrl){if(e.item.isEmbedUrl)t=this.wrapVideo(e);else{if("VideoReplace"===e.value){var o=e.item.selection.range.startContainer.closest(".e-embed-video-wrap");g(o)||o.remove()}t=this.wrapVideo(e)}if(g(e.item.selection)||e.item.selection.restore(),xu.Insert(this.parent.currentDocument,t,this.parent.editableElement),!g(e.item.selection)){var r=e.item.selection.getRange(this.parent.currentDocument);e.item.selection.save(r,this.parent.currentDocument)}if(null===t.nextElementSibling){var s=_("br");t.parentNode.insertBefore(s,t.nextSibling)}}else{t=this.wrapVideo(e),(a=e.item.selection.range.startContainer).parentNode.replaceChild(t,a)}else if(e.item.isEmbedUrl){var a;t=this.wrapVideo(e),(a=e.item.selection.range.startContainer).parentNode.replaceChild(t,a)}else{var l=e.item.selectParent[0].querySelector("source");this.setStyle(l,e,l),n=!0}if(e.callBack&&(g(e.selector)||!g(e.selector)&&"pasteCleanupModule"!==e.selector)){var c,h=this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0];"VideoReplace"===e.value||n?e.item.isEmbedUrl?e.item.isEmbedUrl?g(t)||(c=t.querySelector("iframe")):c=e.item.selectParent[0].querySelector("iframe"):c=e.item.selectParent[0]:c=e.item.isEmbedUrl?h.querySelector("iframe"):"VIDEO"===h.tagName?h:h.lastElementChild,c.addEventListener("IFRAME"!==c.tagName?"loadeddata":"load",(function(){"VideoReplace"===e.value&&n||(e.item.isEmbedUrl&&c&&c.classList.add("e-rte-embed-url"),g(i.parent.currentDocument)||(ru()&&iu(i.parent.currentDocument,i.parent.editableElement),e.callBack({requestType:"Videos",editorMode:"HTML",event:e.event,range:i.parent.nodeSelection.getRange(i.parent.currentDocument),elements:[c]})))})),n&&c.load(),-1!==Q.userAgent.indexOf("Firefox")&&(this.vidElement.addEventListener("play",(function(){i.editAreaVideoClick(e)})),this.vidElement.addEventListener("pause",(function(){i.editAreaVideoClick(e)})))}},e.prototype.editAreaVideoClick=function(e){e.callBack({requestType:"VideosPlayPause",editorMode:"HTML",event:e.event})},e.prototype.setStyle=function(e,t,i){""!==t.item.url&&!g(t.item.url)&&g(e)||"iframe"===e.nodeName.toLowerCase()||e.setAttribute("src",t.item.url),t.item.isEmbedUrl||(e.type=t.item.fileName&&t.item.fileName.split(".").length>0?"video/"+t.item.fileName.split(".")[t.item.fileName.split(".").length-1]:t.item.url&&t.item.url.split(".").length>0?"video/"+t.item.url.split(".")[t.item.url.split(".").length-1]:""),g(t.item.width)||g(t.item.width.width)||i.setAttribute("width",N(t.item.width.width)),g(t.item.height)||g(t.item.height.height)||i.setAttribute("height",N(t.item.height.height)),g(t.item.width)||g(t.item.width.minWidth)||(i.style.minWidth=N(t.item.width.minWidth)),g(t.item.width)||g(t.item.width.maxWidth)||(i.style.maxWidth=N(t.item.width.maxWidth)),g(t.item.height)||g(t.item.height.minHeight)||(i.style.minHeight=N(t.item.height.minHeight)),g(t.item.height)||g(t.item.height.maxHeight)||(i.style.maxHeight=N(t.item.height.maxHeight)),g(t.item.cssClass)||(t.item.cssClass===Qu?(G([i],[Qu]),X([i],[im])):(G([i],[im]),X([i],[Qu])))},e.prototype.videoDimension=function(e){var t=e.item.selectNode[0].classList.contains(Xu)?e.item.selectNode[0].querySelector("iframe"):e.item.selectNode[0];t.style.height="",t.style.width="","auto"!==e.item.width&&(t.style.width=N(e.item.width)),"auto"!==e.item.height&&(t.style.height=N(e.item.height)),this.callBack(e)},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.destroy=function(){this.removeEventListener()},e}(),sm=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(Cp,this.createTable,this),this.parent.observer.on(Dp,this.insertRow,this),this.parent.observer.on(Tp,this.insertColumn,this),this.parent.observer.on(Lp,this.deleteRow,this),this.parent.observer.on(Sp,this.deleteColumn,this),this.parent.observer.on(Ip,this.removeTable,this),this.parent.observer.on(wp,this.tableHeader,this),this.parent.observer.on(xp,this.tableVerticalAlign,this),this.parent.observer.on(jp,this.cellMerge,this),this.parent.observer.on(zp,this.HorizontalSplit,this),this.parent.observer.on(Op,this.VerticalSplit,this),this.parent.observer.on(Ap,this.tableStyle,this),this.parent.observer.on(Pp,this.setBGColor,this),this.parent.observer.on(kp,this.tableStyle,this),this.parent.observer.on(Rp,this.tableMove,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(Cp,this.createTable),this.parent.observer.off(Dp,this.insertRow),this.parent.observer.off(Tp,this.insertColumn),this.parent.observer.off(Lp,this.deleteRow),this.parent.observer.off(Sp,this.deleteColumn),this.parent.observer.off(Ip,this.removeTable),this.parent.observer.off(wp,this.tableHeader),this.parent.observer.off(xp,this.tableVerticalAlign),this.parent.observer.off(jp,this.cellMerge),this.parent.observer.off(zp,this.HorizontalSplit),this.parent.observer.off(Op,this.VerticalSplit),this.parent.observer.off(Ap,this.tableStyle),this.parent.observer.off(kp,this.tableStyle),this.parent.observer.off(Pp,this.setBGColor),this.parent.observer.off(Rp,this.tableMove),this.parent.observer.off(Su,this.destroy)},e.prototype.createTable=function(e){var t=_("table",{className:"e-rte-table"}),i=_("tbody");g(e.item.width.width)||(t.style.width=this.calculateStyleValue(e.item.width.width)),g(e.item.width.minWidth)||(t.style.minWidth=this.calculateStyleValue(e.item.width.minWidth)),g(e.item.width.maxWidth)||(t.style.maxWidth=this.calculateStyleValue(e.item.width.maxWidth));for(var n=parseInt(e.item.width.width,10)>100?100/e.item.columns:parseInt(e.item.width.width,10)/e.item.columns,o=0;o<e.item.rows;o++){for(var r=_("tr"),s=0;s<e.item.columns;s++){var a=_("td");a.appendChild(_("br")),a.style.width=n+"%",r.appendChild(a)}i.appendChild(r)}if(t.appendChild(i),e.item.selection.restore(),xu.Insert(this.parent.currentDocument,t,this.parent.editableElement),e.item.selection.setSelectionText(this.parent.currentDocument,t.querySelector("td"),t.querySelector("td"),0,0),null===t.nextElementSibling&&!t.classList.contains("ignore-table")){var l=void 0;"DIV"===e.enterAction?(l=_("div")).appendChild(_("br")):"BR"===e.enterAction?l=_("br"):(l=_("p")).appendChild(_("br")),this.insertAfter(l,t)}return t.classList.contains("ignore-table")&&ou([t],["ignore-table"]),t.querySelector("td").classList.add("e-cell-select"),e.callBack&&e.callBack({requestType:"Table",editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:[t]}),t},e.prototype.calculateStyleValue=function(e){return"string"==typeof e&&(e.indexOf("px")>=0||e.indexOf("%")>=0||e.indexOf("auto")>=0)?e:e+"px"},e.prototype.insertAfter=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},e.prototype.getSelectedCellMinMaxIndex=function(e){for(var t=this.curTable.querySelectorAll(".e-cell-select"),i=0,n=e.length,o=0,r=e[0].length,s=0;i<t.length;i++){var a=this.getCorrespondingIndex(t[i],e),l=this.FindIndex(a[0],a[1],e);n=Math.min(a[0],n),o=Math.max(l[0],o),r=Math.min(a[1],r),s=Math.max(l[1],s)}return{startRow:n,endRow:o,startColumn:r,endColumn:s}},e.prototype.insertRow=function(e){var t="InsertRowBefore"!==e.item.subCommand,i=e.item.selection.range.startContainer;if("TH"!==i.nodeName&&"TD"!==i.nodeName&&(i=se(i.parentElement,"td,th")),this.curTable=se(this.parent.nodeSelection.range.startContainer.parentElement,"table"),0===this.curTable.querySelectorAll(".e-cell-select").length){var n=this.curTable.rows[this.curTable.rows.length-1],o=n.cloneNode(!0);o.removeAttribute("rowspan"),this.insertAfter(o,n)}else{for(var r=this.getCorrespondingColumns(),s=this.getSelectedCellMinMaxIndex(r),a=t?s.endRow:s.startRow,l=_("tr"),c=this.curTable.querySelectorAll("th.e-cell-select").length>0,h=0;h<r[a].length;h++)if(t&&a<r.length-1&&r[a][h]===r[a+1][h]||!t&&0<a&&r[a][h]===r[a-1][h])(0===h||0<h&&r[a][h]!==r[a][h-1])&&r[a][h].setAttribute("rowspan",(parseInt(r[a][h].getAttribute("rowspan"),10)+1).toString());else{var d=_("td");d.appendChild(_("br")),l.appendChild(d);var p=r[c&&t&&r[a+1]?a+1:a][h].getAttribute("style");if(p){var u=this.cellStyleCleanup(p);d.style.cssText=u}}var m=void 0;m=c&&t?this.curTable.querySelector("tbody").childNodes[0]:this.curTable.rows[a],"InsertRowBefore"===e.item.subCommand||c?m.parentElement.insertBefore(l,m):this.insertAfter(l,m)}e.item.selection.setSelectionText(this.parent.currentDocument,e.item.selection.range.startContainer,e.item.selection.range.startContainer,0,0),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.cellStyleCleanup=function(e){for(var t=e.split(";"),i=[],n=["background-color","vertical-align","text-align"],o=0;o<t.length;o++){for(var r=t[o],s=!0,a=0;a<n.length;a++){var l=n[a];r.indexOf(l)>-1&&(s=!1)}s&&i.push(r)}return i.join(";")},e.prototype.insertColumn=function(e){var t=e.item.selection.range.startContainer;"TH"!==t.nodeName&&"TD"!==t.nodeName&&(t=se(t.parentElement,"td,th"));for(var i,n=se(t,"tr"),o=se(n,"table").rows,r=Array.prototype.slice.call(n.querySelectorAll(":scope > td, :scope > th")).indexOf(t),s=parseInt(e.item.width,10)/n.querySelectorAll(":scope > td, :scope > th").length,a=parseInt(e.item.width,10)/(n.querySelectorAll(":scope > td, :scope > th").length+1),l=se(n,"table"),c=se(n,"table").querySelectorAll("th,td"),h=0;h<c.length;h++)c[h].dataset.oldWidth=c[h].offsetWidth/l.offsetWidth*100+"%";(g(l.style.width)||""===l.style.width)&&(l.style.width=l.offsetWidth+"px");for(h=0;h<o.length;h++){var d=(i=o[h].querySelectorAll(":scope > td, :scope > th")[r]).cloneNode(!0),p=d.getAttribute("style");if(p){var u=this.cellStyleCleanup(p);d.style.cssText=u}d.innerHTML="",d.appendChild(_("br")),d.removeAttribute("class"),d.removeAttribute("colspan"),d.removeAttribute("rowspan"),"InsertColumnLeft"===e.item.subCommand?i.parentElement.insertBefore(d,i):this.insertAfter(d,i),d.style.width=a.toFixed(4)+"%",delete d.dataset.oldWidth}for(h=0;h<c.length;h++)c[h].style.width=(Number(c[h].dataset.oldWidth.split("%")[0])*a/s).toFixed(4)+"%",delete c[h].dataset.oldWidth;e.item.selection.setSelectionText(this.parent.currentDocument,t,t,0,0),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.setBGColor=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument);this.parent.nodeSelection.save(t,this.parent.currentDocument);for(var i=this.curTable.querySelectorAll(".e-cell-select"),n=0;n<i.length;n++)i[n].style.backgroundColor=e.value.toString();this.parent.undoRedoManager.saveData(),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.deleteColumn=function(e){var t=e.item.selection.range.startContainer;3===t.nodeType&&(t=se(t.parentElement,"td,th"));var i=se(t,"TH"===t.tagName?"thead":"tbody"),n=i&&Array.prototype.indexOf.call(i.childNodes,t.parentNode);if(this.curTable=se(t,"table"),1===se(t,"tr").querySelectorAll("th,td").length)e.item.selection.restore(),ee(se(t.parentElement,"table"));else{for(var o=void 0,r=this.getCorrespondingColumns(),s=this.getSelectedCellMinMaxIndex(r),a=s.startColumn,l=s.endColumn,c=0;c<r.length;c++)for(var h=r[c],d=0;d<h.length;d++){var p=h[d],u=this.getCorrespondingIndex(p,r),m=parseInt(p.getAttribute("colspan"),10)||1;u[1]+(m-1)>=a&&u[1]<=l&&(m>1?p.setAttribute("colspan",(m-1).toString()):(ee(p),o=d,Q.isIE&&(e.item.selection.setSelectionText(this.parent.currentDocument,this.curTable.querySelector("td"),this.curTable.querySelector("td"),0,0),this.curTable.querySelector("td, th").classList.add("e-cell-select"))))}if(o>-1){var g=i.children[n],f=g&&g.children[o<=g.children.length-1?o:o-1];f&&(e.item.selection.setSelectionText(this.parent.currentDocument,f,f,0,0),f.classList.add("e-cell-select"))}}if(e.callBack){var y=this.parent.nodeSelection.getRange(this.parent.currentDocument).startContainer;if("TD"!==y.nodeName){var v=this.parent.nodeSelection.getRange(this.parent.currentDocument).startOffset,b=y.children[v];b&&this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,b,0)}e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.deleteRow=function(e){var t=e.item.selection.range.startContainer;3===t.nodeType&&(t=se(t.parentElement,"td,th"));var i,n=Array.prototype.indexOf.call(t.parentNode.childNodes,t);this.curTable=se(t,"table");var o,r,s=this.getCorrespondingColumns(),a=this.getSelectedCellMinMaxIndex(s);if(1===this.curTable.rows.length)e.item.selection.restore(),ee(se(t.parentElement,"table"));else for(o=a.endRow;o>=a.startRow;o--){for(i=this.curTable.rows[o],r=0;r<s[o].length;r++){if((0===r||s[o][r]!==s[o][r-1])&&1<parseInt(s[o][r].getAttribute("rowspan"),10)){var l=parseInt(s[o][r].getAttribute("rowspan"),10)-1;if(1===l){s[o][r].removeAttribute("rowspan");var c=this.getMergedRow(this.getCorrespondingColumns())[r];if(c){var h=c.cloneNode(!0);h.innerHTML="<br>",c.parentElement&&c.parentElement.insertBefore(h,c)}}else s[o][r].setAttribute("rowspan",l.toString())}if(o<s.length-1&&s[o][r]===s[o+1][r]&&(0===o||s[o][r]!==s[o-1][r])){var d=s[o][r],p=void 0;for(p=r;0<p&&s[o][p]===s[o][p-1];p--)0===p?this.curTable.rows[o+1].prepend(d):s[o+1][p-1].insertAdjacentElement("afterend",d)}}var u=i.rowIndex;this.curTable.deleteRow(u);var m=g(this.curTable.rows[u])?this.curTable.querySelectorAll("tbody tr")[u-1]:this.curTable.querySelectorAll("tbody tr")[u],f=m&&m.querySelectorAll("td")[n];f?(e.item.selection.setSelectionText(this.parent.currentDocument,f,f,0,0),f.classList.add("e-cell-select")):(e.item.selection.setSelectionText(this.parent.currentDocument,this.curTable.querySelector("td"),this.curTable.querySelector("td"),0,0),this.curTable.querySelector("td, th").classList.add("e-cell-select"))}e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.getMergedRow=function(e){for(var t,i=0;i<e.length;i++)e[i].length!==this.curTable.rows[0].childNodes.length&&(t=e[i]);return t},e.prototype.removeTable=function(e){var t=e.item.selection.range.startContainer,i=se((t=3===t.nodeType?t.parentNode:t).parentElement,"table");i&&(ee(i),e.item.selection.restore()),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.tableHeader=function(e){var t=!1,i=e.item.selection.range.startContainer,n=se((i=3===i.nodeType?i.parentNode:i).parentElement,"table");if([].slice.call(n.childNodes).forEach((function(e){"THEAD"===e.nodeName&&(t=!0)})),n&&!t){for(var o=n.querySelector("tr").childElementCount,r=0,s=0;s<o;s++)r+=parseInt(n.querySelector("tr").children[s].getAttribute("colspan"),10)||1;for(var a=n.createTHead().insertRow(0),l=0;l<r;l++){var c=_("th");c.appendChild(_("br")),a.appendChild(c)}}else n.deleteTHead();e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.tableVerticalAlign=function(e){var t="";switch(e.item.subCommand){case"AlignTop":t="top";break;case"AlignMiddle":t="middle";break;case"AlignBottom":t="bottom"}e.item.tableCell.style.verticalAlign=t,t&&""!==t&&e.item.tableCell.getAttribute("valign")&&e.item.tableCell.removeAttribute("valign"),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.cellMerge=function(e){g(this.curTable)&&(this.curTable=se(this.parent.nodeSelection.range.startContainer.parentElement,"table"));var t=this.curTable.querySelectorAll(".e-cell-select");if(!(t.length<2)){this.mergeCellContent();for(var i=this.getSelectedMinMaxIndexes(this.getCorrespondingColumns()),n=t[0],o=n.parentElement.querySelectorAll(".e-cell-select"),r=0,s=0;s<o.length;s++){var a=o[s].offsetHeight;a>r&&(r=a)}i.startColumn<i.endColumn&&n.setAttribute("colspan",(i.endColumn-i.startColumn+1).toString()),i.startRow<i.endRow&&n.setAttribute("rowspan",(i.endRow-i.startRow+1).toString());var l,c=0;for(s=o.length-1;s>=0;s--)if(g(o[s].style.width)||""===o[s].style.width)c+=o[s].offsetWidth/this.curTable.offsetWidth*100,l="%";else{if(!l){var h=o[s].style.width.match(/^([\d.]+)([a-z%]+)$/i);l=h?h[2]:"%"}c+=parseFloat(o[s].style.width)}n.style.width=c+l,n.style.height=r+"px";for(var d=1;d<=t.length-1;d++)ee(t[d]);for(d=0;d<this.curTable.rows.length;d++)""===this.curTable.rows[d].innerHTML.trim()&&ee(this.curTable.rows[d]);ou(this.curTable.querySelectorAll("table td, table th"),"e-multi-cells-select"),ou(this.curTable.querySelectorAll("table td, table th"),"e-cell-select-end"),this.updateRowSpanStyle(i.startRow,i.endRow,this.getCorrespondingColumns()),this.updateColSpanStyle(i.startColumn,i.endColumn,this.getCorrespondingColumns()),e.item.selection.setSelectionText(this.parent.currentDocument,e.item.selection.range.startContainer,e.item.selection.range.startContainer,0,0),this.parent.nodeSelection&&n&&this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,n,0),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.updateColSpanStyle=function(e,t,i){var n,o,r,s,a=0,l=0,c=i;if(e<(t=Math.min(t,c[0].length-1))){for(o=e;o<=t;o++)if(a=Math.min(parseInt(c[0][o].getAttribute("colspan"),10)||1,t-e+1),!(e<o&&c[0][o]===c[0][o-1])&&1<a&&c[0][o]===c[0][o+1])for(l=a-1,n=1;n<c.length;n++){if(c[n][o]!==c[n-1][o])for(r=o;r<o+a;r++)if(1<(s=parseInt(c[n][r].getAttribute("colspan"),10)||1)&&c[n][r]===c[n][r+1])r+=l=Math.min(l,s-1);else if(0===(l=Math.max(0,l-1)))break;if(!l)break}l&&this.updateCellAttribute(c,l,"colspan",0,c.length-1,e,t)}},e.prototype.updateRowSpanStyle=function(e,t,i){var n,o,r,s,a=0,l=0,c=i;if(e<(t=Math.min(t,c.length-1))){for(n=e;n<=t;n++)if(!(e<n&&c[n][0]===c[n-1][0])&&c[n][0]&&1<(a=Math.min(parseInt(c[n][0].getAttribute("rowspan"),10)||1,t-e+1))&&c[n][0]===c[n+1][0])for(l=a-1,o=1;o<c[0].length;o++)if(c[n][o]!==c[n][o-1]){for(r=n;r<n+a;r++)if(1<(s=parseInt(c[r][o].getAttribute("rowspan"),10)||1)&&c[r][o]===c[r+1][o])r+=l=Math.min(l,s-1);else if(!(l=Math.max(0,l-1)))break;if(!l)break}l&&this.updateCellAttribute(c,l,"rowspan",e,t,0,c[0].length-1)}},e.prototype.updateCellAttribute=function(e,t,i,n,o,r,s){var a,l,c;for(a=n;a<=o;a++)for(l=r;l<=s;l++)c=parseInt(e[a][l].getAttribute(i),10)||1,(n<a&&e[a][l]===e[a-1][l]||r<l&&e[a][l]===e[a][l-1]||1<c)&&(1<c-t?e[a][l].setAttribute(i,(c-t).toString()):e[a][l].removeAttribute(i))},e.prototype.mergeCellContent=function(){for(var e=this.curTable.querySelectorAll(".e-cell-select"),t="<br>"===e[0].innerHTML?"":e[0].innerHTML,i=1;i<e.length;i++)"<br>"!==e[i].innerHTML&&(t=t?t+"<br>"+e[i].innerHTML:t+e[i].innerHTML);e[0].innerHTML=t},e.prototype.getSelectedMinMaxIndexes=function(e){var t=this.curTable.querySelectorAll(".e-cell-select");if(0<t.length){for(var i=e.length,n=0,o=e[0].length,r=0,s=0;s<t.length;s++){var a=this.getCorrespondingIndex(t[s],e),l=this.FindIndex(a[0],a[1],e);i=Math.min(a[0],i),n=Math.max(l[0],n),o=Math.min(a[1],o),r=Math.max(l[1],r)}return{startRow:i,endRow:n,startColumn:o,endColumn:r}}return null},e.prototype.HorizontalSplit=function(e){var t=e.item.selection.range.startContainer;if(this.curTable=se(t.parentElement,"table"),!(this.curTable.querySelectorAll(".e-cell-select").length>1)){this.activeCell=this.curTable.querySelector(".e-cell-select");var i=this.activeCell.cloneNode(!0);i.removeAttribute("class"),i.innerHTML="</br>";var n=this.getCorrespondingIndex(this.activeCell,this.getCorrespondingColumns()),o=this.getCorrespondingColumns(),r=this.activeCell.getAttribute("rowspan")?parseInt(this.activeCell.getAttribute("rowspan"),10):1;if(r>1){var s=Math.ceil(r/2);1<s?this.activeCell.setAttribute("rowspan",s.toString()):this.activeCell.removeAttribute("rowspan"),1<r-s?i.setAttribute("rowspan",(r-s).toString()):i.removeAttribute("rowspan");var a,l=void 0;for(a=n[0]+Math.ceil(r/2),l=0===n[1]?n[1]:n[1]-1;0<=l&&(o[a][l]===o[a][l-1]||0<a&&o[a][l]===o[a-1][l]);)l--;-1===l?this.curTable.rows[a].firstChild?this.curTable.rows[a].prepend(i):this.curTable.appendChild(i):o[a][l].insertAdjacentElement("afterend",i)}else{var c=_("tr");c.appendChild(i);for(var h=o[n[0]],d=0;d<=h.length-1;d++)h[d]!==h[d-1]&&h[d]!==this.activeCell&&h[d].setAttribute("rowspan",((parseInt(h[d].getAttribute("rowspan"),10)?parseInt(h[d].getAttribute("rowspan"),10):1)+1).toString());this.activeCell.parentNode.insertAdjacentElement("afterend",c)}e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.VerticalSplit=function(e){var t=e.item.selection.range.startContainer;if(this.curTable=se(t.parentElement,"table"),!(this.curTable.querySelectorAll(".e-cell-select").length>1)){this.activeCell=this.curTable.querySelector(".e-cell-select");var i=this.curTable.rows,n=this.activeCell.cloneNode(!0);n.removeAttribute("class"),n.innerHTML="</br>";var o=this.getCorrespondingIndex(this.activeCell,this.getCorrespondingColumns()),r=this.getCorrespondingColumns(),s=parseInt(this.activeCell.getAttribute("colspan"),10)||1;if(s>1){var a=Math.ceil(s/2),l=this.getColSizes(this.curTable),c=this.getSplitColWidth(o[1],o[1]+a-1,l),h=this.getSplitColWidth(o[1]+a,o[1]+s-1,l),d=this.convertPixelToPercentage(this.activeCell.offsetWidth,this.curTable.offsetWidth);h=d-c<h?d-c:h,1<a?this.activeCell.setAttribute("colspan",a.toString()):this.activeCell.removeAttribute("colspan"),1<s-a?n.setAttribute("colspan",(s-a).toString()):n.removeAttribute("colspan"),this.activeCell.style.width=c+"%",n.style.width=h+"%"}else{for(var p=parseFloat(this.activeCell.style.width)/2,u=0;u<=i.length-1;u++)if(0===u||r[u][o[1]]!==r[u-1][o[1]]){var m=r[u][o[1]];m!==this.activeCell&&m.setAttribute("colspan",((parseInt(m.getAttribute("colspan"),10)?parseInt(m.getAttribute("colspan"),10):1)+1).toString())}this.activeCell.style.width=p+"%",n.style.width=p+"%"}this.activeCell.parentNode.insertBefore(n,this.activeCell.nextSibling),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.getSplitColWidth=function(e,t,i){for(var n=0,o=e;o<=t;o++)n+=i[o];return this.convertPixelToPercentage(n,this.curTable.offsetWidth)},e.prototype.getColSizes=function(e){for(var t=e.rows[0].cells,i=0,n=0;n<t.length;n++)i+=t[n].colSpan;for(var o=new Array(i),r=new Map,s=0;s<e.rows.length;s++)for(var a=0,l=0;l<e.rows[s].cells.length;l++){for(var c=1;c<e.rows[s].cells[l].rowSpan;c++){var h=""+(s+c)+a;r.set(h,e.rows[s].cells[l])}var d=this.getCellIndex(r,s,l);d>a&&(a=d);var p=e.rows[s].cells[l].offsetWidth;(!o[a]||p<o[a])&&(o[a]=p),a+=1+e.rows[s].cells[l].colSpan-1}return o},e.prototype.getCellIndex=function(e,t,i){var n=""+t+i,o=e.get(n);return o?this.getCellIndex(e,t,i+o.colSpan):i},e.prototype.convertPixelToPercentage=function(e,t){return e/t*100},e.prototype.getCorrespondingColumns=function(){for(var e=[],t=this.curTable.rows,i=0;i<=t.length-1;i++)for(var n=t[i],o=0,r=0;r<=n.children.length-1;r++){for(var s=n.children[r],a=s,l=parseInt(a.getAttribute("colspan"),10)||1,c=parseInt(a.getAttribute("rowspan"),10)||1,h=i;h<i+c;h++)for(var d=o;d<o+l;d++)e[h]||(e[h]=[]),e[h][d]?o++:e[h][d]=s;o+=0}return e},e.prototype.FindIndex=function(e,t,i){var n,o;for(n=e+1,o=t+1;n<i.length;){if(i[n][t]!==i[e][t]){n--;break}n++}for(n===i.length&&n--;o<i[e].length;){if(i[e][o]!==i[e][t]){o--;break}o++}return o===i[e].length&&o--,[n,o]},e.prototype.getCorrespondingIndex=function(e,t){for(var i=0;i<t.length;i++)for(var n=0;n<t[i].length;n++)if(t[i][n]===e)return[i,n];return[]},e.prototype.highlightCells=function(e,t,i,n,o){var r,s,a,l,c=e,h=t,d=i,p=n,u=new am;for(r=c;r<=h;r++){for(a=this.getCorrespondingIndex(o[r][d],o),l=this.FindIndex(a[0],a[1],o),(1<(parseInt(o[r][d].getAttribute("rowspan"),10)||1)||1<(parseInt(o[r][d].getAttribute("colspan"),10)||1))&&l?(c=Math.min(a[0],c),h=Math.max(l[0],h),d=Math.min(a[1],d),p=Math.max(l[1],p)):(1<(parseInt(o[r][p].getAttribute("rowspan"),10)||1)||1<(parseInt(o[r][p].getAttribute("colspan"),10)||1))&&(a=this.getCorrespondingIndex(o[r][p],o),(l=this.FindIndex(a[0],a[1],o))&&(c=Math.min(a[0],c),h=Math.max(l[0],h),d=Math.min(a[1],d),p=Math.max(l[1],p))),s=d;s<=p;s++)a=this.getCorrespondingIndex(o[c][s],o),l=this.FindIndex(a[0],a[1],o),(1<(parseInt(o[c][s].getAttribute("rowspan"),10)||1)||1<(parseInt(o[c][s].getAttribute("colspan"),10)||1))&&l?(c=Math.min(a[0],c),h=Math.max(l[0],h),d=Math.min(a[1],d),p=Math.max(l[1],p)):(1<(parseInt(o[h][s].getAttribute("rowspan"),10)||1)||1<(parseInt(o[h][s].getAttribute("colspan"),10)||1))&&(a=this.getCorrespondingIndex(o[h][s],o),(l=this.FindIndex(a[0],a[1],o))&&(c=Math.min(a[0],c),h=Math.max(l[0],h),d=Math.min(a[1],d),p=Math.max(l[1],p)));u=c===e&&h===t&&d===i&&p===n?{startRow:e,endRow:t,startColumn:i,endColumn:n}:this.highlightCells(c,h,d,p,o)}return u},e.prototype.restoreRange=function(e){!this.parent.currentDocument.getSelection().rangeCount||"TD"!==e.nodeName&&"TH"!==e.nodeName||this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,e,0)},e.prototype.tableStyle=function(e){e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.tableMove=function(e){this.activeCell=e.selectNode[0];var t=e.event.target,i=this.activeCell.tagName,n=t.tagName;if(this.curTable=se(t,"table"),"TD"===t.tagName||"TH"===t.tagName||i===n){var o=se(this.activeCell,"table");if(!g(this.curTable)&&!g(o)&&o===this.curTable){for(var r=this.getCorrespondingColumns(),s=this.getCorrespondingIndex(this.activeCell,r),a=this.getCorrespondingIndex(t,r),l=this.curTable.querySelectorAll(".e-cell-select, .e-multi-cells-select, .e-cell-select-end"),c=l.length-1;c>=0;c--)this.activeCell!==l[c]&&ou([l[c]],["e-cell-select"]),ou([l[c]],["e-multi-cells-select"]),ou([l[c]],["e-cell-select-end"]);if(s[0]!==a[0]||s[1]!==a[1]){for(var h=this.highlightCells(Math.min(s[0],a[0]),Math.max(s[0],a[0]),Math.min(s[1],a[1]),Math.max(s[1],a[1]),r),d=h.startRow;d<=h.endRow;d++)for(var p=h.startColumn;p<=h.endColumn;p++)r[d][p].classList.add("e-cell-select"),r[d][p].classList.add("e-multi-cells-select");t.classList.add("e-cell-select-end"),e.event.type&&e.event.preventDefault(),this.restoreRange(t)}else l.length>1&&this.restoreRange(t)}}},e.prototype.destroy=function(){this.removeEventListener()},e}(),am=function(){},lm=function(){function e(){}return e.applyFormat=function(e,t,i,n,o,r,s,a){this.enterAction=n;if(["bold","italic","underline","strikethrough","superscript","subscript","uppercase","lowercase","fontcolor","fontname","fontsize","backgroundcolor","inlinecode"].indexOf(t)>-1||"formatPainter"===r){"backgroundcolor"===t&&""===r&&(r="transparent");var l=new bm(i),c=new cu(i,e),h=new wu,d=new vp,p=l.getRange(e),u=0,m=p.startContainer.parentElement;if(p.collapsed&&!g(m)&&"A"===m.tagName&&(p.startOffset===m.textContent.length||0===p.startOffset)){var f=document.createTextNode("");0===p.startOffset?m.parentNode.insertBefore(f,m):g(m.nextSibling)?m.parentNode.appendChild(f):m.parentElement.insertBefore(f,m.nextSibling);var y=e.createRange();p.setStart(f,0),p.setEnd(f,0),p.collapse(!0),l.setRange(e,y)}if(-1!==Q.userAgent.indexOf("Firefox")&&p.startContainer===p.endContainer&&!g(i)&&p.startContainer===i){for(var v=p.startContainer.childNodes[p.startOffset>0?p.startOffset-1:p.startOffset]||p.startContainer,b=p.endContainer.childNodes[p.endOffset>0?p.endOffset-1:p.endOffset]||p.endContainer,M="BR"===b.lastChild.nodeName?g(b.lastChild.previousSibling)?b:b.lastChild.previousSibling:b.firstChild;!g(M)&&"#text"!==M.nodeName&&"IMG"!==M.nodeName&&"BR"!==M.nodeName&&"HR"!==M.nodeName;)M=M.lastChild;l.setSelectionText(e,v,M,0,0),p=l.getRange(e)}var N=l.save(p,e),C=void 0,E=!1;i&&o&&"#text"!==i.nodeName&&(C=o.getTextNodes()),C&&C.length>0?E=!0:C=p.collapsed?l.getSelectionNodeCollection(p):l.getSelectionNodeCollectionBr(p);var D,T=!1,L=!1,S=!1,I=["fontcolor","fontname","fontsize","backgroundcolor"].indexOf(t)>-1;if(!E&&p.collapsed){var w=d.getFormattedNode(p.startContainer,t,i),x=g(w)?null:null===w.getAttribute("style")?w.nodeName:w.nodeName+"[style='"+w.getAttribute("style")+"']";if(C.length>0)T=!0,p=h.GetCursorRange(e,p,C[0]);else if(3===p.startContainer.nodeType&&(p.startContainer.parentElement.childElementCount>0&&p.startOffset>0&&"br"!==p.startContainer.parentElement.firstElementChild.tagName.toLowerCase()||!g(w)&&w===p.startContainer.parentElement.closest(x)&&0!==p.startContainer.parentElement.closest(x).textContent.replace(new RegExp("​","g"),"").trim().length))T=!0,p=h.GetCursorRange(e,p,p.startContainer),C.push(p.startContainer);else{var j=this.insertCursorNode(e,l,p,d,h,t,r,i);l.endContainer=l.startContainer=l.getNodeArray(j,!0);var O="BR"===j.nodeName&&j.parentNode.childNodes;g(O)||1!==O.length||"BR"!==O[0].nodeName||0!==C.length?l.endOffset=l.startOffset=1:(l.setSelectionText(e,p.startContainer,p.endContainer,0,0),S=!0),"BR"===j.nodeName&&0===j.parentNode.textContent.length&&(S=!0)}}D=!E&&p.collapsed;for(var z=!1,A=0;A<C.length;A++){var k=d.getFormattedNode(C[A],t,i);null===k&&("subscript"===t?z=null!==(k=d.getFormattedNode(C[A],"superscript",i)):"superscript"===t&&(z=null!==(k=d.getFormattedNode(C[A],"subscript",i)))),0===A&&null===k&&(L=!0),null===k||L&&!I?(C[A]=this.insertFormat(e,C,A,k,D,E,L,I,p,h,t,r,a,c,i),u++):C[A]=this.removeFormat(C,A,k,D,E,L,I,p,h,t,r,l,i,c),C.length===u&&(this.isWrapped=!0),E||(l=this.applySelection(C,l,h,A,T))}if(eu()&&tu(i,s),!S&&!E)if(this.isSafari()&&!p.collapsed&&(this.isUnwrapped||this.isWrapped)){var P=N.range.cloneRange();this.restoreSelectionForSafari(P,e,l),this.isUnwrapped=!1,this.isWrapped=!1}else N.restore();z&&this.applyFormat(e,t,i,n,o)}},e.adjustContainerAndOffset=function(e,t,i){var n=e.childNodes;if(e.nodeType===Node.ELEMENT_NODE&&n.length>0){var o=i||this.isUnwrapped?t-1:t,r=n[Math.max(Math.min(o,n.length-1),0)];return[r,i?r.nodeType===Node.TEXT_NODE?r.textContent.length:r.childNodes.length:0]}return[e,t]},e.restoreSelectionForSafari=function(e,t,i){var n=this.adjustContainerAndOffset(e.startContainer,e.startOffset,!1),o=n[0],r=n[1],s=this.adjustContainerAndOffset(e.endContainer,e.endOffset,!0),a=s[0],l=s[1];e.setStart(o,r),e.setEnd(a,l);var c=t.getSelection();c&&(c.removeAllRanges(),c.addRange(e)),i.save(e,t)},e.insertCursorNode=function(e,t,i,n,o,r,s,a){var l=t.getNodeCollection(i),c=new cu(a,e),h=l.length>0?l.length>1&&i.startContainer===i.endContainer?this.getCursorFormat(n,l,r,a):""===s&&"fontsize"===r&&null==n.getFormattedNode(l[0],r,a)&&"SPAN"===l[0].parentElement.nodeName?l[0].parentElement:n.getFormattedNode(l[0],r,a):null,d=null;if(h){if(d=l[0],8203===h.firstChild.textContent.charCodeAt(0)&&3===h.firstChild.nodeType){var p=new RegExp("​","g"),u=void 0;if("#text"!==d.nodeName)for(var m=0;m<l.length;m++)l[m].nodeType===Node.TEXT_NODE&&(d=l[m]);h.firstChild===d?(d.textContent=h.parentElement&&(c.isBlockNode(h.parentElement)&&h.parentElement.textContent.length<=1?h.parentElement.childElementCount>1:0===h.childElementCount)&&(h.parentElement.textContent.length>1||h.parentElement.firstChild&&1===h.parentElement.firstChild.nodeType)?d.textContent:d.textContent.replace(p,""),u=d):(h.firstChild.textContent=h.firstChild.textContent.replace(p,""),u=h.firstChild);var f=void 0;if(0===u.textContent.length)if(g(u.previousSibling)){if(!g(u.parentElement)&&0===u.parentElement.textContent.length){var y=document.createElement("BR");u.parentElement.appendChild(y),ee(u),d=y,t.setCursorPoint(e,d.parentElement,0)}}else d=u.previousSibling,f=u.textContent.length-1,t.setCursorPoint(e,u,f)}["fontcolor","fontname","fontsize","backgroundcolor"].indexOf(r)>-1?("fontcolor"===r?h.style.color=s:"fontname"===r?h.style.fontFamily=s:"fontsize"===r?h.style.fontSize=s:h.style.backgroundColor=s,d=h):(Iu.unwrap(h),t.setCursorPoint(e,d,0))}else{if(l.length>1&&i.startOffset>0&&l[0].firstElementChild&&"br"===l[0].firstElementChild.tagName.toLowerCase()&&(l[0].innerHTML=""),1!==l.length||0!==i.startOffset||"BR"!==l[0].nodeName&&(g(l[0].nextSibling)||"BR"!==l[0].nextSibling.nodeName)||ee("#text"===l[0].nodeName?l[0].nextSibling:l[0]),!g(l[0]&&l[0].parentElement)&&-1!==vp.inlineTags.indexOf(l[0].parentElement.tagName.toLowerCase())&&l[0].textContent.includes("​")){var v=this.GetFormatNode(r,s),b=l[0];if("fontsize"===r)for(var M=l[0];M;){var N=M.parentElement.textContent.trim()===l[0].textContent.trim(),C=M.parentElement;if(c.isBlockNode(C)||!N||"SPAN"===C.nodeName&&C.classList.contains("e-img-inner"))break;M=C,l[0]=M}return this.applyStyles(l,0,v),b}d=this.getInsertNode(e,i,r,s).firstChild}return d},e.getCursorFormat=function(e,t,i,n){for(var o,r=0;r<t.length;r++)o=t[r].lastElementChild?t[r].lastElementChild:t[r];return"fontsize"===i&&null==e.getFormattedNode(o,i,n)&&"SPAN"===o.parentElement.nodeName?o.parentElement:e.getFormattedNode(o,i,n)},e.removeFormat=function(t,i,n,o,r,s,a,l,c,h,d,p,u,m){var f,y,v=null,b="#text"===l.startContainer.nodeName?l.startContainer.textContent.substring(l.startOffset,l.startContainer.textContent.length):l.startContainer.textContent,M=t[i].textContent,N=t[0].parentElement.nodeName===t[0].parentElement.parentElement.nodeName;if(l.startContainer!==l.endContainer||0!==l.startOffset||l.endOffset!==l.startContainer.length||l.startContainer.textContent!==n.textContent&&!N){var C=[],E=t[i],D=E;do{C.push(p.getIndex(E)),E=E.parentNode}while(E&&E!==n);if("BR"!==t[i].nodeName&&("#text"===D.nodeName&&D.textContent.includes("​")&&D.remove(),r||(E=v=o&&n.textContent.length-1===l.startOffset?c.SplitNode(l,n,!0):c.GetSpliceNode(l,n))),o){for(var T=v;null!==T.firstChild&&3!==T.firstChild.nodeType;null)T=T.firstChild;T.innerHTML="&#8203;",t[i]=T.firstChild}else{for(;E&&E.childNodes.length>0&&C.length-1>=0&&E.childNodes.length>C[C.length-1];){if(E.childNodes.length>1&&C.length>1){E=E.childNodes[C[C.length-2]];break}E=E.childNodes[C[C.length-1]],C.pop()}if("BR"!==t[i].nodeName){for(;1===E.nodeType&&E.childNodes.length>0;)E=E.childNodes[0];if(3!==E.nodeType||o&&""===E.nodeValue){var L=document.createElement("div");L.innerHTML="&#8203;",3!==E.nodeType?(E.insertBefore(L.firstChild,E.firstChild),t[i]=E.firstChild):(E.parentNode.insertBefore(L.firstChild,E),t[i]=E.previousSibling,E.parentNode.removeChild(E))}else t[i]=E}}}else if(a&&!t[i].contains(n)&&3===t[i].nodeType&&t[i].textContent!==n.textContent){for(var S=t[i].textContent===t[i].wholeText,I=t[i],w=this.GetFormatNode(h,d);I&&I.textContent===I.parentElement.textContent;)I=I.parentElement;if(S&&n.textContent!==I.textContent){var x=[],j=this.getPriorityFormatNode(I,u);return j&&j.textContent===I.textContent&&(I=j),x.push(I),this.applyStyles(x,0,w),t[i]}}if("backgroundcolor"===h&&(f=n.style.fontSize),"fontsize"===h){var O=se(t[i].parentElement,"span[style*=background-color]");g(O)||(y=O.style.backgroundColor)}var z,A=n.getAttribute("style"),k=n.tagName;if("A"===k&&"underline"===h)n.style.textDecoration="none",z=[n];else if(-1!==vp.inlineTags.indexOf(k.toLowerCase())&&a&&"span"!==k.toLocaleLowerCase()){var P=n.style;P.color&&"fontcolor"===h?"A"===n.nodeName?P.color=d:P.color="":P.backgroundColor&&"backgroundcolor"===h?P.backgroundColor="":P.fontSize&&"fontsize"===h?P.fontSize="":P.fontFamily&&"fontname"===h&&(P.fontFamily=""),""===n.getAttribute("style")&&n.removeAttribute("style"),z=[n]}else{z=Iu.unwrap(n),0===i&&(this.isUnwrapped=!0),g(F=t[i].parentElement)||"li"===F.tagName.toLowerCase()||(F=se(F,"li")),g(F)||"li"!==F.tagName.toLowerCase()||F.textContent.trim()!==t[i].textContent.trim()&&F.innerText.split("\n")[0]!==t[i].textContent.trim()?g(F)||"li"!==F.tagName.toLowerCase()||F.textContent.trim()===t[i].textContent.trim()||e.conCatenateTextNode(F,h,"","normal",d):"bold"===h?F.style.fontWeight="normal":"italic"===h?F.style.fontStyle="normal":"fontsize"===h&&(F.style.fontSize="")}if(z[0]&&!a)for(var R=I=z[i]?z[i]:z[0];I&&I.parentElement&&I.parentElement!==u;I){var B=void 0;if(B="SPAN"===n.nodeName?I.parentElement.tagName.toLocaleLowerCase()===n.tagName.toLocaleLowerCase()&&I.parentElement.getAttribute("style")===A:I.parentElement.tagName.toLocaleLowerCase()===n.tagName.toLocaleLowerCase(),I.parentElement&&B&&(I.parentElement.childElementCount>1||l.startOffset>1)){if(R.parentElement&&R.parentElement.tagName.toLocaleLowerCase()===n.tagName.toLocaleLowerCase()&&l.startOffset===l.endOffset&&1!==R.nodeType&&!g(R.textContent)&&R.parentElement.childElementCount>1&&(l.setStart(R,0),l.setEnd(R,R.textContent.length),c.SplitNode(l,R.parentElement,!1)),"span"===I.parentElement.tagName.toLocaleLowerCase()&&"underline"===n.style.textDecoration&&"underline"!==I.parentElement.style.textDecoration){I=I.parentElement;continue}Iu.unwrap(I.parentElement),I=g(I.parentElement)||m.isBlockNode(I.parentElement)?I.parentElement:R}else I=I.parentElement}if(z.length>0&&a){for(var H=0;H<z.length;H++){if(3!==z[H].nodeType||z[H].textContent&&z[H].textContent.trim().length>0)""!==d&&"transparent"!==d&&(z[H]=Iu.Wrap(z[H],this.GetFormatNode(h,d,k,A))),g(F=t[i].parentElement)||"li"===F.tagName.toLowerCase()||(F=se(F,"li")),g(F)||"li"!==F.tagName.toLowerCase()||F.textContent.trim()!==t[i].textContent.trim()||"fontname"===h&&(F.style.fontFamily=d),g(F)||"li"!==F.tagName.toLowerCase()||F.textContent.trim()===t[i].textContent.trim()||F.removeAttribute("style"),z[H].textContent===b&&(0===H?l.setStartBefore(z[H]):H===z.length-1&&l.setEndAfter(z[H]))}var U=t[i].parentElement;if(g(f)||""===f||(U.style.fontSize=f),g(y)||""===y||(U.style.backgroundColor=y),"fontsize"===h||"fontcolor"===h||"fontname"===h){for(var F=t[i].parentElement,Y=t[i].parentElement;!g(Y)&&"li"!==Y.tagName.toLowerCase();)F=Y=Y.parentElement;H=i;for(var V="";H>=0&&!g(F)&&"li"===F.tagName.toLowerCase()&&F.contains(t[H])&&F.textContent.replace("/​/g","").trim().includes(t[H].textContent.trim());)V=t[H].textContent+V,H--;var Q=!1,q=0,W=!1;if(!g(F)&&F.childNodes)for(var _=0;_<F.childNodes.length;_++)"OL"!==F.childNodes[_].nodeName&&"UL"!==F.childNodes[_].nodeName||(q++,Q=!0);if(g(F)||"li"!==F.tagName.toLowerCase()||F.textContent.split("​").join("").trim()!==V.split("​").join("").trim()){if(!g(F)&&"li"===F.tagName.toLowerCase()&&Q){if(Q&&q>0)for(var G=0;G<F.childNodes.length;G++)t[i].textContent===F.childNodes[G].textContent&&t[i].textContent===M&&F.textContent.replace("/​/g","").trim().includes(V.split("​").join("").trim())&&(W=!0);if(W){for(var X=0;X<F.childNodes.length;X++)"OL"!==F.childNodes[X].nodeName&&"UL"!==F.childNodes[X].nodeName||F.childNodes[X].removeAttribute("style");"fontsize"===h?F.style.fontSize=d:"fontname"===h?F.removeAttribute("style"):(F.style.color=d,F.style.textDecoration="inherit")}}}else"fontsize"===h?F.style.fontSize=d:"fontname"===h?F.removeAttribute("style"):(F.style.color=d,F.style.textDecoration="inherit")}}return t[i]},e.insertFormat=function(t,i,n,o,r,s,a,l,c,h,d,p,u,m,f){if(r)if("uppercase"!==d&&"lowercase"!==d){y=this.getInsertNode(t,c,d,p);i[n]=y.firstChild,h.position=1}else h.position=c.startOffset;else if(null===o&&a||l){if(s||"BR"===i[n].nodeName||(i[n]=h.GetSpliceNode(c,i[n]),i[n].textContent=h.TrimLineBreak(i[n].textContent)),"uppercase"===d||"lowercase"===d)i[n].textContent="uppercase"===d?i[n].textContent.toLocaleUpperCase():i[n].textContent.toLocaleLowerCase();else if(!0!==l||""!==p){var y=this.GetFormatNode(d,p);if("formatPainter"===p||l){for(var v=i[n].parentElement,b=i[n].parentElement;!g(b)&&"li"!==b.tagName.toLowerCase();)v=b=b.parentElement;if("fontcolor"===d||"fontname"===d||"fontsize"===d){var M=i[n].parentElement;if(!g(M)&&M.childNodes)for(var N=0;N<M.childNodes.length;N++){if(this.concatenateTextExcludingList(i,n)===i[n].textContent){var C=void 0;if("LI"===M.tagName?C=M:M.closest("li")&&(C=M.closest("li")),!g(C))switch(d){case"fontcolor":C.style.color=p;break;case"fontname":C.style.fontFamily=p;break;case"fontsize":C.style.fontSize=p}}var E=M.childNodes[N];if("OL"===E.tagName||"UL"===E.tagName)switch(d){case"fontcolor":E.style.color="initial";break;case"fontname":E.style.fontFamily="initial";break;case"fontsize":E.style.fontSize="initial"}}}if(g(v)||"li"!==v.tagName.toLowerCase()||v.textContent.trim()!==i[n].textContent.trim()||("fontsize"===d?v.style.fontSize=p:"fontcolor"===d?(v.style.color=p,v.style.textDecoration="inherit"):"fontname"===d&&(v.style.fontFamily=p)),"formatPainter"===p)return this.insertFormatPainterElem(i,n,c,h,u,m);var D=i[n],T=this.getPriorityFormatNode(D,f);if(!g(T)||l){var L=g(T)?D:T;if(L=g(T)||""===T.style.fontSize?L:L.firstChild,g(T)||"fontsize"===d)for(;L;){var S=L.parentElement.textContent.trim()===i[n].textContent.trim(),I=L.parentElement;if(m.isBlockNode(I)||!S||"SPAN"===I.nodeName&&I.classList.contains("e-img-inner"))break;L=I}var w=[];if("fontcolor"===d){var x=se(i[n].parentElement,"A");g(x)||x.firstChild.textContent.trim()!==i[n].textContent.trim()||(L=i[n])}i[n].textContent.trim()!==L.textContent.trim()&&(L=i[n]),w[0]=L,this.applyStyles(w,0,y),g(v)||"li"!==v.tagName.toLowerCase()||v.textContent.trim()===i[n].textContent.trim()||e.conCatenateTextNode(v,d,v.textContent,d,p)}else i[n]=this.applyStyles(i,n,y)}else{v=i[n].parentElement;i[n]=this.applyStyles(i,n,y),g(v)||"li"===v.tagName.toLowerCase()||(v=se(v,"li")),g(v)||"li"!==v.tagName.toLowerCase()||v.textContent.trim()!==i[n].textContent.trim()&&v.innerText.split("\n")[0]!==i[n].textContent.trim()?g(v)||"li"!==v.tagName.toLowerCase()||v.textContent.trim()===i[n].textContent.trim()||e.conCatenateTextNode(v,d,v.textContent,d):"bold"===d?v.style.fontWeight="bold":"italic"===d&&(v.style.fontStyle="italic")}}}else s||(i[n]=h.GetSpliceNode(c,i[n]));return i[n]},e.applyStyles=function(e,t,i){return"BR"===e[t].nodeName&&"BR"===this.enterAction||(e[t]=t===e.length-1||"BR"===e[t].nodeName?Iu.Wrap(e[t],i):Iu.WrapBefore(e[t],i,!0),e[t]=this.getChildNode(e[t],i)),e[t]},e.getPriorityFormatNode=function(e,t){var i,n,o,r=new vp,s=r.getFormattedNode(e,"fontsize",t);return g(s)?g(n=r.getFormattedNode(e,"backgroundcolor",t))?g(o=r.getFormattedNode(e,"fontname",t))?g(i=r.getFormattedNode(e,"fontcolor",t))?null:i:o:n:s},e.getInsertNode=function(e,t,i,n){var o=this.GetFormatNode(i,n);if(o.innerHTML="&#8203;",Q.isIE){var r=e.createDocumentFragment();r.appendChild(o),t.insertNode(r)}else t.insertNode(o);return o},e.getChildNode=function(e,t){return null==e&&(t.innerHTML="&#8203;",e=t.firstChild),e},e.isSafari=function(){var e=navigator.userAgent.toLowerCase();return navigator.vendor.toLowerCase().includes("apple")&&e.includes("safari")&&!e.includes("chrome")},e.applySelection=function(e,t,i,n,o){if(1!==e.length||o)if(1===e.length&&o)t.startContainer=t.getNodeArray(e[n],!0),t.endContainer=t.startContainer,t.startOffset=i.position,t.endOffset=i.position;else if(this.isSafari()&&!o){var r=t.range.startContainer.childNodes[t.range.startOffset];if(r instanceof HTMLElement&&!r.isContentEditable)return t}else 0===n?(t.startContainer=t.getNodeArray(e[n],!0),t.startOffset=0):n===e.length-1&&(t.endContainer=t.getNodeArray(e[n],!1),t.endOffset=e[n].textContent.length);else t.startContainer=t.getNodeArray(e[n],!0),t.endContainer=t.startContainer,t.startOffset=0,t.endOffset=e[n].textContent.length;return t},e.GetFormatNode=function(e,t,i,n){var o;switch(e){case"bold":return document.createElement("strong");case"italic":return document.createElement("em");case"underline":return o=document.createElement("span"),this.updateStyles(o,i,n),o.style.textDecoration="underline",o;case"strikethrough":return o=document.createElement("span"),this.updateStyles(o,i,n),o.style.textDecoration="line-through",o;case"superscript":return document.createElement("sup");case"subscript":return document.createElement("sub");case"fontcolor":return o=document.createElement("span"),this.updateStyles(o,i,n),o.style.color=t,o.style.textDecoration="inherit",o;case"fontname":return o=document.createElement("span"),this.updateStyles(o,i,n),o.style.fontFamily=t,o;case"fontsize":return o=document.createElement("span"),this.updateStyles(o,i,n),o.style.fontSize=t,o;case"inlinecode":return document.createElement("code");default:return o=document.createElement("span"),this.updateStyles(o,i,n),o.style.backgroundColor=t,o}},e.updateStyles=function(e,t,i){null!==i&&"SPAN"===t&&e.setAttribute("style",i)},e.insertFormatPainterElem=function(e,t,i,n,o,r){var s=r.isBlockNode(e[t].parentElement)?e[t]:e[t].parentElement;if(!r.isBlockNode(s))for(;s.textContent.trim()===s.parentElement.textContent.trim()&&!r.isBlockNode(s.parentElement);)s=s.parentElement;g(s)||1!==s.nodeType||s.classList.contains("e-rte-img-caption")||s.classList.contains("e-img-inner")||this.formatPainterCleanup(t,e,s,i,n,r);var a=o.element;if(!g(a)){var l=a.cloneNode(!0),c=l.querySelectorAll(o.lastChild.nodeName),h=void 0;c.length>0?h=c[c.length-1]:g(l)||l.nodeName!==o.lastChild.nodeName||(h=l),h.textContent=e[t].textContent;var d=h.childNodes[0];e[t]=Iu.Wrap(e[t],l),e[t].textContent="",e[t]=d}return e[t]},e.formatPainterCleanup=function(e,t,i,n,o,r){var s=["A","AUDIO","IMG","VIDEO","IFRAME"];if(0===e&&i.textContent.trim()!==t[e].textContent.trim()){o.SplitNode(n,i,!0);for(var a=t[e].parentElement.childNodes,l=0;l<a.length;l++)if(a[l].textContent.trim()===t[l].textContent.trim()){i.parentNode.insertBefore(a[l],i);break}for(var c=i.parentElement.childNodes,h=0;h<c.length;h++)""!==c[h].textContent.trim()&&0!==c[h].textContent.length||160===c[h].textContent.charCodeAt(0)||ee(c[h])}else if(i.textContent.trim()!==t[e].textContent.trim())i.parentElement.insertBefore(t[e],i);else for(;!g(i)&&3!==i.nodeType&&!r.isBlockNode(i);){var d=void 0;for(l=0;l<i.childNodes.length;l++){var p=i.childNodes[l];0!==p.textContent.trim().length&&3!==p.nodeType&&(d=i.childNodes[l])}-1===s.indexOf(i.tagName)&&Iu.unwrap(i),i=d}},e.concatenateTextExcludingList=function(e,t){var i="",n="#text"===e[t].nodeName?se(e[t].parentElement,"li"):se(e[t],"li");if(!g(n))for(var o=0;o<n.childNodes.length;o++){var r=n.childNodes[o];(3===r.nodeType||1===r.nodeType&&"OL"!==r.tagName&&"UL"!==r.tagName)&&(i+=r.textContent)}return i},e.conCatenateTextNode=function(t,i,n,o,r){var s="",a="";switch(i){case"bold":t.querySelectorAll("strong").forEach((function(e){s+=e.textContent})),s===n&&(t.style.fontWeight=o);break;case"italic":t.querySelectorAll("em").forEach((function(e){s+=e.textContent})),s===n&&(t.style.fontStyle=o);break;case"fontcolor":t.querySelectorAll("span").forEach((function(t){a=t.style.color,e.hasColorsEqual(a,r)&&(s+=t.textContent)})),g(s)||g(n)||""===s||""===n||s.replace(/\s+/g,"")!==n.replace(/\s+/g,"")||(t.style.color=r,t.style.textDecoration="inherit");break;case"fontsize":t.querySelectorAll("span").forEach((function(e){e.style.getPropertyValue("font-size")===r&&(s+=e.textContent)})),g(s)||g(n)||""===s||""===n||s.replace(/\s+/g,"")!==n.replace(/\s+/g,"")||(t.style.fontSize=r);break;case"fontname":t.querySelectorAll("span").forEach((function(e){e.style.getPropertyValue("font-family").replace(/ /g,"")===r&&(s+=e.textContent)})),g(s)||g(n)||""===s||""===n||s.replace(/\s+/g,"")!==n.replace(/\s+/g,"")||(t.style.fontFamily=r)}},e.hasColorsEqual=function(e,t){return g(e)||g(t)||""===e.trim()||""===t.trim()?e===t:(e.startsWith("rgb(")&&(e=e.replace("rgb(","rgba(").slice(0,-1)+",1)"),t.startsWith("rgb(")&&(t=t.replace("rgb(","rgba(").slice(0,-1)+",1)"),e.replace(/\s+/g,"")===t.replace(/\s+/g,""))},e.enterAction="P",e.isUnwrapped=!1,e.isWrapped=!1,e}(),cm=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(Qp,this.applySelection,this),this.parent.observer.on(uu,this.keyDownHandler,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(Qp,this.applySelection),this.parent.observer.off(uu,this.keyDownHandler),this.parent.observer.off(Su,this.destroy)},e.prototype.keyDownHandler=function(e){(e.event.ctrlKey||e.event.metaKey)&&["bold","italic","underline","strikethrough","superscript","subscript","uppercase","lowercase","inlinecode"].indexOf(e.event.action)>-1&&(e.event.preventDefault(),lm.applyFormat(this.parent.currentDocument,e.event.action,this.parent.editableElement,e.enterAction,this.parent.tableCellSelection),this.callBack(e,e.event.action))},e.prototype.applySelection=function(e){lm.applyFormat(this.parent.currentDocument,e.subCommand.toLocaleLowerCase(),this.parent.editableElement,e.enterAction,this.parent.tableCellSelection,e.value,e.selector),this.callBack(e,e.subCommand)},e.prototype.callBack=function(e,t){e.callBack&&e.callBack({requestType:t,event:e.event,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.destroy=function(){this.removeEventListener()},e}(),hm=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(qp,this.applyHtml,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(qp,this.applyHtml),this.parent.observer.off(Su,this.destroy)},e.prototype.applyHtml=function(e){if(xu.Insert(this.parent.currentDocument,e.value,this.parent.editableElement,!0,e.enterAction),"pasteCleanup"===e.subCommand){var t=this.parent.editableElement.querySelectorAll(".pasteContent_RTE"),i=[].slice.call(t),n=this.parent.editableElement.querySelectorAll(".pasteContent_Img"),o=[].slice.call(n);e.callBack({requestType:e.subCommand,editorMode:"HTML",elements:i,imgElem:o})}else e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.destroy=function(){this.removeEventListener()},e}(),dm=function(){function e(){}return e.clear=function(e,t,i,n,o){this.domNode=new cu(t,e),this.defaultTag="P"===i?"p":"div";var r=new bm(t),s=new wu,a=r.getRange(e),l=a.collapsed?r.getSelectionNodeCollection(a):r.getSelectionNodeCollectionBr(a),c=r.save(a,e),h=!1;if(a.collapsed&&"ClearFormat"!==o&&(h=!0,a=s.GetCursorRange(e,a,l[0])),!a.collapsed){var d=void 0;if(d=l.length>0&&"BR"===l[0].nodeName&&se(l[0],"table")?s.GetSpliceNode(a,se(l[0],"table")):s.GetSpliceNode(a,l[l.length>1&&"IMG"===l[0].nodeName?1:0]),1===l.length)r.setSelectionContents(e,d),a=r.getRange(e);else if(l.length>1){for(var p=1,u=l[l.length-p];l.length<=p&&"BR"===l[l.length-p].nodeName;)p++,u=l[l.length-p];var m=s.GetSpliceNode(a,u);m&&r.setSelectionText(e,d,m,0,3===m.nodeType?m.textContent.length:m.childNodes.length),a=r.getRange(e)}var g=r.getNodeCollection(a),f=g.slice();this.clearInlines(r.getSelectionNodes(f),f,r.getRange(e),s,t),this.reSelection(e,c,g),a=r.getRange(e);var y=(g=r.getNodeCollection(a)).slice();this.clearBlocks(e,y,t,s,r),eu()&&tu(t,n),this.reSelection(e,c,g)}h&&r.setCursorPoint(e,a.endContainer,a.endOffset)},e.reSelection=function(e,t,i){var n=t.getInsertNodes(i);t.startContainer=t.getNodeArray(n[0],!0,e),t.startOffset=0,t.endContainer=t.getNodeArray(n[n.length-1],!1,e);var o=n[n.length-1];t.endOffset=3===o.nodeType?o.textContent.length:o.childNodes.length,t.restore()},e.clearBlocks=function(e,t,i,n,o){for(var r=[],s=0;s<t.length;s++)this.BLOCK_TAGS.indexOf(t[s].nodeName.toLocaleLowerCase())>-1&&-1===r.indexOf(t[s])?r.push(t[s]):this.BLOCK_TAGS.indexOf(t[s].parentNode.nodeName.toLocaleLowerCase())>-1&&-1===r.indexOf(t[s].parentNode)&&i!==t[s].parentNode&&r.push(t[s].parentNode);r=this.spliceParent(r,t)[0],r=this.removeParent(r),this.unWrap(e,r,n,o)},e.spliceParent=function(e,t){for(var i=0;i<e.length;i++)for(var n=e[i].childNodes.length,o=0;o<n;o++)if(t.indexOf(e[i].childNodes[o])>0&&e[i].childNodes[o].childNodes.length>0&&(t=this.spliceParent([e[i].childNodes[o]],t)[1]),t.indexOf(e[i].childNodes[o])<=-1&&""!==e[i].childNodes[o].textContent.trim()){for(var r=0;r<n;r++)t.indexOf(e[i].childNodes[r])>-1&&t.splice(t.indexOf(e[i].childNodes[r]),1);o=e[i].childNodes.length;var s=e.indexOf(e[i].parentNode),a=t.indexOf(e[i].parentNode);s>-1&&e.splice(s,1),a>-1&&t.splice(a,1);var l=t.indexOf(e[i]);l>-1&&t.splice(l,1),e.splice(i,1),i--}return[e,t]},e.removeChild=function(e,t){var i=t.childNodes.length;if(i>0)for(var n=0;n<i;n++)e.indexOf(t.childNodes[n])>-1&&(e=this.removeChild(e,t.childNodes[n])).splice(e.indexOf(t.childNodes[n]),1);return e},e.removeParent=function(e){for(var t=0;t<e.length;t++)e.indexOf(e[t].parentNode)>-1&&((e=this.removeChild(e,e[t])).splice(t,1),t--);return e},e.unWrap=function(e,t,i,n){for(var o=0;o<t.length;o++){t[o]=se(t[o],"li")&&"UL"!==t[o].nodeName&&"OL"!==t[o].nodeName?se(t[o],"li"):t[o],this.NONVALID_TAGS.indexOf(t[o].nodeName.toLowerCase())>-1&&t[o].parentNode&&this.NONVALID_PARENT_TAGS.indexOf(t[o].parentNode.nodeName.toLowerCase())>-1&&(n.setSelectionText(e,t[o],t[o],0,t[o].childNodes.length),Iu.unwrap(i.GetSpliceNode(n.getRange(e),t[o].parentNode)));var r=se(t[o],"blockquote");if("blockquote"!==t[o].nodeName.toLocaleLowerCase()&&!g(r)&&r.textContent===t[o].textContent){var s=this.removeParent([r]);this.unWrap(e,s,i,n)}if("p"!==t[o].nodeName.toLocaleLowerCase()){!(this.NONVALID_PARENT_TAGS.indexOf(t[o].nodeName.toLowerCase())<0)||("blockquote"===t[o].nodeName.toLocaleLowerCase()||"li"===t[o].nodeName.toLocaleLowerCase())&&this.IGNORE_PARENT_TAGS.indexOf(t[o].childNodes[0].nodeName.toLocaleLowerCase())>-1||1===t[o].childNodes.length&&"p"===t[o].childNodes[0].nodeName.toLocaleLowerCase()||Iu.Wrap(t[o],e.createElement(this.defaultTag));var a=Iu.unwrap(t[o]);1===a.length&&"p"===a[0].parentNode.nodeName.toLocaleLowerCase()&&(Iu.Wrap(t[o],e.createElement(this.defaultTag)),Iu.unwrap(t[o]));for(var l=0;l<a.length;l++)if(this.NONVALID_TAGS.indexOf(a[l].nodeName.toLowerCase())>-1)this.unWrap(e,[a[l]],i,n);else if(this.BLOCK_TAGS.indexOf(a[l].nodeName.toLocaleLowerCase())>-1&&"p"!==a[l].nodeName.toLocaleLowerCase()){s=this.removeParent([a[l]]);this.unWrap(e,s,i,n)}else this.BLOCK_TAGS.indexOf(a[l].nodeName.toLocaleLowerCase())>-1&&"p"===a[l].nodeName.toLocaleLowerCase()?("p"===a[l].parentNode.nodeName.toLocaleLowerCase()&&Iu.unwrap(a[l].parentNode),Iu.Wrap(a[l],e.createElement(this.defaultTag)),Iu.unwrap(a[l])):this.BLOCK_TAGS.indexOf(a[l].nodeName.toLocaleLowerCase())>-1&&a[l].parentNode.nodeName.toLocaleLowerCase()===a[l].nodeName.toLocaleLowerCase()&&Iu.unwrap(a[l])}else Iu.Wrap(t[o],e.createElement(this.defaultTag)),Iu.unwrap(t[o])}},e.clearInlines=function(e,t,i,n,o){for(var r=0;r<e.length;r++){for(var s=e[r],a=void 0;!this.domNode.isBlockNode(s)&&s.parentElement&&!s.parentElement.classList.contains("e-img-inner");)a=s,s=s.parentElement;a&&vp.inlineTags.indexOf(a.nodeName.toLocaleLowerCase())>-1&&(n.GetSpliceNode(i,a),this.removeInlineParent(a))}},e.removeInlineParent=function(e){for(var t=Iu.unwrap(e),i=0;i<t.length;i++)1===t[i].parentNode.childNodes.length&&!t[i].parentNode.classList.contains("e-img-inner")&&vp.inlineTags.indexOf(t[i].parentNode.nodeName.toLocaleLowerCase())>-1?this.removeInlineParent(t[i].parentNode):vp.inlineTags.indexOf(t[i].nodeName.toLocaleLowerCase())>-1&&this.removeInlineParent(t[i])},e.BLOCK_TAGS=["address","article","aside","blockquote","details","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","li","main","nav","noscript","ol","p","pre","section","ul"],e.NONVALID_PARENT_TAGS=["thead","tbody","ul","ol","table","tfoot","tr"],e.IGNORE_PARENT_TAGS=["ul","ol","table"],e.NONVALID_TAGS=["thead","tbody","figcaption","td","tr","th","tfoot","figcaption","li"],e.defaultTag="p",e}(),pm=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(_p,this.applyClear,this),this.parent.observer.on(uu,this.onKeyDown,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(_p,this.applyClear),this.parent.observer.off(uu,this.onKeyDown),this.parent.observer.off(Su,this.destroy)},e.prototype.onKeyDown=function(e){if("clear-format"===e.event.action)this.applyClear({subCommand:"ClearFormat",callBack:e.callBack,enterAction:e.enterAction}),e.event.preventDefault()},e.prototype.applyClear=function(e){"ClearFormat"===e.subCommand&&(dm.clear(this.parent.currentDocument,this.parent.editableElement,e.enterAction,e.selector,e.subCommand),e.callBack&&e.callBack({requestType:e.subCommand,event:e.event,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)}))},e.prototype.destroy=function(){this.removeEventListener()},e}(),um=function(){function e(e,t){this.undoRedoStack=[],this.parent=e,this.undoRedoSteps=g(t)?30:t.undoRedoSteps,this.undoRedoTimer=g(t)?300:t.undoRedoTimer,this.addEventListener()}return e.prototype.addEventListener=function(){this.debounceListener=v(this.keyUp,this.undoRedoTimer),this.parent.observer.on(gu,this.debounceListener,this),this.parent.observer.on(uu,this.keyDown,this),this.parent.observer.on(du,this.onAction,this),this.parent.observer.on(yu,this.onPropertyChanged,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.onPropertyChanged=function(e){for(var t=0,i=Object.keys(e.newProp);t<i.length;t++){switch(i[t]){case"undoRedoSteps":this.undoRedoSteps=e.newProp.undoRedoSteps;break;case"undoRedoTimer":this.undoRedoTimer=e.newProp.undoRedoTimer}}},e.prototype.removeEventListener=function(){this.parent.observer.off(gu,this.keyUp),this.parent.observer.off(uu,this.keyDown),this.parent.observer.off(du,this.onAction),this.parent.observer.off(yu,this.onPropertyChanged),this.parent.observer.off(Su,this.destroy),this.debounceListener=null},e.prototype.onAction=function(e){"Undo"===e.subCommand?this.undo(e):this.redo(e)},e.prototype.destroy=function(){this.removeEventListener(),this.element=null,this.steps=null,this.undoRedoStack=[],this.undoRedoSteps=null,this.undoRedoTimer=null},e.prototype.keyDown=function(e){var t=e.event;switch(t.action){case"undo":t.preventDefault(),this.undo(e);break;case"redo":t.preventDefault(),this.redo(e)}},e.prototype.keyUp=function(e){17===e.event.keyCode||e.event.ctrlKey||this.saveData(e)},e.prototype.getTextContentFromFragment=function(e){for(var t="",i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];n.nodeType===Node.TEXT_NODE?t+=n.textContent:n.nodeType===Node.ELEMENT_NODE&&(t+=this.getTextContentFromFragment(n))}return t},e.prototype.isElementStructureEqual=function(e,t){if(e.childNodes.length!==t.childNodes.length)return!1;for(var i=0;i<e.childNodes.length;i++){var n=e.childNodes[i],o=t.childNodes[i];if(!n||!o)return!1;if(n.nodeType!==o.nodeType)return!1;if(n.outerHTML!==o.outerHTML)return!1}return!0},e.prototype.saveData=function(e){if(this.parent.currentDocument){for(var t=new bm(this.parent.editableElement).getRange(this.parent.currentDocument),i=this.parent.editableElement===t.startContainer.parentElement?t.startContainer.parentElement:t.startContainer,n=i.childNodes.length-1;n>=0;n--)!g(i.childNodes[n])&&"#text"===i.childNodes[n].nodeName&&0===i.childNodes[n].textContent.length&&"IMG"!==i.childNodes[n].nodeName&&"BR"!==i.childNodes[n].nodeName&&i.childNodes[n].nodeName&&ee(i.childNodes[n]);t=new bm(this.parent.editableElement).getRange(this.parent.currentDocument);for(var o=new bm(this.parent.editableElement).save(t,this.parent.currentDocument),r=this.parent.editableElement.cloneNode(!0),s=document.createDocumentFragment();r.firstChild;)s.appendChild(r.firstChild);var a={text:s,range:o};this.undoRedoStack.length>=this.steps&&(this.undoRedoStack=this.undoRedoStack.slice(0,this.steps+1)),this.undoRedoStack.length>1&&this.undoRedoStack[this.undoRedoStack.length-1].range.range.collapsed===t.collapsed&&this.undoRedoStack[this.undoRedoStack.length-1].range.startOffset===o.range.startOffset&&this.undoRedoStack[this.undoRedoStack.length-1].range.endOffset===o.range.endOffset&&this.undoRedoStack[this.undoRedoStack.length-1].range.range.startContainer===o.range.startContainer&&this.getTextContentFromFragment(this.undoRedoStack[this.undoRedoStack.length-1].text).trim()===this.getTextContentFromFragment(a.text).trim()&&this.isElementStructureEqual(this.undoRedoStack[this.undoRedoStack.length-1].text,a.text)||(this.undoRedoStack.push(a),this.steps=this.undoRedoStack.length-1,this.steps>this.undoRedoSteps&&(this.undoRedoStack.shift(),this.steps--),e&&e.callBack&&e.callBack())}},e.prototype.undo=function(e){if(this.steps>0){var t=this.undoRedoStack[this.steps-1].range,i=this.undoRedoStack[this.steps-1].text;this.parent.editableElement.innerHTML="",this.parent.editableElement.appendChild(i.cloneNode(!0)),this.parent.editableElement.focus(),iu(this.parent.currentDocument,this.parent.editableElement),eu()&&tu(this.parent.editableElement,e.selector),t.restore(),this.steps--,e.callBack&&e.callBack({requestType:"Undo",editorMode:"HTML",range:t,elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument),event:e.event})}},e.prototype.redo=function(e){if(null!=this.undoRedoStack[this.steps+1]){var t=this.undoRedoStack[this.steps+1].range,i=this.undoRedoStack[this.steps+1].text;this.parent.editableElement.innerHTML="",this.parent.editableElement.appendChild(i.cloneNode(!0)),this.parent.editableElement.focus(),iu(this.parent.currentDocument,this.parent.editableElement),eu()&&tu(this.parent.editableElement,e.selector),t.restore(),this.steps++,e.callBack&&e.callBack({requestType:"Redo",editorMode:"HTML",range:t,elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument),event:e.event})}},e.prototype.getUndoStatus=function(){var e={undo:!1,redo:!1};return this.steps>0&&(e.undo=!0),null!=this.undoRedoStack[this.steps+1]&&(e.redo=!0),e},e.prototype.getCurrentStackIndex=function(){return this.steps},e}(),mm=function(){function e(e){this.olData=["decimal","decimal-leading-zero","lower-alpha","lower-roman","upper-alpha","upper-roman","lower-greek"],this.ulData=["disc","square","circle","disc","square","circle"],this.ignorableNodes=["A","APPLET","B","BLOCKQUOTE","BR","BUTTON","CENTER","CODE","COL","COLGROUP","DD","DEL","DFN","DIR","DIV","DL","DT","EM","FIELDSET","FONT","FORM","FRAME","FRAMESET","H1","H2","H3","H4","H5","H6","HR","I","IMG","IFRAME","INPUT","INS","LABEL","LI","OL","OPTION","P","PARAM","PRE","Q","S","SELECT","SPAN","STRIKE","STRONG","SUB","SUP","TABLE","TBODY","TD","TEXTAREA","TFOOT","TH","THEAD","TITLE","TR","TT","U","UL"],this.blockNode=["div","p","h1","h2","h3","h4","h5","h6","address","blockquote","button","center","dd","dir","dl","dt","fieldset","frameset","hr","iframe","isindex","li","map","menu","noframes","noscript","object","ol","pre","table","tbody","td","tfoot","th","thead","tr","ul","header","article","nav","footer","section","aside","main","figure","figcaption"],this.borderStyle=["border-top","border-right","border-bottom","border-left"],this.upperRomanNumber=["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII","XIII","XIV","XV","XVI","XVII","XVIII","XIX","XX"],this.lowerRomanNumber=["i","ii","iii","iv","v","vi","vii","viii","ix","x","xi","xii","xiii","xiv","xv","xvi","xvii","xviii","xix","xx"],this.lowerGreekNumber=["α","β","γ","δ","ε","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ρ","σ","τ","υ","φ","χ","ψ","ω"],this.removableElements=["o:p","style","w:sdt"],this.listContents=[],this.cropImageDimensions=[],this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(bu,this.wordCleanup,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(bu,this.wordCleanup),this.parent.observer.off(Su,this.destroy)},e.prototype.wordCleanup=function(e){var t=g(e.allowedStylePropertiesArray)?[]:e.allowedStylePropertiesArray,i=[],n=e.args.clipboardData.getData("text/HTML"),o=e.args.clipboardData.getData("text/rtf"),r=_("p");r.setAttribute("id","MSWord-Content"),r.innerHTML=n,this.addDoubleBr(r);var s=/style='mso-width-source:/i,a=this.findSource(r);/class='?Mso|style='[^ ]*\bmso-/i.test(n)||/class="?Mso|style="[^ ]*\bmso-/i.test(n)||/(class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument)/gi.test(n)||s.test(n)?(n=n.replace(/<img[^>]+>/i,""),this.addListClass(r),g((i=this.cleanUp(r,i))[0])||"UL"===i[0].parentElement.tagName||"OL"===i[0].parentElement.tagName||this.listConverter(i),this.imageConversion(r,o),this.cleanList(r,"UL"),this.cleanList(r,"OL"),this.styleCorrection(r,t),this.removingComments(r),this.removeUnwantedElements(r),this.removeEmptyElements(r),this.removeEmptyAnchorTag(r),this.breakLineAddition(r),this.processMargin(r),this.removeClassName(r),s.test(n)&&this.addTableBorderClass(r),e.callBack(r.innerHTML,this.cropImageDimensions,a)):(a===Xp[2]&&this.handleOneNoteContent(r),this.removeEmptyMetaTags(r),e.callBack(r.innerHTML,null,a))},e.prototype.addDoubleBr=function(e){var t=e.querySelector(".Apple-interchange-newline");if(!g(t)&&-1!==Q.userAgent.indexOf("Chrome")&&"P"===t.parentElement.nodeName&&e!==t.parentElement)for(var i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];if(n.nodeType===Node.COMMENT_NODE&&n.nodeValue.includes("StartFragment")){var o=document.createElement("p");o.innerHTML="<br>";var r=t.parentElement.style.cssText,s=(o.getAttribute("style")||"")+r;o.setAttribute("style",s),e.insertBefore(o,n.nextSibling),ee(t);break}}},e.prototype.cleanList=function(e,t){for(var i=e.querySelectorAll(t+" div"),n=i.length-1;n>=0;n--){for(var o=i[n].parentNode;i[n].firstChild;)o.insertBefore(i[n].firstChild,i[n]);var r=this.findClosestListElem(i[n]);r&&this.insertAfter(i[n],r)}},e.prototype.insertAfter=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},e.prototype.findClosestListElem=function(e){for(var t;!g(e);)e=g(e.closest("ul"))||"UL"===e.tagName?"OL"!==e.tagName?e.closest("ol"):null:e.closest("ul"),t=g(e)?t:e;return t},e.prototype.addListClass=function(e){for(var t=e.querySelectorAll("*"),i=0;i<t.length;i++)!g(t[i].getAttribute("style"))&&t[i].getAttribute("style").replace(/ /g,"").replace("\n","").indexOf("mso-list:l")>=0&&-1===t[i].className.toLowerCase().indexOf("msolistparagraph")&&"H"!==t[i].tagName.charAt(0)&&"LI"!==t[i].tagName&&"OL"!==t[i].tagName&&"UL"!==t[i].tagName&&t[i].classList.add("msolistparagraph")},e.prototype.addTableBorderClass=function(e){for(var t=e.querySelectorAll("table"),i=!1,n=0;n<t.length;n++){for(var o=0;o<this.borderStyle.length;o++)if(t[n].innerHTML.indexOf(this.borderStyle[o])>=0){i=!0;break}i&&(t[n].classList.add("e-rte-table-border"),i=!1)}},e.prototype.imageConversion=function(e,t){this.checkVShape(e);for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++)!g(i[n].getAttribute("v:shapes"))&&i[n].getAttribute("v:shapes").indexOf("Picture")<0&&i[n].getAttribute("v:shapes").indexOf("Chart")<0&&i[n].getAttribute("v:shapes").indexOf("圖片")<0&&i[n].getAttribute("v:shapes").indexOf("Grafik")<0&&i[n].getAttribute("v:shapes").toLowerCase().indexOf("image")<0&&i[n].getAttribute("v:shapes").indexOf("Graphic")<0&&i[n].getAttribute("v:shapes").indexOf("_x0000_s")<0&&i[n].getAttribute("v:shapes").indexOf("_x0000_i")<0&&i[n].getAttribute("v:shapes").indexOf("img1")<0&&i[n].getAttribute("v:shapes").indexOf("Immagine")<0&&i[n].classList.add("e-rte-image-unsupported"),i[n].removeAttribute("v:shapes");i=e.querySelectorAll("img");var o=[],r=[],s=[],a=new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.)|(blob\:))(\S+))/gi);if(i.length>0){for(n=0;n<i.length;n++)if(!i[n].classList.contains("e-rte-image-unsupported")){o.push(i[n].getAttribute("src"));var l=i[n].getAttribute("src").split("/")[i[n].getAttribute("src").split("/").length-1].split(".")[0]+n;s.push(l)}var c=this.hexConversion(t);for(n=0;n<c.length;n++)r.push({base64Data:g(c[n].hex)?null:this.convertToBase64(c[n]),isCroppedImage:c[n].isCroppedImage}),c[n].isCroppedImage&&this.cropImageDimensions.push({goalWidth:c[n].goalWidth,goalHeight:c[n].goalHeight,cropLength:c[n].cropLength,cropTop:c[n].cropTop,cropR:c[n].cropR,cropB:c[n].cropB});i=e.querySelectorAll("img:not(.e-rte-image-unsupported");for(n=0;n<i.length;n++)o[n].match(a)?i[n].setAttribute("src",o[n]):(g(r[n])||g(r[n].base64Data)?(i[n].removeAttribute("src"),i[n].classList.add("e-rte-image-unsupported")):i[n].setAttribute("src",r[n].base64Data),!g(r[n])&&r[n].isCroppedImage&&i[n].classList.add("e-img-cropped")),i[n].setAttribute("id","msWordImg-"+s[n]);i=e.querySelectorAll(".e-rte-image-unsupported");for(n=0;n<i.length;n++)i[n].removeAttribute("src")}},e.prototype.checkVShape=function(e){for(var t=e.querySelectorAll("*"),i=0;i<t.length;i++)switch(t[i].nodeName){case"V:SHAPETYPE":ee(t[i]);break;case"V:SHAPE":if("V:IMAGEDATA"===t[i].firstElementChild.nodeName){var n=t[i].firstElementChild.getAttribute("src"),o=_("img");o.setAttribute("src",n),t[i].parentElement.insertBefore(o,t[i]),ee(t[i])}}},e.prototype.convertToBase64=function(e){var t=this.conHexStringToBytes(e.hex),i=this.conBytesToBase64(t);return e.type?"data:"+e.type+";base64,"+i:null},e.prototype.conBytesToBase64=function(e){for(var t="",i=e.length,n=0;n<i;n+=3){var o=e.slice(n,n+3),r=o.length,s=[];if(r<3)for(var a=r;a<3;a++)o[a]=0;s[0]=(252&o[0])>>2,s[1]=(3&o[0])<<4|o[1]>>4,s[2]=(15&o[1])<<2|(192&o[2])>>6,s[3]=63&o[2];for(a=0;a<4;a++)t+=a<=r?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(s[a]):"="}return t},e.prototype.conHexStringToBytes=function(e){for(var t=[],i=e.length/2,n=0;n<i;n++)t.push(parseInt(e.substr(2*n,2),16));return t},e.prototype.hexConversion=function(e){var t,i=RegExp,n=new i("\\{\\\\pict[\\s\\S]+?\\\\bliptag-?\\d+(\\\\blipupi-?\\d+)?(\\{\\\\\\*\\\\blipuid\\s?[\\da-fA-F]+)?[\\s\\}]*?"),o=new i("(?:("+n.source+"))([\\da-fA-F\\s]+)\\}","g"),r=e.match(o),s=[];if(!g(r))for(var a=0;a<r.length;a++)if(-1===r[a].indexOf("fIsBullet")||-1!==r[a].indexOf("wzName")){var l=!1,c=0,h=0,d=0,p=0,u=0,m=0;if(n.test(r[a])){if(-1!==r[a].indexOf("\\pngblip"))t="image/png";else if(-1!==r[a].indexOf("\\jpegblip"))t="image/jpeg";else{if(-1===r[a].indexOf("\\emfblip"))continue;t=null}(l=!!(this.extractCropValue("cropl",r[a])>0&&this.extractCropValue("cropt",r[a])>0||this.extractCropValue("cropr",r[a])>0||this.extractCropValue("cropb",r[a])))&&(c=this.extractCropValue("wgoal",r[a]),h=this.extractCropValue("hgoal",r[a]),d=this.extractCropValue("cropl",r[a]),p=this.extractCropValue("cropt",r[a]),u=this.extractCropValue("cropr",r[a]),m=this.extractCropValue("cropb",r[a])),s.push({hex:t?r[a].replace(n,"").replace(/[^\da-fA-F]/g,""):null,type:t,isCroppedImage:l,goalWidth:c,goalHeight:h,cropLength:d,cropTop:p,cropR:u,cropB:m})}}return s},e.prototype.extractCropValue=function(e,t){var i=new RegExp("\\\\pic"+e+"(\\-?\\d+)\\\\").exec(t.replace(/\r\n\\/g,"\\").replace(/\n/g,"\\"))[1];return parseInt(i,10)},e.prototype.removeClassName=function(e){for(var t=e.querySelectorAll("*[class]:not(.e-img-cropped):not(.e-rte-image-unsupported)"),i=0;i<t.length;i++)t[i].removeAttribute("class")},e.prototype.breakLineAddition=function(e){for(var t=e.querySelectorAll("*"),i=0;i<t.length;i++)if(0===t[i].children.length&&"&nbsp;"===t[i].innerHTML&&"&nbsp;"===t[i].innerHTML&&!t[i].closest("li")&&!t[i].closest("td")&&("SPAN"!==t[i].nodeName||"SPAN"===t[i].nodeName&&g(t[i].previousElementSibling)&&g(t[i].nextElementSibling))){var n=this.findDetachElem(t[i]),o=_("br");n.textContent.length>0&&n.textContent.match(/\u00a0/g)&&n.textContent.match(/\u00a0/g).length>0||g(n.parentElement)||(n.parentElement.insertBefore(o,n),ee(n))}},e.prototype.findDetachElem=function(e){return!g(e.parentElement)&&""===e.parentElement.textContent.trim()&&"TD"!==e.parentElement.tagName&&g(e.parentElement.querySelector("img"))?this.findDetachElem(e.parentElement):e},e.prototype.removeUnwantedElements=function(e){var t=e.querySelector("style");g(t)||ee(t);for(var i=e.innerHTML,n=0;n<this.removableElements.length;n++){var o=RegExp,r=new o("<"+this.removableElements[n]+"\\s*[^>]*>","g"),s=new o("</"+this.removableElements[n]+">","g");i=(i=i.replace(r,"")).replace(s,"")}e.innerHTML=i,e.querySelectorAll(":empty")},e.prototype.findDetachEmptyElem=function(e){var t;g(e.parentElement)?t=null:t=e.parentElement.textContent.length>0&&e.parentElement.textContent.match(/\u00a0/g)&&e.parentElement.textContent.match(/\u00a0/g).length>0||""!==e.parentElement.textContent.trim()||"MSWord-Content"===e.parentElement.getAttribute("id")||this.hasParentWithClass(e,"MsoListParagraph")||!g(e.parentElement.querySelector("img"))?e:this.findDetachEmptyElem(e.parentElement);return t},e.prototype.hasParentWithClass=function(e,t){for(var i=e.parentElement;!g(i);){if(i.classList.contains(t))return!0;i=i.parentElement}return!1},e.prototype.removeEmptyElements=function(e){for(var t=e.querySelectorAll(":empty"),i=0;i<t.length;i++){g(t[i].closest("td"))||g(t[i].closest("td").querySelector(".MsoNormal"))||(t[i].innerHTML="-");var n=!0;if("DIV"===t[i].tagName&&(n="none"===t[i].style.borderBottom||""===t[i].style.borderBottom),"IMG"!==t[i].tagName&&"BR"!==t[i].tagName&&"IFRAME"!==t[i].tagName&&"TD"!==t[i].tagName&&"HR"!==t[i].tagName&&n){var o=this.findDetachEmptyElem(t[i]);g(o)||ee(o)}}},e.prototype.removeEmptyMetaTags=function(e){for(var t=e.querySelectorAll("meta:empty"),i=t.length-1;i>=0;i--){var n=t[i];""===n.textContent&&ee(n)}},e.prototype.styleCorrection=function(e,t){var i=e.querySelectorAll("style"),n=[];if(i.length>0){g(i[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi))?i.length>1&&(n=i[1].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi)):n=i[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);var o=g(n)?null:this.findStyleObject(n);if(!g(o)){var r=Object.keys(o),s=r.map((function(e){return o[""+e]}));s=this.removeUnwantedStyle(s,t),this.filterStyles(e,t);for(var a=void 0,l=!1,c=/^(p|div|li)\.(1|10|11)$/,h=0;h<r.length;h++){if(""===r[h].split(".")[0])a=e.getElementsByClassName(r[h].split(".")[1]),l=!0;else{if(1===r[h].split(".").length&&r[h].split(".")[0].indexOf("@")>=0||c.test(r[h]))continue;a=1===r[h].split(".").length&&r[h].split(".")[0].indexOf("@")<0?e.getElementsByTagName(r[h]):e.querySelectorAll(r[h])}for(var d=0;d<a.length;d++){if(!a[d].closest("li")||"p"!==r[h])if(g(M=a[d].getAttribute("style"))||""===M.trim())s[h]=s[h].replace(/text-indent:-.*?;?/g,"").replace(/border:\s*none;?/g,"").trim(),a[d].setAttribute("style",s[h]);else{for(var p=s[h].split(";"),u=0;u<p.length;u++)"border"===p[u].split(":")[0]&&"none"===p[u].split(":")[1]&&(p.splice(u,1),u--);if(!l)for(var m=0;m<p.length;m++){var f=p[m].split(":")[0];M.includes(f+":")&&(p.splice(m,1),m--)}var y=p.join(";")+";"+M;a[d].setAttribute("style",y)}}l=!1}var v=["MsoListParagraphCxSpFirst","MsoListParagraphCxSpMiddle","MsoListParagraphCxSpLast"];for(h=0;h<v.length;h++)if(r.indexOf("li."+v[h])>-1){var b=e.querySelectorAll("ol."+v[h]+", ul."+v[h]);for(d=0;d<b.length;d++){var M;if(!g(M=b[d].getAttribute("style"))&&""!==M.trim()&&""!==b[d].style.marginLeft)for(p=s[r.indexOf("li."+v[h])].split(";"),m=0;m<p.length;m++)if("margin-left".indexOf(p[m].split(":")[0])>=0&&!g(p[m].split(":")[1])&&p[m].split(":")[1].indexOf("in")>=0&&b[d].style.marginLeft.indexOf("in")>=0){var N=parseFloat(p[m].split(":")[1].split("in")[0]),C=parseFloat(b[d].style.marginLeft.split("in")[0]);b[d].style.marginLeft=C-N+"in"}}}}}},e.prototype.filterStyles=function(e,t){for(var i=e.querySelectorAll("*[style]"),n=0;n<i.length;n++){for(var o=i[n].getAttribute("style").split(";"),r="",s=0;s<o.length;s++)t.indexOf(o[s].split(":")[0].trim())>=0&&(r+=o[s]+";");i[n].setAttribute("style",r)}},e.prototype.removeUnwantedStyle=function(e,t){for(var i=0;i<e.length;i++){var n=e[i].split(";");e[i]="";for(var o=0;o<n.length;o++)t.indexOf(n[o].split(":")[0])>=0&&(e[i]+=n[o]+";")}return e},e.prototype.findStyleObject=function(e){for(var t={},i=0;i<e.length;i++){var n=e[i],o=n.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),r=n.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");o=o.replace(/^[\s]|[\s]$/gm,""),r=r.replace(/^[\s]|[\s]$/gm,""),o=o.replace(/\n|\r|\n\r/g,""),r=r.replace(/\n|\r|\n\r/g,"");for(var s=o.split(", "),a=0;a<s.length;a++)t[s[a]]=r}return t},e.prototype.removingComments=function(e){var t=e.innerHTML;t=t.replace(/<!--[\s\S]*?-->/g,""),e.innerHTML=t},e.prototype.cleanUp=function(e,t){for(var i,n=[],o=e.querySelectorAll("*"),r=0;r<o.length;r++)-1===this.ignorableNodes.indexOf(o[r].nodeName)||3===o[r].nodeType&&""===o[r].textContent.trim()?n.push(o[r]):(o[r].className&&-1!==o[r].className.toLowerCase().indexOf("msolistparagraph")&&!g(o[r].getAttribute("style"))&&o[r].getAttribute("style").indexOf("mso-list:")>=0&&(o[r].className.indexOf("MsoListParagraphCxSpFirst")>=0&&t.length>0&&null!==t[t.length-1]&&t.push(null),t.push(o[r])),!i||-1===this.blockNode.indexOf(o[r].nodeName.toLowerCase())||o[r].className&&-1!==o[r].className.toLowerCase().indexOf("msolistparagraph")&&!g(o[r].getAttribute("style"))&&o[r].getAttribute("style").indexOf("mso-list:")>=0||t.push(null),-1!==this.blockNode.indexOf(o[r].nodeName.toLowerCase())&&(i=!!(o[r].className&&-1!==o[r].className.toLowerCase().indexOf("msolistparagraph")&&!g(o[r].getAttribute("style"))&&o[r].getAttribute("style").indexOf("mso-list:")>=0)));return t.length&&null!==t[t.length-1]&&t.push(null),t},e.prototype.listConverter=function(e){for(var t,i,n,o=[],r=[],s="",a="",l=0;l<e.length;l++)if(null!==e[l]){if(e[l].getAttribute("style")&&-1!==e[l].getAttribute("style").indexOf("mso-outline-level")&&e[l].setAttribute("style",e[l].getAttribute("style").replace("mso-outline-level","mso-outline")),t=(s=e[l].getAttribute("style"))&&-1!==s.indexOf("level")?parseInt(s.charAt(s.indexOf("level")+5),null):1,s&&-1!==s.indexOf("mso-list:")){var c=void 0;if(s.match(/mso-list:[^;]+;?/))i=g(c=s.replace(new RegExp("\\n","g"),"").split(" ").join("").match(/mso-list:[^;]+;?/)[0].split(":l"))?null:parseInt(c[1].split("level")[0],10);else i=null}this.listContents=[],this.getListContent(e[l]);var h=void 0,d=void 0,p=void 0,u=void 0;if(!g(this.listContents[0])){if(h=this.listContents[0].trim().length>1?"ol":"ul",d=this.getlistStyleType(this.listContents[0],h),"ol"===h&&(0===l||null===e[l-1])){var m=this.listContents[0].split(".")[0];-1===["A","a","I","i","α","1","01","1-"].indexOf(m)&&("decimal"===d||"decimal-leading-zero"===d?isNaN(parseInt(m,10))||(p=parseInt(m,10)):"upper-alpha"===d?p=m.split(".")[0].charCodeAt(0)-64:"lower-alpha"===d?p=m.split(".")[0].charCodeAt(0)-96:"upper-roman"===d?p=this.upperRomanNumber.indexOf(this.listContents[0].split(".")[0])+1:"lower-roman"===d?p=this.lowerRomanNumber.indexOf(this.listContents[0].split(".")[0])+1:"lower-greek"===d&&(p=this.lowerGreekNumber.indexOf(this.listContents[0].split(".")[0])+1))}""!==e[l].style.marginLeft&&(u=e[l].style.marginLeft);for(var f=[],y=1;y<this.listContents.length;y++)f.push(this.listContents[y]);var v=void 0;g(e[l].className)||(v=e[l].className),g(e[l].getAttribute("style"))||(e[l].setAttribute("style",e[l].getAttribute("style").replace("text-align:start;","")),e[l].style.textIndent="",a=e[l].getAttribute("style")),r.push({listType:h,content:f,nestedLevel:t,listFormatOverride:i,class:v,listStyle:a,listStyleTypeName:d,start:p,styleMarginLeft:u})}}else o.push({content:this.makeConversion(r),node:e[l-1]}),r=[];for(n=e.shift();n;){for(var b=[],M=0;M<o.length;M++)if(o[M].node===n){for(var N=0;N<o[M].content.childNodes.length;N++)b.push(o[M].content.childNodes[N]);for(N=0;N<b.length;N++)n.parentElement.insertBefore(b[N],n);break}n.remove(),(n=e.shift())||(n=e.shift())}},e.prototype.getlistStyleType=function(e,t){var i;if("ol"===t){var n=e.split(".")[0].charCodeAt(0);switch(!0){case this.upperRomanNumber.indexOf(e.split(".")[0])>-1:i="upper-roman";break;case this.lowerRomanNumber.indexOf(e.split(".")[0])>-1:i="lower-roman";break;case this.lowerGreekNumber.indexOf(e.split(".")[0])>-1:i="lower-greek";break;case n>64&&n<91:i="upper-alpha";break;case n>96&&n<123:i="lower-alpha";break;case e.split(".")[0].length>1&&"0"===e.split(".")[0][0]&&!isNaN(Number(e.split(".")[0])):i="decimal-leading-zero";break;default:i="decimal"}}else switch(e.split(".")[0]){case"o":i="circle";break;case"§":i="square";break;default:i="disc"}return i},e.prototype.makeConversion=function(e){for(var t,i,n,o=_("div"),r=1,s=0,a=e[0].listFormatOverride,l=0;l<e.length;l++){for(var c=["MsoListParagraphCxSpFirst","MsoListParagraphCxSpMiddle","MsoListParagraphCxSpLast"],h=!1,d=0;d<c.length;d++)if(c[d].indexOf(e[l].class)>=0){h=!0;break}g(i)||0===l||e[l-1].listType===e[l].listType||h||(i=null);var p=_("p",{className:"MsoNoSpacing"});if(p.innerHTML=e[l].content.join(" "),1!==e[l].nestedLevel||0!==s&&a===e[l].listFormatOverride||!e[l].content){if(e[l].nestedLevel===r&&a===e[l].listFormatOverride)g(i)||g(i.parentElement)||i.parentElement.tagName.toLowerCase()!==e[l].listType?g(i)?((t=_(e[l].listType)).style.listStyleType=e[l].listStyleTypeName,(i=_("li")).appendChild(p),t.appendChild(i),t.setAttribute("level",e[l].nestedLevel.toString()),o.appendChild(t)):((t=_(e[l].listType)).style.listStyleType=e[l].listStyleTypeName,i.parentElement.parentElement.appendChild(t),(i=_("li")).appendChild(p),t.appendChild(i),t.setAttribute("level",e[l].nestedLevel.toString())):(i.parentElement.appendChild(i=_("li")),i.appendChild(p));else if(e[l].nestedLevel>r)if(g(i))if(e[l].nestedLevel>r&&h){var u=_(e[l].listType);i=_("li"),u.appendChild(i),u.style.listStyleType="none";for(m=0;m<e[l].nestedLevel-1;m++)i.appendChild(t=_(e[l].listType)),i=_("li"),t.appendChild(i),t.style.listStyleType="none";i.appendChild(p),o.appendChild(u),t.setAttribute("level",e[l].nestedLevel.toString()),t.style.listStyleType=e[l].listStyleTypeName}else o.appendChild(t=_(e[l].listType)),(i=_("li")).appendChild(p),t.appendChild(i),t.setAttribute("level",e[l].nestedLevel.toString()),"msolistparagraph"!==e[l].class?t.style.marginLeft=e[l].styleMarginLeft:G([t],"marginLeftIgnore"),t.style.listStyleType=e[l].listStyleTypeName;else{for(var m=0;m<e[l].nestedLevel-r;m++)i.appendChild(t=_(e[l].listType)),i=_("li"),m!==e[l].nestedLevel-r-1&&e[l].nestedLevel-r>1&&(i.style.listStyleType="none"),t.appendChild(i);i.appendChild(p),t.setAttribute("level",e[l].nestedLevel.toString()),t.style.listStyleType=e[l].listStyleTypeName}else if(1===e[l].nestedLevel)o.lastChild.tagName.toLowerCase()===e[l].listType?t=o.lastChild:(o.appendChild(t=_(e[l].listType)),t.style.listStyleType=e[l].listStyleTypeName),(i=_("li")).appendChild(p),t.appendChild(i),t.setAttribute("level",e[l].nestedLevel.toString());else for(n=i;n.parentElement;)if((n=n.parentElement).attributes.getNamedItem("level")){if(parseInt(n.attributes.getNamedItem("level").textContent,10)===e[l].nestedLevel&&a===e[l].listFormatOverride){(i=_("li")).appendChild(p),n.appendChild(i);break}if(parseInt(n.attributes.getNamedItem("level").textContent,null)===e[l].nestedLevel&&a!==e[l].listFormatOverride){if(t=_(e[l].listType),i=_("li"),t.appendChild(i),e[l].nestedLevel>1)for(var f=0;f<e[l].nestedLevel-1;f++)i.appendChild(t=_(e[l].listType)),i=_("li"),t.appendChild(i),t.style.listStyleType="none";i.appendChild(p),n.appendChild(t),t.setAttribute("level",e[l].nestedLevel.toString()),t.style.listStyleType=e[l].listStyleTypeName;break}if(e[l].nestedLevel>parseInt(n.attributes.getNamedItem("level").textContent,10)){n.appendChild(t=_(e[l].listType)),(i=_("li")).appendChild(p),t.appendChild(i),t.setAttribute("level",e[l].nestedLevel.toString()),t.style.listStyleType=e[l].listStyleTypeName;break}}}else o.appendChild(t=_(e[l].listType,{className:e[l].class})),(i=_("li")).appendChild(p),t.appendChild(i),t.setAttribute("level",e[l].nestedLevel.toString()),"msolistparagraph"!==e[l].class?t.style.marginLeft=e[l].styleMarginLeft:G([t],"marginLeftIgnore"),t.style.listStyleType=e[l].listStyleTypeName;i.setAttribute("class",e[l].class),i.setAttribute("style",g(e[l].listStyle)?"":e[l].listStyle),r=e[l].nestedLevel,a=e[l].listFormatOverride,s++,g(e[l].start&&1!==e[l].start&&"ol"===e[l].listType)||t.setAttribute("start",e[l].start.toString())}return o},e.prototype.getListContent=function(e){var t="",i=e.firstElementChild;if(""!==i.textContent.trim()||g(i.firstElementChild)||"IMG"!==i.firstElementChild.nodeName){if(i.childNodes.length>0){for(var n=i.querySelectorAll('[style*="mso-list"]'),o=0;o<n.length;o++)n[o].setAttribute("style",n[o].getAttribute("style").replace(/\n/g,""));var r=i.querySelector('span[style*="mso-list"]');if(r){var s=r.getAttribute("style");s&&(s=s.replace(/\s*:\s*/g,":"),r.setAttribute("style",s))}var a=i.querySelector('span[style="mso-list:Ignore"]'),l=g(a);if(!g(a=l?i:a)){var c=a.textContent.trim();if(l){var h=c.match(/^(\d{1,2}|[a-zA-Z]|[*#~•○■])(\.|\)|-)\s*/);g(h)||(c=h[0].trim(),a.textContent=a.textContent.trim().substring(c.length).trim())}this.listContents.push(c),l||ee(a),this.removingComments(e),this.removeUnwantedElements(e)}}}else t=e.innerHTML.trim(),this.listContents.push(""),this.listContents.push(t);this.listContents.push(e.innerHTML)},e.prototype.processMargin=function(e){var t=e.querySelectorAll("li");if(t.length>0)for(var i=0;i<t.length;i++)g(t[i].style.marginLeft)||t[i].parentElement.classList.contains("marginLeftIgnore")||(t[i].style.marginLeft="");var n=e.querySelectorAll("table");if(n.length>0)for(i=0;i<n.length;i++)!g(n[i].style.marginLeft)&&n[i].style.marginLeft.indexOf("-")>=0&&(n[i].style.marginLeft="");var o=e.querySelectorAll(".marginLeftIgnore li");if(o.length>0)for(i=0;i<o.length;i++)if(!g(o[i].style.marginLeft)&&""!==o[i].style.marginLeft){var r=o[i].style.marginLeft,s=parseFloat(r.split("in")[0])-.5;o[i].style.marginLeft=s.toString()+"in"}},e.prototype.removeEmptyAnchorTag=function(e){for(var t=e.querySelectorAll("a:not([href])"),i=t.length-1;i>=0;i--){for(var n=t[i].parentNode;t[i].firstChild;)n.insertBefore(t[i].firstChild,t[i]);n.removeChild(t[i])}},e.prototype.findSource=function(e){for(var t=e.querySelectorAll("meta"),i=0;i<t.length;i++){var n=t[i],o=n.getAttribute("content"),r=n.getAttribute("name");if(r&&r.toLowerCase().indexOf("generator")>=0&&o&&o.toLowerCase().indexOf("microsoft")>=0)for(var s=0;s<Xp.length;s++)if(o.toLowerCase().indexOf(Xp[s])>=0)return Xp[s]}return"html"},e.prototype.handleOneNoteContent=function(e){var t=e.querySelectorAll("ul, ol");if(t.length>0)for(var i=0;i<t.length;i++){var n=t[i];0===n.querySelectorAll("li").length&&n.childNodes.length>0&&Iu.unwrap(n)}},e.prototype.destroy=function(){this.removeEventListener()},e}(),gm=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(Wp,this.insertText,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(Wp,this.insertText),this.parent.observer.off(Su,this.destroy)},e.prototype.insertText=function(e){var t=document.createTextNode(e.value);xu.Insert(this.parent.currentDocument,t,this.parent.editableElement),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.destroy=function(){this.removeEventListener()},e}(),fm=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(Du,this.emojiInsert,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(Du,this.emojiInsert),this.parent.observer.off(Su,this.destroy)},e.prototype.emojiInsert=function(e){for(var t=document.createTextNode(e.value),i=this.parent.currentDocument.getSelection(),n=i.getRangeAt(0).startOffset,o=n-1;o>=n-15;o--){var r=i.focusNode.textContent.substring(o-1,o);if(/:$/.test(r)){this.beforeApplyFormat(!0);break}}var s=/:$/.test(i.focusNode.textContent.charAt(n-1)),a=i.focusNode.textContent.charAt(n-2),l=/\s/.test(a);s&&(l||1===i.focusOffset)&&this.beforeApplyFormat(!0);var c=i.focusNode,h=se("#text"===c.nodeName?c.parentNode:c,"a");if(h){if(0===n)h.parentNode.insertBefore(t,h);else if(n===c.textContent.length){h.parentNode.insertBefore(t,h.nextSibling),new bm(h).setCursorPoint(this.parent.currentDocument,h.nextSibling,h.nextSibling.textContent.length)}}else xu.Insert(this.parent.currentDocument,t,this.parent.editableElement);e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.beforeApplyFormat=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=this.parent.nodeSelection.getNodeCollection(t)[0],n=!(":"===i.parentElement.innerHTML.replace(/&nbsp;|<br>/g,"").trim()||0===i.textContent.trim().indexOf("/")),o=i;if(n&&e)for(;o!==this.parent.editableElement;)o=o.parentElement;for(var r=t.startOffset;-1===this.parent.nodeSelection.getRange(this.parent.editableElement.ownerDocument).toString().indexOf(":");)this.parent.nodeSelection.setSelectionText(this.parent.editableElement.ownerDocument,i,i,r,t.endOffset),r--;var s=this.parent.nodeSelection.getRange(this.parent.currentDocument),a=this.parent.nodeCutter.GetSpliceNode(s,i);a.parentNode.removeChild(a)},e.prototype.destroy=function(){this.removeEventListener()},e}(),ym=function(){function e(e,t){this.INVALID_TAGS=["A","AUDIO","IMG","VIDEO","IFRAME"],this.parent=e,this.settings=t,this.addEventListener(),this.setDeniedFormats()}return e.prototype.addEventListener=function(){this.parent.observer.on(Eu,this.actionHandler,this),this.parent.observer.on(yu,this.onPropertyChanged,this),this.parent.observer.on(Su,this.destroy,this)},e.prototype.onPropertyChanged=function(e){e&&"formatPainter"===e.module&&(g(e.newProp.formatPainterSettings.allowedFormats)||(this.settings.allowedFormats=e.newProp.formatPainterSettings.allowedFormats),g(e.newProp.formatPainterSettings.deniedFormats)||(this.settings.deniedFormats=e.newProp.formatPainterSettings.deniedFormats,this.setDeniedFormats()))},e.prototype.removeEventListener=function(){this.parent.observer.off(Eu,this.actionHandler),this.parent.observer.off(yu,this.onPropertyChanged),this.parent.observer.off(Su,this.destroy)},e.prototype.destroy=function(){this.removeEventListener(),this.INVALID_TAGS=null,this.copyCollection=null,this.deniedFormatsCollection=null,this.newElem=null,this.newElemLastChild=null,this.settings=null,this.parent=null},e.prototype.actionHandler=function(e){if(this.settings.allowedContext=["Text","List","Table"],!g(e)&&!g(e.item)&&!g(e.item.formatPainterAction)){switch(e.item.formatPainterAction){case"format-copy":this.copyAction();break;case"format-paste":this.pasteAction();break;case"escape":this.escapeAction()}this.callBack(e)}},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:"FormatPainter",action:e.item.formatPainterAction,event:e.event,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.generateElement=function(){var e=this.copyCollection.slice();e.reverse();for(var t,i=e.length,n=_("div",{className:"e-format-paste-wrapper"}),o=0;o<i;o++){var r=e[o],s=r.attrs,a=r.className,l=r.styles,c=_(r.tagName);""!==a&&(c.className=a);for(var h=0;h<s.length;h++){var d=s[h].name,p=s[h].value;c.setAttribute(d,p)}for(var u=0;u<l.length;u++){d=l[u].property,p=l[u].value;var m=l[u].priority;c.style.setProperty(d,p,m)}0===n.childElementCount?(n.append(c),t=c):(t.append(c),t=c)}for(var g=this.removeDeniedFormats(n),f=g;f;)null===f.firstChild?(t=f,f=void 0):f=f.firstChild;this.newElem=g,this.newElemLastChild=t},e.prototype.pasteAction=function(){g(this.copyCollection)||0===this.copyCollection.length?this.paintPlainTextFormat():this.insertFormatNode(this.newElem,this.newElemLastChild)},e.prototype.removeDeniedFormats=function(e){if(!g(this.deniedFormatsCollection)&&this.deniedFormatsCollection.length>0)for(var t=this.deniedFormatsCollection,i=t.length,n=0;n<i;n++){var o=t[n].tag;if(t[n].tag)for(var r=e.querySelectorAll(o),s=0;s<r.length;s++){if(t[n].classes.length>0){for(var a=t[n].classes,l=a.length,c=0;c<l;c++)r[s].classList.contains(a[c])&&X([r[s]],a[c].trim());0===r[s].classList.length&&r[s].removeAttribute("class")}if(t[n].styles.length>0){var h=t[n].styles,d=h.length;for(c=0;c<d;c++)r[s].style.removeProperty(h[c].trim());0===r[s].style.length&&r[s].removeAttribute("style")}if(t[n].attributes.length>0){var p=t[n].attributes,u=p.length;for(c=0;c<u;c++)r[s].removeAttribute(p[c].trim())}}}return e.firstElementChild},e.prototype.copyAction=function(){var e=[],t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=this.parent.nodeSelection,n=t.collapsed?i.getSelectionNodeCollection(t):i.getSelectionNodeCollectionBr(t);if(0!==n.length||0!==i.getSelectionNodeCollectionBr(t).length){for(var o=(n=0===n.length?i.getSelectionNodeCollectionBr(t):n)[0].parentElement,r=this.findCurrentContext(o),s=this.settings.allowedFormats.indexOf(";")>-1?this.settings.allowedFormats.split(";"):[this.settings.allowedFormats],a=0;a<s.length;a++)s[a]=s[a].trim();var l=this.getRangeParentElem(r,o),c=l[0],h=l[1];if(null===r&&(r=h),!g(r)&&this.settings.allowedContext.indexOf(r)>-1){"#text"===t.startContainer.nodeName&&(o=t.startContainer.parentElement);var d=o;do{if(s.indexOf(o.nodeName.toLowerCase())>-1){var p=o.attributes,u=[];for(a=0;a<p.length;a++)"class"!==p[a].name&&"style"!==p[a].name&&u.push(p[a]);var m=o.className,f=o.style,y=[];for(a=0;a<f.length;a++){var v=f[a],b=f.getPropertyValue(v),M=f.getPropertyPriority(v);y.push({property:v,value:b,priority:M})}e.push({attrs:u,className:m,styles:y,tagName:o.nodeName})}if(c===o?o=void 0:g(o.parentElement)||(o=o.parentElement),d===o)break}while(!g(o)||o===this.parent.editableElement);this.copyCollection=e}this.generateElement()}},e.prototype.getRangeParentElem=function(e,t){var i,n=t;switch(3===n.nodeType&&(n=n.parentElement),e){case"Table":g(i=se(n,"td"))&&(i=se(n,"th"));break;case"List":i=se(n,"li");break;case"Text":i=se(n,"p")}if(g(i)){var o=this.getNearestBlockParentElement(t);g(o)||"UL"===o||"OL"===o||"LI"===o||(i=se(n,o),e="Text")}return"List"===e&&(i=i.parentElement),[i,e]},e.prototype.getNearestBlockParentElement=function(e){var t=e;for(3===t.nodeType&&(t=t.parentNode);t&&t!==this.parent.editableElement;){if(!g(t)&&this.isBlockElement(t))return t.nodeName;t=t.parentNode}return null},e.prototype.isBlockElement=function(e){return["P","DIV","UL","OL","LI","H1","H2","H3","H4","H5","H6","ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","FIGCAPTION","FIGURE","FOOTER","HEADER","HR","MAIN","NAV","SECTION","SUMMARY","PRE"].indexOf(e.nodeName)>-1},e.prototype.escapeAction=function(){this.copyCollection=[]},e.prototype.paintPlainTextFormat=function(){var e,t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=this.parent.nodeSelection,n=t.collapsed?i.getSelectionNodeCollection(t):i.getSelectionNodeCollectionBr(t);if(n.length>1)for(var o=0;o<n.length;o++)e=this.validateELementTag(n[o]);else e=this.validateELementTag(t.startContainer)&&this.validateELementTag(t.endContainer);e||this.parent.execCommand("Clear","ClearFormat",null,null)},e.prototype.validateELementTag=function(e){return 3===e.nodeType&&(e=e.parentElement),this.INVALID_TAGS.indexOf(e.tagName)>-1},e.prototype.findCurrentContext=function(e){var t=se(e,"p"),i=se(e,"li");return t&&!i?"Text":se(e,"li")?g(t)||g(i)||t.textContent.trim()===i.textContent.trim()?"List":"Text":se(e,"td")||se(e,"tr")||se(e,"th")?"Table":null},e.prototype.insertFormatNode=function(e,t){var i=e.cloneNode(!0);if(!this.isBlockElement(e)){var n=_("P");n.appendChild(e),i=n.cloneNode(!0)}for(var o,r=this.parent.editableElement,s=this.parent.currentDocument,a=i.firstChild;a;){if(!this.isBlockElement(a)){o=a.parentNode.removeChild(a);break}a=a.firstChild}var l={element:o,lastChild:t};lm.applyFormat(s,null,r,"P",null,"formatPainter",null,l);var c=this.parent.nodeSelection.getRange(s),h=c.collapsed,d=this.parent.domNode.blockNodes();if(this.isListCopied())for(var p=0;p<d.length;p++)se(d[p],"li")&&(d[p]=se(d[p],"li"));var u=!1;1===d.length&&(u=d[0].textContent.trim()===c.toString().trim()),(this.isBlockElement(i)&&h||d.length>1||u)&&this.insertBlockNode(i,c,s,d)},e.prototype.isListCopied=function(){for(var e=!1,t=0;t<this.copyCollection.length;t++)if("OL"===this.copyCollection[t].tagName||"UL"===this.copyCollection[t].tagName){e=!0;break}return e},e.prototype.insertBlockNode=function(e,t,i,n){var o,r,s=this.parent.nodeSelection.save(t,i);this.parent.domNode.setMarker(s);var a=!1;"UL"!==e.nodeName&&"OL"!==e.nodeName||(o=(r=e.cloneNode(!0)).firstChild);for(var l=g(r)?e:e.firstChild,c=0;c<n.length;c++)if(!(this.INVALID_TAGS.indexOf(n[c].nodeName)>-1||n[c].querySelectorAll("img,audio,video,iframe").length>0)){for(var h=l.cloneNode(!1);n[c].firstChild;)0!==n[c].textContent.trim().length?h.appendChild(n[c].firstChild):n[c].removeChild(n[c].firstChild);if("TD"!==n[c].nodeName&&"TH"!==n[c].nodeName){if(g(r)||(a=this.isSameListType(e,n[c])),"LI"!==h.nodeName||a?a?this.insertSameList(n,c,r,h):n[c].parentNode.replaceChild(h,n[c]):this.insertNewList(t,n,c,r,h),"LI"!==h.nodeName&&("OL"===h.parentElement.nodeName||"UL"===h.parentElement.nodeName)){var d=h.parentElement;if(this.parent.nodeCutter.SplitNode(t,d,!0),g(d.previousElementSibling))d.parentElement.prepend(h);else if(d.previousElementSibling.after(h),h.childNodes.length>1)for(var p=0;p<h.childNodes.length;p++){var u=h.childNodes[p];"OL"!==u.nodeName&&"UL"!==u.nodeName||h.after(u)}}}else{if(g(r)){n[c].appendChild(h);continue}if(0!==c||g(r)){n[c].appendChild(h);continue}n[c].appendChild(r),r.appendChild(h)}}!g(o)&&ee(o),this.cleanEmptyLists(),this.parent.domNode.saveMarker(s).restore()},e.prototype.insertNewList=function(e,t,i,n,o){if(0===i){var r=t[i].nodeName;t[i]=t[i].parentNode.replaceChild(n,t[i]);var s="LI"===r?n.parentElement:n;if(this.parent.nodeCutter.SplitNode(e,s,!0),"LI"!==t[i].nodeName||g(s))if(g(s))n.append(o);else if(g(s.previousElementSibling)||s.previousElementSibling.nodeName!==n.nodeName)if(g(s.nextElementSibling)||s.nextElementSibling.nodeName!==n.nodeName)n.append(o);else{var a;for((a=s.nextElementSibling).prepend(o);a.firstChild;)n.append(a.firstChild)}else for((a=s.previousElementSibling).append(o);a.firstChild;)n.append(a.firstChild);else n.append(o),g(s.parentNode)||s.parentNode.insertBefore(n,s)}else n.append(o);this.detachEmptyBlockNodes(t[i])},e.prototype.insertSameList=function(e,t,i,n){if(0===t){if(!g(e[t].parentNode)&&("UL"===e[t].parentNode.nodeName||"OL"===e[t].parentNode.nodeName)){if(1===e.length){for(;n.firstChild;)e[t].append(n.firstChild);for(var o=0;o<e[t].parentNode.childNodes.length;o++){var r=e[t].parentNode.childNodes[o];i.append(r.cloneNode(!0))}}else i.append(n);e[t].parentNode.parentNode.replaceChild(i,e[t].parentNode)}}else i.append(n);this.detachEmptyBlockNodes(e[t])},e.prototype.isSameListType=function(e,t){var i=!1,n=se(t,"ol, ul");return!g(n)&&n.querySelectorAll("li").length>0&&(i=n.nodeName===e.nodeName),i},e.prototype.cleanEmptyLists=function(){for(var e=this.parent.editableElement.querySelectorAll("ol, ul"),t=0;t<e.length;t++)""===e[t].textContent.trim()&&ee(e[t])},e.prototype.setDeniedFormats=function(){var e=[];if(!g(this.settings)&&!g(this.settings.deniedFormats)){for(var t=this.settings.deniedFormats.indexOf(";")>-1?this.settings.deniedFormats.split(";"):[this.settings.deniedFormats],i=t.length,n=0;n<i;n++){var o=t[n];if(""!==o){o.trim();var r=this.makeDeniedFormatsCollection(o);g(r)||e.push(r)}}this.deniedFormatsCollection=e}},e.prototype.detachEmptyBlockNodes=function(e){g(e)||""!==e.textContent.trim()||ee(e)},e.prototype.makeDeniedFormatsCollection=function(e){var t=e.indexOf("("),i=e.indexOf(")"),n=e.indexOf("["),o=e.indexOf("]"),r=e.indexOf("{"),s=e.indexOf("}"),a=[],l=[],c=[];t>-1&&i>-1&&(a=e.substring(t+1,i).split(" ")[0].split(")")[0].split(",")),n>-1&&o>-1&&(l=e.substring(n+1,o).split(",")),r>-1&&s>-1&&(c=e.substring(r+1,s).split(","));var h,d=[t,n,r],p=(d=d.filter((function(e){return e>-1}))).length;return 1===p?h=d[0]:2===p?h=Math.min(d[0],d[1]):3===p&&(h=Math.min(d[0],d[1],d[2])),{tag:e.substring(0,h).trim(),styles:c,classes:a,attributes:l}},e}(),vm=function(){function e(e){this.clickCount=0,this.lastClickTime=0,this.currentDocument=e.document,this.editableElement=e.editableElement,this.nodeSelection=new bm(this.editableElement),this.nodeCutter=new wu,this.domNode=new cu(this.editableElement,this.currentDocument),this.observer=new he(this),this.listObj=new ju(this),this.formatObj=new Ou(this),this.alignmentObj=new ku(this),this.indentsObj=new Pu(this),this.linkObj=new Au(this),this.imgObj=new nm(this),this.audioObj=new om(this),this.videoObj=new rm(this),this.selectionObj=new cm(this),this.inserthtmlObj=new hm(this),this.insertTextObj=new gm(this),this.clearObj=new pm(this),this.tableObj=new sm(this),this.undoRedoManager=new um(this,e.options),this.msWordPaste=new mm(this),this.formatPainterEditor=new ym(this,e.formatPainterSettings),this.emojiPickerObj=new fm(this),this.tableCellSelection=new su(this.editableElement,this.currentDocument),this.wireEvents(),this.isDestroyed=!1}return e.prototype.wireEvents=function(){this.observer.on(hu,this.editorKeyDown,this),this.observer.on(fu,this.editorKeyUp,this),this.observer.on(fu,this.editorKeyUp,this),this.observer.on(vu,this.onPropertyChanged,this),this.observer.on(Mu,this.onWordPaste,this),this.observer.on(Nu,this.onBegin,this),this.observer.on(Tu,this.editorMouseDown,this),this.observer.on(Lu,this.destroy,this)},e.prototype.unwireEvents=function(){this.observer.off(hu,this.editorKeyDown),this.observer.off(fu,this.editorKeyUp),this.observer.off(fu,this.editorKeyUp),this.observer.off(vu,this.onPropertyChanged),this.observer.off(Mu,this.onWordPaste),this.observer.off(Nu,this.onBegin),this.observer.off(Tu,this.editorMouseDown),this.observer.off(Lu,this.destroy)},e.prototype.onWordPaste=function(e){this.observer.notify(bu,e)},e.prototype.onPropertyChanged=function(e){this.observer.notify(yu,e)},e.prototype.editorKeyDown=function(e){this.observer.notify(uu,e)},e.prototype.editorKeyUp=function(e){this.observer.notify(gu,e)},e.prototype.onBegin=function(e){this.observer.notify(Cu,e)},e.prototype.execCommand=function(e,t,i,n,o,r,s,a){switch(e.toLowerCase()){case"lists":this.observer.notify(mu,{subCommand:t,event:i,callBack:n,selector:s,item:r,enterAction:a});break;case"formats":this.observer.notify(pu,{subCommand:t,event:i,callBack:n,selector:s,exeValue:r,enterAction:a});break;case"alignments":this.observer.notify(Bp,{subCommand:t,event:i,callBack:n,selector:s,value:r,enterAction:a});break;case"indents":this.observer.notify(Hp,{subCommand:t,event:i,callBack:n,selector:s,enterAction:a});break;case"links":this.observer.notify(Ep,{command:e,value:t,item:r,event:i,callBack:n,enterAction:a});break;case"files":this.observer.notify(bp,{command:e,value:"Image",item:r,event:i,callBack:n,selector:s});break;case"images":this.observer.notify(bp,{command:e,value:t,item:r,event:i,callBack:n,selector:s});break;case"audios":this.observer.notify(Mp,{command:e,value:t,item:r,event:i,callBack:n,selector:s});break;case"videos":this.observer.notify(Np,{command:e,value:t,item:r,event:i,callBack:n,selector:s});break;case"table":switch(t.toString().toLocaleLowerCase()){case"createtable":this.observer.notify(Cp,{item:r,event:i,callBack:n,enterAction:a});break;case"insertrowbefore":case"insertrowafter":this.observer.notify(Dp,{item:r,event:i,callBack:n});break;case"insertcolumnleft":case"insertcolumnright":this.observer.notify(Tp,{item:r,event:i,callBack:n});break;case"deleterow":this.observer.notify(Lp,{item:r,event:i,callBack:n});break;case"deletecolumn":this.observer.notify(Sp,{item:r,event:i,callBack:n});break;case"tableremove":this.observer.notify(Ip,{item:r,event:i,callBack:n});break;case"tableheader":this.observer.notify(wp,{item:r,event:i,callBack:n});break;case"aligntop":case"alignmiddle":case"alignbottom":this.observer.notify(xp,{item:r,event:i,callBack:n});break;case"merge":this.observer.notify(jp,{item:r,event:i,callBack:n});break;case"horizontalsplit":this.observer.notify(zp,{item:r,event:i,callBack:n});break;case"verticalsplit":this.observer.notify(Op,{item:r,event:i,callBack:n});break;case"dashed":this.observer.notify(Ap,{item:r,event:i,callBack:n});break;case"alternate":this.observer.notify(kp,{item:r,event:i,callBack:n});break;case"backgroundcolor":this.observer.notify(Pp,{subCommand:t,value:r,event:i,callBack:n})}break;case"font":case"style":case"effects":case"casing":this.observer.notify(Qp,{subCommand:t,event:i,callBack:n,value:o,selector:s,enterAction:a});break;case"inserthtml":this.observer.notify(qp,{subCommand:t,callBack:n,value:o,enterAction:a});break;case"inserttext":this.observer.notify(Wp,{subCommand:t,callBack:n,value:o});break;case"clear":this.observer.notify(_p,{subCommand:t,event:i,callBack:n,selector:s,enterAction:a});break;case"actions":this.observer.notify(du,{subCommand:t,event:i,callBack:n,selector:s});break;case"formatpainter":this.observer.notify(Eu,{item:r,subCommand:t,event:i,callBack:n});break;case"emojipicker":this.observer.notify(Du,{item:r,subCommand:t,value:o,event:i,callBack:n})}},e.prototype.editorMouseDown=function(e){if(3===e.args.detail&&this.tripleClickSelection(e.args),-1!==Q.userAgent.indexOf("Safari")){var t=(new Date).getTime();t-this.lastClickTime>500&&(this.clickCount=0),this.clickCount++,this.lastClickTime=t,3===this.clickCount&&(this.tripleClickSelection(e.args),this.clickCount=0)}},e.prototype.tripleClickSelection=function(e){var t=this.nodeSelection.getRange(this.currentDocument),i=this.nodeSelection.get(this.currentDocument),n=new zu(this.editableElement);if(i.rangeCount>0&&""!==i.toString()){var o=this.getParentBlockNode(t.startContainer),r=this.getParentBlockNode(t.endContainer);if(o&&r&&o===r){var s=this.currentDocument.createRange(),a=n.getFirstTextNode(o),l=n.getLastTextNode(r);a&&l&&(s.setStart(a,0),s.setEnd(l,l.textContent.length),this.nodeSelection.setRange(this.currentDocument,s),e.preventDefault())}}},e.prototype.getParentBlockNode=function(e){var t=this.currentDocument.createTreeWalker(this.editableElement,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){return window.getComputedStyle(e).display.indexOf("inline")<0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t.currentNode=e,t.parentNode()},e.prototype.destroy=function(){this.isDestroyed||(this.unwireEvents(),this.observer.notify(Su),this.editableElement&&(this.editableElement=null),this.currentDocument=null,this.nodeCutter&&(this.nodeCutter=null),this.domNode&&(this.domNode=null),this.listObj&&(this.listObj=null),this.formatObj&&(this.formatObj=null),this.alignmentObj&&(this.alignmentObj=null),this.indentsObj&&(this.indentsObj=null),this.linkObj&&(this.linkObj=null),this.imgObj&&(this.imgObj=null),this.audioObj&&(this.audioObj=null),this.videoObj&&(this.videoObj=null),this.selectionObj&&(this.selectionObj=null),this.inserthtmlObj&&(this.inserthtmlObj=null),this.insertTextObj&&(this.insertTextObj=null),this.clearObj&&(this.clearObj=null),this.tableObj&&(this.tableObj=null),this.msWordPaste&&(this.msWordPaste=null),this.formatPainterEditor&&(this.formatPainterEditor=null),this.emojiPickerObj&&(this.emojiPickerObj=null),this.tableCellSelection&&(this.tableCellSelection=null),this.isDestroyed=!0)},e.prototype.beforeSlashMenuApplyFormat=function(){for(var e=this.nodeSelection.getRange(this.currentDocument),t=this.nodeSelection.getNodeCollection(e)[0],i=e.startOffset;-1===this.nodeSelection.getRange(document).toString().indexOf("/");)this.nodeSelection.setSelectionText(document,t,t,i,e.endOffset),i--;var n=this.nodeSelection.getRange(this.currentDocument),o=this.nodeCutter.GetSpliceNode(n,t),r=o.previousSibling;o.parentElement&&1===o.parentElement.innerHTML.length&&o.parentElement.appendChild(document.createElement("br")),o.parentNode.removeChild(o),r&&this.nodeSelection.setCursorPoint(document,r,r.textContent.length)},e}(),bm=function(){function e(e){this.startNodeName=[],this.endNodeName=[],this.editableElement=e}return e.prototype.saveInstance=function(e,t){return this.range=e.cloneRange(),this.rootNode=this.documentFromRange(e),this.body=t,this.startContainer=this.getNodeArray(e.startContainer,!0),this.endContainer=this.getNodeArray(e.endContainer,!1),this.startOffset=e.startOffset,this.endOffset=e.endOffset,this.html=this.body.innerHTML,this},e.prototype.documentFromRange=function(e){return 9===e.startContainer.nodeType?e.startContainer:e.startContainer.ownerDocument},e.prototype.getRange=function(e){var t=this.get(e),i=t&&t.rangeCount>0?t.getRangeAt(t.rangeCount-1):e.createRange();return i.startContainer!==e||i.endContainer!==e||i.startOffset||i.endOffset||(i.setStart(e.body,0),i.collapse(!0)),i},e.prototype.get=function(e){return e.defaultView.getSelection()},e.prototype.save=function(e,t){return e=e?e.cloneRange():this.getRange(t),this.saveInstance(e,t.body)},e.prototype.getIndex=function(e){var t=0;if(e=e.previousSibling||"BR"!==e.tagName?e.previousSibling:e)for(e.nodeType;e;null)t++,e.nodeType,e=e.previousSibling;return t},e.prototype.isChildNode=function(e,t){for(var i=0;i<t.childNodes.length;i++)if(e.indexOf(t.childNodes[i])>-1)return!0;return!1},e.prototype.getNode=function(e,t,i){return(!this.editableElement||this.editableElement.contains(e)&&this.editableElement!==e)&&(t!==e||3!==e.nodeType&&e.firstChild&&-1===i.indexOf(e.firstChild)&&!this.isChildNode(i,e))?3===e.nodeType&&e.previousSibling===t&&"IMG"===t.nodeName?null:-1===i.indexOf(e.firstChild)&&e.firstChild&&!this.isChildNode(i,e)?e.firstChild:e.nextSibling?e.nextSibling:e.parentNode?e.parentNode:null:null},e.prototype.getNodeCollection=function(e){var t=e.startContainer.childNodes[e.startOffset]||e.startContainer,i=e.endContainer.childNodes[e.endOffset>0?e.endOffset-1:e.endOffset]||e.endContainer,n=this.processedTableImageCursor(e);if((n.start||n.end)&&("TABLE"===n.startName||"TABLE"===n.endName))return[n.start?n.startNode:n.endNode];if((t===i||"BR"===t.nodeName&&t===e.endContainer.childNodes[e.endOffset])&&0===t.childNodes.length)return[t];if(e.startOffset===e.endOffset&&0!==e.startOffset&&"PRE"===e.startContainer.nodeName)return["BR"===t.nodeName||"#text"===t.nodeName?t:t.childNodes[0]];var o=[];do{-1===o.indexOf(t)&&o.push(t),t=this.getNode(t,i,o)}while(t);return o},e.prototype.getParentNodeCollection=function(e){return this.getParentNodes(this.getNodeCollection(e),e)},e.prototype.getParentNodes=function(e,t){e=e.reverse();for(var i=0;i<e.length;i++)-1!==e.indexOf(e[i].parentNode)||3===e[i].nodeType&&t.startContainer!==t.endContainer&&t.startContainer.parentNode!==t.endContainer.parentNode&&t.startContainer.parentNode.tagName&&t.endContainer.parentNode.tagName&&-1!==Fp.indexOf(t.startContainer.parentNode.tagName.toLowerCase())&&-1!==Fp.indexOf(t.endContainer.parentNode.tagName.toLowerCase())?(e.splice(i,1),i--):3===e[i].nodeType&&(e[i]=e[i].parentNode);return e},e.prototype.getSelectionNodeCollection=function(e){return this.getSelectionNodes(this.getNodeCollection(e))},e.prototype.getSelectionNodeCollectionBr=function(e){return this.getSelectionNodesBr(this.getNodeCollection(e))},e.prototype.getSelectionNodes=function(e){e=e.reverse();for(var t=new RegExp("​","g"),i=0;i<e.length;i++)(3!==e[i].nodeType||""===e[i].textContent.trim()||1===e[i].textContent.length&&e[i].textContent.match(t))&&(e.splice(i,1),i--);return e.reverse()},e.prototype.getSelectionNodesBr=function(e){e=e.reverse();for(var t=new RegExp("​","g"),i=0;i<e.length;i++)"BR"!==e[i].nodeName&&(3!==e[i].nodeType||""===e[i].textContent.trim()||1===e[i].textContent.length&&e[i].textContent.match(t))&&(e.splice(i,1),i--);return e.reverse()},e.prototype.getInsertNodeCollection=function(e){return this.getInsertNodes(this.getNodeCollection(e))},e.prototype.getInsertNodes=function(e){e=e.reverse();for(var t=0;t<e.length;t++)(0!==e[t].childNodes.length&&3!==e[t].nodeType||3===e[t].nodeType&&""===e[t].textContent)&&(e.splice(t,1),t--);return e.reverse()},e.prototype.getNodeArray=function(e,t,i){var n=[];for(t?this.startNodeName=[]:this.endNodeName=[];e!==(i||this.rootNode)&&!g(e);null)t?this.startNodeName.push(e.nodeName.toLowerCase()):this.endNodeName.push(e.nodeName.toLowerCase()),n.push(this.getIndex(e)),e=e.parentNode;return n},e.prototype.setRangePoint=function(e,t,i,n){for(var o=this.rootNode,r=i.length,s=n;r--;null)o=o&&o.childNodes[i[r]];return o&&s>=0&&"html"!==o.nodeName&&(3===o.nodeType&&"&nbsp;"===o.nodeValue.replace(/\u00a0/g,"&nbsp;")&&(s=o.textContent.length),e[t?"setStart":"setEnd"](o,s)),e},e.prototype.restore=function(){var e=this.range.cloneRange();return e=this.setRangePoint(e,!0,this.startContainer,this.startOffset),e=this.setRangePoint(e,!1,this.endContainer,this.endOffset),this.selectRange(this.rootNode,e),e},e.prototype.selectRange=function(e,t){this.setRange(e,t),this.save(t,e)},e.prototype.setRange=function(e,t){var i=this.get(e);i.removeAllRanges(),i.addRange(t)},e.prototype.setSelectionText=function(e,t,i,n,o){var r=e.createRange();r.setStart(t,n),r.setEnd(i,o),this.setRange(e,r)},e.prototype.setSelectionContents=function(e,t){var i=e.createRange();i.selectNode(t),this.setRange(e,i)},e.prototype.setSelectionNode=function(e,t){var i=e.createRange();i.selectNodeContents(t),this.setRange(e,i)},e.prototype.getSelectedNodes=function(e){return this.getNodeCollection(this.getRange(e))},e.prototype.Clear=function(e){this.get(e).removeAllRanges()},e.prototype.insertParentNode=function(e,t,i){i.surroundContents(t),this.selectRange(e,i)},e.prototype.setCursorPoint=function(e,t,i){var n=e.createRange(),o=e.defaultView.getSelection();n.setStart(t,i),n.collapse(!0),o.removeAllRanges(),o.addRange(n)},e.prototype.isTableOrImageStart=function(e){var t=e.startContainer,i=e.startOffset,n=t.childNodes[i],o=e.collapsed&&1===t.nodeType&&t.isContentEditable&&n&&["TABLE"].indexOf(n.nodeName)>-1;return o?{start:o,startNodeName:n.nodeName,startNode:n}:{start:!1,startNodeName:"",startNode:void 0}},e.prototype.isTableOrImageEnd=function(e){var t=e.startContainer,i=e.startOffset,n=t.childNodes[i-1],o=e.collapsed&&1===t.nodeType&&t.isContentEditable&&n&&["TABLE"].indexOf(n.nodeName)>-1;return o?{end:o,endNodeName:n.nodeName,endNode:n}:{end:!1,endNodeName:"",endNode:void 0}},e.prototype.processedTableImageCursor=function(e){var t=this.isTableOrImageStart(e),i=t.start,n=t.startNodeName,o=t.startNode,r=this.isTableOrImageEnd(e);return{start:i,startName:n,end:r.end,endName:r.endNodeName,startNode:o,endNode:r.endNode}},e.prototype.findLastTextPosition=function(e){if(e.nodeType===Node.TEXT_NODE)return{node:e,offset:e.textContent?e.textContent.length:0};for(var t=e.childNodes.length-1;t>=0;t--){var i=this.findLastTextPosition(e.childNodes[t]);if(i)return i}return null},e}(),Mm={bold:!1,italic:!1,subscript:!1,superscript:!1,strikethrough:!1,orderedlist:!1,unorderedlist:!1,numberFormatList:!1,bulletFormatList:!1,underline:!1,alignments:null,backgroundcolor:null,fontcolor:null,fontname:null,fontsize:null,formats:null,createlink:!1,insertcode:!1,blockquote:!1,inlinecode:!1},Nm=function(){function e(){}return e.get=function(e,t,i,n,o,r){for(var s=JSON.parse(JSON.stringify(Mm)),a=JSON.parse(JSON.stringify(Mm)),l=new bm(t),c=l.getRange(e),h=r?[r]:c.collapsed?l.getNodeCollection(c):l.getSelectionNodeCollectionBr(c),d=h.length,p=!1,u=0;u<h.length;u++){for(;3===h[u].nodeType&&3===c.startContainer.nodeType&&h[u].parentNode&&h[u].parentNode.lastElementChild&&"BR"!==h[u].parentNode.lastElementChild.nodeName&&this.getImmediateBlockNode(h[u].parentNode)&&0===this.getImmediateBlockNode(h[u].parentNode).textContent.replace(/\u200B/g,"").length&&0===c.startContainer.textContent.replace(/\u200B/g,"").length&&0===l.get(e).toString().replace(/\u200B/g,"").length;)h[u]=h[u].parentNode.lastElementChild.firstChild,p=!0;p&&h[u]&&(l.setCursorPoint(e,h[u],h[u].textContent.length),p=!1),("BR"!==h[u].nodeName&&3!==h[u].nodeType||d>1&&3===h[u].nodeType&&""===h[u].textContent.trim())&&(h.splice(u,1),u--)}for(u=0;u<h.length;u++)s=this.getFormatParent(e,s,h[u],t,i,n,o),(0===u&&s.bold||!s.bold)&&(a.bold=s.bold),(0===u&&s.insertcode||!s.insertcode)&&(a.insertcode=s.insertcode),(0===u&&s.blockquote||!s.blockquote)&&(a.blockquote=s.blockquote),(0===u&&s.italic||!s.italic)&&(a.italic=s.italic),(0===u&&s.underline||!s.underline)&&(a.underline=s.underline),(0===u&&s.strikethrough||!s.strikethrough)&&(a.strikethrough=s.strikethrough),(0===u&&s.superscript||!s.superscript)&&(a.superscript=s.superscript),(0===u&&s.subscript||!s.subscript)&&(a.subscript=s.subscript),(0===u&&s.fontcolor||!s.fontcolor)&&(a.fontcolor=s.fontcolor),0===u&&s.fontname?a.fontname=s.fontname:a.fontname=s.fontname===a.fontname?s.fontname:"empty",0===u&&s.fontsize?a.fontsize=s.fontsize:a.fontsize=s.fontsize===a.fontsize?s.fontsize:"empty",(0===u&&s.backgroundcolor||!s.backgroundcolor)&&(a.backgroundcolor=s.backgroundcolor),(0===u&&s.orderedlist||!s.orderedlist)&&(a.orderedlist=s.orderedlist),(0===u&&s.unorderedlist||!s.unorderedlist)&&(a.unorderedlist=s.unorderedlist),(0===u&&s.alignments||!s.alignments)&&(a.alignments=s.alignments),0===u&&s.formats?a.formats=s.formats:a.formats=s.formats===a.formats?s.formats:"empty",(0===u&&s.createlink||!s.createlink)&&(a.createlink=s.createlink),(0===u&&s.numberFormatList||!s.numberFormatList)&&(a.numberFormatList=s.numberFormatList),(0===u&&s.bulletFormatList||!s.bulletFormatList)&&(a.bulletFormatList=s.bulletFormatList),(0===u&&s.inlinecode||!s.inlinecode)&&(a.inlinecode=s.inlinecode),s=JSON.parse(JSON.stringify(Mm));return a},e.getImmediateBlockNode=function(e){do{e=e.parentNode}while(e&&Fp.indexOf(e.nodeName.toLocaleLowerCase())<0);return e},e.getFormatParent=function(e,t,i,n,o,r,s){var a=!1,l=!1;if(n.contains(i)||3===i.nodeType&&3!==n.nodeType&&n.contains(i.parentNode))do{((t=this.isFormattedNode(e,t,i,a,l,o,r,s)).orderedlist||t.unorderedlist)&&(a=!0),(t.bulletFormatList||t.numberFormatList)&&(l=!0),i=i.parentNode}while(i&&i!==n);return t},e.isFormattedNode=function(e,t,i,n,o,r,s,a){if(t.bold||(t.bold=vp.isBold(i)),t.italic||(t.italic=vp.isItalic(i)),t.underline||(t.underline=vp.isUnderline(i)),t.strikethrough||(t.strikethrough=vp.isStrikethrough(i)),t.superscript||(t.superscript=vp.isSuperscript(i)),t.subscript||(t.subscript=vp.isSubscript(i)),t.fontcolor||(t.fontcolor=this.isFontColor(e,i)),t.fontname||(t.fontname=this.isFontName(e,i,a)),t.fontsize||(t.fontsize=this.isFontSize(e,i,s)),t.backgroundcolor||(t.backgroundcolor=this.isBackgroundColor(i)),t.orderedlist||n||(t.orderedlist=this.isOrderedList(i)),t.unorderedlist||n||(t.unorderedlist=this.isUnorderedList(i)),t.alignments||(t.alignments=this.isAlignment(i)),t.formats||(t.formats=this.isFormats(i,r),"pre"===t.formats&&(t.insertcode=!0)),!t.blockquote){var l=void 0;if(!g(r))if(r.indexOf("blockquote")>-1)t.formats=this.isFormats(i,r),l=t.formats;else{r.push("blockquote"),l=this.isFormats(i,r);for(var c=r.length-1;c>=0;c--)"blockquote"===r[c]&&r.splice(c,1)}"blockquote"===l&&(t.blockquote=!0)}return t.createlink||(t.createlink=this.isLink(i)),t.numberFormatList||o||(t.numberFormatList=this.isNumberFormatList(i)),t.bulletFormatList||o||(t.bulletFormatList=this.isBulletFormatList(i)),t.inlinecode||(t.inlinecode=vp.isCode(i)),t},e.isFontColor=function(e,t){var i=t.style&&t.style.color;return null!=i&&""!==i||3===t.nodeType||(i=this.getComputedStyle(e,t,"color")),null!==i&&""!==i&&void 0!==i?i:null},e.isLink=function(e){return"a"===e.nodeName.toLocaleLowerCase()},e.isBackgroundColor=function(e){var t=e.style&&e.style.backgroundColor;return null!==t&&""!==t&&void 0!==t?t:null},e.isFontSize=function(e,t,i){var n=t.style&&t.style.fontSize;return null!=n&&""!==n||3===t.nodeType||!t.parentElement.classList.contains("e-content")||(n=this.getComputedStyle(e,t,"font-size")),null!==n&&""!==n&&void 0!==n&&(null==i||i.indexOf(n)>-1)?n:null},e.isFontName=function(e,t,i){var n=t.style&&t.style.fontFamily;null!=n&&""!==n||3===t.nodeType||(n=this.getComputedStyle(e,t,"font-family"));var o=null;return null!==n&&""!==n&&void 0!==n&&(null==i||i.filter((function(e,t){var i=new RegExp(n,"i");(e.replace(/"/g,"").replace(/ /g,"").toLowerCase()===n.replace(/"/g,"").replace(/ /g,"").toLowerCase()||e.split(",")[0]&&!g(e.split(",")[0].trim().match(i))&&e.split(",")[0].trim()===e.split(",")[0].trim().match(i)[0])&&(o=t)}))&&null!==o)?null!==o?i[o]:n.replace(/"/g,""):null},e.isOrderedList=function(e){return"ol"===e.nodeName.toLocaleLowerCase()},e.isUnorderedList=function(e){return"ul"===e.nodeName.toLocaleLowerCase()},e.isAlignment=function(e){var t=e.style&&e.style.textAlign;return"left"===t?"justifyleft":"center"===t?"justifycenter":"right"===t?"justifyright":"justify"===t?"justifyfull":null},e.isFormats=function(e,t){return null==t&&Fp.indexOf(e.nodeName.toLocaleLowerCase())>-1||null!=t&&t.indexOf(e.nodeName.toLocaleLowerCase())>-1?e.nodeName.toLocaleLowerCase():null},e.getComputedStyle=function(e,t,i){return e.defaultView.getComputedStyle(t,null).getPropertyValue(i)},e.isNumberFormatList=function(e){var t=e.style&&e.style.listStyleType;return"lower-alpha"===t?"Lower Alpha":"number"===t?"Number":"upper-alpha"===t?"Upper Alpha":"lower-roman"===t?"Lower Roman":"upper-roman"===t?"Upper Roman":"lower-greek"===t?"Lower Greek":"none"===t&&this.isOrderedList(e)?"None":!!this.isOrderedList(e)||null},e.isBulletFormatList=function(e){var t=e.style&&e.style.listStyleType;return"circle"===t?"Circle":"square"===t?"Square":"none"===t&&this.isUnorderedList(e)?"None":"disc"===t?"Disc":!!this.isUnorderedList(e)||null},e}(),Cm=function(){return Cm=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Cm.apply(this,arguments)},Em=function(){function e(e,t){this.isEscapeKey=!1,this.parent=e,this.isDestroyed=!1,t&&(this.l10n=t.getService("rteLocale")),this.wireEvent()}return e.prototype.wireEvent=function(){this.parent.on(zi,this.destroy,this),this.parent.on(En,this.destroyTooltip,this),this.parent.on(In,this.closeTooltip,this)},e.prototype.destroyTooltip=function(){var e=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().ownerDocument:this.parent.contentModule.getDocument();if(!g(e.querySelector(".e-tooltip-wrap"))&&!g(e.querySelector("[data-tooltip-id]"))){var t=e.querySelector("[data-tooltip-id]"),i=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0});t.dispatchEvent(i)}},e.prototype.unWireEvent=function(){this.parent.off(zi,this.destroy),this.parent.off(En,this.destroyTooltip),this.parent.off(In,this.closeTooltip)},e.prototype.toolbarBeforeCreate=function(e){"Extended"===this.mode&&(e.enableCollision=!1)},e.prototype.toolbarCreated=function(){this.parent.notify("toolbarCreated",this)},e.prototype.toolbarClicked=function(e){var t=this;if(this.parent.enabled){var i={item:e.item,originalEvent:e.originalEvent,cancel:!1};this.parent.trigger("toolbarClick",i,(function(i){t.parent.readonly&&!g(e.item)||i.cancel||t.parent.notify(Ai,i)}))}},e.prototype.dropDownSelected=function(e){this.parent.notify(_i,{element:e.element,item:e.item,originalEvent:e.event}),this.destroyTooltip()},e.prototype.beforeDropDownItemRender=function(e){!this.parent.readonly&&this.parent.enabled&&this.parent.notify(Gi,e)},e.prototype.tooltipBeforeRender=function(e){if(!g(e.target.getAttribute("title"))){var t=void 0;switch(e.target.getAttribute("title")){case"Minimize":t=this.l10n.getConstant("minimize"),e.target.setAttribute("title",t+" (Esc)");break;case"Maximize":t=this.l10n.getConstant("maximize"),e.target.setAttribute("title",t+" (Ctrl+Shift+F)")}}e.target.querySelector(".e-active")&&(e.cancel=!0,g(e.target.getAttribute("title"))||this.closeTooltip({target:e.target,isTitle:!0}))},e.prototype.dropDownOpen=function(e){if(e.element.parentElement.getAttribute("id").indexOf("TableCell")>-1&&!g(e.element.parentElement.querySelector(".e-cell-merge"))&&(!g(e.element.parentElement.querySelector(".e-cell-horizontal-split"))||!g(e.element.parentElement.querySelector(".e-cell-vertical-split")))){var t=e.element.querySelectorAll("li"),i=this.parent.inputElement.querySelectorAll(".e-cell-select");1===i.length?(G([t[0]],"e-disabled"),X([t[1],t[2]],"e-disabled")):i.length>1&&(Array.from(i).every((function(e){return e.tagName.toLowerCase()===i[0].tagName.toLowerCase()}))?X([t[0]],"e-disabled"):G([t[0]],"e-disabled"),G([t[1],t[2]],"e-disabled"))}this.parent.notify(nn,e)},e.prototype.dropDownClose=function(e){this.isEscapeKey||this.parent.notify(on,e),this.isEscapeKey=!1},e.prototype.dropDownBeforeClose=function(e){g(e.event)||"Escape"!==e.event.key||27!==e.event.keyCode||(this.isEscapeKey=!0,this.parent.notify("preventQuickToolbarClose",e))},e.prototype.renderToolbar=function(e){this.setPanel(e.target),this.renderPanel(),this.mode=e.overflowMode,e.rteToolbarObj.toolbarObj=new Oc({items:e.items,width:"100%",overflowMode:e.overflowMode,beforeCreate:this.toolbarBeforeCreate.bind(this),created:this.toolbarCreated.bind(this),clicked:this.toolbarClicked.bind(this),enablePersistence:e.enablePersistence,enableRtl:e.enableRtl,cssClass:e.cssClass}),e.rteToolbarObj.toolbarObj.isStringTemplate=!0,e.rteToolbarObj.toolbarObj.createElement=this.parent.createElement,e.rteToolbarObj.toolbarObj.appendTo(e.target),this.parent.showTooltip&&"toolbar"===e.type&&(this.tooltip=new Kl({target:"#"+this.parent.getID()+"_toolbar_wrapper [title]",showTipPointer:!0,openDelay:400,opensOn:"Hover",beforeRender:this.tooltipBeforeRender.bind(this),beforeOpen:this.tooltipBeforeOpen.bind(this),cssClass:this.parent.getCssClass(),windowCollision:!0,position:"BottomCenter"}),this.tooltip.appendTo(e.target.parentElement))},e.prototype.tooltipBeforeOpen=function(e){e.element&&e.element.setAttribute("data-rte-id",this.parent.getID())},e.prototype.renderDropDownButton=function(e){var t,i=this;e.element.classList.add(Xn),t=e.cssClass+" "+lo+" "+co,this.parent.inlineMode.enable&&Q.isDevice&&(t=t+" "+qn);var n=this,o=new Od({items:e.items,iconCss:e.iconCss,cssClass:t,content:e.content,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,select:this.dropDownSelected.bind(this),beforeOpen:function(e){if(!n.parent.readonly&&n.parent.enabled){if(ru()&&"keydown"===e.event.type&&i.parent.formatter.editorManager.nodeSelection&&!i.parent.inputElement.contains(i.parent.getRange().startContainer)&&i.parent.notify(on,e),"Markdown"!==n.parent.editorMode){var t=n.parent.getRange().startContainer.parentElement,r=t.closest("table"),s=t.closest("tr");if(!g(r)&&r.classList.contains("e-dashed-border"))for(var a=0;a<e.element.childNodes.length;a++)e.element.childNodes[a].classList.contains("e-dashed-borders")&&G([e.element.childNodes[a]],"e-active");if(!g(r)&&r.classList.contains("e-alternate-rows")&&""!==window.getComputedStyle(s).backgroundColor)for(a=0;a<e.element.childNodes.length;a++)e.element.childNodes[a].classList.contains("e-alternate-rows")&&G([e.element.childNodes[a]],"e-active");for(var l=n.parent.getRange().startContainer;l!==n.parent.inputElement&&!g(l.parentElement);){"#text"===l.nodeName&&(l=l.parentElement);var c=window.getComputedStyle(l).textAlign;if(!g(e.items[0])&&"Alignments"===e.items[0].command){if("Align Left"===e.items[0].text&&"left"===c||"start"===c){G([e.element.childNodes[0]],"e-active");break}if("Align Center"===e.items[1].text&&"center"===c){G([e.element.childNodes[1]],"e-active");break}if("Align Right"===e.items[2].text&&"right"===c){G([e.element.childNodes[2]],"e-active");break}if("Align Justify"===e.items[3].text&&"justify"===c){G([e.element.childNodes[3]],"e-active");break}}l=l.parentElement}var h=t.closest("img"),d=h||t.querySelector("img");if(!g(e.items[0])&&"Images"===e.items[0].command&&!g(d)){a=void 0;d.classList.contains("e-imgleft")||d.classList.contains("e-imginline")?a=0:d.classList.contains("e-imgcenter")||d.classList.contains("e-imgbreak")?a=1:d.classList.contains("e-imgright")&&(a=2),g(e.element.childNodes[a])||G([e.element.childNodes[a]],"e-active")}var p=t.closest(".e-video-wrap"),u=p||t.querySelector("video");if(!g(e.items[0])&&"Videos"===e.items[0].command&&!g(u)){a=void 0;u.classList.contains("e-video-left")||u.classList.contains("e-video-inline")?a=0:u.classList.contains("e-video-center")||u.classList.contains("e-video-break")?a=1:u.classList.contains("e-video-right")&&(a=2),g(e.element.childNodes[a])||G([e.element.childNodes[a]],"e-active")}if(!g(e.items[0])&&("Formats"===e.items[0].command||"Font"===e.items[0].command)){var m=[],f=[],y=!1;i.parent.format.types.forEach((function(e){f.push(e.value.toLocaleLowerCase())})),i.parent.fontFamily.items.forEach((function(e){m.push(e.value)}));var v=Nm.get(i.parent.contentModule.getDocument(),i.parent.contentModule.getEditPanel(),f,null,m);for(a=0;a<e.element.childNodes.length;a++){(N=i.parent.createElement("div")).innerHTML=o.content.trim(),!y&&(""!==N.textContent.trim()&&e.element.childNodes[a].textContent.trim()===N.textContent.trim()||"Formats"===e.items[0].command&&!g(v.formats)&&i.parent.format.types[a].value.toLowerCase()===v.formats.toLowerCase()&&e.element.childNodes[a].classList.contains(i.parent.format.types[a].cssClass)||"FontName"===e.items[0].subCommand&&"Font"===e.items[0].command&&!g(v.fontname)&&!g(i.parent.fontFamily.items[a])&&i.parent.fontFamily.items[a].value.toLowerCase()===v.fontname.toLowerCase()&&e.element.childNodes[a].classList.contains(i.parent.fontFamily.items[a].cssClass)||"FontName"===e.items[0].subCommand&&""===i.parent.fontFamily.items[a].value&&g(v.fontname)&&e.element.childNodes[a].classList.contains(i.parent.fontFamily.items[a].cssClass)||"FontSize"===e.items[0].subCommand&&"Default"===e.element.childNodes[a].textContent&&"Font Size"===N.textContent&&""===i.parent.fontSize.items[a].value&&!g(v.fontsize))?e.element.childNodes[a].classList.contains("e-active")||(G([e.element.childNodes[a]],"e-active"),y=!0):X([e.element.childNodes[a]],"e-active")}}}else if("Markdown"===n.parent.editorMode&&"Formats"===e.items[0].command){var b=[];y=!1;i.parent.format.types.forEach((function(e){b.push(e.value.toLocaleLowerCase())}));var M=e.element.childNodes;for(a=0;a<M.length;a++){var N;(N=i.parent.createElement("div")).innerHTML=o.content.trim(),y||""===N.textContent.trim()||M[a].textContent.trim()!==N.textContent.trim()?X([M[a]],"e-active"):M[a].classList.contains("e-active")||(G([M[a]],"e-active"),y=!0)}}n.parent.notify(tn,e)}else e.cancel=!0},close:this.dropDownClose.bind(this),beforeClose:this.dropDownBeforeClose.bind(this),open:this.dropDownOpen.bind(this),beforeItemRender:this.beforeDropDownItemRender.bind(this)});return o.isStringTemplate=!0,o.createElement=n.parent.createElement,o.appendTo(e.element),e.element.tabIndex=-1,document.getElementById(o.element.id+"-popup").setAttribute("aria-owns",this.parent.getID()),o},e.prototype.mouseOutHandler=function(){if(g(this.tooltipTargetEle)){var e=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().ownerDocument:this.parent.contentModule.getDocument();this.tooltipTargetEle=e.querySelector("[data-title]"),this.tooltipTargetEle.setAttribute("title",this.tooltipTargetEle.getAttribute("data-title"))}else this.tooltipTargetEle.setAttribute("title",this.tooltipTargetEle.getAttribute("data-title"));this.tooltipTargetEle.removeAttribute("data-title"),q.remove(this.tooltipTargetEle,"mouseout",this.mouseOutHandler)},e.prototype.closeTooltip=function(e){if(e.isTitle)this.tooltipTargetEle=e.target,this.tooltipTargetEle.setAttribute("data-title",this.tooltipTargetEle.getAttribute("title")),this.tooltipTargetEle.removeAttribute("title"),q.add(this.tooltipTargetEle,"mouseout",this.mouseOutHandler,this);else{var t=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().ownerDocument:this.parent.contentModule.getDocument();this.tooltipTargetEle=se(e.target,"[data-tooltip-id]"),g(this.tooltipTargetEle)||!this.parent.showTooltip||g(t.querySelector(".e-tooltip-wrap"))||(this.destroyTooltip(),this.tooltipTargetEle.setAttribute("data-title",this.tooltipTargetEle.getAttribute("title")),this.tooltipTargetEle.removeAttribute("title"),q.add(this.tooltipTargetEle,"mouseout",this.mouseOutHandler,this))}},e.prototype.renderListDropDown=function(e){var t=this,i=this,n=lo+" "+co+(this.parent.inlineMode?" "+qn:"");n+=" "+("NumberFormatList"===e.itemName?"e-rte-numberformatlist-dropdown":"e-rte-bulletformatlist-dropdown");var o=i.parent.createElement("span",{className:po}),r=i.parent.createElement("span",{className:e.cssClass});o.appendChild(r);var s=new Od({items:e.items,cssClass:n,content:e.content,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,select:this.dropDownSelected.bind(this),beforeOpen:function(e){if("safari"!==Q.info.name||i.parent.inputElement.contains(i.parent.getRange().startContainer)||i.parent.notify(on,{}),"Markdown"!==i.parent.editorMode){var n=i.parent.getRange().startContainer.parentElement.closest("LI"),o=g(n)?null:n.parentElement,r=e.items[0].subCommand;if(!g(o)){var a="NumberFormatList"===r&&"OL"===o.nodeName,l="BulletFormatList"===r&&"UL"===o.nodeName;if(a||l){var c=o.style.listStyleType.split("-").join("").toLocaleLowerCase();c="decimal"===c?"number":c;for(var h=0;h<e.element.childNodes.length;h++){if(c===e.element.childNodes[h].innerHTML.split(" ").join("").toLocaleLowerCase()){G([e.element.childNodes[h]],"e-active");break}if(""===c&&"None"!==e.element.childNodes[h].innerHTML){G([e.element.childNodes[h]],"e-active");break}}}}}if(t.closeTooltip({target:e.event.target}),!i.parent.readonly&&i.parent.enabled){var d=e.event?e.event.target:null;i.currentElement=s.element,i.currentDropdown=s,e.event&&"click"===e.event.type&&(d.classList.contains(po)||d.parentElement.classList.contains(po))?e.cancel=!0:i.parent.notify(tn,e)}else e.cancel=!0},close:this.dropDownClose.bind(this),open:this.dropDownOpen.bind(this),beforeItemRender:this.beforeDropDownItemRender.bind(this)});return s.isStringTemplate=!0,s.createElement=i.parent.createElement,s.appendTo(e.element),e.element.tabIndex=-1,e.element.setAttribute("role","button"),document.getElementById(s.element.id+"-popup").setAttribute("aria-owns",this.parent.getID()),1===e.element.childElementCount&&s.element.insertBefore(o,s.element.querySelector(".e-caret")),e.element.tabIndex=-1,s.element.removeAttribute("type"),s.element.onmousedown=function(){"safari"===Q.info.name&&i.parent.notify(nn,{})},s.element.onkeydown=function(){"safari"===Q.info.name&&i.parent.notify(nn,{})},s},e.prototype.paletteSelection=function(e,t){var i=e.element.querySelector(".e-control.e-colorpicker"),n=[].slice.call(oe(".e-tile",i.parentElement));X(n,"e-selected");var o=t.querySelector("."+lo).style.borderBottomColor;n.filter((function(e){e.style.backgroundColor===o&&G([e],"e-selected")}))},e.prototype.renderColorPickerDropDown=function(e,t,i,n){var o=this,r=this,s=lo+" "+co+(this.parent.inlineMode?" "+qn:"");s+=" "+("backgroundcolor"===t?"e-rte-backgroundcolor-dropdown":"e-rte-fontcolor-dropdown"),s+=this.parent.getCssClass(!0);var a,l=r.parent.createElement("span",{className:uo}),c=r.parent.createElement("span",{className:e.cssClass}),h=g(n)?r.parent.backgroundColor.default:n;c.style.borderBottomColor="backgroundcolor"===t?h:r.parent.fontColor.default,l.appendChild(c);var d=new Od({target:i.element.parentElement,cssClass:s,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,beforeOpen:function(t){if(!r.parent.readonly&&r.parent.enabled){var i=t.event?t.event.target:null;if(r.currentElement=d.element,r.currentDropdown=d,r.paletteSelection(t,r.currentElement),t.event&&"click"===t.event.type&&(i.classList.contains(uo)||i.parentElement.classList.contains(uo))){t.cancel=!0;var n=i.classList.contains(lo)?i.style.borderBottomColor:i.querySelector("."+lo).style.borderBottomColor;r.parent.notify(on,{});var s=(a=r.parent.formatter.editorManager.nodeSelection.getRange(r.parent.contentModule.getDocument())).startContainer.parentNode,l=se(a.startContainer.parentNode,"table");if(("TD"===a.startContainer.nodeName||"TH"===a.startContainer.nodeName||se(a.startContainer.parentNode,"td,th")||r.parent.iframeSettings.enable&&!function(e,t){var i=!1;return e.classList.contains(t)&&(i=!0),i}(s.ownerDocument.querySelector("body"),"e-lib"))&&a.collapsed&&"BackgroundColor"===e.subCommand&&(se(l,"."+zn)||r.parent.iframeSettings.enable)){var c=Cm({name:"tableColorPickerChanged",item:{command:"Table",subCommand:"BackgroundColor",value:n}},e);r.parent.formatter.process(o.parent,c,null,n),r.parent.notify(yn,{})}else r.parent.notify(ln,{item:{command:e.command,subCommand:e.subCommand,value:n}})}else{var h=E(t.element.querySelector(".e-control.e-colorpicker"),yp);h.showButtons=!t.element.querySelector(".e-color-palette"),h.dataBind(),t.element.onclick=function(e){e.target.classList.contains("e-cancel")&&d.toggle()}}}else t.cancel=!0},open:function(e){var t;o.setColorPickerContentWidth(i);var n=e.element.querySelector(".e-control.e-colorpicker");(t=e.element.querySelector(".e-color-palette")?n.parentElement.querySelector(".e-palette"):n.parentElement.querySelector("e-handler"))&&t.focus(),o.pickerRefresh(e)},beforeClose:function(t){var i=t.event?t.event.target:null;if(o.dropDownBeforeClose(t),t.event&&"click"===t.event.type&&(i.classList.contains(uo)||i.parentElement.classList.contains(uo))){var n=i.classList.contains(lo)?i.style.borderBottomColor:i.querySelector("."+lo).style.borderBottomColor;if(("TD"===(a=r.parent.formatter.editorManager.nodeSelection.getRange(r.parent.contentModule.getDocument())).startContainer.nodeName||"TH"===a.startContainer.nodeName||se(a.startContainer.parentNode,"td,th"))&&a.collapsed){var s=Cm({name:"tableColorPickerChanged",item:{command:"Table",subCommand:"BackgroundColor",value:n}},e);r.parent.formatter.process(o.parent,s,null,n),r.parent.notify(yn,{})}else r.parent.notify(ln,{item:{command:e.command,subCommand:e.subCommand,value:n}})}else;},close:function(){o.isEscapeKey||r.parent.notify(on,{})}});return d.isStringTemplate=!0,d.createElement=r.parent.createElement,e.element.setAttribute("role","button"),d.appendTo(e.element),e.element.setAttribute("aria-label","backgroundcolor"===t?tr.backgroundColor:tr.fontColor),document.getElementById(d.element.id+"-popup").setAttribute("aria-owns",this.parent.getID()),d.element.insertBefore(l,d.element.querySelector(".e-caret")),e.element.tabIndex=-1,d.element.removeAttribute("type"),d.element.onmousedown=function(){r.parent.notify(nn,{})},d.element.onkeydown=function(){(!ru()||ru()&&r.parent.inputElement.contains(r.parent.getRange().startContainer))&&r.parent.notify(nn,{})},d},e.prototype.pickerRefresh=function(e){if("Picker"===this.parent.backgroundColor.mode){var t=e.element.parentElement;t.style.width=(t.offsetWidth+5).toString()+"px",E(t,da).refreshPosition(t),t.style.width=(t.offsetWidth-5).toString()+"px"}},e.prototype.setColorPickerContentWidth=function(e){var t=e.element.nextSibling;if("0px"===t.style.width){t.style.width="";var i=parseInt(getComputedStyle(t).borderBottomWidth,10);t.style.width=N(t.children[0].offsetWidth+i+i)}},e.prototype.renderColorPicker=function(e,t){var i=this,n=this,o=new yp({enableRtl:this.parent.enableRtl,inline:!0,value:null,cssClass:("backgroundcolor"===t?"e-rte-backgroundcolor-colorpicker":"e-rte-fontcolor-colorpicker")+" "+e.cssClass,created:function(){var e="backgroundcolor"===t?n.parent.backgroundColor.default:n.parent.fontColor.default;o.setProperties({value:e})},mode:"backgroundcolor"===t?n.parent.backgroundColor.mode:n.parent.fontColor.mode,modeSwitcher:"backgroundcolor"===t?n.parent.backgroundColor.modeSwitcher:n.parent.fontColor.modeSwitcher,presetColors:"backgroundcolor"===t?this.parent.backgroundColor.colorCode:this.parent.fontColor.colorCode,columns:"backgroundcolor"===t?this.parent.backgroundColor.columns:this.parent.fontColor.columns,beforeTileRender:function(e){if(e.element.classList.add("e-rte-square-palette"),e.element.classList.add("e-custom-tile"),!g(i.parent.cssClass))for(var t=i.parent.getCssClass().split(" "),n=0;n<t.length;n++)""!==t[n].trim()&&e.element.classList.add(t[n]);""===e.value&&e.element.classList.add("e-nocolor-item")},change:function(t){var o=t.currentValue.rgba;t.item={command:e.command,subCommand:e.subCommand,value:o},n.parent.notify(on,{}),n.currentElement&&(n.currentElement.querySelector("."+lo).style.borderBottomColor=o);var r=n.parent.formatter.editorManager.nodeSelection.getRange(n.parent.contentModule.getDocument()),s=se(r.startContainer.parentNode,"table");("TD"===r.startContainer.nodeName||"TH"===r.startContainer.nodeName||"BODY"===r.startContainer.nodeName||r.startContainer.parentNode&&se(r.startContainer.parentNode,"td,th"))&&r.collapsed&&"BackgroundColor"===e.subCommand&&(s&&se(s,"."+zn)||n.parent.iframeSettings.enable)?(t.name="tableColorPickerChanged",t.item.command="Table",n.parent.formatter.process(i.parent,t,t.event,t.item.value),n.parent.notify(yn,{})):n.parent.notify(ln,t),n.currentDropdown&&n.currentDropdown.toggle()},beforeModeSwitch:function(e){""===o.value&&o.setProperties({value:"Picker"===e.mode?"#008000ff":""},!0),o.showButtons="Palette"!==e.mode}});return o.isStringTemplate=!0,o.createElement=this.parent.createElement,o.appendTo(document.getElementById(e.target)),o},e.prototype.renderPanel=function(){this.getPanel().classList.add(Bn)},e.prototype.getPanel=function(){return this.toolbarPanel},e.prototype.setPanel=function(e){this.toolbarPanel=e},e.prototype.destroy=function(){if(!this.isDestroyed){if(this.tooltip&&!this.tooltip.isDestroyed){this.tooltip.destroy();for(var e=document.querySelectorAll('[data-rte-id="'+this.parent.getID()+'"]'),t=0;t<e.length;t++){var i=e[t];this.parent.getID()===i.getAttribute("data-rte-id")&&ee(i)}}this.unWireEvent(),this.mode=null,this.toolbarPanel=null,this.currentElement=null,this.currentDropdown=null,this.tooltip=null,this.tooltipTargetEle=null,this.isDestroyed=!0}},e}(),Dm=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Tm=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Lm={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,space:32,escape:27,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,semicolon:186,plus:187,comma:188,minus:189,dot:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222,"]":221,"[":219,"=":187,"<":188,">":190,"`":192},Sm=function(e){function t(t,n){var o=e.call(this,n,t)||this;return o.keyPressHandler=function(e){for(var t=e.altKey,n=e.ctrlKey,r=e.shiftKey,s=e.metaKey,a=e.which,l=0,c=Object.keys(o.keyConfigs);l<c.length;l++)for(var h=c[l],d=0,p=o.keyConfigs[""+h].split(",");d<p.length;d++){var u=p[d],m=i.getKeyConfigData(u.trim());t!==m.altKey||n!==m.ctrlKey&&!s||r!==m.shiftKey||a!==m.keyCode||(e.action=h)}o.keyAction&&o.keyAction(e)},o.bind(),o}var i;return Dm(t,e),i=t,t.prototype.destroy=function(){this.unwireEvents(),e.prototype.destroy.call(this)},t.prototype.onPropertyChanged=function(e,t){},t.prototype.bind=function(){this.wireEvents()},t.prototype.getModuleName=function(){return"keyboard"},t.prototype.wireEvents=function(){this.element.addEventListener(this.eventName,this.keyPressHandler)},t.prototype.unwireEvents=function(){this.element.removeEventListener(this.eventName,this.keyPressHandler)},t.getKeyConfigData=function(e){if(e in this.configCache)return this.configCache[""+e];var t=e.toLowerCase().split("+"),n={altKey:-1!==t.indexOf("alt"),ctrlKey:-1!==t.indexOf("ctrl"),shiftKey:-1!==t.indexOf("shift"),keyCode:null};return t[t.length-1].length>1&&Number(t[t.length-1])?n.keyCode=Number(t[t.length-1]):n.keyCode=i.getKeyCode(t[t.length-1]),i.configCache[""+e]=n,n},t.getKeyCode=function(e){return Lm[""+e]||e.toUpperCase().charCodeAt(0)},t.configCache={},Tm([De({})],t.prototype,"keyConfigs",void 0),Tm([De("keyup")],t.prototype,"eventName",void 0),Tm([Se()],t.prototype,"keyAction",void 0),t=i=Tm([Ie],t)}(pe),Im=function(){function e(e,t){this.parent=e;var i=t;this.rendererFactory=i.getService("rendererFactory"),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on($i,this.sourceCode,this),this.parent.on(ji,this.onInitialEnd,this),this.parent.on(en,this.updateSourceCode,this),this.parent.on(zi,this.destroy,this)},e.prototype.onInitialEnd=function(){this.parent.formatter.editorManager.observer.on(uu,this.onKeyDown,this)},e.prototype.removeEventListener=function(){this.unWireEvent(),this.parent.off($i,this.sourceCode),this.parent.off(en,this.updateSourceCode),this.parent.off(ji,this.onInitialEnd),this.parent.off(zi,this.destroy),this.parent.formatter.editorManager.observer.off(uu,this.onKeyDown)},e.prototype.getSourceCode=function(){return this.parent.createElement("textarea",{className:Co+this.parent.getCssClass(!0)})},e.prototype.wireEvent=function(e){this.keyboardModule=new Sm(e,{keyAction:this.previewKeyDown.bind(this),keyConfigs:this.parent.formatter.keyConfig,eventName:"keydown"}),q.add(this.previewElement,"mousedown",this.mouseDownHandler,this)},e.prototype.unWireEvent=function(){this.previewElement&&q.remove(this.previewElement,"mousedown",this.mouseDownHandler),this.keyboardModule&&!this.keyboardModule.isDestroyed&&this.keyboardModule.destroy()},e.prototype.wireBaseKeyDown=function(){this.parent.keyboardModule=new Sm(this.contentModule.getEditPanel(),{keyAction:this.parent.keyDown.bind(this.parent),keyConfigs:this.parent.formatter.keyConfig,eventName:"keydown"})},e.prototype.unWireBaseKeyDown=function(){this.parent.keyboardModule.destroy()},e.prototype.mouseDownHandler=function(e){this.parent.notify(sn,{args:e})},e.prototype.previewKeyDown=function(e){switch(e.action){case"html-source":this.updateSourceCode(e),e.preventDefault();break;case"toolbar-focus":if(this.parent.toolbarSettings.enable&&this.parent.getToolbarElement()){var t=this.parent.getToolbarElement().querySelector(".e-toolbar-item:not(.e-overlay)[title]");t.firstElementChild.removeAttribute("tabindex"),t.firstElementChild.focus()}}},e.prototype.onKeyDown=function(e){if("html-source"===e.event.action)e.event.preventDefault(),this.sourceCode(e),e.callBack({requestType:"SourceCode",editorMode:"HTML",event:e.event})},e.prototype.sourceCode=function(e){var t=this;this.parent.notify("hidePopup",{}),this.parent.isBlur=!1,this.parent.trigger(Ki,{requestType:"SourceCode",targetItem:"SourceCode",args:e,cancel:!1},(function(i){if(!i.cancel){var n=oe("."+Kn,t.parent.element);t.contentModule=t.rendererFactory.getRenderer(bi.Content);var o=t.parent.inputElement.getBoundingClientRect().height;t.parent.rootContainer.classList.add("e-source-code-enabled"),t.parent.notify(Ji,{targetItem:"SourceCode",updateItem:"Preview",baseToolbar:t.parent.getBaseToolbarObject()}),g(t.previewElement)&&(t.previewElement=t.getSourceCode()),t.parent.inputElement.innerHTML=t.replaceAmpersand(t.parent.inputElement.innerHTML),t.parent.updateValueData();var r=void 0;g(t.parent.element.querySelector("#"+t.parent.getID()+"_source-view"))?r=t.parent.createElement("div",{className:"e-source-content",id:t.parent.getID()+"_source-view",attrs:{style:"height:"+o+"px"}}):(r=t.parent.element.querySelector("#"+t.parent.getID()+"_source-view")).style.height=o+"px",r.appendChild(t.previewElement),t.parent.rootContainer.appendChild(r),t.getPanel().value=Sr(t.getTextAreaValue(),t.parent.editorMode),t.parent.isBlur=!1,t.parent.disableToolbarItem(t.parent.toolbarSettings.items),t.parent.enableToolbarItem("SourceCode"),t.parent.getToolbar()&&X([t.parent.getToolbar()],[ao]),X(n,[so]),t.wireEvent(t.previewElement),t.unWireBaseKeyDown(),t.previewElement.focus(),t.parent.inputElement.innerHTML=Sr(t.replaceAmpersand(t.parent.inputElement.innerHTML),t.parent.editorMode),t.parent.updateValue(),t.parent.trigger(Zi,{requestType:"SourceCode",targetItem:"SourceCode",args:e}),t.parent.invokeChangeEvent(),!g(t.parent.saveInterval)&&t.parent.saveInterval>0&&t.parent.autoSaveOnIdle&&(t.codeViewTimeInterval=setInterval((function(){t.parent.notify(Tn,{})}),t.parent.saveInterval))}}))},e.prototype.updateSourceCode=function(e){var t=this;this.parent.isBlur=!1,this.parent.trigger(Ki,{requestType:"Preview",targetItem:"Preview",args:e,cancel:!1},(function(i){if(!i.cancel){t.parent.rootContainer.classList.remove("e-source-code-enabled");var n=t.getPanel();t.parent.notify(Ji,{targetItem:"Preview",updateItem:"SourceCode",baseToolbar:t.parent.getBaseToolbarObject()}),g(n)||(n.value=Lr(t.replaceAmpersand(n.value),t.parent.editorMode));var o=t.parent.serializeValue(n.value),r=void 0;r=null===o||""===o?"DIV"===t.parent.enterKey?"<div><br/></div>":"BR"===t.parent.enterKey?"<br/>":"<p><br/></p>":o,t.contentModule.getEditPanel().innerHTML=Lr(t.replaceAmpersand(r),t.parent.editorMode),t.parent.isBlur=!1,t.parent.enableToolbarItem(t.parent.toolbarSettings.items),t.parent.getToolbar()&&X([t.parent.getToolbar()],[ao]),t.unWireEvent(),t.wireBaseKeyDown(),t.contentModule.getEditPanel().focus(),t.parent.updateValue(),t.parent.trigger(Zi,{requestType:"Preview",targetItem:"Preview",args:e}),t.parent.formatter.enableUndo(t.parent),t.parent.addAudioVideoWrapper(),clearTimeout(t.codeViewTimeInterval),t.parent.invokeChangeEvent(),t.parent.notify(Ii,{})}}))},e.prototype.replaceAmpersand=function(e){var t=this;if("HTML"===this.parent.editorMode){["times","divide","ne"].forEach((function(i){var n=new RegExp("&(amp;)*("+i+")","g");if(t.parent.enableHtmlSanitizer){var o=t.parent.enableHtmlEncode?"&amp;amp;amp;amp;"+i:"&amp;amp;"+i;e=e.replace(n,o)}else e=e.replace(n,"&amp;"+i)}))}return e},e.prototype.getTextAreaValue=function(){return"<p><br></p>"===this.contentModule.getEditPanel().innerHTML||"<div><br></div>"===this.contentModule.getEditPanel().innerHTML||"<br>"===this.contentModule.getEditPanel().innerHTML||1===this.contentModule.getEditPanel().childNodes.length&&"P"===this.contentModule.getEditPanel().childNodes[0].tagName&&7===this.contentModule.getEditPanel().innerHTML.length||"DIV"===this.contentModule.getEditPanel().childNodes[0].tagName&&11===this.contentModule.getEditPanel().innerHTML.length?"":this.parent.value},e.prototype.getPanel=function(){return this.parent.element&&this.parent.element.querySelector(".e-rte-srctextarea")},e.prototype.destroy=function(){g(this.parent)||this.removeEventListener()},e}(),wm=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(zi,this.removeEventListener,this),this.parent.on(Ln,this.documentClickClosedBy,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(zi,this.removeEventListener),this.parent.off(Ln,this.documentClickClosedBy))},e.prototype.render=function(e){var t;return e.beforeOpen=this.beforeOpen.bind(this),e.open=this.open.bind(this),e.position={X:"center",Y:"string"===e.target||"BODY"!==e.target.nodeName||g(e.position)?this.getDialogPosition():e.position.Y},g(e.close)&&(e.close=this.close.bind(this)),e.beforeClose=this.beforeClose.bind(this),(t=new Sl(e)).isStringTemplate=!0,t},e.prototype.beforeOpen=function(e){e.element.classList.contains("e-dialog")&&(g(se(e.target,"form"))||(this.dialogEle=e.element,this.dialogEle.addEventListener("keydown",this.handleEnterKeyDown)));this.parent.trigger("beforeDialogOpen",e,this.beforeOpenCallback.bind(this,e))},e.prototype.handleEnterKeyDown=function(e){"Enter"===e.key&&e.preventDefault()},e.prototype.beforeOpenCallback=function(e){e.cancel&&this.parent.notify("clearDialogObj",null)},e.prototype.open=function(e){this.parent.trigger("dialogOpen",e)},e.prototype.documentClickClosedBy=function(e){this.outsideClickClosedBy=e.closedBy},e.prototype.beforeClose=function(e){this.dialogEle&&this.dialogEle.removeEventListener("keydown",this.handleEnterKeyDown),e.closedBy="outside click"===this.outsideClickClosedBy?this.outsideClickClosedBy:e.closedBy,this.parent.trigger("beforeDialogClose",e,(function(e){e.cancel||e.container.classList.contains("e-popup-close")&&(e.cancel=!0)})),this.outsideClickClosedBy=""},e.prototype.getDialogPosition=function(){var e=this.parent.element.getBoundingClientRect().top;if(e<0){for(var t=0,i=this.parent.element;"BODY"!==i.nodeName;){var n=i.getBoundingClientRect().top;n>0&&(t=n),i=i.parentElement}return(e=Math.abs(e)+t).toString()}return"top"},e.prototype.close=function(e){this.parent.trigger("dialogClose",e)},e}(),xm=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jm="\n <!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>"+'\n@charset "UTF-8";\n\n* {\n box-sizing: border-box;\n}\n\nhtml {\n height: auto;\n}\n\nhtml, body {\n margin: 0;\n}\n\nbody {\n color: #333;\n word-wrap: break-word;\n}\n\n.e-content {\n background: unset;\n min-height: 100px;\n outline: 0 solid transparent;\n padding: 16px;\n position: relative;\n overflow-x: auto;\n font-weight: normal;\n line-height: 1.5;\n font-size: 14px;\n text-align: inherit;\n font-family: "Roboto", "Segoe UI", "GeezaPro", "DejaVu Serif", "sans-serif", "-apple-system", "BlinkMacSystemFont";\n}\n\n.e-content p {\n margin: 0 0 10px;\n margin-bottom: 10px;\n}\n\n.e-content h1 {\n font-size: 2.857em;\n font-weight: 600;\n line-height: 1.2;\n margin: 10px 0;\n}\n\n.e-content h2 {\n font-size: 2.285em;\n font-weight: 600;\n line-height: 1.2;\n margin: 10px 0;\n}\n\n.e-content h3 {\n font-size: 2em;\n font-weight: 600;\n line-height: 1.2;\n margin: 10px 0;\n}\n\n.e-content h4 {\n font-size: 1.714em;\n font-weight: 600;\n line-height: 1.2;\n margin: 10px 0;\n}\n\n.e-content h5 {\n font-size: 1.428em;\n font-weight: 600;\n line-height: 1.2;\n margin: 10px 0;\n}\n\n.e-content h6 {\n font-size: 1.142em;\n font-weight: 600;\n line-height: 1.5;\n margin: 10px 0;\n}\n\n.e-content blockquote {\n margin: 10px 0;\n padding-left: 12px;\n border-left: 2px solid #5c5c5c;\n}\n\n.e-rtl.e-content blockquote {\n padding-left: 0;\n padding-right: 12px;\n}\n\n.e-content pre {\n border: 0;\n border-radius: 0;\n color: #333;\n font-size: inherit;\n line-height: inherit;\n margin: 0 0 10px;\n overflow: visible;\n padding: 0;\n white-space: pre-wrap;\n word-break: inherit;\n word-wrap: break-word;\n}\n\n.e-content code {\n background: #9d9d9d26;\n color: #ed484c;\n}\n\n.e-content strong,\n.e-content b {\n font-weight: bold;\n}\n\n.e-content a {\n text-decoration: none;\n user-select: auto;\n}\n\n.e-content a:hover {\n text-decoration: underline;\n}\n\n.e-content li {\n margin-bottom: 10px;\n}\n\n.e-content li ol,\n.e-content li ul {\n margin-block-start: 10px;\n}\n\n.e-content ul {\n list-style-type: disc;\n}\n\n.e-content ul ul,\n.e-content ol ul {\n list-style-type: circle;\n}\n\n.e-content ul ul ul,\n.e-content ol ul ul,\n.e-content ul ol ul,\n.e-content ol ol ul {\n list-style-type: square;\n}\n\n.e-content p:last-child,\n.e-content pre:last-child,\n.e-content blockquote:last-child {\n margin-bottom: 0;\n}\n\n.e-content h3 + h4,\n.e-content h4 + h5,\n.e-content h5 + h6 {\n margin-top: 0.6em;\n}\n\n.e-content ul:last-child {\n margin-bottom: 0;\n}\n\n.e-content table {\n margin-bottom: 10px;\n border-collapse: collapse;\n empty-cells: show;\n}\n\n.e-content table.e-cell-select {\n position: relative;\n}\n\n.e-content table.e-cell-select::after {\n content: \'\';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 2px solid #4a90e2;\n pointer-events: none;\n}\n\ntable .e-cell-select {\n border: 1px double #4a90e2 !important;\n}\n\n.e-content table.e-rte-table th {\n background-color: #E0E0E0;\n}\n\n.e-rte-table td,\n.e-rte-table th {\n border: 1px solid #BDBDBD;\n height: 20px;\n min-width: 20px;\n padding: 2px 5px;\n}\n\n.e-rte-table td.e-cell-select.e-multi-cells-select,\n.e-rte-table th.e-cell-select.e-multi-cells-select {\n position: relative;\n}\n\n.e-rte-table td.e-cell-select.e-multi-cells-select::after,\n.e-rte-table th.e-cell-select.e-multi-cells-select::after {\n background-color: rgba(13, 110, 253, 0.08);\n content: "";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n bottom: 0;\n pointer-events: none;\n right: 0;\n}\n\ntable td.e-multi-cells-select ::selection,\ntable th.e-multi-cells-select ::selection {\n background-color: transparent;\n}\n\ntd.e-multi-cells-select,\nth.e-multi-cells-select {\n user-select: none !important;\n}\n\n.e-rte-table.e-dashed-border td,\n.e-rte-table.e-dashed-border th {\n border-style: dashed;\n}\n\n.e-rte-table.e-alternate-border tbody tr:nth-child(2n) {\n background-color: #F5F5F5;\n}\n\n.e-rte-image,\n.e-rte-audio,\n.e-rte-video {\n border: 0;\n cursor: pointer;\n display: block;\n float: none;\n margin: auto;\n max-width: 100%;\n position: relative;\n}\n\n.e-rte-image.e-imginline,\n.e-rte-audio.e-audio-inline,\n.e-rte-video.e-video-inline {\n margin-left: 5px;\n margin-right: 5px;\n display: inline-block;\n float: none;\n max-width: 100%;\n padding: 1px;\n vertical-align: bottom;\n}\n\n.e-rte-image.e-imgcenter,\n.e-rte-video.e-video-center {\n cursor: pointer;\n display: block;\n float: none;\n margin: 5px auto;\n max-width: 100%;\n position: relative;\n}\n\n.e-rte-image.e-imgright,\n.e-rte-video.e-video-right {\n float: right;\n margin: 0 auto;\n margin-left: 5px;\n text-align: right;\n}\n\n.e-rte-image.e-imgleft,\n.e-rte-video.e-video-left {\n float: left;\n margin: 0 auto;\n margin-right: 5px;\n text-align: left;\n}\n\n.e-rte-img-caption {\n display: inline-block;\n margin: 5px auto;\n max-width: 100%;\n position: relative;\n}\n\n.e-rte-img-caption.e-caption-inline {\n display: inline-block;\n margin: 5px auto;\n margin-left: 5px;\n margin-right: 5px;\n max-width: calc(100% - (2 * 5px));\n position: relative;\n text-align: center;\n vertical-align: bottom;\n}\n\n.e-rte-img-caption.e-imgcenter {\n display: contents;\n margin-left: auto;\n margin-right: auto;\n}\n\n.e-rte-img-caption.e-imgright {\n display: contents;\n margin-left: auto;\n margin-right: 0;\n}\n\n.e-rte-img-caption.e-imgleft {\n display: contents;\n margin-left: 0;\n margin-right: auto;\n}\n\n.e-img-caption.e-rte-img-caption.e-imgbreak {\n display: contents;\n}\n\n.e-rte-img-caption .e-img-inner {\n display: block;\n font-size: 16px;\n font-weight: initial;\n margin: auto;\n opacity: .9;\n position: relative;\n text-align: center;\n width: 100%;\n}\n\n.e-img-wrap {\n display: inline-block;\n margin: auto;\n padding: 0;\n text-align: center;\n width: 100%;\n}\n\n.e-imgleft,\n.e-video-left {\n float: left;\n margin: 0 5px 0 0;\n text-align: left;\n}\n\n.e-imgright,\n.e-video-right {\n float: right;\n margin: 0 0 0 5px;\n text-align: right;\n}\n\n.e-imgcenter,\n.e-video-center {\n cursor: pointer;\n display: block;\n float: none;\n height: auto;\n margin: 5px auto;\n max-width: 100%;\n position: relative;\n}\n\n.e-control img:not(.e-resize) {\n border: 2px solid transparent;\n z-index: 1000\n}\n\n.e-imginline,\n.e-audio-inline,\n.e-video-inline {\n display: inline-block;\n float: none;\n margin-left: 5px;\n margin-right: 5px;\n vertical-align: bottom;\n}\n\n.e-imgbreak,\n.e-audio-break,\n.e-video-break {\n border: 0;\n cursor: pointer;\n display: block;\n float: none;\n margin: 5px auto;\n max-width: 100%;\n position: relative;\n}\n\n.e-rte-image.e-img-focus:not(.e-resize),\n.e-audio-focus:not(.e-resize),\n.e-video-focus:not(.e-resize) {\n border: solid 2px #4a90e2;\n}\n\nimg.e-img-focus::selection,\naudio.e-audio-focus::selection,\n.e-video-focus::selection {\n background: transparent;\n color: transparent;\n}\n\nspan.e-rte-imageboxmark,\nspan.e-rte-videoboxmark {\n width: 10px;\n height: 10px;\n position: absolute;\n display: block;\n background: #4a90e2;\n border: 1px solid #fff;\n z-index: 1000;\n}\n\n.e-mob-rte.e-mob-span span.e-rte-imageboxmark,\n.e-mob-rte.e-mob-span span.e-rte-videoboxmark {\n background: #4a90e2;\n border: 1px solid #fff;\n}\n\n.e-mob-rte span.e-rte-imageboxmark,\n.e-mob-rte span.e-rte-videoboxmark {\n background: #fff;\n border: 1px solid #4a90e2;\n border-radius: 15px;\n height: 20px;\n width: 20px;\n}\n\n.e-mob-rte.e-mob-span span.e-rte-imageboxmark,\n.e-mob-rte.e-mob-span span.e-rte-videoboxmark {\n background: #4a90e2;\n border: 1px solid #fff;\n}\n\n.e-content img.e-resize,\n.e-content video.e-resize {\n z-index: 1000;\n}\n\n.e-img-caption .e-img-inner {\n outline: 0;\n}\n\n.e-rte-img-caption.e-imgleft .e-img-inner {\n float: left;\n text-align: left;\n}\n\n.e-rte-img-caption.e-imgright .e-img-inner {\n float: right;\n text-align: right;\n}\n\n.e-rte-img-caption.e-imgleft .e-img-wrap,\n.e-rte-img-caption.e-imgright .e-img-wrap {\n display: contents;\n}\n\n.e-img-caption a:focus-visible {\n outline: none;\n}\n\n.e-rte-img-caption .e-rte-image.e-imgright {\n margin-left: auto;\n margin-right: 0;\n}\n\n.e-rte-img-caption .e-rte-image.e-imgleft {\n margin: 0;\n}\n\nspan.e-table-box {\n cursor: nwse-resize;\n display: block;\n height: 10px;\n position: absolute;\n width: 10px;\n background-color: #ffffff;\n border: 1px solid #BDBDBD;\n}\n\nspan.e-table-box.e-rmob {\n height: 14px;\n width: 14px;\n background-color: #BDBDBD;\n border: 1px solid #BDBDBD;\n}\n\n.e-row-resize,\n.e-column-resize {\n background-color: transparent;\n background-repeat: repeat;\n bottom: 0;\n cursor: col-resize;\n height: 1px;\n overflow: visible;\n position: absolute;\n width: 1px;\n}\n\n.e-row-resize {\n cursor: row-resize;\n height: 1px;\n}\n\n.e-table-rhelper {\n cursor: col-resize;\n opacity: .87;\n position: absolute;\n}\n\n.e-table-rhelper.e-column-helper {\n width: 1px;\n}\n\n.e-table-rhelper.e-row-helper {\n height: 1px;\n}\n\n.e-reicon::before {\n border-bottom: 6px solid transparent;\n border-right: 6px solid;\n border-top: 6px solid transparent;\n content: \'\';\n display: block;\n height: 0;\n position: absolute;\n right: 4px;\n top: 4px;\n width: 20px;\n}\n\n.e-reicon::after {\n border-bottom: 6px solid transparent;\n border-left: 6px solid;\n border-top: 6px solid transparent;\n content: \'\';\n display: block;\n height: 0;\n left: 4px;\n position: absolute;\n top: 4px;\n width: 20px;\n z-index: 3;\n}\n\n.e-row-helper.e-reicon::after {\n top: 10px;\n transform: rotate(90deg);\n}\n\n.e-row-helper.e-reicon::before {\n left: 4px;\n top: -20px;\n transform: rotate(90deg);\n}\n\n\n.e-table-rhelper {\n background-color: #4a90e2;\n}\n\n.e-rtl {\n direction: rtl;\n}\n\n.e-rte-placeholder::before {\n content: attr(placeholder);\n opacity: 0.54;\n overflow: hidden;\n padding-top: 16px;\n position: absolute;\n text-align: start;\n top: 0;\n z-index: 1;\n}\n\n.e-resize-enabled,\n.e-count-enabled {\n padding-bottom: 0px;\n}\n'.replace(/[\n\t]/g,"")+"\n </style>\n </head>\n",Om=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xm(t,e),t.prototype.renderPanel=function(){var e=this.parent,t=br(e.value,e),i=jm+('<body contenteditable="true">'+t+"</body></html>"),n=this.parent.createElement("iframe",{id:this.parent.getID()+"_rte-view",className:"e-rte-content",attrs:{srcdoc:i}});if(n.setAttribute("role","none"),this.setPanel(n),!g(this.parent.iframeSettings.sandbox)){var o=this.parent.iframeSettings.sandbox.map((function(e){return e.toLocaleLowerCase().trim()})).join(" ");o.includes("allow-same-origin")||(o+=" allow-same-origin"),n.setAttribute("sandbox",o.trim())}e.rootContainer.appendChild(n),n.contentDocument.body.setAttribute("aria-owns",this.parent.getID()),n.contentDocument.open(),i=this.setThemeColor(i,{color:"#333"}),n.contentDocument.write(i),n.contentDocument.close();var r=n.contentDocument.body;if(r.className="e-content","auto"===this.parent.height&&(r.style.overflowY="hidden"),g(this.parent.fontFamily.default)||(r.style.fontFamily=this.parent.fontFamily.default),g(this.parent.fontSize.default)||(r.style.fontSize=this.parent.fontSize.default),r.id=this.parent.getID()+"_rte-edit-view",e.enableRtl&&this.contentPanel.contentDocument.body.setAttribute("class","e-rtl"),!g(n.contentDocument.head)&&this.parent.iframeSettings.metaTags.length>0){var s=n.contentDocument.head;this.parent.iframeSettings.metaTags.forEach((function(e){var t=document.createElement("meta");for(var i in e)g(e[i])||t.setAttribute("httpEquiv"===i?"http-equiv":i,e[i]);s.appendChild(t)}))}},t.prototype.setThemeColor=function(e,t){var i=getComputedStyle(this.parent.element,".e-richtexteditor").getPropertyValue("color");return e.replace(t.color,i)},t.prototype.getEditPanel=function(){return g(this.contentPanel.contentDocument)?this.parent.inputElement:this.contentPanel.contentDocument.body},t.prototype.getDocument=function(){return this.getEditPanel().ownerDocument},t}(xr),zm=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Am=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},km=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zm(t,e),Am([De(!1)],t.prototype,"enable",void 0),Am([De(["Paragraph","Heading 1","Heading 2","Heading 3","Heading 4","OrderedList","UnorderedList","CodeBlock","Blockquote"])],t.prototype,"items",void 0),Am([De("300px")],t.prototype,"popupWidth",void 0),Am([De("320px")],t.prototype,"popupHeight",void 0),t}(Qe);Ni.InsertImage,Ni.InsertAudio,Ni.InsertVideo,Ni.InsertLink,Ni.InsertTable;var Pm=function(){function e(e,t){this.tools={},this.parent=e,this.locator=t,this.isDestroyed=!1,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener(),this.parent.toolbarSettings&&Object.keys(this.parent.toolbarSettings.itemConfigs).length>0?m(this.tools,Do,vr(this.parent.toolbarSettings.itemConfigs),!0):this.tools=Do,(this.parent.toolbarSettings.enable||this.parent.quickToolbarSettings.enable)&&(this.toolbarRenderer=new Em(this.parent,this.locator),this.renderFactory.addRenderer(bi.Toolbar,this.toolbarRenderer))}return e.prototype.addEventListener=function(){this.parent.on(mn,this.setRtl,this),this.parent.on(Nn,this.setCssClass,this)},e.prototype.removeEventListener=function(){this.parent.off(mn,this.setRtl),this.parent.off(Nn,this.setCssClass)},e.prototype.setCssClass=function(e){g(this.toolbarObj)||(g(e.oldCssClass)?this.toolbarObj.setProperties({cssClass:(this.toolbarObj.cssClass+" "+e.cssClass).trim()}):this.toolbarObj.setProperties({cssClass:(this.toolbarObj.cssClass.replace(e.oldCssClass,"").trim()+" "+e.cssClass).trim()}))},e.prototype.setRtl=function(e){g(this.toolbarObj)||this.toolbarObj.setProperties({enableRtl:e.enableRtl})},e.prototype.getClass=function(e){var t;switch(e){case"fontsize":t="e-rte-inline-size-template";break;case"fontcolor":case"backgroundcolor":t="e-rte-inline-color-template";break;default:t="e-rte-inline-template"}return t},e.prototype.getTemplateObject=function(e,t){var i;switch(e){case"fontcolor":case"backgroundcolor":case"numberformatlist":case"bulletformatlist":i="span";break;default:i="button"}return{command:this.tools[e.toLocaleLowerCase()].command,subCommand:this.tools[e.toLocaleLowerCase()].subCommand,template:this.parent.createElement(i,{id:this.parent.getID()+"_"+t+"_"+this.tools[e.toLocaleLowerCase()].id}).outerHTML,cssClass:this.parent.inlineMode.enable?this.getClass(e):"",tooltipText:ur(e,this.locator)}},e.prototype.getObject=function(e,t){var i=e.toLowerCase();if(-1!==Eo.indexOf(i))return this.getTemplateObject(i,t);switch(i){case"|":return{type:"Separator"};case"-":return{type:"Separator",cssClass:"e-rte-horizontal-separator"};default:return{id:this.parent.getID()+"_"+t+"_"+this.tools[i.toLocaleLowerCase()].id,prefixIcon:this.tools[i.toLocaleLowerCase()].icon,tooltipText:ur(i,this.locator),command:this.tools[i.toLocaleLowerCase()].command,subCommand:this.tools[i.toLocaleLowerCase()].subCommand}}},e.prototype.getItems=function(e,t){var i=this;if(this.parent.toolbarSettings.items.length<1)return[];for(var n=[],o=function(e){if("string"==typeof e)n.push(r.getObject(e,t));else{if(!g(e.click)){var o=e,s=o.click;o.click=function(){if(o.undo&&0===i.parent.formatter.getUndoRedoStack().length&&i.parent.formatter.saveData(),s.call(i),i.parent.formatter.getUndoRedoStack().length>0){var e=i.parent.createElement("div"),t=i.parent.formatter.getUndoRedoStack()[i.parent.formatter.getUndoRedoStack().length-1].text.cloneNode(!0);if(e.appendChild(t),e.innerHTML.trim()===i.parent.inputElement.innerHTML.trim())return}o.undo&&i.parent.formatter.saveData()}}n.push(e)}},r=this,s=0,a=e;s<a.length;s++){o(a[s])}if(this.parent.showTooltip)for(var l=function(e){var t=n[e].tooltipText,i=void 0,o=window.navigator.platform.toLocaleLowerCase().includes("mac");!$o[""+n[e].subCommand]||g(n[e].id)&&g(n[e].cssClass)?i=t:i=$o[""+n[e].subCommand].split(",").map((function(e){return o?e.replace("Ctrl+","⌘").replace("Shift+","⇧").replace("Alt+","⌥"):e})).join(", ");i&&("Images"===n[e].command&&"InsertLink"===n[e].subCommand||(n[e].tooltipText=t!==i?t+" ("+i+")":t))},c=0;c<n.length;c++)l(c);return n},e.prototype.getToolbarOptions=function(e){return{target:e.target,rteToolbarObj:this,items:this.getItems(e.items,e.container),overflowMode:e.mode,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,cssClass:e.cssClass,type:e.container}},e.prototype.render=function(e){this.toolbarRenderer=this.renderFactory.getRenderer(bi.Toolbar),this.toolbarRenderer&&this.toolbarRenderer.isDestroyed&&(this.toolbarRenderer=new Em(this.parent,this.locator)),this.toolbarRenderer.renderToolbar(this.getToolbarOptions(e))},e.prototype.destroy=function(){this.isDestroyed||(this.removeEventListener(),this.toolbarObj&&!this.toolbarObj.isDestroyed&&(this.toolbarObj.destroy(),this.toolbarObj=null),this.toolbarRenderer.destroy(),this.toolbarRenderer=null,this.tools={},this.isDestroyed=!0)},e}(),Rm=function(){function e(e,t){this.parent=e,this.locator=t,this.i10n=t.getService("rteLocale"),this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener()}return e.prototype.initializeInstance=function(){this.toolbarRenderer=this.renderFactory.getRenderer(bi.Toolbar)},e.prototype.beforeRender=function(e){var t=e.item;t.cssClass&&G([e.element],t.cssClass)},e.prototype.dropdownContent=function(e,t,i){return'<span style="display: inline-flex;width:'+("quick"===t?"auto":e)+'" ><span class="e-rte-dropdown-btn-text">'+i+"</span></span>"},e.prototype.renderDropDowns=function(e,t){var i=this;this.initializeInstance();var n=e.containerType,o=e.container;Eo.forEach((function(r){var s=void 0;if(-1!==cr(r,e.items))switch(r){case"numberformatlist":if(g(s=ne("#"+i.parent.getID()+"_"+n+"_NumberFormatList",o))||s.classList.contains(Xn))return;var a=i.parent.numberFormatList.types.slice();a.forEach((function(e){Object.defineProperties(e,{command:{value:"Lists",enumerable:!0},subCommand:{value:"NumberFormatList",enumerable:!0}})})),i.numberFormatListDropDown=i.toolbarRenderer.renderListDropDown({cssClass:"e-order-list "+lo+" "+ro,itemName:"NumberFormatList",items:a,element:s});break;case"bulletformatlist":if(g(s=ne("#"+i.parent.getID()+"_"+n+"_BulletFormatList",o))||s.classList.contains(Xn))return;var l=i.parent.bulletFormatList.types.slice();l.forEach((function(e){Object.defineProperties(e,{command:{value:"Lists",enumerable:!0},subCommand:{value:"BulletFormatList",enumerable:!0}})})),i.bulletFormatListDropDown=i.toolbarRenderer.renderListDropDown({cssClass:"e-unorder-list "+lo+" "+ro,itemName:"BulletFormatList",items:l,element:s});break;case"formats":if(g(s=ne("#"+i.parent.getID()+"_"+n+"_Formats",o))||s.classList.contains(Xn))return;var c=i.parent.format.types.slice();c.forEach((function(e){Object.defineProperties(e,{command:{value:"Formats",enumerable:!0},subCommand:{value:e.value,enumerable:!0}})}));var h=g(i.parent.format.default)?c[0].text:i.parent.format.default;i.formatDropDown=i.toolbarRenderer.renderDropDownButton({iconCss:"quick"===n?"e-formats e-icons":"",content:i.dropdownContent(i.parent.format.width,n,"quick"===n?"":hr(c,h,"text","text")),cssClass:Wn+" "+Gn+" e-formats-tbar-btn",itemName:"Formats",items:c,element:s});break;case"fontname":if(g(s=ne("#"+i.parent.getID()+"_"+n+"_FontName",o))||s.classList.contains(Xn))return;var d=i.parent.fontFamily.items.slice();d.forEach((function(e){Object.defineProperties(e,{command:{value:"Font",enumerable:!0},subCommand:{value:"FontName",enumerable:!0}})}));var p=g(i.parent.fontFamily.default)?0===d.length?"":d[0].text:i.parent.fontFamily.default;i.fontNameDropDown=i.toolbarRenderer.renderDropDownButton({iconCss:"quick"===n?"e-font-name e-icons":"",content:i.dropdownContent(i.parent.fontFamily.width,n,0===d.length?i.i10n.getConstant("fontName"):"quick"===n?"":"Default"===hr(d,p,"text","text")?i.i10n.getConstant("fontName"):hr(d,p,"text","text")),cssClass:Wn+" "+Gn+" e-font-name-tbar-btn",itemName:"FontName",items:d,element:s});break;case"fontsize":if(g(s=ne("#"+i.parent.getID()+"_"+n+"_FontSize",o))||s.classList.contains(Xn))return;var u=!g(i.fontSizeDropDown)&&!g(i.fontSizeDropDown.items)&&i.fontSizeDropDown.items.length>0?i.fontSizeDropDown.items:JSON.parse(JSON.stringify(i.parent.fontSize.items.slice()));u.forEach((function(e){Object.defineProperties(e,{command:{value:"Font",enumerable:!0},subCommand:{value:"FontSize",enumerable:!0}})}));var m=g(i.parent.fontSize.default)?0===u.length?"":u[0].text:i.parent.fontSize.default,f=hr(u,m.replace(/\s/g,""),"Default"===m?"text":"value","text");i.fontSizeDropDown=i.toolbarRenderer.renderDropDownButton({content:i.dropdownContent(i.parent.fontSize.width,n,0===u.length?i.i10n.getConstant("fontSize"):pr("Default"===f?i.i10n.getConstant("fontSize"):f)),cssClass:Wn+" "+Gn+" e-font-size-tbar-btn",itemName:"FontSize",items:u,element:s});break;case"alignments":if(g(s=ne("#"+i.parent.getID()+"_"+n+"_Alignments",o))||s.classList.contains(Xn))return;i.alignDropDown=i.toolbarRenderer.renderDropDownButton({iconCss:"e-justify-left e-icons",cssClass:Wn+" "+Gn+" e-alignment-tbar-btn",itemName:"Alignments",items:Lo,element:s});break;case"align":case"videoalign":i.renderAlignmentDropDown(n,o,s,r);break;case"display":case"audiolayoutoption":case"videolayoutoption":i.renderDisplayDropDown(n,o,s,r);break;case"tablerows":i.rowDropDown(n,o,s,t);break;case"tablecolumns":i.columnDropDown(n,o,s);break;case"tablecell":i.cellDropDown(n,o,s);break;case"tablecellverticalalign":i.verticalAlignDropDown(n,o,s);break;case"styles":i.tableStylesDropDown(n,o,s)}})),this.parent.inlineMode.enable&&this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.getUpdateItems=function(e,t){var i=e.slice();return i.forEach((function(e){Object.defineProperties(e,{command:{value:"Format"===t?"Formats":"Font",enumerable:!0},subCommand:{value:"Format"===t?e.value:t,enumerable:!0}})})),i},e.prototype.onPropertyChanged=function(e){for(var t,i,n=e.newProp,o=0,r=Object.keys(n);o<r.length;o++){switch(r[o]){case"fontFamily":if(this.fontNameDropDown)for(var s=0,a=Object.keys(n.fontFamily);s<a.length;s++){switch(a[s]){case"default":case"width":var l=this.fontNameDropDown.items;t=g(se(this.fontNameDropDown.element,"."+Vn))?"toolbar":"quick";var c=g(this.parent.fontFamily.default)?l[0].text:this.parent.fontFamily.default;i=this.dropdownContent(this.parent.fontFamily.width,t,"quick"===t?"":"Default"===hr(l,c,"text","text")?this.i10n.getConstant("fontName"):hr(l,c,"text","text")),this.fontNameDropDown.setProperties({content:i}),g(this.parent.fontFamily.default)?this.getEditNode().style.removeProperty("font-family"):this.getEditNode().style.fontFamily=this.parent.fontFamily.default;break;case"items":this.fontNameDropDown.setProperties({items:this.getUpdateItems(n.fontFamily.items,"FontName")})}}break;case"fontSize":if(this.fontSizeDropDown)for(var h=0,d=Object.keys(n.fontSize);h<d.length;h++){switch(d[h]){case"default":case"width":var p=this.fontSizeDropDown.items;t=g(se(this.fontSizeDropDown.element,"."+Vn))?"toolbar":"quick";var u=g(this.parent.fontSize.default)?p[0].text:this.parent.fontSize.default,m=hr(p,u.replace(/\s/g,""),"Default"===u?"text":"value","text");i=this.dropdownContent(this.parent.fontSize.width,t,pr("Default"===m?this.i10n.getConstant("fontSize"):m)),this.fontSizeDropDown.setProperties({content:i}),g(this.parent.fontSize.default)?this.getEditNode().style.removeProperty("font-size"):this.getEditNode().style.fontSize=this.parent.fontSize.default;break;case"items":this.fontSizeDropDown.setProperties({items:this.getUpdateItems(n.fontSize.items,"FontSize")})}}break;case"format":if(this.formatDropDown)for(var f=0,y=Object.keys(n.format);f<y.length;f++){switch(y[f]){case"default":case"width":var v=this.formatDropDown.items;t=g(se(this.formatDropDown.element,"."+Vn))?"toolbar":"quick";var b=g(this.parent.format.default)?v[0].text:this.parent.format.default;i=this.dropdownContent(this.parent.format.width,t,"quick"===t?"":hr(v,b,"text","text")),this.formatDropDown.setProperties({content:i});break;case"types":this.formatDropDown.setProperties({items:this.getUpdateItems(n.format.types,"Format")})}}}}},e.prototype.getEditNode=function(){return this.parent.contentModule.getEditPanel()},e.prototype.rowDropDown=function(e,t,i,n){i=ne("#"+this.parent.getID()+"_"+e+"_TableRows",t);var o=Array.from(Ro);i.classList.contains(Xn)||(n.closest("th")&&o.shift(),this.tableRowsDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-rows e-icons",cssClass:Wn+" "+Gn+" "+Qn,itemName:"TableRows",items:o,element:i}))},e.prototype.columnDropDown=function(e,t,i){(i=ne("#"+this.parent.getID()+"_"+e+"_TableColumns",t)).classList.contains(Xn)||(this.tableColumnsDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-columns e-icons",cssClass:Wn+" "+Gn+" "+Qn,itemName:"TableColumns",items:Ho,element:i}))},e.prototype.cellDropDown=function(e,t,i){(i=ne("#"+this.parent.getID()+"_"+e+"_TableCell",t)).classList.contains(Xn)||(this.tableCellDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-cell e-icons",cssClass:Wn+" "+Gn+" "+Qn,itemName:"TableCell",items:ko,element:i}))},e.prototype.verticalAlignDropDown=function(e,t,i){(i=ne("#"+this.parent.getID()+"_"+e+"_TableCellVerticalAlign",t)).classList.contains(Xn)||(this.tableCellVerticalAlignDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-cell-ver-align e-icons",cssClass:Wn+" "+Gn+" "+Qn,itemName:"TableCellVerticalAlign",items:Fo,element:i}))},e.prototype.renderDisplayDropDown=function(e,t,i,n){(i=ne("#"+this.parent.getID()+"_"+e+("display"===n?"_Display":"videolayoutoption"===n?"_VideoLayoutOption":"_AudioLayoutOption"),t)).classList.contains(Xn)||(this.displayDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"display"===n?"e-display e-icons":"videolayoutoption"===n?"e-video-display e-icons":"e-audio-display e-icons",cssClass:Wn+" "+Gn+" "+Qn,itemName:"display"===n?"Display":"videolayoutoption"===n?"VideoLayoutOption":"AudioLayoutOption",items:"display"===n?Oo:"videolayoutoption"===n?Ao:zo,element:i}))},e.prototype.renderAlignmentDropDown=function(e,t,i,n){(i=ne("#"+this.parent.getID()+"_"+e+("align"===n?"_Align":"_VideoAlign"),t)).classList.contains(Xn)||(this.imageAlignDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-justify-left e-icons",cssClass:Wn+" "+_n+" "+Qn,itemName:"align"===n?"Align":"VideoAlign",items:"align"===n?So:Io,element:i}))},e.prototype.tableStylesDropDown=function(e,t,i){(i=ne("#"+this.parent.getID()+"_"+e+"_Styles",t)).classList.contains(Xn)||(this.imageAlignDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-style e-icons",cssClass:Wn+" "+_n+" "+Qn,itemName:"Styles",items:this.parent.tableSettings.styles,element:i}))},e.prototype.removeDropDownClasses=function(e){X([e],[Xn,Wn,_n,Gn])},e.prototype.destroyDropDowns=function(){this.formatDropDown&&(this.removeDropDownClasses(this.formatDropDown.element),this.formatDropDown.destroy(),this.formatDropDown=null),this.fontNameDropDown&&(this.removeDropDownClasses(this.fontNameDropDown.element),this.fontNameDropDown.destroy(),this.fontNameDropDown=null),this.fontSizeDropDown&&(this.removeDropDownClasses(this.fontSizeDropDown.element),this.fontSizeDropDown.destroy(),this.fontSizeDropDown=null),this.alignDropDown&&(this.removeDropDownClasses(this.alignDropDown.element),this.alignDropDown.destroy(),this.alignDropDown=null),this.imageAlignDropDown&&(this.removeDropDownClasses(this.imageAlignDropDown.element),this.imageAlignDropDown.destroy(),this.imageAlignDropDown=null),this.displayDropDown&&(this.removeDropDownClasses(this.displayDropDown.element),this.displayDropDown.destroy(),this.displayDropDown=null),this.tableRowsDropDown&&(this.removeDropDownClasses(this.tableRowsDropDown.element),this.tableRowsDropDown.destroy(),this.tableRowsDropDown=null),this.tableColumnsDropDown&&(this.removeDropDownClasses(this.tableColumnsDropDown.element),this.tableColumnsDropDown.destroy(),this.tableColumnsDropDown=null),this.tableCellDropDown&&(this.removeDropDownClasses(this.tableCellDropDown.element),this.tableCellDropDown.destroy(),this.tableCellDropDown=null),this.tableCellVerticalAlignDropDown&&(this.removeDropDownClasses(this.tableCellVerticalAlignDropDown.element),this.tableCellVerticalAlignDropDown.destroy(),this.tableCellVerticalAlignDropDown=null),this.numberFormatListDropDown&&(this.removeDropDownClasses(this.numberFormatListDropDown.element),this.numberFormatListDropDown.destroy(),this.numberFormatListDropDown=null),this.bulletFormatListDropDown&&(this.removeDropDownClasses(this.bulletFormatListDropDown.element),this.bulletFormatListDropDown.destroy(),this.bulletFormatListDropDown=null),this.toolbarRenderer=null},e.prototype.setRtl=function(e){this.formatDropDown&&this.formatDropDown.setProperties({enableRtl:e.enableRtl}),this.fontNameDropDown&&this.fontNameDropDown.setProperties({enableRtl:e.enableRtl}),this.fontSizeDropDown&&this.fontSizeDropDown.setProperties({enableRtl:e.enableRtl}),this.alignDropDown&&this.alignDropDown.setProperties({enableRtl:e.enableRtl}),this.imageAlignDropDown&&this.imageAlignDropDown.setProperties({enableRtl:e.enableRtl}),this.displayDropDown&&this.displayDropDown.setProperties({enableRtl:e.enableRtl}),this.numberFormatListDropDown&&this.numberFormatListDropDown.setProperties({enableRtl:e.enableRtl}),this.bulletFormatListDropDown&&this.bulletFormatListDropDown.setProperties({enableRtl:e.enableRtl})},e.prototype.updateCss=function(e,t){e&&t.cssClass&&(g(t.oldCssClass)?e.setProperties({cssClass:(e.cssClass+" "+t.cssClass).trim()}):e.setProperties({cssClass:(e.cssClass.replace(t.oldCssClass,"").trim()+" "+t.cssClass).trim()}))},e.prototype.setCssClass=function(e){for(var t=[this.formatDropDown,this.fontNameDropDown,this.fontSizeDropDown,this.alignDropDown,this.imageAlignDropDown,this.displayDropDown,this.numberFormatListDropDown,this.bulletFormatListDropDown,this.tableRowsDropDown,this.tableColumnsDropDown,this.tableCellDropDown,this.tableCellVerticalAlignDropDown],i=0;i<t.length;i++)this.updateCss(t[i],e)},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(Gi,this.beforeRender,this),this.parent.on(Oi,this.onIframeMouseDown,this),this.parent.on(mn,this.setRtl,this),this.parent.on(Ui,this.onPropertyChanged,this),this.parent.on(Nn,this.setCssClass,this))},e.prototype.onIframeMouseDown=function(){!g(this.parent.getToolbarElement())&&(this.parent.getToolbarElement().querySelectorAll('.e-rte-dropdown-btn[aria-expanded="true"]').length>0||this.parent.getToolbarElement().querySelectorAll('.e-dropdown-btn.e-rte-inline-dropdown[aria-expanded="true"]').length>0)&&this.closeOpenDropdowns()},e.prototype.closeOpenDropdowns=function(){[this.formatDropDown,this.fontNameDropDown,this.fontSizeDropDown,this.alignDropDown,this.imageAlignDropDown,this.displayDropDown,this.numberFormatListDropDown,this.bulletFormatListDropDown,this.tableRowsDropDown,this.tableColumnsDropDown,this.tableCellDropDown,this.tableCellVerticalAlignDropDown,this.parent.toolbarModule.colorPickerModule.fontColorDropDown,this.parent.toolbarModule.colorPickerModule.backgroundColorDropDown].forEach((function(e){e&&e.dropDown&&e.dropDown.element&&e.dropDown.element.classList.contains("e-popup-open")&&e.toggle()}))},e.prototype.removeEventListener=function(){this.parent.off(Oi,this.onIframeMouseDown),this.parent.off(mn,this.setRtl),this.parent.off(Gi,this.beforeRender),this.parent.off(Ui,this.onPropertyChanged),this.parent.off(Nn,this.setCssClass)},e.prototype.destroy=function(){this.removeEventListener(),this.destroyDropDowns()},e}(),Bm=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(Ai,this.toolbarClick,this),this.parent.on(_i,this.dropDownSelect,this),this.parent.on(ln,this.renderSelection,this),this.parent.on(zi,this.removeEventListener,this)},e.prototype.toolbarClick=function(e){if(!g(e.item)){if(ru()&&this.parent.formatter.editorManager.nodeSelection&&!this.parent.inputElement.contains(this.parent.getRange().startContainer)&&this.parent.notify(on,{}),!g(e.item.controlParent)){var t=e.item.controlParent.activeEle;t&&(t.tabIndex=-1)}"NumberFormatList"!==e.item.command&&"BulletFormatList"!==e.item.command||(e.originalEvent.target.classList.contains("e-order-list")||e.originalEvent.target.classList.contains("e-unorder-list"))&&(e.item.command="Lists",e.item.subCommand="NumberFormatList"===e.item.subCommand?"OL":"UL"),"Lists"===e.item.command&&e.originalEvent.target.classList.contains("e-caret")&&(e.originalEvent.target.parentElement.classList.contains("e-rte-bulletformatlist-dropdown")||e.originalEvent.target.parentElement.classList.contains("e-rte-numberformatlist-dropdown"))||(this.parent.notify(Hi,e),this.parent.notify("markdown-toolbar-click",e))}},e.prototype.dropDownSelect=function(e){if(this.parent.notify(on,{}),!document.body.contains(document.body.querySelector(".e-rte-quick-toolbar"))||!e.item||"Images"!==e.item.command&&"Audios"!==e.item.command&&"Videos"!==e.item.command&&"VideoLayoutOption"!==e.item.command&&"Display"!==e.item.command&&"Table"!==e.item.command){var t=e.item.controlParent&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.tableQTBar&&this.parent.quickToolbarModule.tableQTBar.element.contains(e.item.controlParent.element)?"Table":null;if("Lists"===e.item.command){var i={listStyle:e.item.value,listImage:e.item.listImage,type:e.item.subCommand};this.parent.formatter.process(this.parent,e,e.originalEvent,i)}else this.parent.formatter.process(this.parent,e,e.originalEvent,t)}this.parent.notify(nn,{})},e.prototype.renderSelection=function(e){this.parent.notify(on,{}),this.parent.formatter.process(this.parent,e,e.originalEvent,null),this.parent.notify(nn,{})},e.prototype.removeEventListener=function(){this.parent.off(Ai,this.toolbarClick),this.parent.off(_i,this.dropDownSelect),this.parent.off(ln,this.renderSelection),this.parent.off(zi,this.removeEventListener)},e}(),Hm=function(){function e(e,t){this.tools={},this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener(),this.parent.toolbarSettings&&Object.keys(this.parent.toolbarSettings.itemConfigs).length>0?m(this.tools,Do,vr(this.parent.toolbarSettings.itemConfigs),!0):this.tools=Do}return e.prototype.initializeInstance=function(){this.toolbarRenderer=this.renderFactory.getRenderer(bi.Toolbar)},e.prototype.renderColorPickerInput=function(e){var t=this;this.initializeInstance();var i,n,o=e.containerType,r=e.container;Eo.forEach((function(s){if(-1!==cr(s,e.items))switch(s){case"fontcolor":i=t.parent.getID()+"_"+o+"_FontColor_Target";var a=t.parent.createElement("input");if(a.id=i,a.classList.add("e-rte-fontcolor-element"),!g(t.parent.cssClass))for(var l=t.parent.cssClass.split(" "),c=0;c<l.length;c++)""!==l[c].trim()&&a.classList.add(l[c]);document.body.appendChild(a),n={cssClass:t.tools[s.toLocaleLowerCase()].icon+" "+lo+" "+ro+t.parent.getCssClass(!0),value:t.tools[s.toLocaleLowerCase()].value,command:t.tools[s.toLocaleLowerCase()].command,subCommand:t.tools[s.toLocaleLowerCase()].subCommand,element:ne("#"+t.parent.getID()+"_"+o+"_FontColor",r),target:i},t.fontColorPicker=t.toolbarRenderer.renderColorPicker(n,"fontcolor"),t.fontColorDropDown=t.toolbarRenderer.renderColorPickerDropDown(n,"fontcolor",t.fontColorPicker);break;case"backgroundcolor":i=t.parent.getID()+"_"+o+"_BackgroundColor_Target";var h=t.parent.createElement("input");if(h.id=i,h.classList.add("e-rte-backgroundcolor-element"),!g(t.parent.cssClass))for(l=t.parent.cssClass.split(" "),c=0;c<l.length;c++)""!==l[c].trim()&&h.classList.add(l[c]);document.body.appendChild(h),n={cssClass:t.tools[s.toLocaleLowerCase()].icon+" "+lo+" "+ro+t.parent.getCssClass(!0),value:t.tools[s.toLocaleLowerCase()].value,command:t.tools[s.toLocaleLowerCase()].command,subCommand:t.tools[s.toLocaleLowerCase()].subCommand,element:ne("#"+t.parent.getID()+"_"+o+"_BackgroundColor",r),target:i},t.backgroundColorPicker=t.toolbarRenderer.renderColorPicker(n,"backgroundcolor"),t.backgroundColorDropDown=t.toolbarRenderer.renderColorPickerDropDown(n,"backgroundcolor",t.backgroundColorPicker,t.defaultColorPicker)}})),this.parent.inlineMode.enable&&this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.destroy=function(){this.removeEventListener(),this.destroyColorPicker(),this.defaultColorPicker=null,this.fontColorPicker=null,this.fontColorDropDown=null,this.backgroundColorDropDown=null,this.backgroundColorPicker=null,this.tools={}},e.prototype.destroyColorPicker=function(){var e;(this.fontColorPicker&&!this.fontColorPicker.isDestroyed&&this.fontColorPicker.destroy(),this.backgroundColorPicker&&!this.backgroundColorPicker.isDestroyed&&this.backgroundColorPicker.destroy(),this.fontColorDropDown&&!this.fontColorDropDown.isDestroyed)&&((e=this.fontColorDropDown.element.querySelector(".e-rte-color-content"))&&ee(e),this.fontColorDropDown.destroy());this.backgroundColorDropDown&&!this.backgroundColorDropDown.isDestroyed&&((e=this.backgroundColorDropDown.element.querySelector(".e-rte-color-content"))&&(this.defaultColorPicker=e.children[0].style.borderBottomColor,ee(e)),this.backgroundColorDropDown.destroy())},e.prototype.setRtl=function(e){this.fontColorPicker&&(this.fontColorPicker.setProperties({enableRtl:e.enableRtl}),this.fontColorDropDown.setProperties({enableRtl:e.enableRtl})),this.backgroundColorPicker&&(this.backgroundColorPicker.setProperties({enableRtl:e.enableRtl}),this.backgroundColorDropDown.setProperties({enableRtl:e.enableRtl}))},e.prototype.setCssClass=function(e){this.updateCss(this.fontColorPicker,this.fontColorDropDown,e),this.updateCss(this.backgroundColorPicker,this.backgroundColorDropDown,e)},e.prototype.updateCss=function(e,t,i){e&&i.cssClass&&(g(i.oldCssClass)?(e.setProperties({cssClass:(e.cssClass+" "+i.cssClass).trim()}),t.setProperties({cssClass:(t.cssClass+" "+i.cssClass).trim()})):(e.setProperties({cssClass:(e.cssClass.replace(i.oldCssClass,"").replace(" "," ").trim()+" "+i.cssClass).trim()}),t.setProperties({cssClass:(t.cssClass.replace(i.oldCssClass,"").replace(" "," ").trim()+" "+i.cssClass).trim()})))},e.prototype.addEventListener=function(){this.parent.on(Qi,this.renderColorPickerInput,this),this.parent.on(mn,this.setRtl,this),this.parent.on(Ui,this.onPropertyChanged,this),this.parent.on(Nn,this.setCssClass,this),this.parent.on(Sn,this.showColorPicker,this)},e.prototype.showColorPicker=function(e){g(this.fontColorPicker)||"fontcolor"!==e.toolbarClick?g(this.backgroundColorPicker)||"backgroundcolor"!==e.toolbarClick||this.backgroundColorDropDown.toggle():this.fontColorDropDown.toggle()},e.prototype.onPropertyChanged=function(e){for(var t=e.newProp,i=0,n=Object.keys(t);i<n.length;i++){switch(n[i]){case"fontColor":if(this.fontColorPicker)for(var o=0,r=Object.keys(t.fontColor);o<r.length;o++){switch(r[o]){case"default":this.fontColorPicker.setProperties({value:t.fontColor.default}),this.fontColorDropDown.element.querySelector("."+this.tools.fontcolor.icon).style.borderBottomColor=t.fontColor.default;break;case"mode":this.fontColorPicker.setProperties({mode:t.fontColor.mode});break;case"columns":this.fontColorPicker.setProperties({columns:t.fontColor.columns});break;case"colorCode":this.fontColorPicker.setProperties({presetColors:t.fontColor.colorCode});break;case"modeSwitcher":this.fontColorPicker.setProperties({modeSwitcher:t.fontColor.modeSwitcher})}}break;case"backgroundColor":if(this.backgroundColorPicker)for(var s=0,a=Object.keys(t.backgroundColor);s<a.length;s++){switch(a[s]){case"default":this.backgroundColorPicker.setProperties({value:t.backgroundColor.default}),this.backgroundColorDropDown.element.querySelector("."+this.tools.backgroundcolor.icon).style.borderBottomColor=t.backgroundColor.default;break;case"mode":this.backgroundColorPicker.setProperties({mode:t.backgroundColor.mode});break;case"columns":this.backgroundColorPicker.setProperties({columns:t.backgroundColor.columns});break;case"colorCode":this.backgroundColorPicker.setProperties({presetColors:t.backgroundColor.colorCode});break;case"modeSwitcher":this.backgroundColorPicker.setProperties({modeSwitcher:t.backgroundColor.modeSwitcher})}}}}},e.prototype.removeEventListener=function(){this.parent.off(Qi,this.renderColorPickerInput),this.parent.off(mn,this.setRtl),this.parent.off(Ui,this.onPropertyChanged),this.parent.off(Nn,this.setCssClass),this.parent.off(Sn,this.showColorPicker)},e}(),Um=function(){function e(e,t){var i;this.tools={},this.parent=e,this.isDestroyed=!1,this.isToolbar=!1,this.locator=t,this.isTransformChild=!1,this.renderFactory=this.locator.getService("rendererFactory"),i=this.parent,Lo.forEach((function(e,t){Lo[t].text=Jo(i,To,Lo[t])})),Oo.forEach((function(e,t){Oo[t].text=Jo(i,wo,Oo[t])})),zo.forEach((function(e,t){zo[t].text=Jo(i,xo,zo[t])})),Ao.forEach((function(e,t){Ao[t].text=Jo(i,jo,Ao[t])})),Ro.forEach((function(e,t){Ro[t].text=Jo(i,Po,Ro[t])})),Ho.forEach((function(e,t){Ho[t].text=Jo(i,Bo,Ho[t])})),Fo.forEach((function(e,t){Fo[t].text=Jo(i,Uo,Fo[t])})),Vo.forEach((function(e,t){Vo[t].text=Jo(i,Yo,Vo[t])})),wr(this.parent),this.baseToolbar=new Pm(this.parent,this.locator),this.addEventListener(),this.parent.toolbarSettings&&Object.keys(this.parent.toolbarSettings.itemConfigs).length>0?m(this.tools,Do,vr(this.parent.toolbarSettings.itemConfigs),!0):this.tools=Do}return e.prototype.initializeInstance=function(){this.contentRenderer=this.renderFactory.getRenderer(bi.Content),this.editableElement=this.contentRenderer.getEditPanel(),this.editPanel=this.contentRenderer.getPanel()},e.prototype.toolbarBindEvent=function(){this.parent.inlineMode.enable||(this.keyBoardModule=new Ht(this.getToolbarElement(),{keyAction:this.toolBarKeyDown.bind(this),keyConfigs:this.parent.formatter.keyConfig,eventName:"keydown"}))},e.prototype.toolBarKeyDown=function(e){switch(e.action){case"escape":this.parent.contentModule.getEditPanel().focus();break;case"enter":g(e.target)||!e.target.classList.contains("e-rte-fontcolor-dropdown")&&!e.target.classList.contains("e-rte-backgroundcolor-dropdown")||this.parent.notify(Sn,{toolbarClick:e.target.classList.contains("e-rte-fontcolor-dropdown")?"fontcolor":"backgroundcolor"})}},e.prototype.createToolbarElement=function(){this.tbElement=this.parent.createElement("div",{id:this.parent.getID()+"_toolbar"}),!Q.isDevice&&this.parent.inlineMode.enable&&dr()||(this.parent.inlineMode.enable?this.parent.rootContainer.insertBefore(this.tbElement,this.editPanel):(this.tbWrapper=this.parent.createElement("div",{id:this.parent.getID()+"_toolbar_wrapper",innerHTML:this.tbElement.outerHTML,className:Zn}),this.tbElement=this.tbWrapper.firstElementChild,this.parent.rootContainer.insertBefore(this.tbWrapper,this.editPanel)))},e.prototype.getToolbarMode=function(){var e;switch(this.parent.toolbarSettings.type){case Mi.Expand:e="Extended";break;case Mi.Scrollable:e="Scrollable";break;default:e="MultiRow"}return dr()&&this.parent.toolbarSettings.type===Mi.Expand&&(e=Mi.Scrollable),e},e.prototype.checkToolbarResponsive=function(e){return!(!Q.isDevice||dr())&&(t=this.parent.toolbarSettings.type===Mi.Expand?Mi.MultiRow:this.parent.toolbarSettings.type,this.baseToolbar.render({container:this.parent.inlineMode.enable?"quick":"toolbar",items:this.parent.toolbarSettings.items,mode:t,target:e,cssClass:this.parent.getCssClass()}),this.parent.toolbarSettings.type===Mi.Expand&&(G([e],["e-rte-tb-mobile"]),this.parent.inlineMode.enable?this.addFixedTBarClass():G([e],["e-tb-static"])),this.wireEvents(),this.dropDownModule.renderDropDowns({container:e,containerType:this.parent.inlineMode.enable?"quick":"toolbar",items:this.parent.toolbarSettings.items}),this.renderColorPicker({container:this.tbElement,containerType:this.parent.inlineMode.enable?"quick":"toolbar",items:this.parent.toolbarSettings.items}),!0);var t},e.prototype.checkIsTransformChild=function(){this.isTransformChild=!1;for(var e=oe('[style*="transform"]',document),t=0;t<e.length;t++)if(!g(e[t].contains)&&e[t].contains(this.parent.element)){this.isTransformChild=!0;break}},e.prototype.toggleFloatClass=function(){var e=this.parent.floatingToolbarOffset;this.parent.toolbarSettings.enableFloating?(G([this.tbElement.parentElement],[Un]),ae(this.tbElement.parentElement,{top:e+"px"})):(X([this.tbElement.parentElement],[Un]),ae(this.tbElement.parentElement,{top:""}))},e.prototype.renderToolbar=function(){this.initializeInstance(),this.createToolbarElement(),this.checkToolbarResponsive(this.tbElement)||(this.parent.inlineMode.enable?this.parent.notify("renderInlineToolbar",{}):(this.baseToolbar.render({container:"toolbar",items:this.parent.toolbarSettings.items,mode:this.getToolbarMode(),target:this.tbElement,cssClass:this.parent.getCssClass()}),this.parent.element.classList.contains("e-rte-full-screen")&&this.updateItem({targetItem:"Maximize",updateItem:"Minimize",baseToolbar:this.parent.getBaseToolbarObject()}),this.parent.inlineMode.enable||(this.parent.toolbarSettings.enableFloating&&(this.checkIsTransformChild(),this.toggleFloatClass()),G([this.parent.element],[No]),this.parent.toolbarSettings.type===Mi.Expand&&G([this.parent.element],[Fn]))),this.wireEvents(),this.parent.inlineMode.enable&&!dr()&&this.addFixedTBarClass(),this.parent.inlineMode.enable||(this.dropDownModule.renderDropDowns({container:this.tbElement,containerType:"toolbar",items:this.parent.toolbarSettings.items}),this.renderColorPicker({container:this.tbElement,containerType:"toolbar",items:this.parent.toolbarSettings.items}),this.refreshToolbarOverflow()),this.parent.rootContainer&&this.parent.rootContainer.classList.contains("e-source-code-enabled")&&(this.parent.notify(Ji,{targetItem:"SourceCode",updateItem:"Preview",baseToolbar:this.parent.getBaseToolbarObject()}),this.parent.disableToolbarItem(this.parent.toolbarSettings.items)))},e.prototype.addFixedTBarClass=function(){G([this.tbElement],[Hn])},e.prototype.removeFixedTBarClass=function(){X([this.tbElement],[Hn])},e.prototype.showFixedTBar=function(){G([this.tbElement],[Jn]),Q.isIos&&G([this.tbElement],[ho])},e.prototype.hideFixedTBar=function(){this.isToolbar?this.isToolbar=!1:X([this.tbElement],[Jn,ho])},e.prototype.updateItem=function(e){var t=this.tools[e.updateItem.toLocaleLowerCase()];("Code View"!==ur(e.updateItem.toLocaleLowerCase(),this.locator)&&"Preview"!==ur(e.updateItem.toLocaleLowerCase(),this.locator)||"en-US"!==this.parent.locale)&&(t.tooltip=ur(e.updateItem.toLocaleLowerCase(),this.locator));var i=gr(mr(this.tools[e.targetItem.toLocaleLowerCase()].subCommand),e.baseToolbar.toolbarObj.items)[0];if(g(i))this.addTBarItem(e,0);else{var n=this.parent.inlineMode.enable?"_quick_":"_toolbar_";e.baseToolbar.toolbarObj.items[i].id=this.parent.getID()+n+t.id,e.baseToolbar.toolbarObj.items[i].prefixIcon=t.icon,e.baseToolbar.toolbarObj.items[i].tooltipText=t.tooltip,e.baseToolbar.toolbarObj.items[i].subCommand=t.subCommand,e.baseToolbar.toolbarObj.dataBind(),e.baseToolbar.toolbarObj.refreshOverflow()}},e.prototype.updateToolbarStatus=function(e){this.tbElement&&(!this.parent.inlineMode.enable||!dr()&&Q.isDevice)&&function(e,t,i){wr(i);for(var n=e.dropDownModule,o=e.args,r=0,s=Object.keys(e.args);r<s.length;r++)for(var a=s[r],l=0;l<e.tbItems.length;l++){var c=e.tbItems[l].subCommand,h=c&&c.toLocaleLowerCase();if(c&&h===a||"UL"===c&&"unorderedlist"===a||"OL"===c&&"orderedlist"===a||"pre"===h&&"insertcode"===a||"NumberFormatList"===c&&"numberFormatList"===a||"BulletFormatList"===c&&"bulletFormatList"===a)if("boolean"==typeof o[""+a])!0===o[""+a]?G([e.tbElements[l]],[so]):X([e.tbElements[l]],[so]);else if(("string"==typeof o[""+a]||null===o[""+a])&&cr(a,e.parent.toolbarSettings.items)>=-1){var d=o[""+a]?o[""+a]:"",p="";switch(a){case"formats":if(g(n.formatDropDown)||t||!g(n.formatDropDown)&&n.formatDropDown.isDestroyed)break;var u=e.parent.format.types,m=g(e.parent.format.default)?u[0].text:e.parent.format.default;p="empty"===d?"":hr(u,d,"subCommand","text"),n.formatDropDown.content='<span style="display: inline-flex;width:'+e.parent.format.width+'" ><span class="e-rte-dropdown-btn-text'+(g(e.parent.cssClass)?"":" "+e.parent.cssClass)+'">'+(g(p)?m:p)+"</span></span>",n.formatDropDown.dataBind();break;case"alignments":if(g(n.alignDropDown)||!g(n.alignDropDown)&&n.alignDropDown.isDestroyed)break;p=hr(Lo,d,"subCommand","iconCss"),n.alignDropDown.iconCss=g(p)?"e-icons e-justify-left":p,n.alignDropDown.dataBind();break;case"fontname":if(g(n.fontNameDropDown)||t||!g(n.fontNameDropDown)&&n.fontNameDropDown.isDestroyed)break;var f=e.parent.fontFamily.items;p="empty"===d?"":hr(f,d,"value","text");var y=g(e.parent.fontFamily.default)?0===f.length?i.serviceLocator.getService("rteLocale").getConstant("fontName"):f[0].text:e.parent.fontFamily.default,v="Default"===(g(p)?y:p)?i.serviceLocator.getService("rteLocale").getConstant("fontName"):g(p)?y:p;n.fontNameDropDown.content='<span style="display: inline-flex;width:'+e.parent.fontFamily.width+'" ><span class="e-rte-dropdown-btn-text'+(g(e.parent.cssClass)?"":" "+e.parent.cssClass)+'">'+v+"</span></span>",n.fontNameDropDown.dataBind();break;case"fontsize":if(g(n.fontSizeDropDown)||!g(n.fontSizeDropDown)&&n.fontSizeDropDown.isDestroyed)break;var b=e.parent.fontSize.items,M=g(e.parent.fontSize.default)?0===b.length?i.serviceLocator.getService("rteLocale").getConstant("fontSize"):b[0].text:e.parent.fontSize.default,N=hr(b,""===d?M.replace(/\s/g,""):d,b.length>0&&b[0]&&M.replace(/\s/g,"")===b[0].text&&""===d?"text":"value","text");p="empty"===d?"":"Default"===N?i.serviceLocator.getService("rteLocale").getConstant("fontSize"):N,n.fontSizeDropDown.content='<span style="display: inline-flex;width:'+e.parent.fontSize.width+'" ><span class="e-rte-dropdown-btn-text'+(g(e.parent.cssClass)?"":" "+e.parent.cssClass)+'">'+pr(p)+"</span></span>",n.fontSizeDropDown.dataBind();break;case"bulletFormatList":case"numberFormatList":""!==d?G([e.tbElements[l]],[so]):X([e.tbElements[l]],[so])}}}}({args:e,dropDownModule:this.dropDownModule,parent:this.parent,tbElements:oe("."+Kn,this.tbElement),tbItems:this.baseToolbar.toolbarObj.items},!!this.parent.inlineMode.enable,this.parent)},e.prototype.fullScreen=function(e){this.parent.fullScreenModule.showFullScreen(e)},e.prototype.hideScreen=function(e){this.parent.fullScreenModule.hideFullScreen(e)},e.prototype.getBaseToolbar=function(){return this.baseToolbar},e.prototype.addTBarItem=function(e,t){e.baseToolbar.toolbarObj.addItems([e.baseToolbar.getObject(e.updateItem,"toolbar")],t)},e.prototype.enableTBarItems=function(e,t,i,n){var o=gr(mr(t),e.toolbarObj.items);this.tbItems=oe("."+Kn,e.toolbarObj.element);for(var r=0;r<o.length;r++){var s=this.tbItems[o[r]];s&&e.toolbarObj.enableItems(s,i)}ne("."+Co,this.parent.element)||n||fr(e,this.parent.formatter.editorManager.undoRedoManager.getUndoStatus())},e.prototype.removeTBarItems=function(e){g(this.baseToolbar.toolbarObj)&&(this.baseToolbar=this.parent.getBaseToolbarObject());var t=gr(mr(e),this.baseToolbar.toolbarObj.items);this.tbItems=this.parent.inlineMode.enable?oe("."+Kn,this.baseToolbar.toolbarObj.element):oe("."+Kn,this.parent.element);for(var i=0;i<t.length;i++)this.baseToolbar.toolbarObj.removeItems(this.tbItems[t[i]])},e.prototype.getExpandTBarPopHeight=function(){var e=0;if(this.parent.toolbarSettings.type===Mi.Expand&&this.tbElement.classList.contains("e-extended-toolbar")){var t=ne(".e-toolbar-extended",this.tbElement);t&&this.tbElement.classList.contains("e-expand-open")||t&&t.classList.contains("e-popup-open")?(G([t],[$n]),e+=t.offsetHeight,X([t],[$n])):X([this.tbElement],[ao])}return e},e.prototype.getToolbarHeight=function(){return this.tbElement.offsetHeight},e.prototype.getToolbarElement=function(){return this.parent&&this.parent.element?ne("."+Bn,this.parent.element):null},e.prototype.refreshToolbarOverflow=function(){this.parent.element.classList.remove(An),this.baseToolbar.toolbarObj.refreshOverflow(),this.parent.enableRtl&&this.parent.element.classList.add(An)},e.prototype.isToolbarDestroyed=function(){return!!(this.baseToolbar&&this.baseToolbar.toolbarObj&&this.baseToolbar.toolbarObj.isDestroyed)},e.prototype.destroyToolbar=function(){if(!this.isToolbarDestroyed()){this.parent.unWireScrollElementsEvents(),this.unWireEvents(),this.dropDownModule.destroy(),this.parent.emojiPickerModule&&!this.parent.emojiPickerModule.isPopupDestroyed&&this.parent.emojiPickerModule.childDestroy(),this.dropDownModule=null,this.colorPickerModule.destroy(),this.colorPickerModule=null,this.keyBoardModule&&(this.keyBoardModule.destroy(),this.keyBoardModule=null),this.baseToolbar.destroy(),this.removeEventListener(),X([this.parent.element],[No]),X([this.parent.element],[Fn]);var e=ne("."+Zn,this.parent.element),t=ne("."+Bn,this.parent.element);g(e)||ee(e),g(t)||ee(t)}},e.prototype.destroy=function(){this.isDestroyed||(this.isToolbarDestroyed()||this.destroyToolbar(),this.toolbarObj=null,this.editPanel=null,this.isToolbar=null,this.editableElement=null,this.tbItems=null,this.baseToolbar=null,this.tbElement=null,this.tbWrapper=null,this.isTransformChild=null,this.contentRenderer=null,this.dropDownModule=null,this.colorPickerModule=null,this.toolbarActionModule=null,this.tools=null,this.locator=null,this.renderFactory=null,this.isDestroyed=!0)},e.prototype.mouseDownHandler=function(){Q.isDevice&&this.parent.inlineMode.enable&&!dr()&&this.showFixedTBar()},e.prototype.focusChangeHandler=function(){Q.isDevice&&this.parent.inlineMode.enable&&!dr()&&(this.isToolbar=!1,this.hideFixedTBar())},e.prototype.dropDownBeforeOpenHandler=function(){this.isToolbar=!0},e.prototype.tbFocusHandler=function(e){var t=document.activeElement,i=se(t,".e-rte-toolbar");if(t===this.parent.getToolbarElement()||i===this.parent.getToolbarElement())for(var n=this.parent.getToolbarElement().querySelectorAll(".e-expended-nav"),o=0;o<n.length;o++)g(this.parent.getToolbarElement().querySelector(".e-insert-table-btn"))?n[o].setAttribute("tabindex","0"):n[o].setAttribute("tabindex","1")},e.prototype.wireEvents=function(){this.parent.inlineMode.enable&&dr()||q.add(this.tbElement,"focusin",this.tbFocusHandler,this)},e.prototype.unWireEvents=function(){q.remove(this.tbElement,"focusin",this.tbFocusHandler)},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.dropDownModule=new Rm(this.parent,this.locator),this.toolbarActionModule=new Bm(this.parent),this.colorPickerModule=new Hm(this.parent,this.locator),this.parent.on(ji,this.renderToolbar,this),this.parent.on(Bi,this.toolbarBindEvent,this),this.parent.on(Ri,this.updateToolbarStatus,this),this.parent.on(Ui,this.onPropertyChanged,this),this.parent.on(Pi,this.onRefresh,this),this.parent.on(zi,this.destroy,this),this.parent.on(qi,this.fullScreen,this),this.parent.on(Wi,this.hideScreen,this),this.parent.on(Ji,this.updateItem,this),this.parent.on(tn,this.dropDownBeforeOpenHandler,this),this.parent.on(cn,this.focusChangeHandler,this),this.parent.on(rn,this.mouseDownHandler,this),this.parent.on(sn,this.mouseDownHandler,this),this.parent.on(Nn,this.setCssClass,this))},e.prototype.removeEventListener=function(){this.parent.off(ji,this.renderToolbar),this.parent.off(Bi,this.toolbarBindEvent),this.parent.off(Ri,this.updateToolbarStatus),this.parent.off(Ui,this.onPropertyChanged),this.parent.off(Pi,this.onRefresh),this.parent.off(zi,this.destroy),this.parent.off(qi,this.parent.fullScreenModule.showFullScreen),this.parent.off(Wi,this.parent.fullScreenModule.hideFullScreen),this.parent.off(Ji,this.updateItem),this.parent.off(tn,this.dropDownBeforeOpenHandler),this.parent.off(cn,this.focusChangeHandler),this.parent.off(rn,this.mouseDownHandler),this.parent.off(sn,this.mouseDownHandler),this.parent.off(Nn,this.setCssClass)},e.prototype.setCssClass=function(e){this.toolbarObj&&e.cssClass&&(g(e.oldCssClass)?this.toolbarObj.setProperties({cssClass:(this.toolbarObj.cssClass+" "+e.cssClass).trim()}):this.toolbarObj.setProperties({cssClass:(this.toolbarObj.cssClass.replace(e.oldCssClass,"").trim()+" "+e.cssClass).trim()}))},e.prototype.onRefresh=function(){this.parent.inlineMode.enable||this.refreshToolbarOverflow(),this.parent.autoResize()},e.prototype.onPropertyChanged=function(e){if(!g(e.newProp.inlineMode))for(var t=0,i=Object.keys(e.newProp.inlineMode);t<i.length;t++){if("enable"===i[t])this.refreshToolbar()}g(e.newProp.toolbarSettings)||g(e.newProp.toolbarSettings.enableFloating)||this.toggleFloatClass(),e.module===this.getModuleName()&&this.refreshToolbar()},e.prototype.refreshToolbar=function(){g(this.baseToolbar.toolbarObj)&&(this.baseToolbar=this.parent.getBaseToolbarObject());var e=ne("."+Zn,this.parent.element);(ne("."+Bn,this.parent.element)||e)&&this.destroyToolbar(),this.parent.toolbarSettings.enable&&(this.baseToolbar&&this.baseToolbar.toolbarObj&&!this.baseToolbar.toolbarObj.isDestroyed&&this.baseToolbar.destroy(),this.baseToolbar=new Pm(this.parent,this.locator),this.addEventListener(),this.renderToolbar(),this.parent.wireScrollElementsEvents(),ne("."+Co,this.parent.element)||this.parent.inlineMode.enable||fr(this.baseToolbar,this.parent.formatter.editorManager.undoRedoManager.getUndoStatus()),this.parent.notify("dynamicModule",{}))},e.prototype.getModuleName=function(){return"toolbar"},e.prototype.renderColorPicker=function(e){this.colorPickerModule.renderColorPickerInput(e)},e}(),Fm=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(Xi,this.commandCallBack,this),this.parent.on(zi,this.removeEventListener,this)},e.prototype.commandCallBack=function(e){var t=!g(e.requestType)&&"FormatPainter"===e.requestType&&"format-copy"===e.action;g(e)||g(e.requestType)||"Undo"===e.requestType||"Redo"===e.requestType||t||this.parent.formatter.saveData(),this.parent.notify(ki,{args:e}),this.parent.notify("count",{})},e.prototype.removeEventListener=function(){this.parent.off(Xi,this.commandCallBack),this.parent.off(zi,this.removeEventListener)},e}(),Ym=function(){function e(){}return e.prototype.process=function(e,t,i,n){var o,r,s=this,a=e.contentModule.getDocument().getSelection(),l=a.rangeCount>0?a.getRangeAt(a.rangeCount-1):null;g(n)||g(n.selection)||(r=n.selection.range);var c=!g(n)&&!g(n.cssClass)&&"e-video-inline"!==n.cssClass;if("HTML"===e.editorMode&&(g(t)||c||(g(t.name)||!g(t.name)&&"showDialog"!==t.name)&&(o=r?this.editorManager.nodeSelection.save(r,e.contentModule.getDocument()):this.editorManager.nodeSelection.save(l,e.contentModule.getDocument()))),g(t)||!t.item.command||"Table"===t.item.command||"Actions"===t.item.command||"Links"===t.item.command||"Images"===t.item.command||"Files"===t.item.command||"Audios"===t.item.command||"Videos"===t.item.command||"EmojiPicker"===t.item.command||!l||e.contentModule.getEditPanel().contains(this.getAncestorNode(l.commonAncestorContainer))||e.contentModule.getEditPanel()===l.commonAncestorContainer||e.contentModule.getPanel()===l.commonAncestorContainer){if(!g(t)&&-1!==e.maxLength&&!g(t.item.command)){var h=0;"Links"===t.item.command&&(h=0===n.text.length?n.url.length:n.text.length),"Images"!==t.item.command&&"Videos"!==t.item.command&&"Table"!==t.item.command&&"Files"!==t.item.command||(h=1);var d=e.getText().trim().replace(/(\r\n|\n|\r|\t)/gm,"").replace(/\u200B/g,"").length-e.getSelection().length+h;if(!(-1===e.maxLength||d<=e.maxLength))return}if(g(t)){var p=i.action;t={};var u={originalEvent:i,cancel:!1,requestType:p||i.key+"Key",itemCollection:n};if(m(t,t,u,!0),"tab"!==p&&"enter"!==p&&"space"!==p&&"escape"!==p&&("Markdown"===e.editorMode&&"insert-table"===p&&(n={headingText:e.localeObj.getConstant("TableHeadingText"),colText:e.localeObj.getConstant("TableColText")}),e.trigger(Ki,t,(function(e){e.cancel&&("paste"!==p&&"cut"!==p&&"copy"!==p||i.preventDefault())}))),!t.cancel){var f=!!g(e.tableModule)||!!e.tableModule&&e.tableModule.ensureInsideTableList;(9===i.which&&f||9!==i.which)&&(13===i.which&&"HTML"===e.editorMode&&(n={enterAction:e.enterKey}),this.editorManager.observer.notify("keydown"===i.type?hu:fu,{event:i,callBack:this.onSuccess.bind(this,e),value:n,enterAction:e.enterKey,enableTabKey:e.enableTabKey}))}}else g(t)||!t.item.command||!t.item.subCommand||(t.item.command===t.item.subCommand||"Font"===t.item.command||"Export"===t.item.command)&&("FontName"!==t.item.subCommand&&"FontSize"!==t.item.subCommand||"dropDownSelect"!==t.name)&&("BackgroundColor"!==t.item.subCommand&&"FontColor"!==t.item.subCommand||"colorPickerChanged"!==t.name&&"tableColorPickerChanged"!==t.name)&&"FormatPainter"!==t.item.subCommand&&"EmojiPicker"!==t.item.subCommand||(m(t,t,{requestType:t.item.subCommand,cancel:!1,itemCollection:n,selectType:t.name},!0),e.trigger(Ki,t,(function(r){if(!r.cancel){var a=!g(r.requestType)&&"FormatPainter"===r.requestType&&"format-copy"===r.name,l=!g(r.requestType)&&"FormatPainter"===r.requestType&&"format-paste"===r.name;(0===s.getUndoRedoStack().length&&"Links"!==r.item.command&&"Images"!==r.item.command&&!a||l)&&s.saveData(),e.isBlur=!1;var h=!(g(i)||g(i.target)||g(se(i.target,".e-rte-elements.e-dropdown-popup.e-rte-dropdown-popup.e-quick-dropdown.e-popup-open"))&&g(se(i.target,".e-rte-elements.e-rte-quick-popup.e-popup-open")));(g(o)||!h&&(g(se(o.range.startContainer.parentElement,".e-img-caption"))||"false"!==se(o.range.startContainer.parentElement,".e-img-caption").getAttribute("contenteditable"))&&-1===Q.userAgent.indexOf("Firefox"))&&e.contentModule.getEditPanel().focus({preventScroll:!0}),"HTML"!==e.editorMode||c||(g(t.selectType)||!g(t.selectType)&&"showDialog"!==t.selectType)&&o.restore();var d=r.item.subCommand.toLocaleLowerCase();"image"!==d&&"file"!==d&&"replace"!==d||(n=r.itemCollection),"paste"===d||"cut"===d||"copy"===d?e.clipboardAction(d,i):(s.editorManager.observer.notify("checkUndoStack",{subCommand:r.item.subCommand}),s.editorManager.execCommand(r.item.command,r.item.subCommand,i,s.onSuccess.bind(s,e),r.item.value,"Pre"===r.item.subCommand&&"dropDownSelect"===r.selectType?{name:r.selectType}:n,"#"+e.getID()+" iframe",e.enterKey))}})));!(g(i)||i&&"copy"!==i.action)||i&&i.shiftKey&&"Tab"===i.key||this.enableUndo(e)}},e.prototype.getAncestorNode=function(e){return e=3===e.nodeType?e.parentNode:e},e.prototype.onKeyHandler=function(e,t){var i=this;this.editorManager.observer.notify(fu,{event:t,callBack:function(){e.notify(xi,{}),i.enableUndo(e)},enterAction:e.enterKey})},e.prototype.onSuccess=function(e,t){e.notify(xi,{}),t&&(g(t.event)||"copy"!==t.event.action)&&("Paste"===t.requestType?(e.notify(Xi,t),this.enableUndo(e)):(this.enableUndo(e),e.notify(Xi,t))),e.trigger(Zi,t,(function(t){if(e.setPlaceHolder(),("Images"===t.requestType||"Replace"===t.requestType||"Links"===t.requestType||"Audios"===t.requestType||"Videos"===t.requestType)&&"HTML"===e.editorMode){var i=t;if("Links"===t.requestType&&t.event&&"keydown"===t.event.type&&32===t.event.keyCode)return;e.notify("insertCompleted",{args:i.event,type:t.requestType,isNotify:!0,elements:i.elements})}"VideosPlayPause"===t.requestType&&e.notify("editAreaClick",{args:event}),e.autoResize()}))},e.prototype.saveData=function(e){this.editorManager.undoRedoManager.saveData(e)},e.prototype.getUndoStatus=function(){return this.editorManager.undoRedoManager.getUndoStatus()},e.prototype.getUndoRedoStack=function(){return this.editorManager.undoRedoManager.undoRedoStack},e.prototype.enableUndo=function(e){var t=this.getUndoStatus();!e.inlineMode.enable||Q.isDevice&&!dr()?e.toolbarModule&&e.toolbarModule.baseToolbar&&fr(e.toolbarModule.baseToolbar,t):fr(e.quickToolbarModule.inlineQTBar.quickTBarObj,t)},e.prototype.beforeSlashMenuApply=function(){this.editorManager.beforeSlashMenuApplyFormat()},e.prototype.getCurrentStackIndex=function(){return this.editorManager.undoRedoManager.getCurrentStackIndex()},e}(),Vm=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Qm=function(e){function t(t){var i=e.call(this)||this;return i.initialize(),m(i,i,t,!0),i.currentDocument&&i.element&&i.updateFormatter(i.element,i.currentDocument,t.options,t.formatPainterSettings),i}return Vm(t,e),t.prototype.initialize=function(){this.keyConfig=Zp},t.prototype.updateFormatter=function(e,t,i,n){e&&t&&(this.editorManager=new vm({document:t,editableElement:e,options:i,formatPainterSettings:n}))},t}(Ym),qm=function(){function e(e){this.parent=e,this.toolbarStatus=this.prevToolbarStatus={bold:!1,italic:!1,subscript:!1,superscript:!1,strikethrough:!1,orderedlist:!1,unorderedlist:!1,numberFormatList:!1,bulletFormatList:!1,underline:!1,alignments:null,backgroundcolor:null,fontcolor:null,fontname:null,fontsize:null,formats:null,createlink:!1,insertcode:!1,blockquote:!1,inlinecode:!1},this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(ki,this.onRefreshHandler,this),this.parent.on(zi,this.removeEventListener,this)},e.prototype.removeEventListener=function(){this.toolbarStatus=null,this.prevToolbarStatus=null,this.parent.off(ki,this.onRefreshHandler),this.parent.off(zi,this.removeEventListener)},e.prototype.onRefreshHandler=function(e){if(!this.parent.readonly){var t=[],i=[],n=[];this.parent.fontSize.items.forEach((function(e){t.push(e.value)})),this.parent.fontFamily.items.forEach((function(e){i.push(e.value)})),this.parent.format.types.forEach((function(e){n.push(e.value.toLocaleLowerCase())})),this.toolbarStatus=Nm.get(this.parent.contentModule.getDocument(),this.parent.contentModule.getEditPanel(),n,t,i,e.documentNode);var o=JSON.stringify(this.toolbarStatus);this.parent.notify(Ri,this.toolbarStatus),JSON.stringify(this.prevToolbarStatus)!==o&&(this.parent.notify(Mn,{html:JSON.parse(o),markdown:null}),this.prevToolbarStatus=JSON.parse(o))}},e}(),Wm=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(vn,this.enableXhtmlValidation,this),this.parent.on(zi,this.removeEventListener,this)},e.prototype.removeEventListener=function(){this.parent.off(vn,this.enableXhtmlValidation),this.parent.off(zi,this.removeEventListener)},e.prototype.enableXhtmlValidation=function(){this.parent.enableXhtml&&(g(this.parent.inputElement)?this.currentElement=this.parent.element:this.currentElement=this.parent.inputElement,this.clean(this.currentElement),this.ImageTags(),this.removeTags(),this.RemoveUnsupported(),this.currentElement.innerHTML=this.selfEncloseValidation(this.currentElement.innerHTML,"\n"===this.currentElement.innerText?this.currentElement.innerText.length:this.currentElement.innerText.trim().length),this.parent.setProperties({value:this.currentElement.innerHTML},!0))},e.prototype.selfEncloseValidation=function(e,t){if(0===t&&e.indexOf("table")<0&&e.indexOf("img")<0&&e.includes("&nbsp;")){var i=e.split("&nbsp;");i[i.length-1]="&#8203;"+i[i.length-1],e=i.join("")}var n;e=e.replace(/<br>/g,"<br/>").replace(/<hr>/g,"<hr/>").replace(/ /g," ");for(var o=[],r=[],s=[/<img(.*?)>/gi,/<area(.*?)>/gi,/<base(.*?)>/gi,/<col (.*?)>/gi,/<embed(.*?)>/gi,/<input(.*?)>/gi,/<link(.*?)>/gi,/<meta(.*?)>/gi,/<param(.*?)>/gi,/<source(.*?)>/gi,/<track(.*?)>/gi,/<wbr(.*?)>/gi],a=0;a<s.length;a++){for(n=s[a].exec(e);null!==n;)o.push(n[0].toString()),n=s[a].exec(e);r=o.slice(0);for(var l=0;l<o.length;l++)-1!==o[l].indexOf("/")&&o[l].lastIndexOf("/")===o[l].length-2||(o[l]=o[l].substr(0,o[l].length-1)+" /"+o[l].substr(o[l].length-1,o[l].length));for(var c=0;c<=o.length-1;c++)e=e.replace(r[c],o[c])}return e},e.prototype.clean=function(e){for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];8===i.nodeType||"V:IMAGE"===i.nodeName?(e.removeChild(i),t--):1===i.nodeType&&this.clean(i)}return this.currentElement.innerHTML},e.prototype.ImageTags=function(){for(var e=this.currentElement.querySelectorAll("IMG"),t=e.length-1;t>=0;t--){if(!e[t].hasAttribute("alt"))e[t].setAttribute("alt","")}},e.prototype.removeTags=function(){for(var e=[["br","ul"],["br","ol"],["table","span"],["div","span"],["p","span"]],t=0;t<e.length;t++)this.RemoveElementNode(e[t][0],e[t][1])},e.prototype.RemoveElementNode=function(e,t){for(var i=this.currentElement.querySelectorAll(t),n=0;n<i.length;n++)for(var o=i[n].querySelectorAll(e),r=o.length;r>0;r--)ee(o[r-1])},e.prototype.RemoveUnsupported=function(){for(var e=this.currentElement.querySelectorAll("u"),t=e.length-1;t>=0;t--){var i=this.parent.createElement("span");i.style.textDecoration="underline",i.innerHTML=e[t].innerHTML,e[t].parentNode.insertBefore(i,e[t]),ee(e[t])}var n=this.currentElement.querySelectorAll("strong");for(t=n.length-1;t>=0;t--){var o=this.parent.createElement("b");o.innerHTML=n[t].innerHTML,n[t].parentNode.insertBefore(o,n[t]),ee(n[t])}var r=["language","role","target","contenteditable","cellspacing","cellpadding","border","valign","colspan"];for(t=0;t<=r.length;t++)this.RemoveAttributeByName(r[t])},e.prototype.RemoveAttributeByName=function(e){if(null!==this.currentElement.firstChild&&3!==this.currentElement.firstChild.nodeType)for(var t=0;t<this.currentElement.childNodes.length;t++){var i=this.currentElement.childNodes[t];if(3!==i.nodeType&&"TABLE"!==i.nodeName&&"TBODY"!==i.nodeName&&"THEAD"!==i.nodeName&&"TH"!==i.nodeName&&"TR"!==i.nodeName&&"TD"!==i.nodeName&&(i.hasAttribute(e)&&i.removeAttribute(e),i.hasChildNodes()))for(var n=0;n<i.childNodes.length;n++){var o=i.childNodes[n];if(3!==o.nodeType&&"TABLE"!==o.nodeName&&"TBODY"!==o.nodeName&&"THEAD"!==o.nodeName&&"TH"!==o.nodeName&&"TR"!==o.nodeName&&"TD"!==o.nodeName&&o.hasAttribute(e)&&!o.classList.contains("e-mention-chip")&&o.removeAttribute(e),o.hasChildNodes())for(var r=0;r<o.childNodes.length;r++)3!==o.childNodes[r].nodeType&&"TABLE"!==o.childNodes[r].nodeName&&"TBODY"!==o.childNodes[r].nodeName&&"THEAD"!==o.childNodes[r].nodeName&&"TH"!==o.childNodes[r].nodeName&&"TR"!==o.childNodes[r].nodeName&&"TD"!==o.childNodes[r].nodeName&&o.childNodes[r].hasAttribute(e)&&o.childNodes[r].removeAttribute(e)}}},e}(),_m=function(){function e(e,t){this.rangeCollection=[],this.isImageDelete=!1,this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.xhtmlValidation=new Wm(e),this.addEventListener(),this.isDestroyed=!1,this.isCopyAll=!1}return e.prototype.destroy=function(){this.isDestroyed||(this.clickTimeout&&(clearTimeout(this.clickTimeout),this.clickTimeout=null),this.removeEventListener(),this.locator=null,this.contentRenderer=null,this.renderFactory=null,this.toolbarUpdate=null,this.nodeSelectionObj=null,this.isCopyAll=null,this.rangeCollection.length>0&&(this.rangeCollection=[]),this.rangeElement&&(this.rangeElement=null),this.oldRangeElement&&(this.oldRangeElement=null),this.deleteRangeElement&&(this.deleteRangeElement=null),this.deleteOldRangeElement&&(this.deleteOldRangeElement=null),this.saveSelection&&(this.saveSelection=null),this.xhtmlValidation&&(this.xhtmlValidation=null),this.isDestroyed=!0)},e.prototype.sanitizeHelper=function(e){return e=Dr(e,this.parent)},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.nodeSelectionObj=new bm(this.parent.inputElement),this.parent.on(wi,this.instantiateRenderer,this),this.parent.on(Hi,this.onToolbarClick,this),this.parent.on(Yi,this.onKeyDown,this),this.parent.on(Fi,this.onKeyUp,this),this.parent.on(ji,this.render,this),this.parent.on(Ui,this.onPropertyChanged,this),this.parent.on(zi,this.destroy,this),this.parent.on(hn,this.selectAll,this),this.parent.on(dn,this.selectRange,this),this.parent.on(pn,this.getSelectedHtml,this),this.parent.on(nn,this.onSelectionSave,this),this.parent.on(on,this.onSelectionRestore,this),this.parent.on(gn,this.updateReadOnly,this),this.parent.on(un,this.onPaste,this),this.parent.on(Ii,this.isTableClassAdded,this),this.parent.on(On,this.onHandleFontsizeChange,this))},e.prototype.updateReadOnly=function(){this.parent.readonly?(ie(this.parent.contentModule.getEditPanel(),{contenteditable:"false"}),G([this.parent.element],mo)):(ie(this.parent.contentModule.getEditPanel(),{contenteditable:"true"}),X([this.parent.element],mo))},e.prototype.onSelectionSave=function(){var e=this.contentRenderer.getDocument(),t=this.nodeSelectionObj.getRange(e);this.saveSelection=this.nodeSelectionObj.save(t,e)},e.prototype.onSelectionRestore=function(e){this.parent.isBlur=!1,this.contentRenderer.getEditPanel().focus({preventScroll:!0}),!g(e.items)&&!e.items||g(this.saveSelection)||this.saveSelection.restore()},e.prototype.isTableClassAdded=function(){for(var e=this.parent.inputElement.querySelectorAll("table"),t=0;t<e.length;t++)e[t].classList.contains("e-rte-table")||e[t].classList.contains("e-rte-paste-table")||e[t].classList.contains("e-rte-custom-table")||e[t].classList.add("e-rte-table")},e.prototype.onHandleFontsizeChange=function(e){var t,i=e.args,n={name:"dropDownSelect",item:{command:"Font",subCommand:"FontSize"}},o=this.parent.fontSize.items;if(this.parent.toolbarModule&&this.parent.toolbarModule.dropDownModule&&this.parent.toolbarModule.dropDownModule.fontSizeDropDown&&!g(this.parent.toolbarModule.dropDownModule.fontSizeDropDown.activeElem[0].textContent)&&""!==this.parent.toolbarModule.dropDownModule.fontSizeDropDown.activeElem[0].textContent)t=this.parent.toolbarModule.dropDownModule.fontSizeDropDown.activeElem[0].textContent;else{var r=void 0,s=this.parent.contentModule.getDocument().getSelection(),a=(r=g(r=s&&s.focusNode&&s.focusNode.parentElement?document.defaultView.getComputedStyle(s.focusNode.parentElement,null).getPropertyValue("font-size"):this.parent.fontSize.width)?this.parent.fontSize.width:r).match(/^([\d.]+)(\D+)$/),l=parseInt(a[1],10),c=a[2],h=o[1].value.match(/^([\d.]+)(\D+)$/);if(h[2]===c){var d=o.findIndex((function(e){var t=e.value;return parseInt(t,10)>=l}));t=o[d].text}else{var p=this.convertFontSize(l,c,h[2]);d=o.findIndex((function(e){var t=e.value;return parseInt(t,10)>=p}));t=o[d].text}}var u=o.findIndex((function(e){return e.text===("Font Size"===t?"Default":t)}));if("increase-fontsize"===i.action&&-1!==u)if(u>=o.length-1){var m=o[u].value.match(/^([\d.]+)(\D+)$/);if(m){var f=parseInt(m[1],10),y=(c=m[2],f%10==0?10*Math.ceil((f+1)/10):10*Math.ceil(f/10));n.item.value=y.toLocaleString()+c,n.item.text=y.toLocaleString()+" "+c}this.parent.fontSize.items.push(n.item)}else n.item.value=o[u+1].value,n.item.text=o[u+1].text;else"decrease-fontsize"===i.action&&-1!==u&&u>0?(n.item.value=o[u-1].value,n.item.text=o[u-1].text):u>=0&&u<o.length&&o[u]&&(n.item.value=o[u].value,n.item.text=o[u].text);this.parent.formatter.process(this.parent,n,i)},e.prototype.convertFontSize=function(e,t,i){return-1===xn.indexOf(t)&&-1===xn.indexOf(i)||(t="px"),e*jn[t][i]},e.prototype.onKeyUp=function(e){var t=e.args,i=this.parent.getRange(),n=new RegExp("​","g"),o=i.startContainer===i.endContainer&&i.startOffset===i.endOffset&&1===i.startOffset&&1===i.startContainer.textContent.length&&8203===i.startContainer.textContent.charCodeAt(0)&&0===i.startContainer.textContent.replace(n,"").length,r=!1;if(i.startContainer===i.endContainer&&i.startOffset===i.endOffset&&i.startContainer!==this.parent.inputElement&&0!==i.startOffset){var s=3===i.startContainer.nodeType?i.startContainer:i.startContainer.childNodes[i.startOffset-1];r=16===t.keyCode&&8203===s.textContent.charCodeAt(0)&&!g(s.previousSibling)&&"false"===s.previousSibling.contentEditable}if(!this.isCopyAll){var a,l=!1;if([8,9,13,17,18,20,27,37,38,39,40,44,45,46,91,112,113,114,115,116,117,118,119,120,121,122,123].indexOf(t.keyCode)<0&&!t.shiftKey&&!t.ctrlKey&&!t.altKey&&!o&&!r){if(a=i.startOffset,"#text"===i.startContainer.nodeName?i.startContainer.parentElement!==this.parent.inputElement?i.startContainer.parentElement.classList.add("currentStartMark"):l=!0:i.startContainer.classList.add("currentStartMark"),8203===i.startContainer.textContent.charCodeAt(0)){var c=i.startContainer.textContent.length,h=i.startOffset;this.removeZeroWidthSpaces(i.startContainer,n),a=0===h?h:h-(c-i.startContainer.textContent.length),this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),i.startContainer,a)}var d=this.parent.inputElement.innerHTML.length,p=this.parent.inputElement.innerHTML.replace(n,"").length,u=i.startContainer;if(d>p&&!l){if(0!==u.textContent.trim().length&&u.previousSibling){var m=document.createElement("span");m.className="tempSpan",i.insertNode(m)}for(var f=this.parent.inputElement.firstChild;!g(f);)"#text"!==f.nodeName?(f.textContent.replace(n,"").trim().length>0&&f.textContent.includes("​")&&this.removeZeroWidthSpaces(f,n),f=f.nextElementSibling):f=f.nextElementSibling;var y=this.parent.inputElement.querySelector(".tempSpan");if(y&&y.previousSibling&&0!==u.textContent.trim().length)u=y.previousSibling,a=y.previousSibling.textContent.length,y.parentNode.removeChild(y),y=null;var v=this.parent.inputElement.querySelector(".currentStartMark").childNodes;if(v.length>1){for(var b=0;b<v.length;b++)if("#text"===v[b].nodeName&&0===v[b].textContent.length&&(ee(v[b]),b--),!g(v[b])&&u.textContent.replace(n,"")===v[b].textContent){var M=a<=u.textContent.indexOf("​");a=u.textContent.length>1?u.textContent===v[b].textContent||M?a:a-(u.textContent.length-u.textContent.replace(n,"").length):u.textContent.length,u=v[b]}}else 1===v.length&&u.textContent.replace(n,"")===v[0].textContent&&(u=v[0]);this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),u,a)}var N=this.parent.inputElement.querySelector(".currentStartMark");g(N)||(N.classList.remove("currentStartMark"),""===N.getAttribute("class").trim()&&N.removeAttribute("class")),!g(i.startContainer.previousSibling)&&!g(i.startContainer.previousSibling.parentElement)&&i.startContainer.parentElement===i.startContainer.previousSibling.parentElement&&8203===i.startContainer.previousSibling.textContent.charCodeAt(0)&&i.startContainer.previousSibling.textContent.length<=1&&(i.startContainer.previousSibling.textContent=i.startContainer.previousSibling.textContent.replace(n,"")),8203===i.endContainer.textContent.charCodeAt(i.endOffset)&&(a=i.startOffset,i.endContainer.textContent=i.endContainer.textContent.replace(n,""),this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),i.startContainer,a))}}},e.prototype.removeZeroWidthSpaces=function(e,t){var i=this;e.nodeType!==Node.TEXT_NODE?e.childNodes.forEach((function(e){i.removeZeroWidthSpaces(e,t)})):null!==e.textContent&&(e.textContent=e.textContent.replace(t,""))},e.prototype.onKeyDown=function(e){var t,i=this;e.args.ctrlKey&&65===e.args.keyCode?this.isCopyAll=!0:this.isCopyAll=!1;var n=e.args;if(this.parent.inputElement.querySelectorAll(".e-cell-select:not(table)").length>1&&(8===n.keyCode||32===n.keyCode||13===n.keyCode))return this.tableSelectionKeyAction(e),void this.parent.autoResize();if("chrome"===Q.info.name&&(t=this.parent.getRange(),this.backSpaceCleanup(e,t),this.deleteCleanup(e,t)),9===n.keyCode&&this.parent.enableTabKey){if(this.parent.formatter.saveData(e),!g(n.target)&&g(se(n.target,".e-rte-toolbar"))){var o=this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()),r=this.nodeSelectionObj.getParentNodeCollection(o);if("LI"!==r[0].nodeName&&!se(r[0],"li")&&!se(r[0],"table")){n.preventDefault();var s=this.contentRenderer.getDocument().getSelection().getRangeAt(0),a=this.parent.formatter.editorManager.domNode.blockNodes();if("BR"===this.parent.enterKey)if(s.startOffset!==s.endOffset&&0===s.startOffset){var l=this.nodeSelectionObj.save(o,this.contentRenderer.getDocument());this.parent.formatter.editorManager.domNode.setMarker(l),a=this.parent.formatter.editorManager.domNode.blockNodes(),this.parent.formatter.editorManager.domNode.convertToBlockNodes(a,!1),this.marginTabAdd(n.shiftKey,a),(l=this.parent.formatter.editorManager.domNode.saveMarker(l)).restore()}else xu.Insert(this.contentRenderer.getDocument(),"&nbsp;&nbsp;&nbsp;&nbsp;"),this.rangeCollection.push(this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()));else s.startOffset!==s.endOffset&&0===s.startOffset?this.marginTabAdd(n.shiftKey,a):(xu.Insert(this.contentRenderer.getDocument(),"&nbsp;&nbsp;&nbsp;&nbsp;"),this.rangeCollection.push(this.nodeSelectionObj.getRange(this.contentRenderer.getDocument())))}}this.parent.formatter.saveData(e)}if(("space"===e.args.action||"enter"===e.args.action||13===e.args.keyCode||/[^\w\s\\/\\.\\:]/g.test(e.args.key))&&(this.spaceLink(e.args),"HTML"===this.parent.editorMode&&!this.parent.readonly)){var c=this.parent.getText().trim().replace(/(\r\n|\n|\r|\t)/gm,"").replace(/\u200B/g,"").length-this.parent.getSelection().length+1;if(!(-1===this.parent.maxLength||c<=this.parent.maxLength||13!==e.args.keyCode))return void e.args.preventDefault();this.parent.notify(fn,{args:e.args}),iu(this.parent.contentModule.getDocument(),this.parent.inputElement)}if("space"===e.args.action){var h=this.parent.getRange(),d=h.startContainer.textContent.slice(0,h.startOffset),p=this.isOrderedList(d),u=this.isUnOrderedList(d),m=!1;if((p||u)&&(m=this.hasMultipleTextNode(h)),!m&&(p&&!u||u&&!p)){var f={callBack:null,event:e.args,name:"keydown-handler",enterKey:this.parent.enterKey,shiftEnterKey:this.parent.shiftEnterKey},y={cancel:!1,item:{command:"Lists",subCommand:p?"OL":"UL"},name:"actionBegin",originalEvent:e.args,requestType:p?"OL":"UL"};this.parent.trigger(Ki,y,(function(t){t.cancel||(i.parent.formatter.editorManager.observer.notify(Nu,f),i.parent.trigger(Zi,{editorMode:i.parent.editorMode,elements:i.parent.formatter.editorManager.domNode.blockNodes(),event:e.args,name:Zi,range:i.parent.getRange(),requestType:p?"OL":"UL"}))}))}}"chrome"!==Q.info.name||(g(this.rangeElement)||g(this.oldRangeElement))&&(g(this.deleteRangeElement)||g(this.deleteOldRangeElement))||"TD"===t.startContainer.parentElement.tagName||"TH"===t.startContainer.parentElement.tagName||(this.rangeElement=null,this.oldRangeElement=null,this.deleteRangeElement=null,this.deleteOldRangeElement=null,this.isImageDelete||n.preventDefault(),n.preventDefault()),this.parent.autoResize()},e.prototype.isOrderedList=function(e){var t=[/^[1]+[.]+$/,/^[i]+[.]+$/,/^[a]+[.]+$/];if(!g(e=e.replace(/\u200B/g,"")))for(var i=0;i<t.length;i++)if(t[i].test(e))return!0;return!1},e.prototype.isUnOrderedList=function(e){var t=[/^[*]$/,/^[-]$/];if(!g(e=e.replace(/\u200B/g,"")))for(var i=0;i<t.length;i++)if(t[i].test(e))return!0;return!1},e.prototype.hasMultipleTextNode=function(e){if(e&&e.startContainer&&e.startContainer.parentNode){var t=e.startContainer.parentNode;if(e.startContainer.previousElementSibling&&e.startContainer.previousElementSibling.classList.contains("e-mention-chip")&&!e.startContainer.previousElementSibling.isContentEditable)return!0;if("BR"===this.parent.enterKey||se(t,"table"))return!1;for(var i=t.childNodes,n=[],o=0;o<i.length;o++){var r=i[o];if(r&&r.nodeType===Node.TEXT_NODE&&(n.push(r),n.length>1))return!0}}return!1},e.prototype.backSpaceCleanup=function(e,t){var i=!1,n=!0;g(t.startContainer.previousSibling)||"SPAN"!==t.startContainer.previousSibling.nodeName||(n="false"!==t.startContainer.previousSibling.contentEditable);var o="#text"===t.startContainer.nodeName?t.startContainer.parentElement:t.startContainer,r=!se("#text"===t.startContainer.nodeName?t.startContainer.parentElement:t.startContainer,"li")||"li"!==o.nodeName&&g(o.previousSibling);if("Backspace"===e.args.code&&8===e.args.keyCode&&0===t.startOffset&&0===t.endOffset&&0===this.parent.getSelection().length&&t.startContainer.textContent.length>0&&"TD"!==t.startContainer.parentElement.tagName&&"TH"!==t.startContainer.parentElement.tagName&&n&&r){if(!this.parent.formatter.editorManager.domNode.isBlockNode(o)&&!g(o.previousSibling)&&"BR"===o.previousSibling.nodeName||!g(t.startContainer.previousSibling)&&"BR"===t.startContainer.previousSibling.nodeName)return;if(this.rangeElement=this.getRootBlockNode(t.startContainer),"OL"===this.rangeElement.tagName||"UL"===this.rangeElement.tagName){var s=this.getRangeLiNode(t.startContainer);s.previousElementSibling&&s.previousElementSibling.childElementCount>0&&(this.oldRangeElement="BR"===s.previousElementSibling.lastElementChild.nodeName?s.previousElementSibling:s.previousElementSibling.lastChild,!g(s.lastElementChild)&&"BR"!==s.lastElementChild.nodeName&&g(s.lastElementChild.previousSibling)&&"#text"!==s.lastChild.nodeName?(this.rangeElement=s.lastElementChild,i=!0):this.rangeElement=s)}else{if(this.rangeElement===this.parent.inputElement||"TABLE"===this.rangeElement.tagName||!g(this.rangeElement.previousElementSibling)&&"TABLE"===this.rangeElement.previousElementSibling.tagName)return;this.oldRangeElement=this.rangeElement.previousElementSibling}var a=this.parent.formatter.editorManager.domNode.blockNodes();if(!g(a[0])&&t.collapsed&&0===t.startOffset&&0===t.endOffset&&""!==a[0].style.marginLeft&&(a[0].style.marginLeft=parseInt(a[0].style.marginLeft,10)<=20?"":parseInt(a[0].style.marginLeft,10)-20+"px"),g(this.oldRangeElement)&&g(a[0].previousSibling))return;if(a[0].previousSibling){var l=a[0].previousSibling,c=a[0];if(l.textContent.trim()){"BR"===l.lastChild.nodeName&&l.removeChild(l.lastChild);for(var h=this.parent.formatter.editorManager.nodeSelection.findLastTextPosition(l),d=h.offset,p=h.node,u=Array.from(c.childNodes),m=this.getImmediateBlockNode(p),f=0;f<u.length;f++)m.appendChild(u[f].cloneNode(!0));this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),p,d),c.parentNode.removeChild(c),e.args.preventDefault()}else l.parentNode.removeChild(l)}else{"OL"!==this.oldRangeElement.tagName&&"UL"!==this.oldRangeElement.tagName||(this.oldRangeElement=this.oldRangeElement.lastElementChild.lastElementChild?this.oldRangeElement.lastElementChild.lastElementChild:this.oldRangeElement.lastElementChild);for(var y=this.oldRangeElement.lastChild?this.oldRangeElement.lastChild:this.oldRangeElement;3!==y.nodeType&&"#text"!==y.nodeName&&"BR"!==y.nodeName&&!g(y.lastChild);)y=y.lastChild;"IMG"===y.nodeName?this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),y.parentElement,y.parentElement.childNodes.length):this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),y,y.textContent.length);var v=!1;if(this.oldRangeElement&&"#text"!==this.oldRangeElement.nodeName&&1===this.oldRangeElement.querySelectorAll("BR").length){var b=this.oldRangeElement.querySelector("BR");if(b&&g(b.nextSibling)){var M=b.parentNode,N=this.oldRangeElement.innerHTML;this.parent.formatter.saveData(N),ee(b),M&&0===M.childNodes.length&&(ee(M),v=!0)}}if(!g(this.rangeElement)&&this.oldRangeElement!==this.rangeElement&&!v){for(;this.rangeElement.firstChild;)"#text"===this.oldRangeElement.nodeName?this.oldRangeElement.parentElement.appendChild(this.rangeElement.childNodes[0]):this.oldRangeElement.appendChild(this.rangeElement.childNodes[0]);ee(i?this.rangeElement.parentElement:this.rangeElement),this.oldRangeElement.normalize()}}}if("Backspace"===e.args.code&&8===e.args.keyCode&&t.startContainer.nodeType!==Node.TEXT_NODE){var C=g(t.startContainer.childNodes[t.startOffset-1])||t.startContainer.childNodes[t.startOffset-1].isContentEditable?null:t.startContainer.childNodes[t.startOffset-1];C&&(C.remove(),e.args.preventDefault())}},e.prototype.findLastTextPosition=function(e){if(e.nodeType===Node.TEXT_NODE)return{node:e,offset:e.textContent?e.textContent.length:0};for(var t=e.childNodes.length-1;t>=0;t--){var i=this.findLastTextPosition(e.childNodes[t]);if(i)return i}return null},e.prototype.getImmediateBlockNode=function(e){for(;e&&Fp.indexOf(e.nodeName.toLocaleLowerCase())<0;)e=e.parentNode;return e},e.prototype.deleteCleanup=function(e,t){var i,n,o=!1;if("Delete"===e.args.code&&46===e.args.keyCode&&0!==this.parent.contentModule.getText().trim().replace(/(\r\n|\n|\r|\t)/gm,"").replace(/\u200B/g,"").length&&0===this.parent.getSelection().length&&"TD"!==t.startContainer.parentElement.tagName&&"TH"!==t.startContainer.parentElement.tagName){if(this.deleteRangeElement=n=this.getRootBlockNode(t.startContainer),"OL"===this.deleteRangeElement.tagName||"UL"===this.deleteRangeElement.tagName)(i=this.getRangeLiNode(t.startContainer)).nextElementSibling&&i.nextElementSibling.childElementCount>0&&!i.nextElementSibling.querySelector("BR")?g(i.lastElementChild)?this.deleteRangeElement=i:(this.deleteRangeElement=i.lastElementChild,o=!0):this.deleteRangeElement=this.getRangeElement(i);else if(3===this.deleteRangeElement.nodeType||"TABLE"===this.deleteRangeElement.tagName||!g(this.deleteRangeElement.nextElementSibling)&&"TABLE"===this.deleteRangeElement.nextElementSibling.tagName)return;var r=!1;if(this.deleteRangeElement.querySelectorAll("img").length>0&&""===this.deleteRangeElement.textContent.trim()&&(r=!0),this.getCaretIndex(t,this.deleteRangeElement)!==this.deleteRangeElement.textContent.length||r)this.deleteRangeElement=null;else{if(g(i)?this.deleteOldRangeElement=this.deleteRangeElement.nextElementSibling:o||!g(i.nextElementSibling)?this.deleteOldRangeElement=this.getRangeElement(i.nextElementSibling):this.deleteOldRangeElement=n.nextElementSibling,g(this.deleteOldRangeElement))return;0===t.startOffset&&1===t.endOffset&&"IMG"===this.deleteRangeElement.childNodes[0].nodeName?(this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.parent.contentModule.getDocument(),this.deleteRangeElement,this.deleteRangeElement,0,1),this.isImageDelete=!0):(this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),this.deleteRangeElement,this.deleteRangeElement.childNodes.length),this.isImageDelete=!1);var s=this.deleteRangeElement.querySelector("BR"),a=this.deleteRangeElement.lastChild,l=void 0;if(a&&(l=a.parentNode),s&&s.classList.contains("e-rte-image-remove-focus"))return void X([s],["e-rte-image-focus"]);if(s&&a&&"BR"===a.nodeName&&(ee(a),g(l)||0!==l.childNodes.length||ee(l),e.args.preventDefault()),!g(this.deleteRangeElement)&&"OL"!==this.deleteOldRangeElement.tagName&&"UL"!==this.deleteOldRangeElement.tagName&&this.deleteOldRangeElement!==this.deleteRangeElement&&this.parent.contentModule.getEditPanel().contains(this.deleteRangeElement)){for(;this.deleteOldRangeElement.firstChild;)this.deleteRangeElement.appendChild(this.deleteOldRangeElement.childNodes[0]);ee(o?this.deleteOldRangeElement.parentElement:this.deleteOldRangeElement),this.deleteRangeElement.normalize()}else this.deleteRangeElement=null,this.deleteOldRangeElement=null}}},e.prototype.getCaretIndex=function(e,t){var i=0;if(0!==this.parent.contentModule.getDocument().getSelection().rangeCount){var n=e.cloneRange();n.selectNodeContents(t),n.setEnd(e.endContainer,e.endOffset),i=n.toString().length}return i},e.prototype.getRangeElement=function(e){return e.lastElementChild?"BR"===e.lastElementChild.tagName?e.lastElementChild.previousElementSibling?e.lastElementChild.previousElementSibling:e:e.lastElementChild:e},e.prototype.getRootBlockNode=function(e){for(;e&&this.parent&&this.parent.inputElement!==e&&e.parentElement!==this.parent.inputElement;e)e=e.parentElement;return e},e.prototype.getRangeLiNode=function(e){for(var t=e.parentElement;t!==this.parent.inputElement&&(1!==t.nodeType||"LI"!==t.tagName);)t=t.parentElement;return t},e.prototype.onPaste=function(e){var t=new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);if(e.text.match(t)){if(e.isWordPaste)return;e.args.preventDefault();var i=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());this.parent.formatter.editorManager.nodeSelection.save(i,this.parent.contentModule.getDocument());for(var n=new RegExp(/([^\S]|^)(((https?\:\/\/)))/gi),o=new RegExp(/([^\S]|^)(((www\.))(\S+))/gi),r=e.text.split("\n"),s="",a=0;a<r.length;a++)if(""===r[a].trim())s+=Nr(this.parent);else{for(var l="",c=!0,h=r[a].split(" "),d=0;d<h.length;d++)""===h[d].trim()?l+=c?"&nbsp;":" ":(c=!1,l+=h[d]+" ");s+=0===a?"<span>"+l.trim()+"</span>":"<p>"+l.trim()+"</p>"}var p=this.parent.createElement("div");p.setAttribute("class","pasteContent"),p.style.display="inline",p.innerHTML=s.replace("&para","&amp;para");var u=p.querySelectorAll("span, p");for(a=0;a<u.length;a++){var m=u[a].innerHTML.split(" "),f="";for(d=0;d<m.length;d++)m[d].match(n)||m[d].match(o)?f+='<a class="e-rte-anchor" href="'+m[d]+'" title="'+m[d]+'" target="_blank" aria-label="'+this.parent.serviceLocator.getService("rteLocale").getConstant("linkAriaLabel")+'">'+m[d]+" </a>":f+=m[d]+" ";u[a].innerHTML=f.trim()}var y=p.childNodes[0];g(y)||g(y.childNodes[0])||"SPAN"!==y.nodeName||"A"!==y.childNodes[0].nodeName||(p.innerHTML=p.innerHTML.replace("<span>","").replace("</span>","")),g(this.parent.pasteCleanupModule)?this.parent.formatter.editorManager.execCommand("insertHTML",null,null,null,p):e.callBack(p.innerHTML)}},e.prototype.spaceLink=function(e){var t=this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()),i=this.nodeSelectionObj.getParentNodeCollection(t),n=t.startContainer.textContent.substr(0,t.endOffset),o=n.split(" "),r=o[o.length-1],s=t.startOffset-(n.length-o[o.length-1].length);r=r.slice(0,s);var a=new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);if(i[0]&&"A"!==i[0].nodeName&&r.match(a)){var l=this.nodeSelectionObj.save(t,this.parent.contentModule.getDocument()),c={url:r.indexOf("http")>-1?r:"http://"+r,selection:l,selectParent:this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(t),text:r,title:"",target:"_blank"};this.parent.formatter.process(this.parent,{item:{command:"Links",subCommand:"CreateLink"}},e,c)}},e.prototype.onToolbarClick=function(e){var t,i,n,o=this,r=e.item,s=se(e.originalEvent.target,".e-rte-quick-popup"),a=e.originalEvent.target;if(this.parent.notify(In,{target:a}),"FormatPainter"!==r.command)if(!s||s.classList.contains("e-rte-inline-popup")||s.classList.contains("e-rte-text-popup")){var l=document.getElementById(this.parent.getID()+"_rtelink"),c=document.getElementById(this.parent.getID()+"_image");if("SourceCode"!==r.subCommand&&"Preview"!==r.subCommand&&"FontColor"!==r.subCommand&&"BackgroundColor"!==r.subCommand&&"NumberFormatList"!==r.subCommand&&"BulletFormatList"!==r.subCommand){h=this.nodeSelectionObj.getRange(this.parent.contentModule.getDocument());g(l)&&g(c)&&(t=this.nodeSelectionObj.save(h,this.parent.contentModule.getDocument())),i=this.nodeSelectionObj.getNodeCollection(h),n=this.nodeSelectionObj.getParentNodeCollection(h)}switch(r.subCommand){case"Maximize":this.parent.notify(qi,{args:e});break;case"Minimize":this.parent.notify(Wi,{args:e});break;case"CreateLink":this.parent.notify("insertLink",{member:"link",args:e,selectNode:i,selection:t,selectParent:n});break;case"RemoveLink":this.parent.notify("unLink",{member:"link",args:e,selectNode:i,selection:t,selectParent:n});break;case"Print":this.parent.print();break;case"Image":this.parent.notify("insertImage",{member:"image",args:e,selectNode:i,selection:t,selectParent:n});break;case"Audio":this.parent.notify("insertAudio",{member:"audio",args:e,selectNode:i,selection:t,selectParent:n});break;case"Video":this.parent.notify("insertVideo",{member:"video",args:e,selectNode:i,selection:t,selectParent:n});break;case"CreateTable":this.parent.notify("createTable",{member:"table",args:e,selection:t});break;case"SourceCode":this.parent.notify($i,{member:"viewSource",args:e});break;case"Preview":this.parent.notify(en,{member:"updateSource",args:e});break;case"FontColor":case"BackgroundColor":break;case"File":this.parent.notify("renderFileManager",{member:"fileManager",args:e,selectNode:i,selection:t,selectParent:n});break;case"EmojiPicker":this.parent.notify(Cn,{member:"emojiPicker",args:e});break;case"ImportWord":this.parent.notify("onImport",{});break;case"ExportWord":this.parent.notify(Vi,{member:"ExportWord",args:e});break;case"ExportPdf":this.parent.notify(Vi,{member:"ExportPdf",args:e});break;default:this.parent.formatter.process(this.parent,e,e.originalEvent,null)}!g(this.parent.quickToolbarModule)&&(g(this.parent.quickToolbarModule.imageQTBar)&&"Image"===r.subCommand||g(this.parent.quickToolbarModule.audioQTBar)&&"Audio"===r.subCommand||g(this.parent.quickToolbarModule.videoQTBar)&&"Video"===r.subCommand||g(this.parent.quickToolbarModule.linkQTBar)&&"CreateLink"===r.subCommand)&&this.parent.notify("renderQuickToolbar",{})}else{if("SourceCode"!==r.subCommand&&"Preview"!==r.subCommand&&"FontColor"!==r.subCommand&&"BackgroundColor"!==r.subCommand){eu()&&"Images"===r.command&&this.nodeSelectionObj.restore();var h=this.nodeSelectionObj.getRange(this.parent.contentModule.getDocument());t=this.nodeSelectionObj.save(h,this.parent.contentModule.getDocument()),i=this.nodeSelectionObj.getNodeCollection(h),n=this.nodeSelectionObj.getParentNodeCollection(h)}"Images"===r.command&&this.parent.notify("image-toolbar-action",{member:"image",args:e,selectNode:i,selection:t,selectParent:n}),"Audios"===r.command&&this.parent.notify("audio-toolbar-action",{member:"audio",args:e,selectNode:i,selection:t,selectParent:n}),"Videos"===r.command&&this.parent.notify("video-toolbar-action",{member:"video",args:e,selectNode:i,selection:t,selectParent:n}),"Links"===r.command&&this.parent.notify("link-toolbar-action",{member:"link",args:e,selectNode:i,selection:t,selectParent:n}),"Table"===r.command&&this.parent.notify("table-toolbar-action",{member:"table",args:e,selectNode:i,selection:t,selectParent:n})}else 1===e.originalEvent.detail?(clearTimeout(this.clickTimeout),this.clickTimeout=setTimeout((function(){o.parent.notify("formatPainterClick",{member:"formatPainter",args:e})}),200)):(clearTimeout(this.clickTimeout),this.parent.notify("formatPainterDoubleClick",{member:"formatPainter",args:e}))},e.prototype.instantiateRenderer=function(){this.parent.iframeSettings.enable?this.renderFactory.addRenderer(bi.Content,new Om(this.parent)):this.renderFactory.addRenderer(bi.Content,new xr(this.parent))},e.prototype.removeEventListener=function(){this.parent.off(ji,this.render),this.parent.off(Ui,this.onPropertyChanged),this.parent.off(Hi,this.onToolbarClick),this.parent.off(zi,this.destroy),this.parent.off(Yi,this.onKeyDown),this.parent.off(wi,this.instantiateRenderer),this.parent.off(hn,this.selectAll),this.parent.off(dn,this.selectRange),this.parent.off(pn,this.getSelectedHtml),this.parent.off(nn,this.onSelectionSave),this.parent.off(on,this.onSelectionRestore),this.parent.off(gn,this.updateReadOnly),this.parent.off(un,this.onPaste),this.parent.off(Ii,this.isTableClassAdded)},e.prototype.render=function(){this.contentRenderer=this.renderFactory.getRenderer(bi.Content);var e=this.contentRenderer.getEditPanel(),t={undoRedoSteps:this.parent.undoRedoSteps,undoRedoTimer:this.parent.undoRedoTimer};if(g(this.parent.formatter)){var i=new Qm({currentDocument:this.contentRenderer.getDocument(),element:e,options:t,formatPainterSettings:this.parent.formatPainterSettings});this.parent.setProperties({formatter:i},!0)}else this.parent.formatter.updateFormatter(e,this.contentRenderer.getDocument(),t);this.parent.enableXhtml&&this.parent.notify(vn,{}),this.parent.toolbarSettings.enable&&(this.toolbarUpdate=new qm(this.parent)),this.parent.inlineMode.enable&&(g(this.parent.fontFamily.default)||(e.style.fontFamily=this.parent.fontFamily.default),g(this.parent.fontSize.default)||(e.style.fontSize=this.parent.fontSize.default)),this.parent.notify(Bi,{})},e.prototype.onPropertyChanged=function(e){if(g(e)||g(e.newProp.toolbarSettings)||g(e.newProp.toolbarSettings.enable)||(this.toolbarUpdate=new qm(this.parent)),!g(e.newProp.formatter)){var t=this.contentRenderer.getEditPanel(),i={undoRedoSteps:this.parent.undoRedoSteps,undoRedoTimer:this.parent.undoRedoTimer};this.parent.formatter.updateFormatter(t,this.contentRenderer.getDocument(),i)}},e.prototype.getModuleName=function(){return"htmlEditor"},e.prototype.selectAll=function(){var e=yr(this.parent.contentModule.getDocument(),this.parent.contentModule.getEditPanel());e.length>0&&this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.parent.contentModule.getDocument(),e[0],e[e.length-1],0,e[e.length-1].textContent.length)},e.prototype.selectRange=function(e){this.parent.formatter.editorManager.nodeSelection.setRange(this.parent.contentModule.getDocument(),e.range)},e.prototype.getSelectedHtml=function(e){e.callBack(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).toString())},e.prototype.tableSelectionKeyAction=function(e){for(var t=e.args,i=this.parent.inputElement.querySelectorAll(".e-cell-select"),n=0;n<i.length;n++){var o=i[n];ou([o],[go,yo,fo]),0===n?(32===t.keyCode?o.innerHTML="&#8203;<br>":o.innerHTML="<br>",this.nodeSelectionObj.setCursorPoint(this.parent.contentModule.getDocument(),o.firstChild,0)):o.innerHTML="<br>"}},e.prototype.marginTabAdd=function(e,t){for(var i=0;i<t.length;i++){var n=t[i];if(!n.closest("li"))if(n.style.marginLeft){var o=parseInt(n.style.marginLeft,10);e?o-=20:o+=20,n.style.marginLeft=o.toString()+"px","0px"===n.style.marginLeft&&n.removeAttribute("style")}else e||(n.style.marginLeft="20px")}},e}(),Gm=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Xm=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Km=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gm(t,e),Xm([De(null)],t.prototype,"downloadUrl",void 0),Xm([De(null)],t.prototype,"getImageUrl",void 0),Xm([De(null)],t.prototype,"uploadUrl",void 0),Xm([De(null)],t.prototype,"url",void 0),t}(Qe),Zm=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Jm=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},$m=["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"],eg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Zm(t,e),Jm([De($m)],t.prototype,"items",void 0),Jm([De(!0)],t.prototype,"visible",void 0),t}(Qe);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Zm(t,e),Jm([De("")],t.prototype,"id",void 0),Jm([De("")],t.prototype,"text",void 0),Jm([De("auto")],t.prototype,"width",void 0),Jm([De("")],t.prototype,"cssClass",void 0),Jm([De(!1)],t.prototype,"showAlwaysInPopup",void 0),Jm([De(!1)],t.prototype,"disabled",void 0),Jm([De("")],t.prototype,"prefixIcon",void 0),Jm([De("")],t.prototype,"suffixIcon",void 0),Jm([De(!0)],t.prototype,"visible",void 0),Jm([De("None")],t.prototype,"overflow",void 0),Jm([De("")],t.prototype,"template",void 0),Jm([De("Button")],t.prototype,"type",void 0),Jm([De("Both")],t.prototype,"showTextOn",void 0),Jm([De(null)],t.prototype,"htmlAttributes",void 0),Jm([De("")],t.prototype,"tooltipText",void 0),Jm([De("Left")],t.prototype,"align",void 0),Jm([De(-1)],t.prototype,"tabIndex",void 0),Jm([De()],t.prototype,"name",void 0)}(Qe);var tg=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ig=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ng=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tg(t,e),ig([De(!0)],t.prototype,"allowSearchOnTyping",void 0),ig([De("contains")],t.prototype,"filterType",void 0),ig([De(!0)],t.prototype,"ignoreCase",void 0),ig([De(null)],t.prototype,"placeholder",void 0),t}(Qe),og=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),rg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},sg=[{field:"name",headerText:"Name",minWidth:120,template:'<span class="e-fe-text">${name}</span>',customAttributes:{class:"e-fe-grid-name"}},{field:"_fm_modified",headerText:"DateModified",type:"dateTime",format:"MMMM dd, yyyy HH:mm",minWidth:120,width:"190"},{field:"size",headerText:"Size",minWidth:90,width:"110",template:vi((function(e){return'<span class="e-fe-size">'+e.size+"</span>"})),format:"n2"}],ag=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return og(t,e),rg([De(!0)],t.prototype,"columnResizing",void 0),rg([De(sg)],t.prototype,"columns",void 0),t}(Qe),lg=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),cg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},hg=["Open","|","Cut","Copy","|","Delete","Download","Rename","|","Details"],dg=["Open","|","Cut","Copy","Paste","|","Delete","Rename","Download","|","Details"],pg=["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"],ug=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lg(t,e),cg([De(hg)],t.prototype,"file",void 0),cg([De(dg)],t.prototype,"folder",void 0),cg([De(pg)],t.prototype,"layout",void 0),cg([De(!0)],t.prototype,"visible",void 0),t}(Qe),mg=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),gg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},fg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return mg(t,e),gg([De("650px")],t.prototype,"maxWidth",void 0),gg([De("240px")],t.prototype,"minWidth",void 0),gg([De(!0)],t.prototype,"visible",void 0),gg([De("None")],t.prototype,"sortOrder",void 0),t}(Qe),yg=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},bg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yg(t,e),vg([De("")],t.prototype,"allowedExtensions",void 0),vg([De(!0)],t.prototype,"autoUpload",void 0),vg([De(!1)],t.prototype,"autoClose",void 0),vg([De(!1)],t.prototype,"directoryUpload",void 0),vg([De(0)],t.prototype,"minFileSize",void 0),vg([De(3e7)],t.prototype,"maxFileSize",void 0),vg([De(0)],t.prototype,"chunkSize",void 0),t}(Qe),Mg=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.showFullScreen=function(e){var t=this;if(!0!==this.parent.toolbarSettings.enable||"Markdown"===this.parent.editorMode||g(this.parent.quickToolbarModule)||this.parent.quickToolbarModule.hideQuickToolbars(),this.parent.showTooltip&&!g(document.querySelector(".e-tooltip-wrap"))&&this.parent.notify(En,{args:e}),this.scrollableParent=pa(this.parent.element),!this.parent.element.classList.contains(Yn)){var i={cancel:!1,requestType:"Maximize",targetItem:"Maximize",args:e};this.parent.trigger(Ki,i,(function(i){i.cancel||(t.parent.toolbarSettings.enableFloating&&!t.parent.inlineMode.enable&&t.parent.toolbarSettings.enable&&(t.parent.getToolbarElement().style.width="100%",t.parent.getToolbarElement().style.top="0px"),t.parent.element.classList.add(Yn),t.toggleParentOverflow(!0),t.parent.toolbarModule&&(t.parent.getBaseToolbarObject().toolbarObj.items[0].properties||t.parent.getBaseToolbarObject().toolbarObj.removeItems(0),Q.isDevice&&t.parent.toolbarModule.removeFixedTBarClass(),t.parent.toolbarModule.updateItem({targetItem:"Maximize",updateItem:"Minimize",baseToolbar:t.parent.getBaseToolbarObject()})),t.parent.refreshUI(),t.parent.trigger(Zi,{requestType:"Maximize",targetItem:"Maximize",args:e}))}))}},e.prototype.hideFullScreen=function(e){var t=this;if(!0!==this.parent.toolbarSettings.enable||"Markdown"===this.parent.editorMode||g(this.parent.quickToolbarModule)||this.parent.quickToolbarModule.hideQuickToolbars(),this.parent.showTooltip&&!g(document.querySelector(".e-tooltip-wrap"))&&this.parent.notify(En,{args:e}),this.parent.element.classList.contains(Yn)){var i={cancel:!1,requestType:"Minimize",targetItem:"Minimize",args:e};this.parent.trigger(Ki,i,(function(i){if(!i.cancel){t.parent.element.classList.remove(Yn);for(var n=document.querySelectorAll(".e-rte-overflow"),o=0;o<n.length;o++)X([n[o]],["e-rte-overflow"]);t.parent.toolbarModule&&(t.parent.getBaseToolbarObject().toolbarObj.items[0].properties||t.parent.getBaseToolbarObject().toolbarObj.removeItems(0),t.parent.toolbarModule.updateItem({targetItem:"Minimize",updateItem:"Maximize",baseToolbar:t.parent.getBaseToolbarObject()}),Q.isDevice&&t.parent.inlineMode.enable&&t.parent.toolbarModule.addFixedTBarClass()),t.parent.refreshUI(),t.parent.trigger(Zi,{requestType:"Minimize",targetItem:"Minimize",args:e})}}))}},e.prototype.toggleParentOverflow=function(e){if(!g(this.scrollableParent))for(var t=0;t<this.scrollableParent.length;t++){if("#document"===this.scrollableParent[t].nodeName)G([document.querySelector("body")],["e-rte-overflow"]);else G([this.scrollableParent[t]],["e-rte-overflow"])}},e.prototype.onKeyDown=function(e){var t=e.args;switch(t.action){case"full-screen":this.showFullScreen(e.args),t.preventDefault();break;case"escape":this.hideFullScreen(e.args),t.preventDefault()}},e.prototype.addEventListener=function(){this.parent.on(Yi,this.onKeyDown,this),this.parent.on(zi,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.off(Yi,this.onKeyDown),this.parent.off(zi,this.destroy)},e.prototype.destroy=function(){if(!g(this.parent)){this.parent.element.classList.contains(Yn)&&this.toggleParentOverflow(!1);for(var e=document.querySelectorAll(".e-rte-overflow"),t=0;t<e.length;t++)X([e[t]],["e-rte-overflow"]);this.removeEventListener()}},e}();function Ng(e,t,i,n){var o;i?o=t.contentModule.getDocument().querySelector("body"):o=t.element;if(Object.keys(e).length)for(var r=0,s=Object.keys(e);r<s.length;r++){var a=s[r];if("class"===a)o.classList.add(e[""+a]);else if("disabled"===a&&"disabled"===e[""+a])t.enabled=!1,t.setEnable();else if("readonly"===a&&"readonly"===e[""+a])t.readonly=!0,t.setReadOnly(n);else if("style"===a)o.setAttribute("style",e[""+a]);else if("tabindex"===a)t.inputElement.setAttribute("tabindex",e[""+a]);else if("placeholder"===a)t.placeholder=e[""+a],t.setPlaceHolder();else{["name","required"].indexOf(a)>-1?t.valueContainer.setAttribute(a,e[""+a]):o.setAttribute(a,e[""+a])}}}var Cg={bold:{command:"Style",subCommand:"Bold",value:"strong"},italic:{command:"Style",subCommand:"Italic",value:"em"},underline:{command:"Style",subCommand:"Underline",value:"span"},strikeThrough:{command:"Style",subCommand:"StrikeThrough",value:"span"},insertCode:{command:"Formats",subCommand:"Pre",value:"pre"},superscript:{command:"Effects",subCommand:"SuperScript",value:"sup"},subscript:{command:"Effects",subCommand:"SubScript",value:"sub"},uppercase:{command:"Casing",subCommand:"UpperCase"},lowercase:{command:"Casing",subCommand:"LowerCase"},fontColor:{command:"font",subCommand:"fontcolor",value:"#ff0000"},fontName:{command:"font",subCommand:"fontname",value:"Segoe UI"},fontSize:{command:"font",subCommand:"fontsize",value:"10pt"},backColor:{command:"font",subCommand:"backgroundcolor",value:"#ffff00"},justifyCenter:{command:"Alignments",subCommand:"JustifyCenter"},justifyFull:{command:"Alignments",subCommand:"JustifyFull"},justifyLeft:{command:"Alignments",subCommand:"JustifyLeft"},justifyRight:{command:"Alignments",subCommand:"JustifyRight"},undo:{command:"Actions",subCommand:"Undo"},redo:{command:"Actions",subCommand:"Redo"},createLink:{command:"Links",subCommand:"createLink"},editLink:{command:"Links",subCommand:"createLink"},createImage:{command:"Images",subCommand:"Images"},formatBlock:{command:"Formats",value:"P"},heading:{command:"Formats",value:"H1"},indent:{command:"Indents",subCommand:"Indent"},outdent:{command:"Indents",subCommand:"Outdent"},insertHTML:{command:"InsertHTML",subCommand:"InsertHTML",value:""},insertText:{command:"InsertText",subCommand:"InsertText",value:""},insertHorizontalRule:{command:"InsertHTML",subCommand:"InsertHTML",value:"<hr/>"},insertImage:{command:"Images",subCommand:"Image"},insertAudio:{command:"Audios",subCommand:"Audio"},insertVideo:{command:"Videos",subCommand:"Video"},editImage:{command:"Images",subCommand:"Image"},insertTable:{command:"Table",subCommand:"CreateTable"},insertBrOnReturn:{command:"InsertHTML",subCommand:"InsertHTML",value:"<br/>"},insertOrderedList:{command:"Lists",value:"OL"},insertUnorderedList:{command:"Lists",value:"UL"},insertParagraph:{command:"Formats",value:"P"},removeFormat:{command:"Clear",subCommand:"ClearFormat"},copyFormatPainter:{command:"FormatPainter",value:"format-copy"},applyFormatPainter:{command:"FormatPainter",value:"format-paste"},escapeFormatPainter:{command:"FormatPainter",value:"escape"},InlineCode:{command:"Style",subCommand:"inlinecode",value:"inlinecode"}},Eg=function(){function e(){this.services={}}return e.prototype.register=function(e,t){g(this.services[""+e])&&(this.services[""+e]=t)},e.prototype.getService=function(e){if(g(this.services[""+e]))throw"The service "+e+" is not registered";return this.services[""+e]},e.prototype.destroy=function(){this.services={}},e}(),Dg=function(){function e(){this.rendererMap={}}return e.prototype.addRenderer=function(e,t){var i=p(bi,e);g(this.rendererMap[""+i])&&(this.rendererMap[""+i]=t)},e.prototype.getRenderer=function(e){var t=p(bi,e);if(g(this.rendererMap[""+t]))throw"The renderer "+t+" is not found";return this.rendererMap[""+t]},e.prototype.destroy=function(){this.rendererMap={}},e}(),Tg=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Lg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Sg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De(!0)],t.prototype,"enable",void 0),Lg([De(!0)],t.prototype,"enableFloating",void 0),Lg([De(Mi.Expand)],t.prototype,"type",void 0),Lg([De(Qo)],t.prototype,"items",void 0),Lg([De({})],t.prototype,"itemConfigs",void 0),t}(Qe),Ig=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De(null)],t.prototype,"serviceUrl",void 0),t}(Qe),wg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De(null)],t.prototype,"serviceUrl",void 0),Lg([De("Sample.docx")],t.prototype,"fileName",void 0),Lg([De(null)],t.prototype,"stylesheet",void 0),t}(Qe),xg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De(null)],t.prototype,"serviceUrl",void 0),Lg([De("Sample.pdf")],t.prototype,"fileName",void 0),Lg([De(null)],t.prototype,"stylesheet",void 0),t}(Qe),jg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De([".jpeg",".jpg",".png"])],t.prototype,"allowedTypes",void 0),Lg([De("inline")],t.prototype,"display",void 0),Lg([De("Blob")],t.prototype,"saveFormat",void 0),Lg([De("auto")],t.prototype,"width",void 0),Lg([De("auto")],t.prototype,"height",void 0),Lg([De(null)],t.prototype,"saveUrl",void 0),Lg([De(null)],t.prototype,"path",void 0),Lg([De(!0)],t.prototype,"resize",void 0),Lg([De(null)],t.prototype,"removeUrl",void 0),Lg([De(0)],t.prototype,"minWidth",void 0),Lg([De(null)],t.prototype,"maxWidth",void 0),Lg([De(0)],t.prototype,"minHeight",void 0),Lg([De(null)],t.prototype,"maxHeight",void 0),Lg([De(!1)],t.prototype,"resizeByPercent",void 0),t}(Qe),Og=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De([".wav",".mp3",".m4a",".wma"])],t.prototype,"allowedTypes",void 0),Lg([De("Inline")],t.prototype,"layoutOption",void 0),Lg([De("Blob")],t.prototype,"saveFormat",void 0),Lg([De(null)],t.prototype,"saveUrl",void 0),Lg([De(null)],t.prototype,"removeUrl",void 0),Lg([De(null)],t.prototype,"path",void 0),t}(Qe),zg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De([".mp4",".mov",".wmv",".avi"])],t.prototype,"allowedTypes",void 0),Lg([De("Inline")],t.prototype,"layoutOption",void 0),Lg([De("Blob")],t.prototype,"saveFormat",void 0),Lg([De("auto")],t.prototype,"width",void 0),Lg([De("auto")],t.prototype,"height",void 0),Lg([De(null)],t.prototype,"saveUrl",void 0),Lg([De(null)],t.prototype,"path",void 0),Lg([De(!0)],t.prototype,"resize",void 0),Lg([De(null)],t.prototype,"removeUrl",void 0),Lg([De(0)],t.prototype,"minWidth",void 0),Lg([De(null)],t.prototype,"maxWidth",void 0),Lg([De(0)],t.prototype,"minHeight",void 0),Lg([De(null)],t.prototype,"maxHeight",void 0),Lg([De(!1)],t.prototype,"resizeByPercent",void 0),t}(Qe),Ag=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([Se()],t.prototype,"beforeSend",void 0),Lg([Te({getImageUrl:null,url:null,uploadUrl:null},Km)],t.prototype,"ajaxSettings",void 0),Lg([De(!1)],t.prototype,"allowDragAndDrop",void 0),Lg([Te({visible:!0,file:["Open","|","Cut","Copy","|","Delete","Rename","|","Details"],folder:["Open","|","Cut","Copy","Paste","|","Delete","Rename","|","Details"],layout:["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"]},ug)],t.prototype,"contextMenuSettings",void 0),Lg([De("")],t.prototype,"cssClass",void 0),Lg([Te({},ag)],t.prototype,"detailsViewSettings",void 0),Lg([De(!1)],t.prototype,"enable",void 0),Lg([Te({maxWidth:"650px",minWidth:"240px",visible:!0},fg)],t.prototype,"navigationPaneSettings",void 0),Lg([De("/")],t.prototype,"path",void 0),Lg([De(null)],t.prototype,"rootAliasName",void 0),Lg([Te({},ng)],t.prototype,"searchSettings",void 0),Lg([De(!0)],t.prototype,"showFileExtension",void 0),Lg([De(!1)],t.prototype,"showHiddenItems",void 0),Lg([De(!0)],t.prototype,"showThumbnail",void 0),Lg([De("Ascending")],t.prototype,"sortOrder",void 0),Lg([Te({visible:!0,items:["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"]},eg)],t.prototype,"toolbarSettings",void 0),Lg([Te({autoUpload:!0,minFileSize:0,maxFileSize:3e7,allowedExtensions:"",autoClose:!1},bg)],t.prototype,"uploadSettings",void 0),Lg([De("LargeIcons")],t.prototype,"view",void 0),t}(Qe),kg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De("100%")],t.prototype,"width",void 0),Lg([De(Vo)],t.prototype,"styles",void 0),Lg([De(!0)],t.prototype,"resize",void 0),Lg([De(0)],t.prototype,"minWidth",void 0),Lg([De(null)],t.prototype,"maxWidth",void 0),t}(Qe),Pg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De(!0)],t.prototype,"enable",void 0),Lg([De(!1)],t.prototype,"showOnRightClick",void 0),Lg([De("hide")],t.prototype,"actionOnScroll",void 0),Lg([De(["Open","Edit","UnLink"])],t.prototype,"link",void 0),Lg([De(["Replace","Align","Caption","Remove","-","InsertLink","OpenImageLink","EditImageLink","RemoveImageLink","Display","AltText","Dimension"])],t.prototype,"image",void 0),Lg([De(["AudioReplace","AudioRemove","AudioLayoutOption"])],t.prototype,"audio",void 0),Lg([De(["VideoReplace","VideoAlign","VideoRemove","VideoLayoutOption","VideoDimension"])],t.prototype,"video",void 0),Lg([De(null)],t.prototype,"text",void 0),Lg([De(["TableHeader","TableRows","TableColumns","BackgroundColor","-","TableRemove","Alignments","TableCellVerticalAlign","Styles"])],t.prototype,"table",void 0),t}(Qe),Rg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De("b; em; font; sub; sup; kbd; i; s; u; code; strong; span; p; div; h1; h2; h3; h4; h5; h6; blockquote; ol; ul; li; pre;")],t.prototype,"allowedFormats",void 0),Lg([De(null)],t.prototype,"deniedFormats",void 0),t}(Qe),Bg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De(er)],t.prototype,"iconsSet",void 0),Lg([De(!0)],t.prototype,"showSearchBox",void 0),t}(Qe),Hg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De(!1)],t.prototype,"prompt",void 0),Lg([De(null)],t.prototype,"deniedAttrs",void 0),Lg([De(["background","background-color","border","border-bottom","border-left","border-radius","border-right","border-style","border-top","border-width","clear","color","cursor","direction","display","float","font","font-family","font-size","font-weight","font-style","height","left","line-height","list-style-type","margin","margin-top","margin-left","margin-right","margin-bottom","max-height","max-width","min-height","min-width","overflow","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","position","right","table-layout","text-align","text-decoration","text-transform","text-indent","top","vertical-align","visibility","white-space","width","flex-direction"])],t.prototype,"allowedStyleProps",void 0),Lg([De(null)],t.prototype,"deniedTags",void 0),Lg([De(!0)],t.prototype,"keepFormat",void 0),Lg([De(!1)],t.prototype,"plainText",void 0),t}(Qe),Ug=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De(null)],t.prototype,"default",void 0),Lg([De("72px")],t.prototype,"width",void 0),Lg([De(qo)],t.prototype,"items",void 0),t}(Qe),Fg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De(null)],t.prototype,"default",void 0),Lg([De("60px")],t.prototype,"width",void 0),Lg([De(Wo)],t.prototype,"items",void 0),t}(Qe),Yg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De(null)],t.prototype,"default",void 0),Lg([De("65px")],t.prototype,"width",void 0),Lg([De(_o)],t.prototype,"types",void 0),t}(Qe),Vg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De("#ff0000")],t.prototype,"default",void 0),Lg([De("Palette")],t.prototype,"mode",void 0),Lg([De(10)],t.prototype,"columns",void 0),Lg([De(Go)],t.prototype,"colorCode",void 0),Lg([De(!1)],t.prototype,"modeSwitcher",void 0),t}(Qe),Qg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De("#ffff00")],t.prototype,"default",void 0),Lg([De("Palette")],t.prototype,"mode",void 0),Lg([De(10)],t.prototype,"columns",void 0),Lg([De(Xo)],t.prototype,"colorCode",void 0),Lg([De(!1)],t.prototype,"modeSwitcher",void 0),t}(Qe),qg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De(Ko)],t.prototype,"types",void 0),t}(Qe),Wg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tg(t,e),Lg([De(Zo)],t.prototype,"types",void 0),t}(Qe),_g=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Gg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Xg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _g(t,e),Gg([De([])],t.prototype,"styles",void 0),Gg([De([])],t.prototype,"scripts",void 0),t}(Qe),Kg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _g(t,e),Gg([De(!1)],t.prototype,"enable",void 0),Gg([De(null)],t.prototype,"attributes",void 0),Gg([Te({},Xg)],t.prototype,"resources",void 0),Gg([De([])],t.prototype,"metaTags",void 0),Gg([De(null)],t.prototype,"sandbox",void 0),t}(Qe),Zg=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Jg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},$g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Zg(t,e),Jg([De(!1)],t.prototype,"enable",void 0),Jg([De(!0)],t.prototype,"onSelection",void 0),t}(Qe),ef=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(fn,this.enterHandler,this),this.parent.on(zi,this.destroy,this)},e.prototype.destroy=function(){g(this.parent)||this.removeEventListener()},e.prototype.removeEventListener=function(){this.parent.off(fn,this.enterHandler),this.parent.off(zi,this.destroy)},e.prototype.getRangeNode=function(){this.range=this.parent.getRange(),this.startNode="#text"===this.range.startContainer.nodeName?this.range.startContainer.parentElement:this.range.startContainer,this.endNode="#text"===this.range.endContainer.nodeName?this.range.endContainer.parentElement:this.range.endContainer},e.prototype.enterHandler=function(e){var t=this;this.getRangeNode();var i=!0;this.formatTags=["h1","h2","h3","h4","h5","h6","blockquote"];var n=this.processedTableImageCursor();if(!n.start&&!n.end||"TABLE"!==n.startName&&"TABLE"!==n.endName)if(!n.start&&!n.end&&"IMG"!==this.range.startContainer.nodeName||"BR"!==this.parent.enterKey||"IMG"!==n.startName&&"IMG"!==n.endName&&"IMG"!==this.range.startContainer.nodeName){if(!g(this.startNode.closest("TABLE"))&&!g(this.endNode.closest("TABLE"))){i=!1;for(var o=this.startNode,r=o;!this.parent.formatter.editorManager.domNode.isBlockNode(o);)r=o=o.parentElement;i="TH"!==r.tagName&&"TD"!==r.tagName&&"TBODY"!==r.tagName}var s=e.args;if(13===s.which&&!s.ctrlKey&&(Q.isDevice?"Enter"===s.key:"Enter"===s.code||"NumpadEnter"===s.code)&&g(this.startNode.closest("LI, UL, OL"))&&g(this.endNode.closest("LI, UL, OL"))&&g(this.startNode.closest(".e-img-inner"))&&i&&g(this.startNode.closest("PRE"))&&g(this.endNode.closest("PRE"))&&g(this.startNode.closest("BLOCKQUOTE"))&&g(this.endNode.closest("BLOCKQUOTE"))){var a=e.args.shiftKey,l={cancel:!1,name:Ki,requestType:a?"ShiftEnterAction":"EnterAction",originalEvent:e.args};this.parent.trigger(Ki,l,(function(n){if(!n.cancel){if(0===t.parent.formatter.getUndoRedoStack().length&&t.parent.formatter.saveData(),t.range.startOffset!==t.range.endOffset||t.range.startContainer!==t.range.endContainer)if("SPAN"===t.range.startContainer.nodeName&&(t.range.startContainer.classList.contains("e-video-wrap")||t.range.startContainer.classList.contains("e-audio-wrap"))||t.range.deleteContents(),"#text"===t.range.startContainer.nodeName&&0===t.range.startContainer.textContent.length&&t.range.startContainer.parentElement!==t.parent.inputElement)"BR"===t.parent.enterKey?t.range.startContainer.parentElement.innerHTML="&#8203;":t.range.startContainer.parentElement.innerHTML="<br>";else if(t.range.startContainer===t.parent.inputElement&&""===t.range.startContainer.innerHTML){t.range.startContainer.innerHTML="<br>";var o=t.range.startContainer.childNodes[t.range.startOffset];t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),o,0)}else if(t.parent.inputElement===t.range.startContainer){if("#text"===(o=t.range.startContainer.childNodes[t.range.startOffset]).nodeName&&0===o.textContent.length)t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),o,0===o.textContent.length?0:o.previousSibling.textContent.length);else if(t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),o,o.textContent.length>=0?0:1),0===o.previousSibling.textContent.length){if(ee(o.previousSibling),!a){for(var r=g(o.lastChild)?o:o.lastChild;!g(r)&&"#text"!==r.nodeName&&"BR"!==r.nodeName;)r=r.lastChild;"BR"!==r.nodeName&&0===r.parentElement.textContent.length&&0===r.parentElement.innerHTML.length&&"BR"!==r.parentElement.nodeName&&r.parentElement.appendChild(t.parent.createElement("BR")),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),"BR"===r.nodeName?r:r.parentElement,r.parentElement.textContent.length>=0||"BR"===r.nodeName?0:1)}}else if(0===o.textContent.length){for(r="#text"===o.previousSibling.nodeName?o.previousSibling:o.previousSibling.lastChild;!g(r)&&"#text"!==r.nodeName;)r=r.lastChild;t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),r,r.textContent.length),ee(o)}else if("BR"!==t.parent.enterKey&&0!==o.previousSibling.textContent.length&&0!==o.textContent.length)return void e.args.preventDefault();t.getRangeNode()}if(t.range.startContainer===t.range.endContainer&&t.range.startOffset===t.range.endOffset&&t.range.startContainer===t.parent.inputElement){if(1!==t.parent.inputElement.childNodes.length||"TABLE"!==t.parent.inputElement.childNodes[0].nodeName)if(g(t.range.startContainer.childNodes[t.range.startOffset])){for(var s=t.range.startContainer.childNodes[t.range.startOffset-1];null!==s.lastChild&&"#text"!==s.nodeName;)s=s.lastChild;t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),s,"BR"===s.nodeName?0:s.textContent.length)}else t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),t.range.startContainer.childNodes[t.range.startOffset],0);t.getRangeNode()}if("P"===t.parent.enterKey&&!a||"DIV"===t.parent.enterKey&&!a||"P"===t.parent.shiftEnterKey&&a||"DIV"===t.parent.shiftEnterKey&&a){if(1===t.range.startOffset&&1===t.parent.inputElement.childNodes.length&&"TABLE"===t.parent.inputElement.childNodes[0].nodeName){(B=t.createInsertElement(a)).appendChild(t.parent.createElement("BR")),t.parent.inputElement.appendChild(B),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),B,0)}else{var l=void 0;l=i&&t.parent.formatter.editorManager.domNode.isBlockNode(t.startNode)?"#text"!==t.range.startContainer.nodeName||g(t.range.startContainer.previousSibling)||"HR"!==t.range.startContainer.previousSibling.nodeName?t.startNode:t.range.startContainer.nextSibling:t.parent.formatter.editorManager.domNode.blockParentNode(t.startNode);var c=!1,h=!1,d=t.range.startContainer.parentElement,p=!1,u=!1;if(d){var m=t.parent.contentModule.getDocument().defaultView.getComputedStyle(d);p="pre-wrap"===m.getPropertyValue("white-space"),u="nowrap"===m.getPropertyValue("text-wrap")}if(0===t.range.startOffset||0===t.range.endOffset||t.range.startContainer!==t.range.endContainer||!g(l.childNodes[0])&&("IMG"===l.childNodes[0].nodeName||l.querySelectorAll("img, audio, video").length>0))0===t.range.startOffset&&0===t.range.endOffset&&(h=!0);else{var f=t.range.startContainer.textContent,y=f.substring(0,t.range.startOffset),v=y.charCodeAt(t.range.startOffset-1),b=0===y.trim().length,M=0!==f.slice(t.range.startOffset).trim().length;!(160!==v&&b&&!p&&!u)&&!(32===v&&(p||u)&&b&&M)||t.range.startContainer.previousSibling||(h=!0)}t.removeBRElement(l);var N=-1!==Q.userAgent.indexOf("Firefox")&&0===t.range.startOffset&&t.range.startContainer===t.range.endContainer&&"#text"===t.range.startContainer.nodeName&&!g(t.range.startContainer.previousSibling)&&!t.parent.formatter.editorManager.domNode.isBlockNode(t.range.startContainer.previousSibling)&&t.range.startContainer.parentElement===t.range.startContainer.previousSibling.parentElement,C="#text"===t.range.startContainer.nodeName&&t.range.startContainer.textContent.includes("​")&&"​"===t.range.startContainer.textContent.trim()||"#text"===t.range.startContainer.nodeName&&!g(t.range.startContainer.textContent[t.range.startOffset])&&t.range.startContainer.textContent[t.range.startOffset].includes("​")&&"​"===t.range.startContainer.textContent[t.range.startOffset]&&"​"!==t.parent.inputElement.textContent[0];if(("#text"===t.range.startContainer.nodeName||"BR"===t.range.startContainer.nodeName)&&0===t.range.startOffset&&0===t.range.endOffset&&t.range.startContainer.parentElement===t.parent.inputElement&&"BR"===t.parent.enterKey&&a||C||N||!(0===t.range.startOffset&&0===t.range.endOffset||h)||!(g(t.range.startContainer.previousSibling)||"IMG"!==t.range.startContainer.previousSibling.nodeName&&"BR"!==t.range.startContainer.previousSibling.nodeName))if(l===t.parent.inputElement||0!==l.textContent.length||(!g(l.childNodes[0])&&"IMG"===l.childNodes[0].nodeName||l.querySelectorAll("video").length>0||l.querySelectorAll("audio").length>0||l.querySelectorAll("img").length>0))if(t.range.startContainer===t.range.endContainer&&"SPAN"===t.range.startContainer.nodeName&&(t.range.startContainer.classList.contains("e-video-wrap")||t.range.startContainer.classList.contains("e-audio-wrap"))){if(l.textContent.trim().length>0){for(var E=g((B=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,l,!0)).previousSibling.querySelector(".e-video-wrap"))?B.previousSibling.querySelector(".e-audio-wrap"):B.previousSibling.querySelector(".e-video-wrap"),D=!1,T=E.previousSibling;!g(T)&&"#text"!==T.nodeName;)T=T.lastChild;if(g(T)){var L=t.parent.createElement("br");E.parentElement.appendChild(L),D=!0}D?t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),E.parentElement,0):t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),T,T.textContent.length),ee(E)}else{for(o=(B=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,l,!0)).previousSibling;!g(o.firstChild);)ee(o.firstChild);L=t.parent.createElement("br");o.appendChild(L),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),o,0)}g(t.parent.audioModule)||t.parent.audioModule.hideAudioQuickToolbar(),g(t.parent.videoModule)||t.parent.videoModule.hideVideoQuickToolbar()}else if("BR"===t.parent.enterKey&&a&&t.range.startContainer.nodeType===Node.TEXT_NODE&&t.range.startContainer.parentElement&&t.range.startContainer.parentElement===t.parent.inputElement){var S=t.range,I=S.startContainer,w=S.startOffset,x=t.parent.createElement(t.parent.shiftEnterKey);if(I.nodeType===Node.TEXT_NODE&&0!==S.endOffset&&0!==S.startOffset){var j=I;if(w<j.length){var O=j.splitText(w);x.appendChild(O)}else x.innerHTML="<br>";j.parentNode.insertBefore(x,j.nextSibling),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),x,0)}else if(0===w&&0===S.endOffset){if(x.innerHTML="<br>",S.endOffset===I.textContent.length){var z=t.parent.createElement("br");I.parentNode.insertBefore(z,I)}I.parentNode.insertBefore(x,I);var A=S.endOffset===I.textContent.length?x:x.nextSibling;I.parentNode.insertBefore(x,I),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),A,0)}}else{if(g((B=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,l,!0)).childNodes[0])||"#text"!==B.childNodes[0].nodeName||0!==B.childNodes[0].textContent.length||ee(B.childNodes[0]),0===B.textContent.trim().length||B.childNodes[0].textContent.trim().includes("​")&&"​"===B.childNodes[0].textContent.trim()){L=t.parent.createElement("br");if("A"===t.startNode.nodeName){var k=t.startNode.parentElement;t.startNode.parentElement.insertBefore(L,t.startNode),ee(t.startNode),t.startNode=k}else"BR"!==t.startNode.nodeName&&t.startNode.appendChild(L);"\n"===B.childNodes[0].textContent&&ee(B.childNodes[0]),B.childNodes[0].textContent.trim().includes("​")&&"​"===B.childNodes[0].textContent.trim()&&ee(B.childNodes[0]),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),t.startNode,0)}if(("P"===t.parent.enterKey||"DIV"===t.parent.enterKey)&&!a||("DIV"===t.parent.shiftEnterKey||"P"===t.parent.shiftEnterKey)&&a){var P=t.formatTags.indexOf(B.nodeName.toLocaleLowerCase());if(P<0||P>=0&&0===B.textContent.trim().length){for(var R=t.createInsertElement(a);B.firstChild;)R.appendChild(B.firstChild);t.parent.formatter.editorManager.domNode.insertAfter(R,B),ee(B),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),t.parent.formatter.editorManager.domNode.isBlockNode(t.startNode)?R:t.startNode,0)}}}else if(g(l.children[0])||"BR"===l.children[0].tagName){(U=t.createInsertElement(a)).innerHTML="<br>",t.parent.formatter.editorManager.domNode.insertAfter(U,l),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),U,0)}else{var B=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,l,!1).cloneNode(!0);t.parent.formatter.editorManager.domNode.insertAfter(B,l),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),B,B.textContent.length>=0?0:1)}else{var H=void 0,B=void 0;g(t.range.startContainer.childNodes)||0!==t.range.startContainer.textContent.length&&("#text"===t.range.startContainer.nodeName||g(t.range.startContainer.querySelector(".e-video-clickelem"))||0!==t.range.startContainer.querySelector(".e-video-clickelem").textContent.length)||!(t.range.startContainer.querySelectorAll("img, audio, video").length>0)&&g(t.range.startContainer.querySelector(".e-video-clickelem"))&&"IMG"!==t.range.startContainer.nodeName&&"TABLE"!==t.range.startContainer.nodeName?0!==l.textContent.trim().length||!g(l.childNodes[0])&&"IMG"===l.childNodes[0].nodeName||""===l.textContent.trim()&&l.querySelectorAll("img, audio, video").length>0?(t.range.startOffset===t.range.endOffset&&0!==t.range.startOffset?B=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,l,!1).cloneNode(!0):(B=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,l,!0).cloneNode(!0),c=!0),H=!1):(B=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,l,!0).cloneNode(!0),H=!0):(B=t.createInsertElement(a),c=!0,H=!1);var U=void 0;for(U=t.formatTags.indexOf(B.nodeName.toLocaleLowerCase())<0?t.createInsertElement(a):t.parent.createElement(B.nodeName);B.firstChild;)U.appendChild(B.firstChild);var F=!(t.range.startContainer===l||!(l.querySelector(".e-video-wrap")||l.querySelector(".e-audio-wrap")&&t.range.startContainer.classList.contains("e-clickelem")));if(F?t.parent.formatter.editorManager.domNode.insertAfter(U,l):l.parentElement.insertBefore(U,l),!H){r=U;var Y=void 0;if(t.range.startOffset===t.range.endOffset&&0!==t.range.startOffset)for(;!g(r)&&"#text"!==r.nodeName&&"BR"!==r.nodeName;)Y=r,r=r.lastChild;else Y=r;Y.innerHTML="<br>",c||ee(l)}F?t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),U,0):t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),U.nextElementSibling,0)}}e.args.preventDefault()}if("BR"===t.parent.enterKey&&!a||"BR"===t.parent.shiftEnterKey&&a){var V=void 0;if(t.parent.formatter.editorManager.domNode.isBlockNode(t.startNode))V=t.startNode;else{for(var q=t.startNode,W=q;!t.parent.formatter.editorManager.domNode.isBlockNode(q);)W=q,q=q.parentElement;V=q===t.parent.inputElement?W:q}var _=window.getComputedStyle(V);t.removeBRElement(V);for(var G=V.lastChild;!g(G)&&"#text"!==G.nodeName&&"BR"!==G.nodeName&&"IMG"!==G.nodeName;)G=G.lastChild;var X=t.range.startContainer===G?t.range.startContainer.textContent.length:V.textContent.length,K="IMG"===t.range.startContainer.nodeName||t.range.startContainer.childNodes.length>0&&!g(t.range.startContainer.childNodes[t.range.startOffset])&&"IMG"===t.range.startContainer.childNodes[t.range.startOffset].nodeName||1===t.range.startContainer.nodeType&&null!==t.range.startContainer.querySelector("img");if(V!==t.parent.inputElement&&t.parent.formatter.editorManager.domNode.isBlockNode(V)&&t.range.startOffset===t.range.endOffset&&(t.range.startOffset===X||0===V.textContent.trim().length&&K)){var Z=t.parent.createElement("br");if(0===t.range.startOffset&&"TABLE"===t.range.startContainer.nodeName)t.range.startContainer.parentElement.insertBefore(Z,t.range.startContainer);else if("BR"===G.nodeName&&0===V.textContent.length)t.parent.formatter.editorManager.domNode.insertAfter(Z,G);else if(0===t.range.startOffset&&0===t.range.endOffset&&K){var J="IMG"===t.range.startContainer.nodeName?t.range.startContainer:t.range.startContainer.childNodes[t.range.startOffset];V.insertBefore(Z,J),Z=J}else{var $=t.parent.createElement("br"),te=g(t.range.startContainer.parentElement)||"A"!==t.range.startContainer.parentElement.nodeName||t.range.startContainer.parentElement.textContent.length!==t.range.startOffset?t.range.startContainer:t.range.startContainer.parentElement;t.parent.formatter.editorManager.domNode.insertAfter(Z,te),t.parent.formatter.editorManager.domNode.insertAfter($,te);var ie=te.nextElementSibling,ne=g(ie)?null:ie.nextElementSibling;g(ie)||g(ne)||g(ne.nextElementSibling)||"BR"!==ie.nodeName||"BR"!==ne.nodeName||"BR"!==ne.nextElementSibling.nodeName||ne.nextElementSibling.remove()}t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),Z,0)}else if(g(V)||V===t.parent.inputElement||"BR"===V.nodeName)t.insertBRElement();else if(0===V.textContent.trim().length||1===V.textContent.trim().length&&8203===V.textContent.charCodeAt(0))if(V.childElementCount>1&&"IMG"===V.lastElementChild.nodeName||V.lastElementChild&&"BR"===V.lastElementChild.nodeName||!g(V.firstElementChild)&&(V.querySelector(".e-video-wrap")||V.querySelector(".e-audio-wrap")))t.insertBRElement();else{B=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,V,!0).cloneNode(!0);t.parent.formatter.editorManager.domNode.insertAfter(B,V);var oe=t.parent.createElement("br");B.parentElement.insertBefore(oe,B),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),B,0)}else{B=void 0,oe=t.parent.createElement("br");if(0!==t.range.startOffset||0!==t.range.endOffset||g(V.previousSibling)||"BR"!==V.previousSibling.nodeName||"P"===V.nodeName||"DIV"===V.nodeName)V===t.parent.inputElement||"inline"!==_.display&&"inline-block"!==_.display?t.insertBRElement():(B=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,V,!0).cloneNode(!0),V.parentElement.insertBefore(oe,V),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),V,0),t.insertFocusContent());else{B=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,V,!1).cloneNode(!0),t.parent.formatter.editorManager.domNode.insertAfter(oe,V),t.insertFocusContent();for(r=oe.nextSibling;!g(r)&&"#text"!==r.nodeName;)r=r.lastChild;t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),r,0)}}e.args.preventDefault()}t.triggerActionComplete(e,a),t.parent.inputElement.dispatchEvent(new Event("input"))}}))}}else this.handleEnterKeyAtImageSide(e,n.start,n.end);else this.handleCursorAtTableSide(e,n.start,n.end)},e.prototype.removeBRElement=function(e){-1!==Q.userAgent.indexOf("Firefox")&&this.range.endOffset===e.textContent.length&&(0!==e.textContent.length||e.querySelectorAll("BR").length>1)&&!g(e.lastChild)&&"BR"===e.lastChild.nodeName&&ee(e.lastChild)},e.prototype.insertBRElement=function(){var e=!1,t=!0;0===this.range.endContainer.textContent.length&&"BR"===this.range.startContainer.nodeName&&(t=!1);for(var i=this.parent.createElement("br"),n=this.startNode;n.lastChild;)n=n.lastChild;var o="A"===this.startNode.nodeName&&"A"===this.endNode.nodeName&&!g(this.range.startContainer.parentElement)&&this.range.startOffset===this.range.endOffset&&this.range.startContainer.textContent.trim().length===n.textContent.trim().length;if("BR"===this.startNode.nodeName&&"BR"===this.endNode.nodeName&&0===this.range.startOffset&&this.range.startOffset===this.range.endOffset)this.parent.formatter.editorManager.domNode.insertAfter(i,this.startNode),e=!0;else if(this.startNode!==this.parent.inputElement||g(this.range.startContainer.previousSibling)||"BR"!==this.range.startContainer.previousSibling.nodeName||0!==this.range.startContainer.textContent.length||(e=!0),o)this.parent.formatter.editorManager.domNode.insertAfter(i,this.startNode);else if("SPAN"===this.startNode.tagName&&(this.startNode.classList.contains("e-video-wrap")||this.startNode.classList.contains("e-audio-wrap"))){this.startNode.parentElement.insertBefore(i,this.startNode);var r=this.parent.formatter.editorManager.domNode.blockParentNode(this.startNode);ee(this.parent.formatter.editorManager.nodeCutter.SplitNode(this.range,r,!0).previousSibling.childNodes[1]),e=!0}else this.range.insertNode(i);if(e||!g(i.nextElementSibling)&&"BR"===i.nextElementSibling.tagName||!g(i.nextSibling)&&(i.nextSibling.textContent.length>0||"#text"===i.nextSibling.nodeName&&0===i.nextSibling.textContent.trim().length&&!g(i.nextSibling.nextSibling)&&i.nextSibling.nextSibling.textContent.trim().length>0))this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),!g(i.nextSibling)&&t?i.nextSibling:i,0),e=!1;else{var s=this.parent.createElement("br");o?this.parent.formatter.editorManager.domNode.insertAfter(s,this.startNode):this.range.insertNode(s),this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),i,0)}},e.prototype.insertFocusContent=function(){0===this.range.startContainer.textContent.length&&("#text"===this.range.startContainer.nodeName?this.range.startContainer.parentElement.innerHTML="&#8203;":this.range.startContainer.innerHTML="&#8203;")},e.prototype.createInsertElement=function(e){var t;"DIV"===this.parent.enterKey&&!e||"DIV"===this.parent.shiftEnterKey&&e?t=this.parent.createElement("div"):("P"===this.parent.enterKey&&!e||"P"===this.parent.shiftEnterKey&&e)&&(t=this.parent.createElement("p"));var i=this.parent.formatter.editorManager.domNode.blockNodes()[0].previousSibling,n=this.parent.formatter.editorManager.domNode.blockNodes()[0].nextSibling;return!g(i)&&"#text"!==i.nodeName&&i.hasAttribute("style")&&"TABLE"!==i.nodeName&&t.setAttribute("style",i.getAttribute("style")),g(i)&&!g(n)&&"#text"!==n.nodeName&&n.hasAttribute("style")&&"TABLE"!==n.nodeName&&t.setAttribute("style",n.getAttribute("style")),t},e.prototype.triggerActionComplete=function(e,t){this.parent.trigger(Zi,{requestType:t?"ShiftEnterAction":"EnterAction",args:e.args})},e.prototype.handleCursorAtTableSide=function(e,t,i){var n=this;if("BR"!==this.parent.enterKey){var o=e.args.shiftKey,r={cancel:!1,name:Ki,requestType:o?"ShiftEnterAction":"EnterAction",originalEvent:e.args};this.parent.trigger(Ki,r,(function(r){if(!r.cancel){var s=n.parent.createElement(n.parent.enterKey);s.innerHTML="<br>";var a=void 0;t&&(a=n.range.startContainer.childNodes[n.range.startOffset]).parentElement.insertBefore(s,a),i&&(g((a=n.range.startContainer.childNodes[n.range.startOffset-1]).nextSibling)?g(a.nextSibling)&&a.parentElement.appendChild(s):a.parentElement.insertBefore(s,a.nextSibling)),n.parent.formatter.editorManager.nodeSelection.setCursorPoint(n.parent.contentModule.getDocument(),s,0),e.args.preventDefault(),n.triggerActionComplete(e,o)}}))}},e.prototype.handleEnterKeyAtImageSide=function(e,t,i){var n=this,o={cancel:!1,name:Ki,requestType:e.args.shiftKey?"ShiftEnterAction":"EnterAction",originalEvent:e.args},r=!1;"IMG"===this.range.startContainer.nodeName&&0===this.range.startOffset&&(r=!0),this.parent.trigger(Ki,o,(function(o){if(!o.cancel&&"BR"===n.parent.enterKey){var s=n.parent.createElement("BR"),a=void 0;if(r&&((a=n.range.startContainer).parentElement.insertBefore(s,a),n.parent.formatter.editorManager.nodeSelection.setCursorPoint(n.parent.contentModule.getDocument(),a,0)),t&&((a=n.range.startContainer.childNodes[n.range.startOffset]).parentElement.insertBefore(s,a),n.parent.formatter.editorManager.nodeSelection.setCursorPoint(n.parent.contentModule.getDocument(),a,0)),i)if(g((a=n.range.startContainer.childNodes[n.range.startOffset-1]).nextSibling)){if(g(a.nextSibling)){a.parentElement.appendChild(s);var l=n.parent.createElement("BR");a.parentElement.appendChild(l),n.parent.formatter.editorManager.nodeSelection.setCursorPoint(n.parent.contentModule.getDocument(),l,0)}}else a.parentElement.insertBefore(s,a.nextSibling),n.parent.formatter.editorManager.nodeSelection.setCursorPoint(n.parent.contentModule.getDocument(),s.nextSibling,0);e.args.preventDefault(),n.triggerActionComplete(e,e.args.shiftKey)}}))},e.prototype.isTableOrImageStart=function(){var e=this.range.startContainer,t=this.range.startOffset,i=this.range.collapsed&&1===e.nodeType&&e.isContentEditable&&e.childNodes[t]&&["IMG","TABLE"].indexOf(e.childNodes[t].nodeName)>-1;return i?{start:i,startNodeName:e.childNodes[t].nodeName}:{start:!1,startNodeName:""}},e.prototype.isTableOrImageEnd=function(){var e=this.range.startContainer,t=this.range.startOffset,i=this.range.collapsed&&1===e.nodeType&&e.isContentEditable&&e.childNodes[t-1]&&["IMG","TABLE"].indexOf(e.childNodes[t-1].nodeName)>-1;return i?{end:i,endNodeName:e.childNodes[t-1].nodeName}:{end:!1,endNodeName:""}},e.prototype.processedTableImageCursor=function(){var e=this.isTableOrImageStart(),t=e.start,i=e.startNodeName,n=this.isTableOrImageEnd();return{start:t,startName:i,end:n.end,endName:n.endNodeName}},e}(),tf=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),nf=function(){return nf=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},nf.apply(this,arguments)},of=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},rf=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.isPlainPaste=!1,n.needsID=!0,n.isCopyAll=!1,n}return tf(t,e),t.prototype.requiredModules=function(){var e=[];return this.toolbarSettings.enable&&(e.push({member:"toolbar",args:[this,this.serviceLocator]}),e.push({member:"link",args:[this,this.serviceLocator]}),e.push({member:"table",args:[this,this.serviceLocator]}),e.push({member:"image",args:[this,this.serviceLocator]}),e.push({member:"audio",args:[this,this.serviceLocator]}),e.push({member:"video",args:[this,this.serviceLocator]}),this.quickToolbarSettings.enable&&e.push({member:"quickToolbar",args:[this,this.serviceLocator]})),"HTML"===this.editorMode&&this.slashMenuSettings.enable&&e.push({member:"slashMenu",args:[this,this.serviceLocator]}),this.showCharCount&&e.push({member:"count",args:[this,this.serviceLocator]}),"Markdown"===this.editorMode&&e.push({member:"markdownEditor",args:[this,this.serviceLocator]}),"HTML"===this.editorMode&&(e.push({member:"htmlEditor",args:[this,this.serviceLocator]}),e.push({member:"pasteCleanup",args:[this,this.serviceLocator]}),e.push({member:"importExport",args:[this,this.serviceLocator]}),e.push({member:"formatPainter",args:[this]}),e.push({member:"emojiPicker",args:[this,this.serviceLocator]})),this.fileManagerSettings.enable&&e.push({member:"fileManager",args:[this,this.serviceLocator]}),this.enableResize&&e.push({member:"resize",args:[this]}),e},t.prototype.updateEnable=function(){this.enabled?(X([this.element],kn),this.element.setAttribute("aria-disabled","false"),g(this.htmlAttributes.tabindex)?this.inputElement.setAttribute("tabindex","0"):this.inputElement.setAttribute("tabindex",this.htmlAttributes.tabindex)):(this.getToolbar()&&(X(this.getToolbar().querySelectorAll("."+so),so),X([this.getToolbar().parentElement],[Un])),G([this.element],kn),this.element.tabIndex=-1,this.element.setAttribute("aria-disabled","true"),this.inputElement.setAttribute("tabindex","-1"))},t.prototype.setEnable=function(){this.updateEnable(),this.enabled?this.eventInitializer():this.unWireEvents()},t.prototype.initializeValue=function(){this.isFocusOut=!1,this.isRTE=!1,this.isBlur=!0,this.defaultResetValue=null,this.isResizeInitialized=!1},t.prototype.preRender=function(){this.initializeValue(),this.clickPoints={clientX:0,clientY:0},this.initialValue=this.value,this.serviceLocator=new Eg,this.initializeServices(),this.setContainer(),this.persistData(),ae(this.element,{width:N(this.width)}),ie(this.element,{role:"application","aria-label":"Rich Text Editor"}),this.beforeRenderClassValue=this.element.getAttribute("class")},t.prototype.persistData=function(){if(this.enablePersistence&&"TEXTAREA"===this.originalElement.tagName){this.element.id=this.originalElement.id+"_wrapper";var e=window.localStorage.getItem(this.getModuleName()+this.element.id);g(e)||""===e||this.setProperties(JSON.parse(e),!0)}},t.prototype.setContainer=function(){this.originalElement=this.element.cloneNode(!0),null!==this.value&&null===this.valueTemplate||this.setValue(),this.element.hasAttribute("tabindex")&&(this.htmlAttributes={tabindex:this.element.getAttribute("tabindex")},this.element.removeAttribute("tabindex")),this.element.innerHTML="";for(var e=["class","style","id","ejs-for"],t={},i=0;i<this.element.attributes.length;i++)-1!==e.indexOf(this.element.attributes[i].name)||/^data-val/.test(this.element.attributes[i].name)||(t[this.element.attributes[i].name]=this.element.getAttribute(this.element.attributes[i].name));if(m(t,this.htmlAttributes,t),this.setProperties({htmlAttributes:t},!0),g(this.htmlAttributes.id)||(this.element.id=this.htmlAttributes.id),this.internalID=this.element.id,"TEXTAREA"===this.element.tagName){var n=this.createElement("div",{className:this.element.getAttribute("class")});this.element.innerHTML="",this.element.parentElement.insertBefore(n,this.element),this.valueContainer=this.element,X([this.valueContainer],this.element.getAttribute("class").split(" ")),this.element=n}else this.valueContainer=this.createElement("textarea",{id:this.getID()+"-value",attrs:{"aria-labelledby":this.getID()}});if(this.valueContainer.name=this.getID(),G([this.valueContainer],vo),!g(this.cssClass))for(var o=this.cssClass.split(" "),r=0;r<o.length;r++)G([this.valueContainer],o[r]);this.rootContainer=this.createElement("div",{className:"e-rte-container",attrs:{role:"presentation"}}),this.element.appendChild(this.rootContainer),this.rootContainer.appendChild(this.valueContainer)},t.prototype.getPersistData=function(){return this.addOnPersist(["value"])},t.prototype.focusIn=function(){this.enabled&&(this.inputElement.focus(),this.focusHandler({}))},t.prototype.focusOut=function(){this.enabled&&(this.inputElement.blur(),this.blurHandler({}))},t.prototype.selectAll=function(){this.notify(hn,{})},t.prototype.selectRange=function(e){this.notify(dn,{range:e})},t.prototype.getSelection=function(){var e="";return this.notify(pn,{callBack:function(t){e=t}}),e},t.prototype.showEmojiPicker=function(e,t){this.readonly||this.notify(Cn,{x:e,y:t})},t.prototype.executeCommand=function(e,t,i){if("importWord"===e){var n=this.createElement("div");n.innerHTML=t;for(var o=n.querySelectorAll("table:not(.e-rte-table):not(.e-rte-paste-table)"),r=0;r<o.length;r++)o[r].classList.add("e-rte-paste-table");t=n.innerHTML,n.remove(),e="insertHTML"}var s;if(t=this.htmlPurifier(e,t),"HTML"===this.editorMode){var a=this.getRange();this.iframeSettings.enable&&this.formatter.editorManager.nodeSelection.Clear(this.element.ownerDocument),(!(!this.iframeSettings.enable||a.startContainer!==this.inputElement)||!this.inputElement.contains(a.startContainer))&&this.focusIn()}var l=Cg[""+e];if(i&&i.undo&&i.undo&&0===this.formatter.getUndoRedoStack().length&&this.formatter.saveData(),-1!==this.maxLength&&!g(l.command)){var c=0;if("Links"===l.command&&(c=0===t.text.length?t.url.length:t.text.length),"Images"!==l.command&&"Table"!==l.command&&"Files"!==l.command||(c=1),"InsertHTML"===l.command)if(g(t))g(l.value)||"<hr/>"!==l.value&&"<br/>"!==l.value||(c=1);else{var h=this.createElement("div");h.innerHTML=t,c=h.textContent.length}"InsertText"===l.command&&(c=t.length);var d=this.getText().trim().replace(/(\r\n|\n|\r|\t)/gm,"").replace(/\u200B/g,"").length-this.getSelection().length+c;if(!(-1===this.maxLength||d<=this.maxLength))return}s=t,"FormatPainter"===l.command&&(g(t)||(this.formatPainterSettings=t),s={formatPainterAction:l.value}),this.formatter.editorManager.execCommand(l.command,l.subCommand?l.subCommand:s||l.value,null,null,s||l.value,s||("UL"===l.value||"OL"===l.value?null:l.value),null,this.enterKey),iu(this.contentModule.getDocument(),this.inputElement),i&&i.undo&&(this.formatter.saveData(),this.formatter.enableUndo(this)),this.setPlaceHolder(),this.notify(xi,{})},t.prototype.htmlPurifier=function(e,t){if("HTML"===this.editorMode)switch(e){case"insertHTML":this.enableHtmlSanitizer&&("string"==typeof t?(t=t.replace(/&(times|divide|ne)/g,"&amp;amp;$1"),t=this.htmlEditorModule.sanitizeHelper(t)):t=this.htmlEditorModule.sanitizeHelper(t.outerHTML));break;case"insertTable":g(t.width)&&(t.width={minWidth:this.tableSettings.minWidth,maxWidth:this.tableSettings.maxWidth,width:this.tableSettings.width});break;case"insertImage":var i=(o=this.createElement("img",{attrs:{src:t.url}})).outerHTML;this.enableHtmlSanitizer&&(i=this.htmlEditorModule.sanitizeHelper(o.outerHTML)),s=g(s=""!==i&&this.createElement("div",{innerHTML:i}).firstElementChild.getAttribute("src")||null)?"":s,t.url=s,g(t.width)&&(t.width={minWidth:this.insertImageSettings.minWidth,maxWidth:this.insertImageSettings.maxWidth,width:this.insertImageSettings.width}),g(t.height)&&(t.height={minHeight:this.insertImageSettings.minHeight,maxHeight:this.insertImageSettings.maxHeight,height:this.insertImageSettings.height});break;case"insertAudio":var n=this.createElement("audio",{attrs:{controls:""}}),o=this.createElement("source",{attrs:{src:t.url,type:t.url&&t.url.split(".").length>0?"audio/"+t.url.split(".")[t.url.split(".").length-1]:""}});n.appendChild(o);var r=n.outerHTML;this.enableHtmlSanitizer&&(r=this.htmlEditorModule.sanitizeHelper(n.outerHTML)),s=g(s=""!==r&&this.createElement("div",{innerHTML:r}).firstElementChild.firstElementChild.getAttribute("src")||null)?"":s,t.url=s;break;case"insertVideo":n=this.createElement("video",{attrs:{controls:""}}),o=this.createElement("source",{attrs:{src:t.url,type:t.url&&t.url.split(".").length>0?"video/"+t.url.split(".")[t.url.split(".").length-1]:""}});n.appendChild(o);var s;r=n.outerHTML;this.enableHtmlSanitizer&&(r=this.htmlEditorModule.sanitizeHelper(o.outerHTML)),s=g(s=""!==r&&this.createElement("div",{innerHTML:r}).firstElementChild.getAttribute("src")||null)?"":s,t.url=s,g(t.width)&&(t.width={minWidth:this.insertVideoSettings.minWidth,maxWidth:this.insertVideoSettings.maxWidth,width:this.insertVideoSettings.width}),g(t.height)&&(t.height={minHeight:this.insertVideoSettings.minHeight,maxHeight:this.insertVideoSettings.maxHeight,height:this.insertVideoSettings.height});break;case"createLink":var a=this.createElement("a",{attrs:{href:t.url}}),l=a.outerHTML;this.enableHtmlSanitizer&&(l=this.htmlEditorModule.sanitizeHelper(a.outerHTML));var c=""!==l&&this.createElement("div",{innerHTML:l}).firstElementChild.getAttribute("href")||null;c=g(c)?"":c,t.url=c}return t},t.prototype.encode=function(e){var t=this.createElement("div");return t.innerText=e.trim(),t.innerHTML.replace(/<br\s*[\/]?>/gi,"\n")},t.prototype.render=function(){this.setProperties({value:this.replaceEntities(this.value)},!0),this.value&&!this.valueTemplate&&this.setProperties({value:this.serializeValue(this.value)},!0),this.value="Markdown"===this.editorMode||g(this.value)?this.value:this.addAnchorAriaLabel(this.value),this.renderModule=new jr(this,this.serviceLocator),this.sourceCodeModule=new Im(this,this.serviceLocator),this.notify(wi,{}),this.trigger("load"),this.RTERender(),new Fm(this),this.notify(ji,{}),this.enableXhtml&&this.setProperties({value:this.getXhtml()},!0),this.toolbarSettings.enable&&("Expand"===this.toolbarSettings.type||"MultiRow"===this.toolbarSettings.type||"Scrollable"===this.toolbarSettings.type)&&!g(this.getToolbar())&&this.toolbarSettings.items.indexOf("Undo")>-1&&this.toolbarSettings.items.indexOf("Redo")>-1&&this.disableToolbarItem(["Undo","Redo"]),null!==this.value&&(this.valueContainer.defaultValue=this.value),this.enabled&&!this.readonly?this.eventInitializer():this.unWireEvents(),this.notify(Nn,{cssClass:this.getCssClass()}),this.addAudioVideoWrapper(),this.notify(Ii,{}),this.autoResize(),this.renderComplete()},t.prototype.addAudioVideoWrapper=function(){for(var e,t=this,i=this.element.querySelectorAll("audio"),n=0;n<i.length;n++)if(i[n].classList.contains("e-rte-audio")||(i[n].classList.add("e-rte-audio"),i[n].classList.add("e-audio-inline")),!i[n].parentElement.classList.contains(to)&&!i[n].parentElement.classList.contains(io)){var o=this.createElement("span",{className:io});o.setAttribute("style","width:300px; margin:0 auto;"),o.contentEditable="false";var r=this.createElement("span",{className:to});o.appendChild(r),i[n].parentNode.insertBefore(o,i[n].nextSibling),r.appendChild(i[n]),null===o.nextElementSibling&&(e=this.createElement("br"),o.parentNode.insertBefore(e,o.nextSibling))}var s=this.element.querySelectorAll("video");for(n=0;n<s.length;n++){if(s[n].classList.contains("e-rte-video")||(s[n].classList.add("e-rte-video"),s[n].classList.add("e-video-inline")),!s[n].parentElement.classList.contains(to)&&!s[n].parentElement.classList.contains(no)){var a=this.createElement("span",{className:no});a.contentEditable="false",s[n].parentNode.insertBefore(a,s[n].nextSibling),a.appendChild(s[n]),null===a.nextElementSibling&&(e=this.createElement("br"),a.parentNode.insertBefore(e,a.nextSibling))}-1!==Q.userAgent.indexOf("Firefox")&&(s[n].addEventListener("play",(function(e){t.notify(rn,{args:e}),t.notify("editAreaClick",{args:e})})),s[n].addEventListener("pause",(function(e){t.notify(rn,{args:e}),t.notify("editAreaClick",{args:e})})))}},t.prototype.eventInitializer=function(){this.wireEvents()},t.prototype.cleanList=function(e){var t=this.getRange(),i=t.startContainer,n=t.endContainer,o=t.startOffset,r=i===n;n.textContent.length;var s="#text"===t.endContainer.nodeName?t.endContainer.parentElement:t.endContainer,a=se(s,"LI"),l=!1,c=t.endOffset;if(n.nodeType===Node.TEXT_NODE&&"\ufeff"===n.textContent.charAt(c-1)&&c--,!g(a)&&s.textContent.trim().length===c&&!t.collapsed&&g(s.nextElementSibling)&&!s.classList.contains("e-img-inner")){for(var h=0;h<a.childNodes.length;h++)"#text"===a.childNodes[h].nodeName&&0===a.childNodes[h].textContent.trim().length&&(ee(a.childNodes[h]),l=!0,h--);for(var d=a;null!==d.lastChild&&"#text"!==d.nodeName;)d=d.lastChild;if(l){var p="BR"!==d.nodeName||g(d.previousSibling)?d:d.previousSibling;this.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),r?p:i,p,o,"BR"===p.nodeName?0:p.textContent.length)}}},t.prototype.keyDown=function(e){var t=window.navigator.platform.toLocaleLowerCase().includes("mac");if(((e.ctrlKey||e.metaKey&&t)&&e.shiftKey&&86===e.keyCode||e.metaKey&&t&&e.altKey&&e.shiftKey&&86===e.keyCode)&&(this.isPlainPaste=!0),this.inputElement.classList.contains("e-mention")){var i=this.element.ownerDocument.getElementById(this.inputElement.id+"_popup"),n=this.element.ownerDocument.getElementById(this.inputElement.id+"_slash_menu_popup"),o=-1!==$p.indexOf(e.key),r=i&&i.classList.contains("e-popup-open"),s=n&&n.classList.contains("e-popup-open");if(o&&(r||s))return}if(this.enableTabKey){this.quickToolbarModule&&!e.altKey&&"F10"!==e.key&&"toolbar-focus"!==e.action&&this.quickToolbarModule.hideQuickToolbars();var a=!(!this.imageModule||!this.imageModule.imgResizeDiv),l=!(!this.videoModule||!this.videoModule.vidResizeDiv);a&&this.imageModule.cancelResizeAction(),l&&this.videoModule.cancelResizeAction()}if(this.notify(Yi,{member:"keydown",args:e}),this.restrict(e),"HTML"===this.editorMode&&this.cleanList(e),"HTML"===this.editorMode&&(8===e.which&&"Backspace"===e.code||46===e.which&&"Delete"===e.code))if(se("#text"===(D=this.getRange()).startContainer.nodeName?D.startContainer.parentElement:D.startContainer,"pre")&&8===e.which&&8203===D.startContainer.textContent.charCodeAt(D.startOffset-1)||46===e.which&&8203===D.startContainer.textContent.charCodeAt(D.startOffset)){var c=new RegExp("​","g"),h=8===e.which?D.startOffset-1:D.startOffset;D.startContainer.textContent=D.startContainer.textContent.replace(c,""),this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(),D.startContainer,h)}else if("Backspace"===e.code&&8===e.which&&8203===D.startContainer.textContent.charCodeAt(0)&&D.collapsed){var d=D.startContainer.parentElement,p=void 0,u=void 0;for(u=0;u<d.childNodes.length;u++)d.childNodes[u]===D.startContainer&&(p=u);var m=!0,f=[];for(u=p;u>=0;u--)3===d.childNodes[u].nodeType&&8203===d.childNodes[u].textContent.charCodeAt(0)&&m?f.push(u):m=!1;if(f.length>0)for(u=f.length-1;u>0;u--)d.childNodes[f[u]].textContent="";this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(),D.startContainer,D.startOffset)}var y=!!g(e.action)||"format-copy"!==e.action;0===this.formatter.getUndoRedoStack().length&&y&&!(e.altKey||e.shiftKey&&16===e.which||e.altKey&&e.shiftKey&&67===e.which)&&this.formatter.saveData();var v=!1;"HTML"===this.editorMode&&(v=!g((D=this.getRange()).startContainer)&&D.startContainer===D.endContainer&&D.endContainer.childNodes.length>1&&!g(D.startContainer.childNodes[D.startOffset-1])&&"#text"===D.startContainer.childNodes[D.startOffset-1].nodeName&&!g(D.startContainer.childNodes[D.startOffset-1].previousSibling)&&32===D.startContainer.childNodes[D.startOffset-1].textContent.charCodeAt(0)&&D.startContainer.childNodes[D.startOffset-1].previousSibling.classList.contains("e-mention-chip"));if(-1===["insert-link","format-copy","format-paste","insert-image","insert-table","insert-audio","insert-video"].indexOf(e.action)&&(!e.target||!e.target.classList.contains("e-mention")||g(document.querySelector("#"+e.target.id+"_popup.e-popup-open"))||"Tab"!==e.code)&&(e.action&&"paste"!==e.action&&"space"!==e.action||9===e.which||"Backspace"===e.code&&8===e.which)&&!v){var b=!1;switch(g(this.formatPainterModule)||(b="escape"===this.formatPainterModule.previousAction),b||("HTML"!==this.editorMode||"increase-fontsize"!==e.action&&"decrease-fontsize"!==e.action?this.formatter.process(this,null,e):this.notify(On,{member:"onHandleFontsizeChange",args:e})),e.action){case"toolbar-focus":if(this.toolbarSettings.enable&&this.getToolbarElement()){ru()&&"keydown"===e.type&&this.formatter.editorManager.nodeSelection&&this.formatter.editorManager.nodeSelection.get(this.contentModule.getDocument()).rangeCount>0&&this.inputElement.contains(this.getRange().startContainer)&&this.notify(nn,{});var M="toolbar",N=this.getToolbarElement().querySelector(".e-toolbar-item:not(.e-overlay)[title]"),C=this.getRenderedQuickToolbarElem();if(C&&(N=C.querySelector(".e-toolbar-item:not(.e-overlay)[title]"),M="quickToolbar"),N){var E=N.firstElementChild;E.removeAttribute("tabindex"),E.focus(),C&&C.classList.contains("e-rte-image-popup")&&"quickToolbar"===M&&ru()&&this.inputElement.ownerDocument.getSelection().removeAllRanges()}}break;case"escape":this.contentModule.getEditPanel().focus()}}if(this.notify("afterKeyDown",{member:"afterKeyDown",args:e}),this.autoResize(),g(this.placeholder)||this.setPlaceHolder(),!(g(e)||g(e.code)||"Backspace"!==e.code&&"Delete"!==e.code)){var D=this.contentModule.getDocument().getSelection().getRangeAt(0),T=document.createElement("div");T.appendChild(D.cloneContents()),T.innerHTML===this.inputElement.innerHTML&&(this.isCopyAll=!0)}e.metaKey&&"Backspace"===e.key&&this.autoSaveOnIdle&&this.keyUp(e)},t.prototype.keyUp=function(e){if("HTML"===this.editorMode){var t=this.getRange();if(!(g(e)||g(e.code)||"Backspace"!==e.code&&"Delete"!==e.code)){var i=this.getRange(),n=this.iframeSettings.enable?this.contentModule.getPanel().ownerDocument.getSelection():this.contentModule.getDocument().getSelection();if(this.isCopyAll){var o=this.createElement("br"),r="BR"===this.enterKey?o:this.createElement(this.enterKey).appendChild(o).parentElement;this.inputElement.innerHTML="",this.inputElement.appendChild(r),this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(),o,0),this.isCopyAll=!1}n.rangeCount>0&&"INPUT"!==this.contentModule.getDocument().activeElement.tagName&&this.inputElement.contains(this.contentModule.getDocument().activeElement)&&"<br>"===t.startContainer.innerHTML&&""===t.startContainer.textContent&&(n.removeAllRanges(),n.addRange(i))}if(-1!==Q.userAgent.indexOf("Firefox")&&"#text"===t.startContainer.nodeName&&t.startContainer.parentElement===this.inputElement&&"BR"!==this.enterKey){var s=this.getRange(),a=this.createElement(this.enterKey);s.startContainer.parentElement.insertBefore(a,s.startContainer),a.appendChild(s.startContainer),this.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),a.childNodes[0],a.childNodes[0],a.childNodes[0].textContent.length,a.childNodes[0].textContent.length)}}0===this.formatter.getCurrentStackIndex()&&this.updateUndoRedoStack(),this.notify(Fi,{member:"keyup",args:e}),this.notify("tableModulekeyUp",{member:"tableModulekeyUp",args:e}),"KeyX"!==e.code||88!==e.which||88!==e.keyCode||!e.ctrlKey||""!==this.inputElement.innerHTML&&"<br>"!==this.inputElement.innerHTML||(this.inputElement.innerHTML=Lr(br(Nr(this),this),this.editorMode));var l=this.inputElement.classList.contains("e-mention"),c=32===e.which||13===e.which||8===e.which||46===e.which||9===e.which&&l,h="C"===e.key&&e.altKey&&e.shiftKey,d="V"===e.key&&e.altKey&&e.shiftKey;(!h&&!d&&("shift"!==e.key&&!e.ctrlKey&&e.key&&1===e.key.length||c)||"Markdown"===this.editorMode&&("shift"!==e.key&&!e.ctrlKey&&e.key&&1===e.key.length||c)||this.autoSaveOnIdle&&Q.isDevice&&!this.inlineMode.enable)&&this.formatter.onKeyHandler(this,e),(this.inputElement&&0!==this.inputElement.textContent.length||this.element.querySelectorAll(".e-toolbar-item.e-active").length>0||this.formatter.getUndoRedoStack().length>0)&&this.notify(ki,{args:e}),this.setPlaceHolder()},t.prototype.serializeValue=function(e){return"HTML"!==this.editorMode||g(e)||(this.enableHtmlEncode?(e=this.htmlEditorModule.sanitizeHelper(Er(e)),e=this.encode(e)):(e=this.htmlEditorModule.sanitizeHelper(e),e=this.enableXhtml?this.htmlEditorModule.xhtmlValidation.selfEncloseValidation(e):e)),e},t.prototype.sanitizeHtml=function(e){return this.serializeValue(e)},t.prototype.updateValue=function(e){if(g(e)){var t=this.inputElement.innerHTML;this.setProperties({value:Cr(t)?null:t})}else this.setProperties({value:e})},t.prototype.triggerEditArea=function(e){if(dr()){var t=e.touches?e.changedTouches[0]:e;this.clickPoints.clientX===t.clientX&&this.clickPoints.clientY===t.clientY&&this.notify(an,{member:"editAreaClick",args:e})}else this.notify(an,{member:"editAreaClick",args:e})},t.prototype.notifyMouseUp=function(e){var t=e.touches?e.changedTouches[0]:e;this.notify("mouseUp",{member:"mouseUp",args:e,touchData:{prevClientX:this.clickPoints.clientX,prevClientY:this.clickPoints.clientY,clientX:t.clientX,clientY:t.clientY}}),(this.inputElement&&("HTML"===this.editorMode&&(0!==this.inputElement.textContent.length||e.target&&!g(e.target.querySelector("li")))||"Markdown"===this.editorMode&&0!==this.inputElement.value.length)||e.target&&!g(se(e.target,"table"))||e.target&&!g(e.target.querySelector("img"))||e.target&&("VIDEO"===e.target.nodeName||e.target.querySelectorAll("."+no).length>0)||e.target&&"BR"!==e.target.nodeName&&(e.target.classList.contains(io)||e.target.classList.contains(to)||e.target.classList.contains("e-video-clickelem")))&&this.notify(ki,{args:e}),this.triggerEditArea(e)},t.prototype.updateUndoRedoStack=function(){var e=this.formatter.getUndoRedoStack(),t=this.formatter.getCurrentStackIndex();if(0===e.length||0===t)if(0===e.length)this.formatter.saveData();else if(0===t&&"HTML"===this.editorMode){var i=e[0],n=new bm(this.inputElement).save(this.getRange(),this.contentModule.getDocument());i.range=n}else if(0===t&&"Markdown"===this.editorMode){var o=e[0],r=this.inputElement.selectionStart,s=this.inputElement.selectionEnd;o.start=r,o.end=s}},t.prototype.mouseUp=function(e){if(this.quickToolbarSettings.showOnRightClick&&Q.isDevice){var t=e.target,i=se(t,"table");if(t&&"A"===t.nodeName||"IMG"===t.nodeName||"TD"===t.nodeName||"TH"===t.nodeName||"TABLE"===t.nodeName||i&&this.contentModule.getEditPanel().contains(i))return}this.notifyMouseUp(e),this.setPlaceHolder(),this.autoResize(),this.updateUndoRedoStack()},t.prototype.ensureModuleInjected=function(e){return this.getInjectedModules().indexOf(e)>=0},t.prototype.onCopy=function(){this.contentModule.getDocument().execCommand("copy",!1,null)},t.prototype.onCut=function(){this.contentModule.getDocument().execCommand("cut",!1,null)},t.prototype.onPaste=function(e){var t=this,i={originalEvent:e,cancel:!1,requestType:"Paste"};this.trigger(Ki,i,(function(i){var n=t.getText().replace(/\u200B/g,"").replace("HTML"===t.editorMode?/(\r\n|\n|\r|\t)/gm:"","").length-t.getSelection().length+(g(e)||g(e.clipboardData)?0:e.clipboardData.getData("text/plain").replace(/(\r\n|\n|\r|\t)/gm,"").replace(/\u200B/g,"").length);if("Markdown"===t.editorMode){var o={requestType:"Paste",editorMode:t.editorMode,event:e};return setTimeout((function(){t.formatter.onSuccess(t,o)}),0),void(-1===t.maxLength||n<=t.maxLength||e.preventDefault())}if(!i.cancel&&"true"===t.inputElement.contentEditable&&(-1===t.maxLength||n<=t.maxLength)){var r=t.contentModule.getDocument().querySelector(".e-rte-img-dialog");if(g(t.pasteCleanupModule)){if(!t.isPlainPaste){console.warn('[WARNING] :: Module "pasteCleanup" is not available in RichTextEditor component! You either misspelled the module name or forgot to load it.');var s={requestType:"Paste",editorMode:t.editorMode,event:e},a=null,l=!1;e&&!g(e.clipboardData)&&(a=e.clipboardData.getData("text/plain"),l=e.clipboardData.getData("text/html").indexOf("MsoNormal")>0);var c=e&&e.clipboardData&&e.clipboardData.items.length>0?e.clipboardData.items[0].getAsFile():null;null!==a&&t.notify(un,{file:c,args:e,text:a,isWordPaste:l}),setTimeout((function(){t.formatter.onSuccess(t,s)}),0)}}else g(r)&&t.notify("pasteClean",{args:e,isPlainPaste:t.isPlainPaste})}else e.preventDefault()})),this.isPlainPaste=!1},t.prototype.clipboardAction=function(e,t){switch(e.toLowerCase()){case"cut":this.onCut(),this.formatter.onSuccess(this,{requestType:"Cut",editorMode:this.editorMode,event:t});break;case"copy":this.onCopy(),this.formatter.onSuccess(this,{requestType:"Copy",editorMode:this.editorMode,event:t});break;case"paste":this.onPaste(t)}},t.prototype.destroy=function(){if(!this.isDestroyed&&this.isRendered){if(this.element.className=this.beforeRenderClassValue,this.removeHtmlAttributes(),this.removeAttributes(),this.beforeRenderClassValue=null,g(this.timeInterval)||(clearInterval(this.timeInterval),this.timeInterval=null),g(this.autoSaveTimeOut)||(clearTimeout(this.autoSaveTimeOut),this.autoSaveTimeOut=null),g(this.idleInterval)||(clearTimeout(this.idleInterval),this.idleInterval=null),this.notify(zi,{}),this.destroyDependentModules(),this.unWireEvents(),"TEXTAREA"===this.originalElement.tagName){this.element.parentElement.insertBefore(this.valueContainer,this.element),this.valueContainer.id=this.getID(),this.valueContainer.removeAttribute("name"),ee(this.element),""!==this.originalElement.innerHTML.trim()?(this.valueContainer.value=this.originalElement.innerHTML.trim(),this.setProperties({value:g(this.initialValue)?null:this.initialValue},!0)):this.valueContainer.value=this.valueContainer.defaultValue,this.element=this.valueContainer;for(var t=0;t<this.originalElement.classList.length;t++)G([this.element],this.originalElement.classList[t]);if(!g(this.cssClass)){var i=this.cssClass.split(" ");for(t=0;t<i.length;t++)G([this.element],i[t])}X([this.element],vo)}else""!==this.originalElement.innerHTML.trim()?(this.element.innerHTML=this.originalElement.innerHTML.trim(),this.setProperties({value:g(this.initialValue)?null:this.initialValue},!0)):this.element.innerHTML="";var n=document.querySelector(".e-dialog.e-rte-elements");if(n&&ee(n),this.placeholder&&this.placeHolderWrapper&&(this.placeHolderWrapper=null),!g(this.cssClass)){var o=this.cssClass.split(" ");for(t=0;t<o.length;t++)""!==o[t].trim()&&X([this.element],o[t])}this.rootContainer&&(this.rootContainer=null),this.valueContainer&&(this.valueContainer=null),this.originalElement&&(this.originalElement=null),this.currentTarget=null,this.scrollParentElements=[],this.isRendered=!1,e.prototype.destroy.call(this)}},t.prototype.removeHtmlAttributes=function(){if(this.htmlAttributes)for(var e=Object.keys(this.htmlAttributes),t=0;t<e.length&&this.element.hasAttribute(e[t]);t++)this.element.removeAttribute(e[t])},t.prototype.removeAttributes=function(){this.enabled||X([this.element],kn),this.enableRtl&&X([this.element],An),this.readonly&&X([this.element],mo),""!==this.element.style.width&&""===this.originalElement.style.width&&this.element.style.removeProperty("width"),""!==this.element.style.height&&""===this.originalElement.style.height&&this.element.style.removeProperty("height"),this.element.removeAttribute("aria-disabled"),this.element.removeAttribute("role"),this.element.removeAttribute("tabindex"),this.element.removeAttribute("aria-label")},t.prototype.destroyDependentModules=function(){this.renderModule.destroy(),this.formatter.editorManager.destroy()},t.prototype.getContent=function(){return this.contentModule.getPanel()},t.prototype.getText=function(){return this.contentModule.getText()},t.prototype.getSelectedHtml=function(){var e=this.createElement("div"),t=this.contentModule.getDocument().getSelection();if(t.rangeCount>0){var i=t.getRangeAt(0).cloneContents();e.appendChild(i)}return e.innerHTML},t.prototype.showInlineToolbar=function(){if(this.inlineMode.enable){var e=this.getRange(),t="#text"===e.endContainer.nodeName?e.endContainer.parentElement:e.endContainer,i=Array.from(e.getClientRects(),(function(e){return e}));if(0===i.length&&(i=[e.startContainer.getBoundingClientRect()]),i.length>0){var n=i[0].left,o=i[0].top;this.quickToolbarModule.showInlineQTBar(n,o,t)}}},t.prototype.hideInlineToolbar=function(){this.quickToolbarModule.hideInlineQTBar()},t.prototype.getModuleName=function(){return"richtexteditor"},t.prototype.onPropertyChanged=function(t,i){for(var n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];switch(r){case"enterKey":case"value":var s=void 0;s="enterKey"===r?null===this.value||"<div><br></div>"===this.value||"<p><br></p>"===this.value||"<br>"===this.value?null:this.value:t[r],s="HTML"===this.editorMode?this.replaceEntities(s):s,s=this.serializeValue(s);var a="HTML"===this.editorMode?br(s,this):s;(!g(s)&&""!==s||"enterKey"===r)&&this.setProperties({value:this.enableHtmlEncode?this.encode(Er(a)):a},!0),this.updatePanelValue(),this.inputElement&&this.notify(Ii,{}),this.setPlaceHolder(),this.notify(vn,{module:"XhtmlValidation",newProp:t,oldProp:i}),this.enableXhtml&&this.setProperties({value:this.getXhtml()},!0),this.showCharCount&&this.countModule.refresh(),this.addAudioVideoWrapper();break;case"valueTemplate":this.setValue(!0),this.showCharCount&&this.countModule.refresh();break;case"width":this.setWidth(t[r]),this.toolbarSettings.enable&&!this.inlineMode.enable&&(this.toolbarModule.refreshToolbarOverflow(),this.resizeHandler());break;case"height":this.setHeight(t[r]),this.autoResize();break;case"readonly":this.setReadOnly(!1);break;case"cssClass":this.element.classList.remove(i[r]),this.setCssClass(t[r]),this.notify(Nn,{cssClass:t[r],oldCssClass:i[r]});break;case"enabled":this.setEnable();break;case"enableRtl":this.updateRTL();break;case"placeholder":this.placeholder=t[r],this.setPlaceHolder();break;case"htmlAttributes":Ng(this.htmlAttributes,this,!1,!1);break;case"iframeSettings":var l=i[r];if(l.resources){var c=this.contentModule.getDocument().querySelector("head"),h=void 0;l.resources.scripts&&(h=c.querySelectorAll("."+Pn),this.removeSheets(h)),l.resources.styles&&(h=c.querySelectorAll("."+Rn),this.removeSheets(h))}this.setIframeSettings();break;case"locale":e.prototype.refresh.call(this);break;case"inlineMode":this.notify(Ui,{module:"quickToolbar",newProp:t,oldProp:i});break;case"toolbarSettings":this.notify(Ui,{module:"toolbar",newProp:t,oldProp:i});break;case"maxLength":this.showCharCount&&this.countModule.refresh();break;case"showCharCount":t[r]&&this.countModule?this.countModule.renderCount():!1===t[r]&&this.countModule&&this.countModule.destroy();break;case"enableHtmlEncode":this.updateValueData(),this.updatePanelValue(),this.setPlaceHolder(),this.showCharCount&&this.countModule.refresh();break;case"undoRedoSteps":case"undoRedoTimer":this.formatter.editorManager.observer.notify(vu,{newProp:t,oldProp:i});break;case"enableXhtml":this.notify(vn,{module:"XhtmlValidation",newProp:t,oldProp:i});break;case"quickToolbarSettings":t.quickToolbarSettings.showOnRightClick?this.wireContextEvent():this.unWireContextEvent(),this.notify(Ui,{newProp:t,oldProp:i});break;case"formatPainterSettings":this.formatter.editorManager.observer.notify(vu,{module:"formatPainter",newProp:t});break;default:this.notify(Ui,{newProp:t,oldProp:i})}this.autoResize()}},t.prototype.updateValueData=function(){this.enableHtmlEncode?this.setProperties({value:this.encode(Er(this.inputElement.innerHTML))},!0):this.setProperties({value:/<[a-z][\s\S]*>/i.test(this.inputElement.innerHTML)?this.inputElement.innerHTML:Er(this.inputElement.innerHTML)})},t.prototype.removeSheets=function(e){var t;for(t=0;t<e.length;t++)ee(e[t])},t.prototype.replaceEntities=function(e){var t=this;if("HTML"!==this.editorMode||g(e)||!/&(amp;)*((times)|(divide)|(ne))/.test(e))return e;for(var i=this.enableHtmlEncode||this.enableHtmlSanitizer,n=["times","divide","ne"].map((function(e){var n=i?"&amp;amp;"+e:"&amp;"+e,o=!t.enableHtmlEncode&&t.enableHtmlSanitizer?"&("+e+")":"&(amp;)*("+e+")";return[n,new RegExp(o,"g")]})),o=0,r=n;o<r.length;o++){var s=r[o],a=s[0],l=s[1];l.test(e)&&(e=e.replace(l,a))}return e},t.prototype.updatePanelValue=function(){this.setProperties({value:this.replaceEntities(this.value)},!0);var e="HTML"===this.editorMode?this.listOrderCorrection(this.value):this.value;e=this.enableHtmlEncode&&this.value?Er(e):e;var t=this.element.querySelector("."+Co);if(e)!g(t)&&this.rootContainer.classList.contains("e-source-code-enabled")&&(t.value=this.value),this.valueContainer&&(this.valueContainer.value=this.enableHtmlEncode?this.value:e),"HTML"===this.editorMode&&this.inputElement&&this.inputElement.innerHTML.trim()!==e.trim()?this.inputElement.innerHTML=Lr(e,this.editorMode):"Markdown"===this.editorMode&&this.inputElement&&this.inputElement.value.trim()!==e.trim()&&(this.inputElement.value=e);else{if(!g(t)&&this.rootContainer.classList.contains("e-source-code-enabled")&&(t.value=""),"HTML"===this.editorMode){this.inputElement.innerHTML="";var i=this.createElement("br");if("DIV"===this.enterKey){var n=this.createElement("DIV");n.appendChild(i),this.inputElement.appendChild(n)}else if("BR"===this.enterKey)this.inputElement.appendChild(i);else{var o=this.createElement("P");o.appendChild(i),this.inputElement.appendChild(o)}this.formatter&&this.formatter.editorManager&&this.formatter.editorManager.nodeSelection&&this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(),i,0)}else this.inputElement.value="";this.valueContainer&&(this.valueContainer.value="")}this.showCharCount&&this.countModule.refresh()},t.prototype.listOrderCorrection=function(e){var t=this.createElement("div");t.innerHTML=e;for(var i=t.querySelectorAll("UL, OL"),n=0;n<i.length;n++)g(i[n])||g(i[n].parentElement)||g(i[n].previousElementSibling)||"UL"!==i[n].parentElement.nodeName&&"OL"!==i[n].parentElement.nodeName||i[n].previousElementSibling.appendChild(i[n]);return t.innerHTML},t.prototype.setHeight=function(e){this.element.style.height="auto"!==e?N(e):"auto","Expand"===this.toolbarSettings.type&&("string"==typeof this.height&&this.height.indexOf("px")>-1||"number"==typeof this.height)?this.element.classList.add(Mo):this.element.classList.remove(Mo)},t.prototype.setPlaceHolder=function(){this.inputElement&&this.placeholder&&!0!==this.iframeSettings.enable&&("Markdown"!==this.editorMode?(this.placeHolderWrapper||(this.placeHolderWrapper=this.createElement("span",{className:"rte-placeholder e-rte-placeholder "+this.getCssClass()}),this.fontSize.default&&(this.placeHolderWrapper.style.fontSize=this.fontSize.default),this.inputElement&&this.inputElement.parentElement.insertBefore(this.placeHolderWrapper,this.inputElement)),this.placeHolderWrapper.innerHTML=this.placeholder,0===this.inputElement.textContent.length&&this.inputElement.childNodes.length<2&&!g(this.inputElement.firstChild)&&("BR"===this.inputElement.firstChild.nodeName||("P"===this.inputElement.firstChild.nodeName||"DIV"===this.inputElement.firstChild.nodeName)&&!g(this.inputElement.firstChild.firstChild)&&this.inputElement.firstChild.childNodes.length<2&&"BR"===this.inputElement.firstChild.firstChild.nodeName)?this.placeHolderWrapper.classList.add("enabled"):this.placeHolderWrapper.classList.remove("enabled")):this.inputElement.setAttribute("placeholder",this.placeholder)),this.placeholder&&this.iframeSettings.enable&&this.inputElement&&(!(0===this.inputElement.textContent.length&&this.inputElement.childNodes.length<2)||g(this.inputElement.firstChild)||"BR"!==this.inputElement.firstChild.nodeName&&("P"!==this.inputElement.firstChild.nodeName&&"DIV"!==this.inputElement.firstChild.nodeName||g(this.inputElement.firstChild.firstChild)||"BR"!==this.inputElement.firstChild.firstChild.nodeName)?X([this.inputElement],"e-rte-placeholder"):(G([this.inputElement],"e-rte-placeholder"),this.inputElement.setAttribute("placeholder",this.placeholder)))},t.prototype.setWidth=function(e){"auto"!==e?ae(this.element,{width:N(this.width)}):this.element.style.width="auto"},t.prototype.setCssClass=function(e){if(!g(e))for(var t=e.split(" "),i=0;i<t.length;i++)""!==t[i].trim()&&this.element.classList.add(t[i])},t.prototype.updateRTL=function(){this.notify(mn,{enableRtl:this.enableRtl}),this.enableRtl?(this.element.classList.add(An),this.inputElement.classList.add(An)):(this.element.classList.remove(An),this.inputElement.classList.remove(An))},t.prototype.updateReadOnly=function(){this.notify(gn,{editPanel:this.inputElement,mode:this.readonly})},t.prototype.setReadOnly=function(e){this.updateReadOnly(),e||(this.readonly&&this.enabled?(this.unbindEvents(),this.unWireEvents()):this.enabled&&this.wireEvents())},t.prototype.print=function(){var e,t=this,i={element:this.inputElement,requestType:"print",cancel:!1};this.trigger(Ki,i,(function(i){if(e=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth),"msie"===Q.info.name&&e.resizeTo(screen.availWidth,screen.availHeight),e=function(e,t){var i=document.createElement("div"),n=[].slice.call(document.getElementsByTagName("head")[0].querySelectorAll("base, link, style")),o=[].slice.call(document.getElementsByTagName("body")[0].querySelectorAll("link, style"));if(o.length)for(var r=0,s=o.length;r<s;r++)n.push(o[parseInt(r.toString(),10)]);var a="";g(t)&&(t=window.open("","print","height=452,width=1024,tabbar=no")),i.appendChild(e.cloneNode(!0));var l=0;for(s=n.length;l<s;l++)a+=n[parseInt(l.toString(),10)].outerHTML;t.document.write("<!DOCTYPE html> <html><head>"+a+"</head><body>"+i.innerHTML+"<script> (function() { window.ready = true; })(); <\/script></body></html>"),t.document.close(),t.focus();var c=setInterval((function(){t.ready&&(t.print(),t.close(),clearInterval(c))}),500);return t}(t.inputElement,e),!i.cancel){t.trigger(Zi,{requestType:"print"})}}))},t.prototype.refreshUI=function(){this.renderModule.refresh()},t.prototype.showFullScreen=function(){this.fullScreenModule.showFullScreen()},t.prototype.enableToolbarItem=function(e,t){this.toolbarModule.enableTBarItems(this.getBaseToolbarObject(),e,!0,t)},t.prototype.disableToolbarItem=function(e,t){this.toolbarModule.enableTBarItems(this.getBaseToolbarObject(),e,!1,t)},t.prototype.removeToolbarItem=function(e){this.toolbarModule.removeTBarItems(e)},t.prototype.getRange=function(){return this.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument())},t.prototype.initializeServices=function(){this.serviceLocator.register("rendererFactory",new Dg),this.serviceLocator.register("rteLocale",this.localeObj=new Ut(this.getModuleName(),tr,this.locale)),this.serviceLocator.register("dialogRenderObject",new wm(this))},t.prototype.RTERender=function(){var e=this.serviceLocator.getService("rendererFactory");this.contentModule=e.getRenderer(bi.Content),this.fullScreenModule=new Mg(this),this.enterKeyModule=new ef(this),this.renderModule.render(),this.inputElement=this.contentModule.getEditPanel(),this.setHeight(this.height),Ng(this.htmlAttributes,this,!1,!0),this.iframeSettings&&this.setIframeSettings(),this.setCssClass(this.cssClass),this.updateEnable(),this.setPlaceHolder(),this.updateRTL(),this.updateReadOnly(),this.updatePanelValue(),this.enableHtmlEncode&&!g(this.value)&&this.setProperties({value:this.encode(Er(this.value))})},t.prototype.setIframeSettings=function(){if(this.iframeSettings.resources){var e=this.iframeSettings.resources.styles,t=this.iframeSettings.resources.scripts;!g(this.iframeSettings.resources.scripts)&&this.iframeSettings.resources.scripts.length>0&&this.InjectSheet(!0,t),!g(this.iframeSettings.resources.styles)&&this.iframeSettings.resources.styles.length>0&&this.InjectSheet(!1,e)}this.iframeSettings.attributes&&Ng(this.iframeSettings.attributes,this,!0,!1)},t.prototype.InjectSheet=function(e,t){try{if(t&&t.length>0)for(var i=this.contentModule.getDocument().querySelector("head"),n=0;n<t.length;n++)if(e){var o=this.createScriptElement();o.src=t[n],i.appendChild(o)}else{var r=this.createStyleElement();r.href=t[n],i.appendChild(r)}}catch(e){return}},t.prototype.createScriptElement=function(){var e=this.createElement("script",{className:Pn});return e.type="text/javascript",e},t.prototype.createStyleElement=function(){var e=this.createElement("link",{className:Rn});return e.rel="stylesheet",e},t.prototype.setValue=function(e){var t=this;if(this.valueTemplate){var i=new RegExp(/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i);if("string"==typeof this.valueTemplate&&i.test(this.valueTemplate))this.setProperties({value:this.valueTemplate});else{var n=yi(this.valueTemplate)("",this,"valueTemplate");if("string"!=typeof this.valueTemplate&&this.isReact){this.displayTempElem=this.createElement("div");for(var o=0;o<n.length;o++){$([n[o]],this.displayTempElem)}this.renderTemplates((function(){t.inputElement.innerHTML=Lr(t.displayTempElem.childNodes[0].innerHTML,t.editorMode),t.setProperties({value:t.inputElement.innerHTML.trim()})}))}else{var r=this.element;e&&(this.inputElement.innerHTML="",r=this.inputElement);for(o=0;o<n.length;o++){$([n[o]],r)}var s=r.innerHTML.trim();s.length>0&&this.setProperties({value:s}),this.renderReactTemplates()}}}else{var a=!g(this.element.innerHTML)&&this.element.innerHTML.replace(/<(\/?|\!?)(!--!--)>/g,"").trim();""!==a&&("TEXTAREA"===this.element.tagName?this.setProperties({value:Er(a)}):this.setProperties({value:a}))}},t.prototype.renderTemplates=function(e){this.renderReactTemplates(e)},t.prototype.updateResizeFlag=function(){this.isResizeInitialized=!0},t.prototype.getInsertImgMaxWidth=function(){var e=this.insertImageSettings.maxWidth,t=this.contentModule.getEditPanel();if("HTML"===this.editorMode&&!g(this.formatter.editorManager.nodeSelection)&&!g(this.formatter.editorManager.nodeSelection.range)){var i=this.formatter.editorManager.nodeSelection.range;3!==i.startContainer.nodeType&&i.startContainer.closest&&!g(i.startContainer.closest("TD"))&&(t=i.startContainer)}var n=window.getComputedStyle(t),o=t.offsetWidth-(14+parseFloat(n.paddingLeft.split("px")[0])+parseFloat(n.paddingRight.split("px")[0])+parseFloat(n.marginLeft.split("px")[0])+parseFloat(n.marginRight.split("px")[0]));return g(e)?o:e},t.prototype.getInsertVidMaxWidth=function(){var e=this.insertVideoSettings.maxWidth,t=this.contentModule.getEditPanel(),i=window.getComputedStyle(t),n=t.offsetWidth-(14+parseFloat(i.paddingLeft.split("px")[0])+parseFloat(i.paddingRight.split("px")[0])+parseFloat(i.marginLeft.split("px")[0])+parseFloat(i.marginRight.split("px")[0]));return g(e)?n:e},t.prototype.getHtml=function(){var e=Sr(this.contentModule.getEditPanel().innerHTML,this.editorMode);return!this.enableXhtml||"<p><br></p>"!==e&&"<div><br></div>"!==e&&"<br>"!==e?this.serializeValue(e):null},t.prototype.getXhtml=function(){var e=Sr(this.value,this.editorMode);return!g(e)&&this.enableXhtml&&(e=this.htmlEditorModule.xhtmlValidation.selfEncloseValidation(e)),e},t.prototype.showSourceCode=function(){this.readonly||this.notify($i,{})},t.prototype.getCharCount=function(){var e="Markdown"===this.editorMode?this.inputElement.value.trim():this.inputElement.textContent.trim();return"Markdown"!==this.editorMode&&-1!==e.indexOf("​")?e.replace(/\u200B/g,"").length:e.length},t.prototype.showDialog=function(e){e===Ni.InsertLink?this.notify("showLinkDialog",{}):e===Ni.InsertImage?this.notify("showImageDialog",{}):e===Ni.InsertAudio?this.notify("showAudioDialog",{}):e===Ni.InsertVideo?this.notify("showVideoDialog",{}):e===Ni.InsertTable&&this.notify("showTableDialog",{})},t.prototype.closeDialog=function(e){e===Ni.InsertLink?this.notify("closeLinkDialog",{}):e===Ni.InsertImage?this.notify("closeImageDialog",{}):e===Ni.InsertAudio?this.notify("closeAudioDialog",{}):e===Ni.InsertVideo?this.notify("closeVideoDialog",{}):e===Ni.InsertTable&&this.notify("closeTableDialog",{})},t.prototype.getBaseToolbarObject=function(){return!this.inlineMode.enable||Q.isDevice&&!dr()?this.toolbarModule&&this.toolbarModule.getBaseToolbar():this.quickToolbarModule&&this.quickToolbarModule.getInlineBaseToolbar()},t.prototype.getToolbar=function(){return this.toolbarModule?this.toolbarModule.getToolbarElement():null},t.prototype.getToolbarElement=function(){return this.toolbarModule&&this.toolbarModule.getToolbarElement()},t.prototype.getID=function(){return this.internalID},t.prototype.getCssClass=function(e){return g(this.cssClass)?"":e?" "+this.cssClass:this.cssClass},t.prototype.mouseDownHandler=function(e){var t=e.touches?e.changedTouches[0]:e;G([this.element],[eo]),this.preventDefaultResize(e),this.notify(rn,{args:e}),this.formatter.editorManager.observer.notify(rn,{args:e}),this.clickPoints={clientX:t.clientX,clientY:t.clientY}},t.prototype.preventImgResize=function(e){"img"===e.target.nodeName.toLocaleLowerCase()&&e.preventDefault()},t.prototype.preventDefaultResize=function(e){"msie"===Q.info.name?this.contentModule.getEditPanel().addEventListener("mscontrolselect",this.preventImgResize):"mozilla"===Q.info.name&&(this.contentModule.getDocument().execCommand("enableObjectResizing",!1,"false"),this.contentModule.getDocument().execCommand("enableInlineTableEditing",!1,"false"))},t.prototype.defaultResize=function(e){"msie"===Q.info.name?this.contentModule.getEditPanel().removeEventListener("mscontrolselect",this.preventImgResize):"mozilla"===Q.info.name&&(this.contentModule.getDocument().execCommand("enableObjectResizing",!0,"true"),this.contentModule.getDocument().execCommand("enableInlineTableEditing",!0,"true"))},t.prototype.resizeHandler=function(){if(!document.body.contains(this.element))return document.defaultView.removeEventListener("resize",this.resizeHandler,!0),void(this.onResizeHandler=null);this.toolbarSettings.enable&&!this.inlineMode.enable&&this.toolbarModule.refreshToolbarOverflow(),this.notify("resize",null),this.autoResize()},t.prototype.scrollHandler=function(e){this.element&&this.notify("scroll",{args:e})},t.prototype.contentScrollHandler=function(e){this.notify("contentscroll",{args:e})},t.prototype.focusHandler=function(e){if(!this.isRTE||this.isFocusOut){this.isRTE=!this.isFocusOut,this.isFocusOut=!1,G([this.element],[eo]),"HTML"===this.editorMode?this.cloneValue="<p><br></p>"===this.inputElement.innerHTML||"<div><br></div>"===this.inputElement.innerHTML||"<br>"===this.inputElement.innerHTML?null:this.enableHtmlEncode?this.encode(Er(this.inputElement.innerHTML)):this.inputElement.innerHTML:this.cloneValue=""===this.inputElement.value?null:this.inputElement.value;var t=document.activeElement;if((t===this.element||t===this.getToolbarElement()||t===this.contentModule.getEditPanel()||this.iframeSettings.enable&&t===this.contentModule.getPanel()&&e.target&&!e.target.classList.contains("e-img-inner")&&e.target&&e.target.parentElement&&!e.target.parentElement.classList.contains("e-img-wrap")||se(t,".e-rte-toolbar")===this.getToolbarElement())&&(this.contentModule.getEditPanel().focus(),!g(this.getToolbarElement()))){this.getToolbarElement().setAttribute("tabindex","-1");for(var i=this.getToolbarElement().querySelectorAll('[tabindex="0"]'),n=0;n<i.length;n++)i[n].setAttribute("tabindex","-1")}this.preventDefaultResize(e),this.trigger("focus",{event:e,isInteracted:0!==Object.keys(e).length}),!g(this.saveInterval)&&this.saveInterval>0&&!this.autoSaveOnIdle&&g(this.timeInterval)&&(this.timeInterval=setInterval(this.updateValueOnIdle.bind(this),this.saveInterval)),q.add(document,"mousedown",this.onDocumentClick,this)}if(!this.readonly){var o=this.getCurrentFocus(e);"editArea"!==o&&"textArea"!==o&&"sourceCode"!==o||this.resetToolbarTabIndex()}},t.prototype.getUpdatedValue=function(){var e,t=this.element.querySelector("."+Co);return"HTML"===this.editorMode?(e="<p><br></p>"===this.inputElement.innerHTML||"<div><br></div>"===this.inputElement.innerHTML||"<br>"===this.inputElement.innerHTML?null:this.enableHtmlEncode?this.encode(Er(Sr(this.inputElement.innerHTML,this.editorMode))):this.inputElement.innerHTML,this.enableHtmlSanitizer&&!g(e)&&/&(amp;)*((times)|(divide)|(ne))/.test(e)&&(e=e.replace(/&(amp;)*(times|divide|ne)/g,"&amp;amp;$2")),!g(t)&&this.rootContainer.classList.contains("e-source-code-enabled")&&(e=/&(amp;)*((times)|(divide)|(ne))/.test(t.value)?t.value.replace(/&(amp;)*(times|divide|ne)/g,"&amp;amp;$2"):t.value)):e=""===this.inputElement.value?null:this.inputElement.value,null==e||this.enableHtmlEncode||(e=Sr(e,this.editorMode)),e},t.prototype.updateValueOnIdle=function(){(g(this.tableModule)||g(this.inputElement.querySelector(".e-table-box.e-rbox-select")))&&(this.setProperties({value:this.getUpdatedValue()},!0),this.valueContainer.value=this.value,this.isValueChangeBlurhandler=!1,this.invokeChangeEvent())},t.prototype.updateIntervalValue=function(){clearTimeout(this.idleInterval),this.idleInterval=setTimeout(this.updateValueOnIdle.bind(this),0)},t.prototype.cleanupResizeElements=function(e){var t=Sr(e.value,this.editorMode);e.callBack(t)},t.prototype.addAnchorAriaLabel=function(e){var t=document.createElement("div");t.innerHTML=e;var i=t.querySelectorAll("a");if(i.length>0)for(var n=0;n<i.length;n++)i[n].hasAttribute("target")&&"_blank"===i[n].getAttribute("target")&&i[n].setAttribute("aria-label",this.serviceLocator.getService("rteLocale").getConstant("linkAriaLabel"));return t.innerHTML},t.prototype.updateStatus=function(e){if(!g(e.html)||!g(e.markdown)){var t=this.formatter.editorManager.undoRedoManager.getUndoStatus(),i={undo:t.undo,redo:t.redo,html:e.html,markdown:e.markdown};this.trigger("updatedToolbarStatus",i)}},t.prototype.onDocumentClick=function(e){var t=e.target,i=se(t,"."+zn);this.element.contains(e.target)||document===e.target||i===this.element||se(t,'[aria-owns="'+this.getID()+'"]')||(this.isBlur=!0,this.isRTE=!1),this.notify("docClick",{args:e});var n=this.quickToolbarModule&&!this.inlineMode.enable&&g(this.quickToolbarModule.inlineQTBar);(n&&!g(se(t,".e-toolbar-wrapper"))||n&&(!g(se(t,".e-rte-table-resize"))||!g(se(t,".e-table-box"))))&&this.quickToolbarModule.hideQuickToolbars(),"msie"!==Q.info.name&&e.detail>3&&e.preventDefault()},t.prototype.blurHandler=function(e){var t=e.relatedTarget;if(t){var i=se(t,"."+zn);if(!i&&this.iframeSettings.enable){var n=this.element.querySelector("#"+this.getID()+"_rte-view");n&&n.contentWindow.document.body.contains(t)&&(i=se(n,"."+zn))}i&&i===this.element?(this.isBlur=!1,t===this.getToolbarElement()&&t.setAttribute("tabindex","-1")):se(t,'[aria-owns="'+this.getID()+'"]')||se(t,"."+lo)?this.isBlur=!1:(this.isBlur=!0,t=null)}if(this.isBlur&&g(t)){X([this.element],[eo]),Ir(this.inputElement),this.notify(cn,{});var o=this.getUpdatedValue();this.rootContainer.classList.contains("e-source-code-enabled")?this.setProperties({value:o}):this.setProperties({value:o},!0),this.valueContainer.value=this.value,this.isValueChangeBlurhandler=!0,this.invokeChangeEvent(),this.isFocusOut=!0,this.isBlur=!1,function(e,t){var i=document.createEvent("HTMLEvents");i.initEvent(t,!1,!0),e.dispatchEvent(i)}(this.valueContainer,"focusout"),this.defaultResize(e),this.trigger("blur",{event:e,isInteracted:0!==Object.keys(e).length}),g(this.timeInterval)||(clearInterval(this.timeInterval),this.timeInterval=null),!g(this.placeHolderWrapper)&&this.element.querySelector("[title = Preview]")&&(this.placeHolderWrapper.style.display="none"),q.remove(document,"mousedown",this.onDocumentClick)}else this.isRTE=!0;this.readonly||"outside"!==this.getCurrentFocus(e)||this.resetToolbarTabIndex()},t.prototype.contentChanged=function(e){var t=this.inputElement.querySelector(".tempSpan");t&&ee(t),e&&!g(e.detail)&&e.detail.click&&this.formatter.saveData(),this.autoSaveOnIdle&&(g(this.saveInterval)||(clearTimeout(this.autoSaveTimeOut),this.autoSaveTimeOut=setTimeout(this.updateIntervalValue.bind(this),this.saveInterval)))},t.prototype.invokeChangeEvent=function(){var e={value:this.enableXhtml?this.getXhtml():this.value,isInteracted:this.isValueChangeBlurhandler};this.value!==Sr(this.cloneValue,this.editorMode)&&(this.trigger("change",e),this.cloneValue=this.value)},t.prototype.wireScrollElementsEvents=function(){this.scrollParentElements=pa(this.element);for(var e=0,t=this.scrollParentElements;e<t.length;e++){var i=t[e];q.add(i,"scroll",this.scrollHandler,this)}this.iframeSettings.enable||q.add(this.inputElement,"scroll",this.contentScrollHandler,this)},t.prototype.wireContextEvent=function(){this.quickToolbarSettings.showOnRightClick&&(q.add(this.inputElement,"contextmenu",this.contextHandler,this),Q.isDevice&&(this.touchModule=new qt(this.inputElement,{tapHold:this.touchHandler.bind(this),tapHoldThreshold:500})))},t.prototype.unWireContextEvent=function(){q.remove(this.inputElement,"contextmenu",this.contextHandler),Q.isDevice&&this.touchModule&&this.touchModule.destroy()},t.prototype.unWireScrollElementsEvents=function(){this.scrollParentElements=pa(this.element);for(var e=0,t=this.scrollParentElements;e<t.length;e++){var i=t[e];q.remove(i,"scroll",this.scrollHandler)}this.iframeSettings.enable||q.remove(this.inputElement,"scroll",this.contentScrollHandler)},t.prototype.touchHandler=function(e){this.notifyMouseUp(e.originalEvent),this.triggerEditArea(e.originalEvent)},t.prototype.contextHandler=function(e){var t=se(e.target,"a, table, img, video, audio, .e-embed-video-wrap");!t&&e.target&&e.target.classList&&(e.target.classList.contains(io)||e.target.classList.contains(to))&&(t=e.target.querySelector("audio")),!1!==this.inlineMode.onSelection&&(g(t)||!this.inputElement.contains(t)||"IMG"!==t.tagName&&"TABLE"!==t.tagName&&"A"!==t.tagName&&"video"!==t.tagName.toLowerCase()&&"audio"!==t.tagName.toLowerCase()&&"SPAN"!==t.tagName)||e.preventDefault()},t.prototype.resetHandler=function(){var e=this.valueContainer.defaultValue.trim();this.setProperties({value:""===e?null:e})},t.prototype.autoResize=function(){if(this.element&&this.originalElement&&this.valueContainer)if("auto"===this.height){if("Markdown"===this.editorMode)this.setAutoHeight(this.inputElement);else if(this.iframeSettings.enable){var e=this.element.querySelector("#"+this.getID()+"_rte-view");e&&this.setAutoHeight(e)}}else if("Markdown"===this.editorMode){var t=this.inputElement,i=this.enableResize||this.showCharCount?20:0;t&&(t.style.height=this.element.clientHeight-(this.toolbarModule.getToolbarHeight()+i+3)+"px")}else if(this.iframeSettings.enable){var n=this.element.querySelector("#"+this.getID()+"_rte-view");i=this.enableResize||this.showCharCount?20:0;n&&this.toolbarModule&&(n.style.height=this.element.clientHeight-(this.toolbarModule.getToolbarHeight()+i+3)+"px")}},t.prototype.setAutoHeight=function(e){"TEXTAREA"===e.nodeName?(e.style.height="auto",e.style.height=this.inputElement.scrollHeight+16+"px",e.style.overflow="hidden"):"IFRAME"===e.nodeName&&(e.style.height=this.inputElement.parentElement.offsetHeight+"px")},t.prototype.wireEvents=function(){this.onBlurHandler=this.blurHandler.bind(this),this.onFocusHandler=this.focusHandler.bind(this),this.onResizeHandler=this.resizeHandler.bind(this),this.element.addEventListener("focusin",this.onFocusHandler,!0),this.element.addEventListener("focusout",this.onBlurHandler,!0),this.on(xi,this.contentChanged,this),this.on(bn,this.updateResizeFlag,this),this.on(Mn,this.updateStatus,this),this.on(Dn,this.cleanupResizeElements,this),this.on(Tn,this.updateValueOnIdle,this),this.on(wn,this.autoResize,this),this.iframeSettings.enable&&(this.onLoadHandler=this.iframeEditableElemLoad.bind(this),this.contentModule.getEditPanel().addEventListener("load",this.onLoadHandler,!0)),this.readonly&&this.enabled||this.bindEvents()},t.prototype.restrict=function(e){if(this.maxLength>=0){var t="Markdown"===this.editorMode?this.contentModule.getText():this.getText().replace(/(\r\n|\n|\r|\t)/gm,"").replace(/\u200B/g,"");if(!t)return;for(var i=[8,16,17,37,38,39,40,46,65],n=void 0,o=0;o<=i.length-1;o++)if(e.which===i[o]){if(e.ctrlKey&&65===e.which)return;if(65!==e.which)return void(n=i[o])}t.length>=this.maxLength&&-1!==this.maxLength&&e.which!==n&&e.preventDefault()}},t.prototype.bindEvents=function(){this.keyboardModule=new Sm(this.inputElement,{keyAction:this.keyDown.bind(this),keyConfigs:nf({},this.formatter.keyConfig,this.keyConfig),eventName:"keydown"});var e=se(this.valueContainer,"form");e&&q.add(e,"reset",this.resetHandler,this),q.add(this.inputElement,"keyup",this.keyUp,this),q.add(this.inputElement,"paste",this.onPaste,this),q.add(this.inputElement,"content-changed",this.contentChanged,this),this.mouseDownDebListener=v(this.mouseUp,30),q.add(this.inputElement,Q.touchEndEvent,this.mouseDownDebListener,this),q.add(this.inputElement,Q.touchStartEvent,this.mouseDownHandler,this),q.add(this.inputElement,"input",this.inputHandler,this),this.wireContextEvent(),this.formatter.editorManager.observer.on(uu,this.editorKeyDown,this),this.element.ownerDocument.defaultView.addEventListener("resize",this.onResizeHandler,!0),this.iframeSettings.enable&&(q.add(this.inputElement,"focusin",this.focusHandler,this),q.add(this.inputElement,"focusout",this.blurHandler,this),q.add(this.inputElement.ownerDocument,"scroll",this.contentScrollHandler,this),q.add(this.inputElement.ownerDocument,Q.touchStartEvent,this.onIframeMouseDown,this),q.add(this.contentModule.getPanel(),"load",this.iframeLoadHandler,this)),this.wireScrollElementsEvents()},t.prototype.onIframeMouseDown=function(e){this.isBlur=!1,this.currentTarget=e.target,this.notify(Oi,e)},t.prototype.inputHandler=function(){this.autoResize()},t.prototype.editorKeyDown=function(e){switch(e.event.action){case"copy":this.onCopy();break;case"cut":this.onCut();break;case"tab":this.iframeSettings.enable&&(this.isBlur=!0)}!e.callBack||"copy"!==e.event.action&&"cut"!==e.event.action&&"delete"!==e.event.action||e.callBack({requestType:e.event.action,editorMode:"HTML",event:e.event})},t.prototype.unWireEvents=function(){this.element.removeEventListener("focusin",this.onFocusHandler,!0),this.onFocusHandler=null,this.element.removeEventListener("focusout",this.onBlurHandler,!0),this.onBlurHandler=null,this.off(xi,this.contentChanged),this.off(bn,this.updateResizeFlag),this.off(Mn,this.updateStatus),this.off(Dn,this.cleanupResizeElements),this.off(Tn,this.updateValueOnIdle),this.off(wn,this.autoResize),this.iframeSettings.enable&&(this.contentModule.getEditPanel().removeEventListener("load",this.onLoadHandler,!0),this.onLoadHandler=null),this.readonly&&this.enabled||this.unbindEvents()},t.prototype.unbindEvents=function(){this.keyboardModule&&!this.keyboardModule.isDestroyed&&(this.keyboardModule.destroy(),this.keyboardModule=null);var e=se(this.valueContainer,"form");e&&q.remove(e,"reset",this.resetHandler),q.remove(this.inputElement,"keyup",this.keyUp),q.remove(this.inputElement,"paste",this.onPaste),q.remove(this.inputElement,"content-changed",this.contentChanged),q.remove(this.inputElement,Q.touchEndEvent,this.mouseDownDebListener),this.mouseDownDebListener=null,q.remove(this.inputElement,Q.touchStartEvent,this.mouseDownHandler),q.remove(this.inputElement,"input",this.inputHandler),q.remove(document,"mousedown",this.onDocumentClick),this.unWireContextEvent(),this.formatter&&this.formatter.editorManager.observer.off(uu,this.editorKeyDown),this.element.ownerDocument.defaultView.removeEventListener("resize",this.onResizeHandler,!0),this.onResizeHandler=null,this.iframeSettings.enable&&(q.remove(this.inputElement,"focusin",this.focusHandler),q.remove(this.inputElement,"focusout",this.blurHandler),q.remove(this.inputElement.ownerDocument,"scroll",this.contentScrollHandler),q.remove(this.inputElement.ownerDocument,Q.touchStartEvent,this.onIframeMouseDown),q.remove(this.contentModule.getPanel(),"load",this.iframeLoadHandler)),this.unWireScrollElementsEvents()},t.prototype.getCurrentFocus=function(e){return e.target===this.inputElement&&document.activeElement===this.inputElement?"editArea":e.target===this.getToolbarElement()||!g(e.relatedTarget)&&se(e.relatedTarget,".e-rte-toolbar")===this.getToolbarElement()?"toolbar":e.target===this.valueContainer&&document.activeElement===this.valueContainer?"textArea":!g(e.target)&&e.target.classList.contains(Co)&&document.activeElement===e.target?"sourceCode":"outside"},t.prototype.resetToolbarTabIndex=function(){if(this.getToolbarElement())for(var e=this.getToolbarElement().querySelectorAll("input,select,button,a,[tabindex]"),t=0;t<e.length;t++)e[t].classList.contains("e-rte-dropdown-btn")||e[t].classList.contains("e-insert-table-btn")||e[t].hasAttribute("tabindex")&&"-1"===e[t].getAttribute("tabindex")||e[t].setAttribute("tabindex","-1")},t.prototype.getRenderedQuickToolbarElem=function(){for(var e=this.quickToolbarModule.getQuickToolbarInstance(),t=0;t<e.length;t++)if(e[t]&&e[t].isRendered)return e[t].element;return null},t.prototype.iframeLoadHandler=function(){this.autoResize()},t.prototype.iframeEditableElemLoad=function(){this.autoResize()},of([Te({},Sg)],t.prototype,"toolbarSettings",void 0),of([Te({enable:!1,items:["Paragraph","Heading 1","Heading 2","Heading 3","Heading 4","OrderedList","UnorderedList","CodeBlock","Blockquote"],popupWidth:"300px",popupHeight:"320px"},km)],t.prototype,"slashMenuSettings",void 0),of([Te({},Pg)],t.prototype,"quickToolbarSettings",void 0),of([Te({},Hg)],t.prototype,"pasteCleanupSettings",void 0),of([Te({},Rg)],t.prototype,"formatPainterSettings",void 0),of([Te({},Bg)],t.prototype,"emojiPickerSettings",void 0),of([Te({},Kg)],t.prototype,"iframeSettings",void 0),of([Te({},jg)],t.prototype,"insertImageSettings",void 0),of([Te({},Ig)],t.prototype,"importWord",void 0),of([Te({},wg)],t.prototype,"exportWord",void 0),of([Te({},xg)],t.prototype,"exportPdf",void 0),of([Te({},Og)],t.prototype,"insertAudioSettings",void 0),of([Te({},zg)],t.prototype,"insertVideoSettings",void 0),of([Te({},kg)],t.prototype,"tableSettings",void 0),of([De(0)],t.prototype,"floatingToolbarOffset",void 0),of([Te({},$g)],t.prototype,"inlineMode",void 0),of([Te({},Ag)],t.prototype,"fileManagerSettings",void 0),of([De("100%")],t.prototype,"width",void 0),of([De(!1)],t.prototype,"enablePersistence",void 0),of([De(!0)],t.prototype,"showTooltip",void 0),of([De(!1)],t.prototype,"enableResize",void 0),of([De({})],t.prototype,"htmlAttributes",void 0),of([De(null)],t.prototype,"placeholder",void 0),of([De(!1)],t.prototype,"autoSaveOnIdle",void 0),of([De(!1)],t.prototype,"readonly",void 0),of([De(!0)],t.prototype,"enabled",void 0),of([De(!0)],t.prototype,"enableHtmlSanitizer",void 0),of([De(!1)],t.prototype,"enableHtmlEncode",void 0),of([De(!1)],t.prototype,"enableXhtml",void 0),of([De("auto")],t.prototype,"height",void 0),of([De(null)],t.prototype,"cssClass",void 0),of([De(null)],t.prototype,"value",void 0),of([De("P")],t.prototype,"enterKey",void 0),of([De("BR")],t.prototype,"shiftEnterKey",void 0),of([De(30)],t.prototype,"undoRedoSteps",void 0),of([De(300)],t.prototype,"undoRedoTimer",void 0),of([De("HTML")],t.prototype,"editorMode",void 0),of([De(null)],t.prototype,"keyConfig",void 0),of([De(!1)],t.prototype,"showCharCount",void 0),of([De(!1)],t.prototype,"enableTabKey",void 0),of([De(!1)],t.prototype,"enableAutoUrl",void 0),of([De(-1)],t.prototype,"maxLength",void 0),of([Te({},Yg)],t.prototype,"format",void 0),of([Te({},qg)],t.prototype,"numberFormatList",void 0),of([Te({},Wg)],t.prototype,"bulletFormatList",void 0),of([Te({},Ug)],t.prototype,"fontFamily",void 0),of([Te({},Fg)],t.prototype,"fontSize",void 0),of([Te({},Vg)],t.prototype,"fontColor",void 0),of([Te({},Qg)],t.prototype,"backgroundColor",void 0),of([De(null)],t.prototype,"valueTemplate",void 0),of([De(1e4)],t.prototype,"saveInterval",void 0),of([Se()],t.prototype,"actionBegin",void 0),of([Se()],t.prototype,"actionComplete",void 0),of([Se()],t.prototype,"beforeDialogOpen",void 0),of([Se()],t.prototype,"dialogOpen",void 0),of([Se()],t.prototype,"beforeDialogClose",void 0),of([Se()],t.prototype,"dialogClose",void 0),of([Se()],t.prototype,"beforeQuickToolbarOpen",void 0),of([Se()],t.prototype,"quickToolbarOpen",void 0),of([Se()],t.prototype,"quickToolbarClose",void 0),of([Se()],t.prototype,"toolbarStatusUpdate",void 0),of([Se()],t.prototype,"updatedToolbarStatus",void 0),of([Se()],t.prototype,"imageSelected",void 0),of([Se()],t.prototype,"beforeImageUpload",void 0),of([Se()],t.prototype,"imageUploading",void 0),of([Se()],t.prototype,"imageUploadSuccess",void 0),of([Se()],t.prototype,"imageUploadFailed",void 0),of([Se()],t.prototype,"imageRemoving",void 0),of([Se()],t.prototype,"afterImageDelete",void 0),of([Se()],t.prototype,"fileSelected",void 0),of([Se()],t.prototype,"beforeFileUpload",void 0),of([Se()],t.prototype,"fileUploading",void 0),of([Se()],t.prototype,"fileUploadSuccess",void 0),of([Se()],t.prototype,"fileUploadFailed",void 0),of([Se()],t.prototype,"fileRemoving",void 0),of([Se()],t.prototype,"afterMediaDelete",void 0),of([Se()],t.prototype,"created",void 0),of([Se()],t.prototype,"destroyed",void 0),of([Se()],t.prototype,"beforeSanitizeHtml",void 0),of([Se()],t.prototype,"blur",void 0),of([Se()],t.prototype,"toolbarClick",void 0),of([Se()],t.prototype,"focus",void 0),of([Se()],t.prototype,"change",void 0),of([Se()],t.prototype,"resizing",void 0),of([Se()],t.prototype,"resizeStart",void 0),of([Se()],t.prototype,"resizeStop",void 0),of([Se()],t.prototype,"beforePasteCleanup",void 0),of([Se()],t.prototype,"afterPasteCleanup",void 0),of([Se()],t.prototype,"beforeImageDrop",void 0),of([De(null)],t.prototype,"formatter",void 0),of([Se()],t.prototype,"slashMenuItemSelect",void 0),t=of([Ie],t)}(St),sf=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),af=["alt","className","disabled","form","id","readOnly","style","tabIndex","title","type","name","onClick","onFocus","onBlur"],lf=["accordion","tab","splitter"],cf=/\]/,hf=function(i){function n(){var e=null!==i&&i.apply(this,arguments)||this;return e.mountingState=!1,e.attrKeys=[],e.cachedTimeOut=0,e.isAppendCalled=!1,e.initRenderCalled=!1,e.isReactForeceUpdate=!1,e.isReact=!0,e.isshouldComponentUpdateCalled=!1,e.isCreated=!1,e}return sf(n,i),n.prototype.componentDidMount=function(){this.refreshChild(!0),this.canDelayUpdate=-1!==lf.indexOf(this.getModuleName()),this.renderReactComponent(),this.portals&&this.portals.length&&(this.mountingState=!0,this.renderReactTemplates(),this.mountingState=!1)},n.prototype.componentDidUpdate=function(e){this.isshouldComponentUpdateCalled||!this.initRenderCalled||this.isReactForeceUpdate||e!==this.props&&(this.isshouldComponentUpdateCalled=!0,this.updateProperties(this.props,!1,e))},n.prototype.renderReactComponent=function(){var e=this.reactElement;e&&!this.isAppendCalled&&(this.isAppendCalled=!0,this.appendTo(e))},n.prototype.shouldComponentUpdate=function(e){return this.isshouldComponentUpdateCalled=!0,this.initRenderCalled?(this.isAppendCalled||(clearTimeout(this.cachedTimeOut),this.isAppendCalled=!0,this.appendTo(this.reactElement)),this.updateProperties(e),!0):(this.updateProperties(e,!0),!0)},n.prototype.updateProperties=function(e,t,i){for(var n=this,o=m({},e),r=Object.keys(e),s=m({},i||this.props),a=g(s.statelessTemplates)?g(this.statelessTemplateProps)?[]:this.statelessTemplateProps:s.statelessTemplates,l=0,c=r;l<c.length;l++){var h=c[l],d="className"===h;if("children"!==h)if(d||g(this.htmlattributes[""+h])||this.htmlattributes[""+h]===o[""+h]||(this.htmlattributes[""+h]=o[""+h]),this.compareValues(s[""+h],e[""+h]))delete o[""+h];else if(-1!==this.attrKeys.indexOf(h))if(d){this.clsName=!0;for(var p=s[""+h].split(" "),u=0;u<p.length;u++)this.element.classList.remove(p[parseInt(u.toString(),10)]);for(var f=o[""+h].split(" "),y=0;y<f.length;y++)this.element.classList.add(f[parseInt(y.toString(),10)])}else"disabled"===h||Object.prototype.hasOwnProperty.call(this.properties,h)||delete o[""+h];else("value"===h&&e[""+h]===this[""+h]||a.indexOf(h)>-1&&("content"===h&&"function"==typeof o[""+h]||e[""+h].toString()===this[""+h].toString()))&&delete o[""+h]}o.children&&delete o.children,this.initRenderCalled&&(this.canDelayUpdate||s.delayUpdate)?setTimeout((function(){n.refreshProperties(o,e,t)})):this.refreshProperties(o,e,t)},n.prototype.refreshProperties=function(e,t,i){var n=g(this.props.statelessTemplates)?[]:this.props.statelessTemplates;Object.keys(e).length&&(i||this.processComplexTemplate(e,this),this.setProperties(e,i)),-1===n.indexOf("directiveTemplates")&&this.refreshChild(i,t)},n.prototype.processComplexTemplate=function(e,t){var i=t.complexTemplate;if(i)for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var o=i[""+n];e[""+n]&&l(o,a(n,e),e)}},n.prototype.getDefaultAttributes=function(){var e=this;this.isReact=!0;var t=Object.keys(this.props),i=["children","statelessTemplates","immediateRender","isLegacyTemplate","delayUpdate"];this.htmlattributes||(this.htmlattributes={}),this.attrKeys=af.concat(this.controlAttributes||[]);for(var o=0,r=t;o<r.length;o++){var s=r[o];(-1!==s.indexOf("data-")||-1!==s.indexOf("aria-")||-1!==this.attrKeys.indexOf(s)||-1===Object.keys(this.properties).indexOf(""+s)&&-1===i.indexOf(""+s))&&this.htmlattributes[""+s]!==this.props[""+s]&&(this.htmlattributes[""+s]=this.props[""+s])}if(!this.htmlattributes.ref){this.htmlattributes.ref=function(t){e.reactElement=t};-1!==["autocomplete","combobox","dropdownlist","dropdowntree","multiselect","listbox","colorpicker","numerictextbox","textbox","smarttextarea","uploader","maskedtextbox","slider","datepicker","datetimepicker","daterangepicker","timepicker","checkbox","switch","radio","rating","textarea","multicolumncombobox"].indexOf(this.getModuleName())&&(this.htmlattributes.key=""+n.reactUid,n.reactUid++,this.type&&!this.htmlattributes.type&&(this.htmlattributes.type=this.multiline?"hidden":this.type),this.name&&!this.htmlattributes.name&&(this.htmlattributes.name=this.name))}if(this.clsName)for(var a=this.element.classList,l=this.htmlattributes.className,c=0;c<a.length;c++)-1===l.indexOf(a[parseInt(c.toString(),10)])&&(this.htmlattributes.className=this.htmlattributes.className+" "+a[parseInt(c.toString(),10)]);return this.htmlattributes},n.prototype.trigger=function(e,t,i){var n=this;if(!0!==this.isDestroyed&&this.modelObserver){if(cf.test(e)){var o=a(e,this);o?(o.call(this,t),i&&i.call(this,t)):i&&i.call(this,t)}"change"!==e&&"input"!==e||this.props.onChange&&t.event&&this.props.onChange.call(void 0,{syntheticEvent:t.event,nativeEvent:{text:t.value},value:t.value,target:this});var r=this.isProtectedOnChange;this.isProtectedOnChange=!1,"created"===e?setTimeout((function(){n.isCreated=!0,n.isDestroyed||n.modelObserver.notify(e,t,i)}),10):this.modelObserver.notify(e,t,i),this.isProtectedOnChange=r}},n.prototype.compareValues=function(e,t){if(typeof e===typeof t){if(e===t)return!0;if((!g(e)&&e.constructor)!==(!g(t)&&t.constructor))return!1;if(e instanceof Date||e instanceof RegExp||e instanceof String||e instanceof Number)return e.toString()===t.toString();if(d(e)||Array.isArray(e)){var i=e,n=t;return d(i)&&(i=[e],n=[t]),this.compareObjects(i,n).status}if(e.moduleName&&e.moduleName===t.moduleName&&("query"===e.moduleName||"datamanager"===e.moduleName)&&JSON.stringify(e)===JSON.stringify(t))return!0}return!1},n.prototype.compareObjects=function(e,t,i){var n=!0,o=e.length===t.length,r=[],s=g(this.templateProps)?[]:this.templateProps;if(o)for(var a=0,l=t.length;a<l;a++){var c={},h=e[parseInt(a.toString(),10)],d=t[parseInt(a.toString(),10)],p=Object.keys(d);if(0!==p.length)for(var u=0,m=p;u<m.length;u++){var f=m[u],y=h[""+f],v=d[""+f];if("items"===f)for(var b=0;b<v.length;b++)if("richtexteditor"===this.getModuleName()&&"object"==typeof v[parseInt(b.toString(),10)])return{status:!0};if("grid"===this.getModuleName()&&"field"===f&&(c[""+f]=v),!Object.prototype.hasOwnProperty.call(h,f)||!(s.length>0&&-1===s.indexOf(""+f)&&"function"==typeof v?this.compareValues(y.toString(),v.toString()):this.compareValues(y,v))){if(!i)return{status:!1};n=!1,c[""+f]=v}}else if(t[parseInt(a.toString(),10)]===e[parseInt(a.toString(),10)])n=!0;else{if(!i)return{status:!1};n=!1}"grid"===this.getModuleName()&&"columns"===i&&g(c.field)&&(c.field=void 0),Object.keys(c).length&&r.push({index:a,value:c,key:i})}else n=!1;return{status:n,changedProperties:r}},n.prototype.refreshChild=function(e,t){if(this.checkInjectedModules){for(var i=this.getInjectedModules()||[],n=0,o=this.getInjectedServices()||[];n<o.length;n++){var r=o[n];-1===i.indexOf(r)&&i.push(r)}this.injectedModules=i}if(this.directivekeys){var s=[],l="",c=this.validateChildren({},this.directivekeys,t||this.props);if(c&&Object.keys(c).length){if(!e&&this.skipRefresh)for(var h=0,d=this.skipRefresh;h<d.length;h++){delete c[""+d[h]]}if(this.prevProperties){for(var p=Object.keys(this.prevProperties),u=0;u<p.length;u++)if(l=p[parseInt(u.toString(),10)],Object.prototype.hasOwnProperty.call(c,l)){var g=this.compareObjects(this.prevProperties[""+l],c[""+l],l);if(g.status)delete c[""+l];else{g.changedProperties.length&&(s=s.concat(g.changedProperties));var f={};f[""+l]=c[""+l],this.prevProperties=m(this.prevProperties,f)}}}else this.prevProperties=m({},c,{},!0);if(s.length)if("grid"===this.getModuleName()&&"columns"===l)for(var y=0,v=this.columns;y<v.length;y++){if(a("field",v[parseInt(y.toString(),10)])===a(y+".value.field",s))(N=a(s[parseInt(y.toString(),10)].key+"."+s[parseInt(y.toString(),10)].index,this))&&N.setProperties?N.setProperties(s[parseInt(y.toString(),10)].value):m(N,s[parseInt(y.toString(),10)].value);else this.setProperties(c,e)}else for(var b=0,M=s;b<M.length;b++){var N,C=M[b];(N=a(C.key+"."+C.index,this))&&N.setProperties?N.setProperties(C.value):m(N,C.value)}else this.setProperties(c,e)}}},n.prototype.componentWillUnmount=function(){clearTimeout(this.cachedTimeOut);var e=!!["dropdowntree","checkbox"].indexOf(this.getModuleName())||document.body.contains(this.element);this.initRenderCalled&&this.isAppendCalled&&this.element&&e&&!this.isDestroyed&&this.isCreated&&this.destroy(),lt.offIntlEvents()},n.prototype.appendReactElement=function(e,i){var n=t.createPortal(e,i);this.portals?this.portals.push(n):this.portals=[n]},n.prototype.renderReactTemplates=function(e){this.isReactForeceUpdate=!0,e?this.forceUpdate(e):this.forceUpdate(),this.isReactForeceUpdate=!1},n.prototype.clearTemplate=function(e,t,i){var n=this;e&&e.length?Array.prototype.forEach.call(e,(function(e){if(n.portals.forEach((function(e){e.propName})),!g(t)&&n.portals[t]&&n.portals[t].propName===e)n.portals.splice(t,1);else for(var i=0;i<n.portals.length;i++)n.portals[parseInt(i.toString(),10)].propName===e&&(n.portals.splice(i,1),i--)})):this.portals=[],this.renderReactTemplates(i)},n.prototype.validateChildren=function(t,i,n){for(var o=!1,r=0,s=e.Children.toArray(n.children);r<s.length;r++){var a=s[r],l=this.getChildType(a),c=i[""+l];if(l&&i){var h=this.getChildProps(e.Children.toArray(a.props.children),c);h.length&&(o=!0,t[a.type.propertyName||l]=h)}}return o?t:null},n.prototype.getChildType=function(e){return e.type&&e.type.isDirective&&e.type.moduleName||""},n.prototype.getChildProps=function(e,t){for(var i=[],n=0,o=e;n<o.length;n++){var r=o[n],s=!1,a=void 0;"string"==typeof t?(s=!0,a=t):a=Object.keys(t)[0];var l=r.props;if(this.getChildType(r)===a)if(s||!l.children){var c=m({},l,{},!0);this.processComplexTemplate(c,r.type),i.push(c)}else{var h=this.validateChildren(m({},l),t[""+a],l)||l;h.children&&delete h.children,this.processComplexTemplate(h,r.type),i.push(h)}}return i},n.prototype.getInjectedServices=function(){for(var t=0,i=e.Children.toArray(this.props.children);t<i.length;t++){var n=i[t];if(n.type&&n.type.isService)return n.props.services}return[]},n.reactUid=1,n}(e.Component);var df=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}df(t,e),t.prototype.render=function(){return null},t.isDirective=!0}(e.PureComponent);var pf,uf=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uf(t,e),t.prototype.render=function(){return null},t.isService=!0,t}(e.PureComponent),gf=Ei.compile;pf={compile:function(i,n){return"string"==typeof i||i.prototype&&i.prototype.CSPTemplate&&"function"==typeof i?gf(i,n):function(n,o,r,s){var a,l=i,c=n;"object"==typeof l&&(l=i.template,c=m({},n,i.data||{})),a=s||document.createElement("div");var h=e.createElement(l,c),d=t.createPortal(h,a);if(d.propName=r,o.portals?o.portals.push(d):o.portals=[d],!s)return[a]}}},Ei.compile=pf.compile;var ff,yf=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vf=function(t){function i(e){var i=t.call(this,e)||this;return i.initRenderCalled=!1,i.checkInjectedModules=!0,i.statelessTemplateProps=["valueTemplate"],i.templateProps=null,i.immediateRender=!1,i.isReactMock=!0,i.portals=[],i}return yf(i,t),i.prototype.render=function(){if(this.isReactMock=!1,!(this.element&&!this.initRenderCalled||this.refreshing)||this.isReactForeceUpdate)return e.createElement("div",this.getDefaultAttributes(),[].concat(this.props.children,this.portals));t.prototype.render.call(this),this.initRenderCalled=!0},i}(rf);ff=vf,[hf,e.Component].forEach((function(e){Object.getOwnPropertyNames(e.prototype).forEach((function(t){"isMounted"!==t&&"replaceState"!==t&&"render"!==t&&(ff.prototype[""+t]=e.prototype[""+t])}))}));!function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("@import '@syncfusion/ej2-base/styles/material.css';\n@import '@syncfusion/ej2-icons/styles/material.css';\n@import '@syncfusion/ej2-buttons/styles/material.css';\n@import '@syncfusion/ej2-splitbuttons/styles/material.css';\n@import '@syncfusion/ej2-inputs/styles/material.css';\n@import '@syncfusion/ej2-lists/styles/material.css';\n@import '@syncfusion/ej2-navigations/styles/material.css';\n@import '@syncfusion/ej2-popups/styles/material.css';\n@import '@syncfusion/ej2-richtexteditor/styles/material.css';");var bf={items:["Bold","Italic","Underline","StrikeThrough","FontName","FontSize","FontColor","BackgroundColor","LowerCase","UpperCase","|","Formats","Alignments","OrderedList","UnorderedList","Outdent","Indent","|","CreateLink","|","ClearFormat","|"]},Mf=function(t){t.testId;var n=t.toolbarSettings,o=void 0===n?bf:n;t.height;var r=t.enableTabKey,s=void 0===r||r,a=t.enableHtmlSanitizer,l=void 0===a||a,c=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i}(t,["testId","toolbarSettings","height","enableTabKey","enableHtmlSanitizer"]),h=e.useRef(null);return e.createElement(vf,i({ref:h,tabIndex:0,height:450,enableTabKey:s,toolbarSettings:o,enableHtmlSanitizer:l},c),e.createElement(mf,{services:[Um,_m]}))};export{Mf as Richtext};