@arkyn/components 3.0.1-beta.69 → 3.0.1-beta.70
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/bundle.js +1791 -1583
- package/dist/bundle.umd.cjs +28 -28
- package/dist/components/select/index.d.ts +125 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/select/index.js +168 -0
- package/dist/components/select/selectChevron/index.d.ts +11 -0
- package/dist/components/select/selectChevron/index.d.ts.map +1 -0
- package/dist/components/select/selectChevron/index.js +13 -0
- package/dist/components/select/selectContainer/index.d.ts +19 -0
- package/dist/components/select/selectContainer/index.d.ts.map +1 -0
- package/dist/components/select/selectContainer/index.js +11 -0
- package/dist/components/select/selectContent/index.d.ts +9 -0
- package/dist/components/select/selectContent/index.d.ts.map +1 -0
- package/dist/components/select/selectContent/index.js +8 -0
- package/dist/components/select/selectOption/index.d.ts +11 -0
- package/dist/components/select/selectOption/index.d.ts.map +1 -0
- package/dist/components/select/selectOption/index.js +10 -0
- package/dist/components/select/selectOptionsContainer/index.d.ts +12 -0
- package/dist/components/select/selectOptionsContainer/index.d.ts.map +1 -0
- package/dist/components/select/selectOptionsContainer/index.js +44 -0
- package/dist/components/select/selectOverlay/index.d.ts +8 -0
- package/dist/components/select/selectOverlay/index.d.ts.map +1 -0
- package/dist/components/select/selectOverlay/index.js +9 -0
- package/dist/components/select/selectSpinner/index.d.ts +8 -0
- package/dist/components/select/selectSpinner/index.d.ts.map +1 -0
- package/dist/components/select/selectSpinner/index.js +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/bundle.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(C,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react/jsx-runtime"),require("react"),require("lucide-react"),require("framer-motion"),require("@react-input/mask")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","lucide-react","framer-motion","@react-input/mask"],c):(C=typeof globalThis<"u"?globalThis:C||self,c(C["@arkyn/components"]={},C.jsxRuntime,C.b,C.lucideReact,C.framerMotion,C.mask))})(this,function(C,c,m,z,Le,Pn){"use strict";function ba(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const te=ba(m);function An(e){const{className:t,...n}=e,r=`arkynAlertTitle ${t}`;return c.jsx("div",{className:r.trim(),...n})}const In=m.createContext({});function xa(){return m.useContext(In)}function Ea(e){const{schema:t,children:n,className:r,...a}=e,i=!(u=>{let f=!1;const d=_=>{Array.isArray(_)?_.forEach(d):_&&typeof _=="object"&&"type"in _&&(_.type===An?f=!0:_.props&&typeof _.props=="object"&&_.props!==null&&"children"in _.props&&d(_.props.children))};return d(u),f})(n)?"nonExistsAlertTitle":"existsAlertTitle",l=`arkynAlertContainer ${t} ${i} ${r}`;return c.jsx(In.Provider,{value:e,children:c.jsx("div",{className:l.trim(),...a,children:n})})}function wa(e){const{className:t,...n}=e,r=`arkynAlertContent ${t}`;return c.jsx("div",{className:r.trim(),...n})}function Sa(e){const{className:t,...n}=e,r=`arkynAlertDescription ${t}`;return c.jsx("div",{className:r.trim(),...n})}function Fa(e){const{className:t,...n}=e,{schema:r}=xa(),a=`arkynAlertIcon ${r} ${t}`;switch(r){case"success":return c.jsx(z.CheckCircle2,{className:a,...n});case"danger":return c.jsx(z.XCircle,{className:a,...n});case"warning":return c.jsx(z.AlertTriangle,{className:a,...n});case"info":return c.jsx(z.Info,{className:a,...n})}}function Dn(e){function t(){return!e||e<=0?0:e>=100?100:e}const[n,r]=m.useState(t());function a(s){return s<=0?r(0):s>=100?r(100):r(s)}return[n,a]}function Mn(e){const{onChange:t,value:n,disabled:r=!1,onDragging:a,className:s="",...o}=e,[i,l]=m.useState(!1),u=m.useRef(null),f=()=>l(!0),d=()=>l(!1),_=b=>{if(r||!i||!u.current)return;const E=u.current.getBoundingClientRect(),k=b.clientX-E.left,S=Math.min(Math.max(k/E.width*100,0),100);t(S)},p=b=>{if(r||!u.current)return;const E=u.current.getBoundingClientRect(),k=b.clientX-E.left,S=Math.min(Math.max(k/E.width*100,0),100);t(S)};m.useEffect(()=>(i?(a&&a(!0),document.addEventListener("mousemove",_),document.addEventListener("mouseup",d)):(a&&a(!1),document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",d)),()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",d)}),[i]);const v=`arkynSliderTrack ${i?"isDragging":"isNotDragging"} ${r?"isDisabled":"isEnabled"} ${s}`;return c.jsxs("div",{...o,className:v,onMouseDown:f,onClick:p,ref:u,children:[c.jsx("div",{className:"arkynSliderFill",style:{width:`${n}%`}}),c.jsx("div",{className:"arkynSliderThumb",style:{left:`${n}%`}})]})}function $n(e){var A,N,H,M;const{onPlayAudio:t,onPauseAudio:n,disabled:r,...a}=e,[s,o]=Dn(0),[i,l]=m.useState(!1),[u,f]=m.useState(!1),d=m.useRef(null),_=(A=d.current)==null?void 0:A.currentTime,p=(N=d.current)==null?void 0:N.duration,g=b(_),h=b(p),v={totalTime:p,currentTime:_,formattedCurrentTime:g,formattedTotalTime:h};function b(x){if(!x)return"00:00";const O=Math.floor(x/60),L=Math.floor(x%60),I=String(O).padStart(2,"0"),G=String(L).padStart(2,"0");return`${I}:${G}`}function E(){const x=d.current;x&&(e.onPlayAudio&&e.onPlayAudio(v),x.play(),l(!0))}function k(){const x=d.current;x&&(e.onPauseAudio&&e.onPauseAudio(v),x.pause(),l(!1))}function S(){i?k():E()}function U(x){const O=d.current;if(!O)return;const L=O.duration,I=x/100*L;O.currentTime=I}return u||!i?(H=d.current)==null||H.pause():i&&((M=d.current)==null||M.play()),m.useEffect(()=>{const x=d.current;if(!x)return;const O=()=>{const L=x.duration,G=x.currentTime/L*100;o(G)};return x.addEventListener("timeupdate",O),()=>{x.removeEventListener("timeupdate",O)}},[]),c.jsxs("div",{className:"arkynAudioPlayer",children:[c.jsx("audio",{...a,ref:d,src:e.src,onEnded:k}),c.jsxs("button",{type:"button",disabled:r,onClick:S,children:[i&&c.jsx(z.Pause,{}),!i&&c.jsx(z.Play,{})]}),c.jsx("p",{children:g}),c.jsx(Mn,{value:s,onChange:U,onDragging:f,disabled:r}),c.jsx("p",{children:h})]})}const Ln=m.createContext({});function Na(e){const{children:t,fieldErrors:n,form:r}=e;return c.jsxs(Ln.Provider,{value:{fieldErrors:n},children:[!r&&t,r&&m.cloneElement(r,r.props,t)]})}function pe(){return m.useContext(Ln)}function ye(e){const{children:t,className:n,...r}=e,a=`arkynFieldError ${n}`;return t?c.jsx("strong",{className:a.trim(),...r,children:t}):c.jsx(c.Fragment,{})}function _e(e){const{showAsterisk:t=!1,className:n="",...r}=e,s=`arkynFieldLabel ${t?"asteriskTrue":"asteriskFalse"} ${n}`;return c.jsx("label",{className:s.trim(),...r})}function ge(e){const{children:t,className:n,orientation:r="vertical",...a}=e,s=`arkynFieldWrapper ${n} ${r}`;return c.jsx("section",{className:s.trim(),...a,children:t})}function X(e){const{iconSize:t,icon:n,className:r,show:a=!0}=e;return a?n?typeof n=="string"?c.jsx("p",{className:r,children:n}):c.jsx("p",{className:r,children:c.jsx(n,{size:t,strokeWidth:2.5})}):c.jsx(c.Fragment,{}):c.jsx(c.Fragment,{})}function Be(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",loadingText:a,size:s="md",leftIcon:o,rightIcon:i,disabled:l,className:u="",children:f,...d}=e,p={xs:12,sm:16,md:20,lg:24}[s],v=`arkynButton ${t?"loadingTrue":"loadingFalse"} ${r} ${n} ${s} ${a?"loadingTextTrue":"loadingTextFalse"} ${u}`;return c.jsxs("button",{className:v,disabled:l||t,...d,children:[c.jsxs("div",{className:"arkynButtonSpinner",children:[c.jsx(z.Loader2,{size:p,strokeWidth:2.5}),a&&a]}),c.jsxs("div",{className:"arkynButtonContent",children:[c.jsx(X,{iconSize:p,icon:o}),f,c.jsx(X,{iconSize:p,icon:i})]})]})}function gt(e){const{className:t,orientation:n="horizontal",...r}=e,a=`arkynDivider ${n} ${t}`;return c.jsx("div",{className:a.trim(),...r})}function mt(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",size:a="md",icon:s,disabled:o,className:i="",...l}=e,u={xs:12,sm:16,md:20,lg:24},d=`arkynIconButton ${r} ${n} ${a} ${t?"loadingTrue":"loadingFalse"} ${i}`;return c.jsxs("button",{disabled:o||t,className:d.trim(),...l,children:[c.jsx("div",{className:"arkynIconButtonSpinner",children:c.jsx(z.Loader2,{size:u[a],strokeWidth:2.5})}),c.jsx("div",{className:"arkynIconButtonContent",children:c.jsx(s,{size:u[a],strokeWidth:2.5})})]})}function ht(e){const{text:t,size:n="lg",children:r,orientation:a="top",className:s="",...o}=e,i=m.useId(),l=m.useRef(null),[u,f]=m.useState(a);m.useEffect(()=>{const _=()=>{if(!l.current)return;const h=document.getElementById(i);h&&(f(a),requestAnimationFrame(()=>{const v=h.getBoundingClientRect(),b=window.innerWidth,E=window.innerHeight;let k=a;a==="left"&&v.left<0?k="right":a==="right"&&v.right>b?k="left":a==="top"&&v.top<0?k="bottom":a==="bottom"&&v.bottom>E&&(k="top"),k==="right"&&v.right>b?k="left":k==="left"&&v.left<0?k="right":k==="bottom"&&v.bottom>E?k="top":k==="top"&&v.top<0&&(k="bottom"),f(k)}))},p=l.current;if(!p)return;const g=()=>{setTimeout(_,1)};return p.addEventListener("mouseenter",g),window.addEventListener("resize",_),()=>{p.removeEventListener("mouseenter",g),window.removeEventListener("resize",_)}},[a,i]);const d=`arkynTooltip ${n} ${u} ${s}`;return c.jsxs("div",{className:d.trim(),...o,ref:l,children:[r,c.jsx("div",{className:"arkynTooltipText",id:i,dangerouslySetInnerHTML:{__html:t}})]})}function Ta(e){const{filePath:t,disabled:n,acceptAudio:r,handleSelectFile:a,isLoading:s,reSendAudio:o,changeAudioButtonText:i}=e;function l(){if(n)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{className:"arkynAudioUploadHasFileContentContainer",children:[c.jsx($n,{src:t}),c.jsx(gt,{}),c.jsxs("div",{className:"arkynAudioUploadButtonsContainer",children:[!!o&&c.jsx(ht,{orientation:"bottom",text:"Reenviar áudio",children:c.jsx(mt,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:s,onClick:o,icon:z.RefreshCw,disabled:n})}),c.jsx(Be,{isLoading:s,onClick:l,variant:"outline",size:"sm",type:"button",disabled:n,children:i})]})]})}function Oa(e){const{dropAudioText:t,isLoading:n,acceptAudio:r,handleSelectFile:a,selectAudioButtonText:s,disabled:o}=e;function i(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{onDrop:i,className:"arkynAudioUploadNoFileContent",children:[c.jsx(Be,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),c.jsx("p",{children:t})]})}function Pa(e){const{name:t,label:n,fileName:r="file",method:a="POST",onChange:s,fileResponseName:o="url",selectAudioButtonText:i="Selecionar arquivo de áudio",dropAudioText:l="Ou arraste e solte um arquivo de áudio aqui",changeAudioButtonText:u="Trocar arquivo de áudio",acceptAudio:f="audio/*",action:d,defaultValue:_="",showAsterisk:p=!1,disabled:g=!1}=e,{fieldErrors:h}=pe(),v=h==null?void 0:h[t],[b,E]=m.useState(_),[k,S]=m.useState(""),[U,A]=m.useState(null),[N,H]=m.useState(_),[M,x]=m.useState(!1);async function O(T){if(g)return;x(!0),A(T),S("");const Z=new FormData;Z.append(r,T),await fetch(d,{method:a,body:Z}).then(async w=>await w.json()).then(w=>{w!=null&&w.error?S(w.error):E(w==null?void 0:w[o]),s&&s(w==null?void 0:w[o])}).catch(w=>{console.error(w),S("Erro ao enviar audio")}).finally(()=>x(!1))}function L(T){if(!g){if(T.type.indexOf("audio")===-1){S("O arquivo selecionado não é um arquivo de áudio");return}H(URL.createObjectURL(T)),O(T)}}const I=v||k,B=`arkynAudioUpload ${I?"hasError":"noHasError"} ${N?"hasAudio":"noHasAudio"}`;return c.jsxs(ge,{children:[n&&c.jsx(_e,{showAsterisk:p,children:n}),c.jsxs("div",{className:B,children:[c.jsx("input",{type:"hidden",name:t,value:b||""}),!N&&c.jsx(Oa,{disabled:g,isLoading:M,acceptAudio:f,dropAudioText:l,handleSelectFile:L,selectAudioButtonText:i}),N&&c.jsx(Ta,{filePath:N,acceptAudio:f,changeAudioButtonText:u,disabled:g,handleSelectFile:L,isLoading:M,reSendAudio:I&&U?()=>O(U):void 0})]}),I&&c.jsx(ye,{children:I})]})}function Aa(e){const{variant:t="ghost",scheme:n="primary",size:r="lg",leftIcon:a,rightIcon:s,className:o="",children:i,...l}=e,f={md:12,lg:14}[r],d=`arkynBadge ${t} ${n} ${r} ${o}`;return c.jsxs("div",{className:d.trim(),...l,children:[c.jsx(X,{iconSize:f,icon:a}),c.jsx("p",{children:i}),c.jsx(X,{iconSize:f,icon:s})]})}const Bn=m.createContext({});function Ia(){return m.useContext(Bn)}function Da(e){return c.jsx(Bn.Provider,{value:e,children:e.children})}function Ma(e){const{children:t,disabled:n=!1,className:r="",onClick:a,value:s,...o}=e,{disabled:i,currentTab:l,changeCurrentTab:u}=Ia(),f=i||n,p=`arkynCardTabButton ${f?"isDisabled":""} ${l===s&&s?"isActive":""} ${r}`;function g(h){u(s),a&&a(h)}return c.jsx("button",{onClick:g,className:p.trim(),...o,disabled:f,type:"button",children:t})}function $a(e){const{children:t,onChange:n,defaultValue:r,disabled:a=!1,className:s,...o}=e,[i,l]=m.useState(r||""),u=`arkynCardTabContainer ${s||""}`;function f(d){l(d),n&&n(d)}return c.jsx(Da,{disabled:a,currentTab:i,changeCurrentTab:f,children:c.jsx("nav",{className:u.trim(),...o,children:t})})}function La(e){const{id:t,name:n,className:r="",size:a="md",errorMessage:s,defaultChecked:o=!1,label:i,checked:l=null,onCheck:u,orientation:f="horizontalReverse",value:d,..._}=e,{fieldErrors:p}=pe(),g=m.useRef(null),h=t||m.useId(),v=s||(p==null?void 0:p[n]),b=!!v,[E,k]=m.useState(o||!1),S=typeof l=="boolean"?l:E,N=`arkynCheckbox ${a} ${b?"errorTrue":"errorFalse"} ${S?"checkedTrue":"checkedFalse"} ${r}`;function H(){const M=E;k(!M),u&&u(M?"":d||"checked")}return c.jsxs(ge,{orientation:f,children:[i&&c.jsx(_e,{htmlFor:h,children:i}),c.jsxs("button",{id:h,type:"button",className:N,onClick:H,..._,children:[c.jsx("input",{type:"hidden",name:n,ref:g,value:S?d||"checked":""}),c.jsx(z.Check,{})]}),v&&c.jsx(ye,{children:v})]})}function Ba(){return()=>{}}function jn(){return m.useSyncExternalStore(Ba,()=>!0,()=>!1)}function ja(e){const{children:t,fallback:n=null}=e;return jn()?c.jsx(c.Fragment,{children:t()}):c.jsx(c.Fragment,{children:n})}const Ut=e=>e.replace(/[^0-9]/g,""),zn={USD:{countryLanguage:"en-US",countryCurrency:"USD"},EUR:{countryLanguage:"de-DE",countryCurrency:"EUR"},JPY:{countryLanguage:"ja-JP",countryCurrency:"JPY"},GBP:{countryLanguage:"en-GB",countryCurrency:"GBP"},AUD:{countryLanguage:"en-AU",countryCurrency:"AUD"},CAD:{countryLanguage:"en-CA",countryCurrency:"CAD"},CHF:{countryLanguage:"de-CH",countryCurrency:"CHF"},CNY:{countryLanguage:"zh-CN",countryCurrency:"CNY"},SEK:{countryLanguage:"sv-SE",countryCurrency:"SEK"},NZD:{countryLanguage:"en-NZ",countryCurrency:"NZD"},BRL:{countryLanguage:"pt-BR",countryCurrency:"BRL"},INR:{countryLanguage:"en-IN",countryCurrency:"INR"},RUB:{countryLanguage:"ru-RU",countryCurrency:"RUB"},ZAR:{countryLanguage:"en-ZA",countryCurrency:"ZAR"},MXN:{countryLanguage:"es-MX",countryCurrency:"MXN"},SGD:{countryLanguage:"en-SG",countryCurrency:"SGD"},HKD:{countryLanguage:"zh-HK",countryCurrency:"HKD"},NOK:{countryLanguage:"nb-NO",countryCurrency:"NOK"},KRW:{countryLanguage:"ko-KR",countryCurrency:"KRW"},TRY:{countryLanguage:"tr-TR",countryCurrency:"TRY"},IDR:{countryLanguage:"id-ID",countryCurrency:"IDR"},THB:{countryLanguage:"th-TH",countryCurrency:"THB"}},za=e=>e.replace(new RegExp("(?:R\\$|\\p{Sc}|[$€¥£])","gu"),"").trim(),Hn=(e,t,n={showPrefix:!0})=>{if(!zn[t])throw new Error("Unsupported currency code");const{countryCurrency:r,countryLanguage:a}=zn[t],s=new Intl.NumberFormat(a,{style:"currency",currency:r}).format(e);return n.showPrefix?s.replace(/\s/g," "):za(s).replace(/\s/g," ")};Ut({NINE:"(99) 99999-9999"}.NINE).length;for(var Ha=[],Vt=0;Vt<256;++Vt)Ha.push((Vt+256).toString(16).slice(1));typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);function Gn(e){let t=e;return typeof e=="string"?(t=+Ut(e),t%1!==0&&(t=t.toFixed(2))):t=Number.isInteger(e)?Number(e)*10**2:e.toFixed(2),+Ut(String(t))/10**2}function qt(e,t){if(!e)return[0,Hn(0,t)];const n=Gn(e),r=Hn(n,t);return[n,r]}function Ga(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",label:o,className:i="",value:l,defaultValue:u,max:f=1e9,locale:d,onChange:_,prefix:p,suffix:g,isLoading:h=!1,leftIcon:v,readOnly:b,onFocus:E,onBlur:k,errorMessage:S,showAsterisk:U,rightIcon:A,size:N="md",id:H,...M}=e,{fieldErrors:x}=pe(),[O,L]=m.useState(!1),[I,G]=m.useState("0"),$=m.useRef(null),B=H||m.useId(),T=S||(x==null?void 0:x[t]),Z=!!T,w=n||h,Y={md:20,lg:20}[N],J=A?"right":"left",ke=J==="left"&&h,le=J==="right"&&h;function ie(){w||!($!=null&&$.current)||(L(!0),$.current.focus())}function re(de){L(!0),E&&E(de)}function j(de){L(!1),k&&k(de)}const ae=de=>{const[$e,qe]=qt(de,d);return!f||$e<=f?(G(qe),[$e,qe]):qt(de,d)},Ne=de=>{de.preventDefault();const[$e,qe]=ae(de.target.value);_&&_(de,String($e),String(qe))};m.useEffect(()=>{const de=l||+u||void 0,[,$e]=qt(de,d);G($e)},[d,u,l]);const Fn=`arkynCurrencyInput ${p?"hasPrefix":""} ${g?"hasSuffix":""} ${s} ${N} ${w||b||h?"opacity":""} ${Z?"errored":""} ${O?"focused":""} ${i}`;return c.jsxs(ge,{children:[o&&c.jsx(_e,{showAsterisk:U,htmlFor:B,children:o}),c.jsxs("section",{title:r,style:a,onClick:ie,className:Fn,children:[c.jsx(X,{iconSize:Y,icon:p,className:"prefix"}),c.jsx(X,{show:ke,iconSize:Y,className:"spinner",icon:z.Loader2}),c.jsx(X,{show:!h,icon:v,iconSize:Y}),c.jsx("input",{disabled:w,readOnly:b,ref:$,onFocus:re,onBlur:j,onChange:Ne,id:B,placeholder:w?I:void 0,value:w?void 0:I,...M}),c.jsx("input",{type:"hidden",name:t,value:Gn(I),readOnly:!0}),c.jsx(X,{show:!h,icon:A,iconSize:Y}),c.jsx(X,{show:le,iconSize:Y,className:"spinner",icon:z.Loader2}),c.jsx(X,{iconSize:Y,icon:g,className:"suffix"})]}),T&&c.jsx(ye,{children:T})]})}function Ua(){return typeof window>"u"?0:window.innerWidth-document.documentElement.clientWidth}function Xe(e){m.useEffect(()=>{if(e){const t=document.body.style.overflow,n=document.body.style.paddingRight,r=Ua();if(r>0){const a=window.getComputedStyle(document.body),s=parseInt(a.paddingRight)||0;document.body.style.paddingRight=`${s+r}px`}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t,document.body.style.paddingRight=n}}},[e])}const Un=m.createContext({});function Va(e){return c.jsx(Un.Provider,{value:{makeInvisible:e.makeInvisible},children:e.children})}function qa(){return m.useContext(Un)}function Wa(e){const{isVisible:t,makeInvisible:n,orientation:r="left",children:a,className:s,...o}=e;Xe(t);const i=r==="left"?"-100%":"100%",u=`arkynDrawerContainer ${r} ${t?"visibleTrue":"visibleFalse"} ${s}`;return c.jsx(Va,{makeInvisible:n,children:c.jsx(Le.AnimatePresence,{children:t&&c.jsxs("aside",{className:u.trim(),...o,children:[c.jsx(Le.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),c.jsx(Le.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${i})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${i})`},children:a})]})})})}function Ra(e){const{showCloseButton:t=!0,className:n,children:r,...a}=e,{makeInvisible:s}=qa(),o=`arkynDrawerHeader ${n}`;return c.jsxs("header",{className:o.trim(),...a,children:[r,t&&c.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:s,"aria-label":"Close drawer",children:c.jsx(z.X,{size:24})})]})}function Xa(e){const{disabled:t,file:n,isLoading:r,acceptFile:a,changeFileButtonText:s,handleSelectFile:o,reSendFile:i}=e;function l(){if(t)return;const f=document.createElement("input");f.type="file",f.accept=a,f.onchange=d=>{var p;const _=(p=d.target.files)==null?void 0:p[0];_&&o(_)},f.click()}function u(){return n.type.startsWith("image/")?c.jsx(z.FileImage,{}):n.type.startsWith("audio/")?c.jsx(z.FileAudio,{}):n.type.startsWith("application/zip")?c.jsx(z.FileArchive,{}):c.jsx(z.File,{})}return c.jsxs("div",{className:"arkynFileUploadHasFileContent",children:[c.jsxs("section",{className:"arkynFileUploadFileContainer",children:[c.jsx(u,{}),c.jsx("p",{children:n.name})]}),c.jsx(gt,{}),c.jsxs("div",{className:"arkynFileUploadButtonsContainer",children:[!!i&&c.jsx(ht,{orientation:"bottom",text:"Reenviar arquivo",children:c.jsx(mt,{type:"button","aria-label":"resend file",variant:"outline",scheme:"danger",size:"sm",isLoading:r,onClick:i,icon:z.RefreshCw,disabled:t})}),c.jsx(Be,{isLoading:r,onClick:l,variant:"outline",size:"sm",type:"button",disabled:t,children:s})]})]})}function Ka(e){const{dropFileText:t,isLoading:n,acceptFile:r,handleSelectFile:a,selectFileButtonText:s,disabled:o}=e;function i(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{onDrop:i,className:"arkynFileUploadNoFileContent",children:[c.jsx(Be,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),c.jsx("p",{children:t})]})}function Ya(e){const{name:t,label:n,showAsterisk:r=!1,action:a,fileName:s="file",method:o="POST",acceptFile:i="*",fileResponseName:l="url",changeFileButtonText:u="Alterar arquivo",selectFileButtonText:f="Selecionar arquivo",dropFileText:d="Ou arraste e solte o arquivo aqui",onChange:_,disabled:p=!1}=e,{fieldErrors:g}=pe(),h=g==null?void 0:g[t],[v,b]=m.useState(""),[E,k]=m.useState(""),[S,U]=m.useState(null),[A,N]=m.useState(!1);async function H(G){if(p)return;N(!0),U(G),k("");const $=new FormData;$.append(s,G),await fetch(a,{method:o,body:$}).then(async B=>await B.json()).then(B=>{B!=null&&B.error?k(B.error):b(B==null?void 0:B[l]),_&&_(B==null?void 0:B[l])}).catch(B=>{console.error(B),k("Erro ao enviar o arquivo")}).finally(()=>N(!1))}function M(G){p||H(G)}const x=h||E,I=`arkynFileUpload ${x?"hasError":"noHasError"} ${S?"hasFile":"noHasFile"}`;return c.jsxs(ge,{children:[n&&c.jsx(_e,{showAsterisk:r,children:n}),c.jsxs("div",{className:I,children:[c.jsx("input",{type:"hidden",name:t,value:v||""}),!S&&c.jsx(Ka,{disabled:p,isLoading:A,acceptFile:i,dropFileText:d,handleSelectFile:M,selectFileButtonText:f}),S&&c.jsx(Xa,{disabled:p,isLoading:A,acceptFile:i,file:S,handleSelectFile:M,changeFileButtonText:u,reSendFile:x&&S?()=>H(S):void 0})]}),x&&c.jsx(ye,{children:x})]})}function Za(e){const{disabled:t,filePath:n,isLoading:r,acceptImage:a,changeImageButtonText:s,handleSelectFile:o,reSendImage:i}=e;function l(){if(t)return;const u=document.createElement("input");u.type="file",u.accept=a,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&o(d)},u.click()}return c.jsxs("div",{className:"arkynImageUploadHasFileContent",style:{backgroundImage:`url("${n}")`},children:[i&&c.jsx(ht,{orientation:"bottom",text:"Reenviar imagem",children:c.jsx(mt,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:r,onClick:i,icon:z.RefreshCw,disabled:t})}),c.jsx(Be,{isLoading:r,onClick:l,variant:"outline",size:"sm",type:"button",disabled:t,children:s})]})}function Ja(e){const{dropImageText:t,isLoading:n,acceptImage:r,handleSelectFile:a,selectImageButtonText:s,disabled:o}=e;function i(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{onDrop:i,className:"arkynImageUploadNoFileContent",children:[c.jsx(Be,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),c.jsx("p",{children:t})]})}function Qa(e){const{name:t,defaultValue:n="",label:r,showAsterisk:a=!1,action:s,fileName:o="file",method:i="POST",acceptImage:l="image/*",fileResponseName:u="url",changeImageButtonText:f="Alterar imagem",selectImageButtonText:d="Selecionar imagem",dropImageText:_="Ou arraste e solte a imagem aqui",onChange:p,disabled:g=!1}=e,{fieldErrors:h}=pe(),v=h==null?void 0:h[t],[b,E]=m.useState(n),[k,S]=m.useState(""),[U,A]=m.useState(null),[N,H]=m.useState(n),[M,x]=m.useState(!1);async function O(T){if(g)return;x(!0),A(T),S("");const Z=new FormData;Z.append(o,T),await fetch(s,{method:i,body:Z}).then(async w=>await w.json()).then(w=>{w!=null&&w.error?S(w.error):E(w==null?void 0:w[u]),p&&p(w==null?void 0:w[u])}).catch(w=>{console.error(w),S("Erro ao enviar imagem")}).finally(()=>x(!1))}function L(T){g||(H(URL.createObjectURL(T)),O(T))}const I=v||k,B=`arkynImageUpload ${I?"hasError":"noHasError"} ${N?"hasImage":"noHasImage"}`;return c.jsxs(ge,{children:[r&&c.jsx(_e,{showAsterisk:a,children:r}),c.jsxs("div",{className:B,children:[c.jsx("input",{type:"hidden",name:t,value:b||""}),!N&&c.jsx(Ja,{disabled:g,isLoading:M,acceptImage:l,dropImageText:_,handleSelectFile:L,selectImageButtonText:d}),N&&c.jsx(Za,{disabled:g,isLoading:M,acceptImage:l,filePath:N,handleSelectFile:L,changeImageButtonText:f,reSendImage:I&&U?()=>O(U):void 0})]}),I&&c.jsx(ye,{children:I})]})}function Vn(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",label:o,className:i="",prefix:l,suffix:u,isLoading:f=!1,leftIcon:d,readOnly:_,onFocus:p,onBlur:g,errorMessage:h,showAsterisk:v,rightIcon:b,type:E="text",size:k="md",id:S,value:U,placeholder:A,...N}=e,{fieldErrors:H}=pe(),[M,x]=m.useState(!1),O=m.useRef(null),L=S||m.useId(),I=h||(H==null?void 0:H[t]),G=!!I,$=n||f,T={md:20,lg:20}[k],Z=b?"right":"left",w=Z==="left"&&f,he=Z==="right"&&f;function Y(){$||!(O!=null&&O.current)||(x(!0),O.current.focus())}function J(be){x(!0),p&&p(be)}function ke(be){x(!1),g&&g(be)}if(E==="hidden")return c.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:O,...N});const De=`arkynInput ${l?"hasPrefix":""} ${n?"disabled":""} ${u?"hasSuffix":""} ${s} ${k} ${$||_||f?"opacity":""} ${G?"errored":""} ${M?"focused":""} ${i}`;return c.jsxs(ge,{children:[o&&c.jsx(_e,{showAsterisk:v,htmlFor:L,children:o}),c.jsxs("section",{title:r,style:a,onClick:Y,className:De,children:[c.jsx(X,{iconSize:T,icon:l,className:"prefix"}),c.jsx(X,{show:w,iconSize:T,className:"spinner",icon:z.Loader2}),c.jsx(X,{show:!f,icon:d,iconSize:T}),c.jsx("input",{disabled:$,readOnly:_,ref:O,onFocus:J,onBlur:ke,type:E,id:L,name:t,placeholder:$&&U||A,value:$?void 0:U,...N}),c.jsx(X,{show:!f,icon:b,iconSize:T}),c.jsx(X,{show:he,iconSize:T,className:"spinner",icon:z.Loader2}),c.jsx(X,{iconSize:T,icon:u,className:"suffix"})]}),I&&c.jsx(ye,{children:I})]})}const es=m.forwardRef((e,t)=>c.jsx("input",{ref:t,...e}));function ts(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",separate:o,mask:i,showMask:l,replacement:u,label:f,className:d="",prefix:_,suffix:p,isLoading:g=!1,leftIcon:h,readOnly:v,onFocus:b,onBlur:E,errorMessage:k,defaultValue:S,showAsterisk:U,rightIcon:A,size:N="md",id:H,value:M,placeholder:x,...O}=e,{fieldErrors:L}=pe(),[I,G]=m.useState(!1),$=m.useRef(null),B=H||m.useId(),T=k||(L==null?void 0:L[t]),Z=!!T,w=n||g,Y={md:20,lg:20}[N],J=A?"right":"left",ke=J==="left"&&g,le=J==="right"&&g;function ie(){w||!($!=null&&$.current)||(G(!0),$.current.focus())}function re(Me){G(!0),b&&b(Me)}function j(Me){G(!1),E&&E(Me)}const se=`arkynMaskedInput ${_?"hasPrefix":""} ${p?"hasSuffix":""} ${s} ${N} ${w||v||g?"opacity":""} ${Z?"errored":""} ${I?"focused":""} ${d}`;return c.jsxs(ge,{children:[f&&c.jsx(_e,{showAsterisk:U,htmlFor:B,children:f}),c.jsxs("section",{title:r,style:a,onClick:ie,className:se,children:[c.jsx(X,{iconSize:Y,icon:_,className:"prefix"}),c.jsx(X,{show:ke,iconSize:Y,className:"spinner",icon:z.Loader2}),c.jsx(X,{show:!g,icon:h,iconSize:Y}),c.jsx(Pn.InputMask,{component:es,mask:i,replacement:u,separate:o,showMask:l,ref:$,onFocus:re,onBlur:j,disabled:w,readOnly:v,id:B,name:t,defaultValue:S||void 0,placeholder:w&&M||x,value:w?void 0:M,...O}),c.jsx(X,{show:!g,icon:A,iconSize:Y}),c.jsx(X,{show:le,iconSize:Y,className:"spinner",icon:z.Loader2}),c.jsx(X,{iconSize:Y,icon:p,className:"suffix"})]}),T&&c.jsx(ye,{children:T})]})}const qn=m.createContext({});function ns(e){return c.jsx(qn.Provider,{value:{makeInvisible:e.makeInvisible},children:e.children})}function rs(){return m.useContext(qn)}function as(e){const{isVisible:t,makeInvisible:n,children:r,className:a="",...s}=e;Xe(t);const i=`arkynModalContainer ${t?"visibleTrue":"visibleFalse"} ${a}`;return c.jsx(ns,{makeInvisible:n,children:c.jsx(Le.AnimatePresence,{children:t&&c.jsxs("aside",{className:i.trim(),...s,children:[c.jsx(Le.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),c.jsx(Le.motion.div,{className:"arkynModalContainerContent",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:r})]})})})}function ss(e){const{alignment:t="right",className:n,...r}=e,a=`arkynModalFooter ${t} ${n}`;return c.jsx("footer",{className:a.trim(),...r})}function os(e){const{showCloseButton:t=!0,className:n,children:r,...a}=e,{makeInvisible:s}=rs(),o=`arkynModalHeader ${n}`;return c.jsxs("header",{className:o.trim(),...a,children:[r,t&&c.jsx("button",{type:"button",onClick:s,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:c.jsx(z.X,{size:24})})]})}function is(e){const{iconSize:t,isLoading:n,disabled:r,readOnly:a,isFocused:s}=e,l=`arkynMultiSelectChevron ${r||a?"notAnimate":""} ${s?"focused":""}`;return n?c.jsx(c.Fragment,{}):c.jsx(z.ChevronDown,{className:l,size:t,strokeWidth:2.5})}function cs(e){const{children:t,handleContainerFocus:n,disabled:r,isError:a,isLoading:s,isFocused:o,className:i,readOnly:l,variant:u,size:f,id:d,prefixExists:_}=e,p=_?"hasPrefix":"",g=a?"errored":"",h=r||l||s?"opacity":"",v=o?"focused":"";return c.jsx("section",{id:d,className:`arkynMultiSelectContainer ${p} ${u} ${f} ${h} ${g} ${v} ${i}`,onClick:n,children:t})}function ls(e){const{children:t,size:n}=e,r=`arkynMultiSelectContent ${n}`;return c.jsx("div",{className:r,children:t})}function us(e){const{label:t,value:n,disabled:r,handleChangeValue:a}=e;return c.jsxs("div",{className:"arkynMultiSelectMark",children:[t,c.jsx("button",{disabled:r,type:"button",onClick:s=>{s.stopPropagation(),a(n)},children:c.jsx(z.X,{})})]})}function fs(e){const{label:t,optionHasSelected:n,handleChangeValue:r,value:a,size:s}=e,o=n(a)?"active":"",i=`arkynMultiSelectOption ${s} ${o}`;return c.jsxs("div",{onClick:()=>r(a),className:i,children:[t," ",c.jsx(z.Check,{})]})}function ds(e){const{children:t,isFocused:n,isSearchable:r,search:a,onSearch:s}=e,o=m.useRef(null),[i,l]=m.useState("bottom");Xe(n),m.useEffect(()=>{if(!n)return;(()=>{if(!o.current)return;const d=o.current.parentElement;if(!d)return;const _=d.getBoundingClientRect(),p=window.innerHeight,g=300;p-_.bottom<g&&_.top>g?l("top"):l("bottom")})()},[n]);function u(f){r&&s(f.target.value)}return n?c.jsxs("div",{ref:o,className:`arkynMultiSelectOptionsContainer ${i}`,children:[r&&c.jsx(Vn,{type:"search",name:"search-select",variant:"underline",leftIcon:z.Search,value:a,onChange:u}),t]}):c.jsx(c.Fragment,{})}function _s(e){const{isFocused:t,handleBlur:n}=e;return t?c.jsx("aside",{className:"arkynMultiSelectOverlay",onClick:n}):c.jsx(c.Fragment,{})}function gs(e){const{iconSize:t,isLoading:n}=e;return n?c.jsx(z.Loader2,{className:"arkynMultiSelectSpinner",size:t,strokeWidth:2.5}):c.jsx(c.Fragment,{})}function ms(e){const{name:t,options:n,className:r="",placeholder:a="Selecione...",closeOnSelect:s=!1,defaultValue:o=[],errorMessage:i,isLoading:l=!1,readOnly:u=!1,isSearchable:f=!1,id:d,label:_,optionMaxHeight:p,showAsterisk:g,leftIcon:h,onSearch:v,onChange:b,onBlur:E,notFoundText:k="Sem opções disponíveis",onFocus:S,disabled:U=!1,prefix:A,size:N="md",value:H,variant:M="solid"}=e,{fieldErrors:x}=pe(),O=m.useRef(null),L=d||m.useId(),I=i||(x==null?void 0:x[t]),G=!!I,$=U||l||u,T={md:20,lg:20}[N],[Z,w]=m.useState(""),[he,Y]=m.useState(!1),[J,ke]=m.useState(o),le=H||J;function ie(W){return le.includes(W)}function re(W){const se=n.find(Me=>Me.value===W);return(se==null?void 0:se.label)||""}function j(){$||!(O!=null&&O.current)||he||(Y(!0),O.current.focus(),S&&S())}function ae(){Y(!1),E&&O.current&&O.current.blur()}function Ne(W){w(W),v&&v(W)}function De(W){ie(W)?(ke(J.filter(se=>se!==W)),b&&b(J.filter(se=>se!==W))):(ke([...J,W]),b&&b([...J,W])),s&&ae()}const be=n.filter(W=>!!(e.onSearch||!e.isSearchable||W.label.toLowerCase().includes(Z.toLowerCase())));return c.jsxs(ge,{children:[_&&c.jsx(_e,{showAsterisk:g,children:_}),c.jsxs(cs,{handleContainerFocus:j,disabled:$,isError:G,isFocused:he,isLoading:l,readOnly:u,size:N,variant:M,className:r,prefixExists:!!A,id:L,children:[c.jsx("input",{ref:O,name:t,value:JSON.stringify(le),type:"hidden"}),c.jsx(X,{iconSize:T,icon:A,className:"prefix"}),h&&c.jsx(h,{size:T,strokeWidth:2.5}),c.jsxs(ls,{size:N,children:[le.map(W=>c.jsx(us,{label:re(W),value:W,handleChangeValue:De,disabled:$},W)),le.length<=0&&c.jsx("p",{children:a})]}),c.jsxs(ds,{isFocused:he,isSearchable:f,search:Z,onSearch:Ne,children:[be.map(({label:W,value:se})=>c.jsx(fs,{label:W,value:se,size:N,handleChangeValue:De,optionHasSelected:ie},se)),be.length<=0&&c.jsx("p",{children:k})]}),c.jsx(is,{disabled:$,isFocused:he,readOnly:u,iconSize:T,isLoading:l}),c.jsx(gs,{iconSize:T,isLoading:l}),c.jsx(_s,{handleBlur:ae,isFocused:he})]}),I&&c.jsx(ye,{children:I})]})}const Ke=[{name:"Afghanistan",code:"+93",prefix:null,iso:"AF",flag:"https://cdn.kcak11.com/CountryFlags/countries/af.svg",mask:"__-___-____"},{name:"Aland Islands",code:"+358",prefix:null,iso:"AX",flag:"https://cdn.kcak11.com/CountryFlags/countries/ax.svg",mask:"(___) ___-__-__"},{name:"Albania",code:"+355",prefix:null,iso:"AL",flag:"https://cdn.kcak11.com/CountryFlags/countries/al.svg",mask:"(___) ___-___"},{name:"Algeria",code:"+213",prefix:null,iso:"DZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/dz.svg",mask:"__-___-____"},{name:"American Samoa",code:"+1",prefix:"684",iso:"AS",flag:"https://cdn.kcak11.com/CountryFlags/countries/as.svg",mask:"(684) ___-____"},{name:"Andorra",code:"+376",prefix:null,iso:"AD",flag:"https://cdn.kcak11.com/CountryFlags/countries/ad.svg",mask:"___-___"},{name:"Angola",code:"+244",prefix:null,iso:"AO",flag:"https://cdn.kcak11.com/CountryFlags/countries/ao.svg",mask:"(___) ___-___"},{name:"Anguilla",code:"+1",prefix:"264",iso:"AI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ai.svg",mask:"(264) ___-____"},{name:"Antarctica",code:"+672",prefix:"1",iso:"AQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/aq.svg",mask:"1__-___"},{name:"Antigua and Barbuda",code:"+1",prefix:"268",iso:"AG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ag.svg",mask:"(268) ___-____"},{name:"Argentina",code:"+54",prefix:null,iso:"AR",flag:"https://cdn.kcak11.com/CountryFlags/countries/ar.svg",mask:"(___) ___-____"},{name:"Armenia",code:"+374",prefix:null,iso:"AM",flag:"https://cdn.kcak11.com/CountryFlags/countries/am.svg",mask:"__-___-___"},{name:"Aruba",code:"+297",prefix:null,iso:"AW",flag:"https://cdn.kcak11.com/CountryFlags/countries/aw.svg",mask:"___-____"},{name:"Ascension Island",code:"+247",prefix:null,iso:"AC",flag:"https://cdn.kcak11.com/CountryFlags/countries/sh.svg",mask:"____"},{name:"Australia",code:"+61",prefix:null,iso:"AU",flag:"https://cdn.kcak11.com/CountryFlags/countries/au.svg",mask:"_-____-____"},{name:"Austria",code:"+43",prefix:null,iso:"AT",flag:"https://cdn.kcak11.com/CountryFlags/countries/at.svg",mask:"(___) ___-____"},{name:"Azerbaijan",code:"+994",prefix:null,iso:"AZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/az.svg",mask:"__-___-__-__"},{name:"Bahamas",code:"+1",prefix:"242",iso:"BS",flag:"https://cdn.kcak11.com/CountryFlags/countries/bs.svg",mask:"(242) ___-____"},{name:"Bahrain",code:"+973",prefix:null,iso:"BH",flag:"https://cdn.kcak11.com/CountryFlags/countries/bh.svg",mask:"____-____"},{name:"Bangladesh",code:"+880",prefix:"1",iso:"BD",flag:"https://cdn.kcak11.com/CountryFlags/countries/bd.svg",mask:"1___-______"},{name:"Barbados",code:"+1",prefix:"246",iso:"BB",flag:"https://cdn.kcak11.com/CountryFlags/countries/bb.svg",mask:"(246) ___-____"},{name:"Belarus",code:"+375",prefix:null,iso:"BY",flag:"https://cdn.kcak11.com/CountryFlags/countries/by.svg",mask:"(__) ___-__-__"},{name:"Belgium",code:"+32",prefix:null,iso:"BE",flag:"https://cdn.kcak11.com/CountryFlags/countries/be.svg",mask:"(___) ___-___"},{name:"Belize",code:"+501",prefix:null,iso:"BZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/bz.svg",mask:"___-____"},{name:"Benin",code:"+229",prefix:null,iso:"BJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/bj.svg",mask:"__-__-____"},{name:"Bermuda",code:"+1",prefix:"441",iso:"BM",flag:"https://cdn.kcak11.com/CountryFlags/countries/bm.svg",mask:"(441) ___-____"},{name:"Bhutan",code:"+975",prefix:null,iso:"BT",flag:"https://cdn.kcak11.com/CountryFlags/countries/bt.svg",mask:"_-___-___"},{name:"Bolivia",code:"+591",prefix:null,iso:"BO",flag:"https://cdn.kcak11.com/CountryFlags/countries/bo.svg",mask:"_-___-____"},{name:"Bosnia and Herzegovina",code:"+387",prefix:null,iso:"BA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ba.svg",mask:"__-_____"},{name:"Botswana",code:"+267",prefix:null,iso:"BW",flag:"https://cdn.kcak11.com/CountryFlags/countries/bw.svg",mask:"__-___-___"},{name:"Brasil",code:"+55",prefix:null,iso:"BR",flag:"https://cdn.kcak11.com/CountryFlags/countries/br.svg",mask:"(__) _____-____"},{name:"British Indian Ocean Territory",code:"+246",prefix:null,iso:"IO",flag:"https://cdn.kcak11.com/CountryFlags/countries/io.svg",mask:"___-____"},{name:"Brunei Darussalam",code:"+673",prefix:null,iso:"BN",flag:"https://cdn.kcak11.com/CountryFlags/countries/bn.svg",mask:"___-____"},{name:"Bulgaria",code:"+359",prefix:null,iso:"BG",flag:"https://cdn.kcak11.com/CountryFlags/countries/bg.svg",mask:"(___) ___-___"},{name:"Burkina Faso",code:"+226",prefix:null,iso:"BF",flag:"https://cdn.kcak11.com/CountryFlags/countries/bf.svg",mask:"__-__-____"},{name:"Burundi",code:"+257",prefix:null,iso:"BI",flag:"https://cdn.kcak11.com/CountryFlags/countries/bi.svg",mask:"__-__-____"},{name:"Cambodia",code:"+855",prefix:null,iso:"KH",flag:"https://cdn.kcak11.com/CountryFlags/countries/kh.svg",mask:"__-___-___"},{name:"Cameroon",code:"+237",prefix:null,iso:"CM",flag:"https://cdn.kcak11.com/CountryFlags/countries/cm.svg",mask:"____-____"},{name:"Canada",code:"+1",prefix:null,iso:"CA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ca.svg",mask:"(___) ___-____"},{name:"Cape Verde",code:"+238",prefix:null,iso:"CV",flag:"https://cdn.kcak11.com/CountryFlags/countries/cv.svg",mask:"(___) __-__"},{name:"Cayman Islands",code:"+1",prefix:"345",iso:"KY",flag:"https://cdn.kcak11.com/CountryFlags/countries/ky.svg",mask:"(345) ___-____"},{name:"Central African Republic",code:"+236",prefix:null,iso:"CF",flag:"https://cdn.kcak11.com/CountryFlags/countries/cf.svg",mask:"__-__-____"},{name:"Chad",code:"+235",prefix:null,iso:"TD",flag:"https://cdn.kcak11.com/CountryFlags/countries/td.svg",mask:"__-__-__-__"},{name:"Chile",code:"+56",prefix:null,iso:"CL",flag:"https://cdn.kcak11.com/CountryFlags/countries/cl.svg",mask:"_-____-____"},{name:"China",code:"+86",prefix:null,iso:"CN",flag:"https://cdn.kcak11.com/CountryFlags/countries/cn.svg",mask:"__-_____-_____"},{name:"Christmas Island",code:"+61",prefix:null,iso:"CX",flag:"https://cdn.kcak11.com/CountryFlags/countries/cx.svg",mask:"_-____-____"},{name:"Cocos (Keeling) Islands",code:"+61",prefix:null,iso:"CC",flag:"https://cdn.kcak11.com/CountryFlags/countries/cc.svg",mask:"_-____-____"},{name:"Colombia",code:"+57",prefix:null,iso:"CO",flag:"https://cdn.kcak11.com/CountryFlags/countries/co.svg",mask:"(___) ___-____"},{name:"Comoros",code:"+269",prefix:null,iso:"KM",flag:"https://cdn.kcak11.com/CountryFlags/countries/km.svg",mask:"__-_____"},{name:"Congo",code:"+242",prefix:null,iso:"CG",flag:"https://cdn.kcak11.com/CountryFlags/countries/cg.svg",mask:"__-_____"},{name:"Cook Islands",code:"+682",prefix:null,iso:"CK",flag:"https://cdn.kcak11.com/CountryFlags/countries/ck.svg",mask:"__-___"},{name:"Costa Rica",code:"+506",prefix:null,iso:"CR",flag:"https://cdn.kcak11.com/CountryFlags/countries/cr.svg",mask:"____-____"},{name:"Croatia",code:"+385",prefix:null,iso:"HR",flag:"https://cdn.kcak11.com/CountryFlags/countries/hr.svg",mask:"__-___-___"},{name:"Cuba",code:"+53",prefix:null,iso:"CU",flag:"https://cdn.kcak11.com/CountryFlags/countries/cu.svg",mask:"_-___-____"},{name:"Cyprus",code:"+357",prefix:null,iso:"CY",flag:"https://cdn.kcak11.com/CountryFlags/countries/cy.svg",mask:"__-___-___"},{name:"Czech Republic",code:"+420",prefix:null,iso:"CZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/cz.svg",mask:"(___) ___-___"},{name:"Democratic Republic of the Congo",code:"+243",prefix:null,iso:"CD",flag:"https://cdn.kcak11.com/CountryFlags/countries/cd.svg",mask:"(___) ___-___"},{name:"Denmark",code:"+45",prefix:null,iso:"DK",flag:"https://cdn.kcak11.com/CountryFlags/countries/dk.svg",mask:"__-__-__-__"},{name:"Djibouti",code:"+253",prefix:null,iso:"DJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/dj.svg",mask:"__-__-__-__"},{name:"Dominica",code:"+1",prefix:"767",iso:"DM",flag:"https://cdn.kcak11.com/CountryFlags/countries/dm.svg",mask:"(767) ___-____"},{name:"Dominican Republic",code:"+1",prefix:"849",iso:"DO",flag:"https://cdn.kcak11.com/CountryFlags/countries/do.svg",mask:"(894) ___-____"},{name:"Ecuador",code:"+593",prefix:null,iso:"EC",flag:"https://cdn.kcak11.com/CountryFlags/countries/ec.svg",mask:"__-___-____"},{name:"Egypt",code:"+20",prefix:null,iso:"EG",flag:"https://cdn.kcak11.com/CountryFlags/countries/eg.svg",mask:"(___) ___-____"},{name:"El Salvador",code:"+503",prefix:null,iso:"SV",flag:"https://cdn.kcak11.com/CountryFlags/countries/sv.svg",mask:"__-__-____"},{name:"Equatorial Guinea",code:"+240",prefix:null,iso:"GQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/gq.svg",mask:"__-___-____"},{name:"Eritrea",code:"+291",prefix:null,iso:"ER",flag:"https://cdn.kcak11.com/CountryFlags/countries/er.svg",mask:"_-___-___"},{name:"Estonia",code:"+372",prefix:null,iso:"EE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ee.svg",mask:"____-____"},{name:"Eswatini",code:"+268",prefix:null,iso:"SZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/sz.svg",mask:"__-__-____"},{name:"Ethiopia",code:"+251",prefix:null,iso:"ET",flag:"https://cdn.kcak11.com/CountryFlags/countries/et.svg",mask:"__-___-____"},{name:"Falkland Islands (Malvinas)",code:"+500",prefix:null,iso:"FK",flag:"https://cdn.kcak11.com/CountryFlags/countries/fk.svg",mask:"_____"},{name:"Faroe Islands",code:"+298",prefix:null,iso:"FO",flag:"https://cdn.kcak11.com/CountryFlags/countries/fo.svg",mask:"__ __ __"},{name:"Fiji",code:"+679",prefix:null,iso:"FJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/fj.svg",mask:"__-_____"},{name:"Finland",code:"+358",prefix:null,iso:"FI",flag:"https://cdn.kcak11.com/CountryFlags/countries/fi.svg",mask:"__ ___ ____"},{name:"France",code:"+33",prefix:null,iso:"FR",flag:"https://cdn.kcak11.com/CountryFlags/countries/fr.svg",mask:"_ __ __ __ __"},{name:"French Guiana",code:"+594",prefix:null,iso:"GF",flag:"https://cdn.kcak11.com/CountryFlags/countries/gf.svg",mask:"___ __ __ __"},{name:"French Polynesia",code:"+689",prefix:null,iso:"PF",flag:"https://cdn.kcak11.com/CountryFlags/countries/pf.svg",mask:"__ __ __ __"},{name:"Gabon",code:"+241",prefix:null,iso:"GA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ga.svg",mask:"_ __ __ __"},{name:"Gambia",code:"+220",prefix:null,iso:"GM",flag:"https://cdn.kcak11.com/CountryFlags/countries/gm.svg",mask:"___ ____"},{name:"Georgia",code:"+995",prefix:null,iso:"GE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ge.svg",mask:"(___) ___-___"},{name:"Germany",code:"+49",prefix:"3",iso:"DE",flag:"https://cdn.kcak11.com/CountryFlags/countries/de.svg",mask:"(3____) __-____"},{name:"Ghana",code:"+233",prefix:"03",iso:"GH",flag:"https://cdn.kcak11.com/CountryFlags/countries/gh.svg",mask:"03_ ___ ____"},{name:"Gibraltar",code:"+350",prefix:null,iso:"GI",flag:"https://cdn.kcak11.com/CountryFlags/countries/gi.svg",mask:"___-_____"},{name:"Greece",code:"+30",prefix:null,iso:"GR",flag:"https://cdn.kcak11.com/CountryFlags/countries/gr.svg",mask:"(___) ___-____"},{name:"Greenland",code:"+299",prefix:null,iso:"GL",flag:"https://cdn.kcak11.com/CountryFlags/countries/gl.svg",mask:"__-__-__"},{name:"Grenada",code:"+1",prefix:"473",iso:"GD",flag:"https://cdn.kcak11.com/CountryFlags/countries/gd.svg",mask:"(473) ___-____"},{name:"Guadeloupe",code:"+590",prefix:null,iso:"GP",flag:"https://cdn.kcak11.com/CountryFlags/countries/gp.svg",mask:"___ __ __ __"},{name:"Guam",code:"+1",prefix:"671",iso:"GU",flag:"https://cdn.kcak11.com/CountryFlags/countries/gu.svg",mask:"671 ___ ____"},{name:"Guatemala",code:"+502",prefix:null,iso:"GT",flag:"https://cdn.kcak11.com/CountryFlags/countries/gt.svg",mask:"_-___-____"},{name:"Guernsey",code:"+44",prefix:null,iso:"GG",flag:"https://cdn.kcak11.com/CountryFlags/countries/gg.svg",mask:"(____) ______"},{name:"Guinea",code:"+224",prefix:null,iso:"GN",flag:"https://cdn.kcak11.com/CountryFlags/countries/gn.svg",mask:"__-___-___"},{name:"Guinea-Bissau",code:"+245",prefix:null,iso:"GW",flag:"https://cdn.kcak11.com/CountryFlags/countries/gw.svg",mask:"_-______"},{name:"Guyana",code:"+592",prefix:null,iso:"GY",flag:"https://cdn.kcak11.com/CountryFlags/countries/gy.svg",mask:"___-____"},{name:"Haiti",code:"+509",prefix:null,iso:"HT",flag:"https://cdn.kcak11.com/CountryFlags/countries/ht.svg",mask:"__-__-____"},{name:"Holy See (Vatican City State)",code:"+39",prefix:"06698",iso:"VA",flag:"https://cdn.kcak11.com/CountryFlags/countries/va.svg",mask:"06 698_____"},{name:"Honduras",code:"+504",prefix:null,iso:"HN",flag:"https://cdn.kcak11.com/CountryFlags/countries/hn.svg",mask:"____-____"},{name:"Hong Kong",code:"+852",prefix:null,iso:"HK",flag:"https://cdn.kcak11.com/CountryFlags/countries/hk.svg",mask:"____-____"},{name:"Hungary",code:"+36",prefix:null,iso:"HU",flag:"https://cdn.kcak11.com/CountryFlags/countries/hu.svg",mask:"__ ___ ____"},{name:"Iceland",code:"+354",prefix:null,iso:"IS",flag:"https://cdn.kcak11.com/CountryFlags/countries/is.svg",mask:"___-____"},{name:"India",code:"+91",prefix:null,iso:"IN",flag:"https://cdn.kcak11.com/CountryFlags/countries/in.svg",mask:"(____) ___-___"},{name:"Indonesia",code:"+62",prefix:"8",iso:"ID",flag:"https://cdn.kcak11.com/CountryFlags/countries/id.svg",mask:"(8__) ___-__-___"},{name:"Iran",code:"+98",prefix:null,iso:"IR",flag:"https://cdn.kcak11.com/CountryFlags/countries/ir.svg",mask:"(___) ___-____"},{name:"Iraq",code:"+964",prefix:null,iso:"IQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/iq.svg",mask:"(___) ___-____"},{name:"Ireland",code:"+353",prefix:null,iso:"IE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ie.svg",mask:"(___) ___-___"},{name:"Isle of Man",code:"+44",prefix:null,iso:"IM",flag:"https://cdn.kcak11.com/CountryFlags/countries/im.svg",mask:"(____) ______"},{name:"Israel",code:"+972",prefix:"5",iso:"IL",flag:"https://cdn.kcak11.com/CountryFlags/countries/il.svg",mask:"__-___-____"},{name:"Italy",code:"+39",prefix:null,iso:"IT",flag:"https://cdn.kcak11.com/CountryFlags/countries/it.svg",mask:"(___) ____-___"},{name:"Ivory Coast / Cote d'Ivoire",code:"+225",prefix:null,iso:"CI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ci.svg",mask:"__-___-___"},{name:"Jamaica",code:"+1",prefix:"876",iso:"JM",flag:"https://cdn.kcak11.com/CountryFlags/countries/jm.svg",mask:"(876) ___-____"},{name:"Japan",code:"+81",prefix:null,iso:"JP",flag:"https://cdn.kcak11.com/CountryFlags/countries/jp.svg",mask:"__-____-____"},{name:"Jersey",code:"+44",prefix:null,iso:"JE",flag:"https://cdn.kcak11.com/CountryFlags/countries/je.svg",mask:"(____) ____-______"},{name:"Jordan",code:"+962",prefix:null,iso:"JO",flag:"https://cdn.kcak11.com/CountryFlags/countries/jo.svg",mask:"_-____-____"},{name:"Kazakhstan",code:"+77",prefix:null,iso:"KZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/kz.svg",mask:"(_____) _ __ __"},{name:"Kenya",code:"+254",prefix:null,iso:"KE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ke.svg",mask:"___-______"},{name:"Kiribati",code:"+686",prefix:null,iso:"KI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ki.svg",mask:"__-___"},{name:"Korea, Democratic People's Republic of Korea",code:"+850",prefix:null,iso:"KP",flag:"https://cdn.kcak11.com/CountryFlags/countries/kp.svg",mask:"____-_____________"},{name:"Korea, Republic of South Korea",code:"+82",prefix:null,iso:"KR",flag:"https://cdn.kcak11.com/CountryFlags/countries/kr.svg",mask:"__-___-____"},{name:"Kosovo",code:"+383",prefix:null,iso:"XK",flag:"https://cdn.kcak11.com/CountryFlags/countries/xk.svg",mask:"___-___-___"},{name:"Kuwait",code:"+965",prefix:null,iso:"KW",flag:"https://cdn.kcak11.com/CountryFlags/countries/kw.svg",mask:"____-____"},{name:"Kyrgyzstan",code:"+996",prefix:null,iso:"KG",flag:"https://cdn.kcak11.com/CountryFlags/countries/kg.svg",mask:"(___) ___-___"},{name:"Laos",code:"+856",prefix:"20",iso:"LA",flag:"https://cdn.kcak11.com/CountryFlags/countries/la.svg",mask:"(20__) ___-___"},{name:"Latvia",code:"+371",prefix:null,iso:"LV",flag:"https://cdn.kcak11.com/CountryFlags/countries/lv.svg",mask:"__-___-___"},{name:"Lebanon",code:"+961",prefix:null,iso:"LB",flag:"https://cdn.kcak11.com/CountryFlags/countries/lb.svg",mask:"__-___-___"},{name:"Lesotho",code:"+266",prefix:null,iso:"LS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ls.svg",mask:"_-___-____"},{name:"Liberia",code:"+231",prefix:null,iso:"LR",flag:"https://cdn.kcak11.com/CountryFlags/countries/lr.svg",mask:"__-___-___"},{name:"Libya",code:"+218",prefix:"21",iso:"LY",flag:"https://cdn.kcak11.com/CountryFlags/countries/ly.svg",mask:"21-___-____"},{name:"Liechtenstein",code:"+423",prefix:null,iso:"LI",flag:"https://cdn.kcak11.com/CountryFlags/countries/li.svg",mask:"(___) ___-____"},{name:"Lithuania",code:"+370",prefix:null,iso:"LT",flag:"https://cdn.kcak11.com/CountryFlags/countries/lt.svg",mask:"(___) __-___"},{name:"Luxembourg",code:"+352",prefix:null,iso:"LU",flag:"https://cdn.kcak11.com/CountryFlags/countries/lu.svg",mask:"(___) ___-___"},{name:"Macau",code:"+853",prefix:null,iso:"MO",flag:"https://cdn.kcak11.com/CountryFlags/countries/mo.svg",mask:"____-____"},{name:"Madagascar",code:"+261",prefix:null,iso:"MG",flag:"https://cdn.kcak11.com/CountryFlags/countries/mg.svg",mask:"__-__-_____"},{name:"Malawi",code:"+265",prefix:null,iso:"MW",flag:"https://cdn.kcak11.com/CountryFlags/countries/mw.svg",mask:"_-____-____"},{name:"Malaysia",code:"+60",prefix:null,iso:"MY",flag:"https://cdn.kcak11.com/CountryFlags/countries/my.svg",mask:"__-___-____"},{name:"Maldives",code:"+960",prefix:null,iso:"MV",flag:"https://cdn.kcak11.com/CountryFlags/countries/mv.svg",mask:"___-____"},{name:"Mali",code:"+223",prefix:null,iso:"ML",flag:"https://cdn.kcak11.com/CountryFlags/countries/ml.svg",mask:"__-__-____"},{name:"Malta",code:"+356",prefix:null,iso:"MT",flag:"https://cdn.kcak11.com/CountryFlags/countries/mt.svg",mask:"____-____"},{name:"Marshall Islands",code:"+692",prefix:null,iso:"MH",flag:"https://cdn.kcak11.com/CountryFlags/countries/mh.svg",mask:"___-____"},{name:"Martinique",code:"+596",prefix:null,iso:"MQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/mq.svg",mask:"(___) __-__-__"},{name:"Mauritania",code:"+222",prefix:null,iso:"MR",flag:"https://cdn.kcak11.com/CountryFlags/countries/mr.svg",mask:"__-__-____"},{name:"Mauritius",code:"+230",prefix:null,iso:"MU",flag:"https://cdn.kcak11.com/CountryFlags/countries/mu.svg",mask:"___-____"},{name:"Mayotte",code:"+262",prefix:null,iso:"YT",flag:"https://cdn.kcak11.com/CountryFlags/countries/yt.svg",mask:"_____-____"},{name:"Mexico",code:"+52",prefix:null,iso:"MX",flag:"https://cdn.kcak11.com/CountryFlags/countries/mx.svg",mask:"(___) ___-____"},{name:"Micronesia, Federated States of Micronesia",code:"+691",prefix:null,iso:"FM",flag:"https://cdn.kcak11.com/CountryFlags/countries/fm.svg",mask:"___-____"},{name:"Moldova",code:"+373",prefix:null,iso:"MD",flag:"https://cdn.kcak11.com/CountryFlags/countries/md.svg",mask:"____-____"},{name:"Monaco",code:"+377",prefix:null,iso:"MC",flag:"https://cdn.kcak11.com/CountryFlags/countries/mc.svg",mask:"(___) ___-___"},{name:"Mongolia",code:"+976",prefix:null,iso:"MN",flag:"https://cdn.kcak11.com/CountryFlags/countries/mn.svg",mask:"__-__-____"},{name:"Montenegro",code:"+382",prefix:null,iso:"ME",flag:"https://cdn.kcak11.com/CountryFlags/countries/me.svg",mask:"__-___-___"},{name:"Montserrat",code:"+1",prefix:"664",iso:"MS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ms.svg",mask:"(664) ___-____"},{name:"Morocco",code:"+212",prefix:null,iso:"MA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ma.svg",mask:"__-____-___"},{name:"Mozambique",code:"+258",prefix:null,iso:"MZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/mz.svg",mask:"__-___-___"},{name:"Myanmar",code:"+95",prefix:null,iso:"MM",flag:"https://cdn.kcak11.com/CountryFlags/countries/mm.svg",mask:"__-___-___"},{name:"Namibia",code:"+264",prefix:null,iso:"NA",flag:"https://cdn.kcak11.com/CountryFlags/countries/na.svg",mask:"__-___-____"},{name:"Nauru",code:"+674",prefix:null,iso:"NR",flag:"https://cdn.kcak11.com/CountryFlags/countries/nr.svg",mask:"___-____"},{name:"Nepal",code:"+977",prefix:null,iso:"NP",flag:"https://cdn.kcak11.com/CountryFlags/countries/np.svg",mask:"__-___-___"},{name:"Netherlands",code:"+31",prefix:null,iso:"NL",flag:"https://cdn.kcak11.com/CountryFlags/countries/nl.svg",mask:"__-___-____"},{name:"New Caledonia",code:"+687",prefix:null,iso:"NC",flag:"https://cdn.kcak11.com/CountryFlags/countries/nc.svg",mask:"__-____"},{name:"New Zealand",code:"+64",prefix:null,iso:"NZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/nz.svg",mask:"(___) ___-____"},{name:"Nicaragua",code:"+505",prefix:null,iso:"NI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ni.svg",mask:"____-____"},{name:"Niger",code:"+227",prefix:null,iso:"NE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ne.svg",mask:"__-__-____"},{name:"Nigeria",code:"+234",prefix:null,iso:"NG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ng.svg",mask:"(___) ___-____"},{name:"Niue",code:"+683",prefix:null,iso:"NU",flag:"https://cdn.kcak11.com/CountryFlags/countries/nu.svg",mask:"____"},{name:"Norfolk Island",code:"+672",prefix:"3",iso:"NF",flag:"https://cdn.kcak11.com/CountryFlags/countries/nf.svg",mask:"3__-___"},{name:"North Macedonia",code:"+389",prefix:null,iso:"MK",flag:"https://cdn.kcak11.com/CountryFlags/countries/mk.svg",mask:"__-___-___"},{name:"Northern Mariana Islands",code:"+1",prefix:"670",iso:"MP",flag:"https://cdn.kcak11.com/CountryFlags/countries/mp.svg",mask:"(670) ___-____"},{name:"Norway",code:"+47",prefix:null,iso:"NO",flag:"https://cdn.kcak11.com/CountryFlags/countries/no.svg",mask:"(___) __-___"},{name:"Oman",code:"+968",prefix:null,iso:"OM",flag:"https://cdn.kcak11.com/CountryFlags/countries/om.svg",mask:"__-___-___"},{name:"Pakistan",code:"+92",prefix:null,iso:"PK",flag:"https://cdn.kcak11.com/CountryFlags/countries/pk.svg",mask:"(___) ___-____"},{name:"Palau",code:"+680",prefix:null,iso:"PW",flag:"https://cdn.kcak11.com/CountryFlags/countries/pw.svg",mask:"___-____"},{name:"Palestine",code:"+970",prefix:null,iso:"PS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ps.svg",mask:"__-___-____"},{name:"Panama",code:"+507",prefix:null,iso:"PA",flag:"https://cdn.kcak11.com/CountryFlags/countries/pa.svg",mask:"___-____"},{name:"Papua New Guinea",code:"+675",prefix:null,iso:"PG",flag:"https://cdn.kcak11.com/CountryFlags/countries/pg.svg",mask:"(___) __-___"},{name:"Paraguay",code:"+595",prefix:null,iso:"PY",flag:"https://cdn.kcak11.com/CountryFlags/countries/py.svg",mask:"(___) ___-___"},{name:"Peru",code:"+51",prefix:null,iso:"PE",flag:"https://cdn.kcak11.com/CountryFlags/countries/pe.svg",mask:"(___) ___-___"},{name:"Philippines",code:"+63",prefix:null,iso:"PH",flag:"https://cdn.kcak11.com/CountryFlags/countries/ph.svg",mask:"(___) ___-____"},{name:"Pitcairn",code:"+870",prefix:null,iso:"PN",flag:"https://cdn.kcak11.com/CountryFlags/countries/pn.svg",mask:"___-___-___"},{name:"Poland",code:"+48",prefix:null,iso:"PL",flag:"https://cdn.kcak11.com/CountryFlags/countries/pl.svg",mask:"(___) ___-___"},{name:"Portugal",code:"+351",prefix:null,iso:"PT",flag:"https://cdn.kcak11.com/CountryFlags/countries/pt.svg",mask:"__-___-____"},{name:"Puerto Rico",code:"+1",prefix:null,iso:"PR",flag:"https://cdn.kcak11.com/CountryFlags/countries/pr.svg",mask:"(___) ___ ____"},{name:"Qatar",code:"+974",prefix:null,iso:"QA",flag:"https://cdn.kcak11.com/CountryFlags/countries/qa.svg",mask:"____-____"},{name:"Reunion",code:"+262",prefix:null,iso:"RE",flag:"https://cdn.kcak11.com/CountryFlags/countries/re.svg",mask:"_____-____"},{name:"Romania",code:"+40",prefix:null,iso:"RO",flag:"https://cdn.kcak11.com/CountryFlags/countries/ro.svg",mask:"__-___-____"},{name:"Russia",code:"+7",prefix:null,iso:"RU",flag:"https://cdn.kcak11.com/CountryFlags/countries/ru.svg",mask:"(___) ___-__-__"},{name:"Rwanda",code:"+250",prefix:null,iso:"RW",flag:"https://cdn.kcak11.com/CountryFlags/countries/rw.svg",mask:"(___) ___-___"},{name:"Saint Barthelemy",code:"+590",prefix:null,iso:"BL",flag:"https://cdn.kcak11.com/CountryFlags/countries/bl.svg",mask:"___-__-__-__"},{name:"Saint Helena, Ascension and Tristan Da Cunha",code:"+290",prefix:null,iso:"SH",flag:"https://cdn.kcak11.com/CountryFlags/countries/sh.svg",mask:"____"},{name:"Saint Kitts and Nevis",code:"+1",prefix:null,iso:"KN",flag:"https://cdn.kcak11.com/CountryFlags/countries/kn.svg",mask:"(869) ___-____"},{name:"Saint Lucia",code:"+1",prefix:"758",iso:"LC",flag:"https://cdn.kcak11.com/CountryFlags/countries/lc.svg",mask:"(758) ___-____"},{name:"Saint Martin",code:"+590",prefix:null,iso:"MF",flag:"https://cdn.kcak11.com/CountryFlags/countries/mf.svg",mask:"(___) ___-___"},{name:"Saint Pierre and Miquelon",code:"+508",prefix:null,iso:"PM",flag:"https://cdn.kcak11.com/CountryFlags/countries/pm.svg",mask:"__-____"},{name:"Saint Vincent and the Grenadines",code:"+1",prefix:"784",iso:"VC",flag:"https://cdn.kcak11.com/CountryFlags/countries/vc.svg",mask:"(784) ___-____"},{name:"Samoa",code:"+685",prefix:null,iso:"WS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ws.svg",mask:"__-____"},{name:"San Marino",code:"+378",prefix:null,iso:"SM",flag:"https://cdn.kcak11.com/CountryFlags/countries/sm.svg",mask:"____-______"},{name:"Sao Tome and Principe",code:"+239",prefix:null,iso:"ST",flag:"https://cdn.kcak11.com/CountryFlags/countries/st.svg",mask:"__-_____"},{name:"Saudi Arabia",code:"+966",prefix:null,iso:"SA",flag:"https://cdn.kcak11.com/CountryFlags/countries/sa.svg",mask:"_-____-____"},{name:"Senegal",code:"+221",prefix:null,iso:"SN",flag:"https://cdn.kcak11.com/CountryFlags/countries/sn.svg",mask:"__-___-____"},{name:"Serbia",code:"+381",prefix:null,iso:"RS",flag:"https://cdn.kcak11.com/CountryFlags/countries/rs.svg",mask:"__-___-____"},{name:"Seychelles",code:"+248",prefix:null,iso:"SC",flag:"https://cdn.kcak11.com/CountryFlags/countries/sc.svg",mask:"_-___-___"},{name:"Sierra Leone",code:"+232",prefix:null,iso:"SL",flag:"https://cdn.kcak11.com/CountryFlags/countries/sl.svg",mask:"__-______"},{name:"Singapore",code:"+65",prefix:null,iso:"SG",flag:"https://cdn.kcak11.com/CountryFlags/countries/sg.svg",mask:"____-____"},{name:"Sint Maarten",code:"+1",prefix:"721",iso:"SX",flag:"https://cdn.kcak11.com/CountryFlags/countries/sx.svg",mask:"(721) ___-____"},{name:"Slovakia",code:"+421",prefix:null,iso:"SK",flag:"https://cdn.kcak11.com/CountryFlags/countries/sk.svg",mask:"(___) ___-___"},{name:"Slovenia",code:"+386",prefix:null,iso:"SI",flag:"https://cdn.kcak11.com/CountryFlags/countries/si.svg",mask:"__-___-___"},{name:"Solomon Islands",code:"+677",prefix:null,iso:"SB",flag:"https://cdn.kcak11.com/CountryFlags/countries/sb.svg",mask:"___-____"},{name:"Somalia",code:"+252",prefix:null,iso:"SO",flag:"https://cdn.kcak11.com/CountryFlags/countries/so.svg",mask:"__-___-___"},{name:"South Africa",code:"+27",prefix:null,iso:"ZA",flag:"https://cdn.kcak11.com/CountryFlags/countries/za.svg",mask:"__-___-____"},{name:"South Georgia and the South Sandwich Islands",code:"+500",prefix:null,iso:"GS",flag:"https://cdn.kcak11.com/CountryFlags/countries/gs.svg",mask:"_____"},{name:"South Sudan",code:"+211",prefix:null,iso:"SS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ss.svg",mask:"__-___-____"},{name:"Spain",code:"+34",prefix:null,iso:"ES",flag:"https://cdn.kcak11.com/CountryFlags/countries/es.svg",mask:"(___) ___-___"},{name:"Sri Lanka",code:"+94",prefix:null,iso:"LK",flag:"https://cdn.kcak11.com/CountryFlags/countries/lk.svg",mask:"__-___-____"},{name:"Sudan",code:"+249",prefix:null,iso:"SD",flag:"https://cdn.kcak11.com/CountryFlags/countries/sd.svg",mask:"__-___-____"},{name:"Suriname",code:"+597",prefix:null,iso:"SR",flag:"https://cdn.kcak11.com/CountryFlags/countries/sr.svg",mask:"___-____"},{name:"Svalbard and Jan Mayen",code:"+47",prefix:null,iso:"SJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/sj.svg",mask:"(___) __-___"},{name:"Sweden",code:"+46",prefix:null,iso:"SE",flag:"https://cdn.kcak11.com/CountryFlags/countries/se.svg",mask:"__-___-____"},{name:"Switzerland",code:"+41",prefix:null,iso:"CH",flag:"https://cdn.kcak11.com/CountryFlags/countries/ch.svg",mask:"__-___-____"},{name:"Syrian Arab Republic",code:"+963",prefix:null,iso:"SY",flag:"https://cdn.kcak11.com/CountryFlags/countries/sy.svg",mask:"__-____-___"},{name:"Taiwan",code:"+886",prefix:null,iso:"TW",flag:"https://cdn.kcak11.com/CountryFlags/countries/tw.svg",mask:"_-____-____"},{name:"Tajikistan",code:"+992",prefix:null,iso:"TJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/tj.svg",mask:"__-___-____"},{name:"United Republic of Tanzania",code:"+255",prefix:null,iso:"TZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/tz.svg",mask:"__-___-____"},{name:"Thailand",code:"+66",prefix:null,iso:"TH",flag:"https://cdn.kcak11.com/CountryFlags/countries/th.svg",mask:"__-___-____"},{name:"Timor-Leste",code:"+670",prefix:null,iso:"TL",flag:"https://cdn.kcak11.com/CountryFlags/countries/tl.svg",mask:"___-_____"},{name:"Togo",code:"+228",prefix:null,iso:"TG",flag:"https://cdn.kcak11.com/CountryFlags/countries/tg.svg",mask:"__-___-___"},{name:"Tokelau",code:"+690",prefix:null,iso:"TK",flag:"https://cdn.kcak11.com/CountryFlags/countries/tk.svg",mask:"____"},{name:"Tonga",code:"+676",prefix:null,iso:"TO",flag:"https://cdn.kcak11.com/CountryFlags/countries/to.svg",mask:"_____"},{name:"Trinidad and Tobago",code:"+1",prefix:"868",iso:"TT",flag:"https://cdn.kcak11.com/CountryFlags/countries/tt.svg",mask:"(868) ___-____"},{name:"Tunisia",code:"+216",prefix:null,iso:"TN",flag:"https://cdn.kcak11.com/CountryFlags/countries/tn.svg",mask:"__-___-___"},{name:"Turkey",code:"+90",prefix:null,iso:"TR",flag:"https://cdn.kcak11.com/CountryFlags/countries/tr.svg",mask:"(___) ___-____"},{name:"Turkmenistan",code:"+993",prefix:null,iso:"TM",flag:"https://cdn.kcak11.com/CountryFlags/countries/tm.svg",mask:"_-___-____"},{name:"Turks and Caicos Islands",code:"+1",prefix:"249",iso:"TC",flag:"https://cdn.kcak11.com/CountryFlags/countries/tc.svg",mask:"(249) ___-___"},{name:"Tuvalu",code:"+688",prefix:null,iso:"TV",flag:"https://cdn.kcak11.com/CountryFlags/countries/tv.svg",mask:"______"},{name:"Uganda",code:"+256",prefix:null,iso:"UG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ug.svg",mask:"(___) ___-___"},{name:"Ukraine",code:"+380",prefix:null,iso:"UA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ua.svg",mask:"(__) ___-__-__"},{name:"United Arab Emirates",code:"+971",prefix:null,iso:"AE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ae.svg",mask:"_-___-____"},{name:"United Kingdom",code:"+44",prefix:null,iso:"GB",flag:"https://cdn.kcak11.com/CountryFlags/countries/gb.svg",mask:"__-____-____"},{name:"United States",code:"+1",prefix:"408",iso:"US",flag:"https://cdn.kcak11.com/CountryFlags/countries/us.svg",mask:"(408) ___-____"},{name:"Uruguay",code:"+598",prefix:null,iso:"UY",flag:"https://cdn.kcak11.com/CountryFlags/countries/uy.svg",mask:"_-___-__-__"},{name:"Uzbekistan",code:"+998",prefix:null,iso:"UZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/uz.svg",mask:"__-___-____"},{name:"Vanuatu",code:"+678",prefix:null,iso:"VU",flag:"https://cdn.kcak11.com/CountryFlags/countries/vu.svg",mask:"__-_____"},{name:"Venezuela, Bolivarian Republic of Venezuela",code:"+58",prefix:null,iso:"VE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ve.svg",mask:"(___) ___-____"},{name:"Vietnam",code:"+84",prefix:null,iso:"VN",flag:"https://cdn.kcak11.com/CountryFlags/countries/vn.svg",mask:"(___) ____-___"},{name:"Virgin Islands, British",code:"+1",prefix:"284",iso:"VG",flag:"https://cdn.kcak11.com/CountryFlags/countries/vg.svg",mask:"(284) ___-____"},{name:"Virgin Islands, U.S.",code:"+1",prefix:"340",iso:"VI",flag:"https://cdn.kcak11.com/CountryFlags/countries/vi.svg",mask:"(340) ___-____"},{name:"Wallis and Futuna",code:"+681",prefix:null,iso:"WF",flag:"https://cdn.kcak11.com/CountryFlags/countries/wf.svg",mask:"__-____"},{name:"Yemen",code:"+967",prefix:null,iso:"YE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ye.svg",mask:"___-___-___"},{name:"Zambia",code:"+260",prefix:null,iso:"ZM",flag:"https://cdn.kcak11.com/CountryFlags/countries/zm.svg",mask:"__-___-____"},{name:"Zimbabwe",code:"+263",prefix:null,iso:"ZW",flag:"https://cdn.kcak11.com/CountryFlags/countries/zw.svg",mask:"_-______"}];function Wt(e){return e&&e.replace(/[^0-9]/g,"")}const Rt={EIGHT:"(99) 9999-9999",NINE:"(99) 99999-9999"};function Wn(e,t){let n="",r=0;for(let a=0;a<t.length;a++)if(t[a]==="9")if(r<e.length)n+=e[r],r++;else break;else if(r<e.length)n+=t[a];else break;return n}function Rn(e){return e.length>10?"NINE":"EIGHT"}const Xn=Wt(Rt.NINE).length;function Kn(e,t){if(t.code==="+55"){let a=Wt(e);const s=Rn(a);return a.length>Xn?void 0:(a=Wn(a,Rt[s]),a)}let r=t.mask;if(t.prefix){const a=/\$+/g;r=r.replace(a,t.prefix)}for(let a=0,s=0;a<r.length&&s<e.length;a++)r[a]==="_"&&(r=r.substring(0,a)+e[s]+r.substring(a+1),s++);return r}function hs(e,t){const n=Ke.find(r=>r.code===e&&r.prefix===t);return n||null}function ps(e){const t=Ke.find(n=>n.code===e);return t||null}function ys(e){const t=e.split(" ")[0].split("-")[0],n=e.split(" ")[0].split("-")[1],r=e.split(" ")[1];if(!t||!r)return{country:null,formattedNumber:""};if(n){const i=hs(t,n);if(!i)return{country:null,formattedNumber:""};const l=Kn(r,i);return{country:i,formattedNumber:l}}const a=ps(t);if(!a)return{country:null,formattedNumber:""};const s=Kn(r,a);return{country:a,formattedNumber:s}}function vs(e){const{children:t,onFocus:n,disabled:r,isError:a,isLoading:s,isFocused:o,className:i="",readOnly:l,variant:u,size:f}=e,g=`arkynPhoneInputContainer ${u} ${f} ${r||l||s?"opacity":""} ${a?"errored":""} ${o?"focused":""} ${i}`;return c.jsx("section",{className:g.trim(),onClick:n,children:t})}function ks(e){const{isOpen:t,onClick:n}=e;return t?c.jsx("aside",{className:"arkynPhoneInputCountriesOverlay",onClick:n}):c.jsx(c.Fragment,{})}function Cs(e){const{country:t,isActive:n,handleChangeValue:r,size:a}=e,o=`arkynPhoneInputCountryOption ${a} ${n?"active":""}`;return c.jsxs("div",{onClick:()=>r(t),className:o,children:[c.jsx("img",{src:t.flag,alt:t.name,className:"flag"}),t.name," ",c.jsx("span",{children:t.code}),c.jsx(z.Check,{className:"check"})]})}function bs(e){const{children:t,isOpen:n,onSearch:r,search:a,placeholder:s}=e,o=m.useRef(null),[i,l]=m.useState("bottom");function u(f){r(f.target.value)}return Xe(n),m.useEffect(()=>{if(!n)return;(()=>{if(!o.current)return;const d=o.current.parentElement;if(!d)return;const _=d.getBoundingClientRect(),p=window.innerHeight,g=300;p-_.bottom<g&&_.top>g?l("top"):l("bottom")})()},[n]),n?c.jsxs("div",{className:`arkynPhoneInputCountryOptionsContainer ${i}`,ref:o,children:[c.jsx("input",{type:"search",name:"search-select",className:"arkynPhoneInputCountryOptionsContainerSearchSelect",value:a,id:"input-search",placeholder:s,onChange:u}),t]}):c.jsx(c.Fragment,{})}function xs(e){const{currentCountry:t,onClick:n}=e;return c.jsxs("div",{className:"phoneInputSelectCountry",onClick:n,children:[c.jsx("img",{className:"flag",src:t.flag,alt:t.name}),c.jsx(z.ChevronDown,{className:"chevronDown",strokeWidth:2.5}),c.jsx(gt,{orientation:"vertical"})]})}const Es=m.forwardRef((e,t)=>c.jsx("input",{ref:t,...e})),ws=m.forwardRef((e,t)=>{const{onFocus:n,readonly:r,onBlur:a,size:s,onChange:o,value:i,currentCountry:l,disabled:u,id:f}=e,[d,_]=m.useState(!1);m.useEffect(()=>{d?o(l.mask):_(!0)},[l]);const p=`phoneInputMask ${s}`;function g(h){let v=Wt(h.target.value);const b=Rn(v);v.length>Xn||(v=Wn(v,Rt[b]),h.target.value=v,o(v))}return l.code==="+55"?c.jsx("input",{id:f,value:i,onChange:g,className:p,onFocus:n,onBlur:a,disabled:u,ref:t}):c.jsx(Pn.InputMask,{id:f,value:i,readOnly:r,onChange:h=>o(h.target.value),className:p,component:Es,onFocus:n,onBlur:a,disabled:u,mask:l.mask,showMask:!0,replacement:{_:/\d/},ref:t})});function Ss(e){const{defaultCountry:t,label:n,className:r="",disabled:a=!1,errorMessage:s,isLoading:o=!1,readOnly:i=!1,size:l="md",defaultValue:u="",variant:f="solid",showAsterisk:d,name:_,onChange:p,searchCountryPlaceholder:g="Pesquisar país",notFoundCountryText:h="Nenhum país encontrado",id:v}=e,b=ys(u),[E,k]=m.useState(!1),[S,U]=m.useState(""),[A,N]=m.useState(!1),[H,M]=m.useState(b.formattedNumber||""),[x,O]=m.useState(()=>{if(b.country)return b.country;const j=Ke.find(ae=>ae.iso===t);return j||Ke[30]}),{fieldErrors:L}=pe(),I=m.useRef(null),G=v||m.useId(),$=s||(L==null?void 0:L[_]),B=!!$,T=a||o,Z=m.useRef(null);function w(){T||E||A||(k(!0),Z.current&&Z.current.focus())}function he(){N(!0),k(!0)}function Y(){N(!1),k(!1)}function J(){k(!0)}function ke(){k(!1)}function le(j){return j.name.toLowerCase().includes(S.toLowerCase())}function ie(j){return x.prefix?j.replace(x.prefix,"").replaceAll(" ","").replaceAll("-","").replaceAll("(","").replaceAll(")","").trim():j.replaceAll(" ","").replaceAll("-","").replaceAll("(","").replaceAll(")","").trim()}function re(j){let ae=x.code;return x.prefix&&(ae+=`-${x.prefix}`),ae+=" ",ae+=ie(j||H),ae}return c.jsxs(ge,{children:[n&&c.jsx(_e,{htmlFor:G,showAsterisk:d,children:n}),c.jsxs(vs,{disabled:T,isError:B,isLoading:o,isFocused:E,readOnly:i,size:l,variant:f,className:r,onFocus:w,children:[c.jsx(xs,{currentCountry:x,onClick:he,size:l}),c.jsxs(bs,{isOpen:T||i?!1:A,search:S,placeholder:g,onSearch:U,children:[Ke.filter(j=>le(j)).map(j=>c.jsx(Cs,{country:j,handleChangeValue:()=>{O(j),N(!1),M(j.mask)},isActive:j.iso===x.iso,size:l},j.iso)),Ke.filter(j=>le(j)).length===0&&c.jsx("p",{children:h})]}),c.jsx(ks,{isOpen:T||i?!1:A,onClick:Y}),c.jsx(ws,{id:G,ref:Z,readonly:i,currentCountry:x,value:H,disabled:T,onBlur:ke,onFocus:J,size:l,onChange:j=>{M(j),p&&p(re(j))}}),c.jsx("input",{ref:I,type:"hidden",name:_,value:re()})]}),$&&c.jsx(ye,{children:$})]})}function Fs(e){const{children:t,button:n,closeOnClick:r,className:a="",orientation:s="bottomLeft"}=e,[o,i]=m.useState(!1),u=`arkynPopover ${s} ${o?"visibleTrue":"visibleFalse"} ${a}`;function f(){o||i(!0)}return Xe(o),c.jsxs("div",{className:u,onClick:f,children:[n,c.jsx(Le.motion.div,{style:{visibility:o?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:o?1:0},exit:{opacity:0},onClick:()=>r&&i(!1),className:"arkynPopoverContent",children:t}),o&&c.jsx("div",{onClick:()=>i(!1),className:"arkynPopoverOverlay"})]})}const Yn=m.createContext({});function Ns(e){const{children:t,size:n,isError:r,handleChange:a,value:s,disabled:o}=e;return c.jsx(Yn.Provider,{value:{handleChange:a,value:s,size:n,isError:r,disabled:o},children:t})}function Ts(){return m.useContext(Yn)}function Os(e){const{value:t,size:n,disabled:r,children:a,className:s="",onClick:o,onFocus:i,...l}=e,{handleChange:u,size:f,value:d,isError:_,disabled:p}=Ts(),g=d===t,h=n||f,v=r||p,S=`arkynRadioBox ${h} ${g?"checkedTrue":"checkedFalse"} ${_?"errorTrue":"errorFalse"} ${v?"disabledTrue":"disabledFalse"} ${s}`;function U(N){o&&o(N),u(t)}function A(N){i&&i(N),u(t)}return c.jsxs("label",{className:S.trim(),children:[c.jsx("button",{type:"button",disabled:v,onClick:U,onFocus:A,...l}),a]})}function Ps(e){const{defaultValue:t="",name:n,label:r,showAsterisk:a,errorMessage:s,value:o,onChange:i,size:l="md",className:u="",disabled:f=!1,...d}=e,[_,p]=m.useState(t),{fieldErrors:g}=pe();function h(k){p(k),i&&i(k)}const v=s||(g==null?void 0:g[n]),b=!!v,E=`arkynRadioGroup ${l} ${u}`;return c.jsxs(ge,{children:[r&&c.jsx(_e,{showAsterisk:a,children:r}),c.jsxs(Ns,{isError:b,size:l,value:o||_,handleChange:h,disabled:f,children:[c.jsx("input",{style:{display:"none"},type:"text",readOnly:!0,name:n,value:o||_}),c.jsx("div",{className:E.trim(),...d})]}),v&&c.jsx(ye,{children:v})]})}function As(e){const{label:t,size:n="lg",defaultChecked:r=!1,checked:a=null,value:s,unCheckedValue:o="",name:i,className:l="",onCheck:u,id:f,orientation:d="horizontalReverse",..._}=e,p=m.useRef(null),g=f||m.useId(),[h,v]=m.useState(r),b=typeof a=="boolean"?a:h;function E(){v(!h),u&&u(b?o:s||"checked")}const S=`arkynSwitch ${b?"checkedTrue":"checkedFalse"} ${n} ${l}`;return c.jsxs(ge,{orientation:d,children:[t&&c.jsx(_e,{onClick:E,children:t}),c.jsx("button",{type:"button",onClick:E,className:S,..._,children:c.jsx("input",{id:g,type:"hidden",name:i,ref:p,onClick:E,value:b?s||"checked":o})})]})}const Zn=m.createContext({});function Is(){return m.useContext(Zn)}function Ds(e){return c.jsx(Zn.Provider,{value:e,children:e.children})}function Ms(e){const{children:t,disabled:n=!1,className:r="",onClick:a,value:s,...o}=e,{disabled:i,currentTab:l,changeCurrentTab:u}=Is(),f=i||n,p=`arkynTabButton ${f?"isDisabled":""} ${l===s&&s?"isActive":""} ${r}`;function g(h){u(s),a&&a(h)}return c.jsx("button",{onClick:g,className:p.trim(),...o,disabled:f,type:"button",children:t})}function $s(e){const{children:t,onChange:n,defaultValue:r,disabled:a=!1,className:s,...o}=e,[i,l]=m.useState(r||""),u=`arkynTabContainer ${s||""}`;function f(d){l(d),n&&n(d)}return c.jsx(Ds,{disabled:a,currentTab:i,changeCurrentTab:f,children:c.jsx("nav",{className:u.trim(),...o,children:t})})}function Ls(e){const{emptyMessage:t="Nenhum dado adicionado.",className:n,children:r,...a}=e,s=`arkynTableBody ${n}`,o=m.Children.count(r)===0;return c.jsx("tbody",{className:s.trim(),...a,children:o?c.jsx("tr",{className:"arkynTableBodyEmptyLine",children:c.jsx("td",{colSpan:100,children:c.jsx("div",{children:t})})}):r})}function Bs(e){const{className:t,children:n,...r}=e,a=`arkynTableCaption ${t}`;return c.jsx("caption",{className:a.trim(),...r,children:c.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function js(e){const{children:t,className:n,...r}=e,a=`arkynTableContainer ${n}`;return c.jsx("div",{className:a.trim(),...r,children:c.jsx("table",{children:t})})}function zs(e){const{className:t,children:n,...r}=e,a=`arkynTableFooter ${t}`;return c.jsxs("tfoot",{className:a.trim(),...r,children:[c.jsx("tr",{className:"spacingRow"}),c.jsx("tr",{children:c.jsx("th",{colSpan:100,children:c.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function Hs(e){const{className:t,children:n,...r}=e,a=`arkynTableHeader ${t}`;return c.jsxs("thead",{className:a.trim(),...r,children:[c.jsx("tr",{children:n}),c.jsx("tr",{className:"spacingRow"})]})}function Gs(e){const{variant:t="solid",size:n="md",className:r,errorMessage:a,disabled:s=!1,readOnly:o=!1,label:i,showAsterisk:l,name:u,onFocus:f,onBlur:d,title:_,style:p,value:g,defaultValue:h,placeholder:v,id:b,...E}=e,{fieldErrors:k}=pe(),[S,U]=m.useState(!1),A=m.useRef(null),N=b||m.useId(),H=a||(k==null?void 0:k[u]),I=`arkynTextarea ${t} ${n} ${s||o?"opacityTrue":"opacityFalse"} ${!!H?"errorTrue":"errorFalse"} ${S?"focusedTrue":"focusedFalse"} ${r}`;function G(){s||!(A!=null&&A.current)||(U(!0),A.current.focus())}function $(T){U(!0),f&&f(T)}function B(T){U(!1),d&&d(T)}return c.jsxs(ge,{children:[i&&c.jsx(_e,{htmlFor:N,showAsterisk:l,children:i}),c.jsx("section",{title:_,style:p,onClick:G,className:I,children:c.jsx("textarea",{id:N,disabled:s,readOnly:o,ref:A,onFocus:$,onBlur:B,placeholder:s&&g||v,value:s?void 0:g,...E})}),H&&c.jsx(ye,{children:H})]})}const Jn=m.createContext({});function Us(e){const{children:t=!1}=e,[n,r]=m.useState([]);function a(l){return!!n.some(u=>u.key===l)}function s(l){var u;return(u=n.find(f=>f.key===l))==null?void 0:u.data}function o(l,u){const f=a(l);r(f?d=>[...d.filter(p=>p.key!==l),{key:l,data:u}]:[...n,{key:l,data:u}])}function i(l){r(n.filter(u=>u.key!==l))}return c.jsx(Jn.Provider,{value:{drawerIsOpen:a,drawerData:s,openDrawer:o,closeDrawer:i},children:t})}function Vs(e){const t=m.useContext(Jn);if(Object.entries(t).length===0)throw new Error("useDrawer must be used within a Provider");if(e){const{drawerData:n,drawerIsOpen:r,openDrawer:a,closeDrawer:s}=t,o=r(e),i=n(e);return{drawerIsOpen:o,drawerData:i,openDrawer:f=>a(e,f),closeDrawer:()=>s(e)}}else return t}const Qn=m.createContext({});function qs(e){const{children:t=!1}=e,[n,r]=m.useState([]);function a(u){return!!n.some(f=>f.key===u)}function s(u){var f;return(f=n.find(d=>d.key===u))==null?void 0:f.data}function o(u,f){const d=a(u);r(d?_=>[..._.filter(g=>g.key!==u),{key:u,data:f}]:[...n,{key:u,data:f}])}function i(u){r(n.filter(f=>f.key!==u))}function l(){r([])}return c.jsx(Qn.Provider,{value:{modalIsOpen:a,modalData:s,openModal:o,closeModal:i,closeAll:l},children:t})}function Ws(e){const t=m.useContext(Qn);if(Object.entries(t).length===0)throw new Error("useModal must be used within a Provider");if(e){const{modalData:n,modalIsOpen:r,openModal:a,closeModal:s}=t,o=r(e),i=n(e);return{modalIsOpen:o,modalData:i,openModal:f=>a(e,f),closeModal:()=>s(e)}}else return t}function Rs(e,t=""){const n=new URLSearchParams(e),r=t?`${t}:`:"",a=s=>{Object.entries(s).forEach(([o,i])=>{i===void 0?n.delete(`${r}${o}`):n.set(`${r}${o}`,String(i))})};return{getParam:s=>n.get(`${r}${s}`),getScopedSearch:s=>{a(s);let o=n.toString();return o&&(o="?"+o),o}}}let Xs={data:""},Ks=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Xs,Ys=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Zs=/\/\*[^]*?\*\/| +/g,er=/\n+/g,Te=(e,t)=>{let n="",r="",a="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?Te(o,s):s+"{"+Te(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=Te(o,t?t.replace(/([^,])+/g,i=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,i):i?i+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=Te.p?Te.p(s,o):s+":"+o+";")}return n+(t&&a?t+"{"+a+"}":a)+r},we={},tr=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+tr(e[n]);return t}return e},Js=(e,t,n,r,a)=>{let s=tr(e),o=we[s]||(we[s]=(l=>{let u=0,f=11;for(;u<l.length;)f=101*f+l.charCodeAt(u++)>>>0;return"go"+f})(s));if(!we[o]){let l=s!==e?e:(u=>{let f,d,_=[{}];for(;f=Ys.exec(u.replace(Zs,""));)f[4]?_.shift():f[3]?(d=f[3].replace(er," ").trim(),_.unshift(_[0][d]=_[0][d]||{})):_[0][f[1]]=f[2].replace(er," ").trim();return _[0]})(e);we[o]=Te(a?{["@keyframes "+o]:l}:l,n?"":"."+o)}let i=n&&we.g?we.g:null;return n&&(we.g=we[o]),((l,u,f,d)=>{d?u.data=u.data.replace(d,l):u.data.indexOf(l)===-1&&(u.data=f?l+u.data:u.data+l)})(we[o],t,r,i),o},Qs=(e,t,n)=>e.reduce((r,a,s)=>{let o=t[s];if(o&&o.call){let i=o(n),l=i&&i.props&&i.props.className||/^go/.test(i)&&i;o=l?"."+l:i&&typeof i=="object"?i.props?"":Te(i,""):i===!1?"":i}return r+a+(o??"")},"");function pt(e){let t=this||{},n=e.call?e(t.p):e;return Js(n.unshift?n.raw?Qs(n,[].slice.call(arguments,1),t.p):n.reduce((r,a)=>Object.assign(r,a&&a.call?a(t.p):a),{}):n,Ks(t.target),t.g,t.o,t.k)}let nr,Xt,Kt;pt.bind({g:1});let Se=pt.bind({k:1});function eo(e,t,n,r){Te.p=t,nr=e,Xt=n,Kt=r}function Oe(e,t){let n=this||{};return function(){let r=arguments;function a(s,o){let i=Object.assign({},s),l=i.className||a.className;n.p=Object.assign({theme:Xt&&Xt()},i),n.o=/ *go\d+/.test(l),i.className=pt.apply(n,r)+(l?" "+l:"");let u=e;return e[0]&&(u=i.as||e,delete i.as),Kt&&u[0]&&Kt(i),nr(u,i)}return a}}var to=e=>typeof e=="function",yt=(e,t)=>to(e)?e(t):e,no=(()=>{let e=0;return()=>(++e).toString()})(),rr=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),ro=20,Yt="default",ar=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:r}=t;return ar(e,{type:e.toasts.find(o=>o.id===r.id)?1:0,toast:r});case 3:let{toastId:a}=t;return{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},vt=[],sr={toasts:[],pausedAt:void 0,settings:{toastLimit:ro}},xe={},or=(e,t=Yt)=>{xe[t]=ar(xe[t]||sr,e),vt.forEach(([n,r])=>{n===t&&r(xe[t])})},ir=e=>Object.keys(xe).forEach(t=>or(e,t)),ao=e=>Object.keys(xe).find(t=>xe[t].toasts.some(n=>n.id===e)),kt=(e=Yt)=>t=>{or(t,e)},so={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},oo=(e={},t=Yt)=>{let[n,r]=m.useState(xe[t]||sr),a=m.useRef(xe[t]);m.useEffect(()=>(a.current!==xe[t]&&r(xe[t]),vt.push([t,r]),()=>{let o=vt.findIndex(([i])=>i===t);o>-1&&vt.splice(o,1)}),[t]);let s=n.toasts.map(o=>{var i,l,u;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((i=e[o.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((l=e[o.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||so[o.type],style:{...e.style,...(u=e[o.type])==null?void 0:u.style,...o.style}}});return{...n,toasts:s}},io=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||no()}),tt=e=>(t,n)=>{let r=io(t,e,n);return kt(r.toasterId||ao(r.id))({type:2,toast:r}),r.id},ee=(e,t)=>tt("blank")(e,t);ee.error=tt("error"),ee.success=tt("success"),ee.loading=tt("loading"),ee.custom=tt("custom"),ee.dismiss=(e,t)=>{let n={type:3,toastId:e};t?kt(t)(n):ir(n)},ee.dismissAll=e=>ee.dismiss(void 0,e),ee.remove=(e,t)=>{let n={type:4,toastId:e};t?kt(t)(n):ir(n)},ee.removeAll=e=>ee.remove(void 0,e),ee.promise=(e,t,n)=>{let r=ee.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(a=>{let s=t.success?yt(t.success,a):void 0;return s?ee.success(s,{id:r,...n,...n==null?void 0:n.success}):ee.dismiss(r),a}).catch(a=>{let s=t.error?yt(t.error,a):void 0;s?ee.error(s,{id:r,...n,...n==null?void 0:n.error}):ee.dismiss(r)}),e};var co=1e3,lo=(e,t="default")=>{let{toasts:n,pausedAt:r}=oo(e,t),a=m.useRef(new Map).current,s=m.useCallback((d,_=co)=>{if(a.has(d))return;let p=setTimeout(()=>{a.delete(d),o({type:4,toastId:d})},_);a.set(d,p)},[]);m.useEffect(()=>{if(r)return;let d=Date.now(),_=n.map(p=>{if(p.duration===1/0)return;let g=(p.duration||0)+p.pauseDuration-(d-p.createdAt);if(g<0){p.visible&&ee.dismiss(p.id);return}return setTimeout(()=>ee.dismiss(p.id,t),g)});return()=>{_.forEach(p=>p&&clearTimeout(p))}},[n,r,t]);let o=m.useCallback(kt(t),[t]),i=m.useCallback(()=>{o({type:5,time:Date.now()})},[o]),l=m.useCallback((d,_)=>{o({type:1,toast:{id:d,height:_}})},[o]),u=m.useCallback(()=>{r&&o({type:6,time:Date.now()})},[r,o]),f=m.useCallback((d,_)=>{let{reverseOrder:p=!1,gutter:g=8,defaultPosition:h}=_||{},v=n.filter(k=>(k.position||h)===(d.position||h)&&k.height),b=v.findIndex(k=>k.id===d.id),E=v.filter((k,S)=>S<b&&k.visible).length;return v.filter(k=>k.visible).slice(...p?[E+1]:[0,E]).reduce((k,S)=>k+(S.height||0)+g,0)},[n]);return m.useEffect(()=>{n.forEach(d=>{if(d.dismissed)s(d.id,d.removeDelay);else{let _=a.get(d.id);_&&(clearTimeout(_),a.delete(d.id))}})},[n,s]),{toasts:n,handlers:{updateHeight:l,startPause:i,endPause:u,calculateOffset:f}}},uo=Se`
|
|
1
|
+
(function(C,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("react/jsx-runtime"),require("react"),require("lucide-react"),require("framer-motion"),require("@react-input/mask")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","lucide-react","framer-motion","@react-input/mask"],i):(C=typeof globalThis<"u"?globalThis:C||self,i(C["@arkyn/components"]={},C.jsxRuntime,C.b,C.lucideReact,C.framerMotion,C.mask))})(this,function(C,i,m,L,Le,An){"use strict";function ba(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ie=ba(m);function In(e){const{className:t,...n}=e,r=`arkynAlertTitle ${t}`;return i.jsx("div",{className:r.trim(),...n})}const Mn=m.createContext({});function xa(){return m.useContext(Mn)}function Sa(e){const{schema:t,children:n,className:r,...a}=e,c=!(u=>{let f=!1;const d=_=>{Array.isArray(_)?_.forEach(d):_&&typeof _=="object"&&"type"in _&&(_.type===In?f=!0:_.props&&typeof _.props=="object"&&_.props!==null&&"children"in _.props&&d(_.props.children))};return d(u),f})(n)?"nonExistsAlertTitle":"existsAlertTitle",l=`arkynAlertContainer ${t} ${c} ${r}`;return i.jsx(Mn.Provider,{value:e,children:i.jsx("div",{className:l.trim(),...a,children:n})})}function Ea(e){const{className:t,...n}=e,r=`arkynAlertContent ${t}`;return i.jsx("div",{className:r.trim(),...n})}function wa(e){const{className:t,...n}=e,r=`arkynAlertDescription ${t}`;return i.jsx("div",{className:r.trim(),...n})}function Fa(e){const{className:t,...n}=e,{schema:r}=xa(),a=`arkynAlertIcon ${r} ${t}`;switch(r){case"success":return i.jsx(L.CheckCircle2,{className:a,...n});case"danger":return i.jsx(L.XCircle,{className:a,...n});case"warning":return i.jsx(L.AlertTriangle,{className:a,...n});case"info":return i.jsx(L.Info,{className:a,...n})}}function Dn(e){function t(){return!e||e<=0?0:e>=100?100:e}const[n,r]=m.useState(t());function a(s){return s<=0?r(0):s>=100?r(100):r(s)}return[n,a]}function $n(e){const{onChange:t,value:n,disabled:r=!1,onDragging:a,className:s="",...o}=e,[c,l]=m.useState(!1),u=m.useRef(null),f=()=>l(!0),d=()=>l(!1),_=b=>{if(r||!c||!u.current)return;const S=u.current.getBoundingClientRect(),k=b.clientX-S.left,w=Math.min(Math.max(k/S.width*100,0),100);t(w)},p=b=>{if(r||!u.current)return;const S=u.current.getBoundingClientRect(),k=b.clientX-S.left,w=Math.min(Math.max(k/S.width*100,0),100);t(w)};m.useEffect(()=>(c?(a&&a(!0),document.addEventListener("mousemove",_),document.addEventListener("mouseup",d)):(a&&a(!1),document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",d)),()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",d)}),[c]);const v=`arkynSliderTrack ${c?"isDragging":"isNotDragging"} ${r?"isDisabled":"isEnabled"} ${s}`;return i.jsxs("div",{...o,className:v,onMouseDown:f,onClick:p,ref:u,children:[i.jsx("div",{className:"arkynSliderFill",style:{width:`${n}%`}}),i.jsx("div",{className:"arkynSliderThumb",style:{left:`${n}%`}})]})}function Ln(e){var I,F,G,$;const{onPlayAudio:t,onPauseAudio:n,disabled:r,...a}=e,[s,o]=Dn(0),[c,l]=m.useState(!1),[u,f]=m.useState(!1),d=m.useRef(null),_=(I=d.current)==null?void 0:I.currentTime,p=(F=d.current)==null?void 0:F.duration,g=b(_),h=b(p),v={totalTime:p,currentTime:_,formattedCurrentTime:g,formattedTotalTime:h};function b(x){if(!x)return"00:00";const T=Math.floor(x/60),z=Math.floor(x%60),P=String(T).padStart(2,"0"),V=String(z).padStart(2,"0");return`${P}:${V}`}function S(){const x=d.current;x&&(e.onPlayAudio&&e.onPlayAudio(v),x.play(),l(!0))}function k(){const x=d.current;x&&(e.onPauseAudio&&e.onPauseAudio(v),x.pause(),l(!1))}function w(){c?k():S()}function U(x){const T=d.current;if(!T)return;const z=T.duration,P=x/100*z;T.currentTime=P}return u||!c?(G=d.current)==null||G.pause():c&&(($=d.current)==null||$.play()),m.useEffect(()=>{const x=d.current;if(!x)return;const T=()=>{const z=x.duration,V=x.currentTime/z*100;o(V)};return x.addEventListener("timeupdate",T),()=>{x.removeEventListener("timeupdate",T)}},[]),i.jsxs("div",{className:"arkynAudioPlayer",children:[i.jsx("audio",{...a,ref:d,src:e.src,onEnded:k}),i.jsxs("button",{type:"button",disabled:r,onClick:w,children:[c&&i.jsx(L.Pause,{}),!c&&i.jsx(L.Play,{})]}),i.jsx("p",{children:g}),i.jsx($n,{value:s,onChange:U,onDragging:f,disabled:r}),i.jsx("p",{children:h})]})}const Bn=m.createContext({});function Na(e){const{children:t,fieldErrors:n,form:r}=e;return i.jsxs(Bn.Provider,{value:{fieldErrors:n},children:[!r&&t,r&&m.cloneElement(r,r.props,t)]})}function ye(){return m.useContext(Bn)}function ve(e){const{children:t,className:n,...r}=e,a=`arkynFieldError ${n}`;return t?i.jsx("strong",{className:a.trim(),...r,children:t}):i.jsx(i.Fragment,{})}function de(e){const{showAsterisk:t=!1,className:n="",...r}=e,s=`arkynFieldLabel ${t?"asteriskTrue":"asteriskFalse"} ${n}`;return i.jsx("label",{className:s.trim(),...r})}function _e(e){const{children:t,className:n,orientation:r="vertical",...a}=e,s=`arkynFieldWrapper ${n} ${r}`;return i.jsx("section",{className:s.trim(),...a,children:t})}function K(e){const{iconSize:t,icon:n,className:r,show:a=!0}=e;return a?n?typeof n=="string"?i.jsx("p",{className:r,children:n}):i.jsx("p",{className:r,children:i.jsx(n,{size:t,strokeWidth:2.5})}):i.jsx(i.Fragment,{}):i.jsx(i.Fragment,{})}function Be(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",loadingText:a,size:s="md",leftIcon:o,rightIcon:c,disabled:l,className:u="",children:f,...d}=e,p={xs:12,sm:16,md:20,lg:24}[s],v=`arkynButton ${t?"loadingTrue":"loadingFalse"} ${r} ${n} ${s} ${a?"loadingTextTrue":"loadingTextFalse"} ${u}`;return i.jsxs("button",{className:v,disabled:l||t,...d,children:[i.jsxs("div",{className:"arkynButtonSpinner",children:[i.jsx(L.Loader2,{size:p,strokeWidth:2.5}),a&&a]}),i.jsxs("div",{className:"arkynButtonContent",children:[i.jsx(K,{iconSize:p,icon:o}),f,i.jsx(K,{iconSize:p,icon:c})]})]})}function gt(e){const{className:t,orientation:n="horizontal",...r}=e,a=`arkynDivider ${n} ${t}`;return i.jsx("div",{className:a.trim(),...r})}function mt(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",size:a="md",icon:s,disabled:o,className:c="",...l}=e,u={xs:12,sm:16,md:20,lg:24},d=`arkynIconButton ${r} ${n} ${a} ${t?"loadingTrue":"loadingFalse"} ${c}`;return i.jsxs("button",{disabled:o||t,className:d.trim(),...l,children:[i.jsx("div",{className:"arkynIconButtonSpinner",children:i.jsx(L.Loader2,{size:u[a],strokeWidth:2.5})}),i.jsx("div",{className:"arkynIconButtonContent",children:i.jsx(s,{size:u[a],strokeWidth:2.5})})]})}function ht(e){const{text:t,size:n="lg",children:r,orientation:a="top",className:s="",...o}=e,c=m.useId(),l=m.useRef(null),[u,f]=m.useState(a);m.useEffect(()=>{const _=()=>{if(!l.current)return;const h=document.getElementById(c);h&&(f(a),requestAnimationFrame(()=>{const v=h.getBoundingClientRect(),b=window.innerWidth,S=window.innerHeight;let k=a;a==="left"&&v.left<0?k="right":a==="right"&&v.right>b?k="left":a==="top"&&v.top<0?k="bottom":a==="bottom"&&v.bottom>S&&(k="top"),k==="right"&&v.right>b?k="left":k==="left"&&v.left<0?k="right":k==="bottom"&&v.bottom>S?k="top":k==="top"&&v.top<0&&(k="bottom"),f(k)}))},p=l.current;if(!p)return;const g=()=>{setTimeout(_,1)};return p.addEventListener("mouseenter",g),window.addEventListener("resize",_),()=>{p.removeEventListener("mouseenter",g),window.removeEventListener("resize",_)}},[a,c]);const d=`arkynTooltip ${n} ${u} ${s}`;return i.jsxs("div",{className:d.trim(),...o,ref:l,children:[r,i.jsx("div",{className:"arkynTooltipText",id:c,dangerouslySetInnerHTML:{__html:t}})]})}function Ta(e){const{filePath:t,disabled:n,acceptAudio:r,handleSelectFile:a,isLoading:s,reSendAudio:o,changeAudioButtonText:c}=e;function l(){if(n)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return i.jsxs("div",{className:"arkynAudioUploadHasFileContentContainer",children:[i.jsx(Ln,{src:t}),i.jsx(gt,{}),i.jsxs("div",{className:"arkynAudioUploadButtonsContainer",children:[!!o&&i.jsx(ht,{orientation:"bottom",text:"Reenviar áudio",children:i.jsx(mt,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:s,onClick:o,icon:L.RefreshCw,disabled:n})}),i.jsx(Be,{isLoading:s,onClick:l,variant:"outline",size:"sm",type:"button",disabled:n,children:c})]})]})}function Oa(e){const{dropAudioText:t,isLoading:n,acceptAudio:r,handleSelectFile:a,selectAudioButtonText:s,disabled:o}=e;function c(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return i.jsxs("div",{onDrop:c,className:"arkynAudioUploadNoFileContent",children:[i.jsx(Be,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),i.jsx("p",{children:t})]})}function Pa(e){const{name:t,label:n,fileName:r="file",method:a="POST",onChange:s,fileResponseName:o="url",selectAudioButtonText:c="Selecionar arquivo de áudio",dropAudioText:l="Ou arraste e solte um arquivo de áudio aqui",changeAudioButtonText:u="Trocar arquivo de áudio",acceptAudio:f="audio/*",action:d,defaultValue:_="",showAsterisk:p=!1,disabled:g=!1}=e,{fieldErrors:h}=ye(),v=h==null?void 0:h[t],[b,S]=m.useState(_),[k,w]=m.useState(""),[U,I]=m.useState(null),[F,G]=m.useState(_),[$,x]=m.useState(!1);async function T(N){if(g)return;x(!0),I(N),w("");const Y=new FormData;Y.append(r,N),await fetch(d,{method:a,body:Y}).then(async E=>await E.json()).then(E=>{E!=null&&E.error?w(E.error):S(E==null?void 0:E[o]),s&&s(E==null?void 0:E[o])}).catch(E=>{console.error(E),w("Erro ao enviar audio")}).finally(()=>x(!1))}function z(N){if(!g){if(N.type.indexOf("audio")===-1){w("O arquivo selecionado não é um arquivo de áudio");return}G(URL.createObjectURL(N)),T(N)}}const P=v||k,H=`arkynAudioUpload ${P?"hasError":"noHasError"} ${F?"hasAudio":"noHasAudio"}`;return i.jsxs(_e,{children:[n&&i.jsx(de,{showAsterisk:p,children:n}),i.jsxs("div",{className:H,children:[i.jsx("input",{type:"hidden",name:t,value:b||""}),!F&&i.jsx(Oa,{disabled:g,isLoading:$,acceptAudio:f,dropAudioText:l,handleSelectFile:z,selectAudioButtonText:c}),F&&i.jsx(Ta,{filePath:F,acceptAudio:f,changeAudioButtonText:u,disabled:g,handleSelectFile:z,isLoading:$,reSendAudio:P&&U?()=>T(U):void 0})]}),P&&i.jsx(ve,{children:P})]})}function Aa(e){const{variant:t="ghost",scheme:n="primary",size:r="lg",leftIcon:a,rightIcon:s,className:o="",children:c,...l}=e,f={md:12,lg:14}[r],d=`arkynBadge ${t} ${n} ${r} ${o}`;return i.jsxs("div",{className:d.trim(),...l,children:[i.jsx(K,{iconSize:f,icon:a}),i.jsx("p",{children:c}),i.jsx(K,{iconSize:f,icon:s})]})}const zn=m.createContext({});function Ia(){return m.useContext(zn)}function Ma(e){return i.jsx(zn.Provider,{value:e,children:e.children})}function Da(e){const{children:t,disabled:n=!1,className:r="",onClick:a,value:s,...o}=e,{disabled:c,currentTab:l,changeCurrentTab:u}=Ia(),f=c||n,p=`arkynCardTabButton ${f?"isDisabled":""} ${l===s&&s?"isActive":""} ${r}`;function g(h){u(s),a&&a(h)}return i.jsx("button",{onClick:g,className:p.trim(),...o,disabled:f,type:"button",children:t})}function $a(e){const{children:t,onChange:n,defaultValue:r,disabled:a=!1,className:s,...o}=e,[c,l]=m.useState(r||""),u=`arkynCardTabContainer ${s||""}`;function f(d){l(d),n&&n(d)}return i.jsx(Ma,{disabled:a,currentTab:c,changeCurrentTab:f,children:i.jsx("nav",{className:u.trim(),...o,children:t})})}function La(e){const{id:t,name:n,className:r="",size:a="md",errorMessage:s,defaultChecked:o=!1,label:c,checked:l=null,onCheck:u,orientation:f="horizontalReverse",value:d,..._}=e,{fieldErrors:p}=ye(),g=m.useRef(null),h=t||m.useId(),v=s||(p==null?void 0:p[n]),b=!!v,[S,k]=m.useState(o||!1),w=typeof l=="boolean"?l:S,F=`arkynCheckbox ${a} ${b?"errorTrue":"errorFalse"} ${w?"checkedTrue":"checkedFalse"} ${r}`;function G(){const $=S;k(!$),u&&u($?"":d||"checked")}return i.jsxs(_e,{orientation:f,children:[c&&i.jsx(de,{htmlFor:h,children:c}),i.jsxs("button",{id:h,type:"button",className:F,onClick:G,..._,children:[i.jsx("input",{type:"hidden",name:n,ref:g,value:w?d||"checked":""}),i.jsx(L.Check,{})]}),v&&i.jsx(ve,{children:v})]})}function Ba(){return()=>{}}function jn(){return m.useSyncExternalStore(Ba,()=>!0,()=>!1)}function za(e){const{children:t,fallback:n=null}=e;return jn()?i.jsx(i.Fragment,{children:t()}):i.jsx(i.Fragment,{children:n})}const Vt=e=>e.replace(/[^0-9]/g,""),Hn={USD:{countryLanguage:"en-US",countryCurrency:"USD"},EUR:{countryLanguage:"de-DE",countryCurrency:"EUR"},JPY:{countryLanguage:"ja-JP",countryCurrency:"JPY"},GBP:{countryLanguage:"en-GB",countryCurrency:"GBP"},AUD:{countryLanguage:"en-AU",countryCurrency:"AUD"},CAD:{countryLanguage:"en-CA",countryCurrency:"CAD"},CHF:{countryLanguage:"de-CH",countryCurrency:"CHF"},CNY:{countryLanguage:"zh-CN",countryCurrency:"CNY"},SEK:{countryLanguage:"sv-SE",countryCurrency:"SEK"},NZD:{countryLanguage:"en-NZ",countryCurrency:"NZD"},BRL:{countryLanguage:"pt-BR",countryCurrency:"BRL"},INR:{countryLanguage:"en-IN",countryCurrency:"INR"},RUB:{countryLanguage:"ru-RU",countryCurrency:"RUB"},ZAR:{countryLanguage:"en-ZA",countryCurrency:"ZAR"},MXN:{countryLanguage:"es-MX",countryCurrency:"MXN"},SGD:{countryLanguage:"en-SG",countryCurrency:"SGD"},HKD:{countryLanguage:"zh-HK",countryCurrency:"HKD"},NOK:{countryLanguage:"nb-NO",countryCurrency:"NOK"},KRW:{countryLanguage:"ko-KR",countryCurrency:"KRW"},TRY:{countryLanguage:"tr-TR",countryCurrency:"TRY"},IDR:{countryLanguage:"id-ID",countryCurrency:"IDR"},THB:{countryLanguage:"th-TH",countryCurrency:"THB"}},ja=e=>e.replace(new RegExp("(?:R\\$|\\p{Sc}|[$€¥£])","gu"),"").trim(),Gn=(e,t,n={showPrefix:!0})=>{if(!Hn[t])throw new Error("Unsupported currency code");const{countryCurrency:r,countryLanguage:a}=Hn[t],s=new Intl.NumberFormat(a,{style:"currency",currency:r}).format(e);return n.showPrefix?s.replace(/\s/g," "):ja(s).replace(/\s/g," ")};Vt({NINE:"(99) 99999-9999"}.NINE).length;for(var Ha=[],Ut=0;Ut<256;++Ut)Ha.push((Ut+256).toString(16).slice(1));typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);function Vn(e){let t=e;return typeof e=="string"?(t=+Vt(e),t%1!==0&&(t=t.toFixed(2))):t=Number.isInteger(e)?Number(e)*10**2:e.toFixed(2),+Vt(String(t))/10**2}function qt(e,t){if(!e)return[0,Gn(0,t)];const n=Vn(e),r=Gn(n,t);return[n,r]}function Ga(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",label:o,className:c="",value:l,defaultValue:u,max:f=1e9,locale:d,onChange:_,prefix:p,suffix:g,isLoading:h=!1,leftIcon:v,readOnly:b,onFocus:S,onBlur:k,errorMessage:w,showAsterisk:U,rightIcon:I,size:F="md",id:G,...$}=e,{fieldErrors:x}=ye(),[T,z]=m.useState(!1),[P,V]=m.useState("0"),M=m.useRef(null),H=G||m.useId(),N=w||(x==null?void 0:x[t]),Y=!!N,E=n||h,X={md:20,lg:20}[F],Q=I?"right":"left",fe=Q==="left"&&h,ee=Q==="right"&&h;function se(){E||!(M!=null&&M.current)||(z(!0),M.current.focus())}function oe(pe){z(!0),S&&S(pe)}function j(pe){z(!1),k&&k(pe)}const ne=pe=>{const[$e,We]=qt(pe,d);return!f||$e<=f?(V(We),[$e,We]):qt(pe,d)},xe=pe=>{pe.preventDefault();const[$e,We]=ne(pe.target.value);_&&_(pe,String($e),String(We))};m.useEffect(()=>{const pe=l||+u||void 0,[,$e]=qt(pe,d);V($e)},[d,u,l]);const Nn=`arkynCurrencyInput ${p?"hasPrefix":""} ${g?"hasSuffix":""} ${s} ${F} ${E||b||h?"opacity":""} ${Y?"errored":""} ${T?"focused":""} ${c}`;return i.jsxs(_e,{children:[o&&i.jsx(de,{showAsterisk:U,htmlFor:H,children:o}),i.jsxs("section",{title:r,style:a,onClick:se,className:Nn,children:[i.jsx(K,{iconSize:X,icon:p,className:"prefix"}),i.jsx(K,{show:fe,iconSize:X,className:"spinner",icon:L.Loader2}),i.jsx(K,{show:!h,icon:v,iconSize:X}),i.jsx("input",{disabled:E,readOnly:b,ref:M,onFocus:oe,onBlur:j,onChange:xe,id:H,placeholder:E?P:void 0,value:E?void 0:P,...$}),i.jsx("input",{type:"hidden",name:t,value:Vn(P),readOnly:!0}),i.jsx(K,{show:!h,icon:I,iconSize:X}),i.jsx(K,{show:ee,iconSize:X,className:"spinner",icon:L.Loader2}),i.jsx(K,{iconSize:X,icon:g,className:"suffix"})]}),N&&i.jsx(ve,{children:N})]})}function Va(){return typeof window>"u"?0:window.innerWidth-document.documentElement.clientWidth}function ze(e){m.useEffect(()=>{if(e){const t=document.body.style.overflow,n=document.body.style.paddingRight,r=Va();if(r>0){const a=window.getComputedStyle(document.body),s=parseInt(a.paddingRight)||0;document.body.style.paddingRight=`${s+r}px`}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t,document.body.style.paddingRight=n}}},[e])}const Un=m.createContext({});function Ua(e){return i.jsx(Un.Provider,{value:{makeInvisible:e.makeInvisible},children:e.children})}function qa(){return m.useContext(Un)}function Wa(e){const{isVisible:t,makeInvisible:n,orientation:r="left",children:a,className:s,...o}=e;ze(t);const c=r==="left"?"-100%":"100%",u=`arkynDrawerContainer ${r} ${t?"visibleTrue":"visibleFalse"} ${s}`;return i.jsx(Ua,{makeInvisible:n,children:i.jsx(Le.AnimatePresence,{children:t&&i.jsxs("aside",{className:u.trim(),...o,children:[i.jsx(Le.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),i.jsx(Le.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${c})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${c})`},children:a})]})})})}function Xa(e){const{showCloseButton:t=!0,className:n,children:r,...a}=e,{makeInvisible:s}=qa(),o=`arkynDrawerHeader ${n}`;return i.jsxs("header",{className:o.trim(),...a,children:[r,t&&i.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:s,"aria-label":"Close drawer",children:i.jsx(L.X,{size:24})})]})}function Ka(e){const{disabled:t,file:n,isLoading:r,acceptFile:a,changeFileButtonText:s,handleSelectFile:o,reSendFile:c}=e;function l(){if(t)return;const f=document.createElement("input");f.type="file",f.accept=a,f.onchange=d=>{var p;const _=(p=d.target.files)==null?void 0:p[0];_&&o(_)},f.click()}function u(){return n.type.startsWith("image/")?i.jsx(L.FileImage,{}):n.type.startsWith("audio/")?i.jsx(L.FileAudio,{}):n.type.startsWith("application/zip")?i.jsx(L.FileArchive,{}):i.jsx(L.File,{})}return i.jsxs("div",{className:"arkynFileUploadHasFileContent",children:[i.jsxs("section",{className:"arkynFileUploadFileContainer",children:[i.jsx(u,{}),i.jsx("p",{children:n.name})]}),i.jsx(gt,{}),i.jsxs("div",{className:"arkynFileUploadButtonsContainer",children:[!!c&&i.jsx(ht,{orientation:"bottom",text:"Reenviar arquivo",children:i.jsx(mt,{type:"button","aria-label":"resend file",variant:"outline",scheme:"danger",size:"sm",isLoading:r,onClick:c,icon:L.RefreshCw,disabled:t})}),i.jsx(Be,{isLoading:r,onClick:l,variant:"outline",size:"sm",type:"button",disabled:t,children:s})]})]})}function Ra(e){const{dropFileText:t,isLoading:n,acceptFile:r,handleSelectFile:a,selectFileButtonText:s,disabled:o}=e;function c(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return i.jsxs("div",{onDrop:c,className:"arkynFileUploadNoFileContent",children:[i.jsx(Be,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),i.jsx("p",{children:t})]})}function Ya(e){const{name:t,label:n,showAsterisk:r=!1,action:a,fileName:s="file",method:o="POST",acceptFile:c="*",fileResponseName:l="url",changeFileButtonText:u="Alterar arquivo",selectFileButtonText:f="Selecionar arquivo",dropFileText:d="Ou arraste e solte o arquivo aqui",onChange:_,disabled:p=!1}=e,{fieldErrors:g}=ye(),h=g==null?void 0:g[t],[v,b]=m.useState(""),[S,k]=m.useState(""),[w,U]=m.useState(null),[I,F]=m.useState(!1);async function G(V){if(p)return;F(!0),U(V),k("");const M=new FormData;M.append(s,V),await fetch(a,{method:o,body:M}).then(async H=>await H.json()).then(H=>{H!=null&&H.error?k(H.error):b(H==null?void 0:H[l]),_&&_(H==null?void 0:H[l])}).catch(H=>{console.error(H),k("Erro ao enviar o arquivo")}).finally(()=>F(!1))}function $(V){p||G(V)}const x=h||S,P=`arkynFileUpload ${x?"hasError":"noHasError"} ${w?"hasFile":"noHasFile"}`;return i.jsxs(_e,{children:[n&&i.jsx(de,{showAsterisk:r,children:n}),i.jsxs("div",{className:P,children:[i.jsx("input",{type:"hidden",name:t,value:v||""}),!w&&i.jsx(Ra,{disabled:p,isLoading:I,acceptFile:c,dropFileText:d,handleSelectFile:$,selectFileButtonText:f}),w&&i.jsx(Ka,{disabled:p,isLoading:I,acceptFile:c,file:w,handleSelectFile:$,changeFileButtonText:u,reSendFile:x&&w?()=>G(w):void 0})]}),x&&i.jsx(ve,{children:x})]})}function Za(e){const{disabled:t,filePath:n,isLoading:r,acceptImage:a,changeImageButtonText:s,handleSelectFile:o,reSendImage:c}=e;function l(){if(t)return;const u=document.createElement("input");u.type="file",u.accept=a,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&o(d)},u.click()}return i.jsxs("div",{className:"arkynImageUploadHasFileContent",style:{backgroundImage:`url("${n}")`},children:[c&&i.jsx(ht,{orientation:"bottom",text:"Reenviar imagem",children:i.jsx(mt,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:r,onClick:c,icon:L.RefreshCw,disabled:t})}),i.jsx(Be,{isLoading:r,onClick:l,variant:"outline",size:"sm",type:"button",disabled:t,children:s})]})}function Ja(e){const{dropImageText:t,isLoading:n,acceptImage:r,handleSelectFile:a,selectImageButtonText:s,disabled:o}=e;function c(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return i.jsxs("div",{onDrop:c,className:"arkynImageUploadNoFileContent",children:[i.jsx(Be,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),i.jsx("p",{children:t})]})}function Qa(e){const{name:t,defaultValue:n="",label:r,showAsterisk:a=!1,action:s,fileName:o="file",method:c="POST",acceptImage:l="image/*",fileResponseName:u="url",changeImageButtonText:f="Alterar imagem",selectImageButtonText:d="Selecionar imagem",dropImageText:_="Ou arraste e solte a imagem aqui",onChange:p,disabled:g=!1}=e,{fieldErrors:h}=ye(),v=h==null?void 0:h[t],[b,S]=m.useState(n),[k,w]=m.useState(""),[U,I]=m.useState(null),[F,G]=m.useState(n),[$,x]=m.useState(!1);async function T(N){if(g)return;x(!0),I(N),w("");const Y=new FormData;Y.append(o,N),await fetch(s,{method:c,body:Y}).then(async E=>await E.json()).then(E=>{E!=null&&E.error?w(E.error):S(E==null?void 0:E[u]),p&&p(E==null?void 0:E[u])}).catch(E=>{console.error(E),w("Erro ao enviar imagem")}).finally(()=>x(!1))}function z(N){g||(G(URL.createObjectURL(N)),T(N))}const P=v||k,H=`arkynImageUpload ${P?"hasError":"noHasError"} ${F?"hasImage":"noHasImage"}`;return i.jsxs(_e,{children:[r&&i.jsx(de,{showAsterisk:a,children:r}),i.jsxs("div",{className:H,children:[i.jsx("input",{type:"hidden",name:t,value:b||""}),!F&&i.jsx(Ja,{disabled:g,isLoading:$,acceptImage:l,dropImageText:_,handleSelectFile:z,selectImageButtonText:d}),F&&i.jsx(Za,{disabled:g,isLoading:$,acceptImage:l,filePath:F,handleSelectFile:z,changeImageButtonText:f,reSendImage:P&&U?()=>T(U):void 0})]}),P&&i.jsx(ve,{children:P})]})}function Wt(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",label:o,className:c="",prefix:l,suffix:u,isLoading:f=!1,leftIcon:d,readOnly:_,onFocus:p,onBlur:g,errorMessage:h,showAsterisk:v,rightIcon:b,type:S="text",size:k="md",id:w,value:U,placeholder:I,...F}=e,{fieldErrors:G}=ye(),[$,x]=m.useState(!1),T=m.useRef(null),z=w||m.useId(),P=h||(G==null?void 0:G[t]),V=!!P,M=n||f,N={md:20,lg:20}[k],Y=b?"right":"left",E=Y==="left"&&f,ae=Y==="right"&&f;function X(){M||!(T!=null&&T.current)||(x(!0),T.current.focus())}function Q(he){x(!0),p&&p(he)}function fe(he){x(!1),g&&g(he)}if(S==="hidden")return i.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:T,...F});const we=`arkynInput ${l?"hasPrefix":""} ${n?"disabled":""} ${u?"hasSuffix":""} ${s} ${k} ${M||_||f?"opacity":""} ${V?"errored":""} ${$?"focused":""} ${c}`;return i.jsxs(_e,{children:[o&&i.jsx(de,{showAsterisk:v,htmlFor:z,children:o}),i.jsxs("section",{title:r,style:a,onClick:X,className:we,children:[i.jsx(K,{iconSize:N,icon:l,className:"prefix"}),i.jsx(K,{show:E,iconSize:N,className:"spinner",icon:L.Loader2}),i.jsx(K,{show:!f,icon:d,iconSize:N}),i.jsx("input",{disabled:M,readOnly:_,ref:T,onFocus:Q,onBlur:fe,type:S,id:z,name:t,placeholder:M&&U||I,value:M?void 0:U,...F}),i.jsx(K,{show:!f,icon:b,iconSize:N}),i.jsx(K,{show:ae,iconSize:N,className:"spinner",icon:L.Loader2}),i.jsx(K,{iconSize:N,icon:u,className:"suffix"})]}),P&&i.jsx(ve,{children:P})]})}const es=m.forwardRef((e,t)=>i.jsx("input",{ref:t,...e}));function ts(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",separate:o,mask:c,showMask:l,replacement:u,label:f,className:d="",prefix:_,suffix:p,isLoading:g=!1,leftIcon:h,readOnly:v,onFocus:b,onBlur:S,errorMessage:k,defaultValue:w,showAsterisk:U,rightIcon:I,size:F="md",id:G,value:$,placeholder:x,...T}=e,{fieldErrors:z}=ye(),[P,V]=m.useState(!1),M=m.useRef(null),H=G||m.useId(),N=k||(z==null?void 0:z[t]),Y=!!N,E=n||g,X={md:20,lg:20}[F],Q=I?"right":"left",fe=Q==="left"&&g,ee=Q==="right"&&g;function se(){E||!(M!=null&&M.current)||(V(!0),M.current.focus())}function oe(Fe){V(!0),b&&b(Fe)}function j(Fe){V(!1),S&&S(Fe)}const Z=`arkynMaskedInput ${_?"hasPrefix":""} ${p?"hasSuffix":""} ${s} ${F} ${E||v||g?"opacity":""} ${Y?"errored":""} ${P?"focused":""} ${d}`;return i.jsxs(_e,{children:[f&&i.jsx(de,{showAsterisk:U,htmlFor:H,children:f}),i.jsxs("section",{title:r,style:a,onClick:se,className:Z,children:[i.jsx(K,{iconSize:X,icon:_,className:"prefix"}),i.jsx(K,{show:fe,iconSize:X,className:"spinner",icon:L.Loader2}),i.jsx(K,{show:!g,icon:h,iconSize:X}),i.jsx(An.InputMask,{component:es,mask:c,replacement:u,separate:o,showMask:l,ref:M,onFocus:oe,onBlur:j,disabled:E,readOnly:v,id:H,name:t,defaultValue:w||void 0,placeholder:E&&$||x,value:E?void 0:$,...T}),i.jsx(K,{show:!g,icon:I,iconSize:X}),i.jsx(K,{show:ee,iconSize:X,className:"spinner",icon:L.Loader2}),i.jsx(K,{iconSize:X,icon:p,className:"suffix"})]}),N&&i.jsx(ve,{children:N})]})}const qn=m.createContext({});function ns(e){return i.jsx(qn.Provider,{value:{makeInvisible:e.makeInvisible},children:e.children})}function rs(){return m.useContext(qn)}function as(e){const{isVisible:t,makeInvisible:n,children:r,className:a="",...s}=e;ze(t);const c=`arkynModalContainer ${t?"visibleTrue":"visibleFalse"} ${a}`;return i.jsx(ns,{makeInvisible:n,children:i.jsx(Le.AnimatePresence,{children:t&&i.jsxs("aside",{className:c.trim(),...s,children:[i.jsx(Le.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),i.jsx(Le.motion.div,{className:"arkynModalContainerContent",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:r})]})})})}function ss(e){const{alignment:t="right",className:n,...r}=e,a=`arkynModalFooter ${t} ${n}`;return i.jsx("footer",{className:a.trim(),...r})}function os(e){const{showCloseButton:t=!0,className:n,children:r,...a}=e,{makeInvisible:s}=rs(),o=`arkynModalHeader ${n}`;return i.jsxs("header",{className:o.trim(),...a,children:[r,t&&i.jsx("button",{type:"button",onClick:s,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:i.jsx(L.X,{size:24})})]})}function is(e){const{iconSize:t,isLoading:n,disabled:r,readOnly:a,isFocused:s}=e,l=`arkynMultiSelectChevron ${r||a?"notAnimate":""} ${s?"focused":""}`;return n?i.jsx(i.Fragment,{}):i.jsx(L.ChevronDown,{className:l,size:t,strokeWidth:2.5})}function cs(e){const{children:t,handleContainerFocus:n,disabled:r,isError:a,isLoading:s,isFocused:o,className:c,readOnly:l,variant:u,size:f,id:d,prefixExists:_}=e,p=_?"hasPrefix":"",g=a?"errored":"",h=r||l||s?"opacity":"",v=o?"focused":"";return i.jsx("section",{id:d,className:`arkynMultiSelectContainer ${p} ${u} ${f} ${h} ${g} ${v} ${c}`,onClick:n,children:t})}function ls(e){const{children:t,size:n}=e,r=`arkynMultiSelectContent ${n}`;return i.jsx("div",{className:r,children:t})}function us(e){const{label:t,value:n,disabled:r,handleChangeValue:a}=e;return i.jsxs("div",{className:"arkynMultiSelectMark",children:[t,i.jsx("button",{disabled:r,type:"button",onClick:s=>{s.stopPropagation(),a(n)},children:i.jsx(L.X,{})})]})}function fs(e){const{label:t,optionHasSelected:n,handleChangeValue:r,value:a,size:s}=e,o=n(a)?"active":"",c=`arkynMultiSelectOption ${s} ${o}`;return i.jsxs("div",{onClick:()=>r(a),className:c,children:[t," ",i.jsx(L.Check,{})]})}function ds(e){const{children:t,isFocused:n,isSearchable:r,search:a,onSearch:s}=e,o=m.useRef(null),[c,l]=m.useState("bottom");ze(n),m.useEffect(()=>{if(!n)return;(()=>{if(!o.current)return;const d=o.current.parentElement;if(!d)return;const _=d.getBoundingClientRect(),p=window.innerHeight,g=300;p-_.bottom<g&&_.top>g?l("top"):l("bottom")})()},[n]);function u(f){r&&s(f.target.value)}return n?i.jsxs("div",{ref:o,className:`arkynMultiSelectOptionsContainer ${c}`,children:[r&&i.jsx(Wt,{type:"search",name:"search-select",variant:"underline",leftIcon:L.Search,value:a,onChange:u}),t]}):i.jsx(i.Fragment,{})}function _s(e){const{isFocused:t,handleBlur:n}=e;return t?i.jsx("aside",{className:"arkynMultiSelectOverlay",onClick:n}):i.jsx(i.Fragment,{})}function gs(e){const{iconSize:t,isLoading:n}=e;return n?i.jsx(L.Loader2,{className:"arkynMultiSelectSpinner",size:t,strokeWidth:2.5}):i.jsx(i.Fragment,{})}function ms(e){const{name:t,options:n,className:r="",placeholder:a="Selecione...",closeOnSelect:s=!1,defaultValue:o=[],errorMessage:c,isLoading:l=!1,readOnly:u=!1,isSearchable:f=!1,id:d,label:_,optionMaxHeight:p,showAsterisk:g,leftIcon:h,onSearch:v,onChange:b,onBlur:S,notFoundText:k="Sem opções disponíveis",onFocus:w,disabled:U=!1,prefix:I,size:F="md",value:G,variant:$="solid"}=e,{fieldErrors:x}=ye(),T=m.useRef(null),z=d||m.useId(),P=c||(x==null?void 0:x[t]),V=!!P,M=U||l||u,N={md:20,lg:20}[F],[Y,E]=m.useState(""),[ae,X]=m.useState(!1),[Q,fe]=m.useState(o),ee=G||Q;function se(A){return ee.includes(A)}function oe(A){const Z=n.find(Fe=>Fe.value===A);return(Z==null?void 0:Z.label)||""}function j(){M||!(T!=null&&T.current)||ae||(X(!0),T.current.focus(),w&&w())}function ne(){X(!1),S&&T.current&&T.current.blur()}function xe(A){E(A),v&&v(A)}function we(A){se(A)?(fe(Q.filter(Z=>Z!==A)),b&&b(Q.filter(Z=>Z!==A))):(fe([...Q,A]),b&&b([...Q,A])),s&&ne()}const he=n.filter(A=>!!(e.onSearch||!e.isSearchable||A.label.toLowerCase().includes(Y.toLowerCase())));return i.jsxs(_e,{children:[_&&i.jsx(de,{showAsterisk:g,children:_}),i.jsxs(cs,{handleContainerFocus:j,disabled:M,isError:V,isFocused:ae,isLoading:l,readOnly:u,size:F,variant:$,className:r,prefixExists:!!I,id:z,children:[i.jsx("input",{ref:T,name:t,value:JSON.stringify(ee),type:"hidden"}),i.jsx(K,{iconSize:N,icon:I,className:"prefix"}),h&&i.jsx(h,{size:N,strokeWidth:2.5}),i.jsxs(ls,{size:F,children:[ee.map(A=>i.jsx(us,{label:oe(A),value:A,handleChangeValue:we,disabled:M},A)),ee.length<=0&&i.jsx("p",{children:a})]}),i.jsxs(ds,{isFocused:ae,isSearchable:f,search:Y,onSearch:xe,children:[he.map(({label:A,value:Z})=>i.jsx(fs,{label:A,value:Z,size:F,handleChangeValue:we,optionHasSelected:se},Z)),he.length<=0&&i.jsx("p",{children:k})]}),i.jsx(is,{disabled:M,isFocused:ae,readOnly:u,iconSize:N,isLoading:l}),i.jsx(gs,{iconSize:N,isLoading:l}),i.jsx(_s,{handleBlur:ne,isFocused:ae})]}),P&&i.jsx(ve,{children:P})]})}const Re=[{name:"Afghanistan",code:"+93",prefix:null,iso:"AF",flag:"https://cdn.kcak11.com/CountryFlags/countries/af.svg",mask:"__-___-____"},{name:"Aland Islands",code:"+358",prefix:null,iso:"AX",flag:"https://cdn.kcak11.com/CountryFlags/countries/ax.svg",mask:"(___) ___-__-__"},{name:"Albania",code:"+355",prefix:null,iso:"AL",flag:"https://cdn.kcak11.com/CountryFlags/countries/al.svg",mask:"(___) ___-___"},{name:"Algeria",code:"+213",prefix:null,iso:"DZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/dz.svg",mask:"__-___-____"},{name:"American Samoa",code:"+1",prefix:"684",iso:"AS",flag:"https://cdn.kcak11.com/CountryFlags/countries/as.svg",mask:"(684) ___-____"},{name:"Andorra",code:"+376",prefix:null,iso:"AD",flag:"https://cdn.kcak11.com/CountryFlags/countries/ad.svg",mask:"___-___"},{name:"Angola",code:"+244",prefix:null,iso:"AO",flag:"https://cdn.kcak11.com/CountryFlags/countries/ao.svg",mask:"(___) ___-___"},{name:"Anguilla",code:"+1",prefix:"264",iso:"AI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ai.svg",mask:"(264) ___-____"},{name:"Antarctica",code:"+672",prefix:"1",iso:"AQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/aq.svg",mask:"1__-___"},{name:"Antigua and Barbuda",code:"+1",prefix:"268",iso:"AG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ag.svg",mask:"(268) ___-____"},{name:"Argentina",code:"+54",prefix:null,iso:"AR",flag:"https://cdn.kcak11.com/CountryFlags/countries/ar.svg",mask:"(___) ___-____"},{name:"Armenia",code:"+374",prefix:null,iso:"AM",flag:"https://cdn.kcak11.com/CountryFlags/countries/am.svg",mask:"__-___-___"},{name:"Aruba",code:"+297",prefix:null,iso:"AW",flag:"https://cdn.kcak11.com/CountryFlags/countries/aw.svg",mask:"___-____"},{name:"Ascension Island",code:"+247",prefix:null,iso:"AC",flag:"https://cdn.kcak11.com/CountryFlags/countries/sh.svg",mask:"____"},{name:"Australia",code:"+61",prefix:null,iso:"AU",flag:"https://cdn.kcak11.com/CountryFlags/countries/au.svg",mask:"_-____-____"},{name:"Austria",code:"+43",prefix:null,iso:"AT",flag:"https://cdn.kcak11.com/CountryFlags/countries/at.svg",mask:"(___) ___-____"},{name:"Azerbaijan",code:"+994",prefix:null,iso:"AZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/az.svg",mask:"__-___-__-__"},{name:"Bahamas",code:"+1",prefix:"242",iso:"BS",flag:"https://cdn.kcak11.com/CountryFlags/countries/bs.svg",mask:"(242) ___-____"},{name:"Bahrain",code:"+973",prefix:null,iso:"BH",flag:"https://cdn.kcak11.com/CountryFlags/countries/bh.svg",mask:"____-____"},{name:"Bangladesh",code:"+880",prefix:"1",iso:"BD",flag:"https://cdn.kcak11.com/CountryFlags/countries/bd.svg",mask:"1___-______"},{name:"Barbados",code:"+1",prefix:"246",iso:"BB",flag:"https://cdn.kcak11.com/CountryFlags/countries/bb.svg",mask:"(246) ___-____"},{name:"Belarus",code:"+375",prefix:null,iso:"BY",flag:"https://cdn.kcak11.com/CountryFlags/countries/by.svg",mask:"(__) ___-__-__"},{name:"Belgium",code:"+32",prefix:null,iso:"BE",flag:"https://cdn.kcak11.com/CountryFlags/countries/be.svg",mask:"(___) ___-___"},{name:"Belize",code:"+501",prefix:null,iso:"BZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/bz.svg",mask:"___-____"},{name:"Benin",code:"+229",prefix:null,iso:"BJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/bj.svg",mask:"__-__-____"},{name:"Bermuda",code:"+1",prefix:"441",iso:"BM",flag:"https://cdn.kcak11.com/CountryFlags/countries/bm.svg",mask:"(441) ___-____"},{name:"Bhutan",code:"+975",prefix:null,iso:"BT",flag:"https://cdn.kcak11.com/CountryFlags/countries/bt.svg",mask:"_-___-___"},{name:"Bolivia",code:"+591",prefix:null,iso:"BO",flag:"https://cdn.kcak11.com/CountryFlags/countries/bo.svg",mask:"_-___-____"},{name:"Bosnia and Herzegovina",code:"+387",prefix:null,iso:"BA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ba.svg",mask:"__-_____"},{name:"Botswana",code:"+267",prefix:null,iso:"BW",flag:"https://cdn.kcak11.com/CountryFlags/countries/bw.svg",mask:"__-___-___"},{name:"Brasil",code:"+55",prefix:null,iso:"BR",flag:"https://cdn.kcak11.com/CountryFlags/countries/br.svg",mask:"(__) _____-____"},{name:"British Indian Ocean Territory",code:"+246",prefix:null,iso:"IO",flag:"https://cdn.kcak11.com/CountryFlags/countries/io.svg",mask:"___-____"},{name:"Brunei Darussalam",code:"+673",prefix:null,iso:"BN",flag:"https://cdn.kcak11.com/CountryFlags/countries/bn.svg",mask:"___-____"},{name:"Bulgaria",code:"+359",prefix:null,iso:"BG",flag:"https://cdn.kcak11.com/CountryFlags/countries/bg.svg",mask:"(___) ___-___"},{name:"Burkina Faso",code:"+226",prefix:null,iso:"BF",flag:"https://cdn.kcak11.com/CountryFlags/countries/bf.svg",mask:"__-__-____"},{name:"Burundi",code:"+257",prefix:null,iso:"BI",flag:"https://cdn.kcak11.com/CountryFlags/countries/bi.svg",mask:"__-__-____"},{name:"Cambodia",code:"+855",prefix:null,iso:"KH",flag:"https://cdn.kcak11.com/CountryFlags/countries/kh.svg",mask:"__-___-___"},{name:"Cameroon",code:"+237",prefix:null,iso:"CM",flag:"https://cdn.kcak11.com/CountryFlags/countries/cm.svg",mask:"____-____"},{name:"Canada",code:"+1",prefix:null,iso:"CA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ca.svg",mask:"(___) ___-____"},{name:"Cape Verde",code:"+238",prefix:null,iso:"CV",flag:"https://cdn.kcak11.com/CountryFlags/countries/cv.svg",mask:"(___) __-__"},{name:"Cayman Islands",code:"+1",prefix:"345",iso:"KY",flag:"https://cdn.kcak11.com/CountryFlags/countries/ky.svg",mask:"(345) ___-____"},{name:"Central African Republic",code:"+236",prefix:null,iso:"CF",flag:"https://cdn.kcak11.com/CountryFlags/countries/cf.svg",mask:"__-__-____"},{name:"Chad",code:"+235",prefix:null,iso:"TD",flag:"https://cdn.kcak11.com/CountryFlags/countries/td.svg",mask:"__-__-__-__"},{name:"Chile",code:"+56",prefix:null,iso:"CL",flag:"https://cdn.kcak11.com/CountryFlags/countries/cl.svg",mask:"_-____-____"},{name:"China",code:"+86",prefix:null,iso:"CN",flag:"https://cdn.kcak11.com/CountryFlags/countries/cn.svg",mask:"__-_____-_____"},{name:"Christmas Island",code:"+61",prefix:null,iso:"CX",flag:"https://cdn.kcak11.com/CountryFlags/countries/cx.svg",mask:"_-____-____"},{name:"Cocos (Keeling) Islands",code:"+61",prefix:null,iso:"CC",flag:"https://cdn.kcak11.com/CountryFlags/countries/cc.svg",mask:"_-____-____"},{name:"Colombia",code:"+57",prefix:null,iso:"CO",flag:"https://cdn.kcak11.com/CountryFlags/countries/co.svg",mask:"(___) ___-____"},{name:"Comoros",code:"+269",prefix:null,iso:"KM",flag:"https://cdn.kcak11.com/CountryFlags/countries/km.svg",mask:"__-_____"},{name:"Congo",code:"+242",prefix:null,iso:"CG",flag:"https://cdn.kcak11.com/CountryFlags/countries/cg.svg",mask:"__-_____"},{name:"Cook Islands",code:"+682",prefix:null,iso:"CK",flag:"https://cdn.kcak11.com/CountryFlags/countries/ck.svg",mask:"__-___"},{name:"Costa Rica",code:"+506",prefix:null,iso:"CR",flag:"https://cdn.kcak11.com/CountryFlags/countries/cr.svg",mask:"____-____"},{name:"Croatia",code:"+385",prefix:null,iso:"HR",flag:"https://cdn.kcak11.com/CountryFlags/countries/hr.svg",mask:"__-___-___"},{name:"Cuba",code:"+53",prefix:null,iso:"CU",flag:"https://cdn.kcak11.com/CountryFlags/countries/cu.svg",mask:"_-___-____"},{name:"Cyprus",code:"+357",prefix:null,iso:"CY",flag:"https://cdn.kcak11.com/CountryFlags/countries/cy.svg",mask:"__-___-___"},{name:"Czech Republic",code:"+420",prefix:null,iso:"CZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/cz.svg",mask:"(___) ___-___"},{name:"Democratic Republic of the Congo",code:"+243",prefix:null,iso:"CD",flag:"https://cdn.kcak11.com/CountryFlags/countries/cd.svg",mask:"(___) ___-___"},{name:"Denmark",code:"+45",prefix:null,iso:"DK",flag:"https://cdn.kcak11.com/CountryFlags/countries/dk.svg",mask:"__-__-__-__"},{name:"Djibouti",code:"+253",prefix:null,iso:"DJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/dj.svg",mask:"__-__-__-__"},{name:"Dominica",code:"+1",prefix:"767",iso:"DM",flag:"https://cdn.kcak11.com/CountryFlags/countries/dm.svg",mask:"(767) ___-____"},{name:"Dominican Republic",code:"+1",prefix:"849",iso:"DO",flag:"https://cdn.kcak11.com/CountryFlags/countries/do.svg",mask:"(894) ___-____"},{name:"Ecuador",code:"+593",prefix:null,iso:"EC",flag:"https://cdn.kcak11.com/CountryFlags/countries/ec.svg",mask:"__-___-____"},{name:"Egypt",code:"+20",prefix:null,iso:"EG",flag:"https://cdn.kcak11.com/CountryFlags/countries/eg.svg",mask:"(___) ___-____"},{name:"El Salvador",code:"+503",prefix:null,iso:"SV",flag:"https://cdn.kcak11.com/CountryFlags/countries/sv.svg",mask:"__-__-____"},{name:"Equatorial Guinea",code:"+240",prefix:null,iso:"GQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/gq.svg",mask:"__-___-____"},{name:"Eritrea",code:"+291",prefix:null,iso:"ER",flag:"https://cdn.kcak11.com/CountryFlags/countries/er.svg",mask:"_-___-___"},{name:"Estonia",code:"+372",prefix:null,iso:"EE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ee.svg",mask:"____-____"},{name:"Eswatini",code:"+268",prefix:null,iso:"SZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/sz.svg",mask:"__-__-____"},{name:"Ethiopia",code:"+251",prefix:null,iso:"ET",flag:"https://cdn.kcak11.com/CountryFlags/countries/et.svg",mask:"__-___-____"},{name:"Falkland Islands (Malvinas)",code:"+500",prefix:null,iso:"FK",flag:"https://cdn.kcak11.com/CountryFlags/countries/fk.svg",mask:"_____"},{name:"Faroe Islands",code:"+298",prefix:null,iso:"FO",flag:"https://cdn.kcak11.com/CountryFlags/countries/fo.svg",mask:"__ __ __"},{name:"Fiji",code:"+679",prefix:null,iso:"FJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/fj.svg",mask:"__-_____"},{name:"Finland",code:"+358",prefix:null,iso:"FI",flag:"https://cdn.kcak11.com/CountryFlags/countries/fi.svg",mask:"__ ___ ____"},{name:"France",code:"+33",prefix:null,iso:"FR",flag:"https://cdn.kcak11.com/CountryFlags/countries/fr.svg",mask:"_ __ __ __ __"},{name:"French Guiana",code:"+594",prefix:null,iso:"GF",flag:"https://cdn.kcak11.com/CountryFlags/countries/gf.svg",mask:"___ __ __ __"},{name:"French Polynesia",code:"+689",prefix:null,iso:"PF",flag:"https://cdn.kcak11.com/CountryFlags/countries/pf.svg",mask:"__ __ __ __"},{name:"Gabon",code:"+241",prefix:null,iso:"GA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ga.svg",mask:"_ __ __ __"},{name:"Gambia",code:"+220",prefix:null,iso:"GM",flag:"https://cdn.kcak11.com/CountryFlags/countries/gm.svg",mask:"___ ____"},{name:"Georgia",code:"+995",prefix:null,iso:"GE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ge.svg",mask:"(___) ___-___"},{name:"Germany",code:"+49",prefix:"3",iso:"DE",flag:"https://cdn.kcak11.com/CountryFlags/countries/de.svg",mask:"(3____) __-____"},{name:"Ghana",code:"+233",prefix:"03",iso:"GH",flag:"https://cdn.kcak11.com/CountryFlags/countries/gh.svg",mask:"03_ ___ ____"},{name:"Gibraltar",code:"+350",prefix:null,iso:"GI",flag:"https://cdn.kcak11.com/CountryFlags/countries/gi.svg",mask:"___-_____"},{name:"Greece",code:"+30",prefix:null,iso:"GR",flag:"https://cdn.kcak11.com/CountryFlags/countries/gr.svg",mask:"(___) ___-____"},{name:"Greenland",code:"+299",prefix:null,iso:"GL",flag:"https://cdn.kcak11.com/CountryFlags/countries/gl.svg",mask:"__-__-__"},{name:"Grenada",code:"+1",prefix:"473",iso:"GD",flag:"https://cdn.kcak11.com/CountryFlags/countries/gd.svg",mask:"(473) ___-____"},{name:"Guadeloupe",code:"+590",prefix:null,iso:"GP",flag:"https://cdn.kcak11.com/CountryFlags/countries/gp.svg",mask:"___ __ __ __"},{name:"Guam",code:"+1",prefix:"671",iso:"GU",flag:"https://cdn.kcak11.com/CountryFlags/countries/gu.svg",mask:"671 ___ ____"},{name:"Guatemala",code:"+502",prefix:null,iso:"GT",flag:"https://cdn.kcak11.com/CountryFlags/countries/gt.svg",mask:"_-___-____"},{name:"Guernsey",code:"+44",prefix:null,iso:"GG",flag:"https://cdn.kcak11.com/CountryFlags/countries/gg.svg",mask:"(____) ______"},{name:"Guinea",code:"+224",prefix:null,iso:"GN",flag:"https://cdn.kcak11.com/CountryFlags/countries/gn.svg",mask:"__-___-___"},{name:"Guinea-Bissau",code:"+245",prefix:null,iso:"GW",flag:"https://cdn.kcak11.com/CountryFlags/countries/gw.svg",mask:"_-______"},{name:"Guyana",code:"+592",prefix:null,iso:"GY",flag:"https://cdn.kcak11.com/CountryFlags/countries/gy.svg",mask:"___-____"},{name:"Haiti",code:"+509",prefix:null,iso:"HT",flag:"https://cdn.kcak11.com/CountryFlags/countries/ht.svg",mask:"__-__-____"},{name:"Holy See (Vatican City State)",code:"+39",prefix:"06698",iso:"VA",flag:"https://cdn.kcak11.com/CountryFlags/countries/va.svg",mask:"06 698_____"},{name:"Honduras",code:"+504",prefix:null,iso:"HN",flag:"https://cdn.kcak11.com/CountryFlags/countries/hn.svg",mask:"____-____"},{name:"Hong Kong",code:"+852",prefix:null,iso:"HK",flag:"https://cdn.kcak11.com/CountryFlags/countries/hk.svg",mask:"____-____"},{name:"Hungary",code:"+36",prefix:null,iso:"HU",flag:"https://cdn.kcak11.com/CountryFlags/countries/hu.svg",mask:"__ ___ ____"},{name:"Iceland",code:"+354",prefix:null,iso:"IS",flag:"https://cdn.kcak11.com/CountryFlags/countries/is.svg",mask:"___-____"},{name:"India",code:"+91",prefix:null,iso:"IN",flag:"https://cdn.kcak11.com/CountryFlags/countries/in.svg",mask:"(____) ___-___"},{name:"Indonesia",code:"+62",prefix:"8",iso:"ID",flag:"https://cdn.kcak11.com/CountryFlags/countries/id.svg",mask:"(8__) ___-__-___"},{name:"Iran",code:"+98",prefix:null,iso:"IR",flag:"https://cdn.kcak11.com/CountryFlags/countries/ir.svg",mask:"(___) ___-____"},{name:"Iraq",code:"+964",prefix:null,iso:"IQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/iq.svg",mask:"(___) ___-____"},{name:"Ireland",code:"+353",prefix:null,iso:"IE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ie.svg",mask:"(___) ___-___"},{name:"Isle of Man",code:"+44",prefix:null,iso:"IM",flag:"https://cdn.kcak11.com/CountryFlags/countries/im.svg",mask:"(____) ______"},{name:"Israel",code:"+972",prefix:"5",iso:"IL",flag:"https://cdn.kcak11.com/CountryFlags/countries/il.svg",mask:"__-___-____"},{name:"Italy",code:"+39",prefix:null,iso:"IT",flag:"https://cdn.kcak11.com/CountryFlags/countries/it.svg",mask:"(___) ____-___"},{name:"Ivory Coast / Cote d'Ivoire",code:"+225",prefix:null,iso:"CI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ci.svg",mask:"__-___-___"},{name:"Jamaica",code:"+1",prefix:"876",iso:"JM",flag:"https://cdn.kcak11.com/CountryFlags/countries/jm.svg",mask:"(876) ___-____"},{name:"Japan",code:"+81",prefix:null,iso:"JP",flag:"https://cdn.kcak11.com/CountryFlags/countries/jp.svg",mask:"__-____-____"},{name:"Jersey",code:"+44",prefix:null,iso:"JE",flag:"https://cdn.kcak11.com/CountryFlags/countries/je.svg",mask:"(____) ____-______"},{name:"Jordan",code:"+962",prefix:null,iso:"JO",flag:"https://cdn.kcak11.com/CountryFlags/countries/jo.svg",mask:"_-____-____"},{name:"Kazakhstan",code:"+77",prefix:null,iso:"KZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/kz.svg",mask:"(_____) _ __ __"},{name:"Kenya",code:"+254",prefix:null,iso:"KE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ke.svg",mask:"___-______"},{name:"Kiribati",code:"+686",prefix:null,iso:"KI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ki.svg",mask:"__-___"},{name:"Korea, Democratic People's Republic of Korea",code:"+850",prefix:null,iso:"KP",flag:"https://cdn.kcak11.com/CountryFlags/countries/kp.svg",mask:"____-_____________"},{name:"Korea, Republic of South Korea",code:"+82",prefix:null,iso:"KR",flag:"https://cdn.kcak11.com/CountryFlags/countries/kr.svg",mask:"__-___-____"},{name:"Kosovo",code:"+383",prefix:null,iso:"XK",flag:"https://cdn.kcak11.com/CountryFlags/countries/xk.svg",mask:"___-___-___"},{name:"Kuwait",code:"+965",prefix:null,iso:"KW",flag:"https://cdn.kcak11.com/CountryFlags/countries/kw.svg",mask:"____-____"},{name:"Kyrgyzstan",code:"+996",prefix:null,iso:"KG",flag:"https://cdn.kcak11.com/CountryFlags/countries/kg.svg",mask:"(___) ___-___"},{name:"Laos",code:"+856",prefix:"20",iso:"LA",flag:"https://cdn.kcak11.com/CountryFlags/countries/la.svg",mask:"(20__) ___-___"},{name:"Latvia",code:"+371",prefix:null,iso:"LV",flag:"https://cdn.kcak11.com/CountryFlags/countries/lv.svg",mask:"__-___-___"},{name:"Lebanon",code:"+961",prefix:null,iso:"LB",flag:"https://cdn.kcak11.com/CountryFlags/countries/lb.svg",mask:"__-___-___"},{name:"Lesotho",code:"+266",prefix:null,iso:"LS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ls.svg",mask:"_-___-____"},{name:"Liberia",code:"+231",prefix:null,iso:"LR",flag:"https://cdn.kcak11.com/CountryFlags/countries/lr.svg",mask:"__-___-___"},{name:"Libya",code:"+218",prefix:"21",iso:"LY",flag:"https://cdn.kcak11.com/CountryFlags/countries/ly.svg",mask:"21-___-____"},{name:"Liechtenstein",code:"+423",prefix:null,iso:"LI",flag:"https://cdn.kcak11.com/CountryFlags/countries/li.svg",mask:"(___) ___-____"},{name:"Lithuania",code:"+370",prefix:null,iso:"LT",flag:"https://cdn.kcak11.com/CountryFlags/countries/lt.svg",mask:"(___) __-___"},{name:"Luxembourg",code:"+352",prefix:null,iso:"LU",flag:"https://cdn.kcak11.com/CountryFlags/countries/lu.svg",mask:"(___) ___-___"},{name:"Macau",code:"+853",prefix:null,iso:"MO",flag:"https://cdn.kcak11.com/CountryFlags/countries/mo.svg",mask:"____-____"},{name:"Madagascar",code:"+261",prefix:null,iso:"MG",flag:"https://cdn.kcak11.com/CountryFlags/countries/mg.svg",mask:"__-__-_____"},{name:"Malawi",code:"+265",prefix:null,iso:"MW",flag:"https://cdn.kcak11.com/CountryFlags/countries/mw.svg",mask:"_-____-____"},{name:"Malaysia",code:"+60",prefix:null,iso:"MY",flag:"https://cdn.kcak11.com/CountryFlags/countries/my.svg",mask:"__-___-____"},{name:"Maldives",code:"+960",prefix:null,iso:"MV",flag:"https://cdn.kcak11.com/CountryFlags/countries/mv.svg",mask:"___-____"},{name:"Mali",code:"+223",prefix:null,iso:"ML",flag:"https://cdn.kcak11.com/CountryFlags/countries/ml.svg",mask:"__-__-____"},{name:"Malta",code:"+356",prefix:null,iso:"MT",flag:"https://cdn.kcak11.com/CountryFlags/countries/mt.svg",mask:"____-____"},{name:"Marshall Islands",code:"+692",prefix:null,iso:"MH",flag:"https://cdn.kcak11.com/CountryFlags/countries/mh.svg",mask:"___-____"},{name:"Martinique",code:"+596",prefix:null,iso:"MQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/mq.svg",mask:"(___) __-__-__"},{name:"Mauritania",code:"+222",prefix:null,iso:"MR",flag:"https://cdn.kcak11.com/CountryFlags/countries/mr.svg",mask:"__-__-____"},{name:"Mauritius",code:"+230",prefix:null,iso:"MU",flag:"https://cdn.kcak11.com/CountryFlags/countries/mu.svg",mask:"___-____"},{name:"Mayotte",code:"+262",prefix:null,iso:"YT",flag:"https://cdn.kcak11.com/CountryFlags/countries/yt.svg",mask:"_____-____"},{name:"Mexico",code:"+52",prefix:null,iso:"MX",flag:"https://cdn.kcak11.com/CountryFlags/countries/mx.svg",mask:"(___) ___-____"},{name:"Micronesia, Federated States of Micronesia",code:"+691",prefix:null,iso:"FM",flag:"https://cdn.kcak11.com/CountryFlags/countries/fm.svg",mask:"___-____"},{name:"Moldova",code:"+373",prefix:null,iso:"MD",flag:"https://cdn.kcak11.com/CountryFlags/countries/md.svg",mask:"____-____"},{name:"Monaco",code:"+377",prefix:null,iso:"MC",flag:"https://cdn.kcak11.com/CountryFlags/countries/mc.svg",mask:"(___) ___-___"},{name:"Mongolia",code:"+976",prefix:null,iso:"MN",flag:"https://cdn.kcak11.com/CountryFlags/countries/mn.svg",mask:"__-__-____"},{name:"Montenegro",code:"+382",prefix:null,iso:"ME",flag:"https://cdn.kcak11.com/CountryFlags/countries/me.svg",mask:"__-___-___"},{name:"Montserrat",code:"+1",prefix:"664",iso:"MS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ms.svg",mask:"(664) ___-____"},{name:"Morocco",code:"+212",prefix:null,iso:"MA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ma.svg",mask:"__-____-___"},{name:"Mozambique",code:"+258",prefix:null,iso:"MZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/mz.svg",mask:"__-___-___"},{name:"Myanmar",code:"+95",prefix:null,iso:"MM",flag:"https://cdn.kcak11.com/CountryFlags/countries/mm.svg",mask:"__-___-___"},{name:"Namibia",code:"+264",prefix:null,iso:"NA",flag:"https://cdn.kcak11.com/CountryFlags/countries/na.svg",mask:"__-___-____"},{name:"Nauru",code:"+674",prefix:null,iso:"NR",flag:"https://cdn.kcak11.com/CountryFlags/countries/nr.svg",mask:"___-____"},{name:"Nepal",code:"+977",prefix:null,iso:"NP",flag:"https://cdn.kcak11.com/CountryFlags/countries/np.svg",mask:"__-___-___"},{name:"Netherlands",code:"+31",prefix:null,iso:"NL",flag:"https://cdn.kcak11.com/CountryFlags/countries/nl.svg",mask:"__-___-____"},{name:"New Caledonia",code:"+687",prefix:null,iso:"NC",flag:"https://cdn.kcak11.com/CountryFlags/countries/nc.svg",mask:"__-____"},{name:"New Zealand",code:"+64",prefix:null,iso:"NZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/nz.svg",mask:"(___) ___-____"},{name:"Nicaragua",code:"+505",prefix:null,iso:"NI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ni.svg",mask:"____-____"},{name:"Niger",code:"+227",prefix:null,iso:"NE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ne.svg",mask:"__-__-____"},{name:"Nigeria",code:"+234",prefix:null,iso:"NG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ng.svg",mask:"(___) ___-____"},{name:"Niue",code:"+683",prefix:null,iso:"NU",flag:"https://cdn.kcak11.com/CountryFlags/countries/nu.svg",mask:"____"},{name:"Norfolk Island",code:"+672",prefix:"3",iso:"NF",flag:"https://cdn.kcak11.com/CountryFlags/countries/nf.svg",mask:"3__-___"},{name:"North Macedonia",code:"+389",prefix:null,iso:"MK",flag:"https://cdn.kcak11.com/CountryFlags/countries/mk.svg",mask:"__-___-___"},{name:"Northern Mariana Islands",code:"+1",prefix:"670",iso:"MP",flag:"https://cdn.kcak11.com/CountryFlags/countries/mp.svg",mask:"(670) ___-____"},{name:"Norway",code:"+47",prefix:null,iso:"NO",flag:"https://cdn.kcak11.com/CountryFlags/countries/no.svg",mask:"(___) __-___"},{name:"Oman",code:"+968",prefix:null,iso:"OM",flag:"https://cdn.kcak11.com/CountryFlags/countries/om.svg",mask:"__-___-___"},{name:"Pakistan",code:"+92",prefix:null,iso:"PK",flag:"https://cdn.kcak11.com/CountryFlags/countries/pk.svg",mask:"(___) ___-____"},{name:"Palau",code:"+680",prefix:null,iso:"PW",flag:"https://cdn.kcak11.com/CountryFlags/countries/pw.svg",mask:"___-____"},{name:"Palestine",code:"+970",prefix:null,iso:"PS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ps.svg",mask:"__-___-____"},{name:"Panama",code:"+507",prefix:null,iso:"PA",flag:"https://cdn.kcak11.com/CountryFlags/countries/pa.svg",mask:"___-____"},{name:"Papua New Guinea",code:"+675",prefix:null,iso:"PG",flag:"https://cdn.kcak11.com/CountryFlags/countries/pg.svg",mask:"(___) __-___"},{name:"Paraguay",code:"+595",prefix:null,iso:"PY",flag:"https://cdn.kcak11.com/CountryFlags/countries/py.svg",mask:"(___) ___-___"},{name:"Peru",code:"+51",prefix:null,iso:"PE",flag:"https://cdn.kcak11.com/CountryFlags/countries/pe.svg",mask:"(___) ___-___"},{name:"Philippines",code:"+63",prefix:null,iso:"PH",flag:"https://cdn.kcak11.com/CountryFlags/countries/ph.svg",mask:"(___) ___-____"},{name:"Pitcairn",code:"+870",prefix:null,iso:"PN",flag:"https://cdn.kcak11.com/CountryFlags/countries/pn.svg",mask:"___-___-___"},{name:"Poland",code:"+48",prefix:null,iso:"PL",flag:"https://cdn.kcak11.com/CountryFlags/countries/pl.svg",mask:"(___) ___-___"},{name:"Portugal",code:"+351",prefix:null,iso:"PT",flag:"https://cdn.kcak11.com/CountryFlags/countries/pt.svg",mask:"__-___-____"},{name:"Puerto Rico",code:"+1",prefix:null,iso:"PR",flag:"https://cdn.kcak11.com/CountryFlags/countries/pr.svg",mask:"(___) ___ ____"},{name:"Qatar",code:"+974",prefix:null,iso:"QA",flag:"https://cdn.kcak11.com/CountryFlags/countries/qa.svg",mask:"____-____"},{name:"Reunion",code:"+262",prefix:null,iso:"RE",flag:"https://cdn.kcak11.com/CountryFlags/countries/re.svg",mask:"_____-____"},{name:"Romania",code:"+40",prefix:null,iso:"RO",flag:"https://cdn.kcak11.com/CountryFlags/countries/ro.svg",mask:"__-___-____"},{name:"Russia",code:"+7",prefix:null,iso:"RU",flag:"https://cdn.kcak11.com/CountryFlags/countries/ru.svg",mask:"(___) ___-__-__"},{name:"Rwanda",code:"+250",prefix:null,iso:"RW",flag:"https://cdn.kcak11.com/CountryFlags/countries/rw.svg",mask:"(___) ___-___"},{name:"Saint Barthelemy",code:"+590",prefix:null,iso:"BL",flag:"https://cdn.kcak11.com/CountryFlags/countries/bl.svg",mask:"___-__-__-__"},{name:"Saint Helena, Ascension and Tristan Da Cunha",code:"+290",prefix:null,iso:"SH",flag:"https://cdn.kcak11.com/CountryFlags/countries/sh.svg",mask:"____"},{name:"Saint Kitts and Nevis",code:"+1",prefix:null,iso:"KN",flag:"https://cdn.kcak11.com/CountryFlags/countries/kn.svg",mask:"(869) ___-____"},{name:"Saint Lucia",code:"+1",prefix:"758",iso:"LC",flag:"https://cdn.kcak11.com/CountryFlags/countries/lc.svg",mask:"(758) ___-____"},{name:"Saint Martin",code:"+590",prefix:null,iso:"MF",flag:"https://cdn.kcak11.com/CountryFlags/countries/mf.svg",mask:"(___) ___-___"},{name:"Saint Pierre and Miquelon",code:"+508",prefix:null,iso:"PM",flag:"https://cdn.kcak11.com/CountryFlags/countries/pm.svg",mask:"__-____"},{name:"Saint Vincent and the Grenadines",code:"+1",prefix:"784",iso:"VC",flag:"https://cdn.kcak11.com/CountryFlags/countries/vc.svg",mask:"(784) ___-____"},{name:"Samoa",code:"+685",prefix:null,iso:"WS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ws.svg",mask:"__-____"},{name:"San Marino",code:"+378",prefix:null,iso:"SM",flag:"https://cdn.kcak11.com/CountryFlags/countries/sm.svg",mask:"____-______"},{name:"Sao Tome and Principe",code:"+239",prefix:null,iso:"ST",flag:"https://cdn.kcak11.com/CountryFlags/countries/st.svg",mask:"__-_____"},{name:"Saudi Arabia",code:"+966",prefix:null,iso:"SA",flag:"https://cdn.kcak11.com/CountryFlags/countries/sa.svg",mask:"_-____-____"},{name:"Senegal",code:"+221",prefix:null,iso:"SN",flag:"https://cdn.kcak11.com/CountryFlags/countries/sn.svg",mask:"__-___-____"},{name:"Serbia",code:"+381",prefix:null,iso:"RS",flag:"https://cdn.kcak11.com/CountryFlags/countries/rs.svg",mask:"__-___-____"},{name:"Seychelles",code:"+248",prefix:null,iso:"SC",flag:"https://cdn.kcak11.com/CountryFlags/countries/sc.svg",mask:"_-___-___"},{name:"Sierra Leone",code:"+232",prefix:null,iso:"SL",flag:"https://cdn.kcak11.com/CountryFlags/countries/sl.svg",mask:"__-______"},{name:"Singapore",code:"+65",prefix:null,iso:"SG",flag:"https://cdn.kcak11.com/CountryFlags/countries/sg.svg",mask:"____-____"},{name:"Sint Maarten",code:"+1",prefix:"721",iso:"SX",flag:"https://cdn.kcak11.com/CountryFlags/countries/sx.svg",mask:"(721) ___-____"},{name:"Slovakia",code:"+421",prefix:null,iso:"SK",flag:"https://cdn.kcak11.com/CountryFlags/countries/sk.svg",mask:"(___) ___-___"},{name:"Slovenia",code:"+386",prefix:null,iso:"SI",flag:"https://cdn.kcak11.com/CountryFlags/countries/si.svg",mask:"__-___-___"},{name:"Solomon Islands",code:"+677",prefix:null,iso:"SB",flag:"https://cdn.kcak11.com/CountryFlags/countries/sb.svg",mask:"___-____"},{name:"Somalia",code:"+252",prefix:null,iso:"SO",flag:"https://cdn.kcak11.com/CountryFlags/countries/so.svg",mask:"__-___-___"},{name:"South Africa",code:"+27",prefix:null,iso:"ZA",flag:"https://cdn.kcak11.com/CountryFlags/countries/za.svg",mask:"__-___-____"},{name:"South Georgia and the South Sandwich Islands",code:"+500",prefix:null,iso:"GS",flag:"https://cdn.kcak11.com/CountryFlags/countries/gs.svg",mask:"_____"},{name:"South Sudan",code:"+211",prefix:null,iso:"SS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ss.svg",mask:"__-___-____"},{name:"Spain",code:"+34",prefix:null,iso:"ES",flag:"https://cdn.kcak11.com/CountryFlags/countries/es.svg",mask:"(___) ___-___"},{name:"Sri Lanka",code:"+94",prefix:null,iso:"LK",flag:"https://cdn.kcak11.com/CountryFlags/countries/lk.svg",mask:"__-___-____"},{name:"Sudan",code:"+249",prefix:null,iso:"SD",flag:"https://cdn.kcak11.com/CountryFlags/countries/sd.svg",mask:"__-___-____"},{name:"Suriname",code:"+597",prefix:null,iso:"SR",flag:"https://cdn.kcak11.com/CountryFlags/countries/sr.svg",mask:"___-____"},{name:"Svalbard and Jan Mayen",code:"+47",prefix:null,iso:"SJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/sj.svg",mask:"(___) __-___"},{name:"Sweden",code:"+46",prefix:null,iso:"SE",flag:"https://cdn.kcak11.com/CountryFlags/countries/se.svg",mask:"__-___-____"},{name:"Switzerland",code:"+41",prefix:null,iso:"CH",flag:"https://cdn.kcak11.com/CountryFlags/countries/ch.svg",mask:"__-___-____"},{name:"Syrian Arab Republic",code:"+963",prefix:null,iso:"SY",flag:"https://cdn.kcak11.com/CountryFlags/countries/sy.svg",mask:"__-____-___"},{name:"Taiwan",code:"+886",prefix:null,iso:"TW",flag:"https://cdn.kcak11.com/CountryFlags/countries/tw.svg",mask:"_-____-____"},{name:"Tajikistan",code:"+992",prefix:null,iso:"TJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/tj.svg",mask:"__-___-____"},{name:"United Republic of Tanzania",code:"+255",prefix:null,iso:"TZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/tz.svg",mask:"__-___-____"},{name:"Thailand",code:"+66",prefix:null,iso:"TH",flag:"https://cdn.kcak11.com/CountryFlags/countries/th.svg",mask:"__-___-____"},{name:"Timor-Leste",code:"+670",prefix:null,iso:"TL",flag:"https://cdn.kcak11.com/CountryFlags/countries/tl.svg",mask:"___-_____"},{name:"Togo",code:"+228",prefix:null,iso:"TG",flag:"https://cdn.kcak11.com/CountryFlags/countries/tg.svg",mask:"__-___-___"},{name:"Tokelau",code:"+690",prefix:null,iso:"TK",flag:"https://cdn.kcak11.com/CountryFlags/countries/tk.svg",mask:"____"},{name:"Tonga",code:"+676",prefix:null,iso:"TO",flag:"https://cdn.kcak11.com/CountryFlags/countries/to.svg",mask:"_____"},{name:"Trinidad and Tobago",code:"+1",prefix:"868",iso:"TT",flag:"https://cdn.kcak11.com/CountryFlags/countries/tt.svg",mask:"(868) ___-____"},{name:"Tunisia",code:"+216",prefix:null,iso:"TN",flag:"https://cdn.kcak11.com/CountryFlags/countries/tn.svg",mask:"__-___-___"},{name:"Turkey",code:"+90",prefix:null,iso:"TR",flag:"https://cdn.kcak11.com/CountryFlags/countries/tr.svg",mask:"(___) ___-____"},{name:"Turkmenistan",code:"+993",prefix:null,iso:"TM",flag:"https://cdn.kcak11.com/CountryFlags/countries/tm.svg",mask:"_-___-____"},{name:"Turks and Caicos Islands",code:"+1",prefix:"249",iso:"TC",flag:"https://cdn.kcak11.com/CountryFlags/countries/tc.svg",mask:"(249) ___-___"},{name:"Tuvalu",code:"+688",prefix:null,iso:"TV",flag:"https://cdn.kcak11.com/CountryFlags/countries/tv.svg",mask:"______"},{name:"Uganda",code:"+256",prefix:null,iso:"UG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ug.svg",mask:"(___) ___-___"},{name:"Ukraine",code:"+380",prefix:null,iso:"UA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ua.svg",mask:"(__) ___-__-__"},{name:"United Arab Emirates",code:"+971",prefix:null,iso:"AE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ae.svg",mask:"_-___-____"},{name:"United Kingdom",code:"+44",prefix:null,iso:"GB",flag:"https://cdn.kcak11.com/CountryFlags/countries/gb.svg",mask:"__-____-____"},{name:"United States",code:"+1",prefix:"408",iso:"US",flag:"https://cdn.kcak11.com/CountryFlags/countries/us.svg",mask:"(408) ___-____"},{name:"Uruguay",code:"+598",prefix:null,iso:"UY",flag:"https://cdn.kcak11.com/CountryFlags/countries/uy.svg",mask:"_-___-__-__"},{name:"Uzbekistan",code:"+998",prefix:null,iso:"UZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/uz.svg",mask:"__-___-____"},{name:"Vanuatu",code:"+678",prefix:null,iso:"VU",flag:"https://cdn.kcak11.com/CountryFlags/countries/vu.svg",mask:"__-_____"},{name:"Venezuela, Bolivarian Republic of Venezuela",code:"+58",prefix:null,iso:"VE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ve.svg",mask:"(___) ___-____"},{name:"Vietnam",code:"+84",prefix:null,iso:"VN",flag:"https://cdn.kcak11.com/CountryFlags/countries/vn.svg",mask:"(___) ____-___"},{name:"Virgin Islands, British",code:"+1",prefix:"284",iso:"VG",flag:"https://cdn.kcak11.com/CountryFlags/countries/vg.svg",mask:"(284) ___-____"},{name:"Virgin Islands, U.S.",code:"+1",prefix:"340",iso:"VI",flag:"https://cdn.kcak11.com/CountryFlags/countries/vi.svg",mask:"(340) ___-____"},{name:"Wallis and Futuna",code:"+681",prefix:null,iso:"WF",flag:"https://cdn.kcak11.com/CountryFlags/countries/wf.svg",mask:"__-____"},{name:"Yemen",code:"+967",prefix:null,iso:"YE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ye.svg",mask:"___-___-___"},{name:"Zambia",code:"+260",prefix:null,iso:"ZM",flag:"https://cdn.kcak11.com/CountryFlags/countries/zm.svg",mask:"__-___-____"},{name:"Zimbabwe",code:"+263",prefix:null,iso:"ZW",flag:"https://cdn.kcak11.com/CountryFlags/countries/zw.svg",mask:"_-______"}];function Xt(e){return e&&e.replace(/[^0-9]/g,"")}const Kt={EIGHT:"(99) 9999-9999",NINE:"(99) 99999-9999"};function Wn(e,t){let n="",r=0;for(let a=0;a<t.length;a++)if(t[a]==="9")if(r<e.length)n+=e[r],r++;else break;else if(r<e.length)n+=t[a];else break;return n}function Xn(e){return e.length>10?"NINE":"EIGHT"}const Kn=Xt(Kt.NINE).length;function Rn(e,t){if(t.code==="+55"){let a=Xt(e);const s=Xn(a);return a.length>Kn?void 0:(a=Wn(a,Kt[s]),a)}let r=t.mask;if(t.prefix){const a=/\$+/g;r=r.replace(a,t.prefix)}for(let a=0,s=0;a<r.length&&s<e.length;a++)r[a]==="_"&&(r=r.substring(0,a)+e[s]+r.substring(a+1),s++);return r}function hs(e,t){const n=Re.find(r=>r.code===e&&r.prefix===t);return n||null}function ps(e){const t=Re.find(n=>n.code===e);return t||null}function ys(e){const t=e.split(" ")[0].split("-")[0],n=e.split(" ")[0].split("-")[1],r=e.split(" ")[1];if(!t||!r)return{country:null,formattedNumber:""};if(n){const c=hs(t,n);if(!c)return{country:null,formattedNumber:""};const l=Rn(r,c);return{country:c,formattedNumber:l}}const a=ps(t);if(!a)return{country:null,formattedNumber:""};const s=Rn(r,a);return{country:a,formattedNumber:s}}function vs(e){const{children:t,onFocus:n,disabled:r,isError:a,isLoading:s,isFocused:o,className:c="",readOnly:l,variant:u,size:f}=e,g=`arkynPhoneInputContainer ${u} ${f} ${r||l||s?"opacity":""} ${a?"errored":""} ${o?"focused":""} ${c}`;return i.jsx("section",{className:g.trim(),onClick:n,children:t})}function ks(e){const{isOpen:t,onClick:n}=e;return t?i.jsx("aside",{className:"arkynPhoneInputCountriesOverlay",onClick:n}):i.jsx(i.Fragment,{})}function Cs(e){const{country:t,isActive:n,handleChangeValue:r,size:a}=e,o=`arkynPhoneInputCountryOption ${a} ${n?"active":""}`;return i.jsxs("div",{onClick:()=>r(t),className:o,children:[i.jsx("img",{src:t.flag,alt:t.name,className:"flag"}),t.name," ",i.jsx("span",{children:t.code}),i.jsx(L.Check,{className:"check"})]})}function bs(e){const{children:t,isOpen:n,onSearch:r,search:a,placeholder:s}=e,o=m.useRef(null),[c,l]=m.useState("bottom");function u(f){r(f.target.value)}return ze(n),m.useEffect(()=>{if(!n)return;(()=>{if(!o.current)return;const d=o.current.parentElement;if(!d)return;const _=d.getBoundingClientRect(),p=window.innerHeight,g=300;p-_.bottom<g&&_.top>g?l("top"):l("bottom")})()},[n]),n?i.jsxs("div",{className:`arkynPhoneInputCountryOptionsContainer ${c}`,ref:o,children:[i.jsx("input",{type:"search",name:"search-select",className:"arkynPhoneInputCountryOptionsContainerSearchSelect",value:a,id:"input-search",placeholder:s,onChange:u}),t]}):i.jsx(i.Fragment,{})}function xs(e){const{currentCountry:t,onClick:n}=e;return i.jsxs("div",{className:"phoneInputSelectCountry",onClick:n,children:[i.jsx("img",{className:"flag",src:t.flag,alt:t.name}),i.jsx(L.ChevronDown,{className:"chevronDown",strokeWidth:2.5}),i.jsx(gt,{orientation:"vertical"})]})}const Ss=m.forwardRef((e,t)=>i.jsx("input",{ref:t,...e})),Es=m.forwardRef((e,t)=>{const{onFocus:n,readonly:r,onBlur:a,size:s,onChange:o,value:c,currentCountry:l,disabled:u,id:f}=e,[d,_]=m.useState(!1);m.useEffect(()=>{d?o(l.mask):_(!0)},[l]);const p=`phoneInputMask ${s}`;function g(h){let v=Xt(h.target.value);const b=Xn(v);v.length>Kn||(v=Wn(v,Kt[b]),h.target.value=v,o(v))}return l.code==="+55"?i.jsx("input",{id:f,value:c,onChange:g,className:p,onFocus:n,onBlur:a,disabled:u,ref:t}):i.jsx(An.InputMask,{id:f,value:c,readOnly:r,onChange:h=>o(h.target.value),className:p,component:Ss,onFocus:n,onBlur:a,disabled:u,mask:l.mask,showMask:!0,replacement:{_:/\d/},ref:t})});function ws(e){const{defaultCountry:t,label:n,className:r="",disabled:a=!1,errorMessage:s,isLoading:o=!1,readOnly:c=!1,size:l="md",defaultValue:u="",variant:f="solid",showAsterisk:d,name:_,onChange:p,searchCountryPlaceholder:g="Pesquisar país",notFoundCountryText:h="Nenhum país encontrado",id:v}=e,b=ys(u),[S,k]=m.useState(!1),[w,U]=m.useState(""),[I,F]=m.useState(!1),[G,$]=m.useState(b.formattedNumber||""),[x,T]=m.useState(()=>{if(b.country)return b.country;const j=Re.find(ne=>ne.iso===t);return j||Re[30]}),{fieldErrors:z}=ye(),P=m.useRef(null),V=v||m.useId(),M=s||(z==null?void 0:z[_]),H=!!M,N=a||o,Y=m.useRef(null);function E(){N||S||I||(k(!0),Y.current&&Y.current.focus())}function ae(){F(!0),k(!0)}function X(){F(!1),k(!1)}function Q(){k(!0)}function fe(){k(!1)}function ee(j){return j.name.toLowerCase().includes(w.toLowerCase())}function se(j){return x.prefix?j.replace(x.prefix,"").replaceAll(" ","").replaceAll("-","").replaceAll("(","").replaceAll(")","").trim():j.replaceAll(" ","").replaceAll("-","").replaceAll("(","").replaceAll(")","").trim()}function oe(j){let ne=x.code;return x.prefix&&(ne+=`-${x.prefix}`),ne+=" ",ne+=se(j||G),ne}return i.jsxs(_e,{children:[n&&i.jsx(de,{htmlFor:V,showAsterisk:d,children:n}),i.jsxs(vs,{disabled:N,isError:H,isLoading:o,isFocused:S,readOnly:c,size:l,variant:f,className:r,onFocus:E,children:[i.jsx(xs,{currentCountry:x,onClick:ae,size:l}),i.jsxs(bs,{isOpen:N||c?!1:I,search:w,placeholder:g,onSearch:U,children:[Re.filter(j=>ee(j)).map(j=>i.jsx(Cs,{country:j,handleChangeValue:()=>{T(j),F(!1),$(j.mask)},isActive:j.iso===x.iso,size:l},j.iso)),Re.filter(j=>ee(j)).length===0&&i.jsx("p",{children:h})]}),i.jsx(ks,{isOpen:N||c?!1:I,onClick:X}),i.jsx(Es,{id:V,ref:Y,readonly:c,currentCountry:x,value:G,disabled:N,onBlur:fe,onFocus:Q,size:l,onChange:j=>{$(j),p&&p(oe(j))}}),i.jsx("input",{ref:P,type:"hidden",name:_,value:oe()})]}),M&&i.jsx(ve,{children:M})]})}function Fs(e){const{children:t,button:n,closeOnClick:r,className:a="",orientation:s="bottomLeft"}=e,[o,c]=m.useState(!1),u=`arkynPopover ${s} ${o?"visibleTrue":"visibleFalse"} ${a}`;function f(){o||c(!0)}return ze(o),i.jsxs("div",{className:u,onClick:f,children:[n,i.jsx(Le.motion.div,{style:{visibility:o?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:o?1:0},exit:{opacity:0},onClick:()=>r&&c(!1),className:"arkynPopoverContent",children:t}),o&&i.jsx("div",{onClick:()=>c(!1),className:"arkynPopoverOverlay"})]})}const Yn=m.createContext({});function Ns(e){const{children:t,size:n,isError:r,handleChange:a,value:s,disabled:o}=e;return i.jsx(Yn.Provider,{value:{handleChange:a,value:s,size:n,isError:r,disabled:o},children:t})}function Ts(){return m.useContext(Yn)}function Os(e){const{value:t,size:n,disabled:r,children:a,className:s="",onClick:o,onFocus:c,...l}=e,{handleChange:u,size:f,value:d,isError:_,disabled:p}=Ts(),g=d===t,h=n||f,v=r||p,w=`arkynRadioBox ${h} ${g?"checkedTrue":"checkedFalse"} ${_?"errorTrue":"errorFalse"} ${v?"disabledTrue":"disabledFalse"} ${s}`;function U(F){o&&o(F),u(t)}function I(F){c&&c(F),u(t)}return i.jsxs("label",{className:w.trim(),children:[i.jsx("button",{type:"button",disabled:v,onClick:U,onFocus:I,...l}),a]})}function Ps(e){const{defaultValue:t="",name:n,label:r,showAsterisk:a,errorMessage:s,value:o,onChange:c,size:l="md",className:u="",disabled:f=!1,...d}=e,[_,p]=m.useState(t),{fieldErrors:g}=ye();function h(k){p(k),c&&c(k)}const v=s||(g==null?void 0:g[n]),b=!!v,S=`arkynRadioGroup ${l} ${u}`;return i.jsxs(_e,{children:[r&&i.jsx(de,{showAsterisk:a,children:r}),i.jsxs(Ns,{isError:b,size:l,value:o||_,handleChange:h,disabled:f,children:[i.jsx("input",{style:{display:"none"},type:"text",readOnly:!0,name:n,value:o||_}),i.jsx("div",{className:S.trim(),...d})]}),v&&i.jsx(ve,{children:v})]})}function As(e){const{iconSize:t,isLoading:n,disabled:r,readOnly:a,isFocused:s}=e,l=`arkynSelectChevron ${r||a?"notAnimate":""} ${s?"focused":""}`;return n?i.jsx(i.Fragment,{}):i.jsx(L.ChevronDown,{className:l,size:t,strokeWidth:2.5})}function Is(e){const{children:t,handleContainerFocus:n,disabled:r,isError:a,isLoading:s,isFocused:o,className:c,readOnly:l,variant:u,size:f,id:d,prefixExists:_}=e,p=_?"hasPrefix":"",g=a?"errored":"",h=r||l||s?"opacity":"",v=o?"focused":"";return i.jsx("section",{id:d,className:`arkynSelectContainer ${p} ${u} ${f} ${h} ${g} ${v} ${c}`,onClick:n,children:t})}function Ms(e){const{children:t,size:n}=e,r=`arkynSelectContent ${n}`;return i.jsx("div",{className:r,children:t})}function Ds(e){const{label:t,optionHasSelected:n,handleChangeValue:r,value:a,size:s}=e,o=n(a)?"active":"",c=`arkynSelectOption ${s} ${o}`;return i.jsxs("div",{onClick:()=>r(a),className:c,children:[t," ",i.jsx(L.Check,{})]})}function $s(e){const{children:t,isFocused:n,isSearchable:r,search:a,onSearch:s}=e,o=m.useRef(null),[c,l]=m.useState("bottom");ze(n),m.useEffect(()=>{if(!n)return;(()=>{if(!o.current)return;const d=o.current.parentElement;if(!d)return;const _=d.getBoundingClientRect(),p=window.innerHeight,g=300;p-_.bottom<g&&_.top>g?l("top"):l("bottom")})()},[n]);function u(f){r&&s(f.target.value)}return n?i.jsxs("div",{ref:o,className:`arkynSelectOptionsContainer ${c}`,children:[r&&i.jsx(Wt,{type:"search",name:"search-select",variant:"underline",leftIcon:L.Search,value:a,onChange:u}),t]}):i.jsx(i.Fragment,{})}function Ls(e){const{isFocused:t,handleBlur:n}=e;return t?i.jsx("aside",{className:"arkynSelectOverlay",onClick:n}):i.jsx(i.Fragment,{})}function Bs(e){const{iconSize:t,isLoading:n}=e;return n?i.jsx(L.Loader2,{className:"arkynSelectSpinner",size:t,strokeWidth:2.5}):i.jsx(i.Fragment,{})}function zs(e){const{name:t,options:n,className:r="",placeholder:a="Selecione...",closeOnSelect:s=!1,defaultValue:o="",errorMessage:c,isLoading:l=!1,readOnly:u=!1,isSearchable:f=!1,id:d,label:_,optionMaxHeight:p,showAsterisk:g,leftIcon:h,onSearch:v,onChange:b,onBlur:S,notFoundText:k="Sem opções disponíveis",onFocus:w,disabled:U=!1,prefix:I,size:F="md",value:G,variant:$="solid"}=e,{fieldErrors:x}=ye(),T=m.useRef(null),z=d||m.useId(),P=c||(x==null?void 0:x[t]),V=!!P,M=U||l||u,N={md:20,lg:20}[F],[Y,E]=m.useState(""),[ae,X]=m.useState(!1),[Q,fe]=m.useState(o),ee=G||Q;function se(A){return ee===A}function oe(A){const Z=n.find(Fe=>Fe.value===A);return(Z==null?void 0:Z.label)||""}function j(){M||!(T!=null&&T.current)||ae||(X(!0),T.current.focus(),w&&w())}function ne(){X(!1),S&&T.current&&T.current.blur()}function xe(A){E(A),v&&v(A)}function we(A){se(A)?(fe(""),b&&b("")):(fe(A),b&&b(A)),s&&ne()}const he=n.filter(A=>!!(e.onSearch||!e.isSearchable||A.label.toLowerCase().includes(Y.toLowerCase())));return i.jsxs(_e,{children:[_&&i.jsx(de,{showAsterisk:g,children:_}),i.jsxs(Is,{handleContainerFocus:j,disabled:M,isError:V,isFocused:ae,isLoading:l,readOnly:u,size:F,variant:$,className:r,prefixExists:!!I,id:z,children:[i.jsx("input",{ref:T,name:t,value:JSON.stringify(ee),type:"hidden"}),i.jsx(K,{iconSize:N,icon:I,className:"prefix"}),h&&i.jsx(h,{size:N,strokeWidth:2.5}),i.jsxs(Ms,{size:F,children:[ee!==""&&i.jsx("p",{children:oe(ee)}),ee===""&&i.jsx("p",{children:a})]}),i.jsxs($s,{isFocused:ae,isSearchable:f,search:Y,onSearch:xe,children:[he.map(({label:A,value:Z})=>i.jsx(Ds,{label:A,value:Z,size:F,handleChangeValue:we,optionHasSelected:se},Z)),he.length<=0&&i.jsx("p",{children:k})]}),i.jsx(As,{disabled:M,isFocused:ae,readOnly:u,iconSize:N,isLoading:l}),i.jsx(Bs,{iconSize:N,isLoading:l}),i.jsx(Ls,{handleBlur:ne,isFocused:ae})]}),P&&i.jsx(ve,{children:P})]})}function js(e){const{label:t,size:n="lg",defaultChecked:r=!1,checked:a=null,value:s,unCheckedValue:o="",name:c,className:l="",onCheck:u,id:f,orientation:d="horizontalReverse",..._}=e,p=m.useRef(null),g=f||m.useId(),[h,v]=m.useState(r),b=typeof a=="boolean"?a:h;function S(){v(!h),u&&u(b?o:s||"checked")}const w=`arkynSwitch ${b?"checkedTrue":"checkedFalse"} ${n} ${l}`;return i.jsxs(_e,{orientation:d,children:[t&&i.jsx(de,{onClick:S,children:t}),i.jsx("button",{type:"button",onClick:S,className:w,..._,children:i.jsx("input",{id:g,type:"hidden",name:c,ref:p,onClick:S,value:b?s||"checked":o})})]})}const Zn=m.createContext({});function Hs(){return m.useContext(Zn)}function Gs(e){return i.jsx(Zn.Provider,{value:e,children:e.children})}function Vs(e){const{children:t,disabled:n=!1,className:r="",onClick:a,value:s,...o}=e,{disabled:c,currentTab:l,changeCurrentTab:u}=Hs(),f=c||n,p=`arkynTabButton ${f?"isDisabled":""} ${l===s&&s?"isActive":""} ${r}`;function g(h){u(s),a&&a(h)}return i.jsx("button",{onClick:g,className:p.trim(),...o,disabled:f,type:"button",children:t})}function Us(e){const{children:t,onChange:n,defaultValue:r,disabled:a=!1,className:s,...o}=e,[c,l]=m.useState(r||""),u=`arkynTabContainer ${s||""}`;function f(d){l(d),n&&n(d)}return i.jsx(Gs,{disabled:a,currentTab:c,changeCurrentTab:f,children:i.jsx("nav",{className:u.trim(),...o,children:t})})}function qs(e){const{emptyMessage:t="Nenhum dado adicionado.",className:n,children:r,...a}=e,s=`arkynTableBody ${n}`,o=m.Children.count(r)===0;return i.jsx("tbody",{className:s.trim(),...a,children:o?i.jsx("tr",{className:"arkynTableBodyEmptyLine",children:i.jsx("td",{colSpan:100,children:i.jsx("div",{children:t})})}):r})}function Ws(e){const{className:t,children:n,...r}=e,a=`arkynTableCaption ${t}`;return i.jsx("caption",{className:a.trim(),...r,children:i.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function Xs(e){const{children:t,className:n,...r}=e,a=`arkynTableContainer ${n}`;return i.jsx("div",{className:a.trim(),...r,children:i.jsx("table",{children:t})})}function Ks(e){const{className:t,children:n,...r}=e,a=`arkynTableFooter ${t}`;return i.jsxs("tfoot",{className:a.trim(),...r,children:[i.jsx("tr",{className:"spacingRow"}),i.jsx("tr",{children:i.jsx("th",{colSpan:100,children:i.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function Rs(e){const{className:t,children:n,...r}=e,a=`arkynTableHeader ${t}`;return i.jsxs("thead",{className:a.trim(),...r,children:[i.jsx("tr",{children:n}),i.jsx("tr",{className:"spacingRow"})]})}function Ys(e){const{variant:t="solid",size:n="md",className:r,errorMessage:a,disabled:s=!1,readOnly:o=!1,label:c,showAsterisk:l,name:u,onFocus:f,onBlur:d,title:_,style:p,value:g,defaultValue:h,placeholder:v,id:b,...S}=e,{fieldErrors:k}=ye(),[w,U]=m.useState(!1),I=m.useRef(null),F=b||m.useId(),G=a||(k==null?void 0:k[u]),P=`arkynTextarea ${t} ${n} ${s||o?"opacityTrue":"opacityFalse"} ${!!G?"errorTrue":"errorFalse"} ${w?"focusedTrue":"focusedFalse"} ${r}`;function V(){s||!(I!=null&&I.current)||(U(!0),I.current.focus())}function M(N){U(!0),f&&f(N)}function H(N){U(!1),d&&d(N)}return i.jsxs(_e,{children:[c&&i.jsx(de,{htmlFor:F,showAsterisk:l,children:c}),i.jsx("section",{title:_,style:p,onClick:V,className:P,children:i.jsx("textarea",{id:F,disabled:s,readOnly:o,ref:I,onFocus:M,onBlur:H,placeholder:s&&g||v,value:s?void 0:g,...S})}),G&&i.jsx(ve,{children:G})]})}const Jn=m.createContext({});function Zs(e){const{children:t=!1}=e,[n,r]=m.useState([]);function a(l){return!!n.some(u=>u.key===l)}function s(l){var u;return(u=n.find(f=>f.key===l))==null?void 0:u.data}function o(l,u){const f=a(l);r(f?d=>[...d.filter(p=>p.key!==l),{key:l,data:u}]:[...n,{key:l,data:u}])}function c(l){r(n.filter(u=>u.key!==l))}return i.jsx(Jn.Provider,{value:{drawerIsOpen:a,drawerData:s,openDrawer:o,closeDrawer:c},children:t})}function Js(e){const t=m.useContext(Jn);if(Object.entries(t).length===0)throw new Error("useDrawer must be used within a Provider");if(e){const{drawerData:n,drawerIsOpen:r,openDrawer:a,closeDrawer:s}=t,o=r(e),c=n(e);return{drawerIsOpen:o,drawerData:c,openDrawer:f=>a(e,f),closeDrawer:()=>s(e)}}else return t}const Qn=m.createContext({});function Qs(e){const{children:t=!1}=e,[n,r]=m.useState([]);function a(u){return!!n.some(f=>f.key===u)}function s(u){var f;return(f=n.find(d=>d.key===u))==null?void 0:f.data}function o(u,f){const d=a(u);r(d?_=>[..._.filter(g=>g.key!==u),{key:u,data:f}]:[...n,{key:u,data:f}])}function c(u){r(n.filter(f=>f.key!==u))}function l(){r([])}return i.jsx(Qn.Provider,{value:{modalIsOpen:a,modalData:s,openModal:o,closeModal:c,closeAll:l},children:t})}function eo(e){const t=m.useContext(Qn);if(Object.entries(t).length===0)throw new Error("useModal must be used within a Provider");if(e){const{modalData:n,modalIsOpen:r,openModal:a,closeModal:s}=t,o=r(e),c=n(e);return{modalIsOpen:o,modalData:c,openModal:f=>a(e,f),closeModal:()=>s(e)}}else return t}function to(e,t=""){const n=new URLSearchParams(e),r=t?`${t}:`:"",a=s=>{Object.entries(s).forEach(([o,c])=>{c===void 0?n.delete(`${r}${o}`):n.set(`${r}${o}`,String(c))})};return{getParam:s=>n.get(`${r}${s}`),getScopedSearch:s=>{a(s);let o=n.toString();return o&&(o="?"+o),o}}}let no={data:""},ro=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||no,ao=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,so=/\/\*[^]*?\*\/| +/g,er=/\n+/g,Pe=(e,t)=>{let n="",r="",a="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?Pe(o,s):s+"{"+Pe(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=Pe(o,t?t.replace(/([^,])+/g,c=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,c):c?c+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=Pe.p?Pe.p(s,o):s+":"+o+";")}return n+(t&&a?t+"{"+a+"}":a)+r},Ne={},tr=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+tr(e[n]);return t}return e},oo=(e,t,n,r,a)=>{let s=tr(e),o=Ne[s]||(Ne[s]=(l=>{let u=0,f=11;for(;u<l.length;)f=101*f+l.charCodeAt(u++)>>>0;return"go"+f})(s));if(!Ne[o]){let l=s!==e?e:(u=>{let f,d,_=[{}];for(;f=ao.exec(u.replace(so,""));)f[4]?_.shift():f[3]?(d=f[3].replace(er," ").trim(),_.unshift(_[0][d]=_[0][d]||{})):_[0][f[1]]=f[2].replace(er," ").trim();return _[0]})(e);Ne[o]=Pe(a?{["@keyframes "+o]:l}:l,n?"":"."+o)}let c=n&&Ne.g?Ne.g:null;return n&&(Ne.g=Ne[o]),((l,u,f,d)=>{d?u.data=u.data.replace(d,l):u.data.indexOf(l)===-1&&(u.data=f?l+u.data:u.data+l)})(Ne[o],t,r,c),o},io=(e,t,n)=>e.reduce((r,a,s)=>{let o=t[s];if(o&&o.call){let c=o(n),l=c&&c.props&&c.props.className||/^go/.test(c)&&c;o=l?"."+l:c&&typeof c=="object"?c.props?"":Pe(c,""):c===!1?"":c}return r+a+(o??"")},"");function pt(e){let t=this||{},n=e.call?e(t.p):e;return oo(n.unshift?n.raw?io(n,[].slice.call(arguments,1),t.p):n.reduce((r,a)=>Object.assign(r,a&&a.call?a(t.p):a),{}):n,ro(t.target),t.g,t.o,t.k)}let nr,Rt,Yt;pt.bind({g:1});let Te=pt.bind({k:1});function co(e,t,n,r){Pe.p=t,nr=e,Rt=n,Yt=r}function Ae(e,t){let n=this||{};return function(){let r=arguments;function a(s,o){let c=Object.assign({},s),l=c.className||a.className;n.p=Object.assign({theme:Rt&&Rt()},c),n.o=/ *go\d+/.test(l),c.className=pt.apply(n,r)+(l?" "+l:"");let u=e;return e[0]&&(u=c.as||e,delete c.as),Yt&&u[0]&&Yt(c),nr(u,c)}return a}}var lo=e=>typeof e=="function",yt=(e,t)=>lo(e)?e(t):e,uo=(()=>{let e=0;return()=>(++e).toString()})(),rr=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),fo=20,Zt="default",ar=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:r}=t;return ar(e,{type:e.toasts.find(o=>o.id===r.id)?1:0,toast:r});case 3:let{toastId:a}=t;return{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},vt=[],sr={toasts:[],pausedAt:void 0,settings:{toastLimit:fo}},Se={},or=(e,t=Zt)=>{Se[t]=ar(Se[t]||sr,e),vt.forEach(([n,r])=>{n===t&&r(Se[t])})},ir=e=>Object.keys(Se).forEach(t=>or(e,t)),_o=e=>Object.keys(Se).find(t=>Se[t].toasts.some(n=>n.id===e)),kt=(e=Zt)=>t=>{or(t,e)},go={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},mo=(e={},t=Zt)=>{let[n,r]=m.useState(Se[t]||sr),a=m.useRef(Se[t]);m.useEffect(()=>(a.current!==Se[t]&&r(Se[t]),vt.push([t,r]),()=>{let o=vt.findIndex(([c])=>c===t);o>-1&&vt.splice(o,1)}),[t]);let s=n.toasts.map(o=>{var c,l,u;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((c=e[o.type])==null?void 0:c.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((l=e[o.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||go[o.type],style:{...e.style,...(u=e[o.type])==null?void 0:u.style,...o.style}}});return{...n,toasts:s}},ho=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||uo()}),tt=e=>(t,n)=>{let r=ho(t,e,n);return kt(r.toasterId||_o(r.id))({type:2,toast:r}),r.id},re=(e,t)=>tt("blank")(e,t);re.error=tt("error"),re.success=tt("success"),re.loading=tt("loading"),re.custom=tt("custom"),re.dismiss=(e,t)=>{let n={type:3,toastId:e};t?kt(t)(n):ir(n)},re.dismissAll=e=>re.dismiss(void 0,e),re.remove=(e,t)=>{let n={type:4,toastId:e};t?kt(t)(n):ir(n)},re.removeAll=e=>re.remove(void 0,e),re.promise=(e,t,n)=>{let r=re.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(a=>{let s=t.success?yt(t.success,a):void 0;return s?re.success(s,{id:r,...n,...n==null?void 0:n.success}):re.dismiss(r),a}).catch(a=>{let s=t.error?yt(t.error,a):void 0;s?re.error(s,{id:r,...n,...n==null?void 0:n.error}):re.dismiss(r)}),e};var po=1e3,yo=(e,t="default")=>{let{toasts:n,pausedAt:r}=mo(e,t),a=m.useRef(new Map).current,s=m.useCallback((d,_=po)=>{if(a.has(d))return;let p=setTimeout(()=>{a.delete(d),o({type:4,toastId:d})},_);a.set(d,p)},[]);m.useEffect(()=>{if(r)return;let d=Date.now(),_=n.map(p=>{if(p.duration===1/0)return;let g=(p.duration||0)+p.pauseDuration-(d-p.createdAt);if(g<0){p.visible&&re.dismiss(p.id);return}return setTimeout(()=>re.dismiss(p.id,t),g)});return()=>{_.forEach(p=>p&&clearTimeout(p))}},[n,r,t]);let o=m.useCallback(kt(t),[t]),c=m.useCallback(()=>{o({type:5,time:Date.now()})},[o]),l=m.useCallback((d,_)=>{o({type:1,toast:{id:d,height:_}})},[o]),u=m.useCallback(()=>{r&&o({type:6,time:Date.now()})},[r,o]),f=m.useCallback((d,_)=>{let{reverseOrder:p=!1,gutter:g=8,defaultPosition:h}=_||{},v=n.filter(k=>(k.position||h)===(d.position||h)&&k.height),b=v.findIndex(k=>k.id===d.id),S=v.filter((k,w)=>w<b&&k.visible).length;return v.filter(k=>k.visible).slice(...p?[S+1]:[0,S]).reduce((k,w)=>k+(w.height||0)+g,0)},[n]);return m.useEffect(()=>{n.forEach(d=>{if(d.dismissed)s(d.id,d.removeDelay);else{let _=a.get(d.id);_&&(clearTimeout(_),a.delete(d.id))}})},[n,s]),{toasts:n,handlers:{updateHeight:l,startPause:c,endPause:u,calculateOffset:f}}},vo=Te`
|
|
2
2
|
from {
|
|
3
3
|
transform: scale(0) rotate(45deg);
|
|
4
4
|
opacity: 0;
|
|
@@ -6,7 +6,7 @@ from {
|
|
|
6
6
|
to {
|
|
7
7
|
transform: scale(1) rotate(45deg);
|
|
8
8
|
opacity: 1;
|
|
9
|
-
}`,
|
|
9
|
+
}`,ko=Te`
|
|
10
10
|
from {
|
|
11
11
|
transform: scale(0);
|
|
12
12
|
opacity: 0;
|
|
@@ -14,7 +14,7 @@ from {
|
|
|
14
14
|
to {
|
|
15
15
|
transform: scale(1);
|
|
16
16
|
opacity: 1;
|
|
17
|
-
}`,
|
|
17
|
+
}`,Co=Te`
|
|
18
18
|
from {
|
|
19
19
|
transform: scale(0) rotate(90deg);
|
|
20
20
|
opacity: 0;
|
|
@@ -22,7 +22,7 @@ from {
|
|
|
22
22
|
to {
|
|
23
23
|
transform: scale(1) rotate(90deg);
|
|
24
24
|
opacity: 1;
|
|
25
|
-
}`,
|
|
25
|
+
}`,bo=Ae("div")`
|
|
26
26
|
width: 20px;
|
|
27
27
|
opacity: 0;
|
|
28
28
|
height: 20px;
|
|
@@ -31,14 +31,14 @@ to {
|
|
|
31
31
|
position: relative;
|
|
32
32
|
transform: rotate(45deg);
|
|
33
33
|
|
|
34
|
-
animation: ${
|
|
34
|
+
animation: ${vo} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
35
35
|
forwards;
|
|
36
36
|
animation-delay: 100ms;
|
|
37
37
|
|
|
38
38
|
&:after,
|
|
39
39
|
&:before {
|
|
40
40
|
content: '';
|
|
41
|
-
animation: ${
|
|
41
|
+
animation: ${ko} 0.15s ease-out forwards;
|
|
42
42
|
animation-delay: 150ms;
|
|
43
43
|
position: absolute;
|
|
44
44
|
border-radius: 3px;
|
|
@@ -51,18 +51,18 @@ to {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
&:before {
|
|
54
|
-
animation: ${
|
|
54
|
+
animation: ${Co} 0.15s ease-out forwards;
|
|
55
55
|
animation-delay: 180ms;
|
|
56
56
|
transform: rotate(90deg);
|
|
57
57
|
}
|
|
58
|
-
`,
|
|
58
|
+
`,xo=Te`
|
|
59
59
|
from {
|
|
60
60
|
transform: rotate(0deg);
|
|
61
61
|
}
|
|
62
62
|
to {
|
|
63
63
|
transform: rotate(360deg);
|
|
64
64
|
}
|
|
65
|
-
`,
|
|
65
|
+
`,So=Ae("div")`
|
|
66
66
|
width: 12px;
|
|
67
67
|
height: 12px;
|
|
68
68
|
box-sizing: border-box;
|
|
@@ -70,8 +70,8 @@ to {
|
|
|
70
70
|
border-radius: 100%;
|
|
71
71
|
border-color: ${e=>e.secondary||"#e0e0e0"};
|
|
72
72
|
border-right-color: ${e=>e.primary||"#616161"};
|
|
73
|
-
animation: ${
|
|
74
|
-
`,
|
|
73
|
+
animation: ${xo} 1s linear infinite;
|
|
74
|
+
`,Eo=Te`
|
|
75
75
|
from {
|
|
76
76
|
transform: scale(0) rotate(45deg);
|
|
77
77
|
opacity: 0;
|
|
@@ -79,7 +79,7 @@ from {
|
|
|
79
79
|
to {
|
|
80
80
|
transform: scale(1) rotate(45deg);
|
|
81
81
|
opacity: 1;
|
|
82
|
-
}`,
|
|
82
|
+
}`,wo=Te`
|
|
83
83
|
0% {
|
|
84
84
|
height: 0;
|
|
85
85
|
width: 0;
|
|
@@ -93,7 +93,7 @@ to {
|
|
|
93
93
|
100% {
|
|
94
94
|
opacity: 1;
|
|
95
95
|
height: 10px;
|
|
96
|
-
}`,
|
|
96
|
+
}`,Fo=Ae("div")`
|
|
97
97
|
width: 20px;
|
|
98
98
|
opacity: 0;
|
|
99
99
|
height: 20px;
|
|
@@ -102,13 +102,13 @@ to {
|
|
|
102
102
|
position: relative;
|
|
103
103
|
transform: rotate(45deg);
|
|
104
104
|
|
|
105
|
-
animation: ${
|
|
105
|
+
animation: ${Eo} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
106
106
|
forwards;
|
|
107
107
|
animation-delay: 100ms;
|
|
108
108
|
&:after {
|
|
109
109
|
content: '';
|
|
110
110
|
box-sizing: border-box;
|
|
111
|
-
animation: ${
|
|
111
|
+
animation: ${wo} 0.2s ease-out forwards;
|
|
112
112
|
opacity: 0;
|
|
113
113
|
animation-delay: 200ms;
|
|
114
114
|
position: absolute;
|
|
@@ -120,16 +120,16 @@ to {
|
|
|
120
120
|
height: 10px;
|
|
121
121
|
width: 6px;
|
|
122
122
|
}
|
|
123
|
-
`,
|
|
123
|
+
`,No=Ae("div")`
|
|
124
124
|
position: absolute;
|
|
125
|
-
`,
|
|
125
|
+
`,To=Ae("div")`
|
|
126
126
|
position: relative;
|
|
127
127
|
display: flex;
|
|
128
128
|
justify-content: center;
|
|
129
129
|
align-items: center;
|
|
130
130
|
min-width: 20px;
|
|
131
131
|
min-height: 20px;
|
|
132
|
-
`,
|
|
132
|
+
`,Oo=Te`
|
|
133
133
|
from {
|
|
134
134
|
transform: scale(0.6);
|
|
135
135
|
opacity: 0.4;
|
|
@@ -137,20 +137,20 @@ from {
|
|
|
137
137
|
to {
|
|
138
138
|
transform: scale(1);
|
|
139
139
|
opacity: 1;
|
|
140
|
-
}`,
|
|
140
|
+
}`,Po=Ae("div")`
|
|
141
141
|
position: relative;
|
|
142
142
|
transform: scale(0.6);
|
|
143
143
|
opacity: 0.4;
|
|
144
144
|
min-width: 20px;
|
|
145
|
-
animation: ${
|
|
145
|
+
animation: ${Oo} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
146
146
|
forwards;
|
|
147
|
-
`,
|
|
147
|
+
`,Ao=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?ie.createElement(Po,null,t):t:n==="blank"?null:ie.createElement(To,null,ie.createElement(So,{...r}),n!=="loading"&&ie.createElement(No,null,n==="error"?ie.createElement(bo,{...r}):ie.createElement(Fo,{...r})))},Io=e=>`
|
|
148
148
|
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
|
149
149
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
150
|
-
`,
|
|
150
|
+
`,Mo=e=>`
|
|
151
151
|
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
152
152
|
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
153
|
-
`,
|
|
153
|
+
`,Do="0%{opacity:0;} 100%{opacity:1;}",$o="0%{opacity:1;} 100%{opacity:0;}",Lo=Ae("div")`
|
|
154
154
|
display: flex;
|
|
155
155
|
align-items: center;
|
|
156
156
|
background: #fff;
|
|
@@ -162,22 +162,22 @@ to {
|
|
|
162
162
|
pointer-events: auto;
|
|
163
163
|
padding: 8px 10px;
|
|
164
164
|
border-radius: 8px;
|
|
165
|
-
`,
|
|
165
|
+
`,Bo=Ae("div")`
|
|
166
166
|
display: flex;
|
|
167
167
|
justify-content: center;
|
|
168
168
|
margin: 4px 10px;
|
|
169
169
|
color: inherit;
|
|
170
170
|
flex: 1 1 auto;
|
|
171
171
|
white-space: pre-line;
|
|
172
|
-
`,
|
|
172
|
+
`,zo=(e,t)=>{let n=e.includes("top")?1:-1,[r,a]=rr()?[Do,$o]:[Io(n),Mo(n)];return{animation:t?`${Te(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Te(a)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},jo=ie.memo(({toast:e,position:t,style:n,children:r})=>{let a=e.height?zo(e.position||t||"top-center",e.visible):{opacity:0},s=ie.createElement(Ao,{toast:e}),o=ie.createElement(Bo,{...e.ariaProps},yt(e.message,e));return ie.createElement(Lo,{className:e.className,style:{...a,...n,...e.style}},typeof r=="function"?r({icon:s,message:o}):ie.createElement(ie.Fragment,null,s,o))});co(ie.createElement);var Ho=({id:e,className:t,style:n,onHeightUpdate:r,children:a})=>{let s=ie.useCallback(o=>{if(o){let c=()=>{let l=o.getBoundingClientRect().height;r(e,l)};c(),new MutationObserver(c).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return ie.createElement("div",{ref:s,className:t,style:n},a)},Go=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},a=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:rr()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...a}},Vo=pt`
|
|
173
173
|
z-index: 9999;
|
|
174
174
|
> * {
|
|
175
175
|
pointer-events: auto;
|
|
176
176
|
}
|
|
177
|
-
`,Ct=16
|
|
177
|
+
`,Ct=16,Uo=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:a,toasterId:s,containerStyle:o,containerClassName:c})=>{let{toasts:l,handlers:u}=yo(n,s);return ie.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:Ct,left:Ct,right:Ct,bottom:Ct,pointerEvents:"none",...o},className:c,onMouseEnter:u.startPause,onMouseLeave:u.endPause},l.map(f=>{let d=f.position||t,_=u.calculateOffset(f,{reverseOrder:e,gutter:r,defaultPosition:t}),p=Go(d,_);return ie.createElement(Ho,{id:f.id,key:f.id,onHeightUpdate:u.updateHeight,className:f.visible?Vo:"",style:p},f.type==="custom"?yt(f.message,f):a?a(f):ie.createElement(jo,{toast:f,position:d}))}))},cr=re;const qo=m.createContext({});function Wo({children:e}){function t(n){switch(n.type){case"success":return cr.success(n.message,{style:{background:"#10B981",color:"#ffffff",padding:"12px 16px",fontSize:"14px",fontWeight:600},iconTheme:{primary:"#059669",secondary:"#ffffff"}});case"danger":return cr.error(n.message,{style:{background:"#E11D48",color:"#ffffff",padding:"12px 16px",fontSize:"14px",fontWeight:600},iconTheme:{primary:"#BE123C",secondary:"#ffffff"}})}}return i.jsxs(qo.Provider,{value:{showToast:t},children:[i.jsx(Uo,{position:"top-right",containerStyle:{zIndex:999999999999999}}),e]})}/*!
|
|
178
178
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
179
179
|
*
|
|
180
180
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
181
181
|
* Released under the MIT License.
|
|
182
|
-
*/function lr(e){return Object.prototype.toString.call(e)==="[object Object]"}function oe(e){var t,n;return lr(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(lr(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var ur=Symbol.for("immer-nothing"),fr=Symbol.for("immer-draftable"),me=Symbol.for("immer-state"),jo=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function ue(e,...t){if(process.env.NODE_ENV!=="production"){const n=jo[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ye=Object.getPrototypeOf;function je(e){return!!e&&!!e[me]}function ze(e){var t;return e?dr(e)||Array.isArray(e)||!!e[fr]||!!((t=e.constructor)!=null&&t[fr])||nt(e)||Et(e):!1}var zo=Object.prototype.constructor.toString();function dr(e){if(!e||typeof e!="object")return!1;const t=Ye(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===zo}function bt(e,t){xt(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function xt(e){const t=e[me];return t?t.type_:Array.isArray(e)?1:nt(e)?2:Et(e)?3:0}function Zt(e,t){return xt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function _r(e,t,n){const r=xt(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Ho(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function nt(e){return e instanceof Map}function Et(e){return e instanceof Set}function He(e){return e.copy_||e.base_}function Jt(e,t){if(nt(e))return new Map(e);if(Et(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=dr(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[me];let a=Reflect.ownKeys(r);for(let s=0;s<a.length;s++){const o=a[s],i=r[o];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Ye(e),r)}else{const r=Ye(e);if(r!==null&&n)return{...e};const a=Object.create(r);return Object.assign(a,e)}}function Qt(e,t=!1){return St(e)||je(e)||!ze(e)||(xt(e)>1&&Object.defineProperties(e,{set:{value:wt},add:{value:wt},clear:{value:wt},delete:{value:wt}}),Object.freeze(e),t&&Object.values(e).forEach(n=>Qt(n,!0))),e}function wt(){ue(2)}function St(e){return Object.isFrozen(e)}var Go={};function Ge(e){const t=Go[e];return t||ue(0,e),t}var rt;function gr(){return rt}function Uo(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function mr(e,t){t&&(Ge("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function en(e){tn(e),e.drafts_.forEach(Vo),e.drafts_=null}function tn(e){e===rt&&(rt=e.parent_)}function hr(e){return rt=Uo(rt,e)}function Vo(e){const t=e[me];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function pr(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[me].modified_&&(en(t),ue(4)),ze(e)&&(e=Ft(t,e),t.parent_||Nt(t,e)),t.patches_&&Ge("Patches").generateReplacementPatches_(n[me].base_,e,t.patches_,t.inversePatches_)):e=Ft(t,n,[]),en(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ur?e:void 0}function Ft(e,t,n){if(St(t))return t;const r=t[me];if(!r)return bt(t,(a,s)=>yr(e,r,t,a,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Nt(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const a=r.copy_;let s=a,o=!1;r.type_===3&&(s=new Set(a),a.clear(),o=!0),bt(s,(i,l)=>yr(e,r,a,i,l,n,o)),Nt(e,a,!1),n&&e.patches_&&Ge("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function yr(e,t,n,r,a,s,o){if(process.env.NODE_ENV!=="production"&&a===n&&ue(5),je(a)){const i=s&&t&&t.type_!==3&&!Zt(t.assigned_,r)?s.concat(r):void 0,l=Ft(e,a,i);if(_r(n,r,l),je(l))e.canAutoFreeze_=!1;else return}else o&&n.add(a);if(ze(a)&&!St(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ft(e,a),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(nt(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Nt(e,a)}}function Nt(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Qt(t,n)}function qo(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:gr(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,s=nn;n&&(a=[r],s=at);const{revoke:o,proxy:i}=Proxy.revocable(a,s);return r.draft_=i,r.revoke_=o,i}var nn={get(e,t){if(t===me)return e;const n=He(e);if(!Zt(n,t))return Wo(e,n,t);const r=n[t];return e.finalized_||!ze(r)?r:r===rn(e.base_,t)?(sn(e),e.copy_[t]=on(r,e)):r},has(e,t){return t in He(e)},ownKeys(e){return Reflect.ownKeys(He(e))},set(e,t,n){const r=vr(He(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=rn(He(e),t),s=a==null?void 0:a[me];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Ho(n,a)&&(n!==void 0||Zt(e.base_,t)))return!0;sn(e),an(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return rn(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,sn(e),an(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=He(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ue(11)},getPrototypeOf(e){return Ye(e.base_)},setPrototypeOf(){ue(12)}},at={};bt(nn,(e,t)=>{at[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),at.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&ue(13),at.set.call(this,e,t,void 0)},at.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&ue(14),nn.set.call(this,e[0],t,n,e[0])};function rn(e,t){const n=e[me];return(n?He(n):e)[t]}function Wo(e,t,n){var a;const r=vr(t,n);return r?"value"in r?r.value:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function vr(e,t){if(!(t in e))return;let n=Ye(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ye(n)}}function an(e){e.modified_||(e.modified_=!0,e.parent_&&an(e.parent_))}function sn(e){e.copy_||(e.copy_=Jt(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ro=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const o=this;return function(l=s,...u){return o.produce(l,f=>n.call(this,f,...u))}}typeof n!="function"&&ue(6),r!==void 0&&typeof r!="function"&&ue(7);let a;if(ze(t)){const s=hr(this),o=on(t,void 0);let i=!0;try{a=n(o),i=!1}finally{i?en(s):tn(s)}return mr(s,r),pr(a,s)}else if(!t||typeof t!="object"){if(a=n(t),a===void 0&&(a=t),a===ur&&(a=void 0),this.autoFreeze_&&Qt(a,!0),r){const s=[],o=[];Ge("Patches").generateReplacementPatches_(t,a,s,o),r(s,o)}return a}else ue(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...i)=>this.produceWithPatches(o,l=>t(l,...i));let r,a;return[this.produce(t,n,(o,i)=>{r=o,a=i}),r,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ze(e)||ue(8),je(e)&&(e=Xo(e));const t=hr(this),n=on(e,void 0);return n[me].isManual_=!0,tn(t),n}finishDraft(e,t){const n=e&&e[me];(!n||!n.isManual_)&&ue(9);const{scope_:r}=n;return mr(r,t),pr(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));const r=Ge("Patches").applyPatches_;return je(e)?r(e,t):this.produce(e,a=>r(a,t))}};function on(e,t){const n=nt(e)?Ge("MapSet").proxyMap_(e,t):Et(e)?Ge("MapSet").proxySet_(e,t):qo(e,t);return(t?t.scope_:gr()).drafts_.push(n),n}function Xo(e){return je(e)||ue(10,e),kr(e)}function kr(e){if(!ze(e)||St(e))return e;const t=e[me];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Jt(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Jt(e,!0);return bt(n,(r,a)=>{_r(n,r,kr(a))}),t&&(t.finalized_=!1),n}var st=new Ro,cn=st.produce,Cr=st.createDraft.bind(st),br=st.finishDraft.bind(st),y={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=y.levels(e,t);return n?r=r.slice(1):r=r.slice(0,-1),r},common(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var a=e[r],s=t[r];if(a!==s)break;n.push(a)}return n},compare(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),a=t.slice(0,n),s=e[n],o=t[n];return y.equals(r,a)&&s>o},endsAt(e,t){var n=e.length,r=e.slice(0,n),a=t.slice(0,n);return y.equals(r,a)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),a=t.slice(0,n),s=e[n],o=t[n];return y.equals(r,a)&&s<o},equals(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return y.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&y.compare(e,t)===0},isBefore(e,t){return y.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&y.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&y.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&y.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&y.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1),a=e[e.length-1],s=t[t.length-1];return a!==s&&y.equals(n,r)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=[],a=0;a<=e.length;a++)r.push(e.slice(0,a));return n&&r.reverse(),r},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!y.isAncestor(t,e)&&!y.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return null;var r=[...e],{affinity:a="forward"}=n;if(e.length===0)return r;switch(t.type){case"insert_node":{var{path:s}=t;(y.equals(s,r)||y.endsBefore(s,r)||y.isAncestor(s,r))&&(r[s.length-1]+=1);break}case"remove_node":{var{path:o}=t;if(y.equals(o,r)||y.isAncestor(o,r))return null;y.endsBefore(o,r)&&(r[o.length-1]-=1);break}case"merge_node":{var{path:i,position:l}=t;y.equals(i,r)||y.endsBefore(i,r)?r[i.length-1]-=1:y.isAncestor(i,r)&&(r[i.length-1]-=1,r[i.length]+=l);break}case"split_node":{var{path:u,position:f}=t;if(y.equals(u,r)){if(a==="forward")r[r.length-1]+=1;else if(a!=="backward")return null}else y.endsBefore(u,r)?r[u.length-1]+=1:y.isAncestor(u,r)&&e[u.length]>=f&&(r[u.length-1]+=1,r[u.length]-=f);break}case"move_node":{var{path:d,newPath:_}=t;if(y.equals(d,_))return r;if(y.isAncestor(d,r)||y.equals(d,r)){var p=_.slice();return y.endsBefore(d,_)&&d.length<_.length&&(p[d.length-1]-=1),p.concat(r.slice(d.length))}else y.isSibling(d,_)&&(y.isAncestor(_,r)||y.equals(_,r))?y.endsBefore(d,r)?r[d.length-1]-=1:r[d.length-1]+=1:y.endsBefore(_,r)||y.equals(_,r)||y.isAncestor(_,r)?(y.endsBefore(d,r)&&(r[d.length-1]-=1),r[_.length-1]+=1):y.endsBefore(d,r)&&(y.equals(_,r)&&(r[_.length-1]+=1),r[d.length-1]-=1);break}}return r}};function ot(e){"@babel/helpers - typeof";return ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ot(e)}function Ko(e,t){if(ot(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ot(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yo(e){var t=Ko(e,"string");return ot(t)==="symbol"?t:String(t)}function Ze(e,t,n){return t=Yo(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function it(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xr(Object(n),!0).forEach(function(r){Ze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Zo=(e,t,n)=>{switch(n.type){case"insert_node":{var{path:r,node:a}=n,s=F.parent(e,r),o=r[r.length-1];if(o>s.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(s.children.splice(o,0,a),t)for(var[i,l]of D.points(t))t[l]=V.transform(i,n);break}case"insert_text":{var{path:u,offset:f,text:d}=n;if(d.length===0)break;var _=F.leaf(e,u),p=_.text.slice(0,f),g=_.text.slice(f);if(_.text=p+d+g,t)for(var[h,v]of D.points(t))t[v]=V.transform(h,n);break}case"merge_node":{var{path:b}=n,E=F.get(e,b),k=y.previous(b),S=F.get(e,k),U=F.parent(e,b),A=b[b.length-1];if(K.isText(E)&&K.isText(S))S.text+=E.text;else if(!K.isText(E)&&!K.isText(S))S.children.push(...E.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(b,"] to nodes of different interfaces: ").concat(Ee.stringify(E)," ").concat(Ee.stringify(S)));if(U.children.splice(A,1),t)for(var[N,H]of D.points(t))t[H]=V.transform(N,n);break}case"move_node":{var{path:M,newPath:x}=n;if(y.isAncestor(M,x))throw new Error("Cannot move a path [".concat(M,"] to new path [").concat(x,"] because the destination is inside itself."));var O=F.get(e,M),L=F.parent(e,M),I=M[M.length-1];L.children.splice(I,1);var G=y.transform(M,n),$=F.get(e,y.parent(G)),B=G[G.length-1];if($.children.splice(B,0,O),t)for(var[T,Z]of D.points(t))t[Z]=V.transform(T,n);break}case"remove_node":{var{path:w}=n,he=w[w.length-1],Y=F.parent(e,w);if(Y.children.splice(he,1),t)for(var[J,ke]of D.points(t)){var le=V.transform(J,n);if(t!=null&&le!=null)t[ke]=le;else{var ie=void 0,re=void 0;for(var[j,ae]of F.texts(e))if(y.compare(ae,w)===-1)ie=[j,ae];else{re=[j,ae];break}var Ne=!1;ie&&re&&(y.equals(re[1],w)?Ne=!y.hasPrevious(re[1]):Ne=y.common(ie[1],w).length<y.common(re[1],w).length),ie&&!Ne?(J.path=ie[1],J.offset=ie[0].text.length):re?(J.path=re[1],J.offset=0):t=null}}break}case"remove_text":{var{path:De,offset:be,text:W}=n;if(W.length===0)break;var se=F.leaf(e,De),Me=se.text.slice(0,be),Fn=se.text.slice(be+W.length);if(se.text=Me+Fn,t)for(var[de,$e]of D.points(t))t[$e]=V.transform(de,n);break}case"set_node":{var{path:qe,properties:yc,newProperties:Nn}=n;if(qe.length===0)throw new Error("Cannot set properties on the root node!");var Tn=F.get(e,qe);for(var Je in Nn){if(Je==="children"||Je==="text")throw new Error('Cannot set the "'.concat(Je,'" property of nodes!'));var ya=Nn[Je];ya==null?delete Tn[Je]:Tn[Je]=ya}for(var va in yc)Nn.hasOwnProperty(va)||delete Tn[va];break}case"set_selection":{var{newProperties:We}=n;if(We==null)t=We;else{if(t==null){if(!D.isRange(We))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Ee.stringify(We)," when there is no current selection."));t=it({},We)}for(var Qe in We){var ka=We[Qe];if(ka==null){if(Qe==="anchor"||Qe==="focus")throw new Error('Cannot remove the "'.concat(Qe,'" selection property'));delete t[Qe]}else t[Qe]=ka}}break}case"split_node":{var{path:et,position:Gt,properties:Ca}=n;if(et.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(et,"] because the root node cannot be split."));var Re=F.get(e,et),vc=F.parent(e,et),kc=et[et.length-1],On;if(K.isText(Re)){var Cc=Re.text.slice(0,Gt),bc=Re.text.slice(Gt);Re.text=Cc,On=it(it({},Ca),{},{text:bc})}else{var xc=Re.children.slice(0,Gt),Ec=Re.children.slice(Gt);Re.children=xc,On=it(it({},Ca),{},{children:Ec})}if(vc.children.splice(kc+1,0,On),t)for(var[wc,Sc]of D.points(t))t[Sc]=V.transform(wc,n);break}}return t},Jo={transform(e,t){e.children=Cr(e.children);var n=e.selection&&Cr(e.selection);try{n=Zo(e,n,t)}finally{e.children=br(e.children),n?e.selection=je(n)?br(n):n:e.selection=null}}},Qo={insertNodes(e,t,n){e.insertNodes(t,n)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,n){e.setNodes(t,n)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,n){e.unsetNodes(t,n)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,n){e.wrapNodes(t,n)}},ei={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,n){e.setPoint(t,n)},setSelection(e,t){e.setSelection(t)}},Er=(e,t)=>{for(var n in e){var r=e[n],a=t[n];if(oe(r)&&oe(a)){if(!Er(r,a))return!1}else if(Array.isArray(r)&&Array.isArray(a)){if(r.length!==a.length)return!1;for(var s=0;s<r.length;s++)if(r[s]!==a[s])return!1}else if(r!==a)return!1}for(var o in t)if(e[o]===void 0&&t[o]!==void 0)return!1;return!0};function ti(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,s;for(s=0;s<r.length;s++)a=r[s],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function ct(e,t){if(e==null)return{};var n=ti(e,t),r,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)r=s[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var ni=["anchor","focus"];function wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ri(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wr(Object(n),!0).forEach(function(r){Ze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var D={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:a}=e;return D.isBackward(e)===n?[r,a]:[a,r]},end(e){var[,t]=D.edges(e);return t},equals(e,t){return V.equals(e.anchor,t.anchor)&&V.equals(e.focus,t.focus)},includes(e,t){if(D.isRange(t)){if(D.includes(e,t.anchor)||D.includes(e,t.focus))return!0;var[n,r]=D.edges(e),[a,s]=D.edges(t);return V.isBefore(n,a)&&V.isAfter(r,s)}var[o,i]=D.edges(e),l=!1,u=!1;return V.isPoint(t)?(l=V.compare(t,o)>=0,u=V.compare(t,i)<=0):(l=y.compare(t,o.path)>=0,u=y.compare(t,i.path)<=0),l&&u},intersection(e,t){var n=ct(e,ni),[r,a]=D.edges(e),[s,o]=D.edges(t),i=V.isBefore(r,s)?s:r,l=V.isBefore(a,o)?a:o;return V.isBefore(l,i)?null:ri({anchor:i,focus:l},n)},isBackward(e){var{anchor:t,focus:n}=e;return V.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return V.equals(t,n)},isExpanded(e){return!D.isCollapsed(e)},isForward(e){return!D.isBackward(e)},isRange(e){return oe(e)&&V.isPoint(e.anchor)&&V.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=D.edges(e);return t},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return cn(e,r=>{if(r===null)return null;var{affinity:a="inward"}=n,s,o;if(a==="inward"){var i=D.isCollapsed(r);D.isForward(r)?(s="forward",o=i?s:"backward"):(s="backward",o=i?s:"forward")}else a==="outward"?D.isForward(r)?(s="backward",o="forward"):(s="forward",o="backward"):(s=a,o=a);var l=V.transform(r.anchor,t,{affinity:s}),u=V.transform(r.focus,t,{affinity:o});if(!l||!u)return null;r.anchor=l,r.focus=u})}},Sr=e=>oe(e)&&F.isNodeList(e.children)&&!ve.isEditor(e),Pe={isAncestor(e){return oe(e)&&F.isNodeList(e.children)},isElement:Sr,isElementList(e){return Array.isArray(e)&&e.every(t=>Pe.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return Sr(t)&&t[r]===n},matches(e,t){for(var n in t)if(n!=="children"&&e[n]!==t[n])return!1;return!0}},ai=["children"],si=["text"],Fr=new WeakMap,F={ancestor(e,t){var n=F.get(e,t);if(K.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Ee.stringify(n)));return n},ancestors(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of y.ancestors(t,n)){var a=F.ancestor(e,r),s=[a,r];yield s}}()},child(e,t){if(K.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Ee.stringify(e)));var n=e.children[t];if(n==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Ee.stringify(e)));return n},children(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:r=!1}=n,a=F.ancestor(e,t),{children:s}=a,o=r?s.length-1:0;r?o>=0:o<s.length;){var i=F.child(a,o),l=t.concat(o);yield[i,l],o=r?o-1:o+1}}()},common(e,t,n){var r=y.common(t,n),a=F.get(e,r);return[a,r]},descendant(e,t){var n=F.get(e,t);if(ve.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Ee.stringify(n)));return n},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of F.nodes(e,t))r.length!==0&&(yield[n,r])}()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of F.nodes(e,t))Pe.isElement(n)&&(yield[n,r])}()},extractProps(e){if(Pe.isAncestor(e)){var t=ct(e,ai);return t}else{var t=ct(e,si);return t}},first(e,t){for(var n=t.slice(),r=F.get(e,n);r&&!(K.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if(K.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Ee.stringify(e)));var n=cn({children:e.children},r=>{var[a,s]=D.edges(t),o=F.nodes(r,{reverse:!0,pass:_=>{var[,p]=_;return!D.includes(t,p)}});for(var[,i]of o){if(!D.includes(t,i)){var l=F.parent(r,i),u=i[i.length-1];l.children.splice(u,1)}if(y.equals(i,s.path)){var f=F.leaf(r,i);f.text=f.text.slice(0,s.offset)}if(y.equals(i,a.path)){var d=F.leaf(r,i);d.text=d.text.slice(a.offset)}}ve.isEditor(r)&&(r.selection=null)});return n.children},get(e,t){for(var n=e,r=0;r<t.length;r++){var a=t[r];if(K.isText(n)||!n.children[a])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Ee.stringify(e)));n=n.children[a]}return n},has(e,t){for(var n=e,r=0;r<t.length;r++){var a=t[r];if(K.isText(n)||!n.children[a])return!1;n=n.children[a]}return!0},isNode(e){return K.isText(e)||Pe.isElement(e)||ve.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=Fr.get(e);if(t!==void 0)return t;var n=e.every(r=>F.isNode(r));return Fr.set(e,n),n},last(e,t){for(var n=t.slice(),r=F.get(e,n);r&&!(K.isText(r)||r.children.length===0);){var a=r.children.length-1;r=r.children[a],n.push(a)}return[r,n]},leaf(e,t){var n=F.get(e,t);if(!K.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Ee.stringify(n)));return n},levels(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of y.levels(t,n)){var a=F.get(e,r);yield[a,r]}}()},matches(e,t){return Pe.isElement(e)&&Pe.isElementProps(t)&&Pe.matches(e,t)||K.isText(e)&&K.isTextProps(t)&&K.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:n,reverse:r=!1}=t,{from:a=[],to:s}=t,o=new Set,i=[],l=e;!(s&&(r?y.isBefore(i,s):y.isAfter(i,s)));){if(o.has(l)||(yield[l,i]),!o.has(l)&&!K.isText(l)&&l.children.length!==0&&(n==null||n([l,i])===!1)){o.add(l);var u=r?l.children.length-1:0;y.isAncestor(i,a)&&(u=a[i.length]),i=i.concat(u),l=F.get(e,i);continue}if(i.length===0)break;if(!r){var f=y.next(i);if(F.has(e,f)){i=f,l=F.get(e,i);continue}}if(r&&i[i.length-1]!==0){var d=y.previous(i);i=d,l=F.get(e,i);continue}i=y.parent(i),l=F.get(e,i),o.add(l)}}()},parent(e,t){var n=y.parent(t),r=F.get(e,n);if(K.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string(e){return K.isText(e)?e.text:e.children.map(F.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of F.nodes(e,t))K.isText(n)&&(yield[n,r])}()}};function Nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nr(Object(n),!0).forEach(function(r){Ze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var lt={isNodeOperation(e){return lt.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!oe(e))return!1;switch(e.type){case"insert_node":return y.isPath(e.path)&&F.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&y.isPath(e.path);case"merge_node":return typeof e.position=="number"&&y.isPath(e.path)&&oe(e.properties);case"move_node":return y.isPath(e.path)&&y.isPath(e.newPath);case"remove_node":return y.isPath(e.path)&&F.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&y.isPath(e.path);case"set_node":return y.isPath(e.path)&&oe(e.properties)&&oe(e.newProperties);case"set_selection":return e.properties===null&&D.isRange(e.newProperties)||e.newProperties===null&&D.isRange(e.properties)||oe(e.properties)&&oe(e.newProperties);case"split_node":return y.isPath(e.path)&&typeof e.position=="number"&&oe(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>lt.isOperation(t))},isSelectionOperation(e){return lt.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return lt.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return R(R({},e),{},{type:"remove_node"});case"insert_text":return R(R({},e),{},{type:"remove_text"});case"merge_node":return R(R({},e),{},{type:"split_node",path:y.previous(e.path)});case"move_node":{var{newPath:t,path:n}=e;if(y.equals(t,n))return e;if(y.isSibling(n,t))return R(R({},e),{},{path:t,newPath:n});var r=y.transform(n,e),a=y.transform(y.next(n),e);return R(R({},e),{},{path:r,newPath:a})}case"remove_node":return R(R({},e),{},{type:"insert_node"});case"remove_text":return R(R({},e),{},{type:"insert_text"});case"set_node":{var{properties:s,newProperties:o}=e;return R(R({},e),{},{properties:o,newProperties:s})}case"set_selection":{var{properties:i,newProperties:l}=e;return i==null?R(R({},e),{},{properties:l,newProperties:null}):l==null?R(R({},e),{},{properties:null,newProperties:i}):R(R({},e),{},{properties:l,newProperties:i})}case"split_node":return R(R({},e),{},{type:"merge_node",path:y.next(e.path)})}}},Tr=new WeakMap,oi=e=>{var t=Tr.get(e);if(t!==void 0)return t;if(!oe(e))return!1;var n=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertSoftBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isElementReadOnly=="function"&&typeof e.isInline=="function"&&typeof e.isSelectable=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&typeof e.getDirtyPaths=="function"&&(e.marks===null||oe(e.marks))&&(e.selection===null||D.isRange(e.selection))&&F.isNodeList(e.children)&<.isOperationList(e.operations);return Tr.set(e,n),n},ve={above(e,t){return e.above(t)},addMark(e,t,n){e.addMark(t,n)},after(e,t,n){return e.after(t,n)},before(e,t,n){return e.before(t,n)},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,n){e.insertFragment(t,n)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,n){return e.isEdge(t,n)},isEditor(e){return oi(e)},isElementReadOnly(e,t){return e.isElementReadOnly(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,n){return e.isEnd(t,n)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,n){return e.isStart(t,n)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,n){return e.leaf(t,n)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,n){return e.node(t,n)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,n){return e.parent(t,n)},path(e,t,n){return e.path(t,n)},pathRef(e,t,n){return e.pathRef(t,n)},pathRefs(e){return e.pathRefs()},point(e,t,n){return e.point(t,n)},pointRef(e,t,n){return e.pointRef(t,n)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,n){return e.range(t,n)},rangeRef(e,t,n){return e.rangeRef(t,n)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,n){return e.string(t,n)},unhangRange(e,t,n){return e.unhangRange(t,n)},void(e,t){return e.void(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,n)=>e.shouldMergeNodesRemovePrevNode(t,n)};function Or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Pr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Or(Object(n),!0).forEach(function(r){Ze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Or(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var V={compare(e,t){var n=y.compare(e.path,t.path);return n===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter(e,t){return V.compare(e,t)===1},isBefore(e,t){return V.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&y.equals(e.path,t.path)},isPoint(e){return oe(e)&&typeof e.offset=="number"&&y.isPath(e.path)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return cn(e,r=>{if(r===null)return null;var{affinity:a="forward"}=n,{path:s,offset:o}=r;switch(t.type){case"insert_node":case"move_node":{r.path=y.transform(s,t,n);break}case"insert_text":{y.equals(t.path,s)&&(t.offset<o||t.offset===o&&a==="forward")&&(r.offset+=t.text.length);break}case"merge_node":{y.equals(t.path,s)&&(r.offset+=t.position),r.path=y.transform(s,t,n);break}case"remove_text":{y.equals(t.path,s)&&t.offset<=o&&(r.offset-=Math.min(o-t.offset,t.text.length));break}case"remove_node":{if(y.equals(t.path,s)||y.isAncestor(t.path,s))return null;r.path=y.transform(s,t,n);break}case"split_node":{if(y.equals(t.path,s)){if(t.position===o&&a==null)return null;(t.position<o||t.position===o&&a==="forward")&&(r.offset-=t.position,r.path=y.transform(s,t,Pr(Pr({},n),{},{affinity:"forward"})))}else r.path=y.transform(s,t,n);break}}})}},Ar=void 0,Ee={setScrubber(e){Ar=e},stringify(e){return JSON.stringify(e,Ar)}},ii=["text"],ci=["anchor","focus"];function Ir(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ir(Object(n),!0).forEach(function(r){Ze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ir(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var K={equals(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function a(s){var o=ct(s,ii);return o}return Er(r?a(e):e,r?a(t):t)},isText(e){return oe(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>K.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var n in t)if(n!=="text"&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[Fe({},e)];for(var r of t){var a=ct(r,ci),[s,o]=D.edges(r),i=[],l=0,u=s.offset,f=o.offset;for(var d of n){var{length:_}=d.text,p=l;if(l+=_,u<=p&&l<=f){Object.assign(d,a),i.push(d);continue}if(u!==f&&(u===l||f===p)||u>l||f<p||f===p&&p!==0){i.push(d);continue}var g=d,h=void 0,v=void 0;if(f<l){var b=f-p;v=Fe(Fe({},g),{},{text:g.text.slice(b)}),g=Fe(Fe({},g),{},{text:g.text.slice(0,b)})}if(u>p){var E=u-p;h=Fe(Fe({},g),{},{text:g.text.slice(0,E)}),g=Fe(Fe({},g),{},{text:g.text.slice(E)})}Object.assign(g,a),h&&i.push(h),i.push(g),v&&i.push(v)}n=i}return n}},li=e=>e.selection?e.selection:e.children.length>0?ve.end(e,[]):[0],q;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(q||(q={})),q.L,q.L|q.V|q.LV|q.LVT,q.LV|q.V,q.V|q.T,q.LVT|q.T,q.T,q.Any,q.Extend|q.ZWJ,q.Any,q.SpacingMark,q.Prepend,q.Any,q.ZWJ,q.ExtPict,q.RI,q.RI;var ui={delete(e,t){e.delete(t)},insertFragment(e,t,n){e.insertFragment(t,n)},insertText(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ve.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:a=li(e)}=n;if(y.isPath(a)&&(a=ve.range(e,a)),D.isRange(a))if(D.isCollapsed(a))a=a.anchor;else{var s=D.end(a);if(!r&&ve.void(e,{at:s}))return;var o=D.start(a),i=ve.pointRef(e,o),l=ve.pointRef(e,s);Mr.delete(e,{at:a,voids:r});var u=i.unref(),f=l.unref();a=u||f,Mr.setSelection(e,{anchor:a,focus:a})}if(!(!r&&ve.void(e,{at:a})||ve.elementReadOnly(e,{at:a}))){var{path:d,offset:_}=a;t.length>0&&e.apply({type:"insert_text",path:d,offset:_,text:t})}})}};function Dr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Tt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dr(Object(n),!0).forEach(function(r){Ze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Mr=Tt(Tt(Tt(Tt({},Jo),Qo),ei),ui);function $r(e){if(K.isText(e)){let t=e==null?void 0:e.text;return e!=null&&e.bold&&(t=`<strong>${t}</strong>`),e!=null&&e.code&&(t=`<code>${t}</code>`),e!=null&&e.italic&&(t=`<em>${t}</em>`),e!=null&&e.underline&&(t=`<u>${t}</u>`),t}if(Pe.isElement(e)){const t=e.children.map(r=>$r(r)).join(""),n=e.align||"left";switch(e.type){case"image":return`<img src="${e.src}" class="align_${n}" />`;case"paragraph":return`<p class="align_${n}">${t}</p>`;case"blockQuote":return`<blockquote class="align_${n}">${t}</blockquote>`;case"bulletedList":return`<ul class="align_${n}">${t}</ul>`;case"headingOne":return`<h1 class="align_${n}">${t}</h1>`;case"headingTwo":return`<h2 class="align_${n}">${t}</h2>`;case"listItem":return`<li class="align_${n}">${t}</li>`;case"numberedList":return`<ol class="align_${n}">${t}</ol>`;default:return t}}return""}function ln(e){var r;if(typeof e=="string")return{text:e};const t=Array.isArray(e.props.children)?e.props.children.map(a=>ln(a)):[{text:e.props.children||""}],n=(r=e.props.className)==null?void 0:r.replace("align_","");switch(e.type){case"img":return{type:"image",align:n,src:e.props.src,children:[{text:""}]};case"p":return{type:"paragraph",align:n,children:t};case"blockquote":return{type:"blockQuote",align:n,children:t};case"ul":return{type:"bulletedList",align:n,children:t};case"ol":return{type:"numberedList",align:n,children:t};case"li":return{type:"listItem",align:n,children:t};case"h1":return{type:"headingOne",align:n,children:t};case"h2":return{type:"headingTwo",align:n,children:t};case"strong":return{text:e.props.children,bold:!0};case"code":return{text:e.props.children,code:!0};case"em":return{text:e.props.children,italic:!0};case"u":return{text:e.props.children,underline:!0};default:return{text:e.props.children||""}}}function fi(e){return e.map(t=>$r(t)).join("")}var Q=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function di(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lr={},un={},fn={},Ue={},dn={},_n={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(function(r){r.Root="root",r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype"})(t=e.ElementType||(e.ElementType={}));function n(r){return r.type===t.Tag||r.type===t.Script||r.type===t.Style}e.isTag=n,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})(_n);var P={},Ae=Q&&Q.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(r[s]=a[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ut=Q&&Q.__assign||function(){return ut=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},ut.apply(this,arguments)};Object.defineProperty(P,"__esModule",{value:!0}),P.cloneNode=P.hasChildren=P.isDocument=P.isDirective=P.isComment=P.isText=P.isCDATA=P.isTag=P.Element=P.Document=P.CDATA=P.NodeWithChildren=P.ProcessingInstruction=P.Comment=P.Text=P.DataNode=P.Node=void 0;var fe=_n,gn=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(t){this.parent=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(t){this.prev=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(t){this.next=t},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){return t===void 0&&(t=!1),mn(this,t)},e}();P.Node=gn;var Ot=function(e){Ae(t,e);function t(n){var r=e.call(this)||this;return r.data=n,r}return Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(n){this.data=n},enumerable:!1,configurable:!0}),t}(gn);P.DataNode=Ot;var Br=function(e){Ae(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=fe.ElementType.Text,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(Ot);P.Text=Br;var jr=function(e){Ae(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=fe.ElementType.Comment,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(Ot);P.Comment=jr;var zr=function(e){Ae(t,e);function t(n,r){var a=e.call(this,r)||this;return a.name=n,a.type=fe.ElementType.Directive,a}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(Ot);P.ProcessingInstruction=zr;var Pt=function(e){Ae(t,e);function t(n){var r=e.call(this)||this;return r.children=n,r}return Object.defineProperty(t.prototype,"firstChild",{get:function(){var n;return(n=this.children[0])!==null&&n!==void 0?n: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(n){this.children=n},enumerable:!1,configurable:!0}),t}(gn);P.NodeWithChildren=Pt;var Hr=function(e){Ae(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=fe.ElementType.CDATA,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(Pt);P.CDATA=Hr;var Gr=function(e){Ae(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=fe.ElementType.Root,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(Pt);P.Document=Gr;var Ur=function(e){Ae(t,e);function t(n,r,a,s){a===void 0&&(a=[]),s===void 0&&(s=n==="script"?fe.ElementType.Script:n==="style"?fe.ElementType.Style:fe.ElementType.Tag);var o=e.call(this,a)||this;return o.name=n,o.attribs=r,o.type=s,o}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(n){this.name=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var n=this;return Object.keys(this.attribs).map(function(r){var a,s;return{name:r,value:n.attribs[r],namespace:(a=n["x-attribsNamespace"])===null||a===void 0?void 0:a[r],prefix:(s=n["x-attribsPrefix"])===null||s===void 0?void 0:s[r]}})},enumerable:!1,configurable:!0}),t}(Pt);P.Element=Ur;function Vr(e){return(0,fe.isTag)(e)}P.isTag=Vr;function qr(e){return e.type===fe.ElementType.CDATA}P.isCDATA=qr;function Wr(e){return e.type===fe.ElementType.Text}P.isText=Wr;function Rr(e){return e.type===fe.ElementType.Comment}P.isComment=Rr;function Xr(e){return e.type===fe.ElementType.Directive}P.isDirective=Xr;function Kr(e){return e.type===fe.ElementType.Root}P.isDocument=Kr;function _i(e){return Object.prototype.hasOwnProperty.call(e,"children")}P.hasChildren=_i;function mn(e,t){t===void 0&&(t=!1);var n;if(Wr(e))n=new Br(e.data);else if(Rr(e))n=new jr(e.data);else if(Vr(e)){var r=t?hn(e.children):[],a=new Ur(e.name,ut({},e.attribs),r);r.forEach(function(l){return l.parent=a}),e.namespace!=null&&(a.namespace=e.namespace),e["x-attribsNamespace"]&&(a["x-attribsNamespace"]=ut({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(a["x-attribsPrefix"]=ut({},e["x-attribsPrefix"])),n=a}else if(qr(e)){var r=t?hn(e.children):[],s=new Hr(r);r.forEach(function(u){return u.parent=s}),n=s}else if(Kr(e)){var r=t?hn(e.children):[],o=new Gr(r);r.forEach(function(u){return u.parent=o}),e["x-mode"]&&(o["x-mode"]=e["x-mode"]),n=o}else if(Xr(e)){var i=new zr(e.name,e.data);e["x-name"]!=null&&(i["x-name"]=e["x-name"],i["x-publicId"]=e["x-publicId"],i["x-systemId"]=e["x-systemId"]),n=i}else throw new Error("Not implemented yet: ".concat(e.type));return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}P.cloneNode=mn;function hn(e){for(var t=e.map(function(r){return mn(r,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}(function(e){var t=Q&&Q.__createBinding||(Object.create?function(i,l,u,f){f===void 0&&(f=u);var d=Object.getOwnPropertyDescriptor(l,u);(!d||("get"in d?!l.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return l[u]}}),Object.defineProperty(i,f,d)}:function(i,l,u,f){f===void 0&&(f=u),i[f]=l[u]}),n=Q&&Q.__exportStar||function(i,l){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(l,u)&&t(l,i,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var r=_n,a=P;n(P,e);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},o=function(){function i(l,u,f){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof u=="function"&&(f=u,u=s),typeof l=="object"&&(u=l,l=void 0),this.callback=l??null,this.options=u??s,this.elementCB=f??null}return i.prototype.onparserinit=function(l){this.parser=l},i.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},i.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},i.prototype.onerror=function(l){this.handleCallback(l)},i.prototype.onclosetag=function(){this.lastNode=null;var l=this.tagStack.pop();this.options.withEndIndices&&(l.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(l)},i.prototype.onopentag=function(l,u){var f=this.options.xmlMode?r.ElementType.Tag:void 0,d=new a.Element(l,u,void 0,f);this.addNode(d),this.tagStack.push(d)},i.prototype.ontext=function(l){var u=this.lastNode;if(u&&u.type===r.ElementType.Text)u.data+=l,this.options.withEndIndices&&(u.endIndex=this.parser.endIndex);else{var f=new a.Text(l);this.addNode(f),this.lastNode=f}},i.prototype.oncomment=function(l){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=l;return}var u=new a.Comment(l);this.addNode(u),this.lastNode=u},i.prototype.oncommentend=function(){this.lastNode=null},i.prototype.oncdatastart=function(){var l=new a.Text(""),u=new a.CDATA([l]);this.addNode(u),l.parent=u,this.lastNode=l},i.prototype.oncdataend=function(){this.lastNode=null},i.prototype.onprocessinginstruction=function(l,u){var f=new a.ProcessingInstruction(l,u);this.addNode(f)},i.prototype.handleCallback=function(l){if(typeof this.callback=="function")this.callback(l,this.dom);else if(l)throw l},i.prototype.addNode=function(l){var u=this.tagStack[this.tagStack.length-1],f=u.children[u.children.length-1];this.options.withStartIndices&&(l.startIndex=this.parser.startIndex),this.options.withEndIndices&&(l.endIndex=this.parser.endIndex),u.children.push(l),f&&(l.prev=f,f.next=l),l.parent=u,this.lastNode=null},i}();e.DomHandler=o,e.default=o})(dn);var Yr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=e.CARRIAGE_RETURN_PLACEHOLDER=e.CARRIAGE_RETURN_REGEX=e.CARRIAGE_RETURN=e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.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"],e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce(function(t,n){return t[n.toLowerCase()]=n,t},{}),e.CARRIAGE_RETURN="\r",e.CARRIAGE_RETURN_REGEX=new RegExp(e.CARRIAGE_RETURN,"g"),e.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER,"g")})(Yr),Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.formatAttributes=Zr,Ue.escapeSpecialCharacters=hi,Ue.revertEscapedCharacters=Jr,Ue.formatDOM=Qr;var At=dn,ft=Yr;function gi(e){return ft.CASE_SENSITIVE_TAG_NAMES_MAP[e]}function Zr(e){for(var t={},n=0,r=e.length;n<r;n++){var a=e[n];t[a.name]=a.value}return t}function mi(e){e=e.toLowerCase();var t=gi(e);return t||e}function hi(e){return e.replace(ft.CARRIAGE_RETURN_REGEX,ft.CARRIAGE_RETURN_PLACEHOLDER)}function Jr(e){return e.replace(ft.CARRIAGE_RETURN_PLACEHOLDER_REGEX,ft.CARRIAGE_RETURN)}function Qr(e,t,n){t===void 0&&(t=null);for(var r=[],a,s=0,o=e.length;s<o;s++){var i=e[s];switch(i.nodeType){case 1:{var l=mi(i.nodeName);a=new At.Element(l,Zr(i.attributes)),a.children=Qr(l==="template"?i.content.childNodes:i.childNodes,a);break}case 3:a=new At.Text(Jr(i.nodeValue));break;case 8:a=new At.Comment(i.nodeValue);break;default:continue}var u=r[s-1]||null;u&&(u.next=a),a.parent=t,a.prev=u,a.next=null,r.push(a)}return n&&(a=new At.ProcessingInstruction(n.substring(0,n.indexOf(" ")).toLowerCase(),n),a.next=r[0]||null,a.parent=t,r.unshift(a),r[1]&&(r[1].prev=r[0])),r}Object.defineProperty(fn,"__esModule",{value:!0}),fn.default=Ci;var pi=Ue,ea="html",ta="head",It="body",yi=/<([a-zA-Z]+[0-9]?)/,na=/<head[^]*>/i,ra=/<body[^]*>/i,Dt=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},pn=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},aa=typeof window=="object"&&window.DOMParser;if(typeof aa=="function"){var vi=new aa,ki="text/html";pn=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),vi.parseFromString(e,ki)},Dt=pn}if(typeof document=="object"&&document.implementation){var Mt=document.implementation.createHTMLDocument();Dt=function(e,t){if(t){var n=Mt.documentElement.querySelector(t);return n&&(n.innerHTML=e),Mt}return Mt.documentElement.innerHTML=e,Mt}}var $t=typeof document=="object"&&document.createElement("template"),yn;$t&&$t.content&&(yn=function(e){return $t.innerHTML=e,$t.content.childNodes});function Ci(e){var t,n;e=(0,pi.escapeSpecialCharacters)(e);var r=e.match(yi),a=r&&r[1]?r[1].toLowerCase():"";switch(a){case ea:{var s=pn(e);if(!na.test(e)){var o=s.querySelector(ta);(t=o==null?void 0:o.parentNode)===null||t===void 0||t.removeChild(o)}if(!ra.test(e)){var o=s.querySelector(It);(n=o==null?void 0:o.parentNode)===null||n===void 0||n.removeChild(o)}return s.querySelectorAll(ea)}case ta:case It:{var i=Dt(e).querySelectorAll(a);return ra.test(e)&&na.test(e)?i[0].parentNode.childNodes:i}default:{if(yn)return yn(e);var o=Dt(e,It).querySelector(It);return o.childNodes}}}var bi=Q&&Q.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(un,"__esModule",{value:!0}),un.default=Si;var xi=bi(fn),Ei=Ue,wi=/<(![a-zA-Z\s]+)>/;function Si(e){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(wi),n=t?t[1]:void 0;return(0,Ei.formatDOM)((0,xi.default)(e),null,n)}var Lt={},Ce={},Bt={},Fi=0;Bt.SAME=Fi;var Ni=1;Bt.CAMELCASE=Ni,Bt.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};const sa=0,Ie=1,jt=2,zt=3,vn=4,oa=5,ia=6;function Ti(e){return ne.hasOwnProperty(e)?ne[e]:null}function ce(e,t,n,r,a,s,o){this.acceptsBooleans=t===jt||t===zt||t===vn,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}const ne={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(e=>{ne[e]=new ce(e,sa,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{ne[e]=new ce(e,Ie,!1,t,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(e=>{ne[e]=new ce(e,jt,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{ne[e]=new ce(e,jt,!1,e,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(e=>{ne[e]=new ce(e,zt,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(e=>{ne[e]=new ce(e,zt,!0,e,null,!1,!1)}),["capture","download"].forEach(e=>{ne[e]=new ce(e,vn,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(e=>{ne[e]=new ce(e,ia,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(e=>{ne[e]=new ce(e,oa,!1,e.toLowerCase(),null,!1,!1)});const kn=/[\-\:]([a-z])/g,Cn=e=>e[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(e=>{const t=e.replace(kn,Cn);ne[t]=new ce(t,Ie,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(kn,Cn);ne[t]=new ce(t,Ie,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(kn,Cn);ne[t]=new ce(t,Ie,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(e=>{ne[e]=new ce(e,Ie,!1,e.toLowerCase(),null,!1,!1)});const Oi="xlinkHref";ne[Oi]=new ce("xlinkHref",Ie,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(e=>{ne[e]=new ce(e,Ie,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:Pi,SAME:Ai,possibleStandardNames:ca}=Bt,Ii=":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",Di=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+Ii+"]*$")),Mi=Object.keys(ca).reduce((e,t)=>{const n=ca[t];return n===Ai?e[t]=t:n===Pi?e[t.toLowerCase()]=t:e[t]=n,e},{});Ce.BOOLEAN=zt,Ce.BOOLEANISH_STRING=jt,Ce.NUMERIC=oa,Ce.OVERLOADED_BOOLEAN=vn,Ce.POSITIVE_NUMERIC=ia,Ce.RESERVED=sa,Ce.STRING=Ie,Ce.getPropertyInfo=Ti,Ce.isCustomAttribute=Di,Ce.possibleStandardNames=Mi;var bn={},xn={},la=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$i=/\n/g,Li=/^\s*/,Bi=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ji=/^:\s*/,zi=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Hi=/^[;\s]*/,Gi=/^\s+|\s+$/g,Ui=`
|
|
183
|
-
`,ua="/",fa="*",
|
|
182
|
+
*/function lr(e){return Object.prototype.toString.call(e)==="[object Object]"}function le(e){var t,n;return lr(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(lr(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var ur=Symbol.for("immer-nothing"),fr=Symbol.for("immer-draftable"),ke=Symbol.for("immer-state"),Xo=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function ge(e,...t){if(process.env.NODE_ENV!=="production"){const n=Xo[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ye=Object.getPrototypeOf;function je(e){return!!e&&!!e[ke]}function He(e){var t;return e?dr(e)||Array.isArray(e)||!!e[fr]||!!((t=e.constructor)!=null&&t[fr])||nt(e)||St(e):!1}var Ko=Object.prototype.constructor.toString();function dr(e){if(!e||typeof e!="object")return!1;const t=Ye(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Ko}function bt(e,t){xt(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function xt(e){const t=e[ke];return t?t.type_:Array.isArray(e)?1:nt(e)?2:St(e)?3:0}function Jt(e,t){return xt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function _r(e,t,n){const r=xt(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Ro(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function nt(e){return e instanceof Map}function St(e){return e instanceof Set}function Ge(e){return e.copy_||e.base_}function Qt(e,t){if(nt(e))return new Map(e);if(St(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=dr(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ke];let a=Reflect.ownKeys(r);for(let s=0;s<a.length;s++){const o=a[s],c=r[o];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[o]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[o]})}return Object.create(Ye(e),r)}else{const r=Ye(e);if(r!==null&&n)return{...e};const a=Object.create(r);return Object.assign(a,e)}}function en(e,t=!1){return wt(e)||je(e)||!He(e)||(xt(e)>1&&Object.defineProperties(e,{set:{value:Et},add:{value:Et},clear:{value:Et},delete:{value:Et}}),Object.freeze(e),t&&Object.values(e).forEach(n=>en(n,!0))),e}function Et(){ge(2)}function wt(e){return Object.isFrozen(e)}var Yo={};function Ve(e){const t=Yo[e];return t||ge(0,e),t}var rt;function gr(){return rt}function Zo(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function mr(e,t){t&&(Ve("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function tn(e){nn(e),e.drafts_.forEach(Jo),e.drafts_=null}function nn(e){e===rt&&(rt=e.parent_)}function hr(e){return rt=Zo(rt,e)}function Jo(e){const t=e[ke];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function pr(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ke].modified_&&(tn(t),ge(4)),He(e)&&(e=Ft(t,e),t.parent_||Nt(t,e)),t.patches_&&Ve("Patches").generateReplacementPatches_(n[ke].base_,e,t.patches_,t.inversePatches_)):e=Ft(t,n,[]),tn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ur?e:void 0}function Ft(e,t,n){if(wt(t))return t;const r=t[ke];if(!r)return bt(t,(a,s)=>yr(e,r,t,a,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Nt(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const a=r.copy_;let s=a,o=!1;r.type_===3&&(s=new Set(a),a.clear(),o=!0),bt(s,(c,l)=>yr(e,r,a,c,l,n,o)),Nt(e,a,!1),n&&e.patches_&&Ve("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function yr(e,t,n,r,a,s,o){if(process.env.NODE_ENV!=="production"&&a===n&&ge(5),je(a)){const c=s&&t&&t.type_!==3&&!Jt(t.assigned_,r)?s.concat(r):void 0,l=Ft(e,a,c);if(_r(n,r,l),je(l))e.canAutoFreeze_=!1;else return}else o&&n.add(a);if(He(a)&&!wt(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ft(e,a),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(nt(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Nt(e,a)}}function Nt(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&en(t,n)}function Qo(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:gr(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,s=rn;n&&(a=[r],s=at);const{revoke:o,proxy:c}=Proxy.revocable(a,s);return r.draft_=c,r.revoke_=o,c}var rn={get(e,t){if(t===ke)return e;const n=Ge(e);if(!Jt(n,t))return ei(e,n,t);const r=n[t];return e.finalized_||!He(r)?r:r===an(e.base_,t)?(on(e),e.copy_[t]=cn(r,e)):r},has(e,t){return t in Ge(e)},ownKeys(e){return Reflect.ownKeys(Ge(e))},set(e,t,n){const r=vr(Ge(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=an(Ge(e),t),s=a==null?void 0:a[ke];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Ro(n,a)&&(n!==void 0||Jt(e.base_,t)))return!0;on(e),sn(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return an(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,on(e),sn(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ge(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ge(11)},getPrototypeOf(e){return Ye(e.base_)},setPrototypeOf(){ge(12)}},at={};bt(rn,(e,t)=>{at[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),at.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&ge(13),at.set.call(this,e,t,void 0)},at.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&ge(14),rn.set.call(this,e[0],t,n,e[0])};function an(e,t){const n=e[ke];return(n?Ge(n):e)[t]}function ei(e,t,n){var a;const r=vr(t,n);return r?"value"in r?r.value:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function vr(e,t){if(!(t in e))return;let n=Ye(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ye(n)}}function sn(e){e.modified_||(e.modified_=!0,e.parent_&&sn(e.parent_))}function on(e){e.copy_||(e.copy_=Qt(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ti=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const o=this;return function(l=s,...u){return o.produce(l,f=>n.call(this,f,...u))}}typeof n!="function"&&ge(6),r!==void 0&&typeof r!="function"&&ge(7);let a;if(He(t)){const s=hr(this),o=cn(t,void 0);let c=!0;try{a=n(o),c=!1}finally{c?tn(s):nn(s)}return mr(s,r),pr(a,s)}else if(!t||typeof t!="object"){if(a=n(t),a===void 0&&(a=t),a===ur&&(a=void 0),this.autoFreeze_&&en(a,!0),r){const s=[],o=[];Ve("Patches").generateReplacementPatches_(t,a,s,o),r(s,o)}return a}else ge(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...c)=>this.produceWithPatches(o,l=>t(l,...c));let r,a;return[this.produce(t,n,(o,c)=>{r=o,a=c}),r,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){He(e)||ge(8),je(e)&&(e=ni(e));const t=hr(this),n=cn(e,void 0);return n[ke].isManual_=!0,nn(t),n}finishDraft(e,t){const n=e&&e[ke];(!n||!n.isManual_)&&ge(9);const{scope_:r}=n;return mr(r,t),pr(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));const r=Ve("Patches").applyPatches_;return je(e)?r(e,t):this.produce(e,a=>r(a,t))}};function cn(e,t){const n=nt(e)?Ve("MapSet").proxyMap_(e,t):St(e)?Ve("MapSet").proxySet_(e,t):Qo(e,t);return(t?t.scope_:gr()).drafts_.push(n),n}function ni(e){return je(e)||ge(10,e),kr(e)}function kr(e){if(!He(e)||wt(e))return e;const t=e[ke];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Qt(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Qt(e,!0);return bt(n,(r,a)=>{_r(n,r,kr(a))}),t&&(t.finalized_=!1),n}var st=new ti,ln=st.produce,Cr=st.createDraft.bind(st),br=st.finishDraft.bind(st),y={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=y.levels(e,t);return n?r=r.slice(1):r=r.slice(0,-1),r},common(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var a=e[r],s=t[r];if(a!==s)break;n.push(a)}return n},compare(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),a=t.slice(0,n),s=e[n],o=t[n];return y.equals(r,a)&&s>o},endsAt(e,t){var n=e.length,r=e.slice(0,n),a=t.slice(0,n);return y.equals(r,a)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),a=t.slice(0,n),s=e[n],o=t[n];return y.equals(r,a)&&s<o},equals(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return y.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&y.compare(e,t)===0},isBefore(e,t){return y.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&y.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&y.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&y.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&y.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1),a=e[e.length-1],s=t[t.length-1];return a!==s&&y.equals(n,r)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=[],a=0;a<=e.length;a++)r.push(e.slice(0,a));return n&&r.reverse(),r},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!y.isAncestor(t,e)&&!y.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return null;var r=[...e],{affinity:a="forward"}=n;if(e.length===0)return r;switch(t.type){case"insert_node":{var{path:s}=t;(y.equals(s,r)||y.endsBefore(s,r)||y.isAncestor(s,r))&&(r[s.length-1]+=1);break}case"remove_node":{var{path:o}=t;if(y.equals(o,r)||y.isAncestor(o,r))return null;y.endsBefore(o,r)&&(r[o.length-1]-=1);break}case"merge_node":{var{path:c,position:l}=t;y.equals(c,r)||y.endsBefore(c,r)?r[c.length-1]-=1:y.isAncestor(c,r)&&(r[c.length-1]-=1,r[c.length]+=l);break}case"split_node":{var{path:u,position:f}=t;if(y.equals(u,r)){if(a==="forward")r[r.length-1]+=1;else if(a!=="backward")return null}else y.endsBefore(u,r)?r[u.length-1]+=1:y.isAncestor(u,r)&&e[u.length]>=f&&(r[u.length-1]+=1,r[u.length]-=f);break}case"move_node":{var{path:d,newPath:_}=t;if(y.equals(d,_))return r;if(y.isAncestor(d,r)||y.equals(d,r)){var p=_.slice();return y.endsBefore(d,_)&&d.length<_.length&&(p[d.length-1]-=1),p.concat(r.slice(d.length))}else y.isSibling(d,_)&&(y.isAncestor(_,r)||y.equals(_,r))?y.endsBefore(d,r)?r[d.length-1]-=1:r[d.length-1]+=1:y.endsBefore(_,r)||y.equals(_,r)||y.isAncestor(_,r)?(y.endsBefore(d,r)&&(r[d.length-1]-=1),r[_.length-1]+=1):y.endsBefore(d,r)&&(y.equals(_,r)&&(r[_.length-1]+=1),r[d.length-1]-=1);break}}return r}};function ot(e){"@babel/helpers - typeof";return ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ot(e)}function ri(e,t){if(ot(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ot(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ai(e){var t=ri(e,"string");return ot(t)==="symbol"?t:String(t)}function Ze(e,t,n){return t=ai(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function it(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xr(Object(n),!0).forEach(function(r){Ze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var si=(e,t,n)=>{switch(n.type){case"insert_node":{var{path:r,node:a}=n,s=O.parent(e,r),o=r[r.length-1];if(o>s.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(s.children.splice(o,0,a),t)for(var[c,l]of B.points(t))t[l]=q.transform(c,n);break}case"insert_text":{var{path:u,offset:f,text:d}=n;if(d.length===0)break;var _=O.leaf(e,u),p=_.text.slice(0,f),g=_.text.slice(f);if(_.text=p+d+g,t)for(var[h,v]of B.points(t))t[v]=q.transform(h,n);break}case"merge_node":{var{path:b}=n,S=O.get(e,b),k=y.previous(b),w=O.get(e,k),U=O.parent(e,b),I=b[b.length-1];if(J.isText(S)&&J.isText(w))w.text+=S.text;else if(!J.isText(S)&&!J.isText(w))w.children.push(...S.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(b,"] to nodes of different interfaces: ").concat(Ee.stringify(S)," ").concat(Ee.stringify(w)));if(U.children.splice(I,1),t)for(var[F,G]of B.points(t))t[G]=q.transform(F,n);break}case"move_node":{var{path:$,newPath:x}=n;if(y.isAncestor($,x))throw new Error("Cannot move a path [".concat($,"] to new path [").concat(x,"] because the destination is inside itself."));var T=O.get(e,$),z=O.parent(e,$),P=$[$.length-1];z.children.splice(P,1);var V=y.transform($,n),M=O.get(e,y.parent(V)),H=V[V.length-1];if(M.children.splice(H,0,T),t)for(var[N,Y]of B.points(t))t[Y]=q.transform(N,n);break}case"remove_node":{var{path:E}=n,ae=E[E.length-1],X=O.parent(e,E);if(X.children.splice(ae,1),t)for(var[Q,fe]of B.points(t)){var ee=q.transform(Q,n);if(t!=null&&ee!=null)t[fe]=ee;else{var se=void 0,oe=void 0;for(var[j,ne]of O.texts(e))if(y.compare(ne,E)===-1)se=[j,ne];else{oe=[j,ne];break}var xe=!1;se&&oe&&(y.equals(oe[1],E)?xe=!y.hasPrevious(oe[1]):xe=y.common(se[1],E).length<y.common(oe[1],E).length),se&&!xe?(Q.path=se[1],Q.offset=se[0].text.length):oe?(Q.path=oe[1],Q.offset=0):t=null}}break}case"remove_text":{var{path:we,offset:he,text:A}=n;if(A.length===0)break;var Z=O.leaf(e,we),Fe=Z.text.slice(0,he),Nn=Z.text.slice(he+A.length);if(Z.text=Fe+Nn,t)for(var[pe,$e]of B.points(t))t[$e]=q.transform(pe,n);break}case"set_node":{var{path:We,properties:wc,newProperties:Tn}=n;if(We.length===0)throw new Error("Cannot set properties on the root node!");var On=O.get(e,We);for(var Je in Tn){if(Je==="children"||Je==="text")throw new Error('Cannot set the "'.concat(Je,'" property of nodes!'));var ya=Tn[Je];ya==null?delete On[Je]:On[Je]=ya}for(var va in wc)Tn.hasOwnProperty(va)||delete On[va];break}case"set_selection":{var{newProperties:Xe}=n;if(Xe==null)t=Xe;else{if(t==null){if(!B.isRange(Xe))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Ee.stringify(Xe)," when there is no current selection."));t=it({},Xe)}for(var Qe in Xe){var ka=Xe[Qe];if(ka==null){if(Qe==="anchor"||Qe==="focus")throw new Error('Cannot remove the "'.concat(Qe,'" selection property'));delete t[Qe]}else t[Qe]=ka}}break}case"split_node":{var{path:et,position:Gt,properties:Ca}=n;if(et.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(et,"] because the root node cannot be split."));var Ke=O.get(e,et),Fc=O.parent(e,et),Nc=et[et.length-1],Pn;if(J.isText(Ke)){var Tc=Ke.text.slice(0,Gt),Oc=Ke.text.slice(Gt);Ke.text=Tc,Pn=it(it({},Ca),{},{text:Oc})}else{var Pc=Ke.children.slice(0,Gt),Ac=Ke.children.slice(Gt);Ke.children=Pc,Pn=it(it({},Ca),{},{children:Ac})}if(Fc.children.splice(Nc+1,0,Pn),t)for(var[Ic,Mc]of B.points(t))t[Mc]=q.transform(Ic,n);break}}return t},oi={transform(e,t){e.children=Cr(e.children);var n=e.selection&&Cr(e.selection);try{n=si(e,n,t)}finally{e.children=br(e.children),n?e.selection=je(n)?br(n):n:e.selection=null}}},ii={insertNodes(e,t,n){e.insertNodes(t,n)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,n){e.setNodes(t,n)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,n){e.unsetNodes(t,n)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,n){e.wrapNodes(t,n)}},ci={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,n){e.setPoint(t,n)},setSelection(e,t){e.setSelection(t)}},Sr=(e,t)=>{for(var n in e){var r=e[n],a=t[n];if(le(r)&&le(a)){if(!Sr(r,a))return!1}else if(Array.isArray(r)&&Array.isArray(a)){if(r.length!==a.length)return!1;for(var s=0;s<r.length;s++)if(r[s]!==a[s])return!1}else if(r!==a)return!1}for(var o in t)if(e[o]===void 0&&t[o]!==void 0)return!1;return!0};function li(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,s;for(s=0;s<r.length;s++)a=r[s],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function ct(e,t){if(e==null)return{};var n=li(e,t),r,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)r=s[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var ui=["anchor","focus"];function Er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function fi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Er(Object(n),!0).forEach(function(r){Ze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Er(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var B={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:a}=e;return B.isBackward(e)===n?[r,a]:[a,r]},end(e){var[,t]=B.edges(e);return t},equals(e,t){return q.equals(e.anchor,t.anchor)&&q.equals(e.focus,t.focus)},includes(e,t){if(B.isRange(t)){if(B.includes(e,t.anchor)||B.includes(e,t.focus))return!0;var[n,r]=B.edges(e),[a,s]=B.edges(t);return q.isBefore(n,a)&&q.isAfter(r,s)}var[o,c]=B.edges(e),l=!1,u=!1;return q.isPoint(t)?(l=q.compare(t,o)>=0,u=q.compare(t,c)<=0):(l=y.compare(t,o.path)>=0,u=y.compare(t,c.path)<=0),l&&u},intersection(e,t){var n=ct(e,ui),[r,a]=B.edges(e),[s,o]=B.edges(t),c=q.isBefore(r,s)?s:r,l=q.isBefore(a,o)?a:o;return q.isBefore(l,c)?null:fi({anchor:c,focus:l},n)},isBackward(e){var{anchor:t,focus:n}=e;return q.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return q.equals(t,n)},isExpanded(e){return!B.isCollapsed(e)},isForward(e){return!B.isBackward(e)},isRange(e){return le(e)&&q.isPoint(e.anchor)&&q.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=B.edges(e);return t},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ln(e,r=>{if(r===null)return null;var{affinity:a="inward"}=n,s,o;if(a==="inward"){var c=B.isCollapsed(r);B.isForward(r)?(s="forward",o=c?s:"backward"):(s="backward",o=c?s:"forward")}else a==="outward"?B.isForward(r)?(s="backward",o="forward"):(s="forward",o="backward"):(s=a,o=a);var l=q.transform(r.anchor,t,{affinity:s}),u=q.transform(r.focus,t,{affinity:o});if(!l||!u)return null;r.anchor=l,r.focus=u})}},wr=e=>le(e)&&O.isNodeList(e.children)&&!Ce.isEditor(e),Ie={isAncestor(e){return le(e)&&O.isNodeList(e.children)},isElement:wr,isElementList(e){return Array.isArray(e)&&e.every(t=>Ie.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return wr(t)&&t[r]===n},matches(e,t){for(var n in t)if(n!=="children"&&e[n]!==t[n])return!1;return!0}},di=["children"],_i=["text"],Fr=new WeakMap,O={ancestor(e,t){var n=O.get(e,t);if(J.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Ee.stringify(n)));return n},ancestors(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of y.ancestors(t,n)){var a=O.ancestor(e,r),s=[a,r];yield s}}()},child(e,t){if(J.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Ee.stringify(e)));var n=e.children[t];if(n==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Ee.stringify(e)));return n},children(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:r=!1}=n,a=O.ancestor(e,t),{children:s}=a,o=r?s.length-1:0;r?o>=0:o<s.length;){var c=O.child(a,o),l=t.concat(o);yield[c,l],o=r?o-1:o+1}}()},common(e,t,n){var r=y.common(t,n),a=O.get(e,r);return[a,r]},descendant(e,t){var n=O.get(e,t);if(Ce.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Ee.stringify(n)));return n},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of O.nodes(e,t))r.length!==0&&(yield[n,r])}()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of O.nodes(e,t))Ie.isElement(n)&&(yield[n,r])}()},extractProps(e){if(Ie.isAncestor(e)){var t=ct(e,di);return t}else{var t=ct(e,_i);return t}},first(e,t){for(var n=t.slice(),r=O.get(e,n);r&&!(J.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if(J.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Ee.stringify(e)));var n=ln({children:e.children},r=>{var[a,s]=B.edges(t),o=O.nodes(r,{reverse:!0,pass:_=>{var[,p]=_;return!B.includes(t,p)}});for(var[,c]of o){if(!B.includes(t,c)){var l=O.parent(r,c),u=c[c.length-1];l.children.splice(u,1)}if(y.equals(c,s.path)){var f=O.leaf(r,c);f.text=f.text.slice(0,s.offset)}if(y.equals(c,a.path)){var d=O.leaf(r,c);d.text=d.text.slice(a.offset)}}Ce.isEditor(r)&&(r.selection=null)});return n.children},get(e,t){for(var n=e,r=0;r<t.length;r++){var a=t[r];if(J.isText(n)||!n.children[a])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Ee.stringify(e)));n=n.children[a]}return n},has(e,t){for(var n=e,r=0;r<t.length;r++){var a=t[r];if(J.isText(n)||!n.children[a])return!1;n=n.children[a]}return!0},isNode(e){return J.isText(e)||Ie.isElement(e)||Ce.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=Fr.get(e);if(t!==void 0)return t;var n=e.every(r=>O.isNode(r));return Fr.set(e,n),n},last(e,t){for(var n=t.slice(),r=O.get(e,n);r&&!(J.isText(r)||r.children.length===0);){var a=r.children.length-1;r=r.children[a],n.push(a)}return[r,n]},leaf(e,t){var n=O.get(e,t);if(!J.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Ee.stringify(n)));return n},levels(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of y.levels(t,n)){var a=O.get(e,r);yield[a,r]}}()},matches(e,t){return Ie.isElement(e)&&Ie.isElementProps(t)&&Ie.matches(e,t)||J.isText(e)&&J.isTextProps(t)&&J.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:n,reverse:r=!1}=t,{from:a=[],to:s}=t,o=new Set,c=[],l=e;!(s&&(r?y.isBefore(c,s):y.isAfter(c,s)));){if(o.has(l)||(yield[l,c]),!o.has(l)&&!J.isText(l)&&l.children.length!==0&&(n==null||n([l,c])===!1)){o.add(l);var u=r?l.children.length-1:0;y.isAncestor(c,a)&&(u=a[c.length]),c=c.concat(u),l=O.get(e,c);continue}if(c.length===0)break;if(!r){var f=y.next(c);if(O.has(e,f)){c=f,l=O.get(e,c);continue}}if(r&&c[c.length-1]!==0){var d=y.previous(c);c=d,l=O.get(e,c);continue}c=y.parent(c),l=O.get(e,c),o.add(l)}}()},parent(e,t){var n=y.parent(t),r=O.get(e,n);if(J.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string(e){return J.isText(e)?e.text:e.children.map(O.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of O.nodes(e,t))J.isText(n)&&(yield[n,r])}()}};function Nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nr(Object(n),!0).forEach(function(r){Ze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var lt={isNodeOperation(e){return lt.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!le(e))return!1;switch(e.type){case"insert_node":return y.isPath(e.path)&&O.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&y.isPath(e.path);case"merge_node":return typeof e.position=="number"&&y.isPath(e.path)&&le(e.properties);case"move_node":return y.isPath(e.path)&&y.isPath(e.newPath);case"remove_node":return y.isPath(e.path)&&O.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&y.isPath(e.path);case"set_node":return y.isPath(e.path)&&le(e.properties)&&le(e.newProperties);case"set_selection":return e.properties===null&&B.isRange(e.newProperties)||e.newProperties===null&&B.isRange(e.properties)||le(e.properties)&&le(e.newProperties);case"split_node":return y.isPath(e.path)&&typeof e.position=="number"&&le(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>lt.isOperation(t))},isSelectionOperation(e){return lt.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return lt.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return R(R({},e),{},{type:"remove_node"});case"insert_text":return R(R({},e),{},{type:"remove_text"});case"merge_node":return R(R({},e),{},{type:"split_node",path:y.previous(e.path)});case"move_node":{var{newPath:t,path:n}=e;if(y.equals(t,n))return e;if(y.isSibling(n,t))return R(R({},e),{},{path:t,newPath:n});var r=y.transform(n,e),a=y.transform(y.next(n),e);return R(R({},e),{},{path:r,newPath:a})}case"remove_node":return R(R({},e),{},{type:"insert_node"});case"remove_text":return R(R({},e),{},{type:"insert_text"});case"set_node":{var{properties:s,newProperties:o}=e;return R(R({},e),{},{properties:o,newProperties:s})}case"set_selection":{var{properties:c,newProperties:l}=e;return c==null?R(R({},e),{},{properties:l,newProperties:null}):l==null?R(R({},e),{},{properties:null,newProperties:c}):R(R({},e),{},{properties:l,newProperties:c})}case"split_node":return R(R({},e),{},{type:"merge_node",path:y.next(e.path)})}}},Tr=new WeakMap,gi=e=>{var t=Tr.get(e);if(t!==void 0)return t;if(!le(e))return!1;var n=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertSoftBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isElementReadOnly=="function"&&typeof e.isInline=="function"&&typeof e.isSelectable=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&typeof e.getDirtyPaths=="function"&&(e.marks===null||le(e.marks))&&(e.selection===null||B.isRange(e.selection))&&O.isNodeList(e.children)&<.isOperationList(e.operations);return Tr.set(e,n),n},Ce={above(e,t){return e.above(t)},addMark(e,t,n){e.addMark(t,n)},after(e,t,n){return e.after(t,n)},before(e,t,n){return e.before(t,n)},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,n){e.insertFragment(t,n)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,n){return e.isEdge(t,n)},isEditor(e){return gi(e)},isElementReadOnly(e,t){return e.isElementReadOnly(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,n){return e.isEnd(t,n)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,n){return e.isStart(t,n)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,n){return e.leaf(t,n)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,n){return e.node(t,n)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,n){return e.parent(t,n)},path(e,t,n){return e.path(t,n)},pathRef(e,t,n){return e.pathRef(t,n)},pathRefs(e){return e.pathRefs()},point(e,t,n){return e.point(t,n)},pointRef(e,t,n){return e.pointRef(t,n)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,n){return e.range(t,n)},rangeRef(e,t,n){return e.rangeRef(t,n)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,n){return e.string(t,n)},unhangRange(e,t,n){return e.unhangRange(t,n)},void(e,t){return e.void(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,n)=>e.shouldMergeNodesRemovePrevNode(t,n)};function Or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Pr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Or(Object(n),!0).forEach(function(r){Ze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Or(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var q={compare(e,t){var n=y.compare(e.path,t.path);return n===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter(e,t){return q.compare(e,t)===1},isBefore(e,t){return q.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&y.equals(e.path,t.path)},isPoint(e){return le(e)&&typeof e.offset=="number"&&y.isPath(e.path)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ln(e,r=>{if(r===null)return null;var{affinity:a="forward"}=n,{path:s,offset:o}=r;switch(t.type){case"insert_node":case"move_node":{r.path=y.transform(s,t,n);break}case"insert_text":{y.equals(t.path,s)&&(t.offset<o||t.offset===o&&a==="forward")&&(r.offset+=t.text.length);break}case"merge_node":{y.equals(t.path,s)&&(r.offset+=t.position),r.path=y.transform(s,t,n);break}case"remove_text":{y.equals(t.path,s)&&t.offset<=o&&(r.offset-=Math.min(o-t.offset,t.text.length));break}case"remove_node":{if(y.equals(t.path,s)||y.isAncestor(t.path,s))return null;r.path=y.transform(s,t,n);break}case"split_node":{if(y.equals(t.path,s)){if(t.position===o&&a==null)return null;(t.position<o||t.position===o&&a==="forward")&&(r.offset-=t.position,r.path=y.transform(s,t,Pr(Pr({},n),{},{affinity:"forward"})))}else r.path=y.transform(s,t,n);break}}})}},Ar=void 0,Ee={setScrubber(e){Ar=e},stringify(e){return JSON.stringify(e,Ar)}},mi=["text"],hi=["anchor","focus"];function Ir(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ir(Object(n),!0).forEach(function(r){Ze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ir(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var J={equals(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function a(s){var o=ct(s,mi);return o}return Sr(r?a(e):e,r?a(t):t)},isText(e){return le(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>J.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var n in t)if(n!=="text"&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[Oe({},e)];for(var r of t){var a=ct(r,hi),[s,o]=B.edges(r),c=[],l=0,u=s.offset,f=o.offset;for(var d of n){var{length:_}=d.text,p=l;if(l+=_,u<=p&&l<=f){Object.assign(d,a),c.push(d);continue}if(u!==f&&(u===l||f===p)||u>l||f<p||f===p&&p!==0){c.push(d);continue}var g=d,h=void 0,v=void 0;if(f<l){var b=f-p;v=Oe(Oe({},g),{},{text:g.text.slice(b)}),g=Oe(Oe({},g),{},{text:g.text.slice(0,b)})}if(u>p){var S=u-p;h=Oe(Oe({},g),{},{text:g.text.slice(0,S)}),g=Oe(Oe({},g),{},{text:g.text.slice(S)})}Object.assign(g,a),h&&c.push(h),c.push(g),v&&c.push(v)}n=c}return n}},pi=e=>e.selection?e.selection:e.children.length>0?Ce.end(e,[]):[0],W;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(W||(W={})),W.L,W.L|W.V|W.LV|W.LVT,W.LV|W.V,W.V|W.T,W.LVT|W.T,W.T,W.Any,W.Extend|W.ZWJ,W.Any,W.SpacingMark,W.Prepend,W.Any,W.ZWJ,W.ExtPict,W.RI,W.RI;var yi={delete(e,t){e.delete(t)},insertFragment(e,t,n){e.insertFragment(t,n)},insertText(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Ce.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:a=pi(e)}=n;if(y.isPath(a)&&(a=Ce.range(e,a)),B.isRange(a))if(B.isCollapsed(a))a=a.anchor;else{var s=B.end(a);if(!r&&Ce.void(e,{at:s}))return;var o=B.start(a),c=Ce.pointRef(e,o),l=Ce.pointRef(e,s);Dr.delete(e,{at:a,voids:r});var u=c.unref(),f=l.unref();a=u||f,Dr.setSelection(e,{anchor:a,focus:a})}if(!(!r&&Ce.void(e,{at:a})||Ce.elementReadOnly(e,{at:a}))){var{path:d,offset:_}=a;t.length>0&&e.apply({type:"insert_text",path:d,offset:_,text:t})}})}};function Mr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Tt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Mr(Object(n),!0).forEach(function(r){Ze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Dr=Tt(Tt(Tt(Tt({},oi),ii),ci),yi);function $r(e){if(J.isText(e)){let t=e==null?void 0:e.text;return e!=null&&e.bold&&(t=`<strong>${t}</strong>`),e!=null&&e.code&&(t=`<code>${t}</code>`),e!=null&&e.italic&&(t=`<em>${t}</em>`),e!=null&&e.underline&&(t=`<u>${t}</u>`),t}if(Ie.isElement(e)){const t=e.children.map(r=>$r(r)).join(""),n=e.align||"left";switch(e.type){case"image":return`<img src="${e.src}" class="align_${n}" />`;case"paragraph":return`<p class="align_${n}">${t}</p>`;case"blockQuote":return`<blockquote class="align_${n}">${t}</blockquote>`;case"bulletedList":return`<ul class="align_${n}">${t}</ul>`;case"headingOne":return`<h1 class="align_${n}">${t}</h1>`;case"headingTwo":return`<h2 class="align_${n}">${t}</h2>`;case"listItem":return`<li class="align_${n}">${t}</li>`;case"numberedList":return`<ol class="align_${n}">${t}</ol>`;default:return t}}return""}function un(e){var r;if(typeof e=="string")return{text:e};const t=Array.isArray(e.props.children)?e.props.children.map(a=>un(a)):[{text:e.props.children||""}],n=(r=e.props.className)==null?void 0:r.replace("align_","");switch(e.type){case"img":return{type:"image",align:n,src:e.props.src,children:[{text:""}]};case"p":return{type:"paragraph",align:n,children:t};case"blockquote":return{type:"blockQuote",align:n,children:t};case"ul":return{type:"bulletedList",align:n,children:t};case"ol":return{type:"numberedList",align:n,children:t};case"li":return{type:"listItem",align:n,children:t};case"h1":return{type:"headingOne",align:n,children:t};case"h2":return{type:"headingTwo",align:n,children:t};case"strong":return{text:e.props.children,bold:!0};case"code":return{text:e.props.children,code:!0};case"em":return{text:e.props.children,italic:!0};case"u":return{text:e.props.children,underline:!0};default:return{text:e.props.children||""}}}function vi(e){return e.map(t=>$r(t)).join("")}var te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ki(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lr={},fn={},dn={},Ue={},_n={},gn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(function(r){r.Root="root",r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype"})(t=e.ElementType||(e.ElementType={}));function n(r){return r.type===t.Tag||r.type===t.Script||r.type===t.Style}e.isTag=n,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})(gn);var D={},Me=te&&te.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(r[s]=a[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ut=te&&te.__assign||function(){return ut=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},ut.apply(this,arguments)};Object.defineProperty(D,"__esModule",{value:!0}),D.cloneNode=D.hasChildren=D.isDocument=D.isDirective=D.isComment=D.isText=D.isCDATA=D.isTag=D.Element=D.Document=D.CDATA=D.NodeWithChildren=D.ProcessingInstruction=D.Comment=D.Text=D.DataNode=D.Node=void 0;var me=gn,mn=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(t){this.parent=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(t){this.prev=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(t){this.next=t},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){return t===void 0&&(t=!1),hn(this,t)},e}();D.Node=mn;var Ot=function(e){Me(t,e);function t(n){var r=e.call(this)||this;return r.data=n,r}return Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(n){this.data=n},enumerable:!1,configurable:!0}),t}(mn);D.DataNode=Ot;var Br=function(e){Me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=me.ElementType.Text,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(Ot);D.Text=Br;var zr=function(e){Me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=me.ElementType.Comment,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(Ot);D.Comment=zr;var jr=function(e){Me(t,e);function t(n,r){var a=e.call(this,r)||this;return a.name=n,a.type=me.ElementType.Directive,a}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(Ot);D.ProcessingInstruction=jr;var Pt=function(e){Me(t,e);function t(n){var r=e.call(this)||this;return r.children=n,r}return Object.defineProperty(t.prototype,"firstChild",{get:function(){var n;return(n=this.children[0])!==null&&n!==void 0?n: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(n){this.children=n},enumerable:!1,configurable:!0}),t}(mn);D.NodeWithChildren=Pt;var Hr=function(e){Me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=me.ElementType.CDATA,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(Pt);D.CDATA=Hr;var Gr=function(e){Me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=me.ElementType.Root,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(Pt);D.Document=Gr;var Vr=function(e){Me(t,e);function t(n,r,a,s){a===void 0&&(a=[]),s===void 0&&(s=n==="script"?me.ElementType.Script:n==="style"?me.ElementType.Style:me.ElementType.Tag);var o=e.call(this,a)||this;return o.name=n,o.attribs=r,o.type=s,o}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(n){this.name=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var n=this;return Object.keys(this.attribs).map(function(r){var a,s;return{name:r,value:n.attribs[r],namespace:(a=n["x-attribsNamespace"])===null||a===void 0?void 0:a[r],prefix:(s=n["x-attribsPrefix"])===null||s===void 0?void 0:s[r]}})},enumerable:!1,configurable:!0}),t}(Pt);D.Element=Vr;function Ur(e){return(0,me.isTag)(e)}D.isTag=Ur;function qr(e){return e.type===me.ElementType.CDATA}D.isCDATA=qr;function Wr(e){return e.type===me.ElementType.Text}D.isText=Wr;function Xr(e){return e.type===me.ElementType.Comment}D.isComment=Xr;function Kr(e){return e.type===me.ElementType.Directive}D.isDirective=Kr;function Rr(e){return e.type===me.ElementType.Root}D.isDocument=Rr;function Ci(e){return Object.prototype.hasOwnProperty.call(e,"children")}D.hasChildren=Ci;function hn(e,t){t===void 0&&(t=!1);var n;if(Wr(e))n=new Br(e.data);else if(Xr(e))n=new zr(e.data);else if(Ur(e)){var r=t?pn(e.children):[],a=new Vr(e.name,ut({},e.attribs),r);r.forEach(function(l){return l.parent=a}),e.namespace!=null&&(a.namespace=e.namespace),e["x-attribsNamespace"]&&(a["x-attribsNamespace"]=ut({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(a["x-attribsPrefix"]=ut({},e["x-attribsPrefix"])),n=a}else if(qr(e)){var r=t?pn(e.children):[],s=new Hr(r);r.forEach(function(u){return u.parent=s}),n=s}else if(Rr(e)){var r=t?pn(e.children):[],o=new Gr(r);r.forEach(function(u){return u.parent=o}),e["x-mode"]&&(o["x-mode"]=e["x-mode"]),n=o}else if(Kr(e)){var c=new jr(e.name,e.data);e["x-name"]!=null&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),n=c}else throw new Error("Not implemented yet: ".concat(e.type));return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}D.cloneNode=hn;function pn(e){for(var t=e.map(function(r){return hn(r,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}(function(e){var t=te&&te.__createBinding||(Object.create?function(c,l,u,f){f===void 0&&(f=u);var d=Object.getOwnPropertyDescriptor(l,u);(!d||("get"in d?!l.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return l[u]}}),Object.defineProperty(c,f,d)}:function(c,l,u,f){f===void 0&&(f=u),c[f]=l[u]}),n=te&&te.__exportStar||function(c,l){for(var u in c)u!=="default"&&!Object.prototype.hasOwnProperty.call(l,u)&&t(l,c,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var r=gn,a=D;n(D,e);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},o=function(){function c(l,u,f){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof u=="function"&&(f=u,u=s),typeof l=="object"&&(u=l,l=void 0),this.callback=l??null,this.options=u??s,this.elementCB=f??null}return c.prototype.onparserinit=function(l){this.parser=l},c.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},c.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},c.prototype.onerror=function(l){this.handleCallback(l)},c.prototype.onclosetag=function(){this.lastNode=null;var l=this.tagStack.pop();this.options.withEndIndices&&(l.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(l)},c.prototype.onopentag=function(l,u){var f=this.options.xmlMode?r.ElementType.Tag:void 0,d=new a.Element(l,u,void 0,f);this.addNode(d),this.tagStack.push(d)},c.prototype.ontext=function(l){var u=this.lastNode;if(u&&u.type===r.ElementType.Text)u.data+=l,this.options.withEndIndices&&(u.endIndex=this.parser.endIndex);else{var f=new a.Text(l);this.addNode(f),this.lastNode=f}},c.prototype.oncomment=function(l){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=l;return}var u=new a.Comment(l);this.addNode(u),this.lastNode=u},c.prototype.oncommentend=function(){this.lastNode=null},c.prototype.oncdatastart=function(){var l=new a.Text(""),u=new a.CDATA([l]);this.addNode(u),l.parent=u,this.lastNode=l},c.prototype.oncdataend=function(){this.lastNode=null},c.prototype.onprocessinginstruction=function(l,u){var f=new a.ProcessingInstruction(l,u);this.addNode(f)},c.prototype.handleCallback=function(l){if(typeof this.callback=="function")this.callback(l,this.dom);else if(l)throw l},c.prototype.addNode=function(l){var u=this.tagStack[this.tagStack.length-1],f=u.children[u.children.length-1];this.options.withStartIndices&&(l.startIndex=this.parser.startIndex),this.options.withEndIndices&&(l.endIndex=this.parser.endIndex),u.children.push(l),f&&(l.prev=f,f.next=l),l.parent=u,this.lastNode=null},c}();e.DomHandler=o,e.default=o})(_n);var Yr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=e.CARRIAGE_RETURN_PLACEHOLDER=e.CARRIAGE_RETURN_REGEX=e.CARRIAGE_RETURN=e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.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"],e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce(function(t,n){return t[n.toLowerCase()]=n,t},{}),e.CARRIAGE_RETURN="\r",e.CARRIAGE_RETURN_REGEX=new RegExp(e.CARRIAGE_RETURN,"g"),e.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER,"g")})(Yr),Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.formatAttributes=Zr,Ue.escapeSpecialCharacters=Si,Ue.revertEscapedCharacters=Jr,Ue.formatDOM=Qr;var At=_n,ft=Yr;function bi(e){return ft.CASE_SENSITIVE_TAG_NAMES_MAP[e]}function Zr(e){for(var t={},n=0,r=e.length;n<r;n++){var a=e[n];t[a.name]=a.value}return t}function xi(e){e=e.toLowerCase();var t=bi(e);return t||e}function Si(e){return e.replace(ft.CARRIAGE_RETURN_REGEX,ft.CARRIAGE_RETURN_PLACEHOLDER)}function Jr(e){return e.replace(ft.CARRIAGE_RETURN_PLACEHOLDER_REGEX,ft.CARRIAGE_RETURN)}function Qr(e,t,n){t===void 0&&(t=null);for(var r=[],a,s=0,o=e.length;s<o;s++){var c=e[s];switch(c.nodeType){case 1:{var l=xi(c.nodeName);a=new At.Element(l,Zr(c.attributes)),a.children=Qr(l==="template"?c.content.childNodes:c.childNodes,a);break}case 3:a=new At.Text(Jr(c.nodeValue));break;case 8:a=new At.Comment(c.nodeValue);break;default:continue}var u=r[s-1]||null;u&&(u.next=a),a.parent=t,a.prev=u,a.next=null,r.push(a)}return n&&(a=new At.ProcessingInstruction(n.substring(0,n.indexOf(" ")).toLowerCase(),n),a.next=r[0]||null,a.parent=t,r.unshift(a),r[1]&&(r[1].prev=r[0])),r}Object.defineProperty(dn,"__esModule",{value:!0}),dn.default=Ti;var Ei=Ue,ea="html",ta="head",It="body",wi=/<([a-zA-Z]+[0-9]?)/,na=/<head[^]*>/i,ra=/<body[^]*>/i,Mt=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},yn=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},aa=typeof window=="object"&&window.DOMParser;if(typeof aa=="function"){var Fi=new aa,Ni="text/html";yn=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),Fi.parseFromString(e,Ni)},Mt=yn}if(typeof document=="object"&&document.implementation){var Dt=document.implementation.createHTMLDocument();Mt=function(e,t){if(t){var n=Dt.documentElement.querySelector(t);return n&&(n.innerHTML=e),Dt}return Dt.documentElement.innerHTML=e,Dt}}var $t=typeof document=="object"&&document.createElement("template"),vn;$t&&$t.content&&(vn=function(e){return $t.innerHTML=e,$t.content.childNodes});function Ti(e){var t,n;e=(0,Ei.escapeSpecialCharacters)(e);var r=e.match(wi),a=r&&r[1]?r[1].toLowerCase():"";switch(a){case ea:{var s=yn(e);if(!na.test(e)){var o=s.querySelector(ta);(t=o==null?void 0:o.parentNode)===null||t===void 0||t.removeChild(o)}if(!ra.test(e)){var o=s.querySelector(It);(n=o==null?void 0:o.parentNode)===null||n===void 0||n.removeChild(o)}return s.querySelectorAll(ea)}case ta:case It:{var c=Mt(e).querySelectorAll(a);return ra.test(e)&&na.test(e)?c[0].parentNode.childNodes:c}default:{if(vn)return vn(e);var o=Mt(e,It).querySelector(It);return o.childNodes}}}var Oi=te&&te.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fn,"__esModule",{value:!0}),fn.default=Mi;var Pi=Oi(dn),Ai=Ue,Ii=/<(![a-zA-Z\s]+)>/;function Mi(e){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(Ii),n=t?t[1]:void 0;return(0,Ai.formatDOM)((0,Pi.default)(e),null,n)}var Lt={},be={},Bt={},Di=0;Bt.SAME=Di;var $i=1;Bt.CAMELCASE=$i,Bt.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};const sa=0,De=1,zt=2,jt=3,kn=4,oa=5,ia=6;function Li(e){return ce.hasOwnProperty(e)?ce[e]:null}function ue(e,t,n,r,a,s,o){this.acceptsBooleans=t===zt||t===jt||t===kn,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}const ce={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(e=>{ce[e]=new ue(e,sa,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{ce[e]=new ue(e,De,!1,t,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(e=>{ce[e]=new ue(e,zt,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{ce[e]=new ue(e,zt,!1,e,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(e=>{ce[e]=new ue(e,jt,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(e=>{ce[e]=new ue(e,jt,!0,e,null,!1,!1)}),["capture","download"].forEach(e=>{ce[e]=new ue(e,kn,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(e=>{ce[e]=new ue(e,ia,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(e=>{ce[e]=new ue(e,oa,!1,e.toLowerCase(),null,!1,!1)});const Cn=/[\-\:]([a-z])/g,bn=e=>e[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(e=>{const t=e.replace(Cn,bn);ce[t]=new ue(t,De,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(Cn,bn);ce[t]=new ue(t,De,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(Cn,bn);ce[t]=new ue(t,De,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(e=>{ce[e]=new ue(e,De,!1,e.toLowerCase(),null,!1,!1)});const Bi="xlinkHref";ce[Bi]=new ue("xlinkHref",De,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(e=>{ce[e]=new ue(e,De,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:zi,SAME:ji,possibleStandardNames:ca}=Bt,Hi=":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",Gi=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+Hi+"]*$")),Vi=Object.keys(ca).reduce((e,t)=>{const n=ca[t];return n===ji?e[t]=t:n===zi?e[t.toLowerCase()]=t:e[t]=n,e},{});be.BOOLEAN=jt,be.BOOLEANISH_STRING=zt,be.NUMERIC=oa,be.OVERLOADED_BOOLEAN=kn,be.POSITIVE_NUMERIC=ia,be.RESERVED=sa,be.STRING=De,be.getPropertyInfo=Li,be.isCustomAttribute=Gi,be.possibleStandardNames=Vi;var xn={},Sn={},la=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ui=/\n/g,qi=/^\s*/,Wi=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Xi=/^:\s*/,Ki=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ri=/^[;\s]*/,Yi=/^\s+|\s+$/g,Zi=`
|
|
183
|
+
`,ua="/",fa="*",qe="",Ji="comment",Qi="declaration",ec=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function a(g){var h=g.match(Ui);h&&(n+=h.length);var v=g.lastIndexOf(Zi);r=~v?g.length-v:r+g.length}function s(){var g={line:n,column:r};return function(h){return h.position=new o(g),u(),h}}function o(g){this.start=g,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function c(g){var h=new Error(t.source+":"+n+":"+r+": "+g);if(h.reason=g,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function l(g){var h=g.exec(e);if(h){var v=h[0];return a(v),e=e.slice(v.length),h}}function u(){l(qi)}function f(g){var h;for(g=g||[];h=d();)h!==!1&&g.push(h);return g}function d(){var g=s();if(!(ua!=e.charAt(0)||fa!=e.charAt(1))){for(var h=2;qe!=e.charAt(h)&&(fa!=e.charAt(h)||ua!=e.charAt(h+1));)++h;if(h+=2,qe===e.charAt(h-1))return c("End of comment missing");var v=e.slice(2,h-2);return r+=2,a(v),e=e.slice(h),r+=2,g({type:Ji,comment:v})}}function _(){var g=s(),h=l(Wi);if(h){if(d(),!l(Xi))return c("property missing ':'");var v=l(Ki),b=g({type:Qi,property:da(h[0].replace(la,qe)),value:v?da(v[0].replace(la,qe)):qe});return l(Ri),b}}function p(){var g=[];f(g);for(var h;h=_();)h!==!1&&(g.push(h),f(g));return g}return u(),p()};function da(e){return e?e.replace(Yi,qe):qe}var tc=te&&te.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.default=rc;var nc=tc(ec);function rc(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,nc.default)(e),a=typeof t=="function";return r.forEach(function(s){if(s.type==="declaration"){var o=s.property,c=s.value;a?t(o,c,s):c&&(n=n||{},n[o]=c)}}),n}var Ht={};Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.camelCase=void 0;var ac=/^--[a-zA-Z0-9_-]+$/,sc=/-([a-z])/g,oc=/^[^-]+$/,ic=/^-(webkit|moz|ms|o|khtml)-/,cc=/^-(ms)-/,lc=function(e){return!e||oc.test(e)||ac.test(e)},uc=function(e,t){return t.toUpperCase()},_a=function(e,t){return"".concat(t,"-")},fc=function(e,t){return t===void 0&&(t={}),lc(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(cc,_a):e=e.replace(ic,_a),e.replace(sc,uc))};Ht.camelCase=fc;var dc=te&&te.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_c=dc(Sn),gc=Ht;function En(e,t){var n={};return!e||typeof e!="string"||(0,_c.default)(e,function(r,a){r&&a&&(n[(0,gc.camelCase)(r,t)]=a)}),n}En.default=En;var mc=En;(function(e){var t=te&&te.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=s,e.setStyleProp=c;var n=m,r=t(mc),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function s(f,d){return f.includes("-")?!a.has(f):!!(d&&typeof d.is=="string")}var o={reactCompat:!0};function c(f,d){if(typeof f=="string"){if(!f.trim()){d.style={};return}try{d.style=(0,r.default)(f,o)}catch{d.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(".")[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var l=function(f){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(f.name)};e.canTextBeChildOfNode=l;var u=function(f){return f};e.returnFirstArg=u})(xn),Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.default=vc;var dt=be,ga=xn,hc=["checked","value"],pc=["input","select","textarea"],yc={reset:!0,submit:!0};function vc(e,t){e===void 0&&(e={});var n={},r=!!(e.type&&yc[e.type]);for(var a in e){var s=e[a];if((0,dt.isCustomAttribute)(a)){n[a]=s;continue}var o=a.toLowerCase(),c=ma(o);if(c){var l=(0,dt.getPropertyInfo)(c);switch(hc.includes(c)&&pc.includes(t)&&!r&&(c=ma("default"+o)),n[c]=s,l&&l.type){case dt.BOOLEAN:n[c]=!0;break;case dt.OVERLOADED_BOOLEAN:s===""&&(n[c]=!0);break}continue}ga.PRESERVE_CUSTOM_ATTRIBUTES&&(n[a]=s)}return(0,ga.setStyleProp)(e.style,n),n}function ma(e){return dt.possibleStandardNames[e]}var wn={},kc=te&&te.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wn,"__esModule",{value:!0}),wn.default=ha;var Fn=m,Cc=kc(Lt),_t=xn,bc={cloneElement:Fn.cloneElement,createElement:Fn.createElement,isValidElement:Fn.isValidElement};function ha(e,t){t===void 0&&(t={});for(var n=[],r=typeof t.replace=="function",a=t.transform||_t.returnFirstArg,s=t.library||bc,o=s.cloneElement,c=s.createElement,l=s.isValidElement,u=e.length,f=0;f<u;f++){var d=e[f];if(r){var _=t.replace(d,f);if(l(_)){u>1&&(_=o(_,{key:_.key||f})),n.push(a(_,d,f));continue}}if(d.type==="text"){var p=!d.data.trim().length;if(p&&d.parent&&!(0,_t.canTextBeChildOfNode)(d.parent)||t.trim&&p)continue;n.push(a(d.data,d,f));continue}var g=d,h={};xc(g)?((0,_t.setStyleProp)(g.attribs.style,g.attribs),h=g.attribs):g.attribs&&(h=(0,Cc.default)(g.attribs,g.name));var v=void 0;switch(d.type){case"script":case"style":d.children[0]&&(h.dangerouslySetInnerHTML={__html:d.children[0].data});break;case"tag":d.name==="textarea"&&d.children[0]?h.defaultValue=d.children[0].data:d.children&&d.children.length&&(v=ha(d.children,t));break;default:continue}u>1&&(h.key=f),n.push(a(c(d.name,h,v),d,f))}return n.length===1?n[0]:n}function xc(e){return _t.PRESERVE_CUSTOM_ATTRIBUTES&&e.type==="tag"&&(0,_t.isCustomComponent)(e.name,e.attribs)}(function(e){var t=te&&te.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=c;var n=t(fn);e.htmlToDOM=n.default;var r=t(Lt);e.attributesToProps=r.default;var a=t(wn);e.domToReact=a.default;var s=_n;Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return s.Text}});var o={lowerCaseAttributeNames:!1};function c(l,u){if(typeof l!="string")throw new TypeError("First argument must be a string");return l?(0,a.default)((0,n.default)(l,(u==null?void 0:u.htmlparser2)||o),u):[]}})(Lr);const pa=ki(Lr),Sc=pa.default||pa;function Ec(e){const t=Sc(e);return Array.isArray(t)?t.map(n=>typeof n=="string"?{text:n}:un(n)):typeof t=="string"?[{text:t}]:[un(t)]}C.AlertContainer=Sa,C.AlertContent=Ea,C.AlertDescription=wa,C.AlertIcon=Fa,C.AlertTitle=In,C.AudioPlayer=Ln,C.AudioUpload=Pa,C.Badge=Aa,C.Button=Be,C.CardTabButton=Da,C.CardTabContainer=$a,C.Checkbox=La,C.ClientOnly=za,C.CurrencyInput=Ga,C.Divider=gt,C.DrawerContainer=Wa,C.DrawerHeader=Xa,C.DrawerProvider=Zs,C.FieldError=ve,C.FieldLabel=de,C.FieldWrapper=_e,C.FileUpload=Ya,C.FormProvider=Na,C.IconButton=mt,C.ImageUpload=Qa,C.Input=Wt,C.MaskedInput=ts,C.ModalContainer=as,C.ModalFooter=ss,C.ModalHeader=os,C.ModalProvider=Qs,C.MultiSelect=ms,C.PhoneInput=ws,C.Popover=Fs,C.RadioBox=Os,C.RadioGroup=Ps,C.Select=zs,C.Slider=$n,C.Switch=js,C.TabButton=Vs,C.TabContainer=Us,C.TableBody=qs,C.TableCaption=Ws,C.TableContainer=Xs,C.TableFooter=Ks,C.TableHeader=Rs,C.Textarea=Ys,C.ToastProvider=Wo,C.Tooltip=ht,C.toHtml=vi,C.toRichTextValue=Ec,C.useDrawer=Js,C.useForm=ye,C.useHydrated=jn,C.useModal=eo,C.useScopedParams=to,C.useScrollLock=ze,C.useSlider=Dn,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
|