asma-core-ui 3.0.22 → 3.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/asma-core-ui.es.js
CHANGED
|
@@ -22,7 +22,7 @@ import*as e from"react";import t,{forwardRef as n,useRef as o,useCallback as r,u
|
|
|
22
22
|
* https://quilljs.com/
|
|
23
23
|
* Copyright (c) 2014, Jason Chen
|
|
24
24
|
* Copyright (c) 2013, salesforce.com
|
|
25
|
-
*/typeof self<"u"&&self;var ph=fh.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=109)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),r=n(18),i=n(19),a=n(45),l=n(46),s=n(47),u=n(48),c=n(49),d=n(12),f=n(32),p=n(33),h=n(31),g=n(1),m={Scope:g.Scope,create:g.create,find:g.find,query:g.query,register:g.register,Container:o.default,Format:r.default,Leaf:i.default,Embed:u.default,Scroll:a.default,Block:s.default,Inline:l.default,Text:c.default,Attributor:{Attribute:d.default,Class:f.default,Style:p.default,Store:h.default}};t.default=m},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t="[Parchment] "+t,(n=e.call(this,t)||this).message=t,n.name=n.constructor.name,n}return r(t,e),t}(Error);t.ParchmentError=i;var a,l={},s={},u={},c={};function d(e,t){var n=p(e);if(null==n)throw new i("Unable to create "+e+" blot");var o=n,r=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:o.create(t);return new o(r,t)}function f(e,n){return void 0===n&&(n=!1),null==e?null:null!=e[t.DATA_KEY]?e[t.DATA_KEY].blot:n?f(e.parentNode,n):null}function p(e,t){var n;if(void 0===t&&(t=a.ANY),"string"==typeof e)n=c[e]||l[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof e)e&a.LEVEL&a.BLOCK?n=c.block:e&a.LEVEL&a.INLINE&&(n=c.inline);else if(e instanceof HTMLElement){var o=(e.getAttribute("class")||"").split(/\s+/);for(var r in o)if(n=s[o[r]])break;n=n||u[e.tagName]}return null==n?null:t&a.LEVEL&n.scope&&t&a.TYPE&n.scope?n:null}function h(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>1)return e.map((function(e){return h(e)}));var n=e[0];if("string"!=typeof n.blotName&&"string"!=typeof n.attrName)throw new i("Invalid definition");if("abstract"===n.blotName)throw new i("Cannot register abstract class");return c[n.blotName||n.attrName]=n,"string"==typeof n.keyName?l[n.keyName]=n:(null!=n.className&&(s[n.className]=n),null!=n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map((function(e){return e.toUpperCase()})):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach((function(e){(null==u[e]||null==n.className)&&(u[e]=n)})))),n}t.DATA_KEY="__blot",function(e){e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY"}(a=t.Scope||(t.Scope={})),t.create=d,t.find=f,t.query=p,t.register=h},function(e,t,n){var o=n(51),r=n(11),i=n(3),a=n(20),l=String.fromCharCode(0),s=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};s.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},s.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},s.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},s.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=i(!0,{},e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,"object"!=typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(r(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},s.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},s.prototype.filter=function(e){return this.ops.filter(e)},s.prototype.forEach=function(e){this.ops.forEach(e)},s.prototype.map=function(e){return this.ops.map(e)},s.prototype.partition=function(e){var t=[],n=[];return this.forEach((function(o){(e(o)?t:n).push(o)})),[t,n]},s.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},s.prototype.changeLength=function(){return this.reduce((function(e,t){return t.insert?e+a.length(t):t.delete?e-t.delete:e}),0)},s.prototype.length=function(){return this.reduce((function(e,t){return e+a.length(t)}),0)},s.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var n=[],o=a.iterator(this.ops),r=0;r<t&&o.hasNext();){var i;r<e?i=o.next(e-r):(i=o.next(t-r),n.push(i)),r+=a.length(i)}return new s(n)},s.prototype.compose=function(e){var t=a.iterator(this.ops),n=a.iterator(e.ops),o=[],i=n.peek();if(null!=i&&"number"==typeof i.retain&&null==i.attributes){for(var l=i.retain;"insert"===t.peekType()&&t.peekLength()<=l;)l-=t.peekLength(),o.push(t.next());i.retain-l>0&&n.next(i.retain-l)}for(var u=new s(o);t.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===t.peekType())u.push(t.next());else{var c=Math.min(t.peekLength(),n.peekLength()),d=t.next(c),f=n.next(c);if("number"==typeof f.retain){var p={};"number"==typeof d.retain?p.retain=c:p.insert=d.insert;var h=a.attributes.compose(d.attributes,f.attributes,"number"==typeof d.retain);if(h&&(p.attributes=h),u.push(p),!n.hasNext()&&r(u.ops[u.ops.length-1],p)){var g=new s(t.rest());return u.concat(g).chop()}}else"number"==typeof f.delete&&"number"==typeof d.retain&&u.push(f)}return u.chop()},s.prototype.concat=function(e){var t=new s(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},s.prototype.diff=function(e,t){if(this.ops===e.ops)return new s;var n=[this,e].map((function(t){return t.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:l;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join("")})),i=new s,u=o(n[0],n[1],t),c=a.iterator(this.ops),d=a.iterator(e.ops);return u.forEach((function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case o.INSERT:n=Math.min(d.peekLength(),t),i.push(d.next(n));break;case o.DELETE:n=Math.min(t,c.peekLength()),c.next(n),i.delete(n);break;case o.EQUAL:n=Math.min(c.peekLength(),d.peekLength(),t);var l=c.next(n),s=d.next(n);r(l.insert,s.insert)?i.retain(n,a.attributes.diff(l.attributes,s.attributes)):i.push(s).delete(n)}t-=n}})),i.chop()},s.prototype.eachLine=function(e,t){t=t||"\n";for(var n=a.iterator(this.ops),o=new s,r=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),l=a.length(i)-n.peekLength(),u="string"==typeof i.insert?i.insert.indexOf(t,l)-l:-1;if(u<0)o.push(n.next());else if(u>0)o.push(n.next(u));else{if(!1===e(o,n.next(1).attributes||{},r))return;r+=1,o=new s}}o.length()>0&&e(o,{},r)},s.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var n=a.iterator(this.ops),o=a.iterator(e.ops),r=new s;n.hasNext()||o.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===o.peekType())if("insert"===o.peekType())r.push(o.next());else{var i=Math.min(n.peekLength(),o.peekLength()),l=n.next(i),u=o.next(i);if(l.delete)continue;u.delete?r.push(u):r.retain(i,a.attributes.transform(l.attributes,u.attributes,t))}else r.retain(a.length(n.next()));return r.chop()},s.prototype.transformPosition=function(e,t){t=!!t;for(var n=a.iterator(this.ops),o=0;n.hasNext()&&o<=e;){var r=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(o<e||!t)&&(e+=r),o+=r):e-=Math.min(r,e-o)}return e},e.exports=s},function(e,t){var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,r=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;for(t in e);return typeof t>"u"||n.call(e,t)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(i)return i(e,t).value}return e[t]};e.exports=function e(){var t,n,o,r,i,c,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)o=u(d,n),d!==(r=u(t,n))&&(h&&r&&(l(r)||(i=a(r)))?(i?(i=!1,c=o&&a(o)?o:[]):c=o&&l(o)?o:{},s(d,{name:n,newValue:e(h,c,r)})):typeof r<"u"&&s(d,{name:n,newValue:r}));return d}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=d(n(3)),a=d(n(2)),l=d(n(0)),s=d(n(16)),u=d(n(6)),c=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=1,m=function(e){function t(){return f(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),o(t,[{key:"attach",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this),this.attributes=new l.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new a.default).insert(this.value(),(0,i.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(e,t){var n=l.default.query(e,l.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}},{key:"formatAt",value:function(e,t,n,o){this.format(n,o)}},{key:"insertAt",value:function(e,n,o){if("string"==typeof n&&n.endsWith("\n")){var i=l.default.create(v.blotName);this.parent.insertBefore(i,0===e?this:this.next),i.insertAt(0,n.slice(0,-1))}else r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,o)}}]),t}(l.default.Embed);m.scope=l.default.Scope.BLOCK_BLOT;var v=function(e){function t(e){f(this,t);var n=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return h(t,e),o(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(l.default.Leaf).reduce((function(e,t){return 0===t.length()?e:e.insert(t.value(),y(t))}),new a.default).insert("\n",y(this))),this.cache.delta}},{key:"deleteAt",value:function(e,n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),this.cache={}}},{key:"formatAt",value:function(e,n,o,i){n<=0||(l.default.query(o,l.default.Scope.BLOCK)?e+n===this.length()&&this.format(o,i):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(n,this.length()-e-1),o,i),this.cache={})}},{key:"insertAt",value:function(e,n,o){if(null!=o)return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,o);if(0!==n.length){var i=n.split("\n"),a=i.shift();a.length>0&&(e<this.length()-1||null==this.children.tail?r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});var l=this;i.reduce((function(e,t){return(l=l.split(e,!0)).insertAt(0,t),t.length}),e+a.length)}}},{key:"insertBefore",value:function(e,n){var o=this.children.head;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n),o instanceof s.default&&o.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+g),this.cache.length}},{key:"moveChildren",value:function(e,n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,n),this.cache={}}},{key:"optimize",value:function(e){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.cache={}}},{key:"path",value:function(e){return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,e),this.cache={}}},{key:"split",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-g)){var o=this.clone();return 0===e?(this.parent.insertBefore(o,this),this):(this.parent.insertBefore(o,this.next),o)}var i=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},i}}]),t}(l.default.Block);function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e||("function"==typeof e.formats&&(t=(0,i.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope)?t:y(e.parent,t)}v.blotName="block",v.tagName="P",v.defaultChild="break",v.allowedChildren=[u.default,l.default.Embed,c.default],t.bubbleFormats=y,t.BlockEmbed=m,t.default=v},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();n(50);var a=m(n(2)),l=m(n(14)),s=m(n(8)),u=m(n(9)),c=m(n(0)),d=n(15),f=m(d),p=m(n(3)),h=m(n(10)),g=m(n(34));function m(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var b=(0,h.default)("quill"),w=function(){function e(t){var n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(y(this,e),this.options=x(t,o),this.container=this.options.container,null==this.container)return b.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var r=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 s.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new l.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(s.default.events.EDITOR_CHANGE,(function(e){e===s.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(s.default.events.SCROLL_UPDATE,(function(e,t){var o=n.selection.lastRange,r=o&&0===o.length?o.index:void 0;_.call(n,(function(){return n.editor.update(null,t,r)}),e)}));var i=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+r+"<p><br></p></div>");this.setContents(i),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return i(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),h.default.level(e)}},{key:"find",value:function(e){return e.__quill||c.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&b.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var r=e.attrName||e.blotName;"string"==typeof r?this.register("formats/"+r,e,t):Object.keys(e).forEach((function(o){n.register(o,e[o],t)}))}else null!=this.imports[e]&&!o&&b.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?c.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),i(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e){var n=e;(e=document.createElement("div")).classList.add(n)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,n){var o=this,i=k(e,t,n),a=r(i,4);return e=a[0],t=a[1],n=a[3],_.call(this,(function(){return o.editor.deleteText(e,t)}),n,e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:"format",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;return _.call(this,(function(){var o=n.getSelection(!0),r=new a.default;if(null==o)return r;if(c.default.query(e,c.default.Scope.BLOCK))r=n.editor.formatLine(o.index,o.length,v({},e,t));else{if(0===o.length)return n.selection.format(e,t),r;r=n.editor.formatText(o.index,o.length,v({},e,t))}return n.setSelection(o,s.default.sources.SILENT),r}),o)}},{key:"formatLine",value:function(e,t,n,o,i){var a=this,l=void 0,s=k(e,t,n,o,i),u=r(s,4);return e=u[0],t=u[1],l=u[2],i=u[3],_.call(this,(function(){return a.editor.formatLine(e,t,l)}),i,e,0)}},{key:"formatText",value:function(e,t,n,o,i){var a=this,l=void 0,s=k(e,t,n,o,i),u=r(s,4);return e=u[0],t=u[1],l=u[2],i=u[3],_.call(this,(function(){return a.editor.formatText(e,t,l)}),i,e,0)}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.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 e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=k(e,t),o=r(n,2);return e=o[0],t=o[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=k(e,t),o=r(n,2);return e=o[0],t=o[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,o){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return _.call(this,(function(){return r.editor.insertEmbed(t,n,o)}),i,t)}},{key:"insertText",value:function(e,t,n,o,i){var a=this,l=void 0,s=k(e,0,n,o,i),u=r(s,4);return e=u[0],l=u[2],i=u[3],_.call(this,(function(){return a.editor.insertText(e,t,l)}),i,e,t.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(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:"removeFormat",value:function(e,t,n){var o=this,i=k(e,t,n),a=r(i,4);return e=a[0],t=a[1],n=a[3],_.call(this,(function(){return o.editor.removeFormat(e,t)}),n,e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API;return _.call(this,(function(){e=new a.default(e);var n=t.getLength(),o=t.editor.deleteText(0,n),r=t.editor.applyDelta(e),i=r.ops[r.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),r.delete(1)),o.compose(r)}),n)}},{key:"setSelection",value:function(t,n,o){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var i=k(t,n,o),a=r(i,4);t=a[0],n=a[1],o=a[3],this.selection.setRange(new d.Range(t,n),o),o!==s.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API,n=(new a.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API;return _.call(this,(function(){return e=new a.default(e),t.editor.applyDelta(e,n)}),n,!0)}}]),e}();function x(e,t){if((t=(0,p.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==w.DEFAULTS.theme){if(t.theme=w.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=g.default;var n=(0,p.default)(!0,{},t.theme.DEFAULTS);[n,t].forEach((function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach((function(t){!0===e.modules[t]&&(e.modules[t]={})}))}));var o=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce((function(e,t){var n=w.import("modules/"+t);return null==n?b.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=n.DEFAULTS||{},e}),{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,p.default)(!0,{},w.DEFAULTS,{modules:o},n,t),["bounds","container","scrollingContainer"].forEach((function(e){"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))})),t.modules=Object.keys(t.modules).reduce((function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e}),{}),t}function _(e,t,n,o){if(this.options.strict&&!this.isEnabled()&&t===s.default.sources.USER)return new a.default;var r=null==n?null:this.getSelection(),i=this.editor.delta,l=e();if(null!=r&&(!0===n&&(n=r.index),null==o?r=E(r,l,t):0!==o&&(r=E(r,n,o,t)),this.setSelection(r,s.default.sources.SILENT)),l.length()>0){var u,c,d=[s.default.events.TEXT_CHANGE,l,i,t];(u=this.emitter).emit.apply(u,[s.default.events.EDITOR_CHANGE].concat(d)),t!==s.default.sources.SILENT&&(c=this.emitter).emit.apply(c,d)}return l}function k(e,t,n,r,i){var a={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(i=r,r=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(i=r,r=n,n=t,t=0),"object"===(typeof n>"u"?"undefined":o(n))?(a=n,i=r):"string"==typeof n&&(null!=r?a[n]=r:i=n),[e,t,a,i=i||s.default.sources.API]}function E(e,t,n,o){if(null==e)return null;var i=void 0,l=void 0;if(t instanceof a.default){var u=[e.index,e.index+e.length].map((function(e){return t.transformPosition(e,o!==s.default.sources.USER)})),c=r(u,2);i=c[0],l=c[1]}else{var f=[e.index,e.index+e.length].map((function(e){return e<t||e===t&&o===s.default.sources.USER?e:n>=0?e+n:Math.max(t,e+n)})),p=r(f,2);i=p[0],l=p[1]}return new d.Range(i,l-i)}w.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},w.events=s.default.events,w.sources=s.default.sources,w.version="1.3.7",w.imports={delta:a.default,parchment:c.default,"core/module":u.default,"core/theme":g.default},t.expandConfig=x,t.overload=k,t.default=w},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=l(n(7)),a=l(n(0));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=function(e){function t(){return s(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,e),o(t,[{key:"formatAt",value:function(e,n,o,i){if(t.compare(this.statics.blotName,o)<0&&a.default.query(o,a.default.Scope.BLOT)){var l=this.isolate(e,n);i&&l.wrap(o,i)}else r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,o,i)}},{key:"optimize",value:function(e){if(r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.parent instanceof t&&t.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(e,n){var o=t.order.indexOf(e),r=t.order.indexOf(n);return o>=0||r>=0?o-r:e===n?0:e<n?-1:1}}]),t}(a.default.Inline);d.allowedChildren=[d,a.default.Embed,i.default],d.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],t.default=d},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(o(n(0)).default.Text);t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=a(n(54));function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=(0,a(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((function(e){document.addEventListener(e,(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach((function(e){var n;e.__quill&&e.__quill.emitter&&(n=e.__quill.emitter).handleDOM.apply(n,t)}))}))}));var d=function(e){function t(){l(this,t);var e=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.listeners={},e.on("error",c.error),e}return u(t,e),o(t,[{key:"emit",value:function(){c.log.apply(c,arguments),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];(this.listeners[e.type]||[]).forEach((function(t){var o=t.node,r=t.handler;(e.target===o||o.contains(e.target))&&r.apply(void 0,[e].concat(n))}))}},{key:"listenDOM",value:function(e,t,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({node:t,handler:n})}}]),t}(i.default);d.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"},d.sources={API:"api",SILENT:"silent",USER:"user"},t.default=d},function(e,t,n){function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.quill=t,this.options=n};r.DEFAULTS={},t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=["error","warn","log","info"],r="warn";function i(e){if(o.indexOf(e)<=o.indexOf(r)){for(var t,n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];(t=console)[e].apply(t,i)}}function a(e){return o.reduce((function(t,n){return t[n]=i.bind(console,n,e),t}),{})}i.level=a.level=function(e){r=e},t.default=a},function(e,t,n){var o=Array.prototype.slice,r=n(52),i=n(53),a=e.exports=function(e,t,n){return n||(n={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:u(e,t,n))};function l(e){return null==e}function s(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||e.length>0&&"number"!=typeof e[0])}function u(e,t,n){var u,c;if(l(e)||l(t)||e.prototype!==t.prototype)return!1;if(i(e))return!!i(t)&&(e=o.call(e),t=o.call(t),a(e,t,n));if(s(e)){if(!s(t)||e.length!==t.length)return!1;for(u=0;u<e.length;u++)if(e[u]!==t[u])return!1;return!0}try{var d=r(e),f=r(t)}catch{return!1}if(d.length!=f.length)return!1;for(d.sort(),f.sort(),u=d.length-1;u>=0;u--)if(d[u]!=f[u])return!1;for(u=d.length-1;u>=0;u--)if(c=d[u],!a(e[c],t[c],n))return!1;return typeof e==typeof t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var r=o.Scope.TYPE&o.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&o.Scope.LEVEL|r:this.scope=o.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,(function(e){return e.name}))},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=o.query(e,o.Scope.BLOT&(this.scope|o.Scope.TYPE))&&(null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""},e}();t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},a=d(n(2)),l=d(n(0)),s=d(n(4)),u=d(n(6)),c=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=function(e){function t(){return f(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),t}(u.default);g.blotName="code",g.tagName="CODE";var m=function(e){function t(){return f(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),r(t,[{key:"delta",value:function(){var e=this,t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce((function(t,n){return t.insert(n).insert("\n",e.formats())}),new a.default)}},{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n){var r=this.descendant(c.default,this.length()-1),a=o(r,1)[0];null!=a&&a.deleteAt(a.length()-1,1),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}},{key:"formatAt",value:function(e,n,o,r){if(0!==n&&null!=l.default.query(o,l.default.Scope.BLOCK)&&(o!==this.statics.blotName||r!==this.statics.formats(this.domNode))){var i=this.newlineIndex(e);if(!(i<0||i>=e+n)){var a=this.newlineIndex(e,!0)+1,s=i-a+1,u=this.isolate(a,s),c=u.next;u.format(o,r),c instanceof t&&c.formatAt(0,e-a+n-s,o,r)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var r=this.descendant(c.default,e),i=o(r,2),a=i[0],l=i[1];a.insertAt(l,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var t=this.domNode.textContent.slice(e).indexOf("\n");return t>-1?e+t:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(l.default.create("text","\n")),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);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(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(e){var t=l.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof l.default.Embed?t.remove():t.unwrap()}))}}],[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(s.default);m.blotName="code-block",m.tagName="PRE",m.TAB=" ",t.Code=g,t.default=m},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=v(n(2)),l=v(n(20)),s=v(n(0)),u=v(n(13)),c=v(n(24)),d=n(4),f=v(d),p=v(n(16)),h=v(n(21)),g=v(n(11)),m=v(n(3));function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var w=/^[ -~]*$/,x=function(){function e(t){b(this,e),this.scroll=t,this.delta=this.getDelta()}return i(e,[{key:"applyDelta",value:function(e){var t=this,n=!1;this.scroll.update();var i=this.scroll.length();return this.scroll.batchStart(),(e=k(e)).reduce((function(e,a){var u=a.retain||a.delete||a.insert.length||1,c=a.attributes||{};if(null!=a.insert){if("string"==typeof a.insert){var p=a.insert;p.endsWith("\n")&&n&&(n=!1,p=p.slice(0,-1)),e>=i&&!p.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,p);var h=t.scroll.line(e),g=r(h,2),v=g[0],y=g[1],b=(0,m.default)({},(0,d.bubbleFormats)(v));if(v instanceof f.default){var w=v.descendant(s.default.Leaf,y),x=r(w,1)[0];b=(0,m.default)(b,(0,d.bubbleFormats)(x))}c=l.default.attributes.diff(b,c)||{}}else if("object"===o(a.insert)){var _=Object.keys(a.insert)[0];if(null==_)return e;t.scroll.insertAt(e,_,a.insert[_])}i+=u}return Object.keys(c).forEach((function(n){t.scroll.formatAt(e,u,n,c[n])})),e+u}),0),e.reduce((function(e,n){return"number"==typeof n.delete?(t.scroll.deleteAt(e,n.delete),e):e+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update((new a.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(o).forEach((function(r){if(null==n.scroll.whitelist||n.scroll.whitelist[r]){var i=n.scroll.lines(e,Math.max(t,1)),a=t;i.forEach((function(t){var i=t.length();if(t instanceof u.default){var l=e-t.offset(n.scroll),s=t.newlineIndex(l+a)-l+1;t.formatAt(l,s,r,o[r])}else t.format(r,o[r]);a-=i}))}})),this.scroll.optimize(),this.update((new a.default).retain(e).retain(t,(0,h.default)(o)))}},{key:"formatText",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(o).forEach((function(r){n.scroll.formatAt(e,t,r,o[r])})),this.update((new a.default).retain(e).retain(t,(0,h.default)(o)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(e,t){return e.concat(t.delta())}),new a.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],o=[];0===t?this.scroll.path(e).forEach((function(e){var t=r(e,1)[0];t instanceof f.default?n.push(t):t instanceof s.default.Leaf&&o.push(t)})):(n=this.scroll.lines(e,t),o=this.scroll.descendants(s.default.Leaf,e,t));var i=[n,o].map((function(e){if(0===e.length)return{};for(var t=(0,d.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=_((0,d.bubbleFormats)(n),t)}return t}));return m.default.apply(m.default,i)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter((function(e){return"string"==typeof e.insert})).map((function(e){return e.insert})).join("")}},{key:"insertEmbed",value:function(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new a.default).retain(e).insert(y({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(o).forEach((function(r){n.scroll.formatAt(e,t.length,r,o[r])})),this.update((new a.default).retain(e).insert(t,(0,h.default)(o)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return!(e.statics.blotName!==f.default.blotName||e.children.length>1)&&e.children.head instanceof p.default}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),o=this.scroll.line(e+t),i=r(o,2),l=i[0],s=i[1],c=0,d=new a.default;null!=l&&(c=l instanceof u.default?l.newlineIndex(s)-s+1:l.length()-s,d=l.delta().slice(s,s+c-1).insert("\n"));var f=this.getContents(e,t+c).diff((new a.default).insert(n).concat(d)),p=(new a.default).retain(e).concat(f);return this.applyDelta(p)}},{key:"update",value:function(e){var t=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===t.length&&"characterData"===t[0].type&&t[0].target.data.match(w)&&s.default.find(t[0].target)){var r=s.default.find(t[0].target),i=(0,d.bubbleFormats)(r),l=r.offset(this.scroll),u=t[0].oldValue.replace(c.default.CONTENTS,""),f=(new a.default).insert(u),p=(new a.default).insert(r.value());e=(new a.default).retain(l).concat(f.diff(p,n)).reduce((function(e,t){return t.insert?e.insert(t.insert,i):e.push(t)}),new a.default),this.delta=o.compose(e)}else this.delta=this.getDelta(),(!e||!(0,g.default)(o.compose(e),this.delta))&&(e=o.diff(this.delta,n));return e}}]),e}();function _(e,t){return Object.keys(t).reduce((function(n,o){return null==e[o]||(t[o]===e[o]?n[o]=t[o]:Array.isArray(t[o])?t[o].indexOf(e[o])<0&&(n[o]=t[o].concat([e[o]])):n[o]=[t[o],e[o]]),n}),{})}function k(e){return e.reduce((function(e,t){if(1===t.insert){var n=(0,h.default)(t.attributes);return delete n.image,e.insert({image:t.attributes.image},n)}if(null!=t.attributes&&(!0===t.attributes.list||!0===t.attributes.bullet)&&((t=(0,h.default)(t)).attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"==typeof t.insert){var o=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(o,t.attributes)}return e.push(t)}),new a.default)}t.default=x},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=u(n(0)),a=u(n(21)),l=u(n(11)),s=u(n(8));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var f=(0,u(n(10)).default)("quill:selection"),p=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;d(this,e),this.index=t,this.length=n},h=function(){function e(t,n){var o=this;d(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=i.default.create("cursor",this),this.lastRange=this.savedRange=new p(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){o.mouseDown||setTimeout(o.update.bind(o,s.default.sources.USER),1)})),this.emitter.on(s.default.events.EDITOR_CHANGE,(function(e,t){e===s.default.events.TEXT_CHANGE&&t.length()>0&&o.update(s.default.sources.SILENT)})),this.emitter.on(s.default.events.SCROLL_BEFORE_UPDATE,(function(){if(o.hasFocus()){var e=o.getNativeRange();null!=e&&e.start.node!==o.cursor.textNode&&o.emitter.once(s.default.events.SCROLL_UPDATE,(function(){try{o.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch{}}))}})),this.emitter.on(s.default.events.SCROLL_OPTIMIZE,(function(e,t){if(t.range){var n=t.range,r=n.startNode,i=n.startOffset,a=n.endNode,l=n.endOffset;o.setNativeRange(r,i,a,l)}})),this.update(s.default.sources.SILENT)}return r(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",(function(){e.composing=!0})),this.root.addEventListener("compositionend",(function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();if(!t)return;setTimeout((function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var e=this;this.emitter.listenDOM("mousedown",document.body,(function(){e.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){e.mouseDown=!1,e.update(s.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!i.default.query(e,i.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var o=i.default.find(n.start.node,!1);if(null==o)return;if(o instanceof i.default.Leaf){var r=o.split(n.start.offset);o.parent.insertBefore(this.cursor,r)}else o.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;var r=void 0,i=this.scroll.leaf(e),a=o(i,2),l=a[0],s=a[1];if(null==l)return null;var u=l.position(s,!0),c=o(u,2);r=c[0],s=c[1];var d=document.createRange();if(t>0){d.setStart(r,s);var f=this.scroll.leaf(e+t),p=o(f,2);if(l=p[0],s=p[1],null==l)return null;var h=l.position(s,!0),g=o(h,2);return r=g[0],s=g[1],d.setEnd(r,s),d.getBoundingClientRect()}var m="left",v=void 0;return r instanceof Text?(s<r.data.length?(d.setStart(r,s),d.setEnd(r,s+1)):(d.setStart(r,s-1),d.setEnd(r,s),m="right"),v=d.getBoundingClientRect()):(v=l.domNode.getBoundingClientRect(),s>0&&(m="right")),{bottom:v.top+v.height,height:v.height,left:v[m],right:v[m],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var n=this.normalizeNative(t);return f.info("getNativeRange",n),n}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var r=n.map((function(e){var n=o(e,2),r=n[0],a=n[1],l=i.default.find(r,!0),s=l.offset(t.scroll);return 0===a?s:l instanceof i.default.Container?s+l.length():s+l.index(r,a)})),a=Math.min(Math.max.apply(Math,c(r)),this.scroll.length()-1),l=Math.min.apply(Math,[a].concat(c(r)));return new p(l,a-l)}},{key:"normalizeNative",value:function(e){if(!g(this.root,e.startContainer)||!e.collapsed&&!g(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach((function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;n=(t=t.lastChild)instanceof Text?t.data.length:t.childNodes.length+1}e.node=t,e.offset=n})),t}},{key:"rangeToNative",value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],r=[],i=this.scroll.length();return n.forEach((function(e,n){e=Math.min(i-1,e);var a=void 0,l=t.scroll.leaf(e),s=o(l,2),u=s[0],c=s[1],d=u.position(c,0!==n),f=o(d,2);a=f[0],c=f[1],r.push(a,c)})),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var r=this.scroll.length()-1,i=this.scroll.line(Math.min(t.index,r)),a=o(i,1)[0],l=a;if(t.length>0){var s=this.scroll.line(Math.min(t.index+t.length,r));l=o(s,1)[0]}if(null!=a&&null!=l){var u=e.getBoundingClientRect();n.top<u.top?e.scrollTop-=u.top-n.top:n.bottom>u.bottom&&(e.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(f.info("setNativeRange",e,t,n,o),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=e){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||r||e!==a.startContainer||t!==a.startOffset||n!==a.endContainer||o!==a.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(o=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var l=document.createRange();l.setStart(e,t),l.setEnd(n,o),i.removeAllRanges(),i.addRange(l)}}else i.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;if("string"==typeof t&&(n=t,t=!1),f.info("setRange",e),null!=e){var o=this.rangeToNative(e);this.setNativeRange.apply(this,c(o).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,t=this.lastRange,n=this.getRange(),r=o(n,2),i=r[0],u=r[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,l.default)(t,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var d,f=[s.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(t),e];(c=this.emitter).emit.apply(c,[s.default.events.EDITOR_CHANGE].concat(f)),e!==s.default.sources.SILENT&&(d=this.emitter).emit.apply(d,f)}}}]),e}();function g(e,t){try{t.parentNode}catch{return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=p,t.default=h},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){function t(){return a(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,[{key:"insertInto",value:function(e,n){0===e.children.length?r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertInto",this).call(this,e,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),t}(i(n(0)).default.Embed);u.blotName="break",u.tagName="BR",t.default=u},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(44),a=n(30),l=n(1),s=function(e){function t(t){var n=e.call(this,t)||this;return n.build(),n}return r(t,e),t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){e.prototype.attach.call(this),this.children.forEach((function(e){e.attach()}))},t.prototype.build=function(){var e=this;this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(t){try{var n=u(t);e.insertBefore(n,e.children.head||void 0)}catch(e){if(e instanceof l.ParchmentError)return;throw e}}))},t.prototype.deleteAt=function(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,(function(e,t,n){e.deleteAt(t,n)}))},t.prototype.descendant=function(e,n){var o=this.children.find(n),r=o[0],i=o[1];return null==e.blotName&&e(r)||null!=e.blotName&&r instanceof e?[r,i]:r instanceof t?r.descendant(e,i):[null,-1]},t.prototype.descendants=function(e,n,o){void 0===n&&(n=0),void 0===o&&(o=Number.MAX_VALUE);var r=[],i=o;return this.children.forEachAt(n,o,(function(n,o,a){(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&r.push(n),n instanceof t&&(r=r.concat(n.descendants(e,o,i))),i-=a})),r},t.prototype.detach=function(){this.children.forEach((function(e){e.detach()})),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,o){this.children.forEachAt(e,t,(function(e,t,r){e.formatAt(t,r,n,o)}))},t.prototype.insertAt=function(e,t,n){var o=this.children.find(e),r=o[0],i=o[1];if(r)r.insertAt(i,t,n);else{var a=null==n?l.create("text",t):l.create(t,n);this.appendChild(a)}},t.prototype.insertBefore=function(e,t){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(t){return e instanceof t})))throw new l.ParchmentError("Cannot insert "+e.statics.blotName+" into "+this.statics.blotName);e.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce((function(e,t){return e+t.length()}),0)},t.prototype.moveChildren=function(e,t){this.children.forEach((function(n){e.insertBefore(n,t)}))},t.prototype.optimize=function(t){if(e.prototype.optimize.call(this,t),0===this.children.length)if(null!=this.statics.defaultChild){var n=l.create(this.statics.defaultChild);this.appendChild(n),n.optimize(t)}else this.remove()},t.prototype.path=function(e,n){void 0===n&&(n=!1);var o=this.children.find(e,n),r=o[0],i=o[1],a=[[this,e]];return r instanceof t?a.concat(r.path(i,n)):(null!=r&&a.push([r,i]),a)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(n){n instanceof t&&n.moveChildren(this),e.prototype.replace.call(this,n)},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(e,this.length(),(function(e,o,r){e=e.split(o,t),n.appendChild(e)})),n},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e,t){var n=this,o=[],r=[];e.forEach((function(e){e.target===n.domNode&&"childList"===e.type&&(o.push.apply(o,e.addedNodes),r.push.apply(r,e.removedNodes))})),r.forEach((function(e){if(!(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var t=l.find(e);null!=t&&(null==t.domNode.parentNode||t.domNode.parentNode===n.domNode)&&t.detach()}})),o.filter((function(e){return e.parentNode==n.domNode})).sort((function(e,t){return e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(e){var t=null;null!=e.nextSibling&&(t=l.find(e.nextSibling));var o=u(e);(o.next!=t||null==o.next)&&(null!=o.parent&&o.parent.removeChild(n),n.insertBefore(o,t||void 0))}))},t}(a.default);function u(e){var t=l.find(e);if(null==t)try{t=l.create(e)}catch{t=l.create(l.Scope.INLINE),[].slice.call(e.childNodes).forEach((function(e){t.domNode.appendChild(e)})),e.parentNode&&e.parentNode.replaceChild(t.domNode,e),t.attach()}return t}t.default=s},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),a=n(31),l=n(17),s=n(1),u=function(e){function t(t){var n=e.call(this,t)||this;return n.attributes=new a.default(n.domNode),n}return r(t,e),t.formats=function(e){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?e.tagName.toLowerCase():void 0)},t.prototype.format=function(e,t){var n=s.query(e);n instanceof i.default?this.attributes.attribute(n,t):t&&null!=n&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)},t.prototype.formats=function(){var e=this.attributes.values(),t=this.statics.formats(this.domNode);return null!=t&&(e[this.statics.blotName]=t),e},t.prototype.replaceWith=function(t,n){var o=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(o),o},t.prototype.update=function(t,n){var o=this;e.prototype.update.call(this,t,n),t.some((function(e){return e.target===o.domNode&&"attributes"===e.type}))&&this.attributes.build()},t.prototype.wrap=function(n,o){var r=e.prototype.wrap.call(this,n,o);return r instanceof t&&r.statics.scope===this.statics.scope&&this.attributes.move(r),r},t}(l.default);t.default=u},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(30),a=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.value=function(e){return!0},t.prototype.index=function(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},t.prototype.position=function(e,t){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){var e;return(e={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,e},t.scope=a.Scope.INLINE_BLOT,t}(i.default);t.default=l},function(e,t,n){var o=n(11),r=n(3),i={attributes:{compose:function(e,t,n){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var o=r(!0,{},t);for(var i in n||(o=Object.keys(o).reduce((function(e,t){return null!=o[t]&&(e[t]=o[t]),e}),{})),e)void 0!==e[i]&&void 0===t[i]&&(o[i]=e[i]);return Object.keys(o).length>0?o:void 0},diff:function(e,t){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce((function(n,r){return o(e[r],t[r])||(n[r]=void 0===t[r]?null:t[r]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if("object"!=typeof e)return t;if("object"==typeof t){if(!n)return t;var o=Object.keys(t).reduce((function(n,o){return void 0===e[o]&&(n[o]=t[o]),n}),{});return Object.keys(o).length>0?o:void 0}}},iterator:function(e){return new a(e)},length:function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"string"==typeof e.insert?e.insert.length:1}};function a(e){this.ops=e,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,o=i.length(t);if(e>=o-n?(e=o-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var r={};return t.attributes&&(r.attributes=t.attributes),"number"==typeof t.retain?r.retain=e:"string"==typeof t.insert?r.insert=t.insert.substr(n,e):r.insert=t.insert,r}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?i.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 e=this.offset,t=this.index,n=this.next(),o=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(o)}return[]},e.exports=i},function(e,t){var n=function(){function e(e,t){return null!=t&&e instanceof t}var t,n,o;try{t=Map}catch{t=function(){}}try{n=Set}catch{n=function(){}}try{o=Promise}catch{o=function(){}}function r(i,a,l,s,c){"object"==typeof a&&(l=a.depth,s=a.prototype,c=a.includeNonEnumerable,a=a.circular);var d=[],f=[],p=typeof Buffer<"u";function h(i,l){if(null===i)return null;if(0===l)return i;var g,m;if("object"!=typeof i)return i;if(e(i,t))g=new t;else if(e(i,n))g=new n;else if(e(i,o))g=new o((function(e,t){i.then((function(t){e(h(t,l-1))}),(function(e){t(h(e,l-1))}))}));else if(r.__isArray(i))g=[];else if(r.__isRegExp(i))g=new RegExp(i.source,u(i)),i.lastIndex&&(g.lastIndex=i.lastIndex);else if(r.__isDate(i))g=new Date(i.getTime());else{if(p&&Buffer.isBuffer(i))return g=Buffer.allocUnsafe?Buffer.allocUnsafe(i.length):new Buffer(i.length),i.copy(g),g;e(i,Error)?g=Object.create(i):typeof s>"u"?(m=Object.getPrototypeOf(i),g=Object.create(m)):(g=Object.create(s),m=s)}if(a){var v=d.indexOf(i);if(-1!=v)return f[v];d.push(i),f.push(g)}for(var y in e(i,t)&&i.forEach((function(e,t){var n=h(t,l-1),o=h(e,l-1);g.set(n,o)})),e(i,n)&&i.forEach((function(e){var t=h(e,l-1);g.add(t)})),i){var b;m&&(b=Object.getOwnPropertyDescriptor(m,y)),(!b||null!=b.set)&&(g[y]=h(i[y],l-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(i);for(y=0;y<w.length;y++){var x=w[y];(k=Object.getOwnPropertyDescriptor(i,x))&&!k.enumerable&&!c||(g[x]=h(i[x],l-1),k.enumerable||Object.defineProperty(g,x,{enumerable:!1}))}}if(c){var _=Object.getOwnPropertyNames(i);for(y=0;y<_.length;y++){var k,E=_[y];(k=Object.getOwnPropertyDescriptor(i,E))&&k.enumerable||(g[E]=h(i[E],l-1),Object.defineProperty(g,E,{enumerable:!1}))}}return g}return typeof a>"u"&&(a=!0),typeof l>"u"&&(l=1/0),h(i,l)}function i(e){return Object.prototype.toString.call(e)}function a(e){return"object"==typeof e&&"[object Date]"===i(e)}function l(e){return"object"==typeof e&&"[object Array]"===i(e)}function s(e){return"object"==typeof e&&"[object RegExp]"===i(e)}function u(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return r.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},r.__objToStr=i,r.__isDate=a,r.__isArray=l,r.__isRegExp=s,r.__getRegExpFlags=u,r}();"object"==typeof e&&e.exports&&(e.exports=n)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},a=p(n(0)),l=p(n(8)),s=n(4),u=p(s),c=p(n(16)),d=p(n(13)),f=p(n(25));function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function v(e){return e instanceof u.default||e instanceof s.BlockEmbed}var y=function(e){function t(e,n){h(this,t);var o=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.emitter=n.emitter,Array.isArray(n.whitelist)&&(o.whitelist=n.whitelist.reduce((function(e,t){return e[t]=!0,e}),{})),o.domNode.addEventListener("DOMNodeInserted",(function(){})),o.optimize(),o.enable(),o}return m(t,e),r(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(e,n){var r=this.line(e),a=o(r,2),l=a[0],u=a[1],f=this.line(e+n),p=o(f,1)[0];if(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),null!=p&&l!==p&&u>0){if(l instanceof s.BlockEmbed||p instanceof s.BlockEmbed)return void this.optimize();if(l instanceof d.default){var h=l.newlineIndex(l.length(),!0);if(h>-1&&(l=l.split(h+1))===p)return void this.optimize()}else if(p instanceof d.default){var g=p.newlineIndex(0);g>-1&&p.split(g+1)}var m=p.children.head instanceof c.default?null:p.children.head;l.moveChildren(p,m),l.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,o,r){null!=this.whitelist&&!this.whitelist[o]||(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,o,r),this.optimize())}},{key:"insertAt",value:function(e,n,o){if(null==o||null==this.whitelist||this.whitelist[n]){if(e>=this.length())if(null==o||null==a.default.query(n,a.default.Scope.BLOCK)){var r=a.default.create(this.statics.defaultChild);this.appendChild(r),null==o&&n.endsWith("\n")&&(n=n.slice(0,-1)),r.insertAt(0,n,o)}else{var l=a.default.create(n,o);this.appendChild(l)}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,o);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===a.default.Scope.INLINE_BLOT){var o=a.default.create(this.statics.defaultChild);o.appendChild(e),e=o}i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(v,e)}},{key:"lines",value:function(){return function e(t,n,o){var r=[],i=o;return t.children.forEachAt(n,o,(function(t,n,o){v(t)?r.push(t):t instanceof a.default.Container&&(r=r.concat(e(t,n,i))),i-=o})),r}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(l.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var n=l.default.sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(l.default.events.SCROLL_BEFORE_UPDATE,n,e),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(l.default.events.SCROLL_UPDATE,n,e)}}}]),t}(a.default.Scroll);y.blotName="scroll",y.className="ql-editor",y.tagName="DIV",y.defaultChild="block",y.allowedChildren=[u.default,s.BlockEmbed,f.default],t.default=y},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=g(n(21)),l=g(n(11)),s=g(n(3)),u=g(n(2)),c=g(n(20)),d=g(n(0)),f=g(n(5)),p=g(n(10)),h=g(n(9));function g(e){return e&&e.__esModule?e:{default:e}}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var w=(0,p.default)("quill:keyboard"),x=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",_=function(e){function t(e,n){v(this,t);var o=y(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.bindings={},Object.keys(o.options.bindings).forEach((function(t){"list autofill"===t&&null!=e.scroll.whitelist&&!e.scroll.whitelist.list||o.options.bindings[t]&&o.addBinding(o.options.bindings[t])})),o.addBinding({key:t.keys.ENTER,shiftKey:null},S),o.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(o.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},E),o.addBinding({key:t.keys.DELETE},{collapsed:!0},C)):(o.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},E),o.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},C)),o.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},O),o.addBinding({key:t.keys.DELETE},{collapsed:!1},O),o.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},E),o.listen(),o}return b(t,e),i(t,null,[{key:"match",value:function(e,t){return t=T(t),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!t[n]!==e[n]&&null!==t[n]}))&&t.key===(e.which||e.keyCode)}}]),i(t,[{key:"addBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=T(e);if(null==o||null==o.key)return w.warn("Attempted to add invalid keyboard binding",o);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),o=(0,s.default)(o,t,n),this.bindings[o.key]=this.bindings[o.key]||[],this.bindings[o.key].push(o)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var i=n.which||n.keyCode,a=(e.bindings[i]||[]).filter((function(e){return t.match(n,e)}));if(0!==a.length){var s=e.quill.getSelection();if(null!=s&&e.quill.hasFocus()){var u=e.quill.getLine(s.index),c=r(u,2),f=c[0],p=c[1],h=e.quill.getLeaf(s.index),g=r(h,2),m=g[0],v=g[1],y=0===s.length?[m,v]:e.quill.getLeaf(s.index+s.length),b=r(y,2),w=b[0],x=b[1],_=m instanceof d.default.Text?m.value().slice(0,v):"",k=w instanceof d.default.Text?w.value().slice(x):"",E={collapsed:0===s.length,empty:0===s.length&&f.length()<=1,format:e.quill.getFormat(s),offset:p,prefix:_,suffix:k};a.some((function(t){if(null!=t.collapsed&&t.collapsed!==E.collapsed||null!=t.empty&&t.empty!==E.empty||null!=t.offset&&t.offset!==E.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((function(e){return null==E.format[e]})))return!1}else if("object"===o(t.format)&&!Object.keys(t.format).every((function(e){return!0===t.format[e]?null!=E.format[e]:!1===t.format[e]?null==E.format[e]:(0,l.default)(t.format[e],E.format[e])})))return!1;return!(null!=t.prefix&&!t.prefix.test(E.prefix)||null!=t.suffix&&!t.suffix.test(E.suffix))&&!0!==t.handler.call(e,s,E)}))&&n.preventDefault()}}}}))}}]),t}(h.default);function k(e,t){var n,o=e===_.keys.LEFT?"prefix":"suffix";return m(n={key:e,shiftKey:t,altKey:null},o,/^$/),m(n,"handler",(function(n){var o=n.index;e===_.keys.RIGHT&&(o+=n.length+1);var i=this.quill.getLeaf(o);return!(r(i,1)[0]instanceof d.default.Embed&&(e===_.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index-1,f.default.sources.USER):t?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 E(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),o=r(n,1)[0],i={};if(0===t.offset){var a=this.quill.getLine(e.index-1),l=r(a,1)[0];if(null!=l&&l.length()>1){var s=o.formats(),u=this.quill.getFormat(e.index-1,1);i=c.default.attributes.diff(s,u)||{}}}var d=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-d,d,f.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(e.index-d,d,i,f.default.sources.USER),this.quill.focus()}}function C(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var o={},i=0,a=this.quill.getLine(e.index),l=r(a,1)[0];if(t.offset>=l.length()-1){var s=this.quill.getLine(e.index+1),u=r(s,1)[0];if(u){var d=l.formats(),p=this.quill.getFormat(e.index,1);o=c.default.attributes.diff(d,p)||{},i=u.length()}}this.quill.deleteText(e.index,n,f.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(e.index+i-1,n,o,f.default.sources.USER)}}function O(e){var t=this.quill.getLines(e),n={};if(t.length>1){var o=t[0].formats(),r=t[t.length-1].formats();n=c.default.attributes.diff(r,o)||{}}this.quill.deleteText(e,f.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,f.default.sources.USER),this.quill.setSelection(e.index,f.default.sources.SILENT),this.quill.focus()}function S(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var o=Object.keys(t.format).reduce((function(e,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e}),{});this.quill.insertText(e.index,"\n",o,f.default.sources.USER),this.quill.setSelection(e.index+1,f.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach((function(e){null==o[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],f.default.sources.USER))}))}function N(e){return{key:_.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=d.default.query("code-block"),o=t.index,i=t.length,a=this.quill.scroll.descendant(n,o),l=r(a,2),s=l[0],u=l[1];if(null!=s){var c=this.quill.getIndex(s),p=s.newlineIndex(u,!0)+1,h=s.newlineIndex(c+u+i),g=s.domNode.textContent.slice(p,h).split("\n");u=0,g.forEach((function(t,r){e?(s.insertAt(p+u,n.TAB),u+=n.TAB.length,0===r?o+=n.TAB.length:i+=n.TAB.length):t.startsWith(n.TAB)&&(s.deleteAt(p+u,n.TAB.length),u-=n.TAB.length,0===r?o-=n.TAB.length:i-=n.TAB.length),u+=t.length+1})),this.quill.update(f.default.sources.USER),this.quill.setSelection(o,i,f.default.sources.SILENT)}}}}function j(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],f.default.sources.USER)}}}function T(e){if("string"==typeof e||"number"==typeof e)return T({key:e});if("object"===(typeof e>"u"?"undefined":o(e))&&(e=(0,a.default)(e,!1)),"string"==typeof e.key)if(null!=_.keys[e.key.toUpperCase()])e.key=_.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[x]=e.shortKey,delete e.shortKey),e}_.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},_.DEFAULTS={bindings:{bold:j("bold"),italic:j("italic"),underline:j("underline"),indent:{key:_.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",f.default.sources.USER)}},outdent:{key:_.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",f.default.sources.USER)}},"outdent backspace":{key:_.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,t){null!=t.format.indent?this.quill.format("indent","-1",f.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,f.default.sources.USER)}},"indent code-block":N(!0),"outdent code-block":N(!1),"remove tab":{key:_.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,f.default.sources.USER)}},tab:{key:_.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new u.default).retain(e.index).delete(e.length).insert("\t");this.quill.updateContents(t,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,f.default.sources.SILENT)}},"list empty enter":{key:_.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,f.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,f.default.sources.USER)}},"checklist enter":{key:_.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=r(t,2),o=n[0],i=n[1],a=(0,s.default)({},o.formats(),{list:"checked"}),l=(new u.default).retain(e.index).insert("\n",a).retain(o.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(l,f.default.sources.USER),this.quill.setSelection(e.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:_.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),o=r(n,2),i=o[0],a=o[1],l=(new u.default).retain(e.index).insert("\n",t.format).retain(i.length()-a-1).retain(1,{header:null});this.quill.updateContents(l,f.default.sources.USER),this.quill.setSelection(e.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var n=t.prefix.length,o=this.quill.getLine(e.index),i=r(o,2),a=i[0],l=i[1];if(l>n)return!0;var s=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(e.index," ",f.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(e.index-l).delete(n+1).retain(a.length()-2-l).retain(1,{list:s});this.quill.updateContents(c,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,f.default.sources.SILENT)}},"code exit":{key:_.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=r(t,2),o=n[0],i=n[1],a=(new u.default).retain(e.index+o.length()-i-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,f.default.sources.USER)}},"embed left":k(_.keys.LEFT,!1),"embed left shift":k(_.keys.LEFT,!0),"embed right":k(_.keys.RIGHT,!1),"embed right shift":k(_.keys.RIGHT,!0)}},t.default=_,t.SHORTKEY=x},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=s(n(0)),l=s(n(7));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(e,n){u(this,t);var o=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.selection=n,o.textNode=document.createTextNode(t.CONTENTS),o.domNode.appendChild(o.textNode),o._length=0,o}return d(t,e),i(t,null,[{key:"value",value:function(){}}]),i(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,n){if(0!==this._length)return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);for(var o=this,i=0;null!=o&&o.statics.scope!==a.default.Scope.BLOCK_BLOT;)i+=o.offset(o.parent),o=o.parent;null!=o&&(this._length=t.CONTENTS.length,o.optimize(),o.formatAt(i,t.CONTENTS.length,e,n),this._length=0)}},{key:"index",value:function(e,n){return e===this.textNode?0:r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var e=this.textNode,n=this.selection.getNativeRange(),r=void 0,i=void 0,s=void 0;if(null!=n&&n.start.node===e&&n.end.node===e){var u=[e,n.start.offset,n.end.offset];r=u[0],i=u[1],s=u[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==t.CONTENTS){var c=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof l.default?(r=this.next.domNode,this.next.insertAt(0,c),this.textNode.data=t.CONTENTS):(this.textNode.data=c,this.parent.insertBefore(a.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=i){var d=[i,s].map((function(e){return Math.max(0,Math.min(r.data.length,e-1))})),f=o(d,2);return i=f[0],s=f[1],{startNode:r,startOffset:i,endNode:r,endOffset:s}}}}},{key:"update",value:function(e,t){var n=this;if(e.some((function(e){return"characterData"===e.type&&e.target===n.textNode}))){var o=this.restore();o&&(t.range=o)}}},{key:"value",value:function(){return""}}]),t}(a.default.Embed);f.blotName="cursor",f.className="ql-cursor",f.tagName="span",f.CONTENTS="\ufeff",t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(0)),r=n(4),i=a(r);function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){function t(){return l(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),t}(o.default.Container);c.allowedChildren=[i.default,r.BlockEmbed,c],t.default=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=a(n(0));function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){function t(){return l(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),o(t,[{key:"value",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return n.startsWith("rgb(")?"#"+(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"")).split(",").map((function(e){return("00"+parseInt(e).toString(16)).slice(-2)})).join(""):n}}]),t}(i.default.Attributor.Style),d=new i.default.Attributor.Class("color","ql-color",{scope:i.default.Scope.INLINE}),f=new c("color","color",{scope:i.default.Scope.INLINE});t.ColorAttributor=c,t.ColorClass=d,t.ColorStyle=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){function t(){return a(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,[{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n)return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(e){var n=r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return e=this.sanitize(e),n.setAttribute("href",e),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(e){return e.getAttribute("href")}},{key:"sanitize",value:function(e){return c(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}(i(n(6)).default);function c(e,t){var n=document.createElement("a");n.href=e;var o=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(o)>-1}u.blotName="link",u.tagName="A",u.SANITIZED_URL="about:blank",u.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=u,t.sanitize=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=l(n(23)),a=l(n(107));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var u=0;function c(e,t){e.setAttribute(t,"true"!==e.getAttribute(t))}var d=function(){function e(t){var n=this;s(this,e),this.select=t,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(e){switch(e.keyCode){case i.default.keys.ENTER:n.togglePicker();break;case i.default.keys.ESCAPE:n.escape(),e.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return r(e,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),c(this.label,"aria-expanded"),c(this.options,"aria-hidden")}},{key:"buildItem",value:function(e){var t=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),e.hasAttribute("value")&&n.setAttribute("data-value",e.getAttribute("value")),e.textContent&&n.setAttribute("data-label",e.textContent),n.addEventListener("click",(function(){t.selectItem(n,!0)})),n.addEventListener("keydown",(function(e){switch(e.keyCode){case i.default.keys.ENTER:t.selectItem(n,!0),e.preventDefault();break;case i.default.keys.ESCAPE:t.escape(),e.preventDefault()}})),n}},{key:"buildLabel",value:function(){var e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=a.default,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}},{key:"buildOptions",value:function(){var e=this,t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id="ql-picker-options-"+u,u+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach((function(n){var o=e.buildItem(n);t.appendChild(o),!0===n.selected&&e.selectItem(o)})),this.container.appendChild(t)}},{key:"buildPicker",value:function(){var e=this;[].slice.call(this.select.attributes).forEach((function(t){e.container.setAttribute(t.name,t.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var e=this;this.close(),setTimeout((function(){return e.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(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===(typeof Event>"u"?"undefined":o(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),e}();t.default=d},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=v(n(0)),r=v(n(5)),i=n(4),a=v(i),l=v(n(16)),s=v(n(25)),u=v(n(24)),c=v(n(35)),d=v(n(6)),f=v(n(22)),p=v(n(7)),h=v(n(55)),g=v(n(42)),m=v(n(23));function v(e){return e&&e.__esModule?e:{default:e}}r.default.register({"blots/block":a.default,"blots/block/embed":i.BlockEmbed,"blots/break":l.default,"blots/container":s.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":d.default,"blots/scroll":f.default,"blots/text":p.default,"modules/clipboard":h.default,"modules/history":g.default,"modules/keyboard":m.default}),o.default.register(a.default,l.default,u.default,d.default,f.default,p.default),t.default=r.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(){function e(e){this.domNode=e,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){if(null==this.tagName)throw new o.ParchmentError("Blot definition missing tagName");var t;return Array.isArray(this.tagName)?("string"==typeof e&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),t="number"==typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return o.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,r){var i=this.isolate(e,t);if(null!=o.query(n,o.Scope.BLOT)&&r)i.wrap(n,r);else if(null!=o.query(n,o.Scope.ATTRIBUTE)){var a=o.create(this.statics.scope);i.wrap(a),a.format(n,r)}},e.prototype.insertAt=function(e,t,n){var r=null==n?o.create("text",t):o.create(t,n),i=this.split(e);this.parent.insertBefore(r,i)},e.prototype.insertInto=function(e,t){void 0===t&&(t=null),null!=this.parent&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,t),null!=t&&(n=t.domNode),(this.domNode.parentNode!=e.domNode||this.domNode.nextSibling!=n)&&e.domNode.insertBefore(this.domNode,n),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return void 0===e&&(e=this.parent),null==this.parent||this==e?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){null!=this.domNode[o.DATA_KEY]&&delete this.domNode[o.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n="string"==typeof e?o.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var n="string"==typeof e?o.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),r=n(32),i=n(33),a=n(1),l=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=o.default.keys(this.domNode),n=r.default.keys(this.domNode),l=i.default.keys(this.domNode);t.concat(n).concat(l).forEach((function(t){var n=a.query(t,a.Scope.ATTRIBUTE);n instanceof o.default&&(e.attributes[n.attrName]=n)}))},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach((function(n){var o=t.attributes[n].value(t.domNode);e.format(n,o)}))},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach((function(e){t.attributes[e].remove(t.domNode)})),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce((function(t,n){return t[n]=e.attributes[n].value(e.domNode),t}),{})},e}();t.default=l},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function i(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter((function(e){return 0===e.indexOf(t+"-")}))}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map((function(e){return e.split("-").slice(0,-1).join("-")}))},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){i(e,this.keyName).forEach((function(t){e.classList.remove(t)})),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(i(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=a},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function i(e){var t=e.split("-"),n=t.slice(1).map((function(e){return e[0].toUpperCase()+e.slice(1)})).join("");return t[0]+n}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map((function(e){return e.split(":")[0].trim()}))},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[i(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[i(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[i(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(t,n){r(this,e),this.quill=t,this.options=n,this.modules={}}return o(e,[{key:"init",value:function(){var e=this;Object.keys(this.options.modules).forEach((function(t){null==e.modules[t]&&e.addModule(t)}))}},{key:"addModule",value:function(e){var t=this.quill.constructor.import("modules/"+e);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}]),e}();i.DEFAULTS={modules:{}},i.themes={default:i},t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=l(n(0)),a=l(n(7));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d="\ufeff",f=function(e){function t(e){s(this,t);var n=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach((function(e){n.contentNode.appendChild(e)})),n.leftGuard=document.createTextNode(d),n.rightGuard=document.createTextNode(d),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return c(t,e),o(t,[{key:"index",value:function(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"restore",value:function(e){var t=void 0,n=void 0,o=e.data.split(d).join("");if(e===this.leftGuard)if(this.prev instanceof a.default){var r=this.prev.length();this.prev.insertAt(r,o),t={startNode:this.prev.domNode,startOffset:r+o.length}}else n=document.createTextNode(o),this.parent.insertBefore(i.default.create(n),this),t={startNode:n,startOffset:o.length};else e===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,o),t={startNode:this.next.domNode,startOffset:o.length}):(n=document.createTextNode(o),this.parent.insertBefore(i.default.create(n),this.next),t={startNode:n,startOffset:o.length}));return e.data=d,t}},{key:"update",value:function(e,t){var n=this;e.forEach((function(e){if("characterData"===e.type&&(e.target===n.leftGuard||e.target===n.rightGuard)){var o=n.restore(e.target);o&&(t.range=o)}}))}}]),t}(i.default.Embed);t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var o=r(n(0));function r(e){return e&&e.__esModule?e:{default:e}}var i={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},a=new o.default.Attributor.Attribute("align","align",i),l=new o.default.Attributor.Class("align","ql-align",i),s=new o.default.Attributor.Style("align","text-align",i);t.AlignAttribute=a,t.AlignClass=l,t.AlignStyle=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var o=i(n(0)),r=n(26);function i(e){return e&&e.__esModule?e:{default:e}}var a=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),l=new r.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});t.BackgroundClass=a,t.BackgroundStyle=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var o=r(n(0));function r(e){return e&&e.__esModule?e:{default:e}}var i={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},a=new o.default.Attributor.Attribute("direction","dir",i),l=new o.default.Attributor.Class("direction","ql-direction",i),s=new o.default.Attributor.Style("direction","direction",i);t.DirectionAttribute=a,t.DirectionClass=l,t.DirectionStyle=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=a(n(0));function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c={scope:i.default.Scope.INLINE,whitelist:["serif","monospace"]},d=new i.default.Attributor.Class("font","ql-font",c),f=function(e){function t(){return l(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),o(t,[{key:"value",value:function(e){return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}(i.default.Attributor.Style),p=new f("font","font-family",c);t.FontStyle=p,t.FontClass=d},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.SizeClass=void 0;var o=r(n(0));function r(e){return e&&e.__esModule?e:{default:e}}var i=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),a=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=i,t.SizeStyle=a},function(e,t,n){e.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(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=a(n(0)),i=a(n(5));function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){function t(e,n){l(this,t);var o=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.lastRecorded=0,o.ignoreChange=!1,o.clear(),o.quill.on(i.default.events.EDITOR_CHANGE,(function(e,t,n,r){e!==i.default.events.TEXT_CHANGE||o.ignoreChange||(o.options.userOnly&&r!==i.default.sources.USER?o.transform(t):o.record(t,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 u(t,e),o(t,[{key:"change",value:function(e,t){if(0!==this.stack[e].length){var n=this.stack[e].pop();this.stack[t].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[e],i.default.sources.USER),this.ignoreChange=!1;var o=f(n[e]);this.quill.setSelection(o)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(e,t){if(0!==e.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(t),o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){var r=this.stack.undo.pop();n=n.compose(r.undo),e=r.redo.compose(e)}else this.lastRecorded=o;this.stack.undo.push({redo:e,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(e){this.stack.undo.forEach((function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})),this.stack.redo.forEach((function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}(a(n(9)).default);function d(e){var t=e.ops[e.ops.length-1];return null!=t&&(null!=t.insert?"string"==typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some((function(e){return null!=r.default.query(e,r.default.Scope.BLOCK)})))}function f(e){var t=e.reduce((function(e,t){return e+=t.delete||0}),0),n=e.length()-t;return d(e)&&(n-=1),n}c.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=c,t.getLastChangeIndex=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=h(n(3)),a=h(n(2)),l=h(n(8)),s=h(n(23)),u=h(n(34)),c=h(n(59)),d=h(n(60)),f=h(n(28)),p=h(n(61));function h(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}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"],w=[!1,"serif","monospace"],x=["1","2","3",!1],_=["small",!1,"large","huge"],k=function(e){function t(e,n){g(this,t);var o=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),r=function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);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(e){e.container.contains(n.target)||e.close()}))};return e.emitter.listenDOM("click",document.body,r),o}return v(t,e),o(t,[{key:"addModule",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addModule",this).call(this,e);return"toolbar"===e&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(e,t){e.forEach((function(e){(e.getAttribute("class")||"").split(/\s+/).forEach((function(n){if(n.startsWith("ql-")&&(n=n.slice(3),null!=t[n]))if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"==typeof t[n])e.innerHTML=t[n];else{var o=e.value||"";null!=o&&t[n][o]&&(e.innerHTML=t[n][o])}}))}))}},{key:"buildPickers",value:function(e,t){var n=this;this.pickers=e.map((function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&O(e,y),new d.default(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){var n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&O(e,b,"background"===n?"#ffffff":"#000000"),new c.default(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?O(e,w):e.classList.contains("ql-header")?O(e,x):e.classList.contains("ql-size")&&O(e,_)),new f.default(e)}));var o=function(){n.pickers.forEach((function(e){e.update()}))};this.quill.on(l.default.events.EDITOR_CHANGE,o)}}]),t}(u.default);k.DEFAULTS=(0,i.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var e=this,t=this.container.querySelector("input.ql-image[type=file]");null==t&&((t=document.createElement("input")).setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",(function(){if(null!=t.files&&null!=t.files[0]){var n=new FileReader;n.onload=function(n){var o=e.quill.getSelection(!0);e.quill.updateContents((new a.default).retain(o.index).delete(o.length).insert({image:n.target.result}),l.default.sources.USER),e.quill.setSelection(o.index+1,l.default.sources.SILENT),t.value=""},n.readAsDataURL(t.files[0])}})),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var E=function(e){function t(e,n){g(this,t);var o=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.textbox=o.root.querySelector('input[type="text"]'),o.listen(),o}return v(t,e),o(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",(function(t){s.default.match(t,"enter")?(e.save(),t.preventDefault()):s.default.match(t,"escape")&&(e.cancel(),t.preventDefault())}))}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==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-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var t=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,l.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,l.default.sources.USER)),this.quill.root.scrollTop=t;break;case"video":e=C(e);case"formula":if(!e)break;var n=this.quill.getSelection(!0);if(null!=n){var o=n.index+n.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),e,l.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",l.default.sources.USER),this.quill.setSelection(o+2,l.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}(p.default);function C(e){var t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0":(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/":e}function O(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach((function(t){var o=document.createElement("option");t===n?o.setAttribute("selected","selected"):o.setAttribute("value",t),e.appendChild(o)}))}t.BaseTooltip=E,t.default=k},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.insertBefore(e[0],null),e.length>1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)},e.prototype.offset=function(e){for(var t=0,n=this.head;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var n,o=this.iterator();n=o();){var r=n.length();if(e<r||t&&e===r&&(null==n.next||0!==n.next.length()))return[n,e];e-=r}return[null,0]},e.prototype.forEach=function(e){for(var t,n=this.iterator();t=n();)e(t)},e.prototype.forEachAt=function(e,t,n){if(!(t<=0))for(var o,r=this.find(e),i=r[0],a=e-r[1],l=this.iterator(i);(o=l())&&a<e+t;){var s=o.length();e>a?n(o,e-a,Math.min(t,a+s-e)):n(o,0,Math.min(s,e+t-a)),a+=s}},e.prototype.map=function(e){return this.reduce((function(t,n){return t.push(e(n)),t}),[])},e.prototype.reduce=function(e,t){for(var n,o=this.iterator();n=o();)t=e(t,n);return t},e}();t.default=o},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),a=n(1),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=100,u=function(e){function t(t){var n=e.call(this,t)||this;return n.scroll=n,n.observer=new MutationObserver((function(e){n.update(e)})),n.observer.observe(n.domNode,l),n.attach(),n}return r(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),0===t&&n===this.length()?this.children.forEach((function(e){e.remove()})):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,o,r){this.update(),e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.insertAt=function(t,n,o){this.update(),e.prototype.insertAt.call(this,t,n,o)},t.prototype.optimize=function(t,n){var o=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var r=[].slice.call(this.observer.takeRecords());r.length>0;)t.push(r.pop());for(var l=function(e,t){void 0===t&&(t=!0),null!=e&&e!==o&&null!=e.domNode.parentNode&&(null==e.domNode[a.DATA_KEY].mutations&&(e.domNode[a.DATA_KEY].mutations=[]),t&&l(e.parent))},u=function(e){null==e.domNode[a.DATA_KEY]||null==e.domNode[a.DATA_KEY].mutations||(e instanceof i.default&&e.children.forEach(u),e.optimize(n))},c=t,d=0;c.length>0;d+=1){if(d>=s)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach((function(e){var t=a.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(l(a.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,(function(e){var t=a.find(e,!1);l(t,!1),t instanceof i.default&&t.children.forEach((function(e){l(e,!1)}))}))):"attributes"===e.type&&l(t.prev)),l(t))})),this.children.forEach(u),r=(c=[].slice.call(this.observer.takeRecords())).slice();r.length>0;)t.push(r.pop())}},t.prototype.update=function(t,n){var o=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map((function(e){var t=a.find(e.target,!0);return null==t?null:null==t.domNode[a.DATA_KEY].mutations?(t.domNode[a.DATA_KEY].mutations=[e],t):(t.domNode[a.DATA_KEY].mutations.push(e),null)})).forEach((function(e){null==e||e===o||null==e.domNode[a.DATA_KEY]||e.update(e.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="DIV",t}(i.default);t.default=u},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),a=n(1);function l(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,o){var r=this;n!==this.statics.blotName||o?e.prototype.format.call(this,n,o):(this.children.forEach((function(e){e instanceof i.default||(e=e.wrap(t.blotName,!0)),r.attributes.copy(e)})),this.unwrap())},t.prototype.formatAt=function(t,n,o,r){null!=this.formats()[o]||a.query(o,a.Scope.ATTRIBUTE)?this.isolate(t,n).format(o,r):e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var o=this.formats();if(0===Object.keys(o).length)return this.unwrap();var r=this.next;r instanceof t&&r.prev===this&&l(o,r.formats())&&(r.moveChildren(this),r.remove())},t.blotName="inline",t.scope=a.Scope.INLINE_BLOT,t.tagName="SPAN",t}(i.default);t.default=s},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),a=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){var o=a.query(t.blotName).tagName;if(n.tagName!==o)return e.formats.call(this,n)},t.prototype.format=function(n,o){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||o?e.prototype.format.call(this,n,o):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,o,r){null!=a.query(o,a.Scope.BLOCK)?this.format(o,r):e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.insertAt=function(t,n,o){if(null==o||null!=a.query(n,a.Scope.INLINE))e.prototype.insertAt.call(this,t,n,o);else{var r=this.split(t),i=a.create(n,o);r.parent.insertBefore(i,r)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="P",t}(i.default);t.default=l},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,o,r){0===t&&n===this.length()?this.format(o,r):e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=i},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),a=n(1),l=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return r(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,o){null==o?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,o)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=a.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e,t){var n=this;e.some((function(e){return"characterData"===e.type&&e.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=a.Scope.INLINE_BLOT,t}(i.default);t.default=l},function(e,t,n){var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var r=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:r.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var o=n.indexOf(e,t);return-1!==o&&o===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),o=n.length>>>0,r=arguments[1],i=0;i<o;i++)if(t=n[i],e.call(r,t,i,n))return t}}),document.addEventListener("DOMContentLoaded",(function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)}))},function(e,t){var n=-1,o=1,r=0;function i(e,t,n){if(e==t)return e?[[r,e]]:[];(n<0||e.length<n)&&(n=null);var o=u(e,t),i=e.substring(0,o);o=c(e=e.substring(o),t=t.substring(o));var l=e.substring(e.length-o),s=a(e=e.substring(0,e.length-o),t=t.substring(0,t.length-o));return i&&s.unshift([r,i]),l&&s.push([r,l]),f(s),null!=n&&(s=g(s,n)),s=m(s)}function a(e,t){var a;if(!e)return[[o,t]];if(!t)return[[n,e]];var s=e.length>t.length?e:t,u=e.length>t.length?t:e,c=s.indexOf(u);if(-1!=c)return a=[[o,s.substring(0,c)],[r,u],[o,s.substring(c+u.length)]],e.length>t.length&&(a[0][0]=a[2][0]=n),a;if(1==u.length)return[[n,e],[o,t]];var f=d(e,t);if(f){var p=f[0],h=f[1],g=f[2],m=f[3],v=f[4],y=i(p,g),b=i(h,m);return y.concat([[r,v]],b)}return l(e,t)}function l(e,t){for(var r=e.length,i=t.length,a=Math.ceil((r+i)/2),l=a,u=2*a,c=new Array(u),d=new Array(u),f=0;f<u;f++)c[f]=-1,d[f]=-1;c[l+1]=0,d[l+1]=0;for(var p=r-i,h=p%2!=0,g=0,m=0,v=0,y=0,b=0;b<a;b++){for(var w=-b+g;w<=b-m;w+=2){for(var x=l+w,_=(S=w==-b||w!=b&&c[x-1]<c[x+1]?c[x+1]:c[x-1]+1)-w;S<r&&_<i&&e.charAt(S)==t.charAt(_);)S++,_++;if(c[x]=S,S>r)m+=2;else if(_>i)g+=2;else if(h&&(C=l+p-w)>=0&&C<u&&-1!=d[C]&&S>=(E=r-d[C]))return s(e,t,S,_)}for(var k=-b+v;k<=b-y;k+=2){for(var E,C=l+k,O=(E=k==-b||k!=b&&d[C-1]<d[C+1]?d[C+1]:d[C-1]+1)-k;E<r&&O<i&&e.charAt(r-E-1)==t.charAt(i-O-1);)E++,O++;if(d[C]=E,E>r)y+=2;else if(O>i)v+=2;else if(!h){var S;if((x=l+p-k)>=0&&x<u&&-1!=c[x]&&(_=l+(S=c[x])-x,S>=(E=r-E)))return s(e,t,S,_)}}}return[[n,e],[o,t]]}function s(e,t,n,o){var r=e.substring(0,n),a=t.substring(0,o),l=e.substring(n),s=t.substring(o),u=i(r,a),c=i(l,s);return u.concat(c)}function u(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,o=Math.min(e.length,t.length),r=o,i=0;n<r;)e.substring(i,r)==t.substring(i,r)?i=n=r:o=r,r=Math.floor((o-n)/2+n);return r}function c(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,o=Math.min(e.length,t.length),r=o,i=0;n<r;)e.substring(e.length-r,e.length-i)==t.substring(t.length-r,t.length-i)?i=n=r:o=r,r=Math.floor((o-n)/2+n);return r}function d(e,t){var n=e.length>t.length?e:t,o=e.length>t.length?t:e;if(n.length<4||2*o.length<n.length)return null;function r(e,t,n){for(var o,r,i,a,l=e.substring(n,n+Math.floor(e.length/4)),s=-1,d="";-1!=(s=t.indexOf(l,s+1));){var f=u(e.substring(n),t.substring(s)),p=c(e.substring(0,n),t.substring(0,s));d.length<p+f&&(d=t.substring(s-p,s)+t.substring(s,s+f),o=e.substring(0,n-p),r=e.substring(n+f),i=t.substring(0,s-p),a=t.substring(s+f))}return 2*d.length>=e.length?[o,r,i,a,d]:null}var i,a,l,s,d,f=r(n,o,Math.ceil(n.length/4)),p=r(n,o,Math.ceil(n.length/2));return f||p?(i=p?f&&f[4].length>p[4].length?f:p:f,e.length>t.length?(a=i[0],l=i[1],s=i[2],d=i[3]):(s=i[0],d=i[1],a=i[2],l=i[3]),[a,l,s,d,i[4]]):null}function f(e){e.push([r,""]);for(var t,i=0,a=0,l=0,s="",d="";i<e.length;)switch(e[i][0]){case o:l++,d+=e[i][1],i++;break;case n:a++,s+=e[i][1],i++;break;case r:a+l>1?(0!==a&&0!==l&&(0!==(t=u(d,s))&&(i-a-l>0&&e[i-a-l-1][0]==r?e[i-a-l-1][1]+=d.substring(0,t):(e.splice(0,0,[r,d.substring(0,t)]),i++),d=d.substring(t),s=s.substring(t)),0!==(t=c(d,s))&&(e[i][1]=d.substring(d.length-t)+e[i][1],d=d.substring(0,d.length-t),s=s.substring(0,s.length-t))),0===a?e.splice(i-l,a+l,[o,d]):0===l?e.splice(i-a,a+l,[n,s]):e.splice(i-a-l,a+l,[n,s],[o,d]),i=i-a-l+(a?1:0)+(l?1:0)+1):0!==i&&e[i-1][0]==r?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,l=0,a=0,s="",d=""}""===e[e.length-1][1]&&e.pop();var p=!1;for(i=1;i<e.length-1;)e[i-1][0]==r&&e[i+1][0]==r&&(e[i][1].substring(e[i][1].length-e[i-1][1].length)==e[i-1][1]?(e[i][1]=e[i-1][1]+e[i][1].substring(0,e[i][1].length-e[i-1][1].length),e[i+1][1]=e[i-1][1]+e[i+1][1],e.splice(i-1,1),p=!0):e[i][1].substring(0,e[i+1][1].length)==e[i+1][1]&&(e[i-1][1]+=e[i+1][1],e[i][1]=e[i][1].substring(e[i+1][1].length)+e[i+1][1],e.splice(i+1,1),p=!0)),i++;p&&f(e)}var p=i;function h(e,t){if(0===t)return[r,e];for(var o=0,i=0;i<e.length;i++){var a=e[i];if(a[0]===n||a[0]===r){var l=o+a[1].length;if(t===l)return[i+1,e];if(t<l){e=e.slice();var s=t-o,u=[a[0],a[1].slice(0,s)],c=[a[0],a[1].slice(s)];return e.splice(i,1,u,c),[i+1,e]}o=l}}throw new Error("cursor_pos is out of bounds!")}function g(e,t){var n=h(e,t),o=n[1],i=n[0],a=o[i],l=o[i+1];if(null==a)return e;if(a[0]!==r)return e;if(null!=l&&a[1]+l[1]===l[1]+a[1])return o.splice(i,2,l,a),v(o,i,2);if(null!=l&&0===l[1].indexOf(a[1])){o.splice(i,2,[l[0],a[1]],[0,a[1]]);var s=l[1].slice(a[1].length);return s.length>0&&o.splice(i+2,0,[l[0],s]),v(o,i,3)}return e}function m(e){for(var t=!1,i=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},a=function(e){return e.charCodeAt(e.length-1)>=55296&&e.charCodeAt(e.length-1)<=56319},l=2;l<e.length;l+=1)e[l-2][0]===r&&a(e[l-2][1])&&e[l-1][0]===n&&i(e[l-1][1])&&e[l][0]===o&&i(e[l][1])&&(t=!0,e[l-1][1]=e[l-2][1].slice(-1)+e[l-1][1],e[l][1]=e[l-2][1].slice(-1)+e[l][1],e[l-2][1]=e[l-2][1].slice(0,-1));if(!t)return e;var s=[];for(l=0;l<e.length;l+=1)e[l][1].length>0&&s.push(e[l]);return s}function v(e,t,n){for(var o=t+n-1;o>=0&&o>=t-1;o--)if(o+1<e.length){var r=e[o],i=e[o+1];r[0]===i[1]&&e.splice(o,2,[r[0],r[1]+i[1]])}return e}p.INSERT=o,p.DELETE=n,p.EQUAL=r,e.exports=p},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}(e.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(e,t){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function o(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function r(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=n?o:r).supported=o,t.unsupported=r},function(e,t){var n=Object.prototype.hasOwnProperty,o="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(o=!1)),a.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)n.call(e,t)&&r.push(o?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},a.prototype.listeners=function(e,t){var n=o?o+e:e,r=this._events[n];if(t)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var i=0,a=r.length,l=new Array(a);i<a;i++)l[i]=r[i].fn;return l},a.prototype.emit=function(e,t,n,r,i,a){var l=o?o+e:e;if(!this._events[l])return!1;var s,u,c=this._events[l],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,r),!0;case 5:return c.fn.call(c.context,t,n,r,i),!0;case 6:return c.fn.call(c.context,t,n,r,i,a),!0}for(u=1,s=new Array(d-1);u<d;u++)s[u-1]=arguments[u];c.fn.apply(c.context,s)}else{var f,p=c.length;for(u=0;u<p;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,r);break;default:if(!s)for(f=1,s=new Array(d-1);f<d;f++)s[f-1]=arguments[f];c[u].fn.apply(c[u].context,s)}}return!0},a.prototype.on=function(e,t,n){var r=new i(t,n||this),a=o?o+e:e;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],r]:this._events[a].push(r):(this._events[a]=r,this._eventsCount++),this},a.prototype.once=function(e,t,n){var r=new i(t,n||this,!0),a=o?o+e:e;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],r]:this._events[a].push(r):(this._events[a]=r,this._eventsCount++),this},a.prototype.removeListener=function(e,t,n,i){var a=o?o+e:e;if(!this._events[a])return this;if(!t)return 0==--this._eventsCount?this._events=new r:delete this._events[a],this;var l=this._events[a];if(l.fn)l.fn===t&&(!i||l.once)&&(!n||l.context===n)&&(0==--this._eventsCount?this._events=new r:delete this._events[a]);else{for(var s=0,u=[],c=l.length;s<c;s++)(l[s].fn!==t||i&&!l[s].once||n&&l[s].context!==n)&&u.push(l[s]);u.length?this._events[a]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new r:delete this._events[a]}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=o?o+e:e,this._events[t]&&(0==--this._eventsCount?this._events=new r:delete this._events[t])):(this._events=new r,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,typeof e<"u"&&(e.exports=a)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=b(n(3)),l=b(n(2)),s=b(n(0)),u=b(n(5)),c=b(n(10)),d=b(n(9)),f=n(36),p=n(37),h=b(n(13)),g=n(26),m=n(38),v=n(39),y=n(40);function b(e){return e&&e.__esModule?e:{default:e}}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var E=(0,c.default)("quill:clipboard"),C="__ql-matcher",O=[[Node.TEXT_NODE,U],[Node.TEXT_NODE,z],["br",q],[Node.ELEMENT_NODE,z],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,B],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,H],["li",V],["b",D.bind(D,"bold")],["i",D.bind(D,"italic")],["style",F]],S=[f.AlignAttribute,m.DirectionAttribute].reduce((function(e,t){return e[t.keyName]=t,e}),{}),N=[f.AlignStyle,p.BackgroundStyle,g.ColorStyle,m.DirectionStyle,v.FontStyle,y.SizeStyle].reduce((function(e,t){return e[t.keyName]=t,e}),{}),j=function(e){function t(e,n){x(this,t);var o=_(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,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(e){var t=r(e,2),i=t[0],a=t[1];!n.matchVisual&&a===B||o.addMatcher(i,a)})),o}return k(t,e),i(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){if("string"==typeof e)return this.container.innerHTML=e.replace(/\>\r?\n +\</g,"><"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[h.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new l.default).insert(n,w({},h.default.blotName,t[h.default.blotName]))}var o=this.prepareMatching(),i=r(o,2),a=i[0],s=i[1],u=R(this.container,a,s);return M(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new l.default).retain(u.length()-1).delete(1))),E.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,u.default.sources.SILENT);else{var o=this.convert(t);this.quill.updateContents((new l.default).retain(e).concat(o),n),this.quill.setSelection(e+o.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),o=(new l.default).retain(n.index),r=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout((function(){o=o.concat(t.convert()).delete(n.length),t.quill.updateContents(o,u.default.sources.USER),t.quill.setSelection(o.length()-n.length,u.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=r,t.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach((function(o){var i=r(o,2),a=i[0],l=i[1];switch(a){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:t.push(l);break;default:[].forEach.call(e.container.querySelectorAll(a),(function(e){e[C]=e[C]||[],e[C].push(l)}))}})),[t,n]}}]),t}(d.default);function T(e,t,n){return"object"===(typeof t>"u"?"undefined":o(t))?Object.keys(t).reduce((function(e,n){return T(e,n,t[n])}),e):e.reduce((function(e,o){return o.attributes&&o.attributes[t]?e.push(o):e.insert(o.insert,(0,a.default)({},w({},t,n),o.attributes))}),new l.default)}function P(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t="__ql-computed-style";return e[t]||(e[t]=window.getComputedStyle(e))}function M(e,t){for(var n="",o=e.ops.length-1;o>=0&&n.length<t.length;--o){var r=e.ops[o];if("string"!=typeof r.insert)break;n=r.insert+n}return n.slice(-1*t.length)===t}function A(e){if(0===e.childNodes.length)return!1;var t=P(e);return["block","list-item"].indexOf(t.display)>-1}function R(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce((function(t,n){return n(e,t)}),new l.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(o,r){var i=R(r,t,n);return r.nodeType===e.ELEMENT_NODE&&(i=t.reduce((function(e,t){return t(r,e)}),i),i=(r[C]||[]).reduce((function(e,t){return t(r,e)}),i)),o.concat(i)}),new l.default):new l.default}function D(e,t,n){return T(n,e,!0)}function I(e,t){var n=s.default.Attributor.Attribute.keys(e),o=s.default.Attributor.Class.keys(e),r=s.default.Attributor.Style.keys(e),i={};return n.concat(o).concat(r).forEach((function(t){var n=s.default.query(t,s.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(e),i[n.attrName])||(null!=(n=S[t])&&(n.attrName===t||n.keyName===t)&&(i[n.attrName]=n.value(e)||void 0),null!=(n=N[t])&&(n.attrName===t||n.keyName===t)&&(n=N[t],i[n.attrName]=n.value(e)||void 0))})),Object.keys(i).length>0&&(t=T(t,i)),t}function L(e,t){var n=s.default.query(e);if(null==n)return t;if(n.prototype instanceof s.default.Embed){var o={},r=n.value(e);null!=r&&(o[n.blotName]=r,t=(new l.default).insert(o,n.formats(e)))}else"function"==typeof n.formats&&(t=T(t,n.blotName,n.formats(e)));return t}function q(e,t){return M(t,"\n")||t.insert("\n"),t}function F(){return new l.default}function V(e,t){var n=s.default.query(e);if(null==n||"list-item"!==n.blotName||!M(t,"\n"))return t;for(var o=-1,r=e.parentNode;!r.classList.contains("ql-clipboard");)"list"===(s.default.query(r)||{}).blotName&&(o+=1),r=r.parentNode;return o<=0?t:t.compose((new l.default).retain(t.length()-1).retain(1,{indent:o}))}function z(e,t){return M(t,"\n")||(A(e)||t.length()>0&&e.nextSibling&&A(e.nextSibling))&&t.insert("\n"),t}function B(e,t){if(A(e)&&null!=e.nextElementSibling&&!M(t,"\n\n")){var n=e.offsetHeight+parseFloat(P(e).marginTop)+parseFloat(P(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function H(e,t){var n={},o=e.style||{};return o.fontStyle&&"italic"===P(e).fontStyle&&(n.italic=!0),o.fontWeight&&(P(e).fontWeight.startsWith("bold")||parseInt(P(e).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=T(t,n)),parseFloat(o.textIndent||0)>0&&(t=(new l.default).insert("\t").concat(t)),t}function U(e,t){var n=e.data;if("O:P"===e.parentNode.tagName)return t.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!P(e.parentNode).whiteSpace.startsWith("pre")){var o=function(e,t){return(t=t.replace(/[^\u00a0]/g,"")).length<1&&e?" ":t};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,o.bind(o,!0)),(null==e.previousSibling&&A(e.parentNode)||null!=e.previousSibling&&A(e.previousSibling))&&(n=n.replace(/^\s+/,o.bind(o,!1))),(null==e.nextSibling&&A(e.parentNode)||null!=e.nextSibling&&A(e.nextSibling))&&(n=n.replace(/\s+$/,o.bind(o,!1)))}return t.insert(n)}j.DEFAULTS={matchers:[],matchVisual:!0},t.default=j,t.matchAttributor=I,t.matchBlot=L,t.matchNewline=z,t.matchSpacing=B,t.matchText=U},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){function t(){return a(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,[{key:"optimize",value:function(e){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}(i(n(6)).default);u.blotName="bold",u.tagName=["STRONG","B"],t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=c(n(2)),a=c(n(0)),l=c(n(5)),s=c(n(10)),u=c(n(9));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=(0,s.default)("quill:toolbar"),m=function(e){function t(e,n){f(this,t);var r,i=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(i.options.container)){var a=document.createElement("div");y(a,i.options.container),e.container.parentNode.insertBefore(a,e.container),i.container=a}else"string"==typeof i.options.container?i.container=document.querySelector(i.options.container):i.container=i.options.container;return i.container instanceof HTMLElement?(i.container.classList.add("ql-toolbar"),i.controls=[],i.handlers={},Object.keys(i.options.handlers).forEach((function(e){i.addHandler(e,i.options.handlers[e])})),[].forEach.call(i.container.querySelectorAll("button, select"),(function(e){i.attach(e)})),i.quill.on(l.default.events.EDITOR_CHANGE,(function(e,t){e===l.default.events.SELECTION_CHANGE&&i.update(t)})),i.quill.on(l.default.events.SCROLL_OPTIMIZE,(function(){var e=i.quill.selection.getRange(),t=o(e,1)[0];i.update(t)})),i):(r=g.error("Container required for toolbar",i.options),p(i,r))}return h(t,e),r(t,[{key:"addHandler",value:function(e,t){this.handlers[e]=t}},{key:"attach",value:function(e){var t=this,n=[].find.call(e.classList,(function(e){return 0===e.indexOf("ql-")}));if(n){if(n=n.slice(3),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void g.warn("ignoring attaching to disabled format",n,e);if(null==a.default.query(n))return void g.warn("ignoring attaching to nonexistent format",n,e)}var r="SELECT"===e.tagName?"change":"click";e.addEventListener(r,(function(r){var s=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var u=e.options[e.selectedIndex];s=!u.hasAttribute("selected")&&(u.value||!1)}else s=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),r.preventDefault();t.quill.focus();var c=t.quill.selection.getRange(),f=o(c,1)[0];if(null!=t.handlers[n])t.handlers[n].call(t,s);else if(a.default.query(n).prototype instanceof a.default.Embed){if(!(s=prompt("Enter "+n)))return;t.quill.updateContents((new i.default).retain(f.index).delete(f.length).insert(d({},n,s)),l.default.sources.USER)}else t.quill.format(n,s,l.default.sources.USER);t.update(f)})),this.controls.push([n,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);this.controls.forEach((function(n){var r=o(n,2),i=r[0],a=r[1];if("SELECT"===a.tagName){var l=void 0;if(null==e)l=null;else if(null==t[i])l=a.querySelector("option[selected]");else if(!Array.isArray(t[i])){var s=t[i];"string"==typeof s&&(s=s.replace(/\"/g,'\\"')),l=a.querySelector('option[value="'+s+'"]')}null==l?(a.value="",a.selectedIndex=-1):l.selected=!0}else if(null==e)a.classList.remove("ql-active");else if(a.hasAttribute("value")){var u=t[i]===a.getAttribute("value")||null!=t[i]&&t[i].toString()===a.getAttribute("value")||null==t[i]&&!a.getAttribute("value");a.classList.toggle("ql-active",u)}else a.classList.toggle("ql-active",null!=t[i])}))}}]),t}(u.default);function v(e,t,n){var o=document.createElement("button");o.setAttribute("type","button"),o.classList.add("ql-"+t),null!=n&&(o.value=n),e.appendChild(o)}function y(e,t){Array.isArray(t[0])||(t=[t]),t.forEach((function(t){var n=document.createElement("span");n.classList.add("ql-formats"),t.forEach((function(e){if("string"==typeof e)v(n,e);else{var t=Object.keys(e)[0],o=e[t];Array.isArray(o)?b(n,t,o):v(n,t,o)}})),e.appendChild(n)}))}function b(e,t,n){var o=document.createElement("select");o.classList.add("ql-"+t),n.forEach((function(e){var t=document.createElement("option");!1!==e?t.setAttribute("value",e):t.setAttribute("selected","selected"),o.appendChild(t)})),e.appendChild(o)}m.DEFAULTS={},m.DEFAULTS={container:null,handlers:{clean:function(){var e=this,t=this.quill.getSelection();if(null!=t)if(0==t.length){var n=this.quill.getFormat();Object.keys(n).forEach((function(t){null!=a.default.query(t,a.default.Scope.INLINE)&&e.quill.format(t,!1)}))}else this.quill.removeFormat(t,l.default.sources.USER)},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",l.default.sources.USER):!e&&"right"===t&&this.quill.format("align",!1,l.default.sources.USER),this.quill.format("direction",e,l.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),o=parseInt(n.indent||0);if("+1"===e||"-1"===e){var r="+1"===e?1:-1;"rtl"===n.direction&&(r*=-1),this.quill.format("indent",o+r,l.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,l.default.sources.USER)},list:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,l.default.sources.USER):this.quill.format("list","unchecked",l.default.sources.USER):this.quill.format("list",e,l.default.sources.USER)}}},t.default=m,t.addControls=y},function(e,t){e.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(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){function t(e,n){a(this,t);var o=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.label.innerHTML=n,o.container.classList.add("ql-color-picker"),[].slice.call(o.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(e){e.classList.add("ql-primary")})),o}return s(t,e),o(t,[{key:"buildItem",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"buildItem",this).call(this,e);return n.style.backgroundColor=e.getAttribute("value")||"",n}},{key:"selectItem",value:function(e,n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n);var o=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";o&&("line"===o.tagName?o.style.stroke=i:o.style.fill=i)}}]),t}(i(n(28)).default);t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){function t(e,n){a(this,t);var o=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.container.classList.add("ql-icon-picker"),[].forEach.call(o.container.querySelectorAll(".ql-picker-item"),(function(e){e.innerHTML=n[e.getAttribute("data-value")||""]})),o.defaultItem=o.container.querySelector(".ql-selected"),o.selectItem(o.defaultItem),o}return s(t,e),o(t,[{key:"selectItem",value:function(e,n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}(i(n(28)).default);t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(t,n){var o=this;r(this,e),this.quill=t,this.boundsContainer=n||document.body,this.root=t.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(e,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(e){var t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=t+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var o=this.boundsContainer.getBoundingClientRect(),r=this.root.getBoundingClientRect(),i=0;if(r.right>o.right&&(i=o.right-r.right,this.root.style.left=t+i+"px"),r.left<o.left&&(i=o.left-r.left,this.root.style.left=t+i+"px"),r.bottom>o.bottom){var a=r.bottom-r.top,l=e.bottom-e.top+a;this.root.style.top=n-l+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=p(n(3)),l=p(n(8)),s=n(43),u=p(s),c=p(n(27)),d=n(15),f=p(n(41));function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],y=function(e){function t(e,n){h(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=v);var o=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.quill.container.classList.add("ql-snow"),o}return m(t,e),i(t,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow"),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),f.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),f.default),this.tooltip=new b(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(t,n){e.handlers.link.call(e,!n.format.link)}))}}]),t}(u.default);y.DEFAULTS=(0,a.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){if(e){var t=this.quill.getSelection();if(null==t||0==t.length)return;var n=this.quill.getText(t);/^\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(e){function t(e,n){h(this,t);var o=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.preview=o.root.querySelector("a.ql-preview"),o}return m(t,e),i(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",(function(t){e.root.classList.contains("ql-editing")?e.save():e.edit("link",e.preview.textContent),t.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(function(t){if(null!=e.linkRange){var n=e.linkRange;e.restoreFocus(),e.quill.formatText(n,"link",!1,l.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()})),this.quill.on(l.default.events.SELECTION_CHANGE,(function(t,n,r){if(null!=t){if(0===t.length&&r===l.default.sources.USER){var i=e.quill.scroll.descendant(c.default,t.index),a=o(i,2),s=a[0],u=a[1];if(null!=s){e.linkRange=new d.Range(t.index-u,s.length());var f=c.default.formats(s.domNode);return e.preview.textContent=f,e.preview.setAttribute("href",f),e.show(),void e.position(e.quill.getBounds(e.linkRange))}}else delete e.linkRange;e.hide()}}))}},{key:"show",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}(s.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(""),t.default=y},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=D(n(29)),r=n(36),i=n(38),a=n(64),l=D(n(65)),s=D(n(66)),u=n(67),c=D(u),d=n(37),f=n(26),p=n(39),h=n(40),g=D(n(56)),m=D(n(68)),v=D(n(27)),y=D(n(69)),b=D(n(70)),w=D(n(71)),x=D(n(72)),_=D(n(73)),k=n(13),E=D(k),C=D(n(74)),O=D(n(75)),S=D(n(57)),N=D(n(41)),j=D(n(28)),T=D(n(59)),P=D(n(60)),M=D(n(61)),A=D(n(108)),R=D(n(62));function D(e){return e&&e.__esModule?e:{default:e}}o.default.register({"attributors/attribute/direction":i.DirectionAttribute,"attributors/class/align":r.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":f.ColorClass,"attributors/class/direction":i.DirectionClass,"attributors/class/font":p.FontClass,"attributors/class/size":h.SizeClass,"attributors/style/align":r.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":f.ColorStyle,"attributors/style/direction":i.DirectionStyle,"attributors/style/font":p.FontStyle,"attributors/style/size":h.SizeStyle},!0),o.default.register({"formats/align":r.AlignClass,"formats/direction":i.DirectionClass,"formats/indent":a.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":f.ColorStyle,"formats/font":p.FontClass,"formats/size":h.SizeClass,"formats/blockquote":l.default,"formats/code-block":E.default,"formats/header":s.default,"formats/list":c.default,"formats/bold":g.default,"formats/code":k.Code,"formats/italic":m.default,"formats/link":v.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":w.default,"formats/image":x.default,"formats/video":_.default,"formats/list/item":u.ListItem,"modules/formula":C.default,"modules/syntax":O.default,"modules/toolbar":S.default,"themes/bubble":A.default,"themes/snow":R.default,"ui/icons":N.default,"ui/picker":j.default,"ui/icon-picker":P.default,"ui/color-picker":T.default,"ui/tooltip":M.default},!0),t.default=o.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=a(n(0));function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){function t(){return l(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),o(t,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var o=this.value(e)||0;n="+1"===n?o+1:o-1}return 0===n?(this.remove(e),!0):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,n)}},{key:"canAdd",value:function(e,n){return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,n)||r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(n))}},{key:"value",value:function(e){return parseInt(r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}(i.default.Attributor.Class),d=new c("indent","ql-indent",{scope:i.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=d},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(o(n(4)).default);l.blotName="blockquote",l.tagName="blockquote",t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),o(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}(r(n(4)).default);s.blotName="header",s.tagName=["H1","H2","H3","H4","H5","H6"],t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=s(n(0)),a=s(n(4)),l=s(n(25));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function t(){return c(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return f(t,e),o(t,[{key:"format",value:function(e,n){e!==h.blotName||n?r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n):this.replaceWith(i.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(e,n){return this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName?(this.parent.replaceWith(e,n),this):(this.parent.unwrap(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e,n))}}],[{key:"formats",value:function(e){return e.tagName===this.tagName?void 0:r(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}(a.default);p.blotName="list-item",p.tagName="LI";var h=function(e){function t(e){c(this,t);var n=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=function(t){if(t.target.parentNode===e){var o=n.statics.formats(e),r=i.default.find(t.target);"checked"===o?r.format("list","unchecked"):"unchecked"===o&&r.format("list","checked")}};return e.addEventListener("touchstart",o),e.addEventListener("mousedown",o),n}return f(t,e),o(t,null,[{key:"create",value:function(e){var n="ordered"===e?"OL":"UL",o=r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return("checked"===e||"unchecked"===e)&&o.setAttribute("data-checked","checked"===e),o}},{key:"formats",value:function(e){return"OL"===e.tagName?"ordered":"UL"===e.tagName?e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),o(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return u({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(e,n){if(e instanceof p)r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var o=null==n?this.length():n.offset(this),i=this.split(o);i.parent.insertBefore(e,i)}}},{key:"optimize",value:function(e){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);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(e){if(e.statics.blotName!==this.statics.blotName){var n=i.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(l.default);h.blotName="list",h.scope=i.default.Scope.BLOCK_BLOT,h.tagName=["OL","UL"],h.defaultChild="list-item",h.allowedChildren=[p],t.ListItem=p,t.default=h},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(o(n(56)).default);l.blotName="italic",l.tagName=["EM","I"],t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){function t(){return a(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e)}},{key:"formats",value:function(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}}]),t}(i(n(6)).default);u.blotName="script",u.tagName=["SUB","SUP"],t.default=u},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(o(n(6)).default);l.blotName="strike",l.tagName="S",t.default=l},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(o(n(6)).default);l.blotName="underline",l.tagName="U",t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=l(n(0)),a=n(27);function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=["alt","height","width"],f=function(e){function t(){return s(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,e),o(t,[{key:"format",value:function(e,n){d.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return d.reduce((function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t}),{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,a.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(i.default.Embed);f.blotName="image",f.tagName="IMG",t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=n(4),a=l(n(27));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=["height","width"],f=function(e){function t(){return s(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,e),o(t,[{key:"format",value:function(e,n){d.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return d.reduce((function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t}),{})}},{key:"sanitize",value:function(e){return a.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(i.BlockEmbed);f.blotName="video",f.className="ql-video",f.tagName="IFRAME",t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=s(n(35)),a=s(n(5)),l=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),o(t,null,[{key:"create",value:function(e){var n=r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&(window.katex.render(e,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",e)),n}},{key:"value",value:function(e){return e.getAttribute("data-value")}}]),t}(i.default);f.blotName="formula",f.className="ql-formula",f.tagName="SPAN";var p=function(e){function t(){u(this,t);var e=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return e}return d(t,e),o(t,null,[{key:"register",value:function(){a.default.register(f,!0)}}]),t}(l.default);t.FormulaBlot=f,t.default=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=s(n(0)),a=s(n(5)),l=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),o(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e)}},{key:"highlight",value:function(e){var t=this.domNode.textContent;this.cachedText!==t&&((t.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(s(n(13)).default);f.className="ql-syntax";var p=new i.default.Attributor.Class("token","hljs",{scope:i.default.Scope.INLINE}),h=function(e){function t(e,n){u(this,t);var o=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,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 r=null;return o.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(r),r=setTimeout((function(){o.highlight(),r=null}),o.options.interval)})),o.highlight(),o}return d(t,e),o(t,null,[{key:"register",value:function(){a.default.register(p,!0),a.default.register(f,!0)}}]),o(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(f).forEach((function(t){t.highlight(e.options.highlight)})),this.quill.update(a.default.sources.SILENT),null!=t&&this.quill.setSelection(t,a.default.sources.SILENT)}}}]),t}(l.default);h.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=f,t.CodeToken=p,t.default=h},function(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var o=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=d(n(3)),a=d(n(8)),l=n(43),s=d(l),u=n(15),c=d(n(41));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],m=function(e){function t(e,n){f(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=g);var o=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.quill.container.classList.add("ql-bubble"),o}return h(t,e),r(t,[{key:"extendToolbar",value:function(e){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),c.default)}}]),t}(s.default);m.DEFAULTS=(0,i.default)(!0,{},s.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(e){function t(e,n){f(this,t);var o=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.quill.on(a.default.events.EDITOR_CHANGE,(function(e,t,n,r){if(e===a.default.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&r===a.default.sources.USER){o.show(),o.root.style.left="0px",o.root.style.width="",o.root.style.width=o.root.offsetWidth+"px";var i=o.quill.getLines(t.index,t.length);if(1===i.length)o.position(o.quill.getBounds(t));else{var l=i[i.length-1],s=o.quill.getIndex(l),c=Math.min(l.length()-1,t.index+t.length-s),d=o.quill.getBounds(new u.Range(s,c));o.position(d)}}else document.activeElement!==o.textbox&&o.quill.hasFocus()&&o.hide()})),o}return h(t,e),r(t,[{key:"listen",value:function(){var e=this;o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){e.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),t}(l.BaseTooltip);v.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(""),t.BubbleTooltip=v,t.default=m},function(e,t,n){e.exports=n(63)}]).default,hh=$t&&$t.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),gh=$t&&$t.__assign||function(){return gh=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},gh.apply(this,arguments)},mh=$t&&$t.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),r=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,l=i.length;a<l;a++,r++)o[r]=i[a];return o},vh=$t&&$t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},yh=vh(t),bh=vh(pe),wh=vh(dh),xh=vh(ph),_h=function(e){function t(t){var n=e.call(this,t)||this;n.dirtyProps=["modules","formats","bounds","theme","children"],n.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],n.state={generation:0},n.selection=null,n.onEditorChange=function(e,t,o,r){var i,a,l,s;"text-change"===e?null===(a=(i=n).onEditorChangeText)||void 0===a||a.call(i,n.editor.root.innerHTML,t,r,n.unprivilegedEditor):"selection-change"===e&&(null===(s=(l=n).onEditorChangeSelection)||void 0===s||s.call(l,t,r,n.unprivilegedEditor))};var o=n.isControlled()?t.value:t.defaultValue;return n.value=o??"",n}return hh(t,e),t.prototype.validateProps=function(e){var t;if(yh.default.Children.count(e.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(yh.default.Children.count(e.children)&&"textarea"===(null===(t=yh.default.Children.only(e.children))||void 0===t?void 0:t.type))throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.");if(this.lastDeltaChangeSet&&e.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},t.prototype.shouldComponentUpdate=function(e,t){var n=this;if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){var o=this.getEditorContents(),r=e.value??"";this.isEqualValue(r,o)||this.setEditorContents(this.editor,r)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),mh(this.cleanProps,this.dirtyProps).some((function(t){return!wh.default(e[t],n.props[t])}))},t.prototype.shouldComponentRegenerate=function(e){var t=this;return this.dirtyProps.some((function(n){return!wh.default(e[n],t.props[n])}))},t.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},t.prototype.componentWillUnmount=function(){this.destroyEditor()},t.prototype.componentDidUpdate=function(e,t){var n=this;if(this.editor&&this.shouldComponentRegenerate(e)){var o=this.editor.getContents(),r=this.editor.getSelection();this.regenerationSnapshot={delta:o,selection:r},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==t.generation){var i=this.regenerationSnapshot,a=(o=i.delta,i.selection);delete this.regenerationSnapshot,this.instantiateEditor();var l=this.editor;l.setContents(o),kh((function(){return n.setEditorSelection(l,a)}))}},t.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},t.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},t.prototype.isControlled=function(){return"value"in this.props},t.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},t.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},t.prototype.createEditor=function(e,t){var n=new xh.default(e,t);return null!=t.tabIndex&&this.setEditorTabIndex(n,t.tabIndex),this.hookEditor(n),n},t.prototype.hookEditor=function(e){this.unprivilegedEditor=this.makeUnprivilegedEditor(e),e.on("editor-change",this.onEditorChange)},t.prototype.unhookEditor=function(e){e.off("editor-change",this.onEditorChange)},t.prototype.getEditorContents=function(){return this.value},t.prototype.getEditorSelection=function(){return this.selection},t.prototype.isDelta=function(e){return e&&e.ops},t.prototype.isEqualValue=function(e,t){return this.isDelta(e)&&this.isDelta(t)?wh.default(e.ops,t.ops):wh.default(e,t)},t.prototype.setEditorContents=function(e,t){var n=this;this.value=t;var o=this.getEditorSelection();"string"==typeof t?e.setContents(e.clipboard.convert(t)):e.setContents(t),kh((function(){return n.setEditorSelection(e,o)}))},t.prototype.setEditorSelection=function(e,t){if(this.selection=t,t){var n=e.getLength();t.index=Math.max(0,Math.min(t.index,n-1)),t.length=Math.max(0,Math.min(t.length,n-1-t.index)),e.setSelection(t)}},t.prototype.setEditorTabIndex=function(e,t){var n,o;null!==(o=null===(n=e)||void 0===n?void 0:n.scroll)&&void 0!==o&&o.domNode&&(e.scroll.domNode.tabIndex=t)},t.prototype.setEditorReadOnly=function(e,t){t?e.disable():e.enable()},t.prototype.makeUnprivilegedEditor=function(e){var t=e;return{getHTML:function(){return t.root.innerHTML},getLength:t.getLength.bind(t),getText:t.getText.bind(t),getContents:t.getContents.bind(t),getSelection:t.getSelection.bind(t),getBounds:t.getBounds.bind(t)}},t.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var e=bh.default.findDOMNode(this.editingArea);if(!e)throw new Error("Cannot find element for editing area");if(3===e.nodeType)throw new Error("Editing area cannot be a text node");return e},t.prototype.renderEditingArea=function(){var e=this,t=this.props,n=t.children,o=t.preserveWhitespace,r={key:this.state.generation,ref:function(t){e.editingArea=t}};return yh.default.Children.count(n)?yh.default.cloneElement(yh.default.Children.only(n),r):o?yh.default.createElement("pre",gh({},r)):yh.default.createElement("div",gh({},r))},t.prototype.render=function(){var e;return yh.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(e=this.props.className,e??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},t.prototype.onEditorChangeText=function(e,t,n,o){var r,i;if(this.editor){var a=this.isDelta(this.value)?o.getContents():o.getHTML();a!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=a,null===(i=(r=this.props).onChange)||void 0===i||i.call(r,e,t,n,o))}},t.prototype.onEditorChangeSelection=function(e,t,n){var o,r,i,a,l,s;if(this.editor){var u=this.getEditorSelection(),c=!u&&e,d=u&&!e;wh.default(e,u)||(this.selection=e,null===(r=(o=this.props).onChangeSelection)||void 0===r||r.call(o,e,t,n),c?null===(a=(i=this.props).onFocus)||void 0===a||a.call(i,e,t,n):d&&(null===(s=(l=this.props).onBlur)||void 0===s||s.call(l,u,t,n)))}},t.prototype.focus=function(){this.editor&&this.editor.focus()},t.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},t.displayName="React Quill",t.Quill=xh.default,t.defaultProps={theme:"snow",modules:{},readOnly:!1},t}(yh.default.Component);function kh(e){Promise.resolve().then(e)}const Eh=Kt(_h),Ch="_viewMode_10b0t_1",Oh="_editMode_10b0t_2",Sh="_text-label_10b0t_24",Nh="_error-message_10b0t_28",jh={toolbar:[[{font:[]}],[{size:[]}],["bold","italic","underline","strike","blockquote"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"}]]},Th=["size","font","bold","italic","underline","strike","blockquote","list","bullet","indent"],Ph=({dataTest:e,...t})=>en.jsxs(en.Fragment,{children:[t.label&&en.jsx("span",{className:Io(Sh),"data-test":`label-${e}`,children:t.label}),t.disabled?en.jsx(Eh,{...t,className:Io(Ch,t.className),readOnly:!0,modules:{toolbar:!1},"data-test":e}):en.jsx(Eh,{...t,className:Io(Oh,t.className),modules:{...jh,...t.modules},formats:{...Th,...t.formats},"data-test":e}),(t.is_error?"error":t.is_warning?"warning":!!t.isRequired||null)&&en.jsx("span",{className:Nh,"data-test":`error-${e}`,children:t.error?t.error:"error"})]}),Mh=({dataTest:e,allowClear:t,...n})=>en.jsx(T,{...n,"data-test":e,value:n.value,IconComponent:e=>en.jsx(oa,{...e,icon:"material-symbols:expand-more-rounded",width:24,height:24,className:Io(e.className,"select-custom-icon")}),endAdornment:t&&n.value?en.jsx("div",{className:"hover:bg-gama-100 duration-300 absolute right-8 p-[2px] rounded-full flex items-center justify-center",onClick:()=>{var e;null==(e=n.onChange)||e.call(n,{target:{value:""}},null)},children:en.jsx($a,{width:18,height:18})}):null,sx:{".MuiOutlinedInput-notchedOutline":{borderColor:"var(--colors-delta-500) !important"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"var(--colors-gama-500) !important"},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:"var(--colors-error-500) !important"},"& .MuiInputBase-colorPrimary.Mui-error fieldset":{borderColor:"var(--colors-error-500) !important"},"&.Mui-focused::after":{borderColor:"var(--colors-gama-500) !important"},"& .select-custom-icon":{marginTop:"-3.5px !important"},...n.sx}}),Ah=e=>en.jsx(P,{...e,sx:{"&.MuiMenuItem-root":{fontSize:"14px !important"},"&.Mui-selected":{backgroundColor:"var(--colors-gama-50) !important"}},children:e.children});function Rh({dataTest:e,...t}){return en.jsx(M,{...t,className:Io("!text-sm",t.className),popupIcon:t.popupIcon||en.jsx(oa,{icon:"material-symbols:expand-more-rounded",width:24,height:24,className:Io("select-custom-icon")}),"data-test":e,PaperComponent:({children:t})=>en.jsx(A,{"data-test":`paper-${e}`,sx:{"& ul":{padding:"0 !important"},"& .MuiAutocomplete-option.Mui-focused":{background:"var(--colors-delta-50) !important"},"& li[aria-selected=true]":{background:"var(--colors-gama-50) !important"},"& li[aria-selected=true].MuiAutocomplete-option.Mui-focused":{background:"var(--colors-gama-50) !important"}},children:t}),sx:{...t.sx,"& .MuiOutlinedInput-notchedOutline":{borderColor:"var(--colors-gama-500) !important"},"& .select-custom-icon":{marginTop:"-0.5px !important"},"& .MuiInputBase-inputSizeSmall":{minHeight:"23px !important"}}})}const Dh=({dataTest:e,...t})=>{var n,o,r;return en.jsx(R,{...t,"data-test":e,classes:{...t.classes},slotProps:{...t.slotProps,thumb:{className:Io("w-4 h-4","before:shadow-none","vertical"===t.orientation?"ml-0 mb-1":"ml-1",t.disabled||!t.value?"bg-delta-200":"bg-gama-600"),...null==(n=t.slotProps)?void 0:n.thumb},rail:{className:"bg-delta-200",...null==(o=t.slotProps)?void 0:o.rail},markLabel:{className:Io("text-delta-600 text-sm font-semibold ml-1","vertical"===t.orientation&&"mb-1"),...null==(r=t.slotProps)?void 0:r.markLabel}},sx:{...t.sx,"& .MuiSlider-track":{backgroundColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)",borderColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)"},"& .MuiSlider-mark":{backgroundColor:"white",border:"1px solid var(--colors-gray-200)",borderRadius:"50%",height:"8px",width:"8px","&.MuiSlider-markActive":{backgroundColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)",border:"1px solid",borderColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)",opacity:1}}}})},Ih=({dataTest:e,...t})=>en.jsx(D,{...t,"data-test":e,sx:{"& .MuiButtonBase-root.Mui-checked":{color:"var(--colors-gama-500) !important"},"& .Mui-disabled .MuiSwitch-thumb":{backgroundColor:"var(--colors-gama-200) !important"},"& .MuiSwitch-thumb":{backgroundColor:"var(--colors-gama-500) !important"},"& .MuiSwitch-input:not(:checked) ~ .MuiSwitch-thumb":{backgroundColor:"var(--colors-gray-10) !important"},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:"var(--colors-gama-200) !important"},"& .PrivateSwitchBase-input.MuiSwitch-input":{height:"100% !important"}}}),Lh=({dataTest:e,...t})=>en.jsx(I,{...t,"data-test":e,sx:{"&":{color:"var(--colors-gray-200)"},"& input":{height:"100% !important",width:"100% !important"},"&.Mui-checked":{color:"var(--colors-gama-500)"}}}),qh=({dataTest:e,...t})=>en.jsx(L,{"data-test":e,...t}),Fh=({children:e,onClick:t,className:n,dataTest:o,style:r})=>en.jsx("div",{className:Io("styled-label",n),style:r,onClick:t,"data-test":o,children:e});const Vh={code:"en-GB",formatDistance:gt,formatLong:{date:mt({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:mt({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:mt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:bt,localize:xt,match:Et,options:{weekStartsOn:1,firstWeekContainsDate:4}};var zh=function(){return zh=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},zh.apply(this,arguments)};function Bh(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function Hh(e){return"multiple"===e.mode}function Uh(e){return"range"===e.mode}function Wh(e){return"single"===e.mode}var Gh={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var $h=Object.freeze({__proto__:null,formatCaption:function(e,t){return Pt(e,"LLLL y",t)},formatDay:function(e,t){return Pt(e,"d",t)},formatMonthCaption:function(e,t){return Pt(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Pt(e,"cccccc",t)},formatYearCaption:function(e,t){return Pt(e,"yyyy",t)}}),Kh=Object.freeze({__proto__:null,labelDay:function(e,t,n){return Pt(e,"do MMMM (EEEE)",n)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return Pt(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var Yh=g(void 0);function Zh(e){var n,o,r=e.initialProps,i={captionLayout:"buttons",classNames:Gh,formatters:$h,labels:Kh,locale:Ct,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:new Date,mode:"default"},a=function(e){var t=e.fromYear,n=e.toYear,o=e.fromMonth,r=e.toMonth,i=e.fromDate,a=e.toDate;return o?i=qe(o):t&&(i=new Date(t,0,1)),r?a=Le(r):n&&(a=new Date(n,11,31)),{fromDate:i?Ne(i):void 0,toDate:a?Ne(a):void 0}}(r),l=a.fromDate,s=a.toDate,u=null!==(n=r.captionLayout)&&void 0!==n?n:i.captionLayout;"buttons"!==u&&(!l||!s)&&(u="buttons"),(Wh(r)||Hh(r)||Uh(r))&&(o=r.onSelect);var c=zh(zh(zh({},i),r),{captionLayout:u,classNames:zh(zh({},i.classNames),r.classNames),components:zh({},r.components),formatters:zh(zh({},i.formatters),r.formatters),fromDate:l,labels:zh(zh({},i.labels),r.labels),mode:r.mode||i.mode,modifiers:zh(zh({},i.modifiers),r.modifiers),modifiersClassNames:zh(zh({},i.modifiersClassNames),r.modifiersClassNames),onSelect:o,styles:zh(zh({},i.styles),r.styles),toDate:s});return t.createElement(Yh.Provider,{value:c},e.children)}function Xh(){var e=s(Yh);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function Qh(e){var n=Xh(),o=n.locale,r=n.classNames,i=n.styles,a=n.formatters.formatCaption;return t.createElement("div",{className:r.caption_label,style:i.caption_label,"aria-live":"polite",role:"presentation",id:e.id},a(e.displayMonth,{locale:o}))}function Jh(e){return t.createElement("svg",zh({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e),t.createElement("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"}))}function eg(e){var n,o,r=e.onChange,i=e.value,a=e.children,l=e.caption,s=e.className,u=e.style,c=Xh(),d=null!==(o=null===(n=c.components)||void 0===n?void 0:n.IconDropdown)&&void 0!==o?o:Jh;return t.createElement("div",{className:s,style:u},t.createElement("span",{className:c.classNames.vhidden},e["aria-label"]),t.createElement("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:i,onChange:r},a),t.createElement("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true"},l,t.createElement(d,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})))}function tg(e){var n,o=Xh(),r=o.fromDate,i=o.toDate,a=o.styles,l=o.locale,s=o.formatters.formatMonthCaption,u=o.classNames,c=o.components,d=o.labels.labelMonthDropdown;if(!r)return t.createElement(t.Fragment,null);if(!i)return t.createElement(t.Fragment,null);var f=[];if(function(e,t){ye(2,arguments);var n=be(e),o=be(t);return n.getFullYear()===o.getFullYear()}(r,i))for(var p=qe(r),h=r.getMonth();h<=i.getMonth();h++)f.push(Bt(p,h));else for(p=qe(new Date),h=0;h<=11;h++)f.push(Bt(p,h));var g=null!==(n=null==c?void 0:c.Dropdown)&&void 0!==n?n:eg;return t.createElement(g,{name:"months","aria-label":d(),className:u.dropdown_month,style:a.dropdown_month,onChange:function(t){var n=Number(t.target.value),o=Bt(qe(e.displayMonth),n);e.onChange(o)},value:e.displayMonth.getMonth(),caption:s(e.displayMonth,{locale:l})},f.map((function(e){return t.createElement("option",{key:e.getMonth(),value:e.getMonth()},s(e,{locale:l}))})))}function ng(e){var n,o=e.displayMonth,r=Xh(),i=r.fromDate,a=r.toDate,l=r.locale,s=r.styles,u=r.classNames,c=r.components,d=r.formatters.formatYearCaption,f=r.labels.labelYearDropdown,p=[];if(!i)return t.createElement(t.Fragment,null);if(!a)return t.createElement(t.Fragment,null);for(var h=i.getFullYear(),g=a.getFullYear(),m=h;m<=g;m++)p.push(Ut(Fe(new Date),m));var v=null!==(n=null==c?void 0:c.Dropdown)&&void 0!==n?n:eg;return t.createElement(v,{name:"years","aria-label":f(),className:u.dropdown_year,style:s.dropdown_year,onChange:function(t){var n=Ut(qe(o),Number(t.target.value));e.onChange(n)},value:o.getFullYear(),caption:d(o,{locale:l})},p.map((function(e){return t.createElement("option",{key:e.getFullYear(),value:e.getFullYear()},d(e,{locale:l}))})))}function og(){var e=Xh(),t=function(e){var t=e.month,n=e.defaultMonth,o=e.today,r=t||n||o||new Date,i=e.toDate,a=e.fromDate,l=e.numberOfMonths,s=void 0===l?1:l;return i&&De(i,r)<0&&(r=xe(i,-1*(s-1))),a&&De(r,a)<0&&(r=a),qe(r)}(e),n=function(e,t){var n=f(e),o=n[0];return[void 0===t?o:t,n[1]]}(t,e.month),o=n[0],r=n[1];return[o,function(t){var n;if(!e.disableNavigation){var o=qe(t);r(o),null===(n=e.onMonthChange)||void 0===n||n.call(e,o)}}]}var rg=g(void 0);function ig(e){var n=Xh(),o=og(),r=o[0],i=o[1],a=function(e,t){for(var n=t.reverseMonths,o=t.numberOfMonths,r=qe(e),i=De(qe(xe(r,o)),r),a=[],l=0;l<i;l++){var s=xe(r,l);a.push(s)}return n&&(a=a.reverse()),a}(r,n),l=function(e,t){if(!t.disableNavigation){var n=t.toDate,o=t.pagedNavigation,r=t.numberOfMonths,i=void 0===r?1:r,a=o?i:1,l=qe(e);if(!n)return xe(l,a);if(!(De(n,e)<i))return xe(l,a)}}(r,n),s=function(e,t){if(!t.disableNavigation){var n=t.fromDate,o=t.pagedNavigation,r=t.numberOfMonths,i=o?void 0===r?1:r:1,a=qe(e);if(!n)return xe(a,-i);if(!(De(a,n)<=0))return xe(a,-i)}}(r,n),u=function(e){return a.some((function(t){return Vt(e,t)}))},c={currentMonth:r,displayMonths:a,goToMonth:i,goToDate:function(e,t){u(e)||(t&&qt(e,t)?i(xe(e,1+-1*n.numberOfMonths)):i(e))},previousMonth:s,nextMonth:l,isDateDisplayed:u};return t.createElement(rg.Provider,{value:c},e.children)}function ag(){var e=s(rg);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function lg(e){var n,o=Xh(),r=o.classNames,i=o.styles,a=o.components,l=ag().goToMonth,s=function(t){l(xe(t,e.displayIndex?-e.displayIndex:0))},u=null!==(n=null==a?void 0:a.CaptionLabel)&&void 0!==n?n:Qh,c=t.createElement(u,{id:e.id,displayMonth:e.displayMonth});return t.createElement("div",{className:r.caption_dropdowns,style:i.caption_dropdowns},t.createElement("div",{className:r.vhidden},c),t.createElement(tg,{onChange:s,displayMonth:e.displayMonth}),t.createElement(ng,{onChange:s,displayMonth:e.displayMonth}))}function sg(e){return t.createElement("svg",zh({width:"16px",height:"16px",viewBox:"0 0 120 120"},e),t.createElement("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"}))}function ug(e){return t.createElement("svg",zh({width:"16px",height:"16px",viewBox:"0 0 120 120"},e),t.createElement("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"}))}var cg=n((function(e,n){var o=Xh(),r=o.classNames,i=o.styles,a=[r.button_reset,r.button];e.className&&a.push(e.className);var l=a.join(" "),s=zh(zh({},i.button_reset),i.button);return e.style&&Object.assign(s,e.style),t.createElement("button",zh({},e,{ref:n,type:"button",className:l,style:s}))}));function dg(e){var n,o,r=Xh(),i=r.dir,a=r.locale,l=r.classNames,s=r.styles,u=r.labels,c=u.labelPrevious,d=u.labelNext,f=r.components;if(!e.nextMonth&&!e.previousMonth)return t.createElement(t.Fragment,null);var p=c(e.previousMonth,{locale:a}),h=[l.nav_button,l.nav_button_previous].join(" "),g=d(e.nextMonth,{locale:a}),m=[l.nav_button,l.nav_button_next].join(" "),v=null!==(n=null==f?void 0:f.IconRight)&&void 0!==n?n:ug,y=null!==(o=null==f?void 0:f.IconLeft)&&void 0!==o?o:sg;return t.createElement("div",{className:l.nav,style:s.nav},!e.hidePrevious&&t.createElement(cg,{name:"previous-month","aria-label":p,className:h,style:s.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick},"rtl"===i?t.createElement(v,{className:l.nav_icon,style:s.nav_icon}):t.createElement(y,{className:l.nav_icon,style:s.nav_icon})),!e.hideNext&&t.createElement(cg,{name:"next-month","aria-label":g,className:m,style:s.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick},"rtl"===i?t.createElement(y,{className:l.nav_icon,style:s.nav_icon}):t.createElement(v,{className:l.nav_icon,style:s.nav_icon})))}function fg(e){var n=Xh().numberOfMonths,o=ag(),r=o.previousMonth,i=o.nextMonth,a=o.goToMonth,l=o.displayMonths,s=l.findIndex((function(t){return Vt(e.displayMonth,t)})),u=0===s,c=s===l.length-1,d=n>1&&(u||!c),f=n>1&&(c||!u);return t.createElement(dg,{displayMonth:e.displayMonth,hideNext:d,hidePrevious:f,nextMonth:i,previousMonth:r,onPreviousClick:function(){r&&a(r)},onNextClick:function(){i&&a(i)}})}function pg(e){var n,o,r=Xh(),i=r.classNames,a=r.disableNavigation,l=r.styles,s=r.captionLayout,u=r.components,c=null!==(n=null==u?void 0:u.CaptionLabel)&&void 0!==n?n:Qh;return o=a?t.createElement(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===s?t.createElement(lg,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===s?t.createElement(t.Fragment,null,t.createElement(lg,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),t.createElement(fg,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})):t.createElement(t.Fragment,null,t.createElement(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),t.createElement(fg,{displayMonth:e.displayMonth,id:e.id})),t.createElement("div",{className:i.caption,style:l.caption},o)}function hg(e){var n=Xh(),o=n.footer,r=n.styles,i=n.classNames.tfoot;return o?t.createElement("tfoot",{className:i,style:r.tfoot},t.createElement("tr",null,t.createElement("td",{colSpan:8},o))):t.createElement(t.Fragment,null)}function gg(){var e=Xh(),n=e.classNames,o=e.styles,r=e.showWeekNumber,i=e.locale,a=e.weekStartsOn,l=e.ISOWeek,s=e.formatters.formatWeekdayName,u=e.labels.labelWeekday,c=function(e,t,n){for(var o=n?Ce(new Date):Ee(new Date,{locale:e,weekStartsOn:t}),r=[],i=0;i<7;i++){var a=we(o,i);r.push(a)}return r}(i,a,l);return t.createElement("tr",{style:o.head_row,className:n.head_row},r&&t.createElement("td",{style:o.head_cell,className:n.head_cell}),c.map((function(e,r){return t.createElement("th",{key:r,scope:"col",className:n.head_cell,style:o.head_cell,"aria-label":u(e,{locale:i})},s(e,{locale:i}))})))}function mg(){var e,n=Xh(),o=n.classNames,r=n.styles,i=n.components,a=null!==(e=null==i?void 0:i.HeadRow)&&void 0!==e?e:gg;return t.createElement("thead",{style:r.head,className:o.head},t.createElement(a,null))}function vg(e){var n=Xh(),o=n.locale,r=n.formatters.formatDay;return t.createElement(t.Fragment,null,r(e.date,{locale:o}))}var yg=g(void 0);function bg(e){if(!Hh(e.initialProps)){return t.createElement(yg.Provider,{value:{selected:void 0,modifiers:{disabled:[]}}},e.children)}return t.createElement(wg,{initialProps:e.initialProps,children:e.children})}function wg(e){var n=e.initialProps,o=e.children,r=n.selected,i=n.min,a=n.max,l={disabled:[]};r&&l.disabled.push((function(e){var t=a&&r.length>a-1,n=r.some((function(t){return Ae(t,e)}));return!(!t||n)}));var s={selected:r,onDayClick:function(e,t,o){var l,s;if((null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,o),!!(!t.selected||!i||(null==r?void 0:r.length)!==i))&&!!(t.selected||!a||(null==r?void 0:r.length)!==a)){var u=r?Bh([],r,!0):[];if(t.selected){var c=u.findIndex((function(t){return Ae(e,t)}));u.splice(c,1)}else u.push(e);null===(s=n.onSelect)||void 0===s||s.call(n,u,e,t,o)}},modifiers:l};return t.createElement(yg.Provider,{value:s},o)}function xg(){var e=s(yg);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var _g,kg=g(void 0);function Eg(e){if(!Uh(e.initialProps)){return t.createElement(kg.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}}},e.children)}return t.createElement(Cg,{initialProps:e.initialProps,children:e.children})}function Cg(e){var n=e.initialProps,o=e.children,r=n.selected,i=r||{},a=i.from,l=i.to,s=n.min,u=n.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(a?(c.range_start=[a],l?(c.range_end=[l],Ae(a,l)||(c.range_middle=[{after:a,before:l}])):c.range_end=[a]):l&&(c.range_start=[l],c.range_end=[l]),s&&(a&&!l&&c.disabled.push({after:zt(a,s-1),before:we(a,s-1)}),a&&l&&c.disabled.push({after:a,before:we(a,s-1)}),!a&&l&&c.disabled.push({after:zt(l,s-1),before:we(l,s-1)})),u){if(a&&!l&&(c.disabled.push({before:we(a,1-u)}),c.disabled.push({after:we(a,u-1)})),a&&l){var d=u-(Te(l,a)+1);c.disabled.push({before:zt(a,d)}),c.disabled.push({after:we(l,d)})}!a&&l&&(c.disabled.push({before:we(l,1-u)}),c.disabled.push({after:we(l,u-1)}))}return t.createElement(kg.Provider,{value:{selected:r,onDayClick:function(e,t,o){var i,a;null===(i=n.onDayClick)||void 0===i||i.call(n,e,t,o);var l=function(e,t){var n=t||{},o=n.from,r=n.to;return o&&r?Ae(r,e)&&Ae(o,e)?void 0:Ae(r,e)?{from:r,to:void 0}:Ae(o,e)?void 0:Lt(o,e)?{from:e,to:r}:{from:o,to:e}:r?Lt(e,r)?{from:r,to:e}:{from:e,to:r}:o?qt(e,o)?{from:e,to:o}:{from:o,to:e}:{from:e,to:void 0}}(e,r);null===(a=n.onSelect)||void 0===a||a.call(n,l,e,t,o)},modifiers:c}},o)}function Og(){var e=s(kg);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Sg(e){return Array.isArray(e)?Bh([],e,!0):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(_g||(_g={}));var Ng=_g.Selected,jg=_g.Disabled,Tg=_g.Hidden,Pg=_g.Today,Mg=_g.RangeEnd,Ag=_g.RangeMiddle,Rg=_g.RangeStart,Dg=_g.Outside;var Ig=g(void 0);function Lg(e){var n=Xh(),o=function(e,t,n){var o,r=((o={})[Ng]=Sg(e.selected),o[jg]=Sg(e.disabled),o[Tg]=Sg(e.hidden),o[Pg]=[e.today],o[Mg]=[],o[Ag]=[],o[Rg]=[],o[Dg]=[],o);return e.fromDate&&r[jg].push({before:e.fromDate}),e.toDate&&r[jg].push({after:e.toDate}),Hh(e)?r[jg]=r[jg].concat(t.modifiers[jg]):Uh(e)&&(r[jg]=r[jg].concat(n.modifiers[jg]),r[Rg]=n.modifiers[Rg],r[Ag]=n.modifiers[Ag],r[Mg]=n.modifiers[Mg]),r}(n,xg(),Og()),r=function(e){var t={};return Object.entries(e).forEach((function(e){var n=e[0],o=e[1];t[n]=Sg(o)})),t}(n.modifiers),i=zh(zh({},o),r);return t.createElement(Ig.Provider,{value:i},e.children)}function qg(){var e=s(Ig);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function Fg(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(function(e){return Re(e)}(t))return Ae(e,t);if(function(e){return Array.isArray(e)&&e.every(Re)}(t))return t.includes(e);if(function(e){return!(!e||"object"!=typeof e||!("from"in e))}(t))return function(e,t){var n,o=t.from,r=t.to;return o&&r?(Te(r,o)<0&&(o=(n=[r,o])[0],r=n[1]),Te(e,o)>=0&&Te(r,e)>=0):r?Ae(r,e):!!o&&Ae(o,e)}(e,t);if(function(e){return!(!e||"object"!=typeof e||!("dayOfWeek"in e))}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return!!(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var n=Te(t.before,e)>0,o=Te(t.after,e)<0;return Lt(t.before,t.after)?o&&n:n||o}return function(e){return!(!e||"object"!=typeof e||!("after"in e))}(t)?Te(e,t.after)>0:function(e){return!(!e||"object"!=typeof e||!("before"in e))}(t)?Te(t.before,e)>0:"function"==typeof t&&t(e)}))}function Vg(e,t,n){var o=Object.keys(t).reduce((function(n,o){var r=t[o];return Fg(e,r)&&n.push(o),n}),[]),r={};return o.forEach((function(e){return r[e]=!0})),n&&!Vt(e,n)&&(r.outside=!0),r}var zg=365;function Bg(e,t){var n=t.moveBy,o=t.direction,r=t.context,i=t.modifiers,a=t.retry,l=void 0===a?{count:0,lastFocused:e}:a,s=r.weekStartsOn,u=r.fromDate,c=r.toDate,d=r.locale,f={day:we,week:Pe,month:xe,year:Me,startOfWeek:function(e){return r.ISOWeek?Ce(e):Ee(e,{locale:d,weekStartsOn:s})},endOfWeek:function(e){return r.ISOWeek?ze(e):Ve(e,{locale:d,weekStartsOn:s})}}[n](e,"after"===o?1:-1);"before"===o&&u?f=function(e){var t,n;if(ye(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==me(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=be(e);(void 0===n||n<t||isNaN(Number(t)))&&(n=t)})),n||new Date(NaN)}([u,f]):"after"===o&&c&&(f=function(e){var t,n;if(ye(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==me(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=be(e);(void 0===n||n>t||isNaN(t.getDate()))&&(n=t)})),n||new Date(NaN)}([c,f]));var p=!0;if(i){var h=Vg(f,i);p=!h.disabled&&!h.hidden}return p?f:l.count>zg?l.lastFocused:Bg(f,{moveBy:n,direction:o,context:r,modifiers:i,retry:zh(zh({},l),{count:l.count+1})})}var Hg=g(void 0);function Ug(e){var n=ag(),o=qg(),r=f(),i=r[0],a=r[1],l=f(),s=l[0],u=l[1],c=function(e,t){for(var n,o,r=qe(e[0]),i=Le(e[e.length-1]),a=r;a<=i;){var l=Vg(a,t);if(l.disabled||l.hidden)a=we(a,1);else{if(l.selected)return a;l.today&&!o&&(o=a),n||(n=a),a=we(a,1)}}return o||n}(n.displayMonths,o),d=i??(s&&n.isDateDisplayed(s))?s:c,p=function(e){a(e)},h=Xh(),g=function(e,t){if(i){var r=Bg(i,{moveBy:e,direction:t,context:h,modifiers:o});Ae(i,r)||(n.goToDate(r,i),p(r))}},m={focusedDay:i,focusTarget:d,blur:function(){u(i),a(void 0)},focus:p,focusDayAfter:function(){return g("day","after")},focusDayBefore:function(){return g("day","before")},focusWeekAfter:function(){return g("week","after")},focusWeekBefore:function(){return g("week","before")},focusMonthBefore:function(){return g("month","before")},focusMonthAfter:function(){return g("month","after")},focusYearBefore:function(){return g("year","before")},focusYearAfter:function(){return g("year","after")},focusStartOfWeek:function(){return g("startOfWeek","before")},focusEndOfWeek:function(){return g("endOfWeek","after")}};return t.createElement(Hg.Provider,{value:m},e.children)}function Wg(){var e=s(Hg);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var Gg=g(void 0);function $g(e){if(!Wh(e.initialProps)){return t.createElement(Gg.Provider,{value:{selected:void 0}},e.children)}return t.createElement(Kg,{initialProps:e.initialProps,children:e.children})}function Kg(e){var n=e.initialProps,o=e.children,r={selected:n.selected,onDayClick:function(e,t,o){var r,i,a;null===(r=n.onDayClick)||void 0===r||r.call(n,e,t,o),!t.selected||n.required?null===(a=n.onSelect)||void 0===a||a.call(n,e,e,t,o):null===(i=n.onSelect)||void 0===i||i.call(n,void 0,e,t,o)}};return t.createElement(Gg.Provider,{value:r},o)}function Yg(){var e=s(Gg);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function Zg(e,t){var n=[e.classNames.day];return Object.keys(t).forEach((function(t){var o=e.modifiersClassNames[t];if(o)n.push(o);else if(function(e){return Object.values(_g).includes(e)}(t)){var r=e.classNames["day_".concat(t)];r&&n.push(r)}})),n}function Xg(e,n,o){var r,a,l,s=Xh(),u=Wg(),c=function(e,t){return Vg(e,qg(),t)}(e,n),d=function(e,t){var n=Xh(),o=Yg(),r=xg(),i=Og(),a=Wg(),l=a.focusDayAfter,s=a.focusDayBefore,u=a.focusWeekAfter,c=a.focusWeekBefore,d=a.blur,f=a.focus,p=a.focusMonthBefore,h=a.focusMonthAfter,g=a.focusYearBefore,m=a.focusYearAfter,v=a.focusStartOfWeek,y=a.focusEndOfWeek;return{onClick:function(a){var l,s,u,c;Wh(n)?null===(l=o.onDayClick)||void 0===l||l.call(o,e,t,a):Hh(n)?null===(s=r.onDayClick)||void 0===s||s.call(r,e,t,a):Uh(n)?null===(u=i.onDayClick)||void 0===u||u.call(i,e,t,a):null===(c=n.onDayClick)||void 0===c||c.call(n,e,t,a)},onFocus:function(o){var r;f(e),null===(r=n.onDayFocus)||void 0===r||r.call(n,e,t,o)},onBlur:function(o){var r;d(),null===(r=n.onDayBlur)||void 0===r||r.call(n,e,t,o)},onKeyDown:function(o){var r;switch(o.key){case"ArrowLeft":o.preventDefault(),o.stopPropagation(),"rtl"===n.dir?l():s();break;case"ArrowRight":o.preventDefault(),o.stopPropagation(),"rtl"===n.dir?s():l();break;case"ArrowDown":o.preventDefault(),o.stopPropagation(),u();break;case"ArrowUp":o.preventDefault(),o.stopPropagation(),c();break;case"PageUp":o.preventDefault(),o.stopPropagation(),o.shiftKey?g():p();break;case"PageDown":o.preventDefault(),o.stopPropagation(),o.shiftKey?m():h();break;case"Home":o.preventDefault(),o.stopPropagation(),v();break;case"End":o.preventDefault(),o.stopPropagation(),y()}null===(r=n.onDayKeyDown)||void 0===r||r.call(n,e,t,o)},onKeyUp:function(o){var r;null===(r=n.onDayKeyUp)||void 0===r||r.call(n,e,t,o)},onMouseEnter:function(o){var r;null===(r=n.onDayMouseEnter)||void 0===r||r.call(n,e,t,o)},onMouseLeave:function(o){var r;null===(r=n.onDayMouseLeave)||void 0===r||r.call(n,e,t,o)},onPointerEnter:function(o){var r;null===(r=n.onDayPointerEnter)||void 0===r||r.call(n,e,t,o)},onPointerLeave:function(o){var r;null===(r=n.onDayPointerLeave)||void 0===r||r.call(n,e,t,o)},onTouchCancel:function(o){var r;null===(r=n.onDayTouchCancel)||void 0===r||r.call(n,e,t,o)},onTouchEnd:function(o){var r;null===(r=n.onDayTouchEnd)||void 0===r||r.call(n,e,t,o)},onTouchMove:function(o){var r;null===(r=n.onDayTouchMove)||void 0===r||r.call(n,e,t,o)},onTouchStart:function(o){var r;null===(r=n.onDayTouchStart)||void 0===r||r.call(n,e,t,o)}}}(e,c),f=function(){var e=Xh(),t=Yg(),n=xg(),o=Og();return Wh(e)?t.selected:Hh(e)?n.selected:Uh(e)?o.selected:void 0}(),p=!(!s.onDayClick&&"default"===s.mode);i((function(){var t;c.outside||u.focusedDay&&p&&Ae(u.focusedDay,e)&&(null===(t=o.current)||void 0===t||t.focus())}),[u.focusedDay,e,o,p,c.outside]);var h=Zg(s,c).join(" "),g=function(e,t){var n=zh({},e.styles.day);return Object.keys(t).forEach((function(t){var o;n=zh(zh({},n),null===(o=e.modifiersStyles)||void 0===o?void 0:o[t])})),n}(s,c),m=!!(c.outside&&!s.showOutsideDays||c.hidden),v=null!==(l=null===(a=s.components)||void 0===a?void 0:a.DayContent)&&void 0!==l?l:vg,y={style:g,className:h,children:t.createElement(v,{date:e,displayMonth:n,activeModifiers:c}),role:"gridcell"},b=u.focusTarget&&Ae(u.focusTarget,e)&&!c.outside,w=u.focusedDay&&Ae(u.focusedDay,e),x=zh(zh(zh({},y),((r={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,r.tabIndex=w||b?0:-1,r)),d);return{isButton:p,isHidden:m,activeModifiers:c,selectedDays:f,buttonProps:x,divProps:y}}function Qg(e){var n=o(null),r=Xg(e.date,e.displayMonth,n);return r.isHidden?t.createElement("div",{role:"gridcell"}):r.isButton?t.createElement(cg,zh({name:"day",ref:n},r.buttonProps)):t.createElement("div",zh({},r.divProps))}function Jg(e){var n=e.number,o=e.dates,r=Xh(),i=r.onWeekNumberClick,a=r.styles,l=r.classNames,s=r.locale,u=r.labels.labelWeekNumber,c=(0,r.formatters.formatWeekNumber)(Number(n),{locale:s});if(!i)return t.createElement("span",{className:l.weeknumber,style:a.weeknumber},c);var d=u(Number(n),{locale:s});return t.createElement(cg,{name:"week-number","aria-label":d,className:l.weeknumber,style:a.weeknumber,onClick:function(e){i(n,o,e)}},c)}function em(e){var n,o,r,i=Xh(),a=i.styles,l=i.classNames,s=i.showWeekNumber,u=i.components,c=null!==(n=null==u?void 0:u.Day)&&void 0!==n?n:Qg,d=null!==(o=null==u?void 0:u.WeekNumber)&&void 0!==o?o:Jg;return s&&(r=t.createElement("td",{className:l.cell,style:a.cell},t.createElement(d,{number:e.weekNumber,dates:e.dates}))),t.createElement("tr",{className:l.row,style:a.row},r,e.dates.map((function(n){return t.createElement("td",{className:l.cell,style:a.cell,key:At(n),role:"presentation"},t.createElement(c,{displayMonth:e.displayMonth,date:n}))})))}function tm(e,t,n){for(var o=null!=n&&n.ISOWeek?ze(t):Ve(t,n),r=null!=n&&n.ISOWeek?Ce(e):Ee(e,n),i=Te(o,r),a=[],l=0;l<=i;l++)a.push(we(r,l));var s=a.reduce((function(e,t){var o=null!=n&&n.ISOWeek?function(e){ye(1,arguments);var t=be(e),n=Ce(t).getTime()-Oe(t).getTime();return Math.round(n/Mt)+1}(t):function(e,t){ye(1,arguments);var n=be(e),o=Ee(n,t).getTime()-Rt(n,t).getTime();return Math.round(o/Dt)+1}(t,n),r=e.find((function(e){return e.weekNumber===o}));return r?(r.dates.push(t),e):(e.push({weekNumber:o,dates:[t]}),e)}),[]);return s}function nm(e){var n,o,r,i=Xh(),a=i.locale,l=i.classNames,s=i.styles,u=i.hideHead,c=i.fixedWeeks,d=i.components,f=i.weekStartsOn,p=i.firstWeekContainsDate,h=i.ISOWeek,g=function(e,t){var n=tm(qe(e),Le(e),t);if(null!=t&&t.useFixedWeeks){var o=It(e,t);if(o<6){var r=n[n.length-1],i=r.dates[r.dates.length-1],a=Pe(i,6-o),l=tm(Pe(i,1),a,t);n.push.apply(n,l)}}return n}(e.displayMonth,{useFixedWeeks:!!c,ISOWeek:h,locale:a,weekStartsOn:f,firstWeekContainsDate:p}),m=null!==(n=null==d?void 0:d.Head)&&void 0!==n?n:mg,v=null!==(o=null==d?void 0:d.Row)&&void 0!==o?o:em,y=null!==(r=null==d?void 0:d.Footer)&&void 0!==r?r:hg;return t.createElement("table",{id:e.id,className:l.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"]},!u&&t.createElement(m,null),t.createElement("tbody",{className:l.tbody,style:s.tbody},g.map((function(n){return t.createElement(v,{displayMonth:e.displayMonth,key:n.weekNumber,dates:n.dates,weekNumber:n.weekNumber})}))),t.createElement(y,{displayMonth:e.displayMonth}))}var om=typeof window<"u"&&window.document&&window.document.createElement?e.useLayoutEffect:e.useEffect,rm=!1,im=0;function am(){return"react-day-picker-".concat(++im)}function lm(n){var o,r,i=Xh(),a=i.dir,l=i.classNames,s=i.styles,u=i.components,c=ag().displayMonths,d=function(t){var n,o=t??(rm?am():null),r=e.useState(o),i=r[0],a=r[1];return om((function(){null===i&&a(am())}),[]),e.useEffect((function(){!1===rm&&(rm=!0)}),[]),null!==(n=t??i)&&void 0!==n?n:void 0}(i.id?"".concat(i.id,"-").concat(n.displayIndex):void 0),f=i.id?"".concat(i.id,"-grid-").concat(n.displayIndex):void 0,p=[l.month],h=s.month,g=0===n.displayIndex,m=n.displayIndex===c.length-1,v=!g&&!m;"rtl"===a&&(m=(o=[g,m])[0],g=o[1]),g&&(p.push(l.caption_start),h=zh(zh({},h),s.caption_start)),m&&(p.push(l.caption_end),h=zh(zh({},h),s.caption_end)),v&&(p.push(l.caption_between),h=zh(zh({},h),s.caption_between));var y=null!==(r=null==u?void 0:u.Caption)&&void 0!==r?r:pg;return t.createElement("div",{key:n.displayIndex,className:p.join(" "),style:h},t.createElement(y,{id:d,displayMonth:n.displayMonth,displayIndex:n.displayIndex}),t.createElement(nm,{id:f,"aria-labelledby":d,displayMonth:n.displayMonth}))}function sm(e){var n=e.initialProps,o=Xh(),r=Wg(),a=ag(),l=f(!1),s=l[0],u=l[1];i((function(){o.initialFocus&&r.focusTarget&&(s||(r.focus(r.focusTarget),u(!0)))}),[o.initialFocus,s,r.focus,r.focusTarget,r]);var c=[o.classNames.root,o.className];o.numberOfMonths>1&&c.push(o.classNames.multiple_months),o.showWeekNumber&&c.push(o.classNames.with_weeknumber);var d=zh(zh({},o.styles.root),o.style),p=Object.keys(n).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var o;return zh(zh({},e),((o={})[t]=n[t],o))}),{});return t.createElement("div",zh({className:c.join(" "),style:d,dir:o.dir,id:o.id},p),t.createElement("div",{className:o.classNames.months,style:o.styles.months},a.displayMonths.map((function(e,n){return t.createElement(lm,{key:n,displayIndex:n,displayMonth:e})}))))}function um(e){var n=e.children,o=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["children"]);return t.createElement(Zh,{initialProps:o},t.createElement(ig,null,t.createElement($g,{initialProps:o},t.createElement(bg,{initialProps:o},t.createElement(Eg,{initialProps:o},t.createElement(Lg,null,t.createElement(Ug,null,n)))))))}function cm(e){return t.createElement(um,zh({},e),t.createElement(sm,{initialProps:e}))}const dm="object"==typeof global&&global&&global.Object===Object&&global;var fm="object"==typeof self&&self&&self.Object===Object&&self;const pm=(dm||fm||Function("return this")()).Symbol;var hm=Object.prototype,gm=hm.hasOwnProperty,mm=hm.toString,vm=pm?pm.toStringTag:void 0;var ym=Object.prototype.toString;var bm="[object Null]",wm="[object Undefined]",xm=pm?pm.toStringTag:void 0;function _m(e){return null==e?void 0===e?wm:bm:xm&&xm in Object(e)?function(e){var t=gm.call(e,vm),n=e[vm];try{e[vm]=void 0;var o=!0}catch{}var r=mm.call(e);return o&&(t?e[vm]=n:delete e[vm]),r}(e):function(e){return ym.call(e)}(e)}var km="[object Symbol]";const Em=Array.isArray;var Cm=1/0,Om=pm?pm.prototype:void 0,Sm=Om?Om.toString:void 0;function Nm(e){if("string"==typeof e)return e;if(Em(e))return function(e,t){for(var n=-1,o=null==e?0:e.length,r=Array(o);++n<o;)r[n]=t(e[n],n,e);return r}(e,Nm)+"";if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&_m(e)==km}(e))return Sm?Sm.call(e):"";var t=e+"";return"0"==t&&1/e==-Cm?"-0":t}function jm(e){return null==e?"":Nm(e)}function Tm(e,t,n){var o=e.length;return n=void 0===n?o:n,!t&&n>=o?e:function(e,t,n){var o=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(r);++o<r;)i[o]=e[o+t];return i}(e,t,n)}var Pm=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Mm(e){return Pm.test(e)}var Am="\\ud800-\\udfff",Rm="["+Am+"]",Dm="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Im="\\ud83c[\\udffb-\\udfff]",Lm="[^"+Am+"]",qm="(?:\\ud83c[\\udde6-\\uddff]){2}",Fm="[\\ud800-\\udbff][\\udc00-\\udfff]",Vm="(?:"+Dm+"|"+Im+")"+"?",zm="[\\ufe0e\\ufe0f]?",Bm=zm+Vm+("(?:\\u200d(?:"+[Lm,qm,Fm].join("|")+")"+zm+Vm+")*"),Hm="(?:"+[Lm+Dm+"?",Dm,qm,Fm,Rm].join("|")+")",Um=RegExp(Im+"(?="+Im+")|"+Hm+Bm,"g");function Wm(e){return Mm(e)?function(e){return e.match(Um)||[]}(e):function(e){return e.split("")}(e)}var Gm=function(e){return function(t){var n=Mm(t=jm(t))?Wm(t):void 0,o=n?n[0]:t.charAt(0),r=n?Tm(n,1).join(""):t.slice(1);return o[e]()+r}}("toUpperCase");const $m=Gm;function Km(e){return $m(jm(e).toLowerCase())}const Ym=({onClose:e,isNb:t,selected:n,removeSelection:o,setMonth:r,month:i,onClear:a})=>{const{goToMonth:l,nextMonth:s,previousMonth:u}=ag(),c=Em(n)?!n.length:Re(n)?!n:!function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}(n)||!function(e){for(var t=-1,n=null==e?0:e.length,o=0,r=[];++t<n;){var i=e[t];i&&(r[o++]=i)}return r}(Object.values(n)).length;return en.jsxs("div",{style:{marginTop:"8px",display:"flex",justifyContent:"space-between",marginRight:"12px"},children:[en.jsx(jl,{variant:"text",onClick:e=>{a?a():o(e),r(new Date(Date.now()))},size:"small",disabled:c,dataTest:"select-today",style:{minWidth:"60px"},startIcon:en.jsx(oa,{icon:"ph:eraser-duotone",width:24,height:24})}),en.jsxs("div",{className:"rdp-custom-caption-navigation",style:{display:"flex",gap:"4px"},children:[en.jsx(jl,{variant:"outlined",size:"small",dataTest:"previous-month",disabled:!u,onClick:()=>u&&l(u),startIcon:en.jsx(ca,{})}),en.jsx(jl,{size:"small",disabled:i&&Vt(new Date(Date.now()),i),onClick:()=>{r(new Date(Date.now()))},variant:"outlined",dataTest:"select-today",children:t?"I dag":"Today"}),en.jsx(jl,{variant:"outlined",size:"small",dataTest:"next-month",disabled:!s,onClick:()=>s&&l(s),startIcon:en.jsx(ua,{})})]}),en.jsx(jl,{size:"small",onClick:t=>{null==e||e(t,"backdropClick")},dataTest:"select-today",style:{minWidth:"60px"},children:t?"Velg":"Select"})]})};function Zm(e){const{month:t}=e;return en.jsx("div",{className:"rdp-custom-caption",style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"30px",marginLeft:"16px"},children:t&&en.jsx(pg,{displayMonth:t})})}const Xm=e=>en.jsx(q,{...e,sx:{...e.sx,"& label.MuiInputLabel-shrink":{background:"white !important",color:"var(--colors-delta-500) !important"},"& label.MuiInputLabel-shrink.Mui-focused":{background:"white !important",color:"var(--colors-gama-500) !important"},"& label.MuiInputLabel-shrink.Mui-error.Mui-focused":{background:"white !important",color:"var(--colors-red-500) !important"}}}),Qm=e=>{const{caption:t,children:n}=e,{goToMonth:o}=ag(),{month:r}=Xh(),i=null==n?void 0:n.map((e=>({id:e.props.value,label:e.props.children})));return en.jsx(Xm,{style:{width:"105px",marginLeft:"-5px"},children:en.jsx(Mh,{dataTest:"StyledCalendarPickerSelectMonth",size:"small",variant:"standard",value:t,onChange:e=>{var t;const n=e.target.value,a=null==(t=i.find((e=>e.label===n)))?void 0:t.id;r&&!isNaN(Number(a))&&o(Bt(r,Number(a)))},MenuProps:{className:"styled-calendar-picker-select-period-menu"},children:null==i?void 0:i.map((e=>en.jsx(Ah,{value:e.label,children:Km(e.label)},e.id)))})})},Jm=e=>{const{caption:t,children:n}=e,{goToMonth:o}=ag(),{month:r}=Xh(),i=null==n?void 0:n.map((e=>({id:e.props.value,label:e.props.children})));return en.jsx(Xm,{style:{width:"70px",marginLeft:"5px"},children:en.jsx(Mh,{dataTest:"StyledCalendarPickerSelectYear",size:"small",variant:"standard",value:t,onChange:e=>{var t;const n=e.target.value,a=null==(t=i.find((e=>e.label===n)))?void 0:t.id;r&&!isNaN(Number(a))&&o(Ut(r,Number(a)))},MenuProps:{className:"styled-calendar-picker-select-period-menu"},children:null==i?void 0:i.map((e=>en.jsx(Ah,{value:e.label,children:e.label},e.id)))})})},ev=({datePickerProps:e,popoverProps:t,positionAbove:n})=>{const{showOutsideDays:o=!0,locale:r,selected:i,numberOfMonths:a,disabledDays:l,onClear:s}=e,{open:u,anchorEl:c,onClose:d}=t,[p,h]=f(new Date(Date.now())),g="nb"===(null==r?void 0:r.code),m=(a||1)<2;return en.jsx(F,{open:u,anchorEl:c,onClose:d,anchorOrigin:{vertical:n?"top":50,horizontal:"left"},transformOrigin:{vertical:n?"bottom":"top",horizontal:"left"},children:en.jsx(cm,{disabled:l,month:p,onMonthChange:e=>{h(e)},captionLayout:"dropdown",locale:r||Vh,fromYear:2e3,toYear:2050,"data-test":"calendar-picker",showWeekNumber:!0,showOutsideDays:o,fixedWeeks:!0,className:"styled-calendar-day-picker",classNames:{months:"months",month:"month",caption:"caption",caption_label:"caption_label",nav:"nav",nav_button:"nav_button",nav_button_previous:"nav_button_previous",nav_button_next:"nav_button_next",head_row:"head_row",head_cell:"head_cell",row:"row",cell:"cell",day:"day",day_today:"day_today",day_selected:"day_selected",day_outside:"day_outside",day_disabled:"day_disabled",day_range_middle:"day_range_middle",day_hidden:"day_hidden",caption_end:m?"":"caption_end"},components:{Caption:e=>en.jsx(Zm,{...e,setMonth:h,month:p,isNb:g}),Dropdown:e=>"months"===e.name?en.jsx(Qm,{...e}):en.jsx(Jm,{...e})},footer:en.jsx(Ym,{onClose:d,isNb:g,selected:i,removeSelection:t=>{var n;return i&&(null==(n=null==e?void 0:e.onSelect)?void 0:n.call(e,void 0,new Date(Date.now()),{},t))},setMonth:h,month:p,onClear:s}),...e})})},tv=(e,t="dd.MM.yy")=>e?Pt(e,t):"",nv=e=>{var t,n,o;const{dataTest:r,placeholder:i,disabled:a,onClick:l,inputClassName:s,onClear:u,allowClear:c,dateFormat:d,label:f}=e;if("range"!==e.mode)return null;const p=tv(null==(t=e.selected)?void 0:t.from,d),h=tv(null==(n=e.selected)?void 0:n.to,d),g=null!=(o=e.selected)&&o.from?e.selected.to?`${p} - ${h}`:p:"";return en.jsx(Tu,{dataTest:r,placeholder:i,label:f,size:"small",onClick:e=>!a&&l(e),InputProps:{endAdornment:en.jsx(wl,{width:24,height:24})},value:g,disabled:!!a,className:s,style:{width:"240px"},allowClear:c,onClear:()=>{null==u||u()}})},ov=e=>{var t,n;const{dataTest:o,className:r,inputClassName:i,disabled:a,placeholderFrom:l,placeholderTo:s,dateFormat:u,onClick:c,labelFrom:d,labelTo:f}=e;if("range"!==e.mode)return null;const p=tv(null==(t=e.selected)?void 0:t.from,u),h=tv(null==(n=e.selected)?void 0:n.to,u);return en.jsxs("div",{"data-test":o,className:Io(r,"styled-date-picker-input-range-compact",a&&"range-compact-disabled"),onClick:e=>!a&&c(e),children:[en.jsx(Tu,{label:d,autoComplete:"off",size:"small",dataTest:"styled-date-picker-input-range-from",placeholder:l,value:p,disabled:!!a,className:i,style:{width:"144px"},InputProps:{endAdornment:en.jsx(wl,{width:24,height:24})}}),en.jsx(Tu,{label:f,autoComplete:"off",dataTest:"styled-date-picker-input-range-to",size:"small",placeholder:s,value:h,disabled:!!a,className:i,style:{width:"144px"},InputProps:{endAdornment:en.jsx(wl,{width:24,height:24})}})]})},rv=e=>{const{dataTest:t,placeholder:n,disabled:o,onClick:r,inputClassName:i,onClear:a,allowClear:l,dateFormat:s,error:u=!1,helperText:c}=e;return"single"!==e.mode?null:en.jsx(Tu,{dataTest:t,placeholder:n,size:"small",onClick:e=>!o&&r(e),InputProps:{endAdornment:en.jsx(wl,{width:24,height:24})},value:tv(e.selected,s),disabled:!!o,className:i,style:{width:"144px"},allowClear:l,onClear:()=>{null==a||a()},label:e.label,error:u,helperText:c})},iv=e=>{const t="range"===e.mode&&!e.compact,n="range"===e.mode&&e.compact;return t?en.jsx(nv,{...e,onClick:e.onClick}):n?en.jsx(ov,{...e,onClick:e.onClick}):en.jsx(rv,{...e,onClick:e.onClick})},av=e=>{const[t,n]=f(null),[o,r]=f(!1);return en.jsxs(en.Fragment,{children:[en.jsx(iv,{...e,onClick:e=>{n(e.currentTarget),((e,t)=>{const n=window.innerHeight,o=e.currentTarget.getBoundingClientRect(),r=o.top,i=n-o.bottom;t(i<300&&r>i)})(e,r)}}),en.jsx(ev,{datePickerProps:{...e},popoverProps:{open:!!t,anchorEl:t,onClose:()=>{n(null)}},positionAbove:o})]})};function lv(t){if(typeof window>"u")return t;const n=e.useRef(null);return e.useLayoutEffect((()=>{n.current=t})),e.useCallback(((...e)=>{var t;null===(t=n.current)||void 0===t||t.call(n,...e)}),[])}const sv={};const uv={isOpen:!1,setAnchorElUsed:!1,anchorEl:void 0,anchorPosition:void 0,hovered:!1,focused:!1,_openEventType:null,_childPopupState:null,_deferNextOpen:!1,_deferNextClose:!1};function cv({parentPopupState:e,popupId:t,variant:n,disableAutoFocus:a}){const l=o(!0);i((()=>(l.current=!0,()=>{l.current=!1})),[]);const[s,u]=f(uv),c=r((e=>{l.current&&u(e)}),[]),d=r((e=>c((t=>({...t,setAnchorElUsed:!0,anchorEl:e??void 0})))),[]),p=lv((e=>(s.isOpen?m(e):h(e),s))),h=lv((t=>{const o=t instanceof Element?void 0:t,r=t instanceof Element?t:(null==t?void 0:t.currentTarget)instanceof Element?t.currentTarget:void 0;if("touchstart"===(null==o?void 0:o.type))return void c((e=>({...e,_deferNextOpen:!0})));const i=null==o?void 0:o.clientX,a=null==o?void 0:o.clientY,l="number"==typeof i&&"number"==typeof a?{left:i,top:a}:void 0,s=i=>{if(!t&&!i.setAnchorElUsed&&"dialog"!==n&&function(e,t){sv[e]||(sv[e]=!0,console.error("[material-ui-popup-state] WARNING",t))}("missingEventOrAnchorEl","eventOrAnchorEl should be defined if setAnchorEl is not used"),e){if(!e.isOpen)return i;setTimeout((()=>e._setChildPopupState(x)))}const a={...i,isOpen:!0,anchorPosition:l,hovered:"mouseover"===(null==o?void 0:o.type)||i.hovered,focused:"focus"===(null==o?void 0:o.type)||i.focused,_openEventType:null==o?void 0:o.type};return null!=o&&o.currentTarget?i.setAnchorElUsed||(a.anchorEl=null==o?void 0:o.currentTarget):r&&(a.anchorEl=r),a};c((e=>e._deferNextOpen?(setTimeout((()=>c(s)),0),{...e,_deferNextOpen:!1}):s(e)))})),g=t=>{const{_childPopupState:n}=t;return setTimeout((()=>{null==n||n.close(),null==e||e._setChildPopupState(null)})),{...t,isOpen:!1,hovered:!1,focused:!1}},m=lv((e=>{const t=e instanceof Element?void 0:e;"touchstart"!==(null==t?void 0:t.type)?c((e=>e._deferNextClose?(setTimeout((()=>c(g)),0),{...e,_deferNextClose:!1}):g(e))):c((e=>({...e,_deferNextClose:!0})))})),v=r(((e,t)=>{e?h(t):m(t)}),[]),y=lv((e=>{const{relatedTarget:t}=e;c((e=>!e.hovered||t instanceof Element&&hv(t,x)?e:e.focused?{...e,hovered:!1}:g(e)))})),b=lv((e=>{if(!e)return;const{relatedTarget:t}=e;c((e=>!e.focused||t instanceof Element&&hv(t,x)?e:e.hovered?{...e,focused:!1}:g(e)))})),w=r((e=>c((t=>({...t,_childPopupState:e})))),[]),x={...s,setAnchorEl:d,popupId:t,variant:n,open:h,close:m,toggle:p,setOpen:v,onBlur:b,onMouseLeave:y,disableAutoFocus:a??!(!s.hovered&&!s.focused),_setChildPopupState:w};return x}function dv({isOpen:e,popupId:t,variant:n}){return{..."popover"===n?{"aria-haspopup":!0,"aria-controls":e&&null!=t?t:void 0}:"popper"===n?{"aria-describedby":e&&null!=t?t:void 0}:void 0}}function fv(e){return{...dv(e),onClick:e.open,onTouchStart:e.open}}function pv({isOpen:e,anchorEl:t,popupId:n,onMouseLeave:o}){return{id:n,anchorEl:t,open:e,onMouseLeave:o}}function hv(e,t){const{anchorEl:n,_childPopupState:o}=t;return gv(n,e)||gv(function(e,{popupId:t}){if(!t)return null;const n="function"==typeof e.getRootNode?e.getRootNode():document;return"function"==typeof n.getElementById?n.getElementById(t):null}(e,t),e)||null!=o&&hv(e,o)}function gv(e,t){if(!e)return!1;for(;t;){if(t===e)return!0;t=t.parentElement}return!1}function mv({children:e,popupId:t,variant:n,parentPopupState:o,disableAutoFocus:r}){return e(cv({popupId:t,variant:n,parentPopupState:o,disableAutoFocus:r}))??null}mv.propTypes={children:de.func.isRequired,popupId:de.string,variant:de.oneOf(["popover","popper"]).isRequired,parentPopupState:de.object,disableAutoFocus:de.bool};const vv=({type:e,value:t,onSelect:n})=>{const o=new Date,r="hours"===e,i=r?24:12,a=r?o.getHours():o.getMinutes();return en.jsx("div",{className:"styled-time-picker-root_column",children:new Array(i).fill(null).map(((e,o)=>{const i=r?o:5*o,l=t&&i===(r?function(e){return ye(1,arguments),be(e).getHours()}(t):function(e){return ye(1,arguments),be(e).getMinutes()}(t)),s=a==i;return en.jsx("div",{className:Io("styled-time-picker-root_cell",l&&"styled-time-picker-root_cell__cell-selected",s&&"styled-time-picker-root_cell__cell-now"),onClick:()=>{n(Ht(t||new Date,r?{hours:i}:{minutes:i}))},children:i.toString().padStart(2,"0")},i)}))})},yv=({value:e,onSelect:t,dataTest:n})=>{const r=o(null);return i((()=>{var e;null==(e=r.current)||e.querySelectorAll("div.styled-time-picker-root_cell__cell-selected").forEach((e=>e.scrollIntoView()))}),[r]),en.jsxs("div",{ref:r,"data-test":n,className:"styled-time-picker-root",children:[en.jsx(vv,{type:"hours",value:e,onSelect:t}),en.jsx(vv,{type:"minutes",value:e,onSelect:t})]})},bv=e=>{const{popupState:t,dataTest:n,value:o,onSelect:r,handleClear:i}=e;return en.jsx(V,{...pv(t),transition:!0,style:{zIndex:"1300",position:"absolute",top:"2px"},children:({TransitionProps:e})=>en.jsx(z,{...e,timeout:350,children:en.jsxs(A,{style:{paddingBottom:"1px"},children:[en.jsx(yv,{dataTest:`${n}-time-picker-body`,value:o,onSelect:r}),en.jsxs("div",{style:{display:"flex",marginTop:"12px",marginBottom:"12px",justifyContent:"space-between"},children:[en.jsx(jl,{variant:"text",onClick:i,size:"small",disabled:!o,dataTest:"select-today",style:{minWidth:"40px",marginLeft:"10px"},startIcon:en.jsx(oa,{icon:"ph:eraser-duotone",width:24,height:24})}),en.jsx(jl,{size:"small",onClick:()=>t.close(),dataTest:"select-time",style:{minWidth:"40px",marginRight:"16px"},startIcon:en.jsx(oa,{icon:"bi:check-lg",width:20,height:20})})]})]})})})},wv=({width:e=20,height:t=20,className:n="",onClick:o,color:r})=>en.jsx(ia,{icon:"mdi:clock-outline",width:e,height:t,className:n,onClick:o,color:r}),xv=({isValidTime:e,error:t=!1,localization:n="en",helperText:o})=>{if(e&&!t)return null;let r=o;return e||(r="en"===n?"Not valid":"Ikke gyldig"),en.jsx("span",{style:{position:"absolute"},children:r})},_v=e=>{const{placeholder:t,disabled:n,inputClassName:o,dataTest:r,width:i,error:a,helperText:l,label:s,locale:u="en",popupState:c,handleChange:d,isValidTime:f,localValue:p}=e;return en.jsx(Tu,{name:"password",autoComplete:"off",type:"text",dataTest:r,placeholder:t,size:"small",error:!f||a,helperText:en.jsx(xv,{isValidTime:f,error:a,localization:u,helperText:l}),onChange:d,InputProps:{endAdornment:en.jsx(wv,{width:24,height:24,onClick:()=>!n&&c.open()})},value:p,sx:{maxWidth:i||130,width:i,minWidth:i},disabled:n,className:o,label:s})},kv=e=>{const{value:t,onSelect:n}=e,[o,r]=f(t?Pt(t,"HH:mm"):""),[i,a]=f(!0),l=e=>{const t=e.target.value;r(t);const o=(e=>{var t,n;const o=e.split(":"),r=Number(o[0]),i=Number(o[1]);if(2==(null==(t=o[0])?void 0:t.length)&&2==(null==(n=o[1])?void 0:n.length)&&r>=0&&r<=23&&i>=0&&i<=59){const e=new Date;return e.setHours(r),e.setMinutes(i),e}return null})(t);n(o||void 0),a(!!o)},s=e=>{n(e),r(e?Pt(e,"HH:mm"):""),a(!0)},u=()=>{n(void 0),r(""),a(!0)};return en.jsx(mv,{variant:"popper",popupId:"time-picker-popper",children:t=>en.jsx(B,{mouseEvent:"onMouseDown",onClickAway:()=>{t.close()},children:en.jsxs("div",{style:{width:"auto",height:"auto",position:"relative"},children:[en.jsx("div",{...fv(t),children:en.jsx(_v,{...e,popupState:t,localValue:o,isValidTime:i,handleChange:l})}),t.isOpen&&en.jsx(bv,{...e,popupState:t,handleClear:u,onSelect:s})]})})})},Ev=e=>en.jsx(H,{...e}),Cv=e=>en.jsx(U,{...e}),Ov=e=>en.jsx(W,{...e}),Sv=e=>en.jsx(G,{...e}),Nv=e=>en.jsx($,{...e}),jv=e=>en.jsx(K,{...e}),Tv=e=>{var t,n;return en.jsx(Y,{...e,classes:{paper:Io("border border-solid border-delta-300 shadow-[0px_2px_4px_0px_rgba(34,_33,_51,_0.15)]",null==(t=e.classes)?void 0:t.paper),list:Io("py-1",null==(n=e.classes)?void 0:n.list),...e.classes}})},Pv=e=>{var t;return en.jsx(P,{...e,classes:{root:Io("px-3 py-2.5",null==(t=e.classes)?void 0:t.root),...e.classes}})},Mv=e=>en.jsx(Z,{...e}),Av=({href:e,disabled:t,size:n="large",dataTest:o,reflink:r,className:i,content:a,...l})=>{let s="styled-link-small";return"large"===n&&(s="styled-link-large"),t?en.jsx("span",{className:Io("styled-link","styled-link-disabled",s,i),children:a}):en.jsx("a",{...l,"data-test":o,ref:r,href:e,className:Io("styled-link",s,i),children:a})},Rv=e=>en.jsx(X,{...e,sx:{"&.MuiTab-textColorPrimary.Mui-selected":{color:"var(--colors-gama-500)"}}}),Dv=e=>en.jsx(Q,{TabIndicatorProps:{style:{background:"var(--colors-gama-500)",color:"var(--colors-gama-500)"}},...e}),Iv=e=>en.jsx(J,{...e}),Lv=e=>en.jsx(ee,{...e,className:Io("flex-row-reverse gap-2.5",e.className),expandIcon:en.jsx(Wa,{width:24,height:24}),sx:{...e.sx,backgroundColor:"transparent !important","& .MuiAccordionSummary-expandIconWrapper.Mui-expanded":{transform:"rotate(180deg)"},"& .MuiAccordionSummary-expandIconWrapper:not(.Mui-expanded)":{transform:"rotate(0deg)"}}}),qv=e=>en.jsx(te,{...e}),Fv="select",Vv="expand-column-id",zv="actions";
|
|
25
|
+
*/typeof self<"u"&&self;var ph=fh.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=109)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),r=n(18),i=n(19),a=n(45),l=n(46),s=n(47),u=n(48),c=n(49),d=n(12),f=n(32),p=n(33),h=n(31),g=n(1),m={Scope:g.Scope,create:g.create,find:g.find,query:g.query,register:g.register,Container:o.default,Format:r.default,Leaf:i.default,Embed:u.default,Scroll:a.default,Block:s.default,Inline:l.default,Text:c.default,Attributor:{Attribute:d.default,Class:f.default,Style:p.default,Store:h.default}};t.default=m},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t="[Parchment] "+t,(n=e.call(this,t)||this).message=t,n.name=n.constructor.name,n}return r(t,e),t}(Error);t.ParchmentError=i;var a,l={},s={},u={},c={};function d(e,t){var n=p(e);if(null==n)throw new i("Unable to create "+e+" blot");var o=n,r=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:o.create(t);return new o(r,t)}function f(e,n){return void 0===n&&(n=!1),null==e?null:null!=e[t.DATA_KEY]?e[t.DATA_KEY].blot:n?f(e.parentNode,n):null}function p(e,t){var n;if(void 0===t&&(t=a.ANY),"string"==typeof e)n=c[e]||l[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof e)e&a.LEVEL&a.BLOCK?n=c.block:e&a.LEVEL&a.INLINE&&(n=c.inline);else if(e instanceof HTMLElement){var o=(e.getAttribute("class")||"").split(/\s+/);for(var r in o)if(n=s[o[r]])break;n=n||u[e.tagName]}return null==n?null:t&a.LEVEL&n.scope&&t&a.TYPE&n.scope?n:null}function h(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>1)return e.map((function(e){return h(e)}));var n=e[0];if("string"!=typeof n.blotName&&"string"!=typeof n.attrName)throw new i("Invalid definition");if("abstract"===n.blotName)throw new i("Cannot register abstract class");return c[n.blotName||n.attrName]=n,"string"==typeof n.keyName?l[n.keyName]=n:(null!=n.className&&(s[n.className]=n),null!=n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map((function(e){return e.toUpperCase()})):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach((function(e){(null==u[e]||null==n.className)&&(u[e]=n)})))),n}t.DATA_KEY="__blot",function(e){e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY"}(a=t.Scope||(t.Scope={})),t.create=d,t.find=f,t.query=p,t.register=h},function(e,t,n){var o=n(51),r=n(11),i=n(3),a=n(20),l=String.fromCharCode(0),s=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};s.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},s.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},s.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},s.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=i(!0,{},e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,"object"!=typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(r(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},s.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},s.prototype.filter=function(e){return this.ops.filter(e)},s.prototype.forEach=function(e){this.ops.forEach(e)},s.prototype.map=function(e){return this.ops.map(e)},s.prototype.partition=function(e){var t=[],n=[];return this.forEach((function(o){(e(o)?t:n).push(o)})),[t,n]},s.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},s.prototype.changeLength=function(){return this.reduce((function(e,t){return t.insert?e+a.length(t):t.delete?e-t.delete:e}),0)},s.prototype.length=function(){return this.reduce((function(e,t){return e+a.length(t)}),0)},s.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var n=[],o=a.iterator(this.ops),r=0;r<t&&o.hasNext();){var i;r<e?i=o.next(e-r):(i=o.next(t-r),n.push(i)),r+=a.length(i)}return new s(n)},s.prototype.compose=function(e){var t=a.iterator(this.ops),n=a.iterator(e.ops),o=[],i=n.peek();if(null!=i&&"number"==typeof i.retain&&null==i.attributes){for(var l=i.retain;"insert"===t.peekType()&&t.peekLength()<=l;)l-=t.peekLength(),o.push(t.next());i.retain-l>0&&n.next(i.retain-l)}for(var u=new s(o);t.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===t.peekType())u.push(t.next());else{var c=Math.min(t.peekLength(),n.peekLength()),d=t.next(c),f=n.next(c);if("number"==typeof f.retain){var p={};"number"==typeof d.retain?p.retain=c:p.insert=d.insert;var h=a.attributes.compose(d.attributes,f.attributes,"number"==typeof d.retain);if(h&&(p.attributes=h),u.push(p),!n.hasNext()&&r(u.ops[u.ops.length-1],p)){var g=new s(t.rest());return u.concat(g).chop()}}else"number"==typeof f.delete&&"number"==typeof d.retain&&u.push(f)}return u.chop()},s.prototype.concat=function(e){var t=new s(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},s.prototype.diff=function(e,t){if(this.ops===e.ops)return new s;var n=[this,e].map((function(t){return t.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:l;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join("")})),i=new s,u=o(n[0],n[1],t),c=a.iterator(this.ops),d=a.iterator(e.ops);return u.forEach((function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case o.INSERT:n=Math.min(d.peekLength(),t),i.push(d.next(n));break;case o.DELETE:n=Math.min(t,c.peekLength()),c.next(n),i.delete(n);break;case o.EQUAL:n=Math.min(c.peekLength(),d.peekLength(),t);var l=c.next(n),s=d.next(n);r(l.insert,s.insert)?i.retain(n,a.attributes.diff(l.attributes,s.attributes)):i.push(s).delete(n)}t-=n}})),i.chop()},s.prototype.eachLine=function(e,t){t=t||"\n";for(var n=a.iterator(this.ops),o=new s,r=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),l=a.length(i)-n.peekLength(),u="string"==typeof i.insert?i.insert.indexOf(t,l)-l:-1;if(u<0)o.push(n.next());else if(u>0)o.push(n.next(u));else{if(!1===e(o,n.next(1).attributes||{},r))return;r+=1,o=new s}}o.length()>0&&e(o,{},r)},s.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var n=a.iterator(this.ops),o=a.iterator(e.ops),r=new s;n.hasNext()||o.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===o.peekType())if("insert"===o.peekType())r.push(o.next());else{var i=Math.min(n.peekLength(),o.peekLength()),l=n.next(i),u=o.next(i);if(l.delete)continue;u.delete?r.push(u):r.retain(i,a.attributes.transform(l.attributes,u.attributes,t))}else r.retain(a.length(n.next()));return r.chop()},s.prototype.transformPosition=function(e,t){t=!!t;for(var n=a.iterator(this.ops),o=0;n.hasNext()&&o<=e;){var r=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(o<e||!t)&&(e+=r),o+=r):e-=Math.min(r,e-o)}return e},e.exports=s},function(e,t){var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,r=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;for(t in e);return typeof t>"u"||n.call(e,t)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(i)return i(e,t).value}return e[t]};e.exports=function e(){var t,n,o,r,i,c,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)o=u(d,n),d!==(r=u(t,n))&&(h&&r&&(l(r)||(i=a(r)))?(i?(i=!1,c=o&&a(o)?o:[]):c=o&&l(o)?o:{},s(d,{name:n,newValue:e(h,c,r)})):typeof r<"u"&&s(d,{name:n,newValue:r}));return d}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=d(n(3)),a=d(n(2)),l=d(n(0)),s=d(n(16)),u=d(n(6)),c=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=1,m=function(e){function t(){return f(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),o(t,[{key:"attach",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this),this.attributes=new l.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new a.default).insert(this.value(),(0,i.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(e,t){var n=l.default.query(e,l.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}},{key:"formatAt",value:function(e,t,n,o){this.format(n,o)}},{key:"insertAt",value:function(e,n,o){if("string"==typeof n&&n.endsWith("\n")){var i=l.default.create(v.blotName);this.parent.insertBefore(i,0===e?this:this.next),i.insertAt(0,n.slice(0,-1))}else r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,o)}}]),t}(l.default.Embed);m.scope=l.default.Scope.BLOCK_BLOT;var v=function(e){function t(e){f(this,t);var n=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return h(t,e),o(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(l.default.Leaf).reduce((function(e,t){return 0===t.length()?e:e.insert(t.value(),y(t))}),new a.default).insert("\n",y(this))),this.cache.delta}},{key:"deleteAt",value:function(e,n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),this.cache={}}},{key:"formatAt",value:function(e,n,o,i){n<=0||(l.default.query(o,l.default.Scope.BLOCK)?e+n===this.length()&&this.format(o,i):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(n,this.length()-e-1),o,i),this.cache={})}},{key:"insertAt",value:function(e,n,o){if(null!=o)return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,o);if(0!==n.length){var i=n.split("\n"),a=i.shift();a.length>0&&(e<this.length()-1||null==this.children.tail?r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});var l=this;i.reduce((function(e,t){return(l=l.split(e,!0)).insertAt(0,t),t.length}),e+a.length)}}},{key:"insertBefore",value:function(e,n){var o=this.children.head;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n),o instanceof s.default&&o.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+g),this.cache.length}},{key:"moveChildren",value:function(e,n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,n),this.cache={}}},{key:"optimize",value:function(e){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.cache={}}},{key:"path",value:function(e){return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,e),this.cache={}}},{key:"split",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-g)){var o=this.clone();return 0===e?(this.parent.insertBefore(o,this),this):(this.parent.insertBefore(o,this.next),o)}var i=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},i}}]),t}(l.default.Block);function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e||("function"==typeof e.formats&&(t=(0,i.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope)?t:y(e.parent,t)}v.blotName="block",v.tagName="P",v.defaultChild="break",v.allowedChildren=[u.default,l.default.Embed,c.default],t.bubbleFormats=y,t.BlockEmbed=m,t.default=v},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();n(50);var a=m(n(2)),l=m(n(14)),s=m(n(8)),u=m(n(9)),c=m(n(0)),d=n(15),f=m(d),p=m(n(3)),h=m(n(10)),g=m(n(34));function m(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var b=(0,h.default)("quill"),w=function(){function e(t){var n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(y(this,e),this.options=x(t,o),this.container=this.options.container,null==this.container)return b.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var r=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 s.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new l.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(s.default.events.EDITOR_CHANGE,(function(e){e===s.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(s.default.events.SCROLL_UPDATE,(function(e,t){var o=n.selection.lastRange,r=o&&0===o.length?o.index:void 0;_.call(n,(function(){return n.editor.update(null,t,r)}),e)}));var i=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+r+"<p><br></p></div>");this.setContents(i),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return i(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),h.default.level(e)}},{key:"find",value:function(e){return e.__quill||c.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&b.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var r=e.attrName||e.blotName;"string"==typeof r?this.register("formats/"+r,e,t):Object.keys(e).forEach((function(o){n.register(o,e[o],t)}))}else null!=this.imports[e]&&!o&&b.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?c.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),i(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e){var n=e;(e=document.createElement("div")).classList.add(n)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,n){var o=this,i=k(e,t,n),a=r(i,4);return e=a[0],t=a[1],n=a[3],_.call(this,(function(){return o.editor.deleteText(e,t)}),n,e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:"format",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;return _.call(this,(function(){var o=n.getSelection(!0),r=new a.default;if(null==o)return r;if(c.default.query(e,c.default.Scope.BLOCK))r=n.editor.formatLine(o.index,o.length,v({},e,t));else{if(0===o.length)return n.selection.format(e,t),r;r=n.editor.formatText(o.index,o.length,v({},e,t))}return n.setSelection(o,s.default.sources.SILENT),r}),o)}},{key:"formatLine",value:function(e,t,n,o,i){var a=this,l=void 0,s=k(e,t,n,o,i),u=r(s,4);return e=u[0],t=u[1],l=u[2],i=u[3],_.call(this,(function(){return a.editor.formatLine(e,t,l)}),i,e,0)}},{key:"formatText",value:function(e,t,n,o,i){var a=this,l=void 0,s=k(e,t,n,o,i),u=r(s,4);return e=u[0],t=u[1],l=u[2],i=u[3],_.call(this,(function(){return a.editor.formatText(e,t,l)}),i,e,0)}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.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 e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=k(e,t),o=r(n,2);return e=o[0],t=o[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=k(e,t),o=r(n,2);return e=o[0],t=o[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,o){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return _.call(this,(function(){return r.editor.insertEmbed(t,n,o)}),i,t)}},{key:"insertText",value:function(e,t,n,o,i){var a=this,l=void 0,s=k(e,0,n,o,i),u=r(s,4);return e=u[0],l=u[2],i=u[3],_.call(this,(function(){return a.editor.insertText(e,t,l)}),i,e,t.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(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:"removeFormat",value:function(e,t,n){var o=this,i=k(e,t,n),a=r(i,4);return e=a[0],t=a[1],n=a[3],_.call(this,(function(){return o.editor.removeFormat(e,t)}),n,e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API;return _.call(this,(function(){e=new a.default(e);var n=t.getLength(),o=t.editor.deleteText(0,n),r=t.editor.applyDelta(e),i=r.ops[r.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),r.delete(1)),o.compose(r)}),n)}},{key:"setSelection",value:function(t,n,o){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var i=k(t,n,o),a=r(i,4);t=a[0],n=a[1],o=a[3],this.selection.setRange(new d.Range(t,n),o),o!==s.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API,n=(new a.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API;return _.call(this,(function(){return e=new a.default(e),t.editor.applyDelta(e,n)}),n,!0)}}]),e}();function x(e,t){if((t=(0,p.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==w.DEFAULTS.theme){if(t.theme=w.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=g.default;var n=(0,p.default)(!0,{},t.theme.DEFAULTS);[n,t].forEach((function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach((function(t){!0===e.modules[t]&&(e.modules[t]={})}))}));var o=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce((function(e,t){var n=w.import("modules/"+t);return null==n?b.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=n.DEFAULTS||{},e}),{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,p.default)(!0,{},w.DEFAULTS,{modules:o},n,t),["bounds","container","scrollingContainer"].forEach((function(e){"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))})),t.modules=Object.keys(t.modules).reduce((function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e}),{}),t}function _(e,t,n,o){if(this.options.strict&&!this.isEnabled()&&t===s.default.sources.USER)return new a.default;var r=null==n?null:this.getSelection(),i=this.editor.delta,l=e();if(null!=r&&(!0===n&&(n=r.index),null==o?r=E(r,l,t):0!==o&&(r=E(r,n,o,t)),this.setSelection(r,s.default.sources.SILENT)),l.length()>0){var u,c,d=[s.default.events.TEXT_CHANGE,l,i,t];(u=this.emitter).emit.apply(u,[s.default.events.EDITOR_CHANGE].concat(d)),t!==s.default.sources.SILENT&&(c=this.emitter).emit.apply(c,d)}return l}function k(e,t,n,r,i){var a={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(i=r,r=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(i=r,r=n,n=t,t=0),"object"===(typeof n>"u"?"undefined":o(n))?(a=n,i=r):"string"==typeof n&&(null!=r?a[n]=r:i=n),[e,t,a,i=i||s.default.sources.API]}function E(e,t,n,o){if(null==e)return null;var i=void 0,l=void 0;if(t instanceof a.default){var u=[e.index,e.index+e.length].map((function(e){return t.transformPosition(e,o!==s.default.sources.USER)})),c=r(u,2);i=c[0],l=c[1]}else{var f=[e.index,e.index+e.length].map((function(e){return e<t||e===t&&o===s.default.sources.USER?e:n>=0?e+n:Math.max(t,e+n)})),p=r(f,2);i=p[0],l=p[1]}return new d.Range(i,l-i)}w.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},w.events=s.default.events,w.sources=s.default.sources,w.version="1.3.7",w.imports={delta:a.default,parchment:c.default,"core/module":u.default,"core/theme":g.default},t.expandConfig=x,t.overload=k,t.default=w},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=l(n(7)),a=l(n(0));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=function(e){function t(){return s(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,e),o(t,[{key:"formatAt",value:function(e,n,o,i){if(t.compare(this.statics.blotName,o)<0&&a.default.query(o,a.default.Scope.BLOT)){var l=this.isolate(e,n);i&&l.wrap(o,i)}else r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,o,i)}},{key:"optimize",value:function(e){if(r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.parent instanceof t&&t.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(e,n){var o=t.order.indexOf(e),r=t.order.indexOf(n);return o>=0||r>=0?o-r:e===n?0:e<n?-1:1}}]),t}(a.default.Inline);d.allowedChildren=[d,a.default.Embed,i.default],d.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],t.default=d},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(o(n(0)).default.Text);t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=a(n(54));function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=(0,a(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((function(e){document.addEventListener(e,(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach((function(e){var n;e.__quill&&e.__quill.emitter&&(n=e.__quill.emitter).handleDOM.apply(n,t)}))}))}));var d=function(e){function t(){l(this,t);var e=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.listeners={},e.on("error",c.error),e}return u(t,e),o(t,[{key:"emit",value:function(){c.log.apply(c,arguments),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];(this.listeners[e.type]||[]).forEach((function(t){var o=t.node,r=t.handler;(e.target===o||o.contains(e.target))&&r.apply(void 0,[e].concat(n))}))}},{key:"listenDOM",value:function(e,t,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({node:t,handler:n})}}]),t}(i.default);d.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"},d.sources={API:"api",SILENT:"silent",USER:"user"},t.default=d},function(e,t,n){function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.quill=t,this.options=n};r.DEFAULTS={},t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=["error","warn","log","info"],r="warn";function i(e){if(o.indexOf(e)<=o.indexOf(r)){for(var t,n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];(t=console)[e].apply(t,i)}}function a(e){return o.reduce((function(t,n){return t[n]=i.bind(console,n,e),t}),{})}i.level=a.level=function(e){r=e},t.default=a},function(e,t,n){var o=Array.prototype.slice,r=n(52),i=n(53),a=e.exports=function(e,t,n){return n||(n={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:u(e,t,n))};function l(e){return null==e}function s(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||e.length>0&&"number"!=typeof e[0])}function u(e,t,n){var u,c;if(l(e)||l(t)||e.prototype!==t.prototype)return!1;if(i(e))return!!i(t)&&(e=o.call(e),t=o.call(t),a(e,t,n));if(s(e)){if(!s(t)||e.length!==t.length)return!1;for(u=0;u<e.length;u++)if(e[u]!==t[u])return!1;return!0}try{var d=r(e),f=r(t)}catch{return!1}if(d.length!=f.length)return!1;for(d.sort(),f.sort(),u=d.length-1;u>=0;u--)if(d[u]!=f[u])return!1;for(u=d.length-1;u>=0;u--)if(c=d[u],!a(e[c],t[c],n))return!1;return typeof e==typeof t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var r=o.Scope.TYPE&o.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&o.Scope.LEVEL|r:this.scope=o.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,(function(e){return e.name}))},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=o.query(e,o.Scope.BLOT&(this.scope|o.Scope.TYPE))&&(null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""},e}();t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},a=d(n(2)),l=d(n(0)),s=d(n(4)),u=d(n(6)),c=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=function(e){function t(){return f(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),t}(u.default);g.blotName="code",g.tagName="CODE";var m=function(e){function t(){return f(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),r(t,[{key:"delta",value:function(){var e=this,t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce((function(t,n){return t.insert(n).insert("\n",e.formats())}),new a.default)}},{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n){var r=this.descendant(c.default,this.length()-1),a=o(r,1)[0];null!=a&&a.deleteAt(a.length()-1,1),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}},{key:"formatAt",value:function(e,n,o,r){if(0!==n&&null!=l.default.query(o,l.default.Scope.BLOCK)&&(o!==this.statics.blotName||r!==this.statics.formats(this.domNode))){var i=this.newlineIndex(e);if(!(i<0||i>=e+n)){var a=this.newlineIndex(e,!0)+1,s=i-a+1,u=this.isolate(a,s),c=u.next;u.format(o,r),c instanceof t&&c.formatAt(0,e-a+n-s,o,r)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var r=this.descendant(c.default,e),i=o(r,2),a=i[0],l=i[1];a.insertAt(l,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var t=this.domNode.textContent.slice(e).indexOf("\n");return t>-1?e+t:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(l.default.create("text","\n")),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);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(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(e){var t=l.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof l.default.Embed?t.remove():t.unwrap()}))}}],[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(s.default);m.blotName="code-block",m.tagName="PRE",m.TAB=" ",t.Code=g,t.default=m},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=v(n(2)),l=v(n(20)),s=v(n(0)),u=v(n(13)),c=v(n(24)),d=n(4),f=v(d),p=v(n(16)),h=v(n(21)),g=v(n(11)),m=v(n(3));function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var w=/^[ -~]*$/,x=function(){function e(t){b(this,e),this.scroll=t,this.delta=this.getDelta()}return i(e,[{key:"applyDelta",value:function(e){var t=this,n=!1;this.scroll.update();var i=this.scroll.length();return this.scroll.batchStart(),(e=k(e)).reduce((function(e,a){var u=a.retain||a.delete||a.insert.length||1,c=a.attributes||{};if(null!=a.insert){if("string"==typeof a.insert){var p=a.insert;p.endsWith("\n")&&n&&(n=!1,p=p.slice(0,-1)),e>=i&&!p.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,p);var h=t.scroll.line(e),g=r(h,2),v=g[0],y=g[1],b=(0,m.default)({},(0,d.bubbleFormats)(v));if(v instanceof f.default){var w=v.descendant(s.default.Leaf,y),x=r(w,1)[0];b=(0,m.default)(b,(0,d.bubbleFormats)(x))}c=l.default.attributes.diff(b,c)||{}}else if("object"===o(a.insert)){var _=Object.keys(a.insert)[0];if(null==_)return e;t.scroll.insertAt(e,_,a.insert[_])}i+=u}return Object.keys(c).forEach((function(n){t.scroll.formatAt(e,u,n,c[n])})),e+u}),0),e.reduce((function(e,n){return"number"==typeof n.delete?(t.scroll.deleteAt(e,n.delete),e):e+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update((new a.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(o).forEach((function(r){if(null==n.scroll.whitelist||n.scroll.whitelist[r]){var i=n.scroll.lines(e,Math.max(t,1)),a=t;i.forEach((function(t){var i=t.length();if(t instanceof u.default){var l=e-t.offset(n.scroll),s=t.newlineIndex(l+a)-l+1;t.formatAt(l,s,r,o[r])}else t.format(r,o[r]);a-=i}))}})),this.scroll.optimize(),this.update((new a.default).retain(e).retain(t,(0,h.default)(o)))}},{key:"formatText",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(o).forEach((function(r){n.scroll.formatAt(e,t,r,o[r])})),this.update((new a.default).retain(e).retain(t,(0,h.default)(o)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(e,t){return e.concat(t.delta())}),new a.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],o=[];0===t?this.scroll.path(e).forEach((function(e){var t=r(e,1)[0];t instanceof f.default?n.push(t):t instanceof s.default.Leaf&&o.push(t)})):(n=this.scroll.lines(e,t),o=this.scroll.descendants(s.default.Leaf,e,t));var i=[n,o].map((function(e){if(0===e.length)return{};for(var t=(0,d.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=_((0,d.bubbleFormats)(n),t)}return t}));return m.default.apply(m.default,i)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter((function(e){return"string"==typeof e.insert})).map((function(e){return e.insert})).join("")}},{key:"insertEmbed",value:function(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new a.default).retain(e).insert(y({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(o).forEach((function(r){n.scroll.formatAt(e,t.length,r,o[r])})),this.update((new a.default).retain(e).insert(t,(0,h.default)(o)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return!(e.statics.blotName!==f.default.blotName||e.children.length>1)&&e.children.head instanceof p.default}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),o=this.scroll.line(e+t),i=r(o,2),l=i[0],s=i[1],c=0,d=new a.default;null!=l&&(c=l instanceof u.default?l.newlineIndex(s)-s+1:l.length()-s,d=l.delta().slice(s,s+c-1).insert("\n"));var f=this.getContents(e,t+c).diff((new a.default).insert(n).concat(d)),p=(new a.default).retain(e).concat(f);return this.applyDelta(p)}},{key:"update",value:function(e){var t=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===t.length&&"characterData"===t[0].type&&t[0].target.data.match(w)&&s.default.find(t[0].target)){var r=s.default.find(t[0].target),i=(0,d.bubbleFormats)(r),l=r.offset(this.scroll),u=t[0].oldValue.replace(c.default.CONTENTS,""),f=(new a.default).insert(u),p=(new a.default).insert(r.value());e=(new a.default).retain(l).concat(f.diff(p,n)).reduce((function(e,t){return t.insert?e.insert(t.insert,i):e.push(t)}),new a.default),this.delta=o.compose(e)}else this.delta=this.getDelta(),(!e||!(0,g.default)(o.compose(e),this.delta))&&(e=o.diff(this.delta,n));return e}}]),e}();function _(e,t){return Object.keys(t).reduce((function(n,o){return null==e[o]||(t[o]===e[o]?n[o]=t[o]:Array.isArray(t[o])?t[o].indexOf(e[o])<0&&(n[o]=t[o].concat([e[o]])):n[o]=[t[o],e[o]]),n}),{})}function k(e){return e.reduce((function(e,t){if(1===t.insert){var n=(0,h.default)(t.attributes);return delete n.image,e.insert({image:t.attributes.image},n)}if(null!=t.attributes&&(!0===t.attributes.list||!0===t.attributes.bullet)&&((t=(0,h.default)(t)).attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"==typeof t.insert){var o=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(o,t.attributes)}return e.push(t)}),new a.default)}t.default=x},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=u(n(0)),a=u(n(21)),l=u(n(11)),s=u(n(8));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var f=(0,u(n(10)).default)("quill:selection"),p=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;d(this,e),this.index=t,this.length=n},h=function(){function e(t,n){var o=this;d(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=i.default.create("cursor",this),this.lastRange=this.savedRange=new p(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){o.mouseDown||setTimeout(o.update.bind(o,s.default.sources.USER),1)})),this.emitter.on(s.default.events.EDITOR_CHANGE,(function(e,t){e===s.default.events.TEXT_CHANGE&&t.length()>0&&o.update(s.default.sources.SILENT)})),this.emitter.on(s.default.events.SCROLL_BEFORE_UPDATE,(function(){if(o.hasFocus()){var e=o.getNativeRange();null!=e&&e.start.node!==o.cursor.textNode&&o.emitter.once(s.default.events.SCROLL_UPDATE,(function(){try{o.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch{}}))}})),this.emitter.on(s.default.events.SCROLL_OPTIMIZE,(function(e,t){if(t.range){var n=t.range,r=n.startNode,i=n.startOffset,a=n.endNode,l=n.endOffset;o.setNativeRange(r,i,a,l)}})),this.update(s.default.sources.SILENT)}return r(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",(function(){e.composing=!0})),this.root.addEventListener("compositionend",(function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();if(!t)return;setTimeout((function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var e=this;this.emitter.listenDOM("mousedown",document.body,(function(){e.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){e.mouseDown=!1,e.update(s.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!i.default.query(e,i.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var o=i.default.find(n.start.node,!1);if(null==o)return;if(o instanceof i.default.Leaf){var r=o.split(n.start.offset);o.parent.insertBefore(this.cursor,r)}else o.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;var r=void 0,i=this.scroll.leaf(e),a=o(i,2),l=a[0],s=a[1];if(null==l)return null;var u=l.position(s,!0),c=o(u,2);r=c[0],s=c[1];var d=document.createRange();if(t>0){d.setStart(r,s);var f=this.scroll.leaf(e+t),p=o(f,2);if(l=p[0],s=p[1],null==l)return null;var h=l.position(s,!0),g=o(h,2);return r=g[0],s=g[1],d.setEnd(r,s),d.getBoundingClientRect()}var m="left",v=void 0;return r instanceof Text?(s<r.data.length?(d.setStart(r,s),d.setEnd(r,s+1)):(d.setStart(r,s-1),d.setEnd(r,s),m="right"),v=d.getBoundingClientRect()):(v=l.domNode.getBoundingClientRect(),s>0&&(m="right")),{bottom:v.top+v.height,height:v.height,left:v[m],right:v[m],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var n=this.normalizeNative(t);return f.info("getNativeRange",n),n}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var r=n.map((function(e){var n=o(e,2),r=n[0],a=n[1],l=i.default.find(r,!0),s=l.offset(t.scroll);return 0===a?s:l instanceof i.default.Container?s+l.length():s+l.index(r,a)})),a=Math.min(Math.max.apply(Math,c(r)),this.scroll.length()-1),l=Math.min.apply(Math,[a].concat(c(r)));return new p(l,a-l)}},{key:"normalizeNative",value:function(e){if(!g(this.root,e.startContainer)||!e.collapsed&&!g(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach((function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;n=(t=t.lastChild)instanceof Text?t.data.length:t.childNodes.length+1}e.node=t,e.offset=n})),t}},{key:"rangeToNative",value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],r=[],i=this.scroll.length();return n.forEach((function(e,n){e=Math.min(i-1,e);var a=void 0,l=t.scroll.leaf(e),s=o(l,2),u=s[0],c=s[1],d=u.position(c,0!==n),f=o(d,2);a=f[0],c=f[1],r.push(a,c)})),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var r=this.scroll.length()-1,i=this.scroll.line(Math.min(t.index,r)),a=o(i,1)[0],l=a;if(t.length>0){var s=this.scroll.line(Math.min(t.index+t.length,r));l=o(s,1)[0]}if(null!=a&&null!=l){var u=e.getBoundingClientRect();n.top<u.top?e.scrollTop-=u.top-n.top:n.bottom>u.bottom&&(e.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(f.info("setNativeRange",e,t,n,o),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=e){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||r||e!==a.startContainer||t!==a.startOffset||n!==a.endContainer||o!==a.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(o=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var l=document.createRange();l.setStart(e,t),l.setEnd(n,o),i.removeAllRanges(),i.addRange(l)}}else i.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;if("string"==typeof t&&(n=t,t=!1),f.info("setRange",e),null!=e){var o=this.rangeToNative(e);this.setNativeRange.apply(this,c(o).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,t=this.lastRange,n=this.getRange(),r=o(n,2),i=r[0],u=r[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,l.default)(t,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var d,f=[s.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(t),e];(c=this.emitter).emit.apply(c,[s.default.events.EDITOR_CHANGE].concat(f)),e!==s.default.sources.SILENT&&(d=this.emitter).emit.apply(d,f)}}}]),e}();function g(e,t){try{t.parentNode}catch{return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=p,t.default=h},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){function t(){return a(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,[{key:"insertInto",value:function(e,n){0===e.children.length?r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertInto",this).call(this,e,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),t}(i(n(0)).default.Embed);u.blotName="break",u.tagName="BR",t.default=u},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(44),a=n(30),l=n(1),s=function(e){function t(t){var n=e.call(this,t)||this;return n.build(),n}return r(t,e),t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){e.prototype.attach.call(this),this.children.forEach((function(e){e.attach()}))},t.prototype.build=function(){var e=this;this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(t){try{var n=u(t);e.insertBefore(n,e.children.head||void 0)}catch(e){if(e instanceof l.ParchmentError)return;throw e}}))},t.prototype.deleteAt=function(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,(function(e,t,n){e.deleteAt(t,n)}))},t.prototype.descendant=function(e,n){var o=this.children.find(n),r=o[0],i=o[1];return null==e.blotName&&e(r)||null!=e.blotName&&r instanceof e?[r,i]:r instanceof t?r.descendant(e,i):[null,-1]},t.prototype.descendants=function(e,n,o){void 0===n&&(n=0),void 0===o&&(o=Number.MAX_VALUE);var r=[],i=o;return this.children.forEachAt(n,o,(function(n,o,a){(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&r.push(n),n instanceof t&&(r=r.concat(n.descendants(e,o,i))),i-=a})),r},t.prototype.detach=function(){this.children.forEach((function(e){e.detach()})),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,o){this.children.forEachAt(e,t,(function(e,t,r){e.formatAt(t,r,n,o)}))},t.prototype.insertAt=function(e,t,n){var o=this.children.find(e),r=o[0],i=o[1];if(r)r.insertAt(i,t,n);else{var a=null==n?l.create("text",t):l.create(t,n);this.appendChild(a)}},t.prototype.insertBefore=function(e,t){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(t){return e instanceof t})))throw new l.ParchmentError("Cannot insert "+e.statics.blotName+" into "+this.statics.blotName);e.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce((function(e,t){return e+t.length()}),0)},t.prototype.moveChildren=function(e,t){this.children.forEach((function(n){e.insertBefore(n,t)}))},t.prototype.optimize=function(t){if(e.prototype.optimize.call(this,t),0===this.children.length)if(null!=this.statics.defaultChild){var n=l.create(this.statics.defaultChild);this.appendChild(n),n.optimize(t)}else this.remove()},t.prototype.path=function(e,n){void 0===n&&(n=!1);var o=this.children.find(e,n),r=o[0],i=o[1],a=[[this,e]];return r instanceof t?a.concat(r.path(i,n)):(null!=r&&a.push([r,i]),a)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(n){n instanceof t&&n.moveChildren(this),e.prototype.replace.call(this,n)},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(e,this.length(),(function(e,o,r){e=e.split(o,t),n.appendChild(e)})),n},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e,t){var n=this,o=[],r=[];e.forEach((function(e){e.target===n.domNode&&"childList"===e.type&&(o.push.apply(o,e.addedNodes),r.push.apply(r,e.removedNodes))})),r.forEach((function(e){if(!(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var t=l.find(e);null!=t&&(null==t.domNode.parentNode||t.domNode.parentNode===n.domNode)&&t.detach()}})),o.filter((function(e){return e.parentNode==n.domNode})).sort((function(e,t){return e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(e){var t=null;null!=e.nextSibling&&(t=l.find(e.nextSibling));var o=u(e);(o.next!=t||null==o.next)&&(null!=o.parent&&o.parent.removeChild(n),n.insertBefore(o,t||void 0))}))},t}(a.default);function u(e){var t=l.find(e);if(null==t)try{t=l.create(e)}catch{t=l.create(l.Scope.INLINE),[].slice.call(e.childNodes).forEach((function(e){t.domNode.appendChild(e)})),e.parentNode&&e.parentNode.replaceChild(t.domNode,e),t.attach()}return t}t.default=s},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),a=n(31),l=n(17),s=n(1),u=function(e){function t(t){var n=e.call(this,t)||this;return n.attributes=new a.default(n.domNode),n}return r(t,e),t.formats=function(e){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?e.tagName.toLowerCase():void 0)},t.prototype.format=function(e,t){var n=s.query(e);n instanceof i.default?this.attributes.attribute(n,t):t&&null!=n&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)},t.prototype.formats=function(){var e=this.attributes.values(),t=this.statics.formats(this.domNode);return null!=t&&(e[this.statics.blotName]=t),e},t.prototype.replaceWith=function(t,n){var o=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(o),o},t.prototype.update=function(t,n){var o=this;e.prototype.update.call(this,t,n),t.some((function(e){return e.target===o.domNode&&"attributes"===e.type}))&&this.attributes.build()},t.prototype.wrap=function(n,o){var r=e.prototype.wrap.call(this,n,o);return r instanceof t&&r.statics.scope===this.statics.scope&&this.attributes.move(r),r},t}(l.default);t.default=u},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(30),a=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.value=function(e){return!0},t.prototype.index=function(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},t.prototype.position=function(e,t){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){var e;return(e={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,e},t.scope=a.Scope.INLINE_BLOT,t}(i.default);t.default=l},function(e,t,n){var o=n(11),r=n(3),i={attributes:{compose:function(e,t,n){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var o=r(!0,{},t);for(var i in n||(o=Object.keys(o).reduce((function(e,t){return null!=o[t]&&(e[t]=o[t]),e}),{})),e)void 0!==e[i]&&void 0===t[i]&&(o[i]=e[i]);return Object.keys(o).length>0?o:void 0},diff:function(e,t){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce((function(n,r){return o(e[r],t[r])||(n[r]=void 0===t[r]?null:t[r]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if("object"!=typeof e)return t;if("object"==typeof t){if(!n)return t;var o=Object.keys(t).reduce((function(n,o){return void 0===e[o]&&(n[o]=t[o]),n}),{});return Object.keys(o).length>0?o:void 0}}},iterator:function(e){return new a(e)},length:function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"string"==typeof e.insert?e.insert.length:1}};function a(e){this.ops=e,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,o=i.length(t);if(e>=o-n?(e=o-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var r={};return t.attributes&&(r.attributes=t.attributes),"number"==typeof t.retain?r.retain=e:"string"==typeof t.insert?r.insert=t.insert.substr(n,e):r.insert=t.insert,r}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?i.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 e=this.offset,t=this.index,n=this.next(),o=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(o)}return[]},e.exports=i},function(e,t){var n=function(){function e(e,t){return null!=t&&e instanceof t}var t,n,o;try{t=Map}catch{t=function(){}}try{n=Set}catch{n=function(){}}try{o=Promise}catch{o=function(){}}function r(i,a,l,s,c){"object"==typeof a&&(l=a.depth,s=a.prototype,c=a.includeNonEnumerable,a=a.circular);var d=[],f=[],p=typeof Buffer<"u";function h(i,l){if(null===i)return null;if(0===l)return i;var g,m;if("object"!=typeof i)return i;if(e(i,t))g=new t;else if(e(i,n))g=new n;else if(e(i,o))g=new o((function(e,t){i.then((function(t){e(h(t,l-1))}),(function(e){t(h(e,l-1))}))}));else if(r.__isArray(i))g=[];else if(r.__isRegExp(i))g=new RegExp(i.source,u(i)),i.lastIndex&&(g.lastIndex=i.lastIndex);else if(r.__isDate(i))g=new Date(i.getTime());else{if(p&&Buffer.isBuffer(i))return g=Buffer.allocUnsafe?Buffer.allocUnsafe(i.length):new Buffer(i.length),i.copy(g),g;e(i,Error)?g=Object.create(i):typeof s>"u"?(m=Object.getPrototypeOf(i),g=Object.create(m)):(g=Object.create(s),m=s)}if(a){var v=d.indexOf(i);if(-1!=v)return f[v];d.push(i),f.push(g)}for(var y in e(i,t)&&i.forEach((function(e,t){var n=h(t,l-1),o=h(e,l-1);g.set(n,o)})),e(i,n)&&i.forEach((function(e){var t=h(e,l-1);g.add(t)})),i){var b;m&&(b=Object.getOwnPropertyDescriptor(m,y)),(!b||null!=b.set)&&(g[y]=h(i[y],l-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(i);for(y=0;y<w.length;y++){var x=w[y];(k=Object.getOwnPropertyDescriptor(i,x))&&!k.enumerable&&!c||(g[x]=h(i[x],l-1),k.enumerable||Object.defineProperty(g,x,{enumerable:!1}))}}if(c){var _=Object.getOwnPropertyNames(i);for(y=0;y<_.length;y++){var k,E=_[y];(k=Object.getOwnPropertyDescriptor(i,E))&&k.enumerable||(g[E]=h(i[E],l-1),Object.defineProperty(g,E,{enumerable:!1}))}}return g}return typeof a>"u"&&(a=!0),typeof l>"u"&&(l=1/0),h(i,l)}function i(e){return Object.prototype.toString.call(e)}function a(e){return"object"==typeof e&&"[object Date]"===i(e)}function l(e){return"object"==typeof e&&"[object Array]"===i(e)}function s(e){return"object"==typeof e&&"[object RegExp]"===i(e)}function u(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return r.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},r.__objToStr=i,r.__isDate=a,r.__isArray=l,r.__isRegExp=s,r.__getRegExpFlags=u,r}();"object"==typeof e&&e.exports&&(e.exports=n)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},a=p(n(0)),l=p(n(8)),s=n(4),u=p(s),c=p(n(16)),d=p(n(13)),f=p(n(25));function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function v(e){return e instanceof u.default||e instanceof s.BlockEmbed}var y=function(e){function t(e,n){h(this,t);var o=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.emitter=n.emitter,Array.isArray(n.whitelist)&&(o.whitelist=n.whitelist.reduce((function(e,t){return e[t]=!0,e}),{})),o.domNode.addEventListener("DOMNodeInserted",(function(){})),o.optimize(),o.enable(),o}return m(t,e),r(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(e,n){var r=this.line(e),a=o(r,2),l=a[0],u=a[1],f=this.line(e+n),p=o(f,1)[0];if(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),null!=p&&l!==p&&u>0){if(l instanceof s.BlockEmbed||p instanceof s.BlockEmbed)return void this.optimize();if(l instanceof d.default){var h=l.newlineIndex(l.length(),!0);if(h>-1&&(l=l.split(h+1))===p)return void this.optimize()}else if(p instanceof d.default){var g=p.newlineIndex(0);g>-1&&p.split(g+1)}var m=p.children.head instanceof c.default?null:p.children.head;l.moveChildren(p,m),l.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,o,r){null!=this.whitelist&&!this.whitelist[o]||(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,o,r),this.optimize())}},{key:"insertAt",value:function(e,n,o){if(null==o||null==this.whitelist||this.whitelist[n]){if(e>=this.length())if(null==o||null==a.default.query(n,a.default.Scope.BLOCK)){var r=a.default.create(this.statics.defaultChild);this.appendChild(r),null==o&&n.endsWith("\n")&&(n=n.slice(0,-1)),r.insertAt(0,n,o)}else{var l=a.default.create(n,o);this.appendChild(l)}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,o);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===a.default.Scope.INLINE_BLOT){var o=a.default.create(this.statics.defaultChild);o.appendChild(e),e=o}i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(v,e)}},{key:"lines",value:function(){return function e(t,n,o){var r=[],i=o;return t.children.forEachAt(n,o,(function(t,n,o){v(t)?r.push(t):t instanceof a.default.Container&&(r=r.concat(e(t,n,i))),i-=o})),r}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(l.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var n=l.default.sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(l.default.events.SCROLL_BEFORE_UPDATE,n,e),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(l.default.events.SCROLL_UPDATE,n,e)}}}]),t}(a.default.Scroll);y.blotName="scroll",y.className="ql-editor",y.tagName="DIV",y.defaultChild="block",y.allowedChildren=[u.default,s.BlockEmbed,f.default],t.default=y},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=g(n(21)),l=g(n(11)),s=g(n(3)),u=g(n(2)),c=g(n(20)),d=g(n(0)),f=g(n(5)),p=g(n(10)),h=g(n(9));function g(e){return e&&e.__esModule?e:{default:e}}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var w=(0,p.default)("quill:keyboard"),x=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",_=function(e){function t(e,n){v(this,t);var o=y(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.bindings={},Object.keys(o.options.bindings).forEach((function(t){"list autofill"===t&&null!=e.scroll.whitelist&&!e.scroll.whitelist.list||o.options.bindings[t]&&o.addBinding(o.options.bindings[t])})),o.addBinding({key:t.keys.ENTER,shiftKey:null},S),o.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(o.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},E),o.addBinding({key:t.keys.DELETE},{collapsed:!0},C)):(o.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},E),o.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},C)),o.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},O),o.addBinding({key:t.keys.DELETE},{collapsed:!1},O),o.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},E),o.listen(),o}return b(t,e),i(t,null,[{key:"match",value:function(e,t){return t=T(t),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!t[n]!==e[n]&&null!==t[n]}))&&t.key===(e.which||e.keyCode)}}]),i(t,[{key:"addBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=T(e);if(null==o||null==o.key)return w.warn("Attempted to add invalid keyboard binding",o);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),o=(0,s.default)(o,t,n),this.bindings[o.key]=this.bindings[o.key]||[],this.bindings[o.key].push(o)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var i=n.which||n.keyCode,a=(e.bindings[i]||[]).filter((function(e){return t.match(n,e)}));if(0!==a.length){var s=e.quill.getSelection();if(null!=s&&e.quill.hasFocus()){var u=e.quill.getLine(s.index),c=r(u,2),f=c[0],p=c[1],h=e.quill.getLeaf(s.index),g=r(h,2),m=g[0],v=g[1],y=0===s.length?[m,v]:e.quill.getLeaf(s.index+s.length),b=r(y,2),w=b[0],x=b[1],_=m instanceof d.default.Text?m.value().slice(0,v):"",k=w instanceof d.default.Text?w.value().slice(x):"",E={collapsed:0===s.length,empty:0===s.length&&f.length()<=1,format:e.quill.getFormat(s),offset:p,prefix:_,suffix:k};a.some((function(t){if(null!=t.collapsed&&t.collapsed!==E.collapsed||null!=t.empty&&t.empty!==E.empty||null!=t.offset&&t.offset!==E.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((function(e){return null==E.format[e]})))return!1}else if("object"===o(t.format)&&!Object.keys(t.format).every((function(e){return!0===t.format[e]?null!=E.format[e]:!1===t.format[e]?null==E.format[e]:(0,l.default)(t.format[e],E.format[e])})))return!1;return!(null!=t.prefix&&!t.prefix.test(E.prefix)||null!=t.suffix&&!t.suffix.test(E.suffix))&&!0!==t.handler.call(e,s,E)}))&&n.preventDefault()}}}}))}}]),t}(h.default);function k(e,t){var n,o=e===_.keys.LEFT?"prefix":"suffix";return m(n={key:e,shiftKey:t,altKey:null},o,/^$/),m(n,"handler",(function(n){var o=n.index;e===_.keys.RIGHT&&(o+=n.length+1);var i=this.quill.getLeaf(o);return!(r(i,1)[0]instanceof d.default.Embed&&(e===_.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index-1,f.default.sources.USER):t?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 E(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),o=r(n,1)[0],i={};if(0===t.offset){var a=this.quill.getLine(e.index-1),l=r(a,1)[0];if(null!=l&&l.length()>1){var s=o.formats(),u=this.quill.getFormat(e.index-1,1);i=c.default.attributes.diff(s,u)||{}}}var d=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-d,d,f.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(e.index-d,d,i,f.default.sources.USER),this.quill.focus()}}function C(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var o={},i=0,a=this.quill.getLine(e.index),l=r(a,1)[0];if(t.offset>=l.length()-1){var s=this.quill.getLine(e.index+1),u=r(s,1)[0];if(u){var d=l.formats(),p=this.quill.getFormat(e.index,1);o=c.default.attributes.diff(d,p)||{},i=u.length()}}this.quill.deleteText(e.index,n,f.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(e.index+i-1,n,o,f.default.sources.USER)}}function O(e){var t=this.quill.getLines(e),n={};if(t.length>1){var o=t[0].formats(),r=t[t.length-1].formats();n=c.default.attributes.diff(r,o)||{}}this.quill.deleteText(e,f.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,f.default.sources.USER),this.quill.setSelection(e.index,f.default.sources.SILENT),this.quill.focus()}function S(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var o=Object.keys(t.format).reduce((function(e,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e}),{});this.quill.insertText(e.index,"\n",o,f.default.sources.USER),this.quill.setSelection(e.index+1,f.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach((function(e){null==o[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],f.default.sources.USER))}))}function N(e){return{key:_.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=d.default.query("code-block"),o=t.index,i=t.length,a=this.quill.scroll.descendant(n,o),l=r(a,2),s=l[0],u=l[1];if(null!=s){var c=this.quill.getIndex(s),p=s.newlineIndex(u,!0)+1,h=s.newlineIndex(c+u+i),g=s.domNode.textContent.slice(p,h).split("\n");u=0,g.forEach((function(t,r){e?(s.insertAt(p+u,n.TAB),u+=n.TAB.length,0===r?o+=n.TAB.length:i+=n.TAB.length):t.startsWith(n.TAB)&&(s.deleteAt(p+u,n.TAB.length),u-=n.TAB.length,0===r?o-=n.TAB.length:i-=n.TAB.length),u+=t.length+1})),this.quill.update(f.default.sources.USER),this.quill.setSelection(o,i,f.default.sources.SILENT)}}}}function j(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],f.default.sources.USER)}}}function T(e){if("string"==typeof e||"number"==typeof e)return T({key:e});if("object"===(typeof e>"u"?"undefined":o(e))&&(e=(0,a.default)(e,!1)),"string"==typeof e.key)if(null!=_.keys[e.key.toUpperCase()])e.key=_.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[x]=e.shortKey,delete e.shortKey),e}_.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},_.DEFAULTS={bindings:{bold:j("bold"),italic:j("italic"),underline:j("underline"),indent:{key:_.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",f.default.sources.USER)}},outdent:{key:_.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",f.default.sources.USER)}},"outdent backspace":{key:_.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,t){null!=t.format.indent?this.quill.format("indent","-1",f.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,f.default.sources.USER)}},"indent code-block":N(!0),"outdent code-block":N(!1),"remove tab":{key:_.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,f.default.sources.USER)}},tab:{key:_.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new u.default).retain(e.index).delete(e.length).insert("\t");this.quill.updateContents(t,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,f.default.sources.SILENT)}},"list empty enter":{key:_.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,f.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,f.default.sources.USER)}},"checklist enter":{key:_.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=r(t,2),o=n[0],i=n[1],a=(0,s.default)({},o.formats(),{list:"checked"}),l=(new u.default).retain(e.index).insert("\n",a).retain(o.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(l,f.default.sources.USER),this.quill.setSelection(e.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:_.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),o=r(n,2),i=o[0],a=o[1],l=(new u.default).retain(e.index).insert("\n",t.format).retain(i.length()-a-1).retain(1,{header:null});this.quill.updateContents(l,f.default.sources.USER),this.quill.setSelection(e.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var n=t.prefix.length,o=this.quill.getLine(e.index),i=r(o,2),a=i[0],l=i[1];if(l>n)return!0;var s=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(e.index," ",f.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(e.index-l).delete(n+1).retain(a.length()-2-l).retain(1,{list:s});this.quill.updateContents(c,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,f.default.sources.SILENT)}},"code exit":{key:_.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=r(t,2),o=n[0],i=n[1],a=(new u.default).retain(e.index+o.length()-i-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,f.default.sources.USER)}},"embed left":k(_.keys.LEFT,!1),"embed left shift":k(_.keys.LEFT,!0),"embed right":k(_.keys.RIGHT,!1),"embed right shift":k(_.keys.RIGHT,!0)}},t.default=_,t.SHORTKEY=x},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=s(n(0)),l=s(n(7));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(e,n){u(this,t);var o=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.selection=n,o.textNode=document.createTextNode(t.CONTENTS),o.domNode.appendChild(o.textNode),o._length=0,o}return d(t,e),i(t,null,[{key:"value",value:function(){}}]),i(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,n){if(0!==this._length)return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);for(var o=this,i=0;null!=o&&o.statics.scope!==a.default.Scope.BLOCK_BLOT;)i+=o.offset(o.parent),o=o.parent;null!=o&&(this._length=t.CONTENTS.length,o.optimize(),o.formatAt(i,t.CONTENTS.length,e,n),this._length=0)}},{key:"index",value:function(e,n){return e===this.textNode?0:r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var e=this.textNode,n=this.selection.getNativeRange(),r=void 0,i=void 0,s=void 0;if(null!=n&&n.start.node===e&&n.end.node===e){var u=[e,n.start.offset,n.end.offset];r=u[0],i=u[1],s=u[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==t.CONTENTS){var c=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof l.default?(r=this.next.domNode,this.next.insertAt(0,c),this.textNode.data=t.CONTENTS):(this.textNode.data=c,this.parent.insertBefore(a.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=i){var d=[i,s].map((function(e){return Math.max(0,Math.min(r.data.length,e-1))})),f=o(d,2);return i=f[0],s=f[1],{startNode:r,startOffset:i,endNode:r,endOffset:s}}}}},{key:"update",value:function(e,t){var n=this;if(e.some((function(e){return"characterData"===e.type&&e.target===n.textNode}))){var o=this.restore();o&&(t.range=o)}}},{key:"value",value:function(){return""}}]),t}(a.default.Embed);f.blotName="cursor",f.className="ql-cursor",f.tagName="span",f.CONTENTS="\ufeff",t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(0)),r=n(4),i=a(r);function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){function t(){return l(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),t}(o.default.Container);c.allowedChildren=[i.default,r.BlockEmbed,c],t.default=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=a(n(0));function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){function t(){return l(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),o(t,[{key:"value",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return n.startsWith("rgb(")?"#"+(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"")).split(",").map((function(e){return("00"+parseInt(e).toString(16)).slice(-2)})).join(""):n}}]),t}(i.default.Attributor.Style),d=new i.default.Attributor.Class("color","ql-color",{scope:i.default.Scope.INLINE}),f=new c("color","color",{scope:i.default.Scope.INLINE});t.ColorAttributor=c,t.ColorClass=d,t.ColorStyle=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){function t(){return a(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,[{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n)return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(e){var n=r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return e=this.sanitize(e),n.setAttribute("href",e),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(e){return e.getAttribute("href")}},{key:"sanitize",value:function(e){return c(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}(i(n(6)).default);function c(e,t){var n=document.createElement("a");n.href=e;var o=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(o)>-1}u.blotName="link",u.tagName="A",u.SANITIZED_URL="about:blank",u.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=u,t.sanitize=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=l(n(23)),a=l(n(107));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var u=0;function c(e,t){e.setAttribute(t,"true"!==e.getAttribute(t))}var d=function(){function e(t){var n=this;s(this,e),this.select=t,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(e){switch(e.keyCode){case i.default.keys.ENTER:n.togglePicker();break;case i.default.keys.ESCAPE:n.escape(),e.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return r(e,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),c(this.label,"aria-expanded"),c(this.options,"aria-hidden")}},{key:"buildItem",value:function(e){var t=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),e.hasAttribute("value")&&n.setAttribute("data-value",e.getAttribute("value")),e.textContent&&n.setAttribute("data-label",e.textContent),n.addEventListener("click",(function(){t.selectItem(n,!0)})),n.addEventListener("keydown",(function(e){switch(e.keyCode){case i.default.keys.ENTER:t.selectItem(n,!0),e.preventDefault();break;case i.default.keys.ESCAPE:t.escape(),e.preventDefault()}})),n}},{key:"buildLabel",value:function(){var e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=a.default,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}},{key:"buildOptions",value:function(){var e=this,t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id="ql-picker-options-"+u,u+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach((function(n){var o=e.buildItem(n);t.appendChild(o),!0===n.selected&&e.selectItem(o)})),this.container.appendChild(t)}},{key:"buildPicker",value:function(){var e=this;[].slice.call(this.select.attributes).forEach((function(t){e.container.setAttribute(t.name,t.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var e=this;this.close(),setTimeout((function(){return e.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(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===(typeof Event>"u"?"undefined":o(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),e}();t.default=d},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=v(n(0)),r=v(n(5)),i=n(4),a=v(i),l=v(n(16)),s=v(n(25)),u=v(n(24)),c=v(n(35)),d=v(n(6)),f=v(n(22)),p=v(n(7)),h=v(n(55)),g=v(n(42)),m=v(n(23));function v(e){return e&&e.__esModule?e:{default:e}}r.default.register({"blots/block":a.default,"blots/block/embed":i.BlockEmbed,"blots/break":l.default,"blots/container":s.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":d.default,"blots/scroll":f.default,"blots/text":p.default,"modules/clipboard":h.default,"modules/history":g.default,"modules/keyboard":m.default}),o.default.register(a.default,l.default,u.default,d.default,f.default,p.default),t.default=r.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(){function e(e){this.domNode=e,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){if(null==this.tagName)throw new o.ParchmentError("Blot definition missing tagName");var t;return Array.isArray(this.tagName)?("string"==typeof e&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),t="number"==typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return o.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,r){var i=this.isolate(e,t);if(null!=o.query(n,o.Scope.BLOT)&&r)i.wrap(n,r);else if(null!=o.query(n,o.Scope.ATTRIBUTE)){var a=o.create(this.statics.scope);i.wrap(a),a.format(n,r)}},e.prototype.insertAt=function(e,t,n){var r=null==n?o.create("text",t):o.create(t,n),i=this.split(e);this.parent.insertBefore(r,i)},e.prototype.insertInto=function(e,t){void 0===t&&(t=null),null!=this.parent&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,t),null!=t&&(n=t.domNode),(this.domNode.parentNode!=e.domNode||this.domNode.nextSibling!=n)&&e.domNode.insertBefore(this.domNode,n),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return void 0===e&&(e=this.parent),null==this.parent||this==e?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){null!=this.domNode[o.DATA_KEY]&&delete this.domNode[o.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n="string"==typeof e?o.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var n="string"==typeof e?o.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),r=n(32),i=n(33),a=n(1),l=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=o.default.keys(this.domNode),n=r.default.keys(this.domNode),l=i.default.keys(this.domNode);t.concat(n).concat(l).forEach((function(t){var n=a.query(t,a.Scope.ATTRIBUTE);n instanceof o.default&&(e.attributes[n.attrName]=n)}))},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach((function(n){var o=t.attributes[n].value(t.domNode);e.format(n,o)}))},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach((function(e){t.attributes[e].remove(t.domNode)})),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce((function(t,n){return t[n]=e.attributes[n].value(e.domNode),t}),{})},e}();t.default=l},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function i(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter((function(e){return 0===e.indexOf(t+"-")}))}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map((function(e){return e.split("-").slice(0,-1).join("-")}))},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){i(e,this.keyName).forEach((function(t){e.classList.remove(t)})),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(i(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=a},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function i(e){var t=e.split("-"),n=t.slice(1).map((function(e){return e[0].toUpperCase()+e.slice(1)})).join("");return t[0]+n}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map((function(e){return e.split(":")[0].trim()}))},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[i(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[i(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[i(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(t,n){r(this,e),this.quill=t,this.options=n,this.modules={}}return o(e,[{key:"init",value:function(){var e=this;Object.keys(this.options.modules).forEach((function(t){null==e.modules[t]&&e.addModule(t)}))}},{key:"addModule",value:function(e){var t=this.quill.constructor.import("modules/"+e);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}]),e}();i.DEFAULTS={modules:{}},i.themes={default:i},t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=l(n(0)),a=l(n(7));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d="\ufeff",f=function(e){function t(e){s(this,t);var n=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach((function(e){n.contentNode.appendChild(e)})),n.leftGuard=document.createTextNode(d),n.rightGuard=document.createTextNode(d),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return c(t,e),o(t,[{key:"index",value:function(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"restore",value:function(e){var t=void 0,n=void 0,o=e.data.split(d).join("");if(e===this.leftGuard)if(this.prev instanceof a.default){var r=this.prev.length();this.prev.insertAt(r,o),t={startNode:this.prev.domNode,startOffset:r+o.length}}else n=document.createTextNode(o),this.parent.insertBefore(i.default.create(n),this),t={startNode:n,startOffset:o.length};else e===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,o),t={startNode:this.next.domNode,startOffset:o.length}):(n=document.createTextNode(o),this.parent.insertBefore(i.default.create(n),this.next),t={startNode:n,startOffset:o.length}));return e.data=d,t}},{key:"update",value:function(e,t){var n=this;e.forEach((function(e){if("characterData"===e.type&&(e.target===n.leftGuard||e.target===n.rightGuard)){var o=n.restore(e.target);o&&(t.range=o)}}))}}]),t}(i.default.Embed);t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var o=r(n(0));function r(e){return e&&e.__esModule?e:{default:e}}var i={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},a=new o.default.Attributor.Attribute("align","align",i),l=new o.default.Attributor.Class("align","ql-align",i),s=new o.default.Attributor.Style("align","text-align",i);t.AlignAttribute=a,t.AlignClass=l,t.AlignStyle=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var o=i(n(0)),r=n(26);function i(e){return e&&e.__esModule?e:{default:e}}var a=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),l=new r.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});t.BackgroundClass=a,t.BackgroundStyle=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var o=r(n(0));function r(e){return e&&e.__esModule?e:{default:e}}var i={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},a=new o.default.Attributor.Attribute("direction","dir",i),l=new o.default.Attributor.Class("direction","ql-direction",i),s=new o.default.Attributor.Style("direction","direction",i);t.DirectionAttribute=a,t.DirectionClass=l,t.DirectionStyle=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=a(n(0));function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c={scope:i.default.Scope.INLINE,whitelist:["serif","monospace"]},d=new i.default.Attributor.Class("font","ql-font",c),f=function(e){function t(){return l(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),o(t,[{key:"value",value:function(e){return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}(i.default.Attributor.Style),p=new f("font","font-family",c);t.FontStyle=p,t.FontClass=d},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.SizeClass=void 0;var o=r(n(0));function r(e){return e&&e.__esModule?e:{default:e}}var i=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),a=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=i,t.SizeStyle=a},function(e,t,n){e.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(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=a(n(0)),i=a(n(5));function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){function t(e,n){l(this,t);var o=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.lastRecorded=0,o.ignoreChange=!1,o.clear(),o.quill.on(i.default.events.EDITOR_CHANGE,(function(e,t,n,r){e!==i.default.events.TEXT_CHANGE||o.ignoreChange||(o.options.userOnly&&r!==i.default.sources.USER?o.transform(t):o.record(t,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 u(t,e),o(t,[{key:"change",value:function(e,t){if(0!==this.stack[e].length){var n=this.stack[e].pop();this.stack[t].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[e],i.default.sources.USER),this.ignoreChange=!1;var o=f(n[e]);this.quill.setSelection(o)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(e,t){if(0!==e.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(t),o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){var r=this.stack.undo.pop();n=n.compose(r.undo),e=r.redo.compose(e)}else this.lastRecorded=o;this.stack.undo.push({redo:e,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(e){this.stack.undo.forEach((function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})),this.stack.redo.forEach((function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}(a(n(9)).default);function d(e){var t=e.ops[e.ops.length-1];return null!=t&&(null!=t.insert?"string"==typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some((function(e){return null!=r.default.query(e,r.default.Scope.BLOCK)})))}function f(e){var t=e.reduce((function(e,t){return e+=t.delete||0}),0),n=e.length()-t;return d(e)&&(n-=1),n}c.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=c,t.getLastChangeIndex=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=h(n(3)),a=h(n(2)),l=h(n(8)),s=h(n(23)),u=h(n(34)),c=h(n(59)),d=h(n(60)),f=h(n(28)),p=h(n(61));function h(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}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"],w=[!1,"serif","monospace"],x=["1","2","3",!1],_=["small",!1,"large","huge"],k=function(e){function t(e,n){g(this,t);var o=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),r=function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);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(e){e.container.contains(n.target)||e.close()}))};return e.emitter.listenDOM("click",document.body,r),o}return v(t,e),o(t,[{key:"addModule",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addModule",this).call(this,e);return"toolbar"===e&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(e,t){e.forEach((function(e){(e.getAttribute("class")||"").split(/\s+/).forEach((function(n){if(n.startsWith("ql-")&&(n=n.slice(3),null!=t[n]))if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"==typeof t[n])e.innerHTML=t[n];else{var o=e.value||"";null!=o&&t[n][o]&&(e.innerHTML=t[n][o])}}))}))}},{key:"buildPickers",value:function(e,t){var n=this;this.pickers=e.map((function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&O(e,y),new d.default(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){var n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&O(e,b,"background"===n?"#ffffff":"#000000"),new c.default(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?O(e,w):e.classList.contains("ql-header")?O(e,x):e.classList.contains("ql-size")&&O(e,_)),new f.default(e)}));var o=function(){n.pickers.forEach((function(e){e.update()}))};this.quill.on(l.default.events.EDITOR_CHANGE,o)}}]),t}(u.default);k.DEFAULTS=(0,i.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var e=this,t=this.container.querySelector("input.ql-image[type=file]");null==t&&((t=document.createElement("input")).setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",(function(){if(null!=t.files&&null!=t.files[0]){var n=new FileReader;n.onload=function(n){var o=e.quill.getSelection(!0);e.quill.updateContents((new a.default).retain(o.index).delete(o.length).insert({image:n.target.result}),l.default.sources.USER),e.quill.setSelection(o.index+1,l.default.sources.SILENT),t.value=""},n.readAsDataURL(t.files[0])}})),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var E=function(e){function t(e,n){g(this,t);var o=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.textbox=o.root.querySelector('input[type="text"]'),o.listen(),o}return v(t,e),o(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",(function(t){s.default.match(t,"enter")?(e.save(),t.preventDefault()):s.default.match(t,"escape")&&(e.cancel(),t.preventDefault())}))}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==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-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var t=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,l.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,l.default.sources.USER)),this.quill.root.scrollTop=t;break;case"video":e=C(e);case"formula":if(!e)break;var n=this.quill.getSelection(!0);if(null!=n){var o=n.index+n.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),e,l.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",l.default.sources.USER),this.quill.setSelection(o+2,l.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}(p.default);function C(e){var t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0":(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/":e}function O(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach((function(t){var o=document.createElement("option");t===n?o.setAttribute("selected","selected"):o.setAttribute("value",t),e.appendChild(o)}))}t.BaseTooltip=E,t.default=k},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.insertBefore(e[0],null),e.length>1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)},e.prototype.offset=function(e){for(var t=0,n=this.head;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var n,o=this.iterator();n=o();){var r=n.length();if(e<r||t&&e===r&&(null==n.next||0!==n.next.length()))return[n,e];e-=r}return[null,0]},e.prototype.forEach=function(e){for(var t,n=this.iterator();t=n();)e(t)},e.prototype.forEachAt=function(e,t,n){if(!(t<=0))for(var o,r=this.find(e),i=r[0],a=e-r[1],l=this.iterator(i);(o=l())&&a<e+t;){var s=o.length();e>a?n(o,e-a,Math.min(t,a+s-e)):n(o,0,Math.min(s,e+t-a)),a+=s}},e.prototype.map=function(e){return this.reduce((function(t,n){return t.push(e(n)),t}),[])},e.prototype.reduce=function(e,t){for(var n,o=this.iterator();n=o();)t=e(t,n);return t},e}();t.default=o},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),a=n(1),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=100,u=function(e){function t(t){var n=e.call(this,t)||this;return n.scroll=n,n.observer=new MutationObserver((function(e){n.update(e)})),n.observer.observe(n.domNode,l),n.attach(),n}return r(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),0===t&&n===this.length()?this.children.forEach((function(e){e.remove()})):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,o,r){this.update(),e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.insertAt=function(t,n,o){this.update(),e.prototype.insertAt.call(this,t,n,o)},t.prototype.optimize=function(t,n){var o=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var r=[].slice.call(this.observer.takeRecords());r.length>0;)t.push(r.pop());for(var l=function(e,t){void 0===t&&(t=!0),null!=e&&e!==o&&null!=e.domNode.parentNode&&(null==e.domNode[a.DATA_KEY].mutations&&(e.domNode[a.DATA_KEY].mutations=[]),t&&l(e.parent))},u=function(e){null==e.domNode[a.DATA_KEY]||null==e.domNode[a.DATA_KEY].mutations||(e instanceof i.default&&e.children.forEach(u),e.optimize(n))},c=t,d=0;c.length>0;d+=1){if(d>=s)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach((function(e){var t=a.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(l(a.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,(function(e){var t=a.find(e,!1);l(t,!1),t instanceof i.default&&t.children.forEach((function(e){l(e,!1)}))}))):"attributes"===e.type&&l(t.prev)),l(t))})),this.children.forEach(u),r=(c=[].slice.call(this.observer.takeRecords())).slice();r.length>0;)t.push(r.pop())}},t.prototype.update=function(t,n){var o=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map((function(e){var t=a.find(e.target,!0);return null==t?null:null==t.domNode[a.DATA_KEY].mutations?(t.domNode[a.DATA_KEY].mutations=[e],t):(t.domNode[a.DATA_KEY].mutations.push(e),null)})).forEach((function(e){null==e||e===o||null==e.domNode[a.DATA_KEY]||e.update(e.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="DIV",t}(i.default);t.default=u},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),a=n(1);function l(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,o){var r=this;n!==this.statics.blotName||o?e.prototype.format.call(this,n,o):(this.children.forEach((function(e){e instanceof i.default||(e=e.wrap(t.blotName,!0)),r.attributes.copy(e)})),this.unwrap())},t.prototype.formatAt=function(t,n,o,r){null!=this.formats()[o]||a.query(o,a.Scope.ATTRIBUTE)?this.isolate(t,n).format(o,r):e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var o=this.formats();if(0===Object.keys(o).length)return this.unwrap();var r=this.next;r instanceof t&&r.prev===this&&l(o,r.formats())&&(r.moveChildren(this),r.remove())},t.blotName="inline",t.scope=a.Scope.INLINE_BLOT,t.tagName="SPAN",t}(i.default);t.default=s},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),a=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){var o=a.query(t.blotName).tagName;if(n.tagName!==o)return e.formats.call(this,n)},t.prototype.format=function(n,o){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||o?e.prototype.format.call(this,n,o):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,o,r){null!=a.query(o,a.Scope.BLOCK)?this.format(o,r):e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.insertAt=function(t,n,o){if(null==o||null!=a.query(n,a.Scope.INLINE))e.prototype.insertAt.call(this,t,n,o);else{var r=this.split(t),i=a.create(n,o);r.parent.insertBefore(i,r)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="P",t}(i.default);t.default=l},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,o,r){0===t&&n===this.length()?this.format(o,r):e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=i},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),a=n(1),l=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return r(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,o){null==o?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,o)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=a.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e,t){var n=this;e.some((function(e){return"characterData"===e.type&&e.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=a.Scope.INLINE_BLOT,t}(i.default);t.default=l},function(e,t,n){var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var r=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:r.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var o=n.indexOf(e,t);return-1!==o&&o===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),o=n.length>>>0,r=arguments[1],i=0;i<o;i++)if(t=n[i],e.call(r,t,i,n))return t}}),document.addEventListener("DOMContentLoaded",(function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)}))},function(e,t){var n=-1,o=1,r=0;function i(e,t,n){if(e==t)return e?[[r,e]]:[];(n<0||e.length<n)&&(n=null);var o=u(e,t),i=e.substring(0,o);o=c(e=e.substring(o),t=t.substring(o));var l=e.substring(e.length-o),s=a(e=e.substring(0,e.length-o),t=t.substring(0,t.length-o));return i&&s.unshift([r,i]),l&&s.push([r,l]),f(s),null!=n&&(s=g(s,n)),s=m(s)}function a(e,t){var a;if(!e)return[[o,t]];if(!t)return[[n,e]];var s=e.length>t.length?e:t,u=e.length>t.length?t:e,c=s.indexOf(u);if(-1!=c)return a=[[o,s.substring(0,c)],[r,u],[o,s.substring(c+u.length)]],e.length>t.length&&(a[0][0]=a[2][0]=n),a;if(1==u.length)return[[n,e],[o,t]];var f=d(e,t);if(f){var p=f[0],h=f[1],g=f[2],m=f[3],v=f[4],y=i(p,g),b=i(h,m);return y.concat([[r,v]],b)}return l(e,t)}function l(e,t){for(var r=e.length,i=t.length,a=Math.ceil((r+i)/2),l=a,u=2*a,c=new Array(u),d=new Array(u),f=0;f<u;f++)c[f]=-1,d[f]=-1;c[l+1]=0,d[l+1]=0;for(var p=r-i,h=p%2!=0,g=0,m=0,v=0,y=0,b=0;b<a;b++){for(var w=-b+g;w<=b-m;w+=2){for(var x=l+w,_=(S=w==-b||w!=b&&c[x-1]<c[x+1]?c[x+1]:c[x-1]+1)-w;S<r&&_<i&&e.charAt(S)==t.charAt(_);)S++,_++;if(c[x]=S,S>r)m+=2;else if(_>i)g+=2;else if(h&&(C=l+p-w)>=0&&C<u&&-1!=d[C]&&S>=(E=r-d[C]))return s(e,t,S,_)}for(var k=-b+v;k<=b-y;k+=2){for(var E,C=l+k,O=(E=k==-b||k!=b&&d[C-1]<d[C+1]?d[C+1]:d[C-1]+1)-k;E<r&&O<i&&e.charAt(r-E-1)==t.charAt(i-O-1);)E++,O++;if(d[C]=E,E>r)y+=2;else if(O>i)v+=2;else if(!h){var S;if((x=l+p-k)>=0&&x<u&&-1!=c[x]&&(_=l+(S=c[x])-x,S>=(E=r-E)))return s(e,t,S,_)}}}return[[n,e],[o,t]]}function s(e,t,n,o){var r=e.substring(0,n),a=t.substring(0,o),l=e.substring(n),s=t.substring(o),u=i(r,a),c=i(l,s);return u.concat(c)}function u(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,o=Math.min(e.length,t.length),r=o,i=0;n<r;)e.substring(i,r)==t.substring(i,r)?i=n=r:o=r,r=Math.floor((o-n)/2+n);return r}function c(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,o=Math.min(e.length,t.length),r=o,i=0;n<r;)e.substring(e.length-r,e.length-i)==t.substring(t.length-r,t.length-i)?i=n=r:o=r,r=Math.floor((o-n)/2+n);return r}function d(e,t){var n=e.length>t.length?e:t,o=e.length>t.length?t:e;if(n.length<4||2*o.length<n.length)return null;function r(e,t,n){for(var o,r,i,a,l=e.substring(n,n+Math.floor(e.length/4)),s=-1,d="";-1!=(s=t.indexOf(l,s+1));){var f=u(e.substring(n),t.substring(s)),p=c(e.substring(0,n),t.substring(0,s));d.length<p+f&&(d=t.substring(s-p,s)+t.substring(s,s+f),o=e.substring(0,n-p),r=e.substring(n+f),i=t.substring(0,s-p),a=t.substring(s+f))}return 2*d.length>=e.length?[o,r,i,a,d]:null}var i,a,l,s,d,f=r(n,o,Math.ceil(n.length/4)),p=r(n,o,Math.ceil(n.length/2));return f||p?(i=p?f&&f[4].length>p[4].length?f:p:f,e.length>t.length?(a=i[0],l=i[1],s=i[2],d=i[3]):(s=i[0],d=i[1],a=i[2],l=i[3]),[a,l,s,d,i[4]]):null}function f(e){e.push([r,""]);for(var t,i=0,a=0,l=0,s="",d="";i<e.length;)switch(e[i][0]){case o:l++,d+=e[i][1],i++;break;case n:a++,s+=e[i][1],i++;break;case r:a+l>1?(0!==a&&0!==l&&(0!==(t=u(d,s))&&(i-a-l>0&&e[i-a-l-1][0]==r?e[i-a-l-1][1]+=d.substring(0,t):(e.splice(0,0,[r,d.substring(0,t)]),i++),d=d.substring(t),s=s.substring(t)),0!==(t=c(d,s))&&(e[i][1]=d.substring(d.length-t)+e[i][1],d=d.substring(0,d.length-t),s=s.substring(0,s.length-t))),0===a?e.splice(i-l,a+l,[o,d]):0===l?e.splice(i-a,a+l,[n,s]):e.splice(i-a-l,a+l,[n,s],[o,d]),i=i-a-l+(a?1:0)+(l?1:0)+1):0!==i&&e[i-1][0]==r?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,l=0,a=0,s="",d=""}""===e[e.length-1][1]&&e.pop();var p=!1;for(i=1;i<e.length-1;)e[i-1][0]==r&&e[i+1][0]==r&&(e[i][1].substring(e[i][1].length-e[i-1][1].length)==e[i-1][1]?(e[i][1]=e[i-1][1]+e[i][1].substring(0,e[i][1].length-e[i-1][1].length),e[i+1][1]=e[i-1][1]+e[i+1][1],e.splice(i-1,1),p=!0):e[i][1].substring(0,e[i+1][1].length)==e[i+1][1]&&(e[i-1][1]+=e[i+1][1],e[i][1]=e[i][1].substring(e[i+1][1].length)+e[i+1][1],e.splice(i+1,1),p=!0)),i++;p&&f(e)}var p=i;function h(e,t){if(0===t)return[r,e];for(var o=0,i=0;i<e.length;i++){var a=e[i];if(a[0]===n||a[0]===r){var l=o+a[1].length;if(t===l)return[i+1,e];if(t<l){e=e.slice();var s=t-o,u=[a[0],a[1].slice(0,s)],c=[a[0],a[1].slice(s)];return e.splice(i,1,u,c),[i+1,e]}o=l}}throw new Error("cursor_pos is out of bounds!")}function g(e,t){var n=h(e,t),o=n[1],i=n[0],a=o[i],l=o[i+1];if(null==a)return e;if(a[0]!==r)return e;if(null!=l&&a[1]+l[1]===l[1]+a[1])return o.splice(i,2,l,a),v(o,i,2);if(null!=l&&0===l[1].indexOf(a[1])){o.splice(i,2,[l[0],a[1]],[0,a[1]]);var s=l[1].slice(a[1].length);return s.length>0&&o.splice(i+2,0,[l[0],s]),v(o,i,3)}return e}function m(e){for(var t=!1,i=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},a=function(e){return e.charCodeAt(e.length-1)>=55296&&e.charCodeAt(e.length-1)<=56319},l=2;l<e.length;l+=1)e[l-2][0]===r&&a(e[l-2][1])&&e[l-1][0]===n&&i(e[l-1][1])&&e[l][0]===o&&i(e[l][1])&&(t=!0,e[l-1][1]=e[l-2][1].slice(-1)+e[l-1][1],e[l][1]=e[l-2][1].slice(-1)+e[l][1],e[l-2][1]=e[l-2][1].slice(0,-1));if(!t)return e;var s=[];for(l=0;l<e.length;l+=1)e[l][1].length>0&&s.push(e[l]);return s}function v(e,t,n){for(var o=t+n-1;o>=0&&o>=t-1;o--)if(o+1<e.length){var r=e[o],i=e[o+1];r[0]===i[1]&&e.splice(o,2,[r[0],r[1]+i[1]])}return e}p.INSERT=o,p.DELETE=n,p.EQUAL=r,e.exports=p},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}(e.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(e,t){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function o(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function r(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=n?o:r).supported=o,t.unsupported=r},function(e,t){var n=Object.prototype.hasOwnProperty,o="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(o=!1)),a.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)n.call(e,t)&&r.push(o?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},a.prototype.listeners=function(e,t){var n=o?o+e:e,r=this._events[n];if(t)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var i=0,a=r.length,l=new Array(a);i<a;i++)l[i]=r[i].fn;return l},a.prototype.emit=function(e,t,n,r,i,a){var l=o?o+e:e;if(!this._events[l])return!1;var s,u,c=this._events[l],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,r),!0;case 5:return c.fn.call(c.context,t,n,r,i),!0;case 6:return c.fn.call(c.context,t,n,r,i,a),!0}for(u=1,s=new Array(d-1);u<d;u++)s[u-1]=arguments[u];c.fn.apply(c.context,s)}else{var f,p=c.length;for(u=0;u<p;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,r);break;default:if(!s)for(f=1,s=new Array(d-1);f<d;f++)s[f-1]=arguments[f];c[u].fn.apply(c[u].context,s)}}return!0},a.prototype.on=function(e,t,n){var r=new i(t,n||this),a=o?o+e:e;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],r]:this._events[a].push(r):(this._events[a]=r,this._eventsCount++),this},a.prototype.once=function(e,t,n){var r=new i(t,n||this,!0),a=o?o+e:e;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],r]:this._events[a].push(r):(this._events[a]=r,this._eventsCount++),this},a.prototype.removeListener=function(e,t,n,i){var a=o?o+e:e;if(!this._events[a])return this;if(!t)return 0==--this._eventsCount?this._events=new r:delete this._events[a],this;var l=this._events[a];if(l.fn)l.fn===t&&(!i||l.once)&&(!n||l.context===n)&&(0==--this._eventsCount?this._events=new r:delete this._events[a]);else{for(var s=0,u=[],c=l.length;s<c;s++)(l[s].fn!==t||i&&!l[s].once||n&&l[s].context!==n)&&u.push(l[s]);u.length?this._events[a]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new r:delete this._events[a]}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=o?o+e:e,this._events[t]&&(0==--this._eventsCount?this._events=new r:delete this._events[t])):(this._events=new r,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,typeof e<"u"&&(e.exports=a)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=b(n(3)),l=b(n(2)),s=b(n(0)),u=b(n(5)),c=b(n(10)),d=b(n(9)),f=n(36),p=n(37),h=b(n(13)),g=n(26),m=n(38),v=n(39),y=n(40);function b(e){return e&&e.__esModule?e:{default:e}}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var E=(0,c.default)("quill:clipboard"),C="__ql-matcher",O=[[Node.TEXT_NODE,U],[Node.TEXT_NODE,z],["br",q],[Node.ELEMENT_NODE,z],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,B],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,H],["li",V],["b",D.bind(D,"bold")],["i",D.bind(D,"italic")],["style",F]],S=[f.AlignAttribute,m.DirectionAttribute].reduce((function(e,t){return e[t.keyName]=t,e}),{}),N=[f.AlignStyle,p.BackgroundStyle,g.ColorStyle,m.DirectionStyle,v.FontStyle,y.SizeStyle].reduce((function(e,t){return e[t.keyName]=t,e}),{}),j=function(e){function t(e,n){x(this,t);var o=_(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,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(e){var t=r(e,2),i=t[0],a=t[1];!n.matchVisual&&a===B||o.addMatcher(i,a)})),o}return k(t,e),i(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){if("string"==typeof e)return this.container.innerHTML=e.replace(/\>\r?\n +\</g,"><"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[h.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new l.default).insert(n,w({},h.default.blotName,t[h.default.blotName]))}var o=this.prepareMatching(),i=r(o,2),a=i[0],s=i[1],u=R(this.container,a,s);return M(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new l.default).retain(u.length()-1).delete(1))),E.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,u.default.sources.SILENT);else{var o=this.convert(t);this.quill.updateContents((new l.default).retain(e).concat(o),n),this.quill.setSelection(e+o.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),o=(new l.default).retain(n.index),r=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout((function(){o=o.concat(t.convert()).delete(n.length),t.quill.updateContents(o,u.default.sources.USER),t.quill.setSelection(o.length()-n.length,u.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=r,t.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach((function(o){var i=r(o,2),a=i[0],l=i[1];switch(a){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:t.push(l);break;default:[].forEach.call(e.container.querySelectorAll(a),(function(e){e[C]=e[C]||[],e[C].push(l)}))}})),[t,n]}}]),t}(d.default);function T(e,t,n){return"object"===(typeof t>"u"?"undefined":o(t))?Object.keys(t).reduce((function(e,n){return T(e,n,t[n])}),e):e.reduce((function(e,o){return o.attributes&&o.attributes[t]?e.push(o):e.insert(o.insert,(0,a.default)({},w({},t,n),o.attributes))}),new l.default)}function P(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t="__ql-computed-style";return e[t]||(e[t]=window.getComputedStyle(e))}function M(e,t){for(var n="",o=e.ops.length-1;o>=0&&n.length<t.length;--o){var r=e.ops[o];if("string"!=typeof r.insert)break;n=r.insert+n}return n.slice(-1*t.length)===t}function A(e){if(0===e.childNodes.length)return!1;var t=P(e);return["block","list-item"].indexOf(t.display)>-1}function R(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce((function(t,n){return n(e,t)}),new l.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(o,r){var i=R(r,t,n);return r.nodeType===e.ELEMENT_NODE&&(i=t.reduce((function(e,t){return t(r,e)}),i),i=(r[C]||[]).reduce((function(e,t){return t(r,e)}),i)),o.concat(i)}),new l.default):new l.default}function D(e,t,n){return T(n,e,!0)}function I(e,t){var n=s.default.Attributor.Attribute.keys(e),o=s.default.Attributor.Class.keys(e),r=s.default.Attributor.Style.keys(e),i={};return n.concat(o).concat(r).forEach((function(t){var n=s.default.query(t,s.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(e),i[n.attrName])||(null!=(n=S[t])&&(n.attrName===t||n.keyName===t)&&(i[n.attrName]=n.value(e)||void 0),null!=(n=N[t])&&(n.attrName===t||n.keyName===t)&&(n=N[t],i[n.attrName]=n.value(e)||void 0))})),Object.keys(i).length>0&&(t=T(t,i)),t}function L(e,t){var n=s.default.query(e);if(null==n)return t;if(n.prototype instanceof s.default.Embed){var o={},r=n.value(e);null!=r&&(o[n.blotName]=r,t=(new l.default).insert(o,n.formats(e)))}else"function"==typeof n.formats&&(t=T(t,n.blotName,n.formats(e)));return t}function q(e,t){return M(t,"\n")||t.insert("\n"),t}function F(){return new l.default}function V(e,t){var n=s.default.query(e);if(null==n||"list-item"!==n.blotName||!M(t,"\n"))return t;for(var o=-1,r=e.parentNode;!r.classList.contains("ql-clipboard");)"list"===(s.default.query(r)||{}).blotName&&(o+=1),r=r.parentNode;return o<=0?t:t.compose((new l.default).retain(t.length()-1).retain(1,{indent:o}))}function z(e,t){return M(t,"\n")||(A(e)||t.length()>0&&e.nextSibling&&A(e.nextSibling))&&t.insert("\n"),t}function B(e,t){if(A(e)&&null!=e.nextElementSibling&&!M(t,"\n\n")){var n=e.offsetHeight+parseFloat(P(e).marginTop)+parseFloat(P(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function H(e,t){var n={},o=e.style||{};return o.fontStyle&&"italic"===P(e).fontStyle&&(n.italic=!0),o.fontWeight&&(P(e).fontWeight.startsWith("bold")||parseInt(P(e).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=T(t,n)),parseFloat(o.textIndent||0)>0&&(t=(new l.default).insert("\t").concat(t)),t}function U(e,t){var n=e.data;if("O:P"===e.parentNode.tagName)return t.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!P(e.parentNode).whiteSpace.startsWith("pre")){var o=function(e,t){return(t=t.replace(/[^\u00a0]/g,"")).length<1&&e?" ":t};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,o.bind(o,!0)),(null==e.previousSibling&&A(e.parentNode)||null!=e.previousSibling&&A(e.previousSibling))&&(n=n.replace(/^\s+/,o.bind(o,!1))),(null==e.nextSibling&&A(e.parentNode)||null!=e.nextSibling&&A(e.nextSibling))&&(n=n.replace(/\s+$/,o.bind(o,!1)))}return t.insert(n)}j.DEFAULTS={matchers:[],matchVisual:!0},t.default=j,t.matchAttributor=I,t.matchBlot=L,t.matchNewline=z,t.matchSpacing=B,t.matchText=U},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){function t(){return a(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,[{key:"optimize",value:function(e){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}(i(n(6)).default);u.blotName="bold",u.tagName=["STRONG","B"],t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=c(n(2)),a=c(n(0)),l=c(n(5)),s=c(n(10)),u=c(n(9));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=(0,s.default)("quill:toolbar"),m=function(e){function t(e,n){f(this,t);var r,i=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(i.options.container)){var a=document.createElement("div");y(a,i.options.container),e.container.parentNode.insertBefore(a,e.container),i.container=a}else"string"==typeof i.options.container?i.container=document.querySelector(i.options.container):i.container=i.options.container;return i.container instanceof HTMLElement?(i.container.classList.add("ql-toolbar"),i.controls=[],i.handlers={},Object.keys(i.options.handlers).forEach((function(e){i.addHandler(e,i.options.handlers[e])})),[].forEach.call(i.container.querySelectorAll("button, select"),(function(e){i.attach(e)})),i.quill.on(l.default.events.EDITOR_CHANGE,(function(e,t){e===l.default.events.SELECTION_CHANGE&&i.update(t)})),i.quill.on(l.default.events.SCROLL_OPTIMIZE,(function(){var e=i.quill.selection.getRange(),t=o(e,1)[0];i.update(t)})),i):(r=g.error("Container required for toolbar",i.options),p(i,r))}return h(t,e),r(t,[{key:"addHandler",value:function(e,t){this.handlers[e]=t}},{key:"attach",value:function(e){var t=this,n=[].find.call(e.classList,(function(e){return 0===e.indexOf("ql-")}));if(n){if(n=n.slice(3),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void g.warn("ignoring attaching to disabled format",n,e);if(null==a.default.query(n))return void g.warn("ignoring attaching to nonexistent format",n,e)}var r="SELECT"===e.tagName?"change":"click";e.addEventListener(r,(function(r){var s=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var u=e.options[e.selectedIndex];s=!u.hasAttribute("selected")&&(u.value||!1)}else s=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),r.preventDefault();t.quill.focus();var c=t.quill.selection.getRange(),f=o(c,1)[0];if(null!=t.handlers[n])t.handlers[n].call(t,s);else if(a.default.query(n).prototype instanceof a.default.Embed){if(!(s=prompt("Enter "+n)))return;t.quill.updateContents((new i.default).retain(f.index).delete(f.length).insert(d({},n,s)),l.default.sources.USER)}else t.quill.format(n,s,l.default.sources.USER);t.update(f)})),this.controls.push([n,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);this.controls.forEach((function(n){var r=o(n,2),i=r[0],a=r[1];if("SELECT"===a.tagName){var l=void 0;if(null==e)l=null;else if(null==t[i])l=a.querySelector("option[selected]");else if(!Array.isArray(t[i])){var s=t[i];"string"==typeof s&&(s=s.replace(/\"/g,'\\"')),l=a.querySelector('option[value="'+s+'"]')}null==l?(a.value="",a.selectedIndex=-1):l.selected=!0}else if(null==e)a.classList.remove("ql-active");else if(a.hasAttribute("value")){var u=t[i]===a.getAttribute("value")||null!=t[i]&&t[i].toString()===a.getAttribute("value")||null==t[i]&&!a.getAttribute("value");a.classList.toggle("ql-active",u)}else a.classList.toggle("ql-active",null!=t[i])}))}}]),t}(u.default);function v(e,t,n){var o=document.createElement("button");o.setAttribute("type","button"),o.classList.add("ql-"+t),null!=n&&(o.value=n),e.appendChild(o)}function y(e,t){Array.isArray(t[0])||(t=[t]),t.forEach((function(t){var n=document.createElement("span");n.classList.add("ql-formats"),t.forEach((function(e){if("string"==typeof e)v(n,e);else{var t=Object.keys(e)[0],o=e[t];Array.isArray(o)?b(n,t,o):v(n,t,o)}})),e.appendChild(n)}))}function b(e,t,n){var o=document.createElement("select");o.classList.add("ql-"+t),n.forEach((function(e){var t=document.createElement("option");!1!==e?t.setAttribute("value",e):t.setAttribute("selected","selected"),o.appendChild(t)})),e.appendChild(o)}m.DEFAULTS={},m.DEFAULTS={container:null,handlers:{clean:function(){var e=this,t=this.quill.getSelection();if(null!=t)if(0==t.length){var n=this.quill.getFormat();Object.keys(n).forEach((function(t){null!=a.default.query(t,a.default.Scope.INLINE)&&e.quill.format(t,!1)}))}else this.quill.removeFormat(t,l.default.sources.USER)},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",l.default.sources.USER):!e&&"right"===t&&this.quill.format("align",!1,l.default.sources.USER),this.quill.format("direction",e,l.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),o=parseInt(n.indent||0);if("+1"===e||"-1"===e){var r="+1"===e?1:-1;"rtl"===n.direction&&(r*=-1),this.quill.format("indent",o+r,l.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,l.default.sources.USER)},list:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,l.default.sources.USER):this.quill.format("list","unchecked",l.default.sources.USER):this.quill.format("list",e,l.default.sources.USER)}}},t.default=m,t.addControls=y},function(e,t){e.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(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){function t(e,n){a(this,t);var o=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.label.innerHTML=n,o.container.classList.add("ql-color-picker"),[].slice.call(o.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(e){e.classList.add("ql-primary")})),o}return s(t,e),o(t,[{key:"buildItem",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"buildItem",this).call(this,e);return n.style.backgroundColor=e.getAttribute("value")||"",n}},{key:"selectItem",value:function(e,n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n);var o=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";o&&("line"===o.tagName?o.style.stroke=i:o.style.fill=i)}}]),t}(i(n(28)).default);t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){function t(e,n){a(this,t);var o=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.container.classList.add("ql-icon-picker"),[].forEach.call(o.container.querySelectorAll(".ql-picker-item"),(function(e){e.innerHTML=n[e.getAttribute("data-value")||""]})),o.defaultItem=o.container.querySelector(".ql-selected"),o.selectItem(o.defaultItem),o}return s(t,e),o(t,[{key:"selectItem",value:function(e,n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}(i(n(28)).default);t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(t,n){var o=this;r(this,e),this.quill=t,this.boundsContainer=n||document.body,this.root=t.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(e,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(e){var t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=t+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var o=this.boundsContainer.getBoundingClientRect(),r=this.root.getBoundingClientRect(),i=0;if(r.right>o.right&&(i=o.right-r.right,this.root.style.left=t+i+"px"),r.left<o.left&&(i=o.left-r.left,this.root.style.left=t+i+"px"),r.bottom>o.bottom){var a=r.bottom-r.top,l=e.bottom-e.top+a;this.root.style.top=n-l+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=p(n(3)),l=p(n(8)),s=n(43),u=p(s),c=p(n(27)),d=n(15),f=p(n(41));function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],y=function(e){function t(e,n){h(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=v);var o=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.quill.container.classList.add("ql-snow"),o}return m(t,e),i(t,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow"),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),f.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),f.default),this.tooltip=new b(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(t,n){e.handlers.link.call(e,!n.format.link)}))}}]),t}(u.default);y.DEFAULTS=(0,a.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){if(e){var t=this.quill.getSelection();if(null==t||0==t.length)return;var n=this.quill.getText(t);/^\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(e){function t(e,n){h(this,t);var o=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.preview=o.root.querySelector("a.ql-preview"),o}return m(t,e),i(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",(function(t){e.root.classList.contains("ql-editing")?e.save():e.edit("link",e.preview.textContent),t.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(function(t){if(null!=e.linkRange){var n=e.linkRange;e.restoreFocus(),e.quill.formatText(n,"link",!1,l.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()})),this.quill.on(l.default.events.SELECTION_CHANGE,(function(t,n,r){if(null!=t){if(0===t.length&&r===l.default.sources.USER){var i=e.quill.scroll.descendant(c.default,t.index),a=o(i,2),s=a[0],u=a[1];if(null!=s){e.linkRange=new d.Range(t.index-u,s.length());var f=c.default.formats(s.domNode);return e.preview.textContent=f,e.preview.setAttribute("href",f),e.show(),void e.position(e.quill.getBounds(e.linkRange))}}else delete e.linkRange;e.hide()}}))}},{key:"show",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}(s.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(""),t.default=y},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=D(n(29)),r=n(36),i=n(38),a=n(64),l=D(n(65)),s=D(n(66)),u=n(67),c=D(u),d=n(37),f=n(26),p=n(39),h=n(40),g=D(n(56)),m=D(n(68)),v=D(n(27)),y=D(n(69)),b=D(n(70)),w=D(n(71)),x=D(n(72)),_=D(n(73)),k=n(13),E=D(k),C=D(n(74)),O=D(n(75)),S=D(n(57)),N=D(n(41)),j=D(n(28)),T=D(n(59)),P=D(n(60)),M=D(n(61)),A=D(n(108)),R=D(n(62));function D(e){return e&&e.__esModule?e:{default:e}}o.default.register({"attributors/attribute/direction":i.DirectionAttribute,"attributors/class/align":r.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":f.ColorClass,"attributors/class/direction":i.DirectionClass,"attributors/class/font":p.FontClass,"attributors/class/size":h.SizeClass,"attributors/style/align":r.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":f.ColorStyle,"attributors/style/direction":i.DirectionStyle,"attributors/style/font":p.FontStyle,"attributors/style/size":h.SizeStyle},!0),o.default.register({"formats/align":r.AlignClass,"formats/direction":i.DirectionClass,"formats/indent":a.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":f.ColorStyle,"formats/font":p.FontClass,"formats/size":h.SizeClass,"formats/blockquote":l.default,"formats/code-block":E.default,"formats/header":s.default,"formats/list":c.default,"formats/bold":g.default,"formats/code":k.Code,"formats/italic":m.default,"formats/link":v.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":w.default,"formats/image":x.default,"formats/video":_.default,"formats/list/item":u.ListItem,"modules/formula":C.default,"modules/syntax":O.default,"modules/toolbar":S.default,"themes/bubble":A.default,"themes/snow":R.default,"ui/icons":N.default,"ui/picker":j.default,"ui/icon-picker":P.default,"ui/color-picker":T.default,"ui/tooltip":M.default},!0),t.default=o.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=a(n(0));function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){function t(){return l(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),o(t,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var o=this.value(e)||0;n="+1"===n?o+1:o-1}return 0===n?(this.remove(e),!0):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,n)}},{key:"canAdd",value:function(e,n){return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,n)||r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(n))}},{key:"value",value:function(e){return parseInt(r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}(i.default.Attributor.Class),d=new c("indent","ql-indent",{scope:i.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=d},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(o(n(4)).default);l.blotName="blockquote",l.tagName="blockquote",t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),o(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}(r(n(4)).default);s.blotName="header",s.tagName=["H1","H2","H3","H4","H5","H6"],t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=s(n(0)),a=s(n(4)),l=s(n(25));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function t(){return c(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return f(t,e),o(t,[{key:"format",value:function(e,n){e!==h.blotName||n?r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n):this.replaceWith(i.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(e,n){return this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName?(this.parent.replaceWith(e,n),this):(this.parent.unwrap(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e,n))}}],[{key:"formats",value:function(e){return e.tagName===this.tagName?void 0:r(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}(a.default);p.blotName="list-item",p.tagName="LI";var h=function(e){function t(e){c(this,t);var n=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=function(t){if(t.target.parentNode===e){var o=n.statics.formats(e),r=i.default.find(t.target);"checked"===o?r.format("list","unchecked"):"unchecked"===o&&r.format("list","checked")}};return e.addEventListener("touchstart",o),e.addEventListener("mousedown",o),n}return f(t,e),o(t,null,[{key:"create",value:function(e){var n="ordered"===e?"OL":"UL",o=r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return("checked"===e||"unchecked"===e)&&o.setAttribute("data-checked","checked"===e),o}},{key:"formats",value:function(e){return"OL"===e.tagName?"ordered":"UL"===e.tagName?e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),o(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return u({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(e,n){if(e instanceof p)r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var o=null==n?this.length():n.offset(this),i=this.split(o);i.parent.insertBefore(e,i)}}},{key:"optimize",value:function(e){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);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(e){if(e.statics.blotName!==this.statics.blotName){var n=i.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(l.default);h.blotName="list",h.scope=i.default.Scope.BLOCK_BLOT,h.tagName=["OL","UL"],h.defaultChild="list-item",h.allowedChildren=[p],t.ListItem=p,t.default=h},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(o(n(56)).default);l.blotName="italic",l.tagName=["EM","I"],t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){function t(){return a(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e)}},{key:"formats",value:function(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}}]),t}(i(n(6)).default);u.blotName="script",u.tagName=["SUB","SUP"],t.default=u},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(o(n(6)).default);l.blotName="strike",l.tagName="S",t.default=l},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(o(n(6)).default);l.blotName="underline",l.tagName="U",t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=l(n(0)),a=n(27);function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=["alt","height","width"],f=function(e){function t(){return s(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,e),o(t,[{key:"format",value:function(e,n){d.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return d.reduce((function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t}),{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,a.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(i.default.Embed);f.blotName="image",f.tagName="IMG",t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=n(4),a=l(n(27));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=["height","width"],f=function(e){function t(){return s(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,e),o(t,[{key:"format",value:function(e,n){d.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return d.reduce((function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t}),{})}},{key:"sanitize",value:function(e){return a.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(i.BlockEmbed);f.blotName="video",f.className="ql-video",f.tagName="IFRAME",t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=s(n(35)),a=s(n(5)),l=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),o(t,null,[{key:"create",value:function(e){var n=r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&(window.katex.render(e,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",e)),n}},{key:"value",value:function(e){return e.getAttribute("data-value")}}]),t}(i.default);f.blotName="formula",f.className="ql-formula",f.tagName="SPAN";var p=function(e){function t(){u(this,t);var e=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return e}return d(t,e),o(t,null,[{key:"register",value:function(){a.default.register(f,!0)}}]),t}(l.default);t.FormulaBlot=f,t.default=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},i=s(n(0)),a=s(n(5)),l=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),o(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e)}},{key:"highlight",value:function(e){var t=this.domNode.textContent;this.cachedText!==t&&((t.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(s(n(13)).default);f.className="ql-syntax";var p=new i.default.Attributor.Class("token","hljs",{scope:i.default.Scope.INLINE}),h=function(e){function t(e,n){u(this,t);var o=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,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 r=null;return o.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(r),r=setTimeout((function(){o.highlight(),r=null}),o.options.interval)})),o.highlight(),o}return d(t,e),o(t,null,[{key:"register",value:function(){a.default.register(p,!0),a.default.register(f,!0)}}]),o(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(f).forEach((function(t){t.highlight(e.options.highlight)})),this.quill.update(a.default.sources.SILENT),null!=t&&this.quill.setSelection(t,a.default.sources.SILENT)}}}]),t}(l.default);h.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=f,t.CodeToken=p,t.default=h},function(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t){e.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(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var o=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0===a?void 0:a.call(o)},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=d(n(3)),a=d(n(8)),l=n(43),s=d(l),u=n(15),c=d(n(41));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],m=function(e){function t(e,n){f(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=g);var o=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.quill.container.classList.add("ql-bubble"),o}return h(t,e),r(t,[{key:"extendToolbar",value:function(e){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),c.default)}}]),t}(s.default);m.DEFAULTS=(0,i.default)(!0,{},s.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(e){function t(e,n){f(this,t);var o=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.quill.on(a.default.events.EDITOR_CHANGE,(function(e,t,n,r){if(e===a.default.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&r===a.default.sources.USER){o.show(),o.root.style.left="0px",o.root.style.width="",o.root.style.width=o.root.offsetWidth+"px";var i=o.quill.getLines(t.index,t.length);if(1===i.length)o.position(o.quill.getBounds(t));else{var l=i[i.length-1],s=o.quill.getIndex(l),c=Math.min(l.length()-1,t.index+t.length-s),d=o.quill.getBounds(new u.Range(s,c));o.position(d)}}else document.activeElement!==o.textbox&&o.quill.hasFocus()&&o.hide()})),o}return h(t,e),r(t,[{key:"listen",value:function(){var e=this;o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){e.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),t}(l.BaseTooltip);v.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(""),t.BubbleTooltip=v,t.default=m},function(e,t,n){e.exports=n(63)}]).default,hh=$t&&$t.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),gh=$t&&$t.__assign||function(){return gh=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},gh.apply(this,arguments)},mh=$t&&$t.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),r=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,l=i.length;a<l;a++,r++)o[r]=i[a];return o},vh=$t&&$t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},yh=vh(t),bh=vh(pe),wh=vh(dh),xh=vh(ph),_h=function(e){function t(t){var n=e.call(this,t)||this;n.dirtyProps=["modules","formats","bounds","theme","children"],n.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],n.state={generation:0},n.selection=null,n.onEditorChange=function(e,t,o,r){var i,a,l,s;"text-change"===e?null===(a=(i=n).onEditorChangeText)||void 0===a||a.call(i,n.editor.root.innerHTML,t,r,n.unprivilegedEditor):"selection-change"===e&&(null===(s=(l=n).onEditorChangeSelection)||void 0===s||s.call(l,t,r,n.unprivilegedEditor))};var o=n.isControlled()?t.value:t.defaultValue;return n.value=o??"",n}return hh(t,e),t.prototype.validateProps=function(e){var t;if(yh.default.Children.count(e.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(yh.default.Children.count(e.children)&&"textarea"===(null===(t=yh.default.Children.only(e.children))||void 0===t?void 0:t.type))throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.");if(this.lastDeltaChangeSet&&e.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},t.prototype.shouldComponentUpdate=function(e,t){var n=this;if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){var o=this.getEditorContents(),r=e.value??"";this.isEqualValue(r,o)||this.setEditorContents(this.editor,r)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),mh(this.cleanProps,this.dirtyProps).some((function(t){return!wh.default(e[t],n.props[t])}))},t.prototype.shouldComponentRegenerate=function(e){var t=this;return this.dirtyProps.some((function(n){return!wh.default(e[n],t.props[n])}))},t.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},t.prototype.componentWillUnmount=function(){this.destroyEditor()},t.prototype.componentDidUpdate=function(e,t){var n=this;if(this.editor&&this.shouldComponentRegenerate(e)){var o=this.editor.getContents(),r=this.editor.getSelection();this.regenerationSnapshot={delta:o,selection:r},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==t.generation){var i=this.regenerationSnapshot,a=(o=i.delta,i.selection);delete this.regenerationSnapshot,this.instantiateEditor();var l=this.editor;l.setContents(o),kh((function(){return n.setEditorSelection(l,a)}))}},t.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},t.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},t.prototype.isControlled=function(){return"value"in this.props},t.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},t.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},t.prototype.createEditor=function(e,t){var n=new xh.default(e,t);return null!=t.tabIndex&&this.setEditorTabIndex(n,t.tabIndex),this.hookEditor(n),n},t.prototype.hookEditor=function(e){this.unprivilegedEditor=this.makeUnprivilegedEditor(e),e.on("editor-change",this.onEditorChange)},t.prototype.unhookEditor=function(e){e.off("editor-change",this.onEditorChange)},t.prototype.getEditorContents=function(){return this.value},t.prototype.getEditorSelection=function(){return this.selection},t.prototype.isDelta=function(e){return e&&e.ops},t.prototype.isEqualValue=function(e,t){return this.isDelta(e)&&this.isDelta(t)?wh.default(e.ops,t.ops):wh.default(e,t)},t.prototype.setEditorContents=function(e,t){var n=this;this.value=t;var o=this.getEditorSelection();"string"==typeof t?e.setContents(e.clipboard.convert(t)):e.setContents(t),kh((function(){return n.setEditorSelection(e,o)}))},t.prototype.setEditorSelection=function(e,t){if(this.selection=t,t){var n=e.getLength();t.index=Math.max(0,Math.min(t.index,n-1)),t.length=Math.max(0,Math.min(t.length,n-1-t.index)),e.setSelection(t)}},t.prototype.setEditorTabIndex=function(e,t){var n,o;null!==(o=null===(n=e)||void 0===n?void 0:n.scroll)&&void 0!==o&&o.domNode&&(e.scroll.domNode.tabIndex=t)},t.prototype.setEditorReadOnly=function(e,t){t?e.disable():e.enable()},t.prototype.makeUnprivilegedEditor=function(e){var t=e;return{getHTML:function(){return t.root.innerHTML},getLength:t.getLength.bind(t),getText:t.getText.bind(t),getContents:t.getContents.bind(t),getSelection:t.getSelection.bind(t),getBounds:t.getBounds.bind(t)}},t.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var e=bh.default.findDOMNode(this.editingArea);if(!e)throw new Error("Cannot find element for editing area");if(3===e.nodeType)throw new Error("Editing area cannot be a text node");return e},t.prototype.renderEditingArea=function(){var e=this,t=this.props,n=t.children,o=t.preserveWhitespace,r={key:this.state.generation,ref:function(t){e.editingArea=t}};return yh.default.Children.count(n)?yh.default.cloneElement(yh.default.Children.only(n),r):o?yh.default.createElement("pre",gh({},r)):yh.default.createElement("div",gh({},r))},t.prototype.render=function(){var e;return yh.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(e=this.props.className,e??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},t.prototype.onEditorChangeText=function(e,t,n,o){var r,i;if(this.editor){var a=this.isDelta(this.value)?o.getContents():o.getHTML();a!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=a,null===(i=(r=this.props).onChange)||void 0===i||i.call(r,e,t,n,o))}},t.prototype.onEditorChangeSelection=function(e,t,n){var o,r,i,a,l,s;if(this.editor){var u=this.getEditorSelection(),c=!u&&e,d=u&&!e;wh.default(e,u)||(this.selection=e,null===(r=(o=this.props).onChangeSelection)||void 0===r||r.call(o,e,t,n),c?null===(a=(i=this.props).onFocus)||void 0===a||a.call(i,e,t,n):d&&(null===(s=(l=this.props).onBlur)||void 0===s||s.call(l,u,t,n)))}},t.prototype.focus=function(){this.editor&&this.editor.focus()},t.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},t.displayName="React Quill",t.Quill=xh.default,t.defaultProps={theme:"snow",modules:{},readOnly:!1},t}(yh.default.Component);function kh(e){Promise.resolve().then(e)}const Eh=Kt(_h),Ch="_viewMode_10b0t_1",Oh="_editMode_10b0t_2",Sh="_text-label_10b0t_24",Nh="_error-message_10b0t_28",jh={toolbar:[[{font:[]}],[{size:[]}],["bold","italic","underline","strike","blockquote"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"}]]},Th=["size","font","bold","italic","underline","strike","blockquote","list","bullet","indent"],Ph=({dataTest:e,...t})=>en.jsxs(en.Fragment,{children:[t.label&&en.jsx("span",{className:Io(Sh),"data-test":`label-${e}`,children:t.label}),t.disabled?en.jsx(Eh,{...t,className:Io(Ch,t.className),readOnly:!0,modules:{toolbar:!1},"data-test":e}):en.jsx(Eh,{...t,className:Io(Oh,t.className),modules:{...jh,...t.modules},formats:{...Th,...t.formats},"data-test":e}),(t.is_error?"error":t.is_warning?"warning":!!t.isRequired||null)&&en.jsx("span",{className:Nh,"data-test":`error-${e}`,children:t.error?t.error:"error"})]}),Mh=({dataTest:e,allowClear:t,...n})=>en.jsx(T,{...n,"data-test":e,value:n.value,IconComponent:e=>en.jsx(oa,{...e,icon:"material-symbols:expand-more-rounded",width:24,height:24,className:Io(e.className,"select-custom-icon")}),endAdornment:t&&n.value?en.jsx("div",{className:"hover:bg-gama-100 duration-300 absolute right-8 p-[2px] rounded-full flex items-center justify-center",onClick:()=>{var e;null==(e=n.onChange)||e.call(n,{target:{value:""}},null)},children:en.jsx($a,{width:18,height:18})}):null,sx:{".MuiOutlinedInput-notchedOutline":{borderColor:"var(--colors-delta-500) !important"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"var(--colors-gama-500) !important"},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:"var(--colors-error-500) !important"},"& .MuiInputBase-colorPrimary.Mui-error fieldset":{borderColor:"var(--colors-error-500) !important"},"&.Mui-focused::after":{borderColor:"var(--colors-gama-500) !important"},"& .select-custom-icon":{marginTop:"-3.5px !important"},...n.sx}}),Ah=e=>en.jsx(P,{...e,sx:{"&.MuiMenuItem-root":{fontSize:"14px !important"},"&.Mui-selected":{backgroundColor:"var(--colors-gama-50) !important"}},children:e.children});function Rh({dataTest:e,...t}){return en.jsx(M,{...t,className:Io("!text-sm",t.className),popupIcon:t.popupIcon||en.jsx(oa,{icon:"material-symbols:expand-more-rounded",width:24,height:24,className:Io("select-custom-icon")}),"data-test":e,PaperComponent:({children:t})=>en.jsx(A,{"data-test":`paper-${e}`,sx:{"& ul":{padding:"0 !important"},"& .MuiAutocomplete-option.Mui-focused":{background:"var(--colors-delta-50) !important"},"& li[aria-selected=true]":{background:"var(--colors-gama-50) !important"},"& li[aria-selected=true].MuiAutocomplete-option.Mui-focused":{background:"var(--colors-gama-50) !important"}},children:t}),sx:{...t.sx,"& .MuiOutlinedInput-notchedOutline":{borderColor:"var(--colors-gama-500) !important"},"& .select-custom-icon":{marginTop:"-0.5px !important"},"& .MuiInputBase-inputSizeSmall":{minHeight:"23px !important"}}})}const Dh=({dataTest:e,...t})=>{var n,o,r;return en.jsx(R,{...t,"data-test":e,classes:{...t.classes},slotProps:{...t.slotProps,thumb:{className:Io("w-4 h-4","before:shadow-none","vertical"===t.orientation?"ml-0 mb-1":"ml-1",t.disabled||!t.value?"bg-delta-200":"bg-gama-600"),...null==(n=t.slotProps)?void 0:n.thumb},rail:{className:"bg-delta-200",...null==(o=t.slotProps)?void 0:o.rail},markLabel:{className:Io("text-delta-600 text-sm font-semibold ml-1","vertical"===t.orientation&&"mb-1"),...null==(r=t.slotProps)?void 0:r.markLabel}},sx:{...t.sx,"& .MuiSlider-track":{backgroundColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)",borderColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)"},"& .MuiSlider-mark":{backgroundColor:"white",border:"1px solid var(--colors-gray-200)",borderRadius:"50%",height:"8px",width:"8px","&.MuiSlider-markActive":{backgroundColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)",border:"1px solid",borderColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)",opacity:1}}}})},Ih=({dataTest:e,...t})=>en.jsx(D,{...t,"data-test":e,sx:{"& .MuiButtonBase-root.Mui-checked":{color:"var(--colors-gama-500) !important"},"& .Mui-disabled .MuiSwitch-thumb":{backgroundColor:"var(--colors-gama-200) !important"},"& .MuiSwitch-thumb":{backgroundColor:"var(--colors-gama-500) !important"},"& .MuiSwitch-input:not(:checked) ~ .MuiSwitch-thumb":{backgroundColor:"var(--colors-gray-10) !important"},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:"var(--colors-gama-200) !important"},"& .PrivateSwitchBase-input.MuiSwitch-input":{height:"100% !important"}}}),Lh=({dataTest:e,...t})=>en.jsx(I,{...t,"data-test":e,sx:{"&":{color:"var(--colors-gray-200)"},"& input":{height:"100% !important",width:"100% !important"},"&.Mui-checked":{color:"var(--colors-gama-500)"}}}),qh=({dataTest:e,...t})=>en.jsx(L,{"data-test":e,...t}),Fh=({children:e,onClick:t,className:n,dataTest:o,style:r})=>en.jsx("div",{className:Io("styled-label",n),style:r,onClick:t,"data-test":o,children:e});const Vh={code:"en-GB",formatDistance:gt,formatLong:{date:mt({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:mt({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:mt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:bt,localize:xt,match:Et,options:{weekStartsOn:1,firstWeekContainsDate:4}};var zh=function(){return zh=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},zh.apply(this,arguments)};function Bh(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function Hh(e){return"multiple"===e.mode}function Uh(e){return"range"===e.mode}function Wh(e){return"single"===e.mode}var Gh={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var $h=Object.freeze({__proto__:null,formatCaption:function(e,t){return Pt(e,"LLLL y",t)},formatDay:function(e,t){return Pt(e,"d",t)},formatMonthCaption:function(e,t){return Pt(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Pt(e,"cccccc",t)},formatYearCaption:function(e,t){return Pt(e,"yyyy",t)}}),Kh=Object.freeze({__proto__:null,labelDay:function(e,t,n){return Pt(e,"do MMMM (EEEE)",n)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return Pt(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var Yh=g(void 0);function Zh(e){var n,o,r=e.initialProps,i={captionLayout:"buttons",classNames:Gh,formatters:$h,labels:Kh,locale:Ct,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:new Date,mode:"default"},a=function(e){var t=e.fromYear,n=e.toYear,o=e.fromMonth,r=e.toMonth,i=e.fromDate,a=e.toDate;return o?i=qe(o):t&&(i=new Date(t,0,1)),r?a=Le(r):n&&(a=new Date(n,11,31)),{fromDate:i?Ne(i):void 0,toDate:a?Ne(a):void 0}}(r),l=a.fromDate,s=a.toDate,u=null!==(n=r.captionLayout)&&void 0!==n?n:i.captionLayout;"buttons"!==u&&(!l||!s)&&(u="buttons"),(Wh(r)||Hh(r)||Uh(r))&&(o=r.onSelect);var c=zh(zh(zh({},i),r),{captionLayout:u,classNames:zh(zh({},i.classNames),r.classNames),components:zh({},r.components),formatters:zh(zh({},i.formatters),r.formatters),fromDate:l,labels:zh(zh({},i.labels),r.labels),mode:r.mode||i.mode,modifiers:zh(zh({},i.modifiers),r.modifiers),modifiersClassNames:zh(zh({},i.modifiersClassNames),r.modifiersClassNames),onSelect:o,styles:zh(zh({},i.styles),r.styles),toDate:s});return t.createElement(Yh.Provider,{value:c},e.children)}function Xh(){var e=s(Yh);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function Qh(e){var n=Xh(),o=n.locale,r=n.classNames,i=n.styles,a=n.formatters.formatCaption;return t.createElement("div",{className:r.caption_label,style:i.caption_label,"aria-live":"polite",role:"presentation",id:e.id},a(e.displayMonth,{locale:o}))}function Jh(e){return t.createElement("svg",zh({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e),t.createElement("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"}))}function eg(e){var n,o,r=e.onChange,i=e.value,a=e.children,l=e.caption,s=e.className,u=e.style,c=Xh(),d=null!==(o=null===(n=c.components)||void 0===n?void 0:n.IconDropdown)&&void 0!==o?o:Jh;return t.createElement("div",{className:s,style:u},t.createElement("span",{className:c.classNames.vhidden},e["aria-label"]),t.createElement("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:i,onChange:r},a),t.createElement("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true"},l,t.createElement(d,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})))}function tg(e){var n,o=Xh(),r=o.fromDate,i=o.toDate,a=o.styles,l=o.locale,s=o.formatters.formatMonthCaption,u=o.classNames,c=o.components,d=o.labels.labelMonthDropdown;if(!r)return t.createElement(t.Fragment,null);if(!i)return t.createElement(t.Fragment,null);var f=[];if(function(e,t){ye(2,arguments);var n=be(e),o=be(t);return n.getFullYear()===o.getFullYear()}(r,i))for(var p=qe(r),h=r.getMonth();h<=i.getMonth();h++)f.push(Bt(p,h));else for(p=qe(new Date),h=0;h<=11;h++)f.push(Bt(p,h));var g=null!==(n=null==c?void 0:c.Dropdown)&&void 0!==n?n:eg;return t.createElement(g,{name:"months","aria-label":d(),className:u.dropdown_month,style:a.dropdown_month,onChange:function(t){var n=Number(t.target.value),o=Bt(qe(e.displayMonth),n);e.onChange(o)},value:e.displayMonth.getMonth(),caption:s(e.displayMonth,{locale:l})},f.map((function(e){return t.createElement("option",{key:e.getMonth(),value:e.getMonth()},s(e,{locale:l}))})))}function ng(e){var n,o=e.displayMonth,r=Xh(),i=r.fromDate,a=r.toDate,l=r.locale,s=r.styles,u=r.classNames,c=r.components,d=r.formatters.formatYearCaption,f=r.labels.labelYearDropdown,p=[];if(!i)return t.createElement(t.Fragment,null);if(!a)return t.createElement(t.Fragment,null);for(var h=i.getFullYear(),g=a.getFullYear(),m=h;m<=g;m++)p.push(Ut(Fe(new Date),m));var v=null!==(n=null==c?void 0:c.Dropdown)&&void 0!==n?n:eg;return t.createElement(v,{name:"years","aria-label":f(),className:u.dropdown_year,style:s.dropdown_year,onChange:function(t){var n=Ut(qe(o),Number(t.target.value));e.onChange(n)},value:o.getFullYear(),caption:d(o,{locale:l})},p.map((function(e){return t.createElement("option",{key:e.getFullYear(),value:e.getFullYear()},d(e,{locale:l}))})))}function og(){var e=Xh(),t=function(e){var t=e.month,n=e.defaultMonth,o=e.today,r=t||n||o||new Date,i=e.toDate,a=e.fromDate,l=e.numberOfMonths,s=void 0===l?1:l;return i&&De(i,r)<0&&(r=xe(i,-1*(s-1))),a&&De(r,a)<0&&(r=a),qe(r)}(e),n=function(e,t){var n=f(e),o=n[0];return[void 0===t?o:t,n[1]]}(t,e.month),o=n[0],r=n[1];return[o,function(t){var n;if(!e.disableNavigation){var o=qe(t);r(o),null===(n=e.onMonthChange)||void 0===n||n.call(e,o)}}]}var rg=g(void 0);function ig(e){var n=Xh(),o=og(),r=o[0],i=o[1],a=function(e,t){for(var n=t.reverseMonths,o=t.numberOfMonths,r=qe(e),i=De(qe(xe(r,o)),r),a=[],l=0;l<i;l++){var s=xe(r,l);a.push(s)}return n&&(a=a.reverse()),a}(r,n),l=function(e,t){if(!t.disableNavigation){var n=t.toDate,o=t.pagedNavigation,r=t.numberOfMonths,i=void 0===r?1:r,a=o?i:1,l=qe(e);if(!n)return xe(l,a);if(!(De(n,e)<i))return xe(l,a)}}(r,n),s=function(e,t){if(!t.disableNavigation){var n=t.fromDate,o=t.pagedNavigation,r=t.numberOfMonths,i=o?void 0===r?1:r:1,a=qe(e);if(!n)return xe(a,-i);if(!(De(a,n)<=0))return xe(a,-i)}}(r,n),u=function(e){return a.some((function(t){return Vt(e,t)}))},c={currentMonth:r,displayMonths:a,goToMonth:i,goToDate:function(e,t){u(e)||(t&&qt(e,t)?i(xe(e,1+-1*n.numberOfMonths)):i(e))},previousMonth:s,nextMonth:l,isDateDisplayed:u};return t.createElement(rg.Provider,{value:c},e.children)}function ag(){var e=s(rg);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function lg(e){var n,o=Xh(),r=o.classNames,i=o.styles,a=o.components,l=ag().goToMonth,s=function(t){l(xe(t,e.displayIndex?-e.displayIndex:0))},u=null!==(n=null==a?void 0:a.CaptionLabel)&&void 0!==n?n:Qh,c=t.createElement(u,{id:e.id,displayMonth:e.displayMonth});return t.createElement("div",{className:r.caption_dropdowns,style:i.caption_dropdowns},t.createElement("div",{className:r.vhidden},c),t.createElement(tg,{onChange:s,displayMonth:e.displayMonth}),t.createElement(ng,{onChange:s,displayMonth:e.displayMonth}))}function sg(e){return t.createElement("svg",zh({width:"16px",height:"16px",viewBox:"0 0 120 120"},e),t.createElement("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"}))}function ug(e){return t.createElement("svg",zh({width:"16px",height:"16px",viewBox:"0 0 120 120"},e),t.createElement("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"}))}var cg=n((function(e,n){var o=Xh(),r=o.classNames,i=o.styles,a=[r.button_reset,r.button];e.className&&a.push(e.className);var l=a.join(" "),s=zh(zh({},i.button_reset),i.button);return e.style&&Object.assign(s,e.style),t.createElement("button",zh({},e,{ref:n,type:"button",className:l,style:s}))}));function dg(e){var n,o,r=Xh(),i=r.dir,a=r.locale,l=r.classNames,s=r.styles,u=r.labels,c=u.labelPrevious,d=u.labelNext,f=r.components;if(!e.nextMonth&&!e.previousMonth)return t.createElement(t.Fragment,null);var p=c(e.previousMonth,{locale:a}),h=[l.nav_button,l.nav_button_previous].join(" "),g=d(e.nextMonth,{locale:a}),m=[l.nav_button,l.nav_button_next].join(" "),v=null!==(n=null==f?void 0:f.IconRight)&&void 0!==n?n:ug,y=null!==(o=null==f?void 0:f.IconLeft)&&void 0!==o?o:sg;return t.createElement("div",{className:l.nav,style:s.nav},!e.hidePrevious&&t.createElement(cg,{name:"previous-month","aria-label":p,className:h,style:s.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick},"rtl"===i?t.createElement(v,{className:l.nav_icon,style:s.nav_icon}):t.createElement(y,{className:l.nav_icon,style:s.nav_icon})),!e.hideNext&&t.createElement(cg,{name:"next-month","aria-label":g,className:m,style:s.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick},"rtl"===i?t.createElement(y,{className:l.nav_icon,style:s.nav_icon}):t.createElement(v,{className:l.nav_icon,style:s.nav_icon})))}function fg(e){var n=Xh().numberOfMonths,o=ag(),r=o.previousMonth,i=o.nextMonth,a=o.goToMonth,l=o.displayMonths,s=l.findIndex((function(t){return Vt(e.displayMonth,t)})),u=0===s,c=s===l.length-1,d=n>1&&(u||!c),f=n>1&&(c||!u);return t.createElement(dg,{displayMonth:e.displayMonth,hideNext:d,hidePrevious:f,nextMonth:i,previousMonth:r,onPreviousClick:function(){r&&a(r)},onNextClick:function(){i&&a(i)}})}function pg(e){var n,o,r=Xh(),i=r.classNames,a=r.disableNavigation,l=r.styles,s=r.captionLayout,u=r.components,c=null!==(n=null==u?void 0:u.CaptionLabel)&&void 0!==n?n:Qh;return o=a?t.createElement(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===s?t.createElement(lg,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===s?t.createElement(t.Fragment,null,t.createElement(lg,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),t.createElement(fg,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})):t.createElement(t.Fragment,null,t.createElement(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),t.createElement(fg,{displayMonth:e.displayMonth,id:e.id})),t.createElement("div",{className:i.caption,style:l.caption},o)}function hg(e){var n=Xh(),o=n.footer,r=n.styles,i=n.classNames.tfoot;return o?t.createElement("tfoot",{className:i,style:r.tfoot},t.createElement("tr",null,t.createElement("td",{colSpan:8},o))):t.createElement(t.Fragment,null)}function gg(){var e=Xh(),n=e.classNames,o=e.styles,r=e.showWeekNumber,i=e.locale,a=e.weekStartsOn,l=e.ISOWeek,s=e.formatters.formatWeekdayName,u=e.labels.labelWeekday,c=function(e,t,n){for(var o=n?Ce(new Date):Ee(new Date,{locale:e,weekStartsOn:t}),r=[],i=0;i<7;i++){var a=we(o,i);r.push(a)}return r}(i,a,l);return t.createElement("tr",{style:o.head_row,className:n.head_row},r&&t.createElement("td",{style:o.head_cell,className:n.head_cell}),c.map((function(e,r){return t.createElement("th",{key:r,scope:"col",className:n.head_cell,style:o.head_cell,"aria-label":u(e,{locale:i})},s(e,{locale:i}))})))}function mg(){var e,n=Xh(),o=n.classNames,r=n.styles,i=n.components,a=null!==(e=null==i?void 0:i.HeadRow)&&void 0!==e?e:gg;return t.createElement("thead",{style:r.head,className:o.head},t.createElement(a,null))}function vg(e){var n=Xh(),o=n.locale,r=n.formatters.formatDay;return t.createElement(t.Fragment,null,r(e.date,{locale:o}))}var yg=g(void 0);function bg(e){if(!Hh(e.initialProps)){return t.createElement(yg.Provider,{value:{selected:void 0,modifiers:{disabled:[]}}},e.children)}return t.createElement(wg,{initialProps:e.initialProps,children:e.children})}function wg(e){var n=e.initialProps,o=e.children,r=n.selected,i=n.min,a=n.max,l={disabled:[]};r&&l.disabled.push((function(e){var t=a&&r.length>a-1,n=r.some((function(t){return Ae(t,e)}));return!(!t||n)}));var s={selected:r,onDayClick:function(e,t,o){var l,s;if((null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,o),!!(!t.selected||!i||(null==r?void 0:r.length)!==i))&&!!(t.selected||!a||(null==r?void 0:r.length)!==a)){var u=r?Bh([],r,!0):[];if(t.selected){var c=u.findIndex((function(t){return Ae(e,t)}));u.splice(c,1)}else u.push(e);null===(s=n.onSelect)||void 0===s||s.call(n,u,e,t,o)}},modifiers:l};return t.createElement(yg.Provider,{value:s},o)}function xg(){var e=s(yg);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var _g,kg=g(void 0);function Eg(e){if(!Uh(e.initialProps)){return t.createElement(kg.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}}},e.children)}return t.createElement(Cg,{initialProps:e.initialProps,children:e.children})}function Cg(e){var n=e.initialProps,o=e.children,r=n.selected,i=r||{},a=i.from,l=i.to,s=n.min,u=n.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(a?(c.range_start=[a],l?(c.range_end=[l],Ae(a,l)||(c.range_middle=[{after:a,before:l}])):c.range_end=[a]):l&&(c.range_start=[l],c.range_end=[l]),s&&(a&&!l&&c.disabled.push({after:zt(a,s-1),before:we(a,s-1)}),a&&l&&c.disabled.push({after:a,before:we(a,s-1)}),!a&&l&&c.disabled.push({after:zt(l,s-1),before:we(l,s-1)})),u){if(a&&!l&&(c.disabled.push({before:we(a,1-u)}),c.disabled.push({after:we(a,u-1)})),a&&l){var d=u-(Te(l,a)+1);c.disabled.push({before:zt(a,d)}),c.disabled.push({after:we(l,d)})}!a&&l&&(c.disabled.push({before:we(l,1-u)}),c.disabled.push({after:we(l,u-1)}))}return t.createElement(kg.Provider,{value:{selected:r,onDayClick:function(e,t,o){var i,a;null===(i=n.onDayClick)||void 0===i||i.call(n,e,t,o);var l=function(e,t){var n=t||{},o=n.from,r=n.to;return o&&r?Ae(r,e)&&Ae(o,e)?void 0:Ae(r,e)?{from:r,to:void 0}:Ae(o,e)?void 0:Lt(o,e)?{from:e,to:r}:{from:o,to:e}:r?Lt(e,r)?{from:r,to:e}:{from:e,to:r}:o?qt(e,o)?{from:e,to:o}:{from:o,to:e}:{from:e,to:void 0}}(e,r);null===(a=n.onSelect)||void 0===a||a.call(n,l,e,t,o)},modifiers:c}},o)}function Og(){var e=s(kg);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Sg(e){return Array.isArray(e)?Bh([],e,!0):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(_g||(_g={}));var Ng=_g.Selected,jg=_g.Disabled,Tg=_g.Hidden,Pg=_g.Today,Mg=_g.RangeEnd,Ag=_g.RangeMiddle,Rg=_g.RangeStart,Dg=_g.Outside;var Ig=g(void 0);function Lg(e){var n=Xh(),o=function(e,t,n){var o,r=((o={})[Ng]=Sg(e.selected),o[jg]=Sg(e.disabled),o[Tg]=Sg(e.hidden),o[Pg]=[e.today],o[Mg]=[],o[Ag]=[],o[Rg]=[],o[Dg]=[],o);return e.fromDate&&r[jg].push({before:e.fromDate}),e.toDate&&r[jg].push({after:e.toDate}),Hh(e)?r[jg]=r[jg].concat(t.modifiers[jg]):Uh(e)&&(r[jg]=r[jg].concat(n.modifiers[jg]),r[Rg]=n.modifiers[Rg],r[Ag]=n.modifiers[Ag],r[Mg]=n.modifiers[Mg]),r}(n,xg(),Og()),r=function(e){var t={};return Object.entries(e).forEach((function(e){var n=e[0],o=e[1];t[n]=Sg(o)})),t}(n.modifiers),i=zh(zh({},o),r);return t.createElement(Ig.Provider,{value:i},e.children)}function qg(){var e=s(Ig);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function Fg(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(function(e){return Re(e)}(t))return Ae(e,t);if(function(e){return Array.isArray(e)&&e.every(Re)}(t))return t.includes(e);if(function(e){return!(!e||"object"!=typeof e||!("from"in e))}(t))return function(e,t){var n,o=t.from,r=t.to;return o&&r?(Te(r,o)<0&&(o=(n=[r,o])[0],r=n[1]),Te(e,o)>=0&&Te(r,e)>=0):r?Ae(r,e):!!o&&Ae(o,e)}(e,t);if(function(e){return!(!e||"object"!=typeof e||!("dayOfWeek"in e))}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return!!(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var n=Te(t.before,e)>0,o=Te(t.after,e)<0;return Lt(t.before,t.after)?o&&n:n||o}return function(e){return!(!e||"object"!=typeof e||!("after"in e))}(t)?Te(e,t.after)>0:function(e){return!(!e||"object"!=typeof e||!("before"in e))}(t)?Te(t.before,e)>0:"function"==typeof t&&t(e)}))}function Vg(e,t,n){var o=Object.keys(t).reduce((function(n,o){var r=t[o];return Fg(e,r)&&n.push(o),n}),[]),r={};return o.forEach((function(e){return r[e]=!0})),n&&!Vt(e,n)&&(r.outside=!0),r}var zg=365;function Bg(e,t){var n=t.moveBy,o=t.direction,r=t.context,i=t.modifiers,a=t.retry,l=void 0===a?{count:0,lastFocused:e}:a,s=r.weekStartsOn,u=r.fromDate,c=r.toDate,d=r.locale,f={day:we,week:Pe,month:xe,year:Me,startOfWeek:function(e){return r.ISOWeek?Ce(e):Ee(e,{locale:d,weekStartsOn:s})},endOfWeek:function(e){return r.ISOWeek?ze(e):Ve(e,{locale:d,weekStartsOn:s})}}[n](e,"after"===o?1:-1);"before"===o&&u?f=function(e){var t,n;if(ye(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==me(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=be(e);(void 0===n||n<t||isNaN(Number(t)))&&(n=t)})),n||new Date(NaN)}([u,f]):"after"===o&&c&&(f=function(e){var t,n;if(ye(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==me(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=be(e);(void 0===n||n>t||isNaN(t.getDate()))&&(n=t)})),n||new Date(NaN)}([c,f]));var p=!0;if(i){var h=Vg(f,i);p=!h.disabled&&!h.hidden}return p?f:l.count>zg?l.lastFocused:Bg(f,{moveBy:n,direction:o,context:r,modifiers:i,retry:zh(zh({},l),{count:l.count+1})})}var Hg=g(void 0);function Ug(e){var n=ag(),o=qg(),r=f(),i=r[0],a=r[1],l=f(),s=l[0],u=l[1],c=function(e,t){for(var n,o,r=qe(e[0]),i=Le(e[e.length-1]),a=r;a<=i;){var l=Vg(a,t);if(l.disabled||l.hidden)a=we(a,1);else{if(l.selected)return a;l.today&&!o&&(o=a),n||(n=a),a=we(a,1)}}return o||n}(n.displayMonths,o),d=i??(s&&n.isDateDisplayed(s))?s:c,p=function(e){a(e)},h=Xh(),g=function(e,t){if(i){var r=Bg(i,{moveBy:e,direction:t,context:h,modifiers:o});Ae(i,r)||(n.goToDate(r,i),p(r))}},m={focusedDay:i,focusTarget:d,blur:function(){u(i),a(void 0)},focus:p,focusDayAfter:function(){return g("day","after")},focusDayBefore:function(){return g("day","before")},focusWeekAfter:function(){return g("week","after")},focusWeekBefore:function(){return g("week","before")},focusMonthBefore:function(){return g("month","before")},focusMonthAfter:function(){return g("month","after")},focusYearBefore:function(){return g("year","before")},focusYearAfter:function(){return g("year","after")},focusStartOfWeek:function(){return g("startOfWeek","before")},focusEndOfWeek:function(){return g("endOfWeek","after")}};return t.createElement(Hg.Provider,{value:m},e.children)}function Wg(){var e=s(Hg);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var Gg=g(void 0);function $g(e){if(!Wh(e.initialProps)){return t.createElement(Gg.Provider,{value:{selected:void 0}},e.children)}return t.createElement(Kg,{initialProps:e.initialProps,children:e.children})}function Kg(e){var n=e.initialProps,o=e.children,r={selected:n.selected,onDayClick:function(e,t,o){var r,i,a;null===(r=n.onDayClick)||void 0===r||r.call(n,e,t,o),!t.selected||n.required?null===(a=n.onSelect)||void 0===a||a.call(n,e,e,t,o):null===(i=n.onSelect)||void 0===i||i.call(n,void 0,e,t,o)}};return t.createElement(Gg.Provider,{value:r},o)}function Yg(){var e=s(Gg);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function Zg(e,t){var n=[e.classNames.day];return Object.keys(t).forEach((function(t){var o=e.modifiersClassNames[t];if(o)n.push(o);else if(function(e){return Object.values(_g).includes(e)}(t)){var r=e.classNames["day_".concat(t)];r&&n.push(r)}})),n}function Xg(e,n,o){var r,a,l,s=Xh(),u=Wg(),c=function(e,t){return Vg(e,qg(),t)}(e,n),d=function(e,t){var n=Xh(),o=Yg(),r=xg(),i=Og(),a=Wg(),l=a.focusDayAfter,s=a.focusDayBefore,u=a.focusWeekAfter,c=a.focusWeekBefore,d=a.blur,f=a.focus,p=a.focusMonthBefore,h=a.focusMonthAfter,g=a.focusYearBefore,m=a.focusYearAfter,v=a.focusStartOfWeek,y=a.focusEndOfWeek;return{onClick:function(a){var l,s,u,c;Wh(n)?null===(l=o.onDayClick)||void 0===l||l.call(o,e,t,a):Hh(n)?null===(s=r.onDayClick)||void 0===s||s.call(r,e,t,a):Uh(n)?null===(u=i.onDayClick)||void 0===u||u.call(i,e,t,a):null===(c=n.onDayClick)||void 0===c||c.call(n,e,t,a)},onFocus:function(o){var r;f(e),null===(r=n.onDayFocus)||void 0===r||r.call(n,e,t,o)},onBlur:function(o){var r;d(),null===(r=n.onDayBlur)||void 0===r||r.call(n,e,t,o)},onKeyDown:function(o){var r;switch(o.key){case"ArrowLeft":o.preventDefault(),o.stopPropagation(),"rtl"===n.dir?l():s();break;case"ArrowRight":o.preventDefault(),o.stopPropagation(),"rtl"===n.dir?s():l();break;case"ArrowDown":o.preventDefault(),o.stopPropagation(),u();break;case"ArrowUp":o.preventDefault(),o.stopPropagation(),c();break;case"PageUp":o.preventDefault(),o.stopPropagation(),o.shiftKey?g():p();break;case"PageDown":o.preventDefault(),o.stopPropagation(),o.shiftKey?m():h();break;case"Home":o.preventDefault(),o.stopPropagation(),v();break;case"End":o.preventDefault(),o.stopPropagation(),y()}null===(r=n.onDayKeyDown)||void 0===r||r.call(n,e,t,o)},onKeyUp:function(o){var r;null===(r=n.onDayKeyUp)||void 0===r||r.call(n,e,t,o)},onMouseEnter:function(o){var r;null===(r=n.onDayMouseEnter)||void 0===r||r.call(n,e,t,o)},onMouseLeave:function(o){var r;null===(r=n.onDayMouseLeave)||void 0===r||r.call(n,e,t,o)},onPointerEnter:function(o){var r;null===(r=n.onDayPointerEnter)||void 0===r||r.call(n,e,t,o)},onPointerLeave:function(o){var r;null===(r=n.onDayPointerLeave)||void 0===r||r.call(n,e,t,o)},onTouchCancel:function(o){var r;null===(r=n.onDayTouchCancel)||void 0===r||r.call(n,e,t,o)},onTouchEnd:function(o){var r;null===(r=n.onDayTouchEnd)||void 0===r||r.call(n,e,t,o)},onTouchMove:function(o){var r;null===(r=n.onDayTouchMove)||void 0===r||r.call(n,e,t,o)},onTouchStart:function(o){var r;null===(r=n.onDayTouchStart)||void 0===r||r.call(n,e,t,o)}}}(e,c),f=function(){var e=Xh(),t=Yg(),n=xg(),o=Og();return Wh(e)?t.selected:Hh(e)?n.selected:Uh(e)?o.selected:void 0}(),p=!(!s.onDayClick&&"default"===s.mode);i((function(){var t;c.outside||u.focusedDay&&p&&Ae(u.focusedDay,e)&&(null===(t=o.current)||void 0===t||t.focus())}),[u.focusedDay,e,o,p,c.outside]);var h=Zg(s,c).join(" "),g=function(e,t){var n=zh({},e.styles.day);return Object.keys(t).forEach((function(t){var o;n=zh(zh({},n),null===(o=e.modifiersStyles)||void 0===o?void 0:o[t])})),n}(s,c),m=!!(c.outside&&!s.showOutsideDays||c.hidden),v=null!==(l=null===(a=s.components)||void 0===a?void 0:a.DayContent)&&void 0!==l?l:vg,y={style:g,className:h,children:t.createElement(v,{date:e,displayMonth:n,activeModifiers:c}),role:"gridcell"},b=u.focusTarget&&Ae(u.focusTarget,e)&&!c.outside,w=u.focusedDay&&Ae(u.focusedDay,e),x=zh(zh(zh({},y),((r={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,r.tabIndex=w||b?0:-1,r)),d);return{isButton:p,isHidden:m,activeModifiers:c,selectedDays:f,buttonProps:x,divProps:y}}function Qg(e){var n=o(null),r=Xg(e.date,e.displayMonth,n);return r.isHidden?t.createElement("div",{role:"gridcell"}):r.isButton?t.createElement(cg,zh({name:"day",ref:n},r.buttonProps)):t.createElement("div",zh({},r.divProps))}function Jg(e){var n=e.number,o=e.dates,r=Xh(),i=r.onWeekNumberClick,a=r.styles,l=r.classNames,s=r.locale,u=r.labels.labelWeekNumber,c=(0,r.formatters.formatWeekNumber)(Number(n),{locale:s});if(!i)return t.createElement("span",{className:l.weeknumber,style:a.weeknumber},c);var d=u(Number(n),{locale:s});return t.createElement(cg,{name:"week-number","aria-label":d,className:l.weeknumber,style:a.weeknumber,onClick:function(e){i(n,o,e)}},c)}function em(e){var n,o,r,i=Xh(),a=i.styles,l=i.classNames,s=i.showWeekNumber,u=i.components,c=null!==(n=null==u?void 0:u.Day)&&void 0!==n?n:Qg,d=null!==(o=null==u?void 0:u.WeekNumber)&&void 0!==o?o:Jg;return s&&(r=t.createElement("td",{className:l.cell,style:a.cell},t.createElement(d,{number:e.weekNumber,dates:e.dates}))),t.createElement("tr",{className:l.row,style:a.row},r,e.dates.map((function(n){return t.createElement("td",{className:l.cell,style:a.cell,key:At(n),role:"presentation"},t.createElement(c,{displayMonth:e.displayMonth,date:n}))})))}function tm(e,t,n){for(var o=null!=n&&n.ISOWeek?ze(t):Ve(t,n),r=null!=n&&n.ISOWeek?Ce(e):Ee(e,n),i=Te(o,r),a=[],l=0;l<=i;l++)a.push(we(r,l));var s=a.reduce((function(e,t){var o=null!=n&&n.ISOWeek?function(e){ye(1,arguments);var t=be(e),n=Ce(t).getTime()-Oe(t).getTime();return Math.round(n/Mt)+1}(t):function(e,t){ye(1,arguments);var n=be(e),o=Ee(n,t).getTime()-Rt(n,t).getTime();return Math.round(o/Dt)+1}(t,n),r=e.find((function(e){return e.weekNumber===o}));return r?(r.dates.push(t),e):(e.push({weekNumber:o,dates:[t]}),e)}),[]);return s}function nm(e){var n,o,r,i=Xh(),a=i.locale,l=i.classNames,s=i.styles,u=i.hideHead,c=i.fixedWeeks,d=i.components,f=i.weekStartsOn,p=i.firstWeekContainsDate,h=i.ISOWeek,g=function(e,t){var n=tm(qe(e),Le(e),t);if(null!=t&&t.useFixedWeeks){var o=It(e,t);if(o<6){var r=n[n.length-1],i=r.dates[r.dates.length-1],a=Pe(i,6-o),l=tm(Pe(i,1),a,t);n.push.apply(n,l)}}return n}(e.displayMonth,{useFixedWeeks:!!c,ISOWeek:h,locale:a,weekStartsOn:f,firstWeekContainsDate:p}),m=null!==(n=null==d?void 0:d.Head)&&void 0!==n?n:mg,v=null!==(o=null==d?void 0:d.Row)&&void 0!==o?o:em,y=null!==(r=null==d?void 0:d.Footer)&&void 0!==r?r:hg;return t.createElement("table",{id:e.id,className:l.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"]},!u&&t.createElement(m,null),t.createElement("tbody",{className:l.tbody,style:s.tbody},g.map((function(n){return t.createElement(v,{displayMonth:e.displayMonth,key:n.weekNumber,dates:n.dates,weekNumber:n.weekNumber})}))),t.createElement(y,{displayMonth:e.displayMonth}))}var om=typeof window<"u"&&window.document&&window.document.createElement?e.useLayoutEffect:e.useEffect,rm=!1,im=0;function am(){return"react-day-picker-".concat(++im)}function lm(n){var o,r,i=Xh(),a=i.dir,l=i.classNames,s=i.styles,u=i.components,c=ag().displayMonths,d=function(t){var n,o=t??(rm?am():null),r=e.useState(o),i=r[0],a=r[1];return om((function(){null===i&&a(am())}),[]),e.useEffect((function(){!1===rm&&(rm=!0)}),[]),null!==(n=t??i)&&void 0!==n?n:void 0}(i.id?"".concat(i.id,"-").concat(n.displayIndex):void 0),f=i.id?"".concat(i.id,"-grid-").concat(n.displayIndex):void 0,p=[l.month],h=s.month,g=0===n.displayIndex,m=n.displayIndex===c.length-1,v=!g&&!m;"rtl"===a&&(m=(o=[g,m])[0],g=o[1]),g&&(p.push(l.caption_start),h=zh(zh({},h),s.caption_start)),m&&(p.push(l.caption_end),h=zh(zh({},h),s.caption_end)),v&&(p.push(l.caption_between),h=zh(zh({},h),s.caption_between));var y=null!==(r=null==u?void 0:u.Caption)&&void 0!==r?r:pg;return t.createElement("div",{key:n.displayIndex,className:p.join(" "),style:h},t.createElement(y,{id:d,displayMonth:n.displayMonth,displayIndex:n.displayIndex}),t.createElement(nm,{id:f,"aria-labelledby":d,displayMonth:n.displayMonth}))}function sm(e){var n=e.initialProps,o=Xh(),r=Wg(),a=ag(),l=f(!1),s=l[0],u=l[1];i((function(){o.initialFocus&&r.focusTarget&&(s||(r.focus(r.focusTarget),u(!0)))}),[o.initialFocus,s,r.focus,r.focusTarget,r]);var c=[o.classNames.root,o.className];o.numberOfMonths>1&&c.push(o.classNames.multiple_months),o.showWeekNumber&&c.push(o.classNames.with_weeknumber);var d=zh(zh({},o.styles.root),o.style),p=Object.keys(n).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var o;return zh(zh({},e),((o={})[t]=n[t],o))}),{});return t.createElement("div",zh({className:c.join(" "),style:d,dir:o.dir,id:o.id},p),t.createElement("div",{className:o.classNames.months,style:o.styles.months},a.displayMonths.map((function(e,n){return t.createElement(lm,{key:n,displayIndex:n,displayMonth:e})}))))}function um(e){var n=e.children,o=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["children"]);return t.createElement(Zh,{initialProps:o},t.createElement(ig,null,t.createElement($g,{initialProps:o},t.createElement(bg,{initialProps:o},t.createElement(Eg,{initialProps:o},t.createElement(Lg,null,t.createElement(Ug,null,n)))))))}function cm(e){return t.createElement(um,zh({},e),t.createElement(sm,{initialProps:e}))}const dm="object"==typeof global&&global&&global.Object===Object&&global;var fm="object"==typeof self&&self&&self.Object===Object&&self;const pm=(dm||fm||Function("return this")()).Symbol;var hm=Object.prototype,gm=hm.hasOwnProperty,mm=hm.toString,vm=pm?pm.toStringTag:void 0;var ym=Object.prototype.toString;var bm="[object Null]",wm="[object Undefined]",xm=pm?pm.toStringTag:void 0;function _m(e){return null==e?void 0===e?wm:bm:xm&&xm in Object(e)?function(e){var t=gm.call(e,vm),n=e[vm];try{e[vm]=void 0;var o=!0}catch{}var r=mm.call(e);return o&&(t?e[vm]=n:delete e[vm]),r}(e):function(e){return ym.call(e)}(e)}var km="[object Symbol]";const Em=Array.isArray;var Cm=1/0,Om=pm?pm.prototype:void 0,Sm=Om?Om.toString:void 0;function Nm(e){if("string"==typeof e)return e;if(Em(e))return function(e,t){for(var n=-1,o=null==e?0:e.length,r=Array(o);++n<o;)r[n]=t(e[n],n,e);return r}(e,Nm)+"";if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&_m(e)==km}(e))return Sm?Sm.call(e):"";var t=e+"";return"0"==t&&1/e==-Cm?"-0":t}function jm(e){return null==e?"":Nm(e)}function Tm(e,t,n){var o=e.length;return n=void 0===n?o:n,!t&&n>=o?e:function(e,t,n){var o=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(r);++o<r;)i[o]=e[o+t];return i}(e,t,n)}var Pm=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Mm(e){return Pm.test(e)}var Am="\\ud800-\\udfff",Rm="["+Am+"]",Dm="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Im="\\ud83c[\\udffb-\\udfff]",Lm="[^"+Am+"]",qm="(?:\\ud83c[\\udde6-\\uddff]){2}",Fm="[\\ud800-\\udbff][\\udc00-\\udfff]",Vm="(?:"+Dm+"|"+Im+")"+"?",zm="[\\ufe0e\\ufe0f]?",Bm=zm+Vm+("(?:\\u200d(?:"+[Lm,qm,Fm].join("|")+")"+zm+Vm+")*"),Hm="(?:"+[Lm+Dm+"?",Dm,qm,Fm,Rm].join("|")+")",Um=RegExp(Im+"(?="+Im+")|"+Hm+Bm,"g");function Wm(e){return Mm(e)?function(e){return e.match(Um)||[]}(e):function(e){return e.split("")}(e)}var Gm=function(e){return function(t){var n=Mm(t=jm(t))?Wm(t):void 0,o=n?n[0]:t.charAt(0),r=n?Tm(n,1).join(""):t.slice(1);return o[e]()+r}}("toUpperCase");const $m=Gm;function Km(e){return $m(jm(e).toLowerCase())}const Ym=({onClose:e,isNb:t,selected:n,removeSelection:o,setMonth:r,month:i,onClear:a})=>{const{goToMonth:l,nextMonth:s,previousMonth:u}=ag(),c=Em(n)?!n.length:Re(n)?!n:!function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}(n)||!function(e){for(var t=-1,n=null==e?0:e.length,o=0,r=[];++t<n;){var i=e[t];i&&(r[o++]=i)}return r}(Object.values(n)).length;return en.jsxs("div",{style:{marginTop:"8px",display:"flex",justifyContent:"space-between",marginRight:"12px"},children:[en.jsx(jl,{variant:"text",onClick:e=>{a?a():o(e),r(new Date(Date.now()))},size:"small",disabled:c,dataTest:"select-today",style:{minWidth:"60px"},startIcon:en.jsx(oa,{icon:"ph:eraser-duotone",width:24,height:24})}),en.jsxs("div",{className:"rdp-custom-caption-navigation",style:{display:"flex",gap:"4px"},children:[en.jsx(jl,{variant:"outlined",size:"small",dataTest:"previous-month",disabled:!u,onClick:()=>u&&l(u),startIcon:en.jsx(ca,{})}),en.jsx(jl,{size:"small",disabled:i&&Vt(new Date(Date.now()),i),onClick:()=>{r(new Date(Date.now()))},variant:"outlined",dataTest:"select-today",children:t?"I dag":"Today"}),en.jsx(jl,{variant:"outlined",size:"small",dataTest:"next-month",disabled:!s,onClick:()=>s&&l(s),startIcon:en.jsx(ua,{})})]}),en.jsx(jl,{size:"small",onClick:t=>{null==e||e(t,"backdropClick")},dataTest:"select-today",style:{minWidth:"60px"},children:t?"Velg":"Select"})]})};function Zm(e){const{month:t}=e;return en.jsx("div",{className:"rdp-custom-caption",style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"30px",marginLeft:"16px"},children:t&&en.jsx(pg,{displayMonth:t})})}const Xm=e=>en.jsx(q,{...e,sx:{...e.sx,"& label.MuiInputLabel-shrink":{background:"white !important",color:"var(--colors-delta-500) !important"},"& label.MuiInputLabel-shrink.Mui-focused":{background:"white !important",color:"var(--colors-gama-500) !important"},"& label.MuiInputLabel-shrink.Mui-error.Mui-focused":{background:"white !important",color:"var(--colors-red-500) !important"}}}),Qm=e=>{const{caption:t,children:n}=e,{goToMonth:o}=ag(),{month:r}=Xh(),i=null==n?void 0:n.map((e=>({id:e.props.value,label:e.props.children})));return en.jsx(Xm,{style:{width:"105px",marginLeft:"-5px"},children:en.jsx(Mh,{dataTest:"StyledCalendarPickerSelectMonth",size:"small",variant:"standard",value:t,onChange:e=>{var t;const n=e.target.value,a=null==(t=i.find((e=>e.label===n)))?void 0:t.id;r&&!isNaN(Number(a))&&o(Bt(r,Number(a)))},MenuProps:{className:"styled-calendar-picker-select-period-menu"},children:null==i?void 0:i.map((e=>en.jsx(Ah,{value:e.label,children:Km(e.label)},e.id)))})})},Jm=e=>{const{caption:t,children:n}=e,{goToMonth:o}=ag(),{month:r}=Xh(),i=null==n?void 0:n.map((e=>({id:e.props.value,label:e.props.children})));return en.jsx(Xm,{style:{width:"70px",marginLeft:"5px"},children:en.jsx(Mh,{dataTest:"StyledCalendarPickerSelectYear",size:"small",variant:"standard",value:t,onChange:e=>{var t;const n=e.target.value,a=null==(t=i.find((e=>e.label===n)))?void 0:t.id;r&&!isNaN(Number(a))&&o(Ut(r,Number(a)))},MenuProps:{className:"styled-calendar-picker-select-period-menu"},children:null==i?void 0:i.map((e=>en.jsx(Ah,{value:e.label,children:e.label},e.id)))})})},ev=({datePickerProps:e,popoverProps:t,positionAbove:n})=>{const{showOutsideDays:o=!0,locale:r,selected:i,numberOfMonths:a,disabledDays:l,onClear:s}=e,{open:u,anchorEl:c,onClose:d}=t,[p,h]=f(new Date(Date.now())),g="nb"===(null==r?void 0:r.code),m=(a||1)<2;return en.jsx(F,{open:u,anchorEl:c,onClose:d,anchorOrigin:{vertical:n?"top":50,horizontal:"left"},transformOrigin:{vertical:n?"bottom":"top",horizontal:"left"},children:en.jsx(cm,{disabled:l,month:p,onMonthChange:e=>{h(e)},captionLayout:"dropdown",locale:r||Vh,fromYear:2e3,toYear:2050,"data-test":"calendar-picker",showWeekNumber:!0,showOutsideDays:o,fixedWeeks:!0,className:"styled-calendar-day-picker",classNames:{months:"months",month:"month",caption:"caption",caption_label:"caption_label",nav:"nav",nav_button:"nav_button",nav_button_previous:"nav_button_previous",nav_button_next:"nav_button_next",head_row:"head_row",head_cell:"head_cell",row:"row",cell:"cell",day:"day",day_today:"day_today",day_selected:"day_selected",day_outside:"day_outside",day_disabled:"day_disabled",day_range_middle:"day_range_middle",day_hidden:"day_hidden",caption_end:m?"":"caption_end"},components:{Caption:e=>en.jsx(Zm,{...e,setMonth:h,month:p,isNb:g}),Dropdown:e=>"months"===e.name?en.jsx(Qm,{...e}):en.jsx(Jm,{...e})},footer:en.jsx(Ym,{onClose:d,isNb:g,selected:i,removeSelection:t=>{var n;return i&&(null==(n=null==e?void 0:e.onSelect)?void 0:n.call(e,void 0,new Date(Date.now()),{},t))},setMonth:h,month:p,onClear:s}),...e})})},tv=(e,t="dd.MM.yy")=>e?Pt(e,t):"",nv=window.rawWindow||window,ov=e=>{var t,n,o;const{dataTest:r,placeholder:i,disabled:a,onClick:l,inputClassName:s,onClear:u,allowClear:c,dateFormat:d,label:f}=e;if("range"!==e.mode)return null;const p=tv(null==(t=e.selected)?void 0:t.from,d),h=tv(null==(n=e.selected)?void 0:n.to,d),g=null!=(o=e.selected)&&o.from?e.selected.to?`${p} - ${h}`:p:"";return en.jsx(Tu,{dataTest:r,placeholder:i,label:f,size:"small",onClick:e=>!a&&l(e),InputProps:{endAdornment:en.jsx(wl,{width:24,height:24})},value:g,disabled:!!a,className:s,style:{width:"240px"},allowClear:c,onClear:()=>{null==u||u()}})},rv=e=>{var t,n;const{dataTest:o,className:r,inputClassName:i,disabled:a,placeholderFrom:l,placeholderTo:s,dateFormat:u,onClick:c,labelFrom:d,labelTo:f}=e;if("range"!==e.mode)return null;const p=tv(null==(t=e.selected)?void 0:t.from,u),h=tv(null==(n=e.selected)?void 0:n.to,u);return en.jsxs("div",{"data-test":o,className:Io(r,"styled-date-picker-input-range-compact",a&&"range-compact-disabled"),onClick:e=>!a&&c(e),children:[en.jsx(Tu,{label:d,autoComplete:"off",size:"small",dataTest:"styled-date-picker-input-range-from",placeholder:l,value:p,disabled:!!a,className:i,style:{width:"144px"},InputProps:{endAdornment:en.jsx(wl,{width:24,height:24})}}),en.jsx(Tu,{label:f,autoComplete:"off",dataTest:"styled-date-picker-input-range-to",size:"small",placeholder:s,value:h,disabled:!!a,className:i,style:{width:"144px"},InputProps:{endAdornment:en.jsx(wl,{width:24,height:24})}})]})},iv=e=>{const{dataTest:t,placeholder:n,disabled:o,onClick:r,inputClassName:i,onClear:a,allowClear:l,dateFormat:s,error:u=!1,helperText:c}=e;return"single"!==e.mode?null:en.jsx(Tu,{dataTest:t,placeholder:n,size:"small",onClick:e=>!o&&r(e),InputProps:{endAdornment:en.jsx(wl,{width:24,height:24})},value:tv(e.selected,s),disabled:!!o,className:i,style:{width:"144px"},allowClear:l,onClear:()=>{null==a||a()},label:e.label,error:u,helperText:c})},av=e=>{const t="range"===e.mode&&!e.compact,n="range"===e.mode&&e.compact;return t?en.jsx(ov,{...e,onClick:e.onClick}):n?en.jsx(rv,{...e,onClick:e.onClick}):en.jsx(iv,{...e,onClick:e.onClick})},lv=e=>{const[t,n]=f(null),[o,r]=f(!1);return en.jsxs(en.Fragment,{children:[en.jsx(av,{...e,onClick:e=>{n(e.currentTarget),((e,t)=>{const n=nv.innerHeight,o=e.currentTarget.getBoundingClientRect(),r=o.top,i=n-o.bottom;t(i<300&&r>i)})(e,r)}}),en.jsx(ev,{datePickerProps:{...e},popoverProps:{open:!!t,anchorEl:t,onClose:()=>{n(null)}},positionAbove:o})]})};function sv(t){if(typeof window>"u")return t;const n=e.useRef(null);return e.useLayoutEffect((()=>{n.current=t})),e.useCallback(((...e)=>{var t;null===(t=n.current)||void 0===t||t.call(n,...e)}),[])}const uv={};const cv={isOpen:!1,setAnchorElUsed:!1,anchorEl:void 0,anchorPosition:void 0,hovered:!1,focused:!1,_openEventType:null,_childPopupState:null,_deferNextOpen:!1,_deferNextClose:!1};function dv({parentPopupState:e,popupId:t,variant:n,disableAutoFocus:a}){const l=o(!0);i((()=>(l.current=!0,()=>{l.current=!1})),[]);const[s,u]=f(cv),c=r((e=>{l.current&&u(e)}),[]),d=r((e=>c((t=>({...t,setAnchorElUsed:!0,anchorEl:e??void 0})))),[]),p=sv((e=>(s.isOpen?m(e):h(e),s))),h=sv((t=>{const o=t instanceof Element?void 0:t,r=t instanceof Element?t:(null==t?void 0:t.currentTarget)instanceof Element?t.currentTarget:void 0;if("touchstart"===(null==o?void 0:o.type))return void c((e=>({...e,_deferNextOpen:!0})));const i=null==o?void 0:o.clientX,a=null==o?void 0:o.clientY,l="number"==typeof i&&"number"==typeof a?{left:i,top:a}:void 0,s=i=>{if(!t&&!i.setAnchorElUsed&&"dialog"!==n&&function(e,t){uv[e]||(uv[e]=!0,console.error("[material-ui-popup-state] WARNING",t))}("missingEventOrAnchorEl","eventOrAnchorEl should be defined if setAnchorEl is not used"),e){if(!e.isOpen)return i;setTimeout((()=>e._setChildPopupState(x)))}const a={...i,isOpen:!0,anchorPosition:l,hovered:"mouseover"===(null==o?void 0:o.type)||i.hovered,focused:"focus"===(null==o?void 0:o.type)||i.focused,_openEventType:null==o?void 0:o.type};return null!=o&&o.currentTarget?i.setAnchorElUsed||(a.anchorEl=null==o?void 0:o.currentTarget):r&&(a.anchorEl=r),a};c((e=>e._deferNextOpen?(setTimeout((()=>c(s)),0),{...e,_deferNextOpen:!1}):s(e)))})),g=t=>{const{_childPopupState:n}=t;return setTimeout((()=>{null==n||n.close(),null==e||e._setChildPopupState(null)})),{...t,isOpen:!1,hovered:!1,focused:!1}},m=sv((e=>{const t=e instanceof Element?void 0:e;"touchstart"!==(null==t?void 0:t.type)?c((e=>e._deferNextClose?(setTimeout((()=>c(g)),0),{...e,_deferNextClose:!1}):g(e))):c((e=>({...e,_deferNextClose:!0})))})),v=r(((e,t)=>{e?h(t):m(t)}),[]),y=sv((e=>{const{relatedTarget:t}=e;c((e=>!e.hovered||t instanceof Element&&gv(t,x)?e:e.focused?{...e,hovered:!1}:g(e)))})),b=sv((e=>{if(!e)return;const{relatedTarget:t}=e;c((e=>!e.focused||t instanceof Element&&gv(t,x)?e:e.hovered?{...e,focused:!1}:g(e)))})),w=r((e=>c((t=>({...t,_childPopupState:e})))),[]),x={...s,setAnchorEl:d,popupId:t,variant:n,open:h,close:m,toggle:p,setOpen:v,onBlur:b,onMouseLeave:y,disableAutoFocus:a??!(!s.hovered&&!s.focused),_setChildPopupState:w};return x}function fv({isOpen:e,popupId:t,variant:n}){return{..."popover"===n?{"aria-haspopup":!0,"aria-controls":e&&null!=t?t:void 0}:"popper"===n?{"aria-describedby":e&&null!=t?t:void 0}:void 0}}function pv(e){return{...fv(e),onClick:e.open,onTouchStart:e.open}}function hv({isOpen:e,anchorEl:t,popupId:n,onMouseLeave:o}){return{id:n,anchorEl:t,open:e,onMouseLeave:o}}function gv(e,t){const{anchorEl:n,_childPopupState:o}=t;return mv(n,e)||mv(function(e,{popupId:t}){if(!t)return null;const n="function"==typeof e.getRootNode?e.getRootNode():document;return"function"==typeof n.getElementById?n.getElementById(t):null}(e,t),e)||null!=o&&gv(e,o)}function mv(e,t){if(!e)return!1;for(;t;){if(t===e)return!0;t=t.parentElement}return!1}function vv({children:e,popupId:t,variant:n,parentPopupState:o,disableAutoFocus:r}){return e(dv({popupId:t,variant:n,parentPopupState:o,disableAutoFocus:r}))??null}vv.propTypes={children:de.func.isRequired,popupId:de.string,variant:de.oneOf(["popover","popper"]).isRequired,parentPopupState:de.object,disableAutoFocus:de.bool};const yv=({type:e,value:t,onSelect:n})=>{const o=new Date,r="hours"===e,i=r?24:12,a=r?o.getHours():o.getMinutes();return en.jsx("div",{className:"styled-time-picker-root_column",children:new Array(i).fill(null).map(((e,o)=>{const i=r?o:5*o,l=t&&i===(r?function(e){return ye(1,arguments),be(e).getHours()}(t):function(e){return ye(1,arguments),be(e).getMinutes()}(t)),s=a==i;return en.jsx("div",{className:Io("styled-time-picker-root_cell",l&&"styled-time-picker-root_cell__cell-selected",s&&"styled-time-picker-root_cell__cell-now"),onClick:()=>{n(Ht(t||new Date,r?{hours:i}:{minutes:i}))},children:i.toString().padStart(2,"0")},i)}))})},bv=({value:e,onSelect:t,dataTest:n})=>{const r=o(null);return i((()=>{var e;null==(e=r.current)||e.querySelectorAll("div.styled-time-picker-root_cell__cell-selected").forEach((e=>e.scrollIntoView()))}),[r]),en.jsxs("div",{ref:r,"data-test":n,className:"styled-time-picker-root",children:[en.jsx(yv,{type:"hours",value:e,onSelect:t}),en.jsx(yv,{type:"minutes",value:e,onSelect:t})]})},wv=e=>{const{popupState:t,dataTest:n,value:o,onSelect:r,handleClear:i}=e;return en.jsx(V,{...hv(t),transition:!0,style:{zIndex:"1300",position:"absolute",top:"2px"},children:({TransitionProps:e})=>en.jsx(z,{...e,timeout:350,children:en.jsxs(A,{style:{paddingBottom:"1px"},children:[en.jsx(bv,{dataTest:`${n}-time-picker-body`,value:o,onSelect:r}),en.jsxs("div",{style:{display:"flex",marginTop:"12px",marginBottom:"12px",justifyContent:"space-between"},children:[en.jsx(jl,{variant:"text",onClick:i,size:"small",disabled:!o,dataTest:"select-today",style:{minWidth:"40px",marginLeft:"10px"},startIcon:en.jsx(oa,{icon:"ph:eraser-duotone",width:24,height:24})}),en.jsx(jl,{size:"small",onClick:()=>t.close(),dataTest:"select-time",style:{minWidth:"40px",marginRight:"16px"},startIcon:en.jsx(oa,{icon:"bi:check-lg",width:20,height:20})})]})]})})})},xv=({width:e=20,height:t=20,className:n="",onClick:o,color:r})=>en.jsx(ia,{icon:"mdi:clock-outline",width:e,height:t,className:n,onClick:o,color:r}),_v=({isValidTime:e,error:t=!1,localization:n="en",helperText:o})=>{if(e&&!t)return null;let r=o;return e||(r="en"===n?"Not valid":"Ikke gyldig"),en.jsx("span",{style:{position:"absolute"},children:r})},kv=e=>{const{placeholder:t,disabled:n,inputClassName:o,dataTest:r,width:i,error:a,helperText:l,label:s,locale:u="en",popupState:c,handleChange:d,isValidTime:f,localValue:p}=e;return en.jsx(Tu,{name:"password",autoComplete:"off",type:"text",dataTest:r,placeholder:t,size:"small",error:!f||a,helperText:en.jsx(_v,{isValidTime:f,error:a,localization:u,helperText:l}),onChange:d,InputProps:{endAdornment:en.jsx(xv,{width:24,height:24,onClick:()=>!n&&c.open()})},value:p,sx:{maxWidth:i||130,width:i,minWidth:i},disabled:n,className:o,label:s})},Ev=e=>{const{value:t,onSelect:n}=e,[o,r]=f(t?Pt(t,"HH:mm"):""),[i,a]=f(!0),l=e=>{const t=e.target.value;r(t);const o=(e=>{var t,n;const o=e.split(":"),r=Number(o[0]),i=Number(o[1]);if(2==(null==(t=o[0])?void 0:t.length)&&2==(null==(n=o[1])?void 0:n.length)&&r>=0&&r<=23&&i>=0&&i<=59){const e=new Date;return e.setHours(r),e.setMinutes(i),e}return null})(t);n(o||void 0),a(!!o)},s=e=>{n(e),r(e?Pt(e,"HH:mm"):""),a(!0)},u=()=>{n(void 0),r(""),a(!0)};return en.jsx(vv,{variant:"popper",popupId:"time-picker-popper",children:t=>en.jsx(B,{mouseEvent:"onMouseDown",onClickAway:()=>{t.close()},children:en.jsxs("div",{style:{width:"auto",height:"auto",position:"relative"},children:[en.jsx("div",{...pv(t),children:en.jsx(kv,{...e,popupState:t,localValue:o,isValidTime:i,handleChange:l})}),t.isOpen&&en.jsx(wv,{...e,popupState:t,handleClear:u,onSelect:s})]})})})},Cv=e=>en.jsx(H,{...e}),Ov=e=>en.jsx(U,{...e}),Sv=e=>en.jsx(W,{...e}),Nv=e=>en.jsx(G,{...e}),jv=e=>en.jsx($,{...e}),Tv=e=>en.jsx(K,{...e}),Pv=e=>{var t,n;return en.jsx(Y,{...e,classes:{paper:Io("border border-solid border-delta-300 shadow-[0px_2px_4px_0px_rgba(34,_33,_51,_0.15)]",null==(t=e.classes)?void 0:t.paper),list:Io("py-1",null==(n=e.classes)?void 0:n.list),...e.classes}})},Mv=e=>{var t;return en.jsx(P,{...e,classes:{root:Io("px-3 py-2.5",null==(t=e.classes)?void 0:t.root),...e.classes}})},Av=e=>en.jsx(Z,{...e}),Rv=({href:e,disabled:t,size:n="large",dataTest:o,reflink:r,className:i,content:a,...l})=>{let s="styled-link-small";return"large"===n&&(s="styled-link-large"),t?en.jsx("span",{className:Io("styled-link","styled-link-disabled",s,i),children:a}):en.jsx("a",{...l,"data-test":o,ref:r,href:e,className:Io("styled-link",s,i),children:a})},Dv=e=>en.jsx(X,{...e,sx:{"&.MuiTab-textColorPrimary.Mui-selected":{color:"var(--colors-gama-500)"}}}),Iv=e=>en.jsx(Q,{TabIndicatorProps:{style:{background:"var(--colors-gama-500)",color:"var(--colors-gama-500)"}},...e}),Lv=e=>en.jsx(J,{...e}),qv=e=>en.jsx(ee,{...e,className:Io("flex-row-reverse gap-2.5",e.className),expandIcon:en.jsx(Wa,{width:24,height:24}),sx:{...e.sx,backgroundColor:"transparent !important","& .MuiAccordionSummary-expandIconWrapper.Mui-expanded":{transform:"rotate(180deg)"},"& .MuiAccordionSummary-expandIconWrapper:not(.Mui-expanded)":{transform:"rotate(0deg)"}}}),Fv=e=>en.jsx(te,{...e}),Vv="select",zv="expand-column-id",Bv="actions";
|
|
26
26
|
/**
|
|
27
27
|
* table-core
|
|
28
28
|
*
|
|
@@ -33,7 +33,7 @@ import*as e from"react";import t,{forwardRef as n,useRef as o,useCallback as r,u
|
|
|
33
33
|
*
|
|
34
34
|
* @license MIT
|
|
35
35
|
*/
|
|
36
|
-
function Bv(e,t){return"function"==typeof e?e(t):e}function Hv(e,t){return n=>{t.setState((t=>({...t,[e]:Bv(n,t[e])})))}}function Uv(e){return e instanceof Function}function Wv(e,t,n){let o,r=[];return()=>{let i;n.key&&n.debug&&(i=Date.now());const a=e();if(a.length===r.length&&!a.some(((e,t)=>r[t]!==e)))return o;let l;if(r=a,n.key&&n.debug&&(l=Date.now()),o=t(...a),null==n||null==n.onChange||n.onChange(o),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-i))/100,t=Math.round(100*(Date.now()-l))/100,o=t/16,r=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${r(t,5)} /${r(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*o,120))}deg 100% 31%);`,null==n?void 0:n.key)}return o}}function Gv(e,t,n){var o;let r={id:null!=(o=n.id)?o:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(r),e},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(r,e)})),r}const $v={createTable:e=>{e.getHeaderGroups=Wv((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,o,r)=>{var i,a;const l=null!=(i=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?i:[],s=null!=(a=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?a:[];return Kv(t,[...l,...n.filter((e=>!(null!=o&&o.includes(e.id)||null!=r&&r.includes(e.id)))),...s],e)}),{key:"development"===process.env.NODE_ENV&&"getHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterHeaderGroups=Wv((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,o,r)=>Kv(t,n=n.filter((e=>!(null!=o&&o.includes(e.id)||null!=r&&r.includes(e.id)))),e,"center")),{key:"development"===process.env.NODE_ENV&&"getCenterHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftHeaderGroups=Wv((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,o)=>{var r;return Kv(t,null!=(r=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?r:[],e,"left")}),{key:"development"===process.env.NODE_ENV&&"getLeftHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightHeaderGroups=Wv((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,o)=>{var r;return Kv(t,null!=(r=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?r:[],e,"right")}),{key:"development"===process.env.NODE_ENV&&"getRightHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getFooterGroups=Wv((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftFooterGroups=Wv((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getLeftFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterFooterGroups=Wv((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getCenterFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightFooterGroups=Wv((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getRightFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getFlatHeaders=Wv((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftFlatHeaders=Wv((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getLeftFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterFlatHeaders=Wv((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getCenterFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightFlatHeaders=Wv((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getRightFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterLeafHeaders=Wv((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:"development"===process.env.NODE_ENV&&"getCenterLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftLeafHeaders=Wv((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:"development"===process.env.NODE_ENV&&"getLeftLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightLeafHeaders=Wv((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:"development"===process.env.NODE_ENV&&"getRightLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeafHeaders=Wv((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var o,r,i,a,l,s;return[...null!=(o=null==(r=e[0])?void 0:r.headers)?o:[],...null!=(i=null==(a=t[0])?void 0:a.headers)?i:[],...null!=(l=null==(s=n[0])?void 0:s.headers)?l:[]].map((e=>e.getLeafHeaders())).flat()}),{key:"development"===process.env.NODE_ENV&&"getLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}})}};function Kv(e,t,n,o){var r,i;let a=0;const l=function(e,t){void 0===t&&(t=1),a=Math.max(a,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&l(e.columns,t+1)}),0)};l(e);let s=[];const u=(e,t)=>{const r={depth:t,id:[o,`${t}`].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const a=[...i].reverse()[0];let l,s=!1;if(e.column.depth===r.depth&&e.column.parent?l=e.column.parent:(l=e.column,s=!0),a&&(null==a?void 0:a.column)===l)a.subHeaders.push(e);else{const r=Gv(n,l,{id:[o,t,l.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:s,placeholderId:s?`${i.filter((e=>e.column===l)).length}`:void 0,depth:t,index:i.length});r.subHeaders.push(e),i.push(r)}r.headers.push(e),e.headerGroup=r})),s.push(r),t>0&&u(i,t-1)},c=t.map(((e,t)=>Gv(n,e,{depth:a,index:t})));u(c,a-1),s.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,o=[0];e.subHeaders&&e.subHeaders.length?(o=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:r}=e;t+=n,o.push(r)}))):t=1;return n+=Math.min(...o),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return d(null!=(r=null==(i=s[0])?void 0:i.headers)?r:[]),s}const Yv={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Zv={getDefaultColumnDef:()=>Yv,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:Hv("columnSizing",e),onColumnSizingInfoChange:Hv("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,o,r;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:Yv.minSize,null!=(o=i??e.columnDef.size)?o:Yv.size),null!=(r=e.columnDef.maxSize)?r:Yv.maxSize)},e.getStart=n=>{const o=n?"left"===n?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),r=o.findIndex((t=>t.id===e.id));if(r>0){const e=o[r-1];return e.getStart(n)+e.getSize()}return 0},e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...o}=t;return o}))},e.getCanResize=()=>{var n,o;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(o=t.options.enableColumnResizing)||o)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var o;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(o=e.column.getSize())?o:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=()=>{const n=t.getColumn(e.column.id),o=null==n?void 0:n.getCanResize();return r=>{if(!n||!o||(null==r.persist||r.persist(),Qv(r)&&r.touches&&r.touches.length>1))return;const i=e.getSize(),a=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[n.id,n.getSize()]],l=Qv(r)?Math.round(r.touches[0].clientX):r.clientX,s={},u=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var t,o;const r=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),i=Math.max(r/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;s[t]=Math.round(100*Math.max(n+n*i,0))/100})),{...e,deltaOffset:r,deltaPercentage:i}})),("onChange"===t.options.columnResizeMode||"end"===e)&&t.setColumnSizing((e=>({...e,...s}))))},c=e=>u("move",e),d=e=>{u("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},f={moveHandler:e=>c(e.clientX),upHandler:e=>{document.removeEventListener("mousemove",f.moveHandler),document.removeEventListener("mouseup",f.upHandler),d(e.clientX)}},p={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),c(e.touches[0].clientX),!1),upHandler:e=>{var t;document.removeEventListener("touchmove",p.moveHandler),document.removeEventListener("touchend",p.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(null==(t=e.touches[0])?void 0:t.clientX)}},h=!!function(){if("boolean"==typeof Xv)return Xv;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Xv=e,Xv}()&&{passive:!1};Qv(r)?(document.addEventListener("touchmove",p.moveHandler,h),document.addEventListener("touchend",p.upHandler,h)):(document.addEventListener("mousemove",f.moveHandler,h),document.addEventListener("mouseup",f.upHandler,h)),t.setColumnSizingInfo((e=>({...e,startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:n.id})))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}};let Xv=null;function Qv(e){return"touchstart"===e.type}const Jv={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Hv("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var o,r;if(t){if(null!=(o=null!=(r=e.options.autoResetAll)?r:e.options.autoResetExpanded)?o:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{t??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,o;e.setExpanded(t?{}:null!=(n=null==(o=e.initialState)?void 0:o.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some((e=>e.getCanExpand())),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!(!Object.keys(t).length||e.getRowModel().flatRows.some((e=>!e.getIsExpanded())))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded((o=>{var r;const i=!0===o||!(null==o||!o[e.id]);let a={};if(!0===o?Object.keys(t.getRowModel().rowsById).forEach((e=>{a[e]=!0})):a=o,n=null!=(r=n)?r:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=a;return n}return o}))},e.getIsExpanded=()=>{var n;const o=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===o||null!=o&&o[e.id])},e.getCanExpand=()=>{var n,o,r;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(o=t.options.enableExpanding)||o)&&!(null==(r=e.subRows)||!r.length)},e.getIsAllParentsExpanded=()=>{let n=!0,o=e;for(;n&&o.parentId;)o=t.getRow(o.parentId,!0),n=o.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},ey=(e,t,n)=>{var o;const r=n.toLowerCase();return!(null==(o=e.getValue(t))||null==(o=o.toString())||null==(o=o.toLowerCase())||!o.includes(r))};ey.autoRemove=e=>cy(e);const ty=(e,t,n)=>{var o;return!(null==(o=e.getValue(t))||null==(o=o.toString())||!o.includes(n))};ty.autoRemove=e=>cy(e);const ny=(e,t,n)=>{var o;return(null==(o=e.getValue(t))||null==(o=o.toString())?void 0:o.toLowerCase())===(null==n?void 0:n.toLowerCase())};ny.autoRemove=e=>cy(e);const oy=(e,t,n)=>{var o;return null==(o=e.getValue(t))?void 0:o.includes(n)};oy.autoRemove=e=>cy(e)||!(null!=e&&e.length);const ry=(e,t,n)=>!n.some((n=>{var o;return!(null!=(o=e.getValue(t))&&o.includes(n))}));ry.autoRemove=e=>cy(e)||!(null!=e&&e.length);const iy=(e,t,n)=>n.some((n=>{var o;return null==(o=e.getValue(t))?void 0:o.includes(n)}));iy.autoRemove=e=>cy(e)||!(null!=e&&e.length);const ay=(e,t,n)=>e.getValue(t)===n;ay.autoRemove=e=>cy(e);const ly=(e,t,n)=>e.getValue(t)==n;ly.autoRemove=e=>cy(e);const sy=(e,t,n)=>{let[o,r]=n;const i=e.getValue(t);return i>=o&&i<=r};sy.resolveFilterValue=e=>{let[t,n]=e,o="number"!=typeof t?parseFloat(t):t,r="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(o)?-1/0:o,a=null===n||Number.isNaN(r)?1/0:r;if(i>a){const e=i;i=a,a=e}return[i,a]},sy.autoRemove=e=>cy(e)||cy(e[0])&&cy(e[1]);const uy={includesString:ey,includesStringSensitive:ty,equalsString:ny,arrIncludes:oy,arrIncludesAll:ry,arrIncludesSome:iy,equals:ay,weakEquals:ly,inNumberRange:sy};function cy(e){return null==e||""===e}const dy={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:Hv("columnFilters",e),onGlobalFilterChange:Hv("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const o=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof o||"number"==typeof o}}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=null==n?void 0:n.getValue(e.id);return"string"==typeof o?uy.includesString:"number"==typeof o?uy.inNumberRange:"boolean"==typeof o||null!==o&&"object"==typeof o?uy.equals:Array.isArray(o)?uy.arrIncludes:uy.weakEquals},e.getFilterFn=()=>{var n,o;return Uv(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(o=t.options.filterFns)?void 0:o[e.columnDef.filterFn])?n:uy[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,o,r;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(o=t.options.enableColumnFilters)||o)&&(null==(r=t.options.enableFilters)||r)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var n,o,r,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(o=t.options.enableGlobalFilter)||o)&&(null==(r=t.options.enableFilters)||r)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,o;return null!=(n=null==(o=t.getState().columnFilters)?void 0:o.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const o=e.getFilterFn(),r=null==t?void 0:t.find((t=>t.id===e.id)),i=Bv(n,r?r.value:void 0);var a;if(fy(o,i,e))return null!=(a=null==t?void 0:t.filter((t=>t.id!==e.id)))?a:[];const l={id:e.id,value:i};var s;return r?null!=(s=null==t?void 0:t.map((t=>t.id===e.id?l:t)))?s:[]:null!=t&&t.length?[...t,l]:[l]}))},e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.getGlobalAutoFilterFn=()=>uy.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:o}=e.options;return Uv(o)?o:"auto"===o?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[o])?t:uy[o]},e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var o;return null==(o=Bv(t,e))?void 0:o.filter((e=>{const t=n.find((t=>t.id===e.id));if(t){if(fy(t.getFilterFn(),e.value,t))return!1}return!0}))}))},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},e.resetColumnFilters=t=>{var n,o;e.setColumnFilters(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()),e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}};function fy(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||typeof t>"u"||"string"==typeof t&&!t}const py={sum:(e,t,n)=>n.reduce(((t,n)=>{const o=n.getValue(e);return t+("number"==typeof o?o:0)}),0),min:(e,t,n)=>{let o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(o>n||void 0===o&&n>=n)&&(o=n)})),o},max:(e,t,n)=>{let o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(o<n||void 0===o&&n>=n)&&(o=n)})),o},extent:(e,t,n)=>{let o,r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===o?n>=n&&(o=r=n):(o>n&&(o=n),r<n&&(r=n)))})),[o,r]},mean:(e,t)=>{let n=0,o=0;if(t.forEach((t=>{let r=t.getValue(e);null!=r&&(r=+r)>=r&&(++n,o+=r)})),n)return o/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(!function(e){return Array.isArray(e)&&e.every((e=>"number"==typeof e))}(n))return;if(1===n.length)return n[0];const o=Math.floor(n.length/2),r=n.sort(((e,t)=>e-t));return n.length%2!=0?r[o]:(r[o-1]+r[o])/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},hy={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Hv("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...t??[],e.id]))},e.getCanGroup=()=>{var n,o,r,i;return null!=(n=null==(o=null!=(r=null==(i=e.columnDef.enableGrouping)||i)?r:t.options.enableGrouping)||o)?n:!!e.accessorFn},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=null==n?void 0:n.getValue(e.id);return"number"==typeof o?py.sum:"[object Date]"===Object.prototype.toString.call(o)?py.extent:void 0},e.getAggregationFn=()=>{var n,o;if(!e)throw new Error;return Uv(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(o=t.options.aggregationFns)?void 0:o[e.columnDef.aggregationFn])?n:py[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,o;e.setGrouping(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const o=t.getColumn(n);return null!=o&&o.columnDef.getGroupingValue?(e._groupingValuesCache[n]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,o)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}};const gy={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Hv("columnOrder",e)}),createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=Wv((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>o=>{let r=[];if(null!=e&&e.length){const t=[...e],n=[...o];for(;n.length&&t.length;){const e=t.shift(),o=n.findIndex((t=>t.id===e));o>-1&&r.push(n.splice(o,1)[0])}r=[...r,...n]}else r=o;return function(e,t,n){if(null==t||!t.length||!n)return e;const o=e.filter((e=>!t.includes(e.id)));return"remove"===n?o:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...o]}(r,t,n)}),{key:"development"===process.env.NODE_ENV&&"getOrderColumnsFn"})}},my={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Hv("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var o,r;if(t){if(null!=(o=null!=(r=e.options.autoResetAll)?r:e.options.autoResetPageIndex)?o:!e.options.manualPagination){if(n)return;n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>Bv(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let o=Bv(t,n.pageIndex);const r=typeof e.options.pageCount>"u"||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,r)),{...n,pageIndex:o}}))},e.resetPageIndex=t=>{var n,o;e.setPageIndex(t?0:null!=(n=null==(o=e.initialState)||null==(o=o.pagination)?void 0:o.pageIndex)?n:0)},e.resetPageSize=t=>{var n,o;e.setPageSize(t?10:null!=(n=null==(o=e.initialState)||null==(o=o.pagination)?void 0:o.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,Bv(t,e.pageSize)),o=e.pageSize*e.pageIndex,r=Math.floor(o/n);return{...e,pageIndex:r,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var o;let r=Bv(t,null!=(o=e.options.pageCount)?o:-1);return"number"==typeof r&&(r=Math.max(-1,r)),{...n,pageCount:r}})),e.getPageOptions=Wv((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),{key:"development"===process.env.NODE_ENV&&"getPageOptions",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+1)),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}},vy={getInitialState:e=>({columnPinning:{left:[],right:[]},rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:Hv("columnPinning",e),onRowPinningChange:Hv("rowPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const o=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,r,i,a,l,s;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=o&&o.includes(e)))),right:[...(null!=(a=null==e?void 0:e.right)?a:[]).filter((e=>!(null!=o&&o.includes(e)))),...o]}:"left"===n?{left:[...(null!=(l=null==e?void 0:e.left)?l:[]).filter((e=>!(null!=o&&o.includes(e)))),...o],right:(null!=(s=null==e?void 0:e.right)?s:[]).filter((e=>!(null!=o&&o.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=o&&o.includes(e)))),right:(null!=(r=null==e?void 0:e.right)?r:[]).filter((e=>!(null!=o&&o.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,o,r;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(o=null!=(r=t.options.enableColumnPinning)?r:t.options.enablePinning)||o)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:o,right:r}=t.getState().columnPinning,i=n.some((e=>null==o?void 0:o.includes(e))),a=n.some((e=>null==r?void 0:r.includes(e)));return i?"left":!!a&&"right"},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();return r?null!=(n=null==(o=t.getState().columnPinning)||null==(o=o[r])?void 0:o.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.pin=(n,o,r)=>{const i=o?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],a=r?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],l=new Set([...a,e.id,...i]);t.setRowPinning((e=>{var t,o,r,i,a,s;return"bottom"===n?{top:(null!=(r=null==e?void 0:e.top)?r:[]).filter((e=>!(null!=l&&l.has(e)))),bottom:[...(null!=(i=null==e?void 0:e.bottom)?i:[]).filter((e=>!(null!=l&&l.has(e)))),...l]}:"top"===n?{top:[...(null!=(a=null==e?void 0:e.top)?a:[]).filter((e=>!(null!=l&&l.has(e)))),...l],bottom:(null!=(s=null==e?void 0:e.bottom)?s:[]).filter((e=>!(null!=l&&l.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=l&&l.has(e)))),bottom:(null!=(o=null==e?void 0:e.bottom)?o:[]).filter((e=>!(null!=l&&l.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:r}=t.options;return"function"==typeof o?o(e):null==(n=o??r)||n},e.getIsPinned=()=>{const n=[e.id],{top:o,bottom:r}=t.getState().rowPinning,i=n.some((e=>null==o?void 0:o.includes(e))),a=n.some((e=>null==r?void 0:r.includes(e)));return i?"top":!!a&&"bottom"},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();if(!r)return-1;const i=null==(n=t._getPinnedRows(r))?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(o=null==i?void 0:i.indexOf(e.id))?o:-1},e.getCenterVisibleCells=Wv((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const o=[...t??[],...n??[]];return e.filter((e=>!o.includes(e.column.id)))}),{key:"development"===process.env.NODE_ENV&&"row.getCenterVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getLeftVisibleCells=Wv((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,,]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),{key:"development"===process.env.NODE_ENV&&"row.getLeftVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getRightVisibleCells=Wv((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})))),{key:"development"===process.env.NODE_ENV&&"row.getRightVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,o;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(o=e.initialState)?void 0:o.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const o=e.getState().columnPinning;var r,i;return t?!(null==(n=o[t])||!n.length):!!(null!=(r=o.left)&&r.length||null!=(i=o.right)&&i.length)},e.getLeftLeafColumns=Wv((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:"development"===process.env.NODE_ENV&&"getLeftLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.getRightLeafColumns=Wv((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:"development"===process.env.NODE_ENV&&"getRightLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.getCenterLeafColumns=Wv((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const o=[...t??[],...n??[]];return e.filter((e=>!o.includes(e.id)))}),{key:"development"===process.env.NODE_ENV&&"getCenterLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,o;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(o=e.initialState)?void 0:o.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const o=e.getState().rowPinning;var r,i;return t?!(null==(n=o[t])||!n.length):!!(null!=(r=o.top)&&r.length||null!=(i=o.bottom)&&i.length)},e._getPinnedRows=t=>Wv((()=>[e.getRowModel().rows,e.getState().rowPinning[t]]),((n,o)=>{var r;return(null==(r=e.options.keepPinnedRows)||r?(o??[]).map((t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null})):(o??[]).map((e=>n.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:t})))}),{key:"development"===process.env.NODE_ENV&&`row.get${"top"===t?"Top":"Bottom"}Rows`,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})(),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=Wv((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const o=new Set([...t??[],...n??[]]);return e.filter((e=>!o.has(e.id)))}),{key:"development"===process.env.NODE_ENV&&"row.getCenterRows",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})}},yy={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Hv("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const o={...n},r=e.getPreGroupedRowModel().flatRows;return t?r.forEach((e=>{e.getCanSelect()&&(o[e.id]=!0)})):r.forEach((e=>{delete o[e.id]})),o}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),r={...n};return e.getRowModel().rows.forEach((t=>{by(r,t.id,o,e)})),r})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Wv((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?wy(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"development"===process.env.NODE_ENV&&"getSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getFilteredSelectedRowModel=Wv((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?wy(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"production"===process.env.NODE_ENV&&"getFilteredSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getGroupedSelectedRowModel=Wv((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?wy(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"production"===process.env.NODE_ENV&&"getGroupedSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let o=!(!t.length||!Object.keys(n).length);return o&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let o=!!t.length;return o&&t.some((e=>!n[e.id]))&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.getIsSelected()||e.getIsSomeSelected()))},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=n=>{const o=e.getIsSelected();t.setRowSelection((r=>{if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return r;const i={...r};return by(i,e.id,n,t),i}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return xy(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===_y(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===_y(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var o;t&&e.toggleSelected(null==(o=n.target)?void 0:o.checked)}}}},by=(e,t,n,o)=>{var r;const i=o.getRow(t);n?(i.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),i.getCanSelect()&&(e[t]=!0)):delete e[t],null!=(r=i.subRows)&&r.length&&i.getCanSelectSubRows()&&i.subRows.forEach((t=>by(e,t.id,n,o)))};function wy(e,t){const n=e.getState().rowSelection,o=[],r={},i=function(e,t){return e.map((e=>{var t;const a=xy(e,n);if(a&&(o.push(e),r[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:i(e.subRows)}),a)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:o,rowsById:r}}function xy(e,t){var n;return null!=(n=t[e.id])&&n}function _y(e,t,n){var o;if(null==(o=e.subRows)||!o.length)return!1;let r=!0,i=!1;return e.subRows.forEach((e=>{if((!i||r)&&(e.getCanSelect()&&(xy(e,t)?i=!0:r=!1),e.subRows&&e.subRows.length)){const n=_y(e,t);"all"===n?i=!0:("some"===n&&(i=!0),r=!1)}})),r?"all":!!i&&"some"}const ky=/([0-9]+)/gm;function Ey(e,t){return e===t?0:e>t?1:-1}function Cy(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function Oy(e,t){const n=e.split(ky).filter(Boolean),o=t.split(ky).filter(Boolean);for(;n.length&&o.length;){const e=n.shift(),t=o.shift(),r=parseInt(e,10),i=parseInt(t,10),a=[r,i].sort();if(isNaN(a[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(a[1]))return isNaN(r)?-1:1;if(r>i)return 1;if(i>r)return-1}}return n.length-o.length}const Sy={alphanumeric:(e,t,n)=>Oy(Cy(e.getValue(n)).toLowerCase(),Cy(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>Oy(Cy(e.getValue(n)),Cy(t.getValue(n))),text:(e,t,n)=>Ey(Cy(e.getValue(n)).toLowerCase(),Cy(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>Ey(Cy(e.getValue(n)),Cy(t.getValue(n))),datetime:(e,t,n)=>{const o=e.getValue(n),r=t.getValue(n);return o>r?1:o<r?-1:0},basic:(e,t,n)=>Ey(e.getValue(n),t.getValue(n))},Ny={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Hv("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return Sy.datetime;if("string"==typeof n&&(o=!0,n.split(ky).length>1))return Sy.alphanumeric}return o?Sy.text:Sy.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,o;if(!e)throw new Error;return Uv(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(o=t.options.sortingFns)?void 0:o[e.columnDef.sortingFn])?n:Sy[e.columnDef.sortingFn]},e.toggleSorting=(n,o)=>{const r=e.getNextSortingOrder(),i=typeof n<"u"&&null!==n;t.setSorting((a=>{const l=null==a?void 0:a.find((t=>t.id===e.id)),s=null==a?void 0:a.findIndex((t=>t.id===e.id));let u,c=[],d=i?n:"desc"===r;var f;(u=null!=a&&a.length&&e.getCanMultiSort()&&o?l?"toggle":"add":null!=a&&a.length&&s!==a.length-1?"replace":l?"toggle":"replace","toggle"===u&&(i||r||(u="remove")),"add"===u)?(c=[...a,{id:e.id,desc:d}],c.splice(0,c.length-(null!=(f=t.options.maxMultiSortColCount)?f:Number.MAX_SAFE_INTEGER))):c="toggle"===u?a.map((t=>t.id===e.id?{...t,desc:d}:t)):"remove"===u?a.filter((t=>t.id!==e.id)):[{id:e.id,desc:d}];return c}))},e.getFirstSortDir=()=>{var n,o;return(null!=(n=null!=(o=e.columnDef.sortDescFirst)?o:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var o,r;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?!!(a===i||null!=(o=t.options.enableSortingRemoval)&&!o||n&&null!=(r=t.options.enableMultiRemove)&&!r)&&("desc"===a?"asc":"desc"):i},e.getCanSort=()=>{var n,o;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(o=t.options.enableSorting)||o)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,o;return null!=(n=null!=(o=e.columnDef.enableMultiSort)?o:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const o=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!o&&(o.desc?"desc":"asc")},e.getSortIndex=()=>{var n,o;return null!=(n=null==(o=t.getState().sorting)?void 0:o.findIndex((t=>t.id===e.id)))?n:-1},e.clearSorting=()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return o=>{n&&(null==o.persist||o.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(o))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,o;e.setSorting(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},jy={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Hv("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:n??!e.getIsVisible()})))},e.getIsVisible=()=>{var n,o;return null==(n=null==(o=t.getState().columnVisibility)?void 0:o[e.id])||n},e.getCanHide=()=>{var n,o;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(o=t.options.enableHiding)||o)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Wv((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),{key:"production"===process.env.NODE_ENV&&"row._getAllVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getVisibleCells=Wv((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),{key:"development"===process.env.NODE_ENV&&"row.getVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})},createTable:e=>{const t=(t,n)=>Wv((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),{key:t,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}});e.getVisibleFlatColumns=t("getVisibleFlatColumns",(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t("getVisibleLeafColumns",(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}},Ty=[$v,jy,gy,vy,dy,Ny,hy,Jv,my,yy,Zv];function Py(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let n={_features:Ty};const o=n._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(n))),{});let r={...null!=(t=e.initialState)?t:{}};n._features.forEach((e=>{var t;r=null!=(t=null==e.getInitialState?void 0:e.getInitialState(r))?t:r}));const i=[];let a=!1;const l={_features:Ty,options:{...o,...e},initialState:r,_queue:e=>{i.push(e),a||(a=!0,Promise.resolve().then((()=>{for(;i.length;)i.shift()();a=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{n.setState(n.initialState)},setOptions:e=>{const t=Bv(e,n.options);n.options=(e=>n.options.mergeOptions?n.options.mergeOptions(o,e):{...o,...e})(t)},getState:()=>n.options.state,setState:e=>{null==n.options.onStateChange||n.options.onStateChange(e)},_getRowId:(e,t,o)=>{var r;return null!=(r=null==n.options.getRowId?void 0:n.options.getRowId(e,t,o))?r:`${o?[o.id,t].join("."):t}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(e,t)=>{const o=(t?n.getCoreRowModel():n.getRowModel()).rowsById[e];if(!o)throw"production"!==process.env.NODE_ENV?new Error(`getRow expected an ID, but got ${e}`):new Error;return o},_getDefaultColumnDef:Wv((()=>[n.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...n._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),{debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns},key:"development"===process.env.NODE_ENV&&"getDefaultColumnDef"}),_getColumnDefs:()=>n.options.columns,getAllColumns:Wv((()=>[n._getColumnDefs()]),(e=>{const t=function(e,o,r){return void 0===r&&(r=0),e.map((e=>{const i=function(e,t,n,o){var r,i;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let s,u=null!=(r=null!=(i=a.id)?i:l?l.replace(".","_"):void 0)?r:"string"==typeof a.header?a.header:void 0;if(a.accessorFn?s=a.accessorFn:l&&(s=l.includes(".")?e=>{let t=e;for(const e of l.split(".")){var n;t=null==(n=t)?void 0:n[e],"production"!==process.env.NODE_ENV&&void 0===t&&console.warn(`"${e}" in deeply nested key "${l}" returned undefined.`)}return t}:e=>e[a.accessorKey]),!u)throw"production"!==process.env.NODE_ENV?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let c={id:`${String(u)}`,accessorFn:s,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:Wv((()=>[!0]),(()=>{var e;return[c,...null==(e=c.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),{key:"production"===process.env.NODE_ENV&&"column.getFlatColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:Wv((()=>[e._getOrderColumnsFn()]),(e=>{var t;return null!=(t=c.columns)&&t.length?e(c.columns.flatMap((e=>e.getLeafColumns()))):[c]}),{key:"production"===process.env.NODE_ENV&&"column.getLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};for(const t of e._features)null==t.createColumn||t.createColumn(c,e);return c}(n,e,r,o),a=e;return i.columns=a.columns?t(a.columns,i,r+1):[],i}))};return t(e)}),{key:"development"===process.env.NODE_ENV&&"getAllColumns",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllFlatColumns:Wv((()=>[n.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),{key:"development"===process.env.NODE_ENV&&"getAllFlatColumns",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),_getAllFlatColumnsById:Wv((()=>[n.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),{key:"development"===process.env.NODE_ENV&&"getAllFlatColumnsById",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllLeafColumns:Wv((()=>[n.getAllColumns(),n._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),{key:"development"===process.env.NODE_ENV&&"getAllLeafColumns",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getColumn:e=>{const t=n._getAllFlatColumnsById()[e];return"production"!==process.env.NODE_ENV&&!t&&console.error(`[Table] Column with id '${e}' does not exist.`),t}};Object.assign(n,l);for(let e=0;e<n._features.length;e++){const t=n._features[e];null==t||null==t.createTable||t.createTable(n)}return n}const My=(e,t,n,o,r,i,a)=>{let l={id:t,index:o,original:n,depth:r,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(l._valuesCache.hasOwnProperty(t))return l._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(l._valuesCache[t]=n.accessorFn(l.original,o),l._valuesCache[t]):void 0},getUniqueValues:t=>{if(l._uniqueValuesCache.hasOwnProperty(t))return l._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(l._uniqueValuesCache[t]=n.columnDef.getUniqueValues(l.original,o),l._uniqueValuesCache[t]):(l._uniqueValuesCache[t]=[l.getValue(t)],l._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=l.getValue(t))?n:e.options.renderFallbackValue},subRows:i??[],getLeafRows:()=>function(e,t){const n=[],o=e=>{e.forEach((e=>{n.push(e);const r=t(e);null!=r&&r.length&&o(r)}))};return o(e),n}(l.subRows,(e=>e.subRows)),getParentRow:()=>l.parentId?e.getRow(l.parentId):void 0,getParentRows:()=>{let e=[],t=l;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:Wv((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,o){const r={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(o),renderValue:()=>{var t;return null!=(t=r.getValue())?t:e.options.renderFallbackValue},getContext:Wv((()=>[e,n,t,r]),((e,t,n,o)=>({table:e,column:t,row:n,cell:o,getValue:o.getValue,renderValue:o.renderValue})),{key:"development"===process.env.NODE_ENV&&"cell.getContext",debug:()=>e.options.debugAll})};return e._features.forEach((o=>{null==o.createCell||o.createCell(r,n,t,e)}),{}),r}(e,l,t,t.id)))),{key:"development"===process.env.NODE_ENV&&"row.getAllCells",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:Wv((()=>[l.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),{key:"production"===process.env.NODE_ENV&&"row.getAllCellsByColumnId",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})};for(let t=0;t<e._features.length;t++){const n=e._features[t];null==n||null==n.createRow||n.createRow(l,e)}return l};function Ay(){return{accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Ry(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){var o;const r=[],i={},a=null!=(o=n.options.maxLeafRowFilterDepth)?o:100,l=function(e,o){void 0===o&&(o=0);const s=[];for(let c=0;c<e.length;c++){var u;let d=e[c];const f=My(n,d.id,d.original,d.index,d.depth,void 0,d.parentId);if(f.columnFilters=d.columnFilters,null!=(u=d.subRows)&&u.length&&o<a){if(f.subRows=l(d.subRows,o+1),d=f,t(d)&&!f.subRows.length){s.push(d),i[d.id]=d,r.push(d);continue}if(t(d)||f.subRows.length){s.push(d),i[d.id]=d,r.push(d);continue}}else d=f,t(d)&&(s.push(d),i[d.id]=d,r.push(d))}return s};return{rows:l(e),flatRows:r,rowsById:i}}(e,t,n):function(e,t,n){var o;const r=[],i={},a=null!=(o=n.options.maxLeafRowFilterDepth)?o:100,l=function(e,o){void 0===o&&(o=0);const s=[];for(let c=0;c<e.length;c++){let d=e[c];if(t(d)){var u;if(null!=(u=d.subRows)&&u.length&&o<a){const e=My(n,d.id,d.original,d.index,d.depth,void 0,d.parentId);e.subRows=l(d.subRows,o+1),d=e}s.push(d),r.push(d),i[d.id]=d}}return s};return{rows:l(e),flatRows:r,rowsById:i}}(e,t,n)}function Dy(e){const t=[],n=e=>{var o;t.push(e),null!=(o=e.subRows)&&o.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}
|
|
36
|
+
function Hv(e,t){return"function"==typeof e?e(t):e}function Uv(e,t){return n=>{t.setState((t=>({...t,[e]:Hv(n,t[e])})))}}function Wv(e){return e instanceof Function}function Gv(e,t,n){let o,r=[];return()=>{let i;n.key&&n.debug&&(i=Date.now());const a=e();if(a.length===r.length&&!a.some(((e,t)=>r[t]!==e)))return o;let l;if(r=a,n.key&&n.debug&&(l=Date.now()),o=t(...a),null==n||null==n.onChange||n.onChange(o),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-i))/100,t=Math.round(100*(Date.now()-l))/100,o=t/16,r=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${r(t,5)} /${r(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*o,120))}deg 100% 31%);`,null==n?void 0:n.key)}return o}}function $v(e,t,n){var o;let r={id:null!=(o=n.id)?o:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(r),e},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(r,e)})),r}const Kv={createTable:e=>{e.getHeaderGroups=Gv((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,o,r)=>{var i,a;const l=null!=(i=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?i:[],s=null!=(a=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?a:[];return Yv(t,[...l,...n.filter((e=>!(null!=o&&o.includes(e.id)||null!=r&&r.includes(e.id)))),...s],e)}),{key:"development"===process.env.NODE_ENV&&"getHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterHeaderGroups=Gv((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,o,r)=>Yv(t,n=n.filter((e=>!(null!=o&&o.includes(e.id)||null!=r&&r.includes(e.id)))),e,"center")),{key:"development"===process.env.NODE_ENV&&"getCenterHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftHeaderGroups=Gv((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,o)=>{var r;return Yv(t,null!=(r=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?r:[],e,"left")}),{key:"development"===process.env.NODE_ENV&&"getLeftHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightHeaderGroups=Gv((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,o)=>{var r;return Yv(t,null!=(r=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?r:[],e,"right")}),{key:"development"===process.env.NODE_ENV&&"getRightHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getFooterGroups=Gv((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftFooterGroups=Gv((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getLeftFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterFooterGroups=Gv((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getCenterFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightFooterGroups=Gv((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getRightFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getFlatHeaders=Gv((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftFlatHeaders=Gv((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getLeftFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterFlatHeaders=Gv((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getCenterFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightFlatHeaders=Gv((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getRightFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterLeafHeaders=Gv((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:"development"===process.env.NODE_ENV&&"getCenterLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftLeafHeaders=Gv((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:"development"===process.env.NODE_ENV&&"getLeftLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightLeafHeaders=Gv((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:"development"===process.env.NODE_ENV&&"getRightLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeafHeaders=Gv((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var o,r,i,a,l,s;return[...null!=(o=null==(r=e[0])?void 0:r.headers)?o:[],...null!=(i=null==(a=t[0])?void 0:a.headers)?i:[],...null!=(l=null==(s=n[0])?void 0:s.headers)?l:[]].map((e=>e.getLeafHeaders())).flat()}),{key:"development"===process.env.NODE_ENV&&"getLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}})}};function Yv(e,t,n,o){var r,i;let a=0;const l=function(e,t){void 0===t&&(t=1),a=Math.max(a,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&l(e.columns,t+1)}),0)};l(e);let s=[];const u=(e,t)=>{const r={depth:t,id:[o,`${t}`].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const a=[...i].reverse()[0];let l,s=!1;if(e.column.depth===r.depth&&e.column.parent?l=e.column.parent:(l=e.column,s=!0),a&&(null==a?void 0:a.column)===l)a.subHeaders.push(e);else{const r=$v(n,l,{id:[o,t,l.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:s,placeholderId:s?`${i.filter((e=>e.column===l)).length}`:void 0,depth:t,index:i.length});r.subHeaders.push(e),i.push(r)}r.headers.push(e),e.headerGroup=r})),s.push(r),t>0&&u(i,t-1)},c=t.map(((e,t)=>$v(n,e,{depth:a,index:t})));u(c,a-1),s.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,o=[0];e.subHeaders&&e.subHeaders.length?(o=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:r}=e;t+=n,o.push(r)}))):t=1;return n+=Math.min(...o),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return d(null!=(r=null==(i=s[0])?void 0:i.headers)?r:[]),s}const Zv={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Xv={getDefaultColumnDef:()=>Zv,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:Uv("columnSizing",e),onColumnSizingInfoChange:Uv("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,o,r;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:Zv.minSize,null!=(o=i??e.columnDef.size)?o:Zv.size),null!=(r=e.columnDef.maxSize)?r:Zv.maxSize)},e.getStart=n=>{const o=n?"left"===n?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),r=o.findIndex((t=>t.id===e.id));if(r>0){const e=o[r-1];return e.getStart(n)+e.getSize()}return 0},e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...o}=t;return o}))},e.getCanResize=()=>{var n,o;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(o=t.options.enableColumnResizing)||o)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var o;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(o=e.column.getSize())?o:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=()=>{const n=t.getColumn(e.column.id),o=null==n?void 0:n.getCanResize();return r=>{if(!n||!o||(null==r.persist||r.persist(),Jv(r)&&r.touches&&r.touches.length>1))return;const i=e.getSize(),a=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[n.id,n.getSize()]],l=Jv(r)?Math.round(r.touches[0].clientX):r.clientX,s={},u=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var t,o;const r=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),i=Math.max(r/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;s[t]=Math.round(100*Math.max(n+n*i,0))/100})),{...e,deltaOffset:r,deltaPercentage:i}})),("onChange"===t.options.columnResizeMode||"end"===e)&&t.setColumnSizing((e=>({...e,...s}))))},c=e=>u("move",e),d=e=>{u("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},f={moveHandler:e=>c(e.clientX),upHandler:e=>{document.removeEventListener("mousemove",f.moveHandler),document.removeEventListener("mouseup",f.upHandler),d(e.clientX)}},p={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),c(e.touches[0].clientX),!1),upHandler:e=>{var t;document.removeEventListener("touchmove",p.moveHandler),document.removeEventListener("touchend",p.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(null==(t=e.touches[0])?void 0:t.clientX)}},h=!!function(){if("boolean"==typeof Qv)return Qv;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Qv=e,Qv}()&&{passive:!1};Jv(r)?(document.addEventListener("touchmove",p.moveHandler,h),document.addEventListener("touchend",p.upHandler,h)):(document.addEventListener("mousemove",f.moveHandler,h),document.addEventListener("mouseup",f.upHandler,h)),t.setColumnSizingInfo((e=>({...e,startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:n.id})))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}};let Qv=null;function Jv(e){return"touchstart"===e.type}const ey={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Uv("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var o,r;if(t){if(null!=(o=null!=(r=e.options.autoResetAll)?r:e.options.autoResetExpanded)?o:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{t??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,o;e.setExpanded(t?{}:null!=(n=null==(o=e.initialState)?void 0:o.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some((e=>e.getCanExpand())),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!(!Object.keys(t).length||e.getRowModel().flatRows.some((e=>!e.getIsExpanded())))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded((o=>{var r;const i=!0===o||!(null==o||!o[e.id]);let a={};if(!0===o?Object.keys(t.getRowModel().rowsById).forEach((e=>{a[e]=!0})):a=o,n=null!=(r=n)?r:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=a;return n}return o}))},e.getIsExpanded=()=>{var n;const o=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===o||null!=o&&o[e.id])},e.getCanExpand=()=>{var n,o,r;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(o=t.options.enableExpanding)||o)&&!(null==(r=e.subRows)||!r.length)},e.getIsAllParentsExpanded=()=>{let n=!0,o=e;for(;n&&o.parentId;)o=t.getRow(o.parentId,!0),n=o.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},ty=(e,t,n)=>{var o;const r=n.toLowerCase();return!(null==(o=e.getValue(t))||null==(o=o.toString())||null==(o=o.toLowerCase())||!o.includes(r))};ty.autoRemove=e=>dy(e);const ny=(e,t,n)=>{var o;return!(null==(o=e.getValue(t))||null==(o=o.toString())||!o.includes(n))};ny.autoRemove=e=>dy(e);const oy=(e,t,n)=>{var o;return(null==(o=e.getValue(t))||null==(o=o.toString())?void 0:o.toLowerCase())===(null==n?void 0:n.toLowerCase())};oy.autoRemove=e=>dy(e);const ry=(e,t,n)=>{var o;return null==(o=e.getValue(t))?void 0:o.includes(n)};ry.autoRemove=e=>dy(e)||!(null!=e&&e.length);const iy=(e,t,n)=>!n.some((n=>{var o;return!(null!=(o=e.getValue(t))&&o.includes(n))}));iy.autoRemove=e=>dy(e)||!(null!=e&&e.length);const ay=(e,t,n)=>n.some((n=>{var o;return null==(o=e.getValue(t))?void 0:o.includes(n)}));ay.autoRemove=e=>dy(e)||!(null!=e&&e.length);const ly=(e,t,n)=>e.getValue(t)===n;ly.autoRemove=e=>dy(e);const sy=(e,t,n)=>e.getValue(t)==n;sy.autoRemove=e=>dy(e);const uy=(e,t,n)=>{let[o,r]=n;const i=e.getValue(t);return i>=o&&i<=r};uy.resolveFilterValue=e=>{let[t,n]=e,o="number"!=typeof t?parseFloat(t):t,r="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(o)?-1/0:o,a=null===n||Number.isNaN(r)?1/0:r;if(i>a){const e=i;i=a,a=e}return[i,a]},uy.autoRemove=e=>dy(e)||dy(e[0])&&dy(e[1]);const cy={includesString:ty,includesStringSensitive:ny,equalsString:oy,arrIncludes:ry,arrIncludesAll:iy,arrIncludesSome:ay,equals:ly,weakEquals:sy,inNumberRange:uy};function dy(e){return null==e||""===e}const fy={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:Uv("columnFilters",e),onGlobalFilterChange:Uv("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const o=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof o||"number"==typeof o}}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=null==n?void 0:n.getValue(e.id);return"string"==typeof o?cy.includesString:"number"==typeof o?cy.inNumberRange:"boolean"==typeof o||null!==o&&"object"==typeof o?cy.equals:Array.isArray(o)?cy.arrIncludes:cy.weakEquals},e.getFilterFn=()=>{var n,o;return Wv(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(o=t.options.filterFns)?void 0:o[e.columnDef.filterFn])?n:cy[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,o,r;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(o=t.options.enableColumnFilters)||o)&&(null==(r=t.options.enableFilters)||r)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var n,o,r,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(o=t.options.enableGlobalFilter)||o)&&(null==(r=t.options.enableFilters)||r)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,o;return null!=(n=null==(o=t.getState().columnFilters)?void 0:o.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const o=e.getFilterFn(),r=null==t?void 0:t.find((t=>t.id===e.id)),i=Hv(n,r?r.value:void 0);var a;if(py(o,i,e))return null!=(a=null==t?void 0:t.filter((t=>t.id!==e.id)))?a:[];const l={id:e.id,value:i};var s;return r?null!=(s=null==t?void 0:t.map((t=>t.id===e.id?l:t)))?s:[]:null!=t&&t.length?[...t,l]:[l]}))},e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.getGlobalAutoFilterFn=()=>cy.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:o}=e.options;return Wv(o)?o:"auto"===o?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[o])?t:cy[o]},e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var o;return null==(o=Hv(t,e))?void 0:o.filter((e=>{const t=n.find((t=>t.id===e.id));if(t){if(py(t.getFilterFn(),e.value,t))return!1}return!0}))}))},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},e.resetColumnFilters=t=>{var n,o;e.setColumnFilters(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()),e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}};function py(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||typeof t>"u"||"string"==typeof t&&!t}const hy={sum:(e,t,n)=>n.reduce(((t,n)=>{const o=n.getValue(e);return t+("number"==typeof o?o:0)}),0),min:(e,t,n)=>{let o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(o>n||void 0===o&&n>=n)&&(o=n)})),o},max:(e,t,n)=>{let o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(o<n||void 0===o&&n>=n)&&(o=n)})),o},extent:(e,t,n)=>{let o,r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===o?n>=n&&(o=r=n):(o>n&&(o=n),r<n&&(r=n)))})),[o,r]},mean:(e,t)=>{let n=0,o=0;if(t.forEach((t=>{let r=t.getValue(e);null!=r&&(r=+r)>=r&&(++n,o+=r)})),n)return o/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(!function(e){return Array.isArray(e)&&e.every((e=>"number"==typeof e))}(n))return;if(1===n.length)return n[0];const o=Math.floor(n.length/2),r=n.sort(((e,t)=>e-t));return n.length%2!=0?r[o]:(r[o-1]+r[o])/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},gy={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Uv("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...t??[],e.id]))},e.getCanGroup=()=>{var n,o,r,i;return null!=(n=null==(o=null!=(r=null==(i=e.columnDef.enableGrouping)||i)?r:t.options.enableGrouping)||o)?n:!!e.accessorFn},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=null==n?void 0:n.getValue(e.id);return"number"==typeof o?hy.sum:"[object Date]"===Object.prototype.toString.call(o)?hy.extent:void 0},e.getAggregationFn=()=>{var n,o;if(!e)throw new Error;return Wv(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(o=t.options.aggregationFns)?void 0:o[e.columnDef.aggregationFn])?n:hy[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,o;e.setGrouping(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const o=t.getColumn(n);return null!=o&&o.columnDef.getGroupingValue?(e._groupingValuesCache[n]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,o)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}};const my={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Uv("columnOrder",e)}),createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=Gv((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>o=>{let r=[];if(null!=e&&e.length){const t=[...e],n=[...o];for(;n.length&&t.length;){const e=t.shift(),o=n.findIndex((t=>t.id===e));o>-1&&r.push(n.splice(o,1)[0])}r=[...r,...n]}else r=o;return function(e,t,n){if(null==t||!t.length||!n)return e;const o=e.filter((e=>!t.includes(e.id)));return"remove"===n?o:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...o]}(r,t,n)}),{key:"development"===process.env.NODE_ENV&&"getOrderColumnsFn"})}},vy={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Uv("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var o,r;if(t){if(null!=(o=null!=(r=e.options.autoResetAll)?r:e.options.autoResetPageIndex)?o:!e.options.manualPagination){if(n)return;n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>Hv(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let o=Hv(t,n.pageIndex);const r=typeof e.options.pageCount>"u"||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,r)),{...n,pageIndex:o}}))},e.resetPageIndex=t=>{var n,o;e.setPageIndex(t?0:null!=(n=null==(o=e.initialState)||null==(o=o.pagination)?void 0:o.pageIndex)?n:0)},e.resetPageSize=t=>{var n,o;e.setPageSize(t?10:null!=(n=null==(o=e.initialState)||null==(o=o.pagination)?void 0:o.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,Hv(t,e.pageSize)),o=e.pageSize*e.pageIndex,r=Math.floor(o/n);return{...e,pageIndex:r,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var o;let r=Hv(t,null!=(o=e.options.pageCount)?o:-1);return"number"==typeof r&&(r=Math.max(-1,r)),{...n,pageCount:r}})),e.getPageOptions=Gv((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),{key:"development"===process.env.NODE_ENV&&"getPageOptions",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+1)),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}},yy={getInitialState:e=>({columnPinning:{left:[],right:[]},rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:Uv("columnPinning",e),onRowPinningChange:Uv("rowPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const o=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,r,i,a,l,s;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=o&&o.includes(e)))),right:[...(null!=(a=null==e?void 0:e.right)?a:[]).filter((e=>!(null!=o&&o.includes(e)))),...o]}:"left"===n?{left:[...(null!=(l=null==e?void 0:e.left)?l:[]).filter((e=>!(null!=o&&o.includes(e)))),...o],right:(null!=(s=null==e?void 0:e.right)?s:[]).filter((e=>!(null!=o&&o.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=o&&o.includes(e)))),right:(null!=(r=null==e?void 0:e.right)?r:[]).filter((e=>!(null!=o&&o.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,o,r;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(o=null!=(r=t.options.enableColumnPinning)?r:t.options.enablePinning)||o)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:o,right:r}=t.getState().columnPinning,i=n.some((e=>null==o?void 0:o.includes(e))),a=n.some((e=>null==r?void 0:r.includes(e)));return i?"left":!!a&&"right"},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();return r?null!=(n=null==(o=t.getState().columnPinning)||null==(o=o[r])?void 0:o.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.pin=(n,o,r)=>{const i=o?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],a=r?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],l=new Set([...a,e.id,...i]);t.setRowPinning((e=>{var t,o,r,i,a,s;return"bottom"===n?{top:(null!=(r=null==e?void 0:e.top)?r:[]).filter((e=>!(null!=l&&l.has(e)))),bottom:[...(null!=(i=null==e?void 0:e.bottom)?i:[]).filter((e=>!(null!=l&&l.has(e)))),...l]}:"top"===n?{top:[...(null!=(a=null==e?void 0:e.top)?a:[]).filter((e=>!(null!=l&&l.has(e)))),...l],bottom:(null!=(s=null==e?void 0:e.bottom)?s:[]).filter((e=>!(null!=l&&l.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=l&&l.has(e)))),bottom:(null!=(o=null==e?void 0:e.bottom)?o:[]).filter((e=>!(null!=l&&l.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:r}=t.options;return"function"==typeof o?o(e):null==(n=o??r)||n},e.getIsPinned=()=>{const n=[e.id],{top:o,bottom:r}=t.getState().rowPinning,i=n.some((e=>null==o?void 0:o.includes(e))),a=n.some((e=>null==r?void 0:r.includes(e)));return i?"top":!!a&&"bottom"},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();if(!r)return-1;const i=null==(n=t._getPinnedRows(r))?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(o=null==i?void 0:i.indexOf(e.id))?o:-1},e.getCenterVisibleCells=Gv((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const o=[...t??[],...n??[]];return e.filter((e=>!o.includes(e.column.id)))}),{key:"development"===process.env.NODE_ENV&&"row.getCenterVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getLeftVisibleCells=Gv((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,,]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),{key:"development"===process.env.NODE_ENV&&"row.getLeftVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getRightVisibleCells=Gv((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})))),{key:"development"===process.env.NODE_ENV&&"row.getRightVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,o;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(o=e.initialState)?void 0:o.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const o=e.getState().columnPinning;var r,i;return t?!(null==(n=o[t])||!n.length):!!(null!=(r=o.left)&&r.length||null!=(i=o.right)&&i.length)},e.getLeftLeafColumns=Gv((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:"development"===process.env.NODE_ENV&&"getLeftLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.getRightLeafColumns=Gv((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:"development"===process.env.NODE_ENV&&"getRightLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.getCenterLeafColumns=Gv((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const o=[...t??[],...n??[]];return e.filter((e=>!o.includes(e.id)))}),{key:"development"===process.env.NODE_ENV&&"getCenterLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,o;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(o=e.initialState)?void 0:o.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const o=e.getState().rowPinning;var r,i;return t?!(null==(n=o[t])||!n.length):!!(null!=(r=o.top)&&r.length||null!=(i=o.bottom)&&i.length)},e._getPinnedRows=t=>Gv((()=>[e.getRowModel().rows,e.getState().rowPinning[t]]),((n,o)=>{var r;return(null==(r=e.options.keepPinnedRows)||r?(o??[]).map((t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null})):(o??[]).map((e=>n.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:t})))}),{key:"development"===process.env.NODE_ENV&&`row.get${"top"===t?"Top":"Bottom"}Rows`,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})(),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=Gv((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const o=new Set([...t??[],...n??[]]);return e.filter((e=>!o.has(e.id)))}),{key:"development"===process.env.NODE_ENV&&"row.getCenterRows",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})}},by={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Uv("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const o={...n},r=e.getPreGroupedRowModel().flatRows;return t?r.forEach((e=>{e.getCanSelect()&&(o[e.id]=!0)})):r.forEach((e=>{delete o[e.id]})),o}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),r={...n};return e.getRowModel().rows.forEach((t=>{wy(r,t.id,o,e)})),r})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Gv((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?xy(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"development"===process.env.NODE_ENV&&"getSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getFilteredSelectedRowModel=Gv((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?xy(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"production"===process.env.NODE_ENV&&"getFilteredSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getGroupedSelectedRowModel=Gv((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?xy(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"production"===process.env.NODE_ENV&&"getGroupedSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let o=!(!t.length||!Object.keys(n).length);return o&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let o=!!t.length;return o&&t.some((e=>!n[e.id]))&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.getIsSelected()||e.getIsSomeSelected()))},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=n=>{const o=e.getIsSelected();t.setRowSelection((r=>{if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return r;const i={...r};return wy(i,e.id,n,t),i}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return _y(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===ky(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===ky(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var o;t&&e.toggleSelected(null==(o=n.target)?void 0:o.checked)}}}},wy=(e,t,n,o)=>{var r;const i=o.getRow(t);n?(i.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),i.getCanSelect()&&(e[t]=!0)):delete e[t],null!=(r=i.subRows)&&r.length&&i.getCanSelectSubRows()&&i.subRows.forEach((t=>wy(e,t.id,n,o)))};function xy(e,t){const n=e.getState().rowSelection,o=[],r={},i=function(e,t){return e.map((e=>{var t;const a=_y(e,n);if(a&&(o.push(e),r[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:i(e.subRows)}),a)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:o,rowsById:r}}function _y(e,t){var n;return null!=(n=t[e.id])&&n}function ky(e,t,n){var o;if(null==(o=e.subRows)||!o.length)return!1;let r=!0,i=!1;return e.subRows.forEach((e=>{if((!i||r)&&(e.getCanSelect()&&(_y(e,t)?i=!0:r=!1),e.subRows&&e.subRows.length)){const n=ky(e,t);"all"===n?i=!0:("some"===n&&(i=!0),r=!1)}})),r?"all":!!i&&"some"}const Ey=/([0-9]+)/gm;function Cy(e,t){return e===t?0:e>t?1:-1}function Oy(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function Sy(e,t){const n=e.split(Ey).filter(Boolean),o=t.split(Ey).filter(Boolean);for(;n.length&&o.length;){const e=n.shift(),t=o.shift(),r=parseInt(e,10),i=parseInt(t,10),a=[r,i].sort();if(isNaN(a[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(a[1]))return isNaN(r)?-1:1;if(r>i)return 1;if(i>r)return-1}}return n.length-o.length}const Ny={alphanumeric:(e,t,n)=>Sy(Oy(e.getValue(n)).toLowerCase(),Oy(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>Sy(Oy(e.getValue(n)),Oy(t.getValue(n))),text:(e,t,n)=>Cy(Oy(e.getValue(n)).toLowerCase(),Oy(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>Cy(Oy(e.getValue(n)),Oy(t.getValue(n))),datetime:(e,t,n)=>{const o=e.getValue(n),r=t.getValue(n);return o>r?1:o<r?-1:0},basic:(e,t,n)=>Cy(e.getValue(n),t.getValue(n))},jy={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Uv("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return Ny.datetime;if("string"==typeof n&&(o=!0,n.split(Ey).length>1))return Ny.alphanumeric}return o?Ny.text:Ny.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,o;if(!e)throw new Error;return Wv(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(o=t.options.sortingFns)?void 0:o[e.columnDef.sortingFn])?n:Ny[e.columnDef.sortingFn]},e.toggleSorting=(n,o)=>{const r=e.getNextSortingOrder(),i=typeof n<"u"&&null!==n;t.setSorting((a=>{const l=null==a?void 0:a.find((t=>t.id===e.id)),s=null==a?void 0:a.findIndex((t=>t.id===e.id));let u,c=[],d=i?n:"desc"===r;var f;(u=null!=a&&a.length&&e.getCanMultiSort()&&o?l?"toggle":"add":null!=a&&a.length&&s!==a.length-1?"replace":l?"toggle":"replace","toggle"===u&&(i||r||(u="remove")),"add"===u)?(c=[...a,{id:e.id,desc:d}],c.splice(0,c.length-(null!=(f=t.options.maxMultiSortColCount)?f:Number.MAX_SAFE_INTEGER))):c="toggle"===u?a.map((t=>t.id===e.id?{...t,desc:d}:t)):"remove"===u?a.filter((t=>t.id!==e.id)):[{id:e.id,desc:d}];return c}))},e.getFirstSortDir=()=>{var n,o;return(null!=(n=null!=(o=e.columnDef.sortDescFirst)?o:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var o,r;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?!!(a===i||null!=(o=t.options.enableSortingRemoval)&&!o||n&&null!=(r=t.options.enableMultiRemove)&&!r)&&("desc"===a?"asc":"desc"):i},e.getCanSort=()=>{var n,o;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(o=t.options.enableSorting)||o)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,o;return null!=(n=null!=(o=e.columnDef.enableMultiSort)?o:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const o=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!o&&(o.desc?"desc":"asc")},e.getSortIndex=()=>{var n,o;return null!=(n=null==(o=t.getState().sorting)?void 0:o.findIndex((t=>t.id===e.id)))?n:-1},e.clearSorting=()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return o=>{n&&(null==o.persist||o.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(o))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,o;e.setSorting(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Ty={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Uv("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:n??!e.getIsVisible()})))},e.getIsVisible=()=>{var n,o;return null==(n=null==(o=t.getState().columnVisibility)?void 0:o[e.id])||n},e.getCanHide=()=>{var n,o;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(o=t.options.enableHiding)||o)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Gv((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),{key:"production"===process.env.NODE_ENV&&"row._getAllVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getVisibleCells=Gv((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),{key:"development"===process.env.NODE_ENV&&"row.getVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})},createTable:e=>{const t=(t,n)=>Gv((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),{key:t,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}});e.getVisibleFlatColumns=t("getVisibleFlatColumns",(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t("getVisibleLeafColumns",(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}},Py=[Kv,Ty,my,yy,fy,jy,gy,ey,vy,by,Xv];function My(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let n={_features:Py};const o=n._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(n))),{});let r={...null!=(t=e.initialState)?t:{}};n._features.forEach((e=>{var t;r=null!=(t=null==e.getInitialState?void 0:e.getInitialState(r))?t:r}));const i=[];let a=!1;const l={_features:Py,options:{...o,...e},initialState:r,_queue:e=>{i.push(e),a||(a=!0,Promise.resolve().then((()=>{for(;i.length;)i.shift()();a=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{n.setState(n.initialState)},setOptions:e=>{const t=Hv(e,n.options);n.options=(e=>n.options.mergeOptions?n.options.mergeOptions(o,e):{...o,...e})(t)},getState:()=>n.options.state,setState:e=>{null==n.options.onStateChange||n.options.onStateChange(e)},_getRowId:(e,t,o)=>{var r;return null!=(r=null==n.options.getRowId?void 0:n.options.getRowId(e,t,o))?r:`${o?[o.id,t].join("."):t}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(e,t)=>{const o=(t?n.getCoreRowModel():n.getRowModel()).rowsById[e];if(!o)throw"production"!==process.env.NODE_ENV?new Error(`getRow expected an ID, but got ${e}`):new Error;return o},_getDefaultColumnDef:Gv((()=>[n.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...n._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),{debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns},key:"development"===process.env.NODE_ENV&&"getDefaultColumnDef"}),_getColumnDefs:()=>n.options.columns,getAllColumns:Gv((()=>[n._getColumnDefs()]),(e=>{const t=function(e,o,r){return void 0===r&&(r=0),e.map((e=>{const i=function(e,t,n,o){var r,i;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let s,u=null!=(r=null!=(i=a.id)?i:l?l.replace(".","_"):void 0)?r:"string"==typeof a.header?a.header:void 0;if(a.accessorFn?s=a.accessorFn:l&&(s=l.includes(".")?e=>{let t=e;for(const e of l.split(".")){var n;t=null==(n=t)?void 0:n[e],"production"!==process.env.NODE_ENV&&void 0===t&&console.warn(`"${e}" in deeply nested key "${l}" returned undefined.`)}return t}:e=>e[a.accessorKey]),!u)throw"production"!==process.env.NODE_ENV?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let c={id:`${String(u)}`,accessorFn:s,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:Gv((()=>[!0]),(()=>{var e;return[c,...null==(e=c.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),{key:"production"===process.env.NODE_ENV&&"column.getFlatColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:Gv((()=>[e._getOrderColumnsFn()]),(e=>{var t;return null!=(t=c.columns)&&t.length?e(c.columns.flatMap((e=>e.getLeafColumns()))):[c]}),{key:"production"===process.env.NODE_ENV&&"column.getLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};for(const t of e._features)null==t.createColumn||t.createColumn(c,e);return c}(n,e,r,o),a=e;return i.columns=a.columns?t(a.columns,i,r+1):[],i}))};return t(e)}),{key:"development"===process.env.NODE_ENV&&"getAllColumns",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllFlatColumns:Gv((()=>[n.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),{key:"development"===process.env.NODE_ENV&&"getAllFlatColumns",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),_getAllFlatColumnsById:Gv((()=>[n.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),{key:"development"===process.env.NODE_ENV&&"getAllFlatColumnsById",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllLeafColumns:Gv((()=>[n.getAllColumns(),n._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),{key:"development"===process.env.NODE_ENV&&"getAllLeafColumns",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getColumn:e=>{const t=n._getAllFlatColumnsById()[e];return"production"!==process.env.NODE_ENV&&!t&&console.error(`[Table] Column with id '${e}' does not exist.`),t}};Object.assign(n,l);for(let e=0;e<n._features.length;e++){const t=n._features[e];null==t||null==t.createTable||t.createTable(n)}return n}const Ay=(e,t,n,o,r,i,a)=>{let l={id:t,index:o,original:n,depth:r,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(l._valuesCache.hasOwnProperty(t))return l._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(l._valuesCache[t]=n.accessorFn(l.original,o),l._valuesCache[t]):void 0},getUniqueValues:t=>{if(l._uniqueValuesCache.hasOwnProperty(t))return l._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(l._uniqueValuesCache[t]=n.columnDef.getUniqueValues(l.original,o),l._uniqueValuesCache[t]):(l._uniqueValuesCache[t]=[l.getValue(t)],l._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=l.getValue(t))?n:e.options.renderFallbackValue},subRows:i??[],getLeafRows:()=>function(e,t){const n=[],o=e=>{e.forEach((e=>{n.push(e);const r=t(e);null!=r&&r.length&&o(r)}))};return o(e),n}(l.subRows,(e=>e.subRows)),getParentRow:()=>l.parentId?e.getRow(l.parentId):void 0,getParentRows:()=>{let e=[],t=l;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:Gv((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,o){const r={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(o),renderValue:()=>{var t;return null!=(t=r.getValue())?t:e.options.renderFallbackValue},getContext:Gv((()=>[e,n,t,r]),((e,t,n,o)=>({table:e,column:t,row:n,cell:o,getValue:o.getValue,renderValue:o.renderValue})),{key:"development"===process.env.NODE_ENV&&"cell.getContext",debug:()=>e.options.debugAll})};return e._features.forEach((o=>{null==o.createCell||o.createCell(r,n,t,e)}),{}),r}(e,l,t,t.id)))),{key:"development"===process.env.NODE_ENV&&"row.getAllCells",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:Gv((()=>[l.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),{key:"production"===process.env.NODE_ENV&&"row.getAllCellsByColumnId",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})};for(let t=0;t<e._features.length;t++){const n=e._features[t];null==n||null==n.createRow||n.createRow(l,e)}return l};function Ry(){return{accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Dy(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){var o;const r=[],i={},a=null!=(o=n.options.maxLeafRowFilterDepth)?o:100,l=function(e,o){void 0===o&&(o=0);const s=[];for(let c=0;c<e.length;c++){var u;let d=e[c];const f=Ay(n,d.id,d.original,d.index,d.depth,void 0,d.parentId);if(f.columnFilters=d.columnFilters,null!=(u=d.subRows)&&u.length&&o<a){if(f.subRows=l(d.subRows,o+1),d=f,t(d)&&!f.subRows.length){s.push(d),i[d.id]=d,r.push(d);continue}if(t(d)||f.subRows.length){s.push(d),i[d.id]=d,r.push(d);continue}}else d=f,t(d)&&(s.push(d),i[d.id]=d,r.push(d))}return s};return{rows:l(e),flatRows:r,rowsById:i}}(e,t,n):function(e,t,n){var o;const r=[],i={},a=null!=(o=n.options.maxLeafRowFilterDepth)?o:100,l=function(e,o){void 0===o&&(o=0);const s=[];for(let c=0;c<e.length;c++){let d=e[c];if(t(d)){var u;if(null!=(u=d.subRows)&&u.length&&o<a){const e=Ay(n,d.id,d.original,d.index,d.depth,void 0,d.parentId);e.subRows=l(d.subRows,o+1),d=e}s.push(d),r.push(d),i[d.id]=d}}return s};return{rows:l(e),flatRows:r,rowsById:i}}(e,t,n)}function Iy(e){const t=[],n=e=>{var o;t.push(e),null!=(o=e.subRows)&&o.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}
|
|
37
37
|
/**
|
|
38
38
|
* react-table
|
|
39
39
|
*
|
|
@@ -44,4 +44,4 @@ function Bv(e,t){return"function"==typeof e?e(t):e}function Hv(e,t){return n=>{t
|
|
|
44
44
|
*
|
|
45
45
|
* @license MIT
|
|
46
46
|
*/
|
|
47
|
-
function Iy(t,n){return t?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(t)?e.createElement(t,n):t:null}const Ly=e=>{var t;const{header:n,enableResizing:o,element:r}=e;let i=n.getSize();if(!o){i&&(i=`${i}px`);const e="actions"===(null==(t=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}(n.headerGroup.headers))?void 0:t.id),o=n.headerGroup.headers[n.headerGroup.headers.length-(e?2:1)];return((null==o?void 0:o.id)===n.id||!i)&&(i="100%"),{width:i||n.column.columnDef.size,maxWidth:i||n.column.columnDef.maxSize,minWidth:i||n.column.columnDef.minSize}}const a=n.column.columnDef.size,l=n.column.columnDef.minSize;return{width:a,maxWidth:n.column.columnDef.maxSize,minWidth:l}};function qy({styledTableProps:e,header:t}){const{hideHeader:n=!1,enableResizing:r=!1}=e,i=o(null);return en.jsx("th",{ref:i,colSpan:t.colSpan,className:Io("t-cell","actions"===t.column.id&&"t-cell__actions"),style:Ly({enableResizing:r,header:t,element:i.current}),children:en.jsxs("div",{className:Io("flex items-center justify-left",n?"hide-table-header":"show-table-header",t.column.getCanSort()&&"sortable-column",t.column.columnDef.className),onClick:t.column.getToggleSortingHandler(),children:[Iy(t.column.columnDef.header,t.getContext()),{asc:en.jsx(Va,{className:"sort-icon"}),desc:en.jsx(za,{className:"sort-icon"})}[t.column.getIsSorted()]??null]})},t.id)}function Fy({table:e,styledTableProps:t}){const{stickyHeader:n=!1,hideHeader:o=!1}=t;return t.loading?null:en.jsx("thead",{className:Io("table-header",o&&"hide-table-header"),style:n&&{position:"sticky",top:-.2}||{},children:e.getHeaderGroups().map((e=>en.jsx("tr",{children:e.headers.map((e=>en.jsx(qy,{styledTableProps:t,header:e},e.column.id)))},e.id)))})}const Vy=({colSpan:e})=>en.jsx(en.Fragment,{children:Array.from({length:5}).map(((t,n)=>en.jsx("tr",{children:en.jsx("td",{colSpan:e,children:en.jsx(ne,{variant:"text",width:"100%",height:50},n)})},n)))});function zy({styledTableProps:e,row:t,index:n}){const{focusable:o,loading:r,getRowClassName:i,rowHeight:a,onRowClick:l,expandArrow:s,tdClassName:u,customSubRowData:c,renderSubRows:d}=e;return en.jsxs(m,{children:[en.jsx("tr",{"data-index":n,"data-test":t.id,id:t.id,tabIndex:o?-1:void 0,className:Io("t-row",r&&"is-loading",(t.getIsExpanded()||t.getIsSelected())&&"selected",null==i?void 0:i(t)),style:{height:a?`${a}px`:"inherit"},onMouseUp:e=>{var n,o;if(e.target.classList.contains("MuiModal-backdrop")||"INPUT"===e.target.nodeName||"BUTTON"===e.target.nodeName)return;t.getCanExpand()&&!s&&t.getToggleExpandedHandler()(),null==(n=document.getElementById(t.id))||n.focus();const r="Range"===(null==(o=window.getSelection())?void 0:o.type);l&&!r&&l(e,t)},children:t.getVisibleCells().map((e=>{const n="actions"===e.column.id;return en.jsx("td",{className:Io("t-cell",u,n&&"action-cell",n&&(t.getIsExpanded()||t.getIsSelected())&&"selected",n&&(null!=i&&i(t)?null==i?void 0:i(t):"action-cell-default-background")),children:Iy(e.column.columnDef.cell,e.getContext())},e.id)}))}),t.getIsExpanded()&&en.jsx(en.Fragment,{children:c&&d&&d({rows:c.get(t.original.id.toString())??[],row:t.original})})]},t.id)}function By({styledTableProps:e,table:t}){const n=e.hideFooter?t.getCoreRowModel().rows:t.getRowModel().rows;return en.jsx(en.Fragment,{children:n.map(((t,n)=>en.jsx(zy,{styledTableProps:e,row:t,index:n},t.id)))})}const Hy=({colSpan:e,noRowsOverlay:t})=>en.jsx("tr",{className:"no-rows-overlay",children:en.jsx("td",{colSpan:e,children:t})});function Uy({table:e,styledTableProps:t}){const{columns:n,data:o,loading:r,noRowsOverlay:i}=t;return en.jsxs("tbody",{className:"tbody",children:[o.length>0&&r&&en.jsx(Fa,{className:"loading-icon",width:50,height:50}),0===o.length&&r?en.jsx(Vy,{colSpan:n.length}):o.length>0?en.jsx(By,{table:e,styledTableProps:t}):en.jsx(Hy,{colSpan:n.length,noRowsOverlay:i})]})}const Wy=e=>en.jsx(F,{...e}),Gy=()=>{const[e,t]=f(null),n=!!e,o=r((e=>{t(e.currentTarget)}),[]);return{open:n,handleClose:r((()=>{t(null)}),[]),handleOpen:o,anchorEl:e}};function $y({table:e,locale:t}){const{anchorEl:n,open:r,handleClose:i,handleOpen:a}=Gy(),l=o(null),s="no"===t,u=()=>{var e,t,n,o;null==(o=null==(n=null==(t=null==(e=null==l?void 0:l.current)?void 0:e.closest(".asma-core-ui-styled-table"))?void 0:t.querySelectorAll('[data-index="0"]'))?void 0:n[0])||o.scrollIntoView({block:"center",inline:"start"})},c=e.getPageCount(),d=e.getState().pagination.pageIndex+1,f=Array.from({length:c},((e,t)=>t+1));return c>1?en.jsxs("div",{ref:l,className:"table-pagination",children:[en.jsx(Cr,{title:s?"Nåværende side":"Current Page",children:en.jsx("div",{children:en.jsxs(jl,{variant:"outlined",dataTest:"list-pages",style:{width:"134px"},onClick:e=>{a(e)},endIcon:r?en.jsx(Ga,{height:24,width:24}):en.jsx(Wa,{height:24,width:24}),children:[s?"Side":"Page"," ",d," ",s?"av":"of"," ",c]})})}),en.jsx(Wy,{open:r,anchorEl:n,onClose:i,anchorOrigin:{vertical:-5,horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"},children:en.jsx("div",{className:"table-pagination__pages-list",children:f.map((t=>en.jsxs("div",{className:Io("table-pagination__pages-list__page",d===t&&"page-selected"),onClick:()=>{e.setPageIndex(t-1),i(),u()},children:[d===t&&en.jsx(Ka,{className:"check-icon",height:24,width:24}),en.jsxs("span",{children:[s?"Side":"Page"," ",t]})]},t)))})}),en.jsx(Cr,{title:1===d?"":s?"Forrige side":"Previous Page",children:en.jsx("div",{children:en.jsx(jl,{variant:"outlined",dataTest:"pagination-ChevronLeftIcon",startIcon:en.jsx(ca,{height:24,width:24}),onClick:()=>{e.previousPage(),u()},disabled:!e.getCanPreviousPage()})})}),en.jsx(Cr,{title:d===c?"":s?"Neste side":"Next Page",children:en.jsx("div",{children:en.jsx(jl,{variant:"outlined",dataTest:"pagination-ChevronRightIcon",startIcon:en.jsx(ua,{height:24,width:24}),onClick:()=>{e.nextPage(),u()},disabled:!e.getCanNextPage()})})})]}):null}function Ky({table:e,styledTableProps:t}){var n;return t.hideFooter?null:en.jsxs("div",{className:"table-footer",children:[null==(n=t.footer)?void 0:n.call(t,e),en.jsx($y,{table:e,locale:t.locale||"en"})]})}const Yy=t=>{const{columns:n,data:o,initialState:r,pageSize:i,enableRowSelection:a,tableInstanceRef:l,...s}=t,u=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:Py(n)}))),[r,i]=e.useState((()=>o.current.initialState));return o.current.setOptions((e=>({...e,...t,state:{...r,...t.state},onStateChange:e=>{i(e),null==t.onStateChange||t.onStateChange(e)}}))),o.current}({columns:n,data:o,initialState:{pagination:{pageIndex:0,pageSize:i||50},columnVisibility:{...null==r?void 0:r.columnVisibility,[Fv]:!1},...r},enableRowSelection:a,getCoreRowModel:e=>Wv((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,i){void 0===r&&(r=0);const a=[];for(let s=0;s<t.length;s++){const u=My(e,e._getRowId(t[s],s,i),t[s],s,r,void 0,null==i?void 0:i.id);var l;n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(l=u.originalSubRows)&&l.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return a};return n.rows=o(t),n}),{key:"development"===process.env.NODE_ENV&&"getRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getExpandedRowModel:e=>Wv((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?Dy(t):t),{key:"development"===process.env.NODE_ENV&&"getExpandedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredRowModel:e=>Wv((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,o)=>{if(!t.rows.length||(null==n||!n.length)&&!o){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const r=[],i=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const i=o.getFilterFn();i?r.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${o.id}.`)}));const a=n.map((e=>e.id)),l=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,c;o&&l&&s.length&&(a.push("__global__"),s.forEach((e=>{var t;i.push({id:e.id,filterFn:l,resolvedValue:null!=(t=null==l.resolveFilterValue?void 0:l.resolveFilterValue(o))?t:o})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},r.length)for(let e=0;e<r.length;e++){u=r[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){c=i[e];const t=c.id;if(c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return Ry(t.rows,(e=>{for(let t=0;t<a.length;t++)if(!1===e.columnFilters[a[t]])return!1;return!0}),e)}),{key:"development"===process.env.NODE_ENV&&"getFilteredRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>Wv((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],i=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),a={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(a[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const l=e=>{const t=[...e];return t.sort(((e,t)=>{for(let o=0;o<i.length;o+=1){var n;const r=i[o],l=a[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let u=0;if(l.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(u=n&&o?0:n?l.sortUndefined:-l.sortUndefined)}if(0===u&&(u=l.sortingFn(e,t,r.id)),0!==u)return s&&(u*=-1),l.invertSorting&&(u*=-1),u}return e.index-t.index})),t.forEach((e=>{var t;r.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=l(e.subRows))})),t};return{rows:l(n.rows),flatRows:r,rowsById:n.rowsById}}),{key:"development"===process.env.NODE_ENV&&"getSortedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getPaginationRowModel:e=>Wv((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:o,pageIndex:r}=t;let{rows:i,flatRows:a,rowsById:l}=n;const s=o*r,u=s+o;let c;i=i.slice(s,u),c=e.options.paginateExpandedRows?{rows:i,flatRows:a,rowsById:l}:Dy({rows:i,flatRows:a,rowsById:l}),c.flatRows=[];const d=e=>{c.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return c.rows.forEach(d),c}),{key:"development"===process.env.NODE_ENV&&"getPaginationRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getRowId:s.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString()),defaultColumn:t.enableResizing?{size:void 0}:void 0,...s});return l&&(l.current=u),{table:u}};function Zy({tableData:e,actions:t}){const{anchorEl:n,open:o,handleClose:r,handleOpen:i}=Gy(),a=t(e.row).filter((e=>!e.hide));return en.jsx("div",{className:"flex justify-center items-center w-[42px]",children:a.length?en.jsxs(en.Fragment,{children:[en.jsx(jl,{dataTest:"test",variant:"text",size:"small",onClick:e=>{e.stopPropagation(),e.preventDefault(),i(e)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:en.jsx(La,{className:"!text-delta-800",width:20,height:20})}),en.jsx(Wy,{open:o,anchorEl:n,onClose:r,onClick:r,anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"right"},children:t(e.row).filter((e=>!e.hide)).map(((t,n)=>en.jsx(Pv,{className:t.className,disabled:t.disabled,onClick:()=>{var n;null==(n=t.onClick)||n.call(t,e.row)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:t.label},n)))})]}):null})}function Xy({headerData:e}){const{anchorEl:t,open:n,handleClose:o,handleOpen:r}=Gy();return en.jsxs("div",{className:"w-full flex items-center justify-end ",children:[en.jsx("div",{className:"px-2.5 h-[30px] flex items-center justify-center cursor-pointer",onClick:r,children:en.jsx(oa,{icon:"mdi:pin",className:"text-delta-500 hover:text-delta-600 min-w-[20px] min-h-[20px]"})}),en.jsx(Wy,{anchorEl:t,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:n,onClose:o,children:e.table.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==Fv)).map((e=>e.columnDef.header?en.jsxs(Pv,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),children:[en.jsx(ju,{size:"small",dataTest:"test",disableRipple:!0,className:"p-0 pr-2",checked:e.getIsVisible()}),"string"==typeof e.columnDef.header?e.columnDef.header:e.id]},e.id):null))})]})}const Qy=e=>{const{columns:t,actions:n,customActionsNode:o,headerPin:r=!0,enableRowSelection:i,expandArrow:a}=e;!t.find((e=>"actions"===e.id))&&(n||o||r)&&t.push(function(e){const{headerPin:t,actions:n,customActionsNode:o}=e;return{id:"actions",enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?en.jsx(Xy,{headerData:e}):null,cell:e=>n||o?en.jsxs("div",{className:"flex items-center justify-end",children:[o&&en.jsx("div",{className:"mr-1",children:null==o?void 0:o(e)}),n&&en.jsx(Zy,{tableData:e,actions:n})]}):null,size:50}}({headerPin:r,actions:n,customActionsNode:o})),i&&!t.find((e=>e.id===Fv))&&t.unshift({id:Fv,minSize:40,maxSize:40,size:40,header:({table:e})=>en.jsx("div",{className:"w-[25px]",children:en.jsx(ju,{size:"small",dataTest:"cell-select-all",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()})}),cell:({cell:e})=>en.jsx("div",{className:"w-[25px]",children:en.jsx(ju,{size:"small",dataTest:"cell-select",checked:e.row.getIsSelected(),disabled:!e.row.getCanSelect(),onClick:e=>e.stopPropagation(),onChange:e.row.getToggleSelectedHandler()})})}),a&&!t.find((e=>e.id===Vv))&&t.unshift({id:Vv,minSize:50,maxSize:50,size:50,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const t=e.row.getIsExpanded();return e.row.getCanExpand()?en.jsx("span",{className:"flex h-fit w-full outline-none focus:outline-none items-center justify-center",onClick:()=>e.row.getToggleExpandedHandler()(),children:t?en.jsx(Ga,{width:24,height:24}):en.jsx(Wa,{width:24,height:24})}):null}})},Jy=e=>{const{className:t,height:n}=e;Qy(e);const{table:o}=Yy(e);return en.jsxs("div",{className:"asma-core-ui-styled-table",children:[en.jsx("div",{className:Io("table-wrapper",t),style:{height:n},children:en.jsxs("table",{className:"styled-table",children:[en.jsx(Fy,{table:o,styledTableProps:e}),en.jsx(Uy,{table:o,styledTableProps:e})]})}),en.jsx(Ky,{table:o,styledTableProps:e})]})},eb=function(e){return en.jsx("div",{className:"styled-widget-title",children:e.children})},tb=function(e){return en.jsx("h1",{"data-test":e.dataTest,className:"styled-module-title",children:e.children})},nb=()=>{const[e,t]=f(null),n=()=>{t((()=>null))};return{anchorEl:e,onClose:n,onAnchorClick:o=>{e?n():(e=>{t((()=>e.currentTarget))})(o)}}},ob=({filterIsActive:e,popoverContent:t,dataTest:n,disabled:o,size:r="large",variant:i="outlined"})=>{const{onAnchorClick:a,onClose:l,anchorEl:s}=nb();return en.jsxs(en.Fragment,{children:[en.jsxs("div",{className:"w-fit h-fit relative",children:[en.jsx(jl,{disabled:o,variant:i,startIcon:en.jsx(rl,{width:"large"===r?24:20,height:"large"===r?24:20}),onClick:a,size:r,dataTest:n,children:"Filter"}),e&&en.jsx("div",{className:Io("h-2 w-2 bg-gama-400 rounded-full absolute","large"===r?"top-2 right-2":"top-1 right-1")})]}),en.jsx(Wy,{open:!!s,anchorEl:s,onClose:l,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},className:"my-1",children:t})]})},rb=({onCloseText:e,onMinimizeText:t,onExpandText:n,showCloseIcon:o=!0,showMinimizeIcon:r=!0,showExpandIcon:i=!0,title:a,label:l,children:s,open:u,onClose:c,className:d="",primaryButtonText:p,secondaryButtonText:h,onPrimaryButtonClick:g,onSecondaryButtonClick:m,dataTest:v})=>{const[y,b]=f(!1),w=()=>{b(!y)};return u?y?en.jsx("div",{style:{zIndex:51},className:"fixed bottom-4 right-4 w-[387px] rounded-lg bg-white py-2 pl-4 pr-3 shadow-[0_4px_40px_0px_rgba(34,33,51,0.4)] transition-all duration-300",children:en.jsxs("div",{className:"flex items-center justify-between","data-test":v,children:[en.jsx("div",{className:"truncate text-lg font-semibold text-delta-800",children:a}),en.jsxs("div",{className:"flex gap-x-1",children:[en.jsx("div",{className:"flex items-center gap-x-2",children:en.jsx(jl,{dataTest:"minimize-button",variant:"text",size:"small",onClick:w,endIcon:i&&en.jsx(kl,{height:20,width:20,color:"text-gama-500"}),children:n})}),en.jsx("div",{className:"flex items-center gap-x-2",children:en.jsx(jl,{dataTest:"close-button",variant:"textGray",size:"small",onClick:c,endIcon:o&&en.jsx($a,{height:20,width:20,color:"text-delta-700"}),children:e})})]})]})}):en.jsxs("div",{className:Io("fixed bottom-4 right-4 z-[51] rounded-lg bg-white shadow-[0_4px_40px_0px_rgba(34,33,51,0.4)] transition-all duration-300",d),"data-test":v,children:[en.jsxs("div",{className:"fixed-top flex flex-col gap-y-2 p-4 border-b-[1px] border-delta-200",children:[en.jsxs("div",{className:"flex items-center justify-between",children:[l?en.jsx("div",{className:"text-sm text-delta-700",children:l}):en.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:a}),en.jsxs("div",{className:"flex gap-x-1",children:[en.jsx("div",{className:"flex items-center gap-x-2",children:en.jsx(jl,{dataTest:"minimize-button",variant:"textGray",size:"small",onClick:w,endIcon:r&&en.jsx(_l,{height:20,width:20,color:"text-delta-700"}),children:t})}),en.jsx("div",{className:"flex items-center gap-x-2",children:en.jsx(jl,{dataTest:"close-button",variant:"textGray",size:"small",onClick:c,endIcon:en.jsx($a,{height:20,width:20,color:"text-delta-700"}),children:e})})]})]}),l&&en.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:a})]}),en.jsx("div",{children:s}),en.jsxs("div",{className:"fixed-bottom flex justify-end gap-x-4 border-t-[1px] border-delta-200 p-4",children:[h&&m&&en.jsx(jl,{dataTest:"cancel-button",variant:"outlined",onClick:m,children:h}),p&&g&&en.jsx(jl,{dataTest:"save-button",onClick:g,children:p})]})]}):null};export{zv as ACTIONS_COLUMN_ID,Ba as ArchiveIcon,Ea as AssignmentIcon,Ca as AssignmentOutlineIcon,oe as Avatar,Cl as BadgeIcon,la as BellIcon,aa as BellOutlineIcon,ul as CalendarBlankOutlineIcon,_a as CalendarIcon,ka as CalendarRangeIcon,Ua as CheckBoxCheckedIcon,xa as CheckFactIcon,wa as CheckFactOutlineIcon,Ka as CheckIcon,ba as CheckOutlineIcon,da as ChevronDoubleLeftIcon,fa as ChevronDoubleRightIcon,Wa as ChevronDownIcon,ca as ChevronLeftIcon,ua as ChevronRightIcon,Ga as ChevronUpIcon,re as ClickAwayListener,$a as CloseIcon,xl as ConsentsIcon,ie as Container,ga as DashboardViewIcon,ma as DashboardViewOutlineIcon,ol as DeleteOutlineIcon,La as DotsVerticalIcon,Ha as DownloadIcon,tl as DragHorizontalIcon,za as DropDownIcon,Va as DropUpIcon,al as DvrIcon,Vv as EXPAND_COLUMN_ID,ml as EarthIcon,Ol as EditSquareIcon,el as EmptyPageIcon,ll as ErrorOutlineIcon,ae as Fade,dl as FastCheckOutlineIcon,nl as FilePdfIcon,rl as FilterIcon,Aa as FindReplaceIcon,Ra as FindReplacePeopleIcon,sa as HamburgerIcon,Xa as InboxOutboxIcon,Qa as InboxOutboxOutlineIcon,kl as KeyboardCapslockIcon,cl as LinkOutlineIcon,Oa as ListNumberedIcon,gl as ListSettingsLineIcon,pl as ListStatusIcon,Fa as LoadingIcon,il as LockIcon,Sa as MessageProcessingIcon,Na as MessageProcessingOutlineIcon,El as MessageReplyIcon,rb as MinimizableDialog,_l as MinimizeIcon,wl as OutlineCalendarMonth,le as Paper,ha as PdfIcon,yl as PencilOutlineIcon,ya as PeopleIcon,va as PeopleOutlineIcon,Ya as PermMediaIcon,Za as PermMediaOutline,Da as PersonIcon,Ia as PersonOutlineIcon,Sl as PlusIcon,se as Popper,pa as QnrIcon,sl as ReplayIcon,ja as ReportBoxIcon,Ta as ReportBoxOutlineIcon,Ph as RichInput,Fv as SELECT_COLUMN_ID,qa as SearchIcon,Pa as SettingsIcon,vl as SettingsMenuHorizontalIcon,Ma as SettingsOutlineIcon,ue as Skeleton,ku as SnackbarProvider,ce as Stack,Iv as StyledAccordion,qv as StyledAccordionDetails,Lv as StyledAccordionSummary,Rl as StyledAlert,Dl as StyledAlertTitle,tn as StyledBadge,jl as StyledButton,ju as StyledCheckbox,nn as StyledChip,av as StyledDatePicker,Tl as StyledDialog,Pl as StyledDialogActions,Ml as StyledDialogContent,Al as StyledDialogTitle,jv as StyledDrawer,ob as StyledFilterMenu,Xm as StyledFormControl,Ev as StyledFormControlLabel,Nv as StyledFormGroup,Cv as StyledFormHelperText,Ov as StyledFormLabel,Tu as StyledInputField,Sv as StyledInputLabel,Fh as StyledLabel,Av as StyledLink,Tv as StyledMenu,Pv as StyledMenuItem,Mv as StyledMenuList,tb as StyledModuleTitle,Wy as StyledPopover,Lh as StyledRadio,qh as StyledRadioGroup,Mh as StyledSelect,Rh as StyledSelectAutocomplete,Ah as StyledSelectItem,Dh as StyledSlider,Eu as StyledSnackbar,Ih as StyledSwitch,Rv as StyledTab,Jy as StyledTable,Dv as StyledTabs,Mu as StyledTextarea,kv as StyledTimePicker,Cr as StyledTooltip,Nl as StyledTypography,eb as StyledWidgetTitle,hl as TextBoxCheckOutlineIcon,Ja as TopicIcon,fl as UnknownDocumentOutlineRoundedIcon,bl as WarningAmberOutlineIcon,lu as closeSnackbar,Ay as createColumnHelper,au as enqueueSnackbar,Nu as message,ge as omit,Cu as processAlertSnackBar,Ou as processInfoSnackbar,Wt as setMidnightTime,Gt as setZeroTime,wu as useSnackbar};
|
|
47
|
+
function Ly(t,n){return t?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(t)?e.createElement(t,n):t:null}const qy=e=>{var t;const{header:n,enableResizing:o,element:r}=e;let i=n.getSize();if(!o){i&&(i=`${i}px`);const e="actions"===(null==(t=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}(n.headerGroup.headers))?void 0:t.id),o=n.headerGroup.headers[n.headerGroup.headers.length-(e?2:1)];return((null==o?void 0:o.id)===n.id||!i)&&(i="100%"),{width:i||n.column.columnDef.size,maxWidth:i||n.column.columnDef.maxSize,minWidth:i||n.column.columnDef.minSize}}const a=n.column.columnDef.size,l=n.column.columnDef.minSize;return{width:a,maxWidth:n.column.columnDef.maxSize,minWidth:l}};function Fy({styledTableProps:e,header:t}){const{hideHeader:n=!1,enableResizing:r=!1}=e,i=o(null);return en.jsx("th",{ref:i,colSpan:t.colSpan,className:Io("t-cell","actions"===t.column.id&&"t-cell__actions"),style:qy({enableResizing:r,header:t,element:i.current}),children:en.jsxs("div",{className:Io("flex items-center justify-left",n?"hide-table-header":"show-table-header",t.column.getCanSort()&&"sortable-column",t.column.columnDef.className),onClick:t.column.getToggleSortingHandler(),children:[Ly(t.column.columnDef.header,t.getContext()),{asc:en.jsx(Va,{className:"sort-icon"}),desc:en.jsx(za,{className:"sort-icon"})}[t.column.getIsSorted()]??null]})},t.id)}function Vy({table:e,styledTableProps:t}){const{stickyHeader:n=!1,hideHeader:o=!1}=t;return t.loading?null:en.jsx("thead",{className:Io("table-header",o&&"hide-table-header"),style:n&&{position:"sticky",top:-.2}||{},children:e.getHeaderGroups().map((e=>en.jsx("tr",{children:e.headers.map((e=>en.jsx(Fy,{styledTableProps:t,header:e},e.column.id)))},e.id)))})}const zy=({colSpan:e})=>en.jsx(en.Fragment,{children:Array.from({length:5}).map(((t,n)=>en.jsx("tr",{children:en.jsx("td",{colSpan:e,children:en.jsx(ne,{variant:"text",width:"100%",height:50},n)})},n)))});function By({styledTableProps:e,row:t,index:n}){const{focusable:o,loading:r,getRowClassName:i,rowHeight:a,onRowClick:l,expandArrow:s,tdClassName:u,customSubRowData:c,renderSubRows:d}=e;return en.jsxs(m,{children:[en.jsx("tr",{"data-index":n,"data-test":t.id,id:t.id,tabIndex:o?-1:void 0,className:Io("t-row",r&&"is-loading",(t.getIsExpanded()||t.getIsSelected())&&"selected",null==i?void 0:i(t)),style:{height:a?`${a}px`:"inherit"},onMouseUp:e=>{var n,o;if(e.target.classList.contains("MuiModal-backdrop")||"INPUT"===e.target.nodeName||"BUTTON"===e.target.nodeName)return;t.getCanExpand()&&!s&&t.getToggleExpandedHandler()(),null==(n=document.getElementById(t.id))||n.focus();const r="Range"===(null==(o=nv.getSelection())?void 0:o.type);l&&!r&&l(e,t)},children:t.getVisibleCells().map((e=>{const n="actions"===e.column.id;return en.jsx("td",{className:Io("t-cell",u,n&&"action-cell",n&&(t.getIsExpanded()||t.getIsSelected())&&"selected",n&&(null!=i&&i(t)?null==i?void 0:i(t):"action-cell-default-background")),children:Ly(e.column.columnDef.cell,e.getContext())},e.id)}))}),t.getIsExpanded()&&en.jsx(en.Fragment,{children:c&&d&&d({rows:c.get(t.original.id.toString())??[],row:t.original})})]},t.id)}function Hy({styledTableProps:e,table:t}){const n=e.hideFooter?t.getCoreRowModel().rows:t.getRowModel().rows;return en.jsx(en.Fragment,{children:n.map(((t,n)=>en.jsx(By,{styledTableProps:e,row:t,index:n},t.id)))})}const Uy=({colSpan:e,noRowsOverlay:t})=>en.jsx("tr",{className:"no-rows-overlay",children:en.jsx("td",{colSpan:e,children:t})});function Wy({table:e,styledTableProps:t}){const{columns:n,data:o,loading:r,noRowsOverlay:i}=t;return en.jsxs("tbody",{className:"tbody",children:[o.length>0&&r&&en.jsx(Fa,{className:"loading-icon",width:50,height:50}),0===o.length&&r?en.jsx(zy,{colSpan:n.length}):o.length>0?en.jsx(Hy,{table:e,styledTableProps:t}):en.jsx(Uy,{colSpan:n.length,noRowsOverlay:i})]})}const Gy=e=>en.jsx(F,{...e}),$y=()=>{const[e,t]=f(null),n=!!e,o=r((e=>{t(e.currentTarget)}),[]);return{open:n,handleClose:r((()=>{t(null)}),[]),handleOpen:o,anchorEl:e}};function Ky({table:e,locale:t}){const{anchorEl:n,open:r,handleClose:i,handleOpen:a}=$y(),l=o(null),s="no"===t,u=()=>{var e,t,n,o;null==(o=null==(n=null==(t=null==(e=null==l?void 0:l.current)?void 0:e.closest(".asma-core-ui-styled-table"))?void 0:t.querySelectorAll('[data-index="0"]'))?void 0:n[0])||o.scrollIntoView({block:"center",inline:"start"})},c=e.getPageCount(),d=e.getState().pagination.pageIndex+1,f=Array.from({length:c},((e,t)=>t+1));return c>1?en.jsxs("div",{ref:l,className:"table-pagination",children:[en.jsx(Cr,{title:s?"Nåværende side":"Current Page",children:en.jsx("div",{children:en.jsxs(jl,{variant:"outlined",dataTest:"list-pages",style:{width:"134px"},onClick:e=>{a(e)},endIcon:r?en.jsx(Ga,{height:24,width:24}):en.jsx(Wa,{height:24,width:24}),children:[s?"Side":"Page"," ",d," ",s?"av":"of"," ",c]})})}),en.jsx(Gy,{open:r,anchorEl:n,onClose:i,anchorOrigin:{vertical:-5,horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"},children:en.jsx("div",{className:"table-pagination__pages-list",children:f.map((t=>en.jsxs("div",{className:Io("table-pagination__pages-list__page",d===t&&"page-selected"),onClick:()=>{e.setPageIndex(t-1),i(),u()},children:[d===t&&en.jsx(Ka,{className:"check-icon",height:24,width:24}),en.jsxs("span",{children:[s?"Side":"Page"," ",t]})]},t)))})}),en.jsx(Cr,{title:1===d?"":s?"Forrige side":"Previous Page",children:en.jsx("div",{children:en.jsx(jl,{variant:"outlined",dataTest:"pagination-ChevronLeftIcon",startIcon:en.jsx(ca,{height:24,width:24}),onClick:()=>{e.previousPage(),u()},disabled:!e.getCanPreviousPage()})})}),en.jsx(Cr,{title:d===c?"":s?"Neste side":"Next Page",children:en.jsx("div",{children:en.jsx(jl,{variant:"outlined",dataTest:"pagination-ChevronRightIcon",startIcon:en.jsx(ua,{height:24,width:24}),onClick:()=>{e.nextPage(),u()},disabled:!e.getCanNextPage()})})})]}):null}function Yy({table:e,styledTableProps:t}){var n;return t.hideFooter?null:en.jsxs("div",{className:"table-footer",children:[null==(n=t.footer)?void 0:n.call(t,e),en.jsx(Ky,{table:e,locale:t.locale||"en"})]})}const Zy=t=>{const{columns:n,data:o,initialState:r,pageSize:i,enableRowSelection:a,tableInstanceRef:l,...s}=t,u=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:My(n)}))),[r,i]=e.useState((()=>o.current.initialState));return o.current.setOptions((e=>({...e,...t,state:{...r,...t.state},onStateChange:e=>{i(e),null==t.onStateChange||t.onStateChange(e)}}))),o.current}({columns:n,data:o,initialState:{pagination:{pageIndex:0,pageSize:i||50},columnVisibility:{...null==r?void 0:r.columnVisibility,[Vv]:!1},...r},enableRowSelection:a,getCoreRowModel:e=>Gv((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,i){void 0===r&&(r=0);const a=[];for(let s=0;s<t.length;s++){const u=Ay(e,e._getRowId(t[s],s,i),t[s],s,r,void 0,null==i?void 0:i.id);var l;n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(l=u.originalSubRows)&&l.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return a};return n.rows=o(t),n}),{key:"development"===process.env.NODE_ENV&&"getRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getExpandedRowModel:e=>Gv((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?Iy(t):t),{key:"development"===process.env.NODE_ENV&&"getExpandedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredRowModel:e=>Gv((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,o)=>{if(!t.rows.length||(null==n||!n.length)&&!o){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const r=[],i=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const i=o.getFilterFn();i?r.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${o.id}.`)}));const a=n.map((e=>e.id)),l=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,c;o&&l&&s.length&&(a.push("__global__"),s.forEach((e=>{var t;i.push({id:e.id,filterFn:l,resolvedValue:null!=(t=null==l.resolveFilterValue?void 0:l.resolveFilterValue(o))?t:o})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},r.length)for(let e=0;e<r.length;e++){u=r[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){c=i[e];const t=c.id;if(c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return Dy(t.rows,(e=>{for(let t=0;t<a.length;t++)if(!1===e.columnFilters[a[t]])return!1;return!0}),e)}),{key:"development"===process.env.NODE_ENV&&"getFilteredRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>Gv((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],i=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),a={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(a[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const l=e=>{const t=[...e];return t.sort(((e,t)=>{for(let o=0;o<i.length;o+=1){var n;const r=i[o],l=a[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let u=0;if(l.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(u=n&&o?0:n?l.sortUndefined:-l.sortUndefined)}if(0===u&&(u=l.sortingFn(e,t,r.id)),0!==u)return s&&(u*=-1),l.invertSorting&&(u*=-1),u}return e.index-t.index})),t.forEach((e=>{var t;r.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=l(e.subRows))})),t};return{rows:l(n.rows),flatRows:r,rowsById:n.rowsById}}),{key:"development"===process.env.NODE_ENV&&"getSortedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getPaginationRowModel:e=>Gv((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:o,pageIndex:r}=t;let{rows:i,flatRows:a,rowsById:l}=n;const s=o*r,u=s+o;let c;i=i.slice(s,u),c=e.options.paginateExpandedRows?{rows:i,flatRows:a,rowsById:l}:Iy({rows:i,flatRows:a,rowsById:l}),c.flatRows=[];const d=e=>{c.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return c.rows.forEach(d),c}),{key:"development"===process.env.NODE_ENV&&"getPaginationRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getRowId:s.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString()),defaultColumn:t.enableResizing?{size:void 0}:void 0,...s});return l&&(l.current=u),{table:u}};function Xy({tableData:e,actions:t}){const{anchorEl:n,open:o,handleClose:r,handleOpen:i}=$y(),a=t(e.row).filter((e=>!e.hide));return en.jsx("div",{className:"flex justify-center items-center w-[42px]",children:a.length?en.jsxs(en.Fragment,{children:[en.jsx(jl,{dataTest:"test",variant:"text",size:"small",onClick:e=>{e.stopPropagation(),e.preventDefault(),i(e)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:en.jsx(La,{className:"!text-delta-800",width:20,height:20})}),en.jsx(Gy,{open:o,anchorEl:n,onClose:r,onClick:r,anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"right"},children:t(e.row).filter((e=>!e.hide)).map(((t,n)=>en.jsx(Mv,{className:t.className,disabled:t.disabled,onClick:()=>{var n;null==(n=t.onClick)||n.call(t,e.row)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:t.label},n)))})]}):null})}function Qy({headerData:e}){const{anchorEl:t,open:n,handleClose:o,handleOpen:r}=$y();return en.jsxs("div",{className:"w-full flex items-center justify-end ",children:[en.jsx("div",{className:"px-2.5 h-[30px] flex items-center justify-center cursor-pointer",onClick:r,children:en.jsx(oa,{icon:"mdi:pin",className:"text-delta-500 hover:text-delta-600 min-w-[20px] min-h-[20px]"})}),en.jsx(Gy,{anchorEl:t,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:n,onClose:o,children:e.table.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==Vv)).map((e=>e.columnDef.header?en.jsxs(Mv,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),children:[en.jsx(ju,{size:"small",dataTest:"test",disableRipple:!0,className:"p-0 pr-2",checked:e.getIsVisible()}),"string"==typeof e.columnDef.header?e.columnDef.header:e.id]},e.id):null))})]})}const Jy=e=>{const{columns:t,actions:n,customActionsNode:o,headerPin:r=!0,enableRowSelection:i,expandArrow:a}=e;!t.find((e=>"actions"===e.id))&&(n||o||r)&&t.push(function(e){const{headerPin:t,actions:n,customActionsNode:o}=e;return{id:"actions",enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?en.jsx(Qy,{headerData:e}):null,cell:e=>n||o?en.jsxs("div",{className:"flex items-center justify-end",children:[o&&en.jsx("div",{className:"mr-1",children:null==o?void 0:o(e)}),n&&en.jsx(Xy,{tableData:e,actions:n})]}):null,size:50}}({headerPin:r,actions:n,customActionsNode:o})),i&&!t.find((e=>e.id===Vv))&&t.unshift({id:Vv,minSize:40,maxSize:40,size:40,header:({table:e})=>en.jsx("div",{className:"w-[25px]",children:en.jsx(ju,{size:"small",dataTest:"cell-select-all",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()})}),cell:({cell:e})=>en.jsx("div",{className:"w-[25px]",children:en.jsx(ju,{size:"small",dataTest:"cell-select",checked:e.row.getIsSelected(),disabled:!e.row.getCanSelect(),onClick:e=>e.stopPropagation(),onChange:e.row.getToggleSelectedHandler()})})}),a&&!t.find((e=>e.id===zv))&&t.unshift({id:zv,minSize:50,maxSize:50,size:50,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const t=e.row.getIsExpanded();return e.row.getCanExpand()?en.jsx("span",{className:"flex h-fit w-full outline-none focus:outline-none items-center justify-center",onClick:()=>e.row.getToggleExpandedHandler()(),children:t?en.jsx(Ga,{width:24,height:24}):en.jsx(Wa,{width:24,height:24})}):null}})},eb=e=>{const{className:t,height:n}=e;Jy(e);const{table:o}=Zy(e);return en.jsxs("div",{className:"asma-core-ui-styled-table",children:[en.jsx("div",{className:Io("table-wrapper",t),style:{height:n},children:en.jsxs("table",{className:"styled-table",children:[en.jsx(Vy,{table:o,styledTableProps:e}),en.jsx(Wy,{table:o,styledTableProps:e})]})}),en.jsx(Yy,{table:o,styledTableProps:e})]})},tb=function(e){return en.jsx("div",{className:"styled-widget-title",children:e.children})},nb=function(e){return en.jsx("h1",{"data-test":e.dataTest,className:"styled-module-title",children:e.children})},ob=()=>{const[e,t]=f(null),n=()=>{t((()=>null))};return{anchorEl:e,onClose:n,onAnchorClick:o=>{e?n():(e=>{t((()=>e.currentTarget))})(o)}}},rb=({filterIsActive:e,popoverContent:t,dataTest:n,disabled:o,size:r="large",variant:i="outlined"})=>{const{onAnchorClick:a,onClose:l,anchorEl:s}=ob();return en.jsxs(en.Fragment,{children:[en.jsxs("div",{className:"w-fit h-fit relative",children:[en.jsx(jl,{disabled:o,variant:i,startIcon:en.jsx(rl,{width:"large"===r?24:20,height:"large"===r?24:20}),onClick:a,size:r,dataTest:n,children:"Filter"}),e&&en.jsx("div",{className:Io("h-2 w-2 bg-gama-400 rounded-full absolute","large"===r?"top-2 right-2":"top-1 right-1")})]}),en.jsx(Gy,{open:!!s,anchorEl:s,onClose:l,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},className:"my-1",children:t})]})},ib=({onCloseText:e,onMinimizeText:t,onExpandText:n,showCloseIcon:o=!0,showMinimizeIcon:r=!0,showExpandIcon:i=!0,title:a,label:l,children:s,open:u,onClose:c,className:d="",primaryButtonText:p,secondaryButtonText:h,onPrimaryButtonClick:g,onSecondaryButtonClick:m,dataTest:v})=>{const[y,b]=f(!1),w=()=>{b(!y)};return u?y?en.jsx("div",{style:{zIndex:51},className:"fixed bottom-4 right-4 w-[387px] rounded-lg bg-white py-2 pl-4 pr-3 shadow-[0_4px_40px_0px_rgba(34,33,51,0.4)] transition-all duration-300",children:en.jsxs("div",{className:"flex items-center justify-between","data-test":v,children:[en.jsx("div",{className:"truncate text-lg font-semibold text-delta-800",children:a}),en.jsxs("div",{className:"flex gap-x-1",children:[en.jsx("div",{className:"flex items-center gap-x-2",children:en.jsx(jl,{dataTest:"minimize-button",variant:"text",size:"small",onClick:w,endIcon:i&&en.jsx(kl,{height:20,width:20,color:"text-gama-500"}),children:n})}),en.jsx("div",{className:"flex items-center gap-x-2",children:en.jsx(jl,{dataTest:"close-button",variant:"textGray",size:"small",onClick:c,endIcon:o&&en.jsx($a,{height:20,width:20,color:"text-delta-700"}),children:e})})]})]})}):en.jsxs("div",{className:Io("fixed bottom-4 right-4 z-[51] rounded-lg bg-white shadow-[0_4px_40px_0px_rgba(34,33,51,0.4)] transition-all duration-300",d),"data-test":v,children:[en.jsxs("div",{className:"fixed-top flex flex-col gap-y-2 p-4 border-b-[1px] border-delta-200",children:[en.jsxs("div",{className:"flex items-center justify-between",children:[l?en.jsx("div",{className:"text-sm text-delta-700",children:l}):en.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:a}),en.jsxs("div",{className:"flex gap-x-1",children:[en.jsx("div",{className:"flex items-center gap-x-2",children:en.jsx(jl,{dataTest:"minimize-button",variant:"textGray",size:"small",onClick:w,endIcon:r&&en.jsx(_l,{height:20,width:20,color:"text-delta-700"}),children:t})}),en.jsx("div",{className:"flex items-center gap-x-2",children:en.jsx(jl,{dataTest:"close-button",variant:"textGray",size:"small",onClick:c,endIcon:en.jsx($a,{height:20,width:20,color:"text-delta-700"}),children:e})})]})]}),l&&en.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:a})]}),en.jsx("div",{children:s}),en.jsxs("div",{className:"fixed-bottom flex justify-end gap-x-4 border-t-[1px] border-delta-200 p-4",children:[h&&m&&en.jsx(jl,{dataTest:"cancel-button",variant:"outlined",onClick:m,children:h}),p&&g&&en.jsx(jl,{dataTest:"save-button",onClick:g,children:p})]})]}):null};export{Bv as ACTIONS_COLUMN_ID,Ba as ArchiveIcon,Ea as AssignmentIcon,Ca as AssignmentOutlineIcon,oe as Avatar,Cl as BadgeIcon,la as BellIcon,aa as BellOutlineIcon,ul as CalendarBlankOutlineIcon,_a as CalendarIcon,ka as CalendarRangeIcon,Ua as CheckBoxCheckedIcon,xa as CheckFactIcon,wa as CheckFactOutlineIcon,Ka as CheckIcon,ba as CheckOutlineIcon,da as ChevronDoubleLeftIcon,fa as ChevronDoubleRightIcon,Wa as ChevronDownIcon,ca as ChevronLeftIcon,ua as ChevronRightIcon,Ga as ChevronUpIcon,re as ClickAwayListener,$a as CloseIcon,xl as ConsentsIcon,ie as Container,ga as DashboardViewIcon,ma as DashboardViewOutlineIcon,ol as DeleteOutlineIcon,La as DotsVerticalIcon,Ha as DownloadIcon,tl as DragHorizontalIcon,za as DropDownIcon,Va as DropUpIcon,al as DvrIcon,zv as EXPAND_COLUMN_ID,ml as EarthIcon,Ol as EditSquareIcon,el as EmptyPageIcon,ll as ErrorOutlineIcon,ae as Fade,dl as FastCheckOutlineIcon,nl as FilePdfIcon,rl as FilterIcon,Aa as FindReplaceIcon,Ra as FindReplacePeopleIcon,sa as HamburgerIcon,Xa as InboxOutboxIcon,Qa as InboxOutboxOutlineIcon,kl as KeyboardCapslockIcon,cl as LinkOutlineIcon,Oa as ListNumberedIcon,gl as ListSettingsLineIcon,pl as ListStatusIcon,Fa as LoadingIcon,il as LockIcon,Sa as MessageProcessingIcon,Na as MessageProcessingOutlineIcon,El as MessageReplyIcon,ib as MinimizableDialog,_l as MinimizeIcon,wl as OutlineCalendarMonth,le as Paper,ha as PdfIcon,yl as PencilOutlineIcon,ya as PeopleIcon,va as PeopleOutlineIcon,Ya as PermMediaIcon,Za as PermMediaOutline,Da as PersonIcon,Ia as PersonOutlineIcon,Sl as PlusIcon,se as Popper,pa as QnrIcon,sl as ReplayIcon,ja as ReportBoxIcon,Ta as ReportBoxOutlineIcon,Ph as RichInput,Vv as SELECT_COLUMN_ID,qa as SearchIcon,Pa as SettingsIcon,vl as SettingsMenuHorizontalIcon,Ma as SettingsOutlineIcon,ue as Skeleton,ku as SnackbarProvider,ce as Stack,Lv as StyledAccordion,Fv as StyledAccordionDetails,qv as StyledAccordionSummary,Rl as StyledAlert,Dl as StyledAlertTitle,tn as StyledBadge,jl as StyledButton,ju as StyledCheckbox,nn as StyledChip,lv as StyledDatePicker,Tl as StyledDialog,Pl as StyledDialogActions,Ml as StyledDialogContent,Al as StyledDialogTitle,Tv as StyledDrawer,rb as StyledFilterMenu,Xm as StyledFormControl,Cv as StyledFormControlLabel,jv as StyledFormGroup,Ov as StyledFormHelperText,Sv as StyledFormLabel,Tu as StyledInputField,Nv as StyledInputLabel,Fh as StyledLabel,Rv as StyledLink,Pv as StyledMenu,Mv as StyledMenuItem,Av as StyledMenuList,nb as StyledModuleTitle,Gy as StyledPopover,Lh as StyledRadio,qh as StyledRadioGroup,Mh as StyledSelect,Rh as StyledSelectAutocomplete,Ah as StyledSelectItem,Dh as StyledSlider,Eu as StyledSnackbar,Ih as StyledSwitch,Dv as StyledTab,eb as StyledTable,Iv as StyledTabs,Mu as StyledTextarea,Ev as StyledTimePicker,Cr as StyledTooltip,Nl as StyledTypography,tb as StyledWidgetTitle,hl as TextBoxCheckOutlineIcon,Ja as TopicIcon,fl as UnknownDocumentOutlineRoundedIcon,bl as WarningAmberOutlineIcon,lu as closeSnackbar,Ry as createColumnHelper,au as enqueueSnackbar,Nu as message,ge as omit,Cu as processAlertSnackBar,Ou as processInfoSnackbar,Wt as setMidnightTime,Gt as setZeroTime,wu as useSnackbar};
|