@arkyn/components 1.3.90 → 1.3.91
Sign up to get free protection for your applications and to get access to all the features.
package/dist/bundle.js
CHANGED
@@ -5540,17 +5540,17 @@ function td(t) {
|
|
5540
5540
|
className: s = "",
|
5541
5541
|
onCheck: a,
|
5542
5542
|
...l
|
5543
|
-
} = t, [u, d] = M(n), { id: f, inputRef: c } = tt();
|
5544
|
-
function
|
5545
|
-
d(!u), a && a(
|
5543
|
+
} = t, [u, d] = M(n), { id: f, inputRef: c } = tt(), p = typeof o == "boolean" ? o : u;
|
5544
|
+
function w() {
|
5545
|
+
d(!u), a && a(p ? "" : r || "checked");
|
5546
5546
|
}
|
5547
|
-
const
|
5547
|
+
const C = `arkynSwitch ${p ? "checkedTrue" : "checkedFalse"} ${e} ${s}`;
|
5548
5548
|
return /* @__PURE__ */ y.jsx(
|
5549
5549
|
"button",
|
5550
5550
|
{
|
5551
5551
|
id: f,
|
5552
5552
|
type: "button",
|
5553
|
-
onClick:
|
5553
|
+
onClick: w,
|
5554
5554
|
className: C,
|
5555
5555
|
...l,
|
5556
5556
|
children: /* @__PURE__ */ y.jsx(
|
@@ -5559,7 +5559,7 @@ function td(t) {
|
|
5559
5559
|
type: "hidden",
|
5560
5560
|
name: i,
|
5561
5561
|
ref: c,
|
5562
|
-
value:
|
5562
|
+
value: p ? r || "checked" : ""
|
5563
5563
|
}
|
5564
5564
|
)
|
5565
5565
|
}
|
package/dist/bundle.umd.cjs
CHANGED
@@ -68,7 +68,7 @@ React keys must be passed directly to JSX without using spread:
|
|
68
68
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
69
69
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
70
70
|
<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
|
71
|
-
</svg>`,l=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(Ze.isAdvancedMarkerAvailable(r)){const p=new DOMParser().parseFromString(a,"image/svg+xml").documentElement;p.setAttribute("transform","translate(0 25)");const d={map:r,position:n,zIndex:u,title:l,content:p};return new google.maps.marker.AdvancedMarkerElement(d)}const c={position:n,zIndex:u,title:l,icon:{url:`data:image/svg+xml;base64,${btoa(a)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}function Bs(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Tn{constructor(){Bs(Tn,google.maps.OverlayView)}}var Dt;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Dt||(Dt={}));const $s=(t,e,n)=>{n.fitBounds(e.bounds)};class As extends Tn{constructor({map:e,markers:n=[],algorithmOptions:o={},algorithm:r=new Ds(o),renderer:s=new Ns,onClusterClick:a=$s}){super(),this.markers=[...n],this.clusters=[],this.algorithm=r,this.renderer=s,this.onClusterClick=a,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(o=>{this.addMarker(o,!0)}),n||this.render()}removeMarker(e,n){const o=this.markers.indexOf(e);return o===-1?!1:(Ze.setMap(e,null),this.markers.splice(o,1),n||this.render(),!0)}removeMarkers(e,n){let o=!1;return e.forEach(r=>{o=this.removeMarker(r,!0)||o}),o&&!n&&this.render(),o}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Dt.CLUSTERING_BEGIN,this);const{clusters:n,changed:o}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(o||o==null){const r=new Set;for(const a of n)a.markers.length==1&&r.add(a.markers[0]);const s=[];for(const a of this.clusters)a.marker!=null&&(a.markers.length==1?r.has(a.marker)||Ze.setMap(a.marker,null):s.push(a.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>s.forEach(a=>Ze.setMap(a,null)))}google.maps.event.trigger(this,Dt.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>Ze.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new js(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(o=>{o.markers.length===1?o.marker=o.markers[0]:(o.marker=this.renderer.render(o,e,n),o.markers.forEach(r=>Ze.setMap(r,null)),this.onClusterClick&&o.marker.addListener("click",r=>{google.maps.event.trigger(this,Dt.CLUSTER_CLICK,o),this.onClusterClick(r,o,n)})),Ze.setMap(o.marker,n)})}}function zs(t){var e=qi(),n=i.useState(null),o=n[0],r=n[1];return i.useEffect(function(){if(e&&o===null){var s=new As(ee(ee({},t),{map:e}));r(s)}},[e]),o}function Us(t){var e=t.children,n=t.options,o=zs(n);return o!==null?e(o):null}i.memo(Us);var Uo={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Fo={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function Fs(t){var e=t.children,n=t.anchor,o=t.options,r=t.position,s=t.zIndex,a=t.onCloseClick,l=t.onDomReady,u=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,p=t.onLoad,d=t.onUnmount,h=i.useContext(ue),E=i.useState(null),m=E[0],C=E[1],x=i.useState(null),O=x[0],w=x[1],I=i.useState(null),v=I[0],b=I[1],M=i.useState(null),P=M[0],U=M[1],T=i.useState(null),z=T[0],X=T[1],A=i.useState(null),F=A[0],V=A[1],H=i.useRef(null);return i.useEffect(function(){m!==null&&(m.close(),n?m.open(h,n):m.getPosition()&&m.open(h))},[h,m,n]),i.useEffect(function(){o&&m!==null&&m.setOptions(o)},[m,o]),i.useEffect(function(){r&&m!==null&&m.setPosition(r)},[r]),i.useEffect(function(){typeof s=="number"&&m!==null&&m.setZIndex(s)},[s]),i.useEffect(function(){m&&a&&(O!==null&&google.maps.event.removeListener(O),w(google.maps.event.addListener(m,"closeclick",a)))},[a]),i.useEffect(function(){m&&l&&(v!==null&&google.maps.event.removeListener(v),b(google.maps.event.addListener(m,"domready",l)))},[l]),i.useEffect(function(){m&&u&&(P!==null&&google.maps.event.removeListener(P),U(google.maps.event.addListener(m,"content_changed",u)))},[u]),i.useEffect(function(){m&&c&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(m,"position_changed",c)))},[c]),i.useEffect(function(){m&&f&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(m,"zindex_changed",f)))},[f]),i.useEffect(function(){var $=new google.maps.InfoWindow(ee({},o||{}));return C($),H.current=document.createElement("div"),a&&w(google.maps.event.addListener($,"closeclick",a)),l&&b(google.maps.event.addListener($,"domready",l)),u&&U(google.maps.event.addListener($,"content_changed",u)),c&&X(google.maps.event.addListener($,"position_changed",c)),f&&V(google.maps.event.addListener($,"zindex_changed",f)),$.setContent(H.current),r&&$.setPosition(r),s&&$.setZIndex(s),n?$.open(h,n):$.getPosition()?$.open(h):$e(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),p&&p($),function(){O&&google.maps.event.removeListener(O),P&&google.maps.event.removeListener(P),v&&google.maps.event.removeListener(v),z&&google.maps.event.removeListener(z),F&&google.maps.event.removeListener(F),d&&d($),$.close()}},[]),H.current?pt.createPortal(i.Children.only(e),H.current):null}i.memo(Fs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(o,r){r?o.open(n.context,r):o.getPosition()?o.open(n.context):$e(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(ee({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=fe({updaterMap:Fo,eventMap:Uo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Fo,eventMap:Uo,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(pe(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?pt.createPortal(i.Children.only(this.props.children),this.containerElement):null},e.contextType=ue,e}(i.PureComponent);var Ho={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Wo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},Hs={};function Ws(t){var e=t.options,n=t.draggable,o=t.editable,r=t.visible,s=t.path,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,p=t.onMouseOut,d=t.onMouseOver,h=t.onMouseUp,E=t.onRightClick,m=t.onClick,C=t.onDrag,x=t.onLoad,O=t.onUnmount,w=i.useContext(ue),I=i.useState(null),v=I[0],b=I[1],M=i.useState(null),P=M[0],U=M[1],T=i.useState(null),z=T[0],X=T[1],A=i.useState(null),F=A[0],V=A[1],H=i.useState(null),$=H[0],W=H[1],Q=i.useState(null),k=Q[0],S=Q[1],D=i.useState(null),_=D[0],B=D[1],Y=i.useState(null),L=Y[0],q=Y[1],K=i.useState(null),R=K[0],G=K[1],oe=i.useState(null),j=oe[0],ce=oe[1],Ce=i.useState(null),me=Ce[0],he=Ce[1],Te=i.useState(null),Me=Te[0],le=Te[1];return i.useEffect(function(){v!==null&&v.setMap(w)},[w]),i.useEffect(function(){typeof e<"u"&&v!==null&&v.setOptions(e)},[v,e]),i.useEffect(function(){typeof n<"u"&&v!==null&&v.setDraggable(n)},[v,n]),i.useEffect(function(){typeof o<"u"&&v!==null&&v.setEditable(o)},[v,o]),i.useEffect(function(){typeof r<"u"&&v!==null&&v.setVisible(r)},[v,r]),i.useEffect(function(){typeof s<"u"&&v!==null&&v.setPath(s)},[v,s]),i.useEffect(function(){v&&a&&(P!==null&&google.maps.event.removeListener(P),U(google.maps.event.addListener(v,"dblclick",a)))},[a]),i.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(v,"dragend",l)))},[l]),i.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(v,"dragstart",u)))},[u]),i.useEffect(function(){v&&c&&($!==null&&google.maps.event.removeListener($),W(google.maps.event.addListener(v,"mousedown",c)))},[c]),i.useEffect(function(){v&&f&&(k!==null&&google.maps.event.removeListener(k),S(google.maps.event.addListener(v,"mousemove",f)))},[f]),i.useEffect(function(){v&&p&&(_!==null&&google.maps.event.removeListener(_),B(google.maps.event.addListener(v,"mouseout",p)))},[p]),i.useEffect(function(){v&&d&&(L!==null&&google.maps.event.removeListener(L),q(google.maps.event.addListener(v,"mouseover",d)))},[d]),i.useEffect(function(){v&&h&&(R!==null&&google.maps.event.removeListener(R),G(google.maps.event.addListener(v,"mouseup",h)))},[h]),i.useEffect(function(){v&&E&&(j!==null&&google.maps.event.removeListener(j),ce(google.maps.event.addListener(v,"rightclick",E)))},[E]),i.useEffect(function(){v&&m&&(me!==null&&google.maps.event.removeListener(me),he(google.maps.event.addListener(v,"click",m)))},[m]),i.useEffect(function(){v&&C&&(Me!==null&&google.maps.event.removeListener(Me),le(google.maps.event.addListener(v,"drag",C)))},[C]),i.useEffect(function(){var re=new google.maps.Polyline(ee(ee({},e||Hs),{map:w}));return s&&re.setPath(s),typeof r<"u"&&re.setVisible(r),typeof o<"u"&&re.setEditable(o),typeof n<"u"&&re.setDraggable(n),a&&U(google.maps.event.addListener(re,"dblclick",a)),l&&X(google.maps.event.addListener(re,"dragend",l)),u&&V(google.maps.event.addListener(re,"dragstart",u)),c&&W(google.maps.event.addListener(re,"mousedown",c)),f&&S(google.maps.event.addListener(re,"mousemove",f)),p&&B(google.maps.event.addListener(re,"mouseout",p)),d&&q(google.maps.event.addListener(re,"mouseover",d)),h&&G(google.maps.event.addListener(re,"mouseup",h)),E&&ce(google.maps.event.addListener(re,"rightclick",E)),m&&he(google.maps.event.addListener(re,"click",m)),C&&le(google.maps.event.addListener(re,"drag",C)),b(re),x&&x(re),function(){P!==null&&google.maps.event.removeListener(P),z!==null&&google.maps.event.removeListener(z),F!==null&&google.maps.event.removeListener(F),$!==null&&google.maps.event.removeListener($),k!==null&&google.maps.event.removeListener(k),_!==null&&google.maps.event.removeListener(_),L!==null&&google.maps.event.removeListener(L),R!==null&&google.maps.event.removeListener(R),j!==null&&google.maps.event.removeListener(j),me!==null&&google.maps.event.removeListener(me),O&&O(re),re.setMap(null)}},[]),null}i.memo(Ws),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Wo,eventMap:Ho,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Wo,eventMap:Ho,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),pe(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Vo={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Zo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function Vs(t){var e=t.options,n=t.draggable,o=t.editable,r=t.visible,s=t.path,a=t.paths,l=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,p=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,E=t.onMouseUp,m=t.onRightClick,C=t.onClick,x=t.onDrag,O=t.onLoad,w=t.onUnmount,I=t.onEdit,v=i.useContext(ue),b=i.useState(null),M=b[0],P=b[1],U=i.useState(null),T=U[0],z=U[1],X=i.useState(null),A=X[0],F=X[1],V=i.useState(null),H=V[0],$=V[1],W=i.useState(null),Q=W[0],k=W[1],S=i.useState(null),D=S[0],_=S[1],B=i.useState(null),Y=B[0],L=B[1],q=i.useState(null),K=q[0],R=q[1],G=i.useState(null),oe=G[0],j=G[1],ce=i.useState(null),Ce=ce[0],me=ce[1],he=i.useState(null),Te=he[0],Me=he[1],le=i.useState(null),re=le[0],Ne=le[1];return i.useEffect(function(){M!==null&&M.setMap(v)},[v]),i.useEffect(function(){typeof e<"u"&&M!==null&&M.setOptions(e)},[M,e]),i.useEffect(function(){typeof n<"u"&&M!==null&&M.setDraggable(n)},[M,n]),i.useEffect(function(){typeof o<"u"&&M!==null&&M.setEditable(o)},[M,o]),i.useEffect(function(){typeof r<"u"&&M!==null&&M.setVisible(r)},[M,r]),i.useEffect(function(){typeof s<"u"&&M!==null&&M.setPath(s)},[M,s]),i.useEffect(function(){typeof a<"u"&&M!==null&&M.setPaths(a)},[M,a]),i.useEffect(function(){M&&l&&(T!==null&&google.maps.event.removeListener(T),z(google.maps.event.addListener(M,"dblclick",l)))},[l]),i.useEffect(function(){M&&(google.maps.event.addListener(M.getPath(),"insert_at",function(){I==null||I(M)}),google.maps.event.addListener(M.getPath(),"set_at",function(){I==null||I(M)}))},[M,I]),i.useEffect(function(){M&&u&&(A!==null&&google.maps.event.removeListener(A),F(google.maps.event.addListener(M,"dragend",u)))},[u]),i.useEffect(function(){M&&c&&(H!==null&&google.maps.event.removeListener(H),$(google.maps.event.addListener(M,"dragstart",c)))},[c]),i.useEffect(function(){M&&f&&(Q!==null&&google.maps.event.removeListener(Q),k(google.maps.event.addListener(M,"mousedown",f)))},[f]),i.useEffect(function(){M&&p&&(D!==null&&google.maps.event.removeListener(D),_(google.maps.event.addListener(M,"mousemove",p)))},[p]),i.useEffect(function(){M&&d&&(Y!==null&&google.maps.event.removeListener(Y),L(google.maps.event.addListener(M,"mouseout",d)))},[d]),i.useEffect(function(){M&&h&&(K!==null&&google.maps.event.removeListener(K),R(google.maps.event.addListener(M,"mouseover",h)))},[h]),i.useEffect(function(){M&&E&&(oe!==null&&google.maps.event.removeListener(oe),j(google.maps.event.addListener(M,"mouseup",E)))},[E]),i.useEffect(function(){M&&m&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(M,"rightclick",m)))},[m]),i.useEffect(function(){M&&C&&(Te!==null&&google.maps.event.removeListener(Te),Me(google.maps.event.addListener(M,"click",C)))},[C]),i.useEffect(function(){M&&x&&(re!==null&&google.maps.event.removeListener(re),Ne(google.maps.event.addListener(M,"drag",x)))},[x]),i.useEffect(function(){var ae=new google.maps.Polygon(ee(ee({},e||{}),{map:v}));return s&&ae.setPath(s),a&&ae.setPaths(a),typeof r<"u"&&ae.setVisible(r),typeof o<"u"&&ae.setEditable(o),typeof n<"u"&&ae.setDraggable(n),l&&z(google.maps.event.addListener(ae,"dblclick",l)),u&&F(google.maps.event.addListener(ae,"dragend",u)),c&&$(google.maps.event.addListener(ae,"dragstart",c)),f&&k(google.maps.event.addListener(ae,"mousedown",f)),p&&_(google.maps.event.addListener(ae,"mousemove",p)),d&&L(google.maps.event.addListener(ae,"mouseout",d)),h&&R(google.maps.event.addListener(ae,"mouseover",h)),E&&j(google.maps.event.addListener(ae,"mouseup",E)),m&&me(google.maps.event.addListener(ae,"rightclick",m)),C&&Me(google.maps.event.addListener(ae,"click",C)),x&&Ne(google.maps.event.addListener(ae,"drag",x)),P(ae),O&&O(ae),function(){T!==null&&google.maps.event.removeListener(T),A!==null&&google.maps.event.removeListener(A),H!==null&&google.maps.event.removeListener(H),Q!==null&&google.maps.event.removeListener(Q),D!==null&&google.maps.event.removeListener(D),Y!==null&&google.maps.event.removeListener(Y),K!==null&&google.maps.event.removeListener(K),oe!==null&&google.maps.event.removeListener(oe),Ce!==null&&google.maps.event.removeListener(Ce),Te!==null&&google.maps.event.removeListener(Te),w&&w(ae),ae.setMap(null)}},[]),null}i.memo(Vs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Zo,eventMap:Vo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Zo,eventMap:Vo,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),pe(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Yo={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Go={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function Zs(t){var e=t.options,n=t.bounds,o=t.draggable,r=t.editable,s=t.visible,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,p=t.onMouseOut,d=t.onMouseOver,h=t.onMouseUp,E=t.onRightClick,m=t.onClick,C=t.onDrag,x=t.onBoundsChanged,O=t.onLoad,w=t.onUnmount,I=i.useContext(ue),v=i.useState(null),b=v[0],M=v[1],P=i.useState(null),U=P[0],T=P[1],z=i.useState(null),X=z[0],A=z[1],F=i.useState(null),V=F[0],H=F[1],$=i.useState(null),W=$[0],Q=$[1],k=i.useState(null),S=k[0],D=k[1],_=i.useState(null),B=_[0],Y=_[1],L=i.useState(null),q=L[0],K=L[1],R=i.useState(null),G=R[0],oe=R[1],j=i.useState(null),ce=j[0],Ce=j[1],me=i.useState(null),he=me[0],Te=me[1],Me=i.useState(null),le=Me[0],re=Me[1],Ne=i.useState(null),ae=Ne[0],Ae=Ne[1];return i.useEffect(function(){b!==null&&b.setMap(I)},[I]),i.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),i.useEffect(function(){typeof o<"u"&&b!==null&&b.setDraggable(o)},[b,o]),i.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),i.useEffect(function(){typeof s<"u"&&b!==null&&b.setVisible(s)},[b,s]),i.useEffect(function(){typeof n<"u"&&b!==null&&b.setBounds(n)},[b,n]),i.useEffect(function(){b&&a&&(U!==null&&google.maps.event.removeListener(U),T(google.maps.event.addListener(b,"dblclick",a)))},[a]),i.useEffect(function(){b&&l&&(X!==null&&google.maps.event.removeListener(X),A(google.maps.event.addListener(b,"dragend",l)))},[l]),i.useEffect(function(){b&&u&&(V!==null&&google.maps.event.removeListener(V),H(google.maps.event.addListener(b,"dragstart",u)))},[u]),i.useEffect(function(){b&&c&&(W!==null&&google.maps.event.removeListener(W),Q(google.maps.event.addListener(b,"mousedown",c)))},[c]),i.useEffect(function(){b&&f&&(S!==null&&google.maps.event.removeListener(S),D(google.maps.event.addListener(b,"mousemove",f)))},[f]),i.useEffect(function(){b&&p&&(B!==null&&google.maps.event.removeListener(B),Y(google.maps.event.addListener(b,"mouseout",p)))},[p]),i.useEffect(function(){b&&d&&(q!==null&&google.maps.event.removeListener(q),K(google.maps.event.addListener(b,"mouseover",d)))},[d]),i.useEffect(function(){b&&h&&(G!==null&&google.maps.event.removeListener(G),oe(google.maps.event.addListener(b,"mouseup",h)))},[h]),i.useEffect(function(){b&&E&&(ce!==null&&google.maps.event.removeListener(ce),Ce(google.maps.event.addListener(b,"rightclick",E)))},[E]),i.useEffect(function(){b&&m&&(he!==null&&google.maps.event.removeListener(he),Te(google.maps.event.addListener(b,"click",m)))},[m]),i.useEffect(function(){b&&C&&(le!==null&&google.maps.event.removeListener(le),re(google.maps.event.addListener(b,"drag",C)))},[C]),i.useEffect(function(){b&&x&&(ae!==null&&google.maps.event.removeListener(ae),Ae(google.maps.event.addListener(b,"bounds_changed",x)))},[x]),i.useEffect(function(){var te=new google.maps.Rectangle(ee(ee({},e||{}),{map:I}));return typeof s<"u"&&te.setVisible(s),typeof r<"u"&&te.setEditable(r),typeof o<"u"&&te.setDraggable(o),typeof n<"u"&&te.setBounds(n),a&&T(google.maps.event.addListener(te,"dblclick",a)),l&&A(google.maps.event.addListener(te,"dragend",l)),u&&H(google.maps.event.addListener(te,"dragstart",u)),c&&Q(google.maps.event.addListener(te,"mousedown",c)),f&&D(google.maps.event.addListener(te,"mousemove",f)),p&&Y(google.maps.event.addListener(te,"mouseout",p)),d&&K(google.maps.event.addListener(te,"mouseover",d)),h&&oe(google.maps.event.addListener(te,"mouseup",h)),E&&Ce(google.maps.event.addListener(te,"rightclick",E)),m&&Te(google.maps.event.addListener(te,"click",m)),C&&re(google.maps.event.addListener(te,"drag",C)),x&&Ae(google.maps.event.addListener(te,"bounds_changed",x)),M(te),O&&O(te),function(){U!==null&&google.maps.event.removeListener(U),X!==null&&google.maps.event.removeListener(X),V!==null&&google.maps.event.removeListener(V),W!==null&&google.maps.event.removeListener(W),S!==null&&google.maps.event.removeListener(S),B!==null&&google.maps.event.removeListener(B),q!==null&&google.maps.event.removeListener(q),G!==null&&google.maps.event.removeListener(G),ce!==null&&google.maps.event.removeListener(ce),he!==null&&google.maps.event.removeListener(he),le!==null&&google.maps.event.removeListener(le),ae!==null&&google.maps.event.removeListener(ae),w&&w(te),te.setMap(null)}},[]),null}i.memo(Zs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Go,eventMap:Yo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Go,eventMap:Yo,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),pe(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var qo={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Ko={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},Ys={};function Gs(t){var e=t.options,n=t.center,o=t.radius,r=t.draggable,s=t.editable,a=t.visible,l=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,p=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,E=t.onMouseUp,m=t.onRightClick,C=t.onClick,x=t.onDrag,O=t.onCenterChanged,w=t.onRadiusChanged,I=t.onLoad,v=t.onUnmount,b=i.useContext(ue),M=i.useState(null),P=M[0],U=M[1],T=i.useState(null),z=T[0],X=T[1],A=i.useState(null),F=A[0],V=A[1],H=i.useState(null),$=H[0],W=H[1],Q=i.useState(null),k=Q[0],S=Q[1],D=i.useState(null),_=D[0],B=D[1],Y=i.useState(null),L=Y[0],q=Y[1],K=i.useState(null),R=K[0],G=K[1],oe=i.useState(null),j=oe[0],ce=oe[1],Ce=i.useState(null),me=Ce[0],he=Ce[1],Te=i.useState(null),Me=Te[0],le=Te[1],re=i.useState(null),Ne=re[0],ae=re[1],Ae=i.useState(null),te=Ae[0],We=Ae[1],Xe=i.useState(null),Be=Xe[0],tt=Xe[1];return i.useEffect(function(){P!==null&&P.setMap(b)},[b]),i.useEffect(function(){typeof e<"u"&&P!==null&&P.setOptions(e)},[P,e]),i.useEffect(function(){typeof r<"u"&&P!==null&&P.setDraggable(r)},[P,r]),i.useEffect(function(){typeof s<"u"&&P!==null&&P.setEditable(s)},[P,s]),i.useEffect(function(){typeof a<"u"&&P!==null&&P.setVisible(a)},[P,a]),i.useEffect(function(){typeof o=="number"&&P!==null&&P.setRadius(o)},[P,o]),i.useEffect(function(){typeof n<"u"&&P!==null&&P.setCenter(n)},[P,n]),i.useEffect(function(){P&&l&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(P,"dblclick",l)))},[l]),i.useEffect(function(){P&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(P,"dragend",u)))},[u]),i.useEffect(function(){P&&c&&($!==null&&google.maps.event.removeListener($),W(google.maps.event.addListener(P,"dragstart",c)))},[c]),i.useEffect(function(){P&&f&&(k!==null&&google.maps.event.removeListener(k),S(google.maps.event.addListener(P,"mousedown",f)))},[f]),i.useEffect(function(){P&&p&&(_!==null&&google.maps.event.removeListener(_),B(google.maps.event.addListener(P,"mousemove",p)))},[p]),i.useEffect(function(){P&&d&&(L!==null&&google.maps.event.removeListener(L),q(google.maps.event.addListener(P,"mouseout",d)))},[d]),i.useEffect(function(){P&&h&&(R!==null&&google.maps.event.removeListener(R),G(google.maps.event.addListener(P,"mouseover",h)))},[h]),i.useEffect(function(){P&&E&&(j!==null&&google.maps.event.removeListener(j),ce(google.maps.event.addListener(P,"mouseup",E)))},[E]),i.useEffect(function(){P&&m&&(me!==null&&google.maps.event.removeListener(me),he(google.maps.event.addListener(P,"rightclick",m)))},[m]),i.useEffect(function(){P&&C&&(Me!==null&&google.maps.event.removeListener(Me),le(google.maps.event.addListener(P,"click",C)))},[C]),i.useEffect(function(){P&&x&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(P,"drag",x)))},[x]),i.useEffect(function(){P&&O&&(te!==null&&google.maps.event.removeListener(te),We(google.maps.event.addListener(P,"center_changed",O)))},[C]),i.useEffect(function(){P&&w&&(Be!==null&&google.maps.event.removeListener(Be),tt(google.maps.event.addListener(P,"radius_changed",w)))},[w]),i.useEffect(function(){var ve=new google.maps.Circle(ee(ee({},e||Ys),{map:b}));return typeof o=="number"&&ve.setRadius(o),typeof n<"u"&&ve.setCenter(n),typeof o=="number"&&ve.setRadius(o),typeof a<"u"&&ve.setVisible(a),typeof s<"u"&&ve.setEditable(s),typeof r<"u"&&ve.setDraggable(r),l&&X(google.maps.event.addListener(ve,"dblclick",l)),u&&V(google.maps.event.addListener(ve,"dragend",u)),c&&W(google.maps.event.addListener(ve,"dragstart",c)),f&&S(google.maps.event.addListener(ve,"mousedown",f)),p&&B(google.maps.event.addListener(ve,"mousemove",p)),d&&q(google.maps.event.addListener(ve,"mouseout",d)),h&&G(google.maps.event.addListener(ve,"mouseover",h)),E&&ce(google.maps.event.addListener(ve,"mouseup",E)),m&&he(google.maps.event.addListener(ve,"rightclick",m)),C&&le(google.maps.event.addListener(ve,"click",C)),x&&ae(google.maps.event.addListener(ve,"drag",x)),O&&We(google.maps.event.addListener(ve,"center_changed",O)),w&&tt(google.maps.event.addListener(ve,"radius_changed",w)),U(ve),I&&I(ve),function(){z!==null&&google.maps.event.removeListener(z),F!==null&&google.maps.event.removeListener(F),$!==null&&google.maps.event.removeListener($),k!==null&&google.maps.event.removeListener(k),_!==null&&google.maps.event.removeListener(_),L!==null&&google.maps.event.removeListener(L),R!==null&&google.maps.event.removeListener(R),j!==null&&google.maps.event.removeListener(j),me!==null&&google.maps.event.removeListener(me),Me!==null&&google.maps.event.removeListener(Me),te!==null&&google.maps.event.removeListener(te),Be!==null&&google.maps.event.removeListener(Be),v&&v(ve),ve.setMap(null)}},[]),null}i.memo(Gs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Ko,eventMap:qo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Ko,eventMap:qo,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),pe(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Xo={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Jo={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,o){t.loadGeoJson(e,n,o)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function qs(t){var e=t.options,n=t.onClick,o=t.onDblClick,r=t.onMouseDown,s=t.onMouseMove,a=t.onMouseOut,l=t.onMouseOver,u=t.onMouseUp,c=t.onRightClick,f=t.onAddFeature,p=t.onRemoveFeature,d=t.onRemoveProperty,h=t.onSetGeometry,E=t.onSetProperty,m=t.onLoad,C=t.onUnmount,x=i.useContext(ue),O=i.useState(null),w=O[0],I=O[1],v=i.useState(null),b=v[0],M=v[1],P=i.useState(null),U=P[0],T=P[1],z=i.useState(null),X=z[0],A=z[1],F=i.useState(null),V=F[0],H=F[1],$=i.useState(null),W=$[0],Q=$[1],k=i.useState(null),S=k[0],D=k[1],_=i.useState(null),B=_[0],Y=_[1],L=i.useState(null),q=L[0],K=L[1],R=i.useState(null),G=R[0],oe=R[1],j=i.useState(null),ce=j[0],Ce=j[1],me=i.useState(null),he=me[0],Te=me[1],Me=i.useState(null),le=Me[0],re=Me[1],Ne=i.useState(null),ae=Ne[0],Ae=Ne[1];return i.useEffect(function(){w!==null&&w.setMap(x)},[x]),i.useEffect(function(){w&&o&&(b!==null&&google.maps.event.removeListener(b),M(google.maps.event.addListener(w,"dblclick",o)))},[o]),i.useEffect(function(){w&&r&&(U!==null&&google.maps.event.removeListener(U),T(google.maps.event.addListener(w,"mousedown",r)))},[r]),i.useEffect(function(){w&&s&&(X!==null&&google.maps.event.removeListener(X),A(google.maps.event.addListener(w,"mousemove",s)))},[s]),i.useEffect(function(){w&&a&&(V!==null&&google.maps.event.removeListener(V),H(google.maps.event.addListener(w,"mouseout",a)))},[a]),i.useEffect(function(){w&&l&&(W!==null&&google.maps.event.removeListener(W),Q(google.maps.event.addListener(w,"mouseover",l)))},[l]),i.useEffect(function(){w&&u&&(S!==null&&google.maps.event.removeListener(S),D(google.maps.event.addListener(w,"mouseup",u)))},[u]),i.useEffect(function(){w&&c&&(B!==null&&google.maps.event.removeListener(B),Y(google.maps.event.addListener(w,"rightclick",c)))},[c]),i.useEffect(function(){w&&n&&(q!==null&&google.maps.event.removeListener(q),K(google.maps.event.addListener(w,"click",n)))},[n]),i.useEffect(function(){w&&f&&(G!==null&&google.maps.event.removeListener(G),oe(google.maps.event.addListener(w,"addfeature",f)))},[f]),i.useEffect(function(){w&&p&&(ce!==null&&google.maps.event.removeListener(ce),Ce(google.maps.event.addListener(w,"removefeature",p)))},[p]),i.useEffect(function(){w&&d&&(he!==null&&google.maps.event.removeListener(he),Te(google.maps.event.addListener(w,"removeproperty",d)))},[d]),i.useEffect(function(){w&&h&&(le!==null&&google.maps.event.removeListener(le),re(google.maps.event.addListener(w,"setgeometry",h)))},[h]),i.useEffect(function(){w&&E&&(ae!==null&&google.maps.event.removeListener(ae),Ae(google.maps.event.addListener(w,"setproperty",E)))},[E]),i.useEffect(function(){if(x!==null){var te=new google.maps.Data(ee(ee({},e||{}),{map:x}));o&&M(google.maps.event.addListener(te,"dblclick",o)),r&&T(google.maps.event.addListener(te,"mousedown",r)),s&&A(google.maps.event.addListener(te,"mousemove",s)),a&&H(google.maps.event.addListener(te,"mouseout",a)),l&&Q(google.maps.event.addListener(te,"mouseover",l)),u&&D(google.maps.event.addListener(te,"mouseup",u)),c&&Y(google.maps.event.addListener(te,"rightclick",c)),n&&K(google.maps.event.addListener(te,"click",n)),f&&oe(google.maps.event.addListener(te,"addfeature",f)),p&&Ce(google.maps.event.addListener(te,"removefeature",p)),d&&Te(google.maps.event.addListener(te,"removeproperty",d)),h&&re(google.maps.event.addListener(te,"setgeometry",h)),E&&Ae(google.maps.event.addListener(te,"setproperty",E)),I(te),m&&m(te)}return function(){w&&(b!==null&&google.maps.event.removeListener(b),U!==null&&google.maps.event.removeListener(U),X!==null&&google.maps.event.removeListener(X),V!==null&&google.maps.event.removeListener(V),W!==null&&google.maps.event.removeListener(W),S!==null&&google.maps.event.removeListener(S),B!==null&&google.maps.event.removeListener(B),q!==null&&google.maps.event.removeListener(q),G!==null&&google.maps.event.removeListener(G),ce!==null&&google.maps.event.removeListener(ce),he!==null&&google.maps.event.removeListener(he),le!==null&&google.maps.event.removeListener(le),ae!==null&&google.maps.event.removeListener(ae),C&&C(w),w.setMap(null))}},[]),null}i.memo(qs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Jo,eventMap:Xo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Jo,eventMap:Xo,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),pe(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Qo={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},er={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(ee(ee({},this.props.options),{map:this.context}));this.registeredEvents=fe({updaterMap:er,eventMap:Qo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:er,eventMap:Qo,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),pe(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(i.PureComponent);function tr(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function Ks(t,e){return new e(t.lat,t.lng)}function Xs(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Js(t,e,n){return t instanceof e?t:n(t,e)}function Qs(t,e,n){return t instanceof e?t:n(t,e)}function ea(t,e,n){var o=t&&t.fromLatLngToDivPixel(n.getNorthEast()),r=t&&t.fromLatLngToDivPixel(n.getSouthWest());return o&&r?{left:"".concat(r.x+e.x,"px"),top:"".concat(o.y+e.y,"px"),width:"".concat(o.x-r.x-e.x,"px"),height:"".concat(r.y-o.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function ta(t,e,n){var o=t&&t.fromLatLngToDivPixel(n);if(o){var r=o.x,s=o.y;return{left:"".concat(r+e.x,"px"),top:"".concat(s+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function nr(t,e,n,o){return n!==void 0?ea(t,e,Qs(n,google.maps.LatLngBounds,Xs)):ta(t,e,Js(o,google.maps.LatLng,Ks))}function na(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function oa(t,e,n,o,r){var s=function(a){Pe(l,a);function l(u,c,f,p){var d=a.call(this)||this;return d.container=u,d.pane=c,d.position=f,d.bounds=p,d}return l.prototype.onAdd=function(){var u,c=(u=this.getPanes())===null||u===void 0?void 0:u[this.pane];c==null||c.appendChild(this.container)},l.prototype.draw=function(){for(var u=this.getProjection(),c=ee({},this.container?tr(this.container,r):{x:0,y:0}),f=nr(u,c,this.bounds,this.position),p=0,d=Object.entries(f);p<d.length;p++){var h=d[p],E=h[0],m=h[1];this.container.style[E]=m}},l.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},l}(google.maps.OverlayView);return new s(t,e,n,o)}function or(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function rr(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function ra(t){var e=t.position,n=t.bounds,o=t.mapPaneName,r=t.zIndex,s=t.onLoad,a=t.onUnmount,l=t.getPixelPositionOffset,u=t.children,c=i.useContext(ue),f=i.useMemo(function(){var d=document.createElement("div");return d.style.position="absolute",d},[]),p=i.useMemo(function(){return oa(f,o,e,n,l)},[f,o,e,n]);return i.useEffect(function(){return s==null||s(p),p==null||p.setMap(c),function(){a==null||a(p),p==null||p.setMap(null)}},[c,p]),i.useEffect(function(){f.style.zIndex="".concat(r)},[r,f]),io.createPortal(u,f)}i.memo(ra),function(t){Pe(e,t);function e(n){var o=t.call(this,n)||this;o.state={paneEl:null,containerStyle:{position:"absolute"}},o.updatePane=function(){var s=o.props.mapPaneName,a=o.overlayView.getPanes();$e(!!s,"OverlayView requires props.mapPaneName but got %s",s),a?o.setState({paneEl:a[s]}):o.setState({paneEl:null})},o.onAdd=function(){var s,a;o.updatePane(),(a=(s=o.props).onLoad)===null||a===void 0||a.call(s,o.overlayView)},o.onPositionElement=function(){var s=o.overlayView.getProjection(),a=ee({x:0,y:0},o.containerRef.current?tr(o.containerRef.current,o.props.getPixelPositionOffset):{}),l=nr(s,a,o.props.bounds,o.props.position),u=o.state.containerStyle,c=u.left,f=u.top,p=u.width,d=u.height;na(l,{left:c,top:f,width:p,height:d})||o.setState({containerStyle:{top:l.top||0,left:l.left||0,width:l.width||0,height:l.height||0,position:"absolute"}})},o.draw=function(){o.onPositionElement()},o.onRemove=function(){var s,a;o.setState(function(){return{paneEl:null}}),(a=(s=o.props).onUnmount)===null||a===void 0||a.call(s,o.overlayView)},o.containerRef=i.createRef();var r=new google.maps.OverlayView;return r.onAdd=o.onAdd,r.draw=o.draw,r.onRemove=o.onRemove,o.overlayView=r,o}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var o=or(n.position),r=or(this.props.position),s=rr(n.bounds),a=rr(this.props.bounds);(o!==r||s!==a)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?io.createPortal(y.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:i.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=ue,e}(i.PureComponent);function ia(){}var ir={onDblClick:"dblclick",onClick:"click"},sr={opacity:function(t,e){t.setOpacity(e)}};function sa(t){var e=t.url,n=t.bounds,o=t.options,r=t.visible,s=i.useContext(ue),a=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),l=i.useMemo(function(){var u=new google.maps.GroundOverlay(e,a,ee({},o));return u},[]);return i.useEffect(function(){l!==null&&l.setMap(s)},[s]),i.useEffect(function(){typeof e<"u"&&l!==null&&(l.set("url",e),l.setMap(s))},[l,e]),i.useEffect(function(){typeof r<"u"&&l!==null&&l.setOpacity(r?1:0)},[l,r]),i.useEffect(function(){var u=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&l!==null&&(l.set("bounds",u),l.setMap(s))},[l,n]),null}i.memo(sa),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){$e(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,ee(ee({},this.props.options),{map:this.context}));this.registeredEvents=fe({updaterMap:sr,eventMap:ir,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:sr,eventMap:ir,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:ia},e.contextType=ue,e}(i.PureComponent);var ar={},lr={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function aa(t){var e=t.data,n=t.onLoad,o=t.onUnmount,r=t.options,s=i.useContext(ue),a=i.useState(null),l=a[0],u=a[1];return i.useEffect(function(){google.maps.visualization||$e(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),i.useEffect(function(){$e(!!e,"data property is required in HeatmapLayer %s",e)},[e]),i.useEffect(function(){l!==null&&l.setMap(s)},[s]),i.useEffect(function(){r&&l!==null&&l.setOptions(r)},[l,r]),i.useEffect(function(){var c=new google.maps.visualization.HeatmapLayer(ee(ee({},r||{}),{data:e,map:s}));return u(c),n&&n(c),function(){l!==null&&(o&&o(l),l.setMap(null))}},[]),null}i.memo(aa),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){$e(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),$e(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(ee(ee({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=fe({updaterMap:lr,eventMap:ar,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:lr,eventMap:ar,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),pe(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var ur={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},cr={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,o,r=(o=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&o!==void 0?o:null;this.registeredEvents=fe({updaterMap:cr,eventMap:ur,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{streetViewPanorama:r}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:cr,eventMap:ur,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),pe(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=ue,e})(i.PureComponent),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){$e(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e}(i.PureComponent);var dr={onDirectionsChanged:"directions_changed"},fr={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=fe({updaterMap:fr,eventMap:dr,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:fr,eventMap:dr,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),pe(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return y.jsx(y.Fragment,{})},e.contextType=ue,e})(i.PureComponent),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){$e(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e}(i.PureComponent);var pr={onPlacesChanged:"places_changed"},hr={bounds:function(t,e){t.setBounds(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=i.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if($e(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var o=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=fe({updaterMap:hr,eventMap:pr,prevProps:{},nextProps:this.props,instance:o}),this.setState(function(){return{searchBox:o}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:hr,eventMap:pr,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),pe(this.registeredEvents))},e.prototype.render=function(){return y.jsx("div",{ref:this.containerElement,children:i.Children.only(this.props.children)})},e.contextType=ue,e})(i.PureComponent);var gr={onPlaceChanged:"place_changed"},mr={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=i.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;$e(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var o=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(o){var r=new google.maps.places.Autocomplete(o,this.props.options);this.registeredEvents=fe({updaterMap:mr,eventMap:gr,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{autocomplete:r}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:mr,eventMap:gr,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&pe(this.registeredEvents)},e.prototype.render=function(){return y.jsx("div",{ref:this.containerElement,className:this.props.className,children:i.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=ue,e})(i.PureComponent);function la({coordinates:t,zoom:e=18,draggable:n=!1,googleMapsApiKey:o,className:r,...s}){return t?y.jsx("div",{className:"arkynGoogleMapPinned "+r,...s,children:y.jsx(os,{libraries:["maps","marker"],googleMapsApiKey:o,loadingElement:y.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...s,children:y.jsx(ke.LoaderIcon,{})}),children:y.jsx(ns,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:y.jsx(fs,{draggable:n,position:t})})})}):y.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...s,children:y.jsx(ke.MapPinned,{})})}function ua(t){const{className:e,...n}=t,o=`arkynSkeleton ${e}`;return y.jsx("aside",{className:o.trim(),...n})}function ca(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:o,...r}=t,s=`arkynTableBody ${n}`,a=i.Children.count(o)===0;return y.jsx("tbody",{className:s.trim(),...r,children:a?y.jsx("tr",{className:"arkynTableBodyEmptyLine",children:y.jsx("td",{colSpan:100,children:y.jsx("div",{children:e})})}):o})}function da(t){const{className:e,children:n,...o}=t,r=`arkynTableCaption ${e}`;return y.jsx("caption",{className:r.trim(),...o,children:y.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function fa(t){const{children:e,className:n,...o}=t,r=`arkynTableContainer ${n}`;return y.jsx("div",{className:r.trim(),...o,children:y.jsx("table",{children:e})})}function pa(t){const{className:e,children:n,...o}=t,r=`arkynTableFooter ${e}`;return y.jsxs("tfoot",{className:r.trim(),...o,children:[y.jsx("tr",{className:"spacingRow"}),y.jsx("tr",{children:y.jsx("th",{colSpan:100,children:y.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function ha(t){const{className:e,children:n,...o}=t,r=`arkynTableHeader ${e}`;return y.jsxs("thead",{className:r.trim(),...o,children:[y.jsx("tr",{children:n}),y.jsx("tr",{className:"spacingRow"})]})}function ga(t){const{isLoading:e=!1,scheme:n="primary",variant:o="solid",loadingText:r,size:s="md",leftIcon:a,rightIcon:l,disabled:u,className:c="",children:f,...p}=t,h={xs:12,sm:16,md:20,lg:24}[s],C=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${o} ${n} ${s} ${r?"loadingTextTrue":"loadingTextFalse"} ${c}`;return y.jsxs("button",{className:C,disabled:u||e,...p,children:[y.jsxs("div",{className:"arkynButtonSpinner",children:[y.jsx(ke.Loader2,{size:h,strokeWidth:2.5}),r&&r]}),y.jsxs("div",{className:"arkynButtonContent",children:[Yt(h,a),f,Yt(h,l)]})]})}const vr=i.createContext({});function ma(t){var f,p;const e=Ct.useActionData(),{children:n,className:o,...r}=t,s=i.useRef(null),a=((f=s.current)==null?void 0:f.name)||"",l=((p=e==null?void 0:e.fieldErrors)==null?void 0:p[a])||null,u=i.useId(),c=`arkynFormController ${o}`;return y.jsx(vr.Provider,{value:{error:l,id:u,inputRef:s},children:y.jsx("section",{className:c.trim(),...r,children:n})})}function Ke(){return i.useContext(vr)}function va(t){const{name:e,className:n="",size:o="md",isError:r,defaultChecked:s=!1,checked:a=null,onCheck:l,value:u,...c}=t,{id:f,inputRef:p,error:d}=Ke(),h=r||!!d,[E,m]=i.useState(s||!1),C=typeof a=="boolean"?a:E,w=`arkynCheckbox ${o} ${h?"errorTrue":"errorFalse"} ${C?"checkedTrue":"checkedFalse"} ${n}`;function I(){const v=E;m(!v),l&&l(v?"":u||"checked")}return y.jsxs("button",{id:f,type:"button",className:w,onClick:I,...c,children:[y.jsx("input",{type:"hidden",name:e,ref:p,value:C?u||"checked":""}),y.jsx(ke.Check,{})]})}function ya(t){const{children:e,className:n,...o}=t,r=`arkynFormError ${n}`,{error:s}=Ke();return e?y.jsx("strong",{className:r.trim(),...o,children:e}):s?y.jsx("strong",{className:r.trim(),...o,children:s}):y.jsx(y.Fragment,{})}function ba(t){const{showAsterisk:e=!1,className:n="",...o}=t,{id:r}=Ke(),a=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return y.jsx("label",{className:a.trim(),htmlFor:r,...o})}function La(t){const{isLoading:e=!1,scheme:n="primary",variant:o="solid",size:r="md",icon:s,disabled:a,className:l="",...u}=t,c={xs:12,sm:16,md:20,lg:24},p=`arkynIconButton ${o} ${n} ${r} ${e?"loadingTrue":"loadingFalse"} ${l}`;return y.jsxs("button",{disabled:a||e,className:p.trim(),...u,children:[y.jsx("div",{className:"arkynIconButtonSpinner",children:y.jsx(ke.Loader2,{size:c[r],strokeWidth:2.5})}),y.jsx("div",{className:"arkynIconButtonContent",children:y.jsx(s,{size:c[r],strokeWidth:2.5})})]})}function lt(t,e,n){if(!t)return y.jsx(y.Fragment,{});if(typeof t=="string")return y.jsx("p",{className:n,children:t});const o=t;return y.jsx("p",{className:n,children:y.jsx(o,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function On(t){return t&&t.replace(/[^0-9]/g,"")}function yr(t,e){let n="",o=0;return Array.from(t).forEach((r,s)=>{e[s+o].match(/[0-9]/)||(n+=e[s+o],o++),n+=r}),n}function br(t){return t.length>11?"CNPJ":"CPF"}const In={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},Lr=On(In.CNPJ).length;function Ca(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,defaultValue:d,readOnly:h,onFocus:E,onBlur:m,title:C,style:x,onChange:O,...w}=t;function I(F){let V=On(F);const H=br(V);if(!(V.length>Lr))return V=yr(V,In[H]),V}const v=f?"right":"left",z=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||h||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[r];return{isLoading:n,className:z,prefix:lt(l,A,"prefix"),sufix:lt(u,A,"sufix"),LeftIcon:c,RightIcon:f,defaultValue:I(d||""),disabled:p,readOnly:h,onFocus:E,onBlur:m,title:C,style:x,onChange:O,loadingPosition:v,iconSize:A,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...w}}function xa(t){const[e,n]=i.useState(!1),o=i.useRef(null),{inputRef:r,id:s,error:a}=Ke(),l=r||o,u=t.isError||!!a,{disabled:c,title:f,style:p,className:d,prefix:h,sufix:E,iconSize:m,loadingPosition:C,isLoading:x,LeftIcon:O,readOnly:w,onFocus:I,onBlur:v,RightIcon:b,Spinner:M,onChange:P,value:U,defaultValue:T,...z}=Ca({...t,id:s,isError:u},e),[X,A]=i.useState(T),F=O&&!x,V=b&&!x,H=C==="left"&&x,$=C==="right"&&x;function W(){c||!(l!=null&&l.current)||(n(!0),l.current.focus())}function Q(D){let _=On(D.target.value);const B=br(_);_.length>Lr||(_=yr(_,In[B]),D.target.value=_,A(_),P&&P(D))}function k(D){n(!0),I&&I(D)}function S(D){n(!1),v&&v(D)}return y.jsxs("section",{title:f,style:p,onClick:W,className:d,children:[h,H&&M,F&&y.jsx(O,{size:m,strokeWidth:2.5}),y.jsx("input",{disabled:c||x,readOnly:w,ref:l,value:U||X,onFocus:k,onChange:Q,onBlur:S,...z}),V&&y.jsx(b,{size:m,strokeWidth:2.5}),$&&M,E]})}const Ea=3,wa=(t="pt-BR",e,n="BRL",o=!0)=>new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e).slice(o?Ea:0),Xt=2,Cr=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),_n=t=>{let e=t;return typeof t=="string"?(e=Cr(t),e%1!==0&&(e=e.toFixed(Xt))):e=Number.isInteger(t)?Number(t)*10**Xt:t.toFixed(Xt),Cr(e)/10**Xt},xr=(t,e,n)=>{if(!e)return[0,""];const o=_n(e),r=wa(t,o,n);return[o,r]};function Sa(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,max:x=1e9,locale:O="pt-BR",currency:w="BRL",...I}=t,v=f?"right":"left",z=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||d||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[r];return{isLoading:n,className:z,prefix:lt(l,A,"prefix"),sufix:lt(u,A,"sufix"),LeftIcon:c,RightIcon:f,disabled:p,locale:O,currency:w,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,max:x,loadingPosition:v,iconSize:A,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...I}}function ka(t){const[e,n]=i.useState(!1),[o,r]=i.useState("0"),s=i.useRef(null),{inputRef:a,id:l,error:u}=Ke(),c=a||s,f=t.isError||!!u,{disabled:p,title:d,style:h,className:E,prefix:m,sufix:C,iconSize:x,loadingPosition:O,isLoading:w,LeftIcon:I,readOnly:v,onFocus:b,onBlur:M,RightIcon:P,Spinner:U,value:T,max:z,onChangeValue:X,onKeyPress:A,currency:F,locale:V,name:H,defaultValue:$,...W}=Sa({...t,id:l,isError:f},e),Q=I&&!w,k=P&&!w,S=O==="left"&&w,D=O==="right"&&w;function _(){p||!(c!=null&&c.current)||(n(!0),c.current.focus())}function B(R){n(!0),b&&b(R)}function Y(R){n(!1),M&&M(R)}const L=R=>{const[G,oe]=xr(V,R,F);return!z||G<=z?(r(oe),[G,oe]):[_n(o),o]},q=R=>{R.preventDefault();const[G,oe]=L(R.target.value);X(R,String(G),String(oe))},K=R=>A&&A(R,R.key,R.key);return i.useEffect(()=>{const R=T||+$||void 0,[,G]=xr(V,R,F);r(G)},[F,$,T]),y.jsxs("section",{title:d,style:h,onClick:_,className:E,children:[m,S&&U,Q&&y.jsx(I,{size:x,strokeWidth:2.5}),y.jsx("input",{value:o,onChange:q,onBlur:Y,onFocus:B,onKeyUp:K,disabled:p||w,readOnly:v,...W}),y.jsx("input",{type:"hidden",ref:c,name:H,value:_n(o)}),D&&U,k&&y.jsx(P,{size:x,strokeWidth:2.5}),C]})}function Ma(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,showMask:O=!1,type:w,...I}=t,v=f?"right":"left",z=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||d||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[r];return{isLoading:n,className:z,prefix:lt(l,A,"prefix"),sufix:lt(u,A,"sufix"),LeftIcon:c,RightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,loadingPosition:v,iconSize:A,showMask:O,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...I}}const Pa=i.forwardRef((t,e)=>y.jsx("input",{ref:e,...t}));function Ta(t){const[e,n]=i.useState(!1),o=i.useRef(null),{inputRef:r,id:s,error:a}=Ke(),l=r||o,u=t.isError||!!a,{disabled:c,title:f,style:p,className:d,prefix:h,sufix:E,iconSize:m,loadingPosition:C,isLoading:x,LeftIcon:O,readOnly:w,onFocus:I,onBlur:v,RightIcon:b,Spinner:M,...P}=Ma({...t,id:s,isError:u},e),U=O&&!x,T=b&&!x,z=C==="left"&&x,X=C==="right"&&x;function A(){c||!(l!=null&&l.current)||(n(!0),l.current.focus())}function F(H){n(!0),I&&I(H)}function V(H){n(!1),v&&v(H)}return y.jsxs("section",{title:f,style:p,onClick:A,className:d,children:[h,z&&M,U&&y.jsx(O,{size:m,strokeWidth:2.5}),y.jsx(Ti.InputMask,{component:Pa,ref:l,onFocus:F,onBlur:V,disabled:c,...P}),T&&y.jsx(b,{size:m,strokeWidth:2.5}),X&&M,E]})}function Oa(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,...O}=t,w=f?"right":"left",U=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||d||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,z={md:20,lg:20}[r];return{isLoading:n,className:U,prefix:lt(l,z,"prefix"),sufix:lt(u,z,"sufix"),LeftIcon:c,RightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,loadingPosition:w,iconSize:z,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...O}}function Ia(t){const[e,n]=i.useState(!1),o=i.useRef(null),{inputRef:r,id:s,error:a}=Ke(),l=r||o,u=t.isError||!!a,{disabled:c,title:f,style:p,className:d,prefix:h,sufix:E,iconSize:m,loadingPosition:C,isLoading:x,LeftIcon:O,readOnly:w,onFocus:I,onBlur:v,RightIcon:b,type:M,Spinner:P,...U}=Oa({...t,id:s,isError:u},e),T=O&&!x,z=b&&!x,X=C==="left"&&x,A=C==="right"&&x;function F(){c||!(l!=null&&l.current)||(n(!0),l.current.focus())}function V($){n(!0),I&&I($)}function H($){n(!1),v&&v($)}return M==="hidden"?y.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:l,...U}):y.jsxs("section",{title:f,style:p,onClick:F,className:d,children:[h,X&&P,T&&y.jsx(O,{size:m,strokeWidth:2.5}),y.jsx("input",{disabled:c||x,readOnly:w,ref:l,onFocus:V,onBlur:H,type:M,...U}),z&&y.jsx(b,{size:m,strokeWidth:2.5}),A&&P,E]})}function _a(t){return t.type==="currency"?y.jsx(ka,{...t}):t.type==="masked"?y.jsx(Ta,{...t}):t.type==="cpf-cnpj"?y.jsx(xa,{...t}):y.jsx(Ia,{...t})}const Er=i.createContext({});function Ra(){return i.useContext(Er)}function Da(t){const{defaultValue:e,name:n,value:o,onChange:r,size:s="md",className:a="",...l}=t,[u,c]=i.useState(e||""),{inputRef:f,id:p}=Ke();function d(E){c(E),r&&r(E)}const h=`arkynRadioGroup ${s} ${a}`;return y.jsxs(Er.Provider,{value:{onChange:d,value:o||u,size:s},children:[y.jsx("input",{style:{display:"none"},type:"text",id:p,readOnly:!0,name:n,ref:f,value:o||u}),y.jsx("div",{className:h.trim(),...l})]})}function ja(t){const{value:e,size:n,disabled:o,children:r,className:s="",...a}=t,{onChange:l,size:u,value:c}=Ra(),{error:f}=Ke(),m=`arkynRadioBox ${n||u} ${c===e?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${o?"disabledTrue":"disabledFalse"} ${s}`;return y.jsxs("label",{className:m.trim(),children:[y.jsx("button",{type:"button",disabled:o,onClick:()=>l(e),onFocus:()=>l(e),...a}),r]})}function Na(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,leftIcon:u,disabled:c,readOnly:f,onFocus:p,onBlur:d,title:h,style:E,closeOnSelect:m=!0,...C}=t,v=`arkyn_select ${l?"hasPrefix":""} ${a} ${r} ${c||f||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,M={md:20,lg:20}[r];return{isLoading:n,className:v,prefix:zi(l,M,"prefix"),LeftIcon:u,disabled:c||n||f,onFocus:p,onBlur:d,title:h,closeOnSelect:m,style:E,iconSize:M,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:M,strokeWidth:2.5}),...C}}function Ba(t){var D;const[e,n]=i.useState(!1),{inputRef:o,id:r,error:s}=Ke(),a=i.useRef(null),l=o||a,u=t.isError||!!s,{disabled:c,title:f,style:p,className:d,prefix:h,iconSize:E,isLoading:m,LeftIcon:C,value:x=null,defaultValue:O="",onFocus:w,onBlur:I,Spinner:v,name:b,placeholder:M,onSelect:P,options:U,optionMaxHeight:T,closeOnSelect:z,...X}=Na({...t,id:r,isError:u},e),[A,F]=i.useState(O);function V(){c||!(l!=null&&l.current)||e||(n(!0),l.current.focus())}function H(_){e||(n(!0),w&&w(_))}function $(){n(!1),I&&l.current&&l.current.blur()}function W(_){const{label:B,value:Y}=_;F(A!==Y?Y:""),P&&P({label:B,value:Y}),z&&$()}const Q=typeof x=="string"?x:A,k=((D=U.find(_=>_.value===Q))==null?void 0:D.label)||"",S=()=>{if(!e&&k)return!0;if(!e&&!k)return!1;if(e&&k)return!0;if(e&&!k)return!1};return y.jsxs(y.Fragment,{children:[y.jsxs("section",{title:f,style:p,onClick:V,className:`${d} placeholder_dark_${S()}`,children:[h,C&&y.jsx(C,{size:E,strokeWidth:2.5}),y.jsx("input",{disabled:c,readOnly:!0,placeholder:k||M,onFocus:H,...X}),y.jsx("input",{type:"hidden",ref:l,name:b,value:Q||"",readOnly:!0}),e&&y.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:T},children:[U.map(({label:_,value:B})=>y.jsxs("div",{onClick:()=>W({label:_,value:B}),className:Q===B?"arkyn_select_option active":"arkyn_select_option",children:[_," ",y.jsx(ke.Check,{})]},B)),U.length<=0&&y.jsx("p",{children:"Sem opções disponíveis"})]}),!m&&y.jsx(ke.ChevronDown,{className:"arkyn_select_arrow",size:E,strokeWidth:2.5}),m&&v]}),e&&y.jsx("aside",{className:"arkyn_select_overlay",onClick:$})]})}function $a(t){const{size:e="lg",defaultChecked:n=!1,checked:o=null,value:r,name:s,className:a="",onCheck:l,...u}=t,[c,f]=i.useState(n),{id:p,inputRef:d}=Ke();function h(){f(!c),l&&l(n?"":r||"checked")}const E=typeof o=="boolean"?o:c,C=`arkynSwitch ${E?"checkedTrue":"checkedFalse"} ${e} ${a}`;return y.jsx("button",{id:p,type:"button",onClick:h,className:C,...u,children:y.jsx("input",{type:"hidden",name:s,ref:d,value:E?r||"checked":""})})}function Aa(t){const{variant:e="solid",size:n="md",className:o,disabled:r=!1,readOnly:s=!1,onFocus:a,onBlur:l,title:u,style:c,...f}=t,[p,d]=i.useState(!1),{inputRef:h,id:E,error:m}=Ke(),C=i.useRef(null),x=h||C,w=t.isError||!!m?"errorTrue":"errorFalse",b=`arkynTextarea ${e} ${n} ${r||s?"opacityTrue":"opacityFalse"} ${w} ${p?"focusedTrue":"focusedFalse"} ${o}`;function M(){r||!(x!=null&&x.current)||(d(!0),x.current.focus())}function P(T){d(!0),a&&a(T)}function U(T){d(!1),l&&l(T)}return y.jsx("section",{title:u,style:c,onClick:M,className:b,children:y.jsx("textarea",{id:E,disabled:r,readOnly:s,ref:x,onFocus:P,onBlur:U,...f})})}function za(t){const{className:e="",...n}=t,o=`arkynBreadcrumbContainer ${e}`;return y.jsx("nav",{className:o,...n})}function Ua(t){const{pathname:e}=Ct.useLocation(),{className:n="",disabled:o=!1,children:r,to:s,...a}=t,u=`arkynBreadcrumbLink ${e===s?"active":"inactive"} ${n}`;return o?y.jsxs("p",{className:u,children:[y.jsx(ke.ChevronRight,{size:14,strokeWidth:2.5}),r]}):y.jsxs(Ct.Link,{to:s,className:u,...a,children:[y.jsx(ke.ChevronRight,{size:14,strokeWidth:2.5}),r]})}function wr(t=""){const e=Ct.useLocation(),n=new URLSearchParams(e.search),o=t?`${t}:`:"",r=s=>{Object.entries(s).forEach(([a,l])=>{l===void 0?n.delete(`${o}${a}`):n.set(`${o}${a}`,String(l))})};return{getParam:s=>n.get(`${o}${s}`),getScopedSearch:s=>{r(s);let a=n.toString();return a&&(a="?"+a),a}}}function Fa(t){const{scope:e,totalCountRegisters:n,perPageKey:o="per_page",pageKey:r="page",siblingsCount:s=2,...a}=t,l=Ct.useNavigate(),{getParam:u,getScopedSearch:c}=wr(e),f=Number(u(r))||1,p=Number(u(o))||20,d=Math.ceil(n/p),h=Ai(f,s),E=$i(f,s,d);function m(C){l(c({page:C}))}return y.jsxs("div",{className:"arkynPagination",...a,children:[y.jsx("button",{className:"arkynPaginationIconButton",disabled:f<=1,onClick:()=>m(f-1),children:y.jsx(ke.ChevronLeft,{})}),f>1+s&&y.jsxs(y.Fragment,{children:[y.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>m(1),children:"1"}),f>2+s&&y.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:y.jsx(ke.Ellipsis,{})})]}),h.map((C,x)=>y.jsx("button",{onClick:()=>m(C),className:"arkynPaginationPageButton",children:C},x)),y.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:f}),E.map((C,x)=>y.jsx("button",{onClick:()=>m(C),className:"arkynPaginationPageButton",children:C},x)),f+s<d&&y.jsxs(y.Fragment,{children:[f+1+s<d&&y.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:y.jsx(ke.Ellipsis,{})}),y.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>m(d),children:d})]}),y.jsx("button",{className:"arkynPaginationIconButton",disabled:f>=d,onClick:()=>m(f+1),children:y.jsx(ke.ChevronRight,{})})]})}const Rn=i.createContext({});function Ha(){if(!Rn)throw new Error("useTabContext must be used within a TabProvider");return i.useContext(Rn)}function Wa(t){const{children:e,onClick:n,defaultActive:o,className:r,...s}=t,[a,l]=i.useState(o||""),[u,c]=i.useState(!0),f=i.useRef(null),p=`arkynTabContainer ${r||""}`,[d,h]=i.useState({width:"0px",left:"0px",transition:"none"}),E=(C,x)=>{const O=C.getBoundingClientRect(),w=f.current.getBoundingClientRect(),I=x?void 0:"none";c(!1),h({transition:I,width:`${O.width}px`,left:`${O.left-w.left}px`})};i.useEffect(()=>{const C=f.current;if(!C)return;let x=null;x=C.querySelector("button.active"),x&&E(x)},[]);const m=C=>{const x=C.target;x&&(l(x.value),x.classList.add("active"),E(x,!0),n&&n(x.value))};return y.jsxs("nav",{ref:f,className:p.trim(),...s,children:[y.jsx(Rn.Provider,{value:{handleTabClick:m,showInitialTab:u,value:a},children:e}),y.jsx("div",{className:"activeLine",style:d})]})}function Va(t){const{children:e,className:n="",onClick:o,...r}=t,{value:s,showInitialTab:a,handleTabClick:l}=Ha(),u=s===r.value&&s?"activeTrue":"activeFalse",f=`arkynTabButton ${s===r.value&&a?"showBorderBottom":""} ${u} ${n}`;function p(d){l(d),o&&o(d)}return y.jsx("button",{onClick:p,className:f.trim(),...r,children:e})}const Sr=i.createContext({});function Za(t){const{isVisibled:e,makeInvisible:n,orientation:o="left",children:r,className:s,...a}=t,l=o==="left"?"-100%":"100%",c=`arkynDrawerContainer ${o} ${e?"visibleTrue":"visibleFalse"} ${s}`;return y.jsx(Sr.Provider,{value:{makeInvisible:n},children:y.jsx(ht.AnimatePresence,{children:e&&y.jsxs("aside",{className:c.trim(),...a,children:[y.jsx(ht.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),y.jsx(ht.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${l})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${l})`},children:r})]})})})}function Ya(t){const{showCloseButton:e=!0,className:n,children:o,...r}=t,{makeInvisible:s}=i.useContext(Sr),a=`arkynDrawerHeader ${n}`;return y.jsxs("header",{className:a.trim(),...r,children:[o,e&&y.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:s,"aria-label":"Close drawer",children:y.jsx(ke.X,{size:24})})]})}const kr=i.createContext({});function Ga(t){const{isVisibled:e,makeInvisible:n,children:o,className:r="",...s}=t,l=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${r}`;return y.jsx(kr.Provider,{value:{makeInvisible:n},children:y.jsx(ht.AnimatePresence,{children:e&&y.jsxs("aside",{className:l.trim(),...s,children:[y.jsx(ht.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),y.jsx(ht.motion.div,{className:"arkynModalContainerContent",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:o})]})})})}function qa(t){const{alignment:e="right",className:n,...o}=t,r=`arkynModalFooter ${e} ${n}`;return y.jsx("footer",{className:r.trim(),...o})}function Ka(t){const{showCloseButton:e=!0,className:n,children:o,...r}=t,{makeInvisible:s}=i.useContext(kr),a=`arkynModalHeader ${n}`;return y.jsxs("header",{className:a.trim(),...r,children:[o,e&&y.jsx("button",{type:"button",onClick:s,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:y.jsx(ke.X,{size:24})})]})}function Xa(t){const{children:e,button:n,closeOnClick:o,orientation:r="bottomLeft"}=t,[s,a]=i.useState(!1),u=`arkynPopover ${r} ${s?"visibleTrue":"visibleFalse"}`;function c(){s||a(!0)}return y.jsxs("div",{className:u,onClick:c,children:[n,y.jsx(ht.motion.div,{style:{visibility:s?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:s?1:0},exit:{opacity:0},onClick:()=>o&&a(!1),className:"arkynPopoverContent",children:e}),s&&y.jsx("div",{onClick:()=>a(!1),className:"arkynPopoverOverlay"})]})}function Mr(t){const{message:e,title:n,type:o,size:r="lg"}=t,s=`arkynToast ${o} ${r}`;function a(){switch(o){case"info":return y.jsx(ke.Info,{});case"success":return y.jsx(ke.CheckCircle2,{});case"danger":return y.jsx(ke.XCircle,{});case"warning":return y.jsx(ke.AlertCircle,{});default:return y.jsx(ke.Info,{})}}return y.jsxs("aside",{className:s,children:[y.jsxs("div",{children:[y.jsx("div",{className:"bg"}),y.jsx(a,{})]}),y.jsxs("p",{children:[y.jsx("strong",{title:n,children:n}),y.jsx("span",{children:e})]})]})}function Ja(t){const{text:e,size:n="lg",children:o,orientation:r="top",className:s="",...a}=t,l=`arkynTooltip ${n} ${r} ${s}`;return y.jsxs("div",{className:l.trim(),...a,children:[o,y.jsx("div",{className:"arkynTooltipText",children:e})]})}var je={},Dn={},jt={},Nt={},Pr="Expected a function",Tr=NaN,Qa="[object Symbol]",el=/^\s+|\s+$/g,tl=/^[-+]0x[0-9a-f]+$/i,nl=/^0b[01]+$/i,ol=/^0o[0-7]+$/i,rl=parseInt,il=typeof Zt=="object"&&Zt&&Zt.Object===Object&&Zt,sl=typeof self=="object"&&self&&self.Object===Object&&self,al=il||sl||Function("return this")(),ll=Object.prototype,ul=ll.toString,cl=Math.max,dl=Math.min,jn=function(){return al.Date.now()};function fl(t,e,n){var o,r,s,a,l,u,c=0,f=!1,p=!1,d=!0;if(typeof t!="function")throw new TypeError(Pr);e=Or(e)||0,Jt(n)&&(f=!!n.leading,p="maxWait"in n,s=p?cl(Or(n.maxWait)||0,e):s,d="trailing"in n?!!n.trailing:d);function h(b){var M=o,P=r;return o=r=void 0,c=b,a=t.apply(P,M),a}function E(b){return c=b,l=setTimeout(x,e),f?h(b):a}function m(b){var M=b-u,P=b-c,U=e-M;return p?dl(U,s-P):U}function C(b){var M=b-u,P=b-c;return u===void 0||M>=e||M<0||p&&P>=s}function x(){var b=jn();if(C(b))return O(b);l=setTimeout(x,m(b))}function O(b){return l=void 0,d&&o?h(b):(o=r=void 0,a)}function w(){l!==void 0&&clearTimeout(l),c=0,o=u=r=l=void 0}function I(){return l===void 0?a:O(jn())}function v(){var b=jn(),M=C(b);if(o=arguments,r=this,u=b,M){if(l===void 0)return E(u);if(p)return l=setTimeout(x,e),h(u)}return l===void 0&&(l=setTimeout(x,e)),a}return v.cancel=w,v.flush=I,v}function pl(t,e,n){var o=!0,r=!0;if(typeof t!="function")throw new TypeError(Pr);return Jt(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),fl(t,e,{leading:o,maxWait:e,trailing:r})}function Jt(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function hl(t){return!!t&&typeof t=="object"}function gl(t){return typeof t=="symbol"||hl(t)&&ul.call(t)==Qa}function Or(t){if(typeof t=="number")return t;if(gl(t))return Tr;if(Jt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Jt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(el,"");var n=nl.test(t);return n||ol.test(t)?rl(t.slice(2),n?2:8):tl.test(t)?Tr:+t}var ml=pl,Bt={};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.addPassiveEventListener=function(e,n,o){var r=o.name;r||(r=n,console.warn("Listener must be a named function.")),Qt.has(n)||Qt.set(n,new Set);var s=Qt.get(n);if(!s.has(r)){var a=function(){var l=!1;try{var u=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("test",null,u)}catch{}return l}();e.addEventListener(n,o,a?{passive:!0}:!1),s.add(r)}},Bt.removePassiveEventListener=function(e,n,o){e.removeEventListener(n,o),Qt.get(n).delete(o.name||n)};var Qt=new Map;Object.defineProperty(Nt,"__esModule",{value:!0});var vl=ml,yl=Ll(vl),bl=Bt;function Ll(t){return t&&t.__esModule?t:{default:t}}var Cl=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,yl.default)(e,n)},_e={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,n){if(e){var o=Cl(function(r){_e.scrollHandler(e)},n);_e.scrollSpyContainers.push(e),(0,bl.addPassiveEventListener)(e,"scroll",o)}},isMounted:function(e){return _e.scrollSpyContainers.indexOf(e)!==-1},currentPositionX:function(e){if(e===document){var n=window.pageYOffset!==void 0,o=(document.compatMode||"")==="CSS1Compat";return n?window.pageXOffset:o?document.documentElement.scrollLeft:document.body.scrollLeft}else return e.scrollLeft},currentPositionY:function(e){if(e===document){var n=window.pageXOffset!==void 0,o=(document.compatMode||"")==="CSS1Compat";return n?window.pageYOffset:o?document.documentElement.scrollTop:document.body.scrollTop}else return e.scrollTop},scrollHandler:function(e){var n=_e.scrollSpyContainers[_e.scrollSpyContainers.indexOf(e)].spyCallbacks||[];n.forEach(function(o){return o(_e.currentPositionX(e),_e.currentPositionY(e))})},addStateHandler:function(e){_e.spySetState.push(e)},addSpyHandler:function(e,n){var o=_e.scrollSpyContainers[_e.scrollSpyContainers.indexOf(n)];o.spyCallbacks||(o.spyCallbacks=[]),o.spyCallbacks.push(e),e(_e.currentPositionX(n),_e.currentPositionY(n))},updateStates:function(){_e.spySetState.forEach(function(e){return e()})},unmount:function(e,n){_e.scrollSpyContainers.forEach(function(o){return o.spyCallbacks&&o.spyCallbacks.length&&o.spyCallbacks.indexOf(n)>-1&&o.spyCallbacks.splice(o.spyCallbacks.indexOf(n),1)}),_e.spySetState&&_e.spySetState.length&&_e.spySetState.indexOf(e)>-1&&_e.spySetState.splice(_e.spySetState.indexOf(e),1),document.removeEventListener("scroll",_e.scrollHandler)},update:function(){return _e.scrollSpyContainers.forEach(function(e){return _e.scrollHandler(e)})}};Nt.default=_e;var xt={},$t={};Object.defineProperty($t,"__esModule",{value:!0});var xl=function(e,n){var o=e.indexOf("#")===0?e.substring(1):e,r=o?"#"+o:"",s=window&&window.location,a=r?s.pathname+s.search+r:s.pathname+s.search;n?history.pushState(history.state,"",a):history.replaceState(history.state,"",a)},El=function(){return window.location.hash.replace(/^#/,"")},wl=function(e){return function(n){return e.contains?e!=n&&e.contains(n):!!(e.compareDocumentPosition(n)&16)}},Sl=function(e){return getComputedStyle(e).position!=="static"},Nn=function(e,n){for(var o=e.offsetTop,r=e.offsetParent;r&&!n(r);)o+=r.offsetTop,r=r.offsetParent;return{offsetTop:o,offsetParent:r}},kl=function(e,n,o){if(o)return e===document?n.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(e).position!=="static"?n.offsetLeft:n.offsetLeft-e.offsetLeft;if(e===document)return n.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(Sl(e)){if(n.offsetParent!==e){var r=function(f){return f===e||f===document},s=Nn(n,r),a=s.offsetTop,l=s.offsetParent;if(l!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return a}return n.offsetTop}if(n.offsetParent===e.offsetParent)return n.offsetTop-e.offsetTop;var u=function(f){return f===document};return Nn(n,u).offsetTop-Nn(e,u).offsetTop};$t.default={updateHash:xl,getHash:El,filterElementInContainer:wl,scrollOffset:kl};var en={},Bn={};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.default={defaultEasing:function(e){return e<.5?Math.pow(e*2,2)/2:1-Math.pow((1-e)*2,2)/2},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var $n={};Object.defineProperty($n,"__esModule",{value:!0});var Ml=Bt,Pl=["mousedown","mousewheel","touchmove","keydown"];$n.default={subscribe:function(e){return typeof document<"u"&&Pl.forEach(function(n){return(0,Ml.addPassiveEventListener)(document,n,e)})}};var At={};Object.defineProperty(At,"__esModule",{value:!0});var An={registered:{},scrollEvent:{register:function(e,n){An.registered[e]=n},remove:function(e){An.registered[e]=null}}};At.default=An,Object.defineProperty(en,"__esModule",{value:!0});var Tl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ol=$t;tn(Ol);var Il=Bn,Ir=tn(Il),_l=$n,Rl=tn(_l),Dl=At,Qe=tn(Dl);function tn(t){return t&&t.__esModule?t:{default:t}}var _r=function(e){return Ir.default[e.smooth]||Ir.default.defaultEasing},jl=function(e){return typeof e=="function"?e:function(){return e}},Nl=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},zn=function(){return Nl()||function(t,e,n){window.setTimeout(t,n||1e3/60,new Date().getTime())}}(),Rr=function(){return{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null}},Dr=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollLeft;var o=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return o?window.pageXOffset:r?document.documentElement.scrollLeft:document.body.scrollLeft},jr=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollTop;var o=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return o?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop},Bl=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollWidth-n.offsetWidth;var o=document.body,r=document.documentElement;return Math.max(o.scrollWidth,o.offsetWidth,r.clientWidth,r.scrollWidth,r.offsetWidth)},$l=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollHeight-n.offsetHeight;var o=document.body,r=document.documentElement;return Math.max(o.scrollHeight,o.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)},Al=function t(e,n,o){var r=n.data;if(!n.ignoreCancelEvents&&r.cancel){Qe.default.registered.end&&Qe.default.registered.end(r.to,r.target,r.currentPositionY);return}if(r.delta=Math.round(r.targetPosition-r.startPosition),r.start===null&&(r.start=o),r.progress=o-r.start,r.percent=r.progress>=r.duration?1:e(r.progress/r.duration),r.currentPosition=r.startPosition+Math.ceil(r.delta*r.percent),r.containerElement&&r.containerElement!==document&&r.containerElement!==document.body?n.horizontal?r.containerElement.scrollLeft=r.currentPosition:r.containerElement.scrollTop=r.currentPosition:n.horizontal?window.scrollTo(r.currentPosition,0):window.scrollTo(0,r.currentPosition),r.percent<1){var s=t.bind(null,e,n);zn.call(window,s);return}Qe.default.registered.end&&Qe.default.registered.end(r.to,r.target,r.currentPosition)},Un=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},zt=function(e,n,o,r){n.data=n.data||Rr(),window.clearTimeout(n.data.delayTimeout);var s=function(){n.data.cancel=!0};if(Rl.default.subscribe(s),Un(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?Dr(n):jr(n),n.data.targetPosition=n.absolute?e:e+n.data.startPosition,n.data.startPosition===n.data.targetPosition){Qe.default.registered.end&&Qe.default.registered.end(n.data.to,n.data.target,n.data.currentPosition);return}n.data.delta=Math.round(n.data.targetPosition-n.data.startPosition),n.data.duration=jl(n.duration)(n.data.delta),n.data.duration=isNaN(parseFloat(n.data.duration))?1e3:parseFloat(n.data.duration),n.data.to=o,n.data.target=r;var a=_r(n),l=Al.bind(null,a,n);if(n&&n.delay>0){n.data.delayTimeout=window.setTimeout(function(){Qe.default.registered.begin&&Qe.default.registered.begin(n.data.to,n.data.target),zn.call(window,l)},n.delay);return}Qe.default.registered.begin&&Qe.default.registered.begin(n.data.to,n.data.target),zn.call(window,l)},nn=function(e){return e=Tl({},e),e.data=e.data||Rr(),e.absolute=!0,e},zl=function(e){zt(0,nn(e))},Ul=function(e,n){zt(e,nn(n))},Fl=function(e){e=nn(e),Un(e),zt(e.horizontal?Bl(e):$l(e),e)},Hl=function(e,n){n=nn(n),Un(n);var o=n.horizontal?Dr(n):jr(n);zt(e+o,n)};en.default={animateTopScroll:zt,getAnimationType:_r,scrollToTop:zl,scrollToBottom:Fl,scrollTo:Ul,scrollMore:Hl},Object.defineProperty(xt,"__esModule",{value:!0});var Wl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Vl=$t,Zl=Fn(Vl),Yl=en,Gl=Fn(Yl),ql=At,on=Fn(ql);function Fn(t){return t&&t.__esModule?t:{default:t}}var rn={},Nr=void 0;xt.default={unmount:function(){rn={}},register:function(e,n){rn[e]=n},unregister:function(e){delete rn[e]},get:function(e){return rn[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return Nr=e},getActiveLink:function(){return Nr},scrollTo:function(e,n){var o=this.get(e);if(!o){console.warn("target Element not found");return}n=Wl({},n,{absolute:!1});var r=n.containerId,s=n.container,a=void 0;r?a=document.getElementById(r):s&&s.nodeType?a=s:a=document,n.absolute=!0;var l=n.horizontal,u=Zl.default.scrollOffset(a,o,l)+(n.offset||0);if(!n.smooth){on.default.registered.begin&&on.default.registered.begin(e,o),a===document?n.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):a.scrollTop=u,on.default.registered.end&&on.default.registered.end(e,o);return}Gl.default.animateTopScroll(u,n,e,o)}};var Hn={exports:{}},sn={exports:{}},we={};/** @license React v16.13.1
|
71
|
+
</svg>`,l=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(Ze.isAdvancedMarkerAvailable(r)){const p=new DOMParser().parseFromString(a,"image/svg+xml").documentElement;p.setAttribute("transform","translate(0 25)");const d={map:r,position:n,zIndex:u,title:l,content:p};return new google.maps.marker.AdvancedMarkerElement(d)}const c={position:n,zIndex:u,title:l,icon:{url:`data:image/svg+xml;base64,${btoa(a)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}function Bs(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Tn{constructor(){Bs(Tn,google.maps.OverlayView)}}var Dt;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Dt||(Dt={}));const $s=(t,e,n)=>{n.fitBounds(e.bounds)};class As extends Tn{constructor({map:e,markers:n=[],algorithmOptions:o={},algorithm:r=new Ds(o),renderer:s=new Ns,onClusterClick:a=$s}){super(),this.markers=[...n],this.clusters=[],this.algorithm=r,this.renderer=s,this.onClusterClick=a,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(o=>{this.addMarker(o,!0)}),n||this.render()}removeMarker(e,n){const o=this.markers.indexOf(e);return o===-1?!1:(Ze.setMap(e,null),this.markers.splice(o,1),n||this.render(),!0)}removeMarkers(e,n){let o=!1;return e.forEach(r=>{o=this.removeMarker(r,!0)||o}),o&&!n&&this.render(),o}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Dt.CLUSTERING_BEGIN,this);const{clusters:n,changed:o}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(o||o==null){const r=new Set;for(const a of n)a.markers.length==1&&r.add(a.markers[0]);const s=[];for(const a of this.clusters)a.marker!=null&&(a.markers.length==1?r.has(a.marker)||Ze.setMap(a.marker,null):s.push(a.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>s.forEach(a=>Ze.setMap(a,null)))}google.maps.event.trigger(this,Dt.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>Ze.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new js(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(o=>{o.markers.length===1?o.marker=o.markers[0]:(o.marker=this.renderer.render(o,e,n),o.markers.forEach(r=>Ze.setMap(r,null)),this.onClusterClick&&o.marker.addListener("click",r=>{google.maps.event.trigger(this,Dt.CLUSTER_CLICK,o),this.onClusterClick(r,o,n)})),Ze.setMap(o.marker,n)})}}function zs(t){var e=qi(),n=i.useState(null),o=n[0],r=n[1];return i.useEffect(function(){if(e&&o===null){var s=new As(ee(ee({},t),{map:e}));r(s)}},[e]),o}function Us(t){var e=t.children,n=t.options,o=zs(n);return o!==null?e(o):null}i.memo(Us);var Uo={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Fo={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function Fs(t){var e=t.children,n=t.anchor,o=t.options,r=t.position,s=t.zIndex,a=t.onCloseClick,l=t.onDomReady,u=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,p=t.onLoad,d=t.onUnmount,h=i.useContext(ue),E=i.useState(null),m=E[0],C=E[1],x=i.useState(null),O=x[0],w=x[1],I=i.useState(null),v=I[0],b=I[1],M=i.useState(null),P=M[0],U=M[1],T=i.useState(null),z=T[0],X=T[1],A=i.useState(null),F=A[0],V=A[1],H=i.useRef(null);return i.useEffect(function(){m!==null&&(m.close(),n?m.open(h,n):m.getPosition()&&m.open(h))},[h,m,n]),i.useEffect(function(){o&&m!==null&&m.setOptions(o)},[m,o]),i.useEffect(function(){r&&m!==null&&m.setPosition(r)},[r]),i.useEffect(function(){typeof s=="number"&&m!==null&&m.setZIndex(s)},[s]),i.useEffect(function(){m&&a&&(O!==null&&google.maps.event.removeListener(O),w(google.maps.event.addListener(m,"closeclick",a)))},[a]),i.useEffect(function(){m&&l&&(v!==null&&google.maps.event.removeListener(v),b(google.maps.event.addListener(m,"domready",l)))},[l]),i.useEffect(function(){m&&u&&(P!==null&&google.maps.event.removeListener(P),U(google.maps.event.addListener(m,"content_changed",u)))},[u]),i.useEffect(function(){m&&c&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(m,"position_changed",c)))},[c]),i.useEffect(function(){m&&f&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(m,"zindex_changed",f)))},[f]),i.useEffect(function(){var $=new google.maps.InfoWindow(ee({},o||{}));return C($),H.current=document.createElement("div"),a&&w(google.maps.event.addListener($,"closeclick",a)),l&&b(google.maps.event.addListener($,"domready",l)),u&&U(google.maps.event.addListener($,"content_changed",u)),c&&X(google.maps.event.addListener($,"position_changed",c)),f&&V(google.maps.event.addListener($,"zindex_changed",f)),$.setContent(H.current),r&&$.setPosition(r),s&&$.setZIndex(s),n?$.open(h,n):$.getPosition()?$.open(h):$e(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),p&&p($),function(){O&&google.maps.event.removeListener(O),P&&google.maps.event.removeListener(P),v&&google.maps.event.removeListener(v),z&&google.maps.event.removeListener(z),F&&google.maps.event.removeListener(F),d&&d($),$.close()}},[]),H.current?pt.createPortal(i.Children.only(e),H.current):null}i.memo(Fs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(o,r){r?o.open(n.context,r):o.getPosition()?o.open(n.context):$e(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(ee({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=fe({updaterMap:Fo,eventMap:Uo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Fo,eventMap:Uo,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(pe(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?pt.createPortal(i.Children.only(this.props.children),this.containerElement):null},e.contextType=ue,e}(i.PureComponent);var Ho={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Wo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},Hs={};function Ws(t){var e=t.options,n=t.draggable,o=t.editable,r=t.visible,s=t.path,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,p=t.onMouseOut,d=t.onMouseOver,h=t.onMouseUp,E=t.onRightClick,m=t.onClick,C=t.onDrag,x=t.onLoad,O=t.onUnmount,w=i.useContext(ue),I=i.useState(null),v=I[0],b=I[1],M=i.useState(null),P=M[0],U=M[1],T=i.useState(null),z=T[0],X=T[1],A=i.useState(null),F=A[0],V=A[1],H=i.useState(null),$=H[0],W=H[1],Q=i.useState(null),k=Q[0],S=Q[1],D=i.useState(null),_=D[0],B=D[1],Y=i.useState(null),L=Y[0],q=Y[1],K=i.useState(null),R=K[0],G=K[1],oe=i.useState(null),j=oe[0],ce=oe[1],Ce=i.useState(null),me=Ce[0],he=Ce[1],Te=i.useState(null),Me=Te[0],le=Te[1];return i.useEffect(function(){v!==null&&v.setMap(w)},[w]),i.useEffect(function(){typeof e<"u"&&v!==null&&v.setOptions(e)},[v,e]),i.useEffect(function(){typeof n<"u"&&v!==null&&v.setDraggable(n)},[v,n]),i.useEffect(function(){typeof o<"u"&&v!==null&&v.setEditable(o)},[v,o]),i.useEffect(function(){typeof r<"u"&&v!==null&&v.setVisible(r)},[v,r]),i.useEffect(function(){typeof s<"u"&&v!==null&&v.setPath(s)},[v,s]),i.useEffect(function(){v&&a&&(P!==null&&google.maps.event.removeListener(P),U(google.maps.event.addListener(v,"dblclick",a)))},[a]),i.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(v,"dragend",l)))},[l]),i.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(v,"dragstart",u)))},[u]),i.useEffect(function(){v&&c&&($!==null&&google.maps.event.removeListener($),W(google.maps.event.addListener(v,"mousedown",c)))},[c]),i.useEffect(function(){v&&f&&(k!==null&&google.maps.event.removeListener(k),S(google.maps.event.addListener(v,"mousemove",f)))},[f]),i.useEffect(function(){v&&p&&(_!==null&&google.maps.event.removeListener(_),B(google.maps.event.addListener(v,"mouseout",p)))},[p]),i.useEffect(function(){v&&d&&(L!==null&&google.maps.event.removeListener(L),q(google.maps.event.addListener(v,"mouseover",d)))},[d]),i.useEffect(function(){v&&h&&(R!==null&&google.maps.event.removeListener(R),G(google.maps.event.addListener(v,"mouseup",h)))},[h]),i.useEffect(function(){v&&E&&(j!==null&&google.maps.event.removeListener(j),ce(google.maps.event.addListener(v,"rightclick",E)))},[E]),i.useEffect(function(){v&&m&&(me!==null&&google.maps.event.removeListener(me),he(google.maps.event.addListener(v,"click",m)))},[m]),i.useEffect(function(){v&&C&&(Me!==null&&google.maps.event.removeListener(Me),le(google.maps.event.addListener(v,"drag",C)))},[C]),i.useEffect(function(){var re=new google.maps.Polyline(ee(ee({},e||Hs),{map:w}));return s&&re.setPath(s),typeof r<"u"&&re.setVisible(r),typeof o<"u"&&re.setEditable(o),typeof n<"u"&&re.setDraggable(n),a&&U(google.maps.event.addListener(re,"dblclick",a)),l&&X(google.maps.event.addListener(re,"dragend",l)),u&&V(google.maps.event.addListener(re,"dragstart",u)),c&&W(google.maps.event.addListener(re,"mousedown",c)),f&&S(google.maps.event.addListener(re,"mousemove",f)),p&&B(google.maps.event.addListener(re,"mouseout",p)),d&&q(google.maps.event.addListener(re,"mouseover",d)),h&&G(google.maps.event.addListener(re,"mouseup",h)),E&&ce(google.maps.event.addListener(re,"rightclick",E)),m&&he(google.maps.event.addListener(re,"click",m)),C&&le(google.maps.event.addListener(re,"drag",C)),b(re),x&&x(re),function(){P!==null&&google.maps.event.removeListener(P),z!==null&&google.maps.event.removeListener(z),F!==null&&google.maps.event.removeListener(F),$!==null&&google.maps.event.removeListener($),k!==null&&google.maps.event.removeListener(k),_!==null&&google.maps.event.removeListener(_),L!==null&&google.maps.event.removeListener(L),R!==null&&google.maps.event.removeListener(R),j!==null&&google.maps.event.removeListener(j),me!==null&&google.maps.event.removeListener(me),O&&O(re),re.setMap(null)}},[]),null}i.memo(Ws),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Wo,eventMap:Ho,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Wo,eventMap:Ho,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),pe(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Vo={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Zo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function Vs(t){var e=t.options,n=t.draggable,o=t.editable,r=t.visible,s=t.path,a=t.paths,l=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,p=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,E=t.onMouseUp,m=t.onRightClick,C=t.onClick,x=t.onDrag,O=t.onLoad,w=t.onUnmount,I=t.onEdit,v=i.useContext(ue),b=i.useState(null),M=b[0],P=b[1],U=i.useState(null),T=U[0],z=U[1],X=i.useState(null),A=X[0],F=X[1],V=i.useState(null),H=V[0],$=V[1],W=i.useState(null),Q=W[0],k=W[1],S=i.useState(null),D=S[0],_=S[1],B=i.useState(null),Y=B[0],L=B[1],q=i.useState(null),K=q[0],R=q[1],G=i.useState(null),oe=G[0],j=G[1],ce=i.useState(null),Ce=ce[0],me=ce[1],he=i.useState(null),Te=he[0],Me=he[1],le=i.useState(null),re=le[0],Ne=le[1];return i.useEffect(function(){M!==null&&M.setMap(v)},[v]),i.useEffect(function(){typeof e<"u"&&M!==null&&M.setOptions(e)},[M,e]),i.useEffect(function(){typeof n<"u"&&M!==null&&M.setDraggable(n)},[M,n]),i.useEffect(function(){typeof o<"u"&&M!==null&&M.setEditable(o)},[M,o]),i.useEffect(function(){typeof r<"u"&&M!==null&&M.setVisible(r)},[M,r]),i.useEffect(function(){typeof s<"u"&&M!==null&&M.setPath(s)},[M,s]),i.useEffect(function(){typeof a<"u"&&M!==null&&M.setPaths(a)},[M,a]),i.useEffect(function(){M&&l&&(T!==null&&google.maps.event.removeListener(T),z(google.maps.event.addListener(M,"dblclick",l)))},[l]),i.useEffect(function(){M&&(google.maps.event.addListener(M.getPath(),"insert_at",function(){I==null||I(M)}),google.maps.event.addListener(M.getPath(),"set_at",function(){I==null||I(M)}))},[M,I]),i.useEffect(function(){M&&u&&(A!==null&&google.maps.event.removeListener(A),F(google.maps.event.addListener(M,"dragend",u)))},[u]),i.useEffect(function(){M&&c&&(H!==null&&google.maps.event.removeListener(H),$(google.maps.event.addListener(M,"dragstart",c)))},[c]),i.useEffect(function(){M&&f&&(Q!==null&&google.maps.event.removeListener(Q),k(google.maps.event.addListener(M,"mousedown",f)))},[f]),i.useEffect(function(){M&&p&&(D!==null&&google.maps.event.removeListener(D),_(google.maps.event.addListener(M,"mousemove",p)))},[p]),i.useEffect(function(){M&&d&&(Y!==null&&google.maps.event.removeListener(Y),L(google.maps.event.addListener(M,"mouseout",d)))},[d]),i.useEffect(function(){M&&h&&(K!==null&&google.maps.event.removeListener(K),R(google.maps.event.addListener(M,"mouseover",h)))},[h]),i.useEffect(function(){M&&E&&(oe!==null&&google.maps.event.removeListener(oe),j(google.maps.event.addListener(M,"mouseup",E)))},[E]),i.useEffect(function(){M&&m&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(M,"rightclick",m)))},[m]),i.useEffect(function(){M&&C&&(Te!==null&&google.maps.event.removeListener(Te),Me(google.maps.event.addListener(M,"click",C)))},[C]),i.useEffect(function(){M&&x&&(re!==null&&google.maps.event.removeListener(re),Ne(google.maps.event.addListener(M,"drag",x)))},[x]),i.useEffect(function(){var ae=new google.maps.Polygon(ee(ee({},e||{}),{map:v}));return s&&ae.setPath(s),a&&ae.setPaths(a),typeof r<"u"&&ae.setVisible(r),typeof o<"u"&&ae.setEditable(o),typeof n<"u"&&ae.setDraggable(n),l&&z(google.maps.event.addListener(ae,"dblclick",l)),u&&F(google.maps.event.addListener(ae,"dragend",u)),c&&$(google.maps.event.addListener(ae,"dragstart",c)),f&&k(google.maps.event.addListener(ae,"mousedown",f)),p&&_(google.maps.event.addListener(ae,"mousemove",p)),d&&L(google.maps.event.addListener(ae,"mouseout",d)),h&&R(google.maps.event.addListener(ae,"mouseover",h)),E&&j(google.maps.event.addListener(ae,"mouseup",E)),m&&me(google.maps.event.addListener(ae,"rightclick",m)),C&&Me(google.maps.event.addListener(ae,"click",C)),x&&Ne(google.maps.event.addListener(ae,"drag",x)),P(ae),O&&O(ae),function(){T!==null&&google.maps.event.removeListener(T),A!==null&&google.maps.event.removeListener(A),H!==null&&google.maps.event.removeListener(H),Q!==null&&google.maps.event.removeListener(Q),D!==null&&google.maps.event.removeListener(D),Y!==null&&google.maps.event.removeListener(Y),K!==null&&google.maps.event.removeListener(K),oe!==null&&google.maps.event.removeListener(oe),Ce!==null&&google.maps.event.removeListener(Ce),Te!==null&&google.maps.event.removeListener(Te),w&&w(ae),ae.setMap(null)}},[]),null}i.memo(Vs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Zo,eventMap:Vo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Zo,eventMap:Vo,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),pe(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Yo={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Go={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function Zs(t){var e=t.options,n=t.bounds,o=t.draggable,r=t.editable,s=t.visible,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,p=t.onMouseOut,d=t.onMouseOver,h=t.onMouseUp,E=t.onRightClick,m=t.onClick,C=t.onDrag,x=t.onBoundsChanged,O=t.onLoad,w=t.onUnmount,I=i.useContext(ue),v=i.useState(null),b=v[0],M=v[1],P=i.useState(null),U=P[0],T=P[1],z=i.useState(null),X=z[0],A=z[1],F=i.useState(null),V=F[0],H=F[1],$=i.useState(null),W=$[0],Q=$[1],k=i.useState(null),S=k[0],D=k[1],_=i.useState(null),B=_[0],Y=_[1],L=i.useState(null),q=L[0],K=L[1],R=i.useState(null),G=R[0],oe=R[1],j=i.useState(null),ce=j[0],Ce=j[1],me=i.useState(null),he=me[0],Te=me[1],Me=i.useState(null),le=Me[0],re=Me[1],Ne=i.useState(null),ae=Ne[0],Ae=Ne[1];return i.useEffect(function(){b!==null&&b.setMap(I)},[I]),i.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),i.useEffect(function(){typeof o<"u"&&b!==null&&b.setDraggable(o)},[b,o]),i.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),i.useEffect(function(){typeof s<"u"&&b!==null&&b.setVisible(s)},[b,s]),i.useEffect(function(){typeof n<"u"&&b!==null&&b.setBounds(n)},[b,n]),i.useEffect(function(){b&&a&&(U!==null&&google.maps.event.removeListener(U),T(google.maps.event.addListener(b,"dblclick",a)))},[a]),i.useEffect(function(){b&&l&&(X!==null&&google.maps.event.removeListener(X),A(google.maps.event.addListener(b,"dragend",l)))},[l]),i.useEffect(function(){b&&u&&(V!==null&&google.maps.event.removeListener(V),H(google.maps.event.addListener(b,"dragstart",u)))},[u]),i.useEffect(function(){b&&c&&(W!==null&&google.maps.event.removeListener(W),Q(google.maps.event.addListener(b,"mousedown",c)))},[c]),i.useEffect(function(){b&&f&&(S!==null&&google.maps.event.removeListener(S),D(google.maps.event.addListener(b,"mousemove",f)))},[f]),i.useEffect(function(){b&&p&&(B!==null&&google.maps.event.removeListener(B),Y(google.maps.event.addListener(b,"mouseout",p)))},[p]),i.useEffect(function(){b&&d&&(q!==null&&google.maps.event.removeListener(q),K(google.maps.event.addListener(b,"mouseover",d)))},[d]),i.useEffect(function(){b&&h&&(G!==null&&google.maps.event.removeListener(G),oe(google.maps.event.addListener(b,"mouseup",h)))},[h]),i.useEffect(function(){b&&E&&(ce!==null&&google.maps.event.removeListener(ce),Ce(google.maps.event.addListener(b,"rightclick",E)))},[E]),i.useEffect(function(){b&&m&&(he!==null&&google.maps.event.removeListener(he),Te(google.maps.event.addListener(b,"click",m)))},[m]),i.useEffect(function(){b&&C&&(le!==null&&google.maps.event.removeListener(le),re(google.maps.event.addListener(b,"drag",C)))},[C]),i.useEffect(function(){b&&x&&(ae!==null&&google.maps.event.removeListener(ae),Ae(google.maps.event.addListener(b,"bounds_changed",x)))},[x]),i.useEffect(function(){var te=new google.maps.Rectangle(ee(ee({},e||{}),{map:I}));return typeof s<"u"&&te.setVisible(s),typeof r<"u"&&te.setEditable(r),typeof o<"u"&&te.setDraggable(o),typeof n<"u"&&te.setBounds(n),a&&T(google.maps.event.addListener(te,"dblclick",a)),l&&A(google.maps.event.addListener(te,"dragend",l)),u&&H(google.maps.event.addListener(te,"dragstart",u)),c&&Q(google.maps.event.addListener(te,"mousedown",c)),f&&D(google.maps.event.addListener(te,"mousemove",f)),p&&Y(google.maps.event.addListener(te,"mouseout",p)),d&&K(google.maps.event.addListener(te,"mouseover",d)),h&&oe(google.maps.event.addListener(te,"mouseup",h)),E&&Ce(google.maps.event.addListener(te,"rightclick",E)),m&&Te(google.maps.event.addListener(te,"click",m)),C&&re(google.maps.event.addListener(te,"drag",C)),x&&Ae(google.maps.event.addListener(te,"bounds_changed",x)),M(te),O&&O(te),function(){U!==null&&google.maps.event.removeListener(U),X!==null&&google.maps.event.removeListener(X),V!==null&&google.maps.event.removeListener(V),W!==null&&google.maps.event.removeListener(W),S!==null&&google.maps.event.removeListener(S),B!==null&&google.maps.event.removeListener(B),q!==null&&google.maps.event.removeListener(q),G!==null&&google.maps.event.removeListener(G),ce!==null&&google.maps.event.removeListener(ce),he!==null&&google.maps.event.removeListener(he),le!==null&&google.maps.event.removeListener(le),ae!==null&&google.maps.event.removeListener(ae),w&&w(te),te.setMap(null)}},[]),null}i.memo(Zs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Go,eventMap:Yo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Go,eventMap:Yo,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),pe(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var qo={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Ko={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},Ys={};function Gs(t){var e=t.options,n=t.center,o=t.radius,r=t.draggable,s=t.editable,a=t.visible,l=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,p=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,E=t.onMouseUp,m=t.onRightClick,C=t.onClick,x=t.onDrag,O=t.onCenterChanged,w=t.onRadiusChanged,I=t.onLoad,v=t.onUnmount,b=i.useContext(ue),M=i.useState(null),P=M[0],U=M[1],T=i.useState(null),z=T[0],X=T[1],A=i.useState(null),F=A[0],V=A[1],H=i.useState(null),$=H[0],W=H[1],Q=i.useState(null),k=Q[0],S=Q[1],D=i.useState(null),_=D[0],B=D[1],Y=i.useState(null),L=Y[0],q=Y[1],K=i.useState(null),R=K[0],G=K[1],oe=i.useState(null),j=oe[0],ce=oe[1],Ce=i.useState(null),me=Ce[0],he=Ce[1],Te=i.useState(null),Me=Te[0],le=Te[1],re=i.useState(null),Ne=re[0],ae=re[1],Ae=i.useState(null),te=Ae[0],We=Ae[1],Xe=i.useState(null),Be=Xe[0],tt=Xe[1];return i.useEffect(function(){P!==null&&P.setMap(b)},[b]),i.useEffect(function(){typeof e<"u"&&P!==null&&P.setOptions(e)},[P,e]),i.useEffect(function(){typeof r<"u"&&P!==null&&P.setDraggable(r)},[P,r]),i.useEffect(function(){typeof s<"u"&&P!==null&&P.setEditable(s)},[P,s]),i.useEffect(function(){typeof a<"u"&&P!==null&&P.setVisible(a)},[P,a]),i.useEffect(function(){typeof o=="number"&&P!==null&&P.setRadius(o)},[P,o]),i.useEffect(function(){typeof n<"u"&&P!==null&&P.setCenter(n)},[P,n]),i.useEffect(function(){P&&l&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(P,"dblclick",l)))},[l]),i.useEffect(function(){P&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(P,"dragend",u)))},[u]),i.useEffect(function(){P&&c&&($!==null&&google.maps.event.removeListener($),W(google.maps.event.addListener(P,"dragstart",c)))},[c]),i.useEffect(function(){P&&f&&(k!==null&&google.maps.event.removeListener(k),S(google.maps.event.addListener(P,"mousedown",f)))},[f]),i.useEffect(function(){P&&p&&(_!==null&&google.maps.event.removeListener(_),B(google.maps.event.addListener(P,"mousemove",p)))},[p]),i.useEffect(function(){P&&d&&(L!==null&&google.maps.event.removeListener(L),q(google.maps.event.addListener(P,"mouseout",d)))},[d]),i.useEffect(function(){P&&h&&(R!==null&&google.maps.event.removeListener(R),G(google.maps.event.addListener(P,"mouseover",h)))},[h]),i.useEffect(function(){P&&E&&(j!==null&&google.maps.event.removeListener(j),ce(google.maps.event.addListener(P,"mouseup",E)))},[E]),i.useEffect(function(){P&&m&&(me!==null&&google.maps.event.removeListener(me),he(google.maps.event.addListener(P,"rightclick",m)))},[m]),i.useEffect(function(){P&&C&&(Me!==null&&google.maps.event.removeListener(Me),le(google.maps.event.addListener(P,"click",C)))},[C]),i.useEffect(function(){P&&x&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(P,"drag",x)))},[x]),i.useEffect(function(){P&&O&&(te!==null&&google.maps.event.removeListener(te),We(google.maps.event.addListener(P,"center_changed",O)))},[C]),i.useEffect(function(){P&&w&&(Be!==null&&google.maps.event.removeListener(Be),tt(google.maps.event.addListener(P,"radius_changed",w)))},[w]),i.useEffect(function(){var ve=new google.maps.Circle(ee(ee({},e||Ys),{map:b}));return typeof o=="number"&&ve.setRadius(o),typeof n<"u"&&ve.setCenter(n),typeof o=="number"&&ve.setRadius(o),typeof a<"u"&&ve.setVisible(a),typeof s<"u"&&ve.setEditable(s),typeof r<"u"&&ve.setDraggable(r),l&&X(google.maps.event.addListener(ve,"dblclick",l)),u&&V(google.maps.event.addListener(ve,"dragend",u)),c&&W(google.maps.event.addListener(ve,"dragstart",c)),f&&S(google.maps.event.addListener(ve,"mousedown",f)),p&&B(google.maps.event.addListener(ve,"mousemove",p)),d&&q(google.maps.event.addListener(ve,"mouseout",d)),h&&G(google.maps.event.addListener(ve,"mouseover",h)),E&&ce(google.maps.event.addListener(ve,"mouseup",E)),m&&he(google.maps.event.addListener(ve,"rightclick",m)),C&&le(google.maps.event.addListener(ve,"click",C)),x&&ae(google.maps.event.addListener(ve,"drag",x)),O&&We(google.maps.event.addListener(ve,"center_changed",O)),w&&tt(google.maps.event.addListener(ve,"radius_changed",w)),U(ve),I&&I(ve),function(){z!==null&&google.maps.event.removeListener(z),F!==null&&google.maps.event.removeListener(F),$!==null&&google.maps.event.removeListener($),k!==null&&google.maps.event.removeListener(k),_!==null&&google.maps.event.removeListener(_),L!==null&&google.maps.event.removeListener(L),R!==null&&google.maps.event.removeListener(R),j!==null&&google.maps.event.removeListener(j),me!==null&&google.maps.event.removeListener(me),Me!==null&&google.maps.event.removeListener(Me),te!==null&&google.maps.event.removeListener(te),Be!==null&&google.maps.event.removeListener(Be),v&&v(ve),ve.setMap(null)}},[]),null}i.memo(Gs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Ko,eventMap:qo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Ko,eventMap:qo,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),pe(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Xo={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Jo={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,o){t.loadGeoJson(e,n,o)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function qs(t){var e=t.options,n=t.onClick,o=t.onDblClick,r=t.onMouseDown,s=t.onMouseMove,a=t.onMouseOut,l=t.onMouseOver,u=t.onMouseUp,c=t.onRightClick,f=t.onAddFeature,p=t.onRemoveFeature,d=t.onRemoveProperty,h=t.onSetGeometry,E=t.onSetProperty,m=t.onLoad,C=t.onUnmount,x=i.useContext(ue),O=i.useState(null),w=O[0],I=O[1],v=i.useState(null),b=v[0],M=v[1],P=i.useState(null),U=P[0],T=P[1],z=i.useState(null),X=z[0],A=z[1],F=i.useState(null),V=F[0],H=F[1],$=i.useState(null),W=$[0],Q=$[1],k=i.useState(null),S=k[0],D=k[1],_=i.useState(null),B=_[0],Y=_[1],L=i.useState(null),q=L[0],K=L[1],R=i.useState(null),G=R[0],oe=R[1],j=i.useState(null),ce=j[0],Ce=j[1],me=i.useState(null),he=me[0],Te=me[1],Me=i.useState(null),le=Me[0],re=Me[1],Ne=i.useState(null),ae=Ne[0],Ae=Ne[1];return i.useEffect(function(){w!==null&&w.setMap(x)},[x]),i.useEffect(function(){w&&o&&(b!==null&&google.maps.event.removeListener(b),M(google.maps.event.addListener(w,"dblclick",o)))},[o]),i.useEffect(function(){w&&r&&(U!==null&&google.maps.event.removeListener(U),T(google.maps.event.addListener(w,"mousedown",r)))},[r]),i.useEffect(function(){w&&s&&(X!==null&&google.maps.event.removeListener(X),A(google.maps.event.addListener(w,"mousemove",s)))},[s]),i.useEffect(function(){w&&a&&(V!==null&&google.maps.event.removeListener(V),H(google.maps.event.addListener(w,"mouseout",a)))},[a]),i.useEffect(function(){w&&l&&(W!==null&&google.maps.event.removeListener(W),Q(google.maps.event.addListener(w,"mouseover",l)))},[l]),i.useEffect(function(){w&&u&&(S!==null&&google.maps.event.removeListener(S),D(google.maps.event.addListener(w,"mouseup",u)))},[u]),i.useEffect(function(){w&&c&&(B!==null&&google.maps.event.removeListener(B),Y(google.maps.event.addListener(w,"rightclick",c)))},[c]),i.useEffect(function(){w&&n&&(q!==null&&google.maps.event.removeListener(q),K(google.maps.event.addListener(w,"click",n)))},[n]),i.useEffect(function(){w&&f&&(G!==null&&google.maps.event.removeListener(G),oe(google.maps.event.addListener(w,"addfeature",f)))},[f]),i.useEffect(function(){w&&p&&(ce!==null&&google.maps.event.removeListener(ce),Ce(google.maps.event.addListener(w,"removefeature",p)))},[p]),i.useEffect(function(){w&&d&&(he!==null&&google.maps.event.removeListener(he),Te(google.maps.event.addListener(w,"removeproperty",d)))},[d]),i.useEffect(function(){w&&h&&(le!==null&&google.maps.event.removeListener(le),re(google.maps.event.addListener(w,"setgeometry",h)))},[h]),i.useEffect(function(){w&&E&&(ae!==null&&google.maps.event.removeListener(ae),Ae(google.maps.event.addListener(w,"setproperty",E)))},[E]),i.useEffect(function(){if(x!==null){var te=new google.maps.Data(ee(ee({},e||{}),{map:x}));o&&M(google.maps.event.addListener(te,"dblclick",o)),r&&T(google.maps.event.addListener(te,"mousedown",r)),s&&A(google.maps.event.addListener(te,"mousemove",s)),a&&H(google.maps.event.addListener(te,"mouseout",a)),l&&Q(google.maps.event.addListener(te,"mouseover",l)),u&&D(google.maps.event.addListener(te,"mouseup",u)),c&&Y(google.maps.event.addListener(te,"rightclick",c)),n&&K(google.maps.event.addListener(te,"click",n)),f&&oe(google.maps.event.addListener(te,"addfeature",f)),p&&Ce(google.maps.event.addListener(te,"removefeature",p)),d&&Te(google.maps.event.addListener(te,"removeproperty",d)),h&&re(google.maps.event.addListener(te,"setgeometry",h)),E&&Ae(google.maps.event.addListener(te,"setproperty",E)),I(te),m&&m(te)}return function(){w&&(b!==null&&google.maps.event.removeListener(b),U!==null&&google.maps.event.removeListener(U),X!==null&&google.maps.event.removeListener(X),V!==null&&google.maps.event.removeListener(V),W!==null&&google.maps.event.removeListener(W),S!==null&&google.maps.event.removeListener(S),B!==null&&google.maps.event.removeListener(B),q!==null&&google.maps.event.removeListener(q),G!==null&&google.maps.event.removeListener(G),ce!==null&&google.maps.event.removeListener(ce),he!==null&&google.maps.event.removeListener(he),le!==null&&google.maps.event.removeListener(le),ae!==null&&google.maps.event.removeListener(ae),C&&C(w),w.setMap(null))}},[]),null}i.memo(qs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Jo,eventMap:Xo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Jo,eventMap:Xo,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),pe(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Qo={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},er={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(ee(ee({},this.props.options),{map:this.context}));this.registeredEvents=fe({updaterMap:er,eventMap:Qo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:er,eventMap:Qo,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),pe(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(i.PureComponent);function tr(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function Ks(t,e){return new e(t.lat,t.lng)}function Xs(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Js(t,e,n){return t instanceof e?t:n(t,e)}function Qs(t,e,n){return t instanceof e?t:n(t,e)}function ea(t,e,n){var o=t&&t.fromLatLngToDivPixel(n.getNorthEast()),r=t&&t.fromLatLngToDivPixel(n.getSouthWest());return o&&r?{left:"".concat(r.x+e.x,"px"),top:"".concat(o.y+e.y,"px"),width:"".concat(o.x-r.x-e.x,"px"),height:"".concat(r.y-o.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function ta(t,e,n){var o=t&&t.fromLatLngToDivPixel(n);if(o){var r=o.x,s=o.y;return{left:"".concat(r+e.x,"px"),top:"".concat(s+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function nr(t,e,n,o){return n!==void 0?ea(t,e,Qs(n,google.maps.LatLngBounds,Xs)):ta(t,e,Js(o,google.maps.LatLng,Ks))}function na(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function oa(t,e,n,o,r){var s=function(a){Pe(l,a);function l(u,c,f,p){var d=a.call(this)||this;return d.container=u,d.pane=c,d.position=f,d.bounds=p,d}return l.prototype.onAdd=function(){var u,c=(u=this.getPanes())===null||u===void 0?void 0:u[this.pane];c==null||c.appendChild(this.container)},l.prototype.draw=function(){for(var u=this.getProjection(),c=ee({},this.container?tr(this.container,r):{x:0,y:0}),f=nr(u,c,this.bounds,this.position),p=0,d=Object.entries(f);p<d.length;p++){var h=d[p],E=h[0],m=h[1];this.container.style[E]=m}},l.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},l}(google.maps.OverlayView);return new s(t,e,n,o)}function or(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function rr(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function ra(t){var e=t.position,n=t.bounds,o=t.mapPaneName,r=t.zIndex,s=t.onLoad,a=t.onUnmount,l=t.getPixelPositionOffset,u=t.children,c=i.useContext(ue),f=i.useMemo(function(){var d=document.createElement("div");return d.style.position="absolute",d},[]),p=i.useMemo(function(){return oa(f,o,e,n,l)},[f,o,e,n]);return i.useEffect(function(){return s==null||s(p),p==null||p.setMap(c),function(){a==null||a(p),p==null||p.setMap(null)}},[c,p]),i.useEffect(function(){f.style.zIndex="".concat(r)},[r,f]),io.createPortal(u,f)}i.memo(ra),function(t){Pe(e,t);function e(n){var o=t.call(this,n)||this;o.state={paneEl:null,containerStyle:{position:"absolute"}},o.updatePane=function(){var s=o.props.mapPaneName,a=o.overlayView.getPanes();$e(!!s,"OverlayView requires props.mapPaneName but got %s",s),a?o.setState({paneEl:a[s]}):o.setState({paneEl:null})},o.onAdd=function(){var s,a;o.updatePane(),(a=(s=o.props).onLoad)===null||a===void 0||a.call(s,o.overlayView)},o.onPositionElement=function(){var s=o.overlayView.getProjection(),a=ee({x:0,y:0},o.containerRef.current?tr(o.containerRef.current,o.props.getPixelPositionOffset):{}),l=nr(s,a,o.props.bounds,o.props.position),u=o.state.containerStyle,c=u.left,f=u.top,p=u.width,d=u.height;na(l,{left:c,top:f,width:p,height:d})||o.setState({containerStyle:{top:l.top||0,left:l.left||0,width:l.width||0,height:l.height||0,position:"absolute"}})},o.draw=function(){o.onPositionElement()},o.onRemove=function(){var s,a;o.setState(function(){return{paneEl:null}}),(a=(s=o.props).onUnmount)===null||a===void 0||a.call(s,o.overlayView)},o.containerRef=i.createRef();var r=new google.maps.OverlayView;return r.onAdd=o.onAdd,r.draw=o.draw,r.onRemove=o.onRemove,o.overlayView=r,o}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var o=or(n.position),r=or(this.props.position),s=rr(n.bounds),a=rr(this.props.bounds);(o!==r||s!==a)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?io.createPortal(y.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:i.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=ue,e}(i.PureComponent);function ia(){}var ir={onDblClick:"dblclick",onClick:"click"},sr={opacity:function(t,e){t.setOpacity(e)}};function sa(t){var e=t.url,n=t.bounds,o=t.options,r=t.visible,s=i.useContext(ue),a=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),l=i.useMemo(function(){var u=new google.maps.GroundOverlay(e,a,ee({},o));return u},[]);return i.useEffect(function(){l!==null&&l.setMap(s)},[s]),i.useEffect(function(){typeof e<"u"&&l!==null&&(l.set("url",e),l.setMap(s))},[l,e]),i.useEffect(function(){typeof r<"u"&&l!==null&&l.setOpacity(r?1:0)},[l,r]),i.useEffect(function(){var u=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&l!==null&&(l.set("bounds",u),l.setMap(s))},[l,n]),null}i.memo(sa),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){$e(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,ee(ee({},this.props.options),{map:this.context}));this.registeredEvents=fe({updaterMap:sr,eventMap:ir,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:sr,eventMap:ir,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:ia},e.contextType=ue,e}(i.PureComponent);var ar={},lr={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function aa(t){var e=t.data,n=t.onLoad,o=t.onUnmount,r=t.options,s=i.useContext(ue),a=i.useState(null),l=a[0],u=a[1];return i.useEffect(function(){google.maps.visualization||$e(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),i.useEffect(function(){$e(!!e,"data property is required in HeatmapLayer %s",e)},[e]),i.useEffect(function(){l!==null&&l.setMap(s)},[s]),i.useEffect(function(){r&&l!==null&&l.setOptions(r)},[l,r]),i.useEffect(function(){var c=new google.maps.visualization.HeatmapLayer(ee(ee({},r||{}),{data:e,map:s}));return u(c),n&&n(c),function(){l!==null&&(o&&o(l),l.setMap(null))}},[]),null}i.memo(aa),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){$e(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),$e(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(ee(ee({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=fe({updaterMap:lr,eventMap:ar,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:lr,eventMap:ar,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),pe(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var ur={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},cr={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,o,r=(o=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&o!==void 0?o:null;this.registeredEvents=fe({updaterMap:cr,eventMap:ur,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{streetViewPanorama:r}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:cr,eventMap:ur,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),pe(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=ue,e})(i.PureComponent),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){$e(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e}(i.PureComponent);var dr={onDirectionsChanged:"directions_changed"},fr={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=fe({updaterMap:fr,eventMap:dr,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:fr,eventMap:dr,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),pe(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return y.jsx(y.Fragment,{})},e.contextType=ue,e})(i.PureComponent),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){$e(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e}(i.PureComponent);var pr={onPlacesChanged:"places_changed"},hr={bounds:function(t,e){t.setBounds(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=i.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if($e(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var o=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=fe({updaterMap:hr,eventMap:pr,prevProps:{},nextProps:this.props,instance:o}),this.setState(function(){return{searchBox:o}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:hr,eventMap:pr,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),pe(this.registeredEvents))},e.prototype.render=function(){return y.jsx("div",{ref:this.containerElement,children:i.Children.only(this.props.children)})},e.contextType=ue,e})(i.PureComponent);var gr={onPlaceChanged:"place_changed"},mr={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=i.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;$e(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var o=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(o){var r=new google.maps.places.Autocomplete(o,this.props.options);this.registeredEvents=fe({updaterMap:mr,eventMap:gr,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{autocomplete:r}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:mr,eventMap:gr,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&pe(this.registeredEvents)},e.prototype.render=function(){return y.jsx("div",{ref:this.containerElement,className:this.props.className,children:i.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=ue,e})(i.PureComponent);function la({coordinates:t,zoom:e=18,draggable:n=!1,googleMapsApiKey:o,className:r,...s}){return t?y.jsx("div",{className:"arkynGoogleMapPinned "+r,...s,children:y.jsx(os,{libraries:["maps","marker"],googleMapsApiKey:o,loadingElement:y.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...s,children:y.jsx(ke.LoaderIcon,{})}),children:y.jsx(ns,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:y.jsx(fs,{draggable:n,position:t})})})}):y.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...s,children:y.jsx(ke.MapPinned,{})})}function ua(t){const{className:e,...n}=t,o=`arkynSkeleton ${e}`;return y.jsx("aside",{className:o.trim(),...n})}function ca(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:o,...r}=t,s=`arkynTableBody ${n}`,a=i.Children.count(o)===0;return y.jsx("tbody",{className:s.trim(),...r,children:a?y.jsx("tr",{className:"arkynTableBodyEmptyLine",children:y.jsx("td",{colSpan:100,children:y.jsx("div",{children:e})})}):o})}function da(t){const{className:e,children:n,...o}=t,r=`arkynTableCaption ${e}`;return y.jsx("caption",{className:r.trim(),...o,children:y.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function fa(t){const{children:e,className:n,...o}=t,r=`arkynTableContainer ${n}`;return y.jsx("div",{className:r.trim(),...o,children:y.jsx("table",{children:e})})}function pa(t){const{className:e,children:n,...o}=t,r=`arkynTableFooter ${e}`;return y.jsxs("tfoot",{className:r.trim(),...o,children:[y.jsx("tr",{className:"spacingRow"}),y.jsx("tr",{children:y.jsx("th",{colSpan:100,children:y.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function ha(t){const{className:e,children:n,...o}=t,r=`arkynTableHeader ${e}`;return y.jsxs("thead",{className:r.trim(),...o,children:[y.jsx("tr",{children:n}),y.jsx("tr",{className:"spacingRow"})]})}function ga(t){const{isLoading:e=!1,scheme:n="primary",variant:o="solid",loadingText:r,size:s="md",leftIcon:a,rightIcon:l,disabled:u,className:c="",children:f,...p}=t,h={xs:12,sm:16,md:20,lg:24}[s],C=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${o} ${n} ${s} ${r?"loadingTextTrue":"loadingTextFalse"} ${c}`;return y.jsxs("button",{className:C,disabled:u||e,...p,children:[y.jsxs("div",{className:"arkynButtonSpinner",children:[y.jsx(ke.Loader2,{size:h,strokeWidth:2.5}),r&&r]}),y.jsxs("div",{className:"arkynButtonContent",children:[Yt(h,a),f,Yt(h,l)]})]})}const vr=i.createContext({});function ma(t){var f,p;const e=Ct.useActionData(),{children:n,className:o,...r}=t,s=i.useRef(null),a=((f=s.current)==null?void 0:f.name)||"",l=((p=e==null?void 0:e.fieldErrors)==null?void 0:p[a])||null,u=i.useId(),c=`arkynFormController ${o}`;return y.jsx(vr.Provider,{value:{error:l,id:u,inputRef:s},children:y.jsx("section",{className:c.trim(),...r,children:n})})}function Ke(){return i.useContext(vr)}function va(t){const{name:e,className:n="",size:o="md",isError:r,defaultChecked:s=!1,checked:a=null,onCheck:l,value:u,...c}=t,{id:f,inputRef:p,error:d}=Ke(),h=r||!!d,[E,m]=i.useState(s||!1),C=typeof a=="boolean"?a:E,w=`arkynCheckbox ${o} ${h?"errorTrue":"errorFalse"} ${C?"checkedTrue":"checkedFalse"} ${n}`;function I(){const v=E;m(!v),l&&l(v?"":u||"checked")}return y.jsxs("button",{id:f,type:"button",className:w,onClick:I,...c,children:[y.jsx("input",{type:"hidden",name:e,ref:p,value:C?u||"checked":""}),y.jsx(ke.Check,{})]})}function ya(t){const{children:e,className:n,...o}=t,r=`arkynFormError ${n}`,{error:s}=Ke();return e?y.jsx("strong",{className:r.trim(),...o,children:e}):s?y.jsx("strong",{className:r.trim(),...o,children:s}):y.jsx(y.Fragment,{})}function ba(t){const{showAsterisk:e=!1,className:n="",...o}=t,{id:r}=Ke(),a=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return y.jsx("label",{className:a.trim(),htmlFor:r,...o})}function La(t){const{isLoading:e=!1,scheme:n="primary",variant:o="solid",size:r="md",icon:s,disabled:a,className:l="",...u}=t,c={xs:12,sm:16,md:20,lg:24},p=`arkynIconButton ${o} ${n} ${r} ${e?"loadingTrue":"loadingFalse"} ${l}`;return y.jsxs("button",{disabled:a||e,className:p.trim(),...u,children:[y.jsx("div",{className:"arkynIconButtonSpinner",children:y.jsx(ke.Loader2,{size:c[r],strokeWidth:2.5})}),y.jsx("div",{className:"arkynIconButtonContent",children:y.jsx(s,{size:c[r],strokeWidth:2.5})})]})}function lt(t,e,n){if(!t)return y.jsx(y.Fragment,{});if(typeof t=="string")return y.jsx("p",{className:n,children:t});const o=t;return y.jsx("p",{className:n,children:y.jsx(o,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function On(t){return t&&t.replace(/[^0-9]/g,"")}function yr(t,e){let n="",o=0;return Array.from(t).forEach((r,s)=>{e[s+o].match(/[0-9]/)||(n+=e[s+o],o++),n+=r}),n}function br(t){return t.length>11?"CNPJ":"CPF"}const In={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},Lr=On(In.CNPJ).length;function Ca(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,defaultValue:d,readOnly:h,onFocus:E,onBlur:m,title:C,style:x,onChange:O,...w}=t;function I(F){let V=On(F);const H=br(V);if(!(V.length>Lr))return V=yr(V,In[H]),V}const v=f?"right":"left",z=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||h||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[r];return{isLoading:n,className:z,prefix:lt(l,A,"prefix"),sufix:lt(u,A,"sufix"),LeftIcon:c,RightIcon:f,defaultValue:I(d||""),disabled:p,readOnly:h,onFocus:E,onBlur:m,title:C,style:x,onChange:O,loadingPosition:v,iconSize:A,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...w}}function xa(t){const[e,n]=i.useState(!1),o=i.useRef(null),{inputRef:r,id:s,error:a}=Ke(),l=r||o,u=t.isError||!!a,{disabled:c,title:f,style:p,className:d,prefix:h,sufix:E,iconSize:m,loadingPosition:C,isLoading:x,LeftIcon:O,readOnly:w,onFocus:I,onBlur:v,RightIcon:b,Spinner:M,onChange:P,value:U,defaultValue:T,...z}=Ca({...t,id:s,isError:u},e),[X,A]=i.useState(T),F=O&&!x,V=b&&!x,H=C==="left"&&x,$=C==="right"&&x;function W(){c||!(l!=null&&l.current)||(n(!0),l.current.focus())}function Q(D){let _=On(D.target.value);const B=br(_);_.length>Lr||(_=yr(_,In[B]),D.target.value=_,A(_),P&&P(D))}function k(D){n(!0),I&&I(D)}function S(D){n(!1),v&&v(D)}return y.jsxs("section",{title:f,style:p,onClick:W,className:d,children:[h,H&&M,F&&y.jsx(O,{size:m,strokeWidth:2.5}),y.jsx("input",{disabled:c||x,readOnly:w,ref:l,value:U||X,onFocus:k,onChange:Q,onBlur:S,...z}),V&&y.jsx(b,{size:m,strokeWidth:2.5}),$&&M,E]})}const Ea=3,wa=(t="pt-BR",e,n="BRL",o=!0)=>new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e).slice(o?Ea:0),Xt=2,Cr=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),_n=t=>{let e=t;return typeof t=="string"?(e=Cr(t),e%1!==0&&(e=e.toFixed(Xt))):e=Number.isInteger(t)?Number(t)*10**Xt:t.toFixed(Xt),Cr(e)/10**Xt},xr=(t,e,n)=>{if(!e)return[0,""];const o=_n(e),r=wa(t,o,n);return[o,r]};function Sa(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,max:x=1e9,locale:O="pt-BR",currency:w="BRL",...I}=t,v=f?"right":"left",z=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||d||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[r];return{isLoading:n,className:z,prefix:lt(l,A,"prefix"),sufix:lt(u,A,"sufix"),LeftIcon:c,RightIcon:f,disabled:p,locale:O,currency:w,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,max:x,loadingPosition:v,iconSize:A,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...I}}function ka(t){const[e,n]=i.useState(!1),[o,r]=i.useState("0"),s=i.useRef(null),{inputRef:a,id:l,error:u}=Ke(),c=a||s,f=t.isError||!!u,{disabled:p,title:d,style:h,className:E,prefix:m,sufix:C,iconSize:x,loadingPosition:O,isLoading:w,LeftIcon:I,readOnly:v,onFocus:b,onBlur:M,RightIcon:P,Spinner:U,value:T,max:z,onChangeValue:X,onKeyPress:A,currency:F,locale:V,name:H,defaultValue:$,...W}=Sa({...t,id:l,isError:f},e),Q=I&&!w,k=P&&!w,S=O==="left"&&w,D=O==="right"&&w;function _(){p||!(c!=null&&c.current)||(n(!0),c.current.focus())}function B(R){n(!0),b&&b(R)}function Y(R){n(!1),M&&M(R)}const L=R=>{const[G,oe]=xr(V,R,F);return!z||G<=z?(r(oe),[G,oe]):[_n(o),o]},q=R=>{R.preventDefault();const[G,oe]=L(R.target.value);X(R,String(G),String(oe))},K=R=>A&&A(R,R.key,R.key);return i.useEffect(()=>{const R=T||+$||void 0,[,G]=xr(V,R,F);r(G)},[F,$,T]),y.jsxs("section",{title:d,style:h,onClick:_,className:E,children:[m,S&&U,Q&&y.jsx(I,{size:x,strokeWidth:2.5}),y.jsx("input",{value:o,onChange:q,onBlur:Y,onFocus:B,onKeyUp:K,disabled:p||w,readOnly:v,...W}),y.jsx("input",{type:"hidden",ref:c,name:H,value:_n(o)}),D&&U,k&&y.jsx(P,{size:x,strokeWidth:2.5}),C]})}function Ma(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,showMask:O=!1,type:w,...I}=t,v=f?"right":"left",z=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||d||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[r];return{isLoading:n,className:z,prefix:lt(l,A,"prefix"),sufix:lt(u,A,"sufix"),LeftIcon:c,RightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,loadingPosition:v,iconSize:A,showMask:O,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...I}}const Pa=i.forwardRef((t,e)=>y.jsx("input",{ref:e,...t}));function Ta(t){const[e,n]=i.useState(!1),o=i.useRef(null),{inputRef:r,id:s,error:a}=Ke(),l=r||o,u=t.isError||!!a,{disabled:c,title:f,style:p,className:d,prefix:h,sufix:E,iconSize:m,loadingPosition:C,isLoading:x,LeftIcon:O,readOnly:w,onFocus:I,onBlur:v,RightIcon:b,Spinner:M,...P}=Ma({...t,id:s,isError:u},e),U=O&&!x,T=b&&!x,z=C==="left"&&x,X=C==="right"&&x;function A(){c||!(l!=null&&l.current)||(n(!0),l.current.focus())}function F(H){n(!0),I&&I(H)}function V(H){n(!1),v&&v(H)}return y.jsxs("section",{title:f,style:p,onClick:A,className:d,children:[h,z&&M,U&&y.jsx(O,{size:m,strokeWidth:2.5}),y.jsx(Ti.InputMask,{component:Pa,ref:l,onFocus:F,onBlur:V,disabled:c,...P}),T&&y.jsx(b,{size:m,strokeWidth:2.5}),X&&M,E]})}function Oa(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,...O}=t,w=f?"right":"left",U=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||d||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,z={md:20,lg:20}[r];return{isLoading:n,className:U,prefix:lt(l,z,"prefix"),sufix:lt(u,z,"sufix"),LeftIcon:c,RightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,loadingPosition:w,iconSize:z,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...O}}function Ia(t){const[e,n]=i.useState(!1),o=i.useRef(null),{inputRef:r,id:s,error:a}=Ke(),l=r||o,u=t.isError||!!a,{disabled:c,title:f,style:p,className:d,prefix:h,sufix:E,iconSize:m,loadingPosition:C,isLoading:x,LeftIcon:O,readOnly:w,onFocus:I,onBlur:v,RightIcon:b,type:M,Spinner:P,...U}=Oa({...t,id:s,isError:u},e),T=O&&!x,z=b&&!x,X=C==="left"&&x,A=C==="right"&&x;function F(){c||!(l!=null&&l.current)||(n(!0),l.current.focus())}function V($){n(!0),I&&I($)}function H($){n(!1),v&&v($)}return M==="hidden"?y.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:l,...U}):y.jsxs("section",{title:f,style:p,onClick:F,className:d,children:[h,X&&P,T&&y.jsx(O,{size:m,strokeWidth:2.5}),y.jsx("input",{disabled:c||x,readOnly:w,ref:l,onFocus:V,onBlur:H,type:M,...U}),z&&y.jsx(b,{size:m,strokeWidth:2.5}),A&&P,E]})}function _a(t){return t.type==="currency"?y.jsx(ka,{...t}):t.type==="masked"?y.jsx(Ta,{...t}):t.type==="cpf-cnpj"?y.jsx(xa,{...t}):y.jsx(Ia,{...t})}const Er=i.createContext({});function Ra(){return i.useContext(Er)}function Da(t){const{defaultValue:e,name:n,value:o,onChange:r,size:s="md",className:a="",...l}=t,[u,c]=i.useState(e||""),{inputRef:f,id:p}=Ke();function d(E){c(E),r&&r(E)}const h=`arkynRadioGroup ${s} ${a}`;return y.jsxs(Er.Provider,{value:{onChange:d,value:o||u,size:s},children:[y.jsx("input",{style:{display:"none"},type:"text",id:p,readOnly:!0,name:n,ref:f,value:o||u}),y.jsx("div",{className:h.trim(),...l})]})}function ja(t){const{value:e,size:n,disabled:o,children:r,className:s="",...a}=t,{onChange:l,size:u,value:c}=Ra(),{error:f}=Ke(),m=`arkynRadioBox ${n||u} ${c===e?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${o?"disabledTrue":"disabledFalse"} ${s}`;return y.jsxs("label",{className:m.trim(),children:[y.jsx("button",{type:"button",disabled:o,onClick:()=>l(e),onFocus:()=>l(e),...a}),r]})}function Na(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,leftIcon:u,disabled:c,readOnly:f,onFocus:p,onBlur:d,title:h,style:E,closeOnSelect:m=!0,...C}=t,v=`arkyn_select ${l?"hasPrefix":""} ${a} ${r} ${c||f||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,M={md:20,lg:20}[r];return{isLoading:n,className:v,prefix:zi(l,M,"prefix"),LeftIcon:u,disabled:c||n||f,onFocus:p,onBlur:d,title:h,closeOnSelect:m,style:E,iconSize:M,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:M,strokeWidth:2.5}),...C}}function Ba(t){var D;const[e,n]=i.useState(!1),{inputRef:o,id:r,error:s}=Ke(),a=i.useRef(null),l=o||a,u=t.isError||!!s,{disabled:c,title:f,style:p,className:d,prefix:h,iconSize:E,isLoading:m,LeftIcon:C,value:x=null,defaultValue:O="",onFocus:w,onBlur:I,Spinner:v,name:b,placeholder:M,onSelect:P,options:U,optionMaxHeight:T,closeOnSelect:z,...X}=Na({...t,id:r,isError:u},e),[A,F]=i.useState(O);function V(){c||!(l!=null&&l.current)||e||(n(!0),l.current.focus())}function H(_){e||(n(!0),w&&w(_))}function $(){n(!1),I&&l.current&&l.current.blur()}function W(_){const{label:B,value:Y}=_;F(A!==Y?Y:""),P&&P({label:B,value:Y}),z&&$()}const Q=typeof x=="string"?x:A,k=((D=U.find(_=>_.value===Q))==null?void 0:D.label)||"",S=()=>{if(!e&&k)return!0;if(!e&&!k)return!1;if(e&&k)return!0;if(e&&!k)return!1};return y.jsxs(y.Fragment,{children:[y.jsxs("section",{title:f,style:p,onClick:V,className:`${d} placeholder_dark_${S()}`,children:[h,C&&y.jsx(C,{size:E,strokeWidth:2.5}),y.jsx("input",{disabled:c,readOnly:!0,placeholder:k||M,onFocus:H,...X}),y.jsx("input",{type:"hidden",ref:l,name:b,value:Q||"",readOnly:!0}),e&&y.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:T},children:[U.map(({label:_,value:B})=>y.jsxs("div",{onClick:()=>W({label:_,value:B}),className:Q===B?"arkyn_select_option active":"arkyn_select_option",children:[_," ",y.jsx(ke.Check,{})]},B)),U.length<=0&&y.jsx("p",{children:"Sem opções disponíveis"})]}),!m&&y.jsx(ke.ChevronDown,{className:"arkyn_select_arrow",size:E,strokeWidth:2.5}),m&&v]}),e&&y.jsx("aside",{className:"arkyn_select_overlay",onClick:$})]})}function $a(t){const{size:e="lg",defaultChecked:n=!1,checked:o=null,value:r,name:s,className:a="",onCheck:l,...u}=t,[c,f]=i.useState(n),{id:p,inputRef:d}=Ke(),h=typeof o=="boolean"?o:c;function E(){f(!c),l&&l(h?"":r||"checked")}const C=`arkynSwitch ${h?"checkedTrue":"checkedFalse"} ${e} ${a}`;return y.jsx("button",{id:p,type:"button",onClick:E,className:C,...u,children:y.jsx("input",{type:"hidden",name:s,ref:d,value:h?r||"checked":""})})}function Aa(t){const{variant:e="solid",size:n="md",className:o,disabled:r=!1,readOnly:s=!1,onFocus:a,onBlur:l,title:u,style:c,...f}=t,[p,d]=i.useState(!1),{inputRef:h,id:E,error:m}=Ke(),C=i.useRef(null),x=h||C,w=t.isError||!!m?"errorTrue":"errorFalse",b=`arkynTextarea ${e} ${n} ${r||s?"opacityTrue":"opacityFalse"} ${w} ${p?"focusedTrue":"focusedFalse"} ${o}`;function M(){r||!(x!=null&&x.current)||(d(!0),x.current.focus())}function P(T){d(!0),a&&a(T)}function U(T){d(!1),l&&l(T)}return y.jsx("section",{title:u,style:c,onClick:M,className:b,children:y.jsx("textarea",{id:E,disabled:r,readOnly:s,ref:x,onFocus:P,onBlur:U,...f})})}function za(t){const{className:e="",...n}=t,o=`arkynBreadcrumbContainer ${e}`;return y.jsx("nav",{className:o,...n})}function Ua(t){const{pathname:e}=Ct.useLocation(),{className:n="",disabled:o=!1,children:r,to:s,...a}=t,u=`arkynBreadcrumbLink ${e===s?"active":"inactive"} ${n}`;return o?y.jsxs("p",{className:u,children:[y.jsx(ke.ChevronRight,{size:14,strokeWidth:2.5}),r]}):y.jsxs(Ct.Link,{to:s,className:u,...a,children:[y.jsx(ke.ChevronRight,{size:14,strokeWidth:2.5}),r]})}function wr(t=""){const e=Ct.useLocation(),n=new URLSearchParams(e.search),o=t?`${t}:`:"",r=s=>{Object.entries(s).forEach(([a,l])=>{l===void 0?n.delete(`${o}${a}`):n.set(`${o}${a}`,String(l))})};return{getParam:s=>n.get(`${o}${s}`),getScopedSearch:s=>{r(s);let a=n.toString();return a&&(a="?"+a),a}}}function Fa(t){const{scope:e,totalCountRegisters:n,perPageKey:o="per_page",pageKey:r="page",siblingsCount:s=2,...a}=t,l=Ct.useNavigate(),{getParam:u,getScopedSearch:c}=wr(e),f=Number(u(r))||1,p=Number(u(o))||20,d=Math.ceil(n/p),h=Ai(f,s),E=$i(f,s,d);function m(C){l(c({page:C}))}return y.jsxs("div",{className:"arkynPagination",...a,children:[y.jsx("button",{className:"arkynPaginationIconButton",disabled:f<=1,onClick:()=>m(f-1),children:y.jsx(ke.ChevronLeft,{})}),f>1+s&&y.jsxs(y.Fragment,{children:[y.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>m(1),children:"1"}),f>2+s&&y.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:y.jsx(ke.Ellipsis,{})})]}),h.map((C,x)=>y.jsx("button",{onClick:()=>m(C),className:"arkynPaginationPageButton",children:C},x)),y.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:f}),E.map((C,x)=>y.jsx("button",{onClick:()=>m(C),className:"arkynPaginationPageButton",children:C},x)),f+s<d&&y.jsxs(y.Fragment,{children:[f+1+s<d&&y.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:y.jsx(ke.Ellipsis,{})}),y.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>m(d),children:d})]}),y.jsx("button",{className:"arkynPaginationIconButton",disabled:f>=d,onClick:()=>m(f+1),children:y.jsx(ke.ChevronRight,{})})]})}const Rn=i.createContext({});function Ha(){if(!Rn)throw new Error("useTabContext must be used within a TabProvider");return i.useContext(Rn)}function Wa(t){const{children:e,onClick:n,defaultActive:o,className:r,...s}=t,[a,l]=i.useState(o||""),[u,c]=i.useState(!0),f=i.useRef(null),p=`arkynTabContainer ${r||""}`,[d,h]=i.useState({width:"0px",left:"0px",transition:"none"}),E=(C,x)=>{const O=C.getBoundingClientRect(),w=f.current.getBoundingClientRect(),I=x?void 0:"none";c(!1),h({transition:I,width:`${O.width}px`,left:`${O.left-w.left}px`})};i.useEffect(()=>{const C=f.current;if(!C)return;let x=null;x=C.querySelector("button.active"),x&&E(x)},[]);const m=C=>{const x=C.target;x&&(l(x.value),x.classList.add("active"),E(x,!0),n&&n(x.value))};return y.jsxs("nav",{ref:f,className:p.trim(),...s,children:[y.jsx(Rn.Provider,{value:{handleTabClick:m,showInitialTab:u,value:a},children:e}),y.jsx("div",{className:"activeLine",style:d})]})}function Va(t){const{children:e,className:n="",onClick:o,...r}=t,{value:s,showInitialTab:a,handleTabClick:l}=Ha(),u=s===r.value&&s?"activeTrue":"activeFalse",f=`arkynTabButton ${s===r.value&&a?"showBorderBottom":""} ${u} ${n}`;function p(d){l(d),o&&o(d)}return y.jsx("button",{onClick:p,className:f.trim(),...r,children:e})}const Sr=i.createContext({});function Za(t){const{isVisibled:e,makeInvisible:n,orientation:o="left",children:r,className:s,...a}=t,l=o==="left"?"-100%":"100%",c=`arkynDrawerContainer ${o} ${e?"visibleTrue":"visibleFalse"} ${s}`;return y.jsx(Sr.Provider,{value:{makeInvisible:n},children:y.jsx(ht.AnimatePresence,{children:e&&y.jsxs("aside",{className:c.trim(),...a,children:[y.jsx(ht.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),y.jsx(ht.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${l})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${l})`},children:r})]})})})}function Ya(t){const{showCloseButton:e=!0,className:n,children:o,...r}=t,{makeInvisible:s}=i.useContext(Sr),a=`arkynDrawerHeader ${n}`;return y.jsxs("header",{className:a.trim(),...r,children:[o,e&&y.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:s,"aria-label":"Close drawer",children:y.jsx(ke.X,{size:24})})]})}const kr=i.createContext({});function Ga(t){const{isVisibled:e,makeInvisible:n,children:o,className:r="",...s}=t,l=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${r}`;return y.jsx(kr.Provider,{value:{makeInvisible:n},children:y.jsx(ht.AnimatePresence,{children:e&&y.jsxs("aside",{className:l.trim(),...s,children:[y.jsx(ht.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),y.jsx(ht.motion.div,{className:"arkynModalContainerContent",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:o})]})})})}function qa(t){const{alignment:e="right",className:n,...o}=t,r=`arkynModalFooter ${e} ${n}`;return y.jsx("footer",{className:r.trim(),...o})}function Ka(t){const{showCloseButton:e=!0,className:n,children:o,...r}=t,{makeInvisible:s}=i.useContext(kr),a=`arkynModalHeader ${n}`;return y.jsxs("header",{className:a.trim(),...r,children:[o,e&&y.jsx("button",{type:"button",onClick:s,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:y.jsx(ke.X,{size:24})})]})}function Xa(t){const{children:e,button:n,closeOnClick:o,orientation:r="bottomLeft"}=t,[s,a]=i.useState(!1),u=`arkynPopover ${r} ${s?"visibleTrue":"visibleFalse"}`;function c(){s||a(!0)}return y.jsxs("div",{className:u,onClick:c,children:[n,y.jsx(ht.motion.div,{style:{visibility:s?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:s?1:0},exit:{opacity:0},onClick:()=>o&&a(!1),className:"arkynPopoverContent",children:e}),s&&y.jsx("div",{onClick:()=>a(!1),className:"arkynPopoverOverlay"})]})}function Mr(t){const{message:e,title:n,type:o,size:r="lg"}=t,s=`arkynToast ${o} ${r}`;function a(){switch(o){case"info":return y.jsx(ke.Info,{});case"success":return y.jsx(ke.CheckCircle2,{});case"danger":return y.jsx(ke.XCircle,{});case"warning":return y.jsx(ke.AlertCircle,{});default:return y.jsx(ke.Info,{})}}return y.jsxs("aside",{className:s,children:[y.jsxs("div",{children:[y.jsx("div",{className:"bg"}),y.jsx(a,{})]}),y.jsxs("p",{children:[y.jsx("strong",{title:n,children:n}),y.jsx("span",{children:e})]})]})}function Ja(t){const{text:e,size:n="lg",children:o,orientation:r="top",className:s="",...a}=t,l=`arkynTooltip ${n} ${r} ${s}`;return y.jsxs("div",{className:l.trim(),...a,children:[o,y.jsx("div",{className:"arkynTooltipText",children:e})]})}var je={},Dn={},jt={},Nt={},Pr="Expected a function",Tr=NaN,Qa="[object Symbol]",el=/^\s+|\s+$/g,tl=/^[-+]0x[0-9a-f]+$/i,nl=/^0b[01]+$/i,ol=/^0o[0-7]+$/i,rl=parseInt,il=typeof Zt=="object"&&Zt&&Zt.Object===Object&&Zt,sl=typeof self=="object"&&self&&self.Object===Object&&self,al=il||sl||Function("return this")(),ll=Object.prototype,ul=ll.toString,cl=Math.max,dl=Math.min,jn=function(){return al.Date.now()};function fl(t,e,n){var o,r,s,a,l,u,c=0,f=!1,p=!1,d=!0;if(typeof t!="function")throw new TypeError(Pr);e=Or(e)||0,Jt(n)&&(f=!!n.leading,p="maxWait"in n,s=p?cl(Or(n.maxWait)||0,e):s,d="trailing"in n?!!n.trailing:d);function h(b){var M=o,P=r;return o=r=void 0,c=b,a=t.apply(P,M),a}function E(b){return c=b,l=setTimeout(x,e),f?h(b):a}function m(b){var M=b-u,P=b-c,U=e-M;return p?dl(U,s-P):U}function C(b){var M=b-u,P=b-c;return u===void 0||M>=e||M<0||p&&P>=s}function x(){var b=jn();if(C(b))return O(b);l=setTimeout(x,m(b))}function O(b){return l=void 0,d&&o?h(b):(o=r=void 0,a)}function w(){l!==void 0&&clearTimeout(l),c=0,o=u=r=l=void 0}function I(){return l===void 0?a:O(jn())}function v(){var b=jn(),M=C(b);if(o=arguments,r=this,u=b,M){if(l===void 0)return E(u);if(p)return l=setTimeout(x,e),h(u)}return l===void 0&&(l=setTimeout(x,e)),a}return v.cancel=w,v.flush=I,v}function pl(t,e,n){var o=!0,r=!0;if(typeof t!="function")throw new TypeError(Pr);return Jt(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),fl(t,e,{leading:o,maxWait:e,trailing:r})}function Jt(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function hl(t){return!!t&&typeof t=="object"}function gl(t){return typeof t=="symbol"||hl(t)&&ul.call(t)==Qa}function Or(t){if(typeof t=="number")return t;if(gl(t))return Tr;if(Jt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Jt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(el,"");var n=nl.test(t);return n||ol.test(t)?rl(t.slice(2),n?2:8):tl.test(t)?Tr:+t}var ml=pl,Bt={};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.addPassiveEventListener=function(e,n,o){var r=o.name;r||(r=n,console.warn("Listener must be a named function.")),Qt.has(n)||Qt.set(n,new Set);var s=Qt.get(n);if(!s.has(r)){var a=function(){var l=!1;try{var u=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("test",null,u)}catch{}return l}();e.addEventListener(n,o,a?{passive:!0}:!1),s.add(r)}},Bt.removePassiveEventListener=function(e,n,o){e.removeEventListener(n,o),Qt.get(n).delete(o.name||n)};var Qt=new Map;Object.defineProperty(Nt,"__esModule",{value:!0});var vl=ml,yl=Ll(vl),bl=Bt;function Ll(t){return t&&t.__esModule?t:{default:t}}var Cl=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,yl.default)(e,n)},_e={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,n){if(e){var o=Cl(function(r){_e.scrollHandler(e)},n);_e.scrollSpyContainers.push(e),(0,bl.addPassiveEventListener)(e,"scroll",o)}},isMounted:function(e){return _e.scrollSpyContainers.indexOf(e)!==-1},currentPositionX:function(e){if(e===document){var n=window.pageYOffset!==void 0,o=(document.compatMode||"")==="CSS1Compat";return n?window.pageXOffset:o?document.documentElement.scrollLeft:document.body.scrollLeft}else return e.scrollLeft},currentPositionY:function(e){if(e===document){var n=window.pageXOffset!==void 0,o=(document.compatMode||"")==="CSS1Compat";return n?window.pageYOffset:o?document.documentElement.scrollTop:document.body.scrollTop}else return e.scrollTop},scrollHandler:function(e){var n=_e.scrollSpyContainers[_e.scrollSpyContainers.indexOf(e)].spyCallbacks||[];n.forEach(function(o){return o(_e.currentPositionX(e),_e.currentPositionY(e))})},addStateHandler:function(e){_e.spySetState.push(e)},addSpyHandler:function(e,n){var o=_e.scrollSpyContainers[_e.scrollSpyContainers.indexOf(n)];o.spyCallbacks||(o.spyCallbacks=[]),o.spyCallbacks.push(e),e(_e.currentPositionX(n),_e.currentPositionY(n))},updateStates:function(){_e.spySetState.forEach(function(e){return e()})},unmount:function(e,n){_e.scrollSpyContainers.forEach(function(o){return o.spyCallbacks&&o.spyCallbacks.length&&o.spyCallbacks.indexOf(n)>-1&&o.spyCallbacks.splice(o.spyCallbacks.indexOf(n),1)}),_e.spySetState&&_e.spySetState.length&&_e.spySetState.indexOf(e)>-1&&_e.spySetState.splice(_e.spySetState.indexOf(e),1),document.removeEventListener("scroll",_e.scrollHandler)},update:function(){return _e.scrollSpyContainers.forEach(function(e){return _e.scrollHandler(e)})}};Nt.default=_e;var xt={},$t={};Object.defineProperty($t,"__esModule",{value:!0});var xl=function(e,n){var o=e.indexOf("#")===0?e.substring(1):e,r=o?"#"+o:"",s=window&&window.location,a=r?s.pathname+s.search+r:s.pathname+s.search;n?history.pushState(history.state,"",a):history.replaceState(history.state,"",a)},El=function(){return window.location.hash.replace(/^#/,"")},wl=function(e){return function(n){return e.contains?e!=n&&e.contains(n):!!(e.compareDocumentPosition(n)&16)}},Sl=function(e){return getComputedStyle(e).position!=="static"},Nn=function(e,n){for(var o=e.offsetTop,r=e.offsetParent;r&&!n(r);)o+=r.offsetTop,r=r.offsetParent;return{offsetTop:o,offsetParent:r}},kl=function(e,n,o){if(o)return e===document?n.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(e).position!=="static"?n.offsetLeft:n.offsetLeft-e.offsetLeft;if(e===document)return n.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(Sl(e)){if(n.offsetParent!==e){var r=function(f){return f===e||f===document},s=Nn(n,r),a=s.offsetTop,l=s.offsetParent;if(l!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return a}return n.offsetTop}if(n.offsetParent===e.offsetParent)return n.offsetTop-e.offsetTop;var u=function(f){return f===document};return Nn(n,u).offsetTop-Nn(e,u).offsetTop};$t.default={updateHash:xl,getHash:El,filterElementInContainer:wl,scrollOffset:kl};var en={},Bn={};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.default={defaultEasing:function(e){return e<.5?Math.pow(e*2,2)/2:1-Math.pow((1-e)*2,2)/2},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var $n={};Object.defineProperty($n,"__esModule",{value:!0});var Ml=Bt,Pl=["mousedown","mousewheel","touchmove","keydown"];$n.default={subscribe:function(e){return typeof document<"u"&&Pl.forEach(function(n){return(0,Ml.addPassiveEventListener)(document,n,e)})}};var At={};Object.defineProperty(At,"__esModule",{value:!0});var An={registered:{},scrollEvent:{register:function(e,n){An.registered[e]=n},remove:function(e){An.registered[e]=null}}};At.default=An,Object.defineProperty(en,"__esModule",{value:!0});var Tl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ol=$t;tn(Ol);var Il=Bn,Ir=tn(Il),_l=$n,Rl=tn(_l),Dl=At,Qe=tn(Dl);function tn(t){return t&&t.__esModule?t:{default:t}}var _r=function(e){return Ir.default[e.smooth]||Ir.default.defaultEasing},jl=function(e){return typeof e=="function"?e:function(){return e}},Nl=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},zn=function(){return Nl()||function(t,e,n){window.setTimeout(t,n||1e3/60,new Date().getTime())}}(),Rr=function(){return{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null}},Dr=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollLeft;var o=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return o?window.pageXOffset:r?document.documentElement.scrollLeft:document.body.scrollLeft},jr=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollTop;var o=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return o?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop},Bl=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollWidth-n.offsetWidth;var o=document.body,r=document.documentElement;return Math.max(o.scrollWidth,o.offsetWidth,r.clientWidth,r.scrollWidth,r.offsetWidth)},$l=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollHeight-n.offsetHeight;var o=document.body,r=document.documentElement;return Math.max(o.scrollHeight,o.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)},Al=function t(e,n,o){var r=n.data;if(!n.ignoreCancelEvents&&r.cancel){Qe.default.registered.end&&Qe.default.registered.end(r.to,r.target,r.currentPositionY);return}if(r.delta=Math.round(r.targetPosition-r.startPosition),r.start===null&&(r.start=o),r.progress=o-r.start,r.percent=r.progress>=r.duration?1:e(r.progress/r.duration),r.currentPosition=r.startPosition+Math.ceil(r.delta*r.percent),r.containerElement&&r.containerElement!==document&&r.containerElement!==document.body?n.horizontal?r.containerElement.scrollLeft=r.currentPosition:r.containerElement.scrollTop=r.currentPosition:n.horizontal?window.scrollTo(r.currentPosition,0):window.scrollTo(0,r.currentPosition),r.percent<1){var s=t.bind(null,e,n);zn.call(window,s);return}Qe.default.registered.end&&Qe.default.registered.end(r.to,r.target,r.currentPosition)},Un=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},zt=function(e,n,o,r){n.data=n.data||Rr(),window.clearTimeout(n.data.delayTimeout);var s=function(){n.data.cancel=!0};if(Rl.default.subscribe(s),Un(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?Dr(n):jr(n),n.data.targetPosition=n.absolute?e:e+n.data.startPosition,n.data.startPosition===n.data.targetPosition){Qe.default.registered.end&&Qe.default.registered.end(n.data.to,n.data.target,n.data.currentPosition);return}n.data.delta=Math.round(n.data.targetPosition-n.data.startPosition),n.data.duration=jl(n.duration)(n.data.delta),n.data.duration=isNaN(parseFloat(n.data.duration))?1e3:parseFloat(n.data.duration),n.data.to=o,n.data.target=r;var a=_r(n),l=Al.bind(null,a,n);if(n&&n.delay>0){n.data.delayTimeout=window.setTimeout(function(){Qe.default.registered.begin&&Qe.default.registered.begin(n.data.to,n.data.target),zn.call(window,l)},n.delay);return}Qe.default.registered.begin&&Qe.default.registered.begin(n.data.to,n.data.target),zn.call(window,l)},nn=function(e){return e=Tl({},e),e.data=e.data||Rr(),e.absolute=!0,e},zl=function(e){zt(0,nn(e))},Ul=function(e,n){zt(e,nn(n))},Fl=function(e){e=nn(e),Un(e),zt(e.horizontal?Bl(e):$l(e),e)},Hl=function(e,n){n=nn(n),Un(n);var o=n.horizontal?Dr(n):jr(n);zt(e+o,n)};en.default={animateTopScroll:zt,getAnimationType:_r,scrollToTop:zl,scrollToBottom:Fl,scrollTo:Ul,scrollMore:Hl},Object.defineProperty(xt,"__esModule",{value:!0});var Wl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Vl=$t,Zl=Fn(Vl),Yl=en,Gl=Fn(Yl),ql=At,on=Fn(ql);function Fn(t){return t&&t.__esModule?t:{default:t}}var rn={},Nr=void 0;xt.default={unmount:function(){rn={}},register:function(e,n){rn[e]=n},unregister:function(e){delete rn[e]},get:function(e){return rn[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return Nr=e},getActiveLink:function(){return Nr},scrollTo:function(e,n){var o=this.get(e);if(!o){console.warn("target Element not found");return}n=Wl({},n,{absolute:!1});var r=n.containerId,s=n.container,a=void 0;r?a=document.getElementById(r):s&&s.nodeType?a=s:a=document,n.absolute=!0;var l=n.horizontal,u=Zl.default.scrollOffset(a,o,l)+(n.offset||0);if(!n.smooth){on.default.registered.begin&&on.default.registered.begin(e,o),a===document?n.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):a.scrollTop=u,on.default.registered.end&&on.default.registered.end(e,o);return}Gl.default.animateTopScroll(u,n,e,o)}};var Hn={exports:{}},sn={exports:{}},we={};/** @license React v16.13.1
|
72
72
|
* react-is.production.min.js
|
73
73
|
*
|
74
74
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
@@ -6,11 +6,11 @@ function Switch(props) {
|
|
6
6
|
const { size = "lg", defaultChecked = false, checked: baseChecked = null, value, name, className: baseClassName = "", onCheck, ...rest } = props;
|
7
7
|
const [isChecked, setIsChecked] = useState(defaultChecked);
|
8
8
|
const { id, inputRef } = useFormController();
|
9
|
+
const currentChecked = typeof baseChecked === "boolean" ? baseChecked : isChecked;
|
9
10
|
function handleCheck() {
|
10
11
|
setIsChecked(!isChecked);
|
11
|
-
onCheck && onCheck(!
|
12
|
+
onCheck && onCheck(!currentChecked ? value || "checked" : "");
|
12
13
|
}
|
13
|
-
const currentChecked = typeof baseChecked === "boolean" ? baseChecked : isChecked;
|
14
14
|
const checkedClass = currentChecked ? "checkedTrue" : "checkedFalse";
|
15
15
|
const className = `arkynSwitch ${checkedClass} ${size} ${baseClassName}`;
|
16
16
|
return (_jsx("button", { id: id, type: "button", onClick: handleCheck, className: className, ...rest, children: _jsx("input", { type: "hidden", name: name, ref: inputRef, value: currentChecked ? value || "checked" : "" }) }));
|
package/package.json
CHANGED
@@ -19,14 +19,14 @@ function Switch(props: SwitchProps) {
|
|
19
19
|
const [isChecked, setIsChecked] = useState(defaultChecked);
|
20
20
|
const { id, inputRef } = useFormController();
|
21
21
|
|
22
|
+
const currentChecked =
|
23
|
+
typeof baseChecked === "boolean" ? baseChecked : isChecked;
|
24
|
+
|
22
25
|
function handleCheck() {
|
23
26
|
setIsChecked(!isChecked);
|
24
|
-
onCheck && onCheck(!
|
27
|
+
onCheck && onCheck(!currentChecked ? value || "checked" : "");
|
25
28
|
}
|
26
29
|
|
27
|
-
const currentChecked =
|
28
|
-
typeof baseChecked === "boolean" ? baseChecked : isChecked;
|
29
|
-
|
30
30
|
const checkedClass = currentChecked ? "checkedTrue" : "checkedFalse";
|
31
31
|
const className = `arkynSwitch ${checkedClass} ${size} ${baseClassName}`;
|
32
32
|
|