(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-libs"],{"00b4":function(e,t,n){"use strict";n("ac1f");var r=n("23e7"),i=n("861d"),o=function(){var e=!1,t=/[ac]/;return t.exec=function(){return e=!0,/./.exec.apply(this,arguments)},!0===t.test("abc")&&e}(),a=/./.test;r({target:"RegExp",proto:!0,forced:!o},{test:function(e){if("function"!==typeof this.exec)return a.call(this,e);var t=this.exec(e);if(null!==t&&!i(t))throw new Error("RegExp exec method returned something other than an Object or null");return!!t}})},"00ee":function(e,t,n){var r=n("b622"),i=r("toStringTag"),o={};o[i]="z",e.exports="[object z]"===String(o)},"010e":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict"; //! moment.js locale configuration var t=e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}});return t}))},"02fb":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict"; //! moment.js locale configuration var t=e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}});return t}))},"030f":function(e,t,n){(function(e){(function(){"use strict";var t=function(e){var t=typeof e;return null===e?"null":"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},n=function(e){return function(n){return t(n)===e}},r=function(e){return function(t){return typeof t===e}},i=function(e){return function(t){return e===t}},o=n("string"),a=n("object"),s=n("array"),u=i(null),c=r("boolean"),l=i(void 0),d=function(e){return null===e||void 0===e},f=function(e){return!d(e)},h=r("function"),p=r("number"),m=function(e,t){if(s(e)){for(var n=0,r=e.length;n-1},$=function(e,t){for(var n=0,r=e.length;n=0;n--){var r=e[n];t(r,n)}},G=function(e,t){for(var n=[],r=[],i=0,o=e.length;i=0&&t=t.length&&e.substr(n,n+t.length)===t},Be=function(e,t){return $e(e,t)?Ye(e,t.length):e},Fe=function(e,t){return Ve(e,t)?e:Re(e,t)},ze=function(e,t){return-1!==e.indexOf(t)},$e=function(e,t){return He(e,t,0)},Ve=function(e,t){return He(e,t,e.length-t.length)},We=function(e){return function(t){return t.replace(e,"")}},Ue=We(/^\s+|\s+$/g),qe=function(e){return e.length>0},Ke=function(e){return!qe(e)},Ge=function(e){return void 0!==e.style&&h(e.style.getPropertyValue)},Xe=function(e,t){var n=t||document,r=n.createElement("div");if(r.innerHTML=e,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Ze(r.childNodes[0])},Je=function(e,t){var n=t||document,r=n.createElement(e);return Ze(r)},Qe=function(e,t){var n=t||document,r=n.createTextNode(e);return Ze(r)},Ze=function(e){if(null===e||void 0===e)throw new Error("Node cannot be null or undefined");return{dom:e}},et=function(e,t,n){return N.from(e.dom.elementFromPoint(t,n)).map(Ze)},tt={fromHtml:Xe,fromTag:Je,fromText:Qe,fromDom:Ze,fromPoint:et};"undefined"!==typeof window?window:Function("return this;")();var nt,rt=9,it=11,ot=1,at=3,st=function(e){var t=e.dom.nodeName;return t.toLowerCase()},ut=function(e){return e.dom.nodeType},ct=function(e){return function(t){return ut(t)===e}},lt=ct(ot),dt=ct(at),ft=ct(rt),ht=ct(it),pt=function(e){var t,n=!1;return function(){for(var r=[],i=0;i0&&t0}))},er=function(e){var t={},n=e.dom;if(Ge(n))for(var r=0;rr?t-r:0;return i};return{set:n,get:r,getOuter:i,aggregate:o,max:a}},or=ir("height",(function(e){var t=e.dom;return Nn(e)?t.getBoundingClientRect().height:t.offsetHeight})),ar=function(e){return or.get(e)},sr=function(e){return or.getOuter(e)},ur=function(e,t){var n=["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"],r=or.max(e,t,n);Kn(e,"max-height",r+"px")},cr=function(e,t){var n=function(n,r){return cr(e+n,t+r)};return{left:e,top:t,translate:n}},lr=cr,dr=function(e){var t=e.getBoundingClientRect();return lr(t.left,t.top)},fr=function(e,t){return void 0!==e?e:void 0!==t?t:0},hr=function(e){var t=e.dom.ownerDocument,n=t.body,r=t.defaultView,i=t.documentElement;if(n===e.dom)return lr(n.offsetLeft,n.offsetTop);var o=fr(null===r||void 0===r?void 0:r.pageYOffset,i.scrollTop),a=fr(null===r||void 0===r?void 0:r.pageXOffset,i.scrollLeft),s=fr(i.clientTop,n.clientTop),u=fr(i.clientLeft,n.clientLeft);return pr(e).translate(a-u,o-s)},pr=function(e){var t=e.dom,n=t.ownerDocument,r=n.body;return r===t?lr(r.offsetLeft,r.offsetTop):Nn(e)?dr(t):lr(0,0)},mr=ir("width",(function(e){return e.dom.offsetWidth})),vr=function(e,t){return mr.set(e,t)},gr=function(e){return mr.get(e)},yr=function(e){return mr.getOuter(e)},br=function(e,t){var n=["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"],r=mr.max(e,t,n);Kn(e,"max-width",r+"px")},_r=function(e,t,n,r,i,o,a){return{target:e,x:t,y:n,stop:r,prevent:i,kill:o,raw:a}},wr=function(e){var t=tt.fromDom(jn(e).getOr(e.target)),n=function(){return e.stopPropagation()},r=function(){return e.preventDefault()},i=y(r,n);return _r(t,e.clientX,e.clientY,n,r,i,e)},xr=function(e,t){return function(n){e(n)&&t(wr(n))}},kr=function(e,t,n,r,i){var o=xr(n,r);return e.dom.addEventListener(t,o,i),{unbind:k(Mr,e,t,o,i)}},Sr=function(e,t,n,r){return kr(e,t,n,r,!1)},Cr=function(e,t,n,r){return kr(e,t,n,r,!0)},Mr=function(e,t,n,r){e.dom.removeEventListener(t,n,r)},Tr=function(e,t){var n=gn(e);n.each((function(n){n.dom.insertBefore(t.dom,e.dom)}))},Or=function(e,t){var n=_n(e);n.fold((function(){var n=gn(e);n.each((function(e){Lr(e,t)}))}),(function(e){Tr(e,t)}))},Dr=function(e,t){var n=kn(e);n.fold((function(){Lr(e,t)}),(function(n){e.dom.insertBefore(t.dom,n.dom)}))},Lr=function(e,t){e.dom.appendChild(t.dom)},Er=function(e,t,n){xn(e,n).fold((function(){Lr(e,t)}),(function(e){Tr(e,t)}))},Pr=function(e,t){q(t,(function(t){Tr(e,t)}))},Ar=function(e,t){q(t,(function(t){Lr(e,t)}))},jr=function(e){e.dom.textContent="",q(wn(e),(function(e){Ir(e)}))},Ir=function(e){var t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Nr=function(e){var t=wn(e);t.length>0&&Pr(e,t),Ir(e)},Rr=function(e){var t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return lr(n,r)},Yr=function(e,t,n){var r=void 0!==n?n.dom:document,i=r.defaultView;i&&i.scrollTo(e,t)},Hr=function(e){var t=void 0===e?window:e;return tn().browser.isFirefox()?N.none():N.from(t["visualViewport"])},Br=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Fr=function(e){var t=void 0===e?window:e,n=t.document,r=Rr(tt.fromDom(n));return Hr(t).fold((function(){var e=t.document.documentElement,n=e.clientWidth,i=e.clientHeight;return Br(r.left,r.top,n,i)}),(function(e){return Br(Math.max(e.pageLeft,r.left),Math.max(e.pageTop,r.top),e.width,e.height)}))},zr=function(e,t){var n=e.view(t);return n.fold(_([]),(function(t){var n=e.owner(t),r=zr(e,n);return[t].concat(r)}))},$r=function(e,t){var n=t.owner(e),r=zr(t,n);return N.some(r)},Vr=function(e){var t,n=e.dom===document?N.none():N.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement);return n.map(tt.fromDom)},Wr=function(e){return hn(e)},Ur=Object.freeze({__proto__:null,view:Vr,owner:Wr}),qr=function(e){var t=tt.fromDom(document),n=Rr(t),r=$r(e,Ur);return r.fold(k(hr,e),(function(t){var r=pr(e),i=J(t,(function(e,t){var n=pr(t);return{left:e.left+n.left,top:e.top+n.top}}),{left:0,top:0});return lr(i.left+r.left+n.left,i.top+r.top+n.top)}))},Kr=function(e,t,n){return{point:e,width:t,height:n}},Gr=function(e,t,n,r){return{x:e,y:t,width:n,height:r}},Xr=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Jr=function(e){var t=hr(e),n=yr(e),r=sr(e);return Xr(t.left,t.top,n,r)},Qr=function(e){var t=qr(e),n=yr(e),r=sr(e);return Xr(t.left,t.top,n,r)},Zr=function(){return Fr(window)},ei=function(e){var t=function(t){return ei(e)},n=function(t){return ei(e)},r=function(t){return ei(t(e))},i=function(t){return ei(e)},o=function(t){t(e)},a=function(t){return t(e)},s=function(t,n){return n(e)},u=function(t){return t(e)},c=function(t){return t(e)},l=function(){return N.some(e)};return{isValue:T,isError:M,getOr:_(e),getOrThunk:_(e),getOrDie:_(e),or:t,orThunk:n,fold:s,map:r,mapError:i,each:o,bind:a,exists:u,forall:c,toOptional:l}},ti=function(e){var t=function(e){return e()},n=function(){return C(String(e))()},r=w,i=function(e){return e()},o=function(t){return ti(e)},a=function(t){return ti(t(e))},s=function(t){return ti(e)},u=function(t,n){return t(e)};return{isValue:M,isError:T,getOr:w,getOrThunk:t,getOrDie:n,or:r,orThunk:i,fold:u,map:o,mapError:a,each:v,bind:s,exists:M,forall:T,toOptional:N.none}},ni=function(e,t){return e.fold((function(){return ti(t)}),ei)},ri={value:ei,error:ti,fromOption:ni};(function(e){e[e["Error"]=0]="Error",e[e["Value"]=1]="Value"})(nt||(nt={}));var ii=function(e,t,n){return e.stype===nt.Error?t(e.serror):n(e.svalue)},oi=function(e){var t=[],n=[];return q(e,(function(e){ii(e,(function(e){return n.push(e)}),(function(e){return t.push(e)}))})),{values:t,errors:n}},ai=function(e,t){return e.stype===nt.Error?{stype:nt.Error,serror:t(e.serror)}:e},si=function(e,t){return e.stype===nt.Value?{stype:nt.Value,svalue:t(e.svalue)}:e},ui=function(e,t){return e.stype===nt.Value?t(e.svalue):e},ci=function(e,t){return e.stype===nt.Error?t(e.serror):e},li=function(e){return{stype:nt.Value,svalue:e}},di=function(e){return{stype:nt.Error,serror:e}},fi=function(e){return ii(e,ri.error,ri.value)},hi=function(e){return e.fold(di,li)},pi={fromResult:hi,toResult:fi,svalue:li,partition:oi,serror:di,bind:ui,bindError:ci,map:si,mapError:ai,fold:ii},mi=function(e,t,n,r){return{tag:"field",key:e,newKey:t,presence:n,prop:r}},vi=function(e,t){return{tag:"custom",newKey:e,instantiator:t}},gi=function(e,t,n){switch(e.tag){case"field":return t(e.key,e.newKey,e.presence,e.prop);case"custom":return n(e.newKey,e.instantiator)}},yi=function(e,t){return t},bi=function(e,t){var n=a(e)&&a(t);return n?wi(e,t):t},_i=function(e){return function(){for(var t=[],n=0;n0?pi.svalue(wi(t,xi.apply(void 0,e))):pi.svalue(t)},Li=function(e){return y(pi.serror,ne)(e)},Ei=function(e,t){var n=pi.partition(e);return n.errors.length>0?Li(n.errors):Di(n.values,t)},Pi=function(e){var t=pi.partition(e);return t.errors.length>0?Li(t.errors):pi.svalue(t.values)},Ai={consolidateObj:Ei,consolidateArr:Pi},ji=function(e){return a(e)&&me(e).length>100?" removed due to size":JSON.stringify(e,null,2)},Ii=function(e){var t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:_("... (only showing first ten failures)")}]):e;return U(t,(function(e){return"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()}))},Ni=function(e,t){return pi.serror([{path:e,getErrorInfo:t}])},Ri=function(e,t,n){return Ni(e,(function(){return'Could not find valid *required* value for "'+t+'" in '+ji(n)}))},Yi=function(e,t){return Ni(e,(function(){return'Choice schema did not contain choice key: "'+t+'"'}))},Hi=function(e,t,n){return Ni(e,(function(){return'The chosen schema: "'+n+'" did not exist in branches: '+ji(t)}))},Bi=function(e,t){return Ni(e,(function(){return"There are unsupported fields: ["+t.join(", ")+"] specified"}))},Fi=function(e,t){return Ni(e,_(t))},zi=function(e){var t=function(t,n){return pi.bindError(e(n),(function(e){return Fi(t,e)}))},n=_("val");return{extract:t,toString:n}},$i=zi(pi.svalue),Vi=function(e,t,n,r){return Me(t,n).fold((function(){return Ri(e,n,t)}),r)},Wi=function(e,t,n,r){var i=Me(e,t).getOrThunk((function(){return n(e)}));return r(i)},Ui=function(e,t,n){return n(Me(e,t))},qi=function(e,t,n,r){var i=Me(e,t).map((function(t){return!0===t?n(e):t}));return r(i)},Ki=function(e,t,n,r,i){var o=function(e){return i.extract(t.concat([r]),e)},a=function(e){return e.fold((function(){return pi.svalue(N.none())}),(function(e){var n=i.extract(t.concat([r]),e);return pi.map(n,N.some)}))};switch(e.tag){case"required":return Vi(t,n,r,o);case"defaultedThunk":return Wi(n,r,e.process,o);case"option":return Ui(n,r,a);case"defaultedOptionThunk":return qi(n,r,e.process,a);case"mergeWithThunk":return Wi(n,r,_({}),(function(t){var r=wi(e.process(n),t);return o(r)}))}},Gi=function(e,t,n){for(var r={},i=[],o=0,a=n;o0?pi.serror(i):pi.svalue(r)},Xi=function(e){var t=function(t,n){return e().extract(t,n)},n=function(){return e().toString()};return{extract:t,toString:n}},Ji=function(e){return me(xe(e,f))},Qi=function(e){var t=Zi(e),n=J(e,(function(e,t){return gi(t,(function(t){var n;return wi(e,(n={},n[t]=!0,n))}),_(e))}),{}),r=function(e,r){var i=c(r)?[]:Ji(r),o=X(i,(function(e){return!Oe(n,e)}));return 0===o.length?t.extract(e,r):Bi(e,o)};return{extract:r,toString:t.toString}},Zi=function(e){var t=function(t,n){return Gi(t,n,e)},n=function(){var t=U(e,(function(e){return gi(e,(function(e,t,n,r){return e+" -> "+r.toString()}),(function(e,t){return"state("+e+")"}))}));return"obj{\n"+t.join("\n")+"}"};return{extract:t,toString:n}},eo=function(e){var t=function(t,n){var r=U(n,(function(n,r){return e.extract(t.concat(["["+r+"]"]),n)}));return Ai.consolidateArr(r)},n=function(){return"array("+e.toString()+")"};return{extract:t,toString:n}},to=function(e){var t=function(t,n){for(var r=[],i=0,o=e;i0?va(n.errors):ma(n.values,t)},ya=function(e){return h(e)?e:M},ba=function(e,t,n){var r=e.dom,i=ya(n);while(r.parentNode){r=r.parentNode;var o=tt.fromDom(r),a=t(o);if(a.isSome())return a;if(i(o))break}return N.none()},_a=function(e,t,n){var r=t(e),i=ya(n);return r.orThunk((function(){return i(e)?N.none():ba(e,t,i)}))},wa=function(e,t){return cn(e.element,t.event.target)},xa={can:T,abort:M,run:v},ka=function(e){if(!Oe(e,"can")&&!Oe(e,"abort")&&!Oe(e,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(e,null,2)+" does not have can, abort, or run!");return D(D({},xa),e)},Sa=function(e,t){return function(){for(var n=[],r=0;r1?X(t[n],(function(t){return $(e,(function(e){return e.name===t}))})).join(" > "):e[0].name;return ha(n,ju(i,o))}))}));return ga(n,{})},Uu="alloy.base.behaviour",qu=Zi([Mo("dom","dom",ki(),Zi([Do("tag"),Ko("styles",{}),Ko("classes",[]),Ko("attributes",{}),Bo("value"),Bo("innerHtml")])),Do("components"),Do("uid"),Ko("events",{}),Ko("apis",{}),Mo("eventOrder","eventOrder",Oi((sa={},sa[ts()]=["disabling",Uu,"toggling","typeaheadevents"],sa[Ja()]=[Uu,"focusing","keying"],sa[ss()]=[Uu,"disabling","toggling","representing"],sa[za()]=[Uu,"representing","streaming","invalidating"],sa[hs()]=[Uu,"representing","item-events","tooltipping"],sa[Aa()]=["focusing",Uu,"item-type-events"],sa[Da()]=["focusing",Uu,"item-type-events"],sa[Ra()]=["item-type-events","tooltipping"],sa[es()]=["receiving","reflecting","tooltipping"],sa)),oo()),Bo("domModification")]),Ku=function(e){return _o("custom.definition",qu,e)},Gu=function(e){return D(D({},e.dom),{uid:e.uid,domChildren:U(e.components,(function(e){return e.element}))})},Xu=function(e){return e.domModification.fold((function(){return Lu({})}),Lu)},Ju=function(e){return e.events},Qu=function(e,t){var n=zn(e,t);return void 0===n||""===n?[]:n.split(" ")},Zu=function(e,t,n){var r=Qu(e,t),i=r.concat([n]);return Bn(e,t,i.join(" ")),!0},ec=function(e,t,n){var r=X(Qu(e,t),(function(e){return e!==n}));return r.length>0?Bn(e,t,r.join(" ")):Wn(e,t),!1},tc=function(e){return void 0!==e.dom.classList},nc=function(e){return Qu(e,"class")},rc=function(e,t){return Zu(e,"class",t)},ic=function(e,t){return ec(e,"class",t)},oc=function(e,t){tc(e)?e.dom.classList.add(t):rc(e,t)},ac=function(e){var t=tc(e)?e.dom.classList:nc(e);0===t.length&&Wn(e,"class")},sc=function(e,t){if(tc(e)){var n=e.dom.classList;n.remove(t)}else ic(e,t);ac(e)},uc=function(e,t){return tc(e)&&e.dom.classList.contains(t)},cc=function(e,t){q(t,(function(t){oc(e,t)}))},lc=function(e,t){q(t,(function(t){sc(e,t)}))},dc=function(e,t){return ie(t,(function(t){return uc(e,t)}))},fc=function(e){return e.dom.value},hc=function(e,t){if(void 0===t)throw new Error("Value.set was undefined");e.dom.value=t},pc=function(e){var t=tt.fromTag(e.tag);Fn(t,e.attributes),cc(t,e.classes),Gn(t,e.styles),e.innerHtml.each((function(e){return Ks(t,e)}));var n=e.domChildren;return Ar(t,n),e.value.each((function(e){hc(t,e)})),e.uid,lu(t,e.uid),t},mc=function(e){var t=Me(e,"behaviours").getOr({});return re(me(t),(function(e){var n=t[e];return f(n)?[n.me]:[]}))},vc=function(e,t){return Mu(e,t)},gc=function(e){var t=mc(e);return vc(e,t)},yc=function(e,t,n){var r=Gu(e),i=Xu(e),o={"alloy.base.modification":i},a=t.length>0?Pu(n,o,t,r):i;return Eu(r,a)},bc=function(e,t,n){var r={"alloy.base.behaviour":Ju(e)};return Fu(n,e.eventOrder,t,r).getOrDie()},_c=function(e){var t=function(){return b},n=ia(mu),r=wo(Ku(e)),i=gc(e),o=Tu(i),a=Ou(i),s=yc(r,o,a),u=pc(s),c=bc(r,o,a),l=ia(r.components),d=function(e){n.set(e)},f=function(){n.set(pu(t))},p=function(){var e=wn(u),t=re(e,(function(e){return n.get().getByDom(e).fold((function(){return[]}),ue)}));l.set(t)},m=function(t){var n=a,r=h(n[t.name()])?n[t.name()]:function(){throw new Error("Could not find "+t.name()+" in "+JSON.stringify(e,null,2))};return r()},v=function(e){return h(a[e.name()])},g=function(){return r.apis},y=function(e){return a[e]().map((function(e){return e.state.readState()})).getOr("not enabled")},b={uid:e.uid,getSystem:n.get,config:m,hasConfigured:v,spec:e,readState:y,getApis:g,connect:d,disconnect:f,element:u,syncComponents:p,components:l.get,events:c};return b},wc=function(e){var t=Me(e,"components").getOr([]);return U(t,Tc)},xc=function(e){var t=hu(e),n=t.events,r=L(t,["events"]),i=wc(r),o=D(D({},r),{events:D(D({},nu),n),components:i});return ri.value(_c(o))},kc=function(e){var t=tt.fromText(e);return Sc({element:t})},Sc=function(e){var t=xo("external.component",Qi([Do("element"),Bo("uid")]),e),n=ia(pu()),r=function(e){n.set(e)},i=function(){n.set(pu((function(){return a})))},o=t.uid.getOrThunk((function(){return fu("external")}));lu(t.element,o);var a={uid:o,getSystem:n.get,config:N.none,hasConfigured:M,connect:r,disconnect:i,getApis:function(){return{}},element:t.element,spec:e,readState:_("No state"),syncComponents:v,components:_([]),events:{}};return wu(a)},Cc=fu,Mc=function(e){return Te(e,"uid")},Tc=function(e){return xu(e).getOrThunk((function(){var t=Mc(e)?e:D({uid:Cc("")},e);return xc(t).getOrDie()}))},Oc=wu;function Dc(e,t,n,r,i){return e(n,r)?N.some(n):h(i)&&i(n)?N.none():t(n,r,i)}var Lc,Ec=function(e,t,n){var r=e.dom,i=h(n)?n:M;while(r.parentNode){r=r.parentNode;var o=tt.fromDom(r);if(t(o))return N.some(o);if(i(o))break}return N.none()},Pc=function(e,t,n){var r=function(e,t){return t(e)};return Dc(r,Ec,e,t,n)},Ac=function(e,t){var n=function(e){return t(tt.fromDom(e))},r=ee(e.dom.childNodes,n);return r.map(tt.fromDom)},jc=function(e,t){var n=function(e){for(var r=0;r-1}));return t.bind((function(e){var t=zn(e,"id"),n=Dn(e);return Yc(n,'[aria-owns="'+t+'"]')}))},Fc=function(){var e=iu("aria-owns"),t=function(t){Bn(t,"aria-owns",e)},n=function(e){Wn(e,"aria-owns")};return{id:e,link:t,unlink:n}},zc=function(e,t){return Bc(t).exists((function(t){return $c(e,t)}))},$c=function(e,t){return Ic(t,(function(t){return cn(t,e.element)}),M)||zc(e,t)},Vc="unknown";(function(e){e[e["STOP"]=0]="STOP",e[e["NORMAL"]=1]="NORMAL",e[e["LOGGING"]=2]="LOGGING"})(Lc||(Lc={}));var Wc=ia({}),Uc=function(e,t){var n=[],r=(new Date).getTime();return{logEventCut:function(e,t,r){n.push({outcome:"cut",target:t,purpose:r})},logEventStopped:function(e,t,r){n.push({outcome:"stopped",target:t,purpose:r})},logNoParent:function(e,t,r){n.push({outcome:"no-parent",target:t,purpose:r})},logEventNoHandlers:function(e,t){n.push({outcome:"no-handlers-left",target:t})},logEventResponse:function(e,t,r){n.push({outcome:"response",purpose:r,target:t})},write:function(){var i=(new Date).getTime();z(["mousemove","mouseover","mouseout",ss()],e)||console.log(e,{event:e,time:i-r,target:t.dom,sequence:U(n,(function(e){return z(["cut","stopped","response"],e.outcome)?"{"+e.purpose+"} "+e.outcome+" at ("+Zs(e.target)+")":e.outcome}))})}}},qc=function(e,t,n){var r=Me(Wc.get(),e).orThunk((function(){var t=me(Wc.get());return pe(t,(function(t){return e.indexOf(t)>-1?N.some(Wc.get()[t]):N.none()}))})).getOr(Lc.NORMAL);switch(r){case Lc.NORMAL:return n(Qc());case Lc.LOGGING:var i=Uc(e,t),o=n(i);return i.write(),o;case Lc.STOP:return!0}},Kc=["alloy/data/Fields","alloy/debugging/Debugging"],Gc=function(){var e=new Error;if(void 0!==e.stack){var t=e.stack.split("\n");return ee(t,(function(e){return e.indexOf("alloy")>0&&!$(Kc,(function(t){return e.indexOf(t)>-1}))})).getOr(Vc)}return Vc},Xc={logEventCut:v,logEventStopped:v,logNoParent:v,logEventNoHandlers:v,logEventResponse:v,write:v},Jc=function(e,t,n){return qc(e,t,n)},Qc=_(Xc),Zc=_([Do("menu"),Do("selectedMenu")]),el=_([Do("item"),Do("selectedItem")]);_(Zi(el().concat(Zc())));var tl=_(Zi(el())),nl=Ro("initSize",[Do("numColumns"),Do("numRows")]),rl=function(){return Lo("markers",tl())},il=function(){return Ro("markers",[Do("backgroundMenu")].concat(Zc()).concat(el()))},ol=function(e){return Ro("markers",U(e,Do))},al=function(e,t,n){return Gc(),Mo(t,t,n,go((function(e){return ri.value((function(){for(var t=[],n=0;nr?n:i=n&&a<=i,h=s>=r&&s<=o,p=f&&h,m=u<=i&&u>=n,v=c<=o&&c>=r,g=m&&v,y=Math.min(l,a>=n?i-a:u-n),b=Math.min(d,s>=r?o-s:c-r);return{originInBounds:p,sizeInBounds:g,visibleW:y,visibleH:b}},Gd=function(e,t){var n=t.x,r=t.y,i=t.right,o=t.bottom,a=e.x,s=e.y,u=e.width,c=e.height,l=Math.max(n,i-u),d=Math.max(r,o-c),f=Ol(a,n,l),h=Ol(s,r,d),p=Math.min(f+u,i)-f,m=Math.min(h+c,o)-h;return Xr(f,h,p,m)},Xd=function(e,t,n){var r=_(t.bottom-n.y),i=_(n.bottom-t.y),o=gl(e,i,i,r),a=_(t.right-n.x),s=_(n.right-t.x),u=yl(e,s,s,a);return{maxWidth:u,maxHeight:o}},Jd=function(e,t,n,r){var i=e.bubble,o=i.offset,a=El(r,e.restriction,o),s=e.x+o.left,u=e.y+o.top,c=Xr(s,u,t,n),l=Kd(c,a),d=l.originInBounds,f=l.sizeInBounds,h=l.visibleW,p=l.visibleH,m=d&&f,v=m?c:Gd(c,a),g=v.width>0&&v.height>0,y=Xd(e.direction,v,r),b=y.maxWidth,_=y.maxHeight,w={rect:v,maxHeight:_,maxWidth:b,direction:e.direction,placement:e.placement,classes:{on:i.classesOn,off:i.classesOff},layout:e.label,testY:u};return m||e.alwaysFit?qd.fit(w):qd.nofit(w,h,p,g)},Qd=function(e,t,n,r,i,o){var a=r.width,s=r.height,u=function(t,u,c,l,d){var f=t(n,r,i,e,o),h=Jd(f,a,s,o);return h.fold(_(h),(function(e,t,n,r){var i=d===r?n>l||t>c:!d&&r;return i?h:qd.nofit(u,c,l,d)}))},c=Q(t,(function(e,t){var n=k(u,t);return e.fold(_(e),n)}),qd.nofit({rect:n,maxHeight:r.height,maxWidth:r.width,direction:bl(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:n.y},-1,-1,!1));return c.fold(w,w)},Zd=function(e){var t=ia(N.none()),n=function(){return t.get().each(e)},r=function(){n(),t.set(N.none())},i=function(){return t.get().isSome()},o=function(){return t.get()},a=function(e){n(),t.set(N.some(e))};return{clear:r,isSet:i,get:o,set:a}},ef=function(){return Zd((function(e){return e.destroy()}))},tf=function(){return Zd((function(e){return e.unbind()}))},nf=function(){var e=ef(),t=function(t){return e.get().each(t)};return D(D({},e),{run:t})},rf=function(){var e=Zd(v),t=function(t){return e.get().each(t)};return D(D({},e),{on:t})},of=T,af=function(e,t,n){return Sr(e,t,of,n)},sf=function(e,t,n){return Cr(e,t,of,n)},uf=wr,cf=["top","bottom","right","left"],lf="data-alloy-transition-timer",df=function(e,t){return dc(e,t.classes)},ff=function(e,t,n){return n.exists((function(n){var r=e.mode;return"all"===r||n[r]!==t[r]}))},hf=function(e,t){var n=function(e){return parseFloat(e).toFixed(3)};return Se(t,(function(t,r){var i=e[r].map(n),o=t.map(n);return!Le(i,o)})).isSome()},pf=function(e){var t=function(t){var n=Jn(e,t),r=o(n)?n.split(/\s*,\s*/):[];return X(r,qe)},n=function(e){if(o(e)&&/^[\d.]+/.test(e)){var t=parseFloat(e);return Ve(e,"ms")?t:1e3*t}return 0},r=t("transition-delay"),i=t("transition-duration");return Q(i,(function(e,t,i){var o=n(r[i])+n(t);return Math.max(e,o)}),0)},mf=function(e,t){var n,r=tf(),i=tf(),o=function(t){var n,r=null!==(n=t.raw.pseudoElement)&&void 0!==n?n:"";return cn(t.target,e)&&Ke(r)&&z(cf,t.raw.propertyName)},a=function(a){if(d(a)||o(a)){r.clear(),i.clear();var s=null===a||void 0===a?void 0:a.raw.type;(d(s)||s===Ua())&&(clearTimeout(n),Wn(e,lf),lc(e,t.classes))}},s=function(){r.set(af(e,Ua(),a)),i.set(af(e,Wa(),a))};if("ontransitionstart"in e.dom)var u=af(e,qa(),(function(e){o(e)&&(u.unbind(),s())}));else s();var c=pf(e);requestAnimationFrame((function(){n=setTimeout(a,c+17),Bn(e,lf,n)}))},vf=function(e,t){cc(e,t.classes),$n(e,lf).each((function(t){clearTimeout(parseInt(t,10)),Wn(e,lf)})),mf(e,t)},gf=function(e,t,n,r,i,o){var a=ff(r,i,o);if(a||df(e,r)){Kn(e,"position",n.position);var s=jd(t,e),u=Ad(t,D(D({},i),{rect:s})),c=se(cf,(function(e){return u[e]}));hf(n,c)&&(Xn(e,c),a&&vf(e,r),rr(e))}else lc(e,r.classes)},yf=function(e){return{width:yr(e),height:sr(e)}},bf=function(e,t,n,r){nr(t,"max-height"),nr(t,"max-width");var i=yf(t);return Qd(t,r.preference,e,i,n,r.bounds)},_f=function(e,t){var n=t.classes;lc(e,n.off),cc(e,n.on)},wf=function(e,t,n){var r=n.maxHeightFunction;r(e,t.maxHeight)},xf=function(e,t,n){var r=n.maxWidthFunction;r(e,t.maxWidth)},kf=function(e,t,n){var r=Ad(n.origin,t);n.transition.each((function(i){gf(e,n.origin,r,i,t,n.lastPlacement)})),Ld(e,r)},Sf=function(e,t){Vd(e,t.placement)},Cf=function(e,t){ur(e,Math.floor(t))},Mf=_((function(e,t){Cf(e,t),Gn(e,{"overflow-x":"hidden","overflow-y":"auto"})})),Tf=_((function(e,t){Cf(e,t)})),Of=function(e,t,n){return void 0===e[t]?n:e[t]},Df=function(e,t,n,r,i,o,a,s){var u=Of(a,"maxHeightFunction",Mf()),c=Of(a,"maxWidthFunction",v),l=e.anchorBox,d=e.origin,f={bounds:Id(d,o),origin:d,preference:r,maxHeightFunction:u,maxWidthFunction:c,lastPlacement:i,transition:s};return Lf(l,t,n,f)},Lf=function(e,t,n,r){var i=bf(e,t,n,r);return kf(t,i,r),Sf(t,i),_f(t,i),wf(t,i,r),xf(t,i,r),{layout:i.layout,placement:i.placement}},Ef=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],Pf=function(e,t,n,r){void 0===r&&(r=1);var i=e*r,o=t*r,a=function(e){return Me(n,e).getOr([])},s=function(e,t,n){var r=ae(Ef,n);return{offset:lr(e,t),classesOn:re(n,a),classesOff:re(r,a)}};return{southeast:function(){return s(-e,t,["top","alignLeft"])},southwest:function(){return s(e,t,["top","alignRight"])},south:function(){return s(-e/2,t,["top","alignCentre"])},northeast:function(){return s(-e,-t,["bottom","alignLeft"])},northwest:function(){return s(e,-t,["bottom","alignRight"])},north:function(){return s(-e/2,-t,["bottom","alignCentre"])},east:function(){return s(e,-t/2,["valignCentre","left"])},west:function(){return s(-e,-t/2,["valignCentre","right"])},insetNortheast:function(){return s(i,o,["top","alignLeft","inset"])},insetNorthwest:function(){return s(-i,o,["top","alignRight","inset"])},insetNorth:function(){return s(-i/2,o,["top","alignCentre","inset"])},insetSoutheast:function(){return s(i,-o,["bottom","alignLeft","inset"])},insetSouthwest:function(){return s(-i,-o,["bottom","alignRight","inset"])},insetSouth:function(){return s(-i/2,-o,["bottom","alignCentre","inset"])},insetEast:function(){return s(-i,-o/2,["valignCentre","right","inset"])},insetWest:function(){return s(i,-o/2,["valignCentre","left","inset"])}}},Af=function(){return Pf(0,0,{})},jf=w,If=function(e,t){return function(n){return"rtl"===Nf(n)?t:e}},Nf=function(e){return"rtl"===Jn(e,"direction")?"rtl":"ltr"};(function(e){e["TopToBottom"]="toptobottom",e["BottomToTop"]="bottomtotop"})(Yd||(Yd={}));var Rf="data-alloy-vertical-dir",Yf=function(e){return Ic(e,(function(e){return lt(e)&&zn(e,"data-alloy-vertical-dir")===Yd.BottomToTop}))},Hf=function(){return Uo("layouts",[Do("onLtr"),Do("onRtl"),Bo("onBottomLtr"),Bo("onBottomRtl")])},Bf=function(e,t,n,r,i,o,a){var s=a.map(Yf).getOr(!1),u=t.layouts.map((function(t){return t.onLtr(e)})),c=t.layouts.map((function(t){return t.onRtl(e)})),l=s?t.layouts.bind((function(t){return t.onBottomLtr.map((function(t){return t(e)}))})).or(u).getOr(i):u.getOr(n),d=s?t.layouts.bind((function(t){return t.onBottomRtl.map((function(t){return t(e)}))})).or(c).getOr(o):c.getOr(r),f=If(l,d);return f(e)},Ff=function(e,t,n){var r=t.hotspot,i=jd(n,r.element),o=Bf(e.element,t,Zl(),ed(),Jl(),Ql(),N.some(t.hotspot.element));return N.some(jf({anchorBox:i,bubble:t.bubble.getOr(Af()),overrides:t.overrides,layouts:o,placer:N.none()}))},zf=[Do("hotspot"),Bo("bubble"),Ko("overrides",{}),Hf(),dl("placement",Ff)],$f=function(e,t,n){var r=Nd(n,t.x,t.y),i=Xr(r.left,r.top,t.width,t.height),o=Bf(e.element,t,Gl(),Xl(),Gl(),Xl(),N.none());return N.some(jf({anchorBox:i,bubble:t.bubble,overrides:t.overrides,layouts:o,placer:N.none()}))},Vf=[Do("x"),Do("y"),Ko("height",0),Ko("width",0),Ko("bubble",Af()),Ko("overrides",{}),Hf(),dl("placement",$f)],Wf=aa.generate([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),Uf=function(e){return e.fold(w,(function(e,t,n){return e.translate(-t,-n)}))},qf=function(e){return e.fold(w,w)},Kf=function(e){return Q(e,(function(e,t){return e.translate(t.left,t.top)}),lr(0,0))},Gf=function(e){var t=U(e,Uf);return Kf(t)},Xf=function(e){var t=U(e,qf);return Kf(t)},Jf=Wf.screen,Qf=Wf.absolute,Zf=function(e,t,n){var r=vn(n.root).dom,i=function(t){var n=hn(t),r=hn(e.element);return cn(n,r)};return N.from(r.frameElement).map(tt.fromDom).filter(i).map(hr)},eh=function(e,t,n){var r=hn(e.element),i=Rr(r),o=Zf(e,t,n).getOr(i);return Qf(o,i.left,i.top)},th=function(e,t,n,r){var i=Jf(lr(e,t));return N.some(Kr(i,n,r))},nh=function(e,t,n,r,i){return e.map((function(e){var o=[t,e.point],a=Rd(r,(function(){return Xf(o)}),(function(){return Xf(o)}),(function(){return Gf(o)})),s=Gr(a.left,a.top,e.width,e.height),u=n.showAbove?Jl():Zl(),c=n.showAbove?Ql():ed(),l=Bf(i,n,u,c,u,c,N.none());return jf({anchorBox:s,bubble:n.bubble.getOr(Af()),overrides:n.overrides,layouts:l,placer:N.none()})}))},rh=function(e,t,n){var r=eh(e,n,t);return t.node.filter(Nn).bind((function(i){var o=i.dom.getBoundingClientRect(),a=th(o.left,o.top,o.width,o.height),s=t.node.getOr(e.element);return nh(a,r,t,n,s)}))},ih=[Do("node"),Do("root"),Bo("bubble"),Hf(),Ko("overrides",{}),Ko("showAbove",!1),dl("placement",rh)],oh="\ufeff",ah=" ",sh=function(e,t,n,r){return{start:e,soffset:t,finish:n,foffset:r}},uh={create:sh},ch=aa.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),lh=function(e,t,n,r){return e.fold(t,n,r)},dh=function(e){return e.fold(w,w,w)},fh=ch.before,hh=ch.on,ph=ch.after,mh={before:fh,on:hh,after:ph,cata:lh,getStart:dh},vh=aa.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),gh=function(e){return vh.exact(e.start,e.soffset,e.finish,e.foffset)},yh=function(e){return e.match({domRange:function(e){return tt.fromDom(e.startContainer)},relative:function(e,t){return mh.getStart(e)},exact:function(e,t,n,r){return e}})},bh=vh.domRange,_h=vh.relative,wh=vh.exact,xh=function(e){var t=yh(e);return vn(t)},kh=uh.create,Sh={domRange:bh,relative:_h,exact:wh,exactFromRange:gh,getWin:xh,range:kh},Ch=function(e,t){t.fold((function(t){e.setStartBefore(t.dom)}),(function(t,n){e.setStart(t.dom,n)}),(function(t){e.setStartAfter(t.dom)}))},Mh=function(e,t){t.fold((function(t){e.setEndBefore(t.dom)}),(function(t,n){e.setEnd(t.dom,n)}),(function(t){e.setEndAfter(t.dom)}))},Th=function(e,t,n){var r=e.document.createRange();return Ch(r,t),Mh(r,n),r},Oh=function(e,t,n,r,i){var o=e.document.createRange();return o.setStart(t.dom,n),o.setEnd(r.dom,i),o},Dh=function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},Lh=function(e){var t=e.getClientRects(),n=t.length>0?t[0]:e.getBoundingClientRect();return n.width>0||n.height>0?N.some(n).map(Dh):N.none()},Eh=function(e){var t=e.getBoundingClientRect();return t.width>0||t.height>0?N.some(t).map(Dh):N.none()},Ph=aa.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Ah=function(e,t,n){return t(tt.fromDom(n.startContainer),n.startOffset,tt.fromDom(n.endContainer),n.endOffset)},jh=function(e,t){return t.match({domRange:function(e){return{ltr:_(e),rtl:N.none}},relative:function(t,n){return{ltr:pt((function(){return Th(e,t,n)})),rtl:pt((function(){return N.some(Th(e,n,t))}))}},exact:function(t,n,r,i){return{ltr:pt((function(){return Oh(e,t,n,r,i)})),rtl:pt((function(){return N.some(Oh(e,r,i,t,n))}))}}})},Ih=function(e,t){var n=t.ltr();if(n.collapsed){var r=t.rtl().filter((function(e){return!1===e.collapsed}));return r.map((function(e){return Ph.rtl(tt.fromDom(e.endContainer),e.endOffset,tt.fromDom(e.startContainer),e.startOffset)})).getOrThunk((function(){return Ah(e,Ph.ltr,n)}))}return Ah(e,Ph.ltr,n)},Nh=function(e,t){var n=jh(e,t);return Ih(e,n)},Rh=function(e,t){var n=Nh(e,t);return n.match({ltr:function(t,n,r,i){var o=e.document.createRange();return o.setStart(t.dom,n),o.setEnd(r.dom,i),o},rtl:function(t,n,r,i){var o=e.document.createRange();return o.setStart(r.dom,i),o.setEnd(t.dom,n),o}})};Ph.ltr,Ph.rtl;var Yh,Hh=function(e,t){var n=function(n){if(!e(n))throw new Error("Can only get "+t+" value of a "+t+" node");return r(n).getOr("")},r=function(t){return e(t)?N.from(t.dom.nodeValue):N.none()},i=function(n,r){if(!e(n))throw new Error("Can only set raw "+t+" value of a "+t+" node");n.dom.nodeValue=r};return{get:n,getOption:r,set:i}},Bh=Hh(dt,"text"),Fh=function(e){return Bh.get(e)},zh=function(e){return Bh.getOption(e)},$h=function(e){return"img"===st(e)?1:zh(e).fold((function(){return wn(e).length}),(function(e){return e.length}))},Vh=function(e){return zh(e).filter((function(e){return 0!==e.trim().length||e.indexOf(ah)>-1})).isSome()},Wh=["img","br"],Uh=function(e){var t=Vh(e);return t||z(Wh,st(e))},qh=function(e){return Kh(e,Uh)},Kh=function(e,t){var n=function(e){for(var r=wn(e),i=r.length-1;i>=0;i--){var o=r[i];if(t(o))return N.some(o);var a=n(o);if(a.isSome())return a}return N.none()};return n(e)},Gh=function(e,t){return sn(t,e)},Xh=function(e,t,n,r){var i=hn(e),o=i.dom.createRange();return o.setStart(e.dom,t),o.setEnd(n.dom,r),o},Jh=function(e,t,n,r){var i=Xh(e,t,n,r),o=cn(e,n)&&t===r;return i.collapsed&&!o},Qh=function(e){return N.from(e.getSelection())},Zh=function(e){if(e.rangeCount>0){var t=e.getRangeAt(0),n=e.getRangeAt(e.rangeCount-1);return N.some(uh.create(tt.fromDom(t.startContainer),t.startOffset,tt.fromDom(n.endContainer),n.endOffset))}return N.none()},ep=function(e){if(null===e.anchorNode||null===e.focusNode)return Zh(e);var t=tt.fromDom(e.anchorNode),n=tt.fromDom(e.focusNode);return Jh(t,e.anchorOffset,n,e.focusOffset)?N.some(uh.create(t,e.anchorOffset,n,e.focusOffset)):Zh(e)},tp=function(e){return Qh(e).filter((function(e){return e.rangeCount>0})).bind(ep)},np=function(e,t){var n=Rh(e,t);return Lh(n)},rp=function(e,t){var n=Rh(e,t);return Eh(n)},ip=function(e,t){return{element:e,offset:t}},op=function(e,t){var n=wn(e);if(0===n.length)return ip(e,t);if(t"})),oo()),xv=To("schema",(function(){return[Bo("preprocess")]})),kv=Ko("defaults",_({})),Sv=Ko("overrides",_({})),Cv=Zi([yv,bv,_v,wv,kv,Sv]),Mv=Zi([yv,bv,_v,kv,Sv]),Tv=Zi([yv,bv,_v,wv,kv,Sv]),Ov=Zi([yv,xv,_v,Do("unit"),wv,kv,Sv]),Dv=function(e){return e.fold(N.some,N.none,N.some,N.some)},Lv=function(e){var t=function(e){return e.name};return e.fold(t,t,t,t)},Ev=function(e){return e.fold(w,w,w,w)},Pv=function(e,t){return function(n){var r=xo("Converting part type",t,n);return e(r)}},Av=Pv(gv.required,Cv),jv=Pv(gv.external,Mv),Iv=Pv(gv.optional,Tv),Nv=Pv(gv.group,Ov),Rv=_("entirety"),Yv=Object.freeze({__proto__:null,required:Av,external:jv,optional:Iv,group:Nv,asNamedPart:Dv,name:Lv,asCommon:Ev,original:Rv}),Hv=function(e,t,n,r){return wi(t.defaults(e,n,r),n,{uid:e.partUids[t.name]},t.overrides(e,n,r))},Bv=function(e,t,n){var r={},i={};return q(n,(function(e){e.fold((function(e){r[e.pname]=pv(!0,(function(t,n,r){return e.factory.sketch(Hv(t,e,n,r))}))}),(function(e){var n=t.parts[e.name];i[e.name]=_(e.factory.sketch(Hv(t,e,n[Rv()]),n))}),(function(e){r[e.pname]=pv(!1,(function(t,n,r){return e.factory.sketch(Hv(t,e,n,r))}))}),(function(e){r[e.pname]=mv(!0,(function(t,n,r){var i=t[e.name];return U(i,(function(n){return e.factory.sketch(wi(e.defaults(t,n,r),n,e.overrides(t,n)))}))}))}))})),{internals:_(r),externals:_(i)}},Fv=function(e,t){var n={};return q(t,(function(t){Dv(t).each((function(t){var r=zv(e,t.pname);n[t.name]=function(n){var i=xo("Part: "+t.name+" in "+e,Zi(t.schema),n);return D(D({},r),{config:n,validated:i})}}))})),n},zv=function(e,t){return{uiType:vv(),owner:e,name:t}},$v=function(e,t,n){return{uiType:vv(),owner:e,name:t,config:n,validated:{}}},Vv=function(e){return re(e,(function(e){return e.fold(N.none,N.some,N.none,N.none).map((function(e){return Ro(e.name,e.schema.concat([fl(Rv())]))})).toArray()}))},Wv=function(e){return U(e,Lv)},Uv=function(e,t,n){return Bv(e,t,n)},qv=function(e,t,n){return hv(N.some(e),t,t.components,n)},Kv=function(e,t,n){var r=t.partUids[n];return e.getSystem().getByUid(r).toOptional()},Gv=function(e,t,n){return Kv(e,t,n).getOrDie("Could not find part: "+n)},Xv=function(e,t,n){var r={},i=t.partUids,o=e.getSystem();return q(n,(function(e){r[e]=_(o.getByUid(i[e]))})),r},Jv=function(e,t){var n=e.getSystem();return ye(t.partUids,(function(e,t){return _(n.getByUid(e))}))},Qv=function(e){return me(e.partUids)},Zv=function(e,t,n){var r={},i=t.partUids,o=e.getSystem();return q(n,(function(e){r[e]=_(o.getByUid(i[e]).getOrDie())})),r},eg=function(e,t){var n=Wv(t);return pa(U(n,(function(t){return{key:t,value:e+"-"+t}})))},tg=function(e){return Mo("partUids","partUids",Ti((function(t){return eg(t.uid,e)})),oo())},ng=Object.freeze({__proto__:null,generate:Fv,generateOne:$v,schemas:Vv,names:Wv,substitutes:Uv,components:qv,defaultUids:eg,defaultUidsSchema:tg,getAllParts:Jv,getAllPartNames:Qv,getPart:Kv,getPartOrDie:Gv,getParts:Xv,getPartsOrDie:Zv}),rg=function(e,t){var n=e.length>0?[Ro("parts",e)]:[];return n.concat([Do("uid"),Ko("dom",{}),Ko("components",[]),fl("originalSpec"),Ko("debug.sketcher",{})]).concat(t)},ig=function(e,t,n,r,i){var o=rg(r,i);return xo(e+" [SpecSchema]",Qi(o.concat(t)),n)},og=function(e,t,n,r){var i=ug(r),o=ig(e,t,i,[],[]);return n(o,i)},ag=function(e,t,n,r,i){var o=ug(i),a=Vv(n),s=tg(n),u=ig(e,t,o,a,[s]),c=Uv(e,u,n),l=qv(e,u,c.internals());return r(u,l,o,c.externals())},sg=function(e){return Te(e,"uid")},ug=function(e){return sg(e)?e:D(D({},e),{uid:fu("uid")})},cg=function(e){return void 0!==e.uid},lg=Qi([Do("name"),Do("factory"),Do("configFields"),Ko("apis",{}),Ko("extraApis",{})]),dg=Qi([Do("name"),Do("factory"),Do("configFields"),Do("partFields"),Ko("apis",{}),Ko("extraApis",{})]),fg=function(e){var t=xo("Sketcher for "+e.name,lg,e),n=function(e){return og(t.name,t.configFields,t.factory,e)},r=ye(t.apis,ku),i=ye(t.extraApis,(function(e,t){return yu(e,t)}));return D(D({name:t.name,configFields:t.configFields,sketch:n},r),i)},hg=function(e){var t=xo("Sketcher for "+e.name,dg,e),n=function(e){return ag(t.name,t.configFields,t.partFields,t.factory,e)},r=Fv(t.name,t.partFields),i=ye(t.apis,ku),o=ye(t.extraApis,(function(e,t){return yu(e,t)}));return D(D({name:t.name,partFields:t.partFields,configFields:t.configFields,sketch:n,parts:r},i),o)},pg=function(e){return"input"===st(e)&&"radio"!==zn(e,"type")||"textarea"===st(e)},mg=function(e,t,n){return t.find(e)},vg=Object.freeze({__proto__:null,getCurrent:mg}),gg=[Do("find")],yg=pd({fields:gg,name:"composing",apis:vg}),bg=["input","button","textarea","select"],_g=function(e,t,n){var r=t.disabled()?Og:Dg;r(e,t)},wg=function(e,t){return!0===t.useNative&&z(bg,st(e.element))},xg=function(e){return Vn(e.element,"disabled")},kg=function(e){Bn(e.element,"disabled","disabled")},Sg=function(e){Wn(e.element,"disabled")},Cg=function(e){return"true"===zn(e.element,"aria-disabled")},Mg=function(e){Bn(e.element,"aria-disabled","true")},Tg=function(e){Bn(e.element,"aria-disabled","false")},Og=function(e,t,n){t.disableClass.each((function(t){oc(e.element,t)}));var r=wg(e,t)?kg:Mg;r(e),t.onDisabled(e)},Dg=function(e,t,n){t.disableClass.each((function(t){sc(e.element,t)}));var r=wg(e,t)?Sg:Tg;r(e),t.onEnabled(e)},Lg=function(e,t){return wg(e,t)?xg(e):Cg(e)},Eg=function(e,t,n,r){var i=r?Og:Dg;i(e,t)},Pg=Object.freeze({__proto__:null,enable:Dg,disable:Og,isDisabled:Lg,onLoad:_g,set:Eg}),Ag=function(e,t){return Lu({classes:t.disabled()?t.disableClass.toArray():[]})},jg=function(e,t){return Os([Ds(ts(),(function(t,n){return Lg(t,e)})),ad(e,t,_g)])},Ig=Object.freeze({__proto__:null,exhibit:Ag,events:jg}),Ng=[ea("disabled",M),Ko("useNative",!0),Bo("disableClass"),sl("onDisabled"),sl("onEnabled")],Rg=pd({fields:Ng,name:"disabling",active:Ig,apis:Pg}),Yg=function(e,t,n,r){var i=Gh(e.element,"."+t.highlightClass);q(i,(function(n){$(r,(function(e){return e.element===n}))||(sc(n,t.highlightClass),e.getSystem().getByDom(n).each((function(n){t.onDehighlight(e,n),xs(n,ws())})))}))},Hg=function(e,t,n){return Yg(e,t,n,[])},Bg=function(e,t,n,r){Ug(e,t,n,r)&&(sc(r.element,t.highlightClass),t.onDehighlight(e,r),xs(r,ws()))},Fg=function(e,t,n,r){Yg(e,t,n,[r]),Ug(e,t,n,r)||(oc(r.element,t.highlightClass),t.onHighlight(e,r),xs(r,_s()))},zg=function(e,t,n){Gg(e,t).each((function(r){Fg(e,t,n,r)}))},$g=function(e,t,n){Xg(e,t).each((function(r){Fg(e,t,n,r)}))},Vg=function(e,t,n,r){Kg(e,t,n,r).fold((function(e){throw e}),(function(r){Fg(e,t,n,r)}))},Wg=function(e,t,n,r){var i=ey(e,t),o=ee(i,r);o.each((function(r){Fg(e,t,n,r)}))},Ug=function(e,t,n,r){return uc(r.element,t.highlightClass)},qg=function(e,t,n){return Yc(e.element,"."+t.highlightClass).bind((function(t){return e.getSystem().getByDom(t).toOptional()}))},Kg=function(e,t,n,r){var i=Gh(e.element,"."+t.itemClass);return N.from(i[r]).fold((function(){return ri.error(new Error("No element found with index "+r))}),e.getSystem().getByDom)},Gg=function(e,t,n){return Yc(e.element,"."+t.itemClass).bind((function(t){return e.getSystem().getByDom(t).toOptional()}))},Xg=function(e,t,n){var r=Gh(e.element,"."+t.itemClass),i=r.length>0?N.some(r[r.length-1]):N.none();return i.bind((function(t){return e.getSystem().getByDom(t).toOptional()}))},Jg=function(e,t,n,r){var i=Gh(e.element,"."+t.itemClass),o=te(i,(function(e){return uc(e,t.highlightClass)}));return o.bind((function(t){var n=Tl(t,r,0,i.length-1);return e.getSystem().getByDom(i[n]).toOptional()}))},Qg=function(e,t,n){return Jg(e,t,n,-1)},Zg=function(e,t,n){return Jg(e,t,n,1)},ey=function(e,t,n){var r=Gh(e.element,"."+t.itemClass);return Ee(U(r,(function(t){return e.getSystem().getByDom(t).toOptional()})))},ty=Object.freeze({__proto__:null,dehighlightAll:Hg,dehighlight:Bg,highlight:Fg,highlightFirst:zg,highlightLast:$g,highlightAt:Vg,highlightBy:Wg,isHighlighted:Ug,getHighlighted:qg,getFirst:Gg,getLast:Xg,getPrevious:Qg,getNext:Zg,getCandidates:ey}),ny=[Do("highlightClass"),Do("itemClass"),sl("onHighlight"),sl("onDehighlight")],ry=pd({fields:ny,name:"highlighting",apis:ty}),iy=[8],oy=[9],ay=[13],sy=[27],uy=[32],cy=[37],ly=[38],dy=[39],fy=[40],hy=function(e,t,n){var r=oe(e.slice(0,t)),i=oe(e.slice(t+1));return ee(r.concat(i),n)},py=function(e,t,n){var r=oe(e.slice(0,t));return ee(r,n)},my=function(e,t,n){var r=e.slice(0,t),i=e.slice(t+1);return ee(i.concat(r),n)},vy=function(e,t,n){var r=e.slice(t+1);return ee(r,n)},gy=function(e){return function(t){var n=t.raw;return z(e,n.which)}},yy=function(e){return function(t){return ie(e,(function(e){return e(t)}))}},by=function(e){var t=e.raw;return!0===t.shiftKey},_y=function(e){var t=e.raw;return!0===t.ctrlKey},wy=S(by),xy=function(e,t){return{matches:e,classification:t}},ky=function(e,t){var n=ee(e,(function(e){return e.matches(t)}));return n.map((function(e){return e.classification}))},Sy=function(e,t,n){var r=t.exists((function(e){return n.exists((function(t){return cn(t,e)}))}));r||ks(e,vs(),{prevFocus:t,newFocus:n})},Cy=function(){var e=function(e){return Md(e.element)},t=function(t,n){var r=e(t);t.getSystem().triggerFocus(n,t.element);var i=e(t);Sy(t,r,i)};return{get:e,set:t}},My=function(){var e=function(e){return ry.getHighlighted(e).map((function(e){return e.element}))},t=function(t,n){var r=e(t);t.getSystem().getByDom(n).fold(v,(function(e){ry.highlight(t,e)}));var i=e(t);Sy(t,r,i)};return{get:e,set:t}};(function(e){e["OnFocusMode"]="onFocus",e["OnEnterOrSpaceMode"]="onEnterOrSpace",e["OnApiMode"]="onApi"})(Yh||(Yh={}));var Ty=function(e,t,n,r,i){var o=function(){return e.concat([Ko("focusManager",Cy()),Go("focusInside","onFocus",go((function(e){return z(["onFocus","onEnterOrSpace","onApi"],e)?ri.value(e):ri.error("Invalid value for focusInside")}))),dl("handler",u),dl("state",t),dl("sendFocusIn",i)])},a=function(e,t,n,r,i){var o=n(e,t,r,i);return ky(o,t.event).bind((function(n){return n(e,t,r,i)}))},s=function(e,t){var o=e.focusInside!==Yh.OnFocusMode?N.none():i(e).map((function(n){return Ps(Ja(),(function(r,i){n(r,e,t),i.stop()}))})),s=function(n,r){var o=gy(uy.concat(ay))(r.event);e.focusInside===Yh.OnEnterOrSpaceMode&&o&&wa(n,r)&&i(e).each((function(i){i(n,e,t),r.stop()}))},u=[Ps(Ba(),(function(r,i){a(r,i,n,e,t).fold((function(){s(r,i)}),(function(e){i.stop()}))})),Ps(Fa(),(function(n,i){a(n,i,r,e,t).each((function(e){i.stop()}))}))];return Os(o.toArray().concat(u))},u={schema:o,processKey:a,toEvents:s};return u},Oy=function(e){var t=[Bo("onEscape"),Bo("onEnter"),Ko("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Ko("firstTabstop",0),Ko("useTabstopAt",T),Bo("visibilitySelector")].concat([e]),n=function(e,t){var n=e.visibilitySelector.bind((function(e){return Hc(t,e)})).getOr(t);return ar(n)>0},r=function(e,t){var r=Gh(e.element,t.selector),i=X(r,(function(e){return n(t,e)}));return N.from(i[t.firstTabstop])},i=function(e,t){return t.focusManager.get(e).bind((function(e){return Hc(e,t.selector)}))},o=function(e,t){return n(e,t)&&e.useTabstopAt(t)},a=function(e,t,n){r(e,t).each((function(n){t.focusManager.set(e,n)}))},s=function(e,t,n,r,i){return i(t,n,(function(e){return o(r,e)})).fold((function(){return r.cyclic?N.some(!0):N.none()}),(function(t){return r.focusManager.set(e,t),N.some(!0)}))},u=function(e,t,n,r){var o=Gh(e.element,n.selector);return i(e,n).bind((function(t){var i=te(o,k(cn,t));return i.bind((function(t){return s(e,o,t,n,r)}))}))},c=function(e,t,n){var r=n.cyclic?hy:py;return u(e,t,n,r)},l=function(e,t,n){var r=n.cyclic?my:vy;return u(e,t,n,r)},d=function(e,t,n){return n.onEnter.bind((function(n){return n(e,t)}))},f=function(e,t,n){return n.onEscape.bind((function(n){return n(e,t)}))},h=_([xy(yy([by,gy(oy)]),c),xy(gy(oy),l),xy(gy(sy),f),xy(yy([wy,gy(ay)]),d)]),p=_([]);return Ty(t,Su.init,h,p,(function(){return N.some(a)}))},Dy=Oy(To("cyclic",M)),Ly=Oy(To("cyclic",T)),Ey=function(e,t,n){return Cs(e,n,ts()),N.some(!0)},Py=function(e,t,n){var r=pg(n)&&gy(uy)(t.event);return r?N.none():Ey(e,t,n)},Ay=function(e,t){return N.some(!0)},jy=[Ko("execute",Py),Ko("useSpace",!1),Ko("useEnter",!0),Ko("useControlEnter",!1),Ko("useDown",!1)],Iy=function(e,t,n){return n.execute(e,t,e.element)},Ny=function(e,t,n,r){var i=n.useSpace&&!pg(e.element)?uy:[],o=n.useEnter?ay:[],a=n.useDown?fy:[],s=i.concat(o).concat(a);return[xy(gy(s),Iy)].concat(n.useControlEnter?[xy(yy([_y,gy(ay)]),Iy)]:[])},Ry=function(e,t,n,r){return n.useSpace&&!pg(e.element)?[xy(gy(uy),Ay)]:[]},Yy=Ty(jy,Su.init,Ny,Ry,(function(){return N.none()})),Hy=function(){var e=rf(),t=function(t,n){e.set({numRows:t,numColumns:n})},n=function(){return e.get().map((function(e){return e.numRows}))},r=function(){return e.get().map((function(e){return e.numColumns}))};return Cu({readState:function(){return e.get().map((function(e){return{numRows:String(e.numRows),numColumns:String(e.numColumns)}})).getOr({numRows:"?",numColumns:"?"})},setGridSize:t,getNumRows:n,getNumColumns:r})},By=function(e){return e.state(e)},Fy=Object.freeze({__proto__:null,flatgrid:Hy,init:By}),zy=function(e){return function(t,n,r,i){var o=e(t.element);return Uy(o,t,n,r,i)}},$y=function(e,t){var n=If(e,t);return zy(n)},Vy=function(e,t){var n=If(t,e);return zy(n)},Wy=function(e){return function(t,n,r,i){return Uy(e,t,n,r,i)}},Uy=function(e,t,n,r,i){var o=r.focusManager.get(t).bind((function(n){return e(t.element,n,r,i)}));return o.map((function(e){return r.focusManager.set(t,e),!0}))},qy=Wy,Ky=Wy,Gy=Wy,Xy=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},Jy=function(e){return!Xy(e.dom)},Qy=function(e,t){return te(e,t).map((function(t){return{index:t,candidates:e}}))},Zy=function(e,t,n){var r=function(e){return cn(e,t)},i=Gh(e,n),o=X(i,Jy);return Qy(o,r)},eb=function(e,t){return te(e,(function(e){return cn(t,e)}))},tb=function(e,t,n,r){var i=Math.floor(t/n),o=t%n;return r(i,o).bind((function(t){var r=t.row*n+t.column;return r>=0&&r1?N.some(e.slice(1)):N.none()}))},p=function(e){return Me(n.get(),e)},m=function(e){return v(e).bind(Ww)},v=function(e){return Me(t.get(),e)},g=function(t){return Me(e.get(),t)},y=function(e){var t=i.get();return ae(me(t),e)},b=function(){return r.get().bind(m)},_=function(){return t.get()};return{setMenuBuilt:s,setContents:u,expand:f,refresh:p,collapse:h,lookupMenu:v,lookupItem:g,otherMenus:y,getPrimary:b,getMenus:_,clear:o,isClear:a,getTriggeringPath:d}},Ww=function(e){return"prepared"===e.type?N.some(e.menu):N.none()},Uw={init:Vw,extractPreparedMenu:Ww},qw=function(e,t){var n,r=rf(),i=function(t,n,r){return ye(r,(function(r,i){var o=function(){return Bw.sketch(D(D({},r),{value:i,markers:e.markers,fakeFocus:e.fakeFocus,onHighlight:e.onHighlight,focusManager:e.fakeFocus?My():Cy()}))};return i===n?{type:"prepared",menu:t.getSystem().build(o())}:{type:"notbuilt",nbMenu:o}}))},o=Uw.init(),a=function(t){var n=i(t,e.data.primary,e.data.menus),r=c();return o.setContents(e.data.primary,n,e.data.expansions,r),o.getPrimary()},s=function(e){return ev.getValue(e).value},u=function(e,t,n){return pe(t,(function(e){if(!e.getSystem().isConnected())return N.none();var t=ry.getCandidates(e);return ee(t,(function(e){return s(e)===n}))}))},c=function(t){return ye(e.data.menus,(function(e,t){return re(e.items,(function(e){return"separator"===e.type?[]:[e.data.value]}))}))},l=function(e,t){ry.highlight(e,t),ry.getHighlighted(t).orThunk((function(){return ry.getFirst(t)})).each((function(t){Cs(e,t.element,ns())}))},d=function(e,t){return Ee(U(t,(function(t){return e.lookupMenu(t).bind((function(e){return"prepared"===e.type?N.some(e.menu):N.none()}))})))},f=function(t,n,r){var i=d(n,n.otherMenus(r));q(i,(function(n){lc(n.element,[e.markers.backgroundMenu]),e.stayInDom||H_.remove(t,n)}))},h=function(t){return r.get().getOrThunk((function(){var n={},i=Gh(t.element,"."+e.markers.item),o=X(i,(function(e){return"true"===zn(e,"aria-haspopup")}));return q(o,(function(e){t.getSystem().getByDom(e).each((function(e){var t=s(e);n[t]=e}))})),r.set(n),n}))},p=function(e,t){var n=h(e);ge(n,(function(e,n){var r=z(t,n);Bn(e.element,"aria-expanded",r)}))},m=function(t,n,r){return N.from(r[0]).bind((function(i){return n.lookupMenu(i).bind((function(i){if("notbuilt"===i.type)return N.none();var o=i.menu,a=d(n,r.slice(1));return q(a,(function(t){oc(t.element,e.markers.backgroundMenu)})),Nn(o.element)||H_.append(t,Oc(o)),lc(o.element,[e.markers.backgroundMenu]),l(t,o),f(t,n,r),N.some(o)}))}))};(function(e){e[e["HighlightSubmenu"]=0]="HighlightSubmenu",e[e["HighlightParent"]=1]="HighlightParent"})(n||(n={}));var g=function(e,t,n){if("notbuilt"===n.type){var r=e.getSystem().build(n.nbMenu());return o.setMenuBuilt(t,r),r}return n.menu},y=function(t,r,i){if(void 0===i&&(i=n.HighlightSubmenu),r.hasConfigured(Rg)&&Rg.isDisabled(r))return N.some(r);var a=s(r);return o.expand(a).bind((function(a){return p(t,a),N.from(a[0]).bind((function(s){return o.lookupMenu(s).bind((function(u){var c=g(t,s,u);return Nn(c.element)||H_.append(t,Oc(c)),e.onOpenSubmenu(t,r,c,oe(a)),i===n.HighlightSubmenu?(ry.highlightFirst(c),m(t,o,a)):(ry.dehighlightAll(c),N.some(r))}))}))}))},b=function(t,n){var r=s(n);return o.collapse(r).bind((function(r){return p(t,r),m(t,o,r).map((function(r){return e.onCollapseMenu(t,n,r),r}))}))},_=function(e,t){var n=s(t);return o.refresh(n).bind((function(t){return p(e,t),m(e,o,t)}))},w=function(e,t){return pg(t.element)?N.none():y(e,t,n.HighlightSubmenu)},x=function(e,t){return pg(t.element)?N.none():b(e,t)},k=function(t,n){return b(t,n).orThunk((function(){return e.onEscape(t,n).map((function(){return t}))}))},S=function(t){return function(n,r){return Hc(r.getSource(),"."+e.markers.item).bind((function(e){return n.getSystem().getByDom(e).toOptional().bind((function(e){return t(n,e).map(T)}))}))}},C=Os([Ps(Yw(),(function(e,t){var n=t.event.item;o.lookupItem(s(n)).each((function(){var n=t.event.menu;ry.highlight(e,n);var r=s(t.event.item);o.refresh(r).each((function(t){return f(e,o,t)}))}))})),Ws((function(t,r){var i=r.event.target;t.getSystem().getByDom(i).each((function(r){var i=s(r);0===i.indexOf("collapse-item")&&b(t,r),y(t,r,n.HighlightSubmenu).fold((function(){e.onExecute(t,r)}),v)}))})),zs((function(t,n){a(t).each((function(n){H_.append(t,Oc(n)),e.onOpenMenu(t,n),e.highlightImmediately&&l(t,n)}))}))].concat(e.navigateOnHover?[Ps(xw(),(function(t,r){var i=r.event.item;_(t,i),y(t,i,n.HighlightParent),e.onHover(t,i)}))]:[])),M=function(e){return ry.getHighlighted(e).bind(ry.getHighlighted)},O=function(e){M(e).each((function(t){b(e,t)}))},L=function(e){o.getPrimary().each((function(t){l(e,t)}))},E=function(e){return N.from(e.components()[0]).filter((function(e){return"menu"===zn(e.element,"role")}))},P=function(t){var n=o.getPrimary().bind((function(e){return M(t).bind((function(e){var n=s(e),r=Ce(o.getMenus()),i=Ee(U(r,Uw.extractPreparedMenu));return o.getTriggeringPath(n,(function(e){return u(t,i,e)}))})).map((function(t){return{primary:e,triggeringPath:t}}))}));n.fold((function(){E(t).each((function(n){e.onRepositionMenu(t,n,[])}))}),(function(n){var r=n.primary,i=n.triggeringPath;e.onRepositionMenu(t,r,i)}))},A={collapseMenu:O,highlightPrimary:L,repositionMenus:P};return{uid:e.uid,dom:e.dom,markers:e.markers,behaviours:rv(e.tmenuBehaviours,[D_.config({mode:"special",onRight:S(w),onLeft:S(x),onEscape:S(k),focusIn:function(e,t){o.getPrimary().each((function(t){Cs(e,t.element,ns())}))}}),ry.config({highlightClass:e.markers.selectedMenu,itemClass:e.markers.menu}),yg.config({find:function(e){return ry.getHighlighted(e)}}),H_.config({})]),eventOrder:e.eventOrder,apis:A,events:C}},Kw=_("collapse-item"),Gw=function(e,t,n){return{primary:e,menus:t,expansions:n}},Xw=function(e,t){return{primary:e,menus:ha(e,t),expansions:{}}},Jw=function(e){return{value:iu(Kw()),meta:{text:e}}},Qw=fg({name:"TieredMenu",configFields:[ll("onExecute"),ll("onEscape"),cl("onOpenMenu"),cl("onOpenSubmenu"),sl("onRepositionMenu"),sl("onCollapseMenu"),Ko("highlightImmediately",!0),Ro("data",[Do("primary"),Do("menus"),Do("expansions")]),Ko("fakeFocus",!1),sl("onHighlight"),sl("onHover"),il(),Do("dom"),Ko("navigateOnHover",!0),Ko("stayInDom",!1),tv("tmenuBehaviours",[D_,ry,yg,H_]),Ko("eventOrder",{})],apis:{collapseMenu:function(e,t){e.collapseMenu(t)},highlightPrimary:function(e,t){e.highlightPrimary(t)},repositionMenus:function(e,t){e.repositionMenus(t)}},factory:qw,extraApis:{tieredData:Gw,singleData:Xw,collapseItem:Jw}}),Zw=function(e,t,n,r,i){var o=function(){return e.lazySink(t)},a="horizontal"===r.type?{layouts:{onLtr:function(){return Zl()},onRtl:function(){return ed()}}}:{},s=function(e){return 2===e.length},u=function(e){return s(e)?a:{}};return Qw.sketch({dom:{tag:"div"},data:r.data,markers:r.menu.markers,highlightImmediately:r.menu.highlightImmediately,onEscape:function(){return ym.close(t),e.onEscape.map((function(e){return e(t)})),N.some(!0)},onExecute:function(){return N.some(!0)},onOpenMenu:function(e,t){Yp.positionWithinBounds(o().getOrDie(),t,n,i())},onOpenSubmenu:function(e,t,n,r){var i=o().getOrDie();Yp.position(i,n,{anchor:D({type:"submenu",item:t},u(r))})},onRepositionMenu:function(e,t,r){var a=o().getOrDie();Yp.positionWithinBounds(a,t,n,i()),q(r,(function(e){var t=u(e.triggeringPath);Yp.position(a,e.triggeredMenu,{anchor:D({type:"submenu",item:e.triggeringItem},t)})}))}})},ex=function(e,t){var n=function(t,n){var r=e.getRelated(t);return r.exists((function(e){return $c(e,n)}))},r=function(e,t){ym.setContent(e,t)},i=function(e,t,n){o(e,t,n,N.none())},o=function(e,t,n,r){a(e,t,n,(function(){return r.map((function(e){return Jr(e)}))}))},a=function(t,n,r,i){var o=e.lazySink(t).getOrDie();ym.openWhileCloaked(t,n,(function(){return Yp.positionWithinBounds(o,t,r,i())})),ev.setValue(t,N.some({mode:"position",config:r,getBounds:i}))},s=function(e,t,n){u(e,t,n,N.none)},u=function(t,n,r,i){var o=Zw(e,t,n,r,i);ym.open(t,o),ev.setValue(t,N.some({mode:"menu",menu:o}))},c=function(e){ym.isOpen(e)&&(ev.setValue(e,N.none()),ym.close(e))},l=function(e){return ym.getState(e)},d=function(t){ym.isOpen(t)&&ev.getValue(t).each((function(n){switch(n.mode){case"menu":ym.getState(t).each(Qw.repositionMenus);break;case"position":var r=e.lazySink(t).getOrDie();Yp.positionWithinBounds(r,t,n.config,n.getBounds());break}}))},f={setContent:r,showAt:i,showWithin:o,showWithinBounds:a,showMenuAt:s,showMenuWithinBounds:u,hide:c,getContent:l,reposition:d,isOpen:ym.isOpen};return{uid:e.uid,dom:e.dom,behaviours:rv(e.inlineBehaviours,[ym.config({isPartOf:function(e,t,r){return $c(t,r)||n(e,r)},getAttachPoint:function(t){return e.lazySink(t).getOrDie()},onOpen:function(t){e.onShow(t)},onClose:function(t){e.onHide(t)}}),ev.config({store:{mode:"memory",initialValue:N.none()}}),yd.config({channels:D(D({},km(D({isExtraPart:t.isExtraPart},e.fireDismissalEventInstead.map((function(e){return{fireEventInstead:{event:e.event}}})).getOr({})))),Cm(D(D({},e.fireRepositionEventInstead.map((function(e){return{fireEventInstead:{event:e.event}}})).getOr({})),{doReposition:d})))})]),eventOrder:e.eventOrder,apis:f}},tx=fg({name:"InlineView",configFields:[Do("lazySink"),sl("onShow"),sl("onHide"),Vo("onEscape"),tv("inlineBehaviours",[ym,ev,yd]),Uo("fireDismissalEventInstead",[Ko("event",ps())]),Uo("fireRepositionEventInstead",[Ko("event",ms())]),Ko("getRelated",N.none),Ko("isExtraPart",M),Ko("eventOrder",N.none)],factory:ex,apis:{showAt:function(e,t,n,r){e.showAt(t,n,r)},showWithin:function(e,t,n,r,i){e.showWithin(t,n,r,i)},showWithinBounds:function(e,t,n,r,i){e.showWithinBounds(t,n,r,i)},showMenuAt:function(e,t,n,r){e.showMenuAt(t,n,r)},showMenuWithinBounds:function(e,t,n,r,i){e.showMenuWithinBounds(t,n,r,i)},hide:function(e,t){e.hide(t)},isOpen:function(e,t){return e.isOpen(t)},getContent:function(e,t){return e.getContent(t)},setContent:function(e,t,n){e.setContent(t,n)},reposition:function(e,t){e.reposition(t)}}}),nx="layout-inset",rx=function(e){return e.x},ix=function(e,t){return e.x+e.width/2-t.width/2},ox=function(e,t){return e.x+e.width-t.width},ax=function(e){return e.y},sx=function(e,t){return e.y+e.height-t.height},ux=function(e,t){return e.y+e.height/2-t.height/2},cx=function(e,t,n){return pl(ox(e,t),sx(e,t),n.insetSouthwest(),xl(),"southwest",Ll(e,{right:0,bottom:3}),nx)},lx=function(e,t,n){return pl(rx(e),sx(e,t),n.insetSoutheast(),wl(),"southeast",Ll(e,{left:1,bottom:3}),nx)},dx=function(e,t,n){return pl(ox(e,t),ax(e),n.insetNorthwest(),_l(),"northwest",Ll(e,{right:0,top:2}),nx)},fx=function(e,t,n){return pl(rx(e),ax(e),n.insetNortheast(),bl(),"northeast",Ll(e,{left:1,top:2}),nx)},hx=function(e,t,n){return pl(ix(e,t),ax(e),n.insetNorth(),kl(),"north",Ll(e,{top:2}),nx)},px=function(e,t,n){return pl(ix(e,t),sx(e,t),n.insetSouth(),Sl(),"south",Ll(e,{bottom:3}),nx)},mx=function(e,t,n){return pl(ox(e,t),ux(e,t),n.insetEast(),Ml(),"east",Ll(e,{right:0}),nx)},vx=function(e,t,n){return pl(rx(e),ux(e,t),n.insetWest(),Cl(),"west",Ll(e,{left:1}),nx)},gx=function(e){switch(e){case"north":return hx;case"northeast":return fx;case"northwest":return dx;case"south":return px;case"southeast":return lx;case"southwest":return cx;case"east":return mx;case"west":return vx}},yx=function(e,t,n,r,i){var o=Wd(r).map(gx).getOr(hx);return o(e,t,n,r,i)},bx=function(e){switch(e){case"north":return px;case"northeast":return lx;case"northwest":return cx;case"south":return hx;case"southeast":return fx;case"southwest":return dx;case"east":return vx;case"west":return mx}},_x=function(e,t,n,r,i){var o=Wd(r).map(bx).getOr(hx);return o(e,t,n,r,i)},wx=tinymce.util.Tools.resolve("tinymce.util.Delay"),xx=function(e){var t=gw(e.action),n=e.dom.tag,r=function(t){return Me(e.dom,"attributes").bind((function(e){return Me(e,t)}))},i=function(){if("button"===n){var e=r("type").getOr("button"),t=r("role").map((function(e){return{role:e}})).getOr({});return D({type:e},t)}var i=r("role").getOr("button");return{role:i}};return{uid:e.uid,dom:e.dom,components:e.components,events:t,behaviours:iv.augment(e.buttonBehaviours,[X_.config({}),D_.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:i()},eventOrder:e.eventOrder}},kx=fg({name:"Button",factory:xx,configFields:[Ko("uid",void 0),Do("dom"),Ko("components",[]),iv.field("buttonBehaviours",[X_,D_]),Bo("action"),Bo("role"),Ko("eventOrder",{})]}),Sx=function(e){var t=void 0!==e.dom.attributes?e.dom.attributes:[];return Q(t,(function(e,t){var n;return"class"===t.name?e:D(D({},e),(n={},n[t.name]=t.value,n))}),{})},Cx=function(e){return Array.prototype.slice.call(e.dom.classList,0)},Mx=function(e){var t=tt.fromHtml(e),n=wn(t),r=Sx(t),i=Cx(t),o=0===n.length?{}:{innerHtml:qs(t)};return D({tag:st(t),classes:i,attributes:r},o)},Tx=function(e){var t=cg(e)&&Oe(e,"uid")?e.uid:fu("memento"),n=function(e){return e.getSystem().getByUid(t).getOrDie()},r=function(e){return e.getSystem().getByUid(t).toOptional()},i=function(){return D(D({},e),{uid:t})};return{get:n,getOpt:r,asSpec:i}};function Ox(e){return Ox="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ox(e)}function Dx(e,t){return Dx=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Dx(e,t)}function Lx(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Ex(e,t,n){return Ex=Lx()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=Function.bind.apply(e,r),o=new i;return n&&Dx(o,n.prototype),o},Ex.apply(null,arguments)}function Px(e){return Ax(e)||jx(e)||Ix(e)||Rx()}function Ax(e){if(Array.isArray(e))return Nx(e)}function jx(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Ix(e,t){if(e){if("string"===typeof e)return Nx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nx(e,t):void 0}}function Nx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),i=1;i/gm),kk=Vx(/^data-[\-\w.\u00B7-\uFFFF]/),Sk=Vx(/^aria-[\-\w]+$/),Ck=Vx(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Mk=Vx(/^(?:\w+script|data):/i),Tk=Vx(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ok=Vx(/^html$/i),Dk=function(){return"undefined"===typeof window?null:window},Lk=function(e,t){if("object"!==Ox(e)||"function"!==typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:function(e){return e}})}catch(o){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function Ek(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Dk(),t=function(e){return Ek(e)};if(t.version="2.3.8",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var n=e.document,r=e.document,i=e.DocumentFragment,o=e.HTMLTemplateElement,a=e.Node,s=e.Element,u=e.NodeFilter,c=e.NamedNodeMap,l=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,d=e.HTMLFormElement,f=e.DOMParser,h=e.trustedTypes,p=s.prototype,m=ck(p,"cloneNode"),v=ck(p,"nextSibling"),g=ck(p,"childNodes"),y=ck(p,"parentNode");if("function"===typeof o){var b=r.createElement("template");b.content&&b.content.ownerDocument&&(r=b.content.ownerDocument)}var _=Lk(h,n),w=_?_.createHTML(""):"",x=r,k=x.implementation,S=x.createNodeIterator,C=x.createDocumentFragment,M=x.getElementsByTagName,T=n.importNode,O={};try{O=uk(r).documentMode?r.documentMode:{}}catch(Fe){}var D={};t.isSupported="function"===typeof y&&k&&"undefined"!==typeof k.createHTMLDocument&&9!==O;var L,E,P=wk,A=xk,j=kk,I=Sk,N=Mk,R=Tk,Y=Ck,H=null,B=sk({},[].concat(Px(lk),Px(dk),Px(fk),Px(pk),Px(vk))),F=null,z=sk({},[].concat(Px(gk),Px(yk),Px(bk),Px(_k))),$=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,W=null,U=!0,q=!0,K=!1,G=!1,X=!1,J=!1,Q=!1,Z=!1,ee=!1,te=!1,ne=!0,re=!0,ie=!1,oe={},ae=null,se=sk({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ue=null,ce=sk({},["audio","video","img","source","image","track"]),le=null,de=sk({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",he="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",me=pe,ve=!1,ge=["application/xhtml+xml","text/html"],ye="text/html",be=null,_e=r.createElement("form"),we=function(e){return e instanceof RegExp||e instanceof Function},xe=function(e){be&&be===e||(e&&"object"===Ox(e)||(e={}),e=uk(e),H="ALLOWED_TAGS"in e?sk({},e.ALLOWED_TAGS):B,F="ALLOWED_ATTR"in e?sk({},e.ALLOWED_ATTR):z,le="ADD_URI_SAFE_ATTR"in e?sk(uk(de),e.ADD_URI_SAFE_ATTR):de,ue="ADD_DATA_URI_TAGS"in e?sk(uk(ce),e.ADD_DATA_URI_TAGS):ce,ae="FORBID_CONTENTS"in e?sk({},e.FORBID_CONTENTS):se,V="FORBID_TAGS"in e?sk({},e.FORBID_TAGS):{},W="FORBID_ATTR"in e?sk({},e.FORBID_ATTR):{},oe="USE_PROFILES"in e&&e.USE_PROFILES,U=!1!==e.ALLOW_ARIA_ATTR,q=!1!==e.ALLOW_DATA_ATTR,K=e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=e.SAFE_FOR_TEMPLATES||!1,X=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,ee=e.RETURN_DOM_FRAGMENT||!1,te=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,ne=!1!==e.SANITIZE_DOM,re=!1!==e.KEEP_CONTENT,ie=e.IN_PLACE||!1,Y=e.ALLOWED_URI_REGEXP||Y,me=e.NAMESPACE||pe,e.CUSTOM_ELEMENT_HANDLING&&we(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&we(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),L=L=-1===ge.indexOf(e.PARSER_MEDIA_TYPE)?ye:e.PARSER_MEDIA_TYPE,E="application/xhtml+xml"===L?function(e){return e}:Qx,G&&(q=!1),ee&&(Z=!0),oe&&(H=sk({},Px(vk)),F=[],!0===oe.html&&(sk(H,lk),sk(F,gk)),!0===oe.svg&&(sk(H,dk),sk(F,yk),sk(F,_k)),!0===oe.svgFilters&&(sk(H,fk),sk(F,yk),sk(F,_k)),!0===oe.mathMl&&(sk(H,pk),sk(F,bk),sk(F,_k))),e.ADD_TAGS&&(H===B&&(H=uk(H)),sk(H,e.ADD_TAGS)),e.ADD_ATTR&&(F===z&&(F=uk(F)),sk(F,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&sk(le,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(ae===se&&(ae=uk(ae)),sk(ae,e.FORBID_CONTENTS)),re&&(H["#text"]=!0),X&&sk(H,["html","head","body"]),H.table&&(sk(H,["tbody"]),delete V.tbody),$x&&$x(e),be=e)},ke=sk({},["mi","mo","mn","ms","mtext"]),Se=sk({},["foreignobject","desc","title","annotation-xml"]),Ce=sk({},["title","style","font","a","script"]),Me=sk({},dk);sk(Me,fk),sk(Me,hk);var Te=sk({},pk);sk(Te,mk);var Oe=function(e){var t=y(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});var n=Qx(e.tagName),r=Qx(t.tagName);return e.namespaceURI===he?t.namespaceURI===pe?"svg"===n:t.namespaceURI===fe?"svg"===n&&("annotation-xml"===r||ke[r]):Boolean(Me[n]):e.namespaceURI===fe?t.namespaceURI===pe?"math"===n:t.namespaceURI===he?"math"===n&&Se[r]:Boolean(Te[n]):e.namespaceURI===pe&&(!(t.namespaceURI===he&&!Se[r])&&(!(t.namespaceURI===fe&&!ke[r])&&(!Te[n]&&(Ce[n]||!Me[n]))))},De=function(e){Jx(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(Fe){try{e.outerHTML=w}catch(Fe){e.remove()}}},Le=function(e,n){try{Jx(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(Fe){Jx(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!F[e])if(Z||ee)try{De(n)}catch(Fe){}else try{n.setAttribute(e,"")}catch(Fe){}},Ee=function(e){var t,n;if(Q)e=""+e;else{var i=Zx(e,/^[\r\n\t ]+/);n=i&&i[0]}"application/xhtml+xml"===L&&(e=''+e+"");var o=_?_.createHTML(e):e;if(me===pe)try{t=(new f).parseFromString(o,L)}catch(Fe){}if(!t||!t.documentElement){t=k.createDocument(me,"template",null);try{t.documentElement.innerHTML=ve?"":o}catch(Fe){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),me===pe?M.call(t,X?"html":"body")[0]:X?t.documentElement:a},Pe=function(e){return S.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},Ae=function(e){return e instanceof d&&("string"!==typeof e.nodeName||"string"!==typeof e.textContent||"function"!==typeof e.removeChild||!(e.attributes instanceof l)||"function"!==typeof e.removeAttribute||"function"!==typeof e.setAttribute||"string"!==typeof e.namespaceURI||"function"!==typeof e.insertBefore)},je=function(e){return"object"===Ox(a)?e instanceof a:e&&"object"===Ox(e)&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName},Ie=function(e,n,r){D[e]&&Gx(D[e],(function(e){e.call(t,n,r,be)}))},Ne=function(e){var n;if(Ie("beforeSanitizeElements",e,null),Ae(e))return De(e),!0;if(rk(/[\u0080-\uFFFF]/,e.nodeName))return De(e),!0;var r=E(e.nodeName);if(Ie("uponSanitizeElement",e,{tagName:r,allowedTags:H}),e.hasChildNodes()&&!je(e.firstElementChild)&&(!je(e.content)||!je(e.content.firstElementChild))&&rk(/<[/\w]/g,e.innerHTML)&&rk(/<[/\w]/g,e.textContent))return De(e),!0;if("select"===r&&rk(/