mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-10 18:05:53 +00:00
2 lines
569 KiB
JavaScript
Vendored
2 lines
569 KiB
JavaScript
Vendored
/*! For license information please see 673.js.LICENSE.txt */
|
||
(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[673],{8251:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var o="ontouchend"in document;const i={bind:function(t,e){var n=500,i=e.value;if($A.isJson(e.value)&&(n=e.value.delay||500,i=e.value.callback),"function"!=typeof i)throw"callback must be a function";if(!o)return t.__longpressContextmenu__=function(e){e.preventDefault(),e.stopPropagation(),i(e,t)},void t.addEventListener("contextmenu",t.__longpressContextmenu__);var r=null,a=!1;t.__longpressStart__=function(e){"click"===e.type&&0!==e.button||(a=!1,null===r&&(r=setTimeout((function(){a=!0,i(e.touches[0],t)}),n)))},t.__longpressCancel__=function(t){null!==r&&(clearTimeout(r),r=null)},t.__longpressClick__=function(e){a&&(e.preventDefault(),e.stopPropagation()),t.__longpressCancel__(e)},t.addEventListener("touchstart",t.__longpressStart__),t.addEventListener("click",t.__longpressClick__),t.addEventListener("touchmove",t.__longpressCancel__),t.addEventListener("touchend",t.__longpressCancel__),t.addEventListener("touchcancel",t.__longpressCancel__)},unbind:function(t){if(!o)return t.removeEventListener("contextmenu",t.__longpressContextmenu__),void delete t.__longpressContextmenu__;t.removeEventListener("touchstart",t.__longpressStart__),t.removeEventListener("click",t.__longpressClick__),t.removeEventListener("touchmove",t.__longpressCancel__),t.removeEventListener("touchend",t.__longpressCancel__),t.removeEventListener("touchcancel",t.__longpressCancel__),delete t.__longpressStart__,delete t.__longpressClick__,delete t.__longpressCancel__}}},79742:(t,e)=>{"use strict";e.byteLength=function(t){var e=l(t),n=e[0],o=e[1];return 3*(n+o)/4-o},e.toByteArray=function(t){var e,n,r=l(t),a=r[0],s=r[1],c=new i(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),u=0,d=s>0?a-4:a;for(n=0;n<d;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[u++]=e>>16&255,c[u++]=e>>8&255,c[u++]=255&e;2===s&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,c[u++]=255&e);1===s&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,c[u++]=e>>8&255,c[u++]=255&e);return c},e.fromByteArray=function(t){for(var e,o=t.length,i=o%3,r=[],a=16383,s=0,l=o-i;s<l;s+=a)r.push(c(t,s,s+a>l?l:s+a));1===i?(e=t[o-1],r.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[o-2]<<8)+t[o-1],r.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return r.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=r.length;a<s;++a)n[a]=r[a],o[r.charCodeAt(a)]=a;function l(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 c(t,e,o){for(var i,r,a=[],s=e;s<o;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(n[(r=i)>>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},48764:(t,e,n)=>{"use strict";var o=n(79742),i=n(80645),r=n(5826);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=l.prototype:(null===t&&(t=new l(e)),t.length=e),t}function l(t,e,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(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 d(this,t)}return c(this,t,e,n)}function c(t,e,n,o){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,o){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(o||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===o?new Uint8Array(e):void 0===o?new Uint8Array(e,n):new Uint8Array(e,n,o);l.TYPED_ARRAY_SUPPORT?(t=e).__proto__=l.prototype:t=f(t,e);return t}(t,e,n,o):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var o=0|p(e,n),i=(t=s(t,o)).write(e,n);i!==o&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(l.isBuffer(e)){var n=0|h(e.length);return 0===(t=s(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||(o=e.length)!=o?s(t,0):f(t,e);if("Buffer"===e.type&&r(e.data))return f(t,e.data)}var o;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function u(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 d(t,e){if(u(e),t=s(t,e<0?0:0|h(e)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function f(t,e){var n=e.length<0?0:0|h(e.length);t=s(t,n);for(var o=0;o<n;o+=1)t[o]=255&e[o];return t}function h(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(l.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 o=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(o)return F(t).length;e=(""+e).toLowerCase(),o=!0}}function m(t,e,n){var o=!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 D(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return E(this,e,n);case"base64":return C(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,n);default:if(o)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),o=!0}}function v(t,e,n){var o=t[e];t[e]=t[n],t[n]=o}function g(t,e,n,o,i){if(0===t.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=l.from(e,o)),l.isBuffer(e))return 0===e.length?-1:y(t,e,n,o,i);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,o,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,o,i){var r,a=1,s=t.length,l=e.length;if(void 0!==o&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var u=-1;for(r=n;r<s;r++)if(c(t,r)===c(e,-1===u?0:r-u)){if(-1===u&&(u=r),r-u+1===l)return u*a}else-1!==u&&(r-=r-u),u=-1}else for(n+l>s&&(n=s-l),r=n;r>=0;r--){for(var d=!0,f=0;f<l;f++)if(c(t,r+f)!==c(e,f)){d=!1;break}if(d)return r}return-1}function b(t,e,n,o){n=Number(n)||0;var i=t.length-n;o?(o=Number(o))>i&&(o=i):o=i;var r=e.length;if(r%2!=0)throw new TypeError("Invalid hex string");o>r/2&&(o=r/2);for(var a=0;a<o;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function _(t,e,n,o){return z(F(e,t.length-n),t,n,o)}function w(t,e,n,o){return z(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,o)}function k(t,e,n,o){return w(t,e,n,o)}function O(t,e,n,o){return z(U(e),t,n,o)}function x(t,e,n,o){return z(function(t,e){for(var n,o,i,r=[],a=0;a<t.length&&!((e-=2)<0);++a)o=(n=t.charCodeAt(a))>>8,i=n%256,r.push(i),r.push(o);return r}(e,t.length-n),t,n,o)}function C(t,e,n){return 0===e&&n===t.length?o.fromByteArray(t):o.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);for(var o=[],i=e;i<n;){var r,a,s,l,c=t[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(r=t[i+1]))&&(l=(31&c)<<6|63&r)>127&&(u=l);break;case 3:r=t[i+1],a=t[i+2],128==(192&r)&&128==(192&a)&&(l=(15&c)<<12|(63&r)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:r=t[i+1],a=t[i+2],s=t[i+3],128==(192&r)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&r)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,o.push(u>>>10&1023|55296),u=56320|1023&u),o.push(u),i+=d}return function(t){var e=t.length;if(e<=j)return String.fromCharCode.apply(String,t);var n="",o=0;for(;o<e;)n+=String.fromCharCode.apply(String,t.slice(o,o+=j));return n}(o)}e.lW=l,e.h2=50,l.TYPED_ARRAY_SUPPORT=void 0!==n.g.TYPED_ARRAY_SUPPORT?n.g.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}}(),a(),l.poolSize=8192,l._augment=function(t){return t.__proto__=l.prototype,t},l.from=function(t,e,n){return c(null,t,e,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(t,e,n){return function(t,e,n,o){return u(e),e<=0?s(t,e):void 0!==n?"string"==typeof o?s(t,e).fill(n,o):s(t,e).fill(n):s(t,e)}(null,t,e,n)},l.allocUnsafe=function(t){return d(null,t)},l.allocUnsafeSlow=function(t){return d(null,t)},l.isBuffer=function(t){return!(null==t||!t._isBuffer)},l.compare=function(t,e){if(!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,o=e.length,i=0,r=Math.min(n,o);i<r;++i)if(t[i]!==e[i]){n=t[i],o=e[i];break}return n<o?-1:o<n?1:0},l.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}},l.concat=function(t,e){if(!r(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var o=l.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(o,i),i+=a.length}return o},l.byteLength=p,l.prototype._isBuffer=!0,l.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)v(this,e,e+1);return this},l.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)v(this,e,e+3),v(this,e+1,e+2);return this},l.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)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},l.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?S(this,0,t):m.apply(this,arguments)},l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){var t="",n=e.h2;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},l.prototype.compare=function(t,e,n,o,i){if(!l.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===o&&(o=0),void 0===i&&(i=this.length),e<0||n>t.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&e>=n)return 0;if(o>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var r=(i>>>=0)-(o>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(r,a),c=this.slice(o,i),u=t.slice(e,n),d=0;d<s;++d)if(c[d]!==u[d]){r=c[d],a=u[d];break}return r<a?-1:a<r?1:0},l.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},l.prototype.indexOf=function(t,e,n){return g(this,t,e,n,!0)},l.prototype.lastIndexOf=function(t,e,n){return g(this,t,e,n,!1)},l.prototype.write=function(t,e,n,o){if(void 0===e)o="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)o=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===o&&(o="utf8")):(o=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var r=!1;;)switch(o){case"hex":return b(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 k(this,t,e,n);case"base64":return O(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(r)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),r=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var j=4096;function T(t,e,n){var o="";n=Math.min(t.length,n);for(var i=e;i<n;++i)o+=String.fromCharCode(127&t[i]);return o}function E(t,e,n){var o="";n=Math.min(t.length,n);for(var i=e;i<n;++i)o+=String.fromCharCode(t[i]);return o}function D(t,e,n){var o=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>o)&&(n=o);for(var i="",r=e;r<n;++r)i+=B(t[r]);return i}function A(t,e,n){for(var o=t.slice(e,n),i="",r=0;r<o.length;r+=2)i+=String.fromCharCode(o[r]+256*o[r+1]);return i}function I(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 L(t,e,n,o,i,r){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<r)throw new RangeError('"value" argument is out of bounds');if(n+o>t.length)throw new RangeError("Index out of range")}function P(t,e,n,o){e<0&&(e=65535+e+1);for(var i=0,r=Math.min(t.length-n,2);i<r;++i)t[n+i]=(e&255<<8*(o?i:1-i))>>>8*(o?i:1-i)}function $(t,e,n,o){e<0&&(e=4294967295+e+1);for(var i=0,r=Math.min(t.length-n,4);i<r;++i)t[n+i]=e>>>8*(o?i:3-i)&255}function N(t,e,n,o,i,r){if(n+o>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,o,r){return r||N(t,0,n,4),i.write(t,e,n,o,23,4),n+4}function q(t,e,n,o,r){return r||N(t,0,n,8),i.write(t,e,n,o,52,8),n+8}l.prototype.slice=function(t,e){var n,o=this.length;if((t=~~t)<0?(t+=o)<0&&(t=0):t>o&&(t=o),(e=void 0===e?o:~~e)<0?(e+=o)<0&&(e=0):e>o&&(e=o),e<t&&(e=t),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=l.prototype;else{var i=e-t;n=new l(i,void 0);for(var r=0;r<i;++r)n[r]=this[r+t]}return n},l.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var o=this[t],i=1,r=0;++r<e&&(i*=256);)o+=this[t+r]*i;return o},l.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var o=this[t+--e],i=1;e>0&&(i*=256);)o+=this[t+--e]*i;return o},l.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var o=this[t],i=1,r=0;++r<e&&(i*=256);)o+=this[t+r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},l.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var o=e,i=1,r=this[t+--o];o>0&&(i*=256);)r+=this[t+--o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},l.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,n,o){(t=+t,e|=0,n|=0,o)||L(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,r=0;for(this[e]=255&t;++r<n&&(i*=256);)this[e+r]=t/i&255;return e+n},l.prototype.writeUIntBE=function(t,e,n,o){(t=+t,e|=0,n|=0,o)||L(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,r=1;for(this[e+i]=255&t;--i>=0&&(r*=256);)this[e+i]=t/r&255;return e+n},l.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):$(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):$(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,n,o){if(t=+t,e|=0,!o){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var r=0,a=1,s=0;for(this[e]=255&t;++r<n&&(a*=256);)t<0&&0===s&&0!==this[e+r-1]&&(s=1),this[e+r]=(t/a>>0)-s&255;return e+n},l.prototype.writeIntBE=function(t,e,n,o){if(t=+t,e|=0,!o){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var r=n-1,a=1,s=0;for(this[e+r]=255&t;--r>=0&&(a*=256);)t<0&&0===s&&0!==this[e+r+1]&&(s=1),this[e+r]=(t/a>>0)-s&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):$(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):$(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return q(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return q(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,o){if(n||(n=0),o||0===o||(o=this.length),e>=t.length&&(e=t.length),e||(e=0),o>0&&o<n&&(o=n),o===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(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-e<o-n&&(o=t.length-e+n);var i,r=o-n;if(this===t&&n<e&&e<o)for(i=r-1;i>=0;--i)t[i+e]=this[i+n];else if(r<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<r;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+r),e);return r},l.prototype.fill=function(t,e,n,o){if("string"==typeof t){if("string"==typeof e?(o=e,e=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!l.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}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 r;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(r=e;r<n;++r)this[r]=t;else{var a=l.isBuffer(t)?t:F(new l(t,o).toString()),s=a.length;for(r=0;r<n-e;++r)this[r+e]=a[r%s]}return this};var R=/[^+\/0-9A-Za-z-_]/g;function B(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var n;e=e||1/0;for(var o=t.length,i=null,r=[],a=0;a<o;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(a+1===o){(e-=3)>-1&&r.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&r.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&r.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;r.push(n)}else if(n<2048){if((e-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;r.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;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function U(t){return o.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(R,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,o){for(var i=0;i<o&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}},80645:(t,e)=>{e.read=function(t,e,n,o,i){var r,a,s=8*i-o-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?i-1:0,f=n?-1:1,h=t[e+d];for(d+=f,r=h&(1<<-u)-1,h>>=-u,u+=s;u>0;r=256*r+t[e+d],d+=f,u-=8);for(a=r&(1<<-u)-1,r>>=-u,u+=o;u>0;a=256*a+t[e+d],d+=f,u-=8);if(0===r)r=1-c;else{if(r===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,o),r-=c}return(h?-1:1)*a*Math.pow(2,r-o)},e.write=function(t,e,n,o,i,r){var a,s,l,c=8*r-i-1,u=(1<<c)-1,d=u>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=o?0:r-1,p=o?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(e*l-1)*Math.pow(2,i),a+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;t[n+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+h]=255&a,h+=p,a/=256,c-=8);t[n+h-p]|=128*m}},5826:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},92307:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var o=n(1519),i=n.n(o)()((function(t){return t[1]}));i.push([t.id,'.component-resize-line[data-v-5a37a7e8]{cursor:col-resize}@media (max-width:768px){.component-resize-line[data-v-5a37a7e8]{display:none}}.component-resize-line.resizing[data-v-5a37a7e8]:after{bottom:0;content:"";cursor:col-resize;left:0;position:fixed;right:0;top:0;z-index:99999}.component-resize-line.bottom[data-v-5a37a7e8],.component-resize-line.bottom[data-v-5a37a7e8]:after{cursor:row-resize}',""]);const r=i},76095:function(t,e,n){var o,i=n(48764).lW;"undefined"!=typeof self&&self,o=function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),i=n(18),r=n(19),a=n(45),s=n(46),l=n(47),c=n(48),u=n(49),d=n(12),f=n(32),h=n(33),p=n(31),m=n(1),v={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:o.default,Format:i.default,Leaf:r.default,Embed:c.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:u.default,Attributor:{Attribute:d.default,Class:f.default,Style:h.default,Store:p.default}};e.default=v},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return i(e,t),e}(Error);e.ParchmentError=r;var a,s={},l={},c={},u={};function d(t,e){var n;if(void 0===e&&(e=a.ANY),"string"==typeof t)n=u[t]||s[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=u.text;else if("number"==typeof t)t&a.LEVEL&a.BLOCK?n=u.block:t&a.LEVEL&a.INLINE&&(n=u.inline);else if(t instanceof HTMLElement){var o=(t.getAttribute("class")||"").split(/\s+/);for(var i in o)if(n=l[o[i]])break;n=n||c[t.tagName]}return null==n?null:e&a.LEVEL&n.scope&&e&a.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(a=e.Scope||(e.Scope={})),e.create=function(t,e){var n=d(t);if(null==n)throw new r("Unable to create "+t+" blot");var o=n,i=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:o.create(e);return new o(i,e)},e.find=function t(n,o){return void 0===o&&(o=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:o?t(n.parentNode,o):null},e.query=d,e.register=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(e.length>1)return e.map((function(e){return t(e)}));var o=e[0];if("string"!=typeof o.blotName&&"string"!=typeof o.attrName)throw new r("Invalid definition");if("abstract"===o.blotName)throw new r("Cannot register abstract class");if(u[o.blotName||o.attrName]=o,"string"==typeof o.keyName)s[o.keyName]=o;else if(null!=o.className&&(l[o.className]=o),null!=o.tagName){Array.isArray(o.tagName)?o.tagName=o.tagName.map((function(t){return t.toUpperCase()})):o.tagName=o.tagName.toUpperCase();var i=Array.isArray(o.tagName)?o.tagName:[o.tagName];i.forEach((function(t){null!=c[t]&&null!=o.className||(c[t]=o)}))}return o}},function(t,e,n){var o=n(51),i=n(11),r=n(3),a=n(20),s=String.fromCharCode(0),l=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};l.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},l.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},l.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},l.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=r(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(i(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},l.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},l.prototype.filter=function(t){return this.ops.filter(t)},l.prototype.forEach=function(t){this.ops.forEach(t)},l.prototype.map=function(t){return this.ops.map(t)},l.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(o){(t(o)?e:n).push(o)})),[e,n]},l.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},l.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+a.length(e):e.delete?t-e.delete:t}),0)},l.prototype.length=function(){return this.reduce((function(t,e){return t+a.length(e)}),0)},l.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],o=a.iterator(this.ops),i=0;i<e&&o.hasNext();){var r;i<t?r=o.next(t-i):(r=o.next(e-i),n.push(r)),i+=a.length(r)}return new l(n)},l.prototype.compose=function(t){var e=a.iterator(this.ops),n=a.iterator(t.ops),o=[],r=n.peek();if(null!=r&&"number"==typeof r.retain&&null==r.attributes){for(var s=r.retain;"insert"===e.peekType()&&e.peekLength()<=s;)s-=e.peekLength(),o.push(e.next());r.retain-s>0&&n.next(r.retain-s)}for(var c=new l(o);e.hasNext()||n.hasNext();)if("insert"===n.peekType())c.push(n.next());else if("delete"===e.peekType())c.push(e.next());else{var u=Math.min(e.peekLength(),n.peekLength()),d=e.next(u),f=n.next(u);if("number"==typeof f.retain){var h={};"number"==typeof d.retain?h.retain=u:h.insert=d.insert;var p=a.attributes.compose(d.attributes,f.attributes,"number"==typeof d.retain);if(p&&(h.attributes=p),c.push(h),!n.hasNext()&&i(c.ops[c.ops.length-1],h)){var m=new l(e.rest());return c.concat(m).chop()}}else"number"==typeof f.delete&&"number"==typeof d.retain&&c.push(f)}return c.chop()},l.prototype.concat=function(t){var e=new l(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},l.prototype.diff=function(t,e){if(this.ops===t.ops)return new l;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),r=new l,c=o(n[0],n[1],e),u=a.iterator(this.ops),d=a.iterator(t.ops);return c.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case o.INSERT:n=Math.min(d.peekLength(),e),r.push(d.next(n));break;case o.DELETE:n=Math.min(e,u.peekLength()),u.next(n),r.delete(n);break;case o.EQUAL:n=Math.min(u.peekLength(),d.peekLength(),e);var s=u.next(n),l=d.next(n);i(s.insert,l.insert)?r.retain(n,a.attributes.diff(s.attributes,l.attributes)):r.push(l).delete(n)}e-=n}})),r.chop()},l.prototype.eachLine=function(t,e){e=e||"\n";for(var n=a.iterator(this.ops),o=new l,i=0;n.hasNext();){if("insert"!==n.peekType())return;var r=n.peek(),s=a.length(r)-n.peekLength(),c="string"==typeof r.insert?r.insert.indexOf(e,s)-s:-1;if(c<0)o.push(n.next());else if(c>0)o.push(n.next(c));else{if(!1===t(o,n.next(1).attributes||{},i))return;i+=1,o=new l}}o.length()>0&&t(o,{},i)},l.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=a.iterator(this.ops),o=a.iterator(t.ops),i=new l;n.hasNext()||o.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===o.peekType())if("insert"===o.peekType())i.push(o.next());else{var r=Math.min(n.peekLength(),o.peekLength()),s=n.next(r),c=o.next(r);if(s.delete)continue;c.delete?i.push(c):i.retain(r,a.attributes.transform(s.attributes,c.attributes,e))}else i.retain(a.length(n.next()));return i.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=a.iterator(this.ops),o=0;n.hasNext()&&o<=t;){var i=n.peekLength(),r=n.peekType();n.next(),"delete"!==r?("insert"===r&&(o<t||!e)&&(t+=i),o+=i):t-=Math.min(i,t-o)}return t},t.exports=l},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===o.call(t)},s=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,i=n.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!i&&!r)return!1;for(e in t);return void 0===e||n.call(t,e)},l=function(t,e){i&&"__proto__"===e.name?i(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},c=function(t,e){if("__proto__"===e){if(!n.call(t,e))return;if(r)return r(t,e).value}return t[e]};t.exports=function t(){var e,n,o,i,r,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(e=arguments[f]))for(n in e)o=c(d,n),d!==(i=c(e,n))&&(p&&i&&(s(i)||(r=a(i)))?(r?(r=!1,u=o&&a(o)?o:[]):u=o&&s(o)?o:{},l(d,{name:n,newValue:t(p,u,i)})):void 0!==i&&l(d,{name:n,newValue:i}));return d}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},r=d(n(3)),a=d(n(2)),s=d(n(0)),l=d(n(16)),c=d(n(6)),u=d(n(7));function d(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(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 p(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)}var m=function(t){function e(){return f(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),o(e,[{key:"attach",value:function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"attach",this).call(this),this.attributes=new s.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new a.default).insert(this.value(),(0,r.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(t,e){var n=s.default.query(t,s.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",value:function(t,e,n,o){this.format(n,o)}},{key:"insertAt",value:function(t,n,o){if("string"==typeof n&&n.endsWith("\n")){var r=s.default.create(v.blotName);this.parent.insertBefore(r,0===t?this:this.next),r.insertAt(0,n.slice(0,-1))}else i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,o)}}]),e}(s.default.Embed);m.scope=s.default.Scope.BLOCK_BLOT;var v=function(t){function e(t){f(this,e);var n=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.cache={},n}return p(e,t),o(e,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(s.default.Leaf).reduce((function(t,e){return 0===e.length()?t:t.insert(e.value(),g(e))}),new a.default).insert("\n",g(this))),this.cache.delta}},{key:"deleteAt",value:function(t,n){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),this.cache={}}},{key:"formatAt",value:function(t,n,o,r){n<=0||(s.default.query(o,s.default.Scope.BLOCK)?t+n===this.length()&&this.format(o,r):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,Math.min(n,this.length()-t-1),o,r),this.cache={})}},{key:"insertAt",value:function(t,n,o){if(null!=o)return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,o);if(0!==n.length){var r=n.split("\n"),a=r.shift();a.length>0&&(t<this.length()-1||null==this.children.tail?i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,Math.min(t,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});var s=this;r.reduce((function(t,e){return(s=s.split(t,!0)).insertAt(0,e),e.length}),t+a.length)}}},{key:"insertBefore",value:function(t,n){var o=this.children.head;i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n),o instanceof l.default&&o.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(t,n){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveChildren",this).call(this,t,n),this.cache={}}},{key:"optimize",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.cache={}}},{key:"path",value:function(t){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t,!0)}},{key:"removeChild",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeChild",this).call(this,t),this.cache={}}},{key:"split",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var o=this.clone();return 0===t?(this.parent.insertBefore(o,this),this):(this.parent.insertBefore(o,this.next),o)}var r=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},r}}]),e}(s.default.Block);function g(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,r.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:g(t.parent,e))}v.blotName="block",v.tagName="P",v.defaultChild="break",v.allowedChildren=[c.default,s.default.Embed,u.default],e.bubbleFormats=g,e.BlockEmbed=m,e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var o="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},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();n(50);var a=v(n(2)),s=v(n(14)),l=v(n(8)),c=v(n(9)),u=v(n(0)),d=n(15),f=v(d),h=v(n(3)),p=v(n(10)),m=v(n(34));function v(t){return t&&t.__esModule?t:{default:t}}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var b=(0,p.default)("quill"),_=function(){function t(e){var n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(y(this,t),this.options=w(e,o),this.container=this.options.container,null==this.container)return b.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=u.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new f.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t){t===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(l.default.events.SCROLL_UPDATE,(function(t,e){var o=n.selection.lastRange,i=o&&0===o.length?o.index:void 0;k.call(n,(function(){return n.editor.update(null,e,i)}),t)}));var r=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+i+"<p><br></p></div>");this.setContents(r),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return r(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),p.default.level(t)}},{key:"find",value:function(t){return t.__quill||u.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&b.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var i=t.attrName||t.blotName;"string"==typeof i?this.register("formats/"+i,t,e):Object.keys(t).forEach((function(o){n.register(o,t[o],e)}))}else null==this.imports[t]||o||b.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?u.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),r(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var o=this,r=O(t,e,n),a=i(r,4);return t=a[0],e=a[1],n=a[3],k.call(this,(function(){return o.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return k.call(this,(function(){var o=n.getSelection(!0),i=new a.default;if(null==o)return i;if(u.default.query(t,u.default.Scope.BLOCK))i=n.editor.formatLine(o.index,o.length,g({},t,e));else{if(0===o.length)return n.selection.format(t,e),i;i=n.editor.formatText(o.index,o.length,g({},t,e))}return n.setSelection(o,l.default.sources.SILENT),i}),o)}},{key:"formatLine",value:function(t,e,n,o,r){var a,s=this,l=O(t,e,n,o,r),c=i(l,4);return t=c[0],e=c[1],a=c[2],r=c[3],k.call(this,(function(){return s.editor.formatLine(t,e,a)}),r,t,0)}},{key:"formatText",value:function(t,e,n,o,r){var a,s=this,l=O(t,e,n,o,r),c=i(l,4);return t=c[0],e=c[1],a=c[2],r=c[3],k.call(this,(function(){return s.editor.formatText(t,e,a)}),r,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var o=this.container.getBoundingClientRect();return{bottom:n.bottom-o.top,height:n.height,left:n.left-o.left,right:n.right-o.left,top:n.top-o.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=O(t,e),o=i(n,2);return t=o[0],e=o[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=O(t,e),o=i(n,2);return t=o[0],e=o[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,o){var i=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return k.call(this,(function(){return i.editor.insertEmbed(e,n,o)}),r,e)}},{key:"insertText",value:function(t,e,n,o,r){var a,s=this,l=O(t,0,n,o,r),c=i(l,4);return t=c[0],a=c[2],r=c[3],k.call(this,(function(){return s.editor.insertText(t,e,a)}),r,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var o=this,r=O(t,e,n),a=i(r,4);return t=a[0],e=a[1],n=a[3],k.call(this,(function(){return o.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return k.call(this,(function(){t=new a.default(t);var n=e.getLength(),o=e.editor.deleteText(0,n),i=e.editor.applyDelta(t),r=i.ops[i.ops.length-1];return null!=r&&"string"==typeof r.insert&&"\n"===r.insert[r.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),i.delete(1)),o.compose(i)}),n)}},{key:"setSelection",value:function(e,n,o){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var r=O(e,n,o),a=i(r,4);e=a[0],n=a[1],o=a[3],this.selection.setRange(new d.Range(e,n),o),o!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new a.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return k.call(this,(function(){return t=new a.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();function w(t,e){if((e=(0,h.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==_.DEFAULTS.theme){if(e.theme=_.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=m.default;var n=(0,h.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var o=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=_.import("modules/"+e);return null==n?b.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,h.default)(!0,{},_.DEFAULTS,{modules:o},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function k(t,e,n,o){if(this.options.strict&&!this.isEnabled()&&e===l.default.sources.USER)return new a.default;var i=null==n?null:this.getSelection(),r=this.editor.delta,s=t();if(null!=i&&(!0===n&&(n=i.index),null==o?i=x(i,s,e):0!==o&&(i=x(i,n,o,e)),this.setSelection(i,l.default.sources.SILENT)),s.length()>0){var c,u,d=[l.default.events.TEXT_CHANGE,s,r,e];(c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(d)),e!==l.default.sources.SILENT&&(u=this.emitter).emit.apply(u,d)}return s}function O(t,e,n,i,r){var a={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(r=i,i=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(r=i,i=n,n=e,e=0),"object"===(void 0===n?"undefined":o(n))?(a=n,r=i):"string"==typeof n&&(null!=i?a[n]=i:r=n),[t,e,a,r=r||l.default.sources.API]}function x(t,e,n,o){if(null==t)return null;var r=void 0,s=void 0;if(e instanceof a.default){var c=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,o!==l.default.sources.USER)})),u=i(c,2);r=u[0],s=u[1]}else{var f=[t.index,t.index+t.length].map((function(t){return t<e||t===e&&o===l.default.sources.USER?t:n>=0?t+n:Math.max(e,t+n)})),h=i(f,2);r=h[0],s=h[1]}return new d.Range(r,s-r)}_.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},_.events=l.default.events,_.sources=l.default.sources,_.version="1.3.7",_.imports={delta:a.default,parchment:u.default,"core/module":c.default,"core/theme":m.default},e.expandConfig=w,e.overload=O,e.default=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},r=s(n(7)),a=s(n(0));function s(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 u=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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:"formatAt",value:function(t,n,o,r){if(e.compare(this.statics.blotName,o)<0&&a.default.query(o,a.default.Scope.BLOT)){var s=this.isolate(t,n);r&&s.wrap(o,r)}else i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,o,r)}},{key:"optimize",value:function(t){if(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var o=e.order.indexOf(t),i=e.order.indexOf(n);return o>=0||i>=0?o-i:t===n?0:t<n?-1:1}}]),e}(a.default.Inline);u.allowedChildren=[u,a.default.Embed,r.default],u.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(0);function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 s=function(t){function e(){return r(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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}(((o=i)&&o.__esModule?o:{default:o}).default.Text);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},r=a(n(54));function a(t){return t&&t.__esModule?t:{default:t}}var s=(0,a(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((function(t){document.addEventListener(t,(function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach((function(t){var n;t.__quill&&t.__quill.emitter&&(n=t.__quill.emitter).handleDOM.apply(n,e)}))}))}));var l=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var 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));return t.listeners={},t.on("error",s.error),t}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:"emit",value:function(){s.log.apply(s,arguments),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];(this.listeners[t.type]||[]).forEach((function(e){var o=e.node,i=e.handler;(t.target===o||o.contains(t.target))&&i.apply(void 0,[t].concat(n))}))}},{key:"listenDOM",value:function(t,e,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push({node:e,handler:n})}}]),e}(r.default);l.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},l.sources={API:"api",SILENT:"silent",USER:"user"},e.default=l},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,t),this.quill=e,this.options=n};i.DEFAULTS={},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=["error","warn","log","info"],i="warn";function r(t){if(o.indexOf(t)<=o.indexOf(i)){for(var e,n=arguments.length,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];(e=console)[t].apply(e,r)}}function a(t){return o.reduce((function(e,n){return e[n]=r.bind(console,n,t),e}),{})}r.level=a.level=function(t){i=t},e.default=a},function(t,e,n){var o=Array.prototype.slice,i=n(52),r=n(53),a=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:function(t,e,n){var c,u;if(s(t)||s(e))return!1;if(t.prototype!==e.prototype)return!1;if(r(t))return!!r(e)&&(t=o.call(t),e=o.call(e),a(t,e,n));if(l(t)){if(!l(e))return!1;if(t.length!==e.length)return!1;for(c=0;c<t.length;c++)if(t[c]!==e[c])return!1;return!0}try{var d=i(t),f=i(e)}catch(t){return!1}if(d.length!=f.length)return!1;for(d.sort(),f.sort(),c=d.length-1;c>=0;c--)if(d[c]!=f[c])return!1;for(c=d.length-1;c>=0;c--)if(u=d[c],!a(t[u],e[u],n))return!1;return typeof t==typeof e}(t,e,n))};function s(t){return null==t}function l(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var i=o.Scope.TYPE&o.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&o.Scope.LEVEL|i:this.scope=o.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=o.query(t,o.Scope.BLOT&(this.scope|o.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},a=d(n(2)),s=d(n(0)),l=d(n(4)),c=d(n(6)),u=d(n(7));function d(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(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 p(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)}var m=function(t){function e(){return f(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),e}(c.default);m.blotName="code",m.tagName="CODE";var v=function(t){function e(){return f(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),i(e,[{key:"delta",value:function(){var t=this,e=this.domNode.textContent;return e.endsWith("\n")&&(e=e.slice(0,-1)),e.split("\n").reduce((function(e,n){return e.insert(n).insert("\n",t.formats())}),new a.default)}},{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n){var i=this.descendant(u.default,this.length()-1),a=o(i,1)[0];null!=a&&a.deleteAt(a.length()-1,1),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}},{key:"formatAt",value:function(t,n,o,i){if(0!==n&&null!=s.default.query(o,s.default.Scope.BLOCK)&&(o!==this.statics.blotName||i!==this.statics.formats(this.domNode))){var r=this.newlineIndex(t);if(!(r<0||r>=t+n)){var a=this.newlineIndex(t,!0)+1,l=r-a+1,c=this.isolate(a,l),u=c.next;c.format(o,i),u instanceof e&&u.formatAt(0,t-a+n-l,o,i)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var i=this.descendant(u.default,t),r=o(i,2),a=r[0],s=r[1];a.insertAt(s,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var n=this.domNode.textContent.slice(t).indexOf("\n");return n>-1?t+n:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=s.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof s.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(l.default);v.blotName="code-block",v.tagName="PRE",v.TAB=" ",e.Code=m,e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o="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},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=g(n(2)),s=g(n(20)),l=g(n(0)),c=g(n(13)),u=g(n(24)),d=n(4),f=g(d),h=g(n(16)),p=g(n(21)),m=g(n(11)),v=g(n(3));function g(t){return t&&t.__esModule?t:{default:t}}var y=/^[ -~]*$/,b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scroll=e,this.delta=this.getDelta()}return r(t,[{key:"applyDelta",value:function(t){var e=this,n=!1;this.scroll.update();var r=this.scroll.length();return this.scroll.batchStart(),(t=function(t){return t.reduce((function(t,e){if(1===e.insert){var n=(0,p.default)(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=(0,p.default)(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){var o=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(o,e.attributes)}return t.push(e)}),new a.default)}(t)).reduce((function(t,a){var c=a.retain||a.delete||a.insert.length||1,u=a.attributes||{};if(null!=a.insert){if("string"==typeof a.insert){var h=a.insert;h.endsWith("\n")&&n&&(n=!1,h=h.slice(0,-1)),t>=r&&!h.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,h);var p=e.scroll.line(t),m=i(p,2),g=m[0],y=m[1],b=(0,v.default)({},(0,d.bubbleFormats)(g));if(g instanceof f.default){var _=g.descendant(l.default.Leaf,y),w=i(_,1)[0];b=(0,v.default)(b,(0,d.bubbleFormats)(w))}u=s.default.attributes.diff(b,u)||{}}else if("object"===o(a.insert)){var k=Object.keys(a.insert)[0];if(null==k)return t;e.scroll.insertAt(t,k,a.insert[k])}r+=c}return Object.keys(u).forEach((function(n){e.scroll.formatAt(t,c,n,u[n])})),t+c}),0),t.reduce((function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new a.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(o).forEach((function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var r=n.scroll.lines(t,Math.max(e,1)),a=e;r.forEach((function(e){var r=e.length();if(e instanceof c.default){var s=t-e.offset(n.scroll),l=e.newlineIndex(s+a)-s+1;e.formatAt(s,l,i,o[i])}else e.format(i,o[i]);a-=r}))}})),this.scroll.optimize(),this.update((new a.default).retain(t).retain(e,(0,p.default)(o)))}},{key:"formatText",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(o).forEach((function(i){n.scroll.formatAt(t,e,i,o[i])})),this.update((new a.default).retain(t).retain(e,(0,p.default)(o)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new a.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],o=[];0===e?this.scroll.path(t).forEach((function(t){var e=i(t,1)[0];e instanceof f.default?n.push(e):e instanceof l.default.Leaf&&o.push(e)})):(n=this.scroll.lines(t,e),o=this.scroll.descendants(l.default.Leaf,t,e));var r=[n,o].map((function(t){if(0===t.length)return{};for(var e=(0,d.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=_((0,d.bubbleFormats)(n),e)}return e}));return v.default.apply(v.default,r)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new a.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(o).forEach((function(i){n.scroll.formatAt(t,e.length,i,o[i])})),this.update((new a.default).retain(t).insert(e,(0,p.default)(o)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===f.default.blotName&&!(t.children.length>1)&&t.children.head instanceof h.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),o=this.scroll.line(t+e),r=i(o,2),s=r[0],l=r[1],u=0,d=new a.default;null!=s&&(u=s instanceof c.default?s.newlineIndex(l)-l+1:s.length()-l,d=s.delta().slice(l,l+u-1).insert("\n"));var f=this.getContents(t,e+u).diff((new a.default).insert(n).concat(d)),h=(new a.default).retain(t).concat(f);return this.applyDelta(h)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,o=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(y)&&l.default.find(e[0].target)){var i=l.default.find(e[0].target),r=(0,d.bubbleFormats)(i),s=i.offset(this.scroll),c=e[0].oldValue.replace(u.default.CONTENTS,""),f=(new a.default).insert(c),h=(new a.default).insert(i.value()),p=(new a.default).retain(s).concat(f.diff(h,n));t=p.reduce((function(t,e){return e.insert?t.insert(e.insert,r):t.push(e)}),new a.default),this.delta=o.compose(t)}else this.delta=this.getDelta(),t&&(0,m.default)(o.compose(t),this.delta)||(t=o.diff(this.delta,n));return t}}]),t}();function _(t,e){return Object.keys(e).reduce((function(n,o){return null==t[o]||(e[o]===t[o]?n[o]=e[o]:Array.isArray(e[o])?e[o].indexOf(t[o])<0&&(n[o]=e[o].concat([t[o]])):n[o]=[e[o],t[o]]),n}),{})}e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=c(n(0)),a=c(n(21)),s=c(n(11)),l=c(n(8));function c(t){return t&&t.__esModule?t:{default:t}}function u(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var f=(0,c(n(10)).default)("quill:selection"),h=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;d(this,t),this.index=e,this.length=n},p=function(){function t(e,n){var o=this;d(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=r.default.create("cursor",this),this.lastRange=this.savedRange=new h(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){o.mouseDown||setTimeout(o.update.bind(o,l.default.sources.USER),1)})),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t,e){t===l.default.events.TEXT_CHANGE&&e.length()>0&&o.update(l.default.sources.SILENT)})),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,(function(){if(o.hasFocus()){var t=o.getNativeRange();null!=t&&t.start.node!==o.cursor.textNode&&o.emitter.once(l.default.events.SCROLL_UPDATE,(function(){try{o.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}}))}})),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,i=n.startNode,r=n.startOffset,a=n.endNode,s=n.endOffset;o.setNativeRange(i,r,a,s)}})),this.update(l.default.sources.SILENT)}return i(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(l.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!r.default.query(t,r.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var o=r.default.find(n.start.node,!1);if(null==o)return;if(o instanceof r.default.Leaf){var i=o.split(n.start.offset);o.parent.insertBefore(this.cursor,i)}else o.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var i=void 0,r=this.scroll.leaf(t),a=o(r,2),s=a[0],l=a[1];if(null==s)return null;var c=s.position(l,!0),u=o(c,2);i=u[0],l=u[1];var d=document.createRange();if(e>0){d.setStart(i,l);var f=this.scroll.leaf(t+e),h=o(f,2);if(s=h[0],l=h[1],null==s)return null;var p=s.position(l,!0),m=o(p,2);return i=m[0],l=m[1],d.setEnd(i,l),d.getBoundingClientRect()}var v="left",g=void 0;return i instanceof Text?(l<i.data.length?(d.setStart(i,l),d.setEnd(i,l+1)):(d.setStart(i,l-1),d.setEnd(i,l),v="right"),g=d.getBoundingClientRect()):(g=s.domNode.getBoundingClientRect(),l>0&&(v="right")),{bottom:g.top+g.height,height:g.height,left:g[v],right:g[v],top:g.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return f.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var i=n.map((function(t){var n=o(t,2),i=n[0],a=n[1],s=r.default.find(i,!0),l=s.offset(e.scroll);return 0===a?l:s instanceof r.default.Container?l+s.length():l+s.index(i,a)})),a=Math.min(Math.max.apply(Math,u(i)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(u(i)));return new h(s,a-s)}},{key:"normalizeNative",value:function(t){if(!m(this.root,t.startContainer)||!t.collapsed&&!m(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],i=[],r=this.scroll.length();return n.forEach((function(t,n){t=Math.min(r-1,t);var a,s=e.scroll.leaf(t),l=o(s,2),c=l[0],u=l[1],d=c.position(u,0!==n),f=o(d,2);a=f[0],u=f[1],i.push(a,u)})),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var i=this.scroll.length()-1,r=this.scroll.line(Math.min(e.index,i)),a=o(r,1)[0],s=a;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,i));s=o(l,1)[0]}if(null!=a&&null!=s){var c=t.getBoundingClientRect();n.top<c.top?t.scrollTop-=c.top-n.top:n.bottom>c.bottom&&(t.scrollTop+=n.bottom-c.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(f.info("setNativeRange",t,e,n,o),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var r=document.getSelection();if(null!=r)if(null!=t){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||t!==a.startContainer||e!==a.startOffset||n!==a.endContainer||o!==a.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(o=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(t,e),s.setEnd(n,o),r.removeAllRanges(),r.addRange(s)}}else r.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof e&&(n=e,e=!1),f.info("setRange",t),null!=t){var o=this.rangeToNative(t);this.setNativeRange.apply(this,u(o).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.lastRange,n=this.getRange(),i=o(n,2),r=i[0],c=i[1];if(this.lastRange=r,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(e,this.lastRange)){var u;!this.composing&&null!=c&&c.native.collapsed&&c.start.node!==this.cursor.textNode&&this.cursor.restore();var d,f=[l.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(e),t];(u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(f)),t!==l.default.sources.SILENT&&(d=this.emitter).emit.apply(d,f)}}}]),t}();function m(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=h,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},a=n(0);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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 c=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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),i(e,[{key:"insertInto",value:function(t,n){0===t.children.length?r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertInto",this).call(this,t,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),e}(((o=a)&&o.__esModule?o:{default:o}).default.Embed);c.blotName="break",c.tagName="BR",e.default=c},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r=n(44),a=n(30),s=n(1),l=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return i(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach((function(t){t.attach()}))},e.prototype.build=function(){var t=this;this.children=new r.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(e){try{var n=c(e);t.insertBefore(n,t.children.head||void 0)}catch(t){if(t instanceof s.ParchmentError)return;throw t}}))},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,(function(t,e,n){t.deleteAt(e,n)}))},e.prototype.descendant=function(t,n){var o=this.children.find(n),i=o[0],r=o[1];return null==t.blotName&&t(i)||null!=t.blotName&&i instanceof t?[i,r]:i instanceof e?i.descendant(t,r):[null,-1]},e.prototype.descendants=function(t,n,o){void 0===n&&(n=0),void 0===o&&(o=Number.MAX_VALUE);var i=[],r=o;return this.children.forEachAt(n,o,(function(n,o,a){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&i.push(n),n instanceof e&&(i=i.concat(n.descendants(t,o,r))),r-=a})),i},e.prototype.detach=function(){this.children.forEach((function(t){t.detach()})),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,o){this.children.forEachAt(t,e,(function(t,e,i){t.formatAt(e,i,n,o)}))},e.prototype.insertAt=function(t,e,n){var o=this.children.find(t),i=o[0],r=o[1];if(i)i.insertAt(r,e,n);else{var a=null==n?s.create("text",e):s.create(e,n);this.appendChild(a)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(e){return t instanceof e})))throw new s.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce((function(t,e){return t+e.length()}),0)},e.prototype.moveChildren=function(t,e){this.children.forEach((function(n){t.insertBefore(n,e)}))},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=s.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var o=this.children.find(t,n),i=o[0],r=o[1],a=[[this,t]];return i instanceof e?a.concat(i.path(r,n)):(null!=i&&a.push([i,r]),a)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),(function(t,o,i){t=t.split(o,e),n.appendChild(t)})),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,o=[],i=[];t.forEach((function(t){t.target===n.domNode&&"childList"===t.type&&(o.push.apply(o,t.addedNodes),i.push.apply(i,t.removedNodes))})),i.forEach((function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=s.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}})),o.filter((function(t){return t.parentNode==n.domNode})).sort((function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(t){var e=null;null!=t.nextSibling&&(e=s.find(t.nextSibling));var o=c(t);o.next==e&&null!=o.next||(null!=o.parent&&o.parent.removeChild(n),n.insertBefore(o,e||void 0))}))},e}(a.default);function c(t){var e=s.find(t);if(null==e)try{e=s.create(t)}catch(n){e=s.create(s.Scope.INLINE),[].slice.call(t.childNodes).forEach((function(t){e.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}e.default=l},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r=n(12),a=n(31),s=n(17),l=n(1),c=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new a.default(n.domNode),n}return i(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=l.query(t);n instanceof r.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var o=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(o),o},e.prototype.update=function(e,n){var o=this;t.prototype.update.call(this,e,n),e.some((function(t){return t.target===o.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.prototype.wrap=function(n,o){var i=t.prototype.wrap.call(this,n,o);return i instanceof e&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},e}(s.default);e.default=c},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r=n(30),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=a.Scope.INLINE_BLOT,e}(r.default);e.default=s},function(t,e,n){var o=n(11),i=n(3),r={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var o=i(!0,{},e);for(var r in n||(o=Object.keys(o).reduce((function(t,e){return null!=o[e]&&(t[e]=o[e]),t}),{})),t)void 0!==t[r]&&void 0===e[r]&&(o[r]=t[r]);return Object.keys(o).length>0?o:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,i){return o(t[i],e[i])||(n[i]=void 0===e[i]?null:e[i]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var o=Object.keys(e).reduce((function(n,o){return void 0===t[o]&&(n[o]=e[o]),n}),{});return Object.keys(o).length>0?o:void 0}}},iterator:function(t){return new a(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function a(t){this.ops=t,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,o=r.length(e);if(t>=o-n?(t=o-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var i={};return e.attributes&&(i.attributes=e.attributes),"number"==typeof e.retain?i.retain=t:"string"==typeof e.insert?i.insert=e.insert.substr(n,t):i.insert=e.insert,i}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?r.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),o=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(o)}return[]},t.exports=r},function(t,e){var n=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,o;try{e=Map}catch(t){e=function(){}}try{n=Set}catch(t){n=function(){}}try{o=Promise}catch(t){o=function(){}}function r(a,l,c,u,d){"object"==typeof l&&(c=l.depth,u=l.prototype,d=l.includeNonEnumerable,l=l.circular);var f=[],h=[],p=void 0!==i;return void 0===l&&(l=!0),void 0===c&&(c=1/0),function a(c,m){if(null===c)return null;if(0===m)return c;var v,g;if("object"!=typeof c)return c;if(t(c,e))v=new e;else if(t(c,n))v=new n;else if(t(c,o))v=new o((function(t,e){c.then((function(e){t(a(e,m-1))}),(function(t){e(a(t,m-1))}))}));else if(r.__isArray(c))v=[];else if(r.__isRegExp(c))v=new RegExp(c.source,s(c)),c.lastIndex&&(v.lastIndex=c.lastIndex);else if(r.__isDate(c))v=new Date(c.getTime());else{if(p&&i.isBuffer(c))return v=i.allocUnsafe?i.allocUnsafe(c.length):new i(c.length),c.copy(v),v;t(c,Error)?v=Object.create(c):void 0===u?(g=Object.getPrototypeOf(c),v=Object.create(g)):(v=Object.create(u),g=u)}if(l){var y=f.indexOf(c);if(-1!=y)return h[y];f.push(c),h.push(v)}for(var b in t(c,e)&&c.forEach((function(t,e){var n=a(e,m-1),o=a(t,m-1);v.set(n,o)})),t(c,n)&&c.forEach((function(t){var e=a(t,m-1);v.add(e)})),c){var _;g&&(_=Object.getOwnPropertyDescriptor(g,b)),_&&null==_.set||(v[b]=a(c[b],m-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(c);for(b=0;b<w.length;b++){var k=w[b];(!(x=Object.getOwnPropertyDescriptor(c,k))||x.enumerable||d)&&(v[k]=a(c[k],m-1),x.enumerable||Object.defineProperty(v,k,{enumerable:!1}))}}if(d){var O=Object.getOwnPropertyNames(c);for(b=0;b<O.length;b++){var x,C=O[b];(x=Object.getOwnPropertyDescriptor(c,C))&&x.enumerable||(v[C]=a(c[C],m-1),Object.defineProperty(v,C,{enumerable:!1}))}}return v}(a,c)}function a(t){return Object.prototype.toString.call(t)}function s(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}return r.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},r.__objToStr=a,r.__isDate=function(t){return"object"==typeof t&&"[object Date]"===a(t)},r.__isArray=function(t){return"object"==typeof t&&"[object Array]"===a(t)},r.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===a(t)},r.__getRegExpFlags=s,r}();"object"==typeof t&&t.exports&&(t.exports=n)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},a=h(n(0)),s=h(n(8)),l=n(4),c=h(l),u=h(n(16)),d=h(n(13)),f=h(n(25));function h(t){return t&&t.__esModule?t:{default:t}}function p(t){return t instanceof c.default||t instanceof l.BlockEmbed}var m=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 o=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));return o.emitter=n.emitter,Array.isArray(n.whitelist)&&(o.whitelist=n.whitelist.reduce((function(t,e){return t[e]=!0,t}),{})),o.domNode.addEventListener("DOMNodeInserted",(function(){})),o.optimize(),o.enable(),o}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),i(e,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(t,n){var i=this.line(t),a=o(i,2),s=a[0],c=a[1],f=this.line(t+n),h=o(f,1)[0];if(r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),null!=h&&s!==h&&c>0){if(s instanceof l.BlockEmbed||h instanceof l.BlockEmbed)return void this.optimize();if(s instanceof d.default){var p=s.newlineIndex(s.length(),!0);if(p>-1&&(s=s.split(p+1))===h)return void this.optimize()}else if(h instanceof d.default){var m=h.newlineIndex(0);m>-1&&h.split(m+1)}var v=h.children.head instanceof u.default?null:h.children.head;s.moveChildren(h,v),s.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,o,i){(null==this.whitelist||this.whitelist[o])&&(r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,o,i),this.optimize())}},{key:"insertAt",value:function(t,n,o){if(null==o||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==o||null==a.default.query(n,a.default.Scope.BLOCK)){var i=a.default.create(this.statics.defaultChild);this.appendChild(i),null==o&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,o)}else{var s=a.default.create(n,o);this.appendChild(s)}else r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,o);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===a.default.Scope.INLINE_BLOT){var o=a.default.create(this.statics.defaultChild);o.appendChild(t),t=o}r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(p,t)}},{key:"lines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,n=function t(e,n,o){var i=[],r=o;return e.children.forEachAt(n,o,(function(e,n,o){p(e)?i.push(e):e instanceof a.default.Container&&(i=i.concat(t(e,n,r))),r-=o})),i};return n(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=s.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,t),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,t)}}}]),e}(a.default.Scroll);m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[c.default,l.BlockEmbed,f.default],e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var o="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},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=m(n(21)),s=m(n(11)),l=m(n(3)),c=m(n(2)),u=m(n(20)),d=m(n(0)),f=m(n(5)),h=m(n(10)),p=m(n(9));function m(t){return t&&t.__esModule?t:{default:t}}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=(0,h.default)("quill:keyboard"),y=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",b=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 o=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 o.bindings={},Object.keys(o.options.bindings).forEach((function(e){("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&o.options.bindings[e]&&o.addBinding(o.options.bindings[e])})),o.addBinding({key:e.keys.ENTER,shiftKey:null},x),o.addBinding({key:e.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(o.addBinding({key:e.keys.BACKSPACE},{collapsed:!0},w),o.addBinding({key:e.keys.DELETE},{collapsed:!0},k)):(o.addBinding({key:e.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},w),o.addBinding({key:e.keys.DELETE},{collapsed:!0,suffix:/^.?$/},k)),o.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},O),o.addBinding({key:e.keys.DELETE},{collapsed:!1},O),o.addBinding({key:e.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},w),o.listen(),o}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,null,[{key:"match",value:function(t,e){return e=j(e),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!e[n]!==t[n]&&null!==e[n]}))&&e.key===(t.which||t.keyCode)}}]),r(e,[{key:"addBinding",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=j(t);if(null==o||null==o.key)return g.warn("Attempted to add invalid keyboard binding",o);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),o=(0,l.default)(o,e,n),this.bindings[o.key]=this.bindings[o.key]||[],this.bindings[o.key].push(o)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var r=n.which||n.keyCode,a=(t.bindings[r]||[]).filter((function(t){return e.match(n,t)}));if(0!==a.length){var l=t.quill.getSelection();if(null!=l&&t.quill.hasFocus()){var c=t.quill.getLine(l.index),u=i(c,2),f=u[0],h=u[1],p=t.quill.getLeaf(l.index),m=i(p,2),v=m[0],g=m[1],y=0===l.length?[v,g]:t.quill.getLeaf(l.index+l.length),b=i(y,2),_=b[0],w=b[1],k=v instanceof d.default.Text?v.value().slice(0,g):"",O=_ instanceof d.default.Text?_.value().slice(w):"",x={collapsed:0===l.length,empty:0===l.length&&f.length()<=1,format:t.quill.getFormat(l),offset:h,prefix:k,suffix:O};a.some((function(e){if(null!=e.collapsed&&e.collapsed!==x.collapsed)return!1;if(null!=e.empty&&e.empty!==x.empty)return!1;if(null!=e.offset&&e.offset!==x.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==x.format[t]})))return!1}else if("object"===o(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=x.format[t]:!1===e.format[t]?null==x.format[t]:(0,s.default)(e.format[t],x.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(x.prefix)||null!=e.suffix&&!e.suffix.test(x.suffix)||!0===e.handler.call(t,l,x))}))&&n.preventDefault()}}}}))}}]),e}(p.default);function _(t,e){var n,o=t===b.keys.LEFT?"prefix":"suffix";return v(n={key:t,shiftKey:e,altKey:null},o,/^$/),v(n,"handler",(function(n){var o=n.index;t===b.keys.RIGHT&&(o+=n.length+1);var r=this.quill.getLeaf(o);return!(i(r,1)[0]instanceof d.default.Embed&&(t===b.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index-1,f.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index+n.length+1,f.default.sources.USER),1))})),n}function w(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),o=i(n,1)[0],r={};if(0===e.offset){var a=this.quill.getLine(t.index-1),s=i(a,1)[0];if(null!=s&&s.length()>1){var l=o.formats(),c=this.quill.getFormat(t.index-1,1);r=u.default.attributes.diff(l,c)||{}}}var d=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-d,d,f.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index-d,d,r,f.default.sources.USER),this.quill.focus()}}function k(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var o={},r=0,a=this.quill.getLine(t.index),s=i(a,1)[0];if(e.offset>=s.length()-1){var l=this.quill.getLine(t.index+1),c=i(l,1)[0];if(c){var d=s.formats(),h=this.quill.getFormat(t.index,1);o=u.default.attributes.diff(d,h)||{},r=c.length()}}this.quill.deleteText(t.index,n,f.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index+r-1,n,o,f.default.sources.USER)}}function O(t){var e=this.quill.getLines(t),n={};if(e.length>1){var o=e[0].formats(),i=e[e.length-1].formats();n=u.default.attributes.diff(i,o)||{}}this.quill.deleteText(t,f.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,f.default.sources.USER),this.quill.setSelection(t.index,f.default.sources.SILENT),this.quill.focus()}function x(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var o=Object.keys(e.format).reduce((function(t,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",o,f.default.sources.USER),this.quill.setSelection(t.index+1,f.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==o[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],f.default.sources.USER))}))}function C(t){return{key:b.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=d.default.query("code-block"),o=e.index,r=e.length,a=this.quill.scroll.descendant(n,o),s=i(a,2),l=s[0],c=s[1];if(null!=l){var u=this.quill.getIndex(l),h=l.newlineIndex(c,!0)+1,p=l.newlineIndex(u+c+r),m=l.domNode.textContent.slice(h,p).split("\n");c=0,m.forEach((function(e,i){t?(l.insertAt(h+c,n.TAB),c+=n.TAB.length,0===i?o+=n.TAB.length:r+=n.TAB.length):e.startsWith(n.TAB)&&(l.deleteAt(h+c,n.TAB.length),c-=n.TAB.length,0===i?o-=n.TAB.length:r-=n.TAB.length),c+=e.length+1})),this.quill.update(f.default.sources.USER),this.quill.setSelection(o,r,f.default.sources.SILENT)}}}}function S(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],f.default.sources.USER)}}}function j(t){if("string"==typeof t||"number"==typeof t)return j({key:t});if("object"===(void 0===t?"undefined":o(t))&&(t=(0,a.default)(t,!1)),"string"==typeof t.key)if(null!=b.keys[t.key.toUpperCase()])t.key=b.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[y]=t.shortKey,delete t.shortKey),t}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:S("bold"),italic:S("italic"),underline:S("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",f.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",f.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",f.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,f.default.sources.USER)}},"indent code-block":C(!0),"outdent code-block":C(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,f.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new c.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,f.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,f.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,f.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),o=n[0],r=n[1],a=(0,l.default)({},o.formats(),{list:"checked"}),s=(new c.default).retain(t.index).insert("\n",a).retain(o.length()-r-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,f.default.sources.USER),this.quill.setSelection(t.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),o=i(n,2),r=o[0],a=o[1],s=(new c.default).retain(t.index).insert("\n",e.format).retain(r.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,f.default.sources.USER),this.quill.setSelection(t.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,o=this.quill.getLine(t.index),r=i(o,2),a=r[0],s=r[1];if(s>n)return!0;var l=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(t.index," ",f.default.sources.USER),this.quill.history.cutoff();var u=(new c.default).retain(t.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:l});this.quill.updateContents(u,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,f.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),o=n[0],r=n[1],a=(new c.default).retain(t.index+o.length()-r-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,f.default.sources.USER)}},"embed left":_(b.keys.LEFT,!1),"embed left shift":_(b.keys.LEFT,!0),"embed right":_(b.keys.RIGHT,!1),"embed right shift":_(b.keys.RIGHT,!0)}},e.default=b,e.SHORTKEY=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=l(n(0)),s=l(n(7));function l(t){return t&&t.__esModule?t:{default:t}}var c=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 o=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));return o.selection=n,o.textNode=document.createTextNode(e.CONTENTS),o.domNode.appendChild(o.textNode),o._length=0,o}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,null,[{key:"value",value:function(){}}]),r(e,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(t,n){if(0!==this._length)return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);for(var o=this,r=0;null!=o&&o.statics.scope!==a.default.Scope.BLOCK_BLOT;)r+=o.offset(o.parent),o=o.parent;null!=o&&(this._length=e.CONTENTS.length,o.optimize(),o.formatAt(r,e.CONTENTS.length,t,n),this._length=0)}},{key:"index",value:function(t,n){return t===this.textNode?0:i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var t=this.textNode,n=this.selection.getNativeRange(),i=void 0,r=void 0,l=void 0;if(null!=n&&n.start.node===t&&n.end.node===t){var c=[t,n.start.offset,n.end.offset];i=c[0],r=c[1],l=c[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==e.CONTENTS){var u=this.textNode.data.split(e.CONTENTS).join("");this.next instanceof s.default?(i=this.next.domNode,this.next.insertAt(0,u),this.textNode.data=e.CONTENTS):(this.textNode.data=u,this.parent.insertBefore(a.default.create(this.textNode),this),this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=r){var d=[r,l].map((function(t){return Math.max(0,Math.min(i.data.length,t-1))})),f=o(d,2);return r=f[0],l=f[1],{startNode:i,startOffset:r,endNode:i,endOffset:l}}}}},{key:"update",value:function(t,e){var n=this;if(t.some((function(t){return"characterData"===t.type&&t.target===n.textNode}))){var o=this.restore();o&&(e.range=o)}}},{key:"value",value:function(){return""}}]),e}(a.default.Embed);c.blotName="cursor",c.className="ql-cursor",c.tagName="span",c.CONTENTS="\ufeff",e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a(n(0)),i=n(4),r=a(i);function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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 c=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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}(o.default.Container);c.allowedChildren=[r.default,i.BlockEmbed,c],e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},a=n(0),s=(o=a)&&o.__esModule?o:{default:o};function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 u=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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),i(e,[{key:"value",value:function(t){var n=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map((function(t){return("00"+parseInt(t).toString(16)).slice(-2)})).join("")):n}}]),e}(s.default.Attributor.Style),d=new s.default.Attributor.Class("color","ql-color",{scope:s.default.Scope.INLINE}),f=new u("color","color",{scope:s.default.Scope.INLINE});e.ColorAttributor=u,e.ColorClass=d,e.ColorStyle=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},a=n(6);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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 c=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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),i(e,[{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n)return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(t){var n=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return t=this.sanitize(t),n.setAttribute("href",t),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(t){return t.getAttribute("href")}},{key:"sanitize",value:function(t){return u(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}}]),e}(((o=a)&&o.__esModule?o:{default:o}).default);function u(t,e){var n=document.createElement("a");n.href=t;var o=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(o)>-1}c.blotName="link",c.tagName="A",c.SANITIZED_URL="about:blank",c.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=c,e.sanitize=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o="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},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=s(n(23)),a=s(n(107));function s(t){return t&&t.__esModule?t:{default:t}}var l=0;function c(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}var u=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(function(){n.togglePicker()})),this.label.addEventListener("keydown",(function(t){switch(t.keyCode){case r.default.keys.ENTER:n.togglePicker();break;case r.default.keys.ESCAPE:n.escape(),t.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return i(t,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),c(this.label,"aria-expanded"),c(this.options,"aria-hidden")}},{key:"buildItem",value:function(t){var e=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),t.hasAttribute("value")&&n.setAttribute("data-value",t.getAttribute("value")),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",(function(){e.selectItem(n,!0)})),n.addEventListener("keydown",(function(t){switch(t.keyCode){case r.default.keys.ENTER:e.selectItem(n,!0),t.preventDefault();break;case r.default.keys.ESCAPE:e.escape(),t.preventDefault()}})),n}},{key:"buildLabel",value:function(){var t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=a.default,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}},{key:"buildOptions",value:function(){var t=this,e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id="ql-picker-options-"+l,l+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,[].slice.call(this.select.options).forEach((function(n){var o=t.buildItem(n);e.appendChild(o),!0===n.selected&&t.selectItem(o)})),this.container.appendChild(e)}},{key:"buildPicker",value:function(){var t=this;[].slice.call(this.select.attributes).forEach((function(e){t.container.setAttribute(e.name,e.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var t=this;this.close(),setTimeout((function(){return t.label.focus()}),1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":o(Event))){var i=document.createEvent("Event");i.initEvent("change",!0,!0),this.select.dispatchEvent(i)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=g(n(0)),i=g(n(5)),r=n(4),a=g(r),s=g(n(16)),l=g(n(25)),c=g(n(24)),u=g(n(35)),d=g(n(6)),f=g(n(22)),h=g(n(7)),p=g(n(55)),m=g(n(42)),v=g(n(23));function g(t){return t&&t.__esModule?t:{default:t}}i.default.register({"blots/block":a.default,"blots/block/embed":r.BlockEmbed,"blots/break":s.default,"blots/container":l.default,"blots/cursor":c.default,"blots/embed":u.default,"blots/inline":d.default,"blots/scroll":f.default,"blots/text":h.default,"modules/clipboard":p.default,"modules/history":m.default,"modules/keyboard":v.default}),o.default.register(a.default,s.default,c.default,d.default,f.default,h.default),e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=function(){function t(t){this.domNode=t,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new o.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return o.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,i){var r=this.isolate(t,e);if(null!=o.query(n,o.Scope.BLOT)&&i)r.wrap(n,i);else if(null!=o.query(n,o.Scope.ATTRIBUTE)){var a=o.create(this.statics.scope);r.wrap(a),a.format(n,i)}},t.prototype.insertAt=function(t,e,n){var i=null==n?o.create("text",e):o.create(e,n),r=this.split(t);this.parent.insertBefore(i,r)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[o.DATA_KEY]&&delete this.domNode[o.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?o.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?o.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),i=n(32),r=n(33),a=n(1),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=o.default.keys(this.domNode),n=i.default.keys(this.domNode),s=r.default.keys(this.domNode);e.concat(n).concat(s).forEach((function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof o.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var o=e.attributes[n].value(e.domNode);t.format(n,o)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=s},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function r(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){r(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(r(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function r(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[r(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[r(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[r(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n,this.modules={}}return o(t,[{key:"init",value:function(){var t=this;Object.keys(this.options.modules).forEach((function(e){null==t.modules[e]&&t.addModule(e)}))}},{key:"addModule",value:function(t){var e=this.quill.constructor.import("modules/"+t);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}]),t}();i.DEFAULTS={modules:{}},i.themes={default:i},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},r=s(n(0)),a=s(n(7));function s(t){return t&&t.__esModule?t:{default:t}}var l="\ufeff",c=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=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));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach((function(t){n.contentNode.appendChild(t)})),n.leftGuard=document.createTextNode(l),n.rightGuard=document.createTextNode(l),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),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:"index",value:function(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"restore",value:function(t){var e=void 0,n=void 0,o=t.data.split(l).join("");if(t===this.leftGuard)if(this.prev instanceof a.default){var i=this.prev.length();this.prev.insertAt(i,o),e={startNode:this.prev.domNode,startOffset:i+o.length}}else n=document.createTextNode(o),this.parent.insertBefore(r.default.create(n),this),e={startNode:n,startOffset:o.length};else t===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,o),e={startNode:this.next.domNode,startOffset:o.length}):(n=document.createTextNode(o),this.parent.insertBefore(r.default.create(n),this.next),e={startNode:n,startOffset:o.length}));return t.data=l,e}},{key:"update",value:function(t,e){var n=this;t.forEach((function(t){if("characterData"===t.type&&(t.target===n.leftGuard||t.target===n.rightGuard)){var o=n.restore(t.target);o&&(e.range=o)}}))}}]),e}(r.default.Embed);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlignStyle=e.AlignClass=e.AlignAttribute=void 0;var o,i=n(0),r=(o=i)&&o.__esModule?o:{default:o},a={scope:r.default.Scope.BLOCK,whitelist:["right","center","justify"]},s=new r.default.Attributor.Attribute("align","align",a),l=new r.default.Attributor.Class("align","ql-align",a),c=new r.default.Attributor.Style("align","text-align",a);e.AlignAttribute=s,e.AlignClass=l,e.AlignStyle=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackgroundStyle=e.BackgroundClass=void 0;var o,i=n(0),r=(o=i)&&o.__esModule?o:{default:o},a=n(26),s=new r.default.Attributor.Class("background","ql-bg",{scope:r.default.Scope.INLINE}),l=new a.ColorAttributor("background","background-color",{scope:r.default.Scope.INLINE});e.BackgroundClass=s,e.BackgroundStyle=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirectionStyle=e.DirectionClass=e.DirectionAttribute=void 0;var o,i=n(0),r=(o=i)&&o.__esModule?o:{default:o},a={scope:r.default.Scope.BLOCK,whitelist:["rtl"]},s=new r.default.Attributor.Attribute("direction","dir",a),l=new r.default.Attributor.Class("direction","ql-direction",a),c=new r.default.Attributor.Style("direction","direction",a);e.DirectionAttribute=s,e.DirectionClass=l,e.DirectionStyle=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontClass=e.FontStyle=void 0;var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},a=n(0),s=(o=a)&&o.__esModule?o:{default:o};function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 u={scope:s.default.Scope.INLINE,whitelist:["serif","monospace"]},d=new s.default.Attributor.Class("font","ql-font",u),f=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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),i(e,[{key:"value",value:function(t){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t).replace(/["']/g,"")}}]),e}(s.default.Attributor.Style),h=new f("font","font-family",u);e.FontStyle=h,e.FontClass=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SizeStyle=e.SizeClass=void 0;var o,i=n(0),r=(o=i)&&o.__esModule?o:{default:o},a=new r.default.Attributor.Class("size","ql-size",{scope:r.default.Scope.INLINE,whitelist:["small","large","huge"]}),s=new r.default.Attributor.Style("size","font-size",{scope:r.default.Scope.INLINE,whitelist:["10px","18px","32px"]});e.SizeClass=a,e.SizeStyle=s},function(t,e,n){"use strict";t.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLastChangeIndex=e.default=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=a(n(0)),r=a(n(5));function a(t){return t&&t.__esModule?t:{default:t}}var s=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 o=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 o.lastRecorded=0,o.ignoreChange=!1,o.clear(),o.quill.on(r.default.events.EDITOR_CHANGE,(function(t,e,n,i){t!==r.default.events.TEXT_CHANGE||o.ignoreChange||(o.options.userOnly&&i!==r.default.sources.USER?o.transform(e):o.record(e,n))})),o.quill.keyboard.addBinding({key:"Z",shortKey:!0},o.undo.bind(o)),o.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},o.redo.bind(o)),/Win/i.test(navigator.platform)&&o.quill.keyboard.addBinding({key:"Y",shortKey:!0},o.redo.bind(o)),o}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:"change",value:function(t,e){if(0!==this.stack[t].length){var n=this.stack[t].pop();this.stack[e].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],r.default.sources.USER),this.ignoreChange=!1;var o=l(n[t]);this.quill.setSelection(o)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(t,e){if(0!==t.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(e),o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),t=i.redo.compose(t)}else this.lastRecorded=o;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(a(n(9)).default);function l(t){var e=t.reduce((function(t,e){return t+=e.delete||0}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=i.default.query(t,i.default.Scope.BLOCK)})))}(t)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=s,e.getLastChangeIndex=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},r=p(n(3)),a=p(n(2)),s=p(n(8)),l=p(n(23)),c=p(n(34)),u=p(n(59)),d=p(n(60)),f=p(n(28)),h=p(n(61));function p(t){return t&&t.__esModule?t:{default:t}}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(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 g(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)}var y=[!1,"center","right","justify"],b=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],_=[!1,"serif","monospace"],w=["1","2","3",!1],k=["small",!1,"large","huge"],O=function(t){function e(t,n){m(this,e);var o=v(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return t.emitter.listenDOM("click",document.body,(function e(n){if(!document.body.contains(t.root))return document.body.removeEventListener("click",e);null==o.tooltip||o.tooltip.root.contains(n.target)||document.activeElement===o.tooltip.textbox||o.quill.hasFocus()||o.tooltip.hide(),null!=o.pickers&&o.pickers.forEach((function(t){t.container.contains(n.target)||t.close()}))})),o}return g(e,t),o(e,[{key:"addModule",value:function(t){var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addModule",this).call(this,t);return"toolbar"===t&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(t,e){t.forEach((function(t){(t.getAttribute("class")||"").split(/\s+/).forEach((function(n){if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{var o=t.value||"";null!=o&&e[n][o]&&(t.innerHTML=e[n][o])}}))}))}},{key:"buildPickers",value:function(t,e){var n=this;this.pickers=t.map((function(t){if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&C(t,y),new d.default(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){var n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&C(t,b,"background"===n?"#ffffff":"#000000"),new u.default(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?C(t,_):t.classList.contains("ql-header")?C(t,w):t.classList.contains("ql-size")&&C(t,k)),new f.default(t)})),this.quill.on(s.default.events.EDITOR_CHANGE,(function(){n.pickers.forEach((function(t){t.update()}))}))}}]),e}(c.default);O.DEFAULTS=(0,r.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var t=this,e=this.container.querySelector("input.ql-image[type=file]");null==e&&((e=document.createElement("input")).setAttribute("type","file"),e.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),e.classList.add("ql-image"),e.addEventListener("change",(function(){if(null!=e.files&&null!=e.files[0]){var n=new FileReader;n.onload=function(n){var o=t.quill.getSelection(!0);t.quill.updateContents((new a.default).retain(o.index).delete(o.length).insert({image:n.target.result}),s.default.sources.USER),t.quill.setSelection(o.index+1,s.default.sources.SILENT),e.value=""},n.readAsDataURL(e.files[0])}})),this.container.appendChild(e)),e.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var x=function(t){function e(t,n){m(this,e);var o=v(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.textbox=o.root.querySelector('input[type="text"]'),o.listen(),o}return g(e,t),o(e,[{key:"listen",value:function(){var t=this;this.textbox.addEventListener("keydown",(function(e){l.default.match(e,"enter")?(t.save(),e.preventDefault()):l.default.match(e,"escape")&&(t.cancel(),e.preventDefault())}))}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t,e,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var o=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,s.default.sources.USER)),this.quill.root.scrollTop=o;break;case"video":e=(t=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/),n=e?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t;case"formula":if(!n)break;var i=this.quill.getSelection(!0);if(null!=i){var r=i.index+i.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),n,s.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",s.default.sources.USER),this.quill.setSelection(r+2,s.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(h.default);function C(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var o=document.createElement("option");e===n?o.setAttribute("selected","selected"):o.setAttribute("value",e),t.appendChild(o)}))}e.BaseTooltip=x,e.default=O},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.insertBefore(t[0],null),t.length>1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,o=this.iterator();n=o();){var i=n.length();if(t<i||e&&t===i&&(null==n.next||0!==n.next.length()))return[n,t];t-=i}return[null,0]},t.prototype.forEach=function(t){for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){if(!(e<=0))for(var o,i=this.find(t),r=i[0],a=t-i[1],s=this.iterator(r);(o=s())&&a<t+e;){var l=o.length();t>a?n(o,t-a,Math.min(e,a+l-t)):n(o,0,Math.min(l,t+e-a)),a+=l}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,o=this.iterator();n=o();)e=t(e,n);return e},t}();e.default=o},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r=n(17),a=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,s),n.attach(),n}return i(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,o,i){this.update(),t.prototype.formatAt.call(this,e,n,o,i)},e.prototype.insertAt=function(e,n,o){this.update(),t.prototype.insertAt.call(this,e,n,o)},e.prototype.optimize=function(e,n){var o=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var i=[].slice.call(this.observer.takeRecords());i.length>0;)e.push(i.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==o&&null!=t.domNode.parentNode&&(null==t.domNode[a.DATA_KEY].mutations&&(t.domNode[a.DATA_KEY].mutations=[]),e&&s(t.parent))},l=function(t){null!=t.domNode[a.DATA_KEY]&&null!=t.domNode[a.DATA_KEY].mutations&&(t instanceof r.default&&t.children.forEach(l),t.optimize(n))},c=e,u=0;c.length>0;u+=1){if(u>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach((function(t){var e=a.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(a.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=a.find(t,!1);s(e,!1),e instanceof r.default&&e.children.forEach((function(t){s(t,!1)}))}))):"attributes"===t.type&&s(e.prev)),s(e))})),this.children.forEach(l),i=(c=[].slice.call(this.observer.takeRecords())).slice();i.length>0;)e.push(i.pop())}},e.prototype.update=function(e,n){var o=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=a.find(t.target,!0);return null==e?null:null==e.domNode[a.DATA_KEY].mutations?(e.domNode[a.DATA_KEY].mutations=[t],e):(e.domNode[a.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==o&&null!=t.domNode[a.DATA_KEY]&&t.update(t.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="DIV",e}(r.default);e.default=l},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,o){var i=this;n!==this.statics.blotName||o?t.prototype.format.call(this,n,o):(this.children.forEach((function(t){t instanceof r.default||(t=t.wrap(e.blotName,!0)),i.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,o,i){null!=this.formats()[o]||a.query(o,a.Scope.ATTRIBUTE)?this.isolate(e,n).format(o,i):t.prototype.formatAt.call(this,e,n,o,i)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var o=this.formats();if(0===Object.keys(o).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(o,i.formats())&&(i.moveChildren(this),i.remove())},e.blotName="inline",e.scope=a.Scope.INLINE_BLOT,e.tagName="SPAN",e}(r.default);e.default=s},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){var o=a.query(e.blotName).tagName;if(n.tagName!==o)return t.formats.call(this,n)},e.prototype.format=function(n,o){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||o?t.prototype.format.call(this,n,o):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,o,i){null!=a.query(o,a.Scope.BLOCK)?this.format(o,i):t.prototype.formatAt.call(this,e,n,o,i)},e.prototype.insertAt=function(e,n,o){if(null==o||null!=a.query(n,a.Scope.INLINE))t.prototype.insertAt.call(this,e,n,o);else{var i=this.split(e),r=a.create(n,o);i.parent.insertBefore(r,i)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="P",e}(r.default);e.default=s},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,o,i){0===e&&n===this.length()?this.format(o,i):t.prototype.formatAt.call(this,e,n,o,i)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=r},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r=n(19),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return i(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,o){null==o?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,o)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=a.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=a.Scope.INLINE_BLOT,e}(r.default);e.default=s},function(t,e,n){"use strict";var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:i.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var o=n.indexOf(t,e);return-1!==o&&o===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),o=n.length>>>0,i=arguments[1],r=0;r<o;r++)if(e=n[r],t.call(i,e,r,n))return e}}),document.addEventListener("DOMContentLoaded",(function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)}))},function(t,e){var n=-1;function o(t,e,l){if(t==e)return t?[[0,t]]:[];(l<0||t.length<l)&&(l=null);var u=r(t,e),d=t.substring(0,u);u=a(t=t.substring(u),e=e.substring(u));var f=t.substring(t.length-u),h=function(t,e){var s;if(!t)return[[1,e]];if(!e)return[[n,t]];var l=t.length>e.length?t:e,c=t.length>e.length?e:t,u=l.indexOf(c);if(-1!=u)return s=[[1,l.substring(0,u)],[0,c],[1,l.substring(u+c.length)]],t.length>e.length&&(s[0][0]=s[2][0]=n),s;if(1==c.length)return[[n,t],[1,e]];var d=function(t,e){var n=t.length>e.length?t:e,o=t.length>e.length?e:t;if(n.length<4||2*o.length<n.length)return null;function i(t,e,n){for(var o,i,s,l,c=t.substring(n,n+Math.floor(t.length/4)),u=-1,d="";-1!=(u=e.indexOf(c,u+1));){var f=r(t.substring(n),e.substring(u)),h=a(t.substring(0,n),e.substring(0,u));d.length<h+f&&(d=e.substring(u-h,u)+e.substring(u,u+f),o=t.substring(0,n-h),i=t.substring(n+f),s=e.substring(0,u-h),l=e.substring(u+f))}return 2*d.length>=t.length?[o,i,s,l,d]:null}var s,l,c,u,d,f=i(n,o,Math.ceil(n.length/4)),h=i(n,o,Math.ceil(n.length/2));if(!f&&!h)return null;s=h?f&&f[4].length>h[4].length?f:h:f,t.length>e.length?(l=s[0],c=s[1],u=s[2],d=s[3]):(u=s[0],d=s[1],l=s[2],c=s[3]);var p=s[4];return[l,c,u,d,p]}(t,e);if(d){var f=d[0],h=d[1],p=d[2],m=d[3],v=d[4],g=o(f,p),y=o(h,m);return g.concat([[0,v]],y)}return function(t,e){for(var o=t.length,r=e.length,a=Math.ceil((o+r)/2),s=a,l=2*a,c=new Array(l),u=new Array(l),d=0;d<l;d++)c[d]=-1,u[d]=-1;c[s+1]=0,u[s+1]=0;for(var f=o-r,h=f%2!=0,p=0,m=0,v=0,g=0,y=0;y<a;y++){for(var b=-y+p;b<=y-m;b+=2){for(var _=s+b,w=(S=b==-y||b!=y&&c[_-1]<c[_+1]?c[_+1]:c[_-1]+1)-b;S<o&&w<r&&t.charAt(S)==e.charAt(w);)S++,w++;if(c[_]=S,S>o)m+=2;else if(w>r)p+=2;else if(h&&(x=s+f-b)>=0&&x<l&&-1!=u[x]&&S>=(O=o-u[x]))return i(t,e,S,w)}for(var k=-y+v;k<=y-g;k+=2){for(var O,x=s+k,C=(O=k==-y||k!=y&&u[x-1]<u[x+1]?u[x+1]:u[x-1]+1)-k;O<o&&C<r&&t.charAt(o-O-1)==e.charAt(r-C-1);)O++,C++;if(u[x]=O,O>o)g+=2;else if(C>r)v+=2;else if(!h){var S;if((_=s+f-k)>=0&&_<l&&-1!=c[_])if(w=s+(S=c[_])-_,S>=(O=o-O))return i(t,e,S,w)}}}return[[n,t],[1,e]]}(t,e)}(t=t.substring(0,t.length-u),e=e.substring(0,e.length-u));return d&&h.unshift([0,d]),f&&h.push([0,f]),s(h),null!=l&&(h=function(t,e){var o=function(t,e){if(0===e)return[0,t];for(var o=0,i=0;i<t.length;i++){var r=t[i];if(r[0]===n||0===r[0]){var a=o+r[1].length;if(e===a)return[i+1,t];if(e<a){t=t.slice();var s=e-o,l=[r[0],r[1].slice(0,s)],c=[r[0],r[1].slice(s)];return t.splice(i,1,l,c),[i+1,t]}o=a}}throw new Error("cursor_pos is out of bounds!")}(t,e),i=o[1],r=o[0],a=i[r],s=i[r+1];if(null==a)return t;if(0!==a[0])return t;if(null!=s&&a[1]+s[1]===s[1]+a[1])return i.splice(r,2,s,a),c(i,r,2);if(null!=s&&0===s[1].indexOf(a[1])){i.splice(r,2,[s[0],a[1]],[0,a[1]]);var l=s[1].slice(a[1].length);return l.length>0&&i.splice(r+2,0,[s[0],l]),c(i,r,3)}return t}(h,l)),h=function(t){for(var e=!1,o=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},i=function(t){return t.charCodeAt(t.length-1)>=55296&&t.charCodeAt(t.length-1)<=56319},r=2;r<t.length;r+=1)0===t[r-2][0]&&i(t[r-2][1])&&t[r-1][0]===n&&o(t[r-1][1])&&1===t[r][0]&&o(t[r][1])&&(e=!0,t[r-1][1]=t[r-2][1].slice(-1)+t[r-1][1],t[r][1]=t[r-2][1].slice(-1)+t[r][1],t[r-2][1]=t[r-2][1].slice(0,-1));if(!e)return t;var a=[];for(r=0;r<t.length;r+=1)t[r][1].length>0&&a.push(t[r]);return a}(h)}function i(t,e,n,i){var r=t.substring(0,n),a=e.substring(0,i),s=t.substring(n),l=e.substring(i),c=o(r,a),u=o(s,l);return c.concat(u)}function r(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,o=Math.min(t.length,e.length),i=o,r=0;n<i;)t.substring(r,i)==e.substring(r,i)?r=n=i:o=i,i=Math.floor((o-n)/2+n);return i}function a(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,o=Math.min(t.length,e.length),i=o,r=0;n<i;)t.substring(t.length-i,t.length-r)==e.substring(e.length-i,e.length-r)?r=n=i:o=i,i=Math.floor((o-n)/2+n);return i}function s(t){t.push([0,""]);for(var e,o=0,i=0,l=0,c="",u="";o<t.length;)switch(t[o][0]){case 1:l++,u+=t[o][1],o++;break;case n:i++,c+=t[o][1],o++;break;case 0:i+l>1?(0!==i&&0!==l&&(0!==(e=r(u,c))&&(o-i-l>0&&0==t[o-i-l-1][0]?t[o-i-l-1][1]+=u.substring(0,e):(t.splice(0,0,[0,u.substring(0,e)]),o++),u=u.substring(e),c=c.substring(e)),0!==(e=a(u,c))&&(t[o][1]=u.substring(u.length-e)+t[o][1],u=u.substring(0,u.length-e),c=c.substring(0,c.length-e))),0===i?t.splice(o-l,i+l,[1,u]):0===l?t.splice(o-i,i+l,[n,c]):t.splice(o-i-l,i+l,[n,c],[1,u]),o=o-i-l+(i?1:0)+(l?1:0)+1):0!==o&&0==t[o-1][0]?(t[o-1][1]+=t[o][1],t.splice(o,1)):o++,l=0,i=0,c="",u=""}""===t[t.length-1][1]&&t.pop();var d=!1;for(o=1;o<t.length-1;)0==t[o-1][0]&&0==t[o+1][0]&&(t[o][1].substring(t[o][1].length-t[o-1][1].length)==t[o-1][1]?(t[o][1]=t[o-1][1]+t[o][1].substring(0,t[o][1].length-t[o-1][1].length),t[o+1][1]=t[o-1][1]+t[o+1][1],t.splice(o-1,1),d=!0):t[o][1].substring(0,t[o+1][1].length)==t[o+1][1]&&(t[o-1][1]+=t[o+1][1],t[o][1]=t[o][1].substring(t[o+1][1].length)+t[o+1][1],t.splice(o+1,1),d=!0)),o++;d&&s(t)}var l=o;function c(t,e,n){for(var o=e+n-1;o>=0&&o>=e-1;o--)if(o+1<t.length){var i=t[o],r=t[o+1];i[0]===r[1]&&t.splice(o,2,[i[0],i[1]+r[1]])}return t}l.INSERT=1,l.DELETE=n,l.EQUAL=0,t.exports=l},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}(t.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(t,e){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function o(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function i(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=n?o:i).supported=o,e.unsupported=i},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,o="~";function i(){}function r(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(o=!1)),a.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(o?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},a.prototype.listeners=function(t,e){var n=o?o+t:t,i=this._events[n];if(e)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var r=0,a=i.length,s=new Array(a);r<a;r++)s[r]=i[r].fn;return s},a.prototype.emit=function(t,e,n,i,r,a){var s=o?o+t:t;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,n),!0;case 4:return u.fn.call(u.context,e,n,i),!0;case 5:return u.fn.call(u.context,e,n,i,r),!0;case 6:return u.fn.call(u.context,e,n,i,r,a),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,h=u.length;for(c=0;c<h;c++)switch(u[c].once&&this.removeListener(t,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,e);break;case 3:u[c].fn.call(u[c].context,e,n);break;case 4:u[c].fn.call(u[c].context,e,n,i);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},a.prototype.on=function(t,e,n){var i=new r(e,n||this),a=o?o+t:t;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],i]:this._events[a].push(i):(this._events[a]=i,this._eventsCount++),this},a.prototype.once=function(t,e,n){var i=new r(e,n||this,!0),a=o?o+t:t;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],i]:this._events[a].push(i):(this._events[a]=i,this._eventsCount++),this},a.prototype.removeListener=function(t,e,n,r){var a=o?o+t:t;if(!this._events[a])return this;if(!e)return 0==--this._eventsCount?this._events=new i:delete this._events[a],this;var s=this._events[a];if(s.fn)s.fn!==e||r&&!s.once||n&&s.context!==n||(0==--this._eventsCount?this._events=new i:delete this._events[a]);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==e||r&&!s[l].once||n&&s[l].context!==n)&&c.push(s[l]);c.length?this._events[a]=1===c.length?c[0]:c:0==--this._eventsCount?this._events=new i:delete this._events[a]}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=o?o+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new i:delete this._events[e])):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prototype.setMaxListeners=function(){return this},a.prefixed=o,a.EventEmitter=a,void 0!==t&&(t.exports=a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var o="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},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=b(n(3)),s=b(n(2)),l=b(n(0)),c=b(n(5)),u=b(n(10)),d=b(n(9)),f=n(36),h=n(37),p=b(n(13)),m=n(26),v=n(38),g=n(39),y=n(40);function b(t){return t&&t.__esModule?t:{default:t}}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var w=(0,u.default)("quill:clipboard"),k="__ql-matcher",O=[[Node.TEXT_NODE,M],[Node.TEXT_NODE,$],["br",function(t,e){return E(e,"\n")||e.insert("\n"),e}],[Node.ELEMENT_NODE,$],[Node.ELEMENT_NODE,P],[Node.ELEMENT_NODE,N],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,function(t,e){var n={},o=t.style||{};return o.fontStyle&&"italic"===T(t).fontStyle&&(n.italic=!0),o.fontWeight&&(T(t).fontWeight.startsWith("bold")||parseInt(T(t).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=j(e,n)),parseFloat(o.textIndent||0)>0&&(e=(new s.default).insert("\t").concat(e)),e}],["li",function(t,e){var n=l.default.query(t);if(null==n||"list-item"!==n.blotName||!E(e,"\n"))return e;for(var o=-1,i=t.parentNode;!i.classList.contains("ql-clipboard");)"list"===(l.default.query(i)||{}).blotName&&(o+=1),i=i.parentNode;return o<=0?e:e.compose((new s.default).retain(e.length()-1).retain(1,{indent:o}))}],["b",I.bind(I,"bold")],["i",I.bind(I,"italic")],["style",function(){return new s.default}]],x=[f.AlignAttribute,v.DirectionAttribute].reduce((function(t,e){return t[e.keyName]=e,t}),{}),C=[f.AlignStyle,h.BackgroundStyle,m.ColorStyle,v.DirectionStyle,g.FontStyle,y.SizeStyle].reduce((function(t,e){return t[e.keyName]=e,t}),{}),S=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 o=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 o.quill.root.addEventListener("paste",o.onPaste.bind(o)),o.container=o.quill.addContainer("ql-clipboard"),o.container.setAttribute("contenteditable",!0),o.container.setAttribute("tabindex",-1),o.matchers=[],O.concat(o.options.matchers).forEach((function(t){var e=i(t,2),r=e[0],a=e[1];(n.matchVisual||a!==N)&&o.addMatcher(r,a)})),o}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:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\</g,"><"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[p.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,_({},p.default.blotName,e[p.default.blotName]))}var o=this.prepareMatching(),r=i(o,2),a=r[0],l=r[1],c=A(this.container,a,l);return E(c,"\n")&&null==c.ops[c.ops.length-1].attributes&&(c=c.compose((new s.default).retain(c.length()-1).delete(1))),w.log("convert",this.container.innerHTML,c),this.container.innerHTML="",c}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,c.default.sources.SILENT);else{var o=this.convert(e);this.quill.updateContents((new s.default).retain(t).concat(o),n),this.quill.setSelection(t+o.length(),c.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),o=(new s.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(c.default.sources.SILENT),setTimeout((function(){o=o.concat(e.convert()).delete(n.length),e.quill.updateContents(o,c.default.sources.USER),e.quill.setSelection(o.length()-n.length,c.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=i,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(o){var r=i(o,2),a=r[0],s=r[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(a),(function(t){t[k]=t[k]||[],t[k].push(s)}))}})),[e,n]}}]),e}(d.default);function j(t,e,n){return"object"===(void 0===e?"undefined":o(e))?Object.keys(e).reduce((function(t,n){return j(t,n,e[n])}),t):t.reduce((function(t,o){return o.attributes&&o.attributes[e]?t.push(o):t.insert(o.insert,(0,a.default)({},_({},e,n),o.attributes))}),new s.default)}function T(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};var e="__ql-computed-style";return t[e]||(t[e]=window.getComputedStyle(t))}function E(t,e){for(var n="",o=t.ops.length-1;o>=0&&n.length<e.length;--o){var i=t.ops[o];if("string"!=typeof i.insert)break;n=i.insert+n}return n.slice(-1*e.length)===e}function D(t){if(0===t.childNodes.length)return!1;var e=T(t);return["block","list-item"].indexOf(e.display)>-1}function A(t,e,n){return t.nodeType===t.TEXT_NODE?n.reduce((function(e,n){return n(t,e)}),new s.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],(function(o,i){var r=A(i,e,n);return i.nodeType===t.ELEMENT_NODE&&(r=e.reduce((function(t,e){return e(i,t)}),r),r=(i[k]||[]).reduce((function(t,e){return e(i,t)}),r)),o.concat(r)}),new s.default):new s.default}function I(t,e,n){return j(n,t,!0)}function L(t,e){var n=l.default.Attributor.Attribute.keys(t),o=l.default.Attributor.Class.keys(t),i=l.default.Attributor.Style.keys(t),r={};return n.concat(o).concat(i).forEach((function(e){var n=l.default.query(e,l.default.Scope.ATTRIBUTE);null!=n&&(r[n.attrName]=n.value(t),r[n.attrName])||(null==(n=x[e])||n.attrName!==e&&n.keyName!==e||(r[n.attrName]=n.value(t)||void 0),null==(n=C[e])||n.attrName!==e&&n.keyName!==e||(n=C[e],r[n.attrName]=n.value(t)||void 0))})),Object.keys(r).length>0&&(e=j(e,r)),e}function P(t,e){var n=l.default.query(t);if(null==n)return e;if(n.prototype instanceof l.default.Embed){var o={},i=n.value(t);null!=i&&(o[n.blotName]=i,e=(new s.default).insert(o,n.formats(t)))}else"function"==typeof n.formats&&(e=j(e,n.blotName,n.formats(t)));return e}function $(t,e){return E(e,"\n")||(D(t)||e.length()>0&&t.nextSibling&&D(t.nextSibling))&&e.insert("\n"),e}function N(t,e){if(D(t)&&null!=t.nextElementSibling&&!E(e,"\n\n")){var n=t.offsetHeight+parseFloat(T(t).marginTop)+parseFloat(T(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function M(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!T(t.parentNode).whiteSpace.startsWith("pre")){var o=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,o.bind(o,!0)),(null==t.previousSibling&&D(t.parentNode)||null!=t.previousSibling&&D(t.previousSibling))&&(n=n.replace(/^\s+/,o.bind(o,!1))),(null==t.nextSibling&&D(t.parentNode)||null!=t.nextSibling&&D(t.nextSibling))&&(n=n.replace(/\s+$/,o.bind(o,!1)))}return e.insert(n)}S.DEFAULTS={matchers:[],matchVisual:!0},e.default=S,e.matchAttributor=L,e.matchBlot=P,e.matchNewline=$,e.matchSpacing=N,e.matchText=M},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},a=n(6);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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 c=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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),i(e,[{key:"optimize",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),e}(((o=a)&&o.__esModule?o:{default:o}).default);c.blotName="bold",c.tagName=["STRONG","B"],e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=u(n(2)),a=u(n(0)),s=u(n(5)),l=u(n(10)),c=u(n(9));function u(t){return t&&t.__esModule?t:{default:t}}function d(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 f=(0,l.default)("quill:toolbar"),h=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 i,r=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(Array.isArray(r.options.container)){var a=document.createElement("div");m(a,r.options.container),t.container.parentNode.insertBefore(a,t.container),r.container=a}else"string"==typeof r.options.container?r.container=document.querySelector(r.options.container):r.container=r.options.container;return r.container instanceof HTMLElement?(r.container.classList.add("ql-toolbar"),r.controls=[],r.handlers={},Object.keys(r.options.handlers).forEach((function(t){r.addHandler(t,r.options.handlers[t])})),[].forEach.call(r.container.querySelectorAll("button, select"),(function(t){r.attach(t)})),r.quill.on(s.default.events.EDITOR_CHANGE,(function(t,e){t===s.default.events.SELECTION_CHANGE&&r.update(e)})),r.quill.on(s.default.events.SCROLL_OPTIMIZE,(function(){var t=r.quill.selection.getRange(),e=o(t,1)[0];r.update(e)})),r):(i=f.error("Container required for toolbar",r.options),d(r,i))}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),i(e,[{key:"addHandler",value:function(t,e){this.handlers[t]=e}},{key:"attach",value:function(t){var e=this,n=[].find.call(t.classList,(function(t){return 0===t.indexOf("ql-")}));if(n){if(n=n.slice("ql-".length),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void f.warn("ignoring attaching to disabled format",n,t);if(null==a.default.query(n))return void f.warn("ignoring attaching to nonexistent format",n,t)}var i="SELECT"===t.tagName?"change":"click";t.addEventListener(i,(function(i){var l=void 0;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;var c=t.options[t.selectedIndex];l=!c.hasAttribute("selected")&&(c.value||!1)}else l=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),i.preventDefault();e.quill.focus();var u=e.quill.selection.getRange(),d=o(u,1)[0];if(null!=e.handlers[n])e.handlers[n].call(e,l);else if(a.default.query(n).prototype instanceof a.default.Embed){if(!(l=prompt("Enter "+n)))return;e.quill.updateContents((new r.default).retain(d.index).delete(d.length).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,l)),s.default.sources.USER)}else e.quill.format(n,l,s.default.sources.USER);e.update(d)})),this.controls.push([n,t])}}},{key:"update",value:function(t){var e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((function(n){var i=o(n,2),r=i[0],a=i[1];if("SELECT"===a.tagName){var s=void 0;if(null==t)s=null;else if(null==e[r])s=a.querySelector("option[selected]");else if(!Array.isArray(e[r])){var l=e[r];"string"==typeof l&&(l=l.replace(/\"/g,'\\"')),s=a.querySelector('option[value="'+l+'"]')}null==s?(a.value="",a.selectedIndex=-1):s.selected=!0}else if(null==t)a.classList.remove("ql-active");else if(a.hasAttribute("value")){var c=e[r]===a.getAttribute("value")||null!=e[r]&&e[r].toString()===a.getAttribute("value")||null==e[r]&&!a.getAttribute("value");a.classList.toggle("ql-active",c)}else a.classList.toggle("ql-active",null!=e[r])}))}}]),e}(c.default);function p(t,e,n){var o=document.createElement("button");o.setAttribute("type","button"),o.classList.add("ql-"+e),null!=n&&(o.value=n),t.appendChild(o)}function m(t,e){Array.isArray(e[0])||(e=[e]),e.forEach((function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach((function(t){if("string"==typeof t)p(n,t);else{var e=Object.keys(t)[0],o=t[e];Array.isArray(o)?function(t,e,n){var o=document.createElement("select");o.classList.add("ql-"+e),n.forEach((function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),o.appendChild(e)})),t.appendChild(o)}(n,e,o):p(n,e,o)}})),t.appendChild(n)}))}h.DEFAULTS={},h.DEFAULTS={container:null,handlers:{clean:function(){var t=this,e=this.quill.getSelection();if(null!=e)if(0==e.length){var n=this.quill.getFormat();Object.keys(n).forEach((function(e){null!=a.default.query(e,a.default.Scope.INLINE)&&t.quill.format(e,!1)}))}else this.quill.removeFormat(e,s.default.sources.USER)},direction:function(t){var e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",s.default.sources.USER):t||"right"!==e||this.quill.format("align",!1,s.default.sources.USER),this.quill.format("direction",t,s.default.sources.USER)},indent:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e),o=parseInt(n.indent||0);if("+1"===t||"-1"===t){var i="+1"===t?1:-1;"rtl"===n.direction&&(i*=-1),this.quill.format("indent",o+i,s.default.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,s.default.sources.USER)},list:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,s.default.sources.USER):this.quill.format("list","unchecked",s.default.sources.USER):this.quill.format("list",t,s.default.sources.USER)}}},e.default=h,e.addControls=m},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},a=n(28),s=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 o=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));return o.label.innerHTML=n,o.container.classList.add("ql-color-picker"),[].slice.call(o.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(t){t.classList.add("ql-primary")})),o}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),i(e,[{key:"buildItem",value:function(t){var n=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"buildItem",this).call(this,t);return n.style.backgroundColor=t.getAttribute("value")||"",n}},{key:"selectItem",value:function(t,n){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n);var o=this.label.querySelector(".ql-color-label"),i=t&&t.getAttribute("data-value")||"";o&&("line"===o.tagName?o.style.stroke=i:o.style.fill=i)}}]),e}(((o=a)&&o.__esModule?o:{default:o}).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},a=n(28),s=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 o=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));return o.container.classList.add("ql-icon-picker"),[].forEach.call(o.container.querySelectorAll(".ql-picker-item"),(function(t){t.innerHTML=n[t.getAttribute("data-value")||""]})),o.defaultItem=o.container.querySelector(".ql-selected"),o.selectItem(o.defaultItem),o}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),i(e,[{key:"selectItem",value:function(t,n){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}}]),e}(((o=a)&&o.__esModule?o:{default:o}).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function(){function t(e,n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.boundsContainer=n||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",(function(){o.root.style.marginTop=-1*o.quill.root.scrollTop+"px"})),this.hide()}return o(t,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var o=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),r=0;if(i.right>o.right&&(r=o.right-i.right,this.root.style.left=e+r+"px"),i.left<o.left&&(r=o.left-i.left,this.root.style.left=e+r+"px"),i.bottom>o.bottom){var a=i.bottom-i.top,s=t.bottom-t.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return r}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=h(n(3)),s=h(n(8)),l=n(43),c=h(l),u=h(n(27)),d=n(15),f=h(n(41));function h(t){return t&&t.__esModule?t:{default:t}}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(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 v(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)}var g=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],y=function(t){function e(t,n){p(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=g);var o=m(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.quill.container.classList.add("ql-snow"),o}return v(e,t),r(e,[{key:"extendToolbar",value:function(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),f.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),f.default),this.tooltip=new b(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(e,n){t.handlers.link.call(t,!n.format.link)}))}}]),e}(c.default);y.DEFAULTS=(0,a.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){var e=this.quill.getSelection();if(null==e||0==e.length)return;var n=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var b=function(t){function e(t,n){p(this,e);var o=m(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.preview=o.root.querySelector("a.ql-preview"),o}return v(e,t),r(e,[{key:"listen",value:function(){var t=this;i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",(function(e){t.root.classList.contains("ql-editing")?t.save():t.edit("link",t.preview.textContent),e.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(function(e){if(null!=t.linkRange){var n=t.linkRange;t.restoreFocus(),t.quill.formatText(n,"link",!1,s.default.sources.USER),delete t.linkRange}e.preventDefault(),t.hide()})),this.quill.on(s.default.events.SELECTION_CHANGE,(function(e,n,i){if(null!=e){if(0===e.length&&i===s.default.sources.USER){var r=t.quill.scroll.descendant(u.default,e.index),a=o(r,2),l=a[0],c=a[1];if(null!=l){t.linkRange=new d.Range(e.index-c,l.length());var f=u.default.formats(l.domNode);return t.preview.textContent=f,t.preview.setAttribute("href",f),t.show(),void t.position(t.quill.getBounds(t.linkRange))}}else delete t.linkRange;t.hide()}}))}},{key:"show",value:function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),e}(l.BaseTooltip);b.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=$(n(29)),i=n(36),r=n(38),a=n(64),s=$(n(65)),l=$(n(66)),c=n(67),u=$(c),d=n(37),f=n(26),h=n(39),p=n(40),m=$(n(56)),v=$(n(68)),g=$(n(27)),y=$(n(69)),b=$(n(70)),_=$(n(71)),w=$(n(72)),k=$(n(73)),O=n(13),x=$(O),C=$(n(74)),S=$(n(75)),j=$(n(57)),T=$(n(41)),E=$(n(28)),D=$(n(59)),A=$(n(60)),I=$(n(61)),L=$(n(108)),P=$(n(62));function $(t){return t&&t.__esModule?t:{default:t}}o.default.register({"attributors/attribute/direction":r.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":f.ColorClass,"attributors/class/direction":r.DirectionClass,"attributors/class/font":h.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":f.ColorStyle,"attributors/style/direction":r.DirectionStyle,"attributors/style/font":h.FontStyle,"attributors/style/size":p.SizeStyle},!0),o.default.register({"formats/align":i.AlignClass,"formats/direction":r.DirectionClass,"formats/indent":a.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":f.ColorStyle,"formats/font":h.FontClass,"formats/size":p.SizeClass,"formats/blockquote":s.default,"formats/code-block":x.default,"formats/header":l.default,"formats/list":u.default,"formats/bold":m.default,"formats/code":O.Code,"formats/italic":v.default,"formats/link":g.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":_.default,"formats/image":w.default,"formats/video":k.default,"formats/list/item":c.ListItem,"modules/formula":C.default,"modules/syntax":S.default,"modules/toolbar":j.default,"themes/bubble":L.default,"themes/snow":P.default,"ui/icons":T.default,"ui/picker":E.default,"ui/icon-picker":A.default,"ui/color-picker":D.default,"ui/tooltip":I.default},!0),e.default=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},a=n(0),s=(o=a)&&o.__esModule?o:{default:o};function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 u=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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),i(e,[{key:"add",value:function(t,n){if("+1"===n||"-1"===n){var o=this.value(t)||0;n="+1"===n?o+1:o-1}return 0===n?(this.remove(t),!0):r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"add",this).call(this,t,n)}},{key:"canAdd",value:function(t,n){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,n)||r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,parseInt(n))}},{key:"value",value:function(t){return parseInt(r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t))||void 0}}]),e}(s.default.Attributor.Class),d=new u("indent","ql-indent",{scope:s.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});e.IndentClass=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(4);function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 s=function(t){function e(){return r(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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}(((o=i)&&o.__esModule?o:{default:o}).default);s.blotName="blockquote",s.tagName="blockquote",e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=n(4);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 l=function(t){function e(){return a(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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),i(e,null,[{key:"formats",value:function(t){return this.tagName.indexOf(t.tagName)+1}}]),e}(((o=r)&&o.__esModule?o:{default:o}).default);l.blotName="header",l.tagName=["H1","H2","H3","H4","H5","H6"],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ListItem=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},r=l(n(0)),a=l(n(4)),s=l(n(25));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 d(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)}var f=function(t){function e(){return c(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,t),o(e,[{key:"format",value:function(t,n){t!==h.blotName||n?i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n):this.replaceWith(r.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(t,n){return this.parent.isolate(this.offset(this.parent),this.length()),t===this.parent.statics.blotName?(this.parent.replaceWith(t,n),this):(this.parent.unwrap(),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t,n))}}],[{key:"formats",value:function(t){return t.tagName===this.tagName?void 0:i(e.__proto__||Object.getPrototypeOf(e),"formats",this).call(this,t)}}]),e}(a.default);f.blotName="list-item",f.tagName="LI";var h=function(t){function e(t){c(this,e);var n=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),o=function(e){if(e.target.parentNode===t){var o=n.statics.formats(t),i=r.default.find(e.target);"checked"===o?i.format("list","unchecked"):"unchecked"===o&&i.format("list","checked")}};return t.addEventListener("touchstart",o),t.addEventListener("mousedown",o),n}return d(e,t),o(e,null,[{key:"create",value:function(t){var n="ordered"===t?"OL":"UL",o=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,n);return"checked"!==t&&"unchecked"!==t||o.setAttribute("data-checked","checked"===t),o}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?t.hasAttribute("data-checked")?"true"===t.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),o(e,[{key:"format",value:function(t,e){this.children.length>0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof f)i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var o=null==n?this.length():n.offset(this),r=this.split(o);r.parent.insertBefore(t,r)}}},{key:"optimize",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=r.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(s.default);h.blotName="list",h.scope=r.default.Scope.BLOCK_BLOT,h.tagName=["OL","UL"],h.defaultChild="list-item",h.allowedChildren=[f],e.ListItem=f,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(56);function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 s=function(t){function e(){return r(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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}(((o=i)&&o.__esModule?o:{default:o}).default);s.blotName="italic",s.tagName=["EM","I"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},a=n(6);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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 c=function(t){function e(){return s(this,e),l(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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),i(e,null,[{key:"create",value:function(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)}},{key:"formats",value:function(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}]),e}(((o=a)&&o.__esModule?o:{default:o}).default);c.blotName="script",c.tagName=["SUB","SUP"],e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(6);function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 s=function(t){function e(){return r(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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}(((o=i)&&o.__esModule?o:{default:o}).default);s.blotName="strike",s.tagName="S",e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(6);function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 s=function(t){function e(){return r(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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}(((o=i)&&o.__esModule?o:{default:o}).default);s.blotName="underline",s.tagName="U",e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},a=n(0),s=(o=a)&&o.__esModule?o:{default:o},l=n(27);function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 d=["alt","height","width"],f=function(t){function e(){return c(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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),i(e,[{key:"format",value:function(t,n){d.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return d.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,l.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(s.default.Embed);f.blotName="image",f.tagName="IMG",e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},a=n(4),s=n(27),l=(o=s)&&o.__esModule?o:{default:o};function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 d=["height","width"],f=function(t){function e(){return c(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}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),i(e,[{key:"format",value:function(t,n){d.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return d.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return l.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(a.BlockEmbed);f.blotName="video",f.className="ql-video",f.tagName="IFRAME",e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},r=l(n(35)),a=l(n(5)),s=l(n(9));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 d(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)}var f=function(t){function e(){return c(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,t),o(e,null,[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}},{key:"value",value:function(t){return t.getAttribute("data-value")}}]),e}(r.default);f.blotName="formula",f.className="ql-formula",f.tagName="SPAN";var h=function(t){function e(){c(this,e);var t=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return t}return d(e,t),o(e,null,[{key:"register",value:function(){a.default.register(f,!0)}}]),e}(s.default);e.FormulaBlot=f,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CodeToken=e.CodeBlock=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},r=l(n(0)),a=l(n(5)),s=l(n(9));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 d(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)}var f=function(t){function e(){return c(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,t),o(e,[{key:"replaceWith",value:function(t){this.domNode.textContent=this.domNode.textContent,this.attach(),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t)}},{key:"highlight",value:function(t){var e=this.domNode.textContent;this.cachedText!==e&&((e.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(l(n(13)).default);f.className="ql-syntax";var h=new r.default.Attributor.Class("token","hljs",{scope:r.default.Scope.INLINE}),p=function(t){function e(t,n){c(this,e);var o=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof o.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return o.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(i),i=setTimeout((function(){o.highlight(),i=null}),o.options.interval)})),o.highlight(),o}return d(e,t),o(e,null,[{key:"register",value:function(){a.default.register(h,!0),a.default.register(f,!0)}}]),o(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(f).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(a.default.sources.SILENT),null!=e&&this.quill.setSelection(e,a.default.sources.SILENT)}}}]),e}(s.default);p.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=f,e.CodeToken=h,e.default=p},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var o=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=d(n(3)),a=d(n(8)),s=n(43),l=d(s),c=n(15),u=d(n(41));function d(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(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 p(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)}var m=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],v=function(t){function e(t,n){f(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=m);var o=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.quill.container.classList.add("ql-bubble"),o}return p(e,t),i(e,[{key:"extendToolbar",value:function(t){this.tooltip=new g(this.quill,this.options.bounds),this.tooltip.root.appendChild(t.container),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),u.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),u.default)}}]),e}(l.default);v.DEFAULTS=(0,r.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var g=function(t){function e(t,n){f(this,e);var o=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.quill.on(a.default.events.EDITOR_CHANGE,(function(t,e,n,i){if(t===a.default.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&i===a.default.sources.USER){o.show(),o.root.style.left="0px",o.root.style.width="",o.root.style.width=o.root.offsetWidth+"px";var r=o.quill.getLines(e.index,e.length);if(1===r.length)o.position(o.quill.getBounds(e));else{var s=r[r.length-1],l=o.quill.getIndex(s),u=Math.min(s.length()-1,e.index+e.length-l),d=o.quill.getBounds(new c.Range(l,u));o.position(d)}}else document.activeElement!==o.textbox&&o.quill.hasFocus()&&o.hide()})),o}return p(e,t),i(e,[{key:"listen",value:function(){var t=this;o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),e}(s.BaseTooltip);g.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),e.BubbleTooltip=g,e.default=v},function(t,e,n){t.exports=n(63)}]).default},t.exports=o()},51474:(t,e,n)=>{"use strict";function o(t){return o="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(t)}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(){return r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},r.apply(this,arguments)}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),o.forEach((function(e){i(t,e,n[e])}))}return t}function s(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function l(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.r(e),n.d(e,{MultiDrag:()=>be,Sortable:()=>Bt,Swap:()=>le,default:()=>ke});function c(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var u=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),d=c(/Edge/i),f=c(/firefox/i),h=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),p=c(/iP(ad|od|hone)/i),m=c(/chrome/i)&&c(/android/i),v={capture:!1,passive:!1};function g(t,e,n){t.addEventListener(e,n,!u&&v)}function y(t,e,n){t.removeEventListener(e,n,!u&&v)}function b(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function _(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function w(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&b(t,e):b(t,e))||o&&t===n)return t;if(t===n)break}while(t=_(t))}return null}var k,O=/\s+/g;function x(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(O," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(O," ")}}function C(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function S(t,e){var n="";if("string"==typeof t)n=t;else do{var o=C(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function j(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function T(){var t=document.scrollingElement;return t||document.documentElement}function E(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,s,l,c,d,f;if(t!==window&&t!==T()?(a=(r=t.getBoundingClientRect()).top,s=r.left,l=r.bottom,c=r.right,d=r.height,f=r.width):(a=0,s=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,f=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!u))do{if(i&&i.getBoundingClientRect&&("none"!==C(i,"transform")||n&&"static"!==C(i,"position"))){var h=i.getBoundingClientRect();a-=h.top+parseInt(C(i,"border-top-width")),s-=h.left+parseInt(C(i,"border-left-width")),l=a+r.height,c=s+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var p=S(i||t),m=p&&p.a,v=p&&p.d;p&&(l=(a/=v)+(d/=v),c=(s/=m)+(f/=m))}return{top:a,left:s,bottom:l,right:c,width:f,height:d}}}function D(t,e,n){for(var o=$(t,!0),i=E(t)[e];o;){var r=E(o)[n];if(!("top"===n||"left"===n?i>=r:i<=r))return o;if(o===T())break;o=$(o,!1)}return!1}function A(t,e,n){for(var o=0,i=0,r=t.children;i<r.length;){if("none"!==r[i].style.display&&r[i]!==Bt.ghost&&r[i]!==Bt.dragged&&w(r[i],n.draggable,t,!1)){if(o===e)return r[i];o++}i++}return null}function I(t,e){for(var n=t.lastElementChild;n&&(n===Bt.ghost||"none"===C(n,"display")||e&&!b(n,e));)n=n.previousElementSibling;return n||null}function L(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Bt.clone||e&&!b(t,e)||n++;return n}function P(t){var e=0,n=0,o=T();if(t)do{var i=S(t),r=i.a,a=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*a}while(t!==o&&(t=t.parentNode));return[e,n]}function $(t,e){if(!t||!t.getBoundingClientRect)return T();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=C(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return T();if(o||e)return n;o=!0}}}while(n=n.parentNode);return T()}function N(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function M(t,e){return function(){if(!k){var n=arguments,o=this;1===n.length?t.call(o,n[0]):t.apply(o,n),k=setTimeout((function(){k=void 0}),e)}}}function q(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function R(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function B(t,e){C(t,"position","absolute"),C(t,"top",e.top),C(t,"left",e.left),C(t,"width",e.width),C(t,"height",e.height)}function F(t){C(t,"position",""),C(t,"top",""),C(t,"left",""),C(t,"width",""),C(t,"height","")}var U="Sortable"+(new Date).getTime();function z(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==C(t,"display")&&t!==Bt.ghost){e.push({target:t,rect:E(t)});var n=a({},e[e.length-1].rect);if(t.thisAnimationDuration){var o=S(t,!0);o&&(n.top-=o.f,n.left-=o.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var i=!1,r=0;e.forEach((function(t){var e=0,n=t.target,a=n.fromRect,s=E(n),l=n.prevFromRect,c=n.prevToRect,u=t.rect,d=S(n,!0);d&&(s.top-=d.f,s.left-=d.e),n.toRect=s,n.thisAnimationDuration&&N(l,s)&&!N(a,s)&&(u.top-s.top)/(u.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(e=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(u,l,c,o.options)),N(s,a)||(n.prevFromRect=a,n.prevToRect=s,e||(e=o.options.animation),o.animate(n,u,s,e)),e&&(i=!0,r=Math.max(r,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"==typeof n&&n()}),r):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,o){if(o){C(t,"transition",""),C(t,"transform","");var i=S(this.el),r=i&&i.a,a=i&&i.d,s=(e.left-n.left)/(r||1),l=(e.top-n.top)/(a||1);t.animatingX=!!s,t.animatingY=!!l,C(t,"transform","translate3d("+s+"px,"+l+"px,0)"),function(t){t.offsetWidth}(t),C(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),C(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){C(t,"transition",""),C(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}var H=[],V={initializeByDefault:!0},W={mount:function(t){for(var e in V)V.hasOwnProperty(e)&&!(e in t)&&(t[e]=V[e]);H.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=t+"Global";H.forEach((function(o){e[o.pluginName]&&(e[o.pluginName][i]&&e[o.pluginName][i](a({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](a({sortable:e},n)))}))},initializePlugins:function(t,e,n,o){for(var i in H.forEach((function(o){var i=o.pluginName;if(t.options[i]||o.initializeByDefault){var a=new o(t,e,t.options);a.sortable=t,a.options=t.options,t[i]=a,r(n,a.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var a=this.modifyOption(t,i,t.options[i]);void 0!==a&&(t.options[i]=a)}},getEventProperties:function(t,e){var n={};return H.forEach((function(o){"function"==typeof o.eventProperties&&r(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return H.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};function K(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,s=t.toEl,l=t.fromEl,c=t.oldIndex,f=t.newIndex,h=t.oldDraggableIndex,p=t.newDraggableIndex,m=t.originalEvent,v=t.putSortable,g=t.extraEventProperties;if(e=e||n&&n[U]){var y,b=e.options,_="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||u||d?(y=document.createEvent("Event")).initEvent(o,!0,!0):y=new CustomEvent(o,{bubbles:!0,cancelable:!0}),y.to=s||n,y.from=l||n,y.item=i||n,y.clone=r,y.oldIndex=c,y.newIndex=f,y.oldDraggableIndex=h,y.newDraggableIndex=p,y.originalEvent=m,y.pullMode=v?v.lastPutMode:void 0;var w=a({},g,W.getEventProperties(o,e));for(var k in w)y[k]=w[k];n&&n.dispatchEvent(y),b[_]&&b[_].call(e,y)}}var Y=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=s(n,["evt"]);W.pluginEvent.bind(Bt)(t,e,a({dragEl:G,parentEl:X,ghostEl:Q,rootEl:J,nextEl:tt,lastDownEl:et,cloneEl:nt,cloneHidden:ot,dragStarted:vt,putSortable:ct,activeSortable:Bt.active,originalEvent:o,oldIndex:it,oldDraggableIndex:at,newIndex:rt,newDraggableIndex:st,hideGhostForTarget:Nt,unhideGhostForTarget:Mt,cloneNowHidden:function(){ot=!0},cloneNowShown:function(){ot=!1},dispatchSortableEvent:function(t){Z({sortable:e,name:t,originalEvent:o})}},i))};function Z(t){K(a({putSortable:ct,cloneEl:nt,targetEl:G,rootEl:J,oldIndex:it,oldDraggableIndex:at,newIndex:rt,newDraggableIndex:st},t))}var G,X,Q,J,tt,et,nt,ot,it,rt,at,st,lt,ct,ut,dt,ft,ht,pt,mt,vt,gt,yt,bt,_t,wt=!1,kt=!1,Ot=[],xt=!1,Ct=!1,St=[],jt=!1,Tt=[],Et="undefined"!=typeof document,Dt=p,At=d||u?"cssFloat":"float",It=Et&&!m&&!p&&"draggable"in document.createElement("div"),Lt=function(){if(Et){if(u)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Pt=function(t,e){var n=C(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=A(t,0,e),r=A(t,1,e),a=i&&C(i),s=r&&C(r),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+E(i).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+E(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!r||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=o&&"none"===n[At]||r&&"none"===n[At]&&l+c>o)?"vertical":"horizontal"},$t=function(t){function e(t,n){return function(o,i,r,a){var s=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,a),n)(o,i,r,a);var l=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},i=t.group;i&&"object"==o(i)||(i={name:i}),n.name=i.name,n.checkPull=e(i.pull,!0),n.checkPut=e(i.put),n.revertClone=i.revertClone,t.group=n},Nt=function(){!Lt&&Q&&C(Q,"display","none")},Mt=function(){!Lt&&Q&&C(Q,"display","")};Et&&document.addEventListener("click",(function(t){if(kt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),kt=!1,!1}),!0);var qt=function(t){if(G){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,Ot.some((function(t){if(!I(t)){var e=E(t),n=t[U].options.emptyInsertThreshold,o=i>=e.left-n&&i<=e.right+n,s=r>=e.top-n&&r<=e.bottom+n;return n&&o&&s?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[U]._onDragOver(n)}}var i,r,a},Rt=function(t){G&&G.parentNode[U]._isOutsideThisEl(t.target)};function Bt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=r({},e),t[U]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Bt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var o in W.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var i in $t(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&It,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?g(t,"pointerdown",this._onTapStart):(g(t,"mousedown",this._onTapStart),g(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(g(t,"dragover",this),g(t,"dragenter",this)),Ot.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),r(this,z())}function Ft(t,e,n,o,i,r,a,s){var l,c,f=t[U],h=f.options.onMove;return!window.CustomEvent||u||d?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=i||e,l.relatedRect=r||E(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),h&&(c=h.call(f,l,a)),c}function Ut(t){t.draggable=!1}function zt(){jt=!1}function Ht(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Vt(t){return setTimeout(t,0)}function Wt(t){return clearTimeout(t)}Bt.prototype={constructor:Bt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(gt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,G):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=o.filter;if(function(t){Tt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Tt.push(o)}}(n),!G&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled||l.isContentEditable||(s=w(s,o.draggable,n,!1))&&s.animated||et===s)){if(it=L(s),at=L(s,o.draggable),"function"==typeof c){if(c.call(this,t,s,this))return Z({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),Y("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=w(l,o.trim(),n,!1))return Z({sortable:e,rootEl:o,name:"filter",targetEl:s,fromEl:n,toEl:n}),Y("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!w(l,o.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,s=r.ownerDocument;if(n&&!G&&n.parentNode===r){var l=E(n);if(J=r,X=(G=n).parentNode,tt=G.nextSibling,et=n,lt=a.group,Bt.dragged=G,ut={target:G,clientX:(e||t).clientX,clientY:(e||t).clientY},pt=ut.clientX-l.left,mt=ut.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,G.style["will-change"]="all",o=function(){Y("delayEnded",i,{evt:t}),Bt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!f&&i.nativeDraggable&&(G.draggable=!0),i._triggerDragStart(t,e),Z({sortable:i,name:"choose",originalEvent:t}),x(G,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){j(G,t.trim(),Ut)})),g(s,"dragover",qt),g(s,"mousemove",qt),g(s,"touchmove",qt),g(s,"mouseup",i._onDrop),g(s,"touchend",i._onDrop),g(s,"touchcancel",i._onDrop),f&&this.nativeDraggable&&(this.options.touchStartThreshold=4,G.draggable=!0),Y("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(d||u))o();else{if(Bt.eventCanceled)return void this._onDrop();g(s,"mouseup",i._disableDelayedDrag),g(s,"touchend",i._disableDelayedDrag),g(s,"touchcancel",i._disableDelayedDrag),g(s,"mousemove",i._delayedDragTouchMoveHandler),g(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&g(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){G&&Ut(G),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._disableDelayedDrag),y(t,"touchend",this._disableDelayedDrag),y(t,"touchcancel",this._disableDelayedDrag),y(t,"mousemove",this._delayedDragTouchMoveHandler),y(t,"touchmove",this._delayedDragTouchMoveHandler),y(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?g(document,"pointermove",this._onTouchMove):g(document,e?"touchmove":"mousemove",this._onTouchMove):(g(G,"dragend",this),g(J,"dragstart",this._onDragStart));try{document.selection?Vt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(wt=!1,J&&G){Y("dragStarted",this,{evt:e}),this.nativeDraggable&&g(document,"dragover",Rt);var n=this.options;!t&&x(G,n.dragClass,!1),x(G,n.ghostClass,!0),Bt.active=this,t&&this._appendGhost(),Z({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(dt){this._lastX=dt.clientX,this._lastY=dt.clientY,Nt();for(var t=document.elementFromPoint(dt.clientX,dt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(dt.clientX,dt.clientY))!==e;)e=t;if(G.parentNode[U]._isOutsideThisEl(t),e)do{if(e[U]){if(e[U]._onDragOver({clientX:dt.clientX,clientY:dt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Mt()}},_onTouchMove:function(t){if(ut){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=Q&&S(Q,!0),a=Q&&r&&r.a,s=Q&&r&&r.d,l=Dt&&_t&&P(_t),c=(i.clientX-ut.clientX+o.x)/(a||1)+(l?l[0]-St[0]:0)/(a||1),u=(i.clientY-ut.clientY+o.y)/(s||1)+(l?l[1]-St[1]:0)/(s||1);if(!Bt.active&&!wt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(Q){r?(r.e+=c-(ft||0),r.f+=u-(ht||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");C(Q,"webkitTransform",d),C(Q,"mozTransform",d),C(Q,"msTransform",d),C(Q,"transform",d),ft=c,ht=u,dt=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Q){var t=this.options.fallbackOnBody?document.body:J,e=E(G,!0,Dt,!0,t),n=this.options;if(Dt){for(_t=t;"static"===C(_t,"position")&&"none"===C(_t,"transform")&&_t!==document;)_t=_t.parentNode;_t!==document.body&&_t!==document.documentElement?(_t===document&&(_t=T()),e.top+=_t.scrollTop,e.left+=_t.scrollLeft):_t=T(),St=P(_t)}x(Q=G.cloneNode(!0),n.ghostClass,!1),x(Q,n.fallbackClass,!0),x(Q,n.dragClass,!0),C(Q,"transition",""),C(Q,"transform",""),C(Q,"box-sizing","border-box"),C(Q,"margin",0),C(Q,"top",e.top),C(Q,"left",e.left),C(Q,"width",e.width),C(Q,"height",e.height),C(Q,"opacity","0.8"),C(Q,"position",Dt?"absolute":"fixed"),C(Q,"zIndex","100000"),C(Q,"pointerEvents","none"),Bt.ghost=Q,t.appendChild(Q),C(Q,"transform-origin",pt/parseInt(Q.style.width)*100+"% "+mt/parseInt(Q.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;Y("dragStart",this,{evt:t}),Bt.eventCanceled?this._onDrop():(Y("setupClone",this),Bt.eventCanceled||((nt=R(G)).draggable=!1,nt.style["will-change"]="",this._hideClone(),x(nt,this.options.chosenClass,!1),Bt.clone=nt),n.cloneId=Vt((function(){Y("clone",n),Bt.eventCanceled||(n.options.removeCloneOnHide||J.insertBefore(nt,G),n._hideClone(),Z({sortable:n,name:"clone"}))})),!e&&x(G,i.dragClass,!0),e?(kt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(y(document,"mouseup",n._onDrop),y(document,"touchend",n._onDrop),y(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,G)),g(document,"drop",n),C(G,"transform","translateZ(0)")),wt=!0,n._dragStartId=Vt(n._dragStarted.bind(n,e,t)),g(document,"selectstart",n),vt=!0,h&&C(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,o,i,r=this.el,s=t.target,l=this.options,c=l.group,u=Bt.active,d=lt===c,f=l.sort,h=ct||u,p=this,m=!1;if(!jt){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=w(s,l.draggable,r,!0),N("dragOver"),Bt.eventCanceled)return m;if(G.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||p._ignoreWhileAnimating===s)return R(!1);if(kt=!1,u&&!l.disabled&&(d?f||(o=!J.contains(G)):ct===this||(this.lastPutMode=lt.checkPull(this,u,G,t))&&c.checkPut(this,u,G,t))){if(i="vertical"===this._getDirection(t,s),e=E(G),N("dragOverValid"),Bt.eventCanceled)return m;if(o)return X=J,M(),this._hideClone(),N("revert"),Bt.eventCanceled||(tt?J.insertBefore(G,tt):J.appendChild(G)),R(!0);var v=I(r,l.draggable);if(!v||function(t,e,n){var o=E(I(n.el,n.options.draggable)),i=10;return e?t.clientX>o.right+i||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+i}(t,i,this)&&!v.animated){if(v===G)return R(!1);if(v&&r===t.target&&(s=v),s&&(n=E(s)),!1!==Ft(J,r,G,e,s,n,t,!!s))return M(),r.appendChild(G),X=r,B(),R(!0)}else if(s.parentNode===r){n=E(s);var g,y,b,_=G.parentNode!==r,k=!function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,a=n?e.left:e.top,s=n?e.right:e.bottom,l=n?e.width:e.height;return o===a||i===s||o+r/2===a+l/2}(G.animated&&G.toRect||e,s.animated&&s.toRect||n,i),O=i?"top":"left",S=D(s,"top","top")||D(G,"top","top"),j=S?S.scrollTop:void 0;if(gt!==s&&(y=n[O],xt=!1,Ct=!k&&l.invertSwap||_),g=function(t,e,n,o,i,r,a,s){var l=o?t.clientY:t.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,f=!1;if(!a)if(s&&bt<c*i){if(!xt&&(1===yt?l>u+c*r/2:l<d-c*r/2)&&(xt=!0),xt)f=!0;else if(1===yt?l<u+bt:l>d-bt)return-yt}else if(l>u+c*(1-i)/2&&l<d-c*(1-i)/2)return function(t){return L(G)<L(t)?1:-1}(e);if((f=f||a)&&(l<u+c*r/2||l>d-c*r/2))return l>u+c/2?1:-1;return 0}(t,s,n,i,k?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Ct,gt===s),0!==g){var T=L(G);do{T-=g,b=X.children[T]}while(b&&("none"===C(b,"display")||b===Q))}if(0===g||b===s)return R(!1);gt=s,yt=g;var A=s.nextElementSibling,P=!1,$=Ft(J,r,G,e,s,n,t,P=1===g);if(!1!==$)return 1!==$&&-1!==$||(P=1===$),jt=!0,setTimeout(zt,30),M(),P&&!A?r.appendChild(G):s.parentNode.insertBefore(G,P?A:s),S&&q(S,0,j-S.scrollTop),X=G.parentNode,void 0===y||Ct||(bt=Math.abs(y-E(s)[O])),B(),R(!0)}if(r.contains(G))return R(!1)}return!1}function N(l,c){Y(l,p,a({evt:t,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:f,fromSortable:h,target:s,completed:R,onMove:function(n,o){return Ft(J,r,G,e,n,E(n),t,o)},changed:B},c))}function M(){N("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function R(e){return N("dragOverCompleted",{insertion:e}),e&&(d?u._hideClone():u._showClone(p),p!==h&&(x(G,ct?ct.options.ghostClass:u.options.ghostClass,!1),x(G,l.ghostClass,!0)),ct!==p&&p!==Bt.active?ct=p:p===Bt.active&&ct&&(ct=null),h===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){N("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(s===G&&!G.animated||s===r&&!s.animated)&&(gt=null),l.dragoverBubble||t.rootEl||s===document||(G.parentNode[U]._isOutsideThisEl(t.target),!e&&qt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function B(){rt=L(G),st=L(G,l.draggable),Z({sortable:p,name:"change",toEl:r,newIndex:rt,newDraggableIndex:st,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){y(document,"mousemove",this._onTouchMove),y(document,"touchmove",this._onTouchMove),y(document,"pointermove",this._onTouchMove),y(document,"dragover",qt),y(document,"mousemove",qt),y(document,"touchmove",qt)},_offUpEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._onDrop),y(t,"touchend",this._onDrop),y(t,"pointerup",this._onDrop),y(t,"touchcancel",this._onDrop),y(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;rt=L(G),st=L(G,n.draggable),Y("drop",this,{evt:t}),X=G&&G.parentNode,rt=L(G),st=L(G,n.draggable),Bt.eventCanceled||(wt=!1,Ct=!1,xt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Wt(this.cloneId),Wt(this._dragStartId),this.nativeDraggable&&(y(document,"drop",this),y(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),h&&C(document.body,"user-select",""),C(G,"transform",""),t&&(vt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(J===X||ct&&"clone"!==ct.lastPutMode)&&nt&&nt.parentNode&&nt.parentNode.removeChild(nt),G&&(this.nativeDraggable&&y(G,"dragend",this),Ut(G),G.style["will-change"]="",vt&&!wt&&x(G,ct?ct.options.ghostClass:this.options.ghostClass,!1),x(G,this.options.chosenClass,!1),Z({sortable:this,name:"unchoose",toEl:X,newIndex:null,newDraggableIndex:null,originalEvent:t}),J!==X?(rt>=0&&(Z({rootEl:X,name:"add",toEl:X,fromEl:J,originalEvent:t}),Z({sortable:this,name:"remove",toEl:X,originalEvent:t}),Z({rootEl:X,name:"sort",toEl:X,fromEl:J,originalEvent:t}),Z({sortable:this,name:"sort",toEl:X,originalEvent:t})),ct&&ct.save()):rt!==it&&rt>=0&&(Z({sortable:this,name:"update",toEl:X,originalEvent:t}),Z({sortable:this,name:"sort",toEl:X,originalEvent:t})),Bt.active&&(null!=rt&&-1!==rt||(rt=it,st=at),Z({sortable:this,name:"end",toEl:X,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Y("nulling",this),J=G=X=Q=tt=nt=et=ot=ut=dt=vt=rt=st=it=at=gt=yt=ct=lt=Bt.dragged=Bt.ghost=Bt.clone=Bt.active=null,Tt.forEach((function(t){t.checked=!0})),Tt.length=ft=ht=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":G&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)w(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||Ht(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach((function(t,o){var i=n.children[o];w(i,this.options.draggable,n,!1)&&(e[t]=i)}),this),t.forEach((function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))}))},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return w(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=W.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&$t(n)},destroy:function(){Y("destroy",this);var t=this.el;t[U]=null,y(t,"mousedown",this._onTapStart),y(t,"touchstart",this._onTapStart),y(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(y(t,"dragover",this),y(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Ot.splice(Ot.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!ot){if(Y("hideClone",this),Bt.eventCanceled)return;C(nt,"display","none"),this.options.removeCloneOnHide&&nt.parentNode&&nt.parentNode.removeChild(nt),ot=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(ot){if(Y("showClone",this),Bt.eventCanceled)return;J.contains(G)&&!this.options.group.revertClone?J.insertBefore(nt,G):tt?J.insertBefore(nt,tt):J.appendChild(nt),this.options.group.revertClone&&this.animate(G,nt),C(nt,"display",""),ot=!1}}else this._hideClone()}},Et&&g(document,"touchmove",(function(t){(Bt.active||wt)&&t.cancelable&&t.preventDefault()})),Bt.utils={on:g,off:y,css:C,find:j,is:function(t,e){return!!w(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:M,closest:w,toggleClass:x,clone:R,index:L,nextTick:Vt,cancelNextTick:Wt,detectDirection:Pt,getChild:A},Bt.get=function(t){return t[U]},Bt.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Bt.utils=a({},Bt.utils,t.utils)),W.mount(t)}))},Bt.create=function(t,e){return new Bt(t,e)},Bt.version="1.10.2";var Kt,Yt,Zt,Gt,Xt,Qt,Jt=[],te=!1;function ee(){Jt.forEach((function(t){clearInterval(t.pid)})),Jt=[]}function ne(){clearInterval(Qt)}var oe,ie=M((function(t,e,n,o){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,l=e.scrollSpeed,c=T(),u=!1;Yt!==n&&(Yt=n,ee(),Kt=e.scroll,i=e.scrollFn,!0===Kt&&(Kt=$(n,!0)));var d=0,f=Kt;do{var h=f,p=E(h),m=p.top,v=p.bottom,g=p.left,y=p.right,b=p.width,_=p.height,w=void 0,k=void 0,O=h.scrollWidth,x=h.scrollHeight,S=C(h),j=h.scrollLeft,D=h.scrollTop;h===c?(w=b<O&&("auto"===S.overflowX||"scroll"===S.overflowX||"visible"===S.overflowX),k=_<x&&("auto"===S.overflowY||"scroll"===S.overflowY||"visible"===S.overflowY)):(w=b<O&&("auto"===S.overflowX||"scroll"===S.overflowX),k=_<x&&("auto"===S.overflowY||"scroll"===S.overflowY));var A=w&&(Math.abs(y-r)<=s&&j+b<O)-(Math.abs(g-r)<=s&&!!j),I=k&&(Math.abs(v-a)<=s&&D+_<x)-(Math.abs(m-a)<=s&&!!D);if(!Jt[d])for(var L=0;L<=d;L++)Jt[L]||(Jt[L]={});Jt[d].vx==A&&Jt[d].vy==I&&Jt[d].el===h||(Jt[d].el=h,Jt[d].vx=A,Jt[d].vy=I,clearInterval(Jt[d].pid),0==A&&0==I||(u=!0,Jt[d].pid=setInterval(function(){o&&0===this.layer&&Bt.active._onTouchMove(Xt);var e=Jt[this.layer].vy?Jt[this.layer].vy*l:0,n=Jt[this.layer].vx?Jt[this.layer].vx*l:0;"function"==typeof i&&"continue"!==i.call(Bt.dragged.parentNode[U],n,e,t,Xt,Jt[this.layer].el)||q(Jt[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&f!==c&&(f=$(f,!1)));te=u}}),30),re=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var l=n||i;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);s(),l&&!l.el.contains(u)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function ae(){}function se(){}function le(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){var e=t.dragEl;oe=e},dragOverValid:function(t){var e=t.completed,n=t.target,o=t.onMove,i=t.activeSortable,r=t.changed,a=t.cancel;if(i.options.swap){var s=this.sortable.el,l=this.options;if(n&&n!==s){var c=oe;!1!==o(n)?(x(n,l.swapClass,!0),oe=n):oe=null,c&&c!==oe&&x(c,l.swapClass,!1)}r(),e(!0),a()}},drop:function(t){var e=t.activeSortable,n=t.putSortable,o=t.dragEl,i=n||this.sortable,r=this.options;oe&&x(oe,r.swapClass,!1),oe&&(r.swap||n&&n.options.swap)&&o!==oe&&(i.captureAnimationState(),i!==e&&e.captureAnimationState(),function(t,e){var n,o,i=t.parentNode,r=e.parentNode;if(!i||!r||i.isEqualNode(e)||r.isEqualNode(t))return;n=L(t),o=L(e),i.isEqualNode(r)&&n<o&&o++;i.insertBefore(e,i.children[n]),r.insertBefore(t,r.children[o])}(o,oe),i.animateAll(),i!==e&&e.animateAll())},nulling:function(){oe=null}},r(t,{pluginName:"swap",eventProperties:function(){return{swapItem:oe}}})}ae.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=A(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:re},r(ae,{pluginName:"revertOnSpill"}),se.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:re},r(se,{pluginName:"removeOnSpill"});var ce,ue,de,fe,he,pe=[],me=[],ve=!1,ge=!1,ye=!1;function be(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));t.options.supportPointer?g(document,"pointerup",this._deselectMultiDrag):(g(document,"mouseup",this._deselectMultiDrag),g(document,"touchend",this._deselectMultiDrag)),g(document,"keydown",this._checkKeyDown),g(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(e,n){var o="";pe.length&&ue===t?pe.forEach((function(t,e){o+=(e?", ":"")+t.textContent})):o=n.textContent,e.setData("Text",o)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var e=t.dragEl;de=e},delayEnded:function(){this.isMultiDrag=~pe.indexOf(de)},setupClone:function(t){var e=t.sortable,n=t.cancel;if(this.isMultiDrag){for(var o=0;o<pe.length;o++)me.push(R(pe[o])),me[o].sortableIndex=pe[o].sortableIndex,me[o].draggable=!1,me[o].style["will-change"]="",x(me[o],this.options.selectedClass,!1),pe[o]===de&&x(me[o],this.options.chosenClass,!1);e._hideClone(),n()}},clone:function(t){var e=t.sortable,n=t.rootEl,o=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||pe.length&&ue===e&&(_e(!0,n),o("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,n=t.rootEl,o=t.cancel;this.isMultiDrag&&(_e(!1,n),me.forEach((function(t){C(t,"display","")})),e(),he=!1,o())},hideClone:function(t){var e=this,n=(t.sortable,t.cloneNowHidden),o=t.cancel;this.isMultiDrag&&(me.forEach((function(t){C(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),n(),he=!0,o())},dragStartGlobal:function(t){t.sortable;!this.isMultiDrag&&ue&&ue.multiDrag._deselectMultiDrag(),pe.forEach((function(t){t.sortableIndex=L(t)})),pe=pe.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),ye=!0},dragStarted:function(t){var e=this,n=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){pe.forEach((function(t){t!==de&&C(t,"position","absolute")}));var o=E(de,!1,!0,!0);pe.forEach((function(t){t!==de&&B(t,o)})),ge=!0,ve=!0}n.animateAll((function(){ge=!1,ve=!1,e.options.animation&&pe.forEach((function(t){F(t)})),e.options.sort&&we()}))}},dragOver:function(t){var e=t.target,n=t.completed,o=t.cancel;ge&&~pe.indexOf(e)&&(n(!1),o())},revert:function(t){var e=t.fromSortable,n=t.rootEl,o=t.sortable,i=t.dragRect;pe.length>1&&(pe.forEach((function(t){o.addAnimationState({target:t,rect:ge?E(t):i}),F(t),t.fromRect=i,e.removeAnimationState(t)})),ge=!1,function(t,e){pe.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,o=t.insertion,i=t.activeSortable,r=t.parentEl,a=t.putSortable,s=this.options;if(o){if(n&&i._hideClone(),ve=!1,s.animation&&pe.length>1&&(ge||!n&&!i.options.sort&&!a)){var l=E(de,!1,!0,!0);pe.forEach((function(t){t!==de&&(B(t,l),r.appendChild(t))})),ge=!0}if(!n)if(ge||we(),pe.length>1){var c=he;i._showClone(e),i.options.animation&&!he&&c&&me.forEach((function(t){i.addAnimationState({target:t,rect:fe}),t.fromRect=fe,t.thisAnimationDuration=null}))}else i._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,o=t.activeSortable;if(pe.forEach((function(t){t.thisAnimationDuration=null})),o.options.animation&&!n&&o.multiDrag.isMultiDrag){fe=r({},e);var i=S(de,!0);fe.top-=i.f,fe.left-=i.e}},dragOverAnimationComplete:function(){ge&&(ge=!1,we())},drop:function(t){var e=t.originalEvent,n=t.rootEl,o=t.parentEl,i=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,s=t.putSortable,l=s||this.sortable;if(e){var c=this.options,u=o.children;if(!ye)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),x(de,c.selectedClass,!~pe.indexOf(de)),~pe.indexOf(de))pe.splice(pe.indexOf(de),1),ce=null,K({sortable:i,rootEl:n,name:"deselect",targetEl:de,originalEvt:e});else{if(pe.push(de),K({sortable:i,rootEl:n,name:"select",targetEl:de,originalEvt:e}),e.shiftKey&&ce&&i.el.contains(ce)){var d,f,h=L(ce),p=L(de);if(~h&&~p&&h!==p)for(p>h?(f=h,d=p):(f=p,d=h+1);f<d;f++)~pe.indexOf(u[f])||(x(u[f],c.selectedClass,!0),pe.push(u[f]),K({sortable:i,rootEl:n,name:"select",targetEl:u[f],originalEvt:e}))}else ce=de;ue=l}if(ye&&this.isMultiDrag){if((o[U].options.sort||o!==n)&&pe.length>1){var m=E(de),v=L(de,":not(."+this.options.selectedClass+")");if(!ve&&c.animation&&(de.thisAnimationDuration=null),l.captureAnimationState(),!ve&&(c.animation&&(de.fromRect=m,pe.forEach((function(t){if(t.thisAnimationDuration=null,t!==de){var e=ge?E(t):m;t.fromRect=e,l.addAnimationState({target:t,rect:e})}}))),we(),pe.forEach((function(t){u[v]?o.insertBefore(t,u[v]):o.appendChild(t),v++})),a===L(de))){var g=!1;pe.forEach((function(t){t.sortableIndex===L(t)||(g=!0)})),g&&r("update")}pe.forEach((function(t){F(t)})),l.animateAll()}ue=l}(n===o||s&&"clone"!==s.lastPutMode)&&me.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=ye=!1,me.length=0},destroyGlobal:function(){this._deselectMultiDrag(),y(document,"pointerup",this._deselectMultiDrag),y(document,"mouseup",this._deselectMultiDrag),y(document,"touchend",this._deselectMultiDrag),y(document,"keydown",this._checkKeyDown),y(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==ye&&ye||ue!==this.sortable||t&&w(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;pe.length;){var e=pe[0];x(e,this.options.selectedClass,!1),pe.shift(),K({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvt:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},r(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[U];e&&e.options.multiDrag&&!~pe.indexOf(t)&&(ue&&ue!==e&&(ue.multiDrag._deselectMultiDrag(),ue=e),x(t,e.options.selectedClass,!0),pe.push(t))},deselect:function(t){var e=t.parentNode[U],n=pe.indexOf(t);e&&e.options.multiDrag&&~n&&(x(t,e.options.selectedClass,!1),pe.splice(n,1))}},eventProperties:function(){var t=this,e=[],n=[];return pe.forEach((function(o){var i;e.push({multiDragElement:o,index:o.sortableIndex}),i=ge&&o!==de?-1:ge?L(o,":not(."+t.options.selectedClass+")"):L(o),n.push({multiDragElement:o,index:i})})),{items:l(pe),clones:[].concat(me),oldIndicies:e,newIndicies:n}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function _e(t,e){me.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}function we(){pe.forEach((function(t){t!==de&&t.parentNode&&t.parentNode.removeChild(t)}))}Bt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?g(document,"dragover",this._handleAutoScroll):this.options.supportPointer?g(document,"pointermove",this._handleFallbackAutoScroll):e.touches?g(document,"touchmove",this._handleFallbackAutoScroll):g(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):(y(document,"pointermove",this._handleFallbackAutoScroll),y(document,"touchmove",this._handleFallbackAutoScroll),y(document,"mousemove",this._handleFallbackAutoScroll)),ne(),ee(),clearTimeout(k),k=void 0},nulling:function(){Xt=Yt=Kt=te=Qt=Zt=Gt=null,Jt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(o,i);if(Xt=t,e||d||u||h){ie(t,this.options,r,e);var a=$(r,!0);!te||Qt&&o===Zt&&i===Gt||(Qt&&ne(),Qt=setInterval((function(){var r=$(document.elementFromPoint(o,i),!0);r!==a&&(a=r,ee()),ie(t,n.options,r,e)}),10),Zt=o,Gt=i)}else{if(!this.options.bubbleScroll||$(r,!0)===T())return void ee();ie(t,this.options,$(r,!1),!1)}}},r(t,{pluginName:"scroll",initializeByDefault:!0})}),Bt.mount(se,ae);const ke=Bt},81034:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});const o={name:"ResizeLine",props:{value:{},min:{type:Number,default:100},max:{type:Number,default:600},placement:{validator:function(t){return["right","bottom"].includes(t)},default:"bottom"},reverse:{type:Boolean,default:!1},beforeResize:Function},data:function(){return{resizing:!1,mouseX:0,mouseY:0,offset:{},tmpSize:void 0}},mounted:function(){document.documentElement.addEventListener("mousemove",this.handleMove,!0),document.documentElement.addEventListener("mouseup",this.handleUp,!0)},methods:{resizeDown:function(t){var e=this;if(this.beforeResize){var n=this.beforeResize();n&&n.then?n.then((function(n){e.handleDown(t)})):this.handleDown(t)}else this.handleDown(t)},handleDown:function(t){this.mouseX=t.pageX||t.clientX+document.documentElement.scrollLeft,this.mouseY=t.pageY||t.clientY+document.documentElement.scrollTop,this.offset={left:t.target.offsetLeft,top:t.target.offsetTop},this.resizing=!0,"number"==typeof this.value&&(this.tmpSize=this.value),this.$emit("on-change",{event:"down"})},handleMove:function(t){if(this.resizing){var e,n=(t.pageX||t.clientX+document.documentElement.scrollLeft)-this.mouseX,o=(t.pageY||t.clientY+document.documentElement.scrollTop)-this.mouseY;if("number"==typeof this.tmpSize)e="bottom"==this.placement?this.reverse?this.tmpSize-o:this.tmpSize+o:this.reverse?this.tmpSize-n:this.tmpSize+n,this.min>0&&(e=Math.max(this.min,e)),this.max>0&&(e=Math.min(this.max,e)),this.$emit("input",e);this.$emit("on-change",{event:"move",diff:{x:n,y:o},offset:this.offset})}},handleUp:function(){this.resizing&&(this.resizing=!1,this.tmpSize=void 0,this.$emit("on-change",{event:"up"}))}}};var i=n(93379),r=n.n(i),a=n(92307),s={insert:"head",singleton:!1};r()(a.Z,s);a.Z.locals;var l=n(51900);const c={name:"DrawerOverlayView",components:{ResizeLine:(0,l.Z)(o,(function(){var t=this;return(0,t._self._c)("div",{staticClass:"component-resize-line",class:[t.resizing?"resizing":"",t.placement],on:{mousedown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:(e.stopPropagation(),e.preventDefault(),t.resizeDown.apply(null,arguments))}}})}),[],!1,null,"5a37a7e8",null).exports},props:{placement:{validator:function(t){return["right","bottom"].includes(t)},default:"bottom"},size:{type:[Number,String],default:"100%"},minSize:{type:Number,default:300},resize:{type:Boolean,default:!0}},data:function(){return{dynamicSize:0}},computed:{bodyStyle:function(){var t=this.dynamicSize;return t="".concat(t,t<=100?"%":"px"),"right"==this.placement?{width:t,height:"100%"}:{width:"100%",height:t}}},watch:{size:{handler:function(t){this.dynamicSize=parseInt(t)},immediate:!0}},methods:{onClose:function(){this.$emit("on-close")},beforeResize:function(){var t=this;return new Promise((function(e){t.dynamicSize<=100&&t.updateSize(),e()}))},onChangeResize:function(t){"up"===t.event&&this.updateSize()},updateSize:function(){"bottom"===this.placement?this.dynamicSize=this.$refs.body.clientHeight:this.dynamicSize=this.$refs.body.clientWidth}}};const u={name:"DrawerOverlay",components:{DrawerOverlayView:(0,l.Z)(c,(function(){var t=this,e=t._self._c;return e("div",{ref:"body",staticClass:"overlay-body",style:t.bodyStyle},[e("div",{staticClass:"overlay-close"},[e("a",{attrs:{href:"javascript:void(0)"},on:{click:function(e){return e.stopPropagation(),t.onClose.apply(null,arguments)}}},[e("svg",{staticClass:"icon fill-current",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 26",fill:"none",role:"img"}},[e("path",{attrs:{d:"M8.28596 6.51819C7.7978 6.03003 7.00634 6.03003 6.51819 6.51819C6.03003 7.00634 6.03003 7.7978 6.51819 8.28596L11.2322 13L6.51819 17.714C6.03003 18.2022 6.03003 18.9937 6.51819 19.4818C7.00634 19.97 7.7978 19.97 8.28596 19.4818L13 14.7678L17.714 19.4818C18.2022 19.97 18.9937 19.97 19.4818 19.4818C19.97 18.9937 19.97 18.2022 19.4818 17.714L14.7678 13L19.4818 8.28596C19.97 7.7978 19.97 7.00634 19.4818 6.51819C18.9937 6.03003 18.2022 6.03003 17.714 6.51819L13 11.2322L8.28596 6.51819Z",fill:"currentColor"}})])])]),t._v(" "),t.resize?e("ResizeLine",{staticClass:"overlay-resize",attrs:{placement:t.placement,min:t.minSize,max:0,reverse:!0,beforeResize:t.beforeResize},on:{"on-change":t.onChangeResize},model:{value:t.dynamicSize,callback:function(e){t.dynamicSize=e},expression:"dynamicSize"}}):t._e(),t._v(" "),e("div",{staticClass:"overlay-content"},[t._t("default")],2)],1)}),[],!1,null,null,null).exports},props:{value:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},escClosable:{type:Boolean,default:!0},placement:{validator:function(t){return["right","bottom"].includes(t)},default:"bottom"},size:{type:[Number,String],default:"100%"},minSize:{type:Number,default:300},resize:{type:Boolean,default:!0},className:{type:String},beforeClose:Function},data:function(){return{show:this.value}},watch:{value:function(t){this.show=t},show:function(t){this.value!==t&&this.$emit("input",t)}},computed:{modalClass:function(){return this.className?"common-drawer-overlay ".concat(this.className," ").concat(this.placement):"common-drawer-overlay ".concat(this.placement)}},methods:{onClose:function(){this.$refs.modal.close()}}};const d=(0,l.Z)(u,(function(){var t=this,e=t._self._c;return e("Modal",{ref:"modal",attrs:{closable:t.escClosable,"mask-closable":t.maskClosable,"footer-hide":!0,"transition-names":[t.$A.isAndroid()?"":"drawer-slide-".concat(t.placement),""],beforeClose:t.beforeClose,fullscreen:"","class-name":t.modalClass},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[e("DrawerOverlayView",{attrs:{placement:t.placement,size:t.size,minSize:t.minSize,resize:t.resize},on:{"on-close":t.onClose}},[t._t("default")],2)],1)}),[],!1,null,null,null).exports},42238:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var o=n(80641);const i={name:"UserInput",props:{value:{type:[String,Number,Array],default:""},uncancelable:{type:Array,default:function(){return[]}},disabledChoice:{type:Array,default:function(){return[]}},placeholder:{default:""},size:{default:"default"},transfer:{type:Boolean,default:!0},multipleMax:{type:Number},maxHiddenInput:{type:Boolean,default:!0},maxHiddenSelect:{type:Boolean,default:!1},projectId:{type:Number,default:0},noProjectId:{type:Number,default:0},dialogId:{type:Number,default:0}},data:function(){return{loadIng:0,selects:[],list:[],searchKey:null,searchHistory:[],subscribe:null}},mounted:function(){var t=this;this.subscribe=o.Store.subscribe("cacheUserActive",(function(e){var n=t.list.findIndex((function(t){return t.userid==e.userid}));n>-1&&(t.$set(t.list,n,Object.assign({},t.list[n],e)),t.handleSelectData())}))},beforeDestroy:function(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},computed:{maxHiddenClass:function(){var t=this.multipleMax,e=this.maxHiddenInput,n=this.selects;return t&&e&&n.length>=t?"hidden-input":""}},watch:{value:{handler:function(){var t=this,e=this._tmpId=$A.randomString(6);setTimeout((function(){e===t._tmpId&&t.valueChange()}),10)},immediate:!0},selects:function(t){this.$emit("input",t),this.maxHiddenSelect&&t.length>=this.maxHiddenSelect&&this.$refs.select&&this.$refs.select.hideMenu()}},methods:{searchUser:function(t){var e=this;"string"!=typeof t&&(t=""),this.searchKey=t;var n=this.searchHistory.find((function(e){return e.key==t}));n&&(this.list=n.data),n||this.loadIng++,setTimeout((function(){e.searchKey==t?e.$store.dispatch("call",{url:"users/search",data:{keys:{key:t,project_id:e.projectId,no_project_id:e.noProjectId,dialog_id:e.dialogId},take:50}}).then((function(n){var o=n.data;e.list=o;var i=e.searchHistory.findIndex((function(e){return e.key==t})),r={key:t,data:o,time:$A.Time()};i>-1?e.searchHistory.splice(i,1,r):e.searchHistory.push(r)})).catch((function(t){var n=t.msg;e.list=[],$A.messageWarning(n)})).finally((function(t){n||e.loadIng--})):n||e.loadIng--}),this.searchHistory.length>0?300:0)},isDisabled:function(t){return 0!==this.disabledChoice.length&&this.disabledChoice.includes(t)},openChange:function(t){t&&this.$nextTick(this.searchUser)},remoteMethod:function(){},valueChange:function(){var t=this;this.selects!=this.value&&($A.isArray(this.value)?this.selects=$A.cloneJSON(this.value):this.value?this.selects=[this.value]:this.selects=[],this.selects.some((function(e){t.list.find((function(t){return t.userid==e}))||(t.list.push({userid:e,nickname:e}),t.$store.dispatch("getUserBasic",{userid:e}))})))},handleSelectData:function(){var t=this;this.__handleSelectTimeout&&clearTimeout(this.__handleSelectTimeout),this.__handleSelectTimeout=setTimeout((function(){if(t.$refs.select){var e=t.$refs.select.getValue();e&&e.some((function(e){var n=t.list.find((function(t){return t.userid==e.value}));n&&(t.$set(e,"label",n.nickname),t.$set(e,"avatar",n.userimg))}))}}),100)}}};const r=(0,n(51900).Z)(i,(function(){var t=this,e=t._self._c;return e("div",{class:["common-user",t.maxHiddenClass]},[e("Select",{ref:"select",attrs:{transfer:t.transfer,placeholder:t.placeholder,size:t.size,loading:t.loadIng>0,"loading-text":t.$L("加载中..."),"default-label":t.value,"default-event-object":!0,"multiple-max":t.multipleMax,"multiple-uncancelable":t.uncancelable,"remote-method":t.remoteMethod,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-query-change":t.searchUser,"on-open-change":t.openChange},model:{value:t.selects,callback:function(e){t.selects=e},expression:"selects"}},[t.multipleMax?e("div",{staticClass:"user-drop-prepend",attrs:{slot:"drop-prepend"},slot:"drop-prepend"},[t._v(t._s(t.$L("最多只能选择"+t.multipleMax+"个")))]):t._e(),t._v(" "),t._t("option-prepend"),t._v(" "),t._l(t.list,(function(n,o){return e("Option",{key:o,attrs:{value:n.userid,"key-value":n.email,label:n.nickname,avatar:n.userimg,disabled:t.isDisabled(n.userid)}},[e("div",{staticClass:"user-input-option"},[e("div",{staticClass:"user-input-avatar"},[e("EAvatar",{staticClass:"avatar",attrs:{src:n.userimg}})],1),t._v(" "),e("div",{staticClass:"user-input-nickname"},[t._v(t._s(n.nickname))]),t._v(" "),e("div",{staticClass:"user-input-userid"},[t._v("ID: "+t._s(n.userid))])])])}))],2),t._v(" "),t.loadIng>0?e("div",{staticClass:"common-user-loading"},[e("Loading")],1):t._e()],1)}),[],!1,null,null,null).exports},68024:(t,e,n)=>{"use strict";n.d(e,{Z:()=>Y});var o=n(20629),i=n(76095),r=n.n(i);function a(t){return a="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},a(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function c(t,e,n){return e&&l(t.prototype,e),n&&l(t,n),t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(){return d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},d.apply(this,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=f(t);if(e){var i=f(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return m(this,n)}}function g(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var o=g(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},y.apply(this,arguments)}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function _(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return b(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}var w=9,k=13,O=27,x=38,C=40;function S(t,e,n){var o=t;return Object.keys(e).forEach((function(t){n.indexOf(t)>-1?o.dataset[t]=e[t]:delete o.dataset[t]})),o}var j=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(n,t);var e=v(n);function n(t,o){var i;return s(this,n),u(p(i=e.call(this,t,o)),"hoverHandler",void 0),u(p(i),"hoverHandler",void 0),i.clickHandler=null,i.hoverHandler=null,i.mounted=!1,i}return c(n,[{key:"attach",value:function(){y(f(n.prototype),"attach",this).call(this),this.mounted||(this.mounted=!0,this.clickHandler=this.getClickHandler(),this.hoverHandler=this.getHoverHandler(),this.domNode.addEventListener("click",this.clickHandler,!1),this.domNode.addEventListener("mouseenter",this.hoverHandler,!1))}},{key:"detach",value:function(){y(f(n.prototype),"detach",this).call(this),this.mounted=!1,this.clickHandler&&(this.domNode.removeEventListener("click",this.clickHandler),this.clickHandler=null)}},{key:"getClickHandler",value:function(){var t=this;return function(e){var n=t.buildEvent("mention-clicked",e);window.dispatchEvent(n),e.preventDefault()}}},{key:"getHoverHandler",value:function(){var t=this;return function(e){var n=t.buildEvent("mention-hovered",e);window.dispatchEvent(n),e.preventDefault()}}},{key:"buildEvent",value:function(t,e){var n=new Event(t,{bubbles:!0,cancelable:!0});return n.value=d({},this.domNode.dataset),n.event=e,n}}],[{key:"create",value:function(t){var e=y(f(n),"create",this).call(this),o=document.createElement("span");return o.className="ql-mention-denotation-char",o.innerHTML=t.denotationChar,e.appendChild(o),e.innerHTML+=t.value,n.setDataValues(e,t)}},{key:"setDataValues",value:function(t,e){var n=t;return Object.keys(e).forEach((function(t){n.dataset[t]=e[t]})),n}},{key:"value",value:function(t){return t.dataset}}]),n}(r().import("blots/embed"));j.blotName="mention",j.tagName="span",j.className="mention",r().register(j);var T=function(){function t(e,n){var o=this;s(this,t),this.isOpen=!1,this.itemIndex=0,this.mentionCharPos=null,this.cursorPos=null,this.values=[],this.suspendMouseEnter=!1,this.existingSourceExecutionToken=null,this.quill=e,this.options={source:null,renderItem:function(t){return"".concat(t.value)},renderLoading:function(){return null},onSelect:function(t,e){e(t)},mentionDenotationChars:["@"],showDenotationChar:!0,allowedChars:/^[a-zA-Z0-9_]*$/,minChars:0,maxChars:31,offsetTop:2,offsetLeft:0,isolateCharacter:!1,fixMentionsToQuill:!1,positioningStrategy:"normal",defaultMenuOrientation:"bottom",blotName:"mention",dataAttributes:["id","value","denotationChar","link","target","disabled"],linkTarget:"_blank",onOpen:function(){return!0},onBeforeClose:function(){return!0},onClose:function(){return!0},listItemClass:"ql-mention-list-item",mentionContainerClass:"ql-mention-list-container",mentionListClass:"ql-mention-list",spaceAfterInsert:!0,selectKeys:[k]},d(this.options,n,{dataAttributes:Array.isArray(n.dataAttributes)?this.options.dataAttributes.concat(n.dataAttributes):this.options.dataAttributes}),this.mentionContainer=document.createElement("div"),this.mentionContainer.className=this.options.mentionContainerClass?this.options.mentionContainerClass:"",this.mentionContainer.style.cssText="display: none; position: absolute;",this.mentionContainer.onmousemove=this.onContainerMouseMove.bind(this),this.options.fixMentionsToQuill&&(this.mentionContainer.style.width="auto"),this.mentionList=document.createElement("ul"),this.mentionList.id="quill-mention-list",e.root.setAttribute("aria-owns","quill-mention-list"),this.mentionList.className=this.options.mentionListClass?this.options.mentionListClass:"",this.mentionContainer.appendChild(this.mentionList),e.on("text-change",this.onTextChange.bind(this)),e.on("selection-change",this.onSelectionChange.bind(this)),e.container.addEventListener("paste",(function(){setTimeout((function(){var t=e.getSelection();o.onSelectionChange(t)}))})),e.keyboard.addBinding({key:w},this.selectHandler.bind(this)),e.keyboard.bindings[w].unshift(e.keyboard.bindings[w].pop());var i,r=_(this.options.selectKeys);try{for(r.s();!(i=r.n()).done;){var a=i.value;e.keyboard.addBinding({key:a},this.selectHandler.bind(this))}}catch(t){r.e(t)}finally{r.f()}e.keyboard.bindings[k].unshift(e.keyboard.bindings[k].pop()),e.keyboard.addBinding({key:O},this.escapeHandler.bind(this)),e.keyboard.addBinding({key:x},this.upHandler.bind(this)),e.keyboard.addBinding({key:C},this.downHandler.bind(this))}return c(t,[{key:"selectHandler",value:function(){return!(this.isOpen&&!this.existingSourceExecutionToken)||(this.selectItem(),!1)}},{key:"escapeHandler",value:function(){return!this.isOpen||(this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.hideMentionList(),!1)}},{key:"upHandler",value:function(){return!(this.isOpen&&!this.existingSourceExecutionToken)||(this.prevItem(),!1)}},{key:"downHandler",value:function(){return!(this.isOpen&&!this.existingSourceExecutionToken)||(this.nextItem(),!1)}},{key:"showMentionList",value:function(){"fixed"===this.options.positioningStrategy?document.body.appendChild(this.mentionContainer):this.quill.container.appendChild(this.mentionContainer),this.mentionContainer.style.visibility="hidden",this.mentionContainer.style.display="",this.mentionContainer.scrollTop=0,this.setMentionContainerPosition(),this.setIsOpen(!0)}},{key:"hideMentionList",value:function(){this.options.onBeforeClose(),this.mentionContainer.style.display="none",this.mentionContainer.remove(),this.setIsOpen(!1),this.quill.root.removeAttribute("aria-activedescendant")}},{key:"highlightItem",value:function(){for(var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=0;e<this.mentionList.childNodes.length;e+=1)this.mentionList.childNodes[e].classList.remove("selected");if(-1!==this.itemIndex&&"true"!==this.mentionList.childNodes[this.itemIndex].dataset.disabled&&(this.mentionList.childNodes[this.itemIndex].classList.add("selected"),this.quill.root.setAttribute("aria-activedescendant",this.mentionList.childNodes[this.itemIndex].id),t)){var n=this.mentionList.childNodes[this.itemIndex].offsetHeight,o=this.mentionList.childNodes[this.itemIndex].offsetTop,i=this.mentionContainer.scrollTop,r=i+this.mentionContainer.offsetHeight;o<i?this.mentionContainer.scrollTop=o:o>r-n&&(this.mentionContainer.scrollTop+=o-r+n)}}},{key:"getItemData",value:function(){var t=this.mentionList.childNodes[this.itemIndex].dataset.link,e=void 0!==t,n=this.mentionList.childNodes[this.itemIndex].dataset.target;return e&&(this.mentionList.childNodes[this.itemIndex].dataset.value='<a href="'.concat(t,'" target=').concat(n||this.options.linkTarget,">").concat(this.mentionList.childNodes[this.itemIndex].dataset.value)),this.mentionList.childNodes[this.itemIndex].dataset}},{key:"onContainerMouseMove",value:function(){this.suspendMouseEnter=!1}},{key:"selectItem",value:function(){var t=this;if(-1!==this.itemIndex){var e=this.getItemData();e.disabled||(this.options.onSelect(e,(function(e){t.insertItem(e)})),this.hideMentionList())}}},{key:"insertItem",value:function(t,e){var n,o=t;null!==o&&(this.options.showDenotationChar||(o.denotationChar=""),e?n=this.cursorPos:(n=this.mentionCharPos,this.quill.deleteText(this.mentionCharPos,this.cursorPos-this.mentionCharPos,r().sources.USER)),this.quill.insertEmbed(n,this.options.blotName,o,r().sources.USER),this.options.spaceAfterInsert?(this.quill.insertText(n+1," ",r().sources.USER),this.quill.setSelection(n+2,r().sources.USER)):this.quill.setSelection(n+1,r().sources.USER),this.hideMentionList())}},{key:"onItemMouseEnter",value:function(t){if(!this.suspendMouseEnter){var e=Number(t.target.dataset.index);Number.isNaN(e)||e===this.itemIndex||(this.itemIndex=e,this.highlightItem(!1))}}},{key:"onDisabledItemMouseEnter",value:function(t){this.suspendMouseEnter||(this.itemIndex=-1,this.highlightItem(!1))}},{key:"onItemClick",value:function(t){0===t.button&&(t.preventDefault(),t.stopImmediatePropagation(),this.itemIndex=t.currentTarget.dataset.index,this.highlightItem(),this.selectItem())}},{key:"onItemMouseDown",value:function(t){t.preventDefault(),t.stopImmediatePropagation()}},{key:"renderLoading",value:function(){if(this.options.renderLoading())if(this.mentionContainer.getElementsByClassName("ql-mention-loading").length>0)this.showMentionList();else{this.mentionList.innerHTML="";var t=document.createElement("div");t.className="ql-mention-loading",t.innerHTML=this.options.renderLoading(),this.mentionContainer.append(t),this.showMentionList()}}},{key:"removeLoading",value:function(){var t=this.mentionContainer.getElementsByClassName("ql-mention-loading");t.length>0&&t[0].remove()}},{key:"renderList",value:function(t,e,n){if(e&&e.length>0){this.removeLoading(),this.values=e,this.mentionList.innerHTML="";for(var o=-1,i=0;i<e.length;i+=1){var r=document.createElement("li");r.id="quill-mention-item-"+i,r.className=this.options.listItemClass?this.options.listItemClass:"",e[i].disabled?(r.className+=" disabled",r.setAttribute("aria-hidden","true")):-1===o&&(o=i),r.dataset.index=i,r.innerHTML=this.options.renderItem(e[i],n),e[i].disabled?r.onmouseenter=this.onDisabledItemMouseEnter.bind(this):(r.onmouseenter=this.onItemMouseEnter.bind(this),r.onmouseup=this.onItemClick.bind(this),r.onmousedown=this.onItemMouseDown.bind(this)),r.dataset.denotationChar=t,this.mentionList.appendChild(S(r,e[i],this.options.dataAttributes))}this.itemIndex=o,this.highlightItem(),this.showMentionList()}else this.hideMentionList()}},{key:"nextItem",value:function(){var t,e=0;do{e++,t=(this.itemIndex+e)%this.values.length;var n="true"===this.mentionList.childNodes[t].dataset.disabled;if(e===this.values.length+1){t=-1;break}}while(n);this.itemIndex=t,this.suspendMouseEnter=!0,this.highlightItem()}},{key:"prevItem",value:function(){var t,e=0;do{e++,t=(this.itemIndex+this.values.length-e)%this.values.length;var n="true"===this.mentionList.childNodes[t].dataset.disabled;if(e===this.values.length+1){t=-1;break}}while(n);this.itemIndex=t,this.suspendMouseEnter=!0,this.highlightItem()}},{key:"containerBottomIsNotVisible",value:function(t,e){return t+this.mentionContainer.offsetHeight+e.top>window.pageYOffset+window.innerHeight}},{key:"containerRightIsNotVisible",value:function(t,e){return!this.options.fixMentionsToQuill&&t+this.mentionContainer.offsetWidth+e.left>window.pageXOffset+document.documentElement.clientWidth}},{key:"setIsOpen",value:function(t){this.isOpen!==t&&(t?this.options.onOpen():this.options.onClose(),this.isOpen=t)}},{key:"setMentionContainerPosition",value:function(){"fixed"===this.options.positioningStrategy?this.setMentionContainerPosition_Fixed():this.setMentionContainerPosition_Normal()}},{key:"setMentionContainerPosition_Normal",value:function(){var t=this,e=this.quill.container.getBoundingClientRect(),n=this.quill.getBounds(this.mentionCharPos),o=this.mentionContainer.offsetHeight,i=this.options.offsetTop,r=this.options.offsetLeft;if(this.options.fixMentionsToQuill){this.mentionContainer.style.right="".concat(0,"px")}else r+=n.left;if(this.containerRightIsNotVisible(r,e)){var a=this.mentionContainer.offsetWidth+this.options.offsetLeft;r=e.width-a}if("top"===this.options.defaultMenuOrientation){if((i=this.options.fixMentionsToQuill?-1*(o+this.options.offsetTop):n.top-(o+this.options.offsetTop))+e.top<=0){var s=this.options.offsetTop;this.options.fixMentionsToQuill?s+=e.height:s+=n.bottom,i=s}}else if(this.options.fixMentionsToQuill?i+=e.height:i+=n.bottom,this.containerBottomIsNotVisible(i,e)){var l=-1*this.options.offsetTop;this.options.fixMentionsToQuill||(l+=n.top),i=l-o}i>=0?this.options.mentionContainerClass.split(" ").forEach((function(e){t.mentionContainer.classList.add("".concat(e,"-bottom")),t.mentionContainer.classList.remove("".concat(e,"-top"))})):this.options.mentionContainerClass.split(" ").forEach((function(e){t.mentionContainer.classList.add("".concat(e,"-top")),t.mentionContainer.classList.remove("".concat(e,"-bottom"))})),this.mentionContainer.style.top="".concat(i,"px"),this.mentionContainer.style.left="".concat(r,"px"),this.mentionContainer.style.visibility="visible"}},{key:"setMentionContainerPosition_Fixed",value:function(){var t=this;this.mentionContainer.style.position="fixed",this.mentionContainer.style.height=null;var e,n="object"!==a(e=this.quill.container.getBoundingClientRect())||null===e?e:JSON.parse(JSON.stringify(e));n.top+=window.scrollY;var o=this.quill.getBounds(this.mentionCharPos),i={left:n.left+o.left,top:n.top+o.top,width:0,height:o.height},r=this.options.fixMentionsToQuill?n:i,s=this.options.offsetTop,l=this.options.offsetLeft;if(this.options.fixMentionsToQuill){var c=r.right;this.mentionContainer.style.right="".concat(c,"px")}else(l+=r.left)+this.mentionContainer.offsetWidth>document.documentElement.clientWidth&&(l-=l+this.mentionContainer.offsetWidth-document.documentElement.clientWidth);var u=r.top,d=document.documentElement.clientHeight-(r.top+r.height),f=this.mentionContainer.offsetHeight<=d,h=this.mentionContainer.offsetHeight<=u;"bottom"===("top"===this.options.defaultMenuOrientation&&h?"top":"bottom"===this.options.defaultMenuOrientation&&f||d>u?"bottom":"top")?(s=r.top+r.height,f||(this.mentionContainer.style.height=d-3+"px"),this.options.mentionContainerClass.split(" ").forEach((function(e){t.mentionContainer.classList.add("".concat(e,"-bottom")),t.mentionContainer.classList.remove("".concat(e,"-top"))}))):(s=r.top-this.mentionContainer.offsetHeight,h||(this.mentionContainer.style.height=u-3+"px",s=3),this.options.mentionContainerClass.split(" ").forEach((function(e){t.mentionContainer.classList.add("".concat(e,"-top")),t.mentionContainer.classList.remove("".concat(e,"-bottom"))}))),this.mentionContainer.style.top="".concat(s,"px"),this.mentionContainer.style.left="".concat(l,"px"),this.mentionContainer.style.visibility="visible"}},{key:"getTextBeforeCursor",value:function(){var t=Math.max(0,this.cursorPos-this.options.maxChars);return this.quill.getText(t,this.cursorPos-t)}},{key:"onSomethingChange",value:function(){var t=this,e=this.quill.getSelection();if(null!=e){this.cursorPos=e.index;var n,o=this.getTextBeforeCursor(),i=(n=o,this.options.mentionDenotationChars.reduce((function(t,e){var o=n.lastIndexOf(e);return o>t.mentionCharIndex?{mentionChar:e,mentionCharIndex:o}:{mentionChar:t.mentionChar,mentionCharIndex:t.mentionCharIndex}}),{mentionChar:null,mentionCharIndex:-1})),r=i.mentionChar,a=i.mentionCharIndex;if(function(t,e,n){return t>-1&&!(n&&0!==t&&!e[t-1].match(/\s/g))}(a,o,this.options.isolateCharacter)){var s=this.cursorPos-(o.length-a);this.mentionCharPos=s;var l=o.substring(a+r.length);if(l.length>=this.options.minChars&&function(t,e){return e.test(t)}(l,this.getAllowedCharsRegex(r))){this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.renderLoading();var c={abandoned:!1};this.existingSourceExecutionToken=c,this.options.source(l,(function(e,n){c.abandoned||(t.existingSourceExecutionToken=null,t.renderList(r,e,n))}),r)}else this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.hideMentionList()}else this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.hideMentionList()}}},{key:"getAllowedCharsRegex",value:function(t){return this.options.allowedChars instanceof RegExp?this.options.allowedChars:this.options.allowedChars(t)}},{key:"onTextChange",value:function(t,e,n){"user"===n&&this.onSomethingChange()}},{key:"onSelectionChange",value:function(t){t&&0===t.length?this.onSomethingChange():this.hideMentionList()}},{key:"openMenu",value:function(t){var e=this.quill.getSelection(!0);this.quill.insertText(e.index,t),this.quill.blur(),this.quill.focus()}}]),t}();r().register("modules/mention",T);function E(t,e){t=t.replace(/=/g,"");var n=[];switch(e.constructor){case String:case Number:case Boolean:n.push(encodeURIComponent(t)+"="+encodeURIComponent(e));break;case Array:e.forEach((function(e){n=n.concat(E(t+"[]=",e))}));break;case Object:Object.keys(e).forEach((function(o){var i=e[o];n=n.concat(E(t+"["+o+"]",i))}))}return n}function D(t){var e=[];return t.forEach((function(t){"string"==typeof t?e.push(t):e=e.concat(D(t))})),e}function A(t,e,n){if(void 0===e&&(e={}),"string"!=typeof t)throw new Error('[Vue-jsonp] Type of param "url" is not string.');if("object"!=typeof e||!e)throw new Error("[Vue-jsonp] Invalid params, should be an object.");return n="number"==typeof n?n:5e3,new Promise((function(o,i){var r="string"==typeof e.callbackQuery?e.callbackQuery:"callback",a="string"==typeof e.callbackName?e.callbackName:"jsonp_"+(Math.floor(1e5*Math.random())*Date.now()).toString(16);e[r]=a,delete e.callbackQuery,delete e.callbackName;var s=[];Object.keys(e).forEach((function(t){s=s.concat(E(t,e[t]))}));var l=D(s).join("&"),c=function(){u(),clearTimeout(f),i({status:400,statusText:"Bad Request"})},u=function(){h.removeEventListener("error",c)},d=function(){document.body.removeChild(h),delete window[a]},f=null;n>-1&&(f=setTimeout((function(){u(),d(),i({statusText:"Request Timeout",status:408})}),n)),window[a]=function(t){clearTimeout(f),u(),d(),o(t)};var h=document.createElement("script");h.addEventListener("error",c),h.src=t+(/\?/.test(t)?"&":"?")+l,document.body.appendChild(h)}))}const I={name:"ChatEmoji",props:{searchKey:{type:String,default:""}},data:function(){return{type:"emoji",emoticonPath:"",emosearchKey:"",emosearchCache:null,emosearchLoad:!1,emosearchTimer:null,emosearchList:[]}},mounted:function(){},watch:{type:function(){this.onEmosearch()},emosearchKey:function(){this.onEmosearch()},searchKey:{handler:function(t){this.emosearchKey=t},immediate:!0}},computed:{list:function(){var t=this;if("emoji"===this.type)return $A.isArray(window.emojiData)?window.emojiData.sort((function(t,e){return t.emoji_order-e.emoji_order})).map((function(t){return{type:"emoji",name:t.name,html:t.code_decimal}})):[];if("emosearch"===this.type)return this.emosearchList;if("emoticon"===this.type){var e=this.emoticonList.find((function(e){return e.path===t.emoticonPath}));if(e)return e.list}return[]},emoticonList:function(){if($A.isArray(window.emoticonData)){var t=$A.apiUrl("../images/emoticon");return window.emoticonData.map((function(e){return Object.assign(e,{src:"".concat(t,"/").concat(e.path,"/").concat(e.icon),list:e.list.map((function(n){return Object.assign(n,{type:"emoticon",asset:"images/emoticon/".concat(e.path,"/").concat(n.path),src:"".concat(t,"/").concat(e.path,"/").concat(n.path)})}))})}))}return[]}},methods:{onEmosearch:function(){var t=this;"emosearch"===this.type&&this.emosearchCache!==this.emosearchKey&&(this.emosearchCache=this.emosearchKey,this.emosearchLoad=!0,this.emosearchTimer&&clearTimeout(this.emosearchTimer),this.emosearchTimer=setTimeout((function(e){A("https://pic.sogou.com/napi/wap/pic",{query:t.emosearchKey+" 表情"}).then((function(e){if(t.emosearchList=[],0===e.status){var n=e.data.items;n.length>0&&(t.emosearchList=n.map((function(t){return{type:"emoticon",asset:"emosearch",name:t.title,src:t.thumbUrl,height:t.thumbHeight,width:t.thumbWidth}})))}0===t.emosearchList.length&&$A.noticeWarning("没有搜索到任何表情")})).catch((function(e){t.emosearchList=[],$A.noticeWarning("搜索结果为空")})).finally((function(e){t.emosearchLoad=!1}))}),300))},onEmoticon:function(t){this.type="emoticon",this.emoticonPath=t},onSelect:function(t){this.$emit("on-select",t)}}};var L=n(51900);const P=(0,L.Z)(I,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"chat-emoji-wrapper"},[e("div",{staticClass:"chat-emoji-box"},["emosearch"===t.type?e("div",{staticClass:"chat-emoji-emosearch"},[e("Input",{attrs:{clearable:"",placeholder:t.$L("搜索表情")},model:{value:t.emosearchKey,callback:function(e){t.emosearchKey=e},expression:"emosearchKey"}},[e("Icon",{class:{"icon-loading":t.emosearchLoad},attrs:{slot:"prefix",type:t.emosearchLoad?"ios-loading":"ios-search"},slot:"prefix"})],1)],1):t._e(),t._v(" "),e("ul",{staticClass:"scrollbar-overlay",class:[t.type,"no-dark-content"]},t._l(t.list,(function(n){return e("li",{on:{click:function(e){return t.onSelect(n)}}},["emoticon"===n.type?e("img",{attrs:{src:n.src,title:n.name,alt:n.name}}):e("span",{attrs:{title:n.name},domProps:{innerHTML:t._s(n.html)}})])})),0)]),t._v(" "),e("ul",{staticClass:"chat-emoji-menu"},[e("li",{class:{active:"emosearch"===t.type},on:{click:function(e){t.type="emosearch"}}},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),e("li",{class:{active:"emoji"===t.type},on:{click:function(e){t.type="emoji"}}},[e("span",{staticClass:"no-dark-content"},[t._v("😀")])]),t._v(" "),t._l(t.emoticonList,(function(n){return e("li",{class:{active:"emoticon"===t.type&&t.emoticonPath==n.path},on:{click:function(e){return t.onEmoticon(n.path)}}},[e("img",{attrs:{title:n.name,alt:n.name,src:n.src}})])}))],2)])}),[],!1,null,null,null).exports;var $="ontouchend"in document;const N={bind:function(t,e){var n=!1;t.__touchMouseDown__=function(t){t.preventDefault(),n=!0,e.value("down",t)},t.__touchMouseMove__=function(t){n&&e.value("move",t)},t.__touchMouseUp__=function(t){n&&(n=!1,e.value("up"))},$?(t.addEventListener("touchstart",t.__touchMouseDown__),t.addEventListener("touchmove",t.__touchMouseMove__),t.addEventListener("touchend",t.__touchMouseUp__)):(t.addEventListener("mousedown",t.__touchMouseDown__),document.addEventListener("mousemove",t.__touchMouseMove__),document.addEventListener("mouseup",t.__touchMouseUp__))},update:function(){},unbind:function(t){$?(t.removeEventListener("touchstart",t.__touchMouseDown__),t.removeEventListener("touchmove",t.__touchMouseMove__),t.removeEventListener("touchend",t.__touchMouseUp__)):(t.removeEventListener("mousedown",t.__touchMouseDown__),document.removeEventListener("mousemove",t.__touchMouseMove__),document.removeEventListener("mouseup",t.__touchMouseUp__)),delete t.__touchMouseDown__,delete t.__touchMouseMove__,delete t.__touchMouseUp__}};function M(t){return void 0===t&&(t=document.body),!0===t?document.body:t instanceof window.Node?t:document.querySelector(t)}const q={inserted:function(t,e,n){var o=e.value;if(t.dataset&&"true"!==t.dataset.transfer)return!1;t.className=t.className?t.className+" v-transfer-dom":"v-transfer-dom";var i=t.parentNode;if(i){var r=document.createComment(""),a=!1;!1!==o&&(i.replaceChild(r,t),M(o).appendChild(t),a=!0),t.__transferDomData||(t.__transferDomData={parentNode:i,home:r,target:M(o),hasMovedOut:a})}},componentUpdated:function(t,e){var n=e.value;if(t.dataset&&"true"!==t.dataset.transfer)return!1;var o=t.__transferDomData;if(o){var i=o.parentNode,r=o.home,a=o.hasMovedOut;!a&&n?(i.replaceChild(r,t),M(n).appendChild(t),t.__transferDomData=Object.assign({},t.__transferDomData,{hasMovedOut:!0,target:M(n)})):a&&!1===n?(i.replaceChild(t,r),t.__transferDomData=Object.assign({},t.__transferDomData,{hasMovedOut:!1,target:M(n)})):n&&M(n).appendChild(t)}},unbind:function(t){if(t.dataset&&"true"!==t.dataset.transfer)return!1;t.className=t.className.replace("v-transfer-dom",""),t.__transferDomData&&(!0===t.__transferDomData.hasMovedOut&&t.__transferDomData.parentNode&&t.__transferDomData.parentNode.appendChild(t),t.__transferDomData=null)}};var R=n(28456),B=n(80641);function F(t){return function(t){if(Array.isArray(t))return U(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return U(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function H(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?z(Object(n),!0).forEach((function(e){V(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function V(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const W={name:"ChatInput",components:{ChatEmoji:P},directives:{touchmouse:N,TransferDom:q,clickoutside:R.Z},props:{value:{type:[String,Number],default:""},dialogId:{type:Number,default:0},taskId:{type:Number,default:0},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},disabledRecord:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},enterSend:{type:[String,Boolean],default:null},emojiBottom:{type:Boolean,default:!1},options:{type:Object,default:function(){return{}}},maxlength:{type:Number},defaultMenuOrientation:{type:String,default:"top"},replyId:{type:Number,default:0}},data:function(){return{quill:null,isFocus:!1,rangeIndex:0,_content:"",_options:{},mentionMode:"",userList:null,userCache:null,taskList:null,fileList:{},showMore:!1,showEmoji:!1,emojiQuickTimer:null,emojiQuickShow:!1,emojiQuickKey:"",emojiQuickItems:[],observer:null,wrapperWidth:0,wrapperHeight:0,editorHeight:0,recordReady:!1,recordRec:null,recordBlob:null,recordWave:null,recordInter:null,recordState:"stop",recordDuration:0,touchStart:{},touchLimitX:!1,touchLimitY:!1,isSpecVersion:this.checkIOSVersion()}},mounted:function(){var t=this;this.init(),this.observer=new ResizeObserver((function(e){e.some((function(e){var n=e.target,o=e.contentRect;n===t.$el?(t.wrapperWidth=o.width,t.wrapperHeight=o.height):n===t.$refs.editor&&(t.editorHeight=o.height)}))})),this.observer.observe(this.$el),this.observer.observe(this.$refs.editor),this.recordInter=setInterval((function(e){"ing"===t.recordState&&(t.__recordDuration&&t.__recordDuration===t.recordDuration?(t.__recordDuration=null,t.stopRecord(!0),$A.messageWarning("录音失败,请重试")):t.__recordDuration=t.recordDuration)}),1e3),this.$isEEUiApp&&(window.__onPermissionRequest=function(e,n){console.log(e,n),"recordAudio"===e&&!1===n&&t.stopRecord(!0)})},beforeDestroy:function(){this.quill&&(this.quill=null),this.observer&&(this.observer.disconnect(),this.observer=null),this.recordInter&&clearInterval(this.recordInter)},computed:H(H({},(0,o.rn)(["dialogInputCache","cacheProjects","cacheTasks","cacheUserBasic","dialogMsgs","cacheDialogs"])),{},{isEnterSend:function(){return"boolean"==typeof this.enterSend?this.enterSend:this.$store.state.windowLarge},editorStyle:function(){var t=this.wrapperWidth,e=this.editorHeight;return t>0&&e>0&&(t<280||e>40)?{width:"100%"}:{}},recordTransferStyle:function(){var t=this.windowScrollY;return t>0?{marginTop:t/2+"px"}:null},boxClass:function(){var t=[];return["ready","ing"].includes(this.recordState)&&("ing"===this.recordState&&this.recordDuration>0?t.push("record-progress"):t.push("record-ready")),this.showMore&&t.push("show-more"),this.showEmoji&&t.push("show-emoji"),this.mentionMode&&t.push(this.mentionMode),t},sendClass:function(){return this.value?"sender":this.recordReady?"recorder":""},recordFormatDuration:function(){var t=this.recordDuration,e=Math.floor(t/6e4),n=Math.floor(t/1e3)%60,o=("00"+t%1e3).substr(-2);return e<10&&(e="0".concat(e)),n<10&&(n="0".concat(n)),"".concat(e,":").concat(n,"″").concat(o)},dialogData:function(){var t=this;return this.dialogId>0&&this.cacheDialogs.find((function(e){return e.id==t.dialogId}))||{}},replyData:function(){var t=this.replyId;return t>0?this.dialogMsgs.find((function(e){return e.id===t})):null}}),watch:{value:function(t){this.quill&&(t&&t!==this._content?(this._content=t,this.setContent(t)):t||this.quill.setText("")),this.setInputCache(t)},disabled:function(t){this.quill&&this.quill.enable(!t)},dialogId:function(){this.userList=null,this.userCache=null,this.taskList=null,this.fileList={},this.$emit("input",this.getInputCache())},taskId:function(){this.userList=null,this.userCache=null,this.taskList=null,this.fileList={},this.$emit("input",this.getInputCache())},showEmoji:function(t){if(t){var e=this.value.replace(/ /g," ");if((e=e.replace(/<[^>]+>/g,""))&&-1===e.indexOf(" ")&&e.length>=1&&e.length<=4?this.emojiQuickKey=e:this.emojiQuickKey="",this.showMore=!1,this.emojiQuickShow=!1,this.quill){var n=this.quill.selection.savedRange;this.rangeIndex=n?n.index:0}}!t&&this.$refs.emojiTip&&this.$refs.emojiTip.updatePopper(),this.$emit("on-emoji-visible-change",t)},showMore:function(t){t&&(this.showEmoji=!1),!t&&this.$refs.moreTip&&this.$refs.moreTip.updatePopper(),this.$emit("on-more-visible-change",t)},isFocus:function(t){var e=this;this.timerScroll&&clearInterval(this.timerScroll),t?(this.$emit("on-focus"),this.hidePopover(),this.isSpecVersion||this.windowSmall&&(this.timerScroll=setInterval((function(){var t;null!==(t=e.quill)&&void 0!==t&&t.hasFocus()?e.windowScrollY>0&&$A.scrollIntoViewIfNeeded(e.$refs.editor):clearInterval(e.timerScroll)}),200))):this.$emit("on-blur")},recordState:function(t){this.$emit("on-record-state",t)},dialogInputCache:function(){this.isFocus||this.$emit("input",this.getInputCache())},wrapperHeight:function(t,e){this.$emit("on-height-change",{newVal:t,oldVal:e})}},methods:{init:function(){var t=this;this._options=Object.assign({theme:"bubble",readOnly:!1,placeholder:this.placeholder,modules:{toolbar:[["bold","strike","italic","underline",{list:"ordered"},{list:"bullet"},"blockquote","code-block"]],keyboard:{bindings:{"short enter":{key:13,shortKey:!0,handler:function(e){return!!t.isEnterSend||(t.onSend(),!1)}},enter:{key:13,shiftKey:!1,handler:function(e){return!t.isEnterSend||(t.onSend(),!1)}},esc:{key:27,shiftKey:!1,handler:function(e){return!t.emojiQuickShow||(t.emojiQuickShow=!1,!1)}}}},mention:{allowedChars:/^\S*$/,mentionDenotationChars:["@","#","~"],defaultMenuOrientation:this.defaultMenuOrientation,isolateCharacter:!0,positioningStrategy:"fixed",renderItem:function(t){return!0===t.disabled?'<div class="mention-item-disabled">'.concat(t.value,"</div>"):0===t.id?'<div class="mention-item-at">@</div><div class="mention-item-name">'.concat(t.value,'</div><div class="mention-item-tip">').concat(t.tip,"</div>"):t.avatar?'<div class="mention-item-img'.concat(t.online?" online":"",'"><img src="').concat(t.avatar,'"/><em></em></div><div class="mention-item-name">').concat(t.value,"</div>"):'<div class="mention-item-name" title="'.concat(t.value,'">').concat(t.value,"</div>")},renderLoading:function(){return"Loading..."},source:function(e,n,o){for(var i="@"==o?"user-mention":"#"==o?"task-mention":"file-mention",r=document.getElementsByClassName("ql-mention-list-container"),a=0;a<r.length;a++)r[a].classList.remove("user-mention"),r[a].classList.remove("task-mention"),r[a].classList.remove("file-mention"),r[a].classList.add(i),$A.scrollPreventThrough(r[a]);var s=null;t.getMentionSource(o,e,(function(t){var o=[];t.some((function(t){var n=t.list;e&&(n=n.filter((function(t){var n=t.value;return $A.strExists(n,e)}))),n.length>0&&(t.label&&o.push.apply(o,F(t.label)),o.push.apply(o,F(n)))})),$A.jsonStringify(o.map((function(t){return t.id})))!==s&&(s=$A.jsonStringify(o.map((function(t){return t.id}))),n(o,e))}))}}}},this.options),this.quill=new(r())(this.$refs.editor,this._options),this.quill.enable(!1),this.value?this.setContent(this.value):this.$emit("input",this.getInputCache()),this.disabled||this.quill.enable(!0),this.quill.on("selection-change",(function(e){if(!e){if(t.quill.hasFocus())return void t.quill.setSelection(0);if(document.activeElement&&"ql-clipboard"===document.activeElement.className)return void t.quill.setSelection(t.quill.getLength())}t.isFocus=!!e})),this.quill.on("text-change",(function(e){t.maxlength>0&&t.quill.getLength()>t.maxlength&&t.quill.deleteText(t.maxlength,t.quill.getLength());var n=t.$refs.editor.children[0].innerHTML;n=(n=n.replace(/^(<p>\s*<\/p>)+|(<p>\s*<\/p>)+$/gi,"")).replace(/^(<p><br\/*><\/p>)+|(<p><br\/*><\/p>)+$/gi,""),t.updateEmojiQuick(n),t._content=n,t.$emit("input",t._content),t.$nextTick((function(e){var n=t.quill.getSelection();if(n){var o=t.quill.getText(n.index);/^\n\n$/.test(o)&&t.quill.deleteText(n.index,1)}}))})),this.quill.clipboard.addMatcher(Node.ELEMENT_NODE,(function(t,e){return e.ops=e.ops.map((function(t){var e={attributes:{},insert:t.insert};return t.attributes&&["bold","strike","italic","underline","list","blockquote","link"].some((function(n){t.attributes[n]&&(e.attributes[n]=t.attributes[n])})),e})),e})),this.$emit("on-ready",this.quill),this.disabledRecord||$A.loadScriptS(["js/recorder/recorder.mp3.min.js","js/recorder/lib.fft.js","js/recorder/frequency.histogram.view.js"],(function(e){null===e&&"function"==typeof window.Recorder&&(t.recordRec=window.Recorder({type:"mp3",bitRate:32,sampleRate:16e3,onProcess:function(e,n,o,i,r,a){t.recordWave.input(e[e.length-1],n,i),t.recordDuration=o,o>=18e4&&t.stopRecord(!1)}}),window.Recorder.Support()&&(t.recordReady=!0,t.$nextTick((function(e){t.recordWave=window.Recorder.FrequencyHistogramView({elem:t.$refs.recwave,lineCount:90,position:0,minHeight:1,stripeEnable:!1})}))))}))},updateEmojiQuick:function(t){var e=this;this.emojiSearchKey="",this.isFocus&&t?(this.emojiQuickTimer&&clearTimeout(this.emojiQuickTimer),this.emojiQuickTimer=setTimeout((function(n){if((t=(t=t.replace(/ /g," ")).replace(/<[^>]+>/g,""))&&-1===t.indexOf(" ")&&t.length>=1&&t.length<=4&&$A.isArray(window.emoticonData)){e.emojiQuickItems=[];var o=$A.apiUrl("../images/emoticon");if(window.emoticonData.some((function(n){var i=n.list.find((function(e){return $A.strExists(e.name+(e.key?" ".concat(e.key):""),t)}));if(i&&(e.emojiQuickItems.push(Object.assign(i,{type:"emoticon",asset:"images/emoticon/".concat(n.path,"/").concat(i.path),src:"".concat(o,"/").concat(n.path,"/").concat(i.path)})),e.emojiQuickItems.length>=3))return!0})),e.emojiQuickItems.length>0)return void e.$nextTick((function(t){e.emojiQuickShow=!0,e.$refs.emojiQuickRef.updatePopper()}))}e.emojiQuickShow=!1}),100)):this.emojiQuickShow=!1},setText:function(t){this.quill&&this.quill.setText(t)},setContent:function(t){this.quill&&this.quill.setContents(this.quill.clipboard.convert(t))},getInputCache:function(){var t=this.dialogId||"t_".concat(this.taskId),e=this.dialogInputCache.find((function(e){return e.key==t}));return e?e.cache:""},setInputCache:function(t){var e=this,n=this.dialogId||"t_".concat(this.taskId),o=this.dialogInputCache.findIndex((function(t){return t.key==n})),i={key:n,cache:t};o>-1?this.$store.state.dialogInputCache.splice(o,1,i):this.$store.state.dialogInputCache.push(i),this.__setInputCache&&clearTimeout(this.__setInputCache),this.__setInputCache=setTimeout((function(t){$A.setStorage("cacheDialogInput",e.$store.state.dialogInputCache)}),600)},onClickEditor:function(){this.updateEmojiQuick(this.value)},focus:function(){var t=this;this.$nextTick((function(){t.quill&&(t.quill.setSelection(t.quill.getLength()),t.quill.focus())}))},blur:function(){var t=this;this.$nextTick((function(){t.quill&&t.quill.blur()}))},clickSend:function(t,e){if(!this.loading)switch(t){case"down":if(this.touchLimitX=!1,this.touchLimitY=!1,this.touchStart="touchstart"===e.type?e.touches[0]:e,this.startRecord())return;break;case"move":var n="touchmove"===e.type?e.touches[0]:e;this.touchLimitX=(this.touchStart.clientX-n.clientX)/window.innerWidth>.1,this.touchLimitY=(this.touchStart.clientY-n.clientY)/window.innerHeight>.1;break;case"up":if(this.stopRecord(this.touchLimitY))return;if(this.touchLimitY||this.touchLimitX)return;this.onSend()}},onSend:function(){this.rangeIndex=0,this.$emit("on-send")},startRecord:function(){var t=this;return"recorder"===this.sendClass&&(B.Store.set("audioSubscribe",!0),this.recordDuration=0,this.recordState="ready",this.$nextTick((function(e){t.recordRec.open((function(e){"ready"===t.recordState?(t.recordState="ing",t.recordBlob=null,setTimeout((function(e){t.recordRec.start()}),300)):t.recordRec.close()}),(function(e){t.recordState="stop",$A.messageError(e||"打开录音失败")}))})),!0)},stopRecord:function(t){var e=this;switch(this.recordState){case"ing":return this.recordState="stop",this.recordRec.stop((function(n,o){e.recordRec.close(),!0!==t&&(o<600?$A.messageWarning("说话时间太短"):(e.recordBlob=n,e.uploadRecord(o)))}),(function(t){e.recordRec.close(),$A.messageError(t||"录音失败")})),!0;case"ready":return this.recordState="stop",!0;default:return this.recordState="stop",!1}},hidePopover:function(){this.showMore=!1,this.showEmoji=!1,this.emojiQuickShow=!1},onClickCover:function(){var t=this;this.hidePopover(),this.$nextTick((function(e){var n;null===(n=t.quill)||void 0===n||n.focus()}))},uploadRecord:function(t){var e=this;if(null!==this.recordBlob){var n=new FileReader;n.onloadend=function(){e.$emit("on-record",{type:e.recordBlob.type,base64:n.result,duration:t})},n.readAsDataURL(this.recordBlob)}},onEmojiQuick:function(t){"online"===t.type?(this.$emit("input",""),this.$emit("on-send",'<img src="'.concat(t.src,'"/>'))):(this.$emit("input",""),this.$emit("on-send",'<img class="emoticon" data-asset="'.concat(t.asset,'" data-name="').concat(t.name,'" src="').concat(t.src,'"/>'))),this.emojiQuickShow=!1,this.focus()},onSelectEmoji:function(t){if(this.quill)if("emoji"===t.type){var e=document.createElement("span");e.innerHTML=t.html,this.quill.insertText(this.rangeIndex,e.innerHTML),this.rangeIndex+=e.innerHTML.length,e=null,this.windowLarge&&(this.showEmoji=!1,this.quill.setSelection(this.rangeIndex))}else"emoticon"===t.type&&(this.$emit("on-send",'<img class="emoticon" data-asset="'.concat(t.asset,'" data-name="').concat(t.name,'" src="').concat(t.src,'"/>')),"emosearch"===t.asset&&this.$emit("input",""),this.windowLarge&&(this.showEmoji=!1))},onCancelReply:function(){this.$emit("on-cancel-reply")},onToolbar:function(t){switch(this.hidePopover(),t){case"user":this.openMenu("@");break;case"task":this.openMenu("#");break;case"meeting":B.Store.set("addMeeting",{type:"create",dialog_id:this.dialogId,userids:[this.userId]});break;case"call":case"image":case"file":this.$emit("on-more",t)}},onMoreVisibleChange:function(t){this.showMore=t},openMenu:function(t){if(this.quill)if(0===this.value.length||this.value.endsWith("<p><br></p>"))this.quill.getModule("mention").openMenu(t);else{var e=this.value.replace(/<[^>]+>/g,"");0===e.length||e.endsWith(" ")?this.quill.getModule("mention").openMenu(t):this.quill.getModule("mention").openMenu(" ".concat(t))}},getProjectId:function(){var t=this,e=null;if(this.dialogId>0){if(e=this.cacheProjects.find((function(e){return e.dialog_id==t.dialogId})))return e.id;if(e=this.cacheTasks.find((function(e){return e.dialog_id==t.dialogId})))return e.project_id}else if(this.taskId>0&&(e=this.cacheTasks.find((function(e){return e.id==t.taskId}))))return e.project_id;return 0},getMentionSource:function(t,e,n){var o=this;switch(t){case"@":this.mentionMode="user-mention";var i=function(t){o.getMoreUser(e,t.map((function(t){return t.id}))).then((function(e){var i,r;(o.userList=t,o.userCache=[],e.length>0)?(t.length>2&&o.userCache.push({label:null,list:[{id:0,value:o.$L("所有人"),tip:o.$L("仅提示会话内成员")}]}),(i=o.userCache).push.apply(i,[{label:[{id:0,value:o.$L("会话内成员"),disabled:!0}],list:t},{label:[{id:0,value:o.$L("会话以外成员"),disabled:!0}],list:e}])):t.length>2?(r=o.userCache).push.apply(r,[{label:null,list:[{id:0,value:o.$L("所有人"),tip:o.$L("提示所有成员")}]},{label:[{id:0,value:o.$L("会话内成员"),disabled:!0}],list:t}]):o.userCache.push({label:null,list:t});n(o.userCache)}))};if(this.dialogData.people&&$A.arrayLength(this.userList)!==this.dialogData.people&&(this.userList=null,this.userCache=null),null!==this.userCache&&n(this.userCache),null!==this.userList)return void i(this.userList);var r=[];if(this.dialogId>0)this.$store.dispatch("call",{url:"dialog/user",data:{dialog_id:this.dialogId,getuser:1}}).then((function(t){var e=t.data;o.cacheDialogs.find((function(t){return t.id==o.dialogId}))&&o.$store.dispatch("saveDialog",{id:o.dialogId,people:e.length}),e.length>0&&r.push.apply(r,F(e.map((function(t){return{id:t.userid,value:t.nickname,avatar:t.userimg,online:t.online}})))),i(r)})).catch((function(t){i(r)}));else if(this.taskId>0){var a=this.cacheTasks.find((function(t){return t.id==o.taskId}));a&&$A.isArray(a.task_user)&&a.task_user.some((function(t){var e=o.cacheUserBasic.find((function(e){return e.userid==t.userid}));e&&r.push({id:e.userid,value:e.nickname,avatar:e.userimg,online:e.online})})),i(r)}break;case"#":if(this.mentionMode="task-mention",null!==this.taskList)return void n(this.taskList);var s=function(t){o.taskList=[],t.length>0&&(t=t.map((function(t){return{id:t.id,value:t.name}})),o.taskList.push({label:[{id:0,value:o.$L("项目未完成任务"),disabled:!0}],list:t}));var e=o.$store.getters.transforTasks(o.$store.getters.dashboardTask.all);e.length>0&&(e=e.sort((function(t,e){return $A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59")})),o.taskList.push({label:[{id:0,value:o.$L("我的待完成任务"),disabled:!0}],list:e.map((function(t){return{id:t.id,value:t.name}}))}));var i=o.$store.getters.assistTask;i.length>0&&(i=i.sort((function(t,e){return $A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59")})),o.taskList.push({label:[{id:0,value:o.$L("我协助的任务"),disabled:!0}],list:i.map((function(t){return{id:t.id,value:t.name}}))})),n(o.taskList)},l=this.getProjectId();if(l>0)return void this.$store.dispatch("getTaskForProject",l).then((function(t){var e=o.cacheTasks.filter((function(t){return!t.archived_at&&(t.project_id==l&&0===t.parent_id&&!t.archived_at&&!t.complete_at)}));e.length>0?s(e):s([])})).catch((function(t){s([])}));s([]);break;case"~":if(this.mentionMode="file-mention",$A.isArray(this.fileList[e]))return void n(this.fileList[e]);this.fileTimer&&clearTimeout(this.fileTimer),this.fileTimer=setTimeout((function(t){o.$store.dispatch("searchFiles",e).then((function(t){var i=t.data;o.fileList[e]=[{label:[{id:0,value:o.$L("文件分享查看"),disabled:!0}],list:i.filter((function(t){return"folder"!==t.type})).map((function(t){return{id:t.id,value:t.ext?"".concat(t.name,".").concat(t.ext):t.name}}))}],n(o.fileList[e])})).catch((function(){n([])}))}),300);break;default:n([])}},getMoreUser:function(t,e){var n=this;return new Promise((function(o){var i=n.dialogData,r=i.owner_id,a="group"===i.type&&[0,n.userId].includes(r);n.taskId>0||a?(n.__getMoreTimer&&clearTimeout(n.__getMoreTimer),n.__getMoreTimer=setTimeout((function(i){n.$store.dispatch("call",{url:"users/search",data:{keys:{key:t},state:1,take:30}}).then((function(t){var n=t.data.filter((function(t){return!e.includes(t.userid)}));o(n.map((function(t){return{id:t.userid,value:t.nickname,avatar:t.userimg,online:!!t.online}})))})).catch((function(t){o([])}))}),null===n.userCache?0:600)):o([])}))},checkIOSVersion:function(){var t=(window&&window.navigator&&window.navigator.userAgent).match(/OS ((\d+_?){2,3})\s/i),e=(t?t[1].replace(/_/g,"."):"unknown").split(".");return 11==+e[0]&&+e[1]>=0&&+e[1]<3},handlePaste:function(t){var e=Array.prototype.slice.call(t.clipboardData.files);e.filter((function(t){return!$A.leftExists(t.type,"image/")})).length>0?(t.preventDefault(),this.$emit("on-file",e)):this.pasteRtf(t)&&t.preventDefault()},pasteRtf:function(t){var e=this;if(t&&t.clipboardData&&t.clipboardData.items&&!(new DOMParser).parseFromString(t.clipboardData.getData("text/html")||"","text/html").querySelector("img")){var n=[],o=null;if(t.clipboardData.types&&-1!=[].indexOf.call(t.clipboardData.types,"text/rtf")||t.clipboardData.getData("text/rtf"))(o=t.clipboardData.items[0].getAsFile())&&n.push(o);else for(var i=0;i<t.clipboardData.items.length;i++)(o=t.clipboardData.items[i].getAsFile())&&n.push(o);if(n.length>0)return n.forEach((function(t){var n=new FileReader;n.onload=function(t){var n=t.target,o=e.quill.getSelection(!0).index;e.quill.insertEmbed(o,"image",n.result),e.quill.setSelection(o+1)},n.readAsDataURL(t)})),!0}return!1}}},K=W;const Y=(0,L.Z)(K,(function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.hidePopover,expression:"hidePopover"}],staticClass:"chat-input-box",class:t.boxClass},[e("div",{staticClass:"chat-input-quick-emoji"},[e("EPopover",{ref:"emojiQuickRef",attrs:{visibleArrow:!1,transition:"",placement:"top-end",popperClass:"chat-quick-emoji-popover"},model:{value:t.emojiQuickShow,callback:function(e){t.emojiQuickShow=e},expression:"emojiQuickShow"}},[e("div",{attrs:{slot:"reference"},slot:"reference"}),t._v(" "),e("ul",{staticClass:"chat-quick-emoji-wrapper"},t._l(t.emojiQuickItems,(function(n){return e("li",{on:{click:function(e){return t.onEmojiQuick(n)}}},[e("img",{attrs:{title:n.name,alt:n.name,src:n.src}})])})),0)])],1),t._v(" "),e("div",{staticClass:"chat-input-wrapper",on:{click:function(e){return e.stopPropagation(),t.focus.apply(null,arguments)}}},[t.replyData?e("div",{staticClass:"chat-reply"},[e("UserAvatar",{attrs:{userid:t.replyData.userid,"show-icon":!1,"show-name":!0,"tooltip-disabled":!0}}),t._v(" "),e("div",{staticClass:"reply-desc"},[t._v(t._s(t.$A.getMsgSimpleDesc(t.replyData)))]),t._v(" "),e("i",{staticClass:"taskfont",on:{click:function(e){return e.stopPropagation(),t.onCancelReply.apply(null,arguments)}}},[t._v("")])],1):t._e(),t._v(" "),e("div",{ref:"editor",staticClass:"no-dark-content",style:t.editorStyle,on:{click:function(e){return e.stopPropagation(),t.onClickEditor.apply(null,arguments)},paste:t.handlePaste}}),t._v(" "),e("ul",{staticClass:"chat-toolbar",on:{click:function(t){t.stopPropagation()}}},[e("li",[t.emojiBottom?e("ETooltip",{ref:"emojiTip",attrs:{disabled:t.windowSmall||t.showEmoji,placement:"top",content:t.$L("表情")}},[e("i",{staticClass:"taskfont",on:{click:function(e){t.showEmoji=!t.showEmoji}}},[t._v("")])]):e("EPopover",{attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-emoji-popover"},model:{value:t.showEmoji,callback:function(e){t.showEmoji=e},expression:"showEmoji"}},[e("ETooltip",{ref:"emojiTip",attrs:{slot:"reference",disabled:t.windowSmall||t.showEmoji,placement:"top",content:t.$L("表情")},slot:"reference"},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),t.showEmoji?e("ChatEmoji",{attrs:{searchKey:t.emojiQuickKey},on:{"on-select":t.onSelectEmoji}}):t._e()],1)],1),t._v(" "),e("li",[e("ETooltip",{attrs:{placement:"top",disabled:t.windowSmall,content:t.$L("选择成员")}},[e("i",{staticClass:"taskfont",on:{click:function(e){return t.onToolbar("user")}}},[t._v("")])])],1),t._v(" "),e("li",[e("ETooltip",{attrs:{placement:"top",disabled:t.windowSmall,content:t.$L("选择任务")}},[e("i",{staticClass:"taskfont",on:{click:function(e){return t.onToolbar("task")}}},[t._v("")])])],1),t._v(" "),e("li",[e("EPopover",{attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-more-popover"},model:{value:t.showMore,callback:function(e){t.showMore=e},expression:"showMore"}},[e("ETooltip",{ref:"moreTip",attrs:{slot:"reference",disabled:t.windowSmall||t.showMore,placement:"top",content:t.$L("展开")},slot:"reference"},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),t.recordReady?e("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("meeting")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("新会议"))+"\n ")]):t._e(),t._v(" "),"user"===t.dialogData.type&&t.$isEEUiApp?e("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("call")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("拨打电话"))+"\n ")]):t._e(),t._v(" "),e("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("image")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("发送图片"))+"\n ")]),t._v(" "),e("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("file")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("上传文件"))+"\n ")])],1)],1),t._v(" "),e("li",{directives:[{name:"touchmouse",rawName:"v-touchmouse",value:t.clickSend,expression:"clickSend"}],staticClass:"chat-send",class:t.sendClass},[e("ETooltip",{attrs:{placement:"top",disabled:t.windowSmall,content:t.$L("recorder"===t.sendClass?"长按录音":"发送")}},[t.loading?e("div",[e("div",{staticClass:"chat-load"},[e("Loading")],1)]):e("div",[e("transition",{attrs:{name:"mobile-send"}},["recorder"===t.sendClass?e("i",{staticClass:"taskfont"},[t._v("")]):t._e()]),t._v(" "),e("transition",{attrs:{name:"mobile-send"}},["recorder"!==t.sendClass?e("i",{staticClass:"taskfont"},[t._v("")]):t._e()])],1)])],1),t._v(" "),t.recordReady?e("li",{staticClass:"chat-record-recwave"},[e("div",{ref:"recwave"})]):t._e()]),t._v(" "),e("div",{staticClass:"chat-cover",on:{click:function(e){return e.stopPropagation(),t.onClickCover.apply(null,arguments)}}})]),t._v(" "),t.emojiBottom&&t.showEmoji?e("ChatEmoji",{attrs:{searchKey:t.emojiQuickKey},on:{"on-select":t.onSelectEmoji}}):t._e(),t._v(" "),e("transition",{attrs:{name:"fade"}},[["ready","ing"].includes(t.recordState)?e("div",{directives:[{name:"transfer-dom",rawName:"v-transfer-dom"}],staticClass:"chat-input-record-transfer",class:{cancel:t.touchLimitY},style:t.recordTransferStyle,attrs:{"data-transfer":!0},on:{click:t.stopRecord}},[t.recordDuration>0?e("div",{staticClass:"record-duration"},[t._v(t._s(t.recordFormatDuration))]):e("div",{staticClass:"record-loading"},[e("Loading")],1),t._v(" "),e("div",{staticClass:"record-cancel",on:{click:function(e){return e.stopPropagation(),t.stopRecord(!0)}}},[t._v(t._s(t.$L(t.touchLimitY?"松开取消":"向上滑动取消")))])]):t._e()])],1)}),[],!1,null,null,null).exports},17451:(t,e,n)=>{"use strict";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}n.d(e,{Z:()=>q});var i=n(20629);const r={name:"WCircle",props:{percent:{type:Number,default:0},size:{type:Number,default:120}},computed:{style:function(){var t=this.size;return this.isNumeric(t)&&(t+="px"),{width:t,height:t}},args:function(){var t=this.percent,e=Math.min(360,3.6*t);return 360==e?e=0:0==e&&(e=360),{x:14,y:14,r:14,start:360,end:e}}},methods:{isNumeric:function(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)},point:function(t,e,n,o){return[(t+Math.sin(o)*n).toFixed(2),(e-Math.cos(o)*n).toFixed(2)]},full:function(t,e,n,o){return o<=0?"M ".concat(t-n," ").concat(e," A ").concat(n," ").concat(n," 0 1 1 ").concat(t+n," ").concat(e," A ").concat(n," ").concat(n," 1 1 1 ").concat(t-n," ").concat(e," Z"):"M ".concat(t-n," ").concat(e," A ").concat(n," ").concat(n," 0 1 1 ").concat(t+n," ").concat(e," A ").concat(n," ").concat(n," 1 1 1 ").concat(t-n," ").concat(e," M ").concat(t-o," ").concat(e," A ").concat(o," ").concat(o," 0 1 1 ").concat(t+o," ").concat(e," A ").concat(o," ").concat(o," 1 1 1 ").concat(t-o," ").concat(e," Z")},part:function(t,e,n,o,i,r){var a=i/360*2*Math.PI,s=r/360*2*Math.PI,l=[this.point(t,e,o,a),this.point(t,e,n,a),this.point(t,e,n,s),this.point(t,e,o,s)],c=s-a>Math.PI?"1":"0";return"M ".concat(l[0][0]," ").concat(l[0][1]," L ").concat(l[1][0]," ").concat(l[1][1]," A ").concat(n," ").concat(n," 0 ").concat(c," 1 ").concat(l[2][0]," ").concat(l[2][1]," L ").concat(l[3][0]," ").concat(l[3][1]," A ").concat(o," ").concat(o," 0 ").concat(c," 0 ").concat(l[0][0]," ").concat(l[0][1]," Z")},arc:function(t){var e=t.x,n=void 0===e?0:e,o=t.y,i=void 0===o?0:o,r=t.R,a=void 0===r?0:r,s=t.r,l=void 0===s?0:s,c=t.start,u=t.end,d=[Math.max(a,l),Math.min(a,l)];if(l=d[1],(a=d[0])<=0)return"";if(c!==+c||u!==+u)return this.full(n,i,a,l);if(Math.abs(c-u)<1e-6)return"";if(Math.abs(c-u)%360<1e-6)return this.full(n,i,a,l);var f=[c%360,u%360];return(c=f[0])>(u=f[1])&&(u+=360),this.part(n,i,a,l,c,u)}}};var a=n(51900);const s=(0,a.Z)(r,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"common-circle",style:t.style,attrs:{"data-id":t.percent}},[e("svg",{attrs:{viewBox:"0 0 28 28"}},[e("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[e("path",{staticClass:"common-circle-path",attrs:{d:"M-500-100h997V48h-997z"}}),t._v(" "),e("g",{attrs:{"fill-rule":"nonzero"}},[e("path",{staticClass:"common-circle-g-path-ring",attrs:{"stroke-width":"3",d:"M14 25.5c6.351 0 11.5-5.149 11.5-11.5S20.351 2.5 14 2.5 2.5 7.649 2.5 14 7.649 25.5 14 25.5z"}}),t._v(" "),e("path",{staticClass:"common-circle-g-path-core",attrs:{d:t.arc(t.args)}})])])])])}),[],!1,null,null,null).exports;var l=n(80641);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const f={name:"DialogView",components:{WCircle:s},directives:{longpress:n(8251).Z},props:{msgData:{type:Object,default:function(){return{}}},dialogType:{type:String,default:""},hidePercentage:{type:Boolean,default:!1},hideReply:{type:Boolean,default:!1},operateVisible:{type:Boolean,default:!1},operateAction:{type:Boolean,default:!1},isRightMsg:{type:Boolean,default:!1}},data:function(){return{timeShow:!1,operateEnter:!1,percentageLoad:0,percentageShow:!1,percentageList:[],todoLoad:0,todoShow:!1,todoList:[]}},beforeDestroy:function(){l.Store.set("audioSubscribe",this.msgData.id)},computed:u(u(u({},(0,i.rn)(["loads","audioPlaying"])),(0,i.Se)(["isLoad"])),{},{isLoading:function(){return!this.msgData.created_at||this.isLoad("msg-".concat(this.msgData.id))},viewClass:function(){var t=this.msgData,e=this.operateAction,n=this.operateEnter,o=[];return t.type&&o.push(t.type),t.reply_data&&o.push("reply-view"),e&&(o.push("operate-action"),n&&o.push("operate-enter")),o},readList:function(){return this.percentageList.filter((function(t){return t.read_at}))},unreadList:function(){return this.percentageList.filter((function(t){return!t.read_at}))},todoDoneList:function(){return this.todoList.filter((function(t){return t.done_at}))},todoUndoneList:function(){return this.todoList.filter((function(t){return!t.done_at}))},headClass:function(){var t=this.msgData,e=t.reply_id,n=t.type,o=t.msg,i=t.emoji,r=[];return 0===e&&0===$A.arrayLength(i)&&"text"===n&&(/^<img\s+class="emoticon"[^>]*?>$/.test(o.text)||/^\s*<p>\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){1,3}\s*<\/p>\s*$/.test(o.text))&&r.push("transparent"),r},contentClass:function(){var t=this.msgData,e=t.type,n=t.msg,o=[];return"text"===e&&(/^<img\s+class="emoticon"[^>]*?>$/.test(n.text)?o.push("an-emoticon"):/^\s*<p>\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){3}\s*<\/p>\s*$/.test(n.text)?o.push("three-emoji"):/^\s*<p>\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){2}\s*<\/p>\s*$/.test(n.text)?o.push("two-emoji"):/^\s*<p>\s*[\uD800-\uDBFF][\uDC00-\uDFFF]\s*<\/p>\s*$/.test(n.text)&&o.push("an-emoji")),o}}),watch:{operateAction:function(t){var e=this;this.operateEnter=!1,t&&setTimeout((function(t){return e.operateEnter=!0}),500)}},methods:{handleLongpress:function(t,e){this.$emit("on-longpress",{event:t,el:e,msgData:this.msgData})},openTodo:function(){var t=this;this.todoLoad>0||(this.todoShow?this.todoShow=!1:(this.todoLoad++,this.$store.dispatch("call",{url:"dialog/msg/todolist",data:{msg_id:this.msgData.id}}).then((function(e){var n=e.data;t.todoList=n})).catch((function(){t.todoList=[]})).finally((function(e){setTimeout((function(){t.todoLoad--,t.todoShow=!0}),100)}))))},openReadPercentage:function(){var t=this;this.percentageLoad>0||(this.percentageShow?this.percentageShow=!1:(this.percentageLoad++,this.$store.dispatch("call",{url:"dialog/msg/readlist",data:{msg_id:this.msgData.id}}).then((function(e){var n=e.data;t.percentageList=n})).catch((function(){t.percentageList=[]})).finally((function(e){setTimeout((function(){t.percentageLoad--,t.percentageShow=!0}),100)}))))},recordStyle:function(t){var e=t.duration;return{width:50+Math.min(180,Math.floor(e/150))+"px"}},recordDuration:function(t){var e=Math.floor(t/6e4),n=Math.floor(t/1e3)%60;return e>0?"".concat(e,":").concat(n,"″"):"".concat(Math.max(1,n),"″")},imageStyle:function(t){var e=t.width,n=t.height;if(e&&n){var o=e,i=n;return(e>220||n>220)&&(e>n?(o=220,i=n*(220/e)):(o=e*(220/n),i=220)),{width:o+"px",height:i+"px"}}return{}},playRecord:function(){this.operateVisible||l.Store.set("audioSubscribe",{id:this.msgData.id,src:this.msgData.msg.path})},openMeeting:function(){this.operateVisible||l.Store.set("addMeeting",{type:"join",name:this.msgData.msg.name,meetingid:this.msgData.msg.meetingid,meetingdisabled:!0})},viewReply:function(){this.$emit("on-view-reply",{msg_id:this.msgData.id,reply_id:this.msgData.reply_id})},viewText:function(t){this.$emit("on-view-text",t)},viewFile:function(){this.$emit("on-view-file",this.msgData)},downFile:function(){this.$emit("on-down-file",this.msgData)},replyList:function(){this.$emit("on-reply-list",{msg_id:this.msgData.id})},onError:function(){this.$emit("on-error",this.msgData)},onEmoji:function(t){this.$emit("on-emoji",{msg_id:this.msgData.id,symbol:t})},onShowEmojiUser:function(t){this.$emit("on-show-emoji-user",t)}}};function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const v={name:"DialogItem",components:{DialogView:(0,a.Z)(f,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dialog-view",class:t.viewClass,attrs:{"data-id":t.msgData.id}},["group"===t.dialogType?e("div",{staticClass:"dialog-username"},[e("UserAvatar",{attrs:{userid:t.msgData.userid,"show-icon":!1,"show-name":!0,"tooltip-disabled":!0}})],1):t._e(),t._v(" "),e("div",{directives:[{name:"longpress",rawName:"v-longpress",value:{callback:t.handleLongpress,delay:300},expression:"{callback: handleLongpress, delay: 300}"}],staticClass:"dialog-head",class:t.headClass},[!t.hideReply&&t.msgData.reply_data?e("div",{staticClass:"dialog-reply no-dark-content",on:{click:t.viewReply}},[e("UserAvatar",{attrs:{userid:t.msgData.reply_data.userid,"show-icon":!1,"show-name":!0,"tooltip-disabled":!0}}),t._v(" "),e("div",{staticClass:"reply-desc"},[t._v(t._s(t.$A.getMsgSimpleDesc(t.msgData.reply_data)))])],1):t._e(),t._v(" "),e("div",{staticClass:"dialog-content",class:t.contentClass},["text"===t.msgData.type?e("div",{staticClass:"content-text no-dark-content"},[e("pre",{domProps:{innerHTML:t._s(t.$A.formatTextMsg(t.msgData.msg.text,t.userId))},on:{click:t.viewText}})]):"file"===t.msgData.type?e("div",{class:"content-file ".concat(t.msgData.msg.type)},[e("div",{staticClass:"dialog-file"},["img"===t.msgData.msg.type?e("img",{staticClass:"file-img",style:t.imageStyle(t.msgData.msg),attrs:{src:t.msgData.msg.thumb},on:{click:t.viewFile}}):e("div",{staticClass:"file-box",on:{click:t.downFile}},[e("img",{staticClass:"file-thumb",attrs:{src:t.msgData.msg.thumb}}),t._v(" "),e("div",{staticClass:"file-info"},[e("div",{staticClass:"file-name"},[t._v(t._s(t.msgData.msg.name))]),t._v(" "),e("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(t.msgData.msg.size)))])])])])]):"record"===t.msgData.type?e("div",{staticClass:"content-record no-dark-content"},[e("div",{staticClass:"dialog-record",class:{playing:t.audioPlaying===t.msgData.msg.path},style:t.recordStyle(t.msgData.msg),on:{click:t.playRecord}},[e("div",{staticClass:"record-time"},[t._v(t._s(t.recordDuration(t.msgData.msg.duration)))]),t._v(" "),e("div",{staticClass:"record-icon taskfont"})])]):"meeting"===t.msgData.type?e("div",{staticClass:"content-meeting no-dark-content"},[e("ul",{staticClass:"dialog-meeting"},[e("li",[e("em",[t._v(t._s(t.$L("会议主题")))]),t._v("\n "+t._s(t.msgData.msg.name)+"\n ")]),t._v(" "),e("li",[e("em",[t._v(t._s(t.$L("会议创建人")))]),t._v(" "),e("UserAvatar",{attrs:{userid:t.msgData.msg.userid,"show-icon":!1,"show-name":!0,"tooltip-disabled":""}})],1),t._v(" "),e("li",[e("em",[t._v(t._s(t.$L("频道ID")))]),t._v("\n "+t._s(t.msgData.msg.meetingid.replace(/^(.{3})(.{3})(.*)$/,"$1 $2 $3"))+"\n ")]),t._v(" "),e("li",{staticClass:"meeting-operation",on:{click:t.openMeeting}},[t._v("\n "+t._s(t.$L("点击加入会议"))+"\n "),e("i",{staticClass:"taskfont"},[t._v("")])])])]):"loading"===t.msgData.type?e("div",{staticClass:"content-loading"},[!0===t.msgData.error?e("Icon",{attrs:{type:"ios-alert-outline"}}):e("Loading")],1):e("div",{staticClass:"content-unknown"},[t._v(t._s(t.$L("未知的消息类型")))])]),t._v(" "),t.$A.arrayLength(t.msgData.emoji)>0?e("ul",{staticClass:"dialog-emoji"},t._l(t.msgData.emoji,(function(n,o){return e("li",{key:o,class:{hasme:n.userids.includes(t.userId)},on:{click:function(e){return t.onEmoji(n.symbol)}}},[e("div",{staticClass:"emoji-symbol no-dark-content"},[t._v(t._s(n.symbol))]),t._v(" "),e("div",{staticClass:"emoji-users"},[e("ul",[t._l(n.userids,(function(o,i){return[i<5?e("li",{class:{bold:o==t.userId}},[e("UserAvatar",{attrs:{userid:o,"tooltip-disabled":"","show-name":"","show-icon":!1}})],1):5==i?e("li",{on:{click:function(e){return e.stopPropagation(),t.onShowEmojiUser(n)}}},[t._v("+"+t._s(n.userids.length-5)+"位")]):t._e()]}))],2)])])})),0):t._e()]),t._v(" "),e("div",{staticClass:"dialog-foot"},[!t.hideReply&&t.msgData.reply_num>0?e("div",{staticClass:"reply",on:{click:t.replyList}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.msgData.reply_num)+"条回复\n ")]):t._e(),t._v(" "),t.msgData.tag?e("div",{staticClass:"tag"},[e("i",{staticClass:"taskfont"},[t._v("")])]):t._e(),t._v(" "),t.msgData.todo?e("div",{staticClass:"todo",on:{click:t.openTodo}},[e("EPopover",{ref:"todo",attrs:{"popper-class":"dialog-wrapper-read-poptip",placement:t.isRightMsg?"bottom-end":"bottom-start"},model:{value:t.todoShow,callback:function(e){t.todoShow=e},expression:"todoShow"}},[e("div",{staticClass:"read-poptip-content"},[e("ul",{staticClass:"read scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.todoDoneList.length))]),t._v(t._s(t.$L("完成")))]),t._v(" "),t._l(t.todoDoneList,(function(t){return e("li",[e("UserAvatar",{attrs:{userid:t.userid,size:26,showName:"",tooltipDisabled:""}})],1)}))],2),t._v(" "),e("ul",{staticClass:"unread scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.todoUndoneList.length))]),t._v(t._s(t.$L("待办")))]),t._v(" "),t._l(t.todoUndoneList,(function(t){return e("li",[e("UserAvatar",{attrs:{userid:t.userid,size:26,showName:"",tooltipDisabled:""}})],1)}))],2)]),t._v(" "),e("div",{staticClass:"popover-reference",attrs:{slot:"reference"},slot:"reference"})]),t._v(" "),t.todoLoad>0?e("Loading"):e("i",{staticClass:"taskfont"},[t._v("")])],1):t._e(),t._v(" "),t.msgData.modify?e("div",{staticClass:"modify"},[e("i",{staticClass:"taskfont"},[t._v("")])]):t._e(),t._v(" "),!0===t.msgData.error?e("div",{staticClass:"error",on:{click:t.onError}},[e("Icon",{attrs:{type:"ios-alert"}})],1):t.isLoading?e("Loading"):[t.timeShow?e("div",{staticClass:"time",on:{click:function(e){t.timeShow=!1}}},[t._v(t._s(t.msgData.created_at))]):e("div",{staticClass:"time",attrs:{title:t.msgData.created_at},on:{click:function(e){t.timeShow=!0}}},[t._v(t._s(t.$A.formatTime(t.msgData.created_at)))]),t._v(" "),t.hidePercentage?t._e():[t.msgData.send>1||"group"===t.dialogType?e("div",{staticClass:"percent",on:{click:t.openReadPercentage}},[e("EPopover",{ref:"percent",attrs:{"popper-class":"dialog-wrapper-read-poptip",placement:t.isRightMsg?"bottom-end":"bottom-start"},model:{value:t.percentageShow,callback:function(e){t.percentageShow=e},expression:"percentageShow"}},[e("div",{staticClass:"read-poptip-content"},[e("ul",{staticClass:"read scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.readList.length))]),t._v(t._s(t.$L("已读")))]),t._v(" "),t._l(t.readList,(function(t){return e("li",[e("UserAvatar",{attrs:{userid:t.userid,size:26,showName:"",tooltipDisabled:""}})],1)}))],2),t._v(" "),e("ul",{staticClass:"unread scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.unreadList.length))]),t._v(t._s(t.$L("未读")))]),t._v(" "),t._l(t.unreadList,(function(t){return e("li",[e("UserAvatar",{attrs:{userid:t.userid,size:26,showName:"",tooltipDisabled:""}})],1)}))],2)]),t._v(" "),e("div",{staticClass:"popover-reference",attrs:{slot:"reference"},slot:"reference"})]),t._v(" "),t.percentageLoad>0?e("Loading"):e("WCircle",{attrs:{percent:t.msgData.percentage,size:14}})],1):100===t.msgData.percentage?e("Icon",{staticClass:"done",attrs:{type:"md-done-all"}}):e("Icon",{staticClass:"done",attrs:{type:"md-checkmark"}})]]],2)])}),[],!1,null,null,null).exports},props:{source:{type:Object,default:function(){return{}}},dialogData:{type:Object,default:function(){return{}}},operateVisible:{type:Boolean,default:!1},operateItem:{type:Object,default:function(){return{}}},simpleView:{type:Boolean,default:!1},isMyDialog:{type:Boolean,default:!1},msgId:{type:Number,default:0}},data:function(){return{subscribe:null}},computed:p(p({},(0,i.rn)(["userId"])),{},{isRightMsg:function(){return this.source.userid==this.userId},isReply:function(){return this.simpleView||this.msgId===this.source.id},hidePercentage:function(){return this.simpleView||this.isMyDialog||this.isReply},hideReply:function(){return this.simpleView||this.msgId>0},classArray:function(){return{"dialog-item":!0,"reply-item":this.isReply,self:this.isRightMsg}}}),watch:{source:{handler:function(){this.msgRead()},immediate:!0},windowActive:function(t){t&&this.msgRead()}},methods:{msgRead:function(){this.windowActive&&this.$store.dispatch("dialogMsgRead",this.source)},formatTodoUser:function(t){if($A.isJson(t)){var e=t.userids;if(e)return e.split(",")}return[]},onViewTag:function(){this.onViewReply({msg_id:this.source.id,reply_id:this.source.msg.data.id})},onViewTodo:function(){this.onViewReply({msg_id:this.source.id,reply_id:this.source.msg.data.id})},onLongpress:function(t){this.dispatch("on-longpress",t)},onViewReply:function(t){this.dispatch("on-view-reply",t)},onViewText:function(t){this.dispatch("on-view-text",t)},onViewFile:function(t){this.dispatch("on-view-file",t)},onDownFile:function(t){this.dispatch("on-down-file",t)},onReplyList:function(t){this.dispatch("on-reply-list",t)},onError:function(t){this.dispatch("on-error",t)},onEmoji:function(t){this.dispatch("on-emoji",t)},onShowEmojiUser:function(t){this.dispatch("on-show-emoji-user",t)},dispatch:function(t,e){if(this.isReply)this.$emit(t,e);else{for(var n=this.$parent,o=n.$options.name;n&&(!o||"virtual-list"!==o);)(n=n.$parent)&&(o=n.$options.name);n&&n.$emit(t,e)}}}};const g=(0,a.Z)(v,(function(){var t=this,e=t._self._c;return e("div",{class:t.classArray},["tag"===t.source.type?e("div",{staticClass:"dialog-tag",on:{click:t.onViewTag}},[e("div",{staticClass:"tag-user"},[e("UserAvatar",{attrs:{userid:t.source.userid,tooltipDisabled:t.source.userid==t.userId,"show-name":!0,"show-icon":!1}})],1),t._v("\n "+t._s(t.$L("remove"===t.source.msg.action?"取消标注":"标注了"))+'\n "'+t._s(t.$A.getMsgSimpleDesc(t.source.msg.data))+'"\n ')]):"todo"===t.source.type?e("div",{staticClass:"dialog-todo",on:{click:t.onViewTodo}},[e("div",{staticClass:"todo-user"},[e("UserAvatar",{attrs:{userid:t.source.userid,tooltipDisabled:t.source.userid==t.userId,"show-name":!0,"show-icon":!1}})],1),t._v("\n "+t._s(t.$L("remove"===t.source.msg.action?"取消待办":"done"===t.source.msg.action?"完成":"设待办"))+'\n "'+t._s(t.$A.getMsgSimpleDesc(t.source.msg.data))+'"\n '),t.formatTodoUser(t.source.msg.data).length>0?e("div",{staticClass:"todo-users"},[e("span",[t._v(t._s(t.$L("给")))]),t._v(" "),t._l(t.formatTodoUser(t.source.msg.data),(function(n,o){return[o<3?e("div",{staticClass:"todo-user"},[e("UserAvatar",{attrs:{userid:n,tooltipDisabled:n==t.userId,"show-name":!0,"show-icon":!1}})],1):3==o?e("div",{staticClass:"todo-user"},[t._v("+"+t._s(t.formatTodoUser(t.source.msg.data).length-3))]):t._e()]}))],2):t._e()]):"notice"===t.source.type?e("div",{staticClass:"dialog-notice"},[t._v("\n "+t._s(t.source.msg.notice)+"\n ")]):[e("div",{staticClass:"dialog-avatar"},[e("UserAvatar",{attrs:{userid:t.source.userid,tooltipDisabled:t.source.userid==t.userId||"group"!=t.dialogData.type,"show-icon-menu":"group"==t.dialogData.type,"open-delay":100,size:30}})],1),t._v(" "),e("DialogView",{attrs:{"msg-data":t.source,"dialog-type":t.dialogData.type,"hide-percentage":t.hidePercentage,"hide-reply":t.hideReply,"operate-visible":t.operateVisible,"operate-action":t.operateVisible&&t.source.id===t.operateItem.id,"is-right-msg":t.isRightMsg},on:{"on-longpress":t.onLongpress,"on-view-reply":t.onViewReply,"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-reply-list":t.onReplyList,"on-error":t.onError,"on-emoji":t.onEmoji,"on-show-emoji-user":t.onShowEmojiUser}})]],2)}),[],!1,null,null,null).exports;const y={name:"DialogUpload",props:{dialogId:{type:Number,default:0},replyId:{type:Number,default:0},maxSize:{type:Number,default:1024e3}},data:function(){return{uploadFormat:["text","md","markdown","drawio","mind","docx","wps","doc","xls","xlsx","ppt","pptx","jpg","jpeg","png","gif","bmp","ico","raw","svg","rar","zip","jar","7-zip","tar","gzip","7z","gz","apk","dmg","tif","tiff","dwg","dxf","ofd","pdf","txt","htaccess","htgroups","htpasswd","conf","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","cs","css","dockerfile","go","golang","html","htm","xhtml","vue","we","wpy","java","js","jsm","jsx","json","jsp","less","lua","makefile","gnumakefile","ocamlmakefile","make","mysql","nginx","ini","cfg","prefs","m","mm","pl","pm","p6","pl6","pm6","pgsql","php","inc","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","py","r","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scss","sh","bash","bashrc","sql","sqlserver","swift","ts","typescript","str","vbs","vb","v","vh","sv","svh","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","yaml","yml","asp","properties","gitignore","log","bas","prg","python","ftl","aspx","plist","mp3","wav","mp4","flv","avi","mov","wmv","mkv","3gp","rm","xmind","rp"],actionUrl:$A.apiUrl("dialog/msg/sendfile")}},computed:{headers:function(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}},params:function(){return{dialog_id:this.dialogId,reply_id:this.replyId}}},methods:{handleProgress:function(t,e){void 0===e.tempId&&(e.tempId=$A.randNum(1e9,9999999999),this.$emit("on-progress",e))},handleSuccess:function(t,e){1===t.ret?(e.data=t.data,this.$emit("on-success",e),t.data.task_id&&this.$store.dispatch("getTaskFiles",t.data.task_id)):($A.modalWarning({title:"发送失败",content:"文件 "+e.name+" 发送失败,"+t.msg}),this.$emit("on-error",e),this.$refs.upload.fileList.pop())},handleFormatError:function(t){$A.modalWarning({title:"文件格式不正确",content:"文件 "+t.name+" 格式不正确,仅支持发送:"+this.uploadFormat.join(",")})},handleMaxSize:function(t){$A.modalWarning({title:"超出文件大小限制",content:"文件 "+t.name+" 太大,不能发送超过"+$A.bytesToSize(1024*this.maxSize)+"。"})},handleClick:function(){this.$refs.upload.handleClick()},upload:function(t){this.$refs.upload.upload(t)}}};const b=(0,a.Z)(y,(function(){var t=this;return(0,t._self._c)("Upload",{ref:"upload",attrs:{name:"files",action:t.actionUrl,headers:t.headers,data:t.params,multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize}})}),[],!1,null,null,null).exports;var _=n(42238),w=n(81034);function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){x(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const C={name:"DialogGroupInfo",components:{UserInput:_.Z},props:{dialogId:{type:Number,default:0}},data:function(){return{searchKey:"",loadIng:0,dialogUser:[],addShow:!1,addData:{},addLoad:0,openIng:!1}},computed:O(O({},(0,i.rn)(["cacheDialogs","cacheUserBasic"])),{},{dialogData:function(){var t=this;return this.cacheDialogs.find((function(e){return e.id==t.dialogId}))||{}},groupType:function(){var t=this.dialogData.group_type;return"department"===t?"部门群组":"project"===t?"项目群组":"task"===t?"任务群组":"user"===t?"个人群组":"all"===t?"全员群组":"未知"},userList:function(){var t=this.dialogUser,e=this.searchKey,n=this.cacheUserBasic,o=this.dialogData;return t.map((function(t){var e=n.find((function(e){return e.userid==t.userid}));return e&&(t.nickname=e.nickname,t.email=e.email),t})).filter((function(t){return!(e&&t.nickname&&!$A.strExists(t.nickname,e)&&!$A.strExists(t.email,e))})).sort((function(t,e){return t.userid===o.owner_id||e.userid===o.owner_id?(t.userid===o.owner_id?0:1)-(e.userid===o.owner_id?0:1):$A.Date(t.created_at)-$A.Date(e.created_at)}))}}),watch:{dialogId:{handler:function(){this.getDialogUser()},immediate:!0}},methods:{updateName:function(t,e){var n=this;t?this.$store.dispatch("call",{url:"dialog/group/edit",data:{dialog_id:this.dialogId,chat_name:t}}).then((function(t){var o=t.data;n.$store.dispatch("saveDialog",o),e()})).catch((function(t){var n=t.msg;$A.modalError(n),e()})):e()},getDialogUser:function(){var t=this;this.dialogId<=0||(this.loadIng++,this.$store.dispatch("call",{url:"dialog/user",data:{dialog_id:this.dialogId}}).then((function(e){var n=e.data;t.dialogUser=n,t.$store.dispatch("saveDialog",{id:t.dialogId,people:n.length})})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.loadIng--})))},openAdd:function(){this.addData={dialog_id:this.dialogId,userids:[],disabledChoice:this.dialogUser.map((function(t){return t.userid}))},this.addShow=!0},onAdd:function(){var t=this;this.addLoad++,this.$store.dispatch("call",{url:"dialog/group/adduser",data:this.addData}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.addShow=!1,t.addData={},t.getDialogUser()})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.addLoad--}))},onExit:function(t){var e=this,n="你确定要退出群组吗?",o=[];$A.isJson(t)&&(n="你确定要将【".concat(t.nickname,"】移出群组吗?"),o=[t.userid]),$A.modalConfirm({content:n,loading:!0,onOk:function(){return new Promise((function(t,n){e.$store.dispatch("call",{url:"dialog/group/deluser",data:{dialog_id:e.dialogId,userids:o}}).then((function(n){var i=n.msg;t(i),o.length>0?e.getDialogUser():(e.$store.dispatch("forgetDialog",e.dialogId),e.goForward({name:"manage-messenger"}))})).catch((function(t){var e=t.msg;n(e)}))}))}})},openUser:function(t){var e=this;this.openIng||(this.openIng=!0,this.$store.dispatch("showSpinner",600),this.$store.dispatch("openDialogUserid",t).then((function(t){e.$emit("on-close")})).finally((function(t){e.openIng=!1,e.$store.dispatch("hiddenSpinner")})))}}};const S=(0,a.Z)(C,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dialog-group-info"},[e("div",{staticClass:"group-info-title"},[t._v(t._s(t.$L("群名")))]),t._v(" "),e("div",{staticClass:"group-info-value"},[e("QuickEdit",{attrs:{value:t.dialogData.name,disabled:t.dialogData.owner_id!=t.userId},on:{"on-update":t.updateName}},[t._v(t._s(t.dialogData.name))])],1),t._v(" "),e("div",{staticClass:"group-info-title"},[t._v(t._s(t.$L("群类型")))]),t._v(" "),e("div",{staticClass:"group-info-value"},[t._v(t._s(t.$L(t.groupType)))]),t._v(" "),e("div",{staticClass:"group-info-search"},[e("Input",{attrs:{prefix:"ios-search",placeholder:t.$L("搜索"),clearable:""},model:{value:t.searchKey,callback:function(e){t.searchKey=e},expression:"searchKey"}})],1),t._v(" "),e("div",{staticClass:"group-info-user"},[e("ul",[t._l(t.userList,(function(n,o){return e("li",{key:o,on:{click:function(e){return t.openUser(n.userid)}}},[e("UserAvatar",{attrs:{userid:n.userid,size:32,showName:"",tooltipDisabled:""}}),t._v(" "),n.userid===t.dialogData.owner_id?e("div",{staticClass:"user-tag"},[t._v(t._s(t.$L("群主")))]):t.dialogData.owner_id==t.userId||n.inviter==t.userId?e("div",{staticClass:"user-exit",on:{click:function(e){return e.stopPropagation(),t.onExit(n)}}},[e("Icon",{attrs:{type:"md-exit"}})],1):t._e()],1)})),t._v(" "),0===t.userList.length?e("li",{staticClass:"no"},[t.loadIng>0?e("Loading"):e("span",[t._v(t._s(t.$L("没有符合条件的数据")))])],1):t._e()],2)]),t._v(" "),"all"!==t.dialogData.group_type?e("div",{staticClass:"group-info-button"},[t.dialogData.owner_id==t.userId||0==t.dialogData.owner_id?e("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:t.openAdd}},[t._v(t._s(t.$L("添加成员")))]):t._e()],1):t._e(),t._v(" "),e("Modal",{attrs:{title:t.$L("添加群成员"),"mask-closable":!1},model:{value:t.addShow,callback:function(e){t.addShow=e},expression:"addShow"}},[e("Form",{attrs:{model:t.addData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("新增成员")}},[e("UserInput",{attrs:{disabledChoice:t.addData.disabledChoice,"multiple-max":100,placeholder:t.$L("选择成员")},model:{value:t.addData.userids,callback:function(e){t.$set(t.addData,"userids",e)},expression:"addData.userids"}}),t._v(" "),"department"===t.dialogData.group_type?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("此操作仅加入群成员并不会加入部门")))]):"project"===t.dialogData.group_type?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("此操作仅加入群成员并不会加入项目")))]):"task"===t.dialogData.group_type?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("此操作仅加入群成员并不会加入任务负责人")))]):t._e()],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.addShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.addLoad>0},on:{click:t.onAdd}},[t._v(t._s(t.$L("确定添加")))])],1)],1)],1)}),[],!1,null,null,null).exports;const j={name:"DialogRespond",props:{respondData:{type:Object,default:function(){return{}}}},data:function(){return{openIng:!1}},methods:{openUser:function(t){var e=this;this.openIng||(this.openIng=!0,this.$store.dispatch("showSpinner",600),this.$store.dispatch("openDialogUserid",t).then((function(t){e.$emit("on-close")})).finally((function(t){e.openIng=!1,e.$store.dispatch("hiddenSpinner")})))}}};const T=(0,a.Z)(j,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dialog-respond"},[e("div",{staticClass:"respond-title"},[e("em",[t._v(t._s(t.respondData.symbol))]),t._v(t._s(t.$L("回应详情"))+" ("+t._s(t.respondData.userids.length)+")")]),t._v(" "),e("div",{staticClass:"respond-user"},[e("ul",t._l(t.respondData.userids,(function(n,o){return e("li",{key:o,on:{click:function(e){return t.openUser(n)}}},[e("UserAvatar",{attrs:{userid:n,size:32,showName:"",tooltipDisabled:""}})],1)})),0)])])}),[],!1,null,null,null).exports;var E=n(68024),D=n(85662);function A(t){return A="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},A(t)}function I(t){return function(t){if(Array.isArray(t))return L(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return L(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function $(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?P(Object(n),!0).forEach((function(e){N(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function N(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const M={name:"DialogWrapper",components:{DialogRespond:T,DialogItem:g,VirtualList:n.n(D)(),ChatInput:E.Z,DialogGroupInfo:S,DrawerOverlay:w.Z,UserInput:_.Z,DialogUpload:b},props:{dialogId:{type:Number,default:0},msgId:{type:Number,default:0},autoFocus:{type:Boolean,default:!1},beforeBack:Function},data:function(){return{msgItem:g,msgText:"",msgNew:0,msgType:"",allMsgs:[],tempMsgs:[],pasteShow:!1,pasteFile:[],pasteItem:[],createGroupShow:!1,createGroupData:{},createGroupLoad:0,forwardShow:!1,forwardLoad:!1,forwardData:{dialogids:[],userids:[]},openId:0,dialogDrag:!1,groupInfoShow:!1,groupTransferShow:!1,groupTransferLoad:0,groupTransferData:{userid:[],disabledChoice:[]},navStyle:{},operateVisible:!1,operateCopys:[],operateStyles:{},operateItem:{},operateEmojis:["👌","🤝","🎉","❤️","👍","🥰","🥳️","✅","❌","⭕️","❓","🚀","👀"],recordState:"",wrapperStart:{},scrollTail:0,preventMoreLoad:!1,preventToBottom:!1,replyActiveId:0,replyActiveIndex:-1,replyActiveUpdate:!1,replyListShow:!1,replyListId:0,respondShow:!1,respondData:{},todoSettingShow:!1,todoSettingLoad:0,todoSettingData:{type:"all",userids:[]},todoViewLoad:!1,todoViewPosLoad:!1,todoViewShow:!1,todoViewData:{},todoViewMid:0,todoViewId:0,scrollDisabled:!1,scrollDirection:null,scrollAction:0,scrollTmp:0}},beforeDestroy:function(){this.$store.dispatch("forgetInDialog",this._uid)},computed:$($($({},(0,i.rn)(["userIsAdmin","taskId","dialogSearchMsgId","dialogMsgs","dialogTodos","dialogMsgTransfer","cacheDialogs","wsOpenNum","touchBackInProgress","dialogIns"])),(0,i.Se)(["isLoad"])),{},{isReady:function(){return this.dialogId>0&&this.dialogData.id>0},dialogData:function(){var t=this;return this.cacheDialogs.find((function(e){return e.id==t.dialogId}))||{}},dialogList:function(){return this.cacheDialogs.filter((function(t){return!(void 0===t.name||1===t.dialog_delete)})).sort((function(t,e){return t.top_at||e.top_at?$A.Date(e.top_at)-$A.Date(t.top_at):t.todo_num>0||e.todo_num>0?e.todo_num-t.todo_num:$A.Date(e.last_at)-$A.Date(t.last_at)}))},dialogMsgList:function(){var t=this;return this.isReady?this.dialogMsgs.filter((function(e){return e.dialog_id==t.dialogId})):[]},tempMsgList:function(){var t=this;return this.isReady?this.tempMsgs.filter((function(e){return e.dialog_id==t.dialogId})):[]},allMsgList:function(){var t=this,e=[];if(e.push.apply(e,I(this.dialogMsgList.filter((function(e){return t.msgFilter(e)})))),this.msgId>0){var n=this.dialogMsgs.find((function(e){return e.id==t.msgId}));n&&e.unshift(n)}if(this.tempMsgList.length>0){var o=e.map((function(t){return t.id})),i=this.tempMsgList.filter((function(e){return!o.includes(e.id)&&t.msgFilter(e)}));i.length>0&&e.push.apply(e,I(i))}return e.sort((function(t,e){return t.id-e.id}))},loadMsg:function(){return this.isLoad("msg::".concat(this.dialogId,"-").concat(this.msgId,"-").concat(this.msgType))},prevId:function(){return this.allMsgs.length>0?$A.runNum(this.allMsgs[0].prev_id):0},peopleNum:function(){return"group"===this.dialogData.type?$A.runNum(this.dialogData.people):0},pasteTitle:function(){var t=this.pasteItem,e=t.find((function(t){return"image"==t.type})),n=t.find((function(t){return"image"!=t.type}));return e&&n?"发送文件/图片":e?"发送图片":"发送文件"},msgTags:function(){var t=[{type:"",label:"消息"}];return this.dialogData.has_tag&&t.push({type:"tag",label:"标注"}),this.dialogData.has_image&&t.push({type:"image",label:"图片"}),this.dialogData.has_file&&t.push({type:"file",label:"文件"}),this.dialogData.has_link&&t.push({type:"link",label:"链接"}),"project"===this.dialogData.group_type&&t.push({type:"project",label:"打开项目"}),"task"===this.dialogData.group_type&&t.push({type:"task",label:"打开任务"}),t},todoList:function(){var t=this;return this.dialogData.todo_num?this.dialogTodos.filter((function(e){return!e.done_at&&e.dialog_id==t.dialogId})).sort((function(t,e){return e.id-t.id})):[]},todoShow:function(){return this.todoList.length>0&&0===this.windowScrollY&&0===this.replyId},wrapperClass:function(){return["ready","ing"].includes(this.recordState)?["record-ready"]:null},tagShow:function(){return this.msgTags.length>1&&0===this.windowScrollY},scrollerClass:function(){return!this.$slots.head&&this.tagShow?"default-header":null},pasteWrapperClass:function(){return this.pasteItem.find((function(t){return"image"!==t.type}))?["multiple"]:[]},footerClass:function(){return this.msgNew>0&&this.allMsgs.length>0?"newmsg":this.scrollTail>500?"goto":null},msgUnreadOnly:function(){var t=0;return this.cacheDialogs.some((function(e){t+=$A.getDialogUnread(e)})),t<=0?"":(t>99&&(t="99+"),String(t))},isMyDialog:function(){var t=this.dialogData,e=this.userId;return t.dialog_user&&t.dialog_user.userid==e},isMute:function(){if("all"===this.dialogData.group_type){if("all"===this.dialogData.all_group_mute)return!0;if("user"===this.dialogData.all_group_mute&&!this.userIsAdmin)return!0}return!1},replyId:function(){return parseInt(this.msgId>0?this.msgId:this.replyActiveId)},replyItem:function(){var t=this;return this.replyId?this.allMsgs.find((function(e){return e.id===t.replyId})):null},todoViewMsg:function(){var t=this;if(this.todoViewMid){var e=this.allMsgs.find((function(e){return e.id==t.todoViewMid}));if(e)return e;if(this.todoViewData.id===this.todoViewMid)return this.todoViewData}return null}}),watch:{dialogId:{handler:function(t){var e=this;t&&(this.msgNew=0,this.msgType="",this.replyActiveId=0,this.allMsgList.length>0&&(this.allMsgs=this.allMsgList,requestAnimationFrame(this.onToBottom)),this.$store.dispatch("getDialogMsgs",{dialog_id:t,msg_id:this.msgId,msg_type:this.msgType}).then((function(n){e.openId=t,setTimeout(e.onSearchMsgId,100)})).catch((function(t){})),this.$store.dispatch("saveInDialog",{uid:this._uid,dialog_id:t}),this.autoFocus&&this.inputFocus())},immediate:!0},msgType:function(){this.$store.dispatch("getDialogMsgs",{dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,clear_before:!0}).catch((function(t){}))},dialogSearchMsgId:function(){this.onSearchMsgId()},dialogMsgTransfer:{handler:function(t){var e=this,n=t.time,o=t.msgFile,i=t.msgRecord,r=t.msgText;n>$A.Time()&&(this.$store.state.dialogMsgTransfer.time=0,this.$nextTick((function(){$A.isArray(o)&&o.length>0?e.sendFileMsg(o):$A.isJson(i)&&i.duration>0?e.sendRecord(i):r&&e.sendMsg(r)})))},immediate:!0},wsOpenNum:function(t){t<=1||this.$store.dispatch("getDialogMsgs",{dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType}).catch((function(t){}))},allMsgList:function(t,e){var n=this.scrollInfo().tail;if(this.allMsgs=t,!this.windowActive||n>10&&e.length>0){var o=e[e.length-1]?e[e.length-1].id:0,i=t.filter((function(t){return t.id&&t.id>o}));this.msgNew+=i.length}else this.preventToBottom||this.$nextTick(this.onToBottom)},windowScrollY:function(t){if($A.isIos()){var e=this.scrollInfo().tail;this.navStyle={marginTop:t+"px"},e<=10&&requestAnimationFrame(this.onToBottom)}},windowActive:function(t){if(t&&this.autoFocus){var e=$A.last(this.dialogIns);e&&e.uid===this._uid&&this.inputFocus()}},dialogDrag:function(t){t&&(this.operateVisible=!1)},replyActiveIndex:function(t){var e=this;t>-1&&setTimeout((function(t){return e.replyActiveIndex=-1}),800)}},methods:{sendMsg:function(t){var e,n=this,o=!1;if("string"==typeof t&&t?e=t:(e=this.msgText,o=!0),""!=e){if(e=e.replace(/<\/span> <\/p>$/,"</span></p>"),this.replyActiveUpdate){e=e.replace(new RegExp("src=([\"'])".concat($A.apiUrl("../")),"g"),"src=$1{{RemoteURL}}");var i=this.replyId;this.$store.dispatch("setLoad",{key:"msg-".concat(i),delay:600}),this.replyActiveId=0,this.onActive(),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:this.dialogId,update_id:i,text:e},method:"post",complete:function(t){return n.$store.dispatch("cancelLoad","msg-".concat(i))}}).then((function(t){var e=t.data;n.sendSuccess(e),n.onPositionId(i)})).catch((function(t){var e=t.msg;$A.modalError(e)}))}else{var r=$A.randNum(1e9,9999999999),a=$A.stringLength(e.replace(/<img[^>]*?>/g,""))>2e3,s={id:r,dialog_id:this.dialogData.id,reply_id:this.replyId,reply_data:this.replyItem,type:a?"loading":"text",userid:this.userId,msg:{text:a?"":e}};this.tempMsgs.push(s),this.msgType="",this.replyActiveId=0,this.onActive(),this.$nextTick(this.onToBottom),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:s.dialog_id,reply_id:s.reply_id,text:e},method:"post"}).then((function(t){var e=t.data;n.tempMsgs=n.tempMsgs.filter((function(t){return t.id!=r})),n.sendSuccess(e)})).catch((function(t){n.$set(s,"error",!0),n.$set(s,"errorData",{type:"text",content:t.msg,msg:e})}))}o&&requestAnimationFrame((function(t){return n.msgText=""}))}else this.inputFocus()},sendRecord:function(t){var e=this,n=$A.randNum(1e9,9999999999),o={id:n,dialog_id:this.dialogData.id,reply_id:this.replyId,reply_data:this.replyItem,type:"loading",userid:this.userId,msg:t};this.tempMsgs.push(o),this.msgType="",this.replyActiveId=0,this.onActive(),this.$nextTick(this.onToBottom),this.$store.dispatch("call",{url:"dialog/msg/sendrecord",data:Object.assign(t,{dialog_id:this.dialogId,reply_id:this.replyId}),method:"post"}).then((function(t){var o=t.data;e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n})),e.sendSuccess(o)})).catch((function(n){e.$set(o,"error",!0),e.$set(o,"errorData",{type:"record",content:n.msg,msg:t})}))},sendFileMsg:function(t){var e=this,n=$A.isArray(t)?t:[t];n.length>0&&(this.pasteFile=[],this.pasteItem=[],n.some((function(t){var n={type:$A.getMiddle(t.type,null,"/"),name:t.name,size:t.size,result:null};if("image"===n.type){var o=new FileReader;o.readAsDataURL(t),o.onload=function(o){var i=o.target;n.result=i.result,e.pasteFile.push(t),e.pasteItem.push(n),e.pasteShow=!0}}else e.pasteFile.push(t),e.pasteItem.push(n),e.pasteShow=!0})))},msgFilter:function(t){if(this.msgType)if("tag"===this.msgType){if(!t.tag)return!1}else if("link"===this.msgType){if(!t.link)return!1}else if(this.msgType!==t.mtype)return!1;return!this.msgId||t.reply_id==this.msgId},onSearchMsgId:function(){this.dialogSearchMsgId>0&&this.openId===this.dialogId&&(this.onPositionId(this.dialogSearchMsgId),this.$store.state.dialogSearchMsgId=0)},onPositionId:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return new Promise((function(i,r){if(0===t)return $A.modalError("查看失败:参数错误"),void r();if(e.loadMsg||""!==e.msgType){if(e.msgType="",0===o)e.$store.dispatch("showSpinner",600);else if(o>20)return e.$store.dispatch("hiddenSpinner"),$A.modalError("查看失败:请求超时"),void r();return o++,void setTimeout((function(a){e.onPositionId(t,n,o).then(i).catch(r)}),Math.min(800,200*o))}o>0&&e.$store.dispatch("hiddenSpinner");var a=e.allMsgs.findIndex((function(e){return e.id===t})),s=e.prevId>0?0:-1;a>s?setTimeout((function(t){e.onToIndex(a),i()}),200):(n>0&&e.$store.dispatch("setLoad",{key:"msg-".concat(n),delay:600}),e.preventToBottom=!0,e.$store.dispatch("getDialogMsgs",{dialog_id:e.dialogId,msg_id:e.msgId,msg_type:e.msgType,position_id:t,spinner:2e3}).finally((function(o){var r=e.allMsgs.findIndex((function(e){return e.id===t}));r>-1&&(e.onToIndex(r),i()),n>0&&e.$store.dispatch("cancelLoad","msg-".concat(n)),e.preventToBottom=!1})))}))},onViewTodo:function(t){var e=this;if(!this.operateVisible){this.todoViewId=t.id,this.todoViewMid=t.msg_id,this.todoViewShow=!0;var n=this.allMsgs.findIndex((function(t){return t.id===e.todoViewMid}));-1===n&&this.$store.dispatch("call",{url:"dialog/msg/one",data:{msg_id:this.todoViewMid}}).then((function(t){var n=t.data;e.todoViewData=n}))}},onCloseTodo:function(){this.todoViewLoad=!1,this.todoViewShow=!1,this.todoViewData={},this.todoViewMid=0,this.todoViewId=0},onPosTodo:function(){var t=this;this.todoViewMid&&(this.todoViewPosLoad=!0,this.onPositionId(this.todoViewMid).then(this.onCloseTodo).finally((function(e){t.todoViewPosLoad=!1})))},onDoneTodo:function(){var t=this;this.todoViewId&&!this.todoViewLoad&&(this.todoViewLoad=!0,this.$store.dispatch("call",{url:"dialog/msg/done",data:{id:this.todoViewId}}).then((function(e){var n=e.data;t.$store.dispatch("saveDialogTodo",{id:t.todoViewId,done_at:$A.formatDate("Y-m-d H:i:s")}),t.$store.dispatch("saveDialog",{id:t.dialogId,todo_num:t.todoList.length}),n.add&&t.sendSuccess(n.add),0===t.todoList.length&&t.$store.dispatch("getDialogTodo",t.dialogId),t.onCloseTodo()})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.todoViewLoad=!1})))},itemClassAdd:function(t){return t===this.replyActiveIndex?"common-shake":""},inputFocus:function(){var t=this;this.$nextTick((function(e){t.$refs.input&&t.$refs.input.focus()}))},onRecordState:function(t){this.recordState=t},chatPasteDrag:function(t,e){this.dialogDrag=!1;var n="drag"===e?t.dataTransfer.files:t.clipboardData.files,o=Array.prototype.slice.call(n);o.length>0&&(t.preventDefault(),this.sendFileMsg(o))},chatDragOver:function(t,e){var n=this,o=this.__dialogDrag=$A.randomString(8);if(t){if("move"===e.dataTransfer.effectAllowed)return;this.dialogDrag=!0}else setTimeout((function(){o===n.__dialogDrag&&(n.dialogDrag=t)}),150)},onTouchStart:function(t){this.wrapperStart=Object.assign(this.scrollInfo(),{clientY:t.touches[0].clientY,exclud:!this.$refs.scroller.$el.contains(t.target)})},onTouchMove:function(t){if(this.windowSmall&&this.windowScrollY>0){if(this.wrapperStart.exclud)return void t.preventDefault();this.wrapperStart.clientY>t.touches[0].clientY?0===this.wrapperStart.tail&&t.preventDefault():0===this.wrapperStart.offset&&t.preventDefault()}},pasteSend:function(){var t=this;this.pasteFile.some((function(e){t.$refs.chatUpload.upload(e)}))},chatFile:function(t,e){switch(t){case"progress":var n={id:e.tempId,dialog_id:this.dialogData.id,reply_id:this.replyId,type:"loading",userid:this.userId,msg:{}};this.tempMsgs.push(n),this.msgType="",this.replyActiveId=0,this.onActive(),this.$nextTick(this.onToBottom);break;case"error":this.tempMsgs=this.tempMsgs.filter((function(t){return t.id!=e.tempId}));break;case"success":this.tempMsgs=this.tempMsgs.filter((function(t){return t.id!=e.tempId})),this.sendSuccess(e.data)}},sendSuccess:function(t){$A.isArray(t)?t.some(this.sendSuccess):(this.$store.dispatch("saveDialogMsg",t),this.replyActiveUpdate||(this.$store.dispatch("increaseTaskMsgNum",t),this.$store.dispatch("increaseMsgReplyNum",t),this.$store.dispatch("updateDialogLastMsg",t)),this.onCancelReply(),this.onActive())},onEventFocus:function(){this.$emit("on-focus")},onEventBlur:function(){this.$emit("on-blur")},onEventMore:function(t){switch(t){case"call":this.onCallTel();break;case"image":case"file":this.$refs.chatUpload.handleClick()}},onCallTel:function(){var t=this;this.$store.dispatch("call",{url:"dialog/tel",data:{dialog_id:this.dialogId},spinner:600}).then((function(e){var n=e.data;n.tel&&$A.eeuiAppSendMessage({action:"callTel",tel:n.tel}),n.add&&(t.$store.dispatch("saveDialogMsg",n.add),t.$store.dispatch("updateDialogLastMsg",n.add),t.onActive())})).catch((function(t){var e=t.msg;$A.modalError(e)}))},onEventEmojiVisibleChange:function(t){t&&this.windowSmall&&this.onToBottom()},onHeightChange:function(t){var e=t.newVal-t.oldVal;if(0!==e){var n=this.scrollInfo(),o=n.offset;n.tail>0&&this.onToOffset(o+e)}},onActive:function(){this.$emit("on-active")},onToBottom:function(){this.msgNew=0;var t=this.$refs.scroller;t&&(t.scrollToBottom(),requestAnimationFrame((function(e){return t.scrollToBottom()})))},onToIndex:function(t){var e=this,n=this.$refs.scroller;n&&(n.stopToBottom(),n.scrollToIndex(t,-100),requestAnimationFrame((function(e){return n.scrollToIndex(t,-100)}))),requestAnimationFrame((function(n){return e.replyActiveIndex=t}))},onToOffset:function(t){var e=this.$refs.scroller;e&&(e.stopToBottom(),e.scrollToOffset(t),setTimeout((function(n){return e.scrollToOffset(t)}),10))},scrollInfo:function(){var t=this.$refs.scroller;return t?t.scrollInfo():{offset:0,scale:0,tail:0}},openProject:function(){this.dialogData.group_info&&(this.windowSmall&&this.$store.dispatch("openDialog",0),this.goForward({name:"manage-project",params:{projectId:this.dialogData.group_info.id}}))},openTask:function(){this.dialogData.group_info&&(this.taskId>0&&this.$store.dispatch("openDialog",0),this.$store.dispatch("openTask",this.dialogData.group_info.id))},onPrevPage:function(){var t=this;0!==this.prevId&&this.$store.dispatch("getDialogMsgs",{dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,prev_id:this.prevId,save_before:function(e){return t.scrollDisabled=!0}}).then((function(e){var n=e.data.list.map((function(t){return t.id}));t.$nextTick((function(){var e=t.$refs.scroller,o=n.reduce((function(t,n){return{size:("object"===A(t)?t.size:e.getSize(t))+e.getSize(n)}})),i=e.getOffset()+o.size;0===t.prevId&&(i-=36),t.onToOffset(i),t.scrollDisabled=!1}))})).catch((function(){}))},onDialogMenu:function(t){switch(t){case"openCreate":var e=[this.userId];this.dialogData.dialog_user&&this.userId!=this.dialogData.dialog_user.userid&&e.push(this.dialogData.dialog_user.userid),this.createGroupData={userids:e,uncancelable:[this.userId]},this.createGroupShow=!0;break;case"groupInfo":this.groupInfoShow=!0;break;case"transfer":this.groupTransferData={dialog_id:this.dialogId,userid:[],disabledChoice:[this.userId]},this.groupTransferShow=!0;break;case"transferConfirm":this.onTransferGroup();break;case"disband":this.onDisbandGroup();break;case"exit":this.onExitGroup()}},onTransferGroup:function(){var t=this;0!==this.groupTransferData.userid.length?(this.groupTransferLoad++,this.$store.dispatch("call",{url:"dialog/group/transfer",data:{dialog_id:this.dialogId,userid:this.groupTransferData.userid[0]}}).then((function(e){var n=e.data,o=e.msg;$A.messageSuccess(o),t.$store.dispatch("saveDialog",n)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.groupTransferLoad--,t.groupTransferShow=!1}))):$A.messageError("请选择新的群主")},onDisbandGroup:function(){var t=this;$A.modalConfirm({content:"你确定要解散【".concat(this.dialogData.name,"】群组吗?"),loading:!0,okText:"解散",onOk:function(){return new Promise((function(e,n){t.$store.dispatch("call",{url:"dialog/group/disband",data:{dialog_id:t.dialogId}}).then((function(n){var o=n.msg;e(o),t.$store.dispatch("forgetDialog",t.dialogId),t.goForward({name:"manage-messenger"})})).catch((function(t){var e=t.msg;n(e)}))}))}})},onExitGroup:function(){var t=this;$A.modalConfirm({content:"你确定要退出群组吗?",loading:!0,onOk:function(){return new Promise((function(e,n){t.$store.dispatch("call",{url:"dialog/group/deluser",data:{dialog_id:t.dialogId}}).then((function(n){var o=n.msg;e(o),t.$store.dispatch("forgetDialog",t.dialogId),t.goForward({name:"manage-messenger"})})).catch((function(t){var e=t.msg;n(e)}))}))}})},onCreateGroup:function(){var t=this;this.createGroupLoad++,this.$store.dispatch("call",{url:"dialog/group/add",data:this.createGroupData}).then((function(e){var n=e.data,o=e.msg;$A.messageSuccess(o),t.createGroupShow=!1,t.createGroupData={},t.$store.dispatch("saveDialog",n),t.$store.dispatch("openDialog",n.id)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.createGroupLoad--}))},onForward:function(t){var e=this;if("open"===t)this.forwardData={dialogids:[],userids:[],msg_id:this.operateItem.id},this.forwardShow=!0;else if("submit"===t){if(0===$A.arrayLength(this.forwardData.dialogids)&&0===$A.arrayLength(this.forwardData.userids))return void $A.messageWarning("请选择转发对话或成员");this.forwardLoad=!0,this.$store.dispatch("call",{url:"dialog/msg/forward",data:this.forwardData}).then((function(t){var n=t.data,o=t.msg;e.forwardShow=!1,e.$store.dispatch("saveDialogMsg",n.msgs),e.$store.dispatch("updateDialogLastMsg",n.msgs),$A.messageSuccess(o)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(t){e.forwardLoad=!1}))}},onScroll:function(t){var e=this;this.operateVisible=!1;var n=this.scrollInfo().tail;this.scrollTail=n,this.scrollTail<=10&&(this.msgNew=0),this.scrollAction=t.target.scrollTop,this.scrollDirection=this.scrollTmp<=this.scrollAction?"down":"up",setTimeout((function(t){return e.scrollTmp=e.scrollAction}),0)},onRange:function(t){var e=this;if(!this.preventMoreLoad)for(var n="down"===this.scrollDirection?"next_id":"prev_id",o=t.start;o<=t.end;o++){var i=this.allMsgs[o][n];if(i){var r=this.allMsgs[o+("next_id"===n?1:-1)];r&&r.id!=i&&(this.preventMoreLoad=!0,this.$store.dispatch("getDialogMsgs",N({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType},n,i)).finally((function(t){e.preventMoreLoad=!1})))}}},onBack:function(){var t=this;if(!this.beforeBack)return this.handleBack();var e=this.beforeBack();e&&e.then?e.then((function(){t.handleBack()})):this.handleBack()},handleBack:function(){var t=this.$store.state.routeHistoryLast,e=t.name,n=t.params;e===this.$route.name&&/\d+/.test(n.dialogId)?this.goForward({name:this.$route.name}):this.goBack()},onMsgType:function(t){switch(t){case"project":this.openProject();break;case"task":this.openTask();break;default:this.loadMsg?$A.messageWarning("正在加载,请稍后再试..."):this.msgType=t}},onLongpress:function(t){var e=this,n=t.event,o=t.el,i=t.msgData;this.operateVisible=this.operateItem.id===i.id,this.operateItem=$A.isJson(i)?i:{},this.operateCopys=[],"IMG"===n.target.nodeName&&this.$Electron?this.operateCopys.push({type:"image",icon:"",label:"复制图片",value:$A.rightDelete(n.target.currentSrc,"_thumb.jpg")}):"A"===n.target.nodeName&&this.operateCopys.push({type:"link",icon:"",label:"复制链接",value:n.target.href}),"text"===i.type&&("IMG"===n.target.nodeName&&this.operateCopys.push({type:"imagedown",icon:"",label:"下载图片",value:$A.rightDelete(n.target.currentSrc,"_thumb.jpg")}),i.msg.text.replace(/<[^>]+>/g,"").length>0&&this.operateCopys.push({type:"text",icon:"",label:this.operateCopys.length>0?"复制文本":"复制",value:""})),this.$nextTick((function(){var t=o.getBoundingClientRect(),i=e.$el.getBoundingClientRect();e.operateStyles={left:"".concat(n.clientX-i.left,"px"),top:"".concat(t.top+e.windowScrollY,"px"),height:t.height+"px"},e.operateVisible=!0}))},onOperate:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.operateVisible=!1,this.$nextTick((function(o){switch(t){case"reply":e.onReply();break;case"update":e.onUpdate();break;case"copy":e.onCopy(n);break;case"forward":e.onForward("open");break;case"withdraw":e.onWithdraw();break;case"view":e.onViewFile();break;case"down":e.onDownFile();break;case"tag":e.onTag();break;case"newTask":var i=$A.formatMsgBasic(e.operateItem.msg.text);i=i.replace(/<img[^>]*?src=(["'])(.*?)(_thumb\.jpg)*\1[^>]*?>/g,'<img src="$2">'),l.Store.set("addTask",{owner:[e.userId],content:i});break;case"todo":e.onTodo();break;case"pos":e.onPositionId(e.operateItem.id);break;case"emoji":e.onEmoji(n)}}))},onReply:function(){var t=this.scrollInfo().tail;this.replyActiveId=this.operateItem.id,this.replyActiveUpdate=!1,this.inputFocus(),t<=10&&requestAnimationFrame(this.onToBottom)},onUpdate:function(){if(this.onReply(),"text"===this.operateItem.type){this.replyActiveUpdate=!0;var t=this.operateItem.msg.text;t.indexOf("mention")>-1&&(t=(t=t.replace(/<a class="mention file" href="([^'"]*)"([^>]*)>~([^>]*)<\/a>/g,'<span class="mention" data-denotation-char="~" data-id="$1" data-value="$3"><span contenteditable="false"><span class="ql-mention-denotation-char">~</span>$3</span></span>')).replace(/<span class="mention ([^'"]*)" data-id="(\d+)">([@#])([^>]*)<\/span>/g,'<span class="mention" data-denotation-char="$3" data-id="$2" data-value="$4"><span contenteditable="false"><span class="ql-mention-denotation-char">$3</span>$4</span></span>')),this.msgText=$A.formatMsgBasic(t)}},onCopy:function(t){var e=this;if($A.isJson(t)){var n=t.type,o=t.value;switch(n){case"image":this.$Electron&&this.getBase64Image(o).then((function(t){e.$Electron.sendMessage("copyBase64Image",{base64:t})}));break;case"imagedown":this.$store.dispatch("downUrl",{url:o,token:!1});break;case"link":this.$copyText(o).then((function(t){return $A.messageSuccess("复制成功")})).catch((function(t){return $A.messageError("复制失败")}));break;case"text":var i=$A(this.$refs.scroller.$el).find('[data-id="'.concat(this.operateItem.id,'"]')).find(".dialog-content");if(i.length>0){var r=i[0].innerText.replace(/\n\n/g,"\n");this.$copyText(r).then((function(t){return $A.messageSuccess("复制成功")})).catch((function(t){return $A.messageError("复制失败")}))}else $A.messageWarning("不可复制的内容")}}},onCancelReply:function(){this.replyActiveUpdate&&(this.replyActiveUpdate=!1,this.msgText=""),this.replyActiveId=0},onWithdraw:function(){var t=this;$A.modalConfirm({content:"确定撤回此信息吗?",okText:"撤回",loading:!0,onOk:function(){return new Promise((function(e,n){t.$store.dispatch("call",{url:"dialog/msg/withdraw",data:{msg_id:t.operateItem.id}}).then((function(){e("消息已撤回"),t.$store.dispatch("forgetDialogMsg",t.operateItem.id)})).catch((function(t){var e=t.msg;n(e)}))}))}})},onViewReply:function(t){this.operateVisible||this.onPositionId(t.reply_id,t.msg_id)},onViewText:function(t){var e=t.target;if(!this.operateVisible)switch(e.nodeName){case"IMG":e.classList.contains("browse")?this.onViewPicture(e.currentSrc):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=$A.getTextImagesInfo(e.outerHTML));break;case"SPAN":e.classList.contains("mention")&&e.classList.contains("task")&&this.$store.dispatch("openTask",$A.runNum(e.getAttribute("data-id")))}},onViewFile:function(t){if(!this.operateVisible){$A.isJson(t)||(t=this.operateItem);var e=t.msg;if(["jpg","jpeg","gif","png"].includes(e.ext))this.onViewPicture(e.path);else{var n="/single/file/msg/".concat(t.id);this.$Electron?this.$Electron.sendMessage("windowRouter",{name:"file-msg-".concat(t.id),path:n,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:"".concat(e.name," (").concat($A.bytesToSize(e.size),")"),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:"drawio"===e.ext}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:"".concat(e.name," (").concat($A.bytesToSize(e.size),")"),url:"web.js",params:{titleFixed:!0,url:$A.rightDelete(window.location.href,window.location.hash)+"#".concat(n)}}):window.open($A.apiUrl("..".concat(n)))}}},onViewPicture:function(t){var e=this.allMsgs.filter((function(t){return"file"===t.type?["jpg","jpeg","gif","png"].includes(t.msg.ext):"text"===t.type&&t.msg.text.match(/<img\s+class="browse"[^>]*?>/)})),n=[];e.some((function(t){var e=t.type,o=t.msg;"file"===e?n.push({src:o.path,width:o.width,height:o.height}):"text"===e&&n.push.apply(n,I($A.getTextImagesInfo(o.text)))}));var o=n.findIndex((function(e){return e.src===t}));o>-1?(this.$store.state.previewImageIndex=o,this.$store.state.previewImageList=n):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[t])},onDownFile:function(t){var e=this;this.operateVisible||($A.isJson(t)||(t=this.operateItem),$A.modalConfirm({title:"下载文件",content:"".concat(t.msg.name," (").concat($A.bytesToSize(t.msg.size),")"),okText:"立即下载",onOk:function(){e.$store.dispatch("downUrl",$A.apiUrl("dialog/msg/download?msg_id=".concat(t.id)))}}))},onReplyList:function(t){this.operateVisible||(this.replyListId=t.msg_id,this.replyListShow=!0)},onError:function(t){var e=this;if(!0===t.error){var n=t.errorData,o=n.type,i=n.content,r=n.msg,a={icon:"error",title:"发送失败",content:i,cancelText:"取消发送",onCancel:function(n){e.tempMsgs=e.tempMsgs.filter((function(e){return e.id!=t.id}))}};if("text"===o)a.okText="再次编辑",a.onOk=function(){e.tempMsgs=e.tempMsgs.filter((function(e){return e.id!=t.id})),e.msgText=r,e.inputFocus()};else{if("record"!==o)return;a.okText="重新发送",a.onOk=function(){e.tempMsgs=e.tempMsgs.filter((function(e){return e.id!=t.id})),e.sendRecord(r)}}$A.modalConfirm(a)}},onEmoji:function(t){var e=this;$A.isJson(t)||(t={msg_id:this.operateItem.id,symbol:t}),this.$store.dispatch("setLoad",{key:"msg-".concat(t.msg_id),delay:600}),this.$store.dispatch("call",{url:"dialog/msg/emoji",data:t}).then((function(t){var n=t.data;e.dialogMsgs.findIndex((function(t){return t.id==n.id}))>-1?e.$store.dispatch("saveDialogMsg",n):e.todoViewData.id===n.id&&(e.todoViewData=Object.assign(e.todoViewData,n))})).catch((function(t){var e=t.msg;$A.messageError(e)})).finally((function(n){e.$store.dispatch("cancelLoad","msg-".concat(t.msg_id))}))},onShowEmojiUser:function(t){this.operateVisible||(this.respondData=t,this.respondShow=!0)},onTag:function(){var t=this;if(!this.operateVisible){var e={msg_id:this.operateItem.id};this.$store.dispatch("setLoad",{key:"msg-".concat(e.msg_id),delay:600}),this.$store.dispatch("call",{url:"dialog/msg/tag",data:e}).then((function(e){var n=e.data;t.tagOrTodoSuccess(n)})).catch((function(t){var e=t.msg;$A.messageError(e)})).finally((function(n){t.$store.dispatch("cancelLoad","msg-".concat(e.msg_id))}))}},onTodo:function(t){var e=this;if(!this.operateVisible)if("submit"===t){if("user"===this.todoSettingData.type&&0===$A.arrayLength(this.todoSettingData.userids))return void $A.messageWarning("选择指定成员");this.todoSettingLoad++,this.onTodoSubmit(this.todoSettingData).then((function(t){$A.messageSuccess(t),e.todoSettingShow=!1})).catch($A.messageError).finally((function(t){e.todoSettingLoad--}))}else this.todoSettingData={type:"all",userids:[],msg_id:this.operateItem.id},this.operateItem.todo?$A.modalConfirm({content:"你确定取消待办吗?",cancelText:"取消",okText:"确定",loading:!0,onOk:function(){return e.onTodoSubmit(e.todoSettingData)}}):this.todoSettingShow=!0},onTodoSubmit:function(t){var e=this;return new Promise((function(n,o){e.$store.dispatch("setLoad",{key:"msg-".concat(t.msg_id),delay:600}),e.$store.dispatch("call",{url:"dialog/msg/todo",data:t}).then((function(t){var o=t.data,i=t.msg;n(i),e.tagOrTodoSuccess(o),e.onActive()})).catch((function(t){var e=t.msg;o(e)})).finally((function(n){e.$store.dispatch("cancelLoad","msg-".concat(t.msg_id))}))}))},tagOrTodoSuccess:function(t){this.$store.dispatch("saveDialogMsg",t.update),t.add&&(this.$store.dispatch("saveDialogMsg",t.add),this.$store.dispatch("updateDialogLastMsg",t.add))},getBase64Image:function(t){return new Promise((function(e){var n=document.createElement("CANVAS"),o=n.getContext("2d"),i=new Image;i.crossOrigin="Anonymous",i.onload=function(){n.height=i.height,n.width=i.width,o.drawImage(i,0,0);var r="png";$A.rightExists(t,"jpg")||$A.rightExists(t,"jpeg")?r="jpeg":$A.rightExists(t,"git")&&(r="git"),e(n.toDataURL("image/".concat(r))),n=null},i.src=t}))}}};const q=(0,a.Z)(M,(function(){var t=this,e=t._self._c;return t.isReady?e("div",{staticClass:"dialog-wrapper",class:t.wrapperClass,on:{drop:function(e){return e.preventDefault(),t.chatPasteDrag(e,"drag")},dragover:function(e){return e.preventDefault(),t.chatDragOver(!0,e)},dragleave:function(e){return e.preventDefault(),t.chatDragOver(!1,e)},touchstart:t.onTouchStart,touchmove:t.onTouchMove}},[e("div",{staticClass:"dialog-nav",style:t.navStyle},[t._t("head",(function(){return[e("div",{staticClass:"nav-wrapper",class:{completed:t.$A.dialogCompleted(t.dialogData)}},[e("div",{staticClass:"dialog-back",on:{click:t.onBack}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),t.msgUnreadOnly?e("div",{staticClass:"back-num"},[t._v(t._s(t.msgUnreadOnly))]):t._e()]),t._v(" "),e("div",{staticClass:"dialog-block"},[e("div",{staticClass:"dialog-avatar"},["group"==t.dialogData.type?["department"==t.dialogData.group_type?e("i",{staticClass:"taskfont icon-avatar department"},[t._v("")]):"project"==t.dialogData.group_type?e("i",{staticClass:"taskfont icon-avatar project"},[t._v("")]):"task"==t.dialogData.group_type?e("i",{staticClass:"taskfont icon-avatar task"},[t._v("")]):e("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t.dialogData.dialog_user?e("div",{staticClass:"user-avatar"},[e("UserAvatar",{attrs:{online:t.dialogData.online_state,userid:t.dialogData.dialog_user.userid,size:42},on:{"update:online":function(e){return t.$set(t.dialogData,"online_state",e)}}},["user"===t.dialogData.type&&!0!==t.dialogData.online_state?e("p",{attrs:{slot:"end"},slot:"end"},[t._v("\n "+t._s(t.$L(t.dialogData.online_state))+"\n ")]):t._e()])],1):e("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),t._v(" "),e("div",{staticClass:"dialog-title"},[e("div",{staticClass:"main-title"},[t._l(t.$A.dialogTags(t.dialogData),(function(n){return"success"!=n.color?[e("Tag",{attrs:{color:n.color,fade:!1}},[t._v(t._s(t.$L(n.text)))])]:t._e()})),t._v(" "),e("h2",[t._v(t._s(t.dialogData.name))]),t._v(" "),t.peopleNum>0?e("em",[t._v("("+t._s(t.peopleNum)+")")]):t._e(),t._v(" "),"all"==t.dialogData.group_type?e("Tag",{staticClass:"after",attrs:{fade:!1}},[t._v(t._s(t.$L("全员")))]):"department"==t.dialogData.group_type?e("Tag",{staticClass:"after",attrs:{fade:!1}},[t._v(t._s(t.$L("部门")))]):t._e()],2),t._v(" "),e("ul",{staticClass:"title-desc"},["user"===t.dialogData.type?e("li",{class:[!0===t.dialogData.online_state?"online":"offline"]},[t._v("\n "+t._s(t.$L(!0===t.dialogData.online_state?"在线":t.dialogData.online_state))+"\n ")]):t._e()]),t._v(" "),t.tagShow?e("ul",{staticClass:"title-tags scrollbar-hidden"},t._l(t.msgTags,(function(n){var i;return e("li",{key:n.type,class:(i={},o(i,n.type||"msg",!0),o(i,"active",t.msgType===n.type),i),on:{click:function(e){return t.onMsgType(n.type)}}},[e("i",{staticClass:"no-dark-content"}),t._v(" "),e("span",[t._v(t._s(t.$L(n.label)))])])})),0):t._e()])]),t._v(" "),e("EDropdown",{staticClass:"dialog-menu",attrs:{trigger:"click"},on:{command:t.onDialogMenu}},[e("i",{staticClass:"taskfont dialog-menu-icon"},[t._v("")]),t._v(" "),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},["user"===t.dialogData.type?e("EDropdownItem",{attrs:{command:"openCreate"}},[e("div",[t._v(t._s(t.$L("创建群组")))])]):[e("EDropdownItem",{attrs:{command:"groupInfo"}},[e("div",[t._v(t._s(t.$L("群组设置")))])]),t._v(" "),t.dialogData.owner_id!=t.userId?e("EDropdownItem",{attrs:{command:"exit"}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("退出群组")))])]):"user"===t.dialogData.group_type?[e("EDropdownItem",{attrs:{command:"transfer"}},[e("div",[t._v(t._s(t.$L("转让群主")))])]),t._v(" "),e("EDropdownItem",{attrs:{command:"disband"}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("解散群组")))])])]:t._e()]],2)],1)],1)]}))],2),t._v(" "),e("VirtualList",{ref:"scroller",staticClass:"dialog-scroller scrollbar-overlay",class:t.scrollerClass,attrs:{"data-key":"id","data-sources":t.allMsgs,"data-component":t.msgItem,"item-class-add":t.itemClassAdd,"extra-props":{dialogData:t.dialogData,operateVisible:t.operateVisible,operateItem:t.operateItem,isMyDialog:t.isMyDialog,msgId:t.msgId},"estimate-size":"group"==t.dialogData.type?105:77,keeps:50,disabled:t.scrollDisabled},on:{scroll:t.onScroll,range:t.onRange,totop:t.onPrevPage,"on-longpress":t.onLongpress,"on-view-reply":t.onViewReply,"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-reply-list":t.onReplyList,"on-error":t.onError,"on-emoji":t.onEmoji,"on-show-emoji-user":t.onShowEmojiUser}},[e("template",{slot:"header"},[0===t.allMsgs.length&&t.loadMsg||t.prevId>0?e("div",{staticClass:"dialog-item loading"},[e("Loading",{attrs:{type:"pure"}})],1):0===t.allMsgs.length?e("div",{staticClass:"dialog-item nothing"},[t._v(t._s(t.$L("暂无消息")))]):t._e()])],2),t._v(" "),e("div",{staticClass:"dialog-footer",class:t.footerClass,on:{click:t.onActive}},[e("div",{staticClass:"dialog-newmsg",on:{click:t.onToBottom}},[t._v(t._s(t.$L("有".concat(t.msgNew,"条新消息"))))]),t._v(" "),e("div",{staticClass:"dialog-goto",on:{click:t.onToBottom}},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),e("DialogUpload",{ref:"chatUpload",staticClass:"chat-upload",attrs:{"dialog-id":t.dialogId,"reply-id":t.replyId},on:{"on-progress":function(e){return t.chatFile("progress",e)},"on-success":function(e){return t.chatFile("success",e)},"on-error":function(e){return t.chatFile("error",e)}}}),t._v(" "),t.todoShow?e("div",{staticClass:"chat-todo"},[e("div",{staticClass:"todo-label"},[t._v(t._s(t.$L("待办"))+":")]),t._v(" "),e("ul",{staticClass:"scrollbar-hidden"},t._l(t.todoList,(function(n){return e("li",{on:{click:function(e){return e.stopPropagation(),t.onViewTodo(n)}}},[e("div",{staticClass:"todo-desc no-dark-content"},[t._v(t._s(t.$A.getMsgSimpleDesc(n.msg_data)))])])})),0)]):t._e(),t._v(" "),t.isMute?e("div",{staticClass:"chat-mute"},[t._v("\n "+t._s(t.$L("禁言发言"))+"\n ")]):e("ChatInput",{ref:"input",attrs:{"dialog-id":t.dialogId,"reply-id":t.replyActiveId,"emoji-bottom":t.windowSmall,maxlength:2e5,placeholder:t.$L("输入消息...")},on:{"on-focus":t.onEventFocus,"on-blur":t.onEventBlur,"on-more":t.onEventMore,"on-file":t.sendFileMsg,"on-send":t.sendMsg,"on-record":t.sendRecord,"on-record-state":t.onRecordState,"on-emoji-visible-change":t.onEventEmojiVisibleChange,"on-height-change":t.onHeightChange,"on-cancel-reply":t.onCancelReply},model:{value:t.msgText,callback:function(e){t.msgText=e},expression:"msgText"}})],1),t._v(" "),e("div",{staticClass:"operate-position",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",placement:"top",visible:t.operateVisible,transferClassName:"dialog-wrapper-operate",transfer:""},on:{"on-clickoutside":function(e){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),t._v(" "),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{attrs:{name:"action"}},[e("ul",{staticClass:"operate-action"},[0===t.msgId?e("li",{on:{click:function(e){return t.onOperate("reply")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("回复")))])]):t._e(),t._v(" "),t.operateItem.userid==t.userId&&"text"===t.operateItem.type?e("li",{on:{click:function(e){return t.onOperate("update")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("编辑")))])]):t._e(),t._v(" "),t._l(t.operateCopys,(function(n){return e("li",{on:{click:function(e){return t.onOperate("copy",n)}}},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(n.icon)}}),t._v(" "),e("span",[t._v(t._s(t.$L(n.label)))])])})),t._v(" "),e("li",{on:{click:function(e){return t.onOperate("forward")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("转发")))])]),t._v(" "),t.operateItem.userid==t.userId?e("li",{on:{click:function(e){return t.onOperate("withdraw")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("撤回")))])]):t._e(),t._v(" "),"file"===t.operateItem.type?[e("li",{on:{click:function(e){return t.onOperate("view")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("查看")))])]),t._v(" "),e("li",{on:{click:function(e){return t.onOperate("down")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("下载")))])])]:t._e(),t._v(" "),e("li",{on:{click:function(e){return t.onOperate("tag")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L(t.operateItem.tag?"取消标注":"标注")))])]),t._v(" "),"text"===t.operateItem.type?e("li",{on:{click:function(e){return t.onOperate("newTask")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("新任务")))])]):t._e(),t._v(" "),e("li",{on:{click:function(e){return t.onOperate("todo")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L(t.operateItem.todo?"取消待办":"设待办")))])]),t._v(" "),""!==t.msgType?e("li",{on:{click:function(e){return t.onOperate("pos")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("完整对话")))])]):t._e()],2)]),t._v(" "),e("DropdownItem",{staticClass:"dropdown-emoji",attrs:{name:"emoji"}},[e("ul",{staticClass:"operate-emoji scrollbar-hidden"},t._l(t.operateEmojis,(function(n,o){return e("li",{key:o,staticClass:"no-dark-content",domProps:{innerHTML:t._s(n)},on:{click:function(e){return t.onOperate("emoji",n)}}})})),0)])],1)],1)],1),t._v(" "),t.dialogDrag?e("div",{staticClass:"drag-over",on:{click:function(e){t.dialogDrag=!1}}},[e("div",{staticClass:"drag-text"},[t._v(t._s(t.$L("拖动到这里发送")))])]):t._e(),t._v(" "),e("Modal",{attrs:{title:t.$L(t.pasteTitle),"cancel-text":t.$L("取消"),"ok-text":t.$L("发送"),"enter-ok":!0},on:{"on-ok":t.pasteSend},model:{value:t.pasteShow,callback:function(e){t.pasteShow=e},expression:"pasteShow"}},[e("ul",{staticClass:"dialog-wrapper-paste",class:t.pasteWrapperClass},t._l(t.pasteItem,(function(n){return e("li",["image"==n.type?e("img",{attrs:{src:n.result}}):e("div",[t._v(t._s(t.$L("文件"))+": "+t._s(n.name)+" ("+t._s(t.$A.bytesToSize(n.size))+")")])])})),0)]),t._v(" "),e("Modal",{attrs:{title:t.$L("创建群组"),"mask-closable":!1},model:{value:t.createGroupShow,callback:function(e){t.createGroupShow=e},expression:"createGroupShow"}},[e("Form",{attrs:{model:t.createGroupData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("群成员")}},[e("UserInput",{attrs:{uncancelable:t.createGroupData.uncancelable,"multiple-max":100,placeholder:t.$L("选择项目成员")},model:{value:t.createGroupData.userids,callback:function(e){t.$set(t.createGroupData,"userids",e)},expression:"createGroupData.userids"}})],1),t._v(" "),e("FormItem",{attrs:{prop:"chat_name",label:t.$L("群名称")}},[e("Input",{attrs:{placeholder:t.$L("输入群名称(选填)")},model:{value:t.createGroupData.chat_name,callback:function(e){t.$set(t.createGroupData,"chat_name",e)},expression:"createGroupData.chat_name"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.createGroupShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.createGroupLoad>0},on:{click:t.onCreateGroup}},[t._v(t._s(t.$L("创建")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("转发"),"mask-closable":!1},model:{value:t.forwardShow,callback:function(e){t.forwardShow=e},expression:"forwardShow"}},[e("Form",{ref:"forwardForm",attrs:{model:t.forwardData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"dialogids",label:t.$L("最近聊天")}},[e("Select",{staticClass:"dialog-wrapper-dialogids",attrs:{placeholder:t.$L("选择转发最近聊天"),"multiple-max":20,multiple:"",filterable:"","transfer-class-name":"dialog-wrapper-forward"},model:{value:t.forwardData.dialogids,callback:function(e){t.$set(t.forwardData,"dialogids",e)},expression:"forwardData.dialogids"}},[e("div",{staticClass:"forward-drop-prepend",attrs:{slot:"drop-prepend"},slot:"drop-prepend"},[t._v(t._s(t.$L("最多只能选择20个")))]),t._v(" "),t._l(t.dialogList,(function(n,o){return e("Option",{key:o,attrs:{value:n.id,"key-value":n.name,label:n.name}},[e("div",{staticClass:"forward-option"},[e("div",{staticClass:"forward-avatar"},["group"==n.type?["department"==n.group_type?e("i",{staticClass:"taskfont icon-avatar department"},[t._v("")]):"project"==n.group_type?e("i",{staticClass:"taskfont icon-avatar project"},[t._v("")]):"task"==n.group_type?e("i",{staticClass:"taskfont icon-avatar task"},[t._v("")]):e("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:n.dialog_user?e("div",{staticClass:"user-avatar"},[e("UserAvatar",{attrs:{userid:n.dialog_user.userid,size:26}})],1):e("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),t._v(" "),e("div",{staticClass:"forward-name"},[t._v(t._s(n.name))])])])}))],2)],1),t._v(" "),e("FormItem",{attrs:{prop:"userids",label:t.$L("指定成员")}},[e("UserInput",{attrs:{"multiple-max":20,placeholder:"(".concat(t.$L("或"),") ").concat(t.$L("选择转发指定成员"))},model:{value:t.forwardData.userids,callback:function(e){t.$set(t.forwardData,"userids",e)},expression:"forwardData.userids"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.forwardShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.forwardLoad},on:{click:function(e){return t.onForward("submit")}}},[t._v(t._s(t.$L("转发")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("设置待办"),"mask-closable":!1},model:{value:t.todoSettingShow,callback:function(e){t.todoSettingShow=e},expression:"todoSettingShow"}},[e("Form",{ref:"todoSettingForm",attrs:{model:t.todoSettingData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"type",label:t.$L("当前会话")}},[e("RadioGroup",{model:{value:t.todoSettingData.type,callback:function(e){t.$set(t.todoSettingData,"type",e)},expression:"todoSettingData.type"}},[e("Radio",{attrs:{label:"all"}},[t._v(t._s(t.$L("所有成员")))]),t._v(" "),e("Radio",{attrs:{label:"user"}},[t._v(t._s(t.$L("指定成员")))])],1)],1),t._v(" "),"user"===t.todoSettingData.type?e("FormItem",{attrs:{prop:"userids"}},[e("UserInput",{attrs:{"dialog-id":t.dialogId,placeholder:t.$L("选择指定成员")},model:{value:t.todoSettingData.userids,callback:function(e){t.$set(t.todoSettingData,"userids",e)},expression:"todoSettingData.userids"}})],1):t._e()],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.todoSettingShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.todoSettingLoad>0},on:{click:function(e){return t.onTodo("submit")}}},[t._v(t._s(t.$L("确定")))])],1)],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:400},model:{value:t.groupInfoShow,callback:function(e){t.groupInfoShow=e},expression:"groupInfoShow"}},[t.groupInfoShow?e("DialogGroupInfo",{attrs:{dialogId:t.dialogId},on:{"on-close":function(e){t.groupInfoShow=!1}}}):t._e()],1),t._v(" "),e("Modal",{attrs:{title:t.$L("转让群主身份"),"mask-closable":!1},model:{value:t.groupTransferShow,callback:function(e){t.groupTransferShow=e},expression:"groupTransferShow"}},[e("Form",{attrs:{model:t.groupTransferData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"userid",label:t.$L("新的群主")}},[e("UserInput",{attrs:{disabledChoice:t.groupTransferData.disabledChoice,"multiple-max":1,"max-hidden-select":"",placeholder:t.$L("选择新的群主")},model:{value:t.groupTransferData.userid,callback:function(e){t.$set(t.groupTransferData,"userid",e)},expression:"groupTransferData.userid"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.groupTransferShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.groupTransferLoad>0},on:{click:function(e){return t.onDialogMenu("transferConfirm")}}},[t._v(t._s(t.$L("确定转让")))])],1)],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right","class-name":"dialog-wrapper-drawer-list",size:500},model:{value:t.replyListShow,callback:function(e){t.replyListShow=e},expression:"replyListShow"}},[t.replyListShow?e("DialogWrapper",{staticClass:"drawer-list",attrs:{dialogId:t.dialogId,msgId:t.replyListId}},[e("div",{staticClass:"drawer-title",attrs:{slot:"head"},slot:"head"},[t._v(t._s(t.$L("回复消息")))])]):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:400},model:{value:t.respondShow,callback:function(e){t.respondShow=e},expression:"respondShow"}},[t.respondShow?e("DialogRespond",{attrs:{"respond-data":t.respondData},on:{"on-close":function(e){t.respondShow=!1}}}):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right","class-name":"dialog-wrapper-drawer-list",size:500},model:{value:t.todoViewShow,callback:function(e){t.todoViewShow=e},expression:"todoViewShow"}},[e("div",{staticClass:"dialog-wrapper drawer-list"},[e("div",{staticClass:"dialog-nav"},[e("div",{staticClass:"drawer-title"},[t._v(t._s(t.$L("待办消息")))])]),t._v(" "),e("div",{staticClass:"dialog-scroller scrollbar-overlay"},[t.todoViewMsg?e("DialogItem",{attrs:{source:t.todoViewMsg,simpleView:""},on:{"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-emoji":t.onEmoji}}):t._e(),t._v(" "),e("Button",{staticClass:"original-button",attrs:{icon:"md-exit",type:"text",loading:t.todoViewPosLoad},on:{click:t.onPosTodo}},[t._v(t._s(t.$L("回到原文")))])],1),t._v(" "),e("div",{staticClass:"todo-button"},[e("Button",{attrs:{type:"primary",size:"large",icon:"md-checkbox-outline",loading:t.todoViewLoad,long:""},on:{click:t.onDoneTodo}},[t._v(t._s(t.$L("完成")))])],1)])])],1):t._e()}),[],!1,null,null,null).exports},33441:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var o,i,r=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(o=n.next()).done)&&(r.push(o.value),!e||r.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}const r={name:"ProjectLog",components:{ProjectLogDetail:{name:"ProjectLogDetail",functional:!0,props:{render:Function,item:Object},render:function(t,e){return e.props.render(t,e.props.item)}}},props:{projectId:{type:Number,default:0},taskId:{type:Number,default:0},showLoad:{type:Boolean,default:!0}},data:function(){return{loadIng:0,lists:[],listPage:1,listPageSize:20,hasMorePages:!1,totalNum:-1}},mounted:function(){this.getLists(!0)},computed:{},watch:{projectId:function(){this.lists=[],this.getLists(!0)},taskId:function(){this.lists=[],this.getLists(!0)},loadIng:function(t){this.$emit("on-load-change",t>0)}},methods:{logDate:function(t){return $A.formatDate("m-d")==t.ymd?t.ymd+" "+this.$L("今天"):t.key},getLists:function(t){var e=this;!0===t&&(this.listPage=1),this.loadIng++,this.$store.dispatch("call",{url:"project/log/lists",data:{project_id:this.projectId,task_id:this.taskId,page:Math.max(this.listPage,1),pagesize:Math.max($A.runNum(this.listPageSize),10)}}).then((function(n){var o=n.data;!0===t&&(e.lists=[]),o.data.some((function(t){var n=t.time,o=n.ymd+" "+n.week,i=e.lists.find((function(t){return t.key==o}));if(i){var r=i.lists.find((function(e){return e.userid==t.userid}));r?r.lists.push(t):i.lists.push({userid:t.userid,lists:[t]})}else e.lists.push({key:o,ymd:t.ymd,lists:[{userid:t.userid,lists:[t]}]})})),e.hasMorePages=o.current_page<o.last_page,e.totalNum=o.total})).catch((function(){e.lists=[],e.hasMorePages=!1,e.totalNum=0})).finally((function(t){e.loadIng--}))},getMore:function(){this.hasMorePages&&(this.hasMorePages=!1,this.listPage++,this.getLists())},logDetail:function(t,e){var n=e.detail,i=e.record,r=[t("span",this.$L(n))];if($A.isJson(i)){if($A.isArray(i.change)){var a=o(i.change,2),s=a[0],l=a[1];r.push(t("span",": ")),s&&s!=l?(r.push(t("span",{class:"change-value"},"".concat(s||"-"))),r.push(t("span"," => ")),r.push(t("span",{class:"change-value"},"".concat(l||"-")))):r.push(t("span",{class:"change-value"},l||"-"))}if(i.userid){var c=$A.isArray(i.userid)?i.userid:[i.userid],u=[];c.some((function(e){/\d+/.test(e)?u.push(t("UserAvatar",{props:{size:18,userid:e}})):u.push(t("span",e))})),u.length>0&&r.push(t("div",{class:"detail-user"},[t("div",{class:"detail-user-wrap"},u)]))}}return t("span",{class:"log-text"},r)},operationList:function(t){var e=t.id,n=t.record,o=[];if(!$A.isJson(n))return o;if(this.taskId>0&&$A.isJson(n.flow)){var i=$A.getMiddle(n.flow.flow_item_name,"|");i&&o.push({id:e,button:"重置",content:"确定重置为【".concat(i,"】吗?")})}return o},onOperation:function(t){var e=this;$A.modalConfirm({content:t.content,loading:!0,onOk:function(){return new Promise((function(n,o){e.$store.dispatch("call",{url:"project/task/resetfromlog",data:{id:t.id}}).then((function(t){var o=t.data,i=t.msg;n(i),e.$store.dispatch("saveTask",o),e.getLists(!0)})).catch((function(t){var e=t.msg;o(e)}))}))}})},openTask:function(t){this.$store.dispatch("openTask",t)}}};const a=(0,n(51900).Z)(r,(function(){var t=this,e=t._self._c;return e("div",{class:["project-log",0==t.taskId?"is-drawer":""]},[e("div",{staticClass:"log-title"},[t._v(t._s(t.$L("项目动态")))]),t._v(" "),e("ul",{staticClass:"logs-activity"},[t._l(t.lists,(function(n){return e("li",[e("div",{staticClass:"logs-date"},[t._v(t._s(t.logDate(n)))]),t._v(" "),e("div",{staticClass:"logs-section"},[e("Timeline",t._l(n.lists,(function(n,o){return e("TimelineItem",{key:o},[e("div",{staticClass:"logs-dot",attrs:{slot:"dot"},slot:"dot"},[n.userid?e("UserAvatar",{attrs:{userid:n.userid,size:18,showName:""}}):e("div",{staticClass:"avatar-wrapper common-avatar"},[e("EAvatar",{attrs:{size:18}},[t._v("A")]),t._v(" "),e("div",{staticClass:"avatar-name auto"},[t._v(t._s(t.$L("系统")))])],1)],1),t._v(" "),t._l(n.lists,(function(n){return[e("div",{staticClass:"log-summary"},[e("ProjectLogDetail",{attrs:{render:t.logDetail,item:n}}),t._v(" "),t.operationList(n).length>0?e("span",{staticClass:"log-operation"},t._l(t.operationList(n),(function(n,o){return e("Button",{key:o,attrs:{size:"small"},on:{click:function(e){return t.onOperation(n)}}},[t._v(t._s(n.button))])})),1):t._e(),t._v(" "),e("span",{staticClass:"log-time"},[t._v(t._s(n.time.ymd)+" "+t._s(n.time.segment)+" "+t._s(n.time.hi))])],1),t._v(" "),n.project_task?e("div",{staticClass:"log-task"},[e("em",{on:{click:function(e){return t.openTask(n.project_task)}}},[t._v(t._s(t.$L("关联任务"))+": "+t._s(n.project_task.name))])]):t._e()]}))],2)})),1)],1)])})),t._v(" "),t.loadIng>0&&t.showLoad?e("li",{staticClass:"logs-loading"},[e("Loading")],1):t.hasMorePages?e("li",{staticClass:"logs-more",on:{click:t.getMore}},[t._v(t._s(t.$L("加载更多")))]):0==t.totalNum?e("li",{staticClass:"logs-none",on:{click:function(e){return t.getLists(!0)}}},[t._v(t._s(t.$L("没有任何动态")))]):t._e()],2)])}),[],!1,null,null,null).exports},19102:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var o=n(20629);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const s={name:"TaskMenu",props:{task:{type:Object,default:function(){return{}}},loadStatus:{type:Boolean,default:!1},colorShow:{type:Boolean,default:!0},updateBefore:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:"small"},icon:{type:String,default:"md-radio-button-off"},completedIcon:{type:String,default:"md-checkmark-circle"}},computed:r(r(r({},(0,o.rn)(["loads","taskFlows"])),(0,o.Se)(["isLoad"])),{},{loadIng:function(){return!!this.loadStatus||this.isLoad("task-".concat(this.task.id))}}),methods:{handleClick:function(t){var e=this;this.$store.state.taskOperation={event:t,task:this.task,loadStatus:this.loadStatus,colorShow:this.colorShow,updateBefore:this.updateBefore,disabled:this.disabled,size:this.size,onUpdate:function(t){e.$emit("on-update",t)}}},updateTask:function(t){var e=this;if(!this.loadIng){Object.keys(t).forEach((function(n){return e.$set(e.task,n,t[n])}));var n=Object.assign(t,{task_id:this.task.id});this.$store.dispatch("taskUpdate",n).then((function(t){var o=t.data,i=t.msg;$A.messageSuccess(i),e.$store.dispatch("saveTaskBrowse",n.task_id),e.$emit("on-update",o)})).catch((function(t){var o=t.msg;$A.modalError(o),e.$store.dispatch("getTaskOne",n.task_id).catch((function(){}))}))}}}};const l=(0,n(51900).Z)(s,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"task-menu-icon",on:{click:t.handleClick}},[t.loadIng?e("div",{staticClass:"loading"},[e("Loading")],1):[t.task.complete_at?e("Icon",{staticClass:"completed",attrs:{type:t.completedIcon}}):e("Icon",{staticClass:"uncomplete",attrs:{type:t.icon}})]],2)}),[],!1,null,null,null).exports},58748:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}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}const a={name:"TaskPriority",props:{color:{default:"#ffffff"},background:{default:"#7DBEEA"},backgroundColor:{default:"#7DBEEA"}},data:function(){return{}},computed:i(i({},(0,n(20629).rn)(["themeIsDark"])),{},{myStyle:function(){var t=this.color,e=this.background,n=this.backgroundColor;return this.themeIsDark?{color:n||e,borderColor:n||e,backgroundColor:"transparent"}:{color:t,borderColor:n||e,backgroundColor:n||e}}})};const s=(0,n(51900).Z)(a,(function(){var t=this;return(0,t._self._c)("div",{staticClass:"task-priority",style:t.myStyle},[t._t("default")],2)}),[],!1,null,null,null).exports},59673:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>lt});var o=n(20629),i=n(9980),r=n.n(i),a=n(58748),s=n(80641),l=n(42238);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const f={name:"TaskAddSimple",props:{parentId:{type:Number,default:0},projectId:{type:Number,default:0},columnId:{type:Number,default:0},addTop:{type:Boolean,default:!1},autoActive:{type:Boolean,default:!1},rowMode:{type:Boolean,default:!1}},data:function(){return{addData:{name:"",owner:0,column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:""},active:!1,onFocus:!1,mouseEnter:!1}},mounted:function(){this.autoActive&&this.$nextTick(this.openAdd)},computed:u(u({},(0,o.rn)(["taskPriority"])),{},{typeName:function(){return this.parentId>0?"子任务":"任务"}}),watch:{active:function(t){t||this.$emit("on-close")},mouseEnter:function(){this.chackClose()},onFocus:function(){this.chackClose()}},methods:{getData:function(){return this.parentId>0?{task_id:this.parentId,name:this.addData.name}:(this.addData.project_id=this.projectId||this.$store.state.projectId,this.addData.column_id=this.columnId||"",this.addData.owner=[this.userId],this.addData.top=this.addTop?1:0,$A.cloneJSON(this.addData))},openAdd:function(){var t=this;this.active=!0,this.defaultPriority(),this.$nextTick((function(){t.$refs.input.focus()}))},chackClose:function(){this.mouseEnter||this.onFocus||this.addData.name||(this.active=!1)},onPriority:function(){this.$emit("on-priority",this.getData()),this.active=!1},onKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.onAdd()}},onAdd:function(){var t=this;if(this.addData.name){this.loadIng++;var e=this.parentId>0?"taskAddSub":"taskAdd";this.$store.dispatch(e,this.getData()).then((function(e){var n=e.msg;$A.messageSuccess(n),t.loadIng--,t.active=!1,t.addData={name:"",owner:0,column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:""}})).catch((function(e){var n=e.msg;$A.modalError(n),t.loadIng--}))}else $A.messageWarning("请输入任务描述")},taskPriorityContent:function(t){var e=$A.runNum(t.days);return e<=0?t.name+" ("+this.$L("无时间限制")+")":t.name+" ("+e+this.$L("天")+")"},choosePriority:function(t){var e=this;if($A.runNum(t.days)>0){var n=new Date,o=new Date((new Date).setDate(n.getDate()+$A.runNum(t.days)));this.$set(this.addData,"times",$A.date2string([n,o]))}else this.$set(this.addData,"times",[]);this.$set(this.addData,"p_level",t.priority),this.$set(this.addData,"p_name",t.name),this.$set(this.addData,"p_color",t.color),this.$nextTick((function(){e.$refs.input.focus()}))},defaultPriority:function(){0!==this.taskPriority.length&&(this.addData.p_name||this.choosePriority(this.taskPriority[0]))}}};var h=n(51900);const p=(0,h.Z)(f,(function(){var t=this,e=t._self._c;return t.rowMode?e("Row",{staticClass:"task-add-row"},[e("Col",{class:["row-add",t.active?"active":""],attrs:{span:"12"}},[e("div",{staticClass:"add-input",on:{mouseenter:function(e){t.mouseEnter=!0},mouseleave:function(e){t.mouseEnter=!1}}},[e("Input",{ref:"input",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:3},maxlength:255,placeholder:t.$L(t.typeName+"描述,回车创建"),enterkeyhint:"done"},on:{"on-focus":function(e){t.onFocus=!0},"on-blur":function(e){t.onFocus=!1},"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(e){t.$set(t.addData,"name",e)},expression:"addData.name"}}),t._v(" "),0==t.parentId?e("div",{staticClass:"priority"},[e("ul",t._l(t.taskPriority,(function(n,o){return e("li",{key:o},[t.active?e("ETooltip",{attrs:{disabled:t.windowSmall,content:t.taskPriorityContent(n)}},[e("i",{staticClass:"taskfont",style:{color:n.color},domProps:{innerHTML:t._s(t.addData.p_name==n.name?"":"")},on:{click:function(e){return t.choosePriority(n)}}})]):t._e()],1)})),0),t._v(" "),e("Icon",{attrs:{type:"md-settings"},on:{click:t.onPriority}})],1):t._e()],1),t._v(" "),e("div",{staticClass:"add-btn",on:{click:t.openAdd}},[e("Icon",{staticClass:"add-icon",attrs:{type:"md-add"}}),t._v(t._s(t.$L("添加"+t.typeName))+"\n ")],1)]),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}})],1):e("div",{class:["task-add-simple",t.active?"active":""],on:{mouseenter:function(e){t.mouseEnter=!0},mouseleave:function(e){t.mouseEnter=!1}}},[e("Input",{ref:"input",attrs:{type:"textarea",rows:2,autosize:{minRows:2,maxRows:3},maxlength:255,placeholder:t.$L(t.typeName+"描述,回车创建"),enterkeyhint:"done"},on:{"on-focus":function(e){t.onFocus=!0},"on-blur":function(e){t.onFocus=!1},"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(e){t.$set(t.addData,"name",e)},expression:"addData.name"}}),t._v(" "),e("div",{staticClass:"add-placeholder",on:{click:t.openAdd}},[e("Icon",{attrs:{type:"md-add"}}),t._v(t._s(t.$L("添加"+t.typeName))+"\n ")],1),t._v(" "),e("div",{staticClass:"priority"},[e("ul",t._l(t.taskPriority,(function(n,o){return e("li",{key:o},[t.active?e("ETooltip",{attrs:{disabled:t.windowSmall,content:t.taskPriorityContent(n)}},[e("i",{staticClass:"taskfont",style:{color:n.color},domProps:{innerHTML:t._s(t.addData.p_name==n.name?"":"")},on:{click:function(e){return t.choosePriority(n)}}})]):t._e()],1)})),0),t._v(" "),e("Icon",{attrs:{type:"md-settings"},on:{click:t.onPriority}})],1)],1)}),[],!1,null,null,null).exports;var m=n(19102);function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?v(Object(n),!0).forEach((function(e){y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const b={name:"TaskRow",components:{TaskMenu:m.Z,TaskAddSimple:p,TaskPriority:a.Z},props:{list:{type:Array,default:function(){return[]}},parentId:{type:Number,default:0},fastAddTask:{type:Boolean,default:!1},openKey:{type:String,default:"default"},showCompleteAt:{type:Boolean,default:!1}},data:function(){return{nowTime:$A.Time(),nowInterval:null,taskLoad:{},taskOpen:{}}},mounted:function(){var t=this;this.nowInterval=setInterval((function(){t.nowTime=$A.Time()}),1e3)},destroyed:function(){clearInterval(this.nowInterval)},computed:g(g({},(0,o.rn)(["cacheTasks","taskPriority","cacheColumns"])),{},{subTask:function(){return function(t){return this.cacheTasks.filter((function(e){return!e.archived_at&&e.parent_id==t})).sort((function(t,e){return t.id-e.id}))}}}),methods:{columnName:function(t){var e=this.cacheColumns.find((function(e){return e.id==t}));return e?e.name:""},dropTask:function(t,e){var n=this.$refs["taskMenu_".concat(t.id)];if(n)if($A.leftExists(e,"column::"))n[0].updateTask({column_id:$A.leftDelete(e,"column::")});else if($A.leftExists(e,"priority::")){var o=this.taskPriority[parseInt($A.leftDelete(e,"priority::"))];o&&n[0].updateTask({p_level:o.priority,p_name:o.name,p_color:o.color})}},onPriority:function(t){this.$emit("on-priority",t)},getSublist:function(t){var e=this;!0!==t.sub_top?!0!==this.taskOpen[t.id]?!0!==this.taskLoad[t.id]&&(this.$set(this.taskLoad,t.id,!0),this.$store.dispatch("getTaskForParent",t.id).then((function(){e.$set(e.taskLoad,t.id,!1),e.$set(e.taskOpen,t.id,!0)})).catch((function(n){var o=n.msg;$A.modalError(o),e.$set(e.taskLoad,t.id,!1)}))):this.$set(this.taskOpen,t.id,!1):this.openTask(t)},columnList:function(t){return this.cacheColumns.filter((function(e){return e.project_id==t}))},openTask:function(t,e){this.$store.dispatch("openTask",t),!0===e&&setTimeout((function(){s.Store.set("receiveTask",!0)}),300)},openMenu:function(t,e){var n=this.$refs["taskMenu_".concat(e.id)];n&&n[0].handleClick(t)},ownerUser:function(t){return t.filter((function(t){return 1==t.owner})).sort((function(t,e){return t.id-e.id}))},expiresFormat:function(t){return $A.countDownFormat(t,this.nowTime)},completeAtFormat:function(t){var e=$A.Date(t,!0);return $A.formatDate("Y")===$A.formatDate("Y",e)?$A.formatDate("m-d H:i",e):$A.formatDate("Y-m-d",e)}}};const _=(0,h.Z)(b,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"task-rows"},[t._l(t.list,(function(n,o){return e("div",{key:o},[e("Row",{staticClass:"task-row",style:n.color?{backgroundColor:n.color,borderBottomColor:n.color}:{}},[n.p_name?e("em",{staticClass:"priority-color",style:{backgroundColor:n.p_color}}):t._e(),t._v(" "),e("Col",{class:["row-name",n.complete_at?"complete":""],attrs:{span:"12"}},[n.sub_num>0&&!0!==n.sub_top||0===n.parent_id&&t.fastAddTask?e("Icon",{class:["sub-icon",t.taskOpen[n.id]?"active":""],attrs:{type:"ios-arrow-forward"},on:{click:function(e){return t.getSublist(n)}}}):t._e(),t._v(" "),e("TaskMenu",{ref:"taskMenu_".concat(n.id),refInFor:!0,attrs:{task:n}}),t._v(" "),e("div",{staticClass:"item-title",on:{click:function(e){return t.openTask(n)}}},[n.flow_item_name?e("span",{class:n.flow_item_status,on:{click:function(e){return e.stopPropagation(),t.openMenu(e,n)}}},[t._v(t._s(n.flow_item_name))]):t._e(),t._v(" "),!0===n.sub_top?e("span",[t._v(t._s(t.$L("子任务")))]):t._e(),t._v(" "),n.sub_my&&n.sub_my.length>0?e("span",[t._v("+"+t._s(n.sub_my.length))]):t._e(),t._v(" "),t._v("\n "+t._s(n.name)+"\n ")]),t._v(" "),e("div",{staticClass:"item-icons",on:{click:function(e){return t.openTask(n)}}},[n.desc?e("div",{staticClass:"item-icon"},[e("i",{staticClass:"taskfont"},[t._v("")])]):t._e(),t._v(" "),n.file_num>0?e("div",{staticClass:"item-icon"},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("em",[t._v(t._s(n.file_num))])]):t._e(),t._v(" "),n.msg_num>0?e("div",{staticClass:"item-icon"},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("em",[t._v(t._s(n.msg_num))])]):t._e(),t._v(" "),n.sub_num>0?e("div",{staticClass:"item-icon",on:{click:function(e){return e.stopPropagation(),t.getSublist(n)}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("em",[t._v(t._s(n.sub_complete)+"/"+t._s(n.sub_num))])]):t._e()])],1),t._v(" "),e("Col",{staticClass:"row-column",attrs:{span:"3"}},[e("EDropdown",{attrs:{trigger:"click",size:"small",placement:"bottom",disabled:!0===n.sub_top},on:{command:function(e){return t.dropTask(n,e)}}},[e("div",{staticClass:"task-column"},[t._v(t._s(t.columnName(n.column_id)))]),t._v(" "),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.columnList(n.project_id),(function(n){return e("EDropdownItem",{key:n.id,attrs:{command:"column::"+n.id}},[t._v("\n "+t._s(n.name)+"\n ")])})),1)],1)],1),t._v(" "),e("Col",{staticClass:"row-priority",attrs:{span:"3"}},[e("EDropdown",{attrs:{trigger:"click",size:"small",placement:"bottom",disabled:!0===n.sub_top},on:{command:function(e){return t.dropTask(n,e)}}},[e("TaskPriority",{attrs:{backgroundColor:n.p_color}},[t._v(t._s(n.p_name))]),t._v(" "),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.taskPriority,(function(n,o){return e("EDropdownItem",{key:o,attrs:{command:"priority::"+o}},[e("i",{staticClass:"taskfont",style:{color:n.color},domProps:{innerHTML:t._s(n.p_name==n.name?"":"")}}),t._v("\n "+t._s(n.name)+"\n ")])})),1)],1)],1),t._v(" "),e("Col",{staticClass:"row-user",attrs:{span:"3"}},[e("ul",{on:{click:function(e){return t.openTask(n)}}},[t._l(t.ownerUser(n.task_user),(function(o,i){return i<3?e("li",{key:i},[e("UserAvatar",{attrs:{userid:o.userid,size:"32",borderWitdh:2,borderColor:n.color,showName:1===t.ownerUser(n.task_user).length}})],1):t._e()})),t._v(" "),0===t.ownerUser(n.task_user).length?e("li",{staticClass:"no-owner"},[e("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return e.stopPropagation(),t.openTask(n,!0)}}},[t._v(t._s(t.$L("领取任务")))])],1):t._e()],2)]),t._v(" "),e("Col",{staticClass:"row-time",attrs:{span:"3"}},[!n.complete_at&&n.end_at?e("ETooltip",{class:["task-time",n.today?"today":"",n.overdue?"overdue":""],attrs:{disabled:t.windowSmall,"open-delay":600,content:n.end_at}},[e("div",{on:{click:function(e){return t.openTask(n)}}},[t._v(t._s(t.expiresFormat(n.end_at)))])]):t.showCompleteAt&&n.complete_at?e("div",{attrs:{title:n.complete_at}},[t._v(t._s(t.completeAtFormat(n.complete_at)))]):t._e()],1)],1),t._v(" "),!0===t.taskOpen[n.id]?e("TaskRow",{attrs:{list:t.subTask(n.id),"parent-id":n.id,"fast-add-task":0===n.parent_id&&t.fastAddTask,"open-key":t.openKey},on:{command:t.dropTask}}):t._e()],1)})),t._v(" "),t.fastAddTask||t.parentId>0?e("TaskAddSimple",{attrs:{"parent-id":t.parentId,"row-mode":""},on:{"on-priority":t.onPriority}}):t._e()],2)}),[],!1,null,null,null).exports;function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const O={name:"TaskArchived",props:{projectId:{type:Number,default:0}},data:function(){var t=this;return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"id",width:80,render:function(t,e){var n=e.row;return t("TableAction",{props:{column:e.column,align:"left"}},[t("div",n.id)])}},{title:this.$L("任务名称"),key:"name",minWidth:200,render:function(e,n){var o=n.row;return e("AutoTip",{on:{"on-click":function(){t.$store.dispatch("openTask",o)}}},o.name)}},{title:this.$L("完成时间"),key:"complete_at",width:168,render:function(e,n){var o=n.row;return e("div",{style:{color:o.complete_at?"":"#f00"}},o.complete_at||t.$L("未完成"))}},{title:this.$L("归档时间"),key:"archived_at",width:168},{title:this.$L("归档人员"),key:"archived_userid",minWidth:100,render:function(e,n){var o=n.row;return o.archived_userid?e("UserAvatar",{props:{userid:o.archived_userid,size:24,showName:!0}}):e("Tag",t.$L("系统自动"))}},{title:this.$L("操作"),align:"center",width:100,render:function(e,n){if(t.cacheTasks.find((function(t){return t.id==n.row.id&&!t.archived_at})))return e("div",{style:{color:"#888"}},t.$L("已还原"));var o=[e("span",{style:{fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{click:function(){t.$store.dispatch("openTask",n.row)}}},t.$L("查看")),e("Poptip",{props:{title:t.$L("你确定要还原归档吗?"),confirm:!0,transfer:!0,placement:"left"},style:{marginLeft:"6px",fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{"on-ok":function(){t.recovery(n.row)}}},t.$L("还原")),e("Poptip",{props:{title:t.$L("你确定要删除任务吗?"),confirm:!0,transfer:!0,placement:"left"},style:{marginLeft:"6px",fontSize:"13px",cursor:"pointer",color:"#f00"},on:{"on-ok":function(){t.delete(n.row)}}},t.$L("删除"))];return e("TableAction",{props:{column:n.column}},o)}}],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?w(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,o.rn)(["cacheTasks"])),watch:{projectId:{handler:function(){this.getLists()},immediate:!0},keyIs:function(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch:function(){this.page=1,this.getLists()},getLists:function(){var t=this;this.projectId&&(this.loadIng++,this.keyIs=""!=$A.objImplode(this.keys),this.$store.dispatch("call",{url:"project/task/lists",data:{keys:this.keys,project_id:this.projectId,parent_id:-1,archived:"yes",sorts:{archived_at:"desc"},page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then((function(e){var n=e.data;t.page=n.current_page,t.total=n.total,t.list=n.data,t.noText="没有相关的数据"})).catch((function(){t.noText="数据加载失败"})).finally((function(e){t.loadIng--})))},setPage:function(t){this.page=t,this.getLists()},setPageSize:function(t){this.page=1,this.pageSize=t,this.getLists()},recovery:function(t){var e=this;this.list=this.list.filter((function(e){return e.id!=t.id})),this.loadIng++,this.$store.dispatch("archivedTask",{task_id:t.id,type:"recovery"}).then((function(n){var o=n.msg;$A.messageSuccess(o),e.loadIng--,e.getLists(),e.$store.dispatch("openTask",t)})).catch((function(t){var n=t.msg;$A.modalError(n),e.loadIng--,e.getLists()}))},delete:function(t){var e=this;this.list=this.list.filter((function(e){return e.id!=t.id})),this.loadIng++,this.$store.dispatch("removeTask",{task_id:t.id}).then((function(t){var n=t.msg;$A.messageSuccess(n),e.loadIng--,e.getLists()})).catch((function(t){var n=t.msg;$A.modalError(n),e.loadIng--,e.getLists()}))}}};const x=(0,h.Z)(O,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"task-archived"},[e("div",{staticClass:"archived-title"},[t._v("\n "+t._s(t.$L("归档的任务"))+"\n "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),t._v(" "),e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("任务名"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(e){t.$set(t.keys,"name",e)},expression:"keys.name"}})],1)]),t._v(" "),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowSmall,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,null).exports;var C=n(33441),S=n(81034);const j={name:"ProjectWorkflow",components:{UserInput:l.Z,Draggable:r()},props:{projectId:{type:Number,default:0}},data:function(){return{loadIng:0,list:[],openIndex:"",userShow:!1,userData:{}}},mounted:function(){},watch:{projectId:{handler:function(t){t&&this.getData()},immediate:!0}},methods:{getData:function(){var t=this;this.loadIng++,this.$store.dispatch("call",{url:"project/flow/list",data:{project_id:this.projectId}}).then((function(e){var n=e.data;t.list=n.map((function(t){return t.project_flow_bak=JSON.stringify(t.project_flow_item),t})),t.openIndex=1===t.list.length?"index_"+t.list[0].id:"",t.$nextTick(t.syncScroller)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.loadIng--}))},syncScroller:function(){var t=this;this.list.some((function(e){t.$refs["overlay_".concat(e.id)]&&t.$refs["overlay_".concat(e.id)].some((function(n){Object.keys(n.attributes).includes("sync-scroller")||(n.setAttribute("sync-scroller",!0),n.addEventListener("scroll",(function(o){var i=o.target,r=i.scrollTop,a=i.scrollLeft;t.$nextTick((function(){t.$refs["overlay_".concat(e.id)].some((function(t){t!=n&&t.scrollTo(a,r)}))}))})))}))}))},contrast:function(t,e){return JSON.stringify(t)!=e},existDiff:function(){var t=this;return!!this.list.find((function(e){return t.contrast(e.project_flow_item,e.project_flow_bak)}))},onCreate:function(){var t=-1*$A.randNum(1e3,1e4);this.list.push({id:t,name:"Default",project_flow_item:[{id:-10,name:"待处理",status:"start",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0},{id:-11,name:"进行中",status:"progress",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0},{id:-12,name:"待测试",status:"test",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0},{id:-13,name:"已完成",status:"end",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0},{id:-14,name:"已取消",status:"end",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0}]}),this.openIndex="index_"+t,this.$nextTick(this.syncScroller)},onDelete:function(t){var e=this;$A.modalConfirm({title:"删除工作流",content:"你确定要删除工作流吗?",loading:!0,onOk:function(){if(t.id>0)return new Promise((function(n,o){e.loadIng++,e.$store.dispatch("call",{url:"project/flow/delete",data:{project_id:e.projectId}}).then((function(o){var i=o.msg;n(i);var r=e.list.findIndex((function(e){return e.id==t.id}));r>-1&&e.list.splice(r,1)})).catch((function(t){var e=t.msg;o(e)})).finally((function(t){e.loadIng--}))}));var n=e.list.findIndex((function(e){return e.id==t.id}));n>-1&&e.list.splice(n,1)}})},onMore:function(t,e){switch(t){case"user":this.$set(this.userData,"id",e.id),this.$set(this.userData,"name",e.name),this.$set(this.userData,"userids",e.userids),this.$set(this.userData,"usertype",e.usertype),this.$set(this.userData,"userlimit",e.userlimit),this.userShow=!0;break;case"name":this.onName(e);break;case"remove":this.onRemove(e)}},onUser:function(){var t=this;this.userShow=!1,this.list.some((function(e){var n=e.project_flow_item.find((function(e){return e.id==t.userData.id}));n&&(t.$set(n,"userids",t.userData.userids),t.$set(n,"usertype",t.userData.usertype),t.$set(n,"userlimit",t.userData.userlimit))}))},onName:function(t){var e=this;$A.modalInput({value:t.name,title:"修改名称",placeholder:"请输入流程名称",onOk:function(n){if(!n)return"请输入流程名称";e.$set(t,"name",n)}})},onRemove:function(t){this.list.some((function(e){var n=e.project_flow_item.findIndex((function(e){return e.id==t.id}));n>-1&&e.project_flow_item.splice(n,1)}))},onTurns:function(t){this.$set(t,"turns",t.turns.sort())},onAdd:function(t){$A.modalInput({title:"添加状态",placeholder:"请输入状态名称",onOk:function(e){if(!e)return"请输入状态名称";var n=-1*$A.randNum(1e5,999999),o=t.project_flow_item.map((function(t){return t.id}));t.project_flow_item.push({id:n,name:e,status:"end",turns:o,userids:[],usertype:"add",userlimit:0}),t.project_flow_item.some((function(t){t.turns.push(n)}))}})},onReduction:function(t){this.$set(t,"project_flow_item",JSON.parse(t.project_flow_bak))},onSave:function(t){var e=this,n=0;t.project_flow_item.some((function(t){t.sort=n++})),this.loadIng++,this.$store.dispatch("call",{url:"project/flow/save",data:{project_id:this.projectId,flows:t.project_flow_item},method:"post"}).then((function(n){var o=n.data,i=n.msg;$.messageSuccess(i),o.project_flow_bak=JSON.stringify(o.project_flow_item);var r=e.list.findIndex((function(e){return e.id==t.id}));r>-1?e.list.splice(r,1,o):e.list.push(o),e.openIndex="index_"+o.id,e.$nextTick(e.syncScroller)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(t){e.loadIng--}))},saveAll:function(){var t=this;this.list.some((function(e){t.contrast(e.project_flow_item,e.project_flow_bak)&&t.onSave(e)}))}}};const T=(0,h.Z)(j,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"project-workflow"},[e("div",{staticClass:"workflow-title"},[t._v("\n "+t._s(t.$L("工作流设置"))+"\n "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getData}})],1)]),t._v(" "),t.list.length>0?e("div",{staticClass:"workflow-content"},[e("Collapse",{attrs:{accordion:""},model:{value:t.openIndex,callback:function(e){t.openIndex=e},expression:"openIndex"}},t._l(t.list,(function(n){return e("Panel",{key:n.id,attrs:{name:"index_"+n.id}},[e("div",{staticClass:"workflow-item"},[e("div",{staticClass:"workflow-name"},[t._v(t._s(n.name))]),t._v(" "),e("div",{staticClass:"workflow-status"},t._l(n.project_flow_item,(function(n){return e("div",{class:n.status},[t._v(t._s(n.name))])})),0),t._v(" "),e("div",{staticClass:"workflow-save",on:{click:function(t){t.stopPropagation()}}},[t.contrast(n.project_flow_item,n.project_flow_bak)?[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:function(e){return t.onSave(n)}}},[t._v(t._s(t.$L("保存")))]),t._v(" "),n.id>0?e("Button",{attrs:{disabled:t.loadIng>0,type:"primary",ghost:""},on:{click:function(e){return t.onReduction(n,e)}}},[t._v(t._s(t.$L("还原")))]):t._e()]:t._e(),t._v(" "),e("Button",{attrs:{disabled:t.loadIng>0,type:"error",ghost:""},on:{click:function(e){return t.onDelete(n)}}},[t._v(t._s(t.$L("删除")))])],2)]),t._v(" "),e("div",{staticClass:"taskflow-config",attrs:{slot:"content"},slot:"content"},[e("div",{staticClass:"taskflow-config-table"},[e("div",{staticClass:"taskflow-config-table-left-container"},[e("div",{staticClass:"taskflow-config-table-column-header left-header"},[t._v(t._s(t.$L("配置项")))]),t._v(" "),e("div",{ref:"overlay_".concat(n.id),refInFor:!0,staticClass:"taskflow-config-table-column-body scrollbar-overlay"},[e("div",{staticClass:"taskflow-config-table-block"},[e("div",{staticClass:"taskflow-config-table-block-title"},[t._v(t._s(t.$L("设置状态为")))]),t._v(" "),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("开始状态")))]),t._v(" "),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("新建任务默认状态")))])])]),t._v(" "),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("进行中")))]),t._v(" "),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("可设置多个状态为进行中")))])])]),t._v(" "),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("验收/测试")))]),t._v(" "),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("只能设置单个状态为验收/测试")))])])]),t._v(" "),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("结束状态")))]),t._v(" "),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("该状态下任务自动标记完成")))])])])]),t._v(" "),e("div",{staticClass:"taskflow-config-table-block hr"},[e("div",{staticClass:"taskflow-config-table-block-title"},[t._v(t._s(t.$L("可流转到")))]),t._v(" "),t._l(n.project_flow_item,(function(n){return e("div",{staticClass:"taskflow-config-table-block-item"},[e("span",{staticClass:"transform-status-name"},[t._v(t._s(n.name))])])}))],2)])]),t._v(" "),e("div",{staticClass:"taskflow-config-table-right-container"},[e("Draggable",{staticClass:"taskflow-config-table-list-wrapper",attrs:{list:n.project_flow_item,animation:150,disabled:t.windowSmall,tag:"div",draggable:".column-border"},on:{sort:function(t){}}},[t._l(n.project_flow_item,(function(o){return e("div",{staticClass:"taskflow-config-table-status-column column-border",class:o.status},[e("div",{staticClass:"taskflow-config-table-status-item taskflow-config-table-column-header"},[e("div",{staticClass:"status-label-with-menu",class:o.status},[e("div",{staticClass:"name"},[t._v(t._s(t.$L(o.name)))]),t._v(" "),e("EDropdown",{staticClass:"more",class:{opacity:o.userids.length>0},attrs:{trigger:"click"},on:{command:function(e){return t.onMore(e,o)}}},[e("div",{staticClass:"more-icon"},[o.userids.length>1?e("EAvatar",{attrs:{size:20}},[t._v(t._s(o.userids.length))]):o.userids.length>0?e("UserAvatar",{attrs:{userid:o.userids[0],size:20,tooltipDisabled:""}}):e("Icon",{attrs:{type:"ios-more"}})],1),t._v(" "),e("EDropdownMenu",{staticClass:"taskflow-config-more-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[o.userids.length>0?e("EDropdownItem",{attrs:{command:"user"}},[e("div",{staticClass:"users"},t._l(o.userids,(function(t,n){return e("UserAvatar",{key:n,attrs:{userid:t,size:28,borderWitdh:1,showName:1===o.userids.length,tooltipDisabled:""}})})),1)]):t._e(),t._v(" "),e("EDropdownItem",{attrs:{command:"user"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-person"}}),t._v("\n "+t._s(t.$L("状态负责人"))+"\n ")],1)]),t._v(" "),e("EDropdownItem",{attrs:{command:"name"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-create"}}),t._v(t._s(t.$L("修改名称"))+"\n ")],1)]),t._v(" "),e("EDropdownItem",{attrs:{command:"remove"}},[e("div",{staticClass:"item delete"},[e("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("删除"))+"\n ")],1)])],1)],1)],1)]),t._v(" "),e("div",{ref:"overlay_".concat(n.id),refInFor:!0,staticClass:"taskflow-config-table-column-body scrollbar-overlay"},[e("div",{staticClass:"taskflow-config-table-block"},[e("div",{staticClass:"taskflow-config-table-block-title"}),t._v(" "),e("RadioGroup",{model:{value:o.status,callback:function(e){t.$set(o,"status",e)},expression:"item.status"}},[e("Radio",{attrs:{label:"start"}},[e("span")]),t._v(" "),e("Radio",{attrs:{label:"progress"}},[e("span")]),t._v(" "),e("Radio",{attrs:{label:"test"}},[e("span")]),t._v(" "),e("Radio",{attrs:{label:"end"}},[e("span")])],1)],1),t._v(" "),e("div",{staticClass:"taskflow-config-table-block"},[e("div",{staticClass:"taskflow-config-table-block-title"}),t._v(" "),e("CheckboxGroup",{on:{"on-change":function(e){return t.onTurns(o)}},model:{value:o.turns,callback:function(e){t.$set(o,"turns",e)},expression:"item.turns"}},t._l(n.project_flow_item,(function(t){return e("Checkbox",{key:t.id,attrs:{label:t.id,disabled:t.id==o.id}},[e("span")])})),1)],1)])])})),t._v(" "),e("div",{staticClass:"taskflow-config-table-status-column addnew",on:{click:function(e){return t.onAdd(n)}}},[t._v(t._s(t.$L("添加状态")))])],2)],1)])])])})),1)],1):0==t.loadIng?e("div",{staticClass:"workflow-no"},[t._v("\n "+t._s(t.$L("当前项目还没有创建工作流"))+"\n "),e("Button",{attrs:{type:"primary"},on:{click:t.onCreate}},[t._v(t._s(t.$L("创建工作流")))])],1):t._e(),t._v(" "),e("Modal",{attrs:{title:"".concat(t.$L("状态负责人")," (").concat(t.userData.name,")"),"mask-closable":!1},model:{value:t.userShow,callback:function(e){t.userShow=e},expression:"userShow"}},[e("Form",{attrs:{model:t.userData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("状态负责人")}},[e("UserInput",{attrs:{"project-id":t.projectId,"multiple-max":5,placeholder:t.$L("选择状态负责人")},model:{value:t.userData.userids,callback:function(e){t.$set(t.userData,"userids",e)},expression:"userData.userids"}})],1),t._v(" "),e("FormItem",{attrs:{prop:"usertype",label:t.$L("流转模式")}},[e("RadioGroup",{model:{value:t.userData.usertype,callback:function(e){t.$set(t.userData,"usertype",e)},expression:"userData.usertype"}},[e("Radio",{attrs:{label:"add"}},[t._v(t._s(t.$L("添加模式")))]),t._v(" "),e("Radio",{attrs:{label:"replace"}},[t._v(t._s(t.$L("流转模式")))]),t._v(" "),e("Radio",{attrs:{label:"merge"}},[t._v(t._s(t.$L("剔除模式")))])],1),t._v(" "),"replace"==t.userData.usertype?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到【".concat(t.userData.name,"】时改变任务负责人为状态负责人,原本的任务负责人移至协助人员。"))))]):"merge"==t.userData.usertype?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到【".concat(t.userData.name,"】时改变任务负责人为状态负责人(并保留操作状态的人员),原本的任务负责人移至协助人员。"))))]):e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到【".concat(t.userData.name,"】时添加状态负责人至任务负责人。"))))])],1),t._v(" "),e("FormItem",{attrs:{prop:"userlimit",label:t.$L("限制负责人")}},[e("iSwitch",{attrs:{"true-value":1,"false-value":0},model:{value:t.userData.userlimit,callback:function(e){t.$set(t.userData,"userlimit",e)},expression:"userData.userlimit"}}),t._v(" "),1===t.userData.userlimit?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到【".concat(t.userData.name,'】时,仅"状态负责人"和"项目管理员"可以修改状态。'))))]):e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到【".concat(t.userData.name,'】时,"任务负责人"和"项目管理员"可以修改状态。'))))])],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.userShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary"},on:{click:t.onUser}},[t._v(t._s(t.$L("保存")))])],1)],1)],1)}),[],!1,null,null,null).exports;function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function D(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const A={name:"TaskDeleted",props:{projectId:{type:Number,default:0}},data:function(){var t=this;return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"id",width:80,render:function(t,e){var n=e.row;return t("TableAction",{props:{column:e.column,align:"left"}},[t("div",n.id)])}},{title:this.$L("任务名称"),key:"name",minWidth:200,render:function(t,e){return t("AutoTip",e.row.name)}},{title:this.$L("创建时间"),key:"created_at",width:168},{title:this.$L("删除时间"),key:"deleted_at",width:168},{title:this.$L("删除人员"),key:"deleted_userid",minWidth:100,render:function(t,e){var n=e.row;return n.deleted_userid?t("UserAvatar",{props:{userid:n.deleted_userid,size:24,showName:!0}}):t("span","-")}},{title:this.$L("操作"),align:"center",width:100,render:function(e,n){var o=[e("Poptip",{props:{title:t.$L("你确定要还原删除吗?"),confirm:!0,transfer:!0,placement:"left"},style:{fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{"on-ok":function(){t.recovery(n.row)}}},t.$L("还原"))];return e("TableAction",{props:{column:n.column}},o)}}],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){D(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,o.rn)(["cacheTasks"])),watch:{projectId:{handler:function(){this.getLists()},immediate:!0},keyIs:function(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch:function(){this.page=1,this.getLists()},getLists:function(){var t=this;this.projectId&&(this.loadIng++,this.keyIs=""!=$A.objImplode(this.keys),this.$store.dispatch("call",{url:"project/task/lists",data:{keys:this.keys,project_id:this.projectId,parent_id:-1,deleted:"yes",sorts:{deleted_at:"desc"},page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then((function(e){var n=e.data;t.page=n.current_page,t.total=n.total,t.list=n.data,t.noText="没有相关的数据"})).catch((function(){t.noText="数据加载失败"})).finally((function(e){t.loadIng--})))},setPage:function(t){this.page=t,this.getLists()},setPageSize:function(t){this.page=1,this.pageSize=t,this.getLists()},recovery:function(t){var e=this;this.list=this.list.filter((function(e){return e.id!=t.id})),this.loadIng++,this.$store.dispatch("removeTask",{task_id:t.id,type:"recovery"}).then((function(n){var o=n.msg;$A.messageSuccess(o),e.loadIng--,e.getLists(),e.$store.dispatch("openTask",t)})).catch((function(t){var n=t.msg;$A.modalError(n),e.loadIng--,e.getLists()}))}}};const I=(0,h.Z)(A,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"task-deleted"},[e("div",{staticClass:"deleted-title"},[t._v("\n "+t._s(t.$L("删除的任务"))+"\n "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),t._v(" "),e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("任务名"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(e){t.$set(t.keys,"name",e)},expression:"keys.name"}})],1)]),t._v(" "),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowSmall,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,null).exports;function L(t){return L="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},L(t)}const P={name:"GanttView",props:{lists:{type:Array},menuWidth:{type:Number,default:300},itemWidth:{type:Number,default:100}},data:function(){return{mouseType:"",mouseWidth:0,mouseScaleWidth:0,dateWidth:100,ganttWidth:0,mouseItem:null,mouseBak:{},dateMove:null}},mounted:function(){this.dateWidth=this.itemWidth,this.$refs.ganttRight.addEventListener("mousewheel",this.handleScroll,!1),document.addEventListener("mousemove",this.itemMouseMove),document.addEventListener("mouseup",this.itemMouseUp),window.addEventListener("resize",this.handleResize,!1),this.handleResize()},beforeDestroy:function(){this.$refs.ganttRight.removeEventListener("mousewheel",this.handleScroll,!1),document.removeEventListener("mousemove",this.itemMouseMove),document.removeEventListener("mouseup",this.itemMouseUp),window.removeEventListener("resize",this.handleResize,!1)},watch:{itemWidth:function(t){this.dateWidth=t}},computed:{monthNum:function(){var t=this.ganttWidth,e=this.dateWidth;return Math.floor(t/e/30)+2},monthStyle:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n){var o=0==t?0:t/e,i=new Date,r=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),a=new Date(r.getTime()+864e5*o),s=new Date(a.getFullYear(),a.getMonth()+1,0,23,59,59),l=e*((s-a)/1e3/60/60/24);return n>0&&(l=(s=new Date(a.getFullYear(),a.getMonth()+1+n,0)).getDate()*e),{width:l+"px"}}},monthFormat:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n){var o=0==t?0:t/e,i=new Date,r=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),a=new Date(r.getTime()+864e5*o);return n>0&&(a=new Date(a.getFullYear(),a.getMonth()+1+n,0)),$A.formatDate("Y-m",a)}},dateNum:function(){var t=this.ganttWidth,e=this.dateWidth;return Math.floor(t/e)+2},dateStyle:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n){var o={},i=0==t?0:t/e,r=Math.floor(i)+n;i==Math.floor(i)&&r--;var a=0==t?n-1:r,s=new Date((new Date).getTime()+864e5*a);-1!==[0,6].indexOf(s.getDay())&&(o.backgroundColor="#f9fafb");var l=e;return 0==n&&(l=Math.abs((t%l-l)%l)),o.width=l+"px",o}},dateFormat:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n,o){var i=0==t?0:t/e,r=Math.floor(i)+n;i==Math.floor(i)&&r--;var a=0==t?n-1:r,s=new Date((new Date).getTime()+864e5*a);return"day"==o?s.getDate():"week"==o?this.$L("星期".concat("日一二三四五六".charAt(s.getDay()))):s}},itemStyle:function(){var t=this.mouseWidth,e=this.dateWidth,n=this.ganttWidth;return function(o){var i=o.time,r=i.start,a=i.end,s=o.style,l=o.moveX,c=o.moveW,u=new Date,d=new Date(u.getFullYear(),u.getMonth(),u.getDate(),0,0,0).getTime(),f=(r-d)/1e3/60/60/24,h=e*f+-1*t,p=e*((a-d)/1e3/60/60/24-f);"number"==typeof l&&(h+=l),"number"==typeof c&&(p+=c);var m={left:Math.min(Math.max(h,-1.2*p),1.2*n).toFixed(2)+"px",width:p.toFixed(2)+"px"};return h<0&&Math.abs(h)<p&&(m.paddingLeft=Math.abs(h).toFixed(2)+"px"),h+p>n&&h<n&&(m.paddingRight=Math.abs(h+p-n).toFixed(2)+"px"),"object"===L(s)?Object.assign(m,s):m}}},methods:{itemScrollListener:function(t){"timeline"!=this.mouseType&&(this.$refs.ganttTimeline.scrollTop=t.target.scrollTop)},timelineScrollListener:function(t){"item"!=this.mouseType&&(this.$refs.ganttItem.scrollTop=t.target.scrollTop)},handleScroll:function(t){if(t.preventDefault(),t.ctrlKey)return this.dateWidth=Math.min(600,Math.max(24,this.dateWidth-Math.floor(t.deltaY))),void(this.mouseWidth=this.ganttWidth/2*((this.dateWidth-100)/100)+this.dateWidth/100*this.mouseScaleWidth);if(0!=t.deltaY){var e=this.$refs.ganttTimeline,n=e.scrollTop+t.deltaY;n<0?n=0:n>e.scrollHeight-e.clientHeight&&(n=e.scrollHeight-e.clientHeight),e.scrollTop!=n&&(this.mouseType="timeline",e.scrollTop=n)}0!=t.deltaX&&(this.mouseWidth+=t.deltaX,this.mouseScaleWidth+=t.deltaX*(100/this.dateWidth))},handleResize:function(){this.ganttWidth=this.$refs.ganttTimeline.clientWidth},dateMouseDown:function(t){t.preventDefault(),this.mouseItem=null,this.dateMove={clientX:t.clientX}},itemMouseDown:function(t,e){t.preventDefault();var n="moveX";"timeline-resizer"==t.target.className&&(n="moveW"),"number"!=typeof e[n]&&this.$set(e,n,0),this.mouseBak={type:n,clientX:t.clientX,value:e[n]},this.mouseItem=e,this.dateMove=null},itemMouseMove:function(t){if(null!=this.mouseItem){t.preventDefault();var e=this.mouseBak.value+(t.clientX-this.mouseBak.clientX);if("moveW"===this.mouseBak.type){var n=864e5/this.dateWidth,o=this.mouseItem.time,i=o.start;if(o.end+e*n-i<=0)return}this.$set(this.mouseItem,this.mouseBak.type,e)}else if(null!=this.dateMove){t.preventDefault();var r=5*(this.dateMove.clientX-t.clientX);this.dateMove.clientX=t.clientX,this.mouseWidth+=r,this.mouseScaleWidth+=r*(100/this.dateWidth)}},itemMouseUp:function(t){if(null!=this.mouseItem){var e=this.mouseItem.time,n=e.start,o=e.end,i=!1,r=864e5/this.dateWidth;if("number"==typeof this.mouseItem.moveX&&0!=this.mouseItem.moveX){var a=this.mouseItem.moveX*r;this.$set(this.mouseItem.time,"start",n+a),this.$set(this.mouseItem.time,"end",o+a),this.$set(this.mouseItem,"moveX",0),i=!0}if("number"==typeof this.mouseItem.moveW&&0!=this.mouseItem.moveW){var s=this.mouseItem.moveW*r;this.$set(this.mouseItem.time,"end",o+s),this.$set(this.mouseItem,"moveW",0),i=!0}i?this.$emit("on-change",this.mouseItem):"timeline-title"==t.target.className&&this.clickItem(this.mouseItem),this.mouseItem=null}else null!=this.dateMove&&(this.dateMove=null)},scrollPosition:function(t){var e=new Date,n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),o=864e5/this.dateWidth,i=(this.lists[t].time.start-n)/o-this.dateWidth-this.mouseWidth;this.mouseWidth+=i,this.mouseScaleWidth+=i*(100/this.dateWidth)},clickItem:function(t){this.$emit("on-click",t)}}};function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function M(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?N(Object(n),!0).forEach((function(e){q(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function q(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const R={name:"ProjectGantt",components:{GanttView:(0,h.Z)(P,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"common-gantt"},[e("div",{staticClass:"gantt-left",style:{width:t.menuWidth+"px"}},[e("div",{staticClass:"gantt-title"},[e("div",{staticClass:"gantt-title-text"},[t._v(t._s(t.$L("任务名称")))])]),t._v(" "),e("ul",{ref:"ganttItem",staticClass:"gantt-item",on:{scroll:t.itemScrollListener,mouseenter:function(e){t.mouseType="item"}}},t._l(t.lists,(function(n,o){return e("li",{key:o},[n.overdue?e("div",{staticClass:"item-overdue",on:{click:function(e){return t.clickItem(n)}}},[t._v(t._s(t.$L("已超期")))]):t._e(),t._v(" "),e("div",{staticClass:"item-title",class:{complete:n.complete,overdue:n.overdue},on:{click:function(e){return t.clickItem(n)}}},[t._v(t._s(n.label))]),t._v(" "),e("Icon",{staticClass:"item-icon",attrs:{type:"ios-locate-outline"},on:{click:function(e){return t.scrollPosition(o)}}})],1)})),0)]),t._v(" "),e("div",{ref:"ganttRight",staticClass:"gantt-right"},[e("div",{staticClass:"gantt-chart"},[e("ul",{staticClass:"gantt-month"},t._l(t.monthNum,(function(n,o){return e("li",{key:o,style:t.monthStyle(o)},[e("div",{staticClass:"month-format"},[t._v(t._s(t.monthFormat(o)))])])})),0),t._v(" "),e("ul",{staticClass:"gantt-date",on:{mousedown:t.dateMouseDown}},t._l(t.dateNum,(function(n,o){return e("li",{key:o,style:t.dateStyle(o)},[e("div",{staticClass:"date-format"},[e("div",{staticClass:"format-day"},[t._v(t._s(t.dateFormat(o,"day")))]),t._v(" "),t.dateWidth>46?e("div",{staticClass:"format-week"},[t._v(t._s(t.dateFormat(o,"week")))]):t._e()])])})),0),t._v(" "),e("ul",{ref:"ganttTimeline",staticClass:"gantt-timeline",on:{scroll:t.timelineScrollListener,mouseenter:function(e){t.mouseType="timeline"}}},t._l(t.lists,(function(n,o){return e("li",{key:o},[e("div",{staticClass:"timeline-item",style:t.itemStyle(n),on:{mousedown:function(e){return t.itemMouseDown(e,n)}}},[e("div",{staticClass:"timeline-title",attrs:{title:n.label}},[t._v(t._s(n.label))]),t._v(" "),e("div",{staticClass:"timeline-resizer"})])])})),0)])])])}),[],!1,null,null,null).exports},props:{projectColumn:{default:[]},flowInfo:{default:{}}},data:function(){return{lists:[],filtrProjectId:0,editColumns:[{title:this.$L("任务名称"),key:"label",minWidth:150,ellipsis:!0},{title:this.$L("原计划时间"),minWidth:135,align:"center",render:function(t,e){var n=e.row;return!0===n.notime?t("span","-"):t("div",{style:{}},[t("div",$A.formatDate("Y-m-d H:i",Math.round(n.baktime.start/1e3))),t("div",$A.formatDate("Y-m-d H:i",Math.round(n.baktime.end/1e3)))])}},{title:this.$L("新计划时间"),minWidth:135,align:"center",render:function(t,e){var n=e.row;return t("div",{style:{}},[t("div",$A.formatDate("Y-m-d H:i",Math.round(n.newTime.start/1e3))),t("div",$A.formatDate("Y-m-d H:i",Math.round(n.newTime.end/1e3)))])}}],editData:[],editLoad:0,editShowInfo:!1}},mounted:function(){this.initData()},computed:M(M(M({},(0,o.rn)(["taskPriority"])),(0,o.Se)(["projectData"])),{},{menuWidth:function(){return this.windowWidth<1440?180:260},dropStyle:function(){return this.windowWidth<1440?{left:"142px"}:{}},completedTask:function(){return this.projectData.cacheParameter.completedTask}}),watch:{projectColumn:{handler:function(){this.initData()},deep:!0},flowInfo:{handler:function(){this.initData()},deep:!0},completedTask:function(){this.initData()}},methods:{initData:function(){this.lists=[],this.projectColumn&&this.projectColumn.some(this.checkAdd)},filtrLength:function(t){var e=this;return t.filter((function(t){return!(t.complete_at&&!e.completedTask)&&!(e.flowInfo.value>0&&t.flow_item_id!==e.flowInfo.value)})).length},checkAdd:function(t){var e=this;this.filtrProjectId>0&&t.id!=this.filtrProjectId||t.tasks&&t.tasks.some((function(t){var n=!t.start_at||!t.end_at,o=e.getTimeObj(t),i=o.start,r=o.end;if(t.complete_at&&!e.completedTask)return!1;if(e.flowInfo.value>0&&t.flow_item_id!==e.flowInfo.value)return!1;var a="#058ce4";e.taskPriority.some((function(e){if(e.priority===t.p_level)return a=e.color,!0}));var s={start:i,end:r},l=$A.cloneJSON(s),c=e.editData.find((function(e){return e.id==t.id}));c&&(s=$A.cloneJSON(c.newTime)),e.lists.push({id:t.id,label:t.name,complete:t.complete_at,overdue:t.overdue,time:s,notime:n,baktime:l,style:{background:a}})}))},onChange:function(t){var e=t.time,n=t.baktime;if(Math.abs(n.end-e.end)>1e3||Math.abs(n.start-e.start)>1e3){var o=this.editData.find((function(e){return e.id==t.id}));o?o.newTime=e:this.editData.push({id:t.id,label:t.label,notime:t.notime,baktime:t.baktime,newTime:e})}},onClick:function(t){this.$store.dispatch("openTask",t)},editSubmit:function(t){var e=this;this.editData&&this.editData.forEach((function(n){var o=e.lists.find((function(t){return t.id==n.id}));if(t){e.editLoad++;var i=$A.formatDate("Y-m-d H:i",Math.round(n.newTime.start/1e3)),r=$A.formatDate("Y-m-d H:i",Math.round(n.newTime.end/1e3)),a={task_id:n.id,times:[i,r]};e.$store.dispatch("taskUpdate",a).then((function(t){var n=t.msg;e.editLoad--,0===e.editLoad&&$A.messageSuccess(n),o&&e.$set(o,"baktime",$A.cloneJSON(o.time))})).catch((function(t){var n=t.msg;e.editLoad--,0===e.editLoad&&$A.modalError(n),o&&e.$set(o,"time",$A.cloneJSON(o.baktime))}))}else o&&e.$set(o,"time",$A.cloneJSON(o.baktime))})),this.editData=[]},getRawTime:function(t){var e=this.lists.find((function(e){return e.id==t}));return e?this.getTimeObj(e):null},getTimeObj:function(t){var e=$A.Time(t.start_at)||$A.Time(t.created_at),n=$A.Time(t.end_at)||$A.Time(t.created_at)+86400;return n==e&&(n=Math.round(new Date($A.formatDate("Y-m-d 23:59:59",n)).getTime()/1e3)),n=Math.max(n,e+60),{start:e*=1e3,end:n*=1e3}},onSwitchColumn:function(t){this.filtrProjectId=$A.runNum(t),this.initData()}}};const B=(0,h.Z)(R,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"project-gstc-gantt"},[e("GanttView",{attrs:{lists:t.lists,menuWidth:t.menuWidth,itemWidth:80},on:{"on-change":t.onChange,"on-click":t.onClick}}),t._v(" "),e("Dropdown",{staticClass:"project-gstc-dropdown-filtr",style:t.dropStyle,attrs:{trigger:"click"},on:{"on-click":t.onSwitchColumn}},[e("Icon",{staticClass:"project-gstc-dropdown-icon",class:{filtr:t.filtrProjectId>0},attrs:{type:"md-funnel"}}),t._v(" "),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{class:{"dropdown-active":0==t.filtrProjectId},attrs:{name:0}},[t._v(t._s(t.$L("全部")))]),t._v(" "),t._l(t.projectColumn,(function(n,o){return e("DropdownItem",{key:o,class:{"dropdown-active":t.filtrProjectId==n.id},attrs:{name:n.id}},[t._v("\n "+t._s(n.name)+"\n "),n.tasks?e("span",[t._v("("+t._s(t.filtrLength(n.tasks))+")")]):t._e()])}))],2)],1),t._v(" "),e("div",{staticClass:"project-gstc-edit",class:{info:t.editShowInfo,visible:t.editData&&t.editData.length>0}},[e("div",{staticClass:"project-gstc-edit-info"},[e("Table",{attrs:{size:"small","max-height":"600",columns:t.editColumns,data:t.editData}}),t._v(" "),e("div",{staticClass:"project-gstc-edit-btns"},[e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"text"},on:{click:function(e){return t.editSubmit(!1)}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"primary"},on:{click:function(e){return t.editSubmit(!0)}}},[t._v(t._s(t.$L("保存")))]),t._v(" "),e("Icon",{staticClass:"zoom",attrs:{type:"md-arrow-dropright"},on:{click:function(e){t.editShowInfo=!1}}})],1)],1),t._v(" "),e("div",{staticClass:"project-gstc-edit-small"},[e("div",{staticClass:"project-gstc-edit-text",on:{click:function(e){t.editShowInfo=!0}}},[t._v(t._s(t.$L("未保存计划时间"))+": "),t.editData?e("span",[t._v(t._s(t.editData.length))]):t._e()]),t._v(" "),e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"text"},on:{click:function(e){return t.editSubmit(!1)}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"primary"},on:{click:function(e){return t.editSubmit(!0)}}},[t._v(t._s(t.$L("保存")))])],1)])],1)}),[],!1,null,null,null).exports;function F(t){return function(t){if(Array.isArray(t))return U(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return U(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function H(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?z(Object(n),!0).forEach((function(e){V(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function V(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const W={name:"ProjectPanel",components:{TaskMenu:m.Z,ProjectWorkflow:T,DrawerOverlay:S.Z,ProjectLog:C.Z,TaskArchived:x,TaskRow:_,Draggable:r(),TaskAddSimple:p,UserInput:l.Z,TaskPriority:a.Z,TaskDeleted:I,ProjectGantt:B},data:function(){return{loading:!1,nowTime:$A.Time(),nowInterval:null,columnLoad:{},columnTopShow:{},sortField:"end_at",sortType:"desc",searchText:"",addColumnShow:!1,addColumnName:"",sortData:[],sortDisabled:!1,settingShow:!1,settingData:{},settingLoad:0,userShow:!1,userData:{},userLoad:0,inviteShow:!1,inviteData:{},inviteLoad:0,transferShow:!1,transferData:{},transferLoad:0,workflowShow:!1,logShow:!1,archivedTaskShow:!1,deletedTaskShow:!1,flowInfo:{},flowList:[]}},mounted:function(){var t=this;this.nowInterval=setInterval((function(){t.nowTime=$A.Time()}),1e3)},destroyed:function(){clearInterval(this.nowInterval)},computed:H(H(H({},(0,o.rn)(["cacheDialogs","projectId","projectLoad","cacheTasks","cacheColumns","taskCompleteTemps"])),(0,o.Se)(["projectData","transforTasks"])),{},{tabTypeActive:function(){return this.projectData.cacheParameter.menuType},tabTypeStyle:function(){var t={};switch(this.tabTypeActive){case"column":t.left="0";break;case"table":t.left="33.33%";break;case"gantt":t.left="66.66%";break;default:t.display="none"}return t},userWaitRemove:function(){var t=this.userData,e=t.userids,n=t.useridbak;if(!e)return[];var o=[];return n.some((function(t){e.includes(t)||o.push(t)})),o},msgUnread:function(){var t=this.cacheDialogs,e=this.projectData,n=t.find((function(t){return t.id===e.dialog_id}));return n?$A.getDialogUnread(n):0},panelTask:function(){var t=this.searchText,e=this.flowInfo;return function(n){return this.projectData.cacheParameter.completedTask||(n=n.filter((function(t){return!t.complete_at}))),e.value>0&&(n=n.filter((function(t){return t.flow_item_id===e.value}))),t&&(n=n.filter((function(e){var n=e.name,o=e.desc;return $A.strExists("".concat(n," ").concat(o),t)}))),n}},projectUser:function(){var t=this.projectData,e=this.windowWidth;if(!t.project_user)return[];var n=e>1200?8:3,o=t.project_user.filter((function(e){return e.userid!=t.owner_userid}));if(o.length<=n)return o;var i=o.slice(0,n-1);return i.push({userid:-1}),i.push(o[o.length-1]),i},allTask:function(){var t=this.cacheTasks,e=this.projectId;return t.filter((function(t){return!t.archived_at&&t.project_id==e}))},columnList:function(){var t=this,e=this.projectId,n=this.cacheColumns,o=this.allTask,i=n.filter((function(t){return t.project_id==e})).sort((function(t,e){return t.sort!=e.sort?t.sort-e.sort:t.id-e.id}));return i.forEach((function(e){e.tasks=t.transforTasks(o.filter((function(t){return t.column_id==e.id}))).sort((function(t,e){return t.complete_at||e.complete_at?$A.Date(t.complete_at)-$A.Date(e.complete_at):t.sort!=e.sort?t.sort-e.sort:t.id-e.id}))})),i},myList:function(){var t=this,e=this.allTask,n=this.taskCompleteTemps,o=this.sortField,i=this.sortType,r=e.filter((function(e){return t.myFilter(e)}));if(n.length>0){var a,s=e.filter((function(e){return n.includes(e.id)&&t.myFilter(e,!1)}));if(s.length>0)(a=r=$A.cloneJSON(r)).push.apply(a,F(s))}return r.sort((function(t,e){if("asc"==i){var n=[e,t];t=n[0],e=n[1]}return"level"==o?t.p_level-e.p_level:"end_at"==o?t.end_at==e.end_at?t.p_level-e.p_level:$A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59"):void 0}))},helpList:function(){var t=this,e=this.allTask,n=this.taskCompleteTemps,o=this.sortField,i=this.sortType,r=e.filter((function(e){return t.helpFilter(e)}));if(n.length>0){var a,s=e.filter((function(e){return n.includes(e.id)&&t.helpFilter(e,!1)}));if(s.length>0)(a=r=$A.cloneJSON(r)).push.apply(a,F(s))}return r.sort((function(t,e){if("asc"==i){var n=[e,t];t=n[0],e=n[1]}return"level"==o?t.p_level-e.p_level:"end_at"==o?t.end_at==e.end_at?t.p_level-e.p_level:$A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59"):void 0}))},unList:function(){var t=this.allTask,e=this.searchText,n=this.sortField,o=this.sortType,i=this.flowInfo;return t.filter((function(t){return!(t.parent_id>0)&&(!(i.value>0&&t.flow_item_id!==i.value)&&(!(e&&!$A.strExists(t.name,e)&&!$A.strExists(t.desc,e))&&!t.complete_at))})).sort((function(t,e){if("asc"==o){var i=[e,t];t=i[0],e=i[1]}return"level"==n?t.p_level-e.p_level:"end_at"==n?t.end_at==e.end_at?t.p_level-e.p_level:$A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59"):void 0}))},completedList:function(){var t=this.allTask,e=this.searchText,n=this.flowInfo;return t.filter((function(t){return!(t.parent_id>0)&&(!(n.value>0&&t.flow_item_id!==n.value)&&(!(e&&!$A.strExists(t.name,e)&&!$A.strExists(t.desc,e))&&t.complete_at))})).sort((function(t,e){var n=$A.Date(t.complete_at);return $A.Date(e.complete_at)-n}))},completedCount:function(){return this.allTask.filter((function(t){return!(t.parent_id>0)&&t.complete_at})).length},flowTitle:function(){var t=this.flowInfo,e=this.flowData,n=this.allTask;if(t.value){var o=e.find((function(e){return e.value===t.value}));return o?o.label:t.label}return"".concat(this.$L("全部")," (").concat(n.length,")")},flowData:function(){var t=this.flowList,e=this.allTask,n=[{value:0,label:"".concat(this.$L("全部")," (").concat(e.length,")"),children:[]}],o=t.map((function(t){return{value:t.id,label:t.name,status:t.status,children:t.project_flow_item.map((function(t){var n=e.filter((function(e){return e.flow_item_id==t.id})).length;return{value:t.id,label:"".concat(t.name," (").concat(n,")"),status:t.status,class:t.status}}))}}));return 1===o.length?n.push.apply(n,F(o[0].children)):o.length>0&&n.push.apply(n,F(o)),n}}),watch:{projectData:function(){this.sortData=this.getSort()},projectLoad:function(t){var e=this;this._loadTimeout&&clearTimeout(this._loadTimeout),t>0?this._loadTimeout=setTimeout((function(){e.loading=!0}),1e3):this.loading=!1},projectId:{handler:function(t){t>0&&this.getFlowData()},immediate:!0}},methods:{showDesc:function(){this.windowLarge||$A.modalInfo({language:!1,title:this.$L("项目描述"),content:this.projectData.desc})},searchFocus:function(){var t=this;this.$nextTick((function(){t.$refs.searchInput.focus({cursor:"end"})}))},getSort:function(){var t=[];return this.columnList.forEach((function(e){t.push({id:e.id,task:e.tasks.map((function(t){return t.id}))})})),t},sortUpdate:function(t){var e=this,n=this.sortData,o=this.getSort();if(JSON.stringify(n)!==JSON.stringify(o)){this.sortData=o;var i={project_id:this.projectId,sort:this.sortData,only_column:!0===t?1:0};this.sortDisabled=!0,this.$store.dispatch("call",{url:"project/sort",data:i}).then((function(t){var n=t.msg;$A.messageSuccess(n),e.sortDisabled=!1;var o,r=[];i.only_column?(o=-1,i.sort.forEach((function(t){o++,r.push({id:t.id,sort:o})})),e.$store.dispatch("saveColumn",r)):(i.sort.forEach((function(t){o=-1,r.push.apply(r,F(t.task.map((function(n){return o++,r.push.apply(r,F(e.allTask.filter((function(t){return t.parent_id==n})).map((function(e){return{id:e.id,sort:o,column_id:t.id}})))),{id:n,sort:o,column_id:t.id}}))))})),e.$store.dispatch("saveTask",r))})).catch((function(t){var n=t.msg;$A.modalError(n),e.sortDisabled=!1,e.$store.dispatch("getTaskForProject",e.projectId).catch((function(){}))}))}},addTopShow:function(t,e){this.$set(this.columnTopShow,t,e),e&&(this.$refs["column_"+t][0].scrollTop=0)},addTaskOpen:function(t){s.Store.set("addTask",t)},addColumnOpen:function(){var t=this;this.addColumnShow=!0,this.$nextTick((function(){t.$refs.addColumnName.focus()}))},addColumnBlur:function(){""===this.addColumnName&&(this.addColumnShow=!1)},addColumnSubmit:function(){var t=this,e=this.addColumnName.trim();""!==e&&this.$store.dispatch("call",{url:"project/column/add",data:{project_id:this.projectId,name:e}}).then((function(e){var n=e.data,o=e.msg;$A.messageSuccess(o),t.addColumnName="",t.$store.dispatch("saveColumn",n)})).catch((function(t){var e=t.msg;$A.modalError(e)}))},dropColumn:function(t,e){"title"===e?this.titleColumn(t):"remove"===e?this.removeColumn(t):e.name&&this.updateColumn(t,{color:e.color}).catch($A.modalError)},titleColumn:function(t){var e=this;$A.modalInput({value:t.name,title:"修改列表",placeholder:"输入列表名称",onOk:function(n){return n?e.updateColumn(t,{name:n}):"列表名称不能为空"}})},updateColumn:function(t,e){var n=this;return new Promise((function(o,i){!0!==n.columnLoad[t.id]?(n.$set(n.columnLoad,t.id,!0),Object.keys(e).forEach((function(o){return n.$set(t,o,e[o])})),n.$store.dispatch("call",{url:"project/column/update",data:Object.assign(e,{column_id:t.id})}).then((function(e){var i=e.data;n.$set(n.columnLoad,t.id,!1),n.$store.dispatch("saveColumn",i),o()})).catch((function(e){var o=e.msg;n.$set(n.columnLoad,t.id,!1),n.$store.dispatch("getColumns",n.projectId).catch((function(){})),i(o)}))):o()}))},removeColumn:function(t){var e=this;$A.modalConfirm({title:"删除列表",content:"你确定要删除列表【"+t.name+"】及列表内的任务吗?",loading:!0,onOk:function(){if(!0!==e.columnLoad[t.id])return e.$set(e.columnLoad,t.id,!0),new Promise((function(n,o){e.$store.dispatch("removeColumn",t.id).then((function(t){var e=t.msg;n(e)})).catch((function(t){var e=t.msg;o(e)})).finally((function(n){e.$set(e.columnLoad,t.id,!1)}))}))}})},onSort:function(t){this.sortField=t,this.sortType="desc"==this.sortType?"asc":"desc"},onSetting:function(){var t=this;this.settingLoad++,this.$store.dispatch("call",{url:"project/update",data:Object.assign(this.settingData,{project_id:this.projectId})}).then((function(e){var n=e.data,o=e.msg;$A.messageSuccess(o),t.settingShow=!1,t.$store.dispatch("saveProject",n)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.settingLoad--}))},onUser:function(){var t=this;this.userLoad++,this.$store.dispatch("call",{url:"project/user",data:{project_id:this.projectId,userid:this.userData.userids}}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.userShow=!1,t.$store.dispatch("getProjectOne",t.projectId).catch((function(){})),t.$store.dispatch("getTaskForProject",t.projectId).catch((function(){}))})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.userLoad--}))},onTransfer:function(){var t=this;this.transferLoad++,this.$store.dispatch("call",{url:"project/transfer",data:{project_id:this.projectId,owner_userid:this.transferData.owner_userid[0]}}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.transferShow=!1,t.$store.dispatch("getProjectOne",t.projectId).catch((function(){})),t.$store.dispatch("getTaskForProject",t.projectId).catch((function(){}))})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.transferLoad--}))},onArchived:function(){var t=this;$A.modalConfirm({title:"归档项目",content:"你确定要归档项目【"+this.projectData.name+"】吗?",loading:!0,onOk:function(){return new Promise((function(e,n){t.$store.dispatch("archivedProject",t.projectId).then((function(t){var n=t.msg;e(n)})).catch((function(t){var e=t.msg;n(e)}))}))}})},onDelete:function(){var t=this;$A.modalConfirm({title:"删除项目",content:"你确定要删除项目【"+this.projectData.name+"】吗?",loading:!0,onOk:function(){return new Promise((function(e,n){t.$store.dispatch("removeProject",t.projectId).then((function(t){var n=t.msg;e(n)})).catch((function(t){var e=t.msg;n(e)}))}))}})},onExit:function(){var t=this;$A.modalConfirm({title:"退出项目",content:"你确定要退出项目【"+this.projectData.name+"】吗?",loading:!0,onOk:function(){return new Promise((function(e,n){t.$store.dispatch("exitProject",t.projectId).then((function(t){var n=t.msg;e(n)})).catch((function(t){var e=t.msg;n(e)}))}))}})},projectDropdown:function(t){var e=this;switch(t){case"setting":this.$set(this.settingData,"name",this.projectData.name),this.$set(this.settingData,"desc",this.projectData.desc),this.settingShow=!0,this.$nextTick((function(){e.$refs.projectName.focus(),setTimeout(e.$refs.projectDesc.resizeTextarea,0)}));break;case"user":if(this.projectData.owner_userid!==this.userId)return;var n=this.projectData.project_user.map((function(t){return t.userid}));this.$set(this.userData,"userids",n),this.$set(this.userData,"useridbak",n),this.$set(this.userData,"uncancelable",[this.projectData.owner_userid]),this.userShow=!0;break;case"invite":this.inviteData={},this.inviteShow=!0,this.inviteGet();break;case"workflow":this.workflowShow=!0;break;case"log":this.logShow=!0;break;case"archived_task":this.archivedTaskShow=!0;break;case"deleted_task":this.deletedTaskShow=!0;break;case"transfer":this.$set(this.transferData,"owner_userid",[this.projectData.owner_userid]),this.transferShow=!0;break;case"archived":this.onArchived();break;case"delete":this.onDelete();break;case"exit":this.onExit()}},openTask:function(t,e){this.$store.dispatch("openTask",t),!0===e&&setTimeout((function(){s.Store.set("receiveTask",!0)}),300)},openMenu:function(t,e){var n=this.$refs["taskMenu_".concat(e.id)];n&&n[0].handleClick(t)},taskIsHidden:function(t){var e=t.name,n=t.desc,o=t.complete_at,i=this.searchText,r=this.flowInfo;return!(this.projectData.cacheParameter.completedTask||!o)||(r.value>0&&t.flow_item_id!==r.value||!(!i||$A.strExists("".concat(e," ").concat(n),i)))},ownerUser:function(t){return t.filter((function(t){return 1==t.owner})).sort((function(t,e){return t.id-e.id}))},inviteGet:function(t){var e=this;this.inviteLoad++,this.$store.dispatch("call",{url:"project/invite",data:{project_id:this.projectId,refresh:!0===t?"yes":"no"}}).then((function(t){var n=t.data;e.inviteData=n,e.inviteCopy()})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(t){e.inviteLoad--}))},getFlowData:function(){var t=this;this.flowInfo={},this.$store.dispatch("call",{url:"project/flow/list",data:{project_id:this.projectId}}).then((function(e){var n,o=e.data;t.flowList=o,null===(n=t.$refs.flow)||void 0===n||n.clearSelect()})).catch((function(){t.flowList=[]}))},flowChange:function(t,e){this.flowInfo=e.pop()||{}},inviteCopy:function(){this.inviteData.url&&this.$copyText(this.inviteData.url).then((function(t){$A.messageSuccess("复制成功")})).catch((function(t){$A.messageError("复制失败")}))},inviteFocus:function(){this.$refs.inviteInput.focus({cursor:"all"})},toggleCompleted:function(){this.toggleParameter("completedTask")},workflowBeforeClose:function(){var t=this;return new Promise((function(e){t.$refs.workflow.existDiff()?$A.modalConfirm({content:"设置尚未保存,是否放弃修改?",cancelText:"取消",okText:"放弃",onOk:function(){e()}}):e()}))},myFilter:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(!this.projectData.cacheParameter.completedTask&&!0===e&&t.complete_at)&&(!(this.flowInfo.value>0&&t.flow_item_id!==this.flowInfo.value)&&(!(this.searchText&&!$A.strExists(t.name,this.searchText)&&!$A.strExists(t.desc,this.searchText))&&t.owner))},helpFilter:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(t.parent_id>0)&&(!(!this.projectData.cacheParameter.completedTask&&!0===n&&t.complete_at)&&(!(this.flowInfo.value>0&&t.flow_item_id!==this.flowInfo.value)&&(!(this.searchText&&!$A.strExists(t.name,this.searchText)&&!$A.strExists(t.desc,this.searchText))&&(t.task_user&&t.task_user.find((function(t){var n=t.userid,o=t.owner;return n==e.userId&&0==o}))))))},expiresFormat:function(t){return $A.countDownFormat(t,this.nowTime)},tabTypeChange:function(t){switch(t){case"column":this.toggleParameter({project_id:this.projectId,key:"menuType",value:"column"});break;case"table":this.toggleParameter({project_id:this.projectId,key:"menuType",value:"table"});break;case"gantt":this.toggleParameter({project_id:this.projectId,key:"menuType",value:"gantt"})}},toggleParameter:function(t){if("completedTask"===t)this.$store.dispatch("forgetTaskCompleteTemp",!0);else if("chat"===t&&this.windowSmall)return void this.$store.dispatch("openDialog",this.projectData.dialog_id);this.$store.dispatch("toggleProjectParameter",t)},onBack:function(){var t=this.$store.state.routeHistoryLast,e=t.name,n=t.params;e===this.$route.name&&/\d+/.test(n.projectId)?this.goForward({name:this.$route.name,params:{projectId:"all"}}):this.goBack()}}};const K=(0,h.Z)(W,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"project-panel",class:[t.tabTypeActive]},[e("PageTitle",{attrs:{title:t.projectData.name}}),t._v(" "),e("div",{staticClass:"project-titbox"},[e("div",{staticClass:"project-title"},[e("div",{staticClass:"project-back",on:{click:t.onBack}},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),e("h1",[t._v(t._s(t.projectData.name))]),t._v(" "),t.loading?e("div",{staticClass:"project-load"},[e("Loading")],1):t._e()]),t._v(" "),e("ul",{staticClass:"project-icons"},[e("li",{staticClass:"project-avatar",class:{"cursor-default":t.projectData.owner_userid!==t.userId},on:{click:function(e){return t.projectDropdown("user")}}},[e("ul",[e("li",[e("UserAvatar",{attrs:{userid:t.projectData.owner_userid,size:36,borderWitdh:2,openDelay:0}},[e("p",[t._v(t._s(t.$L("项目负责人")))])]),t._v(" "),(t.windowWidth<=980||t.projectData.cacheParameter.chat)&&t.projectUser.length>0?e("Badge",{attrs:{type:"normal",count:t.projectData.project_user.length}}):t._e()],1),t._v(" "),t._l(t.projectUser,(function(n){return!(t.windowWidth<=980||t.projectData.cacheParameter.chat)&&t.projectUser.length>0?[-1===n.userid?e("li",{staticClass:"more"},[e("ETooltip",{attrs:{disabled:t.windowSmall,content:t.$L("共"+t.projectData.project_user.length+"个成员")}},[e("Icon",{attrs:{type:"ios-more"}})],1)],1):e("li",[e("UserAvatar",{attrs:{userid:n.userid,size:36,borderWitdh:2,openDelay:0}})],1)]:t._e()}))],2)]),t._v(" "),e("li",{staticClass:"project-icon",on:{click:function(e){return t.addTaskOpen(0)}}},[e("ETooltip",{attrs:{disabled:t.windowSmall,content:t.$L("添加任务")}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"md-add"}})],1)],1),t._v(" "),e("li",{class:["project-icon",""!=t.searchText?"active":""]},[e("Tooltip",{attrs:{always:""!=t.searchText,theme:"light",rawIndex:10},on:{"on-popper-show":t.searchFocus}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"ios-search"},on:{click:t.searchFocus}}),t._v(" "),e("div",{attrs:{slot:"content"},slot:"content"},[e("Input",{ref:"searchInput",staticClass:"search-input",attrs:{placeholder:t.$L("名称、描述..."),clearable:""},model:{value:t.searchText,callback:function(e){t.searchText=e},expression:"searchText"}})],1)],1)],1),t._v(" "),e("li",{class:["project-icon",t.windowLarge&&t.projectData.cacheParameter.chat?"active":""],on:{click:function(e){return t.toggleParameter("chat")}}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"ios-chatbubbles"}}),t._v(" "),e("Badge",{staticClass:"menu-badge",attrs:{count:t.msgUnread}})],1),t._v(" "),e("li",{staticClass:"project-icon"},[e("EDropdown",{attrs:{trigger:"click",transfer:""},on:{command:t.projectDropdown}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"ios-more"}}),t._v(" "),t.projectData.owner_userid===t.userId?e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"setting"}},[t._v(t._s(t.$L("项目设置")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"workflow"}},[t._v(t._s(t.$L("工作流设置")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"user",divided:""}},[t._v(t._s(t.$L("成员管理")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"invite"}},[t._v(t._s(t.$L("邀请链接")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"log",divided:""}},[t._v(t._s(t.$L("项目动态")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"archived_task"}},[t._v(t._s(t.$L("已归档任务")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"deleted_task"}},[t._v(t._s(t.$L("已删除任务")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"transfer",divided:""}},[t._v(t._s(t.$L("移交项目")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"archived"}},[t._v(t._s(t.$L("归档项目")))]),t._v(" "),e("EDropdownItem",{staticStyle:{color:"#f40"},attrs:{command:"delete"}},[t._v(t._s(t.$L("删除项目")))])],1):e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"log"}},[t._v(t._s(t.$L("项目动态")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"archived_task"}},[t._v(t._s(t.$L("已归档任务")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"deleted_task"}},[t._v(t._s(t.$L("已删除任务")))]),t._v(" "),e("EDropdownItem",{staticStyle:{color:"#f40"},attrs:{command:"exit",divided:""}},[t._v(t._s(t.$L("退出项目")))])],1)],1)],1)])]),t._v(" "),e("div",{staticClass:"project-subbox"},[e("div",{staticClass:"project-subtitle",on:{click:t.showDesc}},[t._v(t._s(t.projectData.desc))]),t._v(" "),e("div",{staticClass:"project-switch"},[t.completedCount>0?e("div",{staticClass:"project-checkbox"},[e("Checkbox",{attrs:{value:t.projectData.cacheParameter.completedTask},on:{"on-change":t.toggleCompleted}},[t._v(t._s(t.$L("显示已完成")))])],1):t._e(),t._v(" "),t.flowList.length>0?e("div",{staticClass:"project-select"},[e("Cascader",{ref:"flow",attrs:{data:t.flowData,"transfer-class-name":"project-panel-flow-cascader",transfer:""},on:{"on-change":t.flowChange}},[e("span",{class:"project-flow ".concat(t.flowInfo.status||"")},[t._v(t._s(t.flowTitle))])])],1):t._e(),t._v(" "),e("div",{staticClass:"project-switch-button"},[e("div",{staticClass:"slider",style:t.tabTypeStyle}),t._v(" "),e("div",{class:{active:"column"===t.tabTypeActive},on:{click:function(e){return t.tabTypeChange("column")}}},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),e("div",{class:{active:"table"===t.tabTypeActive},on:{click:function(e){return t.tabTypeChange("table")}}},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),e("div",{class:{active:"gantt"===t.tabTypeActive},on:{click:function(e){return t.tabTypeChange("gantt")}}},[e("i",{staticClass:"taskfont"},[t._v("")])])])])]),t._v(" "),"column"===t.tabTypeActive?e("div",{staticClass:"project-column"},[e("Draggable",{staticClass:"column-list",attrs:{list:t.columnList,animation:150,disabled:t.sortDisabled||t.windowSmall,tag:"ul",draggable:".column-item"},on:{sort:function(e){return t.sortUpdate(!0)}}},[t._l(t.columnList,(function(n){return e("li",{staticClass:"column-item"},[e("div",{class:["column-head",n.color?"custom-color":""],style:n.color?{backgroundColor:n.color}:{}},[e("div",{staticClass:"column-head-title"},[e("AutoTip",[t._v(t._s(n.name))]),t._v(" "),e("em",[t._v("("+t._s(t.panelTask(n.tasks).length)+")")])],1),t._v(" "),e("div",{staticClass:"column-head-icon"},[!0===t.columnLoad[n.id]?e("div",{staticClass:"loading"},[e("Loading")],1):e("EDropdown",{attrs:{trigger:"click",size:"small"},on:{command:function(e){return t.dropColumn(n,e)}}},[e("Icon",{attrs:{type:"ios-more"}}),t._v(" "),e("EDropdownMenu",{staticClass:"project-panel-more-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"title"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-create"}}),t._v(t._s(t.$L("修改"))+"\n ")],1)]),t._v(" "),e("EDropdownItem",{attrs:{command:"remove"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("删除"))+"\n ")],1)]),t._v(" "),t._l(t.$store.state.columnColorList,(function(o,i){return e("EDropdownItem",{key:i,attrs:{divided:0==i,command:o}},[e("div",{staticClass:"item"},[e("i",{staticClass:"taskfont",style:{color:o.color},domProps:{innerHTML:t._s(o.color==n.color?"":"")}}),t._v(t._s(t.$L(o.name))+"\n ")])])}))],2)],1),t._v(" "),e("Icon",{staticClass:"last",attrs:{type:"md-add"},on:{click:function(e){return t.addTopShow(n.id,!0)}}})],1)]),t._v(" "),e("div",{ref:"column_"+n.id,refInFor:!0,staticClass:"column-task scrollbar-overlay"},[t.columnTopShow[n.id]?e("div",{staticClass:"task-item additem"},[e("TaskAddSimple",{attrs:{"column-id":n.id,"project-id":t.projectId,"add-top":!0,"auto-active":""},on:{"on-close":function(e){return t.addTopShow(n.id,!1)},"on-priority":t.addTaskOpen}})],1):t._e(),t._v(" "),e("Draggable",{staticClass:"task-list",attrs:{list:n.tasks,animation:150,disabled:t.sortDisabled||t.windowSmall,draggable:".task-draggable",filter:".complete",group:"task"},on:{sort:t.sortUpdate,remove:t.sortUpdate}},[t._l(n.tasks,(function(n){return e("div",{class:["task-item task-draggable",n.complete_at?"complete":"",t.taskIsHidden(n)?"hidden":""],style:n.color?{backgroundColor:n.color}:{},on:{click:function(e){return t.openTask(n)}}},[e("div",{class:["task-head",n.desc?"has-desc":""]},[e("div",{staticClass:"task-title"},[n.flow_item_name?e("span",{class:n.flow_item_status,on:{click:function(e){return e.stopPropagation(),t.openMenu(e,n)}}},[t._v(t._s(n.flow_item_name))]):t._e(),t._v(" "),e("pre",[t._v(t._s(n.name))])]),t._v(" "),e("div",{staticClass:"task-menu",on:{click:function(t){t.stopPropagation()}}},[e("TaskMenu",{ref:"taskMenu_".concat(n.id),refInFor:!0,attrs:{task:n,icon:"ios-more"}})],1)]),t._v(" "),n.desc?e("div",{staticClass:"task-desc"},[e("pre",{domProps:{innerHTML:t._s(n.desc)}})]):t._e(),t._v(" "),n.task_tag.length>0?e("div",{staticClass:"task-tags"},t._l(n.task_tag,(function(n,o){return e("Tag",{key:o,attrs:{color:n.color}},[t._v(t._s(n.name))])})),1):t._e(),t._v(" "),e("div",{staticClass:"task-users"},[e("ul",[t._l(t.ownerUser(n.task_user),(function(t,o){return e("li",{key:o},[e("UserAvatar",{attrs:{userid:t.userid,size:"32",borderWitdh:2,borderColor:n.color}})],1)})),t._v(" "),0===t.ownerUser(n.task_user).length?e("li",{staticClass:"no-owner"},[e("Button",{attrs:{type:"primary",size:"small",ghost:""},on:{click:function(e){return e.stopPropagation(),t.openTask(n,!0)}}},[t._v(t._s(t.$L("领取任务")))])],1):t._e()],2),t._v(" "),n.file_num>0?e("div",{staticClass:"task-icon"},[t._v(t._s(n.file_num)),e("Icon",{attrs:{type:"ios-link-outline"}})],1):t._e(),t._v(" "),n.msg_num>0?e("div",{staticClass:"task-icon"},[t._v(t._s(n.msg_num)),e("Icon",{attrs:{type:"ios-chatbubbles-outline"}})],1):t._e()]),t._v(" "),e("div",{staticClass:"task-progress"},[n.sub_num>0?e("div",{staticClass:"task-sub-num"},[t._v(t._s(n.sub_complete)+"/"+t._s(n.sub_num))]):t._e(),t._v(" "),e("Progress",{attrs:{percent:n.percent,"stroke-width":6}}),t._v(" "),n.end_at?e("ETooltip",{class:["task-time",n.today?"today":"",n.overdue?"overdue":""],attrs:{disabled:t.windowSmall,"open-delay":600,content:n.end_at}},[n.complete_at?t._e():e("div",[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.expiresFormat(n.end_at)))])]):t._e()],1),t._v(" "),n.p_name?e("em",{staticClass:"priority-color",style:{backgroundColor:n.p_color}}):t._e()])})),t._v(" "),e("div",{staticClass:"task-item additem"},[e("TaskAddSimple",{attrs:{"column-id":n.id,"project-id":t.projectId},on:{"on-priority":t.addTaskOpen}})],1)],2)],1)])})),t._v(" "),e("li",{class:["add-column",t.addColumnShow?"show-input":""]},[e("div",{staticClass:"add-column-text",on:{click:t.addColumnOpen}},[e("Icon",{attrs:{type:"md-add"}}),t._v(t._s(t.$L("添加列表"))+"\n ")],1),t._v(" "),e("div",{staticClass:"add-column-input"},[e("Input",{ref:"addColumnName",attrs:{placeholder:t.$L("列表名称,回车创建"),clearable:""},on:{"on-blur":t.addColumnBlur,"on-enter":t.addColumnSubmit,"on-clear":function(e){t.addColumnShow=!1}},model:{value:t.addColumnName,callback:function(e){t.addColumnName=e},expression:"addColumnName"}})],1)])],2)],1):"table"===t.tabTypeActive?e("div",{staticClass:"project-table scrollbar-overlay"},[e("div",{staticClass:"project-table-head"},[e("Row",{staticClass:"task-row"},[e("Col",{attrs:{span:"12"}},[t._v("# "+t._s(t.$L("任务名称")))]),t._v(" "),e("Col",{attrs:{span:"3"}},[t._v(t._s(t.$L("列表")))]),t._v(" "),e("Col",{attrs:{span:"3"}},[e("div",{staticClass:"sort",on:{click:function(e){return t.onSort("level")}}},[t._v("\n "+t._s(t.$L("优先级"))+"\n "),e("div",{staticClass:"task-sort"},[e("Icon",{class:{on:"level"==t.sortField&&"asc"==t.sortType},attrs:{type:"md-arrow-dropup"}}),t._v(" "),e("Icon",{class:{on:"level"==t.sortField&&"desc"==t.sortType},attrs:{type:"md-arrow-dropdown"}})],1)])]),t._v(" "),e("Col",{attrs:{span:"3"}},[t._v(t._s(t.$L("负责人")))]),t._v(" "),e("Col",{attrs:{span:"3"}},[e("div",{staticClass:"sort",on:{click:function(e){return t.onSort("end_at")}}},[t._v("\n "+t._s(t.$L("到期时间"))+"\n "),e("div",{staticClass:"task-sort"},[e("Icon",{class:{on:"end_at"==t.sortField&&"asc"==t.sortType},attrs:{type:"md-arrow-dropup"}}),t._v(" "),e("Icon",{class:{on:"end_at"==t.sortField&&"desc"==t.sortType},attrs:{type:"md-arrow-dropdown"}})],1)])])],1)],1),t._v(" "),e("div",{class:["project-table-body",t.projectData.cacheParameter.showMy?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(e){return t.toggleParameter("showMy")}}},[t._v("")]),t._v(" "),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("我的任务")))]),t._v(" "),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.myList.length)+")")])]),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}})],1),t._v(" "),t.projectData.cacheParameter.showMy?e("TaskRow",{attrs:{list:t.transforTasks(t.myList),"open-key":"my","fast-add-task":""},on:{"on-priority":t.addTaskOpen}}):t._e()],1),t._v(" "),t.helpList.length?e("div",{class:["project-table-body",t.projectData.cacheParameter.showHelp?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(e){return t.toggleParameter("showHelp")}}},[t._v("")]),t._v(" "),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("协助的任务")))]),t._v(" "),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.helpList.length)+")")])]),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}})],1),t._v(" "),t.projectData.cacheParameter.showHelp?e("TaskRow",{attrs:{list:t.helpList,"open-key":"help"},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e(),t._v(" "),t.projectData.task_num>0?e("div",{class:["project-table-body",t.projectData.cacheParameter.showUndone?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(e){return t.toggleParameter("showUndone")}}},[t._v("")]),t._v(" "),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("未完成任务")))]),t._v(" "),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.unList.length)+")")])]),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}})],1),t._v(" "),t.projectData.cacheParameter.showUndone?e("TaskRow",{attrs:{list:t.unList,"open-key":"undone"},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e(),t._v(" "),t.projectData.task_num>0?e("div",{class:["project-table-body",t.projectData.cacheParameter.showCompleted?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(e){return t.toggleParameter("showCompleted")}}},[t._v("")]),t._v(" "),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("已完成任务")))]),t._v(" "),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.completedList.length)+")")])]),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}},[t._v(t._s(t.projectData.task_num>0&&t.projectData.cacheParameter.showCompleted?t.$L("完成时间"):""))])],1),t._v(" "),t.projectData.cacheParameter.showCompleted?e("TaskRow",{attrs:{list:t.completedList,"open-key":"completed",showCompleteAt:""},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e()]):"gantt"===t.tabTypeActive?e("div",{staticClass:"project-gantt"},[e("ProjectGantt",{attrs:{projectColumn:t.columnList,flowInfo:t.flowInfo}})],1):t._e(),t._v(" "),e("Modal",{attrs:{title:t.$L("项目设置"),"mask-closable":!1},model:{value:t.settingShow,callback:function(e){t.settingShow=e},expression:"settingShow"}},[e("Form",{attrs:{model:t.settingData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"name",label:t.$L("项目名称")}},[e("Input",{ref:"projectName",attrs:{type:"text",maxlength:32,placeholder:t.$L("必填")},model:{value:t.settingData.name,callback:function(e){t.$set(t.settingData,"name",e)},expression:"settingData.name"}})],1),t._v(" "),e("FormItem",{attrs:{prop:"desc",label:t.$L("项目介绍")}},[e("Input",{ref:"projectDesc",attrs:{type:"textarea",autosize:{minRows:3,maxRows:5},maxlength:255,placeholder:t.$L("选填")},model:{value:t.settingData.desc,callback:function(e){t.$set(t.settingData,"desc",e)},expression:"settingData.desc"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.settingShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.settingLoad>0},on:{click:t.onSetting}},[t._v(t._s(t.$L("修改")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("成员管理"),"mask-closable":!1},model:{value:t.userShow,callback:function(e){t.userShow=e},expression:"userShow"}},[e("Form",{attrs:{model:t.userData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("项目成员")}},[e("UserInput",{attrs:{uncancelable:t.userData.uncancelable,"multiple-max":100,placeholder:t.$L("选择项目成员")},model:{value:t.userData.userids,callback:function(e){t.$set(t.userData,"userids",e)},expression:"userData.userids"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.userShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),t.userWaitRemove.length>0?e("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom",transfer:""},on:{"on-ok":t.onUser}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("p",[e("strong",[t._v(t._s(t.$L("移除成员负责的任务将变成无负责人,")))])]),t._v(" "),e("p",[t._v(t._s(t.$L("注意此操作不可逆!")))]),t._v(" "),e("ul",{staticClass:"project-panel-wait-remove"},[e("li",[t._v(t._s(t.$L("即将移除"))+":")]),t._v(" "),t._l(t.userWaitRemove,(function(t){return e("li",{key:t},[e("UserAvatar",{attrs:{userid:t,size:20,showName:"",tooltipDisabled:""}})],1)}))],2)]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.userLoad>0}},[t._v(t._s(t.$L("保存")))])],1):e("Button",{attrs:{type:"primary",loading:t.userLoad>0},on:{click:t.onUser}},[t._v(t._s(t.$L("保存")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("邀请链接"),"mask-closable":!1},model:{value:t.inviteShow,callback:function(e){t.inviteShow=e},expression:"inviteShow"}},[e("Form",{attrs:{model:t.inviteData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("链接地址")}},[e("Input",{ref:"inviteInput",attrs:{type:"textarea",rows:3,readonly:""},on:{"on-focus":t.inviteFocus},model:{value:t.inviteData.url,callback:function(e){t.$set(t.inviteData,"url",e)},expression:"inviteData.url"}}),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("可通过此链接直接加入项目。")))])],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.inviteShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom",transfer:""},on:{"on-ok":function(e){return t.inviteGet(!0)}}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("p",[e("strong",[t._v(t._s(t.$L("注意:刷新将导致原来的邀请链接失效!")))])])]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.inviteLoad>0}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("移交项目"),"mask-closable":!1},model:{value:t.transferShow,callback:function(e){t.transferShow=e},expression:"transferShow"}},[e("Form",{attrs:{model:t.transferData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"owner_userid",label:t.$L("项目负责人")}},[e("UserInput",{attrs:{"multiple-max":1,"max-hidden-select":"",placeholder:t.$L("选择项目负责人")},model:{value:t.transferData.owner_userid,callback:function(e){t.$set(t.transferData,"owner_userid",e)},expression:"transferData.owner_userid"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.transferShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.transferLoad>0},on:{click:t.onTransfer}},[t._v(t._s(t.$L("移交")))])],1)],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",beforeClose:t.workflowBeforeClose,size:1280},model:{value:t.workflowShow,callback:function(e){t.workflowShow=e},expression:"workflowShow"}},[t.workflowShow?e("ProjectWorkflow",{ref:"workflow",attrs:{"project-id":t.projectId}}):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:768},model:{value:t.logShow,callback:function(e){t.logShow=e},expression:"logShow"}},[t.logShow?e("ProjectLog",{attrs:{"project-id":t.projectId}}):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:900},model:{value:t.archivedTaskShow,callback:function(e){t.archivedTaskShow=e},expression:"archivedTaskShow"}},[t.archivedTaskShow?e("TaskArchived",{attrs:{"project-id":t.projectId}}):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:900},model:{value:t.deletedTaskShow,callback:function(e){t.deletedTaskShow=e},expression:"deletedTaskShow"}},[t.deletedTaskShow?e("TaskDeleted",{attrs:{"project-id":t.projectId}}):t._e()],1)],1)}),[],!1,null,null,null).exports;function Y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function Z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Y(Object(n),!0).forEach((function(e){G(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function G(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const X={name:"ProjectDialog",components:{DialogWrapper:n(17451).Z},data:function(){return{loadIng:!1,memberShowAll:!1}},computed:Z(Z({},(0,o.Se)(["projectData"])),{},{dialogShow:function(){return this.windowLarge&&this.projectData.dialog_id&&this.projectData.cacheParameter.chat}}),methods:{onClose:function(){this.$store.dispatch("toggleProjectParameter","chat")}}};const Q=(0,h.Z)(X,(function(){var t=this,e=t._self._c;return t.dialogShow?e("DialogWrapper",{staticClass:"project-dialog",attrs:{"dialog-id":t.projectData.dialog_id}},[e("template",{slot:"head"},[e("div",{staticClass:"dialog-user"},[e("div",{staticClass:"member-head"},[e("div",{staticClass:"member-title"},[t._v(t._s(t.$L("项目成员"))),e("span",{on:{click:function(e){t.memberShowAll=!t.memberShowAll}}},[t._v("("+t._s(t.projectData.project_user.length)+")")])]),t._v(" "),e("div",{staticClass:"member-close",on:{click:t.onClose}},[e("Icon",{attrs:{type:"ios-close"}})],1)]),t._v(" "),e("ul",{class:["member-list",t.memberShowAll?"member-all":""]},t._l(t.projectData.project_user,(function(t){return e("li",[e("UserAvatar",{attrs:{userid:t.userid,size:36}})],1)})),0)]),t._v(" "),e("div",{staticClass:"nav-wrapper"},[e("div",{staticClass:"dialog-title"},[e("h2",[t._v(t._s(t.$L("群聊")))])])])])],2):t._e()}),[],!1,null,null,null).exports;function J(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function tt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J(Object(n),!0).forEach((function(e){et(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function et(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const nt={name:"ProjectList",directives:{longpress:n(8251).Z},data:function(){return{projectKeyValue:"",projectKeyLoading:0,operateStyles:{},operateVisible:!1,operateItem:{}}},computed:tt(tt({},(0,o.rn)(["cacheProjects","loadProjects"])),{},{projectLists:function(){var t=this.projectKeyValue,e=this.cacheProjects,n=$A.cloneJSON(e).sort((function(t,e){return t.top_at||e.top_at?$A.Date(e.top_at)-$A.Date(t.top_at):e.id-t.id}));return t?n.filter((function(e){return $A.strExists("".concat(e.name," ").concat(e.desc),t)})):n}}),watch:{projectKeyValue:function(t){var e=this;""!=t&&(this.projectKeyLoading++,setTimeout((function(){e.projectKeyValue==t&&e.searchProject(),e.projectKeyLoading--}),600))}},methods:{searchProject:function(){var t=this;this.projectKeyLoading++,this.$store.dispatch("getProjects",{keys:{name:this.projectKeyValue},hideLoad:!0}).finally((function(e){t.projectKeyLoading--}))},toggleRoute:function(t,e){this.operateVisible||this.goForward({name:"manage-"+t,params:e||{}})},modalPercent:function(t){if(!this.operateVisible){var e="<p><strong>".concat(this.$L("总进度"),"</strong></p>");e+="<p>".concat(this.$L("总数量"),": ").concat(t.task_num,"</p>"),e+="<p>".concat(this.$L("已完成"),": ").concat(t.task_complete,"</p>"),e+='<p style="margin-top:12px"><strong>'.concat(this.$L("我的任务"),"</strong></p>"),e+="<p>".concat(this.$L("总数量"),": ").concat(t.task_my_num,"</p>"),e+="<p>".concat(this.$L("已完成"),": ").concat(t.task_my_complete,"</p>"),$A.modalInfo({language:!1,title:"".concat(t.name," ").concat(this.$L("项目进度")),content:e})}},handleLongpress:function(t,e){var n=this,o=$A.getAttr(e,"data-id"),i=this.projectLists.find((function(t){return t.id==o}));i&&(this.operateVisible=!1,this.operateItem=$A.isJson(i)?i:{},this.$nextTick((function(){var o=e.getBoundingClientRect(),i=n.$el.getBoundingClientRect();n.operateStyles={left:"".concat(t.clientX-i.left,"px"),top:"".concat(o.top+n.windowScrollY,"px"),height:o.height+"px"},n.operateVisible=!0})))},handleTopClick:function(){var t=this;this.$store.dispatch("call",{url:"project/top",data:{project_id:this.operateItem.id}}).then((function(e){var n=e.data;t.$store.dispatch("saveProject",n)})).catch((function(t){var e=t.msg;$A.modalError(e)}))}}};function ot(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function it(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ot(Object(n),!0).forEach((function(e){rt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ot(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function rt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const at={components:{ProjectList:(0,h.Z)(nt,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"project-list"},[e("PageTitle",{attrs:{title:t.$L("项目")}}),t._v(" "),e("div",{staticClass:"list-search"},[e("div",{staticClass:"search-wrapper"},[e("Input",{attrs:{placeholder:t.$L(t.loadProjects?"更新中...":"搜索项目"),clearable:""},model:{value:t.projectKeyValue,callback:function(e){t.projectKeyValue=e},expression:"projectKeyValue"}},[e("div",{staticClass:"search-pre",attrs:{slot:"prefix"},slot:"prefix"},[t.loadProjects?e("Loading"):e("Icon",{attrs:{type:"ios-search"}})],1)])],1)]),t._v(" "),e("ul",{on:{scroll:function(e){t.operateVisible=!1}}},[0===t.projectLists.length?[t.projectKeyLoading>0?e("li",{staticClass:"loading"},[e("Loading")],1):e("li",{staticClass:"nothing"},[t._v("\n "+t._s(t.$L(t.projectKeyValue?'没有任何与"'.concat(t.projectKeyValue,'"相关的项目'):"没有任何项目"))+"\n ")])]:t._e(),t._v(" "),t._l(t.projectLists,(function(n,o){return e("li",{directives:[{name:"longpress",rawName:"v-longpress",value:t.handleLongpress,expression:"handleLongpress"}],key:o,class:{operate:n.id==t.operateItem.id&&t.operateVisible},attrs:{"data-id":n.id},on:{click:function(e){return t.toggleRoute("project",{projectId:n.id})}}},[e("div",{staticClass:"project-item"},[e("div",{staticClass:"item-left"},[e("div",{staticClass:"project-h1"},[e("div",{staticClass:"project-name"},[t._v(t._s(n.name))]),t._v(" "),n.top_at?e("div",{staticClass:"icon-top"}):t._e(),t._v(" "),n.task_my_num-n.task_my_complete>0?e("div",{staticClass:"num"},[t._v(t._s(n.task_my_num-n.task_my_complete))]):t._e()]),t._v(" "),e("div",{staticClass:"project-h2"},[t._v("\n "+t._s(n.desc)+"\n ")])]),t._v(" "),n.task_num>0?e("div",{staticClass:"item-right",on:{click:function(e){return e.stopPropagation(),t.modalPercent(n)}}},[e("iCircle",{attrs:{type:"circle","trail-color":"rgba(132, 197, 106, 0.2)","trail-width":7,"stroke-color":100===n.task_percent?"rgba(132, 197, 106, 0)":"#84C56A","stroke-width":7,percent:n.task_percent,size:44}},[100===n.task_percent?e("Icon",{attrs:{type:"ios-checkmark"}}):e("span",{staticClass:"percent-text"},[t._v(t._s(n.task_percent)+"%")])],1)],1):t._e()])])}))],2),t._v(" "),e("div",{staticClass:"operate-position",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",placement:t.windowLarge?"bottom":"top",visible:t.operateVisible,transfer:""},on:{"on-clickoutside":function(e){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),t._v(" "),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{nativeOn:{click:function(e){return t.handleTopClick.apply(null,arguments)}}},[t._v("\n "+t._s(t.$L(t.operateItem.top_at?"取消置顶":"置顶该项目"))+"\n ")])],1)],1)],1)],1)}),[],!1,null,null,null).exports,ProjectDialog:Q,ProjectPanel:K},deactivated:function(){this.$store.dispatch("forgetTaskCompleteTemp",!0)},computed:it(it({},(0,o.rn)(["cacheProjects","wsOpenNum"])),{},{projectId:function(){var t=this.$route.params.projectId;return parseInt(/^\d+$/.test(t)?t:0)}}),watch:{projectId:{handler:function(){this.getProjectData()},immediate:!0},wsOpenNum:function(t){var e=this;t<=1||(this.wsOpenTimeout&&clearTimeout(this.wsOpenTimeout),this.wsOpenTimeout=setTimeout((function(){"manage-project"==e.$route.name&&e.getProjectData()}),5e3))}},methods:{getProjectData:function(){var t=this;if(!(this.projectId<=0)){var e=this.projectId;this.$nextTick((function(){t.$store.state.projectId=e,t.$store.dispatch("getProjectOne",e).then((function(){t.$store.dispatch("getColumns",e).catch((function(){})),t.$store.dispatch("getTaskForProject",e).catch((function(){}))})).catch((function(n){var o=n.msg;e===t.projectId&&$A.modalWarning({content:o,onOk:function(){var e=t.cacheProjects.find((function(t){return t.id}));e?$A.goForward({name:"manage-project",params:{projectId:e.id}}):$A.goForward({name:"manage-dashboard"})}})})),t.$store.dispatch("forgetTaskCompleteTemp",!0)}))}}}},st=at;const lt=(0,h.Z)(st,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"page-project"},[t.projectId>0?[e("ProjectPanel"),t._v(" "),e("ProjectDialog")]:t._e(),t._v(" "),t.windowSmall?e("ProjectList",{directives:[{name:"show",rawName:"v-show",value:0===t.projectId,expression:"projectId === 0"}]}):t._e()],2)}),[],!1,null,null,null).exports},85662:function(t,e,n){t.exports=function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function o(t,e,o){return e&&n(t.prototype,e),o&&n(t,o),t}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t){return l(t)||c(t)||u(t)||f()}function l(t){if(Array.isArray(t))return d(t)}function c(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function u(t,e){if(t){if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function f(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var h={FRONT:"FRONT",BEHIND:"BEHIND"},p={INIT:"INIT",FIXED:"FIXED",DYNAMIC:"DYNAMIC"},m=0,v=function(){function t(n,o){e(this,t),this.init(n,o)}return o(t,[{key:"init",value:function(t,e){this.param=t,this.callUpdate=e,this.sizes=new Map,this.firstRangeTotalSize=0,this.firstRangeAverageSize=0,this.lastCalcIndex=0,this.fixedSizeValue=0,this.calcType=p.INIT,this.offset=0,this.direction="",this.range=Object.create(null),t&&this.checkRange(0,t.keeps-1)}},{key:"destroy",value:function(){this.init(null,null)}},{key:"getRange",value:function(){var t=Object.create(null);return t.start=this.range.start,t.end=this.range.end,t.padFront=this.range.padFront,t.padBehind=this.range.padBehind,t}},{key:"isBehind",value:function(){return this.direction===h.BEHIND}},{key:"isFront",value:function(){return this.direction===h.FRONT}},{key:"getOffset",value:function(t){return(t<1?0:this.getIndexOffset(t))+this.param.slotHeaderSize}},{key:"updateParam",value:function(t,e){var n=this;this.param&&t in this.param&&("uniqueIds"===t&&this.sizes.forEach((function(t,o){e.includes(o)||n.sizes.delete(o)})),this.param[t]=e)}},{key:"saveSize",value:function(t,e){this.sizes.set(t,e),this.calcType===p.INIT?(this.fixedSizeValue=e,this.calcType=p.FIXED):this.calcType===p.FIXED&&this.fixedSizeValue!==e&&(this.calcType=p.DYNAMIC,delete this.fixedSizeValue),this.calcType!==p.FIXED&&void 0!==this.firstRangeTotalSize&&(this.sizes.size<Math.min(this.param.keeps,this.param.uniqueIds.length)?(this.firstRangeTotalSize=s(this.sizes.values()).reduce((function(t,e){return t+e}),0),this.firstRangeAverageSize=Math.round(this.firstRangeTotalSize/this.sizes.size)):delete this.firstRangeTotalSize)}},{key:"handleDataSourcesChange",value:function(){var t=this.range.start;this.isFront()?t-=m:this.isBehind()&&(t+=m),t=Math.max(t,0),this.updateRange(this.range.start,this.getEndByStart(t))}},{key:"handleSlotSizeChange",value:function(){this.handleDataSourcesChange()}},{key:"handleScroll",value:function(t){this.direction=t<this.offset?h.FRONT:h.BEHIND,this.offset=t,this.param&&(this.direction===h.FRONT?this.handleFront():this.direction===h.BEHIND&&this.handleBehind())}},{key:"handleFront",value:function(){var t=this.getScrollOvers();if(!(t>this.range.start)){var e=Math.max(t-this.param.buffer,0);this.checkRange(e,this.getEndByStart(e))}}},{key:"handleBehind",value:function(){var t=this.getScrollOvers();t<this.range.start+this.param.buffer||this.checkRange(t,this.getEndByStart(t))}},{key:"getScrollOvers",value:function(){var t=this.offset-this.param.slotHeaderSize;if(t<=0)return 0;if(this.isFixedType())return Math.floor(t/this.fixedSizeValue);for(var e=0,n=0,o=0,i=this.param.uniqueIds.length;e<=i;){if(n=e+Math.floor((i-e)/2),(o=this.getIndexOffset(n))===t)return n;o<t?e=n+1:o>t&&(i=n-1)}return e>0?--e:0}},{key:"getIndexOffset",value:function(t){if(!t)return 0;for(var e=0,n=0,o=0;o<t;o++)e+="number"==typeof(n=this.sizes.get(this.param.uniqueIds[o]))?n:this.getEstimateSize();return this.lastCalcIndex=Math.max(this.lastCalcIndex,t-1),this.lastCalcIndex=Math.min(this.lastCalcIndex,this.getLastIndex()),e}},{key:"isFixedType",value:function(){return this.calcType===p.FIXED}},{key:"getLastIndex",value:function(){return this.param.uniqueIds.length-1}},{key:"checkRange",value:function(t,e){var n=this.param.keeps;this.param.uniqueIds.length<=n?(t=0,e=this.getLastIndex()):e-t<n-1&&(t=e-n+1),this.range.start!==t&&this.updateRange(t,e)}},{key:"updateRange",value:function(t,e){this.range.start=t,this.range.end=e,this.range.padFront=this.getPadFront(),this.range.padBehind=this.getPadBehind(),this.callUpdate(this.getRange())}},{key:"getEndByStart",value:function(t){var e=t+this.param.keeps-1;return Math.min(e,this.getLastIndex())}},{key:"getPadFront",value:function(){return this.isFixedType()?this.fixedSizeValue*this.range.start:this.getIndexOffset(this.range.start)}},{key:"getPadBehind",value:function(){var t=this.range.end,e=this.getLastIndex();return this.isFixedType()?(e-t)*this.fixedSizeValue:this.lastCalcIndex===e?this.getIndexOffset(e)-this.getIndexOffset(t):(e-t)*this.getEstimateSize()}},{key:"getEstimateSize",value:function(){return this.isFixedType()?this.fixedSizeValue:this.param.estimateSize||this.param.estimateSize}}]),t}(),g={dataKey:{type:[String,Function],required:!0},dataSources:{type:Array,required:!0},dataComponent:{type:[Object,Function],required:!0},keeps:{type:Number,default:30},extraProps:{type:Object},estimateSize:{type:Number,default:50},direction:{type:String,default:"vertical"},start:{type:Number,default:0},offset:{type:Number,default:0},topThreshold:{type:Number,default:0},bottomThreshold:{type:Number,default:0},pageMode:{type:Boolean,default:!1},rootTag:{type:String,default:"div"},wrapTag:{type:String,default:"div"},wrapClass:{type:String,default:""},wrapStyle:{type:Object},itemTag:{type:String,default:"div"},itemClass:{type:String,default:""},itemClassAdd:{type:Function},itemStyle:{type:Object},headerTag:{type:String,default:"div"},headerClass:{type:String,default:""},headerStyle:{type:Object},footerTag:{type:String,default:"div"},footerClass:{type:String,default:""},footerStyle:{type:Object},itemScopedSlots:{type:Object},disabled:{type:Boolean,default:!1}},y={index:{type:Number},event:{type:String},tag:{type:String},horizontal:{type:Boolean},source:{type:Object},component:{type:[Object,Function]},slotComponent:{type:Function},uniqueKey:{type:[String,Number]},extraProps:{type:Object},scopedSlots:{type:Object}},b={event:{type:String},uniqueKey:{type:String},tag:{type:String},horizontal:{type:Boolean}},_={created:function(){this.shapeKey=this.horizontal?"offsetWidth":"offsetHeight"},mounted:function(){var t=this;"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(){t.dispatchSizeChange()})),this.resizeObserver.observe(this.$el))},updated:function(){this.dispatchSizeChange()},beforeDestroy:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)},methods:{getCurrentSize:function(){return this.$el?this.$el[this.shapeKey]:0},dispatchSizeChange:function(){this.$parent.$emit(this.event,this.uniqueKey,this.getCurrentSize(),this.hasInitial)}}},w=t.component("virtual-list-item",{mixins:[_],props:y,render:function(t){var e=this.tag,n=this.component,o=this.extraProps,i=void 0===o?{}:o,r=this.index,s=this.source,l=this.scopedSlots,c=void 0===l?{}:l,u=this.uniqueKey,d=this.slotComponent,f=a({},i,{source:s,index:r});return t(e,{key:u,attrs:{role:"listitem"}},[d?t("div",d({item:s,index:r,scope:f})):t(n,{props:f,scopedSlots:c})])}}),k=t.component("virtual-list-slot",{mixins:[_],props:b,render:function(t){var e=this.tag,n=this.uniqueKey;return t(e,{key:n,attrs:{role:n}},this.$slots.default)}}),O={ITEM:"item_resize",SLOT:"slot_resize"},x={HEADER:"thead",FOOTER:"tfoot"},C=t.component("virtual-list",{props:g,data:function(){return{range:null,toBottomTime:null}},watch:{"dataSources.length":function(){this.virtual.updateParam("uniqueIds",this.getUniqueIdFromDataSources()),this.virtual.handleDataSourcesChange()},keeps:function(t){this.virtual.updateParam("keeps",t),this.virtual.handleSlotSizeChange()},start:function(t){this.scrollToIndex(t)},offset:function(t){this.scrollToOffset(t)}},created:function(){this.isHorizontal="horizontal"===this.direction,this.directionKey=this.isHorizontal?"scrollLeft":"scrollTop",this.installVirtual(),this.$on(O.ITEM,this.onItemResized),(this.$slots.header||this.$slots.footer)&&this.$on(O.SLOT,this.onSlotResized)},activated:function(){this.scrollToOffset(this.virtual.offset),this.pageMode&&document.addEventListener("scroll",this.onScroll,{passive:!1})},deactivated:function(){this.pageMode&&document.removeEventListener("scroll",this.onScroll)},mounted:function(){this.start?this.scrollToIndex(this.start):this.offset&&this.scrollToOffset(this.offset),this.pageMode&&(this.updatePageModeFront(),document.addEventListener("scroll",this.onScroll,{passive:!1}))},beforeDestroy:function(){this.virtual.destroy(),this.pageMode&&document.removeEventListener("scroll",this.onScroll)},methods:{getSize:function(t){return this.virtual.sizes.get(t)},getSizes:function(){return this.virtual.sizes.size},getOffset:function(){if(this.pageMode)return document.documentElement[this.directionKey]||document.body[this.directionKey];var t=this.$refs.root;return t?Math.ceil(t[this.directionKey]):0},getClientSize:function(){var t=this.isHorizontal?"clientWidth":"clientHeight";if(this.pageMode)return document.documentElement[t]||document.body[t];var e=this.$refs.root;return e?Math.ceil(e[t]):0},getScrollSize:function(){var t=this.isHorizontal?"scrollWidth":"scrollHeight";if(this.pageMode)return document.documentElement[t]||document.body[t];var e=this.$refs.root;return e?Math.ceil(e[t]):0},scrollToOffset:function(t){if(this.pageMode)document.body[this.directionKey]=t,document.documentElement[this.directionKey]=t;else{var e=this.$refs.root;e&&(e[this.directionKey]=t)}},scrollToIndex:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>=this.dataSources.length-1)this.scrollToBottom();else{var n=this.virtual.getOffset(t);0!==e&&(n=Math.max(0,n+e)),this.scrollToOffset(n)}},scrollToBottom:function(){var t=this,e=this.$refs.shepherd;if(e){var n=e[this.isHorizontal?"offsetLeft":"offsetTop"];this.scrollToOffset(n),this.toBottomTime&&(clearTimeout(this.toBottomTime),this.toBottomTime=null),this.toBottomTime=setTimeout((function(){t.getOffset()+t.getClientSize()+1<t.getScrollSize()&&t.scrollToBottom()}),3)}},stopToBottom:function(){this.toBottomTime&&(clearTimeout(this.toBottomTime),this.toBottomTime=null)},scrollStop:function(){this.stopToBottom(),this.scrollToOffset(this.getOffset())},scrollInfo:function(){var t=this.getClientSize(),e=this.getOffset(),n=this.getScrollSize();return{offset:e,scale:e/(n-t),tail:n-t-e}},updatePageModeFront:function(){var t=this.$refs.root;if(t){var e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView,o=this.isHorizontal?e.left+n.pageXOffset:e.top+n.pageYOffset;this.virtual.updateParam("slotHeaderSize",o)}},reset:function(){this.virtual.destroy(),this.scrollToOffset(0),this.installVirtual()},installVirtual:function(){this.virtual=new v({slotHeaderSize:0,slotFooterSize:0,keeps:this.keeps,estimateSize:this.estimateSize,buffer:Math.round(this.keeps/3),uniqueIds:this.getUniqueIdFromDataSources()},this.onRangeChanged),this.range=this.virtual.getRange(),this.$emit("range",this.range)},getUniqueIdFromDataSources:function(){var t=this.dataKey;return this.dataSources.map((function(e){return"function"==typeof t?t(e):e[t]}))},onItemResized:function(t,e){this.virtual.saveSize(t,e),this.$emit("resized",t,e)},onSlotResized:function(t,e,n){t===x.HEADER?this.virtual.updateParam("slotHeaderSize",e):t===x.FOOTER&&this.virtual.updateParam("slotFooterSize",e),n&&this.virtual.handleSlotSizeChange()},onRangeChanged:function(t){this.range=t,this.$emit("range",this.range)},onScroll:function(t){if(!this.disabled){var e=this.getOffset(),n=this.getClientSize(),o=this.getScrollSize();e<0||e+n>o+1||!o||(this.virtual.handleScroll(e),this.emitEvent(e,n,o,t))}},emitEvent:function(t,e,n,o){this.$emit("scroll",o,this.virtual.getRange()),this.virtual.isFront()&&this.dataSources.length&&t-this.topThreshold<=0?this.$emit("totop"):this.virtual.isBehind()&&t+e+this.bottomThreshold>=n&&this.$emit("tobottom")},getRenderSlots:function(t){for(var e=[],n=this.range,o=n.start,i=n.end,r=this.dataSources,a=this.dataKey,s=this.itemClass,l=this.itemTag,c=this.itemStyle,u=this.isHorizontal,d=this.extraProps,f=this.dataComponent,h=this.itemScopedSlots,p=this.$scopedSlots&&this.$scopedSlots.item,m=o;m<=i;m++){var v=r[m];if(v){var g="function"==typeof a?a(v):v[a];"string"==typeof g||"number"==typeof g?e.push(t(w,{props:{index:m,tag:l,event:O.ITEM,horizontal:u,uniqueKey:g,source:v,extraProps:d,component:f,slotComponent:p,scopedSlots:h},style:c,class:"".concat(s).concat(this.itemClassAdd?" "+this.itemClassAdd(m):"")})):console.warn("Cannot get the data-key '".concat(a,"' from data-sources."))}else console.warn("Cannot get the index '".concat(m,"' from data-sources."))}return e}},render:function(t){var e=this.$slots,n=e.header,o=e.footer,i=this.range,r=i.padFront,a=i.padBehind,s=this.isHorizontal,l=this.pageMode,c=this.rootTag,u=this.wrapTag,d=this.wrapClass,f=this.wrapStyle,h=this.headerTag,p=this.headerClass,m=this.headerStyle,v=this.footerTag,g=this.footerClass,y=this.footerStyle,b=this.disabled,_={padding:s?"0px ".concat(a,"px 0px ").concat(r,"px"):"".concat(r,"px 0px ").concat(a,"px")},w=f?Object.assign({},f,_):_;return t(c,{ref:"root",style:b?{overflow:"hidden"}:null,on:{"&scroll":!l&&this.onScroll}},[n?t(k,{class:p,style:m,props:{tag:h,event:O.SLOT,uniqueKey:x.HEADER}},n):null,t(u,{class:d,attrs:{role:"group"},style:w},this.getRenderSlots(t)),o?t(k,{class:g,style:y,props:{tag:v,event:O.SLOT,uniqueKey:x.FOOTER}},o):null,t("div",{ref:"shepherd",style:{width:s?"0px":"100%",height:s?"100%":"0px"}})])}});return C}(n(70538))},9980:function(t,e,n){var o;"undefined"!=typeof self&&self,o=function(t){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"01f9":function(t,e,n){"use strict";var o=n("2d00"),i=n("5ca1"),r=n("2aba"),a=n("32e9"),s=n("84f2"),l=n("41a0"),c=n("7f20"),u=n("38fd"),d=n("2b4c")("iterator"),f=!([].keys&&"next"in[].keys()),h="keys",p="values",m=function(){return this};t.exports=function(t,e,n,v,g,y,b){l(n,e,v);var _,w,k,O=function(t){if(!f&&t in j)return j[t];switch(t){case h:case p:return function(){return new n(this,t)}}return function(){return new n(this,t)}},x=e+" Iterator",C=g==p,S=!1,j=t.prototype,T=j[d]||j["@@iterator"]||g&&j[g],E=T||O(g),D=g?C?O("entries"):E:void 0,A="Array"==e&&j.entries||T;if(A&&(k=u(A.call(new t)))!==Object.prototype&&k.next&&(c(k,x,!0),o||"function"==typeof k[d]||a(k,d,m)),C&&T&&T.name!==p&&(S=!0,E=function(){return T.call(this)}),o&&!b||!f&&!S&&j[d]||a(j,d,E),s[e]=E,s[x]=m,g)if(_={values:C?E:O(p),keys:y?E:O(h),entries:D},b)for(w in _)w in j||r(j,w,_[w]);else i(i.P+i.F*(f||S),e,_);return _}},"02f4":function(t,e,n){var o=n("4588"),i=n("be13");t.exports=function(t){return function(e,n){var r,a,s=String(i(e)),l=o(n),c=s.length;return l<0||l>=c?t?"":void 0:(r=s.charCodeAt(l))<55296||r>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?t?s.charAt(l):r:t?s.slice(l,l+2):a-56320+(r-55296<<10)+65536}}},"0390":function(t,e,n){"use strict";var o=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?o(t,e).length:1)}},"0bfb":function(t,e,n){"use strict";var o=n("cb7c");t.exports=function(){var t=o(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,n){var o=n("ce10"),i=n("e11e");t.exports=Object.keys||function(t){return o(t,i)}},1495:function(t,e,n){var o=n("86cc"),i=n("cb7c"),r=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){i(t);for(var n,a=r(e),s=a.length,l=0;s>l;)o.f(t,n=a[l++],e[n]);return t}},"214f":function(t,e,n){"use strict";n("b0c5");var o=n("2aba"),i=n("32e9"),r=n("79e5"),a=n("be13"),s=n("2b4c"),l=n("520a"),c=s("species"),u=!r((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),d=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var f=s(t),h=!r((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),p=h?!r((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[f](""),!e})):void 0;if(!h||!p||"replace"===t&&!u||"split"===t&&!d){var m=/./[f],v=n(a,f,""[t],(function(t,e,n,o,i){return e.exec===l?h&&!i?{done:!0,value:m.call(e,n,o)}:{done:!0,value:t.call(n,e,o)}:{done:!1}})),g=v[0],y=v[1];o(String.prototype,t,g),i(RegExp.prototype,f,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)})}}},"230e":function(t,e,n){var o=n("d3f4"),i=n("7726").document,r=o(i)&&o(i.createElement);t.exports=function(t){return r?i.createElement(t):{}}},"23c6":function(t,e,n){var o=n("2d95"),i=n("2b4c")("toStringTag"),r="Arguments"==o(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:r?o(e):"Object"==(a=o(e))&&"function"==typeof e.callee?"Arguments":a}},2621:function(t,e){e.f=Object.getOwnPropertySymbols},"2aba":function(t,e,n){var o=n("7726"),i=n("32e9"),r=n("69a8"),a=n("ca5a")("src"),s=n("fa5b"),l="toString",c=(""+s).split(l);n("8378").inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var l="function"==typeof n;l&&(r(n,"name")||i(n,"name",e)),t[e]!==n&&(l&&(r(n,a)||i(n,a,t[e]?""+t[e]:c.join(String(e)))),t===o?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,l,(function(){return"function"==typeof this&&this[a]||s.call(this)}))},"2aeb":function(t,e,n){var o=n("cb7c"),i=n("1495"),r=n("e11e"),a=n("613b")("IE_PROTO"),s=function(){},l=function(){var t,e=n("230e")("iframe"),o=r.length;for(e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),l=t.F;o--;)delete l.prototype[r[o]];return l()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=o(t),n=new s,s.prototype=null,n[a]=t):n=l(),void 0===e?n:i(n,e)}},"2b4c":function(t,e,n){var o=n("5537")("wks"),i=n("ca5a"),r=n("7726").Symbol,a="function"==typeof r;(t.exports=function(t){return o[t]||(o[t]=a&&r[t]||(a?r:i)("Symbol."+t))}).store=o},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"2fdb":function(t,e,n){"use strict";var o=n("5ca1"),i=n("d2c8"),r="includes";o(o.P+o.F*n("5147")(r),"String",{includes:function(t){return!!~i(this,t,r).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},"32e9":function(t,e,n){var o=n("86cc"),i=n("4630");t.exports=n("9e1e")?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},"38fd":function(t,e,n){var o=n("69a8"),i=n("4bf8"),r=n("613b")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),o(t,r)?t[r]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},"41a0":function(t,e,n){"use strict";var o=n("2aeb"),i=n("4630"),r=n("7f20"),a={};n("32e9")(a,n("2b4c")("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=o(a,{next:i(1,n)}),r(t,e+" Iterator")}},"456d":function(t,e,n){var o=n("4bf8"),i=n("0d58");n("5eda")("keys",(function(){return function(t){return i(o(t))}}))},4588:function(t,e){var n=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:n)(t)}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"4bf8":function(t,e,n){var o=n("be13");t.exports=function(t){return Object(o(t))}},5147:function(t,e,n){var o=n("2b4c")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[o]=!1,!"/./"[t](e)}catch(t){}}return!0}},"520a":function(t,e,n){"use strict";var o,i,r=n("0bfb"),a=RegExp.prototype.exec,s=String.prototype.replace,l=a,c=(o=/a/,i=/b*/g,a.call(o,"a"),a.call(i,"a"),0!==o.lastIndex||0!==i.lastIndex),u=void 0!==/()??/.exec("")[1];(c||u)&&(l=function(t){var e,n,o,i,l=this;return u&&(n=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),c&&(e=l.lastIndex),o=a.call(l,t),c&&o&&(l.lastIndex=l.global?o.index+o[0].length:e),u&&o&&o.length>1&&s.call(o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o}),t.exports=l},"52a7":function(t,e){e.f={}.propertyIsEnumerable},5537:function(t,e,n){var o=n("8378"),i=n("7726"),r="__core-js_shared__",a=i[r]||(i[r]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:o.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(t,e,n){var o=n("7726"),i=n("8378"),r=n("32e9"),a=n("2aba"),s=n("9b43"),l=function(t,e,n){var c,u,d,f,h=t&l.F,p=t&l.G,m=t&l.S,v=t&l.P,g=t&l.B,y=p?o:m?o[e]||(o[e]={}):(o[e]||{}).prototype,b=p?i:i[e]||(i[e]={}),_=b.prototype||(b.prototype={});for(c in p&&(n=e),n)d=((u=!h&&y&&void 0!==y[c])?y:n)[c],f=g&&u?s(d,o):v&&"function"==typeof d?s(Function.call,d):d,y&&a(y,c,d,t&l.U),b[c]!=d&&r(b,c,f),v&&_[c]!=d&&(_[c]=d)};o.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},"5eda":function(t,e,n){var o=n("5ca1"),i=n("8378"),r=n("79e5");t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),o(o.S+o.F*r((function(){n(1)})),"Object",a)}},"5f1b":function(t,e,n){"use strict";var o=n("23c6"),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw new TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==o(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},"613b":function(t,e,n){var o=n("5537")("keys"),i=n("ca5a");t.exports=function(t){return o[t]||(o[t]=i(t))}},"626a":function(t,e,n){var o=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},6762:function(t,e,n){"use strict";var o=n("5ca1"),i=n("c366")(!0);o(o.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(t,e,n){var o=n("626a"),i=n("be13");t.exports=function(t){return o(i(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var o=n("d3f4");t.exports=function(t,e){if(!o(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!o(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!o(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!o(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},7333:function(t,e,n){"use strict";var o=n("0d58"),i=n("2621"),r=n("52a7"),a=n("4bf8"),s=n("626a"),l=Object.assign;t.exports=!l||n("79e5")((function(){var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!=l({},t)[n]||Object.keys(l({},e)).join("")!=o}))?function(t,e){for(var n=a(t),l=arguments.length,c=1,u=i.f,d=r.f;l>c;)for(var f,h=s(arguments[c++]),p=u?o(h).concat(u(h)):o(h),m=p.length,v=0;m>v;)d.call(h,f=p[v++])&&(n[f]=h[f]);return n}:l},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(t,e,n){var o=n("4588"),i=Math.max,r=Math.min;t.exports=function(t,e){return(t=o(t))<0?i(t+e,0):r(t,e)}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},"7f20":function(t,e,n){var o=n("86cc").f,i=n("69a8"),r=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,r)&&o(t,r,{configurable:!0,value:e})}},8378:function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"84f2":function(t,e){t.exports={}},"86cc":function(t,e,n){var o=n("cb7c"),i=n("c69a"),r=n("6a99"),a=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(o(t),e=r(e,!0),o(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"9b43":function(t,e,n){var o=n("d8e8");t.exports=function(t,e,n){if(o(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,o){return t.call(e,n,o)};case 3:return function(n,o,i){return t.call(e,n,o,i)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var o=n("2b4c")("unscopables"),i=Array.prototype;null==i[o]&&n("32e9")(i,o,{}),t.exports=function(t){i[o][t]=!0}},"9def":function(t,e,n){var o=n("4588"),i=Math.min;t.exports=function(t){return t>0?i(o(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a352:function(e,n){e.exports=t},a481:function(t,e,n){"use strict";var o=n("cb7c"),i=n("4bf8"),r=n("9def"),a=n("4588"),s=n("0390"),l=n("5f1b"),c=Math.max,u=Math.min,d=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g;n("214f")("replace",2,(function(t,e,n,p){return[function(o,i){var r=t(this),a=null==o?void 0:o[e];return void 0!==a?a.call(o,r,i):n.call(String(r),o,i)},function(t,e){var i=p(n,t,this,e);if(i.done)return i.value;var d=o(t),f=String(this),h="function"==typeof e;h||(e=String(e));var v=d.global;if(v){var g=d.unicode;d.lastIndex=0}for(var y=[];;){var b=l(d,f);if(null===b)break;if(y.push(b),!v)break;""===String(b[0])&&(d.lastIndex=s(f,r(d.lastIndex),g))}for(var _,w="",k=0,O=0;O<y.length;O++){b=y[O];for(var x=String(b[0]),C=c(u(a(b.index),f.length),0),S=[],j=1;j<b.length;j++)S.push(void 0===(_=b[j])?_:String(_));var T=b.groups;if(h){var E=[x].concat(S,C,f);void 0!==T&&E.push(T);var D=String(e.apply(void 0,E))}else D=m(x,f,C,S,T,e);C>=k&&(w+=f.slice(k,C)+D,k=C+x.length)}return w+f.slice(k)}];function m(t,e,o,r,a,s){var l=o+t.length,c=r.length,u=h;return void 0!==a&&(a=i(a),u=f),n.call(s,u,(function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,o);case"'":return e.slice(l);case"<":s=a[i.slice(1,-1)];break;default:var u=+i;if(0===u)return n;if(u>c){var f=d(u/10);return 0===f?n:f<=c?void 0===r[f-1]?i.charAt(1):r[f-1]+i.charAt(1):n}s=r[u-1]}return void 0===s?"":s}))}}))},aae3:function(t,e,n){var o=n("d3f4"),i=n("2d95"),r=n("2b4c")("match");t.exports=function(t){var e;return o(t)&&(void 0!==(e=t[r])?!!e:"RegExp"==i(t))}},ac6a:function(t,e,n){for(var o=n("cadf"),i=n("0d58"),r=n("2aba"),a=n("7726"),s=n("32e9"),l=n("84f2"),c=n("2b4c"),u=c("iterator"),d=c("toStringTag"),f=l.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(h),m=0;m<p.length;m++){var v,g=p[m],y=h[g],b=a[g],_=b&&b.prototype;if(_&&(_[u]||s(_,u,f),_[d]||s(_,d,g),l[g]=f,y))for(v in o)_[v]||r(_,v,o[v],!0)}},b0c5:function(t,e,n){"use strict";var o=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:o!==/./.exec},{exec:o})},be13:function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},c366:function(t,e,n){var o=n("6821"),i=n("9def"),r=n("77f1");t.exports=function(t){return function(e,n,a){var s,l=o(e),c=i(l.length),u=r(a,c);if(t&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}}},c649:function(t,e,n){"use strict";(function(t){n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return r})),n.d(e,"d",(function(){return l})),n("a481");var o,i,r="undefined"!=typeof window?window.console:t.console,a=/-(\w)/g,s=(o=function(t){return t.replace(a,(function(t,e){return e?e.toUpperCase():""}))},i=Object.create(null),function(t){return i[t]||(i[t]=o(t))});function l(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function c(t,e,n){var o=0===n?t.children[0]:t.children[n-1].nextSibling;t.insertBefore(e,o)}}).call(this,n("c8ba"))},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")((function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a}))},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},ca5a:function(t,e){var n=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+o).toString(36))}},cadf:function(t,e,n){"use strict";var o=n("9c6c"),i=n("d53b"),r=n("84f2"),a=n("6821");t.exports=n("01f9")(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),r.Arguments=r.Array,o("keys"),o("values"),o("entries")},cb7c:function(t,e,n){var o=n("d3f4");t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},ce10:function(t,e,n){var o=n("69a8"),i=n("6821"),r=n("c366")(!1),a=n("613b")("IE_PROTO");t.exports=function(t,e){var n,s=i(t),l=0,c=[];for(n in s)n!=a&&o(s,n)&&c.push(n);for(;e.length>l;)o(s,n=e[l++])&&(~r(c,n)||c.push(n));return c}},d2c8:function(t,e,n){var o=n("aae3"),i=n("be13");t.exports=function(t,e,n){if(o(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},d3f4:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f559:function(t,e,n){"use strict";var o=n("5ca1"),i=n("9def"),r=n("d2c8"),a="startsWith",s="".startsWith;o(o.P+o.F*n("5147")(a),"String",{startsWith:function(t){var e=r(this,t,a),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),o=String(t);return s?s.call(e,o,n):e.slice(n,n+o.length)===o}})},f6fd:function(t,e){!function(t){var e="currentScript",n=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(o){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(o.stack)||[!1])[1];for(t in n)if(n[t].src==e||"interactive"==n[t].readyState)return n[t];return null}}})}(document)},f751:function(t,e,n){var o=n("5ca1");o(o.S+o.F,"Object",{assign:n("7333")})},fa5b:function(t,e,n){t.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(t,e,n){var o=n("7726").document;t.exports=o&&o.documentElement},fb15:function(t,e,n){"use strict";var o;function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function r(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw r}}return n}}(t,e)||r(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||r(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}n.r(e),"undefined"!=typeof window&&(n("f6fd"),(o=window.document.currentScript)&&(o=o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=o[1])),n("f751"),n("f559"),n("ac6a"),n("cadf"),n("456d"),n("6762"),n("2fdb");var l=n("a352"),c=n.n(l),u=n("c649");function d(t,e){var n=this;this.$nextTick((function(){return n.$emit(t.toLowerCase(),e)}))}function f(t){var e=this;return function(n){null!==e.realList&&e["onDrag"+t](n),d.call(e,t,n)}}function h(t){return["transition-group","TransitionGroup"].includes(t)}function p(t,e,n){return t[n]||(e[n]?e[n]():void 0)}var m=["Start","Add","Remove","Update","End"],v=["Choose","Unchoose","Sort","Filter","Clone"],g=["Move"].concat(m,v).map((function(t){return"on"+t})),y=null,b={name:"draggable",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(t){return t}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1}},render:function(t){var e=this.$slots.default;this.transitionMode=function(t){if(!t||1!==t.length)return!1;var e=a(t,1)[0].componentOptions;return!!e&&h(e.tag)}(e);var n=function(t,e,n){var o=0,i=0,r=p(e,n,"header");r&&(o=r.length,t=t?[].concat(s(r),s(t)):s(r));var a=p(e,n,"footer");return a&&(i=a.length,t=t?[].concat(s(t),s(a)):s(a)),{children:t,headerOffset:o,footerOffset:i}}(e,this.$slots,this.$scopedSlots),o=n.children,i=n.headerOffset,r=n.footerOffset;this.headerOffset=i,this.footerOffset=r;var l=function(t,e){var n=null,o=function(t,e){n=function(t,e,n){return void 0===n||((t=t||{})[e]=n),t}(n,t,e)};if(o("attrs",Object.keys(t).filter((function(t){return"id"===t||t.startsWith("data-")})).reduce((function(e,n){return e[n]=t[n],e}),{})),!e)return n;var i=e.on,r=e.props,a=e.attrs;return o("on",i),o("props",r),Object.assign(n.attrs,a),n}(this.$attrs,this.componentData);return t(this.getTag(),l,o)},created:function(){null!==this.list&&null!==this.value&&u.b.error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&u.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&u.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var t=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var e={};m.forEach((function(n){e["on"+n]=f.call(t,n)})),v.forEach((function(n){e["on"+n]=d.bind(t,n)}));var n=Object.keys(this.$attrs).reduce((function(e,n){return e[Object(u.a)(n)]=t.$attrs[n],e}),{}),o=Object.assign({},this.options,n,e,{onMove:function(e,n){return t.onDragMove(e,n)}});!("draggable"in o)&&(o.draggable=">*"),this._sortable=new c.a(this.rootContainer,o),this.computeIndexes()},beforeDestroy:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(t){this.updateOptions(t)},deep:!0},$attrs:{handler:function(t){this.updateOptions(t)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getIsFunctional:function(){var t=this._vnode.fnOptions;return t&&t.functional},getTag:function(){return this.tag||this.element},updateOptions:function(t){for(var e in t){var n=Object(u.a)(e);-1===g.indexOf(n)&&this._sortable.option(n,t[e])}},getChildrenNodes:function(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var t=this.$slots.default;return this.transitionMode?t[0].child.$slots.default:t},computeIndexes:function(){var t=this;this.$nextTick((function(){t.visibleIndexes=function(t,e,n,o){if(!t)return[];var i=t.map((function(t){return t.elm})),r=e.length-o,a=s(e).map((function(t,e){return e>=r?i.length:i.indexOf(t)}));return n?a.filter((function(t){return-1!==t})):a}(t.getChildrenNodes(),t.rootContainer.children,t.transitionMode,t.footerOffset)}))},getUnderlyingVm:function(t){var e=function(t,e){return t.map((function(t){return t.elm})).indexOf(e)}(this.getChildrenNodes()||[],t);return-1===e?null:{index:e,element:this.realList[e]}},getUnderlyingPotencialDraggableComponent:function(t){var e=t.__vue__;return e&&e.$options&&h(e.$options._componentTag)?e.$parent:!("realList"in e)&&1===e.$children.length&&"realList"in e.$children[0]?e.$children[0]:e},emitChanges:function(t){var e=this;this.$nextTick((function(){e.$emit("change",t)}))},alterList:function(t){if(this.list)t(this.list);else{var e=s(this.value);t(e),this.$emit("input",e)}},spliceList:function(){var t=arguments,e=function(e){return e.splice.apply(e,s(t))};this.alterList(e)},updatePosition:function(t,e){var n=function(n){return n.splice(e,0,n.splice(t,1)[0])};this.alterList(n)},getRelatedContextFromMoveEvent:function(t){var e=t.to,n=t.related,o=this.getUnderlyingPotencialDraggableComponent(e);if(!o)return{component:o};var i=o.realList,r={list:i,component:o};if(e!==n&&i&&o.getUnderlyingVm){var a=o.getUnderlyingVm(n);if(a)return Object.assign(a,r)}return r},getVmIndex:function(t){var e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(t){if(this.noTransitionOnDrag&&this.transitionMode){this.getChildrenNodes()[t].data=null;var e=this.getComponent();e.children=[],e.kept=void 0}},onDragStart:function(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),y=t.item},onDragAdd:function(t){var e=t.item._underlying_vm_;if(void 0!==e){Object(u.d)(t.item);var n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();var o={element:e,newIndex:n};this.emitChanges({added:o})}},onDragRemove:function(t){if(Object(u.c)(this.rootContainer,t.item,t.oldIndex),"clone"!==t.pullMode){var e=this.context.index;this.spliceList(e,1);var n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})}else Object(u.d)(t.clone)},onDragUpdate:function(t){Object(u.d)(t.item),Object(u.c)(t.from,t.item,t.oldIndex);var e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);var o={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:o})},updateProperty:function(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},computeFutureIndex:function(t,e){if(!t.element)return 0;var n=s(e.to.children).filter((function(t){return"none"!==t.style.display})),o=n.indexOf(e.related),i=t.component.getVmIndex(o);return-1===n.indexOf(y)&&e.willInsertAfter?i+1:i},onDragMove:function(t,e){var n=this.move;if(!n||!this.realList)return!0;var o=this.getRelatedContextFromMoveEvent(t),i=this.context,r=this.computeFutureIndex(o,t);return Object.assign(i,{futureIndex:r}),n(Object.assign({},t,{relatedContext:o,draggedContext:i}),e)},onDragEnd:function(){this.computeIndexes(),y=null}}};"undefined"!=typeof window&&"Vue"in window&&window.Vue.component("draggable",b);var _=b;e.default=_}}).default},t.exports=o(n(51474))}}]); |