(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b7ab62b8","chunk-2d21065a"],{"030f":function(t,e,n){(function(t){(function(){"use strict";var e=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},n=function(t){return function(n){return e(n)===t}},r=function(t){return function(e){return typeof e===t}},o=function(t){return function(e){return t===e}},i=n("string"),u=n("object"),a=n("array"),c=o(null),s=r("boolean"),l=o(void 0),f=function(t){return null===t||void 0===t},d=function(t){return!f(t)},m=r("function"),g=r("number"),h=function(t,e){if(a(t)){for(var n=0,r=t.length;n-1},j=function(t,e){for(var n=0,r=t.length;n=0;n--){var r=t[n];e(r,n)}},X=function(t,e){for(var n=[],r=[],o=0,i=t.length;o=0&&e=e.length&&t.substr(n,n+e.length)===e},Ft=function(t,e){return jt(t,e)?It(t,e.length):t},Vt=function(t,e){return Wt(t,e)?t:Ht(t,e)},Ut=function(t,e){return-1!==t.indexOf(e)},jt=function(t,e){return Pt(t,e,0)},Wt=function(t,e){return Pt(t,e,t.length-e.length)},qt=function(t){return function(e){return e.replace(t,"")}},$t=qt(/^\s+|\s+$/g),Gt=function(t){return t.length>0},Kt=function(t){return!Gt(t)},Xt=function(t){return void 0!==t.style&&m(t.style.getPropertyValue)},Yt=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Zt(r.childNodes[0])},Jt=function(t,e){var n=e||document,r=n.createElement(t);return Zt(r)},Qt=function(t,e){var n=e||document,r=n.createTextNode(t);return Zt(r)},Zt=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},te=function(t,e,n){return L.from(t.dom.elementFromPoint(e,n)).map(Zt)},ee={fromHtml:Yt,fromTag:Jt,fromText:Qt,fromDom:Zt,fromPoint:te};"undefined"!==typeof window?window:Function("return this;")();var ne,re=9,oe=11,ie=1,ue=3,ae=function(t){var e=t.dom.nodeName;return e.toLowerCase()},ce=function(t){return t.dom.nodeType},se=function(t){return function(e){return ce(e)===t}},le=se(ie),fe=se(ue),de=se(re),me=se(oe),ge=function(t){var e,n=!1;return function(){for(var r=[],o=0;o0&&e0}))},tr=function(t){var e={},n=t.dom;if(Xt(n))for(var r=0;rr?e-r:0;return o};return{set:n,get:r,getOuter:o,aggregate:i,max:u}},ir=or("height",(function(t){var e=t.dom;return Ln(t)?e.getBoundingClientRect().height:e.offsetHeight})),ur=function(t){return ir.get(t)},ar=function(t){return ir.getOuter(t)},cr=function(t,e){var n=["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"],r=ir.max(t,e,n);Kn(t,"max-height",r+"px")},sr=function(t,e){var n=function(n,r){return sr(t+n,e+r)};return{left:t,top:e,translate:n}},lr=sr,fr=function(t){var e=t.getBoundingClientRect();return lr(e.left,e.top)},dr=function(t,e){return void 0!==t?t:void 0!==e?e:0},mr=function(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return lr(n.offsetLeft,n.offsetTop);var i=dr(null===r||void 0===r?void 0:r.pageYOffset,o.scrollTop),u=dr(null===r||void 0===r?void 0:r.pageXOffset,o.scrollLeft),a=dr(o.clientTop,n.clientTop),c=dr(o.clientLeft,n.clientLeft);return gr(t).translate(u-c,i-a)},gr=function(t){var e=t.dom,n=e.ownerDocument,r=n.body;return r===e?lr(r.offsetLeft,r.offsetTop):Ln(t)?fr(e):lr(0,0)},hr=or("width",(function(t){return t.dom.offsetWidth})),pr=function(t,e){return hr.set(t,e)},vr=function(t){return hr.get(t)},br=function(t){return hr.getOuter(t)},yr=function(t,e){var n=["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"],r=hr.max(t,e,n);Kn(t,"max-width",r+"px")},wr=function(t,e,n,r,o,i,u){return{target:t,x:e,y:n,stop:r,prevent:o,kill:i,raw:u}},xr=function(t){var e=ee.fromDom(zn(t).getOr(t.target)),n=function(){return t.stopPropagation()},r=function(){return t.preventDefault()},o=b(r,n);return wr(e,t.clientX,t.clientY,n,r,o,t)},Cr=function(t,e){return function(n){t(n)&&e(xr(n))}},Sr=function(t,e,n,r,o){var i=Cr(n,r);return t.dom.addEventListener(e,i,o),{unbind:S(Or,t,e,i,o)}},kr=function(t,e,n,r){return Sr(t,e,n,r,!1)},Tr=function(t,e,n,r){return Sr(t,e,n,r,!0)},Or=function(t,e,n,r){t.dom.removeEventListener(e,n,r)},Er=function(t,e){var n=vn(t);n.each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},_r=function(t,e){var n=wn(t);n.fold((function(){var n=vn(t);n.each((function(t){Dr(t,e)}))}),(function(t){Er(t,e)}))},Ar=function(t,e){var n=Sn(t);n.fold((function(){Dr(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))},Dr=function(t,e){t.dom.appendChild(e.dom)},Mr=function(t,e,n){Cn(t,n).fold((function(){Dr(t,e)}),(function(t){Er(t,e)}))},Rr=function(t,e){G(e,(function(e){Er(t,e)}))},Nr=function(t,e){G(e,(function(e){Dr(t,e)}))},zr=function(t){t.dom.textContent="",G(xn(t),(function(t){Br(t)}))},Br=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},Lr=function(t){var e=xn(t);e.length>0&&Rr(t,e),Br(t)},Hr=function(t){var e=void 0!==t?t.dom:document,n=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return lr(n,r)},Ir=function(t,e,n){var r=void 0!==n?n.dom:document,o=r.defaultView;o&&o.scrollTo(t,e)},Pr=function(t){var e=void 0===t?window:t;return en().browser.isFirefox()?L.none():L.from(e["visualViewport"])},Fr=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Vr=function(t){var e=void 0===t?window:t,n=e.document,r=Hr(ee.fromDom(n));return Pr(e).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return Fr(r.left,r.top,n,o)}),(function(t){return Fr(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))},Ur=function(t,e){var n=t.view(e);return n.fold(w([]),(function(e){var n=t.owner(e),r=Ur(t,n);return[e].concat(r)}))},jr=function(t,e){var n=e.owner(t),r=Ur(e,n);return L.some(r)},Wr=function(t){var e,n=t.dom===document?L.none():L.from(null===(e=t.dom.defaultView)||void 0===e?void 0:e.frameElement);return n.map(ee.fromDom)},qr=function(t){return mn(t)},$r=Object.freeze({__proto__:null,view:Wr,owner:qr}),Gr=function(t){var e=ee.fromDom(document),n=Hr(e),r=jr(t,$r);return r.fold(S(mr,t),(function(e){var r=gr(t),o=J(e,(function(t,e){var n=gr(e);return{left:t.left+n.left,top:t.top+n.top}}),{left:0,top:0});return lr(o.left+r.left+n.left,o.top+r.top+n.top)}))},Kr=function(t,e,n){return{point:t,width:e,height:n}},Xr=function(t,e,n,r){return{x:t,y:e,width:n,height:r}},Yr=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Jr=function(t){var e=mr(t),n=br(t),r=ar(t);return Yr(e.left,e.top,n,r)},Qr=function(t){var e=Gr(t),n=br(t),r=ar(t);return Yr(e.left,e.top,n,r)},Zr=function(){return Vr(window)},to=function(t){var e=function(e){return to(t)},n=function(e){return to(t)},r=function(e){return to(e(t))},o=function(e){return to(t)},i=function(e){e(t)},u=function(e){return e(t)},a=function(e,n){return n(t)},c=function(e){return e(t)},s=function(e){return e(t)},l=function(){return L.some(t)};return{isValue:E,isError:O,getOr:w(t),getOrThunk:w(t),getOrDie:w(t),or:e,orThunk:n,fold:a,map:r,mapError:o,each:i,bind:u,exists:c,forall:s,toOptional:l}},eo=function(t){var e=function(t){return t()},n=function(){return T(String(t))()},r=x,o=function(t){return t()},i=function(e){return eo(t)},u=function(e){return eo(e(t))},a=function(e){return eo(t)},c=function(e,n){return e(t)};return{isValue:O,isError:E,getOr:x,getOrThunk:e,getOrDie:n,or:r,orThunk:o,fold:c,map:i,mapError:u,each:p,bind:a,exists:O,forall:E,toOptional:L.none}},no=function(t,e){return t.fold((function(){return eo(e)}),to)},ro={value:to,error:eo,fromOption:no};(function(t){t[t["Error"]=0]="Error",t[t["Value"]=1]="Value"})(ne||(ne={}));var oo=function(t,e,n){return t.stype===ne.Error?e(t.serror):n(t.svalue)},io=function(t){var e=[],n=[];return G(t,(function(t){oo(t,(function(t){return n.push(t)}),(function(t){return e.push(t)}))})),{values:e,errors:n}},uo=function(t,e){return t.stype===ne.Error?{stype:ne.Error,serror:e(t.serror)}:t},ao=function(t,e){return t.stype===ne.Value?{stype:ne.Value,svalue:e(t.svalue)}:t},co=function(t,e){return t.stype===ne.Value?e(t.svalue):t},so=function(t,e){return t.stype===ne.Error?e(t.serror):t},lo=function(t){return{stype:ne.Value,svalue:t}},fo=function(t){return{stype:ne.Error,serror:t}},mo=function(t){return oo(t,ro.error,ro.value)},go=function(t){return t.fold(fo,lo)},ho={fromResult:go,toResult:mo,svalue:lo,partition:io,serror:fo,bind:co,bindError:so,map:ao,mapError:uo,fold:oo},po=function(t,e,n,r){return{tag:"field",key:t,newKey:e,presence:n,prop:r}},vo=function(t,e){return{tag:"custom",newKey:t,instantiator:e}},bo=function(t,e,n){switch(t.tag){case"field":return e(t.key,t.newKey,t.presence,t.prop);case"custom":return n(t.newKey,t.instantiator)}},yo=function(t,e){return e},wo=function(t,e){var n=u(t)&&u(e);return n?Co(t,e):e},xo=function(t){return function(){for(var e=[],n=0;n0?ho.svalue(Co(e,So.apply(void 0,t))):ho.svalue(e)},Mo=function(t){return b(ho.serror,nt)(t)},Ro=function(t,e){var n=ho.partition(t);return n.errors.length>0?Mo(n.errors):Do(n.values,e)},No=function(t){var e=ho.partition(t);return e.errors.length>0?Mo(e.errors):ho.svalue(e.values)},zo={consolidateObj:Ro,consolidateArr:No},Bo=function(t){return u(t)&&ht(t).length>100?" removed due to size":JSON.stringify(t,null,2)},Lo=function(t){var e=t.length>10?t.slice(0,10).concat([{path:[],getErrorInfo:w("... (only showing first ten failures)")}]):t;return $(e,(function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}))},Ho=function(t,e){return ho.serror([{path:t,getErrorInfo:e}])},Io=function(t,e,n){return Ho(t,(function(){return'Could not find valid *required* value for "'+e+'" in '+Bo(n)}))},Po=function(t,e){return Ho(t,(function(){return'Choice schema did not contain choice key: "'+e+'"'}))},Fo=function(t,e,n){return Ho(t,(function(){return'The chosen schema: "'+n+'" did not exist in branches: '+Bo(e)}))},Vo=function(t,e){return Ho(t,(function(){return"There are unsupported fields: ["+e.join(", ")+"] specified"}))},Uo=function(t,e){return Ho(t,w(e))},jo=function(t){var e=function(e,n){return ho.bindError(t(n),(function(t){return Uo(e,t)}))},n=w("val");return{extract:e,toString:n}},Wo=jo(ho.svalue),qo=function(t,e,n,r){return Ot(e,n).fold((function(){return Io(t,n,e)}),r)},$o=function(t,e,n,r){var o=Ot(t,e).getOrThunk((function(){return n(t)}));return r(o)},Go=function(t,e,n){return n(Ot(t,e))},Ko=function(t,e,n,r){var o=Ot(t,e).map((function(e){return!0===e?n(t):e}));return r(o)},Xo=function(t,e,n,r,o){var i=function(t){return o.extract(e.concat([r]),t)},u=function(t){return t.fold((function(){return ho.svalue(L.none())}),(function(t){var n=o.extract(e.concat([r]),t);return ho.map(n,L.some)}))};switch(t.tag){case"required":return qo(e,n,r,i);case"defaultedThunk":return $o(n,r,t.process,i);case"option":return Go(n,r,u);case"defaultedOptionThunk":return Ko(n,r,t.process,u);case"mergeWithThunk":return $o(n,r,w({}),(function(e){var r=Co(t.process(n),e);return i(r)}))}},Yo=function(t,e,n){for(var r={},o=[],i=0,u=n;i0?ho.serror(o):ho.svalue(r)},Jo=function(t){var e=function(e,n){return t().extract(e,n)},n=function(){return t().toString()};return{extract:e,toString:n}},Qo=function(t){return ht(Ct(t,d))},Zo=function(t){var e=ti(t),n=J(t,(function(t,e){return bo(e,(function(e){var n;return Co(t,(n={},n[e]=!0,n))}),w(t))}),{}),r=function(t,r){var o=s(r)?[]:Qo(r),i=Y(o,(function(t){return!_t(n,t)}));return 0===i.length?e.extract(t,r):Vo(t,i)};return{extract:r,toString:e.toString}},ti=function(t){var e=function(e,n){return Yo(e,n,t)},n=function(){var e=$(t,(function(t){return bo(t,(function(t,e,n,r){return t+" -> "+r.toString()}),(function(t,e){return"state("+t+")"}))}));return"obj{\n"+e.join("\n")+"}"};return{extract:e,toString:n}},ei=function(t){var e=function(e,n){var r=$(n,(function(n,r){return t.extract(e.concat(["["+r+"]"]),n)}));return zo.consolidateArr(r)},n=function(){return"array("+t.toString()+")"};return{extract:e,toString:n}},ni=function(t){var e=function(e,n){for(var r=[],o=0,i=t;o0?pu(n.errors):hu(n.values,e)},bu=function(t){return m(t)?t:O},yu=function(t,e,n){var r=t.dom,o=bu(n);while(r.parentNode){r=r.parentNode;var i=ee.fromDom(r),u=e(i);if(u.isSome())return u;if(o(i))break}return L.none()},wu=function(t,e,n){var r=e(t),o=bu(n);return r.orThunk((function(){return o(t)?L.none():yu(t,e,o)}))},xu=function(t,e){return sn(t.element,e.event.target)},Cu={can:E,abort:O,run:p},Su=function(t){if(!_t(t,"can")&&!_t(t,"abort")&&!_t(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return A(A({},Cu),t)},ku=function(t,e){return function(){for(var n=[],r=0;r1?Y(e[n],(function(e){return j(t,(function(t){return t.name===e}))})).join(" > "):t[0].name;return mu(n,zc(o,i))}))}));return vu(n,{})},$c="alloy.base.behaviour",Gc=ti([Oi("dom","dom",ko(),ti([Ai("tag"),Ki("styles",{}),Ki("classes",[]),Ki("attributes",{}),Fi("value"),Fi("innerHtml")])),Ai("components"),Ai("uid"),Ki("events",{}),Ki("apis",{}),Oi("eventOrder","eventOrder",Ao((au={},au[ea()]=["disabling",$c,"toggling","typeaheadevents"],au[Ju()]=[$c,"focusing","keying"],au[aa()]=[$c,"disabling","toggling","representing"],au[Uu()]=[$c,"representing","streaming","invalidating"],au[ma()]=[$c,"representing","item-events","tooltipping"],au[Nu()]=["focusing",$c,"item-type-events"],au[Au()]=["focusing",$c,"item-type-events"],au[Hu()]=["item-type-events","tooltipping"],au[ta()]=["receiving","reflecting","tooltipping"],au)),ui()),Fi("domModification")]),Kc=function(t){return wi("custom.definition",Gc,t)},Xc=function(t){return A(A({},t.dom),{uid:t.uid,domChildren:$(t.components,(function(t){return t.element}))})},Yc=function(t){return t.domModification.fold((function(){return Dc({})}),Dc)},Jc=function(t){return t.events},Qc=function(t,e){var n=Un(t,e);return void 0===n||""===n?[]:n.split(" ")},Zc=function(t,e,n){var r=Qc(t,e),o=r.concat([n]);return Fn(t,e,o.join(" ")),!0},ts=function(t,e,n){var r=Y(Qc(t,e),(function(t){return t!==n}));return r.length>0?Fn(t,e,r.join(" ")):qn(t,e),!1},es=function(t){return void 0!==t.dom.classList},ns=function(t){return Qc(t,"class")},rs=function(t,e){return Zc(t,"class",e)},os=function(t,e){return ts(t,"class",e)},is=function(t,e){es(t)?t.dom.classList.add(e):rs(t,e)},us=function(t){var e=es(t)?t.dom.classList:ns(t);0===e.length&&qn(t,"class")},as=function(t,e){if(es(t)){var n=t.dom.classList;n.remove(e)}else os(t,e);us(t)},cs=function(t,e){return es(t)&&t.dom.classList.contains(e)},ss=function(t,e){G(e,(function(e){is(t,e)}))},ls=function(t,e){G(e,(function(e){as(t,e)}))},fs=function(t,e){return ot(e,(function(e){return cs(t,e)}))},ds=function(t){return t.dom.value},ms=function(t,e){if(void 0===e)throw new Error("Value.set was undefined");t.dom.value=e},gs=function(t){var e=ee.fromTag(t.tag);Vn(e,t.attributes),ss(e,t.classes),Xn(e,t.styles),t.innerHtml.each((function(t){return Ka(e,t)}));var n=t.domChildren;return Nr(e,n),t.value.each((function(t){ms(e,t)})),t.uid,lc(e,t.uid),e},hs=function(t){var e=Ot(t,"behaviours").getOr({});return rt(ht(e),(function(t){var n=e[t];return d(n)?[n.me]:[]}))},ps=function(t,e){return Oc(t,e)},vs=function(t){var e=hs(t);return ps(t,e)},bs=function(t,e,n){var r=Xc(t),o=Yc(t),i={"alloy.base.modification":o},u=e.length>0?Rc(n,i,e,r):o;return Mc(r,u)},ys=function(t,e,n){var r={"alloy.base.behaviour":Jc(t)};return Vc(n,t.eventOrder,e,r).getOrDie()},ws=function(t){var e=function(){return y},n=ou(hc),r=xi(Kc(t)),o=vs(t),i=Ec(o),u=_c(o),a=bs(r,i,u),c=gs(a),s=ys(r,i,u),l=ou(r.components),f=function(t){n.set(t)},d=function(){n.set(gc(e))},g=function(){var t=xn(c),e=rt(t,(function(t){return n.get().getByDom(t).fold((function(){return[]}),ct)}));l.set(e)},h=function(e){var n=u,r=m(n[e.name()])?n[e.name()]:function(){throw new Error("Could not find "+e.name()+" in "+JSON.stringify(t,null,2))};return r()},p=function(t){return m(u[t.name()])},v=function(){return r.apis},b=function(t){return u[t]().map((function(t){return t.state.readState()})).getOr("not enabled")},y={uid:t.uid,getSystem:n.get,config:h,hasConfigured:p,spec:t,readState:b,getApis:v,connect:f,disconnect:d,element:c,syncComponents:g,components:l.get,events:s};return y},xs=function(t){var e=Ot(t,"components").getOr([]);return $(e,Es)},Cs=function(t){var e=mc(t),n=e.events,r=D(e,["events"]),o=xs(r),i=A(A({},r),{events:A(A({},nc),n),components:o});return ro.value(ws(i))},Ss=function(t){var e=ee.fromText(t);return ks({element:e})},ks=function(t){var e=Ci("external.component",Zo([Ai("element"),Fi("uid")]),t),n=ou(gc()),r=function(t){n.set(t)},o=function(){n.set(gc((function(){return u})))},i=e.uid.getOrThunk((function(){return dc("external")}));lc(e.element,i);var u={uid:i,getSystem:n.get,config:L.none,hasConfigured:O,connect:r,disconnect:o,getApis:function(){return{}},element:e.element,spec:t,readState:w("No state"),syncComponents:p,components:w([]),events:{}};return xc(u)},Ts=dc,Os=function(t){return Et(t,"uid")},Es=function(t){return Cc(t).getOrThunk((function(){var e=Os(t)?t:A({uid:Ts("")},t);return Cs(e).getOrDie()}))},_s=xc;function As(t,e,n,r,o){return t(n,r)?L.some(n):m(o)&&o(n)?L.none():e(n,r,o)}var Ds,Ms=function(t,e,n){var r=t.dom,o=m(n)?n:O;while(r.parentNode){r=r.parentNode;var i=ee.fromDom(r);if(e(i))return L.some(i);if(o(i))break}return L.none()},Rs=function(t,e,n){var r=function(t,e){return e(t)};return As(r,Ms,t,e,n)},Ns=function(t,e){var n=function(t){return e(ee.fromDom(t))},r=tt(t.dom.childNodes,n);return r.map(ee.fromDom)},zs=function(t,e){var n=function(t){for(var r=0;r-1}));return e.bind((function(t){var e=Un(t,"id"),n=An(t);return Is(n,'[aria-owns="'+e+'"]')}))},Vs=function(){var t=oc("aria-owns"),e=function(e){Fn(e,"aria-owns",t)},n=function(t){qn(t,"aria-owns")};return{id:t,link:e,unlink:n}},Us=function(t,e){return Fs(e).exists((function(e){return js(t,e)}))},js=function(t,e){return Bs(e,(function(e){return sn(e,t.element)}),O)||Us(t,e)},Ws="unknown";(function(t){t[t["STOP"]=0]="STOP",t[t["NORMAL"]=1]="NORMAL",t[t["LOGGING"]=2]="LOGGING"})(Ds||(Ds={}));var qs=ou({}),$s=function(t,e){var n=[],r=(new Date).getTime();return{logEventCut:function(t,e,r){n.push({outcome:"cut",target:e,purpose:r})},logEventStopped:function(t,e,r){n.push({outcome:"stopped",target:e,purpose:r})},logNoParent:function(t,e,r){n.push({outcome:"no-parent",target:e,purpose:r})},logEventNoHandlers:function(t,e){n.push({outcome:"no-handlers-left",target:e})},logEventResponse:function(t,e,r){n.push({outcome:"response",purpose:r,target:e})},write:function(){var o=(new Date).getTime();U(["mousemove","mouseover","mouseout",aa()],t)||console.log(t,{event:t,time:o-r,target:e.dom,sequence:$(n,(function(t){return U(["cut","stopped","response"],t.outcome)?"{"+t.purpose+"} "+t.outcome+" at ("+Za(t.target)+")":t.outcome}))})}}},Gs=function(t,e,n){var r=Ot(qs.get(),t).orThunk((function(){var e=ht(qs.get());return gt(e,(function(e){return t.indexOf(e)>-1?L.some(qs.get()[e]):L.none()}))})).getOr(Ds.NORMAL);switch(r){case Ds.NORMAL:return n(Qs());case Ds.LOGGING:var o=$s(t,e),i=n(o);return o.write(),i;case Ds.STOP:return!0}},Ks=["alloy/data/Fields","alloy/debugging/Debugging"],Xs=function(){var t=new Error;if(void 0!==t.stack){var e=t.stack.split("\n");return tt(e,(function(t){return t.indexOf("alloy")>0&&!j(Ks,(function(e){return t.indexOf(e)>-1}))})).getOr(Ws)}return Ws},Ys={logEventCut:p,logEventStopped:p,logNoParent:p,logEventNoHandlers:p,logEventResponse:p,write:p},Js=function(t,e,n){return Gs(t,e,n)},Qs=w(Ys),Zs=w([Ai("menu"),Ai("selectedMenu")]),tl=w([Ai("item"),Ai("selectedItem")]);w(ti(tl().concat(Zs())));var el=w(ti(tl())),nl=Hi("initSize",[Ai("numColumns"),Ai("numRows")]),rl=function(){return Di("markers",el())},ol=function(){return Hi("markers",[Ai("backgroundMenu")].concat(Zs()).concat(tl()))},il=function(t){return Hi("markers",$(t,Ai))},ul=function(t,e,n){return Xs(),Oi(e,e,n,vi((function(t){return ro.value((function(){for(var e=[],n=0;nr?n:o=n&&u<=o,m=a>=r&&a<=i,g=d&&m,h=c<=o&&c>=n,p=s<=i&&s>=r,v=h&&p,b=Math.min(l,u>=n?o-u:c-n),y=Math.min(f,a>=r?i-a:s-r);return{originInBounds:g,sizeInBounds:v,visibleW:b,visibleH:y}},Yf=function(t,e){var n=e.x,r=e.y,o=e.right,i=e.bottom,u=t.x,a=t.y,c=t.width,s=t.height,l=Math.max(n,o-c),f=Math.max(r,i-s),d=_l(u,n,l),m=_l(a,r,f),g=Math.min(d+c,o)-d,h=Math.min(m+s,i)-m;return Yr(d,m,g,h)},Jf=function(t,e,n){var r=w(e.bottom-n.y),o=w(n.bottom-e.y),i=vl(t,o,o,r),u=w(e.right-n.x),a=w(n.right-e.x),c=bl(t,a,a,u);return{maxWidth:c,maxHeight:i}},Qf=function(t,e,n,r){var o=t.bubble,i=o.offset,u=Ml(r,t.restriction,i),a=t.x+i.left,c=t.y+i.top,s=Yr(a,c,e,n),l=Xf(s,u),f=l.originInBounds,d=l.sizeInBounds,m=l.visibleW,g=l.visibleH,h=f&&d,p=h?s:Yf(s,u),v=p.width>0&&p.height>0,b=Jf(t.direction,p,r),y=b.maxWidth,w=b.maxHeight,x={rect:p,maxHeight:w,maxWidth:y,direction:t.direction,placement:t.placement,classes:{on:o.classesOn,off:o.classesOff},layout:t.label,testY:c};return h||t.alwaysFit?Kf.fit(x):Kf.nofit(x,m,g,v)},Zf=function(t,e,n,r,o,i){var u=r.width,a=r.height,c=function(e,c,s,l,f){var d=e(n,r,o,t,i),m=Qf(d,u,a,i);return m.fold(w(m),(function(t,e,n,r){var o=f===r?n>l||e>s:!f&&r;return o?m:Kf.nofit(c,s,l,f)}))},s=Q(e,(function(t,e){var n=S(c,e);return t.fold(w(t),n)}),Kf.nofit({rect:n,maxHeight:r.height,maxWidth:r.width,direction:yl(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:n.y},-1,-1,!1));return s.fold(x,x)},td=function(t){var e=ou(L.none()),n=function(){return e.get().each(t)},r=function(){n(),e.set(L.none())},o=function(){return e.get().isSome()},i=function(){return e.get()},u=function(t){n(),e.set(L.some(t))};return{clear:r,isSet:o,get:i,set:u}},ed=function(){return td((function(t){return t.destroy()}))},nd=function(){return td((function(t){return t.unbind()}))},rd=function(){var t=ed(),e=function(e){return t.get().each(e)};return A(A({},t),{run:e})},od=function(){var t=td(p),e=function(e){return t.get().each(e)};return A(A({},t),{on:e})},id=E,ud=function(t,e,n){return kr(t,e,id,n)},ad=function(t,e,n){return Tr(t,e,id,n)},cd=xr,sd=["top","bottom","right","left"],ld="data-alloy-transition-timer",fd=function(t,e){return fs(t,e.classes)},dd=function(t,e,n){return n.exists((function(n){var r=t.mode;return"all"===r||n[r]!==e[r]}))},md=function(t,e){var n=function(t){return parseFloat(t).toFixed(3)};return kt(e,(function(e,r){var o=t[r].map(n),i=e.map(n);return!Dt(o,i)})).isSome()},gd=function(t){var e=function(e){var n=Jn(t,e),r=i(n)?n.split(/\s*,\s*/):[];return Y(r,Gt)},n=function(t){if(i(t)&&/^[\d.]+/.test(t)){var e=parseFloat(t);return Wt(t,"ms")?e:1e3*e}return 0},r=e("transition-delay"),o=e("transition-duration");return Q(o,(function(t,e,o){var i=n(r[o])+n(e);return Math.max(t,i)}),0)},hd=function(t,e){var n,r=nd(),o=nd(),i=function(e){var n,r=null!==(n=e.raw.pseudoElement)&&void 0!==n?n:"";return sn(e.target,t)&&Kt(r)&&U(sd,e.raw.propertyName)},u=function(u){if(f(u)||i(u)){r.clear(),o.clear();var a=null===u||void 0===u?void 0:u.raw.type;(f(a)||a===$u())&&(clearTimeout(n),qn(t,ld),ls(t,e.classes))}},a=function(){r.set(ud(t,$u(),u)),o.set(ud(t,qu(),u))};if("ontransitionstart"in t.dom)var c=ud(t,Gu(),(function(t){i(t)&&(c.unbind(),a())}));else a();var s=gd(t);requestAnimationFrame((function(){n=setTimeout(u,s+17),Fn(t,ld,n)}))},pd=function(t,e){ss(t,e.classes),jn(t,ld).each((function(e){clearTimeout(parseInt(e,10)),qn(t,ld)})),hd(t,e)},vd=function(t,e,n,r,o,i){var u=dd(r,o,i);if(u||fd(t,r)){Kn(t,"position",n.position);var a=Bf(e,t),c=zf(e,A(A({},o),{rect:a})),s=at(sd,(function(t){return c[t]}));md(n,s)&&(Yn(t,s),u&&pd(t,r),rr(t))}else ls(t,r.classes)},bd=function(t){return{width:br(t),height:ar(t)}},yd=function(t,e,n,r){nr(e,"max-height"),nr(e,"max-width");var o=bd(e);return Zf(e,r.preference,t,o,n,r.bounds)},wd=function(t,e){var n=e.classes;ls(t,n.off),ss(t,n.on)},xd=function(t,e,n){var r=n.maxHeightFunction;r(t,e.maxHeight)},Cd=function(t,e,n){var r=n.maxWidthFunction;r(t,e.maxWidth)},Sd=function(t,e,n){var r=zf(n.origin,e);n.transition.each((function(o){vd(t,n.origin,r,o,e,n.lastPlacement)})),Mf(t,r)},kd=function(t,e){qf(t,e.placement)},Td=function(t,e){cr(t,Math.floor(e))},Od=w((function(t,e){Td(t,e),Xn(t,{"overflow-x":"hidden","overflow-y":"auto"})})),Ed=w((function(t,e){Td(t,e)})),_d=function(t,e,n){return void 0===t[e]?n:t[e]},Ad=function(t,e,n,r,o,i,u,a){var c=_d(u,"maxHeightFunction",Od()),s=_d(u,"maxWidthFunction",p),l=t.anchorBox,f=t.origin,d={bounds:Lf(f,i),origin:f,preference:r,maxHeightFunction:c,maxWidthFunction:s,lastPlacement:o,transition:a};return Dd(l,e,n,d)},Dd=function(t,e,n,r){var o=yd(t,e,n,r);return Sd(e,o,r),kd(e,o),wd(e,o),xd(e,o,r),Cd(e,o,r),{layout:o.layout,placement:o.placement}},Md=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],Rd=function(t,e,n,r){void 0===r&&(r=1);var o=t*r,i=e*r,u=function(t){return Ot(n,t).getOr([])},a=function(t,e,n){var r=ut(Md,n);return{offset:lr(t,e),classesOn:rt(n,u),classesOff:rt(r,u)}};return{southeast:function(){return a(-t,e,["top","alignLeft"])},southwest:function(){return a(t,e,["top","alignRight"])},south:function(){return a(-t/2,e,["top","alignCentre"])},northeast:function(){return a(-t,-e,["bottom","alignLeft"])},northwest:function(){return a(t,-e,["bottom","alignRight"])},north:function(){return a(-t/2,-e,["bottom","alignCentre"])},east:function(){return a(t,-e/2,["valignCentre","left"])},west:function(){return a(-t,-e/2,["valignCentre","right"])},insetNortheast:function(){return a(o,i,["top","alignLeft","inset"])},insetNorthwest:function(){return a(-o,i,["top","alignRight","inset"])},insetNorth:function(){return a(-o/2,i,["top","alignCentre","inset"])},insetSoutheast:function(){return a(o,-i,["bottom","alignLeft","inset"])},insetSouthwest:function(){return a(-o,-i,["bottom","alignRight","inset"])},insetSouth:function(){return a(-o/2,-i,["bottom","alignCentre","inset"])},insetEast:function(){return a(-o,-i/2,["valignCentre","right","inset"])},insetWest:function(){return a(o,-i/2,["valignCentre","left","inset"])}}},Nd=function(){return Rd(0,0,{})},zd=x,Bd=function(t,e){return function(n){return"rtl"===Ld(n)?e:t}},Ld=function(t){return"rtl"===Jn(t,"direction")?"rtl":"ltr"};(function(t){t["TopToBottom"]="toptobottom",t["BottomToTop"]="bottomtotop"})(Pf||(Pf={}));var Hd="data-alloy-vertical-dir",Id=function(t){return Bs(t,(function(t){return le(t)&&Un(t,"data-alloy-vertical-dir")===Pf.BottomToTop}))},Pd=function(){return $i("layouts",[Ai("onLtr"),Ai("onRtl"),Fi("onBottomLtr"),Fi("onBottomRtl")])},Fd=function(t,e,n,r,o,i,u){var a=u.map(Id).getOr(!1),c=e.layouts.map((function(e){return e.onLtr(t)})),s=e.layouts.map((function(e){return e.onRtl(t)})),l=a?e.layouts.bind((function(e){return e.onBottomLtr.map((function(e){return e(t)}))})).or(c).getOr(o):c.getOr(n),f=a?e.layouts.bind((function(e){return e.onBottomRtl.map((function(e){return e(t)}))})).or(s).getOr(i):s.getOr(r),d=Bd(l,f);return d(t)},Vd=function(t,e,n){var r=e.hotspot,o=Bf(n,r.element),i=Fd(t.element,e,Zl(),tf(),Jl(),Ql(),L.some(e.hotspot.element));return L.some(zd({anchorBox:o,bubble:e.bubble.getOr(Nd()),overrides:e.overrides,layouts:i,placer:L.none()}))},Ud=[Ai("hotspot"),Fi("bubble"),Ki("overrides",{}),Pd(),fl("placement",Vd)],jd=function(t,e,n){var r=Hf(n,e.x,e.y),o=Yr(r.left,r.top,e.width,e.height),i=Fd(t.element,e,Xl(),Yl(),Xl(),Yl(),L.none());return L.some(zd({anchorBox:o,bubble:e.bubble,overrides:e.overrides,layouts:i,placer:L.none()}))},Wd=[Ai("x"),Ai("y"),Ki("height",0),Ki("width",0),Ki("bubble",Nd()),Ki("overrides",{}),Pd(),fl("placement",jd)],qd=uu.generate([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),$d=function(t){return t.fold(x,(function(t,e,n){return t.translate(-e,-n)}))},Gd=function(t){return t.fold(x,x)},Kd=function(t){return Q(t,(function(t,e){return t.translate(e.left,e.top)}),lr(0,0))},Xd=function(t){var e=$(t,$d);return Kd(e)},Yd=function(t){var e=$(t,Gd);return Kd(e)},Jd=qd.screen,Qd=qd.absolute,Zd=function(t,e,n){var r=pn(n.root).dom,o=function(e){var n=mn(e),r=mn(t.element);return sn(n,r)};return L.from(r.frameElement).map(ee.fromDom).filter(o).map(mr)},tm=function(t,e,n){var r=mn(t.element),o=Hr(r),i=Zd(t,e,n).getOr(o);return Qd(i,o.left,o.top)},em=function(t,e,n,r){var o=Jd(lr(t,e));return L.some(Kr(o,n,r))},nm=function(t,e,n,r,o){return t.map((function(t){var i=[e,t.point],u=If(r,(function(){return Yd(i)}),(function(){return Yd(i)}),(function(){return Xd(i)})),a=Xr(u.left,u.top,t.width,t.height),c=n.showAbove?Jl():Zl(),s=n.showAbove?Ql():tf(),l=Fd(o,n,c,s,c,s,L.none());return zd({anchorBox:a,bubble:n.bubble.getOr(Nd()),overrides:n.overrides,layouts:l,placer:L.none()})}))},rm=function(t,e,n){var r=tm(t,n,e);return e.node.filter(Ln).bind((function(o){var i=o.dom.getBoundingClientRect(),u=em(i.left,i.top,i.width,i.height),a=e.node.getOr(t.element);return nm(u,r,e,n,a)}))},om=[Ai("node"),Ai("root"),Fi("bubble"),Pd(),Ki("overrides",{}),Ki("showAbove",!1),fl("placement",rm)],im="\ufeff",um=" ",am=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},cm={create:am},sm=uu.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),lm=function(t,e,n,r){return t.fold(e,n,r)},fm=function(t){return t.fold(x,x,x)},dm=sm.before,mm=sm.on,gm=sm.after,hm={before:dm,on:mm,after:gm,cata:lm,getStart:fm},pm=uu.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),vm=function(t){return pm.exact(t.start,t.soffset,t.finish,t.foffset)},bm=function(t){return t.match({domRange:function(t){return ee.fromDom(t.startContainer)},relative:function(t,e){return hm.getStart(t)},exact:function(t,e,n,r){return t}})},ym=pm.domRange,wm=pm.relative,xm=pm.exact,Cm=function(t){var e=bm(t);return pn(e)},Sm=cm.create,km={domRange:ym,relative:wm,exact:xm,exactFromRange:vm,getWin:Cm,range:Sm},Tm=function(t,e){e.fold((function(e){t.setStartBefore(e.dom)}),(function(e,n){t.setStart(e.dom,n)}),(function(e){t.setStartAfter(e.dom)}))},Om=function(t,e){e.fold((function(e){t.setEndBefore(e.dom)}),(function(e,n){t.setEnd(e.dom,n)}),(function(e){t.setEndAfter(e.dom)}))},Em=function(t,e,n){var r=t.document.createRange();return Tm(r,e),Om(r,n),r},_m=function(t,e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},Am=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}},Dm=function(t){var e=t.getClientRects(),n=e.length>0?e[0]:t.getBoundingClientRect();return n.width>0||n.height>0?L.some(n).map(Am):L.none()},Mm=function(t){var e=t.getBoundingClientRect();return e.width>0||e.height>0?L.some(e).map(Am):L.none()},Rm=uu.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Nm=function(t,e,n){return e(ee.fromDom(n.startContainer),n.startOffset,ee.fromDom(n.endContainer),n.endOffset)},zm=function(t,e){return e.match({domRange:function(t){return{ltr:w(t),rtl:L.none}},relative:function(e,n){return{ltr:ge((function(){return Em(t,e,n)})),rtl:ge((function(){return L.some(Em(t,n,e))}))}},exact:function(e,n,r,o){return{ltr:ge((function(){return _m(t,e,n,r,o)})),rtl:ge((function(){return L.some(_m(t,r,o,e,n))}))}}})},Bm=function(t,e){var n=e.ltr();if(n.collapsed){var r=e.rtl().filter((function(t){return!1===t.collapsed}));return r.map((function(t){return Rm.rtl(ee.fromDom(t.endContainer),t.endOffset,ee.fromDom(t.startContainer),t.startOffset)})).getOrThunk((function(){return Nm(t,Rm.ltr,n)}))}return Nm(t,Rm.ltr,n)},Lm=function(t,e){var n=zm(t,e);return Bm(t,n)},Hm=function(t,e){var n=Lm(t,e);return n.match({ltr:function(e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},rtl:function(e,n,r,o){var i=t.document.createRange();return i.setStart(r.dom,o),i.setEnd(e.dom,n),i}})};Rm.ltr,Rm.rtl;var Im,Pm=function(t,e){var n=function(n){if(!t(n))throw new Error("Can only get "+e+" value of a "+e+" node");return r(n).getOr("")},r=function(e){return t(e)?L.from(e.dom.nodeValue):L.none()},o=function(n,r){if(!t(n))throw new Error("Can only set raw "+e+" value of a "+e+" node");n.dom.nodeValue=r};return{get:n,getOption:r,set:o}},Fm=Pm(fe,"text"),Vm=function(t){return Fm.get(t)},Um=function(t){return Fm.getOption(t)},jm=function(t){return"img"===ae(t)?1:Um(t).fold((function(){return xn(t).length}),(function(t){return t.length}))},Wm=function(t){return Um(t).filter((function(t){return 0!==t.trim().length||t.indexOf(um)>-1})).isSome()},qm=["img","br"],$m=function(t){var e=Wm(t);return e||U(qm,ae(t))},Gm=function(t){return Km(t,$m)},Km=function(t,e){var n=function(t){for(var r=xn(t),o=r.length-1;o>=0;o--){var i=r[o];if(e(i))return L.some(i);var u=n(i);if(u.isSome())return u}return L.none()};return n(t)},Xm=function(t,e){return an(e,t)},Ym=function(t,e,n,r){var o=mn(t),i=o.dom.createRange();return i.setStart(t.dom,e),i.setEnd(n.dom,r),i},Jm=function(t,e,n,r){var o=Ym(t,e,n,r),i=sn(t,n)&&e===r;return o.collapsed&&!i},Qm=function(t){return L.from(t.getSelection())},Zm=function(t){if(t.rangeCount>0){var e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);return L.some(cm.create(ee.fromDom(e.startContainer),e.startOffset,ee.fromDom(n.endContainer),n.endOffset))}return L.none()},tg=function(t){if(null===t.anchorNode||null===t.focusNode)return Zm(t);var e=ee.fromDom(t.anchorNode),n=ee.fromDom(t.focusNode);return Jm(e,t.anchorOffset,n,t.focusOffset)?L.some(cm.create(e,t.anchorOffset,n,t.focusOffset)):Zm(t)},eg=function(t){return Qm(t).filter((function(t){return t.rangeCount>0})).bind(tg)},ng=function(t,e){var n=Hm(t,e);return Dm(n)},rg=function(t,e){var n=Hm(t,e);return Mm(n)},og=function(t,e){return{element:t,offset:e}},ig=function(t,e){var n=xn(t);if(0===n.length)return og(t,e);if(e"})),ui()),Cp=Ei("schema",(function(){return[Fi("preprocess")]})),Sp=Ki("defaults",w({})),kp=Ki("overrides",w({})),Tp=ti([bp,yp,wp,xp,Sp,kp]),Op=ti([bp,yp,wp,Sp,kp]),Ep=ti([bp,yp,wp,xp,Sp,kp]),_p=ti([bp,Cp,wp,Ai("unit"),xp,Sp,kp]),Ap=function(t){return t.fold(L.some,L.none,L.some,L.some)},Dp=function(t){var e=function(t){return t.name};return t.fold(e,e,e,e)},Mp=function(t){return t.fold(x,x,x,x)},Rp=function(t,e){return function(n){var r=Ci("Converting part type",e,n);return t(r)}},Np=Rp(vp.required,Tp),zp=Rp(vp.external,Op),Bp=Rp(vp.optional,Ep),Lp=Rp(vp.group,_p),Hp=w("entirety"),Ip=Object.freeze({__proto__:null,required:Np,external:zp,optional:Bp,group:Lp,asNamedPart:Ap,name:Dp,asCommon:Mp,original:Hp}),Pp=function(t,e,n,r){return Co(e.defaults(t,n,r),n,{uid:t.partUids[e.name]},e.overrides(t,n,r))},Fp=function(t,e,n){var r={},o={};return G(n,(function(t){t.fold((function(t){r[t.pname]=gp(!0,(function(e,n,r){return t.factory.sketch(Pp(e,t,n,r))}))}),(function(t){var n=e.parts[t.name];o[t.name]=w(t.factory.sketch(Pp(e,t,n[Hp()]),n))}),(function(t){r[t.pname]=gp(!1,(function(e,n,r){return t.factory.sketch(Pp(e,t,n,r))}))}),(function(t){r[t.pname]=hp(!0,(function(e,n,r){var o=e[t.name];return $(o,(function(n){return t.factory.sketch(Co(t.defaults(e,n,r),n,t.overrides(e,n)))}))}))}))})),{internals:w(r),externals:w(o)}},Vp=function(t,e){var n={};return G(e,(function(e){Ap(e).each((function(e){var r=Up(t,e.pname);n[e.name]=function(n){var o=Ci("Part: "+e.name+" in "+t,ti(e.schema),n);return A(A({},r),{config:n,validated:o})}}))})),n},Up=function(t,e){return{uiType:pp(),owner:t,name:e}},jp=function(t,e,n){return{uiType:pp(),owner:t,name:e,config:n,validated:{}}},Wp=function(t){return rt(t,(function(t){return t.fold(L.none,L.some,L.none,L.none).map((function(t){return Hi(t.name,t.schema.concat([dl(Hp())]))})).toArray()}))},qp=function(t){return $(t,Dp)},$p=function(t,e,n){return Fp(t,e,n)},Gp=function(t,e,n){return mp(L.some(t),e,e.components,n)},Kp=function(t,e,n){var r=e.partUids[n];return t.getSystem().getByUid(r).toOptional()},Xp=function(t,e,n){return Kp(t,e,n).getOrDie("Could not find part: "+n)},Yp=function(t,e,n){var r={},o=e.partUids,i=t.getSystem();return G(n,(function(t){r[t]=w(i.getByUid(o[t]))})),r},Jp=function(t,e){var n=t.getSystem();return bt(e.partUids,(function(t,e){return w(n.getByUid(t))}))},Qp=function(t){return ht(t.partUids)},Zp=function(t,e,n){var r={},o=e.partUids,i=t.getSystem();return G(n,(function(t){r[t]=w(i.getByUid(o[t]).getOrDie())})),r},tv=function(t,e){var n=qp(e);return gu($(n,(function(e){return{key:e,value:t+"-"+e}})))},ev=function(t){return Oi("partUids","partUids",_o((function(e){return tv(e.uid,t)})),ui())},nv=Object.freeze({__proto__:null,generate:Vp,generateOne:jp,schemas:Wp,names:qp,substitutes:$p,components:Gp,defaultUids:tv,defaultUidsSchema:ev,getAllParts:Jp,getAllPartNames:Qp,getPart:Kp,getPartOrDie:Xp,getParts:Yp,getPartsOrDie:Zp}),rv=function(t,e){var n=t.length>0?[Hi("parts",t)]:[];return n.concat([Ai("uid"),Ki("dom",{}),Ki("components",[]),dl("originalSpec"),Ki("debug.sketcher",{})]).concat(e)},ov=function(t,e,n,r,o){var i=rv(r,o);return Ci(t+" [SpecSchema]",Zo(i.concat(e)),n)},iv=function(t,e,n,r){var o=cv(r),i=ov(t,e,o,[],[]);return n(i,o)},uv=function(t,e,n,r,o){var i=cv(o),u=Wp(n),a=ev(n),c=ov(t,e,i,u,[a]),s=$p(t,c,n),l=Gp(t,c,s.internals());return r(c,l,i,s.externals())},av=function(t){return Et(t,"uid")},cv=function(t){return av(t)?t:A(A({},t),{uid:dc("uid")})},sv=function(t){return void 0!==t.uid},lv=Zo([Ai("name"),Ai("factory"),Ai("configFields"),Ki("apis",{}),Ki("extraApis",{})]),fv=Zo([Ai("name"),Ai("factory"),Ai("configFields"),Ai("partFields"),Ki("apis",{}),Ki("extraApis",{})]),dv=function(t){var e=Ci("Sketcher for "+t.name,lv,t),n=function(t){return iv(e.name,e.configFields,e.factory,t)},r=bt(e.apis,Sc),o=bt(e.extraApis,(function(t,e){return bc(t,e)}));return A(A({name:e.name,configFields:e.configFields,sketch:n},r),o)},mv=function(t){var e=Ci("Sketcher for "+t.name,fv,t),n=function(t){return uv(e.name,e.configFields,e.partFields,e.factory,t)},r=Vp(e.name,e.partFields),o=bt(e.apis,Sc),i=bt(e.extraApis,(function(t,e){return bc(t,e)}));return A(A({name:e.name,partFields:e.partFields,configFields:e.configFields,sketch:n,parts:r},o),i)},gv=function(t){return"input"===ae(t)&&"radio"!==Un(t,"type")||"textarea"===ae(t)},hv=function(t,e,n){return e.find(t)},pv=Object.freeze({__proto__:null,getCurrent:hv}),vv=[Ai("find")],bv=hf({fields:vv,name:"composing",apis:pv}),yv=["input","button","textarea","select"],wv=function(t,e,n){var r=e.disabled()?_v:Av;r(t,e)},xv=function(t,e){return!0===e.useNative&&U(yv,ae(t.element))},Cv=function(t){return Wn(t.element,"disabled")},Sv=function(t){Fn(t.element,"disabled","disabled")},kv=function(t){qn(t.element,"disabled")},Tv=function(t){return"true"===Un(t.element,"aria-disabled")},Ov=function(t){Fn(t.element,"aria-disabled","true")},Ev=function(t){Fn(t.element,"aria-disabled","false")},_v=function(t,e,n){e.disableClass.each((function(e){is(t.element,e)}));var r=xv(t,e)?Sv:Ov;r(t),e.onDisabled(t)},Av=function(t,e,n){e.disableClass.each((function(e){as(t.element,e)}));var r=xv(t,e)?kv:Ev;r(t),e.onEnabled(t)},Dv=function(t,e){return xv(t,e)?Cv(t):Tv(t)},Mv=function(t,e,n,r){var o=r?_v:Av;o(t,e)},Rv=Object.freeze({__proto__:null,enable:Av,disable:_v,isDisabled:Dv,onLoad:wv,set:Mv}),Nv=function(t,e){return Dc({classes:e.disabled()?e.disableClass.toArray():[]})},zv=function(t,e){return _a([Aa(ea(),(function(e,n){return Dv(e,t)})),af(t,e,wv)])},Bv=Object.freeze({__proto__:null,exhibit:Nv,events:zv}),Lv=[tu("disabled",O),Ki("useNative",!0),Fi("disableClass"),al("onDisabled"),al("onEnabled")],Hv=hf({fields:Lv,name:"disabling",active:Bv,apis:Rv}),Iv=function(t,e,n,r){var o=Xm(t.element,"."+e.highlightClass);G(o,(function(n){j(r,(function(t){return t.element===n}))||(as(n,e.highlightClass),t.getSystem().getByDom(n).each((function(n){e.onDehighlight(t,n),Ca(n,xa())})))}))},Pv=function(t,e,n){return Iv(t,e,n,[])},Fv=function(t,e,n,r){$v(t,e,n,r)&&(as(r.element,e.highlightClass),e.onDehighlight(t,r),Ca(r,xa()))},Vv=function(t,e,n,r){Iv(t,e,n,[r]),$v(t,e,n,r)||(is(r.element,e.highlightClass),e.onHighlight(t,r),Ca(r,wa()))},Uv=function(t,e,n){Xv(t,e).each((function(r){Vv(t,e,n,r)}))},jv=function(t,e,n){Yv(t,e).each((function(r){Vv(t,e,n,r)}))},Wv=function(t,e,n,r){Kv(t,e,n,r).fold((function(t){throw t}),(function(r){Vv(t,e,n,r)}))},qv=function(t,e,n,r){var o=tb(t,e),i=tt(o,r);i.each((function(r){Vv(t,e,n,r)}))},$v=function(t,e,n,r){return cs(r.element,e.highlightClass)},Gv=function(t,e,n){return Is(t.element,"."+e.highlightClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},Kv=function(t,e,n,r){var o=Xm(t.element,"."+e.itemClass);return L.from(o[r]).fold((function(){return ro.error(new Error("No element found with index "+r))}),t.getSystem().getByDom)},Xv=function(t,e,n){return Is(t.element,"."+e.itemClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},Yv=function(t,e,n){var r=Xm(t.element,"."+e.itemClass),o=r.length>0?L.some(r[r.length-1]):L.none();return o.bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},Jv=function(t,e,n,r){var o=Xm(t.element,"."+e.itemClass),i=et(o,(function(t){return cs(t,e.highlightClass)}));return i.bind((function(e){var n=El(e,r,0,o.length-1);return t.getSystem().getByDom(o[n]).toOptional()}))},Qv=function(t,e,n){return Jv(t,e,n,-1)},Zv=function(t,e,n){return Jv(t,e,n,1)},tb=function(t,e,n){var r=Xm(t.element,"."+e.itemClass);return Mt($(r,(function(e){return t.getSystem().getByDom(e).toOptional()})))},eb=Object.freeze({__proto__:null,dehighlightAll:Pv,dehighlight:Fv,highlight:Vv,highlightFirst:Uv,highlightLast:jv,highlightAt:Wv,highlightBy:qv,isHighlighted:$v,getHighlighted:Gv,getFirst:Xv,getLast:Yv,getPrevious:Qv,getNext:Zv,getCandidates:tb}),nb=[Ai("highlightClass"),Ai("itemClass"),al("onHighlight"),al("onDehighlight")],rb=hf({fields:nb,name:"highlighting",apis:eb}),ob=[8],ib=[9],ub=[13],ab=[27],cb=[32],sb=[37],lb=[38],fb=[39],db=[40],mb=function(t,e,n){var r=it(t.slice(0,e)),o=it(t.slice(e+1));return tt(r.concat(o),n)},gb=function(t,e,n){var r=it(t.slice(0,e));return tt(r,n)},hb=function(t,e,n){var r=t.slice(0,e),o=t.slice(e+1);return tt(o.concat(r),n)},pb=function(t,e,n){var r=t.slice(e+1);return tt(r,n)},vb=function(t){return function(e){var n=e.raw;return U(t,n.which)}},bb=function(t){return function(e){return ot(t,(function(t){return t(e)}))}},yb=function(t){var e=t.raw;return!0===e.shiftKey},wb=function(t){var e=t.raw;return!0===e.ctrlKey},xb=k(yb),Cb=function(t,e){return{matches:t,classification:e}},Sb=function(t,e){var n=tt(t,(function(t){return t.matches(e)}));return n.map((function(t){return t.classification}))},kb=function(t,e,n){var r=e.exists((function(t){return n.exists((function(e){return sn(e,t)}))}));r||Sa(t,pa(),{prevFocus:e,newFocus:n})},Tb=function(){var t=function(t){return Ef(t.element)},e=function(e,n){var r=t(e);e.getSystem().triggerFocus(n,e.element);var o=t(e);kb(e,r,o)};return{get:t,set:e}},Ob=function(){var t=function(t){return rb.getHighlighted(t).map((function(t){return t.element}))},e=function(e,n){var r=t(e);e.getSystem().getByDom(n).fold(p,(function(t){rb.highlight(e,t)}));var o=t(e);kb(e,r,o)};return{get:t,set:e}};(function(t){t["OnFocusMode"]="onFocus",t["OnEnterOrSpaceMode"]="onEnterOrSpace",t["OnApiMode"]="onApi"})(Im||(Im={}));var Eb=function(t,e,n,r,o){var i=function(){return t.concat([Ki("focusManager",Tb()),Xi("focusInside","onFocus",vi((function(t){return U(["onFocus","onEnterOrSpace","onApi"],t)?ro.value(t):ro.error("Invalid value for focusInside")}))),fl("handler",c),fl("state",e),fl("sendFocusIn",o)])},u=function(t,e,n,r,o){var i=n(t,e,r,o);return Sb(i,e.event).bind((function(n){return n(t,e,r,o)}))},a=function(t,e){var i=t.focusInside!==Im.OnFocusMode?L.none():o(t).map((function(n){return Ra(Ju(),(function(r,o){n(r,t,e),o.stop()}))})),a=function(n,r){var i=vb(cb.concat(ub))(r.event);t.focusInside===Im.OnEnterOrSpaceMode&&i&&xu(n,r)&&o(t).each((function(o){o(n,t,e),r.stop()}))},c=[Ra(Fu(),(function(r,o){u(r,o,n,t,e).fold((function(){a(r,o)}),(function(t){o.stop()}))})),Ra(Vu(),(function(n,o){u(n,o,r,t,e).each((function(t){o.stop()}))}))];return _a(i.toArray().concat(c))},c={schema:i,processKey:u,toEvents:a};return c},_b=function(t){var e=[Fi("onEscape"),Fi("onEnter"),Ki("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Ki("firstTabstop",0),Ki("useTabstopAt",E),Fi("visibilitySelector")].concat([t]),n=function(t,e){var n=t.visibilitySelector.bind((function(t){return Ps(e,t)})).getOr(e);return ur(n)>0},r=function(t,e){var r=Xm(t.element,e.selector),o=Y(r,(function(t){return n(e,t)}));return L.from(o[e.firstTabstop])},o=function(t,e){return e.focusManager.get(t).bind((function(t){return Ps(t,e.selector)}))},i=function(t,e){return n(t,e)&&t.useTabstopAt(e)},u=function(t,e,n){r(t,e).each((function(n){e.focusManager.set(t,n)}))},a=function(t,e,n,r,o){return o(e,n,(function(t){return i(r,t)})).fold((function(){return r.cyclic?L.some(!0):L.none()}),(function(e){return r.focusManager.set(t,e),L.some(!0)}))},c=function(t,e,n,r){var i=Xm(t.element,n.selector);return o(t,n).bind((function(e){var o=et(i,S(sn,e));return o.bind((function(e){return a(t,i,e,n,r)}))}))},s=function(t,e,n){var r=n.cyclic?mb:gb;return c(t,e,n,r)},l=function(t,e,n){var r=n.cyclic?hb:pb;return c(t,e,n,r)},f=function(t,e,n){return n.onEnter.bind((function(n){return n(t,e)}))},d=function(t,e,n){return n.onEscape.bind((function(n){return n(t,e)}))},m=w([Cb(bb([yb,vb(ib)]),s),Cb(vb(ib),l),Cb(vb(ab),d),Cb(bb([xb,vb(ub)]),f)]),g=w([]);return Eb(e,kc.init,m,g,(function(){return L.some(u)}))},Ab=_b(Ei("cyclic",O)),Db=_b(Ei("cyclic",E)),Mb=function(t,e,n){return Ta(t,n,ea()),L.some(!0)},Rb=function(t,e,n){var r=gv(n)&&vb(cb)(e.event);return r?L.none():Mb(t,e,n)},Nb=function(t,e){return L.some(!0)},zb=[Ki("execute",Rb),Ki("useSpace",!1),Ki("useEnter",!0),Ki("useControlEnter",!1),Ki("useDown",!1)],Bb=function(t,e,n){return n.execute(t,e,t.element)},Lb=function(t,e,n,r){var o=n.useSpace&&!gv(t.element)?cb:[],i=n.useEnter?ub:[],u=n.useDown?db:[],a=o.concat(i).concat(u);return[Cb(vb(a),Bb)].concat(n.useControlEnter?[Cb(bb([wb,vb(ub)]),Bb)]:[])},Hb=function(t,e,n,r){return n.useSpace&&!gv(t.element)?[Cb(vb(cb),Nb)]:[]},Ib=Eb(zb,kc.init,Lb,Hb,(function(){return L.none()})),Pb=function(){var t=od(),e=function(e,n){t.set({numRows:e,numColumns:n})},n=function(){return t.get().map((function(t){return t.numRows}))},r=function(){return t.get().map((function(t){return t.numColumns}))};return Tc({readState:function(){return t.get().map((function(t){return{numRows:String(t.numRows),numColumns:String(t.numColumns)}})).getOr({numRows:"?",numColumns:"?"})},setGridSize:e,getNumRows:n,getNumColumns:r})},Fb=function(t){return t.state(t)},Vb=Object.freeze({__proto__:null,flatgrid:Pb,init:Fb}),Ub=function(t){return function(e,n,r,o){var i=t(e.element);return $b(i,e,n,r,o)}},jb=function(t,e){var n=Bd(t,e);return Ub(n)},Wb=function(t,e){var n=Bd(e,t);return Ub(n)},qb=function(t){return function(e,n,r,o){return $b(t,e,n,r,o)}},$b=function(t,e,n,r,o){var i=r.focusManager.get(e).bind((function(n){return t(e.element,n,r,o)}));return i.map((function(t){return r.focusManager.set(e,t),!0}))},Gb=qb,Kb=qb,Xb=qb,Yb=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0},Jb=function(t){return!Yb(t.dom)},Qb=function(t,e){return et(t,e).map((function(e){return{index:e,candidates:t}}))},Zb=function(t,e,n){var r=function(t){return sn(t,e)},o=Xm(t,n),i=Y(o,Jb);return Qb(i,r)},ty=function(t,e){return et(t,(function(t){return sn(e,t)}))},ey=function(t,e,n,r){var o=Math.floor(e/n),i=e%n;return r(o,i).bind((function(e){var r=e.row*n+e.column;return r>=0&&r1?L.some(t.slice(1)):L.none()}))},g=function(t){return Ot(n.get(),t)},h=function(t){return p(t).bind(qx)},p=function(t){return Ot(e.get(),t)},v=function(e){return Ot(t.get(),e)},b=function(t){var e=o.get();return ut(ht(e),t)},y=function(){return r.get().bind(h)},w=function(){return e.get()};return{setMenuBuilt:a,setContents:c,expand:d,refresh:g,collapse:m,lookupMenu:p,lookupItem:v,otherMenus:b,getPrimary:y,getMenus:w,clear:i,isClear:u,getTriggeringPath:f}},qx=function(t){return"prepared"===t.type?L.some(t.menu):L.none()},$x={init:Wx,extractPreparedMenu:qx},Gx=function(t,e){var n,r=od(),o=function(e,n,r){return bt(r,(function(r,o){var i=function(){return Fx.sketch(A(A({},r),{value:o,markers:t.markers,fakeFocus:t.fakeFocus,onHighlight:t.onHighlight,focusManager:t.fakeFocus?Ob():Tb()}))};return o===n?{type:"prepared",menu:e.getSystem().build(i())}:{type:"notbuilt",nbMenu:i}}))},i=$x.init(),u=function(e){var n=o(e,t.data.primary,t.data.menus),r=s();return i.setContents(t.data.primary,n,t.data.expansions,r),i.getPrimary()},a=function(t){return tp.getValue(t).value},c=function(t,e,n){return gt(e,(function(t){if(!t.getSystem().isConnected())return L.none();var e=rb.getCandidates(t);return tt(e,(function(t){return a(t)===n}))}))},s=function(e){return bt(t.data.menus,(function(t,e){return rt(t.items,(function(t){return"separator"===t.type?[]:[t.data.value]}))}))},l=function(t,e){rb.highlight(t,e),rb.getHighlighted(e).orThunk((function(){return rb.getFirst(e)})).each((function(e){Ta(t,e.element,na())}))},f=function(t,e){return Mt($(e,(function(e){return t.lookupMenu(e).bind((function(t){return"prepared"===t.type?L.some(t.menu):L.none()}))})))},d=function(e,n,r){var o=f(n,n.otherMenus(r));G(o,(function(n){ls(n.element,[t.markers.backgroundMenu]),t.stayInDom||Pw.remove(e,n)}))},m=function(e){return r.get().getOrThunk((function(){var n={},o=Xm(e.element,"."+t.markers.item),i=Y(o,(function(t){return"true"===Un(t,"aria-haspopup")}));return G(i,(function(t){e.getSystem().getByDom(t).each((function(t){var e=a(t);n[e]=t}))})),r.set(n),n}))},g=function(t,e){var n=m(t);vt(n,(function(t,n){var r=U(e,n);Fn(t.element,"aria-expanded",r)}))},h=function(e,n,r){return L.from(r[0]).bind((function(o){return n.lookupMenu(o).bind((function(o){if("notbuilt"===o.type)return L.none();var i=o.menu,u=f(n,r.slice(1));return G(u,(function(e){is(e.element,t.markers.backgroundMenu)})),Ln(i.element)||Pw.append(e,_s(i)),ls(i.element,[t.markers.backgroundMenu]),l(e,i),d(e,n,r),L.some(i)}))}))};(function(t){t[t["HighlightSubmenu"]=0]="HighlightSubmenu",t[t["HighlightParent"]=1]="HighlightParent"})(n||(n={}));var v=function(t,e,n){if("notbuilt"===n.type){var r=t.getSystem().build(n.nbMenu());return i.setMenuBuilt(e,r),r}return n.menu},b=function(e,r,o){if(void 0===o&&(o=n.HighlightSubmenu),r.hasConfigured(Hv)&&Hv.isDisabled(r))return L.some(r);var u=a(r);return i.expand(u).bind((function(u){return g(e,u),L.from(u[0]).bind((function(a){return i.lookupMenu(a).bind((function(c){var s=v(e,a,c);return Ln(s.element)||Pw.append(e,_s(s)),t.onOpenSubmenu(e,r,s,it(u)),o===n.HighlightSubmenu?(rb.highlightFirst(s),h(e,i,u)):(rb.dehighlightAll(s),L.some(r))}))}))}))},y=function(e,n){var r=a(n);return i.collapse(r).bind((function(r){return g(e,r),h(e,i,r).map((function(r){return t.onCollapseMenu(e,n,r),r}))}))},w=function(t,e){var n=a(e);return i.refresh(n).bind((function(e){return g(t,e),h(t,i,e)}))},x=function(t,e){return gv(e.element)?L.none():b(t,e,n.HighlightSubmenu)},C=function(t,e){return gv(e.element)?L.none():y(t,e)},S=function(e,n){return y(e,n).orThunk((function(){return t.onEscape(e,n).map((function(){return e}))}))},k=function(e){return function(n,r){return Ps(r.getSource(),"."+t.markers.item).bind((function(t){return n.getSystem().getByDom(t).toOptional().bind((function(t){return e(n,t).map(E)}))}))}},T=_a([Ra(Ix(),(function(t,e){var n=e.event.item;i.lookupItem(a(n)).each((function(){var n=e.event.menu;rb.highlight(t,n);var r=a(e.event.item);i.refresh(r).each((function(e){return d(t,i,e)}))}))})),qa((function(e,r){var o=r.event.target;e.getSystem().getByDom(o).each((function(r){var o=a(r);0===o.indexOf("collapse-item")&&y(e,r),b(e,r,n.HighlightSubmenu).fold((function(){t.onExecute(e,r)}),p)}))})),Ua((function(e,n){u(e).each((function(n){Pw.append(e,_s(n)),t.onOpenMenu(e,n),t.highlightImmediately&&l(e,n)}))}))].concat(t.navigateOnHover?[Ra(Cx(),(function(e,r){var o=r.event.item;w(e,o),b(e,o,n.HighlightParent),t.onHover(e,o)}))]:[])),O=function(t){return rb.getHighlighted(t).bind(rb.getHighlighted)},_=function(t){O(t).each((function(e){y(t,e)}))},D=function(t){i.getPrimary().each((function(e){l(t,e)}))},M=function(t){return L.from(t.components()[0]).filter((function(t){return"menu"===Un(t.element,"role")}))},R=function(e){var n=i.getPrimary().bind((function(t){return O(e).bind((function(t){var n=a(t),r=Tt(i.getMenus()),o=Mt($(r,$x.extractPreparedMenu));return i.getTriggeringPath(n,(function(t){return c(e,o,t)}))})).map((function(e){return{primary:t,triggeringPath:e}}))}));n.fold((function(){M(e).each((function(n){t.onRepositionMenu(e,n,[])}))}),(function(n){var r=n.primary,o=n.triggeringPath;t.onRepositionMenu(e,r,o)}))},N={collapseMenu:_,highlightPrimary:D,repositionMenus:R};return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:rp(t.tmenuBehaviours,[Aw.config({mode:"special",onRight:k(x),onLeft:k(C),onEscape:k(S),focusIn:function(t,e){i.getPrimary().each((function(e){Ta(t,e.element,na())}))}}),rb.config({highlightClass:t.markers.selectedMenu,itemClass:t.markers.menu}),bv.config({find:function(t){return rb.getHighlighted(t)}}),Pw.config({})]),eventOrder:t.eventOrder,apis:N,events:T}},Kx=w("collapse-item"),Xx=function(t,e,n){return{primary:t,menus:e,expansions:n}},Yx=function(t,e){return{primary:t,menus:mu(t,e),expansions:{}}},Jx=function(t){return{value:oc(Kx()),meta:{text:t}}},Qx=dv({name:"TieredMenu",configFields:[ll("onExecute"),ll("onEscape"),sl("onOpenMenu"),sl("onOpenSubmenu"),al("onRepositionMenu"),al("onCollapseMenu"),Ki("highlightImmediately",!0),Hi("data",[Ai("primary"),Ai("menus"),Ai("expansions")]),Ki("fakeFocus",!1),al("onHighlight"),al("onHover"),ol(),Ai("dom"),Ki("navigateOnHover",!0),Ki("stayInDom",!1),ep("tmenuBehaviours",[Aw,rb,bv,Pw]),Ki("eventOrder",{})],apis:{collapseMenu:function(t,e){t.collapseMenu(e)},highlightPrimary:function(t,e){t.highlightPrimary(e)},repositionMenus:function(t,e){t.repositionMenus(e)}},factory:Gx,extraApis:{tieredData:Xx,singleData:Yx,collapseItem:Jx}}),Zx=function(t,e,n,r,o){var i=function(){return t.lazySink(e)},u="horizontal"===r.type?{layouts:{onLtr:function(){return Zl()},onRtl:function(){return tf()}}}:{},a=function(t){return 2===t.length},c=function(t){return a(t)?u:{}};return Qx.sketch({dom:{tag:"div"},data:r.data,markers:r.menu.markers,highlightImmediately:r.menu.highlightImmediately,onEscape:function(){return bh.close(e),t.onEscape.map((function(t){return t(e)})),L.some(!0)},onExecute:function(){return L.some(!0)},onOpenMenu:function(t,e){Ig.positionWithinBounds(i().getOrDie(),e,n,o())},onOpenSubmenu:function(t,e,n,r){var o=i().getOrDie();Ig.position(o,n,{anchor:A({type:"submenu",item:e},c(r))})},onRepositionMenu:function(t,e,r){var u=i().getOrDie();Ig.positionWithinBounds(u,e,n,o()),G(r,(function(t){var e=c(t.triggeringPath);Ig.position(u,t.triggeredMenu,{anchor:A({type:"submenu",item:t.triggeringItem},e)})}))}})},tC=function(t,e){var n=function(e,n){var r=t.getRelated(e);return r.exists((function(t){return js(t,n)}))},r=function(t,e){bh.setContent(t,e)},o=function(t,e,n){i(t,e,n,L.none())},i=function(t,e,n,r){u(t,e,n,(function(){return r.map((function(t){return Jr(t)}))}))},u=function(e,n,r,o){var i=t.lazySink(e).getOrDie();bh.openWhileCloaked(e,n,(function(){return Ig.positionWithinBounds(i,e,r,o())})),tp.setValue(e,L.some({mode:"position",config:r,getBounds:o}))},a=function(t,e,n){c(t,e,n,L.none)},c=function(e,n,r,o){var i=Zx(t,e,n,r,o);bh.open(e,i),tp.setValue(e,L.some({mode:"menu",menu:i}))},s=function(t){bh.isOpen(t)&&(tp.setValue(t,L.none()),bh.close(t))},l=function(t){return bh.getState(t)},f=function(e){bh.isOpen(e)&&tp.getValue(e).each((function(n){switch(n.mode){case"menu":bh.getState(e).each(Qx.repositionMenus);break;case"position":var r=t.lazySink(e).getOrDie();Ig.positionWithinBounds(r,e,n.config,n.getBounds());break}}))},d={setContent:r,showAt:o,showWithin:i,showWithinBounds:u,showMenuAt:a,showMenuWithinBounds:c,hide:s,getContent:l,reposition:f,isOpen:bh.isOpen};return{uid:t.uid,dom:t.dom,behaviours:rp(t.inlineBehaviours,[bh.config({isPartOf:function(t,e,r){return js(e,r)||n(t,r)},getAttachPoint:function(e){return t.lazySink(e).getOrDie()},onOpen:function(e){t.onShow(e)},onClose:function(e){t.onHide(e)}}),tp.config({store:{mode:"memory",initialValue:L.none()}}),yf.config({channels:A(A({},Sh(A({isExtraPart:e.isExtraPart},t.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),Th(A(A({},t.fireRepositionEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})),{doReposition:f})))})]),eventOrder:t.eventOrder,apis:d}},eC=dv({name:"InlineView",configFields:[Ai("lazySink"),al("onShow"),al("onHide"),Wi("onEscape"),ep("inlineBehaviours",[bh,tp,yf]),$i("fireDismissalEventInstead",[Ki("event",ga())]),$i("fireRepositionEventInstead",[Ki("event",ha())]),Ki("getRelated",L.none),Ki("isExtraPart",O),Ki("eventOrder",L.none)],factory:tC,apis:{showAt:function(t,e,n,r){t.showAt(e,n,r)},showWithin:function(t,e,n,r,o){t.showWithin(e,n,r,o)},showWithinBounds:function(t,e,n,r,o){t.showWithinBounds(e,n,r,o)},showMenuAt:function(t,e,n,r){t.showMenuAt(e,n,r)},showMenuWithinBounds:function(t,e,n,r,o){t.showMenuWithinBounds(e,n,r,o)},hide:function(t,e){t.hide(e)},isOpen:function(t,e){return t.isOpen(e)},getContent:function(t,e){return t.getContent(e)},setContent:function(t,e,n){t.setContent(e,n)},reposition:function(t,e){t.reposition(e)}}}),nC="layout-inset",rC=function(t){return t.x},oC=function(t,e){return t.x+t.width/2-e.width/2},iC=function(t,e){return t.x+t.width-e.width},uC=function(t){return t.y},aC=function(t,e){return t.y+t.height-e.height},cC=function(t,e){return t.y+t.height/2-e.height/2},sC=function(t,e,n){return gl(iC(t,e),aC(t,e),n.insetSouthwest(),Cl(),"southwest",Dl(t,{right:0,bottom:3}),nC)},lC=function(t,e,n){return gl(rC(t),aC(t,e),n.insetSoutheast(),xl(),"southeast",Dl(t,{left:1,bottom:3}),nC)},fC=function(t,e,n){return gl(iC(t,e),uC(t),n.insetNorthwest(),wl(),"northwest",Dl(t,{right:0,top:2}),nC)},dC=function(t,e,n){return gl(rC(t),uC(t),n.insetNortheast(),yl(),"northeast",Dl(t,{left:1,top:2}),nC)},mC=function(t,e,n){return gl(oC(t,e),uC(t),n.insetNorth(),Sl(),"north",Dl(t,{top:2}),nC)},gC=function(t,e,n){return gl(oC(t,e),aC(t,e),n.insetSouth(),kl(),"south",Dl(t,{bottom:3}),nC)},hC=function(t,e,n){return gl(iC(t,e),cC(t,e),n.insetEast(),Ol(),"east",Dl(t,{right:0}),nC)},pC=function(t,e,n){return gl(rC(t),cC(t,e),n.insetWest(),Tl(),"west",Dl(t,{left:1}),nC)},vC=function(t){switch(t){case"north":return mC;case"northeast":return dC;case"northwest":return fC;case"south":return gC;case"southeast":return lC;case"southwest":return sC;case"east":return hC;case"west":return pC}},bC=function(t,e,n,r,o){var i=$f(r).map(vC).getOr(mC);return i(t,e,n,r,o)},yC=function(t){switch(t){case"north":return gC;case"northeast":return lC;case"northwest":return sC;case"south":return mC;case"southeast":return dC;case"southwest":return fC;case"east":return pC;case"west":return hC}},wC=function(t,e,n,r,o){var i=$f(r).map(yC).getOr(mC);return i(t,e,n,r,o)},xC=tinymce.util.Tools.resolve("tinymce.util.Delay"),CC=function(t){var e=vx(t.action),n=t.dom.tag,r=function(e){return Ot(t.dom,"attributes").bind((function(t){return Ot(t,e)}))},o=function(){if("button"===n){var t=r("type").getOr("button"),e=r("role").map((function(t){return{role:t}})).getOr({});return A({type:t},e)}var o=r("role").getOr("button");return{role:o}};return{uid:t.uid,dom:t.dom,components:t.components,events:e,behaviours:op.augment(t.buttonBehaviours,[Yw.config({}),Aw.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:o()},eventOrder:t.eventOrder}},SC=dv({name:"Button",factory:CC,configFields:[Ki("uid",void 0),Ai("dom"),Ki("components",[]),op.field("buttonBehaviours",[Yw,Aw]),Fi("action"),Fi("role"),Ki("eventOrder",{})]}),kC=function(t){var e=void 0!==t.dom.attributes?t.dom.attributes:[];return Q(e,(function(t,e){var n;return"class"===e.name?t:A(A({},t),(n={},n[e.name]=e.value,n))}),{})},TC=function(t){return Array.prototype.slice.call(t.dom.classList,0)},OC=function(t){var e=ee.fromHtml(t),n=xn(e),r=kC(e),o=TC(e),i=0===n.length?{}:{innerHtml:Ga(e)};return A({tag:ae(e),classes:o,attributes:r},i)},EC=function(t){var e=sv(t)&&_t(t,"uid")?t.uid:dc("memento"),n=function(t){return t.getSystem().getByUid(e).getOrDie()},r=function(t){return t.getSystem().getByUid(e).toOptional()},o=function(){return A(A({},t),{uid:e})};return{get:n,getOpt:r,asSpec:o}};function _C(t){return _C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_C(t)}function AC(t,e){return AC=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},AC(t,e)}function DC(){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(t){return!1}}function MC(t,e,n){return MC=DC()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=Function.bind.apply(t,r),i=new o;return n&&AC(i,n.prototype),i},MC.apply(null,arguments)}function RC(t){return NC(t)||zC(t)||BC(t)||HC()}function NC(t){if(Array.isArray(t))return LC(t)}function zC(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function BC(t,e){if(t){if("string"===typeof t)return LC(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?LC(t,e):void 0}}function LC(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1?n-1:0),o=1;o/gm),SS=WC(/^data-[\-\w.\u00B7-\uFFFF]/),kS=WC(/^aria-[\-\w]+$/),TS=WC(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),OS=WC(/^(?:\w+script|data):/i),ES=WC(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_S=WC(/^html$/i),AS=function(){return"undefined"===typeof window?null:window},DS=function(t,e){if("object"!==_C(t)||"function"!==typeof t.createPolicy)return null;var n=null,r="data-tt-policy-suffix";e.currentScript&&e.currentScript.hasAttribute(r)&&(n=e.currentScript.getAttribute(r));var o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML:function(t){return t}})}catch(i){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function MS(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:AS(),e=function(t){return MS(t)};if(e.version="2.3.8",e.removed=[],!t||!t.document||9!==t.document.nodeType)return e.isSupported=!1,e;var n=t.document,r=t.document,o=t.DocumentFragment,i=t.HTMLTemplateElement,u=t.Node,a=t.Element,c=t.NodeFilter,s=t.NamedNodeMap,l=void 0===s?t.NamedNodeMap||t.MozNamedAttrMap:s,f=t.HTMLFormElement,d=t.DOMParser,m=t.trustedTypes,g=a.prototype,h=sS(g,"cloneNode"),p=sS(g,"nextSibling"),v=sS(g,"childNodes"),b=sS(g,"parentNode");if("function"===typeof i){var y=r.createElement("template");y.content&&y.content.ownerDocument&&(r=y.content.ownerDocument)}var w=DS(m,n),x=w?w.createHTML(""):"",C=r,S=C.implementation,k=C.createNodeIterator,T=C.createDocumentFragment,O=C.getElementsByTagName,E=n.importNode,_={};try{_=cS(r).documentMode?r.documentMode:{}}catch(Vt){}var A={};e.isSupported="function"===typeof b&&S&&"undefined"!==typeof S.createHTMLDocument&&9!==_;var D,M,R=xS,N=CS,z=SS,B=kS,L=OS,H=ES,I=TS,P=null,F=aS({},[].concat(RC(lS),RC(fS),RC(dS),RC(gS),RC(pS))),V=null,U=aS({},[].concat(RC(vS),RC(bS),RC(yS),RC(wS))),j=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}})),W=null,q=null,$=!0,G=!0,K=!1,X=!1,Y=!1,J=!1,Q=!1,Z=!1,tt=!1,et=!1,nt=!0,rt=!0,ot=!1,it={},ut=null,at=aS({},["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"]),ct=null,st=aS({},["audio","video","img","source","image","track"]),lt=null,ft=aS({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dt="http://www.w3.org/1998/Math/MathML",mt="http://www.w3.org/2000/svg",gt="http://www.w3.org/1999/xhtml",ht=gt,pt=!1,vt=["application/xhtml+xml","text/html"],bt="text/html",yt=null,wt=r.createElement("form"),xt=function(t){return t instanceof RegExp||t instanceof Function},Ct=function(t){yt&&yt===t||(t&&"object"===_C(t)||(t={}),t=cS(t),P="ALLOWED_TAGS"in t?aS({},t.ALLOWED_TAGS):F,V="ALLOWED_ATTR"in t?aS({},t.ALLOWED_ATTR):U,lt="ADD_URI_SAFE_ATTR"in t?aS(cS(ft),t.ADD_URI_SAFE_ATTR):ft,ct="ADD_DATA_URI_TAGS"in t?aS(cS(st),t.ADD_DATA_URI_TAGS):st,ut="FORBID_CONTENTS"in t?aS({},t.FORBID_CONTENTS):at,W="FORBID_TAGS"in t?aS({},t.FORBID_TAGS):{},q="FORBID_ATTR"in t?aS({},t.FORBID_ATTR):{},it="USE_PROFILES"in t&&t.USE_PROFILES,$=!1!==t.ALLOW_ARIA_ATTR,G=!1!==t.ALLOW_DATA_ATTR,K=t.ALLOW_UNKNOWN_PROTOCOLS||!1,X=t.SAFE_FOR_TEMPLATES||!1,Y=t.WHOLE_DOCUMENT||!1,Z=t.RETURN_DOM||!1,tt=t.RETURN_DOM_FRAGMENT||!1,et=t.RETURN_TRUSTED_TYPE||!1,Q=t.FORCE_BODY||!1,nt=!1!==t.SANITIZE_DOM,rt=!1!==t.KEEP_CONTENT,ot=t.IN_PLACE||!1,I=t.ALLOWED_URI_REGEXP||I,ht=t.NAMESPACE||gt,t.CUSTOM_ELEMENT_HANDLING&&xt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&xt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(j.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),D=D=-1===vt.indexOf(t.PARSER_MEDIA_TYPE)?bt:t.PARSER_MEDIA_TYPE,M="application/xhtml+xml"===D?function(t){return t}:QC,X&&(G=!1),tt&&(Z=!0),it&&(P=aS({},RC(pS)),V=[],!0===it.html&&(aS(P,lS),aS(V,vS)),!0===it.svg&&(aS(P,fS),aS(V,bS),aS(V,wS)),!0===it.svgFilters&&(aS(P,dS),aS(V,bS),aS(V,wS)),!0===it.mathMl&&(aS(P,gS),aS(V,yS),aS(V,wS))),t.ADD_TAGS&&(P===F&&(P=cS(P)),aS(P,t.ADD_TAGS)),t.ADD_ATTR&&(V===U&&(V=cS(V)),aS(V,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&aS(lt,t.ADD_URI_SAFE_ATTR),t.FORBID_CONTENTS&&(ut===at&&(ut=cS(ut)),aS(ut,t.FORBID_CONTENTS)),rt&&(P["#text"]=!0),Y&&aS(P,["html","head","body"]),P.table&&(aS(P,["tbody"]),delete W.tbody),jC&&jC(t),yt=t)},St=aS({},["mi","mo","mn","ms","mtext"]),kt=aS({},["foreignobject","desc","title","annotation-xml"]),Tt=aS({},["title","style","font","a","script"]),Ot=aS({},fS);aS(Ot,dS),aS(Ot,mS);var Et=aS({},gS);aS(Et,hS);var _t=function(t){var e=b(t);e&&e.tagName||(e={namespaceURI:gt,tagName:"template"});var n=QC(t.tagName),r=QC(e.tagName);return t.namespaceURI===mt?e.namespaceURI===gt?"svg"===n:e.namespaceURI===dt?"svg"===n&&("annotation-xml"===r||St[r]):Boolean(Ot[n]):t.namespaceURI===dt?e.namespaceURI===gt?"math"===n:e.namespaceURI===mt?"math"===n&&kt[r]:Boolean(Et[n]):t.namespaceURI===gt&&(!(e.namespaceURI===mt&&!kt[r])&&(!(e.namespaceURI===dt&&!St[r])&&(!Et[n]&&(Tt[n]||!Ot[n]))))},At=function(t){JC(e.removed,{element:t});try{t.parentNode.removeChild(t)}catch(Vt){try{t.outerHTML=x}catch(Vt){t.remove()}}},Dt=function(t,n){try{JC(e.removed,{attribute:n.getAttributeNode(t),from:n})}catch(Vt){JC(e.removed,{attribute:null,from:n})}if(n.removeAttribute(t),"is"===t&&!V[t])if(Z||tt)try{At(n)}catch(Vt){}else try{n.setAttribute(t,"")}catch(Vt){}},Mt=function(t){var e,n;if(Q)t=""+t;else{var o=ZC(t,/^[\r\n\t ]+/);n=o&&o[0]}"application/xhtml+xml"===D&&(t=''+t+"");var i=w?w.createHTML(t):t;if(ht===gt)try{e=(new d).parseFromString(i,D)}catch(Vt){}if(!e||!e.documentElement){e=S.createDocument(ht,"template",null);try{e.documentElement.innerHTML=pt?"":i}catch(Vt){}}var u=e.body||e.documentElement;return t&&n&&u.insertBefore(r.createTextNode(n),u.childNodes[0]||null),ht===gt?O.call(e,Y?"html":"body")[0]:Y?e.documentElement:u},Rt=function(t){return k.call(t.ownerDocument||t,t,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},Nt=function(t){return t instanceof f&&("string"!==typeof t.nodeName||"string"!==typeof t.textContent||"function"!==typeof t.removeChild||!(t.attributes instanceof l)||"function"!==typeof t.removeAttribute||"function"!==typeof t.setAttribute||"string"!==typeof t.namespaceURI||"function"!==typeof t.insertBefore)},zt=function(t){return"object"===_C(u)?t instanceof u:t&&"object"===_C(t)&&"number"===typeof t.nodeType&&"string"===typeof t.nodeName},Bt=function(t,n,r){A[t]&&XC(A[t],(function(t){t.call(e,n,r,yt)}))},Lt=function(t){var n;if(Bt("beforeSanitizeElements",t,null),Nt(t))return At(t),!0;if(rS(/[\u0080-\uFFFF]/,t.nodeName))return At(t),!0;var r=M(t.nodeName);if(Bt("uponSanitizeElement",t,{tagName:r,allowedTags:P}),t.hasChildNodes()&&!zt(t.firstElementChild)&&(!zt(t.content)||!zt(t.content.firstElementChild))&&rS(/<[/\w]/g,t.innerHTML)&&rS(/<[/\w]/g,t.textContent))return At(t),!0;if("select"===r&&rS(/