pesona-ui 0.1.19 → 0.1.20

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/index.d.ts CHANGED
@@ -139,7 +139,7 @@ export declare const ConfirmationAlert: default_2.FC<ConfirmationAlertProps>;
139
139
 
140
140
  declare interface ConfirmationAlertProps {
141
141
  labelIcon?: default_2.ReactNode;
142
- label: string;
142
+ label?: string;
143
143
  message: string;
144
144
  onCancel: () => void;
145
145
  onConfirm: () => void;
@@ -20,7 +20,7 @@
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
22
  <%s key={someKey} {...props} />`,X,K,re,K),W[K+X]=!0)}if(K=null,F!==void 0&&(t(F),K=""+F),a(B)&&(t(B.key),K=""+B.key),"key"in B){F={};for(var ne in B)ne!=="key"&&(F[ne]=B[ne])}else F=B;return K&&l(F,typeof A=="function"?A.displayName||A.name||"Unknown":A),u(A,K,H,J,s(),F,le,ue)}function g(A){typeof A=="object"&&A!==null&&A.$$typeof===b&&A._store&&(A._store.validated=1)}var f=L,b=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),j=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),te=Symbol.for("react.client.reference"),v=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=Object.prototype.hasOwnProperty,w=Array.isArray,O=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(A){return A()}};var D,I={},M=f.react_stack_bottom_frame.bind(f,i)(),U=O(n(i)),W={};Ir.Fragment=y,Ir.jsx=function(A,B,F,X,J){var H=1e4>v.recentlyCreatedOwnerStacks++;return h(A,B,F,!1,X,J,H?Error("react-stack-top-frame"):M,H?O(n(A)):U)},Ir.jsxs=function(A,B,F,X,J){var H=1e4>v.recentlyCreatedOwnerStacks++;return h(A,B,F,!0,X,J,H?Error("react-stack-top-frame"):M,H?O(n(A)):U)}}()),Ir}var Ji;function lc(){return Ji||(Ji=1,process.env.NODE_ENV==="production"?Sn.exports=ac():Sn.exports=oc()),Sn.exports}var p=lc();const ze=({type:r="button",className:e,children:t,...n})=>p.jsx("button",{type:r==="submit"?"submit":"button",className:e,...n,children:t}),cc=({children:r,className:e})=>p.jsx("div",{className:`card-header ${e}`,children:r}),uc=({children:r,className:e="",...t})=>p.jsx("div",{className:`card-body ${e}`,...t,children:r}),hc=({children:r,className:e=""})=>p.jsx("div",{className:`card-footer ${e}`,children:r}),dc=({children:r,className:e="",...t})=>p.jsx("div",{className:`card ${e}`,...t,children:r}),fc=()=>p.jsx("div",{className:"spinner",children:p.jsx("svg",{className:"spinner-icon",width:"30px",height:"30px",viewBox:"0 0 66 66",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("circle",{className:"path",fill:"none",strokeWidth:"6",strokeLinecap:"round",cx:"33",cy:"33",r:"30"})})}),Pt=(r,e)=>{L.useEffect(()=>{if(!Array.isArray(r)||r.length===0)return;const t=n=>{r.every(i=>i.current&&!i.current.contains(n.target))&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[r,e])},pc=({children:r,items:e,position:t="bottom-left",className:n=""})=>{const[s,i]=L.useState(!1),[a,l]=L.useState({top:0,left:0}),c=L.useRef(null),u=L.useRef(null);return Pt([c,u],()=>{i(!1)}),L.useEffect(()=>{if(s&&c.current&&u.current){const h=c.current.getBoundingClientRect(),g=u.current.getBoundingClientRect(),{scrollX:f,scrollY:b}=window;let x=0,y=0;switch(t){case"bottom-left":x=h.bottom,y=h.left;break;case"bottom-right":x=h.bottom,y=h.right-g.width;break;case"top-left":x=h.top-g.height,y=h.left;break;case"top-right":x=h.top-g.height,y=h.right-g.width;break}l({top:Math.round(x+b),left:Math.round(y+f)})}},[s,t]),p.jsxs(p.Fragment,{children:[p.jsx("div",{ref:c,onClick:()=>i(!s),children:r}),s&&en.createPortal(p.jsx("div",{ref:u,style:{position:"absolute",top:`${a.top}px`,left:`${a.left}px`},className:`dropdown-menu ${t} ${n}`,children:e.map((h,g)=>p.jsxs("div",{className:`dropdown-menu-item ${h.className}`,onClick:()=>{h.onClick(),i(!1)},children:[h.icon&&h.icon," ",h.label]},g))}),document.body)]})},gc=({children:r,className:e="",position:t="bottom-left"})=>{const[n,s]=L.useState(!1),i=L.useRef(null),a=L.useRef(null),l=L.useRef(`dropdown-${Math.random().toString(36).substr(2,9)}`),c=()=>{s(!n)};return Pt([i,a],()=>{s(!1)}),p.jsx("div",{className:`dropdown ${e}`,ref:i,id:l.current,children:L.Children.map(r,u=>L.isValidElement(u)?L.cloneElement(u,{toggleDropdown:c,isOpen:n,position:t,contentRef:a,dropdownId:l.current}):u)})},mc=({children:r,className:e="",toggleDropdown:t,dropdownId:n})=>p.jsx("div",{className:`dropdown-toggle ${e}`,onClick:t,"data-dropdown-id":n,children:r}),bc=({children:r,className:e="",isOpen:t=!1,position:n="bottom-left",contentRef:s,dropdownId:i})=>{const[a,l]=L.useState({top:0,left:0});return L.useEffect(()=>{if(t&&s?.current){const c=document.querySelector(`[data-dropdown-id="${i}"]`);if(c){const u=c.getBoundingClientRect(),h=s.current.getBoundingClientRect(),{scrollX:g,scrollY:f}=window;let b=0,x=0;switch(n){case"bottom-left":b=u.bottom,x=u.left;break;case"bottom-right":b=u.bottom,x=u.right-h.width;break;case"top-left":b=u.top-h.height,x=u.left;break;case"top-right":b=u.top-h.height,x=u.right-h.width;break}l({top:Math.round(b+f),left:Math.round(x+g)})}}},[t,n,s,i]),t?en.createPortal(p.jsx("div",{ref:s,style:{position:"absolute",top:`${a.top}px`,left:`${a.left}px`},className:`dropdown-content ${n} ${e}`,children:r}),document.body):null},vc=({className:r,text:e})=>p.jsx("span",{className:r,children:e}),yc=({children:r,className:e="",...t})=>p.jsx("div",{className:`box ${e}`,...t,children:r}),ci=({children:r})=>p.jsx(p.Fragment,{children:r}),_o=({children:r})=>p.jsx(p.Fragment,{children:r}),Ec=({className:r="",navClassName:e="",contentClassName:t="",children:n,activeTab:s,handleActiveTab:i,customHeader:a})=>{const{tabs:l,groups:c}=L.useMemo(()=>{const h=[],g=[];return L.Children.forEach(n,f=>{if(L.isValidElement(f)){if(f.type===_o){const b=[],x=f.props;L.Children.forEach(x.children,y=>{L.isValidElement(y)&&y.type===ci&&(h.push({title:y.props.title,icon:y.props.icon,children:y.props.children}),b.push(h.length-1))}),g.push({title:x.title,tabIndices:b})}else if(f.type===ci){const b=f.props;h.push({title:b.title,icon:b.icon,children:b.children})}}}),{tabs:h,groups:g}},[n]);L.useEffect(()=>{l.length>0&&(s<0||s>=l.length)&&i(0)},[l.length,s,i]);const u=(h,g)=>p.jsxs("div",{className:`tab-item ${g===s?"active":""}`,onClick:()=>i(g),role:"button",tabIndex:0,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),i(g))},children:[h.icon&&p.jsx("span",{className:"tab-icon",children:h.icon}),p.jsx("span",{className:"tab-title",children:h.title})]},`tab-nav-${g}`);return p.jsxs("div",{className:`card tabs ${r}`,children:[p.jsxs("div",{className:`card-header ${e}`,children:[a,p.jsx("div",{className:"nav-tabs",role:"tablist",children:c.length>0?c.map(h=>p.jsxs(L.Fragment,{children:[p.jsx("legend",{className:"tab-item-legend",children:h.title}),h.tabIndices.map(g=>u(l[g],g))]},`group-${h.title}`)):l.map((h,g)=>u(h,g))})]}),p.jsx("div",{className:`card-body ${t}`,children:p.jsx("div",{className:"tab-content",children:p.jsx("div",{className:"tab-panel",children:l[s]?p.jsx("div",{children:l[s].children},`tab-content-${s}`):p.jsx("div",{children:"No content available"})})})})]})};var Co={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Qi=L.createContext&&L.createContext(Co),xc=["attr","size","title"];function wc(r,e){if(r==null)return{};var t=Nc(r,e),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(s=0;s<i.length;s++)n=i[s],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function Nc(r,e){if(r==null)return{};var t={};for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(e.indexOf(n)>=0)continue;t[n]=r[n]}return t}function Fn(){return Fn=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Fn.apply(this,arguments)}function ea(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,n)}return t}function Un(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ea(Object(t),!0).forEach(function(n){Tc(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ea(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Tc(r,e,t){return e=Ac(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ac(r){var e=Sc(r,"string");return typeof e=="symbol"?e:e+""}function Sc(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Oo(r){return r&&r.map((e,t)=>L.createElement(e.tag,Un({key:t},e.attr),Oo(e.child)))}function Oe(r){return e=>L.createElement(_c,Fn({attr:Un({},r.attr)},e),Oo(r.child))}function _c(r){var e=t=>{var{attr:n,size:s,title:i}=r,a=wc(r,xc),l=s||t.size||"1em",c;return t.className&&(c=t.className),r.className&&(c=(c?c+" ":"")+r.className),L.createElement("svg",Fn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,a,{className:c,style:Un(Un({color:r.color||t.color},t.style),r.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),i&&L.createElement("title",null,i),r.children)};return Qi!==void 0?L.createElement(Qi.Consumer,null,t=>e(t)):e(Co)}function Cc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(r)}function Ro(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(r)}function _i(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(r)}function Oc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 18 9 12 15 6"},child:[]}]})(r)}function Rc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(r)}function Lc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"},child:[]}]})(r)}function kc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"},child:[]}]})(r)}function jc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"19 20 9 12 19 4 19 20"},child:[]},{tag:"line",attr:{x1:"5",y1:"19",x2:"5",y2:"5"},child:[]}]})(r)}function Ic(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"5 4 15 12 5 20 5 4"},child:[]},{tag:"line",attr:{x1:"19",y1:"5",x2:"19",y2:"19"},child:[]}]})(r)}function qc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]}]})(r)}function Lo(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(r)}var qr={},rr={},_n={},kt={},jt={},Gs={},ta;function ko(){return ta||(ta=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.Doctype=r.CDATA=r.Tag=r.Style=r.Script=r.Comment=r.Directive=r.Text=r.Root=r.isTag=r.ElementType=void 0;var e;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(e=r.ElementType||(r.ElementType={}));function t(n){return n.type===e.Tag||n.type===e.Script||n.type===e.Style}r.isTag=t,r.Root=e.Root,r.Text=e.Text,r.Directive=e.Directive,r.Comment=e.Comment,r.Script=e.Script,r.Style=e.Style,r.Tag=e.Tag,r.CDATA=e.CDATA,r.Doctype=e.Doctype}(Gs)),Gs}var ee={},ra;function na(){if(ra)return ee;ra=1;var r=ee&&ee.__extends||function(){var m=function(T,k){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,Z){P.__proto__=Z}||function(P,Z){for(var te in Z)Object.prototype.hasOwnProperty.call(Z,te)&&(P[te]=Z[te])},m(T,k)};return function(T,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");m(T,k);function P(){this.constructor=T}T.prototype=k===null?Object.create(k):(P.prototype=k.prototype,new P)}}(),e=ee&&ee.__assign||function(){return e=Object.assign||function(m){for(var T,k=1,P=arguments.length;k<P;k++){T=arguments[k];for(var Z in T)Object.prototype.hasOwnProperty.call(T,Z)&&(m[Z]=T[Z])}return m},e.apply(this,arguments)};Object.defineProperty(ee,"__esModule",{value:!0}),ee.cloneNode=ee.hasChildren=ee.isDocument=ee.isDirective=ee.isComment=ee.isText=ee.isCDATA=ee.isTag=ee.Element=ee.Document=ee.CDATA=ee.NodeWithChildren=ee.ProcessingInstruction=ee.Comment=ee.Text=ee.DataNode=ee.Node=void 0;var t=ko(),n=function(){function m(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(m.prototype,"parentNode",{get:function(){return this.parent},set:function(T){this.parent=T},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"previousSibling",{get:function(){return this.prev},set:function(T){this.prev=T},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"nextSibling",{get:function(){return this.next},set:function(T){this.next=T},enumerable:!1,configurable:!0}),m.prototype.cloneNode=function(T){return T===void 0&&(T=!1),j(this,T)},m}();ee.Node=n;var s=function(m){r(T,m);function T(k){var P=m.call(this)||this;return P.data=k,P}return Object.defineProperty(T.prototype,"nodeValue",{get:function(){return this.data},set:function(k){this.data=k},enumerable:!1,configurable:!0}),T}(n);ee.DataNode=s;var i=function(m){r(T,m);function T(){var k=m!==null&&m.apply(this,arguments)||this;return k.type=t.ElementType.Text,k}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),T}(s);ee.Text=i;var a=function(m){r(T,m);function T(){var k=m!==null&&m.apply(this,arguments)||this;return k.type=t.ElementType.Comment,k}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),T}(s);ee.Comment=a;var l=function(m){r(T,m);function T(k,P){var Z=m.call(this,P)||this;return Z.name=k,Z.type=t.ElementType.Directive,Z}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),T}(s);ee.ProcessingInstruction=l;var c=function(m){r(T,m);function T(k){var P=m.call(this)||this;return P.children=k,P}return Object.defineProperty(T.prototype,"firstChild",{get:function(){var k;return(k=this.children[0])!==null&&k!==void 0?k:null},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"childNodes",{get:function(){return this.children},set:function(k){this.children=k},enumerable:!1,configurable:!0}),T}(n);ee.NodeWithChildren=c;var u=function(m){r(T,m);function T(){var k=m!==null&&m.apply(this,arguments)||this;return k.type=t.ElementType.CDATA,k}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),T}(c);ee.CDATA=u;var h=function(m){r(T,m);function T(){var k=m!==null&&m.apply(this,arguments)||this;return k.type=t.ElementType.Root,k}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),T}(c);ee.Document=h;var g=function(m){r(T,m);function T(k,P,Z,te){Z===void 0&&(Z=[]),te===void 0&&(te=k==="script"?t.ElementType.Script:k==="style"?t.ElementType.Style:t.ElementType.Tag);var v=m.call(this,Z)||this;return v.name=k,v.attribs=P,v.type=te,v}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"tagName",{get:function(){return this.name},set:function(k){this.name=k},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"attributes",{get:function(){var k=this;return Object.keys(this.attribs).map(function(P){var Z,te;return{name:P,value:k.attribs[P],namespace:(Z=k["x-attribsNamespace"])===null||Z===void 0?void 0:Z[P],prefix:(te=k["x-attribsPrefix"])===null||te===void 0?void 0:te[P]}})},enumerable:!1,configurable:!0}),T}(c);ee.Element=g;function f(m){return(0,t.isTag)(m)}ee.isTag=f;function b(m){return m.type===t.ElementType.CDATA}ee.isCDATA=b;function x(m){return m.type===t.ElementType.Text}ee.isText=x;function y(m){return m.type===t.ElementType.Comment}ee.isComment=y;function N(m){return m.type===t.ElementType.Directive}ee.isDirective=N;function S(m){return m.type===t.ElementType.Root}ee.isDocument=S;function _(m){return Object.prototype.hasOwnProperty.call(m,"children")}ee.hasChildren=_;function j(m,T){T===void 0&&(T=!1);var k;if(x(m))k=new i(m.data);else if(y(m))k=new a(m.data);else if(f(m)){var P=T?$(m.children):[],Z=new g(m.name,e({},m.attribs),P);P.forEach(function(w){return w.parent=Z}),m.namespace!=null&&(Z.namespace=m.namespace),m["x-attribsNamespace"]&&(Z["x-attribsNamespace"]=e({},m["x-attribsNamespace"])),m["x-attribsPrefix"]&&(Z["x-attribsPrefix"]=e({},m["x-attribsPrefix"])),k=Z}else if(b(m)){var P=T?$(m.children):[],te=new u(P);P.forEach(function(O){return O.parent=te}),k=te}else if(S(m)){var P=T?$(m.children):[],v=new h(P);P.forEach(function(O){return O.parent=v}),m["x-mode"]&&(v["x-mode"]=m["x-mode"]),k=v}else if(N(m)){var q=new l(m.name,m.data);m["x-name"]!=null&&(q["x-name"]=m["x-name"],q["x-publicId"]=m["x-publicId"],q["x-systemId"]=m["x-systemId"]),k=q}else throw new Error("Not implemented yet: ".concat(m.type));return k.startIndex=m.startIndex,k.endIndex=m.endIndex,m.sourceCodeLocation!=null&&(k.sourceCodeLocation=m.sourceCodeLocation),k}ee.cloneNode=j;function $(m){for(var T=m.map(function(P){return j(P,!0)}),k=1;k<T.length;k++)T[k].prev=T[k-1],T[k-1].next=T[k];return T}return ee}var sa;function jo(){return sa||(sa=1,function(r){var e=jt&&jt.__createBinding||(Object.create?function(l,c,u,h){h===void 0&&(h=u);var g=Object.getOwnPropertyDescriptor(c,u);(!g||("get"in g?!c.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return c[u]}}),Object.defineProperty(l,h,g)}:function(l,c,u,h){h===void 0&&(h=u),l[h]=c[u]}),t=jt&&jt.__exportStar||function(l,c){for(var u in l)u!=="default"&&!Object.prototype.hasOwnProperty.call(c,u)&&e(c,l,u)};Object.defineProperty(r,"__esModule",{value:!0}),r.DomHandler=void 0;var n=ko(),s=na();t(na(),r);var i={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function l(c,u,h){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof u=="function"&&(h=u,u=i),typeof c=="object"&&(u=c,c=void 0),this.callback=c??null,this.options=u??i,this.elementCB=h??null}return l.prototype.onparserinit=function(c){this.parser=c},l.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},l.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},l.prototype.onerror=function(c){this.handleCallback(c)},l.prototype.onclosetag=function(){this.lastNode=null;var c=this.tagStack.pop();this.options.withEndIndices&&(c.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(c)},l.prototype.onopentag=function(c,u){var h=this.options.xmlMode?n.ElementType.Tag:void 0,g=new s.Element(c,u,void 0,h);this.addNode(g),this.tagStack.push(g)},l.prototype.ontext=function(c){var u=this.lastNode;if(u&&u.type===n.ElementType.Text)u.data+=c,this.options.withEndIndices&&(u.endIndex=this.parser.endIndex);else{var h=new s.Text(c);this.addNode(h),this.lastNode=h}},l.prototype.oncomment=function(c){if(this.lastNode&&this.lastNode.type===n.ElementType.Comment){this.lastNode.data+=c;return}var u=new s.Comment(c);this.addNode(u),this.lastNode=u},l.prototype.oncommentend=function(){this.lastNode=null},l.prototype.oncdatastart=function(){var c=new s.Text(""),u=new s.CDATA([c]);this.addNode(u),c.parent=u,this.lastNode=c},l.prototype.oncdataend=function(){this.lastNode=null},l.prototype.onprocessinginstruction=function(c,u){var h=new s.ProcessingInstruction(c,u);this.addNode(h)},l.prototype.handleCallback=function(c){if(typeof this.callback=="function")this.callback(c,this.dom);else if(c)throw c},l.prototype.addNode=function(c){var u=this.tagStack[this.tagStack.length-1],h=u.children[u.children.length-1];this.options.withStartIndices&&(c.startIndex=this.parser.startIndex),this.options.withEndIndices&&(c.endIndex=this.parser.endIndex),u.children.push(c),h&&(c.prev=h,h.next=c),c.parent=u,this.lastNode=null},l}();r.DomHandler=a,r.default=a}(jt)),jt}var Vs={},ia;function Dc(){return ia||(ia=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.CARRIAGE_RETURN_PLACEHOLDER_REGEX=r.CARRIAGE_RETURN_PLACEHOLDER=r.CARRIAGE_RETURN_REGEX=r.CARRIAGE_RETURN=r.CASE_SENSITIVE_TAG_NAMES_MAP=r.CASE_SENSITIVE_TAG_NAMES=void 0,r.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],r.CASE_SENSITIVE_TAG_NAMES_MAP=r.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,t){return e[t.toLowerCase()]=t,e},{}),r.CARRIAGE_RETURN="\r",r.CARRIAGE_RETURN_REGEX=new RegExp(r.CARRIAGE_RETURN,"g"),r.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),r.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(r.CARRIAGE_RETURN_PLACEHOLDER,"g")}(Vs)),Vs}var aa;function Io(){if(aa)return kt;aa=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.formatAttributes=n,kt.escapeSpecialCharacters=i,kt.revertEscapedCharacters=a,kt.formatDOM=l;var r=jo(),e=Dc();function t(c){return e.CASE_SENSITIVE_TAG_NAMES_MAP[c]}function n(c){for(var u={},h=0,g=c.length;h<g;h++){var f=c[h];u[f.name]=f.value}return u}function s(c){c=c.toLowerCase();var u=t(c);return u||c}function i(c){return c.replace(e.CARRIAGE_RETURN_REGEX,e.CARRIAGE_RETURN_PLACEHOLDER)}function a(c){return c.replace(e.CARRIAGE_RETURN_PLACEHOLDER_REGEX,e.CARRIAGE_RETURN)}function l(c,u,h){u===void 0&&(u=null);for(var g=[],f,b=0,x=c.length;b<x;b++){var y=c[b];switch(y.nodeType){case 1:{var N=s(y.nodeName);f=new r.Element(N,n(y.attributes)),f.children=l(N==="template"?y.content.childNodes:y.childNodes,f);break}case 3:f=new r.Text(a(y.nodeValue));break;case 8:f=new r.Comment(y.nodeValue);break;default:continue}var S=g[b-1]||null;S&&(S.next=f),f.parent=u,f.prev=S,f.next=null,g.push(f)}return h&&(f=new r.ProcessingInstruction(h.substring(0,h.indexOf(" ")).toLowerCase(),h),f.next=g[0]||null,f.parent=u,g.unshift(f),g[1]&&(g[1].prev=g[0])),g}return kt}var oa;function Mc(){if(oa)return _n;oa=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.default=y;var r=Io(),e="html",t="head",n="body",s=/<([a-zA-Z]+[0-9]?)/,i=/<head[^]*>/i,a=/<body[^]*>/i,l=function(N,S){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(N,S){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u=typeof window=="object"&&window.DOMParser;if(typeof u=="function"){var h=new u,g="text/html";c=function(N,S){return S&&(N="<".concat(S,">").concat(N,"</").concat(S,">")),h.parseFromString(N,g)},l=c}if(typeof document=="object"&&document.implementation){var f=document.implementation.createHTMLDocument();l=function(N,S){if(S){var _=f.documentElement.querySelector(S);return _&&(_.innerHTML=N),f}return f.documentElement.innerHTML=N,f}}var b=typeof document=="object"&&document.createElement("template"),x;b&&b.content&&(x=function(N){return b.innerHTML=N,b.content.childNodes});function y(N){var S,_;N=(0,r.escapeSpecialCharacters)(N);var j=N.match(s),$=j&&j[1]?j[1].toLowerCase():"";switch($){case e:{var m=c(N);if(!i.test(N)){var T=m.querySelector(t);(S=T?.parentNode)===null||S===void 0||S.removeChild(T)}if(!a.test(N)){var T=m.querySelector(n);(_=T?.parentNode)===null||_===void 0||_.removeChild(T)}return m.querySelectorAll(e)}case t:case n:{var k=l(N).querySelectorAll($);return a.test(N)&&i.test(N)?k[0].parentNode.childNodes:k}default:{if(x)return x(N);var T=l(N,n).querySelector(n);return T.childNodes}}}return _n}var la;function Pc(){if(la)return rr;la=1;var r=rr&&rr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(rr,"__esModule",{value:!0}),rr.default=s;var e=r(Mc()),t=Io(),n=/<(![a-zA-Z\s]+)>/;function s(i){if(typeof i!="string")throw new TypeError("First argument must be a string");if(!i)return[];var a=i.match(n),l=a?a[1]:void 0;return(0,t.formatDOM)((0,e.default)(i),null,l)}return rr}var Cn={},Ie={},Dr={},ca;function Bc(){if(ca)return Dr;ca=1;var r=0;Dr.SAME=r;var e=1;return Dr.CAMELCASE=e,Dr.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1},Dr}var ua;function $c(){if(ua)return Ie;ua=1;const r=0,e=1,t=2,n=3,s=4,i=5,a=6;function l(m){return u.hasOwnProperty(m)?u[m]:null}function c(m,T,k,P,Z,te,v){this.acceptsBooleans=T===t||T===n||T===s,this.attributeName=P,this.attributeNamespace=Z,this.mustUseProperty=k,this.propertyName=m,this.type=T,this.sanitizeURL=te,this.removeEmptyString=v}const u={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(m=>{u[m]=new c(m,r,!1,m,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([m,T])=>{u[m]=new c(m,e,!1,T,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(m=>{u[m]=new c(m,t,!1,m.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(m=>{u[m]=new c(m,t,!1,m,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(m=>{u[m]=new c(m,n,!1,m.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(m=>{u[m]=new c(m,n,!0,m,null,!1,!1)}),["capture","download"].forEach(m=>{u[m]=new c(m,s,!1,m,null,!1,!1)}),["cols","rows","size","span"].forEach(m=>{u[m]=new c(m,a,!1,m,null,!1,!1)}),["rowSpan","start"].forEach(m=>{u[m]=new c(m,i,!1,m.toLowerCase(),null,!1,!1)});const g=/[\-\:]([a-z])/g,f=m=>m[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(m=>{const T=m.replace(g,f);u[T]=new c(T,e,!1,m,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(m=>{const T=m.replace(g,f);u[T]=new c(T,e,!1,m,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(m=>{const T=m.replace(g,f);u[T]=new c(T,e,!1,m,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(m=>{u[m]=new c(m,e,!1,m.toLowerCase(),null,!1,!1)});const b="xlinkHref";u[b]=new c("xlinkHref",e,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(m=>{u[m]=new c(m,e,!1,m.toLowerCase(),null,!0,!0)});const{CAMELCASE:x,SAME:y,possibleStandardNames:N}=Bc(),_=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",j=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+_+"]*$")),$=Object.keys(N).reduce((m,T)=>{const k=N[T];return k===y?m[T]=T:k===x?m[T.toLowerCase()]=T:m[T]=k,m},{});return Ie.BOOLEAN=n,Ie.BOOLEANISH_STRING=t,Ie.NUMERIC=i,Ie.OVERLOADED_BOOLEAN=s,Ie.POSITIVE_NUMERIC=a,Ie.RESERVED=r,Ie.STRING=e,Ie.getPropertyInfo=l,Ie.isCustomAttribute=j,Ie.possibleStandardNames=$,Ie}var Mr={},nr={},Ws,ha;function Fc(){if(ha)return Ws;ha=1;var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,t=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
23
- `,u="/",h="*",g="",f="comment",b="declaration";Ws=function(y,N){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];N=N||{};var S=1,_=1;function j(w){var O=w.match(e);O&&(S+=O.length);var D=w.lastIndexOf(c);_=~D?w.length-D:_+w.length}function $(){var w={line:S,column:_};return function(O){return O.position=new m(w),P(),O}}function m(w){this.start=w,this.end={line:S,column:_},this.source=N.source}m.prototype.content=y;function T(w){var O=new Error(N.source+":"+S+":"+_+": "+w);if(O.reason=w,O.filename=N.source,O.line=S,O.column=_,O.source=y,!N.silent)throw O}function k(w){var O=w.exec(y);if(O){var D=O[0];return j(D),y=y.slice(D.length),O}}function P(){k(t)}function Z(w){var O;for(w=w||[];O=te();)O!==!1&&w.push(O);return w}function te(){var w=$();if(!(u!=y.charAt(0)||h!=y.charAt(1))){for(var O=2;g!=y.charAt(O)&&(h!=y.charAt(O)||u!=y.charAt(O+1));)++O;if(O+=2,g===y.charAt(O-1))return T("End of comment missing");var D=y.slice(2,O-2);return _+=2,j(D),y=y.slice(O),_+=2,w({type:f,comment:D})}}function v(){var w=$(),O=k(n);if(O){if(te(),!k(s))return T("property missing ':'");var D=k(i),I=w({type:b,property:x(O[0].replace(r,g)),value:D?x(D[0].replace(r,g)):g});return k(a),I}}function q(){var w=[];Z(w);for(var O;O=v();)O!==!1&&(w.push(O),Z(w));return w}return P(),q()};function x(y){return y?y.replace(l,g):g}return Ws}var da;function Uc(){if(da)return nr;da=1;var r=nr&&nr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(nr,"__esModule",{value:!0}),nr.default=t;var e=r(Fc());function t(n,s){var i=null;if(!n||typeof n!="string")return i;var a=(0,e.default)(n),l=typeof s=="function";return a.forEach(function(c){if(c.type==="declaration"){var u=c.property,h=c.value;l?s(u,h,c):h&&(i=i||{},i[u]=h)}}),i}return nr}var Pr={},fa;function Hc(){if(fa)return Pr;fa=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.camelCase=void 0;var r=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,t=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,i=function(u){return!u||t.test(u)||r.test(u)},a=function(u,h){return h.toUpperCase()},l=function(u,h){return"".concat(h,"-")},c=function(u,h){return h===void 0&&(h={}),i(u)?u:(u=u.toLowerCase(),h.reactCompat?u=u.replace(s,l):u=u.replace(n,l),u.replace(e,a))};return Pr.camelCase=c,Pr}var Br,pa;function zc(){if(pa)return Br;pa=1;var r=Br&&Br.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},e=r(Uc()),t=Hc();function n(s,i){var a={};return!s||typeof s!="string"||(0,e.default)(s,function(l,c){l&&c&&(a[(0,t.camelCase)(l,i)]=c)}),a}return n.default=n,Br=n,Br}var ga;function qo(){return ga||(ga=1,function(r){var e=Mr&&Mr.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(r,"__esModule",{value:!0}),r.returnFirstArg=r.canTextBeChildOfNode=r.ELEMENTS_WITH_NO_TEXT_CHILDREN=r.PRESERVE_CUSTOM_ATTRIBUTES=void 0,r.isCustomComponent=i,r.setStyleProp=l;var t=L,n=e(zc()),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function i(h,g){return h.includes("-")?!s.has(h):!!(g&&typeof g.is=="string")}var a={reactCompat:!0};function l(h,g){if(typeof h=="string"){if(!h.trim()){g.style={};return}try{g.style=(0,n.default)(h,a)}catch{g.style={}}}}r.PRESERVE_CUSTOM_ATTRIBUTES=Number(t.version.split(".")[0])>=16,r.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var c=function(h){return!r.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(h.name)};r.canTextBeChildOfNode=c;var u=function(h){return h};r.returnFirstArg=u}(Mr)),Mr}var ma;function Do(){if(ma)return Cn;ma=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.default=i;var r=$c(),e=qo(),t=["checked","value"],n=["input","select","textarea"],s={reset:!0,submit:!0};function i(l,c){l===void 0&&(l={});var u={},h=!!(l.type&&s[l.type]);for(var g in l){var f=l[g];if((0,r.isCustomAttribute)(g)){u[g]=f;continue}var b=g.toLowerCase(),x=a(b);if(x){var y=(0,r.getPropertyInfo)(x);switch(t.includes(x)&&n.includes(c)&&!h&&(x=a("default"+b)),u[x]=f,y&&y.type){case r.BOOLEAN:u[x]=!0;break;case r.OVERLOADED_BOOLEAN:f===""&&(u[x]=!0);break}continue}e.PRESERVE_CUSTOM_ATTRIBUTES&&(u[g]=f)}return(0,e.setStyleProp)(l.style,u),u}function a(l){return r.possibleStandardNames[l]}return Cn}var sr={},ba;function Gc(){if(ba)return sr;ba=1;var r=sr&&sr.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(sr,"__esModule",{value:!0}),sr.default=i;var e=L,t=r(Do()),n=qo(),s={cloneElement:e.cloneElement,createElement:e.createElement,isValidElement:e.isValidElement};function i(l,c){c===void 0&&(c={});for(var u=[],h=typeof c.replace=="function",g=c.transform||n.returnFirstArg,f=c.library||s,b=f.cloneElement,x=f.createElement,y=f.isValidElement,N=l.length,S=0;S<N;S++){var _=l[S];if(h){var j=c.replace(_,S);if(y(j)){N>1&&(j=b(j,{key:j.key||S})),u.push(g(j,_,S));continue}}if(_.type==="text"){var $=!_.data.trim().length;if($&&_.parent&&!(0,n.canTextBeChildOfNode)(_.parent)||c.trim&&$)continue;u.push(g(_.data,_,S));continue}var m=_,T={};a(m)?((0,n.setStyleProp)(m.attribs.style,m.attribs),T=m.attribs):m.attribs&&(T=(0,t.default)(m.attribs,m.name));var k=void 0;switch(_.type){case"script":case"style":_.children[0]&&(T.dangerouslySetInnerHTML={__html:_.children[0].data});break;case"tag":_.name==="textarea"&&_.children[0]?T.defaultValue=_.children[0].data:_.children&&_.children.length&&(k=i(_.children,c));break;default:continue}N>1&&(T.key=S),u.push(g(x(_.name,T,k),_,S))}return u.length===1?u[0]:u}function a(l){return n.PRESERVE_CUSTOM_ATTRIBUTES&&l.type==="tag"&&(0,n.isCustomComponent)(l.name,l.attribs)}return sr}var va;function Vc(){return va||(va=1,function(r){var e=qr&&qr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(r,"__esModule",{value:!0}),r.htmlToDOM=r.domToReact=r.attributesToProps=r.Text=r.ProcessingInstruction=r.Element=r.Comment=void 0,r.default=l;var t=e(Pc());r.htmlToDOM=t.default;var n=e(Do());r.attributesToProps=n.default;var s=e(Gc());r.domToReact=s.default;var i=jo();Object.defineProperty(r,"Comment",{enumerable:!0,get:function(){return i.Comment}}),Object.defineProperty(r,"Element",{enumerable:!0,get:function(){return i.Element}}),Object.defineProperty(r,"ProcessingInstruction",{enumerable:!0,get:function(){return i.ProcessingInstruction}}),Object.defineProperty(r,"Text",{enumerable:!0,get:function(){return i.Text}});var a={lowerCaseAttributeNames:!1};function l(c,u){if(typeof c!="string")throw new TypeError("First argument must be a string");return c?(0,s.default)((0,t.default)(c,u?.htmlparser2||a),u):[]}}(qr)),qr}var Wc=Vc();const ya=Si(Wc),Kc=ya.default||ya,Yc=({type:r,text:e})=>{const[t,n]=L.useState(!0),s=L.useRef(null),i=L.useRef(null),a=()=>{i.current&&(i.current.style.transition="opacity 0.4s",i.current.style.opacity="0"),s.current=window.setTimeout(()=>{n(!t)},500)};return L.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),t?p.jsxs("div",{ref:i,className:`alert ${r}`,role:"alert",children:[p.jsx("p",{children:Kc(e)}),p.jsx("button",{className:"close",type:"button","data-toggle":"close",onClick:a,children:p.jsx(Lo,{})})]}):null},Mo=({children:r,className:e="",...t})=>p.jsx("div",{className:`modal-header ${e}`,...t,children:r}),Po=({children:r,className:e="",...t})=>p.jsx("div",{className:`modal-body ${e}`,...t,children:r}),Bo=({children:r,className:e="",...t})=>p.jsx("div",{className:`modal-footer ${e}`,...t,children:r}),$o=({children:r,className:e="",...t})=>(L.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}),[]),en.createPortal(p.jsx("div",{className:"modal",...t,children:p.jsx("div",{className:`modal-dialog ${e}`,children:r})}),document.body)),Xc=({labelIcon:r,label:e,message:t,onCancel:n,onConfirm:s})=>p.jsxs($o,{className:"modal-sm",children:[p.jsxs(Mo,{className:"bg-danger",children:[p.jsxs("div",{className:"modal-header-title",children:[r&&r,p.jsx("span",{children:e})]}),p.jsx("div",{className:"tools",children:p.jsx(Lo,{className:"icon",onClick:n})})]}),p.jsx(Po,{children:p.jsx("p",{children:t})}),p.jsxs(Bo,{className:"justify-content-space-between",children:[p.jsxs(ze,{type:"button",className:"btn btn-default",onClick:n,children:[p.jsx(Cc,{})," Batalkan"]}),p.jsxs(ze,{type:"button",className:"btn btn-primary",onClick:s,children:[p.jsx(Ro,{})," Konfirmasi"]})]})]}),Zc=({className:r="",type:e,title:t,text:n})=>p.jsxs("div",{className:`callout ${e} ${r}`,children:[t&&p.jsx("h5",{children:t}),typeof n=="string"?p.jsx("p",{children:n}):n]}),Jc=({children:r,text:e,position:t="top",className:n="",offset:s=5})=>{const[i,a]=L.useState(!1),[l,c]=L.useState({top:0,left:0}),u=L.useRef(null),h=L.useRef(null);return L.useEffect(()=>{if(i&&u.current&&h.current){const g=u.current.getBoundingClientRect(),f=h.current.getBoundingClientRect(),{scrollX:b,scrollY:x}=window;let y=0,N=0;switch(t){case"top":y=g.top-f.height-s,N=g.left+(g.width-f.width)/2;break;case"bottom":y=g.bottom+s,N=g.left+(g.width-f.width)/2;break;case"left":y=g.top+(g.height-f.height)/2,N=g.left-f.width-s;break;case"right":y=g.top+(g.height-f.height)/2,N=g.right+s;break}c({top:Math.round(y+x),left:Math.round(N+b)})}},[i,t,s]),p.jsxs("div",{ref:u,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[r,i&&en.createPortal(p.jsx("div",{ref:h,style:{position:"absolute",top:`${l.top}px`,left:`${l.left}px`},className:`tooltip ${t} ${n}`,children:e}),document.body)]})},Qc=({className:r,children:e,text:t})=>{const[n,s]=L.useState(!1),[i,a]=L.useState({top:0,left:0}),l=L.useRef(null),c=L.useRef(null);Pt([l,c],()=>{s(!1)}),L.useEffect(()=>{if(n&&l.current&&c.current){const h=l.current.getBoundingClientRect(),g=c.current.getBoundingClientRect(),{scrollX:f,scrollY:b}=window;let x=0,y=0;r.includes("top")?(x=h.top-g.height-10,y=h.left+(h.width-g.width)/2):r.includes("bottom")?(x=h.bottom+10,y=h.left+(h.width-g.width)/2):r.includes("left")?(x=h.top+(h.height-g.height)/2,y=h.left-g.width-10):r.includes("right")&&(x=h.top+(h.height-g.height)/2,y=h.right+10),a({top:Math.round(x+b),left:Math.round(y+f)})}},[n,r]);function u(){s(!n)}return p.jsxs("div",{ref:l,onClick:u,children:[e,n&&en.createPortal(p.jsxs("div",{ref:c,className:`popover ${r}`,role:"tooltip",style:{position:"absolute",top:`${i.top}px`,left:`${i.left}px`},children:[p.jsx("div",{className:"arrow"}),p.jsx("div",{className:"popover-content",children:t})]}),document.body)]})};function eu(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zM9 14H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-8 4H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2z"},child:[]}]})(r)}function tu(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"},child:[]}]})(r)}function ru(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"},child:[]}]})(r)}function nu(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M24 24H0V0h24v24z",opacity:".87"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"},child:[]}]})(r)}const su=({defaultIndex:r=0,children:e})=>{const[t,n]=L.useState(r),s=i=>{n(i===t?null:i)};return p.jsx("div",{className:"panel-group",children:L.Children.map(e,(i,a)=>L.cloneElement(i,{isOpen:t===a,onClick:()=>s(a)}))})},iu=({title:r,titleIcon:e,children:t,isOpen:n=!1,onClick:s})=>{const i=L.Children.toArray(t).find(l=>l.type===Fo),a=L.Children.toArray(t).find(l=>l.type===Uo);return p.jsxs("div",{className:"card mb-10",children:[p.jsxs("div",{className:"card-header",role:"button",tabIndex:0,onClick:s,onKeyDown:s,children:[p.jsxs("div",{className:"card-header-title",children:[e," ",r]}),p.jsx("div",{className:"tools",children:p.jsx(nu,{className:`menu-caret ${n?"active":""}`})})]}),n&&p.jsxs("div",{className:"panel active",children:[i,a]})]})},Fo=({className:r="",children:e})=>p.jsx("div",{className:`card-body ${r}`,children:e}),Uo=({className:r="",children:e})=>p.jsx("div",{className:`card-footer ${r}`,children:e}),au=({size:r=40,className:e="",color:t})=>p.jsx("span",{className:`circular-progress ${e} ${t?`brand-${t}`:""}`,style:{width:`${r}px`,height:`${r}px`}}),ou=({showLabel:r=!1,progress:e=0,className:t="",color:n})=>{const s=t.includes("indeterminate");return p.jsxs("div",{className:`linear-progress ${t}`,children:[p.jsx("div",{className:`progress-bar ${n?`brand-${n}`:""}`,children:p.jsx("span",{className:"progress",style:{width:`${e}%`}})}),r&&!s&&p.jsxs("span",{className:"progress-label",children:[e,"%"]})]})},lu=({progress:r=0,size:e=40,className:t="",color:n,strokeWidth:s=4})=>{const[i,a]=L.useState(0);return L.useEffect(()=>{if(i<r){const l=setTimeout(()=>{a(i+1)},10);return()=>clearTimeout(l)}},[i,r]),p.jsxs("div",{className:`circular-progress-with-label ${t}`,children:[p.jsx("span",{className:`progress ${n?`brand-${n}`:""}`,style:{width:`${e}px`,height:`${e}px`,borderWidth:`${s}px`,background:n?`radial-gradient(closest-side, var(--secondary-bg) 79%, transparent 80% 100%), conic-gradient(var(--brand-${n}) ${i}%, var(--primary-bg) 0)`:`radial-gradient(closest-side, var(--secondary-bg) 79%, transparent 80% 100%), conic-gradient(#888 ${i}%, var(--primary-bg) 0)`}}),p.jsxs("span",{className:"progress-label",children:[i,"%"]})]})},ye=[];for(let r=0;r<256;++r)ye.push((r+256).toString(16).slice(1));function cu(r,e=0){return(ye[r[e+0]]+ye[r[e+1]]+ye[r[e+2]]+ye[r[e+3]]+"-"+ye[r[e+4]]+ye[r[e+5]]+"-"+ye[r[e+6]]+ye[r[e+7]]+"-"+ye[r[e+8]]+ye[r[e+9]]+"-"+ye[r[e+10]]+ye[r[e+11]]+ye[r[e+12]]+ye[r[e+13]]+ye[r[e+14]]+ye[r[e+15]]).toLowerCase()}let Ks;const uu=new Uint8Array(16);function hu(){if(!Ks){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ks=crypto.getRandomValues.bind(crypto)}return Ks(uu)}const du=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ea={randomUUID:du};function Ho(r,e,t){if(Ea.randomUUID&&!r)return Ea.randomUUID();r=r||{};const n=r.random??r.rng?.()??hu();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,cu(n)}const Ci=L.forwardRef(({name:r,label:e,message:t,error:n,checked:s=!1,onChange:i,...a},l)=>{const c=Ho(),u=h=>{i(h)};return p.jsxs(p.Fragment,{children:[p.jsxs("label",{className:"custom-checkbox",htmlFor:c,children:[p.jsx("input",{className:"form-control",type:"checkbox",id:c,name:r,ref:l,role:"checkbox",checked:s,onChange:u,...a}),p.jsx("span",{className:"checkmark"}),e&&p.jsx("span",{className:a.required?"required":"",children:e})]}),n?p.jsx("small",{className:"form-message text-danger",children:n}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Ci.displayName="Checkbox";const fu=({children:r})=>p.jsx("div",{className:"form",children:r}),pu=({className:r="",children:e})=>p.jsx("div",{className:`form-group ${r}`,children:e}),gu=({className:r="",children:e})=>p.jsx("div",{className:`form-checkbox ${r}`,children:e}),mu=({className:r="",children:e})=>p.jsx("div",{className:`form-radio ${r}`,children:e}),Oi=(r,e)=>{L.useEffect(()=>{if(r&&e.current){const t=e.current.getBoundingClientRect(),n=window.innerHeight;t.bottom>n?e.current.classList.add("position-top"):e.current.classList.remove("position-top");const s=e.current.querySelector(".option.selected");s&&s.scrollIntoView({block:"nearest"})}},[r,e])},yt=L.forwardRef((r,e)=>{const{name:t,label:n,message:s,selectLabel:i="Select an option",size:a="md",floatingLabel:l=!1,error:c,options:u,value:h="",onChange:g,onBlur:f,required:b,disabled:x}=r,[y,N]=L.useState(!1),S=L.useRef(null),_=L.useRef(null),j=L.useRef(null),$=u.find(T=>T.value===h)?.label??i;L.useImperativeHandle(e,()=>j.current),L.useEffect(()=>N(!1),[]),Pt([S],()=>{N(!1),j.current?.blur()}),Oi(y,_);const m=T=>{const k=u.find(te=>te.value===T);if(!k)return;const P=k.value;if(g?.({target:{name:t,value:P,type:"select-one"},currentTarget:{name:t,value:P}}),j.current){j.current.value=String(P);const te=new CustomEvent("change",{bubbles:!0,detail:{originalValue:P}});j.current.dispatchEvent(te)}N(!1)};return p.jsxs(p.Fragment,{children:[p.jsxs("select",{ref:j,name:t,value:h!=null&&!Number.isNaN(h)?h:"",onChange:g,onBlur:f,required:b,disabled:x,style:{position:"absolute",left:"-9999px"},tabIndex:-1,children:[p.jsx("option",{value:"",children:"Select an option"}),u.map(T=>p.jsx("option",{value:String(T.value),children:T.label},T.value))]}),n&&!l&&p.jsxs("label",{htmlFor:t,children:[n," ",b&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:`dropdown-select-container ${a}`,ref:S,children:[p.jsxs("div",{className:`dropdown-header ${y?"open":""} ${x?"disabled":""}`,onClick:()=>!x&&N(!y),"aria-haspopup":"listbox","aria-expanded":y,children:[p.jsx("span",{className:"label",children:$}),p.jsx(_i,{className:"arrow"})]}),y&&p.jsx("div",{className:"dropdown-options scrollbar",ref:_,role:"listbox",children:u.map(T=>p.jsx("div",{className:`option ${T.value===h?"selected":""}`,onClick:()=>m(T.value),role:"option","aria-selected":T.value===h,children:T.label},T.value))})]}),n&&l&&p.jsxs("label",{htmlFor:t,children:[n," ",b&&p.jsx("span",{className:"text-danger",children:"*"})]}),c?p.jsx("small",{className:"form-message text-danger",children:c}):s&&p.jsx("small",{className:"form-message text-muted",children:s})]})});yt.displayName="Select";const bu=r=>{const[e,t]=L.useState(!1);return L.useEffect(()=>{const n=()=>{if(!r.current)return;const{top:i,height:a}=r.current.getBoundingClientRect(),l=window.innerHeight;t(i+a>l)};n();const s=()=>{n()};return window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[r]),e},zo=r=>{const e=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),n=String(r.getDate()).padStart(2,"0");return`${e}-${t}-${n}`},vu=r=>r.toLocaleDateString("id-ID",{timeZone:"Asia/Jakarta",year:"numeric",month:"long",day:"numeric"}),Wr=(r,e)=>Array.from({length:r},(t,n)=>e(n)),On=(r,e)=>{const t=new Date(e,r,1).getDay(),n=new Date(e,r+1,0).getDate(),s=Wr(t,()=>({value:"",label:""})),i=Wr(n,a=>({value:(a+1).toString(),label:(a+1).toString()}));return[...s,...i]},yu=(r,e)=>{const t=new Date(e,r+1,0).getDate();return Wr(t,n=>({value:(n+1).toString(),label:(n+1).toString()}))},Go=(r="id-ID")=>Wr(12,e=>({value:(e+1).toString(),label:new Date(2024,e,1).toLocaleString(r,{month:"long"})})),Vo=()=>{const r=new Date().getFullYear(),e=r-60,n=r+20-e+1;return Wr(n,s=>{const i=e+s;return{value:i.toString(),label:i.toString()}})},xa=r=>{const e=new Date(r);return e instanceof Date&&!isNaN(e.getTime())},Eu=["Min","Sen","Sel","Rab","Kam","Jum","Sab"],xu=r=>{const[e,t]=L.useState(r);return{selectedDate:e,handlePrevMonth:()=>{const c=new Date(e);c.setMonth(e.getMonth()-1),t(c)},handleNextMonth:()=>{const c=new Date(e);c.setMonth(e.getMonth()+1),t(c)},handleDateClick:(c,u,h,g)=>{const f=new Date(parseInt(h,10),parseInt(u,10),parseInt(c,10));t(f),g(zo(f))},isSelectedDate:(c,u,h)=>parseInt(h,10)===e.getFullYear()&&parseInt(u,10)===e.getMonth()+1&&parseInt(c,10)===e.getDate(),setDate:c=>{t(c)}}},Wo=({onSelect:r,defaultDate:e,full:t=!1})=>{const n=L.useRef(null),s=bu(n),i=xa(e)?new Date(e):new Date,{selectedDate:a,handlePrevMonth:l,handleNextMonth:c,handleDateClick:u,isSelectedDate:h,setDate:g}=xu(i),[f,b]=L.useState(On(i.getMonth(),i.getFullYear()));L.useEffect(()=>{if(e&&xa(e)){const y=new Date(e);g(y)}},[e,g]),L.useEffect(()=>{b(On(a.getMonth(),a.getFullYear()))},[a]);const x=(y,N)=>{const S=parseInt(y,10),_=S+1;return f.map((j,$)=>j.value!==""?p.jsx("div",{className:`calendar-day ${h(j.value,_.toString(),N)?"selected-date":""}`,onClick:()=>{const m=new Date(parseInt(N,10),S,parseInt(j.value,10)),T=t?vu(m):zo(m);u(j.value,y,N,()=>r(T))},children:j.label},`day-${$}`):p.jsx("div",{className:"calendar-day empty"},`day-${$}`))};return p.jsxs("div",{className:`date-picker ${s?"position-top":""}`,ref:n,children:[p.jsxs("div",{className:"calendar-nav",children:[p.jsx("button",{type:"button",className:"btn btn-rounded",onClick:l,children:p.jsx(tu,{})}),p.jsxs("div",{className:"calendar-select",children:[p.jsx(yt,{name:"month",size:"md",options:Go(),value:(a.getMonth()+1).toString(),onChange:y=>{const N=parseInt(y.target.value,10)-1,S=new Date(a.getFullYear(),N,a.getDate());g(S),b(On(N,S.getFullYear()))}}),p.jsx(yt,{name:"year",size:"md",options:Vo(),value:a.getFullYear().toString(),onChange:y=>{const N=parseInt(y.target.value,10),S=new Date(N,a.getMonth(),a.getDate());g(S),b(On(S.getMonth(),N))}})]}),p.jsx("button",{type:"button",className:"btn btn-rounded",onClick:c,children:p.jsx(ru,{})})]}),p.jsxs("div",{className:"calendar",children:[p.jsx("div",{className:"calendar-header",children:Eu.map((y,N)=>p.jsx("div",{className:"calendar-day-name",children:y},`day-${N}`))}),p.jsx("div",{className:"calendar-body",children:x(a.getMonth().toString(),a.getFullYear().toString())})]})]})},Ko=L.forwardRef(({name:r,label:e,message:t,floatingLabel:n,locale:s="id",error:i,value:a,...l},c)=>{const u=_=>{if(!_)return new Date;const j=new Date(_);return isNaN(j.getTime())?new Date:j},h=u(a),[g,f]=L.useState({day:h.getDate(),month:h.getMonth()+1,year:h.getFullYear()});L.useEffect(()=>{if(a){const _=u(a);f({day:_.getDate(),month:_.getMonth()+1,year:_.getFullYear()})}},[a]),L.useEffect(()=>{const _=new Date(g.year,g.month,0).getDate();g.day>_&&f(j=>({...j,day:_}))},[g.month,g.year]);const b=(_,j)=>{const $=parseInt(j,10);if(isNaN($))return;const m={...g,[_]:$};if(f(m),l.onChange){const T=`${m.year}-${String(m.month).padStart(2,"0")}-${String(m.day).padStart(2,"0")}`;l.onChange({target:{name:r,value:T}})}},x=L.useMemo(()=>yu(g.month-1,g.year),[g.month,g.year]),y=L.useMemo(()=>Go(s),[s]),N=L.useMemo(()=>Vo(),[]),S=p.jsxs("label",{htmlFor:r,children:[e," ",l.required&&p.jsx("span",{className:"text-danger",children:"*"})]});return p.jsxs(p.Fragment,{children:[!n&&S,p.jsxs("div",{className:"row",ref:c,children:[p.jsx("div",{className:"col-md-3",children:p.jsx(yt,{name:`${r}-day`,disabled:l.disabled,options:x,value:g.day.toString(),onChange:_=>b("day",_.target.value),"aria-label":"Day"})}),p.jsx("div",{className:"col-md-5",children:p.jsx(yt,{name:`${r}-month`,disabled:l.disabled,options:y,value:g.month.toString(),onChange:_=>b("month",_.target.value),"aria-label":"Month"})}),p.jsx("div",{className:"col-md-4",children:p.jsx(yt,{name:`${r}-year`,disabled:l.disabled,options:N,value:g.year.toString(),onChange:_=>b("year",_.target.value),"aria-label":"Year"})})]}),n&&S,i?p.jsx("small",{className:"form-message text-danger",children:i}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Ko.displayName="DropdownDatePicker";const wu=({type:r="text",className:e,...t})=>p.jsx("input",{type:r,className:`clear ${e}`,...t}),Yo=L.forwardRef(({className:r,name:e,label:t,message:n,floatingLabel:s,error:i,...a},l)=>p.jsxs(p.Fragment,{children:[!s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",a.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("input",{type:"text",className:`form-control ${r}`,id:e,name:e,placeholder:s?"":" ",ref:l,...a}),s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",a.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):n&&p.jsx("small",{className:"form-message text-muted",children:n})]})),Nu=L.forwardRef(({className:r,name:e,label:t,message:n,floatingLabel:s,error:i,actionIcon:a,actionButtonLabel:l,actionButtonHandler:c,...u},h)=>p.jsxs(p.Fragment,{children:[!s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",u.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:"input-group-icon",children:[p.jsx("input",{type:"text",className:`form-control pr-35 ${r}`,id:e,name:e,placeholder:s?"":" ",ref:h,...u}),a&&p.jsx(ze,{role:"button",className:"icon",onClick:c,tabIndex:0,"aria-label":l,disabled:u.disabled,children:a})]}),s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",u.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):n&&p.jsx("small",{className:"form-message text-muted",children:n})]})),Xo=L.forwardRef(({name:r,label:e,message:t,floatingLabel:n,full:s,error:i,onChange:a,value:l,...c},u)=>{const[h,g]=L.useState(!1),f=L.useRef(null),b=L.useRef(null);L.useImperativeHandle(u,()=>f.current),L.useEffect(()=>{l!==void 0&&f.current&&(f.current.value=l)},[l]);const x=y=>{f.current&&(f.current.value=y,a?.({target:f.current,currentTarget:f.current}),g(!1))};return Pt([b],()=>g(!1)),p.jsxs(p.Fragment,{children:[!n&&p.jsxs("label",{htmlFor:r,children:[e," ",c.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:"input-group-icon",children:[p.jsx("input",{type:"text",className:"form-control",id:r,name:r,placeholder:n?"":" ",ref:f,onChange:a,...c}),p.jsx(ze,{role:"button",className:"icon",onClick:y=>{y.stopPropagation(),g(N=>!N)},"aria-label":"Open date picker",disabled:c.disabled,children:p.jsx(eu,{})})]}),p.jsx("div",{ref:b,className:`date-picker-container ${h?"show":"hide"}`,style:{display:h?"block":"none"},children:p.jsx(Wo,{full:s,onSelect:x,defaultDate:l||void 0})}),n&&p.jsxs("label",{htmlFor:r,children:[e," ",c.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Xo.displayName="InputDate";const Zo=L.forwardRef(({name:r,label:e,message:t,accept:n,error:s,onChange:i,...a},l)=>{const c=u=>{i&&i(u)};return p.jsxs("div",{className:"form-group",children:[e&&p.jsxs("label",{htmlFor:r,children:[e," ",a.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("input",{type:"file",className:"form-control",id:r,name:r,accept:n,onChange:c,ref:l,...a}),s?p.jsx("small",{className:"form-message text-danger",children:s}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Zo.displayName="InputFile";const Tu=()=>p.jsx("div",{children:"InputImageSize"}),Jo=L.forwardRef(({name:r,label:e,message:t,floatingLabel:n,error:s,...i},a)=>p.jsxs(p.Fragment,{children:[!n&&p.jsxs("label",{htmlFor:r,children:[e," ",i.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("textarea",{className:"form-control",id:r,name:r,placeholder:n?"":" ",ref:a,...i}),n&&p.jsxs("label",{htmlFor:r,children:[e," ",i.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),s?p.jsx("small",{className:"form-message text-danger",children:s}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]}));Jo.displayName="InputTextArea";const Au=L.forwardRef(({name:r,label:e,message:t,options:n,error:s,...i},a)=>p.jsxs(p.Fragment,{children:[e&&p.jsxs("label",{htmlFor:r,children:[e," ",i.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("div",{className:"form-control",children:n.map(l=>{const c=`${Ho()}-${l.value}`;return p.jsxs("div",{className:"d-flex align-items-center",children:[p.jsx("input",{type:"radio",id:c,name:r,value:l.value,ref:a,...i}),p.jsx("label",{htmlFor:c,children:l.label})]},l.value)})}),s?p.jsx("small",{className:"form-message text-danger",children:s}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})),Qo=L.forwardRef(({name:r,label:e,message:t,size:n="md",options:s,selectedValue:i,error:a,required:l,...c},u)=>p.jsxs(p.Fragment,{children:[e&&p.jsxs("label",{htmlFor:r,children:[e," ",l&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("div",{className:"btn-group","data-toggle":"buttons",children:s.map(h=>{const g=h.value.toString()===i?.toString();return p.jsxs("label",{className:`btn auto btn-default btn-${n} ${g?"active":""}`,children:[p.jsx("input",{type:"radio",id:h.value.toString(),name:r,value:h.value.toString(),ref:u,...c}),p.jsx("span",{children:h.label})]},h.value.toString())})}),a?p.jsx("small",{className:"form-message text-danger",children:a}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]}));Qo.displayName="RadioButtonGroup";const el=L.forwardRef(({name:r,label:e,message:t,selectLabel:n,floatingLabel:s=!1,error:i,options:a,value:l=[],onChange:c,required:u,disabled:h,className:g},f)=>{const[b,x]=L.useState(!1),[y,N]=L.useState(l),S=L.useRef(null),_=L.useRef(null);L.useEffect(()=>{JSON.stringify(l)!==JSON.stringify(y)&&N(l)},[y,l]);const j=m=>{const T=y.includes(m)?y.filter(k=>k!==m):[...y,m];N(T),c&&c({target:{name:r,value:T}})};Pt([S],()=>{x(!1)}),Oi(b,_);const $=y.map(m=>a.find(T=>T.value===m)?.label).filter(Boolean).join(", ");return p.jsxs(p.Fragment,{children:[e&&!s&&p.jsxs("label",{htmlFor:r,children:[e," ",u&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:`dropdown-select-container ${g||""}`,ref:S,children:[p.jsxs("div",{className:`dropdown-header ${b?"open":""} ${h?"disabled":""}`,onClick:()=>!h&&x(!b),ref:f,children:[p.jsx("span",{className:"label",children:$||n||"Select an option"}),p.jsx(_i,{className:`arrow ${b?"open":""}`})]}),b&&!h&&p.jsx("div",{className:"dropdown-options scrollbar",ref:_,role:"listbox",children:a?.map(m=>p.jsx("div",{className:`option ${y.includes(m.value)?"selected":""}`,children:p.jsx(Ci,{name:m.value.toString(),label:m.label,checked:y.includes(m.value),onChange:()=>j(m.value)})},m.value))})]}),e&&s&&p.jsxs("label",{htmlFor:r,children:[e," ",u&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});el.displayName="SelectMultiple";const tl=L.forwardRef((r,e)=>{const{name:t,label:n,message:s,selectLabel:i="Select an option",size:a="md",floatingLabel:l=!1,error:c,options:u=[],value:h="",onChange:g,required:f,disabled:b,selectSearch:x="",setSelectSearch:y,isLoading:N=!1}=r,[S,_]=L.useState(!1),j=L.useRef(null),$=L.useRef(null),m=L.useRef(null);L.useImperativeHandle(e,()=>m.current),Pt([j],()=>_(!1)),Oi(S,$);const T=h?u.find(P=>P.value===h)?.label:i,k=P=>{g?.({target:{name:t,value:P}}),m.current&&(m.current.value=String(P),m.current.dispatchEvent(new Event("change",{bubbles:!0}))),_(!1)};return p.jsxs(p.Fragment,{children:[p.jsxs("select",{ref:m,name:t,value:h,onChange:g,style:{position:"absolute",left:"-9999px"},tabIndex:-1,children:[p.jsx("option",{value:"",children:"Select an option"}),u.map(P=>p.jsx("option",{value:P.value,children:P.label},P.value))]}),n&&!l&&p.jsxs("label",{htmlFor:t,children:[n," ",f&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:`dropdown-select-container ${a}`,ref:j,children:[p.jsxs("div",{className:`dropdown-header ${S?"open":""} ${b?"disabled":""}`,onClick:()=>!b&&_(!S),"aria-haspopup":"listbox","aria-expanded":S,children:[p.jsx("span",{className:"label",children:T}),p.jsx(_i,{className:"arrow"})]}),S&&p.jsxs("div",{className:"dropdown-options scrollbar",ref:$,role:"listbox",children:[p.jsx("div",{className:"search-input",children:p.jsx(Yo,{name:"search",placeholder:"Ketik untuk mencari..",type:"search",autoFocus:!0,value:x,onChange:P=>y?.(P.currentTarget.value)})}),N?p.jsx("div",{className:"p-10 text-center",children:"Loading options..."}):u.length===0?p.jsx("div",{className:"p-10 text-center",children:"Tidak ada hasil ditemukan"}):u.map(P=>p.jsx("div",{className:`option ${h===P.value?"selected":""}`,onClick:()=>k(P.value),role:"option","aria-selected":h===P.value,children:P.label},P.value))]})]}),n&&l&&p.jsxs("label",{htmlFor:t,children:[n," ",f&&p.jsx("span",{className:"text-danger",children:"*"})]}),c?p.jsx("small",{className:"form-message text-danger",children:c}):s&&p.jsx("small",{className:"form-message text-muted",children:s})]})});tl.displayName="SelectWithSearch";const rl=L.forwardRef(({name:r,className:e="",error:t,checked:n=!1,onChange:s,...i},a)=>{const l=c=>{s&&s(c)};return p.jsx(p.Fragment,{children:p.jsxs("label",{className:`switch ${e} ${t?"has-error":""}`,children:[p.jsx("input",{type:"checkbox",id:r,name:r,ref:a,checked:n,onChange:l,disabled:i.disabled,...i}),p.jsx("span",{className:"slider round"})]})})});rl.displayName="Switch";var nl=typeof global=="object"&&global&&global.Object===Object&&global,Su=typeof self=="object"&&self&&self.Object===Object&&self,tt=nl||Su||Function("return this")(),wt=tt.Symbol,sl=Object.prototype,_u=sl.hasOwnProperty,Cu=sl.toString,$r=wt?wt.toStringTag:void 0;function Ou(r){var e=_u.call(r,$r),t=r[$r];try{r[$r]=void 0;var n=!0}catch{}var s=Cu.call(r);return n&&(e?r[$r]=t:delete r[$r]),s}var Ru=Object.prototype,Lu=Ru.toString;function ku(r){return Lu.call(r)}var ju="[object Null]",Iu="[object Undefined]",wa=wt?wt.toStringTag:void 0;function gr(r){return r==null?r===void 0?Iu:ju:wa&&wa in Object(r)?Ou(r):ku(r)}function ct(r){return r!=null&&typeof r=="object"}var It=Array.isArray;function Nt(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}function il(r){return r}var qu="[object AsyncFunction]",Du="[object Function]",Mu="[object GeneratorFunction]",Pu="[object Proxy]";function Ri(r){if(!Nt(r))return!1;var e=gr(r);return e==Du||e==Mu||e==qu||e==Pu}var Ys=tt["__core-js_shared__"],Na=function(){var r=/[^.]+$/.exec(Ys&&Ys.keys&&Ys.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Bu(r){return!!Na&&Na in r}var $u=Function.prototype,Fu=$u.toString;function Bt(r){if(r!=null){try{return Fu.call(r)}catch{}try{return r+""}catch{}}return""}var Uu=/[\\^$.*+?()[\]{}|]/g,Hu=/^\[object .+?Constructor\]$/,zu=Function.prototype,Gu=Object.prototype,Vu=zu.toString,Wu=Gu.hasOwnProperty,Ku=RegExp("^"+Vu.call(Wu).replace(Uu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Yu(r){if(!Nt(r)||Bu(r))return!1;var e=Ri(r)?Ku:Hu;return e.test(Bt(r))}function Xu(r,e){return r?.[e]}function $t(r,e){var t=Xu(r,e);return Yu(t)?t:void 0}var ui=$t(tt,"WeakMap"),Ta=Object.create,Zu=function(){function r(){}return function(e){if(!Nt(e))return{};if(Ta)return Ta(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}();function Ju(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}function Qu(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var eh=800,th=16,rh=Date.now;function nh(r){var e=0,t=0;return function(){var n=rh(),s=th-(n-t);if(t=n,s>0){if(++e>=eh)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}function sh(r){return function(){return r}}var Hn=function(){try{var r=$t(Object,"defineProperty");return r({},"",{}),r}catch{}}(),ih=Hn?function(r,e){return Hn(r,"toString",{configurable:!0,enumerable:!1,value:sh(e),writable:!0})}:il,ah=nh(ih);function oh(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var lh=9007199254740991,ch=/^(?:0|[1-9]\d*)$/;function al(r,e){var t=typeof r;return e=e??lh,!!e&&(t=="number"||t!="symbol"&&ch.test(r))&&r>-1&&r%1==0&&r<e}function Li(r,e,t){e=="__proto__"&&Hn?Hn(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}function tn(r,e){return r===e||r!==r&&e!==e}var uh=Object.prototype,hh=uh.hasOwnProperty;function ol(r,e,t){var n=r[e];(!(hh.call(r,e)&&tn(n,t))||t===void 0&&!(e in r))&&Li(r,e,t)}function dh(r,e,t,n){var s=!t;t||(t={});for(var i=-1,a=e.length;++i<a;){var l=e[i],c=void 0;c===void 0&&(c=r[l]),s?Li(t,l,c):ol(t,l,c)}return t}var Aa=Math.max;function fh(r,e,t){return e=Aa(e===void 0?r.length-1:e,0),function(){for(var n=arguments,s=-1,i=Aa(n.length-e,0),a=Array(i);++s<i;)a[s]=n[e+s];s=-1;for(var l=Array(e+1);++s<e;)l[s]=n[s];return l[e]=t(a),Ju(r,this,l)}}function ph(r,e){return ah(fh(r,e,il),r+"")}var gh=9007199254740991;function ll(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=gh}function Yn(r){return r!=null&&ll(r.length)&&!Ri(r)}function mh(r,e,t){if(!Nt(t))return!1;var n=typeof e;return(n=="number"?Yn(t)&&al(e,t.length):n=="string"&&e in t)?tn(t[e],r):!1}function bh(r){return ph(function(e,t){var n=-1,s=t.length,i=s>1?t[s-1]:void 0,a=s>2?t[2]:void 0;for(i=r.length>3&&typeof i=="function"?(s--,i):void 0,a&&mh(t[0],t[1],a)&&(i=s<3?void 0:i,s=1),e=Object(e);++n<s;){var l=t[n];l&&r(e,l,n,i)}return e})}var vh=Object.prototype;function ki(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||vh;return r===t}function yh(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var Eh="[object Arguments]";function Sa(r){return ct(r)&&gr(r)==Eh}var cl=Object.prototype,xh=cl.hasOwnProperty,wh=cl.propertyIsEnumerable,hi=Sa(function(){return arguments}())?Sa:function(r){return ct(r)&&xh.call(r,"callee")&&!wh.call(r,"callee")};function Nh(){return!1}var ul=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_a=ul&&typeof module=="object"&&module&&!module.nodeType&&module,Th=_a&&_a.exports===ul,Ca=Th?tt.Buffer:void 0,Ah=Ca?Ca.isBuffer:void 0,Kr=Ah||Nh,Sh="[object Arguments]",_h="[object Array]",Ch="[object Boolean]",Oh="[object Date]",Rh="[object Error]",Lh="[object Function]",kh="[object Map]",jh="[object Number]",Ih="[object Object]",qh="[object RegExp]",Dh="[object Set]",Mh="[object String]",Ph="[object WeakMap]",Bh="[object ArrayBuffer]",$h="[object DataView]",Fh="[object Float32Array]",Uh="[object Float64Array]",Hh="[object Int8Array]",zh="[object Int16Array]",Gh="[object Int32Array]",Vh="[object Uint8Array]",Wh="[object Uint8ClampedArray]",Kh="[object Uint16Array]",Yh="[object Uint32Array]",fe={};fe[Fh]=fe[Uh]=fe[Hh]=fe[zh]=fe[Gh]=fe[Vh]=fe[Wh]=fe[Kh]=fe[Yh]=!0;fe[Sh]=fe[_h]=fe[Bh]=fe[Ch]=fe[$h]=fe[Oh]=fe[Rh]=fe[Lh]=fe[kh]=fe[jh]=fe[Ih]=fe[qh]=fe[Dh]=fe[Mh]=fe[Ph]=!1;function Xh(r){return ct(r)&&ll(r.length)&&!!fe[gr(r)]}function ji(r){return function(e){return r(e)}}var hl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gr=hl&&typeof module=="object"&&module&&!module.nodeType&&module,Zh=Gr&&Gr.exports===hl,Xs=Zh&&nl.process,fr=function(){try{var r=Gr&&Gr.require&&Gr.require("util").types;return r||Xs&&Xs.binding&&Xs.binding("util")}catch{}}(),Oa=fr&&fr.isTypedArray,Ii=Oa?ji(Oa):Xh,Jh=Object.prototype,Qh=Jh.hasOwnProperty;function dl(r,e){var t=It(r),n=!t&&hi(r),s=!t&&!n&&Kr(r),i=!t&&!n&&!s&&Ii(r),a=t||n||s||i,l=a?yh(r.length,String):[],c=l.length;for(var u in r)(e||Qh.call(r,u))&&!(a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||al(u,c)))&&l.push(u);return l}function fl(r,e){return function(t){return r(e(t))}}var ed=fl(Object.keys,Object),td=Object.prototype,rd=td.hasOwnProperty;function nd(r){if(!ki(r))return ed(r);var e=[];for(var t in Object(r))rd.call(r,t)&&t!="constructor"&&e.push(t);return e}function sd(r){return Yn(r)?dl(r):nd(r)}function id(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var ad=Object.prototype,od=ad.hasOwnProperty;function ld(r){if(!Nt(r))return id(r);var e=ki(r),t=[];for(var n in r)n=="constructor"&&(e||!od.call(r,n))||t.push(n);return t}function pl(r){return Yn(r)?dl(r,!0):ld(r)}var Yr=$t(Object,"create");function cd(){this.__data__=Yr?Yr(null):{},this.size=0}function ud(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var hd="__lodash_hash_undefined__",dd=Object.prototype,fd=dd.hasOwnProperty;function pd(r){var e=this.__data__;if(Yr){var t=e[r];return t===hd?void 0:t}return fd.call(e,r)?e[r]:void 0}var gd=Object.prototype,md=gd.hasOwnProperty;function bd(r){var e=this.__data__;return Yr?e[r]!==void 0:md.call(e,r)}var vd="__lodash_hash_undefined__";function yd(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=Yr&&e===void 0?vd:e,this}function qt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}qt.prototype.clear=cd;qt.prototype.delete=ud;qt.prototype.get=pd;qt.prototype.has=bd;qt.prototype.set=yd;function Ed(){this.__data__=[],this.size=0}function Xn(r,e){for(var t=r.length;t--;)if(tn(r[t][0],e))return t;return-1}var xd=Array.prototype,wd=xd.splice;function Nd(r){var e=this.__data__,t=Xn(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():wd.call(e,t,1),--this.size,!0}function Td(r){var e=this.__data__,t=Xn(e,r);return t<0?void 0:e[t][1]}function Ad(r){return Xn(this.__data__,r)>-1}function Sd(r,e){var t=this.__data__,n=Xn(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}function ht(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}ht.prototype.clear=Ed;ht.prototype.delete=Nd;ht.prototype.get=Td;ht.prototype.has=Ad;ht.prototype.set=Sd;var Xr=$t(tt,"Map");function _d(){this.size=0,this.__data__={hash:new qt,map:new(Xr||ht),string:new qt}}function Cd(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}function Zn(r,e){var t=r.__data__;return Cd(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Od(r){var e=Zn(this,r).delete(r);return this.size-=e?1:0,e}function Rd(r){return Zn(this,r).get(r)}function Ld(r){return Zn(this,r).has(r)}function kd(r,e){var t=Zn(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}function Ft(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Ft.prototype.clear=_d;Ft.prototype.delete=Od;Ft.prototype.get=Rd;Ft.prototype.has=Ld;Ft.prototype.set=kd;function jd(r,e){for(var t=-1,n=e.length,s=r.length;++t<n;)r[s+t]=e[t];return r}var gl=fl(Object.getPrototypeOf,Object),Id="[object Object]",qd=Function.prototype,Dd=Object.prototype,ml=qd.toString,Md=Dd.hasOwnProperty,Pd=ml.call(Object);function Bd(r){if(!ct(r)||gr(r)!=Id)return!1;var e=gl(r);if(e===null)return!0;var t=Md.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&ml.call(t)==Pd}function $d(){this.__data__=new ht,this.size=0}function Fd(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}function Ud(r){return this.__data__.get(r)}function Hd(r){return this.__data__.has(r)}var zd=200;function Gd(r,e){var t=this.__data__;if(t instanceof ht){var n=t.__data__;if(!Xr||n.length<zd-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new Ft(n)}return t.set(r,e),this.size=t.size,this}function Qe(r){var e=this.__data__=new ht(r);this.size=e.size}Qe.prototype.clear=$d;Qe.prototype.delete=Fd;Qe.prototype.get=Ud;Qe.prototype.has=Hd;Qe.prototype.set=Gd;var bl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ra=bl&&typeof module=="object"&&module&&!module.nodeType&&module,Vd=Ra&&Ra.exports===bl,La=Vd?tt.Buffer:void 0,ka=La?La.allocUnsafe:void 0;function vl(r,e){if(e)return r.slice();var t=r.length,n=ka?ka(t):new r.constructor(t);return r.copy(n),n}function Wd(r,e){for(var t=-1,n=r==null?0:r.length,s=0,i=[];++t<n;){var a=r[t];e(a,t,r)&&(i[s++]=a)}return i}function Kd(){return[]}var Yd=Object.prototype,Xd=Yd.propertyIsEnumerable,ja=Object.getOwnPropertySymbols,Zd=ja?function(r){return r==null?[]:(r=Object(r),Wd(ja(r),function(e){return Xd.call(r,e)}))}:Kd;function Jd(r,e,t){var n=e(r);return It(r)?n:jd(n,t(r))}function di(r){return Jd(r,sd,Zd)}var fi=$t(tt,"DataView"),pi=$t(tt,"Promise"),gi=$t(tt,"Set"),Ia="[object Map]",Qd="[object Object]",qa="[object Promise]",Da="[object Set]",Ma="[object WeakMap]",Pa="[object DataView]",ef=Bt(fi),tf=Bt(Xr),rf=Bt(pi),nf=Bt(gi),sf=Bt(ui),Ue=gr;(fi&&Ue(new fi(new ArrayBuffer(1)))!=Pa||Xr&&Ue(new Xr)!=Ia||pi&&Ue(pi.resolve())!=qa||gi&&Ue(new gi)!=Da||ui&&Ue(new ui)!=Ma)&&(Ue=function(r){var e=gr(r),t=e==Qd?r.constructor:void 0,n=t?Bt(t):"";if(n)switch(n){case ef:return Pa;case tf:return Ia;case rf:return qa;case nf:return Da;case sf:return Ma}return e});var af=Object.prototype,of=af.hasOwnProperty;function lf(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&of.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var zn=tt.Uint8Array;function qi(r){var e=new r.constructor(r.byteLength);return new zn(e).set(new zn(r)),e}function cf(r,e){var t=qi(r.buffer);return new r.constructor(t,r.byteOffset,r.byteLength)}var uf=/\w*$/;function hf(r){var e=new r.constructor(r.source,uf.exec(r));return e.lastIndex=r.lastIndex,e}var Ba=wt?wt.prototype:void 0,$a=Ba?Ba.valueOf:void 0;function df(r){return $a?Object($a.call(r)):{}}function yl(r,e){var t=e?qi(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var ff="[object Boolean]",pf="[object Date]",gf="[object Map]",mf="[object Number]",bf="[object RegExp]",vf="[object Set]",yf="[object String]",Ef="[object Symbol]",xf="[object ArrayBuffer]",wf="[object DataView]",Nf="[object Float32Array]",Tf="[object Float64Array]",Af="[object Int8Array]",Sf="[object Int16Array]",_f="[object Int32Array]",Cf="[object Uint8Array]",Of="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Lf="[object Uint32Array]";function kf(r,e,t){var n=r.constructor;switch(e){case xf:return qi(r);case ff:case pf:return new n(+r);case wf:return cf(r);case Nf:case Tf:case Af:case Sf:case _f:case Cf:case Of:case Rf:case Lf:return yl(r,t);case gf:return new n;case mf:case yf:return new n(r);case bf:return hf(r);case vf:return new n;case Ef:return df(r)}}function El(r){return typeof r.constructor=="function"&&!ki(r)?Zu(gl(r)):{}}var jf="[object Map]";function If(r){return ct(r)&&Ue(r)==jf}var Fa=fr&&fr.isMap,qf=Fa?ji(Fa):If,Df="[object Set]";function Mf(r){return ct(r)&&Ue(r)==Df}var Ua=fr&&fr.isSet,Pf=Ua?ji(Ua):Mf,Bf=1,xl="[object Arguments]",$f="[object Array]",Ff="[object Boolean]",Uf="[object Date]",Hf="[object Error]",wl="[object Function]",zf="[object GeneratorFunction]",Gf="[object Map]",Vf="[object Number]",Nl="[object Object]",Wf="[object RegExp]",Kf="[object Set]",Yf="[object String]",Xf="[object Symbol]",Zf="[object WeakMap]",Jf="[object ArrayBuffer]",Qf="[object DataView]",ep="[object Float32Array]",tp="[object Float64Array]",rp="[object Int8Array]",np="[object Int16Array]",sp="[object Int32Array]",ip="[object Uint8Array]",ap="[object Uint8ClampedArray]",op="[object Uint16Array]",lp="[object Uint32Array]",de={};de[xl]=de[$f]=de[Jf]=de[Qf]=de[Ff]=de[Uf]=de[ep]=de[tp]=de[rp]=de[np]=de[sp]=de[Gf]=de[Vf]=de[Nl]=de[Wf]=de[Kf]=de[Yf]=de[Xf]=de[ip]=de[ap]=de[op]=de[lp]=!0;de[Hf]=de[wl]=de[Zf]=!1;function $n(r,e,t,n,s,i){var a,l=e&Bf;if(a!==void 0)return a;if(!Nt(r))return r;var c=It(r);if(c)a=lf(r);else{var u=Ue(r),h=u==wl||u==zf;if(Kr(r))return vl(r,l);if(u==Nl||u==xl||h&&!s)a=h?{}:El(r);else{if(!de[u])return s?r:{};a=kf(r,u,l)}}i||(i=new Qe);var g=i.get(r);if(g)return g;i.set(r,a),Pf(r)?r.forEach(function(x){a.add($n(x,e,t,x,r,i))}):qf(r)&&r.forEach(function(x,y){a.set(y,$n(x,e,t,y,r,i))});var f=di,b=c?void 0:f(r);return oh(b||r,function(x,y){b&&(y=x,x=r[y]),ol(a,y,$n(x,e,t,y,r,i))}),a}var cp=1,up=4;function ur(r){return $n(r,cp|up)}var hp="__lodash_hash_undefined__";function dp(r){return this.__data__.set(r,hp),this}function fp(r){return this.__data__.has(r)}function Gn(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new Ft;++e<t;)this.add(r[e])}Gn.prototype.add=Gn.prototype.push=dp;Gn.prototype.has=fp;function pp(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}function gp(r,e){return r.has(e)}var mp=1,bp=2;function Tl(r,e,t,n,s,i){var a=t&mp,l=r.length,c=e.length;if(l!=c&&!(a&&c>l))return!1;var u=i.get(r),h=i.get(e);if(u&&h)return u==e&&h==r;var g=-1,f=!0,b=t&bp?new Gn:void 0;for(i.set(r,e),i.set(e,r);++g<l;){var x=r[g],y=e[g];if(n)var N=a?n(y,x,g,e,r,i):n(x,y,g,r,e,i);if(N!==void 0){if(N)continue;f=!1;break}if(b){if(!pp(e,function(S,_){if(!gp(b,_)&&(x===S||s(x,S,t,n,i)))return b.push(_)})){f=!1;break}}else if(!(x===y||s(x,y,t,n,i))){f=!1;break}}return i.delete(r),i.delete(e),f}function vp(r){var e=-1,t=Array(r.size);return r.forEach(function(n,s){t[++e]=[s,n]}),t}function yp(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var Ep=1,xp=2,wp="[object Boolean]",Np="[object Date]",Tp="[object Error]",Ap="[object Map]",Sp="[object Number]",_p="[object RegExp]",Cp="[object Set]",Op="[object String]",Rp="[object Symbol]",Lp="[object ArrayBuffer]",kp="[object DataView]",Ha=wt?wt.prototype:void 0,Zs=Ha?Ha.valueOf:void 0;function jp(r,e,t,n,s,i,a){switch(t){case kp:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case Lp:return!(r.byteLength!=e.byteLength||!i(new zn(r),new zn(e)));case wp:case Np:case Sp:return tn(+r,+e);case Tp:return r.name==e.name&&r.message==e.message;case _p:case Op:return r==e+"";case Ap:var l=vp;case Cp:var c=n&Ep;if(l||(l=yp),r.size!=e.size&&!c)return!1;var u=a.get(r);if(u)return u==e;n|=xp,a.set(r,e);var h=Tl(l(r),l(e),n,s,i,a);return a.delete(r),h;case Rp:if(Zs)return Zs.call(r)==Zs.call(e)}return!1}var Ip=1,qp=Object.prototype,Dp=qp.hasOwnProperty;function Mp(r,e,t,n,s,i){var a=t&Ip,l=di(r),c=l.length,u=di(e),h=u.length;if(c!=h&&!a)return!1;for(var g=c;g--;){var f=l[g];if(!(a?f in e:Dp.call(e,f)))return!1}var b=i.get(r),x=i.get(e);if(b&&x)return b==e&&x==r;var y=!0;i.set(r,e),i.set(e,r);for(var N=a;++g<c;){f=l[g];var S=r[f],_=e[f];if(n)var j=a?n(_,S,f,e,r,i):n(S,_,f,r,e,i);if(!(j===void 0?S===_||s(S,_,t,n,i):j)){y=!1;break}N||(N=f=="constructor")}if(y&&!N){var $=r.constructor,m=e.constructor;$!=m&&"constructor"in r&&"constructor"in e&&!(typeof $=="function"&&$ instanceof $&&typeof m=="function"&&m instanceof m)&&(y=!1)}return i.delete(r),i.delete(e),y}var Pp=1,za="[object Arguments]",Ga="[object Array]",Rn="[object Object]",Bp=Object.prototype,Va=Bp.hasOwnProperty;function $p(r,e,t,n,s,i){var a=It(r),l=It(e),c=a?Ga:Ue(r),u=l?Ga:Ue(e);c=c==za?Rn:c,u=u==za?Rn:u;var h=c==Rn,g=u==Rn,f=c==u;if(f&&Kr(r)){if(!Kr(e))return!1;a=!0,h=!1}if(f&&!h)return i||(i=new Qe),a||Ii(r)?Tl(r,e,t,n,s,i):jp(r,e,c,t,n,s,i);if(!(t&Pp)){var b=h&&Va.call(r,"__wrapped__"),x=g&&Va.call(e,"__wrapped__");if(b||x){var y=b?r.value():r,N=x?e.value():e;return i||(i=new Qe),s(y,N,t,n,i)}}return f?(i||(i=new Qe),Mp(r,e,t,n,s,i)):!1}function Al(r,e,t,n,s){return r===e?!0:r==null||e==null||!ct(r)&&!ct(e)?r!==r&&e!==e:$p(r,e,t,n,Al,s)}function Fp(r){return function(e,t,n){for(var s=-1,i=Object(e),a=n(e),l=a.length;l--;){var c=a[++s];if(t(i[c],c,i)===!1)break}return e}}var Up=Fp();function mi(r,e,t){(t!==void 0&&!tn(r[e],t)||t===void 0&&!(e in r))&&Li(r,e,t)}function Hp(r){return ct(r)&&Yn(r)}function bi(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}function zp(r){return dh(r,pl(r))}function Gp(r,e,t,n,s,i,a){var l=bi(r,t),c=bi(e,t),u=a.get(c);if(u){mi(r,t,u);return}var h=i?i(l,c,t+"",r,e,a):void 0,g=h===void 0;if(g){var f=It(c),b=!f&&Kr(c),x=!f&&!b&&Ii(c);h=c,f||b||x?It(l)?h=l:Hp(l)?h=Qu(l):b?(g=!1,h=vl(c,!0)):x?(g=!1,h=yl(c,!0)):h=[]:Bd(c)||hi(c)?(h=l,hi(l)?h=zp(l):(!Nt(l)||Ri(l))&&(h=El(c))):g=!1}g&&(a.set(c,h),s(h,c,n,i,a),a.delete(c)),mi(r,t,h)}function Sl(r,e,t,n,s){r!==e&&Up(e,function(i,a){if(s||(s=new Qe),Nt(i))Gp(r,e,a,t,Sl,n,s);else{var l=n?n(bi(r,a),i,a+"",r,e,s):void 0;l===void 0&&(l=i),mi(r,a,l)}},pl)}function mt(r,e){return Al(r,e)}var Et=bh(function(r,e,t){Sl(r,e,t)}),V=(r=>(r[r.TYPE=3]="TYPE",r[r.LEVEL=12]="LEVEL",r[r.ATTRIBUTE=13]="ATTRIBUTE",r[r.BLOT=14]="BLOT",r[r.INLINE=7]="INLINE",r[r.BLOCK=11]="BLOCK",r[r.BLOCK_BLOT=10]="BLOCK_BLOT",r[r.INLINE_BLOT=6]="INLINE_BLOT",r[r.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",r[r.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",r[r.ANY=15]="ANY",r))(V||{});class et{constructor(e,t,n={}){this.attrName=e,this.keyName=t;const s=V.TYPE&V.ATTRIBUTE;this.scope=n.scope!=null?n.scope&V.LEVEL|s:V.ATTRIBUTE,n.whitelist!=null&&(this.whitelist=n.whitelist)}static keys(e){return Array.from(e.attributes).map(t=>t.name)}add(e,t){return this.canAdd(e,t)?(e.setAttribute(this.keyName,t),!0):!1}canAdd(e,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class hr extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const _l=class vi{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let n=null;try{n=e.parentNode}catch{return null}return this.find(n,t)}return null}create(e,t,n){const s=this.query(t);if(s==null)throw new hr(`Unable to create ${t} blot`);const i=s,a=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(n),l=new i(e,a,n);return vi.blots.set(l.domNode,l),l}find(e,t=!1){return vi.find(e,t)}query(e,t=V.ANY){let n;return typeof e=="string"?n=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?n=this.types.text:typeof e=="number"?e&V.LEVEL&V.BLOCK?n=this.types.block:e&V.LEVEL&V.INLINE&&(n=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(s=>(n=this.classes[s],!!n)),n=n||this.tags[e.tagName]),n==null?null:"scope"in n&&t&V.LEVEL&n.scope&&t&V.TYPE&n.scope?n:null}register(...e){return e.map(t=>{const n="blotName"in t,s="attrName"in t;if(!n&&!s)throw new hr("Invalid definition");if(n&&t.blotName==="abstract")throw new hr("Cannot register abstract class");const i=n?t.blotName:s?t.attrName:void 0;return this.types[i]=t,s?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):n&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(a=>a.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(a=>{(this.tags[a]==null||t.className==null)&&(this.tags[a]=t)}))),t})}};_l.blots=new WeakMap;let pr=_l;function Wa(r,e){return(r.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${e}-`)===0)}class Vp extends et{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(e,t){return this.canAdd(e,t)?(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0):!1}remove(e){Wa(e,this.keyName).forEach(t=>{e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const t=(Wa(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}}const We=Vp;function Js(r){const e=r.split("-"),t=e.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("");return e[0]+t}class Wp extends et{static keys(e){return(e.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(e,t){return this.canAdd(e,t)?(e.style[Js(this.keyName)]=t,!0):!1}remove(e){e.style[Js(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[Js(this.keyName)];return this.canAdd(e,t)?t:""}}const Tt=Wp;class Kp{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=pr.find(this.domNode);if(e==null)return;const t=et.keys(this.domNode),n=We.keys(this.domNode),s=Tt.keys(this.domNode);t.concat(n).concat(s).forEach(i=>{const a=e.scroll.query(i,V.ATTRIBUTE);a instanceof et&&(this.attributes[a.attrName]=a)})}copy(e){Object.keys(this.attributes).forEach(t=>{const n=this.attributes[t].value(this.domNode);e.format(t,n)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e),{})}}const Jn=Kp,Cl=class{constructor(e,t){this.scroll=e,this.domNode=t,pr.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new hr("Blot definition missing tagName");let t,n;return Array.isArray(this.tagName)?(typeof e=="string"?(n=e.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):typeof e=="number"&&(n=e),typeof n=="number"?t=document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?t=document.createElement(n):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),pr.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,n,s){const i=this.isolate(e,t);if(this.scroll.query(n,V.BLOT)!=null&&s)i.wrap(n,s);else if(this.scroll.query(n,V.ATTRIBUTE)!=null){const a=this.scroll.create(this.statics.scope);i.wrap(a),a.format(n,s)}}insertAt(e,t,n){const s=n==null?this.scroll.create("text",t):this.scroll.create(t,n),i=this.split(e);this.parent.insertBefore(s,i||void 0)}isolate(e,t){const n=this.split(e);if(n==null)throw new Error("Attempt to isolate at end");return n.split(t),n}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(n,this.next||void 0),typeof n.appendChild!="function")throw new hr(`Cannot wrap ${e}`);return n.appendChild(this),n}};Cl.blotName="abstract";let Ol=Cl;const Rl=class extends Ol{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Rl.scope=V.INLINE_BLOT;let Yp=Rl;const Ae=Yp;class Xp{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let n=t();for(;n&&e>0;)e-=1,n=t();return n}contains(e){const t=this.iterator();let n=t();for(;n;){if(n===e)return!0;n=t()}return!1}indexOf(e){const t=this.iterator();let n=t(),s=0;for(;n;){if(n===e)return s;s+=1,n=t()}return-1}insertBefore(e,t){e!=null&&(this.remove(e),e.next=t,t!=null?(e.prev=t.prev,t.prev!=null&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,n=this.head;for(;n!=null;){if(n===e)return t;t+=n.length(),n=n.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return e!=null&&(e=e.next),t}}find(e,t=!1){const n=this.iterator();let s=n();for(;s;){const i=s.length();if(e<i||t&&e===i&&(s.next==null||s.next.length()!==0))return[s,e];e-=i,s=n()}return[null,0]}forEach(e){const t=this.iterator();let n=t();for(;n;)e(n),n=t()}forEachAt(e,t,n){if(t<=0)return;const[s,i]=this.find(e);let a=e-i;const l=this.iterator(s);let c=l();for(;c&&a<e+t;){const u=c.length();e>a?n(c,e-a,Math.min(t,a+u-e)):n(c,0,Math.min(u,e+t-a)),a+=u,c=l()}}map(e){return this.reduce((t,n)=>(t.push(e(n)),t),[])}reduce(e,t){const n=this.iterator();let s=n();for(;s;)t=e(t,s),s=n();return t}}function Ka(r,e){const t=e.find(r);if(t)return t;try{return e.create(r)}catch{const n=e.create(V.INLINE);return Array.from(r.childNodes).forEach(s=>{n.domNode.appendChild(s)}),r.parentNode&&r.parentNode.replaceChild(n.domNode,r),n.attach(),n}}const Ll=class gt extends Ol{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,gt.uiClass&&this.uiNode.classList.add(gt.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new Xp,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const t=Ka(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof hr)return;throw t}})}deleteAt(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,(n,s,i)=>{n.deleteAt(s,i)})}descendant(e,t=0){const[n,s]=this.children.find(t);return e.blotName==null&&e(n)||e.blotName!=null&&n instanceof e?[n,s]:n instanceof gt?n.descendant(e,s):[null,-1]}descendants(e,t=0,n=Number.MAX_VALUE){let s=[],i=n;return this.children.forEachAt(t,n,(a,l,c)=>{(e.blotName==null&&e(a)||e.blotName!=null&&a instanceof e)&&s.push(a),a instanceof gt&&(s=s.concat(a.descendants(e,l,i))),i-=c}),s}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(t=>{e||this.statics.allowedChildren.some(n=>t instanceof n)||(t.statics.scope===V.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),e=!0):t instanceof gt?t.unwrap():t.remove())})}formatAt(e,t,n,s){this.children.forEachAt(e,t,(i,a,l)=>{i.formatAt(a,l,n,s)})}insertAt(e,t,n){const[s,i]=this.children.find(e);if(s)s.insertAt(i,t,n);else{const a=n==null?this.scroll.create("text",t):this.scroll.create(t,n);this.appendChild(a)}}insertBefore(e,t){e.parent!=null&&e.parent.children.remove(e);let n=null;this.children.insertBefore(e,t||null),e.parent=this,t!=null&&(n=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(e.domNode,n),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(n=>{e.insertBefore(n,t)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,t=!1){const[n,s]=this.children.find(e,t),i=[[this,e]];return n instanceof gt?i.concat(n.path(s,t)):(n!=null&&i.push([n,s]),i)}removeChild(e){this.children.remove(e)}replaceWith(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;return n instanceof gt&&this.moveChildren(n),super.replaceWith(n)}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(e,this.length(),(s,i,a)=>{const l=s.split(i,t);l!=null&&n.appendChild(l)}),n}splitAfter(e){const t=this.clone();for(;e.next!=null;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const n=[],s=[];e.forEach(i=>{i.target===this.domNode&&i.type==="childList"&&(n.push(...i.addedNodes),s.push(...i.removedNodes))}),s.forEach(i=>{if(i.parentNode!=null&&i.tagName!=="IFRAME"&&document.body.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const a=this.scroll.find(i);a!=null&&(a.domNode.parentNode==null||a.domNode.parentNode===this.domNode)&&a.detach()}),n.filter(i=>i.parentNode===this.domNode&&i!==this.uiNode).sort((i,a)=>i===a?0:i.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(i=>{let a=null;i.nextSibling!=null&&(a=this.scroll.find(i.nextSibling));const l=Ka(i,this.scroll);(l.next!==a||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,a||void 0))}),this.enforceAllowedChildren()}};Ll.uiClass="";let Zp=Ll;const Ge=Zp;function Jp(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(r[t]!==e[t])return!1;return!0}const ir=class ar extends Ge{static create(e){return super.create(e)}static formats(e,t){const n=t.query(ar.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Jn(this.domNode)}format(e,t){if(e===this.statics.blotName&&!t)this.children.forEach(n=>{n instanceof ar||(n=n.wrap(ar.blotName,!0)),this.attributes.copy(n)}),this.unwrap();else{const n=this.scroll.query(e,V.INLINE);if(n==null)return;n instanceof et?this.attributes.attribute(n,t):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)}}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,s){this.formats()[n]!=null||this.scroll.query(n,V.ATTRIBUTE)?this.isolate(e,t).format(n,s):super.formatAt(e,t,n,s)}optimize(e){super.optimize(e);const t=this.formats();if(Object.keys(t).length===0)return this.unwrap();const n=this.next;n instanceof ar&&n.prev===this&&Jp(t,n.formats())&&(n.moveChildren(this),n.remove())}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}wrap(e,t){const n=super.wrap(e,t);return n instanceof ar&&this.attributes.move(n),n}};ir.allowedChildren=[ir,Ae],ir.blotName="inline",ir.scope=V.INLINE_BLOT,ir.tagName="SPAN";let Qp=ir;const Di=Qp,or=class yi extends Ge{static create(e){return super.create(e)}static formats(e,t){const n=t.query(yi.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Jn(this.domNode)}format(e,t){const n=this.scroll.query(e,V.BLOCK);n!=null&&(n instanceof et?this.attributes.attribute(n,t):e===this.statics.blotName&&!t?this.replaceWith(yi.blotName):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,s){this.scroll.query(n,V.BLOCK)!=null?this.format(n,s):super.formatAt(e,t,n,s)}insertAt(e,t,n){if(n==null||this.scroll.query(t,V.INLINE)!=null)super.insertAt(e,t,n);else{const s=this.split(e);if(s!=null){const i=this.scroll.create(t,n);s.parent.insertBefore(i,s)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}};or.blotName="block",or.scope=V.BLOCK_BLOT,or.tagName="P",or.allowedChildren=[Di,or,Ae];let eg=or;const Zr=eg,Ei=class extends Ge{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,n,s){super.formatAt(e,t,n,s),this.enforceAllowedChildren()}insertAt(e,t,n){super.insertAt(e,t,n),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Ei.blotName="container",Ei.scope=V.BLOCK_BLOT;let tg=Ei;const Qn=tg;class rg extends Ae{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,n,s){e===0&&t===this.length()?this.format(n,s):super.formatAt(e,t,n,s)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const ke=rg,ng={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},sg=100,lr=class extends Ge{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(n=>{this.update(n)}),this.observer.observe(this.domNode,ng),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const n=this.registry.find(e,t);return n?n.scroll===this?n:t?this.find(n.scroll.domNode.parentNode,!0):null:null}query(e,t=V.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),e===0&&t===this.length()?this.children.forEach(n=>{n.remove()}):super.deleteAt(e,t)}formatAt(e,t,n,s){this.update(),super.formatAt(e,t,n,s)}insertAt(e,t,n){this.update(),super.insertAt(e,t,n)}optimize(e=[],t={}){super.optimize(t);const n=t.mutationsMap||new WeakMap;let s=Array.from(this.observer.takeRecords());for(;s.length>0;)e.push(s.pop());const i=(c,u=!0)=>{c==null||c===this||c.domNode.parentNode!=null&&(n.has(c.domNode)||n.set(c.domNode,[]),u&&i(c.parent))},a=c=>{n.has(c.domNode)&&(c instanceof Ge&&c.children.forEach(a),n.delete(c.domNode),c.optimize(t))};let l=e;for(let c=0;l.length>0;c+=1){if(c>=sg)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(u=>{const h=this.find(u.target,!0);h!=null&&(h.domNode===u.target&&(u.type==="childList"?(i(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(g=>{const f=this.find(g,!1);i(f,!1),f instanceof Ge&&f.children.forEach(b=>{i(b,!1)})})):u.type==="attributes"&&i(h.prev)),i(h))}),this.children.forEach(a),l=Array.from(this.observer.takeRecords()),s=l.slice();s.length>0;)e.push(s.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const n=new WeakMap;e.map(s=>{const i=this.find(s.target,!0);return i==null?null:n.has(i.domNode)?(n.get(i.domNode).push(s),null):(n.set(i.domNode,[s]),i)}).forEach(s=>{s!=null&&s!==this&&n.has(s.domNode)&&s.update(n.get(s.domNode)||[],t)}),t.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),t),this.optimize(e,t)}};lr.blotName="scroll",lr.defaultChild=Zr,lr.allowedChildren=[Zr,Qn],lr.scope=V.BLOCK_BLOT,lr.tagName="DIV";let ig=lr;const Mi=ig,xi=class kl extends Ae{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,n){n==null?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,n)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof kl&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(e,t){e.some(n=>n.type==="characterData"&&n.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};xi.blotName="text",xi.scope=V.INLINE_BLOT;let ag=xi;const Vn=ag,og=Object.freeze(Object.defineProperty({__proto__:null,Attributor:et,AttributorStore:Jn,BlockBlot:Zr,ClassAttributor:We,ContainerBlot:Qn,EmbedBlot:ke,InlineBlot:Di,LeafBlot:Ae,ParentBlot:Ge,Registry:pr,Scope:V,ScrollBlot:Mi,StyleAttributor:Tt,TextBlot:Vn},Symbol.toStringTag,{value:"Module"}));var Ln={exports:{}},Qs,Ya;function lg(){if(Ya)return Qs;Ya=1;var r=-1,e=1,t=0;function n(v,q,w,O,D){if(v===q)return v?[[t,v]]:[];if(w!=null){var I=Z(v,q,w);if(I)return I}var M=l(v,q),U=v.substring(0,M);v=v.substring(M),q=q.substring(M),M=u(v,q);var W=v.substring(v.length-M);v=v.substring(0,v.length-M),q=q.substring(0,q.length-M);var A=s(v,q);return U&&A.unshift([t,U]),W&&A.push([t,W]),_(A,D),O&&g(A),A}function s(v,q){var w;if(!v)return[[e,q]];if(!q)return[[r,v]];var O=v.length>q.length?v:q,D=v.length>q.length?q:v,I=O.indexOf(D);if(I!==-1)return w=[[e,O.substring(0,I)],[t,D],[e,O.substring(I+D.length)]],v.length>q.length&&(w[0][0]=w[2][0]=r),w;if(D.length===1)return[[r,v],[e,q]];var M=h(v,q);if(M){var U=M[0],W=M[1],A=M[2],B=M[3],F=M[4],X=n(U,A),J=n(W,B);return X.concat([[t,F]],J)}return i(v,q)}function i(v,q){for(var w=v.length,O=q.length,D=Math.ceil((w+O)/2),I=D,M=2*D,U=new Array(M),W=new Array(M),A=0;A<M;A++)U[A]=-1,W[A]=-1;U[I+1]=0,W[I+1]=0;for(var B=w-O,F=B%2!==0,X=0,J=0,H=0,le=0,ue=0;ue<D;ue++){for(var K=-ue+X;K<=ue-J;K+=2){var re=I+K,ne;K===-ue||K!==ue&&U[re-1]<U[re+1]?ne=U[re+1]:ne=U[re-1]+1;for(var ie=ne-K;ne<w&&ie<O&&v.charAt(ne)===q.charAt(ie);)ne++,ie++;if(U[re]=ne,ne>w)J+=2;else if(ie>O)X+=2;else if(F){var ce=I+B-K;if(ce>=0&&ce<M&&W[ce]!==-1){var he=w-W[ce];if(ne>=he)return a(v,q,ne,ie)}}}for(var pe=-ue+H;pe<=ue-le;pe+=2){var ce=I+pe,he;pe===-ue||pe!==ue&&W[ce-1]<W[ce+1]?he=W[ce+1]:he=W[ce-1]+1;for(var xe=he-pe;he<w&&xe<O&&v.charAt(w-he-1)===q.charAt(O-xe-1);)he++,xe++;if(W[ce]=he,he>w)le+=2;else if(xe>O)H+=2;else if(!F){var re=I+B-pe;if(re>=0&&re<M&&U[re]!==-1){var ne=U[re],ie=I+ne-re;if(he=w-he,ne>=he)return a(v,q,ne,ie)}}}}return[[r,v],[e,q]]}function a(v,q,w,O){var D=v.substring(0,w),I=q.substring(0,O),M=v.substring(w),U=q.substring(O),W=n(D,I),A=n(M,U);return W.concat(A)}function l(v,q){if(!v||!q||v.charAt(0)!==q.charAt(0))return 0;for(var w=0,O=Math.min(v.length,q.length),D=O,I=0;w<D;)v.substring(I,D)==q.substring(I,D)?(w=D,I=w):O=D,D=Math.floor((O-w)/2+w);return j(v.charCodeAt(D-1))&&D--,D}function c(v,q){var w=v.length,O=q.length;if(w==0||O==0)return 0;w>O?v=v.substring(w-O):w<O&&(q=q.substring(0,w));var D=Math.min(w,O);if(v==q)return D;for(var I=0,M=1;;){var U=v.substring(D-M),W=q.indexOf(U);if(W==-1)return I;M+=W,(W==0||v.substring(D-M)==q.substring(0,M))&&(I=M,M++)}}function u(v,q){if(!v||!q||v.slice(-1)!==q.slice(-1))return 0;for(var w=0,O=Math.min(v.length,q.length),D=O,I=0;w<D;)v.substring(v.length-D,v.length-I)==q.substring(q.length-D,q.length-I)?(w=D,I=w):O=D,D=Math.floor((O-w)/2+w);return $(v.charCodeAt(v.length-D))&&D--,D}function h(v,q){var w=v.length>q.length?v:q,O=v.length>q.length?q:v;if(w.length<4||O.length*2<w.length)return null;function D(J,H,le){for(var ue=J.substring(le,le+Math.floor(J.length/4)),K=-1,re="",ne,ie,ce,he;(K=H.indexOf(ue,K+1))!==-1;){var pe=l(J.substring(le),H.substring(K)),xe=u(J.substring(0,le),H.substring(0,K));re.length<xe+pe&&(re=H.substring(K-xe,K)+H.substring(K,K+pe),ne=J.substring(0,le-xe),ie=J.substring(le+pe),ce=H.substring(0,K-xe),he=H.substring(K+pe))}return re.length*2>=J.length?[ne,ie,ce,he,re]:null}var I=D(w,O,Math.ceil(w.length/4)),M=D(w,O,Math.ceil(w.length/2)),U;if(!I&&!M)return null;M?I?U=I[4].length>M[4].length?I:M:U=M:U=I;var W,A,B,F;v.length>q.length?(W=U[0],A=U[1],B=U[2],F=U[3]):(B=U[0],F=U[1],W=U[2],A=U[3]);var X=U[4];return[W,A,B,F,X]}function g(v){for(var q=!1,w=[],O=0,D=null,I=0,M=0,U=0,W=0,A=0;I<v.length;)v[I][0]==t?(w[O++]=I,M=W,U=A,W=0,A=0,D=v[I][1]):(v[I][0]==e?W+=v[I][1].length:A+=v[I][1].length,D&&D.length<=Math.max(M,U)&&D.length<=Math.max(W,A)&&(v.splice(w[O-1],0,[r,D]),v[w[O-1]+1][0]=e,O--,O--,I=O>0?w[O-1]:-1,M=0,U=0,W=0,A=0,D=null,q=!0)),I++;for(q&&_(v),S(v),I=1;I<v.length;){if(v[I-1][0]==r&&v[I][0]==e){var B=v[I-1][1],F=v[I][1],X=c(B,F),J=c(F,B);X>=J?(X>=B.length/2||X>=F.length/2)&&(v.splice(I,0,[t,F.substring(0,X)]),v[I-1][1]=B.substring(0,B.length-X),v[I+1][1]=F.substring(X),I++):(J>=B.length/2||J>=F.length/2)&&(v.splice(I,0,[t,B.substring(0,J)]),v[I-1][0]=e,v[I-1][1]=F.substring(0,F.length-J),v[I+1][0]=r,v[I+1][1]=B.substring(J),I++),I++}I++}}var f=/[^a-zA-Z0-9]/,b=/\s/,x=/[\r\n]/,y=/\n\r?\n$/,N=/^\r?\n\r?\n/;function S(v){function q(J,H){if(!J||!H)return 6;var le=J.charAt(J.length-1),ue=H.charAt(0),K=le.match(f),re=ue.match(f),ne=K&&le.match(b),ie=re&&ue.match(b),ce=ne&&le.match(x),he=ie&&ue.match(x),pe=ce&&J.match(y),xe=he&&H.match(N);return pe||xe?5:ce||he?4:K&&!ne&&ie?3:ne||ie?2:K||re?1:0}for(var w=1;w<v.length-1;){if(v[w-1][0]==t&&v[w+1][0]==t){var O=v[w-1][1],D=v[w][1],I=v[w+1][1],M=u(O,D);if(M){var U=D.substring(D.length-M);O=O.substring(0,O.length-M),D=U+D.substring(0,D.length-M),I=U+I}for(var W=O,A=D,B=I,F=q(O,D)+q(D,I);D.charAt(0)===I.charAt(0);){O+=D.charAt(0),D=D.substring(1)+I.charAt(0),I=I.substring(1);var X=q(O,D)+q(D,I);X>=F&&(F=X,W=O,A=D,B=I)}v[w-1][1]!=W&&(W?v[w-1][1]=W:(v.splice(w-1,1),w--),v[w][1]=A,B?v[w+1][1]=B:(v.splice(w+1,1),w--))}w++}}function _(v,q){v.push([t,""]);for(var w=0,O=0,D=0,I="",M="",U;w<v.length;){if(w<v.length-1&&!v[w][1]){v.splice(w,1);continue}switch(v[w][0]){case e:D++,M+=v[w][1],w++;break;case r:O++,I+=v[w][1],w++;break;case t:var W=w-D-O-1;if(q){if(W>=0&&T(v[W][1])){var A=v[W][1].slice(-1);if(v[W][1]=v[W][1].slice(0,-1),I=A+I,M=A+M,!v[W][1]){v.splice(W,1),w--;var B=W-1;v[B]&&v[B][0]===e&&(D++,M=v[B][1]+M,B--),v[B]&&v[B][0]===r&&(O++,I=v[B][1]+I,B--),W=B}}if(m(v[w][1])){var A=v[w][1].charAt(0);v[w][1]=v[w][1].slice(1),I+=A,M+=A}}if(w<v.length-1&&!v[w][1]){v.splice(w,1);break}if(I.length>0||M.length>0){I.length>0&&M.length>0&&(U=l(M,I),U!==0&&(W>=0?v[W][1]+=M.substring(0,U):(v.splice(0,0,[t,M.substring(0,U)]),w++),M=M.substring(U),I=I.substring(U)),U=u(M,I),U!==0&&(v[w][1]=M.substring(M.length-U)+v[w][1],M=M.substring(0,M.length-U),I=I.substring(0,I.length-U)));var F=D+O;I.length===0&&M.length===0?(v.splice(w-F,F),w=w-F):I.length===0?(v.splice(w-F,F,[e,M]),w=w-F+1):M.length===0?(v.splice(w-F,F,[r,I]),w=w-F+1):(v.splice(w-F,F,[r,I],[e,M]),w=w-F+2)}w!==0&&v[w-1][0]===t?(v[w-1][1]+=v[w][1],v.splice(w,1)):w++,D=0,O=0,I="",M="";break}}v[v.length-1][1]===""&&v.pop();var X=!1;for(w=1;w<v.length-1;)v[w-1][0]===t&&v[w+1][0]===t&&(v[w][1].substring(v[w][1].length-v[w-1][1].length)===v[w-1][1]?(v[w][1]=v[w-1][1]+v[w][1].substring(0,v[w][1].length-v[w-1][1].length),v[w+1][1]=v[w-1][1]+v[w+1][1],v.splice(w-1,1),X=!0):v[w][1].substring(0,v[w+1][1].length)==v[w+1][1]&&(v[w-1][1]+=v[w+1][1],v[w][1]=v[w][1].substring(v[w+1][1].length)+v[w+1][1],v.splice(w+1,1),X=!0)),w++;X&&_(v,q)}function j(v){return v>=55296&&v<=56319}function $(v){return v>=56320&&v<=57343}function m(v){return $(v.charCodeAt(0))}function T(v){return j(v.charCodeAt(v.length-1))}function k(v){for(var q=[],w=0;w<v.length;w++)v[w][1].length>0&&q.push(v[w]);return q}function P(v,q,w,O){return T(v)||m(O)?null:k([[t,v],[r,q],[e,w],[t,O]])}function Z(v,q,w){var O=typeof w=="number"?{index:w,length:0}:w.oldRange,D=typeof w=="number"?null:w.newRange,I=v.length,M=q.length;if(O.length===0&&(D===null||D.length===0)){var U=O.index,W=v.slice(0,U),A=v.slice(U),B=D?D.index:null;e:{var F=U+M-I;if(B!==null&&B!==F||F<0||F>M)break e;var X=q.slice(0,F),J=q.slice(F);if(J!==A)break e;var H=Math.min(U,F),le=W.slice(0,H),ue=X.slice(0,H);if(le!==ue)break e;var K=W.slice(H),re=X.slice(H);return P(le,K,re,A)}e:{if(B!==null&&B!==U)break e;var ne=U,X=q.slice(0,ne),J=q.slice(ne);if(X!==W)break e;var ie=Math.min(I-ne,M-ne),ce=A.slice(A.length-ie),he=J.slice(J.length-ie);if(ce!==he)break e;var K=A.slice(0,A.length-ie),re=J.slice(0,J.length-ie);return P(W,K,re,ce)}}if(O.length>0&&D&&D.length===0)e:{var le=v.slice(0,O.index),ce=v.slice(O.index+O.length),H=le.length,ie=ce.length;if(M<H+ie)break e;var ue=q.slice(0,H),he=q.slice(M-ie);if(le!==ue||ce!==he)break e;var K=v.slice(H,I-ie),re=q.slice(H,M-ie);return P(le,K,re,ce)}return null}function te(v,q,w,O){return n(v,q,w,O,!0)}return te.INSERT=e,te.DELETE=r,te.EQUAL=t,Qs=te,Qs}var Ur={exports:{}};Ur.exports;var Xa;function jl(){return Xa||(Xa=1,function(r,e){var t=200,n="__lodash_hash_undefined__",s=9007199254740991,i="[object Arguments]",a="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",h="[object Function]",g="[object GeneratorFunction]",f="[object Map]",b="[object Number]",x="[object Object]",y="[object Promise]",N="[object RegExp]",S="[object Set]",_="[object String]",j="[object Symbol]",$="[object WeakMap]",m="[object ArrayBuffer]",T="[object DataView]",k="[object Float32Array]",P="[object Float64Array]",Z="[object Int8Array]",te="[object Int16Array]",v="[object Int32Array]",q="[object Uint8Array]",w="[object Uint8ClampedArray]",O="[object Uint16Array]",D="[object Uint32Array]",I=/[\\^$.*+?()[\]{}|]/g,M=/\w*$/,U=/^\[object .+?Constructor\]$/,W=/^(?:0|[1-9]\d*)$/,A={};A[i]=A[a]=A[m]=A[T]=A[l]=A[c]=A[k]=A[P]=A[Z]=A[te]=A[v]=A[f]=A[b]=A[x]=A[N]=A[S]=A[_]=A[j]=A[q]=A[w]=A[O]=A[D]=!0,A[u]=A[h]=A[$]=!1;var B=typeof bt=="object"&&bt&&bt.Object===Object&&bt,F=typeof self=="object"&&self&&self.Object===Object&&self,X=B||F||Function("return this")(),J=e&&!e.nodeType&&e,H=J&&!0&&r&&!r.nodeType&&r,le=H&&H.exports===J;function ue(o,d){return o.set(d[0],d[1]),o}function K(o,d){return o.add(d),o}function re(o,d){for(var E=-1,C=o?o.length:0;++E<C&&d(o[E],E,o)!==!1;);return o}function ne(o,d){for(var E=-1,C=d.length,Q=o.length;++E<C;)o[Q+E]=d[E];return o}function ie(o,d,E,C){for(var Q=-1,Y=o?o.length:0;++Q<Y;)E=d(E,o[Q],Q,o);return E}function ce(o,d){for(var E=-1,C=Array(o);++E<o;)C[E]=d(E);return C}function he(o,d){return o?.[d]}function pe(o){var d=!1;if(o!=null&&typeof o.toString!="function")try{d=!!(o+"")}catch{}return d}function xe(o){var d=-1,E=Array(o.size);return o.forEach(function(C,Q){E[++d]=[Q,C]}),E}function br(o,d){return function(E){return o(d(E))}}function on(o){var d=-1,E=Array(o.size);return o.forEach(function(C){E[++d]=C}),E}var ss=Array.prototype,is=Function.prototype,Gt=Object.prototype,vr=X["__core-js_shared__"],ln=function(){var o=/[^.]+$/.exec(vr&&vr.keys&&vr.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),cn=is.toString,Ye=Gt.hasOwnProperty,Vt=Gt.toString,as=RegExp("^"+cn.call(Ye).replace(I,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),At=le?X.Buffer:void 0,Wt=X.Symbol,yr=X.Uint8Array,je=br(Object.getPrototypeOf,Object),un=Object.create,hn=Gt.propertyIsEnumerable,os=ss.splice,Er=Object.getOwnPropertySymbols,Kt=At?At.isBuffer:void 0,dn=br(Object.keys,Object),Yt=$e(X,"DataView"),St=$e(X,"Map"),Be=$e(X,"Promise"),Xt=$e(X,"Set"),xr=$e(X,"WeakMap"),_t=$e(Object,"create"),wr=Se(Yt),Ct=Se(St),Nr=Se(Be),Tr=Se(Xt),Ar=Se(xr),ft=Wt?Wt.prototype:void 0,fn=ft?ft.valueOf:void 0;function nt(o){var d=-1,E=o?o.length:0;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function ls(){this.__data__=_t?_t(null):{}}function cs(o){return this.has(o)&&delete this.__data__[o]}function us(o){var d=this.__data__;if(_t){var E=d[o];return E===n?void 0:E}return Ye.call(d,o)?d[o]:void 0}function pn(o){var d=this.__data__;return _t?d[o]!==void 0:Ye.call(d,o)}function Sr(o,d){var E=this.__data__;return E[o]=_t&&d===void 0?n:d,this}nt.prototype.clear=ls,nt.prototype.delete=cs,nt.prototype.get=us,nt.prototype.has=pn,nt.prototype.set=Sr;function be(o){var d=-1,E=o?o.length:0;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function hs(){this.__data__=[]}function ds(o){var d=this.__data__,E=Jt(d,o);if(E<0)return!1;var C=d.length-1;return E==C?d.pop():os.call(d,E,1),!0}function fs(o){var d=this.__data__,E=Jt(d,o);return E<0?void 0:d[E][1]}function ps(o){return Jt(this.__data__,o)>-1}function gs(o,d){var E=this.__data__,C=Jt(E,o);return C<0?E.push([o,d]):E[C][1]=d,this}be.prototype.clear=hs,be.prototype.delete=ds,be.prototype.get=fs,be.prototype.has=ps,be.prototype.set=gs;function we(o){var d=-1,E=o?o.length:0;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function ms(){this.__data__={hash:new nt,map:new(St||be),string:new nt}}function bs(o){return Rt(this,o).delete(o)}function vs(o){return Rt(this,o).get(o)}function ys(o){return Rt(this,o).has(o)}function Es(o,d){return Rt(this,o).set(o,d),this}we.prototype.clear=ms,we.prototype.delete=bs,we.prototype.get=vs,we.prototype.has=ys,we.prototype.set=Es;function Re(o){this.__data__=new be(o)}function xs(){this.__data__=new be}function ws(o){return this.__data__.delete(o)}function Ns(o){return this.__data__.get(o)}function Ts(o){return this.__data__.has(o)}function As(o,d){var E=this.__data__;if(E instanceof be){var C=E.__data__;if(!St||C.length<t-1)return C.push([o,d]),this;E=this.__data__=new we(C)}return E.set(o,d),this}Re.prototype.clear=xs,Re.prototype.delete=ws,Re.prototype.get=Ns,Re.prototype.has=Ts,Re.prototype.set=As;function Zt(o,d){var E=Rr(o)||er(o)?ce(o.length,String):[],C=E.length,Q=!!C;for(var Y in o)Ye.call(o,Y)&&!(Q&&(Y=="length"||Bs(Y,C)))&&E.push(Y);return E}function gn(o,d,E){var C=o[d];(!(Ye.call(o,d)&&En(C,E))||E===void 0&&!(d in o))&&(o[d]=E)}function Jt(o,d){for(var E=o.length;E--;)if(En(o[E][0],d))return E;return-1}function Xe(o,d){return o&&Or(d,kr(d),o)}function _r(o,d,E,C,Q,Y,ae){var se;if(C&&(se=Y?C(o,Q,Y,ae):C(o)),se!==void 0)return se;if(!Je(o))return o;var ge=Rr(o);if(ge){if(se=Ms(o),!d)return Is(o,se)}else{var oe=it(o),Ne=oe==h||oe==g;if(xn(o))return Qt(o,d);if(oe==x||oe==i||Ne&&!Y){if(pe(o))return Y?o:{};if(se=Ze(Ne?{}:o),!d)return qs(o,Xe(se,o))}else{if(!A[oe])return Y?o:{};se=Ps(o,oe,_r,d)}}ae||(ae=new Re);var Le=ae.get(o);if(Le)return Le;if(ae.set(o,se),!ge)var me=E?Ds(o):kr(o);return re(me||o,function(Te,ve){me&&(ve=Te,Te=o[ve]),gn(se,ve,_r(Te,d,E,C,ve,o,ae))}),se}function Ss(o){return Je(o)?un(o):{}}function _s(o,d,E){var C=d(o);return Rr(o)?C:ne(C,E(o))}function Cs(o){return Vt.call(o)}function Os(o){if(!Je(o)||Fs(o))return!1;var d=Lr(o)||pe(o)?as:U;return d.test(Se(o))}function Rs(o){if(!vn(o))return dn(o);var d=[];for(var E in Object(o))Ye.call(o,E)&&E!="constructor"&&d.push(E);return d}function Qt(o,d){if(d)return o.slice();var E=new o.constructor(o.length);return o.copy(E),E}function Cr(o){var d=new o.constructor(o.byteLength);return new yr(d).set(new yr(o)),d}function Ot(o,d){var E=d?Cr(o.buffer):o.buffer;return new o.constructor(E,o.byteOffset,o.byteLength)}function mn(o,d,E){var C=d?E(xe(o),!0):xe(o);return ie(C,ue,new o.constructor)}function bn(o){var d=new o.constructor(o.source,M.exec(o));return d.lastIndex=o.lastIndex,d}function Ls(o,d,E){var C=d?E(on(o),!0):on(o);return ie(C,K,new o.constructor)}function ks(o){return fn?Object(fn.call(o)):{}}function js(o,d){var E=d?Cr(o.buffer):o.buffer;return new o.constructor(E,o.byteOffset,o.length)}function Is(o,d){var E=-1,C=o.length;for(d||(d=Array(C));++E<C;)d[E]=o[E];return d}function Or(o,d,E,C){E||(E={});for(var Q=-1,Y=d.length;++Q<Y;){var ae=d[Q],se=void 0;gn(E,ae,se===void 0?o[ae]:se)}return E}function qs(o,d){return Or(o,st(o),d)}function Ds(o){return _s(o,kr,st)}function Rt(o,d){var E=o.__data__;return $s(d)?E[typeof d=="string"?"string":"hash"]:E.map}function $e(o,d){var E=he(o,d);return Os(E)?E:void 0}var st=Er?br(Er,Object):Hs,it=Cs;(Yt&&it(new Yt(new ArrayBuffer(1)))!=T||St&&it(new St)!=f||Be&&it(Be.resolve())!=y||Xt&&it(new Xt)!=S||xr&&it(new xr)!=$)&&(it=function(o){var d=Vt.call(o),E=d==x?o.constructor:void 0,C=E?Se(E):void 0;if(C)switch(C){case wr:return T;case Ct:return f;case Nr:return y;case Tr:return S;case Ar:return $}return d});function Ms(o){var d=o.length,E=o.constructor(d);return d&&typeof o[0]=="string"&&Ye.call(o,"index")&&(E.index=o.index,E.input=o.input),E}function Ze(o){return typeof o.constructor=="function"&&!vn(o)?Ss(je(o)):{}}function Ps(o,d,E,C){var Q=o.constructor;switch(d){case m:return Cr(o);case l:case c:return new Q(+o);case T:return Ot(o,C);case k:case P:case Z:case te:case v:case q:case w:case O:case D:return js(o,C);case f:return mn(o,C,E);case b:case _:return new Q(o);case N:return bn(o);case S:return Ls(o,C,E);case j:return ks(o)}}function Bs(o,d){return d=d??s,!!d&&(typeof o=="number"||W.test(o))&&o>-1&&o%1==0&&o<d}function $s(o){var d=typeof o;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?o!=="__proto__":o===null}function Fs(o){return!!ln&&ln in o}function vn(o){var d=o&&o.constructor,E=typeof d=="function"&&d.prototype||Gt;return o===E}function Se(o){if(o!=null){try{return cn.call(o)}catch{}try{return o+""}catch{}}return""}function yn(o){return _r(o,!0,!0)}function En(o,d){return o===d||o!==o&&d!==d}function er(o){return Us(o)&&Ye.call(o,"callee")&&(!hn.call(o,"callee")||Vt.call(o)==i)}var Rr=Array.isArray;function tr(o){return o!=null&&wn(o.length)&&!Lr(o)}function Us(o){return Nn(o)&&tr(o)}var xn=Kt||zs;function Lr(o){var d=Je(o)?Vt.call(o):"";return d==h||d==g}function wn(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=s}function Je(o){var d=typeof o;return!!o&&(d=="object"||d=="function")}function Nn(o){return!!o&&typeof o=="object"}function kr(o){return tr(o)?Zt(o):Rs(o)}function Hs(){return[]}function zs(){return!1}r.exports=yn}(Ur,Ur.exports)),Ur.exports}var Hr={exports:{}};Hr.exports;var Za;function Il(){return Za||(Za=1,function(r,e){var t=200,n="__lodash_hash_undefined__",s=1,i=2,a=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",f="[object Error]",b="[object Function]",x="[object GeneratorFunction]",y="[object Map]",N="[object Number]",S="[object Null]",_="[object Object]",j="[object Promise]",$="[object Proxy]",m="[object RegExp]",T="[object Set]",k="[object String]",P="[object Symbol]",Z="[object Undefined]",te="[object WeakMap]",v="[object ArrayBuffer]",q="[object DataView]",w="[object Float32Array]",O="[object Float64Array]",D="[object Int8Array]",I="[object Int16Array]",M="[object Int32Array]",U="[object Uint8Array]",W="[object Uint8ClampedArray]",A="[object Uint16Array]",B="[object Uint32Array]",F=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,J=/^(?:0|[1-9]\d*)$/,H={};H[w]=H[O]=H[D]=H[I]=H[M]=H[U]=H[W]=H[A]=H[B]=!0,H[l]=H[c]=H[v]=H[h]=H[q]=H[g]=H[f]=H[b]=H[y]=H[N]=H[_]=H[m]=H[T]=H[k]=H[te]=!1;var le=typeof bt=="object"&&bt&&bt.Object===Object&&bt,ue=typeof self=="object"&&self&&self.Object===Object&&self,K=le||ue||Function("return this")(),re=e&&!e.nodeType&&e,ne=re&&!0&&r&&!r.nodeType&&r,ie=ne&&ne.exports===re,ce=ie&&le.process,he=function(){try{return ce&&ce.binding&&ce.binding("util")}catch{}}(),pe=he&&he.isTypedArray;function xe(o,d){for(var E=-1,C=o==null?0:o.length,Q=0,Y=[];++E<C;){var ae=o[E];d(ae,E,o)&&(Y[Q++]=ae)}return Y}function br(o,d){for(var E=-1,C=d.length,Q=o.length;++E<C;)o[Q+E]=d[E];return o}function on(o,d){for(var E=-1,C=o==null?0:o.length;++E<C;)if(d(o[E],E,o))return!0;return!1}function ss(o,d){for(var E=-1,C=Array(o);++E<o;)C[E]=d(E);return C}function is(o){return function(d){return o(d)}}function Gt(o,d){return o.has(d)}function vr(o,d){return o?.[d]}function ln(o){var d=-1,E=Array(o.size);return o.forEach(function(C,Q){E[++d]=[Q,C]}),E}function cn(o,d){return function(E){return o(d(E))}}function Ye(o){var d=-1,E=Array(o.size);return o.forEach(function(C){E[++d]=C}),E}var Vt=Array.prototype,as=Function.prototype,At=Object.prototype,Wt=K["__core-js_shared__"],yr=as.toString,je=At.hasOwnProperty,un=function(){var o=/[^.]+$/.exec(Wt&&Wt.keys&&Wt.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),hn=At.toString,os=RegExp("^"+yr.call(je).replace(F,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Er=ie?K.Buffer:void 0,Kt=K.Symbol,dn=K.Uint8Array,Yt=At.propertyIsEnumerable,St=Vt.splice,Be=Kt?Kt.toStringTag:void 0,Xt=Object.getOwnPropertySymbols,xr=Er?Er.isBuffer:void 0,_t=cn(Object.keys,Object),wr=st(K,"DataView"),Ct=st(K,"Map"),Nr=st(K,"Promise"),Tr=st(K,"Set"),Ar=st(K,"WeakMap"),ft=st(Object,"create"),fn=Se(wr),nt=Se(Ct),ls=Se(Nr),cs=Se(Tr),us=Se(Ar),pn=Kt?Kt.prototype:void 0,Sr=pn?pn.valueOf:void 0;function be(o){var d=-1,E=o==null?0:o.length;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function hs(){this.__data__=ft?ft(null):{},this.size=0}function ds(o){var d=this.has(o)&&delete this.__data__[o];return this.size-=d?1:0,d}function fs(o){var d=this.__data__;if(ft){var E=d[o];return E===n?void 0:E}return je.call(d,o)?d[o]:void 0}function ps(o){var d=this.__data__;return ft?d[o]!==void 0:je.call(d,o)}function gs(o,d){var E=this.__data__;return this.size+=this.has(o)?0:1,E[o]=ft&&d===void 0?n:d,this}be.prototype.clear=hs,be.prototype.delete=ds,be.prototype.get=fs,be.prototype.has=ps,be.prototype.set=gs;function we(o){var d=-1,E=o==null?0:o.length;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function ms(){this.__data__=[],this.size=0}function bs(o){var d=this.__data__,E=Qt(d,o);if(E<0)return!1;var C=d.length-1;return E==C?d.pop():St.call(d,E,1),--this.size,!0}function vs(o){var d=this.__data__,E=Qt(d,o);return E<0?void 0:d[E][1]}function ys(o){return Qt(this.__data__,o)>-1}function Es(o,d){var E=this.__data__,C=Qt(E,o);return C<0?(++this.size,E.push([o,d])):E[C][1]=d,this}we.prototype.clear=ms,we.prototype.delete=bs,we.prototype.get=vs,we.prototype.has=ys,we.prototype.set=Es;function Re(o){var d=-1,E=o==null?0:o.length;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function xs(){this.size=0,this.__data__={hash:new be,map:new(Ct||we),string:new be}}function ws(o){var d=$e(this,o).delete(o);return this.size-=d?1:0,d}function Ns(o){return $e(this,o).get(o)}function Ts(o){return $e(this,o).has(o)}function As(o,d){var E=$e(this,o),C=E.size;return E.set(o,d),this.size+=E.size==C?0:1,this}Re.prototype.clear=xs,Re.prototype.delete=ws,Re.prototype.get=Ns,Re.prototype.has=Ts,Re.prototype.set=As;function Zt(o){var d=-1,E=o==null?0:o.length;for(this.__data__=new Re;++d<E;)this.add(o[d])}function gn(o){return this.__data__.set(o,n),this}function Jt(o){return this.__data__.has(o)}Zt.prototype.add=Zt.prototype.push=gn,Zt.prototype.has=Jt;function Xe(o){var d=this.__data__=new we(o);this.size=d.size}function _r(){this.__data__=new we,this.size=0}function Ss(o){var d=this.__data__,E=d.delete(o);return this.size=d.size,E}function _s(o){return this.__data__.get(o)}function Cs(o){return this.__data__.has(o)}function Os(o,d){var E=this.__data__;if(E instanceof we){var C=E.__data__;if(!Ct||C.length<t-1)return C.push([o,d]),this.size=++E.size,this;E=this.__data__=new Re(C)}return E.set(o,d),this.size=E.size,this}Xe.prototype.clear=_r,Xe.prototype.delete=Ss,Xe.prototype.get=_s,Xe.prototype.has=Cs,Xe.prototype.set=Os;function Rs(o,d){var E=er(o),C=!E&&En(o),Q=!E&&!C&&tr(o),Y=!E&&!C&&!Q&&Nn(o),ae=E||C||Q||Y,se=ae?ss(o.length,String):[],ge=se.length;for(var oe in o)je.call(o,oe)&&!(ae&&(oe=="length"||Q&&(oe=="offset"||oe=="parent")||Y&&(oe=="buffer"||oe=="byteLength"||oe=="byteOffset")||Ps(oe,ge)))&&se.push(oe);return se}function Qt(o,d){for(var E=o.length;E--;)if(yn(o[E][0],d))return E;return-1}function Cr(o,d,E){var C=d(o);return er(o)?C:br(C,E(o))}function Ot(o){return o==null?o===void 0?Z:S:Be&&Be in Object(o)?it(o):vn(o)}function mn(o){return Je(o)&&Ot(o)==l}function bn(o,d,E,C,Q){return o===d?!0:o==null||d==null||!Je(o)&&!Je(d)?o!==o&&d!==d:Ls(o,d,E,C,bn,Q)}function Ls(o,d,E,C,Q,Y){var ae=er(o),se=er(d),ge=ae?c:Ze(o),oe=se?c:Ze(d);ge=ge==l?_:ge,oe=oe==l?_:oe;var Ne=ge==_,Le=oe==_,me=ge==oe;if(me&&tr(o)){if(!tr(d))return!1;ae=!0,Ne=!1}if(me&&!Ne)return Y||(Y=new Xe),ae||Nn(o)?Or(o,d,E,C,Q,Y):qs(o,d,ge,E,C,Q,Y);if(!(E&s)){var Te=Ne&&je.call(o,"__wrapped__"),ve=Le&&je.call(d,"__wrapped__");if(Te||ve){var pt=Te?o.value():o,at=ve?d.value():d;return Y||(Y=new Xe),Q(pt,at,E,C,Y)}}return me?(Y||(Y=new Xe),Ds(o,d,E,C,Q,Y)):!1}function ks(o){if(!wn(o)||$s(o))return!1;var d=xn(o)?os:X;return d.test(Se(o))}function js(o){return Je(o)&&Lr(o.length)&&!!H[Ot(o)]}function Is(o){if(!Fs(o))return _t(o);var d=[];for(var E in Object(o))je.call(o,E)&&E!="constructor"&&d.push(E);return d}function Or(o,d,E,C,Q,Y){var ae=E&s,se=o.length,ge=d.length;if(se!=ge&&!(ae&&ge>se))return!1;var oe=Y.get(o);if(oe&&Y.get(d))return oe==d;var Ne=-1,Le=!0,me=E&i?new Zt:void 0;for(Y.set(o,d),Y.set(d,o);++Ne<se;){var Te=o[Ne],ve=d[Ne];if(C)var pt=ae?C(ve,Te,Ne,d,o,Y):C(Te,ve,Ne,o,d,Y);if(pt!==void 0){if(pt)continue;Le=!1;break}if(me){if(!on(d,function(at,Lt){if(!Gt(me,Lt)&&(Te===at||Q(Te,at,E,C,Y)))return me.push(Lt)})){Le=!1;break}}else if(!(Te===ve||Q(Te,ve,E,C,Y))){Le=!1;break}}return Y.delete(o),Y.delete(d),Le}function qs(o,d,E,C,Q,Y,ae){switch(E){case q:if(o.byteLength!=d.byteLength||o.byteOffset!=d.byteOffset)return!1;o=o.buffer,d=d.buffer;case v:return!(o.byteLength!=d.byteLength||!Y(new dn(o),new dn(d)));case h:case g:case N:return yn(+o,+d);case f:return o.name==d.name&&o.message==d.message;case m:case k:return o==d+"";case y:var se=ln;case T:var ge=C&s;if(se||(se=Ye),o.size!=d.size&&!ge)return!1;var oe=ae.get(o);if(oe)return oe==d;C|=i,ae.set(o,d);var Ne=Or(se(o),se(d),C,Q,Y,ae);return ae.delete(o),Ne;case P:if(Sr)return Sr.call(o)==Sr.call(d)}return!1}function Ds(o,d,E,C,Q,Y){var ae=E&s,se=Rt(o),ge=se.length,oe=Rt(d),Ne=oe.length;if(ge!=Ne&&!ae)return!1;for(var Le=ge;Le--;){var me=se[Le];if(!(ae?me in d:je.call(d,me)))return!1}var Te=Y.get(o);if(Te&&Y.get(d))return Te==d;var ve=!0;Y.set(o,d),Y.set(d,o);for(var pt=ae;++Le<ge;){me=se[Le];var at=o[me],Lt=d[me];if(C)var Yi=ae?C(Lt,at,me,d,o,Y):C(at,Lt,me,o,d,Y);if(!(Yi===void 0?at===Lt||Q(at,Lt,E,C,Y):Yi)){ve=!1;break}pt||(pt=me=="constructor")}if(ve&&!pt){var Tn=o.constructor,An=d.constructor;Tn!=An&&"constructor"in o&&"constructor"in d&&!(typeof Tn=="function"&&Tn instanceof Tn&&typeof An=="function"&&An instanceof An)&&(ve=!1)}return Y.delete(o),Y.delete(d),ve}function Rt(o){return Cr(o,kr,Ms)}function $e(o,d){var E=o.__data__;return Bs(d)?E[typeof d=="string"?"string":"hash"]:E.map}function st(o,d){var E=vr(o,d);return ks(E)?E:void 0}function it(o){var d=je.call(o,Be),E=o[Be];try{o[Be]=void 0;var C=!0}catch{}var Q=hn.call(o);return C&&(d?o[Be]=E:delete o[Be]),Q}var Ms=Xt?function(o){return o==null?[]:(o=Object(o),xe(Xt(o),function(d){return Yt.call(o,d)}))}:Hs,Ze=Ot;(wr&&Ze(new wr(new ArrayBuffer(1)))!=q||Ct&&Ze(new Ct)!=y||Nr&&Ze(Nr.resolve())!=j||Tr&&Ze(new Tr)!=T||Ar&&Ze(new Ar)!=te)&&(Ze=function(o){var d=Ot(o),E=d==_?o.constructor:void 0,C=E?Se(E):"";if(C)switch(C){case fn:return q;case nt:return y;case ls:return j;case cs:return T;case us:return te}return d});function Ps(o,d){return d=d??a,!!d&&(typeof o=="number"||J.test(o))&&o>-1&&o%1==0&&o<d}function Bs(o){var d=typeof o;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?o!=="__proto__":o===null}function $s(o){return!!un&&un in o}function Fs(o){var d=o&&o.constructor,E=typeof d=="function"&&d.prototype||At;return o===E}function vn(o){return hn.call(o)}function Se(o){if(o!=null){try{return yr.call(o)}catch{}try{return o+""}catch{}}return""}function yn(o,d){return o===d||o!==o&&d!==d}var En=mn(function(){return arguments}())?mn:function(o){return Je(o)&&je.call(o,"callee")&&!Yt.call(o,"callee")},er=Array.isArray;function Rr(o){return o!=null&&Lr(o.length)&&!xn(o)}var tr=xr||zs;function Us(o,d){return bn(o,d)}function xn(o){if(!wn(o))return!1;var d=Ot(o);return d==b||d==x||d==u||d==$}function Lr(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=a}function wn(o){var d=typeof o;return o!=null&&(d=="object"||d=="function")}function Je(o){return o!=null&&typeof o=="object"}var Nn=pe?is(pe):js;function kr(o){return Rr(o)?Rs(o):Is(o)}function Hs(){return[]}function zs(){return!1}r.exports=Us}(Hr,Hr.exports)),Hr.exports}var kn={},Ja;function cg(){if(Ja)return kn;Ja=1,Object.defineProperty(kn,"__esModule",{value:!0});const r=jl(),e=Il();var t;return function(n){function s(c={},u={},h=!1){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});let g=r(u);h||(g=Object.keys(g).reduce((f,b)=>(g[b]!=null&&(f[b]=g[b]),f),{}));for(const f in c)c[f]!==void 0&&u[f]===void 0&&(g[f]=c[f]);return Object.keys(g).length>0?g:void 0}n.compose=s;function i(c={},u={}){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});const h=Object.keys(c).concat(Object.keys(u)).reduce((g,f)=>(e(c[f],u[f])||(g[f]=u[f]===void 0?null:u[f]),g),{});return Object.keys(h).length>0?h:void 0}n.diff=i;function a(c={},u={}){c=c||{};const h=Object.keys(u).reduce((g,f)=>(u[f]!==c[f]&&c[f]!==void 0&&(g[f]=u[f]),g),{});return Object.keys(c).reduce((g,f)=>(c[f]!==u[f]&&u[f]===void 0&&(g[f]=null),g),h)}n.invert=a;function l(c,u,h=!1){if(typeof c!="object")return u;if(typeof u!="object")return;if(!h)return u;const g=Object.keys(u).reduce((f,b)=>(c[b]===void 0&&(f[b]=u[b]),f),{});return Object.keys(g).length>0?g:void 0}n.transform=l}(t||(t={})),kn.default=t,kn}var jn={},Qa;function ql(){if(Qa)return jn;Qa=1,Object.defineProperty(jn,"__esModule",{value:!0});var r;return function(e){function t(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}e.length=t}(r||(r={})),jn.default=r,jn}var In={},eo;function ug(){if(eo)return In;eo=1,Object.defineProperty(In,"__esModule",{value:!0});const r=ql();class e{constructor(n){this.ops=n,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(n){n||(n=1/0);const s=this.ops[this.index];if(s){const i=this.offset,a=r.default.length(s);if(n>=a-i?(n=a-i,this.index+=1,this.offset=0):this.offset+=n,typeof s.delete=="number")return{delete:n};{const l={};return s.attributes&&(l.attributes=s.attributes),typeof s.retain=="number"?l.retain=n:typeof s.retain=="object"&&s.retain!==null?l.retain=s.retain:typeof s.insert=="string"?l.insert=s.insert.substr(i,n):l.insert=s.insert,l}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?r.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const n=this.ops[this.index];return n?typeof n.delete=="number"?"delete":typeof n.retain=="number"||typeof n.retain=="object"&&n.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const n=this.offset,s=this.index,i=this.next(),a=this.ops.slice(this.index);return this.offset=n,this.index=s,[i].concat(a)}}else return[]}}return In.default=e,In}var to;function hg(){return to||(to=1,function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=lg(),n=jl(),s=Il(),i=cg();e.AttributeMap=i.default;const a=ql();e.Op=a.default;const l=ug();e.OpIterator=l.default;const c="\0",u=(g,f)=>{if(typeof g!="object"||g===null)throw new Error(`cannot retain a ${typeof g}`);if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);const b=Object.keys(g)[0];if(!b||b!==Object.keys(f)[0])throw new Error(`embed types not matched: ${b} != ${Object.keys(f)[0]}`);return[b,g[b],f[b]]};class h{constructor(f){Array.isArray(f)?this.ops=f:f!=null&&Array.isArray(f.ops)?this.ops=f.ops:this.ops=[]}static registerEmbed(f,b){this.handlers[f]=b}static unregisterEmbed(f){delete this.handlers[f]}static getHandler(f){const b=this.handlers[f];if(!b)throw new Error(`no handlers for embed type "${f}"`);return b}insert(f,b){const x={};return typeof f=="string"&&f.length===0?this:(x.insert=f,b!=null&&typeof b=="object"&&Object.keys(b).length>0&&(x.attributes=b),this.push(x))}delete(f){return f<=0?this:this.push({delete:f})}retain(f,b){if(typeof f=="number"&&f<=0)return this;const x={retain:f};return b!=null&&typeof b=="object"&&Object.keys(b).length>0&&(x.attributes=b),this.push(x)}push(f){let b=this.ops.length,x=this.ops[b-1];if(f=n(f),typeof x=="object"){if(typeof f.delete=="number"&&typeof x.delete=="number")return this.ops[b-1]={delete:x.delete+f.delete},this;if(typeof x.delete=="number"&&f.insert!=null&&(b-=1,x=this.ops[b-1],typeof x!="object"))return this.ops.unshift(f),this;if(s(f.attributes,x.attributes)){if(typeof f.insert=="string"&&typeof x.insert=="string")return this.ops[b-1]={insert:x.insert+f.insert},typeof f.attributes=="object"&&(this.ops[b-1].attributes=f.attributes),this;if(typeof f.retain=="number"&&typeof x.retain=="number")return this.ops[b-1]={retain:x.retain+f.retain},typeof f.attributes=="object"&&(this.ops[b-1].attributes=f.attributes),this}}return b===this.ops.length?this.ops.push(f):this.ops.splice(b,0,f),this}chop(){const f=this.ops[this.ops.length-1];return f&&typeof f.retain=="number"&&!f.attributes&&this.ops.pop(),this}filter(f){return this.ops.filter(f)}forEach(f){this.ops.forEach(f)}map(f){return this.ops.map(f)}partition(f){const b=[],x=[];return this.forEach(y=>{(f(y)?b:x).push(y)}),[b,x]}reduce(f,b){return this.ops.reduce(f,b)}changeLength(){return this.reduce((f,b)=>b.insert?f+a.default.length(b):b.delete?f-b.delete:f,0)}length(){return this.reduce((f,b)=>f+a.default.length(b),0)}slice(f=0,b=1/0){const x=[],y=new l.default(this.ops);let N=0;for(;N<b&&y.hasNext();){let S;N<f?S=y.next(f-N):(S=y.next(b-N),x.push(S)),N+=a.default.length(S)}return new h(x)}compose(f){const b=new l.default(this.ops),x=new l.default(f.ops),y=[],N=x.peek();if(N!=null&&typeof N.retain=="number"&&N.attributes==null){let _=N.retain;for(;b.peekType()==="insert"&&b.peekLength()<=_;)_-=b.peekLength(),y.push(b.next());N.retain-_>0&&x.next(N.retain-_)}const S=new h(y);for(;b.hasNext()||x.hasNext();)if(x.peekType()==="insert")S.push(x.next());else if(b.peekType()==="delete")S.push(b.next());else{const _=Math.min(b.peekLength(),x.peekLength()),j=b.next(_),$=x.next(_);if($.retain){const m={};if(typeof j.retain=="number")m.retain=typeof $.retain=="number"?_:$.retain;else if(typeof $.retain=="number")j.retain==null?m.insert=j.insert:m.retain=j.retain;else{const k=j.retain==null?"insert":"retain",[P,Z,te]=u(j[k],$.retain),v=h.getHandler(P);m[k]={[P]:v.compose(Z,te,k==="retain")}}const T=i.default.compose(j.attributes,$.attributes,typeof j.retain=="number");if(T&&(m.attributes=T),S.push(m),!x.hasNext()&&s(S.ops[S.ops.length-1],m)){const k=new h(b.rest());return S.concat(k).chop()}}else typeof $.delete=="number"&&(typeof j.retain=="number"||typeof j.retain=="object"&&j.retain!==null)&&S.push($)}return S.chop()}concat(f){const b=new h(this.ops.slice());return f.ops.length>0&&(b.push(f.ops[0]),b.ops=b.ops.concat(f.ops.slice(1))),b}diff(f,b){if(this.ops===f.ops)return new h;const x=[this,f].map(j=>j.map($=>{if($.insert!=null)return typeof $.insert=="string"?$.insert:c;const m=j===f?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")),y=new h,N=t(x[0],x[1],b,!0),S=new l.default(this.ops),_=new l.default(f.ops);return N.forEach(j=>{let $=j[1].length;for(;$>0;){let m=0;switch(j[0]){case t.INSERT:m=Math.min(_.peekLength(),$),y.push(_.next(m));break;case t.DELETE:m=Math.min($,S.peekLength()),S.next(m),y.delete(m);break;case t.EQUAL:m=Math.min(S.peekLength(),_.peekLength(),$);const T=S.next(m),k=_.next(m);s(T.insert,k.insert)?y.retain(m,i.default.diff(T.attributes,k.attributes)):y.push(k).delete(m);break}$-=m}}),y.chop()}eachLine(f,b=`
23
+ `,u="/",h="*",g="",f="comment",b="declaration";Ws=function(y,N){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];N=N||{};var S=1,_=1;function j(w){var O=w.match(e);O&&(S+=O.length);var D=w.lastIndexOf(c);_=~D?w.length-D:_+w.length}function $(){var w={line:S,column:_};return function(O){return O.position=new m(w),P(),O}}function m(w){this.start=w,this.end={line:S,column:_},this.source=N.source}m.prototype.content=y;function T(w){var O=new Error(N.source+":"+S+":"+_+": "+w);if(O.reason=w,O.filename=N.source,O.line=S,O.column=_,O.source=y,!N.silent)throw O}function k(w){var O=w.exec(y);if(O){var D=O[0];return j(D),y=y.slice(D.length),O}}function P(){k(t)}function Z(w){var O;for(w=w||[];O=te();)O!==!1&&w.push(O);return w}function te(){var w=$();if(!(u!=y.charAt(0)||h!=y.charAt(1))){for(var O=2;g!=y.charAt(O)&&(h!=y.charAt(O)||u!=y.charAt(O+1));)++O;if(O+=2,g===y.charAt(O-1))return T("End of comment missing");var D=y.slice(2,O-2);return _+=2,j(D),y=y.slice(O),_+=2,w({type:f,comment:D})}}function v(){var w=$(),O=k(n);if(O){if(te(),!k(s))return T("property missing ':'");var D=k(i),I=w({type:b,property:x(O[0].replace(r,g)),value:D?x(D[0].replace(r,g)):g});return k(a),I}}function q(){var w=[];Z(w);for(var O;O=v();)O!==!1&&(w.push(O),Z(w));return w}return P(),q()};function x(y){return y?y.replace(l,g):g}return Ws}var da;function Uc(){if(da)return nr;da=1;var r=nr&&nr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(nr,"__esModule",{value:!0}),nr.default=t;var e=r(Fc());function t(n,s){var i=null;if(!n||typeof n!="string")return i;var a=(0,e.default)(n),l=typeof s=="function";return a.forEach(function(c){if(c.type==="declaration"){var u=c.property,h=c.value;l?s(u,h,c):h&&(i=i||{},i[u]=h)}}),i}return nr}var Pr={},fa;function Hc(){if(fa)return Pr;fa=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.camelCase=void 0;var r=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,t=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,i=function(u){return!u||t.test(u)||r.test(u)},a=function(u,h){return h.toUpperCase()},l=function(u,h){return"".concat(h,"-")},c=function(u,h){return h===void 0&&(h={}),i(u)?u:(u=u.toLowerCase(),h.reactCompat?u=u.replace(s,l):u=u.replace(n,l),u.replace(e,a))};return Pr.camelCase=c,Pr}var Br,pa;function zc(){if(pa)return Br;pa=1;var r=Br&&Br.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},e=r(Uc()),t=Hc();function n(s,i){var a={};return!s||typeof s!="string"||(0,e.default)(s,function(l,c){l&&c&&(a[(0,t.camelCase)(l,i)]=c)}),a}return n.default=n,Br=n,Br}var ga;function qo(){return ga||(ga=1,function(r){var e=Mr&&Mr.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(r,"__esModule",{value:!0}),r.returnFirstArg=r.canTextBeChildOfNode=r.ELEMENTS_WITH_NO_TEXT_CHILDREN=r.PRESERVE_CUSTOM_ATTRIBUTES=void 0,r.isCustomComponent=i,r.setStyleProp=l;var t=L,n=e(zc()),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function i(h,g){return h.includes("-")?!s.has(h):!!(g&&typeof g.is=="string")}var a={reactCompat:!0};function l(h,g){if(typeof h=="string"){if(!h.trim()){g.style={};return}try{g.style=(0,n.default)(h,a)}catch{g.style={}}}}r.PRESERVE_CUSTOM_ATTRIBUTES=Number(t.version.split(".")[0])>=16,r.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var c=function(h){return!r.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(h.name)};r.canTextBeChildOfNode=c;var u=function(h){return h};r.returnFirstArg=u}(Mr)),Mr}var ma;function Do(){if(ma)return Cn;ma=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.default=i;var r=$c(),e=qo(),t=["checked","value"],n=["input","select","textarea"],s={reset:!0,submit:!0};function i(l,c){l===void 0&&(l={});var u={},h=!!(l.type&&s[l.type]);for(var g in l){var f=l[g];if((0,r.isCustomAttribute)(g)){u[g]=f;continue}var b=g.toLowerCase(),x=a(b);if(x){var y=(0,r.getPropertyInfo)(x);switch(t.includes(x)&&n.includes(c)&&!h&&(x=a("default"+b)),u[x]=f,y&&y.type){case r.BOOLEAN:u[x]=!0;break;case r.OVERLOADED_BOOLEAN:f===""&&(u[x]=!0);break}continue}e.PRESERVE_CUSTOM_ATTRIBUTES&&(u[g]=f)}return(0,e.setStyleProp)(l.style,u),u}function a(l){return r.possibleStandardNames[l]}return Cn}var sr={},ba;function Gc(){if(ba)return sr;ba=1;var r=sr&&sr.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(sr,"__esModule",{value:!0}),sr.default=i;var e=L,t=r(Do()),n=qo(),s={cloneElement:e.cloneElement,createElement:e.createElement,isValidElement:e.isValidElement};function i(l,c){c===void 0&&(c={});for(var u=[],h=typeof c.replace=="function",g=c.transform||n.returnFirstArg,f=c.library||s,b=f.cloneElement,x=f.createElement,y=f.isValidElement,N=l.length,S=0;S<N;S++){var _=l[S];if(h){var j=c.replace(_,S);if(y(j)){N>1&&(j=b(j,{key:j.key||S})),u.push(g(j,_,S));continue}}if(_.type==="text"){var $=!_.data.trim().length;if($&&_.parent&&!(0,n.canTextBeChildOfNode)(_.parent)||c.trim&&$)continue;u.push(g(_.data,_,S));continue}var m=_,T={};a(m)?((0,n.setStyleProp)(m.attribs.style,m.attribs),T=m.attribs):m.attribs&&(T=(0,t.default)(m.attribs,m.name));var k=void 0;switch(_.type){case"script":case"style":_.children[0]&&(T.dangerouslySetInnerHTML={__html:_.children[0].data});break;case"tag":_.name==="textarea"&&_.children[0]?T.defaultValue=_.children[0].data:_.children&&_.children.length&&(k=i(_.children,c));break;default:continue}N>1&&(T.key=S),u.push(g(x(_.name,T,k),_,S))}return u.length===1?u[0]:u}function a(l){return n.PRESERVE_CUSTOM_ATTRIBUTES&&l.type==="tag"&&(0,n.isCustomComponent)(l.name,l.attribs)}return sr}var va;function Vc(){return va||(va=1,function(r){var e=qr&&qr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(r,"__esModule",{value:!0}),r.htmlToDOM=r.domToReact=r.attributesToProps=r.Text=r.ProcessingInstruction=r.Element=r.Comment=void 0,r.default=l;var t=e(Pc());r.htmlToDOM=t.default;var n=e(Do());r.attributesToProps=n.default;var s=e(Gc());r.domToReact=s.default;var i=jo();Object.defineProperty(r,"Comment",{enumerable:!0,get:function(){return i.Comment}}),Object.defineProperty(r,"Element",{enumerable:!0,get:function(){return i.Element}}),Object.defineProperty(r,"ProcessingInstruction",{enumerable:!0,get:function(){return i.ProcessingInstruction}}),Object.defineProperty(r,"Text",{enumerable:!0,get:function(){return i.Text}});var a={lowerCaseAttributeNames:!1};function l(c,u){if(typeof c!="string")throw new TypeError("First argument must be a string");return c?(0,s.default)((0,t.default)(c,u?.htmlparser2||a),u):[]}}(qr)),qr}var Wc=Vc();const ya=Si(Wc),Kc=ya.default||ya,Yc=({type:r,text:e})=>{const[t,n]=L.useState(!0),s=L.useRef(null),i=L.useRef(null),a=()=>{i.current&&(i.current.style.transition="opacity 0.4s",i.current.style.opacity="0"),s.current=window.setTimeout(()=>{n(!t)},500)};return L.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),t?p.jsxs("div",{ref:i,className:`alert ${r}`,role:"alert",children:[p.jsx("p",{children:Kc(e)}),p.jsx("button",{className:"close",type:"button","data-toggle":"close",onClick:a,children:p.jsx(Lo,{})})]}):null},Mo=({children:r,className:e="",...t})=>p.jsx("div",{className:`modal-header ${e}`,...t,children:r}),Po=({children:r,className:e="",...t})=>p.jsx("div",{className:`modal-body ${e}`,...t,children:r}),Bo=({children:r,className:e="",...t})=>p.jsx("div",{className:`modal-footer ${e}`,...t,children:r}),$o=({children:r,className:e="",...t})=>(L.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}),[]),en.createPortal(p.jsx("div",{className:"modal",...t,children:p.jsx("div",{className:`modal-dialog ${e}`,children:r})}),document.body)),Xc=({labelIcon:r,label:e="Confirmation",message:t,onCancel:n,onConfirm:s})=>p.jsxs($o,{className:"modal-sm",children:[p.jsxs(Mo,{className:"bg-danger",children:[p.jsxs("div",{className:"modal-header-title",children:[r||null,p.jsx("span",{children:e})]}),p.jsx("div",{className:"tools",children:p.jsx(Lo,{className:"icon",onClick:n})})]}),p.jsx(Po,{children:p.jsx("p",{children:t})}),p.jsxs(Bo,{className:"justify-content-space-between",children:[p.jsxs(ze,{type:"button",className:"btn btn-default",onClick:n,children:[p.jsx(Cc,{})," Batalkan"]}),p.jsxs(ze,{type:"button",className:"btn btn-primary",onClick:s,children:[p.jsx(Ro,{})," Konfirmasi"]})]})]}),Zc=({className:r="",type:e,title:t,text:n})=>p.jsxs("div",{className:`callout ${e} ${r}`,children:[t&&p.jsx("h5",{children:t}),typeof n=="string"?p.jsx("p",{children:n}):n]}),Jc=({children:r,text:e,position:t="top",className:n="",offset:s=5})=>{const[i,a]=L.useState(!1),[l,c]=L.useState({top:0,left:0}),u=L.useRef(null),h=L.useRef(null);return L.useEffect(()=>{if(i&&u.current&&h.current){const g=u.current.getBoundingClientRect(),f=h.current.getBoundingClientRect(),{scrollX:b,scrollY:x}=window;let y=0,N=0;switch(t){case"top":y=g.top-f.height-s,N=g.left+(g.width-f.width)/2;break;case"bottom":y=g.bottom+s,N=g.left+(g.width-f.width)/2;break;case"left":y=g.top+(g.height-f.height)/2,N=g.left-f.width-s;break;case"right":y=g.top+(g.height-f.height)/2,N=g.right+s;break}c({top:Math.round(y+x),left:Math.round(N+b)})}},[i,t,s]),p.jsxs("div",{ref:u,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[r,i&&en.createPortal(p.jsx("div",{ref:h,style:{position:"absolute",top:`${l.top}px`,left:`${l.left}px`},className:`tooltip ${t} ${n}`,children:e}),document.body)]})},Qc=({className:r,children:e,text:t})=>{const[n,s]=L.useState(!1),[i,a]=L.useState({top:0,left:0}),l=L.useRef(null),c=L.useRef(null);Pt([l,c],()=>{s(!1)}),L.useEffect(()=>{if(n&&l.current&&c.current){const h=l.current.getBoundingClientRect(),g=c.current.getBoundingClientRect(),{scrollX:f,scrollY:b}=window;let x=0,y=0;r.includes("top")?(x=h.top-g.height-10,y=h.left+(h.width-g.width)/2):r.includes("bottom")?(x=h.bottom+10,y=h.left+(h.width-g.width)/2):r.includes("left")?(x=h.top+(h.height-g.height)/2,y=h.left-g.width-10):r.includes("right")&&(x=h.top+(h.height-g.height)/2,y=h.right+10),a({top:Math.round(x+b),left:Math.round(y+f)})}},[n,r]);function u(){s(!n)}return p.jsxs("div",{ref:l,onClick:u,children:[e,n&&en.createPortal(p.jsxs("div",{ref:c,className:`popover ${r}`,role:"tooltip",style:{position:"absolute",top:`${i.top}px`,left:`${i.left}px`},children:[p.jsx("div",{className:"arrow"}),p.jsx("div",{className:"popover-content",children:t})]}),document.body)]})};function eu(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zM9 14H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-8 4H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2z"},child:[]}]})(r)}function tu(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"},child:[]}]})(r)}function ru(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"},child:[]}]})(r)}function nu(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M24 24H0V0h24v24z",opacity:".87"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"},child:[]}]})(r)}const su=({defaultIndex:r=0,children:e})=>{const[t,n]=L.useState(r),s=i=>{n(i===t?null:i)};return p.jsx("div",{className:"panel-group",children:L.Children.map(e,(i,a)=>L.cloneElement(i,{isOpen:t===a,onClick:()=>s(a)}))})},iu=({title:r,titleIcon:e,children:t,isOpen:n=!1,onClick:s})=>{const i=L.Children.toArray(t).find(l=>l.type===Fo),a=L.Children.toArray(t).find(l=>l.type===Uo);return p.jsxs("div",{className:"card mb-10",children:[p.jsxs("div",{className:"card-header",role:"button",tabIndex:0,onClick:s,onKeyDown:s,children:[p.jsxs("div",{className:"card-header-title",children:[e," ",r]}),p.jsx("div",{className:"tools",children:p.jsx(nu,{className:`menu-caret ${n?"active":""}`})})]}),n&&p.jsxs("div",{className:"panel active",children:[i,a]})]})},Fo=({className:r="",children:e})=>p.jsx("div",{className:`card-body ${r}`,children:e}),Uo=({className:r="",children:e})=>p.jsx("div",{className:`card-footer ${r}`,children:e}),au=({size:r=40,className:e="",color:t})=>p.jsx("span",{className:`circular-progress ${e} ${t?`brand-${t}`:""}`,style:{width:`${r}px`,height:`${r}px`}}),ou=({showLabel:r=!1,progress:e=0,className:t="",color:n})=>{const s=t.includes("indeterminate");return p.jsxs("div",{className:`linear-progress ${t}`,children:[p.jsx("div",{className:`progress-bar ${n?`brand-${n}`:""}`,children:p.jsx("span",{className:"progress",style:{width:`${e}%`}})}),r&&!s&&p.jsxs("span",{className:"progress-label",children:[e,"%"]})]})},lu=({progress:r=0,size:e=40,className:t="",color:n,strokeWidth:s=4})=>{const[i,a]=L.useState(0);return L.useEffect(()=>{if(i<r){const l=setTimeout(()=>{a(i+1)},10);return()=>clearTimeout(l)}},[i,r]),p.jsxs("div",{className:`circular-progress-with-label ${t}`,children:[p.jsx("span",{className:`progress ${n?`brand-${n}`:""}`,style:{width:`${e}px`,height:`${e}px`,borderWidth:`${s}px`,background:n?`radial-gradient(closest-side, var(--secondary-bg) 79%, transparent 80% 100%), conic-gradient(var(--brand-${n}) ${i}%, var(--primary-bg) 0)`:`radial-gradient(closest-side, var(--secondary-bg) 79%, transparent 80% 100%), conic-gradient(#888 ${i}%, var(--primary-bg) 0)`}}),p.jsxs("span",{className:"progress-label",children:[i,"%"]})]})},ye=[];for(let r=0;r<256;++r)ye.push((r+256).toString(16).slice(1));function cu(r,e=0){return(ye[r[e+0]]+ye[r[e+1]]+ye[r[e+2]]+ye[r[e+3]]+"-"+ye[r[e+4]]+ye[r[e+5]]+"-"+ye[r[e+6]]+ye[r[e+7]]+"-"+ye[r[e+8]]+ye[r[e+9]]+"-"+ye[r[e+10]]+ye[r[e+11]]+ye[r[e+12]]+ye[r[e+13]]+ye[r[e+14]]+ye[r[e+15]]).toLowerCase()}let Ks;const uu=new Uint8Array(16);function hu(){if(!Ks){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ks=crypto.getRandomValues.bind(crypto)}return Ks(uu)}const du=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ea={randomUUID:du};function Ho(r,e,t){if(Ea.randomUUID&&!r)return Ea.randomUUID();r=r||{};const n=r.random??r.rng?.()??hu();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,cu(n)}const Ci=L.forwardRef(({name:r,label:e,message:t,error:n,checked:s=!1,onChange:i,...a},l)=>{const c=Ho(),u=h=>{i(h)};return p.jsxs(p.Fragment,{children:[p.jsxs("label",{className:"custom-checkbox",htmlFor:c,children:[p.jsx("input",{className:"form-control",type:"checkbox",id:c,name:r,ref:l,role:"checkbox",checked:s,onChange:u,...a}),p.jsx("span",{className:"checkmark"}),e&&p.jsx("span",{className:a.required?"required":"",children:e})]}),n?p.jsx("small",{className:"form-message text-danger",children:n}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Ci.displayName="Checkbox";const fu=({children:r})=>p.jsx("div",{className:"form",children:r}),pu=({className:r="",children:e})=>p.jsx("div",{className:`form-group ${r}`,children:e}),gu=({className:r="",children:e})=>p.jsx("div",{className:`form-checkbox ${r}`,children:e}),mu=({className:r="",children:e})=>p.jsx("div",{className:`form-radio ${r}`,children:e}),Oi=(r,e)=>{L.useEffect(()=>{if(r&&e.current){const t=e.current.getBoundingClientRect(),n=window.innerHeight;t.bottom>n?e.current.classList.add("position-top"):e.current.classList.remove("position-top");const s=e.current.querySelector(".option.selected");s&&s.scrollIntoView({block:"nearest"})}},[r,e])},yt=L.forwardRef((r,e)=>{const{name:t,label:n,message:s,selectLabel:i="Select an option",size:a="md",floatingLabel:l=!1,error:c,options:u,value:h="",onChange:g,onBlur:f,required:b,disabled:x}=r,[y,N]=L.useState(!1),S=L.useRef(null),_=L.useRef(null),j=L.useRef(null),$=u.find(T=>T.value===h)?.label??i;L.useImperativeHandle(e,()=>j.current),L.useEffect(()=>N(!1),[]),Pt([S],()=>{N(!1),j.current?.blur()}),Oi(y,_);const m=T=>{const k=u.find(te=>te.value===T);if(!k)return;const P=k.value;if(g?.({target:{name:t,value:P,type:"select-one"},currentTarget:{name:t,value:P}}),j.current){j.current.value=String(P);const te=new CustomEvent("change",{bubbles:!0,detail:{originalValue:P}});j.current.dispatchEvent(te)}N(!1)};return p.jsxs(p.Fragment,{children:[p.jsxs("select",{ref:j,name:t,value:h!=null&&!Number.isNaN(h)?h:"",onChange:g,onBlur:f,required:b,disabled:x,style:{position:"absolute",left:"-9999px"},tabIndex:-1,children:[p.jsx("option",{value:"",children:"Select an option"}),u.map(T=>p.jsx("option",{value:String(T.value),children:T.label},T.value))]}),n&&!l&&p.jsxs("label",{htmlFor:t,children:[n," ",b&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:`dropdown-select-container ${a}`,ref:S,children:[p.jsxs("div",{className:`dropdown-header ${y?"open":""} ${x?"disabled":""}`,onClick:()=>!x&&N(!y),"aria-haspopup":"listbox","aria-expanded":y,children:[p.jsx("span",{className:"label",children:$}),p.jsx(_i,{className:"arrow"})]}),y&&p.jsx("div",{className:"dropdown-options scrollbar",ref:_,role:"listbox",children:u.map(T=>p.jsx("div",{className:`option ${T.value===h?"selected":""}`,onClick:()=>m(T.value),role:"option","aria-selected":T.value===h,children:T.label},T.value))})]}),n&&l&&p.jsxs("label",{htmlFor:t,children:[n," ",b&&p.jsx("span",{className:"text-danger",children:"*"})]}),c?p.jsx("small",{className:"form-message text-danger",children:c}):s&&p.jsx("small",{className:"form-message text-muted",children:s})]})});yt.displayName="Select";const bu=r=>{const[e,t]=L.useState(!1);return L.useEffect(()=>{const n=()=>{if(!r.current)return;const{top:i,height:a}=r.current.getBoundingClientRect(),l=window.innerHeight;t(i+a>l)};n();const s=()=>{n()};return window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[r]),e},zo=r=>{const e=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),n=String(r.getDate()).padStart(2,"0");return`${e}-${t}-${n}`},vu=r=>r.toLocaleDateString("id-ID",{timeZone:"Asia/Jakarta",year:"numeric",month:"long",day:"numeric"}),Wr=(r,e)=>Array.from({length:r},(t,n)=>e(n)),On=(r,e)=>{const t=new Date(e,r,1).getDay(),n=new Date(e,r+1,0).getDate(),s=Wr(t,()=>({value:"",label:""})),i=Wr(n,a=>({value:(a+1).toString(),label:(a+1).toString()}));return[...s,...i]},yu=(r,e)=>{const t=new Date(e,r+1,0).getDate();return Wr(t,n=>({value:(n+1).toString(),label:(n+1).toString()}))},Go=(r="id-ID")=>Wr(12,e=>({value:(e+1).toString(),label:new Date(2024,e,1).toLocaleString(r,{month:"long"})})),Vo=()=>{const r=new Date().getFullYear(),e=r-60,n=r+20-e+1;return Wr(n,s=>{const i=e+s;return{value:i.toString(),label:i.toString()}})},xa=r=>{const e=new Date(r);return e instanceof Date&&!isNaN(e.getTime())},Eu=["Min","Sen","Sel","Rab","Kam","Jum","Sab"],xu=r=>{const[e,t]=L.useState(r);return{selectedDate:e,handlePrevMonth:()=>{const c=new Date(e);c.setMonth(e.getMonth()-1),t(c)},handleNextMonth:()=>{const c=new Date(e);c.setMonth(e.getMonth()+1),t(c)},handleDateClick:(c,u,h,g)=>{const f=new Date(parseInt(h,10),parseInt(u,10),parseInt(c,10));t(f),g(zo(f))},isSelectedDate:(c,u,h)=>parseInt(h,10)===e.getFullYear()&&parseInt(u,10)===e.getMonth()+1&&parseInt(c,10)===e.getDate(),setDate:c=>{t(c)}}},Wo=({onSelect:r,defaultDate:e,full:t=!1})=>{const n=L.useRef(null),s=bu(n),i=xa(e)?new Date(e):new Date,{selectedDate:a,handlePrevMonth:l,handleNextMonth:c,handleDateClick:u,isSelectedDate:h,setDate:g}=xu(i),[f,b]=L.useState(On(i.getMonth(),i.getFullYear()));L.useEffect(()=>{if(e&&xa(e)){const y=new Date(e);g(y)}},[e,g]),L.useEffect(()=>{b(On(a.getMonth(),a.getFullYear()))},[a]);const x=(y,N)=>{const S=parseInt(y,10),_=S+1;return f.map((j,$)=>j.value!==""?p.jsx("div",{className:`calendar-day ${h(j.value,_.toString(),N)?"selected-date":""}`,onClick:()=>{const m=new Date(parseInt(N,10),S,parseInt(j.value,10)),T=t?vu(m):zo(m);u(j.value,y,N,()=>r(T))},children:j.label},`day-${$}`):p.jsx("div",{className:"calendar-day empty"},`day-${$}`))};return p.jsxs("div",{className:`date-picker ${s?"position-top":""}`,ref:n,children:[p.jsxs("div",{className:"calendar-nav",children:[p.jsx("button",{type:"button",className:"btn btn-rounded",onClick:l,children:p.jsx(tu,{})}),p.jsxs("div",{className:"calendar-select",children:[p.jsx(yt,{name:"month",size:"md",options:Go(),value:(a.getMonth()+1).toString(),onChange:y=>{const N=parseInt(y.target.value,10)-1,S=new Date(a.getFullYear(),N,a.getDate());g(S),b(On(N,S.getFullYear()))}}),p.jsx(yt,{name:"year",size:"md",options:Vo(),value:a.getFullYear().toString(),onChange:y=>{const N=parseInt(y.target.value,10),S=new Date(N,a.getMonth(),a.getDate());g(S),b(On(S.getMonth(),N))}})]}),p.jsx("button",{type:"button",className:"btn btn-rounded",onClick:c,children:p.jsx(ru,{})})]}),p.jsxs("div",{className:"calendar",children:[p.jsx("div",{className:"calendar-header",children:Eu.map((y,N)=>p.jsx("div",{className:"calendar-day-name",children:y},`day-${N}`))}),p.jsx("div",{className:"calendar-body",children:x(a.getMonth().toString(),a.getFullYear().toString())})]})]})},Ko=L.forwardRef(({name:r,label:e,message:t,floatingLabel:n,locale:s="id",error:i,value:a,...l},c)=>{const u=_=>{if(!_)return new Date;const j=new Date(_);return isNaN(j.getTime())?new Date:j},h=u(a),[g,f]=L.useState({day:h.getDate(),month:h.getMonth()+1,year:h.getFullYear()});L.useEffect(()=>{if(a){const _=u(a);f({day:_.getDate(),month:_.getMonth()+1,year:_.getFullYear()})}},[a]),L.useEffect(()=>{const _=new Date(g.year,g.month,0).getDate();g.day>_&&f(j=>({...j,day:_}))},[g.month,g.year]);const b=(_,j)=>{const $=parseInt(j,10);if(isNaN($))return;const m={...g,[_]:$};if(f(m),l.onChange){const T=`${m.year}-${String(m.month).padStart(2,"0")}-${String(m.day).padStart(2,"0")}`;l.onChange({target:{name:r,value:T}})}},x=L.useMemo(()=>yu(g.month-1,g.year),[g.month,g.year]),y=L.useMemo(()=>Go(s),[s]),N=L.useMemo(()=>Vo(),[]),S=p.jsxs("label",{htmlFor:r,children:[e," ",l.required&&p.jsx("span",{className:"text-danger",children:"*"})]});return p.jsxs(p.Fragment,{children:[!n&&S,p.jsxs("div",{className:"row",ref:c,children:[p.jsx("div",{className:"col-md-3",children:p.jsx(yt,{name:`${r}-day`,disabled:l.disabled,options:x,value:g.day.toString(),onChange:_=>b("day",_.target.value),"aria-label":"Day"})}),p.jsx("div",{className:"col-md-5",children:p.jsx(yt,{name:`${r}-month`,disabled:l.disabled,options:y,value:g.month.toString(),onChange:_=>b("month",_.target.value),"aria-label":"Month"})}),p.jsx("div",{className:"col-md-4",children:p.jsx(yt,{name:`${r}-year`,disabled:l.disabled,options:N,value:g.year.toString(),onChange:_=>b("year",_.target.value),"aria-label":"Year"})})]}),n&&S,i?p.jsx("small",{className:"form-message text-danger",children:i}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Ko.displayName="DropdownDatePicker";const wu=({type:r="text",className:e,...t})=>p.jsx("input",{type:r,className:`clear ${e}`,...t}),Yo=L.forwardRef(({className:r,name:e,label:t,message:n,floatingLabel:s,error:i,...a},l)=>p.jsxs(p.Fragment,{children:[!s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",a.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("input",{type:"text",className:`form-control ${r}`,id:e,name:e,placeholder:s?"":" ",ref:l,...a}),s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",a.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):n&&p.jsx("small",{className:"form-message text-muted",children:n})]})),Nu=L.forwardRef(({className:r,name:e,label:t,message:n,floatingLabel:s,error:i,actionIcon:a,actionButtonLabel:l,actionButtonHandler:c,...u},h)=>p.jsxs(p.Fragment,{children:[!s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",u.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:"input-group-icon",children:[p.jsx("input",{type:"text",className:`form-control pr-35 ${r}`,id:e,name:e,placeholder:s?"":" ",ref:h,...u}),a&&p.jsx(ze,{role:"button",className:"icon",onClick:c,tabIndex:0,"aria-label":l,disabled:u.disabled,children:a})]}),s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",u.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):n&&p.jsx("small",{className:"form-message text-muted",children:n})]})),Xo=L.forwardRef(({name:r,label:e,message:t,floatingLabel:n,full:s,error:i,onChange:a,value:l,...c},u)=>{const[h,g]=L.useState(!1),f=L.useRef(null),b=L.useRef(null);L.useImperativeHandle(u,()=>f.current),L.useEffect(()=>{l!==void 0&&f.current&&(f.current.value=l)},[l]);const x=y=>{f.current&&(f.current.value=y,a?.({target:f.current,currentTarget:f.current}),g(!1))};return Pt([b],()=>g(!1)),p.jsxs(p.Fragment,{children:[!n&&p.jsxs("label",{htmlFor:r,children:[e," ",c.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:"input-group-icon",children:[p.jsx("input",{type:"text",className:"form-control",id:r,name:r,placeholder:n?"":" ",ref:f,onChange:a,...c}),p.jsx(ze,{role:"button",className:"icon",onClick:y=>{y.stopPropagation(),g(N=>!N)},"aria-label":"Open date picker",disabled:c.disabled,children:p.jsx(eu,{})})]}),p.jsx("div",{ref:b,className:`date-picker-container ${h?"show":"hide"}`,style:{display:h?"block":"none"},children:p.jsx(Wo,{full:s,onSelect:x,defaultDate:l||void 0})}),n&&p.jsxs("label",{htmlFor:r,children:[e," ",c.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Xo.displayName="InputDate";const Zo=L.forwardRef(({name:r,label:e,message:t,accept:n,error:s,onChange:i,...a},l)=>{const c=u=>{i&&i(u)};return p.jsxs("div",{className:"form-group",children:[e&&p.jsxs("label",{htmlFor:r,children:[e," ",a.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("input",{type:"file",className:"form-control",id:r,name:r,accept:n,onChange:c,ref:l,...a}),s?p.jsx("small",{className:"form-message text-danger",children:s}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Zo.displayName="InputFile";const Tu=()=>p.jsx("div",{children:"InputImageSize"}),Jo=L.forwardRef(({name:r,label:e,message:t,floatingLabel:n,error:s,...i},a)=>p.jsxs(p.Fragment,{children:[!n&&p.jsxs("label",{htmlFor:r,children:[e," ",i.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("textarea",{className:"form-control",id:r,name:r,placeholder:n?"":" ",ref:a,...i}),n&&p.jsxs("label",{htmlFor:r,children:[e," ",i.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),s?p.jsx("small",{className:"form-message text-danger",children:s}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]}));Jo.displayName="InputTextArea";const Au=L.forwardRef(({name:r,label:e,message:t,options:n,error:s,...i},a)=>p.jsxs(p.Fragment,{children:[e&&p.jsxs("label",{htmlFor:r,children:[e," ",i.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("div",{className:"form-control",children:n.map(l=>{const c=`${Ho()}-${l.value}`;return p.jsxs("div",{className:"d-flex align-items-center",children:[p.jsx("input",{type:"radio",id:c,name:r,value:l.value,ref:a,...i}),p.jsx("label",{htmlFor:c,children:l.label})]},l.value)})}),s?p.jsx("small",{className:"form-message text-danger",children:s}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})),Qo=L.forwardRef(({name:r,label:e,message:t,size:n="md",options:s,selectedValue:i,error:a,required:l,...c},u)=>p.jsxs(p.Fragment,{children:[e&&p.jsxs("label",{htmlFor:r,children:[e," ",l&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("div",{className:"btn-group","data-toggle":"buttons",children:s.map(h=>{const g=h.value.toString()===i?.toString();return p.jsxs("label",{className:`btn auto btn-default btn-${n} ${g?"active":""}`,children:[p.jsx("input",{type:"radio",id:h.value.toString(),name:r,value:h.value.toString(),ref:u,...c}),p.jsx("span",{children:h.label})]},h.value.toString())})}),a?p.jsx("small",{className:"form-message text-danger",children:a}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]}));Qo.displayName="RadioButtonGroup";const el=L.forwardRef(({name:r,label:e,message:t,selectLabel:n,floatingLabel:s=!1,error:i,options:a,value:l=[],onChange:c,required:u,disabled:h,className:g},f)=>{const[b,x]=L.useState(!1),[y,N]=L.useState(l),S=L.useRef(null),_=L.useRef(null);L.useEffect(()=>{JSON.stringify(l)!==JSON.stringify(y)&&N(l)},[y,l]);const j=m=>{const T=y.includes(m)?y.filter(k=>k!==m):[...y,m];N(T),c&&c({target:{name:r,value:T}})};Pt([S],()=>{x(!1)}),Oi(b,_);const $=y.map(m=>a.find(T=>T.value===m)?.label).filter(Boolean).join(", ");return p.jsxs(p.Fragment,{children:[e&&!s&&p.jsxs("label",{htmlFor:r,children:[e," ",u&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:`dropdown-select-container ${g||""}`,ref:S,children:[p.jsxs("div",{className:`dropdown-header ${b?"open":""} ${h?"disabled":""}`,onClick:()=>!h&&x(!b),ref:f,children:[p.jsx("span",{className:"label",children:$||n||"Select an option"}),p.jsx(_i,{className:`arrow ${b?"open":""}`})]}),b&&!h&&p.jsx("div",{className:"dropdown-options scrollbar",ref:_,role:"listbox",children:a?.map(m=>p.jsx("div",{className:`option ${y.includes(m.value)?"selected":""}`,children:p.jsx(Ci,{name:m.value.toString(),label:m.label,checked:y.includes(m.value),onChange:()=>j(m.value)})},m.value))})]}),e&&s&&p.jsxs("label",{htmlFor:r,children:[e," ",u&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});el.displayName="SelectMultiple";const tl=L.forwardRef((r,e)=>{const{name:t,label:n,message:s,selectLabel:i="Select an option",size:a="md",floatingLabel:l=!1,error:c,options:u=[],value:h="",onChange:g,required:f,disabled:b,selectSearch:x="",setSelectSearch:y,isLoading:N=!1}=r,[S,_]=L.useState(!1),j=L.useRef(null),$=L.useRef(null),m=L.useRef(null);L.useImperativeHandle(e,()=>m.current),Pt([j],()=>_(!1)),Oi(S,$);const T=h?u.find(P=>P.value===h)?.label:i,k=P=>{g?.({target:{name:t,value:P}}),m.current&&(m.current.value=String(P),m.current.dispatchEvent(new Event("change",{bubbles:!0}))),_(!1)};return p.jsxs(p.Fragment,{children:[p.jsxs("select",{ref:m,name:t,value:h,onChange:g,style:{position:"absolute",left:"-9999px"},tabIndex:-1,children:[p.jsx("option",{value:"",children:"Select an option"}),u.map(P=>p.jsx("option",{value:P.value,children:P.label},P.value))]}),n&&!l&&p.jsxs("label",{htmlFor:t,children:[n," ",f&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:`dropdown-select-container ${a}`,ref:j,children:[p.jsxs("div",{className:`dropdown-header ${S?"open":""} ${b?"disabled":""}`,onClick:()=>!b&&_(!S),"aria-haspopup":"listbox","aria-expanded":S,children:[p.jsx("span",{className:"label",children:T}),p.jsx(_i,{className:"arrow"})]}),S&&p.jsxs("div",{className:"dropdown-options scrollbar",ref:$,role:"listbox",children:[p.jsx("div",{className:"search-input",children:p.jsx(Yo,{name:"search",placeholder:"Ketik untuk mencari..",type:"search",autoFocus:!0,value:x,onChange:P=>y?.(P.currentTarget.value)})}),N?p.jsx("div",{className:"p-10 text-center",children:"Loading options..."}):u.length===0?p.jsx("div",{className:"p-10 text-center",children:"Tidak ada hasil ditemukan"}):u.map(P=>p.jsx("div",{className:`option ${h===P.value?"selected":""}`,onClick:()=>k(P.value),role:"option","aria-selected":h===P.value,children:P.label},P.value))]})]}),n&&l&&p.jsxs("label",{htmlFor:t,children:[n," ",f&&p.jsx("span",{className:"text-danger",children:"*"})]}),c?p.jsx("small",{className:"form-message text-danger",children:c}):s&&p.jsx("small",{className:"form-message text-muted",children:s})]})});tl.displayName="SelectWithSearch";const rl=L.forwardRef(({name:r,className:e="",error:t,checked:n=!1,onChange:s,...i},a)=>{const l=c=>{s&&s(c)};return p.jsx(p.Fragment,{children:p.jsxs("label",{className:`switch ${e} ${t?"has-error":""}`,children:[p.jsx("input",{type:"checkbox",id:r,name:r,ref:a,checked:n,onChange:l,disabled:i.disabled,...i}),p.jsx("span",{className:"slider round"})]})})});rl.displayName="Switch";var nl=typeof global=="object"&&global&&global.Object===Object&&global,Su=typeof self=="object"&&self&&self.Object===Object&&self,tt=nl||Su||Function("return this")(),wt=tt.Symbol,sl=Object.prototype,_u=sl.hasOwnProperty,Cu=sl.toString,$r=wt?wt.toStringTag:void 0;function Ou(r){var e=_u.call(r,$r),t=r[$r];try{r[$r]=void 0;var n=!0}catch{}var s=Cu.call(r);return n&&(e?r[$r]=t:delete r[$r]),s}var Ru=Object.prototype,Lu=Ru.toString;function ku(r){return Lu.call(r)}var ju="[object Null]",Iu="[object Undefined]",wa=wt?wt.toStringTag:void 0;function gr(r){return r==null?r===void 0?Iu:ju:wa&&wa in Object(r)?Ou(r):ku(r)}function ct(r){return r!=null&&typeof r=="object"}var It=Array.isArray;function Nt(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}function il(r){return r}var qu="[object AsyncFunction]",Du="[object Function]",Mu="[object GeneratorFunction]",Pu="[object Proxy]";function Ri(r){if(!Nt(r))return!1;var e=gr(r);return e==Du||e==Mu||e==qu||e==Pu}var Ys=tt["__core-js_shared__"],Na=function(){var r=/[^.]+$/.exec(Ys&&Ys.keys&&Ys.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Bu(r){return!!Na&&Na in r}var $u=Function.prototype,Fu=$u.toString;function Bt(r){if(r!=null){try{return Fu.call(r)}catch{}try{return r+""}catch{}}return""}var Uu=/[\\^$.*+?()[\]{}|]/g,Hu=/^\[object .+?Constructor\]$/,zu=Function.prototype,Gu=Object.prototype,Vu=zu.toString,Wu=Gu.hasOwnProperty,Ku=RegExp("^"+Vu.call(Wu).replace(Uu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Yu(r){if(!Nt(r)||Bu(r))return!1;var e=Ri(r)?Ku:Hu;return e.test(Bt(r))}function Xu(r,e){return r?.[e]}function $t(r,e){var t=Xu(r,e);return Yu(t)?t:void 0}var ui=$t(tt,"WeakMap"),Ta=Object.create,Zu=function(){function r(){}return function(e){if(!Nt(e))return{};if(Ta)return Ta(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}();function Ju(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}function Qu(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var eh=800,th=16,rh=Date.now;function nh(r){var e=0,t=0;return function(){var n=rh(),s=th-(n-t);if(t=n,s>0){if(++e>=eh)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}function sh(r){return function(){return r}}var Hn=function(){try{var r=$t(Object,"defineProperty");return r({},"",{}),r}catch{}}(),ih=Hn?function(r,e){return Hn(r,"toString",{configurable:!0,enumerable:!1,value:sh(e),writable:!0})}:il,ah=nh(ih);function oh(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var lh=9007199254740991,ch=/^(?:0|[1-9]\d*)$/;function al(r,e){var t=typeof r;return e=e??lh,!!e&&(t=="number"||t!="symbol"&&ch.test(r))&&r>-1&&r%1==0&&r<e}function Li(r,e,t){e=="__proto__"&&Hn?Hn(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}function tn(r,e){return r===e||r!==r&&e!==e}var uh=Object.prototype,hh=uh.hasOwnProperty;function ol(r,e,t){var n=r[e];(!(hh.call(r,e)&&tn(n,t))||t===void 0&&!(e in r))&&Li(r,e,t)}function dh(r,e,t,n){var s=!t;t||(t={});for(var i=-1,a=e.length;++i<a;){var l=e[i],c=void 0;c===void 0&&(c=r[l]),s?Li(t,l,c):ol(t,l,c)}return t}var Aa=Math.max;function fh(r,e,t){return e=Aa(e===void 0?r.length-1:e,0),function(){for(var n=arguments,s=-1,i=Aa(n.length-e,0),a=Array(i);++s<i;)a[s]=n[e+s];s=-1;for(var l=Array(e+1);++s<e;)l[s]=n[s];return l[e]=t(a),Ju(r,this,l)}}function ph(r,e){return ah(fh(r,e,il),r+"")}var gh=9007199254740991;function ll(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=gh}function Yn(r){return r!=null&&ll(r.length)&&!Ri(r)}function mh(r,e,t){if(!Nt(t))return!1;var n=typeof e;return(n=="number"?Yn(t)&&al(e,t.length):n=="string"&&e in t)?tn(t[e],r):!1}function bh(r){return ph(function(e,t){var n=-1,s=t.length,i=s>1?t[s-1]:void 0,a=s>2?t[2]:void 0;for(i=r.length>3&&typeof i=="function"?(s--,i):void 0,a&&mh(t[0],t[1],a)&&(i=s<3?void 0:i,s=1),e=Object(e);++n<s;){var l=t[n];l&&r(e,l,n,i)}return e})}var vh=Object.prototype;function ki(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||vh;return r===t}function yh(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var Eh="[object Arguments]";function Sa(r){return ct(r)&&gr(r)==Eh}var cl=Object.prototype,xh=cl.hasOwnProperty,wh=cl.propertyIsEnumerable,hi=Sa(function(){return arguments}())?Sa:function(r){return ct(r)&&xh.call(r,"callee")&&!wh.call(r,"callee")};function Nh(){return!1}var ul=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_a=ul&&typeof module=="object"&&module&&!module.nodeType&&module,Th=_a&&_a.exports===ul,Ca=Th?tt.Buffer:void 0,Ah=Ca?Ca.isBuffer:void 0,Kr=Ah||Nh,Sh="[object Arguments]",_h="[object Array]",Ch="[object Boolean]",Oh="[object Date]",Rh="[object Error]",Lh="[object Function]",kh="[object Map]",jh="[object Number]",Ih="[object Object]",qh="[object RegExp]",Dh="[object Set]",Mh="[object String]",Ph="[object WeakMap]",Bh="[object ArrayBuffer]",$h="[object DataView]",Fh="[object Float32Array]",Uh="[object Float64Array]",Hh="[object Int8Array]",zh="[object Int16Array]",Gh="[object Int32Array]",Vh="[object Uint8Array]",Wh="[object Uint8ClampedArray]",Kh="[object Uint16Array]",Yh="[object Uint32Array]",fe={};fe[Fh]=fe[Uh]=fe[Hh]=fe[zh]=fe[Gh]=fe[Vh]=fe[Wh]=fe[Kh]=fe[Yh]=!0;fe[Sh]=fe[_h]=fe[Bh]=fe[Ch]=fe[$h]=fe[Oh]=fe[Rh]=fe[Lh]=fe[kh]=fe[jh]=fe[Ih]=fe[qh]=fe[Dh]=fe[Mh]=fe[Ph]=!1;function Xh(r){return ct(r)&&ll(r.length)&&!!fe[gr(r)]}function ji(r){return function(e){return r(e)}}var hl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gr=hl&&typeof module=="object"&&module&&!module.nodeType&&module,Zh=Gr&&Gr.exports===hl,Xs=Zh&&nl.process,fr=function(){try{var r=Gr&&Gr.require&&Gr.require("util").types;return r||Xs&&Xs.binding&&Xs.binding("util")}catch{}}(),Oa=fr&&fr.isTypedArray,Ii=Oa?ji(Oa):Xh,Jh=Object.prototype,Qh=Jh.hasOwnProperty;function dl(r,e){var t=It(r),n=!t&&hi(r),s=!t&&!n&&Kr(r),i=!t&&!n&&!s&&Ii(r),a=t||n||s||i,l=a?yh(r.length,String):[],c=l.length;for(var u in r)(e||Qh.call(r,u))&&!(a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||al(u,c)))&&l.push(u);return l}function fl(r,e){return function(t){return r(e(t))}}var ed=fl(Object.keys,Object),td=Object.prototype,rd=td.hasOwnProperty;function nd(r){if(!ki(r))return ed(r);var e=[];for(var t in Object(r))rd.call(r,t)&&t!="constructor"&&e.push(t);return e}function sd(r){return Yn(r)?dl(r):nd(r)}function id(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var ad=Object.prototype,od=ad.hasOwnProperty;function ld(r){if(!Nt(r))return id(r);var e=ki(r),t=[];for(var n in r)n=="constructor"&&(e||!od.call(r,n))||t.push(n);return t}function pl(r){return Yn(r)?dl(r,!0):ld(r)}var Yr=$t(Object,"create");function cd(){this.__data__=Yr?Yr(null):{},this.size=0}function ud(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var hd="__lodash_hash_undefined__",dd=Object.prototype,fd=dd.hasOwnProperty;function pd(r){var e=this.__data__;if(Yr){var t=e[r];return t===hd?void 0:t}return fd.call(e,r)?e[r]:void 0}var gd=Object.prototype,md=gd.hasOwnProperty;function bd(r){var e=this.__data__;return Yr?e[r]!==void 0:md.call(e,r)}var vd="__lodash_hash_undefined__";function yd(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=Yr&&e===void 0?vd:e,this}function qt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}qt.prototype.clear=cd;qt.prototype.delete=ud;qt.prototype.get=pd;qt.prototype.has=bd;qt.prototype.set=yd;function Ed(){this.__data__=[],this.size=0}function Xn(r,e){for(var t=r.length;t--;)if(tn(r[t][0],e))return t;return-1}var xd=Array.prototype,wd=xd.splice;function Nd(r){var e=this.__data__,t=Xn(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():wd.call(e,t,1),--this.size,!0}function Td(r){var e=this.__data__,t=Xn(e,r);return t<0?void 0:e[t][1]}function Ad(r){return Xn(this.__data__,r)>-1}function Sd(r,e){var t=this.__data__,n=Xn(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}function ht(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}ht.prototype.clear=Ed;ht.prototype.delete=Nd;ht.prototype.get=Td;ht.prototype.has=Ad;ht.prototype.set=Sd;var Xr=$t(tt,"Map");function _d(){this.size=0,this.__data__={hash:new qt,map:new(Xr||ht),string:new qt}}function Cd(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}function Zn(r,e){var t=r.__data__;return Cd(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Od(r){var e=Zn(this,r).delete(r);return this.size-=e?1:0,e}function Rd(r){return Zn(this,r).get(r)}function Ld(r){return Zn(this,r).has(r)}function kd(r,e){var t=Zn(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}function Ft(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Ft.prototype.clear=_d;Ft.prototype.delete=Od;Ft.prototype.get=Rd;Ft.prototype.has=Ld;Ft.prototype.set=kd;function jd(r,e){for(var t=-1,n=e.length,s=r.length;++t<n;)r[s+t]=e[t];return r}var gl=fl(Object.getPrototypeOf,Object),Id="[object Object]",qd=Function.prototype,Dd=Object.prototype,ml=qd.toString,Md=Dd.hasOwnProperty,Pd=ml.call(Object);function Bd(r){if(!ct(r)||gr(r)!=Id)return!1;var e=gl(r);if(e===null)return!0;var t=Md.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&ml.call(t)==Pd}function $d(){this.__data__=new ht,this.size=0}function Fd(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}function Ud(r){return this.__data__.get(r)}function Hd(r){return this.__data__.has(r)}var zd=200;function Gd(r,e){var t=this.__data__;if(t instanceof ht){var n=t.__data__;if(!Xr||n.length<zd-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new Ft(n)}return t.set(r,e),this.size=t.size,this}function Qe(r){var e=this.__data__=new ht(r);this.size=e.size}Qe.prototype.clear=$d;Qe.prototype.delete=Fd;Qe.prototype.get=Ud;Qe.prototype.has=Hd;Qe.prototype.set=Gd;var bl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ra=bl&&typeof module=="object"&&module&&!module.nodeType&&module,Vd=Ra&&Ra.exports===bl,La=Vd?tt.Buffer:void 0,ka=La?La.allocUnsafe:void 0;function vl(r,e){if(e)return r.slice();var t=r.length,n=ka?ka(t):new r.constructor(t);return r.copy(n),n}function Wd(r,e){for(var t=-1,n=r==null?0:r.length,s=0,i=[];++t<n;){var a=r[t];e(a,t,r)&&(i[s++]=a)}return i}function Kd(){return[]}var Yd=Object.prototype,Xd=Yd.propertyIsEnumerable,ja=Object.getOwnPropertySymbols,Zd=ja?function(r){return r==null?[]:(r=Object(r),Wd(ja(r),function(e){return Xd.call(r,e)}))}:Kd;function Jd(r,e,t){var n=e(r);return It(r)?n:jd(n,t(r))}function di(r){return Jd(r,sd,Zd)}var fi=$t(tt,"DataView"),pi=$t(tt,"Promise"),gi=$t(tt,"Set"),Ia="[object Map]",Qd="[object Object]",qa="[object Promise]",Da="[object Set]",Ma="[object WeakMap]",Pa="[object DataView]",ef=Bt(fi),tf=Bt(Xr),rf=Bt(pi),nf=Bt(gi),sf=Bt(ui),Ue=gr;(fi&&Ue(new fi(new ArrayBuffer(1)))!=Pa||Xr&&Ue(new Xr)!=Ia||pi&&Ue(pi.resolve())!=qa||gi&&Ue(new gi)!=Da||ui&&Ue(new ui)!=Ma)&&(Ue=function(r){var e=gr(r),t=e==Qd?r.constructor:void 0,n=t?Bt(t):"";if(n)switch(n){case ef:return Pa;case tf:return Ia;case rf:return qa;case nf:return Da;case sf:return Ma}return e});var af=Object.prototype,of=af.hasOwnProperty;function lf(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&of.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var zn=tt.Uint8Array;function qi(r){var e=new r.constructor(r.byteLength);return new zn(e).set(new zn(r)),e}function cf(r,e){var t=qi(r.buffer);return new r.constructor(t,r.byteOffset,r.byteLength)}var uf=/\w*$/;function hf(r){var e=new r.constructor(r.source,uf.exec(r));return e.lastIndex=r.lastIndex,e}var Ba=wt?wt.prototype:void 0,$a=Ba?Ba.valueOf:void 0;function df(r){return $a?Object($a.call(r)):{}}function yl(r,e){var t=e?qi(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var ff="[object Boolean]",pf="[object Date]",gf="[object Map]",mf="[object Number]",bf="[object RegExp]",vf="[object Set]",yf="[object String]",Ef="[object Symbol]",xf="[object ArrayBuffer]",wf="[object DataView]",Nf="[object Float32Array]",Tf="[object Float64Array]",Af="[object Int8Array]",Sf="[object Int16Array]",_f="[object Int32Array]",Cf="[object Uint8Array]",Of="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Lf="[object Uint32Array]";function kf(r,e,t){var n=r.constructor;switch(e){case xf:return qi(r);case ff:case pf:return new n(+r);case wf:return cf(r);case Nf:case Tf:case Af:case Sf:case _f:case Cf:case Of:case Rf:case Lf:return yl(r,t);case gf:return new n;case mf:case yf:return new n(r);case bf:return hf(r);case vf:return new n;case Ef:return df(r)}}function El(r){return typeof r.constructor=="function"&&!ki(r)?Zu(gl(r)):{}}var jf="[object Map]";function If(r){return ct(r)&&Ue(r)==jf}var Fa=fr&&fr.isMap,qf=Fa?ji(Fa):If,Df="[object Set]";function Mf(r){return ct(r)&&Ue(r)==Df}var Ua=fr&&fr.isSet,Pf=Ua?ji(Ua):Mf,Bf=1,xl="[object Arguments]",$f="[object Array]",Ff="[object Boolean]",Uf="[object Date]",Hf="[object Error]",wl="[object Function]",zf="[object GeneratorFunction]",Gf="[object Map]",Vf="[object Number]",Nl="[object Object]",Wf="[object RegExp]",Kf="[object Set]",Yf="[object String]",Xf="[object Symbol]",Zf="[object WeakMap]",Jf="[object ArrayBuffer]",Qf="[object DataView]",ep="[object Float32Array]",tp="[object Float64Array]",rp="[object Int8Array]",np="[object Int16Array]",sp="[object Int32Array]",ip="[object Uint8Array]",ap="[object Uint8ClampedArray]",op="[object Uint16Array]",lp="[object Uint32Array]",de={};de[xl]=de[$f]=de[Jf]=de[Qf]=de[Ff]=de[Uf]=de[ep]=de[tp]=de[rp]=de[np]=de[sp]=de[Gf]=de[Vf]=de[Nl]=de[Wf]=de[Kf]=de[Yf]=de[Xf]=de[ip]=de[ap]=de[op]=de[lp]=!0;de[Hf]=de[wl]=de[Zf]=!1;function $n(r,e,t,n,s,i){var a,l=e&Bf;if(a!==void 0)return a;if(!Nt(r))return r;var c=It(r);if(c)a=lf(r);else{var u=Ue(r),h=u==wl||u==zf;if(Kr(r))return vl(r,l);if(u==Nl||u==xl||h&&!s)a=h?{}:El(r);else{if(!de[u])return s?r:{};a=kf(r,u,l)}}i||(i=new Qe);var g=i.get(r);if(g)return g;i.set(r,a),Pf(r)?r.forEach(function(x){a.add($n(x,e,t,x,r,i))}):qf(r)&&r.forEach(function(x,y){a.set(y,$n(x,e,t,y,r,i))});var f=di,b=c?void 0:f(r);return oh(b||r,function(x,y){b&&(y=x,x=r[y]),ol(a,y,$n(x,e,t,y,r,i))}),a}var cp=1,up=4;function ur(r){return $n(r,cp|up)}var hp="__lodash_hash_undefined__";function dp(r){return this.__data__.set(r,hp),this}function fp(r){return this.__data__.has(r)}function Gn(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new Ft;++e<t;)this.add(r[e])}Gn.prototype.add=Gn.prototype.push=dp;Gn.prototype.has=fp;function pp(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}function gp(r,e){return r.has(e)}var mp=1,bp=2;function Tl(r,e,t,n,s,i){var a=t&mp,l=r.length,c=e.length;if(l!=c&&!(a&&c>l))return!1;var u=i.get(r),h=i.get(e);if(u&&h)return u==e&&h==r;var g=-1,f=!0,b=t&bp?new Gn:void 0;for(i.set(r,e),i.set(e,r);++g<l;){var x=r[g],y=e[g];if(n)var N=a?n(y,x,g,e,r,i):n(x,y,g,r,e,i);if(N!==void 0){if(N)continue;f=!1;break}if(b){if(!pp(e,function(S,_){if(!gp(b,_)&&(x===S||s(x,S,t,n,i)))return b.push(_)})){f=!1;break}}else if(!(x===y||s(x,y,t,n,i))){f=!1;break}}return i.delete(r),i.delete(e),f}function vp(r){var e=-1,t=Array(r.size);return r.forEach(function(n,s){t[++e]=[s,n]}),t}function yp(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var Ep=1,xp=2,wp="[object Boolean]",Np="[object Date]",Tp="[object Error]",Ap="[object Map]",Sp="[object Number]",_p="[object RegExp]",Cp="[object Set]",Op="[object String]",Rp="[object Symbol]",Lp="[object ArrayBuffer]",kp="[object DataView]",Ha=wt?wt.prototype:void 0,Zs=Ha?Ha.valueOf:void 0;function jp(r,e,t,n,s,i,a){switch(t){case kp:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case Lp:return!(r.byteLength!=e.byteLength||!i(new zn(r),new zn(e)));case wp:case Np:case Sp:return tn(+r,+e);case Tp:return r.name==e.name&&r.message==e.message;case _p:case Op:return r==e+"";case Ap:var l=vp;case Cp:var c=n&Ep;if(l||(l=yp),r.size!=e.size&&!c)return!1;var u=a.get(r);if(u)return u==e;n|=xp,a.set(r,e);var h=Tl(l(r),l(e),n,s,i,a);return a.delete(r),h;case Rp:if(Zs)return Zs.call(r)==Zs.call(e)}return!1}var Ip=1,qp=Object.prototype,Dp=qp.hasOwnProperty;function Mp(r,e,t,n,s,i){var a=t&Ip,l=di(r),c=l.length,u=di(e),h=u.length;if(c!=h&&!a)return!1;for(var g=c;g--;){var f=l[g];if(!(a?f in e:Dp.call(e,f)))return!1}var b=i.get(r),x=i.get(e);if(b&&x)return b==e&&x==r;var y=!0;i.set(r,e),i.set(e,r);for(var N=a;++g<c;){f=l[g];var S=r[f],_=e[f];if(n)var j=a?n(_,S,f,e,r,i):n(S,_,f,r,e,i);if(!(j===void 0?S===_||s(S,_,t,n,i):j)){y=!1;break}N||(N=f=="constructor")}if(y&&!N){var $=r.constructor,m=e.constructor;$!=m&&"constructor"in r&&"constructor"in e&&!(typeof $=="function"&&$ instanceof $&&typeof m=="function"&&m instanceof m)&&(y=!1)}return i.delete(r),i.delete(e),y}var Pp=1,za="[object Arguments]",Ga="[object Array]",Rn="[object Object]",Bp=Object.prototype,Va=Bp.hasOwnProperty;function $p(r,e,t,n,s,i){var a=It(r),l=It(e),c=a?Ga:Ue(r),u=l?Ga:Ue(e);c=c==za?Rn:c,u=u==za?Rn:u;var h=c==Rn,g=u==Rn,f=c==u;if(f&&Kr(r)){if(!Kr(e))return!1;a=!0,h=!1}if(f&&!h)return i||(i=new Qe),a||Ii(r)?Tl(r,e,t,n,s,i):jp(r,e,c,t,n,s,i);if(!(t&Pp)){var b=h&&Va.call(r,"__wrapped__"),x=g&&Va.call(e,"__wrapped__");if(b||x){var y=b?r.value():r,N=x?e.value():e;return i||(i=new Qe),s(y,N,t,n,i)}}return f?(i||(i=new Qe),Mp(r,e,t,n,s,i)):!1}function Al(r,e,t,n,s){return r===e?!0:r==null||e==null||!ct(r)&&!ct(e)?r!==r&&e!==e:$p(r,e,t,n,Al,s)}function Fp(r){return function(e,t,n){for(var s=-1,i=Object(e),a=n(e),l=a.length;l--;){var c=a[++s];if(t(i[c],c,i)===!1)break}return e}}var Up=Fp();function mi(r,e,t){(t!==void 0&&!tn(r[e],t)||t===void 0&&!(e in r))&&Li(r,e,t)}function Hp(r){return ct(r)&&Yn(r)}function bi(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}function zp(r){return dh(r,pl(r))}function Gp(r,e,t,n,s,i,a){var l=bi(r,t),c=bi(e,t),u=a.get(c);if(u){mi(r,t,u);return}var h=i?i(l,c,t+"",r,e,a):void 0,g=h===void 0;if(g){var f=It(c),b=!f&&Kr(c),x=!f&&!b&&Ii(c);h=c,f||b||x?It(l)?h=l:Hp(l)?h=Qu(l):b?(g=!1,h=vl(c,!0)):x?(g=!1,h=yl(c,!0)):h=[]:Bd(c)||hi(c)?(h=l,hi(l)?h=zp(l):(!Nt(l)||Ri(l))&&(h=El(c))):g=!1}g&&(a.set(c,h),s(h,c,n,i,a),a.delete(c)),mi(r,t,h)}function Sl(r,e,t,n,s){r!==e&&Up(e,function(i,a){if(s||(s=new Qe),Nt(i))Gp(r,e,a,t,Sl,n,s);else{var l=n?n(bi(r,a),i,a+"",r,e,s):void 0;l===void 0&&(l=i),mi(r,a,l)}},pl)}function mt(r,e){return Al(r,e)}var Et=bh(function(r,e,t){Sl(r,e,t)}),V=(r=>(r[r.TYPE=3]="TYPE",r[r.LEVEL=12]="LEVEL",r[r.ATTRIBUTE=13]="ATTRIBUTE",r[r.BLOT=14]="BLOT",r[r.INLINE=7]="INLINE",r[r.BLOCK=11]="BLOCK",r[r.BLOCK_BLOT=10]="BLOCK_BLOT",r[r.INLINE_BLOT=6]="INLINE_BLOT",r[r.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",r[r.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",r[r.ANY=15]="ANY",r))(V||{});class et{constructor(e,t,n={}){this.attrName=e,this.keyName=t;const s=V.TYPE&V.ATTRIBUTE;this.scope=n.scope!=null?n.scope&V.LEVEL|s:V.ATTRIBUTE,n.whitelist!=null&&(this.whitelist=n.whitelist)}static keys(e){return Array.from(e.attributes).map(t=>t.name)}add(e,t){return this.canAdd(e,t)?(e.setAttribute(this.keyName,t),!0):!1}canAdd(e,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class hr extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const _l=class vi{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let n=null;try{n=e.parentNode}catch{return null}return this.find(n,t)}return null}create(e,t,n){const s=this.query(t);if(s==null)throw new hr(`Unable to create ${t} blot`);const i=s,a=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(n),l=new i(e,a,n);return vi.blots.set(l.domNode,l),l}find(e,t=!1){return vi.find(e,t)}query(e,t=V.ANY){let n;return typeof e=="string"?n=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?n=this.types.text:typeof e=="number"?e&V.LEVEL&V.BLOCK?n=this.types.block:e&V.LEVEL&V.INLINE&&(n=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(s=>(n=this.classes[s],!!n)),n=n||this.tags[e.tagName]),n==null?null:"scope"in n&&t&V.LEVEL&n.scope&&t&V.TYPE&n.scope?n:null}register(...e){return e.map(t=>{const n="blotName"in t,s="attrName"in t;if(!n&&!s)throw new hr("Invalid definition");if(n&&t.blotName==="abstract")throw new hr("Cannot register abstract class");const i=n?t.blotName:s?t.attrName:void 0;return this.types[i]=t,s?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):n&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(a=>a.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(a=>{(this.tags[a]==null||t.className==null)&&(this.tags[a]=t)}))),t})}};_l.blots=new WeakMap;let pr=_l;function Wa(r,e){return(r.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${e}-`)===0)}class Vp extends et{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(e,t){return this.canAdd(e,t)?(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0):!1}remove(e){Wa(e,this.keyName).forEach(t=>{e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const t=(Wa(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}}const We=Vp;function Js(r){const e=r.split("-"),t=e.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("");return e[0]+t}class Wp extends et{static keys(e){return(e.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(e,t){return this.canAdd(e,t)?(e.style[Js(this.keyName)]=t,!0):!1}remove(e){e.style[Js(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[Js(this.keyName)];return this.canAdd(e,t)?t:""}}const Tt=Wp;class Kp{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=pr.find(this.domNode);if(e==null)return;const t=et.keys(this.domNode),n=We.keys(this.domNode),s=Tt.keys(this.domNode);t.concat(n).concat(s).forEach(i=>{const a=e.scroll.query(i,V.ATTRIBUTE);a instanceof et&&(this.attributes[a.attrName]=a)})}copy(e){Object.keys(this.attributes).forEach(t=>{const n=this.attributes[t].value(this.domNode);e.format(t,n)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e),{})}}const Jn=Kp,Cl=class{constructor(e,t){this.scroll=e,this.domNode=t,pr.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new hr("Blot definition missing tagName");let t,n;return Array.isArray(this.tagName)?(typeof e=="string"?(n=e.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):typeof e=="number"&&(n=e),typeof n=="number"?t=document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?t=document.createElement(n):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),pr.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,n,s){const i=this.isolate(e,t);if(this.scroll.query(n,V.BLOT)!=null&&s)i.wrap(n,s);else if(this.scroll.query(n,V.ATTRIBUTE)!=null){const a=this.scroll.create(this.statics.scope);i.wrap(a),a.format(n,s)}}insertAt(e,t,n){const s=n==null?this.scroll.create("text",t):this.scroll.create(t,n),i=this.split(e);this.parent.insertBefore(s,i||void 0)}isolate(e,t){const n=this.split(e);if(n==null)throw new Error("Attempt to isolate at end");return n.split(t),n}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(n,this.next||void 0),typeof n.appendChild!="function")throw new hr(`Cannot wrap ${e}`);return n.appendChild(this),n}};Cl.blotName="abstract";let Ol=Cl;const Rl=class extends Ol{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Rl.scope=V.INLINE_BLOT;let Yp=Rl;const Ae=Yp;class Xp{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let n=t();for(;n&&e>0;)e-=1,n=t();return n}contains(e){const t=this.iterator();let n=t();for(;n;){if(n===e)return!0;n=t()}return!1}indexOf(e){const t=this.iterator();let n=t(),s=0;for(;n;){if(n===e)return s;s+=1,n=t()}return-1}insertBefore(e,t){e!=null&&(this.remove(e),e.next=t,t!=null?(e.prev=t.prev,t.prev!=null&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,n=this.head;for(;n!=null;){if(n===e)return t;t+=n.length(),n=n.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return e!=null&&(e=e.next),t}}find(e,t=!1){const n=this.iterator();let s=n();for(;s;){const i=s.length();if(e<i||t&&e===i&&(s.next==null||s.next.length()!==0))return[s,e];e-=i,s=n()}return[null,0]}forEach(e){const t=this.iterator();let n=t();for(;n;)e(n),n=t()}forEachAt(e,t,n){if(t<=0)return;const[s,i]=this.find(e);let a=e-i;const l=this.iterator(s);let c=l();for(;c&&a<e+t;){const u=c.length();e>a?n(c,e-a,Math.min(t,a+u-e)):n(c,0,Math.min(u,e+t-a)),a+=u,c=l()}}map(e){return this.reduce((t,n)=>(t.push(e(n)),t),[])}reduce(e,t){const n=this.iterator();let s=n();for(;s;)t=e(t,s),s=n();return t}}function Ka(r,e){const t=e.find(r);if(t)return t;try{return e.create(r)}catch{const n=e.create(V.INLINE);return Array.from(r.childNodes).forEach(s=>{n.domNode.appendChild(s)}),r.parentNode&&r.parentNode.replaceChild(n.domNode,r),n.attach(),n}}const Ll=class gt extends Ol{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,gt.uiClass&&this.uiNode.classList.add(gt.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new Xp,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const t=Ka(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof hr)return;throw t}})}deleteAt(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,(n,s,i)=>{n.deleteAt(s,i)})}descendant(e,t=0){const[n,s]=this.children.find(t);return e.blotName==null&&e(n)||e.blotName!=null&&n instanceof e?[n,s]:n instanceof gt?n.descendant(e,s):[null,-1]}descendants(e,t=0,n=Number.MAX_VALUE){let s=[],i=n;return this.children.forEachAt(t,n,(a,l,c)=>{(e.blotName==null&&e(a)||e.blotName!=null&&a instanceof e)&&s.push(a),a instanceof gt&&(s=s.concat(a.descendants(e,l,i))),i-=c}),s}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(t=>{e||this.statics.allowedChildren.some(n=>t instanceof n)||(t.statics.scope===V.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),e=!0):t instanceof gt?t.unwrap():t.remove())})}formatAt(e,t,n,s){this.children.forEachAt(e,t,(i,a,l)=>{i.formatAt(a,l,n,s)})}insertAt(e,t,n){const[s,i]=this.children.find(e);if(s)s.insertAt(i,t,n);else{const a=n==null?this.scroll.create("text",t):this.scroll.create(t,n);this.appendChild(a)}}insertBefore(e,t){e.parent!=null&&e.parent.children.remove(e);let n=null;this.children.insertBefore(e,t||null),e.parent=this,t!=null&&(n=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(e.domNode,n),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(n=>{e.insertBefore(n,t)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,t=!1){const[n,s]=this.children.find(e,t),i=[[this,e]];return n instanceof gt?i.concat(n.path(s,t)):(n!=null&&i.push([n,s]),i)}removeChild(e){this.children.remove(e)}replaceWith(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;return n instanceof gt&&this.moveChildren(n),super.replaceWith(n)}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(e,this.length(),(s,i,a)=>{const l=s.split(i,t);l!=null&&n.appendChild(l)}),n}splitAfter(e){const t=this.clone();for(;e.next!=null;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const n=[],s=[];e.forEach(i=>{i.target===this.domNode&&i.type==="childList"&&(n.push(...i.addedNodes),s.push(...i.removedNodes))}),s.forEach(i=>{if(i.parentNode!=null&&i.tagName!=="IFRAME"&&document.body.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const a=this.scroll.find(i);a!=null&&(a.domNode.parentNode==null||a.domNode.parentNode===this.domNode)&&a.detach()}),n.filter(i=>i.parentNode===this.domNode&&i!==this.uiNode).sort((i,a)=>i===a?0:i.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(i=>{let a=null;i.nextSibling!=null&&(a=this.scroll.find(i.nextSibling));const l=Ka(i,this.scroll);(l.next!==a||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,a||void 0))}),this.enforceAllowedChildren()}};Ll.uiClass="";let Zp=Ll;const Ge=Zp;function Jp(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(r[t]!==e[t])return!1;return!0}const ir=class ar extends Ge{static create(e){return super.create(e)}static formats(e,t){const n=t.query(ar.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Jn(this.domNode)}format(e,t){if(e===this.statics.blotName&&!t)this.children.forEach(n=>{n instanceof ar||(n=n.wrap(ar.blotName,!0)),this.attributes.copy(n)}),this.unwrap();else{const n=this.scroll.query(e,V.INLINE);if(n==null)return;n instanceof et?this.attributes.attribute(n,t):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)}}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,s){this.formats()[n]!=null||this.scroll.query(n,V.ATTRIBUTE)?this.isolate(e,t).format(n,s):super.formatAt(e,t,n,s)}optimize(e){super.optimize(e);const t=this.formats();if(Object.keys(t).length===0)return this.unwrap();const n=this.next;n instanceof ar&&n.prev===this&&Jp(t,n.formats())&&(n.moveChildren(this),n.remove())}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}wrap(e,t){const n=super.wrap(e,t);return n instanceof ar&&this.attributes.move(n),n}};ir.allowedChildren=[ir,Ae],ir.blotName="inline",ir.scope=V.INLINE_BLOT,ir.tagName="SPAN";let Qp=ir;const Di=Qp,or=class yi extends Ge{static create(e){return super.create(e)}static formats(e,t){const n=t.query(yi.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Jn(this.domNode)}format(e,t){const n=this.scroll.query(e,V.BLOCK);n!=null&&(n instanceof et?this.attributes.attribute(n,t):e===this.statics.blotName&&!t?this.replaceWith(yi.blotName):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,s){this.scroll.query(n,V.BLOCK)!=null?this.format(n,s):super.formatAt(e,t,n,s)}insertAt(e,t,n){if(n==null||this.scroll.query(t,V.INLINE)!=null)super.insertAt(e,t,n);else{const s=this.split(e);if(s!=null){const i=this.scroll.create(t,n);s.parent.insertBefore(i,s)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}};or.blotName="block",or.scope=V.BLOCK_BLOT,or.tagName="P",or.allowedChildren=[Di,or,Ae];let eg=or;const Zr=eg,Ei=class extends Ge{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,n,s){super.formatAt(e,t,n,s),this.enforceAllowedChildren()}insertAt(e,t,n){super.insertAt(e,t,n),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Ei.blotName="container",Ei.scope=V.BLOCK_BLOT;let tg=Ei;const Qn=tg;class rg extends Ae{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,n,s){e===0&&t===this.length()?this.format(n,s):super.formatAt(e,t,n,s)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const ke=rg,ng={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},sg=100,lr=class extends Ge{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(n=>{this.update(n)}),this.observer.observe(this.domNode,ng),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const n=this.registry.find(e,t);return n?n.scroll===this?n:t?this.find(n.scroll.domNode.parentNode,!0):null:null}query(e,t=V.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),e===0&&t===this.length()?this.children.forEach(n=>{n.remove()}):super.deleteAt(e,t)}formatAt(e,t,n,s){this.update(),super.formatAt(e,t,n,s)}insertAt(e,t,n){this.update(),super.insertAt(e,t,n)}optimize(e=[],t={}){super.optimize(t);const n=t.mutationsMap||new WeakMap;let s=Array.from(this.observer.takeRecords());for(;s.length>0;)e.push(s.pop());const i=(c,u=!0)=>{c==null||c===this||c.domNode.parentNode!=null&&(n.has(c.domNode)||n.set(c.domNode,[]),u&&i(c.parent))},a=c=>{n.has(c.domNode)&&(c instanceof Ge&&c.children.forEach(a),n.delete(c.domNode),c.optimize(t))};let l=e;for(let c=0;l.length>0;c+=1){if(c>=sg)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(u=>{const h=this.find(u.target,!0);h!=null&&(h.domNode===u.target&&(u.type==="childList"?(i(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(g=>{const f=this.find(g,!1);i(f,!1),f instanceof Ge&&f.children.forEach(b=>{i(b,!1)})})):u.type==="attributes"&&i(h.prev)),i(h))}),this.children.forEach(a),l=Array.from(this.observer.takeRecords()),s=l.slice();s.length>0;)e.push(s.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const n=new WeakMap;e.map(s=>{const i=this.find(s.target,!0);return i==null?null:n.has(i.domNode)?(n.get(i.domNode).push(s),null):(n.set(i.domNode,[s]),i)}).forEach(s=>{s!=null&&s!==this&&n.has(s.domNode)&&s.update(n.get(s.domNode)||[],t)}),t.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),t),this.optimize(e,t)}};lr.blotName="scroll",lr.defaultChild=Zr,lr.allowedChildren=[Zr,Qn],lr.scope=V.BLOCK_BLOT,lr.tagName="DIV";let ig=lr;const Mi=ig,xi=class kl extends Ae{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,n){n==null?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,n)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof kl&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(e,t){e.some(n=>n.type==="characterData"&&n.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};xi.blotName="text",xi.scope=V.INLINE_BLOT;let ag=xi;const Vn=ag,og=Object.freeze(Object.defineProperty({__proto__:null,Attributor:et,AttributorStore:Jn,BlockBlot:Zr,ClassAttributor:We,ContainerBlot:Qn,EmbedBlot:ke,InlineBlot:Di,LeafBlot:Ae,ParentBlot:Ge,Registry:pr,Scope:V,ScrollBlot:Mi,StyleAttributor:Tt,TextBlot:Vn},Symbol.toStringTag,{value:"Module"}));var Ln={exports:{}},Qs,Ya;function lg(){if(Ya)return Qs;Ya=1;var r=-1,e=1,t=0;function n(v,q,w,O,D){if(v===q)return v?[[t,v]]:[];if(w!=null){var I=Z(v,q,w);if(I)return I}var M=l(v,q),U=v.substring(0,M);v=v.substring(M),q=q.substring(M),M=u(v,q);var W=v.substring(v.length-M);v=v.substring(0,v.length-M),q=q.substring(0,q.length-M);var A=s(v,q);return U&&A.unshift([t,U]),W&&A.push([t,W]),_(A,D),O&&g(A),A}function s(v,q){var w;if(!v)return[[e,q]];if(!q)return[[r,v]];var O=v.length>q.length?v:q,D=v.length>q.length?q:v,I=O.indexOf(D);if(I!==-1)return w=[[e,O.substring(0,I)],[t,D],[e,O.substring(I+D.length)]],v.length>q.length&&(w[0][0]=w[2][0]=r),w;if(D.length===1)return[[r,v],[e,q]];var M=h(v,q);if(M){var U=M[0],W=M[1],A=M[2],B=M[3],F=M[4],X=n(U,A),J=n(W,B);return X.concat([[t,F]],J)}return i(v,q)}function i(v,q){for(var w=v.length,O=q.length,D=Math.ceil((w+O)/2),I=D,M=2*D,U=new Array(M),W=new Array(M),A=0;A<M;A++)U[A]=-1,W[A]=-1;U[I+1]=0,W[I+1]=0;for(var B=w-O,F=B%2!==0,X=0,J=0,H=0,le=0,ue=0;ue<D;ue++){for(var K=-ue+X;K<=ue-J;K+=2){var re=I+K,ne;K===-ue||K!==ue&&U[re-1]<U[re+1]?ne=U[re+1]:ne=U[re-1]+1;for(var ie=ne-K;ne<w&&ie<O&&v.charAt(ne)===q.charAt(ie);)ne++,ie++;if(U[re]=ne,ne>w)J+=2;else if(ie>O)X+=2;else if(F){var ce=I+B-K;if(ce>=0&&ce<M&&W[ce]!==-1){var he=w-W[ce];if(ne>=he)return a(v,q,ne,ie)}}}for(var pe=-ue+H;pe<=ue-le;pe+=2){var ce=I+pe,he;pe===-ue||pe!==ue&&W[ce-1]<W[ce+1]?he=W[ce+1]:he=W[ce-1]+1;for(var xe=he-pe;he<w&&xe<O&&v.charAt(w-he-1)===q.charAt(O-xe-1);)he++,xe++;if(W[ce]=he,he>w)le+=2;else if(xe>O)H+=2;else if(!F){var re=I+B-pe;if(re>=0&&re<M&&U[re]!==-1){var ne=U[re],ie=I+ne-re;if(he=w-he,ne>=he)return a(v,q,ne,ie)}}}}return[[r,v],[e,q]]}function a(v,q,w,O){var D=v.substring(0,w),I=q.substring(0,O),M=v.substring(w),U=q.substring(O),W=n(D,I),A=n(M,U);return W.concat(A)}function l(v,q){if(!v||!q||v.charAt(0)!==q.charAt(0))return 0;for(var w=0,O=Math.min(v.length,q.length),D=O,I=0;w<D;)v.substring(I,D)==q.substring(I,D)?(w=D,I=w):O=D,D=Math.floor((O-w)/2+w);return j(v.charCodeAt(D-1))&&D--,D}function c(v,q){var w=v.length,O=q.length;if(w==0||O==0)return 0;w>O?v=v.substring(w-O):w<O&&(q=q.substring(0,w));var D=Math.min(w,O);if(v==q)return D;for(var I=0,M=1;;){var U=v.substring(D-M),W=q.indexOf(U);if(W==-1)return I;M+=W,(W==0||v.substring(D-M)==q.substring(0,M))&&(I=M,M++)}}function u(v,q){if(!v||!q||v.slice(-1)!==q.slice(-1))return 0;for(var w=0,O=Math.min(v.length,q.length),D=O,I=0;w<D;)v.substring(v.length-D,v.length-I)==q.substring(q.length-D,q.length-I)?(w=D,I=w):O=D,D=Math.floor((O-w)/2+w);return $(v.charCodeAt(v.length-D))&&D--,D}function h(v,q){var w=v.length>q.length?v:q,O=v.length>q.length?q:v;if(w.length<4||O.length*2<w.length)return null;function D(J,H,le){for(var ue=J.substring(le,le+Math.floor(J.length/4)),K=-1,re="",ne,ie,ce,he;(K=H.indexOf(ue,K+1))!==-1;){var pe=l(J.substring(le),H.substring(K)),xe=u(J.substring(0,le),H.substring(0,K));re.length<xe+pe&&(re=H.substring(K-xe,K)+H.substring(K,K+pe),ne=J.substring(0,le-xe),ie=J.substring(le+pe),ce=H.substring(0,K-xe),he=H.substring(K+pe))}return re.length*2>=J.length?[ne,ie,ce,he,re]:null}var I=D(w,O,Math.ceil(w.length/4)),M=D(w,O,Math.ceil(w.length/2)),U;if(!I&&!M)return null;M?I?U=I[4].length>M[4].length?I:M:U=M:U=I;var W,A,B,F;v.length>q.length?(W=U[0],A=U[1],B=U[2],F=U[3]):(B=U[0],F=U[1],W=U[2],A=U[3]);var X=U[4];return[W,A,B,F,X]}function g(v){for(var q=!1,w=[],O=0,D=null,I=0,M=0,U=0,W=0,A=0;I<v.length;)v[I][0]==t?(w[O++]=I,M=W,U=A,W=0,A=0,D=v[I][1]):(v[I][0]==e?W+=v[I][1].length:A+=v[I][1].length,D&&D.length<=Math.max(M,U)&&D.length<=Math.max(W,A)&&(v.splice(w[O-1],0,[r,D]),v[w[O-1]+1][0]=e,O--,O--,I=O>0?w[O-1]:-1,M=0,U=0,W=0,A=0,D=null,q=!0)),I++;for(q&&_(v),S(v),I=1;I<v.length;){if(v[I-1][0]==r&&v[I][0]==e){var B=v[I-1][1],F=v[I][1],X=c(B,F),J=c(F,B);X>=J?(X>=B.length/2||X>=F.length/2)&&(v.splice(I,0,[t,F.substring(0,X)]),v[I-1][1]=B.substring(0,B.length-X),v[I+1][1]=F.substring(X),I++):(J>=B.length/2||J>=F.length/2)&&(v.splice(I,0,[t,B.substring(0,J)]),v[I-1][0]=e,v[I-1][1]=F.substring(0,F.length-J),v[I+1][0]=r,v[I+1][1]=B.substring(J),I++),I++}I++}}var f=/[^a-zA-Z0-9]/,b=/\s/,x=/[\r\n]/,y=/\n\r?\n$/,N=/^\r?\n\r?\n/;function S(v){function q(J,H){if(!J||!H)return 6;var le=J.charAt(J.length-1),ue=H.charAt(0),K=le.match(f),re=ue.match(f),ne=K&&le.match(b),ie=re&&ue.match(b),ce=ne&&le.match(x),he=ie&&ue.match(x),pe=ce&&J.match(y),xe=he&&H.match(N);return pe||xe?5:ce||he?4:K&&!ne&&ie?3:ne||ie?2:K||re?1:0}for(var w=1;w<v.length-1;){if(v[w-1][0]==t&&v[w+1][0]==t){var O=v[w-1][1],D=v[w][1],I=v[w+1][1],M=u(O,D);if(M){var U=D.substring(D.length-M);O=O.substring(0,O.length-M),D=U+D.substring(0,D.length-M),I=U+I}for(var W=O,A=D,B=I,F=q(O,D)+q(D,I);D.charAt(0)===I.charAt(0);){O+=D.charAt(0),D=D.substring(1)+I.charAt(0),I=I.substring(1);var X=q(O,D)+q(D,I);X>=F&&(F=X,W=O,A=D,B=I)}v[w-1][1]!=W&&(W?v[w-1][1]=W:(v.splice(w-1,1),w--),v[w][1]=A,B?v[w+1][1]=B:(v.splice(w+1,1),w--))}w++}}function _(v,q){v.push([t,""]);for(var w=0,O=0,D=0,I="",M="",U;w<v.length;){if(w<v.length-1&&!v[w][1]){v.splice(w,1);continue}switch(v[w][0]){case e:D++,M+=v[w][1],w++;break;case r:O++,I+=v[w][1],w++;break;case t:var W=w-D-O-1;if(q){if(W>=0&&T(v[W][1])){var A=v[W][1].slice(-1);if(v[W][1]=v[W][1].slice(0,-1),I=A+I,M=A+M,!v[W][1]){v.splice(W,1),w--;var B=W-1;v[B]&&v[B][0]===e&&(D++,M=v[B][1]+M,B--),v[B]&&v[B][0]===r&&(O++,I=v[B][1]+I,B--),W=B}}if(m(v[w][1])){var A=v[w][1].charAt(0);v[w][1]=v[w][1].slice(1),I+=A,M+=A}}if(w<v.length-1&&!v[w][1]){v.splice(w,1);break}if(I.length>0||M.length>0){I.length>0&&M.length>0&&(U=l(M,I),U!==0&&(W>=0?v[W][1]+=M.substring(0,U):(v.splice(0,0,[t,M.substring(0,U)]),w++),M=M.substring(U),I=I.substring(U)),U=u(M,I),U!==0&&(v[w][1]=M.substring(M.length-U)+v[w][1],M=M.substring(0,M.length-U),I=I.substring(0,I.length-U)));var F=D+O;I.length===0&&M.length===0?(v.splice(w-F,F),w=w-F):I.length===0?(v.splice(w-F,F,[e,M]),w=w-F+1):M.length===0?(v.splice(w-F,F,[r,I]),w=w-F+1):(v.splice(w-F,F,[r,I],[e,M]),w=w-F+2)}w!==0&&v[w-1][0]===t?(v[w-1][1]+=v[w][1],v.splice(w,1)):w++,D=0,O=0,I="",M="";break}}v[v.length-1][1]===""&&v.pop();var X=!1;for(w=1;w<v.length-1;)v[w-1][0]===t&&v[w+1][0]===t&&(v[w][1].substring(v[w][1].length-v[w-1][1].length)===v[w-1][1]?(v[w][1]=v[w-1][1]+v[w][1].substring(0,v[w][1].length-v[w-1][1].length),v[w+1][1]=v[w-1][1]+v[w+1][1],v.splice(w-1,1),X=!0):v[w][1].substring(0,v[w+1][1].length)==v[w+1][1]&&(v[w-1][1]+=v[w+1][1],v[w][1]=v[w][1].substring(v[w+1][1].length)+v[w+1][1],v.splice(w+1,1),X=!0)),w++;X&&_(v,q)}function j(v){return v>=55296&&v<=56319}function $(v){return v>=56320&&v<=57343}function m(v){return $(v.charCodeAt(0))}function T(v){return j(v.charCodeAt(v.length-1))}function k(v){for(var q=[],w=0;w<v.length;w++)v[w][1].length>0&&q.push(v[w]);return q}function P(v,q,w,O){return T(v)||m(O)?null:k([[t,v],[r,q],[e,w],[t,O]])}function Z(v,q,w){var O=typeof w=="number"?{index:w,length:0}:w.oldRange,D=typeof w=="number"?null:w.newRange,I=v.length,M=q.length;if(O.length===0&&(D===null||D.length===0)){var U=O.index,W=v.slice(0,U),A=v.slice(U),B=D?D.index:null;e:{var F=U+M-I;if(B!==null&&B!==F||F<0||F>M)break e;var X=q.slice(0,F),J=q.slice(F);if(J!==A)break e;var H=Math.min(U,F),le=W.slice(0,H),ue=X.slice(0,H);if(le!==ue)break e;var K=W.slice(H),re=X.slice(H);return P(le,K,re,A)}e:{if(B!==null&&B!==U)break e;var ne=U,X=q.slice(0,ne),J=q.slice(ne);if(X!==W)break e;var ie=Math.min(I-ne,M-ne),ce=A.slice(A.length-ie),he=J.slice(J.length-ie);if(ce!==he)break e;var K=A.slice(0,A.length-ie),re=J.slice(0,J.length-ie);return P(W,K,re,ce)}}if(O.length>0&&D&&D.length===0)e:{var le=v.slice(0,O.index),ce=v.slice(O.index+O.length),H=le.length,ie=ce.length;if(M<H+ie)break e;var ue=q.slice(0,H),he=q.slice(M-ie);if(le!==ue||ce!==he)break e;var K=v.slice(H,I-ie),re=q.slice(H,M-ie);return P(le,K,re,ce)}return null}function te(v,q,w,O){return n(v,q,w,O,!0)}return te.INSERT=e,te.DELETE=r,te.EQUAL=t,Qs=te,Qs}var Ur={exports:{}};Ur.exports;var Xa;function jl(){return Xa||(Xa=1,function(r,e){var t=200,n="__lodash_hash_undefined__",s=9007199254740991,i="[object Arguments]",a="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",h="[object Function]",g="[object GeneratorFunction]",f="[object Map]",b="[object Number]",x="[object Object]",y="[object Promise]",N="[object RegExp]",S="[object Set]",_="[object String]",j="[object Symbol]",$="[object WeakMap]",m="[object ArrayBuffer]",T="[object DataView]",k="[object Float32Array]",P="[object Float64Array]",Z="[object Int8Array]",te="[object Int16Array]",v="[object Int32Array]",q="[object Uint8Array]",w="[object Uint8ClampedArray]",O="[object Uint16Array]",D="[object Uint32Array]",I=/[\\^$.*+?()[\]{}|]/g,M=/\w*$/,U=/^\[object .+?Constructor\]$/,W=/^(?:0|[1-9]\d*)$/,A={};A[i]=A[a]=A[m]=A[T]=A[l]=A[c]=A[k]=A[P]=A[Z]=A[te]=A[v]=A[f]=A[b]=A[x]=A[N]=A[S]=A[_]=A[j]=A[q]=A[w]=A[O]=A[D]=!0,A[u]=A[h]=A[$]=!1;var B=typeof bt=="object"&&bt&&bt.Object===Object&&bt,F=typeof self=="object"&&self&&self.Object===Object&&self,X=B||F||Function("return this")(),J=e&&!e.nodeType&&e,H=J&&!0&&r&&!r.nodeType&&r,le=H&&H.exports===J;function ue(o,d){return o.set(d[0],d[1]),o}function K(o,d){return o.add(d),o}function re(o,d){for(var E=-1,C=o?o.length:0;++E<C&&d(o[E],E,o)!==!1;);return o}function ne(o,d){for(var E=-1,C=d.length,Q=o.length;++E<C;)o[Q+E]=d[E];return o}function ie(o,d,E,C){for(var Q=-1,Y=o?o.length:0;++Q<Y;)E=d(E,o[Q],Q,o);return E}function ce(o,d){for(var E=-1,C=Array(o);++E<o;)C[E]=d(E);return C}function he(o,d){return o?.[d]}function pe(o){var d=!1;if(o!=null&&typeof o.toString!="function")try{d=!!(o+"")}catch{}return d}function xe(o){var d=-1,E=Array(o.size);return o.forEach(function(C,Q){E[++d]=[Q,C]}),E}function br(o,d){return function(E){return o(d(E))}}function on(o){var d=-1,E=Array(o.size);return o.forEach(function(C){E[++d]=C}),E}var ss=Array.prototype,is=Function.prototype,Gt=Object.prototype,vr=X["__core-js_shared__"],ln=function(){var o=/[^.]+$/.exec(vr&&vr.keys&&vr.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),cn=is.toString,Ye=Gt.hasOwnProperty,Vt=Gt.toString,as=RegExp("^"+cn.call(Ye).replace(I,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),At=le?X.Buffer:void 0,Wt=X.Symbol,yr=X.Uint8Array,je=br(Object.getPrototypeOf,Object),un=Object.create,hn=Gt.propertyIsEnumerable,os=ss.splice,Er=Object.getOwnPropertySymbols,Kt=At?At.isBuffer:void 0,dn=br(Object.keys,Object),Yt=$e(X,"DataView"),St=$e(X,"Map"),Be=$e(X,"Promise"),Xt=$e(X,"Set"),xr=$e(X,"WeakMap"),_t=$e(Object,"create"),wr=Se(Yt),Ct=Se(St),Nr=Se(Be),Tr=Se(Xt),Ar=Se(xr),ft=Wt?Wt.prototype:void 0,fn=ft?ft.valueOf:void 0;function nt(o){var d=-1,E=o?o.length:0;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function ls(){this.__data__=_t?_t(null):{}}function cs(o){return this.has(o)&&delete this.__data__[o]}function us(o){var d=this.__data__;if(_t){var E=d[o];return E===n?void 0:E}return Ye.call(d,o)?d[o]:void 0}function pn(o){var d=this.__data__;return _t?d[o]!==void 0:Ye.call(d,o)}function Sr(o,d){var E=this.__data__;return E[o]=_t&&d===void 0?n:d,this}nt.prototype.clear=ls,nt.prototype.delete=cs,nt.prototype.get=us,nt.prototype.has=pn,nt.prototype.set=Sr;function be(o){var d=-1,E=o?o.length:0;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function hs(){this.__data__=[]}function ds(o){var d=this.__data__,E=Jt(d,o);if(E<0)return!1;var C=d.length-1;return E==C?d.pop():os.call(d,E,1),!0}function fs(o){var d=this.__data__,E=Jt(d,o);return E<0?void 0:d[E][1]}function ps(o){return Jt(this.__data__,o)>-1}function gs(o,d){var E=this.__data__,C=Jt(E,o);return C<0?E.push([o,d]):E[C][1]=d,this}be.prototype.clear=hs,be.prototype.delete=ds,be.prototype.get=fs,be.prototype.has=ps,be.prototype.set=gs;function we(o){var d=-1,E=o?o.length:0;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function ms(){this.__data__={hash:new nt,map:new(St||be),string:new nt}}function bs(o){return Rt(this,o).delete(o)}function vs(o){return Rt(this,o).get(o)}function ys(o){return Rt(this,o).has(o)}function Es(o,d){return Rt(this,o).set(o,d),this}we.prototype.clear=ms,we.prototype.delete=bs,we.prototype.get=vs,we.prototype.has=ys,we.prototype.set=Es;function Re(o){this.__data__=new be(o)}function xs(){this.__data__=new be}function ws(o){return this.__data__.delete(o)}function Ns(o){return this.__data__.get(o)}function Ts(o){return this.__data__.has(o)}function As(o,d){var E=this.__data__;if(E instanceof be){var C=E.__data__;if(!St||C.length<t-1)return C.push([o,d]),this;E=this.__data__=new we(C)}return E.set(o,d),this}Re.prototype.clear=xs,Re.prototype.delete=ws,Re.prototype.get=Ns,Re.prototype.has=Ts,Re.prototype.set=As;function Zt(o,d){var E=Rr(o)||er(o)?ce(o.length,String):[],C=E.length,Q=!!C;for(var Y in o)Ye.call(o,Y)&&!(Q&&(Y=="length"||Bs(Y,C)))&&E.push(Y);return E}function gn(o,d,E){var C=o[d];(!(Ye.call(o,d)&&En(C,E))||E===void 0&&!(d in o))&&(o[d]=E)}function Jt(o,d){for(var E=o.length;E--;)if(En(o[E][0],d))return E;return-1}function Xe(o,d){return o&&Or(d,kr(d),o)}function _r(o,d,E,C,Q,Y,ae){var se;if(C&&(se=Y?C(o,Q,Y,ae):C(o)),se!==void 0)return se;if(!Je(o))return o;var ge=Rr(o);if(ge){if(se=Ms(o),!d)return Is(o,se)}else{var oe=it(o),Ne=oe==h||oe==g;if(xn(o))return Qt(o,d);if(oe==x||oe==i||Ne&&!Y){if(pe(o))return Y?o:{};if(se=Ze(Ne?{}:o),!d)return qs(o,Xe(se,o))}else{if(!A[oe])return Y?o:{};se=Ps(o,oe,_r,d)}}ae||(ae=new Re);var Le=ae.get(o);if(Le)return Le;if(ae.set(o,se),!ge)var me=E?Ds(o):kr(o);return re(me||o,function(Te,ve){me&&(ve=Te,Te=o[ve]),gn(se,ve,_r(Te,d,E,C,ve,o,ae))}),se}function Ss(o){return Je(o)?un(o):{}}function _s(o,d,E){var C=d(o);return Rr(o)?C:ne(C,E(o))}function Cs(o){return Vt.call(o)}function Os(o){if(!Je(o)||Fs(o))return!1;var d=Lr(o)||pe(o)?as:U;return d.test(Se(o))}function Rs(o){if(!vn(o))return dn(o);var d=[];for(var E in Object(o))Ye.call(o,E)&&E!="constructor"&&d.push(E);return d}function Qt(o,d){if(d)return o.slice();var E=new o.constructor(o.length);return o.copy(E),E}function Cr(o){var d=new o.constructor(o.byteLength);return new yr(d).set(new yr(o)),d}function Ot(o,d){var E=d?Cr(o.buffer):o.buffer;return new o.constructor(E,o.byteOffset,o.byteLength)}function mn(o,d,E){var C=d?E(xe(o),!0):xe(o);return ie(C,ue,new o.constructor)}function bn(o){var d=new o.constructor(o.source,M.exec(o));return d.lastIndex=o.lastIndex,d}function Ls(o,d,E){var C=d?E(on(o),!0):on(o);return ie(C,K,new o.constructor)}function ks(o){return fn?Object(fn.call(o)):{}}function js(o,d){var E=d?Cr(o.buffer):o.buffer;return new o.constructor(E,o.byteOffset,o.length)}function Is(o,d){var E=-1,C=o.length;for(d||(d=Array(C));++E<C;)d[E]=o[E];return d}function Or(o,d,E,C){E||(E={});for(var Q=-1,Y=d.length;++Q<Y;){var ae=d[Q],se=void 0;gn(E,ae,se===void 0?o[ae]:se)}return E}function qs(o,d){return Or(o,st(o),d)}function Ds(o){return _s(o,kr,st)}function Rt(o,d){var E=o.__data__;return $s(d)?E[typeof d=="string"?"string":"hash"]:E.map}function $e(o,d){var E=he(o,d);return Os(E)?E:void 0}var st=Er?br(Er,Object):Hs,it=Cs;(Yt&&it(new Yt(new ArrayBuffer(1)))!=T||St&&it(new St)!=f||Be&&it(Be.resolve())!=y||Xt&&it(new Xt)!=S||xr&&it(new xr)!=$)&&(it=function(o){var d=Vt.call(o),E=d==x?o.constructor:void 0,C=E?Se(E):void 0;if(C)switch(C){case wr:return T;case Ct:return f;case Nr:return y;case Tr:return S;case Ar:return $}return d});function Ms(o){var d=o.length,E=o.constructor(d);return d&&typeof o[0]=="string"&&Ye.call(o,"index")&&(E.index=o.index,E.input=o.input),E}function Ze(o){return typeof o.constructor=="function"&&!vn(o)?Ss(je(o)):{}}function Ps(o,d,E,C){var Q=o.constructor;switch(d){case m:return Cr(o);case l:case c:return new Q(+o);case T:return Ot(o,C);case k:case P:case Z:case te:case v:case q:case w:case O:case D:return js(o,C);case f:return mn(o,C,E);case b:case _:return new Q(o);case N:return bn(o);case S:return Ls(o,C,E);case j:return ks(o)}}function Bs(o,d){return d=d??s,!!d&&(typeof o=="number"||W.test(o))&&o>-1&&o%1==0&&o<d}function $s(o){var d=typeof o;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?o!=="__proto__":o===null}function Fs(o){return!!ln&&ln in o}function vn(o){var d=o&&o.constructor,E=typeof d=="function"&&d.prototype||Gt;return o===E}function Se(o){if(o!=null){try{return cn.call(o)}catch{}try{return o+""}catch{}}return""}function yn(o){return _r(o,!0,!0)}function En(o,d){return o===d||o!==o&&d!==d}function er(o){return Us(o)&&Ye.call(o,"callee")&&(!hn.call(o,"callee")||Vt.call(o)==i)}var Rr=Array.isArray;function tr(o){return o!=null&&wn(o.length)&&!Lr(o)}function Us(o){return Nn(o)&&tr(o)}var xn=Kt||zs;function Lr(o){var d=Je(o)?Vt.call(o):"";return d==h||d==g}function wn(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=s}function Je(o){var d=typeof o;return!!o&&(d=="object"||d=="function")}function Nn(o){return!!o&&typeof o=="object"}function kr(o){return tr(o)?Zt(o):Rs(o)}function Hs(){return[]}function zs(){return!1}r.exports=yn}(Ur,Ur.exports)),Ur.exports}var Hr={exports:{}};Hr.exports;var Za;function Il(){return Za||(Za=1,function(r,e){var t=200,n="__lodash_hash_undefined__",s=1,i=2,a=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",f="[object Error]",b="[object Function]",x="[object GeneratorFunction]",y="[object Map]",N="[object Number]",S="[object Null]",_="[object Object]",j="[object Promise]",$="[object Proxy]",m="[object RegExp]",T="[object Set]",k="[object String]",P="[object Symbol]",Z="[object Undefined]",te="[object WeakMap]",v="[object ArrayBuffer]",q="[object DataView]",w="[object Float32Array]",O="[object Float64Array]",D="[object Int8Array]",I="[object Int16Array]",M="[object Int32Array]",U="[object Uint8Array]",W="[object Uint8ClampedArray]",A="[object Uint16Array]",B="[object Uint32Array]",F=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,J=/^(?:0|[1-9]\d*)$/,H={};H[w]=H[O]=H[D]=H[I]=H[M]=H[U]=H[W]=H[A]=H[B]=!0,H[l]=H[c]=H[v]=H[h]=H[q]=H[g]=H[f]=H[b]=H[y]=H[N]=H[_]=H[m]=H[T]=H[k]=H[te]=!1;var le=typeof bt=="object"&&bt&&bt.Object===Object&&bt,ue=typeof self=="object"&&self&&self.Object===Object&&self,K=le||ue||Function("return this")(),re=e&&!e.nodeType&&e,ne=re&&!0&&r&&!r.nodeType&&r,ie=ne&&ne.exports===re,ce=ie&&le.process,he=function(){try{return ce&&ce.binding&&ce.binding("util")}catch{}}(),pe=he&&he.isTypedArray;function xe(o,d){for(var E=-1,C=o==null?0:o.length,Q=0,Y=[];++E<C;){var ae=o[E];d(ae,E,o)&&(Y[Q++]=ae)}return Y}function br(o,d){for(var E=-1,C=d.length,Q=o.length;++E<C;)o[Q+E]=d[E];return o}function on(o,d){for(var E=-1,C=o==null?0:o.length;++E<C;)if(d(o[E],E,o))return!0;return!1}function ss(o,d){for(var E=-1,C=Array(o);++E<o;)C[E]=d(E);return C}function is(o){return function(d){return o(d)}}function Gt(o,d){return o.has(d)}function vr(o,d){return o?.[d]}function ln(o){var d=-1,E=Array(o.size);return o.forEach(function(C,Q){E[++d]=[Q,C]}),E}function cn(o,d){return function(E){return o(d(E))}}function Ye(o){var d=-1,E=Array(o.size);return o.forEach(function(C){E[++d]=C}),E}var Vt=Array.prototype,as=Function.prototype,At=Object.prototype,Wt=K["__core-js_shared__"],yr=as.toString,je=At.hasOwnProperty,un=function(){var o=/[^.]+$/.exec(Wt&&Wt.keys&&Wt.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),hn=At.toString,os=RegExp("^"+yr.call(je).replace(F,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Er=ie?K.Buffer:void 0,Kt=K.Symbol,dn=K.Uint8Array,Yt=At.propertyIsEnumerable,St=Vt.splice,Be=Kt?Kt.toStringTag:void 0,Xt=Object.getOwnPropertySymbols,xr=Er?Er.isBuffer:void 0,_t=cn(Object.keys,Object),wr=st(K,"DataView"),Ct=st(K,"Map"),Nr=st(K,"Promise"),Tr=st(K,"Set"),Ar=st(K,"WeakMap"),ft=st(Object,"create"),fn=Se(wr),nt=Se(Ct),ls=Se(Nr),cs=Se(Tr),us=Se(Ar),pn=Kt?Kt.prototype:void 0,Sr=pn?pn.valueOf:void 0;function be(o){var d=-1,E=o==null?0:o.length;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function hs(){this.__data__=ft?ft(null):{},this.size=0}function ds(o){var d=this.has(o)&&delete this.__data__[o];return this.size-=d?1:0,d}function fs(o){var d=this.__data__;if(ft){var E=d[o];return E===n?void 0:E}return je.call(d,o)?d[o]:void 0}function ps(o){var d=this.__data__;return ft?d[o]!==void 0:je.call(d,o)}function gs(o,d){var E=this.__data__;return this.size+=this.has(o)?0:1,E[o]=ft&&d===void 0?n:d,this}be.prototype.clear=hs,be.prototype.delete=ds,be.prototype.get=fs,be.prototype.has=ps,be.prototype.set=gs;function we(o){var d=-1,E=o==null?0:o.length;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function ms(){this.__data__=[],this.size=0}function bs(o){var d=this.__data__,E=Qt(d,o);if(E<0)return!1;var C=d.length-1;return E==C?d.pop():St.call(d,E,1),--this.size,!0}function vs(o){var d=this.__data__,E=Qt(d,o);return E<0?void 0:d[E][1]}function ys(o){return Qt(this.__data__,o)>-1}function Es(o,d){var E=this.__data__,C=Qt(E,o);return C<0?(++this.size,E.push([o,d])):E[C][1]=d,this}we.prototype.clear=ms,we.prototype.delete=bs,we.prototype.get=vs,we.prototype.has=ys,we.prototype.set=Es;function Re(o){var d=-1,E=o==null?0:o.length;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function xs(){this.size=0,this.__data__={hash:new be,map:new(Ct||we),string:new be}}function ws(o){var d=$e(this,o).delete(o);return this.size-=d?1:0,d}function Ns(o){return $e(this,o).get(o)}function Ts(o){return $e(this,o).has(o)}function As(o,d){var E=$e(this,o),C=E.size;return E.set(o,d),this.size+=E.size==C?0:1,this}Re.prototype.clear=xs,Re.prototype.delete=ws,Re.prototype.get=Ns,Re.prototype.has=Ts,Re.prototype.set=As;function Zt(o){var d=-1,E=o==null?0:o.length;for(this.__data__=new Re;++d<E;)this.add(o[d])}function gn(o){return this.__data__.set(o,n),this}function Jt(o){return this.__data__.has(o)}Zt.prototype.add=Zt.prototype.push=gn,Zt.prototype.has=Jt;function Xe(o){var d=this.__data__=new we(o);this.size=d.size}function _r(){this.__data__=new we,this.size=0}function Ss(o){var d=this.__data__,E=d.delete(o);return this.size=d.size,E}function _s(o){return this.__data__.get(o)}function Cs(o){return this.__data__.has(o)}function Os(o,d){var E=this.__data__;if(E instanceof we){var C=E.__data__;if(!Ct||C.length<t-1)return C.push([o,d]),this.size=++E.size,this;E=this.__data__=new Re(C)}return E.set(o,d),this.size=E.size,this}Xe.prototype.clear=_r,Xe.prototype.delete=Ss,Xe.prototype.get=_s,Xe.prototype.has=Cs,Xe.prototype.set=Os;function Rs(o,d){var E=er(o),C=!E&&En(o),Q=!E&&!C&&tr(o),Y=!E&&!C&&!Q&&Nn(o),ae=E||C||Q||Y,se=ae?ss(o.length,String):[],ge=se.length;for(var oe in o)je.call(o,oe)&&!(ae&&(oe=="length"||Q&&(oe=="offset"||oe=="parent")||Y&&(oe=="buffer"||oe=="byteLength"||oe=="byteOffset")||Ps(oe,ge)))&&se.push(oe);return se}function Qt(o,d){for(var E=o.length;E--;)if(yn(o[E][0],d))return E;return-1}function Cr(o,d,E){var C=d(o);return er(o)?C:br(C,E(o))}function Ot(o){return o==null?o===void 0?Z:S:Be&&Be in Object(o)?it(o):vn(o)}function mn(o){return Je(o)&&Ot(o)==l}function bn(o,d,E,C,Q){return o===d?!0:o==null||d==null||!Je(o)&&!Je(d)?o!==o&&d!==d:Ls(o,d,E,C,bn,Q)}function Ls(o,d,E,C,Q,Y){var ae=er(o),se=er(d),ge=ae?c:Ze(o),oe=se?c:Ze(d);ge=ge==l?_:ge,oe=oe==l?_:oe;var Ne=ge==_,Le=oe==_,me=ge==oe;if(me&&tr(o)){if(!tr(d))return!1;ae=!0,Ne=!1}if(me&&!Ne)return Y||(Y=new Xe),ae||Nn(o)?Or(o,d,E,C,Q,Y):qs(o,d,ge,E,C,Q,Y);if(!(E&s)){var Te=Ne&&je.call(o,"__wrapped__"),ve=Le&&je.call(d,"__wrapped__");if(Te||ve){var pt=Te?o.value():o,at=ve?d.value():d;return Y||(Y=new Xe),Q(pt,at,E,C,Y)}}return me?(Y||(Y=new Xe),Ds(o,d,E,C,Q,Y)):!1}function ks(o){if(!wn(o)||$s(o))return!1;var d=xn(o)?os:X;return d.test(Se(o))}function js(o){return Je(o)&&Lr(o.length)&&!!H[Ot(o)]}function Is(o){if(!Fs(o))return _t(o);var d=[];for(var E in Object(o))je.call(o,E)&&E!="constructor"&&d.push(E);return d}function Or(o,d,E,C,Q,Y){var ae=E&s,se=o.length,ge=d.length;if(se!=ge&&!(ae&&ge>se))return!1;var oe=Y.get(o);if(oe&&Y.get(d))return oe==d;var Ne=-1,Le=!0,me=E&i?new Zt:void 0;for(Y.set(o,d),Y.set(d,o);++Ne<se;){var Te=o[Ne],ve=d[Ne];if(C)var pt=ae?C(ve,Te,Ne,d,o,Y):C(Te,ve,Ne,o,d,Y);if(pt!==void 0){if(pt)continue;Le=!1;break}if(me){if(!on(d,function(at,Lt){if(!Gt(me,Lt)&&(Te===at||Q(Te,at,E,C,Y)))return me.push(Lt)})){Le=!1;break}}else if(!(Te===ve||Q(Te,ve,E,C,Y))){Le=!1;break}}return Y.delete(o),Y.delete(d),Le}function qs(o,d,E,C,Q,Y,ae){switch(E){case q:if(o.byteLength!=d.byteLength||o.byteOffset!=d.byteOffset)return!1;o=o.buffer,d=d.buffer;case v:return!(o.byteLength!=d.byteLength||!Y(new dn(o),new dn(d)));case h:case g:case N:return yn(+o,+d);case f:return o.name==d.name&&o.message==d.message;case m:case k:return o==d+"";case y:var se=ln;case T:var ge=C&s;if(se||(se=Ye),o.size!=d.size&&!ge)return!1;var oe=ae.get(o);if(oe)return oe==d;C|=i,ae.set(o,d);var Ne=Or(se(o),se(d),C,Q,Y,ae);return ae.delete(o),Ne;case P:if(Sr)return Sr.call(o)==Sr.call(d)}return!1}function Ds(o,d,E,C,Q,Y){var ae=E&s,se=Rt(o),ge=se.length,oe=Rt(d),Ne=oe.length;if(ge!=Ne&&!ae)return!1;for(var Le=ge;Le--;){var me=se[Le];if(!(ae?me in d:je.call(d,me)))return!1}var Te=Y.get(o);if(Te&&Y.get(d))return Te==d;var ve=!0;Y.set(o,d),Y.set(d,o);for(var pt=ae;++Le<ge;){me=se[Le];var at=o[me],Lt=d[me];if(C)var Yi=ae?C(Lt,at,me,d,o,Y):C(at,Lt,me,o,d,Y);if(!(Yi===void 0?at===Lt||Q(at,Lt,E,C,Y):Yi)){ve=!1;break}pt||(pt=me=="constructor")}if(ve&&!pt){var Tn=o.constructor,An=d.constructor;Tn!=An&&"constructor"in o&&"constructor"in d&&!(typeof Tn=="function"&&Tn instanceof Tn&&typeof An=="function"&&An instanceof An)&&(ve=!1)}return Y.delete(o),Y.delete(d),ve}function Rt(o){return Cr(o,kr,Ms)}function $e(o,d){var E=o.__data__;return Bs(d)?E[typeof d=="string"?"string":"hash"]:E.map}function st(o,d){var E=vr(o,d);return ks(E)?E:void 0}function it(o){var d=je.call(o,Be),E=o[Be];try{o[Be]=void 0;var C=!0}catch{}var Q=hn.call(o);return C&&(d?o[Be]=E:delete o[Be]),Q}var Ms=Xt?function(o){return o==null?[]:(o=Object(o),xe(Xt(o),function(d){return Yt.call(o,d)}))}:Hs,Ze=Ot;(wr&&Ze(new wr(new ArrayBuffer(1)))!=q||Ct&&Ze(new Ct)!=y||Nr&&Ze(Nr.resolve())!=j||Tr&&Ze(new Tr)!=T||Ar&&Ze(new Ar)!=te)&&(Ze=function(o){var d=Ot(o),E=d==_?o.constructor:void 0,C=E?Se(E):"";if(C)switch(C){case fn:return q;case nt:return y;case ls:return j;case cs:return T;case us:return te}return d});function Ps(o,d){return d=d??a,!!d&&(typeof o=="number"||J.test(o))&&o>-1&&o%1==0&&o<d}function Bs(o){var d=typeof o;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?o!=="__proto__":o===null}function $s(o){return!!un&&un in o}function Fs(o){var d=o&&o.constructor,E=typeof d=="function"&&d.prototype||At;return o===E}function vn(o){return hn.call(o)}function Se(o){if(o!=null){try{return yr.call(o)}catch{}try{return o+""}catch{}}return""}function yn(o,d){return o===d||o!==o&&d!==d}var En=mn(function(){return arguments}())?mn:function(o){return Je(o)&&je.call(o,"callee")&&!Yt.call(o,"callee")},er=Array.isArray;function Rr(o){return o!=null&&Lr(o.length)&&!xn(o)}var tr=xr||zs;function Us(o,d){return bn(o,d)}function xn(o){if(!wn(o))return!1;var d=Ot(o);return d==b||d==x||d==u||d==$}function Lr(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=a}function wn(o){var d=typeof o;return o!=null&&(d=="object"||d=="function")}function Je(o){return o!=null&&typeof o=="object"}var Nn=pe?is(pe):js;function kr(o){return Rr(o)?Rs(o):Is(o)}function Hs(){return[]}function zs(){return!1}r.exports=Us}(Hr,Hr.exports)),Hr.exports}var kn={},Ja;function cg(){if(Ja)return kn;Ja=1,Object.defineProperty(kn,"__esModule",{value:!0});const r=jl(),e=Il();var t;return function(n){function s(c={},u={},h=!1){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});let g=r(u);h||(g=Object.keys(g).reduce((f,b)=>(g[b]!=null&&(f[b]=g[b]),f),{}));for(const f in c)c[f]!==void 0&&u[f]===void 0&&(g[f]=c[f]);return Object.keys(g).length>0?g:void 0}n.compose=s;function i(c={},u={}){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});const h=Object.keys(c).concat(Object.keys(u)).reduce((g,f)=>(e(c[f],u[f])||(g[f]=u[f]===void 0?null:u[f]),g),{});return Object.keys(h).length>0?h:void 0}n.diff=i;function a(c={},u={}){c=c||{};const h=Object.keys(u).reduce((g,f)=>(u[f]!==c[f]&&c[f]!==void 0&&(g[f]=u[f]),g),{});return Object.keys(c).reduce((g,f)=>(c[f]!==u[f]&&u[f]===void 0&&(g[f]=null),g),h)}n.invert=a;function l(c,u,h=!1){if(typeof c!="object")return u;if(typeof u!="object")return;if(!h)return u;const g=Object.keys(u).reduce((f,b)=>(c[b]===void 0&&(f[b]=u[b]),f),{});return Object.keys(g).length>0?g:void 0}n.transform=l}(t||(t={})),kn.default=t,kn}var jn={},Qa;function ql(){if(Qa)return jn;Qa=1,Object.defineProperty(jn,"__esModule",{value:!0});var r;return function(e){function t(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}e.length=t}(r||(r={})),jn.default=r,jn}var In={},eo;function ug(){if(eo)return In;eo=1,Object.defineProperty(In,"__esModule",{value:!0});const r=ql();class e{constructor(n){this.ops=n,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(n){n||(n=1/0);const s=this.ops[this.index];if(s){const i=this.offset,a=r.default.length(s);if(n>=a-i?(n=a-i,this.index+=1,this.offset=0):this.offset+=n,typeof s.delete=="number")return{delete:n};{const l={};return s.attributes&&(l.attributes=s.attributes),typeof s.retain=="number"?l.retain=n:typeof s.retain=="object"&&s.retain!==null?l.retain=s.retain:typeof s.insert=="string"?l.insert=s.insert.substr(i,n):l.insert=s.insert,l}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?r.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const n=this.ops[this.index];return n?typeof n.delete=="number"?"delete":typeof n.retain=="number"||typeof n.retain=="object"&&n.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const n=this.offset,s=this.index,i=this.next(),a=this.ops.slice(this.index);return this.offset=n,this.index=s,[i].concat(a)}}else return[]}}return In.default=e,In}var to;function hg(){return to||(to=1,function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=lg(),n=jl(),s=Il(),i=cg();e.AttributeMap=i.default;const a=ql();e.Op=a.default;const l=ug();e.OpIterator=l.default;const c="\0",u=(g,f)=>{if(typeof g!="object"||g===null)throw new Error(`cannot retain a ${typeof g}`);if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);const b=Object.keys(g)[0];if(!b||b!==Object.keys(f)[0])throw new Error(`embed types not matched: ${b} != ${Object.keys(f)[0]}`);return[b,g[b],f[b]]};class h{constructor(f){Array.isArray(f)?this.ops=f:f!=null&&Array.isArray(f.ops)?this.ops=f.ops:this.ops=[]}static registerEmbed(f,b){this.handlers[f]=b}static unregisterEmbed(f){delete this.handlers[f]}static getHandler(f){const b=this.handlers[f];if(!b)throw new Error(`no handlers for embed type "${f}"`);return b}insert(f,b){const x={};return typeof f=="string"&&f.length===0?this:(x.insert=f,b!=null&&typeof b=="object"&&Object.keys(b).length>0&&(x.attributes=b),this.push(x))}delete(f){return f<=0?this:this.push({delete:f})}retain(f,b){if(typeof f=="number"&&f<=0)return this;const x={retain:f};return b!=null&&typeof b=="object"&&Object.keys(b).length>0&&(x.attributes=b),this.push(x)}push(f){let b=this.ops.length,x=this.ops[b-1];if(f=n(f),typeof x=="object"){if(typeof f.delete=="number"&&typeof x.delete=="number")return this.ops[b-1]={delete:x.delete+f.delete},this;if(typeof x.delete=="number"&&f.insert!=null&&(b-=1,x=this.ops[b-1],typeof x!="object"))return this.ops.unshift(f),this;if(s(f.attributes,x.attributes)){if(typeof f.insert=="string"&&typeof x.insert=="string")return this.ops[b-1]={insert:x.insert+f.insert},typeof f.attributes=="object"&&(this.ops[b-1].attributes=f.attributes),this;if(typeof f.retain=="number"&&typeof x.retain=="number")return this.ops[b-1]={retain:x.retain+f.retain},typeof f.attributes=="object"&&(this.ops[b-1].attributes=f.attributes),this}}return b===this.ops.length?this.ops.push(f):this.ops.splice(b,0,f),this}chop(){const f=this.ops[this.ops.length-1];return f&&typeof f.retain=="number"&&!f.attributes&&this.ops.pop(),this}filter(f){return this.ops.filter(f)}forEach(f){this.ops.forEach(f)}map(f){return this.ops.map(f)}partition(f){const b=[],x=[];return this.forEach(y=>{(f(y)?b:x).push(y)}),[b,x]}reduce(f,b){return this.ops.reduce(f,b)}changeLength(){return this.reduce((f,b)=>b.insert?f+a.default.length(b):b.delete?f-b.delete:f,0)}length(){return this.reduce((f,b)=>f+a.default.length(b),0)}slice(f=0,b=1/0){const x=[],y=new l.default(this.ops);let N=0;for(;N<b&&y.hasNext();){let S;N<f?S=y.next(f-N):(S=y.next(b-N),x.push(S)),N+=a.default.length(S)}return new h(x)}compose(f){const b=new l.default(this.ops),x=new l.default(f.ops),y=[],N=x.peek();if(N!=null&&typeof N.retain=="number"&&N.attributes==null){let _=N.retain;for(;b.peekType()==="insert"&&b.peekLength()<=_;)_-=b.peekLength(),y.push(b.next());N.retain-_>0&&x.next(N.retain-_)}const S=new h(y);for(;b.hasNext()||x.hasNext();)if(x.peekType()==="insert")S.push(x.next());else if(b.peekType()==="delete")S.push(b.next());else{const _=Math.min(b.peekLength(),x.peekLength()),j=b.next(_),$=x.next(_);if($.retain){const m={};if(typeof j.retain=="number")m.retain=typeof $.retain=="number"?_:$.retain;else if(typeof $.retain=="number")j.retain==null?m.insert=j.insert:m.retain=j.retain;else{const k=j.retain==null?"insert":"retain",[P,Z,te]=u(j[k],$.retain),v=h.getHandler(P);m[k]={[P]:v.compose(Z,te,k==="retain")}}const T=i.default.compose(j.attributes,$.attributes,typeof j.retain=="number");if(T&&(m.attributes=T),S.push(m),!x.hasNext()&&s(S.ops[S.ops.length-1],m)){const k=new h(b.rest());return S.concat(k).chop()}}else typeof $.delete=="number"&&(typeof j.retain=="number"||typeof j.retain=="object"&&j.retain!==null)&&S.push($)}return S.chop()}concat(f){const b=new h(this.ops.slice());return f.ops.length>0&&(b.push(f.ops[0]),b.ops=b.ops.concat(f.ops.slice(1))),b}diff(f,b){if(this.ops===f.ops)return new h;const x=[this,f].map(j=>j.map($=>{if($.insert!=null)return typeof $.insert=="string"?$.insert:c;const m=j===f?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")),y=new h,N=t(x[0],x[1],b,!0),S=new l.default(this.ops),_=new l.default(f.ops);return N.forEach(j=>{let $=j[1].length;for(;$>0;){let m=0;switch(j[0]){case t.INSERT:m=Math.min(_.peekLength(),$),y.push(_.next(m));break;case t.DELETE:m=Math.min($,S.peekLength()),S.next(m),y.delete(m);break;case t.EQUAL:m=Math.min(S.peekLength(),_.peekLength(),$);const T=S.next(m),k=_.next(m);s(T.insert,k.insert)?y.retain(m,i.default.diff(T.attributes,k.attributes)):y.push(k).delete(m);break}$-=m}}),y.chop()}eachLine(f,b=`
24
24
  `){const x=new l.default(this.ops);let y=new h,N=0;for(;x.hasNext();){if(x.peekType()!=="insert")return;const S=x.peek(),_=a.default.length(S)-x.peekLength(),j=typeof S.insert=="string"?S.insert.indexOf(b,_)-_:-1;if(j<0)y.push(x.next());else if(j>0)y.push(x.next(j));else{if(f(y,x.next(1).attributes||{},N)===!1)return;N+=1,y=new h}}y.length()>0&&f(y,{},N)}invert(f){const b=new h;return this.reduce((x,y)=>{if(y.insert)b.delete(a.default.length(y));else{if(typeof y.retain=="number"&&y.attributes==null)return b.retain(y.retain),x+y.retain;if(y.delete||typeof y.retain=="number"){const N=y.delete||y.retain;return f.slice(x,x+N).forEach(_=>{y.delete?b.push(_):y.retain&&y.attributes&&b.retain(a.default.length(_),i.default.invert(y.attributes,_.attributes))}),x+N}else if(typeof y.retain=="object"&&y.retain!==null){const N=f.slice(x,x+1),S=new l.default(N.ops).next(),[_,j,$]=u(y.retain,S.insert),m=h.getHandler(_);return b.retain({[_]:m.invert(j,$)},i.default.invert(y.attributes,S.attributes)),x+1}}return x},0),b.chop()}transform(f,b=!1){if(b=!!b,typeof f=="number")return this.transformPosition(f,b);const x=f,y=new l.default(this.ops),N=new l.default(x.ops),S=new h;for(;y.hasNext()||N.hasNext();)if(y.peekType()==="insert"&&(b||N.peekType()!=="insert"))S.retain(a.default.length(y.next()));else if(N.peekType()==="insert")S.push(N.next());else{const _=Math.min(y.peekLength(),N.peekLength()),j=y.next(_),$=N.next(_);if(j.delete)continue;if($.delete)S.push($);else{const m=j.retain,T=$.retain;let k=typeof T=="object"&&T!==null?T:_;if(typeof m=="object"&&m!==null&&typeof T=="object"&&T!==null){const P=Object.keys(m)[0];if(P===Object.keys(T)[0]){const Z=h.getHandler(P);Z&&(k={[P]:Z.transform(m[P],T[P],b)})}}S.retain(k,i.default.transform(j.attributes,$.attributes,b))}}return S.chop()}transformPosition(f,b=!1){b=!!b;const x=new l.default(this.ops);let y=0;for(;x.hasNext()&&y<=f;){const N=x.peekLength(),S=x.peekType();if(x.next(),S==="delete"){f-=Math.min(N,f-y);continue}else S==="insert"&&(y<f||!b)&&(f+=N);y+=N}return f}}h.Op=a.default,h.OpIterator=l.default,h.AttributeMap=i.default,h.handlers={},e.default=h,r.exports=h,r.exports.default=h}(Ln,Ln.exports)),Ln.exports}var Pe=hg();const G=Si(Pe);class Ke extends ke{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Ke.blotName="break";Ke.tagName="BR";let Ve=class extends Vn{};const dg={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function es(r){return r.replace(/[&<>"']/g,e=>dg[e])}class _e extends Di{static allowedChildren=[_e,Ke,ke,Ve];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(e,t){const n=_e.order.indexOf(e),s=_e.order.indexOf(t);return n>=0||s>=0?n-s:e===t?0:e<t?-1:1}formatAt(e,t,n,s){if(_e.compare(this.statics.blotName,n)<0&&this.scroll.query(n,V.BLOT)){const i=this.isolate(e,t);s&&i.wrap(n,s)}else super.formatAt(e,t,n,s)}optimize(e){if(super.optimize(e),this.parent instanceof _e&&_e.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}const ro=1;class Ee extends Zr{cache={};delta(){return this.cache.delta==null&&(this.cache.delta=Dl(this)),this.cache.delta}deleteAt(e,t){super.deleteAt(e,t),this.cache={}}formatAt(e,t,n,s){t<=0||(this.scroll.query(n,V.BLOCK)?e+t===this.length()&&this.format(n,s):super.formatAt(e,Math.min(t,this.length()-e-1),n,s),this.cache={})}insertAt(e,t,n){if(n!=null){super.insertAt(e,t,n),this.cache={};return}if(t.length===0)return;const s=t.split(`
25
25
  `),i=s.shift();i.length>0&&(e<this.length()-1||this.children.tail==null?super.insertAt(Math.min(e,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let a=this;s.reduce((l,c)=>(a=a.split(l,!0),a.insertAt(0,c),c.length),e+i.length)}insertBefore(e,t){const{head:n}=this.children;super.insertBefore(e,t),n instanceof Ke&&n.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+ro),this.cache.length}moveChildren(e,t){super.moveChildren(e,t),this.cache={}}optimize(e){super.optimize(e),this.cache={}}path(e){return super.path(e,!0)}removeChild(e){super.removeChild(e),this.cache={}}split(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t&&(e===0||e>=this.length()-ro)){const s=this.clone();return e===0?(this.parent.insertBefore(s,this),this):(this.parent.insertBefore(s,this.next),s)}const n=super.split(e,t);return this.cache={},n}}Ee.blotName="block";Ee.tagName="P";Ee.defaultChild=Ke;Ee.allowedChildren=[Ke,_e,ke,Ve];class Me extends ke{attach(){super.attach(),this.attributes=new Jn(this.domNode)}delta(){return new G().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){const n=this.scroll.query(e,V.BLOCK_ATTRIBUTE);n!=null&&this.attributes.attribute(n,t)}formatAt(e,t,n,s){this.format(n,s)}insertAt(e,t,n){if(n!=null){super.insertAt(e,t,n);return}const s=t.split(`
26
26
  `),i=s.pop(),a=s.map(c=>{const u=this.scroll.create(Ee.blotName);return u.insertAt(0,c),u}),l=this.split(e);a.forEach(c=>{this.parent.insertBefore(c,l)}),i&&this.parent.insertBefore(this.scroll.create("text",i),l)}}Me.scope=V.BLOCK_BLOT;function Dl(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return r.descendants(Ae).reduce((t,n)=>n.length()===0?t:t.insert(n.value(),qe(n,{},e)),new G).insert(`
@@ -2531,10 +2531,10 @@ const Ta = /* @__PURE__ */ Ri(Cc), Oc = Ta.default || Ta, N1 = ({ type: n, text:
2531
2531
  }), []), jo(
2532
2532
  /* @__PURE__ */ p.jsx("div", { className: "modal", ...t, children: /* @__PURE__ */ p.jsx("div", { className: `modal-dialog ${e}`, children: n }) }),
2533
2533
  document.body
2534
- )), w1 = ({ labelIcon: n, label: e, message: t, onCancel: r, onConfirm: s }) => /* @__PURE__ */ p.jsxs(jc, { className: "modal-sm", children: [
2534
+ )), w1 = ({ labelIcon: n, label: e = "Confirmation", message: t, onCancel: r, onConfirm: s }) => /* @__PURE__ */ p.jsxs(jc, { className: "modal-sm", children: [
2535
2535
  /* @__PURE__ */ p.jsxs(Rc, { className: "bg-danger", children: [
2536
2536
  /* @__PURE__ */ p.jsxs("div", { className: "modal-header-title", children: [
2537
- n && n,
2537
+ n || null,
2538
2538
  /* @__PURE__ */ p.jsx("span", { children: e })
2539
2539
  ] }),
2540
2540
  /* @__PURE__ */ p.jsx("div", { className: "tools", children: /* @__PURE__ */ p.jsx(Do, { className: "icon", onClick: r }) })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pesona-ui",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./dist/pesona-ui.cjs.js",