@arkyn/components 3.0.1-beta.94 → 3.0.1-beta.95
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 +178 -166
- package/dist/bundle.umd.cjs +5 -5
- package/dist/components/searchPlaces.d.ts.map +1 -1
- package/dist/components/searchPlaces.js +1 -1
- package/dist/providers/placesProvider.d.ts.map +1 -1
- package/dist/providers/placesProvider.js +6 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/bundle.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(te,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react"),require("lucide-react"),require("@arkyn/shared"),require("framer-motion"),require("react-dom"),require("@react-input/mask"),require("@arkyn/templates")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","lucide-react","@arkyn/shared","framer-motion","react-dom","@react-input/mask","@arkyn/templates"],p):(te=typeof globalThis<"u"?globalThis:te||self,p(te["@arkyn/components"]={},te.jsxRuntime,te.React$1,te.lucideReact,te.shared,te.framerMotion,te.ReactDOM,te.mask,te.templates))})(this,function(te,p,l,ce,qr,It,Rt,Si,er){"use strict";var vb=Object.defineProperty;var mb=(te,p,l)=>p in te?vb(te,p,{enumerable:!0,configurable:!0,writable:!0,value:l}):te[p]=l;var ot=(te,p,l)=>mb(te,typeof p!="symbol"?p+"":p,l);function Fi(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const ke=Fi(l),xi=Fi(Rt);function Pi(t){const{className:e,...r}=t,n=`arkynAlertTitle ${e}`;return p.jsx("div",{className:n.trim(),...r})}const Mi=l.createContext({});function rf(){return l.useContext(Mi)}function nf(t){const{schema:e,children:r,className:n,...s}=t,o=!(c=>{let f=!1;const h=g=>{Array.isArray(g)?g.forEach(h):g&&typeof g=="object"&&"type"in g&&(g.type===Pi?f=!0:g.props&&typeof g.props=="object"&&g.props!==null&&"children"in g.props&&h(g.props.children))};return h(c),f})(r)?"nonExistsAlertTitle":"existsAlertTitle",u=`arkynAlertContainer ${e} ${o} ${n}`;return p.jsx(Mi.Provider,{value:t,children:p.jsx("div",{className:u.trim(),...s,children:r})})}function sf(t){const{className:e,...r}=t,n=`arkynAlertContent ${e}`;return p.jsx("div",{className:n.trim(),...r})}function af(t){const{className:e,...r}=t,n=`arkynAlertDescription ${e}`;return p.jsx("div",{className:n.trim(),...r})}function of(t){const{className:e,...r}=t,{schema:n}=rf(),s=`arkynAlertIcon ${n} ${e}`;switch(n){case"success":return p.jsx(ce.CheckCircle2,{className:s,...r});case"danger":return p.jsx(ce.XCircle,{className:s,...r});case"warning":return p.jsx(ce.AlertTriangle,{className:s,...r});case"info":return p.jsx(ce.Info,{className:s,...r})}}function ki(t){function e(){return!t||t<=0?0:t>=100?100:t}const[r,n]=l.useState(e());function s(i){return i<=0?n(0):i>=100?n(100):n(i)}return[r,s]}function Ti(t){const{onChange:e,value:r,disabled:n=!1,onDragging:s,className:i="",...a}=t,[o,u]=l.useState(!1),c=l.useRef(null),f=()=>u(!0),h=()=>u(!1),g=b=>{if(n||!o||!c.current)return;const y=c.current.getBoundingClientRect(),w=b.clientX-y.left,E=Math.min(Math.max(w/y.width*100,0),100);e(E)},D=b=>{if(n||!c.current)return;const y=c.current.getBoundingClientRect(),w=b.clientX-y.left,E=Math.min(Math.max(w/y.width*100,0),100);e(E)};l.useEffect(()=>(o?(s&&s(!0),document.addEventListener("mousemove",g),document.addEventListener("mouseup",h)):(s&&s(!1),document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",h)),()=>{document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",h)}),[o]);const d=`arkynSliderTrack ${o?"isDragging":"isNotDragging"} ${n?"isDisabled":"isEnabled"} ${i}`;return p.jsxs("div",{...a,className:d,onMouseDown:f,onClick:D,ref:c,children:[p.jsx("div",{className:"arkynSliderFill",style:{width:`${r}%`}}),p.jsx("div",{className:"arkynSliderThumb",style:{left:`${r}%`}})]})}function Ni(t){var A,O,j,F;const{onPlayAudio:e,onPauseAudio:r,disabled:n,...s}=t,[i,a]=ki(0),[o,u]=l.useState(!1),[c,f]=l.useState(!1),h=l.useRef(null),g=(A=h.current)==null?void 0:A.currentTime,D=(O=h.current)==null?void 0:O.duration,v=b(g),C=b(D),d={totalTime:D,currentTime:g,formattedCurrentTime:v,formattedTotalTime:C};function b(x){if(!x)return"00:00";const P=Math.floor(x/60),M=Math.floor(x%60),I=String(P).padStart(2,"0"),N=String(M).padStart(2,"0");return`${I}:${N}`}function y(){const x=h.current;x&&(t.onPlayAudio&&t.onPlayAudio(d),x.play(),u(!0))}function w(){const x=h.current;x&&(t.onPauseAudio&&t.onPauseAudio(d),x.pause(),u(!1))}function E(){o?w():y()}function B(x){const P=h.current;if(!P)return;const M=P.duration,I=x/100*M;P.currentTime=I}return c||!o?(j=h.current)==null||j.pause():o&&((F=h.current)==null||F.play()),l.useEffect(()=>{const x=h.current;if(!x)return;const P=()=>{const M=x.duration,N=x.currentTime/M*100;a(N)};return x.addEventListener("timeupdate",P),()=>{x.removeEventListener("timeupdate",P)}},[]),p.jsxs("div",{className:"arkynAudioPlayer",children:[p.jsx("audio",{...s,ref:h,src:t.src,onEnded:w}),p.jsxs("button",{type:"button",disabled:n,onClick:E,children:[o&&p.jsx(ce.Pause,{}),!o&&p.jsx(ce.Play,{})]}),p.jsx("p",{children:v}),p.jsx(Ti,{value:i,onChange:B,onDragging:f,disabled:n}),p.jsx("p",{children:C})]})}const Ii=l.createContext({});function uf(t){const{children:e,fieldErrors:r,form:n}=t;return p.jsxs(Ii.Provider,{value:{fieldErrors:r},children:[!n&&e,n&&l.cloneElement(n,n.props,e)]})}function Ye(){return l.useContext(Ii)}function Je(t){const{children:e,className:r,...n}=t,s=`arkynFieldError ${r}`;return e?p.jsx("strong",{className:s.trim(),...n,children:e}):p.jsx(p.Fragment,{})}function Ue(t){const{showAsterisk:e=!1,className:r="",...n}=t,i=`arkynFieldLabel ${e?"asteriskTrue":"asteriskFalse"} ${r}`;return p.jsx("label",{className:i.trim(),...n})}function We(t){const{children:e,className:r,orientation:n="vertical",...s}=t,i=`arkynFieldWrapper ${r} ${n}`;return p.jsx("section",{className:i.trim(),...s,children:e})}function Ae(t){const{iconSize:e,icon:r,className:n,show:s=!0}=t;return s?r?typeof r=="string"?p.jsx("p",{className:n,children:r}):p.jsx("p",{className:n,children:p.jsx(r,{size:e,strokeWidth:2.5})}):p.jsx(p.Fragment,{}):p.jsx(p.Fragment,{})}function pt(t){const{isLoading:e=!1,scheme:r="primary",variant:n="solid",loadingText:s,size:i="md",leftIcon:a,rightIcon:o,disabled:u,className:c="",children:f,...h}=t,D={xs:12,sm:16,md:20,lg:24}[i],d=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${n} ${r} ${i} ${s?"loadingTextTrue":"loadingTextFalse"} ${c}`;return p.jsxs("button",{className:d,disabled:u||e,...h,children:[p.jsxs("div",{className:"arkynButtonSpinner",children:[p.jsx(ce.Loader2,{size:D,strokeWidth:2.5}),s&&s]}),p.jsxs("div",{className:"arkynButtonContent",children:[p.jsx(Ae,{iconSize:D,icon:a}),f,p.jsx(Ae,{iconSize:D,icon:o})]})]})}function Gr(t){const{className:e,orientation:r="horizontal",...n}=t,s=`arkynDivider ${r} ${e}`;return p.jsx("div",{className:s.trim(),...n})}function Zr(t){const{isLoading:e=!1,scheme:r="primary",variant:n="solid",size:s="md",icon:i,disabled:a,className:o="",...u}=t,c={xs:12,sm:16,md:20,lg:24},h=`arkynIconButton ${n} ${r} ${s} ${e?"loadingTrue":"loadingFalse"} ${o}`;return p.jsxs("button",{disabled:a||e,className:h.trim(),...u,children:[p.jsx("div",{className:"arkynIconButtonSpinner",children:p.jsx(ce.Loader2,{size:c[s],strokeWidth:2.5})}),p.jsx("div",{className:"arkynIconButtonContent",children:p.jsx(i,{size:c[s],strokeWidth:2.5})})]})}function Kr(t){const{text:e,size:r="lg",children:n,orientation:s="top",className:i="",...a}=t,o=l.useId(),u=l.useRef(null),[c,f]=l.useState(s);l.useEffect(()=>{const g=()=>{if(!u.current)return;const C=document.getElementById(o);C&&(f(s),requestAnimationFrame(()=>{const d=C.getBoundingClientRect(),b=window.innerWidth,y=window.innerHeight;let w=s;s==="left"&&d.left<0?w="right":s==="right"&&d.right>b?w="left":s==="top"&&d.top<0?w="bottom":s==="bottom"&&d.bottom>y&&(w="top"),w==="right"&&d.right>b?w="left":w==="left"&&d.left<0?w="right":w==="bottom"&&d.bottom>y?w="top":w==="top"&&d.top<0&&(w="bottom"),f(w)}))},D=u.current;if(!D)return;const v=()=>{setTimeout(g,1)};return D.addEventListener("mouseenter",v),window.addEventListener("resize",g),()=>{D.removeEventListener("mouseenter",v),window.removeEventListener("resize",g)}},[s,o]);const h=`arkynTooltip ${r} ${c} ${i}`;return p.jsxs("div",{className:h.trim(),...a,ref:u,children:[n,p.jsx("div",{className:"arkynTooltipText",id:o,dangerouslySetInnerHTML:{__html:e}})]})}function lf(t){const{filePath:e,disabled:r,acceptAudio:n,handleSelectFile:s,isLoading:i,reSendAudio:a,changeAudioButtonText:o}=t;function u(){if(r)return;const c=document.createElement("input");c.type="file",c.accept=n,c.onchange=f=>{var g;const h=(g=f.target.files)==null?void 0:g[0];h&&s(h)},c.click()}return p.jsxs("div",{className:"arkynAudioUploadHasFileContentContainer",children:[p.jsx(Ni,{src:e}),p.jsx(Gr,{}),p.jsxs("div",{className:"arkynAudioUploadButtonsContainer",children:[!!a&&p.jsx(Kr,{orientation:"bottom",text:"Reenviar áudio",children:p.jsx(Zr,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:i,onClick:a,icon:ce.RefreshCw,disabled:r})}),p.jsx(pt,{isLoading:i,onClick:u,variant:"outline",size:"sm",type:"button",disabled:r,children:o})]})]})}function cf(t){const{dropAudioText:e,isLoading:r,acceptAudio:n,handleSelectFile:s,selectAudioButtonText:i,disabled:a}=t;function o(c){if(a)return;c.preventDefault();const f=c.dataTransfer.files[0];f&&s(f)}function u(){if(a)return;const c=document.createElement("input");c.type="file",c.accept=n,c.onchange=f=>{var g;const h=(g=f.target.files)==null?void 0:g[0];h&&s(h)},c.click()}return p.jsxs("div",{onDrop:o,className:"arkynAudioUploadNoFileContent",children:[p.jsx(pt,{isLoading:r,onClick:u,variant:"ghost",size:"sm",type:"button",disabled:a,children:i}),p.jsx("p",{children:e})]})}function ff(t){const{name:e,label:r,fileName:n="file",method:s="POST",onChange:i,fileResponseName:a="url",selectAudioButtonText:o="Selecionar arquivo de áudio",dropAudioText:u="Ou arraste e solte um arquivo de áudio aqui",changeAudioButtonText:c="Trocar arquivo de áudio",acceptAudio:f="audio/*",action:h,defaultValue:g="",showAsterisk:D=!1,disabled:v=!1}=t,{fieldErrors:C}=Ye(),d=C==null?void 0:C[e],[b,y]=l.useState(g),[w,E]=l.useState(""),[B,A]=l.useState(null),[O,j]=l.useState(g),[F,x]=l.useState(!1);async function P(_){if(v)return;x(!0),A(_),E("");const $=new FormData;$.append(n,_),await fetch(h,{method:s,body:$}).then(async q=>await q.json()).then(q=>{q!=null&&q.error?E(q.error):y(q==null?void 0:q[a]),i&&i(q==null?void 0:q[a])}).catch(q=>{console.error(q),E("Erro ao enviar audio")}).finally(()=>x(!1))}function M(_){if(!v){if(_.type.indexOf("audio")===-1){E("O arquivo selecionado não é um arquivo de áudio");return}j(URL.createObjectURL(_)),P(_)}}const I=d||w,X=`arkynAudioUpload ${I?"hasError":"noHasError"} ${O?"hasAudio":"noHasAudio"}`;return p.jsxs(We,{children:[r&&p.jsx(Ue,{showAsterisk:D,children:r}),p.jsxs("div",{className:X,children:[p.jsx("input",{type:"hidden",name:e,value:b||""}),!O&&p.jsx(cf,{disabled:v,isLoading:F,acceptAudio:f,dropAudioText:u,handleSelectFile:M,selectAudioButtonText:o}),O&&p.jsx(lf,{filePath:O,acceptAudio:f,changeAudioButtonText:c,disabled:v,handleSelectFile:M,isLoading:F,reSendAudio:I&&B?()=>P(B):void 0})]}),I&&p.jsx(Je,{children:I})]})}function df(t){const{variant:e="ghost",scheme:r="primary",size:n="lg",leftIcon:s,rightIcon:i,className:a="",children:o,...u}=t,f={md:12,lg:14}[n],h=`arkynBadge ${e} ${r} ${n} ${a}`;return p.jsxs("div",{className:h.trim(),...u,children:[p.jsx(Ae,{iconSize:f,icon:s}),p.jsx("p",{children:o}),p.jsx(Ae,{iconSize:f,icon:i})]})}const ji=l.createContext({});function hf(){return l.useContext(ji)}function gf(t){return p.jsx(ji.Provider,{value:t,children:t.children})}function pf(t){const{children:e,disabled:r=!1,className:n="",onClick:s,value:i,...a}=t,{disabled:o,currentTab:u,changeCurrentTab:c}=hf(),f=o||r,D=`arkynCardTabButton ${f?"isDisabled":""} ${u===i&&i?"isActive":""} ${n}`;function v(C){c(i),s&&s(C)}return p.jsx("button",{onClick:v,className:D.trim(),...a,disabled:f,type:"button",children:e})}function vf(t){const{children:e,onChange:r,defaultValue:n,disabled:s=!1,className:i,...a}=t,[o,u]=l.useState(n||""),c=`arkynCardTabContainer ${i||""}`;function f(h){u(h),r&&r(h)}return p.jsx(gf,{disabled:s,currentTab:o,changeCurrentTab:f,children:p.jsx("nav",{className:c.trim(),...a,children:e})})}function mf(t){const{id:e,name:r,className:n="",size:s="md",errorMessage:i,defaultChecked:a=!1,label:o,checked:u=null,onCheck:c,orientation:f="horizontalReverse",value:h,...g}=t,{fieldErrors:D}=Ye(),v=l.useRef(null),C=e||l.useId(),d=i||(D==null?void 0:D[r]),b=!!d,[y,w]=l.useState(a||!1),E=typeof u=="boolean"?u:y,O=`arkynCheckbox ${s} ${b?"errorTrue":"errorFalse"} ${E?"checkedTrue":"checkedFalse"}`;function j(){const F=y;w(!F),c&&c(F?"":h||"checked")}return p.jsxs(We,{orientation:f,className:n,children:[o&&p.jsx(Ue,{htmlFor:C,children:o}),p.jsxs("button",{id:C,type:"button",className:O,onClick:j,...g,children:[p.jsx("input",{type:"hidden",name:r,ref:v,value:E?h||"checked":""}),p.jsx(ce.Check,{})]}),d&&p.jsx(Je,{children:d})]})}function Cf(){return()=>{}}function zi(){return l.useSyncExternalStore(Cf,()=>!0,()=>!1)}function Df(t){const{children:e,fallback:r=null}=t;return zi()?p.jsx(p.Fragment,{children:e()}):p.jsx(p.Fragment,{children:r})}function _i(t){let e=t;return typeof t=="string"?(e=+qr.removeNonNumeric(t),e%1!==0&&(e=e.toFixed(2))):e=Number.isInteger(t)?Number(t)*10**2:t.toFixed(2),+qr.removeNonNumeric(String(e))/10**2}function is(t,e){if(!t)return[0,qr.formatToCurrency(0,e)];const r=_i(t),n=qr.formatToCurrency(r,e);return[r,n]}function yf(t){const{name:e,disabled:r,title:n,style:s,variant:i="solid",label:a,className:o="",value:u,defaultValue:c,max:f=1e9,locale:h,onChange:g,prefix:D,suffix:v,isLoading:C=!1,leftIcon:d,readOnly:b,onFocus:y,onBlur:w,errorMessage:E,showAsterisk:B,rightIcon:A,size:O="md",id:j,...F}=t,{fieldErrors:x}=Ye(),[P,M]=l.useState(!1),[I,N]=l.useState("0"),T=l.useRef(null),X=j||l.useId(),_=E||(x==null?void 0:x[e]),$=!!_,q=r||C,R={md:20,lg:20}[O],re=A?"right":"left",Y=re==="left"&&C,ae=re==="right"&&C;function k(){q||!(T!=null&&T.current)||(M(!0),T.current.focus())}function S(ge){M(!0),y&&y(ge)}function W(ge){M(!1),w&&w(ge)}const z=ge=>{const[ye,De]=is(ge,h);return!f||ye<=f?(N(De),[ye,De]):is(ge,h)},Z=ge=>{ge.preventDefault();const[ye,De]=z(ge.target.value);g&&g(ge,String(ye),String(De))};l.useEffect(()=>{const ge=u||+c||void 0,[,ye]=is(ge,h);N(ye)},[h,c,u]);const le=`arkynCurrencyInput ${D?"hasPrefix":""} ${v?"hasSuffix":""} ${i} ${O} ${q||b||C?"opacity":""} ${$?"errored":""} ${P?"focused":""}`;return p.jsxs(We,{className:o,children:[a&&p.jsx(Ue,{showAsterisk:B,htmlFor:X,children:a}),p.jsxs("section",{title:n,style:s,className:le,onClick:k,children:[p.jsx(Ae,{iconSize:R,icon:D,className:"prefix"}),p.jsx(Ae,{show:Y,iconSize:R,className:"spinner",icon:ce.Loader2}),p.jsx(Ae,{show:!C,icon:d,iconSize:R}),p.jsx("input",{disabled:q,readOnly:b,ref:T,onFocus:S,onBlur:W,onChange:Z,id:X,placeholder:q?I:void 0,value:q?void 0:I,...F}),p.jsx("input",{type:"hidden",name:e,value:_i(I),readOnly:!0}),p.jsx(Ae,{show:!C,icon:A,iconSize:R}),p.jsx(Ae,{show:ae,iconSize:R,className:"spinner",icon:ce.Loader2}),p.jsx(Ae,{iconSize:R,icon:v,className:"suffix"})]}),_&&p.jsx(Je,{children:_})]})}function bf(){return typeof window>"u"?0:window.innerWidth-document.documentElement.clientWidth}function jt(t){l.useEffect(()=>{if(t){const e=document.body.style.overflow,r=document.body.style.paddingRight,n=bf();if(n>0){const s=window.getComputedStyle(document.body),i=parseInt(s.paddingRight)||0;document.body.style.paddingRight=`${i+n}px`}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e,document.body.style.paddingRight=r}}},[t])}const Ui=l.createContext({});function Ef(t){return p.jsx(Ui.Provider,{value:{makeInvisible:t.makeInvisible},children:t.children})}function wf(){return l.useContext(Ui)}function Bf(t){const{isVisible:e,makeInvisible:r,orientation:n="left",children:s,className:i,...a}=t;jt(e);const o=n==="left"?"-100%":"100%",c=`arkynDrawerContainer ${n} ${e?"visibleTrue":"visibleFalse"} ${i}`;return p.jsx(Ef,{makeInvisible:r,children:p.jsx(It.AnimatePresence,{children:e&&p.jsxs("aside",{className:c.trim(),...a,children:[p.jsx(It.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:r}),p.jsx(It.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${o})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${o})`},children:s})]})})})}function Af(t){const{showCloseButton:e=!0,className:r,children:n,...s}=t,{makeInvisible:i}=wf(),a=`arkynDrawerHeader ${r}`;return p.jsxs("header",{className:a.trim(),...s,children:[n,e&&p.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:i,"aria-label":"Close drawer",children:p.jsx(ce.X,{size:24})})]})}function Of(t){const{disabled:e,file:r,isLoading:n,acceptFile:s,changeFileButtonText:i,handleSelectFile:a,reSendFile:o}=t;function u(){if(e)return;const f=document.createElement("input");f.type="file",f.accept=s,f.onchange=h=>{var D;const g=(D=h.target.files)==null?void 0:D[0];g&&a(g)},f.click()}function c(){return r.type.startsWith("image/")?p.jsx(ce.FileImage,{}):r.type.startsWith("audio/")?p.jsx(ce.FileAudio,{}):r.type.startsWith("application/zip")?p.jsx(ce.FileArchive,{}):p.jsx(ce.File,{})}return p.jsxs("div",{className:"arkynFileUploadHasFileContent",children:[p.jsxs("section",{className:"arkynFileUploadFileContainer",children:[p.jsx(c,{}),p.jsx("p",{children:r.name})]}),p.jsx(Gr,{}),p.jsxs("div",{className:"arkynFileUploadButtonsContainer",children:[!!o&&p.jsx(Kr,{orientation:"bottom",text:"Reenviar arquivo",children:p.jsx(Zr,{type:"button","aria-label":"resend file",variant:"outline",scheme:"danger",size:"sm",isLoading:n,onClick:o,icon:ce.RefreshCw,disabled:e})}),p.jsx(pt,{isLoading:n,onClick:u,variant:"outline",size:"sm",type:"button",disabled:e,children:i})]})]})}function Lf(t){const{dropFileText:e,isLoading:r,acceptFile:n,handleSelectFile:s,selectFileButtonText:i,disabled:a}=t;function o(c){if(a)return;c.preventDefault();const f=c.dataTransfer.files[0];f&&s(f)}function u(){if(a)return;const c=document.createElement("input");c.type="file",c.accept=n,c.onchange=f=>{var g;const h=(g=f.target.files)==null?void 0:g[0];h&&s(h)},c.click()}return p.jsxs("div",{onDrop:o,className:"arkynFileUploadNoFileContent",children:[p.jsx(pt,{isLoading:r,onClick:u,variant:"ghost",size:"sm",type:"button",disabled:a,children:i}),p.jsx("p",{children:e})]})}function Sf(t){const{name:e,label:r,showAsterisk:n=!1,action:s,fileName:i="file",method:a="POST",acceptFile:o="*",fileResponseName:u="url",changeFileButtonText:c="Alterar arquivo",selectFileButtonText:f="Selecionar arquivo",dropFileText:h="Ou arraste e solte o arquivo aqui",onChange:g,disabled:D=!1}=t,{fieldErrors:v}=Ye(),C=v==null?void 0:v[e],[d,b]=l.useState(""),[y,w]=l.useState(""),[E,B]=l.useState(null),[A,O]=l.useState(!1);async function j(N){if(D)return;O(!0),B(N),w("");const T=new FormData;T.append(i,N),await fetch(s,{method:a,body:T}).then(async X=>await X.json()).then(X=>{X!=null&&X.error?w(X.error):b(X==null?void 0:X[u]),g&&g(X==null?void 0:X[u])}).catch(X=>{console.error(X),w("Erro ao enviar o arquivo")}).finally(()=>O(!1))}function F(N){D||j(N)}const x=C||y,I=`arkynFileUpload ${x?"hasError":"noHasError"} ${E?"hasFile":"noHasFile"}`;return p.jsxs(We,{children:[r&&p.jsx(Ue,{showAsterisk:n,children:r}),p.jsxs("div",{className:I,children:[p.jsx("input",{type:"hidden",name:e,value:d||""}),!E&&p.jsx(Lf,{disabled:D,isLoading:A,acceptFile:o,dropFileText:h,handleSelectFile:F,selectFileButtonText:f}),E&&p.jsx(Of,{disabled:D,isLoading:A,acceptFile:o,file:E,handleSelectFile:F,changeFileButtonText:c,reSendFile:x&&E?()=>j(E):void 0})]}),x&&p.jsx(Je,{children:x})]})}function Ff(t){const{disabled:e,filePath:r,isLoading:n,acceptImage:s,changeImageButtonText:i,handleSelectFile:a,reSendImage:o}=t;function u(){if(e)return;const c=document.createElement("input");c.type="file",c.accept=s,c.onchange=f=>{var g;const h=(g=f.target.files)==null?void 0:g[0];h&&a(h)},c.click()}return p.jsxs("div",{className:"arkynImageUploadHasFileContent",style:{backgroundImage:`url("${r}")`},children:[o&&p.jsx(Kr,{orientation:"bottom",text:"Reenviar imagem",children:p.jsx(Zr,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:n,onClick:o,icon:ce.RefreshCw,disabled:e})}),p.jsx(pt,{isLoading:n,onClick:u,variant:"outline",size:"sm",type:"button",disabled:e,children:i})]})}function xf(t){const{dropImageText:e,isLoading:r,acceptImage:n,handleSelectFile:s,selectImageButtonText:i,disabled:a}=t;function o(c){if(a)return;c.preventDefault();const f=c.dataTransfer.files[0];f&&s(f)}function u(){if(a)return;const c=document.createElement("input");c.type="file",c.accept=n,c.onchange=f=>{var g;const h=(g=f.target.files)==null?void 0:g[0];h&&s(h)},c.click()}return p.jsxs("div",{onDrop:o,className:"arkynImageUploadNoFileContent",children:[p.jsx(pt,{isLoading:r,onClick:u,variant:"ghost",size:"sm",type:"button",disabled:a,children:i}),p.jsx("p",{children:e})]})}function Wi(t){const{name:e,defaultValue:r="",label:n,showAsterisk:s=!1,action:i,fileName:a="file",className:o="",method:u="POST",acceptImage:c="image/*",fileResponseName:f="url",changeImageButtonText:h="Alterar imagem",selectImageButtonText:g="Selecionar imagem",dropImageText:D="Ou arraste e solte a imagem aqui",onChange:v,disabled:C=!1}=t,{fieldErrors:d}=Ye(),b=d==null?void 0:d[e],[y,w]=l.useState(r),[E,B]=l.useState(""),[A,O]=l.useState(null),[j,F]=l.useState(r),[x,P]=l.useState(!1);async function M($){if(C)return;P(!0),O($),B("");const q=new FormData;q.append(a,$),await fetch(i,{method:u,body:q}).then(async G=>await G.json()).then(G=>{G!=null&&G.error?B(G.error):w(G==null?void 0:G[f]),v&&v(G==null?void 0:G[f])}).catch(G=>{console.error(G),B("Erro ao enviar imagem")}).finally(()=>P(!1))}function I($){C||(F(URL.createObjectURL($)),M($))}const N=b||E,_=`arkynImageUpload ${N?"hasError":"noHasError"} ${j?"hasImage":"noHasImage"}`;return p.jsxs(We,{className:o,children:[n&&p.jsx(Ue,{showAsterisk:s,children:n}),p.jsxs("div",{className:_,children:[p.jsx("input",{type:"hidden",name:e,value:y||""}),!j&&p.jsx(xf,{disabled:C,isLoading:x,acceptImage:c,dropImageText:D,handleSelectFile:I,selectImageButtonText:g}),j&&p.jsx(Ff,{disabled:C,isLoading:x,acceptImage:c,filePath:j,handleSelectFile:I,changeImageButtonText:h,reSendImage:N&&A?()=>M(A):void 0})]}),N&&p.jsx(Je,{children:N})]})}function vr(t){const{name:e,disabled:r,title:n,style:s,variant:i="solid",label:a,className:o="",prefix:u,suffix:c,isLoading:f=!1,leftIcon:h,readOnly:g,onFocus:D,onBlur:v,errorMessage:C,showAsterisk:d,rightIcon:b,type:y="text",size:w="md",id:E,value:B,placeholder:A,...O}=t,{fieldErrors:j}=Ye(),[F,x]=l.useState(!1),P=l.useRef(null),M=E||l.useId(),I=C||(j==null?void 0:j[e]),N=!!I,T=r||f,_={md:20,lg:20}[w],$=b?"right":"left",q=$==="left"&&f,G=$==="right"&&f;function R(){T||!(P!=null&&P.current)||(x(!0),P.current.focus())}function re(J){x(!0),D&&D(J)}function Y(J){x(!1),v&&v(J)}if(y==="hidden")return p.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:P,...O});const Q=`arkynInput ${u?"hasPrefix":""} ${r?"disabled":""} ${c?"hasSuffix":""} ${i} ${w} ${T||g||f?"opacity":""} ${N?"errored":""} ${F?"focused":""}`;return p.jsxs(We,{className:o,children:[a&&p.jsx(Ue,{showAsterisk:d,htmlFor:M,children:a}),p.jsxs("section",{title:n,style:s,onClick:R,className:Q,children:[p.jsx(Ae,{iconSize:_,icon:u,className:"prefix"}),p.jsx(Ae,{show:q,iconSize:_,className:"spinner",icon:ce.Loader2}),p.jsx(Ae,{show:!f,icon:h,iconSize:_}),p.jsx("input",{disabled:T,readOnly:g,ref:P,onFocus:re,onBlur:Y,type:y,id:M,name:e,placeholder:T&&B||A,value:T?void 0:B,...O}),p.jsx(Ae,{show:!f,icon:b,iconSize:_}),p.jsx(Ae,{show:G,iconSize:_,className:"spinner",icon:ce.Loader2}),p.jsx(Ae,{iconSize:_,icon:c,className:"suffix"})]}),I&&p.jsx(Je,{children:I})]})}function mr(t){"@babel/helpers - typeof";return mr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mr(t)}function Pf(t,e){if(mr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(mr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Mf(t){var e=Pf(t,"string");return mr(e)=="symbol"?e:e+""}function H(t,e,r){return(e=Mf(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Hi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var as,Vi;function kf(){if(Vi)return as;Vi=1;var t=process.env.NODE_ENV,e=function(n,s,i,a,o,u,c,f){if(t!=="production"&&s===void 0)throw new Error("invariant requires an error message argument");if(!n){var h;if(s===void 0)h=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var g=[i,a,o,u,c,f],D=0;h=new Error(s.replace(/%s/g,function(){return g[D++]})),h.name="Invariant Violation"}throw h.framesToPop=1,h}};return as=e,as}var Tf=kf(),Pe=Hi(Tf),he=l.createContext(null);function Nf(){Pe(!!l.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=l.useContext(he);return Pe(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function If(t,e,r){return Object.keys(t).reduce(function(s,i){return e(s,t[i],i)},r)}function jf(t,e){Object.keys(t).forEach(r=>e(t[r],r))}function zf(t,e,r,n){var s={},i=(a,o)=>{var u=r[o];u!==e[o]&&(s[o]=u,a(n,u))};return jf(t,i),s}function _f(t,e,r){var n=If(r,function(i,a,o){return typeof t[o]=="function"&&i.push(google.maps.event.addListener(e,a,t[o])),i},[]);return n}function Uf(t){google.maps.event.removeListener(t)}function me(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];t.forEach(Uf)}function ve(t){var{updaterMap:e,eventMap:r,prevProps:n,nextProps:s,instance:i}=t,a=_f(s,i,r);return zf(e,n,s,i),a}var qi={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},Gi={extraMapTypes(t,e){e.forEach(function(n,s){t.mapTypes.set(String(s),n)})},center(t,e){t.setCenter(e)},clickableIcons(t,e){t.setClickableIcons(e)},heading(t,e){t.setHeading(e)},mapTypeId(t,e){t.setMapTypeId(e)},options(t,e){t.setOptions(e)},streetView(t,e){t.setStreetView(e)},tilt(t,e){t.setTilt(e)},zoom(t,e){t.setZoom(e)}};function Wf(t){var{children:e,options:r,id:n,mapContainerStyle:s,mapContainerClassName:i,center:a,onClick:o,onDblClick:u,onDrag:c,onDragEnd:f,onDragStart:h,onMouseMove:g,onMouseOut:D,onMouseOver:v,onMouseDown:C,onMouseUp:d,onRightClick:b,onCenterChanged:y,onLoad:w,onUnmount:E}=t,[B,A]=l.useState(null),O=l.useRef(null),[j,F]=l.useState(null),[x,P]=l.useState(null),[M,I]=l.useState(null),[N,T]=l.useState(null),[X,_]=l.useState(null),[$,q]=l.useState(null),[G,R]=l.useState(null),[re,Y]=l.useState(null),[ae,k]=l.useState(null),[S,W]=l.useState(null),[z,Z]=l.useState(null),[Q,J]=l.useState(null);return l.useEffect(()=>{r&&B!==null&&B.setOptions(r)},[B,r]),l.useEffect(()=>{B!==null&&typeof a<"u"&&B.setCenter(a)},[B,a]),l.useEffect(()=>{B&&u&&(x!==null&&google.maps.event.removeListener(x),P(google.maps.event.addListener(B,"dblclick",u)))},[u]),l.useEffect(()=>{B&&f&&(M!==null&&google.maps.event.removeListener(M),I(google.maps.event.addListener(B,"dragend",f)))},[f]),l.useEffect(()=>{B&&h&&(N!==null&&google.maps.event.removeListener(N),T(google.maps.event.addListener(B,"dragstart",h)))},[h]),l.useEffect(()=>{B&&C&&(X!==null&&google.maps.event.removeListener(X),_(google.maps.event.addListener(B,"mousedown",C)))},[C]),l.useEffect(()=>{B&&g&&($!==null&&google.maps.event.removeListener($),q(google.maps.event.addListener(B,"mousemove",g)))},[g]),l.useEffect(()=>{B&&D&&(G!==null&&google.maps.event.removeListener(G),R(google.maps.event.addListener(B,"mouseout",D)))},[D]),l.useEffect(()=>{B&&v&&(re!==null&&google.maps.event.removeListener(re),Y(google.maps.event.addListener(B,"mouseover",v)))},[v]),l.useEffect(()=>{B&&d&&(ae!==null&&google.maps.event.removeListener(ae),k(google.maps.event.addListener(B,"mouseup",d)))},[d]),l.useEffect(()=>{B&&b&&(S!==null&&google.maps.event.removeListener(S),W(google.maps.event.addListener(B,"rightclick",b)))},[b]),l.useEffect(()=>{B&&o&&(z!==null&&google.maps.event.removeListener(z),Z(google.maps.event.addListener(B,"click",o)))},[o]),l.useEffect(()=>{B&&c&&(Q!==null&&google.maps.event.removeListener(Q),J(google.maps.event.addListener(B,"drag",c)))},[c]),l.useEffect(()=>{B&&y&&(j!==null&&google.maps.event.removeListener(j),F(google.maps.event.addListener(B,"center_changed",y)))},[o]),l.useEffect(()=>{var ne=O.current===null?null:new google.maps.Map(O.current,r);return A(ne),ne!==null&&w&&w(ne),()=>{ne!==null&&E&&E(ne)}},[]),p.jsx("div",{id:n,ref:O,style:s,className:i,children:p.jsx(he.Provider,{value:B,children:B!==null?e:null})})}l.memo(Wf);class Hf extends l.PureComponent{constructor(){super(...arguments),H(this,"state",{map:null}),H(this,"registeredEvents",[]),H(this,"mapRef",null),H(this,"getInstance",()=>this.mapRef===null?null:new google.maps.Map(this.mapRef,this.props.options)),H(this,"panTo",e=>{var r=this.getInstance();r&&r.panTo(e)}),H(this,"setMapCallback",()=>{this.state.map!==null&&this.props.onLoad&&this.props.onLoad(this.state.map)}),H(this,"getRef",e=>{this.mapRef=e})}componentDidMount(){var e=this.getInstance();this.registeredEvents=ve({updaterMap:Gi,eventMap:qi,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{map:e}},this.setMapCallback)}componentDidUpdate(e){this.state.map!==null&&(me(this.registeredEvents),this.registeredEvents=ve({updaterMap:Gi,eventMap:qi,prevProps:e,nextProps:this.props,instance:this.state.map}))}componentWillUnmount(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),me(this.registeredEvents))}render(){return p.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:p.jsx(he.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})}}function Zi(t,e,r,n,s,i,a){try{var o=t[i](a),u=o.value}catch(c){return void r(c)}o.done?e(u):Promise.resolve(u).then(n,s)}function Ki(t){return function(){var e=this,r=arguments;return new Promise(function(n,s){var i=t.apply(e,r);function a(u){Zi(i,n,s,a,o,"next",u)}function o(u){Zi(i,n,s,a,o,"throw",u)}a(void 0)})}}function Xi(t){var{googleMapsApiKey:e,googleMapsClientId:r,version:n="weekly",language:s,region:i,libraries:a,channel:o,mapIds:u,authReferrerPolicy:c,apiUrl:f="https://maps.googleapis.com"}=t,h=[];return Pe(e&&r||!(e&&r),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?h.push("key=".concat(e)):r&&h.push("client=".concat(r)),n&&h.push("v=".concat(n)),s&&h.push("language=".concat(s)),i&&h.push("region=".concat(i)),a&&a.length&&h.push("libraries=".concat(a.sort().join(","))),o&&h.push("channel=".concat(o)),u&&u.length&&h.push("map_ids=".concat(u.join(","))),c&&h.push("auth_referrer_policy=".concat(c)),h.push("loading=async"),h.push("callback=initMap"),"".concat(f,"/maps/api/js?").concat(h.join("&"))}var zt=typeof document<"u";function Yi(t){var{url:e,id:r,nonce:n}=t;return zt?new Promise(function(i,a){var o=document.getElementById(r),u=window;if(o){var c=o.getAttribute("data-state");if(o.src===e&&c!=="error"){if(c==="ready")return i(r);var f=u.initMap,h=o.onerror;u.initMap=function(){f&&f(),i(r)},o.onerror=function(D){h&&h(D),a(D)};return}else o.remove()}var g=document.createElement("script");g.type="text/javascript",g.src=e,g.id=r,g.async=!0,g.nonce=n||"",g.onerror=function(v){g.setAttribute("data-state","error"),a(v)},u.initMap=function(){g.setAttribute("data-state","ready"),i(r)},document.head.appendChild(g)}).catch(s=>{throw console.error("injectScript error: ",s),s}):Promise.reject(new Error("document is undefined"))}function Ji(t){var e=t.href;return e&&(e.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||e.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:t.tagName.toLowerCase()==="style"&&t.styleSheet&&t.styleSheet.cssText&&t.styleSheet.cssText.replace(`\r
|
|
1
|
+
(function(te,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react"),require("lucide-react"),require("@arkyn/shared"),require("framer-motion"),require("react-dom"),require("@react-input/mask"),require("@arkyn/templates")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","lucide-react","@arkyn/shared","framer-motion","react-dom","@react-input/mask","@arkyn/templates"],p):(te=typeof globalThis<"u"?globalThis:te||self,p(te["@arkyn/components"]={},te.jsxRuntime,te.React$1,te.lucideReact,te.shared,te.framerMotion,te.ReactDOM,te.mask,te.templates))})(this,function(te,p,l,ce,qr,It,Rt,Si,er){"use strict";var mb=Object.defineProperty;var Cb=(te,p,l)=>p in te?mb(te,p,{enumerable:!0,configurable:!0,writable:!0,value:l}):te[p]=l;var ot=(te,p,l)=>Cb(te,typeof p!="symbol"?p+"":p,l);function Fi(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const ke=Fi(l),xi=Fi(Rt);function Pi(t){const{className:e,...r}=t,n=`arkynAlertTitle ${e}`;return p.jsx("div",{className:n.trim(),...r})}const Mi=l.createContext({});function rf(){return l.useContext(Mi)}function nf(t){const{schema:e,children:r,className:n,...s}=t,o=!(c=>{let f=!1;const h=g=>{Array.isArray(g)?g.forEach(h):g&&typeof g=="object"&&"type"in g&&(g.type===Pi?f=!0:g.props&&typeof g.props=="object"&&g.props!==null&&"children"in g.props&&h(g.props.children))};return h(c),f})(r)?"nonExistsAlertTitle":"existsAlertTitle",u=`arkynAlertContainer ${e} ${o} ${n}`;return p.jsx(Mi.Provider,{value:t,children:p.jsx("div",{className:u.trim(),...s,children:r})})}function sf(t){const{className:e,...r}=t,n=`arkynAlertContent ${e}`;return p.jsx("div",{className:n.trim(),...r})}function af(t){const{className:e,...r}=t,n=`arkynAlertDescription ${e}`;return p.jsx("div",{className:n.trim(),...r})}function of(t){const{className:e,...r}=t,{schema:n}=rf(),s=`arkynAlertIcon ${n} ${e}`;switch(n){case"success":return p.jsx(ce.CheckCircle2,{className:s,...r});case"danger":return p.jsx(ce.XCircle,{className:s,...r});case"warning":return p.jsx(ce.AlertTriangle,{className:s,...r});case"info":return p.jsx(ce.Info,{className:s,...r})}}function ki(t){function e(){return!t||t<=0?0:t>=100?100:t}const[r,n]=l.useState(e());function s(i){return i<=0?n(0):i>=100?n(100):n(i)}return[r,s]}function Ti(t){const{onChange:e,value:r,disabled:n=!1,onDragging:s,className:i="",...a}=t,[o,u]=l.useState(!1),c=l.useRef(null),f=()=>u(!0),h=()=>u(!1),g=b=>{if(n||!o||!c.current)return;const y=c.current.getBoundingClientRect(),w=b.clientX-y.left,E=Math.min(Math.max(w/y.width*100,0),100);e(E)},D=b=>{if(n||!c.current)return;const y=c.current.getBoundingClientRect(),w=b.clientX-y.left,E=Math.min(Math.max(w/y.width*100,0),100);e(E)};l.useEffect(()=>(o?(s&&s(!0),document.addEventListener("mousemove",g),document.addEventListener("mouseup",h)):(s&&s(!1),document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",h)),()=>{document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",h)}),[o]);const d=`arkynSliderTrack ${o?"isDragging":"isNotDragging"} ${n?"isDisabled":"isEnabled"} ${i}`;return p.jsxs("div",{...a,className:d,onMouseDown:f,onClick:D,ref:c,children:[p.jsx("div",{className:"arkynSliderFill",style:{width:`${r}%`}}),p.jsx("div",{className:"arkynSliderThumb",style:{left:`${r}%`}})]})}function Ni(t){var A,O,j,F;const{onPlayAudio:e,onPauseAudio:r,disabled:n,...s}=t,[i,a]=ki(0),[o,u]=l.useState(!1),[c,f]=l.useState(!1),h=l.useRef(null),g=(A=h.current)==null?void 0:A.currentTime,D=(O=h.current)==null?void 0:O.duration,v=b(g),C=b(D),d={totalTime:D,currentTime:g,formattedCurrentTime:v,formattedTotalTime:C};function b(x){if(!x)return"00:00";const P=Math.floor(x/60),M=Math.floor(x%60),I=String(P).padStart(2,"0"),N=String(M).padStart(2,"0");return`${I}:${N}`}function y(){const x=h.current;x&&(t.onPlayAudio&&t.onPlayAudio(d),x.play(),u(!0))}function w(){const x=h.current;x&&(t.onPauseAudio&&t.onPauseAudio(d),x.pause(),u(!1))}function E(){o?w():y()}function B(x){const P=h.current;if(!P)return;const M=P.duration,I=x/100*M;P.currentTime=I}return c||!o?(j=h.current)==null||j.pause():o&&((F=h.current)==null||F.play()),l.useEffect(()=>{const x=h.current;if(!x)return;const P=()=>{const M=x.duration,N=x.currentTime/M*100;a(N)};return x.addEventListener("timeupdate",P),()=>{x.removeEventListener("timeupdate",P)}},[]),p.jsxs("div",{className:"arkynAudioPlayer",children:[p.jsx("audio",{...s,ref:h,src:t.src,onEnded:w}),p.jsxs("button",{type:"button",disabled:n,onClick:E,children:[o&&p.jsx(ce.Pause,{}),!o&&p.jsx(ce.Play,{})]}),p.jsx("p",{children:v}),p.jsx(Ti,{value:i,onChange:B,onDragging:f,disabled:n}),p.jsx("p",{children:C})]})}const Ii=l.createContext({});function uf(t){const{children:e,fieldErrors:r,form:n}=t;return p.jsxs(Ii.Provider,{value:{fieldErrors:r},children:[!n&&e,n&&l.cloneElement(n,n.props,e)]})}function Ye(){return l.useContext(Ii)}function Je(t){const{children:e,className:r,...n}=t,s=`arkynFieldError ${r}`;return e?p.jsx("strong",{className:s.trim(),...n,children:e}):p.jsx(p.Fragment,{})}function Ue(t){const{showAsterisk:e=!1,className:r="",...n}=t,i=`arkynFieldLabel ${e?"asteriskTrue":"asteriskFalse"} ${r}`;return p.jsx("label",{className:i.trim(),...n})}function We(t){const{children:e,className:r,orientation:n="vertical",...s}=t,i=`arkynFieldWrapper ${r} ${n}`;return p.jsx("section",{className:i.trim(),...s,children:e})}function Ae(t){const{iconSize:e,icon:r,className:n,show:s=!0}=t;return s?r?typeof r=="string"?p.jsx("p",{className:n,children:r}):p.jsx("p",{className:n,children:p.jsx(r,{size:e,strokeWidth:2.5})}):p.jsx(p.Fragment,{}):p.jsx(p.Fragment,{})}function pt(t){const{isLoading:e=!1,scheme:r="primary",variant:n="solid",loadingText:s,size:i="md",leftIcon:a,rightIcon:o,disabled:u,className:c="",children:f,...h}=t,D={xs:12,sm:16,md:20,lg:24}[i],d=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${n} ${r} ${i} ${s?"loadingTextTrue":"loadingTextFalse"} ${c}`;return p.jsxs("button",{className:d,disabled:u||e,...h,children:[p.jsxs("div",{className:"arkynButtonSpinner",children:[p.jsx(ce.Loader2,{size:D,strokeWidth:2.5}),s&&s]}),p.jsxs("div",{className:"arkynButtonContent",children:[p.jsx(Ae,{iconSize:D,icon:a}),f,p.jsx(Ae,{iconSize:D,icon:o})]})]})}function Gr(t){const{className:e,orientation:r="horizontal",...n}=t,s=`arkynDivider ${r} ${e}`;return p.jsx("div",{className:s.trim(),...n})}function Zr(t){const{isLoading:e=!1,scheme:r="primary",variant:n="solid",size:s="md",icon:i,disabled:a,className:o="",...u}=t,c={xs:12,sm:16,md:20,lg:24},h=`arkynIconButton ${n} ${r} ${s} ${e?"loadingTrue":"loadingFalse"} ${o}`;return p.jsxs("button",{disabled:a||e,className:h.trim(),...u,children:[p.jsx("div",{className:"arkynIconButtonSpinner",children:p.jsx(ce.Loader2,{size:c[s],strokeWidth:2.5})}),p.jsx("div",{className:"arkynIconButtonContent",children:p.jsx(i,{size:c[s],strokeWidth:2.5})})]})}function Kr(t){const{text:e,size:r="lg",children:n,orientation:s="top",className:i="",...a}=t,o=l.useId(),u=l.useRef(null),[c,f]=l.useState(s);l.useEffect(()=>{const g=()=>{if(!u.current)return;const C=document.getElementById(o);C&&(f(s),requestAnimationFrame(()=>{const d=C.getBoundingClientRect(),b=window.innerWidth,y=window.innerHeight;let w=s;s==="left"&&d.left<0?w="right":s==="right"&&d.right>b?w="left":s==="top"&&d.top<0?w="bottom":s==="bottom"&&d.bottom>y&&(w="top"),w==="right"&&d.right>b?w="left":w==="left"&&d.left<0?w="right":w==="bottom"&&d.bottom>y?w="top":w==="top"&&d.top<0&&(w="bottom"),f(w)}))},D=u.current;if(!D)return;const v=()=>{setTimeout(g,1)};return D.addEventListener("mouseenter",v),window.addEventListener("resize",g),()=>{D.removeEventListener("mouseenter",v),window.removeEventListener("resize",g)}},[s,o]);const h=`arkynTooltip ${r} ${c} ${i}`;return p.jsxs("div",{className:h.trim(),...a,ref:u,children:[n,p.jsx("div",{className:"arkynTooltipText",id:o,dangerouslySetInnerHTML:{__html:e}})]})}function lf(t){const{filePath:e,disabled:r,acceptAudio:n,handleSelectFile:s,isLoading:i,reSendAudio:a,changeAudioButtonText:o}=t;function u(){if(r)return;const c=document.createElement("input");c.type="file",c.accept=n,c.onchange=f=>{var g;const h=(g=f.target.files)==null?void 0:g[0];h&&s(h)},c.click()}return p.jsxs("div",{className:"arkynAudioUploadHasFileContentContainer",children:[p.jsx(Ni,{src:e}),p.jsx(Gr,{}),p.jsxs("div",{className:"arkynAudioUploadButtonsContainer",children:[!!a&&p.jsx(Kr,{orientation:"bottom",text:"Reenviar áudio",children:p.jsx(Zr,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:i,onClick:a,icon:ce.RefreshCw,disabled:r})}),p.jsx(pt,{isLoading:i,onClick:u,variant:"outline",size:"sm",type:"button",disabled:r,children:o})]})]})}function cf(t){const{dropAudioText:e,isLoading:r,acceptAudio:n,handleSelectFile:s,selectAudioButtonText:i,disabled:a}=t;function o(c){if(a)return;c.preventDefault();const f=c.dataTransfer.files[0];f&&s(f)}function u(){if(a)return;const c=document.createElement("input");c.type="file",c.accept=n,c.onchange=f=>{var g;const h=(g=f.target.files)==null?void 0:g[0];h&&s(h)},c.click()}return p.jsxs("div",{onDrop:o,className:"arkynAudioUploadNoFileContent",children:[p.jsx(pt,{isLoading:r,onClick:u,variant:"ghost",size:"sm",type:"button",disabled:a,children:i}),p.jsx("p",{children:e})]})}function ff(t){const{name:e,label:r,fileName:n="file",method:s="POST",onChange:i,fileResponseName:a="url",selectAudioButtonText:o="Selecionar arquivo de áudio",dropAudioText:u="Ou arraste e solte um arquivo de áudio aqui",changeAudioButtonText:c="Trocar arquivo de áudio",acceptAudio:f="audio/*",action:h,defaultValue:g="",showAsterisk:D=!1,disabled:v=!1}=t,{fieldErrors:C}=Ye(),d=C==null?void 0:C[e],[b,y]=l.useState(g),[w,E]=l.useState(""),[B,A]=l.useState(null),[O,j]=l.useState(g),[F,x]=l.useState(!1);async function P(_){if(v)return;x(!0),A(_),E("");const $=new FormData;$.append(n,_),await fetch(h,{method:s,body:$}).then(async q=>await q.json()).then(q=>{q!=null&&q.error?E(q.error):y(q==null?void 0:q[a]),i&&i(q==null?void 0:q[a])}).catch(q=>{console.error(q),E("Erro ao enviar audio")}).finally(()=>x(!1))}function M(_){if(!v){if(_.type.indexOf("audio")===-1){E("O arquivo selecionado não é um arquivo de áudio");return}j(URL.createObjectURL(_)),P(_)}}const I=d||w,X=`arkynAudioUpload ${I?"hasError":"noHasError"} ${O?"hasAudio":"noHasAudio"}`;return p.jsxs(We,{children:[r&&p.jsx(Ue,{showAsterisk:D,children:r}),p.jsxs("div",{className:X,children:[p.jsx("input",{type:"hidden",name:e,value:b||""}),!O&&p.jsx(cf,{disabled:v,isLoading:F,acceptAudio:f,dropAudioText:u,handleSelectFile:M,selectAudioButtonText:o}),O&&p.jsx(lf,{filePath:O,acceptAudio:f,changeAudioButtonText:c,disabled:v,handleSelectFile:M,isLoading:F,reSendAudio:I&&B?()=>P(B):void 0})]}),I&&p.jsx(Je,{children:I})]})}function df(t){const{variant:e="ghost",scheme:r="primary",size:n="lg",leftIcon:s,rightIcon:i,className:a="",children:o,...u}=t,f={md:12,lg:14}[n],h=`arkynBadge ${e} ${r} ${n} ${a}`;return p.jsxs("div",{className:h.trim(),...u,children:[p.jsx(Ae,{iconSize:f,icon:s}),p.jsx("p",{children:o}),p.jsx(Ae,{iconSize:f,icon:i})]})}const ji=l.createContext({});function hf(){return l.useContext(ji)}function gf(t){return p.jsx(ji.Provider,{value:t,children:t.children})}function pf(t){const{children:e,disabled:r=!1,className:n="",onClick:s,value:i,...a}=t,{disabled:o,currentTab:u,changeCurrentTab:c}=hf(),f=o||r,D=`arkynCardTabButton ${f?"isDisabled":""} ${u===i&&i?"isActive":""} ${n}`;function v(C){c(i),s&&s(C)}return p.jsx("button",{onClick:v,className:D.trim(),...a,disabled:f,type:"button",children:e})}function vf(t){const{children:e,onChange:r,defaultValue:n,disabled:s=!1,className:i,...a}=t,[o,u]=l.useState(n||""),c=`arkynCardTabContainer ${i||""}`;function f(h){u(h),r&&r(h)}return p.jsx(gf,{disabled:s,currentTab:o,changeCurrentTab:f,children:p.jsx("nav",{className:c.trim(),...a,children:e})})}function mf(t){const{id:e,name:r,className:n="",size:s="md",errorMessage:i,defaultChecked:a=!1,label:o,checked:u=null,onCheck:c,orientation:f="horizontalReverse",value:h,...g}=t,{fieldErrors:D}=Ye(),v=l.useRef(null),C=e||l.useId(),d=i||(D==null?void 0:D[r]),b=!!d,[y,w]=l.useState(a||!1),E=typeof u=="boolean"?u:y,O=`arkynCheckbox ${s} ${b?"errorTrue":"errorFalse"} ${E?"checkedTrue":"checkedFalse"}`;function j(){const F=y;w(!F),c&&c(F?"":h||"checked")}return p.jsxs(We,{orientation:f,className:n,children:[o&&p.jsx(Ue,{htmlFor:C,children:o}),p.jsxs("button",{id:C,type:"button",className:O,onClick:j,...g,children:[p.jsx("input",{type:"hidden",name:r,ref:v,value:E?h||"checked":""}),p.jsx(ce.Check,{})]}),d&&p.jsx(Je,{children:d})]})}function Cf(){return()=>{}}function zi(){return l.useSyncExternalStore(Cf,()=>!0,()=>!1)}function Df(t){const{children:e,fallback:r=null}=t;return zi()?p.jsx(p.Fragment,{children:e()}):p.jsx(p.Fragment,{children:r})}function _i(t){let e=t;return typeof t=="string"?(e=+qr.removeNonNumeric(t),e%1!==0&&(e=e.toFixed(2))):e=Number.isInteger(t)?Number(t)*10**2:t.toFixed(2),+qr.removeNonNumeric(String(e))/10**2}function is(t,e){if(!t)return[0,qr.formatToCurrency(0,e)];const r=_i(t),n=qr.formatToCurrency(r,e);return[r,n]}function yf(t){const{name:e,disabled:r,title:n,style:s,variant:i="solid",label:a,className:o="",value:u,defaultValue:c,max:f=1e9,locale:h,onChange:g,prefix:D,suffix:v,isLoading:C=!1,leftIcon:d,readOnly:b,onFocus:y,onBlur:w,errorMessage:E,showAsterisk:B,rightIcon:A,size:O="md",id:j,...F}=t,{fieldErrors:x}=Ye(),[P,M]=l.useState(!1),[I,N]=l.useState("0"),T=l.useRef(null),X=j||l.useId(),_=E||(x==null?void 0:x[e]),$=!!_,q=r||C,R={md:20,lg:20}[O],re=A?"right":"left",Y=re==="left"&&C,ae=re==="right"&&C;function k(){q||!(T!=null&&T.current)||(M(!0),T.current.focus())}function S(ge){M(!0),y&&y(ge)}function W(ge){M(!1),w&&w(ge)}const z=ge=>{const[ye,De]=is(ge,h);return!f||ye<=f?(N(De),[ye,De]):is(ge,h)},Z=ge=>{ge.preventDefault();const[ye,De]=z(ge.target.value);g&&g(ge,String(ye),String(De))};l.useEffect(()=>{const ge=u||+c||void 0,[,ye]=is(ge,h);N(ye)},[h,c,u]);const le=`arkynCurrencyInput ${D?"hasPrefix":""} ${v?"hasSuffix":""} ${i} ${O} ${q||b||C?"opacity":""} ${$?"errored":""} ${P?"focused":""}`;return p.jsxs(We,{className:o,children:[a&&p.jsx(Ue,{showAsterisk:B,htmlFor:X,children:a}),p.jsxs("section",{title:n,style:s,className:le,onClick:k,children:[p.jsx(Ae,{iconSize:R,icon:D,className:"prefix"}),p.jsx(Ae,{show:Y,iconSize:R,className:"spinner",icon:ce.Loader2}),p.jsx(Ae,{show:!C,icon:d,iconSize:R}),p.jsx("input",{disabled:q,readOnly:b,ref:T,onFocus:S,onBlur:W,onChange:Z,id:X,placeholder:q?I:void 0,value:q?void 0:I,...F}),p.jsx("input",{type:"hidden",name:e,value:_i(I),readOnly:!0}),p.jsx(Ae,{show:!C,icon:A,iconSize:R}),p.jsx(Ae,{show:ae,iconSize:R,className:"spinner",icon:ce.Loader2}),p.jsx(Ae,{iconSize:R,icon:v,className:"suffix"})]}),_&&p.jsx(Je,{children:_})]})}function bf(){return typeof window>"u"?0:window.innerWidth-document.documentElement.clientWidth}function jt(t){l.useEffect(()=>{if(t){const e=document.body.style.overflow,r=document.body.style.paddingRight,n=bf();if(n>0){const s=window.getComputedStyle(document.body),i=parseInt(s.paddingRight)||0;document.body.style.paddingRight=`${i+n}px`}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e,document.body.style.paddingRight=r}}},[t])}const Ui=l.createContext({});function Ef(t){return p.jsx(Ui.Provider,{value:{makeInvisible:t.makeInvisible},children:t.children})}function wf(){return l.useContext(Ui)}function Bf(t){const{isVisible:e,makeInvisible:r,orientation:n="left",children:s,className:i,...a}=t;jt(e);const o=n==="left"?"-100%":"100%",c=`arkynDrawerContainer ${n} ${e?"visibleTrue":"visibleFalse"} ${i}`;return p.jsx(Ef,{makeInvisible:r,children:p.jsx(It.AnimatePresence,{children:e&&p.jsxs("aside",{className:c.trim(),...a,children:[p.jsx(It.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:r}),p.jsx(It.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${o})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${o})`},children:s})]})})})}function Af(t){const{showCloseButton:e=!0,className:r,children:n,...s}=t,{makeInvisible:i}=wf(),a=`arkynDrawerHeader ${r}`;return p.jsxs("header",{className:a.trim(),...s,children:[n,e&&p.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:i,"aria-label":"Close drawer",children:p.jsx(ce.X,{size:24})})]})}function Of(t){const{disabled:e,file:r,isLoading:n,acceptFile:s,changeFileButtonText:i,handleSelectFile:a,reSendFile:o}=t;function u(){if(e)return;const f=document.createElement("input");f.type="file",f.accept=s,f.onchange=h=>{var D;const g=(D=h.target.files)==null?void 0:D[0];g&&a(g)},f.click()}function c(){return r.type.startsWith("image/")?p.jsx(ce.FileImage,{}):r.type.startsWith("audio/")?p.jsx(ce.FileAudio,{}):r.type.startsWith("application/zip")?p.jsx(ce.FileArchive,{}):p.jsx(ce.File,{})}return p.jsxs("div",{className:"arkynFileUploadHasFileContent",children:[p.jsxs("section",{className:"arkynFileUploadFileContainer",children:[p.jsx(c,{}),p.jsx("p",{children:r.name})]}),p.jsx(Gr,{}),p.jsxs("div",{className:"arkynFileUploadButtonsContainer",children:[!!o&&p.jsx(Kr,{orientation:"bottom",text:"Reenviar arquivo",children:p.jsx(Zr,{type:"button","aria-label":"resend file",variant:"outline",scheme:"danger",size:"sm",isLoading:n,onClick:o,icon:ce.RefreshCw,disabled:e})}),p.jsx(pt,{isLoading:n,onClick:u,variant:"outline",size:"sm",type:"button",disabled:e,children:i})]})]})}function Lf(t){const{dropFileText:e,isLoading:r,acceptFile:n,handleSelectFile:s,selectFileButtonText:i,disabled:a}=t;function o(c){if(a)return;c.preventDefault();const f=c.dataTransfer.files[0];f&&s(f)}function u(){if(a)return;const c=document.createElement("input");c.type="file",c.accept=n,c.onchange=f=>{var g;const h=(g=f.target.files)==null?void 0:g[0];h&&s(h)},c.click()}return p.jsxs("div",{onDrop:o,className:"arkynFileUploadNoFileContent",children:[p.jsx(pt,{isLoading:r,onClick:u,variant:"ghost",size:"sm",type:"button",disabled:a,children:i}),p.jsx("p",{children:e})]})}function Sf(t){const{name:e,label:r,showAsterisk:n=!1,action:s,fileName:i="file",method:a="POST",acceptFile:o="*",fileResponseName:u="url",changeFileButtonText:c="Alterar arquivo",selectFileButtonText:f="Selecionar arquivo",dropFileText:h="Ou arraste e solte o arquivo aqui",onChange:g,disabled:D=!1}=t,{fieldErrors:v}=Ye(),C=v==null?void 0:v[e],[d,b]=l.useState(""),[y,w]=l.useState(""),[E,B]=l.useState(null),[A,O]=l.useState(!1);async function j(N){if(D)return;O(!0),B(N),w("");const T=new FormData;T.append(i,N),await fetch(s,{method:a,body:T}).then(async X=>await X.json()).then(X=>{X!=null&&X.error?w(X.error):b(X==null?void 0:X[u]),g&&g(X==null?void 0:X[u])}).catch(X=>{console.error(X),w("Erro ao enviar o arquivo")}).finally(()=>O(!1))}function F(N){D||j(N)}const x=C||y,I=`arkynFileUpload ${x?"hasError":"noHasError"} ${E?"hasFile":"noHasFile"}`;return p.jsxs(We,{children:[r&&p.jsx(Ue,{showAsterisk:n,children:r}),p.jsxs("div",{className:I,children:[p.jsx("input",{type:"hidden",name:e,value:d||""}),!E&&p.jsx(Lf,{disabled:D,isLoading:A,acceptFile:o,dropFileText:h,handleSelectFile:F,selectFileButtonText:f}),E&&p.jsx(Of,{disabled:D,isLoading:A,acceptFile:o,file:E,handleSelectFile:F,changeFileButtonText:c,reSendFile:x&&E?()=>j(E):void 0})]}),x&&p.jsx(Je,{children:x})]})}function Ff(t){const{disabled:e,filePath:r,isLoading:n,acceptImage:s,changeImageButtonText:i,handleSelectFile:a,reSendImage:o}=t;function u(){if(e)return;const c=document.createElement("input");c.type="file",c.accept=s,c.onchange=f=>{var g;const h=(g=f.target.files)==null?void 0:g[0];h&&a(h)},c.click()}return p.jsxs("div",{className:"arkynImageUploadHasFileContent",style:{backgroundImage:`url("${r}")`},children:[o&&p.jsx(Kr,{orientation:"bottom",text:"Reenviar imagem",children:p.jsx(Zr,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:n,onClick:o,icon:ce.RefreshCw,disabled:e})}),p.jsx(pt,{isLoading:n,onClick:u,variant:"outline",size:"sm",type:"button",disabled:e,children:i})]})}function xf(t){const{dropImageText:e,isLoading:r,acceptImage:n,handleSelectFile:s,selectImageButtonText:i,disabled:a}=t;function o(c){if(a)return;c.preventDefault();const f=c.dataTransfer.files[0];f&&s(f)}function u(){if(a)return;const c=document.createElement("input");c.type="file",c.accept=n,c.onchange=f=>{var g;const h=(g=f.target.files)==null?void 0:g[0];h&&s(h)},c.click()}return p.jsxs("div",{onDrop:o,className:"arkynImageUploadNoFileContent",children:[p.jsx(pt,{isLoading:r,onClick:u,variant:"ghost",size:"sm",type:"button",disabled:a,children:i}),p.jsx("p",{children:e})]})}function Wi(t){const{name:e,defaultValue:r="",label:n,showAsterisk:s=!1,action:i,fileName:a="file",className:o="",method:u="POST",acceptImage:c="image/*",fileResponseName:f="url",changeImageButtonText:h="Alterar imagem",selectImageButtonText:g="Selecionar imagem",dropImageText:D="Ou arraste e solte a imagem aqui",onChange:v,disabled:C=!1}=t,{fieldErrors:d}=Ye(),b=d==null?void 0:d[e],[y,w]=l.useState(r),[E,B]=l.useState(""),[A,O]=l.useState(null),[j,F]=l.useState(r),[x,P]=l.useState(!1);async function M($){if(C)return;P(!0),O($),B("");const q=new FormData;q.append(a,$),await fetch(i,{method:u,body:q}).then(async G=>await G.json()).then(G=>{G!=null&&G.error?B(G.error):w(G==null?void 0:G[f]),v&&v(G==null?void 0:G[f])}).catch(G=>{console.error(G),B("Erro ao enviar imagem")}).finally(()=>P(!1))}function I($){C||(F(URL.createObjectURL($)),M($))}const N=b||E,_=`arkynImageUpload ${N?"hasError":"noHasError"} ${j?"hasImage":"noHasImage"}`;return p.jsxs(We,{className:o,children:[n&&p.jsx(Ue,{showAsterisk:s,children:n}),p.jsxs("div",{className:_,children:[p.jsx("input",{type:"hidden",name:e,value:y||""}),!j&&p.jsx(xf,{disabled:C,isLoading:x,acceptImage:c,dropImageText:D,handleSelectFile:I,selectImageButtonText:g}),j&&p.jsx(Ff,{disabled:C,isLoading:x,acceptImage:c,filePath:j,handleSelectFile:I,changeImageButtonText:h,reSendImage:N&&A?()=>M(A):void 0})]}),N&&p.jsx(Je,{children:N})]})}function vr(t){const{name:e,disabled:r,title:n,style:s,variant:i="solid",label:a,className:o="",prefix:u,suffix:c,isLoading:f=!1,leftIcon:h,readOnly:g,onFocus:D,onBlur:v,errorMessage:C,showAsterisk:d,rightIcon:b,type:y="text",size:w="md",id:E,value:B,placeholder:A,...O}=t,{fieldErrors:j}=Ye(),[F,x]=l.useState(!1),P=l.useRef(null),M=E||l.useId(),I=C||(j==null?void 0:j[e]),N=!!I,T=r||f,_={md:20,lg:20}[w],$=b?"right":"left",q=$==="left"&&f,G=$==="right"&&f;function R(){T||!(P!=null&&P.current)||(x(!0),P.current.focus())}function re(J){x(!0),D&&D(J)}function Y(J){x(!1),v&&v(J)}if(y==="hidden")return p.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:P,...O});const Q=`arkynInput ${u?"hasPrefix":""} ${r?"disabled":""} ${c?"hasSuffix":""} ${i} ${w} ${T||g||f?"opacity":""} ${N?"errored":""} ${F?"focused":""}`;return p.jsxs(We,{className:o,children:[a&&p.jsx(Ue,{showAsterisk:d,htmlFor:M,children:a}),p.jsxs("section",{title:n,style:s,onClick:R,className:Q,children:[p.jsx(Ae,{iconSize:_,icon:u,className:"prefix"}),p.jsx(Ae,{show:q,iconSize:_,className:"spinner",icon:ce.Loader2}),p.jsx(Ae,{show:!f,icon:h,iconSize:_}),p.jsx("input",{disabled:T,readOnly:g,ref:P,onFocus:re,onBlur:Y,type:y,id:M,name:e,placeholder:T&&B||A,value:T?void 0:B,...O}),p.jsx(Ae,{show:!f,icon:b,iconSize:_}),p.jsx(Ae,{show:G,iconSize:_,className:"spinner",icon:ce.Loader2}),p.jsx(Ae,{iconSize:_,icon:c,className:"suffix"})]}),I&&p.jsx(Je,{children:I})]})}function mr(t){"@babel/helpers - typeof";return mr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mr(t)}function Pf(t,e){if(mr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(mr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Mf(t){var e=Pf(t,"string");return mr(e)=="symbol"?e:e+""}function H(t,e,r){return(e=Mf(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Hi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var as,Vi;function kf(){if(Vi)return as;Vi=1;var t=process.env.NODE_ENV,e=function(n,s,i,a,o,u,c,f){if(t!=="production"&&s===void 0)throw new Error("invariant requires an error message argument");if(!n){var h;if(s===void 0)h=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var g=[i,a,o,u,c,f],D=0;h=new Error(s.replace(/%s/g,function(){return g[D++]})),h.name="Invariant Violation"}throw h.framesToPop=1,h}};return as=e,as}var Tf=kf(),Pe=Hi(Tf),he=l.createContext(null);function Nf(){Pe(!!l.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=l.useContext(he);return Pe(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function If(t,e,r){return Object.keys(t).reduce(function(s,i){return e(s,t[i],i)},r)}function jf(t,e){Object.keys(t).forEach(r=>e(t[r],r))}function zf(t,e,r,n){var s={},i=(a,o)=>{var u=r[o];u!==e[o]&&(s[o]=u,a(n,u))};return jf(t,i),s}function _f(t,e,r){var n=If(r,function(i,a,o){return typeof t[o]=="function"&&i.push(google.maps.event.addListener(e,a,t[o])),i},[]);return n}function Uf(t){google.maps.event.removeListener(t)}function me(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];t.forEach(Uf)}function ve(t){var{updaterMap:e,eventMap:r,prevProps:n,nextProps:s,instance:i}=t,a=_f(s,i,r);return zf(e,n,s,i),a}var qi={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},Gi={extraMapTypes(t,e){e.forEach(function(n,s){t.mapTypes.set(String(s),n)})},center(t,e){t.setCenter(e)},clickableIcons(t,e){t.setClickableIcons(e)},heading(t,e){t.setHeading(e)},mapTypeId(t,e){t.setMapTypeId(e)},options(t,e){t.setOptions(e)},streetView(t,e){t.setStreetView(e)},tilt(t,e){t.setTilt(e)},zoom(t,e){t.setZoom(e)}};function Wf(t){var{children:e,options:r,id:n,mapContainerStyle:s,mapContainerClassName:i,center:a,onClick:o,onDblClick:u,onDrag:c,onDragEnd:f,onDragStart:h,onMouseMove:g,onMouseOut:D,onMouseOver:v,onMouseDown:C,onMouseUp:d,onRightClick:b,onCenterChanged:y,onLoad:w,onUnmount:E}=t,[B,A]=l.useState(null),O=l.useRef(null),[j,F]=l.useState(null),[x,P]=l.useState(null),[M,I]=l.useState(null),[N,T]=l.useState(null),[X,_]=l.useState(null),[$,q]=l.useState(null),[G,R]=l.useState(null),[re,Y]=l.useState(null),[ae,k]=l.useState(null),[S,W]=l.useState(null),[z,Z]=l.useState(null),[Q,J]=l.useState(null);return l.useEffect(()=>{r&&B!==null&&B.setOptions(r)},[B,r]),l.useEffect(()=>{B!==null&&typeof a<"u"&&B.setCenter(a)},[B,a]),l.useEffect(()=>{B&&u&&(x!==null&&google.maps.event.removeListener(x),P(google.maps.event.addListener(B,"dblclick",u)))},[u]),l.useEffect(()=>{B&&f&&(M!==null&&google.maps.event.removeListener(M),I(google.maps.event.addListener(B,"dragend",f)))},[f]),l.useEffect(()=>{B&&h&&(N!==null&&google.maps.event.removeListener(N),T(google.maps.event.addListener(B,"dragstart",h)))},[h]),l.useEffect(()=>{B&&C&&(X!==null&&google.maps.event.removeListener(X),_(google.maps.event.addListener(B,"mousedown",C)))},[C]),l.useEffect(()=>{B&&g&&($!==null&&google.maps.event.removeListener($),q(google.maps.event.addListener(B,"mousemove",g)))},[g]),l.useEffect(()=>{B&&D&&(G!==null&&google.maps.event.removeListener(G),R(google.maps.event.addListener(B,"mouseout",D)))},[D]),l.useEffect(()=>{B&&v&&(re!==null&&google.maps.event.removeListener(re),Y(google.maps.event.addListener(B,"mouseover",v)))},[v]),l.useEffect(()=>{B&&d&&(ae!==null&&google.maps.event.removeListener(ae),k(google.maps.event.addListener(B,"mouseup",d)))},[d]),l.useEffect(()=>{B&&b&&(S!==null&&google.maps.event.removeListener(S),W(google.maps.event.addListener(B,"rightclick",b)))},[b]),l.useEffect(()=>{B&&o&&(z!==null&&google.maps.event.removeListener(z),Z(google.maps.event.addListener(B,"click",o)))},[o]),l.useEffect(()=>{B&&c&&(Q!==null&&google.maps.event.removeListener(Q),J(google.maps.event.addListener(B,"drag",c)))},[c]),l.useEffect(()=>{B&&y&&(j!==null&&google.maps.event.removeListener(j),F(google.maps.event.addListener(B,"center_changed",y)))},[o]),l.useEffect(()=>{var ne=O.current===null?null:new google.maps.Map(O.current,r);return A(ne),ne!==null&&w&&w(ne),()=>{ne!==null&&E&&E(ne)}},[]),p.jsx("div",{id:n,ref:O,style:s,className:i,children:p.jsx(he.Provider,{value:B,children:B!==null?e:null})})}l.memo(Wf);class Hf extends l.PureComponent{constructor(){super(...arguments),H(this,"state",{map:null}),H(this,"registeredEvents",[]),H(this,"mapRef",null),H(this,"getInstance",()=>this.mapRef===null?null:new google.maps.Map(this.mapRef,this.props.options)),H(this,"panTo",e=>{var r=this.getInstance();r&&r.panTo(e)}),H(this,"setMapCallback",()=>{this.state.map!==null&&this.props.onLoad&&this.props.onLoad(this.state.map)}),H(this,"getRef",e=>{this.mapRef=e})}componentDidMount(){var e=this.getInstance();this.registeredEvents=ve({updaterMap:Gi,eventMap:qi,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{map:e}},this.setMapCallback)}componentDidUpdate(e){this.state.map!==null&&(me(this.registeredEvents),this.registeredEvents=ve({updaterMap:Gi,eventMap:qi,prevProps:e,nextProps:this.props,instance:this.state.map}))}componentWillUnmount(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),me(this.registeredEvents))}render(){return p.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:p.jsx(he.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})}}function Zi(t,e,r,n,s,i,a){try{var o=t[i](a),u=o.value}catch(c){return void r(c)}o.done?e(u):Promise.resolve(u).then(n,s)}function Ki(t){return function(){var e=this,r=arguments;return new Promise(function(n,s){var i=t.apply(e,r);function a(u){Zi(i,n,s,a,o,"next",u)}function o(u){Zi(i,n,s,a,o,"throw",u)}a(void 0)})}}function Xi(t){var{googleMapsApiKey:e,googleMapsClientId:r,version:n="weekly",language:s,region:i,libraries:a,channel:o,mapIds:u,authReferrerPolicy:c,apiUrl:f="https://maps.googleapis.com"}=t,h=[];return Pe(e&&r||!(e&&r),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?h.push("key=".concat(e)):r&&h.push("client=".concat(r)),n&&h.push("v=".concat(n)),s&&h.push("language=".concat(s)),i&&h.push("region=".concat(i)),a&&a.length&&h.push("libraries=".concat(a.sort().join(","))),o&&h.push("channel=".concat(o)),u&&u.length&&h.push("map_ids=".concat(u.join(","))),c&&h.push("auth_referrer_policy=".concat(c)),h.push("loading=async"),h.push("callback=initMap"),"".concat(f,"/maps/api/js?").concat(h.join("&"))}var zt=typeof document<"u";function Yi(t){var{url:e,id:r,nonce:n}=t;return zt?new Promise(function(i,a){var o=document.getElementById(r),u=window;if(o){var c=o.getAttribute("data-state");if(o.src===e&&c!=="error"){if(c==="ready")return i(r);var f=u.initMap,h=o.onerror;u.initMap=function(){f&&f(),i(r)},o.onerror=function(D){h&&h(D),a(D)};return}else o.remove()}var g=document.createElement("script");g.type="text/javascript",g.src=e,g.id=r,g.async=!0,g.nonce=n||"",g.onerror=function(v){g.setAttribute("data-state","error"),a(v)},u.initMap=function(){g.setAttribute("data-state","ready"),i(r)},document.head.appendChild(g)}).catch(s=>{throw console.error("injectScript error: ",s),s}):Promise.reject(new Error("document is undefined"))}function Ji(t){var e=t.href;return e&&(e.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||e.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:t.tagName.toLowerCase()==="style"&&t.styleSheet&&t.styleSheet.cssText&&t.styleSheet.cssText.replace(`\r
|
|
2
2
|
`,"").indexOf(".gm-style")===0?(t.styleSheet.cssText="",!0):t.tagName.toLowerCase()==="style"&&t.innerHTML&&t.innerHTML.replace(`\r
|
|
3
3
|
`,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function Qi(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(s,i){return Ji(s)||Reflect.apply(e,t,[s,i]),s};var r=t.appendChild.bind(t);t.appendChild=function(s){return Ji(s)||Reflect.apply(r,t,[s]),s}}}var Cr=!1;function $i(){return p.jsx("div",{children:"Loading..."})}var os={id:"script-loader",version:"weekly"};class Vf extends l.PureComponent{constructor(){super(...arguments),H(this,"check",null),H(this,"state",{loaded:!1}),H(this,"cleanupCallback",()=>{delete window.google.maps,this.injectScript()}),H(this,"isCleaningUp",Ki(function*(){function e(r){if(!Cr)r();else if(zt)var n=window.setInterval(function(){Cr||(window.clearInterval(n),r())},1)}return new Promise(e)})),H(this,"cleanup",()=>{Cr=!0;var e=document.getElementById(this.props.id);e&&e.parentNode&&e.parentNode.removeChild(e),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(n){return typeof n.src=="string"&&n.src.includes("maps.googleapis")}).forEach(function(n){n.parentNode&&n.parentNode.removeChild(n)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(n){return n.href==="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"}).forEach(function(n){n.parentNode&&n.parentNode.removeChild(n)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(n){return n.innerText!==void 0&&n.innerText.length>0&&n.innerText.includes(".gm-")}).forEach(function(n){n.parentNode&&n.parentNode.removeChild(n)})}),H(this,"injectScript",()=>{this.props.preventGoogleFontsLoading&&Qi(),Pe(!!this.props.id,'LoadScript requires "id" prop to be a string: %s',this.props.id);var e={id:this.props.id,nonce:this.props.nonce,url:Xi(this.props)};Yi(e).then(()=>{this.props.onLoad&&this.props.onLoad(),this.setState(function(){return{loaded:!0}})}).catch(r=>{this.props.onError&&this.props.onError(r),console.error(`
|
|
4
4
|
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(this.props.googleMapsApiKey||"-",") or Client ID (").concat(this.props.googleMapsClientId||"-",`) to <LoadScript />
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
`))})}),H(this,"getRef",e=>{this.check=e})}componentDidMount(){if(zt){if(window.google&&window.google.maps&&!Cr){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(r){console.error("Error at injecting script after cleaning up: ",r)})}}componentDidUpdate(e){this.props.libraries!==e.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),zt&&e.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))}componentWillUnmount(){if(zt){this.cleanup();var e=()=>{this.check||(delete window.google,Cr=!1)};window.setTimeout(e,1),this.props.onUnmount&&this.props.onUnmount()}}render(){return p.jsxs(p.Fragment,{children:[p.jsx("div",{ref:this.getRef}),this.state.loaded?this.props.children:this.props.loadingElement||p.jsx($i,{})]})}}H(Vf,"defaultProps",os);function qf(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}function us(t,e){if(t==null)return{};var r,n,s=qf(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.includes(r)||{}.propertyIsEnumerable.call(t,r)&&(s[r]=t[r])}return s}var Ri;function ea(t){var{id:e=os.id,version:r=os.version,nonce:n,googleMapsApiKey:s,googleMapsClientId:i,language:a,region:o,libraries:u,preventGoogleFontsLoading:c,channel:f,mapIds:h,authReferrerPolicy:g,apiUrl:D="https://maps.googleapis.com"}=t,v=l.useRef(!1),[C,d]=l.useState(!1),[b,y]=l.useState(void 0);l.useEffect(function(){return v.current=!0,()=>{v.current=!1}},[]),l.useEffect(function(){zt&&c&&Qi()},[c]),l.useEffect(function(){C&&Pe(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[C]);var w=Xi({version:r,googleMapsApiKey:s,googleMapsClientId:i,language:a,region:o,libraries:u,channel:f,mapIds:h,authReferrerPolicy:g,apiUrl:D});l.useEffect(function(){if(!zt)return;function A(){v.current&&(d(!0),Ri=w)}if(window.google&&window.google.maps&&Ri===w){A();return}Yi({id:e,url:w,nonce:n}).then(A).catch(function(j){v.current&&y(j),console.warn(`
|
|
7
7
|
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(s||"-",") or Client ID (").concat(i||"-",`)
|
|
8
8
|
Otherwise it is a Network issue.
|
|
9
|
-
`)),console.error(j)})},[e,w,n]);var E=l.useRef(void 0);return l.useEffect(function(){E.current&&u!==E.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),E.current=u},[u]),{isLoaded:C,loadError:b,url:w}}var Gf=["loadingElement","onLoad","onError","onUnmount","children"],Zf=p.jsx($i,{});function Kf(t){var{loadingElement:e,onLoad:r,onError:n,onUnmount:s,children:i}=t,a=us(t,Gf),{isLoaded:o,loadError:u}=ea(a);return l.useEffect(function(){o&&typeof r=="function"&&r()},[o,r]),l.useEffect(function(){u&&typeof n=="function"&&n(u)},[u,n]),l.useEffect(function(){return()=>{s&&s()}},[s]),o?i:e||Zf}l.memo(Kf),typeof SuppressedError=="function"&&SuppressedError;var ta;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(ta||(ta={}));function ra(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Xr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ra(Object(r),!0).forEach(function(n){H(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ra(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var na={},sa={options(t,e){t.setOptions(e)}};function Xf(t){var{options:e,onLoad:r,onUnmount:n}=t,s=l.useContext(he),[i,a]=l.useState(null);return l.useEffect(()=>{i!==null&&i.setMap(s)},[s]),l.useEffect(()=>{e&&i!==null&&i.setOptions(e)},[i,e]),l.useEffect(()=>{var o=new google.maps.TrafficLayer(Xr(Xr({},e),{},{map:s}));return a(o),r&&r(o),()=>{i!==null&&(n&&n(i),i.setMap(null))}},[]),null}l.memo(Xf);class Yf extends l.PureComponent{constructor(){super(...arguments),H(this,"state",{trafficLayer:null}),H(this,"setTrafficLayerCallback",()=>{this.state.trafficLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.trafficLayer)}),H(this,"registeredEvents",[])}componentDidMount(){var e=new google.maps.TrafficLayer(Xr(Xr({},this.props.options),{},{map:this.context}));this.registeredEvents=ve({updaterMap:sa,eventMap:na,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{trafficLayer:e}},this.setTrafficLayerCallback)}componentDidUpdate(e){this.state.trafficLayer!==null&&(me(this.registeredEvents),this.registeredEvents=ve({updaterMap:sa,eventMap:na,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))}componentWillUnmount(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),me(this.registeredEvents),this.state.trafficLayer.setMap(null))}render(){return null}}H(Yf,"contextType",he);function Jf(t){var{onLoad:e,onUnmount:r}=t,n=l.useContext(he),[s,i]=l.useState(null);return l.useEffect(()=>{s!==null&&s.setMap(n)},[n]),l.useEffect(()=>{var a=new google.maps.BicyclingLayer;return i(a),a.setMap(n),e&&e(a),()=>{a!==null&&(r&&r(a),a.setMap(null))}},[]),null}l.memo(Jf);class Qf extends l.PureComponent{constructor(){super(...arguments),H(this,"state",{bicyclingLayer:null}),H(this,"setBicyclingLayerCallback",()=>{this.state.bicyclingLayer!==null&&(this.state.bicyclingLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.bicyclingLayer))})}componentDidMount(){var e=new google.maps.BicyclingLayer;this.setState(()=>({bicyclingLayer:e}),this.setBicyclingLayerCallback)}componentWillUnmount(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))}render(){return null}}H(Qf,"contextType",he);function $f(t){var{onLoad:e,onUnmount:r}=t,n=l.useContext(he),[s,i]=l.useState(null);return l.useEffect(()=>{s!==null&&s.setMap(n)},[n]),l.useEffect(()=>{var a=new google.maps.TransitLayer;return i(a),a.setMap(n),e&&e(a),()=>{s!==null&&(r&&r(s),s.setMap(null))}},[]),null}l.memo($f);class Rf extends l.PureComponent{constructor(){super(...arguments),H(this,"state",{transitLayer:null}),H(this,"setTransitLayerCallback",()=>{this.state.transitLayer!==null&&(this.state.transitLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.transitLayer))})}componentDidMount(){var e=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:e}},this.setTransitLayerCallback)}componentWillUnmount(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))}render(){return null}}H(Rf,"contextType",he);function ia(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Yr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ia(Object(r),!0).forEach(function(n){H(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ia(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var aa={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},oa={drawingMode(t,e){t.setDrawingMode(e)},options(t,e){t.setOptions(e)}};function ed(t){var{options:e,drawingMode:r,onCircleComplete:n,onMarkerComplete:s,onOverlayComplete:i,onPolygonComplete:a,onPolylineComplete:o,onRectangleComplete:u,onLoad:c,onUnmount:f}=t,h=l.useContext(he),[g,D]=l.useState(null),[v,C]=l.useState(null),[d,b]=l.useState(null),[y,w]=l.useState(null),[E,B]=l.useState(null),[A,O]=l.useState(null),[j,F]=l.useState(null);return l.useEffect(()=>{g!==null&&g.setMap(h)},[h]),l.useEffect(()=>{e&&g!==null&&g.setOptions(e)},[g,e]),l.useEffect(()=>{g!==null&&g.setDrawingMode(r??null)},[g,r]),l.useEffect(()=>{g&&n&&(v!==null&&google.maps.event.removeListener(v),C(google.maps.event.addListener(g,"circlecomplete",n)))},[g,n]),l.useEffect(()=>{g&&s&&(d!==null&&google.maps.event.removeListener(d),b(google.maps.event.addListener(g,"markercomplete",s)))},[g,s]),l.useEffect(()=>{g&&i&&(y!==null&&google.maps.event.removeListener(y),w(google.maps.event.addListener(g,"overlaycomplete",i)))},[g,i]),l.useEffect(()=>{g&&a&&(E!==null&&google.maps.event.removeListener(E),B(google.maps.event.addListener(g,"polygoncomplete",a)))},[g,a]),l.useEffect(()=>{g&&o&&(A!==null&&google.maps.event.removeListener(A),O(google.maps.event.addListener(g,"polylinecomplete",o)))},[g,o]),l.useEffect(()=>{g&&u&&(j!==null&&google.maps.event.removeListener(j),F(google.maps.event.addListener(g,"rectanglecomplete",u)))},[g,u]),l.useEffect(()=>{Pe(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var x=new google.maps.drawing.DrawingManager(Yr(Yr({},e),{},{map:h}));return r&&x.setDrawingMode(r),n&&C(google.maps.event.addListener(x,"circlecomplete",n)),s&&b(google.maps.event.addListener(x,"markercomplete",s)),i&&w(google.maps.event.addListener(x,"overlaycomplete",i)),a&&B(google.maps.event.addListener(x,"polygoncomplete",a)),o&&O(google.maps.event.addListener(x,"polylinecomplete",o)),u&&F(google.maps.event.addListener(x,"rectanglecomplete",u)),D(x),c&&c(x),()=>{g!==null&&(v&&google.maps.event.removeListener(v),d&&google.maps.event.removeListener(d),y&&google.maps.event.removeListener(y),E&&google.maps.event.removeListener(E),A&&google.maps.event.removeListener(A),j&&google.maps.event.removeListener(j),f&&f(g),g.setMap(null))}},[]),null}l.memo(ed);class td extends l.PureComponent{constructor(e){super(e),H(this,"registeredEvents",[]),H(this,"state",{drawingManager:null}),H(this,"setDrawingManagerCallback",()=>{this.state.drawingManager!==null&&this.props.onLoad&&this.props.onLoad(this.state.drawingManager)}),Pe(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing)}componentDidMount(){var e=new google.maps.drawing.DrawingManager(Yr(Yr({},this.props.options),{},{map:this.context}));this.registeredEvents=ve({updaterMap:oa,eventMap:aa,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{drawingManager:e}},this.setDrawingManagerCallback)}componentDidUpdate(e){this.state.drawingManager!==null&&(me(this.registeredEvents),this.registeredEvents=ve({updaterMap:oa,eventMap:aa,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))}componentWillUnmount(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),me(this.registeredEvents),this.state.drawingManager.setMap(null))}render(){return null}}H(td,"contextType",he);function ua(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function tr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ua(Object(r),!0).forEach(function(n){H(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ua(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var la={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},ca={animation(t,e){t.setAnimation(e)},clickable(t,e){t.setClickable(e)},cursor(t,e){t.setCursor(e)},draggable(t,e){t.setDraggable(e)},icon(t,e){t.setIcon(e)},label(t,e){t.setLabel(e)},map(t,e){t.setMap(e)},opacity(t,e){t.setOpacity(e)},options(t,e){t.setOptions(e)},position(t,e){t.setPosition(e)},shape(t,e){t.setShape(e)},title(t,e){t.setTitle(e)},visible(t,e){t.setVisible(e)},zIndex(t,e){t.setZIndex(e)}},Jr={};function rd(t){var{position:e,options:r,clusterer:n,noClustererRedraw:s,children:i,draggable:a,visible:o,animation:u,clickable:c,cursor:f,icon:h,label:g,opacity:D,shape:v,title:C,zIndex:d,onClick:b,onDblClick:y,onDrag:w,onDragEnd:E,onDragStart:B,onMouseOut:A,onMouseOver:O,onMouseUp:j,onMouseDown:F,onRightClick:x,onClickableChanged:P,onCursorChanged:M,onAnimationChanged:I,onDraggableChanged:N,onFlatChanged:T,onIconChanged:X,onPositionChanged:_,onShapeChanged:$,onTitleChanged:q,onVisibleChanged:G,onZindexChanged:R,onLoad:re,onUnmount:Y}=t,ae=l.useContext(he),[k,S]=l.useState(null),[W,z]=l.useState(null),[Z,Q]=l.useState(null),[J,ne]=l.useState(null),[oe,ue]=l.useState(null),[le,ge]=l.useState(null),[ye,De]=l.useState(null),[xe,Ne]=l.useState(null),[Ze,we]=l.useState(null),[_e,et]=l.useState(null),[Ee,Be]=l.useState(null),[at,ze]=l.useState(null),[Ke,ht]=l.useState(null),[Xe,dr]=l.useState(null),[gt,Et]=l.useState(null),[hr,Rn]=l.useState(null),[gr,es]=l.useState(null),[pr,ts]=l.useState(null),[Qc,$c]=l.useState(null),[rs,Rc]=l.useState(null),[ns,ef]=l.useState(null),[ss,tf]=l.useState(null);l.useEffect(()=>{k!==null&&k.setMap(ae)},[ae]),l.useEffect(()=>{typeof r<"u"&&k!==null&&k.setOptions(r)},[k,r]),l.useEffect(()=>{typeof a<"u"&&k!==null&&k.setDraggable(a)},[k,a]),l.useEffect(()=>{e&&k!==null&&k.setPosition(e)},[k,e]),l.useEffect(()=>{typeof o<"u"&&k!==null&&k.setVisible(o)},[k,o]),l.useEffect(()=>{k==null||k.setAnimation(u)},[k,u]),l.useEffect(()=>{k&&c!==void 0&&k.setClickable(c)},[k,c]),l.useEffect(()=>{k&&f!==void 0&&k.setCursor(f)},[k,f]),l.useEffect(()=>{k&&h!==void 0&&k.setIcon(h)},[k,h]),l.useEffect(()=>{k&&g!==void 0&&k.setLabel(g)},[k,g]),l.useEffect(()=>{k&&D!==void 0&&k.setOpacity(D)},[k,D]),l.useEffect(()=>{k&&v!==void 0&&k.setShape(v)},[k,v]),l.useEffect(()=>{k&&C!==void 0&&k.setTitle(C)},[k,C]),l.useEffect(()=>{k&&d!==void 0&&k.setZIndex(d)},[k,d]),l.useEffect(()=>{k&&y&&(W!==null&&google.maps.event.removeListener(W),z(google.maps.event.addListener(k,"dblclick",y)))},[y]),l.useEffect(()=>{k&&E&&(Z!==null&&google.maps.event.removeListener(Z),Q(google.maps.event.addListener(k,"dragend",E)))},[E]),l.useEffect(()=>{k&&B&&(J!==null&&google.maps.event.removeListener(J),ne(google.maps.event.addListener(k,"dragstart",B)))},[B]),l.useEffect(()=>{k&&F&&(oe!==null&&google.maps.event.removeListener(oe),ue(google.maps.event.addListener(k,"mousedown",F)))},[F]),l.useEffect(()=>{k&&A&&(le!==null&&google.maps.event.removeListener(le),ge(google.maps.event.addListener(k,"mouseout",A)))},[A]),l.useEffect(()=>{k&&O&&(ye!==null&&google.maps.event.removeListener(ye),De(google.maps.event.addListener(k,"mouseover",O)))},[O]),l.useEffect(()=>{k&&j&&(xe!==null&&google.maps.event.removeListener(xe),Ne(google.maps.event.addListener(k,"mouseup",j)))},[j]),l.useEffect(()=>{k&&x&&(Ze!==null&&google.maps.event.removeListener(Ze),we(google.maps.event.addListener(k,"rightclick",x)))},[x]),l.useEffect(()=>{k&&b&&(_e!==null&&google.maps.event.removeListener(_e),et(google.maps.event.addListener(k,"click",b)))},[b]),l.useEffect(()=>{k&&w&&(Ee!==null&&google.maps.event.removeListener(Ee),Be(google.maps.event.addListener(k,"drag",w)))},[w]),l.useEffect(()=>{k&&P&&(at!==null&&google.maps.event.removeListener(at),ze(google.maps.event.addListener(k,"clickable_changed",P)))},[P]),l.useEffect(()=>{k&&M&&(Ke!==null&&google.maps.event.removeListener(Ke),ht(google.maps.event.addListener(k,"cursor_changed",M)))},[M]),l.useEffect(()=>{k&&I&&(Xe!==null&&google.maps.event.removeListener(Xe),dr(google.maps.event.addListener(k,"animation_changed",I)))},[I]),l.useEffect(()=>{k&&N&&(gt!==null&&google.maps.event.removeListener(gt),Et(google.maps.event.addListener(k,"draggable_changed",N)))},[N]),l.useEffect(()=>{k&&T&&(hr!==null&&google.maps.event.removeListener(hr),Rn(google.maps.event.addListener(k,"flat_changed",T)))},[T]),l.useEffect(()=>{k&&X&&(gr!==null&&google.maps.event.removeListener(gr),es(google.maps.event.addListener(k,"icon_changed",X)))},[X]),l.useEffect(()=>{k&&_&&(pr!==null&&google.maps.event.removeListener(pr),ts(google.maps.event.addListener(k,"position_changed",_)))},[_]),l.useEffect(()=>{k&&$&&(Qc!==null&&google.maps.event.removeListener(Qc),$c(google.maps.event.addListener(k,"shape_changed",$)))},[$]),l.useEffect(()=>{k&&q&&(rs!==null&&google.maps.event.removeListener(rs),Rc(google.maps.event.addListener(k,"title_changed",q)))},[q]),l.useEffect(()=>{k&&G&&(ns!==null&&google.maps.event.removeListener(ns),ef(google.maps.event.addListener(k,"visible_changed",G)))},[G]),l.useEffect(()=>{k&&R&&(ss!==null&&google.maps.event.removeListener(ss),tf(google.maps.event.addListener(k,"zindex_changed",R)))},[R]),l.useEffect(()=>{var Vr=tr(tr(tr({},r||Jr),n?Jr:{map:ae}),{},{position:e}),de=new google.maps.Marker(Vr);return n?n.addMarker(de,!!s):de.setMap(ae),e&&de.setPosition(e),typeof o<"u"&&de.setVisible(o),typeof a<"u"&&de.setDraggable(a),typeof c<"u"&&de.setClickable(c),typeof f=="string"&&de.setCursor(f),h&&de.setIcon(h),typeof g<"u"&&de.setLabel(g),typeof D<"u"&&de.setOpacity(D),v&&de.setShape(v),typeof C=="string"&&de.setTitle(C),typeof d=="number"&&de.setZIndex(d),y&&z(google.maps.event.addListener(de,"dblclick",y)),E&&Q(google.maps.event.addListener(de,"dragend",E)),B&&ne(google.maps.event.addListener(de,"dragstart",B)),F&&ue(google.maps.event.addListener(de,"mousedown",F)),A&&ge(google.maps.event.addListener(de,"mouseout",A)),O&&De(google.maps.event.addListener(de,"mouseover",O)),j&&Ne(google.maps.event.addListener(de,"mouseup",j)),x&&we(google.maps.event.addListener(de,"rightclick",x)),b&&et(google.maps.event.addListener(de,"click",b)),w&&Be(google.maps.event.addListener(de,"drag",w)),P&&ze(google.maps.event.addListener(de,"clickable_changed",P)),M&&ht(google.maps.event.addListener(de,"cursor_changed",M)),I&&dr(google.maps.event.addListener(de,"animation_changed",I)),N&&Et(google.maps.event.addListener(de,"draggable_changed",N)),T&&Rn(google.maps.event.addListener(de,"flat_changed",T)),X&&es(google.maps.event.addListener(de,"icon_changed",X)),_&&ts(google.maps.event.addListener(de,"position_changed",_)),$&&$c(google.maps.event.addListener(de,"shape_changed",$)),q&&Rc(google.maps.event.addListener(de,"title_changed",q)),G&&ef(google.maps.event.addListener(de,"visible_changed",G)),R&&tf(google.maps.event.addListener(de,"zindex_changed",R)),S(de),re&&re(de),()=>{W!==null&&google.maps.event.removeListener(W),Z!==null&&google.maps.event.removeListener(Z),J!==null&&google.maps.event.removeListener(J),oe!==null&&google.maps.event.removeListener(oe),le!==null&&google.maps.event.removeListener(le),ye!==null&&google.maps.event.removeListener(ye),xe!==null&&google.maps.event.removeListener(xe),Ze!==null&&google.maps.event.removeListener(Ze),_e!==null&&google.maps.event.removeListener(_e),at!==null&&google.maps.event.removeListener(at),Ke!==null&&google.maps.event.removeListener(Ke),Xe!==null&&google.maps.event.removeListener(Xe),gt!==null&&google.maps.event.removeListener(gt),hr!==null&&google.maps.event.removeListener(hr),gr!==null&&google.maps.event.removeListener(gr),pr!==null&&google.maps.event.removeListener(pr),rs!==null&&google.maps.event.removeListener(rs),ns!==null&&google.maps.event.removeListener(ns),ss!==null&&google.maps.event.removeListener(ss),Y&&Y(de),n?n.removeMarker(de,!!s):de&&de.setMap(null)}},[]);var pb=l.useMemo(()=>i?l.Children.map(i,Vr=>{if(!l.isValidElement(Vr))return Vr;var de=Vr;return l.cloneElement(de,{anchor:k})}):null,[i,k]);return p.jsx(p.Fragment,{children:pb})||null}l.memo(rd);class fa extends l.PureComponent{constructor(){super(...arguments),H(this,"registeredEvents",[])}componentDidMount(){var e=this;return Ki(function*(){var r=tr(tr(tr({},e.props.options||Jr),e.props.clusterer?Jr:{map:e.context}),{},{position:e.props.position});e.marker=new google.maps.Marker(r),e.props.clusterer?e.props.clusterer.addMarker(e.marker,!!e.props.noClustererRedraw):e.marker.setMap(e.context),e.registeredEvents=ve({updaterMap:ca,eventMap:la,prevProps:{},nextProps:e.props,instance:e.marker}),e.props.onLoad&&e.props.onLoad(e.marker)})()}componentDidUpdate(e){this.marker&&(me(this.registeredEvents),this.registeredEvents=ve({updaterMap:ca,eventMap:la,prevProps:e,nextProps:this.props,instance:this.marker}))}componentWillUnmount(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),me(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))}render(){var e=this.props.children?l.Children.map(this.props.children,r=>{if(!l.isValidElement(r))return r;var n=r;return l.cloneElement(n,{anchor:this.marker})}):null;return e||null}}H(fa,"contextType",he);var nd=function(){function t(e,r){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=r,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var r=this.cluster.getClusterer();if(google.maps.event.trigger(r,"click",this.cluster),google.maps.event.trigger(r,"clusterclick",this.cluster),r.getZoomOnClick()){var n=r.getMaxZoom(),s=this.cluster.getBounds(),i=r.getMap();i!==null&&"fitBounds"in i&&i.fitBounds(s),this.timeOut=window.setTimeout(function(){var a=r.getMap();if(a!==null){"fitBounds"in a&&a.fitBounds(s);var o=a.getZoom()||0;n!==null&&o>n&&a.setZoom(n+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var r=this.getMap();r!==null&&(this.boundsChangedListener=google.maps.event.addListener(r,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,r,n,s,i,a;if(this.div&&this.center){var o=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,u=this.backgroundPosition.split(" "),c=parseInt(((e=u[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((r=u[1])===null||r===void 0?void 0:r.replace(/^\s+|\s+$/g,""))||"0",10),h=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(h!==null?"".concat(h.y,"px"):"0","; left: ").concat(h!==null?"".concat(h.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var g=document.createElement("img");g.alt=o,g.src=this.url,g.width=this.width,g.height=this.height,g.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(c,"px")),this.cluster.getClusterer().enableRetinaIcons||(g.style.clip="rect(-".concat(f,"px, -").concat(c+this.width,"px, -").concat(f+this.height,", -").concat(c,")"));var D=document.createElement("div");D.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((n=this.sums)===null||n===void 0)&&n.text&&(D.innerText="".concat((s=this.sums)===null||s===void 0?void 0:s.text)),!((i=this.sums)===null||i===void 0)&&i.html&&(D.innerHTML="".concat((a=this.sums)===null||a===void 0?void 0:a.html)),this.div.innerHTML="",this.div.appendChild(g),this.div.appendChild(D),this.div.title=o,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var r=this.cluster.getClusterer().getStyles(),n=r[Math.min(r.length-1,Math.max(0,e.index-1))];n&&(this.url=n.url,this.height=n.height,this.width=n.width,n.className&&(this.className="".concat(this.clusterClassName," ").concat(n.className)),this.anchorText=n.anchorText||[0,0],this.anchorIcon=n.anchorIcon||[this.height/2,this.width/2],this.textColor=n.textColor||"black",this.textSize=n.textSize||11,this.textDecoration=n.textDecoration||"none",this.fontWeight=n.fontWeight||"bold",this.fontStyle=n.fontStyle||"normal",this.fontFamily=n.fontFamily||"Arial,sans-serif",this.backgroundPosition=n.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var r=this.getProjection().fromLatLngToDivPixel(e);return r!==null&&(r.x-=this.anchorIcon[1],r.y-=this.anchorIcon[0]),r},t}(),sd=function(){function t(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new nd(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),r=this.getMarkers(),n=0,s=r;n<s.length;n++){var i=s[n],a=i.getPosition();a&&e.extend(a)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var r;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var n=e.getPosition();if(n){var s=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(s-1)+n.lat())/s,(this.center.lng()*(s-1)+n.lng())/s),this.calculateBounds()}}}else{var n=e.getPosition();n&&(this.center=n,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var i=this.markers.length,a=this.markerClusterer.getMaxZoom(),o=(r=this.map)===null||r===void 0?void 0:r.getZoom();if(a!==null&&typeof o<"u"&&o>a)e.getMap()!==this.map&&e.setMap(this.map);else if(i<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(i===this.minClusterSize)for(var u=0,c=this.markers;u<c.length;u++){var f=c[u];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var r=e.getPosition();if(r)return this.bounds.contains(r)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,r=this.markers.length,n=this.markerClusterer.getMaxZoom(),s=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(n!==null&&typeof s<"u"&&s>n){this.clusterIcon.hide();return}if(r<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var r=0;r<this.markers.length;r++)if(e===this.markers[r])return!0;return!1},t}();function id(t,e){var r=t.length,n=r.toString().length,s=Math.min(n,e);return{text:r.toString(),index:s,title:""}}var ad=2e3,od=500,ud="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",ld="png",cd=[53,56,66,78,90],fd="cluster",da=function(){function t(e,r,n){r===void 0&&(r=[]),n===void 0&&(n={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=n.gridSize||60,this.minClusterSize=n.minimumClusterSize||2,this.maxZoom=n.maxZoom||null,this.styles=n.styles||[],this.title=n.title||"",this.zoomOnClick=!0,n.zoomOnClick!==void 0&&(this.zoomOnClick=n.zoomOnClick),this.averageCenter=!1,n.averageCenter!==void 0&&(this.averageCenter=n.averageCenter),this.ignoreHidden=!1,n.ignoreHidden!==void 0&&(this.ignoreHidden=n.ignoreHidden),this.enableRetinaIcons=!1,n.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=n.enableRetinaIcons),this.imagePath=n.imagePath||ud,this.imageExtension=n.imageExtension||ld,this.imageSizes=n.imageSizes||cd,this.calculator=n.calculator||id,this.batchSize=n.batchSize||ad,this.batchSizeIE=n.batchSizeIE||od,this.clusterClass=n.clusterClass||fd,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(r,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,r;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((r=this.getMap())===null||r===void 0?void 0:r.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,r=this.markers;e<r.length;e++){var n=r[e];n.getMap()!==this.activeMap&&n.setMap(this.activeMap)}for(var s=0,i=this.clusters;s<i.length;s++){var a=i[s];a.remove()}this.clusters=[];for(var o=0,u=this.listeners;o<u.length;o++){var c=u[o];google.maps.event.removeListener(c)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),r=new google.maps.LatLngBounds,n=0,s=e;n<s.length;n++){var i=s[n],a=i.getPosition();a&&r.extend(a)}var o=this.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(r)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,r){this.pushMarkerTo(e),r||this.redraw()},t.prototype.addMarkers=function(e,r){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var s=e[n];s&&this.pushMarkerTo(s)}r||this.redraw()},t.prototype.pushMarkerTo=function(e){var r=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){r.ready&&(e.isAdded=!1,r.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var r=-1;if(this.markers.indexOf)r=this.markers.indexOf(e);else for(var n=0;n<this.markers.length;n++)if(e===this.markers[n]){r=n;break}return r===-1?!1:(e.setMap(null),this.markers.splice(r,1),!0)},t.prototype.removeMarker=function(e,r){var n=this.removeMarker_(e);return!r&&n&&this.repaint(),n},t.prototype.removeMarkers=function(e,r){for(var n=!1,s=0,i=e;s<i.length;s++){var a=i[s];n=n||this.removeMarker_(a)}return!r&&n&&this.repaint(),n},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var n=0,s=e;n<s.length;n++){var i=s[n];i.remove()}},0)},t.prototype.getExtendedBounds=function(e){var r=this.getProjection(),n=r.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));n!==null&&(n.x+=this.gridSize,n.y-=this.gridSize);var s=r.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(s!==null&&(s.x-=this.gridSize,s.y+=this.gridSize),n!==null){var i=r.fromDivPixelToLatLng(n);i!==null&&e.extend(i)}if(s!==null){var a=r.fromDivPixelToLatLng(s);a!==null&&e.extend(a)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var r=0,n=this.clusters;r<n.length;r++){var s=n[r];s.remove()}this.clusters=[];for(var i=0,a=this.markers;i<a.length;i++){var o=a[i];o.isAdded=!1,e&&o.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,r){var n=6371,s=(r.lat()-e.lat())*Math.PI/180,i=(r.lng()-e.lng())*Math.PI/180,a=Math.sin(s/2)*Math.sin(s/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(r.lat()*Math.PI/180)*Math.sin(i/2)*Math.sin(i/2);return n*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))},t.prototype.isMarkerInBounds=function(e,r){var n=e.getPosition();return n?r.contains(n):!1},t.prototype.addToClosestCluster=function(e){for(var r,n=4e4,s=null,i=0,a=this.clusters;i<a.length;i++){var o=a[i];r=o;var u=r.getCenter(),c=e.getPosition();if(u&&c){var f=this.distanceBetweenPoints(u,c);f<n&&(n=f,s=r)}}s&&s.isMarkerInClusterBounds(e)?s.addMarker(e):(r=new sd(this),r.addMarker(e),this.clusters.push(r))},t.prototype.createClusters=function(e){var r=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var n=this.getMap(),s=n!==null&&("getBounds"in n)?n.getBounds():null,i=(n==null?void 0:n.getZoom())||0,a=i>3?new google.maps.LatLngBounds(s==null?void 0:s.getSouthWest(),s==null?void 0:s.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),o=this.getExtendedBounds(a),u=Math.min(e+this.batchSize,this.markers.length),c=e;c<u;c++){var f=this.markers[c];f&&!f.isAdded&&this.isMarkerInBounds(f,o)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(u<this.markers.length)this.timerRefStatic=window.setTimeout(function(){r.createClusters(u)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var h=0,g=this.clusters;h<g.length;h++){var D=g[h];D.updateIcon()}}}},t.prototype.extend=function(e,r){return(function(s){for(var i in s.prototype){var a=i;this.prototype[a]=s.prototype[a]}return this}).apply(e,[r])},t}();function ha(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function dd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ha(Object(r),!0).forEach(function(n){H(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ha(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var nt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},be={averageCenter(t,e){t.setAverageCenter(e)},batchSizeIE(t,e){t.setBatchSizeIE(e)},calculator(t,e){t.setCalculator(e)},clusterClass(t,e){t.setClusterClass(e)},enableRetinaIcons(t,e){t.setEnableRetinaIcons(e)},gridSize(t,e){t.setGridSize(e)},ignoreHidden(t,e){t.setIgnoreHidden(e)},imageExtension(t,e){t.setImageExtension(e)},imagePath(t,e){t.setImagePath(e)},imageSizes(t,e){t.setImageSizes(e)},maxZoom(t,e){t.setMaxZoom(e)},minimumClusterSize(t,e){t.setMinimumClusterSize(e)},styles(t,e){t.setStyles(e)},title(t,e){t.setTitle(e)},zoomOnClick(t,e){t.setZoomOnClick(e)}},hd={};function gd(t){var{children:e,options:r,averageCenter:n,batchSizeIE:s,calculator:i,clusterClass:a,enableRetinaIcons:o,gridSize:u,ignoreHidden:c,imageExtension:f,imagePath:h,imageSizes:g,maxZoom:D,minimumClusterSize:v,styles:C,title:d,zoomOnClick:b,onClick:y,onClusteringBegin:w,onClusteringEnd:E,onMouseOver:B,onMouseOut:A,onLoad:O,onUnmount:j}=t,[F,x]=l.useState(null),P=l.useContext(he),[M,I]=l.useState(null),[N,T]=l.useState(null),[X,_]=l.useState(null),[$,q]=l.useState(null),[G,R]=l.useState(null);return l.useEffect(()=>{F&&A&&($!==null&&google.maps.event.removeListener($),q(google.maps.event.addListener(F,nt.onMouseOut,A)))},[A]),l.useEffect(()=>{F&&B&&(G!==null&&google.maps.event.removeListener(G),R(google.maps.event.addListener(F,nt.onMouseOver,B)))},[B]),l.useEffect(()=>{F&&y&&(M!==null&&google.maps.event.removeListener(M),I(google.maps.event.addListener(F,nt.onClick,y)))},[y]),l.useEffect(()=>{F&&w&&(N!==null&&google.maps.event.removeListener(N),T(google.maps.event.addListener(F,nt.onClusteringBegin,w)))},[w]),l.useEffect(()=>{F&&E&&(X!==null&&google.maps.event.removeListener(X),T(google.maps.event.addListener(F,nt.onClusteringEnd,E)))},[E]),l.useEffect(()=>{typeof n<"u"&&F!==null&&be.averageCenter(F,n)},[F,n]),l.useEffect(()=>{typeof s<"u"&&F!==null&&be.batchSizeIE(F,s)},[F,s]),l.useEffect(()=>{typeof i<"u"&&F!==null&&be.calculator(F,i)},[F,i]),l.useEffect(()=>{typeof a<"u"&&F!==null&&be.clusterClass(F,a)},[F,a]),l.useEffect(()=>{typeof o<"u"&&F!==null&&be.enableRetinaIcons(F,o)},[F,o]),l.useEffect(()=>{typeof u<"u"&&F!==null&&be.gridSize(F,u)},[F,u]),l.useEffect(()=>{typeof c<"u"&&F!==null&&be.ignoreHidden(F,c)},[F,c]),l.useEffect(()=>{typeof f<"u"&&F!==null&&be.imageExtension(F,f)},[F,f]),l.useEffect(()=>{typeof h<"u"&&F!==null&&be.imagePath(F,h)},[F,h]),l.useEffect(()=>{typeof g<"u"&&F!==null&&be.imageSizes(F,g)},[F,g]),l.useEffect(()=>{typeof D<"u"&&F!==null&&be.maxZoom(F,D)},[F,D]),l.useEffect(()=>{typeof v<"u"&&F!==null&&be.minimumClusterSize(F,v)},[F,v]),l.useEffect(()=>{typeof C<"u"&&F!==null&&be.styles(F,C)},[F,C]),l.useEffect(()=>{typeof d<"u"&&F!==null&&be.title(F,d)},[F,d]),l.useEffect(()=>{typeof b<"u"&&F!==null&&be.zoomOnClick(F,b)},[F,b]),l.useEffect(()=>{if(P){var re=dd({},r||hd),Y=new da(P,[],re);return n&&be.averageCenter(Y,n),s&&be.batchSizeIE(Y,s),i&&be.calculator(Y,i),a&&be.clusterClass(Y,a),o&&be.enableRetinaIcons(Y,o),u&&be.gridSize(Y,u),c&&be.ignoreHidden(Y,c),f&&be.imageExtension(Y,f),h&&be.imagePath(Y,h),g&&be.imageSizes(Y,g),D&&be.maxZoom(Y,D),v&&be.minimumClusterSize(Y,v),C&&be.styles(Y,C),d&&be.title(Y,d),b&&be.zoomOnClick(Y,b),A&&q(google.maps.event.addListener(Y,nt.onMouseOut,A)),B&&R(google.maps.event.addListener(Y,nt.onMouseOver,B)),y&&I(google.maps.event.addListener(Y,nt.onClick,y)),w&&T(google.maps.event.addListener(Y,nt.onClusteringBegin,w)),E&&_(google.maps.event.addListener(Y,nt.onClusteringEnd,E)),x(Y),O&&O(Y),()=>{$!==null&&google.maps.event.removeListener($),G!==null&&google.maps.event.removeListener(G),M!==null&&google.maps.event.removeListener(M),N!==null&&google.maps.event.removeListener(N),X!==null&&google.maps.event.removeListener(X),j&&j(Y)}}},[]),F!==null&&e(F)||null}l.memo(gd);class pd extends l.PureComponent{constructor(){super(...arguments),H(this,"registeredEvents",[]),H(this,"state",{markerClusterer:null}),H(this,"setClustererCallback",()=>{this.state.markerClusterer!==null&&this.props.onLoad&&this.props.onLoad(this.state.markerClusterer)})}componentDidMount(){if(this.context){var e=new da(this.context,[],this.props.options);this.registeredEvents=ve({updaterMap:be,eventMap:nt,prevProps:{},nextProps:this.props,instance:e}),this.setState(()=>({markerClusterer:e}),this.setClustererCallback)}}componentDidUpdate(e){this.state.markerClusterer&&(me(this.registeredEvents),this.registeredEvents=ve({updaterMap:be,eventMap:nt,prevProps:e,nextProps:this.props,instance:this.state.markerClusterer}))}componentWillUnmount(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),me(this.registeredEvents),this.state.markerClusterer.setMap(null))}render(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null}}H(pd,"contextType",he);function ga(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var pa=function(){function t(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,r=function(f){f.returnValue=!1,f.preventDefault&&f.preventDefault(),e.enableEventPropagation||ga(f)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var n=this.getPanes();if(n!==null&&n[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var s=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-s.left-s.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var i=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],a=0,o=i;a<o.length;a++){var u=o[a];this.eventListeners.push(google.maps.event.addListener(this.div,u,ga))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",r),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var r=this.getMap();if(r instanceof google.maps.Map){var n=0,s=0,i=r.getBounds();i&&!i.contains(this.position)&&r.setCenter(this.position);var a=r.getDiv(),o=a.offsetWidth,u=a.offsetHeight,c=this.pixelOffset.width,f=this.pixelOffset.height,h=this.div.offsetWidth,g=this.div.offsetHeight,D=this.infoBoxClearance.width,v=this.infoBoxClearance.height,C=this.getProjection(),d=C.fromLatLngToContainerPixel(this.position);d!==null&&(d.x<-c+D?n=d.x+c-D:d.x+h+c+D>o&&(n=d.x+h+c+D-o),this.alignBottom?d.y<-f+v+g?s=d.y+f-v-g:d.y+f+v>u&&(s=d.y+f+v-u):d.y<-f+v?s=d.y+f-v:d.y+g+f+v>u&&(s=d.y+g+f+v-u)),n===0&&s===0||r.panBy(n,s)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this.div.style[r]=e[r]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var n=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+n*100+')"',this.div.style.filter="alpha(opacity="+n*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var r=this.div.ownerDocument,n=r&&r.defaultView?r.defaultView.getComputedStyle(this.div,""):null;n&&(e.top=parseInt(n.borderTopWidth||"",10)||0,e.bottom=parseInt(n.borderBottomWidth||"",10)||0,e.left=parseInt(n.borderLeftWidth||"",10)||0,e.right=parseInt(n.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var s=this.div.currentStyle;s&&(e.top=parseInt(s.borderTopWidth||"",10)||0,e.bottom=parseInt(s.borderBottomWidth||"",10)||0,e.left=parseInt(s.borderLeftWidth||"",10)||0,e.right=parseInt(s.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),r=e.fromLatLngToDivPixel(this.position);r!==null&&(this.div.style.left=r.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(r.y+this.pixelOffset.height)+"px":this.div.style.top=r.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,r){var n=this;r&&(this.position=r.getPosition(),this.moveListener=google.maps.event.addListener(r,"position_changed",function(){var s=r.getPosition();n.setPosition(s)}),this.mapListener=google.maps.event.addListener(r,"map_changed",function(){n.setMap(r.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,r=this.eventListeners;e<r.length;e++){var n=r[e];google.maps.event.removeListener(n)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,r){return(function(s){for(var i in s.prototype)Object.prototype.hasOwnProperty.call(this,i)||(this.prototype[i]=s.prototype[i]);return this}).apply(e,[r])},t}(),vd=["position"],md=["position"];function va(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Qr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?va(Object(r),!0).forEach(function(n){H(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):va(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ma={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Ca={options(t,e){t.setOptions(e)},position(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible(t,e){t.setVisible(e)},zIndex(t,e){t.setZIndex(e)}},Cd={};function Dd(t){var{children:e,anchor:r,options:n,position:s,zIndex:i,onCloseClick:a,onDomReady:o,onContentChanged:u,onPositionChanged:c,onZindexChanged:f,onLoad:h,onUnmount:g}=t,D=l.useContext(he),[v,C]=l.useState(null),[d,b]=l.useState(null),[y,w]=l.useState(null),[E,B]=l.useState(null),[A,O]=l.useState(null),[j,F]=l.useState(null),x=l.useRef(null);return l.useEffect(()=>{D&&v!==null&&(v.close(),r?v.open(D,r):v.getPosition()&&v.open(D))},[D,v,r]),l.useEffect(()=>{n&&v!==null&&v.setOptions(n)},[v,n]),l.useEffect(()=>{if(s&&v!==null){var P=s instanceof google.maps.LatLng?s:new google.maps.LatLng(s.lat,s.lng);v.setPosition(P)}},[s]),l.useEffect(()=>{typeof i=="number"&&v!==null&&v.setZIndex(i)},[i]),l.useEffect(()=>{v&&a&&(d!==null&&google.maps.event.removeListener(d),b(google.maps.event.addListener(v,"closeclick",a)))},[a]),l.useEffect(()=>{v&&o&&(y!==null&&google.maps.event.removeListener(y),w(google.maps.event.addListener(v,"domready",o)))},[o]),l.useEffect(()=>{v&&u&&(E!==null&&google.maps.event.removeListener(E),B(google.maps.event.addListener(v,"content_changed",u)))},[u]),l.useEffect(()=>{v&&c&&(A!==null&&google.maps.event.removeListener(A),O(google.maps.event.addListener(v,"position_changed",c)))},[c]),l.useEffect(()=>{v&&f&&(j!==null&&google.maps.event.removeListener(j),F(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),l.useEffect(()=>{if(D){var P=n||Cd,{position:M}=P,I=us(P,vd),N;M&&!(M instanceof google.maps.LatLng)&&(N=new google.maps.LatLng(M.lat,M.lng));var T=new pa(Qr(Qr({},I),N?{position:N}:{}));x.current=document.createElement("div"),C(T),a&&b(google.maps.event.addListener(T,"closeclick",a)),o&&w(google.maps.event.addListener(T,"domready",o)),u&&B(google.maps.event.addListener(T,"content_changed",u)),c&&O(google.maps.event.addListener(T,"position_changed",c)),f&&F(google.maps.event.addListener(T,"zindex_changed",f)),T.setContent(x.current),r?T.open(D,r):T.getPosition()?T.open(D):Pe(!1,"You must provide either an anchor or a position prop for <InfoBox>."),h&&h(T)}return()=>{v!==null&&(d&&google.maps.event.removeListener(d),E&&google.maps.event.removeListener(E),y&&google.maps.event.removeListener(y),A&&google.maps.event.removeListener(A),j&&google.maps.event.removeListener(j),g&&g(v),v.close())}},[]),x.current?Rt.createPortal(l.Children.only(e),x.current):null}l.memo(Dd);class yd extends l.PureComponent{constructor(){super(...arguments),H(this,"registeredEvents",[]),H(this,"containerElement",null),H(this,"state",{infoBox:null}),H(this,"open",(e,r)=>{r?this.context!==null&&e.open(this.context,r):e.getPosition()?this.context!==null&&e.open(this.context):Pe(!1,"You must provide either an anchor or a position prop for <InfoBox>.")}),H(this,"setInfoBoxCallback",()=>{this.state.infoBox!==null&&this.containerElement!==null&&(this.state.infoBox.setContent(this.containerElement),this.open(this.state.infoBox,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoBox))})}componentDidMount(){var e=this.props.options||{},{position:r}=e,n=us(e,md),s;r&&!(r instanceof google.maps.LatLng)&&(s=new google.maps.LatLng(r.lat,r.lng));var i=new pa(Qr(Qr({},n),s?{position:s}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=ve({updaterMap:Ca,eventMap:ma,prevProps:{},nextProps:this.props,instance:i}),this.setState({infoBox:i},this.setInfoBoxCallback)}componentDidUpdate(e){var{infoBox:r}=this.state;r!==null&&(me(this.registeredEvents),this.registeredEvents=ve({updaterMap:Ca,eventMap:ma,prevProps:e,nextProps:this.props,instance:r}))}componentWillUnmount(){var{onUnmount:e}=this.props,{infoBox:r}=this.state;r!==null&&(e&&e(r),me(this.registeredEvents),r.close())}render(){return this.containerElement?Rt.createPortal(l.Children.only(this.props.children),this.containerElement):null}}H(yd,"contextType",he);var ls,Da;function bd(){return Da||(Da=1,ls=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var a=i[s];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}),ls}var Ed=bd(),ya=Hi(Ed),ba=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],cs=1,Dr=8;class fs{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");var[r,n]=new Uint8Array(e,0,2);if(r!==219)throw new Error("Data does not appear to be in a KDBush format.");var s=n>>4;if(s!==cs)throw new Error("Got v".concat(s," data when expected v").concat(cs,"."));var i=ba[n&15];if(!i)throw new Error("Unrecognized array type.");var[a]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new fs(o,a,i,e)}constructor(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:64,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Float64Array,s=arguments.length>3?arguments[3]:void 0;if(isNaN(e)||e<0)throw new Error("Unpexpected numItems value: ".concat(e,"."));this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;var i=ba.indexOf(this.ArrayType),a=e*2*this.ArrayType.BYTES_PER_ELEMENT,o=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-o%8)%8;if(i<0)throw new Error("Unexpected typed array class: ".concat(n,"."));s&&s instanceof ArrayBuffer?(this.data=s,this.ids=new this.IndexArrayType(this.data,Dr,e),this.coords=new this.ArrayType(this.data,Dr+o+u,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(Dr+a+o+u),this.ids=new this.IndexArrayType(this.data,Dr,e),this.coords=new this.ArrayType(this.data,Dr+o+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(cs<<4)+i]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=e)}add(e,r){var n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=r,n}finish(){var e=this._pos>>1;if(e!==this.numItems)throw new Error("Added ".concat(e," items when expected ").concat(this.numItems,"."));return ds(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,n,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:i,coords:a,nodeSize:o}=this,u=[0,i.length-1,0],c=[];u.length;){var f=u.pop()||0,h=u.pop()||0,g=u.pop()||0;if(h-g<=o){for(var D=g;D<=h;D++){var v=a[2*D],C=a[2*D+1];v>=e&&v<=n&&C>=r&&C<=s&&c.push(i[D])}continue}var d=g+h>>1,b=a[2*d],y=a[2*d+1];b>=e&&b<=n&&y>=r&&y<=s&&c.push(i[d]),(f===0?e<=b:r<=y)&&(u.push(g),u.push(d-1),u.push(1-f)),(f===0?n>=b:s>=y)&&(u.push(d+1),u.push(h),u.push(1-f))}return c}within(e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:s,coords:i,nodeSize:a}=this,o=[0,s.length-1,0],u=[],c=n*n;o.length;){var f=o.pop()||0,h=o.pop()||0,g=o.pop()||0;if(h-g<=a){for(var D=g;D<=h;D++)wa(i[2*D],i[2*D+1],e,r)<=c&&u.push(s[D]);continue}var v=g+h>>1,C=i[2*v],d=i[2*v+1];wa(C,d,e,r)<=c&&u.push(s[v]),(f===0?e-n<=C:r-n<=d)&&(o.push(g),o.push(v-1),o.push(1-f)),(f===0?e+n>=C:r+n>=d)&&(o.push(v+1),o.push(h),o.push(1-f))}return u}}function ds(t,e,r,n,s,i){if(!(s-n<=r)){var a=n+s>>1;Ea(t,e,a,n,s,i),ds(t,e,r,n,a-1,1-i),ds(t,e,r,a+1,s,1-i)}}function Ea(t,e,r,n,s,i){for(;s>n;){if(s-n>600){var a=s-n+1,o=r-n+1,u=Math.log(a),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(a-c)/a)*(o-a/2<0?-1:1),h=Math.max(n,Math.floor(r-o*c/a+f)),g=Math.min(s,Math.floor(r+(a-o)*c/a+f));Ea(t,e,r,h,g,i)}var D=e[2*r+i],v=n,C=s;for(yr(t,e,n,r),e[2*s+i]>D&&yr(t,e,n,s);v<C;){for(yr(t,e,v,C),v++,C--;e[2*v+i]<D;)v++;for(;e[2*C+i]>D;)C--}e[2*n+i]===D?yr(t,e,n,C):(C++,yr(t,e,C,s)),C<=r&&(n=C+1),r<=C&&(s=C-1)}}function yr(t,e,r,n){hs(t,r,n),hs(e,2*r,2*n),hs(e,2*r+1,2*n+1)}function hs(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function wa(t,e,r,n){var s=t-r,i=e-n;return s*s+i*i}var wd={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ba=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),_t=2,wt=3,gs=4,Bt=5,Aa=6;class Bd{constructor(e){this.options=Object.assign(Object.create(wd),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){var{log:r,minZoom:n,maxZoom:s}=this.options;r&&console.time("total time");var i="prepare ".concat(e.length," points");r&&console.time(i),this.points=e;for(var a=[],o=0;o<e.length;o++){var u=e[o];if(u.geometry){var[c,f]=u.geometry.coordinates,h=Ba($r(c)),g=Ba(Rr(f));a.push(h,g,1/0,o,-1,1),this.options.reduce&&a.push(0)}}var D=this.trees[s+1]=this._createTree(a);r&&console.timeEnd(i);for(var v=s;v>=n;v--){var C=+Date.now();D=this.trees[v]=this._createTree(this._cluster(D,v)),r&&console.log("z%d: %d clusters in %dms",v,D.numItems,+Date.now()-C)}return r&&console.timeEnd("total time"),this}getClusters(e,r){var n=((e[0]+180)%360+360)%360-180,s=Math.max(-90,Math.min(90,e[1])),i=e[2]===180?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,i=180;else if(n>i){var o=this.getClusters([n,s,180,a],r),u=this.getClusters([-180,s,i,a],r);return o.concat(u)}var c=this.trees[this._limitZoom(r)],f=c.range($r(n),Rr(a),$r(i),Rr(s)),h=c.data,g=[];for(var D of f){var v=this.stride*D;g.push(h[v+Bt]>1?Oa(h,v,this.clusterProps):this.points[h[v+wt]])}return g}getChildren(e){var r=this._getOriginId(e),n=this._getOriginZoom(e),s="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(s);var a=i.data;if(r*this.stride>=a.length)throw new Error(s);var o=this.options.radius/(this.options.extent*Math.pow(2,n-1)),u=a[r*this.stride],c=a[r*this.stride+1],f=i.within(u,c,o),h=[];for(var g of f){var D=g*this.stride;a[D+gs]===e&&h.push(a[D+Bt]>1?Oa(a,D,this.clusterProps):this.points[a[D+wt]])}if(h.length===0)throw new Error(s);return h}getLeaves(e,r,n){r=r||10,n=n||0;var s=[];return this._appendLeaves(s,e,r,n,0),s}getTile(e,r,n){var s=this.trees[this._limitZoom(e)],i=Math.pow(2,e),{extent:a,radius:o}=this.options,u=o/a,c=(n-u)/i,f=(n+1+u)/i,h={features:[]};return this._addTileFeatures(s.range((r-u)/i,c,(r+1+u)/i,f),s.data,r,n,i,h),r===0&&this._addTileFeatures(s.range(1-u/i,c,1,f),s.data,i,n,i,h),r===i-1&&this._addTileFeatures(s.range(0,c,u/i,f),s.data,-1,n,i,h),h.features.length?h:null}getClusterExpansionZoom(e){for(var r=this._getOriginZoom(e)-1;r<=this.options.maxZoom;){var n=this.getChildren(e);if(r++,n.length!==1)break;e=n[0].properties.cluster_id}return r}_appendLeaves(e,r,n,s,i){var a=this.getChildren(r);for(var o of a){var u=o.properties;if(u&&u.cluster?i+u.point_count<=s?i+=u.point_count:i=this._appendLeaves(e,u.cluster_id,n,s,i):i<s?i++:e.push(o),e.length===n)break}return i}_createTree(e){for(var r=new fs(e.length/this.stride|0,this.options.nodeSize,Float32Array),n=0;n<e.length;n+=this.stride)r.add(e[n],e[n+1]);return r.finish(),r.data=e,r}_addTileFeatures(e,r,n,s,i,a){for(var o of e){var u=o*this.stride,c=r[u+Bt]>1,f=void 0,h=void 0,g=void 0;if(c)f=La(r,u,this.clusterProps),h=r[u],g=r[u+1];else{var D=this.points[r[u+wt]];f=D.properties;var[v,C]=D.geometry.coordinates;h=$r(v),g=Rr(C)}var d={type:1,geometry:[[Math.round(this.options.extent*(h*i-n)),Math.round(this.options.extent*(g*i-s))]],tags:f},b=void 0;c||this.options.generateId?b=r[u+wt]:b=this.points[r[u+wt]].id,b!==void 0&&(d.id=b),a.features.push(d)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,r){for(var{radius:n,extent:s,reduce:i,minPoints:a}=this.options,o=n/(s*Math.pow(2,r)),u=e.data,c=[],f=this.stride,h=0;h<u.length;h+=f)if(!(u[h+_t]<=r)){u[h+_t]=r;var g=u[h],D=u[h+1],v=e.within(u[h],u[h+1],o),C=u[h+Bt],d=C;for(var b of v){var y=b*f;u[y+_t]>r&&(d+=u[y+Bt])}if(d>C&&d>=a){var w=g*C,E=D*C,B=void 0,A=-1,O=((h/f|0)<<5)+(r+1)+this.points.length;for(var j of v){var F=j*f;if(!(u[F+_t]<=r)){u[F+_t]=r;var x=u[F+Bt];w+=u[F]*x,E+=u[F+1]*x,u[F+gs]=O,i&&(B||(B=this._map(u,h,!0),A=this.clusterProps.length,this.clusterProps.push(B)),i(B,this._map(u,F)))}}u[h+gs]=O,c.push(w/d,E/d,1/0,O,-1,d),i&&c.push(A)}else{for(var P=0;P<f;P++)c.push(u[h+P]);if(d>1)for(var M of v){var I=M*f;if(!(u[I+_t]<=r)){u[I+_t]=r;for(var N=0;N<f;N++)c.push(u[I+N])}}}}return c}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,r,n){if(e[r+Bt]>1){var s=this.clusterProps[e[r+Aa]];return n?Object.assign({},s):s}var i=this.points[e[r+wt]].properties,a=this.options.map(i);return n&&a===i?Object.assign({},a):a}}function Oa(t,e,r){return{type:"Feature",id:t[e+wt],properties:La(t,e,r),geometry:{type:"Point",coordinates:[Ad(t[e]),Od(t[e+1])]}}}function La(t,e,r){var n=t[e+Bt],s=n>=1e4?"".concat(Math.round(n/1e3),"k"):n>=1e3?"".concat(Math.round(n/100)/10,"k"):n,i=t[e+Aa],a=i===-1?{}:Object.assign({},r[i]);return Object.assign(a,{cluster:!0,cluster_id:t[e+wt],point_count:n,point_count_abbreviated:s})}function $r(t){return t/360+.5}function Rr(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Ad(t){return(t-.5)*360}function Od(t){var e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
|
9
|
+
`)),console.error(j)})},[e,w,n]);var E=l.useRef(void 0);return l.useEffect(function(){E.current&&u!==E.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),E.current=u},[u]),{isLoaded:C,loadError:b,url:w}}var Gf=["loadingElement","onLoad","onError","onUnmount","children"],Zf=p.jsx($i,{});function Kf(t){var{loadingElement:e,onLoad:r,onError:n,onUnmount:s,children:i}=t,a=us(t,Gf),{isLoaded:o,loadError:u}=ea(a);return l.useEffect(function(){o&&typeof r=="function"&&r()},[o,r]),l.useEffect(function(){u&&typeof n=="function"&&n(u)},[u,n]),l.useEffect(function(){return()=>{s&&s()}},[s]),o?i:e||Zf}l.memo(Kf),typeof SuppressedError=="function"&&SuppressedError;var ta;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(ta||(ta={}));function ra(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Xr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ra(Object(r),!0).forEach(function(n){H(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ra(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var na={},sa={options(t,e){t.setOptions(e)}};function Xf(t){var{options:e,onLoad:r,onUnmount:n}=t,s=l.useContext(he),[i,a]=l.useState(null);return l.useEffect(()=>{i!==null&&i.setMap(s)},[s]),l.useEffect(()=>{e&&i!==null&&i.setOptions(e)},[i,e]),l.useEffect(()=>{var o=new google.maps.TrafficLayer(Xr(Xr({},e),{},{map:s}));return a(o),r&&r(o),()=>{i!==null&&(n&&n(i),i.setMap(null))}},[]),null}l.memo(Xf);class Yf extends l.PureComponent{constructor(){super(...arguments),H(this,"state",{trafficLayer:null}),H(this,"setTrafficLayerCallback",()=>{this.state.trafficLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.trafficLayer)}),H(this,"registeredEvents",[])}componentDidMount(){var e=new google.maps.TrafficLayer(Xr(Xr({},this.props.options),{},{map:this.context}));this.registeredEvents=ve({updaterMap:sa,eventMap:na,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{trafficLayer:e}},this.setTrafficLayerCallback)}componentDidUpdate(e){this.state.trafficLayer!==null&&(me(this.registeredEvents),this.registeredEvents=ve({updaterMap:sa,eventMap:na,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))}componentWillUnmount(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),me(this.registeredEvents),this.state.trafficLayer.setMap(null))}render(){return null}}H(Yf,"contextType",he);function Jf(t){var{onLoad:e,onUnmount:r}=t,n=l.useContext(he),[s,i]=l.useState(null);return l.useEffect(()=>{s!==null&&s.setMap(n)},[n]),l.useEffect(()=>{var a=new google.maps.BicyclingLayer;return i(a),a.setMap(n),e&&e(a),()=>{a!==null&&(r&&r(a),a.setMap(null))}},[]),null}l.memo(Jf);class Qf extends l.PureComponent{constructor(){super(...arguments),H(this,"state",{bicyclingLayer:null}),H(this,"setBicyclingLayerCallback",()=>{this.state.bicyclingLayer!==null&&(this.state.bicyclingLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.bicyclingLayer))})}componentDidMount(){var e=new google.maps.BicyclingLayer;this.setState(()=>({bicyclingLayer:e}),this.setBicyclingLayerCallback)}componentWillUnmount(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))}render(){return null}}H(Qf,"contextType",he);function $f(t){var{onLoad:e,onUnmount:r}=t,n=l.useContext(he),[s,i]=l.useState(null);return l.useEffect(()=>{s!==null&&s.setMap(n)},[n]),l.useEffect(()=>{var a=new google.maps.TransitLayer;return i(a),a.setMap(n),e&&e(a),()=>{s!==null&&(r&&r(s),s.setMap(null))}},[]),null}l.memo($f);class Rf extends l.PureComponent{constructor(){super(...arguments),H(this,"state",{transitLayer:null}),H(this,"setTransitLayerCallback",()=>{this.state.transitLayer!==null&&(this.state.transitLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.transitLayer))})}componentDidMount(){var e=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:e}},this.setTransitLayerCallback)}componentWillUnmount(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))}render(){return null}}H(Rf,"contextType",he);function ia(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Yr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ia(Object(r),!0).forEach(function(n){H(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ia(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var aa={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},oa={drawingMode(t,e){t.setDrawingMode(e)},options(t,e){t.setOptions(e)}};function ed(t){var{options:e,drawingMode:r,onCircleComplete:n,onMarkerComplete:s,onOverlayComplete:i,onPolygonComplete:a,onPolylineComplete:o,onRectangleComplete:u,onLoad:c,onUnmount:f}=t,h=l.useContext(he),[g,D]=l.useState(null),[v,C]=l.useState(null),[d,b]=l.useState(null),[y,w]=l.useState(null),[E,B]=l.useState(null),[A,O]=l.useState(null),[j,F]=l.useState(null);return l.useEffect(()=>{g!==null&&g.setMap(h)},[h]),l.useEffect(()=>{e&&g!==null&&g.setOptions(e)},[g,e]),l.useEffect(()=>{g!==null&&g.setDrawingMode(r??null)},[g,r]),l.useEffect(()=>{g&&n&&(v!==null&&google.maps.event.removeListener(v),C(google.maps.event.addListener(g,"circlecomplete",n)))},[g,n]),l.useEffect(()=>{g&&s&&(d!==null&&google.maps.event.removeListener(d),b(google.maps.event.addListener(g,"markercomplete",s)))},[g,s]),l.useEffect(()=>{g&&i&&(y!==null&&google.maps.event.removeListener(y),w(google.maps.event.addListener(g,"overlaycomplete",i)))},[g,i]),l.useEffect(()=>{g&&a&&(E!==null&&google.maps.event.removeListener(E),B(google.maps.event.addListener(g,"polygoncomplete",a)))},[g,a]),l.useEffect(()=>{g&&o&&(A!==null&&google.maps.event.removeListener(A),O(google.maps.event.addListener(g,"polylinecomplete",o)))},[g,o]),l.useEffect(()=>{g&&u&&(j!==null&&google.maps.event.removeListener(j),F(google.maps.event.addListener(g,"rectanglecomplete",u)))},[g,u]),l.useEffect(()=>{Pe(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var x=new google.maps.drawing.DrawingManager(Yr(Yr({},e),{},{map:h}));return r&&x.setDrawingMode(r),n&&C(google.maps.event.addListener(x,"circlecomplete",n)),s&&b(google.maps.event.addListener(x,"markercomplete",s)),i&&w(google.maps.event.addListener(x,"overlaycomplete",i)),a&&B(google.maps.event.addListener(x,"polygoncomplete",a)),o&&O(google.maps.event.addListener(x,"polylinecomplete",o)),u&&F(google.maps.event.addListener(x,"rectanglecomplete",u)),D(x),c&&c(x),()=>{g!==null&&(v&&google.maps.event.removeListener(v),d&&google.maps.event.removeListener(d),y&&google.maps.event.removeListener(y),E&&google.maps.event.removeListener(E),A&&google.maps.event.removeListener(A),j&&google.maps.event.removeListener(j),f&&f(g),g.setMap(null))}},[]),null}l.memo(ed);class td extends l.PureComponent{constructor(e){super(e),H(this,"registeredEvents",[]),H(this,"state",{drawingManager:null}),H(this,"setDrawingManagerCallback",()=>{this.state.drawingManager!==null&&this.props.onLoad&&this.props.onLoad(this.state.drawingManager)}),Pe(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing)}componentDidMount(){var e=new google.maps.drawing.DrawingManager(Yr(Yr({},this.props.options),{},{map:this.context}));this.registeredEvents=ve({updaterMap:oa,eventMap:aa,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{drawingManager:e}},this.setDrawingManagerCallback)}componentDidUpdate(e){this.state.drawingManager!==null&&(me(this.registeredEvents),this.registeredEvents=ve({updaterMap:oa,eventMap:aa,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))}componentWillUnmount(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),me(this.registeredEvents),this.state.drawingManager.setMap(null))}render(){return null}}H(td,"contextType",he);function ua(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function tr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ua(Object(r),!0).forEach(function(n){H(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ua(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var la={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},ca={animation(t,e){t.setAnimation(e)},clickable(t,e){t.setClickable(e)},cursor(t,e){t.setCursor(e)},draggable(t,e){t.setDraggable(e)},icon(t,e){t.setIcon(e)},label(t,e){t.setLabel(e)},map(t,e){t.setMap(e)},opacity(t,e){t.setOpacity(e)},options(t,e){t.setOptions(e)},position(t,e){t.setPosition(e)},shape(t,e){t.setShape(e)},title(t,e){t.setTitle(e)},visible(t,e){t.setVisible(e)},zIndex(t,e){t.setZIndex(e)}},Jr={};function rd(t){var{position:e,options:r,clusterer:n,noClustererRedraw:s,children:i,draggable:a,visible:o,animation:u,clickable:c,cursor:f,icon:h,label:g,opacity:D,shape:v,title:C,zIndex:d,onClick:b,onDblClick:y,onDrag:w,onDragEnd:E,onDragStart:B,onMouseOut:A,onMouseOver:O,onMouseUp:j,onMouseDown:F,onRightClick:x,onClickableChanged:P,onCursorChanged:M,onAnimationChanged:I,onDraggableChanged:N,onFlatChanged:T,onIconChanged:X,onPositionChanged:_,onShapeChanged:$,onTitleChanged:q,onVisibleChanged:G,onZindexChanged:R,onLoad:re,onUnmount:Y}=t,ae=l.useContext(he),[k,S]=l.useState(null),[W,z]=l.useState(null),[Z,Q]=l.useState(null),[J,ne]=l.useState(null),[oe,ue]=l.useState(null),[le,ge]=l.useState(null),[ye,De]=l.useState(null),[xe,Ne]=l.useState(null),[Ze,we]=l.useState(null),[_e,et]=l.useState(null),[Ee,Be]=l.useState(null),[at,ze]=l.useState(null),[Ke,ht]=l.useState(null),[Xe,dr]=l.useState(null),[gt,Et]=l.useState(null),[hr,Rn]=l.useState(null),[gr,es]=l.useState(null),[pr,ts]=l.useState(null),[Qc,$c]=l.useState(null),[rs,Rc]=l.useState(null),[ns,ef]=l.useState(null),[ss,tf]=l.useState(null);l.useEffect(()=>{k!==null&&k.setMap(ae)},[ae]),l.useEffect(()=>{typeof r<"u"&&k!==null&&k.setOptions(r)},[k,r]),l.useEffect(()=>{typeof a<"u"&&k!==null&&k.setDraggable(a)},[k,a]),l.useEffect(()=>{e&&k!==null&&k.setPosition(e)},[k,e]),l.useEffect(()=>{typeof o<"u"&&k!==null&&k.setVisible(o)},[k,o]),l.useEffect(()=>{k==null||k.setAnimation(u)},[k,u]),l.useEffect(()=>{k&&c!==void 0&&k.setClickable(c)},[k,c]),l.useEffect(()=>{k&&f!==void 0&&k.setCursor(f)},[k,f]),l.useEffect(()=>{k&&h!==void 0&&k.setIcon(h)},[k,h]),l.useEffect(()=>{k&&g!==void 0&&k.setLabel(g)},[k,g]),l.useEffect(()=>{k&&D!==void 0&&k.setOpacity(D)},[k,D]),l.useEffect(()=>{k&&v!==void 0&&k.setShape(v)},[k,v]),l.useEffect(()=>{k&&C!==void 0&&k.setTitle(C)},[k,C]),l.useEffect(()=>{k&&d!==void 0&&k.setZIndex(d)},[k,d]),l.useEffect(()=>{k&&y&&(W!==null&&google.maps.event.removeListener(W),z(google.maps.event.addListener(k,"dblclick",y)))},[y]),l.useEffect(()=>{k&&E&&(Z!==null&&google.maps.event.removeListener(Z),Q(google.maps.event.addListener(k,"dragend",E)))},[E]),l.useEffect(()=>{k&&B&&(J!==null&&google.maps.event.removeListener(J),ne(google.maps.event.addListener(k,"dragstart",B)))},[B]),l.useEffect(()=>{k&&F&&(oe!==null&&google.maps.event.removeListener(oe),ue(google.maps.event.addListener(k,"mousedown",F)))},[F]),l.useEffect(()=>{k&&A&&(le!==null&&google.maps.event.removeListener(le),ge(google.maps.event.addListener(k,"mouseout",A)))},[A]),l.useEffect(()=>{k&&O&&(ye!==null&&google.maps.event.removeListener(ye),De(google.maps.event.addListener(k,"mouseover",O)))},[O]),l.useEffect(()=>{k&&j&&(xe!==null&&google.maps.event.removeListener(xe),Ne(google.maps.event.addListener(k,"mouseup",j)))},[j]),l.useEffect(()=>{k&&x&&(Ze!==null&&google.maps.event.removeListener(Ze),we(google.maps.event.addListener(k,"rightclick",x)))},[x]),l.useEffect(()=>{k&&b&&(_e!==null&&google.maps.event.removeListener(_e),et(google.maps.event.addListener(k,"click",b)))},[b]),l.useEffect(()=>{k&&w&&(Ee!==null&&google.maps.event.removeListener(Ee),Be(google.maps.event.addListener(k,"drag",w)))},[w]),l.useEffect(()=>{k&&P&&(at!==null&&google.maps.event.removeListener(at),ze(google.maps.event.addListener(k,"clickable_changed",P)))},[P]),l.useEffect(()=>{k&&M&&(Ke!==null&&google.maps.event.removeListener(Ke),ht(google.maps.event.addListener(k,"cursor_changed",M)))},[M]),l.useEffect(()=>{k&&I&&(Xe!==null&&google.maps.event.removeListener(Xe),dr(google.maps.event.addListener(k,"animation_changed",I)))},[I]),l.useEffect(()=>{k&&N&&(gt!==null&&google.maps.event.removeListener(gt),Et(google.maps.event.addListener(k,"draggable_changed",N)))},[N]),l.useEffect(()=>{k&&T&&(hr!==null&&google.maps.event.removeListener(hr),Rn(google.maps.event.addListener(k,"flat_changed",T)))},[T]),l.useEffect(()=>{k&&X&&(gr!==null&&google.maps.event.removeListener(gr),es(google.maps.event.addListener(k,"icon_changed",X)))},[X]),l.useEffect(()=>{k&&_&&(pr!==null&&google.maps.event.removeListener(pr),ts(google.maps.event.addListener(k,"position_changed",_)))},[_]),l.useEffect(()=>{k&&$&&(Qc!==null&&google.maps.event.removeListener(Qc),$c(google.maps.event.addListener(k,"shape_changed",$)))},[$]),l.useEffect(()=>{k&&q&&(rs!==null&&google.maps.event.removeListener(rs),Rc(google.maps.event.addListener(k,"title_changed",q)))},[q]),l.useEffect(()=>{k&&G&&(ns!==null&&google.maps.event.removeListener(ns),ef(google.maps.event.addListener(k,"visible_changed",G)))},[G]),l.useEffect(()=>{k&&R&&(ss!==null&&google.maps.event.removeListener(ss),tf(google.maps.event.addListener(k,"zindex_changed",R)))},[R]),l.useEffect(()=>{var Vr=tr(tr(tr({},r||Jr),n?Jr:{map:ae}),{},{position:e}),de=new google.maps.Marker(Vr);return n?n.addMarker(de,!!s):de.setMap(ae),e&&de.setPosition(e),typeof o<"u"&&de.setVisible(o),typeof a<"u"&&de.setDraggable(a),typeof c<"u"&&de.setClickable(c),typeof f=="string"&&de.setCursor(f),h&&de.setIcon(h),typeof g<"u"&&de.setLabel(g),typeof D<"u"&&de.setOpacity(D),v&&de.setShape(v),typeof C=="string"&&de.setTitle(C),typeof d=="number"&&de.setZIndex(d),y&&z(google.maps.event.addListener(de,"dblclick",y)),E&&Q(google.maps.event.addListener(de,"dragend",E)),B&&ne(google.maps.event.addListener(de,"dragstart",B)),F&&ue(google.maps.event.addListener(de,"mousedown",F)),A&&ge(google.maps.event.addListener(de,"mouseout",A)),O&&De(google.maps.event.addListener(de,"mouseover",O)),j&&Ne(google.maps.event.addListener(de,"mouseup",j)),x&&we(google.maps.event.addListener(de,"rightclick",x)),b&&et(google.maps.event.addListener(de,"click",b)),w&&Be(google.maps.event.addListener(de,"drag",w)),P&&ze(google.maps.event.addListener(de,"clickable_changed",P)),M&&ht(google.maps.event.addListener(de,"cursor_changed",M)),I&&dr(google.maps.event.addListener(de,"animation_changed",I)),N&&Et(google.maps.event.addListener(de,"draggable_changed",N)),T&&Rn(google.maps.event.addListener(de,"flat_changed",T)),X&&es(google.maps.event.addListener(de,"icon_changed",X)),_&&ts(google.maps.event.addListener(de,"position_changed",_)),$&&$c(google.maps.event.addListener(de,"shape_changed",$)),q&&Rc(google.maps.event.addListener(de,"title_changed",q)),G&&ef(google.maps.event.addListener(de,"visible_changed",G)),R&&tf(google.maps.event.addListener(de,"zindex_changed",R)),S(de),re&&re(de),()=>{W!==null&&google.maps.event.removeListener(W),Z!==null&&google.maps.event.removeListener(Z),J!==null&&google.maps.event.removeListener(J),oe!==null&&google.maps.event.removeListener(oe),le!==null&&google.maps.event.removeListener(le),ye!==null&&google.maps.event.removeListener(ye),xe!==null&&google.maps.event.removeListener(xe),Ze!==null&&google.maps.event.removeListener(Ze),_e!==null&&google.maps.event.removeListener(_e),at!==null&&google.maps.event.removeListener(at),Ke!==null&&google.maps.event.removeListener(Ke),Xe!==null&&google.maps.event.removeListener(Xe),gt!==null&&google.maps.event.removeListener(gt),hr!==null&&google.maps.event.removeListener(hr),gr!==null&&google.maps.event.removeListener(gr),pr!==null&&google.maps.event.removeListener(pr),rs!==null&&google.maps.event.removeListener(rs),ns!==null&&google.maps.event.removeListener(ns),ss!==null&&google.maps.event.removeListener(ss),Y&&Y(de),n?n.removeMarker(de,!!s):de&&de.setMap(null)}},[]);var vb=l.useMemo(()=>i?l.Children.map(i,Vr=>{if(!l.isValidElement(Vr))return Vr;var de=Vr;return l.cloneElement(de,{anchor:k})}):null,[i,k]);return p.jsx(p.Fragment,{children:vb})||null}l.memo(rd);class fa extends l.PureComponent{constructor(){super(...arguments),H(this,"registeredEvents",[])}componentDidMount(){var e=this;return Ki(function*(){var r=tr(tr(tr({},e.props.options||Jr),e.props.clusterer?Jr:{map:e.context}),{},{position:e.props.position});e.marker=new google.maps.Marker(r),e.props.clusterer?e.props.clusterer.addMarker(e.marker,!!e.props.noClustererRedraw):e.marker.setMap(e.context),e.registeredEvents=ve({updaterMap:ca,eventMap:la,prevProps:{},nextProps:e.props,instance:e.marker}),e.props.onLoad&&e.props.onLoad(e.marker)})()}componentDidUpdate(e){this.marker&&(me(this.registeredEvents),this.registeredEvents=ve({updaterMap:ca,eventMap:la,prevProps:e,nextProps:this.props,instance:this.marker}))}componentWillUnmount(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),me(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))}render(){var e=this.props.children?l.Children.map(this.props.children,r=>{if(!l.isValidElement(r))return r;var n=r;return l.cloneElement(n,{anchor:this.marker})}):null;return e||null}}H(fa,"contextType",he);var nd=function(){function t(e,r){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=r,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var r=this.cluster.getClusterer();if(google.maps.event.trigger(r,"click",this.cluster),google.maps.event.trigger(r,"clusterclick",this.cluster),r.getZoomOnClick()){var n=r.getMaxZoom(),s=this.cluster.getBounds(),i=r.getMap();i!==null&&"fitBounds"in i&&i.fitBounds(s),this.timeOut=window.setTimeout(function(){var a=r.getMap();if(a!==null){"fitBounds"in a&&a.fitBounds(s);var o=a.getZoom()||0;n!==null&&o>n&&a.setZoom(n+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var r=this.getMap();r!==null&&(this.boundsChangedListener=google.maps.event.addListener(r,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,r,n,s,i,a;if(this.div&&this.center){var o=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,u=this.backgroundPosition.split(" "),c=parseInt(((e=u[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((r=u[1])===null||r===void 0?void 0:r.replace(/^\s+|\s+$/g,""))||"0",10),h=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(h!==null?"".concat(h.y,"px"):"0","; left: ").concat(h!==null?"".concat(h.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var g=document.createElement("img");g.alt=o,g.src=this.url,g.width=this.width,g.height=this.height,g.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(c,"px")),this.cluster.getClusterer().enableRetinaIcons||(g.style.clip="rect(-".concat(f,"px, -").concat(c+this.width,"px, -").concat(f+this.height,", -").concat(c,")"));var D=document.createElement("div");D.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((n=this.sums)===null||n===void 0)&&n.text&&(D.innerText="".concat((s=this.sums)===null||s===void 0?void 0:s.text)),!((i=this.sums)===null||i===void 0)&&i.html&&(D.innerHTML="".concat((a=this.sums)===null||a===void 0?void 0:a.html)),this.div.innerHTML="",this.div.appendChild(g),this.div.appendChild(D),this.div.title=o,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var r=this.cluster.getClusterer().getStyles(),n=r[Math.min(r.length-1,Math.max(0,e.index-1))];n&&(this.url=n.url,this.height=n.height,this.width=n.width,n.className&&(this.className="".concat(this.clusterClassName," ").concat(n.className)),this.anchorText=n.anchorText||[0,0],this.anchorIcon=n.anchorIcon||[this.height/2,this.width/2],this.textColor=n.textColor||"black",this.textSize=n.textSize||11,this.textDecoration=n.textDecoration||"none",this.fontWeight=n.fontWeight||"bold",this.fontStyle=n.fontStyle||"normal",this.fontFamily=n.fontFamily||"Arial,sans-serif",this.backgroundPosition=n.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var r=this.getProjection().fromLatLngToDivPixel(e);return r!==null&&(r.x-=this.anchorIcon[1],r.y-=this.anchorIcon[0]),r},t}(),sd=function(){function t(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new nd(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),r=this.getMarkers(),n=0,s=r;n<s.length;n++){var i=s[n],a=i.getPosition();a&&e.extend(a)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var r;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var n=e.getPosition();if(n){var s=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(s-1)+n.lat())/s,(this.center.lng()*(s-1)+n.lng())/s),this.calculateBounds()}}}else{var n=e.getPosition();n&&(this.center=n,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var i=this.markers.length,a=this.markerClusterer.getMaxZoom(),o=(r=this.map)===null||r===void 0?void 0:r.getZoom();if(a!==null&&typeof o<"u"&&o>a)e.getMap()!==this.map&&e.setMap(this.map);else if(i<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(i===this.minClusterSize)for(var u=0,c=this.markers;u<c.length;u++){var f=c[u];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var r=e.getPosition();if(r)return this.bounds.contains(r)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,r=this.markers.length,n=this.markerClusterer.getMaxZoom(),s=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(n!==null&&typeof s<"u"&&s>n){this.clusterIcon.hide();return}if(r<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var r=0;r<this.markers.length;r++)if(e===this.markers[r])return!0;return!1},t}();function id(t,e){var r=t.length,n=r.toString().length,s=Math.min(n,e);return{text:r.toString(),index:s,title:""}}var ad=2e3,od=500,ud="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",ld="png",cd=[53,56,66,78,90],fd="cluster",da=function(){function t(e,r,n){r===void 0&&(r=[]),n===void 0&&(n={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=n.gridSize||60,this.minClusterSize=n.minimumClusterSize||2,this.maxZoom=n.maxZoom||null,this.styles=n.styles||[],this.title=n.title||"",this.zoomOnClick=!0,n.zoomOnClick!==void 0&&(this.zoomOnClick=n.zoomOnClick),this.averageCenter=!1,n.averageCenter!==void 0&&(this.averageCenter=n.averageCenter),this.ignoreHidden=!1,n.ignoreHidden!==void 0&&(this.ignoreHidden=n.ignoreHidden),this.enableRetinaIcons=!1,n.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=n.enableRetinaIcons),this.imagePath=n.imagePath||ud,this.imageExtension=n.imageExtension||ld,this.imageSizes=n.imageSizes||cd,this.calculator=n.calculator||id,this.batchSize=n.batchSize||ad,this.batchSizeIE=n.batchSizeIE||od,this.clusterClass=n.clusterClass||fd,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(r,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,r;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((r=this.getMap())===null||r===void 0?void 0:r.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,r=this.markers;e<r.length;e++){var n=r[e];n.getMap()!==this.activeMap&&n.setMap(this.activeMap)}for(var s=0,i=this.clusters;s<i.length;s++){var a=i[s];a.remove()}this.clusters=[];for(var o=0,u=this.listeners;o<u.length;o++){var c=u[o];google.maps.event.removeListener(c)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),r=new google.maps.LatLngBounds,n=0,s=e;n<s.length;n++){var i=s[n],a=i.getPosition();a&&r.extend(a)}var o=this.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(r)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,r){this.pushMarkerTo(e),r||this.redraw()},t.prototype.addMarkers=function(e,r){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var s=e[n];s&&this.pushMarkerTo(s)}r||this.redraw()},t.prototype.pushMarkerTo=function(e){var r=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){r.ready&&(e.isAdded=!1,r.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var r=-1;if(this.markers.indexOf)r=this.markers.indexOf(e);else for(var n=0;n<this.markers.length;n++)if(e===this.markers[n]){r=n;break}return r===-1?!1:(e.setMap(null),this.markers.splice(r,1),!0)},t.prototype.removeMarker=function(e,r){var n=this.removeMarker_(e);return!r&&n&&this.repaint(),n},t.prototype.removeMarkers=function(e,r){for(var n=!1,s=0,i=e;s<i.length;s++){var a=i[s];n=n||this.removeMarker_(a)}return!r&&n&&this.repaint(),n},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var n=0,s=e;n<s.length;n++){var i=s[n];i.remove()}},0)},t.prototype.getExtendedBounds=function(e){var r=this.getProjection(),n=r.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));n!==null&&(n.x+=this.gridSize,n.y-=this.gridSize);var s=r.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(s!==null&&(s.x-=this.gridSize,s.y+=this.gridSize),n!==null){var i=r.fromDivPixelToLatLng(n);i!==null&&e.extend(i)}if(s!==null){var a=r.fromDivPixelToLatLng(s);a!==null&&e.extend(a)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var r=0,n=this.clusters;r<n.length;r++){var s=n[r];s.remove()}this.clusters=[];for(var i=0,a=this.markers;i<a.length;i++){var o=a[i];o.isAdded=!1,e&&o.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,r){var n=6371,s=(r.lat()-e.lat())*Math.PI/180,i=(r.lng()-e.lng())*Math.PI/180,a=Math.sin(s/2)*Math.sin(s/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(r.lat()*Math.PI/180)*Math.sin(i/2)*Math.sin(i/2);return n*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))},t.prototype.isMarkerInBounds=function(e,r){var n=e.getPosition();return n?r.contains(n):!1},t.prototype.addToClosestCluster=function(e){for(var r,n=4e4,s=null,i=0,a=this.clusters;i<a.length;i++){var o=a[i];r=o;var u=r.getCenter(),c=e.getPosition();if(u&&c){var f=this.distanceBetweenPoints(u,c);f<n&&(n=f,s=r)}}s&&s.isMarkerInClusterBounds(e)?s.addMarker(e):(r=new sd(this),r.addMarker(e),this.clusters.push(r))},t.prototype.createClusters=function(e){var r=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var n=this.getMap(),s=n!==null&&("getBounds"in n)?n.getBounds():null,i=(n==null?void 0:n.getZoom())||0,a=i>3?new google.maps.LatLngBounds(s==null?void 0:s.getSouthWest(),s==null?void 0:s.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),o=this.getExtendedBounds(a),u=Math.min(e+this.batchSize,this.markers.length),c=e;c<u;c++){var f=this.markers[c];f&&!f.isAdded&&this.isMarkerInBounds(f,o)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(u<this.markers.length)this.timerRefStatic=window.setTimeout(function(){r.createClusters(u)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var h=0,g=this.clusters;h<g.length;h++){var D=g[h];D.updateIcon()}}}},t.prototype.extend=function(e,r){return(function(s){for(var i in s.prototype){var a=i;this.prototype[a]=s.prototype[a]}return this}).apply(e,[r])},t}();function ha(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function dd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ha(Object(r),!0).forEach(function(n){H(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ha(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var nt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},be={averageCenter(t,e){t.setAverageCenter(e)},batchSizeIE(t,e){t.setBatchSizeIE(e)},calculator(t,e){t.setCalculator(e)},clusterClass(t,e){t.setClusterClass(e)},enableRetinaIcons(t,e){t.setEnableRetinaIcons(e)},gridSize(t,e){t.setGridSize(e)},ignoreHidden(t,e){t.setIgnoreHidden(e)},imageExtension(t,e){t.setImageExtension(e)},imagePath(t,e){t.setImagePath(e)},imageSizes(t,e){t.setImageSizes(e)},maxZoom(t,e){t.setMaxZoom(e)},minimumClusterSize(t,e){t.setMinimumClusterSize(e)},styles(t,e){t.setStyles(e)},title(t,e){t.setTitle(e)},zoomOnClick(t,e){t.setZoomOnClick(e)}},hd={};function gd(t){var{children:e,options:r,averageCenter:n,batchSizeIE:s,calculator:i,clusterClass:a,enableRetinaIcons:o,gridSize:u,ignoreHidden:c,imageExtension:f,imagePath:h,imageSizes:g,maxZoom:D,minimumClusterSize:v,styles:C,title:d,zoomOnClick:b,onClick:y,onClusteringBegin:w,onClusteringEnd:E,onMouseOver:B,onMouseOut:A,onLoad:O,onUnmount:j}=t,[F,x]=l.useState(null),P=l.useContext(he),[M,I]=l.useState(null),[N,T]=l.useState(null),[X,_]=l.useState(null),[$,q]=l.useState(null),[G,R]=l.useState(null);return l.useEffect(()=>{F&&A&&($!==null&&google.maps.event.removeListener($),q(google.maps.event.addListener(F,nt.onMouseOut,A)))},[A]),l.useEffect(()=>{F&&B&&(G!==null&&google.maps.event.removeListener(G),R(google.maps.event.addListener(F,nt.onMouseOver,B)))},[B]),l.useEffect(()=>{F&&y&&(M!==null&&google.maps.event.removeListener(M),I(google.maps.event.addListener(F,nt.onClick,y)))},[y]),l.useEffect(()=>{F&&w&&(N!==null&&google.maps.event.removeListener(N),T(google.maps.event.addListener(F,nt.onClusteringBegin,w)))},[w]),l.useEffect(()=>{F&&E&&(X!==null&&google.maps.event.removeListener(X),T(google.maps.event.addListener(F,nt.onClusteringEnd,E)))},[E]),l.useEffect(()=>{typeof n<"u"&&F!==null&&be.averageCenter(F,n)},[F,n]),l.useEffect(()=>{typeof s<"u"&&F!==null&&be.batchSizeIE(F,s)},[F,s]),l.useEffect(()=>{typeof i<"u"&&F!==null&&be.calculator(F,i)},[F,i]),l.useEffect(()=>{typeof a<"u"&&F!==null&&be.clusterClass(F,a)},[F,a]),l.useEffect(()=>{typeof o<"u"&&F!==null&&be.enableRetinaIcons(F,o)},[F,o]),l.useEffect(()=>{typeof u<"u"&&F!==null&&be.gridSize(F,u)},[F,u]),l.useEffect(()=>{typeof c<"u"&&F!==null&&be.ignoreHidden(F,c)},[F,c]),l.useEffect(()=>{typeof f<"u"&&F!==null&&be.imageExtension(F,f)},[F,f]),l.useEffect(()=>{typeof h<"u"&&F!==null&&be.imagePath(F,h)},[F,h]),l.useEffect(()=>{typeof g<"u"&&F!==null&&be.imageSizes(F,g)},[F,g]),l.useEffect(()=>{typeof D<"u"&&F!==null&&be.maxZoom(F,D)},[F,D]),l.useEffect(()=>{typeof v<"u"&&F!==null&&be.minimumClusterSize(F,v)},[F,v]),l.useEffect(()=>{typeof C<"u"&&F!==null&&be.styles(F,C)},[F,C]),l.useEffect(()=>{typeof d<"u"&&F!==null&&be.title(F,d)},[F,d]),l.useEffect(()=>{typeof b<"u"&&F!==null&&be.zoomOnClick(F,b)},[F,b]),l.useEffect(()=>{if(P){var re=dd({},r||hd),Y=new da(P,[],re);return n&&be.averageCenter(Y,n),s&&be.batchSizeIE(Y,s),i&&be.calculator(Y,i),a&&be.clusterClass(Y,a),o&&be.enableRetinaIcons(Y,o),u&&be.gridSize(Y,u),c&&be.ignoreHidden(Y,c),f&&be.imageExtension(Y,f),h&&be.imagePath(Y,h),g&&be.imageSizes(Y,g),D&&be.maxZoom(Y,D),v&&be.minimumClusterSize(Y,v),C&&be.styles(Y,C),d&&be.title(Y,d),b&&be.zoomOnClick(Y,b),A&&q(google.maps.event.addListener(Y,nt.onMouseOut,A)),B&&R(google.maps.event.addListener(Y,nt.onMouseOver,B)),y&&I(google.maps.event.addListener(Y,nt.onClick,y)),w&&T(google.maps.event.addListener(Y,nt.onClusteringBegin,w)),E&&_(google.maps.event.addListener(Y,nt.onClusteringEnd,E)),x(Y),O&&O(Y),()=>{$!==null&&google.maps.event.removeListener($),G!==null&&google.maps.event.removeListener(G),M!==null&&google.maps.event.removeListener(M),N!==null&&google.maps.event.removeListener(N),X!==null&&google.maps.event.removeListener(X),j&&j(Y)}}},[]),F!==null&&e(F)||null}l.memo(gd);class pd extends l.PureComponent{constructor(){super(...arguments),H(this,"registeredEvents",[]),H(this,"state",{markerClusterer:null}),H(this,"setClustererCallback",()=>{this.state.markerClusterer!==null&&this.props.onLoad&&this.props.onLoad(this.state.markerClusterer)})}componentDidMount(){if(this.context){var e=new da(this.context,[],this.props.options);this.registeredEvents=ve({updaterMap:be,eventMap:nt,prevProps:{},nextProps:this.props,instance:e}),this.setState(()=>({markerClusterer:e}),this.setClustererCallback)}}componentDidUpdate(e){this.state.markerClusterer&&(me(this.registeredEvents),this.registeredEvents=ve({updaterMap:be,eventMap:nt,prevProps:e,nextProps:this.props,instance:this.state.markerClusterer}))}componentWillUnmount(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),me(this.registeredEvents),this.state.markerClusterer.setMap(null))}render(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null}}H(pd,"contextType",he);function ga(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var pa=function(){function t(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,r=function(f){f.returnValue=!1,f.preventDefault&&f.preventDefault(),e.enableEventPropagation||ga(f)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var n=this.getPanes();if(n!==null&&n[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var s=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-s.left-s.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var i=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],a=0,o=i;a<o.length;a++){var u=o[a];this.eventListeners.push(google.maps.event.addListener(this.div,u,ga))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",r),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var r=this.getMap();if(r instanceof google.maps.Map){var n=0,s=0,i=r.getBounds();i&&!i.contains(this.position)&&r.setCenter(this.position);var a=r.getDiv(),o=a.offsetWidth,u=a.offsetHeight,c=this.pixelOffset.width,f=this.pixelOffset.height,h=this.div.offsetWidth,g=this.div.offsetHeight,D=this.infoBoxClearance.width,v=this.infoBoxClearance.height,C=this.getProjection(),d=C.fromLatLngToContainerPixel(this.position);d!==null&&(d.x<-c+D?n=d.x+c-D:d.x+h+c+D>o&&(n=d.x+h+c+D-o),this.alignBottom?d.y<-f+v+g?s=d.y+f-v-g:d.y+f+v>u&&(s=d.y+f+v-u):d.y<-f+v?s=d.y+f-v:d.y+g+f+v>u&&(s=d.y+g+f+v-u)),n===0&&s===0||r.panBy(n,s)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this.div.style[r]=e[r]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var n=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+n*100+')"',this.div.style.filter="alpha(opacity="+n*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var r=this.div.ownerDocument,n=r&&r.defaultView?r.defaultView.getComputedStyle(this.div,""):null;n&&(e.top=parseInt(n.borderTopWidth||"",10)||0,e.bottom=parseInt(n.borderBottomWidth||"",10)||0,e.left=parseInt(n.borderLeftWidth||"",10)||0,e.right=parseInt(n.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var s=this.div.currentStyle;s&&(e.top=parseInt(s.borderTopWidth||"",10)||0,e.bottom=parseInt(s.borderBottomWidth||"",10)||0,e.left=parseInt(s.borderLeftWidth||"",10)||0,e.right=parseInt(s.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),r=e.fromLatLngToDivPixel(this.position);r!==null&&(this.div.style.left=r.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(r.y+this.pixelOffset.height)+"px":this.div.style.top=r.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,r){var n=this;r&&(this.position=r.getPosition(),this.moveListener=google.maps.event.addListener(r,"position_changed",function(){var s=r.getPosition();n.setPosition(s)}),this.mapListener=google.maps.event.addListener(r,"map_changed",function(){n.setMap(r.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,r=this.eventListeners;e<r.length;e++){var n=r[e];google.maps.event.removeListener(n)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,r){return(function(s){for(var i in s.prototype)Object.prototype.hasOwnProperty.call(this,i)||(this.prototype[i]=s.prototype[i]);return this}).apply(e,[r])},t}(),vd=["position"],md=["position"];function va(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Qr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?va(Object(r),!0).forEach(function(n){H(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):va(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ma={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Ca={options(t,e){t.setOptions(e)},position(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible(t,e){t.setVisible(e)},zIndex(t,e){t.setZIndex(e)}},Cd={};function Dd(t){var{children:e,anchor:r,options:n,position:s,zIndex:i,onCloseClick:a,onDomReady:o,onContentChanged:u,onPositionChanged:c,onZindexChanged:f,onLoad:h,onUnmount:g}=t,D=l.useContext(he),[v,C]=l.useState(null),[d,b]=l.useState(null),[y,w]=l.useState(null),[E,B]=l.useState(null),[A,O]=l.useState(null),[j,F]=l.useState(null),x=l.useRef(null);return l.useEffect(()=>{D&&v!==null&&(v.close(),r?v.open(D,r):v.getPosition()&&v.open(D))},[D,v,r]),l.useEffect(()=>{n&&v!==null&&v.setOptions(n)},[v,n]),l.useEffect(()=>{if(s&&v!==null){var P=s instanceof google.maps.LatLng?s:new google.maps.LatLng(s.lat,s.lng);v.setPosition(P)}},[s]),l.useEffect(()=>{typeof i=="number"&&v!==null&&v.setZIndex(i)},[i]),l.useEffect(()=>{v&&a&&(d!==null&&google.maps.event.removeListener(d),b(google.maps.event.addListener(v,"closeclick",a)))},[a]),l.useEffect(()=>{v&&o&&(y!==null&&google.maps.event.removeListener(y),w(google.maps.event.addListener(v,"domready",o)))},[o]),l.useEffect(()=>{v&&u&&(E!==null&&google.maps.event.removeListener(E),B(google.maps.event.addListener(v,"content_changed",u)))},[u]),l.useEffect(()=>{v&&c&&(A!==null&&google.maps.event.removeListener(A),O(google.maps.event.addListener(v,"position_changed",c)))},[c]),l.useEffect(()=>{v&&f&&(j!==null&&google.maps.event.removeListener(j),F(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),l.useEffect(()=>{if(D){var P=n||Cd,{position:M}=P,I=us(P,vd),N;M&&!(M instanceof google.maps.LatLng)&&(N=new google.maps.LatLng(M.lat,M.lng));var T=new pa(Qr(Qr({},I),N?{position:N}:{}));x.current=document.createElement("div"),C(T),a&&b(google.maps.event.addListener(T,"closeclick",a)),o&&w(google.maps.event.addListener(T,"domready",o)),u&&B(google.maps.event.addListener(T,"content_changed",u)),c&&O(google.maps.event.addListener(T,"position_changed",c)),f&&F(google.maps.event.addListener(T,"zindex_changed",f)),T.setContent(x.current),r?T.open(D,r):T.getPosition()?T.open(D):Pe(!1,"You must provide either an anchor or a position prop for <InfoBox>."),h&&h(T)}return()=>{v!==null&&(d&&google.maps.event.removeListener(d),E&&google.maps.event.removeListener(E),y&&google.maps.event.removeListener(y),A&&google.maps.event.removeListener(A),j&&google.maps.event.removeListener(j),g&&g(v),v.close())}},[]),x.current?Rt.createPortal(l.Children.only(e),x.current):null}l.memo(Dd);class yd extends l.PureComponent{constructor(){super(...arguments),H(this,"registeredEvents",[]),H(this,"containerElement",null),H(this,"state",{infoBox:null}),H(this,"open",(e,r)=>{r?this.context!==null&&e.open(this.context,r):e.getPosition()?this.context!==null&&e.open(this.context):Pe(!1,"You must provide either an anchor or a position prop for <InfoBox>.")}),H(this,"setInfoBoxCallback",()=>{this.state.infoBox!==null&&this.containerElement!==null&&(this.state.infoBox.setContent(this.containerElement),this.open(this.state.infoBox,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoBox))})}componentDidMount(){var e=this.props.options||{},{position:r}=e,n=us(e,md),s;r&&!(r instanceof google.maps.LatLng)&&(s=new google.maps.LatLng(r.lat,r.lng));var i=new pa(Qr(Qr({},n),s?{position:s}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=ve({updaterMap:Ca,eventMap:ma,prevProps:{},nextProps:this.props,instance:i}),this.setState({infoBox:i},this.setInfoBoxCallback)}componentDidUpdate(e){var{infoBox:r}=this.state;r!==null&&(me(this.registeredEvents),this.registeredEvents=ve({updaterMap:Ca,eventMap:ma,prevProps:e,nextProps:this.props,instance:r}))}componentWillUnmount(){var{onUnmount:e}=this.props,{infoBox:r}=this.state;r!==null&&(e&&e(r),me(this.registeredEvents),r.close())}render(){return this.containerElement?Rt.createPortal(l.Children.only(this.props.children),this.containerElement):null}}H(yd,"contextType",he);var ls,Da;function bd(){return Da||(Da=1,ls=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var a=i[s];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}),ls}var Ed=bd(),ya=Hi(Ed),ba=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],cs=1,Dr=8;class fs{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");var[r,n]=new Uint8Array(e,0,2);if(r!==219)throw new Error("Data does not appear to be in a KDBush format.");var s=n>>4;if(s!==cs)throw new Error("Got v".concat(s," data when expected v").concat(cs,"."));var i=ba[n&15];if(!i)throw new Error("Unrecognized array type.");var[a]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new fs(o,a,i,e)}constructor(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:64,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Float64Array,s=arguments.length>3?arguments[3]:void 0;if(isNaN(e)||e<0)throw new Error("Unpexpected numItems value: ".concat(e,"."));this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;var i=ba.indexOf(this.ArrayType),a=e*2*this.ArrayType.BYTES_PER_ELEMENT,o=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-o%8)%8;if(i<0)throw new Error("Unexpected typed array class: ".concat(n,"."));s&&s instanceof ArrayBuffer?(this.data=s,this.ids=new this.IndexArrayType(this.data,Dr,e),this.coords=new this.ArrayType(this.data,Dr+o+u,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(Dr+a+o+u),this.ids=new this.IndexArrayType(this.data,Dr,e),this.coords=new this.ArrayType(this.data,Dr+o+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(cs<<4)+i]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=e)}add(e,r){var n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=r,n}finish(){var e=this._pos>>1;if(e!==this.numItems)throw new Error("Added ".concat(e," items when expected ").concat(this.numItems,"."));return ds(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,n,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:i,coords:a,nodeSize:o}=this,u=[0,i.length-1,0],c=[];u.length;){var f=u.pop()||0,h=u.pop()||0,g=u.pop()||0;if(h-g<=o){for(var D=g;D<=h;D++){var v=a[2*D],C=a[2*D+1];v>=e&&v<=n&&C>=r&&C<=s&&c.push(i[D])}continue}var d=g+h>>1,b=a[2*d],y=a[2*d+1];b>=e&&b<=n&&y>=r&&y<=s&&c.push(i[d]),(f===0?e<=b:r<=y)&&(u.push(g),u.push(d-1),u.push(1-f)),(f===0?n>=b:s>=y)&&(u.push(d+1),u.push(h),u.push(1-f))}return c}within(e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:s,coords:i,nodeSize:a}=this,o=[0,s.length-1,0],u=[],c=n*n;o.length;){var f=o.pop()||0,h=o.pop()||0,g=o.pop()||0;if(h-g<=a){for(var D=g;D<=h;D++)wa(i[2*D],i[2*D+1],e,r)<=c&&u.push(s[D]);continue}var v=g+h>>1,C=i[2*v],d=i[2*v+1];wa(C,d,e,r)<=c&&u.push(s[v]),(f===0?e-n<=C:r-n<=d)&&(o.push(g),o.push(v-1),o.push(1-f)),(f===0?e+n>=C:r+n>=d)&&(o.push(v+1),o.push(h),o.push(1-f))}return u}}function ds(t,e,r,n,s,i){if(!(s-n<=r)){var a=n+s>>1;Ea(t,e,a,n,s,i),ds(t,e,r,n,a-1,1-i),ds(t,e,r,a+1,s,1-i)}}function Ea(t,e,r,n,s,i){for(;s>n;){if(s-n>600){var a=s-n+1,o=r-n+1,u=Math.log(a),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(a-c)/a)*(o-a/2<0?-1:1),h=Math.max(n,Math.floor(r-o*c/a+f)),g=Math.min(s,Math.floor(r+(a-o)*c/a+f));Ea(t,e,r,h,g,i)}var D=e[2*r+i],v=n,C=s;for(yr(t,e,n,r),e[2*s+i]>D&&yr(t,e,n,s);v<C;){for(yr(t,e,v,C),v++,C--;e[2*v+i]<D;)v++;for(;e[2*C+i]>D;)C--}e[2*n+i]===D?yr(t,e,n,C):(C++,yr(t,e,C,s)),C<=r&&(n=C+1),r<=C&&(s=C-1)}}function yr(t,e,r,n){hs(t,r,n),hs(e,2*r,2*n),hs(e,2*r+1,2*n+1)}function hs(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function wa(t,e,r,n){var s=t-r,i=e-n;return s*s+i*i}var wd={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ba=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),_t=2,wt=3,gs=4,Bt=5,Aa=6;class Bd{constructor(e){this.options=Object.assign(Object.create(wd),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){var{log:r,minZoom:n,maxZoom:s}=this.options;r&&console.time("total time");var i="prepare ".concat(e.length," points");r&&console.time(i),this.points=e;for(var a=[],o=0;o<e.length;o++){var u=e[o];if(u.geometry){var[c,f]=u.geometry.coordinates,h=Ba($r(c)),g=Ba(Rr(f));a.push(h,g,1/0,o,-1,1),this.options.reduce&&a.push(0)}}var D=this.trees[s+1]=this._createTree(a);r&&console.timeEnd(i);for(var v=s;v>=n;v--){var C=+Date.now();D=this.trees[v]=this._createTree(this._cluster(D,v)),r&&console.log("z%d: %d clusters in %dms",v,D.numItems,+Date.now()-C)}return r&&console.timeEnd("total time"),this}getClusters(e,r){var n=((e[0]+180)%360+360)%360-180,s=Math.max(-90,Math.min(90,e[1])),i=e[2]===180?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,i=180;else if(n>i){var o=this.getClusters([n,s,180,a],r),u=this.getClusters([-180,s,i,a],r);return o.concat(u)}var c=this.trees[this._limitZoom(r)],f=c.range($r(n),Rr(a),$r(i),Rr(s)),h=c.data,g=[];for(var D of f){var v=this.stride*D;g.push(h[v+Bt]>1?Oa(h,v,this.clusterProps):this.points[h[v+wt]])}return g}getChildren(e){var r=this._getOriginId(e),n=this._getOriginZoom(e),s="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(s);var a=i.data;if(r*this.stride>=a.length)throw new Error(s);var o=this.options.radius/(this.options.extent*Math.pow(2,n-1)),u=a[r*this.stride],c=a[r*this.stride+1],f=i.within(u,c,o),h=[];for(var g of f){var D=g*this.stride;a[D+gs]===e&&h.push(a[D+Bt]>1?Oa(a,D,this.clusterProps):this.points[a[D+wt]])}if(h.length===0)throw new Error(s);return h}getLeaves(e,r,n){r=r||10,n=n||0;var s=[];return this._appendLeaves(s,e,r,n,0),s}getTile(e,r,n){var s=this.trees[this._limitZoom(e)],i=Math.pow(2,e),{extent:a,radius:o}=this.options,u=o/a,c=(n-u)/i,f=(n+1+u)/i,h={features:[]};return this._addTileFeatures(s.range((r-u)/i,c,(r+1+u)/i,f),s.data,r,n,i,h),r===0&&this._addTileFeatures(s.range(1-u/i,c,1,f),s.data,i,n,i,h),r===i-1&&this._addTileFeatures(s.range(0,c,u/i,f),s.data,-1,n,i,h),h.features.length?h:null}getClusterExpansionZoom(e){for(var r=this._getOriginZoom(e)-1;r<=this.options.maxZoom;){var n=this.getChildren(e);if(r++,n.length!==1)break;e=n[0].properties.cluster_id}return r}_appendLeaves(e,r,n,s,i){var a=this.getChildren(r);for(var o of a){var u=o.properties;if(u&&u.cluster?i+u.point_count<=s?i+=u.point_count:i=this._appendLeaves(e,u.cluster_id,n,s,i):i<s?i++:e.push(o),e.length===n)break}return i}_createTree(e){for(var r=new fs(e.length/this.stride|0,this.options.nodeSize,Float32Array),n=0;n<e.length;n+=this.stride)r.add(e[n],e[n+1]);return r.finish(),r.data=e,r}_addTileFeatures(e,r,n,s,i,a){for(var o of e){var u=o*this.stride,c=r[u+Bt]>1,f=void 0,h=void 0,g=void 0;if(c)f=La(r,u,this.clusterProps),h=r[u],g=r[u+1];else{var D=this.points[r[u+wt]];f=D.properties;var[v,C]=D.geometry.coordinates;h=$r(v),g=Rr(C)}var d={type:1,geometry:[[Math.round(this.options.extent*(h*i-n)),Math.round(this.options.extent*(g*i-s))]],tags:f},b=void 0;c||this.options.generateId?b=r[u+wt]:b=this.points[r[u+wt]].id,b!==void 0&&(d.id=b),a.features.push(d)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,r){for(var{radius:n,extent:s,reduce:i,minPoints:a}=this.options,o=n/(s*Math.pow(2,r)),u=e.data,c=[],f=this.stride,h=0;h<u.length;h+=f)if(!(u[h+_t]<=r)){u[h+_t]=r;var g=u[h],D=u[h+1],v=e.within(u[h],u[h+1],o),C=u[h+Bt],d=C;for(var b of v){var y=b*f;u[y+_t]>r&&(d+=u[y+Bt])}if(d>C&&d>=a){var w=g*C,E=D*C,B=void 0,A=-1,O=((h/f|0)<<5)+(r+1)+this.points.length;for(var j of v){var F=j*f;if(!(u[F+_t]<=r)){u[F+_t]=r;var x=u[F+Bt];w+=u[F]*x,E+=u[F+1]*x,u[F+gs]=O,i&&(B||(B=this._map(u,h,!0),A=this.clusterProps.length,this.clusterProps.push(B)),i(B,this._map(u,F)))}}u[h+gs]=O,c.push(w/d,E/d,1/0,O,-1,d),i&&c.push(A)}else{for(var P=0;P<f;P++)c.push(u[h+P]);if(d>1)for(var M of v){var I=M*f;if(!(u[I+_t]<=r)){u[I+_t]=r;for(var N=0;N<f;N++)c.push(u[I+N])}}}}return c}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,r,n){if(e[r+Bt]>1){var s=this.clusterProps[e[r+Aa]];return n?Object.assign({},s):s}var i=this.points[e[r+wt]].properties,a=this.options.map(i);return n&&a===i?Object.assign({},a):a}}function Oa(t,e,r){return{type:"Feature",id:t[e+wt],properties:La(t,e,r),geometry:{type:"Point",coordinates:[Ad(t[e]),Od(t[e+1])]}}}function La(t,e,r){var n=t[e+Bt],s=n>=1e4?"".concat(Math.round(n/1e3),"k"):n>=1e3?"".concat(Math.round(n/100)/10,"k"):n,i=t[e+Aa],a=i===-1?{}:Object.assign({},r[i]);return Object.assign(a,{cluster:!0,cluster_id:t[e+wt],point_count:n,point_count_abbreviated:s})}function $r(t){return t/360+.5}function Rr(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Ad(t){return(t-.5)*360}function Od(t){var e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
|
10
10
|
Copyright (c) Microsoft Corporation.
|
|
11
11
|
|
|
12
12
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
`);ze.forEach((Ke,ht)=>{Ke&&m.insertText(e,Ke),ht!==ze.length-1&&m.insertSoftBreak(e)})},{at:T});if(L.equals(T.anchor.path,T.focus.path)){var[_e,et]=U.edges(T),Ee={start:_e.offset,end:et.offset,text:we};if(we&&c&&N==="insertCompositionText"){var Be=c.start+c.text.search(/\S|$/),at=Ee.start+Ee.text.search(/\S|$/);at===Be+1&&Ee.end===c.start+c.text.length?(Ee.start-=1,c=null,x()):c=!1}else N==="insertText"?c===null?c=Ee:c&&U.isCollapsed(T)&&c.end+c.text.length===_e.offset?c=Pn(Pn({},c),{},{text:c.text+we}):c=!1:c=!1;if(G){d(_e.path,Ee);return}}return b(()=>m.insertText(e,we),{at:T})}}}}},w=()=>!!Ft.get(e),E=()=>{var M;return!!((M=$e.get(e))!==null&&M!==void 0&&M.length)},B=()=>w()||E(),A=()=>s,O=M=>{xt.set(e,M),a&&(clearTimeout(a),a=null);var{selection:I}=e;if(M){var N=!I||!L.equals(I.anchor.path,M.anchor.path),T=!I||!L.equals(I.anchor.path.slice(0,-1),M.anchor.path.slice(0,-1));(N&&c||T)&&(c=!1),(N||E())&&(a=setTimeout(g,HC))}},j=()=>{(w()||!E())&&g()},F=M=>{E()||(C(!0),setTimeout(C))},x=()=>{w()||(o=setTimeout(g))},P=M=>{if(!(E()||w())&&M.some(N=>ti(e,N,M))){var I;(I=pl.get(e))===null||I===void 0||I()}};return{flush:g,scheduleFlush:x,hasPendingDiffs:E,hasPendingAction:w,hasPendingChanges:B,isFlushing:A,handleUserSelect:O,handleCompositionEnd:D,handleCompositionStart:v,handleDOMBeforeInput:y,handleKeyDown:F,handleDomMutations:P,handleInput:j}}function ZC(){var t=l.useRef(!1);return l.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t.current}var jr=Ln?l.useLayoutEffect:l.useEffect;function KC(t,e,r){var[n]=l.useState(()=>new MutationObserver(e));jr(()=>{n.takeRecords()}),l.useEffect(()=>{if(!t.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return n.observe(t.current,r),()=>n.disconnect()},[n,t,r])}var XC=["node"];function Ll(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function YC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ll(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ll(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var JC={subtree:!0,childList:!0,characterData:!0},QC=Ve?t=>{var{node:e}=t,r=or(t,XC);if(!Ve)return null;var n=Ot(),s=ZC(),[i]=l.useState(()=>GC(YC({editor:n},r)));return KC(e,i.handleDomMutations,JC),$s.set(n,i.scheduleFlush),s&&i.flush(),i}:()=>null,$C=["anchor","focus"],RC=["anchor","focus"],e0=(t,e)=>Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>e.hasOwnProperty(r)&&t[r]===e[r]),Sl=(t,e)=>{var r=or(t,$C),n=or(e,RC);return t[cr]===e[cr]&&e0(r,n)},t0=(t,e)=>{if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++){var n=t[r],s=e[r];if(!U.equals(n,s)||!Sl(n,s))return!1}return!0},r0=(t,e)=>{if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++){var n=t[r],s=e[r];if(n.anchor.offset!==s.anchor.offset||n.focus.offset!==s.focus.offset||!Sl(n,s))return!1}return!0};function Fl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function n0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fl(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var s0=t=>{var{isLast:e,leaf:r,parent:n,text:s}=t,i=Ot(),a=V.findPath(i,s),o=L.parent(a),u=!!r[vl];return i.isVoid(n)?l.createElement(si,{length:ee.string(n).length}):r.text===""&&n.children[n.children.length-1]===s&&!i.isInline(n)&&m.string(i,o)===""?l.createElement(si,{isLineBreak:!0,isMarkPlaceholder:u}):r.text===""?l.createElement(si,{isMarkPlaceholder:u}):e&&r.text.slice(-1)===`
|
|
40
40
|
`?l.createElement(xl,{isTrailing:!0,text:r.text}):l.createElement(xl,{text:r.text})},xl=t=>{var{text:e,isTrailing:r=!1}=t,n=l.useRef(null),s=()=>"".concat(e??"").concat(r?`
|
|
41
41
|
`:""),[i]=l.useState(s);return jr(()=>{var a=s();n.current&&n.current.textContent!==a&&(n.current.textContent=a)}),l.createElement(i0,{ref:n},i)},i0=l.memo(l.forwardRef((t,e)=>l.createElement("span",{"data-slate-string":!0,ref:e},t.children))),si=t=>{var{length:e=0,isLineBreak:r=!1,isMarkPlaceholder:n=!1}=t,s={"data-slate-zero-width":r?"n":"z","data-slate-length":e};return n&&(s["data-slate-mark-placeholder"]=!0),l.createElement("span",n0({},s),!(Ve||fl)||!r?"\uFEFF":null,r?l.createElement("br",null):null)};function Pl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Ml(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pl(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var a0=Ve?300:0;function o0(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function kl(t){t.current&&(clearTimeout(t.current),t.current=null)}var u0=t=>{var{leaf:e,isLast:r,text:n,parent:s,renderPlaceholder:i,renderLeaf:a=y=>l.createElement(c0,Ml({},y))}=t,o=Ot(),u=l.useRef(null),c=l.useRef(null),[f,h]=l.useState(!1),g=l.useRef(null),D=l.useCallback(y=>{if(o0(u,y==null),y==null){var w;Ys.delete(o),(w=e.onPlaceholderResize)===null||w===void 0||w.call(e,null)}else{if(Ys.set(o,y),!u.current){var E=window.ResizeObserver||hC;u.current=new E(()=>{var B;(B=e.onPlaceholderResize)===null||B===void 0||B.call(e,y)})}u.current.observe(y),c.current=y}},[c,e,o]),v=l.createElement(s0,{isLast:r,leaf:e,parent:s,text:n}),C=!!e[cr];if(l.useEffect(()=>(C?g.current||(g.current=setTimeout(()=>{h(!0),g.current=null},a0)):(kl(g),h(!1)),()=>kl(g)),[C,h]),C&&f){var d={children:e.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:Kt?"inherit":void 0},contentEditable:!1,ref:D}};v=l.createElement(l.Fragment,null,i(d),v)}var b={"data-slate-leaf":!0};return a({attributes:b,children:v,leaf:e,text:n})},l0=l.memo(u0,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&ie.equals(e.leaf,t.leaf)&&e.leaf[cr]===t.leaf[cr]),c0=t=>{var{attributes:e,children:r}=t;return l.createElement("span",Ml({},e),r)},f0=t=>{for(var{decorations:e,isLast:r,parent:n,renderPlaceholder:s,renderLeaf:i,text:a}=t,o=Ot(),u=l.useRef(null),c=ie.decorations(a,e),f=V.findKey(o,a),h=[],g=0;g<c.length;g++){var D=c[g];h.push(l.createElement(l0,{isLast:r&&g===c.length-1,key:"".concat(f.id,"-").concat(g),renderPlaceholder:s,leaf:D,text:a,parent:n,renderLeaf:i}))}var v=l.useCallback(C=>{var d=xn.get(o);C?(d==null||d.set(f,C),Xt.set(a,C),Tr.set(C,a)):(d==null||d.delete(f),Xt.delete(a),u.current&&Tr.delete(u.current)),u.current=C},[u,o,f,a]);return l.createElement("span",{"data-slate-node":"text",ref:v},h)},Tl=l.memo(f0,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&r0(e.decorations,t.decorations));function Nl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function ii(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nl(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var d0=t=>{var{decorations:e,element:r,renderElement:n=y=>l.createElement(g0,ii({},y)),renderPlaceholder:s,renderLeaf:i,selection:a}=t,o=Ot(),u=m0(),c=o.isInline(r),f=V.findKey(o,r),h=l.useCallback(y=>{var w=xn.get(o);y?(w==null||w.set(f,y),Xt.set(r,y),Tr.set(y,r)):(w==null||w.delete(f),Xt.delete(r))},[o,f,r]),g=jl({decorations:e,node:r,renderElement:n,renderPlaceholder:s,renderLeaf:i,selection:a}),D={"data-slate-node":"element",ref:h};if(c&&(D["data-slate-inline"]=!0),!c&&m.hasInlines(o,r)){var v=ee.string(r),C=Nu(v);C==="rtl"&&(D.dir=C)}if(m.isVoid(o,r)){D["data-slate-void"]=!0,!u&&c&&(D.contentEditable=!1);var d=c?"span":"div",[[b]]=ee.texts(r);g=l.createElement(d,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},l.createElement(Tl,{renderPlaceholder:s,decorations:[],isLast:!1,parent:r,text:b})),Ks.set(b,0),Xs.set(b,r)}return n({attributes:D,children:g,element:r})},h0=l.memo(d0,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t0(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&U.equals(t.selection,e.selection))),g0=t=>{var{attributes:e,children:r,element:n}=t,s=Ot(),i=s.isInline(n)?"span":"div";return l.createElement(i,ii(ii({},e),{},{style:{position:"relative"}}),r)},Il=l.createContext(()=>[]),p0=()=>l.useContext(Il),v0=l.createContext(!1),jl=t=>{var{decorations:e,node:r,renderElement:n,renderPlaceholder:s,renderLeaf:i,selection:a}=t,o=p0(),u=Ot();lr.set(u,!1);for(var c=V.findPath(u,r),f=[],h=se.isElement(r)&&!u.isInline(r)&&m.hasInlines(u,r),g=0;g<r.children.length;g++){var D=c.concat(g),v=r.children[g],C=V.findKey(u,v),d=m.range(u,D),b=a&&U.intersection(d,a),y=o([v,D]);for(var w of e){var E=U.intersection(w,d);E&&y.push(E)}se.isElement(v)?f.push(l.createElement(v0.Provider,{key:"provider-".concat(C.id),value:!!b},l.createElement(h0,{decorations:y,element:v,key:C.id,renderElement:n,renderPlaceholder:s,renderLeaf:i,selection:b}))):f.push(l.createElement(Tl,{decorations:y,key:C.id,isLast:h&&g===r.children.length-1,parent:r,renderPlaceholder:s,renderLeaf:i,text:v})),Ks.set(v,g),Xs.set(v,r)}return f},zl=l.createContext(!1),m0=()=>l.useContext(zl),_l=l.createContext(null),Mn=()=>{var t=l.useContext(_l);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function C0(){var t=Ot(),e=l.useRef(!1),r=l.useRef(0),n=l.useCallback(()=>{if(!e.current){e.current=!0;var s=V.getWindow(t);s.cancelAnimationFrame(r.current),r.current=s.requestAnimationFrame(()=>{e.current=!1})}},[t]);return l.useEffect(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:e,onUserInput:n}}var D0=3,y0={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},b0={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},E0={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Se=t=>{var e=y0[t],r=b0[t],n=E0[t],s=e&&Es(e),i=r&&Es(r),a=n&&Es(n);return o=>!!(s&&s(o)||dl&&i&&i(o)||!dl&&a&&a(o))},Fe={isBold:Se("bold"),isCompose:Se("compose"),isMoveBackward:Se("moveBackward"),isMoveForward:Se("moveForward"),isDeleteBackward:Se("deleteBackward"),isDeleteForward:Se("deleteForward"),isDeleteLineBackward:Se("deleteLineBackward"),isDeleteLineForward:Se("deleteLineForward"),isDeleteWordBackward:Se("deleteWordBackward"),isDeleteWordForward:Se("deleteWordForward"),isExtendBackward:Se("extendBackward"),isExtendForward:Se("extendForward"),isExtendLineBackward:Se("extendLineBackward"),isExtendLineForward:Se("extendLineForward"),isItalic:Se("italic"),isMoveLineBackward:Se("moveLineBackward"),isMoveLineForward:Se("moveLineForward"),isMoveWordBackward:Se("moveWordBackward"),isMoveWordForward:Se("moveWordForward"),isRedo:Se("redo"),isSoftBreak:Se("insertSoftBreak"),isSplitBlock:Se("splitBlock"),isTransposeCharacter:Se("transposeCharacter"),isUndo:Se("undo")},w0=(t,e)=>{var r=[],n=()=>{r=[]},s=a=>{if(e.current){var o=a.filter(u=>ti(t,u,a));r.push(...o)}};function i(){r.length>0&&(r.reverse().forEach(a=>{a.type!=="characterData"&&(a.removedNodes.forEach(o=>{a.target.insertBefore(o,a.nextSibling)}),a.addedNodes.forEach(o=>{a.target.removeChild(o)}))}),n())}return{registerMutations:s,restoreDOM:i,clear:n}},B0={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class Ul extends l.Component{constructor(){super(...arguments),st(this,"context",null),st(this,"manager",null),st(this,"mutationObserver",null)}observe(){var e,{node:r}=this.props;if(!r.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(e=this.mutationObserver)===null||e===void 0||e.observe(r.current,B0)}componentDidMount(){var{receivedUserInput:e}=this.props,r=this.context;this.manager=w0(r,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,r,n,s=(e=this.mutationObserver)===null||e===void 0?void 0:e.takeRecords();if(s!=null&&s.length){var i;(i=this.manager)===null||i===void 0||i.registerMutations(s)}return(r=this.mutationObserver)===null||r===void 0||r.disconnect(),(n=this.manager)===null||n===void 0||n.restoreDOM(),null}componentDidUpdate(){var e;(e=this.manager)===null||e===void 0||e.clear(),this.observe()}componentWillUnmount(){var e;(e=this.mutationObserver)===null||e===void 0||e.disconnect()}render(){return this.props.children}}st(Ul,"contextType",qs);var A0=Ve?Ul:t=>{var{children:e}=t;return l.createElement(l.Fragment,null,e)},O0=l.createContext(!1),L0=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],S0=["text"];function Wl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function ft(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Wl(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var F0=t=>l.createElement(l.Fragment,null,jl(t)),x0=l.forwardRef((t,e)=>{var r=l.useCallback(S=>l.createElement(P0,ft({},S)),[]),{autoFocus:n,decorate:s=M0,onDOMBeforeInput:i,placeholder:a,readOnly:o=!1,renderElement:u,renderLeaf:c,renderPlaceholder:f=r,scrollSelectionIntoView:h=k0,style:g={},as:D="div",disableDefaultStyles:v=!1}=t,C=or(t,L0),d=Mn(),[b,y]=l.useState(!1),w=l.useRef(null),E=l.useRef([]),[B,A]=l.useState(),O=l.useRef(!1),{onUserInput:j,receivedUserInput:F}=C0(),[,x]=l.useReducer(S=>S+1,0);pl.set(d,x),Js.set(d,o);var P=l.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);l.useEffect(()=>{w.current&&n&&w.current.focus()},[n]);var M=l.useRef(),I=l.useMemo(()=>Vm(()=>{if(lr.get(d)){I();return}var S=V.toDOMNode(d,d),W=S.getRootNode();if(!O.current&&Kt&&W instanceof ShadowRoot){O.current=!0;var z=PC();z?document.execCommand("indent"):K.deselect(d),O.current=!1;return}var Z=M.current;if((Ve||!V.isComposing(d))&&(!P.isUpdatingSelection||Z!=null&&Z.isFlushing())&&!P.isDraggingInternally){var Q=V.findDocumentOrShadowRoot(d),{activeElement:J}=Q,ne=V.toDOMNode(d,d),oe=Ir(Q);if(J===ne?(P.latestElement=J,St.set(d,!0)):St.delete(d),!oe)return K.deselect(d);var{anchorNode:ue,focusNode:le}=oe,ge=V.hasEditableTarget(d,ue)||V.isTargetInsideNonReadonlyVoid(d,ue),ye=V.hasTarget(d,le);if(ge&&ye){var De=V.toSlateRange(d,oe,{exactMatch:!1,suppressThrow:!0});De&&(!V.isComposing(d)&&!(Z!=null&&Z.hasPendingChanges())&&!(Z!=null&&Z.isFlushing())?K.select(d,De):Z==null||Z.handleUserSelect(De))}o&&(!ge||!ye)&&K.deselect(d)}},100),[d,o,P]),N=l.useMemo(()=>jm(I,0),[I]);M.current=QC({node:w,onDOMSelectionChange:I,scheduleOnDOMSelectionChange:N}),jr(()=>{var S,W,z;w.current&&(z=Rs(w.current))?(gl.set(d,z),Sn.set(d,w.current),Xt.set(d,w.current),Tr.set(w.current,d)):Xt.delete(d);var{selection:Z}=d,Q=V.findDocumentOrShadowRoot(d),J=Ir(Q);if(!(!J||!V.isFocused(d)||(S=M.current)!==null&&S!==void 0&&S.hasPendingAction())){var ne=ge=>{var ye=J.type!=="None";if(!(!Z&&!ye)){var De=J.focusNode,xe;if(ur&&J.rangeCount>1){var Ne=J.getRangeAt(0),Ze=J.getRangeAt(J.rangeCount-1);Ne.startContainer===De?xe=Ze.endContainer:xe=Ne.startContainer}else xe=J.anchorNode;var we=Sn.get(d),_e=!1;if(we.contains(xe)&&we.contains(De)&&(_e=!0),ye&&_e&&Z&&!ge){var et=V.toSlateRange(d,J,{exactMatch:!0,suppressThrow:!0});if(et&&U.equals(et,Z)){var Ee;if(!P.hasMarkPlaceholder||(Ee=xe)!==null&&Ee!==void 0&&(Ee=Ee.parentElement)!==null&&Ee!==void 0&&Ee.hasAttribute("data-slate-mark-placeholder"))return}}if(Z&&!V.hasRange(d,Z)){d.selection=V.toSlateRange(d,J,{exactMatch:!1,suppressThrow:!0});return}P.isUpdatingSelection=!0;var Be=Z&&V.toDOMRange(d,Z);return Be?(V.isComposing(d)&&!Ve?J.collapseToEnd():U.isBackward(Z)?J.setBaseAndExtent(Be.endContainer,Be.endOffset,Be.startContainer,Be.startOffset):J.setBaseAndExtent(Be.startContainer,Be.startOffset,Be.endContainer,Be.endOffset),h(d,Be)):J.removeAllRanges(),Be}};J.rangeCount<=1&&ne();var oe=((W=M.current)===null||W===void 0?void 0:W.isFlushing())==="action";if(!Ve||!oe){setTimeout(()=>{P.isUpdatingSelection=!1});return}var ue=null,le=requestAnimationFrame(()=>{if(oe){var ge=ye=>{try{var De=V.toDOMNode(d,d);De.focus(),ne(ye)}catch{}};ge(),ue=setTimeout(()=>{ge(!0),P.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(le),ue&&clearTimeout(ue)}}});var T=l.useCallback(S=>{var W=V.toDOMNode(d,d),z=W.getRootNode();if(O!=null&&O.current&&Kt&&z instanceof ShadowRoot){var Z=S.getTargetRanges(),Q=Z[0],J=new window.Range;J.setStart(Q.startContainer,Q.startOffset),J.setEnd(Q.endContainer,Q.endOffset);var ne=V.toSlateRange(d,J,{exactMatch:!1,suppressThrow:!1});K.select(d,ne),S.preventDefault(),S.stopImmediatePropagation();return}if(j(),!o&&V.hasEditableTarget(d,S.target)&&!T0(S,i)){var oe;if(M.current)return M.current.handleDOMBeforeInput(S);N.flush(),I.flush();var{selection:ue}=d,{inputType:le}=S,ge=S.dataTransfer||S.data||void 0,ye=le==="insertCompositionText"||le==="deleteCompositionText";if(ye&&V.isComposing(d))return;var De=!1;if(le==="insertText"&&ue&&U.isCollapsed(ue)&&S.data&&S.data.length===1&&/[a-z ]/i.test(S.data)&&ue.anchor.offset!==0&&(De=!0,d.marks&&(De=!1),!lr.get(d))){var xe,Ne,{anchor:Ze}=ue,[we,_e]=V.toDOMPoint(d,Ze),et=(xe=we.parentElement)===null||xe===void 0?void 0:xe.closest("a"),Ee=V.getWindow(d);if(De&&et&&V.hasDOMNode(d,et)){var Be,at=Ee==null?void 0:Ee.document.createTreeWalker(et,NodeFilter.SHOW_TEXT).lastChild();at===we&&((Be=at.textContent)===null||Be===void 0?void 0:Be.length)===_e&&(De=!1)}if(De&&we.parentElement&&(Ee==null||(Ne=Ee.getComputedStyle(we.parentElement))===null||Ne===void 0?void 0:Ne.whiteSpace)==="pre"){var ze=m.above(d,{at:Ze.path,match:Et=>se.isElement(Et)&&m.isBlock(d,Et)});ze&&ee.string(ze[0]).includes(" ")&&(De=!1)}}if((!le.startsWith("delete")||le.startsWith("deleteBy"))&&!lr.get(d)){var[Ke]=S.getTargetRanges();if(Ke){var ht=V.toSlateRange(d,Ke,{exactMatch:!1,suppressThrow:!1});if(!ue||!U.equals(ue,ht)){De=!1;var Xe=!ye&&d.selection&&m.rangeRef(d,d.selection);K.select(d,ht),Xe&&Nr.set(d,Xe)}}}if(ye)return;if(De||S.preventDefault(),ue&&U.isExpanded(ue)&&le.startsWith("delete")){var dr=le.endsWith("Backward")?"backward":"forward";m.deleteFragment(d,{direction:dr});return}switch(le){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{m.deleteFragment(d);break}case"deleteContent":case"deleteContentForward":{m.deleteForward(d);break}case"deleteContentBackward":{m.deleteBackward(d);break}case"deleteEntireSoftLine":{m.deleteBackward(d,{unit:"line"}),m.deleteForward(d,{unit:"line"});break}case"deleteHardLineBackward":{m.deleteBackward(d,{unit:"block"});break}case"deleteSoftLineBackward":{m.deleteBackward(d,{unit:"line"});break}case"deleteHardLineForward":{m.deleteForward(d,{unit:"block"});break}case"deleteSoftLineForward":{m.deleteForward(d,{unit:"line"});break}case"deleteWordBackward":{m.deleteBackward(d,{unit:"word"});break}case"deleteWordForward":{m.deleteForward(d,{unit:"word"});break}case"insertLineBreak":m.insertSoftBreak(d);break;case"insertParagraph":{m.insertBreak(d);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{le==="insertFromComposition"&&V.isComposing(d)&&(y(!1),Yt.set(d,!1)),(ge==null?void 0:ge.constructor.name)==="DataTransfer"?V.insertData(d,ge):typeof ge=="string"&&(De?E.current.push(()=>m.insertText(d,ge)):m.insertText(d,ge));break}}var gt=(oe=Nr.get(d))===null||oe===void 0?void 0:oe.unref();Nr.delete(d),gt&&(!d.selection||!U.equals(d.selection,gt))&&K.select(d,gt)}},[d,I,j,i,o,N]),X=l.useCallback(S=>{S==null?(I.cancel(),N.cancel(),Sn.delete(d),Xt.delete(d),w.current&&Lt&&w.current.removeEventListener("beforeinput",T)):Lt&&S.addEventListener("beforeinput",T),w.current=S,typeof e=="function"?e(S):e&&(e.current=S)},[I,N,d,T,e]);jr(()=>{var S=V.getWindow(d);S.document.addEventListener("selectionchange",N);var W=()=>{P.isDraggingInternally=!1};return S.document.addEventListener("dragend",W),S.document.addEventListener("drop",W),()=>{S.document.removeEventListener("selectionchange",N),S.document.removeEventListener("dragend",W),S.document.removeEventListener("drop",W)}},[N,P]);var _=s([d,[]]),$=a&&d.children.length===1&&Array.from(ee.texts(d)).length===1&&ee.string(d)===""&&!b,q=l.useCallback(S=>{if(S&&$){var W;A((W=S.getBoundingClientRect())===null||W===void 0?void 0:W.height)}else A(void 0)},[$]);if($){var G=m.start(d,[]);_.push({[cr]:!0,placeholder:a,onPlaceholderResize:q,anchor:G,focus:G})}var{marks:R}=d;if(P.hasMarkPlaceholder=!1,d.selection&&U.isCollapsed(d.selection)&&R){var{anchor:re}=d.selection,Y=ee.leaf(d,re.path),ae=or(Y,S0);if(!ie.equals(Y,R,{loose:!0})){P.hasMarkPlaceholder=!0;var k=Object.fromEntries(Object.keys(ae).map(S=>[S,null]));_.push(ft(ft(ft({[vl]:!0},k),R),{},{anchor:re,focus:re}))}}return l.useEffect(()=>{setTimeout(()=>{var{selection:S}=d;if(S){var{anchor:W}=S,z=ee.leaf(d,W.path);if(R&&!ie.equals(z,R,{loose:!0})){ut.set(d,R);return}}ut.delete(d)})}),l.createElement(zl.Provider,{value:o},l.createElement(O0.Provider,{value:b},l.createElement(Il.Provider,{value:s},l.createElement(A0,{node:w,receivedUserInput:F},l.createElement(D,ft(ft({role:o?void 0:"textbox","aria-multiline":o?void 0:!0},C),{},{spellCheck:Lt||!Ln?C.spellCheck:!1,autoCorrect:Lt||!Ln?C.autoCorrect:"false",autoCapitalize:Lt||!Ln?C.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!o,zindex:-1,suppressContentEditableWarning:!0,ref:X,style:ft(ft({},v?{}:ft({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},B?{minHeight:B}:{})),g),onBeforeInput:l.useCallback(S=>{if(!Lt&&!o&&!qe(S,C.onBeforeInput)&&V.hasSelectableTarget(d,S.target)&&(S.preventDefault(),!V.isComposing(d))){var W=S.data;m.insertText(d,W)}},[C.onBeforeInput,d,o]),onInput:l.useCallback(S=>{if(!qe(S,C.onInput)){if(M.current){M.current.handleInput();return}for(var W of E.current)W();if(E.current=[],!V.isFocused(d)){var z=S.nativeEvent,Z=d;if(z.inputType==="historyUndo"&&typeof Z.undo=="function"){Z.undo();return}if(z.inputType==="historyRedo"&&typeof Z.redo=="function"){Z.redo();return}}}},[C.onInput,d]),onBlur:l.useCallback(S=>{if(!(o||P.isUpdatingSelection||!V.hasSelectableTarget(d,S.target)||qe(S,C.onBlur))){var W=V.findDocumentOrShadowRoot(d);if(P.latestElement!==W.activeElement){var{relatedTarget:z}=S,Z=V.toDOMNode(d,d);if(z!==Z&&!(it(z)&&z.hasAttribute("data-slate-spacer"))){if(z!=null&&Pt(z)&&V.hasDOMNode(d,z)){var Q=V.toSlateNode(d,z);if(se.isElement(Q)&&!d.isVoid(Q))return}if(Kt){var J=Ir(W);J==null||J.removeAllRanges()}St.delete(d)}}}},[o,P.isUpdatingSelection,P.latestElement,d,C.onBlur]),onClick:l.useCallback(S=>{if(V.hasTarget(d,S.target)&&!qe(S,C.onClick)&&Pt(S.target)){var W=V.toSlateNode(d,S.target),z=V.findPath(d,W);if(!m.hasPath(d,z)||ee.get(d,z)!==W)return;if(S.detail===D0&&z.length>=1){var Z=z;if(!(se.isElement(W)&&m.isBlock(d,W))){var Q,J=m.above(d,{match:De=>se.isElement(De)&&m.isBlock(d,De),at:z});Z=(Q=J==null?void 0:J[1])!==null&&Q!==void 0?Q:z.slice(0,1)}var ne=m.range(d,Z);K.select(d,ne);return}if(o)return;var oe=m.start(d,z),ue=m.end(d,z),le=m.void(d,{at:oe}),ge=m.void(d,{at:ue});if(le&&ge&&L.equals(le[1],ge[1])){var ye=m.range(d,oe);K.select(d,ye)}}},[d,C.onClick,o]),onCompositionEnd:l.useCallback(S=>{if(V.hasSelectableTarget(d,S.target)){var W;if(V.isComposing(d)&&Promise.resolve().then(()=>{y(!1),Yt.set(d,!1)}),(W=M.current)===null||W===void 0||W.handleCompositionEnd(S),qe(S,C.onCompositionEnd)||Ve)return;if(!Kt&&!yC&&!fl&&!EC&&!bC&&S.data){var z=ut.get(d);ut.delete(d),z!==void 0&&(Dt.set(d,d.marks),d.marks=z),m.insertText(d,S.data);var Z=Dt.get(d);Dt.delete(d),Z!==void 0&&(d.marks=Z)}}},[C.onCompositionEnd,d]),onCompositionUpdate:l.useCallback(S=>{V.hasSelectableTarget(d,S.target)&&!qe(S,C.onCompositionUpdate)&&(V.isComposing(d)||(y(!0),Yt.set(d,!0)))},[C.onCompositionUpdate,d]),onCompositionStart:l.useCallback(S=>{if(V.hasSelectableTarget(d,S.target)){var W;if((W=M.current)===null||W===void 0||W.handleCompositionStart(S),qe(S,C.onCompositionStart)||Ve)return;y(!0);var{selection:z}=d;if(z&&U.isExpanded(z)){m.deleteFragment(d);return}}},[C.onCompositionStart,d]),onCopy:l.useCallback(S=>{V.hasSelectableTarget(d,S.target)&&!qe(S,C.onCopy)&&!Hl(S)&&(S.preventDefault(),V.setFragmentData(d,S.clipboardData,"copy"))},[C.onCopy,d]),onCut:l.useCallback(S=>{if(!o&&V.hasSelectableTarget(d,S.target)&&!qe(S,C.onCut)&&!Hl(S)){S.preventDefault(),V.setFragmentData(d,S.clipboardData,"cut");var{selection:W}=d;if(W)if(U.isExpanded(W))m.deleteFragment(d);else{var z=ee.parent(d,W.anchor.path);m.isVoid(d,z)&&K.delete(d)}}},[o,d,C.onCut]),onDragOver:l.useCallback(S=>{if(V.hasTarget(d,S.target)&&!qe(S,C.onDragOver)){var W=V.toSlateNode(d,S.target);se.isElement(W)&&m.isVoid(d,W)&&S.preventDefault()}},[C.onDragOver,d]),onDragStart:l.useCallback(S=>{if(!o&&V.hasTarget(d,S.target)&&!qe(S,C.onDragStart)){var W=V.toSlateNode(d,S.target),z=V.findPath(d,W),Z=se.isElement(W)&&m.isVoid(d,W)||m.void(d,{at:z,voids:!0});if(Z){var Q=m.range(d,z);K.select(d,Q)}P.isDraggingInternally=!0,V.setFragmentData(d,S.dataTransfer,"drag")}},[o,d,C.onDragStart,P]),onDrop:l.useCallback(S=>{if(!o&&V.hasTarget(d,S.target)&&!qe(S,C.onDrop)){S.preventDefault();var W=d.selection,z=V.findEventRange(d,S),Z=S.dataTransfer;K.select(d,z),P.isDraggingInternally&&W&&!U.equals(W,z)&&!m.void(d,{at:z,voids:!0})&&K.delete(d,{at:W}),V.insertData(d,Z),V.isFocused(d)||V.focus(d)}},[o,d,C.onDrop,P]),onDragEnd:l.useCallback(S=>{!o&&P.isDraggingInternally&&C.onDragEnd&&V.hasTarget(d,S.target)&&C.onDragEnd(S)},[o,P,C,d]),onFocus:l.useCallback(S=>{if(!o&&!P.isUpdatingSelection&&V.hasEditableTarget(d,S.target)&&!qe(S,C.onFocus)){var W=V.toDOMNode(d,d),z=V.findDocumentOrShadowRoot(d);if(P.latestElement=z.activeElement,ur&&S.target!==W){W.focus();return}St.set(d,!0)}},[o,P,d,C.onFocus]),onKeyDown:l.useCallback(S=>{if(!o&&V.hasEditableTarget(d,S.target)){var W;(W=M.current)===null||W===void 0||W.handleKeyDown(S);var{nativeEvent:z}=S;if(V.isComposing(d)&&z.isComposing===!1&&(Yt.set(d,!1),y(!1)),qe(S,C.onKeyDown)||V.isComposing(d))return;var{selection:Z}=d,Q=d.children[Z!==null?Z.focus.path[0]:0],J=Nu(ee.string(Q))==="rtl";if(Fe.isRedo(z)){S.preventDefault();var ne=d;typeof ne.redo=="function"&&ne.redo();return}if(Fe.isUndo(z)){S.preventDefault();var oe=d;typeof oe.undo=="function"&&oe.undo();return}if(Fe.isMoveLineBackward(z)){S.preventDefault(),K.move(d,{unit:"line",reverse:!0});return}if(Fe.isMoveLineForward(z)){S.preventDefault(),K.move(d,{unit:"line"});return}if(Fe.isExtendLineBackward(z)){S.preventDefault(),K.move(d,{unit:"line",edge:"focus",reverse:!0});return}if(Fe.isExtendLineForward(z)){S.preventDefault(),K.move(d,{unit:"line",edge:"focus"});return}if(Fe.isMoveBackward(z)){S.preventDefault(),Z&&U.isCollapsed(Z)?K.move(d,{reverse:!J}):K.collapse(d,{edge:J?"end":"start"});return}if(Fe.isMoveForward(z)){S.preventDefault(),Z&&U.isCollapsed(Z)?K.move(d,{reverse:J}):K.collapse(d,{edge:J?"start":"end"});return}if(Fe.isMoveWordBackward(z)){S.preventDefault(),Z&&U.isExpanded(Z)&&K.collapse(d,{edge:"focus"}),K.move(d,{unit:"word",reverse:!J});return}if(Fe.isMoveWordForward(z)){S.preventDefault(),Z&&U.isExpanded(Z)&&K.collapse(d,{edge:"focus"}),K.move(d,{unit:"word",reverse:J});return}if(Lt){if((hl||Kt)&&Z&&(Fe.isDeleteBackward(z)||Fe.isDeleteForward(z))&&U.isCollapsed(Z)){var ue=ee.parent(d,Z.anchor.path);if(se.isElement(ue)&&m.isVoid(d,ue)&&(m.isInline(d,ue)||m.isBlock(d,ue))){S.preventDefault(),m.deleteBackward(d,{unit:"block"});return}}}else{if(Fe.isBold(z)||Fe.isItalic(z)||Fe.isTransposeCharacter(z)){S.preventDefault();return}if(Fe.isSoftBreak(z)){S.preventDefault(),m.insertSoftBreak(d);return}if(Fe.isSplitBlock(z)){S.preventDefault(),m.insertBreak(d);return}if(Fe.isDeleteBackward(z)){S.preventDefault(),Z&&U.isExpanded(Z)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d);return}if(Fe.isDeleteForward(z)){S.preventDefault(),Z&&U.isExpanded(Z)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d);return}if(Fe.isDeleteLineBackward(z)){S.preventDefault(),Z&&U.isExpanded(Z)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"line"});return}if(Fe.isDeleteLineForward(z)){S.preventDefault(),Z&&U.isExpanded(Z)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"line"});return}if(Fe.isDeleteWordBackward(z)){S.preventDefault(),Z&&U.isExpanded(Z)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"word"});return}if(Fe.isDeleteWordForward(z)){S.preventDefault(),Z&&U.isExpanded(Z)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"word"});return}}}},[o,d,C.onKeyDown]),onPaste:l.useCallback(S=>{!o&&V.hasEditableTarget(d,S.target)&&!qe(S,C.onPaste)&&(!Lt||AC(S.nativeEvent)||Kt)&&(S.preventDefault(),V.insertData(d,S.clipboardData))},[o,d,C.onPaste])}),l.createElement(F0,{decorations:_,node:d,renderElement:u,renderPlaceholder:f,renderLeaf:c,selection:d.selection}))))))}),P0=t=>{var{attributes:e,children:r}=t;return l.createElement("span",ft({},e),r,Ve&&l.createElement("br",null))},M0=()=>[],k0=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&U.isCollapsed(t.selection))){var r=e.startContainer.parentElement;r.getBoundingClientRect=e.getBoundingClientRect.bind(e),Zm(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},qe=(t,e)=>{if(!e)return!1;var r=e(t);return r??(t.isDefaultPrevented()||t.isPropagationStopped())},Hl=t=>Pt(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),T0=(t,e)=>{if(!e)return!1;var r=e(t);return r??t.defaultPrevented},N0=l.createContext(!1),I0=l.createContext({});function j0(t){var e=l.useRef([]).current,r=l.useRef({editor:t}).current,n=l.useCallback(i=>{r.editor=i,e.forEach(a=>a(i))},[e,r]),s=l.useMemo(()=>({getSlate:()=>r.editor,addEventListener:i=>(e.push(i),()=>{e.splice(e.indexOf(i),1)})}),[e,r]);return{selectorContext:s,onChange:n}}var z0=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],_0=t=>{var{editor:e,children:r,onChange:n,onSelectionChange:s,onValueChange:i,initialValue:a}=t,o=or(t,z0),[u,c]=l.useState(()=>{if(!ee.isNodeList(a))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Te.stringify(a)));if(!m.isEditor(e))throw new Error("[Slate] editor is invalid! You passed: ".concat(Te.stringify(e)));return e.children=a,Object.assign(e,o),{v:0,editor:e}}),{selectorContext:f,onChange:h}=j0(e),g=l.useCallback(C=>{var d;switch(n&&n(e.children),C==null||(d=C.operation)===null||d===void 0?void 0:d.type){case"set_selection":s==null||s(e.selection);break;default:i==null||i(e.children)}c(b=>({v:b.v+1,editor:e})),h(e)},[e,h,n,s,i]);l.useEffect(()=>(Qs.set(e,g),()=>{Qs.set(e,()=>{})}),[e,g]);var[D,v]=l.useState(V.isFocused(e));return l.useEffect(()=>{v(V.isFocused(e))},[e]),jr(()=>{var C=()=>v(V.isFocused(e));return cl>=17?(document.addEventListener("focusin",C),document.addEventListener("focusout",C),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",C)}):(document.addEventListener("focus",C,!0),document.addEventListener("blur",C,!0),()=>{document.removeEventListener("focus",C,!0),document.removeEventListener("blur",C,!0)})},[]),l.createElement(I0.Provider,{value:f},l.createElement(_l.Provider,{value:u},l.createElement(qs.Provider,{value:u.editor},l.createElement(N0.Provider,{value:D},r))))},Vl=(t,e)=>{var r=(e.top+e.bottom)/2;return t.top<=r&&t.bottom>=r},ql=(t,e,r)=>{var n=V.toDOMRange(t,e).getBoundingClientRect(),s=V.toDOMRange(t,r).getBoundingClientRect();return Vl(n,s)&&Vl(s,n)},U0=(t,e)=>{var r=m.range(t,U.end(e)),n=Array.from(m.positions(t,{at:e})),s=0,i=n.length,a=Math.floor(i/2);if(ql(t,m.range(t,n[s]),r))return m.range(t,n[s],r);if(n.length<2)return m.range(t,n[n.length-1],r);for(;a!==n.length&&a!==s;)ql(t,m.range(t,n[a]),r)?i=a:s=a,a=Math.floor((s+i)/2);return m.range(t,n[i],r)};function Gl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Zl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Gl(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var W0=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",n=e,{apply:s,onChange:i,deleteBackward:a,addMark:o,removeMark:u}=n;return xn.set(n,new WeakMap),n.addMark=(c,f)=>{var h,g;(h=$s.get(n))===null||h===void 0||h(),!ut.get(n)&&(g=$e.get(n))!==null&&g!==void 0&&g.length&&ut.set(n,null),Dt.delete(n),o(c,f)},n.removeMark=c=>{var f;!ut.get(n)&&(f=$e.get(n))!==null&&f!==void 0&&f.length&&ut.set(n,null),Dt.delete(n),u(c)},n.deleteBackward=c=>{if(c!=="line")return a(c);if(n.selection&&U.isCollapsed(n.selection)){var f=m.above(n,{match:v=>se.isElement(v)&&m.isBlock(n,v),at:n.selection});if(f){var[,h]=f,g=m.range(n,h,n.selection.anchor),D=U0(n,g);U.isCollapsed(D)||K.delete(n,{at:D})}}},n.apply=c=>{var f=[],h=[],g=$e.get(n);if(g!=null&&g.length){var D=g.map(N=>UC(N,c)).filter(Boolean);$e.set(n,D)}var v=xt.get(n);v&&xt.set(n,Al(n,v,c));var C=Ft.get(n);if(C!=null&&C.at){var d=pe.isPoint(C==null?void 0:C.at)?ni(n,C.at,c):Al(n,C.at,c);Ft.set(n,d?Zl(Zl({},C),{},{at:d}):null)}switch(c.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.push(...fr(n,c.path));break}case"set_selection":{var b;(b=Nr.get(n))===null||b===void 0||b.unref(),Nr.delete(n);break}case"insert_node":case"remove_node":{f.push(...fr(n,L.parent(c.path)));break}case"merge_node":{var y=L.previous(c.path);f.push(...fr(n,y));break}case"move_node":{var w=L.common(L.parent(c.path),L.parent(c.newPath));f.push(...fr(n,w));var E;L.isBefore(c.path,c.newPath)?(f.push(...fr(n,L.parent(c.path))),E=c.newPath):(f.push(...fr(n,L.parent(c.newPath))),E=c.path);var B=ee.get(e,L.parent(E)),A=V.findKey(n,B),O=m.pathRef(n,L.parent(E));h.push([O,A]);break}}switch(s(c),c.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":lr.set(n,!0)}for(var[j,F]of f){var[x]=m.node(n,j);Fn.set(x,F)}for(var[P,M]of h){if(P.current){var[I]=m.node(n,P.current);Fn.set(I,M)}P.unref()}},n.setFragmentData=c=>{var{selection:f}=n;if(f){var[h,g]=U.edges(f),D=m.void(n,{at:h.path}),v=m.void(n,{at:g.path});if(!(U.isCollapsed(f)&&!D)){var C=V.toDOMRange(n,f),d=C.cloneContents(),b=d.childNodes[0];if(d.childNodes.forEach(x=>{x.textContent&&x.textContent.trim()!==""&&(b=x)}),v){var[y]=v,w=C.cloneRange(),E=V.toDOMNode(n,y);w.setEndAfter(E),d=w.cloneContents()}if(D&&(b=d.querySelector("[data-slate-spacer]")),Array.from(d.querySelectorAll("[data-slate-zero-width]")).forEach(x=>{var P=x.getAttribute("data-slate-zero-width")==="n";x.textContent=P?`
|
|
42
|
-
`:""}),Cl(b)){var B=b.ownerDocument.createElement("span");B.style.whiteSpace="pre",B.appendChild(b),d.appendChild(B),b=B}var A=n.getFragment(),O=JSON.stringify(A),j=window.btoa(encodeURIComponent(O));b.setAttribute("data-slate-fragment",j),c.setData("application/".concat(r),j);var F=d.ownerDocument.createElement("div");return F.appendChild(d),F.setAttribute("hidden","true"),d.ownerDocument.body.appendChild(F),c.setData("text/html",F.innerHTML),c.setData("text/plain",yl(F)),d.ownerDocument.body.removeChild(F),c}}},n.insertData=c=>{n.insertFragmentData(c)||n.insertTextData(c)},n.insertFragmentData=c=>{var f=c.getData("application/".concat(r))||xC(c);if(f){var h=decodeURIComponent(window.atob(f)),g=JSON.parse(h);return n.insertFragment(g),!0}return!1},n.insertTextData=c=>{var f=c.getData("text/plain");if(f){var h=f.split(/\r\n|\r|\n/),g=!1;for(var D of h)g&&K.splitNodes(n,{always:!0}),n.insertText(D),g=!0;return!0}return!1},n.onChange=c=>{var f=cl<18?Rt.unstable_batchedUpdates:h=>h();f(()=>{var h=Qs.get(n);h&&h(c),i(c)})},n},fr=(t,e)=>{var r=[];for(var[n,s]of m.levels(t,{at:e})){var i=V.findKey(t,n);r.push([s,i])}return r};function Kl(t,e,r="type"){const{selection:n}=t;if(!n)return!1;const[s]=Array.from(m.nodes(t,{at:m.unhangRange(t,n),match:i=>!m.isEditor(i)&&se.isElement(i)&&i[r]===e}));return!!s}const Xl={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},kn=[{type:"paragraph",children:[{text:""}]}],Yl=["listItem","numberedList"],Tn=["left","center","right","justify"];function H0(t,e){const r=Tn.includes(e)?"align":"type",n=Kl(t,e,r),s=Yl.includes(e);K.unwrapNodes(t,{match:a=>!m.isEditor(a)&&se.isElement(a)&&Yl.includes(a.type)&&!Tn.includes(e),split:!0});let i;if(Tn.includes(e)?i={align:n?void 0:e}:i={type:n?"paragraph":s?"listItem":e},K.setNodes(t,i),!n&&s){const a={type:e,children:[]};K.wrapNodes(t,a)}}function Jt({format:t,icon:e}){const r=Mn(),n=Tn.includes(t)?"align":"type",i=Kl(r,t,n)?"activeTrue":"activeFalse";function a(o){o.preventDefault(),H0(r,t)}return p.jsx("button",{type:"button",className:"arkynRichTextBlockButton "+i,onMouseDown:a,children:p.jsx(e,{})})}function V0({attributes:t,children:e,element:r}){const n={textAlign:r.align};switch(r.type){case"blockQuote":return p.jsx("blockquote",{className:"arkynElementBlockquote",style:n,...t,children:e});case"bulletedList":return p.jsx("ul",{className:"arkynElementBulletList",style:n,...t,children:e});case"headingOne":return p.jsx("h1",{className:"arkynElementHeadingOne",style:n,...t,children:e});case"headingTwo":return p.jsx("h2",{className:"arkynElementHeadingTwo",style:n,...t,children:e});case"listItem":return p.jsx("li",{className:"arkynElementListItem",style:n,...t,children:e});case"numberedList":return p.jsx("ol",{className:"arkynElementNumberedList",style:n,...t,children:e});case"image":return p.jsxs("div",{style:n,...t,children:[p.jsx("img",{className:"arkynElementImage",alt:"arkynElementImage",src:(r==null?void 0:r.src)||""}),e]});default:return p.jsx("p",{className:"arkynElementParagraph",style:n,...t,children:e})}}const Jl=l.createContext({});function q0(){return l.useContext(Jl)}function G0(t){return p.jsx(Jl.Provider,{value:t,children:t.children})}function ai(t){const{children:e,disabled:r=!1,className:n="",onClick:s,value:i,...a}=t,{disabled:o,currentTab:u,changeCurrentTab:c}=q0(),f=o||r,D=`arkynTabButton ${f?"isDisabled":""} ${u===i&&i?"isActive":""} ${n}`;function v(C){c(i),s&&s(C)}return p.jsx("button",{onClick:v,className:D.trim(),...a,disabled:f,type:"button",children:e})}function Ql(t){const{children:e,onChange:r,defaultValue:n,disabled:s=!1,className:i,...a}=t,[o,u]=l.useState(n||""),c=`arkynTabContainer ${i||""}`;function f(h){u(h),r&&r(h)}return p.jsx(G0,{disabled:s,currentTab:o,changeCurrentTab:f,children:p.jsx("nav",{className:c.trim(),...a,children:e})})}function Z0(t){const{action:e,tabLabels:r=["Adicionar URL","Upload de arquivo"],modalCancelButton:n="Cancelar",modalConfirmButton:s="Confirmar",modalInputImageLabel:i="Imagem:",modalInputUrlLabel:a="URL da imagem:",modalTitle:o="Inserir imagem"}=t,u=Mn(),[c,f]=l.useState(!1),[h,g]=l.useState(""),[D,v]=l.useState("url");function C(d){d.preventDefault(),!(!h||h==="")&&(u.insertNodes([{type:"paragraph",children:[{text:""}]},{type:"image",src:h,children:[{text:""}]},{type:"paragraph",children:[{text:""}]}]),f(!1))}return p.jsxs(p.Fragment,{children:[p.jsx("button",{type:"button",className:"arkynRichTextInsertImage",onMouseDown:()=>f(!0),children:p.jsx(ce.Image,{})}),p.jsxs(Bo,{isVisible:c,makeInvisible:()=>f(!1),children:[p.jsx(Oo,{children:o}),p.jsxs("div",{className:"arkynRichTextInsertImageModalContent",children:[p.jsxs(Ql,{defaultValue:D,onChange:v,children:[p.jsx(ai,{value:"url",children:r[0]}),p.jsx(ai,{value:"file",children:r[1]})]}),D==="url"&&p.jsxs(p.Fragment,{children:[p.jsx(vr,{type:"text",name:"richTextImageURL",label:a,showAsterisk:!0,defaultValue:h,onChange:d=>g(d.target.value)}),h&&p.jsx("img",{className:"arkynRichTextInsertImageModalPreviewImage",src:h,alt:"preview"})]}),D==="file"&&p.jsx(Wi,{name:"richTextImageURL",action:e,label:i,showAsterisk:!0,defaultValue:h,onChange:d=>g(d)})]}),p.jsxs(Ao,{children:[p.jsx(pt,{type:"button",scheme:"danger",variant:"outline",onClick:()=>f(!1),children:n}),p.jsx(pt,{type:"button",onClick:C,children:s})]})]})]})}function K0({attributes:t,children:e,leaf:r}){return r.bold&&(e=p.jsx("strong",{children:e})),r.code&&(e=p.jsx("code",{children:e})),r.italic&&(e=p.jsx("em",{children:e})),r.underline&&(e=p.jsx("u",{children:e})),p.jsx("span",{...t,children:e})}function $l(t,e){const r=m.marks(t);return r?r[e]===!0:!1}function Rl(t,e){$l(t,e)?m.removeMark(t,e):m.addMark(t,e,!0)}function Nn({format:t,icon:e}){const r=Mn(),s=$l(r,t)?"activeTrue":"activeFalse";function i(a){a.preventDefault(),Rl(r,t)}return p.jsx("button",{type:"button",className:"arkynRichTextMarkButton "+s,onMouseDown:i,children:p.jsx(e,{})})}function X0({children:t}){return p.jsx("div",{className:"arkynRichTextToolbar",children:t})}function ec(t){return t.map(e=>ee.string(e)).join("")}function Y0(t){const{name:e,hiddenButtons:r,imageConfig:n,defaultValue:s="[]",enforceCharacterLimit:i=!1,onChangeCharactersCount:a,baseErrorMessage:o,maxLimit:u=10,onChange:c,isError:f,label:h,showAsterisk:g,id:D}=t,v=l.useMemo(()=>Mv(W0(xv())),[]),{fieldErrors:C}=Ye();function d(){try{const G=JSON.parse(s);return!Array.isArray(G)||G.length<=0?kn:G.every(re=>typeof re=="object"&&re!==null&&"type"in re&&"children"in re)?G:kn}catch{return kn}}const b=ec(d()),[y,w]=l.useState(b.length),[E,B]=l.useState(JSON.stringify(d())||"[]"),[A,O]=l.useState(!1),j=l.useRef(null),F=D||l.useId(),x=o||(C==null?void 0:C[e]),P=f||!!x,M=l.useCallback(K0,[]),I=l.useCallback(V0,[]);function N(G){const R=ec(G);w(R.length),a&&a(R.length),!(i&&R.length>=u)&&(B(JSON.stringify(G)),c&&c(G),v.children=G,K.setNodes(v,{children:G}))}const T=A?"focusTrue":"focusFalse",_=`arkynRichText ${P||u<y?"errorTrue":"errorFalse"} ${T}`,$=u-y;function q(G){return!(r!=null&&r.includes(G))}return p.jsxs(We,{children:[h&&p.jsx(Ue,{showAsterisk:g,children:h}),p.jsxs(_0,{editor:v,initialValue:d(),onChange:N,onValueChange:N,children:[p.jsxs("div",{className:_,children:[p.jsxs(X0,{children:[q("headingOne")&&p.jsx(Jt,{format:"headingOne",icon:ce.Heading1}),q("headingTwo")&&p.jsx(Jt,{format:"headingTwo",icon:ce.Heading2}),q("blockQuote")&&p.jsx(Jt,{format:"blockQuote",icon:ce.Quote}),q("bold")&&p.jsx(Nn,{format:"bold",icon:ce.Bold}),q("italic")&&p.jsx(Nn,{format:"italic",icon:ce.Italic}),q("underline")&&p.jsx(Nn,{format:"underline",icon:ce.Underline}),q("code")&&p.jsx(Nn,{format:"code",icon:ce.Code}),q("left")&&p.jsx(Jt,{format:"left",icon:ce.AlignLeft}),q("right")&&p.jsx(Jt,{format:"right",icon:ce.AlignRight}),q("center")&&p.jsx(Jt,{format:"center",icon:ce.AlignCenter}),q("justify")&&p.jsx(Jt,{format:"justify",icon:ce.AlignJustify}),n&&q("image")&&p.jsx(Z0,{...n})]}),p.jsx(x0,{className:"editorContainer",renderElement:I,renderLeaf:M,spellCheck:!0,ref:j,id:F,onFocus:()=>O(!0),onBlur:()=>O(!1),onKeyDown:G=>{for(const R in Xl)if(Rh(R,G)){G.preventDefault();const re=Xl[R];Rl(v,re)}}}),$<0&&p.jsx("div",{className:"restatesCharacters",children:$})]}),p.jsx("input",{type:"hidden",name:e,value:E.slice(0,u)}),p.jsx("input",{type:"hidden",name:`${e}Count`,value:y})]}),p.jsx(Je,{children:x})]})}function J0(t){const{onChange:e,onPlaceChanged:r,options:n,...s}=t,[i,a]=l.useState(null),o=c=>a(c),u=()=>{var v,C,d,b;const f=i.getPlaces()[0],h=f==null?void 0:f.address_components;function g(y){const w=h.find(E=>E.types[0]===y);return w?w.long_name:""}function D(y){const w=h.find(E=>E.types[0]===y);return w?w.short_name:""}if(f){const y=g("route"),w=g("street_number"),E=g("sublocality_level_1"),B=g("administrative_area_level_2"),A=g("administrative_area_level_1"),O=D("administrative_area_level_1"),j=g("postal_code"),F=(C=(v=f.geometry)==null?void 0:v.location)==null?void 0:C.lat(),x=(b=(d=f.geometry)==null?void 0:d.location)==null?void 0:b.lng();r&&r({street:y,city:B,state:A,district:E,cep:j,streetNumber:w,stateShortName:O,coordinates:{lat:F,lng:x}})}};return p.jsx(Do,{onLoad:o,onPlacesChanged:u,options:n,children:p.jsx(vr,{type:"text",onChange:c=>e(c.target.value),...s})})}function Q0(t){const{iconSize:e,isLoading:r,disabled:n,readOnly:s,isFocused:i}=t,u=`arkynSelectChevron ${n||s?"notAnimate":""} ${i?"focused":""}`;return r?p.jsx(p.Fragment,{}):p.jsx(ce.ChevronDown,{className:u,strokeWidth:2.5,style:{minWidth:e,minHeight:e,maxWidth:e,maxHeight:e}})}function $0(t){const{children:e,handleContainerFocus:r,disabled:n,isError:s,isLoading:i,isFocused:a,className:o,readOnly:u,variant:c,size:f,id:h,prefixExists:g}=t,D=g?"hasPrefix":"",v=s?"errored":"",C=n||u||i?"opacity":"",d=a?"focused":"";return p.jsx("section",{id:h,className:`arkynSelectContainer ${D} ${c} ${f} ${C} ${v} ${d} ${o}`,onClick:r,children:e})}function R0(t){const{children:e,size:r}=t,n=`arkynSelectContent ${r}`;return p.jsx("div",{className:n,children:e})}function eD(t){const{label:e,optionHasSelected:r,handleChangeValue:n,value:s,size:i}=t,a=r(s)?"active":"",o=`arkynSelectOption ${i} ${a}`;return p.jsxs("div",{onClick:()=>n(s),className:o,children:[e," ",p.jsx(ce.Check,{})]})}function tD(t){const{children:e,isFocused:r,isSearchable:n,search:s,onSearch:i}=t,a=l.useRef(null),[o,u]=l.useState("bottom");jt(r),l.useEffect(()=>{if(!r)return;(()=>{if(!a.current)return;const h=a.current.parentElement;if(!h)return;const g=h.getBoundingClientRect(),D=window.innerHeight,v=300;D-g.bottom<v&&g.top>v?u("top"):u("bottom")})()},[r]);function c(f){n&&i(f.target.value)}return r?p.jsxs("div",{ref:a,className:`arkynSelectOptionsContainer ${o}`,children:[n&&p.jsx(vr,{type:"search",name:"search-select",variant:"underline",leftIcon:ce.Search,value:s,onChange:c}),e]}):p.jsx(p.Fragment,{})}function rD(t){const{isFocused:e,handleBlur:r}=t;return e?p.jsx("aside",{className:"arkynSelectOverlay",onClick:r}):p.jsx(p.Fragment,{})}function nD(t){const{iconSize:e,isLoading:r}=t;return r?p.jsx(ce.Loader2,{className:"arkynSelectSpinner",size:e,strokeWidth:2.5}):p.jsx(p.Fragment,{})}function sD(t){const{name:e,options:r,className:n="",placeholder:s="Selecione...",closeOnSelect:i=!0,defaultValue:a="",errorMessage:o,isLoading:u=!1,readOnly:c=!1,isSearchable:f=!1,id:h,label:g,optionMaxHeight:D,showAsterisk:v,leftIcon:C,onSearch:d,onChange:b,onBlur:y,notFoundText:w="Sem opções disponíveis",onFocus:E,disabled:B=!1,prefix:A,size:O="md",value:j,variant:F="solid"}=t,{fieldErrors:x}=Ye(),P=l.useRef(null),M=h||l.useId(),I=o||(x==null?void 0:x[e]),N=!!I,T=B||u||c,_={md:20,lg:20}[O],[$,q]=l.useState(""),[G,R]=l.useState(!1),[re,Y]=l.useState(a),ae=j||re;function k(ne){return ae===ne}function S(ne){const oe=r.find(ue=>ue.value===ne);return(oe==null?void 0:oe.label)||""}function W(){T||!(P!=null&&P.current)||G||(R(!0),P.current.focus(),E&&E())}function z(){R(!1),y&&P.current&&P.current.blur()}function Z(ne){q(ne),d&&d(ne)}function Q(ne){k(ne)?(Y(""),b&&b("")):(Y(ne),b&&b(ne)),i&&z()}const J=r.filter(ne=>!!(t.onSearch||!t.isSearchable||ne.label.toLowerCase().includes($.toLowerCase())));return p.jsxs(We,{className:n,children:[g&&p.jsx(Ue,{showAsterisk:v,children:g}),p.jsxs($0,{handleContainerFocus:W,disabled:T,isError:N,isFocused:G,isLoading:u,readOnly:c,size:O,variant:F,prefixExists:!!A,id:M,children:[p.jsx("input",{ref:P,name:e,value:ae,type:"hidden"}),p.jsx(Ae,{iconSize:_,icon:A,className:"prefix"}),C&&p.jsx(C,{size:_,strokeWidth:2.5}),p.jsxs(R0,{size:O,children:[ae!==""&&p.jsx("p",{className:"hasValue",children:S(ae)}),ae===""&&p.jsx("p",{children:s})]}),p.jsxs(tD,{isFocused:G,isSearchable:f,search:$,onSearch:Z,children:[J.map(({label:ne,value:oe})=>p.jsx(eD,{label:ne,value:oe,size:O,handleChangeValue:Q,optionHasSelected:k},oe)),J.length<=0&&p.jsx("p",{children:w})]}),p.jsx(Q0,{disabled:T,isFocused:G,readOnly:c,iconSize:_,isLoading:u}),p.jsx(nD,{iconSize:_,isLoading:u}),p.jsx(rD,{handleBlur:z,isFocused:G})]}),I&&p.jsx(Je,{children:I})]})}function iD(t){const{label:e,size:r="lg",defaultChecked:n=!1,checked:s=null,value:i,unCheckedValue:a="",name:o,className:u="",onCheck:c,id:f,orientation:h="horizontalReverse",...g}=t,D=l.useRef(null),v=f||l.useId(),[C,d]=l.useState(n),b=typeof s=="boolean"?s:C;function y(){d(!C),c&&c(b?a:i||"checked")}const E=`arkynSwitch ${b?"checkedTrue":"checkedFalse"} ${r} ${u}`;return p.jsxs(We,{orientation:h,children:[e&&p.jsx(Ue,{onClick:y,children:e}),p.jsx("button",{type:"button",onClick:y,className:E,...g,children:p.jsx("input",{id:v,type:"hidden",name:o,ref:D,onClick:y,value:b?i||"checked":a})})]})}function aD(t){const{emptyMessage:e="Nenhum dado adicionado.",className:r,children:n,...s}=t,i=`arkynTableBody ${r}`,a=l.Children.count(n)===0;return p.jsx("tbody",{className:i.trim(),...s,children:a?p.jsx("tr",{className:"arkynTableBodyEmptyLine",children:p.jsx("td",{colSpan:100,children:p.jsx("div",{children:e})})}):n})}function oD(t){const{className:e,children:r,...n}=t,s=`arkynTableCaption ${e}`;return p.jsx("caption",{className:s.trim(),...n,children:p.jsx("div",{className:"arkynTableCaptionContent",children:r})})}function uD(t){const{children:e,className:r,...n}=t,s=`arkynTableContainer ${r}`;return p.jsx("div",{className:s.trim(),...n,children:p.jsx("table",{children:e})})}function lD(t){const{className:e,children:r,...n}=t,s=`arkynTableFooter ${e}`;return p.jsxs("tfoot",{className:s.trim(),...n,children:[p.jsx("tr",{className:"spacingRow"}),p.jsx("tr",{children:p.jsx("th",{colSpan:100,children:p.jsx("div",{className:"arkynTableFooterContent",children:r})})})]})}function cD(t){const{className:e,children:r,...n}=t,s=`arkynTableHeader ${e}`;return p.jsxs("thead",{className:s.trim(),...n,children:[p.jsx("tr",{children:r}),p.jsx("tr",{className:"spacingRow"})]})}function fD(t){const{variant:e="solid",size:r="md",className:n,errorMessage:s,disabled:i=!1,readOnly:a=!1,label:o,showAsterisk:u,name:c,onFocus:f,onBlur:h,title:g,style:D,value:v,defaultValue:C,placeholder:d,id:b,...y}=t,{fieldErrors:w}=Ye(),[E,B]=l.useState(!1),A=l.useRef(null),O=b||l.useId(),j=s||(w==null?void 0:w[c]),I=`arkynTextarea ${e} ${r} ${i||a?"opacityTrue":"opacityFalse"} ${!!j?"errorTrue":"errorFalse"} ${E?"focusedTrue":"focusedFalse"}`;function N(){i||!(A!=null&&A.current)||(B(!0),A.current.focus())}function T(_){B(!0),f&&f(_)}function X(_){B(!1),h&&h(_)}return p.jsxs(We,{className:n,children:[o&&p.jsx(Ue,{htmlFor:O,showAsterisk:u,children:o}),p.jsx("section",{title:g,style:D,onClick:N,className:I,children:p.jsx("textarea",{id:O,disabled:i,readOnly:a,ref:A,name:c,onFocus:T,onBlur:X,defaultValue:C||"",placeholder:i&&v||d,value:i?void 0:v,...y})}),j&&p.jsx(Je,{children:j})]})}const tc=l.createContext({});function dD(t){const{children:e=!1}=t,[r,n]=l.useState([]);function s(c){return!!r.some(f=>f.key===c)}function i(c){var f;return(f=r.find(h=>h.key===c))==null?void 0:f.data}function a(c,f){const h=s(c);n(h?g=>[...g.filter(v=>v.key!==c),{key:c,data:f}]:[...r,{key:c,data:f}])}function o(c){n(r.filter(f=>f.key!==c))}function u(){n([])}return p.jsx(tc.Provider,{value:{modalIsOpen:s,modalData:i,openModal:a,closeModal:o,closeAll:u},children:e})}function rc(t){const e=l.useContext(tc);if(Object.entries(e).length===0)throw new Error("useModal must be used within a Provider");if(t){const{modalData:r,modalIsOpen:n,openModal:s,closeModal:i}=e,a=n(t),o=r(t);return{modalIsOpen:a,modalData:o,openModal:f=>s(t,f),closeModal:()=>i(t)}}else return e}let hD={data:""},gD=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||hD,pD=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,vD=/\/\*[^]*?\*\/| +/g,nc=/\n+/g,Mt=(t,e)=>{let r="",n="",s="";for(let i in t){let a=t[i];i[0]=="@"?i[1]=="i"?r=i+" "+a+";":n+=i[1]=="f"?Mt(a,i):i+"{"+Mt(a,i[1]=="k"?"":e)+"}":typeof a=="object"?n+=Mt(a,e?e.replace(/([^,])+/g,o=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,o):o?o+" "+u:u)):i):a!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=Mt.p?Mt.p(i,a):i+":"+a+";")}return r+(e&&s?e+"{"+s+"}":s)+n},yt={},sc=t=>{if(typeof t=="object"){let e="";for(let r in t)e+=r+sc(t[r]);return e}return t},mD=(t,e,r,n,s)=>{let i=sc(t),a=yt[i]||(yt[i]=(u=>{let c=0,f=11;for(;c<u.length;)f=101*f+u.charCodeAt(c++)>>>0;return"go"+f})(i));if(!yt[a]){let u=i!==t?t:(c=>{let f,h,g=[{}];for(;f=pD.exec(c.replace(vD,""));)f[4]?g.shift():f[3]?(h=f[3].replace(nc," ").trim(),g.unshift(g[0][h]=g[0][h]||{})):g[0][f[1]]=f[2].replace(nc," ").trim();return g[0]})(t);yt[a]=Mt(s?{["@keyframes "+a]:u}:u,r?"":"."+a)}let o=r&&yt.g?yt.g:null;return r&&(yt.g=yt[a]),((u,c,f,h)=>{h?c.data=c.data.replace(h,u):c.data.indexOf(u)===-1&&(c.data=f?u+c.data:c.data+u)})(yt[a],e,n,o),a},CD=(t,e,r)=>t.reduce((n,s,i)=>{let a=e[i];if(a&&a.call){let o=a(r),u=o&&o.props&&o.props.className||/^go/.test(o)&&o;a=u?"."+u:o&&typeof o=="object"?o.props?"":Mt(o,""):o===!1?"":o}return n+s+(a??"")},"");function In(t){let e=this||{},r=t.call?t(e.p):t;return mD(r.unshift?r.raw?CD(r,[].slice.call(arguments,1),e.p):r.reduce((n,s)=>Object.assign(n,s&&s.call?s(e.p):s),{}):r,gD(e.target),e.g,e.o,e.k)}let ic,oi,ui;In.bind({g:1});let bt=In.bind({k:1});function DD(t,e,r,n){Mt.p=e,ic=t,oi=r,ui=n}function kt(t,e){let r=this||{};return function(){let n=arguments;function s(i,a){let o=Object.assign({},i),u=o.className||s.className;r.p=Object.assign({theme:oi&&oi()},o),r.o=/ *go\d+/.test(u),o.className=In.apply(r,n)+(u?" "+u:"");let c=t;return t[0]&&(c=o.as||t,delete o.as),ui&&c[0]&&ui(o),ic(c,o)}return s}}var yD=t=>typeof t=="function",jn=(t,e)=>yD(t)?t(e):t,bD=(()=>{let t=0;return()=>(++t).toString()})(),ac=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),ED=20,li="default",oc=(t,e)=>{let{toastLimit:r}=t.settings;switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,r)};case 1:return{...t,toasts:t.toasts.map(a=>a.id===e.toast.id?{...a,...e.toast}:a)};case 2:let{toast:n}=e;return oc(t,{type:t.toasts.find(a=>a.id===n.id)?1:0,toast:n});case 3:let{toastId:s}=e;return{...t,toasts:t.toasts.map(a=>a.id===s||s===void 0?{...a,dismissed:!0,visible:!1}:a)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(a=>a.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let i=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},zn=[],uc={toasts:[],pausedAt:void 0,settings:{toastLimit:ED}},dt={},lc=(t,e=li)=>{dt[e]=oc(dt[e]||uc,t),zn.forEach(([r,n])=>{r===e&&n(dt[e])})},cc=t=>Object.keys(dt).forEach(e=>lc(t,e)),wD=t=>Object.keys(dt).find(e=>dt[e].toasts.some(r=>r.id===t)),_n=(t=li)=>e=>{lc(e,t)},BD={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},AD=(t={},e=li)=>{let[r,n]=l.useState(dt[e]||uc),s=l.useRef(dt[e]);l.useEffect(()=>(s.current!==dt[e]&&n(dt[e]),zn.push([e,n]),()=>{let a=zn.findIndex(([o])=>o===e);a>-1&&zn.splice(a,1)}),[e]);let i=r.toasts.map(a=>{var o,u,c;return{...t,...t[a.type],...a,removeDelay:a.removeDelay||((o=t[a.type])==null?void 0:o.removeDelay)||(t==null?void 0:t.removeDelay),duration:a.duration||((u=t[a.type])==null?void 0:u.duration)||(t==null?void 0:t.duration)||BD[a.type],style:{...t.style,...(c=t[a.type])==null?void 0:c.style,...a.style}}});return{...r,toasts:i}},OD=(t,e="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...r,id:(r==null?void 0:r.id)||bD()}),zr=t=>(e,r)=>{let n=OD(e,t,r);return _n(n.toasterId||wD(n.id))({type:2,toast:n}),n.id},Me=(t,e)=>zr("blank")(t,e);Me.error=zr("error"),Me.success=zr("success"),Me.loading=zr("loading"),Me.custom=zr("custom"),Me.dismiss=(t,e)=>{let r={type:3,toastId:t};e?_n(e)(r):cc(r)},Me.dismissAll=t=>Me.dismiss(void 0,t),Me.remove=(t,e)=>{let r={type:4,toastId:t};e?_n(e)(r):cc(r)},Me.removeAll=t=>Me.remove(void 0,t),Me.promise=(t,e,r)=>{let n=Me.loading(e.loading,{...r,...r==null?void 0:r.loading});return typeof t=="function"&&(t=t()),t.then(s=>{let i=e.success?jn(e.success,s):void 0;return i?Me.success(i,{id:n,...r,...r==null?void 0:r.success}):Me.dismiss(n),s}).catch(s=>{let i=e.error?jn(e.error,s):void 0;i?Me.error(i,{id:n,...r,...r==null?void 0:r.error}):Me.dismiss(n)}),t};var LD=1e3,SD=(t,e="default")=>{let{toasts:r,pausedAt:n}=AD(t,e),s=l.useRef(new Map).current,i=l.useCallback((h,g=LD)=>{if(s.has(h))return;let D=setTimeout(()=>{s.delete(h),a({type:4,toastId:h})},g);s.set(h,D)},[]);l.useEffect(()=>{if(n)return;let h=Date.now(),g=r.map(D=>{if(D.duration===1/0)return;let v=(D.duration||0)+D.pauseDuration-(h-D.createdAt);if(v<0){D.visible&&Me.dismiss(D.id);return}return setTimeout(()=>Me.dismiss(D.id,e),v)});return()=>{g.forEach(D=>D&&clearTimeout(D))}},[r,n,e]);let a=l.useCallback(_n(e),[e]),o=l.useCallback(()=>{a({type:5,time:Date.now()})},[a]),u=l.useCallback((h,g)=>{a({type:1,toast:{id:h,height:g}})},[a]),c=l.useCallback(()=>{n&&a({type:6,time:Date.now()})},[n,a]),f=l.useCallback((h,g)=>{let{reverseOrder:D=!1,gutter:v=8,defaultPosition:C}=g||{},d=r.filter(w=>(w.position||C)===(h.position||C)&&w.height),b=d.findIndex(w=>w.id===h.id),y=d.filter((w,E)=>E<b&&w.visible).length;return d.filter(w=>w.visible).slice(...D?[y+1]:[0,y]).reduce((w,E)=>w+(E.height||0)+v,0)},[r]);return l.useEffect(()=>{r.forEach(h=>{if(h.dismissed)i(h.id,h.removeDelay);else{let g=s.get(h.id);g&&(clearTimeout(g),s.delete(h.id))}})},[r,i]),{toasts:r,handlers:{updateHeight:u,startPause:o,endPause:c,calculateOffset:f}}},FD=bt`
|
|
42
|
+
`:""}),Cl(b)){var B=b.ownerDocument.createElement("span");B.style.whiteSpace="pre",B.appendChild(b),d.appendChild(B),b=B}var A=n.getFragment(),O=JSON.stringify(A),j=window.btoa(encodeURIComponent(O));b.setAttribute("data-slate-fragment",j),c.setData("application/".concat(r),j);var F=d.ownerDocument.createElement("div");return F.appendChild(d),F.setAttribute("hidden","true"),d.ownerDocument.body.appendChild(F),c.setData("text/html",F.innerHTML),c.setData("text/plain",yl(F)),d.ownerDocument.body.removeChild(F),c}}},n.insertData=c=>{n.insertFragmentData(c)||n.insertTextData(c)},n.insertFragmentData=c=>{var f=c.getData("application/".concat(r))||xC(c);if(f){var h=decodeURIComponent(window.atob(f)),g=JSON.parse(h);return n.insertFragment(g),!0}return!1},n.insertTextData=c=>{var f=c.getData("text/plain");if(f){var h=f.split(/\r\n|\r|\n/),g=!1;for(var D of h)g&&K.splitNodes(n,{always:!0}),n.insertText(D),g=!0;return!0}return!1},n.onChange=c=>{var f=cl<18?Rt.unstable_batchedUpdates:h=>h();f(()=>{var h=Qs.get(n);h&&h(c),i(c)})},n},fr=(t,e)=>{var r=[];for(var[n,s]of m.levels(t,{at:e})){var i=V.findKey(t,n);r.push([s,i])}return r};function Kl(t,e,r="type"){const{selection:n}=t;if(!n)return!1;const[s]=Array.from(m.nodes(t,{at:m.unhangRange(t,n),match:i=>!m.isEditor(i)&&se.isElement(i)&&i[r]===e}));return!!s}const Xl={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},kn=[{type:"paragraph",children:[{text:""}]}],Yl=["listItem","numberedList"],Tn=["left","center","right","justify"];function H0(t,e){const r=Tn.includes(e)?"align":"type",n=Kl(t,e,r),s=Yl.includes(e);K.unwrapNodes(t,{match:a=>!m.isEditor(a)&&se.isElement(a)&&Yl.includes(a.type)&&!Tn.includes(e),split:!0});let i;if(Tn.includes(e)?i={align:n?void 0:e}:i={type:n?"paragraph":s?"listItem":e},K.setNodes(t,i),!n&&s){const a={type:e,children:[]};K.wrapNodes(t,a)}}function Jt({format:t,icon:e}){const r=Mn(),n=Tn.includes(t)?"align":"type",i=Kl(r,t,n)?"activeTrue":"activeFalse";function a(o){o.preventDefault(),H0(r,t)}return p.jsx("button",{type:"button",className:"arkynRichTextBlockButton "+i,onMouseDown:a,children:p.jsx(e,{})})}function V0({attributes:t,children:e,element:r}){const n={textAlign:r.align};switch(r.type){case"blockQuote":return p.jsx("blockquote",{className:"arkynElementBlockquote",style:n,...t,children:e});case"bulletedList":return p.jsx("ul",{className:"arkynElementBulletList",style:n,...t,children:e});case"headingOne":return p.jsx("h1",{className:"arkynElementHeadingOne",style:n,...t,children:e});case"headingTwo":return p.jsx("h2",{className:"arkynElementHeadingTwo",style:n,...t,children:e});case"listItem":return p.jsx("li",{className:"arkynElementListItem",style:n,...t,children:e});case"numberedList":return p.jsx("ol",{className:"arkynElementNumberedList",style:n,...t,children:e});case"image":return p.jsxs("div",{style:n,...t,children:[p.jsx("img",{className:"arkynElementImage",alt:"arkynElementImage",src:(r==null?void 0:r.src)||""}),e]});default:return p.jsx("p",{className:"arkynElementParagraph",style:n,...t,children:e})}}const Jl=l.createContext({});function q0(){return l.useContext(Jl)}function G0(t){return p.jsx(Jl.Provider,{value:t,children:t.children})}function ai(t){const{children:e,disabled:r=!1,className:n="",onClick:s,value:i,...a}=t,{disabled:o,currentTab:u,changeCurrentTab:c}=q0(),f=o||r,D=`arkynTabButton ${f?"isDisabled":""} ${u===i&&i?"isActive":""} ${n}`;function v(C){c(i),s&&s(C)}return p.jsx("button",{onClick:v,className:D.trim(),...a,disabled:f,type:"button",children:e})}function Ql(t){const{children:e,onChange:r,defaultValue:n,disabled:s=!1,className:i,...a}=t,[o,u]=l.useState(n||""),c=`arkynTabContainer ${i||""}`;function f(h){u(h),r&&r(h)}return p.jsx(G0,{disabled:s,currentTab:o,changeCurrentTab:f,children:p.jsx("nav",{className:c.trim(),...a,children:e})})}function Z0(t){const{action:e,tabLabels:r=["Adicionar URL","Upload de arquivo"],modalCancelButton:n="Cancelar",modalConfirmButton:s="Confirmar",modalInputImageLabel:i="Imagem:",modalInputUrlLabel:a="URL da imagem:",modalTitle:o="Inserir imagem"}=t,u=Mn(),[c,f]=l.useState(!1),[h,g]=l.useState(""),[D,v]=l.useState("url");function C(d){d.preventDefault(),!(!h||h==="")&&(u.insertNodes([{type:"paragraph",children:[{text:""}]},{type:"image",src:h,children:[{text:""}]},{type:"paragraph",children:[{text:""}]}]),f(!1))}return p.jsxs(p.Fragment,{children:[p.jsx("button",{type:"button",className:"arkynRichTextInsertImage",onMouseDown:()=>f(!0),children:p.jsx(ce.Image,{})}),p.jsxs(Bo,{isVisible:c,makeInvisible:()=>f(!1),children:[p.jsx(Oo,{children:o}),p.jsxs("div",{className:"arkynRichTextInsertImageModalContent",children:[p.jsxs(Ql,{defaultValue:D,onChange:v,children:[p.jsx(ai,{value:"url",children:r[0]}),p.jsx(ai,{value:"file",children:r[1]})]}),D==="url"&&p.jsxs(p.Fragment,{children:[p.jsx(vr,{type:"text",name:"richTextImageURL",label:a,showAsterisk:!0,defaultValue:h,onChange:d=>g(d.target.value)}),h&&p.jsx("img",{className:"arkynRichTextInsertImageModalPreviewImage",src:h,alt:"preview"})]}),D==="file"&&p.jsx(Wi,{name:"richTextImageURL",action:e,label:i,showAsterisk:!0,defaultValue:h,onChange:d=>g(d)})]}),p.jsxs(Ao,{children:[p.jsx(pt,{type:"button",scheme:"danger",variant:"outline",onClick:()=>f(!1),children:n}),p.jsx(pt,{type:"button",onClick:C,children:s})]})]})]})}function K0({attributes:t,children:e,leaf:r}){return r.bold&&(e=p.jsx("strong",{children:e})),r.code&&(e=p.jsx("code",{children:e})),r.italic&&(e=p.jsx("em",{children:e})),r.underline&&(e=p.jsx("u",{children:e})),p.jsx("span",{...t,children:e})}function $l(t,e){const r=m.marks(t);return r?r[e]===!0:!1}function Rl(t,e){$l(t,e)?m.removeMark(t,e):m.addMark(t,e,!0)}function Nn({format:t,icon:e}){const r=Mn(),s=$l(r,t)?"activeTrue":"activeFalse";function i(a){a.preventDefault(),Rl(r,t)}return p.jsx("button",{type:"button",className:"arkynRichTextMarkButton "+s,onMouseDown:i,children:p.jsx(e,{})})}function X0({children:t}){return p.jsx("div",{className:"arkynRichTextToolbar",children:t})}function ec(t){return t.map(e=>ee.string(e)).join("")}function Y0(t){const{name:e,hiddenButtons:r,imageConfig:n,defaultValue:s="[]",enforceCharacterLimit:i=!1,onChangeCharactersCount:a,baseErrorMessage:o,maxLimit:u=10,onChange:c,isError:f,label:h,showAsterisk:g,id:D}=t,v=l.useMemo(()=>Mv(W0(xv())),[]),{fieldErrors:C}=Ye();function d(){try{const G=JSON.parse(s);return!Array.isArray(G)||G.length<=0?kn:G.every(re=>typeof re=="object"&&re!==null&&"type"in re&&"children"in re)?G:kn}catch{return kn}}const b=ec(d()),[y,w]=l.useState(b.length),[E,B]=l.useState(JSON.stringify(d())||"[]"),[A,O]=l.useState(!1),j=l.useRef(null),F=D||l.useId(),x=o||(C==null?void 0:C[e]),P=f||!!x,M=l.useCallback(K0,[]),I=l.useCallback(V0,[]);function N(G){const R=ec(G);w(R.length),a&&a(R.length),!(i&&R.length>=u)&&(B(JSON.stringify(G)),c&&c(G),v.children=G,K.setNodes(v,{children:G}))}const T=A?"focusTrue":"focusFalse",_=`arkynRichText ${P||u<y?"errorTrue":"errorFalse"} ${T}`,$=u-y;function q(G){return!(r!=null&&r.includes(G))}return p.jsxs(We,{children:[h&&p.jsx(Ue,{showAsterisk:g,children:h}),p.jsxs(_0,{editor:v,initialValue:d(),onChange:N,onValueChange:N,children:[p.jsxs("div",{className:_,children:[p.jsxs(X0,{children:[q("headingOne")&&p.jsx(Jt,{format:"headingOne",icon:ce.Heading1}),q("headingTwo")&&p.jsx(Jt,{format:"headingTwo",icon:ce.Heading2}),q("blockQuote")&&p.jsx(Jt,{format:"blockQuote",icon:ce.Quote}),q("bold")&&p.jsx(Nn,{format:"bold",icon:ce.Bold}),q("italic")&&p.jsx(Nn,{format:"italic",icon:ce.Italic}),q("underline")&&p.jsx(Nn,{format:"underline",icon:ce.Underline}),q("code")&&p.jsx(Nn,{format:"code",icon:ce.Code}),q("left")&&p.jsx(Jt,{format:"left",icon:ce.AlignLeft}),q("right")&&p.jsx(Jt,{format:"right",icon:ce.AlignRight}),q("center")&&p.jsx(Jt,{format:"center",icon:ce.AlignCenter}),q("justify")&&p.jsx(Jt,{format:"justify",icon:ce.AlignJustify}),n&&q("image")&&p.jsx(Z0,{...n})]}),p.jsx(x0,{className:"editorContainer",renderElement:I,renderLeaf:M,spellCheck:!0,ref:j,id:F,onFocus:()=>O(!0),onBlur:()=>O(!1),onKeyDown:G=>{for(const R in Xl)if(Rh(R,G)){G.preventDefault();const re=Xl[R];Rl(v,re)}}}),$<0&&p.jsx("div",{className:"restatesCharacters",children:$})]}),p.jsx("input",{type:"hidden",name:e,value:E.slice(0,u)}),p.jsx("input",{type:"hidden",name:`${e}Count`,value:y})]}),p.jsx(Je,{children:x})]})}function J0(t){const{onChange:e,onPlaceChanged:r,options:n,...s}=t,[i,a]=l.useState(null),o=c=>a(c),u=()=>{var v,C,d,b;const f=i.getPlaces()[0],h=f==null?void 0:f.address_components;function g(y){const w=h.find(E=>E.types[0]===y);return w?w.long_name:""}function D(y){const w=h.find(E=>E.types[0]===y);return w?w.short_name:""}if(f){const y=g("route"),w=g("street_number"),E=g("sublocality_level_1"),B=g("administrative_area_level_2"),A=g("administrative_area_level_1"),O=D("administrative_area_level_1"),j=g("postal_code"),F=(C=(v=f.geometry)==null?void 0:v.location)==null?void 0:C.lat(),x=(b=(d=f.geometry)==null?void 0:d.location)==null?void 0:b.lng();r&&r({street:y,city:B,state:A,district:E,cep:j,streetNumber:w,stateShortName:O,coordinates:{lat:F,lng:x}})}};return p.jsx(Do,{onLoad:o,onPlacesChanged:u,options:n,children:p.jsx(vr,{type:"text",onChange:c=>e&&e(c.target.value),...s})})}function Q0(t){const{iconSize:e,isLoading:r,disabled:n,readOnly:s,isFocused:i}=t,u=`arkynSelectChevron ${n||s?"notAnimate":""} ${i?"focused":""}`;return r?p.jsx(p.Fragment,{}):p.jsx(ce.ChevronDown,{className:u,strokeWidth:2.5,style:{minWidth:e,minHeight:e,maxWidth:e,maxHeight:e}})}function $0(t){const{children:e,handleContainerFocus:r,disabled:n,isError:s,isLoading:i,isFocused:a,className:o,readOnly:u,variant:c,size:f,id:h,prefixExists:g}=t,D=g?"hasPrefix":"",v=s?"errored":"",C=n||u||i?"opacity":"",d=a?"focused":"";return p.jsx("section",{id:h,className:`arkynSelectContainer ${D} ${c} ${f} ${C} ${v} ${d} ${o}`,onClick:r,children:e})}function R0(t){const{children:e,size:r}=t,n=`arkynSelectContent ${r}`;return p.jsx("div",{className:n,children:e})}function eD(t){const{label:e,optionHasSelected:r,handleChangeValue:n,value:s,size:i}=t,a=r(s)?"active":"",o=`arkynSelectOption ${i} ${a}`;return p.jsxs("div",{onClick:()=>n(s),className:o,children:[e," ",p.jsx(ce.Check,{})]})}function tD(t){const{children:e,isFocused:r,isSearchable:n,search:s,onSearch:i}=t,a=l.useRef(null),[o,u]=l.useState("bottom");jt(r),l.useEffect(()=>{if(!r)return;(()=>{if(!a.current)return;const h=a.current.parentElement;if(!h)return;const g=h.getBoundingClientRect(),D=window.innerHeight,v=300;D-g.bottom<v&&g.top>v?u("top"):u("bottom")})()},[r]);function c(f){n&&i(f.target.value)}return r?p.jsxs("div",{ref:a,className:`arkynSelectOptionsContainer ${o}`,children:[n&&p.jsx(vr,{type:"search",name:"search-select",variant:"underline",leftIcon:ce.Search,value:s,onChange:c}),e]}):p.jsx(p.Fragment,{})}function rD(t){const{isFocused:e,handleBlur:r}=t;return e?p.jsx("aside",{className:"arkynSelectOverlay",onClick:r}):p.jsx(p.Fragment,{})}function nD(t){const{iconSize:e,isLoading:r}=t;return r?p.jsx(ce.Loader2,{className:"arkynSelectSpinner",size:e,strokeWidth:2.5}):p.jsx(p.Fragment,{})}function sD(t){const{name:e,options:r,className:n="",placeholder:s="Selecione...",closeOnSelect:i=!0,defaultValue:a="",errorMessage:o,isLoading:u=!1,readOnly:c=!1,isSearchable:f=!1,id:h,label:g,optionMaxHeight:D,showAsterisk:v,leftIcon:C,onSearch:d,onChange:b,onBlur:y,notFoundText:w="Sem opções disponíveis",onFocus:E,disabled:B=!1,prefix:A,size:O="md",value:j,variant:F="solid"}=t,{fieldErrors:x}=Ye(),P=l.useRef(null),M=h||l.useId(),I=o||(x==null?void 0:x[e]),N=!!I,T=B||u||c,_={md:20,lg:20}[O],[$,q]=l.useState(""),[G,R]=l.useState(!1),[re,Y]=l.useState(a),ae=j||re;function k(ne){return ae===ne}function S(ne){const oe=r.find(ue=>ue.value===ne);return(oe==null?void 0:oe.label)||""}function W(){T||!(P!=null&&P.current)||G||(R(!0),P.current.focus(),E&&E())}function z(){R(!1),y&&P.current&&P.current.blur()}function Z(ne){q(ne),d&&d(ne)}function Q(ne){k(ne)?(Y(""),b&&b("")):(Y(ne),b&&b(ne)),i&&z()}const J=r.filter(ne=>!!(t.onSearch||!t.isSearchable||ne.label.toLowerCase().includes($.toLowerCase())));return p.jsxs(We,{className:n,children:[g&&p.jsx(Ue,{showAsterisk:v,children:g}),p.jsxs($0,{handleContainerFocus:W,disabled:T,isError:N,isFocused:G,isLoading:u,readOnly:c,size:O,variant:F,prefixExists:!!A,id:M,children:[p.jsx("input",{ref:P,name:e,value:ae,type:"hidden"}),p.jsx(Ae,{iconSize:_,icon:A,className:"prefix"}),C&&p.jsx(C,{size:_,strokeWidth:2.5}),p.jsxs(R0,{size:O,children:[ae!==""&&p.jsx("p",{className:"hasValue",children:S(ae)}),ae===""&&p.jsx("p",{children:s})]}),p.jsxs(tD,{isFocused:G,isSearchable:f,search:$,onSearch:Z,children:[J.map(({label:ne,value:oe})=>p.jsx(eD,{label:ne,value:oe,size:O,handleChangeValue:Q,optionHasSelected:k},oe)),J.length<=0&&p.jsx("p",{children:w})]}),p.jsx(Q0,{disabled:T,isFocused:G,readOnly:c,iconSize:_,isLoading:u}),p.jsx(nD,{iconSize:_,isLoading:u}),p.jsx(rD,{handleBlur:z,isFocused:G})]}),I&&p.jsx(Je,{children:I})]})}function iD(t){const{label:e,size:r="lg",defaultChecked:n=!1,checked:s=null,value:i,unCheckedValue:a="",name:o,className:u="",onCheck:c,id:f,orientation:h="horizontalReverse",...g}=t,D=l.useRef(null),v=f||l.useId(),[C,d]=l.useState(n),b=typeof s=="boolean"?s:C;function y(){d(!C),c&&c(b?a:i||"checked")}const E=`arkynSwitch ${b?"checkedTrue":"checkedFalse"} ${r} ${u}`;return p.jsxs(We,{orientation:h,children:[e&&p.jsx(Ue,{onClick:y,children:e}),p.jsx("button",{type:"button",onClick:y,className:E,...g,children:p.jsx("input",{id:v,type:"hidden",name:o,ref:D,onClick:y,value:b?i||"checked":a})})]})}function aD(t){const{emptyMessage:e="Nenhum dado adicionado.",className:r,children:n,...s}=t,i=`arkynTableBody ${r}`,a=l.Children.count(n)===0;return p.jsx("tbody",{className:i.trim(),...s,children:a?p.jsx("tr",{className:"arkynTableBodyEmptyLine",children:p.jsx("td",{colSpan:100,children:p.jsx("div",{children:e})})}):n})}function oD(t){const{className:e,children:r,...n}=t,s=`arkynTableCaption ${e}`;return p.jsx("caption",{className:s.trim(),...n,children:p.jsx("div",{className:"arkynTableCaptionContent",children:r})})}function uD(t){const{children:e,className:r,...n}=t,s=`arkynTableContainer ${r}`;return p.jsx("div",{className:s.trim(),...n,children:p.jsx("table",{children:e})})}function lD(t){const{className:e,children:r,...n}=t,s=`arkynTableFooter ${e}`;return p.jsxs("tfoot",{className:s.trim(),...n,children:[p.jsx("tr",{className:"spacingRow"}),p.jsx("tr",{children:p.jsx("th",{colSpan:100,children:p.jsx("div",{className:"arkynTableFooterContent",children:r})})})]})}function cD(t){const{className:e,children:r,...n}=t,s=`arkynTableHeader ${e}`;return p.jsxs("thead",{className:s.trim(),...n,children:[p.jsx("tr",{children:r}),p.jsx("tr",{className:"spacingRow"})]})}function fD(t){const{variant:e="solid",size:r="md",className:n,errorMessage:s,disabled:i=!1,readOnly:a=!1,label:o,showAsterisk:u,name:c,onFocus:f,onBlur:h,title:g,style:D,value:v,defaultValue:C,placeholder:d,id:b,...y}=t,{fieldErrors:w}=Ye(),[E,B]=l.useState(!1),A=l.useRef(null),O=b||l.useId(),j=s||(w==null?void 0:w[c]),I=`arkynTextarea ${e} ${r} ${i||a?"opacityTrue":"opacityFalse"} ${!!j?"errorTrue":"errorFalse"} ${E?"focusedTrue":"focusedFalse"}`;function N(){i||!(A!=null&&A.current)||(B(!0),A.current.focus())}function T(_){B(!0),f&&f(_)}function X(_){B(!1),h&&h(_)}return p.jsxs(We,{className:n,children:[o&&p.jsx(Ue,{htmlFor:O,showAsterisk:u,children:o}),p.jsx("section",{title:g,style:D,onClick:N,className:I,children:p.jsx("textarea",{id:O,disabled:i,readOnly:a,ref:A,name:c,onFocus:T,onBlur:X,defaultValue:C||"",placeholder:i&&v||d,value:i?void 0:v,...y})}),j&&p.jsx(Je,{children:j})]})}const tc=l.createContext({});function dD(t){const{children:e=!1}=t,[r,n]=l.useState([]);function s(c){return!!r.some(f=>f.key===c)}function i(c){var f;return(f=r.find(h=>h.key===c))==null?void 0:f.data}function a(c,f){const h=s(c);n(h?g=>[...g.filter(v=>v.key!==c),{key:c,data:f}]:[...r,{key:c,data:f}])}function o(c){n(r.filter(f=>f.key!==c))}function u(){n([])}return p.jsx(tc.Provider,{value:{modalIsOpen:s,modalData:i,openModal:a,closeModal:o,closeAll:u},children:e})}function rc(t){const e=l.useContext(tc);if(Object.entries(e).length===0)throw new Error("useModal must be used within a Provider");if(t){const{modalData:r,modalIsOpen:n,openModal:s,closeModal:i}=e,a=n(t),o=r(t);return{modalIsOpen:a,modalData:o,openModal:f=>s(t,f),closeModal:()=>i(t)}}else return e}let hD={data:""},gD=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||hD,pD=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,vD=/\/\*[^]*?\*\/| +/g,nc=/\n+/g,Mt=(t,e)=>{let r="",n="",s="";for(let i in t){let a=t[i];i[0]=="@"?i[1]=="i"?r=i+" "+a+";":n+=i[1]=="f"?Mt(a,i):i+"{"+Mt(a,i[1]=="k"?"":e)+"}":typeof a=="object"?n+=Mt(a,e?e.replace(/([^,])+/g,o=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,o):o?o+" "+u:u)):i):a!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=Mt.p?Mt.p(i,a):i+":"+a+";")}return r+(e&&s?e+"{"+s+"}":s)+n},yt={},sc=t=>{if(typeof t=="object"){let e="";for(let r in t)e+=r+sc(t[r]);return e}return t},mD=(t,e,r,n,s)=>{let i=sc(t),a=yt[i]||(yt[i]=(u=>{let c=0,f=11;for(;c<u.length;)f=101*f+u.charCodeAt(c++)>>>0;return"go"+f})(i));if(!yt[a]){let u=i!==t?t:(c=>{let f,h,g=[{}];for(;f=pD.exec(c.replace(vD,""));)f[4]?g.shift():f[3]?(h=f[3].replace(nc," ").trim(),g.unshift(g[0][h]=g[0][h]||{})):g[0][f[1]]=f[2].replace(nc," ").trim();return g[0]})(t);yt[a]=Mt(s?{["@keyframes "+a]:u}:u,r?"":"."+a)}let o=r&&yt.g?yt.g:null;return r&&(yt.g=yt[a]),((u,c,f,h)=>{h?c.data=c.data.replace(h,u):c.data.indexOf(u)===-1&&(c.data=f?u+c.data:c.data+u)})(yt[a],e,n,o),a},CD=(t,e,r)=>t.reduce((n,s,i)=>{let a=e[i];if(a&&a.call){let o=a(r),u=o&&o.props&&o.props.className||/^go/.test(o)&&o;a=u?"."+u:o&&typeof o=="object"?o.props?"":Mt(o,""):o===!1?"":o}return n+s+(a??"")},"");function In(t){let e=this||{},r=t.call?t(e.p):t;return mD(r.unshift?r.raw?CD(r,[].slice.call(arguments,1),e.p):r.reduce((n,s)=>Object.assign(n,s&&s.call?s(e.p):s),{}):r,gD(e.target),e.g,e.o,e.k)}let ic,oi,ui;In.bind({g:1});let bt=In.bind({k:1});function DD(t,e,r,n){Mt.p=e,ic=t,oi=r,ui=n}function kt(t,e){let r=this||{};return function(){let n=arguments;function s(i,a){let o=Object.assign({},i),u=o.className||s.className;r.p=Object.assign({theme:oi&&oi()},o),r.o=/ *go\d+/.test(u),o.className=In.apply(r,n)+(u?" "+u:"");let c=t;return t[0]&&(c=o.as||t,delete o.as),ui&&c[0]&&ui(o),ic(c,o)}return s}}var yD=t=>typeof t=="function",jn=(t,e)=>yD(t)?t(e):t,bD=(()=>{let t=0;return()=>(++t).toString()})(),ac=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),ED=20,li="default",oc=(t,e)=>{let{toastLimit:r}=t.settings;switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,r)};case 1:return{...t,toasts:t.toasts.map(a=>a.id===e.toast.id?{...a,...e.toast}:a)};case 2:let{toast:n}=e;return oc(t,{type:t.toasts.find(a=>a.id===n.id)?1:0,toast:n});case 3:let{toastId:s}=e;return{...t,toasts:t.toasts.map(a=>a.id===s||s===void 0?{...a,dismissed:!0,visible:!1}:a)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(a=>a.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let i=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},zn=[],uc={toasts:[],pausedAt:void 0,settings:{toastLimit:ED}},dt={},lc=(t,e=li)=>{dt[e]=oc(dt[e]||uc,t),zn.forEach(([r,n])=>{r===e&&n(dt[e])})},cc=t=>Object.keys(dt).forEach(e=>lc(t,e)),wD=t=>Object.keys(dt).find(e=>dt[e].toasts.some(r=>r.id===t)),_n=(t=li)=>e=>{lc(e,t)},BD={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},AD=(t={},e=li)=>{let[r,n]=l.useState(dt[e]||uc),s=l.useRef(dt[e]);l.useEffect(()=>(s.current!==dt[e]&&n(dt[e]),zn.push([e,n]),()=>{let a=zn.findIndex(([o])=>o===e);a>-1&&zn.splice(a,1)}),[e]);let i=r.toasts.map(a=>{var o,u,c;return{...t,...t[a.type],...a,removeDelay:a.removeDelay||((o=t[a.type])==null?void 0:o.removeDelay)||(t==null?void 0:t.removeDelay),duration:a.duration||((u=t[a.type])==null?void 0:u.duration)||(t==null?void 0:t.duration)||BD[a.type],style:{...t.style,...(c=t[a.type])==null?void 0:c.style,...a.style}}});return{...r,toasts:i}},OD=(t,e="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...r,id:(r==null?void 0:r.id)||bD()}),zr=t=>(e,r)=>{let n=OD(e,t,r);return _n(n.toasterId||wD(n.id))({type:2,toast:n}),n.id},Me=(t,e)=>zr("blank")(t,e);Me.error=zr("error"),Me.success=zr("success"),Me.loading=zr("loading"),Me.custom=zr("custom"),Me.dismiss=(t,e)=>{let r={type:3,toastId:t};e?_n(e)(r):cc(r)},Me.dismissAll=t=>Me.dismiss(void 0,t),Me.remove=(t,e)=>{let r={type:4,toastId:t};e?_n(e)(r):cc(r)},Me.removeAll=t=>Me.remove(void 0,t),Me.promise=(t,e,r)=>{let n=Me.loading(e.loading,{...r,...r==null?void 0:r.loading});return typeof t=="function"&&(t=t()),t.then(s=>{let i=e.success?jn(e.success,s):void 0;return i?Me.success(i,{id:n,...r,...r==null?void 0:r.success}):Me.dismiss(n),s}).catch(s=>{let i=e.error?jn(e.error,s):void 0;i?Me.error(i,{id:n,...r,...r==null?void 0:r.error}):Me.dismiss(n)}),t};var LD=1e3,SD=(t,e="default")=>{let{toasts:r,pausedAt:n}=AD(t,e),s=l.useRef(new Map).current,i=l.useCallback((h,g=LD)=>{if(s.has(h))return;let D=setTimeout(()=>{s.delete(h),a({type:4,toastId:h})},g);s.set(h,D)},[]);l.useEffect(()=>{if(n)return;let h=Date.now(),g=r.map(D=>{if(D.duration===1/0)return;let v=(D.duration||0)+D.pauseDuration-(h-D.createdAt);if(v<0){D.visible&&Me.dismiss(D.id);return}return setTimeout(()=>Me.dismiss(D.id,e),v)});return()=>{g.forEach(D=>D&&clearTimeout(D))}},[r,n,e]);let a=l.useCallback(_n(e),[e]),o=l.useCallback(()=>{a({type:5,time:Date.now()})},[a]),u=l.useCallback((h,g)=>{a({type:1,toast:{id:h,height:g}})},[a]),c=l.useCallback(()=>{n&&a({type:6,time:Date.now()})},[n,a]),f=l.useCallback((h,g)=>{let{reverseOrder:D=!1,gutter:v=8,defaultPosition:C}=g||{},d=r.filter(w=>(w.position||C)===(h.position||C)&&w.height),b=d.findIndex(w=>w.id===h.id),y=d.filter((w,E)=>E<b&&w.visible).length;return d.filter(w=>w.visible).slice(...D?[y+1]:[0,y]).reduce((w,E)=>w+(E.height||0)+v,0)},[r]);return l.useEffect(()=>{r.forEach(h=>{if(h.dismissed)i(h.id,h.removeDelay);else{let g=s.get(h.id);g&&(clearTimeout(g),s.delete(h.id))}})},[r,i]),{toasts:r,handlers:{updateHeight:u,startPause:o,endPause:c,calculateOffset:f}}},FD=bt`
|
|
43
43
|
from {
|
|
44
44
|
transform: scale(0) rotate(45deg);
|
|
45
45
|
opacity: 0;
|
|
@@ -215,5 +215,5 @@ to {
|
|
|
215
215
|
> * {
|
|
216
216
|
pointer-events: auto;
|
|
217
217
|
}
|
|
218
|
-
`,Un=16,ey=({reverseOrder:t,position:e="top-center",toastOptions:r,gutter:n,children:s,toasterId:i,containerStyle:a,containerClassName:o})=>{let{toasts:u,handlers:c}=SD(r,i);return ke.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:Un,left:Un,right:Un,bottom:Un,pointerEvents:"none",...a},className:o,onMouseEnter:c.startPause,onMouseLeave:c.endPause},u.map(f=>{let h=f.position||e,g=c.calculateOffset(f,{reverseOrder:t,gutter:n,defaultPosition:e}),D=$D(h,g);return ke.createElement(QD,{id:f.id,key:f.id,onHeightUpdate:c.updateHeight,className:f.visible?RD:"",style:D},f.type==="custom"?jn(f.message,f):s?s(f):ke.createElement(JD,{toast:f,position:h}))}))},fc=Me;const dc=l.createContext({});function ty({children:t}){function e(r){switch(r.type){case"success":return fc.success(r.message,{style:{background:"#10B981",color:"#ffffff",padding:"12px 16px",fontSize:"14px",fontWeight:600},iconTheme:{primary:"#059669",secondary:"#ffffff"}});case"danger":return fc.error(r.message,{style:{background:"#E11D48",color:"#ffffff",padding:"12px 16px",fontSize:"14px",fontWeight:600},iconTheme:{primary:"#BE123C",secondary:"#ffffff"}})}}return p.jsxs(dc.Provider,{value:{showToast:e},children:[p.jsx(ey,{position:"top-right",containerStyle:{zIndex:999999999999999}}),t]})}function hc(){const t=l.useContext(dc);if(Object.entries(t).length===0)throw new Error("useToast must be used within a Provider");return t}const ry=["BadGateway","BadRequest","Conflict","Forbidden","NotFound","NotImplemented","ServerError","Unauthorized","UnprocessableEntity"],ny=["Created","Found","Success","Updated"];function sy(t){const{closeAll:e}=rc(),{showToast:r}=hc(),n=t==null?void 0:t.closeModal,s=t==null?void 0:t.message,i=t==null?void 0:t.name,a=t==null?void 0:t.type;l.useEffect(()=>{n&&e(),s&&(a==="success"&&r({message:s,type:"success"}),a==="danger"&&r({message:s,type:"danger"}),ry.includes(i)&&r({message:s,type:"danger"}),ny.includes(i)&&r({message:s,type:"success"}))},[t])}const gc=l.createContext({});function iy(t){const{children:e=!1}=t,[r,n]=l.useState([]);function s(u){return!!r.some(c=>c.key===u)}function i(u){var c;return(c=r.find(f=>f.key===u))==null?void 0:c.data}function a(u,c){const f=s(u);n(f?h=>[...h.filter(D=>D.key!==u),{key:u,data:c}]:[...r,{key:u,data:c}])}function o(u){n(r.filter(c=>c.key!==u))}return p.jsx(gc.Provider,{value:{drawerIsOpen:s,drawerData:i,openDrawer:a,closeDrawer:o},children:e})}function ay(t){const e=l.useContext(gc);if(Object.entries(e).length===0)throw new Error("useDrawer must be used within a Provider");if(t){const{drawerData:r,drawerIsOpen:n,openDrawer:s,closeDrawer:i}=e,a=n(t),o=r(t);return{drawerIsOpen:a,drawerData:o,openDrawer:f=>s(t,f),closeDrawer:()=>i(t)}}else return e}function oy(t,e=""){const r=new URLSearchParams(t),n=e?`${e}:`:"",s=i=>{Object.entries(i).forEach(([a,o])=>{o===void 0?r.delete(`${n}${a}`):r.set(`${n}${a}`,String(o))})};return{getParam:i=>r.get(`${n}${i}`),getScopedSearch:i=>{s(i);let a=r.toString();return a&&(a="?"+a),a}}}function uy(t){const{apiKey:e,children:r,preventFontsLoading:n=!0}=t,{isLoaded:s}=ea({googleMapsApiKey:e,libraries:["places","marker","maps"],preventGoogleFontsLoading:n});return p.jsx(p.Fragment,{children:r(s)})}function pc(t){if(ie.isText(t)){let e=t==null?void 0:t.text;return t!=null&&t.bold&&(e=`<strong>${e}</strong>`),t!=null&&t.code&&(e=`<code>${e}</code>`),t!=null&&t.italic&&(e=`<em>${e}</em>`),t!=null&&t.underline&&(e=`<u>${e}</u>`),e}if(se.isElement(t)){const e=t.children.map(n=>pc(n)).join(""),r=t.align||"left";switch(t.type){case"image":return`<img src="${t.src}" class="align_${r}" />`;case"paragraph":return`<p class="align_${r}">${e}</p>`;case"blockQuote":return`<blockquote class="align_${r}">${e}</blockquote>`;case"bulletedList":return`<ul class="align_${r}">${e}</ul>`;case"headingOne":return`<h1 class="align_${r}">${e}</h1>`;case"headingTwo":return`<h2 class="align_${r}">${e}</h2>`;case"listItem":return`<li class="align_${r}">${e}</li>`;case"numberedList":return`<ol class="align_${r}">${e}</ol>`;default:return e}}return""}function ci(t){var n;if(typeof t=="string")return{text:t};const e=Array.isArray(t.props.children)?t.props.children.map(s=>ci(s)):[{text:t.props.children||""}],r=(n=t.props.className)==null?void 0:n.replace("align_","");switch(t.type){case"img":return{type:"image",align:r,src:t.props.src,children:[{text:""}]};case"p":return{type:"paragraph",align:r,children:e};case"blockquote":return{type:"blockQuote",align:r,children:e};case"ul":return{type:"bulletedList",align:r,children:e};case"ol":return{type:"numberedList",align:r,children:e};case"li":return{type:"listItem",align:r,children:e};case"h1":return{type:"headingOne",align:r,children:e};case"h2":return{type:"headingTwo",align:r,children:e};case"strong":return{text:t.props.children,bold:!0};case"code":return{text:t.props.children,code:!0};case"em":return{text:t.props.children,italic:!0};case"u":return{text:t.props.children,underline:!0};default:return{text:t.props.children||""}}}function ly(t){return t.map(e=>pc(e)).join("")}var vc={},fi={},di={},Qt={},hi={},gi={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0;var e;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(e=t.ElementType||(t.ElementType={}));function r(n){return n.type===e.Tag||n.type===e.Script||n.type===e.Style}t.isTag=r,t.Root=e.Root,t.Text=e.Text,t.Directive=e.Directive,t.Comment=e.Comment,t.Script=e.Script,t.Style=e.Style,t.Tag=e.Tag,t.CDATA=e.CDATA,t.Doctype=e.Doctype})(gi);var Ce={},Tt=Oe&&Oe.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),_r=Oe&&Oe.__assign||function(){return _r=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},_r.apply(this,arguments)};Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.cloneNode=Ce.hasChildren=Ce.isDocument=Ce.isDirective=Ce.isComment=Ce.isText=Ce.isCDATA=Ce.isTag=Ce.Element=Ce.Document=Ce.CDATA=Ce.NodeWithChildren=Ce.ProcessingInstruction=Ce.Comment=Ce.Text=Ce.DataNode=Ce.Node=void 0;var Re=gi,pi=function(){function t(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),t.prototype.cloneNode=function(e){return e===void 0&&(e=!1),vi(this,e)},t}();Ce.Node=pi;var Wn=function(t){Tt(e,t);function e(r){var n=t.call(this)||this;return n.data=r,n}return Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.data},set:function(r){this.data=r},enumerable:!1,configurable:!0}),e}(pi);Ce.DataNode=Wn;var mc=function(t){Tt(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=Re.ElementType.Text,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),e}(Wn);Ce.Text=mc;var Cc=function(t){Tt(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=Re.ElementType.Comment,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),e}(Wn);Ce.Comment=Cc;var Dc=function(t){Tt(e,t);function e(r,n){var s=t.call(this,n)||this;return s.name=r,s.type=Re.ElementType.Directive,s}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),e}(Wn);Ce.ProcessingInstruction=Dc;var Hn=function(t){Tt(e,t);function e(r){var n=t.call(this)||this;return n.children=r,n}return Object.defineProperty(e.prototype,"firstChild",{get:function(){var r;return(r=this.children[0])!==null&&r!==void 0?r:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),e}(pi);Ce.NodeWithChildren=Hn;var yc=function(t){Tt(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=Re.ElementType.CDATA,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),e}(Hn);Ce.CDATA=yc;var bc=function(t){Tt(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=Re.ElementType.Root,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),e}(Hn);Ce.Document=bc;var Ec=function(t){Tt(e,t);function e(r,n,s,i){s===void 0&&(s=[]),i===void 0&&(i=r==="script"?Re.ElementType.Script:r==="style"?Re.ElementType.Style:Re.ElementType.Tag);var a=t.call(this,s)||this;return a.name=r,a.attribs=n,a.type=i,a}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(n){var s,i;return{name:n,value:r.attribs[n],namespace:(s=r["x-attribsNamespace"])===null||s===void 0?void 0:s[n],prefix:(i=r["x-attribsPrefix"])===null||i===void 0?void 0:i[n]}})},enumerable:!1,configurable:!0}),e}(Hn);Ce.Element=Ec;function wc(t){return(0,Re.isTag)(t)}Ce.isTag=wc;function Bc(t){return t.type===Re.ElementType.CDATA}Ce.isCDATA=Bc;function Ac(t){return t.type===Re.ElementType.Text}Ce.isText=Ac;function Oc(t){return t.type===Re.ElementType.Comment}Ce.isComment=Oc;function Lc(t){return t.type===Re.ElementType.Directive}Ce.isDirective=Lc;function Sc(t){return t.type===Re.ElementType.Root}Ce.isDocument=Sc;function cy(t){return Object.prototype.hasOwnProperty.call(t,"children")}Ce.hasChildren=cy;function vi(t,e){e===void 0&&(e=!1);var r;if(Ac(t))r=new mc(t.data);else if(Oc(t))r=new Cc(t.data);else if(wc(t)){var n=e?mi(t.children):[],s=new Ec(t.name,_r({},t.attribs),n);n.forEach(function(u){return u.parent=s}),t.namespace!=null&&(s.namespace=t.namespace),t["x-attribsNamespace"]&&(s["x-attribsNamespace"]=_r({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(s["x-attribsPrefix"]=_r({},t["x-attribsPrefix"])),r=s}else if(Bc(t)){var n=e?mi(t.children):[],i=new yc(n);n.forEach(function(c){return c.parent=i}),r=i}else if(Sc(t)){var n=e?mi(t.children):[],a=new bc(n);n.forEach(function(c){return c.parent=a}),t["x-mode"]&&(a["x-mode"]=t["x-mode"]),r=a}else if(Lc(t)){var o=new Dc(t.name,t.data);t["x-name"]!=null&&(o["x-name"]=t["x-name"],o["x-publicId"]=t["x-publicId"],o["x-systemId"]=t["x-systemId"]),r=o}else throw new Error("Not implemented yet: ".concat(t.type));return r.startIndex=t.startIndex,r.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(r.sourceCodeLocation=t.sourceCodeLocation),r}Ce.cloneNode=vi;function mi(t){for(var e=t.map(function(n){return vi(n,!0)}),r=1;r<e.length;r++)e[r].prev=e[r-1],e[r-1].next=e[r];return e}(function(t){var e=Oe&&Oe.__createBinding||(Object.create?function(o,u,c,f){f===void 0&&(f=c);var h=Object.getOwnPropertyDescriptor(u,c);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(o,f,h)}:function(o,u,c,f){f===void 0&&(f=c),o[f]=u[c]}),r=Oe&&Oe.__exportStar||function(o,u){for(var c in o)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&e(u,o,c)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var n=gi,s=Ce;r(Ce,t);var i={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function o(u,c,f){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof c=="function"&&(f=c,c=i),typeof u=="object"&&(c=u,u=void 0),this.callback=u??null,this.options=c??i,this.elementCB=f??null}return o.prototype.onparserinit=function(u){this.parser=u},o.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},o.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},o.prototype.onerror=function(u){this.handleCallback(u)},o.prototype.onclosetag=function(){this.lastNode=null;var u=this.tagStack.pop();this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(u)},o.prototype.onopentag=function(u,c){var f=this.options.xmlMode?n.ElementType.Tag:void 0,h=new s.Element(u,c,void 0,f);this.addNode(h),this.tagStack.push(h)},o.prototype.ontext=function(u){var c=this.lastNode;if(c&&c.type===n.ElementType.Text)c.data+=u,this.options.withEndIndices&&(c.endIndex=this.parser.endIndex);else{var f=new s.Text(u);this.addNode(f),this.lastNode=f}},o.prototype.oncomment=function(u){if(this.lastNode&&this.lastNode.type===n.ElementType.Comment){this.lastNode.data+=u;return}var c=new s.Comment(u);this.addNode(c),this.lastNode=c},o.prototype.oncommentend=function(){this.lastNode=null},o.prototype.oncdatastart=function(){var u=new s.Text(""),c=new s.CDATA([u]);this.addNode(c),u.parent=c,this.lastNode=u},o.prototype.oncdataend=function(){this.lastNode=null},o.prototype.onprocessinginstruction=function(u,c){var f=new s.ProcessingInstruction(u,c);this.addNode(f)},o.prototype.handleCallback=function(u){if(typeof this.callback=="function")this.callback(u,this.dom);else if(u)throw u},o.prototype.addNode=function(u){var c=this.tagStack[this.tagStack.length-1],f=c.children[c.children.length-1];this.options.withStartIndices&&(u.startIndex=this.parser.startIndex),this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),c.children.push(u),f&&(u.prev=f,f.next=u),u.parent=c,this.lastNode=null},o}();t.DomHandler=a,t.default=a})(hi);var Fc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=t.CARRIAGE_RETURN_PLACEHOLDER=t.CARRIAGE_RETURN_REGEX=t.CARRIAGE_RETURN=t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.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"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,r){return e[r.toLowerCase()]=r,e},{}),t.CARRIAGE_RETURN="\r",t.CARRIAGE_RETURN_REGEX=new RegExp(t.CARRIAGE_RETURN,"g"),t.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(t.CARRIAGE_RETURN_PLACEHOLDER,"g")})(Fc),Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.formatAttributes=xc,Qt.escapeSpecialCharacters=hy,Qt.revertEscapedCharacters=Pc,Qt.formatDOM=Mc;var Vn=hi,Ur=Fc;function fy(t){return Ur.CASE_SENSITIVE_TAG_NAMES_MAP[t]}function xc(t){for(var e={},r=0,n=t.length;r<n;r++){var s=t[r];e[s.name]=s.value}return e}function dy(t){t=t.toLowerCase();var e=fy(t);return e||t}function hy(t){return t.replace(Ur.CARRIAGE_RETURN_REGEX,Ur.CARRIAGE_RETURN_PLACEHOLDER)}function Pc(t){return t.replace(Ur.CARRIAGE_RETURN_PLACEHOLDER_REGEX,Ur.CARRIAGE_RETURN)}function Mc(t,e,r){e===void 0&&(e=null);for(var n=[],s,i=0,a=t.length;i<a;i++){var o=t[i];switch(o.nodeType){case 1:{var u=dy(o.nodeName);s=new Vn.Element(u,xc(o.attributes)),s.children=Mc(u==="template"?o.content.childNodes:o.childNodes,s);break}case 3:s=new Vn.Text(Pc(o.nodeValue));break;case 8:s=new Vn.Comment(o.nodeValue);break;default:continue}var c=n[i-1]||null;c&&(c.next=s),s.parent=e,s.prev=c,s.next=null,n.push(s)}return r&&(s=new Vn.ProcessingInstruction(r.substring(0,r.indexOf(" ")).toLowerCase(),r),s.next=n[0]||null,s.parent=e,n.unshift(s),n[1]&&(n[1].prev=n[0])),n}Object.defineProperty(di,"__esModule",{value:!0}),di.default=Cy;var gy=Qt,kc="html",Tc="head",qn="body",py=/<([a-zA-Z]+[0-9]?)/,Nc=/<head[^]*>/i,Ic=/<body[^]*>/i,Gn=function(t,e){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},Ci=function(t,e){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},jc=typeof window=="object"&&window.DOMParser;if(typeof jc=="function"){var vy=new jc,my="text/html";Ci=function(t,e){return e&&(t="<".concat(e,">").concat(t,"</").concat(e,">")),vy.parseFromString(t,my)},Gn=Ci}if(typeof document=="object"&&document.implementation){var Zn=document.implementation.createHTMLDocument();Gn=function(t,e){if(e){var r=Zn.documentElement.querySelector(e);return r&&(r.innerHTML=t),Zn}return Zn.documentElement.innerHTML=t,Zn}}var Kn=typeof document=="object"&&document.createElement("template"),Di;Kn&&Kn.content&&(Di=function(t){return Kn.innerHTML=t,Kn.content.childNodes});function Cy(t){var e,r;t=(0,gy.escapeSpecialCharacters)(t);var n=t.match(py),s=n&&n[1]?n[1].toLowerCase():"";switch(s){case kc:{var i=Ci(t);if(!Nc.test(t)){var a=i.querySelector(Tc);(e=a==null?void 0:a.parentNode)===null||e===void 0||e.removeChild(a)}if(!Ic.test(t)){var a=i.querySelector(qn);(r=a==null?void 0:a.parentNode)===null||r===void 0||r.removeChild(a)}return i.querySelectorAll(kc)}case Tc:case qn:{var o=Gn(t).querySelectorAll(s);return Ic.test(t)&&Nc.test(t)?o[0].parentNode.childNodes:o}default:{if(Di)return Di(t);var a=Gn(t,qn).querySelector(qn);return a.childNodes}}}var Dy=Oe&&Oe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fi,"__esModule",{value:!0}),fi.default=wy;var yy=Dy(di),by=Qt,Ey=/<(![a-zA-Z\s]+)>/;function wy(t){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];var e=t.match(Ey),r=e?e[1]:void 0;return(0,by.formatDOM)((0,yy.default)(t),null,r)}var Xn={},lt={},Yn={},By=0;Yn.SAME=By;var Ay=1;Yn.CAMELCASE=Ay,Yn.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 zc=0,Nt=1,Jn=2,Qn=3,yi=4,_c=5,Uc=6;function Oy(t){return je.hasOwnProperty(t)?je[t]:null}function Ge(t,e,r,n,s,i,a){this.acceptsBooleans=e===Jn||e===Qn||e===yi,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=a}const je={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(t=>{je[t]=new Ge(t,zc,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([t,e])=>{je[t]=new Ge(t,Nt,!1,e,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(t=>{je[t]=new Ge(t,Jn,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(t=>{je[t]=new Ge(t,Jn,!1,t,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(t=>{je[t]=new Ge(t,Qn,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(t=>{je[t]=new Ge(t,Qn,!0,t,null,!1,!1)}),["capture","download"].forEach(t=>{je[t]=new Ge(t,yi,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(t=>{je[t]=new Ge(t,Uc,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(t=>{je[t]=new Ge(t,_c,!1,t.toLowerCase(),null,!1,!1)});const bi=/[\-\:]([a-z])/g,Ei=t=>t[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(t=>{const e=t.replace(bi,Ei);je[e]=new Ge(e,Nt,!1,t,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(t=>{const e=t.replace(bi,Ei);je[e]=new Ge(e,Nt,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(t=>{const e=t.replace(bi,Ei);je[e]=new Ge(e,Nt,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(t=>{je[t]=new Ge(t,Nt,!1,t.toLowerCase(),null,!1,!1)});const Ly="xlinkHref";je[Ly]=new Ge("xlinkHref",Nt,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(t=>{je[t]=new Ge(t,Nt,!1,t.toLowerCase(),null,!0,!0)});const{CAMELCASE:Sy,SAME:Fy,possibleStandardNames:Wc}=Yn,xy=":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",Py=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+xy+"]*$")),My=Object.keys(Wc).reduce((t,e)=>{const r=Wc[e];return r===Fy?t[e]=e:r===Sy?t[e.toLowerCase()]=e:t[e]=r,t},{});lt.BOOLEAN=Qn,lt.BOOLEANISH_STRING=Jn,lt.NUMERIC=_c,lt.OVERLOADED_BOOLEAN=yi,lt.POSITIVE_NUMERIC=Uc,lt.RESERVED=zc,lt.STRING=Nt,lt.getPropertyInfo=Oy,lt.isCustomAttribute=Py,lt.possibleStandardNames=My;var wi={},Bi={},Hc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ky=/\n/g,Ty=/^\s*/,Ny=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Iy=/^:\s*/,jy=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,zy=/^[;\s]*/,_y=/^\s+|\s+$/g,Uy=`
|
|
219
|
-
`,Vc="/",qc="*",$t="",
|
|
218
|
+
`,Un=16,ey=({reverseOrder:t,position:e="top-center",toastOptions:r,gutter:n,children:s,toasterId:i,containerStyle:a,containerClassName:o})=>{let{toasts:u,handlers:c}=SD(r,i);return ke.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:Un,left:Un,right:Un,bottom:Un,pointerEvents:"none",...a},className:o,onMouseEnter:c.startPause,onMouseLeave:c.endPause},u.map(f=>{let h=f.position||e,g=c.calculateOffset(f,{reverseOrder:t,gutter:n,defaultPosition:e}),D=$D(h,g);return ke.createElement(QD,{id:f.id,key:f.id,onHeightUpdate:c.updateHeight,className:f.visible?RD:"",style:D},f.type==="custom"?jn(f.message,f):s?s(f):ke.createElement(JD,{toast:f,position:h}))}))},fc=Me;const dc=l.createContext({});function ty({children:t}){function e(r){switch(r.type){case"success":return fc.success(r.message,{style:{background:"#10B981",color:"#ffffff",padding:"12px 16px",fontSize:"14px",fontWeight:600},iconTheme:{primary:"#059669",secondary:"#ffffff"}});case"danger":return fc.error(r.message,{style:{background:"#E11D48",color:"#ffffff",padding:"12px 16px",fontSize:"14px",fontWeight:600},iconTheme:{primary:"#BE123C",secondary:"#ffffff"}})}}return p.jsxs(dc.Provider,{value:{showToast:e},children:[p.jsx(ey,{position:"top-right",containerStyle:{zIndex:999999999999999}}),t]})}function hc(){const t=l.useContext(dc);if(Object.entries(t).length===0)throw new Error("useToast must be used within a Provider");return t}const ry=["BadGateway","BadRequest","Conflict","Forbidden","NotFound","NotImplemented","ServerError","Unauthorized","UnprocessableEntity"],ny=["Created","Found","Success","Updated"];function sy(t){const{closeAll:e}=rc(),{showToast:r}=hc(),n=t==null?void 0:t.closeModal,s=t==null?void 0:t.message,i=t==null?void 0:t.name,a=t==null?void 0:t.type;l.useEffect(()=>{n&&e(),s&&(a==="success"&&r({message:s,type:"success"}),a==="danger"&&r({message:s,type:"danger"}),ry.includes(i)&&r({message:s,type:"danger"}),ny.includes(i)&&r({message:s,type:"success"}))},[t])}const gc=l.createContext({});function iy(t){const{children:e=!1}=t,[r,n]=l.useState([]);function s(u){return!!r.some(c=>c.key===u)}function i(u){var c;return(c=r.find(f=>f.key===u))==null?void 0:c.data}function a(u,c){const f=s(u);n(f?h=>[...h.filter(D=>D.key!==u),{key:u,data:c}]:[...r,{key:u,data:c}])}function o(u){n(r.filter(c=>c.key!==u))}return p.jsx(gc.Provider,{value:{drawerIsOpen:s,drawerData:i,openDrawer:a,closeDrawer:o},children:e})}function ay(t){const e=l.useContext(gc);if(Object.entries(e).length===0)throw new Error("useDrawer must be used within a Provider");if(t){const{drawerData:r,drawerIsOpen:n,openDrawer:s,closeDrawer:i}=e,a=n(t),o=r(t);return{drawerIsOpen:a,drawerData:o,openDrawer:f=>s(t,f),closeDrawer:()=>i(t)}}else return e}function oy(t,e=""){const r=new URLSearchParams(t),n=e?`${e}:`:"",s=i=>{Object.entries(i).forEach(([a,o])=>{o===void 0?r.delete(`${n}${a}`):r.set(`${n}${a}`,String(o))})};return{getParam:i=>r.get(`${n}${i}`),getScopedSearch:i=>{s(i);let a=r.toString();return a&&(a="?"+a),a}}}const uy=["places","marker","maps"];function ly(t){const{apiKey:e,children:r,preventFontsLoading:n=!0}=t,{isLoaded:s}=ea({googleMapsApiKey:e,libraries:uy,preventGoogleFontsLoading:n});return p.jsx(p.Fragment,{children:r(s)})}function pc(t){if(ie.isText(t)){let e=t==null?void 0:t.text;return t!=null&&t.bold&&(e=`<strong>${e}</strong>`),t!=null&&t.code&&(e=`<code>${e}</code>`),t!=null&&t.italic&&(e=`<em>${e}</em>`),t!=null&&t.underline&&(e=`<u>${e}</u>`),e}if(se.isElement(t)){const e=t.children.map(n=>pc(n)).join(""),r=t.align||"left";switch(t.type){case"image":return`<img src="${t.src}" class="align_${r}" />`;case"paragraph":return`<p class="align_${r}">${e}</p>`;case"blockQuote":return`<blockquote class="align_${r}">${e}</blockquote>`;case"bulletedList":return`<ul class="align_${r}">${e}</ul>`;case"headingOne":return`<h1 class="align_${r}">${e}</h1>`;case"headingTwo":return`<h2 class="align_${r}">${e}</h2>`;case"listItem":return`<li class="align_${r}">${e}</li>`;case"numberedList":return`<ol class="align_${r}">${e}</ol>`;default:return e}}return""}function ci(t){var n;if(typeof t=="string")return{text:t};const e=Array.isArray(t.props.children)?t.props.children.map(s=>ci(s)):[{text:t.props.children||""}],r=(n=t.props.className)==null?void 0:n.replace("align_","");switch(t.type){case"img":return{type:"image",align:r,src:t.props.src,children:[{text:""}]};case"p":return{type:"paragraph",align:r,children:e};case"blockquote":return{type:"blockQuote",align:r,children:e};case"ul":return{type:"bulletedList",align:r,children:e};case"ol":return{type:"numberedList",align:r,children:e};case"li":return{type:"listItem",align:r,children:e};case"h1":return{type:"headingOne",align:r,children:e};case"h2":return{type:"headingTwo",align:r,children:e};case"strong":return{text:t.props.children,bold:!0};case"code":return{text:t.props.children,code:!0};case"em":return{text:t.props.children,italic:!0};case"u":return{text:t.props.children,underline:!0};default:return{text:t.props.children||""}}}function cy(t){return t.map(e=>pc(e)).join("")}var vc={},fi={},di={},Qt={},hi={},gi={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0;var e;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(e=t.ElementType||(t.ElementType={}));function r(n){return n.type===e.Tag||n.type===e.Script||n.type===e.Style}t.isTag=r,t.Root=e.Root,t.Text=e.Text,t.Directive=e.Directive,t.Comment=e.Comment,t.Script=e.Script,t.Style=e.Style,t.Tag=e.Tag,t.CDATA=e.CDATA,t.Doctype=e.Doctype})(gi);var Ce={},Tt=Oe&&Oe.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),_r=Oe&&Oe.__assign||function(){return _r=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},_r.apply(this,arguments)};Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.cloneNode=Ce.hasChildren=Ce.isDocument=Ce.isDirective=Ce.isComment=Ce.isText=Ce.isCDATA=Ce.isTag=Ce.Element=Ce.Document=Ce.CDATA=Ce.NodeWithChildren=Ce.ProcessingInstruction=Ce.Comment=Ce.Text=Ce.DataNode=Ce.Node=void 0;var Re=gi,pi=function(){function t(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),t.prototype.cloneNode=function(e){return e===void 0&&(e=!1),vi(this,e)},t}();Ce.Node=pi;var Wn=function(t){Tt(e,t);function e(r){var n=t.call(this)||this;return n.data=r,n}return Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.data},set:function(r){this.data=r},enumerable:!1,configurable:!0}),e}(pi);Ce.DataNode=Wn;var mc=function(t){Tt(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=Re.ElementType.Text,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),e}(Wn);Ce.Text=mc;var Cc=function(t){Tt(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=Re.ElementType.Comment,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),e}(Wn);Ce.Comment=Cc;var Dc=function(t){Tt(e,t);function e(r,n){var s=t.call(this,n)||this;return s.name=r,s.type=Re.ElementType.Directive,s}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),e}(Wn);Ce.ProcessingInstruction=Dc;var Hn=function(t){Tt(e,t);function e(r){var n=t.call(this)||this;return n.children=r,n}return Object.defineProperty(e.prototype,"firstChild",{get:function(){var r;return(r=this.children[0])!==null&&r!==void 0?r:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),e}(pi);Ce.NodeWithChildren=Hn;var yc=function(t){Tt(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=Re.ElementType.CDATA,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),e}(Hn);Ce.CDATA=yc;var bc=function(t){Tt(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=Re.ElementType.Root,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),e}(Hn);Ce.Document=bc;var Ec=function(t){Tt(e,t);function e(r,n,s,i){s===void 0&&(s=[]),i===void 0&&(i=r==="script"?Re.ElementType.Script:r==="style"?Re.ElementType.Style:Re.ElementType.Tag);var a=t.call(this,s)||this;return a.name=r,a.attribs=n,a.type=i,a}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(n){var s,i;return{name:n,value:r.attribs[n],namespace:(s=r["x-attribsNamespace"])===null||s===void 0?void 0:s[n],prefix:(i=r["x-attribsPrefix"])===null||i===void 0?void 0:i[n]}})},enumerable:!1,configurable:!0}),e}(Hn);Ce.Element=Ec;function wc(t){return(0,Re.isTag)(t)}Ce.isTag=wc;function Bc(t){return t.type===Re.ElementType.CDATA}Ce.isCDATA=Bc;function Ac(t){return t.type===Re.ElementType.Text}Ce.isText=Ac;function Oc(t){return t.type===Re.ElementType.Comment}Ce.isComment=Oc;function Lc(t){return t.type===Re.ElementType.Directive}Ce.isDirective=Lc;function Sc(t){return t.type===Re.ElementType.Root}Ce.isDocument=Sc;function fy(t){return Object.prototype.hasOwnProperty.call(t,"children")}Ce.hasChildren=fy;function vi(t,e){e===void 0&&(e=!1);var r;if(Ac(t))r=new mc(t.data);else if(Oc(t))r=new Cc(t.data);else if(wc(t)){var n=e?mi(t.children):[],s=new Ec(t.name,_r({},t.attribs),n);n.forEach(function(u){return u.parent=s}),t.namespace!=null&&(s.namespace=t.namespace),t["x-attribsNamespace"]&&(s["x-attribsNamespace"]=_r({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(s["x-attribsPrefix"]=_r({},t["x-attribsPrefix"])),r=s}else if(Bc(t)){var n=e?mi(t.children):[],i=new yc(n);n.forEach(function(c){return c.parent=i}),r=i}else if(Sc(t)){var n=e?mi(t.children):[],a=new bc(n);n.forEach(function(c){return c.parent=a}),t["x-mode"]&&(a["x-mode"]=t["x-mode"]),r=a}else if(Lc(t)){var o=new Dc(t.name,t.data);t["x-name"]!=null&&(o["x-name"]=t["x-name"],o["x-publicId"]=t["x-publicId"],o["x-systemId"]=t["x-systemId"]),r=o}else throw new Error("Not implemented yet: ".concat(t.type));return r.startIndex=t.startIndex,r.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(r.sourceCodeLocation=t.sourceCodeLocation),r}Ce.cloneNode=vi;function mi(t){for(var e=t.map(function(n){return vi(n,!0)}),r=1;r<e.length;r++)e[r].prev=e[r-1],e[r-1].next=e[r];return e}(function(t){var e=Oe&&Oe.__createBinding||(Object.create?function(o,u,c,f){f===void 0&&(f=c);var h=Object.getOwnPropertyDescriptor(u,c);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(o,f,h)}:function(o,u,c,f){f===void 0&&(f=c),o[f]=u[c]}),r=Oe&&Oe.__exportStar||function(o,u){for(var c in o)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&e(u,o,c)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var n=gi,s=Ce;r(Ce,t);var i={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function o(u,c,f){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof c=="function"&&(f=c,c=i),typeof u=="object"&&(c=u,u=void 0),this.callback=u??null,this.options=c??i,this.elementCB=f??null}return o.prototype.onparserinit=function(u){this.parser=u},o.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},o.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},o.prototype.onerror=function(u){this.handleCallback(u)},o.prototype.onclosetag=function(){this.lastNode=null;var u=this.tagStack.pop();this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(u)},o.prototype.onopentag=function(u,c){var f=this.options.xmlMode?n.ElementType.Tag:void 0,h=new s.Element(u,c,void 0,f);this.addNode(h),this.tagStack.push(h)},o.prototype.ontext=function(u){var c=this.lastNode;if(c&&c.type===n.ElementType.Text)c.data+=u,this.options.withEndIndices&&(c.endIndex=this.parser.endIndex);else{var f=new s.Text(u);this.addNode(f),this.lastNode=f}},o.prototype.oncomment=function(u){if(this.lastNode&&this.lastNode.type===n.ElementType.Comment){this.lastNode.data+=u;return}var c=new s.Comment(u);this.addNode(c),this.lastNode=c},o.prototype.oncommentend=function(){this.lastNode=null},o.prototype.oncdatastart=function(){var u=new s.Text(""),c=new s.CDATA([u]);this.addNode(c),u.parent=c,this.lastNode=u},o.prototype.oncdataend=function(){this.lastNode=null},o.prototype.onprocessinginstruction=function(u,c){var f=new s.ProcessingInstruction(u,c);this.addNode(f)},o.prototype.handleCallback=function(u){if(typeof this.callback=="function")this.callback(u,this.dom);else if(u)throw u},o.prototype.addNode=function(u){var c=this.tagStack[this.tagStack.length-1],f=c.children[c.children.length-1];this.options.withStartIndices&&(u.startIndex=this.parser.startIndex),this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),c.children.push(u),f&&(u.prev=f,f.next=u),u.parent=c,this.lastNode=null},o}();t.DomHandler=a,t.default=a})(hi);var Fc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=t.CARRIAGE_RETURN_PLACEHOLDER=t.CARRIAGE_RETURN_REGEX=t.CARRIAGE_RETURN=t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.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"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,r){return e[r.toLowerCase()]=r,e},{}),t.CARRIAGE_RETURN="\r",t.CARRIAGE_RETURN_REGEX=new RegExp(t.CARRIAGE_RETURN,"g"),t.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(t.CARRIAGE_RETURN_PLACEHOLDER,"g")})(Fc),Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.formatAttributes=xc,Qt.escapeSpecialCharacters=gy,Qt.revertEscapedCharacters=Pc,Qt.formatDOM=Mc;var Vn=hi,Ur=Fc;function dy(t){return Ur.CASE_SENSITIVE_TAG_NAMES_MAP[t]}function xc(t){for(var e={},r=0,n=t.length;r<n;r++){var s=t[r];e[s.name]=s.value}return e}function hy(t){t=t.toLowerCase();var e=dy(t);return e||t}function gy(t){return t.replace(Ur.CARRIAGE_RETURN_REGEX,Ur.CARRIAGE_RETURN_PLACEHOLDER)}function Pc(t){return t.replace(Ur.CARRIAGE_RETURN_PLACEHOLDER_REGEX,Ur.CARRIAGE_RETURN)}function Mc(t,e,r){e===void 0&&(e=null);for(var n=[],s,i=0,a=t.length;i<a;i++){var o=t[i];switch(o.nodeType){case 1:{var u=hy(o.nodeName);s=new Vn.Element(u,xc(o.attributes)),s.children=Mc(u==="template"?o.content.childNodes:o.childNodes,s);break}case 3:s=new Vn.Text(Pc(o.nodeValue));break;case 8:s=new Vn.Comment(o.nodeValue);break;default:continue}var c=n[i-1]||null;c&&(c.next=s),s.parent=e,s.prev=c,s.next=null,n.push(s)}return r&&(s=new Vn.ProcessingInstruction(r.substring(0,r.indexOf(" ")).toLowerCase(),r),s.next=n[0]||null,s.parent=e,n.unshift(s),n[1]&&(n[1].prev=n[0])),n}Object.defineProperty(di,"__esModule",{value:!0}),di.default=Dy;var py=Qt,kc="html",Tc="head",qn="body",vy=/<([a-zA-Z]+[0-9]?)/,Nc=/<head[^]*>/i,Ic=/<body[^]*>/i,Gn=function(t,e){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},Ci=function(t,e){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},jc=typeof window=="object"&&window.DOMParser;if(typeof jc=="function"){var my=new jc,Cy="text/html";Ci=function(t,e){return e&&(t="<".concat(e,">").concat(t,"</").concat(e,">")),my.parseFromString(t,Cy)},Gn=Ci}if(typeof document=="object"&&document.implementation){var Zn=document.implementation.createHTMLDocument();Gn=function(t,e){if(e){var r=Zn.documentElement.querySelector(e);return r&&(r.innerHTML=t),Zn}return Zn.documentElement.innerHTML=t,Zn}}var Kn=typeof document=="object"&&document.createElement("template"),Di;Kn&&Kn.content&&(Di=function(t){return Kn.innerHTML=t,Kn.content.childNodes});function Dy(t){var e,r;t=(0,py.escapeSpecialCharacters)(t);var n=t.match(vy),s=n&&n[1]?n[1].toLowerCase():"";switch(s){case kc:{var i=Ci(t);if(!Nc.test(t)){var a=i.querySelector(Tc);(e=a==null?void 0:a.parentNode)===null||e===void 0||e.removeChild(a)}if(!Ic.test(t)){var a=i.querySelector(qn);(r=a==null?void 0:a.parentNode)===null||r===void 0||r.removeChild(a)}return i.querySelectorAll(kc)}case Tc:case qn:{var o=Gn(t).querySelectorAll(s);return Ic.test(t)&&Nc.test(t)?o[0].parentNode.childNodes:o}default:{if(Di)return Di(t);var a=Gn(t,qn).querySelector(qn);return a.childNodes}}}var yy=Oe&&Oe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fi,"__esModule",{value:!0}),fi.default=By;var by=yy(di),Ey=Qt,wy=/<(![a-zA-Z\s]+)>/;function By(t){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];var e=t.match(wy),r=e?e[1]:void 0;return(0,Ey.formatDOM)((0,by.default)(t),null,r)}var Xn={},lt={},Yn={},Ay=0;Yn.SAME=Ay;var Oy=1;Yn.CAMELCASE=Oy,Yn.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 zc=0,Nt=1,Jn=2,Qn=3,yi=4,_c=5,Uc=6;function Ly(t){return je.hasOwnProperty(t)?je[t]:null}function Ge(t,e,r,n,s,i,a){this.acceptsBooleans=e===Jn||e===Qn||e===yi,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=a}const je={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(t=>{je[t]=new Ge(t,zc,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([t,e])=>{je[t]=new Ge(t,Nt,!1,e,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(t=>{je[t]=new Ge(t,Jn,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(t=>{je[t]=new Ge(t,Jn,!1,t,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(t=>{je[t]=new Ge(t,Qn,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(t=>{je[t]=new Ge(t,Qn,!0,t,null,!1,!1)}),["capture","download"].forEach(t=>{je[t]=new Ge(t,yi,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(t=>{je[t]=new Ge(t,Uc,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(t=>{je[t]=new Ge(t,_c,!1,t.toLowerCase(),null,!1,!1)});const bi=/[\-\:]([a-z])/g,Ei=t=>t[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(t=>{const e=t.replace(bi,Ei);je[e]=new Ge(e,Nt,!1,t,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(t=>{const e=t.replace(bi,Ei);je[e]=new Ge(e,Nt,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(t=>{const e=t.replace(bi,Ei);je[e]=new Ge(e,Nt,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(t=>{je[t]=new Ge(t,Nt,!1,t.toLowerCase(),null,!1,!1)});const Sy="xlinkHref";je[Sy]=new Ge("xlinkHref",Nt,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(t=>{je[t]=new Ge(t,Nt,!1,t.toLowerCase(),null,!0,!0)});const{CAMELCASE:Fy,SAME:xy,possibleStandardNames:Wc}=Yn,Py=":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",My=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+Py+"]*$")),ky=Object.keys(Wc).reduce((t,e)=>{const r=Wc[e];return r===xy?t[e]=e:r===Fy?t[e.toLowerCase()]=e:t[e]=r,t},{});lt.BOOLEAN=Qn,lt.BOOLEANISH_STRING=Jn,lt.NUMERIC=_c,lt.OVERLOADED_BOOLEAN=yi,lt.POSITIVE_NUMERIC=Uc,lt.RESERVED=zc,lt.STRING=Nt,lt.getPropertyInfo=Ly,lt.isCustomAttribute=My,lt.possibleStandardNames=ky;var wi={},Bi={},Hc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ty=/\n/g,Ny=/^\s*/,Iy=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,jy=/^:\s*/,zy=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,_y=/^[;\s]*/,Uy=/^\s+|\s+$/g,Wy=`
|
|
219
|
+
`,Vc="/",qc="*",$t="",Hy="comment",Vy="declaration",qy=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var r=1,n=1;function s(v){var C=v.match(Ty);C&&(r+=C.length);var d=v.lastIndexOf(Wy);n=~d?v.length-d:n+v.length}function i(){var v={line:r,column:n};return function(C){return C.position=new a(v),c(),C}}function a(v){this.start=v,this.end={line:r,column:n},this.source=e.source}a.prototype.content=t;function o(v){var C=new Error(e.source+":"+r+":"+n+": "+v);if(C.reason=v,C.filename=e.source,C.line=r,C.column=n,C.source=t,!e.silent)throw C}function u(v){var C=v.exec(t);if(C){var d=C[0];return s(d),t=t.slice(d.length),C}}function c(){u(Ny)}function f(v){var C;for(v=v||[];C=h();)C!==!1&&v.push(C);return v}function h(){var v=i();if(!(Vc!=t.charAt(0)||qc!=t.charAt(1))){for(var C=2;$t!=t.charAt(C)&&(qc!=t.charAt(C)||Vc!=t.charAt(C+1));)++C;if(C+=2,$t===t.charAt(C-1))return o("End of comment missing");var d=t.slice(2,C-2);return n+=2,s(d),t=t.slice(C),n+=2,v({type:Hy,comment:d})}}function g(){var v=i(),C=u(Iy);if(C){if(h(),!u(jy))return o("property missing ':'");var d=u(zy),b=v({type:Vy,property:Gc(C[0].replace(Hc,$t)),value:d?Gc(d[0].replace(Hc,$t)):$t});return u(_y),b}}function D(){var v=[];f(v);for(var C;C=g();)C!==!1&&(v.push(C),f(v));return v}return c(),D()};function Gc(t){return t?t.replace(Uy,$t):$t}var Gy=Oe&&Oe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.default=Ky;var Zy=Gy(qy);function Ky(t,e){var r=null;if(!t||typeof t!="string")return r;var n=(0,Zy.default)(t),s=typeof e=="function";return n.forEach(function(i){if(i.type==="declaration"){var a=i.property,o=i.value;s?e(a,o,i):o&&(r=r||{},r[a]=o)}}),r}var $n={};Object.defineProperty($n,"__esModule",{value:!0}),$n.camelCase=void 0;var Xy=/^--[a-zA-Z0-9_-]+$/,Yy=/-([a-z])/g,Jy=/^[^-]+$/,Qy=/^-(webkit|moz|ms|o|khtml)-/,$y=/^-(ms)-/,Ry=function(t){return!t||Jy.test(t)||Xy.test(t)},eb=function(t,e){return e.toUpperCase()},Zc=function(t,e){return"".concat(e,"-")},tb=function(t,e){return e===void 0&&(e={}),Ry(t)?t:(t=t.toLowerCase(),e.reactCompat?t=t.replace($y,Zc):t=t.replace(Qy,Zc),t.replace(Yy,eb))};$n.camelCase=tb;var rb=Oe&&Oe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},nb=rb(Bi),sb=$n;function Ai(t,e){var r={};return!t||typeof t!="string"||(0,nb.default)(t,function(n,s){n&&s&&(r[(0,sb.camelCase)(n,e)]=s)}),r}Ai.default=Ai;var ib=Ai;(function(t){var e=Oe&&Oe.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=i,t.setStyleProp=o;var r=l,n=e(ib),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function i(f,h){return f.includes("-")?!s.has(f):!!(h&&typeof h.is=="string")}var a={reactCompat:!0};function o(f,h){if(typeof f=="string"){if(!f.trim()){h.style={};return}try{h.style=(0,n.default)(f,a)}catch{h.style={}}}}t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var u=function(f){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(f.name)};t.canTextBeChildOfNode=u;var c=function(f){return f};t.returnFirstArg=c})(wi),Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.default=lb;var Wr=lt,Kc=wi,ab=["checked","value"],ob=["input","select","textarea"],ub={reset:!0,submit:!0};function lb(t,e){t===void 0&&(t={});var r={},n=!!(t.type&&ub[t.type]);for(var s in t){var i=t[s];if((0,Wr.isCustomAttribute)(s)){r[s]=i;continue}var a=s.toLowerCase(),o=Xc(a);if(o){var u=(0,Wr.getPropertyInfo)(o);switch(ab.includes(o)&&ob.includes(e)&&!n&&(o=Xc("default"+a)),r[o]=i,u&&u.type){case Wr.BOOLEAN:r[o]=!0;break;case Wr.OVERLOADED_BOOLEAN:i===""&&(r[o]=!0);break}continue}Kc.PRESERVE_CUSTOM_ATTRIBUTES&&(r[s]=i)}return(0,Kc.setStyleProp)(t.style,r),r}function Xc(t){return Wr.possibleStandardNames[t]}var Oi={},cb=Oe&&Oe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.default=Yc;var Li=l,fb=cb(Xn),Hr=wi,db={cloneElement:Li.cloneElement,createElement:Li.createElement,isValidElement:Li.isValidElement};function Yc(t,e){e===void 0&&(e={});for(var r=[],n=typeof e.replace=="function",s=e.transform||Hr.returnFirstArg,i=e.library||db,a=i.cloneElement,o=i.createElement,u=i.isValidElement,c=t.length,f=0;f<c;f++){var h=t[f];if(n){var g=e.replace(h,f);if(u(g)){c>1&&(g=a(g,{key:g.key||f})),r.push(s(g,h,f));continue}}if(h.type==="text"){var D=!h.data.trim().length;if(D&&h.parent&&!(0,Hr.canTextBeChildOfNode)(h.parent)||e.trim&&D)continue;r.push(s(h.data,h,f));continue}var v=h,C={};hb(v)?((0,Hr.setStyleProp)(v.attribs.style,v.attribs),C=v.attribs):v.attribs&&(C=(0,fb.default)(v.attribs,v.name));var d=void 0;switch(h.type){case"script":case"style":h.children[0]&&(C.dangerouslySetInnerHTML={__html:h.children[0].data});break;case"tag":h.name==="textarea"&&h.children[0]?C.defaultValue=h.children[0].data:h.children&&h.children.length&&(d=Yc(h.children,e));break;default:continue}c>1&&(C.key=f),r.push(s(o(h.name,C,d),h,f))}return r.length===1?r[0]:r}function hb(t){return Hr.PRESERVE_CUSTOM_ATTRIBUTES&&t.type==="tag"&&(0,Hr.isCustomComponent)(t.name,t.attribs)}(function(t){var e=Oe&&Oe.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=o;var r=e(fi);t.htmlToDOM=r.default;var n=e(Xn);t.attributesToProps=n.default;var s=e(Oi);t.domToReact=s.default;var i=hi;Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return i.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return i.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return i.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return i.Text}});var a={lowerCaseAttributeNames:!1};function o(u,c){if(typeof u!="string")throw new TypeError("First argument must be a string");return u?(0,s.default)((0,r.default)(u,(c==null?void 0:c.htmlparser2)||a),c):[]}})(vc);const Jc=on(vc),gb=Jc.default||Jc;function pb(t){const e=gb(t);return Array.isArray(e)?e.map(r=>typeof r=="string"?{text:r}:ci(r)):typeof e=="string"?[{text:e}]:[ci(e)]}te.AlertContainer=nf,te.AlertContent=sf,te.AlertDescription=af,te.AlertIcon=of,te.AlertTitle=Pi,te.AudioPlayer=Ni,te.AudioUpload=ff,te.Badge=df,te.Button=pt,te.CardTabButton=pf,te.CardTabContainer=vf,te.Checkbox=mf,te.ClientOnly=Df,te.CurrencyInput=yf,te.Divider=Gr,te.DrawerContainer=Bf,te.DrawerHeader=Af,te.DrawerProvider=iy,te.FieldError=Je,te.FieldLabel=Ue,te.FieldWrapper=We,te.FileUpload=Sf,te.FormProvider=uf,te.IconButton=Zr,te.ImageUpload=Wi,te.Input=vr,te.MapView=mh,te.MaskedInput=Dh,te.ModalContainer=Bo,te.ModalFooter=Ao,te.ModalHeader=Oo,te.ModalProvider=dD,te.MultiSelect=xh,te.Pagination=kh,te.PhoneInput=qh,te.PlacesProvider=ly,te.Popover=Gh,te.RadioBox=Xh,te.RadioGroup=Yh,te.RichText=Y0,te.SearchPlaces=J0,te.Select=sD,te.Slider=Ti,te.Switch=iD,te.TabButton=ai,te.TabContainer=Ql,te.TableBody=aD,te.TableCaption=oD,te.TableContainer=uD,te.TableFooter=lD,te.TableHeader=cD,te.Textarea=fD,te.ToastProvider=ty,te.Tooltip=Kr,te.toHtml=cy,te.toRichTextValue=pb,te.useAutomation=sy,te.useDrawer=ay,te.useForm=Ye,te.useHydrated=zi,te.useModal=rc,te.useScopedParams=oy,te.useScrollLock=jt,te.useSlider=ki,te.useToast=hc,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
|