iss-library-form-renderer 1.16.12 → 1.16.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,4 +15,4 @@ t.exports=function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.
|
|
|
15
15
|
*/
|
|
16
16
|
var r=n(16),o=n(17),i=n(18);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return s(this,t,e,n)}function s(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r),c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=d(t,e),t}(t,e,n,r):"string"==typeof e?function(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,n),o=(t=u(t,r)).write(e,n);return o!==r&&(t=t.slice(0,o)),t}(t,e,n):function(t,e){if(c.isBuffer(e)){var n=0|m(e.length);return 0===(t=u(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?u(t,0):d(t,e);if("Buffer"===e.type&&i(e.data))return d(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(l(e),t=u(t,e<0?0:0|m(e)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function d(t,e){var n=e.length<0?0:0|m(e.length);t=u(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function m(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(t).length;default:if(r)return N(t).length;e=(""+e).toLowerCase(),r=!0}}function h(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,n);case"utf8":case"utf-8":return k(this,e,n);case"ascii":return E(this,e,n);case"latin1":case"binary":return M(this,e,n);case"base64":return C(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=c.from(e,r)),c.isBuffer(e))return 0===e.length?-1:b(t,e,n,r,o);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):b(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,o){var i,a=1,u=t.length,c=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,u/=2,c/=2,n/=2}function s(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var l=-1;for(i=n;i<u;i++)if(s(t,i)===s(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===c)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+c>u&&(n=u-c),i=n;i>=0;i--){for(var f=!0,d=0;d<c;d++)if(s(t,i+d)!==s(e,d)){f=!1;break}if(f)return i}return-1}function y(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var u=parseInt(e.substr(2*a,2),16);if(isNaN(u))return a;t[n+a]=u}return a}function _(t,e,n,r){return V(N(e,t.length-n),t,n,r)}function w(t,e,n,r){return V(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function x(t,e,n,r){return w(t,e,n,r)}function O(t,e,n,r){return V(H(e),t,n,r)}function S(t,e,n,r){return V(function(t,e){for(var n,r,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function C(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function k(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o<n;){var i,a,u,c,s=t[o],l=null,f=s>239?4:s>223?3:s>191?2:1;if(o+f<=n)switch(f){case 1:s<128&&(l=s);break;case 2:128==(192&(i=t[o+1]))&&(c=(31&s)<<6|63&i)>127&&(l=c);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(c=(15&s)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=t[o+1],a=t[o+2],u=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&u)&&(c=(15&s)<<18|(63&i)<<12|(63&a)<<6|63&u)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}function E(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function M(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function T(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=e;i<n;++i)o+=F(t[i]);return o}function D(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function A(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,n,r,o,i){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function R(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function I(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=e>>>8*(r?o:3-o)&255}function z(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(t,e,n,r,i){return i||z(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function j(t,e,n,r,i){return i||z(t,0,n,8),o.write(t,e,n,r,52,8),n+8}e.Buffer=c,e.SlowBuffer=function(t){return+t!=t&&(t=0),c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,n){return s(null,t,e,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?u(t,e):void 0!==n?"string"==typeof r?u(t,e).fill(n,r):u(t,e).fill(n):u(t,e)}(null,t,e,n)},c.allocUnsafe=function(t){return f(null,t)},c.allocUnsafeSlow=function(t){return f(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=c.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var a=t[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?k(this,0,t):h.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,n,r,o){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),u=Math.min(i,a),s=this.slice(r,o),l=t.slice(e,n),f=0;f<u;++f)if(s[f]!==l[f]){i=s[f],a=l[f];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},c.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},c.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},c.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return x(this,t,e,n);case"base64":return O(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},c.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=c.prototype;else{var o=e-t;n=new c(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t]}return n},c.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},c.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},c.prototype.readUInt8=function(t,e){return e||A(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||A(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||A(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||A(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},c.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},c.prototype.readInt8=function(t,e){return e||A(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||A(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(t,e){e||A(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(t,e){return e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||A(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||A(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||A(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||A(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||P(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},c.prototype.writeUIntBE=function(t,e,n,r){t=+t,e|=0,n|=0,r||P(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},c.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):I(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);P(this,t,e,n,o-1,-o)}var i=0,a=1,u=0;for(this[e]=255&t;++i<n&&(a*=256);)t<0&&0===u&&0!==this[e+i-1]&&(u=1),this[e+i]=(t/a>>0)-u&255;return e+n},c.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);P(this,t,e,n,o-1,-o)}var i=n-1,a=1,u=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===u&&0!==this[e+i+1]&&(u=1),this[e+i]=(t/a>>0)-u&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):I(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,n){return L(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return L(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return j(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return j(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},c.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var a=c.isBuffer(t)?t:N(new c(t,r).toString()),u=a.length;for(i=0;i<n-e;++i)this[i+e]=a[i%u]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function F(t){return t<16?"0"+t.toString(16):t.toString(16)}function N(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function V(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}}).call(this,n(8))},function(t,e,n){"use strict";e.byteLength=function(t){var e=s(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=s(t),a=r[0],u=r[1],c=new i(function(t,e,n){return 3*(e+n)/4-n}(0,a,u)),l=0,f=u>0?a-4:a;for(n=0;n<f;n+=4)e=o[t.charCodeAt(n)]<<18|o[t.charCodeAt(n+1)]<<12|o[t.charCodeAt(n+2)]<<6|o[t.charCodeAt(n+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===u&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,c[l++]=255&e),1===u&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=0,u=n-o;a<u;a+=16383)i.push(l(t,a,a+16383>u?u:a+16383));return 1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,c=a.length;u<c;++u)r[u]=a[u],o[a.charCodeAt(u)]=u;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var o,i,a=[],u=e;u<n;u+=3)o=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e){
|
|
17
17
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
18
|
-
e.read=function(t,e,n,r,o){var i,a,u=8*o-r-1,c=(1<<u)-1,s=c>>1,l=-7,f=n?o-1:0,d=n?-1:1,m=t[e+f];for(f+=d,i=m&(1<<-l)-1,m>>=-l,l+=u;l>0;i=256*i+t[e+f],f+=d,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+t[e+f],f+=d,l-=8);if(0===i)i=1-s;else{if(i===c)return a?NaN:1/0*(m?-1:1);a+=Math.pow(2,r),i-=s}return(m?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,u,c,s=8*i-o-1,l=(1<<s)-1,f=l>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:i-1,p=r?1:-1,h=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),(e+=a+f>=1?d/c:d*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(u=0,a=l):a+f>=1?(u=(e*c-1)*Math.pow(2,o),a+=f):(u=e*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;t[n+m]=255&u,m+=p,u/=256,o-=8);for(a=a<<o|u,s+=o;s>0;t[n+m]=255&a,m+=p,a/=256,s-=8);t[n+m-p]|=128*h}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,s=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&m())}function m(){if(!l){var t=u(d);l=!0;for(var e=s.length;e;){for(c=s,s=[];++f<e;)c&&c[f].run();f=-1,e=s.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function h(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new p(t,e)),1!==s.length||l||u(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";n.r(e);var r=n(6),o=n.n(r),i=n(3),a=n.n(i);function u(t){return""===t?t:"true"===t||"1"==t}var c=function(t,e){return new Promise((function(e,n){var r=new XMLHttpRequest;r.responseType="blob",r.onload=function(){var t=new FileReader;t.onloadend=function(){e(t.result)},t.readAsArrayBuffer(r.response)},r.open("GET",t),r.send()}))},s=n(9),l=function(t,e,n,r,o,i,a,u){var c,s="function"==typeof t?t.options:t;if(e&&(s.render=e,s.staticRenderFns=[],s._compiled=!0),c)if(s.functional){s._injectStyles=c;var l=s.render;s.render=function(t,e){return c.call(e),l(t,e)}}else{var f=s.beforeCreate;s.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:s}}({props:{text:{type:String,required:!0},qid:{type:String},correctLevel:{type:Number,default:1},size:{type:Number,default:200},margin:{type:Number,default:20},colorDark:{type:String,default:"#000000"},colorLight:{type:String,default:"#FFFFFF"},bgSrc:{type:String,default:void 0},background:{type:String,default:"rgba(0,0,0,0)"},backgroundDimming:{type:String,default:"rgba(0,0,0,0)"},logoSrc:{type:String,default:void 0},logoBackgroundColor:{type:String,default:"rgba(255,255,255,1)"},gifBgSrc:{type:String,default:void 0},logoScale:{type:Number,default:.2},logoMargin:{type:Number,default:0},logoCornerRadius:{type:Number,default:8},whiteMargin:{type:[Boolean,String],default:!0},dotScale:{type:Number,default:1},autoColor:{type:[Boolean,String],default:!0},binarize:{type:[Boolean,String],default:!1},binarizeThreshold:{type:Number,default:128},callback:{type:Function,default:function(){}},bindElement:{type:Boolean,default:!0},backgroundColor:{type:String,default:"#FFFFFF"},components:{default:function(){return{data:{scale:1},timing:{scale:1,protectors:!1},alignment:{scale:1,protectors:!1},cornerAlignment:{scale:1,protectors:!0}}}}},name:"vue-qr",data:function(){return{imgUrl:""}},watch:{$props:{deep:!0,handler:function(){this.main()}}},mounted:function(){this.main()},methods:{main:function(){var t=this;return o()(a.a.mark((function e(){var n,r,o,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.gifBgSrc){e.next=7;break}return e.next=3,c(t.gifBgSrc);case 3:return n=e.sent,r=t.logoSrc,t.render(void 0,r,n),e.abrupt("return");case 7:o=t.bgSrc,i=t.logoSrc,t.render(o,i);case 10:case"end":return e.stop()}}),e)})))()},render:function(t,e,n){var r=this;return o()(a.a.mark((function o(){var i;return a.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:i=r,new s.a({gifBackground:n,text:i.text,size:i.size,margin:i.margin,colorDark:i.colorDark,colorLight:i.colorLight,backgroundColor:i.backgroundColor,backgroundImage:t,backgroundDimming:i.backgroundDimming,logoImage:e,logoScale:i.logoScale,logoBackgroundColor:i.logoBackgroundColor,correctLevel:i.correctLevel,logoMargin:i.logoMargin,logoCornerRadius:i.logoCornerRadius,whiteMargin:u(i.whiteMargin),dotScale:i.dotScale,autoColor:u(i.autoColor),binarize:u(i.binarize),binarizeThreshold:i.binarizeThreshold,components:i.components}).draw().then((function(t){r.imgUrl=t,i.callback&&i.callback(t,i.qid)}));case 2:case"end":return o.stop()}}),o)})))()}}},(function(){var t=this.$createElement,e=this._self._c||t;return this.bindElement?e("img",{staticStyle:{display:"inline-block"},attrs:{src:this.imgUrl}}):this._e()})).exports;l.install=function(t){return t.component(l.name,l)};var f=l,d=[f];"undefined"!=typeof window&&window.Vue&&function(t){d.map((function(e){t.component(e.name,e)}))}(window.Vue),e.default=f}])},"65f0":function(t,e,n){var r=n("0b42");t.exports=function(t,e){return new(r(t))(0===e?0:e)}},"68ee":function(t,e,n){var r=n("e330"),o=n("d039"),i=n("1626"),a=n("f5df"),u=n("d066"),c=n("8925"),s=function(){},l=[],f=u("Reflect","construct"),d=/^\s*(?:class|function)\b/,m=r(d.exec),p=!d.exec(s),h=function(t){if(!i(t))return!1;try{return f(s,l,t),!0}catch(t){return!1}},g=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!m(d,c(t))}catch(t){return!0}};g.sham=!0,t.exports=!f||o((function(){var t;return h(h.call)||!h(Object)||!h((function(){t=!0}))||t}))?g:h},6964:function(t,e,n){var r=n("cb2d");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},"69f3":function(t,e,n){var r,o,i,a=n("7f9a"),u=n("da84"),c=n("e330"),s=n("861d"),l=n("9112"),f=n("1a2d"),d=n("c6cd"),m=n("f772"),p=n("d012"),h=u.TypeError,g=u.WeakMap;if(a||d.state){var v=d.state||(d.state=new g),b=c(v.get),y=c(v.has),_=c(v.set);r=function(t,e){if(y(v,t))throw new h("Object already initialized");return e.facade=t,_(v,t,e),e},o=function(t){return b(v,t)||{}},i=function(t){return y(v,t)}}else{var w=m("state");p[w]=!0,r=function(t,e){if(f(t,w))throw new h("Object already initialized");return e.facade=t,l(t,w,e),e},o=function(t){return f(t,w)?t[w]:{}},i=function(t){return f(t,w)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!s(e)||(n=o(e)).type!==t)throw h("Incompatible receiver, "+t+" required");return n}}}},"6ba6":function(t,e,n){"use strict";function r(){return{list:[],config:{labelWidth:100,labelPosition:"right",size:"small",customClass:"",ui:"element",layout:"horizontal",labelCol:3,width:"100%",hideLabel:!1,hideErrorMessage:!1,theme:"default",themeTitle:"",themeSubTitle:"",themeTitleAlign:"left",submitHiddenArea:!1}}}n.d(e,"a",(function(){return r}))},"6d61":function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("e330"),a=n("94ca"),u=n("cb2d"),c=n("f183"),s=n("2266"),l=n("19aa"),f=n("1626"),d=n("861d"),m=n("d039"),p=n("1c7e"),h=n("d44e"),g=n("7156");t.exports=function(t,e,n){var v=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),y=v?"set":"add",_=o[t],w=_&&_.prototype,x=_,O={},S=function(t){var e=i(w[t]);u(w,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return b&&!d(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(a(t,!f(_)||!(b||w.forEach&&!m((function(){(new _).entries().next()})))))x=n.getConstructor(e,t,v,y),c.enable();else if(a(t,!0)){var C=new x,k=C[y](b?{}:-0,1)!=C,E=m((function(){C.has(1)})),M=p((function(t){new _(t)})),T=!b&&m((function(){for(var t=new _,e=5;e--;)t[y](e,e);return!t.has(-0)}));M||((x=e((function(t,e){l(t,w);var n=g(new _,t,x);return null!=e&&s(e,n[y],{that:n,AS_ENTRIES:v}),n}))).prototype=w,w.constructor=x),(E||T)&&(S("delete"),S("has"),v&&S("get")),(T||k)&&S(y),b&&w.clear&&delete w.clear}return O[t]=x,r({global:!0,constructor:!0,forced:x!=_},O),h(x,t),b||n.setStrong(x,t,v),x}},"6e53":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mod10=function(t){for(var e=0,n=0;n<t.length;n++){var r=parseInt(t[n]);(n+t.length)%2==0?e+=r:e+=2*r%10+Math.floor(2*r/10)}return(10-e%10)%10},e.mod11=function(t){for(var e=0,n=[2,3,4,5,6,7],r=0;r<t.length;r++){var o=parseInt(t[t.length-1-r]);e+=n[r%n.length]*o}return(11-e%11)%11}},"6f24":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(n("4b23")),o=i(n("bb5d"));function i(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=function(t){function e(t,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(t))var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,o.default)(t),n));else r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return a(r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(r.default);e.default=u},"6f53":function(t,e,n){var r=n("83ab"),o=n("e330"),i=n("df75"),a=n("fc6a"),u=o(n("d1e7").f),c=o([].push),s=function(t){return function(e){for(var n,o=a(e),s=i(o),l=s.length,f=0,d=[];l>f;)n=s[f++],r&&!u(o,n)||c(d,t?[n,o[n]]:o[n]);return d}};t.exports={entries:s(!0),values:s(!1)}},"70b0":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("4b23"),a=(r=i)&&r.__esModule?r:{default:r},u=n("f08e");var c=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u.B_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return new RegExp("^"+u.B_CHARS+"+$").test(this.data)}}]),e}(a.default);e.default=c},7149:function(t,e,n){"use strict";var r=n("23e7"),o=n("d066"),i=n("c430"),a=n("d256"),u=n("4738").CONSTRUCTOR,c=n("cdf9"),s=o("Promise"),l=i&&!u;r({target:"Promise",stat:!0,forced:i||u},{resolve:function(t){return c(l&&this===s?a:this,t)}})},7156:function(t,e,n){var r=n("1626"),o=n("861d"),i=n("d2bb");t.exports=function(t,e,n){var a,u;return i&&r(a=e.constructor)&&a!==n&&o(u=a.prototype)&&u!==n.prototype&&i(t,u),t}},7193:function(t,e,n){n("ae68")},"71e3":function(t,e,n){"use strict";n("4345")},"721a":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("fd7c"),a=(r=i)&&r.__esModule?r:{default:r},u=n("ab5b");var c=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.encodings=n,this.options=r}return o(t,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t<this.encodings.length;t++){var e=(0,a.default)(this.options,this.encodings[t].options);this.drawCanvasBarcode(e,this.encodings[t]),this.drawCanvasText(e,this.encodings[t]),this.moveCanvasDrawing(this.encodings[t])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var t=this.canvas.getContext("2d");t.save(),(0,u.calculateEncodingAttributes)(this.encodings,this.options,t);var e=(0,u.getTotalWidthOfEncodings)(this.encodings),n=(0,u.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=e+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,t.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(t.fillStyle=this.options.background,t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(t,e){var n,r=this.canvas.getContext("2d"),o=e.data;n="top"==t.textPosition?t.marginTop+t.fontSize+t.textMargin:t.marginTop,r.fillStyle=t.lineColor;for(var i=0;i<o.length;i++){var a=i*t.width+e.barcodePadding;"1"===o[i]?r.fillRect(a,n,t.width,t.height):o[i]&&r.fillRect(a,n,t.width,t.height*o[i])}}},{key:"drawCanvasText",value:function(t,e){var n,r,o=this.canvas.getContext("2d"),i=t.fontOptions+" "+t.fontSize+"px "+t.font;t.displayValue&&(r="top"==t.textPosition?t.marginTop+t.fontSize-t.textMargin:t.height+t.textMargin+t.marginTop+t.fontSize,o.font=i,"left"==t.textAlign||e.barcodePadding>0?(n=0,o.textAlign="left"):"right"==t.textAlign?(n=e.width-1,o.textAlign="right"):(n=e.width/2,o.textAlign="center"),o.fillText(e.text,n,r))}},{key:"moveCanvasDrawing",value:function(t){this.canvas.getContext("2d").translate(t.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),t}();e.default=c},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"746f":function(t,e,n){var r=n("428f"),o=n("1a2d"),i=n("e538"),a=n("9bf2").f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},"752b":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n("721a")),o=a(n("be5e")),i=a(n("4ced"));function a(t){return t&&t.__esModule?t:{default:t}}e.default={CanvasRenderer:r.default,SVGRenderer:o.default,ObjectRenderer:i.default}},7694:function(t,e,n){"use strict";n.d(e,"i",(function(){return h})),n.d(e,"d",(function(){return g})),n.d(e,"e",(function(){return v})),n.d(e,"j",(function(){return b})),n.d(e,"h",(function(){return y})),n.d(e,"k",(function(){return _})),n.d(e,"g",(function(){return w})),n.d(e,"c",(function(){return x})),n.d(e,"f",(function(){return O})),n.d(e,"l",(function(){return S})),n.d(e,"b",(function(){return C})),n.d(e,"m",(function(){return k})),n.d(e,"a",(function(){return E}));n("d9e2");var r=null,o=null,i=null,a=null,u=null,c=null,s=null,l=null,f=null,d=null,m=null,p=null,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r=t.getDictItemsByParentId,o=t.getDictListByPage,i=t.ossServiceInfo,t.fileDownload,a=t.getUserList,u=t.searchUser,c=t.getOrgTree,t.getFormInfoListByPage,s=t.getColumnList,l=t.getFormDataListByPage,t.getThirdApiListByPage,f=t.triggerThirdApi,d=t.exportFormModel2Excel,m=t.uploadExcel,p=t.excelData2Table},g=function(t){return r?r(t):new Error("adapter must use after initialization!")},v=function(t){return o?o(t):new Error("adapter must use after initialization!")},b=function(t){return i?i(t):new Error("adapter must use after initialization!")},y=function(t){return a?a(t):new Error("adapter must use after initialization!")},_=function(t){return u?u(t):new Error("adapter must use after initialization!")},w=function(t){return c?c(t):new Error("adapter must use after initialization!")},x=function(t){return s?s(t):new Error("adapter must use after initialization!")},O=function(t){return l?l(t):new Error("adapter must use after initialization!")},S=function(t){return f?f(t):new Error("adapter must use after initialization!")},C=function(t){return d?d(t):new Error("adapter must use after initialization!")},k=function(t){return m?m(t):new Error("adapter must use after initialization!")},E=function(t){return p?p(t):new Error("adapter must use after initialization!")}},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"785a":function(t,e,n){var r=n("cc12")("span").classList,o=r&&r.constructor&&r.constructor.prototype;t.exports=o===Object.prototype?void 0:o},7993:function(t,e,n){"use strict";n("3ca7")},"79f1":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}},"7a77":function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},"7aac":function(t,e,n){"use strict";var r=n("c532");t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,o,i,a){var u=[];u.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),!0===a&&u.push("secure"),document.cookie=u.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},"7b0b":function(t,e,n){var r=n("da84"),o=n("1d80"),i=r.Object;t.exports=function(t){return i(o(t))}},"7c4f":function(t,e){!function(){"use strict";var t,e,n,r,o,i=function(t){var e=t;return{get:function(){return e},set:function(t){e=t}}},a=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=(t="array",function(e){return r=typeof(n=e),(null===n?"null":"object"===r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;var n,r}),c=function(t){return!function(t){return null==t}(t)},s=function(t){return function(e){return typeof e===t}}("function"),l=function(){},f=function(t){return function(){return t}},d=function(t){return t},m=f(!1),p=f(!0),h=function(){return g},g={fold:function(t,e){return t()},isSome:m,isNone:p,getOr:n=d,getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:f(null),getOrUndefined:f(void 0),or:n,orThunk:e,map:h,each:l,bind:h,exists:m,forall:p,filter:function(){return h()},toArray:function(){return[]},toString:f("none()")},v=function(t){var e=f(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:p,isNone:m,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return v(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:g},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},b={some:v,none:h,from:function(t){return null==t?g:v(t)}},y=Array.prototype.slice,_=Array.prototype.push,w=function(t,e){for(var n=0,r=t.length;n<r;n++){if(e(t[n],n))return!0}return!1},x=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},O=function(t,e){for(var n=0,r=t.length;n<r;n++){e(t[n],n)}},S=function(t,e){return function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!u(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);_.apply(e,t[n])}return e}(x(t,e))},C=s(Array.from)?Array.from:function(t){return y.call(t)},k=function(){return(k=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},E=function(){var t=function(t){var e=i(b.none()),n=function(){return e.get().each(t)};return{clear:function(){n(),e.set(b.none())},isSet:function(){return e.get().isSome()},get:function(){return e.get()},set:function(t){n(),e.set(b.some(t))}}}(l);return k(k({},t),{on:function(e){return t.get().each(e)}})},M=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},T=tinymce.util.Tools.resolve("tinymce.Env"),D=tinymce.util.Tools.resolve("tinymce.util.Delay"),A=tinymce.util.Tools.resolve("tinymce.util.Promise"),P=tinymce.util.Tools.resolve("tinymce.util.VK"),R=function(t,e){return t.fire("PastePlainTextToggle",{state:e})},I=tinymce.util.Tools.resolve("tinymce.util.Tools"),z=function(t){return t.getParam("paste_data_images",!1)},L=function(t){return t.getParam("paste_merge_formats",!0)},j=function(t){return t.getParam("paste_retain_style_properties")},B=function(t){return t.getParam("validate")},F=function(t){return t.getParam("allow_html_data_urls",!1,"boolean")},N=function(t){return t.getParam("paste_data_images",!1,"boolean")},H=function(t){return I.explode(t.getParam("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"))},V=function(t){return-1!==t.indexOf("\x3c!-- x-tinymce/html --\x3e")},U=f("x-tinymce/html"),W=Object.hasOwnProperty,$=function(t,e){return W.call(t,e)},G=tinymce.util.Tools.resolve("tinymce.html.Entities"),K=function(t,e,n){var r=t.split(/\n\n/),o=function(t,e){var n=[],r="<"+t;if("object"==typeof e){for(var o in e)$(e,o)&&n.push(o+'="'+G.encodeAllRaw(e[o])+'"');n.length&&(r+=" "+n.join(" "))}return r+">"}(e,n),i="</"+e+">",a=I.map(r,(function(t){return t.split(/\n/).join("<br />")}));return 1===a.length?a[0]:I.map(a,(function(t){return o+t+i})).join("")},q=tinymce.util.Tools.resolve("tinymce.html.DomParser"),X=tinymce.util.Tools.resolve("tinymce.html.Serializer"),Y=tinymce.util.Tools.resolve("tinymce.html.Node"),J=tinymce.util.Tools.resolve("tinymce.html.Schema"),Q=function(t,e){return I.each(e,(function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])})),t},Z=function(t){return t=Q(t,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(t,e,n){return e||n?" ":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},tt=function(t){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument/i.test(t)||/class="OutlineElement/.test(t)||/id="?docs\-internal\-guid\-/.test(t)},et=function(t){var e=!1;return t=t.replace(/^[\u00a0 ]+/,""),I.each([/^[IVXLMCD]+\.[ \u00a0]/,/^[ivxlmcd]+\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],(function(n){if(n.test(t))return e=!0,!1})),e},nt=function(t,e,n,r){var o={},i=t.dom.parseStyle(r);I.each(i,(function(i,a){switch(a){case"mso-list":var u=/\w+ \w+([0-9]+)/i.exec(r);u&&(n._listLevel=parseInt(u[1],10)),/Ignore/i.test(i)&&n.firstChild&&(n._listIgnore=!0,n.firstChild._listIgnore=!0);break;case"horiz-align":a="text-align";break;case"vert-align":a="vertical-align";break;case"font-color":case"mso-foreground":a="color";break;case"mso-background":case"mso-highlight":a="background";break;case"font-weight":case"font-style":return void("normal"!==i&&(o[a]=i));case"mso-element":if(/^(comment|comment-list)$/i.test(i))return void n.remove()}0!==a.indexOf("mso-comment")?0!==a.indexOf("mso-")&&("all"===j(t)||e&&e[a])&&(o[a]=i):n.remove()})),/(bold)/i.test(o["font-weight"])&&(delete o["font-weight"],n.wrap(new Y("b",1))),/(italic)/i.test(o["font-style"])&&(delete o["font-style"],n.wrap(new Y("i",1)));var a=t.dom.serializeStyle(o,n.name);return a||null},rt=function(t,e){var n,r=j(t);r&&(n=I.makeMap(r.split(/[, ]/))),e=Q(e,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi," "],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(t,e){return e.length>0?e.replace(/./," ").slice(Math.floor(e.length/2)).split("").join(" "):""}]]);var o=function(t){return t.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")}(t),i=J({valid_elements:o,valid_children:"-li[p]"});I.each(i.elements,(function(t){t.attributes.class||(t.attributes.class={},t.attributesOrder.push("class")),t.attributes.style||(t.attributes.style={},t.attributesOrder.push("style"))}));var a=q({},i);a.addAttributeFilter("style",(function(e){for(var r,o=e.length;o--;)(r=e[o]).attr("style",nt(t,n,r,r.attr("style"))),"span"===r.name&&r.parent&&!r.attributes.length&&r.unwrap()})),a.addAttributeFilter("class",(function(t){for(var e,n,r=t.length;r--;)n=(e=t[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&e.remove(),e.attr("class",null)})),a.addNodeFilter("del",(function(t){for(var e=t.length;e--;)t[e].remove()})),a.addNodeFilter("a",(function(t){for(var e,n,r,o=t.length;o--;)if(n=(e=t[o]).attr("href"),r=e.attr("name"),n&&-1!==n.indexOf("#_msocom_"))e.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1])&&(n="#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){e.unwrap();continue}e.attr({href:n,name:r})}else e.unwrap()}));var u=a.parse(e);return function(t){return t.getParam("paste_convert_word_fake_lists",!0)}(t)&&function(t){for(var e,n,r=1,o=function(t){var e="";if(3===t.type)return t.value;if(t=t.firstChild)do{e+=o(t)}while(t=t.next);return e},i=function(t,e){if(3===t.type&&e.test(t.value))return t.value=t.value.replace(e,""),!1;if(t=t.firstChild)do{if(!i(t,e))return!1}while(t=t.next);return!0},a=function(t){if(t._listIgnore)t.remove();else if(t=t.firstChild)do{a(t)}while(t=t.next)},u=function(t,o,u){var c=t._listLevel||r;c!==r&&(c<r?e&&(e=e.parent.parent):(n=e,e=null)),e&&e.name===o?e.append(t):(n=n||e,e=new Y(o,1),u>1&&e.attr("start",""+u),t.wrap(e)),t.name="li",c>r&&n&&n.lastChild.append(e),r=c,a(t),i(t,/^\u00a0+/),i(t,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),i(t,/^\u00a0+/)},c=[],s=t.firstChild;null!=s;)if(c.push(s),null!==(s=s.walk()))for(;void 0!==s&&s.parent!==t;)s=s.walk();for(var l=0;l<c.length;l++)if("p"===(t=c[l]).name&&t.firstChild){var f=o(t);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(f)){u(t,"ul");continue}if(et(f)){var d=/([0-9]+)\./.exec(f),m=1;d&&(m=parseInt(d[1],10)),u(t,"ol",m);continue}if(t._listLevel){u(t,"ul",1);continue}e=null}else n=e,e=null}(u),e=X({validate:B(t)},i).serialize(u)},ot=function(t,e){return{content:t,cancelled:e}},it=function(t,e,n,r){var o=function(t,e,n,r){return t.fire("PastePreProcess",{content:e,internal:n,wordContent:r})}(t,e,n,r),i=function(t,e){var n=q({},t.schema);n.addNodeFilter("meta",(function(t){I.each(t,(function(t){t.remove()}))}));var r=n.parse(e,{forced_root_block:!1,isRootContent:!0});return X({validate:B(t)},t.schema).serialize(r)}(t,o.content);return t.hasEventListeners("PastePostProcess")&&!o.isDefaultPrevented()?function(t,e,n,r){var o=t.dom.create("div",{style:"display:none"},e),i=function(t,e,n,r){return t.fire("PastePostProcess",{node:e,internal:n,wordContent:r})}(t,o,n,r);return ot(i.node.innerHTML,i.isDefaultPrevented())}(t,i,n,r):ot(i,o.isDefaultPrevented())},at=function(t,e,n){var r=tt(e),o=r?function(t,e){return function(t){return t.getParam("paste_enable_default_filters",!0)}(t)?rt(t,e):e}(t,e):e;return it(t,o,n,r)},ut=function(t,e){return t.insertContent(e,{merge:L(t),paste:!0}),!0},ct=function(t){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(t)},st=function(t,e){return ct(e)&&w(H(t),(function(t){return n=e.toLowerCase(),r="."+t.toLowerCase(),M(n,r,n.length-r.length);var n,r}))},lt=function(t,e,n){return!(!1!==t.selection.isCollapsed()||!ct(e))&&function(t,e,n){return t.undoManager.extra((function(){n(t,e)}),(function(){t.execCommand("mceInsertLink",!1,e)})),!0}(t,e,n)},ft=function(t,e,n){return!!st(t,e)&&function(t,e,n){return t.undoManager.extra((function(){n(t,e)}),(function(){t.insertContent('<img src="'+e+'">')})),!0}(t,e,n)},dt=function(t,e,n){n||!1===function(t){return t.getParam("smart_paste",!0)}(t)?ut(t,e):function(t,e){I.each([lt,ft,ut],(function(n){return!0!==n(t,e,ut)}))}(t,e)},mt=function(t){return"\n"===t||"\r"===t},pt=function(t,e){var n,r,o=(n=" ",(r=function(t){return t.getParam("paste_tab_spaces",4,"number")}(t))<=0?"":new Array(r+1).join(n)),i=e.replace(/\t/g,o);return function(t,e,n){return O(t,(function(t,r){n=e(n,t,r)})),n}(i,(function(t,e){return function(t){return-1!==" \f\t\v".indexOf(t)}(e)||" "===e?t.pcIsSpace||""===t.str||t.str.length===i.length-1||function(t,e){return e<t.length&&e>=0&&mt(t[e])}(i,t.str.length+1)?{pcIsSpace:!1,str:t.str+" "}:{pcIsSpace:!0,str:t.str+" "}:{pcIsSpace:mt(e),str:t.str+e}}),{pcIsSpace:!1,str:""}).str},ht=function(t,e,n,r){var o=at(t,e,n);!1===o.cancelled&&dt(t,o.content,r)},gt=function(t,e,n){var r=n||V(e);ht(t,function(t){return t.replace("\x3c!-- x-tinymce/html --\x3e","")}(e),r,!1)},vt=function(t,e){var n=t.dom.encode(e).replace(/\r\n/g,"\n"),r=function(t,e,n){return e?K(t,!0===e?"p":e,n):function(t){return t.replace(/\r?\n/g,"<br>")}(t)}(pt(t,n),function(t){return t.getParam("forced_root_block")}(t),function(t){return t.getParam("forced_root_block_attrs")}(t));ht(t,r,!1,!0)},bt=function(t){var e={};if(t){if(t.getData){var n=t.getData("Text");n&&n.length>0&&-1===n.indexOf("data:text/mce-internal,")&&(e["text/plain"]=n)}if(t.types)for(var r=0;r<t.types.length;r++){var o=t.types[r];try{e[o]=t.getData(o)}catch(t){e[o]=""}}}return e},yt=function(t,e){return e in t&&t[e].length>0},_t=function(t){return yt(t,"text/html")||yt(t,"text/plain")},wt=(r="mceclip",o=0,function(){return r+o++}),xt=function(t,e){var n,r,o=(n=e.uri,(r=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(n))?{type:r[1],data:decodeURIComponent(r[2])}:{type:null,data:null}),i=o.data,a=o.type,u=wt(),s=e.blob,l=new Image;if(l.src=e.uri,function(t,e){var n=function(t){return t.getParam("images_dataimg_filter")}(t);return!n||n(e)}(t,l)){var f=t.editorUpload.blobCache,d=void 0,m=f.getByData(i,a);if(m)d=m;else{var p=function(t){return t.getParam("images_reuse_filename")}(t)&&c(s.name),h=p?function(t,e){var n=e.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return c(n)?t.dom.encode(n[1]):null}(t,s.name):u,g=p?s.name:void 0;d=f.create(u,s,i,h,g),f.add(d)}gt(t,'<img src="'+d.blobUri()+'">',!1)}else gt(t,'<img src="'+e.uri+'">',!1)},Ot=function(t){return A.all(x(t,(function(t){return new A((function(e){var n=function(t){return c(t.getAsFile)}(t)?t.getAsFile():t,r=new window.FileReader;r.onload=function(){e({blob:n,uri:r.result})},r.readAsDataURL(n)}))})))},St=function(t){var e=H(t);return function(t){return function(t,e){return M(t,e,0)}(t.type,"image/")&&w(e,(function(e){return n=e.toLowerCase(),r={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"},(I.hasOwn(r,n)?"image/"+r[n]:"image/"+n)===t.type;var n,r}))}},Ct=function(t,e,n){var r="paste"===e.type?e.clipboardData:e.dataTransfer;if(N(t)&&r){var o=function(t,e){var n=e.items?S(C(e.items),(function(t){return"file"===t.kind?[t.getAsFile()]:[]})):[],r=e.files?C(e.files):[];return function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n}(n.length>0?n:r,St(t))}(t,r);if(o.length>0)return e.preventDefault(),Ot(o).then((function(e){n&&t.selection.setRng(n),O(e,(function(e){xt(t,e)}))})),!0}return!1},kt=function(t){return P.metaKeyPressed(t)&&86===t.keyCode||t.shiftKey&&45===t.keyCode},Et=function(t,e,n){var r,o=E(),i=E();t.on("keyup",i.clear),t.on("keydown",(function(n){var a=function(t){kt(t)&&!t.isDefaultPrevented()&&e.remove()};if(kt(n)&&!n.isDefaultPrevented()){if((r=n.shiftKey&&86===n.keyCode)&&T.webkit&&-1!==navigator.userAgent.indexOf("Version/"))return;if(n.stopImmediatePropagation(),o.set(n),i.set(!0),T.ie&&r)return n.preventDefault(),void function(t,e){t.fire("paste",{ieFake:e})}(t,!0);e.remove(),e.create(),t.once("keyup",a),t.once("paste",(function(){t.off("keyup",a)}))}}));var a=function(t,n,r,o,i){var a;yt(n,"text/html")?a=n["text/html"]:(a=e.getHtml(),i=i||V(a),e.isDefaultContent(a)&&(o=!0)),a=Z(a),e.remove();var u=!1===i&&!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(a),c=ct(a);(!a.length||u&&!c)&&(o=!0),(o||c)&&(a=yt(n,"text/plain")&&u?n["text/plain"]:function(t){var e=J(),n=q({},e),r="",o=e.getShortEndedElements(),i=I.makeMap("script noscript style textarea video audio iframe object"," "),a=e.getBlockElements(),u=function(t){var e=t.name,n=t;if("br"!==e){if("wbr"!==e)if(o[e]&&(r+=" "),i[e])r+=" ";else{if(3===t.type&&(r+=t.value),!t.shortEnded&&(t=t.firstChild))do{u(t)}while(t=t.next);a[e]&&n.next&&(r+="\n","p"===e&&(r+="\n"))}}else r+="\n"};return t=Q(t,[/<!\[[^\]]+\]>/g]),u(n.parse(t)),r}(a)),e.isDefaultContent(a)?r||t.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):o?vt(t,a):gt(t,a,i)};t.on("paste",(function(u){var c=o.isSet()||i.isSet();c&&o.clear();var s=function(t,e){return bt(e.clipboardData||t.getDoc().dataTransfer)}(t,u),l="text"===n.get()||r,f=yt(s,U());r=!1,u.isDefaultPrevented()||function(t){var e=t.clipboardData;return-1!==navigator.userAgent.indexOf("Android")&&e&&e.items&&0===e.items.length}(u)?e.remove():_t(s)||!Ct(t,u,e.getLastRng()||t.selection.getRng())?(c||u.preventDefault(),!T.ie||c&&!u.ieFake||yt(s,"text/html")||(e.create(),t.dom.bind(e.getEl(),"paste",(function(t){t.stopPropagation()})),t.getDoc().execCommand("Paste",!1,null),s["text/html"]=e.getHtml()),yt(s,"text/html")?(u.preventDefault(),f||(f=V(s["text/html"])),a(t,s,c,l,f)):D.setEditorTimeout(t,(function(){a(t,s,c,l,f)}),0)):e.remove()}))},Mt=function(t){return T.ie&&t.inline?document.body:t.getBody()},Tt=function(t,e,n){(function(t){return Mt(t)!==t.getBody()})(t)&&t.dom.bind(e,"paste keyup",(function(e){Pt(t,n)||t.fire("paste")}))},Dt=function(t){return t.dom.get("mcepastebin")},At=function(t,e){return e===t},Pt=function(t,e){var n,r=Dt(t);return(n=r)&&"mcepastebin"===n.id&&At(e,r.innerHTML)},Rt=function(t){var e=i(null);return{create:function(){return function(t,e,n){var r=t.dom,o=t.getBody();e.set(t.selection.getRng());var i=t.dom.add(Mt(t),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n);(T.ie||T.gecko)&&r.setStyle(i,"left","rtl"===r.getStyle(o,"direction",!0)?65535:-65535),r.bind(i,"beforedeactivate focusin focusout",(function(t){t.stopPropagation()})),Tt(t,i,n),i.focus(),t.selection.select(i,!0)}(t,e,"%MCEPASTEBIN%")},remove:function(){return function(t,e){if(Dt(t)){for(var n=void 0,r=e.get();n=t.dom.get("mcepastebin");)t.dom.remove(n),t.dom.unbind(n);r&&t.selection.setRng(r)}e.set(null)}(t,e)},getEl:function(){return Dt(t)},getHtml:function(){return function(t){var e=function(e,n){e.appendChild(n),t.dom.remove(n,!0)},n=I.grep(Mt(t).childNodes,(function(t){return"mcepastebin"===t.id})),r=n.shift();I.each(n,(function(t){e(r,t)}));for(var o=t.dom.select("div[id=mcepastebin]",r),i=o.length-1;i>=0;i--){var a=t.dom.create("div");r.insertBefore(a,o[i]),e(a,o[i])}return r?r.innerHTML:""}(t)},getLastRng:e.get,isDefault:function(){return Pt(t,"%MCEPASTEBIN%")},isDefaultContent:function(t){return At("%MCEPASTEBIN%",t)}}},It=function(t,e){var n=Rt(t);return t.on("PreInit",(function(){return function(t,e,n){var r;Et(t,e,n),t.parser.addNodeFilter("img",(function(e,n,o){var i=function(t){t.attr("data-mce-object")||r===T.transparentSrc||t.remove()},a=function(t){return 0===t.indexOf("webkit-fake-url")},u=function(t){return 0===t.indexOf("data:")};if(!N(t)&&function(t){return t.data&&!0===t.data.paste}(o))for(var c=e.length;c--;)(r=e[c].attr("src"))&&(a(r)||!F(t)&&u(r))&&i(e[c])}))}(t,n,e)})),{pasteFormat:e,pasteHtml:function(e,n){return gt(t,e,n)},pasteText:function(e){return vt(t,e)},pasteImageData:function(e,n){return Ct(t,e,n)},getDataTransferItems:bt,hasHtmlOrText:_t,hasContentType:yt}},zt=function(t,e){t.addCommand("mceTogglePlainTextPaste",(function(){!function(t,e){"text"===e.pasteFormat.get()?(e.pasteFormat.set("html"),R(t,!1)):(e.pasteFormat.set("text"),R(t,!0)),t.focus()}(t,e)})),t.addCommand("mceInsertClipboardContent",(function(t,n){n.content&&e.pasteHtml(n.content,n.internal),n.text&&e.pasteText(n.text)}))},Lt=function(t,e,n){if(!function(t){return!1===T.iOS&&"function"==typeof(null==t?void 0:t.setData)}(t))return!1;try{return t.clearData(),t.setData("text/html",e),t.setData("text/plain",n),t.setData(U(),e),!0}catch(t){return!1}},jt=function(t,e,n,r){Lt(t.clipboardData,e.html,e.text)?(t.preventDefault(),r()):n(e.html,r)},Bt=function(t){return function(e,n){var r=function(t){return"\x3c!-- x-tinymce/html --\x3e"+t}(e),o=t.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),i=t.dom.create("div",{contenteditable:"true"},r);t.dom.setStyles(o,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),o.appendChild(i),t.dom.add(t.getBody(),o);var a=t.selection.getRng();i.focus();var u=t.dom.createRng();u.selectNodeContents(i),t.selection.setRng(u),D.setTimeout((function(){t.selection.setRng(a),o.parentNode.removeChild(o),n()}),0)}},Ft=function(t){return{html:t.selection.getContent({contextual:!0}),text:t.selection.getContent({format:"text"})}},Nt=function(t){return!t.selection.isCollapsed()||function(t){return!!t.dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody())}(t)},Ht=function(t){t.on("cut",function(t){return function(e){Nt(t)&&jt(e,Ft(t),Bt(t),(function(){if(T.browser.isChrome()||T.browser.isFirefox()){var e=t.selection.getRng();D.setEditorTimeout(t,(function(){t.selection.setRng(e),t.execCommand("Delete")}),0)}else t.execCommand("Delete")}))}}(t)),t.on("copy",function(t){return function(e){Nt(t)&&jt(e,Ft(t),Bt(t),l)}}(t))},Vt=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Ut=function(t,e){return Vt.getCaretRangeFromPoint(e.clientX,e.clientY,t.getDoc())},Wt=function(t,e){t.focus(),t.selection.setRng(e)},$t=function(t,e){t.on("PastePreProcess",(function(n){n.content=e(t,n.content,n.internal,n.wordContent)}))},Gt=function(t,e){if(!tt(e))return e;var n=[];I.each(t.schema.getBlockElements(),(function(t,e){n.push(e)}));var r=new RegExp("(?:<br> [\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br> [\\s\\r\\n]+|<br>)*","g");return e=Q(e,[[r,"$1"]]),e=Q(e,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])},Kt=function(t,e,n,r){if(r||n)return e;var o,i=function(t){return t.getParam("paste_webkit_styles")}(t);if(!1===function(t){return t.getParam("paste_remove_styles_if_webkit",!0)}(t)||"all"===i)return e;if(i&&(o=i.split(/[, ]/)),o){var a=t.dom,u=t.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,(function(t,e,n,r){var i=a.parseStyle(a.decode(n)),c={};if("none"===o)return e+r;for(var s=0;s<o.length;s++){var l=i[o[s]],f=a.getStyle(u,o[s],!0);/color/.test(o[s])&&(l=a.toHex(l),f=a.toHex(f)),f!==l&&(c[o[s]]=l)}var d=a.serializeStyle(c,"span");return d?e+' style="'+d+'"'+r:e+r}))}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,(function(t,e,n,r){return e+' style="'+n+'"'+r}))},qt=function(t,e){t.$("a",e).find("font,u").each((function(e,n){t.dom.remove(n,!0)}))},Xt=function(t,e){return function(n){n.setActive("text"===e.pasteFormat.get());var r=function(t){return n.setActive(t.state)};return t.on("PastePlainTextToggle",r),function(){return t.off("PastePlainTextToggle",r)}}};a.add("paste",(function(t){if(!1===function(t){return!!t.hasPlugin("powerpaste",!0)&&(void 0!==window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),!0)}(t)){var e=i(!1),n=i(function(t){return t.getParam("paste_as_text",!1)}(t)?"text":"html"),r=It(t,n);return function(t){T.webkit&&$t(t,Kt),T.ie&&($t(t,Gt),function(t,e){t.on("PastePostProcess",(function(n){e(t,n.node)}))}(t,qt))}(t),function(t,e){var n=function(){return t.execCommand("mceTogglePlainTextPaste")};t.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:n,onSetup:Xt(t,e)}),t.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:n,onSetup:Xt(t,e)})}(t,r),zt(t,r),function(t){var e=t.plugins.paste,n=function(t){return t.getParam("paste_preprocess")}(t);n&&t.on("PastePreProcess",(function(t){n.call(e,e,t)}));var r=function(t){return t.getParam("paste_postprocess")}(t);r&&t.on("PastePostProcess",(function(t){r.call(e,e,t)}))}(t),Ht(t),function(t,e,n){(function(t){return t.getParam("paste_block_drop",!1)})(t)&&t.on("dragend dragover draggesture dragdrop drop drag",(function(t){t.preventDefault(),t.stopPropagation()})),z(t)||t.on("drop",(function(t){var e=t.dataTransfer;e&&e.files&&e.files.length>0&&t.preventDefault()})),t.on("drop",(function(r){var o=Ut(t,r);if(!r.isDefaultPrevented()&&!n.get()){var i,a=e.getDataTransferItems(r.dataTransfer),u=e.hasContentType(a,U());if((e.hasHtmlOrText(a)&&(!(i=a["text/plain"])||0!==i.indexOf("file://"))||!e.pasteImageData(r,o))&&o&&function(t){return t.getParam("paste_filter_drop",!0)}(t)){var c=a["mce-internal"]||a["text/html"]||a["text/plain"];c&&(r.preventDefault(),D.setEditorTimeout(t,(function(){t.undoManager.transact((function(){a["mce-internal"]&&t.execCommand("Delete"),Wt(t,o),c=Z(c),a["text/html"]?e.pasteHtml(c,u):e.pasteText(c)}))})))}}})),t.on("dragstart",(function(t){n.set(!0)})),t.on("dragover dragend",(function(e){z(t)&&!1===n.get()&&(e.preventDefault(),Wt(t,Ut(t,e))),"dragend"===e.type&&n.set(!1)}))}(t,r,e),function(t){return{clipboard:t}}(r)}}))}()},"7c73":function(t,e,n){var r,o=n("825a"),i=n("37e8"),a=n("7839"),u=n("d012"),c=n("1be4"),s=n("cc12"),l=n("f772"),f=l("IE_PROTO"),d=function(){},m=function(t){return"<script>"+t+"<\/script>"},p=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},h=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;h="undefined"!=typeof document?document.domain&&r?p(r):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(m("document.F=Object")),t.close(),t.F):p(r);for(var n=a.length;n--;)delete h.prototype[a[n]];return h()};u[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=o(t),n=new d,d.prototype=null,n[f]=t):n=h(),void 0===e?n:i.f(n,e)}},"7cb9":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pharmacode=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("e762");var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.number=parseInt(t,10),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"encode",value:function(){for(var t=this.number,e="";!isNaN(t)&&0!=t;)t%2==0?(e="11100"+e,t=(t-2)/2):(e="100"+e,t=(t-1)/2);return{data:e=e.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default);e.pharmacode=a},"7db0":function(t,e,n){"use strict";var r=n("23e7"),o=n("b727").find,i=n("44d2"),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("find")},"7dd0":function(t,e,n){"use strict";var r=n("23e7"),o=n("c65b"),i=n("c430"),a=n("5e77"),u=n("1626"),c=n("9ed3"),s=n("e163"),l=n("d2bb"),f=n("d44e"),d=n("9112"),m=n("cb2d"),p=n("b622"),h=n("3f8c"),g=n("ae93"),v=a.PROPER,b=a.CONFIGURABLE,y=g.IteratorPrototype,_=g.BUGGY_SAFARI_ITERATORS,w=p("iterator"),x=function(){return this};t.exports=function(t,e,n,a,p,g,O){c(n,e,a);var S,C,k,E=function(t){if(t===p&&P)return P;if(!_&&t in D)return D[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},M=e+" Iterator",T=!1,D=t.prototype,A=D[w]||D["@@iterator"]||p&&D[p],P=!_&&A||E(p),R="Array"==e&&D.entries||A;if(R&&(S=s(R.call(new t)))!==Object.prototype&&S.next&&(i||s(S)===y||(l?l(S,y):u(S[w])||m(S,w,x)),f(S,M,!0,!0),i&&(h[M]=x)),v&&"values"==p&&A&&"values"!==A.name&&(!i&&b?d(D,"name","values"):(T=!0,P=function(){return o(A,this)})),p)if(C={values:E("values"),keys:g?P:E("keys"),entries:E("entries")},O)for(k in C)(_||T||!(k in D))&&m(D,k,C[k]);else r({target:e,proto:!0,forced:_||T},C);return i&&!O||D[w]===P||m(D,w,P,{name:p}),h[e]=P,C}},"7f9a":function(t,e,n){var r=n("da84"),o=n("1626"),i=n("8925"),a=r.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},"805f":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n("124f"),i=(r=o)&&r.__esModule?r:{default:r},a=n("6e53");var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,a.mod11)(t),t+=(0,a.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default);e.default=u},"825a":function(t,e,n){var r=n("da84"),o=n("861d"),i=r.String,a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not an object")}},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(t,e,n){"use strict";var r=n("a04b"),o=n("9bf2"),i=n("5c6c");t.exports=function(t,e,n){var a=r(e);a in t?o.f(t,a,i(0,n)):t[a]=n}},"84ec":function(t,e,n){n("2401")},"861d":function(t,e,n){var r=n("1626");t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},8861:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n("124f"),i=(r=o)&&r.__esModule?r:{default:r},a=n("6e53");var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,a.mod10)(t),t+=(0,a.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default);e.default=u},8863:function(t,e,n){n("9dd9")},8875:function(t,e,n){var r,o,i;"undefined"!=typeof self&&self,o=[],void 0===(i="function"==typeof(r=function(){return function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(t){var n,r,o,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(t.stack)||/@([^@]*):(\d+):(\d+)\s*$/gi.exec(t.stack),a=i&&i[1]||!1,u=i&&i[2]||!1,c=document.location.href.replace(document.location.hash,""),s=document.getElementsByTagName("script");a===c&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(u-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=n.replace(r,"$1").trim());for(var l=0;l<s.length;l++){if("interactive"===s[l].readyState)return s[l];if(s[l].src===a)return s[l];if(a===c&&s[l].innerHTML&&s[l].innerHTML.trim()===o)return s[l]}return null}}})?r.apply(e,o):r)||(t.exports=i)},8925:function(t,e,n){var r=n("e330"),o=n("1626"),i=n("c6cd"),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},"89a2":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n("c243"),u=n("bdfe"),c=(r=u)&&r.__esModule?r:{default:r};var s=function(t){return(10-t.substr(0,12).split("").map((function(t){return+t})).reduce((function(t,e,n){return n%2?t+3*e:t+e}),0)%10)%10},l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{12}$/)&&(t+=s(t));var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.lastChar=n.lastChar,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===s(this.data)}},{key:"leftText",value:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var t=this.data.substr(1,6),n=a.EAN13_STRUCTURE[this.data[0]];return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,t,n)}},{key:"rightText",value:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var t=this.data.substr(7,6);return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,t,"RRRRRR")}},{key:"encodeGuarded",value:function(){var t=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(t.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(t.push({data:"00"}),t.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),t}}]),e}(c.default);e.default=l},"8aa5":function(t,e,n){"use strict";var r=n("6547").charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"8ba4":function(t,e,n){n("23e7")({target:"Number",stat:!0},{isInteger:n("eac5")})},"8bbf":function(t,e){t.exports=require("vue")},"8df4":function(t,e,n){"use strict";var r=n("7a77");function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},"8e51":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MSI1110=e.MSI1010=e.MSI11=e.MSI10=e.MSI=void 0;var r=c(n("124f")),o=c(n("4727")),i=c(n("4461")),a=c(n("8861")),u=c(n("805f"));function c(t){return t&&t.__esModule?t:{default:t}}e.MSI=r.default,e.MSI10=o.default,e.MSI11=i.default,e.MSI1010=a.default,e.MSI1110=u.default},"8f27":function(t,e,n){"use strict";n("6126")},"8f75":function(t,e,n){},"905a":function(t,e){t.exports=require("@tinymce/tinymce-vue")},"90d8":function(t,e,n){var r=n("c65b"),o=n("1a2d"),i=n("3a9b"),a=n("ad6d"),u=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in u||o(t,"flags")||!i(u,t)?e:r(a,t)}},"90e3":function(t,e,n){var r=n("e330"),o=0,i=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},9112:function(t,e,n){var r=n("83ab"),o=n("9bf2"),i=n("5c6c");t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9224:function(t){t.exports=JSON.parse('{"a":"1.16.12"}')},9263:function(t,e,n){"use strict";var r,o,i=n("c65b"),a=n("e330"),u=n("577e"),c=n("ad6d"),s=n("9f7f"),l=n("5692"),f=n("7c73"),d=n("69f3").get,m=n("fce3"),p=n("107c"),h=l("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,v=g,b=a("".charAt),y=a("".indexOf),_=a("".replace),w=a("".slice),x=(o=/b*/g,i(g,r=/a/,"a"),i(g,o,"a"),0!==r.lastIndex||0!==o.lastIndex),O=s.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];(x||S||O||m||p)&&(v=function(t){var e,n,r,o,a,s,l,m=this,p=d(m),C=u(t),k=p.raw;if(k)return k.lastIndex=m.lastIndex,e=i(v,k,C),m.lastIndex=k.lastIndex,e;var E=p.groups,M=O&&m.sticky,T=i(c,m),D=m.source,A=0,P=C;if(M&&(T=_(T,"y",""),-1===y(T,"g")&&(T+="g"),P=w(C,m.lastIndex),m.lastIndex>0&&(!m.multiline||m.multiline&&"\n"!==b(C,m.lastIndex-1))&&(D="(?: "+D+")",P=" "+P,A++),n=new RegExp("^(?:"+D+")",T)),S&&(n=new RegExp("^"+D+"$(?!\\s)",T)),x&&(r=m.lastIndex),o=i(g,M?n:m,P),M?o?(o.input=w(o.input,A),o[0]=w(o[0],A),o.index=m.lastIndex,m.lastIndex+=o[0].length):m.lastIndex=0:x&&o&&(m.lastIndex=m.global?o.index+o[0].length:r),S&&o&&o.length>1&&i(h,o[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&E)for(o.groups=s=f(null),a=0;a<E.length;a++)s[(l=E[a])[0]]=o[l[1]];return o}),t.exports=v},"94ca":function(t,e,n){var r=n("d039"),o=n("1626"),i=/#|\.prototype\./,a=function(t,e){var n=c[u(t)];return n==l||n!=s&&(o(e)?r(e):!!e)},u=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},"94ce":function(t,e){!function(){"use strict";var t=function(t){return function(e){return r=typeof(n=e),(null===n?"null":"object"===r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;var n,r}},e=function(t){return function(e){return typeof e===t}},n=function(t){return function(e){return t===e}},r=t("string"),o=t("object"),i=t("array"),a=n(null),u=e("boolean"),c=n(void 0),s=function(t){return!function(t){return null==t}(t)},l=e("function"),f=e("number"),d=function(){},m=function(t){return function(){return t}},p=function(t){return t},h=function(t,e){return t===e};function g(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}var v,b,y=function(t){return function(e){return!t(e)}},_=m(!1),w=m(!0),x=function(){return O},O={fold:function(t,e){return t()},isSome:_,isNone:w,getOr:b=p,getOrThunk:v=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:m(null),getOrUndefined:m(void 0),or:b,orThunk:v,map:x,each:d,bind:x,exists:_,forall:w,filter:function(){return x()},toArray:function(){return[]},toString:m("none()")},S=function(t){var e=m(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:w,isNone:_,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return S(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:O},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},C={some:S,none:x,from:function(t){return null==t?O:S(t)}},k=Array.prototype.slice,E=Array.prototype.indexOf,M=Array.prototype.push,T=function(t,e){return n=t,r=e,E.call(n,r)>-1;var n,r},D=function(t,e){for(var n=0,r=t.length;n<r;n++){if(e(t[n],n))return!0}return!1},A=function(t,e){for(var n=[],r=0;r<t;r++)n.push(e(r));return n},P=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},R=function(t,e){for(var n=0,r=t.length;n<r;n++){e(t[n],n)}},I=function(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var a=t[o];(e(a,o)?n:r).push(a)}return{pass:n,fail:r}},z=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},L=function(t,e,n){return function(t,e){for(var n=t.length-1;n>=0;n--){e(t[n],n)}}(t,(function(t,r){n=e(n,t,r)})),n},j=function(t,e,n){return R(t,(function(t,r){n=e(n,t,r)})),n},B=function(t,e){return function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return C.some(i);if(n(i,r))break}return C.none()}(t,e,_)},F=function(t,e){for(var n=0,r=t.length;n<r;n++){if(e(t[n],n))return C.some(n)}return C.none()},N=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!i(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);M.apply(e,t[n])}return e},H=function(t,e){return N(P(t,e))},V=function(t,e){for(var n=0,r=t.length;n<r;++n){if(!0!==e(t[n],n))return!1}return!0},U=function(t,e){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];n[String(i)]=e(i,r)}return n},W=function(t){return[t]},$=function(t,e){return e>=0&&e<t.length?C.some(t[e]):C.none()},G=function(t){return $(t,0)},K=function(t){return $(t,t.length-1)},q=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return C.none()},X=function(){return(X=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function Y(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var J=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}},Q=function(){return Z(0,0)},Z=function(t,e){return{major:t,minor:e}},tt={nu:Z,detect:function(t,e){var n=String(e).toLowerCase();return 0===t.length?Q():function(t,e){var n=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}}(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return Z(r(1),r(2))}(t,n)},unknown:Q},et=function(t,e){var n=String(e).toLowerCase();return B(t,(function(t){return t.search(n)}))},nt=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},rt=function(t,e){return-1!==t.indexOf(e)},ot=function(t,e){return nt(t,e,0)},it=function(t,e){return nt(t,e,t.length-e.length)},at=function(t){return function(e){return e.replace(t,"")}}(/^\s+|\s+$/g),ut=function(t){return t.length>0},ct=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,st=function(t){return function(e){return rt(e,t)}},lt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return rt(t,"edge/")&&rt(t,"chrome")&&rt(t,"safari")&&rt(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ct],search:function(t){return rt(t,"chrome")&&!rt(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return rt(t,"msie")||rt(t,"trident")}},{name:"Opera",versionRegexes:[ct,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:st("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:st("firefox")},{name:"Safari",versionRegexes:[ct,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(rt(t,"safari")||rt(t,"mobile/"))&&rt(t,"applewebkit")}}],ft=[{name:"Windows",search:st("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return rt(t,"iphone")||rt(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:st("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:st("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:st("linux"),versionRegexes:[]},{name:"Solaris",search:st("sunos"),versionRegexes:[]},{name:"FreeBSD",search:st("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:st("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],dt={browsers:m(lt),oses:m(ft)},mt=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r("Edge"),isChrome:r("Chrome"),isIE:r("IE"),isOpera:r("Opera"),isFirefox:r("Firefox"),isSafari:r("Safari")}},pt={unknown:function(){return mt({current:void 0,version:tt.unknown()})},nu:mt,edge:m("Edge"),chrome:m("Chrome"),ie:m("IE"),opera:m("Opera"),firefox:m("Firefox"),safari:m("Safari")},ht=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r("Windows"),isiOS:r("iOS"),isAndroid:r("Android"),isOSX:r("OSX"),isLinux:r("Linux"),isSolaris:r("Solaris"),isFreeBSD:r("FreeBSD"),isChromeOS:r("ChromeOS")}},gt={unknown:function(){return ht({current:void 0,version:tt.unknown()})},nu:ht,windows:m("Windows"),ios:m("iOS"),android:m("Android"),linux:m("Linux"),osx:m("OSX"),solaris:m("Solaris"),freebsd:m("FreeBSD"),chromeos:m("ChromeOS")},vt=function(t,e,n){var r=dt.browsers(),o=dt.oses(),i=e.bind((function(t){return function(t,e){return q(e.brands,(function(e){var n=e.brand.toLowerCase();return B(t,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(t){return{current:t.name,version:tt.nu(parseInt(e.version,10),0)}}))}))}(r,t)})).orThunk((function(){return function(t,e){return et(t,e).map((function(t){var n=tt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))}(r,t)})).fold(pt.unknown,pt.nu),a=function(t,e){return et(t,e).map((function(t){var n=tt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))}(o,t).fold(gt.unknown,gt.nu),u=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,a=t.isiOS()||t.isAndroid(),u=a||r("(pointer:coarse)"),c=o||!i&&a&&r("(min-device-width:768px)"),s=i||a&&!c,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),f=!s&&!c&&!l;return{isiPad:m(o),isiPhone:m(i),isTablet:m(c),isPhone:m(s),isTouch:m(u),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:m(l),isDesktop:m(f)}}(a,i,t,n);return{browser:i,os:a,deviceType:u}},bt=function(t){return window.matchMedia(t).matches},yt=J((function(){return vt(navigator.userAgent,C.from(navigator.userAgentData),bt)})),_t=function(){return yt()},wt=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},xt={fromHtml:function(t,e){var n=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||n.childNodes.length>1)throw new Error("HTML must have a single root node");return wt(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return wt(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return wt(n)},fromDom:wt,fromPoint:function(t,e,n){return C.from(t.dom.elementFromPoint(e,n)).map(wt)}},Ot=function(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},St=function(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount},Ct=function(t,e){var n=void 0===e?document:e.dom;return St(n)?C.none():C.from(n.querySelector(t)).map(xt.fromDom)},kt=function(t,e){return t.dom===e.dom},Et=function(t,e){return n=t.dom,r=e.dom,function(t,e,n){return 0!=(t.compareDocumentPosition(e)&n)}(n,r,Node.DOCUMENT_POSITION_CONTAINED_BY);var n,r},Mt=function(t,e){return _t().browser.isIE()?Et(t,e):function(t,e){var n=t.dom,r=e.dom;return n!==r&&n.contains(r)}(t,e)},Tt=Ot,Dt=Object.keys,At=Object.hasOwnProperty,Pt=function(t,e){for(var n=Dt(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}},Rt=function(t,e){return It(t,(function(t,n){return{k:n,v:e(t,n)}}))},It=function(t,e){var n={};return Pt(t,(function(t,r){var o=e(t,r);n[o.k]=o.v})),n},zt=function(t,e){var n={};return function(t,e,n,r){Pt(t,(function(t,o){(e(t,o)?n:r)(t,o)}))}(t,e,function(t){return function(e,n){t[n]=e}}(n),d),n},Lt=function(t,e){var n=[];return Pt(t,(function(t,r){n.push(e(t,r))})),n},jt=function(t){return Lt(t,p)},Bt=function(t){return Dt(t).length},Ft=function(t,e){return Nt(t,e)?C.from(t[e]):C.none()},Nt=function(t,e){return At.call(t,e)},Ht=function(t,e){return Nt(t,e)&&void 0!==t[e]&&null!==t[e]},Vt=["tfoot","thead","tbody","colgroup"],Ut=function(t,e,n){return{element:t,rowspan:e,colspan:n}},Wt=function(t,e,n){return{element:t,cells:e,section:n}},$t=function(t,e,n){return{element:t,isNew:e,isLocked:n}},Gt=function(t,e,n,r){return{element:t,cells:e,section:n,isNew:r}};"undefined"!=typeof window?window:Function("return this;")();var Kt=function(t){return t.dom.nodeName.toLowerCase()},qt=function(t){return t.dom.nodeType},Xt=function(t){return function(e){return qt(e)===t}},Yt=function(t){return 8===qt(t)||"#comment"===Kt(t)},Jt=Xt(1),Qt=Xt(3),Zt=Xt(9),te=Xt(11),ee=function(t){return function(e){return Jt(e)&&Kt(e)===t}},ne=function(t){return xt.fromDom(t.dom.ownerDocument)},re=function(t){return Zt(t)?t:ne(t)},oe=function(t){return C.from(t.dom.parentNode).map(xt.fromDom)},ie=function(t,e){for(var n=l(e)?e:_,r=t.dom,o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=xt.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o},ae=function(t){return C.from(t.dom.previousSibling).map(xt.fromDom)},ue=function(t){return C.from(t.dom.nextSibling).map(xt.fromDom)},ce=function(t){return P(t.dom.childNodes,xt.fromDom)},se=function(t,e){var n=t.dom.childNodes;return C.from(n[e]).map(xt.fromDom)},le=l(Element.prototype.attachShadow)&&l(Node.prototype.getRootNode),fe=m(le),de=le?function(t){return xt.fromDom(t.dom.getRootNode())}:re,me=function(t){var e,n=de(t);return te(e=n)&&s(e.dom.host)?C.some(n):C.none()},pe=function(t){return xt.fromDom(t.dom.host)},he=function(t){return s(t.dom.shadowRoot)},ge=function(t){var e=Qt(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;var n,r,o=e.ownerDocument;return me(xt.fromDom(e)).fold((function(){return o.body.contains(e)}),(n=ge,r=pe,function(t){return n(r(t))}))},ve=function(t){var e=t.dom.body;if(null==e)throw new Error("Body is not available yet");return xt.fromDom(e)},be=function(t,e){var n=[];return R(ce(t),(function(t){e(t)&&(n=n.concat([t])),n=n.concat(be(t,e))})),n},ye=function(t,e,n){return function(t,e,n){return z(ie(t,n),e)}(t,(function(t){return Ot(t,e)}),n)},_e=function(t,e){return function(t,e){return z(ce(t),e)}(t,(function(t){return Ot(t,e)}))},we=function(t,e){return function(t,e){var n=void 0===e?document:e.dom;return St(n)?[]:P(n.querySelectorAll(t),xt.fromDom)}(e,t)};function xe(t,e,n,r,o){return t(n,r)?C.some(n):l(o)&&o(n)?C.none():e(n,r,o)}var Oe=function(t,e,n){for(var r=t.dom,o=l(n)?n:_;r.parentNode;){r=r.parentNode;var i=xt.fromDom(r);if(e(i))return C.some(i);if(o(i))break}return C.none()},Se=function(t,e,n){return Oe(t,(function(t){return Ot(t,e)}),n)},Ce=function(t,e){return function(t,e){return B(t.dom.childNodes,(function(t){return e(xt.fromDom(t))})).map(xt.fromDom)}(t,(function(t){return Ot(t,e)}))},ke=function(t,e){return Ct(e,t)},Ee=function(t,e,n){return xe((function(t,e){return Ot(t,e)}),Se,t,e,n)},Me=function(t,e,n){if(!(r(n)||u(n)||f(n)))throw new Error("Attribute value was not simple");t.setAttribute(e,n+"")},Te=function(t,e,n){Me(t.dom,e,n)},De=function(t,e){var n=t.dom;Pt(e,(function(t,e){Me(n,e,t)}))},Ae=function(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n},Pe=function(t,e){return C.from(Ae(t,e))},Re=function(t,e){t.dom.removeAttribute(e)},Ie=function(t){return j(t.dom.attributes,(function(t,e){return t[e.name]=e.value,t}),{})},ze=function(t,e,n){return void 0===n&&(n=h),t.exists((function(t){return n(t,e)}))},Le=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e},je=function(t,e,n){return t.isSome()&&e.isSome()?C.some(n(t.getOrDie(),e.getOrDie())):C.none()},Be=function(t,e){return t?C.some(e):C.none()},Fe=function(t){return void 0!==t.style&&l(t.style.getPropertyValue)},Ne=function(t,e,n){if(!r(n))throw new Error("CSS value must be a string: "+n);Fe(t)&&t.style.setProperty(e,n)},He=function(t,e,n){var r=t.dom;Ne(r,e,n)},Ve=function(t,e){var n=t.dom;Pt(e,(function(t,e){Ne(n,e,t)}))},Ue=function(t,e){var n=t.dom,r=window.getComputedStyle(n).getPropertyValue(e);return""!==r||ge(t)?r:We(n,e)},We=function(t,e){return Fe(t)?t.style.getPropertyValue(e):""},$e=function(t,e){var n=t.dom,r=We(n,e);return C.from(r).filter((function(t){return t.length>0}))},Ge=function(t,e){!function(t,e){Fe(t)&&t.style.removeProperty(e)}(t.dom,e),ze(Pe(t,"style").map(at),"")&&Re(t,"style")},Ke=function(t,e,n){return void 0===n&&(n=0),Pe(t,e).map((function(t){return parseInt(t,10)})).getOr(n)},qe=function(t,e){return Ke(t,e,1)},Xe=function(t){return ee("col")(t)?Ke(t,"span",1)>1:qe(t,"colspan")>1},Ye=function(t){return qe(t,"rowspan")>1},Je=function(t,e){return parseInt(Ue(t,e),10)},Qe=m(10),Ze=m(10),tn=function(t,e){return en(t,e,w)},en=function(t,e,n){return H(ce(t),(function(t){return Ot(t,e)?n(t)?[t]:[]:en(t,e,n)}))},nn=function(t,e){return function(t,e,n){if(void 0===n&&(n=_),n(e))return C.none();if(T(t,Kt(e)))return C.some(e);return Se(e,t.join(","),(function(t){return Ot(t,"table")||n(t)}))}(["td","th"],t,e)},rn=function(t){return tn(t,"th,td")},on=function(t){return Ot(t,"colgroup")?_e(t,"col"):H(cn(t),(function(t){return _e(t,"col")}))},an=function(t,e){return Ee(t,"table",e)},un=function(t){return tn(t,"tr")},cn=function(t){return an(t).fold(m([]),(function(t){return _e(t,"colgroup")}))},sn=function(t,e){return P(t,(function(t){if("colgroup"===Kt(t)){var n=P(on(t),(function(t){var e=Ke(t,"span",1);return Ut(t,1,e)}));return Wt(t,n,"colgroup")}n=P(rn(t),(function(t){var e=Ke(t,"rowspan",1),n=Ke(t,"colspan",1);return Ut(t,e,n)}));return Wt(t,n,e(t))}))},ln=function(t){return oe(t).map((function(t){var e=Kt(t);return function(t){return T(Vt,t)}(e)?e:"tbody"})).getOr("tbody")},fn=function(t){var e=un(t),n=Y(Y([],cn(t),!0),e,!0);return sn(n,ln)},dn=function(t,e,n){var r=t.cells,o=r.slice(0,e),i=r.slice(e),a=o.concat(n).concat(i);return hn(t,a)},mn=function(t,e,n){return dn(t,e,[n])},pn=function(t,e,n){t.cells[e]=n},hn=function(t,e){return Gt(t.element,e,t.section,t.isNew)},gn=function(t,e){return t.cells[e]},vn=function(t,e){return gn(t,e).element},bn=function(t){return t.cells.length},yn=function(t){var e=I(t,(function(t){return"colgroup"===t.section}));return{rows:e.fail,cols:e.pass}},_n=function(t,e,n){var r=P(t.cells,n);return Gt(e(t.element),r,t.section,!0)},wn="data-snooker-locked-cols",xn=function(t){return Pe(t,wn).bind((function(t){return C.from(t.match(/\d+/g))})).map((function(t){return U(t,w)}))},On=function(t){var e=j(yn(t).rows,(function(t,e){return R(e.cells,(function(e,n){e.isLocked&&(t[n]=!0)})),t}),{});return function(t,e){var n=k.call(t,0);return n.sort(e),n}(Lt(e,(function(t,e){return parseInt(e,10)})))},Sn=function(t,e){return t+","+e},Cn=function(t,e){var n=H(t.all,(function(t){return t.cells}));return z(n,e)},kn=function(t){var e={},n=[],r=G(t).map((function(t){return t.element})).bind(an).bind(xn).getOr({}),o=0,i=0,a=0,u=I(t,(function(t){return"colgroup"===t.section})),c=u.pass,s=u.fail;R(s,(function(t){var u=[];R(t.cells,(function(t){for(var n=0;void 0!==e[Sn(a,n)];)n++;for(var o=Ht(r,n.toString()),c=function(t,e,n,r,o,i){return{element:t,rowspan:e,colspan:n,row:r,column:o,isLocked:i}}(t.element,t.rowspan,t.colspan,a,n,o),s=0;s<t.colspan;s++)for(var l=0;l<t.rowspan;l++){var f=n+s,d=Sn(a+l,f);e[d]=c,i=Math.max(i,f+1)}u.push(c)})),o++,n.push(Wt(t.element,u,t.section)),a++}));var l=K(c).map((function(t){var e=function(t){var e={},n=0;return R(t.cells,(function(t){var r=t.colspan;A(r,(function(o){var i=n+o;e[i]=function(t,e,n){return{element:t,colspan:e,column:n}}(t.element,r,i)})),n+=r})),e}(t);return{colgroups:[function(t,e){return{element:t,columns:e}}(t.element,jt(e))],columns:e}})).getOrThunk((function(){return{colgroups:[],columns:{}}})),f=l.columns,d=l.colgroups;return{grid:function(t,e){return{rows:t,columns:e}}(o,i),access:e,all:n,columns:f,colgroups:d}},En={fromTable:function(t){var e=fn(t);return kn(e)},generate:kn,getAt:function(t,e,n){return C.from(t.access[Sn(e,n)])},findItem:function(t,e,n){var r=Cn(t,(function(t){return n(e,t.element)}));return r.length>0?C.some(r[0]):C.none()},filterItems:Cn,justCells:function(t){return H(t.all,(function(t){return t.cells}))},justColumns:function(t){return jt(t.columns)},hasColumns:function(t){return Dt(t.columns).length>0},getColumnAt:function(t,e){return C.from(t.columns[e])}},Mn=function(t,e){var n=e.column,r=e.column+e.colspan-1,o=e.row,i=e.row+e.rowspan-1;return n<=t.finishCol&&r>=t.startCol&&o<=t.finishRow&&i>=t.startRow},Tn=function(t,e){return e.column>=t.startCol&&e.column+e.colspan-1<=t.finishCol&&e.row>=t.startRow&&e.row+e.rowspan-1<=t.finishRow},Dn=function(t,e,n){var r=En.findItem(t,e,kt),o=En.findItem(t,n,kt);return r.bind((function(t){return o.map((function(e){return n=t,r=e,o=Math.min(n.row,r.row),i=Math.min(n.column,r.column),a=Math.max(n.row+n.rowspan-1,r.row+r.rowspan-1),u=Math.max(n.column+n.colspan-1,r.column+r.colspan-1),{startRow:o,startCol:i,finishRow:a,finishCol:u};var n,r,o,i,a,u}))}))},An=function(t,e,n){return Dn(t,e,n).bind((function(e){return function(t,e){for(var n=!0,r=g(Tn,e),o=e.startRow;o<=e.finishRow;o++)for(var i=e.startCol;i<=e.finishCol;i++)n=n&&En.getAt(t,o,i).exists(r);return n?C.some(e):C.none()}(t,e)}))},Pn=function(t,e,n){return Dn(t,e,n).map((function(e){var n=En.filterItems(t,g(Mn,e));return P(n,(function(t){return t.element}))}))},Rn=function(t,e){return En.findItem(t,e,(function(t,e){return Mt(e,t)})).map((function(t){return t.element}))},In=function(t,e,n){return an(t).bind((function(r){return function(t,e,n,r){return En.findItem(t,e,kt).bind((function(e){var o=n>0?e.row+e.rowspan-1:e.row,i=r>0?e.column+e.colspan-1:e.column;return En.getAt(t,o+n,i+r).map((function(t){return t.element}))}))}(jn(r),t,e,n)}))},zn=function(t,e,n){var r=jn(t);return Pn(r,e,n)},Ln=function(t,e,n,r,o){var i=jn(t),a=kt(t,n)?C.some(e):Rn(i,e),u=kt(t,o)?C.some(r):Rn(i,r);return a.bind((function(t){return u.bind((function(e){return Pn(i,t,e)}))}))},jn=En.fromTable,Bn=function(t,e){oe(t).each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},Fn=function(t,e){ue(t).fold((function(){oe(t).each((function(t){Hn(t,e)}))}),(function(t){Bn(t,e)}))},Nn=function(t,e){(function(t){return se(t,0)})(t).fold((function(){Hn(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))},Hn=function(t,e){t.dom.appendChild(e.dom)},Vn=function(t,e){Bn(t,e),Hn(e,t)},Un=function(t,e){R(e,(function(n,r){var o=0===r?t:e[r-1];Fn(o,n)}))},Wn=function(t,e){R(e,(function(e){Hn(t,e)}))},$n=function(t){t.dom.textContent="",R(ce(t),(function(t){Gn(t)}))},Gn=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},Kn=function(t){var e,n=ce(t);n.length>0&&(e=t,R(n,(function(t){Bn(e,t)}))),Gn(t)},qn=function(t,e){var n=function(e){return t(e)?C.from(e.dom.nodeValue):C.none()};return{get:function(r){if(!t(r))throw new Error("Can only get "+e+" value of a "+e+" node");return n(r).getOr("")},getOption:n,set:function(n,r){if(!t(n))throw new Error("Can only set raw "+e+" value of a "+e+" node");n.dom.nodeValue=r}}}(Qt,"text"),Xn=function(t){return qn.get(t)},Yn=function(t){return qn.getOption(t)},Jn=function(t,e){return qn.set(t,e)},Qn=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];function Zn(){return{up:m({selector:Se,closest:Ee,predicate:Oe,all:ie}),down:m({selector:we,predicate:be}),styles:m({get:Ue,getRaw:$e,set:He,remove:Ge}),attrs:m({get:Ae,set:Te,remove:Re,copyTo:function(t,e){var n=Ie(t);De(e,n)}}),insert:m({before:Bn,after:Fn,afterAll:Un,append:Hn,appendAll:Wn,prepend:Nn,wrap:Vn}),remove:m({unwrap:Kn,remove:Gn}),create:m({nu:xt.fromTag,clone:function(t){return xt.fromDom(t.dom.cloneNode(!1))},text:xt.fromText}),query:m({comparePosition:function(t,e){return t.dom.compareDocumentPosition(e.dom)},prevSibling:ae,nextSibling:ue}),property:m({children:ce,name:Kt,parent:oe,document:function(t){return re(t).dom},isText:Qt,isComment:Yt,isElement:Jt,isSpecial:function(t){var e=Kt(t);return T(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],e)},getLanguage:function(t){return Jt(t)?Pe(t,"lang"):C.none()},getText:Xn,setText:Jn,isBoundary:function(t){return!!Jt(t)&&("body"===Kt(t)||T(Qn,Kt(t)))},isEmptyTag:function(t){return!!Jt(t)&&T(["br","img","hr","input"],Kt(t))},isNonEditable:function(t){return Jt(t)&&"false"===Ae(t,"contenteditable")}}),eq:kt,is:Tt}}var tr,er,nr=function(t,e,n,r){var o=e(t,n);return L(r,(function(n,r){var o=e(t,r);return rr(t,n,o)}),o)},rr=function(t,e,n){return e.bind((function(e){return n.filter(g(t.eq,e))}))},or=function(t,e,n){return n.length>0?function(t,e,n,r){return r(t,e,n[0],n.slice(1))}(t,e,n,nr):C.none()},ir=function(t,e,n,r){void 0===r&&(r=_);var o=[e].concat(t.up().all(e)),i=[n].concat(t.up().all(n)),a=function(t){return F(t,r).fold((function(){return t}),(function(e){return t.slice(0,e+1)}))},u=a(o),c=a(i),s=B(u,(function(e){return D(c,function(t,e){return g(t.eq,e)}(t,e))}));return{firstpath:u,secondpath:c,shared:s}},ar=Zn(),ur=function(t,e){return or(ar,(function(e,n){return t(n)}),e)},cr=function(t){return Se(t,"table")},sr=function(t,e,n){var r=function(t){return function(e){return void 0!==n&&n(e)||kt(e,t)}};return kt(t,e)?C.some({boxes:C.some([t]),start:t,finish:e}):cr(t).bind((function(o){return cr(e).bind((function(i){if(kt(o,i))return C.some({boxes:zn(o,t,e),start:t,finish:e});if(Mt(o,i)){var a=(u=ye(e,"td,th",r(o))).length>0?u[u.length-1]:e;return C.some({boxes:Ln(o,t,o,e,i),start:t,finish:a})}if(Mt(i,o)){var u,c=(u=ye(t,"td,th",r(i))).length>0?u[u.length-1]:t;return C.some({boxes:Ln(i,t,o,e,i),start:t,finish:c})}return function(t,e,n){return ir(ar,t,e,n)}(t,e).shared.bind((function(a){return Ee(a,"table",n).bind((function(n){var a=ye(e,"td,th",r(n)),u=a.length>0?a[a.length-1]:e,c=ye(t,"td,th",r(n)),s=c.length>0?c[c.length-1]:t;return C.some({boxes:Ln(n,t,o,e,i),start:s,finish:u})}))}))}))}))},lr=function(t,e){var n=we(t,e);return n.length>0?C.some(n):C.none()},fr=function(t,e,n){return ke(t,e).bind((function(e){return ke(t,n).bind((function(t){return ur(cr,[e,t]).map((function(n){return{first:e,last:t,table:n}}))}))}))},dr=function(t,e,n,r,o){return function(t,e){return B(t,(function(t){return Ot(t,e)}))}(t,o).bind((function(t){return In(t,e,n).bind((function(t){return function(t,e){return Se(t,"table").bind((function(n){return ke(n,e).bind((function(e){return sr(e,t).bind((function(t){return t.boxes.map((function(e){return{boxes:e,start:t.start,finish:t.finish}}))}))}))}))}(t,r)}))}))},mr=function(t,e){return lr(t,e)},pr=function(t,e,n){return fr(t,e,n).bind((function(e){var n=function(e){return kt(t,e)},r=Se(e.first,"thead,tfoot,tbody,table",n),o=Se(e.last,"thead,tfoot,tbody,table",n);return r.bind((function(t){return o.bind((function(n){return kt(t,n)?function(t,e,n){var r=jn(t);return An(r,e,n)}(e.table,e.first,e.last):C.none()}))}))}))},hr=function(t){if(!i(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};return R(t,(function(r,o){var a=Dt(r);if(1!==a.length)throw new Error("one and only one name per case");var u=a[0],c=r[u];if(void 0!==n[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!i(c))throw new Error("case arguments must be an array");e.push(u),n[u]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==c.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+c.length+" ("+c+"), got "+i);var a=function(t){var r=Dt(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));if(!V(e,(function(t){return T(r,t)})))throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[u].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:a,log:function(t){}}}})),n},gr=hr([{none:[]},{multiple:["elements"]},{single:["element"]}]),vr=function(t,e,n,r){return t.fold(e,n,r)},br=gr.none,yr=gr.multiple,_r=gr.single,wr=tinymce.util.Tools.resolve("tinymce.PluginManager"),xr=function(t,e){return xt.fromDom(t.dom.cloneNode(e))},Or=function(t){return xr(t,!1)},Sr=function(t){return xr(t,!0)},Cr=function(t,e){var n=xt.fromTag(e),r=Ie(t);return De(n,r),n},kr=function(t,e){var n=function(n){var r=e(n);if(r<=0||null===r){var o=Ue(n,t);return parseFloat(o)||0}return r},r=function(t,e){return j(e,(function(e,n){var r=Ue(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)};return{set:function(e,n){if(!f(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom;Fe(r)&&(r.style[t]=n+"px")},get:n,getOuter:n,aggregate:r,max:function(t,e,n){var o=r(t,n);return e>o?e-o:0}}},Er=function(){var t=_t().browser;return t.isIE()||t.isEdge()},Mr=function(t,e){return function(t){var e=parseFloat(t);return isNaN(e)?C.none():C.some(e)}(t).getOr(e)},Tr=function(t,e,n){return Mr(Ue(t,e),n)},Dr=function(t){return Ue(t,"box-sizing")},Ar=function(t,e,n,r){return e-Tr(t,"padding-"+n,0)-Tr(t,"padding-"+r,0)-Tr(t,"border-"+n+"-width",0)-Tr(t,"border-"+r+"-width",0)},Pr=function(t,e){var n=t.dom,r=n.getBoundingClientRect().width||n.offsetWidth;return"border-box"===e?r:Ar(t,r,"left","right")},Rr=kr("width",(function(t){return t.dom.offsetWidth})),Ir=function(t){return Rr.get(t)},zr=function(t){return Rr.getOuter(t)},Lr=function(t){return Pr(t,"content-box")},jr=function(t){return Er()?Pr(t,Dr(t)):Tr(t,"width",t.dom.offsetWidth)},Br=function(t,e){void 0===e&&(e=w);var n=t.grid,r=A(n.columns,p),o=A(n.rows,p);return P(r,(function(n){return Fr((function(){return H(o,(function(e){return En.getAt(t,e,n).filter((function(t){return t.column===n})).toArray()}))}),(function(t){return 1===t.colspan&&e(t.element)}),(function(){return En.getAt(t,0,n)}))}))},Fr=function(t,e,n){var r=t();return B(r,e).orThunk((function(){return C.from(r[0]).orThunk(n)})).map((function(t){return t.element}))},Nr=function(t){var e=t.grid,n=A(e.rows,p),r=A(e.columns,p);return P(n,(function(e){return Fr((function(){return H(r,(function(n){return En.getAt(t,e,n).filter((function(t){return t.row===e})).fold(m([]),(function(t){return[t]}))}))}),(function(t){return 1===t.rowspan}),(function(){return En.getAt(t,e,0)}))}))},Hr=function(t,e){if(e<0||e>=t.length-1)return C.none();var n=t[e].fold((function(){var n=function(t){var e=k.call(t,0);return e.reverse(),e}(t.slice(0,e));return q(n,(function(t,e){return t.map((function(t){return{value:t,delta:e+1}}))}))}),(function(t){return C.some({value:t,delta:0})})),r=t[e+1].fold((function(){var n=t.slice(e+1);return q(n,(function(t,e){return t.map((function(t){return{value:t,delta:e+1}}))}))}),(function(t){return C.some({value:t,delta:1})}));return n.bind((function(t){return r.map((function(e){var n=e.delta+t.delta;return Math.abs(e.value-t.value)/n}))}))},Vr=function(t,e){return function(n){return"rtl"===Ur(n)?e:t}},Ur=function(t){return"rtl"===Ue(t,"direction")?"rtl":"ltr"},Wr=kr("height",(function(t){var e=t.dom;return ge(t)?e.getBoundingClientRect().height:e.offsetHeight})),$r=function(t){return Wr.get(t)},Gr=function(t){return Wr.getOuter(t)},Kr=function(t){return Er()?function(t,e){var n=t.dom,r=n.getBoundingClientRect().height||n.offsetHeight;return"border-box"===e?r:Ar(t,r,"top","bottom")}(t,Dr(t)):Tr(t,"height",t.dom.offsetHeight)},qr=function(t,e){return{left:t,top:e,translate:function(n,r){return qr(t+n,e+r)}}},Xr=qr,Yr=function(t,e){return void 0!==t?t:void 0!==e?e:0},Jr=function(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return Xr(n.offsetLeft,n.offsetTop);var i=Yr(null==r?void 0:r.pageYOffset,o.scrollTop),a=Yr(null==r?void 0:r.pageXOffset,o.scrollLeft),u=Yr(o.clientTop,n.clientTop),c=Yr(o.clientLeft,n.clientLeft);return Qr(t).translate(a-c,i-u)},Qr=function(t){var e=t.dom,n=e.ownerDocument.body;return n===e?Xr(n.offsetLeft,n.offsetTop):ge(t)?function(t){var e=t.getBoundingClientRect();return Xr(e.left,e.top)}(e):Xr(0,0)},Zr=function(t,e){return{row:t,y:e}},to=function(t,e){return{col:t,x:e}},eo=function(t){return Jr(t).left+zr(t)},no=function(t){return Jr(t).left},ro=function(t,e){return to(t,no(e))},oo=function(t,e){return to(t,eo(e))},io=function(t){return Jr(t).top},ao=function(t,e){return Zr(t,io(e))},uo=function(t,e){return Zr(t,io(e)+Gr(e))},co=function(t,e,n){if(0===n.length)return[];var r=P(n.slice(1),(function(e,n){return e.map((function(e){return t(n,e)}))})),o=n[n.length-1].map((function(t){return e(n.length-1,t)}));return r.concat([o])},so={delta:p,positions:function(t){return co(ao,uo,t)},edge:io},lo={delta:p,edge:no,positions:function(t){return co(ro,oo,t)}},fo={delta:function(t){return-t},edge:eo,positions:function(t){return co(oo,ro,t)}},mo=Vr(lo,fo),po={delta:function(t,e){return mo(e).delta(t,e)},positions:function(t,e){return mo(e).positions(t,e)},edge:function(t){return mo(t).edge(t)}},ho={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},go=(tr=function(t){return"(?:"+t+")?"},er=["Infinity","[0-9]+\\."+tr("[0-9]+")+tr("[eE][+-]?[0-9]+"),"\\.[0-9]+"+tr("[eE][+-]?[0-9]+"),"[0-9]+"+tr("[eE][+-]?[0-9]+")].join("|"),new RegExp("^([+-]?(?:"+er+"))(.*)$")),vo=function(t,e){return C.from(go.exec(t)).bind((function(t){var n=Number(t[1]),r=t[2];return function(t,e){return D(e,(function(e){return D(ho[e],(function(e){return t===e}))}))}(r,e)?C.some({value:n,unit:r}):C.none()}))},bo=/(\d+(\.\d+)?)%/,yo=/(\d+(\.\d+)?)px|em/,_o=ee("col"),wo=function(t,e,n){var r,o=(r=t,C.from(r.dom.parentElement).map(xt.fromDom)).getOrThunk((function(){return ve(ne(t))}));return e(t)/n(o)*100},xo=function(t,e){He(t,"width",e+"px")},Oo=function(t,e){He(t,"width",e+"%")},So=function(t,e){He(t,"height",e+"px")},Co=function(t,e,n,r){var o=parseFloat(t);return it(t,"%")&&"table"!==Kt(e)?function(t,e,n,r){var o=an(t).map((function(t){var r=n(t);return Math.floor(e/100*r)})).getOr(e);return r(t,o),o}(e,o,n,r):o},ko=function(t){var e=function(t){return Kr(t)+"px"}(t);return e?Co(e,t,$r,So):$r(t)},Eo=function(t,e){return $e(t,e).orThunk((function(){return Pe(t,e).map((function(t){return t+"px"}))}))},Mo=function(t){return Eo(t,"width")},To=function(t){return wo(t,Ir,Lr)},Do=function(t){return _o(t)?Ir(t):jr(t)},Ao=function(t){return function(t,e,n){return n(t)/qe(t,e)}(t,"rowspan",ko)},Po=function(t,e,n){He(t,"width",e+n)},Ro=function(t){return wo(t,Ir,Lr)+"%"},Io=m(bo),zo=ee("col"),Lo=function(t){return Mo(t).getOrThunk((function(){return Do(t)+"px"}))},jo=function(t){return(e=t,Eo(e,"height")).getOrThunk((function(){return Ao(t)+"px"}));var e},Bo=function(t,e,n,r,o,i){return t.filter(r).fold((function(){return i(Hr(n,e))}),(function(t){return o(t)}))},Fo=function(t,e,n,r){var o=Br(t),i=En.hasColumns(t)?function(t){return P(En.justColumns(t),(function(t){return C.from(t.element)}))}(t):o,a=[C.some(po.edge(e))].concat(P(po.positions(o,e),(function(t){return t.map((function(t){return t.x}))}))),u=y(Xe);return P(i,(function(t,e){return Bo(t,e,a,u,(function(t){if(function(t){var e=_t().browser,n=e.isChrome()||e.isFirefox();return!zo(t)||n}(t))return n(t);var i,c,s=(i=o[e],c=p,null!=i?c(i):C.none());return Bo(s,e,a,u,(function(t){return r(C.some(Ir(t)))}),r)}),r)}))},No=function(t){return t.map((function(t){return t+"px"})).getOr("")},Ho=function(t,e,n){return Fo(t,e,Do,(function(t){return t.getOrThunk(n.minCellWidth)}))},Vo=function(t,e,n,r,o){var i=Nr(t),a=[C.some(n.edge(e))].concat(P(n.positions(i,e),(function(t){return t.map((function(t){return t.y}))})));return P(i,(function(t,e){return Bo(t,e,a,y(Ye),r,o)}))},Uo=function(t,e){return function(){return ge(t)?e(t):parseFloat($e(t,"width").getOr("0"))}},Wo=function(t){var e=Uo(t,Ir),n=m(0);return{width:e,pixelWidth:e,getWidths:function(e,n){return Ho(e,t,n)},getCellDelta:n,singleColumnWidth:m([0]),minCellWidth:n,setElementWidth:d,adjustTableWidth:d,isRelative:!0,label:"none"}},$o=function(t){var e=Uo(t,(function(t){return parseFloat(Ro(t))})),n=Uo(t,Ir);return{width:e,pixelWidth:n,getWidths:function(e,n){return function(t,e,n){return Fo(t,e,To,(function(t){return t.fold((function(){return n.minCellWidth()}),(function(t){return t/n.pixelWidth()*100}))}))}(e,t,n)},getCellDelta:function(t){return t/n()*100},singleColumnWidth:function(t,e){return[100-t]},minCellWidth:function(){return Qe()/n()*100},setElementWidth:Oo,adjustTableWidth:function(n){var r=e();Oo(t,r+n/100*r)},isRelative:!0,label:"percent"}},Go=function(t){var e=Uo(t,Ir);return{width:e,pixelWidth:e,getWidths:function(e,n){return Ho(e,t,n)},getCellDelta:p,singleColumnWidth:function(t,e){return[Math.max(Qe(),t+e)-t]},minCellWidth:Qe,setElementWidth:xo,adjustTableWidth:function(n){var r=e()+n;xo(t,r)},isRelative:!1,label:"pixel"}},Ko=function(t){return Mo(t).fold((function(){return Wo(t)}),(function(e){return function(t,e){return null!==Io().exec(e)?$o(t):Go(t)}(t,e)}))},qo=Go,Xo=$o,Yo=function(t,e,n){var r=t[n].element,o=xt.fromTag("td");Hn(o,xt.fromTag("br")),(e?Hn:Nn)(r,o)},Jo=function(t,e){var n=function(t){return Ot(t.element,e)},r=Sr(t),o=fn(r),i=Ko(t),a=En.generate(o),u=function(t,e){var n=t.grid.columns,r=t.grid.rows,o=n,i=0,a=0,u=[],c=[];return Pt(t.access,(function(t){if(u.push(t),e(t)){c.push(t);var n=t.row,s=n+t.rowspan-1,l=t.column,f=l+t.colspan-1;n<r?r=n:s>i&&(i=s),l<o?o=l:f>a&&(a=f)}})),function(t,e,n,r,o,i){return{minRow:t,minCol:e,maxRow:n,maxCol:r,allCells:o,selectedCells:i}}(r,o,i,a,u,c)}(a,n),c="th:not("+e+"),td:not("+e+")",s=en(r,"th,td",(function(t){return Ot(t,c)}));return R(s,Gn),function(t,e,n,r){for(var o=e.grid.columns,i=e.grid.rows,a=0;a<i;a++)for(var u=!1,c=0;c<o;c++){if(!(a<n.minRow||a>n.maxRow||c<n.minCol||c>n.maxCol))En.getAt(e,a,c).filter(r).isNone()?Yo(t,u,a):u=!0}}(o,a,u,n),function(t,e,n,r){Pt(n.columns,(function(t){(t.column<e.minCol||t.column>e.maxCol)&&Gn(t.element)}));var o=z(tn(t,"tr"),(function(t){return 0===t.dom.childElementCount}));R(o,Gn),e.minCol!==e.maxCol&&e.minRow!==e.maxRow||R(tn(t,"th,td"),(function(t){Re(t,"rowspan"),Re(t,"colspan")})),Re(t,wn),Re(t,"data-snooker-col-series"),Ko(t).adjustTableWidth(r)}(r,u,a,function(t,e,n,r){if(0===r.minCol&&e.grid.columns===r.maxCol+1)return 0;var o=Ho(e,t,n),i=j(o,(function(t,e){return t+e}),0),a=j(o.slice(r.minCol,r.maxCol+1),(function(t,e){return t+e}),0)/i*n.pixelWidth()-n.pixelWidth();return n.getCellDelta(a)}(t,En.fromTable(t),i,u)),r},Qo=function(t){return"img"===Kt(t)?1:Yn(t).fold((function(){return ce(t).length}),(function(t){return t.length}))},Zo=["img","br"],ti=function(t){return Yn(t).filter((function(t){return 0!==t.trim().length||t.indexOf(" ")>-1})).isSome()||T(Zo,Kt(t))},ei=function(t){return e=ti,(n=function(t){for(var r=0;r<t.childNodes.length;r++){var o=xt.fromDom(t.childNodes[r]);if(e(o))return C.some(o);var i=n(t.childNodes[r]);if(i.isSome())return i}return C.none()})(t.dom);var e,n},ni=function(t){return ri(t,ti)},ri=function(t,e){var n=function(t){for(var r=ce(t),o=r.length-1;o>=0;o--){var i=r[o];if(e(i))return C.some(i);var a=n(i);if(a.isSome())return a}return C.none()};return n(t)},oi={scope:["row","col"]},ii=function(t){return function(){var e=xt.fromTag("td",t.dom);return Hn(e,xt.fromTag("br",t.dom)),e}},ai=function(t){return function(){return xt.fromTag("col",t.dom)}},ui=function(t){return function(){return xt.fromTag("colgroup",t.dom)}},ci=function(t){return function(){return xt.fromTag("tr",t.dom)}},si=function(t,e,n){var r=function(t,e){var n=Cr(t,e),r=ce(Sr(t));return Wn(n,r),n}(t,e);return Pt(n,(function(t,e){null===t?Re(r,e):Te(r,e,t)})),r},li=function(t){return t},fi=function(t,e,n){var r=function(t,e){var n,r,o,i;n=t.element,r=e,o=n.dom,i=r.dom,Fe(o)&&Fe(i)&&(i.style.cssText=o.style.cssText),Ge(e,"height"),1!==t.colspan&&Ge(e,"width")};return{col:function(n){var o=xt.fromTag(Kt(n.element),e.dom);return r(n,o),t(n.element,o),o},colgroup:ui(e),row:ci(e),cell:function(o){var i=xt.fromTag(Kt(o.element),e.dom),a=n.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),u=a.length>0?function(t,e,n){return ei(t).map((function(r){var o=n.join(","),i=ye(r,o,(function(e){return kt(e,t)}));return L(i,(function(t,e){var n=Or(e);return Re(n,"contenteditable"),Hn(t,n),n}),e)})).getOr(e)}(o.element,i,a):i;return Hn(u,xt.fromTag("br")),r(o,i),function(t,e){Pt(oi,(function(n,r){return Pe(t,r).filter((function(t){return T(n,t)})).each((function(t){return Te(e,r,t)}))}))}(o.element,i),t(o.element,i),i},replace:si,colGap:ai(e),gap:ii(e)}},di=function(t){return{col:ai(t),colgroup:ui(t),row:ci(t),cell:ii(t),replace:li,colGap:ai(t),gap:ii(t)}},mi=function(t){return P(t,xt.fromDom)},pi=function(t){return xt.fromDom(t.getBody())},hi=function(t){return t.getBoundingClientRect().width},gi=function(t){return t.getBoundingClientRect().height},vi=function(t){return function(e){return kt(e,pi(t))}},bi=function(t){return/^\d+(\.\d+)?$/.test(t)?t+"px":t},yi=function(t){Re(t,"data-mce-style");var e=function(t){return Re(t,"data-mce-style")};R(rn(t),e),R(on(t),e),R(un(t),e)},_i=function(t){return xt.fromDom(t.selection.getStart())},wi=function(t){return vr(t.get(),m([]),p,W)},xi=function(t){var e=function(t,e){return Pe(t,e).exists((function(t){return parseInt(t,10)>1}))},n=wi(t);return n.length>0&&V(n,(function(t){return e(t,"rowspan")||e(t,"colspan")}))?C.some(n):C.none()},Oi=function(t,e,n){return vr(e.get(),C.none,(function(e){return e.length<=1?C.none():pr(t,n.firstSelectedSelector,n.lastSelectedSelector).map((function(t){return{bounds:t,cells:e}}))}),C.none)},Si={selected:"data-mce-selected",selectedSelector:"td[data-mce-selected],th[data-mce-selected]",firstSelected:"data-mce-first-selected",firstSelectedSelector:"td[data-mce-first-selected],th[data-mce-first-selected]",lastSelected:"data-mce-last-selected",lastSelectedSelector:"td[data-mce-last-selected],th[data-mce-last-selected]"},Ci=function(t,e,n){return{element:n,mergable:Oi(e,t,Si),unmergable:xi(t),selection:wi(t)}},ki=function(t){return function(e,n){var r,o=Kt(e),i="col"===o||"colgroup"===o?an(r=e).bind((function(t){return mr(t,Si.firstSelectedSelector)})).fold(m(r),(function(t){return t[0]})):e;return Ee(i,t,n)}},Ei=ki("th,td,caption"),Mi=ki("th,td"),Ti=function(t){return wi(t)},Di=function(t,e,n){t.on("BeforeGetContent",(function(n){!0===n.selection&&vr(e.get(),d,(function(e){n.preventDefault(),function(t){return an(t[0]).map((function(t){var e=Jo(t,"[data-mce-selected]");return yi(e),[e]}))}(e).each((function(e){n.content="text"===n.format?function(t){return P(t,(function(t){return t.dom.innerText})).join("")}(e):function(t,e){return P(e,(function(e){return t.selection.serializer.serialize(e.dom,{})})).join("")}(t,e)}))}),d)})),t.on("BeforeSetContent",(function(r){if(!0===r.selection&&!0===r.paste){var o=Ti(e);G(o).each((function(e){an(e).each((function(o){var i,a,u,c=z((i=r.content,(u=(a||document).createElement("div")).innerHTML=i,ce(xt.fromDom(u))),(function(t){return"meta"!==Kt(t)})),s=ee("table");if(1===c.length&&s(c[0])){r.preventDefault();var l=xt.fromDom(t.getDoc()),f=di(l),d=function(t,e,n){return{element:t,clipboard:e,generators:n}}(e,c[0],f);n.pasteCells(o,d).each((function(){t.focus()}))}}))}))}}))},Ai=hr([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}]),Pi=X({},Ai),Ri=function(t,e,n,r,o){var i=t.slice(0),a=function(t,e){return 0===t.length?Pi.none():1===t.length?Pi.only(0):0===e?Pi.left(0,1):e===t.length-1?Pi.right(e-1,e):e>0&&e<t.length-1?Pi.middle(e-1,e,e+1):Pi.none()}(t,e),u=m(P(i,m(0)));return a.fold(u,(function(t){return r.singleColumnWidth(i[t],n)}),(function(t,e){return o.calcLeftEdgeDeltas(i,t,e,n,r.minCellWidth(),r.isRelative)}),(function(t,e,a){return o.calcMiddleDeltas(i,t,e,a,n,r.minCellWidth(),r.isRelative)}),(function(t,e){return o.calcRightEdgeDeltas(i,t,e,n,r.minCellWidth(),r.isRelative)}))},Ii=function(t,e,n){for(var r=0,o=t;o<e;o++)r+=void 0!==n[o]?n[o]:0;return r},zi=function(t,e){var n=En.justCells(t);return P(n,(function(t){var n=Ii(t.row,t.row+t.rowspan,e);return{element:t.element,height:n,rowspan:t.rowspan}}))},Li=function(t,e){return En.hasColumns(t)?function(t,e){var n=En.justColumns(t);return P(n,(function(t,n){return{element:t.element,width:e[n],colspan:t.colspan}}))}(t,e):function(t,e){var n=En.justCells(t);return P(n,(function(t){var n=Ii(t.column,t.column+t.colspan,e);return{element:t.element,width:n,colspan:t.colspan}}))}(t,e)},ji=function(t,e,n){var r=Li(t,e);R(r,(function(t){n.setElementWidth(t.element,t.width)}))},Bi=function(t,e,n,r,o){var i=En.fromTable(t),a=o.getCellDelta(e),u=o.getWidths(i,o),c=n===i.grid.columns-1,s=r.clampTableDelta(u,n,a,o.minCellWidth(),c),l=Ri(u,n,s,o,r),f=P(l,(function(t,e){return t+u[e]}));ji(i,f,o),r.resizeTable(o.adjustTableWidth,s,c)},Fi=function(t,e,n,r){var o=En.fromTable(t),i=function(t,e,n){return Vo(t,e,n,Ao,(function(t){return t.getOrThunk(Ze)}))}(o,t,r),a=P(i,(function(t,r){return n===r?Math.max(e+t,Ze()):t})),u=zi(o,a),c=function(t,e){return P(t.all,(function(t,n){return{element:t.element,height:e[n]}}))}(o,a);R(c,(function(t){So(t.element,t.height)})),R(u,(function(t){So(t.element,t.height)}));var s=L(a,(function(t,e){return t+e}),0);So(t,s)},Ni=function(t){return P(t,m(0))},Hi=function(t,e,n,r,o){return o(t.slice(0,e)).concat(r).concat(o(t.slice(n)))},Vi=function(t){return function(e,n,r,o){if(t(r)){var i=Math.max(o,e[n]-Math.abs(r)),a=Math.abs(i-e[n]);return r>=0?a:-a}return r}},Ui=Vi((function(t){return t<0})),Wi=Vi(w),$i=function(){var t=function(t,e,n,r){var o=(100+n)/100,i=Math.max(r,(t[e]+n)/o);return P(t,(function(t,n){return(n===e?i:t/o)-t}))},e=function(e,n,r,o,i,a){return a?t(e,n,o,i):function(t,e,n,r,o){var i=Ui(t,e,r,o);return Hi(t,e,n+1,[i,0],Ni)}(e,n,r,o,i)};return{resizeTable:function(t,e){return t(e)},clampTableDelta:Ui,calcLeftEdgeDeltas:e,calcMiddleDeltas:function(t,n,r,o,i,a,u){return e(t,r,o,i,a,u)},calcRightEdgeDeltas:function(e,n,r,o,i,a){if(a)return t(e,r,o,i);var u=Ui(e,r,o,i);return Ni(e.slice(0,r)).concat([u])},calcRedestributedWidths:function(t,e,n,r){if(r){var o=(e+n)/e,i=P(t,(function(t){return t/o}));return{delta:100*o-100,newSizes:i}}return{delta:n,newSizes:t}}}},Gi=function(){var t=function(t,e,n,r,o){var i=Wi(t,r>=0?n:e,r,o);return Hi(t,e,n+1,[i,-i],Ni)};return{resizeTable:function(t,e,n){n&&t(e)},clampTableDelta:function(t,e,n,r,o){if(o){if(n>=0)return n;var i=j(t,(function(t,e){return t+e-r}),0);return Math.max(-i,n)}return Ui(t,e,n,r)},calcLeftEdgeDeltas:t,calcMiddleDeltas:function(e,n,r,o,i,a){return t(e,r,o,i,a)},calcRightEdgeDeltas:function(t,e,n,r,o,i){if(i)return Ni(t);var a=r/t.length;return P(t,m(a))},calcRedestributedWidths:function(t,e,n,r){return{delta:0,newSizes:t}}}},Ki=function(t,e){var n=C.from(t.dom.documentElement).map(xt.fromDom).getOr(t);return{parent:m(n),view:m(t),origin:m(Xr(0,0)),isResizable:e}},qi=function(t,e,n){return{parent:m(e),view:m(t),origin:m(Xr(0,0)),isResizable:n}},Xi=hr([{invalid:["raw"]},{pixels:["value"]},{percent:["value"]}]),Yi=function(t,e,n){var r=n.substring(0,n.length-t.length),o=parseFloat(r);return r===o.toString()?e(o):Xi.invalid(n)},Ji=X(X({},Xi),{from:function(t){return it(t,"%")?Yi("%",Xi.percent,t):it(t,"px")?Yi("px",Xi.pixels,t):Xi.invalid(t)}}),Qi=function(t,e,n){return t.fold((function(){return e}),(function(t){return function(t,e,n){var r=n/e;return P(t,(function(t){return Ji.from(t).fold((function(){return t}),(function(t){return t*r+"px"}),(function(t){return t/100*n+"px"}))}))}(e,n,t)}),(function(t){return function(t,e){return P(t,(function(t){return Ji.from(t).fold((function(){return t}),(function(t){return t/e*100+"%"}),(function(t){return t+"%"}))}))}(e,n)}))},Zi=function(t,e,n){var r=Ji.from(n),o=V(t,(function(t){return"0px"===t}))?function(t,e){var n=t.fold((function(){return m("")}),(function(t){return m(t/e+"px")}),(function(){return m(100/e+"%")}));return A(e,n)}(r,t.length):Qi(r,t,e);return na(o)},ta=function(t,e){return 0===t.length?e:L(t,(function(t,e){return Ji.from(e).fold(m(0),p,p)+t}),0)},ea=function(t,e){return Ji.from(t).fold(m(t),(function(t){return t+e+"px"}),(function(t){return t+e+"%"}))},na=function(t){if(0===t.length)return t;var e=L(t,(function(t,e){var n=Ji.from(e).fold((function(){return{value:e,remainder:0}}),(function(t){return function(t,e){var n=Math.floor(t);return{value:n+e,remainder:t-n}}(t,"px")}),(function(t){return{value:t+"%",remainder:0}}));return{output:[n.value].concat(t.output),remainder:t.remainder+n.remainder}}),{output:[],remainder:0}),n=e.output;return n.slice(0,n.length-1).concat([ea(n[n.length-1],Math.round(e.remainder))])},ra=Ji.from,oa=function(t){return ra(t).fold(m("px"),m("px"),m("%"))},ia=function(t,e,n){var r=En.fromTable(t),o=r.all,i=En.justCells(r),a=En.justColumns(r);e.each((function(e){var n=oa(e),o=Ir(t),u=function(t,e){return Fo(t,e,Lo,No)}(r,t),c=Zi(u,o,e);En.hasColumns(r)?function(t,e,n){R(e,(function(e,r){var o=ta([t[r]],Qe());He(e.element,"width",o+n)}))}(c,a,n):function(t,e,n){R(e,(function(e){var r=t.slice(e.column,e.colspan+e.column),o=ta(r,Qe());He(e.element,"width",o+n)}))}(c,i,n),He(t,"width",e)})),n.each((function(e){var n=oa(e),a=$r(t),u=function(t,e,n){return Vo(t,e,n,jo,No)}(r,t,so);!function(t,e,n,r){R(n,(function(e){var n=t.slice(e.row,e.rowspan+e.row),o=ta(n,Ze());He(e.element,"height",o+r)})),R(e,(function(e,n){He(e.element,"height",t[n])}))}(Zi(u,a,e),o,i,n),He(t,"height",e)}))},aa=function(t){return Mo(t).exists((function(t){return bo.test(t)}))},ua=function(t){return Mo(t).exists((function(t){return yo.test(t)}))},ca=function(t){return Mo(t).isNone()},sa=function(t){return En.fromTable(t).grid},la=function(t){var e=[];return{bind:function(t){if(void 0===t)throw new Error("Event bind error: undefined handler");e.push(t)},unbind:function(t){e=z(e,(function(e){return e!==t}))},trigger:function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o={};R(t,(function(t,e){o[t]=n[e]})),R(e,(function(t){t(o)}))}}},fa=function(t){return{registry:Rt(t,(function(t){return{bind:t.bind,unbind:t.unbind}})),trigger:Rt(t,(function(t){return t.trigger}))}},da=function(t){return t.slice(0).sort()},ma=function(t,e,n){if(0===e.length)throw new Error("You must specify at least one required field.");var o;return function(t,e){if(!i(e))throw new Error("The "+t+" fields must be an array. Was: "+e+".");R(e,(function(e){if(!r(e))throw new Error("The value "+e+" in the "+t+" fields was not a string.")}))}("required",e),o=da(e),B(o,(function(t,e){return e<o.length-1&&t===o[e+1]})).each((function(t){throw new Error("The field: "+t+" occurs more than once in the combined fields: ["+o.join(", ")+"].")})),function(r){var o=Dt(r);V(e,(function(t){return T(o,t)}))||function(t,e){throw new Error("All required keys ("+da(t).join(", ")+") were not specified. Specified keys were: "+da(e).join(", ")+".")}(e,o),t(e,o);var i=z(e,(function(t){return!n.validate(r[t],t)}));return i.length>0&&function(t,e){throw new Error("All values need to be of type: "+e+". Keys ("+da(t).join(", ")+") were not.")}(i,n.label),r}},pa=function(t,e){var n=z(e,(function(e){return!T(t,e)}));n.length>0&&function(t){throw new Error("Unsupported keys for object: "+da(t).join(", "))}(n)},ha=function(t){return function(t,e){return ma(t,e,{validate:l,label:"function"})}(pa,t)},ga=ha(["compare","extract","mutate","sink"]),va=ha(["element","start","stop","destroy"]),ba=ha(["forceDrop","drop","move","delayDrop"]),ya=function(){var t=C.none(),e=fa({move:la(["info"])});return{onEvent:function(n,r){r.extract(n).each((function(n){(function(e,n){var r=t.map((function(t){return e.compare(t,n)}));return t=C.some(n),r})(r,n).each((function(t){e.trigger.move(t)}))}))},reset:function(){t=C.none()},events:e.registry}},_a=function(){var t,e=(t=fa({move:la(["info"])}),{onEvent:d,reset:d,events:t.registry}),n=ya(),r=e;return{on:function(){r.reset(),r=n},off:function(){r.reset(),r=e},isOn:function(){return r===n},onEvent:function(t,e){r.onEvent(t,e)},events:n.events}},wa=function(t,e,n){var r,o,i,u,c=!1,s=fa({start:la([]),stop:la([])}),l=_a(),f=function(){p.stop(),l.isOn()&&(l.off(),s.trigger.stop())},d=(r=f,o=200,i=null,{cancel:u=function(){a(i)||(clearTimeout(i),i=null)},throttle:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];u(),i=setTimeout((function(){i=null,r.apply(null,t)}),o)}});l.events.move.bind((function(n){e.mutate(t,n.info)}));var m=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];c&&t.apply(null,e)}},p=e.sink(ba({forceDrop:f,drop:m(f),move:m((function(t){d.cancel(),l.onEvent(t,e)})),delayDrop:m(d.throttle)}),n);return{element:p.element,go:function(t){p.start(t),l.on(),s.trigger.start()},on:function(){c=!0},off:function(){c=!1},destroy:function(){p.destroy()},events:s.registry}},xa=function(t){var e,n,r=xt.fromDom(function(t){if(fe()&&s(t.target)){var e=xt.fromDom(t.target);if(Jt(e)&&he(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return G(n)}}return C.from(t.target)}(t).getOr(t.target)),o=function(){return t.stopPropagation()},i=function(){return t.preventDefault()},a=(e=i,n=o,function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e(n.apply(null,t))});return function(t,e,n,r,o,i,a){return{target:t,x:e,y:n,stop:r,prevent:o,kill:i,raw:a}}(r,t.clientX,t.clientY,o,i,a,t)},Oa=function(t,e,n,r,o){var i=function(t,e){return function(n){t(n)&&e(xa(n))}}(n,r);return t.dom.addEventListener(e,i,o),{unbind:g(Sa,t,e,i,o)}},Sa=function(t,e,n,r){t.dom.removeEventListener(e,n,r)},Ca=w,ka=function(t,e,n){return function(t,e,n,r){return Oa(t,e,n,r,!1)}(t,e,Ca,n)},Ea=xa,Ma=function(t,e){var n=Ae(t,e);return void 0===n||""===n?[]:n.split(" ")},Ta=function(t){return void 0!==t.dom.classList},Da=function(t,e){return function(t,e,n){var r=Ma(t,e).concat([n]);return Te(t,e,r.join(" ")),!0}(t,"class",e)},Aa=function(t,e){Ta(t)?t.dom.classList.add(e):Da(t,e)},Pa=function(t,e){return Ta(t)&&t.dom.classList.contains(e)},Ra=function(t){var e=t.replace(/\./g,"-");return{resolve:function(t){return e+"-"+t}}},Ia=Ra("ephox-dragster"),za=Ia.resolve,La=ga({compare:function(t,e){return Xr(e.left-t.left,e.top-t.top)},extract:function(t){return C.some(Xr(t.x,t.y))},sink:function(t,e){var n=function(t){var e=X({layerClass:za("blocker")},t),n=xt.fromTag("div");Te(n,"role","presentation"),Ve(n,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),Aa(n,za("blocker")),Aa(n,e.layerClass);return{element:m(n),destroy:function(){Gn(n)}}}(e),r=ka(n.element(),"mousedown",t.forceDrop),o=ka(n.element(),"mouseup",t.drop),i=ka(n.element(),"mousemove",t.move),a=ka(n.element(),"mouseout",t.delayDrop);return va({element:n.element,start:function(t){Hn(t,n.element())},stop:function(){Gn(n.element())},destroy:function(){n.destroy(),o.unbind(),i.unbind(),a.unbind(),r.unbind()}})},mutate:function(t,e){t.mutate(e.left,e.top)}}),ja=function(t){return Ee(t,"[contenteditable]")},Ba=function(t,e){return void 0===e&&(e=!1),!_t().browser.isIE()&&ge(t)?t.dom.isContentEditable:ja(t).fold(m(e),(function(t){return"true"===Fa(t)}))},Fa=function(t){return t.dom.contentEditable},Na=Ra("ephox-snooker"),Ha=Na.resolve,Va=function(){var t=fa({drag:la(["xDelta","yDelta","target"])}),e=C.none(),n=function(){var t=fa({drag:la(["xDelta","yDelta"])});return{mutate:function(e,n){t.trigger.drag(e,n)},events:t.registry}}();n.events.drag.bind((function(n){e.each((function(e){t.trigger.drag(n.xDelta,n.yDelta,e)}))}));return{assign:function(t){e=C.some(t)},get:function(){return e},mutate:n.mutate,events:t.registry}},Ua=Ha("resizer-bar"),Wa=Ha("resizer-rows"),$a=Ha("resizer-cols"),Ga=function(t){var e=we(t.parent(),"."+Ua);R(e,Gn)},Ka=function(t,e,n){var r=t.origin();R(e,(function(e){e.each((function(e){var o=n(r,e);Aa(o,Ua),Hn(t.parent(),o)}))}))},qa=function(t,e,n,r){Ka(t,e,(function(t,e){var o,i,a,u,c,s,l=(o=e.col,i=e.x-t.left,a=n.top-t.top,u=7,c=r,s=xt.fromTag("div"),Ve(s,{position:"absolute",left:i-u/2+"px",top:a+"px",height:c+"px",width:u+"px"}),De(s,{"data-column":o,role:"presentation"}),s);return Aa(l,$a),l}))},Xa=function(t,e,n,r){Ka(t,e,(function(t,e){var o=function(t,e,n,r,o){var i=xt.fromTag("div");return Ve(i,{position:"absolute",left:e+"px",top:n-o/2+"px",height:o+"px",width:r+"px"}),De(i,{"data-row":t,role:"presentation"}),i}(e.row,n.left-t.left,e.y-t.top,r,7);return Aa(o,Wa),o}))},Ya=function(t,e,n,r,o){var i=Jr(n),a=e.isResizable,u=r.length>0?so.positions(r,n):[],c=u.length>0?function(t,e){return H(t.all,(function(t,n){return e(t.element)?[n]:[]}))}(t,a):[],s=z(u,(function(t,e){return D(c,(function(t){return e===t}))}));Xa(e,s,i,zr(n));var l=o.length>0?po.positions(o,n):[],f=l.length>0?function(t,e){var n=[];return A(t.grid.columns,(function(r){En.getColumnAt(t,r).map((function(t){return t.element})).forall(e)&&n.push(r)})),z(n,(function(n){var r=En.filterItems(t,(function(t){return t.column===n}));return V(r,(function(t){return e(t.element)}))}))}(t,a):[],d=z(l,(function(t,e){return D(f,(function(t){return e===t}))}));qa(e,d,i,Gr(n))},Ja=function(t,e){if(Ga(t),t.isResizable(e)){var n=En.fromTable(e),r=Nr(n),o=Br(n);Ya(n,t,e,r,o)}},Qa=function(t,e){var n=we(t.parent(),"."+Ua);R(n,e)},Za=function(t){Qa(t,(function(t){He(t,"display","none")}))},tu=function(t){Qa(t,(function(t){He(t,"display","block")}))},eu=Ha("resizer-bar-dragging"),nu=function(t){var e=Va(),n=function(t,e){void 0===e&&(e={});var n=void 0!==e.mode?e.mode:La;return wa(t,n,e)}(e,{}),r=C.none(),o=function(t,e){return C.from(Ae(t,e))};e.events.drag.bind((function(t){o(t.target,"data-row").each((function(e){var n=Je(t.target,"top");He(t.target,"top",n+t.yDelta+"px")})),o(t.target,"data-column").each((function(e){var n=Je(t.target,"left");He(t.target,"left",n+t.xDelta+"px")}))}));var i=function(t,e){return Je(t,e)-Ke(t,"data-initial-"+e,0)};n.events.stop.bind((function(){e.get().each((function(e){r.each((function(n){o(e,"data-row").each((function(t){var r=i(e,"top");Re(e,"data-initial-top"),l.trigger.adjustHeight(n,r,parseInt(t,10))})),o(e,"data-column").each((function(t){var r=i(e,"left");Re(e,"data-initial-left"),l.trigger.adjustWidth(n,r,parseInt(t,10))})),Ja(t,n)}))}))}));var a=function(r,o){l.trigger.startAdjust(),e.assign(r),Te(r,"data-initial-"+o,Je(r,o)),Aa(r,eu),He(r,"opacity","0.2"),n.go(t.parent())},u=ka(t.parent(),"mousedown",(function(t){var e;e=t.target,Pa(e,Wa)&&a(t.target,"top"),function(t){return Pa(t,$a)}(t.target)&&a(t.target,"left")})),c=function(e){return kt(e,t.view())},s=ka(t.view(),"mouseover",(function(e){var n;(n=e.target,Ee(n,"table",c).filter(Ba)).fold((function(){ge(e.target)&&Ga(t)}),(function(e){r=C.some(e),Ja(t,e)}))})),l=fa({adjustHeight:la(["table","delta","row"]),adjustWidth:la(["table","delta","column"]),startAdjust:la([])});return{destroy:function(){u.unbind(),s.unbind(),n.destroy(),Ga(t)},refresh:function(e){Ja(t,e)},on:n.on,off:n.off,hideBars:g(Za,t),showBars:g(tu,t),events:l.registry}},ru=function(t,e,n){var r=so,o=po,i=nu(t),a=fa({beforeResize:la(["table","type"]),afterResize:la(["table","type"]),startDrag:la([])});return i.events.adjustHeight.bind((function(t){var e=t.table;a.trigger.beforeResize(e,"row");var n=r.delta(t.delta,e);Fi(e,n,t.row,r),a.trigger.afterResize(e,"row")})),i.events.startAdjust.bind((function(t){a.trigger.startDrag()})),i.events.adjustWidth.bind((function(t){var r=t.table;a.trigger.beforeResize(r,"col");var i=o.delta(t.delta,r),u=n(r);Bi(r,i,t.column,e,u),a.trigger.afterResize(r,"col")})),{on:i.on,off:i.off,hideBars:i.hideBars,showBars:i.showBars,destroy:i.destroy,events:a.registry}},ou=function(t,e){return t.fire("newrow",{node:e})},iu=function(t,e){return t.fire("newcell",{node:e})},au=function(t,e,n){t.fire("TableModified",X(X({},n),{table:e}))},uu={structure:!1,style:!0},cu={structure:!0,style:!1},su={structure:!0,style:!0},lu={"border-collapse":"collapse",width:"100%"},fu=A(5,(function(t){var e=t+1+"px";return{title:e,value:e}})),du=P(["Solid","Dotted","Dashed","Double","Groove","Ridge","Inset","Outset","None","Hidden"],(function(t){return{title:t,value:t.toLowerCase()}})),mu={border:"1"},pu=function(t){return t.getParam("table_sizing_mode","auto")},hu=function(t){return t.getParam("table_responsive_width")},gu=function(t){return t.getParam("table_border_widths",fu,"array")},vu=function(t){return t.getParam("table_border_styles",du,"array")},bu=function(t){return t.getParam("table_default_attributes",mu,"object")},yu=function(t){return t.getParam("table_default_styles",function(t){var e;if(Eu(t)){var n=t.dom,r=null!==(e=n.getParent(t.selection.getStart(),n.isBlock))&&void 0!==e?e:t.getBody(),o=Lr(xt.fromDom(r));return X(X({},lu),{width:o+"px"})}return Mu(t)?zt(lu,(function(t,e){return"width"!==e})):lu}(t),"object")},_u=function(t){return t.getParam("table_cell_advtab",!0,"boolean")},wu=function(t){return t.getParam("table_row_advtab",!0,"boolean")},xu=function(t){return t.getParam("table_advtab",!0,"boolean")},Ou=function(t){return t.getParam("table_style_by_css",!1,"boolean")},Su=function(t){return t.getParam("table_cell_class_list",[],"array")},Cu=function(t){return t.getParam("table_class_list",[],"array")},ku=function(t){return"relative"===pu(t)||!0===hu(t)},Eu=function(t){return"fixed"===pu(t)||!1===hu(t)},Mu=function(t){return"responsive"===pu(t)},Tu=function(t){return t.getParam("table_use_colgroups",!1,"boolean")},Du=function(t){var e=t.getParam("table_header_type","section","string");return T(["section","cells","sectionCells","auto"],e)?e:"section"},Au=function(t){var e=t.getParam("table_column_resizing","preservetable","string");return B(["preservetable","resizetable"],(function(t){return t===e})).getOr("preservetable")},Pu=function(t){return"preservetable"===Au(t)},Ru=function(t){return"resizetable"===Au(t)},Iu=function(t){var e=t.getParam("table_clone_elements");return r(e)?C.some(e.split(/[ ,]/)):Array.isArray(e)?C.some(e):C.none()},zu=function(t){return t.getParam("table_background_color_map",[],"array")},Lu=function(t){return t.getParam("table_border_color_map",[],"array")},ju=function(t,e){return ku(t)?Xo(e):Eu(t)?qo(e):Ko(e)},Bu=function(t){Re(t,"width")},Fu=function(t){var e=Ro(t);ia(t,C.some(e),C.none()),Bu(t)},Nu=function(t){var e=function(t){return Ir(t)+"px"}(t);ia(t,C.some(e),C.none()),Bu(t)},Hu=function(t){Ge(t,"width");var e=on(t),n=e.length>0?e:rn(t);R(n,(function(t){Ge(t,"width"),Bu(t)})),Bu(t)},Vu=function(){var t=xt.fromTag("div");return Ve(t,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),Hn(ve(xt.fromDom(document)),t),t},Uu=function(t){return"false"!==Ae(t,"data-mce-resize")},Wu=function(t){var e,n,o=C.none(),i=C.none(),a=C.none(),u=function(t){return"TABLE"===t.nodeName},c=function(){return i},s=function(e){return ju(t,e)},l=function(){return Pu(t)?Gi():$i()},f=function(r,o,i){var a=it(o,"e");if(""===n&&Fu(r),i!==e&&""!==n){He(r,"width",n);var u=l(),c=s(r),f=Pu(t)||a?function(t){return sa(t).columns}(r)-1:0;Bi(r,i-e,f,u,c)}else if(function(t){return/^(\d+(\.\d+)?)%$/.test(t)}(n)){var d=parseFloat(n.replace("%",""));He(r,"width",i*d/e+"%")}(function(t){return/^(\d+(\.\d+)?)px$/.test(t)})(n)&&function(t){var e=En.fromTable(t);En.hasColumns(e)||R(rn(t),(function(t){var e=Ue(t,"width");He(t,"width",e),Re(t,"width")}))}(r)};return t.on("init",(function(){var e=function(t,e){return t.inline?qi(pi(t),Vu(),e):Ki(xt.fromDom(t.getDoc()),e)}(t,Uu);if(a=C.some(e),function(t){var e=t.getParam("object_resizing",!0);return r(e)?"table"===e:e}(t)&&function(t){return t.getParam("table_resize_bars",!0,"boolean")}(t)){var n=l(),u=ru(e,n,s);u.on(),u.events.startDrag.bind((function(e){o=C.some(t.selection.getRng())})),u.events.beforeResize.bind((function(e){var n=e.table.dom;!function(t,e,n,r,o){t.fire("ObjectResizeStart",{target:e,width:n,height:r,origin:o})}(t,n,hi(n),gi(n),"bar-"+e.type)})),u.events.afterResize.bind((function(e){var n=e.table,r=n.dom;yi(n),o.each((function(e){t.selection.setRng(e),t.focus()})),function(t,e,n,r,o){t.fire("ObjectResized",{target:e,width:n,height:r,origin:o})}(t,r,hi(r),gi(r),"bar-"+e.type),t.undoManager.add()})),i=C.some(u)}})),t.on("ObjectResizeStart",(function(r){var o=r.target;if(u(o)){var i=xt.fromDom(o);R(t.dom.select(".mce-clonedresizable"),(function(e){t.dom.addClass(e,"mce-"+Au(t)+"-columns")})),!ua(i)&&Eu(t)?Nu(i):!aa(i)&&ku(t)&&Fu(i),ca(i)&&ot(r.origin,"bar-")&&Fu(i),e=r.width,n=Mu(t)?"":function(t,e){var n=t.dom.getStyle(e,"width")||t.dom.getAttrib(e,"width");return C.from(n).filter(ut)}(t,o).getOr("")}})),t.on("ObjectResized",(function(e){var n=e.target;if(u(n)){var r=xt.fromDom(n),o=e.origin;ot(o,"corner-")&&f(r,o,e.width),yi(r),au(t,r.dom,uu)}})),t.on("SwitchMode",(function(){c().each((function(e){t.mode.isReadOnly()?e.hideBars():e.showBars()}))})),{lazyResize:c,lazyWire:function(){return a.getOr(Ki(xt.fromDom(t.getBody()),Uu))},destroy:function(){i.each((function(t){t.destroy()})),a.each((function(e){!function(t,e){t.inline&&Gn(e.parent())}(t,e)}))}}},$u=function(t,e){return{element:t,offset:e}},Gu=function(t,e,n){return t.property().isText(e)&&0===t.property().getText(e).trim().length||t.property().isComment(e)?n(e).bind((function(e){return Gu(t,e,n).orThunk((function(){return C.some(e)}))})):C.none()},Ku=function(t,e){return t.property().isText(e)?t.property().getText(e).length:t.property().children(e).length},qu=function(t,e){var n=Gu(t,e,t.query().prevSibling).getOr(e);if(t.property().isText(n))return $u(n,Ku(t,n));var r=t.property().children(n);return r.length>0?qu(t,r[r.length-1]):$u(n,Ku(t,n))},Xu=qu,Yu=Zn(),Ju=function(t,e){1===qe(t,"colspan")&&function(t){return Mo(t).bind((function(t){return vo(t,["fixed","relative","empty"])}))}(t).each((function(n){var r=n.value/2;Po(t,r,n.unit),Po(e,r,n.unit)}))},Qu=ee("th"),Zu=function(t){return V(t,(function(t){return Qu(t.element)}))},tc=function(t,e){return t&&e?"sectionCells":t?"section":"cells"},ec=function(t){var e="thead"===t.section,n=ze(nc(t.cells),"th");return e||n?{type:"header",subType:tc(e,n)}:"tfoot"===t.section?{type:"footer"}:{type:"body"}},nc=function(t){var e=z(t,(function(t){return Qu(t.element)}));return 0===e.length?C.some("td"):e.length===t.length?C.some("th"):C.none()},rc=function(t,e,n){return $t(n(t.element,e),!0,t.isLocked)},oc=function(t,e){return t.section!==e?Gt(t.element,t.cells,e,t.isNew):t},ic=function(){return{transformRow:oc,transformCell:function(t,e,n){var r=n(t.element,e),o="td"!==Kt(r)?function(t,e){var n=Cr(t,e);Bn(t,n);var r=ce(t);return Wn(n,r),Gn(t),n}(r,"td"):r;return $t(o,t.isNew,t.isLocked)}}},ac=function(){return{transformRow:oc,transformCell:rc}},uc=function(){return{transformRow:function(t,e){return oc(t,"thead"===e?"tbody":e)},transformCell:rc}},cc=function(t,e){switch(function(t){return q(t.all,(function(t){var e=ec(t);return"header"===e.type?C.from(e.subType):C.none()}))}(En.fromTable(t)).getOr(e)){case"section":return ic();case"sectionCells":return ac();case"cells":return uc()}},sc=ic,lc=ac,fc=uc,dc=function(){return{transformRow:p,transformCell:rc}},mc=function(t,e,n,r){n===r?Re(t,e):Te(t,e,n)},pc=function(t,e,n){K(_e(t,e)).fold((function(){return Nn(t,n)}),(function(t){return Fn(t,n)}))},hc=function(t,e){var n=[],r=[],o=function(t){return P(t,(function(t){t.isNew&&n.push(t.element);var e=t.element;return $n(e),R(t.cells,(function(t){t.isNew&&r.push(t.element),mc(t.element,"colspan",t.colspan,1),mc(t.element,"rowspan",t.rowspan,1),Hn(e,t.element)})),e}))},i=function(t){return H(t,(function(t){return P(t.cells,(function(t){return mc(t.element,"span",t.colspan,1),t.element}))}))},a=function(e,n){var r=function(t,e){var n=Ce(t,e).getOrThunk((function(){var n=xt.fromTag(e,ne(t).dom);return"thead"===e?pc(t,"caption,colgroup",n):"colgroup"===e?pc(t,"caption",n):Hn(t,n),n}));return $n(n),n}(t,n),a=("colgroup"===n?i:o)(e);Wn(r,a)},u=function(e,n){e.length>0?a(e,n):function(e){Ce(t,e).each(Gn)}(n)},c=[],s=[],l=[],f=[];return R(e,(function(t){switch(t.section){case"thead":c.push(t);break;case"tbody":s.push(t);break;case"tfoot":l.push(t);break;case"colgroup":f.push(t)}})),u(f,"colgroup"),u(c,"thead"),u(s,"tbody"),u(l,"tfoot"),{newRows:n,newCells:r}},gc=function(t,e){if(0===t.length)return 0;var n=t[0];return F(t,(function(t){return!e(n.element,t.element)})).getOr(t.length)},vc=function(t,e,n,r){var o=function(t,e){return t[e]}(t,e),i="colgroup"===o.section;return{colspan:gc(o.cells.slice(n),r),rowspan:i?1:gc(function(t,e){return P(t,(function(t){return gn(t,e)}))}(t.slice(e),n),r)}},bc=function(t,e){var n=P(t,(function(t){return P(t.cells,_)}));return P(t,(function(r,o){var i=H(r.cells,(function(r,i){if(!1===n[o][i]){var a=vc(t,o,i,e);return function(t,e,r,o){for(var i=t;i<t+r;i++)for(var a=e;a<e+o;a++)n[i][a]=!0}(o,i,a.rowspan,a.colspan),[(u=r.element,c=a.rowspan,s=a.colspan,l=r.isNew,{element:u,rowspan:c,colspan:s,isNew:l})]}return[];var u,c,s,l}));return function(t,e,n,r){return{element:t,cells:e,section:n,isNew:r}}(r.element,i,r.section,r.isNew)}))},yc=function(t,e,n){var r=[];R(t.colgroups,(function(o){for(var i=[],a=0;a<t.grid.columns;a++){var u=En.getColumnAt(t,a).map((function(t){return $t(t.element,n,!1)})).getOrThunk((function(){return $t(e.colGap(),!0,!1)}));i.push(u)}r.push(Gt(o.element,i,"colgroup",n))}));for(var o=0;o<t.grid.rows;o++){for(var i=[],a=0;a<t.grid.columns;a++){var u=En.getAt(t,o,a).map((function(t){return $t(t.element,n,t.isLocked)})).getOrThunk((function(){return $t(e.gap(),!0,!1)}));i.push(u)}var c=t.all[o],s=Gt(c.element,i,c.section,n);r.push(s)}return r},_c=function(t){return bc(t,kt)},wc=function(t,e){return q(t.all,(function(t){return B(t.cells,(function(t){return kt(e,t.element)}))}))},xc=function(t,e,n){var r=P(e.selection,(function(e){return nn(e).bind((function(e){return wc(t,e)})).filter(n)})),o=Le(r);return Be(o.length>0,o)},Oc=function(t,e,n,r,o){return function(i,a,u,c,s){var l=En.fromTable(a),f=C.from(null==s?void 0:s.section).getOrThunk(dc);return e(l,u).map((function(e){var n=function(t,e){return yc(t,e,!1)}(l,c),r=t(n,e,kt,o(c),f),i=On(r.grid);return{info:e,grid:_c(r.grid),cursor:r.cursor,lockedColumns:i}})).bind((function(t){var e=hc(a,t.grid),o=C.from(null==s?void 0:s.sizing).getOrThunk((function(){return Ko(a)})),u=C.from(null==s?void 0:s.resize).getOrThunk(Gi);return n(a,t.grid,t.info,{sizing:o,resize:u,section:f}),r(a),Ja(i,a),Re(a,wn),t.lockedColumns.length>0&&Te(a,wn,t.lockedColumns.join(",")),C.some({cursor:t.cursor,newRows:e.newRows,newCells:e.newCells})}))}},Sc=function(t,e){return xc(t,e,w).map((function(t){return{cells:t,generators:e.generators,clipboard:e.clipboard}}))},Cc=function(t,e){return xc(t,e,w)},kc=function(t,e){return xc(t,e,(function(t){return!t.isLocked}))},Ec=function(t,e){return V(e,(function(e){return function(t,e){return wc(t,e).exists((function(t){return!t.isLocked}))}(t,e)}))},Mc=function(t,e){return function(t,e){return e.mergable}(0,e).filter((function(e){return Ec(t,e.cells)}))},Tc=function(t,e){return function(t,e){return e.unmergable}(0,e).filter((function(e){return Ec(t,e)}))},Dc=function(t,e,n,r){for(var o=yn(t).rows,i=!0,a=0;a<o.length;a++)for(var u=0;u<bn(o[0]);u++){var c=o[a],s=gn(c,u),l=n(s.element,e);!0===l&&!1===i?pn(c,u,$t(r(),!0,s.isLocked)):!0===l&&(i=!1)}return t},Ac=function(t,e,n,r){var o=yn(t).rows;if(e>0&&e<o.length){var i=function(t,e){return j(t,(function(t,n){return D(t,(function(t){return e(t.element,n.element)}))?t:t.concat([n])}),[])}(o[e-1].cells,n);R(i,(function(t){for(var i=C.none(),a=e;a<o.length;a++)for(var u=function(e){var u=o[a],c=gn(u,e);n(c.element,t.element)&&(i.isNone()&&(i=C.some(r())),i.each((function(t){pn(u,e,$t(t,!0,c.isLocked))})))},c=0;c<bn(o[0]);c++)u(c)}))}return t},Pc=function(t){return{isValue:w,isError:_,getOr:m(t),getOrThunk:m(t),getOrDie:m(t),or:function(e){return Pc(t)},orThunk:function(e){return Pc(t)},fold:function(e,n){return n(t)},map:function(e){return Pc(e(t))},mapError:function(e){return Pc(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOptional:function(){return C.some(t)}}},Rc=function(t){return{isValue:_,isError:w,getOr:p,getOrThunk:function(t){return t()},getOrDie:function(){return(e=String(t),function(){throw new Error(e)})();var e},or:p,orThunk:function(t){return t()},fold:function(e,n){return e(t)},map:function(e){return Rc(t)},mapError:function(e){return Rc(e(t))},each:d,bind:function(e){return Rc(t)},exists:_,forall:w,toOptional:C.none}},Ic={value:Pc,error:Rc,fromOption:function(t,e){return t.fold((function(){return Rc(e)}),Pc)}},zc=function(t,e){return{rowDelta:0,colDelta:bn(t[0])-bn(e[0])}},Lc=function(t,e){return{rowDelta:t.length-e.length,colDelta:0}},jc=function(t,e,n,r){var o="colgroup"===e.section?n.col:n.cell;return A(t,(function(t){return $t(o(),!0,r(t))}))},Bc=function(t,e,n,r){var o=t[t.length-1];return t.concat(A(e,(function(){var t="colgroup"===o.section?n.colgroup:n.row,e=_n(o,t,p),i=jc(e.cells.length,e,n,(function(t){return Nt(r,t.toString())}));return hn(e,i)})))},Fc=function(t,e,n,r){return P(t,(function(t){var o=jc(e,t,n,_);return dn(t,r,o)}))},Nc=function(t,e,n){var r=e.colDelta<0?Fc:p,o=e.rowDelta<0?Bc:p,i=On(t),a=bn(t[0]),u=D(i,(function(t){return t===a-1})),c=r(t,Math.abs(e.colDelta),n,u?a-1:a),s=On(c);return o(c,Math.abs(e.rowDelta),n,U(s,w))},Hc=function(t,e,n,r){var o=g(r,gn(t[e],n).element),i=t[e];return t.length>1&&bn(i)>1&&(n>0&&o(vn(i,n-1))||n<i.cells.length-1&&o(vn(i,n+1))||e>0&&o(vn(t[e-1],n))||e<t.length-1&&o(vn(t[e+1],n)))},Vc=function(t,e,n){return z(n,(function(n){return n>=t.column&&n<=bn(e[0])+t.column}))},Uc=function(t,e,n,r,o){var i=On(e),a=function(t,e,n){var r=bn(e[0]),o=yn(e).cols.length+t.row,i=A(r-t.column,(function(e){return e+t.column}));return{row:o,column:B(i,(function(t){return V(n,(function(e){return e!==t}))})).getOr(r-1)}}(t,e,i),u=yn(n).rows,c=Vc(a,u,i);return function(t,e,n){if(t.row>=e.length||t.column>bn(e[0]))return Ic.error("invalid start address out of table bounds, row: "+t.row+", column: "+t.column);var r=e.slice(t.row),o=r[0].cells.slice(t.column),i=bn(n[0]),a=n.length;return Ic.value({rowDelta:r.length-a,colDelta:o.length-i})}(a,e,u).map((function(t){var n=X(X({},t),{colDelta:t.colDelta-c.length}),i=Nc(e,n,r),s=On(i),l=Vc(a,u,s);return function(t,e,n,r,o,i){for(var a=t.row,u=t.column,c=a+n.length,s=u+bn(n[0])+i.length,l=U(i,w),f=a;f<c;f++)for(var d=0,m=u;m<s;m++)if(l[m])d++;else{Hc(e,f,m,o)&&Dc(e,vn(e[f],m),o,r.cell);var p=m-u-d,h=gn(n[f-a],p),g=h.element,v=r.replace(g);pn(e[f],m,$t(v,!0,h.isLocked))}return e}(a,i,u,r,o,l)}))},Wc=function(t,e,n,r,o){!function(t,e,n,r){e>0&&e<t[0].cells.length&&R(t,(function(t){var o=t.cells[e-1],i=t.cells[e];n(i.element,o.element)&&pn(t,e,$t(r(),!0,i.isLocked))}))}(e,t,o,r.cell);var i=Lc(n,e),a=Nc(n,i,r),u=Lc(e,a),c=Nc(e,u,r);return P(c,(function(e,n){return dn(e,t,a[n].cells)}))},$c=function(t,e,n,r,o){Ac(e,t,o,r.cell);var i=On(e),a=zc(e,n),u=X(X({},a),{colDelta:a.colDelta-i.length}),c=Nc(e,u,r),s=yn(c),l=s.cols,f=s.rows,d=On(c),m=zc(n,e),p=X(X({},m),{colDelta:m.colDelta+d.length}),h=function(t,e,n){return P(t,(function(t){return j(n,(function(n,r){var o=jc(1,t,e,w)[0];return mn(n,r,o)}),t)}))}(n,r,d),g=Nc(h,p,r);return l.concat(f.slice(0,t)).concat(g).concat(f.slice(t,f.length))},Gc=function(t,e,n,r,o){var i=yn(t),a=i.rows,u=i.cols,c=a.slice(0,e),s=a.slice(e),l=function(t,e,n,r){return _n(t,(function(t){return r(t,n)}),e)}(a[n],(function(t,n){return e>0&&e<a.length&&r(vn(a[e-1],n),vn(a[e],n))?gn(a[e],n):$t(o(t.element,r),!0,t.isLocked)}),r,o);return u.concat(c).concat([l]).concat(s)},Kc=function(t,e,n,r,o){return P(t,(function(t){var i=e>0&&e<bn(t)&&r(vn(t,e-1),vn(t,e)),a=function(t,e,n,r,o,i,a){if("colgroup"!==n&&r)return gn(t,e);var u=gn(t,o);return $t(a(u.element,i),!0,!1)}(t,e,t.section,i,n,r,o);return mn(t,e,a)}))},qc=function(t,e,n,r){return function(t,e,n,r){return void 0!==vn(t[e],n)&&e>0&&r(vn(t[e-1],n),vn(t[e],n))}(t,e,n,r)||function(t,e,n){return e>0&&n(vn(t,e-1),vn(t,e))}(t[e],n,r)},Xc=function(t,e,n,r){var o=function(t){return function(t){return"row"===t?Ye(e):Xe(e)}(t)?t+"group":t};return t?Qu(e)?o(n):null:r&&Qu(e)?o("row"===n?"col":"row"):null},Yc=function(t,e,n){return $t(n(t.element,e),!0,t.isLocked)},Jc=function(t,e,n,r,o,i,a){return P(t,(function(t,u){return function(t,e){var n=t.cells,r=P(n,e);return Gt(t.element,r,t.section,t.isNew)}(t,(function(t,c){if(function(t){return D(e,(function(e){return n(t.element,e.element)}))}(t)){var s=a(t,u,c)?o(t,n,r):t;return i(s,u,c).each((function(t){var e,n;e=s.element,n={scope:C.from(t)},Pt(n,(function(t,n){t.fold((function(){Re(e,n)}),(function(t){Me(e.dom,n,t)}))}))})),s}return t}))}))},Qc=function(t,e,n){return H(t,(function(r,o){return qc(t,o,e,n)?[]:[gn(r,e)]}))},Zc=function(t,e,n,r,o){var i=yn(t).rows,a=H(e,(function(t){return Qc(i,t,r)})),u=P(t,(function(t){return Zu(t.cells)})),c=function(t,e){return V(e,p)&&Zu(t)?w:function(t,n,r){return!("th"===Kt(t.element)&&e[n])}}(a,u),s=function(t,e){return function(n,r){return C.some(Xc(t,n.element,"row",e[r]))}}(n,u);return Jc(t,a,r,o,Yc,s,c)},ts=function(t,e,n,r,o,i,a){var u=yn(t),c=u.cols,s=u.rows,l=s[e[0]],f=H(e,(function(t){return function(t,e,n){var r=t[e];return H(r.cells,(function(r,o){return qc(t,e,o,n)?[]:[r]}))}(s,t,o)})),d=P(l.cells,(function(t,e){return Zu(Qc(s,e,o))})),m=Y([],s,!0);R(e,(function(t){m[t]=a.transformRow(s[t],n)}));var h=c.concat(m),g=function(t,e){return V(e,p)&&Zu(t.cells)?w:function(t,n,r){return!("th"===Kt(t.element)&&e[r])}}(l,d),v=function(t,e){return function(n,r,o){return C.some(Xc(t,n.element,"col",e[o]))}}(r,d);return Jc(h,f,o,i,a.transformCell,v,g)},es=function(t,e,n,r){var o=yn(t).rows,i=P(e,(function(t){return gn(o[t.row],t.column)}));return Jc(t,i,n,r,Yc,C.none,w)},ns=function(t){return j(t,(function(t,e){return D(t,(function(t){return t.column===e.column}))?t:t.concat([e])}),[]).sort((function(t,e){return t.column-e.column}))},rs=ee("col"),os=ee("colgroup"),is=function(t){return"tr"===Kt(t)||os(t)},as=function(t){return{element:t,colspan:Ke(t,"colspan",1),rowspan:Ke(t,"rowspan",1)}},us=function(t){return Pe(t,"scope").map((function(t){return t.substr(0,3)}))},cs=function(t,e){void 0===e&&(e=as);var n=function(n){if(is(n))return os((o={element:n}).element)?t.colgroup(o):t.row(o);var o,i=function(e){return rs(e.element)?t.col(e):t.cell(e)}(e(n));return r=C.some({item:n,replacement:i}),i},r=C.none();return{getOrInit:function(t,e){return r.fold((function(){return n(t)}),(function(r){return e(t,r.item)?r.replacement:n(t)}))}}},ss=function(t){return function(e){var n=[],r=function(r){var o="td"===t?{scope:null}:{},i=e.replace(r,t,o);return n.push({item:r,sub:i}),i};return{replaceOrInit:function(t,e){return is(t)||rs(t)?t:function(t,e){return B(n,(function(n){return e(n.item,t)}))}(t,e).fold((function(){return r(t)}),(function(n){return e(t,n.item)?n.sub:r(t)}))}}}},ls=function(t){return{unmerge:function(e){var n=us(e);return n.each((function(t){return Te(e,"scope",t)})),function(){var r=t.cell({element:e,colspan:1,rowspan:1});return Ge(r,"width"),Ge(e,"width"),n.each((function(t){return Te(r,"scope",t)})),r}},merge:function(t){return Ge(t[0],"width"),function(){var e=Le(P(t,us));if(0===e.length)return C.none();var n=e[0],r=["row","col"];return D(e,(function(t){return t!==n&&T(r,t)}))?C.none():C.from(n)}().fold((function(){return Re(t[0],"scope")}),(function(e){return Te(t[0],"scope",e+"group")})),m(t[0])}}},fs=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],ds=Zn(),ms=function(t){return function(t,e){var n=t.property().name(e);return T(fs,n)}(ds,t)},ps=function(t){return function(t,e){var n=t.property().name(e);return T(["ol","ul"],n)}(ds,t)},hs=function(t){return function(t,e){return T(["br","img","hr","input"],t.property().name(e))}(ds,t)},gs=function(t){var e,n=function(t){return"br"===Kt(t)},r=function(t){return ni(t).bind((function(e){var r=ue(e).map((function(t){return!!ms(t)||!!hs(t)&&"img"!==Kt(t)})).getOr(!1);return oe(e).map((function(o){return!0===r||function(t){return"li"===Kt(t)||Oe(t,ps).isSome()}(o)||n(e)||ms(o)&&!kt(t,o)?[]:[xt.fromTag("br")]}))})).getOr([])},o=0===(e=H(t,(function(t){var e=ce(t);return function(t){return V(t,(function(t){return n(t)||Qt(t)&&0===Xn(t).trim().length}))}(e)?[]:e.concat(r(t))}))).length?[xt.fromTag("br")]:e;$n(t[0]),Wn(t[0],o)},vs=function(t){return Ba(t,!0)},bs=function(t){0===rn(t).length&&Gn(t)},ys=function(t,e){return{grid:t,cursor:e}},_s=function(t,e,n){var r,o,i=yn(t).rows;return C.from(null===(o=null===(r=i[e])||void 0===r?void 0:r.cells[n])||void 0===o?void 0:o.element).filter(vs).orThunk((function(){return function(t){return q(t,(function(t){return q(t.cells,(function(t){var e=t.element;return Be(vs(e),e)}))}))}(i)}))},ws=function(t,e,n){var r=_s(t,e,n);return ys(t,r)},xs=function(t){return j(t,(function(t,e){return D(t,(function(t){return t.row===e.row}))?t:t.concat([e])}),[]).sort((function(t,e){return t.row-e.row}))},Os=function(t,e){return function(n,r,o,i,a){var u=xs(r),c=P(u,(function(t){return t.row})),s=ts(n,c,t,e,o,i.replaceOrInit,a);return ws(s,r[0].row,r[0].column)}},Ss=Os("thead",!0),Cs=Os("tbody",!1),ks=Os("tfoot",!1),Es=function(t,e,n){var r=function(t,e){return sn(t,(function(){return e}))}(t,n.section),o=En.generate(r);return yc(o,e,!0)},Ms=function(t,e,n,r){return function(t,e,n,r){var o=En.generate(e),i=r.getWidths(o,r);ji(o,i,r)}(0,e,0,r.sizing)},Ts=function(t,e,n,r){return function(t,e,n,r,o){var i=En.generate(e),a=r.getWidths(i,r),u=r.pixelWidth(),c=o.calcRedestributedWidths(a,u,n.pixelDelta,r.isRelative),s=c.newSizes,l=c.delta;ji(i,s,r),r.adjustTableWidth(l)}(0,e,n,r.sizing,r.resize)},Ds=function(t,e){return D(e,(function(t){return 0===t.column&&t.isLocked}))},As=function(t,e){return D(e,(function(e){return e.column+e.colspan>=t.grid.columns&&e.isLocked}))},Ps=function(t,e){var n=Br(t),r=ns(e);return j(r,(function(t,e){return t+n[e.column].map(zr).getOr(0)}),0)},Rs=function(t){return function(e,n){return Cc(e,n).filter((function(n){return!(t?Ds:As)(e,n)})).map((function(t){return{details:t,pixelDelta:Ps(e,t)}}))}},Is=function(t){return function(e,n){return Sc(e,n).filter((function(n){return!(t?Ds:As)(e,n.cells)}))}},zs=ss("th"),Ls=ss("td"),js=Oc((function(t,e,n,r){var o=e[0].row,i=xs(e),a=L(i,(function(t,e){return{grid:Gc(t.grid,o,e.row+t.delta,n,r.getOrInit),delta:t.delta+1}}),{grid:t,delta:0}).grid;return ws(a,o,e[0].column)}),Cc,d,d,cs),Bs=Oc((function(t,e,n,r){var o=xs(e),i=o[o.length-1],a=i.row+i.rowspan,u=L(o,(function(t,e){return Gc(t,a,e.row,n,r.getOrInit)}),t);return ws(u,a,e[0].column)}),Cc,d,d,cs),Fs=Oc((function(t,e,n,r){var o=e.details,i=ns(o),a=i[0].column,u=L(i,(function(t,e){return{grid:Kc(t.grid,a,e.column+t.delta,n,r.getOrInit),delta:t.delta+1}}),{grid:t,delta:0}).grid;return ws(u,o[0].row,a)}),Rs(!0),Ts,d,cs),Ns=Oc((function(t,e,n,r){var o=e.details,i=o[o.length-1],a=i.column+i.colspan,u=ns(o),c=L(u,(function(t,e){return Kc(t,a,e.column,n,r.getOrInit)}),t);return ws(c,o[0].row,a)}),Rs(!1),Ts,d,cs),Hs=Oc((function(t,e,n,r){var o=ns(e.details),i=function(t,e){return H(t,(function(t){var n=t.cells,r=L(e,(function(t,e){return e>=0&&e<t.length?t.slice(0,e).concat(t.slice(e+1)):t}),n);return r.length>0?[Gt(t.element,r,t.section,t.isNew)]:[]}))}(t,P(o,(function(t){return t.column}))),a=i.length>0?i[0].cells.length-1:0;return ws(i,o[0].row,Math.min(o[0].column,a))}),(function(t,e){return kc(t,e).map((function(e){return{details:e,pixelDelta:-Ps(t,e)}}))}),Ts,bs,cs),Vs=Oc((function(t,e,n,r){var o=xs(e),i=function(t,e,n){var r=yn(t),o=r.rows;return r.cols.concat(o.slice(0,e)).concat(o.slice(n+1))}(t,o[0].row,o[o.length-1].row),a=i.length>0?i.length-1:0;return ws(i,Math.min(e[0].row,a),e[0].column)}),Cc,d,bs,cs),Us=Oc((function(t,e,n,r){var o=ns(e),i=P(o,(function(t){return t.column})),a=Zc(t,i,!0,n,r.replaceOrInit);return ws(a,e[0].row,e[0].column)}),kc,d,d,zs),Ws=Oc((function(t,e,n,r){var o=ns(e),i=P(o,(function(t){return t.column})),a=Zc(t,i,!1,n,r.replaceOrInit);return ws(a,e[0].row,e[0].column)}),kc,d,d,Ls),$s=Oc(Ss,kc,d,d,zs),Gs=Oc(Cs,kc,d,d,Ls),Ks=Oc(ks,kc,d,d,Ls),qs=Oc((function(t,e,n,r){var o=es(t,e,n,r.replaceOrInit);return ws(o,e[0].row,e[0].column)}),kc,d,d,zs),Xs=Oc((function(t,e,n,r){var o=es(t,e,n,r.replaceOrInit);return ws(o,e[0].row,e[0].column)}),kc,d,d,Ls),Ys=Oc((function(t,e,n,r){var o=e.cells;gs(o);var i=function(t,e,n,r){var o=yn(t).rows;if(0===o.length)return t;for(var i=e.startRow;i<=e.finishRow;i++)for(var a=e.startCol;a<=e.finishCol;a++){var u=o[i],c=gn(u,a).isLocked;pn(u,a,$t(r(),!1,c))}return t}(t,e.bounds,0,r.merge(o));return ys(i,C.from(o[0]))}),Mc,Ms,d,ls),Js=Oc((function(t,e,n,r){var o=L(e,(function(t,e){return Dc(t,e,n,r.unmerge(e))}),t);return ys(o,C.from(e[0]))}),Tc,Ms,d,ls),Qs=Oc((function(t,e,n,r){var o=function(t,e){var n=En.fromTable(t);return yc(n,e,!0)}(e.clipboard,e.generators),i=function(t,e){return{row:t,column:e}}(e.row,e.column);return Uc(i,t,o,e.generators,n).fold((function(){return ys(t,C.some(e.element))}),(function(t){return ws(t,e.row,e.column)}))}),(function(t,e){return nn(e.element).bind((function(n){return wc(t,n).map((function(t){return X(X({},t),{generators:e.generators,clipboard:e.clipboard})}))}))}),Ms,d,cs),Zs=Oc((function(t,e,n,r){var o=yn(t).rows,i=e.cells[0].column,a=o[e.cells[0].row],u=Es(e.clipboard,e.generators,a),c=Wc(i,t,u,e.generators,n);return ws(c,e.cells[0].row,e.cells[0].column)}),Is(!0),d,d,cs),tl=Oc((function(t,e,n,r){var o=yn(t).rows,i=e.cells[e.cells.length-1].column+e.cells[e.cells.length-1].colspan,a=o[e.cells[0].row],u=Es(e.clipboard,e.generators,a),c=Wc(i,t,u,e.generators,n);return ws(c,e.cells[0].row,e.cells[0].column)}),Is(!1),d,d,cs),el=Oc((function(t,e,n,r){var o=yn(t).rows,i=e.cells[0].row,a=o[i],u=Es(e.clipboard,e.generators,a),c=$c(i,t,u,e.generators,n);return ws(c,e.cells[0].row,e.cells[0].column)}),Sc,d,d,cs),nl=Oc((function(t,e,n,r){var o=yn(t).rows,i=e.cells[e.cells.length-1].row+e.cells[e.cells.length-1].rowspan,a=o[e.cells[0].row],u=Es(e.clipboard,e.generators,a),c=$c(i,t,u,e.generators,n);return ws(c,e.cells[0].row,e.cells[0].column)}),Sc,d,d,cs),rl=function(t,e){var n=En.fromTable(t);return Cc(n,e).bind((function(t){var e=t[t.length-1],r=t[0].column,o=e.column+e.colspan,i=N(P(n.all,(function(t){return z(t.cells,(function(t){return t.column>=r&&t.column<o}))})));return nc(i)})).getOr("")},ol=function(t,e){var n=En.fromTable(t);return Cc(n,e).bind(nc).getOr("")},il=function(t,e){var n=En.fromTable(t);return Cc(n,e).bind((function(t){var e=t[t.length-1],r=t[0].row,o=e.row+e.rowspan;return function(t){var e=P(t,(function(t){return ec(t).type})),n=T(e,"header"),r=T(e,"footer");if(n||r){var o=T(e,"body");return!n||o||r?n||o||!r?C.none():C.some("footer"):C.some("header")}return C.some("body")}(n.all.slice(r,o))})).getOr("")},al=function(t,e,n){var r=function(t){return"table"===Kt(pi(t))},o=Iu(t),i=Ru(t)?d:Ju,a=function(e){switch(Du(t)){case"section":return sc();case"sectionCells":return lc();case"cells":return fc();default:return cc(e,"section")}},u=function(n,r){return r.cursor.fold((function(){var r=rn(n);return G(r).filter(ge).map((function(r){e.clear(n);var o=t.dom.createRng();return o.selectNode(r.dom),t.selection.setRng(o),Te(r,"data-mce-selected","1"),o}))}),(function(r){var o=Xu(Yu,r),i=t.dom.createRng();return i.setStart(o.element.dom,o.offset),i.setEnd(o.element.dom,o.offset),t.selection.setRng(i),e.clear(n),C.some(i)}))},c=function(e,n,r,i,c){return function(s,l,f){void 0===f&&(f=!1),yi(s);var d=i(),m=xt.fromDom(t.getDoc()),p=fi(r,m,o),h={sizing:ju(t,s),resize:Ru(t)?$i():Gi(),section:a(s)};return n(s)?e(d,s,l,p,h).bind((function(e){R(e.newRows,(function(e){ou(t,e.dom)})),R(e.newCells,(function(e){iu(t,e.dom)}));var n=u(s,e);return ge(s)&&(yi(s),f||au(t,s.dom,c)),n.map((function(t){return{rng:t,effect:c}}))})):C.none()}};return{deleteRow:c(Vs,(function(e){return!1===r(t)||sa(e).rows>1}),d,n,cu),deleteColumn:c(Hs,(function(e){return!1===r(t)||sa(e).columns>1}),d,n,cu),insertRowsBefore:c(js,w,d,n,cu),insertRowsAfter:c(Bs,w,d,n,cu),insertColumnsBefore:c(Fs,w,i,n,cu),insertColumnsAfter:c(Ns,w,i,n,cu),mergeCells:c(Ys,w,d,n,cu),unmergeCells:c(Js,w,d,n,cu),pasteColsBefore:c(Zs,w,d,n,cu),pasteColsAfter:c(tl,w,d,n,cu),pasteRowsBefore:c(el,w,d,n,cu),pasteRowsAfter:c(nl,w,d,n,cu),pasteCells:c(Qs,w,d,n,su),makeCellsHeader:c(qs,w,d,n,cu),unmakeCellsHeader:c(Xs,w,d,n,cu),makeColumnsHeader:c(Us,w,d,n,cu),unmakeColumnsHeader:c(Ws,w,d,n,cu),makeRowsHeader:c($s,w,d,n,cu),makeRowsBody:c(Gs,w,d,n,cu),makeRowsFooter:c(Ks,w,d,n,cu),getTableRowType:il,getTableCellType:ol,getTableColType:rl}},ul={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},cl=function(t){var e=xt.fromTag("colgroup");return A(t,(function(){return Hn(e,xt.fromTag("col"))})),e},sl=function(t,e,n,r){return A(t,(function(t){return function(t,e,n,r){for(var o=xt.fromTag("tr"),i=0;i<t;i++){var a=r<e||i<n?xt.fromTag("th"):xt.fromTag("td");i<n&&Te(a,"scope","row"),r<e&&Te(a,"scope","col"),Hn(a,xt.fromTag("br")),Hn(o,a)}return o}(e,n,r,t)}))},ll=function(t,e){t.selection.select(e.dom,!0),t.selection.collapse(!0)},fl=function(t,e,n,o,i){var a=yu(t),u={styles:a,attributes:bu(t),colGroups:Tu(t)};return t.undoManager.ignore((function(){var r=function(t,e,n,r,o,i){void 0===i&&(i=ul);var a=xt.fromTag("table"),u="cells"!==o;Ve(a,i.styles),De(a,i.attributes),i.colGroups&&Hn(a,cl(e));var c=Math.min(t,n);if(u&&n>0){var s=xt.fromTag("thead");Hn(a,s);var l=sl(n,e,"sectionCells"===o?c:0,r);Wn(s,l)}var f=xt.fromTag("tbody");Hn(a,f);var d=sl(u?t-c:t,e,u?0:n,r);return Wn(f,d),a}(n,e,i,o,Du(t),u);Te(r,"data-mce-id","__mce");var a=function(t){var e=xt.fromTag("div"),n=xt.fromDom(t.dom.cloneNode(!0));return Hn(e,n),function(t){return t.dom.innerHTML}(e)}(r);t.insertContent(a),t.addVisual()})),ke(pi(t),'table[data-mce-id="__mce"]').map((function(e){return Eu(t)?Nu(e):Mu(t)?Hu(e):(ku(t)||function(t){return r(t)&&-1!==t.indexOf("%")}(a.width))&&Fu(e),yi(e),Re(e,"data-mce-id"),function(t,e){R(we(e,"tr"),(function(e){ou(t,e.dom),R(we(e,"th,td"),(function(e){iu(t,e.dom)}))}))}(t,e),function(t,e){ke(e,"td,th").each(g(ll,t))}(t,e),e.dom})).getOr(null)},dl=function(t,e,n,r,o){void 0===r&&(r={});var i=function(t){return f(t)&&t>0};if(i(e)&&i(n)){var a=r.headerRows||0,u=r.headerColumns||0;return fl(t,n,e,u,a)}return null},ml=function(t){return function(){return t().fold((function(){return[]}),(function(t){return P(t,(function(t){return t.dom}))}))}},pl=function(t){return function(e){var n=e.length>0?C.some(mi(e)):C.none();t(n)}},hl=function(t){return function(e,n,r){void 0===r&&(r={});var o=dl(t,n,e,r);return t.undoManager.add(),o}},gl=function(t,e,n){var r=Ke(t,e,1);1===n||r<=1?Re(t,e):Te(t,e,Math.min(n,r))},vl=function(t,e){var n=En.fromTable(t);return kc(n,e).map((function(t){var e=t[t.length-1],r=t[0].column,o=e.column+e.colspan,i=function(t,e,n){if(En.hasColumns(t)){var r=z(En.justColumns(t),(function(t){return t.column>=e&&t.column<n})),o=P(r,(function(t){var r=Sr(t.element);return gl(r,"span",n-e),r})),i=xt.fromTag("colgroup");return Wn(i,o),[i]}return[]}(n,r,o),a=function(t,e,n){return P(t.all,(function(t){var r=z(t.cells,(function(t){return t.column>=e&&t.column<n})),o=P(r,(function(t){var r=Sr(t.element);return gl(r,"colspan",n-e),r})),i=xt.fromTag("tr");return Wn(i,o),i}))}(n,r,o);return Y(Y([],i,!0),a,!0)}))},bl=function(t,e,n){var r=En.fromTable(t);return Cc(r,e).bind((function(t){var e=yc(r,n,!1),o=yn(e).rows.slice(t[0].row,t[t.length-1].row+t[t.length-1].rowspan),i=H(o,(function(t){var e=z(t.cells,(function(t){return!t.isLocked}));return e.length>0?[X(X({},t),{cells:e})]:[]})),a=_c(i);return Be(a.length>0,a)})).map((function(t){return function(t){return P(t,(function(t){var e=Or(t.element);return R(t.cells,(function(t){var n=Sr(t.element);mc(n,"colspan",t.colspan,1),mc(n,"rowspan",t.rowspan,1),Hn(e,n)})),e}))}(t)}))},yl=tinymce.util.Tools.resolve("tinymce.util.Tools"),_l=function(t,e,n){return function(e,r){for(var o=0;o<r.length;o++){var i=t.getStyle(r[o],n);if(void 0===e&&(e=i),e!==i)return""}return e}(void 0,t.select("td,th",e))},wl=function(t,e,n){n&&t.formatter.apply("align"+n,{},e)},xl=function(t,e){yl.each("left center right".split(" "),(function(n){t.formatter.remove("align"+n,{},e)}))},Ol=[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}],Sl=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Cl=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,kl=function(t){return(e=t,n="#",ot(e,n)?function(t,e){return t.substring(e)}(e,n.length):e).toUpperCase();var e,n},El=function(t){return function(t){return Sl.test(t)||Cl.test(t)}(t)?C.some({value:kl(t)}):C.none()},Ml=function(t){var e=t.toString(16);return(1===e.length?"0"+e:e).toUpperCase()},Tl=function(t){return function(t){return{value:t}}(Ml(t.red)+Ml(t.green)+Ml(t.blue))},Dl=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,Al=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,Pl=function(t,e,n,r){return{red:t,green:e,blue:n,alpha:r}},Rl=function(t,e,n,r){var o=parseInt(t,10),i=parseInt(e,10),a=parseInt(n,10),u=parseFloat(r);return Pl(o,i,a,u)},Il=function(t){return El(t).orThunk((function(){return function(t){if("transparent"===t)return C.some(Pl(0,0,0,0));var e=Dl.exec(t);if(null!==e)return C.some(Rl(e[1],e[2],e[3],"1"));var n=Al.exec(t);return null!==n?C.some(Rl(n[1],n[2],n[3],n[4])):C.none()}(t).map(Tl)})).getOrThunk((function(){var e=document.createElement("canvas");e.height=1,e.width=1;var n=e.getContext("2d");n.clearRect(0,0,e.width,e.height),n.fillStyle="#FFFFFF",n.fillStyle=t,n.fillRect(0,0,1,1);var r=n.getImageData(0,0,1,1).data,o=r[0],i=r[1],a=r[2],u=r[3];return Tl(Pl(o,i,a,u))}))},zl=function(t){var e=t;return{get:function(){return e},set:function(t){e=t}}},Ll=function(t){var e=zl(C.none()),n=function(){return e.get().each(t)};return{clear:function(){n(),e.set(C.none())},isSet:function(){return e.get().isSome()},get:function(){return e.get()},set:function(t){n(),e.set(C.some(t))}}},jl=function(){var t=Ll(d);return X(X({},t),{on:function(e){return t.get().each(e)}})},Bl=function(t,e,n,r){return function(o){var i=Ll((function(t){return t.unbind()})),a=!ut(r),u=function(){var u=Ti(e),c=function(e){return t.formatter.match(n,{value:r},e.dom,a)};a?(o.setActive(!D(u,c)),i.set(t.formatter.formatChanged(n,(function(t){return o.setActive(!t)}),!0))):(o.setActive(V(u,c)),i.set(t.formatter.formatChanged(n,o.setActive,!1,{value:r})))};return t.initialized?u():t.on("init",u),i.clear}},Fl=function(t){return Ht(t,"menu")},Nl=function(t){return P(t,(function(t){var e=t.text||t.title;return Fl(t)?{text:e,items:Nl(t.menu)}:{text:e,value:t.value}}))},Hl=function(t,e,n,r,o){return P(n,(function(n){var i=n.text||n.title;return Fl(n)?{type:"nestedmenuitem",text:i,getSubmenuItems:function(){return Hl(t,e,n.menu,r,o)}}:{text:i,type:"togglemenuitem",onAction:function(){return o(n.value)},onSetup:Bl(t,e,r,n.value)}}))},Vl=function(t,e){return function(n){var r;t.execCommand("mceTableApplyCellStyle",!1,((r={})[e]=n,r))}},Ul=function(t){return H(t,(function(t){return Fl(t)?[X(X({},t),{menu:Ul(t.menu)})]:ut(t.value)?[t]:[]}))},Wl=function(t,e,n,r,o){return function(i){return i(Hl(t,e,n,r,o))}},$l=function(t,e,n){var r=P(e,(function(t){return{text:t.title,value:"#"+Il(t.value).value,type:"choiceitem"}}));return[{type:"fancymenuitem",fancytype:"colorswatch",initData:{colors:r.length>0?r:void 0,allowCustomColors:!1},onAction:function(e){var r,o="remove"===e.value?"":e.value;t.execCommand("mceTableApplyCellStyle",!1,((r={})[n]=o,r))}}]},Gl=function(t){return function(){var e="header"===t.queryCommandValue("mceTableRowType")?"body":"header";t.execCommand("mceTableRowType",!1,{type:e})}},Kl=function(t){return function(){var e="th"===t.queryCommandValue("mceTableColType")?"td":"th";t.execCommand("mceTableColType",!1,{type:e})}},ql=[{name:"width",type:"input",label:"Width"},{name:"height",type:"input",label:"Height"},{name:"celltype",type:"listbox",label:"Cell type",items:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{name:"scope",type:"listbox",label:"Scope",items:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{name:"halign",type:"listbox",label:"Horizontal align",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{name:"valign",type:"listbox",label:"Vertical align",items:Ol}],Xl=function(t){return ql.concat(function(t){var e=Nl(Su(t));return e.length>0?C.some({name:"class",type:"listbox",label:"Class",items:e}):C.none()}(t).toArray())},Yl=function(t,e){var n=[{name:"borderstyle",type:"listbox",label:"Border style",items:[{text:"Select...",value:""}].concat(Nl(vu(t)))},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}];return{title:"Advanced",name:"advanced",items:"cell"===e?[{name:"borderwidth",type:"input",label:"Border width"}].concat(n):n}},Jl=function(t){return function(e,n){var r=e.dom;return{setAttrib:function(e,o){t&&!o||r.setAttrib(n,e,o)},setStyle:function(e,o){t&&!o||r.setStyle(n,e,o)},setFormat:function(r,o){t&&!o||(""===o?e.formatter.remove(r,{value:null},n,!0):e.formatter.apply(r,{value:o},n))}}}},Ql={normal:Jl(!1),ifTruthy:Jl(!0)},Zl=function(t){return function(e){return ot(e,"rgb")?t.toHex(e):e}},tf=function(t,e){var n=xt.fromDom(e);return{borderwidth:$e(n,"border-width").getOr(""),borderstyle:$e(n,"border-style").getOr(""),bordercolor:$e(n,"border-color").map(Zl(t)).getOr(""),backgroundcolor:$e(n,"background-color").map(Zl(t)).getOr("")}},ef=function(t){var e=t[0],n=t.slice(1);return R(n,(function(t){R(Dt(e),(function(n){Pt(t,(function(t,r){var o=e[n];""!==o&&n===r&&o!==t&&(e[n]="")}))}))})),e},nf=function(t,e,n,r){return B(t,(function(t){return!c(n.formatter.matchNode(r,e+t))})).getOr("")},rf=g(nf,["left","center","right"],"align"),of=g(nf,["top","middle","bottom"],"valign"),af=function(t){return an(xt.fromDom(t)).map((function(e){var n={selection:mi(t.cells)};return il(e,n)})).getOr("")},uf=function(t,e){var n=En.fromTable(t),r=En.justCells(n),o=z(r,(function(t){return D(e,(function(e){return kt(t.element,e)}))}));return P(o,(function(t){return{element:t.element.dom,column:En.getColumnAt(n,t.column).map((function(t){return t.element.dom}))}}))},cf=function(t,e,n){var r=1===e.length;R(e,(function(e){var o=e.element,i=r?Ql.normal(t,o):Ql.ifTruthy(t,o);!function(t,e,n){t.setAttrib("scope",n.scope),t.setAttrib("class",n.class),t.setStyle("height",bi(n.height)),e.setStyle("width",bi(n.width))}(i,e.column.map((function(e){return r?Ql.normal(t,e):Ql.ifTruthy(t,e)})).getOr(i),n),_u(t)&&function(t,e){t.setFormat("tablecellbackgroundcolor",e.backgroundcolor),t.setFormat("tablecellbordercolor",e.bordercolor),t.setFormat("tablecellborderstyle",e.borderstyle),t.setFormat("tablecellborderwidth",bi(e.borderwidth))}(i,n),r&&(xl(t,o),function(t,e){yl.each("top middle bottom".split(" "),(function(n){t.formatter.remove("valign"+n,{},e)}))}(t,o)),n.halign&&wl(t,o,n.halign),n.valign&&function(t,e,n){n&&t.formatter.apply("valign"+n,{},e)}(t,o,n.valign)}))},sf=function(t,e,n,r){var o=r.getData();r.close(),t.undoManager.transact((function(){!function(t,e,n,r){var o=zt(r,(function(t,e){return n[e]!==t}));Bt(o)>0&&e.length>=1&&an(e[0]).each((function(n){var i=uf(n,e),a=Bt(zt(o,(function(t,e){return"scope"!==e&&"celltype"!==e})))>0,u=Nt(o,"celltype");(a||Nt(o,"scope"))&&cf(t,i,r),u&&function(t,e){t.execCommand("mceTableCellType",!1,{type:e.celltype,no_events:!0})}(t,r),au(t,n.dom,{structure:u,style:a})}))}(t,e,n,o),t.focus()}))},lf=function(t,e){var n=an(e[0]).map((function(n){return P(uf(n,e),(function(e){return function(t,e,n,r){var o,i=t.dom,a=r.getOr(e),u=function(t,e){return i.getStyle(t,e)||i.getAttrib(t,e)};return X({width:u(a,"width"),height:u(e,"height"),scope:i.getAttrib(e,"scope"),celltype:(o=e,o.nodeName.toLowerCase()),class:i.getAttrib(e,"class",""),halign:rf(t,e),valign:of(t,e)},n?tf(i,e):{})}(t,e.element,_u(t),e.column)}))}));return ef(n.getOrDie())},ff=function(t,e){var n=Ti(e);if(0!==n.length){var r=lf(t,n),o={type:"tabpanel",tabs:[{title:"General",name:"general",items:Xl(t)},Yl(t,"cell")]},i={type:"panel",items:[{type:"grid",columns:2,items:Xl(t)}]};t.windowManager.open({title:"Cell Properties",size:"normal",body:_u(t)?o:i,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r,onSubmit:g(sf,t,n,r)})}},df=[{type:"listbox",name:"type",label:"Row type",items:[{text:"Header",value:"header"},{text:"Body",value:"body"},{text:"Footer",value:"footer"}]},{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height",type:"input"}],mf=function(t){return df.concat(function(t){var e=Nl(function(t){return t.getParam("table_row_class_list",[],"array")}(t));return e.length>0?C.some({name:"class",type:"listbox",label:"Class",items:e}):C.none()}(t).toArray())},pf=function(t,e,n,r){var o=1===e.length;R(e,(function(e){var i=o?Ql.normal(t,e):Ql.ifTruthy(t,e);!function(t,e){t.setAttrib("class",e.class),t.setStyle("height",bi(e.height))}(i,n),wu(t)&&function(t,e){t.setStyle("background-color",e.backgroundcolor),t.setStyle("border-color",e.bordercolor),t.setStyle("border-style",e.borderstyle)}(i,n),n.align!==r.align&&(xl(t,e),wl(t,e,n.align))}))},hf=function(t,e,n,r){var o=r.getData();r.close(),t.undoManager.transact((function(){!function(t,e,n,r){var o=zt(r,(function(t,e){return n[e]!==t}));if(Bt(o)>0){var i=Nt(o,"type"),a=!i||Bt(o)>1;a&&pf(t,e,r,n),i&&function(t,e){t.execCommand("mceTableRowType",!1,{type:e.type,no_events:!0})}(t,r),an(xt.fromDom(e[0])).each((function(e){return au(t,e.dom,{structure:i,style:a})}))}}(t,e,n,o),t.focus()}))},gf=function(t){var e,n,r,o,i=(e=_i(t),n=Si.selected,r=Mi(e),o=r.bind((function(t){return an(t)})).map((function(t){return un(t)})),je(r,o,(function(t,e){return z(e,(function(e){return D(mi(e.dom.cells),(function(e){return"1"===Ae(e,n)||kt(e,t)}))}))})).getOr([]));if(0!==i.length){var a=P(i,(function(e){return function(t,e,n){var r=t.dom;return X({height:r.getStyle(e,"height")||r.getAttrib(e,"height"),class:r.getAttrib(e,"class",""),type:af(e),align:rf(t,e)},n?tf(r,e):{})}(t,e.dom,wu(t))})),u=ef(a),c={type:"tabpanel",tabs:[{title:"General",name:"general",items:mf(t)},Yl(t,"row")]},s={type:"panel",items:[{type:"grid",columns:2,items:mf(t)}]};t.windowManager.open({title:"Row Properties",size:"normal",body:wu(t)?c:s,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:u,onSubmit:g(hf,t,P(i,(function(t){return t.dom})),u)})}},vf=function(t,e,n){var r=n?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[],o=function(t){return t.getParam("table_appearance_options",!0,"boolean")}(t)?[{type:"input",name:"cellspacing",label:"Cell spacing",inputMode:"numeric"},{type:"input",name:"cellpadding",label:"Cell padding",inputMode:"numeric"},{type:"input",name:"border",label:"Border width"},{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[],i=e.length>0?[{type:"listbox",name:"class",label:"Class",items:e}]:[];return r.concat([{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}]).concat(o).concat([{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]).concat(i)},bf=function(t,e,n,o){if("TD"===e.tagName||"TH"===e.tagName)r(n)?t.setStyle(e,n,o):t.setStyle(e,n);else if(e.children)for(var i=0;i<e.children.length;i++)bf(t,e.children[i],n,o)},yf=function(t,e,n,r){var o=t.dom,i=r.getData(),a=zt(i,(function(t,e){return n[e]!==t}));r.close(),""===i.class&&delete i.class,t.undoManager.transact((function(){if(!e){var n=parseInt(i.cols,10)||1,r=parseInt(i.rows,10)||1;e=fl(t,n,r,0,0)}if(Bt(a)>0){!function(t,e,n){var r=t.dom,o={},i={};if(o.class=n.class,i.height=bi(n.height),r.getAttrib(e,"width")&&!Ou(t)?o.width=function(t){return t?t.replace(/px$/,""):""}(n.width):i.width=bi(n.width),Ou(t)?(i["border-width"]=bi(n.border),i["border-spacing"]=bi(n.cellspacing)):(o.border=n.border,o.cellpadding=n.cellpadding,o.cellspacing=n.cellspacing),Ou(t)&&e.children)for(var a=0;a<e.children.length;a++)bf(r,e.children[a],{"border-width":bi(n.border),padding:bi(n.cellpadding)}),xu(t)&&bf(r,e.children[a],{"border-color":n.bordercolor});xu(t)&&(i["background-color"]=n.backgroundcolor,i["border-color"]=n.bordercolor,i["border-style"]=n.borderstyle),o.style=r.serializeStyle(X(X({},yu(t)),i)),r.setAttribs(e,X(X({},bu(t)),o))}(t,e,i);var u=o.select("caption",e)[0];(u&&!i.caption||!u&&i.caption)&&t.execCommand("mceTableToggleCaption"),""===i.align?xl(t,e):wl(t,e,i.align)}if(t.focus(),t.addVisual(),Bt(a)>0){var c=Nt(a,"caption"),s=!c||Bt(a)>1;au(t,e,{structure:c,style:s})}}))},_f=function(t,e){var n,r=t.dom,o=function(t,e){var n,r,o,i,a=yu(t),u=bu(t),c=e?(n=t.dom,{borderstyle:Ft(a,"border-style").getOr(""),bordercolor:Zl(n)(Ft(a,"border-color").getOr("")),backgroundcolor:Zl(n)(Ft(a,"background-color").getOr(""))}):{};return X(X(X(X(X(X({},{height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,class:"",align:"",border:""}),a),u),c),(i=a["border-width"],Ou(t)&&i?{border:i}:Ft(u,"border").fold((function(){return{}}),(function(t){return{border:t}})))),(r=Ft(a,"border-spacing").or(Ft(u,"cellspacing")).fold((function(){return{}}),(function(t){return{cellspacing:t}})),o=Ft(a,"border-padding").or(Ft(u,"cellpadding")).fold((function(){return{}}),(function(t){return{cellpadding:t}})),X(X({},r),o)))}(t,xu(t));!1===e?(n=r.getParent(t.selection.getStart(),"table",t.getBody()))?o=function(t,e,n){var r=t.dom,o=Ou(t)?r.getStyle(e,"border-spacing")||r.getAttrib(e,"cellspacing"):r.getAttrib(e,"cellspacing")||r.getStyle(e,"border-spacing"),i=Ou(t)?_l(r,e,"padding")||r.getAttrib(e,"cellpadding"):r.getAttrib(e,"cellpadding")||_l(r,e,"padding");return X({width:r.getStyle(e,"width")||r.getAttrib(e,"width"),height:r.getStyle(e,"height")||r.getAttrib(e,"height"),cellspacing:o,cellpadding:i,border:function(e,n){var r=$e(xt.fromDom(n),"border-width");return Ou(t)&&r.isSome()?r.getOr(""):e.getAttrib(n,"border")||_l(t.dom,n,"border-width")||_l(t.dom,n,"border")}(r,e),caption:!!r.select("caption",e)[0],class:r.getAttrib(e,"class",""),align:rf(t,e)},n?tf(r,e):{})}(t,n,xu(t)):xu(t)&&(o.borderstyle="",o.bordercolor="",o.backgroundcolor=""):(o.cols="1",o.rows="1",xu(t)&&(o.borderstyle="",o.bordercolor="",o.backgroundcolor=""));var i=Nl(Cu(t));i.length>0&&o.class&&(o.class=o.class.replace(/\s*mce\-item\-table\s*/g,""));var a={type:"grid",columns:2,items:vf(t,i,e)},u=xu(t)?{type:"tabpanel",tabs:[{title:"General",name:"general",items:[a]},Yl(t,"table")]}:{type:"panel",items:[a]};t.windowManager.open({title:"Table Properties",size:"normal",body:u,onSubmit:g(yf,t,n,o),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o})},wf=function(t){return Ei(_i(t),vi(t))},xf=function(t,e,n,i,a){var u=vi(t),c=function(t){return an(t,u)},s=function(e){return function(t){return Mi(_i(t),vi(t))}(t).bind((function(t){return c(t).map((function(n){return e(n,t)}))}))},l=function(e){t.focus()},f=function(t,e){return void 0===e&&(e=!1),s((function(n,r){var o=Ci(i,n,r);t(n,o,e).each(l)}))},m=function(){return s((function(e,n){var r=Ci(i,e,n),o=fi(d,xt.fromDom(t.getDoc()),C.none());return bl(e,r,o)}))},p=function(){return s((function(t,e){var n=Ci(i,t,e);return vl(t,n)}))},h=function(e,n){return n().each((function(n){var r=P(n,(function(t){return Sr(t)}));s((function(n,o){var a=di(xt.fromDom(t.getDoc())),u=function(t,e,n,r){return{selection:wi(t),clipboard:n,generators:r}}(i,0,r,a);e(n,u).each(l)}))}))},v=function(t){return function(e,n){return Ft(n,"type").each((function(e){f(t(e),n.no_events)}))}};Pt({mceTableSplitCells:function(){return f(e.unmergeCells)},mceTableMergeCells:function(){return f(e.mergeCells)},mceTableInsertRowBefore:function(){return f(e.insertRowsBefore)},mceTableInsertRowAfter:function(){return f(e.insertRowsAfter)},mceTableInsertColBefore:function(){return f(e.insertColumnsBefore)},mceTableInsertColAfter:function(){return f(e.insertColumnsAfter)},mceTableDeleteCol:function(){return f(e.deleteColumn)},mceTableDeleteRow:function(){return f(e.deleteRow)},mceTableCutCol:function(){return p().each((function(t){a.setColumns(t),f(e.deleteColumn)}))},mceTableCutRow:function(){return m().each((function(t){a.setRows(t),f(e.deleteRow)}))},mceTableCopyCol:function(){return p().each((function(t){return a.setColumns(t)}))},mceTableCopyRow:function(){return m().each((function(t){return a.setRows(t)}))},mceTablePasteColBefore:function(){return h(e.pasteColsBefore,a.getColumns)},mceTablePasteColAfter:function(){return h(e.pasteColsAfter,a.getColumns)},mceTablePasteRowBefore:function(){return h(e.pasteRowsBefore,a.getRows)},mceTablePasteRowAfter:function(){return h(e.pasteRowsAfter,a.getRows)},mceTableDelete:function(){return wf(t).each((function(e){an(e,u).filter(y(u)).each((function(e){var n=xt.fromText("");if(Fn(e,n),Gn(e),t.dom.isEmpty(t.getBody()))t.setContent(""),t.selection.setCursorLocation();else{var r=t.dom.createRng();r.setStart(n.dom,0),r.setEnd(n.dom,0),t.selection.setRng(r),t.nodeChanged()}}))}))},mceTableCellToggleClass:function(e,n){s((function(e){var r=Ti(i),o=V(r,(function(e){return t.formatter.match("tablecellclass",{value:n},e.dom)}))?t.formatter.remove:t.formatter.apply;R(r,(function(t){return o("tablecellclass",{value:n},t.dom)})),au(t,e.dom,uu)}))},mceTableToggleClass:function(e,n){s((function(e){t.formatter.toggle("tableclass",{value:n},e.dom),au(t,e.dom,uu)}))},mceTableToggleCaption:function(){wf(t).each((function(e){an(e,u).each((function(n){Ce(n,"caption").fold((function(){var e=xt.fromTag("caption");Hn(e,xt.fromText("Caption")),function(t,e,n){se(t,n).fold((function(){Hn(t,e)}),(function(t){Bn(t,e)}))}(n,e,0),t.selection.setCursorLocation(e.dom,0)}),(function(r){ee("caption")(e)&&Ct("td",n).each((function(e){return t.selection.setCursorLocation(e.dom,0)})),Gn(r)})),au(t,n.dom,cu)}))}))},mceTableSizingMode:function(e,n){return function(e){return wf(t).each((function(n){Mu(t)||Eu(t)||ku(t)||an(n,u).each((function(n){"relative"!==e||aa(n)?"fixed"!==e||ua(n)?"responsive"!==e||ca(n)||Hu(n):Nu(n):Fu(n),yi(n),au(t,n.dom,cu)}))}))}(n)},mceTableCellType:v((function(t){return"th"===t?e.makeCellsHeader:e.unmakeCellsHeader})),mceTableColType:v((function(t){return"th"===t?e.makeColumnsHeader:e.unmakeColumnsHeader})),mceTableRowType:v((function(t){switch(t){case"header":return e.makeRowsHeader;case"footer":return e.makeRowsFooter;default:return e.makeRowsBody}}))},(function(e,n){return t.addCommand(n,e)})),Pt({mceTableProps:g(_f,t,!1),mceTableRowProps:g(gf,t),mceTableCellProps:g(ff,t,i)},(function(e,n){return t.addCommand(n,(function(){return e()}))})),t.addCommand("mceInsertTable",(function(e,n){o(n)&&Dt(n).length>0?dl(t,n.rows,n.columns,n.options):_f(t,!0)})),t.addCommand("mceTableApplyCellStyle",(function(e,n){var a=function(t){return"tablecell"+t.toLowerCase().replace("-","")};if(o(n)){var u=Ti(i);if(0!==u.length){var s=zt(n,(function(e,n){return t.formatter.has(a(n))&&r(e)}));(function(t){for(var e in t)if(At.call(t,e))return!1;return!0})(s)||(Pt(s,(function(e,n){R(u,(function(r){Ql.normal(t,r.dom).setFormat(a(n),e)}))})),c(u[0]).each((function(e){return au(t,e.dom,uu)})))}}}))},Of={remove_similar:!0,inherit:!1},Sf=X({selector:"td,th"},Of),Cf={tablecellbackgroundcolor:X({styles:{backgroundColor:"%value"}},Sf),tablecellverticalalign:X({styles:{"vertical-align":"%value"}},Sf),tablecellbordercolor:X({styles:{borderColor:"%value"}},Sf),tablecellclass:X({classes:["%value"]},Sf),tableclass:X({selector:"table",classes:["%value"]},Of),tablecellborderstyle:X({styles:{borderStyle:"%value"}},Sf),tablecellborderwidth:X({styles:{borderWidth:"%value"}},Sf)},kf=hr([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),Ef=X(X({},kf),{none:function(t){return void 0===t&&(t=void 0),kf.none(t)}}),Mf=function(t,e,n,r,o){void 0===o&&(o=w);var i=1===r;if(!i&&n<=0)return Ef.first(t[0]);if(i&&n>=t.length-1)return Ef.last(t[t.length-1]);var a=n+r,u=t[a];return o(u)?Ef.middle(e,u):Mf(t,e,a,r,o)},Tf=function(t,e){return an(t,e).bind((function(e){var n=rn(e);return F(n,(function(e){return kt(t,e)})).map((function(t){return{index:t,all:n}}))}))},Df=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},Af=hr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Pf={before:Af.before,on:Af.on,after:Af.after,cata:function(t,e,n,r){return t.fold(e,n,r)},getStart:function(t){return t.fold(p,p,p)}},Rf=hr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),If={domRange:Rf.domRange,relative:Rf.relative,exact:Rf.exact,exactFromRange:function(t){return Rf.exact(t.start,t.soffset,t.finish,t.foffset)},getWin:function(t){var e,n=function(t){return t.match({domRange:function(t){return xt.fromDom(t.startContainer)},relative:function(t,e){return Pf.getStart(t)},exact:function(t,e,n,r){return t}})}(t);return e=n,xt.fromDom(re(e).dom.defaultView)},range:Df},zf=function(t,e){var n=t.document.createRange();return n.selectNode(e.dom),n},Lf=function(t,e){var n=t.document.createRange();return jf(n,e),n},jf=function(t,e){return t.selectNodeContents(e.dom)},Bf=function(t,e,n){var r,o=t.document.createRange();return r=o,e.fold((function(t){r.setStartBefore(t.dom)}),(function(t,e){r.setStart(t.dom,e)}),(function(t){r.setStartAfter(t.dom)})),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)}))}(o,n),o},Ff=function(t,e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},Nf=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}},Hf=hr([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Vf=function(t,e,n){return e(xt.fromDom(n.startContainer),n.startOffset,xt.fromDom(n.endContainer),n.endOffset)},Uf=function(t,e){return function(t,e){var n=e.ltr();return n.collapsed?e.rtl().filter((function(t){return!1===t.collapsed})).map((function(t){return Hf.rtl(xt.fromDom(t.endContainer),t.endOffset,xt.fromDom(t.startContainer),t.startOffset)})).getOrThunk((function(){return Vf(0,Hf.ltr,n)})):Vf(0,Hf.ltr,n)}(0,function(t,e){return e.match({domRange:function(t){return{ltr:m(t),rtl:C.none}},relative:function(e,n){return{ltr:J((function(){return Bf(t,e,n)})),rtl:J((function(){return C.some(Bf(t,n,e))}))}},exact:function(e,n,r,o){return{ltr:J((function(){return Ff(t,e,n,r,o)})),rtl:J((function(){return C.some(Ff(t,r,o,e,n))}))}}})}(t,e))},Wf=function(t,e){return Uf(t,e).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}})};Hf.ltr,Hf.rtl;var $f=function(t,e,n){return e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom},Gf=function(t,e,n,r,o){var i=function(n){var r=t.dom.createRange();return r.setStart(e.dom,n),r.collapse(!0),r},a=Xn(e).length,u=function(t,e,n,r,o){if(0===o)return 0;if(e===r)return o-1;for(var i=r,a=1;a<o;a++){var u=t(a),c=Math.abs(e-u.left);if(n<=u.bottom){if(n<u.top||c>i)return a-1;i=c}}return 0}((function(t){return i(t).getBoundingClientRect()}),n,r,o.right,a);return i(u)},Kf=function(t,e,n,r){return Qt(e)?function(t,e,n,r){var o=t.dom.createRange();o.selectNode(e.dom);var i=o.getClientRects();return q(i,(function(t){return $f(t,n,r)?C.some(t):C.none()})).map((function(o){return Gf(t,e,n,r,o)}))}(t,e,n,r):function(t,e,n,r){var o=t.dom.createRange(),i=ce(e);return q(i,(function(e){return o.selectNode(e.dom),$f(o.getBoundingClientRect(),n,r)?Kf(t,e,n,r):C.none()}))}(t,e,n,r)},qf=function(t,e){return e-t.left<t.right-e},Xf=function(t,e,n){var r=t.dom.createRange();return r.selectNode(e.dom),r.collapse(n),r},Yf=function(t,e,n){var r=t.dom.createRange();r.selectNode(e.dom);var o=r.getBoundingClientRect(),i=qf(o,n);return(!0===i?ei:ni)(e).map((function(e){return Xf(t,e,i)}))},Jf=function(t,e,n){var r=e.dom.getBoundingClientRect(),o=qf(r,n);return C.some(Xf(t,e,o))},Qf=function(t,e,n){var r,o;return C.from(null===(o=(r=t.dom).caretPositionFromPoint)||void 0===o?void 0:o.call(r,e,n)).bind((function(e){if(null===e.offsetNode)return C.none();var n=t.dom.createRange();return n.setStart(e.offsetNode,e.offset),n.collapse(),C.some(n)}))},Zf=function(t,e,n){var r,o;return C.from(null===(o=(r=t.dom).caretRangeFromPoint)||void 0===o?void 0:o.call(r,e,n))},td=function(t,e,n,r){var o=t.dom.createRange();o.selectNode(e.dom);var i=o.getBoundingClientRect();return function(t,e,n,r){var o=t.dom.createRange();o.selectNode(e.dom);var i=o.getBoundingClientRect(),a=Math.max(i.left,Math.min(i.right,n)),u=Math.max(i.top,Math.min(i.bottom,r));return Kf(t,e,a,u)}(t,e,Math.max(i.left,Math.min(i.right,n)),Math.max(i.top,Math.min(i.bottom,r)))},ed=function(t,e,n){return xt.fromPoint(t,e,n).bind((function(r){var o=function(){return function(t,e,n){return(0===ce(e).length?Jf:Yf)(t,e,n)}(t,r,e)};return 0===ce(r).length?o():td(t,r,e,n).orThunk(o)}))},nd=document.caretPositionFromPoint?Qf:document.caretRangeFromPoint?Zf:ed,rd=function(t,e){var n=Kt(t);return"input"===n?Pf.after(t):T(["br","img"],n)?0===e?Pf.before(t):Pf.after(t):Pf.on(t,e)},od=function(t,e){var n=t.fold(Pf.before,rd,Pf.after),r=e.fold(Pf.before,rd,Pf.after);return If.relative(n,r)},id=function(t,e,n,r){var o=rd(t,e),i=rd(n,r);return If.relative(o,i)},ad=function(t,e,n,r){var o=function(t,e,n,r){var o=ne(t).dom.createRange();return o.setStart(t.dom,e),o.setEnd(n.dom,r),o}(t,e,n,r),i=kt(t,n)&&e===r;return o.collapsed&&!i},ud=function(t){return C.from(t.getSelection())},cd=function(t,e){ud(t).each((function(t){t.removeAllRanges(),t.addRange(e)}))},sd=function(t,e,n,r,o){var i=Ff(t,e,n,r,o);cd(t,i)},ld=function(t,e){return Uf(t,e).match({ltr:function(e,n,r,o){sd(t,e,n,r,o)},rtl:function(e,n,r,o){ud(t).each((function(i){if(i.setBaseAndExtent)i.setBaseAndExtent(e.dom,n,r.dom,o);else if(i.extend)try{!function(t,e,n,r,o,i){e.collapse(n.dom,r),e.extend(o.dom,i)}(0,i,e,n,r,o)}catch(i){sd(t,r,o,e,n)}else sd(t,r,o,e,n)}))}})},fd=function(t,e,n,r,o){var i=id(e,n,r,o);ld(t,i)},dd=function(t,e,n){var r=od(e,n);ld(t,r)},md=function(t){var e=If.getWin(t).dom,n=function(t,n,r,o){return Ff(e,t,n,r,o)},r=function(t){return t.match({domRange:function(t){var e=xt.fromDom(t.startContainer),n=xt.fromDom(t.endContainer);return id(e,t.startOffset,n,t.endOffset)},relative:od,exact:id})}(t);return Uf(e,r).match({ltr:n,rtl:n})},pd=function(t){if(t.rangeCount>0){var e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);return C.some(Df(xt.fromDom(e.startContainer),e.startOffset,xt.fromDom(n.endContainer),n.endOffset))}return C.none()},hd=function(t){if(null===t.anchorNode||null===t.focusNode)return pd(t);var e=xt.fromDom(t.anchorNode),n=xt.fromDom(t.focusNode);return ad(e,t.anchorOffset,n,t.focusOffset)?C.some(Df(e,t.anchorOffset,n,t.focusOffset)):pd(t)},gd=function(t,e,n){void 0===n&&(n=!0);var r=(n?Lf:zf)(t,e);cd(t,r)},vd=function(t){return function(t){return ud(t).filter((function(t){return t.rangeCount>0})).bind(hd)}(t).map((function(t){return If.exact(t.start,t.soffset,t.finish,t.foffset)}))},bd=function(t,e){return function(t){var e=t.getClientRects(),n=e.length>0?e[0]:t.getBoundingClientRect();return n.width>0||n.height>0?C.some(n).map(Nf):C.none()}(Wf(t,e))},yd=function(t,e,n){return function(t,e,n){var r=xt.fromDom(t.document);return nd(r,e,n).map((function(t){return Df(xt.fromDom(t.startContainer),t.startOffset,xt.fromDom(t.endContainer),t.endOffset)}))}(t,e,n)},_d=tinymce.util.Tools.resolve("tinymce.util.VK"),wd=function(t,e,n){return Od(t,e,function(t,e,n){return Tf(t,n).fold((function(){return Ef.none(t)}),(function(n){return Mf(n.all,t,n.index,1,e)}))}(n,Ba))},xd=function(t,e,n){return Od(t,e,function(t,e,n){return Tf(t,n).fold((function(){return Ef.none()}),(function(n){return Mf(n.all,t,n.index,-1,e)}))}(n,Ba))},Od=function(t,e,n){return n.fold(C.none,C.none,(function(t,e){return ei(e).map((function(t){return function(t,e){var n=If.exact(e,0,e,0);return md(n)}(0,t)}))}),(function(n){return t.execCommand("mceTableInsertRowAfter"),wd(t,e,n)}))},Sd=["table","li","dl"],Cd=function(t,e){return{selection:t,kill:e}},kd=function(t,e,n,r){return{start:Pf.on(t,e),finish:Pf.on(n,r)}},Ed=function(t,e){var n=Wf(t,e);return Df(xt.fromDom(n.startContainer),n.startOffset,xt.fromDom(n.endContainer),n.endOffset)},Md=kd,Td=function(t,e,n,r,o){return kt(n,r)?C.none():sr(n,r,e).bind((function(e){var r=e.boxes.getOr([]);return r.length>1?(o(t,r,e.start,e.finish),C.some(Cd(C.some(Md(n,0,n,Qo(n))),!0))):C.none()}))},Dd=function(t,e){return{item:t,mode:e}},Ad=function(t,e,n,r){return void 0===r&&(r=Pd),t.property().parent(e).map((function(t){return Dd(t,r)}))},Pd=function(t,e,n,r){return void 0===r&&(r=Rd),n.sibling(t,e).map((function(t){return Dd(t,r)}))},Rd=function(t,e,n,r){void 0===r&&(r=Rd);var o=t.property().children(e);return n.first(o).map((function(t){return Dd(t,r)}))},Id=[{current:Ad,next:Pd,fallback:C.none()},{current:Pd,next:Rd,fallback:C.some(Ad)},{current:Rd,next:Rd,fallback:C.some(Pd)}],zd=function(t,e,n,r,o){return void 0===o&&(o=Id),B(o,(function(t){return t.current===n})).bind((function(n){return n.current(t,e,r,n.next).orThunk((function(){return n.fallback.bind((function(n){return zd(t,e,n,r)}))}))}))},Ld=function(){return{sibling:function(t,e){return t.query().prevSibling(e)},first:function(t){return t.length>0?C.some(t[t.length-1]):C.none()}}},jd=function(){return{sibling:function(t,e){return t.query().nextSibling(e)},first:function(t){return t.length>0?C.some(t[0]):C.none()}}},Bd=function(t,e,n,r,o,i){return zd(t,e,r,o).bind((function(e){return i(e.item)?C.none():n(e.item)?C.some(e.item):Bd(t,e.item,n,e.mode,o,i)}))},Fd=function(t){return function(e){return 0===t.property().children(e).length}},Nd=function(t,e,n,r){return Bd(t,e,n,Pd,Ld(),r)},Hd=function(t,e,n,r){return Bd(t,e,n,Pd,jd(),r)},Vd=Zn(),Ud=function(t,e){return function(t,e,n){return Nd(t,e,Fd(t),n)}(Vd,t,e)},Wd=function(t,e){return function(t,e,n){return Hd(t,e,Fd(t),n)}(Vd,t,e)},$d=hr([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),Gd=function(t){return Ee(t,"tr")},Kd=X(X({},$d),{verify:function(t,e,n,r,o,i,a){return Ee(r,"td,th",a).bind((function(n){return Ee(e,"td,th",a).map((function(e){return kt(n,e)?kt(r,n)&&Qo(n)===o?i(e):$d.none("in same cell"):ur(Gd,[n,e]).fold((function(){return function(t,e,n){var r=t.getRect(e),o=t.getRect(n);return o.right>r.left&&o.left<r.right}(t,e,n)?$d.success():i(e)}),(function(t){return i(e)}))}))})).getOr($d.none("default"))},cata:function(t,e,n,r,o){return t.fold(e,n,r,o)}}),qd=function(t,e){return F(t,g(kt,e))},Xd=function(t){return"br"===Kt(t)},Yd=function(t,e,n){return e(t,n).bind((function(t){return Qt(t)&&0===Xn(t).trim().length?Yd(t,e,n):C.some(t)}))},Jd=function(t,e,n,r){return function(t,e){return se(t,e).filter(Xd).orThunk((function(){return se(t,e-1).filter(Xd)}))}(e,n).bind((function(e){return r.traverse(e).fold((function(){return Yd(e,r.gather,t).map(r.relative)}),(function(t){return function(t){return oe(t).bind((function(e){var n=ce(e);return qd(n,t).map((function(r){return function(t,e,n,r){return{parent:t,children:e,element:n,index:r}}(e,n,t,r)}))}))}(t).map((function(t){return Pf.on(t.parent,t.index)}))}))}))},Qd=function(t,e,n,r){return(Xd(e)?function(t,e,n){return n.traverse(e).orThunk((function(){return Yd(e,n.gather,t)})).map(n.relative)}(t,e,r):Jd(t,e,n,r)).map((function(t){return{start:t,finish:t}}))},Zd=function(t,e){return{left:t.left,top:t.top+e,right:t.right,bottom:t.bottom+e}},tm=function(t,e){return{left:t.left,top:t.top-e,right:t.right,bottom:t.bottom-e}},em=function(t,e,n){return{left:t.left+e,top:t.top+n,right:t.right+e,bottom:t.bottom+n}},nm=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}},rm=function(t,e){return C.some(t.getRect(e))},om=function(t,e,n){return Jt(e)?rm(t,e).map(nm):Qt(e)?function(t,e,n){return n>=0&&n<Qo(e)?t.getRangedRect(e,n,e,n+1):n>0?t.getRangedRect(e,n-1,e,n):C.none()}(t,e,n).map(nm):C.none()},im=function(t,e){return Jt(e)?rm(t,e).map(nm):Qt(e)?t.getRangedRect(e,0,e,Qo(e)).map(nm):C.none()},am=hr([{none:[]},{retry:["caret"]}]),um=function(t,e,n){return(r=e,o=ms,xe((function(t,e){return e(t)}),Oe,r,o,i)).fold(_,(function(e){return im(t,e).exists((function(t){return function(t,e){return t.left<e.left||Math.abs(e.right-t.left)<1||t.left>e.right}(n,t)}))}));var r,o,i},cm={point:function(t){return t.bottom},adjuster:function(t,e,n,r,o){var i=Zd(o,5);return Math.abs(n.bottom-r.bottom)<1||n.top>o.bottom?am.retry(i):n.top===o.bottom?am.retry(Zd(o,1)):um(t,e,o)?am.retry(em(i,5,0)):am.none()},move:Zd,gather:Wd},sm=function(t,e,n,r,o){return 0===o?C.some(r):function(t,e,n){return t.elementFromPoint(e,n).filter((function(t){return"table"===Kt(t)})).isSome()}(t,r.left,e.point(r))?function(t,e,n,r,o){return sm(t,e,n,e.move(r,5),o)}(t,e,n,r,o-1):t.situsFromPoint(r.left,e.point(r)).bind((function(i){return i.start.fold(C.none,(function(i){return im(t,i).bind((function(a){return e.adjuster(t,i,a,n,r).fold(C.none,(function(r){return sm(t,e,n,r,o-1)}))})).orThunk((function(){return C.some(r)}))}),C.none)}))},lm=function(t,e,n){var r=t.move(n,5),o=sm(e,t,n,r,100).getOr(r);return function(t,e,n){return t.point(e)>n.getInnerHeight()?C.some(t.point(e)-n.getInnerHeight()):t.point(e)<0?C.some(-t.point(e)):C.none()}(t,o,e).fold((function(){return e.situsFromPoint(o.left,t.point(o))}),(function(n){return e.scrollBy(0,n),e.situsFromPoint(o.left,t.point(o)-n)}))},fm={tryUp:g(lm,{point:function(t){return t.top},adjuster:function(t,e,n,r,o){var i=tm(o,5);return Math.abs(n.top-r.top)<1||n.bottom<o.top?am.retry(i):n.bottom===o.top?am.retry(tm(o,1)):um(t,e,o)?am.retry(em(i,5,0)):am.none()},move:tm,gather:Ud}),tryDown:g(lm,cm),ieTryUp:function(t,e){return t.situsFromPoint(e.left,e.top-5)},ieTryDown:function(t,e){return t.situsFromPoint(e.left,e.bottom+5)},getJumpSize:m(5)},dm=function(t,e,n){return t.getSelection().bind((function(r){return Qd(e,r.finish,r.foffset,n).fold((function(){return C.some($u(r.finish,r.foffset))}),(function(o){var i=t.fromSitus(o);return function(t){return Kd.cata(t,(function(t){return C.none()}),(function(){return C.none()}),(function(t){return C.some($u(t,0))}),(function(t){return C.some($u(t,Qo(t)))}))}(Kd.verify(t,r.finish,r.foffset,i.finish,i.foffset,n.failure,e))}))}))},mm=function(t,e,n,r,o,i){return 0===i?C.none():gm(t,e,n,r,o).bind((function(a){var u=t.fromSitus(a),c=Kd.verify(t,n,r,u.finish,u.foffset,o.failure,e);return Kd.cata(c,(function(){return C.none()}),(function(){return C.some(a)}),(function(a){return kt(n,a)&&0===r?pm(t,n,r,tm,o):mm(t,e,a,0,o,i-1)}),(function(a){return kt(n,a)&&r===Qo(a)?pm(t,n,r,Zd,o):mm(t,e,a,Qo(a),o,i-1)}))}))},pm=function(t,e,n,r,o){return om(t,e,n).bind((function(e){return hm(t,o,r(e,fm.getJumpSize()))}))},hm=function(t,e,n){var r=_t().browser;return r.isChrome()||r.isSafari()||r.isFirefox()||r.isEdge()?e.otherRetry(t,n):r.isIE()?e.ieRetry(t,n):C.none()},gm=function(t,e,n,r,o){return om(t,n,r).bind((function(e){return hm(t,o,e)}))},vm=function(t,e){return Oe(t,(function(t){return oe(t).exists((function(t){return kt(t,e)}))}),n).isSome();var n},bm=function(t,e,n,r,o){return Ee(r,"td,th",e).bind((function(r){return Ee(r,"table",e).bind((function(i){return vm(o,i)?function(t,e,n){return dm(t,e,n).bind((function(r){return mm(t,e,r.element,r.offset,n,20).map(t.fromSitus)}))}(t,e,n).bind((function(t){return Ee(t.finish,"td,th",e).map((function(e){return{start:r,finish:e,range:t}}))})):C.none()}))}))},ym=function(t,e,n,r,o,i){return _t().browser.isIE()?C.none():i(r,e).orThunk((function(){return bm(t,e,n,r,o).map((function(t){var e=t.range;return Cd(C.some(Md(e.start,e.soffset,e.finish,e.foffset)),!0)}))}))},_m=function(t,e){return Ee(t,"tr",e).bind((function(t){return Ee(t,"table",e).bind((function(n){var r=we(n,"tr");return kt(t,r[0])?function(t,e,n){return Nd(Vd,t,e,n)}(n,(function(t){return ni(t).isSome()}),e).map((function(t){var e=Qo(t);return Cd(C.some(Md(t,e,t,e)),!0)})):C.none()}))}))},wm=function(t,e){return Ee(t,"tr",e).bind((function(t){return Ee(t,"table",e).bind((function(n){var r=we(n,"tr");return kt(t,r[r.length-1])?function(t,e,n){return Hd(Vd,t,e,n)}(n,(function(t){return ei(t).isSome()}),e).map((function(t){return Cd(C.some(Md(t,0,t,0)),!0)})):C.none()}))}))},xm=function(t,e,n,r,o,i,a){return bm(t,n,r,o,i).bind((function(t){return Td(e,n,t.start,t.finish,a)}))},Om=function(t,e){return Ee(t,"td,th",e)},Sm={traverse:ue,gather:Wd,relative:Pf.before,otherRetry:fm.tryDown,ieRetry:fm.ieTryDown,failure:Kd.failedDown},Cm={traverse:ae,gather:Ud,relative:Pf.before,otherRetry:fm.tryUp,ieRetry:fm.ieTryUp,failure:Kd.failedUp},km=function(t){return function(e){return e===t}},Em=km(38),Mm=km(40),Tm=function(t){return t>=37&&t<=40},Dm={isBackward:km(37),isForward:km(39)},Am={isBackward:km(39),isForward:km(37)},Pm=function(t){return{elementFromPoint:function(e,n){return xt.fromPoint(xt.fromDom(t.document),e,n)},getRect:function(t){return t.dom.getBoundingClientRect()},getRangedRect:function(e,n,r,o){var i=If.exact(e,n,r,o);return bd(t,i)},getSelection:function(){return vd(t).map((function(e){return Ed(t,e)}))},fromSitus:function(e){var n=If.relative(e.start,e.finish);return Ed(t,n)},situsFromPoint:function(e,n){return yd(t,e,n).map((function(t){return kd(t.start,t.soffset,t.finish,t.foffset)}))},clearSelection:function(){!function(t){ud(t).each((function(t){return t.removeAllRanges()}))}(t)},collapseSelection:function(e){void 0===e&&(e=!1),vd(t).each((function(n){return n.fold((function(t){return t.collapse(e)}),(function(n,r){var o=e?n:r;dd(t,o,o)}),(function(n,r,o,i){var a=e?n:o,u=e?r:i;fd(t,a,u,a,u)}))}))},setSelection:function(e){fd(t,e.start,e.soffset,e.finish,e.foffset)},setRelativeSelection:function(e,n){dd(t,e,n)},selectNode:function(e){gd(t,e,!1)},selectContents:function(e){gd(t,e)},getInnerHeight:function(){return t.innerHeight},getScrollY:function(){var e,n,r,o;return(e=xt.fromDom(t.document),n=void 0!==e?e.dom:document,r=n.body.scrollLeft||n.documentElement.scrollLeft,o=n.body.scrollTop||n.documentElement.scrollTop,Xr(r,o)).top},scrollBy:function(e,n){!function(t,e,n){var r=(void 0!==n?n.dom:document).defaultView;r&&r.scrollBy(t,e)}(e,n,xt.fromDom(t.document))}}},Rm=function(t,e){return{rows:t,cols:e}},Im=function(t,e,n,r){var o=function(t,e,n,r){var o=jl(),i=o.clear,a=function(i){o.on((function(o){r.clearBeforeUpdate(e),Om(i.target,n).each((function(a){sr(o,a,n).each((function(n){var o=n.boxes.getOr([]);if(1===o.length){var u=o[0],c="false"===Fa(u),s=ze(ja(i.target),u,kt);c&&s&&(r.selectRange(e,o,u,u),t.selectContents(u))}else o.length>1&&(r.selectRange(e,o,n.start,n.finish),t.selectContents(a))}))}))}))};return{clearstate:i,mousedown:function(t){r.clear(e),Om(t.target,n).each(o.set)},mouseover:function(t){a(t)},mouseup:function(t){a(t),i()}}}(Pm(t),e,n,r);return{clearstate:o.clearstate,mousedown:o.mousedown,mouseover:o.mouseover,mouseup:o.mouseup}},zm=function(t,e,n,r){var o=Pm(t),i=function(){return r.clear(e),C.none()};return{keydown:function(t,a,u,c,s,l){var f=t.raw,d=f.which,m=!0===f.shiftKey;return lr(e,r.selectedSelector).fold((function(){return Tm(d)&&!m&&r.clearBeforeUpdate(e),Mm(d)&&m?g(xm,o,e,n,Sm,c,a,r.selectRange):Em(d)&&m?g(xm,o,e,n,Cm,c,a,r.selectRange):Mm(d)?g(ym,o,n,Sm,c,a,wm):Em(d)?g(ym,o,n,Cm,c,a,_m):C.none}),(function(t){var n=function(n){return function(){return q(n,(function(n){return function(t,e,n,r,o){return dr(r,t,e,o.firstSelectedSelector,o.lastSelectedSelector).map((function(t){return o.clearBeforeUpdate(n),o.selectRange(n,t.boxes,t.start,t.finish),t.boxes}))}(n.rows,n.cols,e,t,r)})).fold((function(){return fr(e,r.firstSelectedSelector,r.lastSelectedSelector).map((function(t){var n=Mm(d)||l.isForward(d)?Pf.after:Pf.before;return o.setRelativeSelection(Pf.on(t.first,0),n(t.table)),r.clear(e),Cd(C.none(),!0)}))}),(function(t){return C.some(Cd(C.none(),!0))}))}};return Mm(d)&&m?n([Rm(1,0)]):Em(d)&&m?n([Rm(-1,0)]):l.isBackward(d)&&m?n([Rm(0,-1),Rm(-1,0)]):l.isForward(d)&&m?n([Rm(0,1),Rm(1,0)]):Tm(d)&&!m?i:C.none}))()},keyup:function(t,o,i,a,u){return lr(e,r.selectedSelector).fold((function(){var c=t.raw,s=c.which;return!0===c.shiftKey&&Tm(s)?function(t,e,n,r,o,i,a){return kt(n,o)&&r===i?C.none():Ee(n,"td,th",e).bind((function(n){return Ee(o,"td,th",e).bind((function(r){return Td(t,e,n,r,a)}))}))}(e,n,o,i,a,u,r.selectRange):C.none()}),C.none)}}},Lm=function(t,e,n){var r=function(e){Re(e,t.selected),Re(e,t.firstSelected),Re(e,t.lastSelected)},o=function(e){Te(e,t.selected,"1")},i=function(t){a(t),n()},a=function(e){var n=we(e,t.selectedSelector+","+t.firstSelectedSelector+","+t.lastSelectedSelector);R(n,r)};return{clearBeforeUpdate:a,clear:i,selectRange:function(n,r,a,u){i(n),R(r,o),Te(a,t.firstSelected,"1"),Te(u,t.lastSelected,"1"),e(r,a,u)},selectedSelector:t.selectedSelector,firstSelectedSelector:t.firstSelectedSelector,lastSelectedSelector:t.lastSelectedSelector}},jm=function(t,e,n){var r=En.fromTable(t);return Cc(r,e).map((function(t){var e=yc(r,n,!1);return{upOrLeftCells:function(t,e){var n=t.slice(0,e[e.length-1].row+1),r=_c(n);return H(r,(function(t){var n=t.cells.slice(0,e[e.length-1].column+1);return P(n,(function(t){return t.element}))}))}(e,t),downOrRightCells:function(t,e){var n=t.slice(e[0].row+e[0].rowspan-1,t.length),r=_c(n);return H(r,(function(t){var n=t.cells.slice(e[0].column+e[0].colspan-1,t.cells.length);return P(n,(function(t){return t.element}))}))}(e,t)}}))},Bm=tinymce.util.Tools.resolve("tinymce.Env"),Fm=function(t){return!1===Pa(xt.fromDom(t.target),"ephox-snooker-resizer-bar")};function Nm(t,e,n){var r=Lm(Si,(function(e,r,o){n.targets().each((function(n){an(r).each((function(i){var a=Iu(t),u=fi(d,xt.fromDom(t.getDoc()),a),c=jm(i,n,u);!function(t,e,n,r,o){t.fire("TableSelectionChange",{cells:e,start:n,finish:r,otherCells:o})}(t,e,r,o,c)}))}))}),(function(){return function(t){t.fire("TableSelectionClear")}(t)}));return t.on("init",(function(n){var o=t.getWin(),i=pi(t),a=vi(t),u=Im(o,i,a,r),c=zm(o,i,a,r),s=function(t,e,n,r){var o=Pm(t);return function(t,i){r.clearBeforeUpdate(e),sr(t,i,n).each((function(t){var n=t.boxes.getOr([]);r.selectRange(e,n,t.start,t.finish),o.selectContents(i),o.collapseSelection()}))}}(o,i,a,r);t.on("TableSelectorChange",(function(t){return s(t.start,t.finish)}));var l,f,m=function(e,n){(function(t){return!0===t.raw.shiftKey})(e)&&(n.kill&&e.kill(),n.selection.each((function(e){var n=If.relative(e.start,e.finish),r=Wf(o,n);t.selection.setRng(r)})))},p=function(t){return 0===t.button},h=(l=zl(xt.fromDom(i)),f=zl(0),{touchEnd:function(t){var e=xt.fromDom(t.target);if("td"===Kt(e)||"th"===Kt(e)){var n=l.get(),r=f.get();kt(n,e)&&t.timeStamp-r<300&&(t.preventDefault(),s(e,e))}l.set(e),f.set(t.timeStamp)}});t.on("dragstart",(function(t){u.clearstate()})),t.on("mousedown",(function(t){p(t)&&Fm(t)&&u.mousedown(Ea(t))})),t.on("mouseover",(function(t){var e;(void 0===(e=t).buttons||Bm.browser.isEdge()&&0===e.buttons||0!=(1&e.buttons))&&Fm(t)&&u.mouseover(Ea(t))})),t.on("mouseup",(function(t){p(t)&&Fm(t)&&u.mouseup(Ea(t))})),t.on("touchend",h.touchEnd),t.on("keyup",(function(e){var n=Ea(e);if(n.raw.shiftKey&&Tm(n.raw.which)){var r=t.selection.getRng(),o=xt.fromDom(r.startContainer),i=xt.fromDom(r.endContainer);c.keyup(n,o,r.startOffset,i,r.endOffset).each((function(t){m(n,t)}))}})),t.on("keydown",(function(n){var r=Ea(n);e().each((function(t){return t.hideBars()}));var o=t.selection.getRng(),i=xt.fromDom(o.startContainer),a=xt.fromDom(o.endContainer),u=Vr(Dm,Am)(xt.fromDom(t.selection.getStart()));c.keydown(r,i,o.startOffset,a,o.endOffset,u).each((function(t){m(r,t)})),e().each((function(t){return t.showBars()}))})),t.on("NodeChange",(function(){var e=t.selection,n=xt.fromDom(e.getStart()),o=xt.fromDom(e.getEnd());ur(an,[n,o]).fold((function(){return r.clear(i)}),d)}))})),{clear:r.clear}}var Hm=function(t,e){var n=zl(C.none()),r=zl([]),o=C.none(),i=ee("caption"),a=function(t){return o.forall((function(e){return!e[t]}))},u=function(){return Ei(function(t){return xt.fromDom(t.selection.getEnd())}(t),vi(t))},c=function(){return Ei(_i(t),vi(t)).bind((function(t){return je(an(t),u().bind(an),(function(n,r){return kt(n,r)?i(t)?C.some(function(t){return{element:t,mergable:C.none(),unmergable:C.none(),selection:[t]}}(t)):C.some(Ci(e,n,t)):C.none()})).bind(p)}))},s=function(t){return an(t.element).map((function(e){var n=En.fromTable(e),r=Cc(n,t).getOr([]),o=j(r,(function(t,e){return e.isLocked&&(t.onAny=!0,0===e.column?t.onFirst=!0:e.column+e.colspan>=n.grid.columns&&(t.onLast=!0)),t}),{onAny:!1,onFirst:!1,onLast:!1});return{mergeable:Mc(n,t).isSome(),unmergeable:Tc(n,t).isSome(),locked:o}}))},l=function(){n.set(J(c)()),o=n.get().bind(s),R(r.get(),(function(t){return t()}))},f=function(t){return t(),r.set(r.get().concat([t])),function(){r.set(z(r.get(),(function(e){return e!==t})))}},d=function(t,e){return f((function(){return n.get().fold((function(){t.setDisabled(!0)}),(function(n){t.setDisabled(e(n))}))}))},m=function(t,e,r){return f((function(){return n.get().fold((function(){t.setDisabled(!0),t.setActive(!1)}),(function(n){t.setDisabled(e(n)),t.setActive(r(n))}))}))},h=function(t){return o.exists((function(e){return e.locked[t]}))},g=function(e,n){return function(r){return m(r,(function(t){return i(t.element)}),(function(){return t.queryCommandValue(e)===n}))}},v=g("mceTableRowType","header"),b=g("mceTableColType","th");return t.on("NodeChange ExecCommand TableSelectorChange",l),{onSetupTable:function(t){return d(t,(function(t){return!1}))},onSetupCellOrRow:function(t){return d(t,(function(t){return i(t.element)}))},onSetupColumn:function(t){return function(e){return d(e,(function(e){return i(e.element)||h(t)}))}},onSetupPasteable:function(t){return function(e){return d(e,(function(e){return i(e.element)||t().isNone()}))}},onSetupPasteableColumn:function(t,e){return function(n){return d(n,(function(n){return i(n.element)||t().isNone()||h(e)}))}},onSetupMergeable:function(t){return d(t,(function(t){return a("mergeable")}))},onSetupUnmergeable:function(t){return d(t,(function(t){return a("unmergeable")}))},resetTargets:l,onSetupTableWithCaption:function(e){return m(e,_,(function(e){return an(e.element,vi(t)).exists((function(t){return Ce(t,"caption").isSome()}))}))},onSetupTableRowHeaders:v,onSetupTableColumnHeaders:b,targets:n.get}},Vm=function(t){var e=function(t,e,n){return{get:function(){return mr(t(),n).fold((function(){return e().fold(br,_r)}),(function(t){return yr(t)}))}}}((function(){return pi(t)}),(function(){return Mi(_i(t),vi(t))}),Si.selectedSelector),n=Hm(t,e),r=Wu(t),o=Nm(t,r.lazyResize,n),i=al(t,o,r.lazyWire),a=function(){var t=jl(),e=jl();return{getRows:t.get,setRows:function(n){n.fold(t.clear,t.set),e.clear()},clearRows:t.clear,getColumns:e.get,setColumns:function(n){n.fold(e.clear,e.set),t.clear()},clearColumns:e.clear}}();return xf(t,i,0,e,a),function(t,e,n){var r=vi(t),o=function(e){return Mi(_i(t)).bind((function(t){return an(t,r).map((function(r){var o=Ci(n,r,t);return e(r,o)}))})).getOr("")};Pt({mceTableRowType:function(){return o(e.getTableRowType)},mceTableCellType:function(){return o(e.getTableCellType)},mceTableColType:function(){return o(e.getTableColType)}},(function(e,n){return t.addQueryValueHandler(n,e)}))}(t,i,e),Di(t,e,i),function(t,e,n,r){var o=function(e){return function(){return t.execCommand(e)}},i=function(e){t.execCommand("mceInsertTable",!1,{rows:e.numRows,columns:e.numColumns})},a={text:"Table properties",onSetup:n.onSetupTable,onAction:o("mceTableProps")},u={text:"Delete table",icon:"table-delete-table",onSetup:n.onSetupTable,onAction:o("mceTableDelete")};t.ui.registry.addMenuItem("tableinsertrowbefore",{text:"Insert row before",icon:"table-insert-row-above",onAction:o("mceTableInsertRowBefore"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tableinsertrowafter",{text:"Insert row after",icon:"table-insert-row-after",onAction:o("mceTableInsertRowAfter"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tabledeleterow",{text:"Delete row",icon:"table-delete-row",onAction:o("mceTableDeleteRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablerowprops",{text:"Row properties",icon:"table-row-properties",onAction:o("mceTableRowProps"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablecutrow",{text:"Cut row",icon:"cut-row",onAction:o("mceTableCutRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablecopyrow",{text:"Copy row",icon:"duplicate-row",onAction:o("mceTableCopyRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablepasterowbefore",{text:"Paste row before",icon:"paste-row-before",onAction:o("mceTablePasteRowBefore"),onSetup:n.onSetupPasteable(r.getRows)}),t.ui.registry.addMenuItem("tablepasterowafter",{text:"Paste row after",icon:"paste-row-after",onAction:o("mceTablePasteRowAfter"),onSetup:n.onSetupPasteable(r.getRows)});var c={type:"nestedmenuitem",text:"Row",getSubmenuItems:m("tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter")};t.ui.registry.addMenuItem("tableinsertcolumnbefore",{text:"Insert column before",icon:"table-insert-column-before",onAction:o("mceTableInsertColBefore"),onSetup:n.onSetupColumn("onFirst")}),t.ui.registry.addMenuItem("tableinsertcolumnafter",{text:"Insert column after",icon:"table-insert-column-after",onAction:o("mceTableInsertColAfter"),onSetup:n.onSetupColumn("onLast")}),t.ui.registry.addMenuItem("tabledeletecolumn",{text:"Delete column",icon:"table-delete-column",onAction:o("mceTableDeleteCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addMenuItem("tablecutcolumn",{text:"Cut column",icon:"cut-column",onAction:o("mceTableCutCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addMenuItem("tablecopycolumn",{text:"Copy column",icon:"duplicate-column",onAction:o("mceTableCopyCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addMenuItem("tablepastecolumnbefore",{text:"Paste column before",icon:"paste-column-before",onAction:o("mceTablePasteColBefore"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onFirst")}),t.ui.registry.addMenuItem("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",onAction:o("mceTablePasteColAfter"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onLast")});var s={type:"nestedmenuitem",text:"Column",getSubmenuItems:m("tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter")};t.ui.registry.addMenuItem("tablecellprops",{text:"Cell properties",icon:"table-cell-properties",onAction:o("mceTableCellProps"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablemergecells",{text:"Merge cells",icon:"table-merge-cells",onAction:o("mceTableMergeCells"),onSetup:n.onSetupMergeable}),t.ui.registry.addMenuItem("tablesplitcells",{text:"Split cell",icon:"table-split-cells",onAction:o("mceTableSplitCells"),onSetup:n.onSetupUnmergeable});var l={type:"nestedmenuitem",text:"Cell",getSubmenuItems:m("tablecellprops tablemergecells tablesplitcells")};!1===function(t){return t.getParam("table_grid",!0,"boolean")}(t)?t.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:o("mceInsertTable")}):t.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"inserttable",onAction:i}]}}),t.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:o("mceInsertTable")}),t.ui.registry.addMenuItem("tableprops",a),t.ui.registry.addMenuItem("deletetable",u),t.ui.registry.addNestedMenuItem("row",c),t.ui.registry.addNestedMenuItem("column",s),t.ui.registry.addNestedMenuItem("cell",l),t.ui.registry.addContextMenu("table",{update:function(){return n.resetTargets(),n.targets().fold(m(""),(function(t){return"caption"===Kt(t.element)?"tableprops deletetable":"cell row column | advtablesort | tableprops deletetable"}))}});var f=Ul(Cu(t));0!==f.length&&t.ui.registry.addNestedMenuItem("tableclass",{icon:"table-classes",text:"Table styles",getSubmenuItems:function(){return Hl(t,e,f,"tableclass",(function(e){return t.execCommand("mceTableToggleClass",!1,e)}))},onSetup:n.onSetupTable});var d=Ul(Su(t));0!==d.length&&t.ui.registry.addNestedMenuItem("tablecellclass",{icon:"table-cell-classes",text:"Cell styles",getSubmenuItems:function(){return Hl(t,e,d,"tablecellclass",(function(e){return t.execCommand("mceTableCellToggleClass",!1,e)}))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellvalign",{icon:"vertical-align",text:"Vertical align",getSubmenuItems:function(){return Hl(t,e,Ol,"tablecellverticalalign",Vl(t,"vertical-align"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellborderwidth",{icon:"border-width",text:"Border width",getSubmenuItems:function(){return Hl(t,e,gu(t),"tablecellborderwidth",Vl(t,"border-width"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellborderstyle",{icon:"border-style",text:"Border style",getSubmenuItems:function(){return Hl(t,e,vu(t),"tablecellborderstyle",Vl(t,"border-style"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleMenuItem("tablecaption",{icon:"table-caption",text:"Table caption",onAction:o("mceTableToggleCaption"),onSetup:n.onSetupTableWithCaption}),t.ui.registry.addNestedMenuItem("tablecellbackgroundcolor",{icon:"cell-background-color",text:"Background color",getSubmenuItems:function(){return $l(t,zu(t),"background-color")},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellbordercolor",{icon:"cell-border-color",text:"Border color",getSubmenuItems:function(){return $l(t,Lu(t),"border-color")},onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleMenuItem("tablerowheader",{text:"Row header",icon:"table-top-header",onAction:Gl(t),onSetup:n.onSetupTableRowHeaders}),t.ui.registry.addToggleMenuItem("tablecolheader",{text:"Column header",icon:"table-left-header",onAction:Kl(t),onSetup:n.onSetupTableColumnHeaders})}(t,e,n,a),function(t,e,n,r){t.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",fetch:function(t){return t("inserttable | cell row column | advtablesort | tableprops deletetable")}});var o=function(e){return function(){return t.execCommand(e)}};t.ui.registry.addButton("tableprops",{tooltip:"Table properties",onAction:o("mceTableProps"),icon:"table",onSetup:n.onSetupTable}),t.ui.registry.addButton("tabledelete",{tooltip:"Delete table",onAction:o("mceTableDelete"),icon:"table-delete-table",onSetup:n.onSetupTable}),t.ui.registry.addButton("tablecellprops",{tooltip:"Cell properties",onAction:o("mceTableCellProps"),icon:"table-cell-properties",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablemergecells",{tooltip:"Merge cells",onAction:o("mceTableMergeCells"),icon:"table-merge-cells",onSetup:n.onSetupMergeable}),t.ui.registry.addButton("tablesplitcells",{tooltip:"Split cell",onAction:o("mceTableSplitCells"),icon:"table-split-cells",onSetup:n.onSetupUnmergeable}),t.ui.registry.addButton("tableinsertrowbefore",{tooltip:"Insert row before",onAction:o("mceTableInsertRowBefore"),icon:"table-insert-row-above",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tableinsertrowafter",{tooltip:"Insert row after",onAction:o("mceTableInsertRowAfter"),icon:"table-insert-row-after",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tabledeleterow",{tooltip:"Delete row",onAction:o("mceTableDeleteRow"),icon:"table-delete-row",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablerowprops",{tooltip:"Row properties",onAction:o("mceTableRowProps"),icon:"table-row-properties",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tableinsertcolbefore",{tooltip:"Insert column before",onAction:o("mceTableInsertColBefore"),icon:"table-insert-column-before",onSetup:n.onSetupColumn("onFirst")}),t.ui.registry.addButton("tableinsertcolafter",{tooltip:"Insert column after",onAction:o("mceTableInsertColAfter"),icon:"table-insert-column-after",onSetup:n.onSetupColumn("onLast")}),t.ui.registry.addButton("tabledeletecol",{tooltip:"Delete column",onAction:o("mceTableDeleteCol"),icon:"table-delete-column",onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addButton("tablecutrow",{tooltip:"Cut row",icon:"cut-row",onAction:o("mceTableCutRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablecopyrow",{tooltip:"Copy row",icon:"duplicate-row",onAction:o("mceTableCopyRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablepasterowbefore",{tooltip:"Paste row before",icon:"paste-row-before",onAction:o("mceTablePasteRowBefore"),onSetup:n.onSetupPasteable(r.getRows)}),t.ui.registry.addButton("tablepasterowafter",{tooltip:"Paste row after",icon:"paste-row-after",onAction:o("mceTablePasteRowAfter"),onSetup:n.onSetupPasteable(r.getRows)}),t.ui.registry.addButton("tablecutcol",{tooltip:"Cut column",icon:"cut-column",onAction:o("mceTableCutCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addButton("tablecopycol",{tooltip:"Copy column",icon:"duplicate-column",onAction:o("mceTableCopyCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addButton("tablepastecolbefore",{tooltip:"Paste column before",icon:"paste-column-before",onAction:o("mceTablePasteColBefore"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onFirst")}),t.ui.registry.addButton("tablepastecolafter",{tooltip:"Paste column after",icon:"paste-column-after",onAction:o("mceTablePasteColAfter"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onLast")}),t.ui.registry.addButton("tableinsertdialog",{tooltip:"Insert table",onAction:o("mceInsertTable"),icon:"table"});var i=Ul(Cu(t));0!==i.length&&t.ui.registry.addMenuButton("tableclass",{icon:"table-classes",tooltip:"Table styles",fetch:Wl(t,e,i,"tableclass",(function(e){return t.execCommand("mceTableToggleClass",!1,e)})),onSetup:n.onSetupTable});var a=Ul(Su(t));0!==a.length&&t.ui.registry.addMenuButton("tablecellclass",{icon:"table-cell-classes",tooltip:"Cell styles",fetch:Wl(t,e,a,"tablecellclass",(function(e){return t.execCommand("mceTableCellToggleClass",!1,e)})),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellvalign",{icon:"vertical-align",tooltip:"Vertical align",fetch:Wl(t,e,Ol,"tablecellverticalalign",Vl(t,"vertical-align")),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellborderwidth",{icon:"border-width",tooltip:"Border width",fetch:Wl(t,e,gu(t),"tablecellborderwidth",Vl(t,"border-width")),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellborderstyle",{icon:"border-style",tooltip:"Border style",fetch:Wl(t,e,vu(t),"tablecellborderstyle",Vl(t,"border-style")),onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleButton("tablecaption",{tooltip:"Table caption",onAction:o("mceTableToggleCaption"),icon:"table-caption",onSetup:n.onSetupTableWithCaption}),t.ui.registry.addMenuButton("tablecellbackgroundcolor",{icon:"cell-background-color",tooltip:"Background color",fetch:function(e){return e($l(t,zu(t),"background-color"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellbordercolor",{icon:"cell-border-color",tooltip:"Border color",fetch:function(e){return e($l(t,Lu(t),"border-color"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleButton("tablerowheader",{tooltip:"Row header",icon:"table-top-header",onAction:Gl(t),onSetup:n.onSetupTableRowHeaders}),t.ui.registry.addToggleButton("tablecolheader",{tooltip:"Column header",icon:"table-left-header",onAction:Kl(t),onSetup:n.onSetupTableColumnHeaders})}(t,e,n,a),function(t){var e=function(t){return t.getParam("table_toolbar","tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol")}(t);e.length>0&&t.ui.registry.addContextToolbar("table",{predicate:function(e){return t.dom.is(e,"table")&&t.getBody().contains(e)},items:e,scope:"node",position:"node"})}(t),t.on("PreInit",(function(){t.serializer.addTempAttr(Si.firstSelected),t.serializer.addTempAttr(Si.lastSelected),function(t){t.formatter.register(Cf)}(t)})),function(t){return t.getParam("table_tab_navigation",!0,"boolean")}(t)&&t.on("keydown",(function(e){!function(t,e,n){if(t.keyCode===_d.TAB){var r=pi(e),o=function(t){var e=Kt(t);return kt(t,r)||T(Sd,e)},i=e.selection.getRng(),a=xt.fromDom(t.shiftKey?i.startContainer:i.endContainer);nn(a,o).each((function(r){t.preventDefault(),an(r,o).each(n.clear),e.selection.collapse(t.shiftKey),(t.shiftKey?xd:wd)(e,o,r).each((function(t){e.selection.setRng(t)}))}))}}(e,t,o)})),t.on("remove",(function(){r.destroy()})),function(t,e,n,r){return{insertTable:hl(t),setClipboardRows:pl(e.setRows),getClipboardRows:ml(e.getRows),setClipboardCols:pl(e.setColumns),getClipboardCols:ml(e.getColumns),resizeHandler:n,selectionTargets:r}}(t,a,r,n)};wr.add("table",Vm)}()},"96a9":function(t,e,n){"use strict";n.r(e);var r={name:"generate-col-item",components:{GenerateFormItem:n("12f6").a},props:["element","model","rules","remote","display","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.model}},watch:{model:{deep:!0,handler:function(t){this.dataModels=t}}},methods:{fillingColumns:function(t){this.$emit("fillingColumns",t)},getColSpan:function(t){return"pc"===this.platform?24/t:"pad"===this.platform?t>1?12:24:"mobile"===this.platform?24:void 0}}},o=n("2877"),i=Object(o.a)(r,(function(){var t,e=this,n=e.$createElement,r=e._self._c||n;return e.display[e.element.model]?r("el-row",{staticClass:"renderer-grid-row",class:(t={},t[e.element.options&&e.element.options.customClass]=e.element.options&&e.element.options.customClass,t),attrs:{align:e.element.options.align,gutter:e.element.options.gutter||0,justify:e.element.options.justify,type:"flex"}},e._l(e.element.columns,(function(t,n){var o;return r("el-col",{key:n,class:(o={},o[t.options&&t.options.customClass]=t.options&&t.options.customClass,o),attrs:{offset:t.options?t.options.offset:0,pull:t.options?t.options.pull:0,push:t.options?t.options.push:0,span:e.getColSpan(e.element.columns.length||1)}},[e._l(t.list,(function(t){return[r("generate-form-item",{key:t.key,attrs:{"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.display,edit:e.edit,"event-function":e.eventFunction,models:e.dataModels,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules,widget:t},on:{fillingColumns:e.fillingColumns}})]}))],2)})),1):e._e()}),[],!1,null,null,null);e.default=i.exports},"96cf":function(t,e){!function(e){"use strict";var n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",c="object"==typeof t,s=e.regeneratorRuntime;if(s)c&&(t.exports=s);else{(s=e.regeneratorRuntime=c?t.exports:{}).wrap=h;var l={},f={};f[i]=function(){return this};var d=Object.getPrototypeOf,m=d&&d(d(k([])));m&&m!==n&&r.call(m,i)&&(f=m);var p=y.prototype=v.prototype=Object.create(f);b.prototype=p.constructor=y,y.constructor=b,y[u]=b.displayName="GeneratorFunction",s.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(p),t},s.awrap=function(t){return{__await:t}},_(w.prototype),w.prototype[a]=function(){return this},s.AsyncIterator=w,s.async=function(t,e,n,r){var o=new w(h(t,e,n,r));return s.isGeneratorFunction(e)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},_(p),p[u]="Generator",p[i]=function(){return this},p.toString=function(){return"[object Generator]"},s.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},s.values=k,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}}}function h(t,e,n,r){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return E()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=x(a,n);if(u){if(u===l)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=g(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function g(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function v(){}function b(){}function y(){}function _(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function w(t){var e;this._invoke=function(n,o){function i(){return new Promise((function(e,i){!function e(n,o,i,a){var u=g(t[n],t,o);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==typeof s&&r.call(s,"__await")?Promise.resolve(s.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):Promise.resolve(s).then((function(t){c.value=t,i(c)}),a)}a(u.arg)}(n,o,e,i)}))}return e=e?e.then(i,i):i()}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=g(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function k(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())},9861:function(t,e,n){n("5352")},"98fc":function(t,e,n){var r,o,i;!function(n,a){"use strict";o=[],void 0===(i="function"==typeof(r=function(t){return function(e){(e=e||{}).arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",e.jsAttributeFilter=e.jsAttributeFilter,e.jsAttributeConverter=e.jsAttributeConverter,e.attributeConverters=e.attributeConverters||[],e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],e.xmldomOptions=e.xmldomOptions||{},void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0),void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0),void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0),void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!0),void 0===e.ignoreRoot&&(e.ignoreRoot=!1),void 0===e.escapeMode&&(e.escapeMode=!0),void 0===e.attributePrefix&&(e.attributePrefix="_"),void 0===e.selfClosingElements&&(e.selfClosingElements=!0),void 0===e.keepCData&&(e.keepCData=!1),void 0===e.keepText&&(e.keepText=!1),void 0===e.jsDateUTC&&(e.jsDateUTC=!1),function(){function t(t){var e=String(t);return 1===e.length&&(e="0"+e),e}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!=typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+t(this.getUTCMonth()+1)+"-"+t(this.getUTCDate())+"T"+t(this.getUTCHours())+":"+t(this.getUTCMinutes())+":"+t(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"})}();var n=1,r=3,o=4,i=8,a=9;function u(t){var e=t.localName;return null==e&&(e=t.baseName),null!=e&&""!==e||(e=t.nodeName),e}function c(t){return"string"==typeof t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):t}function s(t,n,r){switch(e.arrayAccessForm){case"property":t[n]instanceof Array?t[n+"_asArray"]=t[n]:t[n+"_asArray"]=[t[n]]}if(!(t[n]instanceof Array)&&e.arrayAccessFormPaths.length>0){for(var o=!1,i=0;i<e.arrayAccessFormPaths.length;i++){var a=e.arrayAccessFormPaths[i];if("string"==typeof a){if(a===r){o=!0;break}}else if(a instanceof RegExp){if(a.test(r)){o=!0;break}}else if("function"==typeof a&&a(n,r)){o=!0;break}}o&&(t[n]=[t[n]])}}function l(t){var e=t.split(/[-T:+Z]/g),n=new Date(e[0],e[1]-1,e[2]),r=e[5].split(".");if(n.setHours(e[3],e[4],r[0]),r.length>1&&n.setMilliseconds(r[1]),e[6]&&e[7]){var o=60*e[6]+Number(e[7]);o=0+("-"===(/\d\d-\d\d:\d\d$/.test(t)?"-":"+")?-1*o:o),n.setMinutes(n.getMinutes()-o-n.getTimezoneOffset())}else-1!==t.indexOf("Z",t.length-1)&&(n=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())));return n}function f(t,n){for(var r={__cnt:0},o=t.childNodes,a=0;a<o.length;a++){var c=o.item(a),f=u(c);c.nodeType!==i&&(r.__cnt++,null==r[f]?(r[f]=d(c,n+"."+f),s(r,f,n+"."+f)):(r[f]instanceof Array||(r[f]=[r[f]],s(r,f,n+"."+f)),r[f][r[f].length]=d(c,n+"."+f)))}for(var m=0;m<t.attributes.length;m++){var p=t.attributes.item(m);r.__cnt++;for(var h=p.value,g=0;g<e.attributeConverters.length;g++){var v=e.attributeConverters[g];v.test.call(null,p.name,p.value)&&(h=v.convert.call(null,p.name,p.value))}r[e.attributePrefix+p.name]=h}var b=t.prefix;return b&&(r.__cnt++,r.__prefix=b),r["#text"]&&(r.__text=r["#text"],r.__text instanceof Array&&(r.__text=r.__text.join("\n")),e.escapeMode&&(r.__text=r.__text.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")),e.stripWhitespaces&&(r.__text=r.__text.trim()),delete r["#text"],"property"===e.arrayAccessForm&&delete r["#text_asArray"],r.__text=function(t,n,r){if(e.datetimeAccessFormPaths.length>0)for(var o=r.split(".#")[0],i=0;i<e.datetimeAccessFormPaths.length;i++){var a=e.datetimeAccessFormPaths[i];if("string"==typeof a){if(a===o)return l(t)}else if(a instanceof RegExp){if(a.test(o))return l(t)}else if("function"==typeof a&&a(o))return l(t)}return t}(r.__text,0,n+".#text")),r.hasOwnProperty("#cdata-section")&&(r.__cdata=r["#cdata-section"],delete r["#cdata-section"],"property"===e.arrayAccessForm&&delete r["#cdata-section_asArray"]),1===r.__cnt&&r.__text&&!e.keepText?r=r.__text:0===r.__cnt&&"text"===e.emptyNodeForm?r="":r.__cnt>1&&void 0!==r.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""===r.__text||""===r.__text.trim())&&delete r.__text,delete r.__cnt,e.keepCData||r.hasOwnProperty("__text")||!r.hasOwnProperty("__cdata")||1!==Object.keys(r).length?(e.enableToStringFunc&&(r.__text||r.__cdata)&&(r.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}),r):r.__cdata?r.__cdata:""}function d(t,i){return t.nodeType===a?function(t){for(var r={},o=t.childNodes,i=0;i<o.length;i++){var a=o.item(i);if(a.nodeType===n){var c=u(a);e.ignoreRoot?r=d(a,c):r[c]=d(a,c)}}return r}(t):t.nodeType===n?f(t,i):t.nodeType===r||t.nodeType===o?t.nodeValue:null}function m(t,n,r,o){var i="<"+(t&&t.__prefix?t.__prefix+":":"")+n;if(r)for(var a=0;a<r.length;a++){var u=r[a],s=t[u];e.escapeMode&&(s=c(s)),i+=" "+u.substr(e.attributePrefix.length)+"=",e.useDoubleQuotes?i+='"'+s+'"':i+="'"+s+"'"}return i+=o?" />":">"}function p(t,e){return"</"+(t&&t.__prefix?t.__prefix+":":"")+e+">"}function h(t,n){return"property"===e.arrayAccessForm&&(r=n.toString(),o="_asArray",-1!==r.indexOf(o,r.length-o.length))||0===n.toString().indexOf(e.attributePrefix)||0===n.toString().indexOf("__")||t[n]instanceof Function;var r,o}function g(t){var e=0;if(t instanceof Object)for(var n in t)h(t,n)||e++;return e}function v(t){var n=[];if(t instanceof Object)for(var r in t)-1===r.toString().indexOf("__")&&0===r.toString().indexOf(e.attributePrefix)&&n.push(r);return n}function b(t){var n="";return t instanceof Object?n+=function(t){var n="";return t.__cdata&&(n+="<![CDATA["+t.__cdata+"]]>"),(t.__text||"number"==typeof t.__text||"boolean"==typeof t.__text)&&(e.escapeMode?n+=c(t.__text):n+=t.__text),n}(t):null!==t&&(e.escapeMode?n+=c(t):n+=t),n}function y(t,n,r){var o="";if(e.jsAttributeFilter&&e.jsAttributeFilter.call(null,n,t))return o;if(e.jsAttributeConverter&&(t=e.jsAttributeConverter.call(null,n,t)),null!=t&&""!==t||!e.selfClosingElements)if("object"==typeof t)if("[object Array]"===Object.prototype.toString.call(t))o+=function(t,e,n){var r="";if(0===t.length)r+=m(t,e,n,!0);else for(var o=0;o<t.length;o++)r+=y(t[o],e,v(t[o]));return r}(t,n,r);else if(t instanceof Date)o+=m(t,n,r,!1),o+=e.jsDateUTC?t.toUTCString():t.toISOString(),o+=p(t,n);else{g(t)>0||"number"==typeof t.__text||"boolean"==typeof t.__text||t.__text||t.__cdata?(o+=m(t,n,r,!1),o+=_(t),o+=p(t,n)):e.selfClosingElements?o+=m(t,n,r,!0):(o+=m(t,n,r,!1),o+=p(t,n))}else o+=m(t,n,r,!1),o+=b(t),o+=p(t,n);else o+=m(t,n,r,!0);return o}function _(t){var e="";if(g(t)>0)for(var n in t)if(!h(t,n)){var r=t[n];e+=y(r,n,v(r))}return e+=b(t)}function w(n){if(void 0===n)return null;if("string"!=typeof n)return null;var r=null,o=null;if(t)o=(r=new t(e.xmldomOptions)).parseFromString(n,"text/xml");else if(window&&window.DOMParser){r=new window.DOMParser;var i=null;if(!(window.ActiveXObject||"ActiveXObject"in window)&&document.all&&!document.addEventListener)try{i=r.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(t){i=null}try{o=r.parseFromString(n,"text/xml"),null!==i&&o.getElementsByTagNameNS(i,"parsererror").length>0&&(o=null)}catch(t){o=null}}else 0===n.indexOf("<?")&&(n=n.substr(n.indexOf("?>")+2)),(o=new ActiveXObject("Microsoft.XMLDOM")).async="false",o.loadXML(n);return o}this.asArray=function(t){return null==t?[]:t instanceof Array?t:[t]},this.toXmlDateTime=function(t){return t instanceof Date?t.toISOString():"number"==typeof t?new Date(t).toISOString():null},this.asDateTime=function(t){return"string"==typeof t?l(t):t},this.xml2dom=function(t){return w(t)},this.dom2js=function(t){return d(t,null)},this.js2dom=function(t){return w(this.js2xml(t))},this.xml2js=function(t){var e=w(t);return null!=e?this.dom2js(e):null},this.js2xml=function(t){return _(t)},this.getVersion=function(){return"3.4.0"}}})?r.apply(e,o):r)||(t.exports=i)}()},"99af":function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("d039"),a=n("e8b5"),u=n("861d"),c=n("7b0b"),s=n("07fa"),l=n("8418"),f=n("65f0"),d=n("1dde"),m=n("b622"),p=n("2d00"),h=m("isConcatSpreadable"),g=o.TypeError,v=p>=51||!i((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),b=d("concat"),y=function(t){if(!u(t))return!1;var e=t[h];return void 0!==e?!!e:a(t)};r({target:"Array",proto:!0,arity:1,forced:!v||!b},{concat:function(t){var e,n,r,o,i,a=c(this),u=f(a,0),d=0;for(e=-1,r=arguments.length;e<r;e++)if(y(i=-1===e?a:arguments[e])){if(d+(o=s(i))>9007199254740991)throw g("Maximum allowed index exceeded");for(n=0;n<o;n++,d++)n in i&&l(u,d,i[n])}else{if(d>=9007199254740991)throw g("Maximum allowed index exceeded");l(u,d++,i)}return u.length=d,u}})},"9a01":function(t,e,n){"use strict";var r=n("5530"),o=n("1da1"),i=n("2909"),a=(n("96cf"),n("498a"),n("c740"),n("a434"),n("99af"),n("d81d"),n("b0c0"),n("d9e2"),n("4de4"),n("d3b7"),{name:"MemberOrgTreeItem",props:{isActive:{default:!1,type:Boolean},data:{default:{}},isSelected:{default:!1,type:Boolean},showAppend:{default:!0,type:Boolean},canSelect:{default:!0,type:Boolean}},computed:{isDisabled(){return this.data.isDisabled||!this.canSelect}},model:{value:"isSelected",event:"change"},methods:{handleSwitch(t){"user"!==this.data.type&&this.$emit("click",this.data,t)},handleClick(t){this.$emit(t?"select":"unselect",this.data)}}}),u=n("2877"),c=Object(u.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{staticClass:"member-org-detail-item",class:{"is-active":t.isActive},attrs:{title:t.data.name}},[n("el-checkbox",{staticClass:"member-org-manage-check",attrs:{disabled:t.isDisabled,value:t.isSelected},on:{change:t.handleClick}}),n("div",{staticClass:"member-org-detail-item-wrapper item-org",on:{click:t.handleSwitch}},[n("div",{staticClass:"member-org-detail-icon"},["region"===t.data.type||"root"===t.data.type?n("base-icon",{attrs:{"icon-class":"government-line"}}):t._e(),"organ"===t.data.type?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):t._e(),"user"===t.data.type?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):t._e(),"role"===t.data.type?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):t._e()],1),n("span",{staticClass:"member-org-detail-title"},[t._v(" "+t._s(t.data.name)+" "),"user"===t.data.type&&t.data.account?n("small",[t._v(t._s(t.data.account))]):n("small",[t._v(t._s(t.data.code))])]),n("div",{staticClass:"member-org-spacing"}),t.showAppend?n("span",{staticClass:"member-org-detail-append"},[n("base-icon",{attrs:{"icon-class":"arrow-right-s-line"}})],1):t._e()])],1)}),[],!1,null,null,null).exports,s=n("7694"),l=n("60bb"),f=n.n(l),d={name:"OrganizationSelector",components:{MemberOrgTreeItem:c},computed:{total:function(){return this.data.length},searchTotal:function(){return this.searchData.length},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},componentSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},collapseTagSize:function(){return["small","mini"].indexOf(this.componentSize)>-1?"mini":"small"}},model:{prop:"selected",event:"change"},inject:{elForm:{default:""},elFormItem:{default:""}},props:{getOrgTree:{type:Function,default:s.g},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},parentCode:{type:String,default:"000000000000"},platform:{type:String,default:"pc"},text:{type:String,default:"选择"},customStyle:{type:Object,default:function(){return{}}},placeholder:{type:String,default:""},parentName:{type:String,default:"全国"},selected:{default:function(){return[]}},optionScopeType:{type:String,default:"ORGAN"},dialogTitle:{type:String,default:"选择组织机构"}},mounted:function(){null===this.selected&&(this.selected=[]),this.$emit("change",this.selected),this.selected.length&&this.$refs.nodeTree&&this.$refs.nodeTree.setCheckedKeys(Object(i.a)(f.a.cloneDeep(this.selected))),this.debounce=f.a.debounce(this.onSearch,50)},watch:{keyword:function(t){t.trim()?(this.isSearching=!0,this.debounce&&this.debounce()):this.isSearching=!1}},data:function(){return{data:[],isSearchLoading:!1,isSearching:!1,keyword:"",searchData:[],visible:!1,stack:[],currentDept:{},dataLoading:!0,debounce:!1}},methods:{onDialogClose:function(){this.data=[],this.isSearchLoading=!1,this.isSearching=!1,this.keyword="",this.searchData=[],this.visible=!1,this.stack=[],this.currentDept={},this.dataLoading=!1},onSearch:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.searchData=[],"PERSON"!==t.optionScopeType){e.next=7;break}return e.next=4,t.searchUser();case 4:t.searchData=e.sent,e.next=7;break;case 7:case"end":return e.stop()}}),e)})))()},onCheckedTreeNodeChange:function(t,e){if(e)this.multiple||(this.$refs.nodeTree.setCheckedKeys([t.code]),this.selected.pop()),this.selected.push(t);else{var n=this.selected.findIndex((function(e){return e.code===t.code}));n>-1&&this.selected.splice(n,1)}},loadTreeNode:function(t,e){var n=this;return Object(o.a)(regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(0!==t.level){r.next=5;break}return o={code:n.parentCode,name:n.parentName,label:n.parentName,type:"root",children:[],disabled:"ORGAN"!==n.optionScopeType},r.abrupt("return",e([o]));case 5:return a=[],r.t0=[],r.t1=Object(i.a)(a),r.t2=i.a,r.next=11,n.getOrgByParentCode(t.data.code);case 11:if(r.t3=r.sent,r.t4=(0,r.t2)(r.t3),a=r.t0.concat.call(r.t0,r.t1,r.t4),!(["root","organ","region"].indexOf(t.data.type)>-1&&"PERSON"===n.optionScopeType)){r.next=23;break}return r.t5=[],r.t6=Object(i.a)(a),r.t7=i.a,r.next=20,n.getUserListByParentNode(t.data);case 20:r.t8=r.sent,r.t9=(0,r.t7)(r.t8),a=r.t5.concat.call(r.t5,r.t6,r.t9);case 23:return r.abrupt("return",e(a));case 24:case"end":return r.stop()}}),r)})))()},searchUser:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){var n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.keyword&&!(t.keyword.length<1)){e.next=2;break}return e.abrupt("return");case 2:return t.isSearchLoading=!0,n=[],e.prev=4,e.next=7,Object(s.k)({condition:{name:t.keyword},limit:1e3,page:1});case 7:1===(o=e.sent).data.code&&(n=(n=o.data.data.data).map((function(t){return Object(r.a)(Object(r.a)({},t),{},{name:t.name,label:t.name,code:t.id,type:"user",isLeaf:!0})}))),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(4),t.$message.error(e.t0.message);case 14:return e.prev=14,t.isSearchLoading=!1,e.finish(14);case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e,null,[[4,11,14,17]])})))()},getUserListByParentNode:function(t){var e=this;return Object(o.a)(regeneratorRuntime.mark((function n(){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Object(s.h)({condition:{regionCode:t.regionCode||t.code,orgCode:t.code},limit:"1000",page:"1"});case 3:return o=n.sent,n.abrupt("return",o.data.data.data.length?o.data.data.data.map((function(t){return Object(r.a)(Object(r.a)({},t),{},{name:t.name,label:t.name,code:t.id,type:"user",isLeaf:!0,disabled:"PERSON"!==e.optionScopeType})})):[]);case 7:return n.prev=7,n.t0=n.catch(0),e.$message.error(n.t0),n.abrupt("return",[]);case 11:case"end":return n.stop()}}),n,null,[[0,7]])})))()},getOrgByParentCode:function(t){var e=this;return Object(o.a)(regeneratorRuntime.mark((function n(){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Object(s.g)({code:t});case 3:if(1===(o=n.sent).data.code){n.next=6;break}throw new Error(o.data.message||"根据父级部门ID加载子集部门节点失败");case 6:return n.abrupt("return",o.data.data.length?o.data.data.map((function(t){return Object(r.a)(Object(r.a)({},t),{},{name:t.name,label:t.name,code:t.code,type:t.type,disabled:"ORGAN"!==e.optionScopeType})})):[]);case 9:return n.prev=9,n.t0=n.catch(0),e.$message.error(n.t0),n.abrupt("return",[]);case 13:case"end":return n.stop()}}),n,null,[[0,9]])})))()},handleSelect:function(){this.disabled||this.readonly||(this.visible=!0)},handleConfirm:function(){this.$emit("change",this.selected),this.onDialogClose()},handleCancel:function(){this.visible=!1},handleCloseTag:function(t){var e=this.selected.findIndex((function(e){return e.code===t.code}));e>-1&&this.selected.splice(e,1)},handleSelectItem:function(t){this.multiple||this.selected.pop(),this.selected.push(t)},handleUnSelectItem:function(t){var e=this.selected.findIndex((function(e){return e.code===t.code}));if(e>-1&&this.selected.splice(e,1),this.$refs.nodeTree){var n=this.$refs.nodeTree.getCheckedKeys();n=n.filter((function(e){return e!==t.code})),this.$refs.nodeTree.setCheckedKeys(n)}},handleClick:function(t){this.isSearching=!1,this.stack.push(t)}}},m=Object(u.a)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"organization-selector el-select",class:[t.componentSize?"el-select--"+t.componentSize:""]},[t.visible?n("el-dialog",{class:"mobile"===t.platform?"organization-selector-mobile":"organization-selector-pc",attrs:{"close-on-click-modal":!1,"close-on-press-escape":!1,disabled:t.disabled,title:t.dialogTitle,visible:t.visible,"append-to-body":"","custom-class":"organization-selector-dialog",placement:"bottom-start",width:"800px"},on:{"update:visible":function(e){t.visible=e},close:t.onDialogClose}},[n("div",{staticClass:"tree-select-section-left"},[n("div",{staticClass:"member-org-detail-list-container"},["PERSON"===t.optionScopeType?n("div",{staticClass:"member-org-detail-title-bar"},[n("el-input",{attrs:{clearable:"",maxLength:"20",placeholder:"请输入关键词","prefix-icon":"el-icon-search",size:"small"},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}})],1):t._e(),t.isSearching?n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.isSearchLoading,expression:"isSearchLoading"}],staticClass:"b-scroll"},[t.searchTotal?n("div",{staticClass:"member-org-detail-list-item-container"},t._l(t.searchData,(function(e){return n("member-org-tree-item",{key:e.code,attrs:{data:e,"is-selected":t.selected.some((function(t){return t.code===e.code})),"show-append":!1},on:{select:t.handleSelectItem,unselect:t.handleUnSelectItem}})})),1):n("el-empty")],1):n("div",{staticClass:"b-scroll"},[n("div",{staticClass:"member-org-detail-list-item-container"},[n("el-tree",{ref:"nodeTree",staticClass:"organization-tree",attrs:{"default-checked-keys":t.selected.map((function(t){return t.code})),indent:8,load:t.loadTreeNode,props:{label:"name",children:"children",isLeaf:"isLeaf"},"check-strictly":"",lazy:"","node-key":"code","show-checkbox":""},on:{"check-change":t.onCheckedTreeNodeChange},scopedSlots:t._u([{key:"default",fn:function(e){e.node;var r=e.data;return n("div",{staticClass:"custom-tree-node",attrs:{title:r.name+" : "+(r.type&&"user"===r.type?r.account:r.code)}},[n("div",{staticClass:"custom-tree-node-icon"},["region"===r.type||"root"===r.type?n("base-icon",{attrs:{"icon-class":"government-line"}}):t._e(),"organ"===r.type?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):t._e(),"user"===r.type?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):t._e(),"role"===r.type?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):t._e()],1),n("div",{staticClass:"custom-tree-node-name"},[t._v(" "+t._s(r.name)+" "),n("small",[t._v(t._s(r.type&&"user"===r.type?r.account:r.code))])])])}}],null,!1,3974469761)})],1)])])]),n("div",{staticClass:"tree-select-section-right"},[t.selected.length?n("div",{staticClass:"b-scroll"},[n("div",{staticClass:"member-org-detail-list-item-container"},t._l(t.selected,(function(e){return n("member-org-tree-item",{key:e.code,attrs:{data:e,"is-selected":!0,"show-append":!1},on:{unselect:t.handleUnSelectItem}})})),1)]):n("el-empty")],1),n("div",{staticClass:"tree-select-section-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{disabled:!t.selected.length,type:"primary"},on:{click:t.handleConfirm}},[t._v("确定")])],1)]):t._e(),n("div",{staticClass:"organization-selector-container",class:{"is-disabled":t.disabled},style:t.customStyle,on:{click:t.handleSelect}},[n("div",{staticClass:"organization-selector-wrapper el-select__tags"},[t.selected&&t.selected.length?n("span",[n("el-tag",{attrs:{closable:!t.disabled,size:t.collapseTagSize,type:"info"},on:{close:function(e){return t.handleCloseTag(t.selected[0])}}},["region"===t.selected[0].type?n("base-icon",{attrs:{"icon-class":"government-line"}}):t._e(),"organ"===t.selected[0].type?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):t._e(),"user"===t.selected[0].type?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):t._e(),"role"===t.selected[0].type?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):t._e(),t._v(" "+t._s(t.selected[0].name)+" ")],1),t.selected.length>1?n("el-tag",{attrs:{closable:!1,size:t.collapseTagSize,"disable-transitions":"",type:"info"}},[n("span",{staticClass:"el-select__tags-text"},[t._v("+ "+t._s(t.selected.length-1))])]):t._e()],1):t._e()]),n("el-input",{ref:"reference",class:{"is-focus":t.visible},attrs:{disabled:t.disabled,placeholder:t.selected&&t.selected.length?"":t.placeholder,readonly:t.readonly,size:t.componentSize,"validate-event":!1,type:"text"}},[n("template",{slot:"prefix"},["ORGAN"===t.optionScopeType?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):t._e(),"PERSON"===t.optionScopeType?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):t._e(),"ROLE"===t.optionScopeType?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):t._e()],1)],2)],1)],1)}),[],!1,null,null,null);e.a=m.exports},"9a1f":function(t,e,n){var r=n("da84"),o=n("c65b"),i=n("59ed"),a=n("825a"),u=n("0d51"),c=n("35a1"),s=r.TypeError;t.exports=function(t,e){var n=arguments.length<2?c(t):e;if(i(n))return a(o(n,t));throw s(u(t)+" is not iterable")}},"9bd9":function(t,e,n){"use strict";var r=n("12f6"),o=n("96a9"),i={name:"generate-card-item",components:{GenerateFormItem:r.a,GenerateColItem:o.default},props:["element","model","rules","remote","display","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.model}},watch:{model:{deep:!0,handler:function(t){this.dataModels=t}}},methods:{fillingColumns:function(t){this.$emit("fillingColumns",t)}}},a=n("2877"),u=Object(a.a)(i,(function(){var t,e=this,n=e.$createElement,r=e._self._c||n;return e.display[e.element.model]?r("el-card",{staticClass:"renderer-card",class:(t={},t[e.element.options&&e.element.options.customClass]=e.element.options&&e.element.options.customClass,t),attrs:{shadow:e.element.options.shadow}},[e.element.options&&e.element.options.showHeader?r("div",{attrs:{slot:"header"},slot:"header"},[e._v(e._s(e.element.name))]):e._e(),e._l(e.element.list,(function(t){return["grid"===t.type?r("generate-col-item",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.display,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.dataModels,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns}}):r("generate-form-item",{key:t.key,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.display,edit:e.edit,"event-function":e.eventFunction,models:e.dataModels,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules,widget:t},on:{fillingColumns:e.fillingColumns}})]}))],2):e._e()}),[],!1,null,null,null);e.a=u.exports},"9bdd":function(t,e,n){var r=n("825a"),o=n("2a62");t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){o(t,"throw",e)}}},"9bf2":function(t,e,n){var r=n("da84"),o=n("83ab"),i=n("0cfb"),a=n("aed9"),u=n("825a"),c=n("a04b"),s=r.TypeError,l=Object.defineProperty,f=Object.getOwnPropertyDescriptor;e.f=o?a?function(t,e,n){if(u(t),e=c(e),u(n),"function"==typeof t&&"prototype"===e&&"value"in n&&"writable"in n&&!n.writable){var r=f(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return l(t,e,n)}:l:function(t,e,n){if(u(t),e=c(e),u(n),i)try{return l(t,e,n)}catch(t){}if("get"in n||"set"in n)throw s("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},"9dd9":function(t,e,n){(function(t){!function(){"use strict";var e,n,r,o=function(t){var e=t;return{get:function(){return e},set:function(t){e=t}}},i=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=(e="array",function(t){return r=typeof(n=t),(null===n?"null":"object"===r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===e;var n,r}),c=function(t){return!function(t){return null==t}(t)},s=function(t){return function(e){return typeof e===t}}("function"),l=function(){},f=function(t){return function(){return t}},d=function(t){return t},m=f(!1),p=f(!0),h=function(){return g},g={fold:function(t,e){return t()},isSome:m,isNone:p,getOr:r=d,getOrThunk:n=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:f(null),getOrUndefined:f(void 0),or:r,orThunk:n,map:h,each:l,bind:h,exists:m,forall:p,filter:function(){return h()},toArray:function(){return[]},toString:f("none()")},v=function(t){var e=f(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:p,isNone:m,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return v(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:g},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},b={some:v,none:h,from:function(t){return null==t?g:v(t)}},y={},_={exports:y};!function(e,n,r,o){!function(t,o){"object"==typeof n&&void 0!==r?r.exports=o():"function"==typeof e&&e.amd?e(o):(t="undefined"!=typeof globalThis?globalThis:t||self).EphoxContactWrapper=o()}(this,(function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},n={exports:{}};!function(t){!function(e){var n=setTimeout;function r(){}function o(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(t,this)}function i(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,o._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void u(e.promise,t)}a(e.promise,r)}else(1===t._state?a:u)(e.promise,t._value)}))):t._deferreds.push(e)}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void l((r=n,i=e,function(){r.apply(i,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){u(t,e)}var r,i}function u(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn((function(){t._handled||o._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)i(t,t._deferreds[e]);t._deferreds=null}function s(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function l(t,e){var n=!1;try{t((function(t){n||(n=!0,a(e,t))}),(function(t){n||(n=!0,u(e,t))}))}catch(t){if(n)return;n=!0,u(e,t)}}o.prototype.catch=function(t){return this.then(null,t)},o.prototype.then=function(t,e){var n=new this.constructor(r);return i(this,new s(t,e,n)),n},o.all=function(t){var e=Array.prototype.slice.call(t);return new o((function(t,n){if(0===e.length)return t([]);var r=e.length;function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(t){o(i,t)}),n)}e[i]=a,0==--r&&t(e)}catch(t){n(t)}}for(var i=0;i<e.length;i++)o(i,e[i])}))},o.resolve=function(t){return t&&"object"==typeof t&&t.constructor===o?t:new o((function(e){e(t)}))},o.reject=function(t){return new o((function(e,n){n(t)}))},o.race=function(t){return new o((function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)}))},o._immediateFn="function"==typeof setImmediate?function(t){setImmediate(t)}:function(t){n(t,0)},o._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console},o._setImmediateFn=function(t){o._immediateFn=t},o._setUnhandledRejectionFn=function(t){o._unhandledRejectionFn=t},t.exports?t.exports=o:e.Promise||(e.Promise=o)}(e)}(n);var r=n.exports;return{boltExport:("undefined"!=typeof window?window:Function("return this;")()).Promise||r}}))}(void 0,y,_);var w=_.exports.boltExport,x=function(t,e){return C(document.createElement("canvas"),t,e)},O=function(t){var e=x(t.width,t.height);return S(e).drawImage(t,0,0),e},S=function(t){return t.getContext("2d")},C=function(t,e,n){return t.width=e,t.height=n,t},k=function(t){return new w((function(e,n){var r=URL.createObjectURL(t),o=new Image,i=function(){o.removeEventListener("load",a),o.removeEventListener("error",u)},a=function(){i(),e(o)},u=function(){i(),n("Unable to load data of type "+t.type+": "+r)};o.addEventListener("load",a),o.addEventListener("error",u),o.src=r,o.complete&&setTimeout(a,0)}))},E=function(t){return new w((function(e,n){var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="blob",r.onload=function(){200===this.status&&e(this.response)},r.onerror=function(){var t,e=this;n(0===this.status?((t=new Error("No access to download image")).code=18,t.name="SecurityError",t):new Error("Error "+e.status+" downloading image"))},r.send()}))},M=function(t){return new w((function(e,n){(function(t){var e=t.split(","),n=/data:([^;]+)/.exec(e[0]);if(!n)return b.none();for(var r=n[1],o=e[1],i=atob(o),a=i.length,u=Math.ceil(a/1024),c=new Array(u),s=0;s<u;++s){for(var l=1024*s,f=Math.min(l+1024,a),d=new Array(f-l),m=l,p=0;m<f;++p,++m)d[p]=i[m].charCodeAt(0);c[s]=new Uint8Array(d)}return b.some(new Blob(c,{type:r}))})(t).fold((function(){n("uri is not base64: "+t)}),e)}))},T=function(t,e,n){return e=e||"image/png",s(HTMLCanvasElement.prototype.toBlob)?new w((function(r,o){t.toBlob((function(t){t?r(t):o()}),e,n)})):M(t.toDataURL(e,n))},D=function(t){URL.revokeObjectURL(t.src)},A=function(t){return function(t){var e=t.src;return 0===e.indexOf("data:")?M(e):E(e)}(t)},P=Array.prototype.indexOf,R=function(t,e){return n=t,r=e,P.call(n,r)>-1;var n,r},I=function(t,e){for(var n=0,r=t.length;n<r;n++){e(t[n],n)}},z=function(t,e){return function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return b.some(i);if(n(i,r))break}return b.none()}(t,e,m)},L=function(t,e){for(var n=0,r=t.length;n<r;++n){if(!0!==e(t[n],n))return!1}return!0},j=Object.keys;(function(t){if(!u(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};I(t,(function(r,o){var i=j(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],c=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!u(c))throw new Error("case arguments must be an array");e.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==c.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+c.length+" ("+c+"), got "+i);var u=function(t){var r=j(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));if(!L(e,(function(t){return R(r,t)})))throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[a].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:u,log:function(t){}}}}))})([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var B=function(t,e,n){var r=e.type,o=f(r),i=f(n),a=function(e,n){return t.then((function(t){return function(t,e,n){return e=e||"image/png",t.toDataURL(e,n)}(t,e,n)}))};return{getType:o,toBlob:function(){return w.resolve(e)},toDataURL:i,toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(e,n){return t.then((function(t){return T(t,e,n)}))},toAdjustedDataURL:a,toAdjustedBase64:function(t,e){return a(t,e).then((function(t){return t.split(",")[1]}))},toCanvas:function(){return t.then(O)}}},F=function(t){return function(t){return new w((function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)}))}(t).then((function(e){return B(function(t){return k(t).then((function(t){D(t);var e=x(function(t){return t.naturalWidth||t.width}(t),function(t){return t.naturalHeight||t.height}(t));return S(e).drawImage(t,0,0),e}))}(t),t,e)}))},N=function(t,e){return T(t,e).then((function(e){return B(w.resolve(t),e,t.toDataURL())}))},H=function(t,e){void 0===e&&(e=2);var n=Math.pow(10,e),r=Math.round(t*n);return Math.ceil(r/n)},V=function(t,e,n){var r=(n<0?360+n:n)*Math.PI/180,o=t.width,i=t.height,a=Math.sin(r),u=Math.cos(r),c=H(Math.abs(o*u)+Math.abs(i*a)),s=H(Math.abs(o*a)+Math.abs(i*u)),l=x(c,s),f=S(l);return f.translate(c/2,s/2),f.rotate(r),f.drawImage(t,-o/2,-i/2),N(l,e)},U=function(t,e,n){var r=x(t.width,t.height),o=S(r);return"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0)),N(r,e)},W=function(t,e){return function(t,e){return t.toCanvas().then((function(n){return U(n,t.getType(),e)}))}(t,e)},$=function(t,e){return function(t,e){return t.toCanvas().then((function(n){return V(n,t.getType(),e)}))}(t,e)},G=function(t,e,n){return void 0===n&&(n=!1),new w((function(r){var o=new XMLHttpRequest;o.onreadystatechange=function(){4===o.readyState&&r({status:o.status,blob:o.response})},o.open("GET",t,!0),o.withCredentials=n,function(t,e){for(var n=j(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}}(e,(function(t,e){o.setRequestHeader(e,t)})),o.responseType="blob",o.send()}))},K=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],q=[{type:"not_found",message:"Failed to load image."},{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],X=function(t,e){var n,r,o=(n=function(t,e){return c(t)?t[e]:void 0},r=t,I(e,(function(t,e){r=n(r,t,e)})),r);return b.from(o)},Y=function(t){var e=function(t){return"ImageProxy HTTP error: "+z(K,(function(e){return t===e.code})).fold(f("Unknown ImageProxy error"),(function(t){return t.message}))}(t);return w.reject(e)},J=function(t){return z(q,(function(e){return e.type===t})).fold(f("Unknown service error"),(function(t){return t.message}))},Q=function(t){return"ImageProxy Service error: "+function(t){try{return b.some(JSON.parse(t))}catch(t){return b.none()}}(t).bind((function(t){return X(t,["error","type"]).map(J)})).getOr("Invalid JSON in service error message")},Z=function(t){return function(t){return new w((function(e,n){var r=new FileReader;r.onload=function(){e(r.result)},r.onerror=function(t){n(t)},r.readAsText(t)}))}(t).then((function(t){var e=Q(t);return w.reject(e)}))},tt=function(t){return t<200||t>=300},et=function(t,e){var n={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":e};return G(function(t,e){var n=-1===t.indexOf("?")?"?":"&";return/[?&]apiKey=/.test(t)?t:t+n+"apiKey="+encodeURIComponent(e)}(t,e),n).then((function(t){return tt(t.status)?(e=t.status,n=t.blob,function(t,e){return"application/json"===(null==e?void 0:e.type)&&(400===t||403===t||404===t||500===t)}(e,n)?Z(n):Y(e)):w.resolve(t.blob);var e,n}))},nt=function(t,e,n){return void 0===n&&(n=!1),e?et(t,e):function(t,e){return G(t,{},e).then((function(t){return tt(t.status)?Y(t.status):w.resolve(t.blob)}))}(t,n)},rt=function(t){return F(t)},ot=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},it={fromHtml:function(t,e){var n=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||n.childNodes.length>1)throw new Error("HTML must have a single root node");return ot(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return ot(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return ot(n)},fromDom:ot,fromPoint:function(t,e,n){return b.from(t.dom.elementFromPoint(e,n)).map(ot)}};"undefined"!=typeof window?window:Function("return this;")();var at=function(t,e){return function(t,e){return z(t.dom.childNodes,(function(t){return e(it.fromDom(t))})).map(it.fromDom)}(t,(function(t){return function(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}(t,e)}))},ut=tinymce.util.Tools.resolve("tinymce.util.Delay"),ct=tinymce.util.Tools.resolve("tinymce.util.Promise"),st=tinymce.util.Tools.resolve("tinymce.util.URI"),lt=function(t){return t.getParam("imagetools_toolbar","rotateleft rotateright flipv fliph editimage imageoptions")},ft=function(t){return t.getParam("imagetools_proxy")},dt=function(t){var e,n,r=function(t){return/^[0-9\.]+px$/.test(t)};return e=t.style.width,n=t.style.height,e||n?r(e)&&r(n)?{w:parseInt(e,10),h:parseInt(n,10)}:null:(e=t.width,n=t.height,e&&n?{w:parseInt(e,10),h:parseInt(n,10)}:null)},mt=function(t){return{w:t.naturalWidth,h:t.naturalHeight}},pt=0,ht=function(t){return at(it.fromDom(t),"img")},gt=function(t,e){return t.dom.is(e,"figure")},vt=function(t,e){return t.dom.is(e,"img:not([data-mce-object],[data-mce-placeholder])")},bt=function(t,e){var n=function(e){return vt(t,e)&&(xt(t,e)||Ot(t,e)||c(ft(t)))};return gt(t,e)?ht(e).bind((function(t){return n(t.dom)?b.some(t.dom):b.none()})):n(e)?b.some(e):b.none()},yt=function(t,e){t.notificationManager.open({text:e,type:"error"})},_t=function(t){var e=t.selection.getNode(),n=t.dom.getParent(e,"figure.image");return null!==n&>(t,n)?ht(n):vt(t,e)?b.some(it.fromDom(e)):b.none()},wt=function(t,e,n){var r=e.match(/(?:\/|^)(([^\/\?]+)\.(?:[a-z0-9.]+))(?:\?|$)/i);return c(r)?t.dom.encode(r[n]):null},xt=function(t,e){var n=e.src;return 0===n.indexOf("data:")||0===n.indexOf("blob:")||new st(n).host===t.documentBaseURI.host},Ot=function(t,e){return-1!==a.inArray(function(t){return t.getParam("imagetools_cors_hosts",[],"string[]")}(t),new st(e.src).host)},St=function(t,e){if(Ot(t,e))return nt(e.src,null,function(t,e){return-1!==a.inArray(function(t){return t.getParam("imagetools_credentials_hosts",[],"string[]")}(t),new st(e.src).host)}(t,e));if(!xt(t,e)){var n=ft(t),r=n+(-1===n.indexOf("?")?"?":"&")+"url="+encodeURIComponent(e.src),o=function(t){return t.getParam("api_key",t.getParam("imagetools_api_key","","string"),"string")}(t);return nt(r,o,!1)}return A(e)},Ct=function(t,e){return function(t){return b.from(t.getParam("imagetools_fetch_image",null,"function"))}(t).fold((function(){return St(t,e)}),(function(t){return t(e)}))},kt=function(t,e){var n=t.editorUpload.blobCache.getByUri(e.src);return n?ct.resolve(n.blob()):Ct(t,e)},Et=function(t){ut.clearTimeout(t.get())},Mt=function(t,e,n,r,o,i,a){return n.toBlob().then((function(u){var s,l,f,d,m=t.editorUpload.blobCache;s=i.src;var p=e.type===u.type;return function(t){return t.getParam("images_reuse_filename",!1,"boolean")}(t)&&(d=m.getByUri(s),c(d)?(s=d.uri(),l=d.name(),f=d.filename()):(l=wt(t,s,2),f=wt(t,s,1))),d=m.create({id:"imagetools"+pt++,blob:u,base64:n.toBase64(),uri:s,name:l,filename:p?f:void 0}),m.add(d),t.undoManager.transact((function(){var e=function(){t.$(i).off("load",e),t.nodeChanged(),r?t.editorUpload.uploadImagesAuto():(Et(o),function(t,e){var n=ut.setEditorTimeout(t,(function(){t.editorUpload.uploadImagesAuto()}),function(t){return t.getParam("images_upload_timeout",3e4,"number")}(t));e.set(n)}(t,o))};t.$(i).on("load",e),a&&t.$(i).attr({width:a.w,height:a.h}),t.$(i).attr({src:d.blobUri()}).removeAttr("data-mce-src")})),d}))},Tt=function(t,e,n,r){return function(){return _t(t).fold((function(){yt(t,"Could not find selected image")}),(function(o){return t._scanForImages().then((function(){return kt(t,o.dom)})).then((function(i){return rt(i).then(n).then((function(n){return Mt(t,i,n,!1,e,o.dom,r)}))})).catch((function(e){yt(t,e)}))}))}},Dt=function(t,e,n){return function(){var r=_t(t).map((function(t){var e=dt(t.dom);return e?{w:e.h,h:e.w}:null})).getOrNull();return Tt(t,e,(function(t){return $(t,n)}),r)()}},At=function(t,e,n){return function(){return Tt(t,e,(function(t){return W(t,n)}))()}},Pt=function(t,e,n,r,o){return function(t){return k(t)}(o).then((function(t){var e=mt(t);return r.w===e.w&&r.h===e.h||dt(n)&&function(t,e){var n,r;e&&(n=t.style.width,r=t.style.height,(n||r)&&(t.style.width=e.w+"px",t.style.height=e.h+"px",t.removeAttribute("data-mce-style")),n=t.width,r=t.height,(n||r)&&(t.setAttribute("width",String(e.w)),t.setAttribute("height",String(e.h))))}(n,e),URL.revokeObjectURL(t.src),o})).then(rt).then((function(r){return Mt(t,o,r,!0,e,n)}))},Rt=function(t,e){return function(){var n=_t(t),r=n.map((function(t){return mt(t.dom)}));n.each((function(o){bt(t,o.dom).each((function(i){kt(t,o.dom).then((function(o){var i=function(t){return{blob:t,url:URL.createObjectURL(t)}}(o);t.windowManager.open({title:"Edit Image",size:"large",body:{type:"panel",items:[{type:"imagetools",name:"imagetools",label:"Edit Image",currentState:i}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0,disabled:!0}],onSubmit:function(o){var i=o.getData().imagetools.blob;n.each((function(n){r.each((function(r){Pt(t,e,n.dom,r,i)}))})),o.close()},onCancel:l,onAction:function(t,e){switch(e.name){case"save-state":e.value?t.enable("save"):t.disable("save");break;case"disable":t.disable("save"),t.disable("cancel");break;case"enable":t.enable("cancel")}}})}))}))}))}};i.add("imagetools",(function(t){var e=o(0),n=o(null);!function(t,e){a.each({mceImageRotateLeft:Dt(t,e,-90),mceImageRotateRight:Dt(t,e,90),mceImageFlipVertical:At(t,e,"v"),mceImageFlipHorizontal:At(t,e,"h"),mceEditImage:Rt(t,e)},(function(e,n){t.addCommand(n,e)}))}(t,e),function(t){var e=[],n=function(e){return function(){return t.execCommand(e)}},r=function(){return _t(t).exists((function(e){return bt(t,e.dom).isSome()}))},o=function(t){var n=function(e){return t.setDisabled(!e)};return n(r()),e=e.concat([n]),function(){e=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n}(e,(function(t){return t!==n}))}};t.on("NodeChange",(function(){var t=r();I(e,(function(e){return e(t)}))})),t.ui.registry.addButton("rotateleft",{tooltip:"Rotate counterclockwise",icon:"rotate-left",onAction:n("mceImageRotateLeft"),onSetup:o}),t.ui.registry.addButton("rotateright",{tooltip:"Rotate clockwise",icon:"rotate-right",onAction:n("mceImageRotateRight"),onSetup:o}),t.ui.registry.addButton("flipv",{tooltip:"Flip vertically",icon:"flip-vertically",onAction:n("mceImageFlipVertical"),onSetup:o}),t.ui.registry.addButton("fliph",{tooltip:"Flip horizontally",icon:"flip-horizontally",onAction:n("mceImageFlipHorizontal"),onSetup:o}),t.ui.registry.addButton("editimage",{tooltip:"Edit image",icon:"edit-image",onAction:n("mceEditImage"),onSetup:o}),t.ui.registry.addButton("imageoptions",{tooltip:"Image options",icon:"image",onAction:n("mceImage")}),t.ui.registry.addContextMenu("imagetools",{update:function(e){return bt(t,e).map((function(t){return{text:"Edit image",icon:"edit-image",onAction:n("mceEditImage")}})).toArray()}})}(t),function(t){t.ui.registry.addContextToolbar("imagetools",{items:lt(t),predicate:function(e){return bt(t,e).isSome()},position:"node",scope:"node"})}(t),function(t,e,n){t.on("NodeChange",(function(r){var o=n.get(),i=bt(t,r.element);o&&!i.exists((function(t){return o.src===t.src}))&&(Et(e),t.editorUpload.uploadImagesAuto(),n.set(null)),i.each(n.set)}))}(t,e,n)}))}()}).call(this,n("c8ba"))},"9ed3":function(t,e,n){"use strict";var r=n("ae93").IteratorPrototype,o=n("7c73"),i=n("5c6c"),a=n("d44e"),u=n("3f8c"),c=function(){return this};t.exports=function(t,e,n,s){var l=e+" Iterator";return t.prototype=o(r,{next:i(+!s,n)}),a(t,l,!1,!0),u[l]=c,t}},"9f7f":function(t,e,n){var r=n("d039"),o=n("da84").RegExp,i=r((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),a=i||r((function(){return!o("a","y").sticky})),u=i||r((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:u,MISSED_STICKY:a,UNSUPPORTED_Y:i}},"9ffa":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITF14=e.ITF=void 0;var r=i(n("3c7c")),o=i(n("07df"));function i(t){return t&&t.__esModule?t:{default:t}}e.ITF=r.default,e.ITF14=o.default},a04b:function(t,e,n){var r=n("c04e"),o=n("d9b5");t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},a15b:function(t,e,n){"use strict";var r=n("23e7"),o=n("e330"),i=n("44ad"),a=n("fc6a"),u=n("a640"),c=o([].join),s=i!=Object,l=u("join",",");r({target:"Array",proto:!0,forced:s||!l},{join:function(t){return c(a(this),void 0===t?",":t)}})},a2b0:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=[];return function t(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)t(n[r]);else n.text=n.text||"",n.data=n.data||"",e.push(n)}(t),e}},a434:function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("23cb"),a=n("5926"),u=n("07fa"),c=n("7b0b"),s=n("65f0"),l=n("8418"),f=n("1dde")("splice"),d=o.TypeError,m=Math.max,p=Math.min;r({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var n,r,o,f,h,g,v=c(this),b=u(v),y=i(t,b),_=arguments.length;if(0===_?n=r=0:1===_?(n=0,r=b-y):(n=_-2,r=p(m(a(e),0),b-y)),b+n-r>9007199254740991)throw d("Maximum allowed length exceeded");for(o=s(v,r),f=0;f<r;f++)(h=y+f)in v&&l(o,f,v[h]);if(o.length=r,n<r){for(f=y;f<b-r;f++)g=f+n,(h=f+r)in v?v[g]=v[h]:delete v[g];for(f=b;f>b-r+n;f--)delete v[f-1]}else if(n>r)for(f=b-r;f>y;f--)g=f+n-1,(h=f+r-1)in v?v[g]=v[h]:delete v[g];for(f=0;f<n;f++)v[f+y]=arguments[f+2];return v.length=b-r+n,o}})},a4b4:function(t,e,n){var r=n("342f");t.exports=/web0s(?!.*chrome)/i.test(r)},a4d3:function(t,e,n){n("d9f5"),n("b4f8"),n("c513"),n("e9c4"),n("5a47")},a4f8:function(t,e,n){"use strict";n("182a")},a5d2:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n("c243"),i=a(n("5726"));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var t=o.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,i.default)(this.data,t,"01"),text:this.text}}}]),e}(a(n("e762")).default);e.default=u},a630:function(t,e,n){var r=n("23e7"),o=n("4df4");r({target:"Array",stat:!0,forced:!n("1c7e")((function(t){Array.from(t)}))},{from:o})},a640:function(t,e,n){"use strict";var r=n("d039");t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},a92d:function(t,e,n){},a9e3:function(t,e,n){"use strict";var r=n("83ab"),o=n("da84"),i=n("e330"),a=n("94ca"),u=n("cb2d"),c=n("1a2d"),s=n("7156"),l=n("3a9b"),f=n("d9b5"),d=n("c04e"),m=n("d039"),p=n("241c").f,h=n("06cf").f,g=n("9bf2").f,v=n("408a"),b=n("58a8").trim,y=o.Number,_=y.prototype,w=o.TypeError,x=i("".slice),O=i("".charCodeAt),S=function(t){var e=d(t,"number");return"bigint"==typeof e?e:C(e)},C=function(t){var e,n,r,o,i,a,u,c,s=d(t,"number");if(f(s))throw w("Cannot convert a Symbol value to a number");if("string"==typeof s&&s.length>2)if(s=b(s),43===(e=O(s,0))||45===e){if(88===(n=O(s,2))||120===n)return NaN}else if(48===e){switch(O(s,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+s}for(a=(i=x(s,2)).length,u=0;u<a;u++)if((c=O(i,u))<48||c>o)return NaN;return parseInt(i,r)}return+s};if(a("Number",!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var k,E=function(t){var e=arguments.length<1?0:y(S(t)),n=this;return l(_,n)&&m((function(){v(n)}))?s(Object(e),n,E):e},M=r?p(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),T=0;M.length>T;T++)c(y,k=M[T])&&!c(E,k)&&g(E,k,h(y,k));E.prototype=_,_.constructor=E,u(o,"Number",E,{constructor:!0})}},aab3:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(n("5261")),o=i(n("ca32"));function i(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){var e={};for(var n in o.default)o.default.hasOwnProperty(n)&&(t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(e[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(e[n]=t.getAttribute("data-"+n.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,r.default)(e)}},ab13:function(t,e,n){var r=n("b622")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},ab36:function(t,e,n){var r=n("861d"),o=n("9112");t.exports=function(t,e){r(e)&&"cause"in e&&o(t,"cause",e.cause)}},ab5b:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var r,o=n("fd7c"),i=(r=o)&&r.__esModule?r:{default:r};function a(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function u(t,e,n){if(n.displayValue&&e<t){if("center"==n.textAlign)return Math.floor((t-e)/2);if("left"==n.textAlign)return 0;if("right"==n.textAlign)return Math.floor(t-e)}return 0}function c(t,e,n){var r;if(n)r=n;else{if("undefined"==typeof document)return 0;r=document.createElement("canvas").getContext("2d")}r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var o=r.measureText(t);return o?o.width:0}e.getMaximumHeightOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)t[n].height>e&&(e=t[n].height);return e},e.getEncodingHeight=a,e.getBarcodePadding=u,e.calculateEncodingAttributes=function(t,e,n){for(var r=0;r<t.length;r++){var o,s=t[r],l=(0,i.default)(e,s.options);o=l.displayValue?c(s.text,l,n):0;var f=s.data.length*l.width;s.width=Math.ceil(Math.max(o,f)),s.height=a(s,l),s.barcodePadding=u(o,f,l)}},e.getTotalWidthOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].width;return e}},ac1f:function(t,e,n){"use strict";var r=n("23e7"),o=n("9263");r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},ad6d:function(t,e,n){"use strict";var r=n("825a");t.exports=function(){var t=r(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},addb:function(t,e,n){var r=n("4dae"),o=Math.floor,i=function(t,e){var n=t.length,c=o(n/2);return n<8?a(t,e):u(t,i(r(t,0,c),e),i(r(t,c),e),e)},a=function(t,e){for(var n,r,o=t.length,i=1;i<o;){for(r=i,n=t[i];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==i++&&(t[r]=n)}return t},u=function(t,e,n,r){for(var o=e.length,i=n.length,a=0,u=0;a<o||u<i;)t[a+u]=a<o&&u<i?r(e[a],n[u])<=0?e[a++]:n[u++]:a<o?e[a++]:n[u++];return t};t.exports=i},ade3:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},ae68:function(t,e){!function(){"use strict";var t=Object.hasOwnProperty,e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),o=function(t){return t.getParam("min_height",t.getElement().offsetHeight,"number")},i=function(t,e,n,o,a){r.setEditorTimeout(t,(function(){c(t,e),n--?i(t,e,n,o,a):a&&a()}),o)},a=function(t,e){var n=t.getBody();n&&(n.style.overflowY=e?"":"hidden",e||(n.scrollTop=0))},u=function(t,e,n,r){var o=parseInt(t.getStyle(e,n,r),10);return isNaN(o)?0:o},c=function(t,e,r){var i=t.dom,s=t.getDoc();if(s)if(function(t){return t.plugins.fullscreen&&t.plugins.fullscreen.isFullscreen()}(t))a(t,!0);else{var l=s.documentElement,f=function(t){return t.getParam("autoresize_bottom_margin",50,"number")}(t),d=o(t),m=u(i,l,"margin-top",!0),p=u(i,l,"margin-bottom",!0),h=l.offsetHeight+m+p+f;h<0&&(h=0);var g=t.getContainer().offsetHeight-t.getContentAreaContainer().offsetHeight;h+g>o(t)&&(d=h+g);var v=function(t){return t.getParam("max_height",0,"number")}(t);if(v&&d>v?(d=v,a(t,!0)):a(t,!1),d!==e.get()){var b=d-e.get();if(i.setStyle(t.getContainer(),"height",d+"px"),e.set(d),function(t){t.fire("ResizeEditor")}(t),n.browser.isSafari()&&n.mac){var y=t.getWin();y.scrollTo(y.pageXOffset,y.pageYOffset)}t.hasFocus()&&function(t){if("setcontent"===(null==t?void 0:t.type.toLowerCase())){var e=t;return!0===e.selection||!0===e.paste}return!1}(r)&&t.selection.scrollIntoView(),n.webkit&&b<0&&c(t,e,r)}}};e.add("autoresize",(function(e){var n,r,o;if(n=e.settings,r="resize",t.call(n,r)||(e.settings.resize=!1),!e.inline){var a=(o=0,{get:function(){return o},set:function(t){o=t}});!function(t,e){t.addCommand("mceAutoResize",(function(){c(t,e)}))}(e,a),function(t,e){t.on("init",(function(){var e=function(t){return t.getParam("autoresize_overflow_padding",1,"number")}(t),n=t.dom;n.setStyles(t.getDoc().documentElement,{height:"auto"}),n.setStyles(t.getBody(),{paddingLeft:e,paddingRight:e,"min-height":0})})),t.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(function(n){c(t,e,n)})),function(t){return t.getParam("autoresize_on_init",!0,"boolean")}(t)&&t.on("init",(function(){i(t,e,20,100,(function(){i(t,e,5,1e3)}))}))}(e,a)}}))}()},ae93:function(t,e,n){"use strict";var r,o,i,a=n("d039"),u=n("1626"),c=n("7c73"),s=n("e163"),l=n("cb2d"),f=n("b622"),d=n("c430"),m=f("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(r=o):p=!0),null==r||a((function(){var t={};return r[m].call(t)!==t}))?r={}:d&&(r=c(r)),u(r[m])||l(r,m,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},aeb0:function(t,e,n){var r=n("9bf2").f;t.exports=function(t,e,n){n in t||r(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},aed9:function(t,e,n){var r=n("83ab"),o=n("d039");t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},af91:function(t,e,n){},b041:function(t,e,n){"use strict";var r=n("00ee"),o=n("f5df");t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},b0c0:function(t,e,n){var r=n("83ab"),o=n("5e77").EXISTS,i=n("e330"),a=n("9bf2").f,u=Function.prototype,c=i(u.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(s.exec);r&&!o&&a(u,"name",{configurable:!0,get:function(){try{return l(s,c(this))[1]}catch(t){return""}}})},b1d8:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="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},o=u(n("aab3")),i=u(n("752b")),a=n("dca2");function u(t){return t&&t.__esModule?t:{default:t}}function c(t){if("string"==typeof t)return function(t){var e=document.querySelectorAll(t);if(0===e.length)return;for(var n=[],r=0;r<e.length;r++)n.push(c(e[r]));return n}(t);if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)e.push(c(t[n]));return e}if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLImageElement)return u=t,{element:s=document.createElement("canvas"),options:(0,o.default)(u),renderer:i.default.CanvasRenderer,afterRender:function(){u.setAttribute("src",s.toDataURL())}};if(t&&t.nodeName&&"svg"===t.nodeName.toLowerCase()||"undefined"!=typeof SVGElement&&t instanceof SVGElement)return{element:t,options:(0,o.default)(t),renderer:i.default.SVGRenderer};if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)return{element:t,options:(0,o.default)(t),renderer:i.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:i.default.CanvasRenderer};if(t&&"object"===(void 0===t?"undefined":r(t))&&!t.nodeName)return{element:t,renderer:i.default.ObjectRenderer};throw new a.InvalidElementException;var u,s}e.default=c},b42e:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?r:n)(e)}},b4f8:function(t,e,n){var r=n("23e7"),o=n("d066"),i=n("1a2d"),a=n("577e"),u=n("5692"),c=n("3d87"),s=u("string-to-symbol-registry"),l=u("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{for:function(t){var e=a(t);if(i(s,e))return s[e];var n=o("Symbol")(e);return s[e]=n,l[n]=e,n}})},b50d:function(t,e,n){"use strict";var r=n("c532"),o=n("467f"),i=n("30b5"),a=n("c345"),u=n("3934"),c=n("2d83");t.exports=function(t){return new Promise((function(e,s){var l=t.data,f=t.headers;r.isFormData(l)&&delete f["Content-Type"];var d=new XMLHttpRequest;if(t.auth){var m=t.auth.username||"",p=t.auth.password||"";f.Authorization="Basic "+btoa(m+":"+p)}if(d.open(t.method.toUpperCase(),i(t.url,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?a(d.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:t,request:d};o(e,s,r),d=null}},d.onerror=function(){s(c("Network Error",t,null,d)),d=null},d.ontimeout=function(){s(c("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var h=n("7aac"),g=(t.withCredentials||u(t.url))&&t.xsrfCookieName?h.read(t.xsrfCookieName):void 0;g&&(f[t.xsrfHeaderName]=g)}if("setRequestHeader"in d&&r.forEach(f,(function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete f[e]:d.setRequestHeader(e,t)})),t.withCredentials&&(d.withCredentials=!0),t.responseType)try{d.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){d&&(d.abort(),s(t),d=null)})),void 0===l&&(l=null),d.send(l)}))}},b575:function(t,e,n){var r,o,i,a,u,c,s,l,f=n("da84"),d=n("0366"),m=n("06cf").f,p=n("2cf4").set,h=n("1cdc"),g=n("d4c3"),v=n("a4b4"),b=n("605d"),y=f.MutationObserver||f.WebKitMutationObserver,_=f.document,w=f.process,x=f.Promise,O=m(f,"queueMicrotask"),S=O&&O.value;S||(r=function(){var t,e;for(b&&(t=w.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},h||b||v||!y||!_?!g&&x&&x.resolve?((s=x.resolve(void 0)).constructor=x,l=d(s.then,s),a=function(){l(r)}):b?a=function(){w.nextTick(r)}:(p=d(p,f),a=function(){p(r)}):(u=!0,c=_.createTextNode(""),new y(r).observe(c,{characterData:!0}),a=function(){c.data=u=!u})),t.exports=S||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},b622:function(t,e,n){var r=n("da84"),o=n("5692"),i=n("1a2d"),a=n("90e3"),u=n("4930"),c=n("fdbf"),s=o("wks"),l=r.Symbol,f=l&&l.for,d=c?l:l&&l.withoutSetter||a;t.exports=function(t){if(!i(s,t)||!u&&"string"!=typeof s[t]){var e="Symbol."+t;u&&i(l,t)?s[t]=l[t]:s[t]=c&&f?f(e):d(e)}return s[t]}},b64b:function(t,e,n){var r=n("23e7"),o=n("7b0b"),i=n("df75");r({target:"Object",stat:!0,forced:n("d039")((function(){i(1)}))},{keys:function(t){return i(o(t))}})},b680:function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("e330"),a=n("5926"),u=n("408a"),c=n("1148"),s=n("d039"),l=o.RangeError,f=o.String,d=Math.floor,m=i(c),p=i("".slice),h=i(1..toFixed),g=function(t,e,n){return 0===e?n:e%2==1?g(t,e-1,n*t):g(t*t,e/2,n)},v=function(t,e,n){for(var r=-1,o=n;++r<6;)o+=e*t[r],t[r]=o%1e7,o=d(o/1e7)},b=function(t,e){for(var n=6,r=0;--n>=0;)r+=t[n],t[n]=d(r/e),r=r%e*1e7},y=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var r=f(t[e]);n=""===n?r:n+m("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:s((function(){return"0.000"!==h(8e-5,3)||"1"!==h(.9,0)||"1.25"!==h(1.255,2)||"1000000000000000128"!==h(0xde0b6b3a7640080,0)}))||!s((function(){h({})}))},{toFixed:function(t){var e,n,r,o,i=u(this),c=a(t),s=[0,0,0,0,0,0],d="",h="0";if(c<0||c>20)throw l("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return f(i);if(i<0&&(d="-",i=-i),i>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(i*g(2,69,1))-69)<0?i*g(2,-e,1):i/g(2,e,1),n*=4503599627370496,(e=52-e)>0){for(v(s,0,n),r=c;r>=7;)v(s,1e7,0),r-=7;for(v(s,g(10,r,1),0),r=e-1;r>=23;)b(s,1<<23),r-=23;b(s,1<<r),v(s,1,1),b(s,2),h=y(s)}else v(s,0,n),v(s,1<<-e,0),h=y(s)+m("0",c);return h=c>0?d+((o=h.length)<=c?"0."+m("0",c-o)+h:p(h,0,o-c)+"."+p(h,o-c)):d+h}})},b727:function(t,e,n){var r=n("0366"),o=n("e330"),i=n("44ad"),a=n("7b0b"),u=n("07fa"),c=n("65f0"),s=o([].push),l=function(t){var e=1==t,n=2==t,o=3==t,l=4==t,f=6==t,d=7==t,m=5==t||f;return function(p,h,g,v){for(var b,y,_=a(p),w=i(_),x=r(h,g),O=u(w),S=0,C=v||c,k=e?C(p,O):n||d?C(p,0):void 0;O>S;S++)if((m||S in w)&&(y=x(b=w[S],S,_),t))if(e)k[S]=y;else if(y)switch(t){case 3:return!0;case 5:return b;case 6:return S;case 2:s(k,b)}else switch(t){case 4:return!1;case 7:s(k,b)}return f?-1:o||l?l:k}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},b980:function(t,e,n){var r=n("d039"),o=n("5c6c");t.exports=!r((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",o(1,7)),7!==t.stack)}))},bb2f:function(t,e,n){var r=n("d039");t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},bb5d:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("f08e"),o=function(t){return t.match(new RegExp("^"+r.A_CHARS+"*"))[0].length},i=function(t){return t.match(new RegExp("^"+r.B_CHARS+"*"))[0].length},a=function(t){return t.match(new RegExp("^"+r.C_CHARS+"*"))[0]};function u(t,e){var n=e?r.A_CHARS:r.B_CHARS,o=t.match(new RegExp("^("+n+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(o)return o[1]+String.fromCharCode(204)+c(t.substring(o[1].length));var i=t.match(new RegExp("^"+n+"+"))[0];return i.length===t.length?t:i+String.fromCharCode(e?205:206)+u(t.substring(i.length),!e)}function c(t){var e=a(t),n=e.length;if(n===t.length)return t;t=t.substring(n);var r=o(t)>=i(t);return e+String.fromCharCode(r?206:205)+u(t,r)}e.default=function(t){var e=void 0;if(a(t).length>=2)e=r.C_START_CHAR+c(t);else{var n=o(t)>i(t);e=(n?r.A_START_CHAR:r.B_START_CHAR)+u(t,n)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,(function(t,e){return String.fromCharCode(203)+e}))}},bc3a:function(t,e,n){t.exports=n("cee4")},bc54:function(t,e,n){n("7c4f")},bd8a:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.api=e}return r(t,[{key:"handleCatch",value:function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(t){return this.handleCatch(t),this.api}}}]),t}();e.default=o},bdfe:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n("c243"),i=a(n("5726"));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.fontSize=!n.flat&&n.fontSize>10*n.width?10*n.width:n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(t,e){return this.text.substr(t,e)}},{key:"leftEncode",value:function(t,e){return(0,i.default)(t,e)}},{key:"rightText",value:function(t,e){return this.text.substr(t,e)}},{key:"rightEncode",value:function(t,e){return(0,i.default)(t,e)}},{key:"encodeGuarded",value:function(){var t={fontSize:this.fontSize},e={height:this.guardHeight};return[{data:o.SIDE_BIN,options:e},{data:this.leftEncode(),text:this.leftText(),options:t},{data:o.MIDDLE_BIN,options:e},{data:this.rightEncode(),text:this.rightText(),options:t},{data:o.SIDE_BIN,options:e}]}},{key:"encodeFlat",value:function(){return{data:[o.SIDE_BIN,this.leftEncode(),o.MIDDLE_BIN,this.rightEncode(),o.SIDE_BIN].join(""),text:this.text}}}]),e}(a(n("e762")).default);e.default=u},be5e:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("fd7c"),a=(r=i)&&r.__esModule?r:{default:r},u=n("ab5b");var c="http://www.w3.org/2000/svg",s=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.svg=e,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return o(t,[{key:"render",value:function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e<this.encodings.length;e++){var n=this.encodings[e],r=(0,a.default)(this.options,n.options),o=this.createGroup(t,r.marginTop,this.svg);this.setGroupOptions(o,r),this.drawSvgBarcode(o,r,n),this.drawSVGText(o,r,n),t+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,u.calculateEncodingAttributes)(this.encodings,this.options);var t=(0,u.getTotalWidthOfEncodings)(this.encodings),e=(0,u.getMaximumHeightOfEncodings)(this.encodings),n=t+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,e),this.options.background&&this.drawRect(0,0,n,e,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(t,e,n){var r,o=n.data;r="top"==e.textPosition?e.fontSize+e.textMargin:0;for(var i=0,a=0,u=0;u<o.length;u++)a=u*e.width+n.barcodePadding,"1"===o[u]?i++:i>0&&(this.drawRect(a-e.width*i,r,e.width*i,e.height,t),i=0);i>0&&this.drawRect(a-e.width*(i-1),r,e.width*i,e.height,t)}},{key:"drawSVGText",value:function(t,e,n){var r,o,i=this.document.createElementNS(c,"text");e.displayValue&&(i.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(r=0,i.setAttribute("text-anchor","start")):"right"==e.textAlign?(r=n.width-1,i.setAttribute("text-anchor","end")):(r=n.width/2,i.setAttribute("text-anchor","middle")),i.setAttribute("x",r),i.setAttribute("y",o),i.appendChild(this.document.createTextNode(n.text)),t.appendChild(i))}},{key:"setSvgAttributes",value:function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",c),n.setAttribute("version","1.1"),n.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(t,e,n){var r=this.document.createElementNS(c,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}},{key:"setGroupOptions",value:function(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}},{key:"drawRect",value:function(t,e,n,r,o){var i=this.document.createElementNS(c,"rect");return i.setAttribute("x",t),i.setAttribute("y",e),i.setAttribute("width",n),i.setAttribute("height",r),o.appendChild(i),i}}]),t}();e.default=s},be98:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=u(n("5726")),i=u(n("e762")),a=n("e8b2");function u(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],l=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],f=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(r.isValid=!1,-1!==t.search(/^[0-9]{6}$/))r.middleDigits=t,r.upcA=d(t,"0"),r.text=n.text||""+r.upcA[0]+t+r.upcA[r.upcA.length-1],r.isValid=!0;else{if(-1===t.search(/^[01][0-9]{7}$/))return c(r);if(r.middleDigits=t.substring(1,t.length-1),r.upcA=d(r.middleDigits,t[0]),r.upcA[r.upcA.length-1]!==t[t.length-1])return c(r);r.isValid=!0}return r.displayValue=n.displayValue,n.fontSize>10*n.width?r.fontSize=10*n.width:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=this.encodeMiddleDigits(),{data:t+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101",options:{height:this.guardHeight}}),t.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),t.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),t}},{key:"encodeMiddleDigits",value:function(){var t=this.upcA[0],e=this.upcA[this.upcA.length-1],n=l[parseInt(e)][parseInt(t)];return(0,o.default)(this.middleDigits,n)}}]),e}(i.default);function d(t,e){for(var n=parseInt(t[t.length-1]),r=s[n],o="",i=0,u=0;u<r.length;u++){var c=r[u];o+="X"===c?t[i++]:c}return""+(o=""+e+o)+(0,a.checksum)(o)}e.default=f},bfce:function(t,e,n){"use strict";n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("e260"),n("3ca3"),n("ddb0");function r(t){return(r="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})(t)}n("e9c4"),n("25f0");var o=n("f579"),i=n.n(o),a=n("658f"),u=n.n(a),c={name:"QrCodeComponent",props:{options:{type:Object,default:function(){}},dataModels:{type:Object,default:function(){}},content:{type:String,default:""},isFixedContent:{type:Boolean,default:!1}},components:{VueBarcode:i.a,VueQr:u.a},computed:{codeValue:function(){return this.isFixedContent?this.content:this.options.codeValue}},methods:{getImageData:function(){var t="",e=this.$refs.codeRef;if(e)if("qr"===this.options.mode)t=e.imgUrl;else if("bar"===this.options.mode)try{var n=e.$el.getElementsByTagName("img");n&&n.length&&(t=n[0].src)}catch(t){}return t}},watch:{dataModels:{immediate:!0,deep:!0,handler:function(t){if(this.options.relatedField&&""!==this.options.relatedField)for(var e in t)e===this.options.relatedField&&("object"===r(t[e])?this.options.codeValue=JSON.stringify(t[e]):this.options.codeValue=t[e].toString())}}}},s=n("2877"),l=Object(s.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",["qr"===t.options.mode?n("vue-qr",{ref:"codeRef",attrs:{correctLevel:3,margin:5,size:t.options.codeSize,text:t.codeValue}}):"bar"===t.options.mode?n("vue-barcode",{ref:"codeRef",attrs:{displayValue:t.options.displayCodeValue,height:t.options.codeHeight,value:t.codeValue,"element-tag":"img",font:"-apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif","font-size":"14",width:"1"}},[t._v(" 请输入或配置条码内容(CODE128) ")]):t._e()],1)}),[],!1,null,null,null);e.a=l.exports},c04e:function(t,e,n){var r=n("da84"),o=n("c65b"),i=n("861d"),a=n("d9b5"),u=n("dc4a"),c=n("485a"),s=n("b622"),l=r.TypeError,f=s("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var n,r=u(t,f);if(r){if(void 0===e&&(e="default"),n=o(r,t,e),!i(n)||a(n))return n;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},c17b:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.codabar=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("e762");var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),0===t.search(/^[0-9\-\$\:\.\+\/]+$/)&&(t="A"+t+"A");var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.toUpperCase(),n));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var t=[],e=this.getEncodings(),n=0;n<this.data.length;n++)t.push(e[this.data.charAt(n)]),n!==this.data.length-1&&t.push("0");return{text:this.text,data:t.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default);e.codabar=a},c243:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.SIDE_BIN="101",e.MIDDLE_BIN="01010",e.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},e.EAN2_STRUCTURE=["LL","LG","GL","GG"],e.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],e.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]},c32d:function(t,e){t.exports=require("moment")},c345:function(t,e,n){"use strict";var r=n("c532"),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,i,a={};return t?(r.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(a[e]&&o.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},c401:function(t,e,n){"use strict";var r=n("c532");t.exports=function(t,e,n){return r.forEach(n,(function(n){t=n(t,e)})),t}},c430:function(t,e){t.exports=!1},c513:function(t,e,n){var r=n("23e7"),o=n("1a2d"),i=n("d9b5"),a=n("0d51"),u=n("5692"),c=n("3d87"),s=u("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{keyFor:function(t){if(!i(t))throw TypeError(a(t)+" is not a symbol");if(o(s,t))return s[t]}})},c532:function(t,e,n){"use strict";var r=n("1d2b"),o=n("044b"),i=Object.prototype.toString;function a(t){return"[object Array]"===i.call(t)}function u(t){return null!==t&&"object"==typeof t}function c(t){return"[object Function]"===i.call(t)}function s(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),a(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:a,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:o,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:u,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return u(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:s,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,o=arguments.length;r<o;r++)s(arguments[r],n);return e},extend:function(t,e,n){return s(e,(function(e,o){t[o]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},c65b:function(t,e,n){var r=n("40d5"),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},c6b6:function(t,e,n){var r=n("e330"),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},c6cd:function(t,e,n){var r=n("da84"),o=n("6374"),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},c6eb:function(t,e,n){"use strict";(function(t){var r=n("5ea3"),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.a.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();e.a=u}).call(this,n("dd40")(t))},c740:function(t,e,n){"use strict";var r=n("23e7"),o=n("b727").findIndex,i=n("44d2"),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("findIndex")},c770:function(t,e,n){var r=n("e330"),o=Error,i=r("".replace),a=String(o("zxcasd").stack),u=/\n\s*at [^:]*:[^\n]*/,c=u.test(a);t.exports=function(t,e){if(c&&"string"==typeof t&&!o.prepareStackTrace)for(;e--;)t=i(t,u,"");return t}},c8af:function(t,e,n){"use strict";var r=n("c532");t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},c8d2:function(t,e,n){var r=n("5e77").PROPER,o=n("d039"),i=n("5899");t.exports=function(t){return o((function(){return!!i[t]()||"
"!=="
"[t]()||r&&i[t].name!==t}))}},ca32:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};e.default=r},ca84:function(t,e,n){var r=n("e330"),o=n("1a2d"),i=n("fc6a"),a=n("4d64").indexOf,u=n("d012"),c=r([].push);t.exports=function(t,e){var n,r=i(t),s=0,l=[];for(n in r)!o(u,n)&&o(r,n)&&c(l,n);for(;e.length>s;)o(r,n=e[s++])&&(~a(l,n)||c(l,n));return l}},ca9c:function(t,e,n){"use strict";n("e260"),n("d3b7"),n("e6cf"),n("3ca3"),n("ddb0"),n("b0c0");var r={name:"generate-collapse-item",components:{GenerateFormItem:n("12f6").a,GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"96a9"))}},props:["element","model","rules","remote","display","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.model,collapseActive:this.element.collapse.length?this.element.collapse[0].name:""}},methods:{fillingColumns:function(t){this.$emit("fillingColumns",t)}},watch:{model:{deep:!0,handler:function(t){this.dataModels=this.model}}}},o=n("2877"),i=Object(o.a)(r,(function(){var t,e=this,n=e.$createElement,r=e._self._c||n;return e.display[e.element.model]?r("el-collapse",{staticClass:"renderer-collapse",class:(t={},t[e.element.options.customClass]=e.element.options.customClass,t),attrs:{accordion:e.element.options.accordion},model:{value:e.collapseActive,callback:function(t){e.collapseActive=t},expression:"collapseActive"}},e._l(e.element.collapse,(function(t){return r("el-collapse-item",{key:t.name,attrs:{name:t.name}},[r("div",{staticClass:"el-collapse-header-title",attrs:{slot:"title",title:t.label},slot:"title"},[e._v(e._s(t.label))]),e._l(t.list,(function(t){return["grid"===t.type?r("generate-col-item",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.display,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.dataModels,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns}}):r("generate-form-item",{key:t.key,attrs:{"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.display,edit:e.edit,"event-function":e.eventFunction,models:e.dataModels,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules,widget:t},on:{fillingColumns:e.fillingColumns}})]}))],2)})),1):e._e()}),[],!1,null,null,null);e.a=i.exports},caad:function(t,e,n){"use strict";var r=n("23e7"),o=n("4d64").includes,i=n("d039"),a=n("44d2");r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),a("includes")},cb2d:function(t,e,n){var r=n("1626"),o=n("9112"),i=n("13d2"),a=n("6374");t.exports=function(t,e,n,u){u||(u={});var c=u.enumerable,s=void 0!==u.name?u.name:e;return r(n)&&i(n,s,u),u.global?c?t[e]=n:a(e,n):(u.unsafe?t[e]&&(c=!0):delete t[e],c?t[e]=n:o(t,e,n)),t}},cc12:function(t,e,n){var r=n("da84"),o=n("861d"),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},cc98:function(t,e,n){"use strict";var r=n("23e7"),o=n("c430"),i=n("4738").CONSTRUCTOR,a=n("d256"),u=n("d066"),c=n("1626"),s=n("cb2d"),l=a&&a.prototype;if(r({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(t){return this.then(void 0,t)}}),!o&&c(a)){var f=u("Promise").prototype.catch;l.catch!==f&&s(l,"catch",f,{unsafe:!0})}},cdcc:function(t,e,n){},cdd9:function(t,e){!function(){"use strict";var t,e,n,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},i=function(t){return function(e){return r=typeof(n=e),(null===n?"null":"object"===r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;var n,r}},a=function(t){return function(e){return typeof e===t}},u=i("string"),c=i("object"),s=i("array"),l=(t=null,function(e){return t===e}),f=a("boolean"),d=function(t){return!function(t){return null==t}(t)},m=a("function"),p=a("number"),h=function(){},g=function(t){return function(){return t}},v=function(t){return t},b=g(!1),y=g(!0),_=function(){return w},w={fold:function(t,e){return t()},isSome:b,isNone:y,getOr:n=v,getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:g(null),getOrUndefined:g(void 0),or:n,orThunk:e,map:_,each:h,bind:_,exists:b,forall:y,filter:function(){return _()},toArray:function(){return[]},toString:g("none()")},x=function(t){var e=g(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:y,isNone:b,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return x(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:w},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},O={some:x,none:_,from:function(t){return null==t?w:x(t)}},S=Object.keys,C=Object.hasOwnProperty,k=function(t,e,n,r){return function(t,e){for(var n=S(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}}(t,(function(t,o){(e(t,o)?n:r)(t,o)})),{}},E=function(t,e){return C.call(t,e)},M=Array.prototype.push,T=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!s(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);M.apply(e,t[n])}return e},D=function(t){return function(t,e){return e>=0&&e<t.length?O.some(t[e]):O.none()}(t,0)};"undefined"!=typeof window?window:Function("return this;")();var A,P=function(t,e,n){!function(t,e,n){if(!(u(n)||f(n)||p(n)))throw new Error("Attribute value was not simple");t.setAttribute(e,n+"")}(t.dom,e,n)},R=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},I={fromHtml:function(t,e){var n=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||n.childNodes.length>1)throw new Error("HTML must have a single root node");return R(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return R(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return R(n)},fromDom:R,fromPoint:function(t,e,n){return O.from(t.dom.elementFromPoint(e,n)).map(R)}},z=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),L=tinymce.util.Tools.resolve("tinymce.util.Promise"),j=tinymce.util.Tools.resolve("tinymce.util.URI"),B=tinymce.util.Tools.resolve("tinymce.util.XHR"),F=function(t){return t.getParam("image_dimensions",!0,"boolean")},N=function(t,e){return Math.max(parseInt(t,10),parseInt(e,10))},H=function(t){return t&&(t=t.replace(/px$/,"")),t},V=function(t){return t.length>0&&/^[0-9]+$/.test(t)&&(t+="px"),t},U=function(t){if(t.margin){var e=String(t.margin).split(" ");switch(e.length){case 1:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[0],t["margin-bottom"]=t["margin-bottom"]||e[0],t["margin-left"]=t["margin-left"]||e[0];break;case 2:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[0],t["margin-left"]=t["margin-left"]||e[1];break;case 3:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[2],t["margin-left"]=t["margin-left"]||e[1];break;case 4:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[2],t["margin-left"]=t["margin-left"]||e[3]}delete t.margin}return t},W=function(t){return"IMG"===t.nodeName&&(t.hasAttribute("data-mce-object")||t.hasAttribute("data-mce-placeholder"))},$=function(t,e){return j.isDomSafe(e,"img",t.settings)},G=z.DOM,K=function(t){return t.style.marginLeft&&t.style.marginRight&&t.style.marginLeft===t.style.marginRight?H(t.style.marginLeft):""},q=function(t){return t.style.marginTop&&t.style.marginBottom&&t.style.marginTop===t.style.marginBottom?H(t.style.marginTop):""},X=function(t){return t.style.borderWidth?H(t.style.borderWidth):""},Y=function(t,e){return t.hasAttribute(e)?t.getAttribute(e):""},J=function(t,e){return t.style[e]?t.style[e]:""},Q=function(t){return null!==t.parentNode&&"FIGURE"===t.parentNode.nodeName},Z=function(t,e,n){""===n?t.removeAttribute(e):t.setAttribute(e,n)},tt=function(t){Q(t)?function(t){var e=t.parentNode;G.insertAfter(t,e),G.remove(e)}(t):function(t){var e=G.create("figure",{class:"image"});G.insertAfter(e,t),e.appendChild(t),e.appendChild(G.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false"}(t)},et=function(t,e){var n=t.getAttribute("style"),r=e(null!==n?n:"");r.length>0?(t.setAttribute("style",r),t.setAttribute("data-mce-style",r)):t.removeAttribute("style")},nt=function(t,e){return function(t,n,r){t.style[n]?(t.style[n]=V(r),et(t,e)):Z(t,n,r)}},rt=function(t,e){return t.style[e]?H(t.style[e]):Y(t,e)},ot=function(t,e){var n=V(e);t.style.marginLeft=n,t.style.marginRight=n},it=function(t,e){var n=V(e);t.style.marginTop=n,t.style.marginBottom=n},at=function(t,e){var n=V(e);t.style.borderWidth=n},ut=function(t,e){t.style.borderStyle=e},ct=function(t){return"FIGURE"===t.nodeName},st=function(t){return 0===G.getAttrib(t,"alt").length&&"presentation"===G.getAttrib(t,"role")},lt=function(t){return st(t)?"":Y(t,"alt")},ft=function(t,e){var n=document.createElement("img");return Z(n,"style",e.style),(K(n)||""!==e.hspace)&&ot(n,e.hspace),(q(n)||""!==e.vspace)&&it(n,e.vspace),(X(n)||""!==e.border)&&at(n,e.border),(function(t){return J(t,"borderStyle")}(n)||""!==e.borderStyle)&&ut(n,e.borderStyle),t(n.getAttribute("style"))},dt=function(t,e){return{src:Y(e,"src"),alt:lt(e),title:Y(e,"title"),width:rt(e,"width"),height:rt(e,"height"),class:Y(e,"class"),style:t(Y(e,"style")),caption:Q(e),hspace:K(e),vspace:q(e),border:X(e),borderStyle:J(e,"borderStyle"),isDecorative:st(e)}},mt=function(t,e,n,r,o){n[r]!==e[r]&&o(t,r,n[r])},pt=function(t,e,n){if(n){G.setAttrib(t,"role","presentation");var r=I.fromDom(t);P(r,"alt","")}else{if(l(e)){r=I.fromDom(t);o="alt",r.dom.removeAttribute(o)}else{r=I.fromDom(t);P(r,"alt",e)}"presentation"===G.getAttrib(t,"role")&&G.setAttrib(t,"role","")}var o},ht=function(t,e){return function(n,r,o){t(n,o),et(n,e)}},gt=function(t,e,n){var r=dt(t,n);mt(n,r,e,"caption",(function(t,e,n){return tt(t)})),mt(n,r,e,"src",Z),mt(n,r,e,"title",Z),mt(n,r,e,"width",nt(0,t)),mt(n,r,e,"height",nt(0,t)),mt(n,r,e,"class",Z),mt(n,r,e,"style",ht((function(t,e){return Z(t,"style",e)}),t)),mt(n,r,e,"hspace",ht(ot,t)),mt(n,r,e,"vspace",ht(it,t)),mt(n,r,e,"border",ht(at,t)),mt(n,r,e,"borderStyle",ht(ut,t)),function(t,e,n){n.alt===e.alt&&n.isDecorative===e.isDecorative||pt(t,n.alt,n.isDecorative)}(n,r,e)},vt=function(t,e){var n=t.dom.styles.parse(e),r=U(n),o=t.dom.styles.parse(t.dom.styles.serialize(r));return t.dom.styles.serialize(o)},bt=function(t){var e=t.selection.getNode(),n=t.dom.getParent(e,"figure.image");return n?t.dom.select("img",n)[0]:e&&("IMG"!==e.nodeName||W(e))?null:e},yt=function(t,e){var n=t.dom,r=function(t,e){var n,r={};return k(t,e,(n=r,function(t,e){n[e]=t}),h),r}(t.schema.getTextBlockElements(),(function(e,n){return!t.schema.isValidChild(n,"figure")})),o=n.getParent(e.parentNode,(function(t){return e=r,n=t.nodeName,E(e,n)&&void 0!==e[n]&&null!==e[n];var e,n}),t.getBody());return o?n.split(o,e):e},_t=function(t,e){var n=function(t,e){var n=document.createElement("img");if(gt(t,o(o({},e),{caption:!1}),n),pt(n,e.alt,e.isDecorative),e.caption){var r=G.create("figure",{class:"image"});return r.appendChild(n),r.appendChild(G.create("figcaption",{contentEditable:"true"},"Caption")),r.contentEditable="false",r}return n}((function(e){return vt(t,e)}),e);t.dom.setAttrib(n,"data-mce-id","__mcenew"),t.focus(),t.selection.setContent(n.outerHTML);var r=t.dom.select('*[data-mce-id="__mcenew"]')[0];if(t.dom.setAttrib(r,"data-mce-id",null),ct(r)){var i=yt(t,r);t.selection.select(i)}else t.selection.select(r)},wt=function(t,e){var n=bt(t);if(gt((function(e){return vt(t,e)}),e,n),function(t,e){t.dom.setAttrib(e,"src",e.getAttribute("src"))}(t,n),ct(n.parentNode)){var r=n.parentNode;yt(t,r),t.selection.select(n.parentNode)}else t.selection.select(n),function(t,e,n){var r=function(){n.onload=n.onerror=null,t.selection&&(t.selection.select(n),t.nodeChanged())};n.onload=function(){e.width||e.height||!F(t)||t.dom.setAttribs(n,{width:String(n.clientWidth),height:String(n.clientHeight)}),r()},n.onerror=r}(t,e,n)},xt=function(t,e){var n=bt(t);if(n){var r=dt((function(e){return vt(t,e)}),n),i=o(o({},r),e),a=function(t,e){var n=e.src;return o(o({},e),{src:$(t,n)?n:""})}(t,i);i.src?wt(t,a):function(t,e){if(e){var n=t.dom.is(e.parentNode,"figure.image")?e.parentNode:e;t.dom.remove(n),t.focus(),t.nodeChanged(),t.dom.isEmpty(t.getBody())&&(t.setContent(""),t.selection.setCursorLocation())}}(t,n)}else e.src&&_t(t,o(o({},{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}),e))},Ot=(A=function(t,e){return c(t)&&c(e)?Ot(t,e):e},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<t.length;r++){var o=t[r];for(var i in o)E(o,i)&&(n[i]=A(n[i],o[i]))}return n}),St=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),Ct=tinymce.util.Tools.resolve("tinymce.util.Tools"),kt=function(t){return u(t.value)?t.value:""},Et=function(t,e){var n=[];return Ct.each(t,(function(t){var r=function(t){return u(t.text)?t.text:u(t.title)?t.title:""}(t);if(void 0!==t.menu){var o=Et(t.menu,e);n.push({text:r,items:o})}else{var i=e(t);n.push({text:r,value:i})}})),n},Mt=function(t){return void 0===t&&(t=kt),function(e){return e?O.from(e).map((function(e){return Et(e,t)})):O.none()}},Tt=function(t,e){return function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return O.none()}(t,(function(t){return function(t){return E(t,"items")}(t)?Tt(t.items,e):t.value===e?O.some(t):O.none()}))},Dt=Mt,At=function(t){return Mt(kt)(t)},Pt=function(t,e){return t.bind((function(t){return Tt(t,e)}))},Rt=function(t){return{title:"Advanced",name:"advanced",items:[{type:"input",label:"Style",name:"style"},{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}},It=function(t){var e=Dt((function(e){return t.convertURL(e.value||e.url,"src")})),n=new L((function(n){!function(t,e){var n=function(t){return t.getParam("image_list",!1)}(t);u(n)?B.send({url:n,success:function(t){e(JSON.parse(t))}}):m(n)?n(e):e(n)}(t,(function(t){n(e(t).map((function(t){return T([[{text:"None",value:""}],t])})))}))})),r=At(function(t){return t.getParam("image_class_list")}(t)),o=function(t){return t.getParam("image_advtab",!1,"boolean")}(t),i=function(t){return t.getParam("image_uploadtab",!0,"boolean")}(t),a=function(t){return d(t.getParam("images_upload_url"))}(t),c=function(t){return d(t.getParam("images_upload_handler"))}(t),s=function(t){var e=bt(t);return e?dt((function(e){return vt(t,e)}),e):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}}(t),l=function(t){return t.getParam("image_description",!0,"boolean")}(t),f=function(t){return t.getParam("image_title",!1,"boolean")}(t),p=F(t),h=function(t){return t.getParam("image_caption",!1,"boolean")}(t),g=function(t){return t.getParam("a11y_advanced_options",!1,"boolean")}(t),v=function(t){return t.getParam("automatic_uploads",!0,"boolean")}(t),b=O.some(function(t){return t.getParam("image_prepend_url","","string")}(t)).filter((function(t){return u(t)&&t.length>0}));return n.then((function(t){return{image:s,imageList:t,classList:r,hasAdvTab:o,hasUploadTab:i,hasUploadUrl:a,hasUploadHandler:c,hasDescription:l,hasImageTitle:f,hasDimensions:p,hasImageCaption:h,prependURL:b,hasAccessibilityOptions:g,automaticUploads:v}}))},zt=function(t){var e,n=t.imageList.map((function(t){return{name:"images",type:"listbox",label:"Image list",items:t}})),r={name:"alt",type:"input",label:"Alternative description",disabled:t.hasAccessibilityOptions&&t.image.isDecorative},i=t.classList.map((function(t){return{name:"classes",type:"listbox",label:"Class",items:t}}));return T([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],n.toArray(),t.hasAccessibilityOptions&&t.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],t.hasDescription?[r]:[],t.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],t.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[o(o({},(e=t.classList.isSome()&&t.hasImageCaption,e?{type:"grid",columns:2}:{type:"panel"})),{items:T([i.toArray(),t.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])})]])},Lt=function(t){return{title:"General",name:"general",items:zt(t)}},jt=zt,Bt=function(t){return{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}},Ft=function(t){return{src:{value:t.src,meta:{}},images:t.src,alt:t.alt,title:t.title,dimensions:{width:t.width,height:t.height},classes:t.class,caption:t.caption,style:t.style,vspace:t.vspace,border:t.border,hspace:t.hspace,borderstyle:t.borderStyle,fileinput:[],isDecorative:t.isDecorative}},Nt=function(t,e){return{src:t.src.value,alt:0===t.alt.length&&e?null:t.alt,title:t.title,width:t.dimensions.width,height:t.dimensions.height,class:t.classes,style:t.style,caption:t.caption,hspace:t.hspace,vspace:t.vspace,border:t.border,borderStyle:t.borderstyle,isDecorative:t.isDecorative}},Ht=function(t,e){var n=e.getData();(function(t,e){return/^(?:[a-zA-Z]+:)?\/\//.test(e)?O.none():t.prependURL.bind((function(t){return e.substring(0,t.length)!==t?O.some(t+e):O.none()}))})(t,n.src.value).each((function(t){e.setData({src:{value:t,meta:n.src.meta}})}))},Vt=function(t,e){var n=e.getData(),r=n.src.meta;if(void 0!==r){var o=Ot({},n);!function(t,e,n){t.hasDescription&&u(n.alt)&&(e.alt=n.alt),t.hasAccessibilityOptions&&(e.isDecorative=n.isDecorative||e.isDecorative||!1),t.hasImageTitle&&u(n.title)&&(e.title=n.title),t.hasDimensions&&(u(n.width)&&(e.dimensions.width=n.width),u(n.height)&&(e.dimensions.height=n.height)),u(n.class)&&Pt(t.classList,n.class).each((function(t){e.classes=t.value})),t.hasImageCaption&&f(n.caption)&&(e.caption=n.caption),t.hasAdvTab&&(u(n.style)&&(e.style=n.style),u(n.vspace)&&(e.vspace=n.vspace),u(n.border)&&(e.border=n.border),u(n.hspace)&&(e.hspace=n.hspace),u(n.borderstyle)&&(e.borderstyle=n.borderstyle))}(t,o,r),e.setData(o)}},Ut=function(t,e,n,r){Ht(e,r),Vt(e,r),function(t,e,n,r){var o=r.getData(),i=o.src.value,a=o.src.meta||{};a.width||a.height||!e.hasDimensions||(i.length>0?t.imageSize(i).then((function(t){n.open&&r.setData({dimensions:t})})).catch((function(t){})):r.setData({dimensions:{width:"",height:""}}))}(t,e,n,r),function(t,e,n){var r=n.getData(),o=Pt(t.imageList,r.src.value);e.prevImage=o,n.setData({images:o.map((function(t){return t.value})).getOr("")})}(e,n,r)},Wt=function(t,e,n){var r=U(t(n.style)),o=Ot({},n);return o.vspace=function(t){return t["margin-top"]&&t["margin-bottom"]&&t["margin-top"]===t["margin-bottom"]?H(String(t["margin-top"])):""}(r),o.hspace=function(t){return t["margin-right"]&&t["margin-left"]&&t["margin-right"]===t["margin-left"]?H(String(t["margin-right"])):""}(r),o.border=function(t){return t["border-width"]?H(String(t["border-width"])):""}(r),o.borderstyle=function(t){return t["border-style"]?String(t["border-style"]):""}(r),o.style=function(t,e,n){return e(t(e(n)))}(t,e,r),o},$t=function(t,e,n,r){var o=r.getData();r.block("Uploading image"),D(o.fileinput).fold((function(){r.unblock()}),(function(o){var i,a=URL.createObjectURL(o),u=function(){r.unblock(),URL.revokeObjectURL(a)},c=function(o){r.setData({src:{value:o,meta:{}}}),r.showTab("general"),Ut(t,e,n,r)};(i=o,new L((function(t,e){var n=new FileReader;n.onload=function(){t(n.result)},n.onerror=function(){e(n.error.message)},n.readAsDataURL(i)}))).then((function(n){var i=t.createBlobCache(o,a,n);e.automaticUploads?t.uploadImage(i).then((function(t){c(t.url),u()})).catch((function(e){u(),t.alertErr(e)})):(t.addToBlobCache(i),c(i.blobUri()),r.unblock())}))}))},Gt=function(t,e,n){return function(r,o){"src"===o.name?Ut(t,e,n,r):"images"===o.name?function(t,e,n,r){var o=r.getData(),i=Pt(e.imageList,o.images);i.each((function(t){""===o.alt||n.prevImage.map((function(t){return t.text===o.alt})).getOr(!1)?""===t.value?r.setData({src:t,alt:n.prevAlt}):r.setData({src:t,alt:t.text}):r.setData({src:t})})),n.prevImage=i,Ut(t,e,n,r)}(t,e,n,r):"alt"===o.name?n.prevAlt=r.getData().alt:"style"===o.name?function(t,e){var n=e.getData(),r=Wt(t.parseStyle,t.serializeStyle,n);e.setData(r)}(t,r):"vspace"===o.name||"hspace"===o.name||"border"===o.name||"borderstyle"===o.name?function(t,e,n){var r=Ot(Ft(e.image),n.getData()),o=ft(t.normalizeCss,Nt(r,!1));n.setData({style:o})}(t,e,r):"fileinput"===o.name?$t(t,e,n,r):"isDecorative"===o.name&&(r.getData().isDecorative?r.disable("alt"):r.enable("alt"))}},Kt=function(t){return function(){t.open=!1}},qt=function(t){return t.hasAdvTab||t.hasUploadUrl||t.hasUploadHandler?{type:"tabpanel",tabs:T([[Lt(t)],t.hasAdvTab?[Rt(t)]:[],t.hasUploadTab&&(t.hasUploadUrl||t.hasUploadHandler)?[Bt(t)]:[]])}:{type:"panel",items:jt(t)}},Xt=function(t){return function(e){var n=function(t){return{prevImage:Pt(t.imageList,t.image.src),prevAlt:t.image.alt,open:!0}}(e);return{title:"Insert/Edit Image",size:"normal",body:qt(e),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Ft(e.image),onSubmit:t.onSubmit(e),onChange:Gt(t,e,n),onClose:Kt(n)}}},Yt=function(t){return function(e){return function(n){var r=Ot(Ft(e.image),n.getData());t.execCommand("mceUpdateImage",!1,Nt(r,e.hasAccessibilityOptions)),t.editorUpload.uploadImagesAuto(),n.close()}}},Jt=function(t){return function(e){return $(t,e)?function(t){return new L((function(e){var n=document.createElement("img"),r=function(t){n.onload=n.onerror=null,n.parentNode&&n.parentNode.removeChild(n),e(t)};n.onload=function(){var t={width:N(n.width,n.clientWidth),height:N(n.height,n.clientHeight)};r(L.resolve(t))},n.onerror=function(){r(L.reject("Failed to get image dimensions for: "+t))};var o=n.style;o.visibility="hidden",o.position="fixed",o.bottom=o.left="0px",o.width=o.height="auto",document.body.appendChild(n),n.src=t}))}(t.documentBaseURI.toAbsolute(e)).then((function(t){return{width:String(t.width),height:String(t.height)}})):L.resolve({width:"",height:""})}},Qt=function(t){return function(e,n,r){return t.editorUpload.blobCache.create({blob:e,blobUri:n,name:e.name?e.name.replace(/\.[^\.]+$/,""):null,filename:e.name,base64:r.split(",")[1]})}},Zt=function(t){return function(e){t.editorUpload.blobCache.add(e)}},te=function(t){return function(e){t.windowManager.alert(e)}},ee=function(t){return function(e){return vt(t,e)}},ne=function(t){return function(e){return t.dom.parseStyle(e)}},re=function(t){return function(e,n){return t.dom.serializeStyle(e,n)}},oe=function(t){return function(e){return St(t).upload([e],!1).then((function(t){return 0===t.length?L.reject("Failed to upload image"):!1===t[0].status?L.reject(t[0].error.message):t[0]}))}},ie=function(t){var e={onSubmit:Yt(t),imageSize:Jt(t),addToBlobCache:Zt(t),createBlobCache:Qt(t),alertErr:te(t),normalizeCss:ee(t),parseStyle:ne(t),serializeStyle:re(t),uploadImage:oe(t)};return{open:function(){It(t).then(Xt(e)).then(t.windowManager.open)}}},ae=function(t){var e=t.attr("class");return e&&/\bimage\b/.test(e)},ue=function(t){return function(e){for(var n=e.length,r=function(e){e.attr("contenteditable",t?"true":null)};n--;){var o=e[n];ae(o)&&(o.attr("contenteditable",t?"false":null),Ct.each(o.getAll("figcaption"),r))}}};r.add("image",(function(t){!function(t){t.on("PreInit",(function(){t.parser.addNodeFilter("figure",ue(!0)),t.serializer.addNodeFilter("figure",ue(!1))}))}(t),function(t){t.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:ie(t).open,onSetup:function(e){return e.setActive(d(bt(t))),t.selection.selectorChangedWithUnbind("img:not([data-mce-object],[data-mce-placeholder]),figure.image",e.setActive).unbind}}),t.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:ie(t).open}),t.ui.registry.addContextMenu("image",{update:function(t){return ct(t)||"IMG"===t.nodeName&&!W(t)?["image"]:[]}})}(t),function(t){t.addCommand("mceImage",ie(t).open),t.addCommand("mceUpdateImage",(function(e,n){t.undoManager.transact((function(){return xt(t,n)}))}))}(t)}))}()},cdf9:function(t,e,n){var r=n("825a"),o=n("861d"),i=n("f069");t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},cee4:function(t,e,n){"use strict";var r=n("c532"),o=n("1d2b"),i=n("0a06"),a=n("2444");function u(t){var e=new i(t),n=o(i.prototype.request,e);return r.extend(n,i.prototype,e),r.extend(n,e),n}var c=u(a);c.Axios=i,c.create=function(t){return u(r.merge(a,t))},c.Cancel=n("7a77"),c.CancelToken=n("8df4"),c.isCancel=n("2e67"),c.all=function(t){return Promise.all(t)},c.spread=n("0df6"),t.exports=c,t.exports.default=c},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},d066:function(t,e,n){var r=n("da84"),o=n("1626"),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},d1e7:function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},d256:function(t,e,n){var r=n("da84");t.exports=r.Promise},d28b:function(t,e,n){n("746f")("iterator")},d2bb:function(t,e,n){var r=n("e330"),o=n("825a"),i=n("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},d3b7:function(t,e,n){var r=n("00ee"),o=n("cb2d"),i=n("b041");r||o(Object.prototype,"toString",i,{unsafe:!0})},d44e:function(t,e,n){var r=n("9bf2").f,o=n("1a2d"),i=n("b622")("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!o(t,i)&&r(t,i,{configurable:!0,value:e})}},d4c3:function(t,e,n){var r=n("342f"),o=n("da84");t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},d6d6:function(t,e,n){var r=n("da84").TypeError;t.exports=function(t,e){if(t<e)throw r("Not enough arguments");return t}},d6ea:function(module,__webpack_exports__,__webpack_require__){"use strict";var _Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("1da1"),_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("2909"),_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("5530"),_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("ade3"),regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("96cf"),regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_4__),core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("e9c4"),core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_5__),core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("d3b7"),core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__),core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("159b"),core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7__),core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("99af"),core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_8__),core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("b64b"),core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_9__),core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("4de4"),core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_10__),core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("d81d"),core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_11__),core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("b0c0"),core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_12__),core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("7db0"),core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_13__),core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("caad"),core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_14__),core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("2532"),core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_15__),core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("ac1f"),core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_16__),core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("1276"),core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_17__),core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("a15b"),core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_18__),core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("a434"),core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_19__),core_js_modules_es_array_find_index_js__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("c740"),core_js_modules_es_array_find_index_js__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(core_js_modules_es_array_find_index_js__WEBPACK_IMPORTED_MODULE_20__),core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("d9e2"),core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_21___default=__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_21__),core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("5319"),core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_22__),core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("e6cf"),core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_23__),core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("25f0"),core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_24__),_GenerateFormItem__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("12f6"),_Layouts_GenerateColItem__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("96a9"),_Layouts_GenerateTabItem__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("f6f4"),_Layouts_GenerateReport__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("0cd8"),_Layouts_GenerateCard__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("9bd9"),_Layouts_GenerateCollapseItem__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("ca9c"),_util_index__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("4260"),_util_event_bus__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("0f01"),lodash__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("60bb"),lodash__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_33__),axios__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__("bc3a"),axios__WEBPACK_IMPORTED_MODULE_34___default=__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_34__),uuid__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__("ec26"),_common_consts_form_base_config__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__("6ba6"),_util_widget_public_const__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__("e2e6"),_adapters_api_adapter__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__("7694"),moment__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__("c32d"),moment__WEBPACK_IMPORTED_MODULE_39___default=__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_39__),x2js__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__("98fc"),x2js__WEBPACK_IMPORTED_MODULE_40___default=__webpack_require__.n(x2js__WEBPACK_IMPORTED_MODULE_40__);__webpack_exports__.a={name:"iss-library-form-renderer",components:{GenerateFormItem:_GenerateFormItem__WEBPACK_IMPORTED_MODULE_25__.a,GenerateColItem:_Layouts_GenerateColItem__WEBPACK_IMPORTED_MODULE_26__.default,GenerateTabItem:_Layouts_GenerateTabItem__WEBPACK_IMPORTED_MODULE_27__.a,GenerateCard:_Layouts_GenerateCard__WEBPACK_IMPORTED_MODULE_29__.a,GenerateCollapseItem:_Layouts_GenerateCollapseItem__WEBPACK_IMPORTED_MODULE_30__.a,GenerateReport:_Layouts_GenerateReport__WEBPACK_IMPORTED_MODULE_28__.a},props:{source:{type:Object,default:function(){return JSON.stringify(Object(_common_consts_form_base_config__WEBPACK_IMPORTED_MODULE_36__.a)())}},remote:{type:Object,default:function(){return{}}},value:{type:Object,default:function(){return{}}},edit:{type:Boolean,default:!0},printRead:{type:Boolean,default:!1},remoteOptionSource:{type:Object,default:function(){return{}}},preview:{type:Boolean,default:!1},preferPlatform:{type:String,default:"pc"},lockPlatform:{type:Boolean,default:!1},variables:{type:Object,default:function(){return{}}},currentFormId:{type:String,default:function(){return""}},formPublishVersionId:{type:String,default:function(){return""}}},provide:function(){return{variable:this.variables,currentFormId:this.currentFormId,formPublishVersionId:this.formPublishVersionId,formValue:this.value,preview:this.preview}},computed:{platform:function(){return this.lockPlatform?this.preferPlatform:this.responsivePlatform}},data:function(){return{responsivePlatform:"pc",data:{},models:{},rules:{},displayFields:{},resetModels:{},formKey:Object(uuid__WEBPACK_IMPORTED_MODULE_35__.a)(),formStyleKey:Object(uuid__WEBPACK_IMPORTED_MODULE_35__.a)(),formValue:this.value,formShow:!1,formRef:"FORM_".concat(Object(uuid__WEBPACK_IMPORTED_MODULE_35__.a)()),containerKey:Object(uuid__WEBPACK_IMPORTED_MODULE_35__.a)(),dataSourceValue:[],eventFunction:{}}},created:function(){this.data=lodash__WEBPACK_IMPORTED_MODULE_33___default.a.cloneDeep(this.source),this._loadDataSource(),this._loadEvents(),this._initForm()},mounted:function(){var t=this,e=this;_util_event_bus__WEBPACK_IMPORTED_MODULE_32__.a.$on("on-change-"+this.containerKey,(function(n,r,o){t.containerKey===o&&e.setData(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_3__.a)({},r,n)),e.$emit("on-change",r,n,e.models),e.$emit("on-".concat(r,"-change"),n)})),this.$nextTick((function(){t.eventFunction.mounted&&t.eventFunction.mounted()})),this.responsivePlatform=this.preferPlatform,this._resizeHandler(),window.addEventListener("resize",lodash__WEBPACK_IMPORTED_MODULE_33___default.a.throttle((function(){e._resizeHandler()}),300))},beforeDestroy:function(){var t=".iss-form-"+this.formStyleKey+" ";Object(_util_index__WEBPACK_IMPORTED_MODULE_31__.a)(t),_util_event_bus__WEBPACK_IMPORTED_MODULE_32__.a.$off("on-change-"+this.containerKey),window.removeEventListener("resize",this._resizeHandler)},methods:{fillingColumns:function(t){var e=this;if(t.selectedItem){var n=t.selectedItem.widgetModel;n&&this.data.list.forEach((function(r,o){r.model===n&&(e.$set(e.data.list[o].options.selectedMap,"label",t.selectedItem.label),e.$set(e.data.list[o].options.selectedMap,"value",t.selectedItem.value))})),this.$set(this.models,n,t.selectedItem.value||""),this.$set(this.models,"".concat(n,"_").concat(_util_widget_public_const__WEBPACK_IMPORTED_MODULE_37__.a),t.selectedItem.label||"")}t.fillingRules&&t.fillingRules.length&&(t.value&&Object.keys(t.value).length?t.fillingRules.forEach((function(n){e.$set(e.models,n.toColumnName,t.value[n.fromColumnName])})):t.fillingRules.forEach((function(t){var n=e.data.list.map((function(e){if(e.model===t.toColumnName)return e.options.defaultValue})).filter((function(t){return null!=t}));n.length&&e.$set(e.models,t.toColumnName,n[0])})))},getWidthType:function(t){return t<576?"mobile":t<792?"pad":"pc"},_resizeHandler:function(){if(!document.hidden){var t=document.getElementById("iss-form-renderer");if(t){var e=t.getBoundingClientRect().width;this.responsivePlatform=this.getWidthType(e)}}},_initForm:function(){if(this.formShow=!1,Object.keys(this.data).length?this.generateModel(this.data.list):this.generateModel([]),this.resetModels=lodash__WEBPACK_IMPORTED_MODULE_33___default.a.cloneDeep(this.models),this.models=Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},this.models),this.formShow=!0,this.data.config&&this.data.config.styleSheets){var t=".iss-form-"+this.formStyleKey+" ";Object(_util_index__WEBPACK_IMPORTED_MODULE_31__.c)(Object(_util_index__WEBPACK_IMPORTED_MODULE_31__.b)(this.data.config.styleSheets),t)}},_loadEvents:function(){if(this.data.config&&this.data.config.eventScript)for(var t=0;t<this.data.config.eventScript.length;t++){var e=this.data.config.eventScript[t];try{this.eventFunction[e.key]=Function(e.func).bind(this)}catch(t){this.$alert(t.message,"Function[".concat(e.key,"] 动作设置错误"),{type:"error"})}}},_loadDataSource:function(){if(this.data.config&&this.data.config.dataSource)for(var t=0;t<this.data.config.dataSource.length;t++){var e=this.data.config.dataSource[t];e.auto&&this._sendRequest(e.name)}},_sendRequest:function(t){var e=this,n=this.data.config.dataSource.find((function(e){return e.name===t}));if(n){var r={method:n.method,url:n.url,headers:n.headers,params:n.params};if(n.requestFunc)r=Function("config",n.requestFunc).bind(this)(r);axios__WEBPACK_IMPORTED_MODULE_34___default()(r).then((function(t){var r=t;n.responseFunc&&(r=Function("res",n.responseFunc).bind(e)(t.data));var o=e.dataSourceValue.find((function(t){return t.key===n.key}));o?o.value=r:e.dataSourceValue.push({key:n.key,value:r})})).catch((function(t){n.errorFunc&&Function("error",n.errorFunc).bind(e)(t)}))}},generateModel:function generateModel(genList){for(var _this5=this,parentDisplay=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],_loop=function _loop(i){if("grid"===genList[i].type)_this5.displayFields[genList[i].model]=parentDisplay&&!genList[i].options.hidden,genList[i].columns.forEach((function(t){_this5.generateModel(t.list,!genList[i].options.hidden)}));else if("tabs"===genList[i].type)genList[i].tabs.forEach((function(t){_this5.generateModel(t.list,!genList[i].options.hidden)})),_this5.displayFields[genList[i].model]=parentDisplay&&!genList[i].options.hidden;else if("collapse"===genList[i].type)genList[i].collapse.forEach((function(t){_this5.generateModel(t.list,!genList[i].options.hidden)})),_this5.displayFields[genList[i].model]=parentDisplay&&!genList[i].options.hidden;else if("report"===genList[i].type)genList[i].rows.forEach((function(t){t.columns.forEach((function(t){_this5.generateModel(t.list,!genList[i].options.hidden)}))})),_this5.displayFields[genList[i].model]=parentDisplay&&!genList[i].options.hidden;else if("card"===genList[i].type)_this5.generateModel(genList[i].list,!genList[i].options.hidden),_this5.displayFields[genList[i].model]=parentDisplay&&!genList[i].options.hidden;else{if(Object.keys(_this5.formValue).indexOf(genList[i].model)>=0)genList[i].key&&genList[i].model&&(_this5.models[genList[i].model]=_this5.formValue[genList[i].model]),_this5.displayFields[genList[i].model]=parentDisplay&&!genList[i].options.hidden;else{if(genList[i].key&&genList[i].model)if(genList[i].options.isVariableDefaultValue){var value="未初始化变量数据";_this5.variables&&(value=_this5.variables[genList[i].options.defaultVariable]||""),_this5.models[genList[i].model]=value}else _this5.models[genList[i].model]=genList[i].options.defaultValue;_this5.displayFields[genList[i].model]=parentDisplay&&!genList[i].options.hidden}genList[i].tableColumns&&genList[i].tableColumns.length&&genList[i].tableColumns.forEach((function(item){_this5.rules["".concat(genList[i].model,".").concat(item.model)]?_this5.rules["".concat(genList[i].model,".").concat(item.model)]=[].concat(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(_this5.rules["".concat(genList[i].model,".").concat(item.model)]),Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(item.rules?item.rules.map((function(im){if(im.pattern)return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},im),{},{pattern:eval(im.pattern)});if(im.func){var validatorFunc=Function("rule","value","callback",im.func).bind(_this5);return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},im),{},{validator:validatorFunc})}return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},im)})):[])):_this5.rules["".concat(genList[i].model,".").concat(item.model)]=Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(item.rules?item.rules.map((function(im){if(im.pattern)return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},im),{},{pattern:eval(im.pattern)});if(im.func){var validatorFunc=Function("rule","value","callback",im.func).bind(_this5);return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},im),{},{validator:validatorFunc})}return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},im)})):[])})),_this5.rules[genList[i].model]?_this5.rules[genList[i].model]=[].concat(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(_this5.rules[genList[i].model]),Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(genList[i].rules?genList[i].rules.map((function(item){if(item.pattern)return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},item),{},{pattern:eval(item.pattern)});if(item.func){var validatorFunc=Function("rule","value","callback",item.func).bind(_this5);return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},item),{},{validator:validatorFunc})}return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},item)})):[])):_this5.rules[genList[i].model]=Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(genList[i].rules?genList[i].rules.map((function(item){if(item.pattern)return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},item),{},{pattern:eval(item.pattern)});if(item.func){var validatorFunc=Function("rule","value","callback",item.func).bind(_this5);return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},item),{},{validator:validatorFunc})}return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},item)})):[])}},i=0;i<genList.length;i++)_loop(i)},_setProperty:function(t,e,n,r){for(var o=this,i=0;i<t.length;i++)"grid"===t[i].type?t[i].columns.forEach((function(t){o._setProperty(t.list,e,n,r)})):"tabs"===t[i].type?t[i].tabs.forEach((function(t){o._setProperty(t.list,e,n,r)})):"collapse"===t[i].type?t[i].collapse.forEach((function(t){o._setProperty(t.list,e,n,r)})):"card"===t[i].type?this._setProperty(t[i].list,e,n,r):"report"===t[i].type?t[i].rows.forEach((function(t){t.columns.forEach((function(t){o._setProperty(t.list,e,n,r)}))})):e.indexOf(t[i].model)>=0&&this.$set(t[i].options,r,n)},_updateClassName:function(t,e,n,r){for(var o=this,i=0;i<t.length;i++)if("grid"===t[i].type)t[i].columns.forEach((function(t){o._updateClassName(t.list,e,n,r)}));else if("tabs"===t[i].type)t[i].tabs.forEach((function(t){o._updateClassName(t.list,e,n,r)}));else if("collapse"===t[i].type)t[i].collapse.forEach((function(t){o._updateClassName(t.list,e,n,r)}));else if("card"===t[i].type)this._updateClassName(t[i].list,e,n,r);else if("report"===t[i].type)t[i].rows.forEach((function(t){t.columns.forEach((function(t){o._updateClassName(t.list,e,n,r)}))}));else if(e.indexOf(t[i].model)>=0&&("add"!==r||t[i].options.customClass.split(" ").includes(n)||this.$set(t[i].options,"customClass",[].concat(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(t[i].options.customClass.split(" ")),[n]).join(" ")),"remove"===r&&t[i].options.customClass.split(" ").includes(n))){var a=t[i].options.customClass.split(" ");a.splice(a.findIndex((function(t){return t===n})),1),this.$set(t[i].options,"customClass",a.join(" "))}},_setOptions:function(t,e,n){for(var r=this,o=function(o){"grid"===t[o].type?t[o].columns.forEach((function(t){r._setOptions(t.list,e,n)})):"tabs"===t[o].type?t[o].tabs.forEach((function(t){r._setOptions(t.list,e,n)})):"collapse"===t[o].type?t[o].collapse.forEach((function(t){r._setOptions(t.list,e,n)})):"card"===t[o].type?r._setOptions(t[o].list,e,n):"report"===t[o].type?t[o].rows.forEach((function(t){t.columns.forEach((function(t){r._setOptions(t.list,e,n)}))})):e.indexOf(t[o].model)>=0&&Object.keys(n).forEach((function(e){r.$set(t[o].options,e,n[e])}))},i=0;i<t.length;i++)o(i)},_getData:function(t,e){if(this.eventFunction.beforeSubmit&&!this.eventFunction.beforeSubmit())return void e(new Error("请按提示完善表单内容(E:BEFORE_SUBMIT)"));var n=lodash__WEBPACK_IMPORTED_MODULE_33___default.a.cloneDeep(this.models);if(this.data&&this.data.config&&this.data.config.submitHiddenArea)t(n);else{var r={};for(var o in n){var i=o.replace("_".concat(_util_widget_public_const__WEBPACK_IMPORTED_MODULE_37__.a),"");this.displayFields[i]&&(r[o]=n[o])}t(r)}},getData:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return new Promise((function(n,r){e?t.$refs[t.formRef].validate((function(e){e?t._getData(n,r):r(new Error("请按提示完善表单内容"))})):t._getData(n,r)}))},reset:function(){var t=this;this.setData(lodash__WEBPACK_IMPORTED_MODULE_33___default.a.cloneDeep(this.resetModels)),this.$nextTick((function(){t.$refs[t.formRef]&&t.$refs[t.formRef].clearValidate()}))},onInputChange:function(t,e){this.$emit("on-change",e,t,this.models),this.$emit("on-".concat(e,"-change"),t)},display:function(t){var e=this;Object.keys(this.displayFields).forEach((function(n){t.indexOf(n)>=0&&e.$set(e.displayFields,n,!0)})),this.displayFields=Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},this.displayFields)},hide:function(t){var e=this;Object.keys(this.displayFields).forEach((function(n){t.indexOf(n)>=0&&e.$set(e.displayFields,n,!1)})),this.displayFields=Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},this.displayFields)},disabled:function(t,e){this._setProperty(this.data.list,t,e,"disabled")},setDisabled:function(t,e){this._setProperty(this.data.list,t,e,"disabled")},setReadOnly:function(t,e){this._setProperty(this.data.list,t,e,"readonly")},addClassName:function(t,e){this._updateClassName(this.data.list,t,e,"add")},removeClassName:function(t,e){this._updateClassName(this.data.list,t,e,"remove")},refresh:function(){this._loadDataSource(),this._loadEvents(),this._initForm()},setData:function(t){var e=this;Object.keys(t).forEach((function(n){e.$set(e.models,n,t[n])}))},_findComponentDownward:function(t,e,n){var r=t.$children;if(n)return n;if(0===r.length)n=null;else for(var o=0;o<r.length;o++){var i=r[o];if(Object.keys(i.$refs).indexOf(e)>=0){n=i.$refs[e];break}n=this._findComponentDownward(i,e,n)}return n},getComponent:function(t){return Object.keys(this.$refs).indexOf(t)>=0?this.$refs[t]:this._findComponentDownward(this,t,null)},getComponentById:function(t){return this.getComponent("icd-form-".concat(t))},getValues:function(){return this.models},getValue:function(t){return this.models[t]},setValues:function(t){var e=this;Object.keys(t).forEach((function(n){e.$set(e.models,n,t[n])}))},setValue:function(t,e){this.$set(this.models,t,e)},setRules:function(t,e){this.$set(this.rules,t,Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(e)),this.$refs[this.formRef].clearValidate(t)},setOptions:function(t,e){this._setOptions(this.data.list,t,e)},httpRequest:function(t){return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("get"!==t.type.toLowerCase()){e.next=4;break}return e.abrupt("return",axios__WEBPACK_IMPORTED_MODULE_34___default.a.get(t.url,t.config));case 4:if("post"!==t.type.toLowerCase()){e.next=8;break}return e.abrupt("return",axios__WEBPACK_IMPORTED_MODULE_34___default.a.post(t.url,t.params,t.config));case 8:if("put"!==t.type.toLowerCase()){e.next=12;break}return e.abrupt("return",axios__WEBPACK_IMPORTED_MODULE_34___default.a.put(t.url,t.params,t.config));case 12:if("delete"!==t.type.toLowerCase()){e.next=14;break}return e.abrupt("return",axios__WEBPACK_IMPORTED_MODULE_34___default.a.delete(t.url,t.config));case 14:case"end":return e.stop()}}),e)})))()},onTriggerThirdApi:function(t){return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.body="string"==typeof t.body?t.body:JSON.stringify(t.body),e.next=3,Object(_adapters_api_adapter__WEBPACK_IMPORTED_MODULE_38__.l)(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))()},xmlToJson:function(t){return(new x2js__WEBPACK_IMPORTED_MODULE_40___default.a).xml2js(t.toString())},getTimeUtils:function(){return moment__WEBPACK_IMPORTED_MODULE_39___default.a},getLodash:function(){return lodash__WEBPACK_IMPORTED_MODULE_33___default.a}}}},d784:function(t,e,n){"use strict";n("ac1f");var r=n("e330"),o=n("cb2d"),i=n("9263"),a=n("d039"),u=n("b622"),c=n("9112"),s=u("species"),l=RegExp.prototype;t.exports=function(t,e,n,f){var d=u(t),m=!a((function(){var e={};return e[d]=function(){return 7},7!=""[t](e)})),p=m&&!a((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return e=!0,null},n[d](""),!e}));if(!m||!p||n){var h=r(/./[d]),g=e(d,""[t],(function(t,e,n,o,a){var u=r(t),c=e.exec;return c===i||c===l.exec?m&&!a?{done:!0,value:h(e,n,o)}:{done:!0,value:u(n,e,o)}:{done:!1}}));o(String.prototype,t,g[0]),o(l,d,g[1])}f&&c(l[d],"sham",!0)}},d81d:function(t,e,n){"use strict";var r=n("23e7"),o=n("b727").map;r({target:"Array",proto:!0,forced:!n("1dde")("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},d86b:function(t,e,n){var r=n("d039");t.exports=r((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},d925:function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},d9b5:function(t,e,n){var r=n("da84"),o=n("d066"),i=n("1626"),a=n("3a9b"),u=n("fdbf"),c=r.Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&a(e.prototype,c(t))}},d9e2:function(t,e,n){var r=n("23e7"),o=n("da84"),i=n("2ba4"),a=n("e5cb"),u=o.WebAssembly,c=7!==Error("e",{cause:7}).cause,s=function(t,e){var n={};n[t]=a(t,e,c),r({global:!0,constructor:!0,arity:1,forced:c},n)},l=function(t,e){if(u&&u[t]){var n={};n[t]=a("WebAssembly."+t,e,c),r({target:"WebAssembly",stat:!0,constructor:!0,arity:1,forced:c},n)}};s("Error",(function(t){return function(e){return i(t,this,arguments)}})),s("EvalError",(function(t){return function(e){return i(t,this,arguments)}})),s("RangeError",(function(t){return function(e){return i(t,this,arguments)}})),s("ReferenceError",(function(t){return function(e){return i(t,this,arguments)}})),s("SyntaxError",(function(t){return function(e){return i(t,this,arguments)}})),s("TypeError",(function(t){return function(e){return i(t,this,arguments)}})),s("URIError",(function(t){return function(e){return i(t,this,arguments)}})),l("CompileError",(function(t){return function(e){return i(t,this,arguments)}})),l("LinkError",(function(t){return function(e){return i(t,this,arguments)}})),l("RuntimeError",(function(t){return function(e){return i(t,this,arguments)}}))},d9f5:function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("c65b"),a=n("e330"),u=n("c430"),c=n("83ab"),s=n("4930"),l=n("d039"),f=n("1a2d"),d=n("3a9b"),m=n("825a"),p=n("fc6a"),h=n("a04b"),g=n("577e"),v=n("5c6c"),b=n("7c73"),y=n("df75"),_=n("241c"),w=n("057f"),x=n("7418"),O=n("06cf"),S=n("9bf2"),C=n("37e8"),k=n("d1e7"),E=n("cb2d"),M=n("5692"),T=n("f772"),D=n("d012"),A=n("90e3"),P=n("b622"),R=n("e538"),I=n("746f"),z=n("57b9"),L=n("d44e"),j=n("69f3"),B=n("b727").forEach,F=T("hidden"),N=j.set,H=j.getterFor("Symbol"),V=Object.prototype,U=o.Symbol,W=U&&U.prototype,$=o.TypeError,G=o.QObject,K=O.f,q=S.f,X=w.f,Y=k.f,J=a([].push),Q=M("symbols"),Z=M("op-symbols"),tt=M("wks"),et=!G||!G.prototype||!G.prototype.findChild,nt=c&&l((function(){return 7!=b(q({},"a",{get:function(){return q(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=K(V,e);r&&delete V[e],q(t,e,n),r&&t!==V&&q(V,e,r)}:q,rt=function(t,e){var n=Q[t]=b(W);return N(n,{type:"Symbol",tag:t,description:e}),c||(n.description=e),n},ot=function(t,e,n){t===V&&ot(Z,e,n),m(t);var r=h(e);return m(n),f(Q,r)?(n.enumerable?(f(t,F)&&t[F][r]&&(t[F][r]=!1),n=b(n,{enumerable:v(0,!1)})):(f(t,F)||q(t,F,v(1,{})),t[F][r]=!0),nt(t,r,n)):q(t,r,n)},it=function(t,e){m(t);var n=p(e),r=y(n).concat(st(n));return B(r,(function(e){c&&!i(at,n,e)||ot(t,e,n[e])})),t},at=function(t){var e=h(t),n=i(Y,this,e);return!(this===V&&f(Q,e)&&!f(Z,e))&&(!(n||!f(this,e)||!f(Q,e)||f(this,F)&&this[F][e])||n)},ut=function(t,e){var n=p(t),r=h(e);if(n!==V||!f(Q,r)||f(Z,r)){var o=K(n,r);return!o||!f(Q,r)||f(n,F)&&n[F][r]||(o.enumerable=!0),o}},ct=function(t){var e=X(p(t)),n=[];return B(e,(function(t){f(Q,t)||f(D,t)||J(n,t)})),n},st=function(t){var e=t===V,n=X(e?Z:p(t)),r=[];return B(n,(function(t){!f(Q,t)||e&&!f(V,t)||J(r,Q[t])})),r};s||(E(W=(U=function(){if(d(W,this))throw $("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,e=A(t),n=function(t){this===V&&i(n,Z,t),f(this,F)&&f(this[F],e)&&(this[F][e]=!1),nt(this,e,v(1,t))};return c&&et&&nt(V,e,{configurable:!0,set:n}),rt(e,t)}).prototype,"toString",(function(){return H(this).tag})),E(U,"withoutSetter",(function(t){return rt(A(t),t)})),k.f=at,S.f=ot,C.f=it,O.f=ut,_.f=w.f=ct,x.f=st,R.f=function(t){return rt(P(t),t)},c&&(q(W,"description",{configurable:!0,get:function(){return H(this).description}}),u||E(V,"propertyIsEnumerable",at,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:U}),B(y(tt),(function(t){I(t)})),r({target:"Symbol",stat:!0,forced:!s},{useSetter:function(){et=!0},useSimple:function(){et=!1}}),r({target:"Object",stat:!0,forced:!s,sham:!c},{create:function(t,e){return void 0===e?b(t):it(b(t),e)},defineProperty:ot,defineProperties:it,getOwnPropertyDescriptor:ut}),r({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:ct}),z(),L(U,"Symbol"),D[F]=!0},da3d:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var r=u(n("6f24")),o=u(n("e8c9")),i=u(n("70b0")),a=u(n("ed3f"));function u(t){return t&&t.__esModule?t:{default:t}}e.CODE128=r.default,e.CODE128A=o.default,e.CODE128B=i.default,e.CODE128C=a.default},da84:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n("c8ba"))},dbb4:function(t,e,n){var r=n("23e7"),o=n("83ab"),i=n("56ef"),a=n("fc6a"),u=n("06cf"),c=n("8418");r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),o=u.f,s=i(r),l={},f=0;s.length>f;)void 0!==(n=o(r,e=s[f++]))&&c(l,e,n);return l}})},dc4a:function(t,e,n){var r=n("59ed");t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},dca2:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(t,n){r(this,e);var i=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return i.name="InvalidInputException",i.symbology=t,i.input=n,i.message='"'+i.input+'" is not a valid input for '+i.symbology,i}return i(e,Error),e}(),u=function(t){function e(){r(this,e);var t=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.name="InvalidElementException",t.message="Not supported type to render on",t}return i(e,Error),e}(),c=function(t){function e(){r(this,e);var t=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.name="NoElementException",t.message="No element to render on.",t}return i(e,Error),e}();e.InvalidInputException=a,e.InvalidElementException=u,e.NoElementException=c},dd40:function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},ddb0:function(t,e,n){var r=n("da84"),o=n("fdbc"),i=n("785a"),a=n("e260"),u=n("9112"),c=n("b622"),s=c("iterator"),l=c("toStringTag"),f=a.values,d=function(t,e){if(t){if(t[s]!==f)try{u(t,s,f)}catch(e){t[s]=f}if(t[l]||u(t,l,e),o[e])for(var n in a)if(t[n]!==a[n])try{u(t,n,a[n])}catch(e){t[n]=a[n]}}};for(var m in o)d(r[m]&&r[m].prototype,m);d(i,"DOMTokenList")},df09:function(t,e,n){"use strict";n("519d")},df75:function(t,e,n){var r=n("ca84"),o=n("7839");t.exports=Object.keys||function(t){return r(t,o)}},df7c:function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var o=t[r];"."===o?t.splice(r,1):".."===o?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}e.resolve=function(){for(var e="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a=i>=0?arguments[i]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,o="/"===a.charAt(0))}return(o?"/":"")+(e=n(r(e.split("/"),(function(t){return!!t})),!o).join("/"))||"."},e.normalize=function(t){var i=e.isAbsolute(t),a="/"===o(t,-1);return(t=n(r(t.split("/"),(function(t){return!!t})),!i).join("/"))||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var o=r(t.split("/")),i=r(n.split("/")),a=Math.min(o.length,i.length),u=a,c=0;c<a;c++)if(o[c]!==i[c]){u=c;break}var s=[];for(c=u;c<o.length;c++)s.push("..");return(s=s.concat(i.slice(u))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,o=!0,i=t.length-1;i>=1;--i)if(47===(e=t.charCodeAt(i))){if(!o){r=i;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"/":t.slice(0,r)},e.basename=function(t,e){var n=function(t){"string"!=typeof t&&(t+="");var e,n=0,r=-1,o=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!o){n=e+1;break}}else-1===r&&(o=!1,r=e+1);return-1===r?"":t.slice(n,r)}(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,n=0,r=-1,o=!0,i=0,a=t.length-1;a>=0;--a){var u=t.charCodeAt(a);if(47!==u)-1===r&&(o=!1,r=a+1),46===u?-1===e?e=a:1!==i&&(i=1):-1!==e&&(i=-1);else if(!o){n=a+1;break}}return-1===e||-1===r||0===i||1===i&&e===r-1&&e===n+1?"":t.slice(e,r)};var o="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n("4362"))},dff1:function(t,e,n){"use strict";(function(t){var r=n("26ee"),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.a.Buffer:void 0,u=a?a.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}}).call(this,n("dd40")(t))},e01a:function(t,e,n){"use strict";var r=n("23e7"),o=n("83ab"),i=n("da84"),a=n("e330"),u=n("1a2d"),c=n("1626"),s=n("3a9b"),l=n("577e"),f=n("9bf2").f,d=n("e893"),m=i.Symbol,p=m&&m.prototype;if(o&&c(m)&&(!("description"in p)||void 0!==m().description)){var h={},g=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=s(p,this)?new m(t):void 0===t?m():m(t);return""===t&&(h[e]=!0),e};d(g,m),g.prototype=p,p.constructor=g;var v="Symbol(test)"==String(m("test")),b=a(p.toString),y=a(p.valueOf),_=/^Symbol\((.*)\)[^)]+$/,w=a("".replace),x=a("".slice);f(p,"description",{configurable:!0,get:function(){var t=y(this),e=b(t);if(u(h,t))return"";var n=v?x(e,7,-1):w(e,_,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:g})}},e163:function(t,e,n){var r=n("da84"),o=n("1a2d"),i=n("1626"),a=n("7b0b"),u=n("f772"),c=n("e177"),s=u("IE_PROTO"),l=r.Object,f=l.prototype;t.exports=c?l.getPrototypeOf:function(t){var e=a(t);if(o(e,s))return e[s];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof l?f:null}},e177:function(t,e,n){var r=n("d039");t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e260:function(t,e,n){"use strict";var r=n("fc6a"),o=n("44d2"),i=n("3f8c"),a=n("69f3"),u=n("9bf2").f,c=n("7dd0"),s=n("c430"),l=n("83ab"),f=a.set,d=a.getterFor("Array Iterator");t.exports=c(Array,"Array",(function(t,e){f(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=d(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values");var m=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!s&&l&&"values"!==m.name)try{u(m,"name",{value:"values"})}catch(t){}},e2e6:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r="NRQWEZLM"},e330:function(t,e,n){var r=n("40d5"),o=Function.prototype,i=o.bind,a=o.call,u=r&&i.bind(a,a);t.exports=r?function(t){return t&&u(t)}:function(t){return t&&function(){return a.apply(t,arguments)}}},e391:function(t,e,n){var r=n("577e");t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},e439:function(t,e,n){var r=n("23e7"),o=n("d039"),i=n("fc6a"),a=n("06cf").f,u=n("83ab"),c=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!u||c,sham:!u},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},e538:function(t,e,n){var r=n("b622");e.f=r},e5cb:function(t,e,n){"use strict";var r=n("d066"),o=n("1a2d"),i=n("9112"),a=n("3a9b"),u=n("d2bb"),c=n("e893"),s=n("aeb0"),l=n("7156"),f=n("e391"),d=n("ab36"),m=n("c770"),p=n("b980"),h=n("83ab"),g=n("c430");t.exports=function(t,e,n,v){var b=v?2:1,y=t.split("."),_=y[y.length-1],w=r.apply(null,y);if(w){var x=w.prototype;if(!g&&o(x,"cause")&&delete x.cause,!n)return w;var O=r("Error"),S=e((function(t,e){var n=f(v?e:t,void 0),r=v?new w(t):new w;return void 0!==n&&i(r,"message",n),p&&i(r,"stack",m(r.stack,2)),this&&a(x,this)&&l(r,this,S),arguments.length>b&&d(r,arguments[b]),r}));if(S.prototype=x,"Error"!==_?u?u(S,O):c(S,O,{name:!0}):h&&"stackTraceLimit"in w&&(s(S,w,"stackTraceLimit"),s(S,w,"prepareStackTrace")),c(S,w),!g)try{x.name!==_&&i(x,"name",_),x.constructor=S}catch(t){}return S}}},e667:function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},e683:function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},e6cf:function(t,e,n){n("5e7e"),n("14e5"),n("cc98"),n("3529"),n("f22b"),n("7149")},e762:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.text=n.text||e,this.options=n}},e893:function(t,e,n){var r=n("1a2d"),o=n("56ef"),i=n("06cf"),a=n("9bf2");t.exports=function(t,e,n){for(var u=o(e),c=a.f,s=i.f,l=0;l<u.length;l++){var f=u[l];r(t,f)||n&&r(n,f)||c(t,f,s(e,f))}}},e8b2:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();e.checksum=u;var o=i(n("5726"));function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{11}$/)&&(t+=u(t));var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.displayValue=n.displayValue,n.fontSize>10*n.width?r.fontSize=10*n.width:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==u(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=(0,o.default)(this.data.substr(0,6),"LLLLLL"),t+="01010",t+=(0,o.default)(this.data.substr(6,6),"RRRRRR"),{data:t+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101"+(0,o.default)(this.data[0],"L"),options:{height:this.guardHeight}}),t.push({data:(0,o.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),t.push({data:"01010",options:{height:this.guardHeight}}),t.push({data:(0,o.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),t.push({data:(0,o.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),t}}]),e}(i(n("e762")).default);function u(t){var e,n=0;for(e=1;e<11;e+=2)n+=parseInt(t[e]);for(e=0;e<11;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10}e.default=a},e8b5:function(t,e,n){var r=n("c6b6");t.exports=Array.isArray||function(t){return"Array"==r(t)}},e8c9:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("4b23"),a=(r=i)&&r.__esModule?r:{default:r},u=n("f08e");var c=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u.A_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return new RegExp("^"+u.A_CHARS+"+$").test(this.data)}}]),e}(a.default);e.default=c},e95a:function(t,e,n){var r=n("b622"),o=n("3f8c"),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},e9c4:function(t,e,n){var r=n("23e7"),o=n("d066"),i=n("2ba4"),a=n("c65b"),u=n("e330"),c=n("d039"),s=n("e8b5"),l=n("1626"),f=n("861d"),d=n("d9b5"),m=n("f36a"),p=n("4930"),h=o("JSON","stringify"),g=u(/./.exec),v=u("".charAt),b=u("".charCodeAt),y=u("".replace),_=u(1..toString),w=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,O=/^[\uDC00-\uDFFF]$/,S=!p||c((function(){var t=o("Symbol")();return"[null]"!=h([t])||"{}"!=h({a:t})||"{}"!=h(Object(t))})),C=c((function(){return'"\\udf06\\ud834"'!==h("\udf06\ud834")||'"\\udead"'!==h("\udead")})),k=function(t,e){var n=m(arguments),r=e;if((f(e)||void 0!==t)&&!d(t))return s(e)||(e=function(t,e){if(l(r)&&(e=a(r,this,t,e)),!d(e))return e}),n[1]=e,i(h,null,n)},E=function(t,e,n){var r=v(n,e-1),o=v(n,e+1);return g(x,t)&&!g(O,o)||g(O,t)&&!g(x,r)?"\\u"+_(b(t,0),16):t};h&&r({target:"JSON",stat:!0,arity:3,forced:S||C},{stringify:function(t,e,n){var r=m(arguments),o=i(S?k:h,null,r);return C&&"string"==typeof o?y(o,w,E):o}})},eac5:function(t,e,n){var r=n("861d"),o=Math.floor;t.exports=Number.isInteger||function(t){return!r(t)&&isFinite(t)&&o(t)===t}},eac8:function(t,e,n){var r;!function(o){"use strict";var i={},a=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,u="[^\\s]+",c=/\[([^]*?)\]/gm,s=function(){};function l(t,e){for(var n=[],r=0,o=t.length;r<o;r++)n.push(t[r].substr(0,e));return n}function f(t){return function(e,n,r){var o=r[t].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~o&&(e.month=o)}}function d(t,e){for(t=String(t),e=e||2;t.length<e;)t="0"+t;return t}var m=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"],h=l(p,3),g=l(m,3);i.i18n={dayNamesShort:g,dayNames:m,monthNamesShort:h,monthNames:p,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10)*t%10]}};var v={D:function(t){return t.getDay()},DD:function(t){return d(t.getDay())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return t.getDate()},dd:function(t){return d(t.getDate())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return d(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},yy:function(t){return d(String(t.getFullYear()),4).substr(2)},yyyy:function(t){return d(t.getFullYear(),4)},h:function(t){return t.getHours()%12||12},hh:function(t){return d(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return d(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return d(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return d(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return d(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return d(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+d(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)}},b={d:["\\d\\d?",function(t,e){t.day=e}],Do:["\\d\\d?"+u,function(t,e){t.day=parseInt(e,10)}],M:["\\d\\d?",function(t,e){t.month=e-1}],yy:["\\d\\d?",function(t,e){var n=+(""+(new Date).getFullYear()).substr(0,2);t.year=""+(e>68?n-1:n)+e}],h:["\\d\\d?",function(t,e){t.hour=e}],m:["\\d\\d?",function(t,e){t.minute=e}],s:["\\d\\d?",function(t,e){t.second=e}],yyyy:["\\d{4}",function(t,e){t.year=e}],S:["\\d",function(t,e){t.millisecond=100*e}],SS:["\\d{2}",function(t,e){t.millisecond=10*e}],SSS:["\\d{3}",function(t,e){t.millisecond=e}],D:["\\d\\d?",s],ddd:[u,s],MMM:[u,f("monthNamesShort")],MMMM:[u,f("monthNames")],a:[u,function(t,e,n){var r=e.toLowerCase();r===n.amPm[0]?t.isPm=!1:r===n.amPm[1]&&(t.isPm=!0)}],ZZ:["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z",function(t,e){var n,r=(e+"").match(/([+-]|\d\d)/gi);r&&(n=60*r[1]+parseInt(r[2],10),t.timezoneOffset="+"===r[0]?n:-n)}]};b.dd=b.d,b.dddd=b.ddd,b.DD=b.D,b.mm=b.m,b.hh=b.H=b.HH=b.h,b.MM=b.M,b.ss=b.s,b.A=b.a,i.masks={default:"ddd MMM dd yyyy HH:mm:ss",shortDate:"M/D/yy",mediumDate:"MMM d, yyyy",longDate:"MMMM d, yyyy",fullDate:"dddd, MMMM d, yyyy",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},i.format=function(t,e,n){var r=n||i.i18n;if("number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date in fecha.format");e=i.masks[e]||e||i.masks.default;var o=[];return(e=(e=e.replace(c,(function(t,e){return o.push(e),"@@@"}))).replace(a,(function(e){return e in v?v[e](t,r):e.slice(1,e.length-1)}))).replace(/@@@/g,(function(){return o.shift()}))},i.parse=function(t,e,n){var r=n||i.i18n;if("string"!=typeof e)throw new Error("Invalid format in fecha.parse");if(e=i.masks[e]||e,t.length>1e3)return null;var o={},u=[],s=[];e=e.replace(c,(function(t,e){return s.push(e),"@@@"}));var l,f=(l=e,l.replace(/[|\\{()[^$+*?.-]/g,"\\$&")).replace(a,(function(t){if(b[t]){var e=b[t];return u.push(e[1]),"("+e[0]+")"}return t}));f=f.replace(/@@@/g,(function(){return s.shift()}));var d=t.match(new RegExp(f,"i"));if(!d)return null;for(var m=1;m<d.length;m++)u[m-1](o,d[m],r);var p,h=new Date;return!0===o.isPm&&null!=o.hour&&12!=+o.hour?o.hour=+o.hour+12:!1===o.isPm&&12==+o.hour&&(o.hour=0),null!=o.timezoneOffset?(o.minute=+(o.minute||0)-+o.timezoneOffset,p=new Date(Date.UTC(o.year||h.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):p=new Date(o.year||h.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),p},t.exports?t.exports=i:void 0===(r=function(){return i}.call(e,n,e,t))||(t.exports=r)}()},ec26:function(t,e,n){"use strict";var r,o=new Uint8Array(16);function i(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var u=function(t){return"string"==typeof t&&a.test(t)},c=[],s=0;s<256;++s)c.push((s+256).toString(16).substr(1));var l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase();if(!u(n))throw TypeError("Stringified UUID is invalid");return n};e.a=function(t,e,n){var r=(t=t||{}).random||(t.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return l(r)}},ed3f:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("4b23"),a=(r=i)&&r.__esModule?r:{default:r},u=n("f08e");var c=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u.C_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return new RegExp("^"+u.C_CHARS+"+$").test(this.data)}}]),e}(a.default);e.default=c},ed71:function(t,e,n){"use strict";n("3da4")},edd0:function(t,e,n){var r=n("13d2"),o=n("9bf2");t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),o.f(t,e,n)}},f069:function(t,e,n){"use strict";var r=n("59ed"),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},f08e:function(t,e,n){"use strict";var r;function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0});var i=e.SET_A=0,a=e.SET_B=1,u=e.SET_C=2,c=(e.SHIFT=98,e.START_A=103),s=e.START_B=104,l=e.START_C=105;e.MODULO=103,e.STOP=106,e.FNC1=207,e.SET_BY_CODE=(o(r={},c,i),o(r,s,a),o(r,l,u),r),e.SWAP={101:i,100:a,99:u},e.A_START_CHAR=String.fromCharCode(208),e.B_START_CHAR=String.fromCharCode(209),e.C_START_CHAR=String.fromCharCode(210),e.A_CHARS="[\0-_È-Ï]",e.B_CHARS="[ -È-Ï]",e.C_CHARS="(Ï*[0-9]{2}Ï*)",e.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011]},f183:function(t,e,n){var r=n("23e7"),o=n("e330"),i=n("d012"),a=n("861d"),u=n("1a2d"),c=n("9bf2").f,s=n("241c"),l=n("057f"),f=n("4fad"),d=n("90e3"),m=n("bb2f"),p=!1,h=d("meta"),g=0,v=function(t){c(t,h,{value:{objectID:"O"+g++,weakData:{}}})},b=t.exports={enable:function(){b.enable=function(){},p=!0;var t=s.f,e=o([].splice),n={};n[h]=1,t(n).length&&(s.f=function(n){for(var r=t(n),o=0,i=r.length;o<i;o++)if(r[o]===h){e(r,o,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(t,e){if(!a(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!u(t,h)){if(!f(t))return"F";if(!e)return"E";v(t)}return t[h].objectID},getWeakData:function(t,e){if(!u(t,h)){if(!f(t))return!0;if(!e)return!1;v(t)}return t[h].weakData},onFreeze:function(t){return m&&p&&f(t)&&!u(t,h)&&v(t),t}};i[h]=!0},f22b:function(t,e,n){"use strict";var r=n("23e7"),o=n("c65b"),i=n("f069");r({target:"Promise",stat:!0,forced:n("4738").CONSTRUCTOR},{reject:function(t){var e=i.f(this);return o(e.reject,void 0,t),e.promise}})},f36a:function(t,e,n){var r=n("e330");t.exports=r([].slice)},f3ef:function(t,e){t.exports=require("tinymce")},f579:function(t,e,n){var r=n("62c5"),o={render:function(t){return t("div",[t(this.elementTag,{style:{display:this.valid?void 0:"none"},class:["vue-barcode-element"]}),t("div",{style:{display:this.valid?"none":void 0}},this.$slots.default)])},props:{value:[String,Number],format:[String],width:[String,Number],height:[String,Number],displayValue:{type:[String,Boolean],default:!0},text:[String,Number],fontOptions:[String],font:[String],textAlign:[String],textPosition:[String],textMargin:[String,Number],fontSize:[String,Number],background:[String],lineColor:[String],margin:[String,Number],marginTop:[String,Number],marginBottom:[String,Number],marginLeft:[String,Number],marginRight:[String,Number],flat:[Boolean],ean128:[String,Boolean],elementTag:{type:String,default:"svg",validator:function(t){return-1!==["canvas","svg","img"].indexOf(t)}}},mounted:function(){this.$watch("$props",i,{deep:!0,immediate:!0}),i.call(this)},data:function(){return{valid:!0}}};function i(){var t=this,e={format:this.format,width:this.width,height:this.height,displayValue:this.displayValue,text:this.text,fontOptions:this.fontOptions,font:this.font,textAlign:this.textAlign,textPosition:this.textPosition,textMargin:this.textMargin,fontSize:this.fontSize,background:this.background,lineColor:this.lineColor,margin:this.margin,marginTop:this.marginTop,marginBottom:this.marginBottom,marginLeft:this.marginLeft,marginRight:this.marginRight,flat:this.flat,ean128:this.ean128,valid:function(e){t.valid=e},elementTag:this.elementTag};!function(t){for(var e in t)t.hasOwnProperty(e)&&void 0===t[e]&&delete t[e]}(e),r(this.$el.querySelector(".vue-barcode-element"),String(this.value),e)}t.exports=o},f5df:function(t,e,n){var r=n("da84"),o=n("00ee"),i=n("1626"),a=n("c6b6"),u=n("b622")("toStringTag"),c=r.Object,s="Arguments"==a(function(){return arguments}());t.exports=o?a:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=c(t),u))?n:s?a(e):"Object"==(r=a(e))&&i(e.callee)?"Arguments":r}},f5df1:function(t,e,n){},f6b4:function(t,e,n){"use strict";var r=n("c532");function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},f6f4:function(t,e,n){"use strict";n("e260"),n("d3b7"),n("e6cf"),n("3ca3"),n("ddb0"),n("b0c0");var r={name:"generate-tab-item",components:{GenerateFormItem:n("12f6").a,GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"96a9"))}},props:["element","model","rules","remote","display","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.model,tabActive:this.element.tabs.length?this.element.tabs[0].name:""}},methods:{fillingColumns:function(t){this.$emit("fillingColumns",t)}},watch:{model:{deep:!0,handler:function(t){this.dataModels=this.model}}}},o=n("2877"),i=Object(o.a)(r,(function(){var t,e=this,n=e.$createElement,r=e._self._c||n;return e.display[e.element.model]?r("el-tabs",{class:(t={},t[e.element.options.customClass]=e.element.options.customClass,t),staticStyle:{"margin-bottom":"18px"},attrs:{"tab-position":e.element.options.tabPosition,type:e.element.options.type},model:{value:e.tabActive,callback:function(t){e.tabActive=t},expression:"tabActive"}},e._l(e.element.tabs,(function(t){return r("el-tab-pane",{key:t.name,attrs:{label:t.label,name:t.name}},[e._l(t.list,(function(t){return["grid"===t.type?r("generate-col-item",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.display,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.dataModels,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns}}):r("generate-form-item",{key:t.key,attrs:{"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.display,edit:e.edit,"event-function":e.eventFunction,models:e.dataModels,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules,widget:t},on:{fillingColumns:e.fillingColumns}})]}))],2)})),1):e._e()}),[],!1,null,null,null);e.a=i.exports},f772:function(t,e,n){var r=n("5692"),o=n("90e3"),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},fb15:function(t,e,n){"use strict";if(n.r(e),n.d(e,"install",(function(){return _})),n.d(e,"CoreRenderer",(function(){return d})),n.d(e,"OrganizationSelector",(function(){return m.a})),n.d(e,"QrCodeComponent",(function(){return p.a})),"undefined"!=typeof window){var r=window.document.currentScript,o=n("8875");r=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var a=n("5530"),u=(n("b0c0"),n("d3b7"),n("159b"),n("f5df1"),n("ff84")),c=(n("a9e3"),{name:"BaseHelpIcon",props:{content:{type:String,default:""},title:{type:String,default:""},width:Number,effect:{type:String,default:"dark"},type:{type:String,default:"common"}}}),s=(n("71e3"),n("2877")),l=Object(s.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-popover",{attrs:{"popper-class":"base-help-icon-popper "+t.effect+" "+t.type,title:t.title,width:t.width||200,placement:"top",trigger:"click"}},[t._t("content",(function(){return[t._v(" "+t._s(t.content)+" ")]})),n("i",{staticClass:"ri-question-fill base-help-icon",attrs:{slot:"reference"},slot:"reference"})],2)}),[],!1,null,null,null).exports,f=n("d6ea").a,d=Object(s.a)(f,(function(){var t,e=this,n=e.$createElement,r=e._self._c||n;return r("div",{staticClass:"iss-form-renderer",class:["iss-form-"+e.formStyleKey,e.platform,"theme-"+(e.data.config&&e.data.config.theme)],style:{width:e.data.config&&e.data.config.width},attrs:{id:"iss-form-renderer"}},[e.formShow?r("el-form",{key:e.formKey,ref:e.formRef,class:(t={},t[e.data.config&&e.data.config.customClass]=e.data.config&&e.data.config.customClass,t["no-label-form"]=e.data.config&&0===e.data.config.labelWidth,t),attrs:{disabled:!e.edit,"label-position":"pc"===e.platform?e.data.config&&e.data.config.labelPosition:"top","label-width":e.data.config&&e.data.config.labelWidth+"px",model:e.models,rules:e.rules,size:e.data.config&&e.data.config.size,"status-icon":!0},nativeOn:{submit:function(t){t.preventDefault()}}},[e.data.config.theme&&"default"!==e.data.config.theme?r("div",{staticClass:"renderer-form-header",class:"align-"+e.data.config.themeTitleAlign},[r("div",{staticClass:"renderer-form-title"},[e._v(e._s(e.data.config.themeTitle))]),e.data.config.themeTitle&&e.data.config.themeSubTitle?r("div",{staticClass:"renderer-form-sub-title"},[e._v(e._s(e.data.config.themeSubTitle))]):e._e()]):e._e(),r("div",{staticClass:"iss-form-item-wrapper"},[e._l(e.data.list,(function(t){return["grid"===t.type?r("generate-col-item",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.displayFields,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.models,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns,"input-change":e.onInputChange}}):"card"===t.type?r("generate-card",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.displayFields,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.models,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns,"input-change":e.onInputChange}}):"collapse"===t.type?r("generate-collapse-item",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.displayFields,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.models,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns,"input-change":e.onInputChange}}):"tabs"===t.type?r("generate-tab-item",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.displayFields,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.models,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns,"input-change":e.onInputChange}}):"report"===t.type?r("generate-report",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.displayFields,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.models,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns,"input-change":e.onInputChange}}):r("generate-form-item",{key:t.key,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.displayFields,edit:e.edit,"event-function":e.eventFunction,models:e.models,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules,widget:t},on:{fillingColumns:e.fillingColumns,"input-change":e.onInputChange}})]}))],2)]):e._e()],1)}),[],!1,null,null,null).exports,m=n("9a01"),p=n("bfce"),h=(n("cdcc"),n("9224")),g=n("7694"),v=function(){Function("\n window.console && console.log('%c天工开务 ISS-LIBRARY-FORM-DESIGNER %cV".concat(h.a,"', 'color: #3164F6;font-weight: 500;font-size: 12px;', 'color: #999;');\n "))()},b=function(t){window.ISS_LIBRARY_FORM_DESIGNER_OPTIONS=Object(a.a)(Object(a.a)({},t),{},{mce_language_url:t.mce_language_url||"./tinymce/langs/zh_CN.js",mce_skin_url:t.mce_skin_url||"./tinymce/ui/oxide",mce_content_css:t.mce_content_css||"./tinymce/content/content.css",version:h.a})};d.install=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.component(d.name,d),v(),b(e)};var y=[u.a,l,d,m.a],_=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]},n=arguments.length>2?arguments[2]:void 0;e=Object(a.a)({components:[]},e),y.forEach((function(e){t.component(e.name,e)})),e.components&&e.components.forEach((function(e){t.component(e.name,e.component)})),v(),b(e),Object(g.i)(n)},w={install:_,CoreRenderer:d,OrganizationSelector:m.a,QrCodeComponent:p.a};e.default=w},fb6a:function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("e8b5"),a=n("68ee"),u=n("861d"),c=n("23cb"),s=n("07fa"),l=n("fc6a"),f=n("8418"),d=n("b622"),m=n("1dde"),p=n("f36a"),h=m("slice"),g=d("species"),v=o.Array,b=Math.max;r({target:"Array",proto:!0,forced:!h},{slice:function(t,e){var n,r,o,d=l(this),m=s(d),h=c(t,m),y=c(void 0===e?m:e,m);if(i(d)&&(n=d.constructor,(a(n)&&(n===v||i(n.prototype))||u(n)&&null===(n=n[g]))&&(n=void 0),n===v||void 0===n))return p(d,h,y);for(r=new(void 0===n?v:n)(b(y-h,0)),o=0;h<y;h++,o++)h in d&&f(r,o,d[h]);return r.length=o,r}})},fbb2:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GenericBarcode=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("e762");var a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default);e.GenericBarcode=a},fc6a:function(t,e,n){var r=n("44ad"),o=n("1d80");t.exports=function(t){return r(o(t))}},fce3:function(t,e,n){var r=n("d039"),o=n("da84").RegExp;t.exports=r((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},fd6f:function(t,e,n){},fd7c:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.default=function(t,e){return r({},t,e)}},fd8a:function(t,e,n){(function(t){!function(){"use strict";function e(t){return function(e){return r=typeof(n=e),(null===n?"null":"object"==r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;var n,r}}function n(t){return function(e){return typeof e===t}}function r(t){return function(e){return t===e}}function o(t){return null==t}function i(t,e){if(m(t)){for(var n=0,r=t.length;n<r;++n)if(!e(t[n]))return;return 1}}function a(){}function u(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}}function c(t){return function(){return t}}function s(t){return t}function l(t,e){return t===e}var f=e("string"),d=e("object"),m=e("array"),p=r(null),h=n("boolean"),g=r(void 0),v=function(t){return!o(t)},b=n("function"),y=n("number");function _(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}function w(t){return function(e){return!t(e)}}function x(t){return function(){throw new Error(t)}}var O=c(!1),S=c(!0),C=tinymce.util.Tools.resolve("tinymce.ThemeManager"),k=function(){return(k=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function E(t,e){var n={};for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}function M(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||((r=r||Array.prototype.slice.call(e,0,o))[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}function T(){return D}var D={fold:function(t,e){return t()},isSome:O,isNone:S,getOr:s,getOrThunk:A,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:c(null),getOrUndefined:c(void 0),or:s,orThunk:A,map:T,each:a,bind:T,exists:O,forall:S,filter:function(){return D},toArray:function(){return[]},toString:c("none()")};function A(t){return t()}function P(t,e){return _t.call(t,e)}function R(t,e){for(var n=0,r=t.length;n<r;n++)if(e(t[n],n))return!0;return!1}function I(t,e){for(var n=[],r=0;r<t;r++)n.push(e(r));return n}function z(t,e){for(var n=[],r=0;r<t.length;r+=e){var o=yt.call(t,r,r+e);n.push(o)}return n}function L(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r}function j(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var a=t[o];(e(a,o)?n:r).push(a)}return{pass:n,fail:r}}function B(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n}function F(t,e,n){return function(t){for(var r,o=t.length-1;0<=o;o--)r=t[o],n=e(n,r,o)}(t),n}function N(t,e,n){return Ot(t,(function(t,r){n=e(n,t,r)})),n}function H(t,e){return function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return bt.some(i);if(n(i,r))break}return bt.none()}(t,e,O)}function V(t,e){for(var n=0,r=t.length;n<r;n++)if(e(t[n],n))return bt.some(n);return bt.none()}function U(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!m(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);wt.apply(e,t[n])}return e}function W(t,e){return U(L(t,e))}function $(t,e){for(var n=0,r=t.length;n<r;++n)if(!0!==e(t[n],n))return!1;return!0}function G(t){var e=yt.call(t,0);return e.reverse(),e}function K(t,e){return B(t,(function(t){return!xt(e,t)}))}function q(t,e){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];n[String(i)]=e(i,r)}return n}function X(t){return[t]}function Y(t,e){var n=yt.call(t,0);return n.sort(e),n}function J(t,e){return 0<=e&&e<t.length?bt.some(t[e]):bt.none()}function Q(t){return J(t,0)}function Z(t){return J(t,t.length-1)}function tt(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return bt.none()}function et(t,e){for(var n=Ct(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}}function nt(t,e){return Et(t,(function(t,n){return{k:n,v:e(t,n)}}))}function rt(t,e){var n=[];return et(t,(function(t,r){n.push(e(t,r))})),n}function ot(t,e){for(var n=Ct(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];if(e(a,i,t))return bt.some(a)}return bt.none()}function it(t){return rt(t,s)}function at(t,e){return Mt(t,e)?bt.from(t[e]):bt.none()}function ut(t,e){return Mt(t,e)&&void 0!==t[e]&&null!==t[e]}function ct(t,e,n){return void 0===n&&(n=l),t.exists((function(t){return n(t,e)}))}function st(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e}function lt(t,e){return t?bt.some(e):bt.none()}function ft(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e}function dt(t,e){return-1!==t.indexOf(e)}function mt(t){return 0<t.length}function pt(t){return void 0!==t.style&&b(t.style.getPropertyValue)}function ht(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}}var gt,vt=function(t){function e(){return o}function n(e){return e(t)}var r=c(t),o={fold:function(e,n){return n(t)},isSome:S,isNone:O,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return vt(e(t))},each:function(e){e(t)},bind:n,exists:n,forall:n,filter:function(e){return e(t)?o:D},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},bt={some:vt,none:T,from:function(t){return null==t?D:vt(t)}},yt=Array.prototype.slice,_t=Array.prototype.indexOf,wt=Array.prototype.push,xt=function(t,e){return-1<P(t,e)},Ot=function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)},St=b(Array.from)?Array.from:function(t){return yt.call(t)},Ct=Object.keys,kt=Object.hasOwnProperty,Et=function(t,e){var n={};return et(t,(function(t,r){var o=e(t,r);n[o.k]=o.v})),n},Mt=function(t,e){return kt.call(t,e)},Tt=function(t,e,n){return t.isSome()&&e.isSome()?bt.some(n(t.getOrDie(),e.getOrDie())):bt.none()},Dt=function(t,e){return ft(t,e,0)},At=function(t,e){return ft(t,e,t.length-e.length)},Pt=(gt=/^\s+|\s+$/g,function(t){return t.replace(gt,"")}),Rt={fromHtml:function(t,e){var n=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throw new Error("HTML must have a single root node");return ht(n.childNodes[0])},fromTag:function(t,e){return ht((e||document).createElement(t))},fromText:function(t,e){return ht((e||document).createTextNode(t))},fromDom:ht,fromPoint:function(t,e,n){return bt.from(t.dom.elementFromPoint(e,n)).map(ht)}};function It(t){return t.dom.nodeName.toLowerCase()}function zt(t){return function(e){return e.dom.nodeType===t}}function Lt(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}}function jt(t,e){var n=String(e).toLowerCase();return H(t,(function(t){return t.search(n)}))}function Bt(t){return function(e){return dt(e,t)}}function Ft(t){return window.matchMedia(t).matches}function Nt(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}function Ht(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount}function Vt(t,e){return t.dom===e.dom}function Ut(t,e){return fn().browser.isIE()?(n=t.dom,r=e.dom,o=Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(n.compareDocumentPosition(r)&o)):(i=t.dom)!==(a=e.dom)&&i.contains(a);var n,r,o,i,a}function Wt(t){return Rt.fromDom(t.dom.ownerDocument)}function $t(t){return qe(t)?t:Wt(t)}function Gt(t){return Rt.fromDom($t(t).dom.documentElement)}function Kt(t){return Rt.fromDom($t(t).dom.defaultView)}function qt(t){return bt.from(t.dom.parentNode).map(Rt.fromDom)}function Xt(t){return bt.from(t.dom.offsetParent).map(Rt.fromDom)}function Yt(t){return L(t.dom.childNodes,Rt.fromDom)}function Jt(t,e){var n=t.dom.childNodes;return bt.from(n[e]).map(Rt.fromDom)}function Qt(t,e){return{element:t,offset:e}}function Zt(t,e){var n=Yt(t);return 0<n.length&&e<n.length?Qt(n[e],0):Qt(t,e)}function te(t){return Xe(t)&&v(t.dom.host)}function ee(t){return te(t)?t:Rt.fromDom($t(t).dom.body)}function ne(t){return Rt.fromDom(t.dom.host)}function re(t,e,n){if(!(f(n)||h(n)||y(n)))throw new Error("Attribute value was not simple");t.setAttribute(e,n+"")}function oe(t,e,n){re(t.dom,e,n)}function ie(t,e){var n=t.dom;et(e,(function(t,e){re(n,e,t)}))}function ae(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n}function ue(t,e){return bt.from(ae(t,e))}function ce(t,e){var n=t.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(e)}function se(t,e){t.dom.removeAttribute(e)}function le(t,e,n){if(!f(n))throw new Error("CSS value must be a string: "+n);pt(t)&&t.style.setProperty(e,n)}function fe(t,e){pt(t)&&t.style.removeProperty(e)}function de(t,e,n){le(t.dom,e,n)}function me(t,e){var n=t.dom;et(e,(function(t,e){le(n,e,t)}))}function pe(t,e){var n=t.dom;et(e,(function(t,e){t.fold((function(){fe(n,e)}),(function(t){le(n,e,t)}))}))}function he(t,e){var n=t.dom,r=window.getComputedStyle(n).getPropertyValue(e);return""!==r||bn(t)?r:wn(n,e)}function ge(t,e){var n=t.dom,r=wn(n,e);return bt.from(r).filter((function(t){return 0<t.length}))}function ve(t,e,n){var r=Rt.fromTag(t);return de(r,e,n),ge(r,e).isSome()}function be(t,e){fe(t.dom,e),ct(ue(t,"style").map(Pt),"")&&se(t,"style")}function ye(t){return t.dom.offsetWidth}function _e(t,e){function n(n){var r=e(n);if(r<=0||null===r){var o=he(n,t);return parseFloat(o)||0}return r}function r(t,e){return N(e,(function(e,n){var r=he(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)}return{set:function(e,n){if(!y(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom;pt(r)&&(r.style[t]=n+"px")},get:n,getOuter:n,aggregate:r,max:function(t,e,n){var o=r(t,n);return o<e?e-o:0}}}function we(t){return xn.get(t)}function xe(t){return xn.getOuter(t)}function Oe(t,e){return void 0!==t?t:void 0!==e?e:0}function Se(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return Sn(n.offsetLeft,n.offsetTop);var i=Oe(null==r?void 0:r.pageYOffset,o.scrollTop),a=Oe(null==r?void 0:r.pageXOffset,o.scrollLeft),u=Oe(o.clientTop,n.clientTop),c=Oe(o.clientLeft,n.clientLeft);return Cn(t).translate(a-c,i-u)}function Ce(t){return kn.get(t)}function ke(t){return kn.getOuter(t)}function Ee(t){function e(){return t.stopPropagation()}function n(){return t.preventDefault()}var r=u(n,e);return{target:Rt.fromDom(function(t){if(pn()&&v(t.target)){var e=Rt.fromDom(t.target);if(Ge(e)&&vn(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return Q(n)}}return bt.from(t.target)}(t).getOr(t.target)),x:t.clientX,y:t.clientY,stop:e,prevent:n,kill:r,raw:t}}function Me(t,e,n,r,o){var i,a,u=(i=n,a=r,function(t){i(t)&&a(Ee(t))});return t.dom.addEventListener(e,u,o),{unbind:_(En,t,e,u,o)}}function Te(t,e){qt(t).each((function(n){n.dom.insertBefore(e.dom,t.dom)}))}function De(t,e){bt.from(t.dom.nextSibling).map(Rt.fromDom).fold((function(){qt(t).each((function(t){Mn(t,e)}))}),(function(t){Te(t,e)}))}function Ae(t,e){Jt(t,0).fold((function(){Mn(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))}function Pe(t,e){Ot(e,(function(e){Mn(t,e)}))}function Re(t){t.dom.textContent="",Ot(Yt(t),(function(t){Tn(t)}))}function Ie(t){var e,n=Yt(t);0<n.length&&(e=t,Ot(n,(function(t){Te(e,t)}))),Tn(t)}function ze(t){var e=void 0!==t?t.dom:document,n=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return Sn(n,r)}function Le(t,e,n){var r=(void 0!==n?n.dom:document).defaultView;r&&r.scrollTo(t,e)}function je(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}}function Be(t){var e=void 0===t?window:t,n=e.document,r=ze(Rt.fromDom(n)),o=void 0===e?window:e;return(fn().browser.isFirefox()?bt.none():bt.from(o.visualViewport)).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return je(r.left,r.top,n,o)}),(function(t){return je(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))}function Fe(t){var e,n=ze(Rt.fromDom(document)),r=(e=An).owner(t),o=Dn(e,r);return bt.some(o).fold(_(Se,t),(function(e){var r=Cn(t),o=F(e,(function(t,e){var n=Cn(e);return{left:t.left+n.left,top:t.top+n.top}}),{left:0,top:0});return Sn(o.left+r.left+n.left,o.top+r.top+n.top)}))}function Ne(t){var e=Fe(t),n=ke(t),r=xe(t);return Pn(e.left,e.top,n,r)}function He(){return Ye(0,0)}function Ve(t){function e(t){return function(){return n===t}}var n=t.current,r=t.version;return{current:n,version:r,isEdge:e("Edge"),isChrome:e("Chrome"),isIE:e("IE"),isOpera:e("Opera"),isFirefox:e(tn),isSafari:e("Safari")}}function Ue(t){function e(t){return function(){return n===t}}var n=t.current,r=t.version;return{current:n,version:r,isWindows:e(rn),isiOS:e("iOS"),isAndroid:e(on),isOSX:e("OSX"),isLinux:e("Linux"),isSolaris:e(an),isFreeBSD:e(un),isChromeOS:e(cn)}}"undefined"!=typeof window||Function("return this;")();var We,$e,Ge=zt(1),Ke=zt(3),qe=zt(9),Xe=zt(11),Ye=function(t,e){return{major:t,minor:e}},Je={nu:Ye,detect:function(t,e){var n,r,o=String(e).toLowerCase();return 0===t.length?He():(r=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}}(t,n=o))?Ye(i(1),i(2)):{major:0,minor:0};function i(t){return Number(n.replace(r,"$"+t))}},unknown:He},Qe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ze={browsers:c([{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return dt(t,"edge/")&&dt(t,"chrome")&&dt(t,"safari")&&dt(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Qe],search:function(t){return dt(t,"chrome")&&!dt(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return dt(t,"msie")||dt(t,"trident")}},{name:"Opera",versionRegexes:[Qe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Bt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Bt("firefox")},{name:"Safari",versionRegexes:[Qe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(dt(t,"safari")||dt(t,"mobile/"))&&dt(t,"applewebkit")}}]),oses:c([{name:"Windows",search:Bt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return dt(t,"iphone")||dt(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Bt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Bt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Bt("linux"),versionRegexes:[]},{name:"Solaris",search:Bt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Bt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Bt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}])},tn="Firefox",en=function(){return Ve({current:void 0,version:Je.unknown()})},nn=Ve,rn=(c("Edge"),c("Chrome"),c("IE"),c("Opera"),c(tn),c("Safari"),"Windows"),on="Android",an="Solaris",un="FreeBSD",cn="ChromeOS",sn=function(){return Ue({current:void 0,version:Je.unknown()})},ln=Ue,fn=(c(rn),c("iOS"),c(on),c("Linux"),c("OSX"),c(an),c(un),c(cn),Lt((function(){return t=navigator.userAgent,e=bt.from(navigator.userAgentData),n=Ft,g=Ze.browsers(),v=Ze.oses(),{browser:b=e.bind((function(t){return e=g,tt(t.brands,(function(t){var n=t.brand.toLowerCase();return H(e,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(e){return{current:e.name,version:Je.nu(parseInt(t.version,10),0)}}))}));var e})).orThunk((function(){return jt(g,e=t).map((function(t){var n=Je.detect(t.versionRegexes,e);return{current:t.name,version:n}}));var e})).fold(en,nn),os:y=jt(v,r=t).map((function(t){var e=Je.detect(t.versionRegexes,r);return{current:t.name,version:e}})).fold(sn,ln),deviceType:(i=b,a=t,u=n,s=(o=y).isiOS()&&!0===/ipad/i.test(a),l=o.isiOS()&&!s,d=(f=o.isiOS()||o.isAndroid())||u("(pointer:coarse)"),m=s||!l&&f&&u("(min-device-width:768px)"),p=l||f&&!m,h=i.isSafari()&&o.isiOS()&&!1===/safari/i.test(a),{isiPad:c(s),isiPhone:c(l),isTablet:c(m),isPhone:c(p),isTouch:c(d),isAndroid:o.isAndroid,isiOS:o.isiOS,isWebView:c(h),isDesktop:c(!p&&!m&&!h)})};var t,e,n,r,o,i,a,u,s,l,f,d,m,p,h,g,v,b,y}))),dn=qt,mn=b(Element.prototype.attachShadow)&&b(Node.prototype.getRootNode),pn=c(mn),hn=mn?function(t){return Rt.fromDom(t.dom.getRootNode())}:$t,gn=function(t){var e=hn(t);return te(e)?bt.some(e):bt.none()},vn=function(t){return v(t.dom.shadowRoot)},bn=function(t){var e=Ke(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;var n,r,o=e.ownerDocument;return gn(Rt.fromDom(e)).fold((function(){return o.body.contains(e)}),(n=bn,r=ne,function(t){return n(r(t))}))},yn=function(){return _n(Rt.fromDom(document))},_n=function(t){var e=t.dom.body;if(null==e)throw new Error("Body is not available yet");return Rt.fromDom(e)},wn=function(t,e){return pt(t)?t.style.getPropertyValue(e):""},xn=_e("height",(function(t){var e=t.dom;return bn(t)?e.getBoundingClientRect().height:e.offsetHeight})),On=function(t,e){return{left:t,top:e,translate:function(n,r){return On(t+n,e+r)}}},Sn=On,Cn=function(t){var e,n=t.dom,r=n.ownerDocument.body;return r===n?Sn(r.offsetLeft,r.offsetTop):bn(t)?(e=n.getBoundingClientRect(),Sn(e.left,e.top)):Sn(0,0)},kn=_e("width",(function(t){return t.dom.offsetWidth})),En=function(t,e,n,r){t.dom.removeEventListener(e,n,r)},Mn=function(t,e){t.dom.appendChild(e.dom)},Tn=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},Dn=function(t,e){return t.view(e).fold(c([]),(function(e){var n=t.owner(e),r=Dn(t,n);return[e].concat(r)}))},An=Object.freeze({__proto__:null,view:function(t){var e;return(t.dom===document?bt.none():bt.from(null===(e=t.dom.defaultView)||void 0===e?void 0:e.frameElement)).map(Rt.fromDom)},owner:Wt}),Pn=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Rn=function(t){var e=Se(t),n=ke(t),r=xe(t);return Pn(e.left,e.top,n,r)},In=function(){return Be(window)},zn=function(t){return{isValue:S,isError:O,getOr:c(t),getOrThunk:c(t),getOrDie:c(t),or:function(e){return zn(t)},orThunk:function(e){return zn(t)},fold:function(e,n){return n(t)},map:function(e){return zn(e(t))},mapError:function(e){return zn(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOptional:function(){return bt.some(t)}}},Ln=function(t){return{isValue:O,isError:S,getOr:s,getOrThunk:function(t){return t()},getOrDie:function(){return x(String(t))()},or:s,orThunk:function(t){return t()},fold:function(e,n){return e(t)},map:function(e){return Ln(t)},mapError:function(e){return Ln(e(t))},each:a,bind:function(e){return Ln(t)},exists:O,forall:S,toOptional:bt.none}},jn={value:zn,error:Ln,fromOption:function(t,e){return t.fold((function(){return Ln(e)}),zn)}};function Bn(t,e,n){return t.stype===We.Error?e(t.serror):n(t.svalue)}function Fn(t){return{stype:We.Value,svalue:t}}function Nn(t){return{stype:We.Error,serror:t}}function Hn(t,e,n,r){return{tag:"field",key:t,newKey:e,presence:n,prop:r}}function Vn(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)}}function Un(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<e.length;o++){var i,a=e[o];for(i in a)Mt(a,i)&&(r[i]=t(r[i],a[i]))}return r}}function Wn(t){return{tag:"defaultedThunk",process:t}}function $n(t){return Wn(c(t))}function Gn(t){return{tag:"mergeWithThunk",process:t}}function Kn(t){return d(t)&&100<Ct(t).length?" removed due to size":JSON.stringify(t,null,2)}function qn(t,e){return Fr([{path:t,getErrorInfo:e}])}function Xn(t){return{extract:function(e,n){return Hr(t(n),(function(t){return qn(e,c(t))}))},toString:c("val")}}function Yn(t,e,n,r){return r(at(t,e).getOrThunk((function(){return n(t)})))}function Jn(t,e,n,r,o){function i(t){return o.extract(e.concat([r]),t)}function a(t){return t.fold((function(){return Br(bt.none())}),(function(t){var n=o.extract(e.concat([r]),t);return Vr(n,bt.some)}))}var u,s,l,f,d,m;switch(t.tag){case"required":return l=e,m=i,at(f=n,d=r).fold((function(){return t=d,e=f,qn(l,(function(){return'Could not find valid *required* value for "'+t+'" in '+Kn(e)}));var t,e}),m);case"defaultedThunk":return Yn(n,r,t.process,i);case"option":return a(at(n,r));case"defaultedOptionThunk":return s=t.process,a(at(u=n,r).map((function(t){return!0===t?s(u):t})));case"mergeWithThunk":return Yn(n,r,c({}),(function(e){return i($r(t.process(n),e))}))}}function Qn(t){return{extract:function(e,n){return t().extract(e,n)},toString:function(){return t().toString()}}}function Zn(t){var e=Xr(t),n=F(t,(function(t,e){return Vn(e,(function(e){var n;return $r(t,((n={})[e]=!0,n))}),c(t))}),{});return{extract:function(t,r){var o,i,u,c,s,l,f=B(h(r)?[]:Ct((u=v,c=i={},s=function(t,e){c[e]=t},l=a,et(r,(function(t,e){(u(t,e)?s:l)(t,e)})),i)),(function(t){return!ut(n,t)}));return 0===f.length?e.extract(t,r):(o=f,qn(t,(function(){return"There are unsupported fields: ["+o.join(", ")+"] specified"})))},toString:e.toString}}function tr(t){return{extract:function(e,n){var r=L(n,(function(n,r){return t.extract(e.concat(["["+r+"]"]),n)}));return Kr(r)},toString:function(){return"array("+t.toString()+")"}}}function er(t){return{extract:function(e,n){for(var r=[],o=0,i=t;o<i.length;o++){var a=i[o].extract(e,n);if(a.stype===We.Value)return a;r.push(a)}return Kr(r)},toString:function(){return"oneOf("+L(t,(function(t){return t.toString()})).join(", ")+")"}}}function nr(t,e){return Xn((function(n){var r=typeof n;return t(n)?Br(n):Fr("Expected type: "+e+" but got: "+r)}))}function rr(t,e){return{extract:function(n,r){return at(r,t).fold((function(){return e=t,qn(n,(function(){return'Choice schema did not contain choice key: "'+e+'"'}));var e}),(function(t){return o=n,i=r,at(a=e,u=t).fold((function(){return t=a,e=u,qn(o,(function(){return'The chosen schema: "'+e+'" did not exist in branches: '+Kn(t)}));var t,e}),(function(t){return t.extract(o.concat(["branch: "+u]),i)}));var o,i,a,u}))},toString:function(){return"chooseOn("+t+"). Possible values: "+Ct(e)}}}function or(t){return Xn((function(e){return t(e).fold(Fr,Br)}))}function ir(t,e){return n=function(e){return t(e).fold(Nn,Fn)},r=e,{extract:function(t,e){var o=Ct(e),i=tr(Xn(n)).extract(t,o);return Nr(i,(function(n){var o=L(n,(function(t){return Hn(t,t,{tag:"required",process:{}},r)}));return Xr(o).extract(t,e)}))},toString:function(){return"setOf("+r.toString()+")"}};var n,r}function ar(t,e,n){return jr((o=e.extract([t],r=n),Ur(o,(function(t){return{input:r,errors:t}}))));var r,o}function ur(t){return t.fold((function(t){throw new Error(oo(t))}),s)}function cr(t,e,n){return ur(ar(t,e,n))}function sr(t,e){return rr(t,nt(e,Xr))}function lr(t){return or((function(e){return xt(t,e)?jn.value(e):jn.error('Unsupported value: "'+e+'", choose one of "'+t.join(", ")+'".')}))}function fr(t){return io(t,t,{tag:"required",process:{}},Jr())}function dr(t,e){return io(t,t,{tag:"required",process:{}},e)}function mr(t){return dr(t,Zr)}function pr(t,e){return io(t,t,{tag:"required",process:{}},lr(e))}function hr(t){return dr(t,eo)}function gr(t,e){return io(t,t,{tag:"required",process:{}},Xr(e))}function vr(t,e){return io(t,t,{tag:"required",process:{}},Yr(e))}function br(t,e){return io(t,t,{tag:"required",process:{}},tr(e))}function yr(t){return io(t,t,{tag:"option",process:{}},Jr())}function _r(t,e){return io(t,t,{tag:"option",process:{}},e)}function wr(t){return _r(t,Qr)}function xr(t){return _r(t,Zr)}function Or(t){return _r(t,eo)}function Sr(t,e){return _r(t,tr(e))}function Cr(t,e){return _r(t,Xr(e))}function kr(t,e){return io(t,t,$n(e),Jr())}function Er(t,e,n){return io(t,t,$n(e),n)}function Mr(t,e){return Er(t,e,Qr)}function Tr(t,e){return Er(t,e,Zr)}function Dr(t,e,n){return Er(t,e,lr(n))}function Ar(t,e){return Er(t,e,to)}function Pr(t,e){return Er(t,e,eo)}function Rr(t,e,n){return Er(t,e,tr(n))}function Ir(t,e,n){return Er(t,e,Xr(n))}function zr(t){var e=t;return{get:function(){return e},set:function(t){e=t}}}function Lr(t){if(!m(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};return Ot(t,(function(r,o){var i=Ct(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],u=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!m(u))throw new Error("case arguments must be an array");e.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==u.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+u.length+" ("+u+"), got "+i);return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);return e[o].apply(null,n)},match:function(t){var r=Ct(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));if(!$(e,(function(t){return xt(r,t)})))throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[a].apply(null,n)},log:function(t){}}}})),n}($e=We={})[$e.Error=0]="Error",$e[$e.Value=1]="Value";var jr=function(t){return Bn(t,jn.error,jn.value)},Br=Fn,Fr=Nn,Nr=function(t,e){return t.stype===We.Value?e(t.svalue):t},Hr=function(t,e){return t.stype===We.Error?e(t.serror):t},Vr=function(t,e){return t.stype===We.Value?{stype:We.Value,svalue:e(t.svalue)}:t},Ur=function(t,e){return t.stype===We.Error?{stype:We.Error,serror:e(t.serror)}:t},Wr=Bn,$r=Un((function(t,e){return d(t)&&d(e)?$r(t,e):e})),Gr=Un((function(t,e){return e})),Kr=function(t){var e,n,r=(e=[],n=[],Ot(t,(function(t){Bn(t,(function(t){return n.push(t)}),(function(t){return e.push(t)}))})),{values:e,errors:n});return 0<r.errors.length?u(Fr,U)(r.errors):Br(r.values)},qr=Xn(Br),Xr=function(t){return{extract:function(e,n){for(var r={},o=[],i=0,a=t;i<a.length;i++)Vn(a[i],(function(t,i,a,u){var c=Jn(a,e,n,t,u);Wr(c,(function(t){o.push.apply(o,t)}),(function(t){r[i]=t}))}),(function(t,e){r[t]=e(n)}));return 0<o.length?Fr(o):Br(r)},toString:function(){return"obj{\n"+L(t,(function(t){return Vn(t,(function(t,e,n,r){return t+" -> "+r.toString()}),(function(t,e){return"state("+t+")"}))})).join("\n")+"}"}}},Yr=u(tr,Xr),Jr=c(qr),Qr=nr(y,"number"),Zr=nr(f,"string"),to=nr(h,"boolean"),eo=nr(b,"function"),no=function(t){if(Object(t)!==t)return!0;switch({}.toString.call(t).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(t).every((function(e){return no(t[e])}));default:return!1}},ro=Xn((function(t){return no(t)?Br(t):Fr("Expected value to be acceptable for sending via postMessage")})),oo=function(t){return"Errors: \n"+L(10<(e=t.errors).length?e.slice(0,10).concat([{path:[],getErrorInfo:c("... (only showing first ten failures)")}]):e,(function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()})).join("\n")+"\n\nInput object: "+Kn(t.input);var e},io=Hn,ao=function(t,e){return{tag:"custom",newKey:t,instantiator:e}};function uo(t,e){return(n={})[t]=e,n;var n}function co(t){return e={},Ot(t,(function(t){e[t.key]=t.value})),e;var e}function so(t){return b(t)?t:O}function lo(t,e,n){for(var r=t.dom,o=so(n);r.parentNode;){r=r.parentNode;var i=Rt.fromDom(r),a=e(i);if(a.isSome())return a;if(o(i))break}return bt.none()}function fo(t,e,n){var r=e(t),o=so(n);return r.orThunk((function(){return o(t)?bt.none():lo(t,e,o)}))}function mo(t,e){return Vt(t.element,e.event.target)}function po(t){if(!ut(t,"can")&&!ut(t,"abort")&&!ut(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return k(k({},ri),t)}function ho(t){return c("alloy."+t)}function go(t,e){Ji(t,t.element,e,{})}function vo(t,e,n){Ji(t,t.element,e,n)}function bo(t){go(t,Di())}function yo(t,e,n){Ji(t,e,n,{})}function _o(t,e,n,r){t.getSystem().triggerEvent(n,e,r.event)}function wo(t,e){return{key:t,value:po({abort:e})}}function xo(t){return{key:t,value:po({run:function(t,e){e.event.prevent()}})}}function Oo(t,e){return{key:t,value:po({run:e})}}function So(t,e,n){return{key:t,value:po({run:function(t,r){e.apply(void 0,[t,r].concat(n))}})}}function Co(t){return function(e){return{key:t,value:po({run:function(t,n){mo(t,n)&&e(t,n)}})}}}function ko(t,e,n){var r,o=e.partUids[n];return Oo(r=t,(function(t,e){t.getSystem().getByUid(o).each((function(t){_o(t,t.element,r,e)}))}))}function Eo(t,e){return Oo(t,(function(t,n){var r=n.event,o=t.getSystem().getByDom(r.target).getOrThunk((function(){return fo(r.target,(function(e){return t.getSystem().getByDom(e).toOptional()}),O).getOr(t)}));e(t,o,n)}))}function Mo(t){return Oo(t,(function(t,e){e.cut()}))}function To(t,e){return Co(t)(e)}function Do(t){return t.dom.innerHTML}function Ao(t,e){var n,r,o=Wt(t).dom,i=Rt.fromDom(o.createDocumentFragment());Pe(i,(n=e,(r=(o||document).createElement("div")).innerHTML=n,Yt(Rt.fromDom(r)))),Re(t),Mn(t,i)}function Po(t){if(te(t))return"#shadow-root";var e=Rt.fromDom(t.dom.cloneNode(!1)),n=Rt.fromTag("div"),r=Rt.fromDom(e.dom.cloneNode(!0));return Mn(n,r),Do(n)}function Ro(t){var e=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++ia+String(e)}function Io(t){var e=Ge(t)?t.dom[sa]:null;return bt.from(e)}function zo(t){function e(e){return function(){throw new Error(function(e){return"The component must be in a context to execute: "+e+(t?"\n"+Po(t().element)+" is not in context.":"")}(e))}}return{debugInfo:c("fake"),triggerEvent:function(){},triggerFocus:function(){},triggerEscape:function(){},broadcast:function(){},broadcastOn:function(){},broadcastEvent:function(){},build:e("build"),addToWorld:e("addToWorld"),removeFromWorld:e("removeFromWorld"),addToGui:e("addToGui"),removeFromGui:e("removeFromGui"),getByUid:e("getByUid"),getByDom:e("getByDom"),isConnected:O}}function Lo(t,e){var n=t.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:e,parameters:pa(i)}},t}function jo(t){return uo(ha,t)}function Bo(t){return e=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return t.apply(void 0,M([e.getApis(),e],n,!1))},r=(n=t.toString()).indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/),e.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:pa(i.slice(1))}},e;var e,n,r,o,i}function Fo(t,e){var n={};return et(t,(function(t,r){et(t,(function(t,o){var i=at(n,o).getOr([]);n[o]=i.concat([e(r,t)])}))})),n}function No(t){return{classes:g(t.classes)?[]:t.classes,attributes:g(t.attributes)?{}:t.attributes,styles:g(t.styles)?{}:t.styles}}function Ho(t){return t.cHandler}function Vo(t,e){return{name:t,handler:e}}function Uo(t,e){var n=ae(t,e);return void 0===n||""===n?[]:n.split(" ")}function Wo(t){return void 0!==t.dom.classList}function $o(t,e){var n,r,o;Wo(t)?t.dom.classList.add(e):(r=e,o=Uo(n=t,"class").concat([r]),oe(n,"class",o.join(" ")))}function Go(t,e){var n,r,o,i;Wo(t)?t.dom.classList.remove(e):(o=e,0<(i=B(Uo(r=t,"class"),(function(t){return t!==o}))).length?oe(r,"class",i.join(" ")):se(r,"class")),0===(Wo(n=t)?n.dom.classList:Uo(n,"class")).length&&se(n,"class")}function Ko(t,e){return Wo(t)&&t.dom.classList.contains(e)}function qo(t,e){Ot(e,(function(e){$o(t,e)}))}function Xo(t,e){Ot(e,(function(e){Go(t,e)}))}function Yo(t){return t.dom.value}function Jo(t,e){if(void 0===e)throw new Error("Value.set was undefined");t.dom.value=e}function Qo(t){var e,n,r,o,i=(e=at(t,"behaviours").getOr({}),W(Ct(e),(function(t){var n=e[t];return v(n)?[n.me]:[]})));return n=t,o=L(r=i,(function(t){return Cr(t.name(),[fr("config"),kr("state",ga)])})),{list:r,data:nt(ar("component.behaviours",Xr(o),n.behaviours).fold((function(t){throw new Error(oo(t)+"\nComplete spec:\n"+JSON.stringify(n,null,2))}),s),(function(t){return c(t.map((function(t){return{config:t.config,state:t.state.init(t.config)}})))}))}}function Zo(t){var e,n,r,o,i,a,u,c,s,l,f=da(t),d=f.events,m=E(f,["events"]),p=L(at(m,"components").getOr([]),Oa),h=k(k({},m),{events:k(k({},oa),d),components:p});return jn.value((n=zr(ma),r=ur(ar("custom.definition",_a,e=h)),i=(o=Qo(e)).list,a=o.data,u=function(t){var e=Rt.fromTag(t.tag);ie(e,t.attributes),qo(e,t.classes),me(e,t.styles),t.innerHtml.each((function(t){return Ao(e,t)}));var n=t.domChildren;return Pe(e,n),t.value.each((function(t){Jo(e,t)})),t.uid,la(e,t.uid),e}(function(t,e,n){var r,o,i=k(k({},(r=t).dom),{uid:r.uid,domChildren:L(r.components,(function(t){return t.element}))}),a=t.domModification.fold((function(){return No({})}),No),u=0<e.length?function(t,e,n,r){var o=k({},e);function i(t){return F(t,(function(t,e){return k(k({},e.modification),t)}),{})}Ot(n,(function(e){o[e.name()]=e.exhibit(t,r)}));var a=Fo(o,(function(t,e){return{name:t,modification:e}}));return No({classes:F(a.classes,(function(t,e){return e.modification.concat(t)}),[]),attributes:i(a.attributes),styles:i(a.styles)})}(n,{"alloy.base.modification":a},e,i):a;return k(k({},o=i),{attributes:k(k({},o.attributes),u.attributes),styles:k(k({},o.styles),u.styles),classes:o.classes.concat(u.classes)})}(r,i,a)),c=function(t,e,n){var r,o,i,a,u,c={"alloy.base.behaviour":t.events},s=t.eventOrder;return o=n,i=e,r=Fo(k(k({},c),(a=o,u={},Ot(i,(function(t){u[t.name()]=t.handlers(a)})),u)),Vo),ba(r,s).getOrDie()}(r,i,a),s=zr(r.components),l={uid:e.uid,getSystem:n.get,config:function(t){var n=a;return(b(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 b(a[t.name()])},spec:e,readState:function(t){return a[t]().map((function(t){return t.state.readState()})).getOr("not enabled")},getApis:function(){return r.apis},connect:function(t){n.set(t)},disconnect:function(){n.set(zo(g))},element:u,syncComponents:function(){var t=W(Yt(u),(function(t){return n.get().getByDom(t).fold((function(){return[]}),X)}));s.set(t)},components:s.get,events:c}));function g(){return l}}function ti(t){var e=Rt.fromText(t);return wa({element:e})}Lr([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var ei,ni,ri={can:S,abort:O,run:a},oi=c,ii=oi("touchstart"),ai=oi("touchmove"),ui=oi("touchend"),ci=oi("touchcancel"),si=oi("mousedown"),li=oi("mousemove"),fi=oi("mouseout"),di=oi("mouseup"),mi=oi("mouseover"),pi=oi("focusin"),hi=oi("focusout"),gi=oi("keydown"),vi=oi("keyup"),bi=oi("input"),yi=oi("change"),_i=oi("click"),wi=oi("transitioncancel"),xi=oi("transitionend"),Oi=oi("transitionstart"),Si=oi("selectstart"),Ci={tap:ho("tap")},ki=ho("focus"),Ei=ho("blur.post"),Mi=ho("paste.post"),Ti=ho("receive"),Di=ho("execute"),Ai=ho("focus.item"),Pi=Ci.tap,Ri=ho("longpress"),Ii=ho("sandbox.close"),zi=ho("typeahead.cancel"),Li=ho("system.init"),ji=ho("system.touchmove"),Bi=ho("system.touchend"),Fi=ho("system.scroll"),Ni=ho("system.resize"),Hi=ho("system.attached"),Vi=ho("system.detached"),Ui=ho("system.dismissRequested"),Wi=ho("system.repositionRequested"),$i=ho("focusmanager.shifted"),Gi=ho("slotcontainer.visibility"),Ki=ho("change.tab"),qi=ho("dismiss.tab"),Xi=ho("highlight"),Yi=ho("dehighlight"),Ji=function(t,e,n,r){var o=k({target:e},r);t.getSystem().triggerEvent(n,e,o)},Qi=co,Zi=Co(Hi()),ta=Co(Vi()),ea=Co(Li()),na=(ei=Di(),function(t){return Oo(ei,t)}),ra=Qi([{key:ki(),value:po({can:function(t,e){var n,r=e.event,o=r.originator,i=r.target;return!(Vt(n=o,t.element)&&!Vt(n,i))}})}]),oa=Object.freeze({__proto__:null,events:ra}),ia=0,aa=c("alloy-id-"),ua=c("data-alloy-id"),ca=aa(),sa=ua(),la=function(t,e){Object.defineProperty(t.dom,sa,{value:e,writable:!0})},fa=Ro,da=s,ma=zo(),pa=function(t){return L(t,(function(t){return At(t,"/*")?t.substring(0,t.length-"/*".length):t}))},ha=Ro("alloy-premade"),ga={init:function(){return va({readState:c("No State required")})}},va=function(t){return t},ba=function(t,e){var n,r,o,i,a,u,c=rt(t,(function(t,n){return(1===t.length?jn.value(t[0].handler):function(t,e,n){var r=e[n];return r?function(t,e,n){try{var r=Y(e,(function(e,r){var o=e.name,i=r.name,a=n.indexOf(o),u=n.indexOf(i);if(-1===a)throw new Error("The ordering for "+t+" does not have an entry for "+o+".\nOrder specified: "+JSON.stringify(n,null,2));if(-1===u)throw new Error("The ordering for "+t+" does not have an entry for "+i+".\nOrder specified: "+JSON.stringify(n,null,2));return a<u?-1:u<a?1:0}));return jn.value(r)}catch(e){return jn.error([e])}}("Event: "+n,t,r).map((function(t){var e,n,r,o,i=L(t,(function(t){return t.handler}));return{can:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return N(n,(function(e,n){return e&&n.can.apply(void 0,t)}),!0)},abort:(r=n=e=i,o=function(t){return t.abort},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return N(r,(function(e,n){return e||o(n).apply(void 0,t)}),!1)}),run:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];Ot(e,(function(e){e.run.apply(void 0,t)}))}}})):jn.error(["The event ("+n+') 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(L(t,(function(t){return t.name})),null,2)])}(t,e,n)).map((function(r){var o,i,a=(i=b(o=r)?{can:S,abort:O,run:o}:o,function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=[t,e].concat(n);i.abort.apply(void 0,o)?e.stop():i.can.apply(void 0,o)&&i.run.apply(void 0,o)}),u=1<t.length?B(e[n],(function(e){return R(t,(function(t){return t.name===e}))})).join(" > "):t[0].name;return uo(n,{handler:a,purpose:u})}))}));return n={},r=[],o=[],Ot(c,(function(t){t.fold((function(t){r.push(t)}),(function(t){o.push(t)}))})),0<(u={errors:r,values:o}).errors.length?jn.error(U(u.errors)):(a=n,0===(i=u.values).length?jn.value(a):jn.value($r(a,Gr.apply(void 0,i))))},ya="alloy.base.behaviour",_a=Xr([io("dom","dom",{tag:"required",process:{}},Xr([fr("tag"),kr("styles",{}),kr("classes",[]),kr("attributes",{}),yr("value"),yr("innerHtml")])),fr("components"),fr("uid"),kr("events",{}),kr("apis",{}),io("eventOrder","eventOrder",((ni={})[Di()]=["disabling",ya,"toggling","typeaheadevents"],ni[ki()]=[ya,"focusing","keying"],ni[Li()]=[ya,"disabling","toggling","representing"],ni[bi()]=[ya,"representing","streaming","invalidating"],ni[Vi()]=[ya,"representing","item-events","tooltipping"],ni[si()]=["focusing",ya,"item-type-events"],ni[ii()]=["focusing",ya,"item-type-events"],ni[mi()]=["item-type-events","tooltipping"],ni[Ti()]=["receiving","reflecting","tooltipping"],Gn(c(ni))),Jr()),yr("domModification")]),wa=function(t){var e=cr("external.component",Zn([fr("element"),yr("uid")]),t),n=zr(zo()),r=e.uid.getOrThunk((function(){return fa("external")}));la(e.element,r);var o={uid:r,getSystem:n.get,config:bt.none,hasConfigured:O,connect:function(t){n.set(t)},disconnect:function(){n.set(zo((function(){return o})))},getApis:function(){return{}},element:e.element,spec:t,readState:c("No state"),syncComponents:a,components:c([]),events:{}};return jo(o)},xa=fa,Oa=function(t){return at(t,ha).getOrThunk((function(){return Zo(Mt(t,"uid")?t:k({uid:xa("")},t)).getOrDie()}))},Sa=jo;function Ca(t,e,n,r,o){return t(n,r)?bt.some(n):b(o)&&o(n)?bt.none():e(n,r,o)}function ka(t,e,n){for(var r=t.dom,o=b(n)?n:O;r.parentNode;){r=r.parentNode;var i=Rt.fromDom(r);if(e(i))return bt.some(i);if(o(i))break}return bt.none()}function Ea(t,e,n){return Ca((function(t,e){return e(t)}),ka,t,e,n)}function Ma(t,e,n){return Ea(t,e,n).isSome()}function Ta(t,e,n){return ka(t,(function(t){return Nt(t,e)}),n)}function Da(t,e){return n=e,Ht(r=void 0===t?document:t.dom)?bt.none():bt.from(r.querySelector(n)).map(Rt.fromDom);var n,r}function Aa(t,e,n){return Ca(Nt,Ta,t,e,n)}function Pa(){var t=Ro("aria-owns");return{id:t,link:function(e){oe(e,"aria-owns",t)},unlink:function(t){se(t,"aria-owns")}}}var Ra,Ia,za=function(t,e){return Ma(e,(function(e){return Vt(e,t.element)}),O)||(n=t,Ea(e,(function(t){if(!Ge(t))return!1;var e=ae(t,"id");return void 0!==e&&-1<e.indexOf("aria-owns")})).bind((function(t){var e=ae(t,"id");return Da(hn(t),'[aria-owns="'+e+'"]')})).exists((function(t){return za(n,t)})));var n};function La(t,e,n){var r,o;switch(at(ja.get(),t).orThunk((function(){return tt(Ct(ja.get()),(function(e){return-1<t.indexOf(e)?bt.some(ja.get()[e]):bt.none()}))})).getOr(Ra.NORMAL)){case Ra.NORMAL:return n(Fa());case Ra.LOGGING:var i=(r=t,e,o=[],(new Date).getTime(),{logEventCut:function(t,e,n){o.push({outcome:"cut",target:e,purpose:n})},logEventStopped:function(t,e,n){o.push({outcome:"stopped",target:e,purpose:n})},logNoParent:function(t,e,n){o.push({outcome:"no-parent",target:e,purpose:n})},logEventNoHandlers:function(t,e){o.push({outcome:"no-handlers-left",target:e})},logEventResponse:function(t,e,n){o.push({outcome:"response",purpose:n,target:e})},write:function(){(new Date).getTime();xt(["mousemove","mouseover","mouseout",Li()],r)}}),a=n(i);return i.write(),a;case Ra.STOP:return!0}}(Ia=Ra=Ra||{})[Ia.STOP=0]="STOP",Ia[Ia.NORMAL=1]="NORMAL",Ia[Ia.LOGGING=2]="LOGGING";var ja=zr({}),Ba=["alloy/data/Fields","alloy/debugging/Debugging"],Fa=c({logEventCut:a,logEventStopped:a,logNoParent:a,logEventNoHandlers:a,logEventResponse:a,write:a}),Na=c([fr("menu"),fr("selectedMenu")]),Ha=c([fr("item"),fr("selectedItem")]);function Va(){return gr("markers",[fr("backgroundMenu")].concat(Na()).concat(Ha()))}function Ua(t){return gr("markers",L(t,fr))}function Wa(t,e,n){return void 0!==(r=new Error).stack&&H(r.stack.split("\n"),(function(t){return 0<t.indexOf("alloy")&&!R(Ba,(function(e){return-1<t.indexOf(e)}))})).getOr("unknown"),io(e,e,n,or((function(t){return jn.value((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.apply(void 0,e)}))})));var r}function $a(t){return Wa(0,t,$n(a))}function Ga(t){return Wa(0,t,$n(bt.none))}function Ka(t){return Wa(0,t,{tag:"required",process:{}})}function qa(t){return Wa(0,t,{tag:"required",process:{}})}function Xa(t,e){return ao(t,c(e))}function Ya(t){return ao(t,s)}function Ja(t,e,n,r,o,i,a,u){return{x:t,y:e,bubble:n,direction:r,placement:o,restriction:i,label:a+"-"+o,alwaysFit:u=void 0!==u&&u}}function Qa(t,e,n,r){var o=t+e;return r<o?n:o<n?r:o}function Za(t,e){return q(["left","right","top","bottom"],(function(n){return at(e,n).map((function(e){return function(t){switch(e){case 1:return t.x;case 0:return t.x+t.width;case 2:return t.y;case 3:return t.y+t.height}}(t)}))}))}function tu(t,e){return t.x+t.width/2-e.width/2}function eu(t,e){return t.x+t.width-e.width}function nu(t,e){return t.y-e.height}function ru(t){return t.y+t.height}function ou(t,e){return t.y+t.height/2-e.height/2}function iu(t,e,n){return Ja(t.x+t.width,ou(t,e),n.east(),ju(),"east",Za(t,{left:0}),Nu)}function au(t,e,n){return Ja(t.x-e.width,ou(t,e),n.west(),Bu(),"west",Za(t,{right:1}),Nu)}function uu(){return[Hu,Vu,Uu,Wu,Gu,$u,iu,au]}function cu(){return[Vu,Hu,Wu,Uu,Gu,$u,iu,au]}function su(){return[Uu,Wu,Hu,Vu,$u,Gu]}function lu(){return[Wu,Uu,Vu,Hu,$u,Gu]}function fu(){return[Hu,Vu,Uu,Wu,Gu,$u]}function du(){return[Vu,Hu,Wu,Uu,Gu,$u]}function mu(t,e,n){return ea((function(r,o){n(r,t,e)}))}function pu(t){return{key:t,value:void 0}}function hu(t){var e,n,r,o,i,a,u,c,s=cr("Creating behaviour: "+t.name,Ju,t);return e=s.fields,n=s.name,r=s.active,o=s.apis,i=s.extra,a=s.state,u=Zn(e),c=Cr(n,[_r("config",Zn(e))]),Xu(u,c,n,r,o,i,a)}function gu(t){var e,n=cr("Creating behaviour: "+t.name,Qu,t),r=sr(n.branchKey,n.branches),o=n.name,i=n.active,a=n.apis,u=n.extra,c=n.state,s=Cr(o,[_r("config",e=r)]);return Xu(e,s,o,i,a,u,c)}function vu(){return Rt.fromDom(document)}function bu(t){return t.dom.focus()}function yu(t){var e=hn(t).dom;return t.dom===e.activeElement}function _u(t){return void 0===t&&(t=vu()),bt.from(t.dom.activeElement).map(Rt.fromDom)}function wu(t){return _u(hn(t)).filter((function(e){return t.dom.contains(e.dom)}))}function xu(t,e){var n=hn(e),r=_u(n).bind((function(t){function n(e){return Vt(t,e)}var r,o;return n(e)?bt.some(e):(r=n,(o=function(t){for(var e=0;e<t.childNodes.length;e++){var n=Rt.fromDom(t.childNodes[e]);if(r(n))return bt.some(n);var i=o(t.childNodes[e]);if(i.isSome())return i}return bt.none()})(e.dom))})),o=t(e);return r.each((function(t){_u(n).filter((function(e){return Vt(e,t)})).fold((function(){bu(t)}),a)})),o}function Ou(t,e,n,r,o){function i(t){return t+"px"}return{position:t,left:e.map(i),top:n.map(i),right:r.map(i),bottom:o.map(i)}}function Su(t,e){var n;pe(t,k(k({},n=e),{position:bt.some(n.position)}))}function Cu(t,e,n,r,o,i){var a=e.rect,u=a.x-n,c=a.y-r,s=o-(u+a.width),l=i-(c+a.height),f=bt.some(u),d=bt.some(c),m=bt.some(s),p=bt.some(l),h=bt.none();return e.direction.fold((function(){return Ou(t,f,d,h,h)}),(function(){return Ou(t,h,d,m,h)}),(function(){return Ou(t,f,h,h,p)}),(function(){return Ou(t,h,h,m,p)}),(function(){return Ou(t,f,d,h,h)}),(function(){return Ou(t,f,h,h,p)}),(function(){return Ou(t,f,d,h,h)}),(function(){return Ou(t,h,d,m,h)}))}function ku(t,e){return t.fold((function(){var t=e.rect;return Ou("absolute",bt.some(t.x),bt.some(t.y),bt.none(),bt.none())}),(function(t,n,r,o){return Cu("absolute",e,t,n,r,o)}),(function(t,n,r,o){return Cu("fixed",e,t,n,r,o)}))}function Eu(t,e){var n=_(Fe,e),r=t.fold(n,n,(function(){var t=ze();return Fe(e).translate(-t.left,-t.top)})),o=ke(e),i=xe(e);return Pn(r.left,r.top,o,i)}c(Xr(Ha().concat(Na())));var Mu=c(Xr(Ha())),Tu=c(gr("initSize",[fr("numColumns"),fr("numRows")])),Du=Lr([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),Au=Du.southeast,Pu=Du.southwest,Ru=Du.northeast,Iu=Du.northwest,zu=Du.south,Lu=Du.north,ju=Du.east,Bu=Du.west,Fu=function(t,e,n){return Math.min(Math.max(t,e),n)},Nu="layout",Hu=function(t,e,n){return Ja(t.x,ru(t),n.southeast(),Au(),"southeast",Za(t,{left:1,top:3}),Nu)},Vu=function(t,e,n){return Ja(eu(t,e),ru(t),n.southwest(),Pu(),"southwest",Za(t,{right:0,top:3}),Nu)},Uu=function(t,e,n){return Ja(t.x,nu(t,e),n.northeast(),Ru(),"northeast",Za(t,{left:1,bottom:2}),Nu)},Wu=function(t,e,n){return Ja(eu(t,e),nu(t,e),n.northwest(),Iu(),"northwest",Za(t,{right:0,bottom:2}),Nu)},$u=function(t,e,n){return Ja(tu(t,e),nu(t,e),n.north(),Lu(),"north",Za(t,{bottom:2}),Nu)},Gu=function(t,e,n){return Ja(tu(t,e),ru(t),n.south(),zu(),"south",Za(t,{top:3}),Nu)},Ku=Object.freeze({__proto__:null,events:function(t){return Qi([Oo(Ti(),(function(e,n){var r,o=t.channels,i=Ct(o),a=n,u=(r=a).universal?i:B(i,(function(t){return xt(r.channels,t)}));Ot(u,(function(t){var n=o[t],r=n.schema,i=cr("channel["+t+"] data\nReceiver: "+Po(e.element),r,a.data);n.onReceive(e,i)}))}))])}}),qu=[dr("channels",ir(jn.value,Zn([Ka("onReceive"),kr("schema",Jr())])))],Xu=function(t,e,n,r,o,i,a){function u(t){return ut(t,n)?t[n]():bt.none()}var s=nt(o,(function(t,e){return r=n,a=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var a=[t].concat(e);return t.config({name:c(r)}).fold((function(){throw new Error("We could not find any behaviour configuration for: "+r+". Using API: "+i)}),(function(e){var n=Array.prototype.slice.call(a,1);return o.apply(void 0,[t,e.config,e.state].concat(n))}))},u=i=e,l=(s=(o=t).toString()).indexOf(")")+1,f=s.indexOf("("),d=s.substring(f+1,l-1).split(/,\s*/),a.toFunctionAnnotation=function(){return{name:u,parameters:pa(d.slice(0,1).concat(d.slice(3)))}},a;var r,o,i,a,u,s,l,f,d})),l=nt(i,Lo),f=k(k(k({},l),s),{revoke:_(pu,n),config:function(e){var r=cr(n+"-config",t,e);return{key:n,value:{config:r,me:f,configAsRaw:Lt((function(){return cr(n+"-config",t,e)})),initialConfig:e,state:a}}},schema:c(e),exhibit:function(t,e){return Tt(u(t),at(r,"exhibit"),(function(t,n){return n(e,t.config,t.state)})).getOrThunk((function(){return No({})}))},name:c(n),handlers:function(t){return u(t).map((function(t){return at(r,"events").getOr((function(){return{}}))(t.config,t.state)})).getOr({})}});return f},Yu=co,Ju=Zn([fr("fields"),fr("name"),kr("active",{}),kr("apis",{}),kr("state",ga),kr("extra",{})]),Qu=Zn([fr("branchKey"),fr("branches"),fr("name"),kr("active",{}),kr("apis",{}),kr("state",ga),kr("extra",{})]),Zu=c(void 0),tc=hu({fields:qu,name:"receiving",active:Ku}),ec=Object.freeze({__proto__:null,exhibit:function(t,e){return No({classes:[],styles:e.useFixed()?{}:{position:"relative"}})}}),nc=Lr([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),rc=function(t,e,n){var r=Sn(e,n);return t.fold(c(r),c(r),(function(){var t=ze();return r.translate(-t.left,-t.top)}))};function oc(t){return ue(t,wc)}function ic(t){function e(){return n.get().each(t)}var n=zr(bt.none());return{clear:function(){e(),n.set(bt.none())},isSet:function(){return n.get().isSome()},get:function(){return n.get()},set:function(t){e(),n.set(bt.some(t))}}}function ac(){return ic((function(t){return t.destroy()}))}function uc(){return ic((function(t){return t.unbind()}))}function cc(){var t=ic(a);return k(k({},t),{on:function(e){return t.get().each(e)}})}function sc(t,e,n){return Me(t,e,Oc,n,!1)}function lc(t,e,n){return Me(t,e,Oc,n,!0)}function fc(t,e){function n(e){var n,r=null!==(n=e.raw.pseudoElement)&&void 0!==n?n:"";return Vt(e.target,t)&&!mt(r)&&xt(Cc,e.raw.propertyName)}function r(r){var i;(o(r)||n(r))&&(c.clear(),s.clear(),!o(i=null==r?void 0:r.raw.type)&&i!==xi()||(clearTimeout(a),se(t,kc),Xo(t,e.classes)))}function i(){c.set(sc(t,xi(),r)),s.set(sc(t,wi(),r))}var a,u,c=uc(),s=uc();"ontransitionstart"in t.dom?u=sc(t,Oi(),(function(t){n(t)&&(u.unbind(),i())})):i();var l,d,m=(l=t,d=p("transition-delay"),N(p("transition-duration"),(function(t,e,n){var r=h(d[n])+h(e);return Math.max(t,r)}),0));function p(t){var e=he(l,t);return B(f(e)?e.split(/\s*,\s*/):[],mt)}function h(t){if(f(t)&&/^[\d.]+/.test(t)){var e=parseFloat(t);return At(t,"ms")?e:1e3*e}return 0}requestAnimationFrame((function(){a=setTimeout(r,m+17),oe(t,kc,a)}))}function dc(t,e,n,r){be(e,"max-height"),be(e,"max-width");var o,i,a,u,l,f,d,m,p,h={width:ke(o=e),height:xe(o)};return i=e,a=r.preference,u=t,l=h,f=n,d=r.bounds,m=l.width,p=l.height,N(a,(function(t,e){var n=_(g,e);return t.fold(c(t),n)}),xc.nofit({rect:u,maxHeight:l.height,maxWidth:l.width,direction:Au(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:u.y},-1,-1,!1)).fold(s,s);function g(t,e,n,r,o){var a=function(t,e,n,r){var o,i,a,u,s,l,f,d,m,p,h,g,v,b,y,_,w,x,O,S,C,k,E,M,T,D,A,P,R,I,z,L,j,B,F,N,H,V,U,W=t.bubble,$=W.offset,G=(j=r,B=t.restriction,F=$,N=ot("left",j.x),H=ot("top",j.y),V=ot("right",j.right),U=ot("bottom",j.bottom),Pn(N,H,V-N,U-H)),K=t.x+$.left,q=t.y+$.top,X=Pn(K,q,e,n),Y=(o=G.x,i=G.y,a=G.right,u=G.bottom,s=X.x,l=X.y,f=X.right,d=X.bottom,m=X.width,p=X.height,{originInBounds:o<=s&&s<=a&&i<=l&&l<=u,sizeInBounds:f<=a&&o<=f&&d<=u&&i<=d,visibleW:Math.min(m,o<=s?a-s:f-o),visibleH:Math.min(p,i<=l?u-l:d-i)}),J=Y.visibleW,Q=Y.visibleH,Z=Y.originInBounds&&Y.sizeInBounds,tt=Z?X:(h=G.x,g=G.y,v=G.right,b=G.bottom,y=X.x,_=X.y,w=X.width,x=X.height,O=Math.max(h,v-w),S=Math.max(g,b-x),C=Fu(y,h,O),k=Fu(_,g,S),E=Math.min(C+w,v)-C,M=Math.min(k+x,b)-k,Pn(C,k,E,M)),et=0<tt.width&&0<tt.height,nt=(T=t.direction,P=c((D=tt).bottom-(A=r).y),R=c(A.bottom-D.y),I=T.fold(R,R,P,P,R,P,R,R),z=c(D.right-A.x),L=c(A.right-D.x),{maxWidth:T.fold(L,z,L,z,L,L,L,z),maxHeight:I}),rt={rect:tt,maxHeight:nt.maxHeight,maxWidth:nt.maxWidth,direction:t.direction,placement:t.placement,classes:{on:W.classesOn,off:W.classesOff},layout:t.label,testY:q};function ot(t,e){return B[t].map((function(n){var r="top"===t||"bottom"===t,o=r?F.top:F.left,i=("left"===t||"top"===t?Math.max:Math.min)(n,e)+o;return r?Fu(i,j.y,j.bottom):Fu(i,j.x,j.right)})).getOr(e)}return Z||t.alwaysFit?xc.fit(rt):xc.nofit(rt,J,Q,et)}(t(u,l,f,i,d),m,p,d);return a.fold(c(a),(function(t,i,u,c){return(o===c?r<u||n<i:!o&&c)?a:xc.nofit(e,n,r,o)}))}}function mc(t,e){var n=t,r=Math.floor(e);de(n,"max-height",xn.max(n,r,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"])+"px")}function pc(t,e,n){return void 0===t[e]?n:t[e]}function hc(t,e,n,r){function o(t){return at(n,t).getOr([])}function i(t,e,n){var r=K(Dc,n);return{offset:Sn(t,e),classesOn:W(n,o),classesOff:W(r,o)}}var a=t*(r=void 0===r?1:r),u=e*r;return{southeast:function(){return i(-t,e,["top","alignLeft"])},southwest:function(){return i(t,e,["top","alignRight"])},south:function(){return i(-t/2,e,["top","alignCentre"])},northeast:function(){return i(-t,-e,["bottom","alignLeft"])},northwest:function(){return i(t,-e,["bottom","alignRight"])},north:function(){return i(-t/2,-e,["bottom","alignCentre"])},east:function(){return i(t,-e/2,["valignCentre","left"])},west:function(){return i(-t,-e/2,["valignCentre","right"])},insetNortheast:function(){return i(a,u,["top","alignLeft","inset"])},insetNorthwest:function(){return i(-a,u,["top","alignRight","inset"])},insetNorth:function(){return i(-a/2,u,["top","alignCentre","inset"])},insetSoutheast:function(){return i(a,-u,["bottom","alignLeft","inset"])},insetSouthwest:function(){return i(-a,-u,["bottom","alignRight","inset"])},insetSouth:function(){return i(-a/2,-u,["bottom","alignCentre","inset"])},insetEast:function(){return i(-a,-u/2,["valignCentre","right","inset"])},insetWest:function(){return i(a,-u/2,["valignCentre","left","inset"])}}}function gc(){return hc(0,0,{})}function vc(t,e){return function(n){return"rtl"===Pc(n)?e:t}}nc.none;var bc,yc=nc.relative,_c=nc.fixed,wc="data-alloy-placement",xc=Lr([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),Oc=S,Sc=Ee,Cc=["top","bottom","right","left"],kc="data-alloy-transition-timer",Ec=c((function(t,e){mc(t,e),me(t,{"overflow-x":"hidden","overflow-y":"auto"})})),Mc=c((function(t,e){mc(t,e)})),Tc=function(t,e,n,r){var o,i,a,u,c=dc(t,e,n,r),s=e,f=c,d=ku((o=r).origin,f);return o.transition.each((function(t){!function(t,e,n,r,o,i){var a,u,c,s,f,d,m,p,h,g=(a=r,u=o,i.exists((function(t){var e=a.mode;return"all"===e||t[e]!==u[e]})));function v(t){return parseFloat(t).toFixed(3)}g||(h=t,$(r.classes,(function(t){return Ko(h,t)})))?(de(t,"position",n.position),c=Eu(e,t),s=ku(e,k(k({},o),{rect:c})),f=q(Cc,(function(t){return s[t]})),p=n,ot(f,(function(t,e){var n,r,o,i=p[e].map(v),a=t.map(v);return!Tt(n=i,r=a,o=void 0===o?l:o).getOr(n.isNone()&&r.isNone())})).isSome()&&(pe(t,f),g&&(qo(d=t,(m=r).classes),ue(d,kc).each((function(t){clearTimeout(parseInt(t,10)),se(d,kc)})),fc(d,m)),ye(t))):Xo(t,r.classes)}(s,o.origin,d,t,f,o.lastPlacement)})),Su(s,d),u=c.placement,oe(e,wc,u),Xo(i=e,(a=c.classes).off),qo(i,a.on),(0,r.maxHeightFunction)(e,c.maxHeight),(0,r.maxWidthFunction)(e,c.maxWidth),{layout:c.layout,placement:c.placement}},Dc=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],Ac=s,Pc=function(t){return"rtl"===he(t,"direction")?"rtl":"ltr"};function Rc(t){return Ma(t,(function(t){return Ge(t)&&ae(t,"data-alloy-vertical-dir")===bc.BottomToTop}))}function Ic(){return Cr("layouts",[fr("onLtr"),fr("onRtl"),yr("onBottomLtr"),yr("onBottomRtl")])}function zc(t,e,n,r,o,i,a){var u=a.map(Rc).getOr(!1),c=e.layouts.map((function(e){return e.onLtr(t)})),s=e.layouts.map((function(e){return e.onRtl(t)}));return vc(u?e.layouts.bind((function(e){return e.onBottomLtr.map((function(e){return e(t)}))})).or(c).getOr(o):c.getOr(n),u?e.layouts.bind((function(e){return e.onBottomRtl.map((function(e){return e(t)}))})).or(s).getOr(i):s.getOr(r))(t)}function Lc(t){return t.fold(s,(function(t,e,n){return t.translate(-e,-n)}))}function jc(t){return t.fold(s,s)}function Bc(t){return N(t,(function(t,e){return t.translate(e.left,e.top)}),Sn(0,0))}function Fc(t){return Bc(L(t,jc))}function Nc(t,e,n){var r,o,i=ze(Wt(t.element)),a=(r=t,o=Kt(n.root).dom,bt.from(o.frameElement).map(Rt.fromDom).filter((function(t){return Vt(Wt(t),Wt(r.element))})).map(Se).getOr(i));return Zc(a,i.left,i.top)}function Hc(t,e,n,r){var o=Qc(Sn(t,e));return bt.some({point:o,width:n,height:r})}function Vc(t,e,n,r,o){return t.map((function(t){var i=[e,t.point],a=r.fold((function(){return Fc(i)}),(function(){return Fc(i)}),(function(){return Bc(L(i,Lc))})),u={x:a.left,y:a.top,width:t.width,height:t.height},c=(n.showAbove?su:fu)(),s=(n.showAbove?lu:du)(),l=zc(o,n,c,s,c,s,bt.none());return Ac({anchorBox:u,bubble:n.bubble.getOr(gc()),overrides:n.overrides,layouts:l,placer:bt.none()})}))}function Uc(t,e,n){var r,o=t.document.createRange(),i=o;return e.fold((function(t){i.setStartBefore(t.dom)}),(function(t,e){i.setStart(t.dom,e)}),(function(t){i.setStartAfter(t.dom)})),r=o,n.fold((function(t){r.setEndBefore(t.dom)}),(function(t,e){r.setEnd(t.dom,e)}),(function(t){r.setEndAfter(t.dom)})),o}function Wc(t,e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i}function $c(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}}function Gc(t,e,n){return e(Rt.fromDom(n.startContainer),n.startOffset,Rt.fromDom(n.endContainer),n.endOffset)}function Kc(t,e){return n=t,i=e.match({domRange:function(t){return{ltr:c(t),rtl:bt.none}},relative:function(t,e){return{ltr:Lt((function(){return Uc(n,t,e)})),rtl:Lt((function(){return bt.some(Uc(n,e,t))}))}},exact:function(t,e,r,o){return{ltr:Lt((function(){return Wc(n,t,e,r,o)})),rtl:Lt((function(){return bt.some(Wc(n,r,o,t,e))}))}}}),((o=(r=i).ltr()).collapsed?r.rtl().filter((function(t){return!1===t.collapsed})).map((function(t){return as.rtl(Rt.fromDom(t.endContainer),t.endOffset,Rt.fromDom(t.startContainer),t.startOffset)})).getOrThunk((function(){return Gc(0,as.ltr,o)})):Gc(0,as.ltr,o)).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}});var n,r,o,i}(bc=bc||{}).TopToBottom="toptobottom",bc.BottomToTop="bottomtotop";var qc="data-alloy-vertical-dir",Xc=[fr("hotspot"),yr("bubble"),kr("overrides",{}),Ic(),Xa("placement",(function(t,e,n){var r=Eu(n,e.hotspot.element),o=zc(t.element,e,fu(),du(),su(),lu(),bt.some(e.hotspot.element));return bt.some(Ac({anchorBox:r,bubble:e.bubble.getOr(gc()),overrides:e.overrides,layouts:o,placer:bt.none()}))}))],Yc=[fr("x"),fr("y"),kr("height",0),kr("width",0),kr("bubble",gc()),kr("overrides",{}),Ic(),Xa("placement",(function(t,e,n){var r=rc(n,e.x,e.y),o=Pn(r.left,r.top,e.width,e.height),i=zc(t.element,e,uu(),cu(),uu(),cu(),bt.none());return bt.some(Ac({anchorBox:o,bubble:e.bubble,overrides:e.overrides,layouts:i,placer:bt.none()}))}))],Jc=Lr([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),Qc=Jc.screen,Zc=Jc.absolute,ts=[fr("node"),fr("root"),yr("bubble"),Ic(),kr("overrides",{}),kr("showAbove",!1),Xa("placement",(function(t,e,n){var r=Nc(t,0,e);return e.node.filter(bn).bind((function(o){var i=o.dom.getBoundingClientRect(),a=Hc(i.left,i.top,i.width,i.height),u=e.node.getOr(t.element);return Vc(a,r,e,n,u)}))}))],es=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},ns=Lr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),rs=(ns.before,ns.on,ns.after,function(t){return t.fold(s,s,s)}),os=Lr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),is={domRange:os.domRange,relative:os.relative,exact:os.exact,exactFromRange:function(t){return os.exact(t.start,t.soffset,t.finish,t.foffset)},getWin:function(t){return Kt(t.match({domRange:function(t){return Rt.fromDom(t.startContainer)},relative:function(t,e){return rs(t)},exact:function(t,e,n,r){return t}}))},range:es},as=Lr([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]);function us(t){return Kl.getOption(t)}function cs(t){return us(t).filter((function(t){return 0!==t.trim().length||-1<t.indexOf(" ")})).isSome()||xt(ql,It(t))}function ss(t,e){return Ht(n=void 0===t?document:t.dom)?[]:L(n.querySelectorAll(e),Rt.fromDom);var n}function ls(t){if(0<t.rangeCount){var e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);return bt.some(es(Rt.fromDom(e.startContainer),e.startOffset,Rt.fromDom(n.endContainer),n.endOffset))}return bt.none()}function fs(t){if(null===t.anchorNode||null===t.focusNode)return ls(t);var e,n,r,o,i,a,u,c,s,l,f,d=Rt.fromDom(t.anchorNode),m=Rt.fromDom(t.focusNode);return e=d,a=n=t.anchorOffset,u=r=m,c=o=t.focusOffset,(s=Wt(i=e).dom.createRange()).setStart(i.dom,a),s.setEnd(u.dom,c),l=s,f=Vt(e,r)&&n===o,l.collapsed&&!f?bt.some(es(d,t.anchorOffset,m,t.focusOffset)):ls(t)}function ds(t,e){var n,r,o=(n=Kc(t,e)).getClientRects();return 0<(r=0<o.length?o[0]:n.getBoundingClientRect()).width||0<r.height?bt.some(r).map($c):bt.none()}function ms(t,e){return{element:t,offset:e}}function ps(t,e){return(Ke(t)?ms:function(t,e){var n=Yt(t);if(0===n.length)return ms(t,e);if(e<n.length)return ms(n[e],0);var r=n[n.length-1];return ms(r,(Ke(r)?Kl.get(r):Yt(r)).length)})(t,e)}function hs(t,e){return e.getSelection.getOrThunk((function(){return function(){return bt.from(t.getSelection()).filter((function(t){return 0<t.rangeCount})).bind(fs)}}))().map((function(t){var e=ps(t.start,t.soffset),n=ps(t.finish,t.foffset);return is.range(e.element,e.offset,n.element,n.offset)}))}function gs(t){return t.x+t.width}function vs(t,e){return t.x-e.width}function bs(t,e){return t.y-e.height+t.height}function ys(t,e,n){return Ja(gs(t),t.y,n.southeast(),Au(),"southeast",Za(t,{left:0,top:2}),Yl)}function _s(t,e,n){return Ja(vs(t,e),t.y,n.southwest(),Pu(),"southwest",Za(t,{right:1,top:2}),Yl)}function ws(t,e,n){return Ja(gs(t),bs(t,e),n.northeast(),Ru(),"northeast",Za(t,{left:0,bottom:3}),Yl)}function xs(t,e,n){return Ja(vs(t,e),bs(t,e),n.northwest(),Iu(),"northwest",Za(t,{right:1,bottom:3}),Yl)}function Os(){return[ys,_s,ws,xs]}function Ss(){return[_s,ys,xs,ws]}function Cs(t,e,n,r,o,i,u){var c,s,l,f,d,m,p,h,g,v,b,y,_,w;return c={anchorBox:n.anchorBox,origin:e},s=o.element,l=n.bubble,f=n.layouts,d=i,m=r,h=u,v=pc(p=n.overrides,"maxHeightFunction",Ec()),b=pc(p,"maxWidthFunction",a),y=c.anchorBox,w={bounds:(g=_=c.origin,m.fold((function(){return g.fold(In,In,Pn)}),(function(t){return g.fold(t,t,(function(){var e=t(),n=rc(g,e.x,e.y);return Pn(n.left,n.top,e.width,e.height)}))}))),origin:_,preference:f,maxHeightFunction:v,maxWidthFunction:b,lastPlacement:d,transition:h},Tc(y,s,l,w)}function ks(t,e){Mn(t.element,e.element)}function Es(t,e){var n,r=t.components();Ot((n=t).components(),(function(t){return Tn(t.element)})),Re(n.element),n.syncComponents();var o=K(r,e);Ot(o,(function(e){rf(e),t.getSystem().removeFromWorld(e)})),Ot(e,(function(e){e.getSystem().isConnected()?ks(t,e):(t.getSystem().addToWorld(e),ks(t,e),bn(t.element)&&of(e)),t.syncComponents()}))}function Ms(t,e){af(t,e,Mn)}function Ts(t){rf(t),Tn(t.element),t.getSystem().removeFromWorld(t)}function Ds(t){var e=qt(t.element).bind((function(e){return t.getSystem().getByDom(e).toOptional()}));Ts(t),e.each((function(t){t.syncComponents()}))}function As(t){var e=t.components();Ot(e,Ts),Re(t.element),t.syncComponents()}function Ps(t,e){uf(t,e,Mn)}function Rs(t){var e=Yt(t.element);Ot(e,(function(e){t.getByDom(e).each(rf)})),Tn(t.element)}function Is(t,e,n,r){n.get().each((function(e){As(t)})),Ms(e.getAttachPoint(t),t);var o=t.getSystem().build(r);return Ms(t,o),n.set(o),o}function zs(t,e,n,r){var o=Is(t,e,n,r);return e.onOpen(t,o),o}function Ls(t,e,n){n.get().each((function(r){As(t),Ds(t),e.onClose(t,r),n.clear()}))}function js(t,e,n){return n.isOpen()}function Bs(t){var e=cr("Dismissal",pf,t),n={};return n[ff()]={schema:Zn([fr("target")]),onReceive:function(t,n){lf.isOpen(t)&&(lf.isPartOf(t,n.target)||e.isExtraPart(t,n.target)||e.fireEventInstead.fold((function(){return lf.close(t)}),(function(e){return go(t,e.event)})))}},n}function Fs(t){var e=cr("Reposition",hf,t),n={};return n[df()]={onReceive:function(t){lf.isOpen(t)&&e.fireEventInstead.fold((function(){return e.doReposition(t)}),(function(e){return go(t,e.event)}))}},n}function Ns(t,e,n){e.store.manager.onLoad(t,e,n)}function Hs(t,e,n){e.store.manager.onUnload(t,e,n)}function Vs(){var t=zr(null);return va({set:t.set,get:t.get,isNotSet:function(){return null===t.get()},clear:function(){t.set(null)},readState:function(){return{mode:"memory",value:t.get()}}})}function Us(){var t=zr({}),e=zr({});return va({readState:function(){return{mode:"dataset",dataByValue:t.get(),dataByText:e.get()}},lookup:function(n){return at(t.get(),n).orThunk((function(){return at(e.get(),n)}))},update:function(n){var r=t.get(),o=e.get(),i={},a={};Ot(n,(function(t){at(i[t.value]=t,"meta").each((function(e){at(e,"text").each((function(e){a[e]=t}))}))})),t.set(k(k({},r),i)),e.set(k(k({},o),a))},clear:function(){t.set({}),e.set({})}})}function Ws(t,e,n,r){var o=e.store;n.update([r]),o.setValue(t,r),e.onSetValue(t,r)}function $s(t,e){return Ir(t,{},L(e,(function(e){return n=e.name(),r="Cannot configure "+e.name()+" for "+t,io(n,n,{tag:"option",process:{}},Xn((function(t){return Fr("The field: "+n+" is forbidden. "+r)})));var n,r})).concat([ao("dump",s)]))}function Gs(t){return t.dump}function Ks(t,e){return k(k({},Yu(e)),t.dump)}function qs(t){return Mt(t,"uiType")}function Xs(t){return t.fold(bt.some,bt.none,bt.some,bt.some)}function Ys(t){function e(t){return t.name}return t.fold(e,e,e,e)}function Js(t,e){return function(n){var r=cr("Converting part type",e,n);return t(r)}}function Qs(t,e,n,r){return $r(e.defaults(t,n,r),n,{uid:t.partUids[e.name]},e.overrides(t,n,r))}function Zs(t,e){var n={};return Ot(e,(function(e){Xs(e).each((function(e){var r=qf(t,e.pname);n[e.name]=function(n){var o=cr("Part: "+e.name+" in "+t,Xr(e.schema),n);return k(k({},r),{config:n,validated:o})}}))})),n}function tl(t,e,n){return{uiType:Tf(),owner:t,name:e,config:n,validated:{}}}function el(t){return W(t,(function(t){return t.fold(bt.none,bt.some,bt.none,bt.none).map((function(t){return gr(t.name,t.schema.concat([Ya(Gf())]))})).toArray()}))}function nl(t){return L(t,Ys)}function rl(t,e,n){return r=e,o={},i={},Ot(n,(function(t){t.fold((function(t){o[t.pname]=Ef(!0,(function(e,n,r){return t.factory.sketch(Qs(e,t,n,r))}))}),(function(t){var e=r.parts[t.name];i[t.name]=c(t.factory.sketch(Qs(r,t,e[Gf()]),e))}),(function(t){o[t.pname]=Ef(!1,(function(e,n,r){return t.factory.sketch(Qs(e,t,n,r))}))}),(function(t){o[t.pname]=Mf(!0,(function(e,n,r){return L(e[t.name],(function(n){return t.factory.sketch($r(t.defaults(e,n,r),n,t.overrides(e,n)))}))}))}))})),{internals:c(o),externals:c(i)};var r,o,i}function ol(t,e,n){return r=bt.some(t),i=(o=e).components,l=nt(n,(function(t,e){return r=t,o=!1,{name:c(n=e),required:function(){return r.fold((function(t,e){return t}),(function(t,e){return t}))},used:function(){return o},replace:function(){if(o)throw new Error("Trying to use the same placeholder more than once: "+n);return o=!0,r}};var n,r,o})),a=r,u=o,s=l,f=W(i,(function(t){return kf(a,u,t,s)})),et(l,(function(t){if(!1===t.used()&&t.required())throw new Error("Placeholder: "+t.name()+" was not found in components list\nNamespace: "+r.getOr("none")+"\nComponents: "+JSON.stringify(o.components,null,2))})),f;var r,o,i,a,u,s,l,f}function il(t,e,n){var r=e.partUids[n];return t.getSystem().getByUid(r).toOptional()}function al(t,e,n){return il(t,e,n).getOrDie("Could not find part: "+n)}function ul(t,e,n){var r={},o=e.partUids,i=t.getSystem();return Ot(n,(function(t){r[t]=c(i.getByUid(o[t]))})),r}function cl(t,e){var n=t.getSystem();return nt(e.partUids,(function(t,e){return c(n.getByUid(t))}))}function sl(t){return Ct(t.partUids)}function ll(t,e,n){var r={},o=e.partUids,i=t.getSystem();return Ot(n,(function(t){r[t]=c(i.getByUid(o[t]).getOrDie())})),r}function fl(t,e){return co(L(nl(e),(function(e){return{key:e,value:t+"-"+e}})))}function dl(t){return io("partUids","partUids",Gn((function(e){return fl(e.uid,t)})),Jr())}function ml(t,e,n,r,o){var i;return cr(t+" [SpecSchema]",Zn((i=o,(0<r.length?[gr("parts",r)]:[]).concat([fr("uid"),kr("dom",{}),kr("components",[]),Ya("originalSpec"),kr("debug.sketcher",{})]).concat(i)).concat(e)),n)}function pl(t,e,n,r,o){var i=Yf(o),a=ml(t,e,i,el(n),[dl(n)]),u=rl(0,a,n);return r(a,ol(t,a,u.internals()),i,u.externals())}function hl(t){var e=cr("Sketcher for "+t.name,Jf,t),n=nt(e.apis,Bo),r=nt(e.extraApis,Lo);return k(k({name:e.name,configFields:e.configFields,sketch:function(t){return n=e.name,r=e.configFields,(0,e.factory)(ml(n,r,o=Yf(t),[],[]),o);var n,r,o}},n),r)}function gl(t){var e=cr("Sketcher for "+t.name,Qf,t),n=Zs(e.name,e.partFields),r=nt(e.apis,Bo),o=nt(e.extraApis,Lo);return k(k({name:e.name,partFields:e.partFields,configFields:e.configFields,sketch:function(t){return pl(e.name,e.configFields,e.partFields,e.factory,t)},parts:n},r),o)}function vl(t){return"input"===It(t)&&"radio"!==ae(t,"type")||"textarea"===It(t)}function bl(t,e,n){(e.disabled()?nd:rd)(t,e)}function yl(t,e){return!0===e.useNative&&xt(ed,It(t.element))}function _l(t,e){return yl(t,e)?ce(t.element,"disabled"):"true"===ae(t.element,"aria-disabled")}function wl(t,e,n,r){var o=ss(t.element,"."+e.highlightClass);Ot(o,(function(n){R(r,(function(t){return t.element===n}))||(Go(n,e.highlightClass),t.getSystem().getByDom(n).each((function(n){e.onDehighlight(t,n),go(n,Yi())})))}))}function xl(t,e,n,r){wl(t,e,0,[r]),Fl(0,e,0,r)||($o(r.element,e.highlightClass),e.onHighlight(t,r),go(r,Xi()))}function Ol(t,e,n,r){var o=ss(t.element,"."+e.itemClass);return V(o,(function(t){return Ko(t,e.highlightClass)})).bind((function(e){var n=Qa(e,r,0,o.length-1);return t.getSystem().getByDom(o[n]).toOptional()}))}function Sl(t,e,n){var r=G(t.slice(0,e)),o=G(t.slice(e+1));return H(r.concat(o),n)}function Cl(t,e,n){return H(G(t.slice(0,e)),n)}function kl(t,e,n){var r=t.slice(0,e);return H(t.slice(e+1).concat(r),n)}function El(t,e,n){return H(t.slice(e+1),n)}function Ml(t){return function(e){var n=e.raw;return xt(t,n.which)}}function Tl(t){return function(e){return $(t,(function(t){return t(e)}))}}function Dl(t){return!0===t.raw.shiftKey}function Al(t){return!0===t.raw.ctrlKey}function Pl(t,e){return{matches:t,classification:e}}function Rl(t,e,n){e.exists((function(t){return n.exists((function(e){return Vt(e,t)}))}))||vo(t,$i(),{prevFocus:e,newFocus:n})}function Il(){function t(t){return wu(t.element)}return{get:t,set:function(e,n){var r=t(e);e.getSystem().triggerFocus(n,e.element),Rl(e,r,t(e))}}}function zl(){function t(t){return cd.getHighlighted(t).map((function(t){return t.element}))}return{get:t,set:function(e,n){var r=t(e);e.getSystem().getByDom(n).fold(a,(function(t){cd.highlight(e,t)}));var o=t(e);Rl(e,r,o)}}}function Ll(t,e,n,r,o,i){var a=i.map(Rn);return ef(t,e,n,r,o,a)}function jl(t,e,n){var r,o,i=e.getAttachPoint(t);de(t.element,"position",nf.getMode(i)),o=e.cloakVisibilityAttr,ge((r=t).element,"visibility").fold((function(){se(r.element,o)}),(function(t){oe(r.element,o,t)})),de(r.element,"visibility","hidden")}function Bl(t,e,n){var r,o,i,a=t.element;R(["top","left","right","bottom"],(function(t){return ge(a,t).isSome()}))||be(t.element,"position"),o="visibility",i=e.cloakVisibilityAttr,ue((r=t).element,i).fold((function(){return be(r.element,o)}),(function(t){return de(r.element,o,t)}))}function Fl(t,e,n,r){return Ko(r.element,e.highlightClass)}function Nl(t,e,n){return Da(t.element,"."+e.itemClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))}function Hl(t,e,n){var r=ss(t.element,"."+e.itemClass);return(0<r.length?bt.some(r[r.length-1]):bt.none()).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))}function Vl(t,e,n){return st(L(ss(t.element,"."+e.itemClass),(function(e){return t.getSystem().getByDom(e).toOptional()})))}as.ltr,as.rtl;var Ul,Wl,$l,Gl,Kl=(Ul=Ke,{get:function(t){if(!Ul(t))throw new Error("Can only get text value of a text node");return Wl(t).getOr("")},getOption:Wl=function(t){return Ul(t)?bt.from(t.dom.nodeValue):bt.none()},set:function(t,e){if(!Ul(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=e}}),ql=["img","br"],Xl=[yr("getSelection"),fr("root"),yr("bubble"),Ic(),kr("overrides",{}),kr("showAbove",!1),Xa("placement",(function(t,e,n){var r=Kt(e.root).dom,o=Nc(t,0,e);return Vc(hs(r,e).bind((function(t){return(0<(e=Kc(r,is.exactFromRange(t)).getBoundingClientRect()).width||0<e.height?bt.some(e).map($c):bt.none()).orThunk((function(){var e=Rt.fromText("\ufeff");Te(t.start,e);var n=ds(r,is.exact(e,0,e,1));return Tn(e),n})).bind((function(t){return Hc(t.left,t.top,t.width,t.height)}));var e})),o,e,n,hs(r,e).bind((function(t){return Ge(t.start)?bt.some(t.start):dn(t.start)})).getOr(t.element))}))],Yl="link-layout",Jl=sr("type",{selection:Xl,node:ts,hotspot:Xc,submenu:[fr("item"),Ic(),kr("overrides",{}),Xa("placement",(function(t,e,n){var r=Eu(n,e.item.element),o=zc(t.element,e,Os(),Ss(),Os(),Ss(),bt.none());return bt.some(Ac({anchorBox:r,bubble:gc(),overrides:e.overrides,layouts:o,placer:bt.none()}))}))],makeshift:Yc}),Ql=[br("classes",Zr),Dr("mode","all",["all","layout","placement"])],Zl=[kr("useFixed",O),yr("getBounds")],tf=[dr("anchor",Jl),Cr("transition",Ql)],ef=function(t,e,n,r,o,i){var a=cr("placement.info",Xr(tf),o),u=a.anchor,s=r.element,l=n.get(r.uid);xu((function(){de(s,"position","fixed");var o=ge(s,"visibility");de(s,"visibility","hidden");var f,d,m,p,h=e.useFixed()?(p=document.documentElement,_c(0,0,p.clientWidth,p.clientHeight)):(d=Se((f=t).element),m=f.element.dom.getBoundingClientRect(),yc(d.left,d.top,m.width,m.height)),g=u.placement,v=i.map(c).or(e.getBounds);g(t,u,h).each((function(e){var o=e.placer.getOr(Cs)(t,h,e,v,r,l,a.transition);n.set(r.uid,o)})),o.fold((function(){be(s,"visibility")}),(function(t){de(s,"visibility",t)})),ge(s,"left").isNone()&&ge(s,"top").isNone()&&ge(s,"right").isNone()&&ge(s,"bottom").isNone()&&ct(ge(s,"position"),"fixed")&&be(s,"position")}),s)},nf=hu({fields:Zl,name:"positioning",active:ec,apis:Object.freeze({__proto__:null,position:function(t,e,n,r,o){Ll(t,e,n,r,o,bt.none())},positionWithin:Ll,positionWithinBounds:ef,getMode:function(t,e,n){return e.useFixed()?"fixed":"absolute"},reset:function(t,e,n,r){var o=r.element;Ot(["position","left","right","top","bottom"],(function(t){return be(o,t)})),se(o,wc),n.clear(r.uid)}}),state:Object.freeze({__proto__:null,init:function(){var t={};return va({readState:function(){return t},clear:function(e){v(e)?delete t[e]:t={}},set:function(e,n){t[e]=n},get:function(e){return at(t,e)}})}})}),rf=function(t){go(t,Vi());var e=t.components();Ot(e,rf)},of=function(t){var e=t.components();Ot(e,of),go(t,Hi())},af=function(t,e,n){t.getSystem().addToWorld(e),n(t.element,e.element),bn(t.element)&&of(e),t.syncComponents()},uf=function(t,e,n){n(t,e.element);var r=Yt(e.element);Ot(r,(function(t){e.getByDom(t).each(of)}))},cf=Object.freeze({__proto__:null,cloak:jl,decloak:Bl,open:zs,openWhileCloaked:function(t,e,n,r,o){jl(t,e),zs(t,e,n,r),o(),Bl(t,e)},close:Ls,isOpen:js,isPartOf:function(t,e,n,r){return js(0,0,n)&&n.get().exists((function(n){return e.isPartOf(t,n,r)}))},getState:function(t,e,n){return n.get()},setContent:function(t,e,n,r){return n.get().map((function(){return Is(t,e,n,r)}))}}),sf=Object.freeze({__proto__:null,events:function(t,e){return Qi([Oo(Ii(),(function(n,r){Ls(n,t,e)}))])}}),lf=hu({fields:[$a("onOpen"),$a("onClose"),fr("isPartOf"),fr("getAttachPoint"),kr("cloakVisibilityAttr","data-precloak-visibility")],name:"sandboxing",active:sf,apis:cf,state:Object.freeze({__proto__:null,init:function(){var t=cc(),e=c("not-implemented");return va({readState:e,isOpen:t.isSet,clear:t.clear,set:t.set,get:t.get})}})}),ff=c("dismiss.popups"),df=c("reposition.popups"),mf=c("mouse.released"),pf=Zn([kr("isExtraPart",O),Cr("fireEventInstead",[kr("event",Ui())])]),hf=Zn([Cr("fireEventInstead",[kr("event",Wi())]),hr("doReposition")]),gf=Object.freeze({__proto__:null,onLoad:Ns,onUnload:Hs,setValue:function(t,e,n,r){e.store.manager.setValue(t,e,n,r)},getValue:function(t,e,n){return e.store.manager.getValue(t,e,n)},getState:function(t,e,n){return n}}),vf=Object.freeze({__proto__:null,events:function(t,e){var n=t.resetOnDom?[Zi((function(n,r){Ns(n,t,e)})),ta((function(n,r){Hs(n,t,e)}))]:[mu(t,e,Ns)];return Qi(n)}}),bf=Object.freeze({__proto__:null,memory:Vs,dataset:Us,manual:function(){return va({readState:a})},init:function(t){return t.store.manager.state(t)}}),yf=[yr("initialValue"),fr("getFallbackEntry"),fr("getDataKey"),fr("setValue"),Xa("manager",{setValue:Ws,getValue:function(t,e,n){var r=e.store,o=r.getDataKey(t);return n.lookup(o).getOrThunk((function(){return r.getFallbackEntry(o)}))},onLoad:function(t,e,n){e.store.initialValue.each((function(r){Ws(t,e,n,r)}))},onUnload:function(t,e,n){n.clear()},state:Us})],_f=[fr("getValue"),kr("setValue",a),yr("initialValue"),Xa("manager",{setValue:function(t,e,n,r){e.store.setValue(t,r),e.onSetValue(t,r)},getValue:function(t,e,n){return e.store.getValue(t)},onLoad:function(t,e,n){e.store.initialValue.each((function(n){e.store.setValue(t,n)}))},onUnload:a,state:ga.init})],wf=hu({fields:[Er("store",{mode:"memory"},sr("mode",{memory:[yr("initialValue"),Xa("manager",{setValue:function(t,e,n,r){n.set(r),e.onSetValue(t,r)},getValue:function(t,e,n){return n.get()},onLoad:function(t,e,n){e.store.initialValue.each((function(t){n.isNotSet()&&n.set(t)}))},onUnload:function(t,e,n){n.clear()},state:Vs})],manual:_f,dataset:yf})),$a("onSetValue"),kr("resetOnDom",!1)],name:"representing",active:vf,apis:gf,extra:{setValueFrom:function(t,e){var n=wf.getValue(e);wf.setValue(t,n)}},state:bf}),xf=$s,Of=Ks,Sf="placeholder",Cf=Lr([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),kf=function(t,e,n,r){return o=t,a=r,(qs(i=n)&&i.uiType===Sf?(l=i,f=a,(u=o).exists((function(t){return t!==l.owner}))?Cf.single(!0,c(l)):at(f,l.name).fold((function(){throw new Error("Unknown placeholder component: "+l.name+"\nKnown: ["+Ct(f)+"]\nNamespace: "+u.getOr("none")+"\nSpec: "+JSON.stringify(l,null,2))}),(function(t){return t.replace()}))):Cf.single(!1,c(i))).fold((function(o,i){var a=qs(n)?i(e,n.config,n.validated):i(e),u=W(at(a,"components").getOr([]),(function(n){return kf(t,e,n,r)}));return[k(k({},a),{components:u})]}),(function(t,r){if(qs(n)){var o=r(e,n.config,n.validated);return n.validated.preprocess.getOr(s)(o)}return r(e)}));var o,i,a,u,l,f},Ef=Cf.single,Mf=Cf.multiple,Tf=c(Sf),Df=Lr([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),Af=kr("factory",{sketch:s}),Pf=kr("schema",[]),Rf=fr("name"),If=io("pname","pname",Wn((function(t){return"<alloy."+Ro(t.name)+">"})),Jr()),zf=ao("schema",(function(){return[yr("preprocess")]})),Lf=kr("defaults",c({})),jf=kr("overrides",c({})),Bf=Xr([Af,Pf,Rf,If,Lf,jf]),Ff=Xr([Af,Pf,Rf,Lf,jf]),Nf=Xr([Af,Pf,Rf,If,Lf,jf]),Hf=Xr([Af,zf,Rf,fr("unit"),If,Lf,jf]),Vf=Js(Df.required,Bf),Uf=Js(Df.external,Ff),Wf=Js(Df.optional,Nf),$f=Js(Df.group,Hf),Gf=c("entirety"),Kf=Object.freeze({__proto__:null,required:Vf,external:Uf,optional:Wf,group:$f,asNamedPart:Xs,name:Ys,asCommon:function(t){return t.fold(s,s,s,s)},original:Gf}),qf=function(t,e){return{uiType:Tf(),owner:t,name:e}},Xf=Object.freeze({__proto__:null,generate:Zs,generateOne:tl,schemas:el,names:nl,substitutes:rl,components:ol,defaultUids:fl,defaultUidsSchema:dl,getAllParts:cl,getAllPartNames:sl,getPart:il,getPartOrDie:al,getParts:ul,getPartsOrDie:ll}),Yf=function(t){return Mt(t,"uid")?t:k(k({},t),{uid:fa("uid")})},Jf=Zn([fr("name"),fr("factory"),fr("configFields"),kr("apis",{}),kr("extraApis",{})]),Qf=Zn([fr("name"),fr("factory"),fr("configFields"),fr("partFields"),kr("apis",{}),kr("extraApis",{})]),Zf=Object.freeze({__proto__:null,getCurrent:function(t,e,n){return e.find(t)}}),td=hu({fields:[fr("find")],name:"composing",apis:Zf}),ed=["input","button","textarea","select"],nd=function(t,e,n){e.disableClass.each((function(e){$o(t.element,e)})),(yl(t,e)?function(t){oe(t.element,"disabled","disabled")}:function(t){oe(t.element,"aria-disabled","true")})(t),e.onDisabled(t)},rd=function(t,e,n){e.disableClass.each((function(e){Go(t.element,e)})),(yl(t,e)?function(t){se(t.element,"disabled")}:function(t){oe(t.element,"aria-disabled","false")})(t),e.onEnabled(t)},od=Object.freeze({__proto__:null,enable:rd,disable:nd,isDisabled:_l,onLoad:bl,set:function(t,e,n,r){(r?nd:rd)(t,e)}}),id=Object.freeze({__proto__:null,exhibit:function(t,e){return No({classes:e.disabled()?e.disableClass.toArray():[]})},events:function(t,e){return Qi([wo(Di(),(function(e,n){return _l(e,t)})),mu(t,e,bl)])}}),ad=hu({fields:[Pr("disabled",O),kr("useNative",!0),yr("disableClass"),$a("onDisabled"),$a("onEnabled")],name:"disabling",active:id,apis:od}),ud=Object.freeze({__proto__:null,dehighlightAll:function(t,e,n){return wl(t,e,0,[])},dehighlight:function(t,e,n,r){Fl(0,e,0,r)&&(Go(r.element,e.highlightClass),e.onDehighlight(t,r),go(r,Yi()))},highlight:xl,highlightFirst:function(t,e,n){Nl(t,e).each((function(n){xl(t,e,0,n)}))},highlightLast:function(t,e,n){Hl(t,e).each((function(n){xl(t,e,0,n)}))},highlightAt:function(t,e,n,r){var o,i,a;i=r,a=ss((o=t).element,"."+e.itemClass),bt.from(a[i]).fold((function(){return jn.error(new Error("No element found with index "+i))}),o.getSystem().getByDom).fold((function(t){throw t}),(function(n){xl(t,e,0,n)}))},highlightBy:function(t,e,n,r){H(Vl(t,e),r).each((function(n){xl(t,e,0,n)}))},isHighlighted:Fl,getHighlighted:function(t,e,n){return Da(t.element,"."+e.highlightClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},getFirst:Nl,getLast:Hl,getPrevious:function(t,e,n){return Ol(t,e,0,-1)},getNext:function(t,e,n){return Ol(t,e,0,1)},getCandidates:Vl}),cd=hu({fields:[fr("highlightClass"),fr("itemClass"),$a("onHighlight"),$a("onDehighlight")],name:"highlighting",apis:ud}),sd=[8],ld=[9],fd=[13],dd=[27],md=[32],pd=[37],hd=[38],gd=[39],vd=[40],bd=w(Dl);function yd(t,e,n,r,o){function i(t,e,n,r,o){var i=n(t,e,r,o),a=e.event;return H(i,(function(t){return t.matches(a)})).map((function(t){return t.classification})).bind((function(n){return n(t,e,r,o)}))}var a={schema:function(){return t.concat([kr("focusManager",Il()),Er("focusInside","onFocus",or((function(t){return xt(["onFocus","onEnterOrSpace","onApi"],t)?jn.value(t):jn.error("Invalid value for focusInside")}))),Xa("handler",a),Xa("state",e),Xa("sendFocusIn",o)])},processKey:i,toEvents:function(t,e){var a=t.focusInside!==$l.OnFocusMode?bt.none():o(t).map((function(n){return Oo(ki(),(function(r,o){n(r,t,e),o.stop()}))})),u=[Oo(gi(),(function(r,a){i(r,a,n,t,e).fold((function(){var n=r,i=a,u=Ml(md.concat(fd))(i.event);t.focusInside===$l.OnEnterOrSpaceMode&&u&&mo(n,i)&&o(t).each((function(r){r(n,t,e),i.stop()}))}),(function(t){a.stop()}))})),Oo(vi(),(function(n,o){i(n,o,r,t,e).each((function(t){o.stop()}))}))];return Qi(a.toArray().concat(u))}};return a}function _d(t){function e(t,e){return 0<we(t.visibilitySelector.bind((function(t){return Aa(e,t)})).getOr(e))}function n(t,n,r){var o=n,i=B(ss(t.element,o.selector),(function(t){return e(o,t)}));bt.from(i[o.firstTabstop]).each((function(e){n.focusManager.set(t,e)}))}function r(t,n,r,o){var i,a=ss(t.element,r.selector);return(i=r).focusManager.get(t).bind((function(t){return Aa(t,i.selector)})).bind((function(n){return V(a,_(Vt,n)).bind((function(n){return i=t,u=r,o(a,n,(function(t){return e(n=u,r=t)&&n.useTabstopAt(r);var n,r})).fold((function(){return u.cyclic?bt.some(!0):bt.none()}),(function(t){return u.focusManager.set(i,t),bt.some(!0)}));var i,u}))}))}var o=[yr("onEscape"),yr("onEnter"),kr("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),kr("firstTabstop",0),kr("useTabstopAt",S),yr("visibilitySelector")].concat([t]),i=c([Pl(Tl([Dl,Ml(ld)]),(function(t,e,n){return r(t,0,n,n.cyclic?Sl:Cl)})),Pl(Ml(ld),(function(t,e,n){return r(t,0,n,n.cyclic?kl:El)})),Pl(Ml(dd),(function(t,e,n){return n.onEscape.bind((function(n){return n(t,e)}))})),Pl(Tl([bd,Ml(fd)]),(function(t,e,n){return n.onEnter.bind((function(n){return n(t,e)}))}))]),a=c([]);return yd(o,ga.init,i,a,(function(){return bt.some(n)}))}function wd(t,e,n){return vl(n)&&Ml(md)(e.event)?bt.none():(yo(t,n,Di()),bt.some(!0))}function xd(t,e){return bt.some(!0)}function Od(t,e,n){return n.execute(t,e,t.element)}function Sd(){var t=cc();return va({readState:function(){return t.get().map((function(t){return{numRows:String(t.numRows),numColumns:String(t.numColumns)}})).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(e,n){t.set({numRows:e,numColumns:n})},getNumRows:function(){return t.get().map((function(t){return t.numRows}))},getNumColumns:function(){return t.get().map((function(t){return t.numColumns}))}})}function Cd(t){return function(e,n,r,o){var i=t(e.element);return Gm(i,e,n,r,o)}}function kd(t,e){return Cd(vc(t,e))}function Ed(t,e){return Cd(vc(e,t))}function Md(t){return function(e,n,r,o){return Gm(t,e,n,r,o)}}function Td(t){return!((e=t.dom).offsetWidth<=0&&e.offsetHeight<=0);var e}function Dd(t,e,n){var r,o=B(ss(t,n),Td);return V(r=o,(function(t){return Vt(t,e)})).map((function(t){return{index:t,candidates:r}}))}function Ad(t,e){return V(t,(function(t){return Vt(e,t)}))}function Pd(t,e,n,r){return r(Math.floor(e/n),e%n).bind((function(e){var r=e.row*n+e.column;return 0<=r&&r<t.length?bt.some(t[r]):bt.none()}))}function Rd(t,e,n,r,o){return Pd(t,e,r,(function(e,i){var a=e===n-1?t.length-e*r:r,u=Qa(i,o,0,a-1);return bt.some({row:e,column:u})}))}function Id(t,e,n,r,o){return Pd(t,e,r,(function(e,i){var a=Qa(e,o,0,n-1),u=a===n-1?t.length-a*r:r,c=Fu(i,0,u-1);return bt.some({row:a,column:c})}))}function zd(t,e,n){Da(t.element,e.selector).each((function(n){e.focusManager.set(t,n)}))}function Ld(t){return function(e,n,r,o){return Dd(e,n,r.selector).bind((function(e){return t(e.candidates,e.index,o.getNumRows().getOr(r.initSize.numRows),o.getNumColumns().getOr(r.initSize.numColumns))}))}}function jd(t,e,n){return n.captureTab?bt.some(!0):bt.none()}function Bd(t,e,n,r){var o=function(t,e,n){var i,a=Qa(e,r,0,n.length-1);return a===t?bt.none():"button"===It(i=n[a])&&"disabled"===ae(i,"disabled")?o(t,a,n):bt.from(n[a])};return Dd(t,n,e).bind((function(t){var e=t.index,n=t.candidates;return o(e,e,n)}))}function Fd(t,e,n){return(r=n).focusManager.get(t).bind((function(t){return Aa(t,r.selector)})).bind((function(r){return n.execute(t,e,r)}));var r}function Nd(t,e,n){e.getInitial(t).orThunk((function(){return Da(t.element,e.selector)})).each((function(n){e.focusManager.set(t,n)}))}function Hd(t,e,n){return Bd(t,n.selector,e,-1)}function Vd(t,e,n){return Bd(t,n.selector,e,1)}function Ud(t){return function(e,n,r,o){return t(e,n,r,o).bind((function(){return r.executeOnMove?Fd(e,n,r):bt.some(!0)}))}}function Wd(t,e,n){return n.onEscape(t,e)}function $d(t,e,n){return bt.from(t[e]).bind((function(t){return bt.from(t[n]).map((function(t){return{rowIndex:e,columnIndex:n,cell:t}}))}))}function Gd(t,e,n,r){return $d(t,e,Qa(n,r,0,t[e].length-1))}function Kd(t,e,n,r){var o=Qa(n,r,0,t.length-1),i=t[o].length;return $d(t,o,Fu(e,0,i-1))}function qd(t,e,n,r){var o=t[e].length;return $d(t,e,Fu(n+r,0,o-1))}function Xd(t,e,n,r){var o=Fu(n+r,0,t.length-1),i=t[o].length;return $d(t,o,Fu(e,0,i-1))}function Yd(t,e,n){e.previousSelector(t).orThunk((function(){var n=e.selectors;return Da(t.element,n.cell)})).each((function(n){e.focusManager.set(t,n)}))}function Jd(t,e){return function(n,r,o){var i=o.cycles?t:e;return Aa(r,o.selectors.row).bind((function(t){return Ad(ss(t,o.selectors.cell),r).bind((function(e){var r=ss(n,o.selectors.row);return Ad(r,t).bind((function(t){var n,a=(n=o,L(r,(function(t){return ss(t,n.selectors.cell)})));return i(a,t,e).map((function(t){return t.cell}))}))}))}))}}function Qd(t,e,n){return n.focusManager.get(t).bind((function(r){return n.execute(t,e,r)}))}function Zd(t,e,n){Da(t.element,e.selector).each((function(n){e.focusManager.set(t,n)}))}function tm(t,e,n){return Bd(t,n.selector,e,-1)}function em(t,e,n){return Bd(t,n.selector,e,1)}function nm(t,e,n,r){var o=t.getSystem().build(r);af(t,o,n)}function rm(t,e,n,r){H(kp(t),(function(t){return Vt(r.element,t.element)})).each(Ds)}function om(t,e,n,r,o){var i=kp(t);return bt.from(i[r]).map((function(e){return rm(t,0,0,e),o.each((function(e){nm(t,0,(function(t,e){var n,o=e;Jt(n=t,r).fold((function(){Mn(n,o)}),(function(t){Te(t,o)}))}),e)})),e}))}function im(t,e){var n,r;return{key:t,value:{config:{},me:(n=t,r=Qi(e),hu({fields:[fr("enabled")],name:n,active:{events:c(r)}})),configAsRaw:c({}),initialConfig:{},state:ga}}}function am(t,e){e.ignore||(bu(t.element),e.onFocus(t))}function um(t,e,n){var r=e.aria;r.update(t,r,n.get())}function cm(t,e,n){e.toggleClass.each((function(e){(n.get()?$o:Go)(t.element,e)}))}function sm(t,e,n){Fm(t,e,n,!n.get())}function lm(t,e,n){n.set(!0),cm(t,e,n),um(t,e,n)}function fm(t,e,n){n.set(!1),cm(t,e,n),um(t,e,n)}function dm(t,e,n){Fm(t,e,n,e.selected)}function mm(){function t(t,e){e.stop(),bo(t)}return[Oo(_i(),t),Oo(Pi(),t),Mo(ii()),Mo(si())]}function pm(t){return Qi(U([t.map((function(t){return na((function(e,n){t(e),n.stop()}))})).toArray(),mm()]))}function hm(t){(wu(t.element).isNone()||Dp.isFocused(t))&&(Dp.isFocused(t)||Dp.focus(t),vo(t,Ip,{item:t}))}function gm(t){vo(t,zp,{item:t})}function vm(t,e){return t.x+t.width/2-e.width/2}function bm(t,e){return t.x+t.width-e.width}function ym(t,e){return t.y+t.height-e.height}function _m(t,e){return t.y+t.height/2-e.height/2}function wm(t,e,n){return Ja(bm(t,e),ym(t,e),n.insetSouthwest(),Iu(),"southwest",Za(t,{right:0,bottom:3}),Qp)}function xm(t,e,n){return Ja(t.x,ym(t,e),n.insetSoutheast(),Ru(),"southeast",Za(t,{left:1,bottom:3}),Qp)}function Om(t,e,n){return Ja(bm(t,e),t.y,n.insetNorthwest(),Pu(),"northwest",Za(t,{right:0,top:2}),Qp)}function Sm(t,e,n){return Ja(t.x,t.y,n.insetNortheast(),Au(),"northeast",Za(t,{left:1,top:2}),Qp)}function Cm(t,e,n){return Ja(bm(t,e),_m(t,e),n.insetEast(),Bu(),"east",Za(t,{right:0}),Qp)}function km(t,e,n){return Ja(t.x,_m(t,e),n.insetWest(),ju(),"west",Za(t,{left:1}),Qp)}function Em(t){switch(t){case"north":return Zp;case"northeast":return Sm;case"northwest":return Om;case"south":return th;case"southeast":return xm;case"southwest":return wm;case"east":return Cm;case"west":return km}}function Mm(t,e,n,r,o){return oc(r).map(Em).getOr(Zp)(t,e,n,r,o)}function Tm(t){switch(t){case"north":return th;case"northeast":return xm;case"northwest":return wm;case"south":return Zp;case"southeast":return Sm;case"southwest":return Om;case"east":return km;case"west":return Cm}}function Dm(t,e,n,r,o){return oc(r).map(Tm).getOr(Zp)(t,e,n,r,o)}function Am(t){var e=void 0!==t.uid&&ut(t,"uid")?t.uid:fa("memento");return{get:function(t){return t.getSystem().getByUid(e).getOrDie()},getOpt:function(t){return t.getSystem().getByUid(e).toOptional()},asSpec:function(){return k(k({},t),{uid:e})}}}function Pm(t){return function(){return at(t,ih).getOr("!not found!")}}function Rm(t,e){var n,r=t.toLowerCase();if(rh.isRtl()){var o=At(n=r,"-rtl")?n:n+"-rtl";return Mt(e,o)?o:r}return r}function Im(t,e){return at(e,Rm(t,e))}function zm(t,e){var n=e();return Im(t,n).getOrThunk(Pm(n))}function Lm(){return im("add-focusable",[Zi((function(t){var e,n;e=t.element,n=function(t){return Nt(t,"svg")},H(e.dom.childNodes,(function(t){return n(Rt.fromDom(t))})).map(Rt.fromDom).each((function(t){return oe(t,"focusable","false")}))}))])}function jm(t,e,n,r){var o,i,a,u=(a=e,rh.isRtl()&&Mt(oh,a)?["tox-icon--flip"]:[]),c=at(n,Rm(e,n)).or(r).getOrThunk(Pm(n));return{dom:{tag:t.tag,attributes:null!==(o=t.attributes)&&void 0!==o?o:{},classes:t.classes.concat(u),innerHtml:c},behaviours:Yu(M(M([],null!==(i=t.behaviours)&&void 0!==i?i:[],!0),[Lm()],!1))}}function Bm(t,e,n,r){return void 0===r&&(r=bt.none()),jm(e,t,n(),r)}function Fm(t,e,n,r){(r?lm:fm)(t,e,n)}function Nm(t,e,n){oe(t.element,"aria-expanded",n)}function Hm(t){return"prepared"===t.type?bt.some(t.menu):bt.none()}(Gl=$l=$l||{}).OnFocusMode="onFocus",Gl.OnEnterOrSpaceMode="onEnterOrSpace",Gl.OnApiMode="onApi";var Vm=_d(ao("cyclic",O)),Um=_d(ao("cyclic",S)),Wm=yd([kr("execute",wd),kr("useSpace",!1),kr("useEnter",!0),kr("useControlEnter",!1),kr("useDown",!1)],ga.init,(function(t,e,n,r){var o=n.useSpace&&!vl(t.element)?md:[],i=n.useEnter?fd:[],a=n.useDown?vd:[];return[Pl(Ml(o.concat(i).concat(a)),Od)].concat(n.useControlEnter?[Pl(Tl([Al,Ml(fd)]),Od)]:[])}),(function(t,e,n,r){return n.useSpace&&!vl(t.element)?[Pl(Ml(md),xd)]:[]}),(function(){return bt.none()})),$m=Object.freeze({__proto__:null,flatgrid:Sd,init:function(t){return t.state(t)}}),Gm=function(t,e,n,r,o){return r.focusManager.get(e).bind((function(n){return t(e.element,n,r,o)})).map((function(t){return r.focusManager.set(e,t),!0}))},Km=Md,qm=Md,Xm=Md,Ym=Ld((function(t,e,n,r){return Rd(t,e,n,r,-1)})),Jm=Ld((function(t,e,n,r){return Rd(t,e,n,r,1)})),Qm=Ld((function(t,e,n,r){return Id(t,e,n,r,-1)})),Zm=Ld((function(t,e,n,r){return Id(t,e,n,r,1)})),tp=yd([fr("selector"),kr("execute",wd),Ga("onEscape"),kr("captureTab",!1),Tu()],Sd,c([Pl(Ml(pd),kd(Ym,Jm)),Pl(Ml(gd),Ed(Ym,Jm)),Pl(Ml(hd),Km(Qm)),Pl(Ml(vd),qm(Zm)),Pl(Tl([Dl,Ml(ld)]),jd),Pl(Tl([bd,Ml(ld)]),jd),Pl(Ml(dd),(function(t,e,n){return n.onEscape(t,e)})),Pl(Ml(md.concat(fd)),(function(t,e,n,r){return(o=n).focusManager.get(t).bind((function(t){return Aa(t,o.selector)})).bind((function(r){return n.execute(t,e,r)}));var o}))]),c([Pl(Ml(md),xd)]),(function(){return bt.some(zd)})),ep=[fr("selector"),kr("getInitial",bt.none),kr("execute",wd),Ga("onEscape"),kr("executeOnMove",!1),kr("allowVertical",!0)],np=c([Pl(Ml(md),xd)]),rp=yd(ep,ga.init,(function(t,e,n,r){var o=pd.concat(n.allowVertical?hd:[]),i=gd.concat(n.allowVertical?vd:[]);return[Pl(Ml(o),Ud(kd(Hd,Vd))),Pl(Ml(i),Ud(Ed(Hd,Vd))),Pl(Ml(fd),Fd),Pl(Ml(md),Fd),Pl(Ml(dd),Wd)]}),np,(function(){return bt.some(Nd)})),op=[gr("selectors",[fr("row"),fr("cell")]),kr("cycles",!0),kr("previousSelector",bt.none),kr("execute",wd)],ip=Jd((function(t,e,n){return Gd(t,e,n,-1)}),(function(t,e,n){return qd(t,e,n,-1)})),ap=Jd((function(t,e,n){return Gd(t,e,n,1)}),(function(t,e,n){return qd(t,e,n,1)})),up=Jd((function(t,e,n){return Kd(t,n,e,-1)}),(function(t,e,n){return Xd(t,n,e,-1)})),cp=Jd((function(t,e,n){return Kd(t,n,e,1)}),(function(t,e,n){return Xd(t,n,e,1)})),sp=c([Pl(Ml(pd),kd(ip,ap)),Pl(Ml(gd),Ed(ip,ap)),Pl(Ml(hd),Km(up)),Pl(Ml(vd),qm(cp)),Pl(Ml(md.concat(fd)),(function(t,e,n){return wu(t.element).bind((function(r){return n.execute(t,e,r)}))}))]),lp=c([Pl(Ml(md),xd)]),fp=yd(op,ga.init,sp,lp,(function(){return bt.some(Yd)})),dp=[fr("selector"),kr("execute",wd),kr("moveOnTab",!1)],mp=c([Pl(Ml(hd),Xm(tm)),Pl(Ml(vd),Xm(em)),Pl(Tl([Dl,Ml(ld)]),(function(t,e,n,r){return n.moveOnTab?Xm(tm)(t,e,n,r):bt.none()})),Pl(Tl([bd,Ml(ld)]),(function(t,e,n,r){return n.moveOnTab?Xm(em)(t,e,n,r):bt.none()})),Pl(Ml(fd),Qd),Pl(Ml(md),Qd)]),pp=c([Pl(Ml(md),xd)]),hp=yd(dp,ga.init,mp,pp,(function(){return bt.some(Zd)})),gp=yd([Ga("onSpace"),Ga("onEnter"),Ga("onShiftEnter"),Ga("onLeft"),Ga("onRight"),Ga("onTab"),Ga("onShiftTab"),Ga("onUp"),Ga("onDown"),Ga("onEscape"),kr("stopSpaceKeyup",!1),yr("focusIn")],ga.init,(function(t,e,n){return[Pl(Ml(md),n.onSpace),Pl(Tl([bd,Ml(fd)]),n.onEnter),Pl(Tl([Dl,Ml(fd)]),n.onShiftEnter),Pl(Tl([Dl,Ml(ld)]),n.onShiftTab),Pl(Tl([bd,Ml(ld)]),n.onTab),Pl(Ml(hd),n.onUp),Pl(Ml(vd),n.onDown),Pl(Ml(pd),n.onLeft),Pl(Ml(gd),n.onRight),Pl(Ml(md),n.onSpace),Pl(Ml(dd),n.onEscape)]}),(function(t,e,n){return n.stopSpaceKeyup?[Pl(Ml(md),xd)]:[]}),(function(t){return t.focusIn})),vp=Vm.schema(),bp=Um.schema(),yp=rp.schema(),_p=tp.schema(),wp=fp.schema(),xp=Wm.schema(),Op=hp.schema(),Sp=gp.schema(),Cp=gu({branchKey:"mode",branches:Object.freeze({__proto__:null,acyclic:vp,cyclic:bp,flow:yp,flatgrid:_p,matrix:wp,execution:xp,menu:Op,special:Sp}),name:"keying",active:{events:function(t,e){return t.handler.toEvents(t,e)}},apis:{focusIn:function(t,e,n){e.sendFocusIn(e).fold((function(){t.getSystem().triggerFocus(t.element,t.element)}),(function(r){r(t,e,n)}))},setGridSize:function(t,e,n,r,o){ut(n,"setGridSize")&&n.setGridSize(r,o)}},state:$m}),kp=function(t,e){return t.components()},Ep=hu({fields:[],name:"replacing",apis:Object.freeze({__proto__:null,append:function(t,e,n,r){nm(t,0,Mn,r)},prepend:function(t,e,n,r){nm(t,0,Ae,r)},remove:rm,replaceAt:om,replaceBy:function(t,e,n,r,o){return V(kp(t),r).bind((function(e){return om(t,0,0,e,o)}))},set:function(t,e,n,r){xu((function(){var e=L(r,t.getSystem().build);Es(t,e)}),t.element)},contents:kp})}),Mp=Object.freeze({__proto__:null,focus:am,blur:function(t,e){e.ignore||t.element.dom.blur()},isFocused:function(t){return yu(t.element)}}),Tp=Object.freeze({__proto__:null,exhibit:function(t,e){return No(e.ignore?{}:{attributes:{tabindex:"-1"}})},events:function(t){return Qi([Oo(ki(),(function(e,n){am(e,t),n.stop()}))].concat(t.stopMousedown?[Oo(si(),(function(t,e){e.event.prevent()}))]:[]))}}),Dp=hu({fields:[$a("onFocus"),kr("stopMousedown",!1),kr("ignore",!1)],name:"focusing",active:Tp,apis:Mp}),Ap=Object.freeze({__proto__:null,onLoad:dm,toggle:sm,isOn:function(t,e,n){return n.get()},on:lm,off:fm,set:Fm}),Pp=Object.freeze({__proto__:null,exhibit:function(){return No({})},events:function(t,e){var n,r,o,i=(n=t,r=e,o=sm,na((function(t){o(t,n,r)}))),a=mu(t,e,dm);return Qi(U([t.toggleOnExecute?[i]:[],[a]]))}}),Rp=hu({fields:[kr("selected",!1),yr("toggleClass"),kr("toggleOnExecute",!0),Er("aria",{mode:"none"},sr("mode",{pressed:[kr("syncWithExpanded",!1),Xa("update",(function(t,e,n){oe(t.element,"aria-pressed",n),e.syncWithExpanded&&Nm(t,0,n)}))],checked:[Xa("update",(function(t,e,n){oe(t.element,"aria-checked",n)}))],expanded:[Xa("update",Nm)],selected:[Xa("update",(function(t,e,n){oe(t.element,"aria-selected",n)}))],none:[Xa("update",a)]}))],name:"toggling",active:Pp,apis:Ap,state:{init:function(){var t=zr(!1);return{get:function(){return t.get()},set:function(e){return t.set(e)},clear:function(){return t.set(!1)},readState:function(){return t.get()}}}}}),Ip="alloy.item-hover",zp="alloy.item-focus",Lp=c(Ip),jp=c(zp),Bp=[fr("data"),fr("components"),fr("dom"),kr("hasSubmenu",!1),yr("toggling"),xf("itemBehaviours",[Rp,Dp,Cp,wf]),kr("ignoreFocus",!1),kr("domModification",{}),Xa("builder",(function(t){return{dom:t.dom,domModification:k(k({},t.domModification),{attributes:k(k(k({role:t.toggling.isSome()?"menuitemcheckbox":"menuitem"},t.domModification.attributes),{"aria-haspopup":t.hasSubmenu}),t.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:Of(t.itemBehaviours,[t.toggling.fold(Rp.revoke,(function(t){return Rp.config(k({aria:{mode:"checked"}},t))})),Dp.config({ignore:t.ignoreFocus,stopMousedown:t.ignoreFocus,onFocus:function(t){gm(t)}}),Cp.config({mode:"execution"}),wf.config({store:{mode:"memory",initialValue:t.data}}),im("item-type-events",M(M([],mm(),!0),[Oo(mi(),hm),Oo(Ai(),Dp.focus)],!1))]),components:t.components,eventOrder:t.eventOrder}})),kr("eventOrder",{})],Fp=[fr("dom"),fr("components"),Xa("builder",(function(t){return{dom:t.dom,components:t.components,events:Qi([Oo(Ai(),(function(t,e){e.stop()}))])}}))],Np=c("item-widget"),Hp=c([Vf({name:"widget",overrides:function(t){return{behaviours:Yu([wf.config({store:{mode:"manual",getValue:function(e){return t.data},setValue:a}})])}}})]),Vp=sr("type",{widget:[fr("uid"),fr("data"),fr("components"),fr("dom"),kr("autofocus",!1),kr("ignoreFocus",!1),xf("widgetBehaviours",[wf,Dp,Cp]),kr("domModification",{}),dl(Hp()),Xa("builder",(function(t){function e(e){return il(e,t,"widget").map((function(t){return Cp.focusIn(t),t}))}function n(e,n){return vl(n.event.target)||t.autofocus&&n.setSource(e.element),bt.none()}var r=rl(Np(),t,Hp()),o=ol(Np(),t,r.internals());return{dom:t.dom,components:o,domModification:t.domModification,events:Qi([na((function(t,n){e(t).each((function(t){n.stop()}))})),Oo(mi(),hm),Oo(Ai(),(function(n,r){t.autofocus?e(n):Dp.focus(n)}))]),behaviours:Of(t.widgetBehaviours,[wf.config({store:{mode:"memory",initialValue:t.data}}),Dp.config({ignore:t.ignoreFocus,onFocus:function(t){gm(t)}}),Cp.config({mode:"special",focusIn:t.autofocus?function(t){e(t)}:Zu(),onLeft:n,onRight:n,onEscape:function(e,n){return Dp.isFocused(e)||t.autofocus?(t.autofocus&&n.setSource(e.element),bt.none()):(Dp.focus(e),bt.some(!0))}})])}}))],item:Bp,separator:Fp}),Up=c([$f({factory:{sketch:function(t){var e=cr("menu.spec item",Vp,t);return e.builder(e)}},name:"items",unit:"item",defaults:function(t,e){return Mt(e,"uid")?e:k(k({},e),{uid:fa("item")})},overrides:function(t,e){return{type:e.type,ignoreFocus:t.fakeFocus,domModification:{classes:[t.markers.item]}}}})]),Wp=c([fr("value"),fr("items"),fr("dom"),fr("components"),kr("eventOrder",{}),$s("menuBehaviours",[cd,wf,td,Cp]),Er("movement",{mode:"menu",moveOnTab:!0},sr("mode",{grid:[Tu(),Xa("config",(function(t,e){return{mode:"flatgrid",selector:"."+t.markers.item,initSize:{numColumns:e.initSize.numColumns,numRows:e.initSize.numRows},focusManager:t.focusManager}}))],matrix:[Xa("config",(function(t,e){return{mode:"matrix",selectors:{row:e.rowSelector,cell:"."+t.markers.item},focusManager:t.focusManager}})),fr("rowSelector")],menu:[kr("moveOnTab",!0),Xa("config",(function(t,e){return{mode:"menu",selector:"."+t.markers.item,moveOnTab:e.moveOnTab,focusManager:t.focusManager}}))]})),dr("markers",Mu()),kr("fakeFocus",!1),kr("focusManager",Il()),$a("onHighlight")]),$p=c("alloy.menu-focus"),Gp=gl({name:"Menu",configFields:Wp(),partFields:Up(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:Ks(t.menuBehaviours,[cd.config({highlightClass:t.markers.selectedItem,itemClass:t.markers.item,onHighlight:t.onHighlight}),wf.config({store:{mode:"memory",initialValue:t.value}}),td.config({find:bt.some}),Cp.config(t.movement.config(t,t.movement))]),events:Qi([Oo(jp(),(function(t,e){var n=e.event;t.getSystem().getByDom(n.target).each((function(n){cd.highlight(t,n),e.stop(),vo(t,$p(),{menu:t,item:n})}))})),Oo(Lp(),(function(t,e){var n=e.event.item;cd.highlight(t,n)}))]),components:e,eventOrder:t.eventOrder,domModification:{attributes:{role:"menu"}}}}}),Kp=function(t,e,n,r){return at(n,r).bind((function(r){return at(t,r).bind((function(r){var o=Kp(t,e,n,r);return bt.some([r].concat(o))}))})).getOr([])},qp=Hm,Xp=c("collapse-item"),Yp=hl({name:"TieredMenu",configFields:[qa("onExecute"),qa("onEscape"),Ka("onOpenMenu"),Ka("onOpenSubmenu"),$a("onRepositionMenu"),$a("onCollapseMenu"),kr("highlightImmediately",!0),gr("data",[fr("primary"),fr("menus"),fr("expansions")]),kr("fakeFocus",!1),$a("onHighlight"),$a("onHover"),Va(),fr("dom"),kr("navigateOnHover",!0),kr("stayInDom",!1),$s("tmenuBehaviours",[Cp,cd,td,Ep]),kr("eventOrder",{})],apis:{collapseMenu:function(t,e){t.collapseMenu(e)},highlightPrimary:function(t,e){t.highlightPrimary(e)},repositionMenus:function(t,e){t.repositionMenus(e)}},factory:function(t,e){function n(t){return wf.getValue(t).value}function r(t,e){cd.highlight(t,e),cd.getHighlighted(e).orThunk((function(){return cd.getFirst(e)})).each((function(e){yo(t,e.element,Ai())}))}function o(t,e){return st(L(e,(function(e){return t.lookupMenu(e).bind((function(t){return"prepared"===t.type?bt.some(t.menu):bt.none()}))})))}function i(e,n,r){var i=o(n,n.otherMenus(r));Ot(i,(function(n){Xo(n.element,[t.markers.backgroundMenu]),t.stayInDom||Ep.remove(e,n)}))}function u(e,r){var o;et((o=e,f.get().getOrThunk((function(){var e={},r=B(ss(o.element,"."+t.markers.item),(function(t){return"true"===ae(t,"aria-haspopup")}));return Ot(r,(function(t){o.getSystem().getByDom(t).each((function(t){var r=n(t);e[r]=t}))})),f.set(e),e}))),(function(t,e){var n=xt(r,e);oe(t.element,"aria-expanded",n)}))}function c(e,n,a){return bt.from(a[0]).bind((function(u){return n.lookupMenu(u).bind((function(u){if("notbuilt"===u.type)return bt.none();var c=u.menu,s=o(n,a.slice(1));return Ot(s,(function(e){$o(e.element,t.markers.backgroundMenu)})),bn(c.element)||Ep.append(e,Sa(c)),Xo(c.element,[t.markers.backgroundMenu]),r(e,c),i(e,n,a),bt.some(c)}))}))}var s,l,f=cc(),d=function(){function t(t){return u(t).bind(Hm)}function e(t){return at(n.get(),t)}var n=zr({}),r=zr({}),o=zr({}),i=cc(),a=zr({}),u=function(t){return at(r.get(),t)};return{setMenuBuilt:function(t,e){var n;r.set(k(k({},r.get()),((n={})[t]={type:"prepared",menu:e},n)))},setContents:function(t,e,u,c){i.set(t),n.set(u),r.set(e),a.set(c);var s=function(t,e){var n={};et(t,(function(t,e){Ot(t,(function(t){n[t]=e}))}));var r=e,o=Et(e,(function(t,e){return{k:t,v:e}})),i=nt(o,(function(t,e){return[e].concat(Kp(n,r,o,e))}));return nt(n,(function(t){return at(i,t).getOr([t])}))}(c,u);o.set(s)},expand:function(t){return at(n.get(),t).map((function(e){var n=at(o.get(),t).getOr([]);return[e].concat(n)}))},refresh:function(t){return at(o.get(),t)},collapse:function(t){return at(o.get(),t).bind((function(t){return 1<t.length?bt.some(t.slice(1)):bt.none()}))},lookupMenu:u,lookupItem:e,otherMenus:function(t){var e=a.get();return K(Ct(e),t)},getPrimary:function(){return i.get().bind(t)},getMenus:function(){return r.get()},clear:function(){n.set({}),r.set({}),o.set({}),i.clear()},isClear:function(){return i.get().isNone()},getTriggeringPath:function(r,a){var u=B(e(r).toArray(),(function(e){return t(e).isSome()}));return at(o.get(),r).bind((function(e){var r=G(u.concat(e));return function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];if(!r.isSome())return bt.none();e.push(r.getOrDie())}return bt.some(e)}(W(r,(function(e,o){return u=e,c=a,s=r.slice(0,o+1),t(u).bind((function(t){return e=u,ot(n.get(),(function(t,n){return t===e})).bind((function(e){return c(e).map((function(e){return{triggeredMenu:t,triggeringItem:e,triggeringPath:s}}))}));var e})).fold((function(){return ct(i.get(),e)?[]:[bt.none()]}),(function(t){return[bt.some(t)]}));var u,c,s})))}))}}}();function m(e,r,o){if(void 0===o&&(o=s.HighlightSubmenu),r.hasConfigured(ad)&&ad.isDisabled(r))return bt.some(r);var i=n(r);return d.expand(i).bind((function(n){return u(e,n),bt.from(n[0]).bind((function(i){return d.lookupMenu(i).bind((function(a){var u=function(t,e,n){if("notbuilt"!==n.type)return n.menu;var r=t.getSystem().build(n.nbMenu());return d.setMenuBuilt(e,r),r}(e,i,a);return bn(u.element)||Ep.append(e,Sa(u)),t.onOpenSubmenu(e,r,u,G(n)),o===s.HighlightSubmenu?(cd.highlightFirst(u),c(e,d,n)):(cd.dehighlightAll(u),bt.some(r))}))}))}))}function p(e,r){var o=n(r);return d.collapse(o).bind((function(n){return u(e,n),c(e,d,n).map((function(n){return t.onCollapseMenu(e,r,n),n}))}))}function h(e){return function(n,r){return Aa(r.getSource(),"."+t.markers.item).bind((function(t){return n.getSystem().getByDom(t).toOptional().bind((function(t){return e(n,t).map(S)}))}))}}function g(t){return cd.getHighlighted(t).bind(cd.getHighlighted)}(l=s={})[l.HighlightSubmenu=0]="HighlightSubmenu",l[l.HighlightParent=1]="HighlightParent";var v=Qi([Oo($p(),(function(t,e){var r=e.event.item;d.lookupItem(n(r)).each((function(){var r=e.event.menu;cd.highlight(t,r);var o=n(e.event.item);d.refresh(o).each((function(e){return i(t,d,e)}))}))})),na((function(e,r){var o=r.event.target;e.getSystem().getByDom(o).each((function(r){0===n(r).indexOf("collapse-item")&&p(e,r),m(e,r,s.HighlightSubmenu).fold((function(){t.onExecute(e,r)}),a)}))})),Zi((function(e,n){(function(e){var n,r,o=(n=e,r=t.data.primary,nt(t.data.menus,(function(e,o){function i(){return Gp.sketch(k(k({},e),{value:o,markers:t.markers,fakeFocus:t.fakeFocus,onHighlight:t.onHighlight,focusManager:(t.fakeFocus?zl:Il)()}))}return o===r?{type:"prepared",menu:n.getSystem().build(i())}:{type:"notbuilt",nbMenu:i}}))),i=nt(t.data.menus,(function(t,e){return W(t.items,(function(t){return"separator"===t.type?[]:[t.data.value]}))}));return d.setContents(t.data.primary,o,t.data.expansions,i),d.getPrimary()})(e).each((function(n){Ep.append(e,Sa(n)),t.onOpenMenu(e,n),t.highlightImmediately&&r(e,n)}))}))].concat(t.navigateOnHover?[Oo(Lp(),(function(e,r){var o=r.event.item,i=e,a=n(o);d.refresh(a).bind((function(t){return u(i,t),c(i,d,t)})),m(e,o,s.HighlightParent),t.onHover(e,o)}))]:[])),b={collapseMenu:function(t){g(t).each((function(e){p(t,e)}))},highlightPrimary:function(t){d.getPrimary().each((function(e){r(t,e)}))},repositionMenus:function(e){d.getPrimary().bind((function(t){return g(e).bind((function(t){var e=n(t),r=st(L(it(d.getMenus()),qp));return d.getTriggeringPath(e,(function(t){return e=t,tt(r,(function(t){return t.getSystem().isConnected()?H(cd.getCandidates(t),(function(t){return n(t)===e})):bt.none()}));var e}))})).map((function(e){return{primary:t,triggeringPath:e}}))})).fold((function(){bt.from(e.components()[0]).filter((function(t){return"menu"===ae(t.element,"role")})).each((function(n){t.onRepositionMenu(e,n,[])}))}),(function(n){var r=n.primary,o=n.triggeringPath;t.onRepositionMenu(e,r,o)}))}};return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:Ks(t.tmenuBehaviours,[Cp.config({mode:"special",onRight:h((function(t,e){return vl(e.element)?bt.none():m(t,e,s.HighlightSubmenu)})),onLeft:h((function(t,e){return vl(e.element)?bt.none():p(t,e)})),onEscape:h((function(e,n){return p(e,n).orThunk((function(){return t.onEscape(e,n).map((function(){return e}))}))})),focusIn:function(t,e){d.getPrimary().each((function(e){yo(t,e.element,Ai())}))}}),cd.config({highlightClass:t.markers.selectedMenu,itemClass:t.markers.menu}),td.config({find:function(t){return cd.getHighlighted(t)}}),Ep.config({})]),eventOrder:t.eventOrder,apis:b,events:v}},extraApis:{tieredData:function(t,e,n){return{primary:t,menus:e,expansions:n}},singleData:function(t,e){return{primary:t,menus:uo(t,e),expansions:{}}},collapseItem:function(t){return{value:Ro(Xp()),meta:{text:t}}}}}),Jp=hl({name:"InlineView",configFields:[fr("lazySink"),$a("onShow"),$a("onHide"),Or("onEscape"),$s("inlineBehaviours",[lf,wf,tc]),Cr("fireDismissalEventInstead",[kr("event",Ui())]),Cr("fireRepositionEventInstead",[kr("event",Wi())]),kr("getRelated",bt.none),kr("isExtraPart",O),kr("eventOrder",bt.none)],factory:function(t,e){function n(e){lf.isOpen(e)&&wf.getValue(e).each((function(n){switch(n.mode){case"menu":lf.getState(e).each(Yp.repositionMenus);break;case"position":var r=t.lazySink(e).getOrDie();nf.positionWithinBounds(r,e,n.config,n.getBounds())}}))}function r(t,e,n,r){i(t,e,n,(function(){return r.map((function(t){return Rn(t)}))}))}function o(e,n,r,o){var i,a,u,c,s,l=(i=t,a=e,u=n,c=o,s="horizontal"===r.type?{layouts:{onLtr:fu,onRtl:du}}:{},Yp.sketch({dom:{tag:"div"},data:r.data,markers:r.menu.markers,highlightImmediately:r.menu.highlightImmediately,onEscape:function(){return lf.close(a),i.onEscape.map((function(t){return t(a)})),bt.some(!0)},onExecute:function(){return bt.some(!0)},onOpenMenu:function(t,e){nf.positionWithinBounds(f().getOrDie(),e,u,c())},onOpenSubmenu:function(t,e,n,r){var o=f().getOrDie();nf.position(o,n,{anchor:k({type:"submenu",item:e},d(r))})},onRepositionMenu:function(t,e,n){var r=f().getOrDie();nf.positionWithinBounds(r,e,u,c()),Ot(n,(function(t){var e=d(t.triggeringPath);nf.position(r,t.triggeredMenu,{anchor:k({type:"submenu",item:t.triggeringItem},e)})}))}}));function f(){return i.lazySink(a)}function d(t){return 2===t.length?s:{}}lf.open(e,l),wf.setValue(e,bt.some({mode:"menu",menu:l}))}var i=function(e,n,r,o){var i=t.lazySink(e).getOrDie();lf.openWhileCloaked(e,n,(function(){return nf.positionWithinBounds(i,e,r,o())})),wf.setValue(e,bt.some({mode:"position",config:r,getBounds:o}))},a={setContent:function(t,e){lf.setContent(t,e)},showAt:function(t,e,n){r(t,e,n,bt.none())},showWithin:r,showWithinBounds:i,showMenuAt:function(t,e,n){o(t,e,n,bt.none)},showMenuWithinBounds:o,hide:function(t){lf.isOpen(t)&&(wf.setValue(t,bt.none()),lf.close(t))},getContent:function(t){return lf.getState(t)},reposition:n,isOpen:lf.isOpen};return{uid:t.uid,dom:t.dom,behaviours:Ks(t.inlineBehaviours,[lf.config({isPartOf:function(e,n,r){return za(n,r)||(o=r,t.getRelated(e).exists((function(t){return za(t,o)})));var o},getAttachPoint:function(e){return t.lazySink(e).getOrDie()},onOpen:function(e){t.onShow(e)},onClose:function(e){t.onHide(e)}}),wf.config({store:{mode:"memory",initialValue:bt.none()}}),tc.config({channels:k(k({},Bs(k({isExtraPart:e.isExtraPart},t.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),Fs(k(k({},t.fireRepositionEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})),{doReposition:n})))})]),eventOrder:t.eventOrder,apis:a}},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)}}}),Qp="layout-inset",Zp=function(t,e,n){return Ja(vm(t,e),t.y,n.insetNorth(),zu(),"north",Za(t,{top:2}),Qp)},th=function(t,e,n){return Ja(vm(t,e),ym(t,e),n.insetSouth(),Lu(),"south",Za(t,{bottom:3}),Qp)},eh=tinymce.util.Tools.resolve("tinymce.util.Delay"),nh=hl({name:"Button",factory:function(t){function e(e){return at(t.dom,"attributes").bind((function(t){return at(t,e)}))}var n=pm(t.action),r=t.dom.tag;return{uid:t.uid,dom:t.dom,components:t.components,events:n,behaviours:Of(t.buttonBehaviours,[Dp.config({}),Cp.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"!==r)return{role:e("role").getOr("button")};var t=e("type").getOr("button"),n=e("role").map((function(t){return{role:t}})).getOr({});return k({type:t},n)}()},eventOrder:t.eventOrder}},configFields:[kr("uid",void 0),fr("dom"),kr("components",[]),xf("buttonBehaviours",[Dp,Cp]),yr("action"),yr("role"),kr("eventOrder",{})]}),rh=tinymce.util.Tools.resolve("tinymce.util.I18n"),oh={indent:!0,outdent:!0,"table-insert-column-after":!0,"table-insert-column-before":!0,"paste-column-after":!0,"paste-column-before":!0,"unordered-list":!0,"list-bull-circle":!0,"list-bull-default":!0,"list-bull-square":!0},ih="temporary-placeholder",ah={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},uh=hl({name:"Notification",factory:function(t){function e(t){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+t+"%"}}}}function n(t){return{dom:{tag:"div",classes:["tox-text"],innerHtml:t+"%"}}}var r,o,i,a,u=Am({dom:{tag:"p",innerHtml:t.translationProvider(t.text)},behaviours:Yu([Ep.config({})])}),c=Am({dom:{tag:"div",classes:t.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[e(0)]},n(0)],behaviours:Yu([Ep.config({})])}),s={updateProgress:function(t,r){t.getSystem().isConnected()&&c.getOpt(t).each((function(t){Ep.set(t,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[e(r)]},n(r)])}))},updateText:function(t,e){var n;t.getSystem().isConnected()&&(n=u.get(t),Ep.set(n,[ti(e)]))}},l=U([t.icon.toArray(),t.level.toArray(),t.level.bind((function(t){return bt.from(ah[t])})).toArray()]),f=Am(nh.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[Bm("close",{tag:"div",classes:["tox-icon"],attributes:{"aria-label":t.translationProvider("Close")}},t.iconProvider)],action:function(e){t.onAction(e)}})),d=[(r=l,o={tag:"div",classes:["tox-notification__icon"]},i=t.iconProvider,a=i(),jm(o,H(r,(function(t){return Mt(a,Rm(t,a))})).getOr(ih),a,bt.none())),{dom:{tag:"div",classes:["tox-notification__body"]},components:[u.asSpec()],behaviours:Yu([Ep.config({})])}];return{uid:t.uid,dom:{tag:"div",attributes:{role:"alert"},classes:t.level.map((function(t){return["tox-notification","tox-notification--in","tox-notification--"+t]})).getOr(["tox-notification","tox-notification--in"])},behaviours:Yu([Dp.config({}),im("notification-events",[Oo(pi(),(function(t){f.getOpt(t).each(Dp.focus)}))])]),components:d.concat(t.progress?[c.asSpec()]:[]).concat(t.closeButton?[f.asSpec()]:[]),apis:s}},configFields:[yr("level"),fr("progress"),fr("icon"),fr("onAction"),fr("text"),fr("iconProvider"),fr("translationProvider"),Ar("closeButton",!0)],apis:{updateProgress:function(t,e,n){t.updateProgress(e,n)},updateText:function(t,e,n){t.updateText(e,n)}}});function ch(t,e){function n(){p(r)||(clearTimeout(r),r=null)}var r=null;return{cancel:n,throttle:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];n(),r=setTimeout((function(){r=null,t.apply(null,o)}),e)}}}function sh(t,e,n,r,o){var i=_h(t,(function(e){return(n=t).isBlock(r=e)||xt(["BR","IMG","HR","INPUT"],r.nodeName)||"false"===n.getContentEditable(r);var n,r}));return bt.from(i.backwards(e,n,r,o))}function lh(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")}function fh(t){return""!==t&&-1!==" \f\n\r\t\v".indexOf(t)}function dh(t,e){return t.substring(e.length)}function mh(t,e,n,r){return void 0===r&&(r=0),wh(Rt.fromDom(e.startContainer)).fold((function(){return function(t,e,n,r){if(void 0===r&&(r=0),!e.collapsed||3!==e.startContainer.nodeType)return bt.none();var o=t.getParent(e.startContainer,t.isBlock)||t.getRoot();return sh(t,e.startContainer,e.startOffset,(function(t,e,r){return function(t,n){for(var r=e-1;0<=r;r--){var o=t.charAt(r);if(fh(o))return bt.none();if(o===n)break}return bt.some(r)}(r,n).getOr(e)}),o).bind((function(t){var o=e.cloneRange();if(o.setStart(t.container,t.offset),o.setEnd(e.endContainer,e.endOffset),o.collapsed)return bt.none();var i=lh(o);return 0!==i.lastIndexOf(n)||dh(i,n).length<r?bt.none():bt.some({text:dh(i,n),range:o,triggerChar:n})}))}(t,e,n,r)}),(function(e){var r=t.createRng();r.selectNode(e.dom);var o=lh(r);return bt.some({range:r,text:dh(o,n),triggerChar:n})}))}function ph(t,e){return{container:t,offset:e}}function hh(t){return ar("toolbarbutton",Th,t)}function gh(t){return ar("ToggleButton",Ah,t)}function vh(t,e,n,r){void 0===r&&(r={});var o=e(),i=t.selection.getRng().startContainer.nodeValue,a=B(o.lookupByChar(n.triggerChar),(function(e){return n.text.length>=e.minChars&&e.matches.getOrThunk((function(){return e=t.dom,function(t){var n=Sh(t.startContainer,t.startOffset);return!sh(e,n.container,n.offset,(function(t,e){return 0===e?-1:e}),e.getRoot()).filter((function(t){return!fh(t.container.data.charAt(t.offset-1))})).isSome()};var e}))(n.range,i,n.text)}));if(0===a.length)return bt.none();var u=xh.all(L(a,(function(t){return t.fetch(n.text,t.maxResults,r).then((function(e){return{matchText:n.text,items:e,columns:t.columns,onAction:t.onAction,highlightOn:t.highlightOn}}))})));return bt.some({lookupData:u,context:n})}var bh,yh,_h=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),wh=function(t){return Aa(t,"[data-mce-autocompleter]")},xh=tinymce.util.Tools.resolve("tinymce.util.Promise"),Oh=function(t){if(3===t.nodeType)return ph(t,t.data.length);var e=t.childNodes;return 0<e.length?Oh(e[e.length-1]):ph(t,e.length)},Sh=function(t,e){var n=t.childNodes;return 0<n.length&&e<n.length?Sh(n[e],0):0<n.length&&1===t.nodeType&&n.length===e?Oh(n[n.length-1]):ph(t,e)},Ch=Xr([mr("type"),xr("text")]),kh=Xr([kr("type","autocompleteitem"),kr("active",!1),kr("disabled",!1),kr("meta",{}),mr("value"),xr("text"),xr("icon")]),Eh=Xr([mr("type"),mr("ch"),Mr("minChars",1),kr("columns",1),Mr("maxResults",10),Or("matches"),hr("fetch"),hr("onAction"),Rr("highlightOn",[],Zr)]),Mh=[Ar("disabled",!1),xr("tooltip"),xr("icon"),xr("text"),Pr("onSetup",(function(){return a}))],Th=Xr([mr("type"),hr("onAction")].concat(Mh)),Dh=[Ar("active",!1)].concat(Mh),Ah=Xr(Dh.concat([mr("type"),hr("onAction")])),Ph=[Pr("predicate",O),Dr("scope","node",["node","editor"]),Dr("position","selection",["node","selection","line"])],Rh=Mh.concat([kr("type","contextformbutton"),kr("primary",!1),hr("onAction"),ao("original",s)]),Ih=Dh.concat([kr("type","contextformbutton"),kr("primary",!1),hr("onAction"),ao("original",s)]),zh=Mh.concat([kr("type","contextformbutton")]),Lh=Dh.concat([kr("type","contextformtogglebutton")]),jh=sr("type",{contextformbutton:Rh,contextformtogglebutton:Ih}),Bh=Xr([kr("type","contextform"),Pr("initValue",c("")),xr("label"),br("commands",jh),_r("launch",sr("type",{contextformbutton:zh,contextformtogglebutton:Lh}))].concat(Ph)),Fh=Xr([kr("type","contexttoolbar"),mr("items")].concat(Ph));function Nh(t){return at(hg,t).getOr(mg)}function Hh(t){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:"color"===t?"tox-swatches":"tox-menu",tieredMenu:"tox-tiered-menu"}}function Vh(t){var e=Hh(t);return{backgroundMenu:e.backgroundMenu,selectedMenu:e.selectedMenu,menu:e.menu,selectedItem:e.selectedItem,item:Nh(t)}}function Uh(t,e,n){return{dom:{tag:"div",classes:U([[Hh(n).tieredMenu]])},markers:Vh(n)}}function Wh(t,e){return function(n){return L(z(n,e),(function(e){return{dom:t,components:e}}))}}function $h(t,e){var n=[],r=[];return Ot(t,(function(t,o){e(t,o)?(0<r.length&&n.push(r),r=[],Mt(t.dom,"innerHtml")&&r.push(t)):r.push(t)})),0<r.length&&n.push(r),L(n,(function(t){return{dom:{tag:"div",classes:["tox-collection__group"]},components:t}}))}function Gh(t,e){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===t?["tox-collection--list"]:["tox-collection--grid"])},components:[Gp.parts.items({preprocess:function(n){return"auto"!==t&&1<t?Wh({tag:"div",classes:["tox-collection__group"]},t)(n):$h(n,(function(t,n){return"separator"===e[n].type}))}})]}}function Kh(t){return R(t,(function(t){return"icon"in t&&void 0!==t.icon}))}function qh(t){return bt.none()}function Xh(t,e,n,r,o){var i,a=(i=n,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[Gp.parts.items({preprocess:function(t){return $h(t,(function(t,e){return"separator"===i[e].type}))}})]});return{value:t,dom:a.dom,components:a.components,items:n}}function Yh(t,e,n,r,o){var i,a;return"color"===o?{value:t,dom:(i={dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[Gp.parts.items({preprocess:"auto"!==r?Wh({tag:"div",classes:["tox-swatches__row"]},r):s})]}]}).dom,components:i.components,items:n}:"normal"===o&&"auto"===r?{value:t,dom:(i=Gh(r,n)).dom,components:i.components,items:n}:"normal"===o&&1===r?{value:t,dom:(i=Gh(1,n)).dom,components:i.components,items:n}:"normal"===o?{value:t,dom:(i=Gh(r,n)).dom,components:i.components,items:n}:"listpreview"!==o||"auto"===r?{value:t,dom:{tag:"div",classes:U([[(a=Hh(o)).menu,"tox-menu-"+r+"-column"],e?[a.hasIcons]:[]])},components:Og,items:n}:{value:t,dom:(i={dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[Gp.parts.items({preprocess:Wh({tag:"div",classes:["tox-collection__group"]},r)})]}).dom,components:i.components,items:n}}function Jh(t,e,n){var r=ss(t.element,"."+n);if(0<r.length){var o=V(r,(function(t){var n=t.dom.getBoundingClientRect().top,o=r[0].dom.getBoundingClientRect().top;return Math.abs(n-o)>e})).getOr(r.length);return bt.some({numColumns:o,numRows:Math.ceil(r.length/o)})}return bt.none()}function Qh(t,e,n){t.getSystem().broadcastOn([Fg],{})}function Zh(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))}function tg(t){return t.getParam("width",$g.DOM.getStyle(t.getElement(),"width"))}function eg(t){return bt.from(t.getParam("min_width")).filter(y)}function ng(t){return bt.from(t.getParam("min_height")).filter(y)}function rg(t){return bt.from(t.getParam("max_width")).filter(y)}function og(t){return bt.from(t.getParam("max_height")).filter(y)}function ig(t){return!1!==t.getParam("menubar",!0,"boolean")}function ag(t){var e=t.getParam("toolbar",!0),n=!0===e,r=f(e),o=m(e)&&0<e.length;return!Kg(t)&&(o||r||n)}function ug(t){var e=B(I(9,(function(e){return t.getParam("toolbar"+(e+1),!1,"string")})),(function(t){return"string"==typeof t}));return 0<e.length?bt.some(e):bt.none()}(yh=bh={})[yh.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",yh[yh.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX";var cg,sg,lg,fg,dg=bh,mg="tox-menu-nav__js",pg="tox-collection__item",hg={normal:mg,color:"tox-swatch"},gg="tox-collection__item--enabled",vg="tox-collection__item-icon",bg="tox-collection__item-label",yg="tox-collection__item-caret",_g="tox-collection__item--active",wg="tox-collection__item-container",xg="tox-collection__item-container--row",Og=[Gp.parts.items({})],Sg=[mr("type"),mr("src"),xr("alt"),Rr("classes",[],Zr)],Cg=Xr(Sg),kg=[mr("type"),mr("text"),xr("name"),Rr("classes",["tox-collection__item-label"],Zr)],Eg=Xr(kg),Mg=Qn((function(){return rr("type",{cardimage:Cg,cardtext:Eg,cardcontainer:Tg})})),Tg=Xr([mr("type"),Tr("direction","horizontal"),Tr("align","left"),Tr("valign","middle"),br("items",Mg)]),Dg=[Ar("disabled",!1),xr("text"),xr("shortcut"),io("value","value",Wn((function(){return Ro("menuitem-value")})),Jr()),kr("meta",{})],Ag=Xr([mr("type"),xr("label"),br("items",Mg),Pr("onSetup",(function(){return a})),Pr("onAction",a)].concat(Dg)),Pg=Xr([mr("type"),Ar("active",!1),xr("icon")].concat(Dg)),Rg=[mr("type"),mr("fancytype"),Pr("onAction",a)],Ig=sr("fancytype",{inserttable:[kr("initData",{})].concat(Rg),colorswatch:[Ir("initData",{},[Ar("allowCustomColors",!0),Sr("colors",Jr())])].concat(Rg)}),zg=Xr([mr("type"),Pr("onSetup",(function(){return a})),Pr("onAction",a),xr("icon")].concat(Dg)),Lg=Xr([mr("type"),hr("getSubmenuItems"),Pr("onSetup",(function(){return a})),xr("icon")].concat(Dg)),jg=Xr([mr("type"),xr("icon"),Ar("active",!1),Pr("onSetup",(function(){return a})),hr("onAction")].concat(Dg)),Bg=function(t){return e=Ro("unnamed-events"),Yu([im(e,t)]);var e},Fg=Ro("tooltip.exclusive"),Ng=Ro("tooltip.show"),Hg=Ro("tooltip.hide"),Vg=Object.freeze({__proto__:null,hideAllExclusive:Qh,setComponents:function(t,e,n,r){n.getTooltip().each((function(t){t.getSystem().isConnected()&&Ep.set(t,r)}))}}),Ug=Object.freeze({__proto__:null,events:function(t,e){function n(n){e.getTooltip().each((function(r){Ds(r),t.onHide(n,r),e.clearTooltip()})),e.clearTimer()}return Qi(U([[Oo(Ng,(function(n){e.resetTimer((function(){var r,o,i=n;e.isShowing()||(Qh(i),r=t.lazySink(i).getOrDie(),o=i.getSystem().build({dom:t.tooltipDom,components:t.tooltipComponents,events:Qi("normal"===t.mode?[Oo(mi(),(function(t){go(i,Ng)})),Oo(fi(),(function(t){go(i,Hg)}))]:[]),behaviours:Yu([Ep.config({})])}),e.setTooltip(o),Ms(r,o),t.onShow(i,o),nf.position(r,o,{anchor:t.anchor(i)}))}),t.delay)})),Oo(Hg,(function(r){e.resetTimer((function(){n(r)}),t.delay)})),Oo(Ti(),(function(t,e){e.universal||xt(e.channels,Fg)&&n(t)})),ta((function(t){n(t)}))],"normal"===t.mode?[Oo(pi(),(function(t){go(t,Ng)})),Oo(Ei(),(function(t){go(t,Hg)})),Oo(mi(),(function(t){go(t,Ng)})),Oo(fi(),(function(t){go(t,Hg)}))]:[Oo(Xi(),(function(t,e){go(t,Ng)})),Oo(Yi(),(function(t){go(t,Hg)}))]]))}}),Wg=hu({fields:[fr("lazySink"),fr("tooltipDom"),kr("exclusive",!0),kr("tooltipComponents",[]),kr("delay",300),Dr("mode","normal",["normal","follow-highlight"]),kr("anchor",(function(t){return{type:"hotspot",hotspot:t,layouts:{onLtr:c([Gu,$u,Hu,Uu,Vu,Wu]),onRtl:c([Gu,$u,Hu,Uu,Vu,Wu])}}})),$a("onHide"),$a("onShow")],name:"tooltipping",active:Ug,state:Object.freeze({__proto__:null,init:function(){function t(){e.on(clearTimeout)}var e=cc(),n=cc(),r=c("not-implemented");return va({getTooltip:n.get,isShowing:n.isSet,setTooltip:n.set,clearTooltip:n.clear,clearTimer:t,resetTimer:function(n,r){t(),e.set(setTimeout(n,r))},readState:r})}}),apis:Vg}),$g=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Gg=tinymce.util.Tools.resolve("tinymce.EditorManager"),Kg=function(t){return ug(t).fold((function(){return 0<t.getParam("toolbar",[],"string[]").length}),S)};function qg(t){return t.getParam("toolbar_mode","","string")}function Xg(t){return t.getParam("toolbar_location",lg.auto,"string")}function Yg(t){return Xg(t)===lg.bottom}function Jg(t){if(!t.inline)return bt.none();var e=t.getParam("fixed_toolbar_container","","string");if(0<e.length)return Da(yn(),e);var n=t.getParam("fixed_toolbar_container_target");return v(n)?bt.some(Rt.fromDom(n)):bt.none()}function Qg(t){return t.inline&&Jg(t).isSome()}function Zg(t){return Jg(t).getOrThunk((function(){return ee(hn(Rt.fromDom(t.getElement())))}))}function tv(t){return t.inline&&!ig(t)&&!ag(t)&&!Kg(t)}function ev(t){return(t.getParam("toolbar_sticky",!1,"boolean")||t.inline)&&!Qg(t)&&!tv(t)}function nv(t,e){var n=t.outerContainer.element;e&&(t.mothership.broadcastOn([ff()],{target:n}),t.uiMothership.broadcastOn([ff()],{target:n})),t.mothership.broadcastOn([Bv],{readonly:e}),t.uiMothership.broadcastOn([Bv],{readonly:e})}function rv(t,e){t.on("init",(function(){t.mode.isReadOnly()&&nv(e,!0)})),t.on("SwitchMode",(function(){return nv(e,t.mode.isReadOnly())})),t.getParam("readonly",!1,"boolean")&&t.setMode("readonly")}function ov(){var t;return tc.config({channels:((t={})[Bv]={schema:Fv,onReceive:function(t,e){ad.set(t,e.readonly)}},t)})}function iv(t,e){var n=t.getApi(e);return function(t){t(n)}}function av(t,e){return Zi((function(n){iv(t,n)((function(n){var r=t.onSetup(n);b(r)&&e.set(r)}))}))}function uv(t,e){return ta((function(n){return iv(t,n)(e.get())}))}function cv(t,e,n,r){var o,i,u=zr(a);return{type:"item",dom:e.dom,components:Uv(e.optComponents),data:t.data,eventOrder:Vv,hasSubmenu:t.triggersSubmenu,itemBehaviours:Yu([im("item-events",[(o=t,i=n,na((function(t,e){iv(o,t)(o.onAction),o.triggersSubmenu||i!==dg.CLOSE_ON_EXECUTE||(go(t,Ii()),e.stop())}))),av(t,u),uv(t,u)]),ad.config({disabled:function(){return t.disabled||r.isDisabled()},disableClass:"tox-collection__item--state-disabled"}),ov(),Ep.config({})].concat(t.itemBehaviours))}}function sv(t){return{value:t.value,meta:k({text:t.text.getOr("")},t.meta)}}function lv(t,e,n){return Bm(t,{tag:"div",classes:n=void 0===n?[vg]:n},e)}function fv(t){return{dom:{tag:"div",classes:[bg]},components:[ti(rh.translate(t))]}}function dv(t,e){return{dom:{tag:"div",classes:e,innerHtml:t}}}function mv(t,e){return{dom:{tag:"div",classes:[bg]},components:[{dom:{tag:t.tag,styles:t.styles},components:[ti(rh.translate(e))]}]}}function pv(t){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:(e=Wv.mac?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"},n=L(t.split("+"),(function(t){var n=t.toLowerCase().trim();return Mt(e,n)?e[n]:t})),Wv.mac?n.join(""):n.join("+"))}};var e,n}function hv(t){return lv("checkmark",t,["tox-collection__item-checkmark"])}function gv(t){var e=t.map((function(t){return{attributes:{title:rh.translate(t)}}})).getOr({});return k({tag:"div",classes:[mg,pg]},e)}function vv(t,e,n,r){return void 0===r&&(r=bt.none()),"color"===t.presets?(o=e,i=r,c=t.ariaLabel,s=t.value,{dom:(a=t.iconContent.map((function(t){return e=o.icons,n=i,Im(t,r=e()).or(n).getOrThunk(Pm(r));var e,n,r})).getOr(""),u={tag:"div",attributes:c.map((function(t){return{title:o.translate(t)}})).getOr({}),classes:["tox-swatch"]},k(k({},u),"custom"===s?{tag:"button",classes:M(M([],u.classes,!0),["tox-swatches__picker-btn"],!1),innerHtml:a}:"remove"===s?{classes:M(M([],u.classes,!0),["tox-swatch--remove"],!1),innerHtml:a}:{attributes:k(k({},u.attributes),{"data-mce-color":s}),styles:{"background-color":s}})),optComponents:[]}):(l=t,f=e,d=r,m={tag:"div",classes:[vg]},p=n?l.iconContent.map((function(t){return Bm(t,m,f.icons,d)})).orThunk((function(){return bt.some({dom:m})})):bt.none(),h=l.checkMark,g=bt.from(l.meta).fold((function(){return fv}),(function(t){return Mt(t,"style")?_(mv,t.style):fv})),v=l.htmlContent.fold((function(){return l.textContent.map(g)}),(function(t){return bt.some(dv(t,[bg]))})),{dom:gv(l.ariaLabel),optComponents:[p,v,l.shortcutContent.map(pv),h,l.caret]});var o,i,a,u,c,s,l,f,d,m,p,h,g,v}function bv(t,e){return at(t,"tooltipWorker").map((function(t){return[Wg.config({lazySink:e.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(t){return{type:"submenu",item:t,overrides:{maxHeightFunction:Mc}}},mode:"follow-highlight",onShow:function(e,n){t((function(t){Wg.setComponents(e,[wa({element:Rt.fromDom(t)})])}))}})]})).getOr([])}function yv(t,e){var n=rh.translate(t),r=$g.DOM.encode(n);if(0<e.length){var o=new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi");return r.replace(o,(function(t){return'<span class="tox-autocompleter-highlight">'+t+"</span>"}))}return r}function _v(t){return{value:t}}function wv(t){return Kv.test(t)||qv.test(t)}function xv(t){var e=t.toString(16);return(1===e.length?"0"+e:e).toUpperCase()}function Ov(t){return _v(xv(t.red)+xv(t.green)+xv(t.blue))}function Sv(t,e,n,r){return{red:t,green:e,blue:n,alpha:r}}function Cv(t){var e=parseInt(t,10);return e.toString()===t&&0<=e&&e<=255}function kv(t){var e,n,r,o=(t.hue||0)%360,i=t.saturation/100,a=t.value/100;i=Yv(0,Xv(i,1)),a=Yv(0,Xv(a,1));if(0===i)return Sv(e=n=r=Jv(255*a),n,r,1);var u=o/60,c=a*i,s=c*(1-Math.abs(u%2-1)),l=a-c;switch(Math.floor(u)){case 0:e=c,n=s,r=0;break;case 1:e=s,n=c,r=0;break;case 2:e=0,n=c,r=s;break;case 3:e=0,n=s,r=c;break;case 4:e=s,n=0,r=c;break;case 5:e=c,n=0,r=s;break;default:e=n=r=0}return Sv(e=Jv(255*(e+l)),n=Jv(255*(n+l)),r=Jv(255*(r+l)),1)}function Ev(t){var e,n,r=(e={value:t.value.replace(Kv,(function(t,e,n,r){return e+e+n+n+r+r}))},null===(n=qv.exec(e.value))?["FFFFFF","FF","FF","FF"]:n);return Sv(parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16),1)}function Mv(t,e,n,r){return Sv(parseInt(t,10),parseInt(e,10),parseInt(n,10),parseFloat(r))}function Tv(t){if("transparent"===t)return bt.some(Sv(0,0,0,0));var e=Qv.exec(t);if(null!==e)return bt.some(Mv(e[1],e[2],e[3],"1"));var n=Zv.exec(t);return null!==n?bt.some(Mv(n[1],n[2],n[3],n[4])):bt.none()}function Dv(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"}function Av(t,e){return t.fire("ResizeContent",e)}function Pv(t,e,n){return{hue:t,saturation:e,value:n}}function Rv(t){var e,n,r=0,o=t.red/255,i=t.green/255,a=t.blue/255,u=Math.min(o,Math.min(i,a)),c=Math.max(o,Math.max(i,a));return u===c?Pv(0,0,100*(r=u)):(n=60*((o===u?3:a===u?1:5)-(o===u?i-a:a===u?o-i:a-o)/(c-u)),e=(c-u)/c,r=c,Pv(Math.round(n),Math.round(100*e),Math.round(100*r)))}function Iv(t){return Ov(kv(t))}function zv(t){return(wv(n=t)?bt.some({value:(Dt(e=n,"#")?e.substring("#".length):e).toUpperCase()}):bt.none()).orThunk((function(){return Tv(t).map(Ov)})).getOrThunk((function(){var e=document.createElement("canvas");e.height=1,e.width=1;var n=e.getContext("2d");n.clearRect(0,0,e.width,e.height),n.fillStyle="#FFFFFF",n.fillStyle=t,n.fillRect(0,0,1,1);var r=n.getImageData(0,0,1,1).data;return Ov(Sv(r[0],r[1],r[2],r[3]))}));var e,n}function Lv(t){return ad.config({disabled:t,disableClass:"tox-tbtn--disabled"})}(sg=cg=cg||{}).default="wrap",sg.floating="floating",sg.sliding="sliding",sg.scrolling="scrolling",(fg=lg=lg||{}).auto="auto",fg.top="top",fg.bottom="bottom";var jv,Bv="silver.readonly",Fv=Xr([dr("readonly",to)]),Nv=function(t){return ad.config({disabled:t})},Hv=function(t){return ad.config({disabled:t,disableClass:"tox-tbtn--disabled",useNative:!1})},Vv=((jv={})[Di()]=["disabling","alloy.base.behaviour","toggling","item-events"],jv),Uv=st,Wv=tinymce.util.Tools.resolve("tinymce.Env"),$v=function(t,e){return L(t,(function(t){switch(t.type){case"cardcontainer":return i=$v((o=t).items,e),a="vertical"===o.direction?"tox-collection__item-container--column":xg,u="left"===o.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right",{dom:{tag:"div",classes:[wg,a,u,function(){switch(o.valign){case"top":return"tox-collection__item-container--valign-top";case"middle":return"tox-collection__item-container--valign-middle";case"bottom":return"tox-collection__item-container--valign-bottom"}}()]},components:i};case"cardimage":return r=t.src,{dom:{tag:"img",classes:t.classes,attributes:{src:r,alt:t.alt.getOr("")}}};case"cardtext":var n=t.name.exists((function(t){return xt(e.cardText.highlightOn,t)}))?bt.from(e.cardText.matchText).getOr(""):"";return dv(yv(t.text,n),t.classes)}var r,o,i,a,u}))},Gv=Zs(Np(),Hp()),Kv=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,qv=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Xv=Math.min,Yv=Math.max,Jv=Math.round,Qv=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,Zv=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,tb=Sv(255,0,0,1),eb=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),nb="tinymce-custom-colors";function rb(t){return!1!==t.getParam("custom_colors")}function ob(t){var e=t.getParam("color_map");return void 0!==e?function(t){for(var e=[],n=0;n<t.length;n+=2)e.push({text:t[n+1],value:"#"+zv(t[n]).value,type:"choiceitem"});return e}(e):_b}function ib(t){wb.add(t)}function ab(t){var e,n=(e=ob(t).length,Math.max(5,Math.ceil(Math.sqrt(e))));return t.getParam("color_cols",n,"number")}function ub(t){var e="choiceitem",n={type:e,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return t?[n,{type:e,text:"Custom color",icon:"color-picker",value:"custom"}]:[n]}function cb(t,e,n,r){"custom"===n?Ob(t)((function(n){n.each((function(n){ib(n),t.execCommand("mceApplyTextcolor",e,n),r(n)}))}),xb):"remove"===n?(r(""),t.execCommand("mceRemoveTextcolor",e)):(r(n),t.execCommand("mceApplyTextcolor",e,n))}function sb(t,e){return t.concat(L(wb.state(),(function(t){return{type:yb,text:t,value:t}})).concat(ub(e)))}function lb(t,e){return function(n){n(sb(t,e))}}function fb(t,e,n){t.setIconFill("forecolor"===e?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color",n)}function db(t,e,n,r,o){t.ui.registry.addSplitButton(e,{tooltip:r,presets:"color",icon:"forecolor"===e?"text-color":"highlight-bg-color",select:function(e){var r,o=n;return t.dom.getParents(t.selection.getStart(),(function(t){var e;(e=t.style["forecolor"===o?"color":"background-color"])&&(r=r||e)})),bt.from(r).bind((function(t){return Tv(t).map((function(t){var n=Ov(t).value;return dt(e.toLowerCase(),n)}))})).getOr(!1)},columns:ab(t),fetch:lb(ob(t),rb(t)),onAction:function(e){cb(t,n,o.get(),a)},onItemAction:function(r,i){cb(t,n,i,(function(n){o.set(n),t.fire("TextColorChange",{name:e,color:n})}))},onSetup:function(n){function r(t){t.name===e&&fb(n,t.name,t.color)}return fb(n,e,o.get()),t.on("TextColorChange",r),function(){t.off("TextColorChange",r)}}})}function mb(t,e,n,r){t.ui.registry.addNestedMenuItem(e,{text:r,icon:"forecolor"===e?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(e){cb(t,n,e.value,a)}}]}})}function pb(t,e,n,r,o,i,a,u){return Yh(t,Kh(e),Sb(e,n,r,"color"!==o?"normal":"color",i,a,u),r,o)}function hb(t,e){var n=Vh(e);return 1===t?{mode:"menu",moveOnTab:!0}:"auto"===t?{mode:"grid",selector:"."+n.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+("color"===e?"tox-swatches__row":"tox-collection__group")}}function gb(t,e){return ti(e+"x"+t)}var vb,bb,yb="choiceitem",_b=[{type:yb,text:"Light Green",value:"#BFEDD2"},{type:yb,text:"Light Yellow",value:"#FBEEB8"},{type:yb,text:"Light Red",value:"#F8CAC6"},{type:yb,text:"Light Purple",value:"#ECCAFA"},{type:yb,text:"Light Blue",value:"#C2E0F4"},{type:yb,text:"Green",value:"#2DC26B"},{type:yb,text:"Yellow",value:"#F1C40F"},{type:yb,text:"Red",value:"#E03E2D"},{type:yb,text:"Purple",value:"#B96AD9"},{type:yb,text:"Blue",value:"#3598DB"},{type:yb,text:"Dark Turquoise",value:"#169179"},{type:yb,text:"Orange",value:"#E67E23"},{type:yb,text:"Dark Red",value:"#BA372A"},{type:yb,text:"Dark Purple",value:"#843FA1"},{type:yb,text:"Dark Blue",value:"#236FA1"},{type:yb,text:"Light Gray",value:"#ECF0F1"},{type:yb,text:"Medium Gray",value:"#CED4D9"},{type:yb,text:"Gray",value:"#95A5A6"},{type:yb,text:"Dark Gray",value:"#7E8C8D"},{type:yb,text:"Navy Blue",value:"#34495E"},{type:yb,text:"Black",value:"#000000"},{type:yb,text:"White",value:"#ffffff"}],wb=function(t){function e(t){i.splice(t,1)}void 0===t&&(t=10);var n,r=eb.getItem(nb),o=f(r)?JSON.parse(r):[],i=t-(n=o).length<0?n.slice(0,t):n;return{add:function(n){var r;(-1===(r=P(i,n))?bt.none():bt.some(r)).each(e),i.unshift(n),i.length>t&&i.pop(),eb.setItem(nb,JSON.stringify(i))},state:function(){return i.slice(0)}}}(10),xb="#000000",Ob=function(t){return function(e,n){var r=!1;t.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{colorpicker:n},onAction:function(t,e){"hex-valid"===e.name&&(r=e.value)},onSubmit:function(n){var o=n.getData().colorpicker;r?(e(bt.from(o)),n.close()):t.windowManager.alert(t.translate(["Invalid hex color code: {0}",o]))},onClose:a,onCancel:function(){e(bt.none())}})}},Sb=function(t,e,n,r,o,i,u){return st(L(t,(function(c){return"choiceitem"===c.type?ar("choicemenuitem",Pg,c).fold(qh,(function(s){return bt.some(function(t,e,n,r,o,i,u,c){void 0===c&&(c=!0);var s=vv({presets:n,textContent:e?t.text:bt.none(),htmlContent:bt.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:e?t.shortcut:bt.none(),checkMark:e?bt.some(hv(u.icons)):bt.none(),caret:bt.none(),value:t.value},u,c);return $r(cv({data:sv(t),disabled:t.disabled,getApi:function(t){return{setActive:function(e){Rp.set(t,e)},isActive:function(){return Rp.isOn(t)},isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)}}},onAction:function(e){return r(t.value)},onSetup:function(t){return t.setActive(o),a},triggersSubmenu:!1,itemBehaviours:[]},s,i,u),{toggling:{toggleClass:gg,toggleOnExecute:!1,selected:t.active}})}(s,1===n,r,e,i(c.value),o,u,Kh(t)))})):bt.none()})))},Cb=Ro("cell-over"),kb=Ro("cell-execute"),Eb={inserttable:function(t){var e=Ro("size-label"),n=function(t){for(var e=[],n=0;n<10;n++){for(var r=[],o=0;o<10;o++)r.push(function(t,e,n){function r(n){return vo(n,kb,{row:t,col:e})}function o(t,e){e.stop(),r(t)}var i;return Oa({dom:{tag:"div",attributes:((i={role:"button"})["aria-labelledby"]=n,i)},behaviours:Yu([im("insert-table-picker-cell",[Oo(mi(),Dp.focus),Oo(Di(),r),Oo(_i(),o),Oo(Pi(),o)]),Rp.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Dp.config({onFocus:function(n){return vo(n,Cb,{row:t,col:e})}})])})}(n,o,t));e.push(r)}return e}(e),r=gb(0,0),o=Am({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:e}},components:[r],behaviours:Yu([Ep.config({})])});return{type:"widget",data:{value:Ro("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Gv.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:W(n,(function(t){return L(t,Sa)})).concat(o.asSpec()),behaviours:Yu([im("insert-table-picker",[Zi((function(t){Ep.set(o.get(t),[r])})),Eo(Cb,(function(t,e,r){var i=r.event,a=i.row,u=i.col;!function(t,e,n){for(var r=0;r<10;r++)for(var o=0;o<10;o++)Rp.set(t[r][o],r<=e&&o<=n)}(n,a,u),Ep.set(o.get(t),[gb(a+1,u+1)])})),Eo(kb,(function(e,n,r){var o=r.event,i=o.row,a=o.col;t.onAction({numRows:i+1,numColumns:a+1}),go(e,Ii())}))]),Cp.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function(t,e){var n,r,o,i=(r=e,o=(n=t).initData.allowCustomColors&&r.colorinput.hasCustomColors(),n.initData.colors.fold((function(){return sb(r.colorinput.getColors(),o)}),(function(t){return t.concat(ub(o))}))),a=e.colorinput.getColorCols(),u=pb(Ro("menu-value"),i,(function(e){t.onAction({value:e})}),a,"color",dg.CLOSE_ON_EXECUTE,O,e.shared.providers),c=k(k({},u),{markers:Vh("color"),movement:hb(a,"color")});return{type:"widget",data:{value:Ro("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Gv.widget(Gp.sketch(c))]}}},Mb=function(t){var e=t.text.fold((function(){return{}}),(function(t){return{innerHtml:t}}));return{type:"separator",dom:k({tag:"div",classes:[pg,"tox-collection__group-heading"]},e),components:[]}};function Tb(t,e,n,r,o){var i=Kh(e),u=st(L(e,(function(t){function e(t){return function(t,e,n,r,o){function i(t){return o?k(k({},t),{shortcut:bt.none(),icon:t.text.isSome()?bt.none():t.icon}):t}var u=n.shared.providers;switch(t.type){case"menuitem":return ar("menuitem",zg,t).fold(qh,(function(t){return bt.some(function(t,e,n,r){void 0===r&&(r=!0);var o=vv({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:bt.none(),ariaLabel:t.text,caret:bt.none(),checkMark:bt.none(),shortcutContent:t.shortcut},n,r);return cv({data:sv(t),getApi:function(t){return{isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)}}},disabled:t.disabled,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},o,e,n)}(i(t),e,u,r))}));case"nestedmenuitem":return ar("nestedmenuitem",Lg,t).fold(qh,(function(t){return bt.some(function(t,e,n,r,o){void 0===r&&(r=!0);var i=(o=void 0!==o&&o)?lv("chevron-down",n.icons,[yg]):lv("chevron-right",n.icons,[yg]),u=vv({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:bt.none(),ariaLabel:t.text,caret:bt.some(i),checkMark:bt.none(),shortcutContent:t.shortcut},n,r);return cv({data:sv(t),getApi:function(t){return{isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)}}},disabled:t.disabled,onAction:a,onSetup:t.onSetup,triggersSubmenu:!0,itemBehaviours:[]},u,e,n)}(i(t),e,u,r,o))}));case"togglemenuitem":return ar("togglemenuitem",jg,t).fold(qh,(function(t){return bt.some(function(t,e,n,r){void 0===r&&(r=!0);var o=vv({iconContent:t.icon,textContent:t.text,htmlContent:bt.none(),ariaLabel:t.text,checkMark:bt.some(hv(n.icons)),caret:bt.none(),shortcutContent:t.shortcut,presets:"normal",meta:t.meta},n,r);return $r(cv({data:sv(t),disabled:t.disabled,getApi:function(t){return{setActive:function(e){Rp.set(t,e)},isActive:function(){return Rp.isOn(t)},isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},o,e,n),{toggling:{toggleClass:gg,toggleOnExecute:!1,selected:t.active}})}(i(t),e,u,r))}));case"separator":return ar("separatormenuitem",Ch,t).fold(qh,(function(t){return bt.some(Mb(t))}));case"fancymenuitem":return ar("fancymenuitem",Ig,t).fold(qh,(function(t){return function(t,e){return at(Eb,t.fancytype).map((function(n){return n(t,e)}))}(i(t),n)}));default:return bt.none()}}(t,n,r,o?!Mt(t,"text"):i,o)}return"nestedmenuitem"===t.type&&t.getSubmenuItems().length<=0?e(k(k({},t),{disabled:!0})):e(t)})));return(o?Xh:Yh)(t,i,u,1,"normal")}function Db(t){return Yp.singleData(t.value,t)}function Ab(t,e,n){return Aa(t,e,n).isSome()}function Pb(t,e){var n=null;return{cancel:function(){null!==n&&(clearTimeout(n),n=null)},schedule:function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n=setTimeout((function(){t.apply(null,r),n=null}),e)}}}function Rb(t){var e=t.raw;return void 0===e.touches||1!==e.touches.length?bt.none():bt.some(e.touches[0])}function Ib(){return fn().browser.isFirefox()}function zb(t,e){return zr(at(t,"target").getOr(e))}function Lb(t,e,n,r,o,i){var a,u,c=t(e,r),s=(a=zr(!1),u=zr(!1),{stop:function(){a.set(!0)},cut:function(){u.set(!0)},isStopped:a.get,isCut:u.get,event:n,setSource:o.set,getSource:o.get});return c.fold((function(){return i.logEventNoHandlers(e,r),Ub.complete()}),(function(t){var n=t.descHandler;return Ho(n)(s),s.isStopped()?(i.logEventStopped(e,t.element,n.purpose),Ub.stopped()):s.isCut()?(i.logEventCut(e,t.element,n.purpose),Ub.complete()):qt(t.element).fold((function(){return i.logNoParent(e,t.element,n.purpose),Ub.complete()}),(function(r){return i.logEventResponse(e,t.element,n.purpose),Ub.resume(r)}))}))}function jb(t){function e(e){return qt(t.element).fold(S,(function(t){return Vt(e,t)}))}function n(t,n){return o.find(e,t,n)}function r(t){var e=o.filter(Ti());Ot(e,(function(e){Ho(e.descHandler)(t)}))}var o=function(){function t(t){Io(t.element).each((function(t){delete r[t],n.unregisterId(t)}))}var e,n=(e={},{registerId:function(t,n,r){et(r,(function(r,o){var i,a=void 0!==e[o]?e[o]:{};a[n]={cHandler:_.apply(void 0,[(i=r).handler].concat(t)),purpose:i.purpose},e[o]=a}))},unregisterId:function(t){et(e,(function(e,n){Mt(e,t)&&delete e[t]}))},filterByType:function(t){return at(e,t).map((function(t){return rt(t,(function(t,e){return{id:e,descHandler:t}}))})).getOr([])},find:function(t,n,r){return at(e,n).bind((function(e){return fo(r,(function(t){return n=e,Io(r=t).bind((function(t){return at(n,t)})).map((function(t){return{element:r,descHandler:t}}));var n,r}),t)}))}}),r={};return{find:function(t,e,r){return n.find(t,e,r)},filter:function(t){return n.filterByType(t)},register:function(e){var o,i=Io((o=e).element).getOrThunk((function(){return t=o.element,e=Ro(ca+"uid-"),la(t,e),e;var t,e}));ut(r,i)&&function(e){var n=r[i];if(n!==e)throw new Error('The tagId "'+i+'" is already used by: '+Po(n.element)+"\nCannot use it for: "+Po(e.element)+"\nThe conflicting element is"+(bn(n.element)?" ":" not ")+"already in the DOM");t(e)}(e),n.registerId([e],i,e.events),r[i]=e},unregister:t,getById:function(t){return at(r,t)}}}(),i=function(t,e){var n,r,o,i,a,u,c,s,l,f=k({stopBackspace:!0},e),d=(a=f,u=cc(),c=zr(!1),s=Pb((function(t){a.triggerEvent(Ri(),t),c.set(!0)}),400),l=co([{key:ii(),value:function(t){return Rb(t).each((function(e){s.cancel();var n={x:e.clientX,y:e.clientY,target:t.target};s.schedule(t),c.set(!1),u.set(n)})),bt.none()}},{key:ai(),value:function(t){return s.cancel(),Rb(t).each((function(t){u.on((function(e){var n=t,r=e,o=Math.abs(n.clientX-r.x),i=Math.abs(n.clientY-r.y);(5<o||5<i)&&u.clear()}))})),bt.none()}},{key:ui(),value:function(t){return s.cancel(),u.get().filter((function(e){return Vt(e.target,t.target)})).map((function(e){return c.get()?(t.prevent(),!1):a.triggerEvent(Pi(),t)}))}}]),{fireIfReady:function(t,e){return at(l,e).bind((function(e){return e(t)}))}}),m=L(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),(function(e){return sc(t,e,(function(t){d.fireIfReady(t,e).each((function(e){e&&t.kill()})),f.triggerEvent(e,t)&&t.kill()}))})),p=cc(),h=sc(t,"paste",(function(t){d.fireIfReady(t,"paste").each((function(e){e&&t.kill()})),f.triggerEvent("paste",t)&&t.kill(),p.set(setTimeout((function(){f.triggerEvent(Mi(),t)}),0))})),g=sc(t,"keydown",(function(t){var e;f.triggerEvent("keydown",t)?t.kill():!f.stopBackspace||(e=t).raw.which!==sd[0]||xt(["input","textarea"],It(e.target))||Ab(e.target,'[contenteditable="true"]')||t.prevent()})),v=(n=t,r=function(t){f.triggerEvent("focusin",t)&&t.kill()},Ib()?lc(n,"focus",r):sc(n,"focusin",r)),b=cc(),y=(o=t,i=function(t){f.triggerEvent("focusout",t)&&t.kill(),b.set(setTimeout((function(){f.triggerEvent(Ei(),t)}),0))},Ib()?lc(o,"blur",i):sc(o,"focusout",i));return{unbind:function(){Ot(m,(function(t){t.unbind()})),g.unbind(),v.unbind(),y.unbind(),h.unbind(),p.on(clearTimeout),b.on(clearTimeout)}}}(t.element,{triggerEvent:function(t,e){return La(t,e.target,(function(r){return $b(n,t,e,e.target,r)}))}}),u={debugInfo:c("real"),triggerEvent:function(t,e,r){La(t,e,(function(o){return $b(n,t,r,e,o)}))},triggerFocus:function(t,e){Io(t).fold((function(){bu(t)}),(function(r){La(ki(),t,(function(r){var o,i,u=n,c=ki(),s=r,l=zb(o={originator:e,kill:a,prevent:a,target:t},i=t);return Lb(u,c,o,i,l,s),!1}))}))},triggerEscape:function(t,e){u.triggerEvent("keydown",t.element,e.event)},getByUid:function(t){return g(t)},getByDom:function(t){return v(t)},build:Oa,addToGui:function(t){f(t)},removeFromGui:function(t){d(t)},addToWorld:function(t){s(t)},removeFromWorld:function(t){l(t)},broadcast:function(t){m(t)},broadcastOn:function(t,e){p(t,e)},broadcastEvent:function(t,e){h(t,e)},isConnected:S},s=function(t){t.connect(u),Ke(t.element)||(o.register(t),Ot(t.components(),s),u.triggerEvent(Li(),t.element,{target:t.element}))},l=function(t){Ke(t.element)||(Ot(t.components(),l),o.unregister(t)),t.disconnect()},f=function(e){Ms(t,e)},d=function(t){Ds(t)},m=function(t){r({universal:!0,data:t})},p=function(t,e){r({universal:!1,channels:t,data:e})},h=function(t,e){var n,r,i=o.filter(t);return r={stop:function(){n.set(!0)},cut:a,isStopped:(n=zr(!1)).get,isCut:O,event:e,setSource:x("Cannot set source of a broadcasted event"),getSource:x("Cannot get source of a broadcasted event")},Ot(i,(function(t){Ho(t.descHandler)(r)})),r.isStopped()},g=function(t){return o.getById(t).fold((function(){return jn.error(new Error('Could not find component with uid: "'+t+'" in system.'))}),jn.value)},v=function(t){var e=Io(t).getOr("not found");return g(e)};return s(t),{root:t,element:t.element,destroy:function(){i.unbind(),Tn(t.element)},add:f,remove:d,getByUid:g,getByDom:v,addToWorld:s,removeFromWorld:l,broadcast:m,broadcastOn:p,broadcastEvent:h}}function Bb(t,e,n,r){var o=Zb(t,e,n,r);return Xb.sketch(o)}function Fb(t,e){return Xb.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}})}function Nb(t){return Yu([Dp.config({onFocus:t.selectOnFocus?function(t){var e=t.element,n=Yo(e);e.dom.setSelectionRange(0,n.length)}:a})])}function Hb(t){return{tag:t.tag,attributes:k({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}}function Vb(t,e){function n(){return u.get().isSome()}function r(){n()&&Jp.hide(f)}var o,i,u=cc(),l=zr(!1),f=Oa(Jp.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:Yu([im("dismissAutocompleter",[Oo(Ui(),(function(){return d()}))])]),lazySink:e.getSink})),d=function(){var e;n()&&(e=u.get().map((function(t){return t.element})),wh(e.getOr(Rt.fromDom(t.selection.getNode()))).each(Ie),r(),u.clear(),l.set(!1))},m=Lt((function(){return e=rt(r=nt(t.ui.registry.getAll().popups,(function(t){return ar("Autocompleter",Eh,t).fold((function(t){throw new Error(oo(t))}),s)})),(function(t){return t.ch})),n={},Ot(e,(function(t){n[t]={}})),o=Ct(n),i=it(r),{dataset:r,triggerChars:o,lookupByChar:function(t){return B(i,(function(e){return e.ch===t}))}};var e,n,r,o,i})),p=function(o){var i=o;u.get().map((function(e){return mh(t.dom,t.selection.getRng(),e.triggerChar).bind((function(e){return vh(t,m,e,i)}))})).getOrThunk((function(){return e=t,r=(n=m)(),o=e.selection.getRng(),i=e.dom,a=o,tt(r.triggerChars,(function(t){return mh(i,a,t)})).bind((function(t){return vh(e,n,t)}));var e,n,r,o,i,a})).fold(d,(function(o){var i,s=o.context;n()||(i=function(t,e){return wh(Rt.fromDom(t.selection.getNode())).getOrThunk((function(){var n,r,o=Rt.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',t.getDoc());return Mn(o,Rt.fromDom(e.extractContents())),e.insertNode(o.dom),qt(o).each((function(t){return t.dom.normalize()})),n=cs,(r=function(t){for(var e=Yt(t),o=e.length-1;0<=o;o--){var i=e[o];if(n(i))return bt.some(i);var a=r(i);if(a.isSome())return a}return bt.none()})(o).map((function(e){var n;t.selection.setCursorLocation(e.dom,"img"===It(n=e)?1:us(n).fold((function(){return Yt(n).length}),(function(t){return t.length})))})),o}))}(t,s.range),u.set({triggerChar:s.triggerChar,element:i,matchLength:s.text.length}),l.set(!1)),o.lookupData.then((function(n){u.get().map((function(i){var u,s,m,h,g=o.context;i.triggerChar===g.triggerChar&&(s=g.triggerChar,h=tt(m=n,(function(t){return bt.from(t.columns)})).getOr(1),0<(u=W(m,(function(n){return function(t,e,n,r,o,i,u){var s=1===r,l=!s||Kh(t);return st(L(t,(function(t){switch(t.type){case"separator":return ar("Autocompleter.Separator",Ch,t).fold(qh,(function(t){return bt.some(Mb(t))}));case"cardmenuitem":return ar("cardmenuitem",Ag,t).fold(qh,(function(t){return bt.some((r=k(k({},t),{onAction:function(e){t.onAction(e),n(t.value,t.meta)}}),a=o,c=i,s={itemBehaviours:bv(t.meta,i),cardText:{matchText:e,highlightOn:u}},l={dom:gv(r.label),optComponents:[bt.some({dom:{tag:"div",classes:[wg,xg]},components:$v(r.items,s)})]},cv({data:sv(k({text:bt.none()},r)),disabled:r.disabled,getApi:function(t){return{isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){ad.set(t,e),Ot(ss(t.element,"*"),(function(n){t.getSystem().getByDom(n).each((function(t){t.hasConfigured(ad)&&ad.set(t,e)}))}))}}},onAction:r.onAction,onSetup:r.onSetup,triggersSubmenu:!1,itemBehaviours:bt.from(s.itemBehaviours).getOr([])},l,a,c.providers)));var r,a,c,s,l}));default:return ar("Autocompleter.Item",kh,t).fold(qh,(function(t){return bt.some(function(t,e,n,r,o,i,u,s){void 0===s&&(s=!0);var l=vv({presets:"normal",textContent:bt.none(),htmlContent:n?t.text.map((function(t){return yv(t,e)})):bt.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:bt.none(),checkMark:bt.none(),caret:bt.none(),value:t.value},u.providers,s,t.icon);return cv({data:sv(t),disabled:t.disabled,getApi:c({}),onAction:function(e){return o(t.value,t.meta)},onSetup:c(a),triggersSubmenu:!1,itemBehaviours:bv(t.meta,u)},l,i,u.providers)}(t,e,s,0,n,o,i,l))}))}})))}(n.items,n.matchText,(function(e,o){var i=t.selection.getRng();mh(t.dom,i,s).fold((function(){}),(function(t){var i=t.range,a={hide:function(){d()},reload:function(t){r(),p(t)}};l.set(!0),n.onAction(a,i,e,o),l.set(!1)}))}),h,dg.BUBBLE_TO_SANDBOX,e,n.highlightOn)}))).length?function(e,n,r,o){e.matchLength=n.text.length;var i,a,u,c,s,l,d=tt(r,(function(t){return bt.from(t.columns)})).getOr(1);Jp.showAt(f,Gp.sketch((i=Yh("autocompleter-value",!0,o,d,"normal"),a=d,c=((u=vb.ContentFocus)===vb.ContentFocus?zl:Il)(),s=hb(a,"normal"),l=Vh("normal"),{dom:i.dom,components:i.components,items:i.items,value:i.value,markers:{selectedItem:l.selectedItem,item:l.item},movement:s,fakeFocus:u===vb.ContentFocus,focusManager:c,menuBehaviours:Bg("auto"!==a?[]:[Zi((function(t,e){Jh(t,4,l.item).each((function(e){var n=e.numColumns,r=e.numRows;Cp.setGridSize(t,r,n)}))}))])})),{anchor:{type:"node",root:Rt.fromDom(t.getBody()),node:bt.from(e.element)}}),Jp.getContent(f).each(cd.highlightFirst)}(i,g,n,u):(10<=g.text.length-i.matchLength?d:r)())}))}))}))},h={onKeypress:ch((function(t){27!==t.which&&p()}),50),cancelIfNecessary:d,isMenuOpen:function(){return Jp.isOpen(f)},isActive:n,isProcessingAction:l.get,getView:function(){return Jp.getContent(f)}};function g(t,e){vo(t,gi(),{raw:e})}!1===t.hasPlugin("rtc")&&(o=h,(i=t).on("keypress compositionend",o.onKeypress.throttle),i.on("remove",o.onKeypress.cancel),i.on("keydown",(function(t){function e(){return o.getView().bind(cd.getHighlighted)}8===t.which&&o.onKeypress.throttle(t),o.isActive()&&(27===t.which&&o.cancelIfNecessary(),o.isMenuOpen()?13===t.which?(e().each(bo),t.preventDefault()):40===t.which?(e().fold((function(){o.getView().each(cd.highlightFirst)}),(function(e){g(e,t)})),t.preventDefault(),t.stopImmediatePropagation()):37!==t.which&&38!==t.which&&39!==t.which||e().each((function(e){g(e,t),t.preventDefault(),t.stopImmediatePropagation()})):13!==t.which&&38!==t.which&&40!==t.which||o.cancelIfNecessary())})),i.on("NodeChange",(function(t){o.isActive()&&!o.isProcessingAction()&&wh(Rt.fromDom(t.element)).isNone()&&o.cancelIfNecessary()})))}(bb=vb={})[bb.ContentFocus=0]="ContentFocus",bb[bb.UiFocus=1]="UiFocus";var Ub=Lr([{stopped:[]},{resume:["element"]},{complete:[]}]),Wb=function(t,e,n,r,o,i){return Lb(t,e,n,r,o,i).fold(S,(function(r){return Wb(t,e,n,r,o,i)}),O)},$b=function(t,e,n,r,o){var i=zb(n,r);return Wb(t,e,n,r,i,o)},Gb=hl({name:"Container",factory:function(t){var e=t.dom,n=e.attributes,r=E(e,["attributes"]);return{uid:t.uid,dom:k({tag:"div",attributes:k({role:"presentation"},n)},r),components:t.components,behaviours:Gs(t.containerBehaviours),events:t.events,domModification:t.domModification,eventOrder:t.eventOrder}},configFields:[kr("components",[]),$s("containerBehaviours",[]),kr("events",{}),kr("domModification",{}),kr("eventOrder",{})]}),Kb=c([kr("prefix","form-field"),$s("fieldBehaviours",[td,wf])]),qb=c([Wf({schema:[fr("dom")],name:"label"}),Wf({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[fr("text")],name:"aria-descriptor"}),Vf({factory:{sketch:function(t){var e,n,r=(e=["factory"],n={},et(t,(function(t,r){xt(e,r)||(n[r]=t)})),n);return t.factory.sketch(r)}},schema:[fr("factory")],name:"field"})]),Xb=gl({name:"FormField",configFields:Kb(),partFields:qb(),factory:function(t,e,n,r){var o=Ks(t.fieldBehaviours,[td.config({find:function(e){return il(e,t,"field")}}),wf.config({store:{mode:"manual",getValue:function(t){return td.getCurrent(t).bind(wf.getValue)},setValue:function(t,e){td.getCurrent(t).each((function(t){wf.setValue(t,e)}))}}})]),i=Qi([Zi((function(e,n){var r=ul(e,t,["label","field","aria-descriptor"]);r.field().each((function(e){var n=Ro(t.prefix);r.label().each((function(t){oe(t.element,"for",n),oe(e.element,"id",n)})),r["aria-descriptor"]().each((function(n){var r=Ro(t.prefix);oe(n.element,"id",r),oe(e.element,"aria-describedby",r)}))}))}))]);return{uid:t.uid,dom:t.dom,components:e,behaviours:o,events:i,apis:{getField:function(e){return il(e,t,"field")},getLabel:function(e){return il(e,t,"label")}}}},apis:{getField:function(t,e){return t.getField(e)},getLabel:function(t,e){return t.getLabel(e)}}}),Yb=Object.freeze({__proto__:null,exhibit:function(t,e){return No({attributes:co([{key:e.tabAttr,value:"true"}])})}}),Jb=hu({fields:[kr("tabAttr","data-alloy-tabstop")],name:"tabstopping",active:Yb}),Qb=tinymce.util.Tools.resolve("tinymce.html.Entities"),Zb=function(t,e,n,r){return{dom:ty(n),components:t.toArray().concat([e]),fieldBehaviours:Yu(r)}},ty=function(t){return{tag:"div",classes:["tox-form__group"].concat(t)}},ey=Ro("form-component-change"),ny=Ro("form-close"),ry=Ro("form-cancel"),oy=Ro("form-action"),iy=Ro("form-submit"),ay=Ro("form-block"),uy=Ro("form-unblock"),cy=Ro("form-tabchange"),sy=Ro("form-resize"),ly=c([yr("data"),kr("inputAttributes",{}),kr("inputStyles",{}),kr("tag","input"),kr("inputClasses",[]),$a("onSetValue"),kr("styles",{}),kr("eventOrder",{}),$s("inputBehaviours",[wf,Dp]),kr("selectOnFocus",!0)]),fy=hl({name:"Input",configFields:ly(),factory:function(t,e){return{uid:t.uid,dom:Hb(t),components:[],behaviours:k(k({},Nb(n=t)),Ks(n.inputBehaviours,[wf.config({store:k(k({mode:"manual"},n.data.map((function(t){return{initialValue:t}})).getOr({})),{getValue:function(t){return Yo(t.element)},setValue:function(t,e){Yo(t.element)!==e&&Jo(t.element,e)}}),onSetValue:n.onSetValue})])),eventOrder:t.eventOrder};var n}}),dy={},my={exports:dy};function py(t){setTimeout((function(){throw t}),0)}function hy(t){var e=It(t);return xt(My,e)}function gy(t,e){Go(e.getRoot(t).getOr(t.element),e.invalidClass),e.notify.each((function(e){hy(t.element)&&oe(t.element,"aria-invalid",!1),e.getContainer(t).each((function(t){Ao(t,e.validHtml)})),e.onValid(t)}))}function vy(t,e,n,r){$o(e.getRoot(t).getOr(t.element),e.invalidClass),e.notify.each((function(e){hy(t.element)&&oe(t.element,"aria-invalid",!0),e.getContainer(t).each((function(t){Ao(t,r)})),e.onInvalid(t,r)}))}function by(t,e,n){return e.validator.fold((function(){return Ey(jn.value(!0))}),(function(e){return e.validate(t)}))}function yy(t,e,n){return e.notify.each((function(e){e.onValidate(t)})),by(t,e).map((function(n){return t.getSystem().isConnected()?n.fold((function(n){return vy(t,e,0,n),jn.error(n)}),(function(n){return gy(t,e),jn.value(n)})):jn.error("No longer in system")}))}!function(){var e=this,n=function(){var e,n,r,o={exports:{}};function i(){}function a(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],d(t,this)}function u(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,a._immediateFn((function(){var n,r=1===t._state?e.onFulfilled:e.onRejected;if(null!==r){try{n=r(t._value)}catch(n){return void s(e.promise,n)}c(e.promise,n)}else(1===t._state?c:s)(e.promise,t._value)}))):t._deferreds.push(e)}function c(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof a)return t._state=3,t._value=e,void l(t);if("function"==typeof n)return void d((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,l(t)}catch(e){s(t,e)}var r,o}function s(t,e){t._state=2,t._value=e,l(t)}function l(t){2===t._state&&0===t._deferreds.length&&a._immediateFn((function(){t._handled||a._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)u(t,t._deferreds[e]);t._deferreds=null}function f(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function d(t,e){var n=!1;try{t((function(t){n||(n=!0,c(e,t))}),(function(t){n||(n=!0,s(e,t))}))}catch(t){if(n)return;n=!0,s(e,t)}}e=o,n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},r=setTimeout,a.prototype.catch=function(t){return this.then(null,t)},a.prototype.then=function(t,e){var n=new this.constructor(i);return u(this,new f(t,e,n)),n},a.all=function(t){var e=Array.prototype.slice.call(t);return new a((function(t,n){if(0===e.length)return t([]);for(var r=e.length,o=0;o<e.length;o++)!function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return u.call(a,(function(t){o(i,t)}),n),0}e[i]=a,0==--r&&t(e)}catch(a){n(a)}}(o,e[o])}))},a.resolve=function(t){return t&&"object"==typeof t&&t.constructor===a?t:new a((function(e){e(t)}))},a.reject=function(t){return new a((function(e,n){n(t)}))},a.race=function(t){return new a((function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)}))},a._immediateFn="function"==typeof setImmediate?function(t){setImmediate(t)}:function(t){r(t,0)},a._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console},a._setImmediateFn=function(t){a._immediateFn=t},a._setUnhandledRejectionFn=function(t){a._unhandledRejectionFn=t},e.exports?e.exports=a:n.Promise||(n.Promise=a);var m=o.exports;return{boltExport:("undefined"!=typeof window?window:Function("return this;")()).Promise||m}};"object"==typeof dy&&void 0!==my?my.exports=n():(e="undefined"!=typeof globalThis?globalThis:e||self).EphoxContactWrapper=n()}();var _y,wy,xy=my.exports.boltExport,Oy=function(t){function e(t){o()?i(t):r.push(t)}var n=bt.none(),r=[],o=function(){return n.isSome()},i=function(t){n.each((function(e){setTimeout((function(){t(e)}),0)}))};return t((function(t){o()||(n=bt.some(t),Ot(r,i),r=[])})),{get:e,map:function(t){return Oy((function(n){e((function(e){n(t(e))}))}))},isReady:o}},Sy={nu:Oy,pure:function(t){return Oy((function(e){e(t)}))}},Cy=function(t){function e(e){t().then(e,py)}return{map:function(e){return Cy((function(){return t().then(e)}))},bind:function(e){return Cy((function(){return t().then((function(t){return e(t).toPromise()}))}))},anonBind:function(e){return Cy((function(){return t().then((function(){return e.toPromise()}))}))},toLazy:function(){return Sy.nu(e)},toCached:function(){var e=null;return Cy((function(){return e=null===e?t():e}))},toPromise:t,get:e}},ky=function(t){return Cy((function(){return new xy(t)}))},Ey=function(t){return Cy((function(){return xy.resolve(t)}))},My=["input","textarea"],Ty=Object.freeze({__proto__:null,markValid:gy,markInvalid:vy,query:by,run:yy,isInvalid:function(t,e){return Ko(e.getRoot(t).getOr(t.element),e.invalidClass)}}),Dy=Object.freeze({__proto__:null,events:function(t,e){return t.validator.map((function(e){return Qi([Oo(e.onEvent,(function(e){yy(e,t).get(s)}))].concat(e.validateOnLoad?[Zi((function(e){yy(e,t).get(a)}))]:[]))})).getOr({})}}),Ay=hu({fields:[fr("invalidClass"),kr("getRoot",bt.none),Cr("notify",[kr("aria","alert"),kr("getContainer",bt.none),kr("validHtml",""),$a("onValid"),$a("onInvalid"),$a("onValidate")]),Cr("validator",[fr("validate"),kr("onEvent","input"),kr("validateOnLoad",!0)])],name:"invalidating",active:Dy,apis:Ty,extra:{validation:function(t){return function(e){var n=wf.getValue(e);return Ey(t(n))}}}}),Py=Object.freeze({__proto__:null,getCoupled:function(t,e,n,r){return n.getOrCreate(t,e,r)}}),Ry=hu({fields:[dr("others",ir(jn.value,Jr()))],name:"coupling",apis:Py,state:Object.freeze({__proto__:null,init:function(){var t={},e=c({});return va({readState:e,getOrCreate:function(e,n,r){var o=Ct(n.others);if(o)return at(t,r).getOrThunk((function(){var o=at(n.others,r).getOrDie("No information found for coupled component: "+r)(e),i=e.getSystem().build(o);return t[r]=i}));throw new Error("Cannot find coupled component: "+r+". Known coupled components: "+JSON.stringify(o,null,2))}})}})}),Iy=c("sink"),zy=c(Wf({name:Iy(),overrides:c({dom:{tag:"div"},behaviours:Yu([nf.config({useFixed:S})]),events:Qi([Mo(gi()),Mo(si()),Mo(_i())])})}));function Ly(t,e){var n=t.getHotspot(e).getOr(e),r=t.getAnchorOverrides();return t.layouts.fold((function(){return{type:"hotspot",hotspot:n,overrides:r}}),(function(t){return{type:"hotspot",hotspot:n,overrides:r,layouts:t}}))}function jy(t,e,n,r,o,i,a){var u,c=Ly(t,n),s=n,l=r,f=o,d=a,m=e,p=(0,(u=t).fetch)(s).map(m),h=Ww(s,u);return p.map((function(t){return t.bind((function(t){return bt.from(Yp.sketch(k(k({},f.menu()),{uid:fa(""),data:t,highlightImmediately:d===_y.HighlightFirst,onOpenMenu:function(t,e){var n=h().getOrDie();nf.position(n,e,{anchor:c}),lf.decloak(l)},onOpenSubmenu:function(t,e,n){var r=h().getOrDie();nf.position(r,n,{anchor:{type:"submenu",item:e}}),lf.decloak(l)},onRepositionMenu:function(t,e,n){var r=h().getOrDie();nf.position(r,e,{anchor:c}),Ot(n,(function(t){nf.position(r,t.triggeredMenu,{anchor:{type:"submenu",item:t.triggeringItem}})}))},onEscape:function(){return Dp.focus(s),lf.close(l),bt.some(!0)}})))}))})).map((function(t){return t.fold((function(){lf.isOpen(r)&&lf.close(r)}),(function(t){lf.cloak(r),lf.open(r,t),i(r)})),r}))}function By(t,e,n,r,o,i){var a=Ry.getCoupled(n,"sandbox");return(lf.isOpen(a)?function(t,e,n,r,o,i,a){return lf.close(r),Ey(r)}:jy)(t,e,n,a,r,o,i)}function Fy(t){lf.getState(t).each((function(t){Yp.repositionMenus(t)}))}function Ny(t,e,n){var r=Pa(),o=Ww(e,t);return{dom:{tag:"div",classes:t.sandboxClasses,attributes:{id:r.id,role:"listbox"}},behaviours:Of(t.sandboxBehaviours,[wf.config({store:{mode:"memory",initialValue:e}}),lf.config({onOpen:function(o,i){var a,u,c,s,l,f,d=Ly(t,e);r.link(e.element),t.matchWidth&&(a=d.hotspot,u=i,c=t.useMinWidth,l=td.getCurrent(u).getOr(u),f=Ce(a.element),c?de(l.element,"min-width",f+"px"):(s=l.element,kn.set(s,f))),t.onOpen(d,o,i),void 0!==n&&void 0!==n.onOpen&&n.onOpen(o,i)},onClose:function(t,o){r.unlink(e.element),void 0!==n&&void 0!==n.onClose&&n.onClose(t,o)},isPartOf:function(t,n,r){return za(n,r)||za(e,r)},getAttachPoint:function(){return o().getOrDie()}}),td.config({find:function(t){return lf.getState(t).bind((function(t){return td.getCurrent(t)}))}}),tc.config({channels:k(k({},Bs({isExtraPart:O})),Fs({doReposition:Fy}))})])}}function Hy(t){Fy(Ry.getCoupled(t,"sandbox"))}function Vy(){return[kr("sandboxClasses",[]),xf("sandboxBehaviours",[td,tc,lf,wf])]}function Uy(t){return Wf({name:t+"-edge",overrides:function(e){return e.model.manager.edgeActions[t].fold((function(){return{}}),(function(t){return{events:Qi([So(ii(),(function(e,n,r){return t(e,r)}),[e]),So(si(),(function(e,n,r){return t(e,r)}),[e]),So(li(),(function(e,n,r){r.mouseIsDown.get()&&t(e,r)}),[e])])}}))}})}function Wy(t){var e=t.event.raw;return-1===e.type.indexOf("touch")?void 0!==e.clientX?bt.some(e).map((function(t){return Sn(t.clientX,t.clientY)})):bt.none():void 0!==e.touches&&1===e.touches.length?bt.some(e.touches[0]).map((function(t){return Sn(t.clientX,t.clientY)})):bt.none()}function $y(t){return t.model.minX}function Gy(t){return t.model.minY}function Ky(t){return t.model.minX-1}function qy(t){return t.model.minY-1}function Xy(t){return t.model.maxX}function Yy(t){return t.model.maxY}function Jy(t){return t.model.maxX+1}function Qy(t){return t.model.maxY+1}function Zy(t,e,n){return e(t)-n(t)}function t_(t){return Zy(t,Xy,$y)}function e_(t){return Zy(t,Yy,Gy)}function n_(t){return t_(t)/2}function r_(t){return e_(t)/2}function o_(t){return t.stepSize}function i_(t){return t.snapToGrid}function a_(t){return t.snapStart}function u_(t){return t.rounded}function c_(t,e){return void 0!==t[e+"-edge"]}function s_(t){return c_(t,"left")}function l_(t){return c_(t,"right")}function f_(t){return c_(t,"top")}function d_(t){return c_(t,"bottom")}function m_(t){return t.model.value.get()}function p_(t,e){return{x:t,y:e}}function h_(t,e){vo(t,ux(),{value:e})}function g_(t,e,n,r){return t<e?t:n<t?n:t===e?e-1:Math.max(e,t-r)}function v_(t,e,n,r){return n<t?t:t<e?e:t===n?n+1:Math.min(n,t+r)}function b_(t,e,n){return Math.max(e,Math.min(n,t))}function y_(t){var e=t.min,n=t.max,r=t.range,o=t.value,i=t.step,a=t.snap,u=t.snapStart,c=t.rounded,s=t.hasMinEdge,l=t.hasMaxEdge,f=t.minBound,d=t.maxBound,m=t.screenRange,p=s?e-1:e,h=l?n+1:n;if(o<f)return p;if(d<o)return h;var g,v,b,y,_,w=b_((_=f,(Math.min(d,Math.max(o,_))-_)/m*r+e),p,h);return a&&e<=w&&w<=n?(g=w,v=e,b=n,y=i,u.fold((function(){var t=Math.round((g-v)/y)*y;return b_(v+t,v-1,b+1)}),(function(t){var e=Math.round((g-t)%y/y),n=Math.floor((g-t)/y),r=Math.floor((b-t)/y),o=Math.min(r,n+e);return Math.max(t,t+o*y)}))):c?Math.round(w):w}function __(t){var e=t.min,n=t.max,r=t.range,o=t.value,i=t.hasMinEdge,a=t.hasMaxEdge,u=t.maxBound,c=t.maxOffset,s=t.centerMinEdge,l=t.centerMaxEdge;return o<e?i?0:s:n<o?a?u:l:(o-e)/r*c}function w_(t){return t.element.dom.getBoundingClientRect()}function x_(t){return w_(t)[cx]}function O_(t){return w_(t).right}function S_(t){return w_(t).top}function C_(t){return w_(t).bottom}function k_(t){return w_(t).width}function E_(t){return w_(t).height}function M_(t,e){var n=w_(t),r=w_(e);return(n[cx]+n.right)/2-r[cx]}function T_(t,e){var n=w_(t),r=w_(e);return(n.top+n.bottom)/2-r.top}function D_(t,e){vo(t,ux(),{value:e})}function A_(t,e,n){return y_({min:$y(e),max:Xy(e),range:t_(e),value:n,step:o_(e),snap:i_(e),snapStart:a_(e),rounded:u_(e),hasMinEdge:s_(e),hasMaxEdge:l_(e),minBound:x_(t),maxBound:O_(t),screenRange:k_(t)})}function P_(t){return function(e,n){return D_(e,{x:o=(0<t?v_:g_)(m_(r=n).x,$y(r),Xy(r),o_(r))}),bt.some(o).map(S);var r,o}}function R_(t,e,n,r,o,i){var a,u,c,s,l,f,d,m,p=(u=i,c=n,s=r,l=o,f=k_(a=e),d=s.bind((function(t){return bt.some(M_(t,a))})).getOr(0),m=l.bind((function(t){return bt.some(M_(t,a))})).getOr(f),__({min:$y(u),max:Xy(u),range:t_(u),value:c,hasMinEdge:s_(u),hasMaxEdge:l_(u),minBound:x_(a),minOffset:0,maxBound:O_(a),maxOffset:f,centerMinEdge:d,centerMaxEdge:m}));return x_(e)-x_(t)+p}function I_(t,e){vo(t,ux(),{value:e})}function z_(t,e,n){return y_({min:Gy(e),max:Yy(e),range:e_(e),value:n,step:o_(e),snap:i_(e),snapStart:a_(e),rounded:u_(e),hasMinEdge:f_(e),hasMaxEdge:d_(e),minBound:S_(t),maxBound:C_(t),screenRange:E_(t)})}function L_(t){return function(e,n){return I_(e,{y:o=(0<t?v_:g_)(m_(r=n).y,Gy(r),Yy(r),o_(r))}),bt.some(o).map(S);var r,o}}function j_(t,e,n,r,o,i){var a,u,c,s,l,f,d,m,p=(u=i,c=n,s=r,l=o,f=E_(a=e),d=s.bind((function(t){return bt.some(T_(t,a))})).getOr(0),m=l.bind((function(t){return bt.some(T_(t,a))})).getOr(f),__({min:Gy(u),max:Yy(u),range:e_(u),value:c,hasMinEdge:f_(u),hasMaxEdge:d_(u),minBound:S_(a),minOffset:0,maxBound:C_(a),maxOffset:f,centerMinEdge:d,centerMaxEdge:m}));return S_(e)-S_(t)+p}function B_(t,e){vo(t,ux(),{value:e})}function F_(t,e){return{x:t,y:e}}function N_(t,e){return function(n,r){return i=r,a=0<t?v_:g_,B_(n,F_(u=(o=e)?m_(i).x:a(m_(i).x,$y(i),Xy(i),o_(i)),o?a(m_(i).y,Gy(i),Yy(i),o_(i)):m_(i).y)),bt.some(u).map(S);var o,i,a,u}}function H_(t){return"<alloy.field."+t+">"}function V_(t,e){return hl({name:"ColourPicker",configFields:[fr("dom"),kr("onValidHex",a),kr("onInvalidHex",a)],factory:function(n){function r(t,e,n){w.getOpt(t).each((function(t){b.setHue(t,n)}))}function o(t,e){x.getOpt(t).each((function(t){v.updateHex(t,e)}))}function i(t,e,n,r){var o=n,i=Ev(e);y.paletteRgba.set(i),y.paletteHue.set(o),Ot(r,(function(r){r(t,e,n)}))}var u,s,l,f,d,m,p,h,g,v=function(t,e,n,r){function o(n,r,o,i,u){var c,s,l=t(jx+"range"),f=[Xb.parts.label({dom:{tag:"label",innerHtml:o,attributes:{"aria-label":i}}}),Xb.parts.field({data:u,factory:fy,inputAttributes:k({type:"text"},"hex"===r?{"aria-live":"polite"}:{}),inputClasses:[e("textfield")],inputBehaviours:Yu([(c=r,s=n,Ay.config({invalidClass:e("invalid"),notify:{onValidate:function(t){vo(t,Lx,{type:c})},onValid:function(t){vo(t,Ix,{type:c,value:wf.getValue(t)})},onInvalid:function(t){vo(t,zx,{type:c,value:wf.getValue(t)})}},validator:{validate:function(e){var n=wf.getValue(e),r=s(n)?jn.value(!0):jn.error(t("aria.input.invalid"));return Ey(r)},validateOnLoad:!1}})),Jb.config({})]),onSetValue:function(t){Ay.isInvalid(t)&&Ay.run(t).get(a)}})],d="hex"!==r?[Xb.parts["aria-descriptor"]({text:l})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:f.concat(d)}}function i(t,e){var n=e.red,r=e.green,o=e.blue;wf.setValue(t,{red:n,green:r,blue:o})}function u(t,e){c.getOpt(t).each((function(t){de(t.element,"background-color","#"+e.value)}))}var c=Am({dom:{tag:"div",classes:[e("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}});return hl({factory:function(){function a(t){return p[t].get()}function s(t,e){p[t].set(e)}function l(t,e){var n=e.event;"hex"!==n.type?s(n.type,bt.none()):r(t)}function f(t,e){var r,o,c,l,f=e.event;"hex"===f.type?function(t,e){n(t);var r=_v(e);s("hex",bt.some(e));var o=Ev(r);i(t,o),m(o),vo(t,Tx,{hex:r}),u(t,r)}(t,f.value):(r=t,o=f.type,c=f.value,l=parseInt(c,10),s(o,bt.some(l)),a("red").bind((function(t){return a("green").bind((function(e){return a("blue").map((function(n){return Sv(t,e,n,1)}))}))})).each((function(t){var e,n,o=(e=r,n=Ov(t),Rx.getField(e,"hex").each((function(t){Dp.isFocused(t)||wf.setValue(e,{hex:n.value})})),n);vo(r,Tx,{hex:o}),u(r,o)})))}function d(e){return{label:t(jx+e+".label"),description:t(jx+e+".description")}}function m(t){var e=t.red,n=t.green,r=t.blue;s("red",bt.some(e)),s("green",bt.some(n)),s("blue",bt.some(r))}var p={red:zr(bt.some(255)),green:zr(bt.some(255)),blue:zr(bt.some(255)),hex:zr(bt.some("ffffff"))},h=d("red"),g=d("green"),v=d("blue"),b=d("hex");return $r(Rx.sketch((function(n){return{dom:{tag:"form",classes:[e("rgb-form")],attributes:{"aria-label":t("aria.color.picker")}},components:[n.field("red",Xb.sketch(o(Cv,"red",h.label,h.description,255))),n.field("green",Xb.sketch(o(Cv,"green",g.label,g.description,255))),n.field("blue",Xb.sketch(o(Cv,"blue",v.label,v.description,255))),n.field("hex",Xb.sketch(o(wv,"hex",b.label,b.description,"ffffff"))),c.asSpec()],formBehaviours:Yu([Ay.config({invalidClass:e("form-invalid")}),im("rgb-form-events",[Oo(Ix,f),Oo(zx,l),Oo(Lx,l)])])}})),{apis:{updateHex:function(t,e){var n;wf.setValue(t,{hex:e.value}),i(t,n=Ev(e)),m(n),u(t,e)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,e,n){t.updateHex(e,n)}},extraApis:{}})}(t,e,n.onValidHex,n.onInvalidHex),b=(p=e,h=Mx.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[p("sv-palette-spectrum")]}}),g=Mx.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[p("sv-palette-thumb")],innerHtml:"<div class="+p("sv-palette-inner-thumb")+' role="presentation"></div>'}}),hl({factory:function(t){var e=c({x:0,y:0}),n=Yu([td.config({find:bt.some}),Dp.config({})]);return Mx.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[p("sv-palette")]},model:{mode:"xy",getInitialValue:e},rounded:!1,components:[h,g],onChange:function(t,e,n){vo(t,Ax,{value:n})},onInit:function(t,e,n,r){O(n.element.dom,Dv(tb))},sliderBehaviours:n})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:function(t,e,n){var r=n;O(e.components()[0].element.dom,Dv(kv(Pv(r,100,100))))},setThumb:function(t,e,n){var r=e,o=Rv(Ev(n));Mx.setValue(r,{x:o.saturation,y:100-o.value})}},extraApis:{}})),y={paletteRgba:zr(tb),paletteHue:zr(0)},_=Am((s=Mx.parts.spectrum({dom:{tag:"div",classes:[(u=e)("hue-slider-spectrum")],attributes:{role:"presentation"}}}),l=Mx.parts.thumb({dom:{tag:"div",classes:[u("hue-slider-thumb")],attributes:{role:"presentation"}}}),Mx.sketch({dom:{tag:"div",classes:[u("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:c({y:0})},components:[s,l],sliderBehaviours:Yu([Dp.config({})]),onChange:function(t,e,n){vo(t,Dx,{value:n})}}))),w=Am(b.sketch({})),x=Am(v.sketch({}));function O(t,e){var n,r,o=t.width,i=t.height,a=t.getContext("2d");null!==a&&(a.fillStyle=e,a.fillRect(0,0,o,i),(n=a.createLinearGradient(0,0,o,0)).addColorStop(0,"rgba(255,255,255,1)"),n.addColorStop(1,"rgba(255,255,255,0)"),a.fillStyle=n,a.fillRect(0,0,o,i),(r=a.createLinearGradient(0,0,0,i)).addColorStop(0,"rgba(0,0,0,0)"),r.addColorStop(1,"rgba(0,0,0,1)"),a.fillStyle=r,a.fillRect(0,0,o,i))}return{uid:n.uid,dom:n.dom,components:[w.asSpec(),_.asSpec(),x.asSpec()],behaviours:Yu([im("colour-picker-events",[Oo(Tx,(m=[r,function(t,e,n){_.getOpt(t).each((function(t){Mx.setValue(t,{y:100-n/360*100})}))},function(t,e){w.getOpt(t).each((function(t){b.setThumb(t,e)}))}],function(t,e){var n=e.event.hex;i(t,n,Rv(Ev(n)).hue,m)})),Oo(Ax,(d=[o],function(t,e){var n=e.event.value,r=y.paletteHue.get();i(t,Iv(Pv(r,n.x,100-n.y)),r,d)})),Oo(Dx,(f=[r,o],function(t,e){var n=(100-e.event.value.y)/100*360,r=Rv(y.paletteRgba.get());i(t,Iv(Pv(n,r.saturation,r.value)),n,f)}))]),td.config({find:function(t){return x.getOpt(t)}}),Cp.config({mode:"acyclic"})])}}})}function U_(t){return Nx[t]}function W_(t,e,n){return wf.config($r({store:{mode:"manual",getValue:e,setValue:n}},t.map((function(t){return{store:{initialValue:t}}})).getOr({})))}function $_(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:Yu([Dp.config({ignore:!0}),Jb.config({})])}}function G_(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[$_([Kx]),t,$_([qx])],behaviours:Yu([Fx(1)])}}function K_(t,e){vo(t,gi(),{raw:{which:9,shiftKey:e}})}function q_(t,e){var n=e.element;Ko(n,Kx)?K_(t,!0):Ko(n,qx)&&K_(t,!1)}function X_(t){return Ab(t,["."+Kx,"."+qx].join(","),O)}function Y_(t,e){return Jx(document.createElement("canvas"),t,e)}function J_(t){var e=Y_(t.width,t.height);return Yx(e).drawImage(t,0,0),e}function Q_(t){return t.naturalWidth||t.width}function Z_(t){return t.naturalHeight||t.height}function tw(t,e,n){return e=e||"image/png",b(HTMLCanvasElement.prototype.toBlob)?new xy((function(r,o){t.toBlob((function(t){t?r(t):o()}),e,n)})):(r=t.toDataURL(e,n),new xy((function(t,e){(function(){var t=r.split(","),e=/data:([^;]+)/.exec(t[0]);if(!e)return bt.none();for(var n=e[1],o=t[1],i=atob(o),a=i.length,u=Math.ceil(a/1024),c=new Array(u),s=0;s<u;++s){for(var l=1024*s,f=Math.min(1024+l,a),d=new Array(f-l),m=l,p=0;m<f;++p,++m)d[p]=i[m].charCodeAt(0);c[s]=new Uint8Array(d)}return bt.some(new Blob(c,{type:n}))})().fold((function(){e("uri is not base64: "+r)}),t)})));var r}function ew(t,e,n){function r(e,n){return t.then((function(t){return t.toDataURL(e||"image/png",n)}))}return{getType:c(e.type),toBlob:function(){return xy.resolve(e)},toDataURL:c(n),toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(e,n){return t.then((function(t){return tw(t,e,n)}))},toAdjustedDataURL:r,toAdjustedBase64:function(t,e){return r(t,e).then((function(t){return t.split(",")[1]}))},toCanvas:function(){return t.then(J_)}}}function nw(t,e){return tw(t,e).then((function(e){return ew(xy.resolve(t),e,t.toDataURL())}))}function rw(t,e,n){var r="string"==typeof t?parseFloat(t):t;return n<r?r=n:r<e&&(r=e),r}function ow(t,e){for(var n=[],r=new Array(25),o=0;o<5;o++){for(var i=0;i<5;i++)n[i]=e[i+5*o];for(i=0;i<5;i++){for(var a=0,u=0;u<5;u++)a+=t[i+5*u]*n[u];r[i+5*o]=a}}return r}function iw(t,e){return t.toCanvas().then((function(n){return tO(n,t.getType(),e)}))}function aw(t){return function(e,n){return iw(e,t([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],n))}}function uw(t,e){void 0===e&&(e=2);var n=Math.pow(10,e),r=Math.round(t*n);return Math.ceil(r/n)}function cw(t){return eO(t)}function sw(t){return oO(t)}function lw(t,e){return iO(t,e)}function fw(t,e){return nO(t,e)}function dw(t,e){return rO(t,e)}function mw(t,e){return r=e,(n=t).toCanvas().then((function(t){return sO(t,n.getType(),r)}));var n,r}function pw(t,e){return r=e,(n=t).toCanvas().then((function(t){return cO(t,n.getType(),r)}));var n,r}function hw(t,e,n){return Bm(t,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:n},e)}function gw(t,e){return hw(t,e,[])}function vw(t,e){return hw(t,e,[Ep.config({})])}function bw(t,e,n){return{dom:{tag:"span",innerHtml:n.translate(t),classes:[e+"__select-label"]},behaviours:Yu([Ep.config({})])}}function yw(t,e,n){function r(t,e){var n=wf.getValue(t);return Dp.focus(n),vo(n,"keydown",{raw:e.event.raw}),Kw.close(n),bt.some(!0)}var o=zr(a),i=t.text.map((function(t){return Am(bw(t,e,n.providers))})),u=t.icon.map((function(t){return Am(vw(t,n.providers.icons))})),c=t.role.fold((function(){return{}}),(function(t){return{role:t}})),s=t.tooltip.fold((function(){return{}}),(function(t){var e=n.providers.translate(t);return{title:e,"aria-label":e}})),l=Bm("chevron-down",{tag:"div",classes:[e+"__select-chevron"]},n.providers.icons);return Am(Kw.sketch(k(k(k({},t.uid?{uid:t.uid}:{}),c),{dom:{tag:"button",classes:[e,e+"--select"].concat(L(t.classes,(function(t){return e+"--"+t}))),attributes:k({},s)},components:Uv([u.map((function(t){return t.asSpec()})),i.map((function(t){return t.asSpec()})),bt.some(l)]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:Yu(M(M([],t.dropdownBehaviours,!0),[Nv((function(){return t.disabled||n.providers.isDisabled()})),ov(),qw.config({}),Ep.config({}),im("dropdown-events",[av(t,o),uv(t,o)]),im("menubutton-update-display-text",[Oo(mO,(function(t,e){i.bind((function(e){return e.getOpt(t)})).each((function(t){Ep.set(t,[ti(n.providers.translate(e.event.text))])}))})),Oo(pO,(function(t,e){u.bind((function(e){return e.getOpt(t)})).each((function(t){Ep.set(t,[vw(e.event.icon,n.providers.icons)])}))}))])],!1)),eventOrder:$r(dO,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:Yu([Cp.config({mode:"special",onLeft:r,onRight:r})]),lazySink:n.getSink,toggleClass:e+"--active",parts:{menu:Uh(0,t.columns,t.presets)},fetch:function(e){return ky(_(t.fetch,e))}}))).asSpec()}function _w(t){return"separator"===t.type}function ww(t,e,n,r){var o=Ro("primary-menu"),i=gO(t,n.shared.providers.menuItems());if(0===i.items.length)return bt.none();var a=Tb(o,i.items,e,n,r),u=nt(i.menus,(function(t,r){return Tb(r,t,e,n,!1)})),c=$r(u,uo(o,a));return bt.from(Yp.tieredData(o,c,i.expansions))}function xw(t){return{isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)},setActive:function(e){var n=t.element;e?($o(n,"tox-tbtn--enabled"),oe(n,"aria-pressed",!0)):(Go(n,"tox-tbtn--enabled"),se(n,"aria-pressed"))},isActive:function(){return Ko(t.element,"tox-tbtn--enabled")}}}function Ow(t,e,n,r){return yw({text:t.text,icon:t.icon,tooltip:t.tooltip,role:r,fetch:function(e,r){t.fetch((function(t){r(ww(t,dg.CLOSE_ON_EXECUTE,n,!1))}))},onSetup:t.onSetup,getApi:xw,columns:1,presets:"normal",classes:[],dropdownBehaviours:[Jb.config({})]},e,n.shared)}function Sw(t,e,n,r,o,i){void 0===n&&(n=[]);var a=e.fold((function(){return{}}),(function(t){return{action:t}})),u=k({buttonBehaviours:Yu([Nv((function(){return t.disabled||i.isDisabled()})),ov(),Jb.config({}),im("button press",[xo("click"),xo("mousedown")])].concat(n)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},a),c=$r(u,{dom:r});return $r(c,{components:o})}function Cw(t,e,n,r){void 0===r&&(r=[]);var o={tag:"button",classes:["tox-tbtn"],attributes:t.tooltip.map((function(t){return{"aria-label":n.translate(t),title:n.translate(t)}})).getOr({})},i=t.icon.map((function(t){return gw(t,n.icons)}));return Sw(t,e,r,o,Uv([i]),n)}function kw(t,e,n,r){void 0===r&&(r=[]);var o=Cw(t,bt.some(e),n,r);return nh.sketch(o)}function Ew(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=n.translate(t.text),a=t.icon?t.icon.map((function(t){return gw(t,n.icons)})):bt.none(),u=a.isSome()?Uv([a]):[],c=a.isSome()?{}:{innerHtml:i},s=M(M(M(M([],t.primary||t.borderless?["tox-button"]:["tox-button","tox-button--secondary"],!0),a.isSome()?["tox-button--icon"]:[],!0),t.borderless?["tox-button--naked"]:[],!0),o,!0);return Sw(t,e,r,k(k({tag:"button",classes:s},c),{attributes:{title:i}}),u,n)}function Mw(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=Ew(t,bt.some(e),n,r,o);return nh.sketch(i)}function Tw(t,e){return function(n){"custom"===e?vo(n,oy,{name:t,value:{}}):"submit"===e?go(n,iy):"cancel"===e&&go(n,ry)}}function Dw(t,e,n){if("menu"===e){var r=t,o=Am(Ow(k(k({},t),{onSetup:function(e){return e.setDisabled(t.disabled),a},fetch:(i=r.items,u=function(){return o},c=n,function(t){t(L(i,(function(t){var e,n,r=t.text.fold((function(){return{}}),(function(t){return{text:t}}));return k(k({type:t.type,active:!1},r),{onAction:function(t){var e=!t.isActive();t.setActive(e),n.storage.set(e),c.shared.getSink().each((function(t){u().getOpt(t).each((function(t){bu(t.element),vo(t,oy,{name:n.name,value:n.storage.get()})}))}))},onSetup:(e=n=t,function(t){t.setActive(e.storage.get())})})})))})}),"tox-tbtn",n,bt.none()));return o.asSpec()}var i,u,c;if("custom"===e||"cancel"===e||"submit"===e){var s=Tw(t.name,e);return Mw(k(k({},t),{borderless:!1}),s,n.shared.providers,[])}}function Aw(t,e){return Vf({factory:Xb,name:t,overrides:function(t){return{fieldBehaviours:Yu([im("coupled-input-behaviour",[Oo(bi(),(function(n){il(n,t,e).bind(td.getCurrent).each((function(e){il(n,t,"lock").each((function(r){Rp.isOn(r)&&t.onLockedChange(n,e,r)}))}))}))])])}}})}function Pw(t){var e=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(t);if(null===e)return jn.error(t);var n=parseFloat(e[1]),r=e[2];return jn.value({value:n,unit:r})}function Rw(t,e){function n(t){return Mt(r,t)}var r={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1};return t.unit===e?bt.some(t.value):n(t.unit)&&n(e)?r[t.unit]===r[e]?bt.some(t.value):bt.some(t.value/r[t.unit]*r[e]):bt.none()}function Iw(t){return bt.none()}function zw(t,e){function n(t){return Bm(t,{tag:"span",classes:["tox-icon","tox-lock-icon__"+t]},e.icons)}function r(t){return{dom:{tag:"div",classes:["tox-form__group"]},components:t}}function o(n){return Xb.parts.field({factory:fy,inputClasses:["tox-textfield"],inputBehaviours:Yu([ad.config({disabled:function(){return t.disabled||e.isDisabled()}}),ov(),Jb.config({}),im("size-input-events",[Oo(pi(),(function(t,e){vo(t,u,{isField1:n})})),Oo(yi(),(function(e,n){vo(e,ey,{name:t.name})}))])]),selectOnFocus:!1})}function i(t){return{dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}}var a=Iw,u=Ro("ratio-event"),c=yO.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:e.translate(t.label.getOr("Constrain proportions"))}},components:[n("lock"),n("unlock")],buttonBehaviours:Yu([ad.config({disabled:function(){return t.disabled||e.isDisabled()}}),ov(),Jb.config({})])}),s=yO.parts.field1(r([Xb.parts.label(i("Width")),o(!0)])),l=yO.parts.field2(r([Xb.parts.label(i("Height")),o(!1)]));return yO.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[s,l,r([i(" "),c])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(t,e,n){Pw(wf.getValue(t)).each((function(t){a(t).each((function(t){var n,r,o,i;wf.setValue(e,(i=-1!==(i=(n=t).value.toFixed((r=n.unit)in(o={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4})?o[r]:1)).indexOf(".")?i.replace(/\.?0*$/,""):i)+n.unit)}))}))},coupledFieldBehaviours:Yu([ad.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){yO.getField1(t).bind(Xb.getField).each(ad.disable),yO.getField2(t).bind(Xb.getField).each(ad.disable),yO.getLock(t).each(ad.disable)},onEnabled:function(t){yO.getField1(t).bind(Xb.getField).each(ad.enable),yO.getField2(t).bind(Xb.getField).each(ad.enable),yO.getLock(t).each(ad.enable)}}),ov(),im("size-input-events2",[Oo(u,(function(t,e){var n,r,o,i=e.event.isField1,u=i?yO.getField1(t):yO.getField2(t),c=i?yO.getField2(t):yO.getField1(t),s=u.map(wf.getValue).getOr("");n=c.map(wf.getValue).getOr(""),r=Pw(s).toOptional(),o=Pw(n).toOptional(),a=Tt(r,o,(function(t,e){return Rw(t,e.unit).map((function(t){return e.value/t})).map((function(t){return n=t,r=e.unit,function(t){return Rw(t,r).map((function(t){return{value:t*n,unit:r}}))};var n,r})).getOr(Iw)})).getOr(Iw)}))])])})}function Lw(t){if(v(t.changedTouches))for(var e="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<e.length;n++)t[e[n]]=t.changedTouches[0][e[n]]}function jw(t,e){return{uid:t.uid,dom:t.dom,components:e,behaviours:Ks(t.formBehaviours,[wf.config({store:{mode:"manual",getValue:function(e){return nt(cl(e,t),(function(t,e){return t().bind((function(t){var n=td.getCurrent(t),r=new Error("Cannot find a current component to extract the value from for form part '"+e+"': "+Po(t.element));return n.fold((function(){return jn.error(r)}),jn.value)})).map(wf.getValue)}))},setValue:function(e,n){et(n,(function(n,r){il(e,t,r).each((function(t){td.getCurrent(t).each((function(t){wf.setValue(t,n)}))}))}))}}})]),apis:{getField:function(e,n){return il(e,t,n).bind(td.getCurrent)}}}}function Bw(){return td.config({find:bt.some})}function Fw(t){return e=Do,n=Ao,W_(t,(function(t){return e(t.element)}),(function(t,e){return n(t.element,e)}));var e,n}(wy=_y=_y||{})[wy.HighlightFirst=0]="HighlightFirst",wy[wy.HighlightNone=1]="HighlightNone";var Nw,Hw,Vw,Uw,Ww=function(t,e){return t.getSystem().getByUid(e.uid+"-"+Iy()).map((function(t){return function(){return jn.value(t)}})).getOrThunk((function(){return e.lazySink.fold((function(){return function(){return jn.error(new Error("No internal sink is specified, nor could an external sink be found"))}}),(function(e){return function(){return e(t)}}))}))},$w=c([fr("dom"),fr("fetch"),$a("onOpen"),Ga("onExecute"),kr("getHotspot",bt.some),kr("getAnchorOverrides",c({})),Ic(),$s("dropdownBehaviours",[Rp,Ry,Cp,Dp]),fr("toggleClass"),kr("eventOrder",{}),yr("lazySink"),kr("matchWidth",!1),kr("useMinWidth",!1),yr("role")].concat(Vy())),Gw=c([Uf({schema:[Va()],name:"menu",defaults:function(t){return{onExecute:t.onExecute}}}),zy()]),Kw=gl({name:"Dropdown",configFields:$w(),partFields:Gw(),factory:function(t,e,n,r){function o(t){lf.getState(t).each((function(t){Yp.highlightPrimary(t)}))}function i(t,e){return bo(t),bt.some(!0)}var u,c={expand:function(e){Rp.isOn(e)||By(t,s,e,r,a,_y.HighlightNone).get(a)},open:function(e){Rp.isOn(e)||By(t,s,e,r,a,_y.HighlightFirst).get(a)},isOpen:Rp.isOn,close:function(e){Rp.isOn(e)&&By(t,s,e,r,a,_y.HighlightFirst).get(a)},repositionMenus:function(t){Rp.isOn(t)&&Hy(t)}};return{uid:t.uid,dom:t.dom,components:e,behaviours:Ks(t.dropdownBehaviours,[Rp.config({toggleClass:t.toggleClass,aria:{mode:"expanded"}}),Ry.config({others:{sandbox:function(e){return Ny(t,e,{onOpen:function(){return Rp.on(e)},onClose:function(){return Rp.off(e)}})}}}),Cp.config({mode:"special",onSpace:i,onEnter:i,onDown:function(t,e){return Kw.isOpen(t)?o(Ry.getCoupled(t,"sandbox")):Kw.open(t),bt.some(!0)},onEscape:function(t,e){return Kw.isOpen(t)?(Kw.close(t),bt.some(!0)):bt.none()}}),Dp.config({})]),events:pm(bt.some((function(e){By(t,s,e,r,o,_y.HighlightFirst).get(a)}))),eventOrder:k(k({},t.eventOrder),((u={})[Di()]=["disabling","toggling","alloy.base.behaviour"],u)),apis:c,domModification:{attributes:k(k({"aria-haspopup":"true"},t.role.fold((function(){return{}}),(function(t){return{role:t}}))),"button"===t.dom.tag?{type:at(t.dom,"attributes").bind((function(t){return at(t,"type")})).getOr("button")}:{})}}},apis:{open:function(t,e){return t.open(e)},expand:function(t,e){return t.expand(e)},close:function(t,e){return t.close(e)},isOpen:function(t,e){return t.isOpen(e)},repositionMenus:function(t,e){return t.repositionMenus(e)}}}),qw=hu({fields:[],name:"unselecting",active:Object.freeze({__proto__:null,events:function(){return Qi([wo(Si(),S)])},exhibit:function(){return No({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}})}),Xw=Ro("color-input-change"),Yw=Ro("color-swatch-change"),Jw=Ro("color-picker-cancel"),Qw=Wf({schema:[fr("dom")],name:"label"}),Zw=Uy("top-left"),tx=Uy("top"),ex=Uy("top-right"),nx=Uy("right"),rx=Uy("bottom-right"),ox=Uy("bottom"),ix=Uy("bottom-left"),ax=[Qw,Uy("left"),nx,tx,ox,Zw,ex,ix,rx,Vf({name:"thumb",defaults:c({dom:{styles:{position:"absolute"}}}),overrides:function(t){return{events:Qi([ko(ii(),t,"spectrum"),ko(ai(),t,"spectrum"),ko(ui(),t,"spectrum"),ko(si(),t,"spectrum"),ko(li(),t,"spectrum"),ko(di(),t,"spectrum")])}}}),Vf({schema:[ao("mouseIsDown",(function(){return zr(!1)}))],name:"spectrum",overrides:function(t){function e(e,r){return n.getValueFromEvent(r).map((function(r){return n.setValueFrom(e,t,r)}))}var n=t.model.manager;return{behaviours:Yu([Cp.config({mode:"special",onLeft:function(e){return n.onLeft(e,t)},onRight:function(e){return n.onRight(e,t)},onUp:function(e){return n.onUp(e,t)},onDown:function(e){return n.onDown(e,t)}}),Dp.config({})]),events:Qi([Oo(ii(),e),Oo(ai(),e),Oo(si(),e),Oo(li(),(function(n,r){t.mouseIsDown.get()&&e(n,r)}))])}}})],ux=c("slider.change.value"),cx="left",sx=P_(-1),lx=P_(1),fx=bt.none,dx=bt.none,mx={"top-left":bt.none(),top:bt.none(),"top-right":bt.none(),right:bt.some((function(t,e){h_(t,{x:Jy(e)})})),"bottom-right":bt.none(),bottom:bt.none(),"bottom-left":bt.none(),left:bt.some((function(t,e){h_(t,{x:Ky(e)})}))},px=Object.freeze({__proto__:null,setValueFrom:function(t,e,n){var r=A_(t,e,n);return D_(t,{x:r}),r},setToMin:function(t,e){D_(t,{x:$y(e)})},setToMax:function(t,e){D_(t,{x:Xy(e)})},findValueOfOffset:A_,getValueFromEvent:function(t){return Wy(t).map((function(t){return t.left}))},findPositionOfValue:R_,setPositionFromValue:function(t,e,n,r){var o=m_(n),i=R_(t,r.getSpectrum(t),o.x,r.getLeftEdge(t),r.getRightEdge(t),n),a=Ce(e.element)/2;de(e.element,"left",i-a+"px")},onLeft:sx,onRight:lx,onUp:fx,onDown:dx,edgeActions:mx}),hx=bt.none,gx=bt.none,vx=L_(-1),bx=L_(1),yx={"top-left":bt.none(),top:bt.some((function(t,e){h_(t,{y:qy(e)})})),"top-right":bt.none(),right:bt.none(),"bottom-right":bt.none(),bottom:bt.some((function(t,e){h_(t,{y:Qy(e)})})),"bottom-left":bt.none(),left:bt.none()},_x=Object.freeze({__proto__:null,setValueFrom:function(t,e,n){var r=z_(t,e,n);return I_(t,{y:r}),r},setToMin:function(t,e){I_(t,{y:Gy(e)})},setToMax:function(t,e){I_(t,{y:Yy(e)})},findValueOfOffset:z_,getValueFromEvent:function(t){return Wy(t).map((function(t){return t.top}))},findPositionOfValue:j_,setPositionFromValue:function(t,e,n,r){var o=m_(n),i=j_(t,r.getSpectrum(t),o.y,r.getTopEdge(t),r.getBottomEdge(t),n),a=we(e.element)/2;de(e.element,"top",i-a+"px")},onLeft:hx,onRight:gx,onUp:vx,onDown:bx,edgeActions:yx}),wx=Wy,xx=N_(-1,!1),Ox=N_(1,!1),Sx=N_(-1,!0),Cx=N_(1,!0),kx={"top-left":bt.some((function(t,e){h_(t,p_(Ky(e),qy(e)))})),top:bt.some((function(t,e){h_(t,p_(n_(e),qy(e)))})),"top-right":bt.some((function(t,e){h_(t,p_(Jy(e),qy(e)))})),right:bt.some((function(t,e){h_(t,p_(Jy(e),r_(e)))})),"bottom-right":bt.some((function(t,e){h_(t,p_(Jy(e),Qy(e)))})),bottom:bt.some((function(t,e){h_(t,p_(n_(e),Qy(e)))})),"bottom-left":bt.some((function(t,e){h_(t,p_(Ky(e),Qy(e)))})),left:bt.some((function(t,e){h_(t,p_(Ky(e),r_(e)))}))},Ex=Object.freeze({__proto__:null,setValueFrom:function(t,e,n){var r=F_(A_(t,e,n.left),z_(t,e,n.top));return B_(t,r),r},setToMin:function(t,e){B_(t,F_($y(e),Gy(e)))},setToMax:function(t,e){B_(t,F_(Xy(e),Yy(e)))},getValueFromEvent:wx,setPositionFromValue:function(t,e,n,r){var o=m_(n),i=R_(t,r.getSpectrum(t),o.x,r.getLeftEdge(t),r.getRightEdge(t),n),a=j_(t,r.getSpectrum(t),o.y,r.getTopEdge(t),r.getBottomEdge(t),n),u=Ce(e.element)/2,c=we(e.element)/2;de(e.element,"left",i-u+"px"),de(e.element,"top",a-c+"px")},onLeft:xx,onRight:Ox,onUp:Sx,onDown:Cx,edgeActions:kx}),Mx=gl({name:"Slider",configFields:[kr("stepSize",1),kr("onChange",a),kr("onChoose",a),kr("onInit",a),kr("onDragStart",a),kr("onDragEnd",a),kr("snapToGrid",!1),kr("rounded",!0),yr("snapStart"),dr("model",sr("mode",{x:[kr("minX",0),kr("maxX",100),ao("value",(function(t){return zr(t.mode.minX)})),fr("getInitialValue"),Xa("manager",px)],y:[kr("minY",0),kr("maxY",100),ao("value",(function(t){return zr(t.mode.minY)})),fr("getInitialValue"),Xa("manager",_x)],xy:[kr("minX",0),kr("maxX",100),kr("minY",0),kr("maxY",100),ao("value",(function(t){return zr({x:t.mode.minX,y:t.mode.minY})})),fr("getInitialValue"),Xa("manager",Ex)]})),$s("sliderBehaviours",[Cp,wf]),ao("mouseIsDown",(function(){return zr(!1)}))],partFields:ax,factory:function(t,e,n,r){function o(e){return al(e,t,"thumb")}function i(e){return al(e,t,"spectrum")}function a(e){return il(e,t,"left-edge")}function u(e){return il(e,t,"right-edge")}function c(e){return il(e,t,"top-edge")}function s(e){return il(e,t,"bottom-edge")}function l(e,n){v.setPositionFromValue(e,n,t,{getLeftEdge:a,getRightEdge:u,getTopEdge:c,getBottomEdge:s,getSpectrum:i})}function f(t,e){g.value.set(e),l(t,o(t))}function d(e){var n=t.mouseIsDown.get();t.mouseIsDown.set(!1),n&&il(e,t,"thumb").each((function(n){var r=g.value.get();t.onChoose(e,n,r)}))}function m(e,n){n.stop(),t.mouseIsDown.set(!0),t.onDragStart(e,o(e))}function p(e,n){n.stop(),t.onDragEnd(e,o(e)),d(e)}var h,g=t.model,v=g.manager;return{uid:t.uid,dom:t.dom,components:e,behaviours:Ks(t.sliderBehaviours,[Cp.config({mode:"special",focusIn:function(e){return il(e,t,"spectrum").map(Cp.focusIn).map(S)}}),wf.config({store:{mode:"manual",getValue:function(t){return g.value.get()}}}),tc.config({channels:((h={})[mf()]={onReceive:d},h)})]),events:Qi([Oo(ux(),(function(e,n){!function(e,n){f(e,n);var r=o(e);t.onChange(e,r,n),bt.some(!0)}(e,n.event.value)})),Zi((function(e,n){var r=g.getInitialValue();g.value.set(r);var a=o(e);l(e,a);var u=i(e);t.onInit(e,a,u,g.value.get())})),Oo(ii(),m),Oo(ui(),p),Oo(si(),m),Oo(di(),p)]),apis:{resetToMin:function(e){v.setToMin(e,t)},resetToMax:function(e){v.setToMax(e,t)},setValue:f,refresh:l},domModification:{styles:{position:"relative"}}}},apis:{setValue:function(t,e,n){t.setValue(e,n)},resetToMin:function(t,e){t.resetToMin(e)},resetToMax:function(t,e){t.resetToMax(e)},refresh:function(t,e){t.refresh(e)}}}),Tx=Ro("rgb-hex-update"),Dx=Ro("slider-update"),Ax=Ro("palette-update"),Px=[$s("formBehaviours",[wf])],Rx={getField:Bo((function(t,e,n){return t.getField(e,n)})),sketch:function(t){var e,n={field:function(t,n){return e.push(t),tl("form",H_(t),n)},record:c(e=[])},r=t(n),o=L(n.record(),(function(t){return Vf({name:t,pname:H_(t)})}));return pl("form",Px,o,jw,r)}},Ix=Ro("valid-input"),zx=Ro("invalid-input"),Lx=Ro("validating-input"),jx="colorcustom.rgb.",Bx=function(t){return td.config({find:t.getOpt})},Fx=function(t){return td.config({find:function(e){return Jt(e.element,t).bind((function(t){return e.getSystem().getByDom(t).toOptional()}))}})},Nx={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},Hx=tinymce.util.Tools.resolve("tinymce.Resource"),Vx=tinymce.util.Tools.resolve("tinymce.util.Tools"),Ux=Xr([kr("preprocess",s),kr("postprocess",s)]),Wx=function(t,e){var n=cr("RepresentingConfigs.memento processors",Ux,e);return wf.config({store:{mode:"manual",getValue:function(e){var r=t.get(e),o=wf.getValue(r);return n.postprocess(o)},setValue:function(e,r){var o=n.preprocess(r),i=t.get(e);wf.setValue(i,o)}}})},$x=W_,Gx=function(t){return wf.config({store:{mode:"memory",initialValue:t}})},Kx=Ro("alloy-fake-before-tabstop"),qx=Ro("alloy-fake-after-tabstop"),Xx=!(fn().browser.isIE()||fn().browser.isEdge()),Yx=function(t){return t.getContext("2d")},Jx=function(t,e,n){return t.width=e,t.height=n,t},Qx=function(t){URL.revokeObjectURL(t.src)},Zx=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10],tO=function(t,e,n){var r=Yx(t),o=function(t){for(var e,r,o,i,a=t.data,u=n[0],c=n[1],s=n[2],l=n[3],f=n[4],d=n[5],m=n[6],p=n[7],h=n[8],g=n[9],v=n[10],b=n[11],y=n[12],_=n[13],w=n[14],x=n[15],O=n[16],S=n[17],C=n[18],k=n[19],E=0;E<a.length;E+=4)e=a[E],r=a[E+1],o=a[E+2],i=a[E+3],a[E]=e*u+r*c+o*s+i*l+f,a[E+1]=e*d+r*m+o*p+i*h+g,a[E+2]=e*v+r*b+o*y+i*_+w,a[E+3]=e*x+r*O+o*S+i*C+k;return t}(r.getImageData(0,0,t.width,t.height));return r.putImageData(o,0,0),nw(t,e)},eO=(Nw=[-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0,0,0,0,0,1],function(t){return iw(t,Nw)}),nO=aw((function(t,e){return ow(t,[1,0,0,0,e=rw(255*e,-255,255),0,1,0,0,e,0,0,1,0,e,0,0,0,1,0,0,0,0,0,1])})),rO=aw((function(t,e){var n;return e=rw(e,-1,1),ow(t,[(n=(e*=100)<0?127+e/100*127:127*(0==(n=e%1)?Zx[e]:Zx[Math.floor(e)]*(1-n)+Zx[Math.floor(e)+1]*n)+127)/127,0,0,0,.5*(127-n),0,n/127,0,0,.5*(127-n),0,0,n/127,0,.5*(127-n),0,0,0,1,0,0,0,0,0,1])})),oO=(Hw=[0,-1,0,-1,5,-1,0,-1,0],function(t){return n=Hw,(e=t).toCanvas().then((function(t){return r=t,o=e.getType(),i=n,u=function(t,e,n){for(var r=function(t,e,n){return n<t?t=n:t<e&&(t=e),t},o=Math.round(Math.sqrt(n.length)),i=Math.floor(o/2),a=t.data,u=e.data,c=t.width,s=t.height,l=0;l<s;l++)for(var f=0;f<c;f++){for(var d=0,m=0,p=0,h=0;h<o;h++)for(var g=0;g<o;g++){var v=r(f+g-i,0,c-1),b=4*(r(l+h-i,0,s-1)*c+v),y=n[h*o+g];d+=a[b]*y,m+=a[1+b]*y,p+=a[2+b]*y}var _=4*(l*c+f);u[_]=r(d,0,255),u[1+_]=r(m,0,255),u[2+_]=r(p,0,255)}return e}((a=Yx(r)).getImageData(0,0,r.width,r.height),a.getImageData(0,0,r.width,r.height),i),a.putImageData(u,0,0),nw(r,o);var r,o,i,a,u}));var e,n}),iO=(Vw=function(t,e){return 255*Math.pow(t/255,1-e)},function(t,e){return t.toCanvas().then((function(n){return function(t,e,n){for(var r=Yx(t),o=new Array(256),i=0;i<o.length;i++)o[i]=Vw(i,n);var a=function(t,e){for(var n=t.data,r=0;r<n.length;r+=4)n[r]=e[n[r]],n[r+1]=e[n[r+1]],n[r+2]=e[n[r+2]];return t}(r.getImageData(0,0,t.width,t.height),o);return r.putImageData(a,0,0),nw(t,e)}(n,t.getType(),e)}))}),aO=function(t,e,n){var r=Q_(t),o=Z_(t),i=e/r,a=n/o,u=!1;(i<.5||2<i)&&(i=i<.5?.5:2,u=!0),(a<.5||2<a)&&(a=a<.5?.5:2,u=!0);var c=uO(t,i,a);return u?c.then((function(t){return aO(t,e,n)})):c},uO=function(t,e,n){return new xy((function(r){var o=Q_(t),i=Z_(t),a=Math.floor(o*e),u=Math.floor(i*n),c=Y_(a,u);Yx(c).drawImage(t,0,0,o,i,0,0,a,u),r(c)}))},cO=function(t,e,n){var r=(n<0?360+n:n)*Math.PI/180,o=t.width,i=t.height,a=Math.sin(r),u=Math.cos(r),c=uw(Math.abs(o*u)+Math.abs(i*a)),s=uw(Math.abs(o*a)+Math.abs(i*u)),l=Y_(c,s),f=Yx(l);return f.translate(c/2,s/2),f.rotate(r),f.drawImage(t,-o/2,-i/2),nw(l,e)},sO=function(t,e,n){var r=Y_(t.width,t.height),o=Yx(r);return"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0)),nw(r,e)},lO=function(t,e,n,r,o,i){var a=Y_(o,i);return Yx(a).drawImage(t,-n,-r),nw(a,e)},fO=Ro("toolbar.button.execute"),dO=((Uw={})[Di()]=["disabling","alloy.base.behaviour","toggling","toolbar-button-events"],Uw),mO=Ro("update-menu-text"),pO=Ro("update-menu-icon"),hO={type:"separator"},gO=function(t,e){var n,r,o;return F((n=f(t)?t.split(" "):t,r=e,0<(o=N(n,(function(t,e){return f(e)?""===e?t:"|"===e?0<t.length&&!_w(t[t.length-1])?t.concat([hO]):t:Mt(r,e.toLowerCase())?t.concat([r[e.toLowerCase()]]):t:t.concat([e])}),[])).length&&_w(o[o.length-1])&&o.pop(),o),(function(t,n){var r,o,i,a,u,c,s=function(t){if(_w(t))return t;var e=at(t,"value").getOrThunk((function(){return Ro("generated-menu-item")}));return $r({value:e},t)}(n),l=(o=e,Mt(r=s,"getSubmenuItems")?(a=o,u=(i=r).getSubmenuItems(),c=gO(u,a),{item:i,menus:$r(c.menus,uo(i.value,c.items)),expansions:$r(c.expansions,uo(i.value,i.value))}):{item:r,menus:{},expansions:{}});return{menus:$r(t.menus,l.menus),items:[l.item].concat(t.items),expansions:$r(t.expansions,l.expansions)}}),{menus:{},expansions:{},items:[]})},vO=c([kr("field1Name","field1"),kr("field2Name","field2"),Ka("onLockedChange"),Ua(["lockClass"]),kr("locked",!1),xf("coupledFieldBehaviours",[td,wf])]),bO=c([Aw("field1","field2"),Aw("field2","field1"),Vf({factory:nh,schema:[fr("dom")],name:"lock",overrides:function(t){return{buttonBehaviours:Yu([Rp.config({selected:t.locked,toggleClass:t.markers.lockClass,aria:{mode:"pressed"}})])}}})]),yO=gl({name:"FormCoupledInputs",configFields:vO(),partFields:bO(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:Of(t.coupledFieldBehaviours,[td.config({find:bt.some}),wf.config({store:{mode:"manual",getValue:function(e){var n=ll(e,t,["field1","field2"]),r={};return r[t.field1Name]=wf.getValue(n.field1()),r[t.field2Name]=wf.getValue(n.field2()),r},setValue:function(e,n){var r=ll(e,t,["field1","field2"]);ut(n,t.field1Name)&&wf.setValue(r.field1(),n[t.field1Name]),ut(n,t.field2Name)&&wf.setValue(r.field2(),n[t.field2Name])}}})]),apis:{getField1:function(e){return il(e,t,"field1")},getField2:function(e){return il(e,t,"field2")},getLock:function(e){return il(e,t,"lock")}}}},apis:{getField1:function(t,e){return t.getField1(e)},getField2:function(t,e){return t.getField2(e)},getLock:function(t,e){return t.getLock(e)}}}),_O={undo:c(Ro("undo")),redo:c(Ro("redo")),zoom:c(Ro("zoom")),back:c(Ro("back")),apply:c(Ro("apply")),swap:c(Ro("swap")),transform:c(Ro("transform")),tempTransform:c(Ro("temp-transform")),transformApply:c(Ro("transform-apply"))},wO=c("save-state"),xO=c("disable"),OO=c("enable"),SO={formActionEvent:oy,saveState:wO,disable:xO,enable:OO},CO=tinymce.util.Tools.resolve("tinymce.geom.Rect"),kO=tinymce.util.Tools.resolve("tinymce.util.Observable"),EO=tinymce.util.Tools.resolve("tinymce.util.VK");function MO(t,e,n,r,o){return kw({name:t,icon:bt.some(e),disabled:n,tooltip:bt.some(t),primary:!1,borderless:!1},r,o)}function TO(t,e){e?ad.enable(t):ad.disable(t)}var DO=0,AO=function(t,e,n,r,o){function i(t,e){return{x:e.x-t.x,y:e.y-t.y,w:e.w,h:e.h}}function a(e,r,o,a){var u=r.x+o*e.deltaX,c=r.y+a*e.deltaY,s=Math.max(20,r.w+o*e.deltaW),l=Math.max(20,r.h+a*e.deltaH),f=(t=CO.clamp({x:u,y:c,w:s,h:l},n,"move"===e.name),i(n,t));y.fire("updateRect",{rect:f}),g(f)}function u(e){c(t=e)}function c(t){function n(t,e){Da(m,"#"+d+"-"+t).each((function(t){me(t,{left:e.x+"px",top:e.y+"px",width:Math.max(0,e.w)+"px",height:Math.max(0,e.h)+"px"})}))}Ot(p,(function(e){Da(m,"#"+d+"-"+e.name).each((function(n){me(n,{left:t.w*e.xMul+t.x+"px",top:t.h*e.yMul+t.y+"px"})}))})),n("top",{x:e.x,y:e.y,w:e.w,h:t.y-e.y}),n("right",{x:t.x+t.w,y:t.y,w:e.w-t.x-t.w+e.x,h:t.h}),n("bottom",{x:e.x,y:t.y+t.h,w:e.w,h:e.h-t.y-t.h+e.y}),n("left",{x:e.x,y:t.y,w:t.x-e.x,h:t.h}),n("move",t)}var s,l,f=[],d="tox-crid-"+DO++,m=Rt.fromDom(r),p=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}],h=["top","right","bottom","left"],g=function(t){var e;u((e=n,{x:t.x+e.x,y:t.y+e.y,w:t.w,h:t.h}))};function b(t){oe(t.target,"aria-grabbed","focus"===t.raw.type?"true":"false")}ie(l=Rt.fromTag("div"),{id:d,class:"tox-croprect-container",role:"grid","aria-dropeffect":"execute"}),Mn(m,l),Ot(h,(function(t){Da(m,"#"+d).each((function(e){var n=Rt.fromTag("div");ie(n,{id:d+"-"+t,class:"tox-croprect-block","data-mce-bogus":"all"}),de(n,"display","none"),Mn(e,n)}))})),Ot(p,(function(t){Da(m,"#"+d).each((function(e){var n=Rt.fromTag("div");ie(n,{id:d+"-"+t.name,"aria-label":t.label,"aria-grabbed":"false","data-mce-bogus":"all",role:"gridcell",tabindex:"-1",title:t.label}),qo(n,["tox-croprect-handle","tox-croprect-handle-"+t.name]),de(n,"display","none"),Mn(e,n)}))})),s=L(p,(function(e){var n;return function(t,e){function n(t){var n,o,i,a,f,p,v,y,_=t.raw,w=(n=Math.max,o=m.documentElement,i=m.body,a=n(o.scrollWidth,i.scrollWidth),f=n(o.clientWidth,i.clientWidth),p=n(o.offsetWidth,i.offsetWidth),v=n(o.scrollHeight,i.scrollHeight),y=n(o.clientHeight,i.clientHeight),{width:a<p?f:a,height:v<n(o.offsetHeight,i.offsetHeight)?y:v});Lw(_),t.prevent(),c=_.button,s=_.screenX,l=_.screenY;var x=he(g,"cursor");me(u=Rt.fromTag("div",m),{position:"absolute",top:"0",left:"0",width:w.width+"px",height:w.height+"px","z-index":"2147483647",opacity:"0.0001",cursor:x}),Mn(_n(h),u),d.push(sc(h,"mousemove",r),sc(h,"touchmove",r),sc(h,"mouseup",b),sc(h,"touchend",b)),e.start(_)}function r(t){var n=t.raw;if(Lw(n),n.button!==c)return b(t);n.deltaX=n.screenX-s,n.deltaY=n.screenY-l,t.prevent(),e.drag(n)}var o,i,a,u,c,s,l,f=[],d=[],m=null!==(o=e.document)&&void 0!==o?o:document,p=null!==(i=e.root)&&void 0!==i?i:m,h=Rt.fromDom(m),g=Rt.fromDom(p.getElementById(null!==(a=e.handle)&&void 0!==a?a:t)),b=function(t){Lw(t.raw),Ot(d,(function(t){return t.unbind()})),d=[],Tn(u),e.stop&&e.stop(t.raw)};return f.push(sc(g,"mousedown",n),sc(g,"touchstart",n)),{destroy:function(){Ot(d.concat(f),(function(t){return t.unbind()})),d=[],f=[],v(u)&&Tn(u)}}}(d,{document:r.ownerDocument,root:hn(m).dom,handle:d+"-"+e.name,start:function(){n=t},drag:function(t){a(e,n,t.deltaX,t.deltaY)}})})),c(t),f.push(sc(m,"focusin",b),sc(m,"focusout",b),sc(m,"keydown",(function(e){var n;function r(t,e,r,o,i){t.stopPropagation(),t.preventDefault(),a(n,r,o,i)}switch(Ot(p,(function(t){if(ae(e.target,"id")===d+"-"+t.name)return n=t,!1})),e.raw.keyCode){case EO.LEFT:r(e,0,t,-10,0);break;case EO.RIGHT:r(e,0,t,10,0);break;case EO.UP:r(e,0,t,0,-10);break;case EO.DOWN:r(e,0,t,0,10);break;case EO.ENTER:case EO.SPACEBAR:e.prevent(),o()}})));var y=k(k({},kO),{toggleVisibility:function(t){var e=M(M([],L(p,(function(t){return"#"+d+"-"+t.name})),!0),L(h,(function(t){return"#"+d+"-"+t})),!0).join(","),n=ss(m,e);Ot(n,t?function(t){return be(t,"display")}:function(t){return de(t,"display","none")})},setClampRect:function(e){n=e,c(t)},setRect:u,getInnerRect:function(){return i(n,t)},setInnerRect:g,setViewPortRect:function(n){e=n,c(t)},destroy:function(){Ot(s,(function(t){return t.destroy()})),s=[],Ot(f,(function(t){return t.unbind()})),f=[]}});return y};function PO(t,e){function n(t){var e=w.getHistoryStates();C.updateButtonUndoStates(t,e.undoEnabled,e.redoEnabled),vo(t,SO.formActionEvent,{name:SO.saveState(),value:e.undoEnabled})}function r(t){return t.toBlob()}function o(t){vo(t,SO.formActionEvent,{name:SO.disable(),value:{}})}function i(t,e,i,a,u){o(t),function(t){return e=t,new xy((function(t){var n=new FileReader;n.onloadend=function(){t(n.result)},n.readAsDataURL(e)})).then((function(e){return ew((n=t,new xy((function(t,e){function r(){i.removeEventListener("load",a),i.removeEventListener("error",u)}var o=URL.createObjectURL(n),i=new Image,a=function(){r(),t(i)},u=function(){r(),e("Unable to load data of type "+n.type+": "+o)};i.addEventListener("load",a),i.addEventListener("error",u),i.src=o,i.complete&&setTimeout(a,0)})).then((function(t){Qx(t);var e=Y_(Q_(t),Z_(t));return Yx(e).drawImage(t,0,0),e}))),t,e);var n}));var e}(e).then(i).then(r).then(a).then((function(e){return O(t,e)})).then((function(){n(t),u(),x(t)})).catch((function(e){t.getSystem().isConnected()&&x(t)}))}function u(t,e,n){i(t,w.getBlobState().blob,e,(function(t){return w.updateTempState(t)}),n)}function s(t){var e=w.getBlobState().url;return w.destroyTempState(),n(t),e}var l,f,d,m,p,h,g,v,b,y,_,w=function(t){var e,n,r,o,i=zr(t),u=cc(),c=(n=-1,{data:e=[],add:function(t){var r=e.splice(++n);return e.push(t),{state:t,removed:r}},undo:function(){if(r())return e[--n]},redo:function(){if(o())return e[++n]},canUndo:r=function(){return 0<n},canRedo:o=function(){return-1!==n&&n<e.length-1}});function s(t){i.set(t)}function l(t){URL.revokeObjectURL(t.url)}function f(t){var e=d(t);s(e);var n=c.add(e).removed;return Vx.each(n,l),e.url}function d(t){return{blob:t,url:URL.createObjectURL(t)}}function m(){u.on(l),u.clear()}return c.add(t),{getBlobState:function(){return i.get()},setBlobState:s,addBlobState:f,getTempState:function(){return u.get().getOrThunk(i.get)},updateTempState:function(t){var e=d(t);return m(),u.set(e),e.url},addTempState:function(t){var e=d(t);return u.set(e),e.url},applyTempState:function(t){return u.get().fold(a,(function(e){f(e.blob),t()}))},destroyTempState:m,undo:function(){var t=c.undo();return s(t),t.url},redo:function(){var t=c.redo();return s(t),t.url},getHistoryStates:function(){return{undoEnabled:c.canUndo(),redoEnabled:c.canRedo()}}}}(t.currentState),x=function(t){E.getApplyButton(t).each((function(t){ad.enable(t)})),vo(t,SO.formActionEvent,{name:SO.enable(),value:{}})},O=function(t,e){return o(t),S.updateSrc(t,e)},S=(m=t.currentState.url,h=Am({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),g=zr(1),p=ac(),v=k(k({},p),{run:function(t){return p.get().each(t)}}),b=zr({x:0,y:0,w:1,h:1}),y=zr({x:0,y:0,w:1,h:1}),{memContainer:_=Am(Gb.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[h.asSpec(),{dom:{tag:"img",attributes:{src:m}}},{dom:{tag:"div"},behaviours:Yu([im("image-panel-crop-events",[Zi((function(t){_.getOpt(t).each((function(t){var e=t.element.dom,n=AO({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},e,a);n.toggleVisibility(!1),n.on("updateRect",(function(t){var e=t.rect,n=g.get(),r={x:Math.round(e.x/n),y:Math.round(e.y/n),w:Math.round(e.w/n),h:Math.round(e.h/n)};b.set(r)})),v.set(n)}))})),ta((function(){v.clear()}))])])}],containerBehaviours:Yu([Ep.config({}),im("image-panel-events",[Zi((function(t){T(t,m)}))])])})),updateSrc:T,zoom:function(t,e){var n=g.get(),r=0<e?Math.min(2,n+.1):Math.max(.1,n-.1);g.set(r),_.getOpt(t).each((function(t){var e=t.components()[1].element;M(t,e)}))},showCrop:function(){v.run((function(t){t.toggleVisibility(!0)}))},hideCrop:function(){v.run((function(t){t.toggleVisibility(!1)}))},getRect:function(){return b.get()},getMeasurements:function(){var t=y.get();return{width:t.w,height:t.h}}}),C=(f=Am(MO("Undo","undo",!0,(function(t){vo(t,_O.undo(),{direction:1})}),l=e)),d=Am(MO("Redo","redo",!0,(function(t){vo(t,_O.redo(),{direction:1})}),l)),{container:Gb.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[f.asSpec(),d.asSpec(),MO("Zoom in","zoom-in",!1,(function(t){vo(t,_O.zoom(),{direction:1})}),l),MO("Zoom out","zoom-out",!1,(function(t){vo(t,_O.zoom(),{direction:-1})}),l)]}),updateButtonUndoStates:function(t,e,n){f.getOpt(t).each((function(t){TO(t,e)})),d.getOpt(t).each((function(t){TO(t,n)}))}}),E=function(t,e){function n(t,n,r,o){return Am(Mw({name:t,text:t,disabled:r,primary:o,icon:bt.none(),borderless:!1},n,e))}function r(t,n,r,o){return Am(kw({name:t,icon:bt.some(t),tooltip:bt.some(n),disabled:o,primary:!1,borderless:!1},r,e))}function o(t,e){t.map((function(t){var n=t.get(e);n.hasConfigured(ad)&&ad.disable(n)}))}function i(t,e){t.map((function(t){var n=t.get(e);n.hasConfigured(ad)&&ad.enable(n)}))}function u(t,e,n){vo(t,e,n)}function s(t){return go(t,SO.disable()),0}function l(t){return go(t,SO.enable()),0}function f(t,e){s(t),u(t,_O.transform(),{transform:e}),l(t)}function d(t){return function(){Y.getOpt(t).each((function(t){Ep.set(t,[X])}))}}function m(t,e){s(t),u(t,_O.transformApply(),{transform:e,swap:d(t)}),l(t)}function p(){return n("Back",(function(t){return u(t,_O.back(),{swap:d(t)})}),!1,!1)}function h(){return Am({dom:{tag:"div",classes:["tox-spacer"]},behaviours:Yu([ad.config({})])})}function g(){return n("Apply",(function(t){return u(t,_O.apply(),{swap:d(t)})}),!0,!0)}function v(t,e){return function(n){return t(n,e)}}function b(t,e){var n,r=e;s(n=t),u(n,_O.tempTransform(),{transform:r}),l(n)}function y(t,n,r,o,i){var a=Mx.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}),u=Mx.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),s=Mx.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return Am(Mx.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:r,maxX:i,getInitialValue:c({x:o})},components:[a,u,s],sliderBehaviours:Yu([Dp.config({})]),onChoose:n}))}function _(t,e,n,r,a){var u,c,s,l,d,m,h=(u=t,c=e,s=n,l=r,d=a,[p(),(m=c,y(u,(function(t,e,n){f(t,v(m,n.x/100))}),s,l,d)),g()]);return Gb.sketch({dom:O,components:h.map((function(t){return t.asSpec()})),containerBehaviours:Yu([im("image-tools-filter-panel-buttons-events",[Oo(SO.disable(),(function(t,e){o(h,t)})),Oo(SO.enable(),(function(t,e){i(h,t)}))])])})}function w(t){return y(t,(function(t,e,n){var r=H.getOpt(t),o=U.getOpt(t),i=V.getOpt(t);r.each((function(e){o.each((function(n){i.each((function(r){var o,i,a,u=wf.getValue(e).x/100,c=wf.getValue(r).x/100,s=wf.getValue(n).x/100,l=(o=u,i=c,a=s,function(t){return iw(t,(e=i,n=a,ow([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],[rw(o,0,2),0,0,0,0,0,rw(e,0,2),0,0,0,0,0,rw(n,0,2),0,0,0,0,0,1,0,0,0,0,0,1])));var e,n});f(t,l)}))}))}))}),0,100,200)}function x(t,e,n){return function(r){u(r,_O.swap(),{transform:e,swap:function(){Y.getOpt(r).each((function(e){Ep.set(e,[t]),n(e)}))}})}}var O={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},S=a,C=[p(),h(),n("Apply",(function(e){m(e,(function(e){var n,r,o,i,a,u,c,s,l,f=t.getRect();return n=f.x,r=f.y,o=f.w,i=f.h,u=n,c=r,s=o,l=i,(a=e).toCanvas().then((function(t){return lO(t,a.getType(),u,c,s,l)}))})),t.hideCrop()}),!1,!0)],k=Gb.sketch({dom:O,components:C.map((function(t){return t.asSpec()})),containerBehaviours:Yu([im("image-tools-crop-buttons-events",[Oo(SO.disable(),(function(t,e){o(C,t)})),Oo(SO.enable(),(function(t,e){i(C,t)}))])])}),E=Am(zw({name:"size",label:bt.none(),constrain:!0,disabled:!1},e)),M=[p(),h(),E,h(),n("Apply",(function(t){E.getOpt(t).each((function(e){var n,r,o=wf.getValue(e),i=parseInt(o.width,10),a=parseInt(o.height,10),u=(n=i,r=a,function(t){return o=n,i=r,(e=t).toCanvas().then((function(t){return aO(t,o,i).then((function(t){return nw(t,e.getType())}))}));var e,o,i});m(t,u)}))}),!1,!0)],T=Gb.sketch({dom:O,components:M.map((function(t){return t.asSpec()})),containerBehaviours:Yu([im("image-tools-resize-buttons-events",[Oo(SO.disable(),(function(t,e){o(M,t)})),Oo(SO.enable(),(function(t,e){i(M,t)}))])])}),D=v(mw,"h"),A=v(mw,"v"),P=v(pw,-90),R=v(pw,90),I=[p(),h(),r("flip-horizontally","Flip horizontally",(function(t){b(t,D)}),!1),r("flip-vertically","Flip vertically",(function(t){b(t,A)}),!1),r("rotate-left","Rotate counterclockwise",(function(t){b(t,P)}),!1),r("rotate-right","Rotate clockwise",(function(t){b(t,R)}),!1),h(),g()],z=Gb.sketch({dom:O,components:I.map((function(t){return t.asSpec()})),containerBehaviours:Yu([im("image-tools-fliprotate-buttons-events",[Oo(SO.disable(),(function(t,e){o(I,t)})),Oo(SO.enable(),(function(t,e){i(I,t)}))])])}),L=[p(),h(),g()],j=Gb.sketch({dom:O,components:L.map((function(t){return t.asSpec()}))}),B=_("Brightness",fw,-100,0,100),F=_("Contrast",dw,-100,0,100),N=_("Gamma",lw,-100,0,100),H=w("R"),V=w("G"),U=w("B"),W=[p(),H,V,U,g()],$=Gb.sketch({dom:O,components:W.map((function(t){return t.asSpec()}))}),G=bt.some(sw),K=bt.some(cw),q=[r("crop","Crop",x(k,bt.none(),(function(e){t.showCrop()})),!1),r("resize","Resize",x(T,bt.none(),(function(e){E.getOpt(e).each((function(e){var n=t.getMeasurements(),r=n.width,o=n.height;wf.setValue(e,{width:r,height:o})}))})),!1),r("orientation","Orientation",x(z,bt.none(),S),!1),r("brightness","Brightness",x(B,bt.none(),S),!1),r("sharpen","Sharpen",x(j,G,S),!1),r("contrast","Contrast",x(F,bt.none(),S),!1),r("color-levels","Color levels",x($,bt.none(),S),!1),r("gamma","Gamma",x(N,bt.none(),S),!1),r("invert","Invert",x(j,K,S),!1)],X=Gb.sketch({dom:O,components:q.map((function(t){return t.asSpec()}))}),Y=Am(Gb.sketch({dom:{tag:"div"},components:[X],containerBehaviours:Yu([Ep.config({})])}));return{memContainer:Y,getApplyButton:function(t){return Y.getOpt(t).map((function(t){var e=t.components()[0];return e.components()[e.components().length-1]}))}}}(S,e);function M(t,e){_.getOpt(t).each((function(t){var n=g.get(),r=Ce(t.element),o=we(t.element),i=e.dom.naturalWidth*n,a=e.dom.naturalHeight*n,u=Math.max(0,r/2-i/2),c=Math.max(0,o/2-a/2),s={left:u.toString()+"px",top:c.toString()+"px",width:i.toString()+"px",height:a.toString()+"px",position:"absolute"};me(e,s),h.getOpt(t).each((function(t){me(t.element,s)})),v.run((function(t){var e=b.get();t.setRect({x:e.x*n+u,y:e.y*n+c,w:e.w*n,h:e.h*n}),t.setClampRect({x:u,y:c,w:i,h:a}),t.setViewPortRect({x:0,y:0,w:r,h:o})}))}))}function T(t,e){var n,r=Rt.fromTag("img");return oe(r,"src",e),n=r.dom,new xh((function(t){var e=function(){n.removeEventListener("load",e),t(n)};n.complete?t(n):n.addEventListener("load",e)})).then((function(){t.getSystem().isConnected()&&_.getOpt(t).map((function(t){var e=wa({element:r});Ep.replaceAt(t,1,bt.some(e));var n=y.get(),o={x:0,y:0,w:r.dom.naturalWidth,h:r.dom.naturalHeight};y.set(o);var i,a=CO.inflate(o,-20,-20);b.set(a),n.w===o.w&&n.h===o.h||(i=r,_.getOpt(t).each((function(t){var e=Ce(t.element),n=we(t.element),r=i.dom.naturalWidth,o=i.dom.naturalHeight,a=Math.min(e/r,n/o);1<=a?g.set(1):g.set(a)}))),M(t,r)}))}))}return{dom:{tag:"div",attributes:{role:"presentation"}},components:[E.memContainer.asSpec(),S.memContainer.asSpec(),C.container],behaviours:Yu([wf.config({store:{mode:"manual",getValue:function(){return w.getBlobState()}}}),im("image-tools-events",[Oo(_O.undo(),(function(t,e){var r=w.undo();O(t,r).then((function(e){x(t),n(t)}))})),Oo(_O.redo(),(function(t,e){var r=w.redo();O(t,r).then((function(e){x(t),n(t)}))})),Oo(_O.zoom(),(function(t,e){var n=e.event.direction;S.zoom(t,n)})),Oo(_O.back(),(function(t,e){var n,r=s(n=t);O(n,r).then((function(t){x(n)})),(0,e.event.swap)(),S.hideCrop()})),Oo(_O.apply(),(function(t,e){w.applyTempState((function(){s(t),(0,e.event.swap)()}))})),Oo(_O.transform(),(function(t,e){return u(t,e.event.transform,a)})),Oo(_O.tempTransform(),(function(t,e){var n=e.event.transform;i(t,w.getTempState().blob,n,(function(t){return w.addTempState(t)}),a)})),Oo(_O.transformApply(),(function(t,e){var n=t,r=e.event.transform,o=e.event.swap,a=w.getBlobState().blob;i(n,a,r,(function(t){var e=w.addBlobState(t);return s(n),e}),o)})),Oo(_O.swap(),(function(t,e){C.updateButtonUndoStates(t,!1,!1);var n=e.event.transform,r=e.event.swap;n.fold((function(){r()}),(function(e){u(t,e,r)}))}))]),Bw()])}}function RO(t){return!Mt(t,"items")}function IO(t,e){var n=t.label.map((function(t){return Fb(t,e)})),r=[ad.config({disabled:function(){return t.disabled||e.isDisabled()}}),ov(),Cp.config({mode:"execution",useEnter:!0!==t.multiline,useControlEnter:!0===t.multiline,execute:function(t){return go(t,iy),bt.some(!0)}}),im("textfield-change",[Oo(bi(),(function(e,n){vo(e,ey,{name:t.name})})),Oo(Mi(),(function(e,n){vo(e,ey,{name:t.name})}))]),Jb.config({})],o=t.validation.map((function(t){return Ay.config({getRoot:function(t){return qt(t.element)},invalidClass:"tox-invalid",validator:{validate:function(e){var n=wf.getValue(e),r=t.validator(n);return Ey(!0===r?jn.value(n):jn.error(r))},validateOnLoad:t.validateOnLoad}})})).toArray(),i=t.placeholder.fold(c({}),(function(t){return{placeholder:e.translate(t)}})),a=t.inputMode.fold(c({}),(function(t){return{inputmode:t}})),u=k(k({},i),a);return Bb(n,Xb.parts.field({tag:!0===t.multiline?"textarea":"input",inputAttributes:u,inputClasses:[t.classname],inputBehaviours:Yu(U([r,o])),selectOnFocus:!1,factory:fy}),(t.flex?["tox-form__group--stretched"]:[]).concat(t.maximized?["tox-form-group--maximize"]:[]),[ad.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){Xb.getField(t).each(ad.disable)},onEnabled:function(t){Xb.getField(t).each(ad.enable)}}),ov()])}function zO(t){var e=zr(null);return va({readState:function(){return{timer:null!==e.get()?"set":"unset"}},setTimer:function(t){e.set(t)},cancel:function(){var t=e.get();null!==t&&t.cancel()}})}function LO(t,e,n){var r=wf.getValue(n);wf.setValue(e,r),IC(e)}function jO(t,e){var n=t.element,r=Yo(n),o=n.dom;"number"!==ae(n,"type")&&e(o,r)}function BO(t){return{type:"menuitem",value:t.url,text:t.title,meta:{attach:t.attach},onAction:a}}function FO(t,e){return{type:"menuitem",value:e,text:t,meta:{attach:void 0},onAction:a}}function NO(t,e){return n=t,L(B(e,(function(t){return t.type===n})),BO);var n}function HO(t,e){var n=t.toLowerCase();return B(e,(function(t){return dt((void 0!==t.meta&&void 0!==t.meta.text?t.meta:t).text.toLowerCase(),n)||dt(t.value.toLowerCase(),n)}))}function VO(t){return function(e,n,r){return at(n,"name").fold((function(){return t(n,r)}),(function(o){return e.field(o,t(n,r))}))}}function UO(t,e,n){var r=$r(n,{shared:{interpreter:function(e){return $C(t,e,r)}}});return $C(t,e,r)}function WO(t,e,n){function r(){return Rt.fromDom(t.getContentAreaContainer())}function o(){return h||!n()}var i,a,u,c,s,l,f,d,m,p,h=Qg(t);return{inlineDialog:(f=r,d=e,m=o,p={maxHeightFunction:Mc()},function(){return m()?{type:"node",root:ee(f()),node:bt.from(f()),bubble:hc(12,12,GC),layouts:{onRtl:function(){return[Sm]},onLtr:function(){return[Om]}},overrides:p}:{type:"hotspot",hotspot:d(),bubble:hc(-12,12,GC),layouts:{onRtl:function(){return[Hu]},onLtr:function(){return[Vu]}},overrides:p}}),banner:(c=r,s=e,l=o,function(){return l()?{type:"node",root:ee(c()),node:bt.from(c()),layouts:{onRtl:function(){return[Zp]},onLtr:function(){return[Zp]}}}:{type:"hotspot",hotspot:s(),layouts:{onRtl:function(){return[Gu]},onLtr:function(){return[Gu]}}}}),cursor:(a=t,function(){return{type:"selection",root:u(),getSelection:function(){var t=a.selection.getRng();return bt.some(is.range(Rt.fromDom(t.startContainer),t.startOffset,Rt.fromDom(t.endContainer),t.endOffset))}}}),node:(i=u=function(){return Rt.fromDom(t.getBody())},function(t){return{type:"node",root:i(),node:t}})}}function $O(t){return bt.from(t.getParam("style_formats")).filter(m).map((function(e){var n,r,o=(n=t,r=qC(e),n.formatter?i(r.customFormats):n.on("init",(function(){i(r.customFormats)})),r.formats);function i(t){Ot(t,(function(t){n.formatter.has(t.name)||n.formatter.register(t.name,t.format)}))}return t.getParam("style_formats_merge",!1,"boolean")?KC.concat(o):o})).getOr(KC)}function GO(t,e,n){var r={type:"formatter",isSelected:e(t.format),getStylePreview:n(t.format)};return $r(t,r)}function KO(t,e,n,r){var o=function(e){return L(e,(function(e){var i,a,u,s,l,d=Ct(e);if(ut(e,"items")){var m=o(e.items);return $r($r(e,{type:"submenu"}),{getStyleItems:c(m)})}return ut(e,"format")?GO(e,n,r):1===d.length&&xt(d,"title")?$r(e,{type:"separator"}):(s={type:"formatter",format:u="custom-"+(a=f((i=e).name)?i.name:Ro(i.title)),isSelected:n(u),getStylePreview:r(u)},l=$r(i,s),t.formatter.register(a,l),l)}))};return o(e)}function qO(t){return function(e){if(v(n=e)&&1===n.nodeType){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}var n;return!1}}function XO(t,e,n,r,o){return{type:t,title:e,url:n,level:r,attach:o}}function YO(t){return t.innerText||t.textContent}function JO(t){return t&&"A"===t.nodeName&&void 0!==(t.id||t.name)&&wC(t)}function QO(t){return t&&/^(H[1-6])$/.test(t.nodeName)}function ZO(t){return QO(t)&&wC(t)}function tS(t){var e,n=t.id||Ro("h");return XO("header",YO(t),"#"+n,QO(e=t)?parseInt(e.nodeName.substr(1),10):0,(function(){t.id=n}))}function eS(t){var e=t.id||t.name;return XO("anchor",YO(t)||"#"+e,"#"+e,0,a)}function nS(t){return 0<XC(t.title).length}function rS(t){return f(t)&&/^https?/.test(t)}function oS(t){return d(t)&&ot(t,(function(t){return!(m(e=t)&&e.length<=5&&$(e,rS));var e})).isNone()}function iS(){var t,e=eb.getItem(ZC);if(null===e)return{};try{t=JSON.parse(e)}catch(t){if(t instanceof SyntaxError)return{};throw t}return oS(t)?t:{}}function aS(t){return at(iS(),t).getOr([])}function uS(t,e){var n,r;rS(t)&&(r=B(at(n=iS(),e).getOr([]),(function(e){return e!==t})),n[e]=[t].concat(r).slice(0,5),function(t){if(!oS(t))throw new Error("Bad format for history:\n"+JSON.stringify(t));eb.setItem(ZC,JSON.stringify(t))}(n))}function cS(t){return!!t}function sS(t){return nt(Vx.makeMap(t,/[, ]/),cS)}function lS(t){return bt.from(t.getParam("file_picker_callback")).filter(b)}function fS(t){return bt.from(t).filter(f).getOrUndefined()}function dS(t){return{getHistory:aS,addToHistory:uS,getLinkInformation:function(){return!1===(e=t).getParam("typeahead_urls")?bt.none():bt.some({targets:QC(e.getBody()),anchorTop:fS(e.getParam("anchor_top","#top")),anchorBottom:fS(e.getParam("anchor_bottom","#bottom"))});var e},getValidationHandler:function(){return bt.from(void 0===(n=(e=t).getParam("file_picker_validator_handler",void 0,"function"))?e.getParam("filepicker_validator_handler",void 0,"function"):n);var e,n},getUrlPicker:function(e){return n=s=t,r=l=e,i=bt.some((o=n).getParam("file_picker_types")).filter(cS),a=bt.some(o.getParam("file_browser_callback_types")).filter(cS),u=i.or(a).map(sS),c=lS(o).fold(O,(function(t){return u.fold(S,(function(t){return 0<Ct(t).length&&t}))})),(h(c)?c?lS(n):bt.none():c[r]?lS(n):bt.none()).map((function(t){return function(e){return ky((function(n){var r=k({filetype:l,fieldname:e.fieldname},bt.from(e.meta).getOr({}));t.call(s,(function(t,e){if(!f(t))throw new Error("Expected value to be string");if(void 0!==e&&!d(e))throw new Error("Expected meta to be a object");n({value:t,meta:e})}),e.value,r)}))}}));var n,r,o,i,a,u,c,s,l}}}function mS(t,e,n){var r,o,i,a,u,c,s,l,f,d,m,p,h,g=zr(!1),v={isPositionedAtTop:function(){return"top"===r.get()},getDockingMode:(r=zr(Yg(e)?"bottom":"top")).get,setDockingMode:r.set},b={shared:{providers:{icons:function(){return e.ui.registry.getAll().icons},menuItems:function(){return e.ui.registry.getAll().menuItems},translate:rh.translate,isDisabled:function(){return e.mode.isReadOnly()||e.ui.isDisabled()},getSetting:e.getParam.bind(e)},interpreter:function(t){return $C(WC,t,b)},anchors:WO(e,n,v.isPositionedAtTop),header:v,getSink:function(){return jn.value(t)}},urlinput:dS(e),styleselect:(f=zr([]),d=zr([]),m=zr([]),p=zr([]),h=zr(!(l=function(t){var e=t.items;return void 0!==e&&0<e.length?W(e,l):[t.format]})),(s=e).on("PreInit",(function(t){var e=$O(s),n=KO(s,e,y,_);f.set(n),d.set(W(n,l))})),s.on("addStyleModifications",(function(t){var e=KO(s,t.items,y,_);m.set(e),h.set(t.replace),p.set(W(e,l))})),{getData:function(){var t=h.get()?[]:f.get(),e=m.get();return t.concat(e)},getFlattenedKeys:function(){var t=h.get()?[]:d.get(),e=p.get();return t.concat(e)}}),colorinput:{colorPicker:function(t,e){Ob(c)(t,e)},hasCustomColors:function(){return rb(u)},getColors:function(){return ob(a)},getColorCols:(i=a=u=c=e,function(){return ab(i)})},dialog:{isDraggableModal:(o=e,function(){return o.getParam("draggable_modal",!1,"boolean")})},isContextMenuOpen:function(){return g.get()},setContextMenuState:function(t){return g.set(t)}};function y(t){return function(){return s.formatter.match(t)}}function _(t){return function(){var e=s.formatter.get(t);return void 0!==e?bt.some({tag:0<e.length&&(e[0].inline||e[0].block)||"div",styles:s.dom.parseStyle(s.formatter.getCssText(t))}):bt.none()}}return b}function pS(t){return(ct(ge(t,"position"),"fixed")?bt.none():Xt(t)).orThunk((function(){var e=Rt.fromTag("span");return qt(t).bind((function(t){Mn(t,e);var n=Xt(e);return Tn(e),n}))}))}function hS(t){return pS(t).map(Se).getOrThunk((function(){return Sn(0,0)}))}function gS(t,e){var n=t.element;$o(n,e.transitionClass),Go(n,e.fadeOutClass),$o(n,e.fadeInClass),e.onShow(t)}function vS(t,e){var n=t.element;$o(n,e.transitionClass),Go(n,e.fadeInClass),$o(n,e.fadeOutClass),e.onHide(t)}function bS(t,e,n){return $(t,(function(t){switch(t){case"bottom":return e.bottom<=n.bottom;case"top":return e.y>=n.y}}))}function yS(t,e){return e.getInitialPos().map((function(e){return Pn(e.bounds.x,e.bounds.y,Ce(t),we(t))}))}function _S(t,e,n){return n.getInitialPos().bind((function(r){switch(n.clearInitialPos(),r.position){case"static":return bt.some(lk.static());case"absolute":var o=pS(t).map(Rn).getOrThunk((function(){return Rn(yn())}));return bt.some(lk.absolute(Ou("absolute",at(r.style,"left").map((function(t){return e.x-o.x})),at(r.style,"top").map((function(t){return e.y-o.y})),at(r.style,"right").map((function(t){return o.right-e.right})),at(r.style,"bottom").map((function(t){return o.bottom-e.bottom})))));default:return bt.none()}}))}function wS(t,e,n){n.setDocked(!1),Ot(["left","right","top","bottom","position"],(function(e){return be(t.element,e)})),e.onUndocked(t)}function xS(t,e,n,r){var o="fixed"===r.position;n.setDocked(o),Su(t.element,r),(o?e.onDocked:e.onUndocked)(t)}function OS(t,e,n,r,o){void 0===o&&(o=!1),e.contextual.each((function(e){e.lazyContext(t).each((function(i){var a=i.y<r.bottom&&i.bottom>r.y;a!==n.isVisible()&&(n.setVisible(a),o&&!a?(qo(t.element,[e.fadeOutClass]),e.onHide(t)):(a?gS:vS)(t,e))}))}))}function SS(t,e,n){var r,o,i,u,c,s;n.isDocked()&&(o=e,i=n,s=(r=t).element,i.setDocked(!1),yS(c=r.element,u=i).bind((function(t){return _S(c,t,u)})).each((function(t){t.fold((function(){return wS(r,o,i)}),(function(t){return xS(r,o,i,t)}),a)})),i.setVisible(!0),o.contextual.each((function(t){Xo(s,[t.fadeInClass,t.fadeOutClass,t.transitionClass]),t.onShow(r)})),fk(r,o,i))}function CS(t,e){return xt(pk.getModes(t),e)}function kS(t){var e=t.element;qt(e).each((function(n){var r,o,i="padding-"+pk.getModes(t)[0];pk.isDocked(t)?(r=Ce(n),de(e,"width",r+"px"),de(n,i,xe(o=e)+(parseInt(he(o,"margin-top"),10)||0)+(parseInt(he(o,"margin-bottom"),10)||0)+"px")):(be(e,"width"),be(n,i))}))}function ES(t,e){e?(Go(t,gk.fadeOutClass),qo(t,[gk.transitionClass,gk.fadeInClass])):(Go(t,gk.fadeInClass),qo(t,[gk.fadeOutClass,gk.transitionClass]))}function MS(t,e){var n=Rt.fromDom(t.getContainer());e?($o(n,vk),Go(n,bk)):($o(n,bk),Go(n,vk))}function TS(t,e){function n(t){a().each((function(e){return t(e.element)}))}function r(e){t.inline||kS(e),MS(t,pk.isDocked(e)),e.getSystem().broadcastOn([df()],{}),a().each((function(t){return t.getSystem().broadcastOn([df()],{})}))}var o,i=cc(),a=e.getSink,u=t.inline?[]:[tc.config({channels:((o={})[hk()]={onReceive:kS},o)})];return M([Dp.config({}),pk.config({contextual:k({lazyContext:function(e){var n=xe(e.element),r=t.inline?t.getContentAreaContainer():t.getContainer(),o=Rn(Rt.fromDom(r)),i=o.height-n,a=o.y+(CS(e,"top")?0:n);return bt.some(Pn(o.x,a,o.width,i))},onShow:function(){n((function(t){return ES(t,!0)}))},onShown:function(t){n((function(t){return Xo(t,[gk.transitionClass,gk.fadeInClass])})),i.get().each((function(e){var n,r=t.element,o=Wt(n=e);_u(o).filter((function(t){return!Vt(n,t)})).filter((function(t){return Vt(t,Rt.fromDom(o.dom.body))||Ut(r,t)})).each((function(){return bu(n)})),i.clear()}))},onHide:function(t){var e=t.element,r=a;wu(e).orThunk((function(){return r().toOptional().bind((function(t){return wu(t.element)}))})).fold(i.clear,i.set),n((function(t){return ES(t,!1)}))},onHidden:function(){n((function(t){return Xo(t,[gk.transitionClass])}))}},gk),lazyViewport:function(e){var n=In(),r=t.getParam("toolbar_sticky_offset",0,"number"),o=n.y+(CS(e,"top")?r:0),i=n.height-(CS(e,"bottom")?r:0);return Pn(n.x,o,n.width,i)},modes:[e.header.getDockingMode()],onDocked:r,onUndocked:r})],u,!0)}function DS(t){return ar("menubutton",xk,t)}function AS(t,e){return e.getAnimationRoot.fold((function(){return t.element}),(function(e){return e(t)}))}function PS(t){return t.dimension.property}function RS(t,e){return t.dimension.getDimension(e)}function IS(t,e){Xo(AS(t,e),[e.shrinkingClass,e.growingClass])}function zS(t,e){Go(t.element,e.openClass),$o(t.element,e.closedClass),de(t.element,PS(e),"0px"),ye(t.element)}function LS(t,e){Go(t.element,e.closedClass),$o(t.element,e.openClass),be(t.element,PS(e))}function jS(t,e,n,r){n.setCollapsed(),de(t.element,PS(e),RS(e,t.element)),ye(t.element),IS(t,e),zS(t,e),e.onStartShrink(t),e.onShrunk(t)}function BS(t,e,n){var r=RS(e,t.element);("0px"===r?jS:function(t,e,n,r){var o=r.getOrThunk((function(){return RS(e,t.element)}));n.setCollapsed(),de(t.element,PS(e),o),ye(t.element);var i=AS(t,e);Go(i,e.growingClass),$o(i,e.shrinkingClass),zS(t,e),e.onStartShrink(t)})(t,e,n,bt.some(r))}function FS(t,e,n){var r=AS(t,e),o=Ko(r,e.shrinkingClass),i=RS(e,t.element);LS(t,e);var a=RS(e,t.element);(o?function(){de(t.element,PS(e),i),ye(t.element)}:function(){zS(t,e)})(),Go(r,e.shrinkingClass),$o(r,e.growingClass),LS(t,e),de(t.element,PS(e),a),n.setExpanded(),e.onStartGrow(t)}function NS(t,e,n){return!0===Ko(AS(t,e),e.growingClass)}function HS(t,e,n){return!0===Ko(AS(t,e),e.shrinkingClass)}function VS(t){return"<alloy.field."+t+">"}function US(t){return{element:function(){return t.element.dom}}}function WS(t){return td.getCurrent(t).bind((function(t){return Ek.isGrowing(t)||Ek.hasGrown(t)?td.getCurrent(t).bind((function(t){return H(Ak.getSlotNames(t),(function(e){return Ak.isShowing(t,e)}))})):bt.none()}))}function $S(t){var e=Rt.fromHtml(t),n=Yt(e),r=N(void 0!==e.dom.attributes?e.dom.attributes:[],(function(t,e){var n;return"class"===e.name?t:k(k({},t),((n={})[e.name]=e.value,n))}),{}),o=Array.prototype.slice.call(e.dom.classList,0),i=0===n.length?{}:{innerHtml:Do(e)};return k({tag:It(e),classes:o,attributes:r},i)}function GS(t){return td.getCurrent(t).each((function(t){return bu(t.element)}))}function KS(t,e,n){function r(n){var r;!o.get()||"focusin"===(r=n).type&&(r.composed?Q(r.composedPath()):bt.from(r.target)).map(Rt.fromDom).filter(Ge).exists((function(t){return Ko(t,"mce-pastebin")}))||(n.preventDefault(),GS(e()),t.editorManager.setActive(t))}var o=zr(!1),i=cc();function a(r){var i,a,u,c,s,l,f,d,m,p;r!==o.get()&&(o.set(r),i=t,a=e(),u=r,c=n.providers,d=a.element,m=u,p="data-mce-"+(s="tabindex"),bt.from(i.iframeElement).map(Rt.fromDom).each((function(t){m?(ue(t,s).each((function(e){return oe(t,p,e)})),oe(t,s,-1)):(se(t,s),ue(t,p).each((function(e){oe(t,s,e),se(t,p)})))})),u?(Lk.block(a,(f=c,function(t,e){return{dom:{tag:"div",attributes:{"aria-label":f.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:$S('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}})),be(d,"display"),se(d,"aria-hidden"),i.hasFocus()&&GS(a)):(l=td.getCurrent(a).exists((function(t){return yu(t.element)})),Lk.unblock(a),de(d,"display","none"),oe(d,"aria-hidden","true"),l&&i.focus()),t.fire("AfterProgressState",{state:r}))}t.inline||t.on("PreInit",(function(){t.dom.bind(t.getWin(),"focusin",r),t.on("BeforeExecCommand",(function(t){"mcefocus"===t.command.toLowerCase()&&!0!==t.value&&r(t)}))})),t.on("ProgressState",(function(e){var n;i.on(eh.clearTimeout),y(e.time)?(n=eh.setEditorTimeout(t,(function(){return a(e.state)}),e.time),i.set(n)):(a(e.state),i.clear())}))}function qS(t,e,n){return{within:t,extra:e,withinWidth:n}}function XS(t,e,n){var r,o=(r=function(t,e){var r=n(t);return bt.some({element:t,start:e,finish:e+r,width:r})},N(t,(function(t,e){return r(e,t.len).fold(c(t),(function(e){return{len:e.finish,list:t.list.concat([e])}}))}),{len:0,list:[]}).list),i=B(o,(function(t){return t.finish<=e})),a=F(i,(function(t,e){return t+e.width}),0);return{within:i,extra:o.slice(i.length),withinWidth:a}}function YS(t){return L(t,(function(t){return t.element}))}function JS(t,e){var n=L(e,(function(t){return Sa(t)}));uk.setGroups(t,n)}function QS(t,e,n){var r,o,i,a,u,c,s,l,f,d,m,p,h,g,v,b,y,_,w,x,O=e.builtGroups.get();0!==O.length&&(r=al(t,e,"primary"),o=Ry.getCoupled(t,"overflowGroup"),de(r.element,"visibility","hidden"),a=tt(i=O.concat([o]),(function(t){return wu(t.element).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))})),n([]),JS(r,i),u=Ce(r.element),0===(s=u,l=e.builtGroups.get(),d=o,_=(y=(0===(m=XS(l,s,f=function(t){return Ce(t.element)})).extra.length?bt.some(m):bt.none()).getOrThunk((function(){return XS(l,s-f(d),f)}))).within,w=y.extra,x=y.withinWidth,(c=1===w.length&&w[0].width<=f(d)?(b=x,qS(YS(_.concat(w)),[],b)):1<=w.length?(h=w,g=d,v=x,qS(YS(_).concat([g]),YS(h),v)):(p=x,qS(YS(_),[],p))).extra.length)?(Ep.remove(r,o),n([])):(JS(r,c.within),n(c.extra)),be(r.element,"visibility"),ye(r.element),a.each(Dp.focus))}function ZS(t,e){var n=Ry.getCoupled(t,"toolbarSandbox");lf.isOpen(n)?lf.close(n):lf.open(n,e.toolbar())}function tC(t,e,n,r){var o=n.getBounds.map((function(t){return t()})),i=n.lazySink(t).getOrDie();nf.positionWithinBounds(i,e,{anchor:{type:"hotspot",hotspot:t,layouts:r,overrides:{maxWidthFunction:Nk()}}},o)}function eC(t,e,n,r,o){uk.setGroups(e,o),tC(t,e,n,r),Rp.on(t)}function nC(t){return L(t,(function(t){return Sa(t)}))}function rC(t,e,n){QS(t,n,(function(r){n.overflowGroups.set(r),e.getOpt(t).each((function(t){Uk.setGroups(t,nC(r))}))}))}function oC(t,e){il(t,e,"overflow-button").bind((function(){return il(t,e,"overflow")})).each((function(n){OC(t,e),Ek.toggleGrow(n)}))}function iC(t){var e=t.title.fold((function(){return{}}),(function(t){return{attributes:{title:t}}}));return{dom:k({tag:"div",classes:["tox-toolbar__group"]},e),components:[Gk.parts.items({})],items:t.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:Yu([Jb.config({}),Dp.config({})])}}function aC(t){return Gk.sketch(iC(t))}function uC(t,e){var n=Zi((function(e){var n=L(t.initGroups,aC);uk.setGroups(e,n)}));return Yu([Hv(t.providers.isDisabled),ov(),Cp.config({mode:e,onEscape:t.onEscape,selector:".tox-toolbar__group"}),im("toolbar-events",[n])])}function cC(t){var e=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":iC({title:bt.none(),items:[]}),"overflow-button":Cw({name:"more",icon:bt.some("more-drawer"),disabled:!1,tooltip:bt.some("More..."),primary:!1,borderless:!1},bt.none(),t.providers)},splitToolbarBehaviours:uC(t,e)}}function sC(t){var e=t.cyclicKeying?"cyclic":"acyclic";return uk.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===cg.scrolling?["tox-toolbar--scrolling"]:[])},components:[uk.parts.groups({})],toolbarBehaviours:uC(t,e)})}function lC(t){return"string"==typeof t?t.split(" "):t}function fC(t,e){var n=k(k({},iE),e.menus),r=0<Ct(e.menus).length,o=B(void 0===e.menubar||!0===e.menubar?lC("file edit view insert format tools table help"):lC(!1===e.menubar?"":e.menubar),(function(t){var n=Mt(iE,t);return r?n||at(e.menus,t).exists((function(t){return Mt(t,"items")})):n}));return B(L(o,(function(r){var o=n[r],i={title:o.title,items:lC(o.items)},a=e,u=t.getParam("removed_menuitems","").split(/[ ,]/);return{text:i.title,getItems:function(){return W(i.items,(function(t){var e=t.toLowerCase();return 0===e.trim().length||R(u,(function(t){return t===e}))?[]:"separator"===e||"|"===e?[{type:"separator"}]:a.menuItems[e]?[a.menuItems[e]]:[]}))}}})),(function(t){return 0<t.getItems().length&&R(t.getItems(),(function(t){return"separator"!==t.type}))}))}function dC(t){function e(){t._skinLoaded=!0,t.fire("SkinLoaded")}return function(){t.initialized?e():t.on("init",e)}}function mC(t,e,n){return new xh((function(r,o){n.load(e,r,o),t.on("remove",(function(){return n.unload(e)}))}))}function pC(t,e){var n,r,o,i,a,u,c,s,l=(o=(n=e).getParam("skin"),i=n.getParam("skin_url"),!1!==o&&(r=o||"oxide",i=i?n.documentBaseURI.toAbsolute(i):Gg.baseURL+"/skins/ui/"+r),i);l&&e.contentCSS.push(l+(t?"/content.inline":"/content")+".min.css"),!1===e.getParam("skin")==0&&f(l)?xh.all([mC(e,l+"/skin.min.css",e.ui.styleSheetLoader),(u=e,c=l,s=Rt.fromDom(u.getElement()),gn(s).isSome()?mC(u,c+"/skin.shadowdom.min.css",$g.DOM.styleSheetLoader):xh.resolve())]).then(dC(e),(a=e,"Skin could not be loaded",function(){return a.fire("SkinLoadError",{message:"Skin could not be loaded"})})):dC(e)()}function hC(t,e){return function(n){function r(){n.setActive(t.formatter.match(e));var r=t.formatter.formatChanged(e,n.setActive);o.set(r)}var o=uc();return t.initialized?r():t.once("init",r),function(){t.off("init",r),o.clear()}}}function gC(t,e,n){return function(r){function o(){return n(r)}function i(){n(r),t.on(e,o)}return t.initialized?i():t.once("init",i),function(){t.off("init",i),t.off(e,o)}}}function vC(t){return function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("mceToggleFormat",!1,e.format)}))}}}function bC(t,e){return function(){return t.execCommand(e)}}function yC(t,e,n){var r,o,i,a=n.dataset,u="basic"===a.type?function(){return L(a.data,(function(t){return GO(t,n.isSelectedFor,n.getPreviewFor)}))}:a.getData;return{items:(r=e,o=n,i=function(t,e,n){var r="formatter"===t.type&&o.isInvalid(t);return 0===e?r?[]:c(t,e,!1,n).toArray():c(t,e,r,n).toArray()},{validateItems:s,getFetch:function(t,e){return function(n,r){r(ww(s(e()),dg.CLOSE_ON_EXECUTE,t,!1))}}}),getStyleItems:u};function c(t,e,n,a){var u=r.shared.providers.translate(t.title);if("separator"===t.type)return bt.some({type:"separator",text:u});if("submenu"!==t.type)return bt.some(k({type:"togglemenuitem",text:u,icon:t.icon,active:t.isSelected(a),disabled:n,onAction:o.onAction(t)},t.getStylePreview().fold((function(){return{}}),(function(t){return{meta:{style:t}}}))));var c=W(t.getStyleItems(),(function(t){return i(t,e,a)}));return 0===e&&c.length<=0?bt.none():bt.some({type:"nestedmenuitem",text:u,disabled:c.length<=0,getSubmenuItems:function(){return W(t.getStyleItems(),(function(t){return i(t,e,a)}))}})}function s(t){var e=o.getCurrentValue(),n=o.shouldHide?0:1;return W(t,(function(t){return i(t,n,e)}))}}function _C(t,e,n){var r=yC(0,e,n),o=r.items,i=r.getStyleItems,a=gC(t,"NodeChange",(function(t){var e=t.getComponent();n.updateText(e)}));return yw({text:n.icon.isSome()?bt.none():n.text,icon:n.icon,tooltip:bt.from(n.tooltip),role:bt.none(),fetch:o.getFetch(e,i),onSetup:a,getApi:function(t){return{getComponent:c(t)}},columns:1,presets:"normal",classes:n.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",e.shared)}function wC(t){return function(t){for(;t=t.parentNode;){var e=t.contentEditable;if(e&&"inherit"!==e)return YC(t)}return!1}(t)&&!JC(t)}function xC(t,e){function n(e){return sl(t)}function r(e,n){return function(r,o){return il(r,t,o).map((function(t){return e(t,o)})).getOr(n)}}function o(t,e){return"true"!==ae(t.element,"aria-hidden")}var i,a=r(o,!1),u=r((function(t,e){var n;o(t)&&(de(n=t.element,"display","none"),oe(n,"aria-hidden","true"),vo(t,Gi(),{name:e,visible:!1}))})),c=(i=u,function(t,e){Ot(e,(function(e){return i(t,e)}))}),s=r((function(t,e){var n;o(t)||(be(n=t.element,"display"),se(n,"aria-hidden"),vo(t,Gi(),{name:e,visible:!0}))}));return{uid:t.uid,dom:t.dom,components:e,behaviours:Gs(t.slotBehaviours),apis:{getSlotNames:n,getSlot:function(e,n){return il(e,t,n)},isShowing:a,hideSlot:u,hideAllSlots:function(t){return c(t,n())},showSlot:s}}}function OC(t,e){il(t,e,"overflow").each((function(n){QS(t,e,(function(t){var e=L(t,(function(t){return Sa(t)}));uk.setGroups(n,e)})),il(t,e,"overflow-button").each((function(t){Ek.hasGrown(n)&&Rp.on(t)})),Ek.refresh(n)}))}var SC,CC,kC,EC="data-value",MC=function(t,e,n,r){return L(n,(function(n){return RO(n)?{type:"togglemenuitem",text:n.text,value:n.value,active:n.value===r,onAction:function(){wf.setValue(t,n.value),vo(t,ey,{name:e}),Dp.focus(t)}}:{type:"nestedmenuitem",text:n.text,getSubmenuItems:function(){return MC(t,e,n.items,r)}}}))},TC=function(t,e){return tt(t,(function(t){return RO(t)?lt(t.value===e,t):TC(t.items,e)}))},DC=hl({name:"HtmlSelect",configFields:[fr("options"),$s("selectBehaviours",[Dp,wf]),kr("selectClasses",[]),kr("selectAttributes",{}),yr("data")],factory:function(t,e){var n=L(t.options,(function(t){return{dom:{tag:"option",value:t.value,innerHtml:t.text}}})),r=t.data.map((function(t){return uo("initialValue",t)})).getOr({});return{uid:t.uid,dom:{tag:"select",classes:t.selectClasses,attributes:t.selectAttributes},components:n,behaviours:Ks(t.selectBehaviours,[Dp.config({}),wf.config({store:k({mode:"manual",getValue:function(t){return Yo(t.element)},setValue:function(e,n){H(t.options,(function(t){return t.value===n})).isSome()&&Jo(e.element,n)}},r)})])}}}),AC=Object.freeze({__proto__:null,events:function(t,e){var n=t.stream.streams.setup(t,e);return Qi([Oo(t.event,n),ta((function(){return e.cancel()}))].concat(t.cancelEvent.map((function(t){return[Oo(t,(function(){return e.cancel()}))]})).getOr([])))}}),PC=Object.freeze({__proto__:null,throttle:zO,init:function(t){return t.stream.streams.state(t)}}),RC=hu({fields:[dr("stream",sr("mode",{throttle:[fr("delay"),kr("stopEvent",!0),Xa("streams",{setup:function(t,e){var n=t.stream,r=ch(t.onStream,n.delay);return e.setTimer(r),function(t,e){r.throttle(t,e),n.stopEvent&&e.stop()}},state:zO})]})),kr("event","input"),yr("cancelEvent"),Ka("onStream")],name:"streaming",active:AC,state:PC}),IC=function(t){jO(t,(function(t,e){return t.setSelectionRange(e.length,e.length)}))},zC=c("alloy.typeahead.itemexecute"),LC=c([yr("lazySink"),fr("fetch"),kr("minChars",5),kr("responseTime",1e3),$a("onOpen"),kr("getHotspot",bt.some),kr("getAnchorOverrides",c({})),kr("layouts",bt.none()),kr("eventOrder",{}),Ir("model",{},[kr("getDisplayText",(function(t){return void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.value})),kr("selectsOver",!0),kr("populateFromBrowse",!0)]),$a("onSetValue"),Ga("onExecute"),$a("onItemExecute"),kr("inputClasses",[]),kr("inputAttributes",{}),kr("inputStyles",{}),kr("matchWidth",!0),kr("useMinWidth",!1),kr("dismissOnBlur",!0),Ua(["openClass"]),yr("initialData"),$s("typeaheadBehaviours",[Dp,wf,RC,Cp,Rp,Ry]),ao("previewing",(function(){return zr(!0)}))].concat(ly()).concat(Vy())),jC=c([Uf({schema:[Va()],name:"menu",overrides:function(t){return{fakeFocus:!0,onHighlight:function(e,n){t.previewing.get()?e.getSystem().getByUid(t.uid).each((function(r){(function(t,e,n){if(t.selectsOver){var r=wf.getValue(e),o=t.getDisplayText(r),i=wf.getValue(n);return 0===t.getDisplayText(i).indexOf(o)?bt.some((function(){var t;LO(0,e,n),t=o.length,jO(e,(function(e,n){return e.setSelectionRange(t,n.length)}))})):bt.none()}return bt.none()})(t.model,r,n).fold((function(){return cd.dehighlight(e,n)}),(function(t){return t()}))})):e.getSystem().getByUid(t.uid).each((function(e){t.model.populateFromBrowse&&LO(t.model,e,n)})),t.previewing.set(!1)},onExecute:function(e,n){return e.getSystem().getByUid(t.uid).toOptional().map((function(t){return vo(t,zC(),{item:n}),!0}))},onHover:function(e,n){t.previewing.set(!1),e.getSystem().getByUid(t.uid).each((function(e){t.model.populateFromBrowse&&LO(t.model,e,n)}))}}}})]),BC=gl({name:"Typeahead",configFields:LC(),partFields:jC(),factory:function(t,e,n,r){function o(e,n,o){t.previewing.set(!1);var u=Ry.getCoupled(e,"sandbox");lf.isOpen(u)?td.getCurrent(u).each((function(t){cd.getHighlighted(t).fold((function(){o(t)}),(function(){_o(u,t.element,"keydown",n)}))})):jy(t,i(e),e,u,r,(function(t){td.getCurrent(t).each(o)}),_y.HighlightFirst).get(a)}function i(t){return function(e){return e.map((function(e){var n=W(it(e.menus),(function(t){return B(t.items,(function(t){return"item"===t.type}))}));return wf.getState(t).update(L(n,(function(t){return t.data}))),e}))}}var u=Nb(t),c=[Dp.config({}),wf.config({onSetValue:t.onSetValue,store:k({mode:"dataset",getDataKey:function(t){return Yo(t.element)},getFallbackEntry:function(t){return{value:t,meta:{}}},setValue:function(e,n){Jo(e.element,t.model.getDisplayText(n))}},t.initialData.map((function(t){return uo("initialValue",t)})).getOr({}))}),RC.config({stream:{mode:"throttle",delay:t.responseTime,stopEvent:!1},onStream:function(e,n){var o,u=Ry.getCoupled(e,"sandbox");Dp.isFocused(e)&&Yo(e.element).length>=t.minChars&&(o=td.getCurrent(u).bind((function(t){return cd.getHighlighted(t).map(wf.getValue)})),t.previewing.set(!0),jy(t,i(e),e,u,r,(function(e){td.getCurrent(u).each((function(e){o.fold((function(){t.model.selectsOver&&cd.highlightFirst(e)}),(function(t){cd.highlightBy(e,(function(e){return wf.getValue(e).value===t.value})),cd.getHighlighted(e).orThunk((function(){return cd.highlightFirst(e),bt.none()}))}))}))}),_y.HighlightFirst).get(a))},cancelEvent:zi()}),Cp.config({mode:"special",onDown:function(t,e){return o(t,e,cd.highlightFirst),bt.some(!0)},onEscape:function(t){var e=Ry.getCoupled(t,"sandbox");return lf.isOpen(e)?(lf.close(e),bt.some(!0)):bt.none()},onUp:function(t,e){return o(t,e,cd.highlightLast),bt.some(!0)},onEnter:function(e){var n=Ry.getCoupled(e,"sandbox"),r=lf.isOpen(n);if(r&&!t.previewing.get())return td.getCurrent(n).bind((function(t){return cd.getHighlighted(t)})).map((function(t){return vo(e,zC(),{item:t}),!0}));var o=wf.getValue(e);return go(e,zi()),t.onExecute(n,e,o),r&&lf.close(n),bt.some(!0)}}),Rp.config({toggleClass:t.markers.openClass,aria:{mode:"expanded"}}),Ry.config({others:{sandbox:function(e){return Ny(t,e,{onOpen:function(){return Rp.on(e)},onClose:function(){return Rp.off(e)}})}}}),im("typeaheadevents",[na((function(e){By(t,i(e),e,r,a,_y.HighlightFirst).get(a)})),Oo(zC(),(function(e,n){var r=Ry.getCoupled(e,"sandbox");LO(t.model,e,n.event.item),go(e,zi()),t.onItemExecute(e,r,n.event.item,wf.getValue(e)),lf.close(r),IC(e)}))].concat(t.dismissOnBlur?[Oo(Ei(),(function(t){var e=Ry.getCoupled(t,"sandbox");wu(e.element).isNone()&&lf.close(e)}))]:[]))];return{uid:t.uid,dom:Hb($r(t,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:k(k({},u),Ks(t.typeaheadBehaviours,c)),eventOrder:t.eventOrder}}}),FC=function(t){return k(k({},t),{toCached:function(){return FC(t.toCached())},bindFuture:function(e){return FC(t.bind((function(t){return t.fold((function(t){return Ey(jn.error(t))}),(function(t){return e(t)}))})))},bindResult:function(e){return FC(t.map((function(t){return t.bind(e)})))},mapResult:function(e){return FC(t.map((function(t){return t.map(e)})))},mapError:function(e){return FC(t.map((function(t){return t.mapError(e)})))},foldResult:function(e,n){return t.map((function(t){return t.fold(e,n)}))},withTimeout:function(e,n){return FC(ky((function(r){var o=!1,i=setTimeout((function(){o=!0,r(jn.error(n()))}),e);t.get((function(t){o||(clearTimeout(i),r(t))}))})))}})},NC=function(t){return FC(ky(t))},HC={type:"separator"},VC=Ro("aria-invalid"),UC={bar:VO((function(t,e){return n=e.shared,{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:L(t.items,n.interpreter)};var n})),collection:VO((function(t,e){return o=t,i=e.shared.providers,c=o.label.map((function(t){return Fb(t,i)})),l=n((function(t,e,n,r){e.stop(),i.isDisabled()||vo(t,oy,{name:o.name,value:r})})),f=[Oo(mi(),n((function(t,e,n){bu(n)}))),Oo(_i(),l),Oo(Pi(),l),Oo(pi(),n((function(t,e,n){Da(t.element,"."+_g).each((function(t){Go(t,_g)})),$o(n,_g)}))),Oo(hi(),n((function(t){Da(t.element,"."+_g).each((function(t){Go(t,_g)}))}))),na(n((function(t,e,n,r){vo(t,oy,{name:o.name,value:r})})))],Bb(c,Xb.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==o.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:s},behaviours:Yu([ad.config({disabled:i.isDisabled,onDisabled:function(t){r(t,(function(t){$o(t,"tox-collection__item--state-disabled"),oe(t,"aria-disabled",!0)}))},onEnabled:function(t){r(t,(function(t){Go(t,"tox-collection__item--state-disabled"),se(t,"aria-disabled")}))}}),ov(),Ep.config({}),wf.config({store:{mode:"memory",initialValue:[]},onSetValue:function(t,e){var n=t,r=L(e,(function(t){var e=rh.translate(t.text),n=1===o.columns?'<div class="tox-collection__item-label">'+e+"</div>":"",r='<div class="tox-collection__item-icon">'+t.icon+"</div>",a={_:" "," - ":" ","-":" "},u=e.replace(/\_| \- |\-/g,(function(t){return a[t]}));return'<div class="tox-collection__item'+(i.isDisabled()?" tox-collection__item--state-disabled":"")+'" tabindex="-1" data-collection-item-value="'+Qb.encodeAllRaw(t.value)+'" title="'+u+'" aria-label="'+u+'">'+r+n+"</div>"})),a=L("auto"!==o.columns&&1<o.columns?z(r,o.columns):[r],(function(t){return'<div class="tox-collection__group">'+t.join("")+"</div>"}));Ao(n.element,a.join("")),"auto"===o.columns&&Jh(t,5,"tox-collection__item").each((function(e){var n=e.numRows,r=e.numColumns;Cp.setGridSize(t,n,r)})),go(t,sy)}}),Jb.config({}),Cp.config(1===(u=o.columns)?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===u?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:".tox-collection__group",cell:"."+pg}}),im("collection-events",f)]),eventOrder:((a={})[Di()]=["disabling","alloy.base.behaviour","collection-events"],a)}),["tox-form__group--collection"],[]);function n(t){return function(e,n){Aa(n.event.target,"[data-collection-item-value]").each((function(r){t(e,n,r,ae(r,"data-collection-item-value"))}))}}function r(t,e){return L(ss(t.element,".tox-collection__item"),e)}var o,i,a,u,c,l,f})),alertbanner:VO((function(t,e){return r=e.shared.providers,Gb.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+(n=t).level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[nh.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:zm(n.icon,r.icons),attributes:{title:r.translate(n.iconTooltip)}},action:function(t){vo(t,oy,{name:"alert-banner",value:n.url})},buttonBehaviours:Yu([Lm()])})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:r.translate(n.text)}}]});var n,r})),input:VO((function(t,e){return r=e.shared.providers,IO({name:(n=t).name,multiline:!1,label:n.label,inputMode:n.inputMode,placeholder:n.placeholder,flex:!1,disabled:n.disabled,classname:"tox-textfield",validation:bt.none(),maximized:n.maximized},r);var n,r})),textarea:VO((function(t,e){return r=e.shared.providers,IO({name:(n=t).name,multiline:!0,label:n.label,inputMode:bt.none(),placeholder:n.placeholder,flex:!0,disabled:n.disabled,classname:"tox-textarea",validation:bt.none(),maximized:n.maximized},r);var n,r})),label:VO((function(t,e){return o={dom:{tag:"label",innerHtml:(r=e.shared).providers.translate((n=t).label),classes:["tox-label"]}},i=L(n.items,r.interpreter),{dom:{tag:"div",classes:["tox-form__group"]},components:[o].concat(i),behaviours:Yu([Bw(),Ep.config({}),Fw(bt.none()),Cp.config({mode:"acyclic"})])};var n,r,o,i})),iframe:(SC=function(t,e){return n=t,r=e.shared.providers,a=Xx&&n.sandboxed,u=k(k({},n.label.map((function(t){return{title:t}})).getOr({})),a?{sandbox:"allow-scripts allow-same-origin"}:{}),o=a,i=zr(""),c={getValue:function(t){return i.get()},setValue:function(t,e){var n;o?oe(t.element,"srcdoc",e):(oe(t.element,"src","javascript:''"),(n=t.element.dom.contentWindow.document).open(),n.write(e),n.close()),i.set(e)}},Bb(n.label.map((function(t){return Fb(t,r)})),Xb.parts.field({factory:{sketch:function(t){return G_({uid:t.uid,dom:{tag:"iframe",attributes:u},behaviours:Yu([Jb.config({}),Dp.config({}),$x(bt.none(),c.getValue,c.setValue)])})}}}),["tox-form__group--stretched"],[]);var n,r,o,i,a,u,c},function(t,e,n){var r=$r(e,{source:"dynamic"});return VO(SC)(t,r,n)}),button:VO((function(t,e){return n=t,r=e.shared.providers,o=Tw(n.name,"custom"),Bb(bt.none(),Xb.parts.field(k({factory:nh},Ew(n,bt.some(o),r,[Gx(""),Bw()]))),[],[]);var n,r,o})),checkbox:VO((function(t,e){return o=t,i=e.shared.providers,a=wf.config({store:{mode:"manual",getValue:function(t){return t.element.dom.checked},setValue:function(t,e){t.element.dom.checked=e}}}),u=Xb.parts.field({factory:{sketch:s},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:Yu([Bw(),ad.config({disabled:function(){return o.disabled||i.isDisabled()}}),Jb.config({}),Dp.config({}),a,Cp.config({mode:"special",onEnter:n,onSpace:n,stopSpaceKeyup:!0}),im("checkbox-events",[Oo(yi(),(function(t,e){vo(t,ey,{name:o.name})}))])])}),c=Xb.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:i.translate(o.label)},behaviours:Yu([qw.config({})])}),l=Am({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[r("checked"),r("unchecked")]}),Xb.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[u,l.asSpec(),c],fieldBehaviours:Yu([ad.config({disabled:function(){return o.disabled||i.isDisabled()},disableClass:"tox-checkbox--disabled",onDisabled:function(t){Xb.getField(t).each(ad.disable)},onEnabled:function(t){Xb.getField(t).each(ad.enable)}}),ov()])});function n(t){return t.element.dom.click(),bt.some(!0)}function r(t){return Bm("checked"===t?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t]},i.icons)}var o,i,a,u,c,l})),colorinput:VO((function(t,e){return r=t,o=e.shared,i=e.colorinput,s=Xb.parts.field({factory:fy,inputClasses:["tox-textfield"],onSetValue:function(t){return Ay.run(t).get(a)},inputBehaviours:Yu([ad.config({disabled:o.providers.isDisabled}),ov(),Jb.config({}),Ay.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return qt(t.element)},notify:{onValid:function(t){var e=wf.getValue(t);vo(t,Xw,{color:e})}},validator:{validateOnLoad:!1,validate:function(t){var e=wf.getValue(t);if(0===e.length)return Ey(jn.value(!0));var n=Rt.fromTag("span");de(n,"background-color",e);var r=ge(n,"background-color").fold((function(){return jn.error("blah")}),(function(t){return jn.value(e)}));return Ey(r)}}})]),selectOnFocus:!1}),l=r.label.map((function(t){return Fb(t,o.providers)})),f=Am((u={dom:{tag:"span",attributes:{"aria-label":o.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[Vu,Hu,Gu]},onLtr:function(){return[Hu,Vu,Gu]}},components:[],fetch:lb(i.getColors(),i.hasCustomColors()),columns:i.getColorCols(),presets:"color",onItemAction:function(t,e){f.getOpt(t).each((function(t){"custom"===e?i.colorPicker((function(e){e.fold((function(){return go(t,Jw)}),(function(e){n(t,e),ib(e)}))}),"#ffffff"):n(t,"remove"===e?"":e)}))}},Kw.sketch({dom:u.dom,components:u.components,toggleClass:"mce-active",dropdownBehaviours:Yu([Nv((c=o).providers.isDisabled),ov(),qw.config({}),Jb.config({})]),layouts:u.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:c.getSink,fetch:function(t){return ky((function(t){return u.fetch(t)})).map((function(e){return bt.from(Db($r(pb(Ro("menu-value"),e,(function(e){u.onItemAction(t,e)}),u.columns,u.presets,dg.CLOSE_ON_EXECUTE,O,c.providers),{movement:hb(u.columns,u.presets)})))}))},parts:{menu:Uh(0,0,u.presets)}}))),Xb.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:l.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[s,f.asSpec()]}]),fieldBehaviours:Yu([im("form-field-events",[Oo(Xw,(function(t,e){f.getOpt(t).each((function(t){de(t.element,"background-color",e.event.color)})),vo(t,ey,{name:r.name})})),Oo(Yw,(function(t,e){Xb.getField(t).each((function(n){wf.setValue(n,e.event.value),td.getCurrent(t).each(Dp.focus)}))})),Oo(Jw,(function(t,e){Xb.getField(t).each((function(e){td.getCurrent(t).each(Dp.focus)}))}))])])});function n(t,e){vo(t,Yw,{value:e})}var r,o,i,u,c,s,l,f})),colorpicker:VO((function(t){var e=Am(V_(U_,(function(t){return"tox-"+t})).sketch({dom:{tag:"div",classes:["tox-color-picker-container"],attributes:{role:"presentation"}},onValidHex:function(t){vo(t,oy,{name:"hex-valid",value:!0})},onInvalidHex:function(t){vo(t,oy,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[e.asSpec()],behaviours:Yu([wf.config({store:{mode:"manual",getValue:function(t){var n=e.get(t);return td.getCurrent(n).bind((function(t){return wf.getValue(t).hex})).map((function(t){return"#"+t})).getOr("")},setValue:function(t,n){var r=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(n),o=e.get(t);td.getCurrent(o).fold((function(){}),(function(t){wf.setValue(t,{hex:bt.from(r[1]).getOr("")}),Rx.getField(t,"hex").each((function(t){go(t,bi())}))}))}}}),Bw()])}})),dropzone:VO((function(t,e){return function(t,e){function n(t,e){e.stop()}function r(t){return function(e,n){Ot(t,(function(t){t(e,n)}))}}function o(t,e){ad.isDisabled(t)||a(t,e.event.raw.dataTransfer.files)}function i(t,e){a(t,e.event.raw.target.files)}function a(n,r){var o,i;wf.setValue(n,(o=r,i=Vx.explode(e.getSetting("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string")),B(St(o),(function(t){return R(i,(function(e){return At(t.name.toLowerCase(),"."+e.toLowerCase())}))})))),vo(n,ey,{name:t.name})}var u=Am({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:Yu([im("input-file-events",[Mo(_i()),Mo(Pi())])])});return Bb(t.label.map((function(t){return Fb(t,e)})),Xb.parts.field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:Yu([Gx([]),Bw(),ad.config({}),Rp.config({toggleClass:"dragenter",toggleOnExecute:!1}),im("dropzone-events",[Oo("dragenter",r([n,Rp.toggle])),Oo("dragleave",r([n,Rp.toggle])),Oo("dragover",n),Oo("drop",r([n,o])),Oo(yi(),i)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:e.translate("Drop an image here")}},nh.sketch({dom:{tag:"button",innerHtml:e.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[u.asSpec()],action:function(t){u.get(t).element.dom.click()},buttonBehaviours:Yu([Jb.config({}),Nv(e.isDisabled),ov()])})]}]}}}}),["tox-form__group--stretched"],[])}(t,e.shared.providers)})),grid:VO((function(t,e){return n=e.shared,{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+t.columns+"col"]},components:L(t.items,n.interpreter)};var n})),listbox:VO((function(t,e){return n=t,o=(r=e).shared.providers,i=Q(n.items).filter(RO),u=n.label.map((function(t){return Fb(t,o)})),s={dom:{tag:"div",classes:["tox-listboxfield"]},components:[Xb.parts.field({dom:{},factory:{sketch:function(t){return yw({uid:t.uid,text:i.map((function(t){return t.text})),icon:bt.none(),tooltip:n.label,role:bt.none(),fetch:function(t,e){e(ww(MC(t,n.name,n.items,wf.getValue(t)),dg.CLOSE_ON_EXECUTE,r,!1))},onSetup:c(a),getApi:c({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[Jb.config({}),wf.config({store:{mode:"manual",initialValue:i.map((function(t){return t.value})).getOr(""),getValue:function(t){return ae(t.element,EC)},setValue:function(t,e){TC(n.items,e).each((function(e){oe(t.element,EC,e.value),vo(t,mO,{text:e.text})}))}}})]},"tox-listbox",r.shared)}}})]},Xb.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:U([u.toArray(),[s]]),fieldBehaviours:Yu([ad.config({disabled:c(n.disabled),onDisabled:function(t){Xb.getField(t).each(ad.disable)},onEnabled:function(t){Xb.getField(t).each(ad.enable)}})])});var n,r,o,i,u,s})),selectbox:VO((function(t,e){return n=t,r=e.shared.providers,o=L(n.items,(function(t){return{text:r.translate(t.text),value:t.value}})),i=n.label.map((function(t){return Fb(t,r)})),a={dom:{tag:"div",classes:["tox-selectfield"]},components:U([[Xb.parts.field({dom:{},selectAttributes:{size:n.size},options:o,factory:DC,selectBehaviours:Yu([ad.config({disabled:function(){return n.disabled||r.isDisabled()}}),Jb.config({}),im("selectbox-change",[Oo(yi(),(function(t,e){vo(t,ey,{name:n.name})}))])])})],(1<n.size?bt.none():bt.some(Bm("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},r.icons))).toArray()])},Xb.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:U([i.toArray(),[a]]),fieldBehaviours:Yu([ad.config({disabled:function(){return n.disabled||r.isDisabled()},onDisabled:function(t){Xb.getField(t).each(ad.disable)},onEnabled:function(t){Xb.getField(t).each(ad.enable)}}),ov()])});var n,r,o,i,a})),sizeinput:VO((function(t,e){return zw(t,e.shared.providers)})),urlinput:VO((function(t,e){return function(t,e,n){function r(e){var r=wf.getValue(e);n.addToHistory(r.value,t.filetype)}var o,i,u,c,s=e.shared.providers,l=Xb.parts.field({factory:BC,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":VC,type:"url"},minChars:0,responseTime:0,fetch:function(r){var o,i,a,u,c=ww((o=t.filetype,i=n,a=wf.getValue(r),u=void 0!==a.meta.text?a.meta.text:a.value,i.getLinkInformation().fold((function(){return[]}),(function(t){var e=HO(u,L(i.getHistory(o),(function(t){return FO(t,t)})));return"file"===o?N([e,HO(u,NO("header",t.targets)),HO(u,U([bt.from(t.anchorTop).map((function(t){return FO("<top>",t)})).toArray(),NO("anchor",t.targets),bt.from(t.anchorBottom).map((function(t){return FO("<bottom>",t)})).toArray()]))],(function(t,e){return 0===t.length||0===e.length?t.concat(e):t.concat(HC,e)}),[]):e}))),dg.BUBBLE_TO_SANDBOX,e,!1);return Ey(c)},getHotspot:function(t){return g.getOpt(t)},onSetValue:function(t,e){t.hasConfigured(Ay)&&Ay.run(t).get(a)},typeaheadBehaviours:Yu(U([n.getValidationHandler().map((function(e){return Ay.config({getRoot:function(t){return qt(t.element)},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,e){d.getOpt(t).each((function(t){oe(t.element,"title",s.translate(e))}))}},validator:{validate:function(n){var r=wf.getValue(n);return NC((function(n){e({type:t.filetype,url:r.value},(function(t){var e,r;"invalid"===t.status?(e=jn.error(t.message),n(e)):(r=jn.value(t.message),n(r))}))}))},validateOnLoad:!1}})})).toArray(),[ad.config({disabled:function(){return t.disabled||s.isDisabled()}}),Jb.config({}),im("urlinput-events",U(["file"===t.filetype?[Oo(bi(),(function(e){vo(e,ey,{name:t.name})}))]:[],[Oo(yi(),(function(e){vo(e,ey,{name:t.name}),r(e)})),Oo(Mi(),(function(e){vo(e,ey,{name:t.name}),r(e)}))]]))]])),eventOrder:((o={})[bi()]=["streaming","urlinput-events","invalidating"],o),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:e.shared.getSink,parts:{menu:Uh(0,0,"normal")},onExecute:function(t,e,n){vo(e,iy,{})},onItemExecute:function(e,n,o,i){r(e),vo(e,ey,{name:t.name})}}),f=t.label.map((function(t){return Fb(t,s)})),d=Am((i="invalid",u=bt.some(VC),Bm("warning",{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+i],attributes:k({title:s.translate(c=void 0===c?i:c),"aria-live":"polite"},u.fold((function(){return{}}),(function(t){return{id:t}})))},s.icons))),m=Am({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[d.asSpec()]}),p=n.getUrlPicker(t.filetype),h=Ro("browser.url.event"),g=Am({dom:{tag:"div",classes:["tox-control-wrap"]},components:[l,m.asSpec()],behaviours:Yu([ad.config({disabled:function(){return t.disabled||s.isDisabled()}})])}),v=Am(Mw({name:t.name,icon:bt.some("browse"),text:t.label.getOr(""),disabled:t.disabled,primary:!1,borderless:!0},(function(t){return go(t,h)}),s,[],["tox-browse-url"]));return Xb.sketch({dom:ty([]),components:f.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:U([[g.asSpec()],p.map((function(){return v.asSpec()})).toArray()])}]),fieldBehaviours:Yu([ad.config({disabled:function(){return t.disabled||s.isDisabled()},onDisabled:function(t){Xb.getField(t).each(ad.disable),v.getOpt(t).each(ad.disable)},onEnabled:function(t){Xb.getField(t).each(ad.enable),v.getOpt(t).each(ad.enable)}}),ov(),im("url-input-events",[Oo(h,(function(e){td.getCurrent(e).each((function(n){var r=wf.getValue(n),o=k({fieldname:t.name},r);p.each((function(r){r(o).get((function(r){wf.setValue(n,r),vo(e,ey,{name:t.name})}))}))}))}))])])})}(t,e,e.urlinput)})),customeditor:VO((function(t){var e=cc(),n=Am({dom:{tag:t.tag}}),r=cc();return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:Yu([im("custom-editor-events",[Zi((function(o){n.getOpt(o).each((function(n){(Mt(t,"init")?t.init(n.element.dom):Hx.load(t.scriptId,t.scriptUrl).then((function(e){return e(n.element.dom,t.settings)}))).then((function(t){r.on((function(e){t.setValue(e)})),r.clear(),e.set(t)}))}))}))]),wf.config({store:{mode:"manual",getValue:function(){return e.get().fold((function(){return r.get().getOr("")}),(function(t){return t.getValue()}))},setValue:function(t,n){e.get().fold((function(){r.set(n)}),(function(t){return t.setValue(n)}))}}}),Bw()]),components:[n.asSpec()]}})),htmlpanel:VO((function(t){return"presentation"===t.presets?Gb.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html}}):Gb.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html,attributes:{role:"document"}},containerBehaviours:Yu([Jb.config({}),Dp.config({})])})})),imagetools:VO((function(t,e){return PO(t,e.shared.providers)})),table:VO((function(t,e){return function(t,e){function n(t){return{dom:{tag:"td",innerHtml:e.translate(t)}}}return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:L(t.header,(function(t){return{dom:{tag:"th",innerHtml:e.translate(t)}}}))}]},{dom:{tag:"tbody"},components:L(t.cells,(function(t){return{dom:{tag:"tr"},components:L(t,n)}}))}],behaviours:Yu([Jb.config({}),Dp.config({})])}}(t,e.shared.providers)})),panel:VO((function(t,e){return{dom:{tag:"div",classes:t.classes},components:L(t.items,e.shared.interpreter)}}))},WC={field:function(t,e){return e}},$C=function(t,e,n){return at(UC,e.type).fold((function(){return e}),(function(r){return r(t,e,n)}))},GC={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},KC=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],qC=function(t){return N(t,(function(t,e){if(Mt(e,"items")){var n=qC(e.items);return{customFormats:t.customFormats.concat(n.customFormats),formats:t.formats.concat([{title:e.title,items:n.formats}])}}if(Mt(e,"inline")||Mt(e,"block")||Mt(e,"selector")){var r="custom-"+(f(e.name)?e.name:e.title.toLowerCase());return{customFormats:t.customFormats.concat([{name:r,format:e}]),formats:t.formats.concat([{title:e.title,format:r,icon:e.icon}])}}return k(k({},t),{formats:t.formats.concat(e)})}),{customFormats:[],formats:[]})},XC=Vx.trim,YC=qO("true"),JC=qO("false"),QC=function(t){var e=L(ss(Rt.fromDom(t),"h1,h2,h3,h4,h5,h6,a:not([href])"),(function(t){return t.dom}));return B(L(B(e,ZO),tS).concat(L(B(e,JO),eS)),nS)},ZC="tinymce-url-history",tk=Xf,ek=Kf,nk=c([kr("shell",!1),fr("makeItem"),kr("setupItem",a),xf("listBehaviours",[Ep])]),rk=c([Wf({name:"items",overrides:function(){return{behaviours:Yu([Ep.config({})])}}})]),ok=gl({name:c("CustomList")(),configFields:nk(),partFields:rk(),factory:function(t,e,n,r){var o=t.shell?{behaviours:[Ep.config({})],components:[]}:{behaviours:[],components:e};return{uid:t.uid,dom:t.dom,components:o.components,behaviours:Ks(t.listBehaviours,o.behaviours),apis:{setItems:function(e,n){var r;r=e,(t.shell?bt.some(r):il(r,t,"items")).fold((function(){throw new Error("Custom List was defined to not be a shell, but no item container was specified in components")}),(function(r){var o=Ep.contents(r),i=n.length,a=i-o.length,u=0<a?I(a,(function(){return t.makeItem()})):[],c=o.slice(i);Ot(c,(function(t){return Ep.remove(r,t)})),Ot(u,(function(t){return Ep.append(r,t)}));var s=Ep.contents(r);Ot(s,(function(r,o){t.setupItem(e,r,n[o],o)}))}))}}}},apis:{setItems:function(t,e,n){t.setItems(e,n)}}}),ik=c([fr("dom"),kr("shell",!0),$s("toolbarBehaviours",[Ep])]),ak=c([Wf({name:"groups",overrides:function(){return{behaviours:Yu([Ep.config({})])}}})]),uk=gl({name:"Toolbar",configFields:ik(),partFields:ak(),factory:function(t,e,n,r){var o=t.shell?{behaviours:[Ep.config({})],components:[]}:{behaviours:[],components:e};return{uid:t.uid,dom:t.dom,components:o.components,behaviours:Ks(t.toolbarBehaviours,o.behaviours),apis:{setGroups:function(e,n){var r;r=e,(t.shell?bt.some(r):il(r,t,"groups")).fold((function(){throw new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")}),(function(t){Ep.set(t,n)}))}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,e,n){t.setGroups(e,n)}}}),ck=c([]),sk=Object.freeze({__proto__:null,setup:a,isDocked:O,getBehaviours:ck}),lk=Lr([{static:[]},{absolute:["positionCss"]},{fixed:["positionCss"]}]),fk=function(t,e,n){var r,o,i,a;t.getSystem().isConnected()&&(i=n,a=(o=e).lazyViewport(r=t),i.isDocked()&&OS(r,o,i,a),function(t,e,n){var r,o,i,a=t.element;return ct(ge(a,"position"),"fixed")?(o=e,yS(r=a,i=n).filter((function(t){return bS(i.getModes(),t,o)})).bind((function(t){return _S(r,t,i)}))):function(t,e,n){var r,o,i=Rn(t);if(bS(n.getModes(),i,e))return bt.none();r=t,o=i,n.setInitialPos({style:function(){var t={},e=r.dom;if(pt(e))for(var n=0;n<e.style.length;n++){var o=e.style.item(n);t[o]=e.style[o]}return t}(),position:he(r,"position")||"static",bounds:o});var a=In(),u=i.x-a.x,c=e.y-a.y,s=a.bottom-e.bottom,l=i.y<=e.y;return bt.some(lk.fixed(Ou("fixed",bt.some(u),l?bt.some(c):bt.none(),bt.none(),l?bt.none():bt.some(s))))}(a,e,n)}(r,a,i).each((function(t){t.fold((function(){return wS(r,o,i)}),(function(t){return xS(r,o,i,t)}),(function(t){OS(r,o,i,a,!0),xS(r,o,i,t)}))})))},dk=Object.freeze({__proto__:null,refresh:fk,reset:SS,isDocked:function(t,e,n){return n.isDocked()},getModes:function(t,e,n){return n.getModes()},setModes:function(t,e,n,r){return n.setModes(r)}}),mk=Object.freeze({__proto__:null,events:function(t,e){return Qi([To(xi(),(function(n,r){t.contextual.each((function(t){Ko(n.element,t.transitionClass)&&(Xo(n.element,[t.transitionClass,t.fadeInClass]),(e.isVisible()?t.onShown:t.onHidden)(n)),r.stop()}))})),Oo(Fi(),(function(n,r){fk(n,t,e)})),Oo(Ni(),(function(n,r){SS(n,t,e)}))])}}),pk=hu({fields:[Cr("contextual",[mr("fadeInClass"),mr("fadeOutClass"),mr("transitionClass"),hr("lazyContext"),$a("onShow"),$a("onShown"),$a("onHide"),$a("onHidden")]),Pr("lazyViewport",In),Rr("modes",["top","bottom"],Zr),$a("onDocked"),$a("onUndocked")],name:"docking",active:mk,apis:dk,state:Object.freeze({__proto__:null,init:function(t){var e=zr(!1),n=zr(!0),r=cc(),o=zr(t.modes);return va({isDocked:e.get,setDocked:e.set,getInitialPos:r.get,setInitialPos:r.set,clearInitialPos:r.clear,isVisible:n.get,setVisible:n.set,getModes:o.get,setModes:o.set,readState:function(){return"docked: "+e.get()+", visible: "+n.get()+", modes: "+o.get().join(",")}})}})}),hk=c(Ro("toolbar-height-change")),gk={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},vk="tox-tinymce--toolbar-sticky-on",bk="tox-tinymce--toolbar-sticky-off",yk=Object.freeze({__proto__:null,setup:function(t,e,n){t.inline||(e.header.isPositionedAtTop()||t.on("ResizeEditor",(function(){n().each(pk.reset)})),t.on("ResizeWindow ResizeEditor",(function(){n().each(kS)})),t.on("SkinLoaded",(function(){n().each((function(t){pk.isDocked(t)?pk.reset(t):pk.refresh(t)}))})),t.on("FullscreenStateChanged",(function(){n().each(pk.reset)}))),t.on("AfterScrollIntoView",(function(t){n().each((function(e){pk.refresh(e);var n,r,o,i,a,u,c,s,l,f,d,m,p,h,g,v,b=e.element;Td(b)&&(n=t,i=(o=Wt(r=b)).dom.defaultView.innerHeight,a=ze(o),c=Ne(u=Rt.fromDom(n.elm)),s=we(u),f=(l=c.y)+s,d=Se(r),m=we(r),h=(p=d.top)+m,g=Math.abs(p-a.top)<2,v=Math.abs(h-(a.top+i))<2,g&&l<h?Le(a.left,l-m,o):v&&p<f&&Le(a.left,l-i+s+m,o))}))})),t.on("PostRender",(function(){MS(t,!1)}))},isDocked:function(t){return t().map(pk.isDocked).getOr(!1)},getBehaviours:TS}),_k=Xr([mr("type"),dr("items",er([Yr([mr("name"),br("items",Zr)]),Zr]))].concat(Mh)),wk=[xr("text"),xr("tooltip"),xr("icon"),hr("fetch"),Pr("onSetup",(function(){return a}))],xk=Xr(M([mr("type")],wk,!0)),Ok=Xr([mr("type"),xr("tooltip"),xr("icon"),xr("text"),Or("select"),hr("fetch"),Pr("onSetup",(function(){return a})),Dr("presets","normal",["normal","color","listpreview"]),kr("columns",1),hr("onAction"),hr("onItemAction")]),Sk=hl({factory:function(t,e){var n={focus:Cp.focusIn,setMenus:function(t,n){var r=L(n,(function(t){return Ow(DS({type:"menubutton",text:t.text,fetch:function(e){e(t.getItems())}}).mapError((function(t){return oo(t)})).getOrDie(),"tox-mbtn",e.backstage,bt.some("menuitem"))}));Ep.set(t,r)}};return{uid:t.uid,dom:t.dom,components:[],behaviours:Yu([Ep.config({}),im("menubar-events",[Zi((function(e){t.onSetup(e)})),Oo(mi(),(function(t,e){Da(t.element,".tox-mbtn--active").each((function(n){Aa(e.event.target,".tox-mbtn").each((function(e){Vt(n,e)||t.getSystem().getByDom(n).each((function(n){t.getSystem().getByDom(e).each((function(t){Kw.expand(t),Kw.close(n),Dp.focus(t)}))}))}))}))})),Oo($i(),(function(t,e){e.event.prevFocus.bind((function(e){return t.getSystem().getByDom(e).toOptional()})).each((function(n){e.event.newFocus.bind((function(e){return t.getSystem().getByDom(e).toOptional()})).each((function(t){Kw.isOpen(n)&&(Kw.expand(t),Kw.close(n))}))}))}))]),Cp.config({mode:"flow",selector:".tox-mbtn",onEscape:function(e){return t.onEscape(e),bt.some(!0)}}),Jb.config({})]),apis:n,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[fr("dom"),fr("uid"),fr("onEscape"),fr("backstage"),kr("onSetup",a)],apis:{focus:function(t,e){t.focus(e)},setMenus:function(t,e,n){t.setMenus(e,n)}}}),Ck=Object.freeze({__proto__:null,refresh:function(t,e,n){var r;n.isExpanded()&&(be(t.element,PS(e)),r=RS(e,t.element),de(t.element,PS(e),r))},grow:function(t,e,n){n.isExpanded()||FS(t,e,n)},shrink:function(t,e,n){n.isExpanded()&&BS(t,e,n)},immediateShrink:function(t,e,n){n.isExpanded()&&jS(t,e,n)},hasGrown:function(t,e,n){return n.isExpanded()},hasShrunk:function(t,e,n){return n.isCollapsed()},isGrowing:NS,isShrinking:HS,isTransitioning:function(t,e,n){return NS(t,e)||HS(t,e)},toggleGrow:function(t,e,n){(n.isExpanded()?BS:FS)(t,e,n)},disableTransitions:IS}),kk=Object.freeze({__proto__:null,exhibit:function(t,e,n){return No(e.expanded?{classes:[e.openClass],styles:{}}:{classes:[e.closedClass],styles:uo(e.dimension.property,"0px")})},events:function(t,e){return Qi([To(xi(),(function(n,r){r.event.raw.propertyName===t.dimension.property&&(IS(n,t),e.isExpanded()&&be(n.element,t.dimension.property),(e.isExpanded()?t.onGrown:t.onShrunk)(n))}))])}}),Ek=hu({fields:[fr("closedClass"),fr("openClass"),fr("shrinkingClass"),fr("growingClass"),yr("getAnimationRoot"),$a("onShrunk"),$a("onStartShrink"),$a("onGrown"),$a("onStartGrow"),kr("expanded",!1),dr("dimension",sr("property",{width:[Xa("property","width"),Xa("getDimension",(function(t){return Ce(t)+"px"}))],height:[Xa("property","height"),Xa("getDimension",(function(t){return we(t)+"px"}))]}))],name:"sliding",active:kk,apis:Ck,state:Object.freeze({__proto__:null,init:function(t){var e=zr(t.expanded);return va({isExpanded:function(){return!0===e.get()},isCollapsed:function(){return!1===e.get()},setCollapsed:_(e.set,!1),setExpanded:_(e.set,!0),readState:function(){return"expanded: "+e.get()}})}})}),Mk="container",Tk=[$s("slotBehaviours",[])],Dk=nt({getSlotNames:function(t,e){return t.getSlotNames(e)},getSlot:function(t,e,n){return t.getSlot(e,n)},isShowing:function(t,e,n){return t.isShowing(e,n)},hideSlot:function(t,e,n){return t.hideSlot(e,n)},hideAllSlots:function(t,e){return t.hideAllSlots(e)},showSlot:function(t,e,n){return t.showSlot(e,n)}},Bo),Ak=k(k({},Dk),{sketch:function(t){var e,n={slot:function(t,n){return e.push(t),tl(Mk,VS(t),n)},record:c(e=[])},r=t(n),o=L(n.record(),(function(t){return Vf({name:t,pname:VS(t)})}));return pl(Mk,Tk,o,xC,r)}}),Pk=Xr([xr("icon"),xr("tooltip"),Pr("onShow",a),Pr("onHide",a),Pr("onSetup",(function(){return a}))]),Rk=Ro("FixSizeEvent"),Ik=Ro("AutoSizeEvent"),zk=Object.freeze({__proto__:null,block:function(t,e,n,r){oe(t.element,"aria-busy",!0);var o=e.getRoot(t).getOr(t),i=Yu([Cp.config({mode:"special",onTab:function(){return bt.some(!0)},onShiftTab:function(){return bt.some(!0)}}),Dp.config({})]),a=r(o,i),u=o.getSystem().build(a);Ep.append(o,Sa(u)),u.hasConfigured(Cp)&&e.focus&&Cp.focusIn(u),n.isBlocked()||e.onBlock(t),n.blockWith((function(){return Ep.remove(o,u)}))},unblock:function(t,e,n){se(t.element,"aria-busy"),n.isBlocked()&&e.onUnblock(t),n.clear()}}),Lk=hu({fields:[Pr("getRoot",bt.none),Ar("focus",!0),$a("onBlock"),$a("onUnblock")],name:"blocking",apis:zk,state:Object.freeze({__proto__:null,init:function(){var t=ac();return va({readState:t.isSet,blockWith:function(e){t.set({destroy:e})},clear:t.clear,isBlocked:t.isSet})}})}),jk=c([$s("splitToolbarBehaviours",[Ry]),ao("builtGroups",(function(){return zr([])}))]),Bk=c([Ua(["overflowToggledClass"]),Or("getOverflowBounds"),fr("lazySink"),ao("overflowGroups",(function(){return zr([])}))].concat(jk())),Fk=c([Vf({factory:uk,schema:ik(),name:"primary"}),Uf({schema:ik(),name:"overflow"}),Uf({name:"overflow-button"}),Uf({name:"overflow-group"})]),Nk=c((function(t,e){var n=t,r=Math.floor(e);de(n,"max-width",kn.max(n,r,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"])+"px")})),Hk=c([Ua(["toggledClass"]),fr("lazySink"),hr("fetch"),Or("getBounds"),Cr("fireDismissalEventInstead",[kr("event",Ui())]),Ic()]),Vk=c([Uf({name:"button",overrides:function(t){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:Yu([Rp.config({toggleClass:t.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),Uf({factory:uk,schema:ik(),name:"toolbar",overrides:function(t){return{toolbarBehaviours:Yu([Cp.config({mode:"cyclic",onEscape:function(e){return il(e,t,"button").each(Dp.focus),bt.none()}})])}}})]),Uk=gl({name:"FloatingToolbarButton",factory:function(t,e,n,r){return k(k({},nh.sketch(k(k({},r.button()),{action:function(t){ZS(t,r)},buttonBehaviours:Of({dump:r.button().buttonBehaviours},[Ry.config({others:{toolbarSandbox:function(e){return r=e,o=n,i=t,{dom:{tag:"div",attributes:{id:(a=Pa()).id}},behaviours:Yu([Cp.config({mode:"special",onEscape:function(t){return lf.close(t),bt.some(!0)}}),lf.config({onOpen:function(t,e){i.fetch().get((function(t){eC(r,e,i,o.layouts,t),a.link(r.element),Cp.focusIn(e)}))},onClose:function(){Rp.off(r),Dp.focus(r),a.unlink(r.element)},isPartOf:function(t,e,n){return za(e,n)||za(r,n)},getAttachPoint:function(){return i.lazySink(r).getOrDie()}}),tc.config({channels:k(k({},Bs(k({isExtraPart:O},i.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),Fs({doReposition:function(){lf.getState(Ry.getCoupled(r,"toolbarSandbox")).each((function(t){tC(r,t,i,o.layouts)}))}}))})])};var r,o,i,a}}})])}))),{apis:{setGroups:function(e,r){lf.getState(Ry.getCoupled(e,"toolbarSandbox")).each((function(o){eC(e,o,t,n.layouts,r)}))},reposition:function(e){lf.getState(Ry.getCoupled(e,"toolbarSandbox")).each((function(r){tC(e,r,t,n.layouts)}))},toggle:function(t){ZS(t,r)},getToolbar:function(t){return lf.getState(Ry.getCoupled(t,"toolbarSandbox"))},isOpen:function(t){return lf.isOpen(Ry.getCoupled(t,"toolbarSandbox"))}}})},configFields:Hk(),partFields:Vk(),apis:{setGroups:function(t,e,n){t.setGroups(e,n)},reposition:function(t,e){t.reposition(e)},toggle:function(t,e){t.toggle(e)},getToolbar:function(t,e){return t.getToolbar(e)},isOpen:function(t,e){return t.isOpen(e)}}}),Wk=c([fr("items"),Ua(["itemSelector"]),$s("tgroupBehaviours",[Cp])]),$k=c([$f({name:"items",unit:"item"})]),Gk=gl({name:"ToolbarGroup",configFields:Wk(),partFields:$k(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:Ks(t.tgroupBehaviours,[Cp.config({mode:"flow",selector:t.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),Kk=gl({name:"SplitFloatingToolbar",configFields:Bk(),partFields:Fk(),factory:function(t,e,n,r){var o=Am(Uk.sketch({fetch:function(){return ky((function(e){e(nC(t.overflowGroups.get()))}))},layouts:{onLtr:function(){return[Vu,Hu]},onRtl:function(){return[Hu,Vu]},onBottomLtr:function(){return[Wu,Uu]},onBottomRtl:function(){return[Uu,Wu]}},getBounds:n.getOverflowBounds,lazySink:t.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:t.markers.overflowToggledClass},parts:{button:r["overflow-button"](),toolbar:r.overflow()}}));return{uid:t.uid,dom:t.dom,components:e,behaviours:Ks(t.splitToolbarBehaviours,[Ry.config({others:{overflowGroup:function(){return Gk.sketch(k(k({},r["overflow-group"]()),{items:[o.asSpec()]}))}}})]),apis:{setGroups:function(e,n){t.builtGroups.set(L(n,e.getSystem().build)),rC(e,o,t)},refresh:function(e){return rC(e,o,t)},toggle:function(t){o.getOpt(t).each((function(t){Uk.toggle(t)}))},isOpen:function(t){return o.getOpt(t).map(Uk.isOpen).getOr(!1)},reposition:function(t){o.getOpt(t).each((function(t){Uk.reposition(t)}))},getOverflow:function(t){return o.getOpt(t).bind(Uk.getToolbar)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,e,n){t.setGroups(e,n)},refresh:function(t,e){t.refresh(e)},reposition:function(t,e){t.reposition(e)},toggle:function(t,e){t.toggle(e)},isOpen:function(t,e){return t.isOpen(e)},getOverflow:function(t,e){return t.getOverflow(e)}}}),qk=c([Ua(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),$a("onOpened"),$a("onClosed")].concat(jk())),Xk=c([Vf({factory:uk,schema:ik(),name:"primary"}),Vf({factory:uk,schema:ik(),name:"overflow",overrides:function(t){return{toolbarBehaviours:Yu([Ek.config({dimension:{property:"height"},closedClass:t.markers.closedClass,openClass:t.markers.openClass,shrinkingClass:t.markers.shrinkingClass,growingClass:t.markers.growingClass,onShrunk:function(e){il(e,t,"overflow-button").each((function(t){Rp.off(t),Dp.focus(t)})),t.onClosed(e)},onGrown:function(e){Cp.focusIn(e),t.onOpened(e)},onStartGrow:function(e){il(e,t,"overflow-button").each(Rp.on)}}),Cp.config({mode:"acyclic",onEscape:function(e){return il(e,t,"overflow-button").each(Dp.focus),bt.some(!0)}})])}}}),Uf({name:"overflow-button",overrides:function(t){return{buttonBehaviours:Yu([Rp.config({toggleClass:t.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),Uf({name:"overflow-group"})]),Yk=gl({name:"SplitSlidingToolbar",configFields:qk(),partFields:Xk(),factory:function(t,e,n,r){var o="alloy.toolbar.toggle";return{uid:t.uid,dom:t.dom,components:e,behaviours:Ks(t.splitToolbarBehaviours,[Ry.config({others:{overflowGroup:function(t){return Gk.sketch(k(k({},r["overflow-group"]()),{items:[nh.sketch(k(k({},r["overflow-button"]()),{action:function(e){go(t,o)}}))]}))}}}),im("toolbar-toggle-events",[Oo(o,(function(e){oC(e,t)}))])]),apis:{setGroups:function(e,n){var r=L(n,e.getSystem().build);t.builtGroups.set(r),OC(e,t)},refresh:function(e){return OC(e,t)},toggle:function(e){return oC(e,t)},isOpen:function(e){return il(e,t,"overflow").map(Ek.hasGrown).getOr(!1)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,e,n){t.setGroups(e,n)},refresh:function(t,e){t.refresh(e)},toggle:function(t,e){t.toggle(e)},isOpen:function(t,e){return t.isOpen(e)}}}),Jk=ek.optional({factory:Sk,name:"menubar",schema:[fr("backstage")]}),Qk=ek.optional({factory:{sketch:function(t){return ok.sketch({uid:t.uid,dom:t.dom,listBehaviours:Yu([Cp.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return sC({type:t.type,uid:Ro("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:t.providers,onEscape:function(){return t.onEscape(),bt.some(!0)}})},setupItem:function(t,e,n,r){uk.setGroups(e,n)},shell:!0})}},name:"multiple-toolbar",schema:[fr("dom"),fr("onEscape")]}),Zk=ek.optional({factory:{sketch:function(t){return(t.type===cg.sliding?function(t){var e=Yk.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),n=Yk.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),r=cC(t);return Yk.sketch(k(k({},r),{components:[e,n],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(t){t.getSystem().broadcastOn([hk()],{type:"opened"})},onClosed:function(t){t.getSystem().broadcastOn([hk()],{type:"closed"})}}))}:t.type===cg.floating?function(t){var e=cC(t),n=Kk.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return Kk.sketch(k(k({},e),{lazySink:t.getSink,getOverflowBounds:function(){var e=t.moreDrawerData.lazyHeader().element,n=Ne(e),r=Gt(e),o=Ne(r),i=Math.max(r.dom.scrollHeight,o.height);return Pn(n.x+4,o.y,n.width-8,i)},parts:k(k({},e.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:t.attributes}}}),components:[n],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))}:sC)({type:t.type,uid:t.uid,onEscape:function(){return t.onEscape(),bt.some(!0)},cyclicKeying:!1,initGroups:[],getSink:t.getSink,providers:t.providers,moreDrawerData:{lazyToolbar:t.lazyToolbar,lazyMoreButton:t.lazyMoreButton,lazyHeader:t.lazyHeader},attributes:t.attributes})}},name:"toolbar",schema:[fr("dom"),fr("onEscape"),fr("getSink")]}),tE=ek.optional({factory:{sketch:function(t){var e=t.editor,n=t.sticky?TS:ck;return{uid:t.uid,dom:t.dom,components:t.components,behaviours:Yu(n(e,t.sharedBackstage))}}},name:"header",schema:[fr("dom")]}),eE=ek.optional({name:"socket",schema:[fr("dom")]}),nE=ek.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:Yu([Jb.config({}),Dp.config({}),Ek.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(t){td.getCurrent(t).each(Ak.hideAllSlots),go(t,Ik)},onGrown:function(t){go(t,Ik)},onStartGrow:function(t){vo(t,Rk,{width:ge(t.element,"width").getOr("")})},onStartShrink:function(t){vo(t,Rk,{width:Ce(t.element)+"px"})}}),Ep.config({}),td.config({find:function(t){return Q(Ep.contents(t))}})])}],behaviours:Yu([Fx(0),im("sidebar-sliding-events",[Oo(Rk,(function(t,e){de(t.element,"width",e.event.width)})),Oo(Ik,(function(t,e){be(t.element,"width")}))])])}}},name:"sidebar",schema:[fr("dom")]}),rE=ek.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:Yu([Ep.config({}),Lk.config({focus:!1}),td.config({find:function(t){return Q(t.components())}})]),components:[]}}},name:"throbber",schema:[fr("dom")]}),oE=gl({name:"OuterContainer",factory:function(t,e,n){return{uid:t.uid,dom:t.dom,components:e,apis:{getSocket:function(e){return tk.getPart(e,t,"socket")},setSidebar:function(e,n){tk.getPart(e,t,"sidebar").each((function(t){return function(t,e){td.getCurrent(t).each((function(t){return Ep.set(t,[(n=e,Ak.sketch((function(t){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:(e=t,o=L(Ct(r=n),(function(t){var e=r[t],n=ur(ar("sidebar",Pk,e));return{name:t,getApi:US,onSetup:n.onSetup,onShow:n.onShow,onHide:n.onHide}})),L(o,(function(t){var n=zr(a);return e.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Bg([av(t,n),uv(t,n),Oo(Gi(),(function(t,e){var n=e.event;H(o,(function(t){return t.name===n.name})).each((function(e){(n.visible?e.onShow:e.onHide)(e.getApi(t))}))}))])})}))),slotBehaviours:Bg([Zi((function(t){return Ak.hideAllSlots(t)}))])};var e,r,o})))]);var n}))}(t,n)}))},toggleSidebar:function(e,n){tk.getPart(e,t,"sidebar").each((function(t){var e=n;td.getCurrent(t).each((function(t){td.getCurrent(t).each((function(n){Ek.hasGrown(t)?Ak.isShowing(n,e)?Ek.shrink(t):(Ak.hideAllSlots(n),Ak.showSlot(n,e)):(Ak.hideAllSlots(n),Ak.showSlot(n,e),Ek.grow(t))}))}))}))},whichSidebar:function(e){return tk.getPart(e,t,"sidebar").bind(WS).getOrNull()},getHeader:function(e){return tk.getPart(e,t,"header")},getToolbar:function(e){return tk.getPart(e,t,"toolbar")},setToolbar:function(e,n){tk.getPart(e,t,"toolbar").each((function(t){t.getApis().setGroups(t,n)}))},setToolbars:function(e,n){tk.getPart(e,t,"multiple-toolbar").each((function(t){ok.setItems(t,n)}))},refreshToolbar:function(e){tk.getPart(e,t,"toolbar").each((function(t){return t.getApis().refresh(t)}))},toggleToolbarDrawer:function(e){tk.getPart(e,t,"toolbar").each((function(t){var e=t.getApis().toggle;null!=e?bt.some(function(e){return e(t)}(e)):bt.none()}))},isToolbarDrawerToggled:function(e){return tk.getPart(e,t,"toolbar").bind((function(t){return bt.from(t.getApis().isOpen).map((function(e){return e(t)}))})).getOr(!1)},getThrobber:function(e){return tk.getPart(e,t,"throbber")},focusToolbar:function(e){tk.getPart(e,t,"toolbar").orThunk((function(){return tk.getPart(e,t,"multiple-toolbar")})).each((function(t){Cp.focusIn(t)}))},setMenubar:function(e,n){tk.getPart(e,t,"menubar").each((function(t){Sk.setMenus(t,n)}))},focusMenubar:function(e){tk.getPart(e,t,"menubar").each((function(t){Sk.focus(t)}))}},behaviours:t.behaviours}},configFields:[fr("dom"),fr("behaviours")],partFields:[tE,Jk,Zk,Qk,eE,nE,rE],apis:{getSocket:function(t,e){return t.getSocket(e)},setSidebar:function(t,e,n){t.setSidebar(e,n)},toggleSidebar:function(t,e,n){t.toggleSidebar(e,n)},whichSidebar:function(t,e){return t.whichSidebar(e)},getHeader:function(t,e){return t.getHeader(e)},getToolbar:function(t,e){return t.getToolbar(e)},setToolbar:function(t,e,n){var r=L(n,aC);t.setToolbar(e,r)},setToolbars:function(t,e,n){var r=L(n,(function(t){return L(t,aC)}));t.setToolbars(e,r)},refreshToolbar:function(t,e){return t.refreshToolbar(e)},toggleToolbarDrawer:function(t,e){t.toggleToolbarDrawer(e)},isToolbarDrawerToggled:function(t,e){return t.isToolbarDrawerToggled(e)},getThrobber:function(t,e){return t.getThrobber(e)},setMenubar:function(t,e,n){t.setMenubar(e,n)},focusMenubar:function(t,e){t.focusMenubar(e)},focusToolbar:function(t,e){t.focusToolbar(e)}}}),iE={file:{title:"File",items:"newdocument restoredraft | preview | export print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align lineheight | forecolor backcolor | language | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},aE=_(pC,!1),uE=_(pC,!0);function cE(t,e,n,r){var o;return{type:"basic",data:(o=t.getParam(e,n,"string"),L(r===CC.SemiColon?o.replace(/;$/,"").split(";"):o.split(" "),(function(t){var e=t,n=t,r=t.split("=");return 1<r.length&&(e=r[0],n=r[1]),{title:e,format:n}})))}}function sE(t){var e={type:"basic",data:FE};return{tooltip:"Align",text:bt.none(),icon:bt.some("align-left"),isSelectedFor:function(e){return function(){return t.formatter.match(e)}},getCurrentValue:bt.none,getPreviewFor:function(t){return bt.none},onAction:function(e){return function(){return H(FE,(function(t){return t.format===e.format})).each((function(e){return t.execCommand(e.command)}))}},updateText:function(e){var n=H(FE,(function(e){return t.formatter.match(e.format)})).fold(c("left"),(function(t){return t.title.toLowerCase()}));vo(e,pO,{icon:"align-"+n})},dataset:e,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}}function lE(t){return L(t.split(/\s*,\s*/),(function(t){return t.replace(/^['"]+|['"]+$/g,"")}))}function fE(t){function e(){function e(t){return t?lE(t)[0]:""}var o=t.queryCommandValue("FontName"),i=r.data,a=o?o.toLowerCase():"";return{matchOpt:H(i,(function(t){var n=t.format;return n.toLowerCase()===a||e(n).toLowerCase()===e(a).toLowerCase()})).orThunk((function(){return lt(0===(t=a).indexOf("-apple-system")&&(e=lE(t.toLowerCase()),$(NE,(function(t){return-1<e.indexOf(t.toLowerCase())}))),{title:n,format:a});var t,e})),font:o}}var n="System Font",r=cE(t,"font_formats","Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",CC.SemiColon);return{tooltip:"Fonts",text:bt.some(n),icon:bt.none(),isSelectedFor:function(t){return function(e){return e.exists((function(e){return e.format===t}))}},getCurrentValue:function(){return e().matchOpt},getPreviewFor:function(t){return function(){return bt.some({tag:"div",styles:-1===t.indexOf("dings")?{"font-family":t}:{}})}},onAction:function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontName",!1,e.format)}))}},updateText:function(t){var n=e(),r=n.matchOpt,o=n.font,i=r.fold(c(o),(function(t){return t.title}));vo(t,mO,{text:i})},dataset:r,shouldHide:!1,isInvalid:O}}function dE(t){function e(){var e=bt.none(),n=r.data,o=t.queryCommandValue("FontSize");if(o)for(var i=function(t){var r,i,a,u,c=(i=t,/[0-9.]+px$/.test(r=o)?(a=72*parseInt(r,10)/96,u=Math.pow(10,i||0),Math.round(a*u)/u+"pt"):at(VE,r).getOr(r)),s=at(HE,c).getOr("");e=H(n,(function(t){return t.format===o||t.format===c||t.format===s}))},a=3;e.isNone()&&0<=a;a--)i(a);return{matchOpt:e,size:o}}var n=c(bt.none),r=cE(t,"fontsize_formats","8pt 10pt 12pt 14pt 18pt 24pt 36pt",CC.Space);return{tooltip:"Font sizes",text:bt.some("12pt"),icon:bt.none(),isSelectedFor:function(t){return function(e){return e.exists((function(e){return e.format===t}))}},getPreviewFor:n,getCurrentValue:function(){return e().matchOpt},onAction:function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontSize",!1,e.format)}))}},updateText:function(t){var n=e(),r=n.matchOpt,o=n.size,i=r.fold(c(o),(function(t){return t.title}));vo(t,mO,{text:i})},dataset:r,shouldHide:!1,isInvalid:O}}function mE(t,e){var n=e(),r=L(n,(function(t){return t.format}));return bt.from(t.formatter.closest(r)).bind((function(t){return H(n,(function(e){return e.format===t}))})).orThunk((function(){return lt(t.formatter.match("p"),{title:"Paragraph",format:"p"})}))}function pE(t){var e=cE(t,"block_formats","Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",CC.SemiColon);return{tooltip:"Blocks",text:bt.some("Paragraph"),icon:bt.none(),isSelectedFor:function(e){return function(){return t.formatter.match(e)}},getCurrentValue:bt.none,getPreviewFor:function(e){return function(){var n=t.formatter.get(e);return bt.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))})}},onAction:vC(t),updateText:function(n){var r=mE(t,(function(){return e.data})).fold(c("Paragraph"),(function(t){return t.title}));vo(n,mO,{text:r})},dataset:e,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}}function hE(t,e){return{tooltip:"Formats",text:bt.some("Paragraph"),icon:bt.none(),isSelectedFor:function(e){return function(){return t.formatter.match(e)}},getCurrentValue:bt.none,getPreviewFor:function(e){return function(){var n=t.formatter.get(e);return void 0!==n?bt.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))}):bt.none()}},onAction:vC(t),updateText:function(e){var n=function(t){var e=t.items;return void 0!==e&&0<e.length?W(e,n):[{title:t.title,format:t.format}]},r=W($O(t),n),o=mE(t,c(r)).fold(c("Paragraph"),(function(t){return t.title}));vo(e,mO,{text:o})},shouldHide:t.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(e){return!t.formatter.canApply(e.format)},dataset:e}}function gE(t){return{isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)}}}function vE(t){return{setActive:function(e){Rp.set(t,e)},isActive:function(){return Rp.isOn(t)},isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)}}}function bE(t,e){return t.map((function(t){return{"aria-label":e.translate(t),title:e.translate(t)}})).getOr({})}function yE(t,e,n,r,o,i){var a;return{dom:{tag:"button",classes:["tox-tbtn"].concat(e.isSome()?["tox-tbtn--select"]:[]),attributes:bE(n,i)},components:Uv([t.map((function(t){return gw(t,i.icons)})),e.map((function(t){return bw(t,"tox-tbtn",i)}))]),eventOrder:((a={})[si()]=["focusing","alloy.base.behaviour","common-button-display-events"],a),buttonBehaviours:Yu([Hv(i.isDisabled),ov(),im("common-button-display-events",[Oo(si(),(function(t,e){e.event.prevent(),go(t,XE)}))])].concat(r.map((function(n){return $E.config({channel:n,initialData:{icon:t,text:e},renderComponents:function(t,e){return Uv([t.icon.map((function(t){return gw(t,i.icons)})),t.text.map((function(t){return bw(t,"tox-tbtn",i)}))])}})})).toArray()).concat(o.getOr([])))}}function _E(t,e,n){var r,o=zr(a),i=yE(t.icon,t.text,t.tooltip,bt.none(),bt.none(),n);return nh.sketch({dom:i.dom,components:i.components,eventOrder:dO,buttonBehaviours:Yu([im("toolbar-button-events",[(r={onAction:t.onAction,getApi:e.getApi},na((function(t,e){iv(r,t)((function(e){vo(t,fO,{buttonApi:e}),r.onAction(e)}))}))),av(e,o),uv(e,o)]),Hv((function(){return t.disabled||n.isDisabled()})),ov()].concat(e.toolbarButtonBehaviours))})}function wE(t,e){return function(n,r,o){var i=t(n).mapError((function(t){return oo(t)})).getOrDie();return e(i,r,o)}}function xE(t,e,n,r){var o,a=e.outerContainer,u=n.toolbar,c=n.buttons;i(u,f)?(o=u.map((function(e){var o={toolbar:e,buttons:c,allowToolbarGroups:n.allowToolbarGroups};return eM(t,o,{backstage:r},bt.none())})),oE.setToolbars(a,o)):oE.setToolbar(a,eM(t,n,{backstage:r},bt.none()))}function OE(t){return/^[0-9\.]+(|px)$/i.test(""+t)?bt.some(parseInt(""+t,10)):bt.none()}function SE(t){return y(t)?t+"px":t}function CE(t,e,n){var r=e.filter((function(e){return t<e})),o=n.filter((function(e){return e<t}));return r.or(o).getOr(t)}function kE(t){var e=tg(t),n=eg(t),r=rg(t);return OE(e).map((function(t){return CE(t,n,r)}))}function EE(t,e){var n=Rn(t);return{pos:e?n.y:n.bottom,bounds:n}}function ME(t,e){return Oo(fO,(function(n,r){var o,i=t.get(n),a=(o=i,{hide:function(){return go(o,Ii())},getValue:function(){return wf.getValue(o)}});e.onAction(a,r.event.buttonApi)}))}function TE(t,e,n){return e.bottom-t.y>=(n=void 0===n?.01:n)&&t.bottom-e.y>=n}function DE(t){var e=function(t){var e=t.getBoundingClientRect();if(e.height<=0&&e.width<=0){var n=Zt(Rt.fromDom(t.startContainer),t.startOffset).element;return(Ke(n)?qt(n):bt.some(n)).filter(Ge).map((function(t){return t.dom.getBoundingClientRect()})).getOr(e)}return e}(t.selection.getRng());if(t.inline){var n=ze();return Pn(n.left+e.left,n.top+e.top,e.width,e.height)}var r=Ne(Rt.fromDom(t.getBody()));return Pn(r.x+e.left,r.y+e.top,e.width,e.height)}function AE(t,e,n,r){void 0===r&&(r=0);var o,i,a,u,c=Be(window),s=Rn(Rt.fromDom(t.getContentAreaContainer())),l=ig(t)||ag(t)||Kg(t),f=(o=s,i=c,a=r,{x:u=Math.max(o.x+a,i.x),width:Math.min(o.right-a,i.right)-u}),d=f.x,m=f.width;if(t.inline&&!l)return Pn(d,c.y,m,c.height);var p=function(t,e,n,r,o,i){var a=Rt.fromDom(t.getContainer()),u=Da(a,".tox-editor-header").getOr(a),c=Rn(u),s=c.y>=e.bottom,l=r&&!s;if(t.inline&&l)return{y:Math.max(c.bottom+i,n.y),bottom:n.bottom};if(t.inline&&!l)return{y:n.y,bottom:Math.min(c.y-i,n.bottom)};var f="line"===o?Rn(a):e;return l?{y:Math.max(c.bottom+i,n.y),bottom:Math.min(f.bottom-i,n.bottom)}:{y:Math.max(f.y+i,n.y),bottom:Math.min(c.y-i,n.bottom)}}(t,s,c,e.header.isPositionedAtTop(),n,r),h=p.y,g=p.bottom;return Pn(d,h,m,g-h)}function PE(t){return"node"===t}function RE(t,e){var n=j(B(e,(function(e){return e.predicate(t.dom)})),(function(t){return"contexttoolbar"===t.type}));return{contextToolbars:n.pass,contextForms:n.fail}}function IE(t,e){function n(t){return Vt(t,o)}var r,o=Rt.fromDom(e.getBody()),i=Rt.fromDom(e.selection.getNode());return n(r=i)||Ut(o,r)?function(t,e,n){var r=RE(t,e);if(0<r.contextForms.length)return bt.some({elem:t,toolbars:[r.contextForms[0]]});var o=RE(t,n);if(0<o.contextForms.length)return bt.some({elem:t,toolbars:[o.contextForms[0]]});if(0<r.contextToolbars.length||0<o.contextToolbars.length){var i=function(t){if(t.length<=1)return t;function e(e){return R(t,(function(t){return t.position===e}))}function n(e){return B(t,(function(t){return t.position===e}))}var r=e("selection"),o=e("node");if(r||o){if(o&&r){var i=n("node"),a=L(n("selection"),(function(t){return k(k({},t),{position:"node"})}));return i.concat(a)}return n(r?"selection":"node")}return n("line")}(r.contextToolbars.concat(o.contextToolbars));return bt.some({elem:t,toolbars:i})}return bt.none()}(i,t.inNodeScope,t.inEditorScope).orThunk((function(){return o=t,(e=n)(r=i)?bt.none():lo(r,(function(t){if(Ge(t)){var e=RE(t,o.inNodeScope),n=e.contextToolbars,r=e.contextForms,i=0<r.length?r:(u=n).length<=1?u:a("selection").orThunk((function(){return a("node")})).orThunk((function(){return a("line")})).map((function(t){return t.position})).fold((function(){return[]}),(function(t){return B(u,(function(e){return e.position===t}))}));return 0<i.length?bt.some({elem:t,toolbars:i}):bt.none()}function a(t){return H(u,(function(e){return e.position===t}))}var u;return bt.none()}),e);var e,r,o})):bt.none()}function zE(t,e,n,r){function o(){var e=_.get().getOr("node"),n=PE(e)?1:0;return AE(t,g,e,n)}function i(){return!(t.removed||v()&&h.isContextMenuOpen())}function u(){if(i()){var e=o(),n=ct(_.get(),"node")?(r=t,b.get().filter(bn).map(Ne).getOrThunk((function(){return DE(r)}))):DE(t);return e.height<=0||!TE(n,e)}return 1;var r}function c(){b.clear(),y.clear(),_.clear(),Jp.hide(w)}function s(){var t;Jp.isOpen(w)&&(be(t=w.element,"display"),u()?de(t,"display","none"):(y.set(0),Jp.reposition(w)))}function l(e){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[e],behaviours:Yu([Cp.config({mode:"acyclic"}),im("pop-dialog-wrap-events",[Zi((function(e){t.shortcuts.add("ctrl+F9","focus statusbar",(function(){return Cp.focusIn(e)}))})),ta((function(e){t.shortcuts.remove("ctrl+F9")}))])])}}function f(e,r){var o,i,a,u,c,s,l,f="node"===e?g.anchors.node(r):g.anchors.cursor(),d=(o=t,i=e,a=v(),u={lastElement:b.get,isReposition:function(){return ct(y.get(),0)},getMode:function(){return nf.getMode(n)}},"line"===i?{bubble:hc(12,0,cM),layouts:{onLtr:function(){return[iu]},onRtl:function(){return[au]}},overrides:sM}:{bubble:hc(0,12,cM,1/12),layouts:(c=o,s=u,l=i,a?{onLtr:function(t){return[Gu,Hu,Vu,Uu,Wu,$u].concat(m(t))},onRtl:function(t){return[Gu,Vu,Hu,Wu,Uu,$u].concat(m(t))}}:{onLtr:function(t){return[$u,Gu,Uu,Hu,Wu,Vu].concat(m(t))},onRtl:function(t){return[$u,Gu,Wu,Vu,Uu,Hu].concat(m(t))}}),overrides:sM});function m(t){return PE(l)?[(e=t,function(t,n,r,o,i){var a=function(t,e,n,r,o){var i=DE(t),a=r.lastElement().exists((function(t){return Vt(n,t)})),u=n,c=t.selection.getRng(),s=Zt(Rt.fromDom(c.startContainer),c.startOffset);return c.startContainer===c.endContainer&&c.startOffset===c.endOffset-1&&Vt(s.element,u)?a?Mm:Zp:a?function(t,n){var o=ge(t,"position");de(t,"position",n);var a=TE(i,Rn(e))&&!r.isReposition()?Dm:Mm;return o.each((function(e){return de(t,"position",e)})),a}(e,r.getMode()):("fixed"===r.getMode()?o.y+ze().top:o.y)+(we(e)+12)<=i.y?Zp:th}(c,o,e,s,i),u=k(k({},t),{y:i.y,height:i.height});return k(k({},a(u,n,r,o,i)),{alwaysFit:!0})})]:[];var e}return $r(f,d)}function d(t,e){var r,a,c,s;S.cancel(),i()&&(r=O(t),c=f(a=t[0].position,e),_.set(a),y.set(1),be(s=w.element,"display"),ct(Tt(e,b.get(),Vt),!0)||(Go(s,pM),nf.reset(n,w)),Jp.showWithinBounds(w,l(r),{anchor:c,transition:{classes:[pM],mode:"placement"}},(function(){return bt.some(o())})),e.fold(b.clear,b.set),u()&&de(s,"display","none"))}var m,p,h=r.backstage,g=h.shared,v=fn().deviceType.isTouch,b=cc(),y=cc(),_=cc(),w=Oa((m={sink:n,onEscape:function(){return t.focus(),bt.some(!0)}},p=zr([]),Jp.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(t){p.set([]),Jp.getContent(t).each((function(t){be(t.element,"visibility")})),Go(t.element,mM),be(t.element,"width")},inlineBehaviours:Yu([im("context-toolbar-events",[To(xi(),(function(t,e){"width"===e.event.raw.propertyName&&(Go(t.element,mM),be(t.element,"width"))})),Oo(dM,(function(t,e){var n=t.element;be(n,"width");var r=Ce(n);Jp.setContent(t,e.event.contents),$o(n,mM);var o=Ce(n);de(n,"width",r+"px"),Jp.getContent(t).each((function(t){e.event.focus.bind((function(t){return bu(t),wu(n)})).orThunk((function(){return Cp.focusIn(t),_u(hn(n))}))})),eh.setTimeout((function(){de(t.element,"width",o+"px")}),0)})),Oo(lM,(function(t,e){Jp.getContent(t).each((function(e){p.set(p.get().concat([{bar:e,focus:_u(hn(t.element))}]))})),vo(t,dM,{contents:e.event.forwardContents,focus:bt.none()})})),Oo(fM,(function(t,e){Z(p.get()).each((function(e){p.set(p.get().slice(0,p.get().length-1)),vo(t,dM,{contents:Sa(e.bar),focus:e.focus})}))}))]),Cp.config({mode:"special",onEscape:function(t){return Z(p.get()).fold((function(){return m.onEscape()}),(function(e){return go(t,fM),bt.some(!0)}))}})]),lazySink:function(){return jn.value(m.sink)}}))),x=Lt((function(){return function(t,e){var n={},r=[],o=[],i={},a={},u=Ct(t);return Ot(u,(function(u){var c,s,l,f,d,m=t[u];"contextform"===m.type?(l=u,d=ur(ar("ContextForm",Bh,f=m)),(n[l]=d).launch.map((function(t){i["form:"+l]=k(k({},f.launch),{type:"contextformtogglebutton"===t.type?"togglebutton":"button",onAction:function(){e(d)}})})),("editor"===d.scope?o:r).push(d),a[l]=d):"contexttoolbar"===m.type&&(c=u,ar("ContextToolbar",Fh,s=m).each((function(t){("editor"===s.scope?o:r).push(t),a[c]=t})))})),{forms:n,inNodeScope:r,inEditorScope:o,lookupTable:a,formNavigators:i}}(e,(function(t){var e=O([t]);vo(w,lM,{forwardContents:l(e)})}))})),O=function(e){var n=t.ui.registry.getAll().buttons,o=x(),i=k(k({},n),o.formNavigators),a=qg(t)===cg.scrolling?cg.scrolling:cg.default,u=U(L(e,(function(e){return"contexttoolbar"===e.type?eM(t,{buttons:i,toolbar:e.items,allowToolbarGroups:!1},r,bt.some(["form:"])):(n=g.providers,uM(e,n));var n})));return sC({type:a,uid:Ro("context-toolbar"),initGroups:u,onEscape:bt.none,cyclicKeying:!0,providers:g.providers})},S=ch((function(){t.hasFocus()&&!t.removed&&(Ko(w.element,pM)?S.throttle():IE(x(),t).fold(c,(function(t){d(t.toolbars,bt.some(t.elem))})))}),17);t.on("init",(function(){t.on("remove",c),t.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",s),t.on("click keyup focus SetContent",S.throttle),t.on(aM,c),t.on("contexttoolbar-show",(function(e){at(x().lookupTable,e.toolbarKey).each((function(n){d([n],lt(e.target!==t,e.target)),Jp.getContent(w).each(Cp.focusIn)}))})),t.on("focusout",(function(e){eh.setEditorTimeout(t,(function(){wu(n.element).isNone()&&wu(w.element).isNone()&&c()}),0)})),t.on("SwitchMode",(function(){t.mode.isReadOnly()&&c()})),t.on("AfterProgressState",(function(e){e.state?c():t.hasFocus()&&S.throttle()})),t.on("NodeChange",(function(t){wu(w.element).fold(S.throttle,a)}))}))}(kC=CC=CC||{})[kC.SemiColon=0]="SemiColon",kC[kC.Space=1]="Space";var LE,jE,BE,FE=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],NE=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],HE={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},VE={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},UE=Object.freeze({__proto__:null,events:function(t,e){function n(n,r){t.updateState.each((function(t){var o=t(n,r);e.set(o)})),t.renderComponents.each((function(t){var o=L(t(r,e.get()),n.getSystem().build);Es(n,o)}))}return Qi([Oo(Ti(),(function(e,r){var o,i=r;i.universal||(o=t.channel,xt(i.channels,o)&&n(e,i.data))})),Zi((function(e,r){t.initialData.each((function(t){n(e,t)}))}))])}}),WE=Object.freeze({__proto__:null,getState:function(t,e,n){return n}}),$E=hu({fields:[fr("channel"),yr("renderComponents"),yr("updateState"),yr("initialData")],name:"reflecting",active:UE,apis:WE,state:Object.freeze({__proto__:null,init:function(){var t=zr(bt.none());return{readState:function(){return t.get().getOr("none")},get:t.get,set:t.set,clear:function(){return t.set(bt.none())}}}})}),GE=c([fr("toggleClass"),fr("fetch"),Ka("onExecute"),kr("getHotspot",bt.some),kr("getAnchorOverrides",c({})),Ic(),Ka("onItemExecute"),yr("lazySink"),fr("dom"),$a("onOpen"),$s("splitDropdownBehaviours",[Ry,Cp,Dp]),kr("matchWidth",!1),kr("useMinWidth",!1),kr("eventOrder",{}),yr("role")].concat(Vy())),KE=c([Vf({factory:nh,schema:[fr("dom")],name:"arrow",defaults:function(){return{buttonBehaviours:Yu([Dp.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(e){e.getSystem().getByUid(t.uid).each(bo)},buttonBehaviours:Yu([Rp.config({toggleOnExecute:!1,toggleClass:t.toggleClass})])}}}),Vf({factory:nh,schema:[fr("dom")],name:"button",defaults:function(){return{buttonBehaviours:Yu([Dp.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(e){e.getSystem().getByUid(t.uid).each((function(n){t.onExecute(n,e)}))}}}}),Wf({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[fr("text")],name:"aria-descriptor"}),Uf({schema:[Va()],name:"menu",defaults:function(t){return{onExecute:function(e,n){e.getSystem().getByUid(t.uid).each((function(r){t.onItemExecute(r,e,n)}))}}}}),zy()]),qE=gl({name:"SplitDropdown",configFields:GE(),partFields:KE(),factory:function(t,e,n,r){function o(t){td.getCurrent(t).each((function(t){cd.highlightFirst(t),Cp.focusIn(t)}))}function i(e){By(t,s,e,r,o,_y.HighlightFirst).get(a)}function u(e){return bo(al(e,t,"button")),bt.some(!0)}var c,l=k(k({},Qi([Zi((function(e,n){il(e,t,"aria-descriptor").each((function(t){var n=Ro("aria");oe(t.element,"id",n),oe(e.element,"aria-describedby",n)}))}))])),pm(bt.some(i))),f={repositionMenus:function(t){Rp.isOn(t)&&Hy(t)}};return{uid:t.uid,dom:t.dom,components:e,apis:f,eventOrder:k(k({},t.eventOrder),((c={})[Di()]=["disabling","toggling","alloy.base.behaviour"],c)),events:l,behaviours:Ks(t.splitDropdownBehaviours,[Ry.config({others:{sandbox:function(e){var n=al(e,t,"arrow");return Ny(t,e,{onOpen:function(){Rp.on(n),Rp.on(e)},onClose:function(){Rp.off(n),Rp.off(e)}})}}}),Cp.config({mode:"special",onSpace:u,onEnter:u,onDown:function(t){return i(t),bt.some(!0)}}),Dp.config({}),Rp.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:t.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:function(t,e){return t.repositionMenus(e)}}}),XE=Ro("focus-button"),YE=function(t,e,n){return _E(t,{toolbarButtonBehaviours:[].concat(0<n.length?[im("toolbarButtonWith",n)]:[]),getApi:gE,onSetup:t.onSetup},e)},JE=function(t,e,n){return $r(_E(t,{toolbarButtonBehaviours:[Ep.config({}),Rp.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(0<n.length?[im("toolbarToggleButtonWith",n)]:[]),getApi:vE,onSetup:t.onSetup},e))},QE=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styleselect"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],ZE={button:wE(hh,(function(t,e){return n=e.backstage.shared.providers,YE(t,n,[]);var n})),togglebutton:wE(gh,(function(t,e){return n=e.backstage.shared.providers,JE(t,n,[]);var n})),menubutton:wE(DS,(function(t,e){return Ow(t,"tox-tbtn",e.backstage,bt.none())})),splitbutton:wE((function(t){return ar("SplitButton",Ok,t)}),(function(t,e){return r=t,o=e.backstage.shared,l=Ro("channel-update-split-dropdown-display"),f=zr(a),d={getApi:n,onSetup:r.onSetup},qE.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:k({"aria-pressed":!1},bE(r.tooltip,o.providers))},onExecute:function(t){r.onAction(n(t))},onItemExecute:function(t,e,n){},splitDropdownBehaviours:Yu([Lv(o.providers.isDisabled),ov(),im("split-dropdown-events",[Oo(XE,Dp.focus),av(d,f),uv(d,f)]),qw.config({})]),eventOrder:((i={})[Hi()]=["alloy.base.behaviour","split-dropdown-events"],i),toggleClass:"tox-tbtn--enabled",lazySink:o.getSink,fetch:(u=n,c=r,s=o.providers,function(t){return ky((function(t){return c.fetch(t)})).map((function(e){return bt.from(Db($r(pb(Ro("menu-value"),e,(function(e){c.onItemAction(u(t),e)}),c.columns,c.presets,dg.CLOSE_ON_EXECUTE,c.select.getOr(O),s),{movement:hb(c.columns,c.presets),menuBehaviours:Bg("auto"!==c.columns?[]:[Zi((function(t,e){Jh(t,4,Nh(c.presets)).each((function(e){var n=e.numRows,r=e.numColumns;Cp.setGridSize(t,n,r)}))}))])})))}))}),parts:{menu:Uh(0,r.columns,r.presets)},components:[qE.parts.button(yE(r.icon,r.text,bt.none(),bt.some(l),bt.some([Rp.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),o.providers)),qE.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:zm("chevron-down",o.providers.icons)},buttonBehaviours:Yu([Lv(o.providers.isDisabled),ov(),Lm()])}),qE.parts["aria-descriptor"]({text:o.providers.translate("To open the popup, press Shift+Enter")})]});function n(t){return{isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)},setIconFill:function(e,n){Da(t.element,'svg path[id="'+e+'"], rect[id="'+e+'"]').each((function(t){oe(t,"fill",n)}))},setIconStroke:function(e,n){Da(t.element,'svg path[id="'+e+'"], rect[id="'+e+'"]').each((function(t){oe(t,"stroke",n)}))},setActive:function(e){oe(t.element,"aria-pressed",e),Da(t.element,"span").each((function(n){t.getSystem().getByDom(n).each((function(t){return Rp.set(t,e)}))}))},isActive:function(){return Da(t.element,"span").exists((function(e){return t.getSystem().getByDom(e).exists(Rp.isOn)}))}}}var r,o,i,u,c,s,l,f,d})),grouptoolbarbutton:wE((function(t){return ar("GroupToolbarButton",_k,t)}),(function(t,e,n){var r,o,i,a,u,c,s=n.ui.registry.getAll().buttons,l=((r={})[qc]=e.backstage.shared.header.isPositionedAtTop()?bc.TopToBottom:bc.BottomToTop,r);if(qg(n)!==cg.floating)throw new Error("Toolbar groups are only supported when using floating toolbar mode");return i=e.backstage,a=function(t){return eM(n,{buttons:s,toolbar:t,allowToolbarGroups:!1},e,bt.none())},u=l,c=i.shared,Uk.sketch({lazySink:c.getSink,fetch:function(){return ky((function(t){t(L(a(o.items),aC))}))},markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:yE((o=t).icon,o.text,o.tooltip,bt.none(),bt.none(),c.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:u}}}})})),styleSelectButton:function(t,e){return _C(t,n=e.backstage,hE(t,k({type:"advanced"},n.styleselect)));var n},fontsizeSelectButton:function(t,e){return _C(t,e.backstage,dE(t))},fontSelectButton:function(t,e){return _C(t,e.backstage,fE(t))},formatButton:function(t,e){return _C(t,e.backstage,pE(t))},alignMenuButton:function(t,e){return _C(t,e.backstage,sE(t))}},tM={styleselect:ZE.styleSelectButton,fontsizeselect:ZE.fontsizeSelectButton,fontselect:ZE.fontSelectButton,formatselect:ZE.formatButton,align:ZE.alignMenuButton},eM=function(t,e,n,r){var o,a,u,c,s=(u=e.toolbar,c=e.buttons,!1===u?[]:void 0===u||!0===u?(o=c,a=L(QE,(function(t){var e=B(t.items,(function(t){return Mt(o,t)||Mt(tM,t)}));return{name:t.name,items:e}})),B(a,(function(t){return 0<t.items.length}))):f(u)?L(u.split("|"),(function(t){return{items:t.trim().split(" ")}})):i(u,(function(t){return Mt(t,"name")&&Mt(t,"items")}))?u:[]);return B(L(s,(function(o){var i=W(o.items,(function(o){return 0===o.trim().length?[]:(i=t,a=e.buttons,u=o,c=e.allowToolbarGroups,s=n,l=r,at(a,u.toLowerCase()).orThunk((function(){return l.bind((function(t){return tt(t,(function(t){return at(a,t+u.toLowerCase())}))}))})).fold((function(){return at(tM,u.toLowerCase()).map((function(t){return t(i,s)})).orThunk((function(){return bt.none()}))}),(function(t){return"grouptoolbarbutton"!==t.type||c?(n=s,r=i,at(ZE,(e=t).type).fold((function(){return bt.none()}),(function(t){return bt.some(t(e,n,r))}))):bt.none();var e,n,r})).toArray());var i,a,u,c,s,l}));return{title:bt.from(t.translate(o.name)),items:i}})),(function(t){return 0<t.items.length}))},nM=fn(),rM=nM.os.isiOS()&&nM.os.version.major<=12,oM=Object.freeze({__proto__:null,render:function(t,e,n,r,o){var i=zr(0),a=e.outerContainer;aE(t);var u=Rt.fromDom(o.targetNode),c=ee(hn(u)),s=e.mothership;uf(u,s,De),Ps(c,e.uiMothership),t.on("PostRender",(function(){xE(t,e,n,r),i.set(t.getWin().innerWidth),oE.setMenubar(a,fC(t,n)),oE.setSidebar(a,n.sidebar),function(t,e){function n(){var e=c.get();e.left===a.innerWidth&&e.top===a.innerHeight||(c.set(Sn(a.innerWidth,a.innerHeight)),Av(t))}function r(){var e=t.getDoc().documentElement,n=s.get();n.left===e.offsetWidth&&n.top===e.offsetHeight||(s.set(Sn(e.offsetWidth,e.offsetHeight)),Av(t))}function o(e){return t.fire("ScrollContent",e)}var i=t.dom,a=t.getWin(),u=t.getDoc().documentElement,c=zr(Sn(a.innerWidth,a.innerHeight)),s=zr(Sn(u.offsetWidth,u.offsetHeight));i.bind(a,"resize",n),i.bind(a,"scroll",o);var l=lc(Rt.fromDom(t.getBody()),"load",r),f=e.uiMothership.element;t.on("hide",(function(){de(f,"display","none")})),t.on("show",(function(){be(f,"display")})),t.on("NodeChange",r),t.on("remove",(function(){l.unbind(),i.unbind(a,"resize",n),i.unbind(a,"scroll",o),a=null}))}(t,e)}));var l,f,d,m,h=oE.getSocket(a).getOrDie("Could not find expected socket element");rM&&(me(h.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"}),f=function(){t.fire("ScrollContent")},d=null,m=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];p(d)&&(d=setTimeout((function(){d=null,f.apply(null,t)}),20))},l=sc(h.element,"scroll",m),t.on("remove",l.unbind)),rv(t,e),t.addCommand("ToggleSidebar",(function(e,n){oE.toggleSidebar(a,n),t.fire("ToggleSidebar")})),t.addQueryValueHandler("ToggleSidebar",(function(){return oE.whichSidebar(a)}));var g=qg(t);g!==cg.sliding&&g!==cg.floating||t.on("ResizeWindow ResizeEditor ResizeContent",(function(){var n=t.getWin().innerWidth;n!==i.get()&&(oE.refreshToolbar(e.outerContainer),i.set(n))}));var v={enable:function(){nv(e,!1)},disable:function(){nv(e,!0)},isDisabled:function(){return ad.isDisabled(a)}};return{iframeContainer:h.element.dom,editorContainer:a.element.dom,api:v}}}),iM=Object.freeze({__proto__:null,render:function(t,e,n,r,o){var i=e.mothership,a=e.uiMothership,u=e.outerContainer,s=zr(null),l=Rt.fromDom(o.targetNode),f=function(t,e,n,r,o){function i(){return w.get()&&!t.removed}function a(t){return _?t.fold(c(0),(function(t){return 1<t.components().length?we(t.components()[1].element):0})):0}function u(){f.broadcastOn([df()],{})}function s(t){var n,r,c,s,l;void 0===t&&(t=!1),i()&&(p||(n=g.getOrThunk((function(){var t=OE(he(yn(),"margin-left")).getOr(0);return Ce(yn())-Se(e).left+t})),de(o.get().element,"max-width",n+"px")),_&&oE.refreshToolbar(d),p||(r=a(oE.getToolbar(d)),c=Rn(e),s=b()?Math.max(c.y-we(o.get().element)+r,0):c.bottom,me(d.element,{position:"absolute",top:Math.round(s)+"px",left:Math.round(c.x)+"px"})),h&&(l=o.get(),t?pk.reset(l):pk.refresh(l)),u())}function l(n){var r,u;void 0===n&&(n=!0),!p&&h&&i()&&(r=v.getDockingMode(),(u=function(n){switch(Xg(t)){case lg.auto:var r=a(oE.getToolbar(d)),o=we(n.element)-r,i=Rn(e);if(i.y>o)return"top";var u=Gt(e),c=Math.max(u.dom.scrollHeight,we(u));return i.bottom<c-o||In().bottom<i.bottom-o?"bottom":"top";case lg.bottom:return"bottom";default:return lg.top,"top"}}(o.get()))!==r&&(function(t){var e=o.get();pk.setModes(e,[t]),v.setDockingMode(t);var n=b()?bc.TopToBottom:bc.BottomToTop;oe(e.element,qc,n)}(u),n&&s(!0)))}var f=n.uiMothership,d=n.outerContainer,m=$g.DOM,p=Qg(t),h=ev(t),g=rg(t).or(kE(t)),v=r.shared.header,b=v.isPositionedAtTop,y=qg(t),_=y===cg.sliding||y===cg.floating,w=zr(!1);return{isVisible:i,isPositionedAtTop:b,show:function(){w.set(!0),de(d.element,"display","flex"),m.addClass(t.getBody(),"mce-edit-focus"),be(f.element,"display"),l(!1),s()},hide:function(){w.set(!1),n.outerContainer&&(de(d.element,"display","none"),m.removeClass(t.getBody(),"mce-edit-focus")),de(f.element,"display","none")},update:s,updateMode:l,repositionPopups:u}}(t,l,e,r,s),d=t.getParam("toolbar_persist",!1,"boolean");function m(){var o;s.get()?f.show():(s.set(oE.getHeader(u).getOrDie()),Ps(o=Zg(t),i),Ps(o,a),xE(t,e,n,r),oE.setMenubar(u,fC(t,n)),f.show(),function(t,e,n,r){function o(r){var o=EE(e,n.isPositionedAtTop()),a=o.pos,u=o.bounds,c=i.get(),s=c.pos,l=c.bounds,f=u.height!==l.height||u.width!==l.width;i.set({pos:a,bounds:u}),f&&Av(t,r),n.isVisible()&&(s!==a?n.update(!0):f&&(n.updateMode(),n.repositionPopups()))}var i=zr(EE(e,n.isPositionedAtTop()));r||(t.on("activate",n.show),t.on("deactivate",n.hide)),t.on("SkinLoaded ResizeWindow",(function(){return n.update(!0)})),t.on("NodeChange keydown",(function(t){eh.requestAnimationFrame((function(){return o(t)}))})),t.on("ScrollWindow",(function(){return n.updateMode()}));var a=uc();a.set(lc(Rt.fromDom(t.getBody()),"load",o)),t.on("remove",(function(){a.clear()}))}(t,l,f,d),t.nodeChanged())}uE(t),t.on("show",m),t.on("hide",f.hide),d||(t.on("focus",m),t.on("blur",f.hide)),t.on("init",(function(){(t.hasFocus()||d)&&m()})),rv(t,e);var p={show:function(){f.show()},hide:function(){f.hide()},enable:function(){nv(e,!1)},disable:function(){nv(e,!0)},isDisabled:function(){return ad.isDisabled(u)}};return{editorContainer:u.element.dom,api:p}}}),aM="contexttoolbar-hide",uM=function(t,e){var n,r,o,i,u=t.label.fold((function(){return{}}),(function(t){return{"aria-label":t}})),c=Am(fy.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:t.initValue(),inputAttributes:u,selectOnFocus:!0,inputBehaviours:Yu([Cp.config({mode:"special",onEnter:function(t){return s.findPrimary(t).map((function(t){return bo(t),!0}))},onLeft:function(t,e){return e.cut(),bt.none()},onRight:function(t,e){return e.cut(),bt.none()}})])})),s=(n=c,r=t.commands,o=e,i=L(r,(function(t){return Am(("contextformtogglebutton"===t.type?function(t,e,n){var r=e.original;r.primary;var o=E(r,["primary"]),i=ur(gh(k(k({},o),{type:"togglebutton",onAction:a})));return JE(i,n.backstage.shared.providers,[ME(t,e)])}:function(t,e,n){var r=e.original;r.primary;var o=E(r,["primary"]),i=ur(hh(k(k({},o),{type:"button",onAction:a})));return YE(i,n.backstage.shared.providers,[ME(t,e)])})(n,t,{backstage:{shared:{providers:o}}}))})),{asSpecs:function(){return L(i,(function(t){return t.asSpec()}))},findPrimary:function(t){return tt(r,(function(e,n){return e.primary?bt.from(i[n]).bind((function(e){return e.getOpt(t)})).filter(w(ad.isDisabled)):bt.none()}))}});return[{title:bt.none(),items:[c.asSpec()]},{title:bt.none(),items:s.asSpecs()}]},cM={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"],inset:["tox-pop--inset"]},sM={maxHeightFunction:Mc(),maxWidthFunction:Nk()},lM=Ro("forward-slide"),fM=Ro("backward-slide"),dM=Ro("change-slide-event"),mM="tox-pop--resizing",pM="tox-pop--transition",hM={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},gM=(BE=["Infinity",(LE="[0-9]+")+"\\."+vM(LE)+vM(jE="[eE][+-]?[0-9]+"),"\\."+LE+vM(jE),LE+vM(jE)].join("|"),new RegExp("^([+-]?(?:"+BE+"))(.*)$"));function vM(t){return"(?:"+t+")?"}function bM(t,e){function n(){var n=e.getOptions(t),r=e.getCurrent(t).map(e.hash),o=cc();return L(n,(function(n){return{type:"togglemenuitem",text:e.display(n),onSetup:function(i){function a(t){t&&(o.on((function(t){return t.setActive(!1)})),o.set(i)),i.setActive(t)}a(ct(r,e.hash(n)));var u=e.watcher(t,n,a);return function(){o.clear(),u()}},onAction:function(){return e.setCurrent(t,n)}}}))}t.ui.registry.addMenuButton(e.name,{tooltip:e.text,icon:e.icon,fetch:function(t){return t(n())},onSetup:e.onToolbarSetup}),t.ui.registry.addNestedMenuItem(e.name,{type:"nestedmenuitem",text:e.text,getSubmenuItems:n,onSetup:e.onMenuSetup})}function yM(t,e){return function(){t.execCommand("mceToggleFormat",!1,e)}}function _M(t,e){return gC(t,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",(function(n){n.setDisabled(t.mode.isReadOnly()||!t.undoManager[e]())}))}function wM(t,e){var n,r,o,i,a,u,s,l,f,d,m,p,h,v,b,y,_,w,x,O,S,C,E,M,T,D=t;Ot([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],(function(t){D.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:bC(D,t.cmd),onSetup:hC(D,t.name)})})),D.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onAction:bC(D,"JustifyNone")}),function(t){var e,n;!function(t){Vx.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],(function(e,n){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onSetup:hC(t,e.name),onAction:yM(t,e.name)})}));for(var e=1;e<=6;e++){var n="h"+e;t.ui.registry.addToggleButton(n,{text:n.toUpperCase(),tooltip:"Heading "+e,onSetup:hC(t,n),onAction:yM(t,n)})}}(t),e=t,Vx.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"}],(function(t){e.ui.registry.addButton(t.name,{tooltip:t.text,icon:t.icon,onAction:bC(e,t.action)})})),n=t,Vx.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],(function(t){n.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:bC(n,t.action),onSetup:hC(n,t.name)})}))}(M=t),T=M,Vx.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through",shortcut:""},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript",shortcut:""},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript",shortcut:""},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting",shortcut:""},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document",shortcut:""},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"}],(function(t){T.ui.registry.addMenuItem(t.name,{text:t.text,icon:t.icon,shortcut:t.shortcut,onAction:bC(T,t.action)})})),T.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:yM(T,"code")}),E=yC(0,m=f=e,sE(d=l=t)),d.ui.registry.addNestedMenuItem("align",{text:m.shared.providers.translate("Align"),getSubmenuItems:function(){return E.items.validateItems(E.getStyleItems())}}),v=yC(0,h=f,fE(p=l)),p.ui.registry.addNestedMenuItem("fontformats",{text:h.shared.providers.translate("Fonts"),getSubmenuItems:function(){return v.items.validateItems(v.getStyleItems())}}),b=l,_=k({type:"advanced"},(y=f).styleselect),w=yC(0,y,hE(b,_)),b.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return w.items.validateItems(w.getStyleItems())}}),O=yC(0,f,pE(x=l)),x.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return O.items.validateItems(O.getStyleItems())}}),C=yC(0,f,dE(S=l)),S.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return C.items.validateItems(C.getStyleItems())}}),(u=a=t).ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:_M(u,"hasUndo"),onAction:bC(u,"undo")}),u.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:_M(u,"hasRedo"),onAction:bC(u,"redo")}),(s=a).ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",disabled:!0,onSetup:_M(s,"hasUndo"),onAction:bC(s,"undo")}),s.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",disabled:!0,onSetup:_M(s,"hasRedo"),onAction:bC(s,"redo")}),function(t){var e;(e=t).addCommand("mceApplyTextcolor",(function(t,n){var r,o=t,i=n;(r=e).undoManager.transact((function(){r.focus(),r.formatter.apply(o,{value:i}),r.nodeChanged()}))})),e.addCommand("mceRemoveTextcolor",(function(t){var n,r=t;(n=e).undoManager.transact((function(){n.focus(),n.formatter.remove(r,{value:null},null,!0),n.nodeChanged()}))}));var n=zr(xb),r=zr(xb);db(t,"forecolor","forecolor","Text color",n),db(t,"backcolor","hilitecolor","Background color",r),mb(t,"forecolor","forecolor","Text color"),mb(t,"backcolor","hilitecolor","Background color")}(t),function(t){var e;t.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:bC(t,"mceToggleVisualAid")}),t.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:gC(e=t,"VisualAid",(function(t){t.setActive(e.hasVisual)})),onAction:bC(t,"mceToggleVisualAid")})}(t),(o=t).ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:gC(i=o,"NodeChange",(function(t){t.setDisabled(!i.queryCommandState("outdent"))})),onAction:bC(o,"outdent")}),o.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:bC(o,"indent")}),bM(n=t,oT),r=n,bt.from(r.getParam("content_langs",void 0,"array")).map((function(t){return{name:"language",text:"Language",icon:"language",getOptions:c(t),hash:function(t){return g(t.customCode)?t.code:t.code+"/"+t.customCode},display:function(t){return t.title},watcher:function(t,e,n){return t.formatter.formatChanged("lang",n,!1,{value:e.code,customValue:e.customCode}).unbind},getCurrent:function(t){return fo(Rt.fromDom(t.selection.getNode()),(function(t){return bt.some(t).filter(Ge).bind((function(t){return ue(t,"lang").map((function(e){return{code:e,customCode:ue(t,"data-mce-lang").getOrUndefined(),title:""}}))}))}))},setCurrent:function(t,e){return t.execCommand("Lang",!1,e)},onToolbarSetup:function(t){var e=uc();return t.setActive(r.formatter.match("lang",{},void 0,!0)),e.set(r.formatter.formatChanged("lang",t.setActive,!0)),e.clear}}})).each((function(t){return bM(n,t)}))}function xM(t,e){return{type:"makeshift",x:t,y:e}}function OM(t){return"longpress"===t.type||0===t.type.indexOf("touch")}function SM(t,e,n){switch(n){case"node":return{type:"node",node:bt.some(Rt.fromDom((r=t).selection.getNode())),root:Rt.fromDom(r.getBody())};case"point":return function(t,e){return"contextmenu"===e.type||"longpress"===e.type?t.inline?function(t){if(OM(t)){var e=t.touches[0];return xM(e.pageX,e.pageY)}return xM(t.pageX,t.pageY)}(e):(n=t.getContentAreaContainer(),r=function(t){if(OM(t)){var e=t.touches[0];return xM(e.clientX,e.clientY)}return xM(t.clientX,t.clientY)}(e),i=(o=$g.DOM.getPos(n)).x,a=o.y,xM(r.x+i,r.y+a)):iT(t);var n,r,o,i,a}(t,e);case"selection":return iT(t)}var r}function CM(t,e,n,r,o,i){function a(){var a,u,c,m,p,h,g,v,b,y;c=n(),m=r,p=o,g=!(f||s||l&&d),b=SM(a=t,u=e,v=h=i),y=k({bubble:hc(0,"point"===v?12:0,uT),layouts:aT,overrides:{maxWidthFunction:Nk(),maxHeightFunction:Mc()}},b),ww(c,dg.CLOSE_ON_EXECUTE,m,!0).map((function(t){u.preventDefault(),Jp.showMenuWithinBounds(p,{anchor:y},{menu:{markers:Vh("normal"),highlightImmediately:g},data:t,type:"horizontal"},(function(){return bt.some(AE(a,m.shared,"node"===h?"node":"selection"))})),a.fire(aM)}))}var u,c=fn(),s=c.os.isiOS(),l=c.os.isOSX(),f=c.os.isAndroid(),d=c.deviceType.isTouch();(l||s)&&"node"!==i?(u=function(){(function(t){function e(){eh.setEditorTimeout(t,(function(){t.selection.setRng(n)}),10),i()}var n=t.selection.getRng();function r(t){t.preventDefault(),t.stopImmediatePropagation()}function o(){return i()}t.once("touchend",e),t.on("mousedown",r,!0),t.once("longpresscancel",o);var i=function(){t.off("touchend",e),t.off("longpresscancel",o),t.off("mousedown",r)}})(t),a()},function(t,e){var n=t.selection;if(!(n.isCollapsed()||e.touches.length<1)){var r=e.touches[0],o=n.getRng();return ds(t.getWin(),is.domRange(o)).exists((function(t){return t.left<=r.clientX&&t.right>=r.clientX&&t.top<=r.clientY&&t.bottom>=r.clientY}))}}(t,e)?u():(t.once("selectionchange",u),t.once("touchend",(function(){return t.off("selectionchange",u)})))):a()}function kM(t){return"string"==typeof t?t.split(/[ ,]/):t}function EM(t){return t.getParam("contextmenu_never_use_native",!1,"boolean")}function MM(t){return f(t)?"|"===t:"separator"===t.type}function TM(t,e){if(0===e.length)return t;var n=Z(t).filter((function(t){return!MM(t)})).fold((function(){return[]}),(function(t){return[cT]}));return t.concat(n).concat(e).concat([cT])}function DM(t,e){return"longpress"!==e.type&&(2!==e.button||e.target===t.getBody()&&""===e.pointerType)}function AM(t,e){return DM(t,e)?t.selection.getStart(!0):e.target}function PM(t,e,n){function r(t){return Jp.hide(a)}function o(e){var r;EM(t)&&e.preventDefault(),e.ctrlKey&&!EM(t)||!1===t.getParam("contextmenu")||(r=function(t,e){var n=t.getParam("contextmenu_avoid_overlap","","string"),r=DM(t,e)?"selection":"point";if(mt(n)){var o=AM(t,e);return Ab(Rt.fromDom(o),n)?"node":r}return r}(t,e),(i()?CM:function(t,e,n,r,o,i){var a=n(),u=SM(t,e,i);ww(a,dg.CLOSE_ON_EXECUTE,r,!1).map((function(t){e.preventDefault(),Jp.showMenuAt(o,{anchor:u},{menu:{markers:Vh("normal")},data:t})}))})(t,e,(function(){var n,r,o,i=AM(t,e),a=t.ui.registry.getAll(),u=(o=(r=t).ui.registry.getAll().contextMenus,bt.from(r.getParam("contextmenu")).map(kM).getOrThunk((function(){return B(kM("link linkchecker image imagetools table spellchecker configurepermanentpen"),(function(t){return Mt(o,t)}))}))),c=a.contextMenus,s=i;return 0<(n=N(u,(function(t,e){return at(c,e.toLowerCase()).map((function(e){var n=e.update(s);if(f(n))return TM(t,n.split(" "));if(0<n.length){var r=L(n,sT);return TM(t,r)}return t})).getOrThunk((function(){return t.concat([e])}))}),[])).length&&MM(n[n.length-1])&&n.pop(),n}),n,a,r))}var i=fn().deviceType.isTouch,a=Oa(Jp.sketch({dom:{tag:"div"},lazySink:e,onEscape:function(){return t.focus()},onShow:function(){return n.setContextMenuState(!0)},onHide:function(){return n.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:Yu([im("dismissContextMenu",[Oo(Ui(),(function(e,n){lf.close(e),t.focus()}))])])}));t.on("init",(function(){var e="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(i()?"":" ResizeWindow");t.on(e,r),t.on("longpress contextmenu",o)}))}function RM(t){return function(e){return e.translate(-t.left,-t.top)}}function IM(t){return function(e){return e.translate(t.left,t.top)}}function zM(t){return function(e,n){return N(t,(function(t,e){return e(t)}),Sn(e,n))}}function LM(t,e,n){return t.fold(zM([IM(n),RM(e)]),zM([RM(e)]),zM([]))}function jM(t,e,n){return t.fold(zM([IM(n)]),zM([]),zM([IM(e)]))}function BM(t,e,n){return t.fold(zM([]),zM([RM(n)]),zM([IM(e),RM(n)]))}function FM(t,e,n){var r=t.fold((function(t,e){return{position:bt.some("absolute"),left:bt.some(t+"px"),top:bt.some(e+"px")}}),(function(t,e){return{position:bt.some("absolute"),left:bt.some(t-n.left+"px"),top:bt.some(e-n.top+"px")}}),(function(t,e){return{position:bt.some("fixed"),left:bt.some(t+"px"),top:bt.some(e+"px")}}));return k({right:bt.none(),bottom:bt.none()},r)}function NM(t,e,n,r){function o(t,o){return function(i,a){var u=t(e,n,r);return o(i.getOr(u.left),a.getOr(u.top))}}return t.fold(o(BM,fT),o(jM,dT),o(LM,mT))}function HM(t,e){var n=ae(t,e);return g(n)?NaN:parseInt(n,10)}function VM(t,e,n,r){return tt(t,(function(t){var o,i,a=t.sensor,u=t.range.left,c=t.range.top,s=jM(e,o=n,i=r),l=jM(a,o,i);return Math.abs(s.left-l.left)<=u&&Math.abs(s.top-l.top)<=c?bt.some({output:NM(t.output,e,n,r),extra:t.extra}):bt.none()}))}function UM(t,e){var n;t.getSystem().addToGui(e),qt((n=e).element).filter(Ge).each((function(t){ge(t,"z-index").each((function(e){oe(t,vT,e)})),de(t,"z-index",he(n.element,"z-index"))}))}function WM(t){qt(t.element).filter(Ge).each((function(t){ue(t,vT).fold((function(){return be(t,"z-index")}),(function(e){return de(t,"z-index",e)})),se(t,vT)})),t.getSystem().removeFromGui(t)}function $M(t,e,n){return t.getSystem().build(Gb.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[e]},events:n}))}function GM(t,e){return{bounds:t.getBounds(),height:xe(e.element),width:ke(e.element)}}function KM(t,e,n,r,o){var i=n.update(r,o),a=n.getStartData().getOrThunk((function(){return GM(e,t)}));i.each((function(n){var r,o,i,u,s,l,f,d,m,p,h,g,v,b,y,_,w,x,O,S,C,k,E,M,T,D=t,A=a,P=n,R=(r=e).getTarget(D.element);r.repositionTarget&&(o=ze(Wt(D.element)),i=hS(R),k=ge(C=R,"left"),E=ge(C,"top"),M=ge(C,"position"),T=function(t,e,n){return("fixed"===n?mT:fT)(parseInt(t,10),parseInt(e,10))},u=(k.isSome()&&E.isSome()&&M.isSome()?bt.some(T(k.getOrDie(),E.getOrDie(),M.getOrDie())):bt.none()).getOrThunk((function(){var t=Se(C);return dT(t.left,t.top)})),s=D,l=r.snaps,f=u,d=o,m=i,p=P,h=A,v=l.fold((function(){var t,e,n=LM((t=p.left,e=p.top,f.fold((function(n,r){return fT(n+t,r+e)}),(function(n,r){return dT(n+t,r+e)}),(function(n,r){return mT(n+t,r+e)}))),d,m);return mT(n.left,n.top)}),(function(t){var e=function(t,e,n,r,o,i){var a,u,c,s,l,f,d=(a=n,u=r,l=HM(s=t.element,(c=e).leftAttr),f=HM(s,c.topAttr),(isNaN(l)||isNaN(f)?bt.none():bt.some(Sn(l,f))).fold((function(){return a}),(function(t){return mT(t.left+u.left,t.top+u.top)}))),m=(e.mustSnap?pT:hT)(t,e,d,o,i),p=LM(d,o,i),h=e,g=p,v=t.element;return oe(v,h.leftAttr,g.left+"px"),oe(v,h.topAttr,g.top+"px"),m.fold((function(){return{coord:mT(p.left,p.top),extra:bt.none()}}),(function(t){return{coord:t.output,extra:t.extra}}))}(s,t,f,p,d,m);return e.extra.each((function(e){t.onSensor(s,e)})),e.coord})),b=d,y=m,_=(g=h).bounds,w=jM(v,b,y),x=Fu(w.left,_.x,_.x+_.width-g.width),O=Fu(w.top,_.y,_.y+_.height-g.height),S=dT(x,O),pe(R,FM(v.fold((function(){var t=BM(S,b,y);return fT(t.left,t.top)}),c(S),(function(){var t=LM(S,b,y);return mT(t.left,t.top)})),0,i))),r.onDrag(D,R,P)}))}function qM(t,e,n,r){e.each(WM),n.snaps.each((function(e){var n,r;n=e,se(r=t.element,n.leftAttr),se(r,n.topAttr)}));var o=n.getTarget(t.element);r.reset(),n.onDrop(t,o)}function XM(t){return function(e,n){function r(t){n.setStartData(GM(e,t))}return Qi(M([Oo(Fi(),(function(t){n.getStartData().each((function(){return r(t)}))}))],t(e,n,r),!0))}}function YM(t,e,n){return[Oo(si(),(function(r,o){var i,a,u,c,s;0===o.event.raw.button&&(o.stop(),u={drop:i=function(){return qM(r,bt.some(c),t,e)},delayDrop:(a=Pb(i,200)).schedule,forceDrop:i,move:function(n){a.cancel(),KM(r,t,e,_T,n)}},c=$M(r,t.blockerClass,(s=u,Qi([Oo(si(),s.forceDrop),Oo(di(),s.drop),Oo(li(),(function(t,e){s.move(e.event)})),Oo(fi(),s.delayDrop)]))),n(r),UM(r,c))}))]}function JM(t,e,n){function r(n){qM(n,o.get(),t,e),o.clear()}var o=cc();return[Oo(ii(),(function(i,a){a.stop();var u,c,s,l=$M(i,t.blockerClass,(c=u=function(){return r(i)},s=function(n){KM(i,t,e,xT,n)},Qi([Oo(ii(),c),Oo(ui(),u),Oo(ci(),u),Oo(ai(),(function(t,e){s(e.event)}))])));o.set(l),n(i),UM(i,l)})),Oo(ai(),(function(n,r){r.stop(),KM(n,t,e,xT,r.event)})),Oo(ui(),(function(t,e){e.stop(),r(t)})),Oo(ci(),r)]}function QM(t,e,n,r,o,i){return t.fold((function(){return CT.snap({sensor:dT(n-20,r-20),range:Sn(o,i),output:dT(bt.some(n),bt.some(r)),extra:{td:e}})}),(function(t){var o=n-20,i=r-20,a=t.element.dom.getBoundingClientRect();return CT.snap({sensor:dT(o,i),range:Sn(40,40),output:dT(bt.some(n-a.width/2),bt.some(r-a.height/2)),extra:{td:e}})}))}function ZM(t,e,n){return{getSnapPoints:t,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(t,r){var o=r.td,i=e.get(),a=o;i.exists((function(t){return Vt(t,a)}))||(e.set(o),n(o))},mustSnap:!0}}function tT(t){return Am(nh.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:Yu([CT.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:t}),qw.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))}function eT(t,e){function n(t){var n=Ne(t);return QM(p.getOpt(e),t,n.x,n.y,n.width,n.height)}function r(t){var n=Ne(t);return QM(h.getOpt(e),t,n.right,n.bottom,n.width,n.height)}function o(e,n,r,o){var i=r(n);CT.snapTo(e,i),function(e){var r=n.dom.getBoundingClientRect();be(e.element,"display");var i=Kt(Rt.fromDom(t.getBody())).dom.innerHeight,a=r[o]<0,u=r[o]>i;(a||u)&&de(e.element,"display","none")}(e)}function i(t){return o(g,t,n,"top")}function a(t){return o(v,t,r,"bottom")}var u=zr([]),c=zr([]),s=zr(!1),l=cc(),f=cc(),d=ZM((function(){return L(u.get(),n)}),l,(function(e){f.get().each((function(n){t.fire("TableSelectorChange",{start:e,finish:n})}))})),m=ZM((function(){return L(c.get(),r)}),f,(function(e){l.get().each((function(n){t.fire("TableSelectorChange",{start:n,finish:e})}))})),p=tT(d),h=tT(m),g=Oa(p.asSpec()),v=Oa(h.asSpec());fn().deviceType.isTouch()&&(t.on("TableSelectionChange",(function(t){s.get()||(Ms(e,g),Ms(e,v),s.set(!0)),l.set(t.start),f.set(t.finish),t.otherCells.each((function(e){u.set(e.upOrLeftCells),c.set(e.downOrRightCells),i(t.start),a(t.finish)}))})),t.on("ResizeEditor ResizeWindow ScrollContent",(function(){l.get().each(i),f.get().each(a)})),t.on("TableSelectionClear",(function(){s.get()&&(Ds(g),Ds(v),s.set(!1)),l.clear(),f.clear()})))}var nT,rT,oT={name:"lineheight",text:"Line height",icon:"line-height",getOptions:function(t){return t.getParam("lineheight_formats","1 1.1 1.2 1.3 1.4 1.5 2","string").split(" ")},hash:function(t){return e=["fixed","relative","empty"],bt.from(gM.exec(t)).bind((function(t){var n=Number(t[1]),r=t[2],o=r;return R(e,(function(t){return R(hM[t],(function(t){return o===t}))}))?bt.some({value:n,unit:r}):bt.none()})).map((function(t){return t.value+t.unit})).getOr(t);var e},display:s,watcher:function(t,e,n){return t.formatter.formatChanged("lineheight",n,!1,{value:e}).unbind},getCurrent:function(t){return bt.from(t.queryCommandValue("LineHeight"))},setCurrent:function(t,e){return t.execCommand("LineHeight",!1,e)}},iT=function(t){return{type:"selection",root:Rt.fromDom(t.selection.getNode())}},aT={onLtr:function(){return[Gu,Hu,Vu,Uu,Wu,$u,Zp,th,Sm,xm,Om,wm]},onRtl:function(){return[Gu,Vu,Hu,Wu,Uu,$u,Zp,th,Om,wm,Sm,xm]}},uT={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},cT={type:"separator"},sT=function(t){function e(t){return{text:t.text,icon:t.icon,disabled:t.disabled,shortcut:t.shortcut}}var n;if(f(t))return t;switch(t.type){case"separator":return cT;case"submenu":return k(k({type:"nestedmenuitem"},e(t)),{getSubmenuItems:function(){var e=t.getSubmenuItems();return f(e)?e:L(e,sT)}});default:return k(k({type:"menuitem"},e(t)),{onAction:(n=t.onAction,function(){return n()})})}},lT=Lr([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),fT=lT.offset,dT=lT.absolute,mT=lT.fixed,pT=function(t,e,n,r,o){var i=e.getSnapPoints(t);return VM(i,n,r,o).orThunk((function(){return N(i,(function(t,e){var i,a,u,c,s,l,f,d=(i=e.sensor,e.range.left,e.range.top,c=jM(n,a=r,u=o),s=jM(i,a,u),l=Math.abs(c.left-s.left),f=Math.abs(c.top-s.top),Sn(l,f));return t.deltas.fold((function(){return{deltas:bt.some(d),snap:bt.some(e)}}),(function(n){return(d.left+d.top)/2<=(n.left+n.top)/2?{deltas:bt.some(d),snap:bt.some(e)}:t}))}),{deltas:bt.none(),snap:bt.none()}).snap.map((function(t){return{output:NM(t.output,n,r,o),extra:t.extra}}))}))},hT=function(t,e,n,r,o){return VM(e.getSnapPoints(t),n,r,o)},gT=Object.freeze({__proto__:null,snapTo:function(t,e,n,r){var o,i,a,u=e.getTarget(t.element);e.repositionTarget&&(o=ze(Wt(t.element)),i=hS(u),pe(u,FM([NM((a=r).output,a.output,o,i),a.extra][0],0,i)))}}),vT="data-initial-z-index",bT=Cr("snaps",[fr("getSnapPoints"),$a("onSensor"),fr("leftAttr"),fr("topAttr"),kr("lazyViewport",In),kr("mustSnap",!1)]),yT=[kr("useFixed",O),fr("blockerClass"),kr("getTarget",s),kr("onDrag",a),kr("repositionTarget",!0),kr("onDrop",a),Pr("getBounds",In),bT],_T=Object.freeze({__proto__:null,getData:function(t){return bt.from(Sn(t.x,t.y))},getDelta:function(t,e){return Sn(e.left-t.left,e.top-t.top)}}),wT=M(M([],yT,!0),[Xa("dragger",{handlers:XM(YM)})],!1),xT=Object.freeze({__proto__:null,getData:function(t){var e,n=t.raw.touches;return 1===n.length?(e=n[0],bt.some(Sn(e.clientX,e.clientY))):bt.none()},getDelta:function(t,e){return Sn(e.left-t.left,e.top-t.top)}}),OT=M(M([],yT,!0),[Xa("dragger",{handlers:XM(JM)})],!1),ST=M(M([],yT,!0),[Xa("dragger",{handlers:XM((function(t,e,n){return M(M([],YM(t,e,n),!0),JM(t,e,n),!0)}))})],!1),CT=gu({branchKey:"mode",branches:Object.freeze({__proto__:null,mouse:wT,touch:OT,mouseOrTouch:ST}),name:"dragging",active:{events:function(t,e){return t.dragger.handlers(t,e)}},extra:{snap:function(t){return{sensor:t.sensor,range:t.range,output:t.output,extra:bt.from(t.extra)}}},state:Object.freeze({__proto__:null,init:function(){var t=bt.none(),e=bt.none(),n=c({});return va({readState:n,reset:function(){t=bt.none(),e=bt.none()},update:function(e,n){return e.getData(n).bind((function(n){return r=e,o=n,i=t.map((function(t){return r.getDelta(t,o)})),t=bt.some(o),i;var r,o,i}))},getStartData:function(){return e},setStartData:function(t){e=bt.some(t)}})}}),apis:gT});function kT(t,e,n){var r,o,i,a,u,c,s=Rt.fromDom(t.getContainer());et((r=t,o=e,i=n,a=we(s),u=Ce(s),(c={}).height=CE(a+o.top,ng(r),og(r)),i===nT.Both&&(c.width=CE(u+o.left,eg(r),rg(r))),c),(function(t,e){return de(s,e,SE(t)),0})),t.fire("ResizeEditor")}function ET(t,e,n,r){return kT(t,Sn(20*n,20*r),e),bt.some(!0)}function MT(t,e){var n,r,o,i,a,u,c,s,l,f,d,m,p,h,g,v;return{dom:{tag:"div",classes:["tox-statusbar"]},components:(v=[],t.getParam("elementpath",!0,"boolean")&&v.push((p=t,g=e,(h={}).delimiter||(h.delimiter="»"),{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:Yu([Cp.config({mode:"flow",selector:"div[role=button]"}),ad.config({disabled:g.isDisabled}),ov(),Jb.config({}),Ep.config({}),im("elementPathEvents",[Zi((function(t,e){p.shortcuts.add("alt+F11","focus statusbar elementpath",(function(){return Cp.focusIn(t)})),p.on("NodeChange",(function(e){var n,r,o=function(t){for(var e=[],n=t.length;0<n--;){var r=t[n];if(1===r.nodeType&&!function(t){if(1===t.nodeType){if("BR"===t.nodeName||t.getAttribute("data-mce-bogus"))return 1;if("bookmark"===t.getAttribute("data-mce-type"))return 1}}(r)){var o=p.fire("ResolveName",{name:r.nodeName.toLowerCase(),target:r});if(o.isDefaultPrevented()||e.push({name:o.name,element:r}),o.isPropagationStopped())break}}return e}(e.parents);0<o.length?Ep.set(t,(n=L(o||[],(function(t,e){return nh.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":e,"tab-index":-1,"aria-level":e+1},innerHtml:t.name},action:function(e){p.focus(),p.selection.select(t.element),p.nodeChanged()},buttonBehaviours:Yu([Nv(g.isDisabled),ov()])})})),r={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+h.delimiter+" "}},N(n.slice(1),(function(t,e){var n=t;return n.push(r),n.push(e),n}),[n[0]]))):Ep.set(t,[])}))}))])]),components:[]})),t.hasPlugin("wordcount")&&v.push((f=t,d=e,nh.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:Yu([Nv(d.isDisabled),ov(),Jb.config({}),Ep.config({}),wf.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),im("wordcount-events",[na((function(t){var e=wf.getValue(t),n="words"===e.mode?"characters":"words";wf.setValue(t,{mode:n,count:e.count}),b(t,e.count,n)})),Zi((function(t){f.on("wordCountUpdate",(function(e){var n=wf.getValue(t).mode;wf.setValue(t,{mode:n,count:e.wordCount}),b(t,e.wordCount,n)}))}))])]),eventOrder:((m={})[Di()]=["disabling","alloy.base.behaviour","wordcount-events"],m)}))),t.getParam("branding",!0,"boolean")&&v.push({dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:'<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&utm_medium=poweredby&utm_source=tinymce&utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="'+(l=rh.translate(["Powered by {0}","Tiny"]))+'">'+l+"</a>"}}),n=0<v.length?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:v}]:[],i=e,u=!(a=o=t).hasPlugin("autoresize"),r=(s=!1===(c=a.getParam("resize",u))?nT.None:"both"===c?nT.Both:nT.Vertical)===nT.None?bt.none():bt.some(Bm("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:i.translate("Resize")},behaviours:[CT.config({mode:"mouse",repositionTarget:!1,onDrag:function(t,e,n){return kT(o,n,s)},blockerClass:"tox-blocker"}),Cp.config({mode:"special",onLeft:function(){return ET(o,s,-1,0)},onRight:function(){return ET(o,s,1,0)},onUp:function(){return ET(o,s,0,-1)},onDown:function(){return ET(o,s,0,1)}}),Jb.config({}),Dp.config({})]},i.icons)),n.concat(r.toArray()))};function b(t,e,n){return Ep.set(t,[ti(d.translate(["{0} "+n,e[n]]))])}}function TT(t){function e(){return d.bind(oE.getHeader)}function n(){return jn.value(_)}function r(){return d.bind((function(t){return oE.getThrobber(t)})).getOrDie("Could not find throbber element")}var o,i,u,c,s=t.inline,l=s?iM:oM,f=ev(t)?yk:sk,d=bt.none(),m=fn(),p=m.browser.isIE()?["tox-platform-ie"]:[],h=m.deviceType.isTouch()?["tox-platform-touch"]:[],g=Yg(t),v=Zg(t),b=rh.isRtl()?{attributes:{dir:"rtl"}}:{},y={attributes:((o={})[qc]=g?bc.BottomToTop:bc.TopToBottom,o)},_=Oa((i=Vt(yn(),v)&&"grid"===he(v,"display"),u={dom:k({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(p).concat(h)},b),behaviours:Yu([nf.config({useFixed:function(){return f.isDocked(e)}})])},c={dom:{styles:{width:document.body.clientWidth+"px"}},events:Qi([Oo(Ni(),(function(){de(Z.element,"width",document.body.clientWidth+"px")}))])},$r(u,i?c:{}))),w=Am({dom:{tag:"div",classes:["tox-anchorbar"]}}),x=mS(_,t,(function(){return d.bind((function(t){return w.getOpt(t)})).getOrDie("Could not find a anchor bar element")})),O=oE.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:x,onEscape:function(){t.focus()}}),S=qg(t),C=oE.parts.toolbar(k({dom:{tag:"div",classes:["tox-toolbar"]},getSink:n,providers:x.shared.providers,onEscape:function(){t.focus()},type:S,lazyToolbar:function(){return d.bind((function(t){return oE.getToolbar(t)})).getOrDie("Could not find more toolbar element")},lazyHeader:function(){return e().getOrDie("Could not find header element")}},y)),E=oE.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:x.shared.providers,onEscape:function(){t.focus()},type:S}),M=oE.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),T=oE.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),D=oE.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:x}),A=t.getParam("statusbar",!0,"boolean")&&!s?bt.some(MT(t,x.shared.providers)):bt.none(),P={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[M,T]},R=Kg(t),I=ag(t),z=ig(t),L=oE.parts.header({dom:k({tag:"div",classes:["tox-editor-header"]},y),components:U([z?[O]:[],R?[E]:I?[C]:[],Qg(t)?[]:[w.asSpec()]]),sticky:ev(t),editor:t,sharedBackstage:x.shared}),j=U([g?[]:[L],s?[]:[P],g?[L]:[]]),B=U([[{dom:{tag:"div",classes:["tox-editor-container"]},components:j}],s?[]:A.toArray(),[D]]),F=tv(t),N=k(k({role:"application"},rh.isRtl()?{dir:"rtl"}:{}),F?{"aria-hidden":"true"}:{}),H=Oa(oE.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(s?["tox-tinymce-inline"]:[]).concat(g?["tox-tinymce--toolbar-bottom"]:[]).concat(h).concat(p),styles:k({visibility:"hidden"},F?{opacity:"0",border:"0"}:{}),attributes:N},components:B,behaviours:Yu([ov(),ad.config({disableClass:"tox-tinymce--disabled"}),Cp.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a, .tox-statusbar__resize-handle"})])}));d=bt.some(H);t.shortcuts.add("alt+F9","focus menubar",(function(){oE.focusMenubar(H)})),t.shortcuts.add("alt+F10","focus toolbar",(function(){oE.focusToolbar(H)})),t.addCommand("ToggleToolbarDrawer",(function(){oE.toggleToolbarDrawer(H)})),t.addQueryStateHandler("ToggleToolbarDrawer",(function(){return oE.isToolbarDrawerToggled(H)}));var V,W,$,G,K,q,X,Y,J,Q=jb(H),Z=jb(_);return V=t,W=Q,$=Z,G=vu(),K=sc(G,"touchstart",rt),q=sc(G,"touchmove",(function(t){return tt(ji(),t)})),X=sc(G,"touchend",(function(t){return tt(Bi(),t)})),Y=sc(G,"mousedown",rt),J=sc(G,"mouseup",(function(t){0===t.raw.button&&et(mf(),{target:t.target})})),V.on("PostRender",(function(){V.on("click",ot),V.on("tap",ot),V.on("mouseup",it),V.on("mousedown",at),V.on("ScrollWindow",ut),V.on("ResizeWindow",st),V.on("ResizeEditor",lt),V.on("AfterProgressState",ft),V.on("DismissPopups",dt)})),V.on("remove",(function(){V.off("click",ot),V.off("tap",ot),V.off("mouseup",it),V.off("mousedown",at),V.off("ScrollWindow",ut),V.off("ResizeWindow",st),V.off("ResizeEditor",lt),V.off("AfterProgressState",ft),V.off("DismissPopups",dt),Y.unbind(),K.unbind(),q.unbind(),X.unbind(),J.unbind()})),V.on("detach",(function(){Rs(W),Rs($),W.destroy(),$.destroy()})),{mothership:Q,uiMothership:Z,backstage:x,renderUI:function(){var o,i;f.setup(t,x.shared,e),wM(t,x),PM(t,n,x),i=(o=t).ui.registry.getAll().sidebars,Ot(Ct(i),(function(t){function e(){return ct(bt.from(o.queryCommandValue("ToggleSidebar")),t)}var n=i[t];o.ui.registry.addToggleButton(t,{icon:n.icon,tooltip:n.tooltip,onAction:function(n){o.execCommand("ToggleSidebar",!1,t),n.setActive(e())},onSetup:function(t){function n(){return t.setActive(e())}return o.on("ToggleSidebar",n),function(){o.off("ToggleSidebar",n)}}})})),KS(t,r,x.shared),nt(t.getParam("toolbar_groups",{},"object"),(function(e,n){t.ui.registry.addGroupToolbarButton(n,e)}));var a,u=t.ui.registry.getAll(),c=u.buttons,s=u.menuItems,d=u.contextToolbars,m=u.sidebars,p=ug(t),h={menuItems:s,menus:(a=t.getParam("menu"))?nt(a,(function(t){return k(k({},t),{items:t.items})})):{},menubar:t.getParam("menubar"),toolbar:p.getOrThunk((function(){return t.getParam("toolbar",!0)})),allowToolbarGroups:S===cg.floating,buttons:c,sidebar:m};zE(t,d,_,{backstage:x}),eT(t,_);var g=t.getElement(),v=function(){var e,n,r,o,i,a,u=SE((o=Zh(r=n=t),i=ng(r),a=og(r),OE(o).map((function(t){return CE(t,i,a)})).getOr(Zh(n)))),c=SE(kE(e=t).getOr(tg(e)));return t.inline||(ve("div","width",c)&&de(H.element,"width",c),ve("div","height",u)?de(H.element,"height",u):de(H.element,"height","200px")),u}();return l.render(t,{mothership:Q,uiMothership:Z,outerContainer:H},h,x,{targetNode:g,height:v})},getUi:function(){return{channels:{broadcastAll:Z.broadcast,broadcastOn:Z.broadcastOn,register:a}}}};function tt(t,e){Ot([W,$],(function(n){n.broadcastEvent(t,e)}))}function et(t,e){Ot([W,$],(function(n){n.broadcastOn([t],e)}))}function rt(t){return et(ff(),{target:t.target})}function ot(t){return et(ff(),{target:Rt.fromDom(t.target)})}function it(t){0===t.button&&et(mf(),{target:Rt.fromDom(t.target)})}function at(){Ot(V.editorManager.get(),(function(t){V!==t&&t.fire("DismissPopups",{relatedTarget:V})}))}function ut(t){return tt(Fi(),Sc(t))}function st(t){et(df(),{}),tt(Ni(),Sc(t))}function lt(){return et(df(),{})}function ft(t){t.state&&et(ff(),{target:Rt.fromDom(V.getContainer())})}function dt(t){et(ff(),{target:Rt.fromDom(t.relatedTarget.getContainer())})}}function DT(t){return io("items","items",{tag:"required",process:{}},tr(or((function(e){return ar("Checking item of "+t,bA,e).fold((function(t){return jn.error(oo(t))}),(function(t){return jn.value(t)}))}))))}function AT(t){return f(t.type)&&f(t.name)}function PT(t){return{internalDialog:ur(ar("dialog",kA,t)),dataValidator:(e=W(B(TA(t),AT),(function(t){return bt.from(DA[t.type]).fold((function(){return[]}),(function(e){return[dr(t.name,e)]}))})),Xr(e)),initialData:t.initialData};var e}function RT(t){var e=[],n={};return et(t,(function(t,r){t.fold((function(){e.push(r)}),(function(t){n[r]=t}))})),0<e.length?jn.error(e):jn.value(n)}function IT(t,e){de(t,"height",e+"px"),fn().browser.isIE()?be(t,"flex-basis"):de(t,"flex-basis",e+"px")}function zT(t,e,n){Ta(t,'[role="dialog"]').each((function(t){Da(t,'[role="tablist"]').each((function(r){n.get().map((function(n){return de(e,"height","0"),de(e,"flex-basis","0"),Math.min(n,(i=e,a=r,u=Gt(o=t).dom,c="fixed"===he(Ta(o,".tox-dialog-wrap").getOr(o),"position")?Math.max(u.clientHeight,window.innerHeight):Math.max(u.offsetHeight,u.scrollHeight),s=we(i),l=i.dom.offsetLeft>=a.dom.offsetLeft+Ce(a)?Math.max(we(a),s):s,f=parseInt(he(o,"margin-top"),10)||0,d=parseInt(he(o,"margin-bottom"),10)||0,c-(we(o)+f+d-l)));var o,i,a,u,c,s,l,f,d})).each((function(t){IT(e,t)}))}))}))}function LT(t){return Da(t,'[role="tabpanel"]')}function jT(t,e){function n(t){var e=RT(wf.getValue(t)).getOr({}),n=a.get(),r=$r(n,e);a.set(r)}function r(t){var e=a.get();wf.setValue(t,e)}var o,i,a=zr({}),u=zr(null),c=L(t.tabs,(function(t){return{value:t.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:e.shared.providers.translate(t.title)},view:function(){return[Rx.sketch((function(o){return{dom:{tag:"div",classes:["tox-form"]},components:L(t.items,(function(t){return UO(o,t,e)})),formBehaviours:Yu([Cp.config({mode:"acyclic",useTabstopAt:w(X_)}),im("TabView.form.events",[Zi(r),ta(n)]),tc.config({channels:co([{key:NA,value:{onReceive:n}},{key:HA,value:{onReceive:r}}])})])}}))]}}})),s=(o=c,i=cc(),{extraEvents:[Zi((function(t){var e=t.element;LT(e).each((function(n){var r;de(n,"visibility","hidden"),t.getSystem().getByDom(n).toOptional().each((function(t){var e,r,a;Q(Y((r=n,a=t,L(e=o,(function(t,n){Ep.set(a,e[n].view());var o=r.dom.getBoundingClientRect();return Ep.set(a,[]),o.height}))),(function(t,e){return e<t?-1:t<e?1:0}))).fold(i.clear,i.set)})),zT(e,n,i),be(n,"visibility"),r=t,Q(o).each((function(t){return FA.showTab(r,t.value)})),eh.requestAnimationFrame((function(){zT(e,n,i)}))}))})),Oo(Ni(),(function(t){var e=t.element;LT(e).each((function(t){zT(e,t,i)}))})),Oo(sy,(function(t,e){var n=t.element;LT(n).each((function(t){var e=_u(hn(t));de(t,"visibility","hidden");var r=ge(t,"height").map((function(t){return parseInt(t,10)}));be(t,"height"),be(t,"flex-basis");var o=t.dom.getBoundingClientRect().height;r.forall((function(t){return t<o}))?(i.set(o),zT(n,t,i)):r.each((function(e){IT(t,e)})),be(t,"visibility"),e.each(bu)}))}))],selectFirst:!1});return FA.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(t,e,n){var r=wf.getValue(e);vo(t,cy,{name:r,oldName:u.get()}),u.set(r)},tabs:c,components:[FA.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[zA.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:Yu([Jb.config({})])}),FA.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:s.selectFirst,tabSectionBehaviours:Yu([im("tabpanel",s.extraEvents),Cp.config({mode:"acyclic"}),td.config({find:function(t){return Q(FA.getViewItems(t))}}),wf.config({store:{mode:"manual",getValue:function(t){return t.getSystem().broadcastOn([NA],{}),a.get()},setValue:function(t,e){a.set(e),t.getSystem().broadcastOn([HA],{})}}})])})}function BT(t,e,n,r){return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:k(k({},e.map((function(t){return{id:t}})).getOr({})),r?{"aria-live":"polite"}:{})},components:[],behaviours:Yu([Fx(0),$E.config({channel:WA,updateState:function(t,e){return bt.some({isTabPanel:function(){return"tabpanel"===e.body.type}})},renderComponents:function(t){return"tabpanel"!==t.body.type?[(e=t.body,r=n,{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[(o=Am(Rx.sketch((function(t){return{dom:{tag:"div",classes:["tox-form"].concat(e.classes)},components:L(e.items,(function(e){return UO(t,e,r)}))}})))).asSpec()]}],behaviours:Yu([Cp.config({mode:"acyclic",useTabstopAt:w(X_)}),Bx(o),Wx(o,{postprocess:function(t){return RT(t).fold((function(t){return{}}),s)}})])})]:[jT(t.body,n)];var e,r,o},initialData:t})])}}function FT(t,e){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[t,e]}}function NT(t,e){return mD.parts.close(nh.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close")}},action:t,buttonBehaviours:Yu([Jb.config({})])}))}function HT(){return mD.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})}function VT(t,e){return mD.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:$S("<p>"+e.translate(t)+"</p>")}]}]})}function UT(t){return mD.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})}function WT(t,e){return[Gb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),Gb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:e})]}function $T(t){var e,n="tox-dialog",r=n+"-wrap",o=r+"__backdrop",i=n+"__disable-scroll";return mD.sketch({lazySink:t.lazySink,onEscape:function(e){return t.onEscape(e),bt.some(!0)},useTabstopAt:function(t){return!X_(t)},dom:{tag:"div",classes:[n].concat(t.extraClasses),styles:k({position:"relative"},t.extraStyles)},components:M([t.header,t.body],t.footer.toArray(),!0),parts:{blocker:{dom:$S('<div class="'+r+'"></div>'),components:[{dom:{tag:"div",classes:KA?[o,o+"--opaque"]:[o]}}]}},dragBlockClass:r,modalBehaviours:Yu(M([Dp.config({}),im("dialog-events",t.dialogEvents.concat([To(pi(),(function(t,e){Cp.focusIn(t)}))])),im("scroll-lock",[Zi((function(){$o(yn(),i)})),ta((function(){Go(yn(),i)}))])],t.extraBehaviours,!0)),eventOrder:k(((e={})[Di()]=["dialog-events"],e[Hi()]=["scroll-lock","dialog-events","alloy.base.behaviour"],e[Vi()]=["alloy.base.behaviour","dialog-events","scroll-lock"],e),t.eventOrder)})}function GT(t){return nh.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),title:t.translate("Close")}},components:[Bm("close",{tag:"div",classes:["tox-icon"]},t.icons)],action:function(t){go(t,ry)}})}function KT(t,e,n){function r(t){return[ti(n.translate(t.title))]}return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:k({},e.map((function(t){return{id:t}})).getOr({}))},components:r(t),behaviours:Yu([$E.config({channel:UA,renderComponents:r})])}}function qT(){return{dom:$S('<div class="tox-dialog__draghandle"></div>')}}function XT(t,e){return n={title:e.shared.providers.translate(t),draggable:e.dialog.isDraggableModal()},r=e.shared.providers,o=mD.parts.title(KT(n,bt.none(),r)),i=mD.parts.draghandle(qT()),a=mD.parts.close(GT(r)),u=[o].concat(n.draggable?[i]:[]).concat([a]),Gb.sketch({dom:$S('<div class="tox-dialog__header"></div>'),components:u});var n,r,o,i,a,u}function YT(t,e,n){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":n.translate(t)},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:e,components:[{dom:$S('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}}function JT(t,e,n){return{onClose:function(){return n.closeWindow()},onBlock:function(n){mD.setBusy(t(),(function(t,r){return YT(n.message,r,e)}))},onUnblock:function(){mD.setIdle(t())}}}function QT(t,e,n,r){var o;return Oa($T(k(k({},t),{lazySink:r.shared.getSink,extraBehaviours:M([$E.config({channel:VA,updateState:function(t,e){return bt.some(e)},initialData:e}),Gx({})],t.extraBehaviours,!0),onEscape:function(t){go(t,ry)},dialogEvents:n,eventOrder:((o={})[Ti()]=[$E.name(),tc.name()],o[Hi()]=["scroll-lock",$E.name(),"messages","dialog-events","alloy.base.behaviour"],o[Vi()]=["alloy.base.behaviour","dialog-events","messages",$E.name(),"scroll-lock"],o)})))}function ZT(t){return L(t,(function(t){return"menu"===t.type?(n=L((e=t).items,(function(t){var e=zr(!1);return k(k({},t),{storage:e})})),k(k({},e),{items:n})):t;var e,n}))}function tD(t){return N(t,(function(t,e){return"menu"!==e.type?t:N(e.items,(function(t,e){return t[e.name]=e.storage,t}),t)}),{})}function eD(t,e){return[Eo(pi(),q_),t(ny,(function(t,n){e.onClose(),n.onClose()})),t(ry,(function(t,e,n,r){e.onCancel(t),go(r,ny)})),Oo(uy,(function(t,n){return e.onUnblock()})),Oo(ay,(function(t,n){return e.onBlock(n.event)}))]}function nD(t,e){function n(t,e){return Gb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:L(e,(function(t){return t.memento.asSpec()}))})}var r=j(e.map((function(t){return t.footerButtons})).getOr([]),(function(t){return"start"===t.align}));return[n("start",r.pass),n("end",r.fail)]}function rD(t,e){return{dom:$S('<div class="tox-dialog__footer"></div>'),components:[],behaviours:Yu([$E.config({channel:$A,initialData:t,updateState:function(t,n){var r=L(n.buttons,(function(t){var n=Am(Dw(t,t.type,e));return{name:t.name,align:t.align,memento:n}}));return bt.some({lookupByName:function(t,e){return n=t,o=e,H(r,(function(t){return t.name===o})).bind((function(t){return t.memento.getOpt(n)}));var n,o},footerButtons:r})},renderComponents:nD})])}}function oD(t,e){return mD.parts.footer(rD(t,e))}function iD(t,e){if(t.getRoot().getSystem().isConnected()){var n=td.getCurrent(t.getFormWrapper()).getOr(t.getFormWrapper());return Rx.getField(n,e).fold((function(){var r=t.getFooter();return $E.getState(r).get().bind((function(t){return t.lookupByName(n,e)}))}),(function(t){return bt.some(t)}))}return bt.none()}function aD(t,e,n){function r(e){var n=t.getRoot();n.getSystem().isConnected()&&e(n)}var o={getData:function(){var e=t.getRoot(),r=e.getSystem().isConnected()?t.getFormWrapper():e,o=wf.getValue(r),i=nt(n,(function(t){return t.get()}));return k(k({},o),i)},setData:function(e){r((function(r){var i,a,u=o.getData(),c=k(k({},u),e),s=(i=c,a=t.getRoot(),$E.getState(a).get().map((function(t){return ur(ar("data",t.dataValidator,i))})).getOr(i)),l=t.getFormWrapper();wf.setValue(l,s),et(n,(function(t,e){Mt(c,e)&&t.set(c[e])}))}))},disable:function(e){iD(t,e).each(ad.disable)},enable:function(e){iD(t,e).each(ad.enable)},focus:function(e){iD(t,e).each(Dp.focus)},block:function(t){if(!f(t))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");r((function(e){vo(e,ay,{message:t})}))},unblock:function(){r((function(t){go(t,uy)}))},showTab:function(e){r((function(n){var r=t.getBody();$E.getState(r).get().exists((function(t){return t.isTabPanel()}))&&td.getCurrent(r).each((function(t){FA.showTab(t,e)}))}))},redial:function(t){r((function(n){var r=e(t);n.getSystem().broadcastOn([VA],r),n.getSystem().broadcastOn([UA],r.internalDialog),n.getSystem().broadcastOn([WA],r.internalDialog),n.getSystem().broadcastOn([$A],r.internalDialog),o.setData(r.initialData)}))},close:function(){r((function(t){go(t,ny)}))}};return o}function uD(t){return d(t)&&-1!==QA.indexOf(t.mceAction)}function cD(t){function e(t,e,n,r){return AA.open((function(t,o,i){function l(){return j.on((function(t){Jp.reposition(t),pk.refresh(t)}))}var f,d,m,p,h,g,v,b,y,_,w,x,O,S,C,E,T,D,A,P,R,I,z,L=ur(ar("data",i,o)),j=cc(),B=a.shared.header.isPositionedAtTop(),F=(d={dataValidator:i,initialData:L,internalDialog:t},m={redial:AA.redial,closeWindow:function(){j.on(Jp.hide),u.off("ResizeEditor",l),j.clear(),n(F.instanceApi)}},p=a,h=r,S=Ro("dialog-label"),C=Ro("dialog-content"),E=Am((b={title:d.internalDialog.title,draggable:!0},y=S,_=p.shared.providers,Gb.sketch({dom:$S('<div class="tox-dialog__header"></div>'),components:[KT(b,bt.some(y),_),qT(),GT(_)],containerBehaviours:Yu([CT.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return Aa(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))),T=Am((w={body:d.internalDialog.body},x=p,O=h,BT(w,bt.some(C),x,O))),A=tD(D=ZT(d.internalDialog.buttons)),P=Am(YA({buttons:D},p)),R=XA((function(){return z}),{onBlock:function(t){Lk.block(I,(function(e,n){return YT(t.message,n,p.shared.providers)}))},onUnblock:function(){Lk.unblock(I)},onClose:function(){return m.closeWindow()}},p.shared.getSink),I=Oa({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:((g={role:"dialog"})["aria-labelledby"]=S,g["aria-describedby"]=C,g)},eventOrder:((v={})[Ti()]=[$E.name(),tc.name()],v[Di()]=["execute-on-form"],v[Hi()]=["reflecting","execute-on-form"],v),behaviours:Yu([Cp.config({mode:"cyclic",onEscape:function(t){return go(t,ny),bt.some(!0)},useTabstopAt:function(t){return!X_(t)&&("button"!==It(t)||"disabled"!==ae(t,"disabled"))}}),$E.config({channel:VA,updateState:function(t,e){return bt.some(e)},initialData:d}),Dp.config({}),im("execute-on-form",R.concat([To(pi(),(function(t,e){Cp.focusIn(t)}))])),Lk.config({getRoot:function(){return bt.some(I)}}),Ep.config({}),Gx({})]),components:[E.asSpec(),T.asSpec(),P.asSpec()]}),z=aD({getRoot:c(I),getFooter:function(){return P.get(I)},getBody:function(){return T.get(I)},getFormWrapper:function(){var t=T.get(I);return td.getCurrent(t).getOr(t)}},m.redial,A),{dialog:I,instanceApi:z}),N=Oa(Jp.sketch(k(k({lazySink:a.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},B?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:Yu(M([im("window-manager-inline-events",[Oo(Ui(),(function(t,e){go(F.dialog,ry)}))])],(f=u,s&&B?[]:[pk.config({contextual:{lazyContext:function(){return bt.some(Rn(Rt.fromDom(f.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]),!0)),isExtraPart:function(t,e){return Ab(n=e,".tox-alert-dialog")||Ab(n,".tox-confirm-dialog");var n}})));return j.set(N),Jp.showWithin(N,Sa(F.dialog),{anchor:e},bt.some(yn())),s&&B||(pk.refresh(N),u.on("ResizeEditor",l)),F.instanceApi.setData(L),Cp.focusIn(F.dialog),F.instanceApi}),t)}var n,r,o,i,a=t.backstage,u=t.editor,s=ev(u),l=(r=(n=t).backstage.shared,{open:function(t,e){function o(){mD.hide(c),e()}var i=Am(Dw({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:bt.none()},"cancel",n.backstage)),a=HT(),u=NT(o,r.providers),c=Oa($T({lazySink:function(){return r.getSink()},header:FT(a,u),body:VT(t,r.providers),footer:bt.some(UT(WT([],[i.asSpec()]))),onEscape:o,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Oo(ry,o)],eventOrder:{}}));mD.show(c);var s=i.get(c);Dp.focus(s)}}),m=(i=(o=t).backstage.shared,{open:function(t,e){function n(t){mD.hide(s),e(t)}var r=Am(Dw({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:bt.none()},"submit",o.backstage)),a=Dw({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:bt.none()},"cancel",o.backstage),u=HT(),c=NT((function(){return n(!1)}),i.providers),s=Oa($T({lazySink:function(){return i.getSink()},header:FT(u,c),body:VT(t,i.providers),footer:bt.some(UT(WT([],[a,r.asSpec()]))),onEscape:function(){return n(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Oo(ry,(function(){return n(!1)})),Oo(iy,(function(){return n(!0)}))],eventOrder:{}}));mD.show(s);var l=r.get(s);Dp.focus(l)}});return{open:function(t,n,r){return void 0!==n&&"toolbar"===n.inline?e(t,a.shared.anchors.inlineDialog(),r,n.ariaAttrs):void 0!==n&&"cursor"===n.inline?e(t,a.shared.anchors.cursor(),r,n.ariaAttrs):function(t,e){return AA.open((function(t,n,r){var o,i,u,s,l,f,d,m,p,h,g,v,b,y,_=n,w=(i={redial:AA.redial,closeWindow:function(){mD.hide(w.dialog),e(w.instanceApi)}},u=a,f=XT((o={dataValidator:r,initialData:_,internalDialog:t}).internalDialog.title,u),s=u,l=BT({body:o.internalDialog.body},bt.none(),s,!1),d=mD.parts.body(l),p=tD(m=ZT(o.internalDialog.buttons)),h=oD({buttons:m},u),g=XA((function(){return y}),JT((function(){return b}),u.shared.providers,i),u.shared.getSink),v=function(){switch(o.internalDialog.size){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}}(),b=QT({header:f,body:d,footer:bt.some(h),extraClasses:v,extraBehaviours:[],extraStyles:{}},o,g,u),y=aD({getRoot:c(b),getBody:function(){return mD.getBody(b)},getFooter:function(){return mD.getFooter(b)},getFormWrapper:function(){var t=mD.getBody(b);return td.getCurrent(t).getOr(t)}},i.redial,p),{dialog:b,instanceApi:y});return mD.show(w.dialog),w.instanceApi.setData(_),w.instanceApi}),t)}(t,r)},openUrl:function(t,e){return n=e,AA.openUrl((function(t){var e=function(t,e,n,r){var o,i,a,u=XT(t.title,r),c=(i={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[G_({dom:{tag:"iframe",attributes:{src:t.url}},behaviours:Yu([Jb.config({}),Dp.config({})])})]}],behaviours:Yu([Cp.config({mode:"acyclic",useTabstopAt:w(X_)})])},mD.parts.body(i)),s=t.buttons.bind((function(t){return 0===t.length?bt.none():bt.some(oD({buttons:t},r))})),l=qA((function(){return _}),JT((function(){return y}),r.shared.providers,e)),m=k(k({},t.height.fold((function(){return{}}),(function(t){return{height:t+"px","max-height":t+"px"}}))),t.width.fold((function(){return{}}),(function(t){return{width:t+"px","max-width":t+"px"}}))),p=t.width.isNone()&&t.height.isNone()?["tox-dialog--width-lg"]:[],g=new JA(t.url,{base_uri:new JA(window.location.href)}),v=g.protocol+"://"+g.host+(g.port?":"+g.port:""),b=uc(),y=QT({header:u,body:c,footer:s,extraClasses:p,extraBehaviours:[im("messages",[Zi((function(){var e=sc(Rt.fromDom(window),"message",(function(e){var r,o;g.isSameOrigin(new JA(e.raw.origin))&&(uD(r=e.raw.data)?function(t,e,n){switch(n.mceAction){case"insertContent":t.insertContent(n.content);break;case"setContent":t.setContent(n.content);break;case"execCommand":var r=!!h(n.ui)&&n.ui;t.execCommand(n.cmd,r,n.value);break;case"close":e.close();break;case"block":e.block(n.message);break;case"unblock":e.unblock()}}(n,_,r):!uD(o=r)&&d(o)&&Mt(o,"mceAction")&&t.onMessage(_,r))}));b.set(e)})),ta(b.clear)]),tc.config({channels:((o={})[GA]={onReceive:function(t,e){Da(t.element,"iframe").each((function(t){t.dom.contentWindow.postMessage(e,v)}))}},o)})],extraStyles:m},t,l,r),_={block:function(t){if(!f(t))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");x((function(e){vo(e,ay,{message:t})}))},unblock:function(){x((function(t){go(t,uy)}))},close:function(){x((function(t){go(t,ny)}))},sendMessage:function(t){x((function(e){e.getSystem().broadcastOn([GA],t)}))}};function x(t){a.getSystem().isConnected()&&t(a)}return{dialog:a=y,instanceApi:_}}(t,{closeWindow:function(){mD.hide(e.dialog),n(e.instanceApi)}},u,a);return mD.show(e.dialog),e.instanceApi}),t);var n},alert:function(t,e){l.open(t,(function(){e()}))},close:function(t){t.close()},confirm:function(t,e){m.open(t,(function(t){e(t)}))}}}(rT=nT=nT||{})[rT.None=0]="None",rT[rT.Both=1]="Both",rT[rT.Vertical=2]="Vertical";var sD,lD=c([fr("lazySink"),yr("dragBlockClass"),Pr("getBounds",In),kr("useTabstopAt",S),kr("eventOrder",{}),$s("modalBehaviours",[Cp]),Ga("onExecute"),qa("onEscape")]),fD={sketch:s},dD=c([Wf({name:"draghandle",overrides:function(t,e){return{behaviours:Yu([CT.config({mode:"mouse",getTarget:function(t){return Ta(t,'[role="dialog"]').getOr(t)},blockerClass:t.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(e,null,2)).message),getBounds:t.getDragBounds})])}}}),Vf({schema:[fr("dom")],name:"title"}),Vf({factory:fD,schema:[fr("dom")],name:"close"}),Vf({factory:fD,schema:[fr("dom")],name:"body"}),Wf({factory:fD,schema:[fr("dom")],name:"footer"}),Uf({factory:{sketch:function(t,e){return k(k({},t),{dom:e.dom,components:e.components})}},schema:[kr("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),kr("components",[])],name:"blocker"})]),mD=gl({name:"ModalDialog",configFields:lD(),partFields:dD(),factory:function(t,e,n,r){var o,i=cc(),a=Ro("modal-events"),u=k(k({},t.eventOrder),((o={})[Hi()]=[a].concat(t.eventOrder["alloy.system.attached"]||[]),o));return{uid:t.uid,dom:t.dom,components:e,apis:{show:function(e){i.set(e);var n=t.lazySink(e).getOrDie(),o=r.blocker(),a=n.getSystem().build(k(k({},o),{components:o.components.concat([Sa(e)]),behaviours:Yu([Dp.config({}),im("dialog-blocker-events",[To(pi(),(function(){Cp.focusIn(e)}))])])}));Ms(n,a),Cp.focusIn(e)},hide:function(t){i.clear(),qt(t.element).each((function(e){t.getSystem().getByDom(e).each((function(t){Ds(t)}))}))},getBody:function(e){return al(e,t,"body")},getFooter:function(e){return al(e,t,"footer")},setIdle:function(t){Lk.unblock(t)},setBusy:function(t,e){Lk.block(t,e)}},eventOrder:u,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Ks(t.modalBehaviours,[Ep.config({}),Cp.config({mode:"cyclic",onEnter:t.onExecute,onEscape:t.onEscape,useTabstopAt:t.useTabstopAt}),Lk.config({getRoot:i.get}),im(a,[Zi((function(e){var n,r,o,i=e.element,a=al(e,t,"title").element,u=ue(i,"id").fold((function(){var t=Ro("dialog-label");return oe(a,"id",t),t}),s);oe(i,"aria-labelledby",u),n=e.element,r=al(e,t,"body").element,o=bt.from(ae(n,"id")).fold((function(){var t=Ro("dialog-describe");return oe(r,"id",t),t}),s),oe(n,"aria-describedby",o)}))])])}},apis:{show:function(t,e){t.show(e)},hide:function(t,e){t.hide(e)},getBody:function(t,e){return t.getBody(e)},getFooter:function(t,e){return t.getFooter(e)},setBusy:function(t,e,n){t.setBusy(e,n)},setIdle:function(t,e){t.setIdle(e)}}}),pD=Xr([mr("type"),mr("name")].concat(Dg)),hD=to,gD=[io("name","name",Wn((function(){return Ro("button-name")})),Zr),xr("icon"),Dr("align","end",["start","end"]),Ar("primary",!1),Ar("disabled",!1)],vD=M(M([],gD,!0),[mr("text")],!1),bD=M([pr("type",["submit","cancel","custom"])],vD,!0),yD=sr("type",{submit:bD,cancel:bD,custom:bD,menu:M([pr("type",["menu"]),xr("text"),xr("tooltip"),xr("icon"),br("items",pD)],gD,!0)}),_D=[mr("type"),mr("text"),pr("level",["info","warn","error","success"]),mr("icon"),kr("url","")],wD=Xr(_D),xD=[mr("type"),mr("text"),Ar("disabled",!1),Ar("primary",!1),io("name","name",Wn((function(){return Ro("button-name")})),Zr),xr("icon"),Ar("borderless",!1)],OD=Xr(xD),SD=[mr("type"),mr("name"),mr("label"),Ar("disabled",!1)],CD=Xr(SD),kD=to,ED=[mr("type"),mr("name")],MD=ED.concat([xr("label")]),TD=MD.concat([kr("columns","auto")]),DD=Xr(TD),AD=Yr([mr("value"),mr("text"),mr("icon")]),PD=Xr(MD),RD=Zr,ID=Xr(MD),zD=Zr,LD=ED.concat([Tr("tag","textarea"),mr("scriptId"),mr("scriptUrl"),Er("settings",void 0,ro)]),jD=ED.concat([Tr("tag","textarea"),hr("init")]),BD=or((function(t){return ar("customeditor.old",Zn(jD),t).orThunk((function(){return ar("customeditor.new",Zn(LD),t)}))})),FD=Zr,ND=Xr(MD),HD=tr(qr),VD=[mr("type"),mr("html"),Dr("presets","presentation",["presentation","document"])],UD=Xr(VD),WD=MD.concat([Ar("sandboxed",!0)]),$D=Xr(WD),GD=Zr,KD=MD.concat([dr("currentState",Xr([fr("blob"),mr("url")]))]),qD=Xr(KD),XD=MD.concat([xr("inputMode"),xr("placeholder"),Ar("maximized",!1),Ar("disabled",!1)]),YD=Xr(XD),JD=Zr,QD=[mr("text"),mr("value")],ZD=[mr("text"),br("items",(sD=Lt((function(){return tA})),{extract:function(t,e){return sD().extract(t,e)},toString:function(){return sD().toString()}}))],tA=er([Xr(QD),Xr(ZD)]),eA=MD.concat([br("items",tA),Ar("disabled",!1)]),nA=Xr(eA),rA=Zr,oA=MD.concat([vr("items",[mr("text"),mr("value")]),Mr("size",1),Ar("disabled",!1)]),iA=Xr(oA),aA=Zr,uA=MD.concat([Ar("constrain",!0),Ar("disabled",!1)]),cA=Xr(uA),sA=Xr([mr("width"),mr("height")]),lA=[mr("type"),br("header",Zr),br("cells",tr(Zr))],fA=Xr(lA),dA=MD.concat([xr("placeholder"),Ar("maximized",!1),Ar("disabled",!1)]),mA=Xr(dA),pA=Zr,hA=MD.concat([Dr("filetype","file",["image","media","file"]),kr("disabled",!1)]),gA=Xr(hA),vA=Xr([mr("value"),kr("meta",{})]),bA=Qn((function(){return rr("type",{alertbanner:wD,bar:Xr((n=DT("bar"),[mr("type"),n])),button:OD,checkbox:CD,colorinput:PD,colorpicker:ID,dropzone:ND,grid:Xr((t=DT("grid"),[mr("type"),dr("columns",Qr),t])),iframe:$D,input:YD,listbox:nA,selectbox:iA,sizeinput:cA,textarea:mA,urlinput:gA,customeditor:BD,htmlpanel:UD,imagetools:qD,collection:DD,label:Xr((e=DT("label"),[mr("type"),mr("label"),e])),table:fA,panel:_A});var t,e,n})),yA=[mr("type"),kr("classes",[]),br("items",bA)],_A=Xr(yA),wA=[io("name","name",Wn((function(){return Ro("tab-name")})),Zr),mr("title"),br("items",bA)],xA=[mr("type"),vr("tabs",wA)],OA=Xr(xA),SA=vD,CA=yD,kA=Xr([mr("title"),dr("body",rr("type",{panel:_A,tabpanel:OA})),Tr("size","normal"),br("buttons",CA),kr("initialData",{}),Pr("onAction",a),Pr("onChange",a),Pr("onSubmit",a),Pr("onClose",a),Pr("onCancel",a),kr("onTabChange",a)]),EA=Xr(M([pr("type",["cancel","custom"])],SA,!0)),MA=Xr([mr("title"),mr("url"),wr("height"),wr("width"),Sr("buttons",EA),Pr("onAction",a),Pr("onCancel",a),Pr("onClose",a),Pr("onMessage",a)]),TA=function(t){return d(t)?[t].concat(W(it(t),TA)):m(t)?W(t,TA):[]},DA={checkbox:kD,colorinput:RD,colorpicker:zD,dropzone:HD,input:JD,iframe:GD,sizeinput:sA,selectbox:aA,listbox:rA,size:sA,textarea:pA,urlinput:vA,customeditor:FD,collection:AD,togglemenuitem:hD},AA={open:function(t,e){var n=PT(e);return t(n.internalDialog,n.initialData,n.dataValidator)},openUrl:function(t,e){return t(ur(ar("dialog",MA,e)))},redial:PT},PA=hl({name:"TabButton",configFields:[kr("uid",void 0),fr("value"),io("dom","dom",Gn((function(){return{attributes:{role:"tab",id:Ro("aria"),"aria-selected":"false"}}})),Jr()),yr("action"),kr("domModification",{}),$s("tabButtonBehaviours",[Dp,Cp,wf]),fr("view")],factory:function(t,e){return{uid:t.uid,dom:t.dom,components:t.components,events:pm(t.action),behaviours:Ks(t.tabButtonBehaviours,[Dp.config({}),Cp.config({mode:"execution",useSpace:!0,useEnter:!0}),wf.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}}}),RA=c([fr("tabs"),fr("dom"),kr("clickToDismiss",!1),$s("tabbarBehaviours",[cd,Cp]),Ua(["tabClass","selectedClass"])]),IA=c([$f({factory:PA,name:"tabs",unit:"tab",overrides:function(t){return{action:function(e){var n=e.getSystem().getByUid(t.uid).getOrDie(),r=cd.isHighlighted(n,e);(r&&t.clickToDismiss?function(t,e){cd.dehighlight(t,e),vo(t,qi(),{tabbar:t,button:e})}:r?a:function(t,e){cd.highlight(t,e),vo(t,Ki(),{tabbar:t,button:e})})(n,e)},domModification:{classes:[t.markers.tabClass]}}}})]),zA=gl({name:"Tabbar",configFields:RA(),partFields:IA(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Ks(t.tabbarBehaviours,[cd.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:function(t,e){oe(e.element,"aria-selected","true")},onDehighlight:function(t,e){oe(e.element,"aria-selected","false")}}),Cp.config({mode:"flow",getInitial:function(t){return cd.getHighlighted(t).map((function(t){return t.element}))},selector:"."+t.markers.tabClass,executeOnMove:!0})])}}}),LA=hl({name:"Tabview",configFields:[$s("tabviewBehaviours",[Ep])],factory:function(t,e){return{uid:t.uid,dom:t.dom,behaviours:Ks(t.tabviewBehaviours,[Ep.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),jA=c([kr("selectFirst",!0),$a("onChangeTab"),$a("onDismissTab"),kr("tabs",[]),$s("tabSectionBehaviours",[])]),BA=c([Vf({factory:zA,schema:[fr("dom"),gr("markers",[fr("tabClass"),fr("selectedClass")])],name:"tabbar",defaults:function(t){return{tabs:t.tabs}}}),Vf({factory:LA,name:"tabview"})]),FA=gl({name:"TabSection",configFields:jA(),partFields:BA(),factory:function(t,e,n,r){function o(e,n){il(e,t,"tabbar").each((function(t){n(t).each(bo)}))}return{uid:t.uid,dom:t.dom,components:e,behaviours:Gs(t.tabSectionBehaviours),events:Qi(U([t.selectFirst?[Zi((function(t,e){o(t,cd.getFirst)}))]:[],[Oo(Ki(),(function(e,n){var r=n.event.button,o=wf.getValue(r);il(r,t,"tabview").each((function(e){H(t.tabs,(function(t){return t.value===o})).each((function(n){var o=n.view();ue(r.element,"id").each((function(t){oe(e.element,"aria-labelledby",t)})),Ep.set(e,o),t.onChangeTab(e,r,o)}))}))})),Oo(qi(),(function(e,n){var r=n.event.button;t.onDismissTab(e,r)}))]])),apis:{getViewItems:function(e){return il(e,t,"tabview").map((function(t){return Ep.contents(t)})).getOr([])},showTab:function(t,e){o(t,(function(t){return H(cd.getCandidates(t),(function(t){return wf.getValue(t)===e})).filter((function(e){return!cd.isHighlighted(t,e)}))}))}}}},apis:{getViewItems:function(t,e){return t.getViewItems(e)},showTab:function(t,e,n){t.showTab(e,n)}}}),NA="send-data-to-section",HA="send-data-to-view",VA=Ro("update-dialog"),UA=Ro("update-title"),WA=Ro("update-body"),$A=Ro("update-footer"),GA=Ro("body-send-message"),KA=Wv.deviceType.isTouch(),qA=function(t,e){function n(e,n){return Oo(e,(function(e,r){var o,i;o=e,i=function(o,i){n(t(),o,r.event,e)},$E.getState(o).get().each((function(t){i(t)}))}))}return M(M([],eD(n,e),!0),[n(oy,(function(t,e,n){e.onAction(t,{name:n.name})}))],!1)},XA=function(t,e,n){function r(e,n){return Oo(e,(function(e,r){var o,i;o=e,i=function(o,i){n(t(),o,r.event,e)},$E.getState(o).get().each((function(t){i(t.internalDialog)}))}))}return M(M([],eD(r,e),!0),[r(iy,(function(t,e){return e.onSubmit(t)})),r(ey,(function(t,e,n){e.onChange(t,{name:n.name})})),r(oy,(function(t,e,r,o){function i(){return Cp.focusIn(o)}function a(t){return ce(t,"disabled")||ue(t,"aria-disabled").exists((function(t){return"true"===t}))}var u=hn(o.element),c=_u(u);e.onAction(t,{name:r.name,value:r.value}),_u(u).fold(i,(function(t){a(t)||c.exists((function(e){return Ut(t,e)&&a(e)}))?i():n().toOptional().filter((function(e){return!Ut(e.element,t)})).each(i)}))})),r(cy,(function(t,e,n){e.onTabChange(t,{newTabName:n.name,oldTabName:n.oldName})})),ta((function(e){var n=t();wf.setValue(e,n.getData())}))],!1)},YA=rD,JA=tinymce.util.Tools.resolve("tinymce.util.URI"),QA=["insertContent","setContent","execCommand","close","block","unblock"];C.add("silver",(function(t){var e=TT(t),n=e.uiMothership,r=e.backstage,o=e.renderUI,i=e.getUi;return Vb(t,r.shared),{renderUI:o,getWindowManagerImpl:c(cD({editor:t,backstage:r})),getNotificationManagerImpl:function(){return e=t,o=n,i=r.shared,{open:function(t,n){function r(){n(),Jp.hide(c)}var a=!t.closeButton&&t.timeout&&(0<t.timeout||t.timeout<0),u=Oa(uh.sketch({text:t.text,level:xt(["success","error","warning","warn","info"],t.type)?t.type:void 0,progress:!0===t.progressBar,icon:bt.from(t.icon),closeButton:!a,onAction:r,iconProvider:i.providers.icons,translationProvider:i.providers.translate})),c=Oa(Jp.sketch(k({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:i.getSink,fireDismissalEventInstead:{}},i.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}})));function s(){var t=Rn(Rt.fromDom(e.getContentAreaContainer())),n=In(),r=Fu(n.x,t.x,t.right),o=Fu(n.y,t.y,t.bottom),i=Math.max(t.right,n.right),a=Math.max(t.bottom,n.bottom);return bt.some(Pn(r,o,i-r,a-o))}return o.add(c),0<t.timeout&&eh.setTimeout((function(){r()}),t.timeout),{close:r,moveTo:function(t,e){Jp.showAt(c,Sa(u),{anchor:{type:"makeshift",x:t,y:e}})},moveRel:function(t,e){var n,r,o,a=Sa(u),l={maxHeightFunction:Mc()};"banner"!==e&&v(t)?(n=function(){switch(e){case"bc-bc":return th;case"tc-tc":return Zp;case"tc-bc":return $u;default:return Gu}}(),r={type:"node",root:yn(),node:bt.some(Rt.fromDom(t)),overrides:l,layouts:{onRtl:function(){return[n]},onLtr:function(){return[n]}}},Jp.showWithinBounds(c,a,{anchor:r},s)):(o=k(k({},i.anchors.banner()),{overrides:l}),Jp.showWithinBounds(c,a,{anchor:o},s))},text:function(t){uh.updateText(u,t)},settings:t,getEl:function(){return u.element.dom},progressBar:{value:function(t){uh.updateProgress(u,t)}}}},close:function(t){t.close()},reposition:function(t){0<t.length&&Ot(t,(function(e,n){0===n?e.moveRel(null,"banner"):e.moveRel(t[n-1].getEl(),"bc-tc")}))},getArgs:function(t){return t.settings}};var e,o,i},ui:i()}}))}()}).call(this,n("c8ba"))},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},ff84:function(t,e,n){"use strict";var r={name:"BaseIcon",props:{iconClass:String}},o=(n("a4f8"),n("2877")),i=Object(o.a)(r,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("i",{staticClass:"base-icon",class:"ri-"+t.iconClass,on:{click:function(e){return t.$emit("click",e)}}})}),[],!1,null,"a8318de0",null);e.a=i.exports},ff846:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("349c"),o=n("da3d"),i=n("241e"),a=n("9ffa"),u=n("8e51"),c=n("7cb9"),s=n("c17b"),l=n("fbb2");e.default={CODE39:r.CODE39,CODE128:o.CODE128,CODE128A:o.CODE128A,CODE128B:o.CODE128B,CODE128C:o.CODE128C,EAN13:i.EAN13,EAN8:i.EAN8,EAN5:i.EAN5,EAN2:i.EAN2,UPC:i.UPC,UPCE:i.UPCE,ITF14:a.ITF14,ITF:a.ITF,MSI:u.MSI,MSI10:u.MSI10,MSI11:u.MSI11,MSI1010:u.MSI1010,MSI1110:u.MSI1110,pharmacode:c.pharmacode,codabar:s.codabar,GenericBarcode:l.GenericBarcode}}});
|
|
18
|
+
e.read=function(t,e,n,r,o){var i,a,u=8*o-r-1,c=(1<<u)-1,s=c>>1,l=-7,f=n?o-1:0,d=n?-1:1,m=t[e+f];for(f+=d,i=m&(1<<-l)-1,m>>=-l,l+=u;l>0;i=256*i+t[e+f],f+=d,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+t[e+f],f+=d,l-=8);if(0===i)i=1-s;else{if(i===c)return a?NaN:1/0*(m?-1:1);a+=Math.pow(2,r),i-=s}return(m?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,u,c,s=8*i-o-1,l=(1<<s)-1,f=l>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:i-1,p=r?1:-1,h=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),(e+=a+f>=1?d/c:d*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(u=0,a=l):a+f>=1?(u=(e*c-1)*Math.pow(2,o),a+=f):(u=e*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;t[n+m]=255&u,m+=p,u/=256,o-=8);for(a=a<<o|u,s+=o;s>0;t[n+m]=255&a,m+=p,a/=256,s-=8);t[n+m-p]|=128*h}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,s=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&m())}function m(){if(!l){var t=u(d);l=!0;for(var e=s.length;e;){for(c=s,s=[];++f<e;)c&&c[f].run();f=-1,e=s.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function h(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new p(t,e)),1!==s.length||l||u(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";n.r(e);var r=n(6),o=n.n(r),i=n(3),a=n.n(i);function u(t){return""===t?t:"true"===t||"1"==t}var c=function(t,e){return new Promise((function(e,n){var r=new XMLHttpRequest;r.responseType="blob",r.onload=function(){var t=new FileReader;t.onloadend=function(){e(t.result)},t.readAsArrayBuffer(r.response)},r.open("GET",t),r.send()}))},s=n(9),l=function(t,e,n,r,o,i,a,u){var c,s="function"==typeof t?t.options:t;if(e&&(s.render=e,s.staticRenderFns=[],s._compiled=!0),c)if(s.functional){s._injectStyles=c;var l=s.render;s.render=function(t,e){return c.call(e),l(t,e)}}else{var f=s.beforeCreate;s.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:s}}({props:{text:{type:String,required:!0},qid:{type:String},correctLevel:{type:Number,default:1},size:{type:Number,default:200},margin:{type:Number,default:20},colorDark:{type:String,default:"#000000"},colorLight:{type:String,default:"#FFFFFF"},bgSrc:{type:String,default:void 0},background:{type:String,default:"rgba(0,0,0,0)"},backgroundDimming:{type:String,default:"rgba(0,0,0,0)"},logoSrc:{type:String,default:void 0},logoBackgroundColor:{type:String,default:"rgba(255,255,255,1)"},gifBgSrc:{type:String,default:void 0},logoScale:{type:Number,default:.2},logoMargin:{type:Number,default:0},logoCornerRadius:{type:Number,default:8},whiteMargin:{type:[Boolean,String],default:!0},dotScale:{type:Number,default:1},autoColor:{type:[Boolean,String],default:!0},binarize:{type:[Boolean,String],default:!1},binarizeThreshold:{type:Number,default:128},callback:{type:Function,default:function(){}},bindElement:{type:Boolean,default:!0},backgroundColor:{type:String,default:"#FFFFFF"},components:{default:function(){return{data:{scale:1},timing:{scale:1,protectors:!1},alignment:{scale:1,protectors:!1},cornerAlignment:{scale:1,protectors:!0}}}}},name:"vue-qr",data:function(){return{imgUrl:""}},watch:{$props:{deep:!0,handler:function(){this.main()}}},mounted:function(){this.main()},methods:{main:function(){var t=this;return o()(a.a.mark((function e(){var n,r,o,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.gifBgSrc){e.next=7;break}return e.next=3,c(t.gifBgSrc);case 3:return n=e.sent,r=t.logoSrc,t.render(void 0,r,n),e.abrupt("return");case 7:o=t.bgSrc,i=t.logoSrc,t.render(o,i);case 10:case"end":return e.stop()}}),e)})))()},render:function(t,e,n){var r=this;return o()(a.a.mark((function o(){var i;return a.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:i=r,new s.a({gifBackground:n,text:i.text,size:i.size,margin:i.margin,colorDark:i.colorDark,colorLight:i.colorLight,backgroundColor:i.backgroundColor,backgroundImage:t,backgroundDimming:i.backgroundDimming,logoImage:e,logoScale:i.logoScale,logoBackgroundColor:i.logoBackgroundColor,correctLevel:i.correctLevel,logoMargin:i.logoMargin,logoCornerRadius:i.logoCornerRadius,whiteMargin:u(i.whiteMargin),dotScale:i.dotScale,autoColor:u(i.autoColor),binarize:u(i.binarize),binarizeThreshold:i.binarizeThreshold,components:i.components}).draw().then((function(t){r.imgUrl=t,i.callback&&i.callback(t,i.qid)}));case 2:case"end":return o.stop()}}),o)})))()}}},(function(){var t=this.$createElement,e=this._self._c||t;return this.bindElement?e("img",{staticStyle:{display:"inline-block"},attrs:{src:this.imgUrl}}):this._e()})).exports;l.install=function(t){return t.component(l.name,l)};var f=l,d=[f];"undefined"!=typeof window&&window.Vue&&function(t){d.map((function(e){t.component(e.name,e)}))}(window.Vue),e.default=f}])},"65f0":function(t,e,n){var r=n("0b42");t.exports=function(t,e){return new(r(t))(0===e?0:e)}},"68ee":function(t,e,n){var r=n("e330"),o=n("d039"),i=n("1626"),a=n("f5df"),u=n("d066"),c=n("8925"),s=function(){},l=[],f=u("Reflect","construct"),d=/^\s*(?:class|function)\b/,m=r(d.exec),p=!d.exec(s),h=function(t){if(!i(t))return!1;try{return f(s,l,t),!0}catch(t){return!1}},g=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!m(d,c(t))}catch(t){return!0}};g.sham=!0,t.exports=!f||o((function(){var t;return h(h.call)||!h(Object)||!h((function(){t=!0}))||t}))?g:h},6964:function(t,e,n){var r=n("cb2d");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},"69f3":function(t,e,n){var r,o,i,a=n("7f9a"),u=n("da84"),c=n("e330"),s=n("861d"),l=n("9112"),f=n("1a2d"),d=n("c6cd"),m=n("f772"),p=n("d012"),h=u.TypeError,g=u.WeakMap;if(a||d.state){var v=d.state||(d.state=new g),b=c(v.get),y=c(v.has),_=c(v.set);r=function(t,e){if(y(v,t))throw new h("Object already initialized");return e.facade=t,_(v,t,e),e},o=function(t){return b(v,t)||{}},i=function(t){return y(v,t)}}else{var w=m("state");p[w]=!0,r=function(t,e){if(f(t,w))throw new h("Object already initialized");return e.facade=t,l(t,w,e),e},o=function(t){return f(t,w)?t[w]:{}},i=function(t){return f(t,w)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!s(e)||(n=o(e)).type!==t)throw h("Incompatible receiver, "+t+" required");return n}}}},"6ba6":function(t,e,n){"use strict";function r(){return{list:[],config:{labelWidth:100,labelPosition:"right",size:"small",customClass:"",ui:"element",layout:"horizontal",labelCol:3,width:"100%",hideLabel:!1,hideErrorMessage:!1,theme:"default",themeTitle:"",themeSubTitle:"",themeTitleAlign:"left",submitHiddenArea:!1}}}n.d(e,"a",(function(){return r}))},"6d61":function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("e330"),a=n("94ca"),u=n("cb2d"),c=n("f183"),s=n("2266"),l=n("19aa"),f=n("1626"),d=n("861d"),m=n("d039"),p=n("1c7e"),h=n("d44e"),g=n("7156");t.exports=function(t,e,n){var v=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),y=v?"set":"add",_=o[t],w=_&&_.prototype,x=_,O={},S=function(t){var e=i(w[t]);u(w,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return b&&!d(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(a(t,!f(_)||!(b||w.forEach&&!m((function(){(new _).entries().next()})))))x=n.getConstructor(e,t,v,y),c.enable();else if(a(t,!0)){var C=new x,k=C[y](b?{}:-0,1)!=C,E=m((function(){C.has(1)})),M=p((function(t){new _(t)})),T=!b&&m((function(){for(var t=new _,e=5;e--;)t[y](e,e);return!t.has(-0)}));M||((x=e((function(t,e){l(t,w);var n=g(new _,t,x);return null!=e&&s(e,n[y],{that:n,AS_ENTRIES:v}),n}))).prototype=w,w.constructor=x),(E||T)&&(S("delete"),S("has"),v&&S("get")),(T||k)&&S(y),b&&w.clear&&delete w.clear}return O[t]=x,r({global:!0,constructor:!0,forced:x!=_},O),h(x,t),b||n.setStrong(x,t,v),x}},"6e53":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mod10=function(t){for(var e=0,n=0;n<t.length;n++){var r=parseInt(t[n]);(n+t.length)%2==0?e+=r:e+=2*r%10+Math.floor(2*r/10)}return(10-e%10)%10},e.mod11=function(t){for(var e=0,n=[2,3,4,5,6,7],r=0;r<t.length;r++){var o=parseInt(t[t.length-1-r]);e+=n[r%n.length]*o}return(11-e%11)%11}},"6f24":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(n("4b23")),o=i(n("bb5d"));function i(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=function(t){function e(t,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(t))var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,o.default)(t),n));else r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return a(r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(r.default);e.default=u},"6f53":function(t,e,n){var r=n("83ab"),o=n("e330"),i=n("df75"),a=n("fc6a"),u=o(n("d1e7").f),c=o([].push),s=function(t){return function(e){for(var n,o=a(e),s=i(o),l=s.length,f=0,d=[];l>f;)n=s[f++],r&&!u(o,n)||c(d,t?[n,o[n]]:o[n]);return d}};t.exports={entries:s(!0),values:s(!1)}},"70b0":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("4b23"),a=(r=i)&&r.__esModule?r:{default:r},u=n("f08e");var c=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u.B_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return new RegExp("^"+u.B_CHARS+"+$").test(this.data)}}]),e}(a.default);e.default=c},7149:function(t,e,n){"use strict";var r=n("23e7"),o=n("d066"),i=n("c430"),a=n("d256"),u=n("4738").CONSTRUCTOR,c=n("cdf9"),s=o("Promise"),l=i&&!u;r({target:"Promise",stat:!0,forced:i||u},{resolve:function(t){return c(l&&this===s?a:this,t)}})},7156:function(t,e,n){var r=n("1626"),o=n("861d"),i=n("d2bb");t.exports=function(t,e,n){var a,u;return i&&r(a=e.constructor)&&a!==n&&o(u=a.prototype)&&u!==n.prototype&&i(t,u),t}},7193:function(t,e,n){n("ae68")},"71e3":function(t,e,n){"use strict";n("4345")},"721a":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("fd7c"),a=(r=i)&&r.__esModule?r:{default:r},u=n("ab5b");var c=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.encodings=n,this.options=r}return o(t,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t<this.encodings.length;t++){var e=(0,a.default)(this.options,this.encodings[t].options);this.drawCanvasBarcode(e,this.encodings[t]),this.drawCanvasText(e,this.encodings[t]),this.moveCanvasDrawing(this.encodings[t])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var t=this.canvas.getContext("2d");t.save(),(0,u.calculateEncodingAttributes)(this.encodings,this.options,t);var e=(0,u.getTotalWidthOfEncodings)(this.encodings),n=(0,u.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=e+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,t.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(t.fillStyle=this.options.background,t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(t,e){var n,r=this.canvas.getContext("2d"),o=e.data;n="top"==t.textPosition?t.marginTop+t.fontSize+t.textMargin:t.marginTop,r.fillStyle=t.lineColor;for(var i=0;i<o.length;i++){var a=i*t.width+e.barcodePadding;"1"===o[i]?r.fillRect(a,n,t.width,t.height):o[i]&&r.fillRect(a,n,t.width,t.height*o[i])}}},{key:"drawCanvasText",value:function(t,e){var n,r,o=this.canvas.getContext("2d"),i=t.fontOptions+" "+t.fontSize+"px "+t.font;t.displayValue&&(r="top"==t.textPosition?t.marginTop+t.fontSize-t.textMargin:t.height+t.textMargin+t.marginTop+t.fontSize,o.font=i,"left"==t.textAlign||e.barcodePadding>0?(n=0,o.textAlign="left"):"right"==t.textAlign?(n=e.width-1,o.textAlign="right"):(n=e.width/2,o.textAlign="center"),o.fillText(e.text,n,r))}},{key:"moveCanvasDrawing",value:function(t){this.canvas.getContext("2d").translate(t.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),t}();e.default=c},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"746f":function(t,e,n){var r=n("428f"),o=n("1a2d"),i=n("e538"),a=n("9bf2").f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},"752b":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n("721a")),o=a(n("be5e")),i=a(n("4ced"));function a(t){return t&&t.__esModule?t:{default:t}}e.default={CanvasRenderer:r.default,SVGRenderer:o.default,ObjectRenderer:i.default}},7694:function(t,e,n){"use strict";n.d(e,"i",(function(){return h})),n.d(e,"d",(function(){return g})),n.d(e,"e",(function(){return v})),n.d(e,"j",(function(){return b})),n.d(e,"h",(function(){return y})),n.d(e,"k",(function(){return _})),n.d(e,"g",(function(){return w})),n.d(e,"c",(function(){return x})),n.d(e,"f",(function(){return O})),n.d(e,"l",(function(){return S})),n.d(e,"b",(function(){return C})),n.d(e,"m",(function(){return k})),n.d(e,"a",(function(){return E}));n("d9e2");var r=null,o=null,i=null,a=null,u=null,c=null,s=null,l=null,f=null,d=null,m=null,p=null,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r=t.getDictItemsByParentId,o=t.getDictListByPage,i=t.ossServiceInfo,t.fileDownload,a=t.getUserList,u=t.searchUser,c=t.getOrgTree,t.getFormInfoListByPage,s=t.getColumnList,l=t.getFormDataListByPage,t.getThirdApiListByPage,f=t.triggerThirdApi,d=t.exportFormModel2Excel,m=t.uploadExcel,p=t.excelData2Table},g=function(t){return r?r(t):new Error("adapter must use after initialization!")},v=function(t){return o?o(t):new Error("adapter must use after initialization!")},b=function(t){return i?i(t):new Error("adapter must use after initialization!")},y=function(t){return a?a(t):new Error("adapter must use after initialization!")},_=function(t){return u?u(t):new Error("adapter must use after initialization!")},w=function(t){return c?c(t):new Error("adapter must use after initialization!")},x=function(t){return s?s(t):new Error("adapter must use after initialization!")},O=function(t){return l?l(t):new Error("adapter must use after initialization!")},S=function(t){return f?f(t):new Error("adapter must use after initialization!")},C=function(t){return d?d(t):new Error("adapter must use after initialization!")},k=function(t){return m?m(t):new Error("adapter must use after initialization!")},E=function(t){return p?p(t):new Error("adapter must use after initialization!")}},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"785a":function(t,e,n){var r=n("cc12")("span").classList,o=r&&r.constructor&&r.constructor.prototype;t.exports=o===Object.prototype?void 0:o},7993:function(t,e,n){"use strict";n("3ca7")},"79f1":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}},"7a77":function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},"7aac":function(t,e,n){"use strict";var r=n("c532");t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,o,i,a){var u=[];u.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),!0===a&&u.push("secure"),document.cookie=u.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},"7b0b":function(t,e,n){var r=n("da84"),o=n("1d80"),i=r.Object;t.exports=function(t){return i(o(t))}},"7c4f":function(t,e){!function(){"use strict";var t,e,n,r,o,i=function(t){var e=t;return{get:function(){return e},set:function(t){e=t}}},a=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=(t="array",function(e){return r=typeof(n=e),(null===n?"null":"object"===r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;var n,r}),c=function(t){return!function(t){return null==t}(t)},s=function(t){return function(e){return typeof e===t}}("function"),l=function(){},f=function(t){return function(){return t}},d=function(t){return t},m=f(!1),p=f(!0),h=function(){return g},g={fold:function(t,e){return t()},isSome:m,isNone:p,getOr:n=d,getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:f(null),getOrUndefined:f(void 0),or:n,orThunk:e,map:h,each:l,bind:h,exists:m,forall:p,filter:function(){return h()},toArray:function(){return[]},toString:f("none()")},v=function(t){var e=f(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:p,isNone:m,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return v(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:g},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},b={some:v,none:h,from:function(t){return null==t?g:v(t)}},y=Array.prototype.slice,_=Array.prototype.push,w=function(t,e){for(var n=0,r=t.length;n<r;n++){if(e(t[n],n))return!0}return!1},x=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},O=function(t,e){for(var n=0,r=t.length;n<r;n++){e(t[n],n)}},S=function(t,e){return function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!u(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);_.apply(e,t[n])}return e}(x(t,e))},C=s(Array.from)?Array.from:function(t){return y.call(t)},k=function(){return(k=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},E=function(){var t=function(t){var e=i(b.none()),n=function(){return e.get().each(t)};return{clear:function(){n(),e.set(b.none())},isSet:function(){return e.get().isSome()},get:function(){return e.get()},set:function(t){n(),e.set(b.some(t))}}}(l);return k(k({},t),{on:function(e){return t.get().each(e)}})},M=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},T=tinymce.util.Tools.resolve("tinymce.Env"),D=tinymce.util.Tools.resolve("tinymce.util.Delay"),A=tinymce.util.Tools.resolve("tinymce.util.Promise"),P=tinymce.util.Tools.resolve("tinymce.util.VK"),R=function(t,e){return t.fire("PastePlainTextToggle",{state:e})},I=tinymce.util.Tools.resolve("tinymce.util.Tools"),z=function(t){return t.getParam("paste_data_images",!1)},L=function(t){return t.getParam("paste_merge_formats",!0)},j=function(t){return t.getParam("paste_retain_style_properties")},B=function(t){return t.getParam("validate")},F=function(t){return t.getParam("allow_html_data_urls",!1,"boolean")},N=function(t){return t.getParam("paste_data_images",!1,"boolean")},H=function(t){return I.explode(t.getParam("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"))},V=function(t){return-1!==t.indexOf("\x3c!-- x-tinymce/html --\x3e")},U=f("x-tinymce/html"),W=Object.hasOwnProperty,$=function(t,e){return W.call(t,e)},G=tinymce.util.Tools.resolve("tinymce.html.Entities"),K=function(t,e,n){var r=t.split(/\n\n/),o=function(t,e){var n=[],r="<"+t;if("object"==typeof e){for(var o in e)$(e,o)&&n.push(o+'="'+G.encodeAllRaw(e[o])+'"');n.length&&(r+=" "+n.join(" "))}return r+">"}(e,n),i="</"+e+">",a=I.map(r,(function(t){return t.split(/\n/).join("<br />")}));return 1===a.length?a[0]:I.map(a,(function(t){return o+t+i})).join("")},q=tinymce.util.Tools.resolve("tinymce.html.DomParser"),X=tinymce.util.Tools.resolve("tinymce.html.Serializer"),Y=tinymce.util.Tools.resolve("tinymce.html.Node"),J=tinymce.util.Tools.resolve("tinymce.html.Schema"),Q=function(t,e){return I.each(e,(function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])})),t},Z=function(t){return t=Q(t,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(t,e,n){return e||n?" ":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},tt=function(t){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument/i.test(t)||/class="OutlineElement/.test(t)||/id="?docs\-internal\-guid\-/.test(t)},et=function(t){var e=!1;return t=t.replace(/^[\u00a0 ]+/,""),I.each([/^[IVXLMCD]+\.[ \u00a0]/,/^[ivxlmcd]+\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],(function(n){if(n.test(t))return e=!0,!1})),e},nt=function(t,e,n,r){var o={},i=t.dom.parseStyle(r);I.each(i,(function(i,a){switch(a){case"mso-list":var u=/\w+ \w+([0-9]+)/i.exec(r);u&&(n._listLevel=parseInt(u[1],10)),/Ignore/i.test(i)&&n.firstChild&&(n._listIgnore=!0,n.firstChild._listIgnore=!0);break;case"horiz-align":a="text-align";break;case"vert-align":a="vertical-align";break;case"font-color":case"mso-foreground":a="color";break;case"mso-background":case"mso-highlight":a="background";break;case"font-weight":case"font-style":return void("normal"!==i&&(o[a]=i));case"mso-element":if(/^(comment|comment-list)$/i.test(i))return void n.remove()}0!==a.indexOf("mso-comment")?0!==a.indexOf("mso-")&&("all"===j(t)||e&&e[a])&&(o[a]=i):n.remove()})),/(bold)/i.test(o["font-weight"])&&(delete o["font-weight"],n.wrap(new Y("b",1))),/(italic)/i.test(o["font-style"])&&(delete o["font-style"],n.wrap(new Y("i",1)));var a=t.dom.serializeStyle(o,n.name);return a||null},rt=function(t,e){var n,r=j(t);r&&(n=I.makeMap(r.split(/[, ]/))),e=Q(e,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi," "],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(t,e){return e.length>0?e.replace(/./," ").slice(Math.floor(e.length/2)).split("").join(" "):""}]]);var o=function(t){return t.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")}(t),i=J({valid_elements:o,valid_children:"-li[p]"});I.each(i.elements,(function(t){t.attributes.class||(t.attributes.class={},t.attributesOrder.push("class")),t.attributes.style||(t.attributes.style={},t.attributesOrder.push("style"))}));var a=q({},i);a.addAttributeFilter("style",(function(e){for(var r,o=e.length;o--;)(r=e[o]).attr("style",nt(t,n,r,r.attr("style"))),"span"===r.name&&r.parent&&!r.attributes.length&&r.unwrap()})),a.addAttributeFilter("class",(function(t){for(var e,n,r=t.length;r--;)n=(e=t[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&e.remove(),e.attr("class",null)})),a.addNodeFilter("del",(function(t){for(var e=t.length;e--;)t[e].remove()})),a.addNodeFilter("a",(function(t){for(var e,n,r,o=t.length;o--;)if(n=(e=t[o]).attr("href"),r=e.attr("name"),n&&-1!==n.indexOf("#_msocom_"))e.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1])&&(n="#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){e.unwrap();continue}e.attr({href:n,name:r})}else e.unwrap()}));var u=a.parse(e);return function(t){return t.getParam("paste_convert_word_fake_lists",!0)}(t)&&function(t){for(var e,n,r=1,o=function(t){var e="";if(3===t.type)return t.value;if(t=t.firstChild)do{e+=o(t)}while(t=t.next);return e},i=function(t,e){if(3===t.type&&e.test(t.value))return t.value=t.value.replace(e,""),!1;if(t=t.firstChild)do{if(!i(t,e))return!1}while(t=t.next);return!0},a=function(t){if(t._listIgnore)t.remove();else if(t=t.firstChild)do{a(t)}while(t=t.next)},u=function(t,o,u){var c=t._listLevel||r;c!==r&&(c<r?e&&(e=e.parent.parent):(n=e,e=null)),e&&e.name===o?e.append(t):(n=n||e,e=new Y(o,1),u>1&&e.attr("start",""+u),t.wrap(e)),t.name="li",c>r&&n&&n.lastChild.append(e),r=c,a(t),i(t,/^\u00a0+/),i(t,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),i(t,/^\u00a0+/)},c=[],s=t.firstChild;null!=s;)if(c.push(s),null!==(s=s.walk()))for(;void 0!==s&&s.parent!==t;)s=s.walk();for(var l=0;l<c.length;l++)if("p"===(t=c[l]).name&&t.firstChild){var f=o(t);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(f)){u(t,"ul");continue}if(et(f)){var d=/([0-9]+)\./.exec(f),m=1;d&&(m=parseInt(d[1],10)),u(t,"ol",m);continue}if(t._listLevel){u(t,"ul",1);continue}e=null}else n=e,e=null}(u),e=X({validate:B(t)},i).serialize(u)},ot=function(t,e){return{content:t,cancelled:e}},it=function(t,e,n,r){var o=function(t,e,n,r){return t.fire("PastePreProcess",{content:e,internal:n,wordContent:r})}(t,e,n,r),i=function(t,e){var n=q({},t.schema);n.addNodeFilter("meta",(function(t){I.each(t,(function(t){t.remove()}))}));var r=n.parse(e,{forced_root_block:!1,isRootContent:!0});return X({validate:B(t)},t.schema).serialize(r)}(t,o.content);return t.hasEventListeners("PastePostProcess")&&!o.isDefaultPrevented()?function(t,e,n,r){var o=t.dom.create("div",{style:"display:none"},e),i=function(t,e,n,r){return t.fire("PastePostProcess",{node:e,internal:n,wordContent:r})}(t,o,n,r);return ot(i.node.innerHTML,i.isDefaultPrevented())}(t,i,n,r):ot(i,o.isDefaultPrevented())},at=function(t,e,n){var r=tt(e),o=r?function(t,e){return function(t){return t.getParam("paste_enable_default_filters",!0)}(t)?rt(t,e):e}(t,e):e;return it(t,o,n,r)},ut=function(t,e){return t.insertContent(e,{merge:L(t),paste:!0}),!0},ct=function(t){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(t)},st=function(t,e){return ct(e)&&w(H(t),(function(t){return n=e.toLowerCase(),r="."+t.toLowerCase(),M(n,r,n.length-r.length);var n,r}))},lt=function(t,e,n){return!(!1!==t.selection.isCollapsed()||!ct(e))&&function(t,e,n){return t.undoManager.extra((function(){n(t,e)}),(function(){t.execCommand("mceInsertLink",!1,e)})),!0}(t,e,n)},ft=function(t,e,n){return!!st(t,e)&&function(t,e,n){return t.undoManager.extra((function(){n(t,e)}),(function(){t.insertContent('<img src="'+e+'">')})),!0}(t,e,n)},dt=function(t,e,n){n||!1===function(t){return t.getParam("smart_paste",!0)}(t)?ut(t,e):function(t,e){I.each([lt,ft,ut],(function(n){return!0!==n(t,e,ut)}))}(t,e)},mt=function(t){return"\n"===t||"\r"===t},pt=function(t,e){var n,r,o=(n=" ",(r=function(t){return t.getParam("paste_tab_spaces",4,"number")}(t))<=0?"":new Array(r+1).join(n)),i=e.replace(/\t/g,o);return function(t,e,n){return O(t,(function(t,r){n=e(n,t,r)})),n}(i,(function(t,e){return function(t){return-1!==" \f\t\v".indexOf(t)}(e)||" "===e?t.pcIsSpace||""===t.str||t.str.length===i.length-1||function(t,e){return e<t.length&&e>=0&&mt(t[e])}(i,t.str.length+1)?{pcIsSpace:!1,str:t.str+" "}:{pcIsSpace:!0,str:t.str+" "}:{pcIsSpace:mt(e),str:t.str+e}}),{pcIsSpace:!1,str:""}).str},ht=function(t,e,n,r){var o=at(t,e,n);!1===o.cancelled&&dt(t,o.content,r)},gt=function(t,e,n){var r=n||V(e);ht(t,function(t){return t.replace("\x3c!-- x-tinymce/html --\x3e","")}(e),r,!1)},vt=function(t,e){var n=t.dom.encode(e).replace(/\r\n/g,"\n"),r=function(t,e,n){return e?K(t,!0===e?"p":e,n):function(t){return t.replace(/\r?\n/g,"<br>")}(t)}(pt(t,n),function(t){return t.getParam("forced_root_block")}(t),function(t){return t.getParam("forced_root_block_attrs")}(t));ht(t,r,!1,!0)},bt=function(t){var e={};if(t){if(t.getData){var n=t.getData("Text");n&&n.length>0&&-1===n.indexOf("data:text/mce-internal,")&&(e["text/plain"]=n)}if(t.types)for(var r=0;r<t.types.length;r++){var o=t.types[r];try{e[o]=t.getData(o)}catch(t){e[o]=""}}}return e},yt=function(t,e){return e in t&&t[e].length>0},_t=function(t){return yt(t,"text/html")||yt(t,"text/plain")},wt=(r="mceclip",o=0,function(){return r+o++}),xt=function(t,e){var n,r,o=(n=e.uri,(r=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(n))?{type:r[1],data:decodeURIComponent(r[2])}:{type:null,data:null}),i=o.data,a=o.type,u=wt(),s=e.blob,l=new Image;if(l.src=e.uri,function(t,e){var n=function(t){return t.getParam("images_dataimg_filter")}(t);return!n||n(e)}(t,l)){var f=t.editorUpload.blobCache,d=void 0,m=f.getByData(i,a);if(m)d=m;else{var p=function(t){return t.getParam("images_reuse_filename")}(t)&&c(s.name),h=p?function(t,e){var n=e.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return c(n)?t.dom.encode(n[1]):null}(t,s.name):u,g=p?s.name:void 0;d=f.create(u,s,i,h,g),f.add(d)}gt(t,'<img src="'+d.blobUri()+'">',!1)}else gt(t,'<img src="'+e.uri+'">',!1)},Ot=function(t){return A.all(x(t,(function(t){return new A((function(e){var n=function(t){return c(t.getAsFile)}(t)?t.getAsFile():t,r=new window.FileReader;r.onload=function(){e({blob:n,uri:r.result})},r.readAsDataURL(n)}))})))},St=function(t){var e=H(t);return function(t){return function(t,e){return M(t,e,0)}(t.type,"image/")&&w(e,(function(e){return n=e.toLowerCase(),r={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"},(I.hasOwn(r,n)?"image/"+r[n]:"image/"+n)===t.type;var n,r}))}},Ct=function(t,e,n){var r="paste"===e.type?e.clipboardData:e.dataTransfer;if(N(t)&&r){var o=function(t,e){var n=e.items?S(C(e.items),(function(t){return"file"===t.kind?[t.getAsFile()]:[]})):[],r=e.files?C(e.files):[];return function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n}(n.length>0?n:r,St(t))}(t,r);if(o.length>0)return e.preventDefault(),Ot(o).then((function(e){n&&t.selection.setRng(n),O(e,(function(e){xt(t,e)}))})),!0}return!1},kt=function(t){return P.metaKeyPressed(t)&&86===t.keyCode||t.shiftKey&&45===t.keyCode},Et=function(t,e,n){var r,o=E(),i=E();t.on("keyup",i.clear),t.on("keydown",(function(n){var a=function(t){kt(t)&&!t.isDefaultPrevented()&&e.remove()};if(kt(n)&&!n.isDefaultPrevented()){if((r=n.shiftKey&&86===n.keyCode)&&T.webkit&&-1!==navigator.userAgent.indexOf("Version/"))return;if(n.stopImmediatePropagation(),o.set(n),i.set(!0),T.ie&&r)return n.preventDefault(),void function(t,e){t.fire("paste",{ieFake:e})}(t,!0);e.remove(),e.create(),t.once("keyup",a),t.once("paste",(function(){t.off("keyup",a)}))}}));var a=function(t,n,r,o,i){var a;yt(n,"text/html")?a=n["text/html"]:(a=e.getHtml(),i=i||V(a),e.isDefaultContent(a)&&(o=!0)),a=Z(a),e.remove();var u=!1===i&&!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(a),c=ct(a);(!a.length||u&&!c)&&(o=!0),(o||c)&&(a=yt(n,"text/plain")&&u?n["text/plain"]:function(t){var e=J(),n=q({},e),r="",o=e.getShortEndedElements(),i=I.makeMap("script noscript style textarea video audio iframe object"," "),a=e.getBlockElements(),u=function(t){var e=t.name,n=t;if("br"!==e){if("wbr"!==e)if(o[e]&&(r+=" "),i[e])r+=" ";else{if(3===t.type&&(r+=t.value),!t.shortEnded&&(t=t.firstChild))do{u(t)}while(t=t.next);a[e]&&n.next&&(r+="\n","p"===e&&(r+="\n"))}}else r+="\n"};return t=Q(t,[/<!\[[^\]]+\]>/g]),u(n.parse(t)),r}(a)),e.isDefaultContent(a)?r||t.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):o?vt(t,a):gt(t,a,i)};t.on("paste",(function(u){var c=o.isSet()||i.isSet();c&&o.clear();var s=function(t,e){return bt(e.clipboardData||t.getDoc().dataTransfer)}(t,u),l="text"===n.get()||r,f=yt(s,U());r=!1,u.isDefaultPrevented()||function(t){var e=t.clipboardData;return-1!==navigator.userAgent.indexOf("Android")&&e&&e.items&&0===e.items.length}(u)?e.remove():_t(s)||!Ct(t,u,e.getLastRng()||t.selection.getRng())?(c||u.preventDefault(),!T.ie||c&&!u.ieFake||yt(s,"text/html")||(e.create(),t.dom.bind(e.getEl(),"paste",(function(t){t.stopPropagation()})),t.getDoc().execCommand("Paste",!1,null),s["text/html"]=e.getHtml()),yt(s,"text/html")?(u.preventDefault(),f||(f=V(s["text/html"])),a(t,s,c,l,f)):D.setEditorTimeout(t,(function(){a(t,s,c,l,f)}),0)):e.remove()}))},Mt=function(t){return T.ie&&t.inline?document.body:t.getBody()},Tt=function(t,e,n){(function(t){return Mt(t)!==t.getBody()})(t)&&t.dom.bind(e,"paste keyup",(function(e){Pt(t,n)||t.fire("paste")}))},Dt=function(t){return t.dom.get("mcepastebin")},At=function(t,e){return e===t},Pt=function(t,e){var n,r=Dt(t);return(n=r)&&"mcepastebin"===n.id&&At(e,r.innerHTML)},Rt=function(t){var e=i(null);return{create:function(){return function(t,e,n){var r=t.dom,o=t.getBody();e.set(t.selection.getRng());var i=t.dom.add(Mt(t),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n);(T.ie||T.gecko)&&r.setStyle(i,"left","rtl"===r.getStyle(o,"direction",!0)?65535:-65535),r.bind(i,"beforedeactivate focusin focusout",(function(t){t.stopPropagation()})),Tt(t,i,n),i.focus(),t.selection.select(i,!0)}(t,e,"%MCEPASTEBIN%")},remove:function(){return function(t,e){if(Dt(t)){for(var n=void 0,r=e.get();n=t.dom.get("mcepastebin");)t.dom.remove(n),t.dom.unbind(n);r&&t.selection.setRng(r)}e.set(null)}(t,e)},getEl:function(){return Dt(t)},getHtml:function(){return function(t){var e=function(e,n){e.appendChild(n),t.dom.remove(n,!0)},n=I.grep(Mt(t).childNodes,(function(t){return"mcepastebin"===t.id})),r=n.shift();I.each(n,(function(t){e(r,t)}));for(var o=t.dom.select("div[id=mcepastebin]",r),i=o.length-1;i>=0;i--){var a=t.dom.create("div");r.insertBefore(a,o[i]),e(a,o[i])}return r?r.innerHTML:""}(t)},getLastRng:e.get,isDefault:function(){return Pt(t,"%MCEPASTEBIN%")},isDefaultContent:function(t){return At("%MCEPASTEBIN%",t)}}},It=function(t,e){var n=Rt(t);return t.on("PreInit",(function(){return function(t,e,n){var r;Et(t,e,n),t.parser.addNodeFilter("img",(function(e,n,o){var i=function(t){t.attr("data-mce-object")||r===T.transparentSrc||t.remove()},a=function(t){return 0===t.indexOf("webkit-fake-url")},u=function(t){return 0===t.indexOf("data:")};if(!N(t)&&function(t){return t.data&&!0===t.data.paste}(o))for(var c=e.length;c--;)(r=e[c].attr("src"))&&(a(r)||!F(t)&&u(r))&&i(e[c])}))}(t,n,e)})),{pasteFormat:e,pasteHtml:function(e,n){return gt(t,e,n)},pasteText:function(e){return vt(t,e)},pasteImageData:function(e,n){return Ct(t,e,n)},getDataTransferItems:bt,hasHtmlOrText:_t,hasContentType:yt}},zt=function(t,e){t.addCommand("mceTogglePlainTextPaste",(function(){!function(t,e){"text"===e.pasteFormat.get()?(e.pasteFormat.set("html"),R(t,!1)):(e.pasteFormat.set("text"),R(t,!0)),t.focus()}(t,e)})),t.addCommand("mceInsertClipboardContent",(function(t,n){n.content&&e.pasteHtml(n.content,n.internal),n.text&&e.pasteText(n.text)}))},Lt=function(t,e,n){if(!function(t){return!1===T.iOS&&"function"==typeof(null==t?void 0:t.setData)}(t))return!1;try{return t.clearData(),t.setData("text/html",e),t.setData("text/plain",n),t.setData(U(),e),!0}catch(t){return!1}},jt=function(t,e,n,r){Lt(t.clipboardData,e.html,e.text)?(t.preventDefault(),r()):n(e.html,r)},Bt=function(t){return function(e,n){var r=function(t){return"\x3c!-- x-tinymce/html --\x3e"+t}(e),o=t.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),i=t.dom.create("div",{contenteditable:"true"},r);t.dom.setStyles(o,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),o.appendChild(i),t.dom.add(t.getBody(),o);var a=t.selection.getRng();i.focus();var u=t.dom.createRng();u.selectNodeContents(i),t.selection.setRng(u),D.setTimeout((function(){t.selection.setRng(a),o.parentNode.removeChild(o),n()}),0)}},Ft=function(t){return{html:t.selection.getContent({contextual:!0}),text:t.selection.getContent({format:"text"})}},Nt=function(t){return!t.selection.isCollapsed()||function(t){return!!t.dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody())}(t)},Ht=function(t){t.on("cut",function(t){return function(e){Nt(t)&&jt(e,Ft(t),Bt(t),(function(){if(T.browser.isChrome()||T.browser.isFirefox()){var e=t.selection.getRng();D.setEditorTimeout(t,(function(){t.selection.setRng(e),t.execCommand("Delete")}),0)}else t.execCommand("Delete")}))}}(t)),t.on("copy",function(t){return function(e){Nt(t)&&jt(e,Ft(t),Bt(t),l)}}(t))},Vt=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Ut=function(t,e){return Vt.getCaretRangeFromPoint(e.clientX,e.clientY,t.getDoc())},Wt=function(t,e){t.focus(),t.selection.setRng(e)},$t=function(t,e){t.on("PastePreProcess",(function(n){n.content=e(t,n.content,n.internal,n.wordContent)}))},Gt=function(t,e){if(!tt(e))return e;var n=[];I.each(t.schema.getBlockElements(),(function(t,e){n.push(e)}));var r=new RegExp("(?:<br> [\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br> [\\s\\r\\n]+|<br>)*","g");return e=Q(e,[[r,"$1"]]),e=Q(e,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])},Kt=function(t,e,n,r){if(r||n)return e;var o,i=function(t){return t.getParam("paste_webkit_styles")}(t);if(!1===function(t){return t.getParam("paste_remove_styles_if_webkit",!0)}(t)||"all"===i)return e;if(i&&(o=i.split(/[, ]/)),o){var a=t.dom,u=t.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,(function(t,e,n,r){var i=a.parseStyle(a.decode(n)),c={};if("none"===o)return e+r;for(var s=0;s<o.length;s++){var l=i[o[s]],f=a.getStyle(u,o[s],!0);/color/.test(o[s])&&(l=a.toHex(l),f=a.toHex(f)),f!==l&&(c[o[s]]=l)}var d=a.serializeStyle(c,"span");return d?e+' style="'+d+'"'+r:e+r}))}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,(function(t,e,n,r){return e+' style="'+n+'"'+r}))},qt=function(t,e){t.$("a",e).find("font,u").each((function(e,n){t.dom.remove(n,!0)}))},Xt=function(t,e){return function(n){n.setActive("text"===e.pasteFormat.get());var r=function(t){return n.setActive(t.state)};return t.on("PastePlainTextToggle",r),function(){return t.off("PastePlainTextToggle",r)}}};a.add("paste",(function(t){if(!1===function(t){return!!t.hasPlugin("powerpaste",!0)&&(void 0!==window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),!0)}(t)){var e=i(!1),n=i(function(t){return t.getParam("paste_as_text",!1)}(t)?"text":"html"),r=It(t,n);return function(t){T.webkit&&$t(t,Kt),T.ie&&($t(t,Gt),function(t,e){t.on("PastePostProcess",(function(n){e(t,n.node)}))}(t,qt))}(t),function(t,e){var n=function(){return t.execCommand("mceTogglePlainTextPaste")};t.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:n,onSetup:Xt(t,e)}),t.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:n,onSetup:Xt(t,e)})}(t,r),zt(t,r),function(t){var e=t.plugins.paste,n=function(t){return t.getParam("paste_preprocess")}(t);n&&t.on("PastePreProcess",(function(t){n.call(e,e,t)}));var r=function(t){return t.getParam("paste_postprocess")}(t);r&&t.on("PastePostProcess",(function(t){r.call(e,e,t)}))}(t),Ht(t),function(t,e,n){(function(t){return t.getParam("paste_block_drop",!1)})(t)&&t.on("dragend dragover draggesture dragdrop drop drag",(function(t){t.preventDefault(),t.stopPropagation()})),z(t)||t.on("drop",(function(t){var e=t.dataTransfer;e&&e.files&&e.files.length>0&&t.preventDefault()})),t.on("drop",(function(r){var o=Ut(t,r);if(!r.isDefaultPrevented()&&!n.get()){var i,a=e.getDataTransferItems(r.dataTransfer),u=e.hasContentType(a,U());if((e.hasHtmlOrText(a)&&(!(i=a["text/plain"])||0!==i.indexOf("file://"))||!e.pasteImageData(r,o))&&o&&function(t){return t.getParam("paste_filter_drop",!0)}(t)){var c=a["mce-internal"]||a["text/html"]||a["text/plain"];c&&(r.preventDefault(),D.setEditorTimeout(t,(function(){t.undoManager.transact((function(){a["mce-internal"]&&t.execCommand("Delete"),Wt(t,o),c=Z(c),a["text/html"]?e.pasteHtml(c,u):e.pasteText(c)}))})))}}})),t.on("dragstart",(function(t){n.set(!0)})),t.on("dragover dragend",(function(e){z(t)&&!1===n.get()&&(e.preventDefault(),Wt(t,Ut(t,e))),"dragend"===e.type&&n.set(!1)}))}(t,r,e),function(t){return{clipboard:t}}(r)}}))}()},"7c73":function(t,e,n){var r,o=n("825a"),i=n("37e8"),a=n("7839"),u=n("d012"),c=n("1be4"),s=n("cc12"),l=n("f772"),f=l("IE_PROTO"),d=function(){},m=function(t){return"<script>"+t+"<\/script>"},p=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},h=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;h="undefined"!=typeof document?document.domain&&r?p(r):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(m("document.F=Object")),t.close(),t.F):p(r);for(var n=a.length;n--;)delete h.prototype[a[n]];return h()};u[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=o(t),n=new d,d.prototype=null,n[f]=t):n=h(),void 0===e?n:i.f(n,e)}},"7cb9":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pharmacode=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("e762");var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.number=parseInt(t,10),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"encode",value:function(){for(var t=this.number,e="";!isNaN(t)&&0!=t;)t%2==0?(e="11100"+e,t=(t-2)/2):(e="100"+e,t=(t-1)/2);return{data:e=e.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default);e.pharmacode=a},"7db0":function(t,e,n){"use strict";var r=n("23e7"),o=n("b727").find,i=n("44d2"),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("find")},"7dd0":function(t,e,n){"use strict";var r=n("23e7"),o=n("c65b"),i=n("c430"),a=n("5e77"),u=n("1626"),c=n("9ed3"),s=n("e163"),l=n("d2bb"),f=n("d44e"),d=n("9112"),m=n("cb2d"),p=n("b622"),h=n("3f8c"),g=n("ae93"),v=a.PROPER,b=a.CONFIGURABLE,y=g.IteratorPrototype,_=g.BUGGY_SAFARI_ITERATORS,w=p("iterator"),x=function(){return this};t.exports=function(t,e,n,a,p,g,O){c(n,e,a);var S,C,k,E=function(t){if(t===p&&P)return P;if(!_&&t in D)return D[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},M=e+" Iterator",T=!1,D=t.prototype,A=D[w]||D["@@iterator"]||p&&D[p],P=!_&&A||E(p),R="Array"==e&&D.entries||A;if(R&&(S=s(R.call(new t)))!==Object.prototype&&S.next&&(i||s(S)===y||(l?l(S,y):u(S[w])||m(S,w,x)),f(S,M,!0,!0),i&&(h[M]=x)),v&&"values"==p&&A&&"values"!==A.name&&(!i&&b?d(D,"name","values"):(T=!0,P=function(){return o(A,this)})),p)if(C={values:E("values"),keys:g?P:E("keys"),entries:E("entries")},O)for(k in C)(_||T||!(k in D))&&m(D,k,C[k]);else r({target:e,proto:!0,forced:_||T},C);return i&&!O||D[w]===P||m(D,w,P,{name:p}),h[e]=P,C}},"7f9a":function(t,e,n){var r=n("da84"),o=n("1626"),i=n("8925"),a=r.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},"805f":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n("124f"),i=(r=o)&&r.__esModule?r:{default:r},a=n("6e53");var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,a.mod11)(t),t+=(0,a.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default);e.default=u},"825a":function(t,e,n){var r=n("da84"),o=n("861d"),i=r.String,a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not an object")}},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(t,e,n){"use strict";var r=n("a04b"),o=n("9bf2"),i=n("5c6c");t.exports=function(t,e,n){var a=r(e);a in t?o.f(t,a,i(0,n)):t[a]=n}},"84ec":function(t,e,n){n("2401")},"861d":function(t,e,n){var r=n("1626");t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},8861:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n("124f"),i=(r=o)&&r.__esModule?r:{default:r},a=n("6e53");var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,a.mod10)(t),t+=(0,a.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default);e.default=u},8863:function(t,e,n){n("9dd9")},8875:function(t,e,n){var r,o,i;"undefined"!=typeof self&&self,o=[],void 0===(i="function"==typeof(r=function(){return function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(t){var n,r,o,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(t.stack)||/@([^@]*):(\d+):(\d+)\s*$/gi.exec(t.stack),a=i&&i[1]||!1,u=i&&i[2]||!1,c=document.location.href.replace(document.location.hash,""),s=document.getElementsByTagName("script");a===c&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(u-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=n.replace(r,"$1").trim());for(var l=0;l<s.length;l++){if("interactive"===s[l].readyState)return s[l];if(s[l].src===a)return s[l];if(a===c&&s[l].innerHTML&&s[l].innerHTML.trim()===o)return s[l]}return null}}})?r.apply(e,o):r)||(t.exports=i)},8925:function(t,e,n){var r=n("e330"),o=n("1626"),i=n("c6cd"),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},"89a2":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n("c243"),u=n("bdfe"),c=(r=u)&&r.__esModule?r:{default:r};var s=function(t){return(10-t.substr(0,12).split("").map((function(t){return+t})).reduce((function(t,e,n){return n%2?t+3*e:t+e}),0)%10)%10},l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{12}$/)&&(t+=s(t));var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.lastChar=n.lastChar,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===s(this.data)}},{key:"leftText",value:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var t=this.data.substr(1,6),n=a.EAN13_STRUCTURE[this.data[0]];return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,t,n)}},{key:"rightText",value:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var t=this.data.substr(7,6);return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,t,"RRRRRR")}},{key:"encodeGuarded",value:function(){var t=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(t.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(t.push({data:"00"}),t.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),t}}]),e}(c.default);e.default=l},"8aa5":function(t,e,n){"use strict";var r=n("6547").charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"8ba4":function(t,e,n){n("23e7")({target:"Number",stat:!0},{isInteger:n("eac5")})},"8bbf":function(t,e){t.exports=require("vue")},"8df4":function(t,e,n){"use strict";var r=n("7a77");function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},"8e51":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MSI1110=e.MSI1010=e.MSI11=e.MSI10=e.MSI=void 0;var r=c(n("124f")),o=c(n("4727")),i=c(n("4461")),a=c(n("8861")),u=c(n("805f"));function c(t){return t&&t.__esModule?t:{default:t}}e.MSI=r.default,e.MSI10=o.default,e.MSI11=i.default,e.MSI1010=a.default,e.MSI1110=u.default},"8f27":function(t,e,n){"use strict";n("6126")},"8f75":function(t,e,n){},"905a":function(t,e){t.exports=require("@tinymce/tinymce-vue")},"90d8":function(t,e,n){var r=n("c65b"),o=n("1a2d"),i=n("3a9b"),a=n("ad6d"),u=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in u||o(t,"flags")||!i(u,t)?e:r(a,t)}},"90e3":function(t,e,n){var r=n("e330"),o=0,i=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},9112:function(t,e,n){var r=n("83ab"),o=n("9bf2"),i=n("5c6c");t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9224:function(t){t.exports=JSON.parse('{"a":"1.16.13"}')},9263:function(t,e,n){"use strict";var r,o,i=n("c65b"),a=n("e330"),u=n("577e"),c=n("ad6d"),s=n("9f7f"),l=n("5692"),f=n("7c73"),d=n("69f3").get,m=n("fce3"),p=n("107c"),h=l("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,v=g,b=a("".charAt),y=a("".indexOf),_=a("".replace),w=a("".slice),x=(o=/b*/g,i(g,r=/a/,"a"),i(g,o,"a"),0!==r.lastIndex||0!==o.lastIndex),O=s.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];(x||S||O||m||p)&&(v=function(t){var e,n,r,o,a,s,l,m=this,p=d(m),C=u(t),k=p.raw;if(k)return k.lastIndex=m.lastIndex,e=i(v,k,C),m.lastIndex=k.lastIndex,e;var E=p.groups,M=O&&m.sticky,T=i(c,m),D=m.source,A=0,P=C;if(M&&(T=_(T,"y",""),-1===y(T,"g")&&(T+="g"),P=w(C,m.lastIndex),m.lastIndex>0&&(!m.multiline||m.multiline&&"\n"!==b(C,m.lastIndex-1))&&(D="(?: "+D+")",P=" "+P,A++),n=new RegExp("^(?:"+D+")",T)),S&&(n=new RegExp("^"+D+"$(?!\\s)",T)),x&&(r=m.lastIndex),o=i(g,M?n:m,P),M?o?(o.input=w(o.input,A),o[0]=w(o[0],A),o.index=m.lastIndex,m.lastIndex+=o[0].length):m.lastIndex=0:x&&o&&(m.lastIndex=m.global?o.index+o[0].length:r),S&&o&&o.length>1&&i(h,o[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&E)for(o.groups=s=f(null),a=0;a<E.length;a++)s[(l=E[a])[0]]=o[l[1]];return o}),t.exports=v},"94ca":function(t,e,n){var r=n("d039"),o=n("1626"),i=/#|\.prototype\./,a=function(t,e){var n=c[u(t)];return n==l||n!=s&&(o(e)?r(e):!!e)},u=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},"94ce":function(t,e){!function(){"use strict";var t=function(t){return function(e){return r=typeof(n=e),(null===n?"null":"object"===r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;var n,r}},e=function(t){return function(e){return typeof e===t}},n=function(t){return function(e){return t===e}},r=t("string"),o=t("object"),i=t("array"),a=n(null),u=e("boolean"),c=n(void 0),s=function(t){return!function(t){return null==t}(t)},l=e("function"),f=e("number"),d=function(){},m=function(t){return function(){return t}},p=function(t){return t},h=function(t,e){return t===e};function g(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}var v,b,y=function(t){return function(e){return!t(e)}},_=m(!1),w=m(!0),x=function(){return O},O={fold:function(t,e){return t()},isSome:_,isNone:w,getOr:b=p,getOrThunk:v=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:m(null),getOrUndefined:m(void 0),or:b,orThunk:v,map:x,each:d,bind:x,exists:_,forall:w,filter:function(){return x()},toArray:function(){return[]},toString:m("none()")},S=function(t){var e=m(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:w,isNone:_,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return S(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:O},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},C={some:S,none:x,from:function(t){return null==t?O:S(t)}},k=Array.prototype.slice,E=Array.prototype.indexOf,M=Array.prototype.push,T=function(t,e){return n=t,r=e,E.call(n,r)>-1;var n,r},D=function(t,e){for(var n=0,r=t.length;n<r;n++){if(e(t[n],n))return!0}return!1},A=function(t,e){for(var n=[],r=0;r<t;r++)n.push(e(r));return n},P=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},R=function(t,e){for(var n=0,r=t.length;n<r;n++){e(t[n],n)}},I=function(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var a=t[o];(e(a,o)?n:r).push(a)}return{pass:n,fail:r}},z=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},L=function(t,e,n){return function(t,e){for(var n=t.length-1;n>=0;n--){e(t[n],n)}}(t,(function(t,r){n=e(n,t,r)})),n},j=function(t,e,n){return R(t,(function(t,r){n=e(n,t,r)})),n},B=function(t,e){return function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return C.some(i);if(n(i,r))break}return C.none()}(t,e,_)},F=function(t,e){for(var n=0,r=t.length;n<r;n++){if(e(t[n],n))return C.some(n)}return C.none()},N=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!i(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);M.apply(e,t[n])}return e},H=function(t,e){return N(P(t,e))},V=function(t,e){for(var n=0,r=t.length;n<r;++n){if(!0!==e(t[n],n))return!1}return!0},U=function(t,e){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];n[String(i)]=e(i,r)}return n},W=function(t){return[t]},$=function(t,e){return e>=0&&e<t.length?C.some(t[e]):C.none()},G=function(t){return $(t,0)},K=function(t){return $(t,t.length-1)},q=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return C.none()},X=function(){return(X=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function Y(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var J=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}},Q=function(){return Z(0,0)},Z=function(t,e){return{major:t,minor:e}},tt={nu:Z,detect:function(t,e){var n=String(e).toLowerCase();return 0===t.length?Q():function(t,e){var n=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}}(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return Z(r(1),r(2))}(t,n)},unknown:Q},et=function(t,e){var n=String(e).toLowerCase();return B(t,(function(t){return t.search(n)}))},nt=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},rt=function(t,e){return-1!==t.indexOf(e)},ot=function(t,e){return nt(t,e,0)},it=function(t,e){return nt(t,e,t.length-e.length)},at=function(t){return function(e){return e.replace(t,"")}}(/^\s+|\s+$/g),ut=function(t){return t.length>0},ct=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,st=function(t){return function(e){return rt(e,t)}},lt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return rt(t,"edge/")&&rt(t,"chrome")&&rt(t,"safari")&&rt(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ct],search:function(t){return rt(t,"chrome")&&!rt(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return rt(t,"msie")||rt(t,"trident")}},{name:"Opera",versionRegexes:[ct,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:st("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:st("firefox")},{name:"Safari",versionRegexes:[ct,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(rt(t,"safari")||rt(t,"mobile/"))&&rt(t,"applewebkit")}}],ft=[{name:"Windows",search:st("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return rt(t,"iphone")||rt(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:st("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:st("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:st("linux"),versionRegexes:[]},{name:"Solaris",search:st("sunos"),versionRegexes:[]},{name:"FreeBSD",search:st("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:st("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],dt={browsers:m(lt),oses:m(ft)},mt=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r("Edge"),isChrome:r("Chrome"),isIE:r("IE"),isOpera:r("Opera"),isFirefox:r("Firefox"),isSafari:r("Safari")}},pt={unknown:function(){return mt({current:void 0,version:tt.unknown()})},nu:mt,edge:m("Edge"),chrome:m("Chrome"),ie:m("IE"),opera:m("Opera"),firefox:m("Firefox"),safari:m("Safari")},ht=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r("Windows"),isiOS:r("iOS"),isAndroid:r("Android"),isOSX:r("OSX"),isLinux:r("Linux"),isSolaris:r("Solaris"),isFreeBSD:r("FreeBSD"),isChromeOS:r("ChromeOS")}},gt={unknown:function(){return ht({current:void 0,version:tt.unknown()})},nu:ht,windows:m("Windows"),ios:m("iOS"),android:m("Android"),linux:m("Linux"),osx:m("OSX"),solaris:m("Solaris"),freebsd:m("FreeBSD"),chromeos:m("ChromeOS")},vt=function(t,e,n){var r=dt.browsers(),o=dt.oses(),i=e.bind((function(t){return function(t,e){return q(e.brands,(function(e){var n=e.brand.toLowerCase();return B(t,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(t){return{current:t.name,version:tt.nu(parseInt(e.version,10),0)}}))}))}(r,t)})).orThunk((function(){return function(t,e){return et(t,e).map((function(t){var n=tt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))}(r,t)})).fold(pt.unknown,pt.nu),a=function(t,e){return et(t,e).map((function(t){var n=tt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))}(o,t).fold(gt.unknown,gt.nu),u=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,a=t.isiOS()||t.isAndroid(),u=a||r("(pointer:coarse)"),c=o||!i&&a&&r("(min-device-width:768px)"),s=i||a&&!c,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),f=!s&&!c&&!l;return{isiPad:m(o),isiPhone:m(i),isTablet:m(c),isPhone:m(s),isTouch:m(u),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:m(l),isDesktop:m(f)}}(a,i,t,n);return{browser:i,os:a,deviceType:u}},bt=function(t){return window.matchMedia(t).matches},yt=J((function(){return vt(navigator.userAgent,C.from(navigator.userAgentData),bt)})),_t=function(){return yt()},wt=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},xt={fromHtml:function(t,e){var n=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||n.childNodes.length>1)throw new Error("HTML must have a single root node");return wt(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return wt(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return wt(n)},fromDom:wt,fromPoint:function(t,e,n){return C.from(t.dom.elementFromPoint(e,n)).map(wt)}},Ot=function(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},St=function(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount},Ct=function(t,e){var n=void 0===e?document:e.dom;return St(n)?C.none():C.from(n.querySelector(t)).map(xt.fromDom)},kt=function(t,e){return t.dom===e.dom},Et=function(t,e){return n=t.dom,r=e.dom,function(t,e,n){return 0!=(t.compareDocumentPosition(e)&n)}(n,r,Node.DOCUMENT_POSITION_CONTAINED_BY);var n,r},Mt=function(t,e){return _t().browser.isIE()?Et(t,e):function(t,e){var n=t.dom,r=e.dom;return n!==r&&n.contains(r)}(t,e)},Tt=Ot,Dt=Object.keys,At=Object.hasOwnProperty,Pt=function(t,e){for(var n=Dt(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}},Rt=function(t,e){return It(t,(function(t,n){return{k:n,v:e(t,n)}}))},It=function(t,e){var n={};return Pt(t,(function(t,r){var o=e(t,r);n[o.k]=o.v})),n},zt=function(t,e){var n={};return function(t,e,n,r){Pt(t,(function(t,o){(e(t,o)?n:r)(t,o)}))}(t,e,function(t){return function(e,n){t[n]=e}}(n),d),n},Lt=function(t,e){var n=[];return Pt(t,(function(t,r){n.push(e(t,r))})),n},jt=function(t){return Lt(t,p)},Bt=function(t){return Dt(t).length},Ft=function(t,e){return Nt(t,e)?C.from(t[e]):C.none()},Nt=function(t,e){return At.call(t,e)},Ht=function(t,e){return Nt(t,e)&&void 0!==t[e]&&null!==t[e]},Vt=["tfoot","thead","tbody","colgroup"],Ut=function(t,e,n){return{element:t,rowspan:e,colspan:n}},Wt=function(t,e,n){return{element:t,cells:e,section:n}},$t=function(t,e,n){return{element:t,isNew:e,isLocked:n}},Gt=function(t,e,n,r){return{element:t,cells:e,section:n,isNew:r}};"undefined"!=typeof window?window:Function("return this;")();var Kt=function(t){return t.dom.nodeName.toLowerCase()},qt=function(t){return t.dom.nodeType},Xt=function(t){return function(e){return qt(e)===t}},Yt=function(t){return 8===qt(t)||"#comment"===Kt(t)},Jt=Xt(1),Qt=Xt(3),Zt=Xt(9),te=Xt(11),ee=function(t){return function(e){return Jt(e)&&Kt(e)===t}},ne=function(t){return xt.fromDom(t.dom.ownerDocument)},re=function(t){return Zt(t)?t:ne(t)},oe=function(t){return C.from(t.dom.parentNode).map(xt.fromDom)},ie=function(t,e){for(var n=l(e)?e:_,r=t.dom,o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=xt.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o},ae=function(t){return C.from(t.dom.previousSibling).map(xt.fromDom)},ue=function(t){return C.from(t.dom.nextSibling).map(xt.fromDom)},ce=function(t){return P(t.dom.childNodes,xt.fromDom)},se=function(t,e){var n=t.dom.childNodes;return C.from(n[e]).map(xt.fromDom)},le=l(Element.prototype.attachShadow)&&l(Node.prototype.getRootNode),fe=m(le),de=le?function(t){return xt.fromDom(t.dom.getRootNode())}:re,me=function(t){var e,n=de(t);return te(e=n)&&s(e.dom.host)?C.some(n):C.none()},pe=function(t){return xt.fromDom(t.dom.host)},he=function(t){return s(t.dom.shadowRoot)},ge=function(t){var e=Qt(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;var n,r,o=e.ownerDocument;return me(xt.fromDom(e)).fold((function(){return o.body.contains(e)}),(n=ge,r=pe,function(t){return n(r(t))}))},ve=function(t){var e=t.dom.body;if(null==e)throw new Error("Body is not available yet");return xt.fromDom(e)},be=function(t,e){var n=[];return R(ce(t),(function(t){e(t)&&(n=n.concat([t])),n=n.concat(be(t,e))})),n},ye=function(t,e,n){return function(t,e,n){return z(ie(t,n),e)}(t,(function(t){return Ot(t,e)}),n)},_e=function(t,e){return function(t,e){return z(ce(t),e)}(t,(function(t){return Ot(t,e)}))},we=function(t,e){return function(t,e){var n=void 0===e?document:e.dom;return St(n)?[]:P(n.querySelectorAll(t),xt.fromDom)}(e,t)};function xe(t,e,n,r,o){return t(n,r)?C.some(n):l(o)&&o(n)?C.none():e(n,r,o)}var Oe=function(t,e,n){for(var r=t.dom,o=l(n)?n:_;r.parentNode;){r=r.parentNode;var i=xt.fromDom(r);if(e(i))return C.some(i);if(o(i))break}return C.none()},Se=function(t,e,n){return Oe(t,(function(t){return Ot(t,e)}),n)},Ce=function(t,e){return function(t,e){return B(t.dom.childNodes,(function(t){return e(xt.fromDom(t))})).map(xt.fromDom)}(t,(function(t){return Ot(t,e)}))},ke=function(t,e){return Ct(e,t)},Ee=function(t,e,n){return xe((function(t,e){return Ot(t,e)}),Se,t,e,n)},Me=function(t,e,n){if(!(r(n)||u(n)||f(n)))throw new Error("Attribute value was not simple");t.setAttribute(e,n+"")},Te=function(t,e,n){Me(t.dom,e,n)},De=function(t,e){var n=t.dom;Pt(e,(function(t,e){Me(n,e,t)}))},Ae=function(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n},Pe=function(t,e){return C.from(Ae(t,e))},Re=function(t,e){t.dom.removeAttribute(e)},Ie=function(t){return j(t.dom.attributes,(function(t,e){return t[e.name]=e.value,t}),{})},ze=function(t,e,n){return void 0===n&&(n=h),t.exists((function(t){return n(t,e)}))},Le=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e},je=function(t,e,n){return t.isSome()&&e.isSome()?C.some(n(t.getOrDie(),e.getOrDie())):C.none()},Be=function(t,e){return t?C.some(e):C.none()},Fe=function(t){return void 0!==t.style&&l(t.style.getPropertyValue)},Ne=function(t,e,n){if(!r(n))throw new Error("CSS value must be a string: "+n);Fe(t)&&t.style.setProperty(e,n)},He=function(t,e,n){var r=t.dom;Ne(r,e,n)},Ve=function(t,e){var n=t.dom;Pt(e,(function(t,e){Ne(n,e,t)}))},Ue=function(t,e){var n=t.dom,r=window.getComputedStyle(n).getPropertyValue(e);return""!==r||ge(t)?r:We(n,e)},We=function(t,e){return Fe(t)?t.style.getPropertyValue(e):""},$e=function(t,e){var n=t.dom,r=We(n,e);return C.from(r).filter((function(t){return t.length>0}))},Ge=function(t,e){!function(t,e){Fe(t)&&t.style.removeProperty(e)}(t.dom,e),ze(Pe(t,"style").map(at),"")&&Re(t,"style")},Ke=function(t,e,n){return void 0===n&&(n=0),Pe(t,e).map((function(t){return parseInt(t,10)})).getOr(n)},qe=function(t,e){return Ke(t,e,1)},Xe=function(t){return ee("col")(t)?Ke(t,"span",1)>1:qe(t,"colspan")>1},Ye=function(t){return qe(t,"rowspan")>1},Je=function(t,e){return parseInt(Ue(t,e),10)},Qe=m(10),Ze=m(10),tn=function(t,e){return en(t,e,w)},en=function(t,e,n){return H(ce(t),(function(t){return Ot(t,e)?n(t)?[t]:[]:en(t,e,n)}))},nn=function(t,e){return function(t,e,n){if(void 0===n&&(n=_),n(e))return C.none();if(T(t,Kt(e)))return C.some(e);return Se(e,t.join(","),(function(t){return Ot(t,"table")||n(t)}))}(["td","th"],t,e)},rn=function(t){return tn(t,"th,td")},on=function(t){return Ot(t,"colgroup")?_e(t,"col"):H(cn(t),(function(t){return _e(t,"col")}))},an=function(t,e){return Ee(t,"table",e)},un=function(t){return tn(t,"tr")},cn=function(t){return an(t).fold(m([]),(function(t){return _e(t,"colgroup")}))},sn=function(t,e){return P(t,(function(t){if("colgroup"===Kt(t)){var n=P(on(t),(function(t){var e=Ke(t,"span",1);return Ut(t,1,e)}));return Wt(t,n,"colgroup")}n=P(rn(t),(function(t){var e=Ke(t,"rowspan",1),n=Ke(t,"colspan",1);return Ut(t,e,n)}));return Wt(t,n,e(t))}))},ln=function(t){return oe(t).map((function(t){var e=Kt(t);return function(t){return T(Vt,t)}(e)?e:"tbody"})).getOr("tbody")},fn=function(t){var e=un(t),n=Y(Y([],cn(t),!0),e,!0);return sn(n,ln)},dn=function(t,e,n){var r=t.cells,o=r.slice(0,e),i=r.slice(e),a=o.concat(n).concat(i);return hn(t,a)},mn=function(t,e,n){return dn(t,e,[n])},pn=function(t,e,n){t.cells[e]=n},hn=function(t,e){return Gt(t.element,e,t.section,t.isNew)},gn=function(t,e){return t.cells[e]},vn=function(t,e){return gn(t,e).element},bn=function(t){return t.cells.length},yn=function(t){var e=I(t,(function(t){return"colgroup"===t.section}));return{rows:e.fail,cols:e.pass}},_n=function(t,e,n){var r=P(t.cells,n);return Gt(e(t.element),r,t.section,!0)},wn="data-snooker-locked-cols",xn=function(t){return Pe(t,wn).bind((function(t){return C.from(t.match(/\d+/g))})).map((function(t){return U(t,w)}))},On=function(t){var e=j(yn(t).rows,(function(t,e){return R(e.cells,(function(e,n){e.isLocked&&(t[n]=!0)})),t}),{});return function(t,e){var n=k.call(t,0);return n.sort(e),n}(Lt(e,(function(t,e){return parseInt(e,10)})))},Sn=function(t,e){return t+","+e},Cn=function(t,e){var n=H(t.all,(function(t){return t.cells}));return z(n,e)},kn=function(t){var e={},n=[],r=G(t).map((function(t){return t.element})).bind(an).bind(xn).getOr({}),o=0,i=0,a=0,u=I(t,(function(t){return"colgroup"===t.section})),c=u.pass,s=u.fail;R(s,(function(t){var u=[];R(t.cells,(function(t){for(var n=0;void 0!==e[Sn(a,n)];)n++;for(var o=Ht(r,n.toString()),c=function(t,e,n,r,o,i){return{element:t,rowspan:e,colspan:n,row:r,column:o,isLocked:i}}(t.element,t.rowspan,t.colspan,a,n,o),s=0;s<t.colspan;s++)for(var l=0;l<t.rowspan;l++){var f=n+s,d=Sn(a+l,f);e[d]=c,i=Math.max(i,f+1)}u.push(c)})),o++,n.push(Wt(t.element,u,t.section)),a++}));var l=K(c).map((function(t){var e=function(t){var e={},n=0;return R(t.cells,(function(t){var r=t.colspan;A(r,(function(o){var i=n+o;e[i]=function(t,e,n){return{element:t,colspan:e,column:n}}(t.element,r,i)})),n+=r})),e}(t);return{colgroups:[function(t,e){return{element:t,columns:e}}(t.element,jt(e))],columns:e}})).getOrThunk((function(){return{colgroups:[],columns:{}}})),f=l.columns,d=l.colgroups;return{grid:function(t,e){return{rows:t,columns:e}}(o,i),access:e,all:n,columns:f,colgroups:d}},En={fromTable:function(t){var e=fn(t);return kn(e)},generate:kn,getAt:function(t,e,n){return C.from(t.access[Sn(e,n)])},findItem:function(t,e,n){var r=Cn(t,(function(t){return n(e,t.element)}));return r.length>0?C.some(r[0]):C.none()},filterItems:Cn,justCells:function(t){return H(t.all,(function(t){return t.cells}))},justColumns:function(t){return jt(t.columns)},hasColumns:function(t){return Dt(t.columns).length>0},getColumnAt:function(t,e){return C.from(t.columns[e])}},Mn=function(t,e){var n=e.column,r=e.column+e.colspan-1,o=e.row,i=e.row+e.rowspan-1;return n<=t.finishCol&&r>=t.startCol&&o<=t.finishRow&&i>=t.startRow},Tn=function(t,e){return e.column>=t.startCol&&e.column+e.colspan-1<=t.finishCol&&e.row>=t.startRow&&e.row+e.rowspan-1<=t.finishRow},Dn=function(t,e,n){var r=En.findItem(t,e,kt),o=En.findItem(t,n,kt);return r.bind((function(t){return o.map((function(e){return n=t,r=e,o=Math.min(n.row,r.row),i=Math.min(n.column,r.column),a=Math.max(n.row+n.rowspan-1,r.row+r.rowspan-1),u=Math.max(n.column+n.colspan-1,r.column+r.colspan-1),{startRow:o,startCol:i,finishRow:a,finishCol:u};var n,r,o,i,a,u}))}))},An=function(t,e,n){return Dn(t,e,n).bind((function(e){return function(t,e){for(var n=!0,r=g(Tn,e),o=e.startRow;o<=e.finishRow;o++)for(var i=e.startCol;i<=e.finishCol;i++)n=n&&En.getAt(t,o,i).exists(r);return n?C.some(e):C.none()}(t,e)}))},Pn=function(t,e,n){return Dn(t,e,n).map((function(e){var n=En.filterItems(t,g(Mn,e));return P(n,(function(t){return t.element}))}))},Rn=function(t,e){return En.findItem(t,e,(function(t,e){return Mt(e,t)})).map((function(t){return t.element}))},In=function(t,e,n){return an(t).bind((function(r){return function(t,e,n,r){return En.findItem(t,e,kt).bind((function(e){var o=n>0?e.row+e.rowspan-1:e.row,i=r>0?e.column+e.colspan-1:e.column;return En.getAt(t,o+n,i+r).map((function(t){return t.element}))}))}(jn(r),t,e,n)}))},zn=function(t,e,n){var r=jn(t);return Pn(r,e,n)},Ln=function(t,e,n,r,o){var i=jn(t),a=kt(t,n)?C.some(e):Rn(i,e),u=kt(t,o)?C.some(r):Rn(i,r);return a.bind((function(t){return u.bind((function(e){return Pn(i,t,e)}))}))},jn=En.fromTable,Bn=function(t,e){oe(t).each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},Fn=function(t,e){ue(t).fold((function(){oe(t).each((function(t){Hn(t,e)}))}),(function(t){Bn(t,e)}))},Nn=function(t,e){(function(t){return se(t,0)})(t).fold((function(){Hn(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))},Hn=function(t,e){t.dom.appendChild(e.dom)},Vn=function(t,e){Bn(t,e),Hn(e,t)},Un=function(t,e){R(e,(function(n,r){var o=0===r?t:e[r-1];Fn(o,n)}))},Wn=function(t,e){R(e,(function(e){Hn(t,e)}))},$n=function(t){t.dom.textContent="",R(ce(t),(function(t){Gn(t)}))},Gn=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},Kn=function(t){var e,n=ce(t);n.length>0&&(e=t,R(n,(function(t){Bn(e,t)}))),Gn(t)},qn=function(t,e){var n=function(e){return t(e)?C.from(e.dom.nodeValue):C.none()};return{get:function(r){if(!t(r))throw new Error("Can only get "+e+" value of a "+e+" node");return n(r).getOr("")},getOption:n,set:function(n,r){if(!t(n))throw new Error("Can only set raw "+e+" value of a "+e+" node");n.dom.nodeValue=r}}}(Qt,"text"),Xn=function(t){return qn.get(t)},Yn=function(t){return qn.getOption(t)},Jn=function(t,e){return qn.set(t,e)},Qn=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];function Zn(){return{up:m({selector:Se,closest:Ee,predicate:Oe,all:ie}),down:m({selector:we,predicate:be}),styles:m({get:Ue,getRaw:$e,set:He,remove:Ge}),attrs:m({get:Ae,set:Te,remove:Re,copyTo:function(t,e){var n=Ie(t);De(e,n)}}),insert:m({before:Bn,after:Fn,afterAll:Un,append:Hn,appendAll:Wn,prepend:Nn,wrap:Vn}),remove:m({unwrap:Kn,remove:Gn}),create:m({nu:xt.fromTag,clone:function(t){return xt.fromDom(t.dom.cloneNode(!1))},text:xt.fromText}),query:m({comparePosition:function(t,e){return t.dom.compareDocumentPosition(e.dom)},prevSibling:ae,nextSibling:ue}),property:m({children:ce,name:Kt,parent:oe,document:function(t){return re(t).dom},isText:Qt,isComment:Yt,isElement:Jt,isSpecial:function(t){var e=Kt(t);return T(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],e)},getLanguage:function(t){return Jt(t)?Pe(t,"lang"):C.none()},getText:Xn,setText:Jn,isBoundary:function(t){return!!Jt(t)&&("body"===Kt(t)||T(Qn,Kt(t)))},isEmptyTag:function(t){return!!Jt(t)&&T(["br","img","hr","input"],Kt(t))},isNonEditable:function(t){return Jt(t)&&"false"===Ae(t,"contenteditable")}}),eq:kt,is:Tt}}var tr,er,nr=function(t,e,n,r){var o=e(t,n);return L(r,(function(n,r){var o=e(t,r);return rr(t,n,o)}),o)},rr=function(t,e,n){return e.bind((function(e){return n.filter(g(t.eq,e))}))},or=function(t,e,n){return n.length>0?function(t,e,n,r){return r(t,e,n[0],n.slice(1))}(t,e,n,nr):C.none()},ir=function(t,e,n,r){void 0===r&&(r=_);var o=[e].concat(t.up().all(e)),i=[n].concat(t.up().all(n)),a=function(t){return F(t,r).fold((function(){return t}),(function(e){return t.slice(0,e+1)}))},u=a(o),c=a(i),s=B(u,(function(e){return D(c,function(t,e){return g(t.eq,e)}(t,e))}));return{firstpath:u,secondpath:c,shared:s}},ar=Zn(),ur=function(t,e){return or(ar,(function(e,n){return t(n)}),e)},cr=function(t){return Se(t,"table")},sr=function(t,e,n){var r=function(t){return function(e){return void 0!==n&&n(e)||kt(e,t)}};return kt(t,e)?C.some({boxes:C.some([t]),start:t,finish:e}):cr(t).bind((function(o){return cr(e).bind((function(i){if(kt(o,i))return C.some({boxes:zn(o,t,e),start:t,finish:e});if(Mt(o,i)){var a=(u=ye(e,"td,th",r(o))).length>0?u[u.length-1]:e;return C.some({boxes:Ln(o,t,o,e,i),start:t,finish:a})}if(Mt(i,o)){var u,c=(u=ye(t,"td,th",r(i))).length>0?u[u.length-1]:t;return C.some({boxes:Ln(i,t,o,e,i),start:t,finish:c})}return function(t,e,n){return ir(ar,t,e,n)}(t,e).shared.bind((function(a){return Ee(a,"table",n).bind((function(n){var a=ye(e,"td,th",r(n)),u=a.length>0?a[a.length-1]:e,c=ye(t,"td,th",r(n)),s=c.length>0?c[c.length-1]:t;return C.some({boxes:Ln(n,t,o,e,i),start:s,finish:u})}))}))}))}))},lr=function(t,e){var n=we(t,e);return n.length>0?C.some(n):C.none()},fr=function(t,e,n){return ke(t,e).bind((function(e){return ke(t,n).bind((function(t){return ur(cr,[e,t]).map((function(n){return{first:e,last:t,table:n}}))}))}))},dr=function(t,e,n,r,o){return function(t,e){return B(t,(function(t){return Ot(t,e)}))}(t,o).bind((function(t){return In(t,e,n).bind((function(t){return function(t,e){return Se(t,"table").bind((function(n){return ke(n,e).bind((function(e){return sr(e,t).bind((function(t){return t.boxes.map((function(e){return{boxes:e,start:t.start,finish:t.finish}}))}))}))}))}(t,r)}))}))},mr=function(t,e){return lr(t,e)},pr=function(t,e,n){return fr(t,e,n).bind((function(e){var n=function(e){return kt(t,e)},r=Se(e.first,"thead,tfoot,tbody,table",n),o=Se(e.last,"thead,tfoot,tbody,table",n);return r.bind((function(t){return o.bind((function(n){return kt(t,n)?function(t,e,n){var r=jn(t);return An(r,e,n)}(e.table,e.first,e.last):C.none()}))}))}))},hr=function(t){if(!i(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};return R(t,(function(r,o){var a=Dt(r);if(1!==a.length)throw new Error("one and only one name per case");var u=a[0],c=r[u];if(void 0!==n[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!i(c))throw new Error("case arguments must be an array");e.push(u),n[u]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==c.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+c.length+" ("+c+"), got "+i);var a=function(t){var r=Dt(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));if(!V(e,(function(t){return T(r,t)})))throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[u].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:a,log:function(t){}}}})),n},gr=hr([{none:[]},{multiple:["elements"]},{single:["element"]}]),vr=function(t,e,n,r){return t.fold(e,n,r)},br=gr.none,yr=gr.multiple,_r=gr.single,wr=tinymce.util.Tools.resolve("tinymce.PluginManager"),xr=function(t,e){return xt.fromDom(t.dom.cloneNode(e))},Or=function(t){return xr(t,!1)},Sr=function(t){return xr(t,!0)},Cr=function(t,e){var n=xt.fromTag(e),r=Ie(t);return De(n,r),n},kr=function(t,e){var n=function(n){var r=e(n);if(r<=0||null===r){var o=Ue(n,t);return parseFloat(o)||0}return r},r=function(t,e){return j(e,(function(e,n){var r=Ue(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)};return{set:function(e,n){if(!f(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom;Fe(r)&&(r.style[t]=n+"px")},get:n,getOuter:n,aggregate:r,max:function(t,e,n){var o=r(t,n);return e>o?e-o:0}}},Er=function(){var t=_t().browser;return t.isIE()||t.isEdge()},Mr=function(t,e){return function(t){var e=parseFloat(t);return isNaN(e)?C.none():C.some(e)}(t).getOr(e)},Tr=function(t,e,n){return Mr(Ue(t,e),n)},Dr=function(t){return Ue(t,"box-sizing")},Ar=function(t,e,n,r){return e-Tr(t,"padding-"+n,0)-Tr(t,"padding-"+r,0)-Tr(t,"border-"+n+"-width",0)-Tr(t,"border-"+r+"-width",0)},Pr=function(t,e){var n=t.dom,r=n.getBoundingClientRect().width||n.offsetWidth;return"border-box"===e?r:Ar(t,r,"left","right")},Rr=kr("width",(function(t){return t.dom.offsetWidth})),Ir=function(t){return Rr.get(t)},zr=function(t){return Rr.getOuter(t)},Lr=function(t){return Pr(t,"content-box")},jr=function(t){return Er()?Pr(t,Dr(t)):Tr(t,"width",t.dom.offsetWidth)},Br=function(t,e){void 0===e&&(e=w);var n=t.grid,r=A(n.columns,p),o=A(n.rows,p);return P(r,(function(n){return Fr((function(){return H(o,(function(e){return En.getAt(t,e,n).filter((function(t){return t.column===n})).toArray()}))}),(function(t){return 1===t.colspan&&e(t.element)}),(function(){return En.getAt(t,0,n)}))}))},Fr=function(t,e,n){var r=t();return B(r,e).orThunk((function(){return C.from(r[0]).orThunk(n)})).map((function(t){return t.element}))},Nr=function(t){var e=t.grid,n=A(e.rows,p),r=A(e.columns,p);return P(n,(function(e){return Fr((function(){return H(r,(function(n){return En.getAt(t,e,n).filter((function(t){return t.row===e})).fold(m([]),(function(t){return[t]}))}))}),(function(t){return 1===t.rowspan}),(function(){return En.getAt(t,e,0)}))}))},Hr=function(t,e){if(e<0||e>=t.length-1)return C.none();var n=t[e].fold((function(){var n=function(t){var e=k.call(t,0);return e.reverse(),e}(t.slice(0,e));return q(n,(function(t,e){return t.map((function(t){return{value:t,delta:e+1}}))}))}),(function(t){return C.some({value:t,delta:0})})),r=t[e+1].fold((function(){var n=t.slice(e+1);return q(n,(function(t,e){return t.map((function(t){return{value:t,delta:e+1}}))}))}),(function(t){return C.some({value:t,delta:1})}));return n.bind((function(t){return r.map((function(e){var n=e.delta+t.delta;return Math.abs(e.value-t.value)/n}))}))},Vr=function(t,e){return function(n){return"rtl"===Ur(n)?e:t}},Ur=function(t){return"rtl"===Ue(t,"direction")?"rtl":"ltr"},Wr=kr("height",(function(t){var e=t.dom;return ge(t)?e.getBoundingClientRect().height:e.offsetHeight})),$r=function(t){return Wr.get(t)},Gr=function(t){return Wr.getOuter(t)},Kr=function(t){return Er()?function(t,e){var n=t.dom,r=n.getBoundingClientRect().height||n.offsetHeight;return"border-box"===e?r:Ar(t,r,"top","bottom")}(t,Dr(t)):Tr(t,"height",t.dom.offsetHeight)},qr=function(t,e){return{left:t,top:e,translate:function(n,r){return qr(t+n,e+r)}}},Xr=qr,Yr=function(t,e){return void 0!==t?t:void 0!==e?e:0},Jr=function(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return Xr(n.offsetLeft,n.offsetTop);var i=Yr(null==r?void 0:r.pageYOffset,o.scrollTop),a=Yr(null==r?void 0:r.pageXOffset,o.scrollLeft),u=Yr(o.clientTop,n.clientTop),c=Yr(o.clientLeft,n.clientLeft);return Qr(t).translate(a-c,i-u)},Qr=function(t){var e=t.dom,n=e.ownerDocument.body;return n===e?Xr(n.offsetLeft,n.offsetTop):ge(t)?function(t){var e=t.getBoundingClientRect();return Xr(e.left,e.top)}(e):Xr(0,0)},Zr=function(t,e){return{row:t,y:e}},to=function(t,e){return{col:t,x:e}},eo=function(t){return Jr(t).left+zr(t)},no=function(t){return Jr(t).left},ro=function(t,e){return to(t,no(e))},oo=function(t,e){return to(t,eo(e))},io=function(t){return Jr(t).top},ao=function(t,e){return Zr(t,io(e))},uo=function(t,e){return Zr(t,io(e)+Gr(e))},co=function(t,e,n){if(0===n.length)return[];var r=P(n.slice(1),(function(e,n){return e.map((function(e){return t(n,e)}))})),o=n[n.length-1].map((function(t){return e(n.length-1,t)}));return r.concat([o])},so={delta:p,positions:function(t){return co(ao,uo,t)},edge:io},lo={delta:p,edge:no,positions:function(t){return co(ro,oo,t)}},fo={delta:function(t){return-t},edge:eo,positions:function(t){return co(oo,ro,t)}},mo=Vr(lo,fo),po={delta:function(t,e){return mo(e).delta(t,e)},positions:function(t,e){return mo(e).positions(t,e)},edge:function(t){return mo(t).edge(t)}},ho={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},go=(tr=function(t){return"(?:"+t+")?"},er=["Infinity","[0-9]+\\."+tr("[0-9]+")+tr("[eE][+-]?[0-9]+"),"\\.[0-9]+"+tr("[eE][+-]?[0-9]+"),"[0-9]+"+tr("[eE][+-]?[0-9]+")].join("|"),new RegExp("^([+-]?(?:"+er+"))(.*)$")),vo=function(t,e){return C.from(go.exec(t)).bind((function(t){var n=Number(t[1]),r=t[2];return function(t,e){return D(e,(function(e){return D(ho[e],(function(e){return t===e}))}))}(r,e)?C.some({value:n,unit:r}):C.none()}))},bo=/(\d+(\.\d+)?)%/,yo=/(\d+(\.\d+)?)px|em/,_o=ee("col"),wo=function(t,e,n){var r,o=(r=t,C.from(r.dom.parentElement).map(xt.fromDom)).getOrThunk((function(){return ve(ne(t))}));return e(t)/n(o)*100},xo=function(t,e){He(t,"width",e+"px")},Oo=function(t,e){He(t,"width",e+"%")},So=function(t,e){He(t,"height",e+"px")},Co=function(t,e,n,r){var o=parseFloat(t);return it(t,"%")&&"table"!==Kt(e)?function(t,e,n,r){var o=an(t).map((function(t){var r=n(t);return Math.floor(e/100*r)})).getOr(e);return r(t,o),o}(e,o,n,r):o},ko=function(t){var e=function(t){return Kr(t)+"px"}(t);return e?Co(e,t,$r,So):$r(t)},Eo=function(t,e){return $e(t,e).orThunk((function(){return Pe(t,e).map((function(t){return t+"px"}))}))},Mo=function(t){return Eo(t,"width")},To=function(t){return wo(t,Ir,Lr)},Do=function(t){return _o(t)?Ir(t):jr(t)},Ao=function(t){return function(t,e,n){return n(t)/qe(t,e)}(t,"rowspan",ko)},Po=function(t,e,n){He(t,"width",e+n)},Ro=function(t){return wo(t,Ir,Lr)+"%"},Io=m(bo),zo=ee("col"),Lo=function(t){return Mo(t).getOrThunk((function(){return Do(t)+"px"}))},jo=function(t){return(e=t,Eo(e,"height")).getOrThunk((function(){return Ao(t)+"px"}));var e},Bo=function(t,e,n,r,o,i){return t.filter(r).fold((function(){return i(Hr(n,e))}),(function(t){return o(t)}))},Fo=function(t,e,n,r){var o=Br(t),i=En.hasColumns(t)?function(t){return P(En.justColumns(t),(function(t){return C.from(t.element)}))}(t):o,a=[C.some(po.edge(e))].concat(P(po.positions(o,e),(function(t){return t.map((function(t){return t.x}))}))),u=y(Xe);return P(i,(function(t,e){return Bo(t,e,a,u,(function(t){if(function(t){var e=_t().browser,n=e.isChrome()||e.isFirefox();return!zo(t)||n}(t))return n(t);var i,c,s=(i=o[e],c=p,null!=i?c(i):C.none());return Bo(s,e,a,u,(function(t){return r(C.some(Ir(t)))}),r)}),r)}))},No=function(t){return t.map((function(t){return t+"px"})).getOr("")},Ho=function(t,e,n){return Fo(t,e,Do,(function(t){return t.getOrThunk(n.minCellWidth)}))},Vo=function(t,e,n,r,o){var i=Nr(t),a=[C.some(n.edge(e))].concat(P(n.positions(i,e),(function(t){return t.map((function(t){return t.y}))})));return P(i,(function(t,e){return Bo(t,e,a,y(Ye),r,o)}))},Uo=function(t,e){return function(){return ge(t)?e(t):parseFloat($e(t,"width").getOr("0"))}},Wo=function(t){var e=Uo(t,Ir),n=m(0);return{width:e,pixelWidth:e,getWidths:function(e,n){return Ho(e,t,n)},getCellDelta:n,singleColumnWidth:m([0]),minCellWidth:n,setElementWidth:d,adjustTableWidth:d,isRelative:!0,label:"none"}},$o=function(t){var e=Uo(t,(function(t){return parseFloat(Ro(t))})),n=Uo(t,Ir);return{width:e,pixelWidth:n,getWidths:function(e,n){return function(t,e,n){return Fo(t,e,To,(function(t){return t.fold((function(){return n.minCellWidth()}),(function(t){return t/n.pixelWidth()*100}))}))}(e,t,n)},getCellDelta:function(t){return t/n()*100},singleColumnWidth:function(t,e){return[100-t]},minCellWidth:function(){return Qe()/n()*100},setElementWidth:Oo,adjustTableWidth:function(n){var r=e();Oo(t,r+n/100*r)},isRelative:!0,label:"percent"}},Go=function(t){var e=Uo(t,Ir);return{width:e,pixelWidth:e,getWidths:function(e,n){return Ho(e,t,n)},getCellDelta:p,singleColumnWidth:function(t,e){return[Math.max(Qe(),t+e)-t]},minCellWidth:Qe,setElementWidth:xo,adjustTableWidth:function(n){var r=e()+n;xo(t,r)},isRelative:!1,label:"pixel"}},Ko=function(t){return Mo(t).fold((function(){return Wo(t)}),(function(e){return function(t,e){return null!==Io().exec(e)?$o(t):Go(t)}(t,e)}))},qo=Go,Xo=$o,Yo=function(t,e,n){var r=t[n].element,o=xt.fromTag("td");Hn(o,xt.fromTag("br")),(e?Hn:Nn)(r,o)},Jo=function(t,e){var n=function(t){return Ot(t.element,e)},r=Sr(t),o=fn(r),i=Ko(t),a=En.generate(o),u=function(t,e){var n=t.grid.columns,r=t.grid.rows,o=n,i=0,a=0,u=[],c=[];return Pt(t.access,(function(t){if(u.push(t),e(t)){c.push(t);var n=t.row,s=n+t.rowspan-1,l=t.column,f=l+t.colspan-1;n<r?r=n:s>i&&(i=s),l<o?o=l:f>a&&(a=f)}})),function(t,e,n,r,o,i){return{minRow:t,minCol:e,maxRow:n,maxCol:r,allCells:o,selectedCells:i}}(r,o,i,a,u,c)}(a,n),c="th:not("+e+"),td:not("+e+")",s=en(r,"th,td",(function(t){return Ot(t,c)}));return R(s,Gn),function(t,e,n,r){for(var o=e.grid.columns,i=e.grid.rows,a=0;a<i;a++)for(var u=!1,c=0;c<o;c++){if(!(a<n.minRow||a>n.maxRow||c<n.minCol||c>n.maxCol))En.getAt(e,a,c).filter(r).isNone()?Yo(t,u,a):u=!0}}(o,a,u,n),function(t,e,n,r){Pt(n.columns,(function(t){(t.column<e.minCol||t.column>e.maxCol)&&Gn(t.element)}));var o=z(tn(t,"tr"),(function(t){return 0===t.dom.childElementCount}));R(o,Gn),e.minCol!==e.maxCol&&e.minRow!==e.maxRow||R(tn(t,"th,td"),(function(t){Re(t,"rowspan"),Re(t,"colspan")})),Re(t,wn),Re(t,"data-snooker-col-series"),Ko(t).adjustTableWidth(r)}(r,u,a,function(t,e,n,r){if(0===r.minCol&&e.grid.columns===r.maxCol+1)return 0;var o=Ho(e,t,n),i=j(o,(function(t,e){return t+e}),0),a=j(o.slice(r.minCol,r.maxCol+1),(function(t,e){return t+e}),0)/i*n.pixelWidth()-n.pixelWidth();return n.getCellDelta(a)}(t,En.fromTable(t),i,u)),r},Qo=function(t){return"img"===Kt(t)?1:Yn(t).fold((function(){return ce(t).length}),(function(t){return t.length}))},Zo=["img","br"],ti=function(t){return Yn(t).filter((function(t){return 0!==t.trim().length||t.indexOf(" ")>-1})).isSome()||T(Zo,Kt(t))},ei=function(t){return e=ti,(n=function(t){for(var r=0;r<t.childNodes.length;r++){var o=xt.fromDom(t.childNodes[r]);if(e(o))return C.some(o);var i=n(t.childNodes[r]);if(i.isSome())return i}return C.none()})(t.dom);var e,n},ni=function(t){return ri(t,ti)},ri=function(t,e){var n=function(t){for(var r=ce(t),o=r.length-1;o>=0;o--){var i=r[o];if(e(i))return C.some(i);var a=n(i);if(a.isSome())return a}return C.none()};return n(t)},oi={scope:["row","col"]},ii=function(t){return function(){var e=xt.fromTag("td",t.dom);return Hn(e,xt.fromTag("br",t.dom)),e}},ai=function(t){return function(){return xt.fromTag("col",t.dom)}},ui=function(t){return function(){return xt.fromTag("colgroup",t.dom)}},ci=function(t){return function(){return xt.fromTag("tr",t.dom)}},si=function(t,e,n){var r=function(t,e){var n=Cr(t,e),r=ce(Sr(t));return Wn(n,r),n}(t,e);return Pt(n,(function(t,e){null===t?Re(r,e):Te(r,e,t)})),r},li=function(t){return t},fi=function(t,e,n){var r=function(t,e){var n,r,o,i;n=t.element,r=e,o=n.dom,i=r.dom,Fe(o)&&Fe(i)&&(i.style.cssText=o.style.cssText),Ge(e,"height"),1!==t.colspan&&Ge(e,"width")};return{col:function(n){var o=xt.fromTag(Kt(n.element),e.dom);return r(n,o),t(n.element,o),o},colgroup:ui(e),row:ci(e),cell:function(o){var i=xt.fromTag(Kt(o.element),e.dom),a=n.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),u=a.length>0?function(t,e,n){return ei(t).map((function(r){var o=n.join(","),i=ye(r,o,(function(e){return kt(e,t)}));return L(i,(function(t,e){var n=Or(e);return Re(n,"contenteditable"),Hn(t,n),n}),e)})).getOr(e)}(o.element,i,a):i;return Hn(u,xt.fromTag("br")),r(o,i),function(t,e){Pt(oi,(function(n,r){return Pe(t,r).filter((function(t){return T(n,t)})).each((function(t){return Te(e,r,t)}))}))}(o.element,i),t(o.element,i),i},replace:si,colGap:ai(e),gap:ii(e)}},di=function(t){return{col:ai(t),colgroup:ui(t),row:ci(t),cell:ii(t),replace:li,colGap:ai(t),gap:ii(t)}},mi=function(t){return P(t,xt.fromDom)},pi=function(t){return xt.fromDom(t.getBody())},hi=function(t){return t.getBoundingClientRect().width},gi=function(t){return t.getBoundingClientRect().height},vi=function(t){return function(e){return kt(e,pi(t))}},bi=function(t){return/^\d+(\.\d+)?$/.test(t)?t+"px":t},yi=function(t){Re(t,"data-mce-style");var e=function(t){return Re(t,"data-mce-style")};R(rn(t),e),R(on(t),e),R(un(t),e)},_i=function(t){return xt.fromDom(t.selection.getStart())},wi=function(t){return vr(t.get(),m([]),p,W)},xi=function(t){var e=function(t,e){return Pe(t,e).exists((function(t){return parseInt(t,10)>1}))},n=wi(t);return n.length>0&&V(n,(function(t){return e(t,"rowspan")||e(t,"colspan")}))?C.some(n):C.none()},Oi=function(t,e,n){return vr(e.get(),C.none,(function(e){return e.length<=1?C.none():pr(t,n.firstSelectedSelector,n.lastSelectedSelector).map((function(t){return{bounds:t,cells:e}}))}),C.none)},Si={selected:"data-mce-selected",selectedSelector:"td[data-mce-selected],th[data-mce-selected]",firstSelected:"data-mce-first-selected",firstSelectedSelector:"td[data-mce-first-selected],th[data-mce-first-selected]",lastSelected:"data-mce-last-selected",lastSelectedSelector:"td[data-mce-last-selected],th[data-mce-last-selected]"},Ci=function(t,e,n){return{element:n,mergable:Oi(e,t,Si),unmergable:xi(t),selection:wi(t)}},ki=function(t){return function(e,n){var r,o=Kt(e),i="col"===o||"colgroup"===o?an(r=e).bind((function(t){return mr(t,Si.firstSelectedSelector)})).fold(m(r),(function(t){return t[0]})):e;return Ee(i,t,n)}},Ei=ki("th,td,caption"),Mi=ki("th,td"),Ti=function(t){return wi(t)},Di=function(t,e,n){t.on("BeforeGetContent",(function(n){!0===n.selection&&vr(e.get(),d,(function(e){n.preventDefault(),function(t){return an(t[0]).map((function(t){var e=Jo(t,"[data-mce-selected]");return yi(e),[e]}))}(e).each((function(e){n.content="text"===n.format?function(t){return P(t,(function(t){return t.dom.innerText})).join("")}(e):function(t,e){return P(e,(function(e){return t.selection.serializer.serialize(e.dom,{})})).join("")}(t,e)}))}),d)})),t.on("BeforeSetContent",(function(r){if(!0===r.selection&&!0===r.paste){var o=Ti(e);G(o).each((function(e){an(e).each((function(o){var i,a,u,c=z((i=r.content,(u=(a||document).createElement("div")).innerHTML=i,ce(xt.fromDom(u))),(function(t){return"meta"!==Kt(t)})),s=ee("table");if(1===c.length&&s(c[0])){r.preventDefault();var l=xt.fromDom(t.getDoc()),f=di(l),d=function(t,e,n){return{element:t,clipboard:e,generators:n}}(e,c[0],f);n.pasteCells(o,d).each((function(){t.focus()}))}}))}))}}))},Ai=hr([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}]),Pi=X({},Ai),Ri=function(t,e,n,r,o){var i=t.slice(0),a=function(t,e){return 0===t.length?Pi.none():1===t.length?Pi.only(0):0===e?Pi.left(0,1):e===t.length-1?Pi.right(e-1,e):e>0&&e<t.length-1?Pi.middle(e-1,e,e+1):Pi.none()}(t,e),u=m(P(i,m(0)));return a.fold(u,(function(t){return r.singleColumnWidth(i[t],n)}),(function(t,e){return o.calcLeftEdgeDeltas(i,t,e,n,r.minCellWidth(),r.isRelative)}),(function(t,e,a){return o.calcMiddleDeltas(i,t,e,a,n,r.minCellWidth(),r.isRelative)}),(function(t,e){return o.calcRightEdgeDeltas(i,t,e,n,r.minCellWidth(),r.isRelative)}))},Ii=function(t,e,n){for(var r=0,o=t;o<e;o++)r+=void 0!==n[o]?n[o]:0;return r},zi=function(t,e){var n=En.justCells(t);return P(n,(function(t){var n=Ii(t.row,t.row+t.rowspan,e);return{element:t.element,height:n,rowspan:t.rowspan}}))},Li=function(t,e){return En.hasColumns(t)?function(t,e){var n=En.justColumns(t);return P(n,(function(t,n){return{element:t.element,width:e[n],colspan:t.colspan}}))}(t,e):function(t,e){var n=En.justCells(t);return P(n,(function(t){var n=Ii(t.column,t.column+t.colspan,e);return{element:t.element,width:n,colspan:t.colspan}}))}(t,e)},ji=function(t,e,n){var r=Li(t,e);R(r,(function(t){n.setElementWidth(t.element,t.width)}))},Bi=function(t,e,n,r,o){var i=En.fromTable(t),a=o.getCellDelta(e),u=o.getWidths(i,o),c=n===i.grid.columns-1,s=r.clampTableDelta(u,n,a,o.minCellWidth(),c),l=Ri(u,n,s,o,r),f=P(l,(function(t,e){return t+u[e]}));ji(i,f,o),r.resizeTable(o.adjustTableWidth,s,c)},Fi=function(t,e,n,r){var o=En.fromTable(t),i=function(t,e,n){return Vo(t,e,n,Ao,(function(t){return t.getOrThunk(Ze)}))}(o,t,r),a=P(i,(function(t,r){return n===r?Math.max(e+t,Ze()):t})),u=zi(o,a),c=function(t,e){return P(t.all,(function(t,n){return{element:t.element,height:e[n]}}))}(o,a);R(c,(function(t){So(t.element,t.height)})),R(u,(function(t){So(t.element,t.height)}));var s=L(a,(function(t,e){return t+e}),0);So(t,s)},Ni=function(t){return P(t,m(0))},Hi=function(t,e,n,r,o){return o(t.slice(0,e)).concat(r).concat(o(t.slice(n)))},Vi=function(t){return function(e,n,r,o){if(t(r)){var i=Math.max(o,e[n]-Math.abs(r)),a=Math.abs(i-e[n]);return r>=0?a:-a}return r}},Ui=Vi((function(t){return t<0})),Wi=Vi(w),$i=function(){var t=function(t,e,n,r){var o=(100+n)/100,i=Math.max(r,(t[e]+n)/o);return P(t,(function(t,n){return(n===e?i:t/o)-t}))},e=function(e,n,r,o,i,a){return a?t(e,n,o,i):function(t,e,n,r,o){var i=Ui(t,e,r,o);return Hi(t,e,n+1,[i,0],Ni)}(e,n,r,o,i)};return{resizeTable:function(t,e){return t(e)},clampTableDelta:Ui,calcLeftEdgeDeltas:e,calcMiddleDeltas:function(t,n,r,o,i,a,u){return e(t,r,o,i,a,u)},calcRightEdgeDeltas:function(e,n,r,o,i,a){if(a)return t(e,r,o,i);var u=Ui(e,r,o,i);return Ni(e.slice(0,r)).concat([u])},calcRedestributedWidths:function(t,e,n,r){if(r){var o=(e+n)/e,i=P(t,(function(t){return t/o}));return{delta:100*o-100,newSizes:i}}return{delta:n,newSizes:t}}}},Gi=function(){var t=function(t,e,n,r,o){var i=Wi(t,r>=0?n:e,r,o);return Hi(t,e,n+1,[i,-i],Ni)};return{resizeTable:function(t,e,n){n&&t(e)},clampTableDelta:function(t,e,n,r,o){if(o){if(n>=0)return n;var i=j(t,(function(t,e){return t+e-r}),0);return Math.max(-i,n)}return Ui(t,e,n,r)},calcLeftEdgeDeltas:t,calcMiddleDeltas:function(e,n,r,o,i,a){return t(e,r,o,i,a)},calcRightEdgeDeltas:function(t,e,n,r,o,i){if(i)return Ni(t);var a=r/t.length;return P(t,m(a))},calcRedestributedWidths:function(t,e,n,r){return{delta:0,newSizes:t}}}},Ki=function(t,e){var n=C.from(t.dom.documentElement).map(xt.fromDom).getOr(t);return{parent:m(n),view:m(t),origin:m(Xr(0,0)),isResizable:e}},qi=function(t,e,n){return{parent:m(e),view:m(t),origin:m(Xr(0,0)),isResizable:n}},Xi=hr([{invalid:["raw"]},{pixels:["value"]},{percent:["value"]}]),Yi=function(t,e,n){var r=n.substring(0,n.length-t.length),o=parseFloat(r);return r===o.toString()?e(o):Xi.invalid(n)},Ji=X(X({},Xi),{from:function(t){return it(t,"%")?Yi("%",Xi.percent,t):it(t,"px")?Yi("px",Xi.pixels,t):Xi.invalid(t)}}),Qi=function(t,e,n){return t.fold((function(){return e}),(function(t){return function(t,e,n){var r=n/e;return P(t,(function(t){return Ji.from(t).fold((function(){return t}),(function(t){return t*r+"px"}),(function(t){return t/100*n+"px"}))}))}(e,n,t)}),(function(t){return function(t,e){return P(t,(function(t){return Ji.from(t).fold((function(){return t}),(function(t){return t/e*100+"%"}),(function(t){return t+"%"}))}))}(e,n)}))},Zi=function(t,e,n){var r=Ji.from(n),o=V(t,(function(t){return"0px"===t}))?function(t,e){var n=t.fold((function(){return m("")}),(function(t){return m(t/e+"px")}),(function(){return m(100/e+"%")}));return A(e,n)}(r,t.length):Qi(r,t,e);return na(o)},ta=function(t,e){return 0===t.length?e:L(t,(function(t,e){return Ji.from(e).fold(m(0),p,p)+t}),0)},ea=function(t,e){return Ji.from(t).fold(m(t),(function(t){return t+e+"px"}),(function(t){return t+e+"%"}))},na=function(t){if(0===t.length)return t;var e=L(t,(function(t,e){var n=Ji.from(e).fold((function(){return{value:e,remainder:0}}),(function(t){return function(t,e){var n=Math.floor(t);return{value:n+e,remainder:t-n}}(t,"px")}),(function(t){return{value:t+"%",remainder:0}}));return{output:[n.value].concat(t.output),remainder:t.remainder+n.remainder}}),{output:[],remainder:0}),n=e.output;return n.slice(0,n.length-1).concat([ea(n[n.length-1],Math.round(e.remainder))])},ra=Ji.from,oa=function(t){return ra(t).fold(m("px"),m("px"),m("%"))},ia=function(t,e,n){var r=En.fromTable(t),o=r.all,i=En.justCells(r),a=En.justColumns(r);e.each((function(e){var n=oa(e),o=Ir(t),u=function(t,e){return Fo(t,e,Lo,No)}(r,t),c=Zi(u,o,e);En.hasColumns(r)?function(t,e,n){R(e,(function(e,r){var o=ta([t[r]],Qe());He(e.element,"width",o+n)}))}(c,a,n):function(t,e,n){R(e,(function(e){var r=t.slice(e.column,e.colspan+e.column),o=ta(r,Qe());He(e.element,"width",o+n)}))}(c,i,n),He(t,"width",e)})),n.each((function(e){var n=oa(e),a=$r(t),u=function(t,e,n){return Vo(t,e,n,jo,No)}(r,t,so);!function(t,e,n,r){R(n,(function(e){var n=t.slice(e.row,e.rowspan+e.row),o=ta(n,Ze());He(e.element,"height",o+r)})),R(e,(function(e,n){He(e.element,"height",t[n])}))}(Zi(u,a,e),o,i,n),He(t,"height",e)}))},aa=function(t){return Mo(t).exists((function(t){return bo.test(t)}))},ua=function(t){return Mo(t).exists((function(t){return yo.test(t)}))},ca=function(t){return Mo(t).isNone()},sa=function(t){return En.fromTable(t).grid},la=function(t){var e=[];return{bind:function(t){if(void 0===t)throw new Error("Event bind error: undefined handler");e.push(t)},unbind:function(t){e=z(e,(function(e){return e!==t}))},trigger:function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o={};R(t,(function(t,e){o[t]=n[e]})),R(e,(function(t){t(o)}))}}},fa=function(t){return{registry:Rt(t,(function(t){return{bind:t.bind,unbind:t.unbind}})),trigger:Rt(t,(function(t){return t.trigger}))}},da=function(t){return t.slice(0).sort()},ma=function(t,e,n){if(0===e.length)throw new Error("You must specify at least one required field.");var o;return function(t,e){if(!i(e))throw new Error("The "+t+" fields must be an array. Was: "+e+".");R(e,(function(e){if(!r(e))throw new Error("The value "+e+" in the "+t+" fields was not a string.")}))}("required",e),o=da(e),B(o,(function(t,e){return e<o.length-1&&t===o[e+1]})).each((function(t){throw new Error("The field: "+t+" occurs more than once in the combined fields: ["+o.join(", ")+"].")})),function(r){var o=Dt(r);V(e,(function(t){return T(o,t)}))||function(t,e){throw new Error("All required keys ("+da(t).join(", ")+") were not specified. Specified keys were: "+da(e).join(", ")+".")}(e,o),t(e,o);var i=z(e,(function(t){return!n.validate(r[t],t)}));return i.length>0&&function(t,e){throw new Error("All values need to be of type: "+e+". Keys ("+da(t).join(", ")+") were not.")}(i,n.label),r}},pa=function(t,e){var n=z(e,(function(e){return!T(t,e)}));n.length>0&&function(t){throw new Error("Unsupported keys for object: "+da(t).join(", "))}(n)},ha=function(t){return function(t,e){return ma(t,e,{validate:l,label:"function"})}(pa,t)},ga=ha(["compare","extract","mutate","sink"]),va=ha(["element","start","stop","destroy"]),ba=ha(["forceDrop","drop","move","delayDrop"]),ya=function(){var t=C.none(),e=fa({move:la(["info"])});return{onEvent:function(n,r){r.extract(n).each((function(n){(function(e,n){var r=t.map((function(t){return e.compare(t,n)}));return t=C.some(n),r})(r,n).each((function(t){e.trigger.move(t)}))}))},reset:function(){t=C.none()},events:e.registry}},_a=function(){var t,e=(t=fa({move:la(["info"])}),{onEvent:d,reset:d,events:t.registry}),n=ya(),r=e;return{on:function(){r.reset(),r=n},off:function(){r.reset(),r=e},isOn:function(){return r===n},onEvent:function(t,e){r.onEvent(t,e)},events:n.events}},wa=function(t,e,n){var r,o,i,u,c=!1,s=fa({start:la([]),stop:la([])}),l=_a(),f=function(){p.stop(),l.isOn()&&(l.off(),s.trigger.stop())},d=(r=f,o=200,i=null,{cancel:u=function(){a(i)||(clearTimeout(i),i=null)},throttle:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];u(),i=setTimeout((function(){i=null,r.apply(null,t)}),o)}});l.events.move.bind((function(n){e.mutate(t,n.info)}));var m=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];c&&t.apply(null,e)}},p=e.sink(ba({forceDrop:f,drop:m(f),move:m((function(t){d.cancel(),l.onEvent(t,e)})),delayDrop:m(d.throttle)}),n);return{element:p.element,go:function(t){p.start(t),l.on(),s.trigger.start()},on:function(){c=!0},off:function(){c=!1},destroy:function(){p.destroy()},events:s.registry}},xa=function(t){var e,n,r=xt.fromDom(function(t){if(fe()&&s(t.target)){var e=xt.fromDom(t.target);if(Jt(e)&&he(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return G(n)}}return C.from(t.target)}(t).getOr(t.target)),o=function(){return t.stopPropagation()},i=function(){return t.preventDefault()},a=(e=i,n=o,function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e(n.apply(null,t))});return function(t,e,n,r,o,i,a){return{target:t,x:e,y:n,stop:r,prevent:o,kill:i,raw:a}}(r,t.clientX,t.clientY,o,i,a,t)},Oa=function(t,e,n,r,o){var i=function(t,e){return function(n){t(n)&&e(xa(n))}}(n,r);return t.dom.addEventListener(e,i,o),{unbind:g(Sa,t,e,i,o)}},Sa=function(t,e,n,r){t.dom.removeEventListener(e,n,r)},Ca=w,ka=function(t,e,n){return function(t,e,n,r){return Oa(t,e,n,r,!1)}(t,e,Ca,n)},Ea=xa,Ma=function(t,e){var n=Ae(t,e);return void 0===n||""===n?[]:n.split(" ")},Ta=function(t){return void 0!==t.dom.classList},Da=function(t,e){return function(t,e,n){var r=Ma(t,e).concat([n]);return Te(t,e,r.join(" ")),!0}(t,"class",e)},Aa=function(t,e){Ta(t)?t.dom.classList.add(e):Da(t,e)},Pa=function(t,e){return Ta(t)&&t.dom.classList.contains(e)},Ra=function(t){var e=t.replace(/\./g,"-");return{resolve:function(t){return e+"-"+t}}},Ia=Ra("ephox-dragster"),za=Ia.resolve,La=ga({compare:function(t,e){return Xr(e.left-t.left,e.top-t.top)},extract:function(t){return C.some(Xr(t.x,t.y))},sink:function(t,e){var n=function(t){var e=X({layerClass:za("blocker")},t),n=xt.fromTag("div");Te(n,"role","presentation"),Ve(n,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),Aa(n,za("blocker")),Aa(n,e.layerClass);return{element:m(n),destroy:function(){Gn(n)}}}(e),r=ka(n.element(),"mousedown",t.forceDrop),o=ka(n.element(),"mouseup",t.drop),i=ka(n.element(),"mousemove",t.move),a=ka(n.element(),"mouseout",t.delayDrop);return va({element:n.element,start:function(t){Hn(t,n.element())},stop:function(){Gn(n.element())},destroy:function(){n.destroy(),o.unbind(),i.unbind(),a.unbind(),r.unbind()}})},mutate:function(t,e){t.mutate(e.left,e.top)}}),ja=function(t){return Ee(t,"[contenteditable]")},Ba=function(t,e){return void 0===e&&(e=!1),!_t().browser.isIE()&&ge(t)?t.dom.isContentEditable:ja(t).fold(m(e),(function(t){return"true"===Fa(t)}))},Fa=function(t){return t.dom.contentEditable},Na=Ra("ephox-snooker"),Ha=Na.resolve,Va=function(){var t=fa({drag:la(["xDelta","yDelta","target"])}),e=C.none(),n=function(){var t=fa({drag:la(["xDelta","yDelta"])});return{mutate:function(e,n){t.trigger.drag(e,n)},events:t.registry}}();n.events.drag.bind((function(n){e.each((function(e){t.trigger.drag(n.xDelta,n.yDelta,e)}))}));return{assign:function(t){e=C.some(t)},get:function(){return e},mutate:n.mutate,events:t.registry}},Ua=Ha("resizer-bar"),Wa=Ha("resizer-rows"),$a=Ha("resizer-cols"),Ga=function(t){var e=we(t.parent(),"."+Ua);R(e,Gn)},Ka=function(t,e,n){var r=t.origin();R(e,(function(e){e.each((function(e){var o=n(r,e);Aa(o,Ua),Hn(t.parent(),o)}))}))},qa=function(t,e,n,r){Ka(t,e,(function(t,e){var o,i,a,u,c,s,l=(o=e.col,i=e.x-t.left,a=n.top-t.top,u=7,c=r,s=xt.fromTag("div"),Ve(s,{position:"absolute",left:i-u/2+"px",top:a+"px",height:c+"px",width:u+"px"}),De(s,{"data-column":o,role:"presentation"}),s);return Aa(l,$a),l}))},Xa=function(t,e,n,r){Ka(t,e,(function(t,e){var o=function(t,e,n,r,o){var i=xt.fromTag("div");return Ve(i,{position:"absolute",left:e+"px",top:n-o/2+"px",height:o+"px",width:r+"px"}),De(i,{"data-row":t,role:"presentation"}),i}(e.row,n.left-t.left,e.y-t.top,r,7);return Aa(o,Wa),o}))},Ya=function(t,e,n,r,o){var i=Jr(n),a=e.isResizable,u=r.length>0?so.positions(r,n):[],c=u.length>0?function(t,e){return H(t.all,(function(t,n){return e(t.element)?[n]:[]}))}(t,a):[],s=z(u,(function(t,e){return D(c,(function(t){return e===t}))}));Xa(e,s,i,zr(n));var l=o.length>0?po.positions(o,n):[],f=l.length>0?function(t,e){var n=[];return A(t.grid.columns,(function(r){En.getColumnAt(t,r).map((function(t){return t.element})).forall(e)&&n.push(r)})),z(n,(function(n){var r=En.filterItems(t,(function(t){return t.column===n}));return V(r,(function(t){return e(t.element)}))}))}(t,a):[],d=z(l,(function(t,e){return D(f,(function(t){return e===t}))}));qa(e,d,i,Gr(n))},Ja=function(t,e){if(Ga(t),t.isResizable(e)){var n=En.fromTable(e),r=Nr(n),o=Br(n);Ya(n,t,e,r,o)}},Qa=function(t,e){var n=we(t.parent(),"."+Ua);R(n,e)},Za=function(t){Qa(t,(function(t){He(t,"display","none")}))},tu=function(t){Qa(t,(function(t){He(t,"display","block")}))},eu=Ha("resizer-bar-dragging"),nu=function(t){var e=Va(),n=function(t,e){void 0===e&&(e={});var n=void 0!==e.mode?e.mode:La;return wa(t,n,e)}(e,{}),r=C.none(),o=function(t,e){return C.from(Ae(t,e))};e.events.drag.bind((function(t){o(t.target,"data-row").each((function(e){var n=Je(t.target,"top");He(t.target,"top",n+t.yDelta+"px")})),o(t.target,"data-column").each((function(e){var n=Je(t.target,"left");He(t.target,"left",n+t.xDelta+"px")}))}));var i=function(t,e){return Je(t,e)-Ke(t,"data-initial-"+e,0)};n.events.stop.bind((function(){e.get().each((function(e){r.each((function(n){o(e,"data-row").each((function(t){var r=i(e,"top");Re(e,"data-initial-top"),l.trigger.adjustHeight(n,r,parseInt(t,10))})),o(e,"data-column").each((function(t){var r=i(e,"left");Re(e,"data-initial-left"),l.trigger.adjustWidth(n,r,parseInt(t,10))})),Ja(t,n)}))}))}));var a=function(r,o){l.trigger.startAdjust(),e.assign(r),Te(r,"data-initial-"+o,Je(r,o)),Aa(r,eu),He(r,"opacity","0.2"),n.go(t.parent())},u=ka(t.parent(),"mousedown",(function(t){var e;e=t.target,Pa(e,Wa)&&a(t.target,"top"),function(t){return Pa(t,$a)}(t.target)&&a(t.target,"left")})),c=function(e){return kt(e,t.view())},s=ka(t.view(),"mouseover",(function(e){var n;(n=e.target,Ee(n,"table",c).filter(Ba)).fold((function(){ge(e.target)&&Ga(t)}),(function(e){r=C.some(e),Ja(t,e)}))})),l=fa({adjustHeight:la(["table","delta","row"]),adjustWidth:la(["table","delta","column"]),startAdjust:la([])});return{destroy:function(){u.unbind(),s.unbind(),n.destroy(),Ga(t)},refresh:function(e){Ja(t,e)},on:n.on,off:n.off,hideBars:g(Za,t),showBars:g(tu,t),events:l.registry}},ru=function(t,e,n){var r=so,o=po,i=nu(t),a=fa({beforeResize:la(["table","type"]),afterResize:la(["table","type"]),startDrag:la([])});return i.events.adjustHeight.bind((function(t){var e=t.table;a.trigger.beforeResize(e,"row");var n=r.delta(t.delta,e);Fi(e,n,t.row,r),a.trigger.afterResize(e,"row")})),i.events.startAdjust.bind((function(t){a.trigger.startDrag()})),i.events.adjustWidth.bind((function(t){var r=t.table;a.trigger.beforeResize(r,"col");var i=o.delta(t.delta,r),u=n(r);Bi(r,i,t.column,e,u),a.trigger.afterResize(r,"col")})),{on:i.on,off:i.off,hideBars:i.hideBars,showBars:i.showBars,destroy:i.destroy,events:a.registry}},ou=function(t,e){return t.fire("newrow",{node:e})},iu=function(t,e){return t.fire("newcell",{node:e})},au=function(t,e,n){t.fire("TableModified",X(X({},n),{table:e}))},uu={structure:!1,style:!0},cu={structure:!0,style:!1},su={structure:!0,style:!0},lu={"border-collapse":"collapse",width:"100%"},fu=A(5,(function(t){var e=t+1+"px";return{title:e,value:e}})),du=P(["Solid","Dotted","Dashed","Double","Groove","Ridge","Inset","Outset","None","Hidden"],(function(t){return{title:t,value:t.toLowerCase()}})),mu={border:"1"},pu=function(t){return t.getParam("table_sizing_mode","auto")},hu=function(t){return t.getParam("table_responsive_width")},gu=function(t){return t.getParam("table_border_widths",fu,"array")},vu=function(t){return t.getParam("table_border_styles",du,"array")},bu=function(t){return t.getParam("table_default_attributes",mu,"object")},yu=function(t){return t.getParam("table_default_styles",function(t){var e;if(Eu(t)){var n=t.dom,r=null!==(e=n.getParent(t.selection.getStart(),n.isBlock))&&void 0!==e?e:t.getBody(),o=Lr(xt.fromDom(r));return X(X({},lu),{width:o+"px"})}return Mu(t)?zt(lu,(function(t,e){return"width"!==e})):lu}(t),"object")},_u=function(t){return t.getParam("table_cell_advtab",!0,"boolean")},wu=function(t){return t.getParam("table_row_advtab",!0,"boolean")},xu=function(t){return t.getParam("table_advtab",!0,"boolean")},Ou=function(t){return t.getParam("table_style_by_css",!1,"boolean")},Su=function(t){return t.getParam("table_cell_class_list",[],"array")},Cu=function(t){return t.getParam("table_class_list",[],"array")},ku=function(t){return"relative"===pu(t)||!0===hu(t)},Eu=function(t){return"fixed"===pu(t)||!1===hu(t)},Mu=function(t){return"responsive"===pu(t)},Tu=function(t){return t.getParam("table_use_colgroups",!1,"boolean")},Du=function(t){var e=t.getParam("table_header_type","section","string");return T(["section","cells","sectionCells","auto"],e)?e:"section"},Au=function(t){var e=t.getParam("table_column_resizing","preservetable","string");return B(["preservetable","resizetable"],(function(t){return t===e})).getOr("preservetable")},Pu=function(t){return"preservetable"===Au(t)},Ru=function(t){return"resizetable"===Au(t)},Iu=function(t){var e=t.getParam("table_clone_elements");return r(e)?C.some(e.split(/[ ,]/)):Array.isArray(e)?C.some(e):C.none()},zu=function(t){return t.getParam("table_background_color_map",[],"array")},Lu=function(t){return t.getParam("table_border_color_map",[],"array")},ju=function(t,e){return ku(t)?Xo(e):Eu(t)?qo(e):Ko(e)},Bu=function(t){Re(t,"width")},Fu=function(t){var e=Ro(t);ia(t,C.some(e),C.none()),Bu(t)},Nu=function(t){var e=function(t){return Ir(t)+"px"}(t);ia(t,C.some(e),C.none()),Bu(t)},Hu=function(t){Ge(t,"width");var e=on(t),n=e.length>0?e:rn(t);R(n,(function(t){Ge(t,"width"),Bu(t)})),Bu(t)},Vu=function(){var t=xt.fromTag("div");return Ve(t,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),Hn(ve(xt.fromDom(document)),t),t},Uu=function(t){return"false"!==Ae(t,"data-mce-resize")},Wu=function(t){var e,n,o=C.none(),i=C.none(),a=C.none(),u=function(t){return"TABLE"===t.nodeName},c=function(){return i},s=function(e){return ju(t,e)},l=function(){return Pu(t)?Gi():$i()},f=function(r,o,i){var a=it(o,"e");if(""===n&&Fu(r),i!==e&&""!==n){He(r,"width",n);var u=l(),c=s(r),f=Pu(t)||a?function(t){return sa(t).columns}(r)-1:0;Bi(r,i-e,f,u,c)}else if(function(t){return/^(\d+(\.\d+)?)%$/.test(t)}(n)){var d=parseFloat(n.replace("%",""));He(r,"width",i*d/e+"%")}(function(t){return/^(\d+(\.\d+)?)px$/.test(t)})(n)&&function(t){var e=En.fromTable(t);En.hasColumns(e)||R(rn(t),(function(t){var e=Ue(t,"width");He(t,"width",e),Re(t,"width")}))}(r)};return t.on("init",(function(){var e=function(t,e){return t.inline?qi(pi(t),Vu(),e):Ki(xt.fromDom(t.getDoc()),e)}(t,Uu);if(a=C.some(e),function(t){var e=t.getParam("object_resizing",!0);return r(e)?"table"===e:e}(t)&&function(t){return t.getParam("table_resize_bars",!0,"boolean")}(t)){var n=l(),u=ru(e,n,s);u.on(),u.events.startDrag.bind((function(e){o=C.some(t.selection.getRng())})),u.events.beforeResize.bind((function(e){var n=e.table.dom;!function(t,e,n,r,o){t.fire("ObjectResizeStart",{target:e,width:n,height:r,origin:o})}(t,n,hi(n),gi(n),"bar-"+e.type)})),u.events.afterResize.bind((function(e){var n=e.table,r=n.dom;yi(n),o.each((function(e){t.selection.setRng(e),t.focus()})),function(t,e,n,r,o){t.fire("ObjectResized",{target:e,width:n,height:r,origin:o})}(t,r,hi(r),gi(r),"bar-"+e.type),t.undoManager.add()})),i=C.some(u)}})),t.on("ObjectResizeStart",(function(r){var o=r.target;if(u(o)){var i=xt.fromDom(o);R(t.dom.select(".mce-clonedresizable"),(function(e){t.dom.addClass(e,"mce-"+Au(t)+"-columns")})),!ua(i)&&Eu(t)?Nu(i):!aa(i)&&ku(t)&&Fu(i),ca(i)&&ot(r.origin,"bar-")&&Fu(i),e=r.width,n=Mu(t)?"":function(t,e){var n=t.dom.getStyle(e,"width")||t.dom.getAttrib(e,"width");return C.from(n).filter(ut)}(t,o).getOr("")}})),t.on("ObjectResized",(function(e){var n=e.target;if(u(n)){var r=xt.fromDom(n),o=e.origin;ot(o,"corner-")&&f(r,o,e.width),yi(r),au(t,r.dom,uu)}})),t.on("SwitchMode",(function(){c().each((function(e){t.mode.isReadOnly()?e.hideBars():e.showBars()}))})),{lazyResize:c,lazyWire:function(){return a.getOr(Ki(xt.fromDom(t.getBody()),Uu))},destroy:function(){i.each((function(t){t.destroy()})),a.each((function(e){!function(t,e){t.inline&&Gn(e.parent())}(t,e)}))}}},$u=function(t,e){return{element:t,offset:e}},Gu=function(t,e,n){return t.property().isText(e)&&0===t.property().getText(e).trim().length||t.property().isComment(e)?n(e).bind((function(e){return Gu(t,e,n).orThunk((function(){return C.some(e)}))})):C.none()},Ku=function(t,e){return t.property().isText(e)?t.property().getText(e).length:t.property().children(e).length},qu=function(t,e){var n=Gu(t,e,t.query().prevSibling).getOr(e);if(t.property().isText(n))return $u(n,Ku(t,n));var r=t.property().children(n);return r.length>0?qu(t,r[r.length-1]):$u(n,Ku(t,n))},Xu=qu,Yu=Zn(),Ju=function(t,e){1===qe(t,"colspan")&&function(t){return Mo(t).bind((function(t){return vo(t,["fixed","relative","empty"])}))}(t).each((function(n){var r=n.value/2;Po(t,r,n.unit),Po(e,r,n.unit)}))},Qu=ee("th"),Zu=function(t){return V(t,(function(t){return Qu(t.element)}))},tc=function(t,e){return t&&e?"sectionCells":t?"section":"cells"},ec=function(t){var e="thead"===t.section,n=ze(nc(t.cells),"th");return e||n?{type:"header",subType:tc(e,n)}:"tfoot"===t.section?{type:"footer"}:{type:"body"}},nc=function(t){var e=z(t,(function(t){return Qu(t.element)}));return 0===e.length?C.some("td"):e.length===t.length?C.some("th"):C.none()},rc=function(t,e,n){return $t(n(t.element,e),!0,t.isLocked)},oc=function(t,e){return t.section!==e?Gt(t.element,t.cells,e,t.isNew):t},ic=function(){return{transformRow:oc,transformCell:function(t,e,n){var r=n(t.element,e),o="td"!==Kt(r)?function(t,e){var n=Cr(t,e);Bn(t,n);var r=ce(t);return Wn(n,r),Gn(t),n}(r,"td"):r;return $t(o,t.isNew,t.isLocked)}}},ac=function(){return{transformRow:oc,transformCell:rc}},uc=function(){return{transformRow:function(t,e){return oc(t,"thead"===e?"tbody":e)},transformCell:rc}},cc=function(t,e){switch(function(t){return q(t.all,(function(t){var e=ec(t);return"header"===e.type?C.from(e.subType):C.none()}))}(En.fromTable(t)).getOr(e)){case"section":return ic();case"sectionCells":return ac();case"cells":return uc()}},sc=ic,lc=ac,fc=uc,dc=function(){return{transformRow:p,transformCell:rc}},mc=function(t,e,n,r){n===r?Re(t,e):Te(t,e,n)},pc=function(t,e,n){K(_e(t,e)).fold((function(){return Nn(t,n)}),(function(t){return Fn(t,n)}))},hc=function(t,e){var n=[],r=[],o=function(t){return P(t,(function(t){t.isNew&&n.push(t.element);var e=t.element;return $n(e),R(t.cells,(function(t){t.isNew&&r.push(t.element),mc(t.element,"colspan",t.colspan,1),mc(t.element,"rowspan",t.rowspan,1),Hn(e,t.element)})),e}))},i=function(t){return H(t,(function(t){return P(t.cells,(function(t){return mc(t.element,"span",t.colspan,1),t.element}))}))},a=function(e,n){var r=function(t,e){var n=Ce(t,e).getOrThunk((function(){var n=xt.fromTag(e,ne(t).dom);return"thead"===e?pc(t,"caption,colgroup",n):"colgroup"===e?pc(t,"caption",n):Hn(t,n),n}));return $n(n),n}(t,n),a=("colgroup"===n?i:o)(e);Wn(r,a)},u=function(e,n){e.length>0?a(e,n):function(e){Ce(t,e).each(Gn)}(n)},c=[],s=[],l=[],f=[];return R(e,(function(t){switch(t.section){case"thead":c.push(t);break;case"tbody":s.push(t);break;case"tfoot":l.push(t);break;case"colgroup":f.push(t)}})),u(f,"colgroup"),u(c,"thead"),u(s,"tbody"),u(l,"tfoot"),{newRows:n,newCells:r}},gc=function(t,e){if(0===t.length)return 0;var n=t[0];return F(t,(function(t){return!e(n.element,t.element)})).getOr(t.length)},vc=function(t,e,n,r){var o=function(t,e){return t[e]}(t,e),i="colgroup"===o.section;return{colspan:gc(o.cells.slice(n),r),rowspan:i?1:gc(function(t,e){return P(t,(function(t){return gn(t,e)}))}(t.slice(e),n),r)}},bc=function(t,e){var n=P(t,(function(t){return P(t.cells,_)}));return P(t,(function(r,o){var i=H(r.cells,(function(r,i){if(!1===n[o][i]){var a=vc(t,o,i,e);return function(t,e,r,o){for(var i=t;i<t+r;i++)for(var a=e;a<e+o;a++)n[i][a]=!0}(o,i,a.rowspan,a.colspan),[(u=r.element,c=a.rowspan,s=a.colspan,l=r.isNew,{element:u,rowspan:c,colspan:s,isNew:l})]}return[];var u,c,s,l}));return function(t,e,n,r){return{element:t,cells:e,section:n,isNew:r}}(r.element,i,r.section,r.isNew)}))},yc=function(t,e,n){var r=[];R(t.colgroups,(function(o){for(var i=[],a=0;a<t.grid.columns;a++){var u=En.getColumnAt(t,a).map((function(t){return $t(t.element,n,!1)})).getOrThunk((function(){return $t(e.colGap(),!0,!1)}));i.push(u)}r.push(Gt(o.element,i,"colgroup",n))}));for(var o=0;o<t.grid.rows;o++){for(var i=[],a=0;a<t.grid.columns;a++){var u=En.getAt(t,o,a).map((function(t){return $t(t.element,n,t.isLocked)})).getOrThunk((function(){return $t(e.gap(),!0,!1)}));i.push(u)}var c=t.all[o],s=Gt(c.element,i,c.section,n);r.push(s)}return r},_c=function(t){return bc(t,kt)},wc=function(t,e){return q(t.all,(function(t){return B(t.cells,(function(t){return kt(e,t.element)}))}))},xc=function(t,e,n){var r=P(e.selection,(function(e){return nn(e).bind((function(e){return wc(t,e)})).filter(n)})),o=Le(r);return Be(o.length>0,o)},Oc=function(t,e,n,r,o){return function(i,a,u,c,s){var l=En.fromTable(a),f=C.from(null==s?void 0:s.section).getOrThunk(dc);return e(l,u).map((function(e){var n=function(t,e){return yc(t,e,!1)}(l,c),r=t(n,e,kt,o(c),f),i=On(r.grid);return{info:e,grid:_c(r.grid),cursor:r.cursor,lockedColumns:i}})).bind((function(t){var e=hc(a,t.grid),o=C.from(null==s?void 0:s.sizing).getOrThunk((function(){return Ko(a)})),u=C.from(null==s?void 0:s.resize).getOrThunk(Gi);return n(a,t.grid,t.info,{sizing:o,resize:u,section:f}),r(a),Ja(i,a),Re(a,wn),t.lockedColumns.length>0&&Te(a,wn,t.lockedColumns.join(",")),C.some({cursor:t.cursor,newRows:e.newRows,newCells:e.newCells})}))}},Sc=function(t,e){return xc(t,e,w).map((function(t){return{cells:t,generators:e.generators,clipboard:e.clipboard}}))},Cc=function(t,e){return xc(t,e,w)},kc=function(t,e){return xc(t,e,(function(t){return!t.isLocked}))},Ec=function(t,e){return V(e,(function(e){return function(t,e){return wc(t,e).exists((function(t){return!t.isLocked}))}(t,e)}))},Mc=function(t,e){return function(t,e){return e.mergable}(0,e).filter((function(e){return Ec(t,e.cells)}))},Tc=function(t,e){return function(t,e){return e.unmergable}(0,e).filter((function(e){return Ec(t,e)}))},Dc=function(t,e,n,r){for(var o=yn(t).rows,i=!0,a=0;a<o.length;a++)for(var u=0;u<bn(o[0]);u++){var c=o[a],s=gn(c,u),l=n(s.element,e);!0===l&&!1===i?pn(c,u,$t(r(),!0,s.isLocked)):!0===l&&(i=!1)}return t},Ac=function(t,e,n,r){var o=yn(t).rows;if(e>0&&e<o.length){var i=function(t,e){return j(t,(function(t,n){return D(t,(function(t){return e(t.element,n.element)}))?t:t.concat([n])}),[])}(o[e-1].cells,n);R(i,(function(t){for(var i=C.none(),a=e;a<o.length;a++)for(var u=function(e){var u=o[a],c=gn(u,e);n(c.element,t.element)&&(i.isNone()&&(i=C.some(r())),i.each((function(t){pn(u,e,$t(t,!0,c.isLocked))})))},c=0;c<bn(o[0]);c++)u(c)}))}return t},Pc=function(t){return{isValue:w,isError:_,getOr:m(t),getOrThunk:m(t),getOrDie:m(t),or:function(e){return Pc(t)},orThunk:function(e){return Pc(t)},fold:function(e,n){return n(t)},map:function(e){return Pc(e(t))},mapError:function(e){return Pc(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOptional:function(){return C.some(t)}}},Rc=function(t){return{isValue:_,isError:w,getOr:p,getOrThunk:function(t){return t()},getOrDie:function(){return(e=String(t),function(){throw new Error(e)})();var e},or:p,orThunk:function(t){return t()},fold:function(e,n){return e(t)},map:function(e){return Rc(t)},mapError:function(e){return Rc(e(t))},each:d,bind:function(e){return Rc(t)},exists:_,forall:w,toOptional:C.none}},Ic={value:Pc,error:Rc,fromOption:function(t,e){return t.fold((function(){return Rc(e)}),Pc)}},zc=function(t,e){return{rowDelta:0,colDelta:bn(t[0])-bn(e[0])}},Lc=function(t,e){return{rowDelta:t.length-e.length,colDelta:0}},jc=function(t,e,n,r){var o="colgroup"===e.section?n.col:n.cell;return A(t,(function(t){return $t(o(),!0,r(t))}))},Bc=function(t,e,n,r){var o=t[t.length-1];return t.concat(A(e,(function(){var t="colgroup"===o.section?n.colgroup:n.row,e=_n(o,t,p),i=jc(e.cells.length,e,n,(function(t){return Nt(r,t.toString())}));return hn(e,i)})))},Fc=function(t,e,n,r){return P(t,(function(t){var o=jc(e,t,n,_);return dn(t,r,o)}))},Nc=function(t,e,n){var r=e.colDelta<0?Fc:p,o=e.rowDelta<0?Bc:p,i=On(t),a=bn(t[0]),u=D(i,(function(t){return t===a-1})),c=r(t,Math.abs(e.colDelta),n,u?a-1:a),s=On(c);return o(c,Math.abs(e.rowDelta),n,U(s,w))},Hc=function(t,e,n,r){var o=g(r,gn(t[e],n).element),i=t[e];return t.length>1&&bn(i)>1&&(n>0&&o(vn(i,n-1))||n<i.cells.length-1&&o(vn(i,n+1))||e>0&&o(vn(t[e-1],n))||e<t.length-1&&o(vn(t[e+1],n)))},Vc=function(t,e,n){return z(n,(function(n){return n>=t.column&&n<=bn(e[0])+t.column}))},Uc=function(t,e,n,r,o){var i=On(e),a=function(t,e,n){var r=bn(e[0]),o=yn(e).cols.length+t.row,i=A(r-t.column,(function(e){return e+t.column}));return{row:o,column:B(i,(function(t){return V(n,(function(e){return e!==t}))})).getOr(r-1)}}(t,e,i),u=yn(n).rows,c=Vc(a,u,i);return function(t,e,n){if(t.row>=e.length||t.column>bn(e[0]))return Ic.error("invalid start address out of table bounds, row: "+t.row+", column: "+t.column);var r=e.slice(t.row),o=r[0].cells.slice(t.column),i=bn(n[0]),a=n.length;return Ic.value({rowDelta:r.length-a,colDelta:o.length-i})}(a,e,u).map((function(t){var n=X(X({},t),{colDelta:t.colDelta-c.length}),i=Nc(e,n,r),s=On(i),l=Vc(a,u,s);return function(t,e,n,r,o,i){for(var a=t.row,u=t.column,c=a+n.length,s=u+bn(n[0])+i.length,l=U(i,w),f=a;f<c;f++)for(var d=0,m=u;m<s;m++)if(l[m])d++;else{Hc(e,f,m,o)&&Dc(e,vn(e[f],m),o,r.cell);var p=m-u-d,h=gn(n[f-a],p),g=h.element,v=r.replace(g);pn(e[f],m,$t(v,!0,h.isLocked))}return e}(a,i,u,r,o,l)}))},Wc=function(t,e,n,r,o){!function(t,e,n,r){e>0&&e<t[0].cells.length&&R(t,(function(t){var o=t.cells[e-1],i=t.cells[e];n(i.element,o.element)&&pn(t,e,$t(r(),!0,i.isLocked))}))}(e,t,o,r.cell);var i=Lc(n,e),a=Nc(n,i,r),u=Lc(e,a),c=Nc(e,u,r);return P(c,(function(e,n){return dn(e,t,a[n].cells)}))},$c=function(t,e,n,r,o){Ac(e,t,o,r.cell);var i=On(e),a=zc(e,n),u=X(X({},a),{colDelta:a.colDelta-i.length}),c=Nc(e,u,r),s=yn(c),l=s.cols,f=s.rows,d=On(c),m=zc(n,e),p=X(X({},m),{colDelta:m.colDelta+d.length}),h=function(t,e,n){return P(t,(function(t){return j(n,(function(n,r){var o=jc(1,t,e,w)[0];return mn(n,r,o)}),t)}))}(n,r,d),g=Nc(h,p,r);return l.concat(f.slice(0,t)).concat(g).concat(f.slice(t,f.length))},Gc=function(t,e,n,r,o){var i=yn(t),a=i.rows,u=i.cols,c=a.slice(0,e),s=a.slice(e),l=function(t,e,n,r){return _n(t,(function(t){return r(t,n)}),e)}(a[n],(function(t,n){return e>0&&e<a.length&&r(vn(a[e-1],n),vn(a[e],n))?gn(a[e],n):$t(o(t.element,r),!0,t.isLocked)}),r,o);return u.concat(c).concat([l]).concat(s)},Kc=function(t,e,n,r,o){return P(t,(function(t){var i=e>0&&e<bn(t)&&r(vn(t,e-1),vn(t,e)),a=function(t,e,n,r,o,i,a){if("colgroup"!==n&&r)return gn(t,e);var u=gn(t,o);return $t(a(u.element,i),!0,!1)}(t,e,t.section,i,n,r,o);return mn(t,e,a)}))},qc=function(t,e,n,r){return function(t,e,n,r){return void 0!==vn(t[e],n)&&e>0&&r(vn(t[e-1],n),vn(t[e],n))}(t,e,n,r)||function(t,e,n){return e>0&&n(vn(t,e-1),vn(t,e))}(t[e],n,r)},Xc=function(t,e,n,r){var o=function(t){return function(t){return"row"===t?Ye(e):Xe(e)}(t)?t+"group":t};return t?Qu(e)?o(n):null:r&&Qu(e)?o("row"===n?"col":"row"):null},Yc=function(t,e,n){return $t(n(t.element,e),!0,t.isLocked)},Jc=function(t,e,n,r,o,i,a){return P(t,(function(t,u){return function(t,e){var n=t.cells,r=P(n,e);return Gt(t.element,r,t.section,t.isNew)}(t,(function(t,c){if(function(t){return D(e,(function(e){return n(t.element,e.element)}))}(t)){var s=a(t,u,c)?o(t,n,r):t;return i(s,u,c).each((function(t){var e,n;e=s.element,n={scope:C.from(t)},Pt(n,(function(t,n){t.fold((function(){Re(e,n)}),(function(t){Me(e.dom,n,t)}))}))})),s}return t}))}))},Qc=function(t,e,n){return H(t,(function(r,o){return qc(t,o,e,n)?[]:[gn(r,e)]}))},Zc=function(t,e,n,r,o){var i=yn(t).rows,a=H(e,(function(t){return Qc(i,t,r)})),u=P(t,(function(t){return Zu(t.cells)})),c=function(t,e){return V(e,p)&&Zu(t)?w:function(t,n,r){return!("th"===Kt(t.element)&&e[n])}}(a,u),s=function(t,e){return function(n,r){return C.some(Xc(t,n.element,"row",e[r]))}}(n,u);return Jc(t,a,r,o,Yc,s,c)},ts=function(t,e,n,r,o,i,a){var u=yn(t),c=u.cols,s=u.rows,l=s[e[0]],f=H(e,(function(t){return function(t,e,n){var r=t[e];return H(r.cells,(function(r,o){return qc(t,e,o,n)?[]:[r]}))}(s,t,o)})),d=P(l.cells,(function(t,e){return Zu(Qc(s,e,o))})),m=Y([],s,!0);R(e,(function(t){m[t]=a.transformRow(s[t],n)}));var h=c.concat(m),g=function(t,e){return V(e,p)&&Zu(t.cells)?w:function(t,n,r){return!("th"===Kt(t.element)&&e[r])}}(l,d),v=function(t,e){return function(n,r,o){return C.some(Xc(t,n.element,"col",e[o]))}}(r,d);return Jc(h,f,o,i,a.transformCell,v,g)},es=function(t,e,n,r){var o=yn(t).rows,i=P(e,(function(t){return gn(o[t.row],t.column)}));return Jc(t,i,n,r,Yc,C.none,w)},ns=function(t){return j(t,(function(t,e){return D(t,(function(t){return t.column===e.column}))?t:t.concat([e])}),[]).sort((function(t,e){return t.column-e.column}))},rs=ee("col"),os=ee("colgroup"),is=function(t){return"tr"===Kt(t)||os(t)},as=function(t){return{element:t,colspan:Ke(t,"colspan",1),rowspan:Ke(t,"rowspan",1)}},us=function(t){return Pe(t,"scope").map((function(t){return t.substr(0,3)}))},cs=function(t,e){void 0===e&&(e=as);var n=function(n){if(is(n))return os((o={element:n}).element)?t.colgroup(o):t.row(o);var o,i=function(e){return rs(e.element)?t.col(e):t.cell(e)}(e(n));return r=C.some({item:n,replacement:i}),i},r=C.none();return{getOrInit:function(t,e){return r.fold((function(){return n(t)}),(function(r){return e(t,r.item)?r.replacement:n(t)}))}}},ss=function(t){return function(e){var n=[],r=function(r){var o="td"===t?{scope:null}:{},i=e.replace(r,t,o);return n.push({item:r,sub:i}),i};return{replaceOrInit:function(t,e){return is(t)||rs(t)?t:function(t,e){return B(n,(function(n){return e(n.item,t)}))}(t,e).fold((function(){return r(t)}),(function(n){return e(t,n.item)?n.sub:r(t)}))}}}},ls=function(t){return{unmerge:function(e){var n=us(e);return n.each((function(t){return Te(e,"scope",t)})),function(){var r=t.cell({element:e,colspan:1,rowspan:1});return Ge(r,"width"),Ge(e,"width"),n.each((function(t){return Te(r,"scope",t)})),r}},merge:function(t){return Ge(t[0],"width"),function(){var e=Le(P(t,us));if(0===e.length)return C.none();var n=e[0],r=["row","col"];return D(e,(function(t){return t!==n&&T(r,t)}))?C.none():C.from(n)}().fold((function(){return Re(t[0],"scope")}),(function(e){return Te(t[0],"scope",e+"group")})),m(t[0])}}},fs=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],ds=Zn(),ms=function(t){return function(t,e){var n=t.property().name(e);return T(fs,n)}(ds,t)},ps=function(t){return function(t,e){var n=t.property().name(e);return T(["ol","ul"],n)}(ds,t)},hs=function(t){return function(t,e){return T(["br","img","hr","input"],t.property().name(e))}(ds,t)},gs=function(t){var e,n=function(t){return"br"===Kt(t)},r=function(t){return ni(t).bind((function(e){var r=ue(e).map((function(t){return!!ms(t)||!!hs(t)&&"img"!==Kt(t)})).getOr(!1);return oe(e).map((function(o){return!0===r||function(t){return"li"===Kt(t)||Oe(t,ps).isSome()}(o)||n(e)||ms(o)&&!kt(t,o)?[]:[xt.fromTag("br")]}))})).getOr([])},o=0===(e=H(t,(function(t){var e=ce(t);return function(t){return V(t,(function(t){return n(t)||Qt(t)&&0===Xn(t).trim().length}))}(e)?[]:e.concat(r(t))}))).length?[xt.fromTag("br")]:e;$n(t[0]),Wn(t[0],o)},vs=function(t){return Ba(t,!0)},bs=function(t){0===rn(t).length&&Gn(t)},ys=function(t,e){return{grid:t,cursor:e}},_s=function(t,e,n){var r,o,i=yn(t).rows;return C.from(null===(o=null===(r=i[e])||void 0===r?void 0:r.cells[n])||void 0===o?void 0:o.element).filter(vs).orThunk((function(){return function(t){return q(t,(function(t){return q(t.cells,(function(t){var e=t.element;return Be(vs(e),e)}))}))}(i)}))},ws=function(t,e,n){var r=_s(t,e,n);return ys(t,r)},xs=function(t){return j(t,(function(t,e){return D(t,(function(t){return t.row===e.row}))?t:t.concat([e])}),[]).sort((function(t,e){return t.row-e.row}))},Os=function(t,e){return function(n,r,o,i,a){var u=xs(r),c=P(u,(function(t){return t.row})),s=ts(n,c,t,e,o,i.replaceOrInit,a);return ws(s,r[0].row,r[0].column)}},Ss=Os("thead",!0),Cs=Os("tbody",!1),ks=Os("tfoot",!1),Es=function(t,e,n){var r=function(t,e){return sn(t,(function(){return e}))}(t,n.section),o=En.generate(r);return yc(o,e,!0)},Ms=function(t,e,n,r){return function(t,e,n,r){var o=En.generate(e),i=r.getWidths(o,r);ji(o,i,r)}(0,e,0,r.sizing)},Ts=function(t,e,n,r){return function(t,e,n,r,o){var i=En.generate(e),a=r.getWidths(i,r),u=r.pixelWidth(),c=o.calcRedestributedWidths(a,u,n.pixelDelta,r.isRelative),s=c.newSizes,l=c.delta;ji(i,s,r),r.adjustTableWidth(l)}(0,e,n,r.sizing,r.resize)},Ds=function(t,e){return D(e,(function(t){return 0===t.column&&t.isLocked}))},As=function(t,e){return D(e,(function(e){return e.column+e.colspan>=t.grid.columns&&e.isLocked}))},Ps=function(t,e){var n=Br(t),r=ns(e);return j(r,(function(t,e){return t+n[e.column].map(zr).getOr(0)}),0)},Rs=function(t){return function(e,n){return Cc(e,n).filter((function(n){return!(t?Ds:As)(e,n)})).map((function(t){return{details:t,pixelDelta:Ps(e,t)}}))}},Is=function(t){return function(e,n){return Sc(e,n).filter((function(n){return!(t?Ds:As)(e,n.cells)}))}},zs=ss("th"),Ls=ss("td"),js=Oc((function(t,e,n,r){var o=e[0].row,i=xs(e),a=L(i,(function(t,e){return{grid:Gc(t.grid,o,e.row+t.delta,n,r.getOrInit),delta:t.delta+1}}),{grid:t,delta:0}).grid;return ws(a,o,e[0].column)}),Cc,d,d,cs),Bs=Oc((function(t,e,n,r){var o=xs(e),i=o[o.length-1],a=i.row+i.rowspan,u=L(o,(function(t,e){return Gc(t,a,e.row,n,r.getOrInit)}),t);return ws(u,a,e[0].column)}),Cc,d,d,cs),Fs=Oc((function(t,e,n,r){var o=e.details,i=ns(o),a=i[0].column,u=L(i,(function(t,e){return{grid:Kc(t.grid,a,e.column+t.delta,n,r.getOrInit),delta:t.delta+1}}),{grid:t,delta:0}).grid;return ws(u,o[0].row,a)}),Rs(!0),Ts,d,cs),Ns=Oc((function(t,e,n,r){var o=e.details,i=o[o.length-1],a=i.column+i.colspan,u=ns(o),c=L(u,(function(t,e){return Kc(t,a,e.column,n,r.getOrInit)}),t);return ws(c,o[0].row,a)}),Rs(!1),Ts,d,cs),Hs=Oc((function(t,e,n,r){var o=ns(e.details),i=function(t,e){return H(t,(function(t){var n=t.cells,r=L(e,(function(t,e){return e>=0&&e<t.length?t.slice(0,e).concat(t.slice(e+1)):t}),n);return r.length>0?[Gt(t.element,r,t.section,t.isNew)]:[]}))}(t,P(o,(function(t){return t.column}))),a=i.length>0?i[0].cells.length-1:0;return ws(i,o[0].row,Math.min(o[0].column,a))}),(function(t,e){return kc(t,e).map((function(e){return{details:e,pixelDelta:-Ps(t,e)}}))}),Ts,bs,cs),Vs=Oc((function(t,e,n,r){var o=xs(e),i=function(t,e,n){var r=yn(t),o=r.rows;return r.cols.concat(o.slice(0,e)).concat(o.slice(n+1))}(t,o[0].row,o[o.length-1].row),a=i.length>0?i.length-1:0;return ws(i,Math.min(e[0].row,a),e[0].column)}),Cc,d,bs,cs),Us=Oc((function(t,e,n,r){var o=ns(e),i=P(o,(function(t){return t.column})),a=Zc(t,i,!0,n,r.replaceOrInit);return ws(a,e[0].row,e[0].column)}),kc,d,d,zs),Ws=Oc((function(t,e,n,r){var o=ns(e),i=P(o,(function(t){return t.column})),a=Zc(t,i,!1,n,r.replaceOrInit);return ws(a,e[0].row,e[0].column)}),kc,d,d,Ls),$s=Oc(Ss,kc,d,d,zs),Gs=Oc(Cs,kc,d,d,Ls),Ks=Oc(ks,kc,d,d,Ls),qs=Oc((function(t,e,n,r){var o=es(t,e,n,r.replaceOrInit);return ws(o,e[0].row,e[0].column)}),kc,d,d,zs),Xs=Oc((function(t,e,n,r){var o=es(t,e,n,r.replaceOrInit);return ws(o,e[0].row,e[0].column)}),kc,d,d,Ls),Ys=Oc((function(t,e,n,r){var o=e.cells;gs(o);var i=function(t,e,n,r){var o=yn(t).rows;if(0===o.length)return t;for(var i=e.startRow;i<=e.finishRow;i++)for(var a=e.startCol;a<=e.finishCol;a++){var u=o[i],c=gn(u,a).isLocked;pn(u,a,$t(r(),!1,c))}return t}(t,e.bounds,0,r.merge(o));return ys(i,C.from(o[0]))}),Mc,Ms,d,ls),Js=Oc((function(t,e,n,r){var o=L(e,(function(t,e){return Dc(t,e,n,r.unmerge(e))}),t);return ys(o,C.from(e[0]))}),Tc,Ms,d,ls),Qs=Oc((function(t,e,n,r){var o=function(t,e){var n=En.fromTable(t);return yc(n,e,!0)}(e.clipboard,e.generators),i=function(t,e){return{row:t,column:e}}(e.row,e.column);return Uc(i,t,o,e.generators,n).fold((function(){return ys(t,C.some(e.element))}),(function(t){return ws(t,e.row,e.column)}))}),(function(t,e){return nn(e.element).bind((function(n){return wc(t,n).map((function(t){return X(X({},t),{generators:e.generators,clipboard:e.clipboard})}))}))}),Ms,d,cs),Zs=Oc((function(t,e,n,r){var o=yn(t).rows,i=e.cells[0].column,a=o[e.cells[0].row],u=Es(e.clipboard,e.generators,a),c=Wc(i,t,u,e.generators,n);return ws(c,e.cells[0].row,e.cells[0].column)}),Is(!0),d,d,cs),tl=Oc((function(t,e,n,r){var o=yn(t).rows,i=e.cells[e.cells.length-1].column+e.cells[e.cells.length-1].colspan,a=o[e.cells[0].row],u=Es(e.clipboard,e.generators,a),c=Wc(i,t,u,e.generators,n);return ws(c,e.cells[0].row,e.cells[0].column)}),Is(!1),d,d,cs),el=Oc((function(t,e,n,r){var o=yn(t).rows,i=e.cells[0].row,a=o[i],u=Es(e.clipboard,e.generators,a),c=$c(i,t,u,e.generators,n);return ws(c,e.cells[0].row,e.cells[0].column)}),Sc,d,d,cs),nl=Oc((function(t,e,n,r){var o=yn(t).rows,i=e.cells[e.cells.length-1].row+e.cells[e.cells.length-1].rowspan,a=o[e.cells[0].row],u=Es(e.clipboard,e.generators,a),c=$c(i,t,u,e.generators,n);return ws(c,e.cells[0].row,e.cells[0].column)}),Sc,d,d,cs),rl=function(t,e){var n=En.fromTable(t);return Cc(n,e).bind((function(t){var e=t[t.length-1],r=t[0].column,o=e.column+e.colspan,i=N(P(n.all,(function(t){return z(t.cells,(function(t){return t.column>=r&&t.column<o}))})));return nc(i)})).getOr("")},ol=function(t,e){var n=En.fromTable(t);return Cc(n,e).bind(nc).getOr("")},il=function(t,e){var n=En.fromTable(t);return Cc(n,e).bind((function(t){var e=t[t.length-1],r=t[0].row,o=e.row+e.rowspan;return function(t){var e=P(t,(function(t){return ec(t).type})),n=T(e,"header"),r=T(e,"footer");if(n||r){var o=T(e,"body");return!n||o||r?n||o||!r?C.none():C.some("footer"):C.some("header")}return C.some("body")}(n.all.slice(r,o))})).getOr("")},al=function(t,e,n){var r=function(t){return"table"===Kt(pi(t))},o=Iu(t),i=Ru(t)?d:Ju,a=function(e){switch(Du(t)){case"section":return sc();case"sectionCells":return lc();case"cells":return fc();default:return cc(e,"section")}},u=function(n,r){return r.cursor.fold((function(){var r=rn(n);return G(r).filter(ge).map((function(r){e.clear(n);var o=t.dom.createRng();return o.selectNode(r.dom),t.selection.setRng(o),Te(r,"data-mce-selected","1"),o}))}),(function(r){var o=Xu(Yu,r),i=t.dom.createRng();return i.setStart(o.element.dom,o.offset),i.setEnd(o.element.dom,o.offset),t.selection.setRng(i),e.clear(n),C.some(i)}))},c=function(e,n,r,i,c){return function(s,l,f){void 0===f&&(f=!1),yi(s);var d=i(),m=xt.fromDom(t.getDoc()),p=fi(r,m,o),h={sizing:ju(t,s),resize:Ru(t)?$i():Gi(),section:a(s)};return n(s)?e(d,s,l,p,h).bind((function(e){R(e.newRows,(function(e){ou(t,e.dom)})),R(e.newCells,(function(e){iu(t,e.dom)}));var n=u(s,e);return ge(s)&&(yi(s),f||au(t,s.dom,c)),n.map((function(t){return{rng:t,effect:c}}))})):C.none()}};return{deleteRow:c(Vs,(function(e){return!1===r(t)||sa(e).rows>1}),d,n,cu),deleteColumn:c(Hs,(function(e){return!1===r(t)||sa(e).columns>1}),d,n,cu),insertRowsBefore:c(js,w,d,n,cu),insertRowsAfter:c(Bs,w,d,n,cu),insertColumnsBefore:c(Fs,w,i,n,cu),insertColumnsAfter:c(Ns,w,i,n,cu),mergeCells:c(Ys,w,d,n,cu),unmergeCells:c(Js,w,d,n,cu),pasteColsBefore:c(Zs,w,d,n,cu),pasteColsAfter:c(tl,w,d,n,cu),pasteRowsBefore:c(el,w,d,n,cu),pasteRowsAfter:c(nl,w,d,n,cu),pasteCells:c(Qs,w,d,n,su),makeCellsHeader:c(qs,w,d,n,cu),unmakeCellsHeader:c(Xs,w,d,n,cu),makeColumnsHeader:c(Us,w,d,n,cu),unmakeColumnsHeader:c(Ws,w,d,n,cu),makeRowsHeader:c($s,w,d,n,cu),makeRowsBody:c(Gs,w,d,n,cu),makeRowsFooter:c(Ks,w,d,n,cu),getTableRowType:il,getTableCellType:ol,getTableColType:rl}},ul={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},cl=function(t){var e=xt.fromTag("colgroup");return A(t,(function(){return Hn(e,xt.fromTag("col"))})),e},sl=function(t,e,n,r){return A(t,(function(t){return function(t,e,n,r){for(var o=xt.fromTag("tr"),i=0;i<t;i++){var a=r<e||i<n?xt.fromTag("th"):xt.fromTag("td");i<n&&Te(a,"scope","row"),r<e&&Te(a,"scope","col"),Hn(a,xt.fromTag("br")),Hn(o,a)}return o}(e,n,r,t)}))},ll=function(t,e){t.selection.select(e.dom,!0),t.selection.collapse(!0)},fl=function(t,e,n,o,i){var a=yu(t),u={styles:a,attributes:bu(t),colGroups:Tu(t)};return t.undoManager.ignore((function(){var r=function(t,e,n,r,o,i){void 0===i&&(i=ul);var a=xt.fromTag("table"),u="cells"!==o;Ve(a,i.styles),De(a,i.attributes),i.colGroups&&Hn(a,cl(e));var c=Math.min(t,n);if(u&&n>0){var s=xt.fromTag("thead");Hn(a,s);var l=sl(n,e,"sectionCells"===o?c:0,r);Wn(s,l)}var f=xt.fromTag("tbody");Hn(a,f);var d=sl(u?t-c:t,e,u?0:n,r);return Wn(f,d),a}(n,e,i,o,Du(t),u);Te(r,"data-mce-id","__mce");var a=function(t){var e=xt.fromTag("div"),n=xt.fromDom(t.dom.cloneNode(!0));return Hn(e,n),function(t){return t.dom.innerHTML}(e)}(r);t.insertContent(a),t.addVisual()})),ke(pi(t),'table[data-mce-id="__mce"]').map((function(e){return Eu(t)?Nu(e):Mu(t)?Hu(e):(ku(t)||function(t){return r(t)&&-1!==t.indexOf("%")}(a.width))&&Fu(e),yi(e),Re(e,"data-mce-id"),function(t,e){R(we(e,"tr"),(function(e){ou(t,e.dom),R(we(e,"th,td"),(function(e){iu(t,e.dom)}))}))}(t,e),function(t,e){ke(e,"td,th").each(g(ll,t))}(t,e),e.dom})).getOr(null)},dl=function(t,e,n,r,o){void 0===r&&(r={});var i=function(t){return f(t)&&t>0};if(i(e)&&i(n)){var a=r.headerRows||0,u=r.headerColumns||0;return fl(t,n,e,u,a)}return null},ml=function(t){return function(){return t().fold((function(){return[]}),(function(t){return P(t,(function(t){return t.dom}))}))}},pl=function(t){return function(e){var n=e.length>0?C.some(mi(e)):C.none();t(n)}},hl=function(t){return function(e,n,r){void 0===r&&(r={});var o=dl(t,n,e,r);return t.undoManager.add(),o}},gl=function(t,e,n){var r=Ke(t,e,1);1===n||r<=1?Re(t,e):Te(t,e,Math.min(n,r))},vl=function(t,e){var n=En.fromTable(t);return kc(n,e).map((function(t){var e=t[t.length-1],r=t[0].column,o=e.column+e.colspan,i=function(t,e,n){if(En.hasColumns(t)){var r=z(En.justColumns(t),(function(t){return t.column>=e&&t.column<n})),o=P(r,(function(t){var r=Sr(t.element);return gl(r,"span",n-e),r})),i=xt.fromTag("colgroup");return Wn(i,o),[i]}return[]}(n,r,o),a=function(t,e,n){return P(t.all,(function(t){var r=z(t.cells,(function(t){return t.column>=e&&t.column<n})),o=P(r,(function(t){var r=Sr(t.element);return gl(r,"colspan",n-e),r})),i=xt.fromTag("tr");return Wn(i,o),i}))}(n,r,o);return Y(Y([],i,!0),a,!0)}))},bl=function(t,e,n){var r=En.fromTable(t);return Cc(r,e).bind((function(t){var e=yc(r,n,!1),o=yn(e).rows.slice(t[0].row,t[t.length-1].row+t[t.length-1].rowspan),i=H(o,(function(t){var e=z(t.cells,(function(t){return!t.isLocked}));return e.length>0?[X(X({},t),{cells:e})]:[]})),a=_c(i);return Be(a.length>0,a)})).map((function(t){return function(t){return P(t,(function(t){var e=Or(t.element);return R(t.cells,(function(t){var n=Sr(t.element);mc(n,"colspan",t.colspan,1),mc(n,"rowspan",t.rowspan,1),Hn(e,n)})),e}))}(t)}))},yl=tinymce.util.Tools.resolve("tinymce.util.Tools"),_l=function(t,e,n){return function(e,r){for(var o=0;o<r.length;o++){var i=t.getStyle(r[o],n);if(void 0===e&&(e=i),e!==i)return""}return e}(void 0,t.select("td,th",e))},wl=function(t,e,n){n&&t.formatter.apply("align"+n,{},e)},xl=function(t,e){yl.each("left center right".split(" "),(function(n){t.formatter.remove("align"+n,{},e)}))},Ol=[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}],Sl=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Cl=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,kl=function(t){return(e=t,n="#",ot(e,n)?function(t,e){return t.substring(e)}(e,n.length):e).toUpperCase();var e,n},El=function(t){return function(t){return Sl.test(t)||Cl.test(t)}(t)?C.some({value:kl(t)}):C.none()},Ml=function(t){var e=t.toString(16);return(1===e.length?"0"+e:e).toUpperCase()},Tl=function(t){return function(t){return{value:t}}(Ml(t.red)+Ml(t.green)+Ml(t.blue))},Dl=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,Al=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,Pl=function(t,e,n,r){return{red:t,green:e,blue:n,alpha:r}},Rl=function(t,e,n,r){var o=parseInt(t,10),i=parseInt(e,10),a=parseInt(n,10),u=parseFloat(r);return Pl(o,i,a,u)},Il=function(t){return El(t).orThunk((function(){return function(t){if("transparent"===t)return C.some(Pl(0,0,0,0));var e=Dl.exec(t);if(null!==e)return C.some(Rl(e[1],e[2],e[3],"1"));var n=Al.exec(t);return null!==n?C.some(Rl(n[1],n[2],n[3],n[4])):C.none()}(t).map(Tl)})).getOrThunk((function(){var e=document.createElement("canvas");e.height=1,e.width=1;var n=e.getContext("2d");n.clearRect(0,0,e.width,e.height),n.fillStyle="#FFFFFF",n.fillStyle=t,n.fillRect(0,0,1,1);var r=n.getImageData(0,0,1,1).data,o=r[0],i=r[1],a=r[2],u=r[3];return Tl(Pl(o,i,a,u))}))},zl=function(t){var e=t;return{get:function(){return e},set:function(t){e=t}}},Ll=function(t){var e=zl(C.none()),n=function(){return e.get().each(t)};return{clear:function(){n(),e.set(C.none())},isSet:function(){return e.get().isSome()},get:function(){return e.get()},set:function(t){n(),e.set(C.some(t))}}},jl=function(){var t=Ll(d);return X(X({},t),{on:function(e){return t.get().each(e)}})},Bl=function(t,e,n,r){return function(o){var i=Ll((function(t){return t.unbind()})),a=!ut(r),u=function(){var u=Ti(e),c=function(e){return t.formatter.match(n,{value:r},e.dom,a)};a?(o.setActive(!D(u,c)),i.set(t.formatter.formatChanged(n,(function(t){return o.setActive(!t)}),!0))):(o.setActive(V(u,c)),i.set(t.formatter.formatChanged(n,o.setActive,!1,{value:r})))};return t.initialized?u():t.on("init",u),i.clear}},Fl=function(t){return Ht(t,"menu")},Nl=function(t){return P(t,(function(t){var e=t.text||t.title;return Fl(t)?{text:e,items:Nl(t.menu)}:{text:e,value:t.value}}))},Hl=function(t,e,n,r,o){return P(n,(function(n){var i=n.text||n.title;return Fl(n)?{type:"nestedmenuitem",text:i,getSubmenuItems:function(){return Hl(t,e,n.menu,r,o)}}:{text:i,type:"togglemenuitem",onAction:function(){return o(n.value)},onSetup:Bl(t,e,r,n.value)}}))},Vl=function(t,e){return function(n){var r;t.execCommand("mceTableApplyCellStyle",!1,((r={})[e]=n,r))}},Ul=function(t){return H(t,(function(t){return Fl(t)?[X(X({},t),{menu:Ul(t.menu)})]:ut(t.value)?[t]:[]}))},Wl=function(t,e,n,r,o){return function(i){return i(Hl(t,e,n,r,o))}},$l=function(t,e,n){var r=P(e,(function(t){return{text:t.title,value:"#"+Il(t.value).value,type:"choiceitem"}}));return[{type:"fancymenuitem",fancytype:"colorswatch",initData:{colors:r.length>0?r:void 0,allowCustomColors:!1},onAction:function(e){var r,o="remove"===e.value?"":e.value;t.execCommand("mceTableApplyCellStyle",!1,((r={})[n]=o,r))}}]},Gl=function(t){return function(){var e="header"===t.queryCommandValue("mceTableRowType")?"body":"header";t.execCommand("mceTableRowType",!1,{type:e})}},Kl=function(t){return function(){var e="th"===t.queryCommandValue("mceTableColType")?"td":"th";t.execCommand("mceTableColType",!1,{type:e})}},ql=[{name:"width",type:"input",label:"Width"},{name:"height",type:"input",label:"Height"},{name:"celltype",type:"listbox",label:"Cell type",items:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{name:"scope",type:"listbox",label:"Scope",items:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{name:"halign",type:"listbox",label:"Horizontal align",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{name:"valign",type:"listbox",label:"Vertical align",items:Ol}],Xl=function(t){return ql.concat(function(t){var e=Nl(Su(t));return e.length>0?C.some({name:"class",type:"listbox",label:"Class",items:e}):C.none()}(t).toArray())},Yl=function(t,e){var n=[{name:"borderstyle",type:"listbox",label:"Border style",items:[{text:"Select...",value:""}].concat(Nl(vu(t)))},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}];return{title:"Advanced",name:"advanced",items:"cell"===e?[{name:"borderwidth",type:"input",label:"Border width"}].concat(n):n}},Jl=function(t){return function(e,n){var r=e.dom;return{setAttrib:function(e,o){t&&!o||r.setAttrib(n,e,o)},setStyle:function(e,o){t&&!o||r.setStyle(n,e,o)},setFormat:function(r,o){t&&!o||(""===o?e.formatter.remove(r,{value:null},n,!0):e.formatter.apply(r,{value:o},n))}}}},Ql={normal:Jl(!1),ifTruthy:Jl(!0)},Zl=function(t){return function(e){return ot(e,"rgb")?t.toHex(e):e}},tf=function(t,e){var n=xt.fromDom(e);return{borderwidth:$e(n,"border-width").getOr(""),borderstyle:$e(n,"border-style").getOr(""),bordercolor:$e(n,"border-color").map(Zl(t)).getOr(""),backgroundcolor:$e(n,"background-color").map(Zl(t)).getOr("")}},ef=function(t){var e=t[0],n=t.slice(1);return R(n,(function(t){R(Dt(e),(function(n){Pt(t,(function(t,r){var o=e[n];""!==o&&n===r&&o!==t&&(e[n]="")}))}))})),e},nf=function(t,e,n,r){return B(t,(function(t){return!c(n.formatter.matchNode(r,e+t))})).getOr("")},rf=g(nf,["left","center","right"],"align"),of=g(nf,["top","middle","bottom"],"valign"),af=function(t){return an(xt.fromDom(t)).map((function(e){var n={selection:mi(t.cells)};return il(e,n)})).getOr("")},uf=function(t,e){var n=En.fromTable(t),r=En.justCells(n),o=z(r,(function(t){return D(e,(function(e){return kt(t.element,e)}))}));return P(o,(function(t){return{element:t.element.dom,column:En.getColumnAt(n,t.column).map((function(t){return t.element.dom}))}}))},cf=function(t,e,n){var r=1===e.length;R(e,(function(e){var o=e.element,i=r?Ql.normal(t,o):Ql.ifTruthy(t,o);!function(t,e,n){t.setAttrib("scope",n.scope),t.setAttrib("class",n.class),t.setStyle("height",bi(n.height)),e.setStyle("width",bi(n.width))}(i,e.column.map((function(e){return r?Ql.normal(t,e):Ql.ifTruthy(t,e)})).getOr(i),n),_u(t)&&function(t,e){t.setFormat("tablecellbackgroundcolor",e.backgroundcolor),t.setFormat("tablecellbordercolor",e.bordercolor),t.setFormat("tablecellborderstyle",e.borderstyle),t.setFormat("tablecellborderwidth",bi(e.borderwidth))}(i,n),r&&(xl(t,o),function(t,e){yl.each("top middle bottom".split(" "),(function(n){t.formatter.remove("valign"+n,{},e)}))}(t,o)),n.halign&&wl(t,o,n.halign),n.valign&&function(t,e,n){n&&t.formatter.apply("valign"+n,{},e)}(t,o,n.valign)}))},sf=function(t,e,n,r){var o=r.getData();r.close(),t.undoManager.transact((function(){!function(t,e,n,r){var o=zt(r,(function(t,e){return n[e]!==t}));Bt(o)>0&&e.length>=1&&an(e[0]).each((function(n){var i=uf(n,e),a=Bt(zt(o,(function(t,e){return"scope"!==e&&"celltype"!==e})))>0,u=Nt(o,"celltype");(a||Nt(o,"scope"))&&cf(t,i,r),u&&function(t,e){t.execCommand("mceTableCellType",!1,{type:e.celltype,no_events:!0})}(t,r),au(t,n.dom,{structure:u,style:a})}))}(t,e,n,o),t.focus()}))},lf=function(t,e){var n=an(e[0]).map((function(n){return P(uf(n,e),(function(e){return function(t,e,n,r){var o,i=t.dom,a=r.getOr(e),u=function(t,e){return i.getStyle(t,e)||i.getAttrib(t,e)};return X({width:u(a,"width"),height:u(e,"height"),scope:i.getAttrib(e,"scope"),celltype:(o=e,o.nodeName.toLowerCase()),class:i.getAttrib(e,"class",""),halign:rf(t,e),valign:of(t,e)},n?tf(i,e):{})}(t,e.element,_u(t),e.column)}))}));return ef(n.getOrDie())},ff=function(t,e){var n=Ti(e);if(0!==n.length){var r=lf(t,n),o={type:"tabpanel",tabs:[{title:"General",name:"general",items:Xl(t)},Yl(t,"cell")]},i={type:"panel",items:[{type:"grid",columns:2,items:Xl(t)}]};t.windowManager.open({title:"Cell Properties",size:"normal",body:_u(t)?o:i,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r,onSubmit:g(sf,t,n,r)})}},df=[{type:"listbox",name:"type",label:"Row type",items:[{text:"Header",value:"header"},{text:"Body",value:"body"},{text:"Footer",value:"footer"}]},{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height",type:"input"}],mf=function(t){return df.concat(function(t){var e=Nl(function(t){return t.getParam("table_row_class_list",[],"array")}(t));return e.length>0?C.some({name:"class",type:"listbox",label:"Class",items:e}):C.none()}(t).toArray())},pf=function(t,e,n,r){var o=1===e.length;R(e,(function(e){var i=o?Ql.normal(t,e):Ql.ifTruthy(t,e);!function(t,e){t.setAttrib("class",e.class),t.setStyle("height",bi(e.height))}(i,n),wu(t)&&function(t,e){t.setStyle("background-color",e.backgroundcolor),t.setStyle("border-color",e.bordercolor),t.setStyle("border-style",e.borderstyle)}(i,n),n.align!==r.align&&(xl(t,e),wl(t,e,n.align))}))},hf=function(t,e,n,r){var o=r.getData();r.close(),t.undoManager.transact((function(){!function(t,e,n,r){var o=zt(r,(function(t,e){return n[e]!==t}));if(Bt(o)>0){var i=Nt(o,"type"),a=!i||Bt(o)>1;a&&pf(t,e,r,n),i&&function(t,e){t.execCommand("mceTableRowType",!1,{type:e.type,no_events:!0})}(t,r),an(xt.fromDom(e[0])).each((function(e){return au(t,e.dom,{structure:i,style:a})}))}}(t,e,n,o),t.focus()}))},gf=function(t){var e,n,r,o,i=(e=_i(t),n=Si.selected,r=Mi(e),o=r.bind((function(t){return an(t)})).map((function(t){return un(t)})),je(r,o,(function(t,e){return z(e,(function(e){return D(mi(e.dom.cells),(function(e){return"1"===Ae(e,n)||kt(e,t)}))}))})).getOr([]));if(0!==i.length){var a=P(i,(function(e){return function(t,e,n){var r=t.dom;return X({height:r.getStyle(e,"height")||r.getAttrib(e,"height"),class:r.getAttrib(e,"class",""),type:af(e),align:rf(t,e)},n?tf(r,e):{})}(t,e.dom,wu(t))})),u=ef(a),c={type:"tabpanel",tabs:[{title:"General",name:"general",items:mf(t)},Yl(t,"row")]},s={type:"panel",items:[{type:"grid",columns:2,items:mf(t)}]};t.windowManager.open({title:"Row Properties",size:"normal",body:wu(t)?c:s,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:u,onSubmit:g(hf,t,P(i,(function(t){return t.dom})),u)})}},vf=function(t,e,n){var r=n?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[],o=function(t){return t.getParam("table_appearance_options",!0,"boolean")}(t)?[{type:"input",name:"cellspacing",label:"Cell spacing",inputMode:"numeric"},{type:"input",name:"cellpadding",label:"Cell padding",inputMode:"numeric"},{type:"input",name:"border",label:"Border width"},{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[],i=e.length>0?[{type:"listbox",name:"class",label:"Class",items:e}]:[];return r.concat([{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}]).concat(o).concat([{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]).concat(i)},bf=function(t,e,n,o){if("TD"===e.tagName||"TH"===e.tagName)r(n)?t.setStyle(e,n,o):t.setStyle(e,n);else if(e.children)for(var i=0;i<e.children.length;i++)bf(t,e.children[i],n,o)},yf=function(t,e,n,r){var o=t.dom,i=r.getData(),a=zt(i,(function(t,e){return n[e]!==t}));r.close(),""===i.class&&delete i.class,t.undoManager.transact((function(){if(!e){var n=parseInt(i.cols,10)||1,r=parseInt(i.rows,10)||1;e=fl(t,n,r,0,0)}if(Bt(a)>0){!function(t,e,n){var r=t.dom,o={},i={};if(o.class=n.class,i.height=bi(n.height),r.getAttrib(e,"width")&&!Ou(t)?o.width=function(t){return t?t.replace(/px$/,""):""}(n.width):i.width=bi(n.width),Ou(t)?(i["border-width"]=bi(n.border),i["border-spacing"]=bi(n.cellspacing)):(o.border=n.border,o.cellpadding=n.cellpadding,o.cellspacing=n.cellspacing),Ou(t)&&e.children)for(var a=0;a<e.children.length;a++)bf(r,e.children[a],{"border-width":bi(n.border),padding:bi(n.cellpadding)}),xu(t)&&bf(r,e.children[a],{"border-color":n.bordercolor});xu(t)&&(i["background-color"]=n.backgroundcolor,i["border-color"]=n.bordercolor,i["border-style"]=n.borderstyle),o.style=r.serializeStyle(X(X({},yu(t)),i)),r.setAttribs(e,X(X({},bu(t)),o))}(t,e,i);var u=o.select("caption",e)[0];(u&&!i.caption||!u&&i.caption)&&t.execCommand("mceTableToggleCaption"),""===i.align?xl(t,e):wl(t,e,i.align)}if(t.focus(),t.addVisual(),Bt(a)>0){var c=Nt(a,"caption"),s=!c||Bt(a)>1;au(t,e,{structure:c,style:s})}}))},_f=function(t,e){var n,r=t.dom,o=function(t,e){var n,r,o,i,a=yu(t),u=bu(t),c=e?(n=t.dom,{borderstyle:Ft(a,"border-style").getOr(""),bordercolor:Zl(n)(Ft(a,"border-color").getOr("")),backgroundcolor:Zl(n)(Ft(a,"background-color").getOr(""))}):{};return X(X(X(X(X(X({},{height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,class:"",align:"",border:""}),a),u),c),(i=a["border-width"],Ou(t)&&i?{border:i}:Ft(u,"border").fold((function(){return{}}),(function(t){return{border:t}})))),(r=Ft(a,"border-spacing").or(Ft(u,"cellspacing")).fold((function(){return{}}),(function(t){return{cellspacing:t}})),o=Ft(a,"border-padding").or(Ft(u,"cellpadding")).fold((function(){return{}}),(function(t){return{cellpadding:t}})),X(X({},r),o)))}(t,xu(t));!1===e?(n=r.getParent(t.selection.getStart(),"table",t.getBody()))?o=function(t,e,n){var r=t.dom,o=Ou(t)?r.getStyle(e,"border-spacing")||r.getAttrib(e,"cellspacing"):r.getAttrib(e,"cellspacing")||r.getStyle(e,"border-spacing"),i=Ou(t)?_l(r,e,"padding")||r.getAttrib(e,"cellpadding"):r.getAttrib(e,"cellpadding")||_l(r,e,"padding");return X({width:r.getStyle(e,"width")||r.getAttrib(e,"width"),height:r.getStyle(e,"height")||r.getAttrib(e,"height"),cellspacing:o,cellpadding:i,border:function(e,n){var r=$e(xt.fromDom(n),"border-width");return Ou(t)&&r.isSome()?r.getOr(""):e.getAttrib(n,"border")||_l(t.dom,n,"border-width")||_l(t.dom,n,"border")}(r,e),caption:!!r.select("caption",e)[0],class:r.getAttrib(e,"class",""),align:rf(t,e)},n?tf(r,e):{})}(t,n,xu(t)):xu(t)&&(o.borderstyle="",o.bordercolor="",o.backgroundcolor=""):(o.cols="1",o.rows="1",xu(t)&&(o.borderstyle="",o.bordercolor="",o.backgroundcolor=""));var i=Nl(Cu(t));i.length>0&&o.class&&(o.class=o.class.replace(/\s*mce\-item\-table\s*/g,""));var a={type:"grid",columns:2,items:vf(t,i,e)},u=xu(t)?{type:"tabpanel",tabs:[{title:"General",name:"general",items:[a]},Yl(t,"table")]}:{type:"panel",items:[a]};t.windowManager.open({title:"Table Properties",size:"normal",body:u,onSubmit:g(yf,t,n,o),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o})},wf=function(t){return Ei(_i(t),vi(t))},xf=function(t,e,n,i,a){var u=vi(t),c=function(t){return an(t,u)},s=function(e){return function(t){return Mi(_i(t),vi(t))}(t).bind((function(t){return c(t).map((function(n){return e(n,t)}))}))},l=function(e){t.focus()},f=function(t,e){return void 0===e&&(e=!1),s((function(n,r){var o=Ci(i,n,r);t(n,o,e).each(l)}))},m=function(){return s((function(e,n){var r=Ci(i,e,n),o=fi(d,xt.fromDom(t.getDoc()),C.none());return bl(e,r,o)}))},p=function(){return s((function(t,e){var n=Ci(i,t,e);return vl(t,n)}))},h=function(e,n){return n().each((function(n){var r=P(n,(function(t){return Sr(t)}));s((function(n,o){var a=di(xt.fromDom(t.getDoc())),u=function(t,e,n,r){return{selection:wi(t),clipboard:n,generators:r}}(i,0,r,a);e(n,u).each(l)}))}))},v=function(t){return function(e,n){return Ft(n,"type").each((function(e){f(t(e),n.no_events)}))}};Pt({mceTableSplitCells:function(){return f(e.unmergeCells)},mceTableMergeCells:function(){return f(e.mergeCells)},mceTableInsertRowBefore:function(){return f(e.insertRowsBefore)},mceTableInsertRowAfter:function(){return f(e.insertRowsAfter)},mceTableInsertColBefore:function(){return f(e.insertColumnsBefore)},mceTableInsertColAfter:function(){return f(e.insertColumnsAfter)},mceTableDeleteCol:function(){return f(e.deleteColumn)},mceTableDeleteRow:function(){return f(e.deleteRow)},mceTableCutCol:function(){return p().each((function(t){a.setColumns(t),f(e.deleteColumn)}))},mceTableCutRow:function(){return m().each((function(t){a.setRows(t),f(e.deleteRow)}))},mceTableCopyCol:function(){return p().each((function(t){return a.setColumns(t)}))},mceTableCopyRow:function(){return m().each((function(t){return a.setRows(t)}))},mceTablePasteColBefore:function(){return h(e.pasteColsBefore,a.getColumns)},mceTablePasteColAfter:function(){return h(e.pasteColsAfter,a.getColumns)},mceTablePasteRowBefore:function(){return h(e.pasteRowsBefore,a.getRows)},mceTablePasteRowAfter:function(){return h(e.pasteRowsAfter,a.getRows)},mceTableDelete:function(){return wf(t).each((function(e){an(e,u).filter(y(u)).each((function(e){var n=xt.fromText("");if(Fn(e,n),Gn(e),t.dom.isEmpty(t.getBody()))t.setContent(""),t.selection.setCursorLocation();else{var r=t.dom.createRng();r.setStart(n.dom,0),r.setEnd(n.dom,0),t.selection.setRng(r),t.nodeChanged()}}))}))},mceTableCellToggleClass:function(e,n){s((function(e){var r=Ti(i),o=V(r,(function(e){return t.formatter.match("tablecellclass",{value:n},e.dom)}))?t.formatter.remove:t.formatter.apply;R(r,(function(t){return o("tablecellclass",{value:n},t.dom)})),au(t,e.dom,uu)}))},mceTableToggleClass:function(e,n){s((function(e){t.formatter.toggle("tableclass",{value:n},e.dom),au(t,e.dom,uu)}))},mceTableToggleCaption:function(){wf(t).each((function(e){an(e,u).each((function(n){Ce(n,"caption").fold((function(){var e=xt.fromTag("caption");Hn(e,xt.fromText("Caption")),function(t,e,n){se(t,n).fold((function(){Hn(t,e)}),(function(t){Bn(t,e)}))}(n,e,0),t.selection.setCursorLocation(e.dom,0)}),(function(r){ee("caption")(e)&&Ct("td",n).each((function(e){return t.selection.setCursorLocation(e.dom,0)})),Gn(r)})),au(t,n.dom,cu)}))}))},mceTableSizingMode:function(e,n){return function(e){return wf(t).each((function(n){Mu(t)||Eu(t)||ku(t)||an(n,u).each((function(n){"relative"!==e||aa(n)?"fixed"!==e||ua(n)?"responsive"!==e||ca(n)||Hu(n):Nu(n):Fu(n),yi(n),au(t,n.dom,cu)}))}))}(n)},mceTableCellType:v((function(t){return"th"===t?e.makeCellsHeader:e.unmakeCellsHeader})),mceTableColType:v((function(t){return"th"===t?e.makeColumnsHeader:e.unmakeColumnsHeader})),mceTableRowType:v((function(t){switch(t){case"header":return e.makeRowsHeader;case"footer":return e.makeRowsFooter;default:return e.makeRowsBody}}))},(function(e,n){return t.addCommand(n,e)})),Pt({mceTableProps:g(_f,t,!1),mceTableRowProps:g(gf,t),mceTableCellProps:g(ff,t,i)},(function(e,n){return t.addCommand(n,(function(){return e()}))})),t.addCommand("mceInsertTable",(function(e,n){o(n)&&Dt(n).length>0?dl(t,n.rows,n.columns,n.options):_f(t,!0)})),t.addCommand("mceTableApplyCellStyle",(function(e,n){var a=function(t){return"tablecell"+t.toLowerCase().replace("-","")};if(o(n)){var u=Ti(i);if(0!==u.length){var s=zt(n,(function(e,n){return t.formatter.has(a(n))&&r(e)}));(function(t){for(var e in t)if(At.call(t,e))return!1;return!0})(s)||(Pt(s,(function(e,n){R(u,(function(r){Ql.normal(t,r.dom).setFormat(a(n),e)}))})),c(u[0]).each((function(e){return au(t,e.dom,uu)})))}}}))},Of={remove_similar:!0,inherit:!1},Sf=X({selector:"td,th"},Of),Cf={tablecellbackgroundcolor:X({styles:{backgroundColor:"%value"}},Sf),tablecellverticalalign:X({styles:{"vertical-align":"%value"}},Sf),tablecellbordercolor:X({styles:{borderColor:"%value"}},Sf),tablecellclass:X({classes:["%value"]},Sf),tableclass:X({selector:"table",classes:["%value"]},Of),tablecellborderstyle:X({styles:{borderStyle:"%value"}},Sf),tablecellborderwidth:X({styles:{borderWidth:"%value"}},Sf)},kf=hr([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),Ef=X(X({},kf),{none:function(t){return void 0===t&&(t=void 0),kf.none(t)}}),Mf=function(t,e,n,r,o){void 0===o&&(o=w);var i=1===r;if(!i&&n<=0)return Ef.first(t[0]);if(i&&n>=t.length-1)return Ef.last(t[t.length-1]);var a=n+r,u=t[a];return o(u)?Ef.middle(e,u):Mf(t,e,a,r,o)},Tf=function(t,e){return an(t,e).bind((function(e){var n=rn(e);return F(n,(function(e){return kt(t,e)})).map((function(t){return{index:t,all:n}}))}))},Df=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},Af=hr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Pf={before:Af.before,on:Af.on,after:Af.after,cata:function(t,e,n,r){return t.fold(e,n,r)},getStart:function(t){return t.fold(p,p,p)}},Rf=hr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),If={domRange:Rf.domRange,relative:Rf.relative,exact:Rf.exact,exactFromRange:function(t){return Rf.exact(t.start,t.soffset,t.finish,t.foffset)},getWin:function(t){var e,n=function(t){return t.match({domRange:function(t){return xt.fromDom(t.startContainer)},relative:function(t,e){return Pf.getStart(t)},exact:function(t,e,n,r){return t}})}(t);return e=n,xt.fromDom(re(e).dom.defaultView)},range:Df},zf=function(t,e){var n=t.document.createRange();return n.selectNode(e.dom),n},Lf=function(t,e){var n=t.document.createRange();return jf(n,e),n},jf=function(t,e){return t.selectNodeContents(e.dom)},Bf=function(t,e,n){var r,o=t.document.createRange();return r=o,e.fold((function(t){r.setStartBefore(t.dom)}),(function(t,e){r.setStart(t.dom,e)}),(function(t){r.setStartAfter(t.dom)})),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)}))}(o,n),o},Ff=function(t,e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},Nf=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}},Hf=hr([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Vf=function(t,e,n){return e(xt.fromDom(n.startContainer),n.startOffset,xt.fromDom(n.endContainer),n.endOffset)},Uf=function(t,e){return function(t,e){var n=e.ltr();return n.collapsed?e.rtl().filter((function(t){return!1===t.collapsed})).map((function(t){return Hf.rtl(xt.fromDom(t.endContainer),t.endOffset,xt.fromDom(t.startContainer),t.startOffset)})).getOrThunk((function(){return Vf(0,Hf.ltr,n)})):Vf(0,Hf.ltr,n)}(0,function(t,e){return e.match({domRange:function(t){return{ltr:m(t),rtl:C.none}},relative:function(e,n){return{ltr:J((function(){return Bf(t,e,n)})),rtl:J((function(){return C.some(Bf(t,n,e))}))}},exact:function(e,n,r,o){return{ltr:J((function(){return Ff(t,e,n,r,o)})),rtl:J((function(){return C.some(Ff(t,r,o,e,n))}))}}})}(t,e))},Wf=function(t,e){return Uf(t,e).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}})};Hf.ltr,Hf.rtl;var $f=function(t,e,n){return e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom},Gf=function(t,e,n,r,o){var i=function(n){var r=t.dom.createRange();return r.setStart(e.dom,n),r.collapse(!0),r},a=Xn(e).length,u=function(t,e,n,r,o){if(0===o)return 0;if(e===r)return o-1;for(var i=r,a=1;a<o;a++){var u=t(a),c=Math.abs(e-u.left);if(n<=u.bottom){if(n<u.top||c>i)return a-1;i=c}}return 0}((function(t){return i(t).getBoundingClientRect()}),n,r,o.right,a);return i(u)},Kf=function(t,e,n,r){return Qt(e)?function(t,e,n,r){var o=t.dom.createRange();o.selectNode(e.dom);var i=o.getClientRects();return q(i,(function(t){return $f(t,n,r)?C.some(t):C.none()})).map((function(o){return Gf(t,e,n,r,o)}))}(t,e,n,r):function(t,e,n,r){var o=t.dom.createRange(),i=ce(e);return q(i,(function(e){return o.selectNode(e.dom),$f(o.getBoundingClientRect(),n,r)?Kf(t,e,n,r):C.none()}))}(t,e,n,r)},qf=function(t,e){return e-t.left<t.right-e},Xf=function(t,e,n){var r=t.dom.createRange();return r.selectNode(e.dom),r.collapse(n),r},Yf=function(t,e,n){var r=t.dom.createRange();r.selectNode(e.dom);var o=r.getBoundingClientRect(),i=qf(o,n);return(!0===i?ei:ni)(e).map((function(e){return Xf(t,e,i)}))},Jf=function(t,e,n){var r=e.dom.getBoundingClientRect(),o=qf(r,n);return C.some(Xf(t,e,o))},Qf=function(t,e,n){var r,o;return C.from(null===(o=(r=t.dom).caretPositionFromPoint)||void 0===o?void 0:o.call(r,e,n)).bind((function(e){if(null===e.offsetNode)return C.none();var n=t.dom.createRange();return n.setStart(e.offsetNode,e.offset),n.collapse(),C.some(n)}))},Zf=function(t,e,n){var r,o;return C.from(null===(o=(r=t.dom).caretRangeFromPoint)||void 0===o?void 0:o.call(r,e,n))},td=function(t,e,n,r){var o=t.dom.createRange();o.selectNode(e.dom);var i=o.getBoundingClientRect();return function(t,e,n,r){var o=t.dom.createRange();o.selectNode(e.dom);var i=o.getBoundingClientRect(),a=Math.max(i.left,Math.min(i.right,n)),u=Math.max(i.top,Math.min(i.bottom,r));return Kf(t,e,a,u)}(t,e,Math.max(i.left,Math.min(i.right,n)),Math.max(i.top,Math.min(i.bottom,r)))},ed=function(t,e,n){return xt.fromPoint(t,e,n).bind((function(r){var o=function(){return function(t,e,n){return(0===ce(e).length?Jf:Yf)(t,e,n)}(t,r,e)};return 0===ce(r).length?o():td(t,r,e,n).orThunk(o)}))},nd=document.caretPositionFromPoint?Qf:document.caretRangeFromPoint?Zf:ed,rd=function(t,e){var n=Kt(t);return"input"===n?Pf.after(t):T(["br","img"],n)?0===e?Pf.before(t):Pf.after(t):Pf.on(t,e)},od=function(t,e){var n=t.fold(Pf.before,rd,Pf.after),r=e.fold(Pf.before,rd,Pf.after);return If.relative(n,r)},id=function(t,e,n,r){var o=rd(t,e),i=rd(n,r);return If.relative(o,i)},ad=function(t,e,n,r){var o=function(t,e,n,r){var o=ne(t).dom.createRange();return o.setStart(t.dom,e),o.setEnd(n.dom,r),o}(t,e,n,r),i=kt(t,n)&&e===r;return o.collapsed&&!i},ud=function(t){return C.from(t.getSelection())},cd=function(t,e){ud(t).each((function(t){t.removeAllRanges(),t.addRange(e)}))},sd=function(t,e,n,r,o){var i=Ff(t,e,n,r,o);cd(t,i)},ld=function(t,e){return Uf(t,e).match({ltr:function(e,n,r,o){sd(t,e,n,r,o)},rtl:function(e,n,r,o){ud(t).each((function(i){if(i.setBaseAndExtent)i.setBaseAndExtent(e.dom,n,r.dom,o);else if(i.extend)try{!function(t,e,n,r,o,i){e.collapse(n.dom,r),e.extend(o.dom,i)}(0,i,e,n,r,o)}catch(i){sd(t,r,o,e,n)}else sd(t,r,o,e,n)}))}})},fd=function(t,e,n,r,o){var i=id(e,n,r,o);ld(t,i)},dd=function(t,e,n){var r=od(e,n);ld(t,r)},md=function(t){var e=If.getWin(t).dom,n=function(t,n,r,o){return Ff(e,t,n,r,o)},r=function(t){return t.match({domRange:function(t){var e=xt.fromDom(t.startContainer),n=xt.fromDom(t.endContainer);return id(e,t.startOffset,n,t.endOffset)},relative:od,exact:id})}(t);return Uf(e,r).match({ltr:n,rtl:n})},pd=function(t){if(t.rangeCount>0){var e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);return C.some(Df(xt.fromDom(e.startContainer),e.startOffset,xt.fromDom(n.endContainer),n.endOffset))}return C.none()},hd=function(t){if(null===t.anchorNode||null===t.focusNode)return pd(t);var e=xt.fromDom(t.anchorNode),n=xt.fromDom(t.focusNode);return ad(e,t.anchorOffset,n,t.focusOffset)?C.some(Df(e,t.anchorOffset,n,t.focusOffset)):pd(t)},gd=function(t,e,n){void 0===n&&(n=!0);var r=(n?Lf:zf)(t,e);cd(t,r)},vd=function(t){return function(t){return ud(t).filter((function(t){return t.rangeCount>0})).bind(hd)}(t).map((function(t){return If.exact(t.start,t.soffset,t.finish,t.foffset)}))},bd=function(t,e){return function(t){var e=t.getClientRects(),n=e.length>0?e[0]:t.getBoundingClientRect();return n.width>0||n.height>0?C.some(n).map(Nf):C.none()}(Wf(t,e))},yd=function(t,e,n){return function(t,e,n){var r=xt.fromDom(t.document);return nd(r,e,n).map((function(t){return Df(xt.fromDom(t.startContainer),t.startOffset,xt.fromDom(t.endContainer),t.endOffset)}))}(t,e,n)},_d=tinymce.util.Tools.resolve("tinymce.util.VK"),wd=function(t,e,n){return Od(t,e,function(t,e,n){return Tf(t,n).fold((function(){return Ef.none(t)}),(function(n){return Mf(n.all,t,n.index,1,e)}))}(n,Ba))},xd=function(t,e,n){return Od(t,e,function(t,e,n){return Tf(t,n).fold((function(){return Ef.none()}),(function(n){return Mf(n.all,t,n.index,-1,e)}))}(n,Ba))},Od=function(t,e,n){return n.fold(C.none,C.none,(function(t,e){return ei(e).map((function(t){return function(t,e){var n=If.exact(e,0,e,0);return md(n)}(0,t)}))}),(function(n){return t.execCommand("mceTableInsertRowAfter"),wd(t,e,n)}))},Sd=["table","li","dl"],Cd=function(t,e){return{selection:t,kill:e}},kd=function(t,e,n,r){return{start:Pf.on(t,e),finish:Pf.on(n,r)}},Ed=function(t,e){var n=Wf(t,e);return Df(xt.fromDom(n.startContainer),n.startOffset,xt.fromDom(n.endContainer),n.endOffset)},Md=kd,Td=function(t,e,n,r,o){return kt(n,r)?C.none():sr(n,r,e).bind((function(e){var r=e.boxes.getOr([]);return r.length>1?(o(t,r,e.start,e.finish),C.some(Cd(C.some(Md(n,0,n,Qo(n))),!0))):C.none()}))},Dd=function(t,e){return{item:t,mode:e}},Ad=function(t,e,n,r){return void 0===r&&(r=Pd),t.property().parent(e).map((function(t){return Dd(t,r)}))},Pd=function(t,e,n,r){return void 0===r&&(r=Rd),n.sibling(t,e).map((function(t){return Dd(t,r)}))},Rd=function(t,e,n,r){void 0===r&&(r=Rd);var o=t.property().children(e);return n.first(o).map((function(t){return Dd(t,r)}))},Id=[{current:Ad,next:Pd,fallback:C.none()},{current:Pd,next:Rd,fallback:C.some(Ad)},{current:Rd,next:Rd,fallback:C.some(Pd)}],zd=function(t,e,n,r,o){return void 0===o&&(o=Id),B(o,(function(t){return t.current===n})).bind((function(n){return n.current(t,e,r,n.next).orThunk((function(){return n.fallback.bind((function(n){return zd(t,e,n,r)}))}))}))},Ld=function(){return{sibling:function(t,e){return t.query().prevSibling(e)},first:function(t){return t.length>0?C.some(t[t.length-1]):C.none()}}},jd=function(){return{sibling:function(t,e){return t.query().nextSibling(e)},first:function(t){return t.length>0?C.some(t[0]):C.none()}}},Bd=function(t,e,n,r,o,i){return zd(t,e,r,o).bind((function(e){return i(e.item)?C.none():n(e.item)?C.some(e.item):Bd(t,e.item,n,e.mode,o,i)}))},Fd=function(t){return function(e){return 0===t.property().children(e).length}},Nd=function(t,e,n,r){return Bd(t,e,n,Pd,Ld(),r)},Hd=function(t,e,n,r){return Bd(t,e,n,Pd,jd(),r)},Vd=Zn(),Ud=function(t,e){return function(t,e,n){return Nd(t,e,Fd(t),n)}(Vd,t,e)},Wd=function(t,e){return function(t,e,n){return Hd(t,e,Fd(t),n)}(Vd,t,e)},$d=hr([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),Gd=function(t){return Ee(t,"tr")},Kd=X(X({},$d),{verify:function(t,e,n,r,o,i,a){return Ee(r,"td,th",a).bind((function(n){return Ee(e,"td,th",a).map((function(e){return kt(n,e)?kt(r,n)&&Qo(n)===o?i(e):$d.none("in same cell"):ur(Gd,[n,e]).fold((function(){return function(t,e,n){var r=t.getRect(e),o=t.getRect(n);return o.right>r.left&&o.left<r.right}(t,e,n)?$d.success():i(e)}),(function(t){return i(e)}))}))})).getOr($d.none("default"))},cata:function(t,e,n,r,o){return t.fold(e,n,r,o)}}),qd=function(t,e){return F(t,g(kt,e))},Xd=function(t){return"br"===Kt(t)},Yd=function(t,e,n){return e(t,n).bind((function(t){return Qt(t)&&0===Xn(t).trim().length?Yd(t,e,n):C.some(t)}))},Jd=function(t,e,n,r){return function(t,e){return se(t,e).filter(Xd).orThunk((function(){return se(t,e-1).filter(Xd)}))}(e,n).bind((function(e){return r.traverse(e).fold((function(){return Yd(e,r.gather,t).map(r.relative)}),(function(t){return function(t){return oe(t).bind((function(e){var n=ce(e);return qd(n,t).map((function(r){return function(t,e,n,r){return{parent:t,children:e,element:n,index:r}}(e,n,t,r)}))}))}(t).map((function(t){return Pf.on(t.parent,t.index)}))}))}))},Qd=function(t,e,n,r){return(Xd(e)?function(t,e,n){return n.traverse(e).orThunk((function(){return Yd(e,n.gather,t)})).map(n.relative)}(t,e,r):Jd(t,e,n,r)).map((function(t){return{start:t,finish:t}}))},Zd=function(t,e){return{left:t.left,top:t.top+e,right:t.right,bottom:t.bottom+e}},tm=function(t,e){return{left:t.left,top:t.top-e,right:t.right,bottom:t.bottom-e}},em=function(t,e,n){return{left:t.left+e,top:t.top+n,right:t.right+e,bottom:t.bottom+n}},nm=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}},rm=function(t,e){return C.some(t.getRect(e))},om=function(t,e,n){return Jt(e)?rm(t,e).map(nm):Qt(e)?function(t,e,n){return n>=0&&n<Qo(e)?t.getRangedRect(e,n,e,n+1):n>0?t.getRangedRect(e,n-1,e,n):C.none()}(t,e,n).map(nm):C.none()},im=function(t,e){return Jt(e)?rm(t,e).map(nm):Qt(e)?t.getRangedRect(e,0,e,Qo(e)).map(nm):C.none()},am=hr([{none:[]},{retry:["caret"]}]),um=function(t,e,n){return(r=e,o=ms,xe((function(t,e){return e(t)}),Oe,r,o,i)).fold(_,(function(e){return im(t,e).exists((function(t){return function(t,e){return t.left<e.left||Math.abs(e.right-t.left)<1||t.left>e.right}(n,t)}))}));var r,o,i},cm={point:function(t){return t.bottom},adjuster:function(t,e,n,r,o){var i=Zd(o,5);return Math.abs(n.bottom-r.bottom)<1||n.top>o.bottom?am.retry(i):n.top===o.bottom?am.retry(Zd(o,1)):um(t,e,o)?am.retry(em(i,5,0)):am.none()},move:Zd,gather:Wd},sm=function(t,e,n,r,o){return 0===o?C.some(r):function(t,e,n){return t.elementFromPoint(e,n).filter((function(t){return"table"===Kt(t)})).isSome()}(t,r.left,e.point(r))?function(t,e,n,r,o){return sm(t,e,n,e.move(r,5),o)}(t,e,n,r,o-1):t.situsFromPoint(r.left,e.point(r)).bind((function(i){return i.start.fold(C.none,(function(i){return im(t,i).bind((function(a){return e.adjuster(t,i,a,n,r).fold(C.none,(function(r){return sm(t,e,n,r,o-1)}))})).orThunk((function(){return C.some(r)}))}),C.none)}))},lm=function(t,e,n){var r=t.move(n,5),o=sm(e,t,n,r,100).getOr(r);return function(t,e,n){return t.point(e)>n.getInnerHeight()?C.some(t.point(e)-n.getInnerHeight()):t.point(e)<0?C.some(-t.point(e)):C.none()}(t,o,e).fold((function(){return e.situsFromPoint(o.left,t.point(o))}),(function(n){return e.scrollBy(0,n),e.situsFromPoint(o.left,t.point(o)-n)}))},fm={tryUp:g(lm,{point:function(t){return t.top},adjuster:function(t,e,n,r,o){var i=tm(o,5);return Math.abs(n.top-r.top)<1||n.bottom<o.top?am.retry(i):n.bottom===o.top?am.retry(tm(o,1)):um(t,e,o)?am.retry(em(i,5,0)):am.none()},move:tm,gather:Ud}),tryDown:g(lm,cm),ieTryUp:function(t,e){return t.situsFromPoint(e.left,e.top-5)},ieTryDown:function(t,e){return t.situsFromPoint(e.left,e.bottom+5)},getJumpSize:m(5)},dm=function(t,e,n){return t.getSelection().bind((function(r){return Qd(e,r.finish,r.foffset,n).fold((function(){return C.some($u(r.finish,r.foffset))}),(function(o){var i=t.fromSitus(o);return function(t){return Kd.cata(t,(function(t){return C.none()}),(function(){return C.none()}),(function(t){return C.some($u(t,0))}),(function(t){return C.some($u(t,Qo(t)))}))}(Kd.verify(t,r.finish,r.foffset,i.finish,i.foffset,n.failure,e))}))}))},mm=function(t,e,n,r,o,i){return 0===i?C.none():gm(t,e,n,r,o).bind((function(a){var u=t.fromSitus(a),c=Kd.verify(t,n,r,u.finish,u.foffset,o.failure,e);return Kd.cata(c,(function(){return C.none()}),(function(){return C.some(a)}),(function(a){return kt(n,a)&&0===r?pm(t,n,r,tm,o):mm(t,e,a,0,o,i-1)}),(function(a){return kt(n,a)&&r===Qo(a)?pm(t,n,r,Zd,o):mm(t,e,a,Qo(a),o,i-1)}))}))},pm=function(t,e,n,r,o){return om(t,e,n).bind((function(e){return hm(t,o,r(e,fm.getJumpSize()))}))},hm=function(t,e,n){var r=_t().browser;return r.isChrome()||r.isSafari()||r.isFirefox()||r.isEdge()?e.otherRetry(t,n):r.isIE()?e.ieRetry(t,n):C.none()},gm=function(t,e,n,r,o){return om(t,n,r).bind((function(e){return hm(t,o,e)}))},vm=function(t,e){return Oe(t,(function(t){return oe(t).exists((function(t){return kt(t,e)}))}),n).isSome();var n},bm=function(t,e,n,r,o){return Ee(r,"td,th",e).bind((function(r){return Ee(r,"table",e).bind((function(i){return vm(o,i)?function(t,e,n){return dm(t,e,n).bind((function(r){return mm(t,e,r.element,r.offset,n,20).map(t.fromSitus)}))}(t,e,n).bind((function(t){return Ee(t.finish,"td,th",e).map((function(e){return{start:r,finish:e,range:t}}))})):C.none()}))}))},ym=function(t,e,n,r,o,i){return _t().browser.isIE()?C.none():i(r,e).orThunk((function(){return bm(t,e,n,r,o).map((function(t){var e=t.range;return Cd(C.some(Md(e.start,e.soffset,e.finish,e.foffset)),!0)}))}))},_m=function(t,e){return Ee(t,"tr",e).bind((function(t){return Ee(t,"table",e).bind((function(n){var r=we(n,"tr");return kt(t,r[0])?function(t,e,n){return Nd(Vd,t,e,n)}(n,(function(t){return ni(t).isSome()}),e).map((function(t){var e=Qo(t);return Cd(C.some(Md(t,e,t,e)),!0)})):C.none()}))}))},wm=function(t,e){return Ee(t,"tr",e).bind((function(t){return Ee(t,"table",e).bind((function(n){var r=we(n,"tr");return kt(t,r[r.length-1])?function(t,e,n){return Hd(Vd,t,e,n)}(n,(function(t){return ei(t).isSome()}),e).map((function(t){return Cd(C.some(Md(t,0,t,0)),!0)})):C.none()}))}))},xm=function(t,e,n,r,o,i,a){return bm(t,n,r,o,i).bind((function(t){return Td(e,n,t.start,t.finish,a)}))},Om=function(t,e){return Ee(t,"td,th",e)},Sm={traverse:ue,gather:Wd,relative:Pf.before,otherRetry:fm.tryDown,ieRetry:fm.ieTryDown,failure:Kd.failedDown},Cm={traverse:ae,gather:Ud,relative:Pf.before,otherRetry:fm.tryUp,ieRetry:fm.ieTryUp,failure:Kd.failedUp},km=function(t){return function(e){return e===t}},Em=km(38),Mm=km(40),Tm=function(t){return t>=37&&t<=40},Dm={isBackward:km(37),isForward:km(39)},Am={isBackward:km(39),isForward:km(37)},Pm=function(t){return{elementFromPoint:function(e,n){return xt.fromPoint(xt.fromDom(t.document),e,n)},getRect:function(t){return t.dom.getBoundingClientRect()},getRangedRect:function(e,n,r,o){var i=If.exact(e,n,r,o);return bd(t,i)},getSelection:function(){return vd(t).map((function(e){return Ed(t,e)}))},fromSitus:function(e){var n=If.relative(e.start,e.finish);return Ed(t,n)},situsFromPoint:function(e,n){return yd(t,e,n).map((function(t){return kd(t.start,t.soffset,t.finish,t.foffset)}))},clearSelection:function(){!function(t){ud(t).each((function(t){return t.removeAllRanges()}))}(t)},collapseSelection:function(e){void 0===e&&(e=!1),vd(t).each((function(n){return n.fold((function(t){return t.collapse(e)}),(function(n,r){var o=e?n:r;dd(t,o,o)}),(function(n,r,o,i){var a=e?n:o,u=e?r:i;fd(t,a,u,a,u)}))}))},setSelection:function(e){fd(t,e.start,e.soffset,e.finish,e.foffset)},setRelativeSelection:function(e,n){dd(t,e,n)},selectNode:function(e){gd(t,e,!1)},selectContents:function(e){gd(t,e)},getInnerHeight:function(){return t.innerHeight},getScrollY:function(){var e,n,r,o;return(e=xt.fromDom(t.document),n=void 0!==e?e.dom:document,r=n.body.scrollLeft||n.documentElement.scrollLeft,o=n.body.scrollTop||n.documentElement.scrollTop,Xr(r,o)).top},scrollBy:function(e,n){!function(t,e,n){var r=(void 0!==n?n.dom:document).defaultView;r&&r.scrollBy(t,e)}(e,n,xt.fromDom(t.document))}}},Rm=function(t,e){return{rows:t,cols:e}},Im=function(t,e,n,r){var o=function(t,e,n,r){var o=jl(),i=o.clear,a=function(i){o.on((function(o){r.clearBeforeUpdate(e),Om(i.target,n).each((function(a){sr(o,a,n).each((function(n){var o=n.boxes.getOr([]);if(1===o.length){var u=o[0],c="false"===Fa(u),s=ze(ja(i.target),u,kt);c&&s&&(r.selectRange(e,o,u,u),t.selectContents(u))}else o.length>1&&(r.selectRange(e,o,n.start,n.finish),t.selectContents(a))}))}))}))};return{clearstate:i,mousedown:function(t){r.clear(e),Om(t.target,n).each(o.set)},mouseover:function(t){a(t)},mouseup:function(t){a(t),i()}}}(Pm(t),e,n,r);return{clearstate:o.clearstate,mousedown:o.mousedown,mouseover:o.mouseover,mouseup:o.mouseup}},zm=function(t,e,n,r){var o=Pm(t),i=function(){return r.clear(e),C.none()};return{keydown:function(t,a,u,c,s,l){var f=t.raw,d=f.which,m=!0===f.shiftKey;return lr(e,r.selectedSelector).fold((function(){return Tm(d)&&!m&&r.clearBeforeUpdate(e),Mm(d)&&m?g(xm,o,e,n,Sm,c,a,r.selectRange):Em(d)&&m?g(xm,o,e,n,Cm,c,a,r.selectRange):Mm(d)?g(ym,o,n,Sm,c,a,wm):Em(d)?g(ym,o,n,Cm,c,a,_m):C.none}),(function(t){var n=function(n){return function(){return q(n,(function(n){return function(t,e,n,r,o){return dr(r,t,e,o.firstSelectedSelector,o.lastSelectedSelector).map((function(t){return o.clearBeforeUpdate(n),o.selectRange(n,t.boxes,t.start,t.finish),t.boxes}))}(n.rows,n.cols,e,t,r)})).fold((function(){return fr(e,r.firstSelectedSelector,r.lastSelectedSelector).map((function(t){var n=Mm(d)||l.isForward(d)?Pf.after:Pf.before;return o.setRelativeSelection(Pf.on(t.first,0),n(t.table)),r.clear(e),Cd(C.none(),!0)}))}),(function(t){return C.some(Cd(C.none(),!0))}))}};return Mm(d)&&m?n([Rm(1,0)]):Em(d)&&m?n([Rm(-1,0)]):l.isBackward(d)&&m?n([Rm(0,-1),Rm(-1,0)]):l.isForward(d)&&m?n([Rm(0,1),Rm(1,0)]):Tm(d)&&!m?i:C.none}))()},keyup:function(t,o,i,a,u){return lr(e,r.selectedSelector).fold((function(){var c=t.raw,s=c.which;return!0===c.shiftKey&&Tm(s)?function(t,e,n,r,o,i,a){return kt(n,o)&&r===i?C.none():Ee(n,"td,th",e).bind((function(n){return Ee(o,"td,th",e).bind((function(r){return Td(t,e,n,r,a)}))}))}(e,n,o,i,a,u,r.selectRange):C.none()}),C.none)}}},Lm=function(t,e,n){var r=function(e){Re(e,t.selected),Re(e,t.firstSelected),Re(e,t.lastSelected)},o=function(e){Te(e,t.selected,"1")},i=function(t){a(t),n()},a=function(e){var n=we(e,t.selectedSelector+","+t.firstSelectedSelector+","+t.lastSelectedSelector);R(n,r)};return{clearBeforeUpdate:a,clear:i,selectRange:function(n,r,a,u){i(n),R(r,o),Te(a,t.firstSelected,"1"),Te(u,t.lastSelected,"1"),e(r,a,u)},selectedSelector:t.selectedSelector,firstSelectedSelector:t.firstSelectedSelector,lastSelectedSelector:t.lastSelectedSelector}},jm=function(t,e,n){var r=En.fromTable(t);return Cc(r,e).map((function(t){var e=yc(r,n,!1);return{upOrLeftCells:function(t,e){var n=t.slice(0,e[e.length-1].row+1),r=_c(n);return H(r,(function(t){var n=t.cells.slice(0,e[e.length-1].column+1);return P(n,(function(t){return t.element}))}))}(e,t),downOrRightCells:function(t,e){var n=t.slice(e[0].row+e[0].rowspan-1,t.length),r=_c(n);return H(r,(function(t){var n=t.cells.slice(e[0].column+e[0].colspan-1,t.cells.length);return P(n,(function(t){return t.element}))}))}(e,t)}}))},Bm=tinymce.util.Tools.resolve("tinymce.Env"),Fm=function(t){return!1===Pa(xt.fromDom(t.target),"ephox-snooker-resizer-bar")};function Nm(t,e,n){var r=Lm(Si,(function(e,r,o){n.targets().each((function(n){an(r).each((function(i){var a=Iu(t),u=fi(d,xt.fromDom(t.getDoc()),a),c=jm(i,n,u);!function(t,e,n,r,o){t.fire("TableSelectionChange",{cells:e,start:n,finish:r,otherCells:o})}(t,e,r,o,c)}))}))}),(function(){return function(t){t.fire("TableSelectionClear")}(t)}));return t.on("init",(function(n){var o=t.getWin(),i=pi(t),a=vi(t),u=Im(o,i,a,r),c=zm(o,i,a,r),s=function(t,e,n,r){var o=Pm(t);return function(t,i){r.clearBeforeUpdate(e),sr(t,i,n).each((function(t){var n=t.boxes.getOr([]);r.selectRange(e,n,t.start,t.finish),o.selectContents(i),o.collapseSelection()}))}}(o,i,a,r);t.on("TableSelectorChange",(function(t){return s(t.start,t.finish)}));var l,f,m=function(e,n){(function(t){return!0===t.raw.shiftKey})(e)&&(n.kill&&e.kill(),n.selection.each((function(e){var n=If.relative(e.start,e.finish),r=Wf(o,n);t.selection.setRng(r)})))},p=function(t){return 0===t.button},h=(l=zl(xt.fromDom(i)),f=zl(0),{touchEnd:function(t){var e=xt.fromDom(t.target);if("td"===Kt(e)||"th"===Kt(e)){var n=l.get(),r=f.get();kt(n,e)&&t.timeStamp-r<300&&(t.preventDefault(),s(e,e))}l.set(e),f.set(t.timeStamp)}});t.on("dragstart",(function(t){u.clearstate()})),t.on("mousedown",(function(t){p(t)&&Fm(t)&&u.mousedown(Ea(t))})),t.on("mouseover",(function(t){var e;(void 0===(e=t).buttons||Bm.browser.isEdge()&&0===e.buttons||0!=(1&e.buttons))&&Fm(t)&&u.mouseover(Ea(t))})),t.on("mouseup",(function(t){p(t)&&Fm(t)&&u.mouseup(Ea(t))})),t.on("touchend",h.touchEnd),t.on("keyup",(function(e){var n=Ea(e);if(n.raw.shiftKey&&Tm(n.raw.which)){var r=t.selection.getRng(),o=xt.fromDom(r.startContainer),i=xt.fromDom(r.endContainer);c.keyup(n,o,r.startOffset,i,r.endOffset).each((function(t){m(n,t)}))}})),t.on("keydown",(function(n){var r=Ea(n);e().each((function(t){return t.hideBars()}));var o=t.selection.getRng(),i=xt.fromDom(o.startContainer),a=xt.fromDom(o.endContainer),u=Vr(Dm,Am)(xt.fromDom(t.selection.getStart()));c.keydown(r,i,o.startOffset,a,o.endOffset,u).each((function(t){m(r,t)})),e().each((function(t){return t.showBars()}))})),t.on("NodeChange",(function(){var e=t.selection,n=xt.fromDom(e.getStart()),o=xt.fromDom(e.getEnd());ur(an,[n,o]).fold((function(){return r.clear(i)}),d)}))})),{clear:r.clear}}var Hm=function(t,e){var n=zl(C.none()),r=zl([]),o=C.none(),i=ee("caption"),a=function(t){return o.forall((function(e){return!e[t]}))},u=function(){return Ei(function(t){return xt.fromDom(t.selection.getEnd())}(t),vi(t))},c=function(){return Ei(_i(t),vi(t)).bind((function(t){return je(an(t),u().bind(an),(function(n,r){return kt(n,r)?i(t)?C.some(function(t){return{element:t,mergable:C.none(),unmergable:C.none(),selection:[t]}}(t)):C.some(Ci(e,n,t)):C.none()})).bind(p)}))},s=function(t){return an(t.element).map((function(e){var n=En.fromTable(e),r=Cc(n,t).getOr([]),o=j(r,(function(t,e){return e.isLocked&&(t.onAny=!0,0===e.column?t.onFirst=!0:e.column+e.colspan>=n.grid.columns&&(t.onLast=!0)),t}),{onAny:!1,onFirst:!1,onLast:!1});return{mergeable:Mc(n,t).isSome(),unmergeable:Tc(n,t).isSome(),locked:o}}))},l=function(){n.set(J(c)()),o=n.get().bind(s),R(r.get(),(function(t){return t()}))},f=function(t){return t(),r.set(r.get().concat([t])),function(){r.set(z(r.get(),(function(e){return e!==t})))}},d=function(t,e){return f((function(){return n.get().fold((function(){t.setDisabled(!0)}),(function(n){t.setDisabled(e(n))}))}))},m=function(t,e,r){return f((function(){return n.get().fold((function(){t.setDisabled(!0),t.setActive(!1)}),(function(n){t.setDisabled(e(n)),t.setActive(r(n))}))}))},h=function(t){return o.exists((function(e){return e.locked[t]}))},g=function(e,n){return function(r){return m(r,(function(t){return i(t.element)}),(function(){return t.queryCommandValue(e)===n}))}},v=g("mceTableRowType","header"),b=g("mceTableColType","th");return t.on("NodeChange ExecCommand TableSelectorChange",l),{onSetupTable:function(t){return d(t,(function(t){return!1}))},onSetupCellOrRow:function(t){return d(t,(function(t){return i(t.element)}))},onSetupColumn:function(t){return function(e){return d(e,(function(e){return i(e.element)||h(t)}))}},onSetupPasteable:function(t){return function(e){return d(e,(function(e){return i(e.element)||t().isNone()}))}},onSetupPasteableColumn:function(t,e){return function(n){return d(n,(function(n){return i(n.element)||t().isNone()||h(e)}))}},onSetupMergeable:function(t){return d(t,(function(t){return a("mergeable")}))},onSetupUnmergeable:function(t){return d(t,(function(t){return a("unmergeable")}))},resetTargets:l,onSetupTableWithCaption:function(e){return m(e,_,(function(e){return an(e.element,vi(t)).exists((function(t){return Ce(t,"caption").isSome()}))}))},onSetupTableRowHeaders:v,onSetupTableColumnHeaders:b,targets:n.get}},Vm=function(t){var e=function(t,e,n){return{get:function(){return mr(t(),n).fold((function(){return e().fold(br,_r)}),(function(t){return yr(t)}))}}}((function(){return pi(t)}),(function(){return Mi(_i(t),vi(t))}),Si.selectedSelector),n=Hm(t,e),r=Wu(t),o=Nm(t,r.lazyResize,n),i=al(t,o,r.lazyWire),a=function(){var t=jl(),e=jl();return{getRows:t.get,setRows:function(n){n.fold(t.clear,t.set),e.clear()},clearRows:t.clear,getColumns:e.get,setColumns:function(n){n.fold(e.clear,e.set),t.clear()},clearColumns:e.clear}}();return xf(t,i,0,e,a),function(t,e,n){var r=vi(t),o=function(e){return Mi(_i(t)).bind((function(t){return an(t,r).map((function(r){var o=Ci(n,r,t);return e(r,o)}))})).getOr("")};Pt({mceTableRowType:function(){return o(e.getTableRowType)},mceTableCellType:function(){return o(e.getTableCellType)},mceTableColType:function(){return o(e.getTableColType)}},(function(e,n){return t.addQueryValueHandler(n,e)}))}(t,i,e),Di(t,e,i),function(t,e,n,r){var o=function(e){return function(){return t.execCommand(e)}},i=function(e){t.execCommand("mceInsertTable",!1,{rows:e.numRows,columns:e.numColumns})},a={text:"Table properties",onSetup:n.onSetupTable,onAction:o("mceTableProps")},u={text:"Delete table",icon:"table-delete-table",onSetup:n.onSetupTable,onAction:o("mceTableDelete")};t.ui.registry.addMenuItem("tableinsertrowbefore",{text:"Insert row before",icon:"table-insert-row-above",onAction:o("mceTableInsertRowBefore"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tableinsertrowafter",{text:"Insert row after",icon:"table-insert-row-after",onAction:o("mceTableInsertRowAfter"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tabledeleterow",{text:"Delete row",icon:"table-delete-row",onAction:o("mceTableDeleteRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablerowprops",{text:"Row properties",icon:"table-row-properties",onAction:o("mceTableRowProps"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablecutrow",{text:"Cut row",icon:"cut-row",onAction:o("mceTableCutRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablecopyrow",{text:"Copy row",icon:"duplicate-row",onAction:o("mceTableCopyRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablepasterowbefore",{text:"Paste row before",icon:"paste-row-before",onAction:o("mceTablePasteRowBefore"),onSetup:n.onSetupPasteable(r.getRows)}),t.ui.registry.addMenuItem("tablepasterowafter",{text:"Paste row after",icon:"paste-row-after",onAction:o("mceTablePasteRowAfter"),onSetup:n.onSetupPasteable(r.getRows)});var c={type:"nestedmenuitem",text:"Row",getSubmenuItems:m("tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter")};t.ui.registry.addMenuItem("tableinsertcolumnbefore",{text:"Insert column before",icon:"table-insert-column-before",onAction:o("mceTableInsertColBefore"),onSetup:n.onSetupColumn("onFirst")}),t.ui.registry.addMenuItem("tableinsertcolumnafter",{text:"Insert column after",icon:"table-insert-column-after",onAction:o("mceTableInsertColAfter"),onSetup:n.onSetupColumn("onLast")}),t.ui.registry.addMenuItem("tabledeletecolumn",{text:"Delete column",icon:"table-delete-column",onAction:o("mceTableDeleteCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addMenuItem("tablecutcolumn",{text:"Cut column",icon:"cut-column",onAction:o("mceTableCutCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addMenuItem("tablecopycolumn",{text:"Copy column",icon:"duplicate-column",onAction:o("mceTableCopyCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addMenuItem("tablepastecolumnbefore",{text:"Paste column before",icon:"paste-column-before",onAction:o("mceTablePasteColBefore"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onFirst")}),t.ui.registry.addMenuItem("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",onAction:o("mceTablePasteColAfter"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onLast")});var s={type:"nestedmenuitem",text:"Column",getSubmenuItems:m("tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter")};t.ui.registry.addMenuItem("tablecellprops",{text:"Cell properties",icon:"table-cell-properties",onAction:o("mceTableCellProps"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablemergecells",{text:"Merge cells",icon:"table-merge-cells",onAction:o("mceTableMergeCells"),onSetup:n.onSetupMergeable}),t.ui.registry.addMenuItem("tablesplitcells",{text:"Split cell",icon:"table-split-cells",onAction:o("mceTableSplitCells"),onSetup:n.onSetupUnmergeable});var l={type:"nestedmenuitem",text:"Cell",getSubmenuItems:m("tablecellprops tablemergecells tablesplitcells")};!1===function(t){return t.getParam("table_grid",!0,"boolean")}(t)?t.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:o("mceInsertTable")}):t.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"inserttable",onAction:i}]}}),t.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:o("mceInsertTable")}),t.ui.registry.addMenuItem("tableprops",a),t.ui.registry.addMenuItem("deletetable",u),t.ui.registry.addNestedMenuItem("row",c),t.ui.registry.addNestedMenuItem("column",s),t.ui.registry.addNestedMenuItem("cell",l),t.ui.registry.addContextMenu("table",{update:function(){return n.resetTargets(),n.targets().fold(m(""),(function(t){return"caption"===Kt(t.element)?"tableprops deletetable":"cell row column | advtablesort | tableprops deletetable"}))}});var f=Ul(Cu(t));0!==f.length&&t.ui.registry.addNestedMenuItem("tableclass",{icon:"table-classes",text:"Table styles",getSubmenuItems:function(){return Hl(t,e,f,"tableclass",(function(e){return t.execCommand("mceTableToggleClass",!1,e)}))},onSetup:n.onSetupTable});var d=Ul(Su(t));0!==d.length&&t.ui.registry.addNestedMenuItem("tablecellclass",{icon:"table-cell-classes",text:"Cell styles",getSubmenuItems:function(){return Hl(t,e,d,"tablecellclass",(function(e){return t.execCommand("mceTableCellToggleClass",!1,e)}))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellvalign",{icon:"vertical-align",text:"Vertical align",getSubmenuItems:function(){return Hl(t,e,Ol,"tablecellverticalalign",Vl(t,"vertical-align"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellborderwidth",{icon:"border-width",text:"Border width",getSubmenuItems:function(){return Hl(t,e,gu(t),"tablecellborderwidth",Vl(t,"border-width"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellborderstyle",{icon:"border-style",text:"Border style",getSubmenuItems:function(){return Hl(t,e,vu(t),"tablecellborderstyle",Vl(t,"border-style"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleMenuItem("tablecaption",{icon:"table-caption",text:"Table caption",onAction:o("mceTableToggleCaption"),onSetup:n.onSetupTableWithCaption}),t.ui.registry.addNestedMenuItem("tablecellbackgroundcolor",{icon:"cell-background-color",text:"Background color",getSubmenuItems:function(){return $l(t,zu(t),"background-color")},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellbordercolor",{icon:"cell-border-color",text:"Border color",getSubmenuItems:function(){return $l(t,Lu(t),"border-color")},onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleMenuItem("tablerowheader",{text:"Row header",icon:"table-top-header",onAction:Gl(t),onSetup:n.onSetupTableRowHeaders}),t.ui.registry.addToggleMenuItem("tablecolheader",{text:"Column header",icon:"table-left-header",onAction:Kl(t),onSetup:n.onSetupTableColumnHeaders})}(t,e,n,a),function(t,e,n,r){t.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",fetch:function(t){return t("inserttable | cell row column | advtablesort | tableprops deletetable")}});var o=function(e){return function(){return t.execCommand(e)}};t.ui.registry.addButton("tableprops",{tooltip:"Table properties",onAction:o("mceTableProps"),icon:"table",onSetup:n.onSetupTable}),t.ui.registry.addButton("tabledelete",{tooltip:"Delete table",onAction:o("mceTableDelete"),icon:"table-delete-table",onSetup:n.onSetupTable}),t.ui.registry.addButton("tablecellprops",{tooltip:"Cell properties",onAction:o("mceTableCellProps"),icon:"table-cell-properties",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablemergecells",{tooltip:"Merge cells",onAction:o("mceTableMergeCells"),icon:"table-merge-cells",onSetup:n.onSetupMergeable}),t.ui.registry.addButton("tablesplitcells",{tooltip:"Split cell",onAction:o("mceTableSplitCells"),icon:"table-split-cells",onSetup:n.onSetupUnmergeable}),t.ui.registry.addButton("tableinsertrowbefore",{tooltip:"Insert row before",onAction:o("mceTableInsertRowBefore"),icon:"table-insert-row-above",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tableinsertrowafter",{tooltip:"Insert row after",onAction:o("mceTableInsertRowAfter"),icon:"table-insert-row-after",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tabledeleterow",{tooltip:"Delete row",onAction:o("mceTableDeleteRow"),icon:"table-delete-row",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablerowprops",{tooltip:"Row properties",onAction:o("mceTableRowProps"),icon:"table-row-properties",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tableinsertcolbefore",{tooltip:"Insert column before",onAction:o("mceTableInsertColBefore"),icon:"table-insert-column-before",onSetup:n.onSetupColumn("onFirst")}),t.ui.registry.addButton("tableinsertcolafter",{tooltip:"Insert column after",onAction:o("mceTableInsertColAfter"),icon:"table-insert-column-after",onSetup:n.onSetupColumn("onLast")}),t.ui.registry.addButton("tabledeletecol",{tooltip:"Delete column",onAction:o("mceTableDeleteCol"),icon:"table-delete-column",onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addButton("tablecutrow",{tooltip:"Cut row",icon:"cut-row",onAction:o("mceTableCutRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablecopyrow",{tooltip:"Copy row",icon:"duplicate-row",onAction:o("mceTableCopyRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablepasterowbefore",{tooltip:"Paste row before",icon:"paste-row-before",onAction:o("mceTablePasteRowBefore"),onSetup:n.onSetupPasteable(r.getRows)}),t.ui.registry.addButton("tablepasterowafter",{tooltip:"Paste row after",icon:"paste-row-after",onAction:o("mceTablePasteRowAfter"),onSetup:n.onSetupPasteable(r.getRows)}),t.ui.registry.addButton("tablecutcol",{tooltip:"Cut column",icon:"cut-column",onAction:o("mceTableCutCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addButton("tablecopycol",{tooltip:"Copy column",icon:"duplicate-column",onAction:o("mceTableCopyCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addButton("tablepastecolbefore",{tooltip:"Paste column before",icon:"paste-column-before",onAction:o("mceTablePasteColBefore"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onFirst")}),t.ui.registry.addButton("tablepastecolafter",{tooltip:"Paste column after",icon:"paste-column-after",onAction:o("mceTablePasteColAfter"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onLast")}),t.ui.registry.addButton("tableinsertdialog",{tooltip:"Insert table",onAction:o("mceInsertTable"),icon:"table"});var i=Ul(Cu(t));0!==i.length&&t.ui.registry.addMenuButton("tableclass",{icon:"table-classes",tooltip:"Table styles",fetch:Wl(t,e,i,"tableclass",(function(e){return t.execCommand("mceTableToggleClass",!1,e)})),onSetup:n.onSetupTable});var a=Ul(Su(t));0!==a.length&&t.ui.registry.addMenuButton("tablecellclass",{icon:"table-cell-classes",tooltip:"Cell styles",fetch:Wl(t,e,a,"tablecellclass",(function(e){return t.execCommand("mceTableCellToggleClass",!1,e)})),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellvalign",{icon:"vertical-align",tooltip:"Vertical align",fetch:Wl(t,e,Ol,"tablecellverticalalign",Vl(t,"vertical-align")),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellborderwidth",{icon:"border-width",tooltip:"Border width",fetch:Wl(t,e,gu(t),"tablecellborderwidth",Vl(t,"border-width")),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellborderstyle",{icon:"border-style",tooltip:"Border style",fetch:Wl(t,e,vu(t),"tablecellborderstyle",Vl(t,"border-style")),onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleButton("tablecaption",{tooltip:"Table caption",onAction:o("mceTableToggleCaption"),icon:"table-caption",onSetup:n.onSetupTableWithCaption}),t.ui.registry.addMenuButton("tablecellbackgroundcolor",{icon:"cell-background-color",tooltip:"Background color",fetch:function(e){return e($l(t,zu(t),"background-color"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellbordercolor",{icon:"cell-border-color",tooltip:"Border color",fetch:function(e){return e($l(t,Lu(t),"border-color"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleButton("tablerowheader",{tooltip:"Row header",icon:"table-top-header",onAction:Gl(t),onSetup:n.onSetupTableRowHeaders}),t.ui.registry.addToggleButton("tablecolheader",{tooltip:"Column header",icon:"table-left-header",onAction:Kl(t),onSetup:n.onSetupTableColumnHeaders})}(t,e,n,a),function(t){var e=function(t){return t.getParam("table_toolbar","tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol")}(t);e.length>0&&t.ui.registry.addContextToolbar("table",{predicate:function(e){return t.dom.is(e,"table")&&t.getBody().contains(e)},items:e,scope:"node",position:"node"})}(t),t.on("PreInit",(function(){t.serializer.addTempAttr(Si.firstSelected),t.serializer.addTempAttr(Si.lastSelected),function(t){t.formatter.register(Cf)}(t)})),function(t){return t.getParam("table_tab_navigation",!0,"boolean")}(t)&&t.on("keydown",(function(e){!function(t,e,n){if(t.keyCode===_d.TAB){var r=pi(e),o=function(t){var e=Kt(t);return kt(t,r)||T(Sd,e)},i=e.selection.getRng(),a=xt.fromDom(t.shiftKey?i.startContainer:i.endContainer);nn(a,o).each((function(r){t.preventDefault(),an(r,o).each(n.clear),e.selection.collapse(t.shiftKey),(t.shiftKey?xd:wd)(e,o,r).each((function(t){e.selection.setRng(t)}))}))}}(e,t,o)})),t.on("remove",(function(){r.destroy()})),function(t,e,n,r){return{insertTable:hl(t),setClipboardRows:pl(e.setRows),getClipboardRows:ml(e.getRows),setClipboardCols:pl(e.setColumns),getClipboardCols:ml(e.getColumns),resizeHandler:n,selectionTargets:r}}(t,a,r,n)};wr.add("table",Vm)}()},"96a9":function(t,e,n){"use strict";n.r(e);var r={name:"generate-col-item",components:{GenerateFormItem:n("12f6").a},props:["element","model","rules","remote","display","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.model}},watch:{model:{deep:!0,handler:function(t){this.dataModels=t}}},methods:{fillingColumns:function(t){this.$emit("fillingColumns",t)},getColSpan:function(t){return"pc"===this.platform?24/t:"pad"===this.platform?t>1?12:24:"mobile"===this.platform?24:void 0}}},o=n("2877"),i=Object(o.a)(r,(function(){var t,e=this,n=e.$createElement,r=e._self._c||n;return e.display[e.element.model]?r("el-row",{staticClass:"renderer-grid-row",class:(t={},t[e.element.options&&e.element.options.customClass]=e.element.options&&e.element.options.customClass,t),attrs:{align:e.element.options.align,gutter:e.element.options.gutter||0,justify:e.element.options.justify,type:"flex"}},e._l(e.element.columns,(function(t,n){var o;return r("el-col",{key:n,class:(o={},o[t.options&&t.options.customClass]=t.options&&t.options.customClass,o),attrs:{offset:t.options?t.options.offset:0,pull:t.options?t.options.pull:0,push:t.options?t.options.push:0,span:e.getColSpan(e.element.columns.length||1)}},[e._l(t.list,(function(t){return[r("generate-form-item",{key:t.key,attrs:{"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.display,edit:e.edit,"event-function":e.eventFunction,models:e.dataModels,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules,widget:t},on:{fillingColumns:e.fillingColumns}})]}))],2)})),1):e._e()}),[],!1,null,null,null);e.default=i.exports},"96cf":function(t,e){!function(e){"use strict";var n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",c="object"==typeof t,s=e.regeneratorRuntime;if(s)c&&(t.exports=s);else{(s=e.regeneratorRuntime=c?t.exports:{}).wrap=h;var l={},f={};f[i]=function(){return this};var d=Object.getPrototypeOf,m=d&&d(d(k([])));m&&m!==n&&r.call(m,i)&&(f=m);var p=y.prototype=v.prototype=Object.create(f);b.prototype=p.constructor=y,y.constructor=b,y[u]=b.displayName="GeneratorFunction",s.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(p),t},s.awrap=function(t){return{__await:t}},_(w.prototype),w.prototype[a]=function(){return this},s.AsyncIterator=w,s.async=function(t,e,n,r){var o=new w(h(t,e,n,r));return s.isGeneratorFunction(e)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},_(p),p[u]="Generator",p[i]=function(){return this},p.toString=function(){return"[object Generator]"},s.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},s.values=k,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}}}function h(t,e,n,r){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return E()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=x(a,n);if(u){if(u===l)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=g(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function g(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function v(){}function b(){}function y(){}function _(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function w(t){var e;this._invoke=function(n,o){function i(){return new Promise((function(e,i){!function e(n,o,i,a){var u=g(t[n],t,o);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==typeof s&&r.call(s,"__await")?Promise.resolve(s.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):Promise.resolve(s).then((function(t){c.value=t,i(c)}),a)}a(u.arg)}(n,o,e,i)}))}return e=e?e.then(i,i):i()}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=g(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function k(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())},9861:function(t,e,n){n("5352")},"98fc":function(t,e,n){var r,o,i;!function(n,a){"use strict";o=[],void 0===(i="function"==typeof(r=function(t){return function(e){(e=e||{}).arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",e.jsAttributeFilter=e.jsAttributeFilter,e.jsAttributeConverter=e.jsAttributeConverter,e.attributeConverters=e.attributeConverters||[],e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],e.xmldomOptions=e.xmldomOptions||{},void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0),void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0),void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0),void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!0),void 0===e.ignoreRoot&&(e.ignoreRoot=!1),void 0===e.escapeMode&&(e.escapeMode=!0),void 0===e.attributePrefix&&(e.attributePrefix="_"),void 0===e.selfClosingElements&&(e.selfClosingElements=!0),void 0===e.keepCData&&(e.keepCData=!1),void 0===e.keepText&&(e.keepText=!1),void 0===e.jsDateUTC&&(e.jsDateUTC=!1),function(){function t(t){var e=String(t);return 1===e.length&&(e="0"+e),e}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!=typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+t(this.getUTCMonth()+1)+"-"+t(this.getUTCDate())+"T"+t(this.getUTCHours())+":"+t(this.getUTCMinutes())+":"+t(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"})}();var n=1,r=3,o=4,i=8,a=9;function u(t){var e=t.localName;return null==e&&(e=t.baseName),null!=e&&""!==e||(e=t.nodeName),e}function c(t){return"string"==typeof t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):t}function s(t,n,r){switch(e.arrayAccessForm){case"property":t[n]instanceof Array?t[n+"_asArray"]=t[n]:t[n+"_asArray"]=[t[n]]}if(!(t[n]instanceof Array)&&e.arrayAccessFormPaths.length>0){for(var o=!1,i=0;i<e.arrayAccessFormPaths.length;i++){var a=e.arrayAccessFormPaths[i];if("string"==typeof a){if(a===r){o=!0;break}}else if(a instanceof RegExp){if(a.test(r)){o=!0;break}}else if("function"==typeof a&&a(n,r)){o=!0;break}}o&&(t[n]=[t[n]])}}function l(t){var e=t.split(/[-T:+Z]/g),n=new Date(e[0],e[1]-1,e[2]),r=e[5].split(".");if(n.setHours(e[3],e[4],r[0]),r.length>1&&n.setMilliseconds(r[1]),e[6]&&e[7]){var o=60*e[6]+Number(e[7]);o=0+("-"===(/\d\d-\d\d:\d\d$/.test(t)?"-":"+")?-1*o:o),n.setMinutes(n.getMinutes()-o-n.getTimezoneOffset())}else-1!==t.indexOf("Z",t.length-1)&&(n=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())));return n}function f(t,n){for(var r={__cnt:0},o=t.childNodes,a=0;a<o.length;a++){var c=o.item(a),f=u(c);c.nodeType!==i&&(r.__cnt++,null==r[f]?(r[f]=d(c,n+"."+f),s(r,f,n+"."+f)):(r[f]instanceof Array||(r[f]=[r[f]],s(r,f,n+"."+f)),r[f][r[f].length]=d(c,n+"."+f)))}for(var m=0;m<t.attributes.length;m++){var p=t.attributes.item(m);r.__cnt++;for(var h=p.value,g=0;g<e.attributeConverters.length;g++){var v=e.attributeConverters[g];v.test.call(null,p.name,p.value)&&(h=v.convert.call(null,p.name,p.value))}r[e.attributePrefix+p.name]=h}var b=t.prefix;return b&&(r.__cnt++,r.__prefix=b),r["#text"]&&(r.__text=r["#text"],r.__text instanceof Array&&(r.__text=r.__text.join("\n")),e.escapeMode&&(r.__text=r.__text.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")),e.stripWhitespaces&&(r.__text=r.__text.trim()),delete r["#text"],"property"===e.arrayAccessForm&&delete r["#text_asArray"],r.__text=function(t,n,r){if(e.datetimeAccessFormPaths.length>0)for(var o=r.split(".#")[0],i=0;i<e.datetimeAccessFormPaths.length;i++){var a=e.datetimeAccessFormPaths[i];if("string"==typeof a){if(a===o)return l(t)}else if(a instanceof RegExp){if(a.test(o))return l(t)}else if("function"==typeof a&&a(o))return l(t)}return t}(r.__text,0,n+".#text")),r.hasOwnProperty("#cdata-section")&&(r.__cdata=r["#cdata-section"],delete r["#cdata-section"],"property"===e.arrayAccessForm&&delete r["#cdata-section_asArray"]),1===r.__cnt&&r.__text&&!e.keepText?r=r.__text:0===r.__cnt&&"text"===e.emptyNodeForm?r="":r.__cnt>1&&void 0!==r.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""===r.__text||""===r.__text.trim())&&delete r.__text,delete r.__cnt,e.keepCData||r.hasOwnProperty("__text")||!r.hasOwnProperty("__cdata")||1!==Object.keys(r).length?(e.enableToStringFunc&&(r.__text||r.__cdata)&&(r.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}),r):r.__cdata?r.__cdata:""}function d(t,i){return t.nodeType===a?function(t){for(var r={},o=t.childNodes,i=0;i<o.length;i++){var a=o.item(i);if(a.nodeType===n){var c=u(a);e.ignoreRoot?r=d(a,c):r[c]=d(a,c)}}return r}(t):t.nodeType===n?f(t,i):t.nodeType===r||t.nodeType===o?t.nodeValue:null}function m(t,n,r,o){var i="<"+(t&&t.__prefix?t.__prefix+":":"")+n;if(r)for(var a=0;a<r.length;a++){var u=r[a],s=t[u];e.escapeMode&&(s=c(s)),i+=" "+u.substr(e.attributePrefix.length)+"=",e.useDoubleQuotes?i+='"'+s+'"':i+="'"+s+"'"}return i+=o?" />":">"}function p(t,e){return"</"+(t&&t.__prefix?t.__prefix+":":"")+e+">"}function h(t,n){return"property"===e.arrayAccessForm&&(r=n.toString(),o="_asArray",-1!==r.indexOf(o,r.length-o.length))||0===n.toString().indexOf(e.attributePrefix)||0===n.toString().indexOf("__")||t[n]instanceof Function;var r,o}function g(t){var e=0;if(t instanceof Object)for(var n in t)h(t,n)||e++;return e}function v(t){var n=[];if(t instanceof Object)for(var r in t)-1===r.toString().indexOf("__")&&0===r.toString().indexOf(e.attributePrefix)&&n.push(r);return n}function b(t){var n="";return t instanceof Object?n+=function(t){var n="";return t.__cdata&&(n+="<![CDATA["+t.__cdata+"]]>"),(t.__text||"number"==typeof t.__text||"boolean"==typeof t.__text)&&(e.escapeMode?n+=c(t.__text):n+=t.__text),n}(t):null!==t&&(e.escapeMode?n+=c(t):n+=t),n}function y(t,n,r){var o="";if(e.jsAttributeFilter&&e.jsAttributeFilter.call(null,n,t))return o;if(e.jsAttributeConverter&&(t=e.jsAttributeConverter.call(null,n,t)),null!=t&&""!==t||!e.selfClosingElements)if("object"==typeof t)if("[object Array]"===Object.prototype.toString.call(t))o+=function(t,e,n){var r="";if(0===t.length)r+=m(t,e,n,!0);else for(var o=0;o<t.length;o++)r+=y(t[o],e,v(t[o]));return r}(t,n,r);else if(t instanceof Date)o+=m(t,n,r,!1),o+=e.jsDateUTC?t.toUTCString():t.toISOString(),o+=p(t,n);else{g(t)>0||"number"==typeof t.__text||"boolean"==typeof t.__text||t.__text||t.__cdata?(o+=m(t,n,r,!1),o+=_(t),o+=p(t,n)):e.selfClosingElements?o+=m(t,n,r,!0):(o+=m(t,n,r,!1),o+=p(t,n))}else o+=m(t,n,r,!1),o+=b(t),o+=p(t,n);else o+=m(t,n,r,!0);return o}function _(t){var e="";if(g(t)>0)for(var n in t)if(!h(t,n)){var r=t[n];e+=y(r,n,v(r))}return e+=b(t)}function w(n){if(void 0===n)return null;if("string"!=typeof n)return null;var r=null,o=null;if(t)o=(r=new t(e.xmldomOptions)).parseFromString(n,"text/xml");else if(window&&window.DOMParser){r=new window.DOMParser;var i=null;if(!(window.ActiveXObject||"ActiveXObject"in window)&&document.all&&!document.addEventListener)try{i=r.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(t){i=null}try{o=r.parseFromString(n,"text/xml"),null!==i&&o.getElementsByTagNameNS(i,"parsererror").length>0&&(o=null)}catch(t){o=null}}else 0===n.indexOf("<?")&&(n=n.substr(n.indexOf("?>")+2)),(o=new ActiveXObject("Microsoft.XMLDOM")).async="false",o.loadXML(n);return o}this.asArray=function(t){return null==t?[]:t instanceof Array?t:[t]},this.toXmlDateTime=function(t){return t instanceof Date?t.toISOString():"number"==typeof t?new Date(t).toISOString():null},this.asDateTime=function(t){return"string"==typeof t?l(t):t},this.xml2dom=function(t){return w(t)},this.dom2js=function(t){return d(t,null)},this.js2dom=function(t){return w(this.js2xml(t))},this.xml2js=function(t){var e=w(t);return null!=e?this.dom2js(e):null},this.js2xml=function(t){return _(t)},this.getVersion=function(){return"3.4.0"}}})?r.apply(e,o):r)||(t.exports=i)}()},"99af":function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("d039"),a=n("e8b5"),u=n("861d"),c=n("7b0b"),s=n("07fa"),l=n("8418"),f=n("65f0"),d=n("1dde"),m=n("b622"),p=n("2d00"),h=m("isConcatSpreadable"),g=o.TypeError,v=p>=51||!i((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),b=d("concat"),y=function(t){if(!u(t))return!1;var e=t[h];return void 0!==e?!!e:a(t)};r({target:"Array",proto:!0,arity:1,forced:!v||!b},{concat:function(t){var e,n,r,o,i,a=c(this),u=f(a,0),d=0;for(e=-1,r=arguments.length;e<r;e++)if(y(i=-1===e?a:arguments[e])){if(d+(o=s(i))>9007199254740991)throw g("Maximum allowed index exceeded");for(n=0;n<o;n++,d++)n in i&&l(u,d,i[n])}else{if(d>=9007199254740991)throw g("Maximum allowed index exceeded");l(u,d++,i)}return u.length=d,u}})},"9a01":function(t,e,n){"use strict";var r=n("5530"),o=n("1da1"),i=n("2909"),a=(n("96cf"),n("498a"),n("c740"),n("a434"),n("99af"),n("d81d"),n("b0c0"),n("d9e2"),n("4de4"),n("d3b7"),{name:"MemberOrgTreeItem",props:{isActive:{default:!1,type:Boolean},data:{default:{}},isSelected:{default:!1,type:Boolean},showAppend:{default:!0,type:Boolean},canSelect:{default:!0,type:Boolean}},computed:{isDisabled(){return this.data.isDisabled||!this.canSelect}},model:{value:"isSelected",event:"change"},methods:{handleSwitch(t){"user"!==this.data.type&&this.$emit("click",this.data,t)},handleClick(t){this.$emit(t?"select":"unselect",this.data)}}}),u=n("2877"),c=Object(u.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{staticClass:"member-org-detail-item",class:{"is-active":t.isActive},attrs:{title:t.data.name}},[n("el-checkbox",{staticClass:"member-org-manage-check",attrs:{disabled:t.isDisabled,value:t.isSelected},on:{change:t.handleClick}}),n("div",{staticClass:"member-org-detail-item-wrapper item-org",on:{click:t.handleSwitch}},[n("div",{staticClass:"member-org-detail-icon"},["region"===t.data.type||"root"===t.data.type?n("base-icon",{attrs:{"icon-class":"government-line"}}):t._e(),"organ"===t.data.type?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):t._e(),"user"===t.data.type?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):t._e(),"role"===t.data.type?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):t._e()],1),n("span",{staticClass:"member-org-detail-title"},[t._v(" "+t._s(t.data.name)+" "),"user"===t.data.type&&t.data.account?n("small",[t._v(t._s(t.data.account))]):n("small",[t._v(t._s(t.data.code))])]),n("div",{staticClass:"member-org-spacing"}),t.showAppend?n("span",{staticClass:"member-org-detail-append"},[n("base-icon",{attrs:{"icon-class":"arrow-right-s-line"}})],1):t._e()])],1)}),[],!1,null,null,null).exports,s=n("7694"),l=n("60bb"),f=n.n(l),d={name:"OrganizationSelector",components:{MemberOrgTreeItem:c},computed:{total:function(){return this.data.length},searchTotal:function(){return this.searchData.length},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},componentSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},collapseTagSize:function(){return["small","mini"].indexOf(this.componentSize)>-1?"mini":"small"}},model:{prop:"selected",event:"change"},inject:{elForm:{default:""},elFormItem:{default:""}},props:{getOrgTree:{type:Function,default:s.g},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},parentCode:{type:String,default:"000000000000"},platform:{type:String,default:"pc"},text:{type:String,default:"选择"},customStyle:{type:Object,default:function(){return{}}},placeholder:{type:String,default:""},parentName:{type:String,default:"全国"},selected:{default:function(){return[]}},optionScopeType:{type:String,default:"ORGAN"},dialogTitle:{type:String,default:"选择组织机构"}},mounted:function(){null===this.selected&&(this.selected=[]),this.$emit("change",this.selected),this.selected.length&&this.$refs.nodeTree&&this.$refs.nodeTree.setCheckedKeys(Object(i.a)(f.a.cloneDeep(this.selected))),this.debounce=f.a.debounce(this.onSearch,50)},watch:{keyword:function(t){t.trim()?(this.isSearching=!0,this.debounce&&this.debounce()):this.isSearching=!1}},data:function(){return{data:[],isSearchLoading:!1,isSearching:!1,keyword:"",searchData:[],visible:!1,stack:[],currentDept:{},dataLoading:!0,debounce:!1}},methods:{onDialogClose:function(){this.data=[],this.isSearchLoading=!1,this.isSearching=!1,this.keyword="",this.searchData=[],this.visible=!1,this.stack=[],this.currentDept={},this.dataLoading=!1},onSearch:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.searchData=[],"PERSON"!==t.optionScopeType){e.next=7;break}return e.next=4,t.searchUser();case 4:t.searchData=e.sent,e.next=7;break;case 7:case"end":return e.stop()}}),e)})))()},onCheckedTreeNodeChange:function(t,e){if(e)this.multiple||(this.$refs.nodeTree.setCheckedKeys([t.code]),this.selected.pop()),this.selected.push(t);else{var n=this.selected.findIndex((function(e){return e.code===t.code}));n>-1&&this.selected.splice(n,1)}},loadTreeNode:function(t,e){var n=this;return Object(o.a)(regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(0!==t.level){r.next=5;break}return o={code:n.parentCode,name:n.parentName,label:n.parentName,type:"root",children:[],disabled:"ORGAN"!==n.optionScopeType},r.abrupt("return",e([o]));case 5:return a=[],r.t0=[],r.t1=Object(i.a)(a),r.t2=i.a,r.next=11,n.getOrgByParentCode(t.data.code);case 11:if(r.t3=r.sent,r.t4=(0,r.t2)(r.t3),a=r.t0.concat.call(r.t0,r.t1,r.t4),!(["root","organ","region"].indexOf(t.data.type)>-1&&"PERSON"===n.optionScopeType)){r.next=23;break}return r.t5=[],r.t6=Object(i.a)(a),r.t7=i.a,r.next=20,n.getUserListByParentNode(t.data);case 20:r.t8=r.sent,r.t9=(0,r.t7)(r.t8),a=r.t5.concat.call(r.t5,r.t6,r.t9);case 23:return r.abrupt("return",e(a));case 24:case"end":return r.stop()}}),r)})))()},searchUser:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){var n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.keyword&&!(t.keyword.length<1)){e.next=2;break}return e.abrupt("return");case 2:return t.isSearchLoading=!0,n=[],e.prev=4,e.next=7,Object(s.k)({condition:{name:t.keyword},limit:1e3,page:1});case 7:1===(o=e.sent).data.code&&(n=(n=o.data.data.data).map((function(t){return Object(r.a)(Object(r.a)({},t),{},{name:t.name,label:t.name,code:t.id,type:"user",isLeaf:!0})}))),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(4),t.$message.error(e.t0.message);case 14:return e.prev=14,t.isSearchLoading=!1,e.finish(14);case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e,null,[[4,11,14,17]])})))()},getUserListByParentNode:function(t){var e=this;return Object(o.a)(regeneratorRuntime.mark((function n(){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Object(s.h)({condition:{regionCode:t.regionCode||t.code,orgCode:t.code},limit:"1000",page:"1"});case 3:return o=n.sent,n.abrupt("return",o.data.data.data.length?o.data.data.data.map((function(t){return Object(r.a)(Object(r.a)({},t),{},{name:t.name,label:t.name,code:t.id,type:"user",isLeaf:!0,disabled:"PERSON"!==e.optionScopeType})})):[]);case 7:return n.prev=7,n.t0=n.catch(0),e.$message.error(n.t0),n.abrupt("return",[]);case 11:case"end":return n.stop()}}),n,null,[[0,7]])})))()},getOrgByParentCode:function(t){var e=this;return Object(o.a)(regeneratorRuntime.mark((function n(){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Object(s.g)({code:t});case 3:if(1===(o=n.sent).data.code){n.next=6;break}throw new Error(o.data.message||"根据父级部门ID加载子集部门节点失败");case 6:return n.abrupt("return",o.data.data.length?o.data.data.map((function(t){return Object(r.a)(Object(r.a)({},t),{},{name:t.name,label:t.name,code:t.code,type:t.type,disabled:"ORGAN"!==e.optionScopeType})})):[]);case 9:return n.prev=9,n.t0=n.catch(0),e.$message.error(n.t0),n.abrupt("return",[]);case 13:case"end":return n.stop()}}),n,null,[[0,9]])})))()},handleSelect:function(){this.disabled||this.readonly||(this.visible=!0)},handleConfirm:function(){this.$emit("change",this.selected),this.onDialogClose()},handleCancel:function(){this.visible=!1},handleCloseTag:function(t){var e=this.selected.findIndex((function(e){return e.code===t.code}));e>-1&&this.selected.splice(e,1)},handleSelectItem:function(t){this.multiple||this.selected.pop(),this.selected.push(t)},handleUnSelectItem:function(t){var e=this.selected.findIndex((function(e){return e.code===t.code}));if(e>-1&&this.selected.splice(e,1),this.$refs.nodeTree){var n=this.$refs.nodeTree.getCheckedKeys();n=n.filter((function(e){return e!==t.code})),this.$refs.nodeTree.setCheckedKeys(n)}},handleClick:function(t){this.isSearching=!1,this.stack.push(t)}}},m=Object(u.a)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"organization-selector el-select",class:[t.componentSize?"el-select--"+t.componentSize:""]},[t.visible?n("el-dialog",{class:"mobile"===t.platform?"organization-selector-mobile":"organization-selector-pc",attrs:{"close-on-click-modal":!1,"close-on-press-escape":!1,disabled:t.disabled,title:t.dialogTitle,visible:t.visible,"append-to-body":"","custom-class":"organization-selector-dialog",placement:"bottom-start",width:"800px"},on:{"update:visible":function(e){t.visible=e},close:t.onDialogClose}},[n("div",{staticClass:"tree-select-section-left"},[n("div",{staticClass:"member-org-detail-list-container"},["PERSON"===t.optionScopeType?n("div",{staticClass:"member-org-detail-title-bar"},[n("el-input",{attrs:{clearable:"",maxLength:"20",placeholder:"请输入关键词","prefix-icon":"el-icon-search",size:"small"},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}})],1):t._e(),t.isSearching?n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.isSearchLoading,expression:"isSearchLoading"}],staticClass:"b-scroll"},[t.searchTotal?n("div",{staticClass:"member-org-detail-list-item-container"},t._l(t.searchData,(function(e){return n("member-org-tree-item",{key:e.code,attrs:{data:e,"is-selected":t.selected.some((function(t){return t.code===e.code})),"show-append":!1},on:{select:t.handleSelectItem,unselect:t.handleUnSelectItem}})})),1):n("el-empty")],1):n("div",{staticClass:"b-scroll"},[n("div",{staticClass:"member-org-detail-list-item-container"},[n("el-tree",{ref:"nodeTree",staticClass:"organization-tree",attrs:{"default-checked-keys":t.selected.map((function(t){return t.code})),indent:8,load:t.loadTreeNode,props:{label:"name",children:"children",isLeaf:"isLeaf"},"check-strictly":"",lazy:"","node-key":"code","show-checkbox":""},on:{"check-change":t.onCheckedTreeNodeChange},scopedSlots:t._u([{key:"default",fn:function(e){e.node;var r=e.data;return n("div",{staticClass:"custom-tree-node",attrs:{title:r.name+" : "+(r.type&&"user"===r.type?r.account:r.code)}},[n("div",{staticClass:"custom-tree-node-icon"},["region"===r.type||"root"===r.type?n("base-icon",{attrs:{"icon-class":"government-line"}}):t._e(),"organ"===r.type?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):t._e(),"user"===r.type?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):t._e(),"role"===r.type?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):t._e()],1),n("div",{staticClass:"custom-tree-node-name"},[t._v(" "+t._s(r.name)+" "),n("small",[t._v(t._s(r.type&&"user"===r.type?r.account:r.code))])])])}}],null,!1,3974469761)})],1)])])]),n("div",{staticClass:"tree-select-section-right"},[t.selected.length?n("div",{staticClass:"b-scroll"},[n("div",{staticClass:"member-org-detail-list-item-container"},t._l(t.selected,(function(e){return n("member-org-tree-item",{key:e.code,attrs:{data:e,"is-selected":!0,"show-append":!1},on:{unselect:t.handleUnSelectItem}})})),1)]):n("el-empty")],1),n("div",{staticClass:"tree-select-section-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{disabled:!t.selected.length,type:"primary"},on:{click:t.handleConfirm}},[t._v("确定")])],1)]):t._e(),n("div",{staticClass:"organization-selector-container",class:{"is-disabled":t.disabled},style:t.customStyle,on:{click:t.handleSelect}},[n("div",{staticClass:"organization-selector-wrapper el-select__tags"},[t.selected&&t.selected.length?n("span",[n("el-tag",{attrs:{closable:!t.disabled,size:t.collapseTagSize,type:"info"},on:{close:function(e){return t.handleCloseTag(t.selected[0])}}},["region"===t.selected[0].type?n("base-icon",{attrs:{"icon-class":"government-line"}}):t._e(),"organ"===t.selected[0].type?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):t._e(),"user"===t.selected[0].type?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):t._e(),"role"===t.selected[0].type?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):t._e(),t._v(" "+t._s(t.selected[0].name)+" ")],1),t.selected.length>1?n("el-tag",{attrs:{closable:!1,size:t.collapseTagSize,"disable-transitions":"",type:"info"}},[n("span",{staticClass:"el-select__tags-text"},[t._v("+ "+t._s(t.selected.length-1))])]):t._e()],1):t._e()]),n("el-input",{ref:"reference",class:{"is-focus":t.visible},attrs:{disabled:t.disabled,placeholder:t.selected&&t.selected.length?"":t.placeholder,readonly:t.readonly,size:t.componentSize,"validate-event":!1,type:"text"}},[n("template",{slot:"prefix"},["ORGAN"===t.optionScopeType?n("base-icon",{attrs:{"icon-class":"organization-chart"}}):t._e(),"PERSON"===t.optionScopeType?n("base-icon",{attrs:{"icon-class":"user-3-line"}}):t._e(),"ROLE"===t.optionScopeType?n("base-icon",{attrs:{"icon-class":"shield-user-line"}}):t._e()],1)],2)],1)],1)}),[],!1,null,null,null);e.a=m.exports},"9a1f":function(t,e,n){var r=n("da84"),o=n("c65b"),i=n("59ed"),a=n("825a"),u=n("0d51"),c=n("35a1"),s=r.TypeError;t.exports=function(t,e){var n=arguments.length<2?c(t):e;if(i(n))return a(o(n,t));throw s(u(t)+" is not iterable")}},"9bd9":function(t,e,n){"use strict";var r=n("12f6"),o=n("96a9"),i={name:"generate-card-item",components:{GenerateFormItem:r.a,GenerateColItem:o.default},props:["element","model","rules","remote","display","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.model}},watch:{model:{deep:!0,handler:function(t){this.dataModels=t}}},methods:{fillingColumns:function(t){this.$emit("fillingColumns",t)}}},a=n("2877"),u=Object(a.a)(i,(function(){var t,e=this,n=e.$createElement,r=e._self._c||n;return e.display[e.element.model]?r("el-card",{staticClass:"renderer-card",class:(t={},t[e.element.options&&e.element.options.customClass]=e.element.options&&e.element.options.customClass,t),attrs:{shadow:e.element.options.shadow}},[e.element.options&&e.element.options.showHeader?r("div",{attrs:{slot:"header"},slot:"header"},[e._v(e._s(e.element.name))]):e._e(),e._l(e.element.list,(function(t){return["grid"===t.type?r("generate-col-item",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.display,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.dataModels,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns}}):r("generate-form-item",{key:t.key,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.display,edit:e.edit,"event-function":e.eventFunction,models:e.dataModels,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules,widget:t},on:{fillingColumns:e.fillingColumns}})]}))],2):e._e()}),[],!1,null,null,null);e.a=u.exports},"9bdd":function(t,e,n){var r=n("825a"),o=n("2a62");t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){o(t,"throw",e)}}},"9bf2":function(t,e,n){var r=n("da84"),o=n("83ab"),i=n("0cfb"),a=n("aed9"),u=n("825a"),c=n("a04b"),s=r.TypeError,l=Object.defineProperty,f=Object.getOwnPropertyDescriptor;e.f=o?a?function(t,e,n){if(u(t),e=c(e),u(n),"function"==typeof t&&"prototype"===e&&"value"in n&&"writable"in n&&!n.writable){var r=f(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return l(t,e,n)}:l:function(t,e,n){if(u(t),e=c(e),u(n),i)try{return l(t,e,n)}catch(t){}if("get"in n||"set"in n)throw s("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},"9dd9":function(t,e,n){(function(t){!function(){"use strict";var e,n,r,o=function(t){var e=t;return{get:function(){return e},set:function(t){e=t}}},i=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=(e="array",function(t){return r=typeof(n=t),(null===n?"null":"object"===r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===e;var n,r}),c=function(t){return!function(t){return null==t}(t)},s=function(t){return function(e){return typeof e===t}}("function"),l=function(){},f=function(t){return function(){return t}},d=function(t){return t},m=f(!1),p=f(!0),h=function(){return g},g={fold:function(t,e){return t()},isSome:m,isNone:p,getOr:r=d,getOrThunk:n=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:f(null),getOrUndefined:f(void 0),or:r,orThunk:n,map:h,each:l,bind:h,exists:m,forall:p,filter:function(){return h()},toArray:function(){return[]},toString:f("none()")},v=function(t){var e=f(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:p,isNone:m,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return v(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:g},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},b={some:v,none:h,from:function(t){return null==t?g:v(t)}},y={},_={exports:y};!function(e,n,r,o){!function(t,o){"object"==typeof n&&void 0!==r?r.exports=o():"function"==typeof e&&e.amd?e(o):(t="undefined"!=typeof globalThis?globalThis:t||self).EphoxContactWrapper=o()}(this,(function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},n={exports:{}};!function(t){!function(e){var n=setTimeout;function r(){}function o(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(t,this)}function i(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,o._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void u(e.promise,t)}a(e.promise,r)}else(1===t._state?a:u)(e.promise,t._value)}))):t._deferreds.push(e)}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void l((r=n,i=e,function(){r.apply(i,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){u(t,e)}var r,i}function u(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn((function(){t._handled||o._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)i(t,t._deferreds[e]);t._deferreds=null}function s(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function l(t,e){var n=!1;try{t((function(t){n||(n=!0,a(e,t))}),(function(t){n||(n=!0,u(e,t))}))}catch(t){if(n)return;n=!0,u(e,t)}}o.prototype.catch=function(t){return this.then(null,t)},o.prototype.then=function(t,e){var n=new this.constructor(r);return i(this,new s(t,e,n)),n},o.all=function(t){var e=Array.prototype.slice.call(t);return new o((function(t,n){if(0===e.length)return t([]);var r=e.length;function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(t){o(i,t)}),n)}e[i]=a,0==--r&&t(e)}catch(t){n(t)}}for(var i=0;i<e.length;i++)o(i,e[i])}))},o.resolve=function(t){return t&&"object"==typeof t&&t.constructor===o?t:new o((function(e){e(t)}))},o.reject=function(t){return new o((function(e,n){n(t)}))},o.race=function(t){return new o((function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)}))},o._immediateFn="function"==typeof setImmediate?function(t){setImmediate(t)}:function(t){n(t,0)},o._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console},o._setImmediateFn=function(t){o._immediateFn=t},o._setUnhandledRejectionFn=function(t){o._unhandledRejectionFn=t},t.exports?t.exports=o:e.Promise||(e.Promise=o)}(e)}(n);var r=n.exports;return{boltExport:("undefined"!=typeof window?window:Function("return this;")()).Promise||r}}))}(void 0,y,_);var w=_.exports.boltExport,x=function(t,e){return C(document.createElement("canvas"),t,e)},O=function(t){var e=x(t.width,t.height);return S(e).drawImage(t,0,0),e},S=function(t){return t.getContext("2d")},C=function(t,e,n){return t.width=e,t.height=n,t},k=function(t){return new w((function(e,n){var r=URL.createObjectURL(t),o=new Image,i=function(){o.removeEventListener("load",a),o.removeEventListener("error",u)},a=function(){i(),e(o)},u=function(){i(),n("Unable to load data of type "+t.type+": "+r)};o.addEventListener("load",a),o.addEventListener("error",u),o.src=r,o.complete&&setTimeout(a,0)}))},E=function(t){return new w((function(e,n){var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="blob",r.onload=function(){200===this.status&&e(this.response)},r.onerror=function(){var t,e=this;n(0===this.status?((t=new Error("No access to download image")).code=18,t.name="SecurityError",t):new Error("Error "+e.status+" downloading image"))},r.send()}))},M=function(t){return new w((function(e,n){(function(t){var e=t.split(","),n=/data:([^;]+)/.exec(e[0]);if(!n)return b.none();for(var r=n[1],o=e[1],i=atob(o),a=i.length,u=Math.ceil(a/1024),c=new Array(u),s=0;s<u;++s){for(var l=1024*s,f=Math.min(l+1024,a),d=new Array(f-l),m=l,p=0;m<f;++p,++m)d[p]=i[m].charCodeAt(0);c[s]=new Uint8Array(d)}return b.some(new Blob(c,{type:r}))})(t).fold((function(){n("uri is not base64: "+t)}),e)}))},T=function(t,e,n){return e=e||"image/png",s(HTMLCanvasElement.prototype.toBlob)?new w((function(r,o){t.toBlob((function(t){t?r(t):o()}),e,n)})):M(t.toDataURL(e,n))},D=function(t){URL.revokeObjectURL(t.src)},A=function(t){return function(t){var e=t.src;return 0===e.indexOf("data:")?M(e):E(e)}(t)},P=Array.prototype.indexOf,R=function(t,e){return n=t,r=e,P.call(n,r)>-1;var n,r},I=function(t,e){for(var n=0,r=t.length;n<r;n++){e(t[n],n)}},z=function(t,e){return function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return b.some(i);if(n(i,r))break}return b.none()}(t,e,m)},L=function(t,e){for(var n=0,r=t.length;n<r;++n){if(!0!==e(t[n],n))return!1}return!0},j=Object.keys;(function(t){if(!u(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};I(t,(function(r,o){var i=j(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],c=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!u(c))throw new Error("case arguments must be an array");e.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==c.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+c.length+" ("+c+"), got "+i);var u=function(t){var r=j(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));if(!L(e,(function(t){return R(r,t)})))throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[a].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:u,log:function(t){}}}}))})([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var B=function(t,e,n){var r=e.type,o=f(r),i=f(n),a=function(e,n){return t.then((function(t){return function(t,e,n){return e=e||"image/png",t.toDataURL(e,n)}(t,e,n)}))};return{getType:o,toBlob:function(){return w.resolve(e)},toDataURL:i,toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(e,n){return t.then((function(t){return T(t,e,n)}))},toAdjustedDataURL:a,toAdjustedBase64:function(t,e){return a(t,e).then((function(t){return t.split(",")[1]}))},toCanvas:function(){return t.then(O)}}},F=function(t){return function(t){return new w((function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)}))}(t).then((function(e){return B(function(t){return k(t).then((function(t){D(t);var e=x(function(t){return t.naturalWidth||t.width}(t),function(t){return t.naturalHeight||t.height}(t));return S(e).drawImage(t,0,0),e}))}(t),t,e)}))},N=function(t,e){return T(t,e).then((function(e){return B(w.resolve(t),e,t.toDataURL())}))},H=function(t,e){void 0===e&&(e=2);var n=Math.pow(10,e),r=Math.round(t*n);return Math.ceil(r/n)},V=function(t,e,n){var r=(n<0?360+n:n)*Math.PI/180,o=t.width,i=t.height,a=Math.sin(r),u=Math.cos(r),c=H(Math.abs(o*u)+Math.abs(i*a)),s=H(Math.abs(o*a)+Math.abs(i*u)),l=x(c,s),f=S(l);return f.translate(c/2,s/2),f.rotate(r),f.drawImage(t,-o/2,-i/2),N(l,e)},U=function(t,e,n){var r=x(t.width,t.height),o=S(r);return"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0)),N(r,e)},W=function(t,e){return function(t,e){return t.toCanvas().then((function(n){return U(n,t.getType(),e)}))}(t,e)},$=function(t,e){return function(t,e){return t.toCanvas().then((function(n){return V(n,t.getType(),e)}))}(t,e)},G=function(t,e,n){return void 0===n&&(n=!1),new w((function(r){var o=new XMLHttpRequest;o.onreadystatechange=function(){4===o.readyState&&r({status:o.status,blob:o.response})},o.open("GET",t,!0),o.withCredentials=n,function(t,e){for(var n=j(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}}(e,(function(t,e){o.setRequestHeader(e,t)})),o.responseType="blob",o.send()}))},K=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],q=[{type:"not_found",message:"Failed to load image."},{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],X=function(t,e){var n,r,o=(n=function(t,e){return c(t)?t[e]:void 0},r=t,I(e,(function(t,e){r=n(r,t,e)})),r);return b.from(o)},Y=function(t){var e=function(t){return"ImageProxy HTTP error: "+z(K,(function(e){return t===e.code})).fold(f("Unknown ImageProxy error"),(function(t){return t.message}))}(t);return w.reject(e)},J=function(t){return z(q,(function(e){return e.type===t})).fold(f("Unknown service error"),(function(t){return t.message}))},Q=function(t){return"ImageProxy Service error: "+function(t){try{return b.some(JSON.parse(t))}catch(t){return b.none()}}(t).bind((function(t){return X(t,["error","type"]).map(J)})).getOr("Invalid JSON in service error message")},Z=function(t){return function(t){return new w((function(e,n){var r=new FileReader;r.onload=function(){e(r.result)},r.onerror=function(t){n(t)},r.readAsText(t)}))}(t).then((function(t){var e=Q(t);return w.reject(e)}))},tt=function(t){return t<200||t>=300},et=function(t,e){var n={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":e};return G(function(t,e){var n=-1===t.indexOf("?")?"?":"&";return/[?&]apiKey=/.test(t)?t:t+n+"apiKey="+encodeURIComponent(e)}(t,e),n).then((function(t){return tt(t.status)?(e=t.status,n=t.blob,function(t,e){return"application/json"===(null==e?void 0:e.type)&&(400===t||403===t||404===t||500===t)}(e,n)?Z(n):Y(e)):w.resolve(t.blob);var e,n}))},nt=function(t,e,n){return void 0===n&&(n=!1),e?et(t,e):function(t,e){return G(t,{},e).then((function(t){return tt(t.status)?Y(t.status):w.resolve(t.blob)}))}(t,n)},rt=function(t){return F(t)},ot=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},it={fromHtml:function(t,e){var n=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||n.childNodes.length>1)throw new Error("HTML must have a single root node");return ot(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return ot(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return ot(n)},fromDom:ot,fromPoint:function(t,e,n){return b.from(t.dom.elementFromPoint(e,n)).map(ot)}};"undefined"!=typeof window?window:Function("return this;")();var at=function(t,e){return function(t,e){return z(t.dom.childNodes,(function(t){return e(it.fromDom(t))})).map(it.fromDom)}(t,(function(t){return function(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}(t,e)}))},ut=tinymce.util.Tools.resolve("tinymce.util.Delay"),ct=tinymce.util.Tools.resolve("tinymce.util.Promise"),st=tinymce.util.Tools.resolve("tinymce.util.URI"),lt=function(t){return t.getParam("imagetools_toolbar","rotateleft rotateright flipv fliph editimage imageoptions")},ft=function(t){return t.getParam("imagetools_proxy")},dt=function(t){var e,n,r=function(t){return/^[0-9\.]+px$/.test(t)};return e=t.style.width,n=t.style.height,e||n?r(e)&&r(n)?{w:parseInt(e,10),h:parseInt(n,10)}:null:(e=t.width,n=t.height,e&&n?{w:parseInt(e,10),h:parseInt(n,10)}:null)},mt=function(t){return{w:t.naturalWidth,h:t.naturalHeight}},pt=0,ht=function(t){return at(it.fromDom(t),"img")},gt=function(t,e){return t.dom.is(e,"figure")},vt=function(t,e){return t.dom.is(e,"img:not([data-mce-object],[data-mce-placeholder])")},bt=function(t,e){var n=function(e){return vt(t,e)&&(xt(t,e)||Ot(t,e)||c(ft(t)))};return gt(t,e)?ht(e).bind((function(t){return n(t.dom)?b.some(t.dom):b.none()})):n(e)?b.some(e):b.none()},yt=function(t,e){t.notificationManager.open({text:e,type:"error"})},_t=function(t){var e=t.selection.getNode(),n=t.dom.getParent(e,"figure.image");return null!==n&>(t,n)?ht(n):vt(t,e)?b.some(it.fromDom(e)):b.none()},wt=function(t,e,n){var r=e.match(/(?:\/|^)(([^\/\?]+)\.(?:[a-z0-9.]+))(?:\?|$)/i);return c(r)?t.dom.encode(r[n]):null},xt=function(t,e){var n=e.src;return 0===n.indexOf("data:")||0===n.indexOf("blob:")||new st(n).host===t.documentBaseURI.host},Ot=function(t,e){return-1!==a.inArray(function(t){return t.getParam("imagetools_cors_hosts",[],"string[]")}(t),new st(e.src).host)},St=function(t,e){if(Ot(t,e))return nt(e.src,null,function(t,e){return-1!==a.inArray(function(t){return t.getParam("imagetools_credentials_hosts",[],"string[]")}(t),new st(e.src).host)}(t,e));if(!xt(t,e)){var n=ft(t),r=n+(-1===n.indexOf("?")?"?":"&")+"url="+encodeURIComponent(e.src),o=function(t){return t.getParam("api_key",t.getParam("imagetools_api_key","","string"),"string")}(t);return nt(r,o,!1)}return A(e)},Ct=function(t,e){return function(t){return b.from(t.getParam("imagetools_fetch_image",null,"function"))}(t).fold((function(){return St(t,e)}),(function(t){return t(e)}))},kt=function(t,e){var n=t.editorUpload.blobCache.getByUri(e.src);return n?ct.resolve(n.blob()):Ct(t,e)},Et=function(t){ut.clearTimeout(t.get())},Mt=function(t,e,n,r,o,i,a){return n.toBlob().then((function(u){var s,l,f,d,m=t.editorUpload.blobCache;s=i.src;var p=e.type===u.type;return function(t){return t.getParam("images_reuse_filename",!1,"boolean")}(t)&&(d=m.getByUri(s),c(d)?(s=d.uri(),l=d.name(),f=d.filename()):(l=wt(t,s,2),f=wt(t,s,1))),d=m.create({id:"imagetools"+pt++,blob:u,base64:n.toBase64(),uri:s,name:l,filename:p?f:void 0}),m.add(d),t.undoManager.transact((function(){var e=function(){t.$(i).off("load",e),t.nodeChanged(),r?t.editorUpload.uploadImagesAuto():(Et(o),function(t,e){var n=ut.setEditorTimeout(t,(function(){t.editorUpload.uploadImagesAuto()}),function(t){return t.getParam("images_upload_timeout",3e4,"number")}(t));e.set(n)}(t,o))};t.$(i).on("load",e),a&&t.$(i).attr({width:a.w,height:a.h}),t.$(i).attr({src:d.blobUri()}).removeAttr("data-mce-src")})),d}))},Tt=function(t,e,n,r){return function(){return _t(t).fold((function(){yt(t,"Could not find selected image")}),(function(o){return t._scanForImages().then((function(){return kt(t,o.dom)})).then((function(i){return rt(i).then(n).then((function(n){return Mt(t,i,n,!1,e,o.dom,r)}))})).catch((function(e){yt(t,e)}))}))}},Dt=function(t,e,n){return function(){var r=_t(t).map((function(t){var e=dt(t.dom);return e?{w:e.h,h:e.w}:null})).getOrNull();return Tt(t,e,(function(t){return $(t,n)}),r)()}},At=function(t,e,n){return function(){return Tt(t,e,(function(t){return W(t,n)}))()}},Pt=function(t,e,n,r,o){return function(t){return k(t)}(o).then((function(t){var e=mt(t);return r.w===e.w&&r.h===e.h||dt(n)&&function(t,e){var n,r;e&&(n=t.style.width,r=t.style.height,(n||r)&&(t.style.width=e.w+"px",t.style.height=e.h+"px",t.removeAttribute("data-mce-style")),n=t.width,r=t.height,(n||r)&&(t.setAttribute("width",String(e.w)),t.setAttribute("height",String(e.h))))}(n,e),URL.revokeObjectURL(t.src),o})).then(rt).then((function(r){return Mt(t,o,r,!0,e,n)}))},Rt=function(t,e){return function(){var n=_t(t),r=n.map((function(t){return mt(t.dom)}));n.each((function(o){bt(t,o.dom).each((function(i){kt(t,o.dom).then((function(o){var i=function(t){return{blob:t,url:URL.createObjectURL(t)}}(o);t.windowManager.open({title:"Edit Image",size:"large",body:{type:"panel",items:[{type:"imagetools",name:"imagetools",label:"Edit Image",currentState:i}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0,disabled:!0}],onSubmit:function(o){var i=o.getData().imagetools.blob;n.each((function(n){r.each((function(r){Pt(t,e,n.dom,r,i)}))})),o.close()},onCancel:l,onAction:function(t,e){switch(e.name){case"save-state":e.value?t.enable("save"):t.disable("save");break;case"disable":t.disable("save"),t.disable("cancel");break;case"enable":t.enable("cancel")}}})}))}))}))}};i.add("imagetools",(function(t){var e=o(0),n=o(null);!function(t,e){a.each({mceImageRotateLeft:Dt(t,e,-90),mceImageRotateRight:Dt(t,e,90),mceImageFlipVertical:At(t,e,"v"),mceImageFlipHorizontal:At(t,e,"h"),mceEditImage:Rt(t,e)},(function(e,n){t.addCommand(n,e)}))}(t,e),function(t){var e=[],n=function(e){return function(){return t.execCommand(e)}},r=function(){return _t(t).exists((function(e){return bt(t,e.dom).isSome()}))},o=function(t){var n=function(e){return t.setDisabled(!e)};return n(r()),e=e.concat([n]),function(){e=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n}(e,(function(t){return t!==n}))}};t.on("NodeChange",(function(){var t=r();I(e,(function(e){return e(t)}))})),t.ui.registry.addButton("rotateleft",{tooltip:"Rotate counterclockwise",icon:"rotate-left",onAction:n("mceImageRotateLeft"),onSetup:o}),t.ui.registry.addButton("rotateright",{tooltip:"Rotate clockwise",icon:"rotate-right",onAction:n("mceImageRotateRight"),onSetup:o}),t.ui.registry.addButton("flipv",{tooltip:"Flip vertically",icon:"flip-vertically",onAction:n("mceImageFlipVertical"),onSetup:o}),t.ui.registry.addButton("fliph",{tooltip:"Flip horizontally",icon:"flip-horizontally",onAction:n("mceImageFlipHorizontal"),onSetup:o}),t.ui.registry.addButton("editimage",{tooltip:"Edit image",icon:"edit-image",onAction:n("mceEditImage"),onSetup:o}),t.ui.registry.addButton("imageoptions",{tooltip:"Image options",icon:"image",onAction:n("mceImage")}),t.ui.registry.addContextMenu("imagetools",{update:function(e){return bt(t,e).map((function(t){return{text:"Edit image",icon:"edit-image",onAction:n("mceEditImage")}})).toArray()}})}(t),function(t){t.ui.registry.addContextToolbar("imagetools",{items:lt(t),predicate:function(e){return bt(t,e).isSome()},position:"node",scope:"node"})}(t),function(t,e,n){t.on("NodeChange",(function(r){var o=n.get(),i=bt(t,r.element);o&&!i.exists((function(t){return o.src===t.src}))&&(Et(e),t.editorUpload.uploadImagesAuto(),n.set(null)),i.each(n.set)}))}(t,e,n)}))}()}).call(this,n("c8ba"))},"9ed3":function(t,e,n){"use strict";var r=n("ae93").IteratorPrototype,o=n("7c73"),i=n("5c6c"),a=n("d44e"),u=n("3f8c"),c=function(){return this};t.exports=function(t,e,n,s){var l=e+" Iterator";return t.prototype=o(r,{next:i(+!s,n)}),a(t,l,!1,!0),u[l]=c,t}},"9f7f":function(t,e,n){var r=n("d039"),o=n("da84").RegExp,i=r((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),a=i||r((function(){return!o("a","y").sticky})),u=i||r((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:u,MISSED_STICKY:a,UNSUPPORTED_Y:i}},"9ffa":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITF14=e.ITF=void 0;var r=i(n("3c7c")),o=i(n("07df"));function i(t){return t&&t.__esModule?t:{default:t}}e.ITF=r.default,e.ITF14=o.default},a04b:function(t,e,n){var r=n("c04e"),o=n("d9b5");t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},a15b:function(t,e,n){"use strict";var r=n("23e7"),o=n("e330"),i=n("44ad"),a=n("fc6a"),u=n("a640"),c=o([].join),s=i!=Object,l=u("join",",");r({target:"Array",proto:!0,forced:s||!l},{join:function(t){return c(a(this),void 0===t?",":t)}})},a2b0:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=[];return function t(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)t(n[r]);else n.text=n.text||"",n.data=n.data||"",e.push(n)}(t),e}},a434:function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("23cb"),a=n("5926"),u=n("07fa"),c=n("7b0b"),s=n("65f0"),l=n("8418"),f=n("1dde")("splice"),d=o.TypeError,m=Math.max,p=Math.min;r({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var n,r,o,f,h,g,v=c(this),b=u(v),y=i(t,b),_=arguments.length;if(0===_?n=r=0:1===_?(n=0,r=b-y):(n=_-2,r=p(m(a(e),0),b-y)),b+n-r>9007199254740991)throw d("Maximum allowed length exceeded");for(o=s(v,r),f=0;f<r;f++)(h=y+f)in v&&l(o,f,v[h]);if(o.length=r,n<r){for(f=y;f<b-r;f++)g=f+n,(h=f+r)in v?v[g]=v[h]:delete v[g];for(f=b;f>b-r+n;f--)delete v[f-1]}else if(n>r)for(f=b-r;f>y;f--)g=f+n-1,(h=f+r-1)in v?v[g]=v[h]:delete v[g];for(f=0;f<n;f++)v[f+y]=arguments[f+2];return v.length=b-r+n,o}})},a4b4:function(t,e,n){var r=n("342f");t.exports=/web0s(?!.*chrome)/i.test(r)},a4d3:function(t,e,n){n("d9f5"),n("b4f8"),n("c513"),n("e9c4"),n("5a47")},a4f8:function(t,e,n){"use strict";n("182a")},a5d2:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n("c243"),i=a(n("5726"));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var t=o.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,i.default)(this.data,t,"01"),text:this.text}}}]),e}(a(n("e762")).default);e.default=u},a630:function(t,e,n){var r=n("23e7"),o=n("4df4");r({target:"Array",stat:!0,forced:!n("1c7e")((function(t){Array.from(t)}))},{from:o})},a640:function(t,e,n){"use strict";var r=n("d039");t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},a92d:function(t,e,n){},a9e3:function(t,e,n){"use strict";var r=n("83ab"),o=n("da84"),i=n("e330"),a=n("94ca"),u=n("cb2d"),c=n("1a2d"),s=n("7156"),l=n("3a9b"),f=n("d9b5"),d=n("c04e"),m=n("d039"),p=n("241c").f,h=n("06cf").f,g=n("9bf2").f,v=n("408a"),b=n("58a8").trim,y=o.Number,_=y.prototype,w=o.TypeError,x=i("".slice),O=i("".charCodeAt),S=function(t){var e=d(t,"number");return"bigint"==typeof e?e:C(e)},C=function(t){var e,n,r,o,i,a,u,c,s=d(t,"number");if(f(s))throw w("Cannot convert a Symbol value to a number");if("string"==typeof s&&s.length>2)if(s=b(s),43===(e=O(s,0))||45===e){if(88===(n=O(s,2))||120===n)return NaN}else if(48===e){switch(O(s,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+s}for(a=(i=x(s,2)).length,u=0;u<a;u++)if((c=O(i,u))<48||c>o)return NaN;return parseInt(i,r)}return+s};if(a("Number",!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var k,E=function(t){var e=arguments.length<1?0:y(S(t)),n=this;return l(_,n)&&m((function(){v(n)}))?s(Object(e),n,E):e},M=r?p(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),T=0;M.length>T;T++)c(y,k=M[T])&&!c(E,k)&&g(E,k,h(y,k));E.prototype=_,_.constructor=E,u(o,"Number",E,{constructor:!0})}},aab3:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(n("5261")),o=i(n("ca32"));function i(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){var e={};for(var n in o.default)o.default.hasOwnProperty(n)&&(t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(e[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(e[n]=t.getAttribute("data-"+n.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,r.default)(e)}},ab13:function(t,e,n){var r=n("b622")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},ab36:function(t,e,n){var r=n("861d"),o=n("9112");t.exports=function(t,e){r(e)&&"cause"in e&&o(t,"cause",e.cause)}},ab5b:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var r,o=n("fd7c"),i=(r=o)&&r.__esModule?r:{default:r};function a(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function u(t,e,n){if(n.displayValue&&e<t){if("center"==n.textAlign)return Math.floor((t-e)/2);if("left"==n.textAlign)return 0;if("right"==n.textAlign)return Math.floor(t-e)}return 0}function c(t,e,n){var r;if(n)r=n;else{if("undefined"==typeof document)return 0;r=document.createElement("canvas").getContext("2d")}r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var o=r.measureText(t);return o?o.width:0}e.getMaximumHeightOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)t[n].height>e&&(e=t[n].height);return e},e.getEncodingHeight=a,e.getBarcodePadding=u,e.calculateEncodingAttributes=function(t,e,n){for(var r=0;r<t.length;r++){var o,s=t[r],l=(0,i.default)(e,s.options);o=l.displayValue?c(s.text,l,n):0;var f=s.data.length*l.width;s.width=Math.ceil(Math.max(o,f)),s.height=a(s,l),s.barcodePadding=u(o,f,l)}},e.getTotalWidthOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].width;return e}},ac1f:function(t,e,n){"use strict";var r=n("23e7"),o=n("9263");r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},ad6d:function(t,e,n){"use strict";var r=n("825a");t.exports=function(){var t=r(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},addb:function(t,e,n){var r=n("4dae"),o=Math.floor,i=function(t,e){var n=t.length,c=o(n/2);return n<8?a(t,e):u(t,i(r(t,0,c),e),i(r(t,c),e),e)},a=function(t,e){for(var n,r,o=t.length,i=1;i<o;){for(r=i,n=t[i];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==i++&&(t[r]=n)}return t},u=function(t,e,n,r){for(var o=e.length,i=n.length,a=0,u=0;a<o||u<i;)t[a+u]=a<o&&u<i?r(e[a],n[u])<=0?e[a++]:n[u++]:a<o?e[a++]:n[u++];return t};t.exports=i},ade3:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},ae68:function(t,e){!function(){"use strict";var t=Object.hasOwnProperty,e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),o=function(t){return t.getParam("min_height",t.getElement().offsetHeight,"number")},i=function(t,e,n,o,a){r.setEditorTimeout(t,(function(){c(t,e),n--?i(t,e,n,o,a):a&&a()}),o)},a=function(t,e){var n=t.getBody();n&&(n.style.overflowY=e?"":"hidden",e||(n.scrollTop=0))},u=function(t,e,n,r){var o=parseInt(t.getStyle(e,n,r),10);return isNaN(o)?0:o},c=function(t,e,r){var i=t.dom,s=t.getDoc();if(s)if(function(t){return t.plugins.fullscreen&&t.plugins.fullscreen.isFullscreen()}(t))a(t,!0);else{var l=s.documentElement,f=function(t){return t.getParam("autoresize_bottom_margin",50,"number")}(t),d=o(t),m=u(i,l,"margin-top",!0),p=u(i,l,"margin-bottom",!0),h=l.offsetHeight+m+p+f;h<0&&(h=0);var g=t.getContainer().offsetHeight-t.getContentAreaContainer().offsetHeight;h+g>o(t)&&(d=h+g);var v=function(t){return t.getParam("max_height",0,"number")}(t);if(v&&d>v?(d=v,a(t,!0)):a(t,!1),d!==e.get()){var b=d-e.get();if(i.setStyle(t.getContainer(),"height",d+"px"),e.set(d),function(t){t.fire("ResizeEditor")}(t),n.browser.isSafari()&&n.mac){var y=t.getWin();y.scrollTo(y.pageXOffset,y.pageYOffset)}t.hasFocus()&&function(t){if("setcontent"===(null==t?void 0:t.type.toLowerCase())){var e=t;return!0===e.selection||!0===e.paste}return!1}(r)&&t.selection.scrollIntoView(),n.webkit&&b<0&&c(t,e,r)}}};e.add("autoresize",(function(e){var n,r,o;if(n=e.settings,r="resize",t.call(n,r)||(e.settings.resize=!1),!e.inline){var a=(o=0,{get:function(){return o},set:function(t){o=t}});!function(t,e){t.addCommand("mceAutoResize",(function(){c(t,e)}))}(e,a),function(t,e){t.on("init",(function(){var e=function(t){return t.getParam("autoresize_overflow_padding",1,"number")}(t),n=t.dom;n.setStyles(t.getDoc().documentElement,{height:"auto"}),n.setStyles(t.getBody(),{paddingLeft:e,paddingRight:e,"min-height":0})})),t.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(function(n){c(t,e,n)})),function(t){return t.getParam("autoresize_on_init",!0,"boolean")}(t)&&t.on("init",(function(){i(t,e,20,100,(function(){i(t,e,5,1e3)}))}))}(e,a)}}))}()},ae93:function(t,e,n){"use strict";var r,o,i,a=n("d039"),u=n("1626"),c=n("7c73"),s=n("e163"),l=n("cb2d"),f=n("b622"),d=n("c430"),m=f("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(r=o):p=!0),null==r||a((function(){var t={};return r[m].call(t)!==t}))?r={}:d&&(r=c(r)),u(r[m])||l(r,m,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},aeb0:function(t,e,n){var r=n("9bf2").f;t.exports=function(t,e,n){n in t||r(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},aed9:function(t,e,n){var r=n("83ab"),o=n("d039");t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},af91:function(t,e,n){},b041:function(t,e,n){"use strict";var r=n("00ee"),o=n("f5df");t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},b0c0:function(t,e,n){var r=n("83ab"),o=n("5e77").EXISTS,i=n("e330"),a=n("9bf2").f,u=Function.prototype,c=i(u.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(s.exec);r&&!o&&a(u,"name",{configurable:!0,get:function(){try{return l(s,c(this))[1]}catch(t){return""}}})},b1d8:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="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},o=u(n("aab3")),i=u(n("752b")),a=n("dca2");function u(t){return t&&t.__esModule?t:{default:t}}function c(t){if("string"==typeof t)return function(t){var e=document.querySelectorAll(t);if(0===e.length)return;for(var n=[],r=0;r<e.length;r++)n.push(c(e[r]));return n}(t);if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)e.push(c(t[n]));return e}if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLImageElement)return u=t,{element:s=document.createElement("canvas"),options:(0,o.default)(u),renderer:i.default.CanvasRenderer,afterRender:function(){u.setAttribute("src",s.toDataURL())}};if(t&&t.nodeName&&"svg"===t.nodeName.toLowerCase()||"undefined"!=typeof SVGElement&&t instanceof SVGElement)return{element:t,options:(0,o.default)(t),renderer:i.default.SVGRenderer};if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)return{element:t,options:(0,o.default)(t),renderer:i.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:i.default.CanvasRenderer};if(t&&"object"===(void 0===t?"undefined":r(t))&&!t.nodeName)return{element:t,renderer:i.default.ObjectRenderer};throw new a.InvalidElementException;var u,s}e.default=c},b42e:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?r:n)(e)}},b4f8:function(t,e,n){var r=n("23e7"),o=n("d066"),i=n("1a2d"),a=n("577e"),u=n("5692"),c=n("3d87"),s=u("string-to-symbol-registry"),l=u("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{for:function(t){var e=a(t);if(i(s,e))return s[e];var n=o("Symbol")(e);return s[e]=n,l[n]=e,n}})},b50d:function(t,e,n){"use strict";var r=n("c532"),o=n("467f"),i=n("30b5"),a=n("c345"),u=n("3934"),c=n("2d83");t.exports=function(t){return new Promise((function(e,s){var l=t.data,f=t.headers;r.isFormData(l)&&delete f["Content-Type"];var d=new XMLHttpRequest;if(t.auth){var m=t.auth.username||"",p=t.auth.password||"";f.Authorization="Basic "+btoa(m+":"+p)}if(d.open(t.method.toUpperCase(),i(t.url,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?a(d.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:t,request:d};o(e,s,r),d=null}},d.onerror=function(){s(c("Network Error",t,null,d)),d=null},d.ontimeout=function(){s(c("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var h=n("7aac"),g=(t.withCredentials||u(t.url))&&t.xsrfCookieName?h.read(t.xsrfCookieName):void 0;g&&(f[t.xsrfHeaderName]=g)}if("setRequestHeader"in d&&r.forEach(f,(function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete f[e]:d.setRequestHeader(e,t)})),t.withCredentials&&(d.withCredentials=!0),t.responseType)try{d.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){d&&(d.abort(),s(t),d=null)})),void 0===l&&(l=null),d.send(l)}))}},b575:function(t,e,n){var r,o,i,a,u,c,s,l,f=n("da84"),d=n("0366"),m=n("06cf").f,p=n("2cf4").set,h=n("1cdc"),g=n("d4c3"),v=n("a4b4"),b=n("605d"),y=f.MutationObserver||f.WebKitMutationObserver,_=f.document,w=f.process,x=f.Promise,O=m(f,"queueMicrotask"),S=O&&O.value;S||(r=function(){var t,e;for(b&&(t=w.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},h||b||v||!y||!_?!g&&x&&x.resolve?((s=x.resolve(void 0)).constructor=x,l=d(s.then,s),a=function(){l(r)}):b?a=function(){w.nextTick(r)}:(p=d(p,f),a=function(){p(r)}):(u=!0,c=_.createTextNode(""),new y(r).observe(c,{characterData:!0}),a=function(){c.data=u=!u})),t.exports=S||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},b622:function(t,e,n){var r=n("da84"),o=n("5692"),i=n("1a2d"),a=n("90e3"),u=n("4930"),c=n("fdbf"),s=o("wks"),l=r.Symbol,f=l&&l.for,d=c?l:l&&l.withoutSetter||a;t.exports=function(t){if(!i(s,t)||!u&&"string"!=typeof s[t]){var e="Symbol."+t;u&&i(l,t)?s[t]=l[t]:s[t]=c&&f?f(e):d(e)}return s[t]}},b64b:function(t,e,n){var r=n("23e7"),o=n("7b0b"),i=n("df75");r({target:"Object",stat:!0,forced:n("d039")((function(){i(1)}))},{keys:function(t){return i(o(t))}})},b680:function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("e330"),a=n("5926"),u=n("408a"),c=n("1148"),s=n("d039"),l=o.RangeError,f=o.String,d=Math.floor,m=i(c),p=i("".slice),h=i(1..toFixed),g=function(t,e,n){return 0===e?n:e%2==1?g(t,e-1,n*t):g(t*t,e/2,n)},v=function(t,e,n){for(var r=-1,o=n;++r<6;)o+=e*t[r],t[r]=o%1e7,o=d(o/1e7)},b=function(t,e){for(var n=6,r=0;--n>=0;)r+=t[n],t[n]=d(r/e),r=r%e*1e7},y=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var r=f(t[e]);n=""===n?r:n+m("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:s((function(){return"0.000"!==h(8e-5,3)||"1"!==h(.9,0)||"1.25"!==h(1.255,2)||"1000000000000000128"!==h(0xde0b6b3a7640080,0)}))||!s((function(){h({})}))},{toFixed:function(t){var e,n,r,o,i=u(this),c=a(t),s=[0,0,0,0,0,0],d="",h="0";if(c<0||c>20)throw l("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return f(i);if(i<0&&(d="-",i=-i),i>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(i*g(2,69,1))-69)<0?i*g(2,-e,1):i/g(2,e,1),n*=4503599627370496,(e=52-e)>0){for(v(s,0,n),r=c;r>=7;)v(s,1e7,0),r-=7;for(v(s,g(10,r,1),0),r=e-1;r>=23;)b(s,1<<23),r-=23;b(s,1<<r),v(s,1,1),b(s,2),h=y(s)}else v(s,0,n),v(s,1<<-e,0),h=y(s)+m("0",c);return h=c>0?d+((o=h.length)<=c?"0."+m("0",c-o)+h:p(h,0,o-c)+"."+p(h,o-c)):d+h}})},b727:function(t,e,n){var r=n("0366"),o=n("e330"),i=n("44ad"),a=n("7b0b"),u=n("07fa"),c=n("65f0"),s=o([].push),l=function(t){var e=1==t,n=2==t,o=3==t,l=4==t,f=6==t,d=7==t,m=5==t||f;return function(p,h,g,v){for(var b,y,_=a(p),w=i(_),x=r(h,g),O=u(w),S=0,C=v||c,k=e?C(p,O):n||d?C(p,0):void 0;O>S;S++)if((m||S in w)&&(y=x(b=w[S],S,_),t))if(e)k[S]=y;else if(y)switch(t){case 3:return!0;case 5:return b;case 6:return S;case 2:s(k,b)}else switch(t){case 4:return!1;case 7:s(k,b)}return f?-1:o||l?l:k}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},b980:function(t,e,n){var r=n("d039"),o=n("5c6c");t.exports=!r((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",o(1,7)),7!==t.stack)}))},bb2f:function(t,e,n){var r=n("d039");t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},bb5d:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("f08e"),o=function(t){return t.match(new RegExp("^"+r.A_CHARS+"*"))[0].length},i=function(t){return t.match(new RegExp("^"+r.B_CHARS+"*"))[0].length},a=function(t){return t.match(new RegExp("^"+r.C_CHARS+"*"))[0]};function u(t,e){var n=e?r.A_CHARS:r.B_CHARS,o=t.match(new RegExp("^("+n+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(o)return o[1]+String.fromCharCode(204)+c(t.substring(o[1].length));var i=t.match(new RegExp("^"+n+"+"))[0];return i.length===t.length?t:i+String.fromCharCode(e?205:206)+u(t.substring(i.length),!e)}function c(t){var e=a(t),n=e.length;if(n===t.length)return t;t=t.substring(n);var r=o(t)>=i(t);return e+String.fromCharCode(r?206:205)+u(t,r)}e.default=function(t){var e=void 0;if(a(t).length>=2)e=r.C_START_CHAR+c(t);else{var n=o(t)>i(t);e=(n?r.A_START_CHAR:r.B_START_CHAR)+u(t,n)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,(function(t,e){return String.fromCharCode(203)+e}))}},bc3a:function(t,e,n){t.exports=n("cee4")},bc54:function(t,e,n){n("7c4f")},bd8a:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.api=e}return r(t,[{key:"handleCatch",value:function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(t){return this.handleCatch(t),this.api}}}]),t}();e.default=o},bdfe:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n("c243"),i=a(n("5726"));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.fontSize=!n.flat&&n.fontSize>10*n.width?10*n.width:n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(t,e){return this.text.substr(t,e)}},{key:"leftEncode",value:function(t,e){return(0,i.default)(t,e)}},{key:"rightText",value:function(t,e){return this.text.substr(t,e)}},{key:"rightEncode",value:function(t,e){return(0,i.default)(t,e)}},{key:"encodeGuarded",value:function(){var t={fontSize:this.fontSize},e={height:this.guardHeight};return[{data:o.SIDE_BIN,options:e},{data:this.leftEncode(),text:this.leftText(),options:t},{data:o.MIDDLE_BIN,options:e},{data:this.rightEncode(),text:this.rightText(),options:t},{data:o.SIDE_BIN,options:e}]}},{key:"encodeFlat",value:function(){return{data:[o.SIDE_BIN,this.leftEncode(),o.MIDDLE_BIN,this.rightEncode(),o.SIDE_BIN].join(""),text:this.text}}}]),e}(a(n("e762")).default);e.default=u},be5e:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("fd7c"),a=(r=i)&&r.__esModule?r:{default:r},u=n("ab5b");var c="http://www.w3.org/2000/svg",s=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.svg=e,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return o(t,[{key:"render",value:function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e<this.encodings.length;e++){var n=this.encodings[e],r=(0,a.default)(this.options,n.options),o=this.createGroup(t,r.marginTop,this.svg);this.setGroupOptions(o,r),this.drawSvgBarcode(o,r,n),this.drawSVGText(o,r,n),t+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,u.calculateEncodingAttributes)(this.encodings,this.options);var t=(0,u.getTotalWidthOfEncodings)(this.encodings),e=(0,u.getMaximumHeightOfEncodings)(this.encodings),n=t+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,e),this.options.background&&this.drawRect(0,0,n,e,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(t,e,n){var r,o=n.data;r="top"==e.textPosition?e.fontSize+e.textMargin:0;for(var i=0,a=0,u=0;u<o.length;u++)a=u*e.width+n.barcodePadding,"1"===o[u]?i++:i>0&&(this.drawRect(a-e.width*i,r,e.width*i,e.height,t),i=0);i>0&&this.drawRect(a-e.width*(i-1),r,e.width*i,e.height,t)}},{key:"drawSVGText",value:function(t,e,n){var r,o,i=this.document.createElementNS(c,"text");e.displayValue&&(i.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(r=0,i.setAttribute("text-anchor","start")):"right"==e.textAlign?(r=n.width-1,i.setAttribute("text-anchor","end")):(r=n.width/2,i.setAttribute("text-anchor","middle")),i.setAttribute("x",r),i.setAttribute("y",o),i.appendChild(this.document.createTextNode(n.text)),t.appendChild(i))}},{key:"setSvgAttributes",value:function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",c),n.setAttribute("version","1.1"),n.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(t,e,n){var r=this.document.createElementNS(c,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}},{key:"setGroupOptions",value:function(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}},{key:"drawRect",value:function(t,e,n,r,o){var i=this.document.createElementNS(c,"rect");return i.setAttribute("x",t),i.setAttribute("y",e),i.setAttribute("width",n),i.setAttribute("height",r),o.appendChild(i),i}}]),t}();e.default=s},be98:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=u(n("5726")),i=u(n("e762")),a=n("e8b2");function u(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],l=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],f=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(r.isValid=!1,-1!==t.search(/^[0-9]{6}$/))r.middleDigits=t,r.upcA=d(t,"0"),r.text=n.text||""+r.upcA[0]+t+r.upcA[r.upcA.length-1],r.isValid=!0;else{if(-1===t.search(/^[01][0-9]{7}$/))return c(r);if(r.middleDigits=t.substring(1,t.length-1),r.upcA=d(r.middleDigits,t[0]),r.upcA[r.upcA.length-1]!==t[t.length-1])return c(r);r.isValid=!0}return r.displayValue=n.displayValue,n.fontSize>10*n.width?r.fontSize=10*n.width:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=this.encodeMiddleDigits(),{data:t+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101",options:{height:this.guardHeight}}),t.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),t.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),t}},{key:"encodeMiddleDigits",value:function(){var t=this.upcA[0],e=this.upcA[this.upcA.length-1],n=l[parseInt(e)][parseInt(t)];return(0,o.default)(this.middleDigits,n)}}]),e}(i.default);function d(t,e){for(var n=parseInt(t[t.length-1]),r=s[n],o="",i=0,u=0;u<r.length;u++){var c=r[u];o+="X"===c?t[i++]:c}return""+(o=""+e+o)+(0,a.checksum)(o)}e.default=f},bfce:function(t,e,n){"use strict";n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("e260"),n("3ca3"),n("ddb0");function r(t){return(r="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})(t)}n("e9c4"),n("25f0");var o=n("f579"),i=n.n(o),a=n("658f"),u=n.n(a),c={name:"QrCodeComponent",props:{options:{type:Object,default:function(){}},dataModels:{type:Object,default:function(){}},content:{type:String,default:""},isFixedContent:{type:Boolean,default:!1}},components:{VueBarcode:i.a,VueQr:u.a},computed:{codeValue:function(){return this.isFixedContent?this.content:this.options.codeValue}},methods:{getImageData:function(){var t="",e=this.$refs.codeRef;if(e)if("qr"===this.options.mode)t=e.imgUrl;else if("bar"===this.options.mode)try{var n=e.$el.getElementsByTagName("img");n&&n.length&&(t=n[0].src)}catch(t){}return t}},watch:{dataModels:{immediate:!0,deep:!0,handler:function(t){if(this.options.relatedField&&""!==this.options.relatedField)for(var e in t)e===this.options.relatedField&&("object"===r(t[e])?this.options.codeValue=JSON.stringify(t[e]):this.options.codeValue=t[e].toString())}}}},s=n("2877"),l=Object(s.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",["qr"===t.options.mode?n("vue-qr",{ref:"codeRef",attrs:{correctLevel:3,margin:5,size:t.options.codeSize,text:t.codeValue}}):"bar"===t.options.mode?n("vue-barcode",{ref:"codeRef",attrs:{displayValue:t.options.displayCodeValue,height:t.options.codeHeight,value:t.codeValue,"element-tag":"img",font:"-apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif","font-size":"14",width:"1"}},[t._v(" 请输入或配置条码内容(CODE128) ")]):t._e()],1)}),[],!1,null,null,null);e.a=l.exports},c04e:function(t,e,n){var r=n("da84"),o=n("c65b"),i=n("861d"),a=n("d9b5"),u=n("dc4a"),c=n("485a"),s=n("b622"),l=r.TypeError,f=s("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var n,r=u(t,f);if(r){if(void 0===e&&(e="default"),n=o(r,t,e),!i(n)||a(n))return n;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},c17b:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.codabar=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("e762");var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),0===t.search(/^[0-9\-\$\:\.\+\/]+$/)&&(t="A"+t+"A");var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.toUpperCase(),n));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var t=[],e=this.getEncodings(),n=0;n<this.data.length;n++)t.push(e[this.data.charAt(n)]),n!==this.data.length-1&&t.push("0");return{text:this.text,data:t.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default);e.codabar=a},c243:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.SIDE_BIN="101",e.MIDDLE_BIN="01010",e.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},e.EAN2_STRUCTURE=["LL","LG","GL","GG"],e.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],e.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]},c32d:function(t,e){t.exports=require("moment")},c345:function(t,e,n){"use strict";var r=n("c532"),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,i,a={};return t?(r.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(a[e]&&o.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},c401:function(t,e,n){"use strict";var r=n("c532");t.exports=function(t,e,n){return r.forEach(n,(function(n){t=n(t,e)})),t}},c430:function(t,e){t.exports=!1},c513:function(t,e,n){var r=n("23e7"),o=n("1a2d"),i=n("d9b5"),a=n("0d51"),u=n("5692"),c=n("3d87"),s=u("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{keyFor:function(t){if(!i(t))throw TypeError(a(t)+" is not a symbol");if(o(s,t))return s[t]}})},c532:function(t,e,n){"use strict";var r=n("1d2b"),o=n("044b"),i=Object.prototype.toString;function a(t){return"[object Array]"===i.call(t)}function u(t){return null!==t&&"object"==typeof t}function c(t){return"[object Function]"===i.call(t)}function s(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),a(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:a,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:o,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:u,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return u(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:s,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,o=arguments.length;r<o;r++)s(arguments[r],n);return e},extend:function(t,e,n){return s(e,(function(e,o){t[o]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},c65b:function(t,e,n){var r=n("40d5"),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},c6b6:function(t,e,n){var r=n("e330"),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},c6cd:function(t,e,n){var r=n("da84"),o=n("6374"),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},c6eb:function(t,e,n){"use strict";(function(t){var r=n("5ea3"),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.a.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();e.a=u}).call(this,n("dd40")(t))},c740:function(t,e,n){"use strict";var r=n("23e7"),o=n("b727").findIndex,i=n("44d2"),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("findIndex")},c770:function(t,e,n){var r=n("e330"),o=Error,i=r("".replace),a=String(o("zxcasd").stack),u=/\n\s*at [^:]*:[^\n]*/,c=u.test(a);t.exports=function(t,e){if(c&&"string"==typeof t&&!o.prepareStackTrace)for(;e--;)t=i(t,u,"");return t}},c8af:function(t,e,n){"use strict";var r=n("c532");t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},c8d2:function(t,e,n){var r=n("5e77").PROPER,o=n("d039"),i=n("5899");t.exports=function(t){return o((function(){return!!i[t]()||"
"!=="
"[t]()||r&&i[t].name!==t}))}},ca32:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};e.default=r},ca84:function(t,e,n){var r=n("e330"),o=n("1a2d"),i=n("fc6a"),a=n("4d64").indexOf,u=n("d012"),c=r([].push);t.exports=function(t,e){var n,r=i(t),s=0,l=[];for(n in r)!o(u,n)&&o(r,n)&&c(l,n);for(;e.length>s;)o(r,n=e[s++])&&(~a(l,n)||c(l,n));return l}},ca9c:function(t,e,n){"use strict";n("e260"),n("d3b7"),n("e6cf"),n("3ca3"),n("ddb0"),n("b0c0");var r={name:"generate-collapse-item",components:{GenerateFormItem:n("12f6").a,GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"96a9"))}},props:["element","model","rules","remote","display","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.model,collapseActive:this.element.collapse.length?this.element.collapse[0].name:""}},methods:{fillingColumns:function(t){this.$emit("fillingColumns",t)}},watch:{model:{deep:!0,handler:function(t){this.dataModels=this.model}}}},o=n("2877"),i=Object(o.a)(r,(function(){var t,e=this,n=e.$createElement,r=e._self._c||n;return e.display[e.element.model]?r("el-collapse",{staticClass:"renderer-collapse",class:(t={},t[e.element.options.customClass]=e.element.options.customClass,t),attrs:{accordion:e.element.options.accordion},model:{value:e.collapseActive,callback:function(t){e.collapseActive=t},expression:"collapseActive"}},e._l(e.element.collapse,(function(t){return r("el-collapse-item",{key:t.name,attrs:{name:t.name}},[r("div",{staticClass:"el-collapse-header-title",attrs:{slot:"title",title:t.label},slot:"title"},[e._v(e._s(t.label))]),e._l(t.list,(function(t){return["grid"===t.type?r("generate-col-item",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.display,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.dataModels,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns}}):r("generate-form-item",{key:t.key,attrs:{"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.display,edit:e.edit,"event-function":e.eventFunction,models:e.dataModels,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules,widget:t},on:{fillingColumns:e.fillingColumns}})]}))],2)})),1):e._e()}),[],!1,null,null,null);e.a=i.exports},caad:function(t,e,n){"use strict";var r=n("23e7"),o=n("4d64").includes,i=n("d039"),a=n("44d2");r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),a("includes")},cb2d:function(t,e,n){var r=n("1626"),o=n("9112"),i=n("13d2"),a=n("6374");t.exports=function(t,e,n,u){u||(u={});var c=u.enumerable,s=void 0!==u.name?u.name:e;return r(n)&&i(n,s,u),u.global?c?t[e]=n:a(e,n):(u.unsafe?t[e]&&(c=!0):delete t[e],c?t[e]=n:o(t,e,n)),t}},cc12:function(t,e,n){var r=n("da84"),o=n("861d"),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},cc98:function(t,e,n){"use strict";var r=n("23e7"),o=n("c430"),i=n("4738").CONSTRUCTOR,a=n("d256"),u=n("d066"),c=n("1626"),s=n("cb2d"),l=a&&a.prototype;if(r({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(t){return this.then(void 0,t)}}),!o&&c(a)){var f=u("Promise").prototype.catch;l.catch!==f&&s(l,"catch",f,{unsafe:!0})}},cdcc:function(t,e,n){},cdd9:function(t,e){!function(){"use strict";var t,e,n,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},i=function(t){return function(e){return r=typeof(n=e),(null===n?"null":"object"===r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;var n,r}},a=function(t){return function(e){return typeof e===t}},u=i("string"),c=i("object"),s=i("array"),l=(t=null,function(e){return t===e}),f=a("boolean"),d=function(t){return!function(t){return null==t}(t)},m=a("function"),p=a("number"),h=function(){},g=function(t){return function(){return t}},v=function(t){return t},b=g(!1),y=g(!0),_=function(){return w},w={fold:function(t,e){return t()},isSome:b,isNone:y,getOr:n=v,getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:g(null),getOrUndefined:g(void 0),or:n,orThunk:e,map:_,each:h,bind:_,exists:b,forall:y,filter:function(){return _()},toArray:function(){return[]},toString:g("none()")},x=function(t){var e=g(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:y,isNone:b,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return x(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:w},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},O={some:x,none:_,from:function(t){return null==t?w:x(t)}},S=Object.keys,C=Object.hasOwnProperty,k=function(t,e,n,r){return function(t,e){for(var n=S(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}}(t,(function(t,o){(e(t,o)?n:r)(t,o)})),{}},E=function(t,e){return C.call(t,e)},M=Array.prototype.push,T=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!s(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);M.apply(e,t[n])}return e},D=function(t){return function(t,e){return e>=0&&e<t.length?O.some(t[e]):O.none()}(t,0)};"undefined"!=typeof window?window:Function("return this;")();var A,P=function(t,e,n){!function(t,e,n){if(!(u(n)||f(n)||p(n)))throw new Error("Attribute value was not simple");t.setAttribute(e,n+"")}(t.dom,e,n)},R=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},I={fromHtml:function(t,e){var n=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||n.childNodes.length>1)throw new Error("HTML must have a single root node");return R(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return R(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return R(n)},fromDom:R,fromPoint:function(t,e,n){return O.from(t.dom.elementFromPoint(e,n)).map(R)}},z=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),L=tinymce.util.Tools.resolve("tinymce.util.Promise"),j=tinymce.util.Tools.resolve("tinymce.util.URI"),B=tinymce.util.Tools.resolve("tinymce.util.XHR"),F=function(t){return t.getParam("image_dimensions",!0,"boolean")},N=function(t,e){return Math.max(parseInt(t,10),parseInt(e,10))},H=function(t){return t&&(t=t.replace(/px$/,"")),t},V=function(t){return t.length>0&&/^[0-9]+$/.test(t)&&(t+="px"),t},U=function(t){if(t.margin){var e=String(t.margin).split(" ");switch(e.length){case 1:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[0],t["margin-bottom"]=t["margin-bottom"]||e[0],t["margin-left"]=t["margin-left"]||e[0];break;case 2:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[0],t["margin-left"]=t["margin-left"]||e[1];break;case 3:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[2],t["margin-left"]=t["margin-left"]||e[1];break;case 4:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[2],t["margin-left"]=t["margin-left"]||e[3]}delete t.margin}return t},W=function(t){return"IMG"===t.nodeName&&(t.hasAttribute("data-mce-object")||t.hasAttribute("data-mce-placeholder"))},$=function(t,e){return j.isDomSafe(e,"img",t.settings)},G=z.DOM,K=function(t){return t.style.marginLeft&&t.style.marginRight&&t.style.marginLeft===t.style.marginRight?H(t.style.marginLeft):""},q=function(t){return t.style.marginTop&&t.style.marginBottom&&t.style.marginTop===t.style.marginBottom?H(t.style.marginTop):""},X=function(t){return t.style.borderWidth?H(t.style.borderWidth):""},Y=function(t,e){return t.hasAttribute(e)?t.getAttribute(e):""},J=function(t,e){return t.style[e]?t.style[e]:""},Q=function(t){return null!==t.parentNode&&"FIGURE"===t.parentNode.nodeName},Z=function(t,e,n){""===n?t.removeAttribute(e):t.setAttribute(e,n)},tt=function(t){Q(t)?function(t){var e=t.parentNode;G.insertAfter(t,e),G.remove(e)}(t):function(t){var e=G.create("figure",{class:"image"});G.insertAfter(e,t),e.appendChild(t),e.appendChild(G.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false"}(t)},et=function(t,e){var n=t.getAttribute("style"),r=e(null!==n?n:"");r.length>0?(t.setAttribute("style",r),t.setAttribute("data-mce-style",r)):t.removeAttribute("style")},nt=function(t,e){return function(t,n,r){t.style[n]?(t.style[n]=V(r),et(t,e)):Z(t,n,r)}},rt=function(t,e){return t.style[e]?H(t.style[e]):Y(t,e)},ot=function(t,e){var n=V(e);t.style.marginLeft=n,t.style.marginRight=n},it=function(t,e){var n=V(e);t.style.marginTop=n,t.style.marginBottom=n},at=function(t,e){var n=V(e);t.style.borderWidth=n},ut=function(t,e){t.style.borderStyle=e},ct=function(t){return"FIGURE"===t.nodeName},st=function(t){return 0===G.getAttrib(t,"alt").length&&"presentation"===G.getAttrib(t,"role")},lt=function(t){return st(t)?"":Y(t,"alt")},ft=function(t,e){var n=document.createElement("img");return Z(n,"style",e.style),(K(n)||""!==e.hspace)&&ot(n,e.hspace),(q(n)||""!==e.vspace)&&it(n,e.vspace),(X(n)||""!==e.border)&&at(n,e.border),(function(t){return J(t,"borderStyle")}(n)||""!==e.borderStyle)&&ut(n,e.borderStyle),t(n.getAttribute("style"))},dt=function(t,e){return{src:Y(e,"src"),alt:lt(e),title:Y(e,"title"),width:rt(e,"width"),height:rt(e,"height"),class:Y(e,"class"),style:t(Y(e,"style")),caption:Q(e),hspace:K(e),vspace:q(e),border:X(e),borderStyle:J(e,"borderStyle"),isDecorative:st(e)}},mt=function(t,e,n,r,o){n[r]!==e[r]&&o(t,r,n[r])},pt=function(t,e,n){if(n){G.setAttrib(t,"role","presentation");var r=I.fromDom(t);P(r,"alt","")}else{if(l(e)){r=I.fromDom(t);o="alt",r.dom.removeAttribute(o)}else{r=I.fromDom(t);P(r,"alt",e)}"presentation"===G.getAttrib(t,"role")&&G.setAttrib(t,"role","")}var o},ht=function(t,e){return function(n,r,o){t(n,o),et(n,e)}},gt=function(t,e,n){var r=dt(t,n);mt(n,r,e,"caption",(function(t,e,n){return tt(t)})),mt(n,r,e,"src",Z),mt(n,r,e,"title",Z),mt(n,r,e,"width",nt(0,t)),mt(n,r,e,"height",nt(0,t)),mt(n,r,e,"class",Z),mt(n,r,e,"style",ht((function(t,e){return Z(t,"style",e)}),t)),mt(n,r,e,"hspace",ht(ot,t)),mt(n,r,e,"vspace",ht(it,t)),mt(n,r,e,"border",ht(at,t)),mt(n,r,e,"borderStyle",ht(ut,t)),function(t,e,n){n.alt===e.alt&&n.isDecorative===e.isDecorative||pt(t,n.alt,n.isDecorative)}(n,r,e)},vt=function(t,e){var n=t.dom.styles.parse(e),r=U(n),o=t.dom.styles.parse(t.dom.styles.serialize(r));return t.dom.styles.serialize(o)},bt=function(t){var e=t.selection.getNode(),n=t.dom.getParent(e,"figure.image");return n?t.dom.select("img",n)[0]:e&&("IMG"!==e.nodeName||W(e))?null:e},yt=function(t,e){var n=t.dom,r=function(t,e){var n,r={};return k(t,e,(n=r,function(t,e){n[e]=t}),h),r}(t.schema.getTextBlockElements(),(function(e,n){return!t.schema.isValidChild(n,"figure")})),o=n.getParent(e.parentNode,(function(t){return e=r,n=t.nodeName,E(e,n)&&void 0!==e[n]&&null!==e[n];var e,n}),t.getBody());return o?n.split(o,e):e},_t=function(t,e){var n=function(t,e){var n=document.createElement("img");if(gt(t,o(o({},e),{caption:!1}),n),pt(n,e.alt,e.isDecorative),e.caption){var r=G.create("figure",{class:"image"});return r.appendChild(n),r.appendChild(G.create("figcaption",{contentEditable:"true"},"Caption")),r.contentEditable="false",r}return n}((function(e){return vt(t,e)}),e);t.dom.setAttrib(n,"data-mce-id","__mcenew"),t.focus(),t.selection.setContent(n.outerHTML);var r=t.dom.select('*[data-mce-id="__mcenew"]')[0];if(t.dom.setAttrib(r,"data-mce-id",null),ct(r)){var i=yt(t,r);t.selection.select(i)}else t.selection.select(r)},wt=function(t,e){var n=bt(t);if(gt((function(e){return vt(t,e)}),e,n),function(t,e){t.dom.setAttrib(e,"src",e.getAttribute("src"))}(t,n),ct(n.parentNode)){var r=n.parentNode;yt(t,r),t.selection.select(n.parentNode)}else t.selection.select(n),function(t,e,n){var r=function(){n.onload=n.onerror=null,t.selection&&(t.selection.select(n),t.nodeChanged())};n.onload=function(){e.width||e.height||!F(t)||t.dom.setAttribs(n,{width:String(n.clientWidth),height:String(n.clientHeight)}),r()},n.onerror=r}(t,e,n)},xt=function(t,e){var n=bt(t);if(n){var r=dt((function(e){return vt(t,e)}),n),i=o(o({},r),e),a=function(t,e){var n=e.src;return o(o({},e),{src:$(t,n)?n:""})}(t,i);i.src?wt(t,a):function(t,e){if(e){var n=t.dom.is(e.parentNode,"figure.image")?e.parentNode:e;t.dom.remove(n),t.focus(),t.nodeChanged(),t.dom.isEmpty(t.getBody())&&(t.setContent(""),t.selection.setCursorLocation())}}(t,n)}else e.src&&_t(t,o(o({},{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}),e))},Ot=(A=function(t,e){return c(t)&&c(e)?Ot(t,e):e},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<t.length;r++){var o=t[r];for(var i in o)E(o,i)&&(n[i]=A(n[i],o[i]))}return n}),St=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),Ct=tinymce.util.Tools.resolve("tinymce.util.Tools"),kt=function(t){return u(t.value)?t.value:""},Et=function(t,e){var n=[];return Ct.each(t,(function(t){var r=function(t){return u(t.text)?t.text:u(t.title)?t.title:""}(t);if(void 0!==t.menu){var o=Et(t.menu,e);n.push({text:r,items:o})}else{var i=e(t);n.push({text:r,value:i})}})),n},Mt=function(t){return void 0===t&&(t=kt),function(e){return e?O.from(e).map((function(e){return Et(e,t)})):O.none()}},Tt=function(t,e){return function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return O.none()}(t,(function(t){return function(t){return E(t,"items")}(t)?Tt(t.items,e):t.value===e?O.some(t):O.none()}))},Dt=Mt,At=function(t){return Mt(kt)(t)},Pt=function(t,e){return t.bind((function(t){return Tt(t,e)}))},Rt=function(t){return{title:"Advanced",name:"advanced",items:[{type:"input",label:"Style",name:"style"},{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}},It=function(t){var e=Dt((function(e){return t.convertURL(e.value||e.url,"src")})),n=new L((function(n){!function(t,e){var n=function(t){return t.getParam("image_list",!1)}(t);u(n)?B.send({url:n,success:function(t){e(JSON.parse(t))}}):m(n)?n(e):e(n)}(t,(function(t){n(e(t).map((function(t){return T([[{text:"None",value:""}],t])})))}))})),r=At(function(t){return t.getParam("image_class_list")}(t)),o=function(t){return t.getParam("image_advtab",!1,"boolean")}(t),i=function(t){return t.getParam("image_uploadtab",!0,"boolean")}(t),a=function(t){return d(t.getParam("images_upload_url"))}(t),c=function(t){return d(t.getParam("images_upload_handler"))}(t),s=function(t){var e=bt(t);return e?dt((function(e){return vt(t,e)}),e):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}}(t),l=function(t){return t.getParam("image_description",!0,"boolean")}(t),f=function(t){return t.getParam("image_title",!1,"boolean")}(t),p=F(t),h=function(t){return t.getParam("image_caption",!1,"boolean")}(t),g=function(t){return t.getParam("a11y_advanced_options",!1,"boolean")}(t),v=function(t){return t.getParam("automatic_uploads",!0,"boolean")}(t),b=O.some(function(t){return t.getParam("image_prepend_url","","string")}(t)).filter((function(t){return u(t)&&t.length>0}));return n.then((function(t){return{image:s,imageList:t,classList:r,hasAdvTab:o,hasUploadTab:i,hasUploadUrl:a,hasUploadHandler:c,hasDescription:l,hasImageTitle:f,hasDimensions:p,hasImageCaption:h,prependURL:b,hasAccessibilityOptions:g,automaticUploads:v}}))},zt=function(t){var e,n=t.imageList.map((function(t){return{name:"images",type:"listbox",label:"Image list",items:t}})),r={name:"alt",type:"input",label:"Alternative description",disabled:t.hasAccessibilityOptions&&t.image.isDecorative},i=t.classList.map((function(t){return{name:"classes",type:"listbox",label:"Class",items:t}}));return T([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],n.toArray(),t.hasAccessibilityOptions&&t.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],t.hasDescription?[r]:[],t.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],t.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[o(o({},(e=t.classList.isSome()&&t.hasImageCaption,e?{type:"grid",columns:2}:{type:"panel"})),{items:T([i.toArray(),t.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])})]])},Lt=function(t){return{title:"General",name:"general",items:zt(t)}},jt=zt,Bt=function(t){return{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}},Ft=function(t){return{src:{value:t.src,meta:{}},images:t.src,alt:t.alt,title:t.title,dimensions:{width:t.width,height:t.height},classes:t.class,caption:t.caption,style:t.style,vspace:t.vspace,border:t.border,hspace:t.hspace,borderstyle:t.borderStyle,fileinput:[],isDecorative:t.isDecorative}},Nt=function(t,e){return{src:t.src.value,alt:0===t.alt.length&&e?null:t.alt,title:t.title,width:t.dimensions.width,height:t.dimensions.height,class:t.classes,style:t.style,caption:t.caption,hspace:t.hspace,vspace:t.vspace,border:t.border,borderStyle:t.borderstyle,isDecorative:t.isDecorative}},Ht=function(t,e){var n=e.getData();(function(t,e){return/^(?:[a-zA-Z]+:)?\/\//.test(e)?O.none():t.prependURL.bind((function(t){return e.substring(0,t.length)!==t?O.some(t+e):O.none()}))})(t,n.src.value).each((function(t){e.setData({src:{value:t,meta:n.src.meta}})}))},Vt=function(t,e){var n=e.getData(),r=n.src.meta;if(void 0!==r){var o=Ot({},n);!function(t,e,n){t.hasDescription&&u(n.alt)&&(e.alt=n.alt),t.hasAccessibilityOptions&&(e.isDecorative=n.isDecorative||e.isDecorative||!1),t.hasImageTitle&&u(n.title)&&(e.title=n.title),t.hasDimensions&&(u(n.width)&&(e.dimensions.width=n.width),u(n.height)&&(e.dimensions.height=n.height)),u(n.class)&&Pt(t.classList,n.class).each((function(t){e.classes=t.value})),t.hasImageCaption&&f(n.caption)&&(e.caption=n.caption),t.hasAdvTab&&(u(n.style)&&(e.style=n.style),u(n.vspace)&&(e.vspace=n.vspace),u(n.border)&&(e.border=n.border),u(n.hspace)&&(e.hspace=n.hspace),u(n.borderstyle)&&(e.borderstyle=n.borderstyle))}(t,o,r),e.setData(o)}},Ut=function(t,e,n,r){Ht(e,r),Vt(e,r),function(t,e,n,r){var o=r.getData(),i=o.src.value,a=o.src.meta||{};a.width||a.height||!e.hasDimensions||(i.length>0?t.imageSize(i).then((function(t){n.open&&r.setData({dimensions:t})})).catch((function(t){})):r.setData({dimensions:{width:"",height:""}}))}(t,e,n,r),function(t,e,n){var r=n.getData(),o=Pt(t.imageList,r.src.value);e.prevImage=o,n.setData({images:o.map((function(t){return t.value})).getOr("")})}(e,n,r)},Wt=function(t,e,n){var r=U(t(n.style)),o=Ot({},n);return o.vspace=function(t){return t["margin-top"]&&t["margin-bottom"]&&t["margin-top"]===t["margin-bottom"]?H(String(t["margin-top"])):""}(r),o.hspace=function(t){return t["margin-right"]&&t["margin-left"]&&t["margin-right"]===t["margin-left"]?H(String(t["margin-right"])):""}(r),o.border=function(t){return t["border-width"]?H(String(t["border-width"])):""}(r),o.borderstyle=function(t){return t["border-style"]?String(t["border-style"]):""}(r),o.style=function(t,e,n){return e(t(e(n)))}(t,e,r),o},$t=function(t,e,n,r){var o=r.getData();r.block("Uploading image"),D(o.fileinput).fold((function(){r.unblock()}),(function(o){var i,a=URL.createObjectURL(o),u=function(){r.unblock(),URL.revokeObjectURL(a)},c=function(o){r.setData({src:{value:o,meta:{}}}),r.showTab("general"),Ut(t,e,n,r)};(i=o,new L((function(t,e){var n=new FileReader;n.onload=function(){t(n.result)},n.onerror=function(){e(n.error.message)},n.readAsDataURL(i)}))).then((function(n){var i=t.createBlobCache(o,a,n);e.automaticUploads?t.uploadImage(i).then((function(t){c(t.url),u()})).catch((function(e){u(),t.alertErr(e)})):(t.addToBlobCache(i),c(i.blobUri()),r.unblock())}))}))},Gt=function(t,e,n){return function(r,o){"src"===o.name?Ut(t,e,n,r):"images"===o.name?function(t,e,n,r){var o=r.getData(),i=Pt(e.imageList,o.images);i.each((function(t){""===o.alt||n.prevImage.map((function(t){return t.text===o.alt})).getOr(!1)?""===t.value?r.setData({src:t,alt:n.prevAlt}):r.setData({src:t,alt:t.text}):r.setData({src:t})})),n.prevImage=i,Ut(t,e,n,r)}(t,e,n,r):"alt"===o.name?n.prevAlt=r.getData().alt:"style"===o.name?function(t,e){var n=e.getData(),r=Wt(t.parseStyle,t.serializeStyle,n);e.setData(r)}(t,r):"vspace"===o.name||"hspace"===o.name||"border"===o.name||"borderstyle"===o.name?function(t,e,n){var r=Ot(Ft(e.image),n.getData()),o=ft(t.normalizeCss,Nt(r,!1));n.setData({style:o})}(t,e,r):"fileinput"===o.name?$t(t,e,n,r):"isDecorative"===o.name&&(r.getData().isDecorative?r.disable("alt"):r.enable("alt"))}},Kt=function(t){return function(){t.open=!1}},qt=function(t){return t.hasAdvTab||t.hasUploadUrl||t.hasUploadHandler?{type:"tabpanel",tabs:T([[Lt(t)],t.hasAdvTab?[Rt(t)]:[],t.hasUploadTab&&(t.hasUploadUrl||t.hasUploadHandler)?[Bt(t)]:[]])}:{type:"panel",items:jt(t)}},Xt=function(t){return function(e){var n=function(t){return{prevImage:Pt(t.imageList,t.image.src),prevAlt:t.image.alt,open:!0}}(e);return{title:"Insert/Edit Image",size:"normal",body:qt(e),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Ft(e.image),onSubmit:t.onSubmit(e),onChange:Gt(t,e,n),onClose:Kt(n)}}},Yt=function(t){return function(e){return function(n){var r=Ot(Ft(e.image),n.getData());t.execCommand("mceUpdateImage",!1,Nt(r,e.hasAccessibilityOptions)),t.editorUpload.uploadImagesAuto(),n.close()}}},Jt=function(t){return function(e){return $(t,e)?function(t){return new L((function(e){var n=document.createElement("img"),r=function(t){n.onload=n.onerror=null,n.parentNode&&n.parentNode.removeChild(n),e(t)};n.onload=function(){var t={width:N(n.width,n.clientWidth),height:N(n.height,n.clientHeight)};r(L.resolve(t))},n.onerror=function(){r(L.reject("Failed to get image dimensions for: "+t))};var o=n.style;o.visibility="hidden",o.position="fixed",o.bottom=o.left="0px",o.width=o.height="auto",document.body.appendChild(n),n.src=t}))}(t.documentBaseURI.toAbsolute(e)).then((function(t){return{width:String(t.width),height:String(t.height)}})):L.resolve({width:"",height:""})}},Qt=function(t){return function(e,n,r){return t.editorUpload.blobCache.create({blob:e,blobUri:n,name:e.name?e.name.replace(/\.[^\.]+$/,""):null,filename:e.name,base64:r.split(",")[1]})}},Zt=function(t){return function(e){t.editorUpload.blobCache.add(e)}},te=function(t){return function(e){t.windowManager.alert(e)}},ee=function(t){return function(e){return vt(t,e)}},ne=function(t){return function(e){return t.dom.parseStyle(e)}},re=function(t){return function(e,n){return t.dom.serializeStyle(e,n)}},oe=function(t){return function(e){return St(t).upload([e],!1).then((function(t){return 0===t.length?L.reject("Failed to upload image"):!1===t[0].status?L.reject(t[0].error.message):t[0]}))}},ie=function(t){var e={onSubmit:Yt(t),imageSize:Jt(t),addToBlobCache:Zt(t),createBlobCache:Qt(t),alertErr:te(t),normalizeCss:ee(t),parseStyle:ne(t),serializeStyle:re(t),uploadImage:oe(t)};return{open:function(){It(t).then(Xt(e)).then(t.windowManager.open)}}},ae=function(t){var e=t.attr("class");return e&&/\bimage\b/.test(e)},ue=function(t){return function(e){for(var n=e.length,r=function(e){e.attr("contenteditable",t?"true":null)};n--;){var o=e[n];ae(o)&&(o.attr("contenteditable",t?"false":null),Ct.each(o.getAll("figcaption"),r))}}};r.add("image",(function(t){!function(t){t.on("PreInit",(function(){t.parser.addNodeFilter("figure",ue(!0)),t.serializer.addNodeFilter("figure",ue(!1))}))}(t),function(t){t.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:ie(t).open,onSetup:function(e){return e.setActive(d(bt(t))),t.selection.selectorChangedWithUnbind("img:not([data-mce-object],[data-mce-placeholder]),figure.image",e.setActive).unbind}}),t.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:ie(t).open}),t.ui.registry.addContextMenu("image",{update:function(t){return ct(t)||"IMG"===t.nodeName&&!W(t)?["image"]:[]}})}(t),function(t){t.addCommand("mceImage",ie(t).open),t.addCommand("mceUpdateImage",(function(e,n){t.undoManager.transact((function(){return xt(t,n)}))}))}(t)}))}()},cdf9:function(t,e,n){var r=n("825a"),o=n("861d"),i=n("f069");t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},cee4:function(t,e,n){"use strict";var r=n("c532"),o=n("1d2b"),i=n("0a06"),a=n("2444");function u(t){var e=new i(t),n=o(i.prototype.request,e);return r.extend(n,i.prototype,e),r.extend(n,e),n}var c=u(a);c.Axios=i,c.create=function(t){return u(r.merge(a,t))},c.Cancel=n("7a77"),c.CancelToken=n("8df4"),c.isCancel=n("2e67"),c.all=function(t){return Promise.all(t)},c.spread=n("0df6"),t.exports=c,t.exports.default=c},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},d066:function(t,e,n){var r=n("da84"),o=n("1626"),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},d1e7:function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},d256:function(t,e,n){var r=n("da84");t.exports=r.Promise},d28b:function(t,e,n){n("746f")("iterator")},d2bb:function(t,e,n){var r=n("e330"),o=n("825a"),i=n("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},d3b7:function(t,e,n){var r=n("00ee"),o=n("cb2d"),i=n("b041");r||o(Object.prototype,"toString",i,{unsafe:!0})},d44e:function(t,e,n){var r=n("9bf2").f,o=n("1a2d"),i=n("b622")("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!o(t,i)&&r(t,i,{configurable:!0,value:e})}},d4c3:function(t,e,n){var r=n("342f"),o=n("da84");t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},d6d6:function(t,e,n){var r=n("da84").TypeError;t.exports=function(t,e){if(t<e)throw r("Not enough arguments");return t}},d6ea:function(module,__webpack_exports__,__webpack_require__){"use strict";var _Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("1da1"),_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("2909"),_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("5530"),_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("ade3"),regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("96cf"),regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_4__),core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("e9c4"),core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_5__),core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("d3b7"),core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__),core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("159b"),core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7__),core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("99af"),core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_8__),core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("b64b"),core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_9__),core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("4de4"),core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_10__),core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("d81d"),core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_11__),core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("b0c0"),core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_12__),core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("7db0"),core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_13__),core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("caad"),core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_14__),core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("2532"),core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_15__),core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("ac1f"),core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_16__),core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("1276"),core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_17__),core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("a15b"),core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_18__),core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("a434"),core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_19__),core_js_modules_es_array_find_index_js__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("c740"),core_js_modules_es_array_find_index_js__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(core_js_modules_es_array_find_index_js__WEBPACK_IMPORTED_MODULE_20__),core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("d9e2"),core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_21___default=__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_21__),core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("5319"),core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_22__),core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("e6cf"),core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_23__),core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("25f0"),core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_24__),_GenerateFormItem__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("12f6"),_Layouts_GenerateColItem__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("96a9"),_Layouts_GenerateTabItem__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("f6f4"),_Layouts_GenerateReport__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("0cd8"),_Layouts_GenerateCard__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("9bd9"),_Layouts_GenerateCollapseItem__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("ca9c"),_util_index__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("4260"),_util_event_bus__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("0f01"),lodash__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("60bb"),lodash__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_33__),axios__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__("bc3a"),axios__WEBPACK_IMPORTED_MODULE_34___default=__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_34__),uuid__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__("ec26"),_common_consts_form_base_config__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__("6ba6"),_util_widget_public_const__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__("e2e6"),_adapters_api_adapter__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__("7694"),moment__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__("c32d"),moment__WEBPACK_IMPORTED_MODULE_39___default=__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_39__),x2js__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__("98fc"),x2js__WEBPACK_IMPORTED_MODULE_40___default=__webpack_require__.n(x2js__WEBPACK_IMPORTED_MODULE_40__);__webpack_exports__.a={name:"iss-library-form-renderer",components:{GenerateFormItem:_GenerateFormItem__WEBPACK_IMPORTED_MODULE_25__.a,GenerateColItem:_Layouts_GenerateColItem__WEBPACK_IMPORTED_MODULE_26__.default,GenerateTabItem:_Layouts_GenerateTabItem__WEBPACK_IMPORTED_MODULE_27__.a,GenerateCard:_Layouts_GenerateCard__WEBPACK_IMPORTED_MODULE_29__.a,GenerateCollapseItem:_Layouts_GenerateCollapseItem__WEBPACK_IMPORTED_MODULE_30__.a,GenerateReport:_Layouts_GenerateReport__WEBPACK_IMPORTED_MODULE_28__.a},props:{source:{type:Object,default:function(){return JSON.stringify(Object(_common_consts_form_base_config__WEBPACK_IMPORTED_MODULE_36__.a)())}},remote:{type:Object,default:function(){return{}}},value:{type:Object,default:function(){return{}}},edit:{type:Boolean,default:!0},printRead:{type:Boolean,default:!1},remoteOptionSource:{type:Object,default:function(){return{}}},preview:{type:Boolean,default:!1},preferPlatform:{type:String,default:"pc"},lockPlatform:{type:Boolean,default:!1},variables:{type:Object,default:function(){return{}}},currentFormId:{type:String,default:function(){return""}},formPublishVersionId:{type:String,default:function(){return""}}},provide:function(){return{variable:this.variables,currentFormId:this.currentFormId,formPublishVersionId:this.formPublishVersionId,formValue:this.value,preview:this.preview}},computed:{platform:function(){return this.lockPlatform?this.preferPlatform:this.responsivePlatform}},data:function(){return{responsivePlatform:"pc",data:{},models:{},rules:{},displayFields:{},resetModels:{},formKey:Object(uuid__WEBPACK_IMPORTED_MODULE_35__.a)(),formStyleKey:Object(uuid__WEBPACK_IMPORTED_MODULE_35__.a)(),formValue:this.value,formShow:!1,formRef:"FORM_".concat(Object(uuid__WEBPACK_IMPORTED_MODULE_35__.a)()),containerKey:Object(uuid__WEBPACK_IMPORTED_MODULE_35__.a)(),dataSourceValue:[],eventFunction:{}}},created:function(){this.data=lodash__WEBPACK_IMPORTED_MODULE_33___default.a.cloneDeep(this.source),this._loadDataSource(),this._loadEvents(),this._initForm()},mounted:function(){var t=this,e=this;_util_event_bus__WEBPACK_IMPORTED_MODULE_32__.a.$on("on-change-"+this.containerKey,(function(n,r,o){t.containerKey===o&&e.setData(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_3__.a)({},r,n)),e.$emit("on-change",r,n,e.models),e.$emit("on-".concat(r,"-change"),n)})),this.$nextTick((function(){t.eventFunction.mounted&&t.eventFunction.mounted()})),this.responsivePlatform=this.preferPlatform,this._resizeHandler(),window.addEventListener("resize",lodash__WEBPACK_IMPORTED_MODULE_33___default.a.throttle((function(){e._resizeHandler()}),300))},beforeDestroy:function(){var t=".iss-form-"+this.formStyleKey+" ";Object(_util_index__WEBPACK_IMPORTED_MODULE_31__.a)(t),_util_event_bus__WEBPACK_IMPORTED_MODULE_32__.a.$off("on-change-"+this.containerKey),window.removeEventListener("resize",this._resizeHandler)},methods:{fillingColumns:function(t){var e=this;if(t.selectedItem){var n=t.selectedItem.widgetModel;n&&this.data.list.forEach((function(r,o){r.model===n&&(e.$set(e.data.list[o].options.selectedMap,"label",t.selectedItem.label),e.$set(e.data.list[o].options.selectedMap,"value",t.selectedItem.value))})),this.$set(this.models,n,t.selectedItem.value||""),this.$set(this.models,"".concat(n,"_").concat(_util_widget_public_const__WEBPACK_IMPORTED_MODULE_37__.a),t.selectedItem.label||"")}t.fillingRules&&t.fillingRules.length&&(t.value&&Object.keys(t.value).length?t.fillingRules.forEach((function(n){e.$set(e.models,n.toColumnName,t.value[n.fromColumnName])})):t.fillingRules.forEach((function(t){var n=e.data.list.map((function(e){if(e.model===t.toColumnName)return e.options.defaultValue})).filter((function(t){return null!=t}));n.length&&e.$set(e.models,t.toColumnName,n[0])})))},getWidthType:function(t){return t<576?"mobile":t<792?"pad":"pc"},_resizeHandler:function(){if(!document.hidden){var t=document.getElementById("iss-form-renderer");if(t){var e=t.getBoundingClientRect().width;this.responsivePlatform=this.getWidthType(e)}}},_initForm:function(){if(this.formShow=!1,Object.keys(this.data).length?this.generateModel(this.data.list):this.generateModel([]),this.resetModels=lodash__WEBPACK_IMPORTED_MODULE_33___default.a.cloneDeep(this.models),this.models=Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},this.models),this.formShow=!0,this.data.config&&this.data.config.styleSheets){var t=".iss-form-"+this.formStyleKey+" ";Object(_util_index__WEBPACK_IMPORTED_MODULE_31__.c)(Object(_util_index__WEBPACK_IMPORTED_MODULE_31__.b)(this.data.config.styleSheets),t)}},_loadEvents:function(){if(this.data.config&&this.data.config.eventScript)for(var t=0;t<this.data.config.eventScript.length;t++){var e=this.data.config.eventScript[t];try{this.eventFunction[e.key]=Function(e.func).bind(this)}catch(t){this.$alert(t.message,"Function[".concat(e.key,"] 动作设置错误"),{type:"error"})}}},_loadDataSource:function(){if(this.data.config&&this.data.config.dataSource)for(var t=0;t<this.data.config.dataSource.length;t++){var e=this.data.config.dataSource[t];e.auto&&this._sendRequest(e.name)}},_sendRequest:function(t){var e=this,n=this.data.config.dataSource.find((function(e){return e.name===t}));if(n){var r={method:n.method,url:n.url,headers:n.headers,params:n.params};if(n.requestFunc)r=Function("config",n.requestFunc).bind(this)(r);axios__WEBPACK_IMPORTED_MODULE_34___default()(r).then((function(t){var r=t;n.responseFunc&&(r=Function("res",n.responseFunc).bind(e)(t.data));var o=e.dataSourceValue.find((function(t){return t.key===n.key}));o?o.value=r:e.dataSourceValue.push({key:n.key,value:r})})).catch((function(t){n.errorFunc&&Function("error",n.errorFunc).bind(e)(t)}))}},generateModel:function generateModel(genList){for(var _this5=this,parentDisplay=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],_loop=function _loop(i){if("grid"===genList[i].type)_this5.displayFields[genList[i].model]=parentDisplay&&!genList[i].options.hidden,genList[i].columns.forEach((function(t){_this5.generateModel(t.list,!genList[i].options.hidden)}));else if("tabs"===genList[i].type)genList[i].tabs.forEach((function(t){_this5.generateModel(t.list,!genList[i].options.hidden)})),_this5.displayFields[genList[i].model]=parentDisplay&&!genList[i].options.hidden;else if("collapse"===genList[i].type)genList[i].collapse.forEach((function(t){_this5.generateModel(t.list,!genList[i].options.hidden)})),_this5.displayFields[genList[i].model]=parentDisplay&&!genList[i].options.hidden;else if("report"===genList[i].type)genList[i].rows.forEach((function(t){t.columns.forEach((function(t){_this5.generateModel(t.list,!genList[i].options.hidden)}))})),_this5.displayFields[genList[i].model]=parentDisplay&&!genList[i].options.hidden;else if("card"===genList[i].type)_this5.generateModel(genList[i].list,!genList[i].options.hidden),_this5.displayFields[genList[i].model]=parentDisplay&&!genList[i].options.hidden;else{if(Object.keys(_this5.formValue).indexOf(genList[i].model)>=0)genList[i].key&&genList[i].model&&(_this5.models[genList[i].model]=_this5.formValue[genList[i].model]),_this5.displayFields[genList[i].model]=parentDisplay&&!genList[i].options.hidden;else{if(genList[i].key&&genList[i].model)if(genList[i].options.isVariableDefaultValue){var value="未初始化变量数据";_this5.variables&&(value=_this5.variables[genList[i].options.defaultVariable]||""),_this5.models[genList[i].model]=value}else _this5.models[genList[i].model]=genList[i].options.defaultValue;_this5.displayFields[genList[i].model]=parentDisplay&&!genList[i].options.hidden}genList[i].tableColumns&&genList[i].tableColumns.length&&genList[i].tableColumns.forEach((function(item){_this5.rules["".concat(genList[i].model,".").concat(item.model)]?_this5.rules["".concat(genList[i].model,".").concat(item.model)]=[].concat(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(_this5.rules["".concat(genList[i].model,".").concat(item.model)]),Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(item.rules?item.rules.map((function(im){if(im.pattern)return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},im),{},{pattern:eval(im.pattern)});if(im.func){var validatorFunc=Function("rule","value","callback",im.func).bind(_this5);return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},im),{},{validator:validatorFunc})}return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},im)})):[])):_this5.rules["".concat(genList[i].model,".").concat(item.model)]=Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(item.rules?item.rules.map((function(im){if(im.pattern)return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},im),{},{pattern:eval(im.pattern)});if(im.func){var validatorFunc=Function("rule","value","callback",im.func).bind(_this5);return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},im),{},{validator:validatorFunc})}return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},im)})):[])})),_this5.rules[genList[i].model]?_this5.rules[genList[i].model]=[].concat(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(_this5.rules[genList[i].model]),Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(genList[i].rules?genList[i].rules.map((function(item){if(item.pattern)return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},item),{},{pattern:eval(item.pattern)});if(item.func){var validatorFunc=Function("rule","value","callback",item.func).bind(_this5);return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},item),{},{validator:validatorFunc})}return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},item)})):[])):_this5.rules[genList[i].model]=Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(genList[i].rules?genList[i].rules.map((function(item){if(item.pattern)return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},item),{},{pattern:eval(item.pattern)});if(item.func){var validatorFunc=Function("rule","value","callback",item.func).bind(_this5);return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},item),{},{validator:validatorFunc})}return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},item)})):[])}},i=0;i<genList.length;i++)_loop(i)},_setProperty:function(t,e,n,r){for(var o=this,i=0;i<t.length;i++)"grid"===t[i].type?t[i].columns.forEach((function(t){o._setProperty(t.list,e,n,r)})):"tabs"===t[i].type?t[i].tabs.forEach((function(t){o._setProperty(t.list,e,n,r)})):"collapse"===t[i].type?t[i].collapse.forEach((function(t){o._setProperty(t.list,e,n,r)})):"card"===t[i].type?this._setProperty(t[i].list,e,n,r):"report"===t[i].type?t[i].rows.forEach((function(t){t.columns.forEach((function(t){o._setProperty(t.list,e,n,r)}))})):e.indexOf(t[i].model)>=0&&this.$set(t[i].options,r,n)},_updateClassName:function(t,e,n,r){for(var o=this,i=0;i<t.length;i++)if("grid"===t[i].type)t[i].columns.forEach((function(t){o._updateClassName(t.list,e,n,r)}));else if("tabs"===t[i].type)t[i].tabs.forEach((function(t){o._updateClassName(t.list,e,n,r)}));else if("collapse"===t[i].type)t[i].collapse.forEach((function(t){o._updateClassName(t.list,e,n,r)}));else if("card"===t[i].type)this._updateClassName(t[i].list,e,n,r);else if("report"===t[i].type)t[i].rows.forEach((function(t){t.columns.forEach((function(t){o._updateClassName(t.list,e,n,r)}))}));else if(e.indexOf(t[i].model)>=0&&("add"!==r||t[i].options.customClass.split(" ").includes(n)||this.$set(t[i].options,"customClass",[].concat(Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(t[i].options.customClass.split(" ")),[n]).join(" ")),"remove"===r&&t[i].options.customClass.split(" ").includes(n))){var a=t[i].options.customClass.split(" ");a.splice(a.findIndex((function(t){return t===n})),1),this.$set(t[i].options,"customClass",a.join(" "))}},_setOptions:function(t,e,n){for(var r=this,o=function(o){"grid"===t[o].type?t[o].columns.forEach((function(t){r._setOptions(t.list,e,n)})):"tabs"===t[o].type?t[o].tabs.forEach((function(t){r._setOptions(t.list,e,n)})):"collapse"===t[o].type?t[o].collapse.forEach((function(t){r._setOptions(t.list,e,n)})):"card"===t[o].type?r._setOptions(t[o].list,e,n):"report"===t[o].type?t[o].rows.forEach((function(t){t.columns.forEach((function(t){r._setOptions(t.list,e,n)}))})):e.indexOf(t[o].model)>=0&&Object.keys(n).forEach((function(e){r.$set(t[o].options,e,n[e])}))},i=0;i<t.length;i++)o(i)},_getData:function(t,e){if(this.eventFunction.beforeSubmit&&!this.eventFunction.beforeSubmit())return void e(new Error("请按提示完善表单内容(E:BEFORE_SUBMIT)"));var n=lodash__WEBPACK_IMPORTED_MODULE_33___default.a.cloneDeep(this.models);if(this.data&&this.data.config&&this.data.config.submitHiddenArea)t(n);else{var r={};for(var o in n){var i=o.replace("_".concat(_util_widget_public_const__WEBPACK_IMPORTED_MODULE_37__.a),"");this.displayFields[i]&&(r[o]=n[o])}t(r)}},getData:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return new Promise((function(n,r){e?t.$refs[t.formRef].validate((function(e){e?t._getData(n,r):r(new Error("请按提示完善表单内容"))})):t._getData(n,r)}))},reset:function(){var t=this;this.setData(lodash__WEBPACK_IMPORTED_MODULE_33___default.a.cloneDeep(this.resetModels)),this.$nextTick((function(){t.$refs[t.formRef]&&t.$refs[t.formRef].clearValidate()}))},onInputChange:function(t,e){this.$emit("on-change",e,t,this.models),this.$emit("on-".concat(e,"-change"),t)},display:function(t){var e=this;Object.keys(this.displayFields).forEach((function(n){t.indexOf(n)>=0&&e.$set(e.displayFields,n,!0)})),this.displayFields=Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},this.displayFields)},hide:function(t){var e=this;Object.keys(this.displayFields).forEach((function(n){t.indexOf(n)>=0&&e.$set(e.displayFields,n,!1)})),this.displayFields=Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__.a)({},this.displayFields)},disabled:function(t,e){this._setProperty(this.data.list,t,e,"disabled")},setDisabled:function(t,e){this._setProperty(this.data.list,t,e,"disabled")},setReadOnly:function(t,e){this._setProperty(this.data.list,t,e,"readonly")},addClassName:function(t,e){this._updateClassName(this.data.list,t,e,"add")},removeClassName:function(t,e){this._updateClassName(this.data.list,t,e,"remove")},refresh:function(){this._loadDataSource(),this._loadEvents(),this._initForm()},setData:function(t){var e=this;Object.keys(t).forEach((function(n){e.$set(e.models,n,t[n])}))},_findComponentDownward:function(t,e,n){var r=t.$children;if(n)return n;if(0===r.length)n=null;else for(var o=0;o<r.length;o++){var i=r[o];if(Object.keys(i.$refs).indexOf(e)>=0){n=i.$refs[e];break}n=this._findComponentDownward(i,e,n)}return n},getComponent:function(t){return Object.keys(this.$refs).indexOf(t)>=0?this.$refs[t]:this._findComponentDownward(this,t,null)},getComponentById:function(t){return this.getComponent("icd-form-".concat(t))},getValues:function(){return this.models},getValue:function(t){return this.models[t]},setValues:function(t){var e=this;Object.keys(t).forEach((function(n){e.$set(e.models,n,t[n])}))},setValue:function(t,e){this.$set(this.models,t,e)},setRules:function(t,e){this.$set(this.rules,t,Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(e)),this.$refs[this.formRef].clearValidate(t)},setOptions:function(t,e){this._setOptions(this.data.list,t,e)},httpRequest:function(t){return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("get"!==t.type.toLowerCase()){e.next=4;break}return e.abrupt("return",axios__WEBPACK_IMPORTED_MODULE_34___default.a.get(t.url,t.config));case 4:if("post"!==t.type.toLowerCase()){e.next=8;break}return e.abrupt("return",axios__WEBPACK_IMPORTED_MODULE_34___default.a.post(t.url,t.params,t.config));case 8:if("put"!==t.type.toLowerCase()){e.next=12;break}return e.abrupt("return",axios__WEBPACK_IMPORTED_MODULE_34___default.a.put(t.url,t.params,t.config));case 12:if("delete"!==t.type.toLowerCase()){e.next=14;break}return e.abrupt("return",axios__WEBPACK_IMPORTED_MODULE_34___default.a.delete(t.url,t.config));case 14:case"end":return e.stop()}}),e)})))()},onTriggerThirdApi:function(t){return Object(_Volumes_Files_WorkSpace_ISS_LCDP_iss_library_form_designer_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.body="string"==typeof t.body?t.body:JSON.stringify(t.body),e.next=3,Object(_adapters_api_adapter__WEBPACK_IMPORTED_MODULE_38__.l)(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))()},xmlToJson:function(t){return(new x2js__WEBPACK_IMPORTED_MODULE_40___default.a).xml2js(t.toString())},getTimeUtils:function(){return moment__WEBPACK_IMPORTED_MODULE_39___default.a},getLodash:function(){return lodash__WEBPACK_IMPORTED_MODULE_33___default.a}}}},d784:function(t,e,n){"use strict";n("ac1f");var r=n("e330"),o=n("cb2d"),i=n("9263"),a=n("d039"),u=n("b622"),c=n("9112"),s=u("species"),l=RegExp.prototype;t.exports=function(t,e,n,f){var d=u(t),m=!a((function(){var e={};return e[d]=function(){return 7},7!=""[t](e)})),p=m&&!a((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return e=!0,null},n[d](""),!e}));if(!m||!p||n){var h=r(/./[d]),g=e(d,""[t],(function(t,e,n,o,a){var u=r(t),c=e.exec;return c===i||c===l.exec?m&&!a?{done:!0,value:h(e,n,o)}:{done:!0,value:u(n,e,o)}:{done:!1}}));o(String.prototype,t,g[0]),o(l,d,g[1])}f&&c(l[d],"sham",!0)}},d81d:function(t,e,n){"use strict";var r=n("23e7"),o=n("b727").map;r({target:"Array",proto:!0,forced:!n("1dde")("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},d86b:function(t,e,n){var r=n("d039");t.exports=r((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},d925:function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},d9b5:function(t,e,n){var r=n("da84"),o=n("d066"),i=n("1626"),a=n("3a9b"),u=n("fdbf"),c=r.Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&a(e.prototype,c(t))}},d9e2:function(t,e,n){var r=n("23e7"),o=n("da84"),i=n("2ba4"),a=n("e5cb"),u=o.WebAssembly,c=7!==Error("e",{cause:7}).cause,s=function(t,e){var n={};n[t]=a(t,e,c),r({global:!0,constructor:!0,arity:1,forced:c},n)},l=function(t,e){if(u&&u[t]){var n={};n[t]=a("WebAssembly."+t,e,c),r({target:"WebAssembly",stat:!0,constructor:!0,arity:1,forced:c},n)}};s("Error",(function(t){return function(e){return i(t,this,arguments)}})),s("EvalError",(function(t){return function(e){return i(t,this,arguments)}})),s("RangeError",(function(t){return function(e){return i(t,this,arguments)}})),s("ReferenceError",(function(t){return function(e){return i(t,this,arguments)}})),s("SyntaxError",(function(t){return function(e){return i(t,this,arguments)}})),s("TypeError",(function(t){return function(e){return i(t,this,arguments)}})),s("URIError",(function(t){return function(e){return i(t,this,arguments)}})),l("CompileError",(function(t){return function(e){return i(t,this,arguments)}})),l("LinkError",(function(t){return function(e){return i(t,this,arguments)}})),l("RuntimeError",(function(t){return function(e){return i(t,this,arguments)}}))},d9f5:function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("c65b"),a=n("e330"),u=n("c430"),c=n("83ab"),s=n("4930"),l=n("d039"),f=n("1a2d"),d=n("3a9b"),m=n("825a"),p=n("fc6a"),h=n("a04b"),g=n("577e"),v=n("5c6c"),b=n("7c73"),y=n("df75"),_=n("241c"),w=n("057f"),x=n("7418"),O=n("06cf"),S=n("9bf2"),C=n("37e8"),k=n("d1e7"),E=n("cb2d"),M=n("5692"),T=n("f772"),D=n("d012"),A=n("90e3"),P=n("b622"),R=n("e538"),I=n("746f"),z=n("57b9"),L=n("d44e"),j=n("69f3"),B=n("b727").forEach,F=T("hidden"),N=j.set,H=j.getterFor("Symbol"),V=Object.prototype,U=o.Symbol,W=U&&U.prototype,$=o.TypeError,G=o.QObject,K=O.f,q=S.f,X=w.f,Y=k.f,J=a([].push),Q=M("symbols"),Z=M("op-symbols"),tt=M("wks"),et=!G||!G.prototype||!G.prototype.findChild,nt=c&&l((function(){return 7!=b(q({},"a",{get:function(){return q(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=K(V,e);r&&delete V[e],q(t,e,n),r&&t!==V&&q(V,e,r)}:q,rt=function(t,e){var n=Q[t]=b(W);return N(n,{type:"Symbol",tag:t,description:e}),c||(n.description=e),n},ot=function(t,e,n){t===V&&ot(Z,e,n),m(t);var r=h(e);return m(n),f(Q,r)?(n.enumerable?(f(t,F)&&t[F][r]&&(t[F][r]=!1),n=b(n,{enumerable:v(0,!1)})):(f(t,F)||q(t,F,v(1,{})),t[F][r]=!0),nt(t,r,n)):q(t,r,n)},it=function(t,e){m(t);var n=p(e),r=y(n).concat(st(n));return B(r,(function(e){c&&!i(at,n,e)||ot(t,e,n[e])})),t},at=function(t){var e=h(t),n=i(Y,this,e);return!(this===V&&f(Q,e)&&!f(Z,e))&&(!(n||!f(this,e)||!f(Q,e)||f(this,F)&&this[F][e])||n)},ut=function(t,e){var n=p(t),r=h(e);if(n!==V||!f(Q,r)||f(Z,r)){var o=K(n,r);return!o||!f(Q,r)||f(n,F)&&n[F][r]||(o.enumerable=!0),o}},ct=function(t){var e=X(p(t)),n=[];return B(e,(function(t){f(Q,t)||f(D,t)||J(n,t)})),n},st=function(t){var e=t===V,n=X(e?Z:p(t)),r=[];return B(n,(function(t){!f(Q,t)||e&&!f(V,t)||J(r,Q[t])})),r};s||(E(W=(U=function(){if(d(W,this))throw $("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,e=A(t),n=function(t){this===V&&i(n,Z,t),f(this,F)&&f(this[F],e)&&(this[F][e]=!1),nt(this,e,v(1,t))};return c&&et&&nt(V,e,{configurable:!0,set:n}),rt(e,t)}).prototype,"toString",(function(){return H(this).tag})),E(U,"withoutSetter",(function(t){return rt(A(t),t)})),k.f=at,S.f=ot,C.f=it,O.f=ut,_.f=w.f=ct,x.f=st,R.f=function(t){return rt(P(t),t)},c&&(q(W,"description",{configurable:!0,get:function(){return H(this).description}}),u||E(V,"propertyIsEnumerable",at,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:U}),B(y(tt),(function(t){I(t)})),r({target:"Symbol",stat:!0,forced:!s},{useSetter:function(){et=!0},useSimple:function(){et=!1}}),r({target:"Object",stat:!0,forced:!s,sham:!c},{create:function(t,e){return void 0===e?b(t):it(b(t),e)},defineProperty:ot,defineProperties:it,getOwnPropertyDescriptor:ut}),r({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:ct}),z(),L(U,"Symbol"),D[F]=!0},da3d:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var r=u(n("6f24")),o=u(n("e8c9")),i=u(n("70b0")),a=u(n("ed3f"));function u(t){return t&&t.__esModule?t:{default:t}}e.CODE128=r.default,e.CODE128A=o.default,e.CODE128B=i.default,e.CODE128C=a.default},da84:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n("c8ba"))},dbb4:function(t,e,n){var r=n("23e7"),o=n("83ab"),i=n("56ef"),a=n("fc6a"),u=n("06cf"),c=n("8418");r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),o=u.f,s=i(r),l={},f=0;s.length>f;)void 0!==(n=o(r,e=s[f++]))&&c(l,e,n);return l}})},dc4a:function(t,e,n){var r=n("59ed");t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},dca2:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(t,n){r(this,e);var i=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return i.name="InvalidInputException",i.symbology=t,i.input=n,i.message='"'+i.input+'" is not a valid input for '+i.symbology,i}return i(e,Error),e}(),u=function(t){function e(){r(this,e);var t=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.name="InvalidElementException",t.message="Not supported type to render on",t}return i(e,Error),e}(),c=function(t){function e(){r(this,e);var t=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.name="NoElementException",t.message="No element to render on.",t}return i(e,Error),e}();e.InvalidInputException=a,e.InvalidElementException=u,e.NoElementException=c},dd40:function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},ddb0:function(t,e,n){var r=n("da84"),o=n("fdbc"),i=n("785a"),a=n("e260"),u=n("9112"),c=n("b622"),s=c("iterator"),l=c("toStringTag"),f=a.values,d=function(t,e){if(t){if(t[s]!==f)try{u(t,s,f)}catch(e){t[s]=f}if(t[l]||u(t,l,e),o[e])for(var n in a)if(t[n]!==a[n])try{u(t,n,a[n])}catch(e){t[n]=a[n]}}};for(var m in o)d(r[m]&&r[m].prototype,m);d(i,"DOMTokenList")},df09:function(t,e,n){"use strict";n("519d")},df75:function(t,e,n){var r=n("ca84"),o=n("7839");t.exports=Object.keys||function(t){return r(t,o)}},df7c:function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var o=t[r];"."===o?t.splice(r,1):".."===o?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}e.resolve=function(){for(var e="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a=i>=0?arguments[i]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,o="/"===a.charAt(0))}return(o?"/":"")+(e=n(r(e.split("/"),(function(t){return!!t})),!o).join("/"))||"."},e.normalize=function(t){var i=e.isAbsolute(t),a="/"===o(t,-1);return(t=n(r(t.split("/"),(function(t){return!!t})),!i).join("/"))||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var o=r(t.split("/")),i=r(n.split("/")),a=Math.min(o.length,i.length),u=a,c=0;c<a;c++)if(o[c]!==i[c]){u=c;break}var s=[];for(c=u;c<o.length;c++)s.push("..");return(s=s.concat(i.slice(u))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,o=!0,i=t.length-1;i>=1;--i)if(47===(e=t.charCodeAt(i))){if(!o){r=i;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"/":t.slice(0,r)},e.basename=function(t,e){var n=function(t){"string"!=typeof t&&(t+="");var e,n=0,r=-1,o=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!o){n=e+1;break}}else-1===r&&(o=!1,r=e+1);return-1===r?"":t.slice(n,r)}(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,n=0,r=-1,o=!0,i=0,a=t.length-1;a>=0;--a){var u=t.charCodeAt(a);if(47!==u)-1===r&&(o=!1,r=a+1),46===u?-1===e?e=a:1!==i&&(i=1):-1!==e&&(i=-1);else if(!o){n=a+1;break}}return-1===e||-1===r||0===i||1===i&&e===r-1&&e===n+1?"":t.slice(e,r)};var o="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n("4362"))},dff1:function(t,e,n){"use strict";(function(t){var r=n("26ee"),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.a.Buffer:void 0,u=a?a.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}}).call(this,n("dd40")(t))},e01a:function(t,e,n){"use strict";var r=n("23e7"),o=n("83ab"),i=n("da84"),a=n("e330"),u=n("1a2d"),c=n("1626"),s=n("3a9b"),l=n("577e"),f=n("9bf2").f,d=n("e893"),m=i.Symbol,p=m&&m.prototype;if(o&&c(m)&&(!("description"in p)||void 0!==m().description)){var h={},g=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=s(p,this)?new m(t):void 0===t?m():m(t);return""===t&&(h[e]=!0),e};d(g,m),g.prototype=p,p.constructor=g;var v="Symbol(test)"==String(m("test")),b=a(p.toString),y=a(p.valueOf),_=/^Symbol\((.*)\)[^)]+$/,w=a("".replace),x=a("".slice);f(p,"description",{configurable:!0,get:function(){var t=y(this),e=b(t);if(u(h,t))return"";var n=v?x(e,7,-1):w(e,_,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:g})}},e163:function(t,e,n){var r=n("da84"),o=n("1a2d"),i=n("1626"),a=n("7b0b"),u=n("f772"),c=n("e177"),s=u("IE_PROTO"),l=r.Object,f=l.prototype;t.exports=c?l.getPrototypeOf:function(t){var e=a(t);if(o(e,s))return e[s];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof l?f:null}},e177:function(t,e,n){var r=n("d039");t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e260:function(t,e,n){"use strict";var r=n("fc6a"),o=n("44d2"),i=n("3f8c"),a=n("69f3"),u=n("9bf2").f,c=n("7dd0"),s=n("c430"),l=n("83ab"),f=a.set,d=a.getterFor("Array Iterator");t.exports=c(Array,"Array",(function(t,e){f(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=d(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values");var m=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!s&&l&&"values"!==m.name)try{u(m,"name",{value:"values"})}catch(t){}},e2e6:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r="NRQWEZLM"},e330:function(t,e,n){var r=n("40d5"),o=Function.prototype,i=o.bind,a=o.call,u=r&&i.bind(a,a);t.exports=r?function(t){return t&&u(t)}:function(t){return t&&function(){return a.apply(t,arguments)}}},e391:function(t,e,n){var r=n("577e");t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},e439:function(t,e,n){var r=n("23e7"),o=n("d039"),i=n("fc6a"),a=n("06cf").f,u=n("83ab"),c=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!u||c,sham:!u},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},e538:function(t,e,n){var r=n("b622");e.f=r},e5cb:function(t,e,n){"use strict";var r=n("d066"),o=n("1a2d"),i=n("9112"),a=n("3a9b"),u=n("d2bb"),c=n("e893"),s=n("aeb0"),l=n("7156"),f=n("e391"),d=n("ab36"),m=n("c770"),p=n("b980"),h=n("83ab"),g=n("c430");t.exports=function(t,e,n,v){var b=v?2:1,y=t.split("."),_=y[y.length-1],w=r.apply(null,y);if(w){var x=w.prototype;if(!g&&o(x,"cause")&&delete x.cause,!n)return w;var O=r("Error"),S=e((function(t,e){var n=f(v?e:t,void 0),r=v?new w(t):new w;return void 0!==n&&i(r,"message",n),p&&i(r,"stack",m(r.stack,2)),this&&a(x,this)&&l(r,this,S),arguments.length>b&&d(r,arguments[b]),r}));if(S.prototype=x,"Error"!==_?u?u(S,O):c(S,O,{name:!0}):h&&"stackTraceLimit"in w&&(s(S,w,"stackTraceLimit"),s(S,w,"prepareStackTrace")),c(S,w),!g)try{x.name!==_&&i(x,"name",_),x.constructor=S}catch(t){}return S}}},e667:function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},e683:function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},e6cf:function(t,e,n){n("5e7e"),n("14e5"),n("cc98"),n("3529"),n("f22b"),n("7149")},e762:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.text=n.text||e,this.options=n}},e893:function(t,e,n){var r=n("1a2d"),o=n("56ef"),i=n("06cf"),a=n("9bf2");t.exports=function(t,e,n){for(var u=o(e),c=a.f,s=i.f,l=0;l<u.length;l++){var f=u[l];r(t,f)||n&&r(n,f)||c(t,f,s(e,f))}}},e8b2:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();e.checksum=u;var o=i(n("5726"));function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{11}$/)&&(t+=u(t));var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.displayValue=n.displayValue,n.fontSize>10*n.width?r.fontSize=10*n.width:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==u(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=(0,o.default)(this.data.substr(0,6),"LLLLLL"),t+="01010",t+=(0,o.default)(this.data.substr(6,6),"RRRRRR"),{data:t+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101"+(0,o.default)(this.data[0],"L"),options:{height:this.guardHeight}}),t.push({data:(0,o.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),t.push({data:"01010",options:{height:this.guardHeight}}),t.push({data:(0,o.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),t.push({data:(0,o.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),t}}]),e}(i(n("e762")).default);function u(t){var e,n=0;for(e=1;e<11;e+=2)n+=parseInt(t[e]);for(e=0;e<11;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10}e.default=a},e8b5:function(t,e,n){var r=n("c6b6");t.exports=Array.isArray||function(t){return"Array"==r(t)}},e8c9:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("4b23"),a=(r=i)&&r.__esModule?r:{default:r},u=n("f08e");var c=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u.A_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return new RegExp("^"+u.A_CHARS+"+$").test(this.data)}}]),e}(a.default);e.default=c},e95a:function(t,e,n){var r=n("b622"),o=n("3f8c"),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},e9c4:function(t,e,n){var r=n("23e7"),o=n("d066"),i=n("2ba4"),a=n("c65b"),u=n("e330"),c=n("d039"),s=n("e8b5"),l=n("1626"),f=n("861d"),d=n("d9b5"),m=n("f36a"),p=n("4930"),h=o("JSON","stringify"),g=u(/./.exec),v=u("".charAt),b=u("".charCodeAt),y=u("".replace),_=u(1..toString),w=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,O=/^[\uDC00-\uDFFF]$/,S=!p||c((function(){var t=o("Symbol")();return"[null]"!=h([t])||"{}"!=h({a:t})||"{}"!=h(Object(t))})),C=c((function(){return'"\\udf06\\ud834"'!==h("\udf06\ud834")||'"\\udead"'!==h("\udead")})),k=function(t,e){var n=m(arguments),r=e;if((f(e)||void 0!==t)&&!d(t))return s(e)||(e=function(t,e){if(l(r)&&(e=a(r,this,t,e)),!d(e))return e}),n[1]=e,i(h,null,n)},E=function(t,e,n){var r=v(n,e-1),o=v(n,e+1);return g(x,t)&&!g(O,o)||g(O,t)&&!g(x,r)?"\\u"+_(b(t,0),16):t};h&&r({target:"JSON",stat:!0,arity:3,forced:S||C},{stringify:function(t,e,n){var r=m(arguments),o=i(S?k:h,null,r);return C&&"string"==typeof o?y(o,w,E):o}})},eac5:function(t,e,n){var r=n("861d"),o=Math.floor;t.exports=Number.isInteger||function(t){return!r(t)&&isFinite(t)&&o(t)===t}},eac8:function(t,e,n){var r;!function(o){"use strict";var i={},a=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,u="[^\\s]+",c=/\[([^]*?)\]/gm,s=function(){};function l(t,e){for(var n=[],r=0,o=t.length;r<o;r++)n.push(t[r].substr(0,e));return n}function f(t){return function(e,n,r){var o=r[t].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~o&&(e.month=o)}}function d(t,e){for(t=String(t),e=e||2;t.length<e;)t="0"+t;return t}var m=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"],h=l(p,3),g=l(m,3);i.i18n={dayNamesShort:g,dayNames:m,monthNamesShort:h,monthNames:p,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10)*t%10]}};var v={D:function(t){return t.getDay()},DD:function(t){return d(t.getDay())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return t.getDate()},dd:function(t){return d(t.getDate())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return d(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},yy:function(t){return d(String(t.getFullYear()),4).substr(2)},yyyy:function(t){return d(t.getFullYear(),4)},h:function(t){return t.getHours()%12||12},hh:function(t){return d(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return d(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return d(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return d(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return d(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return d(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+d(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)}},b={d:["\\d\\d?",function(t,e){t.day=e}],Do:["\\d\\d?"+u,function(t,e){t.day=parseInt(e,10)}],M:["\\d\\d?",function(t,e){t.month=e-1}],yy:["\\d\\d?",function(t,e){var n=+(""+(new Date).getFullYear()).substr(0,2);t.year=""+(e>68?n-1:n)+e}],h:["\\d\\d?",function(t,e){t.hour=e}],m:["\\d\\d?",function(t,e){t.minute=e}],s:["\\d\\d?",function(t,e){t.second=e}],yyyy:["\\d{4}",function(t,e){t.year=e}],S:["\\d",function(t,e){t.millisecond=100*e}],SS:["\\d{2}",function(t,e){t.millisecond=10*e}],SSS:["\\d{3}",function(t,e){t.millisecond=e}],D:["\\d\\d?",s],ddd:[u,s],MMM:[u,f("monthNamesShort")],MMMM:[u,f("monthNames")],a:[u,function(t,e,n){var r=e.toLowerCase();r===n.amPm[0]?t.isPm=!1:r===n.amPm[1]&&(t.isPm=!0)}],ZZ:["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z",function(t,e){var n,r=(e+"").match(/([+-]|\d\d)/gi);r&&(n=60*r[1]+parseInt(r[2],10),t.timezoneOffset="+"===r[0]?n:-n)}]};b.dd=b.d,b.dddd=b.ddd,b.DD=b.D,b.mm=b.m,b.hh=b.H=b.HH=b.h,b.MM=b.M,b.ss=b.s,b.A=b.a,i.masks={default:"ddd MMM dd yyyy HH:mm:ss",shortDate:"M/D/yy",mediumDate:"MMM d, yyyy",longDate:"MMMM d, yyyy",fullDate:"dddd, MMMM d, yyyy",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},i.format=function(t,e,n){var r=n||i.i18n;if("number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date in fecha.format");e=i.masks[e]||e||i.masks.default;var o=[];return(e=(e=e.replace(c,(function(t,e){return o.push(e),"@@@"}))).replace(a,(function(e){return e in v?v[e](t,r):e.slice(1,e.length-1)}))).replace(/@@@/g,(function(){return o.shift()}))},i.parse=function(t,e,n){var r=n||i.i18n;if("string"!=typeof e)throw new Error("Invalid format in fecha.parse");if(e=i.masks[e]||e,t.length>1e3)return null;var o={},u=[],s=[];e=e.replace(c,(function(t,e){return s.push(e),"@@@"}));var l,f=(l=e,l.replace(/[|\\{()[^$+*?.-]/g,"\\$&")).replace(a,(function(t){if(b[t]){var e=b[t];return u.push(e[1]),"("+e[0]+")"}return t}));f=f.replace(/@@@/g,(function(){return s.shift()}));var d=t.match(new RegExp(f,"i"));if(!d)return null;for(var m=1;m<d.length;m++)u[m-1](o,d[m],r);var p,h=new Date;return!0===o.isPm&&null!=o.hour&&12!=+o.hour?o.hour=+o.hour+12:!1===o.isPm&&12==+o.hour&&(o.hour=0),null!=o.timezoneOffset?(o.minute=+(o.minute||0)-+o.timezoneOffset,p=new Date(Date.UTC(o.year||h.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):p=new Date(o.year||h.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),p},t.exports?t.exports=i:void 0===(r=function(){return i}.call(e,n,e,t))||(t.exports=r)}()},ec26:function(t,e,n){"use strict";var r,o=new Uint8Array(16);function i(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var u=function(t){return"string"==typeof t&&a.test(t)},c=[],s=0;s<256;++s)c.push((s+256).toString(16).substr(1));var l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase();if(!u(n))throw TypeError("Stringified UUID is invalid");return n};e.a=function(t,e,n){var r=(t=t||{}).random||(t.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return l(r)}},ed3f:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("4b23"),a=(r=i)&&r.__esModule?r:{default:r},u=n("f08e");var c=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u.C_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return new RegExp("^"+u.C_CHARS+"+$").test(this.data)}}]),e}(a.default);e.default=c},ed71:function(t,e,n){"use strict";n("3da4")},edd0:function(t,e,n){var r=n("13d2"),o=n("9bf2");t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),o.f(t,e,n)}},f069:function(t,e,n){"use strict";var r=n("59ed"),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},f08e:function(t,e,n){"use strict";var r;function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0});var i=e.SET_A=0,a=e.SET_B=1,u=e.SET_C=2,c=(e.SHIFT=98,e.START_A=103),s=e.START_B=104,l=e.START_C=105;e.MODULO=103,e.STOP=106,e.FNC1=207,e.SET_BY_CODE=(o(r={},c,i),o(r,s,a),o(r,l,u),r),e.SWAP={101:i,100:a,99:u},e.A_START_CHAR=String.fromCharCode(208),e.B_START_CHAR=String.fromCharCode(209),e.C_START_CHAR=String.fromCharCode(210),e.A_CHARS="[\0-_È-Ï]",e.B_CHARS="[ -È-Ï]",e.C_CHARS="(Ï*[0-9]{2}Ï*)",e.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011]},f183:function(t,e,n){var r=n("23e7"),o=n("e330"),i=n("d012"),a=n("861d"),u=n("1a2d"),c=n("9bf2").f,s=n("241c"),l=n("057f"),f=n("4fad"),d=n("90e3"),m=n("bb2f"),p=!1,h=d("meta"),g=0,v=function(t){c(t,h,{value:{objectID:"O"+g++,weakData:{}}})},b=t.exports={enable:function(){b.enable=function(){},p=!0;var t=s.f,e=o([].splice),n={};n[h]=1,t(n).length&&(s.f=function(n){for(var r=t(n),o=0,i=r.length;o<i;o++)if(r[o]===h){e(r,o,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(t,e){if(!a(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!u(t,h)){if(!f(t))return"F";if(!e)return"E";v(t)}return t[h].objectID},getWeakData:function(t,e){if(!u(t,h)){if(!f(t))return!0;if(!e)return!1;v(t)}return t[h].weakData},onFreeze:function(t){return m&&p&&f(t)&&!u(t,h)&&v(t),t}};i[h]=!0},f22b:function(t,e,n){"use strict";var r=n("23e7"),o=n("c65b"),i=n("f069");r({target:"Promise",stat:!0,forced:n("4738").CONSTRUCTOR},{reject:function(t){var e=i.f(this);return o(e.reject,void 0,t),e.promise}})},f36a:function(t,e,n){var r=n("e330");t.exports=r([].slice)},f3ef:function(t,e){t.exports=require("tinymce")},f579:function(t,e,n){var r=n("62c5"),o={render:function(t){return t("div",[t(this.elementTag,{style:{display:this.valid?void 0:"none"},class:["vue-barcode-element"]}),t("div",{style:{display:this.valid?"none":void 0}},this.$slots.default)])},props:{value:[String,Number],format:[String],width:[String,Number],height:[String,Number],displayValue:{type:[String,Boolean],default:!0},text:[String,Number],fontOptions:[String],font:[String],textAlign:[String],textPosition:[String],textMargin:[String,Number],fontSize:[String,Number],background:[String],lineColor:[String],margin:[String,Number],marginTop:[String,Number],marginBottom:[String,Number],marginLeft:[String,Number],marginRight:[String,Number],flat:[Boolean],ean128:[String,Boolean],elementTag:{type:String,default:"svg",validator:function(t){return-1!==["canvas","svg","img"].indexOf(t)}}},mounted:function(){this.$watch("$props",i,{deep:!0,immediate:!0}),i.call(this)},data:function(){return{valid:!0}}};function i(){var t=this,e={format:this.format,width:this.width,height:this.height,displayValue:this.displayValue,text:this.text,fontOptions:this.fontOptions,font:this.font,textAlign:this.textAlign,textPosition:this.textPosition,textMargin:this.textMargin,fontSize:this.fontSize,background:this.background,lineColor:this.lineColor,margin:this.margin,marginTop:this.marginTop,marginBottom:this.marginBottom,marginLeft:this.marginLeft,marginRight:this.marginRight,flat:this.flat,ean128:this.ean128,valid:function(e){t.valid=e},elementTag:this.elementTag};!function(t){for(var e in t)t.hasOwnProperty(e)&&void 0===t[e]&&delete t[e]}(e),r(this.$el.querySelector(".vue-barcode-element"),String(this.value),e)}t.exports=o},f5df:function(t,e,n){var r=n("da84"),o=n("00ee"),i=n("1626"),a=n("c6b6"),u=n("b622")("toStringTag"),c=r.Object,s="Arguments"==a(function(){return arguments}());t.exports=o?a:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=c(t),u))?n:s?a(e):"Object"==(r=a(e))&&i(e.callee)?"Arguments":r}},f5df1:function(t,e,n){},f6b4:function(t,e,n){"use strict";var r=n("c532");function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},f6f4:function(t,e,n){"use strict";n("e260"),n("d3b7"),n("e6cf"),n("3ca3"),n("ddb0"),n("b0c0");var r={name:"generate-tab-item",components:{GenerateFormItem:n("12f6").a,GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"96a9"))}},props:["element","model","rules","remote","display","edit","remoteOptionSource","platform","preview","containerKey","dataSourceValue","eventFunction","printRead"],data:function(){return{dataModels:this.model,tabActive:this.element.tabs.length?this.element.tabs[0].name:""}},methods:{fillingColumns:function(t){this.$emit("fillingColumns",t)}},watch:{model:{deep:!0,handler:function(t){this.dataModels=this.model}}}},o=n("2877"),i=Object(o.a)(r,(function(){var t,e=this,n=e.$createElement,r=e._self._c||n;return e.display[e.element.model]?r("el-tabs",{class:(t={},t[e.element.options.customClass]=e.element.options.customClass,t),staticStyle:{"margin-bottom":"18px"},attrs:{"tab-position":e.element.options.tabPosition,type:e.element.options.type},model:{value:e.tabActive,callback:function(t){e.tabActive=t},expression:"tabActive"}},e._l(e.element.tabs,(function(t){return r("el-tab-pane",{key:t.name,attrs:{label:t.label,name:t.name}},[e._l(t.list,(function(t){return["grid"===t.type?r("generate-col-item",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.display,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.dataModels,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns}}):r("generate-form-item",{key:t.key,attrs:{"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.display,edit:e.edit,"event-function":e.eventFunction,models:e.dataModels,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules,widget:t},on:{fillingColumns:e.fillingColumns}})]}))],2)})),1):e._e()}),[],!1,null,null,null);e.a=i.exports},f772:function(t,e,n){var r=n("5692"),o=n("90e3"),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},fb15:function(t,e,n){"use strict";if(n.r(e),n.d(e,"install",(function(){return _})),n.d(e,"CoreRenderer",(function(){return d})),n.d(e,"OrganizationSelector",(function(){return m.a})),n.d(e,"QrCodeComponent",(function(){return p.a})),"undefined"!=typeof window){var r=window.document.currentScript,o=n("8875");r=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var a=n("5530"),u=(n("b0c0"),n("d3b7"),n("159b"),n("f5df1"),n("ff84")),c=(n("a9e3"),{name:"BaseHelpIcon",props:{content:{type:String,default:""},title:{type:String,default:""},width:Number,effect:{type:String,default:"dark"},type:{type:String,default:"common"}}}),s=(n("71e3"),n("2877")),l=Object(s.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-popover",{attrs:{"popper-class":"base-help-icon-popper "+t.effect+" "+t.type,title:t.title,width:t.width||200,placement:"top",trigger:"click"}},[t._t("content",(function(){return[t._v(" "+t._s(t.content)+" ")]})),n("i",{staticClass:"ri-question-fill base-help-icon",attrs:{slot:"reference"},slot:"reference"})],2)}),[],!1,null,null,null).exports,f=n("d6ea").a,d=Object(s.a)(f,(function(){var t,e=this,n=e.$createElement,r=e._self._c||n;return r("div",{staticClass:"iss-form-renderer",class:["iss-form-"+e.formStyleKey,e.platform,"theme-"+(e.data.config&&e.data.config.theme)],style:{width:e.data.config&&e.data.config.width},attrs:{id:"iss-form-renderer"}},[e.formShow?r("el-form",{key:e.formKey,ref:e.formRef,class:(t={},t[e.data.config&&e.data.config.customClass]=e.data.config&&e.data.config.customClass,t["no-label-form"]=e.data.config&&0===e.data.config.labelWidth,t),attrs:{disabled:!e.edit,"label-position":"pc"===e.platform?e.data.config&&e.data.config.labelPosition:"top","label-width":e.data.config&&e.data.config.labelWidth+"px",model:e.models,rules:e.rules,size:e.data.config&&e.data.config.size,"status-icon":!0},nativeOn:{submit:function(t){t.preventDefault()}}},[e.data.config.theme&&"default"!==e.data.config.theme?r("div",{staticClass:"renderer-form-header",class:"align-"+e.data.config.themeTitleAlign},[r("div",{staticClass:"renderer-form-title"},[e._v(e._s(e.data.config.themeTitle))]),e.data.config.themeTitle&&e.data.config.themeSubTitle?r("div",{staticClass:"renderer-form-sub-title"},[e._v(e._s(e.data.config.themeSubTitle))]):e._e()]):e._e(),r("div",{staticClass:"iss-form-item-wrapper"},[e._l(e.data.list,(function(t){return["grid"===t.type?r("generate-col-item",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.displayFields,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.models,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns,"input-change":e.onInputChange}}):"card"===t.type?r("generate-card",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.displayFields,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.models,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns,"input-change":e.onInputChange}}):"collapse"===t.type?r("generate-collapse-item",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.displayFields,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.models,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns,"input-change":e.onInputChange}}):"tabs"===t.type?r("generate-tab-item",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.displayFields,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.models,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns,"input-change":e.onInputChange}}):"report"===t.type?r("generate-report",{key:t.key,ref:"icd-form-"+t.model,refInFor:!0,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.displayFields,edit:e.edit,element:t,"event-function":e.eventFunction,model:e.models,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules},on:{fillingColumns:e.fillingColumns,"input-change":e.onInputChange}}):r("generate-form-item",{key:t.key,attrs:{id:t.model,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,display:e.displayFields,edit:e.edit,"event-function":e.eventFunction,models:e.models,platform:e.platform,preview:e.preview,"print-read":e.printRead,remote:e.remote,"remote-option-source":e.remoteOptionSource,rules:e.rules,widget:t},on:{fillingColumns:e.fillingColumns,"input-change":e.onInputChange}})]}))],2)]):e._e()],1)}),[],!1,null,null,null).exports,m=n("9a01"),p=n("bfce"),h=(n("cdcc"),n("9224")),g=n("7694"),v=function(){Function("\n window.console && console.log('%c天工开务 ISS-LIBRARY-FORM-DESIGNER %cV".concat(h.a,"', 'color: #3164F6;font-weight: 500;font-size: 12px;', 'color: #999;');\n "))()},b=function(t){window.ISS_LIBRARY_FORM_DESIGNER_OPTIONS=Object(a.a)(Object(a.a)({},t),{},{mce_language_url:t.mce_language_url||"./tinymce/langs/zh_CN.js",mce_skin_url:t.mce_skin_url||"./tinymce/ui/oxide",mce_content_css:t.mce_content_css||"./tinymce/content/content.css",version:h.a})};d.install=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.component(d.name,d),v(),b(e)};var y=[u.a,l,d,m.a],_=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]},n=arguments.length>2?arguments[2]:void 0;e=Object(a.a)({components:[]},e),y.forEach((function(e){t.component(e.name,e)})),e.components&&e.components.forEach((function(e){t.component(e.name,e.component)})),v(),b(e),Object(g.i)(n)},w={install:_,CoreRenderer:d,OrganizationSelector:m.a,QrCodeComponent:p.a};e.default=w},fb6a:function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("e8b5"),a=n("68ee"),u=n("861d"),c=n("23cb"),s=n("07fa"),l=n("fc6a"),f=n("8418"),d=n("b622"),m=n("1dde"),p=n("f36a"),h=m("slice"),g=d("species"),v=o.Array,b=Math.max;r({target:"Array",proto:!0,forced:!h},{slice:function(t,e){var n,r,o,d=l(this),m=s(d),h=c(t,m),y=c(void 0===e?m:e,m);if(i(d)&&(n=d.constructor,(a(n)&&(n===v||i(n.prototype))||u(n)&&null===(n=n[g]))&&(n=void 0),n===v||void 0===n))return p(d,h,y);for(r=new(void 0===n?v:n)(b(y-h,0)),o=0;h<y;h++,o++)h in d&&f(r,o,d[h]);return r.length=o,r}})},fbb2:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GenericBarcode=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n("e762");var a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default);e.GenericBarcode=a},fc6a:function(t,e,n){var r=n("44ad"),o=n("1d80");t.exports=function(t){return r(o(t))}},fce3:function(t,e,n){var r=n("d039"),o=n("da84").RegExp;t.exports=r((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},fd6f:function(t,e,n){},fd7c:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.default=function(t,e){return r({},t,e)}},fd8a:function(t,e,n){(function(t){!function(){"use strict";function e(t){return function(e){return r=typeof(n=e),(null===n?"null":"object"==r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;var n,r}}function n(t){return function(e){return typeof e===t}}function r(t){return function(e){return t===e}}function o(t){return null==t}function i(t,e){if(m(t)){for(var n=0,r=t.length;n<r;++n)if(!e(t[n]))return;return 1}}function a(){}function u(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}}function c(t){return function(){return t}}function s(t){return t}function l(t,e){return t===e}var f=e("string"),d=e("object"),m=e("array"),p=r(null),h=n("boolean"),g=r(void 0),v=function(t){return!o(t)},b=n("function"),y=n("number");function _(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}function w(t){return function(e){return!t(e)}}function x(t){return function(){throw new Error(t)}}var O=c(!1),S=c(!0),C=tinymce.util.Tools.resolve("tinymce.ThemeManager"),k=function(){return(k=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function E(t,e){var n={};for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}function M(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||((r=r||Array.prototype.slice.call(e,0,o))[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}function T(){return D}var D={fold:function(t,e){return t()},isSome:O,isNone:S,getOr:s,getOrThunk:A,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:c(null),getOrUndefined:c(void 0),or:s,orThunk:A,map:T,each:a,bind:T,exists:O,forall:S,filter:function(){return D},toArray:function(){return[]},toString:c("none()")};function A(t){return t()}function P(t,e){return _t.call(t,e)}function R(t,e){for(var n=0,r=t.length;n<r;n++)if(e(t[n],n))return!0;return!1}function I(t,e){for(var n=[],r=0;r<t;r++)n.push(e(r));return n}function z(t,e){for(var n=[],r=0;r<t.length;r+=e){var o=yt.call(t,r,r+e);n.push(o)}return n}function L(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r}function j(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var a=t[o];(e(a,o)?n:r).push(a)}return{pass:n,fail:r}}function B(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n}function F(t,e,n){return function(t){for(var r,o=t.length-1;0<=o;o--)r=t[o],n=e(n,r,o)}(t),n}function N(t,e,n){return Ot(t,(function(t,r){n=e(n,t,r)})),n}function H(t,e){return function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return bt.some(i);if(n(i,r))break}return bt.none()}(t,e,O)}function V(t,e){for(var n=0,r=t.length;n<r;n++)if(e(t[n],n))return bt.some(n);return bt.none()}function U(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!m(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);wt.apply(e,t[n])}return e}function W(t,e){return U(L(t,e))}function $(t,e){for(var n=0,r=t.length;n<r;++n)if(!0!==e(t[n],n))return!1;return!0}function G(t){var e=yt.call(t,0);return e.reverse(),e}function K(t,e){return B(t,(function(t){return!xt(e,t)}))}function q(t,e){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];n[String(i)]=e(i,r)}return n}function X(t){return[t]}function Y(t,e){var n=yt.call(t,0);return n.sort(e),n}function J(t,e){return 0<=e&&e<t.length?bt.some(t[e]):bt.none()}function Q(t){return J(t,0)}function Z(t){return J(t,t.length-1)}function tt(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return bt.none()}function et(t,e){for(var n=Ct(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}}function nt(t,e){return Et(t,(function(t,n){return{k:n,v:e(t,n)}}))}function rt(t,e){var n=[];return et(t,(function(t,r){n.push(e(t,r))})),n}function ot(t,e){for(var n=Ct(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];if(e(a,i,t))return bt.some(a)}return bt.none()}function it(t){return rt(t,s)}function at(t,e){return Mt(t,e)?bt.from(t[e]):bt.none()}function ut(t,e){return Mt(t,e)&&void 0!==t[e]&&null!==t[e]}function ct(t,e,n){return void 0===n&&(n=l),t.exists((function(t){return n(t,e)}))}function st(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e}function lt(t,e){return t?bt.some(e):bt.none()}function ft(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e}function dt(t,e){return-1!==t.indexOf(e)}function mt(t){return 0<t.length}function pt(t){return void 0!==t.style&&b(t.style.getPropertyValue)}function ht(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}}var gt,vt=function(t){function e(){return o}function n(e){return e(t)}var r=c(t),o={fold:function(e,n){return n(t)},isSome:S,isNone:O,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return vt(e(t))},each:function(e){e(t)},bind:n,exists:n,forall:n,filter:function(e){return e(t)?o:D},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},bt={some:vt,none:T,from:function(t){return null==t?D:vt(t)}},yt=Array.prototype.slice,_t=Array.prototype.indexOf,wt=Array.prototype.push,xt=function(t,e){return-1<P(t,e)},Ot=function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)},St=b(Array.from)?Array.from:function(t){return yt.call(t)},Ct=Object.keys,kt=Object.hasOwnProperty,Et=function(t,e){var n={};return et(t,(function(t,r){var o=e(t,r);n[o.k]=o.v})),n},Mt=function(t,e){return kt.call(t,e)},Tt=function(t,e,n){return t.isSome()&&e.isSome()?bt.some(n(t.getOrDie(),e.getOrDie())):bt.none()},Dt=function(t,e){return ft(t,e,0)},At=function(t,e){return ft(t,e,t.length-e.length)},Pt=(gt=/^\s+|\s+$/g,function(t){return t.replace(gt,"")}),Rt={fromHtml:function(t,e){var n=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throw new Error("HTML must have a single root node");return ht(n.childNodes[0])},fromTag:function(t,e){return ht((e||document).createElement(t))},fromText:function(t,e){return ht((e||document).createTextNode(t))},fromDom:ht,fromPoint:function(t,e,n){return bt.from(t.dom.elementFromPoint(e,n)).map(ht)}};function It(t){return t.dom.nodeName.toLowerCase()}function zt(t){return function(e){return e.dom.nodeType===t}}function Lt(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}}function jt(t,e){var n=String(e).toLowerCase();return H(t,(function(t){return t.search(n)}))}function Bt(t){return function(e){return dt(e,t)}}function Ft(t){return window.matchMedia(t).matches}function Nt(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}function Ht(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount}function Vt(t,e){return t.dom===e.dom}function Ut(t,e){return fn().browser.isIE()?(n=t.dom,r=e.dom,o=Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(n.compareDocumentPosition(r)&o)):(i=t.dom)!==(a=e.dom)&&i.contains(a);var n,r,o,i,a}function Wt(t){return Rt.fromDom(t.dom.ownerDocument)}function $t(t){return qe(t)?t:Wt(t)}function Gt(t){return Rt.fromDom($t(t).dom.documentElement)}function Kt(t){return Rt.fromDom($t(t).dom.defaultView)}function qt(t){return bt.from(t.dom.parentNode).map(Rt.fromDom)}function Xt(t){return bt.from(t.dom.offsetParent).map(Rt.fromDom)}function Yt(t){return L(t.dom.childNodes,Rt.fromDom)}function Jt(t,e){var n=t.dom.childNodes;return bt.from(n[e]).map(Rt.fromDom)}function Qt(t,e){return{element:t,offset:e}}function Zt(t,e){var n=Yt(t);return 0<n.length&&e<n.length?Qt(n[e],0):Qt(t,e)}function te(t){return Xe(t)&&v(t.dom.host)}function ee(t){return te(t)?t:Rt.fromDom($t(t).dom.body)}function ne(t){return Rt.fromDom(t.dom.host)}function re(t,e,n){if(!(f(n)||h(n)||y(n)))throw new Error("Attribute value was not simple");t.setAttribute(e,n+"")}function oe(t,e,n){re(t.dom,e,n)}function ie(t,e){var n=t.dom;et(e,(function(t,e){re(n,e,t)}))}function ae(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n}function ue(t,e){return bt.from(ae(t,e))}function ce(t,e){var n=t.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(e)}function se(t,e){t.dom.removeAttribute(e)}function le(t,e,n){if(!f(n))throw new Error("CSS value must be a string: "+n);pt(t)&&t.style.setProperty(e,n)}function fe(t,e){pt(t)&&t.style.removeProperty(e)}function de(t,e,n){le(t.dom,e,n)}function me(t,e){var n=t.dom;et(e,(function(t,e){le(n,e,t)}))}function pe(t,e){var n=t.dom;et(e,(function(t,e){t.fold((function(){fe(n,e)}),(function(t){le(n,e,t)}))}))}function he(t,e){var n=t.dom,r=window.getComputedStyle(n).getPropertyValue(e);return""!==r||bn(t)?r:wn(n,e)}function ge(t,e){var n=t.dom,r=wn(n,e);return bt.from(r).filter((function(t){return 0<t.length}))}function ve(t,e,n){var r=Rt.fromTag(t);return de(r,e,n),ge(r,e).isSome()}function be(t,e){fe(t.dom,e),ct(ue(t,"style").map(Pt),"")&&se(t,"style")}function ye(t){return t.dom.offsetWidth}function _e(t,e){function n(n){var r=e(n);if(r<=0||null===r){var o=he(n,t);return parseFloat(o)||0}return r}function r(t,e){return N(e,(function(e,n){var r=he(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)}return{set:function(e,n){if(!y(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom;pt(r)&&(r.style[t]=n+"px")},get:n,getOuter:n,aggregate:r,max:function(t,e,n){var o=r(t,n);return o<e?e-o:0}}}function we(t){return xn.get(t)}function xe(t){return xn.getOuter(t)}function Oe(t,e){return void 0!==t?t:void 0!==e?e:0}function Se(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return Sn(n.offsetLeft,n.offsetTop);var i=Oe(null==r?void 0:r.pageYOffset,o.scrollTop),a=Oe(null==r?void 0:r.pageXOffset,o.scrollLeft),u=Oe(o.clientTop,n.clientTop),c=Oe(o.clientLeft,n.clientLeft);return Cn(t).translate(a-c,i-u)}function Ce(t){return kn.get(t)}function ke(t){return kn.getOuter(t)}function Ee(t){function e(){return t.stopPropagation()}function n(){return t.preventDefault()}var r=u(n,e);return{target:Rt.fromDom(function(t){if(pn()&&v(t.target)){var e=Rt.fromDom(t.target);if(Ge(e)&&vn(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return Q(n)}}return bt.from(t.target)}(t).getOr(t.target)),x:t.clientX,y:t.clientY,stop:e,prevent:n,kill:r,raw:t}}function Me(t,e,n,r,o){var i,a,u=(i=n,a=r,function(t){i(t)&&a(Ee(t))});return t.dom.addEventListener(e,u,o),{unbind:_(En,t,e,u,o)}}function Te(t,e){qt(t).each((function(n){n.dom.insertBefore(e.dom,t.dom)}))}function De(t,e){bt.from(t.dom.nextSibling).map(Rt.fromDom).fold((function(){qt(t).each((function(t){Mn(t,e)}))}),(function(t){Te(t,e)}))}function Ae(t,e){Jt(t,0).fold((function(){Mn(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))}function Pe(t,e){Ot(e,(function(e){Mn(t,e)}))}function Re(t){t.dom.textContent="",Ot(Yt(t),(function(t){Tn(t)}))}function Ie(t){var e,n=Yt(t);0<n.length&&(e=t,Ot(n,(function(t){Te(e,t)}))),Tn(t)}function ze(t){var e=void 0!==t?t.dom:document,n=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return Sn(n,r)}function Le(t,e,n){var r=(void 0!==n?n.dom:document).defaultView;r&&r.scrollTo(t,e)}function je(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}}function Be(t){var e=void 0===t?window:t,n=e.document,r=ze(Rt.fromDom(n)),o=void 0===e?window:e;return(fn().browser.isFirefox()?bt.none():bt.from(o.visualViewport)).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return je(r.left,r.top,n,o)}),(function(t){return je(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))}function Fe(t){var e,n=ze(Rt.fromDom(document)),r=(e=An).owner(t),o=Dn(e,r);return bt.some(o).fold(_(Se,t),(function(e){var r=Cn(t),o=F(e,(function(t,e){var n=Cn(e);return{left:t.left+n.left,top:t.top+n.top}}),{left:0,top:0});return Sn(o.left+r.left+n.left,o.top+r.top+n.top)}))}function Ne(t){var e=Fe(t),n=ke(t),r=xe(t);return Pn(e.left,e.top,n,r)}function He(){return Ye(0,0)}function Ve(t){function e(t){return function(){return n===t}}var n=t.current,r=t.version;return{current:n,version:r,isEdge:e("Edge"),isChrome:e("Chrome"),isIE:e("IE"),isOpera:e("Opera"),isFirefox:e(tn),isSafari:e("Safari")}}function Ue(t){function e(t){return function(){return n===t}}var n=t.current,r=t.version;return{current:n,version:r,isWindows:e(rn),isiOS:e("iOS"),isAndroid:e(on),isOSX:e("OSX"),isLinux:e("Linux"),isSolaris:e(an),isFreeBSD:e(un),isChromeOS:e(cn)}}"undefined"!=typeof window||Function("return this;")();var We,$e,Ge=zt(1),Ke=zt(3),qe=zt(9),Xe=zt(11),Ye=function(t,e){return{major:t,minor:e}},Je={nu:Ye,detect:function(t,e){var n,r,o=String(e).toLowerCase();return 0===t.length?He():(r=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}}(t,n=o))?Ye(i(1),i(2)):{major:0,minor:0};function i(t){return Number(n.replace(r,"$"+t))}},unknown:He},Qe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ze={browsers:c([{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return dt(t,"edge/")&&dt(t,"chrome")&&dt(t,"safari")&&dt(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Qe],search:function(t){return dt(t,"chrome")&&!dt(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return dt(t,"msie")||dt(t,"trident")}},{name:"Opera",versionRegexes:[Qe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Bt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Bt("firefox")},{name:"Safari",versionRegexes:[Qe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(dt(t,"safari")||dt(t,"mobile/"))&&dt(t,"applewebkit")}}]),oses:c([{name:"Windows",search:Bt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return dt(t,"iphone")||dt(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Bt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Bt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Bt("linux"),versionRegexes:[]},{name:"Solaris",search:Bt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Bt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Bt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}])},tn="Firefox",en=function(){return Ve({current:void 0,version:Je.unknown()})},nn=Ve,rn=(c("Edge"),c("Chrome"),c("IE"),c("Opera"),c(tn),c("Safari"),"Windows"),on="Android",an="Solaris",un="FreeBSD",cn="ChromeOS",sn=function(){return Ue({current:void 0,version:Je.unknown()})},ln=Ue,fn=(c(rn),c("iOS"),c(on),c("Linux"),c("OSX"),c(an),c(un),c(cn),Lt((function(){return t=navigator.userAgent,e=bt.from(navigator.userAgentData),n=Ft,g=Ze.browsers(),v=Ze.oses(),{browser:b=e.bind((function(t){return e=g,tt(t.brands,(function(t){var n=t.brand.toLowerCase();return H(e,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(e){return{current:e.name,version:Je.nu(parseInt(t.version,10),0)}}))}));var e})).orThunk((function(){return jt(g,e=t).map((function(t){var n=Je.detect(t.versionRegexes,e);return{current:t.name,version:n}}));var e})).fold(en,nn),os:y=jt(v,r=t).map((function(t){var e=Je.detect(t.versionRegexes,r);return{current:t.name,version:e}})).fold(sn,ln),deviceType:(i=b,a=t,u=n,s=(o=y).isiOS()&&!0===/ipad/i.test(a),l=o.isiOS()&&!s,d=(f=o.isiOS()||o.isAndroid())||u("(pointer:coarse)"),m=s||!l&&f&&u("(min-device-width:768px)"),p=l||f&&!m,h=i.isSafari()&&o.isiOS()&&!1===/safari/i.test(a),{isiPad:c(s),isiPhone:c(l),isTablet:c(m),isPhone:c(p),isTouch:c(d),isAndroid:o.isAndroid,isiOS:o.isiOS,isWebView:c(h),isDesktop:c(!p&&!m&&!h)})};var t,e,n,r,o,i,a,u,s,l,f,d,m,p,h,g,v,b,y}))),dn=qt,mn=b(Element.prototype.attachShadow)&&b(Node.prototype.getRootNode),pn=c(mn),hn=mn?function(t){return Rt.fromDom(t.dom.getRootNode())}:$t,gn=function(t){var e=hn(t);return te(e)?bt.some(e):bt.none()},vn=function(t){return v(t.dom.shadowRoot)},bn=function(t){var e=Ke(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;var n,r,o=e.ownerDocument;return gn(Rt.fromDom(e)).fold((function(){return o.body.contains(e)}),(n=bn,r=ne,function(t){return n(r(t))}))},yn=function(){return _n(Rt.fromDom(document))},_n=function(t){var e=t.dom.body;if(null==e)throw new Error("Body is not available yet");return Rt.fromDom(e)},wn=function(t,e){return pt(t)?t.style.getPropertyValue(e):""},xn=_e("height",(function(t){var e=t.dom;return bn(t)?e.getBoundingClientRect().height:e.offsetHeight})),On=function(t,e){return{left:t,top:e,translate:function(n,r){return On(t+n,e+r)}}},Sn=On,Cn=function(t){var e,n=t.dom,r=n.ownerDocument.body;return r===n?Sn(r.offsetLeft,r.offsetTop):bn(t)?(e=n.getBoundingClientRect(),Sn(e.left,e.top)):Sn(0,0)},kn=_e("width",(function(t){return t.dom.offsetWidth})),En=function(t,e,n,r){t.dom.removeEventListener(e,n,r)},Mn=function(t,e){t.dom.appendChild(e.dom)},Tn=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},Dn=function(t,e){return t.view(e).fold(c([]),(function(e){var n=t.owner(e),r=Dn(t,n);return[e].concat(r)}))},An=Object.freeze({__proto__:null,view:function(t){var e;return(t.dom===document?bt.none():bt.from(null===(e=t.dom.defaultView)||void 0===e?void 0:e.frameElement)).map(Rt.fromDom)},owner:Wt}),Pn=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Rn=function(t){var e=Se(t),n=ke(t),r=xe(t);return Pn(e.left,e.top,n,r)},In=function(){return Be(window)},zn=function(t){return{isValue:S,isError:O,getOr:c(t),getOrThunk:c(t),getOrDie:c(t),or:function(e){return zn(t)},orThunk:function(e){return zn(t)},fold:function(e,n){return n(t)},map:function(e){return zn(e(t))},mapError:function(e){return zn(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOptional:function(){return bt.some(t)}}},Ln=function(t){return{isValue:O,isError:S,getOr:s,getOrThunk:function(t){return t()},getOrDie:function(){return x(String(t))()},or:s,orThunk:function(t){return t()},fold:function(e,n){return e(t)},map:function(e){return Ln(t)},mapError:function(e){return Ln(e(t))},each:a,bind:function(e){return Ln(t)},exists:O,forall:S,toOptional:bt.none}},jn={value:zn,error:Ln,fromOption:function(t,e){return t.fold((function(){return Ln(e)}),zn)}};function Bn(t,e,n){return t.stype===We.Error?e(t.serror):n(t.svalue)}function Fn(t){return{stype:We.Value,svalue:t}}function Nn(t){return{stype:We.Error,serror:t}}function Hn(t,e,n,r){return{tag:"field",key:t,newKey:e,presence:n,prop:r}}function Vn(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)}}function Un(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<e.length;o++){var i,a=e[o];for(i in a)Mt(a,i)&&(r[i]=t(r[i],a[i]))}return r}}function Wn(t){return{tag:"defaultedThunk",process:t}}function $n(t){return Wn(c(t))}function Gn(t){return{tag:"mergeWithThunk",process:t}}function Kn(t){return d(t)&&100<Ct(t).length?" removed due to size":JSON.stringify(t,null,2)}function qn(t,e){return Fr([{path:t,getErrorInfo:e}])}function Xn(t){return{extract:function(e,n){return Hr(t(n),(function(t){return qn(e,c(t))}))},toString:c("val")}}function Yn(t,e,n,r){return r(at(t,e).getOrThunk((function(){return n(t)})))}function Jn(t,e,n,r,o){function i(t){return o.extract(e.concat([r]),t)}function a(t){return t.fold((function(){return Br(bt.none())}),(function(t){var n=o.extract(e.concat([r]),t);return Vr(n,bt.some)}))}var u,s,l,f,d,m;switch(t.tag){case"required":return l=e,m=i,at(f=n,d=r).fold((function(){return t=d,e=f,qn(l,(function(){return'Could not find valid *required* value for "'+t+'" in '+Kn(e)}));var t,e}),m);case"defaultedThunk":return Yn(n,r,t.process,i);case"option":return a(at(n,r));case"defaultedOptionThunk":return s=t.process,a(at(u=n,r).map((function(t){return!0===t?s(u):t})));case"mergeWithThunk":return Yn(n,r,c({}),(function(e){return i($r(t.process(n),e))}))}}function Qn(t){return{extract:function(e,n){return t().extract(e,n)},toString:function(){return t().toString()}}}function Zn(t){var e=Xr(t),n=F(t,(function(t,e){return Vn(e,(function(e){var n;return $r(t,((n={})[e]=!0,n))}),c(t))}),{});return{extract:function(t,r){var o,i,u,c,s,l,f=B(h(r)?[]:Ct((u=v,c=i={},s=function(t,e){c[e]=t},l=a,et(r,(function(t,e){(u(t,e)?s:l)(t,e)})),i)),(function(t){return!ut(n,t)}));return 0===f.length?e.extract(t,r):(o=f,qn(t,(function(){return"There are unsupported fields: ["+o.join(", ")+"] specified"})))},toString:e.toString}}function tr(t){return{extract:function(e,n){var r=L(n,(function(n,r){return t.extract(e.concat(["["+r+"]"]),n)}));return Kr(r)},toString:function(){return"array("+t.toString()+")"}}}function er(t){return{extract:function(e,n){for(var r=[],o=0,i=t;o<i.length;o++){var a=i[o].extract(e,n);if(a.stype===We.Value)return a;r.push(a)}return Kr(r)},toString:function(){return"oneOf("+L(t,(function(t){return t.toString()})).join(", ")+")"}}}function nr(t,e){return Xn((function(n){var r=typeof n;return t(n)?Br(n):Fr("Expected type: "+e+" but got: "+r)}))}function rr(t,e){return{extract:function(n,r){return at(r,t).fold((function(){return e=t,qn(n,(function(){return'Choice schema did not contain choice key: "'+e+'"'}));var e}),(function(t){return o=n,i=r,at(a=e,u=t).fold((function(){return t=a,e=u,qn(o,(function(){return'The chosen schema: "'+e+'" did not exist in branches: '+Kn(t)}));var t,e}),(function(t){return t.extract(o.concat(["branch: "+u]),i)}));var o,i,a,u}))},toString:function(){return"chooseOn("+t+"). Possible values: "+Ct(e)}}}function or(t){return Xn((function(e){return t(e).fold(Fr,Br)}))}function ir(t,e){return n=function(e){return t(e).fold(Nn,Fn)},r=e,{extract:function(t,e){var o=Ct(e),i=tr(Xn(n)).extract(t,o);return Nr(i,(function(n){var o=L(n,(function(t){return Hn(t,t,{tag:"required",process:{}},r)}));return Xr(o).extract(t,e)}))},toString:function(){return"setOf("+r.toString()+")"}};var n,r}function ar(t,e,n){return jr((o=e.extract([t],r=n),Ur(o,(function(t){return{input:r,errors:t}}))));var r,o}function ur(t){return t.fold((function(t){throw new Error(oo(t))}),s)}function cr(t,e,n){return ur(ar(t,e,n))}function sr(t,e){return rr(t,nt(e,Xr))}function lr(t){return or((function(e){return xt(t,e)?jn.value(e):jn.error('Unsupported value: "'+e+'", choose one of "'+t.join(", ")+'".')}))}function fr(t){return io(t,t,{tag:"required",process:{}},Jr())}function dr(t,e){return io(t,t,{tag:"required",process:{}},e)}function mr(t){return dr(t,Zr)}function pr(t,e){return io(t,t,{tag:"required",process:{}},lr(e))}function hr(t){return dr(t,eo)}function gr(t,e){return io(t,t,{tag:"required",process:{}},Xr(e))}function vr(t,e){return io(t,t,{tag:"required",process:{}},Yr(e))}function br(t,e){return io(t,t,{tag:"required",process:{}},tr(e))}function yr(t){return io(t,t,{tag:"option",process:{}},Jr())}function _r(t,e){return io(t,t,{tag:"option",process:{}},e)}function wr(t){return _r(t,Qr)}function xr(t){return _r(t,Zr)}function Or(t){return _r(t,eo)}function Sr(t,e){return _r(t,tr(e))}function Cr(t,e){return _r(t,Xr(e))}function kr(t,e){return io(t,t,$n(e),Jr())}function Er(t,e,n){return io(t,t,$n(e),n)}function Mr(t,e){return Er(t,e,Qr)}function Tr(t,e){return Er(t,e,Zr)}function Dr(t,e,n){return Er(t,e,lr(n))}function Ar(t,e){return Er(t,e,to)}function Pr(t,e){return Er(t,e,eo)}function Rr(t,e,n){return Er(t,e,tr(n))}function Ir(t,e,n){return Er(t,e,Xr(n))}function zr(t){var e=t;return{get:function(){return e},set:function(t){e=t}}}function Lr(t){if(!m(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};return Ot(t,(function(r,o){var i=Ct(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],u=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!m(u))throw new Error("case arguments must be an array");e.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==u.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+u.length+" ("+u+"), got "+i);return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);return e[o].apply(null,n)},match:function(t){var r=Ct(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));if(!$(e,(function(t){return xt(r,t)})))throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[a].apply(null,n)},log:function(t){}}}})),n}($e=We={})[$e.Error=0]="Error",$e[$e.Value=1]="Value";var jr=function(t){return Bn(t,jn.error,jn.value)},Br=Fn,Fr=Nn,Nr=function(t,e){return t.stype===We.Value?e(t.svalue):t},Hr=function(t,e){return t.stype===We.Error?e(t.serror):t},Vr=function(t,e){return t.stype===We.Value?{stype:We.Value,svalue:e(t.svalue)}:t},Ur=function(t,e){return t.stype===We.Error?{stype:We.Error,serror:e(t.serror)}:t},Wr=Bn,$r=Un((function(t,e){return d(t)&&d(e)?$r(t,e):e})),Gr=Un((function(t,e){return e})),Kr=function(t){var e,n,r=(e=[],n=[],Ot(t,(function(t){Bn(t,(function(t){return n.push(t)}),(function(t){return e.push(t)}))})),{values:e,errors:n});return 0<r.errors.length?u(Fr,U)(r.errors):Br(r.values)},qr=Xn(Br),Xr=function(t){return{extract:function(e,n){for(var r={},o=[],i=0,a=t;i<a.length;i++)Vn(a[i],(function(t,i,a,u){var c=Jn(a,e,n,t,u);Wr(c,(function(t){o.push.apply(o,t)}),(function(t){r[i]=t}))}),(function(t,e){r[t]=e(n)}));return 0<o.length?Fr(o):Br(r)},toString:function(){return"obj{\n"+L(t,(function(t){return Vn(t,(function(t,e,n,r){return t+" -> "+r.toString()}),(function(t,e){return"state("+t+")"}))})).join("\n")+"}"}}},Yr=u(tr,Xr),Jr=c(qr),Qr=nr(y,"number"),Zr=nr(f,"string"),to=nr(h,"boolean"),eo=nr(b,"function"),no=function(t){if(Object(t)!==t)return!0;switch({}.toString.call(t).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(t).every((function(e){return no(t[e])}));default:return!1}},ro=Xn((function(t){return no(t)?Br(t):Fr("Expected value to be acceptable for sending via postMessage")})),oo=function(t){return"Errors: \n"+L(10<(e=t.errors).length?e.slice(0,10).concat([{path:[],getErrorInfo:c("... (only showing first ten failures)")}]):e,(function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()})).join("\n")+"\n\nInput object: "+Kn(t.input);var e},io=Hn,ao=function(t,e){return{tag:"custom",newKey:t,instantiator:e}};function uo(t,e){return(n={})[t]=e,n;var n}function co(t){return e={},Ot(t,(function(t){e[t.key]=t.value})),e;var e}function so(t){return b(t)?t:O}function lo(t,e,n){for(var r=t.dom,o=so(n);r.parentNode;){r=r.parentNode;var i=Rt.fromDom(r),a=e(i);if(a.isSome())return a;if(o(i))break}return bt.none()}function fo(t,e,n){var r=e(t),o=so(n);return r.orThunk((function(){return o(t)?bt.none():lo(t,e,o)}))}function mo(t,e){return Vt(t.element,e.event.target)}function po(t){if(!ut(t,"can")&&!ut(t,"abort")&&!ut(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return k(k({},ri),t)}function ho(t){return c("alloy."+t)}function go(t,e){Ji(t,t.element,e,{})}function vo(t,e,n){Ji(t,t.element,e,n)}function bo(t){go(t,Di())}function yo(t,e,n){Ji(t,e,n,{})}function _o(t,e,n,r){t.getSystem().triggerEvent(n,e,r.event)}function wo(t,e){return{key:t,value:po({abort:e})}}function xo(t){return{key:t,value:po({run:function(t,e){e.event.prevent()}})}}function Oo(t,e){return{key:t,value:po({run:e})}}function So(t,e,n){return{key:t,value:po({run:function(t,r){e.apply(void 0,[t,r].concat(n))}})}}function Co(t){return function(e){return{key:t,value:po({run:function(t,n){mo(t,n)&&e(t,n)}})}}}function ko(t,e,n){var r,o=e.partUids[n];return Oo(r=t,(function(t,e){t.getSystem().getByUid(o).each((function(t){_o(t,t.element,r,e)}))}))}function Eo(t,e){return Oo(t,(function(t,n){var r=n.event,o=t.getSystem().getByDom(r.target).getOrThunk((function(){return fo(r.target,(function(e){return t.getSystem().getByDom(e).toOptional()}),O).getOr(t)}));e(t,o,n)}))}function Mo(t){return Oo(t,(function(t,e){e.cut()}))}function To(t,e){return Co(t)(e)}function Do(t){return t.dom.innerHTML}function Ao(t,e){var n,r,o=Wt(t).dom,i=Rt.fromDom(o.createDocumentFragment());Pe(i,(n=e,(r=(o||document).createElement("div")).innerHTML=n,Yt(Rt.fromDom(r)))),Re(t),Mn(t,i)}function Po(t){if(te(t))return"#shadow-root";var e=Rt.fromDom(t.dom.cloneNode(!1)),n=Rt.fromTag("div"),r=Rt.fromDom(e.dom.cloneNode(!0));return Mn(n,r),Do(n)}function Ro(t){var e=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++ia+String(e)}function Io(t){var e=Ge(t)?t.dom[sa]:null;return bt.from(e)}function zo(t){function e(e){return function(){throw new Error(function(e){return"The component must be in a context to execute: "+e+(t?"\n"+Po(t().element)+" is not in context.":"")}(e))}}return{debugInfo:c("fake"),triggerEvent:function(){},triggerFocus:function(){},triggerEscape:function(){},broadcast:function(){},broadcastOn:function(){},broadcastEvent:function(){},build:e("build"),addToWorld:e("addToWorld"),removeFromWorld:e("removeFromWorld"),addToGui:e("addToGui"),removeFromGui:e("removeFromGui"),getByUid:e("getByUid"),getByDom:e("getByDom"),isConnected:O}}function Lo(t,e){var n=t.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:e,parameters:pa(i)}},t}function jo(t){return uo(ha,t)}function Bo(t){return e=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return t.apply(void 0,M([e.getApis(),e],n,!1))},r=(n=t.toString()).indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/),e.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:pa(i.slice(1))}},e;var e,n,r,o,i}function Fo(t,e){var n={};return et(t,(function(t,r){et(t,(function(t,o){var i=at(n,o).getOr([]);n[o]=i.concat([e(r,t)])}))})),n}function No(t){return{classes:g(t.classes)?[]:t.classes,attributes:g(t.attributes)?{}:t.attributes,styles:g(t.styles)?{}:t.styles}}function Ho(t){return t.cHandler}function Vo(t,e){return{name:t,handler:e}}function Uo(t,e){var n=ae(t,e);return void 0===n||""===n?[]:n.split(" ")}function Wo(t){return void 0!==t.dom.classList}function $o(t,e){var n,r,o;Wo(t)?t.dom.classList.add(e):(r=e,o=Uo(n=t,"class").concat([r]),oe(n,"class",o.join(" ")))}function Go(t,e){var n,r,o,i;Wo(t)?t.dom.classList.remove(e):(o=e,0<(i=B(Uo(r=t,"class"),(function(t){return t!==o}))).length?oe(r,"class",i.join(" ")):se(r,"class")),0===(Wo(n=t)?n.dom.classList:Uo(n,"class")).length&&se(n,"class")}function Ko(t,e){return Wo(t)&&t.dom.classList.contains(e)}function qo(t,e){Ot(e,(function(e){$o(t,e)}))}function Xo(t,e){Ot(e,(function(e){Go(t,e)}))}function Yo(t){return t.dom.value}function Jo(t,e){if(void 0===e)throw new Error("Value.set was undefined");t.dom.value=e}function Qo(t){var e,n,r,o,i=(e=at(t,"behaviours").getOr({}),W(Ct(e),(function(t){var n=e[t];return v(n)?[n.me]:[]})));return n=t,o=L(r=i,(function(t){return Cr(t.name(),[fr("config"),kr("state",ga)])})),{list:r,data:nt(ar("component.behaviours",Xr(o),n.behaviours).fold((function(t){throw new Error(oo(t)+"\nComplete spec:\n"+JSON.stringify(n,null,2))}),s),(function(t){return c(t.map((function(t){return{config:t.config,state:t.state.init(t.config)}})))}))}}function Zo(t){var e,n,r,o,i,a,u,c,s,l,f=da(t),d=f.events,m=E(f,["events"]),p=L(at(m,"components").getOr([]),Oa),h=k(k({},m),{events:k(k({},oa),d),components:p});return jn.value((n=zr(ma),r=ur(ar("custom.definition",_a,e=h)),i=(o=Qo(e)).list,a=o.data,u=function(t){var e=Rt.fromTag(t.tag);ie(e,t.attributes),qo(e,t.classes),me(e,t.styles),t.innerHtml.each((function(t){return Ao(e,t)}));var n=t.domChildren;return Pe(e,n),t.value.each((function(t){Jo(e,t)})),t.uid,la(e,t.uid),e}(function(t,e,n){var r,o,i=k(k({},(r=t).dom),{uid:r.uid,domChildren:L(r.components,(function(t){return t.element}))}),a=t.domModification.fold((function(){return No({})}),No),u=0<e.length?function(t,e,n,r){var o=k({},e);function i(t){return F(t,(function(t,e){return k(k({},e.modification),t)}),{})}Ot(n,(function(e){o[e.name()]=e.exhibit(t,r)}));var a=Fo(o,(function(t,e){return{name:t,modification:e}}));return No({classes:F(a.classes,(function(t,e){return e.modification.concat(t)}),[]),attributes:i(a.attributes),styles:i(a.styles)})}(n,{"alloy.base.modification":a},e,i):a;return k(k({},o=i),{attributes:k(k({},o.attributes),u.attributes),styles:k(k({},o.styles),u.styles),classes:o.classes.concat(u.classes)})}(r,i,a)),c=function(t,e,n){var r,o,i,a,u,c={"alloy.base.behaviour":t.events},s=t.eventOrder;return o=n,i=e,r=Fo(k(k({},c),(a=o,u={},Ot(i,(function(t){u[t.name()]=t.handlers(a)})),u)),Vo),ba(r,s).getOrDie()}(r,i,a),s=zr(r.components),l={uid:e.uid,getSystem:n.get,config:function(t){var n=a;return(b(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 b(a[t.name()])},spec:e,readState:function(t){return a[t]().map((function(t){return t.state.readState()})).getOr("not enabled")},getApis:function(){return r.apis},connect:function(t){n.set(t)},disconnect:function(){n.set(zo(g))},element:u,syncComponents:function(){var t=W(Yt(u),(function(t){return n.get().getByDom(t).fold((function(){return[]}),X)}));s.set(t)},components:s.get,events:c}));function g(){return l}}function ti(t){var e=Rt.fromText(t);return wa({element:e})}Lr([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var ei,ni,ri={can:S,abort:O,run:a},oi=c,ii=oi("touchstart"),ai=oi("touchmove"),ui=oi("touchend"),ci=oi("touchcancel"),si=oi("mousedown"),li=oi("mousemove"),fi=oi("mouseout"),di=oi("mouseup"),mi=oi("mouseover"),pi=oi("focusin"),hi=oi("focusout"),gi=oi("keydown"),vi=oi("keyup"),bi=oi("input"),yi=oi("change"),_i=oi("click"),wi=oi("transitioncancel"),xi=oi("transitionend"),Oi=oi("transitionstart"),Si=oi("selectstart"),Ci={tap:ho("tap")},ki=ho("focus"),Ei=ho("blur.post"),Mi=ho("paste.post"),Ti=ho("receive"),Di=ho("execute"),Ai=ho("focus.item"),Pi=Ci.tap,Ri=ho("longpress"),Ii=ho("sandbox.close"),zi=ho("typeahead.cancel"),Li=ho("system.init"),ji=ho("system.touchmove"),Bi=ho("system.touchend"),Fi=ho("system.scroll"),Ni=ho("system.resize"),Hi=ho("system.attached"),Vi=ho("system.detached"),Ui=ho("system.dismissRequested"),Wi=ho("system.repositionRequested"),$i=ho("focusmanager.shifted"),Gi=ho("slotcontainer.visibility"),Ki=ho("change.tab"),qi=ho("dismiss.tab"),Xi=ho("highlight"),Yi=ho("dehighlight"),Ji=function(t,e,n,r){var o=k({target:e},r);t.getSystem().triggerEvent(n,e,o)},Qi=co,Zi=Co(Hi()),ta=Co(Vi()),ea=Co(Li()),na=(ei=Di(),function(t){return Oo(ei,t)}),ra=Qi([{key:ki(),value:po({can:function(t,e){var n,r=e.event,o=r.originator,i=r.target;return!(Vt(n=o,t.element)&&!Vt(n,i))}})}]),oa=Object.freeze({__proto__:null,events:ra}),ia=0,aa=c("alloy-id-"),ua=c("data-alloy-id"),ca=aa(),sa=ua(),la=function(t,e){Object.defineProperty(t.dom,sa,{value:e,writable:!0})},fa=Ro,da=s,ma=zo(),pa=function(t){return L(t,(function(t){return At(t,"/*")?t.substring(0,t.length-"/*".length):t}))},ha=Ro("alloy-premade"),ga={init:function(){return va({readState:c("No State required")})}},va=function(t){return t},ba=function(t,e){var n,r,o,i,a,u,c=rt(t,(function(t,n){return(1===t.length?jn.value(t[0].handler):function(t,e,n){var r=e[n];return r?function(t,e,n){try{var r=Y(e,(function(e,r){var o=e.name,i=r.name,a=n.indexOf(o),u=n.indexOf(i);if(-1===a)throw new Error("The ordering for "+t+" does not have an entry for "+o+".\nOrder specified: "+JSON.stringify(n,null,2));if(-1===u)throw new Error("The ordering for "+t+" does not have an entry for "+i+".\nOrder specified: "+JSON.stringify(n,null,2));return a<u?-1:u<a?1:0}));return jn.value(r)}catch(e){return jn.error([e])}}("Event: "+n,t,r).map((function(t){var e,n,r,o,i=L(t,(function(t){return t.handler}));return{can:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return N(n,(function(e,n){return e&&n.can.apply(void 0,t)}),!0)},abort:(r=n=e=i,o=function(t){return t.abort},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return N(r,(function(e,n){return e||o(n).apply(void 0,t)}),!1)}),run:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];Ot(e,(function(e){e.run.apply(void 0,t)}))}}})):jn.error(["The event ("+n+') 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(L(t,(function(t){return t.name})),null,2)])}(t,e,n)).map((function(r){var o,i,a=(i=b(o=r)?{can:S,abort:O,run:o}:o,function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=[t,e].concat(n);i.abort.apply(void 0,o)?e.stop():i.can.apply(void 0,o)&&i.run.apply(void 0,o)}),u=1<t.length?B(e[n],(function(e){return R(t,(function(t){return t.name===e}))})).join(" > "):t[0].name;return uo(n,{handler:a,purpose:u})}))}));return n={},r=[],o=[],Ot(c,(function(t){t.fold((function(t){r.push(t)}),(function(t){o.push(t)}))})),0<(u={errors:r,values:o}).errors.length?jn.error(U(u.errors)):(a=n,0===(i=u.values).length?jn.value(a):jn.value($r(a,Gr.apply(void 0,i))))},ya="alloy.base.behaviour",_a=Xr([io("dom","dom",{tag:"required",process:{}},Xr([fr("tag"),kr("styles",{}),kr("classes",[]),kr("attributes",{}),yr("value"),yr("innerHtml")])),fr("components"),fr("uid"),kr("events",{}),kr("apis",{}),io("eventOrder","eventOrder",((ni={})[Di()]=["disabling",ya,"toggling","typeaheadevents"],ni[ki()]=[ya,"focusing","keying"],ni[Li()]=[ya,"disabling","toggling","representing"],ni[bi()]=[ya,"representing","streaming","invalidating"],ni[Vi()]=[ya,"representing","item-events","tooltipping"],ni[si()]=["focusing",ya,"item-type-events"],ni[ii()]=["focusing",ya,"item-type-events"],ni[mi()]=["item-type-events","tooltipping"],ni[Ti()]=["receiving","reflecting","tooltipping"],Gn(c(ni))),Jr()),yr("domModification")]),wa=function(t){var e=cr("external.component",Zn([fr("element"),yr("uid")]),t),n=zr(zo()),r=e.uid.getOrThunk((function(){return fa("external")}));la(e.element,r);var o={uid:r,getSystem:n.get,config:bt.none,hasConfigured:O,connect:function(t){n.set(t)},disconnect:function(){n.set(zo((function(){return o})))},getApis:function(){return{}},element:e.element,spec:t,readState:c("No state"),syncComponents:a,components:c([]),events:{}};return jo(o)},xa=fa,Oa=function(t){return at(t,ha).getOrThunk((function(){return Zo(Mt(t,"uid")?t:k({uid:xa("")},t)).getOrDie()}))},Sa=jo;function Ca(t,e,n,r,o){return t(n,r)?bt.some(n):b(o)&&o(n)?bt.none():e(n,r,o)}function ka(t,e,n){for(var r=t.dom,o=b(n)?n:O;r.parentNode;){r=r.parentNode;var i=Rt.fromDom(r);if(e(i))return bt.some(i);if(o(i))break}return bt.none()}function Ea(t,e,n){return Ca((function(t,e){return e(t)}),ka,t,e,n)}function Ma(t,e,n){return Ea(t,e,n).isSome()}function Ta(t,e,n){return ka(t,(function(t){return Nt(t,e)}),n)}function Da(t,e){return n=e,Ht(r=void 0===t?document:t.dom)?bt.none():bt.from(r.querySelector(n)).map(Rt.fromDom);var n,r}function Aa(t,e,n){return Ca(Nt,Ta,t,e,n)}function Pa(){var t=Ro("aria-owns");return{id:t,link:function(e){oe(e,"aria-owns",t)},unlink:function(t){se(t,"aria-owns")}}}var Ra,Ia,za=function(t,e){return Ma(e,(function(e){return Vt(e,t.element)}),O)||(n=t,Ea(e,(function(t){if(!Ge(t))return!1;var e=ae(t,"id");return void 0!==e&&-1<e.indexOf("aria-owns")})).bind((function(t){var e=ae(t,"id");return Da(hn(t),'[aria-owns="'+e+'"]')})).exists((function(t){return za(n,t)})));var n};function La(t,e,n){var r,o;switch(at(ja.get(),t).orThunk((function(){return tt(Ct(ja.get()),(function(e){return-1<t.indexOf(e)?bt.some(ja.get()[e]):bt.none()}))})).getOr(Ra.NORMAL)){case Ra.NORMAL:return n(Fa());case Ra.LOGGING:var i=(r=t,e,o=[],(new Date).getTime(),{logEventCut:function(t,e,n){o.push({outcome:"cut",target:e,purpose:n})},logEventStopped:function(t,e,n){o.push({outcome:"stopped",target:e,purpose:n})},logNoParent:function(t,e,n){o.push({outcome:"no-parent",target:e,purpose:n})},logEventNoHandlers:function(t,e){o.push({outcome:"no-handlers-left",target:e})},logEventResponse:function(t,e,n){o.push({outcome:"response",purpose:n,target:e})},write:function(){(new Date).getTime();xt(["mousemove","mouseover","mouseout",Li()],r)}}),a=n(i);return i.write(),a;case Ra.STOP:return!0}}(Ia=Ra=Ra||{})[Ia.STOP=0]="STOP",Ia[Ia.NORMAL=1]="NORMAL",Ia[Ia.LOGGING=2]="LOGGING";var ja=zr({}),Ba=["alloy/data/Fields","alloy/debugging/Debugging"],Fa=c({logEventCut:a,logEventStopped:a,logNoParent:a,logEventNoHandlers:a,logEventResponse:a,write:a}),Na=c([fr("menu"),fr("selectedMenu")]),Ha=c([fr("item"),fr("selectedItem")]);function Va(){return gr("markers",[fr("backgroundMenu")].concat(Na()).concat(Ha()))}function Ua(t){return gr("markers",L(t,fr))}function Wa(t,e,n){return void 0!==(r=new Error).stack&&H(r.stack.split("\n"),(function(t){return 0<t.indexOf("alloy")&&!R(Ba,(function(e){return-1<t.indexOf(e)}))})).getOr("unknown"),io(e,e,n,or((function(t){return jn.value((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.apply(void 0,e)}))})));var r}function $a(t){return Wa(0,t,$n(a))}function Ga(t){return Wa(0,t,$n(bt.none))}function Ka(t){return Wa(0,t,{tag:"required",process:{}})}function qa(t){return Wa(0,t,{tag:"required",process:{}})}function Xa(t,e){return ao(t,c(e))}function Ya(t){return ao(t,s)}function Ja(t,e,n,r,o,i,a,u){return{x:t,y:e,bubble:n,direction:r,placement:o,restriction:i,label:a+"-"+o,alwaysFit:u=void 0!==u&&u}}function Qa(t,e,n,r){var o=t+e;return r<o?n:o<n?r:o}function Za(t,e){return q(["left","right","top","bottom"],(function(n){return at(e,n).map((function(e){return function(t){switch(e){case 1:return t.x;case 0:return t.x+t.width;case 2:return t.y;case 3:return t.y+t.height}}(t)}))}))}function tu(t,e){return t.x+t.width/2-e.width/2}function eu(t,e){return t.x+t.width-e.width}function nu(t,e){return t.y-e.height}function ru(t){return t.y+t.height}function ou(t,e){return t.y+t.height/2-e.height/2}function iu(t,e,n){return Ja(t.x+t.width,ou(t,e),n.east(),ju(),"east",Za(t,{left:0}),Nu)}function au(t,e,n){return Ja(t.x-e.width,ou(t,e),n.west(),Bu(),"west",Za(t,{right:1}),Nu)}function uu(){return[Hu,Vu,Uu,Wu,Gu,$u,iu,au]}function cu(){return[Vu,Hu,Wu,Uu,Gu,$u,iu,au]}function su(){return[Uu,Wu,Hu,Vu,$u,Gu]}function lu(){return[Wu,Uu,Vu,Hu,$u,Gu]}function fu(){return[Hu,Vu,Uu,Wu,Gu,$u]}function du(){return[Vu,Hu,Wu,Uu,Gu,$u]}function mu(t,e,n){return ea((function(r,o){n(r,t,e)}))}function pu(t){return{key:t,value:void 0}}function hu(t){var e,n,r,o,i,a,u,c,s=cr("Creating behaviour: "+t.name,Ju,t);return e=s.fields,n=s.name,r=s.active,o=s.apis,i=s.extra,a=s.state,u=Zn(e),c=Cr(n,[_r("config",Zn(e))]),Xu(u,c,n,r,o,i,a)}function gu(t){var e,n=cr("Creating behaviour: "+t.name,Qu,t),r=sr(n.branchKey,n.branches),o=n.name,i=n.active,a=n.apis,u=n.extra,c=n.state,s=Cr(o,[_r("config",e=r)]);return Xu(e,s,o,i,a,u,c)}function vu(){return Rt.fromDom(document)}function bu(t){return t.dom.focus()}function yu(t){var e=hn(t).dom;return t.dom===e.activeElement}function _u(t){return void 0===t&&(t=vu()),bt.from(t.dom.activeElement).map(Rt.fromDom)}function wu(t){return _u(hn(t)).filter((function(e){return t.dom.contains(e.dom)}))}function xu(t,e){var n=hn(e),r=_u(n).bind((function(t){function n(e){return Vt(t,e)}var r,o;return n(e)?bt.some(e):(r=n,(o=function(t){for(var e=0;e<t.childNodes.length;e++){var n=Rt.fromDom(t.childNodes[e]);if(r(n))return bt.some(n);var i=o(t.childNodes[e]);if(i.isSome())return i}return bt.none()})(e.dom))})),o=t(e);return r.each((function(t){_u(n).filter((function(e){return Vt(e,t)})).fold((function(){bu(t)}),a)})),o}function Ou(t,e,n,r,o){function i(t){return t+"px"}return{position:t,left:e.map(i),top:n.map(i),right:r.map(i),bottom:o.map(i)}}function Su(t,e){var n;pe(t,k(k({},n=e),{position:bt.some(n.position)}))}function Cu(t,e,n,r,o,i){var a=e.rect,u=a.x-n,c=a.y-r,s=o-(u+a.width),l=i-(c+a.height),f=bt.some(u),d=bt.some(c),m=bt.some(s),p=bt.some(l),h=bt.none();return e.direction.fold((function(){return Ou(t,f,d,h,h)}),(function(){return Ou(t,h,d,m,h)}),(function(){return Ou(t,f,h,h,p)}),(function(){return Ou(t,h,h,m,p)}),(function(){return Ou(t,f,d,h,h)}),(function(){return Ou(t,f,h,h,p)}),(function(){return Ou(t,f,d,h,h)}),(function(){return Ou(t,h,d,m,h)}))}function ku(t,e){return t.fold((function(){var t=e.rect;return Ou("absolute",bt.some(t.x),bt.some(t.y),bt.none(),bt.none())}),(function(t,n,r,o){return Cu("absolute",e,t,n,r,o)}),(function(t,n,r,o){return Cu("fixed",e,t,n,r,o)}))}function Eu(t,e){var n=_(Fe,e),r=t.fold(n,n,(function(){var t=ze();return Fe(e).translate(-t.left,-t.top)})),o=ke(e),i=xe(e);return Pn(r.left,r.top,o,i)}c(Xr(Ha().concat(Na())));var Mu=c(Xr(Ha())),Tu=c(gr("initSize",[fr("numColumns"),fr("numRows")])),Du=Lr([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),Au=Du.southeast,Pu=Du.southwest,Ru=Du.northeast,Iu=Du.northwest,zu=Du.south,Lu=Du.north,ju=Du.east,Bu=Du.west,Fu=function(t,e,n){return Math.min(Math.max(t,e),n)},Nu="layout",Hu=function(t,e,n){return Ja(t.x,ru(t),n.southeast(),Au(),"southeast",Za(t,{left:1,top:3}),Nu)},Vu=function(t,e,n){return Ja(eu(t,e),ru(t),n.southwest(),Pu(),"southwest",Za(t,{right:0,top:3}),Nu)},Uu=function(t,e,n){return Ja(t.x,nu(t,e),n.northeast(),Ru(),"northeast",Za(t,{left:1,bottom:2}),Nu)},Wu=function(t,e,n){return Ja(eu(t,e),nu(t,e),n.northwest(),Iu(),"northwest",Za(t,{right:0,bottom:2}),Nu)},$u=function(t,e,n){return Ja(tu(t,e),nu(t,e),n.north(),Lu(),"north",Za(t,{bottom:2}),Nu)},Gu=function(t,e,n){return Ja(tu(t,e),ru(t),n.south(),zu(),"south",Za(t,{top:3}),Nu)},Ku=Object.freeze({__proto__:null,events:function(t){return Qi([Oo(Ti(),(function(e,n){var r,o=t.channels,i=Ct(o),a=n,u=(r=a).universal?i:B(i,(function(t){return xt(r.channels,t)}));Ot(u,(function(t){var n=o[t],r=n.schema,i=cr("channel["+t+"] data\nReceiver: "+Po(e.element),r,a.data);n.onReceive(e,i)}))}))])}}),qu=[dr("channels",ir(jn.value,Zn([Ka("onReceive"),kr("schema",Jr())])))],Xu=function(t,e,n,r,o,i,a){function u(t){return ut(t,n)?t[n]():bt.none()}var s=nt(o,(function(t,e){return r=n,a=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var a=[t].concat(e);return t.config({name:c(r)}).fold((function(){throw new Error("We could not find any behaviour configuration for: "+r+". Using API: "+i)}),(function(e){var n=Array.prototype.slice.call(a,1);return o.apply(void 0,[t,e.config,e.state].concat(n))}))},u=i=e,l=(s=(o=t).toString()).indexOf(")")+1,f=s.indexOf("("),d=s.substring(f+1,l-1).split(/,\s*/),a.toFunctionAnnotation=function(){return{name:u,parameters:pa(d.slice(0,1).concat(d.slice(3)))}},a;var r,o,i,a,u,s,l,f,d})),l=nt(i,Lo),f=k(k(k({},l),s),{revoke:_(pu,n),config:function(e){var r=cr(n+"-config",t,e);return{key:n,value:{config:r,me:f,configAsRaw:Lt((function(){return cr(n+"-config",t,e)})),initialConfig:e,state:a}}},schema:c(e),exhibit:function(t,e){return Tt(u(t),at(r,"exhibit"),(function(t,n){return n(e,t.config,t.state)})).getOrThunk((function(){return No({})}))},name:c(n),handlers:function(t){return u(t).map((function(t){return at(r,"events").getOr((function(){return{}}))(t.config,t.state)})).getOr({})}});return f},Yu=co,Ju=Zn([fr("fields"),fr("name"),kr("active",{}),kr("apis",{}),kr("state",ga),kr("extra",{})]),Qu=Zn([fr("branchKey"),fr("branches"),fr("name"),kr("active",{}),kr("apis",{}),kr("state",ga),kr("extra",{})]),Zu=c(void 0),tc=hu({fields:qu,name:"receiving",active:Ku}),ec=Object.freeze({__proto__:null,exhibit:function(t,e){return No({classes:[],styles:e.useFixed()?{}:{position:"relative"}})}}),nc=Lr([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),rc=function(t,e,n){var r=Sn(e,n);return t.fold(c(r),c(r),(function(){var t=ze();return r.translate(-t.left,-t.top)}))};function oc(t){return ue(t,wc)}function ic(t){function e(){return n.get().each(t)}var n=zr(bt.none());return{clear:function(){e(),n.set(bt.none())},isSet:function(){return n.get().isSome()},get:function(){return n.get()},set:function(t){e(),n.set(bt.some(t))}}}function ac(){return ic((function(t){return t.destroy()}))}function uc(){return ic((function(t){return t.unbind()}))}function cc(){var t=ic(a);return k(k({},t),{on:function(e){return t.get().each(e)}})}function sc(t,e,n){return Me(t,e,Oc,n,!1)}function lc(t,e,n){return Me(t,e,Oc,n,!0)}function fc(t,e){function n(e){var n,r=null!==(n=e.raw.pseudoElement)&&void 0!==n?n:"";return Vt(e.target,t)&&!mt(r)&&xt(Cc,e.raw.propertyName)}function r(r){var i;(o(r)||n(r))&&(c.clear(),s.clear(),!o(i=null==r?void 0:r.raw.type)&&i!==xi()||(clearTimeout(a),se(t,kc),Xo(t,e.classes)))}function i(){c.set(sc(t,xi(),r)),s.set(sc(t,wi(),r))}var a,u,c=uc(),s=uc();"ontransitionstart"in t.dom?u=sc(t,Oi(),(function(t){n(t)&&(u.unbind(),i())})):i();var l,d,m=(l=t,d=p("transition-delay"),N(p("transition-duration"),(function(t,e,n){var r=h(d[n])+h(e);return Math.max(t,r)}),0));function p(t){var e=he(l,t);return B(f(e)?e.split(/\s*,\s*/):[],mt)}function h(t){if(f(t)&&/^[\d.]+/.test(t)){var e=parseFloat(t);return At(t,"ms")?e:1e3*e}return 0}requestAnimationFrame((function(){a=setTimeout(r,m+17),oe(t,kc,a)}))}function dc(t,e,n,r){be(e,"max-height"),be(e,"max-width");var o,i,a,u,l,f,d,m,p,h={width:ke(o=e),height:xe(o)};return i=e,a=r.preference,u=t,l=h,f=n,d=r.bounds,m=l.width,p=l.height,N(a,(function(t,e){var n=_(g,e);return t.fold(c(t),n)}),xc.nofit({rect:u,maxHeight:l.height,maxWidth:l.width,direction:Au(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:u.y},-1,-1,!1)).fold(s,s);function g(t,e,n,r,o){var a=function(t,e,n,r){var o,i,a,u,s,l,f,d,m,p,h,g,v,b,y,_,w,x,O,S,C,k,E,M,T,D,A,P,R,I,z,L,j,B,F,N,H,V,U,W=t.bubble,$=W.offset,G=(j=r,B=t.restriction,F=$,N=ot("left",j.x),H=ot("top",j.y),V=ot("right",j.right),U=ot("bottom",j.bottom),Pn(N,H,V-N,U-H)),K=t.x+$.left,q=t.y+$.top,X=Pn(K,q,e,n),Y=(o=G.x,i=G.y,a=G.right,u=G.bottom,s=X.x,l=X.y,f=X.right,d=X.bottom,m=X.width,p=X.height,{originInBounds:o<=s&&s<=a&&i<=l&&l<=u,sizeInBounds:f<=a&&o<=f&&d<=u&&i<=d,visibleW:Math.min(m,o<=s?a-s:f-o),visibleH:Math.min(p,i<=l?u-l:d-i)}),J=Y.visibleW,Q=Y.visibleH,Z=Y.originInBounds&&Y.sizeInBounds,tt=Z?X:(h=G.x,g=G.y,v=G.right,b=G.bottom,y=X.x,_=X.y,w=X.width,x=X.height,O=Math.max(h,v-w),S=Math.max(g,b-x),C=Fu(y,h,O),k=Fu(_,g,S),E=Math.min(C+w,v)-C,M=Math.min(k+x,b)-k,Pn(C,k,E,M)),et=0<tt.width&&0<tt.height,nt=(T=t.direction,P=c((D=tt).bottom-(A=r).y),R=c(A.bottom-D.y),I=T.fold(R,R,P,P,R,P,R,R),z=c(D.right-A.x),L=c(A.right-D.x),{maxWidth:T.fold(L,z,L,z,L,L,L,z),maxHeight:I}),rt={rect:tt,maxHeight:nt.maxHeight,maxWidth:nt.maxWidth,direction:t.direction,placement:t.placement,classes:{on:W.classesOn,off:W.classesOff},layout:t.label,testY:q};function ot(t,e){return B[t].map((function(n){var r="top"===t||"bottom"===t,o=r?F.top:F.left,i=("left"===t||"top"===t?Math.max:Math.min)(n,e)+o;return r?Fu(i,j.y,j.bottom):Fu(i,j.x,j.right)})).getOr(e)}return Z||t.alwaysFit?xc.fit(rt):xc.nofit(rt,J,Q,et)}(t(u,l,f,i,d),m,p,d);return a.fold(c(a),(function(t,i,u,c){return(o===c?r<u||n<i:!o&&c)?a:xc.nofit(e,n,r,o)}))}}function mc(t,e){var n=t,r=Math.floor(e);de(n,"max-height",xn.max(n,r,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"])+"px")}function pc(t,e,n){return void 0===t[e]?n:t[e]}function hc(t,e,n,r){function o(t){return at(n,t).getOr([])}function i(t,e,n){var r=K(Dc,n);return{offset:Sn(t,e),classesOn:W(n,o),classesOff:W(r,o)}}var a=t*(r=void 0===r?1:r),u=e*r;return{southeast:function(){return i(-t,e,["top","alignLeft"])},southwest:function(){return i(t,e,["top","alignRight"])},south:function(){return i(-t/2,e,["top","alignCentre"])},northeast:function(){return i(-t,-e,["bottom","alignLeft"])},northwest:function(){return i(t,-e,["bottom","alignRight"])},north:function(){return i(-t/2,-e,["bottom","alignCentre"])},east:function(){return i(t,-e/2,["valignCentre","left"])},west:function(){return i(-t,-e/2,["valignCentre","right"])},insetNortheast:function(){return i(a,u,["top","alignLeft","inset"])},insetNorthwest:function(){return i(-a,u,["top","alignRight","inset"])},insetNorth:function(){return i(-a/2,u,["top","alignCentre","inset"])},insetSoutheast:function(){return i(a,-u,["bottom","alignLeft","inset"])},insetSouthwest:function(){return i(-a,-u,["bottom","alignRight","inset"])},insetSouth:function(){return i(-a/2,-u,["bottom","alignCentre","inset"])},insetEast:function(){return i(-a,-u/2,["valignCentre","right","inset"])},insetWest:function(){return i(a,-u/2,["valignCentre","left","inset"])}}}function gc(){return hc(0,0,{})}function vc(t,e){return function(n){return"rtl"===Pc(n)?e:t}}nc.none;var bc,yc=nc.relative,_c=nc.fixed,wc="data-alloy-placement",xc=Lr([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),Oc=S,Sc=Ee,Cc=["top","bottom","right","left"],kc="data-alloy-transition-timer",Ec=c((function(t,e){mc(t,e),me(t,{"overflow-x":"hidden","overflow-y":"auto"})})),Mc=c((function(t,e){mc(t,e)})),Tc=function(t,e,n,r){var o,i,a,u,c=dc(t,e,n,r),s=e,f=c,d=ku((o=r).origin,f);return o.transition.each((function(t){!function(t,e,n,r,o,i){var a,u,c,s,f,d,m,p,h,g=(a=r,u=o,i.exists((function(t){var e=a.mode;return"all"===e||t[e]!==u[e]})));function v(t){return parseFloat(t).toFixed(3)}g||(h=t,$(r.classes,(function(t){return Ko(h,t)})))?(de(t,"position",n.position),c=Eu(e,t),s=ku(e,k(k({},o),{rect:c})),f=q(Cc,(function(t){return s[t]})),p=n,ot(f,(function(t,e){var n,r,o,i=p[e].map(v),a=t.map(v);return!Tt(n=i,r=a,o=void 0===o?l:o).getOr(n.isNone()&&r.isNone())})).isSome()&&(pe(t,f),g&&(qo(d=t,(m=r).classes),ue(d,kc).each((function(t){clearTimeout(parseInt(t,10)),se(d,kc)})),fc(d,m)),ye(t))):Xo(t,r.classes)}(s,o.origin,d,t,f,o.lastPlacement)})),Su(s,d),u=c.placement,oe(e,wc,u),Xo(i=e,(a=c.classes).off),qo(i,a.on),(0,r.maxHeightFunction)(e,c.maxHeight),(0,r.maxWidthFunction)(e,c.maxWidth),{layout:c.layout,placement:c.placement}},Dc=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],Ac=s,Pc=function(t){return"rtl"===he(t,"direction")?"rtl":"ltr"};function Rc(t){return Ma(t,(function(t){return Ge(t)&&ae(t,"data-alloy-vertical-dir")===bc.BottomToTop}))}function Ic(){return Cr("layouts",[fr("onLtr"),fr("onRtl"),yr("onBottomLtr"),yr("onBottomRtl")])}function zc(t,e,n,r,o,i,a){var u=a.map(Rc).getOr(!1),c=e.layouts.map((function(e){return e.onLtr(t)})),s=e.layouts.map((function(e){return e.onRtl(t)}));return vc(u?e.layouts.bind((function(e){return e.onBottomLtr.map((function(e){return e(t)}))})).or(c).getOr(o):c.getOr(n),u?e.layouts.bind((function(e){return e.onBottomRtl.map((function(e){return e(t)}))})).or(s).getOr(i):s.getOr(r))(t)}function Lc(t){return t.fold(s,(function(t,e,n){return t.translate(-e,-n)}))}function jc(t){return t.fold(s,s)}function Bc(t){return N(t,(function(t,e){return t.translate(e.left,e.top)}),Sn(0,0))}function Fc(t){return Bc(L(t,jc))}function Nc(t,e,n){var r,o,i=ze(Wt(t.element)),a=(r=t,o=Kt(n.root).dom,bt.from(o.frameElement).map(Rt.fromDom).filter((function(t){return Vt(Wt(t),Wt(r.element))})).map(Se).getOr(i));return Zc(a,i.left,i.top)}function Hc(t,e,n,r){var o=Qc(Sn(t,e));return bt.some({point:o,width:n,height:r})}function Vc(t,e,n,r,o){return t.map((function(t){var i=[e,t.point],a=r.fold((function(){return Fc(i)}),(function(){return Fc(i)}),(function(){return Bc(L(i,Lc))})),u={x:a.left,y:a.top,width:t.width,height:t.height},c=(n.showAbove?su:fu)(),s=(n.showAbove?lu:du)(),l=zc(o,n,c,s,c,s,bt.none());return Ac({anchorBox:u,bubble:n.bubble.getOr(gc()),overrides:n.overrides,layouts:l,placer:bt.none()})}))}function Uc(t,e,n){var r,o=t.document.createRange(),i=o;return e.fold((function(t){i.setStartBefore(t.dom)}),(function(t,e){i.setStart(t.dom,e)}),(function(t){i.setStartAfter(t.dom)})),r=o,n.fold((function(t){r.setEndBefore(t.dom)}),(function(t,e){r.setEnd(t.dom,e)}),(function(t){r.setEndAfter(t.dom)})),o}function Wc(t,e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i}function $c(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}}function Gc(t,e,n){return e(Rt.fromDom(n.startContainer),n.startOffset,Rt.fromDom(n.endContainer),n.endOffset)}function Kc(t,e){return n=t,i=e.match({domRange:function(t){return{ltr:c(t),rtl:bt.none}},relative:function(t,e){return{ltr:Lt((function(){return Uc(n,t,e)})),rtl:Lt((function(){return bt.some(Uc(n,e,t))}))}},exact:function(t,e,r,o){return{ltr:Lt((function(){return Wc(n,t,e,r,o)})),rtl:Lt((function(){return bt.some(Wc(n,r,o,t,e))}))}}}),((o=(r=i).ltr()).collapsed?r.rtl().filter((function(t){return!1===t.collapsed})).map((function(t){return as.rtl(Rt.fromDom(t.endContainer),t.endOffset,Rt.fromDom(t.startContainer),t.startOffset)})).getOrThunk((function(){return Gc(0,as.ltr,o)})):Gc(0,as.ltr,o)).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}});var n,r,o,i}(bc=bc||{}).TopToBottom="toptobottom",bc.BottomToTop="bottomtotop";var qc="data-alloy-vertical-dir",Xc=[fr("hotspot"),yr("bubble"),kr("overrides",{}),Ic(),Xa("placement",(function(t,e,n){var r=Eu(n,e.hotspot.element),o=zc(t.element,e,fu(),du(),su(),lu(),bt.some(e.hotspot.element));return bt.some(Ac({anchorBox:r,bubble:e.bubble.getOr(gc()),overrides:e.overrides,layouts:o,placer:bt.none()}))}))],Yc=[fr("x"),fr("y"),kr("height",0),kr("width",0),kr("bubble",gc()),kr("overrides",{}),Ic(),Xa("placement",(function(t,e,n){var r=rc(n,e.x,e.y),o=Pn(r.left,r.top,e.width,e.height),i=zc(t.element,e,uu(),cu(),uu(),cu(),bt.none());return bt.some(Ac({anchorBox:o,bubble:e.bubble,overrides:e.overrides,layouts:i,placer:bt.none()}))}))],Jc=Lr([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),Qc=Jc.screen,Zc=Jc.absolute,ts=[fr("node"),fr("root"),yr("bubble"),Ic(),kr("overrides",{}),kr("showAbove",!1),Xa("placement",(function(t,e,n){var r=Nc(t,0,e);return e.node.filter(bn).bind((function(o){var i=o.dom.getBoundingClientRect(),a=Hc(i.left,i.top,i.width,i.height),u=e.node.getOr(t.element);return Vc(a,r,e,n,u)}))}))],es=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},ns=Lr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),rs=(ns.before,ns.on,ns.after,function(t){return t.fold(s,s,s)}),os=Lr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),is={domRange:os.domRange,relative:os.relative,exact:os.exact,exactFromRange:function(t){return os.exact(t.start,t.soffset,t.finish,t.foffset)},getWin:function(t){return Kt(t.match({domRange:function(t){return Rt.fromDom(t.startContainer)},relative:function(t,e){return rs(t)},exact:function(t,e,n,r){return t}}))},range:es},as=Lr([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]);function us(t){return Kl.getOption(t)}function cs(t){return us(t).filter((function(t){return 0!==t.trim().length||-1<t.indexOf(" ")})).isSome()||xt(ql,It(t))}function ss(t,e){return Ht(n=void 0===t?document:t.dom)?[]:L(n.querySelectorAll(e),Rt.fromDom);var n}function ls(t){if(0<t.rangeCount){var e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);return bt.some(es(Rt.fromDom(e.startContainer),e.startOffset,Rt.fromDom(n.endContainer),n.endOffset))}return bt.none()}function fs(t){if(null===t.anchorNode||null===t.focusNode)return ls(t);var e,n,r,o,i,a,u,c,s,l,f,d=Rt.fromDom(t.anchorNode),m=Rt.fromDom(t.focusNode);return e=d,a=n=t.anchorOffset,u=r=m,c=o=t.focusOffset,(s=Wt(i=e).dom.createRange()).setStart(i.dom,a),s.setEnd(u.dom,c),l=s,f=Vt(e,r)&&n===o,l.collapsed&&!f?bt.some(es(d,t.anchorOffset,m,t.focusOffset)):ls(t)}function ds(t,e){var n,r,o=(n=Kc(t,e)).getClientRects();return 0<(r=0<o.length?o[0]:n.getBoundingClientRect()).width||0<r.height?bt.some(r).map($c):bt.none()}function ms(t,e){return{element:t,offset:e}}function ps(t,e){return(Ke(t)?ms:function(t,e){var n=Yt(t);if(0===n.length)return ms(t,e);if(e<n.length)return ms(n[e],0);var r=n[n.length-1];return ms(r,(Ke(r)?Kl.get(r):Yt(r)).length)})(t,e)}function hs(t,e){return e.getSelection.getOrThunk((function(){return function(){return bt.from(t.getSelection()).filter((function(t){return 0<t.rangeCount})).bind(fs)}}))().map((function(t){var e=ps(t.start,t.soffset),n=ps(t.finish,t.foffset);return is.range(e.element,e.offset,n.element,n.offset)}))}function gs(t){return t.x+t.width}function vs(t,e){return t.x-e.width}function bs(t,e){return t.y-e.height+t.height}function ys(t,e,n){return Ja(gs(t),t.y,n.southeast(),Au(),"southeast",Za(t,{left:0,top:2}),Yl)}function _s(t,e,n){return Ja(vs(t,e),t.y,n.southwest(),Pu(),"southwest",Za(t,{right:1,top:2}),Yl)}function ws(t,e,n){return Ja(gs(t),bs(t,e),n.northeast(),Ru(),"northeast",Za(t,{left:0,bottom:3}),Yl)}function xs(t,e,n){return Ja(vs(t,e),bs(t,e),n.northwest(),Iu(),"northwest",Za(t,{right:1,bottom:3}),Yl)}function Os(){return[ys,_s,ws,xs]}function Ss(){return[_s,ys,xs,ws]}function Cs(t,e,n,r,o,i,u){var c,s,l,f,d,m,p,h,g,v,b,y,_,w;return c={anchorBox:n.anchorBox,origin:e},s=o.element,l=n.bubble,f=n.layouts,d=i,m=r,h=u,v=pc(p=n.overrides,"maxHeightFunction",Ec()),b=pc(p,"maxWidthFunction",a),y=c.anchorBox,w={bounds:(g=_=c.origin,m.fold((function(){return g.fold(In,In,Pn)}),(function(t){return g.fold(t,t,(function(){var e=t(),n=rc(g,e.x,e.y);return Pn(n.left,n.top,e.width,e.height)}))}))),origin:_,preference:f,maxHeightFunction:v,maxWidthFunction:b,lastPlacement:d,transition:h},Tc(y,s,l,w)}function ks(t,e){Mn(t.element,e.element)}function Es(t,e){var n,r=t.components();Ot((n=t).components(),(function(t){return Tn(t.element)})),Re(n.element),n.syncComponents();var o=K(r,e);Ot(o,(function(e){rf(e),t.getSystem().removeFromWorld(e)})),Ot(e,(function(e){e.getSystem().isConnected()?ks(t,e):(t.getSystem().addToWorld(e),ks(t,e),bn(t.element)&&of(e)),t.syncComponents()}))}function Ms(t,e){af(t,e,Mn)}function Ts(t){rf(t),Tn(t.element),t.getSystem().removeFromWorld(t)}function Ds(t){var e=qt(t.element).bind((function(e){return t.getSystem().getByDom(e).toOptional()}));Ts(t),e.each((function(t){t.syncComponents()}))}function As(t){var e=t.components();Ot(e,Ts),Re(t.element),t.syncComponents()}function Ps(t,e){uf(t,e,Mn)}function Rs(t){var e=Yt(t.element);Ot(e,(function(e){t.getByDom(e).each(rf)})),Tn(t.element)}function Is(t,e,n,r){n.get().each((function(e){As(t)})),Ms(e.getAttachPoint(t),t);var o=t.getSystem().build(r);return Ms(t,o),n.set(o),o}function zs(t,e,n,r){var o=Is(t,e,n,r);return e.onOpen(t,o),o}function Ls(t,e,n){n.get().each((function(r){As(t),Ds(t),e.onClose(t,r),n.clear()}))}function js(t,e,n){return n.isOpen()}function Bs(t){var e=cr("Dismissal",pf,t),n={};return n[ff()]={schema:Zn([fr("target")]),onReceive:function(t,n){lf.isOpen(t)&&(lf.isPartOf(t,n.target)||e.isExtraPart(t,n.target)||e.fireEventInstead.fold((function(){return lf.close(t)}),(function(e){return go(t,e.event)})))}},n}function Fs(t){var e=cr("Reposition",hf,t),n={};return n[df()]={onReceive:function(t){lf.isOpen(t)&&e.fireEventInstead.fold((function(){return e.doReposition(t)}),(function(e){return go(t,e.event)}))}},n}function Ns(t,e,n){e.store.manager.onLoad(t,e,n)}function Hs(t,e,n){e.store.manager.onUnload(t,e,n)}function Vs(){var t=zr(null);return va({set:t.set,get:t.get,isNotSet:function(){return null===t.get()},clear:function(){t.set(null)},readState:function(){return{mode:"memory",value:t.get()}}})}function Us(){var t=zr({}),e=zr({});return va({readState:function(){return{mode:"dataset",dataByValue:t.get(),dataByText:e.get()}},lookup:function(n){return at(t.get(),n).orThunk((function(){return at(e.get(),n)}))},update:function(n){var r=t.get(),o=e.get(),i={},a={};Ot(n,(function(t){at(i[t.value]=t,"meta").each((function(e){at(e,"text").each((function(e){a[e]=t}))}))})),t.set(k(k({},r),i)),e.set(k(k({},o),a))},clear:function(){t.set({}),e.set({})}})}function Ws(t,e,n,r){var o=e.store;n.update([r]),o.setValue(t,r),e.onSetValue(t,r)}function $s(t,e){return Ir(t,{},L(e,(function(e){return n=e.name(),r="Cannot configure "+e.name()+" for "+t,io(n,n,{tag:"option",process:{}},Xn((function(t){return Fr("The field: "+n+" is forbidden. "+r)})));var n,r})).concat([ao("dump",s)]))}function Gs(t){return t.dump}function Ks(t,e){return k(k({},Yu(e)),t.dump)}function qs(t){return Mt(t,"uiType")}function Xs(t){return t.fold(bt.some,bt.none,bt.some,bt.some)}function Ys(t){function e(t){return t.name}return t.fold(e,e,e,e)}function Js(t,e){return function(n){var r=cr("Converting part type",e,n);return t(r)}}function Qs(t,e,n,r){return $r(e.defaults(t,n,r),n,{uid:t.partUids[e.name]},e.overrides(t,n,r))}function Zs(t,e){var n={};return Ot(e,(function(e){Xs(e).each((function(e){var r=qf(t,e.pname);n[e.name]=function(n){var o=cr("Part: "+e.name+" in "+t,Xr(e.schema),n);return k(k({},r),{config:n,validated:o})}}))})),n}function tl(t,e,n){return{uiType:Tf(),owner:t,name:e,config:n,validated:{}}}function el(t){return W(t,(function(t){return t.fold(bt.none,bt.some,bt.none,bt.none).map((function(t){return gr(t.name,t.schema.concat([Ya(Gf())]))})).toArray()}))}function nl(t){return L(t,Ys)}function rl(t,e,n){return r=e,o={},i={},Ot(n,(function(t){t.fold((function(t){o[t.pname]=Ef(!0,(function(e,n,r){return t.factory.sketch(Qs(e,t,n,r))}))}),(function(t){var e=r.parts[t.name];i[t.name]=c(t.factory.sketch(Qs(r,t,e[Gf()]),e))}),(function(t){o[t.pname]=Ef(!1,(function(e,n,r){return t.factory.sketch(Qs(e,t,n,r))}))}),(function(t){o[t.pname]=Mf(!0,(function(e,n,r){return L(e[t.name],(function(n){return t.factory.sketch($r(t.defaults(e,n,r),n,t.overrides(e,n)))}))}))}))})),{internals:c(o),externals:c(i)};var r,o,i}function ol(t,e,n){return r=bt.some(t),i=(o=e).components,l=nt(n,(function(t,e){return r=t,o=!1,{name:c(n=e),required:function(){return r.fold((function(t,e){return t}),(function(t,e){return t}))},used:function(){return o},replace:function(){if(o)throw new Error("Trying to use the same placeholder more than once: "+n);return o=!0,r}};var n,r,o})),a=r,u=o,s=l,f=W(i,(function(t){return kf(a,u,t,s)})),et(l,(function(t){if(!1===t.used()&&t.required())throw new Error("Placeholder: "+t.name()+" was not found in components list\nNamespace: "+r.getOr("none")+"\nComponents: "+JSON.stringify(o.components,null,2))})),f;var r,o,i,a,u,s,l,f}function il(t,e,n){var r=e.partUids[n];return t.getSystem().getByUid(r).toOptional()}function al(t,e,n){return il(t,e,n).getOrDie("Could not find part: "+n)}function ul(t,e,n){var r={},o=e.partUids,i=t.getSystem();return Ot(n,(function(t){r[t]=c(i.getByUid(o[t]))})),r}function cl(t,e){var n=t.getSystem();return nt(e.partUids,(function(t,e){return c(n.getByUid(t))}))}function sl(t){return Ct(t.partUids)}function ll(t,e,n){var r={},o=e.partUids,i=t.getSystem();return Ot(n,(function(t){r[t]=c(i.getByUid(o[t]).getOrDie())})),r}function fl(t,e){return co(L(nl(e),(function(e){return{key:e,value:t+"-"+e}})))}function dl(t){return io("partUids","partUids",Gn((function(e){return fl(e.uid,t)})),Jr())}function ml(t,e,n,r,o){var i;return cr(t+" [SpecSchema]",Zn((i=o,(0<r.length?[gr("parts",r)]:[]).concat([fr("uid"),kr("dom",{}),kr("components",[]),Ya("originalSpec"),kr("debug.sketcher",{})]).concat(i)).concat(e)),n)}function pl(t,e,n,r,o){var i=Yf(o),a=ml(t,e,i,el(n),[dl(n)]),u=rl(0,a,n);return r(a,ol(t,a,u.internals()),i,u.externals())}function hl(t){var e=cr("Sketcher for "+t.name,Jf,t),n=nt(e.apis,Bo),r=nt(e.extraApis,Lo);return k(k({name:e.name,configFields:e.configFields,sketch:function(t){return n=e.name,r=e.configFields,(0,e.factory)(ml(n,r,o=Yf(t),[],[]),o);var n,r,o}},n),r)}function gl(t){var e=cr("Sketcher for "+t.name,Qf,t),n=Zs(e.name,e.partFields),r=nt(e.apis,Bo),o=nt(e.extraApis,Lo);return k(k({name:e.name,partFields:e.partFields,configFields:e.configFields,sketch:function(t){return pl(e.name,e.configFields,e.partFields,e.factory,t)},parts:n},r),o)}function vl(t){return"input"===It(t)&&"radio"!==ae(t,"type")||"textarea"===It(t)}function bl(t,e,n){(e.disabled()?nd:rd)(t,e)}function yl(t,e){return!0===e.useNative&&xt(ed,It(t.element))}function _l(t,e){return yl(t,e)?ce(t.element,"disabled"):"true"===ae(t.element,"aria-disabled")}function wl(t,e,n,r){var o=ss(t.element,"."+e.highlightClass);Ot(o,(function(n){R(r,(function(t){return t.element===n}))||(Go(n,e.highlightClass),t.getSystem().getByDom(n).each((function(n){e.onDehighlight(t,n),go(n,Yi())})))}))}function xl(t,e,n,r){wl(t,e,0,[r]),Fl(0,e,0,r)||($o(r.element,e.highlightClass),e.onHighlight(t,r),go(r,Xi()))}function Ol(t,e,n,r){var o=ss(t.element,"."+e.itemClass);return V(o,(function(t){return Ko(t,e.highlightClass)})).bind((function(e){var n=Qa(e,r,0,o.length-1);return t.getSystem().getByDom(o[n]).toOptional()}))}function Sl(t,e,n){var r=G(t.slice(0,e)),o=G(t.slice(e+1));return H(r.concat(o),n)}function Cl(t,e,n){return H(G(t.slice(0,e)),n)}function kl(t,e,n){var r=t.slice(0,e);return H(t.slice(e+1).concat(r),n)}function El(t,e,n){return H(t.slice(e+1),n)}function Ml(t){return function(e){var n=e.raw;return xt(t,n.which)}}function Tl(t){return function(e){return $(t,(function(t){return t(e)}))}}function Dl(t){return!0===t.raw.shiftKey}function Al(t){return!0===t.raw.ctrlKey}function Pl(t,e){return{matches:t,classification:e}}function Rl(t,e,n){e.exists((function(t){return n.exists((function(e){return Vt(e,t)}))}))||vo(t,$i(),{prevFocus:e,newFocus:n})}function Il(){function t(t){return wu(t.element)}return{get:t,set:function(e,n){var r=t(e);e.getSystem().triggerFocus(n,e.element),Rl(e,r,t(e))}}}function zl(){function t(t){return cd.getHighlighted(t).map((function(t){return t.element}))}return{get:t,set:function(e,n){var r=t(e);e.getSystem().getByDom(n).fold(a,(function(t){cd.highlight(e,t)}));var o=t(e);Rl(e,r,o)}}}function Ll(t,e,n,r,o,i){var a=i.map(Rn);return ef(t,e,n,r,o,a)}function jl(t,e,n){var r,o,i=e.getAttachPoint(t);de(t.element,"position",nf.getMode(i)),o=e.cloakVisibilityAttr,ge((r=t).element,"visibility").fold((function(){se(r.element,o)}),(function(t){oe(r.element,o,t)})),de(r.element,"visibility","hidden")}function Bl(t,e,n){var r,o,i,a=t.element;R(["top","left","right","bottom"],(function(t){return ge(a,t).isSome()}))||be(t.element,"position"),o="visibility",i=e.cloakVisibilityAttr,ue((r=t).element,i).fold((function(){return be(r.element,o)}),(function(t){return de(r.element,o,t)}))}function Fl(t,e,n,r){return Ko(r.element,e.highlightClass)}function Nl(t,e,n){return Da(t.element,"."+e.itemClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))}function Hl(t,e,n){var r=ss(t.element,"."+e.itemClass);return(0<r.length?bt.some(r[r.length-1]):bt.none()).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))}function Vl(t,e,n){return st(L(ss(t.element,"."+e.itemClass),(function(e){return t.getSystem().getByDom(e).toOptional()})))}as.ltr,as.rtl;var Ul,Wl,$l,Gl,Kl=(Ul=Ke,{get:function(t){if(!Ul(t))throw new Error("Can only get text value of a text node");return Wl(t).getOr("")},getOption:Wl=function(t){return Ul(t)?bt.from(t.dom.nodeValue):bt.none()},set:function(t,e){if(!Ul(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=e}}),ql=["img","br"],Xl=[yr("getSelection"),fr("root"),yr("bubble"),Ic(),kr("overrides",{}),kr("showAbove",!1),Xa("placement",(function(t,e,n){var r=Kt(e.root).dom,o=Nc(t,0,e);return Vc(hs(r,e).bind((function(t){return(0<(e=Kc(r,is.exactFromRange(t)).getBoundingClientRect()).width||0<e.height?bt.some(e).map($c):bt.none()).orThunk((function(){var e=Rt.fromText("\ufeff");Te(t.start,e);var n=ds(r,is.exact(e,0,e,1));return Tn(e),n})).bind((function(t){return Hc(t.left,t.top,t.width,t.height)}));var e})),o,e,n,hs(r,e).bind((function(t){return Ge(t.start)?bt.some(t.start):dn(t.start)})).getOr(t.element))}))],Yl="link-layout",Jl=sr("type",{selection:Xl,node:ts,hotspot:Xc,submenu:[fr("item"),Ic(),kr("overrides",{}),Xa("placement",(function(t,e,n){var r=Eu(n,e.item.element),o=zc(t.element,e,Os(),Ss(),Os(),Ss(),bt.none());return bt.some(Ac({anchorBox:r,bubble:gc(),overrides:e.overrides,layouts:o,placer:bt.none()}))}))],makeshift:Yc}),Ql=[br("classes",Zr),Dr("mode","all",["all","layout","placement"])],Zl=[kr("useFixed",O),yr("getBounds")],tf=[dr("anchor",Jl),Cr("transition",Ql)],ef=function(t,e,n,r,o,i){var a=cr("placement.info",Xr(tf),o),u=a.anchor,s=r.element,l=n.get(r.uid);xu((function(){de(s,"position","fixed");var o=ge(s,"visibility");de(s,"visibility","hidden");var f,d,m,p,h=e.useFixed()?(p=document.documentElement,_c(0,0,p.clientWidth,p.clientHeight)):(d=Se((f=t).element),m=f.element.dom.getBoundingClientRect(),yc(d.left,d.top,m.width,m.height)),g=u.placement,v=i.map(c).or(e.getBounds);g(t,u,h).each((function(e){var o=e.placer.getOr(Cs)(t,h,e,v,r,l,a.transition);n.set(r.uid,o)})),o.fold((function(){be(s,"visibility")}),(function(t){de(s,"visibility",t)})),ge(s,"left").isNone()&&ge(s,"top").isNone()&&ge(s,"right").isNone()&&ge(s,"bottom").isNone()&&ct(ge(s,"position"),"fixed")&&be(s,"position")}),s)},nf=hu({fields:Zl,name:"positioning",active:ec,apis:Object.freeze({__proto__:null,position:function(t,e,n,r,o){Ll(t,e,n,r,o,bt.none())},positionWithin:Ll,positionWithinBounds:ef,getMode:function(t,e,n){return e.useFixed()?"fixed":"absolute"},reset:function(t,e,n,r){var o=r.element;Ot(["position","left","right","top","bottom"],(function(t){return be(o,t)})),se(o,wc),n.clear(r.uid)}}),state:Object.freeze({__proto__:null,init:function(){var t={};return va({readState:function(){return t},clear:function(e){v(e)?delete t[e]:t={}},set:function(e,n){t[e]=n},get:function(e){return at(t,e)}})}})}),rf=function(t){go(t,Vi());var e=t.components();Ot(e,rf)},of=function(t){var e=t.components();Ot(e,of),go(t,Hi())},af=function(t,e,n){t.getSystem().addToWorld(e),n(t.element,e.element),bn(t.element)&&of(e),t.syncComponents()},uf=function(t,e,n){n(t,e.element);var r=Yt(e.element);Ot(r,(function(t){e.getByDom(t).each(of)}))},cf=Object.freeze({__proto__:null,cloak:jl,decloak:Bl,open:zs,openWhileCloaked:function(t,e,n,r,o){jl(t,e),zs(t,e,n,r),o(),Bl(t,e)},close:Ls,isOpen:js,isPartOf:function(t,e,n,r){return js(0,0,n)&&n.get().exists((function(n){return e.isPartOf(t,n,r)}))},getState:function(t,e,n){return n.get()},setContent:function(t,e,n,r){return n.get().map((function(){return Is(t,e,n,r)}))}}),sf=Object.freeze({__proto__:null,events:function(t,e){return Qi([Oo(Ii(),(function(n,r){Ls(n,t,e)}))])}}),lf=hu({fields:[$a("onOpen"),$a("onClose"),fr("isPartOf"),fr("getAttachPoint"),kr("cloakVisibilityAttr","data-precloak-visibility")],name:"sandboxing",active:sf,apis:cf,state:Object.freeze({__proto__:null,init:function(){var t=cc(),e=c("not-implemented");return va({readState:e,isOpen:t.isSet,clear:t.clear,set:t.set,get:t.get})}})}),ff=c("dismiss.popups"),df=c("reposition.popups"),mf=c("mouse.released"),pf=Zn([kr("isExtraPart",O),Cr("fireEventInstead",[kr("event",Ui())])]),hf=Zn([Cr("fireEventInstead",[kr("event",Wi())]),hr("doReposition")]),gf=Object.freeze({__proto__:null,onLoad:Ns,onUnload:Hs,setValue:function(t,e,n,r){e.store.manager.setValue(t,e,n,r)},getValue:function(t,e,n){return e.store.manager.getValue(t,e,n)},getState:function(t,e,n){return n}}),vf=Object.freeze({__proto__:null,events:function(t,e){var n=t.resetOnDom?[Zi((function(n,r){Ns(n,t,e)})),ta((function(n,r){Hs(n,t,e)}))]:[mu(t,e,Ns)];return Qi(n)}}),bf=Object.freeze({__proto__:null,memory:Vs,dataset:Us,manual:function(){return va({readState:a})},init:function(t){return t.store.manager.state(t)}}),yf=[yr("initialValue"),fr("getFallbackEntry"),fr("getDataKey"),fr("setValue"),Xa("manager",{setValue:Ws,getValue:function(t,e,n){var r=e.store,o=r.getDataKey(t);return n.lookup(o).getOrThunk((function(){return r.getFallbackEntry(o)}))},onLoad:function(t,e,n){e.store.initialValue.each((function(r){Ws(t,e,n,r)}))},onUnload:function(t,e,n){n.clear()},state:Us})],_f=[fr("getValue"),kr("setValue",a),yr("initialValue"),Xa("manager",{setValue:function(t,e,n,r){e.store.setValue(t,r),e.onSetValue(t,r)},getValue:function(t,e,n){return e.store.getValue(t)},onLoad:function(t,e,n){e.store.initialValue.each((function(n){e.store.setValue(t,n)}))},onUnload:a,state:ga.init})],wf=hu({fields:[Er("store",{mode:"memory"},sr("mode",{memory:[yr("initialValue"),Xa("manager",{setValue:function(t,e,n,r){n.set(r),e.onSetValue(t,r)},getValue:function(t,e,n){return n.get()},onLoad:function(t,e,n){e.store.initialValue.each((function(t){n.isNotSet()&&n.set(t)}))},onUnload:function(t,e,n){n.clear()},state:Vs})],manual:_f,dataset:yf})),$a("onSetValue"),kr("resetOnDom",!1)],name:"representing",active:vf,apis:gf,extra:{setValueFrom:function(t,e){var n=wf.getValue(e);wf.setValue(t,n)}},state:bf}),xf=$s,Of=Ks,Sf="placeholder",Cf=Lr([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),kf=function(t,e,n,r){return o=t,a=r,(qs(i=n)&&i.uiType===Sf?(l=i,f=a,(u=o).exists((function(t){return t!==l.owner}))?Cf.single(!0,c(l)):at(f,l.name).fold((function(){throw new Error("Unknown placeholder component: "+l.name+"\nKnown: ["+Ct(f)+"]\nNamespace: "+u.getOr("none")+"\nSpec: "+JSON.stringify(l,null,2))}),(function(t){return t.replace()}))):Cf.single(!1,c(i))).fold((function(o,i){var a=qs(n)?i(e,n.config,n.validated):i(e),u=W(at(a,"components").getOr([]),(function(n){return kf(t,e,n,r)}));return[k(k({},a),{components:u})]}),(function(t,r){if(qs(n)){var o=r(e,n.config,n.validated);return n.validated.preprocess.getOr(s)(o)}return r(e)}));var o,i,a,u,l,f},Ef=Cf.single,Mf=Cf.multiple,Tf=c(Sf),Df=Lr([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),Af=kr("factory",{sketch:s}),Pf=kr("schema",[]),Rf=fr("name"),If=io("pname","pname",Wn((function(t){return"<alloy."+Ro(t.name)+">"})),Jr()),zf=ao("schema",(function(){return[yr("preprocess")]})),Lf=kr("defaults",c({})),jf=kr("overrides",c({})),Bf=Xr([Af,Pf,Rf,If,Lf,jf]),Ff=Xr([Af,Pf,Rf,Lf,jf]),Nf=Xr([Af,Pf,Rf,If,Lf,jf]),Hf=Xr([Af,zf,Rf,fr("unit"),If,Lf,jf]),Vf=Js(Df.required,Bf),Uf=Js(Df.external,Ff),Wf=Js(Df.optional,Nf),$f=Js(Df.group,Hf),Gf=c("entirety"),Kf=Object.freeze({__proto__:null,required:Vf,external:Uf,optional:Wf,group:$f,asNamedPart:Xs,name:Ys,asCommon:function(t){return t.fold(s,s,s,s)},original:Gf}),qf=function(t,e){return{uiType:Tf(),owner:t,name:e}},Xf=Object.freeze({__proto__:null,generate:Zs,generateOne:tl,schemas:el,names:nl,substitutes:rl,components:ol,defaultUids:fl,defaultUidsSchema:dl,getAllParts:cl,getAllPartNames:sl,getPart:il,getPartOrDie:al,getParts:ul,getPartsOrDie:ll}),Yf=function(t){return Mt(t,"uid")?t:k(k({},t),{uid:fa("uid")})},Jf=Zn([fr("name"),fr("factory"),fr("configFields"),kr("apis",{}),kr("extraApis",{})]),Qf=Zn([fr("name"),fr("factory"),fr("configFields"),fr("partFields"),kr("apis",{}),kr("extraApis",{})]),Zf=Object.freeze({__proto__:null,getCurrent:function(t,e,n){return e.find(t)}}),td=hu({fields:[fr("find")],name:"composing",apis:Zf}),ed=["input","button","textarea","select"],nd=function(t,e,n){e.disableClass.each((function(e){$o(t.element,e)})),(yl(t,e)?function(t){oe(t.element,"disabled","disabled")}:function(t){oe(t.element,"aria-disabled","true")})(t),e.onDisabled(t)},rd=function(t,e,n){e.disableClass.each((function(e){Go(t.element,e)})),(yl(t,e)?function(t){se(t.element,"disabled")}:function(t){oe(t.element,"aria-disabled","false")})(t),e.onEnabled(t)},od=Object.freeze({__proto__:null,enable:rd,disable:nd,isDisabled:_l,onLoad:bl,set:function(t,e,n,r){(r?nd:rd)(t,e)}}),id=Object.freeze({__proto__:null,exhibit:function(t,e){return No({classes:e.disabled()?e.disableClass.toArray():[]})},events:function(t,e){return Qi([wo(Di(),(function(e,n){return _l(e,t)})),mu(t,e,bl)])}}),ad=hu({fields:[Pr("disabled",O),kr("useNative",!0),yr("disableClass"),$a("onDisabled"),$a("onEnabled")],name:"disabling",active:id,apis:od}),ud=Object.freeze({__proto__:null,dehighlightAll:function(t,e,n){return wl(t,e,0,[])},dehighlight:function(t,e,n,r){Fl(0,e,0,r)&&(Go(r.element,e.highlightClass),e.onDehighlight(t,r),go(r,Yi()))},highlight:xl,highlightFirst:function(t,e,n){Nl(t,e).each((function(n){xl(t,e,0,n)}))},highlightLast:function(t,e,n){Hl(t,e).each((function(n){xl(t,e,0,n)}))},highlightAt:function(t,e,n,r){var o,i,a;i=r,a=ss((o=t).element,"."+e.itemClass),bt.from(a[i]).fold((function(){return jn.error(new Error("No element found with index "+i))}),o.getSystem().getByDom).fold((function(t){throw t}),(function(n){xl(t,e,0,n)}))},highlightBy:function(t,e,n,r){H(Vl(t,e),r).each((function(n){xl(t,e,0,n)}))},isHighlighted:Fl,getHighlighted:function(t,e,n){return Da(t.element,"."+e.highlightClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},getFirst:Nl,getLast:Hl,getPrevious:function(t,e,n){return Ol(t,e,0,-1)},getNext:function(t,e,n){return Ol(t,e,0,1)},getCandidates:Vl}),cd=hu({fields:[fr("highlightClass"),fr("itemClass"),$a("onHighlight"),$a("onDehighlight")],name:"highlighting",apis:ud}),sd=[8],ld=[9],fd=[13],dd=[27],md=[32],pd=[37],hd=[38],gd=[39],vd=[40],bd=w(Dl);function yd(t,e,n,r,o){function i(t,e,n,r,o){var i=n(t,e,r,o),a=e.event;return H(i,(function(t){return t.matches(a)})).map((function(t){return t.classification})).bind((function(n){return n(t,e,r,o)}))}var a={schema:function(){return t.concat([kr("focusManager",Il()),Er("focusInside","onFocus",or((function(t){return xt(["onFocus","onEnterOrSpace","onApi"],t)?jn.value(t):jn.error("Invalid value for focusInside")}))),Xa("handler",a),Xa("state",e),Xa("sendFocusIn",o)])},processKey:i,toEvents:function(t,e){var a=t.focusInside!==$l.OnFocusMode?bt.none():o(t).map((function(n){return Oo(ki(),(function(r,o){n(r,t,e),o.stop()}))})),u=[Oo(gi(),(function(r,a){i(r,a,n,t,e).fold((function(){var n=r,i=a,u=Ml(md.concat(fd))(i.event);t.focusInside===$l.OnEnterOrSpaceMode&&u&&mo(n,i)&&o(t).each((function(r){r(n,t,e),i.stop()}))}),(function(t){a.stop()}))})),Oo(vi(),(function(n,o){i(n,o,r,t,e).each((function(t){o.stop()}))}))];return Qi(a.toArray().concat(u))}};return a}function _d(t){function e(t,e){return 0<we(t.visibilitySelector.bind((function(t){return Aa(e,t)})).getOr(e))}function n(t,n,r){var o=n,i=B(ss(t.element,o.selector),(function(t){return e(o,t)}));bt.from(i[o.firstTabstop]).each((function(e){n.focusManager.set(t,e)}))}function r(t,n,r,o){var i,a=ss(t.element,r.selector);return(i=r).focusManager.get(t).bind((function(t){return Aa(t,i.selector)})).bind((function(n){return V(a,_(Vt,n)).bind((function(n){return i=t,u=r,o(a,n,(function(t){return e(n=u,r=t)&&n.useTabstopAt(r);var n,r})).fold((function(){return u.cyclic?bt.some(!0):bt.none()}),(function(t){return u.focusManager.set(i,t),bt.some(!0)}));var i,u}))}))}var o=[yr("onEscape"),yr("onEnter"),kr("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),kr("firstTabstop",0),kr("useTabstopAt",S),yr("visibilitySelector")].concat([t]),i=c([Pl(Tl([Dl,Ml(ld)]),(function(t,e,n){return r(t,0,n,n.cyclic?Sl:Cl)})),Pl(Ml(ld),(function(t,e,n){return r(t,0,n,n.cyclic?kl:El)})),Pl(Ml(dd),(function(t,e,n){return n.onEscape.bind((function(n){return n(t,e)}))})),Pl(Tl([bd,Ml(fd)]),(function(t,e,n){return n.onEnter.bind((function(n){return n(t,e)}))}))]),a=c([]);return yd(o,ga.init,i,a,(function(){return bt.some(n)}))}function wd(t,e,n){return vl(n)&&Ml(md)(e.event)?bt.none():(yo(t,n,Di()),bt.some(!0))}function xd(t,e){return bt.some(!0)}function Od(t,e,n){return n.execute(t,e,t.element)}function Sd(){var t=cc();return va({readState:function(){return t.get().map((function(t){return{numRows:String(t.numRows),numColumns:String(t.numColumns)}})).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(e,n){t.set({numRows:e,numColumns:n})},getNumRows:function(){return t.get().map((function(t){return t.numRows}))},getNumColumns:function(){return t.get().map((function(t){return t.numColumns}))}})}function Cd(t){return function(e,n,r,o){var i=t(e.element);return Gm(i,e,n,r,o)}}function kd(t,e){return Cd(vc(t,e))}function Ed(t,e){return Cd(vc(e,t))}function Md(t){return function(e,n,r,o){return Gm(t,e,n,r,o)}}function Td(t){return!((e=t.dom).offsetWidth<=0&&e.offsetHeight<=0);var e}function Dd(t,e,n){var r,o=B(ss(t,n),Td);return V(r=o,(function(t){return Vt(t,e)})).map((function(t){return{index:t,candidates:r}}))}function Ad(t,e){return V(t,(function(t){return Vt(e,t)}))}function Pd(t,e,n,r){return r(Math.floor(e/n),e%n).bind((function(e){var r=e.row*n+e.column;return 0<=r&&r<t.length?bt.some(t[r]):bt.none()}))}function Rd(t,e,n,r,o){return Pd(t,e,r,(function(e,i){var a=e===n-1?t.length-e*r:r,u=Qa(i,o,0,a-1);return bt.some({row:e,column:u})}))}function Id(t,e,n,r,o){return Pd(t,e,r,(function(e,i){var a=Qa(e,o,0,n-1),u=a===n-1?t.length-a*r:r,c=Fu(i,0,u-1);return bt.some({row:a,column:c})}))}function zd(t,e,n){Da(t.element,e.selector).each((function(n){e.focusManager.set(t,n)}))}function Ld(t){return function(e,n,r,o){return Dd(e,n,r.selector).bind((function(e){return t(e.candidates,e.index,o.getNumRows().getOr(r.initSize.numRows),o.getNumColumns().getOr(r.initSize.numColumns))}))}}function jd(t,e,n){return n.captureTab?bt.some(!0):bt.none()}function Bd(t,e,n,r){var o=function(t,e,n){var i,a=Qa(e,r,0,n.length-1);return a===t?bt.none():"button"===It(i=n[a])&&"disabled"===ae(i,"disabled")?o(t,a,n):bt.from(n[a])};return Dd(t,n,e).bind((function(t){var e=t.index,n=t.candidates;return o(e,e,n)}))}function Fd(t,e,n){return(r=n).focusManager.get(t).bind((function(t){return Aa(t,r.selector)})).bind((function(r){return n.execute(t,e,r)}));var r}function Nd(t,e,n){e.getInitial(t).orThunk((function(){return Da(t.element,e.selector)})).each((function(n){e.focusManager.set(t,n)}))}function Hd(t,e,n){return Bd(t,n.selector,e,-1)}function Vd(t,e,n){return Bd(t,n.selector,e,1)}function Ud(t){return function(e,n,r,o){return t(e,n,r,o).bind((function(){return r.executeOnMove?Fd(e,n,r):bt.some(!0)}))}}function Wd(t,e,n){return n.onEscape(t,e)}function $d(t,e,n){return bt.from(t[e]).bind((function(t){return bt.from(t[n]).map((function(t){return{rowIndex:e,columnIndex:n,cell:t}}))}))}function Gd(t,e,n,r){return $d(t,e,Qa(n,r,0,t[e].length-1))}function Kd(t,e,n,r){var o=Qa(n,r,0,t.length-1),i=t[o].length;return $d(t,o,Fu(e,0,i-1))}function qd(t,e,n,r){var o=t[e].length;return $d(t,e,Fu(n+r,0,o-1))}function Xd(t,e,n,r){var o=Fu(n+r,0,t.length-1),i=t[o].length;return $d(t,o,Fu(e,0,i-1))}function Yd(t,e,n){e.previousSelector(t).orThunk((function(){var n=e.selectors;return Da(t.element,n.cell)})).each((function(n){e.focusManager.set(t,n)}))}function Jd(t,e){return function(n,r,o){var i=o.cycles?t:e;return Aa(r,o.selectors.row).bind((function(t){return Ad(ss(t,o.selectors.cell),r).bind((function(e){var r=ss(n,o.selectors.row);return Ad(r,t).bind((function(t){var n,a=(n=o,L(r,(function(t){return ss(t,n.selectors.cell)})));return i(a,t,e).map((function(t){return t.cell}))}))}))}))}}function Qd(t,e,n){return n.focusManager.get(t).bind((function(r){return n.execute(t,e,r)}))}function Zd(t,e,n){Da(t.element,e.selector).each((function(n){e.focusManager.set(t,n)}))}function tm(t,e,n){return Bd(t,n.selector,e,-1)}function em(t,e,n){return Bd(t,n.selector,e,1)}function nm(t,e,n,r){var o=t.getSystem().build(r);af(t,o,n)}function rm(t,e,n,r){H(kp(t),(function(t){return Vt(r.element,t.element)})).each(Ds)}function om(t,e,n,r,o){var i=kp(t);return bt.from(i[r]).map((function(e){return rm(t,0,0,e),o.each((function(e){nm(t,0,(function(t,e){var n,o=e;Jt(n=t,r).fold((function(){Mn(n,o)}),(function(t){Te(t,o)}))}),e)})),e}))}function im(t,e){var n,r;return{key:t,value:{config:{},me:(n=t,r=Qi(e),hu({fields:[fr("enabled")],name:n,active:{events:c(r)}})),configAsRaw:c({}),initialConfig:{},state:ga}}}function am(t,e){e.ignore||(bu(t.element),e.onFocus(t))}function um(t,e,n){var r=e.aria;r.update(t,r,n.get())}function cm(t,e,n){e.toggleClass.each((function(e){(n.get()?$o:Go)(t.element,e)}))}function sm(t,e,n){Fm(t,e,n,!n.get())}function lm(t,e,n){n.set(!0),cm(t,e,n),um(t,e,n)}function fm(t,e,n){n.set(!1),cm(t,e,n),um(t,e,n)}function dm(t,e,n){Fm(t,e,n,e.selected)}function mm(){function t(t,e){e.stop(),bo(t)}return[Oo(_i(),t),Oo(Pi(),t),Mo(ii()),Mo(si())]}function pm(t){return Qi(U([t.map((function(t){return na((function(e,n){t(e),n.stop()}))})).toArray(),mm()]))}function hm(t){(wu(t.element).isNone()||Dp.isFocused(t))&&(Dp.isFocused(t)||Dp.focus(t),vo(t,Ip,{item:t}))}function gm(t){vo(t,zp,{item:t})}function vm(t,e){return t.x+t.width/2-e.width/2}function bm(t,e){return t.x+t.width-e.width}function ym(t,e){return t.y+t.height-e.height}function _m(t,e){return t.y+t.height/2-e.height/2}function wm(t,e,n){return Ja(bm(t,e),ym(t,e),n.insetSouthwest(),Iu(),"southwest",Za(t,{right:0,bottom:3}),Qp)}function xm(t,e,n){return Ja(t.x,ym(t,e),n.insetSoutheast(),Ru(),"southeast",Za(t,{left:1,bottom:3}),Qp)}function Om(t,e,n){return Ja(bm(t,e),t.y,n.insetNorthwest(),Pu(),"northwest",Za(t,{right:0,top:2}),Qp)}function Sm(t,e,n){return Ja(t.x,t.y,n.insetNortheast(),Au(),"northeast",Za(t,{left:1,top:2}),Qp)}function Cm(t,e,n){return Ja(bm(t,e),_m(t,e),n.insetEast(),Bu(),"east",Za(t,{right:0}),Qp)}function km(t,e,n){return Ja(t.x,_m(t,e),n.insetWest(),ju(),"west",Za(t,{left:1}),Qp)}function Em(t){switch(t){case"north":return Zp;case"northeast":return Sm;case"northwest":return Om;case"south":return th;case"southeast":return xm;case"southwest":return wm;case"east":return Cm;case"west":return km}}function Mm(t,e,n,r,o){return oc(r).map(Em).getOr(Zp)(t,e,n,r,o)}function Tm(t){switch(t){case"north":return th;case"northeast":return xm;case"northwest":return wm;case"south":return Zp;case"southeast":return Sm;case"southwest":return Om;case"east":return km;case"west":return Cm}}function Dm(t,e,n,r,o){return oc(r).map(Tm).getOr(Zp)(t,e,n,r,o)}function Am(t){var e=void 0!==t.uid&&ut(t,"uid")?t.uid:fa("memento");return{get:function(t){return t.getSystem().getByUid(e).getOrDie()},getOpt:function(t){return t.getSystem().getByUid(e).toOptional()},asSpec:function(){return k(k({},t),{uid:e})}}}function Pm(t){return function(){return at(t,ih).getOr("!not found!")}}function Rm(t,e){var n,r=t.toLowerCase();if(rh.isRtl()){var o=At(n=r,"-rtl")?n:n+"-rtl";return Mt(e,o)?o:r}return r}function Im(t,e){return at(e,Rm(t,e))}function zm(t,e){var n=e();return Im(t,n).getOrThunk(Pm(n))}function Lm(){return im("add-focusable",[Zi((function(t){var e,n;e=t.element,n=function(t){return Nt(t,"svg")},H(e.dom.childNodes,(function(t){return n(Rt.fromDom(t))})).map(Rt.fromDom).each((function(t){return oe(t,"focusable","false")}))}))])}function jm(t,e,n,r){var o,i,a,u=(a=e,rh.isRtl()&&Mt(oh,a)?["tox-icon--flip"]:[]),c=at(n,Rm(e,n)).or(r).getOrThunk(Pm(n));return{dom:{tag:t.tag,attributes:null!==(o=t.attributes)&&void 0!==o?o:{},classes:t.classes.concat(u),innerHtml:c},behaviours:Yu(M(M([],null!==(i=t.behaviours)&&void 0!==i?i:[],!0),[Lm()],!1))}}function Bm(t,e,n,r){return void 0===r&&(r=bt.none()),jm(e,t,n(),r)}function Fm(t,e,n,r){(r?lm:fm)(t,e,n)}function Nm(t,e,n){oe(t.element,"aria-expanded",n)}function Hm(t){return"prepared"===t.type?bt.some(t.menu):bt.none()}(Gl=$l=$l||{}).OnFocusMode="onFocus",Gl.OnEnterOrSpaceMode="onEnterOrSpace",Gl.OnApiMode="onApi";var Vm=_d(ao("cyclic",O)),Um=_d(ao("cyclic",S)),Wm=yd([kr("execute",wd),kr("useSpace",!1),kr("useEnter",!0),kr("useControlEnter",!1),kr("useDown",!1)],ga.init,(function(t,e,n,r){var o=n.useSpace&&!vl(t.element)?md:[],i=n.useEnter?fd:[],a=n.useDown?vd:[];return[Pl(Ml(o.concat(i).concat(a)),Od)].concat(n.useControlEnter?[Pl(Tl([Al,Ml(fd)]),Od)]:[])}),(function(t,e,n,r){return n.useSpace&&!vl(t.element)?[Pl(Ml(md),xd)]:[]}),(function(){return bt.none()})),$m=Object.freeze({__proto__:null,flatgrid:Sd,init:function(t){return t.state(t)}}),Gm=function(t,e,n,r,o){return r.focusManager.get(e).bind((function(n){return t(e.element,n,r,o)})).map((function(t){return r.focusManager.set(e,t),!0}))},Km=Md,qm=Md,Xm=Md,Ym=Ld((function(t,e,n,r){return Rd(t,e,n,r,-1)})),Jm=Ld((function(t,e,n,r){return Rd(t,e,n,r,1)})),Qm=Ld((function(t,e,n,r){return Id(t,e,n,r,-1)})),Zm=Ld((function(t,e,n,r){return Id(t,e,n,r,1)})),tp=yd([fr("selector"),kr("execute",wd),Ga("onEscape"),kr("captureTab",!1),Tu()],Sd,c([Pl(Ml(pd),kd(Ym,Jm)),Pl(Ml(gd),Ed(Ym,Jm)),Pl(Ml(hd),Km(Qm)),Pl(Ml(vd),qm(Zm)),Pl(Tl([Dl,Ml(ld)]),jd),Pl(Tl([bd,Ml(ld)]),jd),Pl(Ml(dd),(function(t,e,n){return n.onEscape(t,e)})),Pl(Ml(md.concat(fd)),(function(t,e,n,r){return(o=n).focusManager.get(t).bind((function(t){return Aa(t,o.selector)})).bind((function(r){return n.execute(t,e,r)}));var o}))]),c([Pl(Ml(md),xd)]),(function(){return bt.some(zd)})),ep=[fr("selector"),kr("getInitial",bt.none),kr("execute",wd),Ga("onEscape"),kr("executeOnMove",!1),kr("allowVertical",!0)],np=c([Pl(Ml(md),xd)]),rp=yd(ep,ga.init,(function(t,e,n,r){var o=pd.concat(n.allowVertical?hd:[]),i=gd.concat(n.allowVertical?vd:[]);return[Pl(Ml(o),Ud(kd(Hd,Vd))),Pl(Ml(i),Ud(Ed(Hd,Vd))),Pl(Ml(fd),Fd),Pl(Ml(md),Fd),Pl(Ml(dd),Wd)]}),np,(function(){return bt.some(Nd)})),op=[gr("selectors",[fr("row"),fr("cell")]),kr("cycles",!0),kr("previousSelector",bt.none),kr("execute",wd)],ip=Jd((function(t,e,n){return Gd(t,e,n,-1)}),(function(t,e,n){return qd(t,e,n,-1)})),ap=Jd((function(t,e,n){return Gd(t,e,n,1)}),(function(t,e,n){return qd(t,e,n,1)})),up=Jd((function(t,e,n){return Kd(t,n,e,-1)}),(function(t,e,n){return Xd(t,n,e,-1)})),cp=Jd((function(t,e,n){return Kd(t,n,e,1)}),(function(t,e,n){return Xd(t,n,e,1)})),sp=c([Pl(Ml(pd),kd(ip,ap)),Pl(Ml(gd),Ed(ip,ap)),Pl(Ml(hd),Km(up)),Pl(Ml(vd),qm(cp)),Pl(Ml(md.concat(fd)),(function(t,e,n){return wu(t.element).bind((function(r){return n.execute(t,e,r)}))}))]),lp=c([Pl(Ml(md),xd)]),fp=yd(op,ga.init,sp,lp,(function(){return bt.some(Yd)})),dp=[fr("selector"),kr("execute",wd),kr("moveOnTab",!1)],mp=c([Pl(Ml(hd),Xm(tm)),Pl(Ml(vd),Xm(em)),Pl(Tl([Dl,Ml(ld)]),(function(t,e,n,r){return n.moveOnTab?Xm(tm)(t,e,n,r):bt.none()})),Pl(Tl([bd,Ml(ld)]),(function(t,e,n,r){return n.moveOnTab?Xm(em)(t,e,n,r):bt.none()})),Pl(Ml(fd),Qd),Pl(Ml(md),Qd)]),pp=c([Pl(Ml(md),xd)]),hp=yd(dp,ga.init,mp,pp,(function(){return bt.some(Zd)})),gp=yd([Ga("onSpace"),Ga("onEnter"),Ga("onShiftEnter"),Ga("onLeft"),Ga("onRight"),Ga("onTab"),Ga("onShiftTab"),Ga("onUp"),Ga("onDown"),Ga("onEscape"),kr("stopSpaceKeyup",!1),yr("focusIn")],ga.init,(function(t,e,n){return[Pl(Ml(md),n.onSpace),Pl(Tl([bd,Ml(fd)]),n.onEnter),Pl(Tl([Dl,Ml(fd)]),n.onShiftEnter),Pl(Tl([Dl,Ml(ld)]),n.onShiftTab),Pl(Tl([bd,Ml(ld)]),n.onTab),Pl(Ml(hd),n.onUp),Pl(Ml(vd),n.onDown),Pl(Ml(pd),n.onLeft),Pl(Ml(gd),n.onRight),Pl(Ml(md),n.onSpace),Pl(Ml(dd),n.onEscape)]}),(function(t,e,n){return n.stopSpaceKeyup?[Pl(Ml(md),xd)]:[]}),(function(t){return t.focusIn})),vp=Vm.schema(),bp=Um.schema(),yp=rp.schema(),_p=tp.schema(),wp=fp.schema(),xp=Wm.schema(),Op=hp.schema(),Sp=gp.schema(),Cp=gu({branchKey:"mode",branches:Object.freeze({__proto__:null,acyclic:vp,cyclic:bp,flow:yp,flatgrid:_p,matrix:wp,execution:xp,menu:Op,special:Sp}),name:"keying",active:{events:function(t,e){return t.handler.toEvents(t,e)}},apis:{focusIn:function(t,e,n){e.sendFocusIn(e).fold((function(){t.getSystem().triggerFocus(t.element,t.element)}),(function(r){r(t,e,n)}))},setGridSize:function(t,e,n,r,o){ut(n,"setGridSize")&&n.setGridSize(r,o)}},state:$m}),kp=function(t,e){return t.components()},Ep=hu({fields:[],name:"replacing",apis:Object.freeze({__proto__:null,append:function(t,e,n,r){nm(t,0,Mn,r)},prepend:function(t,e,n,r){nm(t,0,Ae,r)},remove:rm,replaceAt:om,replaceBy:function(t,e,n,r,o){return V(kp(t),r).bind((function(e){return om(t,0,0,e,o)}))},set:function(t,e,n,r){xu((function(){var e=L(r,t.getSystem().build);Es(t,e)}),t.element)},contents:kp})}),Mp=Object.freeze({__proto__:null,focus:am,blur:function(t,e){e.ignore||t.element.dom.blur()},isFocused:function(t){return yu(t.element)}}),Tp=Object.freeze({__proto__:null,exhibit:function(t,e){return No(e.ignore?{}:{attributes:{tabindex:"-1"}})},events:function(t){return Qi([Oo(ki(),(function(e,n){am(e,t),n.stop()}))].concat(t.stopMousedown?[Oo(si(),(function(t,e){e.event.prevent()}))]:[]))}}),Dp=hu({fields:[$a("onFocus"),kr("stopMousedown",!1),kr("ignore",!1)],name:"focusing",active:Tp,apis:Mp}),Ap=Object.freeze({__proto__:null,onLoad:dm,toggle:sm,isOn:function(t,e,n){return n.get()},on:lm,off:fm,set:Fm}),Pp=Object.freeze({__proto__:null,exhibit:function(){return No({})},events:function(t,e){var n,r,o,i=(n=t,r=e,o=sm,na((function(t){o(t,n,r)}))),a=mu(t,e,dm);return Qi(U([t.toggleOnExecute?[i]:[],[a]]))}}),Rp=hu({fields:[kr("selected",!1),yr("toggleClass"),kr("toggleOnExecute",!0),Er("aria",{mode:"none"},sr("mode",{pressed:[kr("syncWithExpanded",!1),Xa("update",(function(t,e,n){oe(t.element,"aria-pressed",n),e.syncWithExpanded&&Nm(t,0,n)}))],checked:[Xa("update",(function(t,e,n){oe(t.element,"aria-checked",n)}))],expanded:[Xa("update",Nm)],selected:[Xa("update",(function(t,e,n){oe(t.element,"aria-selected",n)}))],none:[Xa("update",a)]}))],name:"toggling",active:Pp,apis:Ap,state:{init:function(){var t=zr(!1);return{get:function(){return t.get()},set:function(e){return t.set(e)},clear:function(){return t.set(!1)},readState:function(){return t.get()}}}}}),Ip="alloy.item-hover",zp="alloy.item-focus",Lp=c(Ip),jp=c(zp),Bp=[fr("data"),fr("components"),fr("dom"),kr("hasSubmenu",!1),yr("toggling"),xf("itemBehaviours",[Rp,Dp,Cp,wf]),kr("ignoreFocus",!1),kr("domModification",{}),Xa("builder",(function(t){return{dom:t.dom,domModification:k(k({},t.domModification),{attributes:k(k(k({role:t.toggling.isSome()?"menuitemcheckbox":"menuitem"},t.domModification.attributes),{"aria-haspopup":t.hasSubmenu}),t.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:Of(t.itemBehaviours,[t.toggling.fold(Rp.revoke,(function(t){return Rp.config(k({aria:{mode:"checked"}},t))})),Dp.config({ignore:t.ignoreFocus,stopMousedown:t.ignoreFocus,onFocus:function(t){gm(t)}}),Cp.config({mode:"execution"}),wf.config({store:{mode:"memory",initialValue:t.data}}),im("item-type-events",M(M([],mm(),!0),[Oo(mi(),hm),Oo(Ai(),Dp.focus)],!1))]),components:t.components,eventOrder:t.eventOrder}})),kr("eventOrder",{})],Fp=[fr("dom"),fr("components"),Xa("builder",(function(t){return{dom:t.dom,components:t.components,events:Qi([Oo(Ai(),(function(t,e){e.stop()}))])}}))],Np=c("item-widget"),Hp=c([Vf({name:"widget",overrides:function(t){return{behaviours:Yu([wf.config({store:{mode:"manual",getValue:function(e){return t.data},setValue:a}})])}}})]),Vp=sr("type",{widget:[fr("uid"),fr("data"),fr("components"),fr("dom"),kr("autofocus",!1),kr("ignoreFocus",!1),xf("widgetBehaviours",[wf,Dp,Cp]),kr("domModification",{}),dl(Hp()),Xa("builder",(function(t){function e(e){return il(e,t,"widget").map((function(t){return Cp.focusIn(t),t}))}function n(e,n){return vl(n.event.target)||t.autofocus&&n.setSource(e.element),bt.none()}var r=rl(Np(),t,Hp()),o=ol(Np(),t,r.internals());return{dom:t.dom,components:o,domModification:t.domModification,events:Qi([na((function(t,n){e(t).each((function(t){n.stop()}))})),Oo(mi(),hm),Oo(Ai(),(function(n,r){t.autofocus?e(n):Dp.focus(n)}))]),behaviours:Of(t.widgetBehaviours,[wf.config({store:{mode:"memory",initialValue:t.data}}),Dp.config({ignore:t.ignoreFocus,onFocus:function(t){gm(t)}}),Cp.config({mode:"special",focusIn:t.autofocus?function(t){e(t)}:Zu(),onLeft:n,onRight:n,onEscape:function(e,n){return Dp.isFocused(e)||t.autofocus?(t.autofocus&&n.setSource(e.element),bt.none()):(Dp.focus(e),bt.some(!0))}})])}}))],item:Bp,separator:Fp}),Up=c([$f({factory:{sketch:function(t){var e=cr("menu.spec item",Vp,t);return e.builder(e)}},name:"items",unit:"item",defaults:function(t,e){return Mt(e,"uid")?e:k(k({},e),{uid:fa("item")})},overrides:function(t,e){return{type:e.type,ignoreFocus:t.fakeFocus,domModification:{classes:[t.markers.item]}}}})]),Wp=c([fr("value"),fr("items"),fr("dom"),fr("components"),kr("eventOrder",{}),$s("menuBehaviours",[cd,wf,td,Cp]),Er("movement",{mode:"menu",moveOnTab:!0},sr("mode",{grid:[Tu(),Xa("config",(function(t,e){return{mode:"flatgrid",selector:"."+t.markers.item,initSize:{numColumns:e.initSize.numColumns,numRows:e.initSize.numRows},focusManager:t.focusManager}}))],matrix:[Xa("config",(function(t,e){return{mode:"matrix",selectors:{row:e.rowSelector,cell:"."+t.markers.item},focusManager:t.focusManager}})),fr("rowSelector")],menu:[kr("moveOnTab",!0),Xa("config",(function(t,e){return{mode:"menu",selector:"."+t.markers.item,moveOnTab:e.moveOnTab,focusManager:t.focusManager}}))]})),dr("markers",Mu()),kr("fakeFocus",!1),kr("focusManager",Il()),$a("onHighlight")]),$p=c("alloy.menu-focus"),Gp=gl({name:"Menu",configFields:Wp(),partFields:Up(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:Ks(t.menuBehaviours,[cd.config({highlightClass:t.markers.selectedItem,itemClass:t.markers.item,onHighlight:t.onHighlight}),wf.config({store:{mode:"memory",initialValue:t.value}}),td.config({find:bt.some}),Cp.config(t.movement.config(t,t.movement))]),events:Qi([Oo(jp(),(function(t,e){var n=e.event;t.getSystem().getByDom(n.target).each((function(n){cd.highlight(t,n),e.stop(),vo(t,$p(),{menu:t,item:n})}))})),Oo(Lp(),(function(t,e){var n=e.event.item;cd.highlight(t,n)}))]),components:e,eventOrder:t.eventOrder,domModification:{attributes:{role:"menu"}}}}}),Kp=function(t,e,n,r){return at(n,r).bind((function(r){return at(t,r).bind((function(r){var o=Kp(t,e,n,r);return bt.some([r].concat(o))}))})).getOr([])},qp=Hm,Xp=c("collapse-item"),Yp=hl({name:"TieredMenu",configFields:[qa("onExecute"),qa("onEscape"),Ka("onOpenMenu"),Ka("onOpenSubmenu"),$a("onRepositionMenu"),$a("onCollapseMenu"),kr("highlightImmediately",!0),gr("data",[fr("primary"),fr("menus"),fr("expansions")]),kr("fakeFocus",!1),$a("onHighlight"),$a("onHover"),Va(),fr("dom"),kr("navigateOnHover",!0),kr("stayInDom",!1),$s("tmenuBehaviours",[Cp,cd,td,Ep]),kr("eventOrder",{})],apis:{collapseMenu:function(t,e){t.collapseMenu(e)},highlightPrimary:function(t,e){t.highlightPrimary(e)},repositionMenus:function(t,e){t.repositionMenus(e)}},factory:function(t,e){function n(t){return wf.getValue(t).value}function r(t,e){cd.highlight(t,e),cd.getHighlighted(e).orThunk((function(){return cd.getFirst(e)})).each((function(e){yo(t,e.element,Ai())}))}function o(t,e){return st(L(e,(function(e){return t.lookupMenu(e).bind((function(t){return"prepared"===t.type?bt.some(t.menu):bt.none()}))})))}function i(e,n,r){var i=o(n,n.otherMenus(r));Ot(i,(function(n){Xo(n.element,[t.markers.backgroundMenu]),t.stayInDom||Ep.remove(e,n)}))}function u(e,r){var o;et((o=e,f.get().getOrThunk((function(){var e={},r=B(ss(o.element,"."+t.markers.item),(function(t){return"true"===ae(t,"aria-haspopup")}));return Ot(r,(function(t){o.getSystem().getByDom(t).each((function(t){var r=n(t);e[r]=t}))})),f.set(e),e}))),(function(t,e){var n=xt(r,e);oe(t.element,"aria-expanded",n)}))}function c(e,n,a){return bt.from(a[0]).bind((function(u){return n.lookupMenu(u).bind((function(u){if("notbuilt"===u.type)return bt.none();var c=u.menu,s=o(n,a.slice(1));return Ot(s,(function(e){$o(e.element,t.markers.backgroundMenu)})),bn(c.element)||Ep.append(e,Sa(c)),Xo(c.element,[t.markers.backgroundMenu]),r(e,c),i(e,n,a),bt.some(c)}))}))}var s,l,f=cc(),d=function(){function t(t){return u(t).bind(Hm)}function e(t){return at(n.get(),t)}var n=zr({}),r=zr({}),o=zr({}),i=cc(),a=zr({}),u=function(t){return at(r.get(),t)};return{setMenuBuilt:function(t,e){var n;r.set(k(k({},r.get()),((n={})[t]={type:"prepared",menu:e},n)))},setContents:function(t,e,u,c){i.set(t),n.set(u),r.set(e),a.set(c);var s=function(t,e){var n={};et(t,(function(t,e){Ot(t,(function(t){n[t]=e}))}));var r=e,o=Et(e,(function(t,e){return{k:t,v:e}})),i=nt(o,(function(t,e){return[e].concat(Kp(n,r,o,e))}));return nt(n,(function(t){return at(i,t).getOr([t])}))}(c,u);o.set(s)},expand:function(t){return at(n.get(),t).map((function(e){var n=at(o.get(),t).getOr([]);return[e].concat(n)}))},refresh:function(t){return at(o.get(),t)},collapse:function(t){return at(o.get(),t).bind((function(t){return 1<t.length?bt.some(t.slice(1)):bt.none()}))},lookupMenu:u,lookupItem:e,otherMenus:function(t){var e=a.get();return K(Ct(e),t)},getPrimary:function(){return i.get().bind(t)},getMenus:function(){return r.get()},clear:function(){n.set({}),r.set({}),o.set({}),i.clear()},isClear:function(){return i.get().isNone()},getTriggeringPath:function(r,a){var u=B(e(r).toArray(),(function(e){return t(e).isSome()}));return at(o.get(),r).bind((function(e){var r=G(u.concat(e));return function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];if(!r.isSome())return bt.none();e.push(r.getOrDie())}return bt.some(e)}(W(r,(function(e,o){return u=e,c=a,s=r.slice(0,o+1),t(u).bind((function(t){return e=u,ot(n.get(),(function(t,n){return t===e})).bind((function(e){return c(e).map((function(e){return{triggeredMenu:t,triggeringItem:e,triggeringPath:s}}))}));var e})).fold((function(){return ct(i.get(),e)?[]:[bt.none()]}),(function(t){return[bt.some(t)]}));var u,c,s})))}))}}}();function m(e,r,o){if(void 0===o&&(o=s.HighlightSubmenu),r.hasConfigured(ad)&&ad.isDisabled(r))return bt.some(r);var i=n(r);return d.expand(i).bind((function(n){return u(e,n),bt.from(n[0]).bind((function(i){return d.lookupMenu(i).bind((function(a){var u=function(t,e,n){if("notbuilt"!==n.type)return n.menu;var r=t.getSystem().build(n.nbMenu());return d.setMenuBuilt(e,r),r}(e,i,a);return bn(u.element)||Ep.append(e,Sa(u)),t.onOpenSubmenu(e,r,u,G(n)),o===s.HighlightSubmenu?(cd.highlightFirst(u),c(e,d,n)):(cd.dehighlightAll(u),bt.some(r))}))}))}))}function p(e,r){var o=n(r);return d.collapse(o).bind((function(n){return u(e,n),c(e,d,n).map((function(n){return t.onCollapseMenu(e,r,n),n}))}))}function h(e){return function(n,r){return Aa(r.getSource(),"."+t.markers.item).bind((function(t){return n.getSystem().getByDom(t).toOptional().bind((function(t){return e(n,t).map(S)}))}))}}function g(t){return cd.getHighlighted(t).bind(cd.getHighlighted)}(l=s={})[l.HighlightSubmenu=0]="HighlightSubmenu",l[l.HighlightParent=1]="HighlightParent";var v=Qi([Oo($p(),(function(t,e){var r=e.event.item;d.lookupItem(n(r)).each((function(){var r=e.event.menu;cd.highlight(t,r);var o=n(e.event.item);d.refresh(o).each((function(e){return i(t,d,e)}))}))})),na((function(e,r){var o=r.event.target;e.getSystem().getByDom(o).each((function(r){0===n(r).indexOf("collapse-item")&&p(e,r),m(e,r,s.HighlightSubmenu).fold((function(){t.onExecute(e,r)}),a)}))})),Zi((function(e,n){(function(e){var n,r,o=(n=e,r=t.data.primary,nt(t.data.menus,(function(e,o){function i(){return Gp.sketch(k(k({},e),{value:o,markers:t.markers,fakeFocus:t.fakeFocus,onHighlight:t.onHighlight,focusManager:(t.fakeFocus?zl:Il)()}))}return o===r?{type:"prepared",menu:n.getSystem().build(i())}:{type:"notbuilt",nbMenu:i}}))),i=nt(t.data.menus,(function(t,e){return W(t.items,(function(t){return"separator"===t.type?[]:[t.data.value]}))}));return d.setContents(t.data.primary,o,t.data.expansions,i),d.getPrimary()})(e).each((function(n){Ep.append(e,Sa(n)),t.onOpenMenu(e,n),t.highlightImmediately&&r(e,n)}))}))].concat(t.navigateOnHover?[Oo(Lp(),(function(e,r){var o=r.event.item,i=e,a=n(o);d.refresh(a).bind((function(t){return u(i,t),c(i,d,t)})),m(e,o,s.HighlightParent),t.onHover(e,o)}))]:[])),b={collapseMenu:function(t){g(t).each((function(e){p(t,e)}))},highlightPrimary:function(t){d.getPrimary().each((function(e){r(t,e)}))},repositionMenus:function(e){d.getPrimary().bind((function(t){return g(e).bind((function(t){var e=n(t),r=st(L(it(d.getMenus()),qp));return d.getTriggeringPath(e,(function(t){return e=t,tt(r,(function(t){return t.getSystem().isConnected()?H(cd.getCandidates(t),(function(t){return n(t)===e})):bt.none()}));var e}))})).map((function(e){return{primary:t,triggeringPath:e}}))})).fold((function(){bt.from(e.components()[0]).filter((function(t){return"menu"===ae(t.element,"role")})).each((function(n){t.onRepositionMenu(e,n,[])}))}),(function(n){var r=n.primary,o=n.triggeringPath;t.onRepositionMenu(e,r,o)}))}};return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:Ks(t.tmenuBehaviours,[Cp.config({mode:"special",onRight:h((function(t,e){return vl(e.element)?bt.none():m(t,e,s.HighlightSubmenu)})),onLeft:h((function(t,e){return vl(e.element)?bt.none():p(t,e)})),onEscape:h((function(e,n){return p(e,n).orThunk((function(){return t.onEscape(e,n).map((function(){return e}))}))})),focusIn:function(t,e){d.getPrimary().each((function(e){yo(t,e.element,Ai())}))}}),cd.config({highlightClass:t.markers.selectedMenu,itemClass:t.markers.menu}),td.config({find:function(t){return cd.getHighlighted(t)}}),Ep.config({})]),eventOrder:t.eventOrder,apis:b,events:v}},extraApis:{tieredData:function(t,e,n){return{primary:t,menus:e,expansions:n}},singleData:function(t,e){return{primary:t,menus:uo(t,e),expansions:{}}},collapseItem:function(t){return{value:Ro(Xp()),meta:{text:t}}}}}),Jp=hl({name:"InlineView",configFields:[fr("lazySink"),$a("onShow"),$a("onHide"),Or("onEscape"),$s("inlineBehaviours",[lf,wf,tc]),Cr("fireDismissalEventInstead",[kr("event",Ui())]),Cr("fireRepositionEventInstead",[kr("event",Wi())]),kr("getRelated",bt.none),kr("isExtraPart",O),kr("eventOrder",bt.none)],factory:function(t,e){function n(e){lf.isOpen(e)&&wf.getValue(e).each((function(n){switch(n.mode){case"menu":lf.getState(e).each(Yp.repositionMenus);break;case"position":var r=t.lazySink(e).getOrDie();nf.positionWithinBounds(r,e,n.config,n.getBounds())}}))}function r(t,e,n,r){i(t,e,n,(function(){return r.map((function(t){return Rn(t)}))}))}function o(e,n,r,o){var i,a,u,c,s,l=(i=t,a=e,u=n,c=o,s="horizontal"===r.type?{layouts:{onLtr:fu,onRtl:du}}:{},Yp.sketch({dom:{tag:"div"},data:r.data,markers:r.menu.markers,highlightImmediately:r.menu.highlightImmediately,onEscape:function(){return lf.close(a),i.onEscape.map((function(t){return t(a)})),bt.some(!0)},onExecute:function(){return bt.some(!0)},onOpenMenu:function(t,e){nf.positionWithinBounds(f().getOrDie(),e,u,c())},onOpenSubmenu:function(t,e,n,r){var o=f().getOrDie();nf.position(o,n,{anchor:k({type:"submenu",item:e},d(r))})},onRepositionMenu:function(t,e,n){var r=f().getOrDie();nf.positionWithinBounds(r,e,u,c()),Ot(n,(function(t){var e=d(t.triggeringPath);nf.position(r,t.triggeredMenu,{anchor:k({type:"submenu",item:t.triggeringItem},e)})}))}}));function f(){return i.lazySink(a)}function d(t){return 2===t.length?s:{}}lf.open(e,l),wf.setValue(e,bt.some({mode:"menu",menu:l}))}var i=function(e,n,r,o){var i=t.lazySink(e).getOrDie();lf.openWhileCloaked(e,n,(function(){return nf.positionWithinBounds(i,e,r,o())})),wf.setValue(e,bt.some({mode:"position",config:r,getBounds:o}))},a={setContent:function(t,e){lf.setContent(t,e)},showAt:function(t,e,n){r(t,e,n,bt.none())},showWithin:r,showWithinBounds:i,showMenuAt:function(t,e,n){o(t,e,n,bt.none)},showMenuWithinBounds:o,hide:function(t){lf.isOpen(t)&&(wf.setValue(t,bt.none()),lf.close(t))},getContent:function(t){return lf.getState(t)},reposition:n,isOpen:lf.isOpen};return{uid:t.uid,dom:t.dom,behaviours:Ks(t.inlineBehaviours,[lf.config({isPartOf:function(e,n,r){return za(n,r)||(o=r,t.getRelated(e).exists((function(t){return za(t,o)})));var o},getAttachPoint:function(e){return t.lazySink(e).getOrDie()},onOpen:function(e){t.onShow(e)},onClose:function(e){t.onHide(e)}}),wf.config({store:{mode:"memory",initialValue:bt.none()}}),tc.config({channels:k(k({},Bs(k({isExtraPart:e.isExtraPart},t.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),Fs(k(k({},t.fireRepositionEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})),{doReposition:n})))})]),eventOrder:t.eventOrder,apis:a}},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)}}}),Qp="layout-inset",Zp=function(t,e,n){return Ja(vm(t,e),t.y,n.insetNorth(),zu(),"north",Za(t,{top:2}),Qp)},th=function(t,e,n){return Ja(vm(t,e),ym(t,e),n.insetSouth(),Lu(),"south",Za(t,{bottom:3}),Qp)},eh=tinymce.util.Tools.resolve("tinymce.util.Delay"),nh=hl({name:"Button",factory:function(t){function e(e){return at(t.dom,"attributes").bind((function(t){return at(t,e)}))}var n=pm(t.action),r=t.dom.tag;return{uid:t.uid,dom:t.dom,components:t.components,events:n,behaviours:Of(t.buttonBehaviours,[Dp.config({}),Cp.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"!==r)return{role:e("role").getOr("button")};var t=e("type").getOr("button"),n=e("role").map((function(t){return{role:t}})).getOr({});return k({type:t},n)}()},eventOrder:t.eventOrder}},configFields:[kr("uid",void 0),fr("dom"),kr("components",[]),xf("buttonBehaviours",[Dp,Cp]),yr("action"),yr("role"),kr("eventOrder",{})]}),rh=tinymce.util.Tools.resolve("tinymce.util.I18n"),oh={indent:!0,outdent:!0,"table-insert-column-after":!0,"table-insert-column-before":!0,"paste-column-after":!0,"paste-column-before":!0,"unordered-list":!0,"list-bull-circle":!0,"list-bull-default":!0,"list-bull-square":!0},ih="temporary-placeholder",ah={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},uh=hl({name:"Notification",factory:function(t){function e(t){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+t+"%"}}}}function n(t){return{dom:{tag:"div",classes:["tox-text"],innerHtml:t+"%"}}}var r,o,i,a,u=Am({dom:{tag:"p",innerHtml:t.translationProvider(t.text)},behaviours:Yu([Ep.config({})])}),c=Am({dom:{tag:"div",classes:t.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[e(0)]},n(0)],behaviours:Yu([Ep.config({})])}),s={updateProgress:function(t,r){t.getSystem().isConnected()&&c.getOpt(t).each((function(t){Ep.set(t,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[e(r)]},n(r)])}))},updateText:function(t,e){var n;t.getSystem().isConnected()&&(n=u.get(t),Ep.set(n,[ti(e)]))}},l=U([t.icon.toArray(),t.level.toArray(),t.level.bind((function(t){return bt.from(ah[t])})).toArray()]),f=Am(nh.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[Bm("close",{tag:"div",classes:["tox-icon"],attributes:{"aria-label":t.translationProvider("Close")}},t.iconProvider)],action:function(e){t.onAction(e)}})),d=[(r=l,o={tag:"div",classes:["tox-notification__icon"]},i=t.iconProvider,a=i(),jm(o,H(r,(function(t){return Mt(a,Rm(t,a))})).getOr(ih),a,bt.none())),{dom:{tag:"div",classes:["tox-notification__body"]},components:[u.asSpec()],behaviours:Yu([Ep.config({})])}];return{uid:t.uid,dom:{tag:"div",attributes:{role:"alert"},classes:t.level.map((function(t){return["tox-notification","tox-notification--in","tox-notification--"+t]})).getOr(["tox-notification","tox-notification--in"])},behaviours:Yu([Dp.config({}),im("notification-events",[Oo(pi(),(function(t){f.getOpt(t).each(Dp.focus)}))])]),components:d.concat(t.progress?[c.asSpec()]:[]).concat(t.closeButton?[f.asSpec()]:[]),apis:s}},configFields:[yr("level"),fr("progress"),fr("icon"),fr("onAction"),fr("text"),fr("iconProvider"),fr("translationProvider"),Ar("closeButton",!0)],apis:{updateProgress:function(t,e,n){t.updateProgress(e,n)},updateText:function(t,e,n){t.updateText(e,n)}}});function ch(t,e){function n(){p(r)||(clearTimeout(r),r=null)}var r=null;return{cancel:n,throttle:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];n(),r=setTimeout((function(){r=null,t.apply(null,o)}),e)}}}function sh(t,e,n,r,o){var i=_h(t,(function(e){return(n=t).isBlock(r=e)||xt(["BR","IMG","HR","INPUT"],r.nodeName)||"false"===n.getContentEditable(r);var n,r}));return bt.from(i.backwards(e,n,r,o))}function lh(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")}function fh(t){return""!==t&&-1!==" \f\n\r\t\v".indexOf(t)}function dh(t,e){return t.substring(e.length)}function mh(t,e,n,r){return void 0===r&&(r=0),wh(Rt.fromDom(e.startContainer)).fold((function(){return function(t,e,n,r){if(void 0===r&&(r=0),!e.collapsed||3!==e.startContainer.nodeType)return bt.none();var o=t.getParent(e.startContainer,t.isBlock)||t.getRoot();return sh(t,e.startContainer,e.startOffset,(function(t,e,r){return function(t,n){for(var r=e-1;0<=r;r--){var o=t.charAt(r);if(fh(o))return bt.none();if(o===n)break}return bt.some(r)}(r,n).getOr(e)}),o).bind((function(t){var o=e.cloneRange();if(o.setStart(t.container,t.offset),o.setEnd(e.endContainer,e.endOffset),o.collapsed)return bt.none();var i=lh(o);return 0!==i.lastIndexOf(n)||dh(i,n).length<r?bt.none():bt.some({text:dh(i,n),range:o,triggerChar:n})}))}(t,e,n,r)}),(function(e){var r=t.createRng();r.selectNode(e.dom);var o=lh(r);return bt.some({range:r,text:dh(o,n),triggerChar:n})}))}function ph(t,e){return{container:t,offset:e}}function hh(t){return ar("toolbarbutton",Th,t)}function gh(t){return ar("ToggleButton",Ah,t)}function vh(t,e,n,r){void 0===r&&(r={});var o=e(),i=t.selection.getRng().startContainer.nodeValue,a=B(o.lookupByChar(n.triggerChar),(function(e){return n.text.length>=e.minChars&&e.matches.getOrThunk((function(){return e=t.dom,function(t){var n=Sh(t.startContainer,t.startOffset);return!sh(e,n.container,n.offset,(function(t,e){return 0===e?-1:e}),e.getRoot()).filter((function(t){return!fh(t.container.data.charAt(t.offset-1))})).isSome()};var e}))(n.range,i,n.text)}));if(0===a.length)return bt.none();var u=xh.all(L(a,(function(t){return t.fetch(n.text,t.maxResults,r).then((function(e){return{matchText:n.text,items:e,columns:t.columns,onAction:t.onAction,highlightOn:t.highlightOn}}))})));return bt.some({lookupData:u,context:n})}var bh,yh,_h=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),wh=function(t){return Aa(t,"[data-mce-autocompleter]")},xh=tinymce.util.Tools.resolve("tinymce.util.Promise"),Oh=function(t){if(3===t.nodeType)return ph(t,t.data.length);var e=t.childNodes;return 0<e.length?Oh(e[e.length-1]):ph(t,e.length)},Sh=function(t,e){var n=t.childNodes;return 0<n.length&&e<n.length?Sh(n[e],0):0<n.length&&1===t.nodeType&&n.length===e?Oh(n[n.length-1]):ph(t,e)},Ch=Xr([mr("type"),xr("text")]),kh=Xr([kr("type","autocompleteitem"),kr("active",!1),kr("disabled",!1),kr("meta",{}),mr("value"),xr("text"),xr("icon")]),Eh=Xr([mr("type"),mr("ch"),Mr("minChars",1),kr("columns",1),Mr("maxResults",10),Or("matches"),hr("fetch"),hr("onAction"),Rr("highlightOn",[],Zr)]),Mh=[Ar("disabled",!1),xr("tooltip"),xr("icon"),xr("text"),Pr("onSetup",(function(){return a}))],Th=Xr([mr("type"),hr("onAction")].concat(Mh)),Dh=[Ar("active",!1)].concat(Mh),Ah=Xr(Dh.concat([mr("type"),hr("onAction")])),Ph=[Pr("predicate",O),Dr("scope","node",["node","editor"]),Dr("position","selection",["node","selection","line"])],Rh=Mh.concat([kr("type","contextformbutton"),kr("primary",!1),hr("onAction"),ao("original",s)]),Ih=Dh.concat([kr("type","contextformbutton"),kr("primary",!1),hr("onAction"),ao("original",s)]),zh=Mh.concat([kr("type","contextformbutton")]),Lh=Dh.concat([kr("type","contextformtogglebutton")]),jh=sr("type",{contextformbutton:Rh,contextformtogglebutton:Ih}),Bh=Xr([kr("type","contextform"),Pr("initValue",c("")),xr("label"),br("commands",jh),_r("launch",sr("type",{contextformbutton:zh,contextformtogglebutton:Lh}))].concat(Ph)),Fh=Xr([kr("type","contexttoolbar"),mr("items")].concat(Ph));function Nh(t){return at(hg,t).getOr(mg)}function Hh(t){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:"color"===t?"tox-swatches":"tox-menu",tieredMenu:"tox-tiered-menu"}}function Vh(t){var e=Hh(t);return{backgroundMenu:e.backgroundMenu,selectedMenu:e.selectedMenu,menu:e.menu,selectedItem:e.selectedItem,item:Nh(t)}}function Uh(t,e,n){return{dom:{tag:"div",classes:U([[Hh(n).tieredMenu]])},markers:Vh(n)}}function Wh(t,e){return function(n){return L(z(n,e),(function(e){return{dom:t,components:e}}))}}function $h(t,e){var n=[],r=[];return Ot(t,(function(t,o){e(t,o)?(0<r.length&&n.push(r),r=[],Mt(t.dom,"innerHtml")&&r.push(t)):r.push(t)})),0<r.length&&n.push(r),L(n,(function(t){return{dom:{tag:"div",classes:["tox-collection__group"]},components:t}}))}function Gh(t,e){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===t?["tox-collection--list"]:["tox-collection--grid"])},components:[Gp.parts.items({preprocess:function(n){return"auto"!==t&&1<t?Wh({tag:"div",classes:["tox-collection__group"]},t)(n):$h(n,(function(t,n){return"separator"===e[n].type}))}})]}}function Kh(t){return R(t,(function(t){return"icon"in t&&void 0!==t.icon}))}function qh(t){return bt.none()}function Xh(t,e,n,r,o){var i,a=(i=n,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[Gp.parts.items({preprocess:function(t){return $h(t,(function(t,e){return"separator"===i[e].type}))}})]});return{value:t,dom:a.dom,components:a.components,items:n}}function Yh(t,e,n,r,o){var i,a;return"color"===o?{value:t,dom:(i={dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[Gp.parts.items({preprocess:"auto"!==r?Wh({tag:"div",classes:["tox-swatches__row"]},r):s})]}]}).dom,components:i.components,items:n}:"normal"===o&&"auto"===r?{value:t,dom:(i=Gh(r,n)).dom,components:i.components,items:n}:"normal"===o&&1===r?{value:t,dom:(i=Gh(1,n)).dom,components:i.components,items:n}:"normal"===o?{value:t,dom:(i=Gh(r,n)).dom,components:i.components,items:n}:"listpreview"!==o||"auto"===r?{value:t,dom:{tag:"div",classes:U([[(a=Hh(o)).menu,"tox-menu-"+r+"-column"],e?[a.hasIcons]:[]])},components:Og,items:n}:{value:t,dom:(i={dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[Gp.parts.items({preprocess:Wh({tag:"div",classes:["tox-collection__group"]},r)})]}).dom,components:i.components,items:n}}function Jh(t,e,n){var r=ss(t.element,"."+n);if(0<r.length){var o=V(r,(function(t){var n=t.dom.getBoundingClientRect().top,o=r[0].dom.getBoundingClientRect().top;return Math.abs(n-o)>e})).getOr(r.length);return bt.some({numColumns:o,numRows:Math.ceil(r.length/o)})}return bt.none()}function Qh(t,e,n){t.getSystem().broadcastOn([Fg],{})}function Zh(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))}function tg(t){return t.getParam("width",$g.DOM.getStyle(t.getElement(),"width"))}function eg(t){return bt.from(t.getParam("min_width")).filter(y)}function ng(t){return bt.from(t.getParam("min_height")).filter(y)}function rg(t){return bt.from(t.getParam("max_width")).filter(y)}function og(t){return bt.from(t.getParam("max_height")).filter(y)}function ig(t){return!1!==t.getParam("menubar",!0,"boolean")}function ag(t){var e=t.getParam("toolbar",!0),n=!0===e,r=f(e),o=m(e)&&0<e.length;return!Kg(t)&&(o||r||n)}function ug(t){var e=B(I(9,(function(e){return t.getParam("toolbar"+(e+1),!1,"string")})),(function(t){return"string"==typeof t}));return 0<e.length?bt.some(e):bt.none()}(yh=bh={})[yh.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",yh[yh.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX";var cg,sg,lg,fg,dg=bh,mg="tox-menu-nav__js",pg="tox-collection__item",hg={normal:mg,color:"tox-swatch"},gg="tox-collection__item--enabled",vg="tox-collection__item-icon",bg="tox-collection__item-label",yg="tox-collection__item-caret",_g="tox-collection__item--active",wg="tox-collection__item-container",xg="tox-collection__item-container--row",Og=[Gp.parts.items({})],Sg=[mr("type"),mr("src"),xr("alt"),Rr("classes",[],Zr)],Cg=Xr(Sg),kg=[mr("type"),mr("text"),xr("name"),Rr("classes",["tox-collection__item-label"],Zr)],Eg=Xr(kg),Mg=Qn((function(){return rr("type",{cardimage:Cg,cardtext:Eg,cardcontainer:Tg})})),Tg=Xr([mr("type"),Tr("direction","horizontal"),Tr("align","left"),Tr("valign","middle"),br("items",Mg)]),Dg=[Ar("disabled",!1),xr("text"),xr("shortcut"),io("value","value",Wn((function(){return Ro("menuitem-value")})),Jr()),kr("meta",{})],Ag=Xr([mr("type"),xr("label"),br("items",Mg),Pr("onSetup",(function(){return a})),Pr("onAction",a)].concat(Dg)),Pg=Xr([mr("type"),Ar("active",!1),xr("icon")].concat(Dg)),Rg=[mr("type"),mr("fancytype"),Pr("onAction",a)],Ig=sr("fancytype",{inserttable:[kr("initData",{})].concat(Rg),colorswatch:[Ir("initData",{},[Ar("allowCustomColors",!0),Sr("colors",Jr())])].concat(Rg)}),zg=Xr([mr("type"),Pr("onSetup",(function(){return a})),Pr("onAction",a),xr("icon")].concat(Dg)),Lg=Xr([mr("type"),hr("getSubmenuItems"),Pr("onSetup",(function(){return a})),xr("icon")].concat(Dg)),jg=Xr([mr("type"),xr("icon"),Ar("active",!1),Pr("onSetup",(function(){return a})),hr("onAction")].concat(Dg)),Bg=function(t){return e=Ro("unnamed-events"),Yu([im(e,t)]);var e},Fg=Ro("tooltip.exclusive"),Ng=Ro("tooltip.show"),Hg=Ro("tooltip.hide"),Vg=Object.freeze({__proto__:null,hideAllExclusive:Qh,setComponents:function(t,e,n,r){n.getTooltip().each((function(t){t.getSystem().isConnected()&&Ep.set(t,r)}))}}),Ug=Object.freeze({__proto__:null,events:function(t,e){function n(n){e.getTooltip().each((function(r){Ds(r),t.onHide(n,r),e.clearTooltip()})),e.clearTimer()}return Qi(U([[Oo(Ng,(function(n){e.resetTimer((function(){var r,o,i=n;e.isShowing()||(Qh(i),r=t.lazySink(i).getOrDie(),o=i.getSystem().build({dom:t.tooltipDom,components:t.tooltipComponents,events:Qi("normal"===t.mode?[Oo(mi(),(function(t){go(i,Ng)})),Oo(fi(),(function(t){go(i,Hg)}))]:[]),behaviours:Yu([Ep.config({})])}),e.setTooltip(o),Ms(r,o),t.onShow(i,o),nf.position(r,o,{anchor:t.anchor(i)}))}),t.delay)})),Oo(Hg,(function(r){e.resetTimer((function(){n(r)}),t.delay)})),Oo(Ti(),(function(t,e){e.universal||xt(e.channels,Fg)&&n(t)})),ta((function(t){n(t)}))],"normal"===t.mode?[Oo(pi(),(function(t){go(t,Ng)})),Oo(Ei(),(function(t){go(t,Hg)})),Oo(mi(),(function(t){go(t,Ng)})),Oo(fi(),(function(t){go(t,Hg)}))]:[Oo(Xi(),(function(t,e){go(t,Ng)})),Oo(Yi(),(function(t){go(t,Hg)}))]]))}}),Wg=hu({fields:[fr("lazySink"),fr("tooltipDom"),kr("exclusive",!0),kr("tooltipComponents",[]),kr("delay",300),Dr("mode","normal",["normal","follow-highlight"]),kr("anchor",(function(t){return{type:"hotspot",hotspot:t,layouts:{onLtr:c([Gu,$u,Hu,Uu,Vu,Wu]),onRtl:c([Gu,$u,Hu,Uu,Vu,Wu])}}})),$a("onHide"),$a("onShow")],name:"tooltipping",active:Ug,state:Object.freeze({__proto__:null,init:function(){function t(){e.on(clearTimeout)}var e=cc(),n=cc(),r=c("not-implemented");return va({getTooltip:n.get,isShowing:n.isSet,setTooltip:n.set,clearTooltip:n.clear,clearTimer:t,resetTimer:function(n,r){t(),e.set(setTimeout(n,r))},readState:r})}}),apis:Vg}),$g=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Gg=tinymce.util.Tools.resolve("tinymce.EditorManager"),Kg=function(t){return ug(t).fold((function(){return 0<t.getParam("toolbar",[],"string[]").length}),S)};function qg(t){return t.getParam("toolbar_mode","","string")}function Xg(t){return t.getParam("toolbar_location",lg.auto,"string")}function Yg(t){return Xg(t)===lg.bottom}function Jg(t){if(!t.inline)return bt.none();var e=t.getParam("fixed_toolbar_container","","string");if(0<e.length)return Da(yn(),e);var n=t.getParam("fixed_toolbar_container_target");return v(n)?bt.some(Rt.fromDom(n)):bt.none()}function Qg(t){return t.inline&&Jg(t).isSome()}function Zg(t){return Jg(t).getOrThunk((function(){return ee(hn(Rt.fromDom(t.getElement())))}))}function tv(t){return t.inline&&!ig(t)&&!ag(t)&&!Kg(t)}function ev(t){return(t.getParam("toolbar_sticky",!1,"boolean")||t.inline)&&!Qg(t)&&!tv(t)}function nv(t,e){var n=t.outerContainer.element;e&&(t.mothership.broadcastOn([ff()],{target:n}),t.uiMothership.broadcastOn([ff()],{target:n})),t.mothership.broadcastOn([Bv],{readonly:e}),t.uiMothership.broadcastOn([Bv],{readonly:e})}function rv(t,e){t.on("init",(function(){t.mode.isReadOnly()&&nv(e,!0)})),t.on("SwitchMode",(function(){return nv(e,t.mode.isReadOnly())})),t.getParam("readonly",!1,"boolean")&&t.setMode("readonly")}function ov(){var t;return tc.config({channels:((t={})[Bv]={schema:Fv,onReceive:function(t,e){ad.set(t,e.readonly)}},t)})}function iv(t,e){var n=t.getApi(e);return function(t){t(n)}}function av(t,e){return Zi((function(n){iv(t,n)((function(n){var r=t.onSetup(n);b(r)&&e.set(r)}))}))}function uv(t,e){return ta((function(n){return iv(t,n)(e.get())}))}function cv(t,e,n,r){var o,i,u=zr(a);return{type:"item",dom:e.dom,components:Uv(e.optComponents),data:t.data,eventOrder:Vv,hasSubmenu:t.triggersSubmenu,itemBehaviours:Yu([im("item-events",[(o=t,i=n,na((function(t,e){iv(o,t)(o.onAction),o.triggersSubmenu||i!==dg.CLOSE_ON_EXECUTE||(go(t,Ii()),e.stop())}))),av(t,u),uv(t,u)]),ad.config({disabled:function(){return t.disabled||r.isDisabled()},disableClass:"tox-collection__item--state-disabled"}),ov(),Ep.config({})].concat(t.itemBehaviours))}}function sv(t){return{value:t.value,meta:k({text:t.text.getOr("")},t.meta)}}function lv(t,e,n){return Bm(t,{tag:"div",classes:n=void 0===n?[vg]:n},e)}function fv(t){return{dom:{tag:"div",classes:[bg]},components:[ti(rh.translate(t))]}}function dv(t,e){return{dom:{tag:"div",classes:e,innerHtml:t}}}function mv(t,e){return{dom:{tag:"div",classes:[bg]},components:[{dom:{tag:t.tag,styles:t.styles},components:[ti(rh.translate(e))]}]}}function pv(t){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:(e=Wv.mac?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"},n=L(t.split("+"),(function(t){var n=t.toLowerCase().trim();return Mt(e,n)?e[n]:t})),Wv.mac?n.join(""):n.join("+"))}};var e,n}function hv(t){return lv("checkmark",t,["tox-collection__item-checkmark"])}function gv(t){var e=t.map((function(t){return{attributes:{title:rh.translate(t)}}})).getOr({});return k({tag:"div",classes:[mg,pg]},e)}function vv(t,e,n,r){return void 0===r&&(r=bt.none()),"color"===t.presets?(o=e,i=r,c=t.ariaLabel,s=t.value,{dom:(a=t.iconContent.map((function(t){return e=o.icons,n=i,Im(t,r=e()).or(n).getOrThunk(Pm(r));var e,n,r})).getOr(""),u={tag:"div",attributes:c.map((function(t){return{title:o.translate(t)}})).getOr({}),classes:["tox-swatch"]},k(k({},u),"custom"===s?{tag:"button",classes:M(M([],u.classes,!0),["tox-swatches__picker-btn"],!1),innerHtml:a}:"remove"===s?{classes:M(M([],u.classes,!0),["tox-swatch--remove"],!1),innerHtml:a}:{attributes:k(k({},u.attributes),{"data-mce-color":s}),styles:{"background-color":s}})),optComponents:[]}):(l=t,f=e,d=r,m={tag:"div",classes:[vg]},p=n?l.iconContent.map((function(t){return Bm(t,m,f.icons,d)})).orThunk((function(){return bt.some({dom:m})})):bt.none(),h=l.checkMark,g=bt.from(l.meta).fold((function(){return fv}),(function(t){return Mt(t,"style")?_(mv,t.style):fv})),v=l.htmlContent.fold((function(){return l.textContent.map(g)}),(function(t){return bt.some(dv(t,[bg]))})),{dom:gv(l.ariaLabel),optComponents:[p,v,l.shortcutContent.map(pv),h,l.caret]});var o,i,a,u,c,s,l,f,d,m,p,h,g,v}function bv(t,e){return at(t,"tooltipWorker").map((function(t){return[Wg.config({lazySink:e.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(t){return{type:"submenu",item:t,overrides:{maxHeightFunction:Mc}}},mode:"follow-highlight",onShow:function(e,n){t((function(t){Wg.setComponents(e,[wa({element:Rt.fromDom(t)})])}))}})]})).getOr([])}function yv(t,e){var n=rh.translate(t),r=$g.DOM.encode(n);if(0<e.length){var o=new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi");return r.replace(o,(function(t){return'<span class="tox-autocompleter-highlight">'+t+"</span>"}))}return r}function _v(t){return{value:t}}function wv(t){return Kv.test(t)||qv.test(t)}function xv(t){var e=t.toString(16);return(1===e.length?"0"+e:e).toUpperCase()}function Ov(t){return _v(xv(t.red)+xv(t.green)+xv(t.blue))}function Sv(t,e,n,r){return{red:t,green:e,blue:n,alpha:r}}function Cv(t){var e=parseInt(t,10);return e.toString()===t&&0<=e&&e<=255}function kv(t){var e,n,r,o=(t.hue||0)%360,i=t.saturation/100,a=t.value/100;i=Yv(0,Xv(i,1)),a=Yv(0,Xv(a,1));if(0===i)return Sv(e=n=r=Jv(255*a),n,r,1);var u=o/60,c=a*i,s=c*(1-Math.abs(u%2-1)),l=a-c;switch(Math.floor(u)){case 0:e=c,n=s,r=0;break;case 1:e=s,n=c,r=0;break;case 2:e=0,n=c,r=s;break;case 3:e=0,n=s,r=c;break;case 4:e=s,n=0,r=c;break;case 5:e=c,n=0,r=s;break;default:e=n=r=0}return Sv(e=Jv(255*(e+l)),n=Jv(255*(n+l)),r=Jv(255*(r+l)),1)}function Ev(t){var e,n,r=(e={value:t.value.replace(Kv,(function(t,e,n,r){return e+e+n+n+r+r}))},null===(n=qv.exec(e.value))?["FFFFFF","FF","FF","FF"]:n);return Sv(parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16),1)}function Mv(t,e,n,r){return Sv(parseInt(t,10),parseInt(e,10),parseInt(n,10),parseFloat(r))}function Tv(t){if("transparent"===t)return bt.some(Sv(0,0,0,0));var e=Qv.exec(t);if(null!==e)return bt.some(Mv(e[1],e[2],e[3],"1"));var n=Zv.exec(t);return null!==n?bt.some(Mv(n[1],n[2],n[3],n[4])):bt.none()}function Dv(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"}function Av(t,e){return t.fire("ResizeContent",e)}function Pv(t,e,n){return{hue:t,saturation:e,value:n}}function Rv(t){var e,n,r=0,o=t.red/255,i=t.green/255,a=t.blue/255,u=Math.min(o,Math.min(i,a)),c=Math.max(o,Math.max(i,a));return u===c?Pv(0,0,100*(r=u)):(n=60*((o===u?3:a===u?1:5)-(o===u?i-a:a===u?o-i:a-o)/(c-u)),e=(c-u)/c,r=c,Pv(Math.round(n),Math.round(100*e),Math.round(100*r)))}function Iv(t){return Ov(kv(t))}function zv(t){return(wv(n=t)?bt.some({value:(Dt(e=n,"#")?e.substring("#".length):e).toUpperCase()}):bt.none()).orThunk((function(){return Tv(t).map(Ov)})).getOrThunk((function(){var e=document.createElement("canvas");e.height=1,e.width=1;var n=e.getContext("2d");n.clearRect(0,0,e.width,e.height),n.fillStyle="#FFFFFF",n.fillStyle=t,n.fillRect(0,0,1,1);var r=n.getImageData(0,0,1,1).data;return Ov(Sv(r[0],r[1],r[2],r[3]))}));var e,n}function Lv(t){return ad.config({disabled:t,disableClass:"tox-tbtn--disabled"})}(sg=cg=cg||{}).default="wrap",sg.floating="floating",sg.sliding="sliding",sg.scrolling="scrolling",(fg=lg=lg||{}).auto="auto",fg.top="top",fg.bottom="bottom";var jv,Bv="silver.readonly",Fv=Xr([dr("readonly",to)]),Nv=function(t){return ad.config({disabled:t})},Hv=function(t){return ad.config({disabled:t,disableClass:"tox-tbtn--disabled",useNative:!1})},Vv=((jv={})[Di()]=["disabling","alloy.base.behaviour","toggling","item-events"],jv),Uv=st,Wv=tinymce.util.Tools.resolve("tinymce.Env"),$v=function(t,e){return L(t,(function(t){switch(t.type){case"cardcontainer":return i=$v((o=t).items,e),a="vertical"===o.direction?"tox-collection__item-container--column":xg,u="left"===o.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right",{dom:{tag:"div",classes:[wg,a,u,function(){switch(o.valign){case"top":return"tox-collection__item-container--valign-top";case"middle":return"tox-collection__item-container--valign-middle";case"bottom":return"tox-collection__item-container--valign-bottom"}}()]},components:i};case"cardimage":return r=t.src,{dom:{tag:"img",classes:t.classes,attributes:{src:r,alt:t.alt.getOr("")}}};case"cardtext":var n=t.name.exists((function(t){return xt(e.cardText.highlightOn,t)}))?bt.from(e.cardText.matchText).getOr(""):"";return dv(yv(t.text,n),t.classes)}var r,o,i,a,u}))},Gv=Zs(Np(),Hp()),Kv=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,qv=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Xv=Math.min,Yv=Math.max,Jv=Math.round,Qv=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,Zv=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,tb=Sv(255,0,0,1),eb=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),nb="tinymce-custom-colors";function rb(t){return!1!==t.getParam("custom_colors")}function ob(t){var e=t.getParam("color_map");return void 0!==e?function(t){for(var e=[],n=0;n<t.length;n+=2)e.push({text:t[n+1],value:"#"+zv(t[n]).value,type:"choiceitem"});return e}(e):_b}function ib(t){wb.add(t)}function ab(t){var e,n=(e=ob(t).length,Math.max(5,Math.ceil(Math.sqrt(e))));return t.getParam("color_cols",n,"number")}function ub(t){var e="choiceitem",n={type:e,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return t?[n,{type:e,text:"Custom color",icon:"color-picker",value:"custom"}]:[n]}function cb(t,e,n,r){"custom"===n?Ob(t)((function(n){n.each((function(n){ib(n),t.execCommand("mceApplyTextcolor",e,n),r(n)}))}),xb):"remove"===n?(r(""),t.execCommand("mceRemoveTextcolor",e)):(r(n),t.execCommand("mceApplyTextcolor",e,n))}function sb(t,e){return t.concat(L(wb.state(),(function(t){return{type:yb,text:t,value:t}})).concat(ub(e)))}function lb(t,e){return function(n){n(sb(t,e))}}function fb(t,e,n){t.setIconFill("forecolor"===e?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color",n)}function db(t,e,n,r,o){t.ui.registry.addSplitButton(e,{tooltip:r,presets:"color",icon:"forecolor"===e?"text-color":"highlight-bg-color",select:function(e){var r,o=n;return t.dom.getParents(t.selection.getStart(),(function(t){var e;(e=t.style["forecolor"===o?"color":"background-color"])&&(r=r||e)})),bt.from(r).bind((function(t){return Tv(t).map((function(t){var n=Ov(t).value;return dt(e.toLowerCase(),n)}))})).getOr(!1)},columns:ab(t),fetch:lb(ob(t),rb(t)),onAction:function(e){cb(t,n,o.get(),a)},onItemAction:function(r,i){cb(t,n,i,(function(n){o.set(n),t.fire("TextColorChange",{name:e,color:n})}))},onSetup:function(n){function r(t){t.name===e&&fb(n,t.name,t.color)}return fb(n,e,o.get()),t.on("TextColorChange",r),function(){t.off("TextColorChange",r)}}})}function mb(t,e,n,r){t.ui.registry.addNestedMenuItem(e,{text:r,icon:"forecolor"===e?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(e){cb(t,n,e.value,a)}}]}})}function pb(t,e,n,r,o,i,a,u){return Yh(t,Kh(e),Sb(e,n,r,"color"!==o?"normal":"color",i,a,u),r,o)}function hb(t,e){var n=Vh(e);return 1===t?{mode:"menu",moveOnTab:!0}:"auto"===t?{mode:"grid",selector:"."+n.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+("color"===e?"tox-swatches__row":"tox-collection__group")}}function gb(t,e){return ti(e+"x"+t)}var vb,bb,yb="choiceitem",_b=[{type:yb,text:"Light Green",value:"#BFEDD2"},{type:yb,text:"Light Yellow",value:"#FBEEB8"},{type:yb,text:"Light Red",value:"#F8CAC6"},{type:yb,text:"Light Purple",value:"#ECCAFA"},{type:yb,text:"Light Blue",value:"#C2E0F4"},{type:yb,text:"Green",value:"#2DC26B"},{type:yb,text:"Yellow",value:"#F1C40F"},{type:yb,text:"Red",value:"#E03E2D"},{type:yb,text:"Purple",value:"#B96AD9"},{type:yb,text:"Blue",value:"#3598DB"},{type:yb,text:"Dark Turquoise",value:"#169179"},{type:yb,text:"Orange",value:"#E67E23"},{type:yb,text:"Dark Red",value:"#BA372A"},{type:yb,text:"Dark Purple",value:"#843FA1"},{type:yb,text:"Dark Blue",value:"#236FA1"},{type:yb,text:"Light Gray",value:"#ECF0F1"},{type:yb,text:"Medium Gray",value:"#CED4D9"},{type:yb,text:"Gray",value:"#95A5A6"},{type:yb,text:"Dark Gray",value:"#7E8C8D"},{type:yb,text:"Navy Blue",value:"#34495E"},{type:yb,text:"Black",value:"#000000"},{type:yb,text:"White",value:"#ffffff"}],wb=function(t){function e(t){i.splice(t,1)}void 0===t&&(t=10);var n,r=eb.getItem(nb),o=f(r)?JSON.parse(r):[],i=t-(n=o).length<0?n.slice(0,t):n;return{add:function(n){var r;(-1===(r=P(i,n))?bt.none():bt.some(r)).each(e),i.unshift(n),i.length>t&&i.pop(),eb.setItem(nb,JSON.stringify(i))},state:function(){return i.slice(0)}}}(10),xb="#000000",Ob=function(t){return function(e,n){var r=!1;t.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{colorpicker:n},onAction:function(t,e){"hex-valid"===e.name&&(r=e.value)},onSubmit:function(n){var o=n.getData().colorpicker;r?(e(bt.from(o)),n.close()):t.windowManager.alert(t.translate(["Invalid hex color code: {0}",o]))},onClose:a,onCancel:function(){e(bt.none())}})}},Sb=function(t,e,n,r,o,i,u){return st(L(t,(function(c){return"choiceitem"===c.type?ar("choicemenuitem",Pg,c).fold(qh,(function(s){return bt.some(function(t,e,n,r,o,i,u,c){void 0===c&&(c=!0);var s=vv({presets:n,textContent:e?t.text:bt.none(),htmlContent:bt.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:e?t.shortcut:bt.none(),checkMark:e?bt.some(hv(u.icons)):bt.none(),caret:bt.none(),value:t.value},u,c);return $r(cv({data:sv(t),disabled:t.disabled,getApi:function(t){return{setActive:function(e){Rp.set(t,e)},isActive:function(){return Rp.isOn(t)},isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)}}},onAction:function(e){return r(t.value)},onSetup:function(t){return t.setActive(o),a},triggersSubmenu:!1,itemBehaviours:[]},s,i,u),{toggling:{toggleClass:gg,toggleOnExecute:!1,selected:t.active}})}(s,1===n,r,e,i(c.value),o,u,Kh(t)))})):bt.none()})))},Cb=Ro("cell-over"),kb=Ro("cell-execute"),Eb={inserttable:function(t){var e=Ro("size-label"),n=function(t){for(var e=[],n=0;n<10;n++){for(var r=[],o=0;o<10;o++)r.push(function(t,e,n){function r(n){return vo(n,kb,{row:t,col:e})}function o(t,e){e.stop(),r(t)}var i;return Oa({dom:{tag:"div",attributes:((i={role:"button"})["aria-labelledby"]=n,i)},behaviours:Yu([im("insert-table-picker-cell",[Oo(mi(),Dp.focus),Oo(Di(),r),Oo(_i(),o),Oo(Pi(),o)]),Rp.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Dp.config({onFocus:function(n){return vo(n,Cb,{row:t,col:e})}})])})}(n,o,t));e.push(r)}return e}(e),r=gb(0,0),o=Am({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:e}},components:[r],behaviours:Yu([Ep.config({})])});return{type:"widget",data:{value:Ro("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Gv.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:W(n,(function(t){return L(t,Sa)})).concat(o.asSpec()),behaviours:Yu([im("insert-table-picker",[Zi((function(t){Ep.set(o.get(t),[r])})),Eo(Cb,(function(t,e,r){var i=r.event,a=i.row,u=i.col;!function(t,e,n){for(var r=0;r<10;r++)for(var o=0;o<10;o++)Rp.set(t[r][o],r<=e&&o<=n)}(n,a,u),Ep.set(o.get(t),[gb(a+1,u+1)])})),Eo(kb,(function(e,n,r){var o=r.event,i=o.row,a=o.col;t.onAction({numRows:i+1,numColumns:a+1}),go(e,Ii())}))]),Cp.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function(t,e){var n,r,o,i=(r=e,o=(n=t).initData.allowCustomColors&&r.colorinput.hasCustomColors(),n.initData.colors.fold((function(){return sb(r.colorinput.getColors(),o)}),(function(t){return t.concat(ub(o))}))),a=e.colorinput.getColorCols(),u=pb(Ro("menu-value"),i,(function(e){t.onAction({value:e})}),a,"color",dg.CLOSE_ON_EXECUTE,O,e.shared.providers),c=k(k({},u),{markers:Vh("color"),movement:hb(a,"color")});return{type:"widget",data:{value:Ro("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Gv.widget(Gp.sketch(c))]}}},Mb=function(t){var e=t.text.fold((function(){return{}}),(function(t){return{innerHtml:t}}));return{type:"separator",dom:k({tag:"div",classes:[pg,"tox-collection__group-heading"]},e),components:[]}};function Tb(t,e,n,r,o){var i=Kh(e),u=st(L(e,(function(t){function e(t){return function(t,e,n,r,o){function i(t){return o?k(k({},t),{shortcut:bt.none(),icon:t.text.isSome()?bt.none():t.icon}):t}var u=n.shared.providers;switch(t.type){case"menuitem":return ar("menuitem",zg,t).fold(qh,(function(t){return bt.some(function(t,e,n,r){void 0===r&&(r=!0);var o=vv({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:bt.none(),ariaLabel:t.text,caret:bt.none(),checkMark:bt.none(),shortcutContent:t.shortcut},n,r);return cv({data:sv(t),getApi:function(t){return{isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)}}},disabled:t.disabled,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},o,e,n)}(i(t),e,u,r))}));case"nestedmenuitem":return ar("nestedmenuitem",Lg,t).fold(qh,(function(t){return bt.some(function(t,e,n,r,o){void 0===r&&(r=!0);var i=(o=void 0!==o&&o)?lv("chevron-down",n.icons,[yg]):lv("chevron-right",n.icons,[yg]),u=vv({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:bt.none(),ariaLabel:t.text,caret:bt.some(i),checkMark:bt.none(),shortcutContent:t.shortcut},n,r);return cv({data:sv(t),getApi:function(t){return{isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)}}},disabled:t.disabled,onAction:a,onSetup:t.onSetup,triggersSubmenu:!0,itemBehaviours:[]},u,e,n)}(i(t),e,u,r,o))}));case"togglemenuitem":return ar("togglemenuitem",jg,t).fold(qh,(function(t){return bt.some(function(t,e,n,r){void 0===r&&(r=!0);var o=vv({iconContent:t.icon,textContent:t.text,htmlContent:bt.none(),ariaLabel:t.text,checkMark:bt.some(hv(n.icons)),caret:bt.none(),shortcutContent:t.shortcut,presets:"normal",meta:t.meta},n,r);return $r(cv({data:sv(t),disabled:t.disabled,getApi:function(t){return{setActive:function(e){Rp.set(t,e)},isActive:function(){return Rp.isOn(t)},isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},o,e,n),{toggling:{toggleClass:gg,toggleOnExecute:!1,selected:t.active}})}(i(t),e,u,r))}));case"separator":return ar("separatormenuitem",Ch,t).fold(qh,(function(t){return bt.some(Mb(t))}));case"fancymenuitem":return ar("fancymenuitem",Ig,t).fold(qh,(function(t){return function(t,e){return at(Eb,t.fancytype).map((function(n){return n(t,e)}))}(i(t),n)}));default:return bt.none()}}(t,n,r,o?!Mt(t,"text"):i,o)}return"nestedmenuitem"===t.type&&t.getSubmenuItems().length<=0?e(k(k({},t),{disabled:!0})):e(t)})));return(o?Xh:Yh)(t,i,u,1,"normal")}function Db(t){return Yp.singleData(t.value,t)}function Ab(t,e,n){return Aa(t,e,n).isSome()}function Pb(t,e){var n=null;return{cancel:function(){null!==n&&(clearTimeout(n),n=null)},schedule:function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n=setTimeout((function(){t.apply(null,r),n=null}),e)}}}function Rb(t){var e=t.raw;return void 0===e.touches||1!==e.touches.length?bt.none():bt.some(e.touches[0])}function Ib(){return fn().browser.isFirefox()}function zb(t,e){return zr(at(t,"target").getOr(e))}function Lb(t,e,n,r,o,i){var a,u,c=t(e,r),s=(a=zr(!1),u=zr(!1),{stop:function(){a.set(!0)},cut:function(){u.set(!0)},isStopped:a.get,isCut:u.get,event:n,setSource:o.set,getSource:o.get});return c.fold((function(){return i.logEventNoHandlers(e,r),Ub.complete()}),(function(t){var n=t.descHandler;return Ho(n)(s),s.isStopped()?(i.logEventStopped(e,t.element,n.purpose),Ub.stopped()):s.isCut()?(i.logEventCut(e,t.element,n.purpose),Ub.complete()):qt(t.element).fold((function(){return i.logNoParent(e,t.element,n.purpose),Ub.complete()}),(function(r){return i.logEventResponse(e,t.element,n.purpose),Ub.resume(r)}))}))}function jb(t){function e(e){return qt(t.element).fold(S,(function(t){return Vt(e,t)}))}function n(t,n){return o.find(e,t,n)}function r(t){var e=o.filter(Ti());Ot(e,(function(e){Ho(e.descHandler)(t)}))}var o=function(){function t(t){Io(t.element).each((function(t){delete r[t],n.unregisterId(t)}))}var e,n=(e={},{registerId:function(t,n,r){et(r,(function(r,o){var i,a=void 0!==e[o]?e[o]:{};a[n]={cHandler:_.apply(void 0,[(i=r).handler].concat(t)),purpose:i.purpose},e[o]=a}))},unregisterId:function(t){et(e,(function(e,n){Mt(e,t)&&delete e[t]}))},filterByType:function(t){return at(e,t).map((function(t){return rt(t,(function(t,e){return{id:e,descHandler:t}}))})).getOr([])},find:function(t,n,r){return at(e,n).bind((function(e){return fo(r,(function(t){return n=e,Io(r=t).bind((function(t){return at(n,t)})).map((function(t){return{element:r,descHandler:t}}));var n,r}),t)}))}}),r={};return{find:function(t,e,r){return n.find(t,e,r)},filter:function(t){return n.filterByType(t)},register:function(e){var o,i=Io((o=e).element).getOrThunk((function(){return t=o.element,e=Ro(ca+"uid-"),la(t,e),e;var t,e}));ut(r,i)&&function(e){var n=r[i];if(n!==e)throw new Error('The tagId "'+i+'" is already used by: '+Po(n.element)+"\nCannot use it for: "+Po(e.element)+"\nThe conflicting element is"+(bn(n.element)?" ":" not ")+"already in the DOM");t(e)}(e),n.registerId([e],i,e.events),r[i]=e},unregister:t,getById:function(t){return at(r,t)}}}(),i=function(t,e){var n,r,o,i,a,u,c,s,l,f=k({stopBackspace:!0},e),d=(a=f,u=cc(),c=zr(!1),s=Pb((function(t){a.triggerEvent(Ri(),t),c.set(!0)}),400),l=co([{key:ii(),value:function(t){return Rb(t).each((function(e){s.cancel();var n={x:e.clientX,y:e.clientY,target:t.target};s.schedule(t),c.set(!1),u.set(n)})),bt.none()}},{key:ai(),value:function(t){return s.cancel(),Rb(t).each((function(t){u.on((function(e){var n=t,r=e,o=Math.abs(n.clientX-r.x),i=Math.abs(n.clientY-r.y);(5<o||5<i)&&u.clear()}))})),bt.none()}},{key:ui(),value:function(t){return s.cancel(),u.get().filter((function(e){return Vt(e.target,t.target)})).map((function(e){return c.get()?(t.prevent(),!1):a.triggerEvent(Pi(),t)}))}}]),{fireIfReady:function(t,e){return at(l,e).bind((function(e){return e(t)}))}}),m=L(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),(function(e){return sc(t,e,(function(t){d.fireIfReady(t,e).each((function(e){e&&t.kill()})),f.triggerEvent(e,t)&&t.kill()}))})),p=cc(),h=sc(t,"paste",(function(t){d.fireIfReady(t,"paste").each((function(e){e&&t.kill()})),f.triggerEvent("paste",t)&&t.kill(),p.set(setTimeout((function(){f.triggerEvent(Mi(),t)}),0))})),g=sc(t,"keydown",(function(t){var e;f.triggerEvent("keydown",t)?t.kill():!f.stopBackspace||(e=t).raw.which!==sd[0]||xt(["input","textarea"],It(e.target))||Ab(e.target,'[contenteditable="true"]')||t.prevent()})),v=(n=t,r=function(t){f.triggerEvent("focusin",t)&&t.kill()},Ib()?lc(n,"focus",r):sc(n,"focusin",r)),b=cc(),y=(o=t,i=function(t){f.triggerEvent("focusout",t)&&t.kill(),b.set(setTimeout((function(){f.triggerEvent(Ei(),t)}),0))},Ib()?lc(o,"blur",i):sc(o,"focusout",i));return{unbind:function(){Ot(m,(function(t){t.unbind()})),g.unbind(),v.unbind(),y.unbind(),h.unbind(),p.on(clearTimeout),b.on(clearTimeout)}}}(t.element,{triggerEvent:function(t,e){return La(t,e.target,(function(r){return $b(n,t,e,e.target,r)}))}}),u={debugInfo:c("real"),triggerEvent:function(t,e,r){La(t,e,(function(o){return $b(n,t,r,e,o)}))},triggerFocus:function(t,e){Io(t).fold((function(){bu(t)}),(function(r){La(ki(),t,(function(r){var o,i,u=n,c=ki(),s=r,l=zb(o={originator:e,kill:a,prevent:a,target:t},i=t);return Lb(u,c,o,i,l,s),!1}))}))},triggerEscape:function(t,e){u.triggerEvent("keydown",t.element,e.event)},getByUid:function(t){return g(t)},getByDom:function(t){return v(t)},build:Oa,addToGui:function(t){f(t)},removeFromGui:function(t){d(t)},addToWorld:function(t){s(t)},removeFromWorld:function(t){l(t)},broadcast:function(t){m(t)},broadcastOn:function(t,e){p(t,e)},broadcastEvent:function(t,e){h(t,e)},isConnected:S},s=function(t){t.connect(u),Ke(t.element)||(o.register(t),Ot(t.components(),s),u.triggerEvent(Li(),t.element,{target:t.element}))},l=function(t){Ke(t.element)||(Ot(t.components(),l),o.unregister(t)),t.disconnect()},f=function(e){Ms(t,e)},d=function(t){Ds(t)},m=function(t){r({universal:!0,data:t})},p=function(t,e){r({universal:!1,channels:t,data:e})},h=function(t,e){var n,r,i=o.filter(t);return r={stop:function(){n.set(!0)},cut:a,isStopped:(n=zr(!1)).get,isCut:O,event:e,setSource:x("Cannot set source of a broadcasted event"),getSource:x("Cannot get source of a broadcasted event")},Ot(i,(function(t){Ho(t.descHandler)(r)})),r.isStopped()},g=function(t){return o.getById(t).fold((function(){return jn.error(new Error('Could not find component with uid: "'+t+'" in system.'))}),jn.value)},v=function(t){var e=Io(t).getOr("not found");return g(e)};return s(t),{root:t,element:t.element,destroy:function(){i.unbind(),Tn(t.element)},add:f,remove:d,getByUid:g,getByDom:v,addToWorld:s,removeFromWorld:l,broadcast:m,broadcastOn:p,broadcastEvent:h}}function Bb(t,e,n,r){var o=Zb(t,e,n,r);return Xb.sketch(o)}function Fb(t,e){return Xb.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}})}function Nb(t){return Yu([Dp.config({onFocus:t.selectOnFocus?function(t){var e=t.element,n=Yo(e);e.dom.setSelectionRange(0,n.length)}:a})])}function Hb(t){return{tag:t.tag,attributes:k({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}}function Vb(t,e){function n(){return u.get().isSome()}function r(){n()&&Jp.hide(f)}var o,i,u=cc(),l=zr(!1),f=Oa(Jp.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:Yu([im("dismissAutocompleter",[Oo(Ui(),(function(){return d()}))])]),lazySink:e.getSink})),d=function(){var e;n()&&(e=u.get().map((function(t){return t.element})),wh(e.getOr(Rt.fromDom(t.selection.getNode()))).each(Ie),r(),u.clear(),l.set(!1))},m=Lt((function(){return e=rt(r=nt(t.ui.registry.getAll().popups,(function(t){return ar("Autocompleter",Eh,t).fold((function(t){throw new Error(oo(t))}),s)})),(function(t){return t.ch})),n={},Ot(e,(function(t){n[t]={}})),o=Ct(n),i=it(r),{dataset:r,triggerChars:o,lookupByChar:function(t){return B(i,(function(e){return e.ch===t}))}};var e,n,r,o,i})),p=function(o){var i=o;u.get().map((function(e){return mh(t.dom,t.selection.getRng(),e.triggerChar).bind((function(e){return vh(t,m,e,i)}))})).getOrThunk((function(){return e=t,r=(n=m)(),o=e.selection.getRng(),i=e.dom,a=o,tt(r.triggerChars,(function(t){return mh(i,a,t)})).bind((function(t){return vh(e,n,t)}));var e,n,r,o,i,a})).fold(d,(function(o){var i,s=o.context;n()||(i=function(t,e){return wh(Rt.fromDom(t.selection.getNode())).getOrThunk((function(){var n,r,o=Rt.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',t.getDoc());return Mn(o,Rt.fromDom(e.extractContents())),e.insertNode(o.dom),qt(o).each((function(t){return t.dom.normalize()})),n=cs,(r=function(t){for(var e=Yt(t),o=e.length-1;0<=o;o--){var i=e[o];if(n(i))return bt.some(i);var a=r(i);if(a.isSome())return a}return bt.none()})(o).map((function(e){var n;t.selection.setCursorLocation(e.dom,"img"===It(n=e)?1:us(n).fold((function(){return Yt(n).length}),(function(t){return t.length})))})),o}))}(t,s.range),u.set({triggerChar:s.triggerChar,element:i,matchLength:s.text.length}),l.set(!1)),o.lookupData.then((function(n){u.get().map((function(i){var u,s,m,h,g=o.context;i.triggerChar===g.triggerChar&&(s=g.triggerChar,h=tt(m=n,(function(t){return bt.from(t.columns)})).getOr(1),0<(u=W(m,(function(n){return function(t,e,n,r,o,i,u){var s=1===r,l=!s||Kh(t);return st(L(t,(function(t){switch(t.type){case"separator":return ar("Autocompleter.Separator",Ch,t).fold(qh,(function(t){return bt.some(Mb(t))}));case"cardmenuitem":return ar("cardmenuitem",Ag,t).fold(qh,(function(t){return bt.some((r=k(k({},t),{onAction:function(e){t.onAction(e),n(t.value,t.meta)}}),a=o,c=i,s={itemBehaviours:bv(t.meta,i),cardText:{matchText:e,highlightOn:u}},l={dom:gv(r.label),optComponents:[bt.some({dom:{tag:"div",classes:[wg,xg]},components:$v(r.items,s)})]},cv({data:sv(k({text:bt.none()},r)),disabled:r.disabled,getApi:function(t){return{isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){ad.set(t,e),Ot(ss(t.element,"*"),(function(n){t.getSystem().getByDom(n).each((function(t){t.hasConfigured(ad)&&ad.set(t,e)}))}))}}},onAction:r.onAction,onSetup:r.onSetup,triggersSubmenu:!1,itemBehaviours:bt.from(s.itemBehaviours).getOr([])},l,a,c.providers)));var r,a,c,s,l}));default:return ar("Autocompleter.Item",kh,t).fold(qh,(function(t){return bt.some(function(t,e,n,r,o,i,u,s){void 0===s&&(s=!0);var l=vv({presets:"normal",textContent:bt.none(),htmlContent:n?t.text.map((function(t){return yv(t,e)})):bt.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:bt.none(),checkMark:bt.none(),caret:bt.none(),value:t.value},u.providers,s,t.icon);return cv({data:sv(t),disabled:t.disabled,getApi:c({}),onAction:function(e){return o(t.value,t.meta)},onSetup:c(a),triggersSubmenu:!1,itemBehaviours:bv(t.meta,u)},l,i,u.providers)}(t,e,s,0,n,o,i,l))}))}})))}(n.items,n.matchText,(function(e,o){var i=t.selection.getRng();mh(t.dom,i,s).fold((function(){}),(function(t){var i=t.range,a={hide:function(){d()},reload:function(t){r(),p(t)}};l.set(!0),n.onAction(a,i,e,o),l.set(!1)}))}),h,dg.BUBBLE_TO_SANDBOX,e,n.highlightOn)}))).length?function(e,n,r,o){e.matchLength=n.text.length;var i,a,u,c,s,l,d=tt(r,(function(t){return bt.from(t.columns)})).getOr(1);Jp.showAt(f,Gp.sketch((i=Yh("autocompleter-value",!0,o,d,"normal"),a=d,c=((u=vb.ContentFocus)===vb.ContentFocus?zl:Il)(),s=hb(a,"normal"),l=Vh("normal"),{dom:i.dom,components:i.components,items:i.items,value:i.value,markers:{selectedItem:l.selectedItem,item:l.item},movement:s,fakeFocus:u===vb.ContentFocus,focusManager:c,menuBehaviours:Bg("auto"!==a?[]:[Zi((function(t,e){Jh(t,4,l.item).each((function(e){var n=e.numColumns,r=e.numRows;Cp.setGridSize(t,r,n)}))}))])})),{anchor:{type:"node",root:Rt.fromDom(t.getBody()),node:bt.from(e.element)}}),Jp.getContent(f).each(cd.highlightFirst)}(i,g,n,u):(10<=g.text.length-i.matchLength?d:r)())}))}))}))},h={onKeypress:ch((function(t){27!==t.which&&p()}),50),cancelIfNecessary:d,isMenuOpen:function(){return Jp.isOpen(f)},isActive:n,isProcessingAction:l.get,getView:function(){return Jp.getContent(f)}};function g(t,e){vo(t,gi(),{raw:e})}!1===t.hasPlugin("rtc")&&(o=h,(i=t).on("keypress compositionend",o.onKeypress.throttle),i.on("remove",o.onKeypress.cancel),i.on("keydown",(function(t){function e(){return o.getView().bind(cd.getHighlighted)}8===t.which&&o.onKeypress.throttle(t),o.isActive()&&(27===t.which&&o.cancelIfNecessary(),o.isMenuOpen()?13===t.which?(e().each(bo),t.preventDefault()):40===t.which?(e().fold((function(){o.getView().each(cd.highlightFirst)}),(function(e){g(e,t)})),t.preventDefault(),t.stopImmediatePropagation()):37!==t.which&&38!==t.which&&39!==t.which||e().each((function(e){g(e,t),t.preventDefault(),t.stopImmediatePropagation()})):13!==t.which&&38!==t.which&&40!==t.which||o.cancelIfNecessary())})),i.on("NodeChange",(function(t){o.isActive()&&!o.isProcessingAction()&&wh(Rt.fromDom(t.element)).isNone()&&o.cancelIfNecessary()})))}(bb=vb={})[bb.ContentFocus=0]="ContentFocus",bb[bb.UiFocus=1]="UiFocus";var Ub=Lr([{stopped:[]},{resume:["element"]},{complete:[]}]),Wb=function(t,e,n,r,o,i){return Lb(t,e,n,r,o,i).fold(S,(function(r){return Wb(t,e,n,r,o,i)}),O)},$b=function(t,e,n,r,o){var i=zb(n,r);return Wb(t,e,n,r,i,o)},Gb=hl({name:"Container",factory:function(t){var e=t.dom,n=e.attributes,r=E(e,["attributes"]);return{uid:t.uid,dom:k({tag:"div",attributes:k({role:"presentation"},n)},r),components:t.components,behaviours:Gs(t.containerBehaviours),events:t.events,domModification:t.domModification,eventOrder:t.eventOrder}},configFields:[kr("components",[]),$s("containerBehaviours",[]),kr("events",{}),kr("domModification",{}),kr("eventOrder",{})]}),Kb=c([kr("prefix","form-field"),$s("fieldBehaviours",[td,wf])]),qb=c([Wf({schema:[fr("dom")],name:"label"}),Wf({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[fr("text")],name:"aria-descriptor"}),Vf({factory:{sketch:function(t){var e,n,r=(e=["factory"],n={},et(t,(function(t,r){xt(e,r)||(n[r]=t)})),n);return t.factory.sketch(r)}},schema:[fr("factory")],name:"field"})]),Xb=gl({name:"FormField",configFields:Kb(),partFields:qb(),factory:function(t,e,n,r){var o=Ks(t.fieldBehaviours,[td.config({find:function(e){return il(e,t,"field")}}),wf.config({store:{mode:"manual",getValue:function(t){return td.getCurrent(t).bind(wf.getValue)},setValue:function(t,e){td.getCurrent(t).each((function(t){wf.setValue(t,e)}))}}})]),i=Qi([Zi((function(e,n){var r=ul(e,t,["label","field","aria-descriptor"]);r.field().each((function(e){var n=Ro(t.prefix);r.label().each((function(t){oe(t.element,"for",n),oe(e.element,"id",n)})),r["aria-descriptor"]().each((function(n){var r=Ro(t.prefix);oe(n.element,"id",r),oe(e.element,"aria-describedby",r)}))}))}))]);return{uid:t.uid,dom:t.dom,components:e,behaviours:o,events:i,apis:{getField:function(e){return il(e,t,"field")},getLabel:function(e){return il(e,t,"label")}}}},apis:{getField:function(t,e){return t.getField(e)},getLabel:function(t,e){return t.getLabel(e)}}}),Yb=Object.freeze({__proto__:null,exhibit:function(t,e){return No({attributes:co([{key:e.tabAttr,value:"true"}])})}}),Jb=hu({fields:[kr("tabAttr","data-alloy-tabstop")],name:"tabstopping",active:Yb}),Qb=tinymce.util.Tools.resolve("tinymce.html.Entities"),Zb=function(t,e,n,r){return{dom:ty(n),components:t.toArray().concat([e]),fieldBehaviours:Yu(r)}},ty=function(t){return{tag:"div",classes:["tox-form__group"].concat(t)}},ey=Ro("form-component-change"),ny=Ro("form-close"),ry=Ro("form-cancel"),oy=Ro("form-action"),iy=Ro("form-submit"),ay=Ro("form-block"),uy=Ro("form-unblock"),cy=Ro("form-tabchange"),sy=Ro("form-resize"),ly=c([yr("data"),kr("inputAttributes",{}),kr("inputStyles",{}),kr("tag","input"),kr("inputClasses",[]),$a("onSetValue"),kr("styles",{}),kr("eventOrder",{}),$s("inputBehaviours",[wf,Dp]),kr("selectOnFocus",!0)]),fy=hl({name:"Input",configFields:ly(),factory:function(t,e){return{uid:t.uid,dom:Hb(t),components:[],behaviours:k(k({},Nb(n=t)),Ks(n.inputBehaviours,[wf.config({store:k(k({mode:"manual"},n.data.map((function(t){return{initialValue:t}})).getOr({})),{getValue:function(t){return Yo(t.element)},setValue:function(t,e){Yo(t.element)!==e&&Jo(t.element,e)}}),onSetValue:n.onSetValue})])),eventOrder:t.eventOrder};var n}}),dy={},my={exports:dy};function py(t){setTimeout((function(){throw t}),0)}function hy(t){var e=It(t);return xt(My,e)}function gy(t,e){Go(e.getRoot(t).getOr(t.element),e.invalidClass),e.notify.each((function(e){hy(t.element)&&oe(t.element,"aria-invalid",!1),e.getContainer(t).each((function(t){Ao(t,e.validHtml)})),e.onValid(t)}))}function vy(t,e,n,r){$o(e.getRoot(t).getOr(t.element),e.invalidClass),e.notify.each((function(e){hy(t.element)&&oe(t.element,"aria-invalid",!0),e.getContainer(t).each((function(t){Ao(t,r)})),e.onInvalid(t,r)}))}function by(t,e,n){return e.validator.fold((function(){return Ey(jn.value(!0))}),(function(e){return e.validate(t)}))}function yy(t,e,n){return e.notify.each((function(e){e.onValidate(t)})),by(t,e).map((function(n){return t.getSystem().isConnected()?n.fold((function(n){return vy(t,e,0,n),jn.error(n)}),(function(n){return gy(t,e),jn.value(n)})):jn.error("No longer in system")}))}!function(){var e=this,n=function(){var e,n,r,o={exports:{}};function i(){}function a(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],d(t,this)}function u(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,a._immediateFn((function(){var n,r=1===t._state?e.onFulfilled:e.onRejected;if(null!==r){try{n=r(t._value)}catch(n){return void s(e.promise,n)}c(e.promise,n)}else(1===t._state?c:s)(e.promise,t._value)}))):t._deferreds.push(e)}function c(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof a)return t._state=3,t._value=e,void l(t);if("function"==typeof n)return void d((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,l(t)}catch(e){s(t,e)}var r,o}function s(t,e){t._state=2,t._value=e,l(t)}function l(t){2===t._state&&0===t._deferreds.length&&a._immediateFn((function(){t._handled||a._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)u(t,t._deferreds[e]);t._deferreds=null}function f(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function d(t,e){var n=!1;try{t((function(t){n||(n=!0,c(e,t))}),(function(t){n||(n=!0,s(e,t))}))}catch(t){if(n)return;n=!0,s(e,t)}}e=o,n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},r=setTimeout,a.prototype.catch=function(t){return this.then(null,t)},a.prototype.then=function(t,e){var n=new this.constructor(i);return u(this,new f(t,e,n)),n},a.all=function(t){var e=Array.prototype.slice.call(t);return new a((function(t,n){if(0===e.length)return t([]);for(var r=e.length,o=0;o<e.length;o++)!function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return u.call(a,(function(t){o(i,t)}),n),0}e[i]=a,0==--r&&t(e)}catch(a){n(a)}}(o,e[o])}))},a.resolve=function(t){return t&&"object"==typeof t&&t.constructor===a?t:new a((function(e){e(t)}))},a.reject=function(t){return new a((function(e,n){n(t)}))},a.race=function(t){return new a((function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)}))},a._immediateFn="function"==typeof setImmediate?function(t){setImmediate(t)}:function(t){r(t,0)},a._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console},a._setImmediateFn=function(t){a._immediateFn=t},a._setUnhandledRejectionFn=function(t){a._unhandledRejectionFn=t},e.exports?e.exports=a:n.Promise||(n.Promise=a);var m=o.exports;return{boltExport:("undefined"!=typeof window?window:Function("return this;")()).Promise||m}};"object"==typeof dy&&void 0!==my?my.exports=n():(e="undefined"!=typeof globalThis?globalThis:e||self).EphoxContactWrapper=n()}();var _y,wy,xy=my.exports.boltExport,Oy=function(t){function e(t){o()?i(t):r.push(t)}var n=bt.none(),r=[],o=function(){return n.isSome()},i=function(t){n.each((function(e){setTimeout((function(){t(e)}),0)}))};return t((function(t){o()||(n=bt.some(t),Ot(r,i),r=[])})),{get:e,map:function(t){return Oy((function(n){e((function(e){n(t(e))}))}))},isReady:o}},Sy={nu:Oy,pure:function(t){return Oy((function(e){e(t)}))}},Cy=function(t){function e(e){t().then(e,py)}return{map:function(e){return Cy((function(){return t().then(e)}))},bind:function(e){return Cy((function(){return t().then((function(t){return e(t).toPromise()}))}))},anonBind:function(e){return Cy((function(){return t().then((function(){return e.toPromise()}))}))},toLazy:function(){return Sy.nu(e)},toCached:function(){var e=null;return Cy((function(){return e=null===e?t():e}))},toPromise:t,get:e}},ky=function(t){return Cy((function(){return new xy(t)}))},Ey=function(t){return Cy((function(){return xy.resolve(t)}))},My=["input","textarea"],Ty=Object.freeze({__proto__:null,markValid:gy,markInvalid:vy,query:by,run:yy,isInvalid:function(t,e){return Ko(e.getRoot(t).getOr(t.element),e.invalidClass)}}),Dy=Object.freeze({__proto__:null,events:function(t,e){return t.validator.map((function(e){return Qi([Oo(e.onEvent,(function(e){yy(e,t).get(s)}))].concat(e.validateOnLoad?[Zi((function(e){yy(e,t).get(a)}))]:[]))})).getOr({})}}),Ay=hu({fields:[fr("invalidClass"),kr("getRoot",bt.none),Cr("notify",[kr("aria","alert"),kr("getContainer",bt.none),kr("validHtml",""),$a("onValid"),$a("onInvalid"),$a("onValidate")]),Cr("validator",[fr("validate"),kr("onEvent","input"),kr("validateOnLoad",!0)])],name:"invalidating",active:Dy,apis:Ty,extra:{validation:function(t){return function(e){var n=wf.getValue(e);return Ey(t(n))}}}}),Py=Object.freeze({__proto__:null,getCoupled:function(t,e,n,r){return n.getOrCreate(t,e,r)}}),Ry=hu({fields:[dr("others",ir(jn.value,Jr()))],name:"coupling",apis:Py,state:Object.freeze({__proto__:null,init:function(){var t={},e=c({});return va({readState:e,getOrCreate:function(e,n,r){var o=Ct(n.others);if(o)return at(t,r).getOrThunk((function(){var o=at(n.others,r).getOrDie("No information found for coupled component: "+r)(e),i=e.getSystem().build(o);return t[r]=i}));throw new Error("Cannot find coupled component: "+r+". Known coupled components: "+JSON.stringify(o,null,2))}})}})}),Iy=c("sink"),zy=c(Wf({name:Iy(),overrides:c({dom:{tag:"div"},behaviours:Yu([nf.config({useFixed:S})]),events:Qi([Mo(gi()),Mo(si()),Mo(_i())])})}));function Ly(t,e){var n=t.getHotspot(e).getOr(e),r=t.getAnchorOverrides();return t.layouts.fold((function(){return{type:"hotspot",hotspot:n,overrides:r}}),(function(t){return{type:"hotspot",hotspot:n,overrides:r,layouts:t}}))}function jy(t,e,n,r,o,i,a){var u,c=Ly(t,n),s=n,l=r,f=o,d=a,m=e,p=(0,(u=t).fetch)(s).map(m),h=Ww(s,u);return p.map((function(t){return t.bind((function(t){return bt.from(Yp.sketch(k(k({},f.menu()),{uid:fa(""),data:t,highlightImmediately:d===_y.HighlightFirst,onOpenMenu:function(t,e){var n=h().getOrDie();nf.position(n,e,{anchor:c}),lf.decloak(l)},onOpenSubmenu:function(t,e,n){var r=h().getOrDie();nf.position(r,n,{anchor:{type:"submenu",item:e}}),lf.decloak(l)},onRepositionMenu:function(t,e,n){var r=h().getOrDie();nf.position(r,e,{anchor:c}),Ot(n,(function(t){nf.position(r,t.triggeredMenu,{anchor:{type:"submenu",item:t.triggeringItem}})}))},onEscape:function(){return Dp.focus(s),lf.close(l),bt.some(!0)}})))}))})).map((function(t){return t.fold((function(){lf.isOpen(r)&&lf.close(r)}),(function(t){lf.cloak(r),lf.open(r,t),i(r)})),r}))}function By(t,e,n,r,o,i){var a=Ry.getCoupled(n,"sandbox");return(lf.isOpen(a)?function(t,e,n,r,o,i,a){return lf.close(r),Ey(r)}:jy)(t,e,n,a,r,o,i)}function Fy(t){lf.getState(t).each((function(t){Yp.repositionMenus(t)}))}function Ny(t,e,n){var r=Pa(),o=Ww(e,t);return{dom:{tag:"div",classes:t.sandboxClasses,attributes:{id:r.id,role:"listbox"}},behaviours:Of(t.sandboxBehaviours,[wf.config({store:{mode:"memory",initialValue:e}}),lf.config({onOpen:function(o,i){var a,u,c,s,l,f,d=Ly(t,e);r.link(e.element),t.matchWidth&&(a=d.hotspot,u=i,c=t.useMinWidth,l=td.getCurrent(u).getOr(u),f=Ce(a.element),c?de(l.element,"min-width",f+"px"):(s=l.element,kn.set(s,f))),t.onOpen(d,o,i),void 0!==n&&void 0!==n.onOpen&&n.onOpen(o,i)},onClose:function(t,o){r.unlink(e.element),void 0!==n&&void 0!==n.onClose&&n.onClose(t,o)},isPartOf:function(t,n,r){return za(n,r)||za(e,r)},getAttachPoint:function(){return o().getOrDie()}}),td.config({find:function(t){return lf.getState(t).bind((function(t){return td.getCurrent(t)}))}}),tc.config({channels:k(k({},Bs({isExtraPart:O})),Fs({doReposition:Fy}))})])}}function Hy(t){Fy(Ry.getCoupled(t,"sandbox"))}function Vy(){return[kr("sandboxClasses",[]),xf("sandboxBehaviours",[td,tc,lf,wf])]}function Uy(t){return Wf({name:t+"-edge",overrides:function(e){return e.model.manager.edgeActions[t].fold((function(){return{}}),(function(t){return{events:Qi([So(ii(),(function(e,n,r){return t(e,r)}),[e]),So(si(),(function(e,n,r){return t(e,r)}),[e]),So(li(),(function(e,n,r){r.mouseIsDown.get()&&t(e,r)}),[e])])}}))}})}function Wy(t){var e=t.event.raw;return-1===e.type.indexOf("touch")?void 0!==e.clientX?bt.some(e).map((function(t){return Sn(t.clientX,t.clientY)})):bt.none():void 0!==e.touches&&1===e.touches.length?bt.some(e.touches[0]).map((function(t){return Sn(t.clientX,t.clientY)})):bt.none()}function $y(t){return t.model.minX}function Gy(t){return t.model.minY}function Ky(t){return t.model.minX-1}function qy(t){return t.model.minY-1}function Xy(t){return t.model.maxX}function Yy(t){return t.model.maxY}function Jy(t){return t.model.maxX+1}function Qy(t){return t.model.maxY+1}function Zy(t,e,n){return e(t)-n(t)}function t_(t){return Zy(t,Xy,$y)}function e_(t){return Zy(t,Yy,Gy)}function n_(t){return t_(t)/2}function r_(t){return e_(t)/2}function o_(t){return t.stepSize}function i_(t){return t.snapToGrid}function a_(t){return t.snapStart}function u_(t){return t.rounded}function c_(t,e){return void 0!==t[e+"-edge"]}function s_(t){return c_(t,"left")}function l_(t){return c_(t,"right")}function f_(t){return c_(t,"top")}function d_(t){return c_(t,"bottom")}function m_(t){return t.model.value.get()}function p_(t,e){return{x:t,y:e}}function h_(t,e){vo(t,ux(),{value:e})}function g_(t,e,n,r){return t<e?t:n<t?n:t===e?e-1:Math.max(e,t-r)}function v_(t,e,n,r){return n<t?t:t<e?e:t===n?n+1:Math.min(n,t+r)}function b_(t,e,n){return Math.max(e,Math.min(n,t))}function y_(t){var e=t.min,n=t.max,r=t.range,o=t.value,i=t.step,a=t.snap,u=t.snapStart,c=t.rounded,s=t.hasMinEdge,l=t.hasMaxEdge,f=t.minBound,d=t.maxBound,m=t.screenRange,p=s?e-1:e,h=l?n+1:n;if(o<f)return p;if(d<o)return h;var g,v,b,y,_,w=b_((_=f,(Math.min(d,Math.max(o,_))-_)/m*r+e),p,h);return a&&e<=w&&w<=n?(g=w,v=e,b=n,y=i,u.fold((function(){var t=Math.round((g-v)/y)*y;return b_(v+t,v-1,b+1)}),(function(t){var e=Math.round((g-t)%y/y),n=Math.floor((g-t)/y),r=Math.floor((b-t)/y),o=Math.min(r,n+e);return Math.max(t,t+o*y)}))):c?Math.round(w):w}function __(t){var e=t.min,n=t.max,r=t.range,o=t.value,i=t.hasMinEdge,a=t.hasMaxEdge,u=t.maxBound,c=t.maxOffset,s=t.centerMinEdge,l=t.centerMaxEdge;return o<e?i?0:s:n<o?a?u:l:(o-e)/r*c}function w_(t){return t.element.dom.getBoundingClientRect()}function x_(t){return w_(t)[cx]}function O_(t){return w_(t).right}function S_(t){return w_(t).top}function C_(t){return w_(t).bottom}function k_(t){return w_(t).width}function E_(t){return w_(t).height}function M_(t,e){var n=w_(t),r=w_(e);return(n[cx]+n.right)/2-r[cx]}function T_(t,e){var n=w_(t),r=w_(e);return(n.top+n.bottom)/2-r.top}function D_(t,e){vo(t,ux(),{value:e})}function A_(t,e,n){return y_({min:$y(e),max:Xy(e),range:t_(e),value:n,step:o_(e),snap:i_(e),snapStart:a_(e),rounded:u_(e),hasMinEdge:s_(e),hasMaxEdge:l_(e),minBound:x_(t),maxBound:O_(t),screenRange:k_(t)})}function P_(t){return function(e,n){return D_(e,{x:o=(0<t?v_:g_)(m_(r=n).x,$y(r),Xy(r),o_(r))}),bt.some(o).map(S);var r,o}}function R_(t,e,n,r,o,i){var a,u,c,s,l,f,d,m,p=(u=i,c=n,s=r,l=o,f=k_(a=e),d=s.bind((function(t){return bt.some(M_(t,a))})).getOr(0),m=l.bind((function(t){return bt.some(M_(t,a))})).getOr(f),__({min:$y(u),max:Xy(u),range:t_(u),value:c,hasMinEdge:s_(u),hasMaxEdge:l_(u),minBound:x_(a),minOffset:0,maxBound:O_(a),maxOffset:f,centerMinEdge:d,centerMaxEdge:m}));return x_(e)-x_(t)+p}function I_(t,e){vo(t,ux(),{value:e})}function z_(t,e,n){return y_({min:Gy(e),max:Yy(e),range:e_(e),value:n,step:o_(e),snap:i_(e),snapStart:a_(e),rounded:u_(e),hasMinEdge:f_(e),hasMaxEdge:d_(e),minBound:S_(t),maxBound:C_(t),screenRange:E_(t)})}function L_(t){return function(e,n){return I_(e,{y:o=(0<t?v_:g_)(m_(r=n).y,Gy(r),Yy(r),o_(r))}),bt.some(o).map(S);var r,o}}function j_(t,e,n,r,o,i){var a,u,c,s,l,f,d,m,p=(u=i,c=n,s=r,l=o,f=E_(a=e),d=s.bind((function(t){return bt.some(T_(t,a))})).getOr(0),m=l.bind((function(t){return bt.some(T_(t,a))})).getOr(f),__({min:Gy(u),max:Yy(u),range:e_(u),value:c,hasMinEdge:f_(u),hasMaxEdge:d_(u),minBound:S_(a),minOffset:0,maxBound:C_(a),maxOffset:f,centerMinEdge:d,centerMaxEdge:m}));return S_(e)-S_(t)+p}function B_(t,e){vo(t,ux(),{value:e})}function F_(t,e){return{x:t,y:e}}function N_(t,e){return function(n,r){return i=r,a=0<t?v_:g_,B_(n,F_(u=(o=e)?m_(i).x:a(m_(i).x,$y(i),Xy(i),o_(i)),o?a(m_(i).y,Gy(i),Yy(i),o_(i)):m_(i).y)),bt.some(u).map(S);var o,i,a,u}}function H_(t){return"<alloy.field."+t+">"}function V_(t,e){return hl({name:"ColourPicker",configFields:[fr("dom"),kr("onValidHex",a),kr("onInvalidHex",a)],factory:function(n){function r(t,e,n){w.getOpt(t).each((function(t){b.setHue(t,n)}))}function o(t,e){x.getOpt(t).each((function(t){v.updateHex(t,e)}))}function i(t,e,n,r){var o=n,i=Ev(e);y.paletteRgba.set(i),y.paletteHue.set(o),Ot(r,(function(r){r(t,e,n)}))}var u,s,l,f,d,m,p,h,g,v=function(t,e,n,r){function o(n,r,o,i,u){var c,s,l=t(jx+"range"),f=[Xb.parts.label({dom:{tag:"label",innerHtml:o,attributes:{"aria-label":i}}}),Xb.parts.field({data:u,factory:fy,inputAttributes:k({type:"text"},"hex"===r?{"aria-live":"polite"}:{}),inputClasses:[e("textfield")],inputBehaviours:Yu([(c=r,s=n,Ay.config({invalidClass:e("invalid"),notify:{onValidate:function(t){vo(t,Lx,{type:c})},onValid:function(t){vo(t,Ix,{type:c,value:wf.getValue(t)})},onInvalid:function(t){vo(t,zx,{type:c,value:wf.getValue(t)})}},validator:{validate:function(e){var n=wf.getValue(e),r=s(n)?jn.value(!0):jn.error(t("aria.input.invalid"));return Ey(r)},validateOnLoad:!1}})),Jb.config({})]),onSetValue:function(t){Ay.isInvalid(t)&&Ay.run(t).get(a)}})],d="hex"!==r?[Xb.parts["aria-descriptor"]({text:l})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:f.concat(d)}}function i(t,e){var n=e.red,r=e.green,o=e.blue;wf.setValue(t,{red:n,green:r,blue:o})}function u(t,e){c.getOpt(t).each((function(t){de(t.element,"background-color","#"+e.value)}))}var c=Am({dom:{tag:"div",classes:[e("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}});return hl({factory:function(){function a(t){return p[t].get()}function s(t,e){p[t].set(e)}function l(t,e){var n=e.event;"hex"!==n.type?s(n.type,bt.none()):r(t)}function f(t,e){var r,o,c,l,f=e.event;"hex"===f.type?function(t,e){n(t);var r=_v(e);s("hex",bt.some(e));var o=Ev(r);i(t,o),m(o),vo(t,Tx,{hex:r}),u(t,r)}(t,f.value):(r=t,o=f.type,c=f.value,l=parseInt(c,10),s(o,bt.some(l)),a("red").bind((function(t){return a("green").bind((function(e){return a("blue").map((function(n){return Sv(t,e,n,1)}))}))})).each((function(t){var e,n,o=(e=r,n=Ov(t),Rx.getField(e,"hex").each((function(t){Dp.isFocused(t)||wf.setValue(e,{hex:n.value})})),n);vo(r,Tx,{hex:o}),u(r,o)})))}function d(e){return{label:t(jx+e+".label"),description:t(jx+e+".description")}}function m(t){var e=t.red,n=t.green,r=t.blue;s("red",bt.some(e)),s("green",bt.some(n)),s("blue",bt.some(r))}var p={red:zr(bt.some(255)),green:zr(bt.some(255)),blue:zr(bt.some(255)),hex:zr(bt.some("ffffff"))},h=d("red"),g=d("green"),v=d("blue"),b=d("hex");return $r(Rx.sketch((function(n){return{dom:{tag:"form",classes:[e("rgb-form")],attributes:{"aria-label":t("aria.color.picker")}},components:[n.field("red",Xb.sketch(o(Cv,"red",h.label,h.description,255))),n.field("green",Xb.sketch(o(Cv,"green",g.label,g.description,255))),n.field("blue",Xb.sketch(o(Cv,"blue",v.label,v.description,255))),n.field("hex",Xb.sketch(o(wv,"hex",b.label,b.description,"ffffff"))),c.asSpec()],formBehaviours:Yu([Ay.config({invalidClass:e("form-invalid")}),im("rgb-form-events",[Oo(Ix,f),Oo(zx,l),Oo(Lx,l)])])}})),{apis:{updateHex:function(t,e){var n;wf.setValue(t,{hex:e.value}),i(t,n=Ev(e)),m(n),u(t,e)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,e,n){t.updateHex(e,n)}},extraApis:{}})}(t,e,n.onValidHex,n.onInvalidHex),b=(p=e,h=Mx.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[p("sv-palette-spectrum")]}}),g=Mx.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[p("sv-palette-thumb")],innerHtml:"<div class="+p("sv-palette-inner-thumb")+' role="presentation"></div>'}}),hl({factory:function(t){var e=c({x:0,y:0}),n=Yu([td.config({find:bt.some}),Dp.config({})]);return Mx.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[p("sv-palette")]},model:{mode:"xy",getInitialValue:e},rounded:!1,components:[h,g],onChange:function(t,e,n){vo(t,Ax,{value:n})},onInit:function(t,e,n,r){O(n.element.dom,Dv(tb))},sliderBehaviours:n})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:function(t,e,n){var r=n;O(e.components()[0].element.dom,Dv(kv(Pv(r,100,100))))},setThumb:function(t,e,n){var r=e,o=Rv(Ev(n));Mx.setValue(r,{x:o.saturation,y:100-o.value})}},extraApis:{}})),y={paletteRgba:zr(tb),paletteHue:zr(0)},_=Am((s=Mx.parts.spectrum({dom:{tag:"div",classes:[(u=e)("hue-slider-spectrum")],attributes:{role:"presentation"}}}),l=Mx.parts.thumb({dom:{tag:"div",classes:[u("hue-slider-thumb")],attributes:{role:"presentation"}}}),Mx.sketch({dom:{tag:"div",classes:[u("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:c({y:0})},components:[s,l],sliderBehaviours:Yu([Dp.config({})]),onChange:function(t,e,n){vo(t,Dx,{value:n})}}))),w=Am(b.sketch({})),x=Am(v.sketch({}));function O(t,e){var n,r,o=t.width,i=t.height,a=t.getContext("2d");null!==a&&(a.fillStyle=e,a.fillRect(0,0,o,i),(n=a.createLinearGradient(0,0,o,0)).addColorStop(0,"rgba(255,255,255,1)"),n.addColorStop(1,"rgba(255,255,255,0)"),a.fillStyle=n,a.fillRect(0,0,o,i),(r=a.createLinearGradient(0,0,0,i)).addColorStop(0,"rgba(0,0,0,0)"),r.addColorStop(1,"rgba(0,0,0,1)"),a.fillStyle=r,a.fillRect(0,0,o,i))}return{uid:n.uid,dom:n.dom,components:[w.asSpec(),_.asSpec(),x.asSpec()],behaviours:Yu([im("colour-picker-events",[Oo(Tx,(m=[r,function(t,e,n){_.getOpt(t).each((function(t){Mx.setValue(t,{y:100-n/360*100})}))},function(t,e){w.getOpt(t).each((function(t){b.setThumb(t,e)}))}],function(t,e){var n=e.event.hex;i(t,n,Rv(Ev(n)).hue,m)})),Oo(Ax,(d=[o],function(t,e){var n=e.event.value,r=y.paletteHue.get();i(t,Iv(Pv(r,n.x,100-n.y)),r,d)})),Oo(Dx,(f=[r,o],function(t,e){var n=(100-e.event.value.y)/100*360,r=Rv(y.paletteRgba.get());i(t,Iv(Pv(n,r.saturation,r.value)),n,f)}))]),td.config({find:function(t){return x.getOpt(t)}}),Cp.config({mode:"acyclic"})])}}})}function U_(t){return Nx[t]}function W_(t,e,n){return wf.config($r({store:{mode:"manual",getValue:e,setValue:n}},t.map((function(t){return{store:{initialValue:t}}})).getOr({})))}function $_(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:Yu([Dp.config({ignore:!0}),Jb.config({})])}}function G_(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[$_([Kx]),t,$_([qx])],behaviours:Yu([Fx(1)])}}function K_(t,e){vo(t,gi(),{raw:{which:9,shiftKey:e}})}function q_(t,e){var n=e.element;Ko(n,Kx)?K_(t,!0):Ko(n,qx)&&K_(t,!1)}function X_(t){return Ab(t,["."+Kx,"."+qx].join(","),O)}function Y_(t,e){return Jx(document.createElement("canvas"),t,e)}function J_(t){var e=Y_(t.width,t.height);return Yx(e).drawImage(t,0,0),e}function Q_(t){return t.naturalWidth||t.width}function Z_(t){return t.naturalHeight||t.height}function tw(t,e,n){return e=e||"image/png",b(HTMLCanvasElement.prototype.toBlob)?new xy((function(r,o){t.toBlob((function(t){t?r(t):o()}),e,n)})):(r=t.toDataURL(e,n),new xy((function(t,e){(function(){var t=r.split(","),e=/data:([^;]+)/.exec(t[0]);if(!e)return bt.none();for(var n=e[1],o=t[1],i=atob(o),a=i.length,u=Math.ceil(a/1024),c=new Array(u),s=0;s<u;++s){for(var l=1024*s,f=Math.min(1024+l,a),d=new Array(f-l),m=l,p=0;m<f;++p,++m)d[p]=i[m].charCodeAt(0);c[s]=new Uint8Array(d)}return bt.some(new Blob(c,{type:n}))})().fold((function(){e("uri is not base64: "+r)}),t)})));var r}function ew(t,e,n){function r(e,n){return t.then((function(t){return t.toDataURL(e||"image/png",n)}))}return{getType:c(e.type),toBlob:function(){return xy.resolve(e)},toDataURL:c(n),toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(e,n){return t.then((function(t){return tw(t,e,n)}))},toAdjustedDataURL:r,toAdjustedBase64:function(t,e){return r(t,e).then((function(t){return t.split(",")[1]}))},toCanvas:function(){return t.then(J_)}}}function nw(t,e){return tw(t,e).then((function(e){return ew(xy.resolve(t),e,t.toDataURL())}))}function rw(t,e,n){var r="string"==typeof t?parseFloat(t):t;return n<r?r=n:r<e&&(r=e),r}function ow(t,e){for(var n=[],r=new Array(25),o=0;o<5;o++){for(var i=0;i<5;i++)n[i]=e[i+5*o];for(i=0;i<5;i++){for(var a=0,u=0;u<5;u++)a+=t[i+5*u]*n[u];r[i+5*o]=a}}return r}function iw(t,e){return t.toCanvas().then((function(n){return tO(n,t.getType(),e)}))}function aw(t){return function(e,n){return iw(e,t([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],n))}}function uw(t,e){void 0===e&&(e=2);var n=Math.pow(10,e),r=Math.round(t*n);return Math.ceil(r/n)}function cw(t){return eO(t)}function sw(t){return oO(t)}function lw(t,e){return iO(t,e)}function fw(t,e){return nO(t,e)}function dw(t,e){return rO(t,e)}function mw(t,e){return r=e,(n=t).toCanvas().then((function(t){return sO(t,n.getType(),r)}));var n,r}function pw(t,e){return r=e,(n=t).toCanvas().then((function(t){return cO(t,n.getType(),r)}));var n,r}function hw(t,e,n){return Bm(t,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:n},e)}function gw(t,e){return hw(t,e,[])}function vw(t,e){return hw(t,e,[Ep.config({})])}function bw(t,e,n){return{dom:{tag:"span",innerHtml:n.translate(t),classes:[e+"__select-label"]},behaviours:Yu([Ep.config({})])}}function yw(t,e,n){function r(t,e){var n=wf.getValue(t);return Dp.focus(n),vo(n,"keydown",{raw:e.event.raw}),Kw.close(n),bt.some(!0)}var o=zr(a),i=t.text.map((function(t){return Am(bw(t,e,n.providers))})),u=t.icon.map((function(t){return Am(vw(t,n.providers.icons))})),c=t.role.fold((function(){return{}}),(function(t){return{role:t}})),s=t.tooltip.fold((function(){return{}}),(function(t){var e=n.providers.translate(t);return{title:e,"aria-label":e}})),l=Bm("chevron-down",{tag:"div",classes:[e+"__select-chevron"]},n.providers.icons);return Am(Kw.sketch(k(k(k({},t.uid?{uid:t.uid}:{}),c),{dom:{tag:"button",classes:[e,e+"--select"].concat(L(t.classes,(function(t){return e+"--"+t}))),attributes:k({},s)},components:Uv([u.map((function(t){return t.asSpec()})),i.map((function(t){return t.asSpec()})),bt.some(l)]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:Yu(M(M([],t.dropdownBehaviours,!0),[Nv((function(){return t.disabled||n.providers.isDisabled()})),ov(),qw.config({}),Ep.config({}),im("dropdown-events",[av(t,o),uv(t,o)]),im("menubutton-update-display-text",[Oo(mO,(function(t,e){i.bind((function(e){return e.getOpt(t)})).each((function(t){Ep.set(t,[ti(n.providers.translate(e.event.text))])}))})),Oo(pO,(function(t,e){u.bind((function(e){return e.getOpt(t)})).each((function(t){Ep.set(t,[vw(e.event.icon,n.providers.icons)])}))}))])],!1)),eventOrder:$r(dO,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:Yu([Cp.config({mode:"special",onLeft:r,onRight:r})]),lazySink:n.getSink,toggleClass:e+"--active",parts:{menu:Uh(0,t.columns,t.presets)},fetch:function(e){return ky(_(t.fetch,e))}}))).asSpec()}function _w(t){return"separator"===t.type}function ww(t,e,n,r){var o=Ro("primary-menu"),i=gO(t,n.shared.providers.menuItems());if(0===i.items.length)return bt.none();var a=Tb(o,i.items,e,n,r),u=nt(i.menus,(function(t,r){return Tb(r,t,e,n,!1)})),c=$r(u,uo(o,a));return bt.from(Yp.tieredData(o,c,i.expansions))}function xw(t){return{isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)},setActive:function(e){var n=t.element;e?($o(n,"tox-tbtn--enabled"),oe(n,"aria-pressed",!0)):(Go(n,"tox-tbtn--enabled"),se(n,"aria-pressed"))},isActive:function(){return Ko(t.element,"tox-tbtn--enabled")}}}function Ow(t,e,n,r){return yw({text:t.text,icon:t.icon,tooltip:t.tooltip,role:r,fetch:function(e,r){t.fetch((function(t){r(ww(t,dg.CLOSE_ON_EXECUTE,n,!1))}))},onSetup:t.onSetup,getApi:xw,columns:1,presets:"normal",classes:[],dropdownBehaviours:[Jb.config({})]},e,n.shared)}function Sw(t,e,n,r,o,i){void 0===n&&(n=[]);var a=e.fold((function(){return{}}),(function(t){return{action:t}})),u=k({buttonBehaviours:Yu([Nv((function(){return t.disabled||i.isDisabled()})),ov(),Jb.config({}),im("button press",[xo("click"),xo("mousedown")])].concat(n)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},a),c=$r(u,{dom:r});return $r(c,{components:o})}function Cw(t,e,n,r){void 0===r&&(r=[]);var o={tag:"button",classes:["tox-tbtn"],attributes:t.tooltip.map((function(t){return{"aria-label":n.translate(t),title:n.translate(t)}})).getOr({})},i=t.icon.map((function(t){return gw(t,n.icons)}));return Sw(t,e,r,o,Uv([i]),n)}function kw(t,e,n,r){void 0===r&&(r=[]);var o=Cw(t,bt.some(e),n,r);return nh.sketch(o)}function Ew(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=n.translate(t.text),a=t.icon?t.icon.map((function(t){return gw(t,n.icons)})):bt.none(),u=a.isSome()?Uv([a]):[],c=a.isSome()?{}:{innerHtml:i},s=M(M(M(M([],t.primary||t.borderless?["tox-button"]:["tox-button","tox-button--secondary"],!0),a.isSome()?["tox-button--icon"]:[],!0),t.borderless?["tox-button--naked"]:[],!0),o,!0);return Sw(t,e,r,k(k({tag:"button",classes:s},c),{attributes:{title:i}}),u,n)}function Mw(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=Ew(t,bt.some(e),n,r,o);return nh.sketch(i)}function Tw(t,e){return function(n){"custom"===e?vo(n,oy,{name:t,value:{}}):"submit"===e?go(n,iy):"cancel"===e&&go(n,ry)}}function Dw(t,e,n){if("menu"===e){var r=t,o=Am(Ow(k(k({},t),{onSetup:function(e){return e.setDisabled(t.disabled),a},fetch:(i=r.items,u=function(){return o},c=n,function(t){t(L(i,(function(t){var e,n,r=t.text.fold((function(){return{}}),(function(t){return{text:t}}));return k(k({type:t.type,active:!1},r),{onAction:function(t){var e=!t.isActive();t.setActive(e),n.storage.set(e),c.shared.getSink().each((function(t){u().getOpt(t).each((function(t){bu(t.element),vo(t,oy,{name:n.name,value:n.storage.get()})}))}))},onSetup:(e=n=t,function(t){t.setActive(e.storage.get())})})})))})}),"tox-tbtn",n,bt.none()));return o.asSpec()}var i,u,c;if("custom"===e||"cancel"===e||"submit"===e){var s=Tw(t.name,e);return Mw(k(k({},t),{borderless:!1}),s,n.shared.providers,[])}}function Aw(t,e){return Vf({factory:Xb,name:t,overrides:function(t){return{fieldBehaviours:Yu([im("coupled-input-behaviour",[Oo(bi(),(function(n){il(n,t,e).bind(td.getCurrent).each((function(e){il(n,t,"lock").each((function(r){Rp.isOn(r)&&t.onLockedChange(n,e,r)}))}))}))])])}}})}function Pw(t){var e=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(t);if(null===e)return jn.error(t);var n=parseFloat(e[1]),r=e[2];return jn.value({value:n,unit:r})}function Rw(t,e){function n(t){return Mt(r,t)}var r={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1};return t.unit===e?bt.some(t.value):n(t.unit)&&n(e)?r[t.unit]===r[e]?bt.some(t.value):bt.some(t.value/r[t.unit]*r[e]):bt.none()}function Iw(t){return bt.none()}function zw(t,e){function n(t){return Bm(t,{tag:"span",classes:["tox-icon","tox-lock-icon__"+t]},e.icons)}function r(t){return{dom:{tag:"div",classes:["tox-form__group"]},components:t}}function o(n){return Xb.parts.field({factory:fy,inputClasses:["tox-textfield"],inputBehaviours:Yu([ad.config({disabled:function(){return t.disabled||e.isDisabled()}}),ov(),Jb.config({}),im("size-input-events",[Oo(pi(),(function(t,e){vo(t,u,{isField1:n})})),Oo(yi(),(function(e,n){vo(e,ey,{name:t.name})}))])]),selectOnFocus:!1})}function i(t){return{dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}}var a=Iw,u=Ro("ratio-event"),c=yO.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:e.translate(t.label.getOr("Constrain proportions"))}},components:[n("lock"),n("unlock")],buttonBehaviours:Yu([ad.config({disabled:function(){return t.disabled||e.isDisabled()}}),ov(),Jb.config({})])}),s=yO.parts.field1(r([Xb.parts.label(i("Width")),o(!0)])),l=yO.parts.field2(r([Xb.parts.label(i("Height")),o(!1)]));return yO.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[s,l,r([i(" "),c])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(t,e,n){Pw(wf.getValue(t)).each((function(t){a(t).each((function(t){var n,r,o,i;wf.setValue(e,(i=-1!==(i=(n=t).value.toFixed((r=n.unit)in(o={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4})?o[r]:1)).indexOf(".")?i.replace(/\.?0*$/,""):i)+n.unit)}))}))},coupledFieldBehaviours:Yu([ad.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){yO.getField1(t).bind(Xb.getField).each(ad.disable),yO.getField2(t).bind(Xb.getField).each(ad.disable),yO.getLock(t).each(ad.disable)},onEnabled:function(t){yO.getField1(t).bind(Xb.getField).each(ad.enable),yO.getField2(t).bind(Xb.getField).each(ad.enable),yO.getLock(t).each(ad.enable)}}),ov(),im("size-input-events2",[Oo(u,(function(t,e){var n,r,o,i=e.event.isField1,u=i?yO.getField1(t):yO.getField2(t),c=i?yO.getField2(t):yO.getField1(t),s=u.map(wf.getValue).getOr("");n=c.map(wf.getValue).getOr(""),r=Pw(s).toOptional(),o=Pw(n).toOptional(),a=Tt(r,o,(function(t,e){return Rw(t,e.unit).map((function(t){return e.value/t})).map((function(t){return n=t,r=e.unit,function(t){return Rw(t,r).map((function(t){return{value:t*n,unit:r}}))};var n,r})).getOr(Iw)})).getOr(Iw)}))])])})}function Lw(t){if(v(t.changedTouches))for(var e="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<e.length;n++)t[e[n]]=t.changedTouches[0][e[n]]}function jw(t,e){return{uid:t.uid,dom:t.dom,components:e,behaviours:Ks(t.formBehaviours,[wf.config({store:{mode:"manual",getValue:function(e){return nt(cl(e,t),(function(t,e){return t().bind((function(t){var n=td.getCurrent(t),r=new Error("Cannot find a current component to extract the value from for form part '"+e+"': "+Po(t.element));return n.fold((function(){return jn.error(r)}),jn.value)})).map(wf.getValue)}))},setValue:function(e,n){et(n,(function(n,r){il(e,t,r).each((function(t){td.getCurrent(t).each((function(t){wf.setValue(t,n)}))}))}))}}})]),apis:{getField:function(e,n){return il(e,t,n).bind(td.getCurrent)}}}}function Bw(){return td.config({find:bt.some})}function Fw(t){return e=Do,n=Ao,W_(t,(function(t){return e(t.element)}),(function(t,e){return n(t.element,e)}));var e,n}(wy=_y=_y||{})[wy.HighlightFirst=0]="HighlightFirst",wy[wy.HighlightNone=1]="HighlightNone";var Nw,Hw,Vw,Uw,Ww=function(t,e){return t.getSystem().getByUid(e.uid+"-"+Iy()).map((function(t){return function(){return jn.value(t)}})).getOrThunk((function(){return e.lazySink.fold((function(){return function(){return jn.error(new Error("No internal sink is specified, nor could an external sink be found"))}}),(function(e){return function(){return e(t)}}))}))},$w=c([fr("dom"),fr("fetch"),$a("onOpen"),Ga("onExecute"),kr("getHotspot",bt.some),kr("getAnchorOverrides",c({})),Ic(),$s("dropdownBehaviours",[Rp,Ry,Cp,Dp]),fr("toggleClass"),kr("eventOrder",{}),yr("lazySink"),kr("matchWidth",!1),kr("useMinWidth",!1),yr("role")].concat(Vy())),Gw=c([Uf({schema:[Va()],name:"menu",defaults:function(t){return{onExecute:t.onExecute}}}),zy()]),Kw=gl({name:"Dropdown",configFields:$w(),partFields:Gw(),factory:function(t,e,n,r){function o(t){lf.getState(t).each((function(t){Yp.highlightPrimary(t)}))}function i(t,e){return bo(t),bt.some(!0)}var u,c={expand:function(e){Rp.isOn(e)||By(t,s,e,r,a,_y.HighlightNone).get(a)},open:function(e){Rp.isOn(e)||By(t,s,e,r,a,_y.HighlightFirst).get(a)},isOpen:Rp.isOn,close:function(e){Rp.isOn(e)&&By(t,s,e,r,a,_y.HighlightFirst).get(a)},repositionMenus:function(t){Rp.isOn(t)&&Hy(t)}};return{uid:t.uid,dom:t.dom,components:e,behaviours:Ks(t.dropdownBehaviours,[Rp.config({toggleClass:t.toggleClass,aria:{mode:"expanded"}}),Ry.config({others:{sandbox:function(e){return Ny(t,e,{onOpen:function(){return Rp.on(e)},onClose:function(){return Rp.off(e)}})}}}),Cp.config({mode:"special",onSpace:i,onEnter:i,onDown:function(t,e){return Kw.isOpen(t)?o(Ry.getCoupled(t,"sandbox")):Kw.open(t),bt.some(!0)},onEscape:function(t,e){return Kw.isOpen(t)?(Kw.close(t),bt.some(!0)):bt.none()}}),Dp.config({})]),events:pm(bt.some((function(e){By(t,s,e,r,o,_y.HighlightFirst).get(a)}))),eventOrder:k(k({},t.eventOrder),((u={})[Di()]=["disabling","toggling","alloy.base.behaviour"],u)),apis:c,domModification:{attributes:k(k({"aria-haspopup":"true"},t.role.fold((function(){return{}}),(function(t){return{role:t}}))),"button"===t.dom.tag?{type:at(t.dom,"attributes").bind((function(t){return at(t,"type")})).getOr("button")}:{})}}},apis:{open:function(t,e){return t.open(e)},expand:function(t,e){return t.expand(e)},close:function(t,e){return t.close(e)},isOpen:function(t,e){return t.isOpen(e)},repositionMenus:function(t,e){return t.repositionMenus(e)}}}),qw=hu({fields:[],name:"unselecting",active:Object.freeze({__proto__:null,events:function(){return Qi([wo(Si(),S)])},exhibit:function(){return No({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}})}),Xw=Ro("color-input-change"),Yw=Ro("color-swatch-change"),Jw=Ro("color-picker-cancel"),Qw=Wf({schema:[fr("dom")],name:"label"}),Zw=Uy("top-left"),tx=Uy("top"),ex=Uy("top-right"),nx=Uy("right"),rx=Uy("bottom-right"),ox=Uy("bottom"),ix=Uy("bottom-left"),ax=[Qw,Uy("left"),nx,tx,ox,Zw,ex,ix,rx,Vf({name:"thumb",defaults:c({dom:{styles:{position:"absolute"}}}),overrides:function(t){return{events:Qi([ko(ii(),t,"spectrum"),ko(ai(),t,"spectrum"),ko(ui(),t,"spectrum"),ko(si(),t,"spectrum"),ko(li(),t,"spectrum"),ko(di(),t,"spectrum")])}}}),Vf({schema:[ao("mouseIsDown",(function(){return zr(!1)}))],name:"spectrum",overrides:function(t){function e(e,r){return n.getValueFromEvent(r).map((function(r){return n.setValueFrom(e,t,r)}))}var n=t.model.manager;return{behaviours:Yu([Cp.config({mode:"special",onLeft:function(e){return n.onLeft(e,t)},onRight:function(e){return n.onRight(e,t)},onUp:function(e){return n.onUp(e,t)},onDown:function(e){return n.onDown(e,t)}}),Dp.config({})]),events:Qi([Oo(ii(),e),Oo(ai(),e),Oo(si(),e),Oo(li(),(function(n,r){t.mouseIsDown.get()&&e(n,r)}))])}}})],ux=c("slider.change.value"),cx="left",sx=P_(-1),lx=P_(1),fx=bt.none,dx=bt.none,mx={"top-left":bt.none(),top:bt.none(),"top-right":bt.none(),right:bt.some((function(t,e){h_(t,{x:Jy(e)})})),"bottom-right":bt.none(),bottom:bt.none(),"bottom-left":bt.none(),left:bt.some((function(t,e){h_(t,{x:Ky(e)})}))},px=Object.freeze({__proto__:null,setValueFrom:function(t,e,n){var r=A_(t,e,n);return D_(t,{x:r}),r},setToMin:function(t,e){D_(t,{x:$y(e)})},setToMax:function(t,e){D_(t,{x:Xy(e)})},findValueOfOffset:A_,getValueFromEvent:function(t){return Wy(t).map((function(t){return t.left}))},findPositionOfValue:R_,setPositionFromValue:function(t,e,n,r){var o=m_(n),i=R_(t,r.getSpectrum(t),o.x,r.getLeftEdge(t),r.getRightEdge(t),n),a=Ce(e.element)/2;de(e.element,"left",i-a+"px")},onLeft:sx,onRight:lx,onUp:fx,onDown:dx,edgeActions:mx}),hx=bt.none,gx=bt.none,vx=L_(-1),bx=L_(1),yx={"top-left":bt.none(),top:bt.some((function(t,e){h_(t,{y:qy(e)})})),"top-right":bt.none(),right:bt.none(),"bottom-right":bt.none(),bottom:bt.some((function(t,e){h_(t,{y:Qy(e)})})),"bottom-left":bt.none(),left:bt.none()},_x=Object.freeze({__proto__:null,setValueFrom:function(t,e,n){var r=z_(t,e,n);return I_(t,{y:r}),r},setToMin:function(t,e){I_(t,{y:Gy(e)})},setToMax:function(t,e){I_(t,{y:Yy(e)})},findValueOfOffset:z_,getValueFromEvent:function(t){return Wy(t).map((function(t){return t.top}))},findPositionOfValue:j_,setPositionFromValue:function(t,e,n,r){var o=m_(n),i=j_(t,r.getSpectrum(t),o.y,r.getTopEdge(t),r.getBottomEdge(t),n),a=we(e.element)/2;de(e.element,"top",i-a+"px")},onLeft:hx,onRight:gx,onUp:vx,onDown:bx,edgeActions:yx}),wx=Wy,xx=N_(-1,!1),Ox=N_(1,!1),Sx=N_(-1,!0),Cx=N_(1,!0),kx={"top-left":bt.some((function(t,e){h_(t,p_(Ky(e),qy(e)))})),top:bt.some((function(t,e){h_(t,p_(n_(e),qy(e)))})),"top-right":bt.some((function(t,e){h_(t,p_(Jy(e),qy(e)))})),right:bt.some((function(t,e){h_(t,p_(Jy(e),r_(e)))})),"bottom-right":bt.some((function(t,e){h_(t,p_(Jy(e),Qy(e)))})),bottom:bt.some((function(t,e){h_(t,p_(n_(e),Qy(e)))})),"bottom-left":bt.some((function(t,e){h_(t,p_(Ky(e),Qy(e)))})),left:bt.some((function(t,e){h_(t,p_(Ky(e),r_(e)))}))},Ex=Object.freeze({__proto__:null,setValueFrom:function(t,e,n){var r=F_(A_(t,e,n.left),z_(t,e,n.top));return B_(t,r),r},setToMin:function(t,e){B_(t,F_($y(e),Gy(e)))},setToMax:function(t,e){B_(t,F_(Xy(e),Yy(e)))},getValueFromEvent:wx,setPositionFromValue:function(t,e,n,r){var o=m_(n),i=R_(t,r.getSpectrum(t),o.x,r.getLeftEdge(t),r.getRightEdge(t),n),a=j_(t,r.getSpectrum(t),o.y,r.getTopEdge(t),r.getBottomEdge(t),n),u=Ce(e.element)/2,c=we(e.element)/2;de(e.element,"left",i-u+"px"),de(e.element,"top",a-c+"px")},onLeft:xx,onRight:Ox,onUp:Sx,onDown:Cx,edgeActions:kx}),Mx=gl({name:"Slider",configFields:[kr("stepSize",1),kr("onChange",a),kr("onChoose",a),kr("onInit",a),kr("onDragStart",a),kr("onDragEnd",a),kr("snapToGrid",!1),kr("rounded",!0),yr("snapStart"),dr("model",sr("mode",{x:[kr("minX",0),kr("maxX",100),ao("value",(function(t){return zr(t.mode.minX)})),fr("getInitialValue"),Xa("manager",px)],y:[kr("minY",0),kr("maxY",100),ao("value",(function(t){return zr(t.mode.minY)})),fr("getInitialValue"),Xa("manager",_x)],xy:[kr("minX",0),kr("maxX",100),kr("minY",0),kr("maxY",100),ao("value",(function(t){return zr({x:t.mode.minX,y:t.mode.minY})})),fr("getInitialValue"),Xa("manager",Ex)]})),$s("sliderBehaviours",[Cp,wf]),ao("mouseIsDown",(function(){return zr(!1)}))],partFields:ax,factory:function(t,e,n,r){function o(e){return al(e,t,"thumb")}function i(e){return al(e,t,"spectrum")}function a(e){return il(e,t,"left-edge")}function u(e){return il(e,t,"right-edge")}function c(e){return il(e,t,"top-edge")}function s(e){return il(e,t,"bottom-edge")}function l(e,n){v.setPositionFromValue(e,n,t,{getLeftEdge:a,getRightEdge:u,getTopEdge:c,getBottomEdge:s,getSpectrum:i})}function f(t,e){g.value.set(e),l(t,o(t))}function d(e){var n=t.mouseIsDown.get();t.mouseIsDown.set(!1),n&&il(e,t,"thumb").each((function(n){var r=g.value.get();t.onChoose(e,n,r)}))}function m(e,n){n.stop(),t.mouseIsDown.set(!0),t.onDragStart(e,o(e))}function p(e,n){n.stop(),t.onDragEnd(e,o(e)),d(e)}var h,g=t.model,v=g.manager;return{uid:t.uid,dom:t.dom,components:e,behaviours:Ks(t.sliderBehaviours,[Cp.config({mode:"special",focusIn:function(e){return il(e,t,"spectrum").map(Cp.focusIn).map(S)}}),wf.config({store:{mode:"manual",getValue:function(t){return g.value.get()}}}),tc.config({channels:((h={})[mf()]={onReceive:d},h)})]),events:Qi([Oo(ux(),(function(e,n){!function(e,n){f(e,n);var r=o(e);t.onChange(e,r,n),bt.some(!0)}(e,n.event.value)})),Zi((function(e,n){var r=g.getInitialValue();g.value.set(r);var a=o(e);l(e,a);var u=i(e);t.onInit(e,a,u,g.value.get())})),Oo(ii(),m),Oo(ui(),p),Oo(si(),m),Oo(di(),p)]),apis:{resetToMin:function(e){v.setToMin(e,t)},resetToMax:function(e){v.setToMax(e,t)},setValue:f,refresh:l},domModification:{styles:{position:"relative"}}}},apis:{setValue:function(t,e,n){t.setValue(e,n)},resetToMin:function(t,e){t.resetToMin(e)},resetToMax:function(t,e){t.resetToMax(e)},refresh:function(t,e){t.refresh(e)}}}),Tx=Ro("rgb-hex-update"),Dx=Ro("slider-update"),Ax=Ro("palette-update"),Px=[$s("formBehaviours",[wf])],Rx={getField:Bo((function(t,e,n){return t.getField(e,n)})),sketch:function(t){var e,n={field:function(t,n){return e.push(t),tl("form",H_(t),n)},record:c(e=[])},r=t(n),o=L(n.record(),(function(t){return Vf({name:t,pname:H_(t)})}));return pl("form",Px,o,jw,r)}},Ix=Ro("valid-input"),zx=Ro("invalid-input"),Lx=Ro("validating-input"),jx="colorcustom.rgb.",Bx=function(t){return td.config({find:t.getOpt})},Fx=function(t){return td.config({find:function(e){return Jt(e.element,t).bind((function(t){return e.getSystem().getByDom(t).toOptional()}))}})},Nx={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},Hx=tinymce.util.Tools.resolve("tinymce.Resource"),Vx=tinymce.util.Tools.resolve("tinymce.util.Tools"),Ux=Xr([kr("preprocess",s),kr("postprocess",s)]),Wx=function(t,e){var n=cr("RepresentingConfigs.memento processors",Ux,e);return wf.config({store:{mode:"manual",getValue:function(e){var r=t.get(e),o=wf.getValue(r);return n.postprocess(o)},setValue:function(e,r){var o=n.preprocess(r),i=t.get(e);wf.setValue(i,o)}}})},$x=W_,Gx=function(t){return wf.config({store:{mode:"memory",initialValue:t}})},Kx=Ro("alloy-fake-before-tabstop"),qx=Ro("alloy-fake-after-tabstop"),Xx=!(fn().browser.isIE()||fn().browser.isEdge()),Yx=function(t){return t.getContext("2d")},Jx=function(t,e,n){return t.width=e,t.height=n,t},Qx=function(t){URL.revokeObjectURL(t.src)},Zx=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10],tO=function(t,e,n){var r=Yx(t),o=function(t){for(var e,r,o,i,a=t.data,u=n[0],c=n[1],s=n[2],l=n[3],f=n[4],d=n[5],m=n[6],p=n[7],h=n[8],g=n[9],v=n[10],b=n[11],y=n[12],_=n[13],w=n[14],x=n[15],O=n[16],S=n[17],C=n[18],k=n[19],E=0;E<a.length;E+=4)e=a[E],r=a[E+1],o=a[E+2],i=a[E+3],a[E]=e*u+r*c+o*s+i*l+f,a[E+1]=e*d+r*m+o*p+i*h+g,a[E+2]=e*v+r*b+o*y+i*_+w,a[E+3]=e*x+r*O+o*S+i*C+k;return t}(r.getImageData(0,0,t.width,t.height));return r.putImageData(o,0,0),nw(t,e)},eO=(Nw=[-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0,0,0,0,0,1],function(t){return iw(t,Nw)}),nO=aw((function(t,e){return ow(t,[1,0,0,0,e=rw(255*e,-255,255),0,1,0,0,e,0,0,1,0,e,0,0,0,1,0,0,0,0,0,1])})),rO=aw((function(t,e){var n;return e=rw(e,-1,1),ow(t,[(n=(e*=100)<0?127+e/100*127:127*(0==(n=e%1)?Zx[e]:Zx[Math.floor(e)]*(1-n)+Zx[Math.floor(e)+1]*n)+127)/127,0,0,0,.5*(127-n),0,n/127,0,0,.5*(127-n),0,0,n/127,0,.5*(127-n),0,0,0,1,0,0,0,0,0,1])})),oO=(Hw=[0,-1,0,-1,5,-1,0,-1,0],function(t){return n=Hw,(e=t).toCanvas().then((function(t){return r=t,o=e.getType(),i=n,u=function(t,e,n){for(var r=function(t,e,n){return n<t?t=n:t<e&&(t=e),t},o=Math.round(Math.sqrt(n.length)),i=Math.floor(o/2),a=t.data,u=e.data,c=t.width,s=t.height,l=0;l<s;l++)for(var f=0;f<c;f++){for(var d=0,m=0,p=0,h=0;h<o;h++)for(var g=0;g<o;g++){var v=r(f+g-i,0,c-1),b=4*(r(l+h-i,0,s-1)*c+v),y=n[h*o+g];d+=a[b]*y,m+=a[1+b]*y,p+=a[2+b]*y}var _=4*(l*c+f);u[_]=r(d,0,255),u[1+_]=r(m,0,255),u[2+_]=r(p,0,255)}return e}((a=Yx(r)).getImageData(0,0,r.width,r.height),a.getImageData(0,0,r.width,r.height),i),a.putImageData(u,0,0),nw(r,o);var r,o,i,a,u}));var e,n}),iO=(Vw=function(t,e){return 255*Math.pow(t/255,1-e)},function(t,e){return t.toCanvas().then((function(n){return function(t,e,n){for(var r=Yx(t),o=new Array(256),i=0;i<o.length;i++)o[i]=Vw(i,n);var a=function(t,e){for(var n=t.data,r=0;r<n.length;r+=4)n[r]=e[n[r]],n[r+1]=e[n[r+1]],n[r+2]=e[n[r+2]];return t}(r.getImageData(0,0,t.width,t.height),o);return r.putImageData(a,0,0),nw(t,e)}(n,t.getType(),e)}))}),aO=function(t,e,n){var r=Q_(t),o=Z_(t),i=e/r,a=n/o,u=!1;(i<.5||2<i)&&(i=i<.5?.5:2,u=!0),(a<.5||2<a)&&(a=a<.5?.5:2,u=!0);var c=uO(t,i,a);return u?c.then((function(t){return aO(t,e,n)})):c},uO=function(t,e,n){return new xy((function(r){var o=Q_(t),i=Z_(t),a=Math.floor(o*e),u=Math.floor(i*n),c=Y_(a,u);Yx(c).drawImage(t,0,0,o,i,0,0,a,u),r(c)}))},cO=function(t,e,n){var r=(n<0?360+n:n)*Math.PI/180,o=t.width,i=t.height,a=Math.sin(r),u=Math.cos(r),c=uw(Math.abs(o*u)+Math.abs(i*a)),s=uw(Math.abs(o*a)+Math.abs(i*u)),l=Y_(c,s),f=Yx(l);return f.translate(c/2,s/2),f.rotate(r),f.drawImage(t,-o/2,-i/2),nw(l,e)},sO=function(t,e,n){var r=Y_(t.width,t.height),o=Yx(r);return"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0)),nw(r,e)},lO=function(t,e,n,r,o,i){var a=Y_(o,i);return Yx(a).drawImage(t,-n,-r),nw(a,e)},fO=Ro("toolbar.button.execute"),dO=((Uw={})[Di()]=["disabling","alloy.base.behaviour","toggling","toolbar-button-events"],Uw),mO=Ro("update-menu-text"),pO=Ro("update-menu-icon"),hO={type:"separator"},gO=function(t,e){var n,r,o;return F((n=f(t)?t.split(" "):t,r=e,0<(o=N(n,(function(t,e){return f(e)?""===e?t:"|"===e?0<t.length&&!_w(t[t.length-1])?t.concat([hO]):t:Mt(r,e.toLowerCase())?t.concat([r[e.toLowerCase()]]):t:t.concat([e])}),[])).length&&_w(o[o.length-1])&&o.pop(),o),(function(t,n){var r,o,i,a,u,c,s=function(t){if(_w(t))return t;var e=at(t,"value").getOrThunk((function(){return Ro("generated-menu-item")}));return $r({value:e},t)}(n),l=(o=e,Mt(r=s,"getSubmenuItems")?(a=o,u=(i=r).getSubmenuItems(),c=gO(u,a),{item:i,menus:$r(c.menus,uo(i.value,c.items)),expansions:$r(c.expansions,uo(i.value,i.value))}):{item:r,menus:{},expansions:{}});return{menus:$r(t.menus,l.menus),items:[l.item].concat(t.items),expansions:$r(t.expansions,l.expansions)}}),{menus:{},expansions:{},items:[]})},vO=c([kr("field1Name","field1"),kr("field2Name","field2"),Ka("onLockedChange"),Ua(["lockClass"]),kr("locked",!1),xf("coupledFieldBehaviours",[td,wf])]),bO=c([Aw("field1","field2"),Aw("field2","field1"),Vf({factory:nh,schema:[fr("dom")],name:"lock",overrides:function(t){return{buttonBehaviours:Yu([Rp.config({selected:t.locked,toggleClass:t.markers.lockClass,aria:{mode:"pressed"}})])}}})]),yO=gl({name:"FormCoupledInputs",configFields:vO(),partFields:bO(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:Of(t.coupledFieldBehaviours,[td.config({find:bt.some}),wf.config({store:{mode:"manual",getValue:function(e){var n=ll(e,t,["field1","field2"]),r={};return r[t.field1Name]=wf.getValue(n.field1()),r[t.field2Name]=wf.getValue(n.field2()),r},setValue:function(e,n){var r=ll(e,t,["field1","field2"]);ut(n,t.field1Name)&&wf.setValue(r.field1(),n[t.field1Name]),ut(n,t.field2Name)&&wf.setValue(r.field2(),n[t.field2Name])}}})]),apis:{getField1:function(e){return il(e,t,"field1")},getField2:function(e){return il(e,t,"field2")},getLock:function(e){return il(e,t,"lock")}}}},apis:{getField1:function(t,e){return t.getField1(e)},getField2:function(t,e){return t.getField2(e)},getLock:function(t,e){return t.getLock(e)}}}),_O={undo:c(Ro("undo")),redo:c(Ro("redo")),zoom:c(Ro("zoom")),back:c(Ro("back")),apply:c(Ro("apply")),swap:c(Ro("swap")),transform:c(Ro("transform")),tempTransform:c(Ro("temp-transform")),transformApply:c(Ro("transform-apply"))},wO=c("save-state"),xO=c("disable"),OO=c("enable"),SO={formActionEvent:oy,saveState:wO,disable:xO,enable:OO},CO=tinymce.util.Tools.resolve("tinymce.geom.Rect"),kO=tinymce.util.Tools.resolve("tinymce.util.Observable"),EO=tinymce.util.Tools.resolve("tinymce.util.VK");function MO(t,e,n,r,o){return kw({name:t,icon:bt.some(e),disabled:n,tooltip:bt.some(t),primary:!1,borderless:!1},r,o)}function TO(t,e){e?ad.enable(t):ad.disable(t)}var DO=0,AO=function(t,e,n,r,o){function i(t,e){return{x:e.x-t.x,y:e.y-t.y,w:e.w,h:e.h}}function a(e,r,o,a){var u=r.x+o*e.deltaX,c=r.y+a*e.deltaY,s=Math.max(20,r.w+o*e.deltaW),l=Math.max(20,r.h+a*e.deltaH),f=(t=CO.clamp({x:u,y:c,w:s,h:l},n,"move"===e.name),i(n,t));y.fire("updateRect",{rect:f}),g(f)}function u(e){c(t=e)}function c(t){function n(t,e){Da(m,"#"+d+"-"+t).each((function(t){me(t,{left:e.x+"px",top:e.y+"px",width:Math.max(0,e.w)+"px",height:Math.max(0,e.h)+"px"})}))}Ot(p,(function(e){Da(m,"#"+d+"-"+e.name).each((function(n){me(n,{left:t.w*e.xMul+t.x+"px",top:t.h*e.yMul+t.y+"px"})}))})),n("top",{x:e.x,y:e.y,w:e.w,h:t.y-e.y}),n("right",{x:t.x+t.w,y:t.y,w:e.w-t.x-t.w+e.x,h:t.h}),n("bottom",{x:e.x,y:t.y+t.h,w:e.w,h:e.h-t.y-t.h+e.y}),n("left",{x:e.x,y:t.y,w:t.x-e.x,h:t.h}),n("move",t)}var s,l,f=[],d="tox-crid-"+DO++,m=Rt.fromDom(r),p=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}],h=["top","right","bottom","left"],g=function(t){var e;u((e=n,{x:t.x+e.x,y:t.y+e.y,w:t.w,h:t.h}))};function b(t){oe(t.target,"aria-grabbed","focus"===t.raw.type?"true":"false")}ie(l=Rt.fromTag("div"),{id:d,class:"tox-croprect-container",role:"grid","aria-dropeffect":"execute"}),Mn(m,l),Ot(h,(function(t){Da(m,"#"+d).each((function(e){var n=Rt.fromTag("div");ie(n,{id:d+"-"+t,class:"tox-croprect-block","data-mce-bogus":"all"}),de(n,"display","none"),Mn(e,n)}))})),Ot(p,(function(t){Da(m,"#"+d).each((function(e){var n=Rt.fromTag("div");ie(n,{id:d+"-"+t.name,"aria-label":t.label,"aria-grabbed":"false","data-mce-bogus":"all",role:"gridcell",tabindex:"-1",title:t.label}),qo(n,["tox-croprect-handle","tox-croprect-handle-"+t.name]),de(n,"display","none"),Mn(e,n)}))})),s=L(p,(function(e){var n;return function(t,e){function n(t){var n,o,i,a,f,p,v,y,_=t.raw,w=(n=Math.max,o=m.documentElement,i=m.body,a=n(o.scrollWidth,i.scrollWidth),f=n(o.clientWidth,i.clientWidth),p=n(o.offsetWidth,i.offsetWidth),v=n(o.scrollHeight,i.scrollHeight),y=n(o.clientHeight,i.clientHeight),{width:a<p?f:a,height:v<n(o.offsetHeight,i.offsetHeight)?y:v});Lw(_),t.prevent(),c=_.button,s=_.screenX,l=_.screenY;var x=he(g,"cursor");me(u=Rt.fromTag("div",m),{position:"absolute",top:"0",left:"0",width:w.width+"px",height:w.height+"px","z-index":"2147483647",opacity:"0.0001",cursor:x}),Mn(_n(h),u),d.push(sc(h,"mousemove",r),sc(h,"touchmove",r),sc(h,"mouseup",b),sc(h,"touchend",b)),e.start(_)}function r(t){var n=t.raw;if(Lw(n),n.button!==c)return b(t);n.deltaX=n.screenX-s,n.deltaY=n.screenY-l,t.prevent(),e.drag(n)}var o,i,a,u,c,s,l,f=[],d=[],m=null!==(o=e.document)&&void 0!==o?o:document,p=null!==(i=e.root)&&void 0!==i?i:m,h=Rt.fromDom(m),g=Rt.fromDom(p.getElementById(null!==(a=e.handle)&&void 0!==a?a:t)),b=function(t){Lw(t.raw),Ot(d,(function(t){return t.unbind()})),d=[],Tn(u),e.stop&&e.stop(t.raw)};return f.push(sc(g,"mousedown",n),sc(g,"touchstart",n)),{destroy:function(){Ot(d.concat(f),(function(t){return t.unbind()})),d=[],f=[],v(u)&&Tn(u)}}}(d,{document:r.ownerDocument,root:hn(m).dom,handle:d+"-"+e.name,start:function(){n=t},drag:function(t){a(e,n,t.deltaX,t.deltaY)}})})),c(t),f.push(sc(m,"focusin",b),sc(m,"focusout",b),sc(m,"keydown",(function(e){var n;function r(t,e,r,o,i){t.stopPropagation(),t.preventDefault(),a(n,r,o,i)}switch(Ot(p,(function(t){if(ae(e.target,"id")===d+"-"+t.name)return n=t,!1})),e.raw.keyCode){case EO.LEFT:r(e,0,t,-10,0);break;case EO.RIGHT:r(e,0,t,10,0);break;case EO.UP:r(e,0,t,0,-10);break;case EO.DOWN:r(e,0,t,0,10);break;case EO.ENTER:case EO.SPACEBAR:e.prevent(),o()}})));var y=k(k({},kO),{toggleVisibility:function(t){var e=M(M([],L(p,(function(t){return"#"+d+"-"+t.name})),!0),L(h,(function(t){return"#"+d+"-"+t})),!0).join(","),n=ss(m,e);Ot(n,t?function(t){return be(t,"display")}:function(t){return de(t,"display","none")})},setClampRect:function(e){n=e,c(t)},setRect:u,getInnerRect:function(){return i(n,t)},setInnerRect:g,setViewPortRect:function(n){e=n,c(t)},destroy:function(){Ot(s,(function(t){return t.destroy()})),s=[],Ot(f,(function(t){return t.unbind()})),f=[]}});return y};function PO(t,e){function n(t){var e=w.getHistoryStates();C.updateButtonUndoStates(t,e.undoEnabled,e.redoEnabled),vo(t,SO.formActionEvent,{name:SO.saveState(),value:e.undoEnabled})}function r(t){return t.toBlob()}function o(t){vo(t,SO.formActionEvent,{name:SO.disable(),value:{}})}function i(t,e,i,a,u){o(t),function(t){return e=t,new xy((function(t){var n=new FileReader;n.onloadend=function(){t(n.result)},n.readAsDataURL(e)})).then((function(e){return ew((n=t,new xy((function(t,e){function r(){i.removeEventListener("load",a),i.removeEventListener("error",u)}var o=URL.createObjectURL(n),i=new Image,a=function(){r(),t(i)},u=function(){r(),e("Unable to load data of type "+n.type+": "+o)};i.addEventListener("load",a),i.addEventListener("error",u),i.src=o,i.complete&&setTimeout(a,0)})).then((function(t){Qx(t);var e=Y_(Q_(t),Z_(t));return Yx(e).drawImage(t,0,0),e}))),t,e);var n}));var e}(e).then(i).then(r).then(a).then((function(e){return O(t,e)})).then((function(){n(t),u(),x(t)})).catch((function(e){t.getSystem().isConnected()&&x(t)}))}function u(t,e,n){i(t,w.getBlobState().blob,e,(function(t){return w.updateTempState(t)}),n)}function s(t){var e=w.getBlobState().url;return w.destroyTempState(),n(t),e}var l,f,d,m,p,h,g,v,b,y,_,w=function(t){var e,n,r,o,i=zr(t),u=cc(),c=(n=-1,{data:e=[],add:function(t){var r=e.splice(++n);return e.push(t),{state:t,removed:r}},undo:function(){if(r())return e[--n]},redo:function(){if(o())return e[++n]},canUndo:r=function(){return 0<n},canRedo:o=function(){return-1!==n&&n<e.length-1}});function s(t){i.set(t)}function l(t){URL.revokeObjectURL(t.url)}function f(t){var e=d(t);s(e);var n=c.add(e).removed;return Vx.each(n,l),e.url}function d(t){return{blob:t,url:URL.createObjectURL(t)}}function m(){u.on(l),u.clear()}return c.add(t),{getBlobState:function(){return i.get()},setBlobState:s,addBlobState:f,getTempState:function(){return u.get().getOrThunk(i.get)},updateTempState:function(t){var e=d(t);return m(),u.set(e),e.url},addTempState:function(t){var e=d(t);return u.set(e),e.url},applyTempState:function(t){return u.get().fold(a,(function(e){f(e.blob),t()}))},destroyTempState:m,undo:function(){var t=c.undo();return s(t),t.url},redo:function(){var t=c.redo();return s(t),t.url},getHistoryStates:function(){return{undoEnabled:c.canUndo(),redoEnabled:c.canRedo()}}}}(t.currentState),x=function(t){E.getApplyButton(t).each((function(t){ad.enable(t)})),vo(t,SO.formActionEvent,{name:SO.enable(),value:{}})},O=function(t,e){return o(t),S.updateSrc(t,e)},S=(m=t.currentState.url,h=Am({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),g=zr(1),p=ac(),v=k(k({},p),{run:function(t){return p.get().each(t)}}),b=zr({x:0,y:0,w:1,h:1}),y=zr({x:0,y:0,w:1,h:1}),{memContainer:_=Am(Gb.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[h.asSpec(),{dom:{tag:"img",attributes:{src:m}}},{dom:{tag:"div"},behaviours:Yu([im("image-panel-crop-events",[Zi((function(t){_.getOpt(t).each((function(t){var e=t.element.dom,n=AO({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},e,a);n.toggleVisibility(!1),n.on("updateRect",(function(t){var e=t.rect,n=g.get(),r={x:Math.round(e.x/n),y:Math.round(e.y/n),w:Math.round(e.w/n),h:Math.round(e.h/n)};b.set(r)})),v.set(n)}))})),ta((function(){v.clear()}))])])}],containerBehaviours:Yu([Ep.config({}),im("image-panel-events",[Zi((function(t){T(t,m)}))])])})),updateSrc:T,zoom:function(t,e){var n=g.get(),r=0<e?Math.min(2,n+.1):Math.max(.1,n-.1);g.set(r),_.getOpt(t).each((function(t){var e=t.components()[1].element;M(t,e)}))},showCrop:function(){v.run((function(t){t.toggleVisibility(!0)}))},hideCrop:function(){v.run((function(t){t.toggleVisibility(!1)}))},getRect:function(){return b.get()},getMeasurements:function(){var t=y.get();return{width:t.w,height:t.h}}}),C=(f=Am(MO("Undo","undo",!0,(function(t){vo(t,_O.undo(),{direction:1})}),l=e)),d=Am(MO("Redo","redo",!0,(function(t){vo(t,_O.redo(),{direction:1})}),l)),{container:Gb.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[f.asSpec(),d.asSpec(),MO("Zoom in","zoom-in",!1,(function(t){vo(t,_O.zoom(),{direction:1})}),l),MO("Zoom out","zoom-out",!1,(function(t){vo(t,_O.zoom(),{direction:-1})}),l)]}),updateButtonUndoStates:function(t,e,n){f.getOpt(t).each((function(t){TO(t,e)})),d.getOpt(t).each((function(t){TO(t,n)}))}}),E=function(t,e){function n(t,n,r,o){return Am(Mw({name:t,text:t,disabled:r,primary:o,icon:bt.none(),borderless:!1},n,e))}function r(t,n,r,o){return Am(kw({name:t,icon:bt.some(t),tooltip:bt.some(n),disabled:o,primary:!1,borderless:!1},r,e))}function o(t,e){t.map((function(t){var n=t.get(e);n.hasConfigured(ad)&&ad.disable(n)}))}function i(t,e){t.map((function(t){var n=t.get(e);n.hasConfigured(ad)&&ad.enable(n)}))}function u(t,e,n){vo(t,e,n)}function s(t){return go(t,SO.disable()),0}function l(t){return go(t,SO.enable()),0}function f(t,e){s(t),u(t,_O.transform(),{transform:e}),l(t)}function d(t){return function(){Y.getOpt(t).each((function(t){Ep.set(t,[X])}))}}function m(t,e){s(t),u(t,_O.transformApply(),{transform:e,swap:d(t)}),l(t)}function p(){return n("Back",(function(t){return u(t,_O.back(),{swap:d(t)})}),!1,!1)}function h(){return Am({dom:{tag:"div",classes:["tox-spacer"]},behaviours:Yu([ad.config({})])})}function g(){return n("Apply",(function(t){return u(t,_O.apply(),{swap:d(t)})}),!0,!0)}function v(t,e){return function(n){return t(n,e)}}function b(t,e){var n,r=e;s(n=t),u(n,_O.tempTransform(),{transform:r}),l(n)}function y(t,n,r,o,i){var a=Mx.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}),u=Mx.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),s=Mx.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return Am(Mx.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:r,maxX:i,getInitialValue:c({x:o})},components:[a,u,s],sliderBehaviours:Yu([Dp.config({})]),onChoose:n}))}function _(t,e,n,r,a){var u,c,s,l,d,m,h=(u=t,c=e,s=n,l=r,d=a,[p(),(m=c,y(u,(function(t,e,n){f(t,v(m,n.x/100))}),s,l,d)),g()]);return Gb.sketch({dom:O,components:h.map((function(t){return t.asSpec()})),containerBehaviours:Yu([im("image-tools-filter-panel-buttons-events",[Oo(SO.disable(),(function(t,e){o(h,t)})),Oo(SO.enable(),(function(t,e){i(h,t)}))])])})}function w(t){return y(t,(function(t,e,n){var r=H.getOpt(t),o=U.getOpt(t),i=V.getOpt(t);r.each((function(e){o.each((function(n){i.each((function(r){var o,i,a,u=wf.getValue(e).x/100,c=wf.getValue(r).x/100,s=wf.getValue(n).x/100,l=(o=u,i=c,a=s,function(t){return iw(t,(e=i,n=a,ow([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],[rw(o,0,2),0,0,0,0,0,rw(e,0,2),0,0,0,0,0,rw(n,0,2),0,0,0,0,0,1,0,0,0,0,0,1])));var e,n});f(t,l)}))}))}))}),0,100,200)}function x(t,e,n){return function(r){u(r,_O.swap(),{transform:e,swap:function(){Y.getOpt(r).each((function(e){Ep.set(e,[t]),n(e)}))}})}}var O={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},S=a,C=[p(),h(),n("Apply",(function(e){m(e,(function(e){var n,r,o,i,a,u,c,s,l,f=t.getRect();return n=f.x,r=f.y,o=f.w,i=f.h,u=n,c=r,s=o,l=i,(a=e).toCanvas().then((function(t){return lO(t,a.getType(),u,c,s,l)}))})),t.hideCrop()}),!1,!0)],k=Gb.sketch({dom:O,components:C.map((function(t){return t.asSpec()})),containerBehaviours:Yu([im("image-tools-crop-buttons-events",[Oo(SO.disable(),(function(t,e){o(C,t)})),Oo(SO.enable(),(function(t,e){i(C,t)}))])])}),E=Am(zw({name:"size",label:bt.none(),constrain:!0,disabled:!1},e)),M=[p(),h(),E,h(),n("Apply",(function(t){E.getOpt(t).each((function(e){var n,r,o=wf.getValue(e),i=parseInt(o.width,10),a=parseInt(o.height,10),u=(n=i,r=a,function(t){return o=n,i=r,(e=t).toCanvas().then((function(t){return aO(t,o,i).then((function(t){return nw(t,e.getType())}))}));var e,o,i});m(t,u)}))}),!1,!0)],T=Gb.sketch({dom:O,components:M.map((function(t){return t.asSpec()})),containerBehaviours:Yu([im("image-tools-resize-buttons-events",[Oo(SO.disable(),(function(t,e){o(M,t)})),Oo(SO.enable(),(function(t,e){i(M,t)}))])])}),D=v(mw,"h"),A=v(mw,"v"),P=v(pw,-90),R=v(pw,90),I=[p(),h(),r("flip-horizontally","Flip horizontally",(function(t){b(t,D)}),!1),r("flip-vertically","Flip vertically",(function(t){b(t,A)}),!1),r("rotate-left","Rotate counterclockwise",(function(t){b(t,P)}),!1),r("rotate-right","Rotate clockwise",(function(t){b(t,R)}),!1),h(),g()],z=Gb.sketch({dom:O,components:I.map((function(t){return t.asSpec()})),containerBehaviours:Yu([im("image-tools-fliprotate-buttons-events",[Oo(SO.disable(),(function(t,e){o(I,t)})),Oo(SO.enable(),(function(t,e){i(I,t)}))])])}),L=[p(),h(),g()],j=Gb.sketch({dom:O,components:L.map((function(t){return t.asSpec()}))}),B=_("Brightness",fw,-100,0,100),F=_("Contrast",dw,-100,0,100),N=_("Gamma",lw,-100,0,100),H=w("R"),V=w("G"),U=w("B"),W=[p(),H,V,U,g()],$=Gb.sketch({dom:O,components:W.map((function(t){return t.asSpec()}))}),G=bt.some(sw),K=bt.some(cw),q=[r("crop","Crop",x(k,bt.none(),(function(e){t.showCrop()})),!1),r("resize","Resize",x(T,bt.none(),(function(e){E.getOpt(e).each((function(e){var n=t.getMeasurements(),r=n.width,o=n.height;wf.setValue(e,{width:r,height:o})}))})),!1),r("orientation","Orientation",x(z,bt.none(),S),!1),r("brightness","Brightness",x(B,bt.none(),S),!1),r("sharpen","Sharpen",x(j,G,S),!1),r("contrast","Contrast",x(F,bt.none(),S),!1),r("color-levels","Color levels",x($,bt.none(),S),!1),r("gamma","Gamma",x(N,bt.none(),S),!1),r("invert","Invert",x(j,K,S),!1)],X=Gb.sketch({dom:O,components:q.map((function(t){return t.asSpec()}))}),Y=Am(Gb.sketch({dom:{tag:"div"},components:[X],containerBehaviours:Yu([Ep.config({})])}));return{memContainer:Y,getApplyButton:function(t){return Y.getOpt(t).map((function(t){var e=t.components()[0];return e.components()[e.components().length-1]}))}}}(S,e);function M(t,e){_.getOpt(t).each((function(t){var n=g.get(),r=Ce(t.element),o=we(t.element),i=e.dom.naturalWidth*n,a=e.dom.naturalHeight*n,u=Math.max(0,r/2-i/2),c=Math.max(0,o/2-a/2),s={left:u.toString()+"px",top:c.toString()+"px",width:i.toString()+"px",height:a.toString()+"px",position:"absolute"};me(e,s),h.getOpt(t).each((function(t){me(t.element,s)})),v.run((function(t){var e=b.get();t.setRect({x:e.x*n+u,y:e.y*n+c,w:e.w*n,h:e.h*n}),t.setClampRect({x:u,y:c,w:i,h:a}),t.setViewPortRect({x:0,y:0,w:r,h:o})}))}))}function T(t,e){var n,r=Rt.fromTag("img");return oe(r,"src",e),n=r.dom,new xh((function(t){var e=function(){n.removeEventListener("load",e),t(n)};n.complete?t(n):n.addEventListener("load",e)})).then((function(){t.getSystem().isConnected()&&_.getOpt(t).map((function(t){var e=wa({element:r});Ep.replaceAt(t,1,bt.some(e));var n=y.get(),o={x:0,y:0,w:r.dom.naturalWidth,h:r.dom.naturalHeight};y.set(o);var i,a=CO.inflate(o,-20,-20);b.set(a),n.w===o.w&&n.h===o.h||(i=r,_.getOpt(t).each((function(t){var e=Ce(t.element),n=we(t.element),r=i.dom.naturalWidth,o=i.dom.naturalHeight,a=Math.min(e/r,n/o);1<=a?g.set(1):g.set(a)}))),M(t,r)}))}))}return{dom:{tag:"div",attributes:{role:"presentation"}},components:[E.memContainer.asSpec(),S.memContainer.asSpec(),C.container],behaviours:Yu([wf.config({store:{mode:"manual",getValue:function(){return w.getBlobState()}}}),im("image-tools-events",[Oo(_O.undo(),(function(t,e){var r=w.undo();O(t,r).then((function(e){x(t),n(t)}))})),Oo(_O.redo(),(function(t,e){var r=w.redo();O(t,r).then((function(e){x(t),n(t)}))})),Oo(_O.zoom(),(function(t,e){var n=e.event.direction;S.zoom(t,n)})),Oo(_O.back(),(function(t,e){var n,r=s(n=t);O(n,r).then((function(t){x(n)})),(0,e.event.swap)(),S.hideCrop()})),Oo(_O.apply(),(function(t,e){w.applyTempState((function(){s(t),(0,e.event.swap)()}))})),Oo(_O.transform(),(function(t,e){return u(t,e.event.transform,a)})),Oo(_O.tempTransform(),(function(t,e){var n=e.event.transform;i(t,w.getTempState().blob,n,(function(t){return w.addTempState(t)}),a)})),Oo(_O.transformApply(),(function(t,e){var n=t,r=e.event.transform,o=e.event.swap,a=w.getBlobState().blob;i(n,a,r,(function(t){var e=w.addBlobState(t);return s(n),e}),o)})),Oo(_O.swap(),(function(t,e){C.updateButtonUndoStates(t,!1,!1);var n=e.event.transform,r=e.event.swap;n.fold((function(){r()}),(function(e){u(t,e,r)}))}))]),Bw()])}}function RO(t){return!Mt(t,"items")}function IO(t,e){var n=t.label.map((function(t){return Fb(t,e)})),r=[ad.config({disabled:function(){return t.disabled||e.isDisabled()}}),ov(),Cp.config({mode:"execution",useEnter:!0!==t.multiline,useControlEnter:!0===t.multiline,execute:function(t){return go(t,iy),bt.some(!0)}}),im("textfield-change",[Oo(bi(),(function(e,n){vo(e,ey,{name:t.name})})),Oo(Mi(),(function(e,n){vo(e,ey,{name:t.name})}))]),Jb.config({})],o=t.validation.map((function(t){return Ay.config({getRoot:function(t){return qt(t.element)},invalidClass:"tox-invalid",validator:{validate:function(e){var n=wf.getValue(e),r=t.validator(n);return Ey(!0===r?jn.value(n):jn.error(r))},validateOnLoad:t.validateOnLoad}})})).toArray(),i=t.placeholder.fold(c({}),(function(t){return{placeholder:e.translate(t)}})),a=t.inputMode.fold(c({}),(function(t){return{inputmode:t}})),u=k(k({},i),a);return Bb(n,Xb.parts.field({tag:!0===t.multiline?"textarea":"input",inputAttributes:u,inputClasses:[t.classname],inputBehaviours:Yu(U([r,o])),selectOnFocus:!1,factory:fy}),(t.flex?["tox-form__group--stretched"]:[]).concat(t.maximized?["tox-form-group--maximize"]:[]),[ad.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){Xb.getField(t).each(ad.disable)},onEnabled:function(t){Xb.getField(t).each(ad.enable)}}),ov()])}function zO(t){var e=zr(null);return va({readState:function(){return{timer:null!==e.get()?"set":"unset"}},setTimer:function(t){e.set(t)},cancel:function(){var t=e.get();null!==t&&t.cancel()}})}function LO(t,e,n){var r=wf.getValue(n);wf.setValue(e,r),IC(e)}function jO(t,e){var n=t.element,r=Yo(n),o=n.dom;"number"!==ae(n,"type")&&e(o,r)}function BO(t){return{type:"menuitem",value:t.url,text:t.title,meta:{attach:t.attach},onAction:a}}function FO(t,e){return{type:"menuitem",value:e,text:t,meta:{attach:void 0},onAction:a}}function NO(t,e){return n=t,L(B(e,(function(t){return t.type===n})),BO);var n}function HO(t,e){var n=t.toLowerCase();return B(e,(function(t){return dt((void 0!==t.meta&&void 0!==t.meta.text?t.meta:t).text.toLowerCase(),n)||dt(t.value.toLowerCase(),n)}))}function VO(t){return function(e,n,r){return at(n,"name").fold((function(){return t(n,r)}),(function(o){return e.field(o,t(n,r))}))}}function UO(t,e,n){var r=$r(n,{shared:{interpreter:function(e){return $C(t,e,r)}}});return $C(t,e,r)}function WO(t,e,n){function r(){return Rt.fromDom(t.getContentAreaContainer())}function o(){return h||!n()}var i,a,u,c,s,l,f,d,m,p,h=Qg(t);return{inlineDialog:(f=r,d=e,m=o,p={maxHeightFunction:Mc()},function(){return m()?{type:"node",root:ee(f()),node:bt.from(f()),bubble:hc(12,12,GC),layouts:{onRtl:function(){return[Sm]},onLtr:function(){return[Om]}},overrides:p}:{type:"hotspot",hotspot:d(),bubble:hc(-12,12,GC),layouts:{onRtl:function(){return[Hu]},onLtr:function(){return[Vu]}},overrides:p}}),banner:(c=r,s=e,l=o,function(){return l()?{type:"node",root:ee(c()),node:bt.from(c()),layouts:{onRtl:function(){return[Zp]},onLtr:function(){return[Zp]}}}:{type:"hotspot",hotspot:s(),layouts:{onRtl:function(){return[Gu]},onLtr:function(){return[Gu]}}}}),cursor:(a=t,function(){return{type:"selection",root:u(),getSelection:function(){var t=a.selection.getRng();return bt.some(is.range(Rt.fromDom(t.startContainer),t.startOffset,Rt.fromDom(t.endContainer),t.endOffset))}}}),node:(i=u=function(){return Rt.fromDom(t.getBody())},function(t){return{type:"node",root:i(),node:t}})}}function $O(t){return bt.from(t.getParam("style_formats")).filter(m).map((function(e){var n,r,o=(n=t,r=qC(e),n.formatter?i(r.customFormats):n.on("init",(function(){i(r.customFormats)})),r.formats);function i(t){Ot(t,(function(t){n.formatter.has(t.name)||n.formatter.register(t.name,t.format)}))}return t.getParam("style_formats_merge",!1,"boolean")?KC.concat(o):o})).getOr(KC)}function GO(t,e,n){var r={type:"formatter",isSelected:e(t.format),getStylePreview:n(t.format)};return $r(t,r)}function KO(t,e,n,r){var o=function(e){return L(e,(function(e){var i,a,u,s,l,d=Ct(e);if(ut(e,"items")){var m=o(e.items);return $r($r(e,{type:"submenu"}),{getStyleItems:c(m)})}return ut(e,"format")?GO(e,n,r):1===d.length&&xt(d,"title")?$r(e,{type:"separator"}):(s={type:"formatter",format:u="custom-"+(a=f((i=e).name)?i.name:Ro(i.title)),isSelected:n(u),getStylePreview:r(u)},l=$r(i,s),t.formatter.register(a,l),l)}))};return o(e)}function qO(t){return function(e){if(v(n=e)&&1===n.nodeType){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}var n;return!1}}function XO(t,e,n,r,o){return{type:t,title:e,url:n,level:r,attach:o}}function YO(t){return t.innerText||t.textContent}function JO(t){return t&&"A"===t.nodeName&&void 0!==(t.id||t.name)&&wC(t)}function QO(t){return t&&/^(H[1-6])$/.test(t.nodeName)}function ZO(t){return QO(t)&&wC(t)}function tS(t){var e,n=t.id||Ro("h");return XO("header",YO(t),"#"+n,QO(e=t)?parseInt(e.nodeName.substr(1),10):0,(function(){t.id=n}))}function eS(t){var e=t.id||t.name;return XO("anchor",YO(t)||"#"+e,"#"+e,0,a)}function nS(t){return 0<XC(t.title).length}function rS(t){return f(t)&&/^https?/.test(t)}function oS(t){return d(t)&&ot(t,(function(t){return!(m(e=t)&&e.length<=5&&$(e,rS));var e})).isNone()}function iS(){var t,e=eb.getItem(ZC);if(null===e)return{};try{t=JSON.parse(e)}catch(t){if(t instanceof SyntaxError)return{};throw t}return oS(t)?t:{}}function aS(t){return at(iS(),t).getOr([])}function uS(t,e){var n,r;rS(t)&&(r=B(at(n=iS(),e).getOr([]),(function(e){return e!==t})),n[e]=[t].concat(r).slice(0,5),function(t){if(!oS(t))throw new Error("Bad format for history:\n"+JSON.stringify(t));eb.setItem(ZC,JSON.stringify(t))}(n))}function cS(t){return!!t}function sS(t){return nt(Vx.makeMap(t,/[, ]/),cS)}function lS(t){return bt.from(t.getParam("file_picker_callback")).filter(b)}function fS(t){return bt.from(t).filter(f).getOrUndefined()}function dS(t){return{getHistory:aS,addToHistory:uS,getLinkInformation:function(){return!1===(e=t).getParam("typeahead_urls")?bt.none():bt.some({targets:QC(e.getBody()),anchorTop:fS(e.getParam("anchor_top","#top")),anchorBottom:fS(e.getParam("anchor_bottom","#bottom"))});var e},getValidationHandler:function(){return bt.from(void 0===(n=(e=t).getParam("file_picker_validator_handler",void 0,"function"))?e.getParam("filepicker_validator_handler",void 0,"function"):n);var e,n},getUrlPicker:function(e){return n=s=t,r=l=e,i=bt.some((o=n).getParam("file_picker_types")).filter(cS),a=bt.some(o.getParam("file_browser_callback_types")).filter(cS),u=i.or(a).map(sS),c=lS(o).fold(O,(function(t){return u.fold(S,(function(t){return 0<Ct(t).length&&t}))})),(h(c)?c?lS(n):bt.none():c[r]?lS(n):bt.none()).map((function(t){return function(e){return ky((function(n){var r=k({filetype:l,fieldname:e.fieldname},bt.from(e.meta).getOr({}));t.call(s,(function(t,e){if(!f(t))throw new Error("Expected value to be string");if(void 0!==e&&!d(e))throw new Error("Expected meta to be a object");n({value:t,meta:e})}),e.value,r)}))}}));var n,r,o,i,a,u,c,s,l}}}function mS(t,e,n){var r,o,i,a,u,c,s,l,f,d,m,p,h,g=zr(!1),v={isPositionedAtTop:function(){return"top"===r.get()},getDockingMode:(r=zr(Yg(e)?"bottom":"top")).get,setDockingMode:r.set},b={shared:{providers:{icons:function(){return e.ui.registry.getAll().icons},menuItems:function(){return e.ui.registry.getAll().menuItems},translate:rh.translate,isDisabled:function(){return e.mode.isReadOnly()||e.ui.isDisabled()},getSetting:e.getParam.bind(e)},interpreter:function(t){return $C(WC,t,b)},anchors:WO(e,n,v.isPositionedAtTop),header:v,getSink:function(){return jn.value(t)}},urlinput:dS(e),styleselect:(f=zr([]),d=zr([]),m=zr([]),p=zr([]),h=zr(!(l=function(t){var e=t.items;return void 0!==e&&0<e.length?W(e,l):[t.format]})),(s=e).on("PreInit",(function(t){var e=$O(s),n=KO(s,e,y,_);f.set(n),d.set(W(n,l))})),s.on("addStyleModifications",(function(t){var e=KO(s,t.items,y,_);m.set(e),h.set(t.replace),p.set(W(e,l))})),{getData:function(){var t=h.get()?[]:f.get(),e=m.get();return t.concat(e)},getFlattenedKeys:function(){var t=h.get()?[]:d.get(),e=p.get();return t.concat(e)}}),colorinput:{colorPicker:function(t,e){Ob(c)(t,e)},hasCustomColors:function(){return rb(u)},getColors:function(){return ob(a)},getColorCols:(i=a=u=c=e,function(){return ab(i)})},dialog:{isDraggableModal:(o=e,function(){return o.getParam("draggable_modal",!1,"boolean")})},isContextMenuOpen:function(){return g.get()},setContextMenuState:function(t){return g.set(t)}};function y(t){return function(){return s.formatter.match(t)}}function _(t){return function(){var e=s.formatter.get(t);return void 0!==e?bt.some({tag:0<e.length&&(e[0].inline||e[0].block)||"div",styles:s.dom.parseStyle(s.formatter.getCssText(t))}):bt.none()}}return b}function pS(t){return(ct(ge(t,"position"),"fixed")?bt.none():Xt(t)).orThunk((function(){var e=Rt.fromTag("span");return qt(t).bind((function(t){Mn(t,e);var n=Xt(e);return Tn(e),n}))}))}function hS(t){return pS(t).map(Se).getOrThunk((function(){return Sn(0,0)}))}function gS(t,e){var n=t.element;$o(n,e.transitionClass),Go(n,e.fadeOutClass),$o(n,e.fadeInClass),e.onShow(t)}function vS(t,e){var n=t.element;$o(n,e.transitionClass),Go(n,e.fadeInClass),$o(n,e.fadeOutClass),e.onHide(t)}function bS(t,e,n){return $(t,(function(t){switch(t){case"bottom":return e.bottom<=n.bottom;case"top":return e.y>=n.y}}))}function yS(t,e){return e.getInitialPos().map((function(e){return Pn(e.bounds.x,e.bounds.y,Ce(t),we(t))}))}function _S(t,e,n){return n.getInitialPos().bind((function(r){switch(n.clearInitialPos(),r.position){case"static":return bt.some(lk.static());case"absolute":var o=pS(t).map(Rn).getOrThunk((function(){return Rn(yn())}));return bt.some(lk.absolute(Ou("absolute",at(r.style,"left").map((function(t){return e.x-o.x})),at(r.style,"top").map((function(t){return e.y-o.y})),at(r.style,"right").map((function(t){return o.right-e.right})),at(r.style,"bottom").map((function(t){return o.bottom-e.bottom})))));default:return bt.none()}}))}function wS(t,e,n){n.setDocked(!1),Ot(["left","right","top","bottom","position"],(function(e){return be(t.element,e)})),e.onUndocked(t)}function xS(t,e,n,r){var o="fixed"===r.position;n.setDocked(o),Su(t.element,r),(o?e.onDocked:e.onUndocked)(t)}function OS(t,e,n,r,o){void 0===o&&(o=!1),e.contextual.each((function(e){e.lazyContext(t).each((function(i){var a=i.y<r.bottom&&i.bottom>r.y;a!==n.isVisible()&&(n.setVisible(a),o&&!a?(qo(t.element,[e.fadeOutClass]),e.onHide(t)):(a?gS:vS)(t,e))}))}))}function SS(t,e,n){var r,o,i,u,c,s;n.isDocked()&&(o=e,i=n,s=(r=t).element,i.setDocked(!1),yS(c=r.element,u=i).bind((function(t){return _S(c,t,u)})).each((function(t){t.fold((function(){return wS(r,o,i)}),(function(t){return xS(r,o,i,t)}),a)})),i.setVisible(!0),o.contextual.each((function(t){Xo(s,[t.fadeInClass,t.fadeOutClass,t.transitionClass]),t.onShow(r)})),fk(r,o,i))}function CS(t,e){return xt(pk.getModes(t),e)}function kS(t){var e=t.element;qt(e).each((function(n){var r,o,i="padding-"+pk.getModes(t)[0];pk.isDocked(t)?(r=Ce(n),de(e,"width",r+"px"),de(n,i,xe(o=e)+(parseInt(he(o,"margin-top"),10)||0)+(parseInt(he(o,"margin-bottom"),10)||0)+"px")):(be(e,"width"),be(n,i))}))}function ES(t,e){e?(Go(t,gk.fadeOutClass),qo(t,[gk.transitionClass,gk.fadeInClass])):(Go(t,gk.fadeInClass),qo(t,[gk.fadeOutClass,gk.transitionClass]))}function MS(t,e){var n=Rt.fromDom(t.getContainer());e?($o(n,vk),Go(n,bk)):($o(n,bk),Go(n,vk))}function TS(t,e){function n(t){a().each((function(e){return t(e.element)}))}function r(e){t.inline||kS(e),MS(t,pk.isDocked(e)),e.getSystem().broadcastOn([df()],{}),a().each((function(t){return t.getSystem().broadcastOn([df()],{})}))}var o,i=cc(),a=e.getSink,u=t.inline?[]:[tc.config({channels:((o={})[hk()]={onReceive:kS},o)})];return M([Dp.config({}),pk.config({contextual:k({lazyContext:function(e){var n=xe(e.element),r=t.inline?t.getContentAreaContainer():t.getContainer(),o=Rn(Rt.fromDom(r)),i=o.height-n,a=o.y+(CS(e,"top")?0:n);return bt.some(Pn(o.x,a,o.width,i))},onShow:function(){n((function(t){return ES(t,!0)}))},onShown:function(t){n((function(t){return Xo(t,[gk.transitionClass,gk.fadeInClass])})),i.get().each((function(e){var n,r=t.element,o=Wt(n=e);_u(o).filter((function(t){return!Vt(n,t)})).filter((function(t){return Vt(t,Rt.fromDom(o.dom.body))||Ut(r,t)})).each((function(){return bu(n)})),i.clear()}))},onHide:function(t){var e=t.element,r=a;wu(e).orThunk((function(){return r().toOptional().bind((function(t){return wu(t.element)}))})).fold(i.clear,i.set),n((function(t){return ES(t,!1)}))},onHidden:function(){n((function(t){return Xo(t,[gk.transitionClass])}))}},gk),lazyViewport:function(e){var n=In(),r=t.getParam("toolbar_sticky_offset",0,"number"),o=n.y+(CS(e,"top")?r:0),i=n.height-(CS(e,"bottom")?r:0);return Pn(n.x,o,n.width,i)},modes:[e.header.getDockingMode()],onDocked:r,onUndocked:r})],u,!0)}function DS(t){return ar("menubutton",xk,t)}function AS(t,e){return e.getAnimationRoot.fold((function(){return t.element}),(function(e){return e(t)}))}function PS(t){return t.dimension.property}function RS(t,e){return t.dimension.getDimension(e)}function IS(t,e){Xo(AS(t,e),[e.shrinkingClass,e.growingClass])}function zS(t,e){Go(t.element,e.openClass),$o(t.element,e.closedClass),de(t.element,PS(e),"0px"),ye(t.element)}function LS(t,e){Go(t.element,e.closedClass),$o(t.element,e.openClass),be(t.element,PS(e))}function jS(t,e,n,r){n.setCollapsed(),de(t.element,PS(e),RS(e,t.element)),ye(t.element),IS(t,e),zS(t,e),e.onStartShrink(t),e.onShrunk(t)}function BS(t,e,n){var r=RS(e,t.element);("0px"===r?jS:function(t,e,n,r){var o=r.getOrThunk((function(){return RS(e,t.element)}));n.setCollapsed(),de(t.element,PS(e),o),ye(t.element);var i=AS(t,e);Go(i,e.growingClass),$o(i,e.shrinkingClass),zS(t,e),e.onStartShrink(t)})(t,e,n,bt.some(r))}function FS(t,e,n){var r=AS(t,e),o=Ko(r,e.shrinkingClass),i=RS(e,t.element);LS(t,e);var a=RS(e,t.element);(o?function(){de(t.element,PS(e),i),ye(t.element)}:function(){zS(t,e)})(),Go(r,e.shrinkingClass),$o(r,e.growingClass),LS(t,e),de(t.element,PS(e),a),n.setExpanded(),e.onStartGrow(t)}function NS(t,e,n){return!0===Ko(AS(t,e),e.growingClass)}function HS(t,e,n){return!0===Ko(AS(t,e),e.shrinkingClass)}function VS(t){return"<alloy.field."+t+">"}function US(t){return{element:function(){return t.element.dom}}}function WS(t){return td.getCurrent(t).bind((function(t){return Ek.isGrowing(t)||Ek.hasGrown(t)?td.getCurrent(t).bind((function(t){return H(Ak.getSlotNames(t),(function(e){return Ak.isShowing(t,e)}))})):bt.none()}))}function $S(t){var e=Rt.fromHtml(t),n=Yt(e),r=N(void 0!==e.dom.attributes?e.dom.attributes:[],(function(t,e){var n;return"class"===e.name?t:k(k({},t),((n={})[e.name]=e.value,n))}),{}),o=Array.prototype.slice.call(e.dom.classList,0),i=0===n.length?{}:{innerHtml:Do(e)};return k({tag:It(e),classes:o,attributes:r},i)}function GS(t){return td.getCurrent(t).each((function(t){return bu(t.element)}))}function KS(t,e,n){function r(n){var r;!o.get()||"focusin"===(r=n).type&&(r.composed?Q(r.composedPath()):bt.from(r.target)).map(Rt.fromDom).filter(Ge).exists((function(t){return Ko(t,"mce-pastebin")}))||(n.preventDefault(),GS(e()),t.editorManager.setActive(t))}var o=zr(!1),i=cc();function a(r){var i,a,u,c,s,l,f,d,m,p;r!==o.get()&&(o.set(r),i=t,a=e(),u=r,c=n.providers,d=a.element,m=u,p="data-mce-"+(s="tabindex"),bt.from(i.iframeElement).map(Rt.fromDom).each((function(t){m?(ue(t,s).each((function(e){return oe(t,p,e)})),oe(t,s,-1)):(se(t,s),ue(t,p).each((function(e){oe(t,s,e),se(t,p)})))})),u?(Lk.block(a,(f=c,function(t,e){return{dom:{tag:"div",attributes:{"aria-label":f.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:$S('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}})),be(d,"display"),se(d,"aria-hidden"),i.hasFocus()&&GS(a)):(l=td.getCurrent(a).exists((function(t){return yu(t.element)})),Lk.unblock(a),de(d,"display","none"),oe(d,"aria-hidden","true"),l&&i.focus()),t.fire("AfterProgressState",{state:r}))}t.inline||t.on("PreInit",(function(){t.dom.bind(t.getWin(),"focusin",r),t.on("BeforeExecCommand",(function(t){"mcefocus"===t.command.toLowerCase()&&!0!==t.value&&r(t)}))})),t.on("ProgressState",(function(e){var n;i.on(eh.clearTimeout),y(e.time)?(n=eh.setEditorTimeout(t,(function(){return a(e.state)}),e.time),i.set(n)):(a(e.state),i.clear())}))}function qS(t,e,n){return{within:t,extra:e,withinWidth:n}}function XS(t,e,n){var r,o=(r=function(t,e){var r=n(t);return bt.some({element:t,start:e,finish:e+r,width:r})},N(t,(function(t,e){return r(e,t.len).fold(c(t),(function(e){return{len:e.finish,list:t.list.concat([e])}}))}),{len:0,list:[]}).list),i=B(o,(function(t){return t.finish<=e})),a=F(i,(function(t,e){return t+e.width}),0);return{within:i,extra:o.slice(i.length),withinWidth:a}}function YS(t){return L(t,(function(t){return t.element}))}function JS(t,e){var n=L(e,(function(t){return Sa(t)}));uk.setGroups(t,n)}function QS(t,e,n){var r,o,i,a,u,c,s,l,f,d,m,p,h,g,v,b,y,_,w,x,O=e.builtGroups.get();0!==O.length&&(r=al(t,e,"primary"),o=Ry.getCoupled(t,"overflowGroup"),de(r.element,"visibility","hidden"),a=tt(i=O.concat([o]),(function(t){return wu(t.element).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))})),n([]),JS(r,i),u=Ce(r.element),0===(s=u,l=e.builtGroups.get(),d=o,_=(y=(0===(m=XS(l,s,f=function(t){return Ce(t.element)})).extra.length?bt.some(m):bt.none()).getOrThunk((function(){return XS(l,s-f(d),f)}))).within,w=y.extra,x=y.withinWidth,(c=1===w.length&&w[0].width<=f(d)?(b=x,qS(YS(_.concat(w)),[],b)):1<=w.length?(h=w,g=d,v=x,qS(YS(_).concat([g]),YS(h),v)):(p=x,qS(YS(_),[],p))).extra.length)?(Ep.remove(r,o),n([])):(JS(r,c.within),n(c.extra)),be(r.element,"visibility"),ye(r.element),a.each(Dp.focus))}function ZS(t,e){var n=Ry.getCoupled(t,"toolbarSandbox");lf.isOpen(n)?lf.close(n):lf.open(n,e.toolbar())}function tC(t,e,n,r){var o=n.getBounds.map((function(t){return t()})),i=n.lazySink(t).getOrDie();nf.positionWithinBounds(i,e,{anchor:{type:"hotspot",hotspot:t,layouts:r,overrides:{maxWidthFunction:Nk()}}},o)}function eC(t,e,n,r,o){uk.setGroups(e,o),tC(t,e,n,r),Rp.on(t)}function nC(t){return L(t,(function(t){return Sa(t)}))}function rC(t,e,n){QS(t,n,(function(r){n.overflowGroups.set(r),e.getOpt(t).each((function(t){Uk.setGroups(t,nC(r))}))}))}function oC(t,e){il(t,e,"overflow-button").bind((function(){return il(t,e,"overflow")})).each((function(n){OC(t,e),Ek.toggleGrow(n)}))}function iC(t){var e=t.title.fold((function(){return{}}),(function(t){return{attributes:{title:t}}}));return{dom:k({tag:"div",classes:["tox-toolbar__group"]},e),components:[Gk.parts.items({})],items:t.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:Yu([Jb.config({}),Dp.config({})])}}function aC(t){return Gk.sketch(iC(t))}function uC(t,e){var n=Zi((function(e){var n=L(t.initGroups,aC);uk.setGroups(e,n)}));return Yu([Hv(t.providers.isDisabled),ov(),Cp.config({mode:e,onEscape:t.onEscape,selector:".tox-toolbar__group"}),im("toolbar-events",[n])])}function cC(t){var e=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":iC({title:bt.none(),items:[]}),"overflow-button":Cw({name:"more",icon:bt.some("more-drawer"),disabled:!1,tooltip:bt.some("More..."),primary:!1,borderless:!1},bt.none(),t.providers)},splitToolbarBehaviours:uC(t,e)}}function sC(t){var e=t.cyclicKeying?"cyclic":"acyclic";return uk.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===cg.scrolling?["tox-toolbar--scrolling"]:[])},components:[uk.parts.groups({})],toolbarBehaviours:uC(t,e)})}function lC(t){return"string"==typeof t?t.split(" "):t}function fC(t,e){var n=k(k({},iE),e.menus),r=0<Ct(e.menus).length,o=B(void 0===e.menubar||!0===e.menubar?lC("file edit view insert format tools table help"):lC(!1===e.menubar?"":e.menubar),(function(t){var n=Mt(iE,t);return r?n||at(e.menus,t).exists((function(t){return Mt(t,"items")})):n}));return B(L(o,(function(r){var o=n[r],i={title:o.title,items:lC(o.items)},a=e,u=t.getParam("removed_menuitems","").split(/[ ,]/);return{text:i.title,getItems:function(){return W(i.items,(function(t){var e=t.toLowerCase();return 0===e.trim().length||R(u,(function(t){return t===e}))?[]:"separator"===e||"|"===e?[{type:"separator"}]:a.menuItems[e]?[a.menuItems[e]]:[]}))}}})),(function(t){return 0<t.getItems().length&&R(t.getItems(),(function(t){return"separator"!==t.type}))}))}function dC(t){function e(){t._skinLoaded=!0,t.fire("SkinLoaded")}return function(){t.initialized?e():t.on("init",e)}}function mC(t,e,n){return new xh((function(r,o){n.load(e,r,o),t.on("remove",(function(){return n.unload(e)}))}))}function pC(t,e){var n,r,o,i,a,u,c,s,l=(o=(n=e).getParam("skin"),i=n.getParam("skin_url"),!1!==o&&(r=o||"oxide",i=i?n.documentBaseURI.toAbsolute(i):Gg.baseURL+"/skins/ui/"+r),i);l&&e.contentCSS.push(l+(t?"/content.inline":"/content")+".min.css"),!1===e.getParam("skin")==0&&f(l)?xh.all([mC(e,l+"/skin.min.css",e.ui.styleSheetLoader),(u=e,c=l,s=Rt.fromDom(u.getElement()),gn(s).isSome()?mC(u,c+"/skin.shadowdom.min.css",$g.DOM.styleSheetLoader):xh.resolve())]).then(dC(e),(a=e,"Skin could not be loaded",function(){return a.fire("SkinLoadError",{message:"Skin could not be loaded"})})):dC(e)()}function hC(t,e){return function(n){function r(){n.setActive(t.formatter.match(e));var r=t.formatter.formatChanged(e,n.setActive);o.set(r)}var o=uc();return t.initialized?r():t.once("init",r),function(){t.off("init",r),o.clear()}}}function gC(t,e,n){return function(r){function o(){return n(r)}function i(){n(r),t.on(e,o)}return t.initialized?i():t.once("init",i),function(){t.off("init",i),t.off(e,o)}}}function vC(t){return function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("mceToggleFormat",!1,e.format)}))}}}function bC(t,e){return function(){return t.execCommand(e)}}function yC(t,e,n){var r,o,i,a=n.dataset,u="basic"===a.type?function(){return L(a.data,(function(t){return GO(t,n.isSelectedFor,n.getPreviewFor)}))}:a.getData;return{items:(r=e,o=n,i=function(t,e,n){var r="formatter"===t.type&&o.isInvalid(t);return 0===e?r?[]:c(t,e,!1,n).toArray():c(t,e,r,n).toArray()},{validateItems:s,getFetch:function(t,e){return function(n,r){r(ww(s(e()),dg.CLOSE_ON_EXECUTE,t,!1))}}}),getStyleItems:u};function c(t,e,n,a){var u=r.shared.providers.translate(t.title);if("separator"===t.type)return bt.some({type:"separator",text:u});if("submenu"!==t.type)return bt.some(k({type:"togglemenuitem",text:u,icon:t.icon,active:t.isSelected(a),disabled:n,onAction:o.onAction(t)},t.getStylePreview().fold((function(){return{}}),(function(t){return{meta:{style:t}}}))));var c=W(t.getStyleItems(),(function(t){return i(t,e,a)}));return 0===e&&c.length<=0?bt.none():bt.some({type:"nestedmenuitem",text:u,disabled:c.length<=0,getSubmenuItems:function(){return W(t.getStyleItems(),(function(t){return i(t,e,a)}))}})}function s(t){var e=o.getCurrentValue(),n=o.shouldHide?0:1;return W(t,(function(t){return i(t,n,e)}))}}function _C(t,e,n){var r=yC(0,e,n),o=r.items,i=r.getStyleItems,a=gC(t,"NodeChange",(function(t){var e=t.getComponent();n.updateText(e)}));return yw({text:n.icon.isSome()?bt.none():n.text,icon:n.icon,tooltip:bt.from(n.tooltip),role:bt.none(),fetch:o.getFetch(e,i),onSetup:a,getApi:function(t){return{getComponent:c(t)}},columns:1,presets:"normal",classes:n.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",e.shared)}function wC(t){return function(t){for(;t=t.parentNode;){var e=t.contentEditable;if(e&&"inherit"!==e)return YC(t)}return!1}(t)&&!JC(t)}function xC(t,e){function n(e){return sl(t)}function r(e,n){return function(r,o){return il(r,t,o).map((function(t){return e(t,o)})).getOr(n)}}function o(t,e){return"true"!==ae(t.element,"aria-hidden")}var i,a=r(o,!1),u=r((function(t,e){var n;o(t)&&(de(n=t.element,"display","none"),oe(n,"aria-hidden","true"),vo(t,Gi(),{name:e,visible:!1}))})),c=(i=u,function(t,e){Ot(e,(function(e){return i(t,e)}))}),s=r((function(t,e){var n;o(t)||(be(n=t.element,"display"),se(n,"aria-hidden"),vo(t,Gi(),{name:e,visible:!0}))}));return{uid:t.uid,dom:t.dom,components:e,behaviours:Gs(t.slotBehaviours),apis:{getSlotNames:n,getSlot:function(e,n){return il(e,t,n)},isShowing:a,hideSlot:u,hideAllSlots:function(t){return c(t,n())},showSlot:s}}}function OC(t,e){il(t,e,"overflow").each((function(n){QS(t,e,(function(t){var e=L(t,(function(t){return Sa(t)}));uk.setGroups(n,e)})),il(t,e,"overflow-button").each((function(t){Ek.hasGrown(n)&&Rp.on(t)})),Ek.refresh(n)}))}var SC,CC,kC,EC="data-value",MC=function(t,e,n,r){return L(n,(function(n){return RO(n)?{type:"togglemenuitem",text:n.text,value:n.value,active:n.value===r,onAction:function(){wf.setValue(t,n.value),vo(t,ey,{name:e}),Dp.focus(t)}}:{type:"nestedmenuitem",text:n.text,getSubmenuItems:function(){return MC(t,e,n.items,r)}}}))},TC=function(t,e){return tt(t,(function(t){return RO(t)?lt(t.value===e,t):TC(t.items,e)}))},DC=hl({name:"HtmlSelect",configFields:[fr("options"),$s("selectBehaviours",[Dp,wf]),kr("selectClasses",[]),kr("selectAttributes",{}),yr("data")],factory:function(t,e){var n=L(t.options,(function(t){return{dom:{tag:"option",value:t.value,innerHtml:t.text}}})),r=t.data.map((function(t){return uo("initialValue",t)})).getOr({});return{uid:t.uid,dom:{tag:"select",classes:t.selectClasses,attributes:t.selectAttributes},components:n,behaviours:Ks(t.selectBehaviours,[Dp.config({}),wf.config({store:k({mode:"manual",getValue:function(t){return Yo(t.element)},setValue:function(e,n){H(t.options,(function(t){return t.value===n})).isSome()&&Jo(e.element,n)}},r)})])}}}),AC=Object.freeze({__proto__:null,events:function(t,e){var n=t.stream.streams.setup(t,e);return Qi([Oo(t.event,n),ta((function(){return e.cancel()}))].concat(t.cancelEvent.map((function(t){return[Oo(t,(function(){return e.cancel()}))]})).getOr([])))}}),PC=Object.freeze({__proto__:null,throttle:zO,init:function(t){return t.stream.streams.state(t)}}),RC=hu({fields:[dr("stream",sr("mode",{throttle:[fr("delay"),kr("stopEvent",!0),Xa("streams",{setup:function(t,e){var n=t.stream,r=ch(t.onStream,n.delay);return e.setTimer(r),function(t,e){r.throttle(t,e),n.stopEvent&&e.stop()}},state:zO})]})),kr("event","input"),yr("cancelEvent"),Ka("onStream")],name:"streaming",active:AC,state:PC}),IC=function(t){jO(t,(function(t,e){return t.setSelectionRange(e.length,e.length)}))},zC=c("alloy.typeahead.itemexecute"),LC=c([yr("lazySink"),fr("fetch"),kr("minChars",5),kr("responseTime",1e3),$a("onOpen"),kr("getHotspot",bt.some),kr("getAnchorOverrides",c({})),kr("layouts",bt.none()),kr("eventOrder",{}),Ir("model",{},[kr("getDisplayText",(function(t){return void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.value})),kr("selectsOver",!0),kr("populateFromBrowse",!0)]),$a("onSetValue"),Ga("onExecute"),$a("onItemExecute"),kr("inputClasses",[]),kr("inputAttributes",{}),kr("inputStyles",{}),kr("matchWidth",!0),kr("useMinWidth",!1),kr("dismissOnBlur",!0),Ua(["openClass"]),yr("initialData"),$s("typeaheadBehaviours",[Dp,wf,RC,Cp,Rp,Ry]),ao("previewing",(function(){return zr(!0)}))].concat(ly()).concat(Vy())),jC=c([Uf({schema:[Va()],name:"menu",overrides:function(t){return{fakeFocus:!0,onHighlight:function(e,n){t.previewing.get()?e.getSystem().getByUid(t.uid).each((function(r){(function(t,e,n){if(t.selectsOver){var r=wf.getValue(e),o=t.getDisplayText(r),i=wf.getValue(n);return 0===t.getDisplayText(i).indexOf(o)?bt.some((function(){var t;LO(0,e,n),t=o.length,jO(e,(function(e,n){return e.setSelectionRange(t,n.length)}))})):bt.none()}return bt.none()})(t.model,r,n).fold((function(){return cd.dehighlight(e,n)}),(function(t){return t()}))})):e.getSystem().getByUid(t.uid).each((function(e){t.model.populateFromBrowse&&LO(t.model,e,n)})),t.previewing.set(!1)},onExecute:function(e,n){return e.getSystem().getByUid(t.uid).toOptional().map((function(t){return vo(t,zC(),{item:n}),!0}))},onHover:function(e,n){t.previewing.set(!1),e.getSystem().getByUid(t.uid).each((function(e){t.model.populateFromBrowse&&LO(t.model,e,n)}))}}}})]),BC=gl({name:"Typeahead",configFields:LC(),partFields:jC(),factory:function(t,e,n,r){function o(e,n,o){t.previewing.set(!1);var u=Ry.getCoupled(e,"sandbox");lf.isOpen(u)?td.getCurrent(u).each((function(t){cd.getHighlighted(t).fold((function(){o(t)}),(function(){_o(u,t.element,"keydown",n)}))})):jy(t,i(e),e,u,r,(function(t){td.getCurrent(t).each(o)}),_y.HighlightFirst).get(a)}function i(t){return function(e){return e.map((function(e){var n=W(it(e.menus),(function(t){return B(t.items,(function(t){return"item"===t.type}))}));return wf.getState(t).update(L(n,(function(t){return t.data}))),e}))}}var u=Nb(t),c=[Dp.config({}),wf.config({onSetValue:t.onSetValue,store:k({mode:"dataset",getDataKey:function(t){return Yo(t.element)},getFallbackEntry:function(t){return{value:t,meta:{}}},setValue:function(e,n){Jo(e.element,t.model.getDisplayText(n))}},t.initialData.map((function(t){return uo("initialValue",t)})).getOr({}))}),RC.config({stream:{mode:"throttle",delay:t.responseTime,stopEvent:!1},onStream:function(e,n){var o,u=Ry.getCoupled(e,"sandbox");Dp.isFocused(e)&&Yo(e.element).length>=t.minChars&&(o=td.getCurrent(u).bind((function(t){return cd.getHighlighted(t).map(wf.getValue)})),t.previewing.set(!0),jy(t,i(e),e,u,r,(function(e){td.getCurrent(u).each((function(e){o.fold((function(){t.model.selectsOver&&cd.highlightFirst(e)}),(function(t){cd.highlightBy(e,(function(e){return wf.getValue(e).value===t.value})),cd.getHighlighted(e).orThunk((function(){return cd.highlightFirst(e),bt.none()}))}))}))}),_y.HighlightFirst).get(a))},cancelEvent:zi()}),Cp.config({mode:"special",onDown:function(t,e){return o(t,e,cd.highlightFirst),bt.some(!0)},onEscape:function(t){var e=Ry.getCoupled(t,"sandbox");return lf.isOpen(e)?(lf.close(e),bt.some(!0)):bt.none()},onUp:function(t,e){return o(t,e,cd.highlightLast),bt.some(!0)},onEnter:function(e){var n=Ry.getCoupled(e,"sandbox"),r=lf.isOpen(n);if(r&&!t.previewing.get())return td.getCurrent(n).bind((function(t){return cd.getHighlighted(t)})).map((function(t){return vo(e,zC(),{item:t}),!0}));var o=wf.getValue(e);return go(e,zi()),t.onExecute(n,e,o),r&&lf.close(n),bt.some(!0)}}),Rp.config({toggleClass:t.markers.openClass,aria:{mode:"expanded"}}),Ry.config({others:{sandbox:function(e){return Ny(t,e,{onOpen:function(){return Rp.on(e)},onClose:function(){return Rp.off(e)}})}}}),im("typeaheadevents",[na((function(e){By(t,i(e),e,r,a,_y.HighlightFirst).get(a)})),Oo(zC(),(function(e,n){var r=Ry.getCoupled(e,"sandbox");LO(t.model,e,n.event.item),go(e,zi()),t.onItemExecute(e,r,n.event.item,wf.getValue(e)),lf.close(r),IC(e)}))].concat(t.dismissOnBlur?[Oo(Ei(),(function(t){var e=Ry.getCoupled(t,"sandbox");wu(e.element).isNone()&&lf.close(e)}))]:[]))];return{uid:t.uid,dom:Hb($r(t,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:k(k({},u),Ks(t.typeaheadBehaviours,c)),eventOrder:t.eventOrder}}}),FC=function(t){return k(k({},t),{toCached:function(){return FC(t.toCached())},bindFuture:function(e){return FC(t.bind((function(t){return t.fold((function(t){return Ey(jn.error(t))}),(function(t){return e(t)}))})))},bindResult:function(e){return FC(t.map((function(t){return t.bind(e)})))},mapResult:function(e){return FC(t.map((function(t){return t.map(e)})))},mapError:function(e){return FC(t.map((function(t){return t.mapError(e)})))},foldResult:function(e,n){return t.map((function(t){return t.fold(e,n)}))},withTimeout:function(e,n){return FC(ky((function(r){var o=!1,i=setTimeout((function(){o=!0,r(jn.error(n()))}),e);t.get((function(t){o||(clearTimeout(i),r(t))}))})))}})},NC=function(t){return FC(ky(t))},HC={type:"separator"},VC=Ro("aria-invalid"),UC={bar:VO((function(t,e){return n=e.shared,{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:L(t.items,n.interpreter)};var n})),collection:VO((function(t,e){return o=t,i=e.shared.providers,c=o.label.map((function(t){return Fb(t,i)})),l=n((function(t,e,n,r){e.stop(),i.isDisabled()||vo(t,oy,{name:o.name,value:r})})),f=[Oo(mi(),n((function(t,e,n){bu(n)}))),Oo(_i(),l),Oo(Pi(),l),Oo(pi(),n((function(t,e,n){Da(t.element,"."+_g).each((function(t){Go(t,_g)})),$o(n,_g)}))),Oo(hi(),n((function(t){Da(t.element,"."+_g).each((function(t){Go(t,_g)}))}))),na(n((function(t,e,n,r){vo(t,oy,{name:o.name,value:r})})))],Bb(c,Xb.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==o.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:s},behaviours:Yu([ad.config({disabled:i.isDisabled,onDisabled:function(t){r(t,(function(t){$o(t,"tox-collection__item--state-disabled"),oe(t,"aria-disabled",!0)}))},onEnabled:function(t){r(t,(function(t){Go(t,"tox-collection__item--state-disabled"),se(t,"aria-disabled")}))}}),ov(),Ep.config({}),wf.config({store:{mode:"memory",initialValue:[]},onSetValue:function(t,e){var n=t,r=L(e,(function(t){var e=rh.translate(t.text),n=1===o.columns?'<div class="tox-collection__item-label">'+e+"</div>":"",r='<div class="tox-collection__item-icon">'+t.icon+"</div>",a={_:" "," - ":" ","-":" "},u=e.replace(/\_| \- |\-/g,(function(t){return a[t]}));return'<div class="tox-collection__item'+(i.isDisabled()?" tox-collection__item--state-disabled":"")+'" tabindex="-1" data-collection-item-value="'+Qb.encodeAllRaw(t.value)+'" title="'+u+'" aria-label="'+u+'">'+r+n+"</div>"})),a=L("auto"!==o.columns&&1<o.columns?z(r,o.columns):[r],(function(t){return'<div class="tox-collection__group">'+t.join("")+"</div>"}));Ao(n.element,a.join("")),"auto"===o.columns&&Jh(t,5,"tox-collection__item").each((function(e){var n=e.numRows,r=e.numColumns;Cp.setGridSize(t,n,r)})),go(t,sy)}}),Jb.config({}),Cp.config(1===(u=o.columns)?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===u?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:".tox-collection__group",cell:"."+pg}}),im("collection-events",f)]),eventOrder:((a={})[Di()]=["disabling","alloy.base.behaviour","collection-events"],a)}),["tox-form__group--collection"],[]);function n(t){return function(e,n){Aa(n.event.target,"[data-collection-item-value]").each((function(r){t(e,n,r,ae(r,"data-collection-item-value"))}))}}function r(t,e){return L(ss(t.element,".tox-collection__item"),e)}var o,i,a,u,c,l,f})),alertbanner:VO((function(t,e){return r=e.shared.providers,Gb.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+(n=t).level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[nh.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:zm(n.icon,r.icons),attributes:{title:r.translate(n.iconTooltip)}},action:function(t){vo(t,oy,{name:"alert-banner",value:n.url})},buttonBehaviours:Yu([Lm()])})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:r.translate(n.text)}}]});var n,r})),input:VO((function(t,e){return r=e.shared.providers,IO({name:(n=t).name,multiline:!1,label:n.label,inputMode:n.inputMode,placeholder:n.placeholder,flex:!1,disabled:n.disabled,classname:"tox-textfield",validation:bt.none(),maximized:n.maximized},r);var n,r})),textarea:VO((function(t,e){return r=e.shared.providers,IO({name:(n=t).name,multiline:!0,label:n.label,inputMode:bt.none(),placeholder:n.placeholder,flex:!0,disabled:n.disabled,classname:"tox-textarea",validation:bt.none(),maximized:n.maximized},r);var n,r})),label:VO((function(t,e){return o={dom:{tag:"label",innerHtml:(r=e.shared).providers.translate((n=t).label),classes:["tox-label"]}},i=L(n.items,r.interpreter),{dom:{tag:"div",classes:["tox-form__group"]},components:[o].concat(i),behaviours:Yu([Bw(),Ep.config({}),Fw(bt.none()),Cp.config({mode:"acyclic"})])};var n,r,o,i})),iframe:(SC=function(t,e){return n=t,r=e.shared.providers,a=Xx&&n.sandboxed,u=k(k({},n.label.map((function(t){return{title:t}})).getOr({})),a?{sandbox:"allow-scripts allow-same-origin"}:{}),o=a,i=zr(""),c={getValue:function(t){return i.get()},setValue:function(t,e){var n;o?oe(t.element,"srcdoc",e):(oe(t.element,"src","javascript:''"),(n=t.element.dom.contentWindow.document).open(),n.write(e),n.close()),i.set(e)}},Bb(n.label.map((function(t){return Fb(t,r)})),Xb.parts.field({factory:{sketch:function(t){return G_({uid:t.uid,dom:{tag:"iframe",attributes:u},behaviours:Yu([Jb.config({}),Dp.config({}),$x(bt.none(),c.getValue,c.setValue)])})}}}),["tox-form__group--stretched"],[]);var n,r,o,i,a,u,c},function(t,e,n){var r=$r(e,{source:"dynamic"});return VO(SC)(t,r,n)}),button:VO((function(t,e){return n=t,r=e.shared.providers,o=Tw(n.name,"custom"),Bb(bt.none(),Xb.parts.field(k({factory:nh},Ew(n,bt.some(o),r,[Gx(""),Bw()]))),[],[]);var n,r,o})),checkbox:VO((function(t,e){return o=t,i=e.shared.providers,a=wf.config({store:{mode:"manual",getValue:function(t){return t.element.dom.checked},setValue:function(t,e){t.element.dom.checked=e}}}),u=Xb.parts.field({factory:{sketch:s},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:Yu([Bw(),ad.config({disabled:function(){return o.disabled||i.isDisabled()}}),Jb.config({}),Dp.config({}),a,Cp.config({mode:"special",onEnter:n,onSpace:n,stopSpaceKeyup:!0}),im("checkbox-events",[Oo(yi(),(function(t,e){vo(t,ey,{name:o.name})}))])])}),c=Xb.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:i.translate(o.label)},behaviours:Yu([qw.config({})])}),l=Am({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[r("checked"),r("unchecked")]}),Xb.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[u,l.asSpec(),c],fieldBehaviours:Yu([ad.config({disabled:function(){return o.disabled||i.isDisabled()},disableClass:"tox-checkbox--disabled",onDisabled:function(t){Xb.getField(t).each(ad.disable)},onEnabled:function(t){Xb.getField(t).each(ad.enable)}}),ov()])});function n(t){return t.element.dom.click(),bt.some(!0)}function r(t){return Bm("checked"===t?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t]},i.icons)}var o,i,a,u,c,l})),colorinput:VO((function(t,e){return r=t,o=e.shared,i=e.colorinput,s=Xb.parts.field({factory:fy,inputClasses:["tox-textfield"],onSetValue:function(t){return Ay.run(t).get(a)},inputBehaviours:Yu([ad.config({disabled:o.providers.isDisabled}),ov(),Jb.config({}),Ay.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return qt(t.element)},notify:{onValid:function(t){var e=wf.getValue(t);vo(t,Xw,{color:e})}},validator:{validateOnLoad:!1,validate:function(t){var e=wf.getValue(t);if(0===e.length)return Ey(jn.value(!0));var n=Rt.fromTag("span");de(n,"background-color",e);var r=ge(n,"background-color").fold((function(){return jn.error("blah")}),(function(t){return jn.value(e)}));return Ey(r)}}})]),selectOnFocus:!1}),l=r.label.map((function(t){return Fb(t,o.providers)})),f=Am((u={dom:{tag:"span",attributes:{"aria-label":o.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[Vu,Hu,Gu]},onLtr:function(){return[Hu,Vu,Gu]}},components:[],fetch:lb(i.getColors(),i.hasCustomColors()),columns:i.getColorCols(),presets:"color",onItemAction:function(t,e){f.getOpt(t).each((function(t){"custom"===e?i.colorPicker((function(e){e.fold((function(){return go(t,Jw)}),(function(e){n(t,e),ib(e)}))}),"#ffffff"):n(t,"remove"===e?"":e)}))}},Kw.sketch({dom:u.dom,components:u.components,toggleClass:"mce-active",dropdownBehaviours:Yu([Nv((c=o).providers.isDisabled),ov(),qw.config({}),Jb.config({})]),layouts:u.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:c.getSink,fetch:function(t){return ky((function(t){return u.fetch(t)})).map((function(e){return bt.from(Db($r(pb(Ro("menu-value"),e,(function(e){u.onItemAction(t,e)}),u.columns,u.presets,dg.CLOSE_ON_EXECUTE,O,c.providers),{movement:hb(u.columns,u.presets)})))}))},parts:{menu:Uh(0,0,u.presets)}}))),Xb.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:l.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[s,f.asSpec()]}]),fieldBehaviours:Yu([im("form-field-events",[Oo(Xw,(function(t,e){f.getOpt(t).each((function(t){de(t.element,"background-color",e.event.color)})),vo(t,ey,{name:r.name})})),Oo(Yw,(function(t,e){Xb.getField(t).each((function(n){wf.setValue(n,e.event.value),td.getCurrent(t).each(Dp.focus)}))})),Oo(Jw,(function(t,e){Xb.getField(t).each((function(e){td.getCurrent(t).each(Dp.focus)}))}))])])});function n(t,e){vo(t,Yw,{value:e})}var r,o,i,u,c,s,l,f})),colorpicker:VO((function(t){var e=Am(V_(U_,(function(t){return"tox-"+t})).sketch({dom:{tag:"div",classes:["tox-color-picker-container"],attributes:{role:"presentation"}},onValidHex:function(t){vo(t,oy,{name:"hex-valid",value:!0})},onInvalidHex:function(t){vo(t,oy,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[e.asSpec()],behaviours:Yu([wf.config({store:{mode:"manual",getValue:function(t){var n=e.get(t);return td.getCurrent(n).bind((function(t){return wf.getValue(t).hex})).map((function(t){return"#"+t})).getOr("")},setValue:function(t,n){var r=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(n),o=e.get(t);td.getCurrent(o).fold((function(){}),(function(t){wf.setValue(t,{hex:bt.from(r[1]).getOr("")}),Rx.getField(t,"hex").each((function(t){go(t,bi())}))}))}}}),Bw()])}})),dropzone:VO((function(t,e){return function(t,e){function n(t,e){e.stop()}function r(t){return function(e,n){Ot(t,(function(t){t(e,n)}))}}function o(t,e){ad.isDisabled(t)||a(t,e.event.raw.dataTransfer.files)}function i(t,e){a(t,e.event.raw.target.files)}function a(n,r){var o,i;wf.setValue(n,(o=r,i=Vx.explode(e.getSetting("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string")),B(St(o),(function(t){return R(i,(function(e){return At(t.name.toLowerCase(),"."+e.toLowerCase())}))})))),vo(n,ey,{name:t.name})}var u=Am({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:Yu([im("input-file-events",[Mo(_i()),Mo(Pi())])])});return Bb(t.label.map((function(t){return Fb(t,e)})),Xb.parts.field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:Yu([Gx([]),Bw(),ad.config({}),Rp.config({toggleClass:"dragenter",toggleOnExecute:!1}),im("dropzone-events",[Oo("dragenter",r([n,Rp.toggle])),Oo("dragleave",r([n,Rp.toggle])),Oo("dragover",n),Oo("drop",r([n,o])),Oo(yi(),i)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:e.translate("Drop an image here")}},nh.sketch({dom:{tag:"button",innerHtml:e.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[u.asSpec()],action:function(t){u.get(t).element.dom.click()},buttonBehaviours:Yu([Jb.config({}),Nv(e.isDisabled),ov()])})]}]}}}}),["tox-form__group--stretched"],[])}(t,e.shared.providers)})),grid:VO((function(t,e){return n=e.shared,{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+t.columns+"col"]},components:L(t.items,n.interpreter)};var n})),listbox:VO((function(t,e){return n=t,o=(r=e).shared.providers,i=Q(n.items).filter(RO),u=n.label.map((function(t){return Fb(t,o)})),s={dom:{tag:"div",classes:["tox-listboxfield"]},components:[Xb.parts.field({dom:{},factory:{sketch:function(t){return yw({uid:t.uid,text:i.map((function(t){return t.text})),icon:bt.none(),tooltip:n.label,role:bt.none(),fetch:function(t,e){e(ww(MC(t,n.name,n.items,wf.getValue(t)),dg.CLOSE_ON_EXECUTE,r,!1))},onSetup:c(a),getApi:c({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[Jb.config({}),wf.config({store:{mode:"manual",initialValue:i.map((function(t){return t.value})).getOr(""),getValue:function(t){return ae(t.element,EC)},setValue:function(t,e){TC(n.items,e).each((function(e){oe(t.element,EC,e.value),vo(t,mO,{text:e.text})}))}}})]},"tox-listbox",r.shared)}}})]},Xb.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:U([u.toArray(),[s]]),fieldBehaviours:Yu([ad.config({disabled:c(n.disabled),onDisabled:function(t){Xb.getField(t).each(ad.disable)},onEnabled:function(t){Xb.getField(t).each(ad.enable)}})])});var n,r,o,i,u,s})),selectbox:VO((function(t,e){return n=t,r=e.shared.providers,o=L(n.items,(function(t){return{text:r.translate(t.text),value:t.value}})),i=n.label.map((function(t){return Fb(t,r)})),a={dom:{tag:"div",classes:["tox-selectfield"]},components:U([[Xb.parts.field({dom:{},selectAttributes:{size:n.size},options:o,factory:DC,selectBehaviours:Yu([ad.config({disabled:function(){return n.disabled||r.isDisabled()}}),Jb.config({}),im("selectbox-change",[Oo(yi(),(function(t,e){vo(t,ey,{name:n.name})}))])])})],(1<n.size?bt.none():bt.some(Bm("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},r.icons))).toArray()])},Xb.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:U([i.toArray(),[a]]),fieldBehaviours:Yu([ad.config({disabled:function(){return n.disabled||r.isDisabled()},onDisabled:function(t){Xb.getField(t).each(ad.disable)},onEnabled:function(t){Xb.getField(t).each(ad.enable)}}),ov()])});var n,r,o,i,a})),sizeinput:VO((function(t,e){return zw(t,e.shared.providers)})),urlinput:VO((function(t,e){return function(t,e,n){function r(e){var r=wf.getValue(e);n.addToHistory(r.value,t.filetype)}var o,i,u,c,s=e.shared.providers,l=Xb.parts.field({factory:BC,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":VC,type:"url"},minChars:0,responseTime:0,fetch:function(r){var o,i,a,u,c=ww((o=t.filetype,i=n,a=wf.getValue(r),u=void 0!==a.meta.text?a.meta.text:a.value,i.getLinkInformation().fold((function(){return[]}),(function(t){var e=HO(u,L(i.getHistory(o),(function(t){return FO(t,t)})));return"file"===o?N([e,HO(u,NO("header",t.targets)),HO(u,U([bt.from(t.anchorTop).map((function(t){return FO("<top>",t)})).toArray(),NO("anchor",t.targets),bt.from(t.anchorBottom).map((function(t){return FO("<bottom>",t)})).toArray()]))],(function(t,e){return 0===t.length||0===e.length?t.concat(e):t.concat(HC,e)}),[]):e}))),dg.BUBBLE_TO_SANDBOX,e,!1);return Ey(c)},getHotspot:function(t){return g.getOpt(t)},onSetValue:function(t,e){t.hasConfigured(Ay)&&Ay.run(t).get(a)},typeaheadBehaviours:Yu(U([n.getValidationHandler().map((function(e){return Ay.config({getRoot:function(t){return qt(t.element)},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,e){d.getOpt(t).each((function(t){oe(t.element,"title",s.translate(e))}))}},validator:{validate:function(n){var r=wf.getValue(n);return NC((function(n){e({type:t.filetype,url:r.value},(function(t){var e,r;"invalid"===t.status?(e=jn.error(t.message),n(e)):(r=jn.value(t.message),n(r))}))}))},validateOnLoad:!1}})})).toArray(),[ad.config({disabled:function(){return t.disabled||s.isDisabled()}}),Jb.config({}),im("urlinput-events",U(["file"===t.filetype?[Oo(bi(),(function(e){vo(e,ey,{name:t.name})}))]:[],[Oo(yi(),(function(e){vo(e,ey,{name:t.name}),r(e)})),Oo(Mi(),(function(e){vo(e,ey,{name:t.name}),r(e)}))]]))]])),eventOrder:((o={})[bi()]=["streaming","urlinput-events","invalidating"],o),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:e.shared.getSink,parts:{menu:Uh(0,0,"normal")},onExecute:function(t,e,n){vo(e,iy,{})},onItemExecute:function(e,n,o,i){r(e),vo(e,ey,{name:t.name})}}),f=t.label.map((function(t){return Fb(t,s)})),d=Am((i="invalid",u=bt.some(VC),Bm("warning",{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+i],attributes:k({title:s.translate(c=void 0===c?i:c),"aria-live":"polite"},u.fold((function(){return{}}),(function(t){return{id:t}})))},s.icons))),m=Am({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[d.asSpec()]}),p=n.getUrlPicker(t.filetype),h=Ro("browser.url.event"),g=Am({dom:{tag:"div",classes:["tox-control-wrap"]},components:[l,m.asSpec()],behaviours:Yu([ad.config({disabled:function(){return t.disabled||s.isDisabled()}})])}),v=Am(Mw({name:t.name,icon:bt.some("browse"),text:t.label.getOr(""),disabled:t.disabled,primary:!1,borderless:!0},(function(t){return go(t,h)}),s,[],["tox-browse-url"]));return Xb.sketch({dom:ty([]),components:f.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:U([[g.asSpec()],p.map((function(){return v.asSpec()})).toArray()])}]),fieldBehaviours:Yu([ad.config({disabled:function(){return t.disabled||s.isDisabled()},onDisabled:function(t){Xb.getField(t).each(ad.disable),v.getOpt(t).each(ad.disable)},onEnabled:function(t){Xb.getField(t).each(ad.enable),v.getOpt(t).each(ad.enable)}}),ov(),im("url-input-events",[Oo(h,(function(e){td.getCurrent(e).each((function(n){var r=wf.getValue(n),o=k({fieldname:t.name},r);p.each((function(r){r(o).get((function(r){wf.setValue(n,r),vo(e,ey,{name:t.name})}))}))}))}))])])})}(t,e,e.urlinput)})),customeditor:VO((function(t){var e=cc(),n=Am({dom:{tag:t.tag}}),r=cc();return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:Yu([im("custom-editor-events",[Zi((function(o){n.getOpt(o).each((function(n){(Mt(t,"init")?t.init(n.element.dom):Hx.load(t.scriptId,t.scriptUrl).then((function(e){return e(n.element.dom,t.settings)}))).then((function(t){r.on((function(e){t.setValue(e)})),r.clear(),e.set(t)}))}))}))]),wf.config({store:{mode:"manual",getValue:function(){return e.get().fold((function(){return r.get().getOr("")}),(function(t){return t.getValue()}))},setValue:function(t,n){e.get().fold((function(){r.set(n)}),(function(t){return t.setValue(n)}))}}}),Bw()]),components:[n.asSpec()]}})),htmlpanel:VO((function(t){return"presentation"===t.presets?Gb.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html}}):Gb.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html,attributes:{role:"document"}},containerBehaviours:Yu([Jb.config({}),Dp.config({})])})})),imagetools:VO((function(t,e){return PO(t,e.shared.providers)})),table:VO((function(t,e){return function(t,e){function n(t){return{dom:{tag:"td",innerHtml:e.translate(t)}}}return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:L(t.header,(function(t){return{dom:{tag:"th",innerHtml:e.translate(t)}}}))}]},{dom:{tag:"tbody"},components:L(t.cells,(function(t){return{dom:{tag:"tr"},components:L(t,n)}}))}],behaviours:Yu([Jb.config({}),Dp.config({})])}}(t,e.shared.providers)})),panel:VO((function(t,e){return{dom:{tag:"div",classes:t.classes},components:L(t.items,e.shared.interpreter)}}))},WC={field:function(t,e){return e}},$C=function(t,e,n){return at(UC,e.type).fold((function(){return e}),(function(r){return r(t,e,n)}))},GC={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},KC=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],qC=function(t){return N(t,(function(t,e){if(Mt(e,"items")){var n=qC(e.items);return{customFormats:t.customFormats.concat(n.customFormats),formats:t.formats.concat([{title:e.title,items:n.formats}])}}if(Mt(e,"inline")||Mt(e,"block")||Mt(e,"selector")){var r="custom-"+(f(e.name)?e.name:e.title.toLowerCase());return{customFormats:t.customFormats.concat([{name:r,format:e}]),formats:t.formats.concat([{title:e.title,format:r,icon:e.icon}])}}return k(k({},t),{formats:t.formats.concat(e)})}),{customFormats:[],formats:[]})},XC=Vx.trim,YC=qO("true"),JC=qO("false"),QC=function(t){var e=L(ss(Rt.fromDom(t),"h1,h2,h3,h4,h5,h6,a:not([href])"),(function(t){return t.dom}));return B(L(B(e,ZO),tS).concat(L(B(e,JO),eS)),nS)},ZC="tinymce-url-history",tk=Xf,ek=Kf,nk=c([kr("shell",!1),fr("makeItem"),kr("setupItem",a),xf("listBehaviours",[Ep])]),rk=c([Wf({name:"items",overrides:function(){return{behaviours:Yu([Ep.config({})])}}})]),ok=gl({name:c("CustomList")(),configFields:nk(),partFields:rk(),factory:function(t,e,n,r){var o=t.shell?{behaviours:[Ep.config({})],components:[]}:{behaviours:[],components:e};return{uid:t.uid,dom:t.dom,components:o.components,behaviours:Ks(t.listBehaviours,o.behaviours),apis:{setItems:function(e,n){var r;r=e,(t.shell?bt.some(r):il(r,t,"items")).fold((function(){throw new Error("Custom List was defined to not be a shell, but no item container was specified in components")}),(function(r){var o=Ep.contents(r),i=n.length,a=i-o.length,u=0<a?I(a,(function(){return t.makeItem()})):[],c=o.slice(i);Ot(c,(function(t){return Ep.remove(r,t)})),Ot(u,(function(t){return Ep.append(r,t)}));var s=Ep.contents(r);Ot(s,(function(r,o){t.setupItem(e,r,n[o],o)}))}))}}}},apis:{setItems:function(t,e,n){t.setItems(e,n)}}}),ik=c([fr("dom"),kr("shell",!0),$s("toolbarBehaviours",[Ep])]),ak=c([Wf({name:"groups",overrides:function(){return{behaviours:Yu([Ep.config({})])}}})]),uk=gl({name:"Toolbar",configFields:ik(),partFields:ak(),factory:function(t,e,n,r){var o=t.shell?{behaviours:[Ep.config({})],components:[]}:{behaviours:[],components:e};return{uid:t.uid,dom:t.dom,components:o.components,behaviours:Ks(t.toolbarBehaviours,o.behaviours),apis:{setGroups:function(e,n){var r;r=e,(t.shell?bt.some(r):il(r,t,"groups")).fold((function(){throw new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")}),(function(t){Ep.set(t,n)}))}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,e,n){t.setGroups(e,n)}}}),ck=c([]),sk=Object.freeze({__proto__:null,setup:a,isDocked:O,getBehaviours:ck}),lk=Lr([{static:[]},{absolute:["positionCss"]},{fixed:["positionCss"]}]),fk=function(t,e,n){var r,o,i,a;t.getSystem().isConnected()&&(i=n,a=(o=e).lazyViewport(r=t),i.isDocked()&&OS(r,o,i,a),function(t,e,n){var r,o,i,a=t.element;return ct(ge(a,"position"),"fixed")?(o=e,yS(r=a,i=n).filter((function(t){return bS(i.getModes(),t,o)})).bind((function(t){return _S(r,t,i)}))):function(t,e,n){var r,o,i=Rn(t);if(bS(n.getModes(),i,e))return bt.none();r=t,o=i,n.setInitialPos({style:function(){var t={},e=r.dom;if(pt(e))for(var n=0;n<e.style.length;n++){var o=e.style.item(n);t[o]=e.style[o]}return t}(),position:he(r,"position")||"static",bounds:o});var a=In(),u=i.x-a.x,c=e.y-a.y,s=a.bottom-e.bottom,l=i.y<=e.y;return bt.some(lk.fixed(Ou("fixed",bt.some(u),l?bt.some(c):bt.none(),bt.none(),l?bt.none():bt.some(s))))}(a,e,n)}(r,a,i).each((function(t){t.fold((function(){return wS(r,o,i)}),(function(t){return xS(r,o,i,t)}),(function(t){OS(r,o,i,a,!0),xS(r,o,i,t)}))})))},dk=Object.freeze({__proto__:null,refresh:fk,reset:SS,isDocked:function(t,e,n){return n.isDocked()},getModes:function(t,e,n){return n.getModes()},setModes:function(t,e,n,r){return n.setModes(r)}}),mk=Object.freeze({__proto__:null,events:function(t,e){return Qi([To(xi(),(function(n,r){t.contextual.each((function(t){Ko(n.element,t.transitionClass)&&(Xo(n.element,[t.transitionClass,t.fadeInClass]),(e.isVisible()?t.onShown:t.onHidden)(n)),r.stop()}))})),Oo(Fi(),(function(n,r){fk(n,t,e)})),Oo(Ni(),(function(n,r){SS(n,t,e)}))])}}),pk=hu({fields:[Cr("contextual",[mr("fadeInClass"),mr("fadeOutClass"),mr("transitionClass"),hr("lazyContext"),$a("onShow"),$a("onShown"),$a("onHide"),$a("onHidden")]),Pr("lazyViewport",In),Rr("modes",["top","bottom"],Zr),$a("onDocked"),$a("onUndocked")],name:"docking",active:mk,apis:dk,state:Object.freeze({__proto__:null,init:function(t){var e=zr(!1),n=zr(!0),r=cc(),o=zr(t.modes);return va({isDocked:e.get,setDocked:e.set,getInitialPos:r.get,setInitialPos:r.set,clearInitialPos:r.clear,isVisible:n.get,setVisible:n.set,getModes:o.get,setModes:o.set,readState:function(){return"docked: "+e.get()+", visible: "+n.get()+", modes: "+o.get().join(",")}})}})}),hk=c(Ro("toolbar-height-change")),gk={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},vk="tox-tinymce--toolbar-sticky-on",bk="tox-tinymce--toolbar-sticky-off",yk=Object.freeze({__proto__:null,setup:function(t,e,n){t.inline||(e.header.isPositionedAtTop()||t.on("ResizeEditor",(function(){n().each(pk.reset)})),t.on("ResizeWindow ResizeEditor",(function(){n().each(kS)})),t.on("SkinLoaded",(function(){n().each((function(t){pk.isDocked(t)?pk.reset(t):pk.refresh(t)}))})),t.on("FullscreenStateChanged",(function(){n().each(pk.reset)}))),t.on("AfterScrollIntoView",(function(t){n().each((function(e){pk.refresh(e);var n,r,o,i,a,u,c,s,l,f,d,m,p,h,g,v,b=e.element;Td(b)&&(n=t,i=(o=Wt(r=b)).dom.defaultView.innerHeight,a=ze(o),c=Ne(u=Rt.fromDom(n.elm)),s=we(u),f=(l=c.y)+s,d=Se(r),m=we(r),h=(p=d.top)+m,g=Math.abs(p-a.top)<2,v=Math.abs(h-(a.top+i))<2,g&&l<h?Le(a.left,l-m,o):v&&p<f&&Le(a.left,l-i+s+m,o))}))})),t.on("PostRender",(function(){MS(t,!1)}))},isDocked:function(t){return t().map(pk.isDocked).getOr(!1)},getBehaviours:TS}),_k=Xr([mr("type"),dr("items",er([Yr([mr("name"),br("items",Zr)]),Zr]))].concat(Mh)),wk=[xr("text"),xr("tooltip"),xr("icon"),hr("fetch"),Pr("onSetup",(function(){return a}))],xk=Xr(M([mr("type")],wk,!0)),Ok=Xr([mr("type"),xr("tooltip"),xr("icon"),xr("text"),Or("select"),hr("fetch"),Pr("onSetup",(function(){return a})),Dr("presets","normal",["normal","color","listpreview"]),kr("columns",1),hr("onAction"),hr("onItemAction")]),Sk=hl({factory:function(t,e){var n={focus:Cp.focusIn,setMenus:function(t,n){var r=L(n,(function(t){return Ow(DS({type:"menubutton",text:t.text,fetch:function(e){e(t.getItems())}}).mapError((function(t){return oo(t)})).getOrDie(),"tox-mbtn",e.backstage,bt.some("menuitem"))}));Ep.set(t,r)}};return{uid:t.uid,dom:t.dom,components:[],behaviours:Yu([Ep.config({}),im("menubar-events",[Zi((function(e){t.onSetup(e)})),Oo(mi(),(function(t,e){Da(t.element,".tox-mbtn--active").each((function(n){Aa(e.event.target,".tox-mbtn").each((function(e){Vt(n,e)||t.getSystem().getByDom(n).each((function(n){t.getSystem().getByDom(e).each((function(t){Kw.expand(t),Kw.close(n),Dp.focus(t)}))}))}))}))})),Oo($i(),(function(t,e){e.event.prevFocus.bind((function(e){return t.getSystem().getByDom(e).toOptional()})).each((function(n){e.event.newFocus.bind((function(e){return t.getSystem().getByDom(e).toOptional()})).each((function(t){Kw.isOpen(n)&&(Kw.expand(t),Kw.close(n))}))}))}))]),Cp.config({mode:"flow",selector:".tox-mbtn",onEscape:function(e){return t.onEscape(e),bt.some(!0)}}),Jb.config({})]),apis:n,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[fr("dom"),fr("uid"),fr("onEscape"),fr("backstage"),kr("onSetup",a)],apis:{focus:function(t,e){t.focus(e)},setMenus:function(t,e,n){t.setMenus(e,n)}}}),Ck=Object.freeze({__proto__:null,refresh:function(t,e,n){var r;n.isExpanded()&&(be(t.element,PS(e)),r=RS(e,t.element),de(t.element,PS(e),r))},grow:function(t,e,n){n.isExpanded()||FS(t,e,n)},shrink:function(t,e,n){n.isExpanded()&&BS(t,e,n)},immediateShrink:function(t,e,n){n.isExpanded()&&jS(t,e,n)},hasGrown:function(t,e,n){return n.isExpanded()},hasShrunk:function(t,e,n){return n.isCollapsed()},isGrowing:NS,isShrinking:HS,isTransitioning:function(t,e,n){return NS(t,e)||HS(t,e)},toggleGrow:function(t,e,n){(n.isExpanded()?BS:FS)(t,e,n)},disableTransitions:IS}),kk=Object.freeze({__proto__:null,exhibit:function(t,e,n){return No(e.expanded?{classes:[e.openClass],styles:{}}:{classes:[e.closedClass],styles:uo(e.dimension.property,"0px")})},events:function(t,e){return Qi([To(xi(),(function(n,r){r.event.raw.propertyName===t.dimension.property&&(IS(n,t),e.isExpanded()&&be(n.element,t.dimension.property),(e.isExpanded()?t.onGrown:t.onShrunk)(n))}))])}}),Ek=hu({fields:[fr("closedClass"),fr("openClass"),fr("shrinkingClass"),fr("growingClass"),yr("getAnimationRoot"),$a("onShrunk"),$a("onStartShrink"),$a("onGrown"),$a("onStartGrow"),kr("expanded",!1),dr("dimension",sr("property",{width:[Xa("property","width"),Xa("getDimension",(function(t){return Ce(t)+"px"}))],height:[Xa("property","height"),Xa("getDimension",(function(t){return we(t)+"px"}))]}))],name:"sliding",active:kk,apis:Ck,state:Object.freeze({__proto__:null,init:function(t){var e=zr(t.expanded);return va({isExpanded:function(){return!0===e.get()},isCollapsed:function(){return!1===e.get()},setCollapsed:_(e.set,!1),setExpanded:_(e.set,!0),readState:function(){return"expanded: "+e.get()}})}})}),Mk="container",Tk=[$s("slotBehaviours",[])],Dk=nt({getSlotNames:function(t,e){return t.getSlotNames(e)},getSlot:function(t,e,n){return t.getSlot(e,n)},isShowing:function(t,e,n){return t.isShowing(e,n)},hideSlot:function(t,e,n){return t.hideSlot(e,n)},hideAllSlots:function(t,e){return t.hideAllSlots(e)},showSlot:function(t,e,n){return t.showSlot(e,n)}},Bo),Ak=k(k({},Dk),{sketch:function(t){var e,n={slot:function(t,n){return e.push(t),tl(Mk,VS(t),n)},record:c(e=[])},r=t(n),o=L(n.record(),(function(t){return Vf({name:t,pname:VS(t)})}));return pl(Mk,Tk,o,xC,r)}}),Pk=Xr([xr("icon"),xr("tooltip"),Pr("onShow",a),Pr("onHide",a),Pr("onSetup",(function(){return a}))]),Rk=Ro("FixSizeEvent"),Ik=Ro("AutoSizeEvent"),zk=Object.freeze({__proto__:null,block:function(t,e,n,r){oe(t.element,"aria-busy",!0);var o=e.getRoot(t).getOr(t),i=Yu([Cp.config({mode:"special",onTab:function(){return bt.some(!0)},onShiftTab:function(){return bt.some(!0)}}),Dp.config({})]),a=r(o,i),u=o.getSystem().build(a);Ep.append(o,Sa(u)),u.hasConfigured(Cp)&&e.focus&&Cp.focusIn(u),n.isBlocked()||e.onBlock(t),n.blockWith((function(){return Ep.remove(o,u)}))},unblock:function(t,e,n){se(t.element,"aria-busy"),n.isBlocked()&&e.onUnblock(t),n.clear()}}),Lk=hu({fields:[Pr("getRoot",bt.none),Ar("focus",!0),$a("onBlock"),$a("onUnblock")],name:"blocking",apis:zk,state:Object.freeze({__proto__:null,init:function(){var t=ac();return va({readState:t.isSet,blockWith:function(e){t.set({destroy:e})},clear:t.clear,isBlocked:t.isSet})}})}),jk=c([$s("splitToolbarBehaviours",[Ry]),ao("builtGroups",(function(){return zr([])}))]),Bk=c([Ua(["overflowToggledClass"]),Or("getOverflowBounds"),fr("lazySink"),ao("overflowGroups",(function(){return zr([])}))].concat(jk())),Fk=c([Vf({factory:uk,schema:ik(),name:"primary"}),Uf({schema:ik(),name:"overflow"}),Uf({name:"overflow-button"}),Uf({name:"overflow-group"})]),Nk=c((function(t,e){var n=t,r=Math.floor(e);de(n,"max-width",kn.max(n,r,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"])+"px")})),Hk=c([Ua(["toggledClass"]),fr("lazySink"),hr("fetch"),Or("getBounds"),Cr("fireDismissalEventInstead",[kr("event",Ui())]),Ic()]),Vk=c([Uf({name:"button",overrides:function(t){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:Yu([Rp.config({toggleClass:t.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),Uf({factory:uk,schema:ik(),name:"toolbar",overrides:function(t){return{toolbarBehaviours:Yu([Cp.config({mode:"cyclic",onEscape:function(e){return il(e,t,"button").each(Dp.focus),bt.none()}})])}}})]),Uk=gl({name:"FloatingToolbarButton",factory:function(t,e,n,r){return k(k({},nh.sketch(k(k({},r.button()),{action:function(t){ZS(t,r)},buttonBehaviours:Of({dump:r.button().buttonBehaviours},[Ry.config({others:{toolbarSandbox:function(e){return r=e,o=n,i=t,{dom:{tag:"div",attributes:{id:(a=Pa()).id}},behaviours:Yu([Cp.config({mode:"special",onEscape:function(t){return lf.close(t),bt.some(!0)}}),lf.config({onOpen:function(t,e){i.fetch().get((function(t){eC(r,e,i,o.layouts,t),a.link(r.element),Cp.focusIn(e)}))},onClose:function(){Rp.off(r),Dp.focus(r),a.unlink(r.element)},isPartOf:function(t,e,n){return za(e,n)||za(r,n)},getAttachPoint:function(){return i.lazySink(r).getOrDie()}}),tc.config({channels:k(k({},Bs(k({isExtraPart:O},i.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),Fs({doReposition:function(){lf.getState(Ry.getCoupled(r,"toolbarSandbox")).each((function(t){tC(r,t,i,o.layouts)}))}}))})])};var r,o,i,a}}})])}))),{apis:{setGroups:function(e,r){lf.getState(Ry.getCoupled(e,"toolbarSandbox")).each((function(o){eC(e,o,t,n.layouts,r)}))},reposition:function(e){lf.getState(Ry.getCoupled(e,"toolbarSandbox")).each((function(r){tC(e,r,t,n.layouts)}))},toggle:function(t){ZS(t,r)},getToolbar:function(t){return lf.getState(Ry.getCoupled(t,"toolbarSandbox"))},isOpen:function(t){return lf.isOpen(Ry.getCoupled(t,"toolbarSandbox"))}}})},configFields:Hk(),partFields:Vk(),apis:{setGroups:function(t,e,n){t.setGroups(e,n)},reposition:function(t,e){t.reposition(e)},toggle:function(t,e){t.toggle(e)},getToolbar:function(t,e){return t.getToolbar(e)},isOpen:function(t,e){return t.isOpen(e)}}}),Wk=c([fr("items"),Ua(["itemSelector"]),$s("tgroupBehaviours",[Cp])]),$k=c([$f({name:"items",unit:"item"})]),Gk=gl({name:"ToolbarGroup",configFields:Wk(),partFields:$k(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:Ks(t.tgroupBehaviours,[Cp.config({mode:"flow",selector:t.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),Kk=gl({name:"SplitFloatingToolbar",configFields:Bk(),partFields:Fk(),factory:function(t,e,n,r){var o=Am(Uk.sketch({fetch:function(){return ky((function(e){e(nC(t.overflowGroups.get()))}))},layouts:{onLtr:function(){return[Vu,Hu]},onRtl:function(){return[Hu,Vu]},onBottomLtr:function(){return[Wu,Uu]},onBottomRtl:function(){return[Uu,Wu]}},getBounds:n.getOverflowBounds,lazySink:t.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:t.markers.overflowToggledClass},parts:{button:r["overflow-button"](),toolbar:r.overflow()}}));return{uid:t.uid,dom:t.dom,components:e,behaviours:Ks(t.splitToolbarBehaviours,[Ry.config({others:{overflowGroup:function(){return Gk.sketch(k(k({},r["overflow-group"]()),{items:[o.asSpec()]}))}}})]),apis:{setGroups:function(e,n){t.builtGroups.set(L(n,e.getSystem().build)),rC(e,o,t)},refresh:function(e){return rC(e,o,t)},toggle:function(t){o.getOpt(t).each((function(t){Uk.toggle(t)}))},isOpen:function(t){return o.getOpt(t).map(Uk.isOpen).getOr(!1)},reposition:function(t){o.getOpt(t).each((function(t){Uk.reposition(t)}))},getOverflow:function(t){return o.getOpt(t).bind(Uk.getToolbar)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,e,n){t.setGroups(e,n)},refresh:function(t,e){t.refresh(e)},reposition:function(t,e){t.reposition(e)},toggle:function(t,e){t.toggle(e)},isOpen:function(t,e){return t.isOpen(e)},getOverflow:function(t,e){return t.getOverflow(e)}}}),qk=c([Ua(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),$a("onOpened"),$a("onClosed")].concat(jk())),Xk=c([Vf({factory:uk,schema:ik(),name:"primary"}),Vf({factory:uk,schema:ik(),name:"overflow",overrides:function(t){return{toolbarBehaviours:Yu([Ek.config({dimension:{property:"height"},closedClass:t.markers.closedClass,openClass:t.markers.openClass,shrinkingClass:t.markers.shrinkingClass,growingClass:t.markers.growingClass,onShrunk:function(e){il(e,t,"overflow-button").each((function(t){Rp.off(t),Dp.focus(t)})),t.onClosed(e)},onGrown:function(e){Cp.focusIn(e),t.onOpened(e)},onStartGrow:function(e){il(e,t,"overflow-button").each(Rp.on)}}),Cp.config({mode:"acyclic",onEscape:function(e){return il(e,t,"overflow-button").each(Dp.focus),bt.some(!0)}})])}}}),Uf({name:"overflow-button",overrides:function(t){return{buttonBehaviours:Yu([Rp.config({toggleClass:t.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),Uf({name:"overflow-group"})]),Yk=gl({name:"SplitSlidingToolbar",configFields:qk(),partFields:Xk(),factory:function(t,e,n,r){var o="alloy.toolbar.toggle";return{uid:t.uid,dom:t.dom,components:e,behaviours:Ks(t.splitToolbarBehaviours,[Ry.config({others:{overflowGroup:function(t){return Gk.sketch(k(k({},r["overflow-group"]()),{items:[nh.sketch(k(k({},r["overflow-button"]()),{action:function(e){go(t,o)}}))]}))}}}),im("toolbar-toggle-events",[Oo(o,(function(e){oC(e,t)}))])]),apis:{setGroups:function(e,n){var r=L(n,e.getSystem().build);t.builtGroups.set(r),OC(e,t)},refresh:function(e){return OC(e,t)},toggle:function(e){return oC(e,t)},isOpen:function(e){return il(e,t,"overflow").map(Ek.hasGrown).getOr(!1)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,e,n){t.setGroups(e,n)},refresh:function(t,e){t.refresh(e)},toggle:function(t,e){t.toggle(e)},isOpen:function(t,e){return t.isOpen(e)}}}),Jk=ek.optional({factory:Sk,name:"menubar",schema:[fr("backstage")]}),Qk=ek.optional({factory:{sketch:function(t){return ok.sketch({uid:t.uid,dom:t.dom,listBehaviours:Yu([Cp.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return sC({type:t.type,uid:Ro("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:t.providers,onEscape:function(){return t.onEscape(),bt.some(!0)}})},setupItem:function(t,e,n,r){uk.setGroups(e,n)},shell:!0})}},name:"multiple-toolbar",schema:[fr("dom"),fr("onEscape")]}),Zk=ek.optional({factory:{sketch:function(t){return(t.type===cg.sliding?function(t){var e=Yk.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),n=Yk.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),r=cC(t);return Yk.sketch(k(k({},r),{components:[e,n],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(t){t.getSystem().broadcastOn([hk()],{type:"opened"})},onClosed:function(t){t.getSystem().broadcastOn([hk()],{type:"closed"})}}))}:t.type===cg.floating?function(t){var e=cC(t),n=Kk.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return Kk.sketch(k(k({},e),{lazySink:t.getSink,getOverflowBounds:function(){var e=t.moreDrawerData.lazyHeader().element,n=Ne(e),r=Gt(e),o=Ne(r),i=Math.max(r.dom.scrollHeight,o.height);return Pn(n.x+4,o.y,n.width-8,i)},parts:k(k({},e.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:t.attributes}}}),components:[n],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))}:sC)({type:t.type,uid:t.uid,onEscape:function(){return t.onEscape(),bt.some(!0)},cyclicKeying:!1,initGroups:[],getSink:t.getSink,providers:t.providers,moreDrawerData:{lazyToolbar:t.lazyToolbar,lazyMoreButton:t.lazyMoreButton,lazyHeader:t.lazyHeader},attributes:t.attributes})}},name:"toolbar",schema:[fr("dom"),fr("onEscape"),fr("getSink")]}),tE=ek.optional({factory:{sketch:function(t){var e=t.editor,n=t.sticky?TS:ck;return{uid:t.uid,dom:t.dom,components:t.components,behaviours:Yu(n(e,t.sharedBackstage))}}},name:"header",schema:[fr("dom")]}),eE=ek.optional({name:"socket",schema:[fr("dom")]}),nE=ek.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:Yu([Jb.config({}),Dp.config({}),Ek.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(t){td.getCurrent(t).each(Ak.hideAllSlots),go(t,Ik)},onGrown:function(t){go(t,Ik)},onStartGrow:function(t){vo(t,Rk,{width:ge(t.element,"width").getOr("")})},onStartShrink:function(t){vo(t,Rk,{width:Ce(t.element)+"px"})}}),Ep.config({}),td.config({find:function(t){return Q(Ep.contents(t))}})])}],behaviours:Yu([Fx(0),im("sidebar-sliding-events",[Oo(Rk,(function(t,e){de(t.element,"width",e.event.width)})),Oo(Ik,(function(t,e){be(t.element,"width")}))])])}}},name:"sidebar",schema:[fr("dom")]}),rE=ek.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:Yu([Ep.config({}),Lk.config({focus:!1}),td.config({find:function(t){return Q(t.components())}})]),components:[]}}},name:"throbber",schema:[fr("dom")]}),oE=gl({name:"OuterContainer",factory:function(t,e,n){return{uid:t.uid,dom:t.dom,components:e,apis:{getSocket:function(e){return tk.getPart(e,t,"socket")},setSidebar:function(e,n){tk.getPart(e,t,"sidebar").each((function(t){return function(t,e){td.getCurrent(t).each((function(t){return Ep.set(t,[(n=e,Ak.sketch((function(t){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:(e=t,o=L(Ct(r=n),(function(t){var e=r[t],n=ur(ar("sidebar",Pk,e));return{name:t,getApi:US,onSetup:n.onSetup,onShow:n.onShow,onHide:n.onHide}})),L(o,(function(t){var n=zr(a);return e.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Bg([av(t,n),uv(t,n),Oo(Gi(),(function(t,e){var n=e.event;H(o,(function(t){return t.name===n.name})).each((function(e){(n.visible?e.onShow:e.onHide)(e.getApi(t))}))}))])})}))),slotBehaviours:Bg([Zi((function(t){return Ak.hideAllSlots(t)}))])};var e,r,o})))]);var n}))}(t,n)}))},toggleSidebar:function(e,n){tk.getPart(e,t,"sidebar").each((function(t){var e=n;td.getCurrent(t).each((function(t){td.getCurrent(t).each((function(n){Ek.hasGrown(t)?Ak.isShowing(n,e)?Ek.shrink(t):(Ak.hideAllSlots(n),Ak.showSlot(n,e)):(Ak.hideAllSlots(n),Ak.showSlot(n,e),Ek.grow(t))}))}))}))},whichSidebar:function(e){return tk.getPart(e,t,"sidebar").bind(WS).getOrNull()},getHeader:function(e){return tk.getPart(e,t,"header")},getToolbar:function(e){return tk.getPart(e,t,"toolbar")},setToolbar:function(e,n){tk.getPart(e,t,"toolbar").each((function(t){t.getApis().setGroups(t,n)}))},setToolbars:function(e,n){tk.getPart(e,t,"multiple-toolbar").each((function(t){ok.setItems(t,n)}))},refreshToolbar:function(e){tk.getPart(e,t,"toolbar").each((function(t){return t.getApis().refresh(t)}))},toggleToolbarDrawer:function(e){tk.getPart(e,t,"toolbar").each((function(t){var e=t.getApis().toggle;null!=e?bt.some(function(e){return e(t)}(e)):bt.none()}))},isToolbarDrawerToggled:function(e){return tk.getPart(e,t,"toolbar").bind((function(t){return bt.from(t.getApis().isOpen).map((function(e){return e(t)}))})).getOr(!1)},getThrobber:function(e){return tk.getPart(e,t,"throbber")},focusToolbar:function(e){tk.getPart(e,t,"toolbar").orThunk((function(){return tk.getPart(e,t,"multiple-toolbar")})).each((function(t){Cp.focusIn(t)}))},setMenubar:function(e,n){tk.getPart(e,t,"menubar").each((function(t){Sk.setMenus(t,n)}))},focusMenubar:function(e){tk.getPart(e,t,"menubar").each((function(t){Sk.focus(t)}))}},behaviours:t.behaviours}},configFields:[fr("dom"),fr("behaviours")],partFields:[tE,Jk,Zk,Qk,eE,nE,rE],apis:{getSocket:function(t,e){return t.getSocket(e)},setSidebar:function(t,e,n){t.setSidebar(e,n)},toggleSidebar:function(t,e,n){t.toggleSidebar(e,n)},whichSidebar:function(t,e){return t.whichSidebar(e)},getHeader:function(t,e){return t.getHeader(e)},getToolbar:function(t,e){return t.getToolbar(e)},setToolbar:function(t,e,n){var r=L(n,aC);t.setToolbar(e,r)},setToolbars:function(t,e,n){var r=L(n,(function(t){return L(t,aC)}));t.setToolbars(e,r)},refreshToolbar:function(t,e){return t.refreshToolbar(e)},toggleToolbarDrawer:function(t,e){t.toggleToolbarDrawer(e)},isToolbarDrawerToggled:function(t,e){return t.isToolbarDrawerToggled(e)},getThrobber:function(t,e){return t.getThrobber(e)},setMenubar:function(t,e,n){t.setMenubar(e,n)},focusMenubar:function(t,e){t.focusMenubar(e)},focusToolbar:function(t,e){t.focusToolbar(e)}}}),iE={file:{title:"File",items:"newdocument restoredraft | preview | export print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align lineheight | forecolor backcolor | language | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},aE=_(pC,!1),uE=_(pC,!0);function cE(t,e,n,r){var o;return{type:"basic",data:(o=t.getParam(e,n,"string"),L(r===CC.SemiColon?o.replace(/;$/,"").split(";"):o.split(" "),(function(t){var e=t,n=t,r=t.split("=");return 1<r.length&&(e=r[0],n=r[1]),{title:e,format:n}})))}}function sE(t){var e={type:"basic",data:FE};return{tooltip:"Align",text:bt.none(),icon:bt.some("align-left"),isSelectedFor:function(e){return function(){return t.formatter.match(e)}},getCurrentValue:bt.none,getPreviewFor:function(t){return bt.none},onAction:function(e){return function(){return H(FE,(function(t){return t.format===e.format})).each((function(e){return t.execCommand(e.command)}))}},updateText:function(e){var n=H(FE,(function(e){return t.formatter.match(e.format)})).fold(c("left"),(function(t){return t.title.toLowerCase()}));vo(e,pO,{icon:"align-"+n})},dataset:e,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}}function lE(t){return L(t.split(/\s*,\s*/),(function(t){return t.replace(/^['"]+|['"]+$/g,"")}))}function fE(t){function e(){function e(t){return t?lE(t)[0]:""}var o=t.queryCommandValue("FontName"),i=r.data,a=o?o.toLowerCase():"";return{matchOpt:H(i,(function(t){var n=t.format;return n.toLowerCase()===a||e(n).toLowerCase()===e(a).toLowerCase()})).orThunk((function(){return lt(0===(t=a).indexOf("-apple-system")&&(e=lE(t.toLowerCase()),$(NE,(function(t){return-1<e.indexOf(t.toLowerCase())}))),{title:n,format:a});var t,e})),font:o}}var n="System Font",r=cE(t,"font_formats","Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",CC.SemiColon);return{tooltip:"Fonts",text:bt.some(n),icon:bt.none(),isSelectedFor:function(t){return function(e){return e.exists((function(e){return e.format===t}))}},getCurrentValue:function(){return e().matchOpt},getPreviewFor:function(t){return function(){return bt.some({tag:"div",styles:-1===t.indexOf("dings")?{"font-family":t}:{}})}},onAction:function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontName",!1,e.format)}))}},updateText:function(t){var n=e(),r=n.matchOpt,o=n.font,i=r.fold(c(o),(function(t){return t.title}));vo(t,mO,{text:i})},dataset:r,shouldHide:!1,isInvalid:O}}function dE(t){function e(){var e=bt.none(),n=r.data,o=t.queryCommandValue("FontSize");if(o)for(var i=function(t){var r,i,a,u,c=(i=t,/[0-9.]+px$/.test(r=o)?(a=72*parseInt(r,10)/96,u=Math.pow(10,i||0),Math.round(a*u)/u+"pt"):at(VE,r).getOr(r)),s=at(HE,c).getOr("");e=H(n,(function(t){return t.format===o||t.format===c||t.format===s}))},a=3;e.isNone()&&0<=a;a--)i(a);return{matchOpt:e,size:o}}var n=c(bt.none),r=cE(t,"fontsize_formats","8pt 10pt 12pt 14pt 18pt 24pt 36pt",CC.Space);return{tooltip:"Font sizes",text:bt.some("12pt"),icon:bt.none(),isSelectedFor:function(t){return function(e){return e.exists((function(e){return e.format===t}))}},getPreviewFor:n,getCurrentValue:function(){return e().matchOpt},onAction:function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontSize",!1,e.format)}))}},updateText:function(t){var n=e(),r=n.matchOpt,o=n.size,i=r.fold(c(o),(function(t){return t.title}));vo(t,mO,{text:i})},dataset:r,shouldHide:!1,isInvalid:O}}function mE(t,e){var n=e(),r=L(n,(function(t){return t.format}));return bt.from(t.formatter.closest(r)).bind((function(t){return H(n,(function(e){return e.format===t}))})).orThunk((function(){return lt(t.formatter.match("p"),{title:"Paragraph",format:"p"})}))}function pE(t){var e=cE(t,"block_formats","Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",CC.SemiColon);return{tooltip:"Blocks",text:bt.some("Paragraph"),icon:bt.none(),isSelectedFor:function(e){return function(){return t.formatter.match(e)}},getCurrentValue:bt.none,getPreviewFor:function(e){return function(){var n=t.formatter.get(e);return bt.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))})}},onAction:vC(t),updateText:function(n){var r=mE(t,(function(){return e.data})).fold(c("Paragraph"),(function(t){return t.title}));vo(n,mO,{text:r})},dataset:e,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}}function hE(t,e){return{tooltip:"Formats",text:bt.some("Paragraph"),icon:bt.none(),isSelectedFor:function(e){return function(){return t.formatter.match(e)}},getCurrentValue:bt.none,getPreviewFor:function(e){return function(){var n=t.formatter.get(e);return void 0!==n?bt.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))}):bt.none()}},onAction:vC(t),updateText:function(e){var n=function(t){var e=t.items;return void 0!==e&&0<e.length?W(e,n):[{title:t.title,format:t.format}]},r=W($O(t),n),o=mE(t,c(r)).fold(c("Paragraph"),(function(t){return t.title}));vo(e,mO,{text:o})},shouldHide:t.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(e){return!t.formatter.canApply(e.format)},dataset:e}}function gE(t){return{isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)}}}function vE(t){return{setActive:function(e){Rp.set(t,e)},isActive:function(){return Rp.isOn(t)},isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)}}}function bE(t,e){return t.map((function(t){return{"aria-label":e.translate(t),title:e.translate(t)}})).getOr({})}function yE(t,e,n,r,o,i){var a;return{dom:{tag:"button",classes:["tox-tbtn"].concat(e.isSome()?["tox-tbtn--select"]:[]),attributes:bE(n,i)},components:Uv([t.map((function(t){return gw(t,i.icons)})),e.map((function(t){return bw(t,"tox-tbtn",i)}))]),eventOrder:((a={})[si()]=["focusing","alloy.base.behaviour","common-button-display-events"],a),buttonBehaviours:Yu([Hv(i.isDisabled),ov(),im("common-button-display-events",[Oo(si(),(function(t,e){e.event.prevent(),go(t,XE)}))])].concat(r.map((function(n){return $E.config({channel:n,initialData:{icon:t,text:e},renderComponents:function(t,e){return Uv([t.icon.map((function(t){return gw(t,i.icons)})),t.text.map((function(t){return bw(t,"tox-tbtn",i)}))])}})})).toArray()).concat(o.getOr([])))}}function _E(t,e,n){var r,o=zr(a),i=yE(t.icon,t.text,t.tooltip,bt.none(),bt.none(),n);return nh.sketch({dom:i.dom,components:i.components,eventOrder:dO,buttonBehaviours:Yu([im("toolbar-button-events",[(r={onAction:t.onAction,getApi:e.getApi},na((function(t,e){iv(r,t)((function(e){vo(t,fO,{buttonApi:e}),r.onAction(e)}))}))),av(e,o),uv(e,o)]),Hv((function(){return t.disabled||n.isDisabled()})),ov()].concat(e.toolbarButtonBehaviours))})}function wE(t,e){return function(n,r,o){var i=t(n).mapError((function(t){return oo(t)})).getOrDie();return e(i,r,o)}}function xE(t,e,n,r){var o,a=e.outerContainer,u=n.toolbar,c=n.buttons;i(u,f)?(o=u.map((function(e){var o={toolbar:e,buttons:c,allowToolbarGroups:n.allowToolbarGroups};return eM(t,o,{backstage:r},bt.none())})),oE.setToolbars(a,o)):oE.setToolbar(a,eM(t,n,{backstage:r},bt.none()))}function OE(t){return/^[0-9\.]+(|px)$/i.test(""+t)?bt.some(parseInt(""+t,10)):bt.none()}function SE(t){return y(t)?t+"px":t}function CE(t,e,n){var r=e.filter((function(e){return t<e})),o=n.filter((function(e){return e<t}));return r.or(o).getOr(t)}function kE(t){var e=tg(t),n=eg(t),r=rg(t);return OE(e).map((function(t){return CE(t,n,r)}))}function EE(t,e){var n=Rn(t);return{pos:e?n.y:n.bottom,bounds:n}}function ME(t,e){return Oo(fO,(function(n,r){var o,i=t.get(n),a=(o=i,{hide:function(){return go(o,Ii())},getValue:function(){return wf.getValue(o)}});e.onAction(a,r.event.buttonApi)}))}function TE(t,e,n){return e.bottom-t.y>=(n=void 0===n?.01:n)&&t.bottom-e.y>=n}function DE(t){var e=function(t){var e=t.getBoundingClientRect();if(e.height<=0&&e.width<=0){var n=Zt(Rt.fromDom(t.startContainer),t.startOffset).element;return(Ke(n)?qt(n):bt.some(n)).filter(Ge).map((function(t){return t.dom.getBoundingClientRect()})).getOr(e)}return e}(t.selection.getRng());if(t.inline){var n=ze();return Pn(n.left+e.left,n.top+e.top,e.width,e.height)}var r=Ne(Rt.fromDom(t.getBody()));return Pn(r.x+e.left,r.y+e.top,e.width,e.height)}function AE(t,e,n,r){void 0===r&&(r=0);var o,i,a,u,c=Be(window),s=Rn(Rt.fromDom(t.getContentAreaContainer())),l=ig(t)||ag(t)||Kg(t),f=(o=s,i=c,a=r,{x:u=Math.max(o.x+a,i.x),width:Math.min(o.right-a,i.right)-u}),d=f.x,m=f.width;if(t.inline&&!l)return Pn(d,c.y,m,c.height);var p=function(t,e,n,r,o,i){var a=Rt.fromDom(t.getContainer()),u=Da(a,".tox-editor-header").getOr(a),c=Rn(u),s=c.y>=e.bottom,l=r&&!s;if(t.inline&&l)return{y:Math.max(c.bottom+i,n.y),bottom:n.bottom};if(t.inline&&!l)return{y:n.y,bottom:Math.min(c.y-i,n.bottom)};var f="line"===o?Rn(a):e;return l?{y:Math.max(c.bottom+i,n.y),bottom:Math.min(f.bottom-i,n.bottom)}:{y:Math.max(f.y+i,n.y),bottom:Math.min(c.y-i,n.bottom)}}(t,s,c,e.header.isPositionedAtTop(),n,r),h=p.y,g=p.bottom;return Pn(d,h,m,g-h)}function PE(t){return"node"===t}function RE(t,e){var n=j(B(e,(function(e){return e.predicate(t.dom)})),(function(t){return"contexttoolbar"===t.type}));return{contextToolbars:n.pass,contextForms:n.fail}}function IE(t,e){function n(t){return Vt(t,o)}var r,o=Rt.fromDom(e.getBody()),i=Rt.fromDom(e.selection.getNode());return n(r=i)||Ut(o,r)?function(t,e,n){var r=RE(t,e);if(0<r.contextForms.length)return bt.some({elem:t,toolbars:[r.contextForms[0]]});var o=RE(t,n);if(0<o.contextForms.length)return bt.some({elem:t,toolbars:[o.contextForms[0]]});if(0<r.contextToolbars.length||0<o.contextToolbars.length){var i=function(t){if(t.length<=1)return t;function e(e){return R(t,(function(t){return t.position===e}))}function n(e){return B(t,(function(t){return t.position===e}))}var r=e("selection"),o=e("node");if(r||o){if(o&&r){var i=n("node"),a=L(n("selection"),(function(t){return k(k({},t),{position:"node"})}));return i.concat(a)}return n(r?"selection":"node")}return n("line")}(r.contextToolbars.concat(o.contextToolbars));return bt.some({elem:t,toolbars:i})}return bt.none()}(i,t.inNodeScope,t.inEditorScope).orThunk((function(){return o=t,(e=n)(r=i)?bt.none():lo(r,(function(t){if(Ge(t)){var e=RE(t,o.inNodeScope),n=e.contextToolbars,r=e.contextForms,i=0<r.length?r:(u=n).length<=1?u:a("selection").orThunk((function(){return a("node")})).orThunk((function(){return a("line")})).map((function(t){return t.position})).fold((function(){return[]}),(function(t){return B(u,(function(e){return e.position===t}))}));return 0<i.length?bt.some({elem:t,toolbars:i}):bt.none()}function a(t){return H(u,(function(e){return e.position===t}))}var u;return bt.none()}),e);var e,r,o})):bt.none()}function zE(t,e,n,r){function o(){var e=_.get().getOr("node"),n=PE(e)?1:0;return AE(t,g,e,n)}function i(){return!(t.removed||v()&&h.isContextMenuOpen())}function u(){if(i()){var e=o(),n=ct(_.get(),"node")?(r=t,b.get().filter(bn).map(Ne).getOrThunk((function(){return DE(r)}))):DE(t);return e.height<=0||!TE(n,e)}return 1;var r}function c(){b.clear(),y.clear(),_.clear(),Jp.hide(w)}function s(){var t;Jp.isOpen(w)&&(be(t=w.element,"display"),u()?de(t,"display","none"):(y.set(0),Jp.reposition(w)))}function l(e){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[e],behaviours:Yu([Cp.config({mode:"acyclic"}),im("pop-dialog-wrap-events",[Zi((function(e){t.shortcuts.add("ctrl+F9","focus statusbar",(function(){return Cp.focusIn(e)}))})),ta((function(e){t.shortcuts.remove("ctrl+F9")}))])])}}function f(e,r){var o,i,a,u,c,s,l,f="node"===e?g.anchors.node(r):g.anchors.cursor(),d=(o=t,i=e,a=v(),u={lastElement:b.get,isReposition:function(){return ct(y.get(),0)},getMode:function(){return nf.getMode(n)}},"line"===i?{bubble:hc(12,0,cM),layouts:{onLtr:function(){return[iu]},onRtl:function(){return[au]}},overrides:sM}:{bubble:hc(0,12,cM,1/12),layouts:(c=o,s=u,l=i,a?{onLtr:function(t){return[Gu,Hu,Vu,Uu,Wu,$u].concat(m(t))},onRtl:function(t){return[Gu,Vu,Hu,Wu,Uu,$u].concat(m(t))}}:{onLtr:function(t){return[$u,Gu,Uu,Hu,Wu,Vu].concat(m(t))},onRtl:function(t){return[$u,Gu,Wu,Vu,Uu,Hu].concat(m(t))}}),overrides:sM});function m(t){return PE(l)?[(e=t,function(t,n,r,o,i){var a=function(t,e,n,r,o){var i=DE(t),a=r.lastElement().exists((function(t){return Vt(n,t)})),u=n,c=t.selection.getRng(),s=Zt(Rt.fromDom(c.startContainer),c.startOffset);return c.startContainer===c.endContainer&&c.startOffset===c.endOffset-1&&Vt(s.element,u)?a?Mm:Zp:a?function(t,n){var o=ge(t,"position");de(t,"position",n);var a=TE(i,Rn(e))&&!r.isReposition()?Dm:Mm;return o.each((function(e){return de(t,"position",e)})),a}(e,r.getMode()):("fixed"===r.getMode()?o.y+ze().top:o.y)+(we(e)+12)<=i.y?Zp:th}(c,o,e,s,i),u=k(k({},t),{y:i.y,height:i.height});return k(k({},a(u,n,r,o,i)),{alwaysFit:!0})})]:[];var e}return $r(f,d)}function d(t,e){var r,a,c,s;S.cancel(),i()&&(r=O(t),c=f(a=t[0].position,e),_.set(a),y.set(1),be(s=w.element,"display"),ct(Tt(e,b.get(),Vt),!0)||(Go(s,pM),nf.reset(n,w)),Jp.showWithinBounds(w,l(r),{anchor:c,transition:{classes:[pM],mode:"placement"}},(function(){return bt.some(o())})),e.fold(b.clear,b.set),u()&&de(s,"display","none"))}var m,p,h=r.backstage,g=h.shared,v=fn().deviceType.isTouch,b=cc(),y=cc(),_=cc(),w=Oa((m={sink:n,onEscape:function(){return t.focus(),bt.some(!0)}},p=zr([]),Jp.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(t){p.set([]),Jp.getContent(t).each((function(t){be(t.element,"visibility")})),Go(t.element,mM),be(t.element,"width")},inlineBehaviours:Yu([im("context-toolbar-events",[To(xi(),(function(t,e){"width"===e.event.raw.propertyName&&(Go(t.element,mM),be(t.element,"width"))})),Oo(dM,(function(t,e){var n=t.element;be(n,"width");var r=Ce(n);Jp.setContent(t,e.event.contents),$o(n,mM);var o=Ce(n);de(n,"width",r+"px"),Jp.getContent(t).each((function(t){e.event.focus.bind((function(t){return bu(t),wu(n)})).orThunk((function(){return Cp.focusIn(t),_u(hn(n))}))})),eh.setTimeout((function(){de(t.element,"width",o+"px")}),0)})),Oo(lM,(function(t,e){Jp.getContent(t).each((function(e){p.set(p.get().concat([{bar:e,focus:_u(hn(t.element))}]))})),vo(t,dM,{contents:e.event.forwardContents,focus:bt.none()})})),Oo(fM,(function(t,e){Z(p.get()).each((function(e){p.set(p.get().slice(0,p.get().length-1)),vo(t,dM,{contents:Sa(e.bar),focus:e.focus})}))}))]),Cp.config({mode:"special",onEscape:function(t){return Z(p.get()).fold((function(){return m.onEscape()}),(function(e){return go(t,fM),bt.some(!0)}))}})]),lazySink:function(){return jn.value(m.sink)}}))),x=Lt((function(){return function(t,e){var n={},r=[],o=[],i={},a={},u=Ct(t);return Ot(u,(function(u){var c,s,l,f,d,m=t[u];"contextform"===m.type?(l=u,d=ur(ar("ContextForm",Bh,f=m)),(n[l]=d).launch.map((function(t){i["form:"+l]=k(k({},f.launch),{type:"contextformtogglebutton"===t.type?"togglebutton":"button",onAction:function(){e(d)}})})),("editor"===d.scope?o:r).push(d),a[l]=d):"contexttoolbar"===m.type&&(c=u,ar("ContextToolbar",Fh,s=m).each((function(t){("editor"===s.scope?o:r).push(t),a[c]=t})))})),{forms:n,inNodeScope:r,inEditorScope:o,lookupTable:a,formNavigators:i}}(e,(function(t){var e=O([t]);vo(w,lM,{forwardContents:l(e)})}))})),O=function(e){var n=t.ui.registry.getAll().buttons,o=x(),i=k(k({},n),o.formNavigators),a=qg(t)===cg.scrolling?cg.scrolling:cg.default,u=U(L(e,(function(e){return"contexttoolbar"===e.type?eM(t,{buttons:i,toolbar:e.items,allowToolbarGroups:!1},r,bt.some(["form:"])):(n=g.providers,uM(e,n));var n})));return sC({type:a,uid:Ro("context-toolbar"),initGroups:u,onEscape:bt.none,cyclicKeying:!0,providers:g.providers})},S=ch((function(){t.hasFocus()&&!t.removed&&(Ko(w.element,pM)?S.throttle():IE(x(),t).fold(c,(function(t){d(t.toolbars,bt.some(t.elem))})))}),17);t.on("init",(function(){t.on("remove",c),t.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",s),t.on("click keyup focus SetContent",S.throttle),t.on(aM,c),t.on("contexttoolbar-show",(function(e){at(x().lookupTable,e.toolbarKey).each((function(n){d([n],lt(e.target!==t,e.target)),Jp.getContent(w).each(Cp.focusIn)}))})),t.on("focusout",(function(e){eh.setEditorTimeout(t,(function(){wu(n.element).isNone()&&wu(w.element).isNone()&&c()}),0)})),t.on("SwitchMode",(function(){t.mode.isReadOnly()&&c()})),t.on("AfterProgressState",(function(e){e.state?c():t.hasFocus()&&S.throttle()})),t.on("NodeChange",(function(t){wu(w.element).fold(S.throttle,a)}))}))}(kC=CC=CC||{})[kC.SemiColon=0]="SemiColon",kC[kC.Space=1]="Space";var LE,jE,BE,FE=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],NE=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],HE={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},VE={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},UE=Object.freeze({__proto__:null,events:function(t,e){function n(n,r){t.updateState.each((function(t){var o=t(n,r);e.set(o)})),t.renderComponents.each((function(t){var o=L(t(r,e.get()),n.getSystem().build);Es(n,o)}))}return Qi([Oo(Ti(),(function(e,r){var o,i=r;i.universal||(o=t.channel,xt(i.channels,o)&&n(e,i.data))})),Zi((function(e,r){t.initialData.each((function(t){n(e,t)}))}))])}}),WE=Object.freeze({__proto__:null,getState:function(t,e,n){return n}}),$E=hu({fields:[fr("channel"),yr("renderComponents"),yr("updateState"),yr("initialData")],name:"reflecting",active:UE,apis:WE,state:Object.freeze({__proto__:null,init:function(){var t=zr(bt.none());return{readState:function(){return t.get().getOr("none")},get:t.get,set:t.set,clear:function(){return t.set(bt.none())}}}})}),GE=c([fr("toggleClass"),fr("fetch"),Ka("onExecute"),kr("getHotspot",bt.some),kr("getAnchorOverrides",c({})),Ic(),Ka("onItemExecute"),yr("lazySink"),fr("dom"),$a("onOpen"),$s("splitDropdownBehaviours",[Ry,Cp,Dp]),kr("matchWidth",!1),kr("useMinWidth",!1),kr("eventOrder",{}),yr("role")].concat(Vy())),KE=c([Vf({factory:nh,schema:[fr("dom")],name:"arrow",defaults:function(){return{buttonBehaviours:Yu([Dp.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(e){e.getSystem().getByUid(t.uid).each(bo)},buttonBehaviours:Yu([Rp.config({toggleOnExecute:!1,toggleClass:t.toggleClass})])}}}),Vf({factory:nh,schema:[fr("dom")],name:"button",defaults:function(){return{buttonBehaviours:Yu([Dp.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(e){e.getSystem().getByUid(t.uid).each((function(n){t.onExecute(n,e)}))}}}}),Wf({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[fr("text")],name:"aria-descriptor"}),Uf({schema:[Va()],name:"menu",defaults:function(t){return{onExecute:function(e,n){e.getSystem().getByUid(t.uid).each((function(r){t.onItemExecute(r,e,n)}))}}}}),zy()]),qE=gl({name:"SplitDropdown",configFields:GE(),partFields:KE(),factory:function(t,e,n,r){function o(t){td.getCurrent(t).each((function(t){cd.highlightFirst(t),Cp.focusIn(t)}))}function i(e){By(t,s,e,r,o,_y.HighlightFirst).get(a)}function u(e){return bo(al(e,t,"button")),bt.some(!0)}var c,l=k(k({},Qi([Zi((function(e,n){il(e,t,"aria-descriptor").each((function(t){var n=Ro("aria");oe(t.element,"id",n),oe(e.element,"aria-describedby",n)}))}))])),pm(bt.some(i))),f={repositionMenus:function(t){Rp.isOn(t)&&Hy(t)}};return{uid:t.uid,dom:t.dom,components:e,apis:f,eventOrder:k(k({},t.eventOrder),((c={})[Di()]=["disabling","toggling","alloy.base.behaviour"],c)),events:l,behaviours:Ks(t.splitDropdownBehaviours,[Ry.config({others:{sandbox:function(e){var n=al(e,t,"arrow");return Ny(t,e,{onOpen:function(){Rp.on(n),Rp.on(e)},onClose:function(){Rp.off(n),Rp.off(e)}})}}}),Cp.config({mode:"special",onSpace:u,onEnter:u,onDown:function(t){return i(t),bt.some(!0)}}),Dp.config({}),Rp.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:t.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:function(t,e){return t.repositionMenus(e)}}}),XE=Ro("focus-button"),YE=function(t,e,n){return _E(t,{toolbarButtonBehaviours:[].concat(0<n.length?[im("toolbarButtonWith",n)]:[]),getApi:gE,onSetup:t.onSetup},e)},JE=function(t,e,n){return $r(_E(t,{toolbarButtonBehaviours:[Ep.config({}),Rp.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(0<n.length?[im("toolbarToggleButtonWith",n)]:[]),getApi:vE,onSetup:t.onSetup},e))},QE=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styleselect"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],ZE={button:wE(hh,(function(t,e){return n=e.backstage.shared.providers,YE(t,n,[]);var n})),togglebutton:wE(gh,(function(t,e){return n=e.backstage.shared.providers,JE(t,n,[]);var n})),menubutton:wE(DS,(function(t,e){return Ow(t,"tox-tbtn",e.backstage,bt.none())})),splitbutton:wE((function(t){return ar("SplitButton",Ok,t)}),(function(t,e){return r=t,o=e.backstage.shared,l=Ro("channel-update-split-dropdown-display"),f=zr(a),d={getApi:n,onSetup:r.onSetup},qE.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:k({"aria-pressed":!1},bE(r.tooltip,o.providers))},onExecute:function(t){r.onAction(n(t))},onItemExecute:function(t,e,n){},splitDropdownBehaviours:Yu([Lv(o.providers.isDisabled),ov(),im("split-dropdown-events",[Oo(XE,Dp.focus),av(d,f),uv(d,f)]),qw.config({})]),eventOrder:((i={})[Hi()]=["alloy.base.behaviour","split-dropdown-events"],i),toggleClass:"tox-tbtn--enabled",lazySink:o.getSink,fetch:(u=n,c=r,s=o.providers,function(t){return ky((function(t){return c.fetch(t)})).map((function(e){return bt.from(Db($r(pb(Ro("menu-value"),e,(function(e){c.onItemAction(u(t),e)}),c.columns,c.presets,dg.CLOSE_ON_EXECUTE,c.select.getOr(O),s),{movement:hb(c.columns,c.presets),menuBehaviours:Bg("auto"!==c.columns?[]:[Zi((function(t,e){Jh(t,4,Nh(c.presets)).each((function(e){var n=e.numRows,r=e.numColumns;Cp.setGridSize(t,n,r)}))}))])})))}))}),parts:{menu:Uh(0,r.columns,r.presets)},components:[qE.parts.button(yE(r.icon,r.text,bt.none(),bt.some(l),bt.some([Rp.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),o.providers)),qE.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:zm("chevron-down",o.providers.icons)},buttonBehaviours:Yu([Lv(o.providers.isDisabled),ov(),Lm()])}),qE.parts["aria-descriptor"]({text:o.providers.translate("To open the popup, press Shift+Enter")})]});function n(t){return{isDisabled:function(){return ad.isDisabled(t)},setDisabled:function(e){return ad.set(t,e)},setIconFill:function(e,n){Da(t.element,'svg path[id="'+e+'"], rect[id="'+e+'"]').each((function(t){oe(t,"fill",n)}))},setIconStroke:function(e,n){Da(t.element,'svg path[id="'+e+'"], rect[id="'+e+'"]').each((function(t){oe(t,"stroke",n)}))},setActive:function(e){oe(t.element,"aria-pressed",e),Da(t.element,"span").each((function(n){t.getSystem().getByDom(n).each((function(t){return Rp.set(t,e)}))}))},isActive:function(){return Da(t.element,"span").exists((function(e){return t.getSystem().getByDom(e).exists(Rp.isOn)}))}}}var r,o,i,u,c,s,l,f,d})),grouptoolbarbutton:wE((function(t){return ar("GroupToolbarButton",_k,t)}),(function(t,e,n){var r,o,i,a,u,c,s=n.ui.registry.getAll().buttons,l=((r={})[qc]=e.backstage.shared.header.isPositionedAtTop()?bc.TopToBottom:bc.BottomToTop,r);if(qg(n)!==cg.floating)throw new Error("Toolbar groups are only supported when using floating toolbar mode");return i=e.backstage,a=function(t){return eM(n,{buttons:s,toolbar:t,allowToolbarGroups:!1},e,bt.none())},u=l,c=i.shared,Uk.sketch({lazySink:c.getSink,fetch:function(){return ky((function(t){t(L(a(o.items),aC))}))},markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:yE((o=t).icon,o.text,o.tooltip,bt.none(),bt.none(),c.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:u}}}})})),styleSelectButton:function(t,e){return _C(t,n=e.backstage,hE(t,k({type:"advanced"},n.styleselect)));var n},fontsizeSelectButton:function(t,e){return _C(t,e.backstage,dE(t))},fontSelectButton:function(t,e){return _C(t,e.backstage,fE(t))},formatButton:function(t,e){return _C(t,e.backstage,pE(t))},alignMenuButton:function(t,e){return _C(t,e.backstage,sE(t))}},tM={styleselect:ZE.styleSelectButton,fontsizeselect:ZE.fontsizeSelectButton,fontselect:ZE.fontSelectButton,formatselect:ZE.formatButton,align:ZE.alignMenuButton},eM=function(t,e,n,r){var o,a,u,c,s=(u=e.toolbar,c=e.buttons,!1===u?[]:void 0===u||!0===u?(o=c,a=L(QE,(function(t){var e=B(t.items,(function(t){return Mt(o,t)||Mt(tM,t)}));return{name:t.name,items:e}})),B(a,(function(t){return 0<t.items.length}))):f(u)?L(u.split("|"),(function(t){return{items:t.trim().split(" ")}})):i(u,(function(t){return Mt(t,"name")&&Mt(t,"items")}))?u:[]);return B(L(s,(function(o){var i=W(o.items,(function(o){return 0===o.trim().length?[]:(i=t,a=e.buttons,u=o,c=e.allowToolbarGroups,s=n,l=r,at(a,u.toLowerCase()).orThunk((function(){return l.bind((function(t){return tt(t,(function(t){return at(a,t+u.toLowerCase())}))}))})).fold((function(){return at(tM,u.toLowerCase()).map((function(t){return t(i,s)})).orThunk((function(){return bt.none()}))}),(function(t){return"grouptoolbarbutton"!==t.type||c?(n=s,r=i,at(ZE,(e=t).type).fold((function(){return bt.none()}),(function(t){return bt.some(t(e,n,r))}))):bt.none();var e,n,r})).toArray());var i,a,u,c,s,l}));return{title:bt.from(t.translate(o.name)),items:i}})),(function(t){return 0<t.items.length}))},nM=fn(),rM=nM.os.isiOS()&&nM.os.version.major<=12,oM=Object.freeze({__proto__:null,render:function(t,e,n,r,o){var i=zr(0),a=e.outerContainer;aE(t);var u=Rt.fromDom(o.targetNode),c=ee(hn(u)),s=e.mothership;uf(u,s,De),Ps(c,e.uiMothership),t.on("PostRender",(function(){xE(t,e,n,r),i.set(t.getWin().innerWidth),oE.setMenubar(a,fC(t,n)),oE.setSidebar(a,n.sidebar),function(t,e){function n(){var e=c.get();e.left===a.innerWidth&&e.top===a.innerHeight||(c.set(Sn(a.innerWidth,a.innerHeight)),Av(t))}function r(){var e=t.getDoc().documentElement,n=s.get();n.left===e.offsetWidth&&n.top===e.offsetHeight||(s.set(Sn(e.offsetWidth,e.offsetHeight)),Av(t))}function o(e){return t.fire("ScrollContent",e)}var i=t.dom,a=t.getWin(),u=t.getDoc().documentElement,c=zr(Sn(a.innerWidth,a.innerHeight)),s=zr(Sn(u.offsetWidth,u.offsetHeight));i.bind(a,"resize",n),i.bind(a,"scroll",o);var l=lc(Rt.fromDom(t.getBody()),"load",r),f=e.uiMothership.element;t.on("hide",(function(){de(f,"display","none")})),t.on("show",(function(){be(f,"display")})),t.on("NodeChange",r),t.on("remove",(function(){l.unbind(),i.unbind(a,"resize",n),i.unbind(a,"scroll",o),a=null}))}(t,e)}));var l,f,d,m,h=oE.getSocket(a).getOrDie("Could not find expected socket element");rM&&(me(h.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"}),f=function(){t.fire("ScrollContent")},d=null,m=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];p(d)&&(d=setTimeout((function(){d=null,f.apply(null,t)}),20))},l=sc(h.element,"scroll",m),t.on("remove",l.unbind)),rv(t,e),t.addCommand("ToggleSidebar",(function(e,n){oE.toggleSidebar(a,n),t.fire("ToggleSidebar")})),t.addQueryValueHandler("ToggleSidebar",(function(){return oE.whichSidebar(a)}));var g=qg(t);g!==cg.sliding&&g!==cg.floating||t.on("ResizeWindow ResizeEditor ResizeContent",(function(){var n=t.getWin().innerWidth;n!==i.get()&&(oE.refreshToolbar(e.outerContainer),i.set(n))}));var v={enable:function(){nv(e,!1)},disable:function(){nv(e,!0)},isDisabled:function(){return ad.isDisabled(a)}};return{iframeContainer:h.element.dom,editorContainer:a.element.dom,api:v}}}),iM=Object.freeze({__proto__:null,render:function(t,e,n,r,o){var i=e.mothership,a=e.uiMothership,u=e.outerContainer,s=zr(null),l=Rt.fromDom(o.targetNode),f=function(t,e,n,r,o){function i(){return w.get()&&!t.removed}function a(t){return _?t.fold(c(0),(function(t){return 1<t.components().length?we(t.components()[1].element):0})):0}function u(){f.broadcastOn([df()],{})}function s(t){var n,r,c,s,l;void 0===t&&(t=!1),i()&&(p||(n=g.getOrThunk((function(){var t=OE(he(yn(),"margin-left")).getOr(0);return Ce(yn())-Se(e).left+t})),de(o.get().element,"max-width",n+"px")),_&&oE.refreshToolbar(d),p||(r=a(oE.getToolbar(d)),c=Rn(e),s=b()?Math.max(c.y-we(o.get().element)+r,0):c.bottom,me(d.element,{position:"absolute",top:Math.round(s)+"px",left:Math.round(c.x)+"px"})),h&&(l=o.get(),t?pk.reset(l):pk.refresh(l)),u())}function l(n){var r,u;void 0===n&&(n=!0),!p&&h&&i()&&(r=v.getDockingMode(),(u=function(n){switch(Xg(t)){case lg.auto:var r=a(oE.getToolbar(d)),o=we(n.element)-r,i=Rn(e);if(i.y>o)return"top";var u=Gt(e),c=Math.max(u.dom.scrollHeight,we(u));return i.bottom<c-o||In().bottom<i.bottom-o?"bottom":"top";case lg.bottom:return"bottom";default:return lg.top,"top"}}(o.get()))!==r&&(function(t){var e=o.get();pk.setModes(e,[t]),v.setDockingMode(t);var n=b()?bc.TopToBottom:bc.BottomToTop;oe(e.element,qc,n)}(u),n&&s(!0)))}var f=n.uiMothership,d=n.outerContainer,m=$g.DOM,p=Qg(t),h=ev(t),g=rg(t).or(kE(t)),v=r.shared.header,b=v.isPositionedAtTop,y=qg(t),_=y===cg.sliding||y===cg.floating,w=zr(!1);return{isVisible:i,isPositionedAtTop:b,show:function(){w.set(!0),de(d.element,"display","flex"),m.addClass(t.getBody(),"mce-edit-focus"),be(f.element,"display"),l(!1),s()},hide:function(){w.set(!1),n.outerContainer&&(de(d.element,"display","none"),m.removeClass(t.getBody(),"mce-edit-focus")),de(f.element,"display","none")},update:s,updateMode:l,repositionPopups:u}}(t,l,e,r,s),d=t.getParam("toolbar_persist",!1,"boolean");function m(){var o;s.get()?f.show():(s.set(oE.getHeader(u).getOrDie()),Ps(o=Zg(t),i),Ps(o,a),xE(t,e,n,r),oE.setMenubar(u,fC(t,n)),f.show(),function(t,e,n,r){function o(r){var o=EE(e,n.isPositionedAtTop()),a=o.pos,u=o.bounds,c=i.get(),s=c.pos,l=c.bounds,f=u.height!==l.height||u.width!==l.width;i.set({pos:a,bounds:u}),f&&Av(t,r),n.isVisible()&&(s!==a?n.update(!0):f&&(n.updateMode(),n.repositionPopups()))}var i=zr(EE(e,n.isPositionedAtTop()));r||(t.on("activate",n.show),t.on("deactivate",n.hide)),t.on("SkinLoaded ResizeWindow",(function(){return n.update(!0)})),t.on("NodeChange keydown",(function(t){eh.requestAnimationFrame((function(){return o(t)}))})),t.on("ScrollWindow",(function(){return n.updateMode()}));var a=uc();a.set(lc(Rt.fromDom(t.getBody()),"load",o)),t.on("remove",(function(){a.clear()}))}(t,l,f,d),t.nodeChanged())}uE(t),t.on("show",m),t.on("hide",f.hide),d||(t.on("focus",m),t.on("blur",f.hide)),t.on("init",(function(){(t.hasFocus()||d)&&m()})),rv(t,e);var p={show:function(){f.show()},hide:function(){f.hide()},enable:function(){nv(e,!1)},disable:function(){nv(e,!0)},isDisabled:function(){return ad.isDisabled(u)}};return{editorContainer:u.element.dom,api:p}}}),aM="contexttoolbar-hide",uM=function(t,e){var n,r,o,i,u=t.label.fold((function(){return{}}),(function(t){return{"aria-label":t}})),c=Am(fy.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:t.initValue(),inputAttributes:u,selectOnFocus:!0,inputBehaviours:Yu([Cp.config({mode:"special",onEnter:function(t){return s.findPrimary(t).map((function(t){return bo(t),!0}))},onLeft:function(t,e){return e.cut(),bt.none()},onRight:function(t,e){return e.cut(),bt.none()}})])})),s=(n=c,r=t.commands,o=e,i=L(r,(function(t){return Am(("contextformtogglebutton"===t.type?function(t,e,n){var r=e.original;r.primary;var o=E(r,["primary"]),i=ur(gh(k(k({},o),{type:"togglebutton",onAction:a})));return JE(i,n.backstage.shared.providers,[ME(t,e)])}:function(t,e,n){var r=e.original;r.primary;var o=E(r,["primary"]),i=ur(hh(k(k({},o),{type:"button",onAction:a})));return YE(i,n.backstage.shared.providers,[ME(t,e)])})(n,t,{backstage:{shared:{providers:o}}}))})),{asSpecs:function(){return L(i,(function(t){return t.asSpec()}))},findPrimary:function(t){return tt(r,(function(e,n){return e.primary?bt.from(i[n]).bind((function(e){return e.getOpt(t)})).filter(w(ad.isDisabled)):bt.none()}))}});return[{title:bt.none(),items:[c.asSpec()]},{title:bt.none(),items:s.asSpecs()}]},cM={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"],inset:["tox-pop--inset"]},sM={maxHeightFunction:Mc(),maxWidthFunction:Nk()},lM=Ro("forward-slide"),fM=Ro("backward-slide"),dM=Ro("change-slide-event"),mM="tox-pop--resizing",pM="tox-pop--transition",hM={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},gM=(BE=["Infinity",(LE="[0-9]+")+"\\."+vM(LE)+vM(jE="[eE][+-]?[0-9]+"),"\\."+LE+vM(jE),LE+vM(jE)].join("|"),new RegExp("^([+-]?(?:"+BE+"))(.*)$"));function vM(t){return"(?:"+t+")?"}function bM(t,e){function n(){var n=e.getOptions(t),r=e.getCurrent(t).map(e.hash),o=cc();return L(n,(function(n){return{type:"togglemenuitem",text:e.display(n),onSetup:function(i){function a(t){t&&(o.on((function(t){return t.setActive(!1)})),o.set(i)),i.setActive(t)}a(ct(r,e.hash(n)));var u=e.watcher(t,n,a);return function(){o.clear(),u()}},onAction:function(){return e.setCurrent(t,n)}}}))}t.ui.registry.addMenuButton(e.name,{tooltip:e.text,icon:e.icon,fetch:function(t){return t(n())},onSetup:e.onToolbarSetup}),t.ui.registry.addNestedMenuItem(e.name,{type:"nestedmenuitem",text:e.text,getSubmenuItems:n,onSetup:e.onMenuSetup})}function yM(t,e){return function(){t.execCommand("mceToggleFormat",!1,e)}}function _M(t,e){return gC(t,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",(function(n){n.setDisabled(t.mode.isReadOnly()||!t.undoManager[e]())}))}function wM(t,e){var n,r,o,i,a,u,s,l,f,d,m,p,h,v,b,y,_,w,x,O,S,C,E,M,T,D=t;Ot([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],(function(t){D.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:bC(D,t.cmd),onSetup:hC(D,t.name)})})),D.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onAction:bC(D,"JustifyNone")}),function(t){var e,n;!function(t){Vx.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],(function(e,n){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onSetup:hC(t,e.name),onAction:yM(t,e.name)})}));for(var e=1;e<=6;e++){var n="h"+e;t.ui.registry.addToggleButton(n,{text:n.toUpperCase(),tooltip:"Heading "+e,onSetup:hC(t,n),onAction:yM(t,n)})}}(t),e=t,Vx.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"}],(function(t){e.ui.registry.addButton(t.name,{tooltip:t.text,icon:t.icon,onAction:bC(e,t.action)})})),n=t,Vx.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],(function(t){n.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:bC(n,t.action),onSetup:hC(n,t.name)})}))}(M=t),T=M,Vx.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through",shortcut:""},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript",shortcut:""},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript",shortcut:""},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting",shortcut:""},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document",shortcut:""},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"}],(function(t){T.ui.registry.addMenuItem(t.name,{text:t.text,icon:t.icon,shortcut:t.shortcut,onAction:bC(T,t.action)})})),T.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:yM(T,"code")}),E=yC(0,m=f=e,sE(d=l=t)),d.ui.registry.addNestedMenuItem("align",{text:m.shared.providers.translate("Align"),getSubmenuItems:function(){return E.items.validateItems(E.getStyleItems())}}),v=yC(0,h=f,fE(p=l)),p.ui.registry.addNestedMenuItem("fontformats",{text:h.shared.providers.translate("Fonts"),getSubmenuItems:function(){return v.items.validateItems(v.getStyleItems())}}),b=l,_=k({type:"advanced"},(y=f).styleselect),w=yC(0,y,hE(b,_)),b.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return w.items.validateItems(w.getStyleItems())}}),O=yC(0,f,pE(x=l)),x.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return O.items.validateItems(O.getStyleItems())}}),C=yC(0,f,dE(S=l)),S.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return C.items.validateItems(C.getStyleItems())}}),(u=a=t).ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:_M(u,"hasUndo"),onAction:bC(u,"undo")}),u.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:_M(u,"hasRedo"),onAction:bC(u,"redo")}),(s=a).ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",disabled:!0,onSetup:_M(s,"hasUndo"),onAction:bC(s,"undo")}),s.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",disabled:!0,onSetup:_M(s,"hasRedo"),onAction:bC(s,"redo")}),function(t){var e;(e=t).addCommand("mceApplyTextcolor",(function(t,n){var r,o=t,i=n;(r=e).undoManager.transact((function(){r.focus(),r.formatter.apply(o,{value:i}),r.nodeChanged()}))})),e.addCommand("mceRemoveTextcolor",(function(t){var n,r=t;(n=e).undoManager.transact((function(){n.focus(),n.formatter.remove(r,{value:null},null,!0),n.nodeChanged()}))}));var n=zr(xb),r=zr(xb);db(t,"forecolor","forecolor","Text color",n),db(t,"backcolor","hilitecolor","Background color",r),mb(t,"forecolor","forecolor","Text color"),mb(t,"backcolor","hilitecolor","Background color")}(t),function(t){var e;t.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:bC(t,"mceToggleVisualAid")}),t.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:gC(e=t,"VisualAid",(function(t){t.setActive(e.hasVisual)})),onAction:bC(t,"mceToggleVisualAid")})}(t),(o=t).ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:gC(i=o,"NodeChange",(function(t){t.setDisabled(!i.queryCommandState("outdent"))})),onAction:bC(o,"outdent")}),o.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:bC(o,"indent")}),bM(n=t,oT),r=n,bt.from(r.getParam("content_langs",void 0,"array")).map((function(t){return{name:"language",text:"Language",icon:"language",getOptions:c(t),hash:function(t){return g(t.customCode)?t.code:t.code+"/"+t.customCode},display:function(t){return t.title},watcher:function(t,e,n){return t.formatter.formatChanged("lang",n,!1,{value:e.code,customValue:e.customCode}).unbind},getCurrent:function(t){return fo(Rt.fromDom(t.selection.getNode()),(function(t){return bt.some(t).filter(Ge).bind((function(t){return ue(t,"lang").map((function(e){return{code:e,customCode:ue(t,"data-mce-lang").getOrUndefined(),title:""}}))}))}))},setCurrent:function(t,e){return t.execCommand("Lang",!1,e)},onToolbarSetup:function(t){var e=uc();return t.setActive(r.formatter.match("lang",{},void 0,!0)),e.set(r.formatter.formatChanged("lang",t.setActive,!0)),e.clear}}})).each((function(t){return bM(n,t)}))}function xM(t,e){return{type:"makeshift",x:t,y:e}}function OM(t){return"longpress"===t.type||0===t.type.indexOf("touch")}function SM(t,e,n){switch(n){case"node":return{type:"node",node:bt.some(Rt.fromDom((r=t).selection.getNode())),root:Rt.fromDom(r.getBody())};case"point":return function(t,e){return"contextmenu"===e.type||"longpress"===e.type?t.inline?function(t){if(OM(t)){var e=t.touches[0];return xM(e.pageX,e.pageY)}return xM(t.pageX,t.pageY)}(e):(n=t.getContentAreaContainer(),r=function(t){if(OM(t)){var e=t.touches[0];return xM(e.clientX,e.clientY)}return xM(t.clientX,t.clientY)}(e),i=(o=$g.DOM.getPos(n)).x,a=o.y,xM(r.x+i,r.y+a)):iT(t);var n,r,o,i,a}(t,e);case"selection":return iT(t)}var r}function CM(t,e,n,r,o,i){function a(){var a,u,c,m,p,h,g,v,b,y;c=n(),m=r,p=o,g=!(f||s||l&&d),b=SM(a=t,u=e,v=h=i),y=k({bubble:hc(0,"point"===v?12:0,uT),layouts:aT,overrides:{maxWidthFunction:Nk(),maxHeightFunction:Mc()}},b),ww(c,dg.CLOSE_ON_EXECUTE,m,!0).map((function(t){u.preventDefault(),Jp.showMenuWithinBounds(p,{anchor:y},{menu:{markers:Vh("normal"),highlightImmediately:g},data:t,type:"horizontal"},(function(){return bt.some(AE(a,m.shared,"node"===h?"node":"selection"))})),a.fire(aM)}))}var u,c=fn(),s=c.os.isiOS(),l=c.os.isOSX(),f=c.os.isAndroid(),d=c.deviceType.isTouch();(l||s)&&"node"!==i?(u=function(){(function(t){function e(){eh.setEditorTimeout(t,(function(){t.selection.setRng(n)}),10),i()}var n=t.selection.getRng();function r(t){t.preventDefault(),t.stopImmediatePropagation()}function o(){return i()}t.once("touchend",e),t.on("mousedown",r,!0),t.once("longpresscancel",o);var i=function(){t.off("touchend",e),t.off("longpresscancel",o),t.off("mousedown",r)}})(t),a()},function(t,e){var n=t.selection;if(!(n.isCollapsed()||e.touches.length<1)){var r=e.touches[0],o=n.getRng();return ds(t.getWin(),is.domRange(o)).exists((function(t){return t.left<=r.clientX&&t.right>=r.clientX&&t.top<=r.clientY&&t.bottom>=r.clientY}))}}(t,e)?u():(t.once("selectionchange",u),t.once("touchend",(function(){return t.off("selectionchange",u)})))):a()}function kM(t){return"string"==typeof t?t.split(/[ ,]/):t}function EM(t){return t.getParam("contextmenu_never_use_native",!1,"boolean")}function MM(t){return f(t)?"|"===t:"separator"===t.type}function TM(t,e){if(0===e.length)return t;var n=Z(t).filter((function(t){return!MM(t)})).fold((function(){return[]}),(function(t){return[cT]}));return t.concat(n).concat(e).concat([cT])}function DM(t,e){return"longpress"!==e.type&&(2!==e.button||e.target===t.getBody()&&""===e.pointerType)}function AM(t,e){return DM(t,e)?t.selection.getStart(!0):e.target}function PM(t,e,n){function r(t){return Jp.hide(a)}function o(e){var r;EM(t)&&e.preventDefault(),e.ctrlKey&&!EM(t)||!1===t.getParam("contextmenu")||(r=function(t,e){var n=t.getParam("contextmenu_avoid_overlap","","string"),r=DM(t,e)?"selection":"point";if(mt(n)){var o=AM(t,e);return Ab(Rt.fromDom(o),n)?"node":r}return r}(t,e),(i()?CM:function(t,e,n,r,o,i){var a=n(),u=SM(t,e,i);ww(a,dg.CLOSE_ON_EXECUTE,r,!1).map((function(t){e.preventDefault(),Jp.showMenuAt(o,{anchor:u},{menu:{markers:Vh("normal")},data:t})}))})(t,e,(function(){var n,r,o,i=AM(t,e),a=t.ui.registry.getAll(),u=(o=(r=t).ui.registry.getAll().contextMenus,bt.from(r.getParam("contextmenu")).map(kM).getOrThunk((function(){return B(kM("link linkchecker image imagetools table spellchecker configurepermanentpen"),(function(t){return Mt(o,t)}))}))),c=a.contextMenus,s=i;return 0<(n=N(u,(function(t,e){return at(c,e.toLowerCase()).map((function(e){var n=e.update(s);if(f(n))return TM(t,n.split(" "));if(0<n.length){var r=L(n,sT);return TM(t,r)}return t})).getOrThunk((function(){return t.concat([e])}))}),[])).length&&MM(n[n.length-1])&&n.pop(),n}),n,a,r))}var i=fn().deviceType.isTouch,a=Oa(Jp.sketch({dom:{tag:"div"},lazySink:e,onEscape:function(){return t.focus()},onShow:function(){return n.setContextMenuState(!0)},onHide:function(){return n.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:Yu([im("dismissContextMenu",[Oo(Ui(),(function(e,n){lf.close(e),t.focus()}))])])}));t.on("init",(function(){var e="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(i()?"":" ResizeWindow");t.on(e,r),t.on("longpress contextmenu",o)}))}function RM(t){return function(e){return e.translate(-t.left,-t.top)}}function IM(t){return function(e){return e.translate(t.left,t.top)}}function zM(t){return function(e,n){return N(t,(function(t,e){return e(t)}),Sn(e,n))}}function LM(t,e,n){return t.fold(zM([IM(n),RM(e)]),zM([RM(e)]),zM([]))}function jM(t,e,n){return t.fold(zM([IM(n)]),zM([]),zM([IM(e)]))}function BM(t,e,n){return t.fold(zM([]),zM([RM(n)]),zM([IM(e),RM(n)]))}function FM(t,e,n){var r=t.fold((function(t,e){return{position:bt.some("absolute"),left:bt.some(t+"px"),top:bt.some(e+"px")}}),(function(t,e){return{position:bt.some("absolute"),left:bt.some(t-n.left+"px"),top:bt.some(e-n.top+"px")}}),(function(t,e){return{position:bt.some("fixed"),left:bt.some(t+"px"),top:bt.some(e+"px")}}));return k({right:bt.none(),bottom:bt.none()},r)}function NM(t,e,n,r){function o(t,o){return function(i,a){var u=t(e,n,r);return o(i.getOr(u.left),a.getOr(u.top))}}return t.fold(o(BM,fT),o(jM,dT),o(LM,mT))}function HM(t,e){var n=ae(t,e);return g(n)?NaN:parseInt(n,10)}function VM(t,e,n,r){return tt(t,(function(t){var o,i,a=t.sensor,u=t.range.left,c=t.range.top,s=jM(e,o=n,i=r),l=jM(a,o,i);return Math.abs(s.left-l.left)<=u&&Math.abs(s.top-l.top)<=c?bt.some({output:NM(t.output,e,n,r),extra:t.extra}):bt.none()}))}function UM(t,e){var n;t.getSystem().addToGui(e),qt((n=e).element).filter(Ge).each((function(t){ge(t,"z-index").each((function(e){oe(t,vT,e)})),de(t,"z-index",he(n.element,"z-index"))}))}function WM(t){qt(t.element).filter(Ge).each((function(t){ue(t,vT).fold((function(){return be(t,"z-index")}),(function(e){return de(t,"z-index",e)})),se(t,vT)})),t.getSystem().removeFromGui(t)}function $M(t,e,n){return t.getSystem().build(Gb.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[e]},events:n}))}function GM(t,e){return{bounds:t.getBounds(),height:xe(e.element),width:ke(e.element)}}function KM(t,e,n,r,o){var i=n.update(r,o),a=n.getStartData().getOrThunk((function(){return GM(e,t)}));i.each((function(n){var r,o,i,u,s,l,f,d,m,p,h,g,v,b,y,_,w,x,O,S,C,k,E,M,T,D=t,A=a,P=n,R=(r=e).getTarget(D.element);r.repositionTarget&&(o=ze(Wt(D.element)),i=hS(R),k=ge(C=R,"left"),E=ge(C,"top"),M=ge(C,"position"),T=function(t,e,n){return("fixed"===n?mT:fT)(parseInt(t,10),parseInt(e,10))},u=(k.isSome()&&E.isSome()&&M.isSome()?bt.some(T(k.getOrDie(),E.getOrDie(),M.getOrDie())):bt.none()).getOrThunk((function(){var t=Se(C);return dT(t.left,t.top)})),s=D,l=r.snaps,f=u,d=o,m=i,p=P,h=A,v=l.fold((function(){var t,e,n=LM((t=p.left,e=p.top,f.fold((function(n,r){return fT(n+t,r+e)}),(function(n,r){return dT(n+t,r+e)}),(function(n,r){return mT(n+t,r+e)}))),d,m);return mT(n.left,n.top)}),(function(t){var e=function(t,e,n,r,o,i){var a,u,c,s,l,f,d=(a=n,u=r,l=HM(s=t.element,(c=e).leftAttr),f=HM(s,c.topAttr),(isNaN(l)||isNaN(f)?bt.none():bt.some(Sn(l,f))).fold((function(){return a}),(function(t){return mT(t.left+u.left,t.top+u.top)}))),m=(e.mustSnap?pT:hT)(t,e,d,o,i),p=LM(d,o,i),h=e,g=p,v=t.element;return oe(v,h.leftAttr,g.left+"px"),oe(v,h.topAttr,g.top+"px"),m.fold((function(){return{coord:mT(p.left,p.top),extra:bt.none()}}),(function(t){return{coord:t.output,extra:t.extra}}))}(s,t,f,p,d,m);return e.extra.each((function(e){t.onSensor(s,e)})),e.coord})),b=d,y=m,_=(g=h).bounds,w=jM(v,b,y),x=Fu(w.left,_.x,_.x+_.width-g.width),O=Fu(w.top,_.y,_.y+_.height-g.height),S=dT(x,O),pe(R,FM(v.fold((function(){var t=BM(S,b,y);return fT(t.left,t.top)}),c(S),(function(){var t=LM(S,b,y);return mT(t.left,t.top)})),0,i))),r.onDrag(D,R,P)}))}function qM(t,e,n,r){e.each(WM),n.snaps.each((function(e){var n,r;n=e,se(r=t.element,n.leftAttr),se(r,n.topAttr)}));var o=n.getTarget(t.element);r.reset(),n.onDrop(t,o)}function XM(t){return function(e,n){function r(t){n.setStartData(GM(e,t))}return Qi(M([Oo(Fi(),(function(t){n.getStartData().each((function(){return r(t)}))}))],t(e,n,r),!0))}}function YM(t,e,n){return[Oo(si(),(function(r,o){var i,a,u,c,s;0===o.event.raw.button&&(o.stop(),u={drop:i=function(){return qM(r,bt.some(c),t,e)},delayDrop:(a=Pb(i,200)).schedule,forceDrop:i,move:function(n){a.cancel(),KM(r,t,e,_T,n)}},c=$M(r,t.blockerClass,(s=u,Qi([Oo(si(),s.forceDrop),Oo(di(),s.drop),Oo(li(),(function(t,e){s.move(e.event)})),Oo(fi(),s.delayDrop)]))),n(r),UM(r,c))}))]}function JM(t,e,n){function r(n){qM(n,o.get(),t,e),o.clear()}var o=cc();return[Oo(ii(),(function(i,a){a.stop();var u,c,s,l=$M(i,t.blockerClass,(c=u=function(){return r(i)},s=function(n){KM(i,t,e,xT,n)},Qi([Oo(ii(),c),Oo(ui(),u),Oo(ci(),u),Oo(ai(),(function(t,e){s(e.event)}))])));o.set(l),n(i),UM(i,l)})),Oo(ai(),(function(n,r){r.stop(),KM(n,t,e,xT,r.event)})),Oo(ui(),(function(t,e){e.stop(),r(t)})),Oo(ci(),r)]}function QM(t,e,n,r,o,i){return t.fold((function(){return CT.snap({sensor:dT(n-20,r-20),range:Sn(o,i),output:dT(bt.some(n),bt.some(r)),extra:{td:e}})}),(function(t){var o=n-20,i=r-20,a=t.element.dom.getBoundingClientRect();return CT.snap({sensor:dT(o,i),range:Sn(40,40),output:dT(bt.some(n-a.width/2),bt.some(r-a.height/2)),extra:{td:e}})}))}function ZM(t,e,n){return{getSnapPoints:t,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(t,r){var o=r.td,i=e.get(),a=o;i.exists((function(t){return Vt(t,a)}))||(e.set(o),n(o))},mustSnap:!0}}function tT(t){return Am(nh.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:Yu([CT.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:t}),qw.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))}function eT(t,e){function n(t){var n=Ne(t);return QM(p.getOpt(e),t,n.x,n.y,n.width,n.height)}function r(t){var n=Ne(t);return QM(h.getOpt(e),t,n.right,n.bottom,n.width,n.height)}function o(e,n,r,o){var i=r(n);CT.snapTo(e,i),function(e){var r=n.dom.getBoundingClientRect();be(e.element,"display");var i=Kt(Rt.fromDom(t.getBody())).dom.innerHeight,a=r[o]<0,u=r[o]>i;(a||u)&&de(e.element,"display","none")}(e)}function i(t){return o(g,t,n,"top")}function a(t){return o(v,t,r,"bottom")}var u=zr([]),c=zr([]),s=zr(!1),l=cc(),f=cc(),d=ZM((function(){return L(u.get(),n)}),l,(function(e){f.get().each((function(n){t.fire("TableSelectorChange",{start:e,finish:n})}))})),m=ZM((function(){return L(c.get(),r)}),f,(function(e){l.get().each((function(n){t.fire("TableSelectorChange",{start:n,finish:e})}))})),p=tT(d),h=tT(m),g=Oa(p.asSpec()),v=Oa(h.asSpec());fn().deviceType.isTouch()&&(t.on("TableSelectionChange",(function(t){s.get()||(Ms(e,g),Ms(e,v),s.set(!0)),l.set(t.start),f.set(t.finish),t.otherCells.each((function(e){u.set(e.upOrLeftCells),c.set(e.downOrRightCells),i(t.start),a(t.finish)}))})),t.on("ResizeEditor ResizeWindow ScrollContent",(function(){l.get().each(i),f.get().each(a)})),t.on("TableSelectionClear",(function(){s.get()&&(Ds(g),Ds(v),s.set(!1)),l.clear(),f.clear()})))}var nT,rT,oT={name:"lineheight",text:"Line height",icon:"line-height",getOptions:function(t){return t.getParam("lineheight_formats","1 1.1 1.2 1.3 1.4 1.5 2","string").split(" ")},hash:function(t){return e=["fixed","relative","empty"],bt.from(gM.exec(t)).bind((function(t){var n=Number(t[1]),r=t[2],o=r;return R(e,(function(t){return R(hM[t],(function(t){return o===t}))}))?bt.some({value:n,unit:r}):bt.none()})).map((function(t){return t.value+t.unit})).getOr(t);var e},display:s,watcher:function(t,e,n){return t.formatter.formatChanged("lineheight",n,!1,{value:e}).unbind},getCurrent:function(t){return bt.from(t.queryCommandValue("LineHeight"))},setCurrent:function(t,e){return t.execCommand("LineHeight",!1,e)}},iT=function(t){return{type:"selection",root:Rt.fromDom(t.selection.getNode())}},aT={onLtr:function(){return[Gu,Hu,Vu,Uu,Wu,$u,Zp,th,Sm,xm,Om,wm]},onRtl:function(){return[Gu,Vu,Hu,Wu,Uu,$u,Zp,th,Om,wm,Sm,xm]}},uT={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},cT={type:"separator"},sT=function(t){function e(t){return{text:t.text,icon:t.icon,disabled:t.disabled,shortcut:t.shortcut}}var n;if(f(t))return t;switch(t.type){case"separator":return cT;case"submenu":return k(k({type:"nestedmenuitem"},e(t)),{getSubmenuItems:function(){var e=t.getSubmenuItems();return f(e)?e:L(e,sT)}});default:return k(k({type:"menuitem"},e(t)),{onAction:(n=t.onAction,function(){return n()})})}},lT=Lr([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),fT=lT.offset,dT=lT.absolute,mT=lT.fixed,pT=function(t,e,n,r,o){var i=e.getSnapPoints(t);return VM(i,n,r,o).orThunk((function(){return N(i,(function(t,e){var i,a,u,c,s,l,f,d=(i=e.sensor,e.range.left,e.range.top,c=jM(n,a=r,u=o),s=jM(i,a,u),l=Math.abs(c.left-s.left),f=Math.abs(c.top-s.top),Sn(l,f));return t.deltas.fold((function(){return{deltas:bt.some(d),snap:bt.some(e)}}),(function(n){return(d.left+d.top)/2<=(n.left+n.top)/2?{deltas:bt.some(d),snap:bt.some(e)}:t}))}),{deltas:bt.none(),snap:bt.none()}).snap.map((function(t){return{output:NM(t.output,n,r,o),extra:t.extra}}))}))},hT=function(t,e,n,r,o){return VM(e.getSnapPoints(t),n,r,o)},gT=Object.freeze({__proto__:null,snapTo:function(t,e,n,r){var o,i,a,u=e.getTarget(t.element);e.repositionTarget&&(o=ze(Wt(t.element)),i=hS(u),pe(u,FM([NM((a=r).output,a.output,o,i),a.extra][0],0,i)))}}),vT="data-initial-z-index",bT=Cr("snaps",[fr("getSnapPoints"),$a("onSensor"),fr("leftAttr"),fr("topAttr"),kr("lazyViewport",In),kr("mustSnap",!1)]),yT=[kr("useFixed",O),fr("blockerClass"),kr("getTarget",s),kr("onDrag",a),kr("repositionTarget",!0),kr("onDrop",a),Pr("getBounds",In),bT],_T=Object.freeze({__proto__:null,getData:function(t){return bt.from(Sn(t.x,t.y))},getDelta:function(t,e){return Sn(e.left-t.left,e.top-t.top)}}),wT=M(M([],yT,!0),[Xa("dragger",{handlers:XM(YM)})],!1),xT=Object.freeze({__proto__:null,getData:function(t){var e,n=t.raw.touches;return 1===n.length?(e=n[0],bt.some(Sn(e.clientX,e.clientY))):bt.none()},getDelta:function(t,e){return Sn(e.left-t.left,e.top-t.top)}}),OT=M(M([],yT,!0),[Xa("dragger",{handlers:XM(JM)})],!1),ST=M(M([],yT,!0),[Xa("dragger",{handlers:XM((function(t,e,n){return M(M([],YM(t,e,n),!0),JM(t,e,n),!0)}))})],!1),CT=gu({branchKey:"mode",branches:Object.freeze({__proto__:null,mouse:wT,touch:OT,mouseOrTouch:ST}),name:"dragging",active:{events:function(t,e){return t.dragger.handlers(t,e)}},extra:{snap:function(t){return{sensor:t.sensor,range:t.range,output:t.output,extra:bt.from(t.extra)}}},state:Object.freeze({__proto__:null,init:function(){var t=bt.none(),e=bt.none(),n=c({});return va({readState:n,reset:function(){t=bt.none(),e=bt.none()},update:function(e,n){return e.getData(n).bind((function(n){return r=e,o=n,i=t.map((function(t){return r.getDelta(t,o)})),t=bt.some(o),i;var r,o,i}))},getStartData:function(){return e},setStartData:function(t){e=bt.some(t)}})}}),apis:gT});function kT(t,e,n){var r,o,i,a,u,c,s=Rt.fromDom(t.getContainer());et((r=t,o=e,i=n,a=we(s),u=Ce(s),(c={}).height=CE(a+o.top,ng(r),og(r)),i===nT.Both&&(c.width=CE(u+o.left,eg(r),rg(r))),c),(function(t,e){return de(s,e,SE(t)),0})),t.fire("ResizeEditor")}function ET(t,e,n,r){return kT(t,Sn(20*n,20*r),e),bt.some(!0)}function MT(t,e){var n,r,o,i,a,u,c,s,l,f,d,m,p,h,g,v;return{dom:{tag:"div",classes:["tox-statusbar"]},components:(v=[],t.getParam("elementpath",!0,"boolean")&&v.push((p=t,g=e,(h={}).delimiter||(h.delimiter="»"),{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:Yu([Cp.config({mode:"flow",selector:"div[role=button]"}),ad.config({disabled:g.isDisabled}),ov(),Jb.config({}),Ep.config({}),im("elementPathEvents",[Zi((function(t,e){p.shortcuts.add("alt+F11","focus statusbar elementpath",(function(){return Cp.focusIn(t)})),p.on("NodeChange",(function(e){var n,r,o=function(t){for(var e=[],n=t.length;0<n--;){var r=t[n];if(1===r.nodeType&&!function(t){if(1===t.nodeType){if("BR"===t.nodeName||t.getAttribute("data-mce-bogus"))return 1;if("bookmark"===t.getAttribute("data-mce-type"))return 1}}(r)){var o=p.fire("ResolveName",{name:r.nodeName.toLowerCase(),target:r});if(o.isDefaultPrevented()||e.push({name:o.name,element:r}),o.isPropagationStopped())break}}return e}(e.parents);0<o.length?Ep.set(t,(n=L(o||[],(function(t,e){return nh.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":e,"tab-index":-1,"aria-level":e+1},innerHtml:t.name},action:function(e){p.focus(),p.selection.select(t.element),p.nodeChanged()},buttonBehaviours:Yu([Nv(g.isDisabled),ov()])})})),r={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+h.delimiter+" "}},N(n.slice(1),(function(t,e){var n=t;return n.push(r),n.push(e),n}),[n[0]]))):Ep.set(t,[])}))}))])]),components:[]})),t.hasPlugin("wordcount")&&v.push((f=t,d=e,nh.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:Yu([Nv(d.isDisabled),ov(),Jb.config({}),Ep.config({}),wf.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),im("wordcount-events",[na((function(t){var e=wf.getValue(t),n="words"===e.mode?"characters":"words";wf.setValue(t,{mode:n,count:e.count}),b(t,e.count,n)})),Zi((function(t){f.on("wordCountUpdate",(function(e){var n=wf.getValue(t).mode;wf.setValue(t,{mode:n,count:e.wordCount}),b(t,e.wordCount,n)}))}))])]),eventOrder:((m={})[Di()]=["disabling","alloy.base.behaviour","wordcount-events"],m)}))),t.getParam("branding",!0,"boolean")&&v.push({dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:'<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&utm_medium=poweredby&utm_source=tinymce&utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="'+(l=rh.translate(["Powered by {0}","Tiny"]))+'">'+l+"</a>"}}),n=0<v.length?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:v}]:[],i=e,u=!(a=o=t).hasPlugin("autoresize"),r=(s=!1===(c=a.getParam("resize",u))?nT.None:"both"===c?nT.Both:nT.Vertical)===nT.None?bt.none():bt.some(Bm("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:i.translate("Resize")},behaviours:[CT.config({mode:"mouse",repositionTarget:!1,onDrag:function(t,e,n){return kT(o,n,s)},blockerClass:"tox-blocker"}),Cp.config({mode:"special",onLeft:function(){return ET(o,s,-1,0)},onRight:function(){return ET(o,s,1,0)},onUp:function(){return ET(o,s,0,-1)},onDown:function(){return ET(o,s,0,1)}}),Jb.config({}),Dp.config({})]},i.icons)),n.concat(r.toArray()))};function b(t,e,n){return Ep.set(t,[ti(d.translate(["{0} "+n,e[n]]))])}}function TT(t){function e(){return d.bind(oE.getHeader)}function n(){return jn.value(_)}function r(){return d.bind((function(t){return oE.getThrobber(t)})).getOrDie("Could not find throbber element")}var o,i,u,c,s=t.inline,l=s?iM:oM,f=ev(t)?yk:sk,d=bt.none(),m=fn(),p=m.browser.isIE()?["tox-platform-ie"]:[],h=m.deviceType.isTouch()?["tox-platform-touch"]:[],g=Yg(t),v=Zg(t),b=rh.isRtl()?{attributes:{dir:"rtl"}}:{},y={attributes:((o={})[qc]=g?bc.BottomToTop:bc.TopToBottom,o)},_=Oa((i=Vt(yn(),v)&&"grid"===he(v,"display"),u={dom:k({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(p).concat(h)},b),behaviours:Yu([nf.config({useFixed:function(){return f.isDocked(e)}})])},c={dom:{styles:{width:document.body.clientWidth+"px"}},events:Qi([Oo(Ni(),(function(){de(Z.element,"width",document.body.clientWidth+"px")}))])},$r(u,i?c:{}))),w=Am({dom:{tag:"div",classes:["tox-anchorbar"]}}),x=mS(_,t,(function(){return d.bind((function(t){return w.getOpt(t)})).getOrDie("Could not find a anchor bar element")})),O=oE.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:x,onEscape:function(){t.focus()}}),S=qg(t),C=oE.parts.toolbar(k({dom:{tag:"div",classes:["tox-toolbar"]},getSink:n,providers:x.shared.providers,onEscape:function(){t.focus()},type:S,lazyToolbar:function(){return d.bind((function(t){return oE.getToolbar(t)})).getOrDie("Could not find more toolbar element")},lazyHeader:function(){return e().getOrDie("Could not find header element")}},y)),E=oE.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:x.shared.providers,onEscape:function(){t.focus()},type:S}),M=oE.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),T=oE.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),D=oE.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:x}),A=t.getParam("statusbar",!0,"boolean")&&!s?bt.some(MT(t,x.shared.providers)):bt.none(),P={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[M,T]},R=Kg(t),I=ag(t),z=ig(t),L=oE.parts.header({dom:k({tag:"div",classes:["tox-editor-header"]},y),components:U([z?[O]:[],R?[E]:I?[C]:[],Qg(t)?[]:[w.asSpec()]]),sticky:ev(t),editor:t,sharedBackstage:x.shared}),j=U([g?[]:[L],s?[]:[P],g?[L]:[]]),B=U([[{dom:{tag:"div",classes:["tox-editor-container"]},components:j}],s?[]:A.toArray(),[D]]),F=tv(t),N=k(k({role:"application"},rh.isRtl()?{dir:"rtl"}:{}),F?{"aria-hidden":"true"}:{}),H=Oa(oE.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(s?["tox-tinymce-inline"]:[]).concat(g?["tox-tinymce--toolbar-bottom"]:[]).concat(h).concat(p),styles:k({visibility:"hidden"},F?{opacity:"0",border:"0"}:{}),attributes:N},components:B,behaviours:Yu([ov(),ad.config({disableClass:"tox-tinymce--disabled"}),Cp.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a, .tox-statusbar__resize-handle"})])}));d=bt.some(H);t.shortcuts.add("alt+F9","focus menubar",(function(){oE.focusMenubar(H)})),t.shortcuts.add("alt+F10","focus toolbar",(function(){oE.focusToolbar(H)})),t.addCommand("ToggleToolbarDrawer",(function(){oE.toggleToolbarDrawer(H)})),t.addQueryStateHandler("ToggleToolbarDrawer",(function(){return oE.isToolbarDrawerToggled(H)}));var V,W,$,G,K,q,X,Y,J,Q=jb(H),Z=jb(_);return V=t,W=Q,$=Z,G=vu(),K=sc(G,"touchstart",rt),q=sc(G,"touchmove",(function(t){return tt(ji(),t)})),X=sc(G,"touchend",(function(t){return tt(Bi(),t)})),Y=sc(G,"mousedown",rt),J=sc(G,"mouseup",(function(t){0===t.raw.button&&et(mf(),{target:t.target})})),V.on("PostRender",(function(){V.on("click",ot),V.on("tap",ot),V.on("mouseup",it),V.on("mousedown",at),V.on("ScrollWindow",ut),V.on("ResizeWindow",st),V.on("ResizeEditor",lt),V.on("AfterProgressState",ft),V.on("DismissPopups",dt)})),V.on("remove",(function(){V.off("click",ot),V.off("tap",ot),V.off("mouseup",it),V.off("mousedown",at),V.off("ScrollWindow",ut),V.off("ResizeWindow",st),V.off("ResizeEditor",lt),V.off("AfterProgressState",ft),V.off("DismissPopups",dt),Y.unbind(),K.unbind(),q.unbind(),X.unbind(),J.unbind()})),V.on("detach",(function(){Rs(W),Rs($),W.destroy(),$.destroy()})),{mothership:Q,uiMothership:Z,backstage:x,renderUI:function(){var o,i;f.setup(t,x.shared,e),wM(t,x),PM(t,n,x),i=(o=t).ui.registry.getAll().sidebars,Ot(Ct(i),(function(t){function e(){return ct(bt.from(o.queryCommandValue("ToggleSidebar")),t)}var n=i[t];o.ui.registry.addToggleButton(t,{icon:n.icon,tooltip:n.tooltip,onAction:function(n){o.execCommand("ToggleSidebar",!1,t),n.setActive(e())},onSetup:function(t){function n(){return t.setActive(e())}return o.on("ToggleSidebar",n),function(){o.off("ToggleSidebar",n)}}})})),KS(t,r,x.shared),nt(t.getParam("toolbar_groups",{},"object"),(function(e,n){t.ui.registry.addGroupToolbarButton(n,e)}));var a,u=t.ui.registry.getAll(),c=u.buttons,s=u.menuItems,d=u.contextToolbars,m=u.sidebars,p=ug(t),h={menuItems:s,menus:(a=t.getParam("menu"))?nt(a,(function(t){return k(k({},t),{items:t.items})})):{},menubar:t.getParam("menubar"),toolbar:p.getOrThunk((function(){return t.getParam("toolbar",!0)})),allowToolbarGroups:S===cg.floating,buttons:c,sidebar:m};zE(t,d,_,{backstage:x}),eT(t,_);var g=t.getElement(),v=function(){var e,n,r,o,i,a,u=SE((o=Zh(r=n=t),i=ng(r),a=og(r),OE(o).map((function(t){return CE(t,i,a)})).getOr(Zh(n)))),c=SE(kE(e=t).getOr(tg(e)));return t.inline||(ve("div","width",c)&&de(H.element,"width",c),ve("div","height",u)?de(H.element,"height",u):de(H.element,"height","200px")),u}();return l.render(t,{mothership:Q,uiMothership:Z,outerContainer:H},h,x,{targetNode:g,height:v})},getUi:function(){return{channels:{broadcastAll:Z.broadcast,broadcastOn:Z.broadcastOn,register:a}}}};function tt(t,e){Ot([W,$],(function(n){n.broadcastEvent(t,e)}))}function et(t,e){Ot([W,$],(function(n){n.broadcastOn([t],e)}))}function rt(t){return et(ff(),{target:t.target})}function ot(t){return et(ff(),{target:Rt.fromDom(t.target)})}function it(t){0===t.button&&et(mf(),{target:Rt.fromDom(t.target)})}function at(){Ot(V.editorManager.get(),(function(t){V!==t&&t.fire("DismissPopups",{relatedTarget:V})}))}function ut(t){return tt(Fi(),Sc(t))}function st(t){et(df(),{}),tt(Ni(),Sc(t))}function lt(){return et(df(),{})}function ft(t){t.state&&et(ff(),{target:Rt.fromDom(V.getContainer())})}function dt(t){et(ff(),{target:Rt.fromDom(t.relatedTarget.getContainer())})}}function DT(t){return io("items","items",{tag:"required",process:{}},tr(or((function(e){return ar("Checking item of "+t,bA,e).fold((function(t){return jn.error(oo(t))}),(function(t){return jn.value(t)}))}))))}function AT(t){return f(t.type)&&f(t.name)}function PT(t){return{internalDialog:ur(ar("dialog",kA,t)),dataValidator:(e=W(B(TA(t),AT),(function(t){return bt.from(DA[t.type]).fold((function(){return[]}),(function(e){return[dr(t.name,e)]}))})),Xr(e)),initialData:t.initialData};var e}function RT(t){var e=[],n={};return et(t,(function(t,r){t.fold((function(){e.push(r)}),(function(t){n[r]=t}))})),0<e.length?jn.error(e):jn.value(n)}function IT(t,e){de(t,"height",e+"px"),fn().browser.isIE()?be(t,"flex-basis"):de(t,"flex-basis",e+"px")}function zT(t,e,n){Ta(t,'[role="dialog"]').each((function(t){Da(t,'[role="tablist"]').each((function(r){n.get().map((function(n){return de(e,"height","0"),de(e,"flex-basis","0"),Math.min(n,(i=e,a=r,u=Gt(o=t).dom,c="fixed"===he(Ta(o,".tox-dialog-wrap").getOr(o),"position")?Math.max(u.clientHeight,window.innerHeight):Math.max(u.offsetHeight,u.scrollHeight),s=we(i),l=i.dom.offsetLeft>=a.dom.offsetLeft+Ce(a)?Math.max(we(a),s):s,f=parseInt(he(o,"margin-top"),10)||0,d=parseInt(he(o,"margin-bottom"),10)||0,c-(we(o)+f+d-l)));var o,i,a,u,c,s,l,f,d})).each((function(t){IT(e,t)}))}))}))}function LT(t){return Da(t,'[role="tabpanel"]')}function jT(t,e){function n(t){var e=RT(wf.getValue(t)).getOr({}),n=a.get(),r=$r(n,e);a.set(r)}function r(t){var e=a.get();wf.setValue(t,e)}var o,i,a=zr({}),u=zr(null),c=L(t.tabs,(function(t){return{value:t.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:e.shared.providers.translate(t.title)},view:function(){return[Rx.sketch((function(o){return{dom:{tag:"div",classes:["tox-form"]},components:L(t.items,(function(t){return UO(o,t,e)})),formBehaviours:Yu([Cp.config({mode:"acyclic",useTabstopAt:w(X_)}),im("TabView.form.events",[Zi(r),ta(n)]),tc.config({channels:co([{key:NA,value:{onReceive:n}},{key:HA,value:{onReceive:r}}])})])}}))]}}})),s=(o=c,i=cc(),{extraEvents:[Zi((function(t){var e=t.element;LT(e).each((function(n){var r;de(n,"visibility","hidden"),t.getSystem().getByDom(n).toOptional().each((function(t){var e,r,a;Q(Y((r=n,a=t,L(e=o,(function(t,n){Ep.set(a,e[n].view());var o=r.dom.getBoundingClientRect();return Ep.set(a,[]),o.height}))),(function(t,e){return e<t?-1:t<e?1:0}))).fold(i.clear,i.set)})),zT(e,n,i),be(n,"visibility"),r=t,Q(o).each((function(t){return FA.showTab(r,t.value)})),eh.requestAnimationFrame((function(){zT(e,n,i)}))}))})),Oo(Ni(),(function(t){var e=t.element;LT(e).each((function(t){zT(e,t,i)}))})),Oo(sy,(function(t,e){var n=t.element;LT(n).each((function(t){var e=_u(hn(t));de(t,"visibility","hidden");var r=ge(t,"height").map((function(t){return parseInt(t,10)}));be(t,"height"),be(t,"flex-basis");var o=t.dom.getBoundingClientRect().height;r.forall((function(t){return t<o}))?(i.set(o),zT(n,t,i)):r.each((function(e){IT(t,e)})),be(t,"visibility"),e.each(bu)}))}))],selectFirst:!1});return FA.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(t,e,n){var r=wf.getValue(e);vo(t,cy,{name:r,oldName:u.get()}),u.set(r)},tabs:c,components:[FA.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[zA.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:Yu([Jb.config({})])}),FA.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:s.selectFirst,tabSectionBehaviours:Yu([im("tabpanel",s.extraEvents),Cp.config({mode:"acyclic"}),td.config({find:function(t){return Q(FA.getViewItems(t))}}),wf.config({store:{mode:"manual",getValue:function(t){return t.getSystem().broadcastOn([NA],{}),a.get()},setValue:function(t,e){a.set(e),t.getSystem().broadcastOn([HA],{})}}})])})}function BT(t,e,n,r){return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:k(k({},e.map((function(t){return{id:t}})).getOr({})),r?{"aria-live":"polite"}:{})},components:[],behaviours:Yu([Fx(0),$E.config({channel:WA,updateState:function(t,e){return bt.some({isTabPanel:function(){return"tabpanel"===e.body.type}})},renderComponents:function(t){return"tabpanel"!==t.body.type?[(e=t.body,r=n,{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[(o=Am(Rx.sketch((function(t){return{dom:{tag:"div",classes:["tox-form"].concat(e.classes)},components:L(e.items,(function(e){return UO(t,e,r)}))}})))).asSpec()]}],behaviours:Yu([Cp.config({mode:"acyclic",useTabstopAt:w(X_)}),Bx(o),Wx(o,{postprocess:function(t){return RT(t).fold((function(t){return{}}),s)}})])})]:[jT(t.body,n)];var e,r,o},initialData:t})])}}function FT(t,e){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[t,e]}}function NT(t,e){return mD.parts.close(nh.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close")}},action:t,buttonBehaviours:Yu([Jb.config({})])}))}function HT(){return mD.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})}function VT(t,e){return mD.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:$S("<p>"+e.translate(t)+"</p>")}]}]})}function UT(t){return mD.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})}function WT(t,e){return[Gb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),Gb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:e})]}function $T(t){var e,n="tox-dialog",r=n+"-wrap",o=r+"__backdrop",i=n+"__disable-scroll";return mD.sketch({lazySink:t.lazySink,onEscape:function(e){return t.onEscape(e),bt.some(!0)},useTabstopAt:function(t){return!X_(t)},dom:{tag:"div",classes:[n].concat(t.extraClasses),styles:k({position:"relative"},t.extraStyles)},components:M([t.header,t.body],t.footer.toArray(),!0),parts:{blocker:{dom:$S('<div class="'+r+'"></div>'),components:[{dom:{tag:"div",classes:KA?[o,o+"--opaque"]:[o]}}]}},dragBlockClass:r,modalBehaviours:Yu(M([Dp.config({}),im("dialog-events",t.dialogEvents.concat([To(pi(),(function(t,e){Cp.focusIn(t)}))])),im("scroll-lock",[Zi((function(){$o(yn(),i)})),ta((function(){Go(yn(),i)}))])],t.extraBehaviours,!0)),eventOrder:k(((e={})[Di()]=["dialog-events"],e[Hi()]=["scroll-lock","dialog-events","alloy.base.behaviour"],e[Vi()]=["alloy.base.behaviour","dialog-events","scroll-lock"],e),t.eventOrder)})}function GT(t){return nh.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),title:t.translate("Close")}},components:[Bm("close",{tag:"div",classes:["tox-icon"]},t.icons)],action:function(t){go(t,ry)}})}function KT(t,e,n){function r(t){return[ti(n.translate(t.title))]}return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:k({},e.map((function(t){return{id:t}})).getOr({}))},components:r(t),behaviours:Yu([$E.config({channel:UA,renderComponents:r})])}}function qT(){return{dom:$S('<div class="tox-dialog__draghandle"></div>')}}function XT(t,e){return n={title:e.shared.providers.translate(t),draggable:e.dialog.isDraggableModal()},r=e.shared.providers,o=mD.parts.title(KT(n,bt.none(),r)),i=mD.parts.draghandle(qT()),a=mD.parts.close(GT(r)),u=[o].concat(n.draggable?[i]:[]).concat([a]),Gb.sketch({dom:$S('<div class="tox-dialog__header"></div>'),components:u});var n,r,o,i,a,u}function YT(t,e,n){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":n.translate(t)},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:e,components:[{dom:$S('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}}function JT(t,e,n){return{onClose:function(){return n.closeWindow()},onBlock:function(n){mD.setBusy(t(),(function(t,r){return YT(n.message,r,e)}))},onUnblock:function(){mD.setIdle(t())}}}function QT(t,e,n,r){var o;return Oa($T(k(k({},t),{lazySink:r.shared.getSink,extraBehaviours:M([$E.config({channel:VA,updateState:function(t,e){return bt.some(e)},initialData:e}),Gx({})],t.extraBehaviours,!0),onEscape:function(t){go(t,ry)},dialogEvents:n,eventOrder:((o={})[Ti()]=[$E.name(),tc.name()],o[Hi()]=["scroll-lock",$E.name(),"messages","dialog-events","alloy.base.behaviour"],o[Vi()]=["alloy.base.behaviour","dialog-events","messages",$E.name(),"scroll-lock"],o)})))}function ZT(t){return L(t,(function(t){return"menu"===t.type?(n=L((e=t).items,(function(t){var e=zr(!1);return k(k({},t),{storage:e})})),k(k({},e),{items:n})):t;var e,n}))}function tD(t){return N(t,(function(t,e){return"menu"!==e.type?t:N(e.items,(function(t,e){return t[e.name]=e.storage,t}),t)}),{})}function eD(t,e){return[Eo(pi(),q_),t(ny,(function(t,n){e.onClose(),n.onClose()})),t(ry,(function(t,e,n,r){e.onCancel(t),go(r,ny)})),Oo(uy,(function(t,n){return e.onUnblock()})),Oo(ay,(function(t,n){return e.onBlock(n.event)}))]}function nD(t,e){function n(t,e){return Gb.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:L(e,(function(t){return t.memento.asSpec()}))})}var r=j(e.map((function(t){return t.footerButtons})).getOr([]),(function(t){return"start"===t.align}));return[n("start",r.pass),n("end",r.fail)]}function rD(t,e){return{dom:$S('<div class="tox-dialog__footer"></div>'),components:[],behaviours:Yu([$E.config({channel:$A,initialData:t,updateState:function(t,n){var r=L(n.buttons,(function(t){var n=Am(Dw(t,t.type,e));return{name:t.name,align:t.align,memento:n}}));return bt.some({lookupByName:function(t,e){return n=t,o=e,H(r,(function(t){return t.name===o})).bind((function(t){return t.memento.getOpt(n)}));var n,o},footerButtons:r})},renderComponents:nD})])}}function oD(t,e){return mD.parts.footer(rD(t,e))}function iD(t,e){if(t.getRoot().getSystem().isConnected()){var n=td.getCurrent(t.getFormWrapper()).getOr(t.getFormWrapper());return Rx.getField(n,e).fold((function(){var r=t.getFooter();return $E.getState(r).get().bind((function(t){return t.lookupByName(n,e)}))}),(function(t){return bt.some(t)}))}return bt.none()}function aD(t,e,n){function r(e){var n=t.getRoot();n.getSystem().isConnected()&&e(n)}var o={getData:function(){var e=t.getRoot(),r=e.getSystem().isConnected()?t.getFormWrapper():e,o=wf.getValue(r),i=nt(n,(function(t){return t.get()}));return k(k({},o),i)},setData:function(e){r((function(r){var i,a,u=o.getData(),c=k(k({},u),e),s=(i=c,a=t.getRoot(),$E.getState(a).get().map((function(t){return ur(ar("data",t.dataValidator,i))})).getOr(i)),l=t.getFormWrapper();wf.setValue(l,s),et(n,(function(t,e){Mt(c,e)&&t.set(c[e])}))}))},disable:function(e){iD(t,e).each(ad.disable)},enable:function(e){iD(t,e).each(ad.enable)},focus:function(e){iD(t,e).each(Dp.focus)},block:function(t){if(!f(t))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");r((function(e){vo(e,ay,{message:t})}))},unblock:function(){r((function(t){go(t,uy)}))},showTab:function(e){r((function(n){var r=t.getBody();$E.getState(r).get().exists((function(t){return t.isTabPanel()}))&&td.getCurrent(r).each((function(t){FA.showTab(t,e)}))}))},redial:function(t){r((function(n){var r=e(t);n.getSystem().broadcastOn([VA],r),n.getSystem().broadcastOn([UA],r.internalDialog),n.getSystem().broadcastOn([WA],r.internalDialog),n.getSystem().broadcastOn([$A],r.internalDialog),o.setData(r.initialData)}))},close:function(){r((function(t){go(t,ny)}))}};return o}function uD(t){return d(t)&&-1!==QA.indexOf(t.mceAction)}function cD(t){function e(t,e,n,r){return AA.open((function(t,o,i){function l(){return j.on((function(t){Jp.reposition(t),pk.refresh(t)}))}var f,d,m,p,h,g,v,b,y,_,w,x,O,S,C,E,T,D,A,P,R,I,z,L=ur(ar("data",i,o)),j=cc(),B=a.shared.header.isPositionedAtTop(),F=(d={dataValidator:i,initialData:L,internalDialog:t},m={redial:AA.redial,closeWindow:function(){j.on(Jp.hide),u.off("ResizeEditor",l),j.clear(),n(F.instanceApi)}},p=a,h=r,S=Ro("dialog-label"),C=Ro("dialog-content"),E=Am((b={title:d.internalDialog.title,draggable:!0},y=S,_=p.shared.providers,Gb.sketch({dom:$S('<div class="tox-dialog__header"></div>'),components:[KT(b,bt.some(y),_),qT(),GT(_)],containerBehaviours:Yu([CT.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return Aa(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))),T=Am((w={body:d.internalDialog.body},x=p,O=h,BT(w,bt.some(C),x,O))),A=tD(D=ZT(d.internalDialog.buttons)),P=Am(YA({buttons:D},p)),R=XA((function(){return z}),{onBlock:function(t){Lk.block(I,(function(e,n){return YT(t.message,n,p.shared.providers)}))},onUnblock:function(){Lk.unblock(I)},onClose:function(){return m.closeWindow()}},p.shared.getSink),I=Oa({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:((g={role:"dialog"})["aria-labelledby"]=S,g["aria-describedby"]=C,g)},eventOrder:((v={})[Ti()]=[$E.name(),tc.name()],v[Di()]=["execute-on-form"],v[Hi()]=["reflecting","execute-on-form"],v),behaviours:Yu([Cp.config({mode:"cyclic",onEscape:function(t){return go(t,ny),bt.some(!0)},useTabstopAt:function(t){return!X_(t)&&("button"!==It(t)||"disabled"!==ae(t,"disabled"))}}),$E.config({channel:VA,updateState:function(t,e){return bt.some(e)},initialData:d}),Dp.config({}),im("execute-on-form",R.concat([To(pi(),(function(t,e){Cp.focusIn(t)}))])),Lk.config({getRoot:function(){return bt.some(I)}}),Ep.config({}),Gx({})]),components:[E.asSpec(),T.asSpec(),P.asSpec()]}),z=aD({getRoot:c(I),getFooter:function(){return P.get(I)},getBody:function(){return T.get(I)},getFormWrapper:function(){var t=T.get(I);return td.getCurrent(t).getOr(t)}},m.redial,A),{dialog:I,instanceApi:z}),N=Oa(Jp.sketch(k(k({lazySink:a.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},B?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:Yu(M([im("window-manager-inline-events",[Oo(Ui(),(function(t,e){go(F.dialog,ry)}))])],(f=u,s&&B?[]:[pk.config({contextual:{lazyContext:function(){return bt.some(Rn(Rt.fromDom(f.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]),!0)),isExtraPart:function(t,e){return Ab(n=e,".tox-alert-dialog")||Ab(n,".tox-confirm-dialog");var n}})));return j.set(N),Jp.showWithin(N,Sa(F.dialog),{anchor:e},bt.some(yn())),s&&B||(pk.refresh(N),u.on("ResizeEditor",l)),F.instanceApi.setData(L),Cp.focusIn(F.dialog),F.instanceApi}),t)}var n,r,o,i,a=t.backstage,u=t.editor,s=ev(u),l=(r=(n=t).backstage.shared,{open:function(t,e){function o(){mD.hide(c),e()}var i=Am(Dw({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:bt.none()},"cancel",n.backstage)),a=HT(),u=NT(o,r.providers),c=Oa($T({lazySink:function(){return r.getSink()},header:FT(a,u),body:VT(t,r.providers),footer:bt.some(UT(WT([],[i.asSpec()]))),onEscape:o,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Oo(ry,o)],eventOrder:{}}));mD.show(c);var s=i.get(c);Dp.focus(s)}}),m=(i=(o=t).backstage.shared,{open:function(t,e){function n(t){mD.hide(s),e(t)}var r=Am(Dw({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:bt.none()},"submit",o.backstage)),a=Dw({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:bt.none()},"cancel",o.backstage),u=HT(),c=NT((function(){return n(!1)}),i.providers),s=Oa($T({lazySink:function(){return i.getSink()},header:FT(u,c),body:VT(t,i.providers),footer:bt.some(UT(WT([],[a,r.asSpec()]))),onEscape:function(){return n(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Oo(ry,(function(){return n(!1)})),Oo(iy,(function(){return n(!0)}))],eventOrder:{}}));mD.show(s);var l=r.get(s);Dp.focus(l)}});return{open:function(t,n,r){return void 0!==n&&"toolbar"===n.inline?e(t,a.shared.anchors.inlineDialog(),r,n.ariaAttrs):void 0!==n&&"cursor"===n.inline?e(t,a.shared.anchors.cursor(),r,n.ariaAttrs):function(t,e){return AA.open((function(t,n,r){var o,i,u,s,l,f,d,m,p,h,g,v,b,y,_=n,w=(i={redial:AA.redial,closeWindow:function(){mD.hide(w.dialog),e(w.instanceApi)}},u=a,f=XT((o={dataValidator:r,initialData:_,internalDialog:t}).internalDialog.title,u),s=u,l=BT({body:o.internalDialog.body},bt.none(),s,!1),d=mD.parts.body(l),p=tD(m=ZT(o.internalDialog.buttons)),h=oD({buttons:m},u),g=XA((function(){return y}),JT((function(){return b}),u.shared.providers,i),u.shared.getSink),v=function(){switch(o.internalDialog.size){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}}(),b=QT({header:f,body:d,footer:bt.some(h),extraClasses:v,extraBehaviours:[],extraStyles:{}},o,g,u),y=aD({getRoot:c(b),getBody:function(){return mD.getBody(b)},getFooter:function(){return mD.getFooter(b)},getFormWrapper:function(){var t=mD.getBody(b);return td.getCurrent(t).getOr(t)}},i.redial,p),{dialog:b,instanceApi:y});return mD.show(w.dialog),w.instanceApi.setData(_),w.instanceApi}),t)}(t,r)},openUrl:function(t,e){return n=e,AA.openUrl((function(t){var e=function(t,e,n,r){var o,i,a,u=XT(t.title,r),c=(i={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[G_({dom:{tag:"iframe",attributes:{src:t.url}},behaviours:Yu([Jb.config({}),Dp.config({})])})]}],behaviours:Yu([Cp.config({mode:"acyclic",useTabstopAt:w(X_)})])},mD.parts.body(i)),s=t.buttons.bind((function(t){return 0===t.length?bt.none():bt.some(oD({buttons:t},r))})),l=qA((function(){return _}),JT((function(){return y}),r.shared.providers,e)),m=k(k({},t.height.fold((function(){return{}}),(function(t){return{height:t+"px","max-height":t+"px"}}))),t.width.fold((function(){return{}}),(function(t){return{width:t+"px","max-width":t+"px"}}))),p=t.width.isNone()&&t.height.isNone()?["tox-dialog--width-lg"]:[],g=new JA(t.url,{base_uri:new JA(window.location.href)}),v=g.protocol+"://"+g.host+(g.port?":"+g.port:""),b=uc(),y=QT({header:u,body:c,footer:s,extraClasses:p,extraBehaviours:[im("messages",[Zi((function(){var e=sc(Rt.fromDom(window),"message",(function(e){var r,o;g.isSameOrigin(new JA(e.raw.origin))&&(uD(r=e.raw.data)?function(t,e,n){switch(n.mceAction){case"insertContent":t.insertContent(n.content);break;case"setContent":t.setContent(n.content);break;case"execCommand":var r=!!h(n.ui)&&n.ui;t.execCommand(n.cmd,r,n.value);break;case"close":e.close();break;case"block":e.block(n.message);break;case"unblock":e.unblock()}}(n,_,r):!uD(o=r)&&d(o)&&Mt(o,"mceAction")&&t.onMessage(_,r))}));b.set(e)})),ta(b.clear)]),tc.config({channels:((o={})[GA]={onReceive:function(t,e){Da(t.element,"iframe").each((function(t){t.dom.contentWindow.postMessage(e,v)}))}},o)})],extraStyles:m},t,l,r),_={block:function(t){if(!f(t))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");x((function(e){vo(e,ay,{message:t})}))},unblock:function(){x((function(t){go(t,uy)}))},close:function(){x((function(t){go(t,ny)}))},sendMessage:function(t){x((function(e){e.getSystem().broadcastOn([GA],t)}))}};function x(t){a.getSystem().isConnected()&&t(a)}return{dialog:a=y,instanceApi:_}}(t,{closeWindow:function(){mD.hide(e.dialog),n(e.instanceApi)}},u,a);return mD.show(e.dialog),e.instanceApi}),t);var n},alert:function(t,e){l.open(t,(function(){e()}))},close:function(t){t.close()},confirm:function(t,e){m.open(t,(function(t){e(t)}))}}}(rT=nT=nT||{})[rT.None=0]="None",rT[rT.Both=1]="Both",rT[rT.Vertical=2]="Vertical";var sD,lD=c([fr("lazySink"),yr("dragBlockClass"),Pr("getBounds",In),kr("useTabstopAt",S),kr("eventOrder",{}),$s("modalBehaviours",[Cp]),Ga("onExecute"),qa("onEscape")]),fD={sketch:s},dD=c([Wf({name:"draghandle",overrides:function(t,e){return{behaviours:Yu([CT.config({mode:"mouse",getTarget:function(t){return Ta(t,'[role="dialog"]').getOr(t)},blockerClass:t.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(e,null,2)).message),getBounds:t.getDragBounds})])}}}),Vf({schema:[fr("dom")],name:"title"}),Vf({factory:fD,schema:[fr("dom")],name:"close"}),Vf({factory:fD,schema:[fr("dom")],name:"body"}),Wf({factory:fD,schema:[fr("dom")],name:"footer"}),Uf({factory:{sketch:function(t,e){return k(k({},t),{dom:e.dom,components:e.components})}},schema:[kr("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),kr("components",[])],name:"blocker"})]),mD=gl({name:"ModalDialog",configFields:lD(),partFields:dD(),factory:function(t,e,n,r){var o,i=cc(),a=Ro("modal-events"),u=k(k({},t.eventOrder),((o={})[Hi()]=[a].concat(t.eventOrder["alloy.system.attached"]||[]),o));return{uid:t.uid,dom:t.dom,components:e,apis:{show:function(e){i.set(e);var n=t.lazySink(e).getOrDie(),o=r.blocker(),a=n.getSystem().build(k(k({},o),{components:o.components.concat([Sa(e)]),behaviours:Yu([Dp.config({}),im("dialog-blocker-events",[To(pi(),(function(){Cp.focusIn(e)}))])])}));Ms(n,a),Cp.focusIn(e)},hide:function(t){i.clear(),qt(t.element).each((function(e){t.getSystem().getByDom(e).each((function(t){Ds(t)}))}))},getBody:function(e){return al(e,t,"body")},getFooter:function(e){return al(e,t,"footer")},setIdle:function(t){Lk.unblock(t)},setBusy:function(t,e){Lk.block(t,e)}},eventOrder:u,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Ks(t.modalBehaviours,[Ep.config({}),Cp.config({mode:"cyclic",onEnter:t.onExecute,onEscape:t.onEscape,useTabstopAt:t.useTabstopAt}),Lk.config({getRoot:i.get}),im(a,[Zi((function(e){var n,r,o,i=e.element,a=al(e,t,"title").element,u=ue(i,"id").fold((function(){var t=Ro("dialog-label");return oe(a,"id",t),t}),s);oe(i,"aria-labelledby",u),n=e.element,r=al(e,t,"body").element,o=bt.from(ae(n,"id")).fold((function(){var t=Ro("dialog-describe");return oe(r,"id",t),t}),s),oe(n,"aria-describedby",o)}))])])}},apis:{show:function(t,e){t.show(e)},hide:function(t,e){t.hide(e)},getBody:function(t,e){return t.getBody(e)},getFooter:function(t,e){return t.getFooter(e)},setBusy:function(t,e,n){t.setBusy(e,n)},setIdle:function(t,e){t.setIdle(e)}}}),pD=Xr([mr("type"),mr("name")].concat(Dg)),hD=to,gD=[io("name","name",Wn((function(){return Ro("button-name")})),Zr),xr("icon"),Dr("align","end",["start","end"]),Ar("primary",!1),Ar("disabled",!1)],vD=M(M([],gD,!0),[mr("text")],!1),bD=M([pr("type",["submit","cancel","custom"])],vD,!0),yD=sr("type",{submit:bD,cancel:bD,custom:bD,menu:M([pr("type",["menu"]),xr("text"),xr("tooltip"),xr("icon"),br("items",pD)],gD,!0)}),_D=[mr("type"),mr("text"),pr("level",["info","warn","error","success"]),mr("icon"),kr("url","")],wD=Xr(_D),xD=[mr("type"),mr("text"),Ar("disabled",!1),Ar("primary",!1),io("name","name",Wn((function(){return Ro("button-name")})),Zr),xr("icon"),Ar("borderless",!1)],OD=Xr(xD),SD=[mr("type"),mr("name"),mr("label"),Ar("disabled",!1)],CD=Xr(SD),kD=to,ED=[mr("type"),mr("name")],MD=ED.concat([xr("label")]),TD=MD.concat([kr("columns","auto")]),DD=Xr(TD),AD=Yr([mr("value"),mr("text"),mr("icon")]),PD=Xr(MD),RD=Zr,ID=Xr(MD),zD=Zr,LD=ED.concat([Tr("tag","textarea"),mr("scriptId"),mr("scriptUrl"),Er("settings",void 0,ro)]),jD=ED.concat([Tr("tag","textarea"),hr("init")]),BD=or((function(t){return ar("customeditor.old",Zn(jD),t).orThunk((function(){return ar("customeditor.new",Zn(LD),t)}))})),FD=Zr,ND=Xr(MD),HD=tr(qr),VD=[mr("type"),mr("html"),Dr("presets","presentation",["presentation","document"])],UD=Xr(VD),WD=MD.concat([Ar("sandboxed",!0)]),$D=Xr(WD),GD=Zr,KD=MD.concat([dr("currentState",Xr([fr("blob"),mr("url")]))]),qD=Xr(KD),XD=MD.concat([xr("inputMode"),xr("placeholder"),Ar("maximized",!1),Ar("disabled",!1)]),YD=Xr(XD),JD=Zr,QD=[mr("text"),mr("value")],ZD=[mr("text"),br("items",(sD=Lt((function(){return tA})),{extract:function(t,e){return sD().extract(t,e)},toString:function(){return sD().toString()}}))],tA=er([Xr(QD),Xr(ZD)]),eA=MD.concat([br("items",tA),Ar("disabled",!1)]),nA=Xr(eA),rA=Zr,oA=MD.concat([vr("items",[mr("text"),mr("value")]),Mr("size",1),Ar("disabled",!1)]),iA=Xr(oA),aA=Zr,uA=MD.concat([Ar("constrain",!0),Ar("disabled",!1)]),cA=Xr(uA),sA=Xr([mr("width"),mr("height")]),lA=[mr("type"),br("header",Zr),br("cells",tr(Zr))],fA=Xr(lA),dA=MD.concat([xr("placeholder"),Ar("maximized",!1),Ar("disabled",!1)]),mA=Xr(dA),pA=Zr,hA=MD.concat([Dr("filetype","file",["image","media","file"]),kr("disabled",!1)]),gA=Xr(hA),vA=Xr([mr("value"),kr("meta",{})]),bA=Qn((function(){return rr("type",{alertbanner:wD,bar:Xr((n=DT("bar"),[mr("type"),n])),button:OD,checkbox:CD,colorinput:PD,colorpicker:ID,dropzone:ND,grid:Xr((t=DT("grid"),[mr("type"),dr("columns",Qr),t])),iframe:$D,input:YD,listbox:nA,selectbox:iA,sizeinput:cA,textarea:mA,urlinput:gA,customeditor:BD,htmlpanel:UD,imagetools:qD,collection:DD,label:Xr((e=DT("label"),[mr("type"),mr("label"),e])),table:fA,panel:_A});var t,e,n})),yA=[mr("type"),kr("classes",[]),br("items",bA)],_A=Xr(yA),wA=[io("name","name",Wn((function(){return Ro("tab-name")})),Zr),mr("title"),br("items",bA)],xA=[mr("type"),vr("tabs",wA)],OA=Xr(xA),SA=vD,CA=yD,kA=Xr([mr("title"),dr("body",rr("type",{panel:_A,tabpanel:OA})),Tr("size","normal"),br("buttons",CA),kr("initialData",{}),Pr("onAction",a),Pr("onChange",a),Pr("onSubmit",a),Pr("onClose",a),Pr("onCancel",a),kr("onTabChange",a)]),EA=Xr(M([pr("type",["cancel","custom"])],SA,!0)),MA=Xr([mr("title"),mr("url"),wr("height"),wr("width"),Sr("buttons",EA),Pr("onAction",a),Pr("onCancel",a),Pr("onClose",a),Pr("onMessage",a)]),TA=function(t){return d(t)?[t].concat(W(it(t),TA)):m(t)?W(t,TA):[]},DA={checkbox:kD,colorinput:RD,colorpicker:zD,dropzone:HD,input:JD,iframe:GD,sizeinput:sA,selectbox:aA,listbox:rA,size:sA,textarea:pA,urlinput:vA,customeditor:FD,collection:AD,togglemenuitem:hD},AA={open:function(t,e){var n=PT(e);return t(n.internalDialog,n.initialData,n.dataValidator)},openUrl:function(t,e){return t(ur(ar("dialog",MA,e)))},redial:PT},PA=hl({name:"TabButton",configFields:[kr("uid",void 0),fr("value"),io("dom","dom",Gn((function(){return{attributes:{role:"tab",id:Ro("aria"),"aria-selected":"false"}}})),Jr()),yr("action"),kr("domModification",{}),$s("tabButtonBehaviours",[Dp,Cp,wf]),fr("view")],factory:function(t,e){return{uid:t.uid,dom:t.dom,components:t.components,events:pm(t.action),behaviours:Ks(t.tabButtonBehaviours,[Dp.config({}),Cp.config({mode:"execution",useSpace:!0,useEnter:!0}),wf.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}}}),RA=c([fr("tabs"),fr("dom"),kr("clickToDismiss",!1),$s("tabbarBehaviours",[cd,Cp]),Ua(["tabClass","selectedClass"])]),IA=c([$f({factory:PA,name:"tabs",unit:"tab",overrides:function(t){return{action:function(e){var n=e.getSystem().getByUid(t.uid).getOrDie(),r=cd.isHighlighted(n,e);(r&&t.clickToDismiss?function(t,e){cd.dehighlight(t,e),vo(t,qi(),{tabbar:t,button:e})}:r?a:function(t,e){cd.highlight(t,e),vo(t,Ki(),{tabbar:t,button:e})})(n,e)},domModification:{classes:[t.markers.tabClass]}}}})]),zA=gl({name:"Tabbar",configFields:RA(),partFields:IA(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Ks(t.tabbarBehaviours,[cd.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:function(t,e){oe(e.element,"aria-selected","true")},onDehighlight:function(t,e){oe(e.element,"aria-selected","false")}}),Cp.config({mode:"flow",getInitial:function(t){return cd.getHighlighted(t).map((function(t){return t.element}))},selector:"."+t.markers.tabClass,executeOnMove:!0})])}}}),LA=hl({name:"Tabview",configFields:[$s("tabviewBehaviours",[Ep])],factory:function(t,e){return{uid:t.uid,dom:t.dom,behaviours:Ks(t.tabviewBehaviours,[Ep.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),jA=c([kr("selectFirst",!0),$a("onChangeTab"),$a("onDismissTab"),kr("tabs",[]),$s("tabSectionBehaviours",[])]),BA=c([Vf({factory:zA,schema:[fr("dom"),gr("markers",[fr("tabClass"),fr("selectedClass")])],name:"tabbar",defaults:function(t){return{tabs:t.tabs}}}),Vf({factory:LA,name:"tabview"})]),FA=gl({name:"TabSection",configFields:jA(),partFields:BA(),factory:function(t,e,n,r){function o(e,n){il(e,t,"tabbar").each((function(t){n(t).each(bo)}))}return{uid:t.uid,dom:t.dom,components:e,behaviours:Gs(t.tabSectionBehaviours),events:Qi(U([t.selectFirst?[Zi((function(t,e){o(t,cd.getFirst)}))]:[],[Oo(Ki(),(function(e,n){var r=n.event.button,o=wf.getValue(r);il(r,t,"tabview").each((function(e){H(t.tabs,(function(t){return t.value===o})).each((function(n){var o=n.view();ue(r.element,"id").each((function(t){oe(e.element,"aria-labelledby",t)})),Ep.set(e,o),t.onChangeTab(e,r,o)}))}))})),Oo(qi(),(function(e,n){var r=n.event.button;t.onDismissTab(e,r)}))]])),apis:{getViewItems:function(e){return il(e,t,"tabview").map((function(t){return Ep.contents(t)})).getOr([])},showTab:function(t,e){o(t,(function(t){return H(cd.getCandidates(t),(function(t){return wf.getValue(t)===e})).filter((function(e){return!cd.isHighlighted(t,e)}))}))}}}},apis:{getViewItems:function(t,e){return t.getViewItems(e)},showTab:function(t,e,n){t.showTab(e,n)}}}),NA="send-data-to-section",HA="send-data-to-view",VA=Ro("update-dialog"),UA=Ro("update-title"),WA=Ro("update-body"),$A=Ro("update-footer"),GA=Ro("body-send-message"),KA=Wv.deviceType.isTouch(),qA=function(t,e){function n(e,n){return Oo(e,(function(e,r){var o,i;o=e,i=function(o,i){n(t(),o,r.event,e)},$E.getState(o).get().each((function(t){i(t)}))}))}return M(M([],eD(n,e),!0),[n(oy,(function(t,e,n){e.onAction(t,{name:n.name})}))],!1)},XA=function(t,e,n){function r(e,n){return Oo(e,(function(e,r){var o,i;o=e,i=function(o,i){n(t(),o,r.event,e)},$E.getState(o).get().each((function(t){i(t.internalDialog)}))}))}return M(M([],eD(r,e),!0),[r(iy,(function(t,e){return e.onSubmit(t)})),r(ey,(function(t,e,n){e.onChange(t,{name:n.name})})),r(oy,(function(t,e,r,o){function i(){return Cp.focusIn(o)}function a(t){return ce(t,"disabled")||ue(t,"aria-disabled").exists((function(t){return"true"===t}))}var u=hn(o.element),c=_u(u);e.onAction(t,{name:r.name,value:r.value}),_u(u).fold(i,(function(t){a(t)||c.exists((function(e){return Ut(t,e)&&a(e)}))?i():n().toOptional().filter((function(e){return!Ut(e.element,t)})).each(i)}))})),r(cy,(function(t,e,n){e.onTabChange(t,{newTabName:n.name,oldTabName:n.oldName})})),ta((function(e){var n=t();wf.setValue(e,n.getData())}))],!1)},YA=rD,JA=tinymce.util.Tools.resolve("tinymce.util.URI"),QA=["insertContent","setContent","execCommand","close","block","unblock"];C.add("silver",(function(t){var e=TT(t),n=e.uiMothership,r=e.backstage,o=e.renderUI,i=e.getUi;return Vb(t,r.shared),{renderUI:o,getWindowManagerImpl:c(cD({editor:t,backstage:r})),getNotificationManagerImpl:function(){return e=t,o=n,i=r.shared,{open:function(t,n){function r(){n(),Jp.hide(c)}var a=!t.closeButton&&t.timeout&&(0<t.timeout||t.timeout<0),u=Oa(uh.sketch({text:t.text,level:xt(["success","error","warning","warn","info"],t.type)?t.type:void 0,progress:!0===t.progressBar,icon:bt.from(t.icon),closeButton:!a,onAction:r,iconProvider:i.providers.icons,translationProvider:i.providers.translate})),c=Oa(Jp.sketch(k({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:i.getSink,fireDismissalEventInstead:{}},i.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}})));function s(){var t=Rn(Rt.fromDom(e.getContentAreaContainer())),n=In(),r=Fu(n.x,t.x,t.right),o=Fu(n.y,t.y,t.bottom),i=Math.max(t.right,n.right),a=Math.max(t.bottom,n.bottom);return bt.some(Pn(r,o,i-r,a-o))}return o.add(c),0<t.timeout&&eh.setTimeout((function(){r()}),t.timeout),{close:r,moveTo:function(t,e){Jp.showAt(c,Sa(u),{anchor:{type:"makeshift",x:t,y:e}})},moveRel:function(t,e){var n,r,o,a=Sa(u),l={maxHeightFunction:Mc()};"banner"!==e&&v(t)?(n=function(){switch(e){case"bc-bc":return th;case"tc-tc":return Zp;case"tc-bc":return $u;default:return Gu}}(),r={type:"node",root:yn(),node:bt.some(Rt.fromDom(t)),overrides:l,layouts:{onRtl:function(){return[n]},onLtr:function(){return[n]}}},Jp.showWithinBounds(c,a,{anchor:r},s)):(o=k(k({},i.anchors.banner()),{overrides:l}),Jp.showWithinBounds(c,a,{anchor:o},s))},text:function(t){uh.updateText(u,t)},settings:t,getEl:function(){return u.element.dom},progressBar:{value:function(t){uh.updateProgress(u,t)}}}},close:function(t){t.close()},reposition:function(t){0<t.length&&Ot(t,(function(e,n){0===n?e.moveRel(null,"banner"):e.moveRel(t[n-1].getEl(),"bc-tc")}))},getArgs:function(t){return t.settings}};var e,o,i},ui:i()}}))}()}).call(this,n("c8ba"))},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},ff84:function(t,e,n){"use strict";var r={name:"BaseIcon",props:{iconClass:String}},o=(n("a4f8"),n("2877")),i=Object(o.a)(r,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("i",{staticClass:"base-icon",class:"ri-"+t.iconClass,on:{click:function(e){return t.$emit("click",e)}}})}),[],!1,null,"a8318de0",null);e.a=i.exports},ff846:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("349c"),o=n("da3d"),i=n("241e"),a=n("9ffa"),u=n("8e51"),c=n("7cb9"),s=n("c17b"),l=n("fbb2");e.default={CODE39:r.CODE39,CODE128:o.CODE128,CODE128A:o.CODE128A,CODE128B:o.CODE128B,CODE128C:o.CODE128C,EAN13:i.EAN13,EAN8:i.EAN8,EAN5:i.EAN5,EAN2:i.EAN2,UPC:i.UPC,UPCE:i.UPCE,ITF14:a.ITF14,ITF:a.ITF,MSI:u.MSI,MSI10:u.MSI10,MSI11:u.MSI11,MSI1010:u.MSI1010,MSI1110:u.MSI1110,pharmacode:c.pharmacode,codabar:s.codabar,GenericBarcode:l.GenericBarcode}}});
|