zj-element
Version:
基于ElementUI的VUE组件——Жидзин(Zidjin)系列组件库。
9 lines • 413 kB
JavaScript
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.8.0 (2021-05-06)
*/
!function(){"use strict";var n,t=function(o){return function(t){return e=typeof(n=t),(null===n?"null":"object"==e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e)===o;var n,e}},e=function(n){return function(t){return typeof t===n}},x=t("string"),w=t("object"),c=t("array"),S=e("boolean"),o=(n=undefined,function(t){return n===t}),i=function(t){return!(null===(n=t)||n===undefined);var n},y=e("function"),at=e("number"),s=function(t,n){if(c(t)){for(var e=0,o=t.length;e<o;++e)if(!n(t[e]))return!1;return!0}return!1},ct=function(){},u=function(e,o){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(o.apply(null,t))}},st=function(t){return function(){return t}},lt=function(t){return t};function k(o){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=r.concat(t);return o.apply(null,e)}}var C=function(n){return function(t){return!n(t)}},a=function(t){return function(){throw new Error(t)}},l=st(!1),O=st(!0),r=tinymce.util.Tools.resolve("tinymce.ThemeManager"),ft=function(){return(ft=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)};function _(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]]);return e}function T(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;for(var o=Array(t),r=0,n=0;n<e;n++)for(var i=arguments[n],u=0,a=i.length;u<a;u++,r++)o[r]=i[u];return o}var f,d,m,g,p,h=function(){return v},v=(f=function(t){return t.isNone()},{fold:function(t,n){return t()},is:l,isSome:l,isNone:O,getOr:m=function(t){return t},getOrThunk:d=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:st(null),getOrUndefined:st(undefined),or:m,orThunk:d,map:h,each:ct,bind:h,exists:l,forall:O,filter:h,equals:f,equals_:f,toArray:function(){return[]},toString:st("none()")}),b=function(e){var t=st(e),n=function(){return r},o=function(t){return t(e)},r={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:O,isNone:l,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return b(t(e))},each:function(t){t(e)},bind:o,exists:o,forall:o,filter:function(t){return t(e)?r:v},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(l,function(t){return n(e,t)})}};return r},dt={some:b,none:h,from:function(t){return null===t||t===undefined?v:b(t)}},E=Array.prototype.slice,D=Array.prototype.indexOf,B=Array.prototype.push,A=function(t,n){return D.call(t,n)},M=function(t,n){return-1<A(t,n)},F=function(t,n){for(var e=0,o=t.length;e<o;e++){if(n(t[e],e))return!0}return!1},I=function(t,n){for(var e=[],o=0;o<t;o++)e.push(n(o));return e},R=function(t,n){for(var e=[],o=0;o<t.length;o+=n){var r=E.call(t,o,o+n);e.push(r)}return e},V=function(t,n){for(var e=t.length,o=new Array(e),r=0;r<e;r++){var i=t[r];o[r]=n(i,r)}return o},mt=function(t,n){for(var e=0,o=t.length;e<o;e++){n(t[e],e)}},P=function(t,n){for(var e=[],o=[],r=0,i=t.length;r<i;r++){var u=t[r];(n(u,r)?e:o).push(u)}return{pass:e,fail:o}},H=function(t,n){for(var e=[],o=0,r=t.length;o<r;o++){var i=t[o];n(i,o)&&e.push(i)}return e},z=function(t,n,e){return function(t,n){for(var e=t.length-1;0<=e;e--){n(t[e],e)}}(t,function(t){e=n(e,t)}),e},N=function(t,n,e){return mt(t,function(t){e=n(e,t)}),e},L=function(t,n){return function(t,n,e){for(var o=0,r=t.length;o<r;o++){var i=t[o];if(n(i,o))return dt.some(i);if(e(i,o))break}return dt.none()}(t,n,l)},j=function(t,n){for(var e=0,o=t.length;e<o;e++){if(n(t[e],e))return dt.some(e)}return dt.none()},gt=function(t){for(var n=[],e=0,o=t.length;e<o;++e){if(!c(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);B.apply(n,t[e])}return n},U=function(t,n){return gt(V(t,n))},W=function(t,n){for(var e=0,o=t.length;e<o;++e){if(!0!==n(t[e],e))return!1}return!0},G=function(t){var n=E.call(t,0);return n.reverse(),n},X=function(t,n){return H(t,function(t){return!M(n,t)})},Y=function(t,n){var e=E.call(t,0);return e.sort(n),e},q=function(t,n){return 0<=n&&n<t.length?dt.some(t[n]):dt.none()},K=function(t){return q(t,0)},J=function(t){return q(t,t.length-1)},$=y(Array.from)?Array.from:function(t){return E.call(t)},Q=function(t,n){for(var e=0;e<t.length;e++){var o=n(t[e],e);if(o.isSome())return o}return dt.none()},Z=function(e){return{is:function(t){return e===t},isValue:O,isError:l,getOr:st(e),getOrThunk:st(e),getOrDie:st(e),or:function(t){return Z(e)},orThunk:function(t){return Z(e)},fold:function(t,n){return n(e)},map:function(t){return Z(t(e))},mapError:function(t){return Z(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOptional:function(){return dt.some(e)}}},tt=function(e){return{is:l,isValue:l,isError:O,getOr:lt,getOrThunk:function(t){return t()},getOrDie:function(){return a(String(e))()},or:function(t){return t},orThunk:function(t){return t()},fold:function(t,n){return t(e)},map:function(t){return tt(e)},mapError:function(t){return tt(t(e))},each:ct,bind:function(t){return tt(e)},exists:l,forall:O,toOptional:dt.none}},pt={value:Z,error:tt,fromOption:function(t,n){return t.fold(function(){return tt(n)},Z)}};(p=g=g||{})[p.Error=0]="Error",p[p.Value=1]="Value";var nt,et,ot=function(t,n,e){return t.stype===g.Error?n(t.serror):e(t.svalue)},rt=function(t){return{stype:g.Value,svalue:t}},it=function(t){return{stype:g.Error,serror:t}},ut=function(t){return t.fold(it,rt)},ht=function(t){return ot(t,pt.error,pt.value)},vt=rt,bt=function(t){var n=[],e=[];return mt(t,function(t){ot(t,function(t){return e.push(t)},function(t){return n.push(t)})}),{values:n,errors:e}},yt=it,xt=function(t,n){return t.stype===g.Value?n(t.svalue):t},wt=function(t,n){return t.stype===g.Error?n(t.serror):t},St=function(t,n){return t.stype===g.Value?{stype:g.Value,svalue:n(t.svalue)}:t},kt=function(t,n){return t.stype===g.Error?{stype:g.Error,serror:n(t.serror)}:t},Ct=Object.keys,Ot=Object.hasOwnProperty,_t=function(t,n){for(var e=Ct(t),o=0,r=e.length;o<r;o++){var i=e[o];n(t[i],i)}},Tt=function(t,e){return Et(t,function(t,n){return{k:n,v:e(t,n)}})},Et=function(t,o){var r={};return _t(t,function(t,n){var e=o(t,n);r[e.k]=e.v}),r},Dt=function(t,n){var e,o,r,i,u={};return e=n,i=u,o=function(t,n){i[n]=t},r=ct,_t(t,function(t,n){(e(t,n)?o:r)(t,n)}),u},Bt=function(t,e){var o=[];return _t(t,function(t,n){o.push(e(t,n))}),o},At=function(t,n){for(var e=Ct(t),o=0,r=e.length;o<r;o++){var i=e[o],u=t[i];if(n(u,i,t))return dt.some(u)}return dt.none()},Mt=function(t){return Bt(t,function(t){return t})},Ft=function(t,n){return It(t,n)?dt.from(t[n]):dt.none()},It=function(t,n){return Ot.call(t,n)},Rt=function(t,n){return It(t,n)&&t[n]!==undefined&&null!==t[n]},Vt=function(u){if(!c(u))throw new Error("cases must be an array");if(0===u.length)throw new Error("there must be at least one case");var a=[],e={};return mt(u,function(t,o){var n=Ct(t);if(1!==n.length)throw new Error("one and only one name per case");var r=n[0],i=t[r];if(e[r]!==undefined)throw new Error("duplicate key detected:"+r);if("cata"===r)throw new Error("cannot have a case named cata (sorry)");if(!c(i))throw new Error("case arguments must be an array");a.push(r),e[r]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.length;if(n!==i.length)throw new Error("Wrong number of arguments to case "+r+". Expected "+i.length+" ("+i+"), got "+n);return{fold:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length!==u.length)throw new Error("Wrong number of arguments to fold. Expected "+u.length+", got "+t.length);return t[o].apply(null,e)},match:function(t){var n=Ct(t);if(a.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+a.join(",")+"\nActual: "+n.join(","));if(!W(a,function(t){return M(n,t)}))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+a.join(", "));return t[r].apply(null,e)},log:function(t){console.log(t,{constructors:a,constructor:r,params:e})}}}}),e},Pt=Object.prototype.hasOwnProperty,Ht=function(u){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Can't merge zero objects");for(var e={},o=0;o<t.length;o++){var r=t[o];for(var i in r)Pt.call(r,i)&&(e[i]=u(e[i],r[i]))}return e}},zt=Ht(function(t,n){return w(t)&&w(n)?zt(t,n):n}),Nt=Ht(function(t,n){return n}),Lt=function(e){var o,r=!1;return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return r||(r=!0,o=e.apply(null,t)),o}},jt=Vt([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),Ut=function(t){return jt.defaultedThunk(st(t))},Wt=jt.strict,Gt=jt.asOption,Xt=jt.defaultedThunk,Yt=(jt.asDefaultedOptionThunk,jt.mergeWithThunk),qt=(Vt([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(t,n){var e={};return e[t]=n,e}),Kt=function(t,n){return e=n,o={},_t(t,function(t,n){M(e,n)||(o[n]=t)}),o;var e,o},Jt=qt,$t=function(t){return n={},mt(t,function(t){n[t.key]=t.value}),n;var n},Qt=function(t,n){var e,o,r,i,u,a=(e=[],o=[],mt(t,function(t){t.fold(function(t){e.push(t)},function(t){o.push(t)})}),{errors:e,values:o});return 0<a.errors.length?(u=a.errors,pt.error(gt(u))):(i=n,0===(r=a.values).length?pt.value(i):pt.value(zt(i,Nt.apply(undefined,r))))},Zt=function(t){return u(yt,gt)(t)},tn=function(t,n){var e,o,r=bt(t);return 0<r.errors.length?Zt(r.errors):(e=r.values,o=n,0<e.length?vt(zt(o,Nt.apply(undefined,e))):vt(o))},nn=function(t){var n=bt(t);return 0<n.errors.length?Zt(n.errors):vt(n.values)},en=function(t){return w(t)&&100<Ct(t).length?" removed due to size":JSON.stringify(t,null,2)},on=function(t,n){return yt([{path:t,getErrorInfo:n}])},rn=Vt([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),un=function(e,o,r){return Ft(o,r).fold(function(){return t=r,n=o,on(e,function(){return'Could not find valid *strict* value for "'+t+'" in '+en(n)});var t,n},vt)},an=function(t,n,e){var o=Ft(t,n).fold(function(){return e(t)},lt);return vt(o)},cn=function(a,c,t,s){return t.fold(function(r,e,t,o){var i=function(t){var n=o.extract(a.concat([r]),s,t);return St(n,function(t){return qt(e,s(t))})},u=function(t){return t.fold(function(){var t=qt(e,s(dt.none()));return vt(t)},function(t){var n=o.extract(a.concat([r]),s,t);return St(n,function(t){return qt(e,s(dt.some(t)))})})};return t.fold(function(){return xt(un(a,c,r),i)},function(t){return xt(an(c,r,t),i)},function(){return xt(vt(Ft(c,r)),u)},function(t){return xt((e=t,o=Ft(n=c,r).map(function(t){return!0===t?e(n):t}),vt(o)),u);var n,e,o},function(t){var n=t(c),e=St(an(c,r,st({})),function(t){return zt(n,t)});return xt(e,i)})},function(t,n){var e=n(c);return vt(qt(t,s(e)))})},sn=function(o){return{extract:function(e,t,n){return wt(o(n,t),function(t){return n=t,on(e,function(){return n});var n})},toString:function(){return"val"}}},ln=function(t){var u=fn(t),a=z(t,function(n,t){return t.fold(function(t){return zt(n,Jt(t,!0))},st(n))},{});return{extract:function(t,n,e){var o,r=S(e)?[]:Ct(Dt(e,function(t){return t!==undefined&&null!==t})),i=H(r,function(t){return!Rt(a,t)});return 0===i.length?u.extract(t,n,e):(o=i,on(t,function(){return"There are unsupported fields: ["+o.join(", ")+"] specified"}))},toString:u.toString}},fn=function(a){return{extract:function(t,n,e){return o=t,r=e,i=n,u=V(a,function(t){return cn(o,r,t,i)}),tn(u,{});var o,r,i,u},toString:function(){return"obj{\n"+V(a,function(t){return t.fold(function(t,n,e,o){return t+" -> "+o.toString()},function(t,n){return"state("+t+")"})}).join("\n")+"}"}}},dn=function(r){return{extract:function(e,o,t){var n=V(t,function(t,n){return r.extract(e.concat(["["+n+"]"]),o,t)});return nn(n)},toString:function(){return"array("+r.toString()+")"}}},mn=function(a){return{extract:function(t,n,e){for(var o=[],r=0,i=a;r<i.length;r++){var u=i[r].extract(t,n,e);if(u.stype===g.Value)return u;o.push(u)}return nn(o)},toString:function(){return"oneOf("+V(a,function(t){return t.toString()}).join(", ")+")"}}},gn=function(a,c){return{extract:function(e,o,r){var t,n,i=Ct(r),u=(t=e,n=i,dn(sn(a)).extract(t,lt,n));return xt(u,function(t){var n=V(t,function(t){return rn.field(t,t,Wt(),c)});return fn(n).extract(e,o,r)})},toString:function(){return"setOf("+c.toString()+")"}}},pn=st(sn(vt)),hn=u(dn,fn),vn=rn.state,bn=rn.field,yn=function(e,n,o,r,i){return Ft(r,i).fold(function(){return t=r,n=i,on(e,function(){return'The chosen schema: "'+n+'" did not exist in branches: '+en(t)});var t,n},function(t){return t.extract(e.concat(["branch: "+i]),n,o)})},xn=function(r,i){return{extract:function(n,e,o){return Ft(o,r).fold(function(){return t=r,on(n,function(){return'Choice schema did not contain choice key: "'+t+'"'});var t},function(t){return yn(n,e,o,i,t)})},toString:function(){return"chooseOn("+r+"). Possible values: "+Ct(i)}}},wn=sn(vt),Sn=function(t){return hn(t)},kn=function(o){return{extract:function(t,n,e){return o().extract(t,n,e)},toString:function(){return o().toString()}}},Cn=function(n){return sn(function(t){return n(t).fold(yt,vt)})},On=function(n,t){return gn(function(t){return ut(n(t))},t)},_n=function(t,n,e){return ht((o=t,r=lt,i=e,u=n.extract([o],r,i),kt(u,function(t){return{input:i,errors:t}})));var o,r,i,u},Tn=function(t){return t.fold(function(t){throw new Error(Dn(t))},lt)},En=function(t,n,e){return Tn(_n(t,n,e))},Dn=function(t){return"Errors: \n"+(n=t.errors,e=10<n.length?n.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):n,V(e,function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}).join("\n"))+"\n\nInput object: "+en(t.input);var n,e},Bn=xn,An=function(t,n){return xn(t,Tt(n,fn))},Mn=st(wn),Fn=function(e,o){return sn(function(t){var n=typeof t;return e(t)?vt(t):yt("Expected type: "+o+" but got: "+n)})},In=Fn(at,"number"),Rn=Fn(x,"string"),Vn=Fn(S,"boolean"),Pn=Fn(y,"function"),Hn=function(n){var t=function(t,n){for(var e=t.next();!e.done;){if(!n(e.value))return!1;e=t.next()}return!0};if(Object(n)!==n)return!0;switch({}.toString.call(n).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(n).every(function(t){return Hn(n[t])});case"Map":return t(n.keys(),Hn)&&t(n.values(),Hn);case"Set":return t(n.keys(),Hn);default:return!1}},zn=sn(function(t){return Hn(t)?vt(t):yt("Expected value to be acceptable for sending via postMessage")}),Nn=function(n){return Cn(function(t){return M(n,t)?pt.value(t):pt.error('Unsupported value: "'+t+'", choose one of "'+n.join(", ")+'".')})},Ln=function(t){return bn(t,t,Wt(),pn())},jn=function(t,n){return bn(t,t,Wt(),n)},Un=function(t){return jn(t,Rn)},Wn=function(t,n){return bn(t,t,Wt(),Nn(n))},Gn=function(t){return jn(t,Pn)},Xn=function(t,n){return bn(t,t,Wt(),fn(n))},Yn=function(t,n){return bn(t,t,Wt(),hn(n))},qn=function(t,n){return bn(t,t,Wt(),dn(n))},Kn=function(t){return bn(t,t,Gt(),pn())},Jn=function(t,n){return bn(t,t,Gt(),n)},$n=function(t){return Jn(t,In)},Qn=function(t){return Jn(t,Rn)},Zn=function(t){return Jn(t,Pn)},te=function(t,n){return Jn(t,fn(n))},ne=function(t,n){return bn(t,t,Ut(n),pn())},ee=function(t,n,e){return bn(t,t,Ut(n),e)},oe=function(t,n){return ee(t,n,In)},re=function(t,n){return ee(t,n,Rn)},ie=function(t,n,e){return ee(t,n,Nn(e))},ue=function(t,n){return ee(t,n,Vn)},ae=function(t,n){return ee(t,n,Pn)},ce=function(t,n,e){return ee(t,n,dn(e))},se=function(t,n,e){return ee(t,n,fn(e))},le=function(t,n){return vn(t,n)},fe=function(t){var n=t;return{get:function(){return n},set:function(t){n=t}}},de=function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:t}},me={fromHtml:function(t,n){var e=(n||document).createElement("div");if(e.innerHTML=t,!e.hasChildNodes()||1<e.childNodes.length)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return de(e.childNodes[0])},fromTag:function(t,n){var e=(n||document).createElement(t);return de(e)},fromText:function(t,n){var e=(n||document).createTextNode(t);return de(e)},fromDom:de,fromPoint:function(t,n,e){return dt.from(t.dom.elementFromPoint(n,e)).map(de)}},ge=function(t,n){var e=function(t,n){for(var e=0;e<t.length;e++){var o=t[e];if(o.test(n))return o}return undefined}(t,n);if(!e)return{major:0,minor:0};var o=function(t){return Number(n.replace(e,"$"+t))};return he(o(1),o(2))},pe=function(){return he(0,0)},he=function(t,n){return{major:t,minor:n}},ve={nu:he,detect:function(t,n){var e=String(n).toLowerCase();return 0===t.length?pe():ge(t,e)},unknown:pe},be=function(t,n){var e=String(n).toLowerCase();return L(t,function(t){return t.search(e)})},ye=function(t,e){return be(t,e).map(function(t){var n=ve.detect(t.versionRegexes,e);return{current:t.name,version:n}})},xe=function(t,e){return be(t,e).map(function(t){var n=ve.detect(t.versionRegexes,e);return{current:t.name,version:n}})},we=function(t,n){return-1!==t.indexOf(n)},Se=function(t,n){return o=n,r=(e=t).length-n.length,""===o||e.length>=o.length&&e.substr(r,r+o.length)===o;var e,o,r},ke=(nt=/^\s+|\s+$/g,function(t){return t.replace(nt,"")}),Ce=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Oe=function(n){return function(t){return we(t,n)}},_e=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return we(t,"edge/")&&we(t,"chrome")&&we(t,"safari")&&we(t,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Ce],search:function(t){return we(t,"chrome")&&!we(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return we(t,"msie")||we(t,"trident")}},{name:"Opera",versionRegexes:[Ce,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Oe("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Oe("firefox")},{name:"Safari",versionRegexes:[Ce,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(we(t,"safari")||we(t,"mobile/"))&&we(t,"applewebkit")}}],Te=[{name:"Windows",search:Oe("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return we(t,"iphone")||we(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Oe("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Oe("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Oe("linux"),versionRegexes:[]},{name:"Solaris",search:Oe("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Oe("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Oe("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Ee={browsers:st(_e),oses:st(Te)},De="Firefox",Be=function(t){var n=t.current,e=t.version,o=function(t){return function(){return n===t}};return{current:n,version:e,isEdge:o("Edge"),isChrome:o("Chrome"),isIE:o("IE"),isOpera:o("Opera"),isFirefox:o(De),isSafari:o("Safari")}},Ae={unknown:function(){return Be({current:undefined,version:ve.unknown()})},nu:Be,edge:st("Edge"),chrome:st("Chrome"),ie:st("IE"),opera:st("Opera"),firefox:st(De),safari:st("Safari")},Me="Windows",Fe="Android",Ie="Solaris",Re="FreeBSD",Ve="ChromeOS",Pe=function(t){var n=t.current,e=t.version,o=function(t){return function(){return n===t}};return{current:n,version:e,isWindows:o(Me),isiOS:o("iOS"),isAndroid:o(Fe),isOSX:o("OSX"),isLinux:o("Linux"),isSolaris:o(Ie),isFreeBSD:o(Re),isChromeOS:o(Ve)}},He={unknown:function(){return Pe({current:undefined,version:ve.unknown()})},nu:Pe,windows:st(Me),ios:st("iOS"),android:st(Fe),linux:st("Linux"),osx:st("OSX"),solaris:st(Ie),freebsd:st(Re),chromeos:st(Ve)},ze=function(t,n){var e,o,r,i,u,a,c,s,l,f,d,m,g=Ee.browsers(),p=Ee.oses(),h=ye(g,t).fold(Ae.unknown,Ae.nu),v=xe(p,t).fold(He.unknown,He.nu);return{browser:h,os:v,deviceType:(o=h,r=t,i=n,u=(e=v).isiOS()&&!0===/ipad/i.test(r),a=e.isiOS()&&!u,c=e.isiOS()||e.isAndroid(),s=c||i("(pointer:coarse)"),l=u||!a&&c&&i("(min-device-width:768px)"),f=a||c&&!l,d=o.isSafari()&&e.isiOS()&&!1===/safari/i.test(r),m=!f&&!l&&!d,{isiPad:st(u),isiPhone:st(a),isTablet:st(l),isPhone:st(f),isTouch:st(s),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:st(d),isDesktop:st(m)})}},Ne=function(t){return window.matchMedia(t).matches},Le=Lt(function(){return ze(navigator.userAgent,Ne)}),je=function(){return Le()},Ue=function(t,n){var e=t.dom;if(1!==e.nodeType)return!1;var o=e;if(o.matches!==undefined)return o.matches(n);if(o.msMatchesSelector!==undefined)return o.msMatchesSelector(n);if(o.webkitMatchesSelector!==undefined)return o.webkitMatchesSelector(n);if(o.mozMatchesSelector!==undefined)return o.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},We=function(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount},Ge=function(t,n){return t.dom===n.dom},Xe=function(t,n){return e=t.dom,o=n.dom,r=e,i=o,u=Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(r.compareDocumentPosition(i)&u);var e,o,r,i,u},Ye=function(t,n){return je().browser.isIE()?Xe(t,n):(e=n,o=t.dom,r=e.dom,o!==r&&o.contains(r));var e,o,r},qe=function(t){return y(t)?t:l},Ke=function(t,n,e){for(var o=t.dom,r=qe(e);o.parentNode;){o=o.parentNode;var i=me.fromDom(o),u=n(i);if(u.isSome())return u;if(r(i))break}return dt.none()},Je=function(t,n,e){var o=n(t),r=qe(e);return o.orThunk(function(){return r(t)?dt.none():Ke(t,n,r)})},$e=function(t,n){return Ge(t.element,n.event.target)},Qe=function(t){if(!Rt(t,"can")&&!Rt(t,"abort")&&!Rt(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return En("Extracting event.handler",ln([ne("can",O),ne("abort",l),ne("run",ct)]),t)},Ze=function(e){var n,o,r,i,t=(o=function(t){return t.can},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return N(n,function(t,n){return t&&o(n).apply(undefined,e)},!0)}),u=(r=n=e,i=function(t){return t.abort},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return N(r,function(t,n){return t||i(n).apply(undefined,e)},!1)});return Qe({can:t,abort:u,run:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];mt(e,function(t){t.run.apply(undefined,n)})}})},to=st,no=to("touchstart"),eo=to("touchmove"),oo=to("touchend"),ro=to("touchcancel"),io=to("mousedown"),uo=to("mousemove"),ao=to("mouseout"),co=to("mouseup"),so=to("mouseover"),lo=to("focusin"),fo=to("focusout"),mo=to("keydown"),go=to("keyup"),po=to("input"),ho=to("change"),vo=to("click"),bo=to("transitionend"),yo=to("selectstart"),xo=function(t){return st("alloy."+t)},wo={tap:xo("tap")},So=xo("focus"),ko=xo("blur.post"),Co=xo("paste.post"),Oo=xo("receive"),_o=xo("execute"),To=xo("focus.item"),Eo=wo.tap,Do=xo("longpress"),Bo=xo("sandbox.close"),Ao=xo("typeahead.cancel"),Mo=xo("system.init"),Fo=xo("system.touchmove"),Io=xo("system.touchend"),Ro=xo("system.scroll"),Vo=xo("system.resize"),Po=xo("system.attached"),Ho=xo("system.detached"),zo=xo("system.dismissRequested"),No=xo("system.repositionRequested"),Lo=xo("focusmanager.shifted"),jo=xo("slotcontainer.visibility"),Uo=xo("change.tab"),Wo=xo("dismiss.tab"),Go=xo("highlight"),Xo=xo("dehighlight"),Yo=function(t,n){$o(t,t.element,n,{})},qo=function(t,n,e){$o(t,t.element,n,e)},Ko=function(t){Yo(t,_o())},Jo=function(t,n,e){$o(t,n,e,{})},$o=function(t,n,e,o){var r=ft({target:n},o);t.getSystem().triggerEvent(e,n,r)},Qo=function(t,n,e,o){t.getSystem().triggerEvent(e,n,o.event)},Zo=$t,tr=function(t,n){return{key:t,value:Qe({abort:n})}},nr=function(t){return{key:t,value:Qe({run:function(t,n){n.event.prevent()}})}},er=function(t,n){return{key:t,value:Qe({run:n})}},or=function(t,e,o){return{key:t,value:Qe({run:function(t,n){e.apply(undefined,[t,n].concat(o))}})}},rr=function(t){return function(e){return{key:t,value:Qe({run:function(t,n){$e(t,n)&&e(t,n)}})}}},ir=function(t,n,e){var o,r,i=n.partUids[e];return r=i,er(o=t,function(t,n){t.getSystem().getByUid(r).each(function(t){Qo(t,t.element,o,n)})})},ur=function(t,r){return er(t,function(n,t){var e=t.event,o=n.getSystem().getByDom(e.target).fold(function(){return Je(e.target,function(t){return n.getSystem().getByDom(t).toOptional()},l).getOr(n)},function(t){return t});r(n,o,t)})},ar=function(t){return er(t,function(t,n){n.cut()})},cr=function(t,n){return rr(t)(n)},sr=rr(Po()),lr=rr(Ho()),fr=rr(Mo()),dr=(et=_o(),function(t){return er(et,t)}),mr=("undefined"!=typeof window||Function("return this;")(),function(t){return t.dom.nodeName.toLowerCase()}),gr=function(n){return function(t){return t.dom.nodeType===n}},pr=gr(1),hr=gr(3),vr=gr(9),br=gr(11),yr=function(t){return me.fromDom(t.dom.ownerDocument)},xr=function(t){return vr(t)?t:yr(t)},wr=function(t){return me.fromDom(xr(t).dom.documentElement)},Sr=function(t){return me.fromDom(xr(t).dom.defaultView)},kr=function(t){return dt.from(t.dom.parentNode).map(me.fromDom)},Cr=kr,Or=function(t){return dt.from(t.dom.offsetParent).map(me.fromDom)},_r=function(t){return V(t.dom.childNodes,me.fromDom)},Tr=function(t,n){var e=t.dom.childNodes;return dt.from(e[n]).map(me.fromDom)},Er=function(t){return br(t)&&i(t.dom.host)},Dr=y(Element.prototype.attachShadow)&&y(Node.prototype.getRootNode),Br=st(Dr),Ar=Dr?function(t){return me.fromDom(t.dom.getRootNode())}:xr,Mr=function(t){return Er(t)?t:me.fromDom(xr(t).dom.body)},Fr=function(t){var n=Ar(t);return Er(n)?dt.some(n):dt.none()},Ir=function(t){return me.fromDom(t.dom.host)},Rr=function(t){return i(t.dom.shadowRoot)},Vr=function(n,e){kr(n).each(function(t){t.dom.insertBefore(e.dom,n.dom)})},Pr=function(t,n){var e;(e=t,dt.from(e.dom.nextSibling).map(me.fromDom)).fold(function(){kr(t).each(function(t){zr(t,n)})},function(t){Vr(t,n)})},Hr=function(n,e){Tr(n,0).fold(function(){zr(n,e)},function(t){n.dom.insertBefore(e.dom,t.dom)})},zr=function(t,n){t.dom.appendChild(n.dom)},Nr=function(n,t){mt(t,function(t){zr(n,t)})},Lr=function(t){t.dom.textContent="",mt(_r(t),function(t){jr(t)})},jr=function(t){var n=t.dom;null!==n.parentNode&&n.parentNode.removeChild(n)},Ur=function(t){var n,e=_r(t);0<e.length&&(n=t,mt(e,function(t){Vr(n,t)})),jr(t)},Wr=function(t){return t.dom.innerHTML},Gr=function(t,n){var e,o,r=yr(t).dom,i=me.fromDom(r.createDocumentFragment()),u=(e=n,(o=(r||document).createElement("div")).innerHTML=e,_r(me.fromDom(o)));Nr(i,u),Lr(t),zr(t,i)},Xr=function(t,n,e){if(!(x(e)||S(e)||at(e)))throw console.error("Invalid call to Attribute.set. Key ",n,":: Value ",e,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(n,e+"")},Yr=function(t,n,e){Xr(t.dom,n,e)},qr=function(t,n){var e=t.dom.getAttribute(n);return null===e?undefined:e},Kr=function(t,n){return dt.from(qr(t,n))},Jr=function(t,n){var e=t.dom;return!(!e||!e.hasAttribute)&&e.hasAttribute(n)},$r=function(t,n){t.dom.removeAttribute(n)},Qr=function(t){return n=t,e=!1,me.fromDom(n.dom.cloneNode(e));var n,e},Zr=function(t){if(Er(t))return"#shadow-root";var n,e,o,r=Qr(t);return n=r,e=me.fromTag("div"),o=me.fromDom(n.dom.cloneNode(!0)),zr(e,o),Wr(e)},ti=Zo([{key:So(),value:Qe({can:function(t,n){var e,o,r=n.event,i=r.originator,u=r.target;return o=u,!(Ge(e=i,t.element)&&!Ge(e,o))||(console.warn(So()+" did not get interpreted by the desired target. \nOriginator: "+Zr(i)+"\nTarget: "+Zr(u)+"\nCheck the "+So()+" event handlers"),!1)}})}]),ni=/* */Object.freeze({__proto__:null,events:ti}),ei=0,oi=function(t){var n=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++ei+String(n)},ri=st("alloy-id-"),ii=st("data-alloy-id"),ui=ri(),ai=ii(),ci=function(t,n){Object.defineProperty(t.dom,ai,{value:n,writable:!0})},si=function(t){var n=pr(t)?t.dom[ai]:null;return dt.from(n)},li=oi,fi=lt,di=function(n){var t=function(t){return function(){throw new Error("The component must be in a context to send: "+t+(n?"\n"+Zr(n().element)+" is not in context.":""))}};return{debugInfo:st("fake"),triggerEvent:t("triggerEvent"),triggerFocus:t("triggerFocus"),triggerEscape:t("triggerEscape"),build:t("build"),addToWorld:t("addToWorld"),removeFromWorld:t("removeFromWorld"),addToGui:t("addToGui"),removeFromGui:t("removeFromGui"),getByUid:t("getByUid"),getByDom:t("getByDom"),broadcast:t("broadcast"),broadcastOn:t("broadcastOn"),broadcastEvent:t("broadcastEvent"),isConnected:l}},mi=di(),gi=function(t){return V(t,function(t){return Se(t,"/*")?t.substring(0,t.length-"/*".length):t})},pi=function(t,n){var e=t.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:n,parameters:gi(i)}},t},hi=oi("alloy-premade"),vi=function(t){return Jt(hi,t)},bi=function(o){return t=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return o.apply(void 0,T([t.getApis(),t],n))},n=o.toString(),e=n.indexOf(")")+1,r=n.indexOf("("),i=n.substring(r+1,e-1).split(/,\s*/),t.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:gi(i.slice(1))}},t;var t,n,e,r,i},yi={init:function(){return xi({readState:function(){return"No State required"}})}},xi=function(t){return t},wi=function(t,r){var i={};return _t(t,function(t,o){_t(t,function(t,n){var e=Ft(i,n).getOr([]);i[n]=e.concat([r(o,t)])})}),i},Si=function(t){return{classes:t.classes!==undefined?t.classes:[],attributes:t.attributes!==undefined?t.attributes:{},styles:t.styles!==undefined?t.styles:{}}},ki=function(t){return t.cHandler},Ci=function(t,n){return{name:t,handler:n}},Oi=function(t,n,e){var o,r,i=ft(ft({},e),(o=t,r={},mt(n,function(t){r[t.name()]=t.handlers(o)}),r));return wi(i,Ci)},_i=function(t){var n,i=y(n=t)?{can:O,abort:l,run:n}:n;return function(t,n){for(var e=[],o=2;o<arguments.length;o++)e[o-2]=arguments[o];var r=[t,n].concat(e);i.abort.apply(undefined,r)?n.stop():i.can.apply(undefined,r)&&i.run.apply(undefined,r)}},Ti=function(t,n,e){var o,r,i=n[e];return i?function(u,a,t,c){try{var n=Y(t,function(t,n){var e=t[a],o=n[a],r=c.indexOf(e),i=c.indexOf(o);if(-1===r)throw new Error("The ordering for "+u+" does not have an entry for "+e+".\nOrder specified: "+JSON.stringify(c,null,2));if(-1===i)throw new Error("The ordering for "+u+" does not have an entry for "+o+".\nOrder specified: "+JSON.stringify(c,null,2));return r<i?-1:i<r?1:0});return pt.value(n)}catch(e){return pt.error([e])}}("Event: "+e,"name",t,i).map(function(t){var n=V(t,function(t){return t.handler});return Ze(n)}):(o=e,r=t,pt.error(["The event ("+o+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify(V(r,function(t){return t.name}),null,2)]))},Ei=function(t,i){var n=Bt(t,function(o,r){return(1===o.length?pt.value(o[0].handler):Ti(o,i,r)).map(function(t){var n=_i(t),e=1<o.length?H(i[r],function(n){return F(o,function(t){return t.name===n})}).join(" > "):o[0].name;return Jt(r,{handler:n,purpose:e})})});return Qt(n,{})},Di="alloy.base.behaviour",Bi=function(t){var n,e;return _n("custom.definition",fn([bn("dom","dom",Wt(),fn([Ln("tag"),ne("styles",{}),ne("classes",[]),ne("attributes",{}),Kn("value"),Kn("innerHtml")])),Ln("components"),Ln("uid"),ne("events",{}),ne("apis",{}),bn("eventOrder","eventOrder",((n={})[_o()]=["disabling",Di,"toggling","typeaheadevents"],n[So()]=[Di,"focusing","keying"],n[Mo()]=[Di,"disabling","toggling","representing"],n[po()]=[Di,"representing","streaming","invalidating"],n[Ho()]=[Di,"representing","item-events","tooltipping"],n[io()]=["focusing",Di,"item-type-events"],n[no()]=["focusing",Di,"item-type-events"],n[so()]=["item-type-events","tooltipping"],n[Oo()]=["receiving","reflecting","tooltipping"],e=n,jt.mergeWithThunk(st(e))),Mn()),Kn("domModification")]),t)},Ai=function(t,n){var e=qr(t,n);return e===undefined||""===e?[]:e.split(" ")},Mi=function(t){return t.dom.classList!==undefined},Fi=function(t,n){return r=n,i=Ai(e=t,o="class").concat([r]),Yr(e,o,i.join(" ")),!0;var e,o,r,i},Ii=function(t,n){return r=n,0<(i=H(Ai(e=t,o="class"),function(t){return t!==r})).length?Yr(e,o,i.join(" ")):$r(e,o),!1;var e,o,r,i},Ri=function(t,n){Mi(t)?t.dom.classList.add(n):Fi(t,n)},Vi=function(t){0===(Mi(t)?t.dom.classList:Ai(t,"class")).length&&$r(t,"class")},Pi=function(t,n){Mi(t)?t.dom.classList.remove(n):Ii(t,n),Vi(t)},Hi=function(t,n){return Mi(t)&&t.dom.classList.contains(n)},zi=function(n,t){mt(t,function(t){Ri(n,t)})},Ni=function(n,t){mt(t,function(t){Pi(n,t)})},Li=function(t){return t.style!==undefined&&y(t.style.getPropertyValue)},ji=function(t){var n=hr(t)?t.dom.parentNode:t.dom;if(n===undefined||null===n||null===n.ownerDocument)return!1;var e,o,r=n.ownerDocument;return Fr(me.fromDom(n)).fold(function(){return r.body.contains(n)},(e=ji,o=Ir,function(t){return e(o(t))}))},Ui=function(){return Wi(me.fromDom(document))},Wi=function(t){var n=t.dom.body;if(null===n||n===undefined)throw new Error("Body is not available yet");return me.fromDom(n)},Gi=function(t,n,e){if(!x(e))throw console.error("Invalid call to CSS.set. Property ",n,":: Value ",e,":: Element ",t),new Error("CSS value must be a string: "+e);Li(t)&&t.style.setProperty(n,e)},Xi=function(t,n){Li(t)&&t.style.removeProperty(n)},Yi=function(t,n,e){var o=t.dom;Gi(o,n,e)},qi=function(t,n){var e=t.dom;_t(n,function(t,n){Gi(e,n,t)})},Ki=function(t,n){var e=t.dom;_t(n,function(t,n){t.fold(function(){Xi(e,n)},function(t){Gi(e,n,t)})})},Ji=function(t,n){var e=t.dom,o=window.getComputedStyle(e).getPropertyValue(n);return""!==o||ji(t)?o:$i(e,n)},$i=function(t,n){return Li(t)?t.style.getPropertyValue(n):""},Qi=function(t,n){var e=t.dom,o=$i(e,n);return dt.from(o).filter(function(t){return 0<t.length})},Zi=function(t,n,e){var o=me.fromTag(t);return Yi(o,n,e),Qi(o,n).isSome()},tu=function(t,n){var e=t.dom;Xi(e,n),Kr(t,"style").map(ke).is("")&&$r(t,"style")},nu=function(t){return t.dom.offsetWidth},eu=function(t){return t.dom.value},ou=function(t,n){if(n===undefined)throw new Error("Value.set was undefined");t.dom.value=n},ru=function(t){var n,e,o,r=me.fromTag(t.tag);n=r,e=t.attributes,o=n.dom,_t(e,function(t,n){Xr(o,n,t)}),zi(r,t.classes),qi(r,t.styles),t.innerHtml.each(function(t){return Gr(r,t)});var i=t.domChildren;return Nr(r,i),t.value.each(function(t){ou(r,t)}),t.uid,ci(r,t.uid),r},iu=function(t,n){return e=t,r=V(o=n,function(t){return te(t.name(),[Ln("config"),ne("state",yi)])}),i=_n("component.behaviours",fn(r),e.behaviours).fold(function(t){throw new Error(Dn(t)+"\nComplete spec:\n"+JSON.stringify(e,null,2))},function(t){return t}),{list:o,data:Tt(i,function(t){var n=t.map(function(t){return{config:t.config,state:t.state.init(t.config)}});return function(){return n}})};var e,o,r,i},uu=function(t){var n,e,o=(n=Ft(t,"behaviours").getOr({}),e=H(Ct(n),function(t){return n[t]!==undefined}),V(e,function(t){return n[t].me}));return iu(t,o)},au=function(t,n,e){var o,r,i,u=ft(ft({},(o=t).dom),{uid:o.uid,domChildren:V(o.components,function(t){return t.element})}),a=t.domModification.fold(function(){return Si({})},Si),c={"alloy.base.modification":a},s=0<n.length?function(n,t,e,o){var r=ft({},t);mt(e,function(t){r[t.name()]=t.exhibit(n,o)});var i=wi(r,function(t,n){return{name:t,modification:n}}),u=function(t){return z(t,function(t,n){return ft(ft({},n.modification),t)},{})},a=z(i.classes,function(t,n){return n.modification.concat(t)},[]),c=u(i.attributes),s=u(i.styles);return Si({classes:a,attributes:c,styles:s})}(e,c,n,u):a;return i=s,ft(ft({},r=u),{attributes:ft(ft({},r.attributes),i.attributes),styles:ft(ft({},r.styles),i.styles),classes:r.classes.concat(i.classes)})},cu=function(t,n,e){var o,r,i,u={"alloy.base.behaviour":t.events};return o=e,r=t.eventOrder,i=Oi(o,n,u),Ei(i,r).getOrDie()},su=function(t){var n,e,o,r,i,u,a,c,s,l,f,d,m,g=fi(t),p=g.events,h=_(g,["events"]),v=(n=Ft(h,"components").getOr([]),V(n,mu)),b=ft(ft({},h),{events:ft(ft({},ni),p),components:v});return pt.value((o=function(){return m},r=fe(mi),i=Tn(Bi(e=b)),u=uu(e),a=u.list,c=u.data,s=au(i,a,c),l=ru(s),f=cu(i,a,c),d=fe(i.components),m={getSystem:r.get,config:function(t){var n=c;return(y(n[t.name()])?n[t.name()]:function(){throw new Error("Could not find "+t.name()+" in "+JSON.stringify(e,null,2))})()},hasConfigured:function(t){return y(c[t.name()])},spec:e,readState:function(t){return c[t]().map(function(t){return t.state.readState()}).getOr("not enabled")},getApis:function(){return i.apis},connect:function(t){r.set(t)},disconnect:function(){r.set(di(o))},element:l,syncComponents:function(){var t=_r(l),n=U(t,function(t){return r.get().getByDom(t).fold(function(){return[]},function(t){return[t]})});d.set(n)},components:d.get,events:f}))},lu=function(t){var n=me.fromText(t);return fu({element:n})},fu=function(t){var n=En("external.component",ln([Ln("element"),Kn("uid")]),t),e=fe(di());n.uid.each(function(t){ci(n.element,t)});var o={getSystem:e.get,config:dt.none,hasConfigured:l,connect:function(t){e.set(t)},disconnect:function(){e.set(di(function(){return o}))},getApis:function(){return{}},element:n.element,spec:t,readState:st("No state"),syncComponents:ct,components:st([]),events:{}};return vi(o)},du=li,mu=function(n){return Ft(n,hi).fold(function(){var t=n.hasOwnProperty("uid")?n:ft({uid:du("")},n);return su(t).getOrDie()},function(t){return t})},gu=vi,pu=function(o,r){var t=function(t){var n=r(t);if(n<=0||null===n){var e=Ji(t,o);return parseFloat(e)||0}return n},i=function(r,t){return N(t,function(t,n){var e=Ji(r,n),o=e===undefined?0:parseInt(e,10);return isNaN(o)?t:t+o},0)};return{set:function(t,n){if(!at(n)&&!n.match(/^[0-9]+$/))throw new Error(o+".set accepts only positive integer values. Value was "+n);var e=t.dom;Li(e)&&(e.style[o]=n+"px")},get:t,getOuter:t,aggregate:i,max:function(t,n,e){var o=i(t,e);return o<n?n-o:0}}},hu=pu("height",function(t){var n=t.dom;return ji(t)?n.getBoundingClientRect().height:n.offsetHeight}),vu=function(t){return hu.get(t)},bu=function(t){return hu.getOuter(t)},yu=function(e,o){return{left:e,top:o,translate:function(t,n){return yu(e+t,o+n)}}},xu=yu,wu=function(t,n){return t!==undefined?t:n!==undefined?n:0},Su=function(t){var n=t.dom.ownerDocument,e=n.body,o=n.defaultView,r=n.documentElement;if(e===t.dom)return xu(e.offsetLeft,e.offsetTop);var i=wu(null==o?void 0:o.pageYOffset,r.scrollTop),u=wu(null==o?void 0:o.pageXOffset,r.scrollLeft),a=wu(r.clientTop,e.clientTop),c=wu(r.clientLeft,e.clientLeft);return ku(t).translate(u-c,i-a)},ku=function(t){var n,e=t.dom,o=e.ownerDocument.body;return o===e?xu(o.offsetLeft,o.offsetTop):ji(t)?(n=e.getBoundingClientRect(),xu(n.left,n.top)):xu(0,0)},Cu=pu("width",function(t){return t.dom.offsetWidth}),Ou=function(t){return Cu.get(t)},_u=function(t){return Cu.getOuter(t)},Tu=function(t){var n=me.fromDom(function(t){if(Br()&&i(t.target)){var n=me.fromDom(t.target);if(pr(n)&&Rr(n)&&t.composed&&t.composedPath){var e=t.composedPath();if(e)return K(e)}}return dt.from(t.target)}(t).getOr(t.target)),e=function(){return t.stopPropagation()},o=function(){return t.preventDefault()},r=u(o,e);return{target:n,x:t.clientX,y:t.clientY,stop:e,prevent:o,kill:r,raw:t}},Eu=function(t,n,e,o,r){var i,u,a=(i=e,u=o,function(t){i(t)&&u(Tu(t))});return t.dom.addEventListener(n,a,r),{unbind:k(Du,t,n,a,r)}},Du=function(t,n,e,o){t.dom.removeEventListener(n,e,o)},Bu=function(t){var n=t!==undefined?t.dom:document,e=n.body.scrollLeft||n.documentElement.scrollLeft,o=n.body.scrollTop||n.documentElement.scrollTop;return xu(e,o)},Au=function(t,n,e){var o=(e!==undefined?e.dom:document).defaultView;o&&o.scrollTo(t,n)},Mu=function(t,n,e,o){return{x:t,y:n,width:e,height:o,right:t+e,bottom:n+o}},Fu=function(t){var n,e,o=t===undefined?window:t,r=o.document,i=Bu(me.fromDom(r));return e=(n=o)===undefined?window:n,dt.from(e.visualViewport).fold(function(){var t=o.document.documentElement,n=t.clientWidth,e=t.clientHeight;return Mu(i.left,i.top,n,e)},function(t){return Mu(Math.max(t.pageLeft,i.left),Math.max(t.pageTop,i.top),t.width,t.height)})},Iu=function(o,t){return o.view(t).fold(st([]),function(t){var n=o.owner(t),e=Iu(o,n);return[t].concat(e)})},Ru=/* */Object.freeze({__proto__:null,view:function(t){var n;return(t.dom===document?dt.none():dt.from(null===(n=t.dom.defaultView)||void 0===n?void 0:n.frameElement)).map(me.fromDom)},owner:yr}),Vu=function(o){var t,n,e,r,i=me.fromDom(document),u=Bu(i);return(t=o,e=(n=Ru).owner(t),r=Iu(n,e),dt.some(r)).fold(k(Su,o),function(t){var n=ku(o),e=z(t,function(t,n){var e=ku(n);return{left:t.left+e.left,top:t.top+e.top}},{left:0,top:0});return xu(e.left+n.left+u.left,e.top+n.top+u.top)})},Pu=function(t,n,e,o){return{x:t,y:n,width:e,height:o,right:t+e,bottom:n+o}},Hu=function(t){var n=Su(t),e=_u(t),o=bu(t);return Pu(n.left,n.top,e,o)},zu=function(t){var n=Vu(t),e=_u(t),o=bu(t);return Pu(n.left,n.top,e,o)},Nu=function(){return Fu(window)};function Lu(t,n,e,o,r){return t(e,o)?dt.some(e):y(r)&&r(e)?dt.none():n(e,o,r)}var ju,Uu,Wu=function(t,n,e){for(var o=t.dom,r=y(e)?e:l;o.parentNode;){o=o.parentNode;var i=me.fromDom(o);if(n(i))return dt.some(i);if(r(i))break}return dt.none()},Gu=function(t,n,e){return Lu(function(t,n){return n(t)},Wu,t,n,e)},Xu=function(t,n,e){return Gu(t,n,e).isSome()},Yu=function(t,n,e){return Wu(t,function(t){return Ue(t,n)},e)},qu=function(t,n){return e=n,r=(o=t)===undefined?document:o.dom,We(r)?dt.none():dt.from(r.querySelector(e)).map(me.fromDom);var e,o,r},Ku=function(t,n,e){return Lu(Ue,Yu,t,n,e)},Ju=function(){var n=oi("aria-owns");return{id:n,link:function(t){Yr(t,"aria-owns",n)},unlink:function(t){$r(t,"aria-owns")}}},$u=function(n,t){return Gu(t,function(t){if(!pr(t))return!1;var n=qr(t,"id");return n!==undefined&&-1<n.indexOf("aria-owns")}).bind(function(t){var n=qr(t,"id"),e=Ar(t);return qu(e,'[aria-owns="'+n+'"]')}).exists(function(t){return Qu(n,t)})},Qu=function(n,t){return Xu(t,function(t){return Ge(t,n.element)},l)||$u(n,t)},Zu="unknown";(Uu=ju=ju||{})[Uu.STOP=0]="STOP",Uu[Uu.NORMAL=1]="NORMAL",Uu[Uu.LOGGING=2]="LOGGING";var ta,na,ea=fe({}),oa=["alloy/data/Fields","alloy/debugging/Debugging"],ra=function(n,t,e){var o,r,i,u;switch(Ft(ea.get(),n).orThunk(function(){var t=Ct(ea.get());return Q(t,function(t){return-1<n.indexOf(t)?dt.some(ea.get()[t]):dt.none()})}).getOr(ju.NORMAL)){case ju.NORMAL:return e(ia());case ju.LOGGING:var a=(o=n,r=t,i=[],u=(new Date).getTime(),{logEventCut:function(t,n,e){i.push({outcome:"cut",target:n,purpose:e})},logEventStopped:function(t,n,e){i.push({outcome:"stopped",target:n,purpose:e})},logNoParent:function(t,n,e){i.push({outcome:"no-parent",target:n,purpose:e})},logEventNoHandlers:function(t,n){i.push({outcome:"no-handlers-left",target:n})},logEventResponse:function(t,n,e){i.push({outcome:"response",purpose:e,target:n})},write:function(){var t=(new Date).getTime();M(["mousemove","mouseover","mouseout",Mo()],o)||console.log(o,{event:o,time:t-u,target:r.dom,sequence:V(i,function(t){return M(["cut","stopped","response"],t.outcome)?"{"+t.purpose+"} "+t.outcome+" at ("+Zr(t.target)+")":t.outcome})})}}),c=e(a);return a.write(),c;case ju.STOP:return!0}},ia=st({logEventCut:ct,logEventStopped:ct,logNoParent:ct,logEventNoHandlers:ct,logEventResponse:ct,write:ct}),ua=st([Ln("menu"),Ln("selectedMenu")]),aa=st([Ln("item"),Ln("selectedItem")]),ca=(st(fn(aa().concat(ua()))),st(fn(aa()))),sa=Xn("initSize",[Ln("numColumns"),Ln("numRows")]),la=function(){return Xn("markers",[Ln("backgroundMenu")].concat(ua()).concat(aa()))},fa=function(t){return Xn("markers",V(t,Ln))},da=function(t,n,e){!function(){var t=new Error;if(t.stack===undefined)return;var n=t.stack.split("\n");L(n,function(n){return 0<n.indexOf("alloy")&&!F(oa,function(t){return-1<n.indexOf(t)})}).getOr(Zu)}();return bn(n,n,e,Cn(function(e){return pt.value(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.apply(undefined,t)})}))},ma=function(t){return da(0,t,Ut(ct))},ga=function(t){return da(0,t,Ut(dt.none))},pa=function(t){return da(0,t,Wt())},ha=function(t){return da(0,t,Wt())},va=function(t,n){return le(t,st(n))},ba=function(t){return le(t,lt)},ya=st(sa),xa=function(t,n,e,o,r,i){return{x:t,y:n,bubble:e,direction:o,boundsRestriction:r,label:i}},wa=Vt([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),Sa=wa.southeast,ka=wa.southwest,Ca=wa.northeast,Oa=wa.northwest,_a=wa.south,Ta=wa.north,Ea=wa.east,Da=wa.west,Ba=function(n,e){return function(t,n){for(var e={},o=0,r=t.length;o<r;o++){var i=t[o];e[String(i)]=n(i,o)}return e}(["left","right","top","bottom"],function(t){return Ft(e,t).map(function(t){return function(t,n){switch(n){case 1:return t.x;case 0:return t.x+t.width;case 2:return t.y;case 3:return t.y+t.height}}(n,t)})})},Aa=function(t){return t.x},Ma=function(t,n){return t.x+t.width/2-n.width/2},Fa=function(t,n){return t.x+t.width-n.width},Ia=function(t,n){return t.y-n.height},Ra=function(t){return t.y+t.height},Va=function(t,n){return t.y+t.height/2-n.height/2},Pa=function(t,n,e){return xa(Aa(t),Ra(t),e.southeast(),Sa(),Ba(t,{left:1,top:3}),"layout-se")},Ha=function(t,n,e){return xa(Fa(t,n),Ra(t),e.southwest(),ka(),Ba(t,{right:0,top:3}),"layout-sw")},za=function(t,n,e){return xa(Aa(t),Ia(t,n),e.northeast(),Ca(),Ba(t,{left:1,bottom:2}),"layout-ne")},Na=function(t,n,e){return xa(Fa(t,n),Ia(t,n),e.northwest(),Oa(),Ba(t,{right:0,bottom:2}),"layout-nw")},La=function(t,n,e){return xa(Ma(t,n),Ia(t,n),e.north(),Ta(),Ba(t,{bottom:2}),"layout-n")},ja=function(t,n,e){return xa(Ma(t,n),Ra(t),e.south(),_a(),Ba(t,{top:3}),"layout-s")},Ua=function(t,n,e){return xa((o=t).x+o.width,Va(t,n),e.east(),Ea(),Ba(t,{left:0}),"layout-e");var o},Wa=function(t,n,e){return xa((o=n,t.x-o.width),Va(t,n),e.west(),Da(),Ba(t,{right:1}),"layout-w");var o},Ga=function(){return[Pa,Ha,za,Na,ja,La,Ua,Wa]},Xa=function(){return[Ha,Pa,Na,za,ja,La,Ua,Wa]},Ya=function(){return[za,Na,Pa,Ha,La,ja]},qa=function(){return[Na,za,Ha,Pa,La,ja]},Ka=function(){return[Pa,Ha,za,Na,ja,La]},Ja=function(){return[Ha,Pa,Na,za,ja,La]},$a=/* */Object.freeze({__proto__:null,events:function(c){return Zo([er(Oo(),function(r,t){var n,e,i=c.channels,o=Ct(i),u=t,a=(n=o,(e=u).universal?n:H(n,function(t){return M(e.channels,t)}));mt(a,function(t){var n=i[t],e=n.schema,o=En("channel["+t+"] data\nReceiver: "+Zr(r.element),e,u.data);n.onReceive(r,o)})})])}}),Qa=[jn("channels",On(pt.value,ln([pa("onReceive"),ne("schema",Mn())])))],Za=function(e,o,r){return fr(function(t,n){r(t,e,o)})},tc=function(t,n,e,o,r,i){var u=ln(t),a=te(n,[Jn("config",ln(t))]);return oc(u,a,n,e,o,r,i)},nc=function(r,i,u){var t,n,e,o,a,c;return t=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=[e].concat(t);return e.config({name:st(r)}).fold(function(){throw new Error("We could not find any behaviour configuration for: "+r+". Using API: "+u)},function(t){var n=Array.prototype.slice.call(o,1);return i.apply(undefined,[e,t.config,t.state].concat(n))})},n=u,e=i.toString(),o=e.indexOf(")")+1,a=e.indexOf("("),c=e.substring(a+1,o-1).split(/,\s*/),t.toFunctionAnnotation=function(){return{name:n,parameters:gi(c.slice(0,1).concat(c.slice(3)))}},t},ec=function(t){return{key:t,value:undefined}},oc=function(e,t,o,r,n,i,u){var a=function(t){return Rt(t,o)?t[o]():dt.none()},c=Tt(n,function(t,n){return nc(o,t,n)}),s=Tt(i,pi),l=ft(ft(ft({},s),c),{revoke:k(ec,o),config:function(t){var n=En(o+"-config",e,t);return{key:o,value:{config:n,me:l,configAsRaw:Lt(function(){return En(o+"-config",e,t)}),initialConfig:t,state:u}}},schema:st(t),exhibit:function(t,e){return a(t).bind(function(n){return Ft(r,"exhibit").map(function(t){return t(e,n.config,n.state)})}).getOr(Si({}))},name:st(o),handlers:function(t){return a(t).map(function(t){return Ft(r,"events").getOr(function(){return{}})(t.config,t.state)}).getOr({})}});return l},rc=$t,ic=ln([Ln("fields"),Ln("name"),ne("active",{}),ne("apis",{}),ne("state",yi),ne("extra",{})]),uc=function(t){var n=En("Creating behaviour: "+t.name,ic,t);return tc(n.fields,n.name,n.active,n.apis,n.extra,n.state)},ac=ln([Ln("branchKey"),Ln("branches"),Ln("name"),ne("active",{}),ne("apis",{}),ne("state",yi),ne("extra",{})]),cc=function(t){var n,e,o,r,i,u,a,c,s=En("Creating behaviour: "+t.name,ac,t);return n=An(s.branchKey,s.branches),e=s.name,o=s.active,r=s.apis,i=s.extra,u=s.state,c=te(e,[Jn("config",a=n)]),oc(a,c,e,o,r,i,u)},sc=st(undefined),lc=uc({fields:Qa,name:"receiving",active:$a}),fc=/* */Object.freeze({__proto__:null,exhibit:function(t,n){return Si({classes:[],styles:n.useFixed()?{}:{position:"relative"}})}}),dc=function(t){return t.dom.focus()},mc=function(t){return void 0===t&&(t=me.fromDom(document)),dt.from(t.dom.activeElement).map(me.fromDom)},gc=function(n){return mc(Ar(n)).filter(function(t){return n.dom.contains(t.dom)})},pc=function(t,e){var o=Ar(e),n=mc(o).bind(function(n){var r,i,t=function(t){return Ge(n,t)};return t(e)?dt.some(e):(r=t,(i=function(t){for(var n=0;n<t.childNodes.length;n++){var e=me.fromDom(t.childNodes[n]);if(r(e))return dt.some(e);var o=i(t.childNodes[n]);if(o.isSome())retu