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,r=this;if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){var i=this.getEditorContents(),o=null!=(n=e.value)?n:"";this.isEqualValue(o,i)||this.setEditorContents(this.editor,o)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),s(this.cleanProps,this.dirtyProps).some((function(t){return!d.default(e[t],r.props[t])}))},t.prototype.shouldComponentRegenerate=function(e){var t=this;return this.dirtyProps.some((function(n){return!d.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 r=this.editor.getContents(),i=this.editor.getSelection();this.regenerationSnapshot={delta:r,selection:i},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==t.generation){var o=this.regenerationSnapshot,s=(r=o.delta,o.selection);delete this.regenerationSnapshot,this.instantiateEditor();var a=this.editor;a.setContents(r),f((function(){return n.setEditorSelection(a,s)}))}},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 c.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)?d.default(e.ops,t.ops):d.default(e,t)},t.prototype.setEditorContents=function(e,t){var n=this;this.value=t;var r=this.getEditorSelection();"string"==typeof t?e.setContents(e.clipboard.convert(t)):e.setContents(t),f((function(){return n.setEditorSelection(e,r)}))},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,r;(null===(r=null===(n=e)||void 0===n?void 0:n.scroll)||void 0===r?void 0:r.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=u.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,r=t.preserveWhitespace,i={key:this.state.generation,ref:function(t){e.editingArea=t}};return l.default.Children.count(n)?l.default.cloneElement(l.default.Children.only(n),i):r?l.default.createElement("pre",o({},i)):l.default.createElement("div",o({},i))},t.prototype.render=function(){var e;return l.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(e=this.props.className,null!=e?e:""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},t.prototype.onEditorChangeText=function(e,t,n,r){var i,o;if(this.editor){var s=this.isDelta(this.value)?r.getContents():r.getHTML();s!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=s,null===(o=(i=this.props).onChange)||void 0===o||o.call(i,e,t,n,r))}},t.prototype.onEditorChangeSelection=function(e,t,n){var r,i,o,s,a,l;if(this.editor){var u=this.getEditorSelection(),c=!u&&e,h=u&&!e;d.default(e,u)||(this.selection=e,null===(i=(r=this.props).onChangeSelection)||void 0===i||i.call(r,e,t,n),c?null===(s=(o=this.props).onFocus)||void 0===s||s.call(o,e,t,n):h&&(null===(l=(a=this.props).onBlur)||void 0===l||l.call(a,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=c.default,t.defaultProps={theme:"snow",modules:{},readOnly:!1},t}(l.default.Component);function f(e){Promise.resolve().then(e)}e.exports=h},4059:function(e){var t;"undefined"!=typeof self&&self,t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},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){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=n(18),o=n(19),s=n(45),a=n(46),l=n(47),u=n(48),d=n(49),c=n(12),h=n(32),f=n(33),p=n(31),m=n(1),O={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:r.default,Format:i.default,Leaf:o.default,Embed:u.default,Scroll:s.default,Block:l.default,Inline:a.default,Text:d.default,Attributor:{Attribute:c.default,Class:h.default,Style:f.default,Store:p.default}};t.default=O},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=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 i(t,e),t}(Error);t.ParchmentError=o;var s,a={},l={},u={},d={};function c(e,t){var n;if(void 0===t&&(t=s.ANY),"string"==typeof e)n=d[e]||a[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=d.text;else if("number"==typeof e)e&s.LEVEL&s.BLOCK?n=d.block:e&s.LEVEL&s.INLINE&&(n=d.inline);else if(e instanceof HTMLElement){var r=(e.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=l[r[i]])break;n=n||u[e.tagName]}return null==n?null:t&s.LEVEL&n.scope&&t&s.TYPE&n.scope?n:null}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"}(s=t.Scope||(t.Scope={})),t.create=function(e,t){var n=c(e);if(null==n)throw new o("Unable to create "+e+" blot");var r=n,i=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:r.create(t);return new r(i,t)},t.find=function e(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[t.DATA_KEY]?n[t.DATA_KEY].blot:r?e(n.parentNode,r):null},t.query=c,t.register=function e(){for(var t=[],n=0;n
1)return t.map((function(t){return e(t)}));var r=t[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new o("Invalid definition");if("abstract"===r.blotName)throw new o("Cannot register abstract class");return d[r.blotName||r.attrName]=r,"string"==typeof r.keyName?a[r.keyName]=r:(null!=r.className&&(l[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map((function(e){return e.toUpperCase()})):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach((function(e){null!=u[e]&&null!=r.className||(u[e]=r)})))),r}},function(e,t,n){var r=n(51),i=n(11),o=n(3),s=n(20),a=String.fromCharCode(0),l=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};l.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))},l.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},l.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)},l.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=o(!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(i(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},l.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},l.prototype.filter=function(e){return this.ops.filter(e)},l.prototype.forEach=function(e){this.ops.forEach(e)},l.prototype.map=function(e){return this.ops.map(e)},l.prototype.partition=function(e){var t=[],n=[];return this.forEach((function(r){(e(r)?t:n).push(r)})),[t,n]},l.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},l.prototype.changeLength=function(){return this.reduce((function(e,t){return t.insert?e+s.length(t):t.delete?e-t.delete:e}),0)},l.prototype.length=function(){return this.reduce((function(e,t){return e+s.length(t)}),0)},l.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var n=[],r=s.iterator(this.ops),i=0;i0&&n.next(o.retain-a)}for(var u=new l(r);t.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===t.peekType())u.push(t.next());else{var d=Math.min(t.peekLength(),n.peekLength()),c=t.next(d),h=n.next(d);if("number"==typeof h.retain){var f={};"number"==typeof c.retain?f.retain=d:f.insert=c.insert;var p=s.attributes.compose(c.attributes,h.attributes,"number"==typeof c.retain);if(p&&(f.attributes=p),u.push(f),!n.hasNext()&&i(u.ops[u.ops.length-1],f)){var m=new l(t.rest());return u.concat(m).chop()}}else"number"==typeof h.delete&&"number"==typeof c.retain&&u.push(h)}return u.chop()},l.prototype.concat=function(e){var t=new l(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},l.prototype.diff=function(e,t){if(this.ops===e.ops)return new l;var n=[this,e].map((function(t){return t.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:a;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join("")})),o=new l,u=r(n[0],n[1],t),d=s.iterator(this.ops),c=s.iterator(e.ops);return u.forEach((function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(c.peekLength(),t),o.push(c.next(n));break;case r.DELETE:n=Math.min(t,d.peekLength()),d.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(d.peekLength(),c.peekLength(),t);var a=d.next(n),l=c.next(n);i(a.insert,l.insert)?o.retain(n,s.attributes.diff(a.attributes,l.attributes)):o.push(l).delete(n)}t-=n}})),o.chop()},l.prototype.eachLine=function(e,t){t=t||"\n";for(var n=s.iterator(this.ops),r=new l,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),a=s.length(o)-n.peekLength(),u="string"==typeof o.insert?o.insert.indexOf(t,a)-a:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===e(r,n.next(1).attributes||{},i))return;i+=1,r=new l}}r.length()>0&&e(r,{},i)},l.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var n=s.iterator(this.ops),r=s.iterator(e.ops),i=new l;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),a=n.next(o),u=r.next(o);if(a.delete)continue;u.delete?i.push(u):i.retain(o,s.attributes.transform(a.attributes,u.attributes,t))}else i.retain(s.length(n.next()));return i.chop()},l.prototype.transformPosition=function(e,t){t=!!t;for(var n=s.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r0&&(e1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-1)){var r=this.clone();return 0===e?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},o}}]),t}(a.default.Block);function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"==typeof e.formats&&(t=(0,o.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?t:_(e.parent,t))}O.blotName="block",O.tagName="P",O.defaultChild="break",O.allowedChildren=[u.default,a.default.Embed,d.default],t.bubbleFormats=_,t.BlockEmbed=m,t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var r="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},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=b(t,r),this.container=this.options.container,null==this.container)return g.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=d.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new a.default(this.scroll),this.selection=new h.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(e){e===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(l.default.events.SCROLL_UPDATE,(function(e,t){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;v.call(n,(function(){return n.editor.update(null,t,i)}),e)}));var o=this.clipboard.convert("");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),p.default.level(e)}},{key:"find",value:function(e){return e.__quill||d.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&g.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var i=e.attrName||e.blotName;"string"==typeof i?this.register("formats/"+i,e,t):Object.keys(e).forEach((function(r){n.register(r,e[r],t)}))}else null==this.imports[e]||r||g.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?d.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),o(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 r=this,o=w(e,t,n),s=i(o,4);return e=s[0],t=s[1],n=s[3],v.call(this,(function(){return r.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,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return v.call(this,(function(){var r=n.getSelection(!0),i=new s.default;if(null==r)return i;if(d.default.query(e,d.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,_({},e,t));else{if(0===r.length)return n.selection.format(e,t),i;i=n.editor.formatText(r.index,r.length,_({},e,t))}return n.setSelection(r,l.default.sources.SILENT),i}),r)}},{key:"formatLine",value:function(e,t,n,r,o){var s,a=this,l=w(e,t,n,r,o),u=i(l,4);return e=u[0],t=u[1],s=u[2],o=u[3],v.call(this,(function(){return a.editor.formatLine(e,t,s)}),o,e,0)}},{key:"formatText",value:function(e,t,n,r,o){var s,a=this,l=w(e,t,n,r,o),u=i(l,4);return e=u[0],t=u[1],s=u[2],o=u[3],v.call(this,(function(){return a.editor.formatText(e,t,s)}),o,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 r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.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=w(e,t),r=i(n,2);return e=r[0],t=r[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=w(e,t),r=i(n,2);return e=r[0],t=r[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return v.call(this,(function(){return i.editor.insertEmbed(t,n,r)}),o,t)}},{key:"insertText",value:function(e,t,n,r,o){var s,a=this,l=w(e,0,n,r,o),u=i(l,4);return e=u[0],s=u[2],o=u[3],v.call(this,(function(){return a.editor.insertText(e,t,s)}),o,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 r=this,o=w(e,t,n),s=i(o,4);return e=s[0],t=s[1],n=s[3],v.call(this,(function(){return r.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]:l.default.sources.API;return v.call(this,(function(){e=new s.default(e);var n=t.getLength(),r=t.editor.deleteText(0,n),i=t.editor.applyDelta(e),o=i.ops[i.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),i.delete(1)),r.compose(i)}),n)}},{key:"setSelection",value:function(t,n,r){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var o=w(t,n,r),s=i(o,4);t=s[0],n=s[1],r=s[3],this.selection.setRange(new c.Range(t,n),r),r!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new s.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.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]:l.default.sources.API;return v.call(this,(function(){return e=new s.default(e),t.editor.applyDelta(e,n)}),n,!0)}}]),e}();function b(e,t){if((t=(0,f.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==y.DEFAULTS.theme){if(t.theme=y.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=m.default;var n=(0,f.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 r=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce((function(e,t){var n=y.import("modules/"+t);return null==n?g.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,f.default)(!0,{},y.DEFAULTS,{modules:r},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 v(e,t,n,r){if(this.options.strict&&!this.isEnabled()&&t===l.default.sources.USER)return new s.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,a=e();if(null!=i&&(!0===n&&(n=i.index),null==r?i=k(i,a,t):0!==r&&(i=k(i,n,r,t)),this.setSelection(i,l.default.sources.SILENT)),a.length()>0){var u,d,c=[l.default.events.TEXT_CHANGE,a,o,t];(u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(c)),t!==l.default.sources.SILENT&&(d=this.emitter).emit.apply(d,c)}return a}function w(e,t,n,i,o){var s={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(o=i,i=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(o=i,i=n,n=t,t=0),"object"===(void 0===n?"undefined":r(n))?(s=n,o=i):"string"==typeof n&&(null!=i?s[n]=i:o=n),[e,t,s,o=o||l.default.sources.API]}function k(e,t,n,r){if(null==e)return null;var o=void 0,a=void 0;if(t instanceof s.default){var u=[e.index,e.index+e.length].map((function(e){return t.transformPosition(e,r!==l.default.sources.USER)})),d=i(u,2);o=d[0],a=d[1]}else{var h=[e.index,e.index+e.length].map((function(e){return e=0?e+n:Math.max(t,e+n)})),f=i(h,2);o=f[0],a=f[1]}return new c.Range(o,a-o)}y.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},y.events=l.default.events,y.sources=l.default.sources,y.version="1.3.7",y.imports={delta:s.default,parchment:d.default,"core/module":u.default,"core/theme":m.default},t.expandConfig=b,t.overload=w,t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(e,n){var r=t.order.indexOf(e),i=t.order.indexOf(n);return r>=0||i>=0?r-i:e===n?0:e1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n};r.DEFAULTS={},t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=["error","warn","log","info"],i="warn";function o(e){if(r.indexOf(e)<=r.indexOf(i)){for(var t,n=arguments.length,o=Array(n>1?n-1:0),s=1;s=0;u--)if(c[u]!=h[u])return!1;for(u=c.length-1;u>=0;u--)if(d=c[u],!s(e[d],t[d],n))return!1;return typeof e==typeof t}(e,t,n))};function a(e){return null==e}function l(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(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.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!=r.query(e,r.Scope.BLOT&(this.scope|r.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=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n=e+n)){var s=this.newlineIndex(e,!0)+1,l=o-s+1,u=this.isolate(s,l),d=u.next;u.format(r,i),d instanceof t&&d.formatAt(0,e-s+n-l,r,i)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var i=this.descendant(d.default,e),o=r(i,2),s=o[0],a=o[1];s.insertAt(a,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(a.default.create("text","\n")),o(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){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(e){var t=a.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof a.default.Embed?t.remove():t.unwrap()}))}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(l.default);O.blotName="code-block",O.tagName="PRE",O.TAB=" ",t.Code=m,t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n=o&&!f.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,f);var p=t.scroll.line(e),m=i(p,2),_=m[0],g=m[1],y=(0,O.default)({},(0,c.bubbleFormats)(_));if(_ instanceof h.default){var b=_.descendant(l.default.Leaf,g),v=i(b,1)[0];y=(0,O.default)(y,(0,c.bubbleFormats)(v))}d=a.default.attributes.diff(y,d)||{}}else if("object"===r(s.insert)){var w=Object.keys(s.insert)[0];if(null==w)return e;t.scroll.insertAt(e,w,s.insert[w])}o+=u}return Object.keys(d).forEach((function(n){t.scroll.formatAt(e,u,n,d[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 s.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach((function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(e,Math.max(t,1)),s=t;o.forEach((function(t){var o=t.length();if(t instanceof u.default){var a=e-t.offset(n.scroll),l=t.newlineIndex(a+s)-a+1;t.formatAt(a,l,i,r[i])}else t.format(i,r[i]);s-=o}))}})),this.scroll.optimize(),this.update((new s.default).retain(e).retain(t,(0,p.default)(r)))}},{key:"formatText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach((function(i){n.scroll.formatAt(e,t,i,r[i])})),this.update((new s.default).retain(e).retain(t,(0,p.default)(r)))}},{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 s.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach((function(e){var t=i(e,1)[0];t instanceof h.default?n.push(t):t instanceof l.default.Leaf&&r.push(t)})):(n=this.scroll.lines(e,t),r=this.scroll.descendants(l.default.Leaf,e,t));var o=[n,r].map((function(e){if(0===e.length)return{};for(var t=(0,c.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=b((0,c.bubbleFormats)(n),t)}return t}));return O.default.apply(O.default,o)}},{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 s.default).retain(e).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,r=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(r).forEach((function(i){n.scroll.formatAt(e,t.length,i,r[i])})),this.update((new s.default).retain(e).insert(t,(0,p.default)(r)))}},{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===h.default.blotName&&!(e.children.length>1)&&e.children.head instanceof f.default}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),r=this.scroll.line(e+t),o=i(r,2),a=o[0],l=o[1],d=0,c=new s.default;null!=a&&(d=a instanceof u.default?a.newlineIndex(l)-l+1:a.length()-l,c=a.delta().slice(l,l+d-1).insert("\n"));var h=this.getContents(e,t+d).diff((new s.default).insert(n).concat(c)),f=(new s.default).retain(e).concat(h);return this.applyDelta(f)}},{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,r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(g)&&l.default.find(t[0].target)){var i=l.default.find(t[0].target),o=(0,c.bubbleFormats)(i),a=i.offset(this.scroll),u=t[0].oldValue.replace(d.default.CONTENTS,""),h=(new s.default).insert(u),f=(new s.default).insert(i.value());e=(new s.default).retain(a).concat(h.diff(f,n)).reduce((function(e,t){return t.insert?e.insert(t.insert,o):e.push(t)}),new s.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&(0,m.default)(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}]),e}();function b(e,t){return Object.keys(t).reduce((function(n,r){return null==e[r]||(t[r]===e[r]?n[r]=t[r]:Array.isArray(t[r])?t[r].indexOf(e[r])<0&&(n[r]=t[r].concat([e[r]])):n[r]=[t[r],e[r]]),n}),{})}t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;c(this,e),this.index=t,this.length=n},p=function(){function e(t,n){var r=this;c(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new f(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,l.default.sources.USER),1)})),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(e,t){e===l.default.events.TEXT_CHANGE&&t.length()>0&&r.update(l.default.sources.SILENT)})),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var e=r.getNativeRange();null!=e&&e.start.node!==r.cursor.textNode&&r.emitter.once(l.default.events.SCROLL_UPDATE,(function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(e){}}))}})),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,(function(e,t){if(t.range){var n=t.range,i=n.startNode,o=n.startOffset,s=n.endNode,a=n.endOffset;r.setNativeRange(i,o,s,a)}})),this.update(l.default.sources.SILENT)}return i(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(l.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&&!o.default.query(e,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=o.default.find(n.start.node,!1);if(null==r)return;if(r instanceof o.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.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 i=void 0,o=this.scroll.leaf(e),s=r(o,2),a=s[0],l=s[1];if(null==a)return null;var u=a.position(l,!0),d=r(u,2);i=d[0],l=d[1];var c=document.createRange();if(t>0){c.setStart(i,l);var h=this.scroll.leaf(e+t),f=r(h,2);if(a=f[0],l=f[1],null==a)return null;var p=a.position(l,!0),m=r(p,2);return i=m[0],l=m[1],c.setEnd(i,l),c.getBoundingClientRect()}var O="left",_=void 0;return i instanceof Text?(l0&&(O="right")),{bottom:_.top+_.height,height:_.height,left:_[O],right:_[O],top:_.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 h.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 i=n.map((function(e){var n=r(e,2),i=n[0],s=n[1],a=o.default.find(i,!0),l=a.offset(t.scroll);return 0===s?l:a instanceof o.default.Container?l+a.length():l+a.index(i,s)})),s=Math.min(Math.max.apply(Math,d(i)),this.scroll.length()-1),a=Math.min.apply(Math,[s].concat(d(i)));return new f(a,s-a)}},{key:"normalizeNative",value:function(e){if(!m(this.root,e.startContainer)||!e.collapsed&&!m(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],i=[],o=this.scroll.length();return n.forEach((function(e,n){e=Math.min(o-1,e);var s,a=t.scroll.leaf(e),l=r(a,2),u=l[0],d=l[1],c=u.position(d,0!==n),h=r(c,2);s=h[0],d=h[1],i.push(s,d)})),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var i=this.scroll.length()-1,o=this.scroll.line(Math.min(t.index,i)),s=r(o,1)[0],a=s;if(t.length>0){var l=this.scroll.line(Math.min(t.index+t.length,i));a=r(l,1)[0]}if(null!=s&&null!=a){var u=e.getBoundingClientRect();n.topu.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,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(h.info("setNativeRange",e,t,n,r),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=e){this.hasFocus()||this.root.focus();var s=(this.getNativeRange()||{}).native;if(null==s||i||e!==s.startContainer||t!==s.startOffset||n!==s.endContainer||r!==s.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var a=document.createRange();a.setStart(e,t),a.setEnd(n,r),o.removeAllRanges(),o.addRange(a)}}else o.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]:l.default.sources.API;if("string"==typeof t&&(n=t,t=!1),h.info("setRange",e),null!=e){var r=this.rangeToNative(e);this.setNativeRange.apply(this,d(r).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.lastRange,n=this.getRange(),i=r(n,2),o=i[0],u=i[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,a.default)(t,this.lastRange)){var d;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var c,h=[l.default.events.SELECTION_CHANGE,(0,s.default)(this.lastRange),(0,s.default)(t),e];(d=this.emitter).emit.apply(d,[l.default.events.EDITOR_CHANGE].concat(h)),e!==l.default.sources.SILENT&&(c=this.emitter).emit.apply(c,h)}}}]),e}();function m(e,t){try{t.parentNode}catch(e){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=f,t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n0&&(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=s.Scope.INLINE_BLOT,t}(o.default);t.default=a},function(e,t,n){var r=n(11),i=n(3),o={attributes:{compose:function(e,t,n){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var r=i(!0,{},t);for(var o in n||(r=Object.keys(r).reduce((function(e,t){return null!=r[t]&&(e[t]=r[t]),e}),{})),e)void 0!==e[o]&&void 0===t[o]&&(r[o]=e[o]);return Object.keys(r).length>0?r: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,i){return r(e[i],t[i])||(n[i]=void 0===t[i]?null:t[i]),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 r=Object.keys(t).reduce((function(n,r){return void 0===e[r]&&(n[r]=t[r]),n}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(e){return new s(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 s(e){this.ops=e,this.index=0,this.offset=0}s.prototype.hasNext=function(){return this.peekLength()<1/0},s.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,r=o.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var i={};return t.attributes&&(i.attributes=t.attributes),"number"==typeof t.retain?i.retain=e:"string"==typeof t.insert?i.insert=t.insert.substr(n,e):i.insert=t.insert,i}return{retain:1/0}},s.prototype.peek=function(){return this.ops[this.index]},s.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},s.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"},s.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(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)}return[]},e.exports=o},function(e,t){var n=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,n,r;try{t=Map}catch(e){t=function(){}}try{n=Set}catch(e){n=function(){}}try{r=Promise}catch(e){r=function(){}}function i(o,a,l,u,d){"object"==typeof a&&(l=a.depth,u=a.prototype,d=a.includeNonEnumerable,a=a.circular);var c=[],h=[],f="undefined"!=typeof Buffer;return void 0===a&&(a=!0),void 0===l&&(l=1/0),function o(l,p){if(null===l)return null;if(0===p)return l;var m,O;if("object"!=typeof l)return l;if(e(l,t))m=new t;else if(e(l,n))m=new n;else if(e(l,r))m=new r((function(e,t){l.then((function(t){e(o(t,p-1))}),(function(e){t(o(e,p-1))}))}));else if(i.__isArray(l))m=[];else if(i.__isRegExp(l))m=new RegExp(l.source,s(l)),l.lastIndex&&(m.lastIndex=l.lastIndex);else if(i.__isDate(l))m=new Date(l.getTime());else{if(f&&Buffer.isBuffer(l))return m=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(m),m;e(l,Error)?m=Object.create(l):void 0===u?(O=Object.getPrototypeOf(l),m=Object.create(O)):(m=Object.create(u),O=u)}if(a){var _=c.indexOf(l);if(-1!=_)return h[_];c.push(l),h.push(m)}for(var g in e(l,t)&&l.forEach((function(e,t){var n=o(t,p-1),r=o(e,p-1);m.set(n,r)})),e(l,n)&&l.forEach((function(e){var t=o(e,p-1);m.add(t)})),l){var y;O&&(y=Object.getOwnPropertyDescriptor(O,g)),y&&null==y.set||(m[g]=o(l[g],p-1))}if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(l);for(g=0;g0){if(a instanceof l.BlockEmbed||f instanceof l.BlockEmbed)return void this.optimize();if(a instanceof c.default){var p=a.newlineIndex(a.length(),!0);if(p>-1&&(a=a.split(p+1))===f)return void this.optimize()}else if(f instanceof c.default){var m=f.newlineIndex(0);m>-1&&f.split(m+1)}var O=f.children.head instanceof d.default?null:f.children.head;a.moveChildren(f,O),a.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,r,i){(null==this.whitelist||this.whitelist[r])&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,i),this.optimize())}},{key:"insertAt",value:function(e,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(e>=this.length())if(null==r||null==s.default.query(n,s.default.Scope.BLOCK)){var i=s.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var a=s.default.create(n,r);this.appendChild(a)}else o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===s.default.Scope.INLINE_BLOT){var r=s.default.create(this.statics.defaultChild);r.appendChild(e),e=r}o(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(p,e)}},{key:"lines",value:function(){return function e(t,n,r){var i=[],o=r;return t.children.forEachAt(n,r,(function(t,n,r){p(t)?i.push(t):t instanceof s.default.Container&&(i=i.concat(e(t,n,o))),o-=r})),i}(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&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(a.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return o(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=a.default.sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(a.default.events.SCROLL_BEFORE_UPDATE,n,e),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(a.default.events.SCROLL_UPDATE,n,e)}}}]),t}(s.default.Scroll);m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[u.default,l.BlockEmbed,h.default],t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var r="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},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=L(e);if(null==r||null==r.key)return _.warn("Attempted to add invalid keyboard binding",r);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),r=(0,l.default)(r,t,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,s=(e.bindings[o]||[]).filter((function(e){return t.match(n,e)}));if(0!==s.length){var l=e.quill.getSelection();if(null!=l&&e.quill.hasFocus()){var u=e.quill.getLine(l.index),d=i(u,2),h=d[0],f=d[1],p=e.quill.getLeaf(l.index),m=i(p,2),O=m[0],_=m[1],g=0===l.length?[O,_]:e.quill.getLeaf(l.index+l.length),y=i(g,2),b=y[0],v=y[1],w=O instanceof c.default.Text?O.value().slice(0,_):"",k=b instanceof c.default.Text?b.value().slice(v):"",M={collapsed:0===l.length,empty:0===l.length&&h.length()<=1,format:e.quill.getFormat(l),offset:f,prefix:w,suffix:k};s.some((function(t){if(null!=t.collapsed&&t.collapsed!==M.collapsed)return!1;if(null!=t.empty&&t.empty!==M.empty)return!1;if(null!=t.offset&&t.offset!==M.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((function(e){return null==M.format[e]})))return!1}else if("object"===r(t.format)&&!Object.keys(t.format).every((function(e){return!0===t.format[e]?null!=M.format[e]:!1===t.format[e]?null==M.format[e]:(0,a.default)(t.format[e],M.format[e])})))return!1;return!(null!=t.prefix&&!t.prefix.test(M.prefix)||null!=t.suffix&&!t.suffix.test(M.suffix)||!0===t.handler.call(e,l,M))}))&&n.preventDefault()}}}}))}}]),t}(p.default);function b(e,t){var n,r=e===y.keys.LEFT?"prefix":"suffix";return O(n={key:e,shiftKey:t,altKey:null},r,/^$/),O(n,"handler",(function(n){var r=n.index;e===y.keys.RIGHT&&(r+=n.length+1);var o=this.quill.getLeaf(r);return!(i(o,1)[0]instanceof c.default.Embed&&(e===y.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index-1,h.default.sources.USER):t?this.quill.setSelection(n.index,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index+n.length+1,h.default.sources.USER),1))})),n}function v(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),r=i(n,1)[0],o={};if(0===t.offset){var s=this.quill.getLine(e.index-1),a=i(s,1)[0];if(null!=a&&a.length()>1){var l=r.formats(),u=this.quill.getFormat(e.index-1,1);o=d.default.attributes.diff(l,u)||{}}}var c=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-c,c,h.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(e.index-c,c,o,h.default.sources.USER),this.quill.focus()}}function w(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var r={},o=0,s=this.quill.getLine(e.index),a=i(s,1)[0];if(t.offset>=a.length()-1){var l=this.quill.getLine(e.index+1),u=i(l,1)[0];if(u){var c=a.formats(),f=this.quill.getFormat(e.index,1);r=d.default.attributes.diff(c,f)||{},o=u.length()}}this.quill.deleteText(e.index,n,h.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index+o-1,n,r,h.default.sources.USER)}}function k(e){var t=this.quill.getLines(e),n={};if(t.length>1){var r=t[0].formats(),i=t[t.length-1].formats();n=d.default.attributes.diff(i,r)||{}}this.quill.deleteText(e,h.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,h.default.sources.USER),this.quill.setSelection(e.index,h.default.sources.SILENT),this.quill.focus()}function M(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var r=Object.keys(t.format).reduce((function(e,n){return c.default.query(n,c.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e}),{});this.quill.insertText(e.index,"\n",r,h.default.sources.USER),this.quill.setSelection(e.index+1,h.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach((function(e){null==r[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],h.default.sources.USER))}))}function S(e){return{key:y.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=c.default.query("code-block"),r=t.index,o=t.length,s=this.quill.scroll.descendant(n,r),a=i(s,2),l=a[0],u=a[1];if(null!=l){var d=this.quill.getIndex(l),f=l.newlineIndex(u,!0)+1,p=l.newlineIndex(d+u+o),m=l.domNode.textContent.slice(f,p).split("\n");u=0,m.forEach((function(t,i){e?(l.insertAt(f+u,n.TAB),u+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):t.startsWith(n.TAB)&&(l.deleteAt(f+u,n.TAB.length),u-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),u+=t.length+1})),this.quill.update(h.default.sources.USER),this.quill.setSelection(r,o,h.default.sources.SILENT)}}}}function x(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],h.default.sources.USER)}}}function L(e){if("string"==typeof e||"number"==typeof e)return L({key:e});if("object"===(void 0===e?"undefined":r(e))&&(e=(0,s.default)(e,!1)),"string"==typeof e.key)if(null!=y.keys[e.key.toUpperCase()])e.key=y.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[g]=e.shortKey,delete e.shortKey),e}y.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},y.DEFAULTS={bindings:{bold:x("bold"),italic:x("italic"),underline:x("underline"),indent:{key:y.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",h.default.sources.USER)}},outdent:{key:y.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",h.default.sources.USER)}},"outdent backspace":{key:y.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",h.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,h.default.sources.USER)}},"indent code-block":S(!0),"outdent code-block":S(!1),"remove tab":{key:y.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,h.default.sources.USER)}},tab:{key:y.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,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,h.default.sources.SILENT)}},"list empty enter":{key:y.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,h.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,h.default.sources.USER)}},"checklist enter":{key:y.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=i(t,2),r=n[0],o=n[1],s=(0,l.default)({},r.formats(),{list:"checked"}),a=(new u.default).retain(e.index).insert("\n",s).retain(r.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(a,h.default.sources.USER),this.quill.setSelection(e.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:y.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),r=i(n,2),o=r[0],s=r[1],a=(new u.default).retain(e.index).insert("\n",t.format).retain(o.length()-s-1).retain(1,{header:null});this.quill.updateContents(a,h.default.sources.USER),this.quill.setSelection(e.index+1,h.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,r=this.quill.getLine(e.index),o=i(r,2),s=o[0],a=o[1];if(a>n)return!0;var l=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(e.index," ",h.default.sources.USER),this.quill.history.cutoff();var d=(new u.default).retain(e.index-a).delete(n+1).retain(s.length()-2-a).retain(1,{list:l});this.quill.updateContents(d,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,h.default.sources.SILENT)}},"code exit":{key:y.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=i(t,2),r=n[0],o=n[1],s=(new u.default).retain(e.index+r.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(s,h.default.sources.USER)}},"embed left":b(y.keys.LEFT,!1),"embed left shift":b(y.keys.LEFT,!0),"embed right":b(y.keys.RIGHT,!1),"embed right shift":b(y.keys.RIGHT,!0)}},t.default=y,t.SHORTKEY=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},o=function(){function e(e,t){for(var n=0;n-1}a.blotName="link",a.tagName="A",a.SANITIZED_URL="about:blank",a.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=a,t.sanitize=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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},i=function(){function e(e,t){for(var n=0;n1&&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"===("undefined"==typeof Event?"undefined":r(Event))){var i=document.createEvent("Event");i.initEvent("change",!0,!0),this.select.dispatchEvent(i)}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){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=_(n(0)),i=_(n(5)),o=n(4),s=_(o),a=_(n(16)),l=_(n(25)),u=_(n(24)),d=_(n(35)),c=_(n(6)),h=_(n(22)),f=_(n(7)),p=_(n(55)),m=_(n(42)),O=_(n(23));function _(e){return e&&e.__esModule?e:{default:e}}i.default.register({"blots/block":s.default,"blots/block/embed":o.BlockEmbed,"blots/break":a.default,"blots/container":l.default,"blots/cursor":u.default,"blots/embed":d.default,"blots/inline":c.default,"blots/scroll":h.default,"blots/text":f.default,"modules/clipboard":p.default,"modules/history":m.default,"modules/keyboard":O.default}),r.default.register(s.default,a.default,u.default,c.default,h.default,f.default),t.default=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e){this.domNode=e,this.domNode[r.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 r.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 r.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,i){var o=this.isolate(e,t);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var s=r.create(this.statics.scope);o.wrap(s),s.format(n,i)}},e.prototype.insertAt=function(e,t,n){var i=null==n?r.create("text",t):r.create(t,n),o=this.split(e);this.parent.insertBefore(i,o)},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[r.DATA_KEY]&&delete this.domNode[r.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?r.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?r.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),i=n(32),o=n(33),s=n(1),a=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=r.default.keys(this.domNode),n=i.default.keys(this.domNode),a=o.default.keys(this.domNode);t.concat(n).concat(a).forEach((function(t){var n=s.query(t,s.Scope.ATTRIBUTE);n instanceof r.default&&(e.attributes[n.attrName]=n)}))},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach((function(n){var r=t.attributes[n].value(t.domNode);e.format(n,r)}))},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=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function o(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter((function(e){return 0===e.indexOf(t+"-")}))}Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(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){o(e,this.keyName).forEach((function(t){e.classList.remove(t)})),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(o(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function o(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 s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(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[o(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[o(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[o(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;nr&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),e=i.redo.compose(e)}else this.lastRecorded=r;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}(s(n(9)).default);function l(e){var t=e.reduce((function(e,t){return e+=t.delete||0}),0),n=e.length()-t;return function(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!=i.default.query(e,i.default.Scope.BLOCK)})))}(e)&&(n-=1),n}a.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=a,t.getLastChangeIndex=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var r=function(){function e(e,t){for(var n=0;n0&&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,a.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,a.default.sources.USER)),this.quill.root.scrollTop=t;break;case"video":e=function(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}(e);case"formula":if(!e)break;var n=this.quill.getSelection(!0);if(null!=n){var r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),e,a.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",a.default.sources.USER),this.quill.setSelection(r+2,a.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}(f.default);function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach((function(t){var r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",t),e.appendChild(r)}))}t.BaseTooltip=M,t.default=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t1&&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,r=this.iterator();n=r();){var i=n.length();if(es?n(r,e-s,Math.min(t,s+l-e)):n(r,0,Math.min(l,e+t-s)),s+=l}},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,r=this.iterator();n=r();)t=e(t,n);return t},e}();t.default=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),s=n(1),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=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,a),n.attach(),n}return i(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,r,i){this.update(),e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){this.update(),e.prototype.insertAt.call(this,t,n,r)},t.prototype.optimize=function(t,n){var r=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var i=[].slice.call(this.observer.takeRecords());i.length>0;)t.push(i.pop());for(var a=function(e,t){void 0===t&&(t=!0),null!=e&&e!==r&&null!=e.domNode.parentNode&&(null==e.domNode[s.DATA_KEY].mutations&&(e.domNode[s.DATA_KEY].mutations=[]),t&&a(e.parent))},l=function(e){null!=e.domNode[s.DATA_KEY]&&null!=e.domNode[s.DATA_KEY].mutations&&(e instanceof o.default&&e.children.forEach(l),e.optimize(n))},u=t,d=0;u.length>0;d+=1){if(d>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(e){var t=s.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(a(s.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,(function(e){var t=s.find(e,!1);a(t,!1),t instanceof o.default&&t.children.forEach((function(e){a(e,!1)}))}))):"attributes"===e.type&&a(t.prev)),a(t))})),this.children.forEach(l),i=(u=[].slice.call(this.observer.takeRecords())).slice();i.length>0;)t.push(i.pop())}},t.prototype.update=function(t,n){var r=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map((function(e){var t=s.find(e.target,!0);return null==t?null:null==t.domNode[s.DATA_KEY].mutations?(t.domNode[s.DATA_KEY].mutations=[e],t):(t.domNode[s.DATA_KEY].mutations.push(e),null)})).forEach((function(e){null!=e&&e!==r&&null!=e.domNode[s.DATA_KEY]&&e.update(e.domNode[s.DATA_KEY].mutations||[],n)})),null!=this.domNode[s.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[s.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=s.Scope.BLOCK_BLOT,t.tagName="DIV",t}(o.default);t.default=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),s=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,r){var i=this;n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):(this.children.forEach((function(e){e instanceof o.default||(e=e.wrap(t.blotName,!0)),i.attributes.copy(e)})),this.unwrap())},t.prototype.formatAt=function(t,n,r,i){null!=this.formats()[r]||s.query(r,s.Scope.ATTRIBUTE)?this.isolate(t,n).format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof t&&i.prev===this&&function(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}(r,i.formats())&&(i.moveChildren(this),i.remove())},t.blotName="inline",t.scope=s.Scope.INLINE_BLOT,t.tagName="SPAN",t}(o.default);t.default=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),s=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(n){var r=s.query(t.blotName).tagName;if(n.tagName!==r)return e.formats.call(this,n)},t.prototype.format=function(n,r){null!=s.query(n,s.Scope.BLOCK)&&(n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,r,i){null!=s.query(r,s.Scope.BLOCK)?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){if(null==r||null!=s.query(n,s.Scope.INLINE))e.prototype.insertAt.call(this,t,n,r);else{var i=this.split(t),o=s.create(n,r);i.parent.insertBefore(o,i)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=s.Scope.BLOCK_BLOT,t.tagName="P",t}(o.default);t.default=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(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,r,i){0===t&&n===this.length()?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(19),s=n(1),a=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return i(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,r){null==r?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,r)},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 void 0===t&&(t=!1),[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=s.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=s.Scope.INLINE_BLOT,t}(o.default);t.default=a},function(e,t,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:i.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 r=n.indexOf(e,t);return-1!==r&&r===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),r=n.length>>>0,i=arguments[1],o=0;ot.length?e:t,c=e.length>t.length?t:e,h=d.indexOf(c);if(-1!=h)return u=[[r,d.substring(0,h)],[i,c],[r,d.substring(h+c.length)]],e.length>t.length&&(u[0][0]=u[2][0]=n),u;if(1==c.length)return[[n,e],[r,t]];var f=function(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,i,o,s,c]:null}var o,s,u,d,c,h=i(n,r,Math.ceil(n.length/4)),f=i(n,r,Math.ceil(n.length/2));if(!h&&!f)return null;o=f?h&&h[4].length>f[4].length?h:f:h,e.length>t.length?(s=o[0],u=o[1],d=o[2],c=o[3]):(d=o[0],c=o[1],s=o[2],u=o[3]);var p=o[4];return[s,u,d,c,p]}(e,t);if(f){var p=f[0],m=f[1],O=f[2],_=f[3],g=f[4],y=o(p,O),b=o(m,_);return y.concat([[i,g]],b)}return function(e,t){for(var i=e.length,o=t.length,a=Math.ceil((i+o)/2),l=a,u=2*a,d=new Array(u),c=new Array(u),h=0;hi)O+=2;else if(w>o)m+=2;else if(p&&(S=l+f-b)>=0&&S=(M=i-c[S]))return s(e,t,L,w)}for(var k=-y+_;k<=y-g;k+=2){for(var M,S=l+k,x=(M=k==-y||k!=y&&c[S-1]i)g+=2;else if(x>o)_+=2;else if(!p){var L;if((v=l+f-k)>=0&&v=(M=i-M))return s(e,t,L,w)}}}return[[n,e],[r,t]]}(e,t)}(e=e.substring(0,e.length-h),t=t.substring(0,t.length-h));return f&&m.unshift([i,f]),p&&m.push([i,p]),u(m),null!=d&&(m=function(e,t){var r=function(e,t){if(0===t)return[i,e];for(var r=0,o=0;o0&&o.splice(s+2,0,[l[0],u]),c(o,s,3)}return e}(m,d)),m=function(e){for(var t=!1,o=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},s=function(e){return e.charCodeAt(e.length-1)>=55296&&e.charCodeAt(e.length-1)<=56319},a=2;a0&&l.push(e[a]);return l}(m)}function s(e,t,n,r){var i=e.substring(0,n),s=t.substring(0,r),a=e.substring(n),l=t.substring(r),u=o(i,s),d=o(a,l);return u.concat(d)}function a(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n1?(0!==s&&0!==d&&(0!==(t=a(h,c))&&(o-s-d>0&&e[o-s-d-1][0]==i?e[o-s-d-1][1]+=h.substring(0,t):(e.splice(0,0,[i,h.substring(0,t)]),o++),h=h.substring(t),c=c.substring(t)),0!==(t=l(h,c))&&(e[o][1]=h.substring(h.length-t)+e[o][1],h=h.substring(0,h.length-t),c=c.substring(0,c.length-t))),0===s?e.splice(o-d,s+d,[r,h]):0===d?e.splice(o-s,s+d,[n,c]):e.splice(o-s-d,s+d,[n,c],[r,h]),o=o-s-d+(s?1:0)+(d?1:0)+1):0!==o&&e[o-1][0]==i?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,d=0,s=0,c="",h=""}""===e[e.length-1][1]&&e.pop();var f=!1;for(o=1;o=0&&r>=t-1;r--)if(r+1=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=L(t,n)),parseFloat(r.textIndent||0)>0&&(t=(new a.default).insert("\t").concat(t)),t}],["li",function(e,t){var n=l.default.query(e);if(null==n||"list-item"!==n.blotName||!Y(t,"\n"))return t;for(var r=-1,i=e.parentNode;!i.classList.contains("ql-clipboard");)"list"===(l.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?t:t.compose((new a.default).retain(t.length()-1).retain(1,{indent:r}))}],["b",D.bind(D,"bold")],["i",D.bind(D,"italic")],["style",function(){return new a.default}]],M=[h.AlignAttribute,O.DirectionAttribute].reduce((function(e,t){return e[t.keyName]=t,e}),{}),S=[h.AlignStyle,f.BackgroundStyle,m.ColorStyle,O.DirectionStyle,_.FontStyle,g.SizeStyle].reduce((function(e,t){return e[t.keyName]=t,e}),{}),x=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],k.concat(r.options.matchers).forEach((function(e){var t=i(e,2),o=t[0],s=t[1];(n.matchVisual||s!==q)&&r.addMatcher(o,s)})),r}return function(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)}(t,e),o(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 +\<"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[p.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new a.default).insert(n,b({},p.default.blotName,t[p.default.blotName]))}var r=this.prepareMatching(),o=i(r,2),s=o[0],l=o[1],u=P(this.container,s,l);return Y(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new a.default).retain(u.length()-1).delete(1))),v.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 r=this.convert(t);this.quill.updateContents((new a.default).retain(e).concat(r),n),this.quill.setSelection(e+r.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new a.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout((function(){r=r.concat(t.convert()).delete(n.length),t.quill.updateContents(r,u.default.sources.USER),t.quill.setSelection(r.length()-n.length,u.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=i,t.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach((function(r){var o=i(r,2),s=o[0],a=o[1];switch(s){case Node.TEXT_NODE:n.push(a);break;case Node.ELEMENT_NODE:t.push(a);break;default:[].forEach.call(e.container.querySelectorAll(s),(function(e){e[w]=e[w]||[],e[w].push(a)}))}})),[t,n]}}]),t}(c.default);function L(e,t,n){return"object"===(void 0===t?"undefined":r(t))?Object.keys(t).reduce((function(e,n){return L(e,n,t[n])}),e):e.reduce((function(e,r){return r.attributes&&r.attributes[t]?e.push(r):e.insert(r.insert,(0,s.default)({},b({},t,n),r.attributes))}),new a.default)}function T(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t="__ql-computed-style";return e[t]||(e[t]=window.getComputedStyle(e))}function Y(e,t){for(var n="",r=e.ops.length-1;r>=0&&n.length-1}function P(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce((function(t,n){return n(e,t)}),new a.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(r,i){var o=P(i,t,n);return i.nodeType===e.ELEMENT_NODE&&(o=t.reduce((function(e,t){return t(i,e)}),o),o=(i[w]||[]).reduce((function(e,t){return t(i,e)}),o)),r.concat(o)}),new a.default):new a.default}function D(e,t,n){return L(n,e,!0)}function Q(e,t){var n=l.default.Attributor.Attribute.keys(e),r=l.default.Attributor.Class.keys(e),i=l.default.Attributor.Style.keys(e),o={};return n.concat(r).concat(i).forEach((function(t){var n=l.default.query(t,l.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(e),o[n.attrName])||(null==(n=M[t])||n.attrName!==t&&n.keyName!==t||(o[n.attrName]=n.value(e)||void 0),null==(n=S[t])||n.attrName!==t&&n.keyName!==t||(n=S[t],o[n.attrName]=n.value(e)||void 0))})),Object.keys(o).length>0&&(t=L(t,o)),t}function j(e,t){var n=l.default.query(e);if(null==n)return t;if(n.prototype instanceof l.default.Embed){var r={},i=n.value(e);null!=i&&(r[n.blotName]=i,t=(new a.default).insert(r,n.formats(e)))}else"function"==typeof n.formats&&(t=L(t,n.blotName,n.formats(e)));return t}function E(e,t){return Y(t,"\n")||($(e)||t.length()>0&&e.nextSibling&&$(e.nextSibling))&&t.insert("\n"),t}function q(e,t){if($(e)&&null!=e.nextElementSibling&&!Y(t,"\n\n")){var n=e.offsetHeight+parseFloat(T(e).marginTop)+parseFloat(T(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function A(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(!T(e.parentNode).whiteSpace.startsWith("pre")){var r=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,r.bind(r,!0)),(null==e.previousSibling&&$(e.parentNode)||null!=e.previousSibling&&$(e.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==e.nextSibling&&$(e.parentNode)||null!=e.nextSibling&&$(e.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return t.insert(n)}x.DEFAULTS={matchers:[],matchVisual:!0},t.default=x,t.matchAttributor=Q,t.matchBlot=j,t.matchNewline=E,t.matchSpacing=q,t.matchText=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n '},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;nr.right&&(o=r.right-i.right,this.root.style.left=t+o+"px"),i.leftr.bottom){var s=i.bottom-i.top,a=e.bottom-e.top+s;this.root.style.top=n-a+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},o=function(){function e(e,t){for(var n=0;n','','',''].join(""),t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=E(n(29)),i=n(36),o=n(38),s=n(64),a=E(n(65)),l=E(n(66)),u=n(67),d=E(u),c=n(37),h=n(26),f=n(39),p=n(40),m=E(n(56)),O=E(n(68)),_=E(n(27)),g=E(n(69)),y=E(n(70)),b=E(n(71)),v=E(n(72)),w=E(n(73)),k=n(13),M=E(k),S=E(n(74)),x=E(n(75)),L=E(n(57)),T=E(n(41)),Y=E(n(28)),$=E(n(59)),P=E(n(60)),D=E(n(61)),Q=E(n(108)),j=E(n(62));function E(e){return e&&e.__esModule?e:{default:e}}r.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":c.BackgroundClass,"attributors/class/color":h.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":f.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":c.BackgroundStyle,"attributors/style/color":h.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":f.FontStyle,"attributors/style/size":p.SizeStyle},!0),r.default.register({"formats/align":i.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":s.IndentClass,"formats/background":c.BackgroundStyle,"formats/color":h.ColorStyle,"formats/font":f.FontClass,"formats/size":p.SizeClass,"formats/blockquote":a.default,"formats/code-block":M.default,"formats/header":l.default,"formats/list":d.default,"formats/bold":m.default,"formats/code":k.Code,"formats/italic":O.default,"formats/link":_.default,"formats/script":g.default,"formats/strike":y.default,"formats/underline":b.default,"formats/image":v.default,"formats/video":w.default,"formats/list/item":u.ListItem,"modules/formula":S.default,"modules/syntax":x.default,"modules/toolbar":L.default,"themes/bubble":Q.default,"themes/snow":j.default,"ui/icons":T.default,"ui/picker":Y.default,"ui/icon-picker":P.default,"ui/color-picker":$.default,"ui/tooltip":D.default},!0),t.default=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var r,i=function(){function e(e,t){for(var n=0;n0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return e={},t=this.statics.blotName,n=this.statics.formats(this.domNode),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"insertBefore",value:function(e,n){if(e instanceof h)i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(e,o)}}},{key:"optimize",value:function(e){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&&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=o.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(a.default);f.blotName="list",f.scope=o.default.Scope.BLOCK_BLOT,f.tagName=["OL","UL"],f.defaultChild="list-item",f.allowedChildren=[h],t.ListItem=h,t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(56),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),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}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(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)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default);o.blotName="italic",o.tagName=["EM","I"],t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(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 u.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,l.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(a.default.Embed);d.blotName="image",d.tagName="IMG",t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(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 u.reduce((function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t}),{})}},{key:"sanitize",value:function(e){return l.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(s.BlockEmbed);d.blotName="video",d.className="ql-video",d.tagName="IFRAME",t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var r=function(){function e(e,t){for(var n=0;n0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(l(n(13)).default);h.className="ql-syntax";var f=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),p=function(e){function t(e,n){u(this,t);var r=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return r.quill.on(s.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(i),i=setTimeout((function(){r.highlight(),i=null}),r.options.interval)})),r.highlight(),r}return c(t,e),r(t,null,[{key:"register",value:function(){s.default.register(f,!0),s.default.register(h,!0)}}]),r(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(s.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(h).forEach((function(t){t.highlight(e.options.highlight)})),this.quill.update(s.default.sources.SILENT),null!=t&&this.quill.setSelection(t,s.default.sources.SILENT)}}}]),t}(a.default);p.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=h,t.CodeToken=f,t.default=p},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},i=function(){function e(e,t){for(var n=0;n0&&i===s.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var o=r.quill.getLines(t.index,t.length);if(1===o.length)r.position(r.quill.getBounds(t));else{var a=o[o.length-1],l=r.quill.getIndex(a),d=Math.min(a.length()-1,t.index+t.length-l),c=r.quill.getBounds(new u.Range(l,d));r.position(c)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()})),r}return p(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(".ql-close").addEventListener("click",(function(){e.root.classList.remove("ql-editing")})),this.quill.on(s.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=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),t}(a.BaseTooltip);_.TEMPLATE=['','"].join(""),t.BubbleTooltip=_,t.default=O},function(e,t,n){e.exports=n(63)}]).default},e.exports=t()},4728:(e,t,n)=>{const r=n(8659),i=n(2834),{isPlainObject:o}=n(8682),s=n(4744),a=n(9466),{parse:l}=n(2895),u=["img","audio","video","picture","svg","object","map","iframe","embed"],d=["script","style"];function c(e,t){e&&Object.keys(e).forEach((function(n){t(e[n],n)}))}function h(e,t){return{}.hasOwnProperty.call(e,t)}function f(e,t){const n=[];return c(e,(function(e){t(e)&&n.push(e)})),n}e.exports=m;const p=/^[^\0\t\n\f\r /<=>]+$/;function m(e,t,n){if(null==e)return"";"number"==typeof e&&(e=e.toString());let _="",g="";function y(e,t){const n=this;this.tag=e,this.attribs=t||{},this.tagPosition=_.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if($.length){$[$.length-1].text+=n.text}},this.updateParentNodeMediaChildren=function(){if($.length&&u.includes(this.tag)){$[$.length-1].mediaChildren.push(this.tag)}}}(t=Object.assign({},m.defaults,t)).parser=Object.assign({},O,t.parser);const b=function(e){return!1===t.allowedTags||(t.allowedTags||[]).indexOf(e)>-1};d.forEach((function(e){b(e)&&!t.allowVulnerableTags&&console.warn(`\n\n⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently\nvulnerable to XSS attacks. Please remove it from \`allowedTags\`.\nOr, to disable this warning, add the \`allowVulnerableTags\` option\nand ensure you are accounting for this risk.\n\n`)}));const v=t.nonTextTags||["script","style","textarea","option"];let w,k;t.allowedAttributes&&(w={},k={},c(t.allowedAttributes,(function(e,t){w[t]=[];const n=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(i(e).replace(/\\\*/g,".*")):w[t].push(e)})),n.length&&(k[t]=new RegExp("^("+n.join("|")+")$"))})));const M={},S={},x={};c(t.allowedClasses,(function(e,t){if(w&&(h(w,t)||(w[t]=[]),w[t].push("class")),M[t]=e,Array.isArray(e)){const n=[];M[t]=[],x[t]=[],e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(i(e).replace(/\\\*/g,".*")):e instanceof RegExp?x[t].push(e):M[t].push(e)})),n.length&&(S[t]=new RegExp("^("+n.join("|")+")$"))}}));const L={};let T,Y,$,P,D,Q,j;c(t.transformTags,(function(e,t){let n;"function"==typeof e?n=e:"string"==typeof e&&(n=m.simpleTransform(e)),"*"===t?T=n:L[t]=n}));let E=!1;A();const q=new r.Parser({onopentag:function(e,n){if(t.enforceHtmlBoundary&&"html"===e&&A(),Q)return void j++;const r=new y(e,n);$.push(r);let i=!1;const u=!!r.text;let d;if(h(L,e)&&(d=L[e](e,n),r.attribs=n=d.attribs,void 0!==d.text&&(r.innerText=d.text),e!==d.tagName&&(r.name=e=d.tagName,D[Y]=d.tagName)),T&&(d=T(e,n),r.attribs=n=d.attribs,e!==d.tagName&&(r.name=e=d.tagName,D[Y]=d.tagName)),(!b(e)||"recursiveEscape"===t.disallowedTagsMode&&!function(e){for(const t in e)if(h(e,t))return!1;return!0}(P)||null!=t.nestingLimit&&Y>=t.nestingLimit)&&(i=!0,P[Y]=!0,"discard"!==t.disallowedTagsMode&&"completelyDiscard"!==t.disallowedTagsMode||-1!==v.indexOf(e)&&(Q=!0,j=1),P[Y]=!0),Y++,i){if("discard"===t.disallowedTagsMode||"completelyDiscard"===t.disallowedTagsMode)return;g=_,_=""}_+="<"+e,"script"===e&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(r.innerText=""),(!w||h(w,e)||w["*"])&&c(n,(function(n,i){if(!p.test(i))return void delete r.attribs[i];if(""===n&&!t.allowedEmptyAttributes.includes(i)&&(t.nonBooleanAttributes.includes(i)||t.nonBooleanAttributes.includes("*")))return void delete r.attribs[i];let u=!1;if(!w||h(w,e)&&-1!==w[e].indexOf(i)||w["*"]&&-1!==w["*"].indexOf(i)||h(k,e)&&k[e].test(i)||k["*"]&&k["*"].test(i))u=!0;else if(w&&w[e])for(const t of w[e])if(o(t)&&t.name&&t.name===i){u=!0;let e="";if(!0===t.multiple){const r=n.split(" ");for(const n of r)-1!==t.values.indexOf(n)&&(""===e?e=n:e+=" "+n)}else t.values.indexOf(n)>=0&&(e=n);n=e}if(u){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(i)&&R(e,n))return void delete r.attribs[i];if("script"===e&&"src"===i){let e=!0;try{const r=C(n);if(t.allowedScriptHostnames||t.allowedScriptDomains){const n=(t.allowedScriptHostnames||[]).find((function(e){return e===r.url.hostname})),i=(t.allowedScriptDomains||[]).find((function(e){return r.url.hostname===e||r.url.hostname.endsWith(`.${e}`)}));e=n||i}}catch(t){e=!1}if(!e)return void delete r.attribs[i]}if("iframe"===e&&"src"===i){let e=!0;try{const r=C(n);if(r.isRelativeUrl)e=h(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const n=(t.allowedIframeHostnames||[]).find((function(e){return e===r.url.hostname})),i=(t.allowedIframeDomains||[]).find((function(e){return r.url.hostname===e||r.url.hostname.endsWith(`.${e}`)}));e=n||i}}catch(t){e=!1}if(!e)return void delete r.attribs[i]}if("srcset"===i)try{let e=a(n);if(e.forEach((function(e){R("srcset",e.url)&&(e.evil=!0)})),e=f(e,(function(e){return!e.evil})),!e.length)return void delete r.attribs[i];n=f(e,(function(e){return!e.evil})).map((function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")})).join(", "),r.attribs[i]=n}catch(e){return void delete r.attribs[i]}if("class"===i){const t=M[e],o=M["*"],a=S[e],l=x[e],u=[a,S["*"]].concat(l).filter((function(e){return e}));if(!(n=z(n,t&&o?s(t,o):t||o,u)).length)return void delete r.attribs[i]}if("style"===i)if(t.parseStyleAttributes)try{const o=function(e,t){if(!t)return e;const n=e.nodes[0];let r;r=t[n.selector]&&t["*"]?s(t[n.selector],t["*"]):t[n.selector]||t["*"];r&&(e.nodes[0].nodes=n.nodes.reduce(function(e){return function(t,n){if(h(e,n.prop)){e[n.prop].some((function(e){return e.test(n.value)}))&&t.push(n)}return t}}(r),[]));return e}(l(e+" {"+n+"}",{map:!1}),t.allowedStyles);if(n=function(e){return e.nodes[0].nodes.reduce((function(e,t){return e.push(`${t.prop}:${t.value}${t.important?" !important":""}`),e}),[]).join(";")}(o),0===n.length)return void delete r.attribs[i]}catch(t){return"undefined"!=typeof window&&console.warn('Failed to parse "'+e+" {"+n+"}\", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547"),void delete r.attribs[i]}else if(t.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.");_+=" "+i,n&&n.length?_+='="'+N(n,!0)+'"':t.allowedEmptyAttributes.includes(i)&&(_+='=""')}else delete r.attribs[i]})),-1!==t.selfClosing.indexOf(e)?_+=" />":(_+=">",!r.innerText||u||t.textFilter||(_+=N(r.innerText),E=!0)),i&&(_=g+N(_),g="")},ontext:function(e){if(Q)return;const n=$[$.length-1];let r;if(n&&(r=n.tag,e=void 0!==n.innerText?n.innerText:e),"completelyDiscard"!==t.disallowedTagsMode||b(r))if("discard"!==t.disallowedTagsMode&&"completelyDiscard"!==t.disallowedTagsMode||"script"!==r&&"style"!==r){const n=N(e,!1);t.textFilter&&!E?_+=t.textFilter(n,r):E||(_+=n)}else _+=e;else e="";if($.length){$[$.length-1].text+=e}},onclosetag:function(e,n){if(Q){if(j--,j)return;Q=!1}const r=$.pop();if(!r)return;if(r.tag!==e)return void $.push(r);Q=!!t.enforceHtmlBoundary&&"html"===e,Y--;const i=P[Y];if(i){if(delete P[Y],"discard"===t.disallowedTagsMode||"completelyDiscard"===t.disallowedTagsMode)return void r.updateParentNodeText();g=_,_=""}D[Y]&&(e=D[Y],delete D[Y]),t.exclusiveFilter&&t.exclusiveFilter(r)?_=_.substr(0,r.tagPosition):(r.updateParentNodeMediaChildren(),r.updateParentNodeText(),-1!==t.selfClosing.indexOf(e)||n&&!b(e)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0?i&&(_=g,g=""):(_+=""+e+">",i&&(_=g+N(_),g=""),E=!1))}},t.parser);return q.write(e),q.end(),_;function A(){_="",Y=0,$=[],P={},D={},Q=!1,j=0}function N(e,n){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&").replace(//g,">"),n&&(e=e.replace(/"/g,"""))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),n&&(e=e.replace(/"/g,""")),e}function R(e,n){for(n=n.replace(/[\x00-\x20]+/g,"");;){const e=n.indexOf("\x3c!--");if(-1===e)break;const t=n.indexOf("--\x3e",e+4);if(-1===t)break;n=n.substring(0,e)+n.substring(t+3)}const r=n.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!r)return!!n.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;const i=r[1].toLowerCase();return h(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(i):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(i)}function C(e){if((e=e.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw new Error("relative: exploit attempt");let t="relative://relative-site";for(let e=0;e<100;e++)t+=`/${e}`;const n=new URL(e,t);return{isRelativeUrl:n&&"relative-site"===n.hostname&&"relative:"===n.protocol,url:n}}function z(e,t,n){return t?(e=e.split(/\s+/)).filter((function(e){return-1!==t.indexOf(e)||n.some((function(t){return t.test(e)}))})).join(" "):e}}const O={decodeEntities:!0};m.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},m.simpleTransform=function(e,t,n){return n=void 0===n||n,t=t||{},function(r,i){let o;if(n)for(o in t)i[o]=t[o];else i=t;return{tagName:e,attribs:i}}}},5072:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},1609:e=>{"use strict";e.exports=window.React},5795:e=>{"use strict";e.exports=window.ReactDOM},6154:e=>{"use strict";e.exports=window.moment},9746:()=>{},9977:()=>{},197:()=>{},1866:()=>{},2739:()=>{},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t{e.exports={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r}}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.nc=void 0,(()=>{"use strict";var e={};n.r(e),n.d(e,{getActiveTab:()=>Dn,getDeleteStatus:()=>En,getFieldDeleteMessage:()=>Bn,getFieldDeleteMessages:()=>Gn,getFieldDeleteStatus:()=>Fn,getFieldDeleteStatuses:()=>In,getFieldRelatedObjects:()=>Pn,getFieldSaveMessage:()=>Un,getFieldSaveMessages:()=>Zn,getFieldSaveStatus:()=>Xn,getFieldSaveStatuses:()=>Vn,getFieldTypeObject:()=>$n,getFieldTypeObjects:()=>Yn,getFieldsFromAllGroups:()=>yn,getGlobalFieldOptions:()=>Tn,getGlobalGroupOptions:()=>Ln,getGlobalPodFieldsFromAllGroups:()=>xn,getGlobalPodGroup:()=>Mn,getGlobalPodGroupFields:()=>Sn,getGlobalPodGroups:()=>kn,getGlobalPodOption:()=>wn,getGlobalPodOptions:()=>vn,getGlobalShowFields:()=>bn,getGroup:()=>_n,getGroupDeleteMessage:()=>Hn,getGroupDeleteMessages:()=>Wn,getGroupDeleteStatus:()=>zn,getGroupDeleteStatuses:()=>Cn,getGroupFields:()=>gn,getGroupSaveMessage:()=>Rn,getGroupSaveMessages:()=>Nn,getGroupSaveStatus:()=>An,getGroupSaveStatuses:()=>qn,getGroups:()=>On,getPodID:()=>hn,getPodName:()=>fn,getPodOption:()=>mn,getPodOptions:()=>pn,getSaveMessage:()=>jn,getSaveStatus:()=>Qn,getState:()=>cn});var t={};function r(e){return r="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(e)}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function o(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nfr,addGroupField:()=>_r,deleteField:()=>Sr,deleteGroup:()=>kr,deletePod:()=>vr,moveGroup:()=>hr,refreshPodData:()=>dr,removeGroup:()=>pr,removeGroupField:()=>gr,resetFieldSaveStatus:()=>or,resetGroupSaveStatus:()=>nr,saveField:()=>Mr,saveGroup:()=>wr,savePod:()=>br,setActiveTab:()=>Jn,setDeleteStatus:()=>er,setFieldDeleteStatus:()=>sr,setFieldSaveStatus:()=>ir,setGroupData:()=>mr,setGroupDeleteStatus:()=>rr,setGroupFieldData:()=>yr,setGroupFields:()=>Or,setGroupSaveStatus:()=>tr,setGroups:()=>cr,setOptionValue:()=>lr,setOptionsValues:()=>ur,setPodName:()=>ar,setSaveStatus:()=>Kn});var u=n(1609),d=n.n(u),c=n(5795),h=n.n(c);const f=window.lodash,p=window.wp.hooks,m=window.wp.data,O=window.wp.plugins;function g(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:L(e)?2:T(e)?3:0}function k(e,t){return 2===w(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function M(e,t){return 2===w(e)?e.get(t):e[t]}function S(e,t,n){var r=w(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function x(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function L(e){return re&&e instanceof Map}function T(e){return ie&&e instanceof Set}function Y(e){return e.o||e.t}function $(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=ce(e);delete t[le];for(var n=de(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=D),Object.freeze(e),t&&v(e,(function(e,t){return P(t,!0)}),!0)),e}function D(){g(2)}function Q(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function j(e){var t=he[e];return t||g(18,e),t}function E(e,t){he[e]||(he[e]=t)}function q(){return te}function A(e,t){t&&(j("Patches"),e.u=[],e.s=[],e.v=t)}function N(e){R(e),e.p.forEach(z),e.p=null}function R(e){e===te&&(te=e.l)}function C(e){return te={p:[],l:te,h:e,m:!0,_:0}}function z(e){var t=e[le];0===t.i||1===t.i?t.j():t.g=!0}function W(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.O||j("ES5").S(t,e,r),r?(n[le].P&&(N(t),g(4)),b(e)&&(e=H(t,e),t.l||X(t,e)),t.u&&j("Patches").M(n[le].t,e,t.u,t.s)):e=H(t,n,[]),N(t),t.u&&t.v(t.u,t.s),e!==se?e:void 0}function H(e,t,n){if(Q(t))return t;var r=t[le];if(!r)return v(t,(function(i,o){return V(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return X(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=$(r.k):r.o,o=i,s=!1;3===r.i&&(o=new Set(i),i.clear(),s=!0),v(o,(function(t,o){return V(e,r,i,t,o,n,s)})),X(e,i,!1),n&&e.u&&j("Patches").N(r,n,e.u,e.s)}return r.o}function V(e,t,n,r,i,o,s){if(y(i)){var a=H(e,i,o&&t&&3!==t.i&&!k(t.R,r)?o.concat(r):void 0);if(S(n,r,a),!y(a))return;e.m=!1}else s&&n.add(i);if(b(i)&&!Q(i)){if(!e.h.D&&e._<1)return;H(e,i),t&&t.A.l||X(e,i)}}function X(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&P(t,n)}function Z(e,t){var n=e[le];return(n?Y(n):e)[t]}function U(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function I(e){e.P||(e.P=!0,e.l&&I(e.l))}function F(e){e.o||(e.o=$(e.t))}function G(e,t,n){var r=L(t)?j("MapSet").F(t,n):T(t)?j("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:q(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=fe;n&&(i=[r],o=pe);var s=Proxy.revocable(i,o),a=s.revoke,l=s.proxy;return r.k=l,r.j=a,l}(t,n):j("ES5").J(t,n);return(n?n.A:q()).p.push(r),r}function B(e){return y(e)||g(22,e),function e(t){if(!b(t))return t;var n,r=t[le],i=w(t);if(r){if(!r.P&&(r.i<4||!j("ES5").K(r)))return r.t;r.I=!0,n=J(t,i),r.I=!1}else n=J(t,i);return v(n,(function(t,i){r&&M(r.t,t)===i||S(n,t,e(i))})),3===i?new Set(n):n}(e)}function J(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return $(e)}function K(){function e(e,t){var n=i[e];return n?n.enumerable=t:i[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[le];return fe.get(t,e)},set:function(t){var n=this[le];fe.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][le];if(!i.P)switch(i.i){case 5:r(i)&&I(i);break;case 4:n(i)&&I(i)}}}function n(e){for(var t=e.t,n=e.k,r=de(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==le){var s=t[o];if(void 0===s&&!k(t,o))return!0;var a=n[o],l=a&&a[le];if(l?l.t!==s:!x(a,s))return!0}}var u=!!t[le];return r.length!==de(t).length+(u?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r1?r-1:0),a=1;a1?r-1:0),o=1;o=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=j("Patches").$;return y(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),Oe=new me;Oe.produce,Oe.produceWithPatches.bind(Oe),Oe.setAutoFreeze.bind(Oe),Oe.setUseProxies.bind(Oe),Oe.applyPatches.bind(Oe),Oe.createDraft.bind(Oe),Oe.finishDraft.bind(Oe);function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ge(e){for(var t=1;t0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1&&void 0!==arguments[1]?arguments[1]:e)},tailGetFrom:function(t){return ut(t,at(e))},createTree:function(t){return lt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:e)},tailCreateTree:function(t){return lt(t,at(e))}}},ct=dt("currentPod"),ht=dt("".concat(ct.path,".name")),ft=dt("".concat(ct.path,".id")),pt=dt("".concat(ct.path,".groups")),mt=dt("global"),Ot=dt("".concat(mt.path,".showFields")),_t=dt("".concat(mt.path,".pod")),gt=dt("".concat(_t.path,".groups")),yt=dt("".concat(mt.path,".group")),bt=dt("".concat(mt.path,".field")),vt=dt("data"),wt=dt("".concat(vt.path,".fieldTypes")),kt=dt("".concat(vt.path,".relatedObjects")),Mt=dt("ui"),St=dt("".concat(Mt.path,".activeTab")),xt=dt("".concat(Mt.path,".saveStatus")),Lt=dt("".concat(Mt.path,".deleteStatus")),Tt=dt("".concat(Mt.path,".saveMessage")),Yt=dt("".concat(Mt.path,".groupSaveStatuses")),$t=dt("".concat(Mt.path,".groupSaveMessages")),Pt=dt("".concat(Mt.path,".groupDeleteStatuses")),Dt=dt("".concat(Mt.path,".groupDeleteMessages")),Qt=dt("".concat(Mt.path,".fieldSaveStatuses")),jt=dt("".concat(Mt.path,".fieldSaveMessages")),Et=dt("".concat(Mt.path,".fieldDeleteStatuses")),qt=dt("".concat(Mt.path,".fieldDeleteMessages")),At="pods/dfv",Nt={NONE:"",DELETING:"DELETING",DELETE_SUCCESS:"DELETE_SUCCESS",DELETE_ERROR:"DELETE_ERROR"},Rt={NONE:"",SAVING:"SAVING",SAVE_SUCCESS:"SAVE_SUCCESS",SAVE_ERROR:"SAVE_ERROR",DELETE_ERROR:"DELETE_ERROR"},Ct="UI/SET_ACTIVE_TAB",zt="UI/SET_SAVE_STATUS",Wt="UI/SET_DELETE_STATUS",Ht="UI/SET_GROUP_SAVE_STATUS",Vt="UI/SET_GROUP_DELETE_STATUS",Xt="UI/SET_FIELD_SAVE_STATUS",Zt="UI/SET_FIELD_DELETE_STATUS",Ut="CURRENT_POD/SET_POD_NAME",It="CURRENT_POD/SET_OPTION_ITEM_VALUE",Ft="CURRENT_POD/SET_OPTIONS_VALUES",Gt="CURRENT_POD/SET_GROUPS",Bt="CURRENT_POD/MOVE_GROUP",Jt="CURRENT_POD/ADD_GROUP",Kt="CURRENT_POD/REMOVE_GROUP",en="CURRENT_POD/SET_GROUP_DATA",tn="CURRENT_POD/SET_GROUP_FIELDS",nn="CURRENT_POD/ADD_GROUP_FIELD",rn="CURRENT_POD/REMOVE_GROUP_FIELD",on="CURRENT_POD/SET_GROUP_FIELD_DATA",sn="CURRENT_POD/API_REQUEST",an={activeTab:"manage-fields",saveStatus:Rt.NONE,saveMessage:null,deleteStatus:Nt.NONE,deleteMessage:null,groupSaveStatuses:{},groupSaveMessages:{},groupDeleteStatuses:{},groupDeleteMessages:{},fieldSaveStatuses:{},fieldSaveMessages:{},fieldDeleteStatuses:{},fieldDeleteMessages:{}};function ln(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function un(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:an,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t.type){case Ct:return un(un({},e),{},{activeTab:t.activeTab});case zt:var n,r=Object.values(Rt).includes(t.saveStatus)?t.saveStatus:an.saveStatus;return un(un({},e),{},{saveStatus:r,saveMessage:(null===(n=t.result)||void 0===n?void 0:n.message)||""});case Wt:var i,s=Object.values(Nt).includes(t.deleteStatus)?t.deleteStatus:an.deleteStatus;return un(un({},e),{},{deleteStatus:s,deleteMessage:(null===(i=t.result)||void 0===i?void 0:i.message)||""});case Ht:var a,l,u,d,c=t.result,h=Object.values(Rt).includes(t.saveStatus)?t.saveStatus:an.saveStatus,p=(null===(a=c.group)||void 0===a?void 0:a.name)&&(null===(l=c.group)||void 0===l?void 0:l.name)!==t.previousGroupName||!1?null===(u=c.group)||void 0===u?void 0:u.name:t.previousGroupName,m=un(un({},(0,f.omit)(e.groupSaveStatuses,[t.previousGroupName])),{},o({},p,h)),O=un(un({},(0,f.omit)(e.groupSaveMessages,[t.previousGroupName])),{},o({},p,(null===(d=t.result)||void 0===d?void 0:d.message)||""));return un(un({},e),{},{groupSaveStatuses:m,groupSaveMessages:O});case Vt:var _,g=Object.values(Nt).includes(t.deleteStatus)?t.deleteStatus:Nt.NONE;return t.name?un(un({},e),{},{groupDeleteStatuses:un(un({},e.groupDeleteStatuses),{},o({},t.name,g)),groupDeleteMessages:un(un({},e.groupDeleteMessages),{},o({},t.name,(null===(_=t.result)||void 0===_?void 0:_.message)||""))}):e;case Xt:var y,b,v,w=t.result,k=Object.values(Rt).includes(t.saveStatus)?t.saveStatus:an.saveStatus,M=(null===(y=w.field)||void 0===y?void 0:y.name)&&(null===(b=w.field)||void 0===b?void 0:b.name)!==t.previousFieldName||!1?w.field.name:t.previousFieldName,S=un(un({},(0,f.omit)(e.fieldSaveStatuses,[t.previousFieldName])),{},o({},M,k)),x=un(un({},(0,f.omit)(e.fieldSaveMessages,[t.previousFieldName])),{},o({},M,(null===(v=t.result)||void 0===v?void 0:v.message)||""));return un(un({},e),{},{fieldSaveStatuses:S,fieldSaveMessages:x});case Zt:var L,T=Object.values(Nt).includes(t.deleteStatus)?t.deleteStatus:Nt.NONE;return t.name?un(un({},e),{},{fieldDeleteStatuses:un(un({},e.fieldDeleteStatuses),{},o({},t.name,T)),fieldDeleteMessages:un(un({},e.fieldDeleteMessages),{},o({},t.name,null===(L=t.result)||void 0===L?void 0:L.message))}):e;default:return e}},currentPod:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t.type){case Ut:return un(un({},e),{},{name:t.name});case It:var n=t.optionName,r=t.value;return un(un({},e),{},o({},n,r));case Ft:return un(un({},e),t.options);case Bt:var i=t.oldIndex,s=t.newIndex;if(null===i||null===s||i===s)return e;if(i>=e.groups.length||0>i)return e;if(s>=e.groups.length||0>s)return e;var a=l(e.groups);return a.splice(s,0,a.splice(i,1)[0]),un(un({},e),{},{groups:a});case Gt:return un(un({},e),{},o({},pt.tailPath,t.groups));case Jt:var u,d;return null!=t&&null!==(u=t.result)&&void 0!==u&&null!==(u=u.group)&&void 0!==u&&u.id?un(un({},e),{},{groups:[].concat(l(e.groups),[null==t||null===(d=t.result)||void 0===d?void 0:d.group])}):e;case Kt:return un(un({},e),{},{groups:e.groups?e.groups.filter((function(e){return e.id!==t.groupID})):void 0});case en:var c=t.result,h=e.groups.map((function(e){var n,r;return e.id!==(null===(n=c.group)||void 0===n?void 0:n.id)?e:un(un({},t.result.group),{},{fields:(null===(r=c.group)||void 0===r?void 0:r.fields)||e.fields||[]})}));return un(un({},e),{},{groups:h});case tn:var f=e.groups.map((function(e){return e.name!==t.groupName?e:un(un({},e),{},{fields:t.fields})}));return un(un({},e),{},{groups:f});case nn:var p;if(null==t||null===(p=t.result)||void 0===p||null===(p=p.field)||void 0===p||!p.id)return e;var m=e.groups.map((function(e){var n;if(e.name!==t.groupName)return e;var r=t.index?t.index:(null===(n=e.fields)||void 0===n?void 0:n.length)||0,i=l(e.fields||[]);return i.splice(r,0,t.result.field),un(un({},e),{},{fields:i})}));return un(un({},e),{},{groups:m});case rn:var O=e.groups.map((function(e){return e.id!==t.groupID?e:un(un({},e),{},{fields:e.fields.filter((function(e){return e.id!==t.fieldID}))})}));return un(un({},e),{},{groups:O});case on:var _=t.result,g=e.groups.map((function(e){if(e.name!==t.groupName)return e;var n=e.fields.map((function(e){return e.id===_.field.id?_.field:e}));return un(un({},e),{},{fields:n})}));return un(un({},e),{},{groups:g});default:return e}},global:function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}},data:function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}});var cn=function(e){return e},hn=function(e){return ft.getFrom(e)},fn=function(e){return ht.getFrom(e)},pn=function(e){return ct.getFrom(e)},mn=function(e,t){return ct.getFrom(e)[t]},On=function(e){return pt.getFrom(e)},_n=function(e,t){return On(e).find((function(e){return t===e.name}))},gn=function(e,t){var n,r;return null!==(n=null===(r=_n(e,t))||void 0===r?void 0:r.fields)&&void 0!==n?n:[]},yn=function(e){return On(e).reduce((function(e,t){return[].concat(l(e),l((null==t?void 0:t.fields)||[]))}),[])},bn=function(e){return Ot.getFrom(e)},vn=function(e){return _t.getFrom(e)},wn=function(e,t){return _t.getFrom(e)[t]},kn=function(e){return gt.getFrom(e)},Mn=function(e,t){return kn(e).find((function(e){return e.name===t}))},Sn=function(e,t){var n;return(null===(n=Mn(e,t))||void 0===n?void 0:n.fields)||[]},xn=function(e){return kn(e).reduce((function(e,t){return[].concat(l(e),l((null==t?void 0:t.fields)||[]))}),[])},Ln=function(e){return yt.getFrom(e)},Tn=function(e){return bt.getFrom(e)},Yn=function(e){return wt.getFrom(e)},$n=function(e,t){return wt.getFrom(e)[t]},Pn=function(e){return kt.getFrom(e)},Dn=function(e){return St.getFrom(e)},Qn=function(e){return xt.getFrom(e)},jn=function(e){return Tt.getFrom(e)},En=function(e){return Lt.getFrom(e)},qn=function(e){return Yt.getFrom(e)},An=function(e,t){return Yt.getFrom(e)[t]},Nn=function(e){return $t.getFrom(e)},Rn=function(e,t){return $t.getFrom(e)[t]},Cn=function(e){return Pt.getFrom(e)},zn=function(e,t){return Pt.getFrom(e)[t]},Wn=function(e){return Dt.getFrom(e)},Hn=function(e,t){return Dt.getFrom(e)[t]},Vn=function(e){return Qt.getFrom(e)},Xn=function(e,t){return Qt.getFrom(e)[t]},Zn=function(e){return jt.getFrom(e)},Un=function(e,t){return jt.getFrom(e)[t]},In=function(e){return Et.getFrom(e)},Fn=function(e,t){return Et.getFrom(e)[t]},Gn=function(e){return qt.getFrom(e)},Bn=function(e,t){return qt.getFrom(e)[t]},Jn=function(e){return{type:Ct,activeTab:e}},Kn=function(e){return function(){return{type:zt,saveStatus:e,result:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}},er=function(e){return function(){return{type:Wt,deleteStatus:e,result:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}},tr=function(e,t){return function(){return{type:Ht,previousGroupName:t,saveStatus:e,result:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}},nr=function(e){return{type:Ht,previousGroupName:e,saveStatus:Rt.NONE,result:{}}},rr=function(e,t){return function(){return{type:Vt,name:t,deleteStatus:e,result:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}},ir=function(e,t){return function(){return{type:Xt,previousFieldName:t,saveStatus:e,result:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}},or=function(e){return{type:Xt,previousFieldName:e,saveStatus:Rt.NONE,result:{}}},sr=function(e,t){return function(){return{type:Zt,name:t,deleteStatus:e,result:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}},ar=function(e){return{type:Ut,name:e}},lr=function(e,t){return{type:It,optionName:e,value:t}},ur=function(){return{type:Ft,options:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}},dr=function(e){return ur((null==e?void 0:e.pod)||{})},cr=function(e){return{type:Gt,groups:e}},hr=function(e,t){return{type:Bt,oldIndex:e,newIndex:t}},fr=function(e){return{type:Jt,result:e}},pr=function(e){return{type:Kt,groupID:e}},mr=function(){return{type:en,result:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}},Or=function(e,t){return{type:tn,groupName:e,fields:t}},_r=function(e,t){return function(n){return{type:nn,groupName:e,index:t,result:n}}},gr=function(e,t){return{type:rn,groupID:e,fieldID:t}},yr=function(e){return function(){return{type:on,groupName:e,result:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}},br=function(e,t){var n=(0,f.omit)(e,["id","label","name","object_type","storage","object_storage_type","type","_locale","groups"]),r={groups:(e.groups||[]).map((function(e){return{group_id:e.id,fields:(e.fields||[]).map((function(e){return e.id}))}}))},i={name:e.name||"",label:e.label||"",args:n,order:r};return{type:sn,payload:{url:t?"/pods/v1/pods/".concat(t):"/pods/v1/pods",method:"POST",data:i,onSuccess:[Kn(Rt.SAVE_SUCCESS),dr],onFailure:Kn(Rt.SAVE_ERROR),onStart:Kn(Rt.SAVING)}}},vr=function(e){return{type:sn,payload:{url:"/pods/v1/pods/".concat(e),method:"DELETE",onSuccess:er(Nt.DELETE_SUCCESS),onFailure:er(Nt.DELETE_ERROR),onStart:er(Nt.DELETING)}}},wr=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5?arguments[5]:void 0;return{type:sn,payload:{url:o?"/pods/v1/groups/".concat(o):"/pods/v1/groups",method:"POST",data:{pod_id:e.toString(),name:n,label:r,args:i},onSuccess:[tr(Rt.SAVE_SUCCESS,t),o?mr:fr],onFailure:tr(Rt.SAVE_ERROR,t),onStart:tr(Rt.SAVING,t)}}},kr=function(e,t){return{type:sn,payload:{url:"/pods/v1/groups/".concat(e),method:"DELETE",onSuccess:rr(Nt.DELETE_SUCCESS,t),onFailure:rr(Nt.DELETE_ERROR,t),onStart:rr(Nt.DELETING,t)}}},Mr=function(e,t,n,r,i,o,s,a,l){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null;return{type:sn,payload:{url:l?"/pods/v1/fields/".concat(l):"/pods/v1/fields",method:"POST",data:{pod_id:e.toString(),group_id:t.toString(),name:i,label:o,type:s,args:a},onSuccess:[ir(Rt.SAVE_SUCCESS,r),l?yr(n):_r(n,u)],onFailure:ir(Rt.SAVE_ERROR,r),onStart:ir(Rt.SAVING,r)}}},Sr=function(e,t){return{type:sn,payload:{url:"/pods/v1/fields/".concat(e),method:"DELETE",onSuccess:sr(Nt.DELETE_SUCCESS,t),onFailure:sr(Nt.DELETE_ERROR,t),onStart:sr(Nt.DELETING,t)}}};function xr(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function Lr(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){xr(o,r,i,s,a,"next",e)}function a(e){xr(o,r,i,s,a,"throw",e)}s(void 0)}))}}const Tr=window.regeneratorRuntime;var Yr=n.n(Tr);const $r=window.wp.apiFetch;var Pr=n.n($r);function Dr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Qr=function(e){return"object"!==r(e)||(Object.entries(e).forEach((function(t){var n=Dr(t,2),r=n[0],i=n[1];"boolean"==typeof i?e[r]=i?1:0:void 0===i&&(e[r]="")})),void 0!==e.args&&Object.entries(e.args).forEach((function(t){var n=Dr(t,2),r=n[0],i=n[1];"boolean"==typeof i?e.args[r]=i?1:0:void 0===i&&(e.args[r]="")}))),e};var jr=sn;const Er=function(e){var t=e.dispatch;return function(e){return function(){var n=Lr(Yr().mark((function n(r){var i,o,s,a,l,u,d,c;return Yr().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e(r),jr===r.type){n.next=3;break}return n.abrupt("return");case 3:return i=r.payload,o=i.url,s=i.method,a=i.data,l=i.onSuccess,u=i.onFailure,(d=i.onStart)&&t(d()),n.prev=5,n.next=8,Pr()({path:o,method:s,parse:!0,data:Qr(a)});case 8:c=n.sent,Array.isArray(l)?l.forEach((function(e){return t(e(c))})):t(l(c)),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(5),Array.isArray(u)?u.forEach((function(e){return t(e(n.t0))})):t(u(n.t0));case 15:case"end":return n.stop()}}),n,null,[[5,12]])})));return function(e){return n.apply(this,arguments)}}()}};function qr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ar(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return r.length?"".concat(r,"-").concat(e,"-").concat(t,"-").concat(n):"".concat(e,"-").concat(t,"-").concat(n)},Rr=function(n,r){var i=Be({reducer:dn,middleware:[Er],preloadedState:n}),o=Object.keys(e).reduce((function(t,n){return t[n]=function(){for(var t=arguments.length,r=new Array(t),o=0;o0&&Ai(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Ai(r.height)/e.offsetHeight||1);var s=(Di(e)?Pi(e):window).visualViewport,a=!Ri()&&n,l=(r.left+(a&&s?s.offsetLeft:0))/i,u=(r.top+(a&&s?s.offsetTop:0))/o,d=r.width/i,c=r.height/o;return{width:d,height:c,top:u,right:l+d,bottom:u+c,left:l,x:l,y:u}}function zi(e){var t=Pi(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Wi(e){return e?(e.nodeName||"").toLowerCase():null}function Hi(e){return((Di(e)?e.ownerDocument:e.document)||window.document).documentElement}function Vi(e){return Ci(Hi(e)).left+zi(e).scrollLeft}function Xi(e){return Pi(e).getComputedStyle(e)}function Zi(e){var t=Xi(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Ui(e,t,n){void 0===n&&(n=!1);var r=Qi(t),i=Qi(t)&&function(e){var t=e.getBoundingClientRect(),n=Ai(t.width)/e.offsetWidth||1,r=Ai(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),o=Hi(t),s=Ci(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==Wi(t)||Zi(o))&&(a=function(e){return e!==Pi(e)&&Qi(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:zi(e);var t}(t)),Qi(t)?((l=Ci(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Vi(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Ii(e){var t=Ci(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Fi(e){return"html"===Wi(e)?e:e.assignedSlot||e.parentNode||(ji(e)?e.host:null)||Hi(e)}function Gi(e){return["html","body","#document"].indexOf(Wi(e))>=0?e.ownerDocument.body:Qi(e)&&Zi(e)?e:Gi(Fi(e))}function Bi(e,t){var n;void 0===t&&(t=[]);var r=Gi(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=Pi(r),s=i?[o].concat(o.visualViewport||[],Zi(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Bi(Fi(s)))}function Ji(e){return["table","td","th"].indexOf(Wi(e))>=0}function Ki(e){return Qi(e)&&"fixed"!==Xi(e).position?e.offsetParent:null}function eo(e){for(var t=Pi(e),n=Ki(e);n&&Ji(n)&&"static"===Xi(n).position;)n=Ki(n);return n&&("html"===Wi(n)||"body"===Wi(n)&&"static"===Xi(n).position)?t:n||function(e){var t=/firefox/i.test(Ni());if(/Trident/i.test(Ni())&&Qi(e)&&"fixed"===Xi(e).position)return null;var n=Fi(e);for(ji(n)&&(n=n.host);Qi(n)&&["html","body"].indexOf(Wi(n))<0;){var r=Xi(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var to="top",no="bottom",ro="right",io="left",oo="auto",so=[to,no,ro,io],ao="start",lo="end",uo="clippingParents",co="viewport",ho="popper",fo="reference",po=so.reduce((function(e,t){return e.concat([t+"-"+ao,t+"-"+lo])}),[]),mo=[].concat(so,[oo]).reduce((function(e,t){return e.concat([t,t+"-"+ao,t+"-"+lo])}),[]),Oo=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function _o(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}function go(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var yo={placement:"bottom",modifiers:[],strategy:"absolute"};function bo(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function Lo(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?Mo(i):null,s=i?So(i):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case to:t={x:a,y:n.y-r.height};break;case no:t={x:a,y:n.y+n.height};break;case ro:t={x:n.x+n.width,y:l};break;case io:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var u=o?xo(o):null;if(null!=u){var d="y"===u?"height":"width";switch(s){case ao:t[u]=t[u]-(n[d]/2-r[d]/2);break;case lo:t[u]=t[u]+(n[d]/2-r[d]/2)}}return t}const To={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Lo({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var Yo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $o(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,c=e.isFixed,h=s.x,f=void 0===h?0:h,p=s.y,m=void 0===p?0:p,O="function"==typeof d?d({x:f,y:m}):{x:f,y:m};f=O.x,m=O.y;var _=s.hasOwnProperty("x"),g=s.hasOwnProperty("y"),y=io,b=to,v=window;if(u){var w=eo(n),k="clientHeight",M="clientWidth";if(w===Pi(n)&&"static"!==Xi(w=Hi(n)).position&&"absolute"===a&&(k="scrollHeight",M="scrollWidth"),i===to||(i===io||i===ro)&&o===lo)b=no,m-=(c&&w===v&&v.visualViewport?v.visualViewport.height:w[k])-r.height,m*=l?1:-1;if(i===io||(i===to||i===no)&&o===lo)y=ro,f-=(c&&w===v&&v.visualViewport?v.visualViewport.width:w[M])-r.width,f*=l?1:-1}var S,x=Object.assign({position:a},u&&Yo),L=!0===d?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Ai(n*i)/i||0,y:Ai(r*i)/i||0}}({x:f,y:m},Pi(n)):{x:f,y:m};return f=L.x,m=L.y,l?Object.assign({},x,((S={})[b]=g?"0":"",S[y]=_?"0":"",S.transform=(v.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",S)):Object.assign({},x,((t={})[b]=g?m+"px":"",t[y]=_?f+"px":"",t.transform="",t))}const Po={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,u={placement:Mo(t.placement),variation:So(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,$o(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,$o(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};const Do={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];Qi(i)&&Wi(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});Qi(r)&&Wi(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};const Qo={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,s=mo.reduce((function(e,n){return e[n]=function(e,t,n){var r=Mo(e),i=[io,to].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[io,ro].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,o),e}),{}),a=s[t.placement],l=a.x,u=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=s}};var jo={left:"right",right:"left",bottom:"top",top:"bottom"};function Eo(e){return e.replace(/left|right|bottom|top/g,(function(e){return jo[e]}))}var qo={start:"end",end:"start"};function Ao(e){return e.replace(/start|end/g,(function(e){return qo[e]}))}function No(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ji(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ro(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Co(e,t,n){return t===co?Ro(function(e,t){var n=Pi(e),r=Hi(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var u=Ri();(u||!u&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+Vi(e),y:l}}(e,n)):Di(t)?function(e,t){var n=Ci(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Ro(function(e){var t,n=Hi(e),r=zi(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=Ei(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Ei(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Vi(e),l=-r.scrollTop;return"rtl"===Xi(i||n).direction&&(a+=Ei(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Hi(e)))}function zo(e,t,n,r){var i="clippingParents"===t?function(e){var t=Bi(Fi(e)),n=["absolute","fixed"].indexOf(Xi(e).position)>=0&&Qi(e)?eo(e):e;return Di(n)?t.filter((function(e){return Di(e)&&No(e,n)&&"body"!==Wi(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce((function(t,n){var i=Co(e,n,r);return t.top=Ei(i.top,t.top),t.right=qi(i.right,t.right),t.bottom=qi(i.bottom,t.bottom),t.left=Ei(i.left,t.left),t}),Co(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Wo(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Ho(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Vo(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,s=void 0===o?e.strategy:o,a=n.boundary,l=void 0===a?uo:a,u=n.rootBoundary,d=void 0===u?co:u,c=n.elementContext,h=void 0===c?ho:c,f=n.altBoundary,p=void 0!==f&&f,m=n.padding,O=void 0===m?0:m,_=Wo("number"!=typeof O?O:Ho(O,so)),g=h===ho?fo:ho,y=e.rects.popper,b=e.elements[p?g:h],v=zo(Di(b)?b:b.contextElement||Hi(e.elements.popper),l,d,s),w=Ci(e.elements.reference),k=Lo({reference:w,element:y,strategy:"absolute",placement:i}),M=Ro(Object.assign({},y,k)),S=h===ho?M:w,x={top:v.top-S.top+_.top,bottom:S.bottom-v.bottom+_.bottom,left:v.left-S.left+_.left,right:S.right-v.right+_.right},L=e.modifiersData.offset;if(h===ho&&L){var T=L[i];Object.keys(x).forEach((function(e){var t=[ro,no].indexOf(e)>=0?1:-1,n=[to,no].indexOf(e)>=0?"y":"x";x[e]+=T[n]*t}))}return x}const Xo={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,u=n.padding,d=n.boundary,c=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=void 0===f||f,m=n.allowedAutoPlacements,O=t.options.placement,_=Mo(O),g=l||(_===O||!p?[Eo(O)]:function(e){if(Mo(e)===oo)return[];var t=Eo(e);return[Ao(e),t,Ao(t)]}(O)),y=[O].concat(g).reduce((function(e,n){return e.concat(Mo(n)===oo?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?mo:l,d=So(r),c=d?a?po:po.filter((function(e){return So(e)===d})):so,h=c.filter((function(e){return u.indexOf(e)>=0}));0===h.length&&(h=c);var f=h.reduce((function(t,n){return t[n]=Vo(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[Mo(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:d,rootBoundary:c,padding:u,flipVariations:p,allowedAutoPlacements:m}):n)}),[]),b=t.rects.reference,v=t.rects.popper,w=new Map,k=!0,M=y[0],S=0;S=0,$=Y?"width":"height",P=Vo(t,{placement:x,boundary:d,rootBoundary:c,altBoundary:h,padding:u}),D=Y?T?ro:io:T?no:to;b[$]>v[$]&&(D=Eo(D));var Q=Eo(D),j=[];if(o&&j.push(P[L]<=0),a&&j.push(P[D]<=0,P[Q]<=0),j.every((function(e){return e}))){M=x,k=!1;break}w.set(x,j)}if(k)for(var E=function(e){var t=y.find((function(t){var n=w.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return M=t,"break"},q=p?3:1;q>0;q--){if("break"===E(q))break}t.placement!==M&&(t.modifiersData[r]._skip=!0,t.placement=M,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Zo(e,t,n){return Ei(e,qi(t,n))}const Uo={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0!==s&&s,l=n.boundary,u=n.rootBoundary,d=n.altBoundary,c=n.padding,h=n.tether,f=void 0===h||h,p=n.tetherOffset,m=void 0===p?0:p,O=Vo(t,{boundary:l,rootBoundary:u,padding:c,altBoundary:d}),_=Mo(t.placement),g=So(t.placement),y=!g,b=xo(_),v="x"===b?"y":"x",w=t.modifiersData.popperOffsets,k=t.rects.reference,M=t.rects.popper,S="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,x="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(w){if(o){var Y,$="y"===b?to:io,P="y"===b?no:ro,D="y"===b?"height":"width",Q=w[b],j=Q+O[$],E=Q-O[P],q=f?-M[D]/2:0,A=g===ao?k[D]:M[D],N=g===ao?-M[D]:-k[D],R=t.elements.arrow,C=f&&R?Ii(R):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},W=z[$],H=z[P],V=Zo(0,k[D],C[D]),X=y?k[D]/2-q-V-W-x.mainAxis:A-V-W-x.mainAxis,Z=y?-k[D]/2+q+V+H+x.mainAxis:N+V+H+x.mainAxis,U=t.elements.arrow&&eo(t.elements.arrow),I=U?"y"===b?U.clientTop||0:U.clientLeft||0:0,F=null!=(Y=null==L?void 0:L[b])?Y:0,G=Q+Z-F,B=Zo(f?qi(j,Q+X-F-I):j,Q,f?Ei(E,G):E);w[b]=B,T[b]=B-Q}if(a){var J,K="x"===b?to:io,ee="x"===b?no:ro,te=w[v],ne="y"===v?"height":"width",re=te+O[K],ie=te-O[ee],oe=-1!==[to,io].indexOf(_),se=null!=(J=null==L?void 0:L[v])?J:0,ae=oe?re:te-k[ne]-M[ne]-se+x.altAxis,le=oe?te+k[ne]+M[ne]-se-x.altAxis:ie,ue=f&&oe?function(e,t,n){var r=Zo(e,t,n);return r>n?n:r}(ae,te,le):Zo(f?ae:re,te,f?le:ie);w[v]=ue,T[v]=ue-te}t.modifiersData[r]=T}},requiresIfExists:["offset"]};const Io={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Mo(n.placement),l=xo(a),u=[io,ro].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(e,t){return Wo("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Ho(e,so))}(i.padding,n),c=Ii(o),h="y"===l?to:io,f="y"===l?no:ro,p=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],m=s[l]-n.rects.reference[l],O=eo(o),_=O?"y"===l?O.clientHeight||0:O.clientWidth||0:0,g=p/2-m/2,y=d[h],b=_-c[u]-d[f],v=_/2-c[u]/2+g,w=Zo(y,v,b),k=l;n.modifiersData[r]=((t={})[k]=w,t.centerOffset=w-v,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&No(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Fo(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Go(e){return[to,ro,no,io].some((function(t){return e[t]>=0}))}const Bo={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Vo(t,{elementContext:"reference"}),a=Vo(t,{altBoundary:!0}),l=Fo(s,r),u=Fo(a,i,o),d=Go(l),c=Go(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:c},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":c})}};var Jo=vo({defaultModifiers:[ko,To,Po,Do,Qo,Xo,Uo,Io,Bo]}),Ko="tippy-content",es="tippy-backdrop",ts="tippy-arrow",ns="tippy-svg-arrow",rs={passive:!0,capture:!0},is=function(){return document.body};function os(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function ss(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function as(e,t){return"function"==typeof e?e.apply(void 0,t):e}function ls(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function us(e){return[].concat(e)}function ds(e,t){-1===e.indexOf(t)&&e.push(t)}function cs(e){return e.split("-")[0]}function hs(e){return[].slice.call(e)}function fs(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function ps(){return document.createElement("div")}function ms(e){return["Element","Fragment"].some((function(t){return ss(e,t)}))}function Os(e){return ss(e,"MouseEvent")}function _s(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function gs(e){return ms(e)?[e]:function(e){return ss(e,"NodeList")}(e)?hs(e):Array.isArray(e)?e:hs(document.querySelectorAll(e))}function ys(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function bs(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function vs(e){var t,n=us(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function ws(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function ks(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var Ms={isTouch:!1},Ss=0;function xs(){Ms.isTouch||(Ms.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ls))}function Ls(){var e=performance.now();e-Ss<20&&(Ms.isTouch=!1,document.removeEventListener("mousemove",Ls)),Ss=e}function Ts(){var e=document.activeElement;if(_s(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Ys=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var $s={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ps=Object.assign({appendTo:is,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},$s,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Ds=Object.keys(Ps);function Qs(e){var t=(e.plugins||[]).reduce((function(t,n){var r,i=n.name,o=n.defaultValue;i&&(t[i]=void 0!==e[i]?e[i]:null!=(r=Ps[i])?r:o);return t}),{});return Object.assign({},e,t)}function js(e,t){var n=Object.assign({},t,{content:as(t.content,[e])},t.ignoreAttributes?{}:function(e,t){var n=(t?Object.keys(Qs(Object.assign({},Ps,{plugins:t}))):Ds).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{});return n}(e,t.plugins));return n.aria=Object.assign({},Ps.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}var Es=function(){return"innerHTML"};function qs(e,t){e[Es()]=t}function As(e){var t=ps();return!0===e?t.className=ts:(t.className=ns,ms(e)?t.appendChild(e):qs(t,e)),t}function Ns(e,t){ms(t.content)?(qs(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?qs(e,t.content):e.textContent=t.content)}function Rs(e){var t=e.firstElementChild,n=hs(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(Ko)})),arrow:n.find((function(e){return e.classList.contains(ts)||e.classList.contains(ns)})),backdrop:n.find((function(e){return e.classList.contains(es)}))}}function Cs(e){var t=ps(),n=ps();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=ps();function i(n,r){var i=Rs(t),o=i.box,s=i.content,a=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Ns(s,e.props),r.arrow?a?n.arrow!==r.arrow&&(o.removeChild(a),o.appendChild(As(r.arrow))):o.appendChild(As(r.arrow)):a&&o.removeChild(a)}return r.className=Ko,r.setAttribute("data-state","hidden"),Ns(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}Cs.$$tippy=!0;var zs=1,Ws=[],Hs=[];function Vs(e,t){var n,r,i,o,s,a,l,u,d=js(e,Object.assign({},Ps,Qs(fs(t)))),c=!1,h=!1,f=!1,p=!1,m=[],O=ls(U,d.interactiveDebounce),_=zs++,g=(u=d.plugins).filter((function(e,t){return u.indexOf(e)===t})),y={id:_,reference:e,popper:ps(),popperInstance:null,props:d,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(i)},setProps:function(t){0;if(y.state.isDestroyed)return;Q("onBeforeUpdate",[y,t]),X();var n=y.props,r=js(e,Object.assign({},n,fs(t),{ignoreAttributes:!0}));y.props=r,V(),n.interactiveDebounce!==r.interactiveDebounce&&(q(),O=ls(U,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?us(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");E(),D(),w&&w(n,r);y.popperInstance&&(B(),K().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));Q("onAfterUpdate",[y,t])},setContent:function(e){y.setProps({content:e})},show:function(){0;var e=y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=Ms.isTouch&&!y.props.touch,i=os(y.props.duration,0,Ps.duration);if(e||t||n||r)return;if(T().hasAttribute("disabled"))return;if(Q("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,L()&&(v.style.visibility="visible");D(),C(),y.state.isMounted||(v.style.transition="none");if(L()){var o=$();ys([o.box,o.content],0)}a=function(){var e;if(y.state.isVisible&&!p){if(p=!0,v.offsetHeight,v.style.transition=y.props.moveTransition,L()&&y.props.animation){var t=$(),n=t.box,r=t.content;ys([n,r],i),bs([n,r],"visible")}j(),E(),ds(Hs,y),null==(e=y.popperInstance)||e.forceUpdate(),Q("onMount",[y]),y.props.animation&&L()&&function(e,t){W(e,t)}(i,(function(){y.state.isShown=!0,Q("onShown",[y])}))}},function(){var e,t=y.props.appendTo,n=T();e=y.props.interactive&&t===is||"parent"===t?n.parentNode:as(t,[n]);e.contains(v)||e.appendChild(v);y.state.isMounted=!0,B(),!1}()},hide:function(){0;var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=os(y.props.duration,1,Ps.duration);if(e||t||n)return;if(Q("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,p=!1,c=!1,L()&&(v.style.visibility="hidden");if(q(),z(),D(!0),L()){var i=$(),o=i.box,s=i.content;y.props.animation&&(ys([o,s],r),bs([o,s],"hidden"))}j(),E(),y.props.animation?L()&&function(e,t){W(e,(function(){!y.state.isVisible&&v.parentNode&&v.parentNode.contains(v)&&t()}))}(r,y.unmount):y.unmount()},hideWithInteractivity:function(e){0;Y().addEventListener("mousemove",O),ds(Ws,O),O(e)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){0;y.state.isVisible&&y.hide();if(!y.state.isMounted)return;J(),K().forEach((function(e){e._tippy.unmount()})),v.parentNode&&v.parentNode.removeChild(v);Hs=Hs.filter((function(e){return e!==y})),y.state.isMounted=!1,Q("onHidden",[y])},destroy:function(){0;if(y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),X(),delete e._tippy,y.state.isDestroyed=!0,Q("onDestroy",[y])}};if(!d.render)return y;var b=d.render(y),v=b.popper,w=b.onUpdate;v.setAttribute("data-tippy-root",""),v.id="tippy-"+y.id,y.popper=v,e._tippy=y,v._tippy=y;var k=g.map((function(e){return e.fn(y)})),M=e.hasAttribute("aria-expanded");return V(),E(),D(),Q("onCreate",[y]),d.showOnCreate&&ee(),v.addEventListener("mouseenter",(function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()})),v.addEventListener("mouseleave",(function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&Y().addEventListener("mousemove",O)})),y;function S(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function x(){return"hold"===S()[0]}function L(){var e;return!(null==(e=y.props.render)||!e.$$tippy)}function T(){return l||e}function Y(){var e=T().parentNode;return e?vs(e):document}function $(){return Rs(v)}function P(e){return y.state.isMounted&&!y.state.isVisible||Ms.isTouch||o&&"focus"===o.type?0:os(y.props.delay,e?0:1,Ps.delay)}function D(e){void 0===e&&(e=!1),v.style.pointerEvents=y.props.interactive&&!e?"":"none",v.style.zIndex=""+y.props.zIndex}function Q(e,t,n){var r;(void 0===n&&(n=!0),k.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=y.props)[e].apply(r,t)}function j(){var t=y.props.aria;if(t.content){var n="aria-"+t.content,r=v.id;us(y.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(y.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function E(){!M&&y.props.aria.expanded&&us(y.props.triggerTarget||e).forEach((function(e){y.props.interactive?e.setAttribute("aria-expanded",y.state.isVisible&&e===T()?"true":"false"):e.removeAttribute("aria-expanded")}))}function q(){Y().removeEventListener("mousemove",O),Ws=Ws.filter((function(e){return e!==O}))}function A(t){if(!Ms.isTouch||!f&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!y.props.interactive||!ks(v,n)){if(us(y.props.triggerTarget||e).some((function(e){return ks(e,n)}))){if(Ms.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else Q("onClickOutside",[y,t]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),h=!0,setTimeout((function(){h=!1})),y.state.isMounted||z())}}}function N(){f=!0}function R(){f=!1}function C(){var e=Y();e.addEventListener("mousedown",A,!0),e.addEventListener("touchend",A,rs),e.addEventListener("touchstart",R,rs),e.addEventListener("touchmove",N,rs)}function z(){var e=Y();e.removeEventListener("mousedown",A,!0),e.removeEventListener("touchend",A,rs),e.removeEventListener("touchstart",R,rs),e.removeEventListener("touchmove",N,rs)}function W(e,t){var n=$().box;function r(e){e.target===n&&(ws(n,"remove",r),t())}if(0===e)return t();ws(n,"remove",s),ws(n,"add",r),s=r}function H(t,n,r){void 0===r&&(r=!1),us(y.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),m.push({node:e,eventType:t,handler:n,options:r})}))}function V(){var e;x()&&(H("touchstart",Z,{passive:!0}),H("touchend",I,{passive:!0})),(e=y.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(H(e,Z),e){case"mouseenter":H("mouseleave",I);break;case"focus":H(Ys?"focusout":"blur",F);break;case"focusin":H("focusout",F)}}))}function X(){m.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),m=[]}function Z(e){var t,n=!1;if(y.state.isEnabled&&!G(e)&&!h){var r="focus"===(null==(t=o)?void 0:t.type);o=e,l=e.currentTarget,E(),!y.state.isVisible&&Os(e)&&Ws.forEach((function(t){return t(e)})),"click"===e.type&&(y.props.trigger.indexOf("mouseenter")<0||c)&&!1!==y.props.hideOnClick&&y.state.isVisible?n=!0:ee(e),"click"===e.type&&(c=!n),n&&!r&&te(e)}}function U(e){var t=e.target,n=T().contains(t)||v.contains(t);if("mousemove"!==e.type||!n){var r=K().concat(v).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:d}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,s=cs(i.placement),a=i.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,u="top"===s?a.bottom.y:0,d="right"===s?a.left.x:0,c="left"===s?a.right.x:0,h=t.top-r+l>o,f=r-t.bottom-u>o,p=t.left-n+d>o,m=n-t.right-c>o;return h||f||p||m}))})(r,e)&&(q(),te(e))}}function I(e){G(e)||y.props.trigger.indexOf("click")>=0&&c||(y.props.interactive?y.hideWithInteractivity(e):te(e))}function F(e){y.props.trigger.indexOf("focusin")<0&&e.target!==T()||y.props.interactive&&e.relatedTarget&&v.contains(e.relatedTarget)||te(e)}function G(e){return!!Ms.isTouch&&x()!==e.type.indexOf("touch")>=0}function B(){J();var t=y.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,s=t.moveTransition,l=L()?Rs(v).arrow:null,u=o?{getBoundingClientRect:o,contextElement:o.contextElement||T()}:e,d={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(L()){var n=$().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},c=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},d];L()&&l&&c.push({name:"arrow",options:{element:l,padding:3}}),c.push.apply(c,(null==n?void 0:n.modifiers)||[]),y.popperInstance=Jo(u,v,Object.assign({},n,{placement:r,onFirstUpdate:a,modifiers:c}))}function J(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function K(){return hs(v.querySelectorAll("[data-tippy-root]"))}function ee(e){y.clearDelayTimeouts(),e&&Q("onTrigger",[y,e]),C();var t=P(!0),r=S(),i=r[0],o=r[1];Ms.isTouch&&"hold"===i&&o&&(t=o),t?n=setTimeout((function(){y.show()}),t):y.show()}function te(e){if(y.clearDelayTimeouts(),Q("onUntrigger",[y,e]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&c)){var t=P(!1);t?r=setTimeout((function(){y.state.isVisible&&y.hide()}),t):i=requestAnimationFrame((function(){y.hide()}))}}else z()}}function Xs(e,t){void 0===t&&(t={});var n=Ps.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",xs,rs),window.addEventListener("blur",Ts);var r=Object.assign({},t,{plugins:n}),i=gs(e).reduce((function(e,t){var n=t&&Vs(t,r);return n&&e.push(n),e}),[]);return ms(e)?i[0]:i}Xs.defaultProps=Ps,Xs.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Ps[t]=e[t]}))},Xs.currentInput=Ms;Object.assign({},Do,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});Xs.setDefaultProps({render:Cs});const Zs=Xs;function Us(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}var Is="undefined"!=typeof window&&"undefined"!=typeof document;function Fs(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function Gs(){return Is&&document.createElement("div")}function Bs(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!Bs(e[n],t[n]))return!1}return!0}return!1}function Js(e){var t=[];return e.forEach((function(e){t.find((function(t){return Bs(e,t)}))||t.push(e)})),t}function Ks(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:Js([].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],(null==(r=t.popperOptions)?void 0:r.modifiers)||[]))})})}var ea=Is?u.useLayoutEffect:u.useEffect;function ta(e){var t=(0,u.useRef)();return t.current||(t.current="function"==typeof e?e():e),t.current}function na(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var ra={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||na(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&na(t,"remove",e.props.className)},onAfterUpdate:r}}};function ia(e){return function(t){var n=t.children,r=t.content,i=t.visible,o=t.singleton,s=t.render,a=t.reference,l=t.disabled,h=void 0!==l&&l,f=t.ignoreAttributes,p=void 0===f||f,m=(t.__source,t.__self,Us(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),O=void 0!==i,_=void 0!==o,g=(0,u.useState)(!1),y=g[0],b=g[1],v=(0,u.useState)({}),w=v[0],k=v[1],M=(0,u.useState)(),S=M[0],x=M[1],L=ta((function(){return{container:Gs(),renders:1}})),T=Object.assign({ignoreAttributes:p},m,{content:L.container});O&&(T.trigger="manual",T.hideOnClick=!1),_&&(h=!0);var Y=T,$=T.plugins||[];s&&(Y=Object.assign({},T,{plugins:_&&null!=o.data?[].concat($,[{fn:function(){return{onTrigger:function(e,t){var n=o.data.children.find((function(e){return e.instance.reference===t.currentTarget}));e.state.$$activeSingletonInstance=n.instance,x(n.content)}}}}]):$,render:function(){return{popper:L.container}}}));var P=[a].concat(n?[n.type]:[]);return ea((function(){var t=a;a&&a.hasOwnProperty("current")&&(t=a.current);var n=e(t||L.ref||Gs(),Object.assign({},Y,{plugins:[ra].concat(T.plugins||[])}));return L.instance=n,h&&n.disable(),i&&n.show(),_&&o.hook({instance:n,content:r,props:Y,setSingletonContent:x}),b(!0),function(){n.destroy(),null==o||o.cleanup(n)}}),P),ea((function(){var e;if(1!==L.renders){var t=L.instance;t.setProps(Ks(t.props,Y)),null==(e=t.popperInstance)||e.forceUpdate(),h?t.disable():t.enable(),O&&(i?t.show():t.hide()),_&&o.hook({instance:t,content:r,props:Y,setSingletonContent:x})}else L.renders++})),ea((function(){var e;if(s){var t=L.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;w.placement===n.placement&&w.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&w.escaped===(null==r?void 0:r.hasPopperEscaped)||k({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[w.placement,w.referenceHidden,w.escaped].concat(P)),d().createElement(d().Fragment,null,n?(0,u.cloneElement)(n,{ref:function(e){L.ref=e,Fs(n.ref,e)}}):null,y&&(0,c.createPortal)(s?s(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(w),S,L.instance):r,L.container))}}var oa=function(e,t){return(0,u.forwardRef)((function(n,r){var i=n.children,o=Us(n,["children"]);return d().createElement(e,Object.assign({},t,o),i?(0,u.cloneElement)(i,{ref:function(e){Fs(r,e),Fs(i.ref,e)}}):null)}))};const sa=oa(ia(Zs)),aa=window.wp.components;var la=n(1002),ua={};ua.styleTagTransform=pi(),ua.setAttributes=di(),ua.insert=li().bind(null,"head"),ua.domAPI=si(),ua.insertStyleElement=hi();ii()(la.A,ua);la.A&&la.A.locals&&la.A.locals;var da=n(7274),ca={};ca.styleTagTransform=pi(),ca.setAttributes=di(),ca.insert=li().bind(null,"head"),ca.domAPI=si(),ca.insertStyleElement=hi();ii()(da.A,ca);da.A&&da.A.locals&&da.A.locals;var ha="/home/runner/work/pods/pods/ui/js/dfv/src/components/help-tooltip.js",fa=void 0,pa=function(e){var t=e.helpText,n=e.helpLink;return d().createElement(sa,{className:"pods-help-tooltip",trigger:"click",zIndex:100001,interactive:!0,content:n?d().createElement("a",{href:n,target:"_blank",rel:"noopener noreferrer",__self:fa,__source:{fileName:ha,lineNumber:24,columnNumber:5}},d().createElement("span",{dangerouslySetInnerHTML:{__html:wi()(t,Si)},__self:fa,__source:{fileName:ha,lineNumber:25,columnNumber:6}}),d().createElement(aa.Dashicon,{icon:"external",__self:fa,__source:{fileName:ha,lineNumber:30,columnNumber:6}})):d().createElement("span",{dangerouslySetInnerHTML:{__html:wi()(t,Si)},__self:fa,__source:{fileName:ha,lineNumber:33,columnNumber:5}}),__self:fa,__source:{fileName:ha,lineNumber:17,columnNumber:3}},d().createElement("span",{tabIndex:"0",role:"button",className:"pods-help-tooltip__icon",__self:fa,__source:{fileName:ha,lineNumber:40,columnNumber:4}},d().createElement(aa.Dashicon,{icon:"editor-help",__self:fa,__source:{fileName:ha,lineNumber:45,columnNumber:5}})))};pa.propTypes={helpText:zr().string.isRequired,helpLink:zr().string};const ma=pa;var Oa=n(4310),_a={};_a.styleTagTransform=pi(),_a.setAttributes=di(),_a.insert=li().bind(null,"head"),_a.domAPI=si(),_a.insertStyleElement=hi();ii()(Oa.A,_a);Oa.A&&Oa.A.locals&&Oa.A.locals;var ga="/home/runner/work/pods/pods/ui/js/dfv/src/components/field-label.js",ya=void 0,ba=function(e){var t=e.label,n=e.required,r=e.htmlFor,i=e.helpTextString,o=e.helpLink;return d().createElement("div",{className:"pods-field-label pods-field-label-".concat(name),__self:ya,__source:{fileName:ga,lineNumber:20,columnNumber:2}},d().createElement("label",{className:"pods-field-label__label",htmlFor:r,__self:ya,__source:{fileName:ga,lineNumber:21,columnNumber:3}},d().createElement("span",{dangerouslySetInnerHTML:{__html:(0,ki.removep)(wi()(t,xi))},__self:ya,__source:{fileName:ga,lineNumber:25,columnNumber:4}}),n&&d().createElement("span",{className:"pods-field-label__required",__self:ya,__source:{fileName:ga,lineNumber:30,columnNumber:20}}," ","*")),i&&d().createElement("span",{className:"pods-field-label__tooltip-wrapper",__self:ya,__source:{fileName:ga,lineNumber:34,columnNumber:4}}," ",d().createElement(ma,{helpText:i,helpLink:o,__self:ya,__source:{fileName:ga,lineNumber:36,columnNumber:5}})))};ba.defaultProps={required:!1,helpTextString:null,helpLink:null},ba.propTypes={label:zr().string.isRequired,htmlFor:zr().string.isRequired,helpTextString:zr().string,helpLink:zr().string};const va=ba;var wa="/home/runner/work/pods/pods/ui/js/dfv/src/components/validation-messages.js",ka=void 0,Ma=function(e){var t=e.messages;return t.length?d().createElement("div",{className:"pods-validation-messages",__self:ka,__source:{fileName:wa,lineNumber:12,columnNumber:3}},t.map((function(e){return d().createElement(aa.Notice,{key:"message",status:"error",isDismissible:!1,politeness:"polite",__self:ka,__source:{fileName:wa,lineNumber:14,columnNumber:5}},e)}))):null};Ma.propTypes={messages:zr().arrayOf(zr().string).isRequired};const Sa=Ma;var xa=n(6154),La=n.n(xa),Ta=function(e){return function(t,n){var r=e.toString().split(t);return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,n),r.join(t)}},Ya=function(e,t){if(!t)return"0";var n=Dr(e.toString().replace(".","").split("e-"),2),r=n[0],i=function(e,t){return Number(e)+2-t}(n[1],r.length),o="".concat("0.".padEnd(i+2,"0")).concat(r);return t?o.substring(0,2)+o.substring(2,t+2):o};const $a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:",";if(null===e||"number"!=typeof e)throw new TypeError("number is not valid");return function(e){return e.toString().includes("e")}(e)?function(e,t,n,r){return function(e){return e.toString().includes("-")}(e)?Ya(e,t):Ta(BigInt(e))(n,r)}(e,t,n,r):function(e,t,n,r){if(!isFinite(e))throw new TypeError("number is not finite number");var i="auto"===t?(""+parseFloat(e)).replace(".",n):parseFloat(e).toFixed(t).replace(".",n);return Ta(i)(n,r)}(e,t,n,r)};var Pa=function(e){var t,n=((null===(t=window)||void 0===t||null===(t=t.podsDFVConfig)||void 0===t||null===(t=t.wp_locale)||void 0===t?void 0:t.number_format)||{}).thousands_sep;switch(e){case"9,999.99":n=",";break;case"9999.99":case"9999,99":n="";break;case"9.999,99":n=".";break;case"9'999.99":n="'";break;case"9 999,99":n=" "}return n},Da=function(e){var t,n=((null===(t=window)||void 0===t||null===(t=t.podsDFVConfig)||void 0===t||null===(t=t.wp_locale)||void 0===t?void 0:t.number_format)||{}).decimal_point;switch(e){case"9,999.99":case"9999.99":case"9'999.99":n=".";break;case"9.999,99":case"9999,99":case"9 999,99":n=","}return n},Qa=function(e,t){if(""===e)return 0;if("number"==typeof e)return e;var n=Pa(t),r=Da(t);return parseFloat(e.split(n).join("").split(r).join("."))},ja=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(""===e||null==e)return"0";var r=Pa(t),i=Da(t),o="string"==typeof e?Qa(e,t):e,s=isNaN(o)?void 0:$a(o,"auto",i,r);if(!n||void 0===s)return s;var a=parseInt(s.split(i).pop(),10);if(0!==a)return s;var l=-1*(parseInt((""+a).length,10)+1);return s.slice(0,l)},Ea=function(e){return null!=e&&""!==e&&(!Array.isArray(e)||e.length>0)},qa=function(e,t){return function(n){if((t&&Array.isArray(n)?n:[n]).some(Ea))return!0;throw(0,Hr.sprintf)((0,Hr.__)("%s is required.","pods"),e)}},Aa=function(e,t,n){return function(r){var i=ja(r,n,!1);if(!i)return!0;var o=Pa(n),s=Da(n),a=i.split(s),l=a[0].replace(new RegExp(o,"g"),""),u=parseInt(e,10)||-1;if(-1!==u&&l.length>u)throw(0,Hr.__)("Exceeded maximum digit length.","pods");var d=a[1]||"",c=parseInt(t,10)||-1;if(-1!==c&&d.length>c)throw(0,Hr.__)("Exceeded maximum decimal length.","pods");return!0}},Na=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return function(r){if(!r&&n)return!0;if(void 0===e||!e.length)return!0;var i=La()("".concat(e[0],"-01-01")),o=La()("".concat(e[e.length-1],"-12-31")),s=La()(r,t);if(!1===s.isValid())throw(0,Hr.__)("Invalid date.","pods");if(!s.isSameOrAfter(i))throw(0,Hr.__)("Date occurs before the valid range.","pods");if(!s.isSameOrBefore(o))throw(0,Hr.__)("Date occurs after the valid range.","pods");return!0}},Ra=function(e){return!!+e};const Ca=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";if(null==e)return"";var n=wi()(e.replace(/\&/g,""),{allowedTags:[],parser:{decodeEntities:!1}});return(0,f.deburr)(n).replace(/[\s\./\\+=]+/g,t).replace(/[^\w\-_]+/g,"").toLowerCase()};const za=function(e){var t=e.type;if(void 0===t)throw new Error("Invalid field config.");return!!["text","website","phone","email","password","paragraph","wysiwyg","datetime","date","time","number","currency","oembed","color"].includes(t)&&Ra((null==e?void 0:e.repeatable)||!1)};var Wa=function(e,t){return"object"===r(e)||"object"===r(t)?JSON.stringify(e)===JSON.stringify(t):("boolean"==typeof e&&(e=e?1:0),"boolean"==typeof t&&(t=t?1:0),isNaN(e)||isNaN(t)||(e=parseFloat(e),t=parseFloat(t)),e.toString().toLowerCase()===t.toString().toLowerCase())},Ha=function e(t,n,i){var o=t.enable_conditional_logic,s=t.conditional_logic,a=t.name;if(!Ra(o))return!0;if("object"!==r(s))return!0;console.debug("Conditional logic: enabled"),console.debug({fieldName:a,conditionalLogic:s,allPodValues:n});var l=s.action,u=s.logic,d=s.rules;if(0===d.length)return"show"===l;var c=function(t){var r=t.compare,o=t.value,s=t.field;if(!r||!s)return!0;var l=void 0;if([s,"pods_meta_"+s,"pods_field_"+s].every((function(e){return void 0===n[e]||(l=n[e],!1)})),void 0===l&&!["EMPTY","NOT EMPTY"].includes(r.toUpperCase()))return console.debug("Conditional logic: no value to test"),console.debug({fieldName:a,fieldNameToTest:s,valueToTest:l,allPodValues:n}),!1;var u=function(e,t,n){if(void 0===e)return console.debug("Conditional logic: rule is undefined"),!1;switch(e=e.toUpperCase().replace("-"," ")){case"LIKE":return n.toString().toLowerCase().includes(t.toString().toLowerCase());case"NOT LIKE":return!n.toString().toLowerCase().includes(t.toString().toLowerCase());case"BEGINS":return n.toString().toLowerCase().startsWith(t.toString().toLowerCase());case"NOT BEGINS":return!n.toString().toLowerCase().startsWith(t.toString().toLowerCase());case"ENDS":return n.toString().toLowerCase().endsWith(t.toString().toLowerCase());case"NOT ENDS":return!n.toString().toLowerCase().endsWith(t.toString().toLowerCase());case"MATCHES":return Array.isArray(n)?n.some((function(e){return Boolean(e.toString().match(t))})):Boolean(n.toString().match(t));case"NOT MATCHES":return Array.isArray(n)?!n.some((function(e){return Boolean(e.toString().match(t))})):!Boolean(n.toString().match(t));case"IN":return!!Array.isArray(t)&&t.some((function(e){return Wa(e,n)}));case"NOT IN":return!!Array.isArray(t)&&!t.some((function(e){return Wa(e,n)}));case"IN VALUES":return!!Array.isArray(n)&&n.some((function(e){return Wa(e,t)}));case"NOT IN VALUES":return!!Array.isArray(n)&&!n.some((function(e){return Wa(e,t)}));case"EMPTY":return Array.isArray(n)?(console.debug("Conditional logic: value to test is an array"),0===n.length):[null,void 0].includes(n)?(console.debug("Conditional logic: value to test is null or undefined"),!0):["0",0].includes(n)?(console.debug("Conditional logic: value to test is '0' or 0"),!1):!Boolean(n);case"NOT EMPTY":return Array.isArray(n)?(console.debug("Conditional logic: value to test is an array"),n.length>0):[null,void 0].includes(n)?(console.debug("Conditional logic: value to test is null or undefined"),!1):["0",0].includes(n)?(console.debug("Conditional logic: value to test is '0' or 0"),!0):Boolean(n);case"=":return Wa(t,n);case"!=":return!Wa(t,n);case"<":return!Array.isArray(t)&&!Array.isArray(n)&&Number(n)":return!Array.isArray(t)&&!Array.isArray(n)&&Number(n)>Number(t);case">=":return!Array.isArray(t)&&!Array.isArray(n)&&Number(n)>=Number(t);default:return console.debug("Conditional logic: rule is unsupported"),console.debug({rule:e,ruleValue:t,valueToTest:n}),!1}}(r,o,l);if(console.debug("Conditional logic: validateConditionalValue doesValueMatch"),console.debug({fieldName:a,fieldNameToTest:s,doesValueMatch:u,compare:r,ruleValue:o,valueToTest:l}),!1===u)return!1;var d=i.get(s);return!d||e(d,n,i)},h=!1;return h="all"===u?d.every(c):d.some(c),"hide"===l&&(h=!h),h};const Va=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map;return Ha(e,t,n)};const Xa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=Dr((0,u.useState)(e),2),r=n[0],i=n[1],o=Dr((0,u.useState)([]),2),s=o[0],a=o[1];(0,u.useEffect)((function(){var e=[];r.forEach((function(n){if(n.condition())try{n.rule(t)}catch(t){"string"==typeof t&&e.push(t)}})),a(e)}),[t]);return[s,function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(e){i((function(t){return[].concat(l(t),[e])}))}))}]};const Za=function(e,t,n){(0,u.useEffect)((function(){if(null!=t&&t.current){var e=t.current.closest(".pods-field__container");e&&(e.style.display=n?"":"none")}}),[e,t,n])};function Ua(){return Ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t[<%- id %>][id]"\n\tdata-name-clean="<%- htmlAttr.name_clean %>-id"\n\tid="<%- htmlAttr.id %>-<%- id %>-id"\n\tclass="<%- htmlAttr.class %>"\n\ttype="hidden"\n\tvalue="<%- id %>" />\n\n'),className:"pods-dfv-list-item",ui:{dragHandle:".pods-dfv-list-handle",editLink:".pods-dfv-list-edit-link",viewLink:".pods-dfv-list-link",downloadLink:".pods-dfv-list-download",removeButton:".pods-dfv-list-remove",itemName:".pods-dfv-list-name"},triggers:{"click @ui.removeButton":"remove:file:click"}}),gl=hl.extend({childViewEventPrefix:!1,tagName:"ul",className:"pods-dfv-list",childView:_l,childViewTriggers:{"remove:file:click":"childview:remove:file:click"},onAttach:function(){var e=this.options.fieldModel.get("fieldConfig"),t="y";1!==parseInt(e.file_limit,10)&&("tiles"===e.file_field_template&&(t=""),this.$el.sortable({containment:"parent",axis:t,scrollSensitivity:40,tolerance:"pointer",opacity:.6}))}}),yl=fl.extend({childViewEventPrefix:!1,tagName:"div",template:_.template('<%= fieldConfig.file_add_button %>'),ui:{addButton:".pods-dfv-list-add"},triggers:{"click @ui.addButton":"childview:add:file:click"}}),bl=PodsMn.Object.extend({constructor:function(e){this.browseButton=e.browseButton,this.uiRegion=e.uiRegion,this.fieldConfig=e.fieldConfig,this.fileCollection=e.fileCollection,PodsMn.Object.call(this,e)}}),vl=Backbone.Model.extend({defaults:{id:0,filename:"",progress:0,errorMsg:""}}),wl=PodsMn.View.extend({model:vl,tagName:"li",template:_.template('\n<% if ( \'\' !== errorMsg ) { %>\n\t<%- errorMsg %>
\n<% } %>\n'),attributes:function(){return{class:"pods-dfv-list-item",id:this.model.get("id")}},modelEvents:{change:"onModelChanged"},onModelChanged:function(){this.render()}}),kl=PodsMn.CollectionView.extend({tagName:"ul",className:"pods-dfv-list pods-dfv-list-queue",childView:wl}),Ml=bl.extend({plupload:{},fileUploader:"plupload",pendingModels:[],pendingFiles:[],initialize:function(){this.fieldConfig.plupload_init.browse_button=this.browseButton[0],this.plupload=new plupload.Uploader(this.fieldConfig.plupload_init),this.plupload.init(),this.plupload.bind("FilesAdded",this.onFilesAdded,this),this.plupload.bind("UploadProgress",this.onUploadProgress,this),this.plupload.bind("FileUploaded",this.onFileUploaded,this),this.plupload.bind("UploadComplete",this.onUploadComplete,this),this.pendingFiles=[],this.pendingModels=[]},onFilesAdded:function(e,t){var n,r,i,o=new Backbone.Collection,s=parseInt(null!==(n=null===(r=this.fieldConfig)||void 0===r?void 0:r.file_limit)&&void 0!==n?n:0,10);if(0"===n.response.substr(0,3))s=s.replace(/(<([^>]+)>)/gi,""),window.console&&console.debug(s),o.set({progress:0,errorMsg:s});else{if("object"!==r(i=null!==(i=s.match(/{.*}$/))&&0 \n