@zydon/common 1.0.51 → 1.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts.map +1 -1
- package/dist/components/Editor/index.d.ts.map +1 -1
- package/dist/components/hook-form/Editor/index.d.ts.map +1 -1
- package/dist/{features-a9a8ac2f.js → features-91632cd5.js} +1 -1
- package/dist/{index-981adb77.js → index-273bb5a0.js} +322 -322
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -181,7 +181,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),I=U,M=Q),$===void 0&&(
|
|
|
181
181
|
`),te}function Ie(le,te){if(P(le)&&le.nextElementSibling!=null&&!q(te,`
|
|
182
182
|
|
|
183
183
|
`)){var ge=le.offsetHeight+parseFloat(Y(le).marginTop)+parseFloat(Y(le).marginBottom);le.nextElementSibling.offsetTop>le.offsetTop+ge*1.5&&te.insert(`
|
|
184
|
-
`)}return te}function qe(le,te){var ge={},_e=le.style||{};return _e.fontStyle&&Y(le).fontStyle==="italic"&&(ge.italic=!0),_e.fontWeight&&(Y(le).fontWeight.startsWith("bold")||parseInt(Y(le).fontWeight)>=700)&&(ge.bold=!0),Object.keys(ge).length>0&&(te=B(te,ge)),parseFloat(_e.textIndent||0)>0&&(te=new d.default().insert(" ").concat(te)),te}function Ye(le,te){var ge=le.data;if(le.parentNode.tagName==="O:P")return te.insert(ge.trim());if(ge.trim().length===0&&le.parentNode.classList.contains("ql-clipboard"))return te;if(!Y(le.parentNode).whiteSpace.startsWith("pre")){var _e=function(Me,ce){return ce=ce.replace(/[^\u00a0]/g,""),ce.length<1&&Me?" ":ce};ge=ge.replace(/\r\n/g," ").replace(/\n/g," "),ge=ge.replace(/\s\s+/g,_e.bind(_e,!0)),(le.previousSibling==null&&P(le.parentNode)||le.previousSibling!=null&&P(le.previousSibling))&&(ge=ge.replace(/^\s+/,_e.bind(_e,!1))),(le.nextSibling==null&&P(le.parentNode)||le.nextSibling!=null&&P(le.nextSibling))&&(ge=ge.replace(/\s+$/,_e.bind(_e,!1)))}return te.insert(ge)}r.default=k,r.matchAttributor=W,r.matchBlot=J,r.matchNewline=pe,r.matchSpacing=Ie,r.matchText=Ye},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function m(_,g){for(var h=0;h<g.length;h++){var E=g[h];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,g,h){return g&&m(_.prototype,g),h&&m(_,h),_}}(),o=function m(_,g,h){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,g);if(E===void 0){var v=Object.getPrototypeOf(_);return v===null?void 0:m(v,g,h)}else{if("value"in E)return E.value;var b=E.get;return b===void 0?void 0:b.call(h)}},s=i(6),l=c(s);function c(m){return m&&m.__esModule?m:{default:m}}function u(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")}function d(m,_){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:m}function p(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(m,_):m.__proto__=_)}var f=function(m){p(_,m);function _(){return u(this,_),d(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return a(_,[{key:"optimize",value:function(h){o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"optimize",this).call(this,h),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),_}(l.default);f.blotName="bold",f.tagName=["STRONG","B"],r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var a=function(){function R(w,D){var L=[],F=!0,H=!1,U=void 0;try{for(var Q=w[Symbol.iterator](),$;!(F=($=Q.next()).done)&&(L.push($.value),!(D&&L.length===D));F=!0);}catch(M){H=!0,U=M}finally{try{!F&&Q.return&&Q.return()}finally{if(H)throw U}}return L}return function(w,D){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return R(w,D);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function R(w,D){for(var L=0;L<D.length;L++){var F=D[L];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(w,F.key,F)}}return function(w,D,L){return D&&R(w.prototype,D),L&&R(w,L),w}}(),s=i(2),l=h(s),c=i(0),u=h(c),d=i(5),p=h(d),f=i(10),m=h(f),_=i(9),g=h(_);function h(R){return R&&R.__esModule?R:{default:R}}function E(R,w,D){return w in R?Object.defineProperty(R,w,{value:D,enumerable:!0,configurable:!0,writable:!0}):R[w]=D,R}function v(R,w){if(!(R instanceof w))throw new TypeError("Cannot call a class as a function")}function b(R,w){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:R}function S(R,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);R.prototype=Object.create(w&&w.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(R,w):R.__proto__=w)}var O=(0,m.default)("quill:toolbar"),y=function(R){S(w,R);function w(D,L){v(this,w);var F=b(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,D,L));if(Array.isArray(F.options.container)){var H=document.createElement("div");x(H,F.options.container),D.container.parentNode.insertBefore(H,D.container),F.container=H}else typeof F.options.container=="string"?F.container=document.querySelector(F.options.container):F.container=F.options.container;if(!(F.container instanceof HTMLElement)){var U;return U=O.error("Container required for toolbar",F.options),b(F,U)}return F.container.classList.add("ql-toolbar"),F.controls=[],F.handlers={},Object.keys(F.options.handlers).forEach(function(Q){F.addHandler(Q,F.options.handlers[Q])}),[].forEach.call(F.container.querySelectorAll("button, select"),function(Q){F.attach(Q)}),F.quill.on(p.default.events.EDITOR_CHANGE,function(Q,$){Q===p.default.events.SELECTION_CHANGE&&F.update($)}),F.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){var Q=F.quill.selection.getRange(),$=a(Q,1),M=$[0];F.update(M)}),F}return o(w,[{key:"addHandler",value:function(L,F){this.handlers[L]=F}},{key:"attach",value:function(L){var F=this,H=[].find.call(L.classList,function(Q){return Q.indexOf("ql-")===0});if(H){if(H=H.slice(3),L.tagName==="BUTTON"&&L.setAttribute("type","button"),this.handlers[H]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[H]==null){O.warn("ignoring attaching to disabled format",H,L);return}if(u.default.query(H)==null){O.warn("ignoring attaching to nonexistent format",H,L);return}}var U=L.tagName==="SELECT"?"change":"click";L.addEventListener(U,function(Q){var $=void 0;if(L.tagName==="SELECT"){if(L.selectedIndex<0)return;var M=L.options[L.selectedIndex];M.hasAttribute("selected")?$=!1:$=M.value||!1}else L.classList.contains("ql-active")?$=!1:$=L.value||!L.hasAttribute("value"),Q.preventDefault();F.quill.focus();var I=F.quill.selection.getRange(),k=a(I,1),B=k[0];if(F.handlers[H]!=null)F.handlers[H].call(F,$);else if(u.default.query(H).prototype instanceof u.default.Embed){if($=prompt("Enter "+H),!$)return;F.quill.updateContents(new l.default().retain(B.index).delete(B.length).insert(E({},H,$)),p.default.sources.USER)}else F.quill.format(H,$,p.default.sources.USER);F.update(B)}),this.controls.push([H,L])}}},{key:"update",value:function(L){var F=L==null?{}:this.quill.getFormat(L);this.controls.forEach(function(H){var U=a(H,2),Q=U[0],$=U[1];if($.tagName==="SELECT"){var M=void 0;if(L==null)M=null;else if(F[Q]==null)M=$.querySelector("option[selected]");else if(!Array.isArray(F[Q])){var I=F[Q];typeof I=="string"&&(I=I.replace(/\"/g,'\\"')),M=$.querySelector('option[value="'+I+'"]')}M==null?($.value="",$.selectedIndex=-1):M.selected=!0}else if(L==null)$.classList.remove("ql-active");else if($.hasAttribute("value")){var k=F[Q]===$.getAttribute("value")||F[Q]!=null&&F[Q].toString()===$.getAttribute("value")||F[Q]==null&&!$.getAttribute("value");$.classList.toggle("ql-active",k)}else $.classList.toggle("ql-active",F[Q]!=null)})}}]),w}(g.default);y.DEFAULTS={};function T(R,w,D){var L=document.createElement("button");L.setAttribute("type","button"),L.classList.add("ql-"+w),D!=null&&(L.value=D),R.appendChild(L)}function x(R,w){Array.isArray(w[0])||(w=[w]),w.forEach(function(D){var L=document.createElement("span");L.classList.add("ql-formats"),D.forEach(function(F){if(typeof F=="string")T(L,F);else{var H=Object.keys(F)[0],U=F[H];Array.isArray(U)?N(L,H,U):T(L,H,U)}}),R.appendChild(L)})}function N(R,w,D){var L=document.createElement("select");L.classList.add("ql-"+w),D.forEach(function(F){var H=document.createElement("option");F!==!1?H.setAttribute("value",F):H.setAttribute("selected","selected"),L.appendChild(H)}),R.appendChild(L)}y.DEFAULTS={container:null,handlers:{clean:function(){var w=this,D=this.quill.getSelection();if(D!=null)if(D.length==0){var L=this.quill.getFormat();Object.keys(L).forEach(function(F){u.default.query(F,u.default.Scope.INLINE)!=null&&w.quill.format(F,!1)})}else this.quill.removeFormat(D,p.default.sources.USER)},direction:function(w){var D=this.quill.getFormat().align;w==="rtl"&&D==null?this.quill.format("align","right",p.default.sources.USER):!w&&D==="right"&&this.quill.format("align",!1,p.default.sources.USER),this.quill.format("direction",w,p.default.sources.USER)},indent:function(w){var D=this.quill.getSelection(),L=this.quill.getFormat(D),F=parseInt(L.indent||0);if(w==="+1"||w==="-1"){var H=w==="+1"?1:-1;L.direction==="rtl"&&(H*=-1),this.quill.format("indent",F+H,p.default.sources.USER)}},link:function(w){w===!0&&(w=prompt("Enter link URL:")),this.quill.format("link",w,p.default.sources.USER)},list:function(w){var D=this.quill.getSelection(),L=this.quill.getFormat(D);w==="check"?L.list==="checked"||L.list==="unchecked"?this.quill.format("list",!1,p.default.sources.USER):this.quill.format("list","unchecked",p.default.sources.USER):this.quill.format("list",w,p.default.sources.USER)}}},r.default=y,r.addControls=x},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function m(_,g){for(var h=0;h<g.length;h++){var E=g[h];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,g,h){return g&&m(_.prototype,g),h&&m(_,h),_}}(),o=function m(_,g,h){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,g);if(E===void 0){var v=Object.getPrototypeOf(_);return v===null?void 0:m(v,g,h)}else{if("value"in E)return E.value;var b=E.get;return b===void 0?void 0:b.call(h)}},s=i(28),l=c(s);function c(m){return m&&m.__esModule?m:{default:m}}function u(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")}function d(m,_){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:m}function p(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(m,_):m.__proto__=_)}var f=function(m){p(_,m);function _(g,h){u(this,_);var E=d(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,g));return E.label.innerHTML=h,E.container.classList.add("ql-color-picker"),[].slice.call(E.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(v){v.classList.add("ql-primary")}),E}return a(_,[{key:"buildItem",value:function(h){var E=o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"buildItem",this).call(this,h);return E.style.backgroundColor=h.getAttribute("value")||"",E}},{key:"selectItem",value:function(h,E){o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"selectItem",this).call(this,h,E);var v=this.label.querySelector(".ql-color-label"),b=h&&h.getAttribute("data-value")||"";v&&(v.tagName==="line"?v.style.stroke=b:v.style.fill=b)}}]),_}(l.default);r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function m(_,g){for(var h=0;h<g.length;h++){var E=g[h];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,g,h){return g&&m(_.prototype,g),h&&m(_,h),_}}(),o=function m(_,g,h){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,g);if(E===void 0){var v=Object.getPrototypeOf(_);return v===null?void 0:m(v,g,h)}else{if("value"in E)return E.value;var b=E.get;return b===void 0?void 0:b.call(h)}},s=i(28),l=c(s);function c(m){return m&&m.__esModule?m:{default:m}}function u(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")}function d(m,_){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:m}function p(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(m,_):m.__proto__=_)}var f=function(m){p(_,m);function _(g,h){u(this,_);var E=d(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,g));return E.container.classList.add("ql-icon-picker"),[].forEach.call(E.container.querySelectorAll(".ql-picker-item"),function(v){v.innerHTML=h[v.getAttribute("data-value")||""]}),E.defaultItem=E.container.querySelector(".ql-selected"),E.selectItem(E.defaultItem),E}return a(_,[{key:"selectItem",value:function(h,E){o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"selectItem",this).call(this,h,E),h=h||this.defaultItem,this.label.innerHTML=h.innerHTML}}]),_}(l.default);r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function l(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}return function(c,u,d){return u&&l(c.prototype,u),d&&l(c,d),c}}();function o(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}var s=function(){function l(c,u){var d=this;o(this,l),this.quill=c,this.boundsContainer=u||document.body,this.root=c.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){d.root.style.marginTop=-1*d.quill.root.scrollTop+"px"}),this.hide()}return a(l,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(u){var d=u.left+u.width/2-this.root.offsetWidth/2,p=u.bottom+this.quill.root.scrollTop;this.root.style.left=d+"px",this.root.style.top=p+"px",this.root.classList.remove("ql-flip");var f=this.boundsContainer.getBoundingClientRect(),m=this.root.getBoundingClientRect(),_=0;if(m.right>f.right&&(_=f.right-m.right,this.root.style.left=d+_+"px"),m.left<f.left&&(_=f.left-m.left,this.root.style.left=d+_+"px"),m.bottom>f.bottom){var g=m.bottom-m.top,h=u.bottom-u.top+g;this.root.style.top=p-h+"px",this.root.classList.add("ql-flip")}return _}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),l}();r.default=s},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function N(R,w){var D=[],L=!0,F=!1,H=void 0;try{for(var U=R[Symbol.iterator](),Q;!(L=(Q=U.next()).done)&&(D.push(Q.value),!(w&&D.length===w));L=!0);}catch($){F=!0,H=$}finally{try{!L&&U.return&&U.return()}finally{if(F)throw H}}return D}return function(R,w){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return N(R,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function N(R,w,D){R===null&&(R=Function.prototype);var L=Object.getOwnPropertyDescriptor(R,w);if(L===void 0){var F=Object.getPrototypeOf(R);return F===null?void 0:N(F,w,D)}else{if("value"in L)return L.value;var H=L.get;return H===void 0?void 0:H.call(D)}},s=function(){function N(R,w){for(var D=0;D<w.length;D++){var L=w[D];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(R,L.key,L)}}return function(R,w,D){return w&&N(R.prototype,w),D&&N(R,D),R}}(),l=i(3),c=v(l),u=i(8),d=v(u),p=i(43),f=v(p),m=i(27),_=v(m),g=i(15),h=i(41),E=v(h);function v(N){return N&&N.__esModule?N:{default:N}}function b(N,R){if(!(N instanceof R))throw new TypeError("Cannot call a class as a function")}function S(N,R){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:N}function O(N,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);N.prototype=Object.create(R&&R.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(N,R):N.__proto__=R)}var y=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],T=function(N){O(R,N);function R(w,D){b(this,R),D.modules.toolbar!=null&&D.modules.toolbar.container==null&&(D.modules.toolbar.container=y);var L=S(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,w,D));return L.quill.container.classList.add("ql-snow"),L}return s(R,[{key:"extendToolbar",value:function(D){D.container.classList.add("ql-snow"),this.buildButtons([].slice.call(D.container.querySelectorAll("button")),E.default),this.buildPickers([].slice.call(D.container.querySelectorAll("select")),E.default),this.tooltip=new x(this.quill,this.options.bounds),D.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(L,F){D.handlers.link.call(D,!F.format.link)})}}]),R}(f.default);T.DEFAULTS=(0,c.default)(!0,{},f.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(R){if(R){var w=this.quill.getSelection();if(w==null||w.length==0)return;var D=this.quill.getText(w);/^\S+@\S+\.\S+$/.test(D)&&D.indexOf("mailto:")!==0&&(D="mailto:"+D);var L=this.quill.theme.tooltip;L.edit("link",D)}else this.quill.format("link",!1)}}}}});var x=function(N){O(R,N);function R(w,D){b(this,R);var L=S(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,w,D));return L.preview=L.root.querySelector("a.ql-preview"),L}return s(R,[{key:"listen",value:function(){var D=this;o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(L){D.root.classList.contains("ql-editing")?D.save():D.edit("link",D.preview.textContent),L.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(L){if(D.linkRange!=null){var F=D.linkRange;D.restoreFocus(),D.quill.formatText(F,"link",!1,d.default.sources.USER),delete D.linkRange}L.preventDefault(),D.hide()}),this.quill.on(d.default.events.SELECTION_CHANGE,function(L,F,H){if(L!=null){if(L.length===0&&H===d.default.sources.USER){var U=D.quill.scroll.descendant(_.default,L.index),Q=a(U,2),$=Q[0],M=Q[1];if($!=null){D.linkRange=new g.Range(L.index-M,$.length());var I=_.default.formats($.domNode);D.preview.textContent=I,D.preview.setAttribute("href",I),D.show(),D.position(D.quill.getBounds(D.linkRange));return}}else delete D.linkRange;D.hide()}})}},{key:"show",value:function(){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),R}(p.BaseTooltip);x.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),r.default=T},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(29),o=ae(a),s=i(36),l=i(38),c=i(64),u=i(65),d=ae(u),p=i(66),f=ae(p),m=i(67),_=ae(m),g=i(37),h=i(26),E=i(39),v=i(40),b=i(56),S=ae(b),O=i(68),y=ae(O),T=i(27),x=ae(T),N=i(69),R=ae(N),w=i(70),D=ae(w),L=i(71),F=ae(L),H=i(72),U=ae(H),Q=i(73),$=ae(Q),M=i(13),I=ae(M),k=i(74),B=ae(k),Y=i(75),q=ae(Y),P=i(57),G=ae(P),z=i(41),W=ae(z),J=i(28),se=ae(J),ne=i(59),he=ae(ne),pe=i(60),Ie=ae(pe),qe=i(61),Ye=ae(qe),le=i(108),te=ae(le),ge=i(62),_e=ae(ge);function ae(Me){return Me&&Me.__esModule?Me:{default:Me}}o.default.register({"attributors/attribute/direction":l.DirectionAttribute,"attributors/class/align":s.AlignClass,"attributors/class/background":g.BackgroundClass,"attributors/class/color":h.ColorClass,"attributors/class/direction":l.DirectionClass,"attributors/class/font":E.FontClass,"attributors/class/size":v.SizeClass,"attributors/style/align":s.AlignStyle,"attributors/style/background":g.BackgroundStyle,"attributors/style/color":h.ColorStyle,"attributors/style/direction":l.DirectionStyle,"attributors/style/font":E.FontStyle,"attributors/style/size":v.SizeStyle},!0),o.default.register({"formats/align":s.AlignClass,"formats/direction":l.DirectionClass,"formats/indent":c.IndentClass,"formats/background":g.BackgroundStyle,"formats/color":h.ColorStyle,"formats/font":E.FontClass,"formats/size":v.SizeClass,"formats/blockquote":d.default,"formats/code-block":I.default,"formats/header":f.default,"formats/list":_.default,"formats/bold":S.default,"formats/code":M.Code,"formats/italic":y.default,"formats/link":x.default,"formats/script":R.default,"formats/strike":D.default,"formats/underline":F.default,"formats/image":U.default,"formats/video":$.default,"formats/list/item":m.ListItem,"modules/formula":B.default,"modules/syntax":q.default,"modules/toolbar":G.default,"themes/bubble":te.default,"themes/snow":_e.default,"ui/icons":W.default,"ui/picker":se.default,"ui/icon-picker":Ie.default,"ui/color-picker":he.default,"ui/tooltip":Ye.default},!0),r.default=o.default},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var a=function(){function _(g,h){for(var E=0;E<h.length;E++){var v=h[E];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,v.key,v)}}return function(g,h,E){return h&&_(g.prototype,h),E&&_(g,E),g}}(),o=function _(g,h,E){g===null&&(g=Function.prototype);var v=Object.getOwnPropertyDescriptor(g,h);if(v===void 0){var b=Object.getPrototypeOf(g);return b===null?void 0:_(b,h,E)}else{if("value"in v)return v.value;var S=v.get;return S===void 0?void 0:S.call(E)}},s=i(0),l=c(s);function c(_){return _&&_.__esModule?_:{default:_}}function u(_,g){if(!(_ instanceof g))throw new TypeError("Cannot call a class as a function")}function d(_,g){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:_}function p(_,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);_.prototype=Object.create(g&&g.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(_,g):_.__proto__=g)}var f=function(_){p(g,_);function g(){return u(this,g),d(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return a(g,[{key:"add",value:function(E,v){if(v==="+1"||v==="-1"){var b=this.value(E)||0;v=v==="+1"?b+1:b-1}return v===0?(this.remove(E),!0):o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"add",this).call(this,E,v)}},{key:"canAdd",value:function(E,v){return o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"canAdd",this).call(this,E,v)||o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"canAdd",this).call(this,E,parseInt(v))}},{key:"value",value:function(E){return parseInt(o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"value",this).call(this,E))||void 0}}]),g}(l.default.Attributor.Class),m=new f("indent","ql-indent",{scope:l.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=m},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(4),o=s(a);function s(p){return p&&p.__esModule?p:{default:p}}function l(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}function c(p,f){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:p}function u(p,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);p.prototype=Object.create(f&&f.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(p,f):p.__proto__=f)}var d=function(p){u(f,p);function f(){return l(this,f),c(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);d.blotName="blockquote",d.tagName="blockquote",r.default=d},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function f(m,_){for(var g=0;g<_.length;g++){var h=_[g];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(m,h.key,h)}}return function(m,_,g){return _&&f(m.prototype,_),g&&f(m,g),m}}(),o=i(4),s=l(o);function l(f){return f&&f.__esModule?f:{default:f}}function c(f,m){if(!(f instanceof m))throw new TypeError("Cannot call a class as a function")}function u(f,m){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:f}function d(f,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);f.prototype=Object.create(m&&m.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(f,m):f.__proto__=m)}var p=function(f){d(m,f);function m(){return c(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,null,[{key:"formats",value:function(g){return this.tagName.indexOf(g.tagName)+1}}]),m}(s.default);p.blotName="header",p.tagName=["H1","H2","H3","H4","H5","H6"],r.default=p},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var a=function(){function b(S,O){for(var y=0;y<O.length;y++){var T=O[y];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(S,T.key,T)}}return function(S,O,y){return O&&b(S.prototype,O),y&&b(S,y),S}}(),o=function b(S,O,y){S===null&&(S=Function.prototype);var T=Object.getOwnPropertyDescriptor(S,O);if(T===void 0){var x=Object.getPrototypeOf(S);return x===null?void 0:b(x,O,y)}else{if("value"in T)return T.value;var N=T.get;return N===void 0?void 0:N.call(y)}},s=i(0),l=f(s),c=i(4),u=f(c),d=i(25),p=f(d);function f(b){return b&&b.__esModule?b:{default:b}}function m(b,S,O){return S in b?Object.defineProperty(b,S,{value:O,enumerable:!0,configurable:!0,writable:!0}):b[S]=O,b}function _(b,S){if(!(b instanceof S))throw new TypeError("Cannot call a class as a function")}function g(b,S){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:b}function h(b,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);b.prototype=Object.create(S&&S.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(b,S):b.__proto__=S)}var E=function(b){h(S,b);function S(){return _(this,S),g(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return a(S,[{key:"format",value:function(y,T){y===v.blotName&&!T?this.replaceWith(l.default.create(this.statics.scope)):o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"format",this).call(this,y,T)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(y,T){return this.parent.isolate(this.offset(this.parent),this.length()),y===this.parent.statics.blotName?(this.parent.replaceWith(y,T),this):(this.parent.unwrap(),o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replaceWith",this).call(this,y,T))}}],[{key:"formats",value:function(y){return y.tagName===this.tagName?void 0:o(S.__proto__||Object.getPrototypeOf(S),"formats",this).call(this,y)}}]),S}(u.default);E.blotName="list-item",E.tagName="LI";var v=function(b){h(S,b),a(S,null,[{key:"create",value:function(y){var T=y==="ordered"?"OL":"UL",x=o(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,T);return(y==="checked"||y==="unchecked")&&x.setAttribute("data-checked",y==="checked"),x}},{key:"formats",value:function(y){if(y.tagName==="OL")return"ordered";if(y.tagName==="UL")return y.hasAttribute("data-checked")?y.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function S(O){_(this,S);var y=g(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,O)),T=function(N){if(N.target.parentNode===O){var R=y.statics.formats(O),w=l.default.find(N.target);R==="checked"?w.format("list","unchecked"):R==="unchecked"&&w.format("list","checked")}};return O.addEventListener("touchstart",T),O.addEventListener("mousedown",T),y}return a(S,[{key:"format",value:function(y,T){this.children.length>0&&this.children.tail.format(y,T)}},{key:"formats",value:function(){return m({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(y,T){if(y instanceof E)o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertBefore",this).call(this,y,T);else{var x=T==null?this.length():T.offset(this),N=this.split(x);N.parent.insertBefore(y,N)}}},{key:"optimize",value:function(y){o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"optimize",this).call(this,y);var T=this.next;T!=null&&T.prev===this&&T.statics.blotName===this.statics.blotName&&T.domNode.tagName===this.domNode.tagName&&T.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(T.moveChildren(this),T.remove())}},{key:"replace",value:function(y){if(y.statics.blotName!==this.statics.blotName){var T=l.default.create(this.statics.defaultChild);y.moveChildren(T),this.appendChild(T)}o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replace",this).call(this,y)}}]),S}(p.default);v.blotName="list",v.scope=l.default.Scope.BLOCK_BLOT,v.tagName=["OL","UL"],v.defaultChild="list-item",v.allowedChildren=[E],r.ListItem=E,r.default=v},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(56),o=s(a);function s(p){return p&&p.__esModule?p:{default:p}}function l(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}function c(p,f){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:p}function u(p,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);p.prototype=Object.create(f&&f.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(p,f):p.__proto__=f)}var d=function(p){u(f,p);function f(){return l(this,f),c(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);d.blotName="italic",d.tagName=["EM","I"],r.default=d},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function m(_,g){for(var h=0;h<g.length;h++){var E=g[h];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,g,h){return g&&m(_.prototype,g),h&&m(_,h),_}}(),o=function m(_,g,h){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,g);if(E===void 0){var v=Object.getPrototypeOf(_);return v===null?void 0:m(v,g,h)}else{if("value"in E)return E.value;var b=E.get;return b===void 0?void 0:b.call(h)}},s=i(6),l=c(s);function c(m){return m&&m.__esModule?m:{default:m}}function u(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")}function d(m,_){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:m}function p(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(m,_):m.__proto__=_)}var f=function(m){p(_,m);function _(){return u(this,_),d(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return a(_,null,[{key:"create",value:function(h){return h==="super"?document.createElement("sup"):h==="sub"?document.createElement("sub"):o(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,h)}},{key:"formats",value:function(h){if(h.tagName==="SUB")return"sub";if(h.tagName==="SUP")return"super"}}]),_}(l.default);f.blotName="script",f.tagName=["SUB","SUP"],r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(6),o=s(a);function s(p){return p&&p.__esModule?p:{default:p}}function l(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}function c(p,f){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:p}function u(p,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);p.prototype=Object.create(f&&f.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(p,f):p.__proto__=f)}var d=function(p){u(f,p);function f(){return l(this,f),c(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);d.blotName="strike",d.tagName="S",r.default=d},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(6),o=s(a);function s(p){return p&&p.__esModule?p:{default:p}}function l(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}function c(p,f){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:p}function u(p,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);p.prototype=Object.create(f&&f.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(p,f):p.__proto__=f)}var d=function(p){u(f,p);function f(){return l(this,f),c(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);d.blotName="underline",d.tagName="U",r.default=d},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function g(h,E){for(var v=0;v<E.length;v++){var b=E[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(h,b.key,b)}}return function(h,E,v){return E&&g(h.prototype,E),v&&g(h,v),h}}(),o=function g(h,E,v){h===null&&(h=Function.prototype);var b=Object.getOwnPropertyDescriptor(h,E);if(b===void 0){var S=Object.getPrototypeOf(h);return S===null?void 0:g(S,E,v)}else{if("value"in b)return b.value;var O=b.get;return O===void 0?void 0:O.call(v)}},s=i(0),l=u(s),c=i(27);function u(g){return g&&g.__esModule?g:{default:g}}function d(g,h){if(!(g instanceof h))throw new TypeError("Cannot call a class as a function")}function p(g,h){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:g}function f(g,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);g.prototype=Object.create(h&&h.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(g,h):g.__proto__=h)}var m=["alt","height","width"],_=function(g){f(h,g);function h(){return d(this,h),p(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return a(h,[{key:"format",value:function(v,b){m.indexOf(v)>-1?b?this.domNode.setAttribute(v,b):this.domNode.removeAttribute(v):o(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"format",this).call(this,v,b)}}],[{key:"create",value:function(v){var b=o(h.__proto__||Object.getPrototypeOf(h),"create",this).call(this,v);return typeof v=="string"&&b.setAttribute("src",this.sanitize(v)),b}},{key:"formats",value:function(v){return m.reduce(function(b,S){return v.hasAttribute(S)&&(b[S]=v.getAttribute(S)),b},{})}},{key:"match",value:function(v){return/\.(jpe?g|gif|png)$/.test(v)||/^data:image\/.+;base64/.test(v)}},{key:"sanitize",value:function(v){return(0,c.sanitize)(v,["http","https","data"])?v:"//:0"}},{key:"value",value:function(v){return v.getAttribute("src")}}]),h}(l.default.Embed);_.blotName="image",_.tagName="IMG",r.default=_},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function g(h,E){for(var v=0;v<E.length;v++){var b=E[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(h,b.key,b)}}return function(h,E,v){return E&&g(h.prototype,E),v&&g(h,v),h}}(),o=function g(h,E,v){h===null&&(h=Function.prototype);var b=Object.getOwnPropertyDescriptor(h,E);if(b===void 0){var S=Object.getPrototypeOf(h);return S===null?void 0:g(S,E,v)}else{if("value"in b)return b.value;var O=b.get;return O===void 0?void 0:O.call(v)}},s=i(4),l=i(27),c=u(l);function u(g){return g&&g.__esModule?g:{default:g}}function d(g,h){if(!(g instanceof h))throw new TypeError("Cannot call a class as a function")}function p(g,h){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:g}function f(g,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);g.prototype=Object.create(h&&h.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(g,h):g.__proto__=h)}var m=["height","width"],_=function(g){f(h,g);function h(){return d(this,h),p(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return a(h,[{key:"format",value:function(v,b){m.indexOf(v)>-1?b?this.domNode.setAttribute(v,b):this.domNode.removeAttribute(v):o(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"format",this).call(this,v,b)}}],[{key:"create",value:function(v){var b=o(h.__proto__||Object.getPrototypeOf(h),"create",this).call(this,v);return b.setAttribute("frameborder","0"),b.setAttribute("allowfullscreen",!0),b.setAttribute("src",this.sanitize(v)),b}},{key:"formats",value:function(v){return m.reduce(function(b,S){return v.hasAttribute(S)&&(b[S]=v.getAttribute(S)),b},{})}},{key:"sanitize",value:function(v){return c.default.sanitize(v)}},{key:"value",value:function(v){return v.getAttribute("src")}}]),h}(s.BlockEmbed);_.blotName="video",_.className="ql-video",_.tagName="IFRAME",r.default=_},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var a=function(){function v(b,S){for(var O=0;O<S.length;O++){var y=S[O];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(b,y.key,y)}}return function(b,S,O){return S&&v(b.prototype,S),O&&v(b,O),b}}(),o=function v(b,S,O){b===null&&(b=Function.prototype);var y=Object.getOwnPropertyDescriptor(b,S);if(y===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:v(T,S,O)}else{if("value"in y)return y.value;var x=y.get;return x===void 0?void 0:x.call(O)}},s=i(35),l=f(s),c=i(5),u=f(c),d=i(9),p=f(d);function f(v){return v&&v.__esModule?v:{default:v}}function m(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function _(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function g(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var h=function(v){g(b,v);function b(){return m(this,b),_(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return a(b,null,[{key:"create",value:function(O){var y=o(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,O);return typeof O=="string"&&(window.katex.render(O,y,{throwOnError:!1,errorColor:"#f00"}),y.setAttribute("data-value",O)),y}},{key:"value",value:function(O){return O.getAttribute("data-value")}}]),b}(l.default);h.blotName="formula",h.className="ql-formula",h.tagName="SPAN";var E=function(v){g(b,v),a(b,null,[{key:"register",value:function(){u.default.register(h,!0)}}]);function b(){m(this,b);var S=_(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return S}return b}(p.default);r.FormulaBlot=h,r.default=E},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var a=function(){function O(y,T){for(var x=0;x<T.length;x++){var N=T[x];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(y,N.key,N)}}return function(y,T,x){return T&&O(y.prototype,T),x&&O(y,x),y}}(),o=function O(y,T,x){y===null&&(y=Function.prototype);var N=Object.getOwnPropertyDescriptor(y,T);if(N===void 0){var R=Object.getPrototypeOf(y);return R===null?void 0:O(R,T,x)}else{if("value"in N)return N.value;var w=N.get;return w===void 0?void 0:w.call(x)}},s=i(0),l=_(s),c=i(5),u=_(c),d=i(9),p=_(d),f=i(13),m=_(f);function _(O){return O&&O.__esModule?O:{default:O}}function g(O,y){if(!(O instanceof y))throw new TypeError("Cannot call a class as a function")}function h(O,y){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:O}function E(O,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);O.prototype=Object.create(y&&y.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(O,y):O.__proto__=y)}var v=function(O){E(y,O);function y(){return g(this,y),h(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,[{key:"replaceWith",value:function(x){this.domNode.textContent=this.domNode.textContent,this.attach(),o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"replaceWith",this).call(this,x)}},{key:"highlight",value:function(x){var N=this.domNode.textContent;this.cachedText!==N&&((N.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=x(N),this.domNode.normalize(),this.attach()),this.cachedText=N)}}]),y}(m.default);v.className="ql-syntax";var b=new l.default.Attributor.Class("token","hljs",{scope:l.default.Scope.INLINE}),S=function(O){E(y,O),a(y,null,[{key:"register",value:function(){u.default.register(b,!0),u.default.register(v,!0)}}]);function y(T,x){g(this,y);var N=h(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,T,x));if(typeof N.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var R=null;return N.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(R),R=setTimeout(function(){N.highlight(),R=null},N.options.interval)}),N.highlight(),N}return a(y,[{key:"highlight",value:function(){var x=this;if(!this.quill.selection.composing){this.quill.update(u.default.sources.USER);var N=this.quill.getSelection();this.quill.scroll.descendants(v).forEach(function(R){R.highlight(x.options.highlight)}),this.quill.update(u.default.sources.SILENT),N!=null&&this.quill.setSelection(N,u.default.sources.SILENT)}}}]),y}(p.default);S.DEFAULTS={highlight:function(){return window.hljs==null?null:function(O){var y=window.hljs.highlightAuto(O);return y.value}}(),interval:1e3},r.CodeBlock=v,r.CodeToken=b,r.default=S},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var a=function y(T,x,N){T===null&&(T=Function.prototype);var R=Object.getOwnPropertyDescriptor(T,x);if(R===void 0){var w=Object.getPrototypeOf(T);return w===null?void 0:y(w,x,N)}else{if("value"in R)return R.value;var D=R.get;return D===void 0?void 0:D.call(N)}},o=function(){function y(T,x){for(var N=0;N<x.length;N++){var R=x[N];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(T,R.key,R)}}return function(T,x,N){return x&&y(T.prototype,x),N&&y(T,N),T}}(),s=i(3),l=g(s),c=i(8),u=g(c),d=i(43),p=g(d),f=i(15),m=i(41),_=g(m);function g(y){return y&&y.__esModule?y:{default:y}}function h(y,T){if(!(y instanceof T))throw new TypeError("Cannot call a class as a function")}function E(y,T){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:y}function v(y,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);y.prototype=Object.create(T&&T.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(y,T):y.__proto__=T)}var b=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],S=function(y){v(T,y);function T(x,N){h(this,T),N.modules.toolbar!=null&&N.modules.toolbar.container==null&&(N.modules.toolbar.container=b);var R=E(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,x,N));return R.quill.container.classList.add("ql-bubble"),R}return o(T,[{key:"extendToolbar",value:function(N){this.tooltip=new O(this.quill,this.options.bounds),this.tooltip.root.appendChild(N.container),this.buildButtons([].slice.call(N.container.querySelectorAll("button")),_.default),this.buildPickers([].slice.call(N.container.querySelectorAll("select")),_.default)}}]),T}(p.default);S.DEFAULTS=(0,l.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(T){T?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var O=function(y){v(T,y);function T(x,N){h(this,T);var R=E(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,x,N));return R.quill.on(u.default.events.EDITOR_CHANGE,function(w,D,L,F){if(w===u.default.events.SELECTION_CHANGE)if(D!=null&&D.length>0&&F===u.default.sources.USER){R.show(),R.root.style.left="0px",R.root.style.width="",R.root.style.width=R.root.offsetWidth+"px";var H=R.quill.getLines(D.index,D.length);if(H.length===1)R.position(R.quill.getBounds(D));else{var U=H[H.length-1],Q=R.quill.getIndex(U),$=Math.min(U.length()-1,D.index+D.length-Q),M=R.quill.getBounds(new f.Range(Q,$));R.position(M)}}else document.activeElement!==R.textbox&&R.quill.hasFocus()&&R.hide()}),R}return o(T,[{key:"listen",value:function(){var N=this;a(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){N.root.classList.remove("ql-editing")}),this.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!N.root.classList.contains("ql-hidden")){var R=N.quill.getSelection();R!=null&&N.position(N.quill.getBounds(R))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(N){var R=a(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"position",this).call(this,N),w=this.root.querySelector(".ql-tooltip-arrow");if(w.style.marginLeft="",R===0)return R;w.style.marginLeft=-1*R-w.offsetWidth/2+"px"}}]),T}(d.BaseTooltip);O.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),r.BubbleTooltip=O,r.default=S},function(n,r,i){n.exports=i(63)}]).default})})(b1);var Tse=b1.exports,Ose=Jt&&Jt.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),sc=Jt&&Jt.__assign||function(){return sc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},sc.apply(this,arguments)},Cse=Jt&&Jt.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r},lc=Jt&&Jt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Hn=lc(C),Rse=lc(Jo),jo=lc(E1),v1=lc(Tse),Nse=function(t){Ose(e,t);function e(n){var r=t.call(this,n)||this;r.dirtyProps=["modules","formats","bounds","theme","children"],r.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],r.state={generation:0},r.selection=null,r.onEditorChange=function(a,o,s,l){var c,u,d,p;a==="text-change"?(u=(c=r).onEditorChangeText)===null||u===void 0||u.call(c,r.editor.root.innerHTML,o,l,r.unprivilegedEditor):a==="selection-change"&&((p=(d=r).onEditorChangeSelection)===null||p===void 0||p.call(d,o,l,r.unprivilegedEditor))};var i=r.isControlled()?n.value:n.defaultValue;return r.value=i??"",r}return e.prototype.validateProps=function(n){var r;if(Hn.default.Children.count(n.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(Hn.default.Children.count(n.children)){var i=Hn.default.Children.only(n.children);if(((r=i)===null||r===void 0?void 0:r.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&n.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")},e.prototype.shouldComponentUpdate=function(n,r){var i=this,a;if(this.validateProps(n),!this.editor||this.state.generation!==r.generation)return!0;if("value"in n){var o=this.getEditorContents(),s=(a=n.value,a??"");this.isEqualValue(s,o)||this.setEditorContents(this.editor,s)}return n.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,n.readOnly),Cse(this.cleanProps,this.dirtyProps).some(function(l){return!jo.default(n[l],i.props[l])})},e.prototype.shouldComponentRegenerate=function(n){var r=this;return this.dirtyProps.some(function(i){return!jo.default(n[i],r.props[i])})},e.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},e.prototype.componentWillUnmount=function(){this.destroyEditor()},e.prototype.componentDidUpdate=function(n,r){var i=this;if(this.editor&&this.shouldComponentRegenerate(n)){var a=this.editor.getContents(),o=this.editor.getSelection();this.regenerationSnapshot={delta:a,selection:o},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==r.generation){var s=this.regenerationSnapshot,a=s.delta,l=s.selection;delete this.regenerationSnapshot,this.instantiateEditor();var c=this.editor;c.setContents(a),S1(function(){return i.setEditorSelection(c,l)})}},e.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},e.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},e.prototype.isControlled=function(){return"value"in this.props},e.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}},e.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},e.prototype.createEditor=function(n,r){var i=new v1.default(n,r);return r.tabIndex!=null&&this.setEditorTabIndex(i,r.tabIndex),this.hookEditor(i),i},e.prototype.hookEditor=function(n){this.unprivilegedEditor=this.makeUnprivilegedEditor(n),n.on("editor-change",this.onEditorChange)},e.prototype.unhookEditor=function(n){n.off("editor-change",this.onEditorChange)},e.prototype.getEditorContents=function(){return this.value},e.prototype.getEditorSelection=function(){return this.selection},e.prototype.isDelta=function(n){return n&&n.ops},e.prototype.isEqualValue=function(n,r){return this.isDelta(n)&&this.isDelta(r)?jo.default(n.ops,r.ops):jo.default(n,r)},e.prototype.setEditorContents=function(n,r){var i=this;this.value=r;var a=this.getEditorSelection();typeof r=="string"?n.setContents(n.clipboard.convert(r)):n.setContents(r),S1(function(){return i.setEditorSelection(n,a)})},e.prototype.setEditorSelection=function(n,r){if(this.selection=r,r){var i=n.getLength();r.index=Math.max(0,Math.min(r.index,i-1)),r.length=Math.max(0,Math.min(r.length,i-1-r.index)),n.setSelection(r)}},e.prototype.setEditorTabIndex=function(n,r){var i,a;!((a=(i=n)===null||i===void 0?void 0:i.scroll)===null||a===void 0)&&a.domNode&&(n.scroll.domNode.tabIndex=r)},e.prototype.setEditorReadOnly=function(n,r){r?n.disable():n.enable()},e.prototype.makeUnprivilegedEditor=function(n){var r=n;return{getHTML:function(){return r.root.innerHTML},getLength:r.getLength.bind(r),getText:r.getText.bind(r),getContents:r.getContents.bind(r),getSelection:r.getSelection.bind(r),getBounds:r.getBounds.bind(r)}},e.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var n=Rse.default.findDOMNode(this.editingArea);if(!n)throw new Error("Cannot find element for editing area");if(n.nodeType===3)throw new Error("Editing area cannot be a text node");return n},e.prototype.renderEditingArea=function(){var n=this,r=this.props,i=r.children,a=r.preserveWhitespace,o=this.state.generation,s={key:o,ref:function(l){n.editingArea=l}};return Hn.default.Children.count(i)?Hn.default.cloneElement(Hn.default.Children.only(i),s):a?Hn.default.createElement("pre",sc({},s)):Hn.default.createElement("div",sc({},s))},e.prototype.render=function(){var n;return Hn.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(n=this.props.className,n??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},e.prototype.onEditorChangeText=function(n,r,i,a){var o,s;if(this.editor){var l=this.isDelta(this.value)?a.getContents():a.getHTML();l!==this.getEditorContents()&&(this.lastDeltaChangeSet=r,this.value=l,(s=(o=this.props).onChange)===null||s===void 0||s.call(o,n,r,i,a))}},e.prototype.onEditorChangeSelection=function(n,r,i){var a,o,s,l,c,u;if(this.editor){var d=this.getEditorSelection(),p=!d&&n,f=d&&!n;jo.default(n,d)||(this.selection=n,(o=(a=this.props).onChangeSelection)===null||o===void 0||o.call(a,n,r,i),p?(l=(s=this.props).onFocus)===null||l===void 0||l.call(s,n,r,i):f&&((u=(c=this.props).onBlur)===null||u===void 0||u.call(c,d,r,i)))}},e.prototype.focus=function(){this.editor&&this.editor.focus()},e.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},e.displayName="React Quill",e.Quill=v1.default,e.defaultProps={theme:"snow",modules:{},readOnly:!1},e}(Hn.default.Component);function S1(t){Promise.resolve().then(t)}var Ase=Nse;const xse=jn(Ase),Ise=qt(X.Box)(({theme:t})=>({overflow:"hidden",position:"relative",borderRadius:t.shape.borderRadius,border:`solid 1px ${Ee(t.palette.grey[500],.32)}`,"& .ql-container.ql-snow":{borderColor:"transparent",...t.typography.body1,fontFamily:t.typography.fontFamily},"& .ql-editor":{minHeight:200,maxHeight:640,"&.ql-blank::before":{fontStyle:"normal",color:t.palette.text.disabled},"& pre.ql-syntax":{...t.typography.body2,padding:t.spacing(2),borderRadius:t.shape.borderRadius,backgroundColor:t.palette.grey[900]}}})),wse=qt("div")(({theme:t})=>{const e=t.direction==="rtl";return{"& .ql-snow.ql-toolbar button:hover .ql-fill, .ql-snow .ql-toolbar button:hover .ql-fill, .ql-snow.ql-toolbar button:focus .ql-fill, .ql-snow .ql-toolbar button:focus .ql-fill, .ql-snow.ql-toolbar button.ql-active .ql-fill, .ql-snow .ql-toolbar button.ql-active .ql-fill, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill, .ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill, .ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill, .ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill, .ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill, .ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill":{fill:t.palette.primary.main},"& .ql-snow.ql-toolbar button:hover, .ql-snow .ql-toolbar button:hover, .ql-snow.ql-toolbar button:focus, .ql-snow .ql-toolbar button:focus, .ql-snow.ql-toolbar button.ql-active, .ql-snow .ql-toolbar button.ql-active, .ql-snow.ql-toolbar .ql-picker-label:hover, .ql-snow .ql-toolbar .ql-picker-label:hover, .ql-snow.ql-toolbar .ql-picker-label.ql-active, .ql-snow .ql-toolbar .ql-picker-label.ql-active, .ql-snow.ql-toolbar .ql-picker-item:hover, .ql-snow .ql-toolbar .ql-picker-item:hover, .ql-snow.ql-toolbar .ql-picker-item.ql-selected, .ql-snow .ql-toolbar .ql-picker-item.ql-selected":{color:t.palette.primary.main},"& .ql-snow.ql-toolbar button:hover .ql-stroke, .ql-snow .ql-toolbar button:hover .ql-stroke, .ql-snow.ql-toolbar button:focus .ql-stroke, .ql-snow .ql-toolbar button:focus .ql-stroke, .ql-snow.ql-toolbar button.ql-active .ql-stroke, .ql-snow .ql-toolbar button.ql-active .ql-stroke, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke, .ql-snow.ql-toolbar button:hover .ql-stroke-miter, .ql-snow .ql-toolbar button:hover .ql-stroke-miter, .ql-snow.ql-toolbar button:focus .ql-stroke-miter, .ql-snow .ql-toolbar button:focus .ql-stroke-miter, .ql-snow.ql-toolbar button.ql-active .ql-stroke-miter, .ql-snow .ql-toolbar button.ql-active .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter":{stroke:t.palette.primary.main},"& .ql-stroke":{stroke:t.palette.text.primary},"& .ql-fill, .ql-stroke.ql-fill":{fill:t.palette.text.primary},"& .ql-picker, .ql-picker-options, .ql-picker-item, .ql-picker-label, button":{"&:focus":{outline:"none"}},"& .ql-toolbar.ql-snow":{border:"none",borderBottom:`solid 1px ${Ee(t.palette.grey[500],.32)}`,"& .ql-formats":{"&:not(:last-of-type)":{marginRight:t.spacing(2)}},"& button":{padding:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,color:t.palette.text.primary},"& button svg, span svg":{width:20,height:20},"& .ql-picker-label":{...t.typography.subtitle2,color:t.palette.text.primary,"& .ql-stroke":{stroke:t.palette.text.primary}},"& .ql-picker-label svg":{...e&&{right:"0 !important",left:"auto !important"}},"& .ql-color,& .ql-background,& .ql-align ":{"& .ql-picker-label":{padding:0,display:"flex",alignItems:"center",justifyContent:"center"}},"& .ql-expanded":{"& .ql-picker-label":{borderRadius:4,color:t.palette.text.disabled,borderColor:"transparent !important",backgroundColor:t.palette.action.focus,"& .ql-stroke":{stroke:t.palette.text.disabled}},"& .ql-picker-options":{padding:0,marginTop:4,border:"none",maxHeight:200,overflow:"auto",boxShadow:t.customShadows.z20,borderRadius:t.shape.borderRadius,backgroundColor:t.palette.background.paper},"& .ql-picker-item":{color:t.palette.text.primary},"&.ql-align":{"& .ql-picker-options":{padding:0,display:"flex"},"& .ql-picker-item":{width:32,height:32,display:"flex",alignItems:"center",justifyContent:"center"}},"&.ql-color, &.ql-background":{"& .ql-picker-options":{padding:8},"& .ql-picker-item":{margin:3,borderRadius:4,"&.ql-selected":{border:"solid 1px black"}}},"&.ql-font, &.ql-size, &.ql-header":{"& .ql-picker-options":{padding:t.spacing(1,0)},"& .ql-picker-item":{padding:t.spacing(.5,1.5)}}}}}}),Dse=["Cabeçalho 1","Cabeçalho 2","Cabeçalho 3","Cabeçalho 4","Cabeçalho 5","Cabeçalho 6"],Mse=["align","background","blockquote","bold","bullet","code","code-block","color","direction","font","formula","header","image","indent","italic","link","list","script","size","strike","table","underline","video"],Lse=({id:t,isSimple:e,...n})=>A.jsx(wse,{...n,children:A.jsxs("div",{id:t,children:[A.jsx("div",{className:"ql-formats",children:A.jsxs("select",{className:"ql-header",defaultValue:"",children:[Dse.map((r,i)=>A.jsx("option",{value:i+1,children:r},r)),A.jsx("option",{value:"",children:"Normal"})]})}),A.jsxs("div",{className:"ql-formats",children:[A.jsx("button",{type:"button",className:"ql-bold"}),A.jsx("button",{type:"button",className:"ql-italic"}),A.jsx("button",{type:"button",className:"ql-underline"}),A.jsx("button",{type:"button",className:"ql-strike"})]}),!e&&A.jsxs("div",{className:"ql-formats",children:[A.jsx("select",{className:"ql-color"}),A.jsx("select",{className:"ql-background"})]}),A.jsxs("div",{className:"ql-formats",children:[A.jsx("button",{type:"button",className:"ql-list",value:"ordered"}),A.jsx("button",{type:"button",className:"ql-list",value:"bullet"}),!e&&A.jsx("button",{type:"button",className:"ql-indent",value:"-1"}),!e&&A.jsx("button",{type:"button",className:"ql-indent",value:"+1"})]}),!e&&A.jsxs("div",{className:"ql-formats",children:[A.jsx("button",{type:"button",className:"ql-script",value:"super"}),A.jsx("button",{type:"button",className:"ql-script",value:"sub"})]}),!e&&A.jsxs("div",{className:"ql-formats",children:[A.jsx("button",{type:"button",className:"ql-code-block"}),A.jsx("button",{type:"button",className:"ql-blockquote"})]}),A.jsxs("div",{className:"ql-formats",children:[A.jsx("button",{type:"button",className:"ql-direction",value:"rtl"}),A.jsx("select",{className:"ql-align"})]}),A.jsxs("div",{className:"ql-formats",children:[A.jsx("button",{type:"button",className:"ql-link"}),A.jsx("button",{type:"button",className:"ql-image"}),A.jsx("button",{type:"button",className:"ql-video"})]}),A.jsxs("div",{className:"ql-formats",children:[!e&&A.jsx("button",{type:"button",className:"ql-formula"}),A.jsx("button",{type:"button",className:"ql-clean"})]})]})}),y1=({id:t="minimal-quill",error:e,value:n,onChange:r,simple:i=!1,helperText:a,sx:o,...s})=>{const l={toolbar:{container:`#${t}`},history:{delay:500,maxStack:100,userOnly:!0},syntax:!0,clipboard:{matchVisual:!1}};return A.jsxs(A.Fragment,{children:[A.jsxs(Ise,{sx:{...e&&{border:c=>`solid 1px ${c.palette.error.main}`},...o},children:[A.jsx(Lse,{id:t,isSimple:i}),A.jsx(xse,{value:n,onChange:r,modules:l,formats:Mse,placeholder:"Write something awesome...",...s})]}),a&&a]})},T1=()=>A.jsx(X.LinearProgress,{sx:{position:"absolute",top:0,left:0,width:1}});var O1={exports:{}};(()=>{var t={296:(i,a,o)=>{var s=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,d=parseInt,p=typeof o.g=="object"&&o.g&&o.g.Object===Object&&o.g,f=typeof self=="object"&&self&&self.Object===Object&&self,m=p||f||Function("return this")(),_=Object.prototype.toString,g=Math.max,h=Math.min,E=function(){return m.Date.now()};function v(S){var O=typeof S;return!!S&&(O=="object"||O=="function")}function b(S){if(typeof S=="number")return S;if(function(T){return typeof T=="symbol"||function(x){return!!x&&typeof x=="object"}(T)&&_.call(T)=="[object Symbol]"}(S))return NaN;if(v(S)){var O=typeof S.valueOf=="function"?S.valueOf():S;S=v(O)?O+"":O}if(typeof S!="string")return S===0?S:+S;S=S.replace(s,"");var y=c.test(S);return y||u.test(S)?d(S.slice(2),y?2:8):l.test(S)?NaN:+S}i.exports=function(S,O,y){var T,x,N,R,w,D,L=0,F=!1,H=!1,U=!0;if(typeof S!="function")throw new TypeError("Expected a function");function Q(B){var Y=T,q=x;return T=x=void 0,L=B,R=S.apply(q,Y)}function $(B){var Y=B-D;return D===void 0||Y>=O||Y<0||H&&B-L>=N}function M(){var B=E();if($(B))return I(B);w=setTimeout(M,function(Y){var q=O-(Y-D);return H?h(q,N-(Y-L)):q}(B))}function I(B){return w=void 0,U&&T?Q(B):(T=x=void 0,R)}function k(){var B=E(),Y=$(B);if(T=arguments,x=this,D=B,Y){if(w===void 0)return function(q){return L=q,w=setTimeout(M,O),F?Q(q):R}(D);if(H)return w=setTimeout(M,O),Q(D)}return w===void 0&&(w=setTimeout(M,O)),R}return O=b(O)||0,v(y)&&(F=!!y.leading,N=(H="maxWait"in y)?g(b(y.maxWait)||0,O):N,U="trailing"in y?!!y.trailing:U),k.cancel=function(){w!==void 0&&clearTimeout(w),L=0,T=D=x=w=void 0},k.flush=function(){return w===void 0?R:I(E())},k}},96:(i,a,o)=>{var s="Expected a function",l=NaN,c="[object Symbol]",u=/^\s+|\s+$/g,d=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,f=/^0o[0-7]+$/i,m=parseInt,_=typeof o.g=="object"&&o.g&&o.g.Object===Object&&o.g,g=typeof self=="object"&&self&&self.Object===Object&&self,h=_||g||Function("return this")(),E=Object.prototype.toString,v=Math.max,b=Math.min,S=function(){return h.Date.now()};function O(T){var x=typeof T;return!!T&&(x=="object"||x=="function")}function y(T){if(typeof T=="number")return T;if(function(R){return typeof R=="symbol"||function(w){return!!w&&typeof w=="object"}(R)&&E.call(R)==c}(T))return l;if(O(T)){var x=typeof T.valueOf=="function"?T.valueOf():T;T=O(x)?x+"":x}if(typeof T!="string")return T===0?T:+T;T=T.replace(u,"");var N=p.test(T);return N||f.test(T)?m(T.slice(2),N?2:8):d.test(T)?l:+T}i.exports=function(T,x,N){var R=!0,w=!0;if(typeof T!="function")throw new TypeError(s);return O(N)&&(R="leading"in N?!!N.leading:R,w="trailing"in N?!!N.trailing:w),function(D,L,F){var H,U,Q,$,M,I,k=0,B=!1,Y=!1,q=!0;if(typeof D!="function")throw new TypeError(s);function P(se){var ne=H,he=U;return H=U=void 0,k=se,$=D.apply(he,ne)}function G(se){var ne=se-I;return I===void 0||ne>=L||ne<0||Y&&se-k>=Q}function z(){var se=S();if(G(se))return W(se);M=setTimeout(z,function(ne){var he=L-(ne-I);return Y?b(he,Q-(ne-k)):he}(se))}function W(se){return M=void 0,q&&H?P(se):(H=U=void 0,$)}function J(){var se=S(),ne=G(se);if(H=arguments,U=this,I=se,ne){if(M===void 0)return function(he){return k=he,M=setTimeout(z,L),B?P(he):$}(I);if(Y)return M=setTimeout(z,L),P(I)}return M===void 0&&(M=setTimeout(z,L)),$}return L=y(L)||0,O(F)&&(B=!!F.leading,Q=(Y="maxWait"in F)?v(y(F.maxWait)||0,L):Q,q="trailing"in F?!!F.trailing:q),J.cancel=function(){M!==void 0&&clearTimeout(M),k=0,H=I=U=M=void 0},J.flush=function(){return M===void 0?$:W(S())},J}(T,x,{leading:R,maxWait:x,trailing:w})}},703:(i,a,o)=>{var s=o(414);function l(){}function c(){}c.resetWarningCache=l,i.exports=function(){function u(f,m,_,g,h,E){if(E!==s){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}function d(){return u}u.isRequired=u;var p={array:u,bigint:u,bool:u,func:u,number:u,object:u,string:u,symbol:u,any:u,arrayOf:d,element:u,elementType:u,instanceOf:d,node:u,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d,checkPropTypes:c,resetWarningCache:l};return p.PropTypes=p,p}},697:(i,a,o)=>{i.exports=o(703)()},414:i=>{i.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},e={};function n(i){var a=e[i];if(a!==void 0)return a.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}n.n=i=>{var a=i&&i.__esModule?()=>i.default:()=>i;return n.d(a,{a}),a},n.d=(i,a)=>{for(var o in a)n.o(a,o)&&!n.o(i,o)&&Object.defineProperty(i,o,{enumerable:!0,get:a[o]})},n.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),n.o=(i,a)=>Object.prototype.hasOwnProperty.call(i,a),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{n.r(r),n.d(r,{LazyLoadComponent:()=>pe,LazyLoadImage:()=>Be,trackWindowScroll:()=>I});const i=C;var a=n.n(i),o=n(697);const s=Jo;var l=n.n(s);function c(){return typeof window<"u"&&"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}function u(K){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},u(K)}function d(K,V){var ie=Object.keys(K);if(Object.getOwnPropertySymbols){var re=Object.getOwnPropertySymbols(K);V&&(re=re.filter(function(Se){return Object.getOwnPropertyDescriptor(K,Se).enumerable})),ie.push.apply(ie,re)}return ie}function p(K,V,ie){return(V=m(V))in K?Object.defineProperty(K,V,{value:ie,enumerable:!0,configurable:!0,writable:!0}):K[V]=ie,K}function f(K,V){for(var ie=0;ie<V.length;ie++){var re=V[ie];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(K,m(re.key),re)}}function m(K){var V=function(ie,re){if(u(ie)!=="object"||ie===null)return ie;var Se=ie[Symbol.toPrimitive];if(Se!==void 0){var De=Se.call(ie,"string");if(u(De)!=="object")return De;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(ie)}(K);return u(V)==="symbol"?V:String(V)}function _(K,V){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ie,re){return ie.__proto__=re,ie},_(K,V)}function g(K){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)},g(K)}var h=function(K){K.forEach(function(V){V.isIntersecting&&V.target.onVisible()})},E={},v=function(K){(function(oe,de){if(typeof de!="function"&&de!==null)throw new TypeError("Super expression must either be null or a function");oe.prototype=Object.create(de&&de.prototype,{constructor:{value:oe,writable:!0,configurable:!0}}),Object.defineProperty(oe,"prototype",{writable:!1}),de&&_(oe,de)})(Ae,K);var V,ie,re,Se,De=(re=Ae,Se=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var oe,de=g(re);if(Se){var Re=g(this).constructor;oe=Reflect.construct(de,arguments,Re)}else oe=de.apply(this,arguments);return function(Ce,Te){if(Te&&(u(Te)==="object"||typeof Te=="function"))return Te;if(Te!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function($e){if($e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $e}(Ce)}(this,oe)});function Ae(oe){var de;if(function(Ce,Te){if(!(Ce instanceof Te))throw new TypeError("Cannot call a class as a function")}(this,Ae),(de=De.call(this,oe)).supportsObserver=!oe.scrollPosition&&oe.useIntersectionObserver&&c(),de.supportsObserver){var Re=oe.threshold;de.observer=function(Ce){return E[Ce]=E[Ce]||new IntersectionObserver(h,{rootMargin:Ce+"px"}),E[Ce]}(Re)}return de}return V=Ae,ie=[{key:"componentDidMount",value:function(){this.placeholder&&this.observer&&(this.placeholder.onVisible=this.props.onVisible,this.observer.observe(this.placeholder)),this.supportsObserver||this.updateVisibility()}},{key:"componentWillUnmount",value:function(){this.observer&&this.placeholder&&this.observer.unobserve(this.placeholder)}},{key:"componentDidUpdate",value:function(){this.supportsObserver||this.updateVisibility()}},{key:"getPlaceholderBoundingBox",value:function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollPosition,de=this.placeholder.getBoundingClientRect(),Re=l().findDOMNode(this.placeholder).style,Ce=parseInt(Re.getPropertyValue("margin-left"),10)||0,Te=parseInt(Re.getPropertyValue("margin-top"),10)||0;return{bottom:oe.y+de.bottom+Te,left:oe.x+de.left+Ce,right:oe.x+de.right+Ce,top:oe.y+de.top+Te}}},{key:"isPlaceholderInViewport",value:function(){if(typeof window>"u"||!this.placeholder)return!1;var oe=this.props,de=oe.scrollPosition,Re=oe.threshold,Ce=this.getPlaceholderBoundingBox(de),Te=de.y+window.innerHeight,$e=de.x,ht=de.x+window.innerWidth,it=de.y;return it-Re<=Ce.bottom&&Te+Re>=Ce.top&&$e-Re<=Ce.right&&ht+Re>=Ce.left}},{key:"updateVisibility",value:function(){this.isPlaceholderInViewport()&&this.props.onVisible()}},{key:"render",value:function(){var oe=this,de=this.props,Re=de.className,Ce=de.height,Te=de.placeholder,$e=de.style,ht=de.width;if(Te&&typeof Te.type!="function")return a().cloneElement(Te,{ref:function(lt){return oe.placeholder=lt}});var it=function(lt){for(var xt=1;xt<arguments.length;xt++){var Tt=arguments[xt]!=null?arguments[xt]:{};xt%2?d(Object(Tt),!0).forEach(function(Yt){p(lt,Yt,Tt[Yt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(lt,Object.getOwnPropertyDescriptors(Tt)):d(Object(Tt)).forEach(function(Yt){Object.defineProperty(lt,Yt,Object.getOwnPropertyDescriptor(Tt,Yt))})}return lt}({display:"inline-block"},$e);return ht!==void 0&&(it.width=ht),Ce!==void 0&&(it.height=Ce),a().createElement("span",{className:Re,ref:function(lt){return oe.placeholder=lt},style:it},Te)}}],ie&&f(V.prototype,ie),Object.defineProperty(V,"prototype",{writable:!1}),Ae}(a().Component);v.propTypes={onVisible:o.PropTypes.func.isRequired,className:o.PropTypes.string,height:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string]),placeholder:o.PropTypes.element,threshold:o.PropTypes.number,useIntersectionObserver:o.PropTypes.bool,scrollPosition:o.PropTypes.shape({x:o.PropTypes.number.isRequired,y:o.PropTypes.number.isRequired}),width:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string])},v.defaultProps={className:"",placeholder:null,threshold:100,useIntersectionObserver:!0};const b=v;var S=n(296),O=n.n(S),y=n(96),T=n.n(y),x=function(K){var V=getComputedStyle(K,null);return V.getPropertyValue("overflow")+V.getPropertyValue("overflow-y")+V.getPropertyValue("overflow-x")};const N=function(K){if(!(K instanceof HTMLElement))return window;for(var V=K;V&&V instanceof HTMLElement;){if(/(scroll|auto)/.test(x(V)))return V;V=V.parentNode}return window};function R(K){return R=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},R(K)}var w=["delayMethod","delayTime"];function D(){return D=Object.assign?Object.assign.bind():function(K){for(var V=1;V<arguments.length;V++){var ie=arguments[V];for(var re in ie)Object.prototype.hasOwnProperty.call(ie,re)&&(K[re]=ie[re])}return K},D.apply(this,arguments)}function L(K,V){for(var ie=0;ie<V.length;ie++){var re=V[ie];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(K,(Se=function(De,Ae){if(R(De)!=="object"||De===null)return De;var oe=De[Symbol.toPrimitive];if(oe!==void 0){var de=oe.call(De,"string");if(R(de)!=="object")return de;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(De)}(re.key),R(Se)==="symbol"?Se:String(Se)),re)}var Se}function F(K,V){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ie,re){return ie.__proto__=re,ie},F(K,V)}function H(K,V){if(V&&(R(V)==="object"||typeof V=="function"))return V;if(V!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return U(K)}function U(K){if(K===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K}function Q(K){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)},Q(K)}var $=function(){return typeof window>"u"?0:window.scrollX||window.pageXOffset},M=function(){return typeof window>"u"?0:window.scrollY||window.pageYOffset};const I=function(K){var V=function(ie){(function(Re,Ce){if(typeof Ce!="function"&&Ce!==null)throw new TypeError("Super expression must either be null or a function");Re.prototype=Object.create(Ce&&Ce.prototype,{constructor:{value:Re,writable:!0,configurable:!0}}),Object.defineProperty(Re,"prototype",{writable:!1}),Ce&&F(Re,Ce)})(de,ie);var re,Se,De,Ae,oe=(De=de,Ae=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var Re,Ce=Q(De);if(Ae){var Te=Q(this).constructor;Re=Reflect.construct(Ce,arguments,Te)}else Re=Ce.apply(this,arguments);return H(this,Re)});function de(Re){var Ce;if(function($e,ht){if(!($e instanceof ht))throw new TypeError("Cannot call a class as a function")}(this,de),(Ce=oe.call(this,Re)).useIntersectionObserver=Re.useIntersectionObserver&&c(),Ce.useIntersectionObserver)return H(Ce);var Te=Ce.onChangeScroll.bind(U(Ce));return Re.delayMethod==="debounce"?Ce.delayedScroll=O()(Te,Re.delayTime):Re.delayMethod==="throttle"&&(Ce.delayedScroll=T()(Te,Re.delayTime)),Ce.state={scrollPosition:{x:$(),y:M()}},Ce.baseComponentRef=a().createRef(),Ce}return re=de,(Se=[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"componentDidUpdate",value:function(){typeof window>"u"||this.useIntersectionObserver||N(l().findDOMNode(this.baseComponentRef.current))!==this.scrollElement&&(this.removeListeners(),this.addListeners())}},{key:"addListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement=N(l().findDOMNode(this.baseComponentRef.current)),this.scrollElement.addEventListener("scroll",this.delayedScroll,{passive:!0}),window.addEventListener("resize",this.delayedScroll,{passive:!0}),this.scrollElement!==window&&window.addEventListener("scroll",this.delayedScroll,{passive:!0}))}},{key:"removeListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement.removeEventListener("scroll",this.delayedScroll),window.removeEventListener("resize",this.delayedScroll),this.scrollElement!==window&&window.removeEventListener("scroll",this.delayedScroll))}},{key:"onChangeScroll",value:function(){this.useIntersectionObserver||this.setState({scrollPosition:{x:$(),y:M()}})}},{key:"render",value:function(){var Re=this.props,Ce=(Re.delayMethod,Re.delayTime,function($e,ht){if($e==null)return{};var it,lt,xt=function(Yt,wn){if(Yt==null)return{};var Dn,ur,pi={},Da=Object.keys(Yt);for(ur=0;ur<Da.length;ur++)Dn=Da[ur],wn.indexOf(Dn)>=0||(pi[Dn]=Yt[Dn]);return pi}($e,ht);if(Object.getOwnPropertySymbols){var Tt=Object.getOwnPropertySymbols($e);for(lt=0;lt<Tt.length;lt++)it=Tt[lt],ht.indexOf(it)>=0||Object.prototype.propertyIsEnumerable.call($e,it)&&(xt[it]=$e[it])}return xt}(Re,w)),Te=this.useIntersectionObserver?null:this.state.scrollPosition;return a().createElement(K,D({forwardRef:this.baseComponentRef,scrollPosition:Te},Ce))}}])&&L(re.prototype,Se),Object.defineProperty(re,"prototype",{writable:!1}),de}(a().Component);return V.propTypes={delayMethod:o.PropTypes.oneOf(["debounce","throttle"]),delayTime:o.PropTypes.number,useIntersectionObserver:o.PropTypes.bool},V.defaultProps={delayMethod:"throttle",delayTime:300,useIntersectionObserver:!0},V};function k(K){return k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},k(K)}function B(K,V){for(var ie=0;ie<V.length;ie++){var re=V[ie];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(K,(Se=function(De,Ae){if(k(De)!=="object"||De===null)return De;var oe=De[Symbol.toPrimitive];if(oe!==void 0){var de=oe.call(De,"string");if(k(de)!=="object")return de;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(De)}(re.key),k(Se)==="symbol"?Se:String(Se)),re)}var Se}function Y(K,V){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ie,re){return ie.__proto__=re,ie},Y(K,V)}function q(K){return q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)},q(K)}var P=function(K){(function(oe,de){if(typeof de!="function"&&de!==null)throw new TypeError("Super expression must either be null or a function");oe.prototype=Object.create(de&&de.prototype,{constructor:{value:oe,writable:!0,configurable:!0}}),Object.defineProperty(oe,"prototype",{writable:!1}),de&&Y(oe,de)})(Ae,K);var V,ie,re,Se,De=(re=Ae,Se=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var oe,de=q(re);if(Se){var Re=q(this).constructor;oe=Reflect.construct(de,arguments,Re)}else oe=de.apply(this,arguments);return function(Ce,Te){if(Te&&(k(Te)==="object"||typeof Te=="function"))return Te;if(Te!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function($e){if($e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $e}(Ce)}(this,oe)});function Ae(oe){return function(de,Re){if(!(de instanceof Re))throw new TypeError("Cannot call a class as a function")}(this,Ae),De.call(this,oe)}return V=Ae,(ie=[{key:"render",value:function(){return a().createElement(b,this.props)}}])&&B(V.prototype,ie),Object.defineProperty(V,"prototype",{writable:!1}),Ae}(a().Component);const G=I(P);function z(K){return z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},z(K)}function W(K,V){for(var ie=0;ie<V.length;ie++){var re=V[ie];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(K,(Se=function(De,Ae){if(z(De)!=="object"||De===null)return De;var oe=De[Symbol.toPrimitive];if(oe!==void 0){var de=oe.call(De,"string");if(z(de)!=="object")return de;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(De)}(re.key),z(Se)==="symbol"?Se:String(Se)),re)}var Se}function J(K,V){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ie,re){return ie.__proto__=re,ie},J(K,V)}function se(K){if(K===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K}function ne(K){return ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)},ne(K)}var he=function(K){(function(oe,de){if(typeof de!="function"&&de!==null)throw new TypeError("Super expression must either be null or a function");oe.prototype=Object.create(de&&de.prototype,{constructor:{value:oe,writable:!0,configurable:!0}}),Object.defineProperty(oe,"prototype",{writable:!1}),de&&J(oe,de)})(Ae,K);var V,ie,re,Se,De=(re=Ae,Se=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var oe,de=ne(re);if(Se){var Re=ne(this).constructor;oe=Reflect.construct(de,arguments,Re)}else oe=de.apply(this,arguments);return function(Ce,Te){if(Te&&(z(Te)==="object"||typeof Te=="function"))return Te;if(Te!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return se(Ce)}(this,oe)});function Ae(oe){var de;(function(ht,it){if(!(ht instanceof it))throw new TypeError("Cannot call a class as a function")})(this,Ae),de=De.call(this,oe);var Re=oe.afterLoad,Ce=oe.beforeLoad,Te=oe.scrollPosition,$e=oe.visibleByDefault;return de.state={visible:$e},$e&&(Ce(),Re()),de.onVisible=de.onVisible.bind(se(de)),de.isScrollTracked=!!(Te&&Number.isFinite(Te.x)&&Te.x>=0&&Number.isFinite(Te.y)&&Te.y>=0),de}return V=Ae,(ie=[{key:"componentDidUpdate",value:function(oe,de){de.visible!==this.state.visible&&this.props.afterLoad()}},{key:"onVisible",value:function(){this.props.beforeLoad(),this.setState({visible:!0})}},{key:"render",value:function(){if(this.state.visible)return this.props.children;var oe=this.props,de=oe.className,Re=oe.delayMethod,Ce=oe.delayTime,Te=oe.height,$e=oe.placeholder,ht=oe.scrollPosition,it=oe.style,lt=oe.threshold,xt=oe.useIntersectionObserver,Tt=oe.width;return this.isScrollTracked||xt&&c()?a().createElement(b,{className:de,height:Te,onVisible:this.onVisible,placeholder:$e,scrollPosition:ht,style:it,threshold:lt,useIntersectionObserver:xt,width:Tt}):a().createElement(G,{className:de,delayMethod:Re,delayTime:Ce,height:Te,onVisible:this.onVisible,placeholder:$e,style:it,threshold:lt,width:Tt})}}])&&W(V.prototype,ie),Object.defineProperty(V,"prototype",{writable:!1}),Ae}(a().Component);he.propTypes={afterLoad:o.PropTypes.func,beforeLoad:o.PropTypes.func,useIntersectionObserver:o.PropTypes.bool,visibleByDefault:o.PropTypes.bool},he.defaultProps={afterLoad:function(){return{}},beforeLoad:function(){return{}},useIntersectionObserver:!0,visibleByDefault:!1};const pe=he;function Ie(K){return Ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},Ie(K)}var qe=["afterLoad","beforeLoad","delayMethod","delayTime","effect","placeholder","placeholderSrc","scrollPosition","threshold","useIntersectionObserver","visibleByDefault","wrapperClassName","wrapperProps"];function Ye(K,V){var ie=Object.keys(K);if(Object.getOwnPropertySymbols){var re=Object.getOwnPropertySymbols(K);V&&(re=re.filter(function(Se){return Object.getOwnPropertyDescriptor(K,Se).enumerable})),ie.push.apply(ie,re)}return ie}function le(K){for(var V=1;V<arguments.length;V++){var ie=arguments[V]!=null?arguments[V]:{};V%2?Ye(Object(ie),!0).forEach(function(re){te(K,re,ie[re])}):Object.getOwnPropertyDescriptors?Object.defineProperties(K,Object.getOwnPropertyDescriptors(ie)):Ye(Object(ie)).forEach(function(re){Object.defineProperty(K,re,Object.getOwnPropertyDescriptor(ie,re))})}return K}function te(K,V,ie){return(V=ae(V))in K?Object.defineProperty(K,V,{value:ie,enumerable:!0,configurable:!0,writable:!0}):K[V]=ie,K}function ge(){return ge=Object.assign?Object.assign.bind():function(K){for(var V=1;V<arguments.length;V++){var ie=arguments[V];for(var re in ie)Object.prototype.hasOwnProperty.call(ie,re)&&(K[re]=ie[re])}return K},ge.apply(this,arguments)}function _e(K,V){for(var ie=0;ie<V.length;ie++){var re=V[ie];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(K,ae(re.key),re)}}function ae(K){var V=function(ie,re){if(Ie(ie)!=="object"||ie===null)return ie;var Se=ie[Symbol.toPrimitive];if(Se!==void 0){var De=Se.call(ie,"string");if(Ie(De)!=="object")return De;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(ie)}(K);return Ie(V)==="symbol"?V:String(V)}function Me(K,V){return Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ie,re){return ie.__proto__=re,ie},Me(K,V)}function ce(K){return ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)},ce(K)}var fe=function(K){(function(oe,de){if(typeof de!="function"&&de!==null)throw new TypeError("Super expression must either be null or a function");oe.prototype=Object.create(de&&de.prototype,{constructor:{value:oe,writable:!0,configurable:!0}}),Object.defineProperty(oe,"prototype",{writable:!1}),de&&Me(oe,de)})(Ae,K);var V,ie,re,Se,De=(re=Ae,Se=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var oe,de=ce(re);if(Se){var Re=ce(this).constructor;oe=Reflect.construct(de,arguments,Re)}else oe=de.apply(this,arguments);return function(Ce,Te){if(Te&&(Ie(Te)==="object"||typeof Te=="function"))return Te;if(Te!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function($e){if($e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $e}(Ce)}(this,oe)});function Ae(oe){var de;return function(Re,Ce){if(!(Re instanceof Ce))throw new TypeError("Cannot call a class as a function")}(this,Ae),(de=De.call(this,oe)).state={loaded:!1},de}return V=Ae,(ie=[{key:"onImageLoad",value:function(){var oe=this;return this.state.loaded?null:function(de){oe.props.onLoad(de),oe.props.afterLoad(),oe.setState({loaded:!0})}}},{key:"getImg",value:function(){var oe=this.props,de=(oe.afterLoad,oe.beforeLoad,oe.delayMethod,oe.delayTime,oe.effect,oe.placeholder,oe.placeholderSrc,oe.scrollPosition,oe.threshold,oe.useIntersectionObserver,oe.visibleByDefault,oe.wrapperClassName,oe.wrapperProps,function(Re,Ce){if(Re==null)return{};var Te,$e,ht=function(lt,xt){if(lt==null)return{};var Tt,Yt,wn={},Dn=Object.keys(lt);for(Yt=0;Yt<Dn.length;Yt++)Tt=Dn[Yt],xt.indexOf(Tt)>=0||(wn[Tt]=lt[Tt]);return wn}(Re,Ce);if(Object.getOwnPropertySymbols){var it=Object.getOwnPropertySymbols(Re);for($e=0;$e<it.length;$e++)Te=it[$e],Ce.indexOf(Te)>=0||Object.prototype.propertyIsEnumerable.call(Re,Te)&&(ht[Te]=Re[Te])}return ht}(oe,qe));return a().createElement("img",ge({},de,{onLoad:this.onImageLoad()}))}},{key:"getLazyLoadImage",value:function(){var oe=this.props,de=oe.beforeLoad,Re=oe.className,Ce=oe.delayMethod,Te=oe.delayTime,$e=oe.height,ht=oe.placeholder,it=oe.scrollPosition,lt=oe.style,xt=oe.threshold,Tt=oe.useIntersectionObserver,Yt=oe.visibleByDefault,wn=oe.width;return a().createElement(pe,{beforeLoad:de,className:Re,delayMethod:Ce,delayTime:Te,height:$e,placeholder:ht,scrollPosition:it,style:lt,threshold:xt,useIntersectionObserver:Tt,visibleByDefault:Yt,width:wn},this.getImg())}},{key:"getWrappedLazyLoadImage",value:function(oe){var de=this.props,Re=de.effect,Ce=de.height,Te=de.placeholderSrc,$e=de.width,ht=de.wrapperClassName,it=de.wrapperProps,lt=this.state.loaded,xt=lt?" lazy-load-image-loaded":"",Tt=lt||!Te?{}:{backgroundImage:"url(".concat(Te,")"),backgroundSize:"100% 100%"};return a().createElement("span",ge({className:ht+" lazy-load-image-background "+Re+xt,style:le(le({},Tt),{},{color:"transparent",display:"inline-block",height:Ce,width:$e})},it),oe)}},{key:"render",value:function(){var oe=this.props,de=oe.effect,Re=oe.placeholderSrc,Ce=oe.visibleByDefault,Te=oe.wrapperClassName,$e=oe.wrapperProps,ht=this.getLazyLoadImage();return(de||Re)&&!Ce||Te||$e?this.getWrappedLazyLoadImage(ht):ht}}])&&_e(V.prototype,ie),Object.defineProperty(V,"prototype",{writable:!1}),Ae}(a().Component);fe.propTypes={onLoad:o.PropTypes.func,afterLoad:o.PropTypes.func,beforeLoad:o.PropTypes.func,delayMethod:o.PropTypes.string,delayTime:o.PropTypes.number,effect:o.PropTypes.string,placeholderSrc:o.PropTypes.string,threshold:o.PropTypes.number,useIntersectionObserver:o.PropTypes.bool,visibleByDefault:o.PropTypes.bool,wrapperClassName:o.PropTypes.string,wrapperProps:o.PropTypes.object},fe.defaultProps={onLoad:function(){},afterLoad:function(){return{}},beforeLoad:function(){return{}},delayMethod:"throttle",delayTime:300,effect:"",placeholderSrc:null,threshold:100,useIntersectionObserver:!0,visibleByDefault:!1,wrapperClassName:""};const Be=fe})(),O1.exports=r})();var Pse=O1.exports;const kse="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACAQMAAACjTyRkAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjAAIAAAQAASDSLW8AAAAASUVORK5CYII=",Fse="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHdpZHRoPSI1MTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxyYWRpYWxHcmFkaWVudCBpZD0iYSIgY3g9IjUwJSIgY3k9IjQ2LjgwMTEwMiUiIHI9Ijk1LjQ5NzExMiUiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjOTE5ZWFiIiBzdG9wLW9wYWNpdHk9Ii40OCIvPjwvcmFkaWFsR3JhZGllbnQ+PHBhdGggZD0ibTg4IDg2aDUxMnY1MTJoLTUxMnoiIGZpbGw9InVybCgjYSkiIGZpbGwtcnVsZT0iZXZlbm9kZCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTg4IC04NikiLz48L3N2Zz4=";function Bse(t="1/1"){return{"4/3":"calc(100% / 4 * 3)","3/4":"calc(100% / 3 * 4)","6/4":"calc(100% / 6 * 4)","4/6":"calc(100% / 4 * 6)","16/9":"calc(100% / 16 * 9)","9/16":"calc(100% / 9 * 16)","21/9":"calc(100% / 21 * 9)","9/21":"calc(100% / 9 * 21)","1/1":"100%"}[t]}const cc=C.forwardRef(({ratio:t,disabledEffect:e=!1,effect:n="blur",sx:r,...i},a)=>{const o=A.jsx(X.Box,{component:Pse.LazyLoadImage,wrapperClassName:"wrapper",effect:e?void 0:n,placeholderSrc:e?kse:Fse,sx:{width:1,height:1,objectFit:"cover"},...i});return t?A.jsx(X.Box,{ref:a,component:"span",sx:{width:1,lineHeight:1,display:"block",overflow:"hidden",position:"relative",pt:Bse(t),"& .wrapper":{top:0,left:0,width:1,height:1,position:"absolute",backgroundSize:"cover !important"},...r},children:o}):A.jsx(X.Box,{ref:a,component:"span",sx:{lineHeight:1,display:"block",overflow:"hidden",position:"relative","& .wrapper":{width:1,height:1,backgroundSize:"cover !important"},...r},children:o})});cc.displayName="Image";/*! *****************************************************************************
|
|
184
|
+
`)}return te}function qe(le,te){var ge={},_e=le.style||{};return _e.fontStyle&&Y(le).fontStyle==="italic"&&(ge.italic=!0),_e.fontWeight&&(Y(le).fontWeight.startsWith("bold")||parseInt(Y(le).fontWeight)>=700)&&(ge.bold=!0),Object.keys(ge).length>0&&(te=B(te,ge)),parseFloat(_e.textIndent||0)>0&&(te=new d.default().insert(" ").concat(te)),te}function Ye(le,te){var ge=le.data;if(le.parentNode.tagName==="O:P")return te.insert(ge.trim());if(ge.trim().length===0&&le.parentNode.classList.contains("ql-clipboard"))return te;if(!Y(le.parentNode).whiteSpace.startsWith("pre")){var _e=function(Me,ce){return ce=ce.replace(/[^\u00a0]/g,""),ce.length<1&&Me?" ":ce};ge=ge.replace(/\r\n/g," ").replace(/\n/g," "),ge=ge.replace(/\s\s+/g,_e.bind(_e,!0)),(le.previousSibling==null&&P(le.parentNode)||le.previousSibling!=null&&P(le.previousSibling))&&(ge=ge.replace(/^\s+/,_e.bind(_e,!1))),(le.nextSibling==null&&P(le.parentNode)||le.nextSibling!=null&&P(le.nextSibling))&&(ge=ge.replace(/\s+$/,_e.bind(_e,!1)))}return te.insert(ge)}r.default=k,r.matchAttributor=W,r.matchBlot=J,r.matchNewline=pe,r.matchSpacing=Ie,r.matchText=Ye},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function m(_,g){for(var h=0;h<g.length;h++){var E=g[h];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,g,h){return g&&m(_.prototype,g),h&&m(_,h),_}}(),o=function m(_,g,h){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,g);if(E===void 0){var v=Object.getPrototypeOf(_);return v===null?void 0:m(v,g,h)}else{if("value"in E)return E.value;var b=E.get;return b===void 0?void 0:b.call(h)}},s=i(6),l=c(s);function c(m){return m&&m.__esModule?m:{default:m}}function u(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")}function d(m,_){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:m}function p(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(m,_):m.__proto__=_)}var f=function(m){p(_,m);function _(){return u(this,_),d(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return a(_,[{key:"optimize",value:function(h){o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"optimize",this).call(this,h),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),_}(l.default);f.blotName="bold",f.tagName=["STRONG","B"],r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var a=function(){function R(w,D){var L=[],F=!0,H=!1,U=void 0;try{for(var Q=w[Symbol.iterator](),$;!(F=($=Q.next()).done)&&(L.push($.value),!(D&&L.length===D));F=!0);}catch(M){H=!0,U=M}finally{try{!F&&Q.return&&Q.return()}finally{if(H)throw U}}return L}return function(w,D){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return R(w,D);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function R(w,D){for(var L=0;L<D.length;L++){var F=D[L];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(w,F.key,F)}}return function(w,D,L){return D&&R(w.prototype,D),L&&R(w,L),w}}(),s=i(2),l=h(s),c=i(0),u=h(c),d=i(5),p=h(d),f=i(10),m=h(f),_=i(9),g=h(_);function h(R){return R&&R.__esModule?R:{default:R}}function E(R,w,D){return w in R?Object.defineProperty(R,w,{value:D,enumerable:!0,configurable:!0,writable:!0}):R[w]=D,R}function v(R,w){if(!(R instanceof w))throw new TypeError("Cannot call a class as a function")}function b(R,w){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:R}function S(R,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);R.prototype=Object.create(w&&w.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(R,w):R.__proto__=w)}var O=(0,m.default)("quill:toolbar"),y=function(R){S(w,R);function w(D,L){v(this,w);var F=b(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,D,L));if(Array.isArray(F.options.container)){var H=document.createElement("div");x(H,F.options.container),D.container.parentNode.insertBefore(H,D.container),F.container=H}else typeof F.options.container=="string"?F.container=document.querySelector(F.options.container):F.container=F.options.container;if(!(F.container instanceof HTMLElement)){var U;return U=O.error("Container required for toolbar",F.options),b(F,U)}return F.container.classList.add("ql-toolbar"),F.controls=[],F.handlers={},Object.keys(F.options.handlers).forEach(function(Q){F.addHandler(Q,F.options.handlers[Q])}),[].forEach.call(F.container.querySelectorAll("button, select"),function(Q){F.attach(Q)}),F.quill.on(p.default.events.EDITOR_CHANGE,function(Q,$){Q===p.default.events.SELECTION_CHANGE&&F.update($)}),F.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){var Q=F.quill.selection.getRange(),$=a(Q,1),M=$[0];F.update(M)}),F}return o(w,[{key:"addHandler",value:function(L,F){this.handlers[L]=F}},{key:"attach",value:function(L){var F=this,H=[].find.call(L.classList,function(Q){return Q.indexOf("ql-")===0});if(H){if(H=H.slice(3),L.tagName==="BUTTON"&&L.setAttribute("type","button"),this.handlers[H]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[H]==null){O.warn("ignoring attaching to disabled format",H,L);return}if(u.default.query(H)==null){O.warn("ignoring attaching to nonexistent format",H,L);return}}var U=L.tagName==="SELECT"?"change":"click";L.addEventListener(U,function(Q){var $=void 0;if(L.tagName==="SELECT"){if(L.selectedIndex<0)return;var M=L.options[L.selectedIndex];M.hasAttribute("selected")?$=!1:$=M.value||!1}else L.classList.contains("ql-active")?$=!1:$=L.value||!L.hasAttribute("value"),Q.preventDefault();F.quill.focus();var I=F.quill.selection.getRange(),k=a(I,1),B=k[0];if(F.handlers[H]!=null)F.handlers[H].call(F,$);else if(u.default.query(H).prototype instanceof u.default.Embed){if($=prompt("Enter "+H),!$)return;F.quill.updateContents(new l.default().retain(B.index).delete(B.length).insert(E({},H,$)),p.default.sources.USER)}else F.quill.format(H,$,p.default.sources.USER);F.update(B)}),this.controls.push([H,L])}}},{key:"update",value:function(L){var F=L==null?{}:this.quill.getFormat(L);this.controls.forEach(function(H){var U=a(H,2),Q=U[0],$=U[1];if($.tagName==="SELECT"){var M=void 0;if(L==null)M=null;else if(F[Q]==null)M=$.querySelector("option[selected]");else if(!Array.isArray(F[Q])){var I=F[Q];typeof I=="string"&&(I=I.replace(/\"/g,'\\"')),M=$.querySelector('option[value="'+I+'"]')}M==null?($.value="",$.selectedIndex=-1):M.selected=!0}else if(L==null)$.classList.remove("ql-active");else if($.hasAttribute("value")){var k=F[Q]===$.getAttribute("value")||F[Q]!=null&&F[Q].toString()===$.getAttribute("value")||F[Q]==null&&!$.getAttribute("value");$.classList.toggle("ql-active",k)}else $.classList.toggle("ql-active",F[Q]!=null)})}}]),w}(g.default);y.DEFAULTS={};function T(R,w,D){var L=document.createElement("button");L.setAttribute("type","button"),L.classList.add("ql-"+w),D!=null&&(L.value=D),R.appendChild(L)}function x(R,w){Array.isArray(w[0])||(w=[w]),w.forEach(function(D){var L=document.createElement("span");L.classList.add("ql-formats"),D.forEach(function(F){if(typeof F=="string")T(L,F);else{var H=Object.keys(F)[0],U=F[H];Array.isArray(U)?N(L,H,U):T(L,H,U)}}),R.appendChild(L)})}function N(R,w,D){var L=document.createElement("select");L.classList.add("ql-"+w),D.forEach(function(F){var H=document.createElement("option");F!==!1?H.setAttribute("value",F):H.setAttribute("selected","selected"),L.appendChild(H)}),R.appendChild(L)}y.DEFAULTS={container:null,handlers:{clean:function(){var w=this,D=this.quill.getSelection();if(D!=null)if(D.length==0){var L=this.quill.getFormat();Object.keys(L).forEach(function(F){u.default.query(F,u.default.Scope.INLINE)!=null&&w.quill.format(F,!1)})}else this.quill.removeFormat(D,p.default.sources.USER)},direction:function(w){var D=this.quill.getFormat().align;w==="rtl"&&D==null?this.quill.format("align","right",p.default.sources.USER):!w&&D==="right"&&this.quill.format("align",!1,p.default.sources.USER),this.quill.format("direction",w,p.default.sources.USER)},indent:function(w){var D=this.quill.getSelection(),L=this.quill.getFormat(D),F=parseInt(L.indent||0);if(w==="+1"||w==="-1"){var H=w==="+1"?1:-1;L.direction==="rtl"&&(H*=-1),this.quill.format("indent",F+H,p.default.sources.USER)}},link:function(w){w===!0&&(w=prompt("Enter link URL:")),this.quill.format("link",w,p.default.sources.USER)},list:function(w){var D=this.quill.getSelection(),L=this.quill.getFormat(D);w==="check"?L.list==="checked"||L.list==="unchecked"?this.quill.format("list",!1,p.default.sources.USER):this.quill.format("list","unchecked",p.default.sources.USER):this.quill.format("list",w,p.default.sources.USER)}}},r.default=y,r.addControls=x},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function m(_,g){for(var h=0;h<g.length;h++){var E=g[h];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,g,h){return g&&m(_.prototype,g),h&&m(_,h),_}}(),o=function m(_,g,h){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,g);if(E===void 0){var v=Object.getPrototypeOf(_);return v===null?void 0:m(v,g,h)}else{if("value"in E)return E.value;var b=E.get;return b===void 0?void 0:b.call(h)}},s=i(28),l=c(s);function c(m){return m&&m.__esModule?m:{default:m}}function u(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")}function d(m,_){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:m}function p(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(m,_):m.__proto__=_)}var f=function(m){p(_,m);function _(g,h){u(this,_);var E=d(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,g));return E.label.innerHTML=h,E.container.classList.add("ql-color-picker"),[].slice.call(E.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(v){v.classList.add("ql-primary")}),E}return a(_,[{key:"buildItem",value:function(h){var E=o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"buildItem",this).call(this,h);return E.style.backgroundColor=h.getAttribute("value")||"",E}},{key:"selectItem",value:function(h,E){o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"selectItem",this).call(this,h,E);var v=this.label.querySelector(".ql-color-label"),b=h&&h.getAttribute("data-value")||"";v&&(v.tagName==="line"?v.style.stroke=b:v.style.fill=b)}}]),_}(l.default);r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function m(_,g){for(var h=0;h<g.length;h++){var E=g[h];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,g,h){return g&&m(_.prototype,g),h&&m(_,h),_}}(),o=function m(_,g,h){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,g);if(E===void 0){var v=Object.getPrototypeOf(_);return v===null?void 0:m(v,g,h)}else{if("value"in E)return E.value;var b=E.get;return b===void 0?void 0:b.call(h)}},s=i(28),l=c(s);function c(m){return m&&m.__esModule?m:{default:m}}function u(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")}function d(m,_){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:m}function p(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(m,_):m.__proto__=_)}var f=function(m){p(_,m);function _(g,h){u(this,_);var E=d(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,g));return E.container.classList.add("ql-icon-picker"),[].forEach.call(E.container.querySelectorAll(".ql-picker-item"),function(v){v.innerHTML=h[v.getAttribute("data-value")||""]}),E.defaultItem=E.container.querySelector(".ql-selected"),E.selectItem(E.defaultItem),E}return a(_,[{key:"selectItem",value:function(h,E){o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"selectItem",this).call(this,h,E),h=h||this.defaultItem,this.label.innerHTML=h.innerHTML}}]),_}(l.default);r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function l(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}return function(c,u,d){return u&&l(c.prototype,u),d&&l(c,d),c}}();function o(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}var s=function(){function l(c,u){var d=this;o(this,l),this.quill=c,this.boundsContainer=u||document.body,this.root=c.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){d.root.style.marginTop=-1*d.quill.root.scrollTop+"px"}),this.hide()}return a(l,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(u){var d=u.left+u.width/2-this.root.offsetWidth/2,p=u.bottom+this.quill.root.scrollTop;this.root.style.left=d+"px",this.root.style.top=p+"px",this.root.classList.remove("ql-flip");var f=this.boundsContainer.getBoundingClientRect(),m=this.root.getBoundingClientRect(),_=0;if(m.right>f.right&&(_=f.right-m.right,this.root.style.left=d+_+"px"),m.left<f.left&&(_=f.left-m.left,this.root.style.left=d+_+"px"),m.bottom>f.bottom){var g=m.bottom-m.top,h=u.bottom-u.top+g;this.root.style.top=p-h+"px",this.root.classList.add("ql-flip")}return _}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),l}();r.default=s},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function N(R,w){var D=[],L=!0,F=!1,H=void 0;try{for(var U=R[Symbol.iterator](),Q;!(L=(Q=U.next()).done)&&(D.push(Q.value),!(w&&D.length===w));L=!0);}catch($){F=!0,H=$}finally{try{!L&&U.return&&U.return()}finally{if(F)throw H}}return D}return function(R,w){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return N(R,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function N(R,w,D){R===null&&(R=Function.prototype);var L=Object.getOwnPropertyDescriptor(R,w);if(L===void 0){var F=Object.getPrototypeOf(R);return F===null?void 0:N(F,w,D)}else{if("value"in L)return L.value;var H=L.get;return H===void 0?void 0:H.call(D)}},s=function(){function N(R,w){for(var D=0;D<w.length;D++){var L=w[D];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(R,L.key,L)}}return function(R,w,D){return w&&N(R.prototype,w),D&&N(R,D),R}}(),l=i(3),c=v(l),u=i(8),d=v(u),p=i(43),f=v(p),m=i(27),_=v(m),g=i(15),h=i(41),E=v(h);function v(N){return N&&N.__esModule?N:{default:N}}function b(N,R){if(!(N instanceof R))throw new TypeError("Cannot call a class as a function")}function S(N,R){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:N}function O(N,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);N.prototype=Object.create(R&&R.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(N,R):N.__proto__=R)}var y=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],T=function(N){O(R,N);function R(w,D){b(this,R),D.modules.toolbar!=null&&D.modules.toolbar.container==null&&(D.modules.toolbar.container=y);var L=S(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,w,D));return L.quill.container.classList.add("ql-snow"),L}return s(R,[{key:"extendToolbar",value:function(D){D.container.classList.add("ql-snow"),this.buildButtons([].slice.call(D.container.querySelectorAll("button")),E.default),this.buildPickers([].slice.call(D.container.querySelectorAll("select")),E.default),this.tooltip=new x(this.quill,this.options.bounds),D.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(L,F){D.handlers.link.call(D,!F.format.link)})}}]),R}(f.default);T.DEFAULTS=(0,c.default)(!0,{},f.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(R){if(R){var w=this.quill.getSelection();if(w==null||w.length==0)return;var D=this.quill.getText(w);/^\S+@\S+\.\S+$/.test(D)&&D.indexOf("mailto:")!==0&&(D="mailto:"+D);var L=this.quill.theme.tooltip;L.edit("link",D)}else this.quill.format("link",!1)}}}}});var x=function(N){O(R,N);function R(w,D){b(this,R);var L=S(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,w,D));return L.preview=L.root.querySelector("a.ql-preview"),L}return s(R,[{key:"listen",value:function(){var D=this;o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(L){D.root.classList.contains("ql-editing")?D.save():D.edit("link",D.preview.textContent),L.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(L){if(D.linkRange!=null){var F=D.linkRange;D.restoreFocus(),D.quill.formatText(F,"link",!1,d.default.sources.USER),delete D.linkRange}L.preventDefault(),D.hide()}),this.quill.on(d.default.events.SELECTION_CHANGE,function(L,F,H){if(L!=null){if(L.length===0&&H===d.default.sources.USER){var U=D.quill.scroll.descendant(_.default,L.index),Q=a(U,2),$=Q[0],M=Q[1];if($!=null){D.linkRange=new g.Range(L.index-M,$.length());var I=_.default.formats($.domNode);D.preview.textContent=I,D.preview.setAttribute("href",I),D.show(),D.position(D.quill.getBounds(D.linkRange));return}}else delete D.linkRange;D.hide()}})}},{key:"show",value:function(){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),R}(p.BaseTooltip);x.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),r.default=T},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(29),o=ae(a),s=i(36),l=i(38),c=i(64),u=i(65),d=ae(u),p=i(66),f=ae(p),m=i(67),_=ae(m),g=i(37),h=i(26),E=i(39),v=i(40),b=i(56),S=ae(b),O=i(68),y=ae(O),T=i(27),x=ae(T),N=i(69),R=ae(N),w=i(70),D=ae(w),L=i(71),F=ae(L),H=i(72),U=ae(H),Q=i(73),$=ae(Q),M=i(13),I=ae(M),k=i(74),B=ae(k),Y=i(75),q=ae(Y),P=i(57),G=ae(P),z=i(41),W=ae(z),J=i(28),se=ae(J),ne=i(59),he=ae(ne),pe=i(60),Ie=ae(pe),qe=i(61),Ye=ae(qe),le=i(108),te=ae(le),ge=i(62),_e=ae(ge);function ae(Me){return Me&&Me.__esModule?Me:{default:Me}}o.default.register({"attributors/attribute/direction":l.DirectionAttribute,"attributors/class/align":s.AlignClass,"attributors/class/background":g.BackgroundClass,"attributors/class/color":h.ColorClass,"attributors/class/direction":l.DirectionClass,"attributors/class/font":E.FontClass,"attributors/class/size":v.SizeClass,"attributors/style/align":s.AlignStyle,"attributors/style/background":g.BackgroundStyle,"attributors/style/color":h.ColorStyle,"attributors/style/direction":l.DirectionStyle,"attributors/style/font":E.FontStyle,"attributors/style/size":v.SizeStyle},!0),o.default.register({"formats/align":s.AlignClass,"formats/direction":l.DirectionClass,"formats/indent":c.IndentClass,"formats/background":g.BackgroundStyle,"formats/color":h.ColorStyle,"formats/font":E.FontClass,"formats/size":v.SizeClass,"formats/blockquote":d.default,"formats/code-block":I.default,"formats/header":f.default,"formats/list":_.default,"formats/bold":S.default,"formats/code":M.Code,"formats/italic":y.default,"formats/link":x.default,"formats/script":R.default,"formats/strike":D.default,"formats/underline":F.default,"formats/image":U.default,"formats/video":$.default,"formats/list/item":m.ListItem,"modules/formula":B.default,"modules/syntax":q.default,"modules/toolbar":G.default,"themes/bubble":te.default,"themes/snow":_e.default,"ui/icons":W.default,"ui/picker":se.default,"ui/icon-picker":Ie.default,"ui/color-picker":he.default,"ui/tooltip":Ye.default},!0),r.default=o.default},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var a=function(){function _(g,h){for(var E=0;E<h.length;E++){var v=h[E];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,v.key,v)}}return function(g,h,E){return h&&_(g.prototype,h),E&&_(g,E),g}}(),o=function _(g,h,E){g===null&&(g=Function.prototype);var v=Object.getOwnPropertyDescriptor(g,h);if(v===void 0){var b=Object.getPrototypeOf(g);return b===null?void 0:_(b,h,E)}else{if("value"in v)return v.value;var S=v.get;return S===void 0?void 0:S.call(E)}},s=i(0),l=c(s);function c(_){return _&&_.__esModule?_:{default:_}}function u(_,g){if(!(_ instanceof g))throw new TypeError("Cannot call a class as a function")}function d(_,g){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:_}function p(_,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);_.prototype=Object.create(g&&g.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(_,g):_.__proto__=g)}var f=function(_){p(g,_);function g(){return u(this,g),d(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return a(g,[{key:"add",value:function(E,v){if(v==="+1"||v==="-1"){var b=this.value(E)||0;v=v==="+1"?b+1:b-1}return v===0?(this.remove(E),!0):o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"add",this).call(this,E,v)}},{key:"canAdd",value:function(E,v){return o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"canAdd",this).call(this,E,v)||o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"canAdd",this).call(this,E,parseInt(v))}},{key:"value",value:function(E){return parseInt(o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"value",this).call(this,E))||void 0}}]),g}(l.default.Attributor.Class),m=new f("indent","ql-indent",{scope:l.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=m},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(4),o=s(a);function s(p){return p&&p.__esModule?p:{default:p}}function l(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}function c(p,f){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:p}function u(p,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);p.prototype=Object.create(f&&f.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(p,f):p.__proto__=f)}var d=function(p){u(f,p);function f(){return l(this,f),c(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);d.blotName="blockquote",d.tagName="blockquote",r.default=d},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function f(m,_){for(var g=0;g<_.length;g++){var h=_[g];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(m,h.key,h)}}return function(m,_,g){return _&&f(m.prototype,_),g&&f(m,g),m}}(),o=i(4),s=l(o);function l(f){return f&&f.__esModule?f:{default:f}}function c(f,m){if(!(f instanceof m))throw new TypeError("Cannot call a class as a function")}function u(f,m){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:f}function d(f,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);f.prototype=Object.create(m&&m.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(f,m):f.__proto__=m)}var p=function(f){d(m,f);function m(){return c(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,null,[{key:"formats",value:function(g){return this.tagName.indexOf(g.tagName)+1}}]),m}(s.default);p.blotName="header",p.tagName=["H1","H2","H3","H4","H5","H6"],r.default=p},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var a=function(){function b(S,O){for(var y=0;y<O.length;y++){var T=O[y];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(S,T.key,T)}}return function(S,O,y){return O&&b(S.prototype,O),y&&b(S,y),S}}(),o=function b(S,O,y){S===null&&(S=Function.prototype);var T=Object.getOwnPropertyDescriptor(S,O);if(T===void 0){var x=Object.getPrototypeOf(S);return x===null?void 0:b(x,O,y)}else{if("value"in T)return T.value;var N=T.get;return N===void 0?void 0:N.call(y)}},s=i(0),l=f(s),c=i(4),u=f(c),d=i(25),p=f(d);function f(b){return b&&b.__esModule?b:{default:b}}function m(b,S,O){return S in b?Object.defineProperty(b,S,{value:O,enumerable:!0,configurable:!0,writable:!0}):b[S]=O,b}function _(b,S){if(!(b instanceof S))throw new TypeError("Cannot call a class as a function")}function g(b,S){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:b}function h(b,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);b.prototype=Object.create(S&&S.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(b,S):b.__proto__=S)}var E=function(b){h(S,b);function S(){return _(this,S),g(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return a(S,[{key:"format",value:function(y,T){y===v.blotName&&!T?this.replaceWith(l.default.create(this.statics.scope)):o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"format",this).call(this,y,T)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(y,T){return this.parent.isolate(this.offset(this.parent),this.length()),y===this.parent.statics.blotName?(this.parent.replaceWith(y,T),this):(this.parent.unwrap(),o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replaceWith",this).call(this,y,T))}}],[{key:"formats",value:function(y){return y.tagName===this.tagName?void 0:o(S.__proto__||Object.getPrototypeOf(S),"formats",this).call(this,y)}}]),S}(u.default);E.blotName="list-item",E.tagName="LI";var v=function(b){h(S,b),a(S,null,[{key:"create",value:function(y){var T=y==="ordered"?"OL":"UL",x=o(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,T);return(y==="checked"||y==="unchecked")&&x.setAttribute("data-checked",y==="checked"),x}},{key:"formats",value:function(y){if(y.tagName==="OL")return"ordered";if(y.tagName==="UL")return y.hasAttribute("data-checked")?y.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function S(O){_(this,S);var y=g(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,O)),T=function(N){if(N.target.parentNode===O){var R=y.statics.formats(O),w=l.default.find(N.target);R==="checked"?w.format("list","unchecked"):R==="unchecked"&&w.format("list","checked")}};return O.addEventListener("touchstart",T),O.addEventListener("mousedown",T),y}return a(S,[{key:"format",value:function(y,T){this.children.length>0&&this.children.tail.format(y,T)}},{key:"formats",value:function(){return m({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(y,T){if(y instanceof E)o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertBefore",this).call(this,y,T);else{var x=T==null?this.length():T.offset(this),N=this.split(x);N.parent.insertBefore(y,N)}}},{key:"optimize",value:function(y){o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"optimize",this).call(this,y);var T=this.next;T!=null&&T.prev===this&&T.statics.blotName===this.statics.blotName&&T.domNode.tagName===this.domNode.tagName&&T.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(T.moveChildren(this),T.remove())}},{key:"replace",value:function(y){if(y.statics.blotName!==this.statics.blotName){var T=l.default.create(this.statics.defaultChild);y.moveChildren(T),this.appendChild(T)}o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replace",this).call(this,y)}}]),S}(p.default);v.blotName="list",v.scope=l.default.Scope.BLOCK_BLOT,v.tagName=["OL","UL"],v.defaultChild="list-item",v.allowedChildren=[E],r.ListItem=E,r.default=v},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(56),o=s(a);function s(p){return p&&p.__esModule?p:{default:p}}function l(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}function c(p,f){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:p}function u(p,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);p.prototype=Object.create(f&&f.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(p,f):p.__proto__=f)}var d=function(p){u(f,p);function f(){return l(this,f),c(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);d.blotName="italic",d.tagName=["EM","I"],r.default=d},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function m(_,g){for(var h=0;h<g.length;h++){var E=g[h];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,g,h){return g&&m(_.prototype,g),h&&m(_,h),_}}(),o=function m(_,g,h){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,g);if(E===void 0){var v=Object.getPrototypeOf(_);return v===null?void 0:m(v,g,h)}else{if("value"in E)return E.value;var b=E.get;return b===void 0?void 0:b.call(h)}},s=i(6),l=c(s);function c(m){return m&&m.__esModule?m:{default:m}}function u(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")}function d(m,_){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:m}function p(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(m,_):m.__proto__=_)}var f=function(m){p(_,m);function _(){return u(this,_),d(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return a(_,null,[{key:"create",value:function(h){return h==="super"?document.createElement("sup"):h==="sub"?document.createElement("sub"):o(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,h)}},{key:"formats",value:function(h){if(h.tagName==="SUB")return"sub";if(h.tagName==="SUP")return"super"}}]),_}(l.default);f.blotName="script",f.tagName=["SUB","SUP"],r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(6),o=s(a);function s(p){return p&&p.__esModule?p:{default:p}}function l(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}function c(p,f){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:p}function u(p,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);p.prototype=Object.create(f&&f.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(p,f):p.__proto__=f)}var d=function(p){u(f,p);function f(){return l(this,f),c(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);d.blotName="strike",d.tagName="S",r.default=d},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(6),o=s(a);function s(p){return p&&p.__esModule?p:{default:p}}function l(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}function c(p,f){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:p}function u(p,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);p.prototype=Object.create(f&&f.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(p,f):p.__proto__=f)}var d=function(p){u(f,p);function f(){return l(this,f),c(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);d.blotName="underline",d.tagName="U",r.default=d},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function g(h,E){for(var v=0;v<E.length;v++){var b=E[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(h,b.key,b)}}return function(h,E,v){return E&&g(h.prototype,E),v&&g(h,v),h}}(),o=function g(h,E,v){h===null&&(h=Function.prototype);var b=Object.getOwnPropertyDescriptor(h,E);if(b===void 0){var S=Object.getPrototypeOf(h);return S===null?void 0:g(S,E,v)}else{if("value"in b)return b.value;var O=b.get;return O===void 0?void 0:O.call(v)}},s=i(0),l=u(s),c=i(27);function u(g){return g&&g.__esModule?g:{default:g}}function d(g,h){if(!(g instanceof h))throw new TypeError("Cannot call a class as a function")}function p(g,h){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:g}function f(g,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);g.prototype=Object.create(h&&h.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(g,h):g.__proto__=h)}var m=["alt","height","width"],_=function(g){f(h,g);function h(){return d(this,h),p(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return a(h,[{key:"format",value:function(v,b){m.indexOf(v)>-1?b?this.domNode.setAttribute(v,b):this.domNode.removeAttribute(v):o(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"format",this).call(this,v,b)}}],[{key:"create",value:function(v){var b=o(h.__proto__||Object.getPrototypeOf(h),"create",this).call(this,v);return typeof v=="string"&&b.setAttribute("src",this.sanitize(v)),b}},{key:"formats",value:function(v){return m.reduce(function(b,S){return v.hasAttribute(S)&&(b[S]=v.getAttribute(S)),b},{})}},{key:"match",value:function(v){return/\.(jpe?g|gif|png)$/.test(v)||/^data:image\/.+;base64/.test(v)}},{key:"sanitize",value:function(v){return(0,c.sanitize)(v,["http","https","data"])?v:"//:0"}},{key:"value",value:function(v){return v.getAttribute("src")}}]),h}(l.default.Embed);_.blotName="image",_.tagName="IMG",r.default=_},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function g(h,E){for(var v=0;v<E.length;v++){var b=E[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(h,b.key,b)}}return function(h,E,v){return E&&g(h.prototype,E),v&&g(h,v),h}}(),o=function g(h,E,v){h===null&&(h=Function.prototype);var b=Object.getOwnPropertyDescriptor(h,E);if(b===void 0){var S=Object.getPrototypeOf(h);return S===null?void 0:g(S,E,v)}else{if("value"in b)return b.value;var O=b.get;return O===void 0?void 0:O.call(v)}},s=i(4),l=i(27),c=u(l);function u(g){return g&&g.__esModule?g:{default:g}}function d(g,h){if(!(g instanceof h))throw new TypeError("Cannot call a class as a function")}function p(g,h){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:g}function f(g,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);g.prototype=Object.create(h&&h.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(g,h):g.__proto__=h)}var m=["height","width"],_=function(g){f(h,g);function h(){return d(this,h),p(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return a(h,[{key:"format",value:function(v,b){m.indexOf(v)>-1?b?this.domNode.setAttribute(v,b):this.domNode.removeAttribute(v):o(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"format",this).call(this,v,b)}}],[{key:"create",value:function(v){var b=o(h.__proto__||Object.getPrototypeOf(h),"create",this).call(this,v);return b.setAttribute("frameborder","0"),b.setAttribute("allowfullscreen",!0),b.setAttribute("src",this.sanitize(v)),b}},{key:"formats",value:function(v){return m.reduce(function(b,S){return v.hasAttribute(S)&&(b[S]=v.getAttribute(S)),b},{})}},{key:"sanitize",value:function(v){return c.default.sanitize(v)}},{key:"value",value:function(v){return v.getAttribute("src")}}]),h}(s.BlockEmbed);_.blotName="video",_.className="ql-video",_.tagName="IFRAME",r.default=_},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var a=function(){function v(b,S){for(var O=0;O<S.length;O++){var y=S[O];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(b,y.key,y)}}return function(b,S,O){return S&&v(b.prototype,S),O&&v(b,O),b}}(),o=function v(b,S,O){b===null&&(b=Function.prototype);var y=Object.getOwnPropertyDescriptor(b,S);if(y===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:v(T,S,O)}else{if("value"in y)return y.value;var x=y.get;return x===void 0?void 0:x.call(O)}},s=i(35),l=f(s),c=i(5),u=f(c),d=i(9),p=f(d);function f(v){return v&&v.__esModule?v:{default:v}}function m(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function _(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function g(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var h=function(v){g(b,v);function b(){return m(this,b),_(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return a(b,null,[{key:"create",value:function(O){var y=o(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,O);return typeof O=="string"&&(window.katex.render(O,y,{throwOnError:!1,errorColor:"#f00"}),y.setAttribute("data-value",O)),y}},{key:"value",value:function(O){return O.getAttribute("data-value")}}]),b}(l.default);h.blotName="formula",h.className="ql-formula",h.tagName="SPAN";var E=function(v){g(b,v),a(b,null,[{key:"register",value:function(){u.default.register(h,!0)}}]);function b(){m(this,b);var S=_(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return S}return b}(p.default);r.FormulaBlot=h,r.default=E},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var a=function(){function O(y,T){for(var x=0;x<T.length;x++){var N=T[x];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(y,N.key,N)}}return function(y,T,x){return T&&O(y.prototype,T),x&&O(y,x),y}}(),o=function O(y,T,x){y===null&&(y=Function.prototype);var N=Object.getOwnPropertyDescriptor(y,T);if(N===void 0){var R=Object.getPrototypeOf(y);return R===null?void 0:O(R,T,x)}else{if("value"in N)return N.value;var w=N.get;return w===void 0?void 0:w.call(x)}},s=i(0),l=_(s),c=i(5),u=_(c),d=i(9),p=_(d),f=i(13),m=_(f);function _(O){return O&&O.__esModule?O:{default:O}}function g(O,y){if(!(O instanceof y))throw new TypeError("Cannot call a class as a function")}function h(O,y){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:O}function E(O,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);O.prototype=Object.create(y&&y.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(O,y):O.__proto__=y)}var v=function(O){E(y,O);function y(){return g(this,y),h(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,[{key:"replaceWith",value:function(x){this.domNode.textContent=this.domNode.textContent,this.attach(),o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"replaceWith",this).call(this,x)}},{key:"highlight",value:function(x){var N=this.domNode.textContent;this.cachedText!==N&&((N.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=x(N),this.domNode.normalize(),this.attach()),this.cachedText=N)}}]),y}(m.default);v.className="ql-syntax";var b=new l.default.Attributor.Class("token","hljs",{scope:l.default.Scope.INLINE}),S=function(O){E(y,O),a(y,null,[{key:"register",value:function(){u.default.register(b,!0),u.default.register(v,!0)}}]);function y(T,x){g(this,y);var N=h(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,T,x));if(typeof N.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var R=null;return N.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(R),R=setTimeout(function(){N.highlight(),R=null},N.options.interval)}),N.highlight(),N}return a(y,[{key:"highlight",value:function(){var x=this;if(!this.quill.selection.composing){this.quill.update(u.default.sources.USER);var N=this.quill.getSelection();this.quill.scroll.descendants(v).forEach(function(R){R.highlight(x.options.highlight)}),this.quill.update(u.default.sources.SILENT),N!=null&&this.quill.setSelection(N,u.default.sources.SILENT)}}}]),y}(p.default);S.DEFAULTS={highlight:function(){return window.hljs==null?null:function(O){var y=window.hljs.highlightAuto(O);return y.value}}(),interval:1e3},r.CodeBlock=v,r.CodeToken=b,r.default=S},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var a=function y(T,x,N){T===null&&(T=Function.prototype);var R=Object.getOwnPropertyDescriptor(T,x);if(R===void 0){var w=Object.getPrototypeOf(T);return w===null?void 0:y(w,x,N)}else{if("value"in R)return R.value;var D=R.get;return D===void 0?void 0:D.call(N)}},o=function(){function y(T,x){for(var N=0;N<x.length;N++){var R=x[N];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(T,R.key,R)}}return function(T,x,N){return x&&y(T.prototype,x),N&&y(T,N),T}}(),s=i(3),l=g(s),c=i(8),u=g(c),d=i(43),p=g(d),f=i(15),m=i(41),_=g(m);function g(y){return y&&y.__esModule?y:{default:y}}function h(y,T){if(!(y instanceof T))throw new TypeError("Cannot call a class as a function")}function E(y,T){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:y}function v(y,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);y.prototype=Object.create(T&&T.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(y,T):y.__proto__=T)}var b=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],S=function(y){v(T,y);function T(x,N){h(this,T),N.modules.toolbar!=null&&N.modules.toolbar.container==null&&(N.modules.toolbar.container=b);var R=E(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,x,N));return R.quill.container.classList.add("ql-bubble"),R}return o(T,[{key:"extendToolbar",value:function(N){this.tooltip=new O(this.quill,this.options.bounds),this.tooltip.root.appendChild(N.container),this.buildButtons([].slice.call(N.container.querySelectorAll("button")),_.default),this.buildPickers([].slice.call(N.container.querySelectorAll("select")),_.default)}}]),T}(p.default);S.DEFAULTS=(0,l.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(T){T?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var O=function(y){v(T,y);function T(x,N){h(this,T);var R=E(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,x,N));return R.quill.on(u.default.events.EDITOR_CHANGE,function(w,D,L,F){if(w===u.default.events.SELECTION_CHANGE)if(D!=null&&D.length>0&&F===u.default.sources.USER){R.show(),R.root.style.left="0px",R.root.style.width="",R.root.style.width=R.root.offsetWidth+"px";var H=R.quill.getLines(D.index,D.length);if(H.length===1)R.position(R.quill.getBounds(D));else{var U=H[H.length-1],Q=R.quill.getIndex(U),$=Math.min(U.length()-1,D.index+D.length-Q),M=R.quill.getBounds(new f.Range(Q,$));R.position(M)}}else document.activeElement!==R.textbox&&R.quill.hasFocus()&&R.hide()}),R}return o(T,[{key:"listen",value:function(){var N=this;a(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){N.root.classList.remove("ql-editing")}),this.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!N.root.classList.contains("ql-hidden")){var R=N.quill.getSelection();R!=null&&N.position(N.quill.getBounds(R))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(N){var R=a(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"position",this).call(this,N),w=this.root.querySelector(".ql-tooltip-arrow");if(w.style.marginLeft="",R===0)return R;w.style.marginLeft=-1*R-w.offsetWidth/2+"px"}}]),T}(d.BaseTooltip);O.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),r.BubbleTooltip=O,r.default=S},function(n,r,i){n.exports=i(63)}]).default})})(b1);var Tse=b1.exports,Ose=Jt&&Jt.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),sc=Jt&&Jt.__assign||function(){return sc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},sc.apply(this,arguments)},Cse=Jt&&Jt.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r},lc=Jt&&Jt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Hn=lc(C),Rse=lc(Jo),jo=lc(E1),v1=lc(Tse),Nse=function(t){Ose(e,t);function e(n){var r=t.call(this,n)||this;r.dirtyProps=["modules","formats","bounds","theme","children"],r.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],r.state={generation:0},r.selection=null,r.onEditorChange=function(a,o,s,l){var c,u,d,p;a==="text-change"?(u=(c=r).onEditorChangeText)===null||u===void 0||u.call(c,r.editor.root.innerHTML,o,l,r.unprivilegedEditor):a==="selection-change"&&((p=(d=r).onEditorChangeSelection)===null||p===void 0||p.call(d,o,l,r.unprivilegedEditor))};var i=r.isControlled()?n.value:n.defaultValue;return r.value=i??"",r}return e.prototype.validateProps=function(n){var r;if(Hn.default.Children.count(n.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(Hn.default.Children.count(n.children)){var i=Hn.default.Children.only(n.children);if(((r=i)===null||r===void 0?void 0:r.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&n.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")},e.prototype.shouldComponentUpdate=function(n,r){var i=this,a;if(this.validateProps(n),!this.editor||this.state.generation!==r.generation)return!0;if("value"in n){var o=this.getEditorContents(),s=(a=n.value,a??"");this.isEqualValue(s,o)||this.setEditorContents(this.editor,s)}return n.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,n.readOnly),Cse(this.cleanProps,this.dirtyProps).some(function(l){return!jo.default(n[l],i.props[l])})},e.prototype.shouldComponentRegenerate=function(n){var r=this;return this.dirtyProps.some(function(i){return!jo.default(n[i],r.props[i])})},e.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},e.prototype.componentWillUnmount=function(){this.destroyEditor()},e.prototype.componentDidUpdate=function(n,r){var i=this;if(this.editor&&this.shouldComponentRegenerate(n)){var a=this.editor.getContents(),o=this.editor.getSelection();this.regenerationSnapshot={delta:a,selection:o},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==r.generation){var s=this.regenerationSnapshot,a=s.delta,l=s.selection;delete this.regenerationSnapshot,this.instantiateEditor();var c=this.editor;c.setContents(a),S1(function(){return i.setEditorSelection(c,l)})}},e.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},e.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},e.prototype.isControlled=function(){return"value"in this.props},e.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}},e.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},e.prototype.createEditor=function(n,r){var i=new v1.default(n,r);return r.tabIndex!=null&&this.setEditorTabIndex(i,r.tabIndex),this.hookEditor(i),i},e.prototype.hookEditor=function(n){this.unprivilegedEditor=this.makeUnprivilegedEditor(n),n.on("editor-change",this.onEditorChange)},e.prototype.unhookEditor=function(n){n.off("editor-change",this.onEditorChange)},e.prototype.getEditorContents=function(){return this.value},e.prototype.getEditorSelection=function(){return this.selection},e.prototype.isDelta=function(n){return n&&n.ops},e.prototype.isEqualValue=function(n,r){return this.isDelta(n)&&this.isDelta(r)?jo.default(n.ops,r.ops):jo.default(n,r)},e.prototype.setEditorContents=function(n,r){var i=this;this.value=r;var a=this.getEditorSelection();typeof r=="string"?n.setContents(n.clipboard.convert(r)):n.setContents(r),S1(function(){return i.setEditorSelection(n,a)})},e.prototype.setEditorSelection=function(n,r){if(this.selection=r,r){var i=n.getLength();r.index=Math.max(0,Math.min(r.index,i-1)),r.length=Math.max(0,Math.min(r.length,i-1-r.index)),n.setSelection(r)}},e.prototype.setEditorTabIndex=function(n,r){var i,a;!((a=(i=n)===null||i===void 0?void 0:i.scroll)===null||a===void 0)&&a.domNode&&(n.scroll.domNode.tabIndex=r)},e.prototype.setEditorReadOnly=function(n,r){r?n.disable():n.enable()},e.prototype.makeUnprivilegedEditor=function(n){var r=n;return{getHTML:function(){return r.root.innerHTML},getLength:r.getLength.bind(r),getText:r.getText.bind(r),getContents:r.getContents.bind(r),getSelection:r.getSelection.bind(r),getBounds:r.getBounds.bind(r)}},e.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var n=Rse.default.findDOMNode(this.editingArea);if(!n)throw new Error("Cannot find element for editing area");if(n.nodeType===3)throw new Error("Editing area cannot be a text node");return n},e.prototype.renderEditingArea=function(){var n=this,r=this.props,i=r.children,a=r.preserveWhitespace,o=this.state.generation,s={key:o,ref:function(l){n.editingArea=l}};return Hn.default.Children.count(i)?Hn.default.cloneElement(Hn.default.Children.only(i),s):a?Hn.default.createElement("pre",sc({},s)):Hn.default.createElement("div",sc({},s))},e.prototype.render=function(){var n;return Hn.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(n=this.props.className,n??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},e.prototype.onEditorChangeText=function(n,r,i,a){var o,s;if(this.editor){var l=this.isDelta(this.value)?a.getContents():a.getHTML();l!==this.getEditorContents()&&(this.lastDeltaChangeSet=r,this.value=l,(s=(o=this.props).onChange)===null||s===void 0||s.call(o,n,r,i,a))}},e.prototype.onEditorChangeSelection=function(n,r,i){var a,o,s,l,c,u;if(this.editor){var d=this.getEditorSelection(),p=!d&&n,f=d&&!n;jo.default(n,d)||(this.selection=n,(o=(a=this.props).onChangeSelection)===null||o===void 0||o.call(a,n,r,i),p?(l=(s=this.props).onFocus)===null||l===void 0||l.call(s,n,r,i):f&&((u=(c=this.props).onBlur)===null||u===void 0||u.call(c,d,r,i)))}},e.prototype.focus=function(){this.editor&&this.editor.focus()},e.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},e.displayName="React Quill",e.Quill=v1.default,e.defaultProps={theme:"snow",modules:{},readOnly:!1},e}(Hn.default.Component);function S1(t){Promise.resolve().then(t)}var Ase=Nse;const xse=jn(Ase),Ise=qt(X.Box)(({theme:t})=>({overflow:"hidden",position:"relative",borderRadius:t.shape.borderRadius,border:`solid 1px ${Ee(t.palette.grey[500],.32)}`,"& .ql-container.ql-snow":{borderColor:"transparent",...t.typography.body1,fontFamily:t.typography.fontFamily},"& .ql-editor":{minHeight:200,maxHeight:640,"&.ql-blank::before":{fontStyle:"normal",color:t.palette.text.disabled},"& pre.ql-syntax":{...t.typography.body2,padding:t.spacing(2),borderRadius:t.shape.borderRadius,backgroundColor:t.palette.grey[900]}}})),wse=qt("div")(({theme:t})=>{const e=t.direction==="rtl";return{"& .ql-snow.ql-toolbar button:hover .ql-fill, .ql-snow .ql-toolbar button:hover .ql-fill, .ql-snow.ql-toolbar button:focus .ql-fill, .ql-snow .ql-toolbar button:focus .ql-fill, .ql-snow.ql-toolbar button.ql-active .ql-fill, .ql-snow .ql-toolbar button.ql-active .ql-fill, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill, .ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill, .ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill, .ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill, .ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill, .ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill":{fill:t.palette.primary.main},"& .ql-snow.ql-toolbar button:hover, .ql-snow .ql-toolbar button:hover, .ql-snow.ql-toolbar button:focus, .ql-snow .ql-toolbar button:focus, .ql-snow.ql-toolbar button.ql-active, .ql-snow .ql-toolbar button.ql-active, .ql-snow.ql-toolbar .ql-picker-label:hover, .ql-snow .ql-toolbar .ql-picker-label:hover, .ql-snow.ql-toolbar .ql-picker-label.ql-active, .ql-snow .ql-toolbar .ql-picker-label.ql-active, .ql-snow.ql-toolbar .ql-picker-item:hover, .ql-snow .ql-toolbar .ql-picker-item:hover, .ql-snow.ql-toolbar .ql-picker-item.ql-selected, .ql-snow .ql-toolbar .ql-picker-item.ql-selected":{color:t.palette.primary.main},"& .ql-snow.ql-toolbar button:hover .ql-stroke, .ql-snow .ql-toolbar button:hover .ql-stroke, .ql-snow.ql-toolbar button:focus .ql-stroke, .ql-snow .ql-toolbar button:focus .ql-stroke, .ql-snow.ql-toolbar button.ql-active .ql-stroke, .ql-snow .ql-toolbar button.ql-active .ql-stroke, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke, .ql-snow.ql-toolbar button:hover .ql-stroke-miter, .ql-snow .ql-toolbar button:hover .ql-stroke-miter, .ql-snow.ql-toolbar button:focus .ql-stroke-miter, .ql-snow .ql-toolbar button:focus .ql-stroke-miter, .ql-snow.ql-toolbar button.ql-active .ql-stroke-miter, .ql-snow .ql-toolbar button.ql-active .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter":{stroke:t.palette.primary.main},"& .ql-stroke":{stroke:t.palette.text.primary},"& .ql-fill, .ql-stroke.ql-fill":{fill:t.palette.text.primary},"& .ql-picker, .ql-picker-options, .ql-picker-item, .ql-picker-label, button":{"&:focus":{outline:"none"}},"& .ql-toolbar.ql-snow":{border:"none",borderBottom:`solid 1px ${Ee(t.palette.grey[500],.32)}`,"& .ql-formats":{"&:not(:last-of-type)":{marginRight:t.spacing(2)}},"& button":{padding:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,color:t.palette.text.primary},"& button svg, span svg":{width:20,height:20},"& .ql-picker-label":{...t.typography.subtitle2,color:t.palette.text.primary,"& .ql-stroke":{stroke:t.palette.text.primary}},"& .ql-picker-label svg":{...e&&{right:"0 !important",left:"auto !important"}},"& .ql-color,& .ql-background,& .ql-align ":{"& .ql-picker-label":{padding:0,display:"flex",alignItems:"center",justifyContent:"center"}},"& .ql-expanded":{"& .ql-picker-label":{borderRadius:4,color:t.palette.text.disabled,borderColor:"transparent !important",backgroundColor:t.palette.action.focus,"& .ql-stroke":{stroke:t.palette.text.disabled}},"& .ql-picker-options":{padding:0,marginTop:4,border:"none",maxHeight:200,overflow:"auto",boxShadow:t.customShadows.z20,borderRadius:t.shape.borderRadius,backgroundColor:t.palette.background.paper},"& .ql-picker-item":{color:t.palette.text.primary},"&.ql-align":{"& .ql-picker-options":{padding:0,display:"flex"},"& .ql-picker-item":{width:32,height:32,display:"flex",alignItems:"center",justifyContent:"center"}},"&.ql-color, &.ql-background":{"& .ql-picker-options":{padding:8},"& .ql-picker-item":{margin:3,borderRadius:4,"&.ql-selected":{border:"solid 1px black"}}},"&.ql-font, &.ql-size, &.ql-header":{"& .ql-picker-options":{padding:t.spacing(1,0)},"& .ql-picker-item":{padding:t.spacing(.5,1.5)}}}}}}),Dse=["Cabeçalho 1","Cabeçalho 2","Cabeçalho 3","Cabeçalho 4","Cabeçalho 5","Cabeçalho 6"],Mse=["align","background","blockquote","bold","bullet","code","code-block","color","direction","font","formula","header","image","indent","italic","link","list","script","size","strike","table","underline","video"],Lse=({id:t,isSimple:e,...n})=>A.jsx(wse,{...n,children:A.jsxs("div",{id:t,children:[A.jsx("div",{className:"ql-formats",children:A.jsxs("select",{className:"ql-header",defaultValue:"",children:[Dse.map((r,i)=>A.jsx("option",{value:i+1,children:r},r)),A.jsx("option",{value:"",children:"Normal"})]})}),A.jsxs("div",{className:"ql-formats",children:[A.jsx("button",{type:"button",className:"ql-bold"}),A.jsx("button",{type:"button",className:"ql-italic"}),A.jsx("button",{type:"button",className:"ql-underline"}),A.jsx("button",{type:"button",className:"ql-strike"})]}),!e&&A.jsxs("div",{className:"ql-formats",children:[A.jsx("select",{className:"ql-color"}),A.jsx("select",{className:"ql-background"})]}),A.jsxs("div",{className:"ql-formats",children:[A.jsx("button",{type:"button",className:"ql-list",value:"ordered"}),A.jsx("button",{type:"button",className:"ql-list",value:"bullet"}),!e&&A.jsx("button",{type:"button",className:"ql-indent",value:"-1"}),!e&&A.jsx("button",{type:"button",className:"ql-indent",value:"+1"})]}),!e&&A.jsxs("div",{className:"ql-formats",children:[A.jsx("button",{type:"button",className:"ql-script",value:"super"}),A.jsx("button",{type:"button",className:"ql-script",value:"sub"})]}),!e&&A.jsxs("div",{className:"ql-formats",children:[A.jsx("button",{type:"button",className:"ql-code-block"}),A.jsx("button",{type:"button",className:"ql-blockquote"})]}),A.jsxs("div",{className:"ql-formats",children:[A.jsx("button",{type:"button",className:"ql-direction",value:"rtl"}),A.jsx("select",{className:"ql-align"})]}),A.jsxs("div",{className:"ql-formats",children:[A.jsx("button",{type:"button",className:"ql-link"}),A.jsx("button",{type:"button",className:"ql-image"}),A.jsx("button",{type:"button",className:"ql-video"})]}),A.jsxs("div",{className:"ql-formats",children:[!e&&A.jsx("button",{type:"button",className:"ql-formula"}),A.jsx("button",{type:"button",className:"ql-clean"})]})]})}),y1=({id:t="minimal-quill",error:e,value:n,onChange:r,simple:i=!1,helperText:a,sx:o,...s})=>{const l={toolbar:{container:`#${t}`},history:{delay:500,maxStack:100,userOnly:!0},syntax:!0,clipboard:{matchVisual:!1}};return A.jsxs(A.Fragment,{children:[A.jsxs(Ise,{sx:{...e&&{border:c=>`solid 1px ${c.palette.error.main}`},...o},children:[A.jsx(Lse,{id:t,isSimple:i}),A.jsx(xse,{value:n,onChange:r,modules:l,formats:Mse,placeholder:"Write something awesome...",...s})]}),a&&A.jsx(X.FormHelperText,{error:!!e,sx:{px:2},children:a})]})},T1=()=>A.jsx(X.LinearProgress,{sx:{position:"absolute",top:0,left:0,width:1}});var O1={exports:{}};(()=>{var t={296:(i,a,o)=>{var s=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,d=parseInt,p=typeof o.g=="object"&&o.g&&o.g.Object===Object&&o.g,f=typeof self=="object"&&self&&self.Object===Object&&self,m=p||f||Function("return this")(),_=Object.prototype.toString,g=Math.max,h=Math.min,E=function(){return m.Date.now()};function v(S){var O=typeof S;return!!S&&(O=="object"||O=="function")}function b(S){if(typeof S=="number")return S;if(function(T){return typeof T=="symbol"||function(x){return!!x&&typeof x=="object"}(T)&&_.call(T)=="[object Symbol]"}(S))return NaN;if(v(S)){var O=typeof S.valueOf=="function"?S.valueOf():S;S=v(O)?O+"":O}if(typeof S!="string")return S===0?S:+S;S=S.replace(s,"");var y=c.test(S);return y||u.test(S)?d(S.slice(2),y?2:8):l.test(S)?NaN:+S}i.exports=function(S,O,y){var T,x,N,R,w,D,L=0,F=!1,H=!1,U=!0;if(typeof S!="function")throw new TypeError("Expected a function");function Q(B){var Y=T,q=x;return T=x=void 0,L=B,R=S.apply(q,Y)}function $(B){var Y=B-D;return D===void 0||Y>=O||Y<0||H&&B-L>=N}function M(){var B=E();if($(B))return I(B);w=setTimeout(M,function(Y){var q=O-(Y-D);return H?h(q,N-(Y-L)):q}(B))}function I(B){return w=void 0,U&&T?Q(B):(T=x=void 0,R)}function k(){var B=E(),Y=$(B);if(T=arguments,x=this,D=B,Y){if(w===void 0)return function(q){return L=q,w=setTimeout(M,O),F?Q(q):R}(D);if(H)return w=setTimeout(M,O),Q(D)}return w===void 0&&(w=setTimeout(M,O)),R}return O=b(O)||0,v(y)&&(F=!!y.leading,N=(H="maxWait"in y)?g(b(y.maxWait)||0,O):N,U="trailing"in y?!!y.trailing:U),k.cancel=function(){w!==void 0&&clearTimeout(w),L=0,T=D=x=w=void 0},k.flush=function(){return w===void 0?R:I(E())},k}},96:(i,a,o)=>{var s="Expected a function",l=NaN,c="[object Symbol]",u=/^\s+|\s+$/g,d=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,f=/^0o[0-7]+$/i,m=parseInt,_=typeof o.g=="object"&&o.g&&o.g.Object===Object&&o.g,g=typeof self=="object"&&self&&self.Object===Object&&self,h=_||g||Function("return this")(),E=Object.prototype.toString,v=Math.max,b=Math.min,S=function(){return h.Date.now()};function O(T){var x=typeof T;return!!T&&(x=="object"||x=="function")}function y(T){if(typeof T=="number")return T;if(function(R){return typeof R=="symbol"||function(w){return!!w&&typeof w=="object"}(R)&&E.call(R)==c}(T))return l;if(O(T)){var x=typeof T.valueOf=="function"?T.valueOf():T;T=O(x)?x+"":x}if(typeof T!="string")return T===0?T:+T;T=T.replace(u,"");var N=p.test(T);return N||f.test(T)?m(T.slice(2),N?2:8):d.test(T)?l:+T}i.exports=function(T,x,N){var R=!0,w=!0;if(typeof T!="function")throw new TypeError(s);return O(N)&&(R="leading"in N?!!N.leading:R,w="trailing"in N?!!N.trailing:w),function(D,L,F){var H,U,Q,$,M,I,k=0,B=!1,Y=!1,q=!0;if(typeof D!="function")throw new TypeError(s);function P(se){var ne=H,he=U;return H=U=void 0,k=se,$=D.apply(he,ne)}function G(se){var ne=se-I;return I===void 0||ne>=L||ne<0||Y&&se-k>=Q}function z(){var se=S();if(G(se))return W(se);M=setTimeout(z,function(ne){var he=L-(ne-I);return Y?b(he,Q-(ne-k)):he}(se))}function W(se){return M=void 0,q&&H?P(se):(H=U=void 0,$)}function J(){var se=S(),ne=G(se);if(H=arguments,U=this,I=se,ne){if(M===void 0)return function(he){return k=he,M=setTimeout(z,L),B?P(he):$}(I);if(Y)return M=setTimeout(z,L),P(I)}return M===void 0&&(M=setTimeout(z,L)),$}return L=y(L)||0,O(F)&&(B=!!F.leading,Q=(Y="maxWait"in F)?v(y(F.maxWait)||0,L):Q,q="trailing"in F?!!F.trailing:q),J.cancel=function(){M!==void 0&&clearTimeout(M),k=0,H=I=U=M=void 0},J.flush=function(){return M===void 0?$:W(S())},J}(T,x,{leading:R,maxWait:x,trailing:w})}},703:(i,a,o)=>{var s=o(414);function l(){}function c(){}c.resetWarningCache=l,i.exports=function(){function u(f,m,_,g,h,E){if(E!==s){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}function d(){return u}u.isRequired=u;var p={array:u,bigint:u,bool:u,func:u,number:u,object:u,string:u,symbol:u,any:u,arrayOf:d,element:u,elementType:u,instanceOf:d,node:u,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d,checkPropTypes:c,resetWarningCache:l};return p.PropTypes=p,p}},697:(i,a,o)=>{i.exports=o(703)()},414:i=>{i.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},e={};function n(i){var a=e[i];if(a!==void 0)return a.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}n.n=i=>{var a=i&&i.__esModule?()=>i.default:()=>i;return n.d(a,{a}),a},n.d=(i,a)=>{for(var o in a)n.o(a,o)&&!n.o(i,o)&&Object.defineProperty(i,o,{enumerable:!0,get:a[o]})},n.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),n.o=(i,a)=>Object.prototype.hasOwnProperty.call(i,a),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{n.r(r),n.d(r,{LazyLoadComponent:()=>pe,LazyLoadImage:()=>Be,trackWindowScroll:()=>I});const i=C;var a=n.n(i),o=n(697);const s=Jo;var l=n.n(s);function c(){return typeof window<"u"&&"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}function u(K){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},u(K)}function d(K,V){var ie=Object.keys(K);if(Object.getOwnPropertySymbols){var re=Object.getOwnPropertySymbols(K);V&&(re=re.filter(function(Se){return Object.getOwnPropertyDescriptor(K,Se).enumerable})),ie.push.apply(ie,re)}return ie}function p(K,V,ie){return(V=m(V))in K?Object.defineProperty(K,V,{value:ie,enumerable:!0,configurable:!0,writable:!0}):K[V]=ie,K}function f(K,V){for(var ie=0;ie<V.length;ie++){var re=V[ie];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(K,m(re.key),re)}}function m(K){var V=function(ie,re){if(u(ie)!=="object"||ie===null)return ie;var Se=ie[Symbol.toPrimitive];if(Se!==void 0){var De=Se.call(ie,"string");if(u(De)!=="object")return De;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(ie)}(K);return u(V)==="symbol"?V:String(V)}function _(K,V){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ie,re){return ie.__proto__=re,ie},_(K,V)}function g(K){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)},g(K)}var h=function(K){K.forEach(function(V){V.isIntersecting&&V.target.onVisible()})},E={},v=function(K){(function(oe,de){if(typeof de!="function"&&de!==null)throw new TypeError("Super expression must either be null or a function");oe.prototype=Object.create(de&&de.prototype,{constructor:{value:oe,writable:!0,configurable:!0}}),Object.defineProperty(oe,"prototype",{writable:!1}),de&&_(oe,de)})(Ae,K);var V,ie,re,Se,De=(re=Ae,Se=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var oe,de=g(re);if(Se){var Re=g(this).constructor;oe=Reflect.construct(de,arguments,Re)}else oe=de.apply(this,arguments);return function(Ce,Te){if(Te&&(u(Te)==="object"||typeof Te=="function"))return Te;if(Te!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function($e){if($e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $e}(Ce)}(this,oe)});function Ae(oe){var de;if(function(Ce,Te){if(!(Ce instanceof Te))throw new TypeError("Cannot call a class as a function")}(this,Ae),(de=De.call(this,oe)).supportsObserver=!oe.scrollPosition&&oe.useIntersectionObserver&&c(),de.supportsObserver){var Re=oe.threshold;de.observer=function(Ce){return E[Ce]=E[Ce]||new IntersectionObserver(h,{rootMargin:Ce+"px"}),E[Ce]}(Re)}return de}return V=Ae,ie=[{key:"componentDidMount",value:function(){this.placeholder&&this.observer&&(this.placeholder.onVisible=this.props.onVisible,this.observer.observe(this.placeholder)),this.supportsObserver||this.updateVisibility()}},{key:"componentWillUnmount",value:function(){this.observer&&this.placeholder&&this.observer.unobserve(this.placeholder)}},{key:"componentDidUpdate",value:function(){this.supportsObserver||this.updateVisibility()}},{key:"getPlaceholderBoundingBox",value:function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollPosition,de=this.placeholder.getBoundingClientRect(),Re=l().findDOMNode(this.placeholder).style,Ce=parseInt(Re.getPropertyValue("margin-left"),10)||0,Te=parseInt(Re.getPropertyValue("margin-top"),10)||0;return{bottom:oe.y+de.bottom+Te,left:oe.x+de.left+Ce,right:oe.x+de.right+Ce,top:oe.y+de.top+Te}}},{key:"isPlaceholderInViewport",value:function(){if(typeof window>"u"||!this.placeholder)return!1;var oe=this.props,de=oe.scrollPosition,Re=oe.threshold,Ce=this.getPlaceholderBoundingBox(de),Te=de.y+window.innerHeight,$e=de.x,ht=de.x+window.innerWidth,it=de.y;return it-Re<=Ce.bottom&&Te+Re>=Ce.top&&$e-Re<=Ce.right&&ht+Re>=Ce.left}},{key:"updateVisibility",value:function(){this.isPlaceholderInViewport()&&this.props.onVisible()}},{key:"render",value:function(){var oe=this,de=this.props,Re=de.className,Ce=de.height,Te=de.placeholder,$e=de.style,ht=de.width;if(Te&&typeof Te.type!="function")return a().cloneElement(Te,{ref:function(lt){return oe.placeholder=lt}});var it=function(lt){for(var xt=1;xt<arguments.length;xt++){var Tt=arguments[xt]!=null?arguments[xt]:{};xt%2?d(Object(Tt),!0).forEach(function(Yt){p(lt,Yt,Tt[Yt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(lt,Object.getOwnPropertyDescriptors(Tt)):d(Object(Tt)).forEach(function(Yt){Object.defineProperty(lt,Yt,Object.getOwnPropertyDescriptor(Tt,Yt))})}return lt}({display:"inline-block"},$e);return ht!==void 0&&(it.width=ht),Ce!==void 0&&(it.height=Ce),a().createElement("span",{className:Re,ref:function(lt){return oe.placeholder=lt},style:it},Te)}}],ie&&f(V.prototype,ie),Object.defineProperty(V,"prototype",{writable:!1}),Ae}(a().Component);v.propTypes={onVisible:o.PropTypes.func.isRequired,className:o.PropTypes.string,height:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string]),placeholder:o.PropTypes.element,threshold:o.PropTypes.number,useIntersectionObserver:o.PropTypes.bool,scrollPosition:o.PropTypes.shape({x:o.PropTypes.number.isRequired,y:o.PropTypes.number.isRequired}),width:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string])},v.defaultProps={className:"",placeholder:null,threshold:100,useIntersectionObserver:!0};const b=v;var S=n(296),O=n.n(S),y=n(96),T=n.n(y),x=function(K){var V=getComputedStyle(K,null);return V.getPropertyValue("overflow")+V.getPropertyValue("overflow-y")+V.getPropertyValue("overflow-x")};const N=function(K){if(!(K instanceof HTMLElement))return window;for(var V=K;V&&V instanceof HTMLElement;){if(/(scroll|auto)/.test(x(V)))return V;V=V.parentNode}return window};function R(K){return R=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},R(K)}var w=["delayMethod","delayTime"];function D(){return D=Object.assign?Object.assign.bind():function(K){for(var V=1;V<arguments.length;V++){var ie=arguments[V];for(var re in ie)Object.prototype.hasOwnProperty.call(ie,re)&&(K[re]=ie[re])}return K},D.apply(this,arguments)}function L(K,V){for(var ie=0;ie<V.length;ie++){var re=V[ie];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(K,(Se=function(De,Ae){if(R(De)!=="object"||De===null)return De;var oe=De[Symbol.toPrimitive];if(oe!==void 0){var de=oe.call(De,"string");if(R(de)!=="object")return de;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(De)}(re.key),R(Se)==="symbol"?Se:String(Se)),re)}var Se}function F(K,V){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ie,re){return ie.__proto__=re,ie},F(K,V)}function H(K,V){if(V&&(R(V)==="object"||typeof V=="function"))return V;if(V!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return U(K)}function U(K){if(K===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K}function Q(K){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)},Q(K)}var $=function(){return typeof window>"u"?0:window.scrollX||window.pageXOffset},M=function(){return typeof window>"u"?0:window.scrollY||window.pageYOffset};const I=function(K){var V=function(ie){(function(Re,Ce){if(typeof Ce!="function"&&Ce!==null)throw new TypeError("Super expression must either be null or a function");Re.prototype=Object.create(Ce&&Ce.prototype,{constructor:{value:Re,writable:!0,configurable:!0}}),Object.defineProperty(Re,"prototype",{writable:!1}),Ce&&F(Re,Ce)})(de,ie);var re,Se,De,Ae,oe=(De=de,Ae=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var Re,Ce=Q(De);if(Ae){var Te=Q(this).constructor;Re=Reflect.construct(Ce,arguments,Te)}else Re=Ce.apply(this,arguments);return H(this,Re)});function de(Re){var Ce;if(function($e,ht){if(!($e instanceof ht))throw new TypeError("Cannot call a class as a function")}(this,de),(Ce=oe.call(this,Re)).useIntersectionObserver=Re.useIntersectionObserver&&c(),Ce.useIntersectionObserver)return H(Ce);var Te=Ce.onChangeScroll.bind(U(Ce));return Re.delayMethod==="debounce"?Ce.delayedScroll=O()(Te,Re.delayTime):Re.delayMethod==="throttle"&&(Ce.delayedScroll=T()(Te,Re.delayTime)),Ce.state={scrollPosition:{x:$(),y:M()}},Ce.baseComponentRef=a().createRef(),Ce}return re=de,(Se=[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"componentDidUpdate",value:function(){typeof window>"u"||this.useIntersectionObserver||N(l().findDOMNode(this.baseComponentRef.current))!==this.scrollElement&&(this.removeListeners(),this.addListeners())}},{key:"addListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement=N(l().findDOMNode(this.baseComponentRef.current)),this.scrollElement.addEventListener("scroll",this.delayedScroll,{passive:!0}),window.addEventListener("resize",this.delayedScroll,{passive:!0}),this.scrollElement!==window&&window.addEventListener("scroll",this.delayedScroll,{passive:!0}))}},{key:"removeListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement.removeEventListener("scroll",this.delayedScroll),window.removeEventListener("resize",this.delayedScroll),this.scrollElement!==window&&window.removeEventListener("scroll",this.delayedScroll))}},{key:"onChangeScroll",value:function(){this.useIntersectionObserver||this.setState({scrollPosition:{x:$(),y:M()}})}},{key:"render",value:function(){var Re=this.props,Ce=(Re.delayMethod,Re.delayTime,function($e,ht){if($e==null)return{};var it,lt,xt=function(Yt,wn){if(Yt==null)return{};var Dn,ur,pi={},Da=Object.keys(Yt);for(ur=0;ur<Da.length;ur++)Dn=Da[ur],wn.indexOf(Dn)>=0||(pi[Dn]=Yt[Dn]);return pi}($e,ht);if(Object.getOwnPropertySymbols){var Tt=Object.getOwnPropertySymbols($e);for(lt=0;lt<Tt.length;lt++)it=Tt[lt],ht.indexOf(it)>=0||Object.prototype.propertyIsEnumerable.call($e,it)&&(xt[it]=$e[it])}return xt}(Re,w)),Te=this.useIntersectionObserver?null:this.state.scrollPosition;return a().createElement(K,D({forwardRef:this.baseComponentRef,scrollPosition:Te},Ce))}}])&&L(re.prototype,Se),Object.defineProperty(re,"prototype",{writable:!1}),de}(a().Component);return V.propTypes={delayMethod:o.PropTypes.oneOf(["debounce","throttle"]),delayTime:o.PropTypes.number,useIntersectionObserver:o.PropTypes.bool},V.defaultProps={delayMethod:"throttle",delayTime:300,useIntersectionObserver:!0},V};function k(K){return k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},k(K)}function B(K,V){for(var ie=0;ie<V.length;ie++){var re=V[ie];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(K,(Se=function(De,Ae){if(k(De)!=="object"||De===null)return De;var oe=De[Symbol.toPrimitive];if(oe!==void 0){var de=oe.call(De,"string");if(k(de)!=="object")return de;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(De)}(re.key),k(Se)==="symbol"?Se:String(Se)),re)}var Se}function Y(K,V){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ie,re){return ie.__proto__=re,ie},Y(K,V)}function q(K){return q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)},q(K)}var P=function(K){(function(oe,de){if(typeof de!="function"&&de!==null)throw new TypeError("Super expression must either be null or a function");oe.prototype=Object.create(de&&de.prototype,{constructor:{value:oe,writable:!0,configurable:!0}}),Object.defineProperty(oe,"prototype",{writable:!1}),de&&Y(oe,de)})(Ae,K);var V,ie,re,Se,De=(re=Ae,Se=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var oe,de=q(re);if(Se){var Re=q(this).constructor;oe=Reflect.construct(de,arguments,Re)}else oe=de.apply(this,arguments);return function(Ce,Te){if(Te&&(k(Te)==="object"||typeof Te=="function"))return Te;if(Te!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function($e){if($e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $e}(Ce)}(this,oe)});function Ae(oe){return function(de,Re){if(!(de instanceof Re))throw new TypeError("Cannot call a class as a function")}(this,Ae),De.call(this,oe)}return V=Ae,(ie=[{key:"render",value:function(){return a().createElement(b,this.props)}}])&&B(V.prototype,ie),Object.defineProperty(V,"prototype",{writable:!1}),Ae}(a().Component);const G=I(P);function z(K){return z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},z(K)}function W(K,V){for(var ie=0;ie<V.length;ie++){var re=V[ie];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(K,(Se=function(De,Ae){if(z(De)!=="object"||De===null)return De;var oe=De[Symbol.toPrimitive];if(oe!==void 0){var de=oe.call(De,"string");if(z(de)!=="object")return de;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(De)}(re.key),z(Se)==="symbol"?Se:String(Se)),re)}var Se}function J(K,V){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ie,re){return ie.__proto__=re,ie},J(K,V)}function se(K){if(K===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K}function ne(K){return ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)},ne(K)}var he=function(K){(function(oe,de){if(typeof de!="function"&&de!==null)throw new TypeError("Super expression must either be null or a function");oe.prototype=Object.create(de&&de.prototype,{constructor:{value:oe,writable:!0,configurable:!0}}),Object.defineProperty(oe,"prototype",{writable:!1}),de&&J(oe,de)})(Ae,K);var V,ie,re,Se,De=(re=Ae,Se=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var oe,de=ne(re);if(Se){var Re=ne(this).constructor;oe=Reflect.construct(de,arguments,Re)}else oe=de.apply(this,arguments);return function(Ce,Te){if(Te&&(z(Te)==="object"||typeof Te=="function"))return Te;if(Te!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return se(Ce)}(this,oe)});function Ae(oe){var de;(function(ht,it){if(!(ht instanceof it))throw new TypeError("Cannot call a class as a function")})(this,Ae),de=De.call(this,oe);var Re=oe.afterLoad,Ce=oe.beforeLoad,Te=oe.scrollPosition,$e=oe.visibleByDefault;return de.state={visible:$e},$e&&(Ce(),Re()),de.onVisible=de.onVisible.bind(se(de)),de.isScrollTracked=!!(Te&&Number.isFinite(Te.x)&&Te.x>=0&&Number.isFinite(Te.y)&&Te.y>=0),de}return V=Ae,(ie=[{key:"componentDidUpdate",value:function(oe,de){de.visible!==this.state.visible&&this.props.afterLoad()}},{key:"onVisible",value:function(){this.props.beforeLoad(),this.setState({visible:!0})}},{key:"render",value:function(){if(this.state.visible)return this.props.children;var oe=this.props,de=oe.className,Re=oe.delayMethod,Ce=oe.delayTime,Te=oe.height,$e=oe.placeholder,ht=oe.scrollPosition,it=oe.style,lt=oe.threshold,xt=oe.useIntersectionObserver,Tt=oe.width;return this.isScrollTracked||xt&&c()?a().createElement(b,{className:de,height:Te,onVisible:this.onVisible,placeholder:$e,scrollPosition:ht,style:it,threshold:lt,useIntersectionObserver:xt,width:Tt}):a().createElement(G,{className:de,delayMethod:Re,delayTime:Ce,height:Te,onVisible:this.onVisible,placeholder:$e,style:it,threshold:lt,width:Tt})}}])&&W(V.prototype,ie),Object.defineProperty(V,"prototype",{writable:!1}),Ae}(a().Component);he.propTypes={afterLoad:o.PropTypes.func,beforeLoad:o.PropTypes.func,useIntersectionObserver:o.PropTypes.bool,visibleByDefault:o.PropTypes.bool},he.defaultProps={afterLoad:function(){return{}},beforeLoad:function(){return{}},useIntersectionObserver:!0,visibleByDefault:!1};const pe=he;function Ie(K){return Ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},Ie(K)}var qe=["afterLoad","beforeLoad","delayMethod","delayTime","effect","placeholder","placeholderSrc","scrollPosition","threshold","useIntersectionObserver","visibleByDefault","wrapperClassName","wrapperProps"];function Ye(K,V){var ie=Object.keys(K);if(Object.getOwnPropertySymbols){var re=Object.getOwnPropertySymbols(K);V&&(re=re.filter(function(Se){return Object.getOwnPropertyDescriptor(K,Se).enumerable})),ie.push.apply(ie,re)}return ie}function le(K){for(var V=1;V<arguments.length;V++){var ie=arguments[V]!=null?arguments[V]:{};V%2?Ye(Object(ie),!0).forEach(function(re){te(K,re,ie[re])}):Object.getOwnPropertyDescriptors?Object.defineProperties(K,Object.getOwnPropertyDescriptors(ie)):Ye(Object(ie)).forEach(function(re){Object.defineProperty(K,re,Object.getOwnPropertyDescriptor(ie,re))})}return K}function te(K,V,ie){return(V=ae(V))in K?Object.defineProperty(K,V,{value:ie,enumerable:!0,configurable:!0,writable:!0}):K[V]=ie,K}function ge(){return ge=Object.assign?Object.assign.bind():function(K){for(var V=1;V<arguments.length;V++){var ie=arguments[V];for(var re in ie)Object.prototype.hasOwnProperty.call(ie,re)&&(K[re]=ie[re])}return K},ge.apply(this,arguments)}function _e(K,V){for(var ie=0;ie<V.length;ie++){var re=V[ie];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(K,ae(re.key),re)}}function ae(K){var V=function(ie,re){if(Ie(ie)!=="object"||ie===null)return ie;var Se=ie[Symbol.toPrimitive];if(Se!==void 0){var De=Se.call(ie,"string");if(Ie(De)!=="object")return De;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(ie)}(K);return Ie(V)==="symbol"?V:String(V)}function Me(K,V){return Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ie,re){return ie.__proto__=re,ie},Me(K,V)}function ce(K){return ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)},ce(K)}var fe=function(K){(function(oe,de){if(typeof de!="function"&&de!==null)throw new TypeError("Super expression must either be null or a function");oe.prototype=Object.create(de&&de.prototype,{constructor:{value:oe,writable:!0,configurable:!0}}),Object.defineProperty(oe,"prototype",{writable:!1}),de&&Me(oe,de)})(Ae,K);var V,ie,re,Se,De=(re=Ae,Se=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var oe,de=ce(re);if(Se){var Re=ce(this).constructor;oe=Reflect.construct(de,arguments,Re)}else oe=de.apply(this,arguments);return function(Ce,Te){if(Te&&(Ie(Te)==="object"||typeof Te=="function"))return Te;if(Te!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function($e){if($e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $e}(Ce)}(this,oe)});function Ae(oe){var de;return function(Re,Ce){if(!(Re instanceof Ce))throw new TypeError("Cannot call a class as a function")}(this,Ae),(de=De.call(this,oe)).state={loaded:!1},de}return V=Ae,(ie=[{key:"onImageLoad",value:function(){var oe=this;return this.state.loaded?null:function(de){oe.props.onLoad(de),oe.props.afterLoad(),oe.setState({loaded:!0})}}},{key:"getImg",value:function(){var oe=this.props,de=(oe.afterLoad,oe.beforeLoad,oe.delayMethod,oe.delayTime,oe.effect,oe.placeholder,oe.placeholderSrc,oe.scrollPosition,oe.threshold,oe.useIntersectionObserver,oe.visibleByDefault,oe.wrapperClassName,oe.wrapperProps,function(Re,Ce){if(Re==null)return{};var Te,$e,ht=function(lt,xt){if(lt==null)return{};var Tt,Yt,wn={},Dn=Object.keys(lt);for(Yt=0;Yt<Dn.length;Yt++)Tt=Dn[Yt],xt.indexOf(Tt)>=0||(wn[Tt]=lt[Tt]);return wn}(Re,Ce);if(Object.getOwnPropertySymbols){var it=Object.getOwnPropertySymbols(Re);for($e=0;$e<it.length;$e++)Te=it[$e],Ce.indexOf(Te)>=0||Object.prototype.propertyIsEnumerable.call(Re,Te)&&(ht[Te]=Re[Te])}return ht}(oe,qe));return a().createElement("img",ge({},de,{onLoad:this.onImageLoad()}))}},{key:"getLazyLoadImage",value:function(){var oe=this.props,de=oe.beforeLoad,Re=oe.className,Ce=oe.delayMethod,Te=oe.delayTime,$e=oe.height,ht=oe.placeholder,it=oe.scrollPosition,lt=oe.style,xt=oe.threshold,Tt=oe.useIntersectionObserver,Yt=oe.visibleByDefault,wn=oe.width;return a().createElement(pe,{beforeLoad:de,className:Re,delayMethod:Ce,delayTime:Te,height:$e,placeholder:ht,scrollPosition:it,style:lt,threshold:xt,useIntersectionObserver:Tt,visibleByDefault:Yt,width:wn},this.getImg())}},{key:"getWrappedLazyLoadImage",value:function(oe){var de=this.props,Re=de.effect,Ce=de.height,Te=de.placeholderSrc,$e=de.width,ht=de.wrapperClassName,it=de.wrapperProps,lt=this.state.loaded,xt=lt?" lazy-load-image-loaded":"",Tt=lt||!Te?{}:{backgroundImage:"url(".concat(Te,")"),backgroundSize:"100% 100%"};return a().createElement("span",ge({className:ht+" lazy-load-image-background "+Re+xt,style:le(le({},Tt),{},{color:"transparent",display:"inline-block",height:Ce,width:$e})},it),oe)}},{key:"render",value:function(){var oe=this.props,de=oe.effect,Re=oe.placeholderSrc,Ce=oe.visibleByDefault,Te=oe.wrapperClassName,$e=oe.wrapperProps,ht=this.getLazyLoadImage();return(de||Re)&&!Ce||Te||$e?this.getWrappedLazyLoadImage(ht):ht}}])&&_e(V.prototype,ie),Object.defineProperty(V,"prototype",{writable:!1}),Ae}(a().Component);fe.propTypes={onLoad:o.PropTypes.func,afterLoad:o.PropTypes.func,beforeLoad:o.PropTypes.func,delayMethod:o.PropTypes.string,delayTime:o.PropTypes.number,effect:o.PropTypes.string,placeholderSrc:o.PropTypes.string,threshold:o.PropTypes.number,useIntersectionObserver:o.PropTypes.bool,visibleByDefault:o.PropTypes.bool,wrapperClassName:o.PropTypes.string,wrapperProps:o.PropTypes.object},fe.defaultProps={onLoad:function(){},afterLoad:function(){return{}},beforeLoad:function(){return{}},delayMethod:"throttle",delayTime:300,effect:"",placeholderSrc:null,threshold:100,useIntersectionObserver:!0,visibleByDefault:!1,wrapperClassName:""};const Be=fe})(),O1.exports=r})();var Pse=O1.exports;const kse="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACAQMAAACjTyRkAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjAAIAAAQAASDSLW8AAAAASUVORK5CYII=",Fse="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHdpZHRoPSI1MTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxyYWRpYWxHcmFkaWVudCBpZD0iYSIgY3g9IjUwJSIgY3k9IjQ2LjgwMTEwMiUiIHI9Ijk1LjQ5NzExMiUiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjOTE5ZWFiIiBzdG9wLW9wYWNpdHk9Ii40OCIvPjwvcmFkaWFsR3JhZGllbnQ+PHBhdGggZD0ibTg4IDg2aDUxMnY1MTJoLTUxMnoiIGZpbGw9InVybCgjYSkiIGZpbGwtcnVsZT0iZXZlbm9kZCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTg4IC04NikiLz48L3N2Zz4=";function Bse(t="1/1"){return{"4/3":"calc(100% / 4 * 3)","3/4":"calc(100% / 3 * 4)","6/4":"calc(100% / 6 * 4)","4/6":"calc(100% / 4 * 6)","16/9":"calc(100% / 16 * 9)","9/16":"calc(100% / 9 * 16)","21/9":"calc(100% / 21 * 9)","9/21":"calc(100% / 9 * 21)","1/1":"100%"}[t]}const cc=C.forwardRef(({ratio:t,disabledEffect:e=!1,effect:n="blur",sx:r,...i},a)=>{const o=A.jsx(X.Box,{component:Pse.LazyLoadImage,wrapperClassName:"wrapper",effect:e?void 0:n,placeholderSrc:e?kse:Fse,sx:{width:1,height:1,objectFit:"cover"},...i});return t?A.jsx(X.Box,{ref:a,component:"span",sx:{width:1,lineHeight:1,display:"block",overflow:"hidden",position:"relative",pt:Bse(t),"& .wrapper":{top:0,left:0,width:1,height:1,position:"absolute",backgroundSize:"cover !important"},...r},children:o}):A.jsx(X.Box,{ref:a,component:"span",sx:{lineHeight:1,display:"block",overflow:"hidden",position:"relative","& .wrapper":{width:1,height:1,backgroundSize:"cover !important"},...r},children:o})});cc.displayName="Image";/*! *****************************************************************************
|
|
185
185
|
Copyright (c) Microsoft Corporation.
|
|
186
186
|
|
|
187
187
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -287,7 +287,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),I=U,M=Q),$===void 0&&(
|
|
|
287
287
|
border-left: 0;
|
|
288
288
|
border-right: 0;
|
|
289
289
|
}
|
|
290
|
-
`,ole=1,sle=3,lle=function(t){Use(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.imageRef=C.createRef(),n.videoRef=C.createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document<"u"?document:null,n.currentWindow=typeof window<"u"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!n.containerRef)){var r=!0;n.resizeObserver=new window.ResizeObserver(function(i){if(r){r=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(r){return r.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var r=n.computeSizes();r&&(n.emitCropData(),n.setInitialCrop(r)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(r){if(n.props.initialCroppedAreaPercentages){var i=tle(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),a=i.crop,o=i.zoom;n.props.onCropChange(a),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var s=rle(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),a=s.crop,o=s.zoom;n.props.onCropChange(a),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var r,i,a,o,s,l,c=n.imageRef.current||n.videoRef.current;if(c&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var u=n.containerRect.width/n.containerRect.height,d=((r=n.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((i=n.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,p=((a=n.imageRef.current)===null||a===void 0?void 0:a.naturalHeight)||((o=n.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,f=c.offsetWidth<d||c.offsetHeight<p,m=d/p,_=void 0;if(f){var g=n.getObjectFit();switch(g){default:case"contain":_=u>m?{width:n.containerRect.height*m,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/m};break;case"horizontal-cover":_={width:n.containerRect.width,height:n.containerRect.width/m};break;case"vertical-cover":_={width:n.containerRect.height*m,height:n.containerRect.height};break}}else _={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=Xt(Xt({},_),{naturalWidth:d,naturalHeight:p}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var h=n.props.cropSize?n.props.cropSize:Qse(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((s=n.state.cropSize)===null||s===void 0?void 0:s.height)!==h.height||((l=n.state.cropSize)===null||l===void 0?void 0:l.width)!==h.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(h),n.setState({cropSize:h},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(h),h}},n.onMouseDown=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(e.getMousePoint(r)))},n.onMouseMove=function(r){return n.onDrag(e.getMousePoint(r))},n.onTouchStart=function(r){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(r))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),r.touches.length===2?n.onPinchStart(r):r.touches.length===1&&n.onDragStart(e.getTouchPoint(r.touches[0]))))},n.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?n.onPinchMove(r):r.touches.length===1&&n.onDrag(e.getTouchPoint(r.touches[0]))},n.onGestureStart=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(r){if(r.preventDefault(),!n.isTouching){var i=e.getMousePoint(r),a=n.gestureZoomStart-1+r.scale;if(n.setNewZoom(a,i,{shouldUpdatePosition:!0}),n.props.onRotationChange){var o=n.gestureRotationStart+r.rotation;n.props.onRotationChange(o)}}},n.onGestureEnd=function(r){n.cleanEvents()},n.onDragStart=function(r){var i,a,o=r.x,s=r.y;n.dragStartPosition={x:o,y:s},n.dragStartCrop=Xt({},n.props.crop),(a=(i=n.props).onInteractionStart)===null||a===void 0||a.call(i)},n.onDrag=function(r){var i=r.x,a=r.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(i===void 0||a===void 0)){var o=i-n.dragStartPosition.x,s=a-n.dragStartPosition.y,l={x:n.dragStartCrop.x+o,y:n.dragStartCrop.y+s},c=n.props.restrictPosition?_c(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(c)}}))},n.onDragStopped=function(){var r,i;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(i=(r=n.props).onInteractionEnd)===null||i===void 0||i.call(r)},n.onWheel=function(r){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(r))){r.preventDefault();var i=e.getMousePoint(r),a=Kse(r).pixelY,o=n.props.zoom-a*n.props.zoomSpeed/200;n.setNewZoom(o,i,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var s,l;return(l=(s=n.props).onInteractionStart)===null||l===void 0?void 0:l.call(s)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var s,l;return(l=(s=n.props).onInteractionEnd)===null||l===void 0?void 0:l.call(s)})},250)}},n.getPointOnContainer=function(r){var i=r.x,a=r.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(i-n.containerRect.left),y:n.containerRect.height/2-(a-n.containerRect.top)}},n.getPointOnMedia=function(r){var i=r.x,a=r.y,o=n.props,s=o.crop,l=o.zoom;return{x:(i+s.x)/l,y:(a+s.y)/l}},n.setNewZoom=function(r,i,a){var o=a===void 0?{}:a,s=o.shouldUpdatePosition,l=s===void 0?!0:s;if(!(!n.state.cropSize||!n.props.onZoomChange)){var c=mc(r,n.props.minZoom,n.props.maxZoom);if(l){var u=n.getPointOnContainer(i),d=n.getPointOnMedia(u),p={x:d.x*c-u.x,y:d.y*c-u.y},f=n.props.restrictPosition?_c(p,n.mediaSize,n.state.cropSize,c,n.props.rotation):p;n.props.onCropChange(f)}n.props.onZoomChange(c)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?_c(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return Zse(r,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition)},n.emitCropData=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,a=r.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(i,a),n.props.onCropAreaChange&&n.props.onCropAreaChange(i,a)}},n.emitCropAreaChange=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,a=r.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(i,a)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var r=n.props.restrictPosition?_c(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(r),n.emitCropData()}},n}return e.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=ale,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},e.prototype.componentWillUnmount=function(){var n,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(n=this.resizeObserver)===null||n===void 0||n.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},e.prototype.componentDidUpdate=function(n){var r,i,a,o,s,l,c,u,d;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((r=n.cropSize)===null||r===void 0?void 0:r.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((a=n.cropSize)===null||a===void 0?void 0:a.width)!==((o=this.props.cropSize)===null||o===void 0?void 0:o.width)?this.computeSizes():(((s=n.crop)===null||s===void 0?void 0:s.x)!==((l=this.props.crop)===null||l===void 0?void 0:l.x)||((c=n.crop)===null||c===void 0?void 0:c.y)!==((u=this.props.crop)===null||u===void 0?void 0:u.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((d=this.videoRef.current)===null||d===void 0||d.load())},e.prototype.getAspect=function(){var n=this.props,r=n.cropSize,i=n.aspect;return r?r.width/r.height:i},e.prototype.getObjectFit=function(){var n,r,i,a;if(this.props.objectFit==="cover"){var o=this.imageRef.current||this.videoRef.current;if(o&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var s=this.containerRect.width/this.containerRect.height,l=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,c=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((a=this.videoRef.current)===null||a===void 0?void 0:a.videoHeight)||0,u=l/c;return u<s?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},e.prototype.onPinchStart=function(n){var r=e.getTouchPoint(n.touches[0]),i=e.getTouchPoint(n.touches[1]);this.lastPinchDistance=F1(r,i),this.lastPinchRotation=B1(r,i),this.onDragStart(U1(r,i))},e.prototype.onPinchMove=function(n){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var i=e.getTouchPoint(n.touches[0]),a=e.getTouchPoint(n.touches[1]),o=U1(i,a);this.onDrag(o),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var s=F1(i,a),l=r.props.zoom*(s/r.lastPinchDistance);r.setNewZoom(l,o,{shouldUpdatePosition:!1}),r.lastPinchDistance=s;var c=B1(i,a),u=r.props.rotation+(c-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(u),r.lastPinchRotation=c})}},e.prototype.render=function(){var n=this,r=this.props,i=r.image,a=r.video,o=r.mediaProps,s=r.transform,l=r.crop,c=l.x,u=l.y,d=r.rotation,p=r.zoom,f=r.cropShape,m=r.showGrid,_=r.style,g=_.containerStyle,h=_.cropAreaStyle,E=_.mediaStyle,v=r.classes,b=v.containerClassName,S=v.cropAreaClassName,O=v.mediaClassName,y=this.getObjectFit();return C.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(x){return n.containerRef=x},"data-testid":"container",style:g,className:gc("reactEasyCrop_Container",b)},i?C.createElement("img",Xt({alt:"",className:gc("reactEasyCrop_Image",y==="contain"&&"reactEasyCrop_Contain",y==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",y==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",O)},o,{src:i,ref:this.imageRef,style:Xt(Xt({},E),{transform:s||"translate(".concat(c,"px, ").concat(u,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):a&&C.createElement("video",Xt({autoPlay:!0,loop:!0,muted:!0,className:gc("reactEasyCrop_Video",y==="contain"&&"reactEasyCrop_Contain",y==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",y==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",O)},o,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Xt(Xt({},E),{transform:s||"translate(".concat(c,"px, ").concat(u,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(T){return C.createElement("source",Xt({key:T.src},T))})),this.state.cropSize&&C.createElement("div",{style:Xt(Xt({},h),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:gc("reactEasyCrop_CropArea",f==="round"&&"reactEasyCrop_CropAreaRound",m&&"reactEasyCrop_CropAreaGrid",S)}))},e.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:sle,minZoom:ole,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},e.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},e.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},e}(C.Component);const cle=t=>new Promise((e,n)=>{const r=new Image;r.addEventListener("load",()=>e(r)),r.addEventListener("error",i=>n(i)),r.setAttribute("crossOrigin","anonymous"),r.src=t});function G1(t){return t*Math.PI/180}function ule(t,e,n){const r=G1(n);return{width:Math.abs(Math.cos(r)*t)+Math.abs(Math.sin(r)*e),height:Math.abs(Math.sin(r)*t)+Math.abs(Math.cos(r)*e)}}async function dle(t,e,n=0,r={horizontal:!1,vertical:!1}){const i=await cle(t),a=document.createElement("canvas"),o=a.getContext("2d");if(!o)return null;const s=G1(n),{width:l,height:c}=ule(i.width,i.height,n);a.width=l,a.height=c,o.translate(l/2,c/2),o.rotate(s),o.scale(r.horizontal?-1:1,r.vertical?-1:1),o.translate(-i.width/2,-i.height/2),o.drawImage(i,0,0);const u=o.getImageData(e.x,e.y,e.width,e.height);return a.width=e.width,a.height=e.height,o.putImageData(u,0,0),new Promise((d,p)=>{a.toBlob(f=>{d(f)},"image/png")})}const $1=({title:t,open:e,onClose:n,onFileCropped:r,image:{width:i,height:a,aspect:o,imgSrc:s=""}})=>{const[l,c]=C.useState({x:0,y:0}),[u,d]=C.useState(1),p=C.useRef(),f=C.useRef(),m=async(h,E)=>{try{const v=await dle(s,E,0);p.current=new File([v],"image.png",{type:v.type})}catch{r(void 0)}},_=async()=>{r(f.current),n()},g=()=>{r(p.current),f.current=p.current,n()};return A.jsxs(X.Dialog,{open:e,scroll:"body",PaperProps:{sx:{maxWidth:"100%"}},children:[A.jsx(X.DialogTitle,{children:t}),A.jsx(X.DialogContent,{children:A.jsx(X.Stack,{position:"relative",alignItems:"center",justifyContent:"center",style:{position:"relative",width:i*1.1,height:a*1.1,margin:"auto"},children:A.jsx(lle,{image:s,crop:l,zoom:u,minZoom:1,maxZoom:5,cropSize:{width:i,height:a},aspect:o,onCropChange:c,onZoomChange:d,onCropComplete:m,objectFit:"horizontal-cover"})})}),A.jsxs(X.DialogActions,{children:[A.jsxs(X.Stack,{direction:"row",gap:3,flex:1,alignItems:"center",maxWidth:200,mr:"auto",children:[A.jsx(X.Typography,{variant:"body1",children:"Zoom"}),A.jsx(X.Slider,{value:u,onChange:(h,E)=>d(Array.isArray(E)?E[0]:E),min:1,max:5,size:"medium",step:.5})]}),A.jsx(X.Button,{variant:"soft",size:"medium",onClick:_,children:"Descartar"}),A.jsx(X.Button,{variant:"contained",size:"medium",onClick:g,children:"Salvar"})]})]})},ple=qt(X.Box)(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=e.variant==="filled",i=e.variant==="outlined",a=e.variant==="soft",o={...e.color==="default"&&{...i&&{backgroundColor:"transparent",color:t.palette.text.primary,border:`1px solid ${Ee(t.palette.grey[500],.32)}`},...a&&{color:n?t.palette.text.primary:t.palette.common.white,backgroundColor:Ee(t.palette.grey[500],.16)}}},s={...e.color!=="default"&&{...r&&{color:t.palette[e.color].contrastText,backgroundColor:t.palette[e.color].main},...i&&{backgroundColor:"transparent",color:t.palette[e.color].main,border:`1px solid ${t.palette[e.color].main}`},...a&&{color:t.palette[e.color][n?"dark":"light"],backgroundColor:Ee(t.palette[e.color].main,.16)}}};return{height:24,minWidth:22,lineHeight:0,borderRadius:6,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",textTransform:"capitalize",padding:t.spacing(0,1),color:t.palette.grey[800],fontSize:t.typography.pxToRem(12),fontFamily:t.typography.fontFamily,backgroundColor:t.palette.grey[300],fontWeight:t.typography.fontWeightBold,...s,...o}}),q1=C.forwardRef(({children:t,color:e="default",variant:n="soft",startIcon:r,endIcon:i,sx:a,...o},s)=>{const l=Ur(),c={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return A.jsxs(ple,{ref:s,component:"span",ownerState:{color:e,variant:n},sx:{...r&&{pl:.75},...i&&{pr:.75},...a},theme:l,...o,children:[r&&A.jsxs(X.Box,{sx:{mr:.75,...c},children:[" ",r," "]}),t,i&&A.jsxs(X.Box,{sx:{ml:.75,...c},children:[" ",i," "]})]})});q1.displayName="Label";function Ir(t){return typeof t=="string"||t instanceof String}function Y1(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function V1(t,e){return Array.isArray(e)?V1(t,(n,r)=>e.includes(r)):Object.entries(t).reduce((n,r)=>{let[i,a]=r;return e(a,i)&&(n[i]=a),n},{})}const Le={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function fle(t){switch(t){case Le.LEFT:return Le.FORCE_LEFT;case Le.RIGHT:return Le.FORCE_RIGHT;default:return t}}function ch(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function hc(t,e){if(e===t)return!0;const n=Array.isArray(e),r=Array.isArray(t);let i;if(n&&r){if(e.length!=t.length)return!1;for(i=0;i<e.length;i++)if(!hc(e[i],t[i]))return!1;return!0}if(n!=r)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const a=e instanceof Date,o=t instanceof Date;if(a&&o)return e.getTime()==t.getTime();if(a!=o)return!1;const s=e instanceof RegExp,l=t instanceof RegExp;if(s&&l)return e.toString()==t.toString();if(s!=l)return!1;const c=Object.keys(e);for(i=0;i<c.length;i++)if(!Object.prototype.hasOwnProperty.call(t,c[i]))return!1;for(i=0;i<c.length;i++)if(!hc(t[c[i]],e[c[i]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class _le{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Le.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Le.RIGHT:Le.LEFT}}function Ge(t,e){return new Ge.InputMask(t,e)}function H1(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?Ge.MaskedRegExp:Ir(t)?Ge.MaskedPattern:t===Date?Ge.MaskedDate:t===Number?Ge.MaskedNumber:Array.isArray(t)||t===Array?Ge.MaskedDynamic:Ge.Masked&&t.prototype instanceof Ge.Masked?t:Ge.Masked&&t instanceof Ge.Masked?t.constructor:t instanceof Function?Ge.MaskedFunction:(console.warn("Mask not found for mask",t),Ge.Masked)}function Ec(t){if(!t)throw new Error("Options in not defined");if(Ge.Masked){if(t.prototype instanceof Ge.Masked)return{mask:t};const{mask:e=void 0,...n}=t instanceof Ge.Masked?{mask:t}:Y1(t)&&t.mask instanceof Ge.Masked?t:{};if(e){const r=e.mask;return{...V1(e,(i,a)=>!a.startsWith("_")),mask:e.constructor,_mask:r,...n}}}return Y1(t)?{...t}:{mask:t}}function si(t){if(Ge.Masked&&t instanceof Ge.Masked)return t;const e=Ec(t),n=H1(e.mask);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return e.mask===n&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new n(e)}Ge.createMask=si;class uh{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,n){if(!(e==null||n==null||e===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(e,n)}catch{}}get isActive(){return!1}}Ge.MaskElement=uh;class li extends uh{constructor(e){super(),this.input=e,this._handlers={}}get rootElement(){var e,n,r;return(e=(n=(r=this.input).getRootNode)==null?void 0:n.call(r))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){Object.keys(e).forEach(n=>this._toggleEventHandler(li.EVENTS_MAP[n],e[n]))}unbindEvents(){Object.keys(this._handlers).forEach(e=>this._toggleEventHandler(e))}_toggleEventHandler(e,n){this._handlers[e]&&(this.input.removeEventListener(e,this._handlers[e]),delete this._handlers[e]),n&&(this.input.addEventListener(e,n),this._handlers[e]=n)}}li.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},Ge.HTMLMaskElement=li;class mle extends li{constructor(e){super(e),this.input=e,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,n){this.input.setSelectionRange(e,n)}get value(){return this.input.value}set value(e){this.input.value=e}}Ge.HTMLMaskElement=li;class z1 extends li{get _unsafeSelectionStart(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r<i?r:i}get _unsafeSelectionEnd(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r>i?r:i}_unsafeSelect(e,n){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.lastChild||this.input,n);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}Ge.HTMLContenteditableMaskElement=z1;class gle{constructor(e,n){this.el=e instanceof uh?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new z1(e):new mle(e),this.masked=si(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var n;return e==null||((n=this.masked)==null?void 0:n.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof Ge.Masked)&&this.masked.constructor===H1(e)){this.masked.updateOptions({mask:e});return}const n=e instanceof Ge.Masked?e:si({mask:e});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,n){const r=this._listeners[e];r&&r.forEach(i=>i(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const e=this.masked.unmaskedValue,n=this.masked.value,r=this.displayValue,i=this.unmaskedValue!==e||this.value!==n;this._unmaskedValue=e,this._value=n,this.el.value!==r&&(this.el.value=r),i&&this._fireChangeEvents()}updateOptions(e){const{mask:n,...r}=e,i=!this.maskEquals(n),a=!hc(this.masked,r);i&&(this.mask=n),a&&this.masked.updateOptions(r),(i||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Le.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,n){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(n),this}off(e,n){if(!this._listeners[e])return this;if(!n)return delete this._listeners[e],this;const r=this._listeners[e].indexOf(n);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){if(this._inputEvent=e,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new _le({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,i=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,a=r===this.masked.rawInputValue?n.removeDirection:Le.NONE;let o=this.masked.nearestInputPos(n.startChangePos+i,a);a!==Le.NONE&&(o=this.masked.nearestInputPos(o,Le.NONE)),this.updateControl(),this.updateCursor(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}Ge.InputMask=gle;class gt{static normalize(e){return Array.isArray(e)?e:[e,new gt]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}aggregate(e){return this.rawInserted+=e.rawInserted,this.skip=this.skip||e.skip,this.inserted+=e.inserted,this.tailShift+=e.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}Ge.ChangeDetails=gt;class cr{constructor(e,n,r){e===void 0&&(e=""),n===void 0&&(n=0),this.value=e,this.from=n,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class hn{constructor(e){this._value="",this._update({...hn.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){Object.keys(e).length&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,n){n===void 0&&(n={input:!0}),this.reset(),this.append(e,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,n){return e}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(e,n)}extractTail(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),new cr(this.extractInput(e,n),e)}appendTail(e){return Ir(e)&&(e=new cr(String(e))),e.appendTo(this)}_appendCharRaw(e,n){return e?(this._value+=e,new gt({inserted:e,rawInserted:e})):new gt}_appendChar(e,n,r){n===void 0&&(n={});const i=this.state;let a;if([e,a]=this.doPrepareChar(e,n),a=a.aggregate(this._appendCharRaw(e,n)),a.inserted){let o,s=this.doValidate(n)!==!1;if(s&&r!=null){const l=this.state;this.overwrite===!0&&(o=r.state,r.unshift(this.displayValue.length-a.tailShift));let c=this.appendTail(r);s=c.rawInserted===r.toString(),!(s&&c.inserted)&&this.overwrite==="shift"&&(this.state=l,o=r.state,r.shift(),c=this.appendTail(r),s=c.rawInserted===r.toString()),s&&c.inserted&&(this.state=l)}s||(a=new gt,this.state=i,r&&o&&(r.state=o))}return a}_appendPlaceholder(){return new gt}_appendEager(){return new gt}append(e,n,r){if(!Ir(e))throw new Error("value should be string");const i=Ir(r)?new cr(String(r)):r;n!=null&&n.tail&&(n._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,n);for(let o=0;o<e.length;++o){const s=this._appendChar(e[o],n,i);if(!s.rawInserted&&!this.doSkipInvalid(e[o],n,i))break;a.aggregate(s)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&e&&a.aggregate(this._appendEager()),i!=null&&(a.tailShift+=this.appendTail(i).tailShift),a}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(n),new gt}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const n=this.rawInputValue,r=this.value,i=e();return this.rawInputValue=n,this.value&&this.value!==r&&r.indexOf(this.value)===0&&this.append(r.slice(this.displayValue.length),{},""),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const n=this.state,r=e(this);return this.state=n,delete this._isolated,r}doSkipInvalid(e,n,r){return!!this.skipInvalid}doPrepare(e,n){return n===void 0&&(n={}),gt.normalize(this.prepare?this.prepare(e,this,n):e)}doPrepareChar(e,n){return n===void 0&&(n={}),gt.normalize(this.prepareChar?this.prepareChar(e,this,n):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,n,r,i,a){i===void 0&&(i=Le.NONE),a===void 0&&(a={input:!0});const o=e+n,s=this.extractTail(o),l=this.eager===!0||this.eager==="remove";let c;l&&(i=fle(i),c=this.extractInput(0,o,{raw:!0}));let u=e;const d=new gt;if(i!==Le.NONE&&(u=this.nearestInputPos(e,n>1&&e!==0&&!l?Le.NONE:i),d.tailShift=u-e),d.aggregate(this.remove(u)),l&&i!==Le.NONE&&c===this.rawInputValue)if(i===Le.FORCE_LEFT){let p;for(;c===this.rawInputValue&&(p=this.displayValue.length);)d.aggregate(new gt({tailShift:-1})).aggregate(this.remove(p-1))}else i===Le.FORCE_RIGHT&&s.unshift();return d.aggregate(this.append(r,a,s))}maskEquals(e){return this.mask===e}typedValueEquals(e){const n=this.typedValue;return e===n||hn.EMPTY_VALUES.includes(e)&&hn.EMPTY_VALUES.includes(n)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}}hn.DEFAULTS={skipInvalid:!0},hn.EMPTY_VALUES=[void 0,null,""],Ge.Masked=hn;class ci{constructor(e,n){e===void 0&&(e=[]),n===void 0&&(n=0),this.chunks=e,this.from=n}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Ir(e)?new cr(String(e)):e;const n=this.chunks[this.chunks.length-1],r=n&&(n.stop===e.stop||e.stop==null)&&e.from===n.from+n.toString().length;if(e instanceof cr)r?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof ci){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof Ge.MaskedPattern))return new cr(this.toString()).appendTo(e);const n=new gt;for(let r=0;r<this.chunks.length&&!n.skip;++r){const i=this.chunks[r],a=e._mapPosToBlock(e.displayValue.length),o=i.stop;let s;if(o!=null&&(!a||a.index<=o)){if(i instanceof ci||e._stops.indexOf(o)>=0){const l=e._appendPlaceholder(o);n.aggregate(l)}s=i instanceof ci&&e._blocks[o]}if(s){const l=s.appendTail(i);l.skip=!1,n.aggregate(l),e._value+=l.inserted;const c=i.toString().slice(l.rawInserted.length);c&&n.aggregate(e.append(c,{tail:!0}))}else n.aggregate(e.append(i.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:n,...r}=e;Object.assign(this,r),this.chunks=n.map(i=>{const a="chunks"in i?new ci:new cr;return a.state=i,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const n=e!=null?e-this.from:e;let r=0;for(;r<this.chunks.length;){const i=this.chunks[r],a=i.unshift(n);if(i.toString()){if(!a)break;++r}else this.chunks.splice(r,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const n=this.chunks[e],r=n.shift();if(n.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class hle{constructor(e,n){this.masked=e,this._log=[];const{offset:r,index:i}=e._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Le.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Le.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Le.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Le.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Le.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Le.NONE),!0})}}class W1{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(n),this._value||(this._isRawInput=!1),new gt}nearestInputPos(e,n){n===void 0&&(n=Le.NONE);const r=0,i=this._value.length;switch(n){case Le.LEFT:case Le.FORCE_LEFT:return r;case Le.NONE:case Le.RIGHT:case Le.FORCE_RIGHT:default:return i}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._isRawInput?n-e:0}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,n){n===void 0&&(n={});const r=new gt;if(this.isFilled)return r;const i=this.eager===!0||this.eager==="append",o=this.char===e&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!i)&&!n.tail;return o&&(r.rawInserted=this.char),this._value=r.inserted=this.char,this._isRawInput=o&&(n.raw||n.input),r}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new gt;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new cr("")}appendTail(e){return Ir(e)&&(e=new cr(String(e))),e.appendTo(this)}append(e,n,r){const i=this._appendChar(e[0],n);return r!=null&&(i.tailShift+=this.appendTail(r).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}}class bc{constructor(e){const{parent:n,isOptional:r,placeholderChar:i,displayChar:a,lazy:o,eager:s,...l}=e;this.masked=si(l),Object.assign(this,{parent:n,isOptional:r,placeholderChar:i,displayChar:a,lazy:o,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),e===0&&n>=1?(this.isFilled=!1,this.masked.remove(e,n)):new gt}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,n){if(n===void 0&&(n={}),this.isFilled)return new gt;const r=this.masked.state,i=this.masked._appendChar(e,this.currentMaskFlags(n));return i.inserted&&this.doValidate(n)===!1&&(i.inserted=i.rawInserted="",this.masked.state=r),!i.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,n,r){return this.masked.append(e,this.currentMaskFlags(n),r)}_appendPlaceholder(){const e=new gt;return this.isFilled||this.isOptional||(this.isFilled=!0,e.inserted=this.placeholderChar),e}_appendEager(){return new gt}extractTail(e,n){return this.masked.extractTail(e,n)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.masked.extractInput(e,n,r)}nearestInputPos(e,n){n===void 0&&(n=Le.NONE);const r=0,i=this.value.length,a=Math.min(Math.max(e,r),i);switch(n){case Le.LEFT:case Le.FORCE_LEFT:return this.isComplete?a:r;case Le.RIGHT:case Le.FORCE_RIGHT:return this.isComplete?a:i;case Le.NONE:default:return a}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.value.slice(e,n).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var n;return{...e,_beforeTailState:(e==null||(n=e._beforeTailState)==null?void 0:n.masked)||(e==null?void 0:e._beforeTailState)}}}bc.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Ele extends hn{updateOptions(e){super.updateOptions(e)}_update(e){const n=e.mask;n&&(e.validate=r=>r.search(n)>=0),super._update(e)}}Ge.MaskedRegExp=Ele;class En extends hn{constructor(e){super({...En.DEFAULTS,...e,definitions:Object.assign({},bc.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!e)return;let r=!1,i=!1;for(let a=0;a<n.length;++a){if(this.blocks){const c=n.slice(a),u=Object.keys(this.blocks).filter(p=>c.indexOf(p)===0);u.sort((p,f)=>f.length-p.length);const d=u[0];if(d){const{expose:p,...f}=Ec(this.blocks[d]),m=si({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...f,parent:this});m&&(this._blocks.push(m),p&&(this.exposeBlock=m),this._maskedBlocks[d]||(this._maskedBlocks[d]=[]),this._maskedBlocks[d].push(this._blocks.length-1)),a+=d.length-1;continue}}let o=n[a],s=o in e;if(o===En.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(o==="{"||o==="}"){r=!r;continue}if(o==="["||o==="]"){i=!i;continue}if(o===En.ESCAPE_CHAR){if(++a,o=n[a],!o)break;s=!1}const l=s?new bc({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Ec(e[o]),parent:this}):new W1({char:o,eager:this.eager,isUnmasking:r});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){const{_blocks:n,...r}=e;this._blocks.forEach((i,a)=>i.state=n[a]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,n)=>e+=n.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(n),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,n)=>e+=n.value,"")}set value(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(n),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(n),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,n)=>e+=n.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const n=new gt;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return n;this._blocks[r].isFilled&&++r;for(let i=r;i<this._blocks.length;++i){const a=this._blocks[i]._appendEager();if(!a.inserted)break;n.aggregate(a)}return n}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._mapPosToBlock(this.displayValue.length),i=new gt;if(!r)return i;for(let o=r.index;;++o){var a;const s=this._blocks[o];if(!s)break;const l=s._appendChar(e,{...n,_beforeTailState:(a=n._beforeTailState)==null||(a=a._blocks)==null?void 0:a[o]}),c=l.skip;if(i.aggregate(l),c||l.rawInserted)break}return i}extractTail(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=new ci;return e===n||this._forEachBlocksInRange(e,n,(i,a,o,s)=>{const l=i.extractTail(o,s);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof ci&&(l.blockIndex=a),r.extend(l)}),r}extractInput(e,n,r){if(e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),r===void 0&&(r={}),e===n)return"";let i="";return this._forEachBlocksInRange(e,n,(a,o,s,l)=>{i+=a.extractInput(s,l,r)}),i}_findStopBefore(e){let n;for(let r=0;r<this._stops.length;++r){const i=this._stops[r];if(i<=e)n=i;else break}return n}_appendPlaceholder(e){const n=new gt;if(this.lazy&&e==null)return n;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return n;const i=r.index,a=e??this._blocks.length;return this._blocks.slice(i,a).forEach(o=>{if(!o.lazy||e!=null){var s;const l=o._appendPlaceholder((s=o._blocks)==null?void 0:s.length);this._value+=l.inserted,n.aggregate(l)}}),n}_mapPosToBlock(e){let n="";for(let r=0;r<this._blocks.length;++r){const i=this._blocks[r],a=n.length;if(n+=i.displayValue,e<=n.length)return{index:r,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((n,r)=>n+=r.displayValue.length,0)}_forEachBlocksInRange(e,n,r){n===void 0&&(n=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const a=this._mapPosToBlock(n),o=a&&i.index===a.index,s=i.offset,l=a&&o?a.offset:this._blocks[i.index].displayValue.length;if(r(this._blocks[i.index],i.index,s,l),a&&!o){for(let c=i.index+1;c<a.index;++c)r(this._blocks[c],c,0,this._blocks[c].displayValue.length);r(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=super.remove(e,n);return this._forEachBlocksInRange(e,n,(i,a,o,s)=>{r.aggregate(i.remove(o,s))}),r}nearestInputPos(e,n){if(n===void 0&&(n=Le.NONE),!this._blocks.length)return 0;const r=new hle(this,e);if(n===Le.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(n===Le.LEFT||n===Le.FORCE_LEFT){if(n===Le.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),n===Le.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:n===Le.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return n===Le.RIGHT||n===Le.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:n===Le.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,Le.LEFT))):e}totalInputPositions(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,n,(i,a,o,s)=>{r+=i.totalInputPositions(o,s)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const n=this._maskedBlocks[e];return n?n.map(r=>this._blocks[r]):[]}}En.DEFAULTS={lazy:!0,placeholderChar:"_"},En.STOP_CHAR="`",En.ESCAPE_CHAR="\\",En.InputDefinition=bc,En.FixedDefinition=W1,Ge.MaskedPattern=En;class vc extends En{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:n=this.to||0,from:r=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...o}=e;this.to=n,this.from=r,this.maxLength=Math.max(String(n).length,i),this.autofix=a;const s=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<l.length&&l[c]===s[c];)++c;o.mask=l.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(o)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let n="",r="";const[,i,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(n="0".repeat(i.length)+a,r="9".repeat(i.length)+a),n=n.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[n,r]}doPrepareChar(e,n){n===void 0&&(n={});let r;if([e,r]=super.doPrepareChar(e.replace(/\D/g,""),n),!this.autofix||!e)return[e,r];const i=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0"),o=this.value+e;if(o.length>this.maxLength)return["",r];const[s,l]=this.boundaries(o);return Number(l)<this.from?[i[o.length-1],r]:Number(s)>this.to?this.autofix==="pad"&&o.length<this.maxLength?["",r.aggregate(this.append(i[o.length-1]+e,n))]:[a[o.length-1],r]:[e,r]}doValidate(e){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[i,a]=this.boundaries(n);return this.from<=Number(a)&&Number(i)<=this.to&&super.doValidate(e)}}Ge.MaskedRange=vc;class ui extends En{constructor(e){const{mask:n,pattern:r,...i}={...ui.DEFAULTS,...e};super({...i,mask:Ir(n)?n:r})}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:n,pattern:r,blocks:i,...a}={...ui.DEFAULTS,...e},o=Object.assign({},ui.GET_DEFAULT_BLOCKS());e.min&&(o.Y.from=e.min.getFullYear()),e.max&&(o.Y.to=e.max.getFullYear()),e.min&&e.max&&o.Y.from===o.Y.to&&(o.m.from=e.min.getMonth()+1,o.m.to=e.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=e.min.getDate(),o.d.to=e.max.getDate())),Object.assign(o,this.blocks,i),Object.keys(o).forEach(s=>{const l=o[s];!("autofix"in l)&&"autofix"in e&&(l.autofix=e.autofix)}),super._update({...a,mask:Ir(n)?n:r,blocks:o})}doValidate(e){const n=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}}ui.GET_DEFAULT_BLOCKS=()=>({d:{mask:vc,from:1,to:31,maxLength:2},m:{mask:vc,from:1,to:12,maxLength:2},Y:{mask:vc,from:1900,to:9999}}),ui.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";const n=String(t.getDate()).padStart(2,"0"),r=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return[n,r,i].join(".")},parse:(t,e)=>{const[n,r,i]=t.split(".").map(Number);return new Date(i,r-1,n)}},Ge.MaskedDate=ui;class Ko extends hn{constructor(e){super({...Ko.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(n=>{const{expose:r,...i}=Ec(n),a=si({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return r&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._applyDispatch(e,n);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(n))),r}_applyDispatch(e,n,r){e===void 0&&(e=""),n===void 0&&(n={}),r===void 0&&(r="");const i=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,a=this.rawInputValue,o=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:a,s=a.slice(o.length),l=this.currentMask,c=new gt,u=l==null?void 0:l.state;if(this.currentMask=this.doDispatch(e,{...n},r),this.currentMask)if(this.currentMask!==l){if(this.currentMask.reset(),o){const d=this.currentMask.append(o,{raw:!0});c.tailShift=d.inserted.length-i.length}s&&(c.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)}else u&&(this.currentMask.state=u);return c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const n=new gt;return e&&n.aggregate(this._applyDispatch("",{},e)),n.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var n,r;return{...e,_beforeTailState:((n=e._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,n,r){return n===void 0&&(n={}),r===void 0&&(r=""),this.dispatch(e,this,n,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,n){n===void 0&&(n={});let[r,i]=super.doPrepare(e,n);if(this.currentMask){let a;[r,a]=super.doPrepare(r,this.currentMaskFlags(n)),i=i.aggregate(a)}return[r,i]}doPrepareChar(e,n){n===void 0&&(n={});let[r,i]=super.doPrepareChar(e,n);if(this.currentMask){let a;[r,a]=super.doPrepareChar(r,this.currentMaskFlags(n)),i=i.aggregate(a)}return[r,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(e);this.currentMask&&(this.currentMask.typedValue=e,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,n){const r=new gt;return this.currentMask&&r.aggregate(this.currentMask.remove(e,n)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:n,currentMaskRef:r,currentMask:i,...a}=e;n&&this.compiledMasks.forEach((o,s)=>o.state=n[s]),r!=null&&(this.currentMask=r,this.currentMask.state=i),super.state=a}extractInput(e,n,r){return this.currentMask?this.currentMask.extractInput(e,n,r):""}extractTail(e,n){return this.currentMask?this.currentMask.extractTail(e,n):super.extractTail(e,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,n){return this.currentMask?this.currentMask.nearestInputPos(e,n):super.nearestInputPos(e,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((n,r)=>{if(!e[r])return;const{mask:i,...a}=e[r];return hc(n,a)&&n.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(e))}}Ko.DEFAULTS=void 0,Ko.DEFAULTS={dispatch:(t,e,n,r)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,a=e.compiledMasks.map((o,s)=>{const l=e.currentMask===o,c=l?o.displayValue.length:o.nearestInputPos(o.displayValue.length,Le.FORCE_LEFT);return o.rawInputValue!==i?(o.reset(),o.append(i,{raw:!0})):l||o.remove(c),o.append(t,e.currentMaskFlags(n)),o.appendTail(r),{index:s,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(c,o.nearestInputPos(o.displayValue.length,Le.FORCE_LEFT)))}});return a.sort((o,s)=>s.weight-o.weight||s.totalInputPositions-o.totalInputPositions),e.compiledMasks[a[0].index]}},Ge.MaskedDynamic=Ko;class ble extends En{constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:n,...r}=e;if(n){const i=n.map(s=>s.length),a=Math.min(...i),o=Math.max(...i)-a;r.mask="*".repeat(a),o&&(r.mask+="["+"*".repeat(o)+"]"),this.enum=n}super._update(r)}doValidate(e){return this.enum.some(n=>n.indexOf(this.unmaskedValue)===0)&&super.doValidate(e)}}Ge.MaskedEnum=ble;class vle extends hn{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}Ge.MaskedFunction=vle;class Tn extends hn{constructor(e){super({...Tn.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",r=(this.scale?"("+ch(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+n+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(ch).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(ch(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const n=e.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(e,n){n===void 0&&(n={});const[r,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),n);return e&&!r&&(i.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&i.aggregate(this._appendChar("-")),[r,i]}_separatorsCount(e,n){n===void 0&&(n=!1);let r=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++r,n&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n),this._removeThousandsSeparators(super.extractInput(e,n,r))}_appendCharRaw(e,n){if(n===void 0&&(n={}),!this.thousandsSeparator)return super._appendCharRaw(e,n);const r=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const a=super._appendCharRaw(e,n);this._value=this._insertThousandsSeparators(this._value);const o=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,s=this._separatorsCountFromSlice(o);return a.tailShift+=(s-i)*this.thousandsSeparator.length,a.skip=!a.rawInserted&&e===this.thousandsSeparator,a}_findSeparatorAround(e){if(this.thousandsSeparator){const n=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,n);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,n){const r=this._findSeparatorAround(e);r>=0&&(e=r);const i=this._findSeparatorAround(n);return i>=0&&(n=i+this.thousandsSeparator.length),[e,n]}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n);const r=this.value.slice(0,e),i=this.value.slice(n),a=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+i));const o=this._separatorsCountFromSlice(r);return new gt({tailShift:(o-a)*this.thousandsSeparator.length})}nearestInputPos(e,n){if(!this.thousandsSeparator)return e;switch(n){case Le.NONE:case Le.LEFT:case Le.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const i=r+this.thousandsSeparator.length;if(e<i||this.value.length<=i||n===Le.FORCE_LEFT)return r}break}case Le.RIGHT:case Le.FORCE_RIGHT:{const r=this._findSeparatorAround(e);if(r>=0)return r+this.thousandsSeparator.length}}return e}doValidate(e){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const r=this.number;n=n&&!isNaN(r)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(e)}doCommit(){if(this.value){const e=this.number;let n=e;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==e&&(this.unmaskedValue=this.format(n,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const n=this._removeThousandsSeparators(e).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(r,i,a,o)=>i+o),e.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const n=e.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(e,n,r){n===void 0&&(n={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Tn.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,n,r)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Tn.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Tn.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Tn.EMPTY_VALUES.includes(e)&&Tn.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Tn.UNMASKED_RADIX=".",Tn.EMPTY_VALUES=[...hn.EMPTY_VALUES,0],Tn.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Tn.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},Ge.MaskedNumber=Tn;const dh={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function j1(t,e,n){e===void 0&&(e=dh.MASKED),n===void 0&&(n=dh.MASKED);const r=si(t);return i=>r.runIsolated(a=>(a[e]=i,a[n]))}function Sle(t,e,n,r){return j1(e,n,r)(t)}Ge.PIPE_TYPE=dh,Ge.createPipe=j1,Ge.pipe=Sle;try{globalThis.IMask=Ge}catch{}const K1={mask:ee.oneOfType([ee.array,ee.func,ee.string,ee.instanceOf(RegExp),ee.oneOf([Date,Number,Ge.Masked]),ee.instanceOf(Ge.Masked)]),value:ee.any,unmask:ee.oneOfType([ee.bool,ee.oneOf(["typed"])]),prepare:ee.func,prepareChar:ee.func,validate:ee.func,commit:ee.func,overwrite:ee.oneOfType([ee.bool,ee.oneOf(["shift"])]),eager:ee.oneOfType([ee.bool,ee.oneOf(["append","remove"])]),skipInvalid:ee.bool,onAccept:ee.func,onComplete:ee.func,placeholderChar:ee.string,displayChar:ee.string,lazy:ee.bool,definitions:ee.object,blocks:ee.object,enum:ee.arrayOf(ee.string),maxLength:ee.number,from:ee.number,to:ee.number,pattern:ee.string,format:ee.func,parse:ee.func,autofix:ee.oneOfType([ee.bool,ee.oneOf(["pad"])]),radix:ee.string,thousandsSeparator:ee.string,mapToRadix:ee.arrayOf(ee.string),scale:ee.number,normalizeZeros:ee.bool,padFractionalZeros:ee.bool,min:ee.oneOfType([ee.number,ee.instanceOf(Date)]),max:ee.oneOfType([ee.number,ee.instanceOf(Date)]),dispatch:ee.func,inputRef:ee.oneOfType([ee.func,ee.shape({current:ee.object})])},Q1=Object.keys(K1).filter(t=>t!=="value"),yle=["value","unmask","onAccept","onComplete","inputRef"],Tle=Q1.filter(t=>yle.indexOf(t)<0);function Ole(t){var e;const n=(e=class extends C.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const a=this.props,o=this._extractMaskOptionsFromProps(a);if(o.mask)this.maskRef?(this.maskRef.updateOptions(o),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(o);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var s;(s=this.element)!=null&&s.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=Ge(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){const{...o}=a;return Object.keys(o).filter(s=>Tle.indexOf(s)<0).forEach(s=>{delete o[s]}),o}_extractNonMaskProps(a){const{...o}=a;return Q1.forEach(s=>{delete o[s]}),"defaultValue"in o||(o.defaultValue=a.mask?"":o.value),delete o.value,o}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return C.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),r=t.displayName||t.name||"Component";return n.displayName="IMask("+r+")",n.propTypes=K1,C.forwardRef((i,a)=>C.createElement(n,{...i,ref:a}))}const Cle=Ole(t=>{let{inputRef:e,...n}=t;return C.createElement("input",{...n,ref:e})}),Rle=(t,e)=>C.createElement(Cle,{...t,ref:e});C.forwardRef(Rle);function Nle(t,e){let{onAccept:n,onComplete:r}=e===void 0?{}:e;const i=C.useRef(null),a=C.useRef(null),[o,s]=C.useState(!1),[l,c]=C.useState({}),[u,d]=C.useState(""),[p,f]=C.useState(""),[m,_]=C.useState(),g=C.useCallback(()=>{var v;o&&((v=a.current)==null||v.destroy(),a.current=null)},[]),h=C.useCallback(v=>{const b=a.current;b&&(c({value:b.value,unmaskedValue:b.unmaskedValue,typedValue:b.typedValue}),_(b.typedValue),f(b.unmaskedValue),d(b.value),n==null||n(b.value,b,v))},[n]),E=C.useCallback(()=>a.current&&(r==null?void 0:r(a.current.value,a.current)),[r]);return C.useEffect(()=>{const v=i.current;if(!v||!(t!=null&&t.mask))return g();const b=a.current;b?b==null||b.updateOptions(t):v&&t!=null&&t.mask&&(a.current=Ge(v,t),h()),s(!!a.current)},[t,g,h]),C.useEffect(()=>{if(!a.current)return;const v=a.current;return v.on("accept",h),v.on("complete",E),()=>{v.off("accept",h),v.off("complete",E)}},[h,E]),C.useEffect(()=>{const{value:v,...b}=l,S=a.current;S&&o&&(v!==u&&(S.value=u),c(b))},[u]),C.useEffect(()=>{const{unmaskedValue:v,...b}=l,S=a.current;S&&o&&(v!==p&&(S.unmaskedValue=p),c(b))},[p]),C.useEffect(()=>{const{typedValue:v,...b}=l,S=a.current;S&&o&&(v!==m&&(S.typedValue=m),c(b))},[m]),C.useEffect(()=>g,[g]),{ref:i,maskRef:a,value:u,setValue:d,unmaskedValue:p,setUnmaskedValue:f,typedValue:m,setTypedValue:_}}const ph=C.forwardRef(({name:t,value:e,mask:n,onChange:r,...i},a)=>{const{ref:o,unmaskedValue:s,value:l,maskRef:c}=Nle({mask:n});return C.useEffect(()=>{c.current.value=e||""},[c,e]),C.useEffect(()=>{r({target:{name:t,value:s||e||""}})},[t,s,e]),A.jsx(X.TextField,{inputRef:a,inputProps:{ref:o},name:t,value:l,onChange:()=>r({target:{name:t,value:s}}),...i})});ph.displayName="MaskedInput";function Ale(t){let e;switch(t){case"top-left":e={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":e={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":e={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":e={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":e={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":e={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":e={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;default:e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}}return e}const xle=qt("span")(({arrow:t,theme:e})=>{const i=`solid 1px ${Ee(e.palette.grey[500],.12)}`,a={borderRadius:"0 0 3px 0",top:-6,borderBottom:i,borderRight:i},o={borderRadius:"3px 0 0 0",bottom:-6,borderTop:i,borderLeft:i},s={borderRadius:"0 3px 0 0",left:-6,borderTop:i,borderRight:i},l={borderRadius:"0 0 0 3px",right:-6,borderBottom:i,borderLeft:i};return{display:"none",[e.breakpoints.up("sm")]:{zIndex:1,width:12,height:12,content:'""',display:"block",position:"absolute",transform:"rotate(-135deg)",background:e.palette.background.paper},...t==="top-left"&&{...a,left:20},...t==="top-center"&&{...a,left:0,right:0,margin:"auto"},...t==="top-right"&&{...a,right:20},...t==="bottom-left"&&{...o,left:20},...t==="bottom-center"&&{...o,left:0,right:0,margin:"auto"},...t==="bottom-right"&&{...o,right:20},...t==="left-top"&&{...s,top:20},...t==="left-center"&&{...s,top:0,bottom:0,margin:"auto"},...t==="left-bottom"&&{...s,bottom:20},...t==="right-top"&&{...l,top:20},...t==="right-center"&&{...l,top:0,bottom:0,margin:"auto"},...t==="right-bottom"&&{...l,bottom:20}}}),Ile=({open:t,children:e,arrow:n="top-right",disabledArrow:r,sx:i,...a})=>{const{style:o,anchorOrigin:s,transformOrigin:l}=Ale(n);return A.jsxs(X.Popover,{open:!!t,anchorEl:t,anchorOrigin:s,transformOrigin:l,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...o,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...i}},...a,children:[!r&&A.jsx(xle,{arrow:n}),e]})},wle=X.styled(X.Stack)(({theme:t})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${t.palette.grey[300]}`,button:{marginRight:24}})),Dle=X.styled(X.DialogContent)({padding:"24px !important"}),Mle=X.styled(X.DialogActions)(({theme:t})=>({borderTop:`1px solid ${t.palette.grey[300]}`,backgroundColor:t.palette.grey[50]})),Lle=({actions:t,actionsProps:e,children:n,dialogContentProps:r,dialogTitle:i,dialogTitleProps:a,onClose:o,...s})=>A.jsxs(X.Dialog,{scroll:"body",...s,onClose:o,children:[A.jsxs(wle,{children:[i&&A.jsx(X.DialogTitle,{variant:"subtitle1",...a,children:i}),A.jsx(X.IconButton,{onClick:o,children:A.jsx(Lt,{icon:"ic:round-close"})})]}),A.jsx(Dle,{...r,children:n}),t&&A.jsx(Mle,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...e,children:t})]}),Ple=({children:t,container:e})=>Jo.createPortal(t,document.getElementById(e)||document.body),kle=({onSearch:t,onChange:e,trigger:n="click",iconPosition:r="end",...i})=>{const a=C.useRef(null),o=A.jsx(X.InputAdornment,{position:r,children:A.jsx(X.IconButton,{color:"inherit",onClick:()=>{var s;t((s=a.current)==null?void 0:s.value)},children:A.jsx(Lt,{icon:"eva:search-fill",sx:{width:20,height:20}})})});return A.jsx(X.TextField,{inputRef:a,InputProps:{onKeyDown:s=>{var l;s.key==="Enter"&&t((l=a.current)==null?void 0:l.value)},...r==="start"?{startAdornment:o}:{endAdornment:o}},onChange:s=>{if(n==="change"){t(s.target.value);return}s.target.value===""&&t(""),e&&e(s)},...i})},Fle=X.styled(X.StepConnector)(({theme:t})=>({top:10,left:"calc(-50% + 20px)",right:"calc(50% + 20px)","& .MuiStepConnector-line":{borderTopWidth:2,borderColor:t.palette.divider},"&.Mui-active, &.Mui-completed":{"& .MuiStepConnector-line":{borderColor:t.palette.primary.main}}})),Ble=({active:t,completed:e})=>A.jsx(X.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...t&&{color:"primary.main"}},children:e?A.jsx(Lt,{icon:"eva:checkmark-fill",sx:{color:"primary.main"}}):A.jsx(X.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),Ule=({steps:t,activeStep:e,showLabels:n=!0,sx:r,...i})=>A.jsx(X.Stepper,{alternativeLabel:!0,activeStep:e,connector:A.jsx(Fle,{}),sx:r,...i,children:t.map(a=>A.jsx(X.Step,{children:A.jsx(X.StepLabel,{StepIconComponent:Ble,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:n&&a})},a))}),Gle=({children:t,value:e,index:n})=>A.jsx(X.Box,{role:"tabpanel",id:`simple-tabpanel-${n}`,"aria-labelledby":`simple-tab-${n}`,sx:{mt:3,...e.toString()!==n.toString()&&{position:"absolute",width:"100%",height:0,overflow:"hidden",visibility:"hidden"}},children:t}),$le=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:a,fieldState:{error:o}})=>A.jsx(Pd,{...a,...r,onChange:s=>a.onChange(s),error:!!o,helperText:(o==null?void 0:o.message)||e})})},qle=({name:t,helperText:e,...n})=>{const{control:r}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:r,render:({field:i,fieldState:{error:a}})=>A.jsxs("div",{children:[A.jsx(X.FormControlLabel,{control:A.jsx(X.Checkbox,{...i,checked:i.value}),...n}),(!!a||e)&&A.jsx(X.FormHelperText,{error:!!a,children:a?a==null?void 0:a.message:e})]})})},Yle=({row:t,name:e,label:n,options:r,spacing:i,helperText:a,...o})=>{const{control:s}=rt.useFormContext(),l=(c,u)=>c.includes(u)?c.filter(d=>d!==u):[...c,u];return A.jsx(rt.Controller,{name:e,control:s,render:({field:c,fieldState:{error:u}})=>A.jsxs(X.FormControl,{component:"fieldset",children:[n&&A.jsx(X.FormLabel,{component:"legend",sx:{typography:"body2"},children:n}),A.jsx(X.FormGroup,{sx:{...t&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:i||0},...t&&{mr:0,"&:not(:last-of-type)":{mr:i||2}}}},children:r.map(d=>A.jsx(X.FormControlLabel,{control:A.jsx(X.Checkbox,{checked:c.value.includes(d.value),onChange:()=>c.onChange(l(c.value,d.value))}),label:d.label,...o},d.value))}),(!!u||a)&&A.jsx(X.FormHelperText,{error:!!u,sx:{mx:0},children:u?u==null?void 0:u.message:a})]})})},Vle=typeof window<"u"?C.useLayoutEffect:C.useEffect;function X1(t,e,n,r){const i=C.useRef(e);Vle(()=>{i.current=e},[e]),C.useEffect(()=>{const a=(n==null?void 0:n.current)||window;if(!(a&&a.addEventListener))return;const o=s=>i.current(s);return a.addEventListener(t,o,r),()=>{a.removeEventListener(t,o)}},[t,n,r])}const Hle=({keyName:t,inputs:e=[],rules:n,...r})=>{const i=C.useRef(null),{control:a,setValue:o,formState:{errors:s}}=rt.useFormContext(),l=d=>{const p=d.clipboardData.getData("text").split("");e.map((f,m)=>o(f,p[m])),d.preventDefault()},c=(d,p)=>{const{maxLength:f,value:m,name:_}=d.target,g=_.replace(t,""),h=Number(g),E=document.querySelector(`input[name=${t}${h+1}]`);m.length>f&&(d.target.value=m[0]),m.length>=f&&h<6&&E!==null&&E.focus(),p(d)};X1("paste",l,i);const u=e.some(d=>s[d]);return A.jsxs(X.Stack,{spacing:3,children:[A.jsx(X.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:i,children:e.map((d,p)=>A.jsx(rt.Controller,{name:`${t}${p+1}`,control:a,rules:n,render:({field:f,fieldState:{error:m}})=>A.jsx(X.TextField,{...r,...f,autoComplete:"none",error:!!m,autoFocus:p===0,placeholder:"-",onChange:_=>{c(_,f.onChange)},onFocus:_=>_.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number"}})},d))}),u&&A.jsx(X.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},zle=({name:t,rules:e,helperText:n,...r})=>{const{control:i}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:i,rules:e,render:({field:{ref:a,onChange:o,...s},fieldState:{error:l}})=>A.jsx(hO,{...s,onChangeColor:o,inputRef:a,fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||n,...r})})},Wle=({name:t,...e})=>{const{control:n}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:n,render:({field:{ref:r,...i},fieldState:{error:a}})=>{var o;return A.jsx(Ma.DatePicker,{inputRef:r,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...e.localeText},...i,...e,value:i.value?new Date(i.value):null,slotProps:{textField:{...(o=e.slotProps)==null?void 0:o.textField,error:!!a,helperText:a==null?void 0:a.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},jle=({name:t,label:e,...n})=>{const{control:r,setError:i}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:r,render:({field:{value:a,onChange:o},fieldState:{error:s}})=>A.jsx(Ma.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...n.localeText},value:[(a==null?void 0:a.startDate)||null,(a==null?void 0:a.endDate)||null],onChange:l=>o({startDate:l[0],endDate:l[1]}),onError:l=>{i(t,{message:l[0]||l[1]||void 0})},...n,slotProps:{textField:({position:l})=>{var c;return{...(c=n.slotProps)==null?void 0:c.textField,error:!!s,helperText:s==null?void 0:s.message,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:l==="start"?`${e} (Dt. Início)`:`${e} (Dt. Fim)`}}},sx:{width:1}})})},Kle=({name:t,...e})=>{const{control:n}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:n,render:({field:{ref:r,...i},fieldState:{error:a}})=>{var o;return A.jsx(Ma.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:r,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...e.localeText},...i,...e,value:i.value?new Date(i.value):null,slotProps:{textField:{...(o=e.slotProps)==null?void 0:o.textField,error:!!a,helperText:a==null?void 0:a.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},Qle=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{name:a,onBlur:o,onChange:s,value:l},fieldState:{error:c}})=>A.jsx(y1,{id:`quill${a}`,onBlur:o,onChange:s,value:l,error:!!c,helperText:(c==null?void 0:c.message)||e,...r})})},Z1=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{ref:a,...o},fieldState:{error:s}})=>A.jsx(X.TextField,{...o,inputRef:a,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||e,...r})})},Xle=({id:t,children:e,onSubmit:n,methods:r})=>A.jsx(rt.FormProvider,{...r,children:A.jsx(X.Stack,{component:"form",id:t,onSubmit:n,flex:1,width:1,noValidate:!0,children:e})}),Zle=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{name:a,onChange:o,value:s,ref:l},fieldState:{error:c}})=>A.jsx(ph,{ref:l,...r,name:a,value:s,error:!!c,helperText:(c==null?void 0:c.message)||e,onChange:({target:{value:u}})=>o(u)})})},Jle=t=>{const[e,n]=C.useState(!1);return A.jsx(Z1,{...t,type:e?"text":"password",InputProps:{endAdornment:A.jsx(X.InputAdornment,{position:"end",children:A.jsx(X.IconButton,{onClick:()=>n(!e),edge:"end","aria-label":"Mostrar/Ocultar senha",children:A.jsx(Lt,{icon:e?"eva:eye-off-fill":"eva:eye-fill"})})})}})},ece=({name:t,rules:e,row:n,label:r,options:i,spacing:a,helperText:o,...s})=>{const{control:l}=rt.useFormContext(),c=r?`${t}-${r}`:"";return A.jsx(rt.Controller,{name:t,control:l,rules:e,render:({field:u,fieldState:{error:d}})=>A.jsxs(X.FormControl,{component:"fieldset",children:[r&&A.jsx(X.FormLabel,{component:"legend",id:c,sx:{typography:"body2"},children:r}),A.jsx(X.RadioGroup,{...u,"aria-labelledby":c,row:n,...s,children:i.map(p=>A.jsx(X.FormControlLabel,{value:p.value,control:A.jsx(X.Radio,{}),label:p.label,sx:{"&:not(:last-of-type)":{mb:a||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:a||2}}}},p.value))}),(!!d||o)&&A.jsx(X.FormHelperText,{error:!!d,sx:{mx:0},children:d?d==null?void 0:d.message:o})]})})},tce=({name:t,helperText:e,...n})=>{const{control:r}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:r,render:({field:i,fieldState:{error:a}})=>A.jsxs("div",{children:[A.jsx(X.FormControlLabel,{control:A.jsx(X.Switch,{...i,checked:i.value}),...n}),(!!a||e)&&A.jsx(X.FormHelperText,{error:!!a,children:a?a==null?void 0:a.message:e})]})})},nce=({name:t,...e})=>{const{control:n}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:n,render:({field:{ref:r,...i},fieldState:{error:a}})=>{var o;return A.jsx(Ma.TimePicker,{ampm:!1,format:"HH:mm",inputRef:r,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...e.localeText},...i,...e,value:i.value?new Date(i.value):null,slotProps:{textField:{...(o=e.slotProps)==null?void 0:o.textField,error:!!a,helperText:a==null?void 0:a.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})};function xa(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,e||[])).next())})}function Ia(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function J1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function ex(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var rce=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Qo(t,e){var n=ice(t);if(typeof n.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof r=="string"&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function ice(t){var e=t.name,n=e&&e.lastIndexOf(".")!==-1;if(n&&!t.type){var r=e.split(".").pop().toLowerCase(),i=rce.get(r);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}var ace=[".DS_Store","Thumbs.db"];function oce(t){return xa(this,void 0,void 0,function(){return Ia(this,function(e){return Sc(t)&&sce(t.dataTransfer)?[2,dce(t.dataTransfer,t.type)]:lce(t)?[2,cce(t)]:Array.isArray(t)&&t.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,uce(t)]:[2,[]]})})}function sce(t){return Sc(t)}function lce(t){return Sc(t)&&Sc(t.target)}function Sc(t){return typeof t=="object"&&t!==null}function cce(t){return fh(t.target.files).map(function(e){return Qo(e)})}function uce(t){return xa(this,void 0,void 0,function(){var e;return Ia(this,function(n){switch(n.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return e=n.sent(),[2,e.map(function(r){return Qo(r)})]}})})}function dce(t,e){return xa(this,void 0,void 0,function(){var n,r;return Ia(this,function(i){switch(i.label){case 0:return t.items?(n=fh(t.items).filter(function(a){return a.kind==="file"}),e!=="drop"?[2,n]:[4,Promise.all(n.map(pce))]):[3,2];case 1:return r=i.sent(),[2,tx(nx(r))];case 2:return[2,tx(fh(t.files).map(function(a){return Qo(a)}))]}})})}function tx(t){return t.filter(function(e){return ace.indexOf(e.name)===-1})}function fh(t){if(t===null)return[];for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function pce(t){if(typeof t.webkitGetAsEntry!="function")return rx(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?ix(e):rx(t)}function nx(t){return t.reduce(function(e,n){return ex(ex([],J1(e),!1),J1(Array.isArray(n)?nx(n):[n]),!1)},[])}function rx(t){var e=t.getAsFile();if(!e)return Promise.reject("".concat(t," is not a File"));var n=Qo(e);return Promise.resolve(n)}function fce(t){return xa(this,void 0,void 0,function(){return Ia(this,function(e){return[2,t.isDirectory?ix(t):_ce(t)]})})}function ix(t){var e=t.createReader();return new Promise(function(n,r){var i=[];function a(){var o=this;e.readEntries(function(s){return xa(o,void 0,void 0,function(){var l,c,u;return Ia(this,function(d){switch(d.label){case 0:if(s.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=d.sent(),n(l),[3,4];case 3:return c=d.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(s.map(fce)),i.push(u),a(),d.label=6;case 6:return[2]}})})},function(s){r(s)})}a()})}function _ce(t){return xa(this,void 0,void 0,function(){return Ia(this,function(e){return[2,new Promise(function(n,r){t.file(function(i){var a=Qo(i,t.fullPath);n(a)},function(i){r(i)})})]})})}var mce=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",i=(t.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0};function ax(t){return Ece(t)||hce(t)||cx(t)||gce()}function gce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
290
|
+
`,ole=1,sle=3,lle=function(t){Use(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.imageRef=C.createRef(),n.videoRef=C.createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document<"u"?document:null,n.currentWindow=typeof window<"u"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!n.containerRef)){var r=!0;n.resizeObserver=new window.ResizeObserver(function(i){if(r){r=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(r){return r.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var r=n.computeSizes();r&&(n.emitCropData(),n.setInitialCrop(r)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(r){if(n.props.initialCroppedAreaPercentages){var i=tle(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),a=i.crop,o=i.zoom;n.props.onCropChange(a),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var s=rle(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),a=s.crop,o=s.zoom;n.props.onCropChange(a),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var r,i,a,o,s,l,c=n.imageRef.current||n.videoRef.current;if(c&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var u=n.containerRect.width/n.containerRect.height,d=((r=n.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((i=n.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,p=((a=n.imageRef.current)===null||a===void 0?void 0:a.naturalHeight)||((o=n.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,f=c.offsetWidth<d||c.offsetHeight<p,m=d/p,_=void 0;if(f){var g=n.getObjectFit();switch(g){default:case"contain":_=u>m?{width:n.containerRect.height*m,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/m};break;case"horizontal-cover":_={width:n.containerRect.width,height:n.containerRect.width/m};break;case"vertical-cover":_={width:n.containerRect.height*m,height:n.containerRect.height};break}}else _={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=Xt(Xt({},_),{naturalWidth:d,naturalHeight:p}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var h=n.props.cropSize?n.props.cropSize:Qse(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((s=n.state.cropSize)===null||s===void 0?void 0:s.height)!==h.height||((l=n.state.cropSize)===null||l===void 0?void 0:l.width)!==h.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(h),n.setState({cropSize:h},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(h),h}},n.onMouseDown=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(e.getMousePoint(r)))},n.onMouseMove=function(r){return n.onDrag(e.getMousePoint(r))},n.onTouchStart=function(r){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(r))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),r.touches.length===2?n.onPinchStart(r):r.touches.length===1&&n.onDragStart(e.getTouchPoint(r.touches[0]))))},n.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?n.onPinchMove(r):r.touches.length===1&&n.onDrag(e.getTouchPoint(r.touches[0]))},n.onGestureStart=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(r){if(r.preventDefault(),!n.isTouching){var i=e.getMousePoint(r),a=n.gestureZoomStart-1+r.scale;if(n.setNewZoom(a,i,{shouldUpdatePosition:!0}),n.props.onRotationChange){var o=n.gestureRotationStart+r.rotation;n.props.onRotationChange(o)}}},n.onGestureEnd=function(r){n.cleanEvents()},n.onDragStart=function(r){var i,a,o=r.x,s=r.y;n.dragStartPosition={x:o,y:s},n.dragStartCrop=Xt({},n.props.crop),(a=(i=n.props).onInteractionStart)===null||a===void 0||a.call(i)},n.onDrag=function(r){var i=r.x,a=r.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(i===void 0||a===void 0)){var o=i-n.dragStartPosition.x,s=a-n.dragStartPosition.y,l={x:n.dragStartCrop.x+o,y:n.dragStartCrop.y+s},c=n.props.restrictPosition?_c(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(c)}}))},n.onDragStopped=function(){var r,i;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(i=(r=n.props).onInteractionEnd)===null||i===void 0||i.call(r)},n.onWheel=function(r){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(r))){r.preventDefault();var i=e.getMousePoint(r),a=Kse(r).pixelY,o=n.props.zoom-a*n.props.zoomSpeed/200;n.setNewZoom(o,i,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var s,l;return(l=(s=n.props).onInteractionStart)===null||l===void 0?void 0:l.call(s)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var s,l;return(l=(s=n.props).onInteractionEnd)===null||l===void 0?void 0:l.call(s)})},250)}},n.getPointOnContainer=function(r){var i=r.x,a=r.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(i-n.containerRect.left),y:n.containerRect.height/2-(a-n.containerRect.top)}},n.getPointOnMedia=function(r){var i=r.x,a=r.y,o=n.props,s=o.crop,l=o.zoom;return{x:(i+s.x)/l,y:(a+s.y)/l}},n.setNewZoom=function(r,i,a){var o=a===void 0?{}:a,s=o.shouldUpdatePosition,l=s===void 0?!0:s;if(!(!n.state.cropSize||!n.props.onZoomChange)){var c=mc(r,n.props.minZoom,n.props.maxZoom);if(l){var u=n.getPointOnContainer(i),d=n.getPointOnMedia(u),p={x:d.x*c-u.x,y:d.y*c-u.y},f=n.props.restrictPosition?_c(p,n.mediaSize,n.state.cropSize,c,n.props.rotation):p;n.props.onCropChange(f)}n.props.onZoomChange(c)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?_c(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return Zse(r,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition)},n.emitCropData=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,a=r.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(i,a),n.props.onCropAreaChange&&n.props.onCropAreaChange(i,a)}},n.emitCropAreaChange=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,a=r.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(i,a)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var r=n.props.restrictPosition?_c(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(r),n.emitCropData()}},n}return e.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=ale,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},e.prototype.componentWillUnmount=function(){var n,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(n=this.resizeObserver)===null||n===void 0||n.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},e.prototype.componentDidUpdate=function(n){var r,i,a,o,s,l,c,u,d;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((r=n.cropSize)===null||r===void 0?void 0:r.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((a=n.cropSize)===null||a===void 0?void 0:a.width)!==((o=this.props.cropSize)===null||o===void 0?void 0:o.width)?this.computeSizes():(((s=n.crop)===null||s===void 0?void 0:s.x)!==((l=this.props.crop)===null||l===void 0?void 0:l.x)||((c=n.crop)===null||c===void 0?void 0:c.y)!==((u=this.props.crop)===null||u===void 0?void 0:u.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((d=this.videoRef.current)===null||d===void 0||d.load())},e.prototype.getAspect=function(){var n=this.props,r=n.cropSize,i=n.aspect;return r?r.width/r.height:i},e.prototype.getObjectFit=function(){var n,r,i,a;if(this.props.objectFit==="cover"){var o=this.imageRef.current||this.videoRef.current;if(o&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var s=this.containerRect.width/this.containerRect.height,l=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,c=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((a=this.videoRef.current)===null||a===void 0?void 0:a.videoHeight)||0,u=l/c;return u<s?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},e.prototype.onPinchStart=function(n){var r=e.getTouchPoint(n.touches[0]),i=e.getTouchPoint(n.touches[1]);this.lastPinchDistance=F1(r,i),this.lastPinchRotation=B1(r,i),this.onDragStart(U1(r,i))},e.prototype.onPinchMove=function(n){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var i=e.getTouchPoint(n.touches[0]),a=e.getTouchPoint(n.touches[1]),o=U1(i,a);this.onDrag(o),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var s=F1(i,a),l=r.props.zoom*(s/r.lastPinchDistance);r.setNewZoom(l,o,{shouldUpdatePosition:!1}),r.lastPinchDistance=s;var c=B1(i,a),u=r.props.rotation+(c-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(u),r.lastPinchRotation=c})}},e.prototype.render=function(){var n=this,r=this.props,i=r.image,a=r.video,o=r.mediaProps,s=r.transform,l=r.crop,c=l.x,u=l.y,d=r.rotation,p=r.zoom,f=r.cropShape,m=r.showGrid,_=r.style,g=_.containerStyle,h=_.cropAreaStyle,E=_.mediaStyle,v=r.classes,b=v.containerClassName,S=v.cropAreaClassName,O=v.mediaClassName,y=this.getObjectFit();return C.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(x){return n.containerRef=x},"data-testid":"container",style:g,className:gc("reactEasyCrop_Container",b)},i?C.createElement("img",Xt({alt:"",className:gc("reactEasyCrop_Image",y==="contain"&&"reactEasyCrop_Contain",y==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",y==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",O)},o,{src:i,ref:this.imageRef,style:Xt(Xt({},E),{transform:s||"translate(".concat(c,"px, ").concat(u,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):a&&C.createElement("video",Xt({autoPlay:!0,loop:!0,muted:!0,className:gc("reactEasyCrop_Video",y==="contain"&&"reactEasyCrop_Contain",y==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",y==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",O)},o,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Xt(Xt({},E),{transform:s||"translate(".concat(c,"px, ").concat(u,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(T){return C.createElement("source",Xt({key:T.src},T))})),this.state.cropSize&&C.createElement("div",{style:Xt(Xt({},h),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:gc("reactEasyCrop_CropArea",f==="round"&&"reactEasyCrop_CropAreaRound",m&&"reactEasyCrop_CropAreaGrid",S)}))},e.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:sle,minZoom:ole,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},e.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},e.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},e}(C.Component);const cle=t=>new Promise((e,n)=>{const r=new Image;r.addEventListener("load",()=>e(r)),r.addEventListener("error",i=>n(i)),r.setAttribute("crossOrigin","anonymous"),r.src=t});function G1(t){return t*Math.PI/180}function ule(t,e,n){const r=G1(n);return{width:Math.abs(Math.cos(r)*t)+Math.abs(Math.sin(r)*e),height:Math.abs(Math.sin(r)*t)+Math.abs(Math.cos(r)*e)}}async function dle(t,e,n=0,r={horizontal:!1,vertical:!1}){const i=await cle(t),a=document.createElement("canvas"),o=a.getContext("2d");if(!o)return null;const s=G1(n),{width:l,height:c}=ule(i.width,i.height,n);a.width=l,a.height=c,o.translate(l/2,c/2),o.rotate(s),o.scale(r.horizontal?-1:1,r.vertical?-1:1),o.translate(-i.width/2,-i.height/2),o.drawImage(i,0,0);const u=o.getImageData(e.x,e.y,e.width,e.height);return a.width=e.width,a.height=e.height,o.putImageData(u,0,0),new Promise((d,p)=>{a.toBlob(f=>{d(f)},"image/png")})}const $1=({title:t,open:e,onClose:n,onFileCropped:r,image:{width:i,height:a,aspect:o,imgSrc:s=""}})=>{const[l,c]=C.useState({x:0,y:0}),[u,d]=C.useState(1),p=C.useRef(),f=C.useRef(),m=async(h,E)=>{try{const v=await dle(s,E,0);p.current=new File([v],"image.png",{type:v.type})}catch{r(void 0)}},_=async()=>{r(f.current),n()},g=()=>{r(p.current),f.current=p.current,n()};return A.jsxs(X.Dialog,{open:e,scroll:"body",PaperProps:{sx:{maxWidth:"100%"}},children:[A.jsx(X.DialogTitle,{children:t}),A.jsx(X.DialogContent,{children:A.jsx(X.Stack,{position:"relative",alignItems:"center",justifyContent:"center",style:{position:"relative",width:i*1.1,height:a*1.1,margin:"auto"},children:A.jsx(lle,{image:s,crop:l,zoom:u,minZoom:1,maxZoom:5,cropSize:{width:i,height:a},aspect:o,onCropChange:c,onZoomChange:d,onCropComplete:m,objectFit:"horizontal-cover"})})}),A.jsxs(X.DialogActions,{children:[A.jsxs(X.Stack,{direction:"row",gap:3,flex:1,alignItems:"center",maxWidth:200,mr:"auto",children:[A.jsx(X.Typography,{variant:"body1",children:"Zoom"}),A.jsx(X.Slider,{value:u,onChange:(h,E)=>d(Array.isArray(E)?E[0]:E),min:1,max:5,size:"medium",step:.5})]}),A.jsx(X.Button,{variant:"soft",size:"medium",onClick:_,children:"Descartar"}),A.jsx(X.Button,{variant:"contained",size:"medium",onClick:g,children:"Salvar"})]})]})},ple=qt(X.Box)(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=e.variant==="filled",i=e.variant==="outlined",a=e.variant==="soft",o={...e.color==="default"&&{...i&&{backgroundColor:"transparent",color:t.palette.text.primary,border:`1px solid ${Ee(t.palette.grey[500],.32)}`},...a&&{color:n?t.palette.text.primary:t.palette.common.white,backgroundColor:Ee(t.palette.grey[500],.16)}}},s={...e.color!=="default"&&{...r&&{color:t.palette[e.color].contrastText,backgroundColor:t.palette[e.color].main},...i&&{backgroundColor:"transparent",color:t.palette[e.color].main,border:`1px solid ${t.palette[e.color].main}`},...a&&{color:t.palette[e.color][n?"dark":"light"],backgroundColor:Ee(t.palette[e.color].main,.16)}}};return{height:24,minWidth:22,lineHeight:0,borderRadius:6,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",textTransform:"capitalize",padding:t.spacing(0,1),color:t.palette.grey[800],fontSize:t.typography.pxToRem(12),fontFamily:t.typography.fontFamily,backgroundColor:t.palette.grey[300],fontWeight:t.typography.fontWeightBold,...s,...o}}),q1=C.forwardRef(({children:t,color:e="default",variant:n="soft",startIcon:r,endIcon:i,sx:a,...o},s)=>{const l=Ur(),c={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return A.jsxs(ple,{ref:s,component:"span",ownerState:{color:e,variant:n},sx:{...r&&{pl:.75},...i&&{pr:.75},...a},theme:l,...o,children:[r&&A.jsxs(X.Box,{sx:{mr:.75,...c},children:[" ",r," "]}),t,i&&A.jsxs(X.Box,{sx:{ml:.75,...c},children:[" ",i," "]})]})});q1.displayName="Label";function Ir(t){return typeof t=="string"||t instanceof String}function Y1(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function V1(t,e){return Array.isArray(e)?V1(t,(n,r)=>e.includes(r)):Object.entries(t).reduce((n,r)=>{let[i,a]=r;return e(a,i)&&(n[i]=a),n},{})}const Le={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function fle(t){switch(t){case Le.LEFT:return Le.FORCE_LEFT;case Le.RIGHT:return Le.FORCE_RIGHT;default:return t}}function ch(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function hc(t,e){if(e===t)return!0;const n=Array.isArray(e),r=Array.isArray(t);let i;if(n&&r){if(e.length!=t.length)return!1;for(i=0;i<e.length;i++)if(!hc(e[i],t[i]))return!1;return!0}if(n!=r)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const a=e instanceof Date,o=t instanceof Date;if(a&&o)return e.getTime()==t.getTime();if(a!=o)return!1;const s=e instanceof RegExp,l=t instanceof RegExp;if(s&&l)return e.toString()==t.toString();if(s!=l)return!1;const c=Object.keys(e);for(i=0;i<c.length;i++)if(!Object.prototype.hasOwnProperty.call(t,c[i]))return!1;for(i=0;i<c.length;i++)if(!hc(t[c[i]],e[c[i]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class _le{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Le.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Le.RIGHT:Le.LEFT}}function Ge(t,e){return new Ge.InputMask(t,e)}function H1(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?Ge.MaskedRegExp:Ir(t)?Ge.MaskedPattern:t===Date?Ge.MaskedDate:t===Number?Ge.MaskedNumber:Array.isArray(t)||t===Array?Ge.MaskedDynamic:Ge.Masked&&t.prototype instanceof Ge.Masked?t:Ge.Masked&&t instanceof Ge.Masked?t.constructor:t instanceof Function?Ge.MaskedFunction:(console.warn("Mask not found for mask",t),Ge.Masked)}function Ec(t){if(!t)throw new Error("Options in not defined");if(Ge.Masked){if(t.prototype instanceof Ge.Masked)return{mask:t};const{mask:e=void 0,...n}=t instanceof Ge.Masked?{mask:t}:Y1(t)&&t.mask instanceof Ge.Masked?t:{};if(e){const r=e.mask;return{...V1(e,(i,a)=>!a.startsWith("_")),mask:e.constructor,_mask:r,...n}}}return Y1(t)?{...t}:{mask:t}}function si(t){if(Ge.Masked&&t instanceof Ge.Masked)return t;const e=Ec(t),n=H1(e.mask);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return e.mask===n&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new n(e)}Ge.createMask=si;class uh{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,n){if(!(e==null||n==null||e===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(e,n)}catch{}}get isActive(){return!1}}Ge.MaskElement=uh;class li extends uh{constructor(e){super(),this.input=e,this._handlers={}}get rootElement(){var e,n,r;return(e=(n=(r=this.input).getRootNode)==null?void 0:n.call(r))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){Object.keys(e).forEach(n=>this._toggleEventHandler(li.EVENTS_MAP[n],e[n]))}unbindEvents(){Object.keys(this._handlers).forEach(e=>this._toggleEventHandler(e))}_toggleEventHandler(e,n){this._handlers[e]&&(this.input.removeEventListener(e,this._handlers[e]),delete this._handlers[e]),n&&(this.input.addEventListener(e,n),this._handlers[e]=n)}}li.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},Ge.HTMLMaskElement=li;class mle extends li{constructor(e){super(e),this.input=e,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,n){this.input.setSelectionRange(e,n)}get value(){return this.input.value}set value(e){this.input.value=e}}Ge.HTMLMaskElement=li;class z1 extends li{get _unsafeSelectionStart(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r<i?r:i}get _unsafeSelectionEnd(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r>i?r:i}_unsafeSelect(e,n){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.lastChild||this.input,n);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}Ge.HTMLContenteditableMaskElement=z1;class gle{constructor(e,n){this.el=e instanceof uh?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new z1(e):new mle(e),this.masked=si(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var n;return e==null||((n=this.masked)==null?void 0:n.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof Ge.Masked)&&this.masked.constructor===H1(e)){this.masked.updateOptions({mask:e});return}const n=e instanceof Ge.Masked?e:si({mask:e});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,n){const r=this._listeners[e];r&&r.forEach(i=>i(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const e=this.masked.unmaskedValue,n=this.masked.value,r=this.displayValue,i=this.unmaskedValue!==e||this.value!==n;this._unmaskedValue=e,this._value=n,this.el.value!==r&&(this.el.value=r),i&&this._fireChangeEvents()}updateOptions(e){const{mask:n,...r}=e,i=!this.maskEquals(n),a=!hc(this.masked,r);i&&(this.mask=n),a&&this.masked.updateOptions(r),(i||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Le.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,n){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(n),this}off(e,n){if(!this._listeners[e])return this;if(!n)return delete this._listeners[e],this;const r=this._listeners[e].indexOf(n);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){if(this._inputEvent=e,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new _le({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,i=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,a=r===this.masked.rawInputValue?n.removeDirection:Le.NONE;let o=this.masked.nearestInputPos(n.startChangePos+i,a);a!==Le.NONE&&(o=this.masked.nearestInputPos(o,Le.NONE)),this.updateControl(),this.updateCursor(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}Ge.InputMask=gle;class gt{static normalize(e){return Array.isArray(e)?e:[e,new gt]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}aggregate(e){return this.rawInserted+=e.rawInserted,this.skip=this.skip||e.skip,this.inserted+=e.inserted,this.tailShift+=e.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}Ge.ChangeDetails=gt;class cr{constructor(e,n,r){e===void 0&&(e=""),n===void 0&&(n=0),this.value=e,this.from=n,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class hn{constructor(e){this._value="",this._update({...hn.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){Object.keys(e).length&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,n){n===void 0&&(n={input:!0}),this.reset(),this.append(e,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,n){return e}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(e,n)}extractTail(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),new cr(this.extractInput(e,n),e)}appendTail(e){return Ir(e)&&(e=new cr(String(e))),e.appendTo(this)}_appendCharRaw(e,n){return e?(this._value+=e,new gt({inserted:e,rawInserted:e})):new gt}_appendChar(e,n,r){n===void 0&&(n={});const i=this.state;let a;if([e,a]=this.doPrepareChar(e,n),a=a.aggregate(this._appendCharRaw(e,n)),a.inserted){let o,s=this.doValidate(n)!==!1;if(s&&r!=null){const l=this.state;this.overwrite===!0&&(o=r.state,r.unshift(this.displayValue.length-a.tailShift));let c=this.appendTail(r);s=c.rawInserted===r.toString(),!(s&&c.inserted)&&this.overwrite==="shift"&&(this.state=l,o=r.state,r.shift(),c=this.appendTail(r),s=c.rawInserted===r.toString()),s&&c.inserted&&(this.state=l)}s||(a=new gt,this.state=i,r&&o&&(r.state=o))}return a}_appendPlaceholder(){return new gt}_appendEager(){return new gt}append(e,n,r){if(!Ir(e))throw new Error("value should be string");const i=Ir(r)?new cr(String(r)):r;n!=null&&n.tail&&(n._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,n);for(let o=0;o<e.length;++o){const s=this._appendChar(e[o],n,i);if(!s.rawInserted&&!this.doSkipInvalid(e[o],n,i))break;a.aggregate(s)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&e&&a.aggregate(this._appendEager()),i!=null&&(a.tailShift+=this.appendTail(i).tailShift),a}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(n),new gt}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const n=this.rawInputValue,r=this.value,i=e();return this.rawInputValue=n,this.value&&this.value!==r&&r.indexOf(this.value)===0&&this.append(r.slice(this.displayValue.length),{},""),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const n=this.state,r=e(this);return this.state=n,delete this._isolated,r}doSkipInvalid(e,n,r){return!!this.skipInvalid}doPrepare(e,n){return n===void 0&&(n={}),gt.normalize(this.prepare?this.prepare(e,this,n):e)}doPrepareChar(e,n){return n===void 0&&(n={}),gt.normalize(this.prepareChar?this.prepareChar(e,this,n):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,n,r,i,a){i===void 0&&(i=Le.NONE),a===void 0&&(a={input:!0});const o=e+n,s=this.extractTail(o),l=this.eager===!0||this.eager==="remove";let c;l&&(i=fle(i),c=this.extractInput(0,o,{raw:!0}));let u=e;const d=new gt;if(i!==Le.NONE&&(u=this.nearestInputPos(e,n>1&&e!==0&&!l?Le.NONE:i),d.tailShift=u-e),d.aggregate(this.remove(u)),l&&i!==Le.NONE&&c===this.rawInputValue)if(i===Le.FORCE_LEFT){let p;for(;c===this.rawInputValue&&(p=this.displayValue.length);)d.aggregate(new gt({tailShift:-1})).aggregate(this.remove(p-1))}else i===Le.FORCE_RIGHT&&s.unshift();return d.aggregate(this.append(r,a,s))}maskEquals(e){return this.mask===e}typedValueEquals(e){const n=this.typedValue;return e===n||hn.EMPTY_VALUES.includes(e)&&hn.EMPTY_VALUES.includes(n)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}}hn.DEFAULTS={skipInvalid:!0},hn.EMPTY_VALUES=[void 0,null,""],Ge.Masked=hn;class ci{constructor(e,n){e===void 0&&(e=[]),n===void 0&&(n=0),this.chunks=e,this.from=n}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Ir(e)?new cr(String(e)):e;const n=this.chunks[this.chunks.length-1],r=n&&(n.stop===e.stop||e.stop==null)&&e.from===n.from+n.toString().length;if(e instanceof cr)r?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof ci){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof Ge.MaskedPattern))return new cr(this.toString()).appendTo(e);const n=new gt;for(let r=0;r<this.chunks.length&&!n.skip;++r){const i=this.chunks[r],a=e._mapPosToBlock(e.displayValue.length),o=i.stop;let s;if(o!=null&&(!a||a.index<=o)){if(i instanceof ci||e._stops.indexOf(o)>=0){const l=e._appendPlaceholder(o);n.aggregate(l)}s=i instanceof ci&&e._blocks[o]}if(s){const l=s.appendTail(i);l.skip=!1,n.aggregate(l),e._value+=l.inserted;const c=i.toString().slice(l.rawInserted.length);c&&n.aggregate(e.append(c,{tail:!0}))}else n.aggregate(e.append(i.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:n,...r}=e;Object.assign(this,r),this.chunks=n.map(i=>{const a="chunks"in i?new ci:new cr;return a.state=i,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const n=e!=null?e-this.from:e;let r=0;for(;r<this.chunks.length;){const i=this.chunks[r],a=i.unshift(n);if(i.toString()){if(!a)break;++r}else this.chunks.splice(r,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const n=this.chunks[e],r=n.shift();if(n.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class hle{constructor(e,n){this.masked=e,this._log=[];const{offset:r,index:i}=e._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Le.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Le.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Le.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Le.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Le.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Le.NONE),!0})}}class W1{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(n),this._value||(this._isRawInput=!1),new gt}nearestInputPos(e,n){n===void 0&&(n=Le.NONE);const r=0,i=this._value.length;switch(n){case Le.LEFT:case Le.FORCE_LEFT:return r;case Le.NONE:case Le.RIGHT:case Le.FORCE_RIGHT:default:return i}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._isRawInput?n-e:0}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,n){n===void 0&&(n={});const r=new gt;if(this.isFilled)return r;const i=this.eager===!0||this.eager==="append",o=this.char===e&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!i)&&!n.tail;return o&&(r.rawInserted=this.char),this._value=r.inserted=this.char,this._isRawInput=o&&(n.raw||n.input),r}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new gt;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new cr("")}appendTail(e){return Ir(e)&&(e=new cr(String(e))),e.appendTo(this)}append(e,n,r){const i=this._appendChar(e[0],n);return r!=null&&(i.tailShift+=this.appendTail(r).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}}class bc{constructor(e){const{parent:n,isOptional:r,placeholderChar:i,displayChar:a,lazy:o,eager:s,...l}=e;this.masked=si(l),Object.assign(this,{parent:n,isOptional:r,placeholderChar:i,displayChar:a,lazy:o,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),e===0&&n>=1?(this.isFilled=!1,this.masked.remove(e,n)):new gt}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,n){if(n===void 0&&(n={}),this.isFilled)return new gt;const r=this.masked.state,i=this.masked._appendChar(e,this.currentMaskFlags(n));return i.inserted&&this.doValidate(n)===!1&&(i.inserted=i.rawInserted="",this.masked.state=r),!i.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,n,r){return this.masked.append(e,this.currentMaskFlags(n),r)}_appendPlaceholder(){const e=new gt;return this.isFilled||this.isOptional||(this.isFilled=!0,e.inserted=this.placeholderChar),e}_appendEager(){return new gt}extractTail(e,n){return this.masked.extractTail(e,n)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.masked.extractInput(e,n,r)}nearestInputPos(e,n){n===void 0&&(n=Le.NONE);const r=0,i=this.value.length,a=Math.min(Math.max(e,r),i);switch(n){case Le.LEFT:case Le.FORCE_LEFT:return this.isComplete?a:r;case Le.RIGHT:case Le.FORCE_RIGHT:return this.isComplete?a:i;case Le.NONE:default:return a}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.value.slice(e,n).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var n;return{...e,_beforeTailState:(e==null||(n=e._beforeTailState)==null?void 0:n.masked)||(e==null?void 0:e._beforeTailState)}}}bc.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Ele extends hn{updateOptions(e){super.updateOptions(e)}_update(e){const n=e.mask;n&&(e.validate=r=>r.search(n)>=0),super._update(e)}}Ge.MaskedRegExp=Ele;class En extends hn{constructor(e){super({...En.DEFAULTS,...e,definitions:Object.assign({},bc.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!e)return;let r=!1,i=!1;for(let a=0;a<n.length;++a){if(this.blocks){const c=n.slice(a),u=Object.keys(this.blocks).filter(p=>c.indexOf(p)===0);u.sort((p,f)=>f.length-p.length);const d=u[0];if(d){const{expose:p,...f}=Ec(this.blocks[d]),m=si({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...f,parent:this});m&&(this._blocks.push(m),p&&(this.exposeBlock=m),this._maskedBlocks[d]||(this._maskedBlocks[d]=[]),this._maskedBlocks[d].push(this._blocks.length-1)),a+=d.length-1;continue}}let o=n[a],s=o in e;if(o===En.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(o==="{"||o==="}"){r=!r;continue}if(o==="["||o==="]"){i=!i;continue}if(o===En.ESCAPE_CHAR){if(++a,o=n[a],!o)break;s=!1}const l=s?new bc({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Ec(e[o]),parent:this}):new W1({char:o,eager:this.eager,isUnmasking:r});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){const{_blocks:n,...r}=e;this._blocks.forEach((i,a)=>i.state=n[a]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,n)=>e+=n.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(n),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,n)=>e+=n.value,"")}set value(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(n),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(n),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,n)=>e+=n.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const n=new gt;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return n;this._blocks[r].isFilled&&++r;for(let i=r;i<this._blocks.length;++i){const a=this._blocks[i]._appendEager();if(!a.inserted)break;n.aggregate(a)}return n}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._mapPosToBlock(this.displayValue.length),i=new gt;if(!r)return i;for(let o=r.index;;++o){var a;const s=this._blocks[o];if(!s)break;const l=s._appendChar(e,{...n,_beforeTailState:(a=n._beforeTailState)==null||(a=a._blocks)==null?void 0:a[o]}),c=l.skip;if(i.aggregate(l),c||l.rawInserted)break}return i}extractTail(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=new ci;return e===n||this._forEachBlocksInRange(e,n,(i,a,o,s)=>{const l=i.extractTail(o,s);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof ci&&(l.blockIndex=a),r.extend(l)}),r}extractInput(e,n,r){if(e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),r===void 0&&(r={}),e===n)return"";let i="";return this._forEachBlocksInRange(e,n,(a,o,s,l)=>{i+=a.extractInput(s,l,r)}),i}_findStopBefore(e){let n;for(let r=0;r<this._stops.length;++r){const i=this._stops[r];if(i<=e)n=i;else break}return n}_appendPlaceholder(e){const n=new gt;if(this.lazy&&e==null)return n;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return n;const i=r.index,a=e??this._blocks.length;return this._blocks.slice(i,a).forEach(o=>{if(!o.lazy||e!=null){var s;const l=o._appendPlaceholder((s=o._blocks)==null?void 0:s.length);this._value+=l.inserted,n.aggregate(l)}}),n}_mapPosToBlock(e){let n="";for(let r=0;r<this._blocks.length;++r){const i=this._blocks[r],a=n.length;if(n+=i.displayValue,e<=n.length)return{index:r,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((n,r)=>n+=r.displayValue.length,0)}_forEachBlocksInRange(e,n,r){n===void 0&&(n=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const a=this._mapPosToBlock(n),o=a&&i.index===a.index,s=i.offset,l=a&&o?a.offset:this._blocks[i.index].displayValue.length;if(r(this._blocks[i.index],i.index,s,l),a&&!o){for(let c=i.index+1;c<a.index;++c)r(this._blocks[c],c,0,this._blocks[c].displayValue.length);r(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=super.remove(e,n);return this._forEachBlocksInRange(e,n,(i,a,o,s)=>{r.aggregate(i.remove(o,s))}),r}nearestInputPos(e,n){if(n===void 0&&(n=Le.NONE),!this._blocks.length)return 0;const r=new hle(this,e);if(n===Le.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(n===Le.LEFT||n===Le.FORCE_LEFT){if(n===Le.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),n===Le.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:n===Le.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return n===Le.RIGHT||n===Le.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:n===Le.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,Le.LEFT))):e}totalInputPositions(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,n,(i,a,o,s)=>{r+=i.totalInputPositions(o,s)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const n=this._maskedBlocks[e];return n?n.map(r=>this._blocks[r]):[]}}En.DEFAULTS={lazy:!0,placeholderChar:"_"},En.STOP_CHAR="`",En.ESCAPE_CHAR="\\",En.InputDefinition=bc,En.FixedDefinition=W1,Ge.MaskedPattern=En;class vc extends En{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:n=this.to||0,from:r=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...o}=e;this.to=n,this.from=r,this.maxLength=Math.max(String(n).length,i),this.autofix=a;const s=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<l.length&&l[c]===s[c];)++c;o.mask=l.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(o)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let n="",r="";const[,i,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(n="0".repeat(i.length)+a,r="9".repeat(i.length)+a),n=n.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[n,r]}doPrepareChar(e,n){n===void 0&&(n={});let r;if([e,r]=super.doPrepareChar(e.replace(/\D/g,""),n),!this.autofix||!e)return[e,r];const i=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0"),o=this.value+e;if(o.length>this.maxLength)return["",r];const[s,l]=this.boundaries(o);return Number(l)<this.from?[i[o.length-1],r]:Number(s)>this.to?this.autofix==="pad"&&o.length<this.maxLength?["",r.aggregate(this.append(i[o.length-1]+e,n))]:[a[o.length-1],r]:[e,r]}doValidate(e){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[i,a]=this.boundaries(n);return this.from<=Number(a)&&Number(i)<=this.to&&super.doValidate(e)}}Ge.MaskedRange=vc;class ui extends En{constructor(e){const{mask:n,pattern:r,...i}={...ui.DEFAULTS,...e};super({...i,mask:Ir(n)?n:r})}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:n,pattern:r,blocks:i,...a}={...ui.DEFAULTS,...e},o=Object.assign({},ui.GET_DEFAULT_BLOCKS());e.min&&(o.Y.from=e.min.getFullYear()),e.max&&(o.Y.to=e.max.getFullYear()),e.min&&e.max&&o.Y.from===o.Y.to&&(o.m.from=e.min.getMonth()+1,o.m.to=e.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=e.min.getDate(),o.d.to=e.max.getDate())),Object.assign(o,this.blocks,i),Object.keys(o).forEach(s=>{const l=o[s];!("autofix"in l)&&"autofix"in e&&(l.autofix=e.autofix)}),super._update({...a,mask:Ir(n)?n:r,blocks:o})}doValidate(e){const n=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}}ui.GET_DEFAULT_BLOCKS=()=>({d:{mask:vc,from:1,to:31,maxLength:2},m:{mask:vc,from:1,to:12,maxLength:2},Y:{mask:vc,from:1900,to:9999}}),ui.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";const n=String(t.getDate()).padStart(2,"0"),r=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return[n,r,i].join(".")},parse:(t,e)=>{const[n,r,i]=t.split(".").map(Number);return new Date(i,r-1,n)}},Ge.MaskedDate=ui;class Ko extends hn{constructor(e){super({...Ko.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(n=>{const{expose:r,...i}=Ec(n),a=si({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return r&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._applyDispatch(e,n);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(n))),r}_applyDispatch(e,n,r){e===void 0&&(e=""),n===void 0&&(n={}),r===void 0&&(r="");const i=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,a=this.rawInputValue,o=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:a,s=a.slice(o.length),l=this.currentMask,c=new gt,u=l==null?void 0:l.state;if(this.currentMask=this.doDispatch(e,{...n},r),this.currentMask)if(this.currentMask!==l){if(this.currentMask.reset(),o){const d=this.currentMask.append(o,{raw:!0});c.tailShift=d.inserted.length-i.length}s&&(c.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)}else u&&(this.currentMask.state=u);return c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const n=new gt;return e&&n.aggregate(this._applyDispatch("",{},e)),n.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var n,r;return{...e,_beforeTailState:((n=e._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,n,r){return n===void 0&&(n={}),r===void 0&&(r=""),this.dispatch(e,this,n,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,n){n===void 0&&(n={});let[r,i]=super.doPrepare(e,n);if(this.currentMask){let a;[r,a]=super.doPrepare(r,this.currentMaskFlags(n)),i=i.aggregate(a)}return[r,i]}doPrepareChar(e,n){n===void 0&&(n={});let[r,i]=super.doPrepareChar(e,n);if(this.currentMask){let a;[r,a]=super.doPrepareChar(r,this.currentMaskFlags(n)),i=i.aggregate(a)}return[r,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(e);this.currentMask&&(this.currentMask.typedValue=e,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,n){const r=new gt;return this.currentMask&&r.aggregate(this.currentMask.remove(e,n)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:n,currentMaskRef:r,currentMask:i,...a}=e;n&&this.compiledMasks.forEach((o,s)=>o.state=n[s]),r!=null&&(this.currentMask=r,this.currentMask.state=i),super.state=a}extractInput(e,n,r){return this.currentMask?this.currentMask.extractInput(e,n,r):""}extractTail(e,n){return this.currentMask?this.currentMask.extractTail(e,n):super.extractTail(e,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,n){return this.currentMask?this.currentMask.nearestInputPos(e,n):super.nearestInputPos(e,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((n,r)=>{if(!e[r])return;const{mask:i,...a}=e[r];return hc(n,a)&&n.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(e))}}Ko.DEFAULTS=void 0,Ko.DEFAULTS={dispatch:(t,e,n,r)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,a=e.compiledMasks.map((o,s)=>{const l=e.currentMask===o,c=l?o.displayValue.length:o.nearestInputPos(o.displayValue.length,Le.FORCE_LEFT);return o.rawInputValue!==i?(o.reset(),o.append(i,{raw:!0})):l||o.remove(c),o.append(t,e.currentMaskFlags(n)),o.appendTail(r),{index:s,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(c,o.nearestInputPos(o.displayValue.length,Le.FORCE_LEFT)))}});return a.sort((o,s)=>s.weight-o.weight||s.totalInputPositions-o.totalInputPositions),e.compiledMasks[a[0].index]}},Ge.MaskedDynamic=Ko;class ble extends En{constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:n,...r}=e;if(n){const i=n.map(s=>s.length),a=Math.min(...i),o=Math.max(...i)-a;r.mask="*".repeat(a),o&&(r.mask+="["+"*".repeat(o)+"]"),this.enum=n}super._update(r)}doValidate(e){return this.enum.some(n=>n.indexOf(this.unmaskedValue)===0)&&super.doValidate(e)}}Ge.MaskedEnum=ble;class vle extends hn{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}Ge.MaskedFunction=vle;class Tn extends hn{constructor(e){super({...Tn.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",r=(this.scale?"("+ch(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+n+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(ch).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(ch(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const n=e.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(e,n){n===void 0&&(n={});const[r,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),n);return e&&!r&&(i.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&i.aggregate(this._appendChar("-")),[r,i]}_separatorsCount(e,n){n===void 0&&(n=!1);let r=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++r,n&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n),this._removeThousandsSeparators(super.extractInput(e,n,r))}_appendCharRaw(e,n){if(n===void 0&&(n={}),!this.thousandsSeparator)return super._appendCharRaw(e,n);const r=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const a=super._appendCharRaw(e,n);this._value=this._insertThousandsSeparators(this._value);const o=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,s=this._separatorsCountFromSlice(o);return a.tailShift+=(s-i)*this.thousandsSeparator.length,a.skip=!a.rawInserted&&e===this.thousandsSeparator,a}_findSeparatorAround(e){if(this.thousandsSeparator){const n=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,n);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,n){const r=this._findSeparatorAround(e);r>=0&&(e=r);const i=this._findSeparatorAround(n);return i>=0&&(n=i+this.thousandsSeparator.length),[e,n]}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n);const r=this.value.slice(0,e),i=this.value.slice(n),a=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+i));const o=this._separatorsCountFromSlice(r);return new gt({tailShift:(o-a)*this.thousandsSeparator.length})}nearestInputPos(e,n){if(!this.thousandsSeparator)return e;switch(n){case Le.NONE:case Le.LEFT:case Le.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const i=r+this.thousandsSeparator.length;if(e<i||this.value.length<=i||n===Le.FORCE_LEFT)return r}break}case Le.RIGHT:case Le.FORCE_RIGHT:{const r=this._findSeparatorAround(e);if(r>=0)return r+this.thousandsSeparator.length}}return e}doValidate(e){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const r=this.number;n=n&&!isNaN(r)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(e)}doCommit(){if(this.value){const e=this.number;let n=e;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==e&&(this.unmaskedValue=this.format(n,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const n=this._removeThousandsSeparators(e).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(r,i,a,o)=>i+o),e.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const n=e.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(e,n,r){n===void 0&&(n={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Tn.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,n,r)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Tn.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Tn.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Tn.EMPTY_VALUES.includes(e)&&Tn.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Tn.UNMASKED_RADIX=".",Tn.EMPTY_VALUES=[...hn.EMPTY_VALUES,0],Tn.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Tn.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},Ge.MaskedNumber=Tn;const dh={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function j1(t,e,n){e===void 0&&(e=dh.MASKED),n===void 0&&(n=dh.MASKED);const r=si(t);return i=>r.runIsolated(a=>(a[e]=i,a[n]))}function Sle(t,e,n,r){return j1(e,n,r)(t)}Ge.PIPE_TYPE=dh,Ge.createPipe=j1,Ge.pipe=Sle;try{globalThis.IMask=Ge}catch{}const K1={mask:ee.oneOfType([ee.array,ee.func,ee.string,ee.instanceOf(RegExp),ee.oneOf([Date,Number,Ge.Masked]),ee.instanceOf(Ge.Masked)]),value:ee.any,unmask:ee.oneOfType([ee.bool,ee.oneOf(["typed"])]),prepare:ee.func,prepareChar:ee.func,validate:ee.func,commit:ee.func,overwrite:ee.oneOfType([ee.bool,ee.oneOf(["shift"])]),eager:ee.oneOfType([ee.bool,ee.oneOf(["append","remove"])]),skipInvalid:ee.bool,onAccept:ee.func,onComplete:ee.func,placeholderChar:ee.string,displayChar:ee.string,lazy:ee.bool,definitions:ee.object,blocks:ee.object,enum:ee.arrayOf(ee.string),maxLength:ee.number,from:ee.number,to:ee.number,pattern:ee.string,format:ee.func,parse:ee.func,autofix:ee.oneOfType([ee.bool,ee.oneOf(["pad"])]),radix:ee.string,thousandsSeparator:ee.string,mapToRadix:ee.arrayOf(ee.string),scale:ee.number,normalizeZeros:ee.bool,padFractionalZeros:ee.bool,min:ee.oneOfType([ee.number,ee.instanceOf(Date)]),max:ee.oneOfType([ee.number,ee.instanceOf(Date)]),dispatch:ee.func,inputRef:ee.oneOfType([ee.func,ee.shape({current:ee.object})])},Q1=Object.keys(K1).filter(t=>t!=="value"),yle=["value","unmask","onAccept","onComplete","inputRef"],Tle=Q1.filter(t=>yle.indexOf(t)<0);function Ole(t){var e;const n=(e=class extends C.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const a=this.props,o=this._extractMaskOptionsFromProps(a);if(o.mask)this.maskRef?(this.maskRef.updateOptions(o),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(o);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var s;(s=this.element)!=null&&s.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=Ge(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){const{...o}=a;return Object.keys(o).filter(s=>Tle.indexOf(s)<0).forEach(s=>{delete o[s]}),o}_extractNonMaskProps(a){const{...o}=a;return Q1.forEach(s=>{delete o[s]}),"defaultValue"in o||(o.defaultValue=a.mask?"":o.value),delete o.value,o}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return C.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),r=t.displayName||t.name||"Component";return n.displayName="IMask("+r+")",n.propTypes=K1,C.forwardRef((i,a)=>C.createElement(n,{...i,ref:a}))}const Cle=Ole(t=>{let{inputRef:e,...n}=t;return C.createElement("input",{...n,ref:e})}),Rle=(t,e)=>C.createElement(Cle,{...t,ref:e});C.forwardRef(Rle);function Nle(t,e){let{onAccept:n,onComplete:r}=e===void 0?{}:e;const i=C.useRef(null),a=C.useRef(null),[o,s]=C.useState(!1),[l,c]=C.useState({}),[u,d]=C.useState(""),[p,f]=C.useState(""),[m,_]=C.useState(),g=C.useCallback(()=>{var v;o&&((v=a.current)==null||v.destroy(),a.current=null)},[]),h=C.useCallback(v=>{const b=a.current;b&&(c({value:b.value,unmaskedValue:b.unmaskedValue,typedValue:b.typedValue}),_(b.typedValue),f(b.unmaskedValue),d(b.value),n==null||n(b.value,b,v))},[n]),E=C.useCallback(()=>a.current&&(r==null?void 0:r(a.current.value,a.current)),[r]);return C.useEffect(()=>{const v=i.current;if(!v||!(t!=null&&t.mask))return g();const b=a.current;b?b==null||b.updateOptions(t):v&&t!=null&&t.mask&&(a.current=Ge(v,t),h()),s(!!a.current)},[t,g,h]),C.useEffect(()=>{if(!a.current)return;const v=a.current;return v.on("accept",h),v.on("complete",E),()=>{v.off("accept",h),v.off("complete",E)}},[h,E]),C.useEffect(()=>{const{value:v,...b}=l,S=a.current;S&&o&&(v!==u&&(S.value=u),c(b))},[u]),C.useEffect(()=>{const{unmaskedValue:v,...b}=l,S=a.current;S&&o&&(v!==p&&(S.unmaskedValue=p),c(b))},[p]),C.useEffect(()=>{const{typedValue:v,...b}=l,S=a.current;S&&o&&(v!==m&&(S.typedValue=m),c(b))},[m]),C.useEffect(()=>g,[g]),{ref:i,maskRef:a,value:u,setValue:d,unmaskedValue:p,setUnmaskedValue:f,typedValue:m,setTypedValue:_}}const ph=C.forwardRef(({name:t,value:e,mask:n,onChange:r,...i},a)=>{const{ref:o,unmaskedValue:s,value:l,maskRef:c}=Nle({mask:n});return C.useEffect(()=>{c.current.value=e||""},[c,e]),C.useEffect(()=>{r({target:{name:t,value:s||e||""}})},[t,s,e]),A.jsx(X.TextField,{inputRef:a,inputProps:{ref:o},name:t,value:l,onChange:()=>r({target:{name:t,value:s}}),...i})});ph.displayName="MaskedInput";function Ale(t){let e;switch(t){case"top-left":e={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":e={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":e={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":e={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":e={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":e={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":e={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;default:e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}}return e}const xle=qt("span")(({arrow:t,theme:e})=>{const i=`solid 1px ${Ee(e.palette.grey[500],.12)}`,a={borderRadius:"0 0 3px 0",top:-6,borderBottom:i,borderRight:i},o={borderRadius:"3px 0 0 0",bottom:-6,borderTop:i,borderLeft:i},s={borderRadius:"0 3px 0 0",left:-6,borderTop:i,borderRight:i},l={borderRadius:"0 0 0 3px",right:-6,borderBottom:i,borderLeft:i};return{display:"none",[e.breakpoints.up("sm")]:{zIndex:1,width:12,height:12,content:'""',display:"block",position:"absolute",transform:"rotate(-135deg)",background:e.palette.background.paper},...t==="top-left"&&{...a,left:20},...t==="top-center"&&{...a,left:0,right:0,margin:"auto"},...t==="top-right"&&{...a,right:20},...t==="bottom-left"&&{...o,left:20},...t==="bottom-center"&&{...o,left:0,right:0,margin:"auto"},...t==="bottom-right"&&{...o,right:20},...t==="left-top"&&{...s,top:20},...t==="left-center"&&{...s,top:0,bottom:0,margin:"auto"},...t==="left-bottom"&&{...s,bottom:20},...t==="right-top"&&{...l,top:20},...t==="right-center"&&{...l,top:0,bottom:0,margin:"auto"},...t==="right-bottom"&&{...l,bottom:20}}}),Ile=({open:t,children:e,arrow:n="top-right",disabledArrow:r,sx:i,...a})=>{const{style:o,anchorOrigin:s,transformOrigin:l}=Ale(n);return A.jsxs(X.Popover,{open:!!t,anchorEl:t,anchorOrigin:s,transformOrigin:l,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...o,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...i}},...a,children:[!r&&A.jsx(xle,{arrow:n}),e]})},wle=X.styled(X.Stack)(({theme:t})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${t.palette.grey[300]}`,button:{marginRight:24}})),Dle=X.styled(X.DialogContent)({padding:"24px !important"}),Mle=X.styled(X.DialogActions)(({theme:t})=>({borderTop:`1px solid ${t.palette.grey[300]}`,backgroundColor:t.palette.grey[50]})),Lle=({actions:t,actionsProps:e,children:n,dialogContentProps:r,dialogTitle:i,dialogTitleProps:a,onClose:o,...s})=>A.jsxs(X.Dialog,{scroll:"body",...s,onClose:o,children:[A.jsxs(wle,{children:[i&&A.jsx(X.DialogTitle,{variant:"subtitle1",...a,children:i}),A.jsx(X.IconButton,{onClick:o,children:A.jsx(Lt,{icon:"ic:round-close"})})]}),A.jsx(Dle,{...r,children:n}),t&&A.jsx(Mle,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...e,children:t})]}),Ple=({children:t,container:e})=>Jo.createPortal(t,document.getElementById(e)||document.body),kle=({onSearch:t,onChange:e,trigger:n="click",iconPosition:r="end",...i})=>{const a=C.useRef(null),o=A.jsx(X.InputAdornment,{position:r,children:A.jsx(X.IconButton,{color:"inherit",onClick:()=>{var s;t((s=a.current)==null?void 0:s.value)},children:A.jsx(Lt,{icon:"eva:search-fill",sx:{width:20,height:20}})})});return A.jsx(X.TextField,{inputRef:a,InputProps:{onKeyDown:s=>{var l;s.key==="Enter"&&t((l=a.current)==null?void 0:l.value)},...r==="start"?{startAdornment:o}:{endAdornment:o}},onChange:s=>{if(n==="change"){t(s.target.value);return}s.target.value===""&&t(""),e&&e(s)},...i})},Fle=X.styled(X.StepConnector)(({theme:t})=>({top:10,left:"calc(-50% + 20px)",right:"calc(50% + 20px)","& .MuiStepConnector-line":{borderTopWidth:2,borderColor:t.palette.divider},"&.Mui-active, &.Mui-completed":{"& .MuiStepConnector-line":{borderColor:t.palette.primary.main}}})),Ble=({active:t,completed:e})=>A.jsx(X.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...t&&{color:"primary.main"}},children:e?A.jsx(Lt,{icon:"eva:checkmark-fill",sx:{color:"primary.main"}}):A.jsx(X.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),Ule=({steps:t,activeStep:e,showLabels:n=!0,sx:r,...i})=>A.jsx(X.Stepper,{alternativeLabel:!0,activeStep:e,connector:A.jsx(Fle,{}),sx:r,...i,children:t.map(a=>A.jsx(X.Step,{children:A.jsx(X.StepLabel,{StepIconComponent:Ble,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:n&&a})},a))}),Gle=({children:t,value:e,index:n})=>A.jsx(X.Box,{role:"tabpanel",id:`simple-tabpanel-${n}`,"aria-labelledby":`simple-tab-${n}`,sx:{mt:3,...e.toString()!==n.toString()&&{position:"absolute",width:"100%",height:0,overflow:"hidden",visibility:"hidden"}},children:t}),$le=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:a,fieldState:{error:o}})=>A.jsx(Pd,{...a,...r,onChange:s=>a.onChange(s),error:!!o,helperText:(o==null?void 0:o.message)||e})})},qle=({name:t,helperText:e,...n})=>{const{control:r}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:r,render:({field:i,fieldState:{error:a}})=>A.jsxs("div",{children:[A.jsx(X.FormControlLabel,{control:A.jsx(X.Checkbox,{...i,checked:i.value}),...n}),(!!a||e)&&A.jsx(X.FormHelperText,{error:!!a,children:a?a==null?void 0:a.message:e})]})})},Yle=({row:t,name:e,label:n,options:r,spacing:i,helperText:a,...o})=>{const{control:s}=rt.useFormContext(),l=(c,u)=>c.includes(u)?c.filter(d=>d!==u):[...c,u];return A.jsx(rt.Controller,{name:e,control:s,render:({field:c,fieldState:{error:u}})=>A.jsxs(X.FormControl,{component:"fieldset",children:[n&&A.jsx(X.FormLabel,{component:"legend",sx:{typography:"body2"},children:n}),A.jsx(X.FormGroup,{sx:{...t&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:i||0},...t&&{mr:0,"&:not(:last-of-type)":{mr:i||2}}}},children:r.map(d=>A.jsx(X.FormControlLabel,{control:A.jsx(X.Checkbox,{checked:c.value.includes(d.value),onChange:()=>c.onChange(l(c.value,d.value))}),label:d.label,...o},d.value))}),(!!u||a)&&A.jsx(X.FormHelperText,{error:!!u,sx:{mx:0},children:u?u==null?void 0:u.message:a})]})})},Vle=typeof window<"u"?C.useLayoutEffect:C.useEffect;function X1(t,e,n,r){const i=C.useRef(e);Vle(()=>{i.current=e},[e]),C.useEffect(()=>{const a=(n==null?void 0:n.current)||window;if(!(a&&a.addEventListener))return;const o=s=>i.current(s);return a.addEventListener(t,o,r),()=>{a.removeEventListener(t,o)}},[t,n,r])}const Hle=({keyName:t,inputs:e=[],rules:n,...r})=>{const i=C.useRef(null),{control:a,setValue:o,formState:{errors:s}}=rt.useFormContext(),l=d=>{const p=d.clipboardData.getData("text").split("");e.map((f,m)=>o(f,p[m])),d.preventDefault()},c=(d,p)=>{const{maxLength:f,value:m,name:_}=d.target,g=_.replace(t,""),h=Number(g),E=document.querySelector(`input[name=${t}${h+1}]`);m.length>f&&(d.target.value=m[0]),m.length>=f&&h<6&&E!==null&&E.focus(),p(d)};X1("paste",l,i);const u=e.some(d=>s[d]);return A.jsxs(X.Stack,{spacing:3,children:[A.jsx(X.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:i,children:e.map((d,p)=>A.jsx(rt.Controller,{name:`${t}${p+1}`,control:a,rules:n,render:({field:f,fieldState:{error:m}})=>A.jsx(X.TextField,{...r,...f,autoComplete:"none",error:!!m,autoFocus:p===0,placeholder:"-",onChange:_=>{c(_,f.onChange)},onFocus:_=>_.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number"}})},d))}),u&&A.jsx(X.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},zle=({name:t,rules:e,helperText:n,...r})=>{const{control:i}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:i,rules:e,render:({field:{ref:a,onChange:o,...s},fieldState:{error:l}})=>A.jsx(hO,{...s,onChangeColor:o,inputRef:a,fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||n,...r})})},Wle=({name:t,...e})=>{const{control:n}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:n,render:({field:{ref:r,...i},fieldState:{error:a}})=>{var o;return A.jsx(Ma.DatePicker,{inputRef:r,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...e.localeText},...i,...e,value:i.value?new Date(i.value):null,slotProps:{textField:{...(o=e.slotProps)==null?void 0:o.textField,error:!!a,helperText:a==null?void 0:a.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},jle=({name:t,label:e,...n})=>{const{control:r,setError:i}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:r,render:({field:{value:a,onChange:o},fieldState:{error:s}})=>A.jsx(Ma.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...n.localeText},value:[(a==null?void 0:a.startDate)||null,(a==null?void 0:a.endDate)||null],onChange:l=>o({startDate:l[0],endDate:l[1]}),onError:l=>{i(t,{message:l[0]||l[1]||void 0})},...n,slotProps:{textField:({position:l})=>{var c;return{...(c=n.slotProps)==null?void 0:c.textField,error:!!s,helperText:s==null?void 0:s.message,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:l==="start"?`${e} (Dt. Início)`:`${e} (Dt. Fim)`}}},sx:{width:1}})})},Kle=({name:t,...e})=>{const{control:n}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:n,render:({field:{ref:r,...i},fieldState:{error:a}})=>{var o;return A.jsx(Ma.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:r,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...e.localeText},...i,...e,value:i.value?new Date(i.value):null,slotProps:{textField:{...(o=e.slotProps)==null?void 0:o.textField,error:!!a,helperText:a==null?void 0:a.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},Qle=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{name:a,onBlur:o,onChange:s,value:l},fieldState:{error:c}})=>A.jsx(y1,{id:`quill${a}`,onBlur:o,onChange:(u,d,p,f)=>s(f.getLength()===1?"":u),value:l,error:!!c,helperText:(c==null?void 0:c.message)||e,...r})})},Z1=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{ref:a,...o},fieldState:{error:s}})=>A.jsx(X.TextField,{...o,inputRef:a,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||e,...r})})},Xle=({id:t,children:e,onSubmit:n,methods:r})=>A.jsx(rt.FormProvider,{...r,children:A.jsx(X.Stack,{component:"form",id:t,onSubmit:n,flex:1,width:1,noValidate:!0,children:e})}),Zle=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{name:a,onChange:o,value:s,ref:l},fieldState:{error:c}})=>A.jsx(ph,{ref:l,...r,name:a,value:s,error:!!c,helperText:(c==null?void 0:c.message)||e,onChange:({target:{value:u}})=>o(u)})})},Jle=t=>{const[e,n]=C.useState(!1);return A.jsx(Z1,{...t,type:e?"text":"password",InputProps:{endAdornment:A.jsx(X.InputAdornment,{position:"end",children:A.jsx(X.IconButton,{onClick:()=>n(!e),edge:"end","aria-label":"Mostrar/Ocultar senha",children:A.jsx(Lt,{icon:e?"eva:eye-off-fill":"eva:eye-fill"})})})}})},ece=({name:t,rules:e,row:n,label:r,options:i,spacing:a,helperText:o,...s})=>{const{control:l}=rt.useFormContext(),c=r?`${t}-${r}`:"";return A.jsx(rt.Controller,{name:t,control:l,rules:e,render:({field:u,fieldState:{error:d}})=>A.jsxs(X.FormControl,{component:"fieldset",children:[r&&A.jsx(X.FormLabel,{component:"legend",id:c,sx:{typography:"body2"},children:r}),A.jsx(X.RadioGroup,{...u,"aria-labelledby":c,row:n,...s,children:i.map(p=>A.jsx(X.FormControlLabel,{value:p.value,control:A.jsx(X.Radio,{}),label:p.label,sx:{"&:not(:last-of-type)":{mb:a||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:a||2}}}},p.value))}),(!!d||o)&&A.jsx(X.FormHelperText,{error:!!d,sx:{mx:0},children:d?d==null?void 0:d.message:o})]})})},tce=({name:t,helperText:e,...n})=>{const{control:r}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:r,render:({field:i,fieldState:{error:a}})=>A.jsxs("div",{children:[A.jsx(X.FormControlLabel,{control:A.jsx(X.Switch,{...i,checked:i.value}),...n}),(!!a||e)&&A.jsx(X.FormHelperText,{error:!!a,children:a?a==null?void 0:a.message:e})]})})},nce=({name:t,...e})=>{const{control:n}=rt.useFormContext();return A.jsx(rt.Controller,{name:t,control:n,render:({field:{ref:r,...i},fieldState:{error:a}})=>{var o;return A.jsx(Ma.TimePicker,{ampm:!1,format:"HH:mm",inputRef:r,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...e.localeText},...i,...e,value:i.value?new Date(i.value):null,slotProps:{textField:{...(o=e.slotProps)==null?void 0:o.textField,error:!!a,helperText:a==null?void 0:a.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})};function xa(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,e||[])).next())})}function Ia(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function J1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function ex(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var rce=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Qo(t,e){var n=ice(t);if(typeof n.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof r=="string"&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function ice(t){var e=t.name,n=e&&e.lastIndexOf(".")!==-1;if(n&&!t.type){var r=e.split(".").pop().toLowerCase(),i=rce.get(r);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}var ace=[".DS_Store","Thumbs.db"];function oce(t){return xa(this,void 0,void 0,function(){return Ia(this,function(e){return Sc(t)&&sce(t.dataTransfer)?[2,dce(t.dataTransfer,t.type)]:lce(t)?[2,cce(t)]:Array.isArray(t)&&t.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,uce(t)]:[2,[]]})})}function sce(t){return Sc(t)}function lce(t){return Sc(t)&&Sc(t.target)}function Sc(t){return typeof t=="object"&&t!==null}function cce(t){return fh(t.target.files).map(function(e){return Qo(e)})}function uce(t){return xa(this,void 0,void 0,function(){var e;return Ia(this,function(n){switch(n.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return e=n.sent(),[2,e.map(function(r){return Qo(r)})]}})})}function dce(t,e){return xa(this,void 0,void 0,function(){var n,r;return Ia(this,function(i){switch(i.label){case 0:return t.items?(n=fh(t.items).filter(function(a){return a.kind==="file"}),e!=="drop"?[2,n]:[4,Promise.all(n.map(pce))]):[3,2];case 1:return r=i.sent(),[2,tx(nx(r))];case 2:return[2,tx(fh(t.files).map(function(a){return Qo(a)}))]}})})}function tx(t){return t.filter(function(e){return ace.indexOf(e.name)===-1})}function fh(t){if(t===null)return[];for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function pce(t){if(typeof t.webkitGetAsEntry!="function")return rx(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?ix(e):rx(t)}function nx(t){return t.reduce(function(e,n){return ex(ex([],J1(e),!1),J1(Array.isArray(n)?nx(n):[n]),!1)},[])}function rx(t){var e=t.getAsFile();if(!e)return Promise.reject("".concat(t," is not a File"));var n=Qo(e);return Promise.resolve(n)}function fce(t){return xa(this,void 0,void 0,function(){return Ia(this,function(e){return[2,t.isDirectory?ix(t):_ce(t)]})})}function ix(t){var e=t.createReader();return new Promise(function(n,r){var i=[];function a(){var o=this;e.readEntries(function(s){return xa(o,void 0,void 0,function(){var l,c,u;return Ia(this,function(d){switch(d.label){case 0:if(s.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=d.sent(),n(l),[3,4];case 3:return c=d.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(s.map(fce)),i.push(u),a(),d.label=6;case 6:return[2]}})})},function(s){r(s)})}a()})}function _ce(t){return xa(this,void 0,void 0,function(){return Ia(this,function(e){return[2,new Promise(function(n,r){t.file(function(i){var a=Qo(i,t.fullPath);n(a)},function(i){r(i)})})]})})}var mce=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",i=(t.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0};function ax(t){return Ece(t)||hce(t)||cx(t)||gce()}function gce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
291
291
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hce(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ece(t){if(Array.isArray(t))return _h(t)}function ox(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function sx(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ox(Object(n),!0).forEach(function(r){lx(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ox(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function lx(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xo(t,e){return Sce(t)||vce(t,e)||cx(t,e)||bce()}function bce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
292
292
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cx(t,e){if(t){if(typeof t=="string")return _h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _h(t,e)}}function _h(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function vce(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){a=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Sce(t){if(Array.isArray(t))return t}var yce="file-invalid-type",Tce="file-too-large",Oce="file-too-small",Cce="too-many-files",Rce=function(e){e=Array.isArray(e)&&e.length===1?e[0]:e;var n=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:yce,message:"File type must be ".concat(n)}},ux=function(e){return{code:Tce,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},dx=function(e){return{code:Oce,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},Nce={code:Cce,message:"Too many files"};function px(t,e){var n=t.type==="application/x-moz-file"||mce(t,e);return[n,n?null:Rce(e)]}function fx(t,e,n){if(di(t.size))if(di(e)&&di(n)){if(t.size>n)return[!1,ux(n)];if(t.size<e)return[!1,dx(e)]}else{if(di(e)&&t.size<e)return[!1,dx(e)];if(di(n)&&t.size>n)return[!1,ux(n)]}return[!0,null]}function di(t){return t!=null}function Ace(t){var e=t.files,n=t.accept,r=t.minSize,i=t.maxSize,a=t.multiple,o=t.maxFiles,s=t.validator;return!a&&e.length>1||a&&o>=1&&e.length>o?!1:e.every(function(l){var c=px(l,n),u=Xo(c,1),d=u[0],p=fx(l,r,i),f=Xo(p,1),m=f[0],_=s?s(l):null;return d&&m&&!_})}function yc(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function Tc(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function _x(t){t.preventDefault()}function xce(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function Ice(t){return t.indexOf("Edge/")!==-1}function wce(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return xce(t)||Ice(t)}function zn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return e.some(function(s){return!yc(r)&&s&&s.apply(void 0,[r].concat(a)),yc(r)})}}function Dce(){return"showOpenFilePicker"in window}function Mce(t){if(di(t)){var e=Object.entries(t).filter(function(n){var r=Xo(n,2),i=r[0],a=r[1],o=!0;return mx(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(a)||!a.every(gx))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=Xo(r,2),a=i[0],o=i[1];return sx(sx({},n),{},lx({},a,o))},{});return[{description:"Files",accept:e}]}return t}function Lce(t){if(di(t))return Object.entries(t).reduce(function(e,n){var r=Xo(n,2),i=r[0],a=r[1];return[].concat(ax(e),[i],ax(a))},[]).filter(function(e){return mx(e)||gx(e)}).join(",")}function Pce(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function kce(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function mx(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}function gx(t){return/^.*\.[\w]+$/.test(t)}var Fce=["children"],Bce=["open"],Uce=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Gce=["refKey","onChange","onClick"];function $ce(t){return Vce(t)||Yce(t)||hx(t)||qce()}function qce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
293
293
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yce(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Vce(t){if(Array.isArray(t))return gh(t)}function mh(t,e){return Wce(t)||zce(t,e)||hx(t,e)||Hce()}function Hce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|