@omnic/widget-locations 1.1.31 → 1.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
2
|
import type { BottomSheetProps } from "react-spring-bottom-sheet";
|
|
3
3
|
interface PointSheetProps extends BottomSheetProps {
|
|
4
4
|
children: ReactNode;
|
|
@@ -8,5 +8,5 @@ interface PointSheetProps extends BottomSheetProps {
|
|
|
8
8
|
submitLoading?: boolean;
|
|
9
9
|
onSubmitClick?: () => void;
|
|
10
10
|
}
|
|
11
|
-
export declare const PointSheet:
|
|
11
|
+
export declare const PointSheet: import("react").MemoExoticComponent<({ children, hideFooter, minSnapHeight, onSubmitClick, open, submitDisabled, submitLoading, ...props }: PointSheetProps) => import("react/jsx-runtime").JSX.Element>;
|
|
12
12
|
export {};
|
package/dist/lib/widget.cjs.js
CHANGED
|
@@ -149,4 +149,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
149
149
|
*/var Qh=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],vs=Qh.join(","),Jh=typeof Element>"u",pr=Jh?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,dl=!Jh&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},Xh=function(e,n,r){var i=Array.prototype.slice.apply(e.querySelectorAll(vs));return n&&pr.call(e,vs)&&i.unshift(e),i=i.filter(r),i},Yh=function t(e,n,r){for(var i=[],o=Array.from(e);o.length;){var s=o.shift();if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,u=t(l,!0,r);r.flatten?i.push.apply(i,u):i.push({scope:s,candidates:u})}else{var f=pr.call(s,vs);f&&r.filter(s)&&(n||!e.includes(s))&&i.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),h=!r.shadowRootFilter||r.shadowRootFilter(s);if(d&&h){var v=t(d===!0?s.children:d.children,!0,r);r.flatten?i.push.apply(i,v):i.push({scope:s,candidates:v})}else o.unshift.apply(o,s.children)}}return i},ep=function(e,n){return e.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},sL=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},tp=function(e){return e.tagName==="INPUT"},aL=function(e){return tp(e)&&e.type==="hidden"},lL=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},uL=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},cL=function(e){if(!e.name)return!0;var n=e.form||dl(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var o=uL(i,e.form);return!o||o===e},fL=function(e){return tp(e)&&e.type==="radio"},dL=function(e){return fL(e)&&!cL(e)},Kc=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},hL=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=pr.call(e,"details>summary:first-of-type"),s=o?e.parentElement:e;if(pr.call(s,"details:not([open]) *"))return!0;var a=dl(e).host,l=(a==null?void 0:a.ownerDocument.contains(a))||e.ownerDocument.contains(e);if(!r||r==="full"){if(typeof i=="function"){for(var u=e;e;){var f=e.parentElement,d=dl(e);if(f&&!f.shadowRoot&&i(f)===!0)return Kc(e);e.assignedSlot?e=e.assignedSlot:!f&&d!==e.ownerDocument?e=d.host:e=f}e=u}if(l)return!e.getClientRects().length}else if(r==="non-zero-area")return Kc(e);return!1},pL=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return pr.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},ms=function(e,n){return!(n.disabled||aL(n)||hL(n,e)||lL(n)||pL(n))},hl=function(e,n){return!(dL(n)||ep(n)<0||!ms(e,n))},gL=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},vL=function t(e){var n=[],r=[];return e.forEach(function(i,o){var s=!!i.scope,a=s?i.scope:i,l=ep(a,s),u=s?t(i.candidates):a;l===0?s?n.push.apply(n,u):n.push(a):r.push({documentOrder:o,tabIndex:l,item:i,isScope:s,content:u})}),r.sort(sL).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},mL=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Yh([e],n.includeContainer,{filter:hl.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:gL}):r=Xh(e,n.includeContainer,hl.bind(null,n)),vL(r)},yL=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Yh([e],n.includeContainer,{filter:ms.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Xh(e,n.includeContainer,ms.bind(null,n)),r},Ro=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return pr.call(e,vs)===!1?!1:hl(n,e)},bL=Qh.concat("iframe").join(","),sa=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return pr.call(e,bL)===!1?!1:ms(n,e)};/*!
|
|
150
150
|
* focus-trap 6.9.4
|
|
151
151
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
152
|
-
*/function Qc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Jc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Qc(Object(n),!0).forEach(function(r){wL(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function wL(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Xc=function(){var t=[];return{activateTrap:function(n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var i=t.indexOf(n);i===-1||t.splice(i,1),t.push(n)},deactivateTrap:function(n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}}}(),SL=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},LL=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},CL=function(e){return e.key==="Tab"||e.keyCode===9},Yc=function(e){return setTimeout(e,0)},ef=function(e,n){var r=-1;return e.every(function(i,o){return n(i)?(r=o,!1):!0}),r},vi=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},To=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},EL=function(e,n){var r=(n==null?void 0:n.document)||document,i=Jc({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s,a=function(p,b,C){return p&&p[b]!==void 0?p[b]:i[C||b]},l=function(p){return o.containerGroups.findIndex(function(b){var C=b.container,P=b.tabbableNodes;return C.contains(p)||P.find(function(O){return O===p})})},u=function(p){var b=i[p];if(typeof b=="function"){for(var C=arguments.length,P=new Array(C>1?C-1:0),O=1;O<C;O++)P[O-1]=arguments[O];b=b.apply(void 0,P)}if(b===!0&&(b=void 0),!b){if(b===void 0||b===!1)return b;throw new Error("`".concat(p,"` was specified but was not a node, or did not return a node"))}var R=b;if(typeof b=="string"&&(R=r.querySelector(b),!R))throw new Error("`".concat(p,"` as selector refers to no known node"));return R},f=function(){var p=u("initialFocus");if(p===!1)return!1;if(p===void 0)if(l(r.activeElement)>=0)p=r.activeElement;else{var b=o.tabbableGroups[0],C=b&&b.firstTabbableNode;p=C||u("fallbackFocus")}if(!p)throw new Error("Your focus-trap needs to have at least one focusable element");return p},d=function(){if(o.containerGroups=o.containers.map(function(p){var b=mL(p,i.tabbableOptions),C=yL(p,i.tabbableOptions);return{container:p,tabbableNodes:b,focusableNodes:C,firstTabbableNode:b.length>0?b[0]:null,lastTabbableNode:b.length>0?b[b.length-1]:null,nextTabbableNode:function(O){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,M=C.findIndex(function(T){return T===O});if(!(M<0))return R?C.slice(M+1).find(function(T){return Ro(T,i.tabbableOptions)}):C.slice(0,M).reverse().find(function(T){return Ro(T,i.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(p){return p.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},h=function x(p){if(p!==!1&&p!==r.activeElement){if(!p||!p.focus){x(f());return}p.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=p,SL(p)&&p.select()}},v=function(p){var b=u("setReturnFocus",p);return b||(b===!1?!1:p)},y=function(p){var b=To(p);if(!(l(b)>=0)){if(vi(i.clickOutsideDeactivates,p)){s.deactivate({returnFocus:i.returnFocusOnDeactivate&&!sa(b,i.tabbableOptions)});return}vi(i.allowOutsideClick,p)||p.preventDefault()}},g=function(p){var b=To(p),C=l(b)>=0;C||b instanceof Document?C&&(o.mostRecentlyFocusedNode=b):(p.stopImmediatePropagation(),h(o.mostRecentlyFocusedNode||f()))},L=function(p){var b=To(p);d();var C=null;if(o.tabbableGroups.length>0){var P=l(b),O=P>=0?o.containerGroups[P]:void 0;if(P<0)p.shiftKey?C=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:C=o.tabbableGroups[0].firstTabbableNode;else if(p.shiftKey){var R=ef(o.tabbableGroups,function(N){var V=N.firstTabbableNode;return b===V});if(R<0&&(O.container===b||sa(b,i.tabbableOptions)&&!Ro(b,i.tabbableOptions)&&!O.nextTabbableNode(b,!1))&&(R=P),R>=0){var M=R===0?o.tabbableGroups.length-1:R-1,T=o.tabbableGroups[M];C=T.lastTabbableNode}}else{var I=ef(o.tabbableGroups,function(N){var V=N.lastTabbableNode;return b===V});if(I<0&&(O.container===b||sa(b,i.tabbableOptions)&&!Ro(b,i.tabbableOptions)&&!O.nextTabbableNode(b))&&(I=P),I>=0){var B=I===o.tabbableGroups.length-1?0:I+1,U=o.tabbableGroups[B];C=U.firstTabbableNode}}}else C=u("fallbackFocus");C&&(p.preventDefault(),h(C))},w=function(p){if(LL(p)&&vi(i.escapeDeactivates,p)!==!1){p.preventDefault(),s.deactivate();return}if(CL(p)){L(p);return}},S=function(p){var b=To(p);l(b)>=0||vi(i.clickOutsideDeactivates,p)||vi(i.allowOutsideClick,p)||(p.preventDefault(),p.stopImmediatePropagation())},m=function(){if(o.active)return Xc.activateTrap(s),o.delayInitialFocusTimer=i.delayInitialFocus?Yc(function(){h(f())}):h(f()),r.addEventListener("focusin",g,!0),r.addEventListener("mousedown",y,{capture:!0,passive:!1}),r.addEventListener("touchstart",y,{capture:!0,passive:!1}),r.addEventListener("click",S,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},_=function(){if(o.active)return r.removeEventListener("focusin",g,!0),r.removeEventListener("mousedown",y,!0),r.removeEventListener("touchstart",y,!0),r.removeEventListener("click",S,!0),r.removeEventListener("keydown",w,!0),s};return s={get active(){return o.active},get paused(){return o.paused},activate:function(p){if(o.active)return this;var b=a(p,"onActivate"),C=a(p,"onPostActivate"),P=a(p,"checkCanFocusTrap");P||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,b&&b();var O=function(){P&&d(),m(),C&&C()};return P?(P(o.containers.concat()).then(O,O),this):(O(),this)},deactivate:function(p){if(!o.active)return this;var b=Jc({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},p);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,_(),o.active=!1,o.paused=!1,Xc.deactivateTrap(s);var C=a(b,"onDeactivate"),P=a(b,"onPostDeactivate"),O=a(b,"checkCanReturnFocus"),R=a(b,"returnFocus","returnFocusOnDeactivate");C&&C();var M=function(){Yc(function(){R&&h(v(o.nodeFocusedBeforeActivation)),P&&P()})};return R&&O?(O(v(o.nodeFocusedBeforeActivation)).then(M,M),this):(M(),this)},pause:function(){return o.paused||!o.active?this:(o.paused=!0,_(),this)},unpause:function(){return!o.paused||!o.active?this:(o.paused=!1,d(),m(),this)},updateContainerElements:function(p){var b=[].concat(p).filter(Boolean);return o.containers=b.map(function(C){return typeof C=="string"?r.querySelector(C):C}),o.active&&d(),this}},s.updateContainerElements(e),s};function xL(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}else return Array.from(t)}var $l=!1;if(typeof window<"u"){var tf={get passive(){$l=!0}};window.addEventListener("testPassive",null,tf),window.removeEventListener("testPassive",null,tf)}var np=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),Bn=[],ys=!1,rp=-1,Di=void 0,Ii=void 0,ip=function(e){return Bn.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},bs=function(e){var n=e||window.event;return ip(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},_L=function(e){if(Ii===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(Ii=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}Di===void 0&&(Di=document.body.style.overflow,document.body.style.overflow="hidden")},OL=function(){Ii!==void 0&&(document.body.style.paddingRight=Ii,Ii=void 0),Di!==void 0&&(document.body.style.overflow=Di,Di=void 0)},ML=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},PL=function(e,n){var r=e.targetTouches[0].clientY-rp;return ip(e.target)?!1:n&&n.scrollTop===0&&r>0||ML(n)&&r<0?bs(e):(e.stopPropagation(),!0)},kL=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!Bn.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};Bn=[].concat(xL(Bn),[r]),np?(e.ontouchstart=function(i){i.targetTouches.length===1&&(rp=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&PL(i,e)},ys||(document.addEventListener("touchmove",bs,$l?{passive:!1}:void 0),ys=!0)):_L(n)}},RL=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}Bn=Bn.filter(function(n){return n.targetElement!==e}),np?(e.ontouchstart=null,e.ontouchmove=null,ys&&Bn.length===0&&(document.removeEventListener("touchmove",bs,$l?{passive:!1}:void 0),ys=!1)):Bn.length||OL()},cr=[],TL=function(){return cr.some(function(t){return t.activeTargets.length>0})},AL=function(){return cr.some(function(t){return t.skippedTargets.length>0})},nf="ResizeObserver loop completed with undelivered notifications.",DL=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:nf}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=nf),window.dispatchEvent(t)},Hi;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Hi||(Hi={}));var fr=function(t){return Object.freeze(t)},IL=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,fr(this)}return t}(),op=function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,fr(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,u=e.height;return{x:n,y:r,top:i,right:o,bottom:s,left:a,width:l,height:u}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Hl=function(t){return t instanceof SVGElement&&"getBBox"in t},sp=function(t){if(Hl(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||t.getClientRects().length)},rf=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},jL=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ji=typeof window<"u"?window:{},Ao=new WeakMap,of=/auto|scroll/,NL=/^tb|vertical/,BL=/msie|trident/i.test(ji.navigator&&ji.navigator.userAgent),Kt=function(t){return parseFloat(t||"0")},kr=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new IL((n?e:t)||0,(n?t:e)||0)},sf=fr({devicePixelContentBoxSize:kr(),borderBoxSize:kr(),contentBoxSize:kr(),contentRect:new op(0,0,0,0)}),ap=function(t,e){if(e===void 0&&(e=!1),Ao.has(t)&&!e)return Ao.get(t);if(sp(t))return Ao.set(t,sf),sf;var n=getComputedStyle(t),r=Hl(t)&&t.ownerSVGElement&&t.getBBox(),i=!BL&&n.boxSizing==="border-box",o=NL.test(n.writingMode||""),s=!r&&of.test(n.overflowY||""),a=!r&&of.test(n.overflowX||""),l=r?0:Kt(n.paddingTop),u=r?0:Kt(n.paddingRight),f=r?0:Kt(n.paddingBottom),d=r?0:Kt(n.paddingLeft),h=r?0:Kt(n.borderTopWidth),v=r?0:Kt(n.borderRightWidth),y=r?0:Kt(n.borderBottomWidth),g=r?0:Kt(n.borderLeftWidth),L=d+u,w=l+f,S=g+v,m=h+y,_=a?t.offsetHeight-m-t.clientHeight:0,x=s?t.offsetWidth-S-t.clientWidth:0,p=i?L+S:0,b=i?w+m:0,C=r?r.width:Kt(n.width)-p-x,P=r?r.height:Kt(n.height)-b-_,O=C+L+x+S,R=P+w+_+m,M=fr({devicePixelContentBoxSize:kr(Math.round(C*devicePixelRatio),Math.round(P*devicePixelRatio),o),borderBoxSize:kr(O,R,o),contentBoxSize:kr(C,P,o),contentRect:new op(d,l,C,P)});return Ao.set(t,M),M},lp=function(t,e,n){var r=ap(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case Hi.DEVICE_PIXEL_CONTENT_BOX:return s;case Hi.BORDER_BOX:return i;default:return o}},FL=function(){function t(e){var n=ap(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=fr([n.borderBoxSize]),this.contentBoxSize=fr([n.contentBoxSize]),this.devicePixelContentBoxSize=fr([n.devicePixelContentBoxSize])}return t}(),up=function(t){if(sp(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},UL=function(){var t=1/0,e=[];cr.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(u){var f=new FL(u.target),d=up(u.target);a.push(f),u.lastReportedSize=lp(u.target,u.observedBox),d<t&&(t=d)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},af=function(t){cr.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(up(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},VL=function(){var t=0;for(af(t);TL();)t=UL(),af(t);return AL()&&DL(),t>0},aa,cp=[],zL=function(){return cp.splice(0).forEach(function(t){return t()})},$L=function(t){if(!aa){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return zL()}).observe(n,r),aa=function(){n.textContent="".concat(e?e--:e++)}}cp.push(t),aa()},HL=function(t){$L(function(){requestAnimationFrame(t)})},Xo=0,WL=function(){return!!Xo},GL=250,ZL={attributes:!0,characterData:!0,childList:!0,subtree:!0},lf=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],uf=function(t){return t===void 0&&(t=0),Date.now()+t},la=!1,qL=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=GL),!la){la=!0;var r=uf(e);HL(function(){var i=!1;try{i=VL()}finally{if(la=!1,e=r-uf(),!WL())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,ZL)};document.body?n():ji.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),lf.forEach(function(n){return ji.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),lf.forEach(function(n){return ji.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),pl=new qL,cf=function(t){!Xo&&t>0&&pl.start(),Xo+=t,!Xo&&pl.stop()},KL=function(t){return!Hl(t)&&!jL(t)&&getComputedStyle(t).display==="inline"},QL=function(){function t(e,n){this.target=e,this.observedBox=n||Hi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=lp(this.target,this.observedBox,!0);return KL(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),JL=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Do=new WeakMap,ff=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Io=function(){function t(){}return t.connect=function(e,n){var r=new JL(e,n);Do.set(e,r)},t.observe=function(e,n,r){var i=Do.get(e),o=i.observationTargets.length===0;ff(i.observationTargets,n)<0&&(o&&cr.push(i),i.observationTargets.push(new QL(n,r&&r.box)),cf(1),pl.schedule())},t.unobserve=function(e,n){var r=Do.get(e),i=ff(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&cr.splice(cr.indexOf(r),1),r.observationTargets.splice(i,1),cf(-1))},t.disconnect=function(e){var n=this,r=Do.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),XL=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Io.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!rf(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Io.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!rf(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Io.unobserve(this,e)},t.prototype.disconnect=function(){Io.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function ht(){return ht=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ht.apply(this,arguments)}function Yo(t,e){if(t==null)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)e.indexOf(n=o[r])>=0||(i[n]=t[n]);return i}var Ni=typeof window<"u"?c.useLayoutEffect:c.useEffect;function mi(t,e,n){return e=(e=+e)==e?e:0,n=(n=+n)==n?n:0,(t=+t)==t&&(t=(t=t<=n?t:n)>=e?t:e),t}function jo(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var YL={box:"border-box"};function ua(t,e){var n=e.label,r=e.enabled,i=e.resizeSourceRef,o=c.useState(0),s=o[0],a=o[1];c.useDebugValue(n+": "+s);var l=c.useCallback(function(u){a(u[0].borderBoxSize[0].blockSize),i.current="element"},[i]);return Ni(function(){if(t.current&&r){var u=new XL(l);return u.observe(t.current,YL),function(){u.disconnect()}}},[t,l,r]),r?s:0}function ft(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var df={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},hf={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},eC=_w({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:ht({},df,hf)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:ht({},df,hf)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:ht({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[Ow({y:function(t,e){return e.payload.y},velocity:function(t,e){return e.payload.velocity},snapSource:function(t,e){var n=e.payload.source;return n===void 0?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(t,e){},onSnapCancel:function(t,e){},onResizeCancel:function(t,e){},onCloseCancel:function(t,e){},onOpenEnd:function(t,e){},onSnapEnd:function(t,e){},onRezizeEnd:function(t,e){}},services:{onSnapStart:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),tC=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],nC=["velocity"],rC=["onRest","config"],fp=Yw.default,iC=fp.tension,No=fp.friction,oC=c.forwardRef(function(t,e){var n=t.children,r=t.sibling,i=t.className,o=t.footer,s=t.header,a=t.open,l=t.initialState,u=t.lastSnapRef,f=t.initialFocusRef,d=t.onDismiss,h=t.maxHeight,v=t.defaultSnap,y=v===void 0?aC:v,g=t.snapPoints,L=g===void 0?lC:g,w=t.blocking,S=w===void 0||w,m=t.scrollLocking,_=m===void 0||m,x=t.style,p=t.onSpringStart,b=t.onSpringCancel,C=t.onSpringEnd,P=t.reserveScrollBarGap,O=P===void 0?S:P,R=t.expandOnContentDrag,M=R!==void 0&&R,T=Yo(t,tC),I=function(){var j=c.useState(!1),Y=j[0],H=j[1],fe=c.useState({}),Ne=fe[0],Le=fe[1],Be=c.useCallback(function(Re){return Le(function($e){var ae;return ht({},$e,((ae={})[Re]=!1,ae))}),function(){Le(function($e){var ae;return ht({},$e,((ae={})[Re]=!0,ae))})}},[]);return c.useEffect(function(){var Re=Object.values(Ne);Re.length!==0&&Re.every(Boolean)&&H(!0)},[Ne]),{ready:Y,registerReady:Be}}(),B=I.ready,U=I.registerReady,N=c.useRef(!1),V=c.useRef(p),X=c.useRef(b),W=c.useRef(C);c.useEffect(function(){V.current=p,X.current=b,W.current=C},[b,p,C]);var z,Q,oe=iS(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),te=oe[0],ee=oe[1],A=c.useRef(null),pe=c.useRef(null),Pe=c.useRef(null),G=c.useRef(null),Ae=c.useRef(null),De=c.useRef(null),ue=c.useRef(0),xe=c.useRef(),Ve=c.useRef(!1),be=(z=c.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),Q=c.useRef(z==null?void 0:z.matches),c.useDebugValue(Q.current?"reduce":"no-preference"),c.useEffect(function(){var j=function(Y){Q.current=Y.matches};return z==null||z.addListener(j),function(){return z==null?void 0:z.removeListener(j)}},[z]),Q),_e=function(j){var Y=j.targetRef,H=j.enabled,fe=j.reserveScrollBarGap,Ne=c.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return c.useDebugValue(H?"Enabled":"Disabled"),c.useEffect(function(){if(!H)return Ne.current.deactivate(),void(Ne.current={activate:function(){},deactivate:function(){}});var Le=Y.current,Be=!1;Ne.current={activate:function(){Be||(Be=!0,kL(Le,{allowTouchMove:function(Re){return Re.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:fe}))},deactivate:function(){Be&&(Be=!1,RL(Le))}}},[H,Y,fe]),Ne}({targetRef:pe,enabled:B&&_,reserveScrollBarGap:O}),Ie=function(j){var Y=j.targetRef,H=j.enabled,fe=c.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return c.useDebugValue(H?"Enabled":"Disabled"),c.useEffect(function(){if(!H)return fe.current.deactivate(),void(fe.current={activate:function(){},deactivate:function(){}});var Ne=Y.current,Le=!1,Be=[],Re=[];fe.current={activate:function(){if(!Le){Le=!0;var $e=Ne.parentNode;document.querySelectorAll("body > *").forEach(function(ae){if(ae!==$e){var ge=ae.getAttribute("aria-hidden");ge!==null&&ge!=="false"||(Be.push(ge),Re.push(ae),ae.setAttribute("aria-hidden","true"))}})}},deactivate:function(){Le&&(Le=!1,Re.forEach(function($e,ae){var ge=Be[ae];ge===null?$e.removeAttribute("aria-hidden"):$e.setAttribute("aria-hidden",ge)}),Be=[],Re=[])}}},[Y,H]),fe}({targetRef:A,enabled:B&&S}),ke=function(j){var Y=j.targetRef,H=j.fallbackRef,fe=j.initialFocusRef,Ne=j.enabled,Le=c.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return c.useDebugValue(Ne?"Enabled":"Disabled"),c.useEffect(function(){if(!Ne)return Le.current.deactivate(),void(Le.current={activate:function(){},deactivate:function(){}});var Be=H.current,Re=EL(Y.current,{onActivate:void 0,initialFocus:fe?function(){return(fe==null?void 0:fe.current)||Be}:void 0,fallbackFocus:Be,escapeDeactivates:!1,clickOutsideDeactivates:!1}),$e=!1;Le.current={activate:function(){try{return $e?Promise.resolve():($e=!0,Promise.resolve(Re.activate()).then(function(){return Promise.resolve(new Promise(function(ae){return setTimeout(function(){return ae(void 0)},0)})).then(function(){})}))}catch(ae){return Promise.reject(ae)}},deactivate:function(){$e&&($e=!1,Re.deactivate())}}},[Ne,H,fe,Y]),Le}({targetRef:A,fallbackRef:De,initialFocusRef:f||void 0,enabled:B&&S&&f!==!1}),je=function(j){var Y=j.getSnapPoints,H=j.heightRef,fe=j.lastSnapRef,Ne=j.ready,Le=function(Ye){var wt=Ye.contentRef,St=Ye.controlledMaxHeight,tt=Ye.footerEnabled,Zt=Ye.footerRef,Ft=Ye.headerEnabled,Lt=Ye.headerRef,yn=Ye.registerReady,ln=Ye.resizeSourceRef,ni=c.useMemo(function(){return yn("contentHeight")},[yn]),ri=function(bn,$n,Hn){var Wn=c.useMemo(function(){return $n("maxHeight")},[$n]),Gn=c.useState(function(){return jo(bn)||typeof window<"u"?window.innerHeight:0}),si=Gn[0],ai=Gn[1],wn=si>0,ne=c.useRef(0);return c.useDebugValue(bn?"controlled":"auto"),c.useEffect(function(){wn&&Wn()},[wn,Wn]),Ni(function(){if(bn)return ai(jo(bn)),void(Hn.current="maxheightprop");var Gl=function(){ne.current||(ne.current=requestAnimationFrame(function(){ai(window.innerHeight),Hn.current="window",ne.current=0}))};return window.addEventListener("resize",Gl),ai(window.innerHeight),Hn.current="window",Wn(),function(){window.removeEventListener("resize",Gl),cancelAnimationFrame(ne.current)}},[bn,Wn,Hn]),si}(St,yn,ln),gr=ua(Lt,{label:"headerHeight",enabled:Ft,resizeSourceRef:ln}),ii=ua(wt,{label:"contentHeight",enabled:!0,resizeSourceRef:ln}),vr=ua(Zt,{label:"footerHeight",enabled:tt,resizeSourceRef:ln}),zn=Math.min(ri-gr-vr,ii)+gr+vr;c.useDebugValue("minHeight: "+zn);var oi=ii>0;return c.useEffect(function(){oi&&ni()},[oi,ni]),{maxHeight:ri,minHeight:zn,headerHeight:gr,footerHeight:vr}}({contentRef:j.contentRef,controlledMaxHeight:j.controlledMaxHeight,footerEnabled:j.footerEnabled,footerRef:j.footerRef,headerEnabled:j.headerEnabled,headerRef:j.headerRef,registerReady:j.registerReady,resizeSourceRef:j.resizeSourceRef}),Be=Le.maxHeight,Re=Le.minHeight,$e=Le.headerHeight,ae=Le.footerHeight,ge=function(Ye,wt){var St=[].concat(Ye).map(jo).reduce(function(Lt,yn){return Lt.add(mi(yn,0,wt)),Lt},new Set),tt=Array.from(St),Zt=Math.min.apply(Math,tt);if(Number.isNaN(Zt))throw new TypeError("minSnap is NaN");var Ft=Math.max.apply(Math,tt);if(Number.isNaN(Ft))throw new TypeError("maxSnap is NaN");return{snapPoints:tt,minSnap:Zt,maxSnap:Ft}}(Ne?Y({height:H.current,footerHeight:ae,headerHeight:$e,minHeight:Re,maxHeight:Be}):[0],Be),pt=ge.snapPoints,an=ge.minSnap,ct=ge.maxSnap;return c.useDebugValue("minSnap: "+an+", maxSnap:"+ct),{minSnap:an,maxSnap:ct,findSnap:function(Ye){var wt=jo(typeof Ye=="function"?Ye({footerHeight:ae,headerHeight:$e,height:H.current,minHeight:Re,maxHeight:Be,snapPoints:pt,lastSnap:fe.current}):Ye);return pt.reduce(function(St,tt){return Math.abs(tt-wt)<Math.abs(St-wt)?tt:St},an)},maxHeight:Be}}({contentRef:Pe,controlledMaxHeight:h,footerEnabled:!!o,footerRef:Ae,getSnapPoints:L,headerEnabled:s!==!1,headerRef:G,heightRef:ue,lastSnapRef:u,ready:B,registerReady:U,resizeSourceRef:xe}),ie=je.minSnap,We=je.maxSnap,re=je.maxHeight,et=je.findSnap,q=c.useRef(re),Ge=c.useRef(ie),ze=c.useRef(We),bt=c.useRef(et),ut=c.useRef(0);Ni(function(){q.current=re,ze.current=We,Ge.current=ie,bt.current=et,ut.current=et(y)},[et,y,re,We,ie]);var se=c.useCallback(function(j){var Y=j.onRest,H=j.config,fe=(H=H===void 0?{}:H).velocity,Ne=fe===void 0?1:fe,Le=Yo(H,nC),Be=Yo(j,rC);return new Promise(function(Re){return ee(ht({},Be,{config:ht({velocity:Ne},Le,{mass:1,tension:iC,friction:Math.max(No,No+(No-No*Ne))}),onRest:function(){var $e=[].slice.call(arguments);Re.apply(void 0,$e),Y==null||Y.apply(void 0,$e)}}))})},[ee]),Vn=jw(eC,{devTools:!1,actions:{onOpenCancel:c.useCallback(function(){return X.current==null?void 0:X.current({type:"OPEN"})},[]),onSnapCancel:c.useCallback(function(j){return X.current==null?void 0:X.current({type:"SNAP",source:j.snapSource})},[]),onCloseCancel:c.useCallback(function(){return X.current==null?void 0:X.current({type:"CLOSE"})},[]),onResizeCancel:c.useCallback(function(){return X.current==null?void 0:X.current({type:"RESIZE",source:xe.current})},[]),onOpenEnd:c.useCallback(function(){return W.current==null?void 0:W.current({type:"OPEN"})},[]),onSnapEnd:c.useCallback(function(j,Y){return W.current==null?void 0:W.current({type:"SNAP",source:j.snapSource})},[]),onResizeEnd:c.useCallback(function(){return W.current==null?void 0:W.current({type:"RESIZE",source:xe.current})},[])},context:{initialState:l},services:{onSnapStart:c.useCallback(function(j,Y){try{return Promise.resolve(V.current==null?void 0:V.current({type:"SNAP",source:Y.payload.source||"custom"}))}catch(H){return Promise.reject(H)}},[]),onOpenStart:c.useCallback(function(){try{return Promise.resolve(V.current==null?void 0:V.current({type:"OPEN"}))}catch(j){return Promise.reject(j)}},[]),onCloseStart:c.useCallback(function(){try{return Promise.resolve(V.current==null?void 0:V.current({type:"CLOSE"}))}catch(j){return Promise.reject(j)}},[]),onResizeStart:c.useCallback(function(){try{return Promise.resolve(V.current==null?void 0:V.current({type:"RESIZE",source:xe.current}))}catch(j){return Promise.reject(j)}},[]),onSnapEnd:c.useCallback(function(j,Y){try{return Promise.resolve(W.current==null?void 0:W.current({type:"SNAP",source:j.snapSource}))}catch(H){return Promise.reject(H)}},[]),onOpenEnd:c.useCallback(function(){try{return Promise.resolve(W.current==null?void 0:W.current({type:"OPEN"}))}catch(j){return Promise.reject(j)}},[]),onCloseEnd:c.useCallback(function(){try{return Promise.resolve(W.current==null?void 0:W.current({type:"CLOSE"}))}catch(j){return Promise.reject(j)}},[]),onResizeEnd:c.useCallback(function(){try{return Promise.resolve(W.current==null?void 0:W.current({type:"RESIZE",source:xe.current}))}catch(j){return Promise.reject(j)}},[]),renderVisuallyHidden:c.useCallback(function(j,Y){try{return Promise.resolve(se({y:ut.current,ready:0,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:!0})).then(function(){})}catch(H){return Promise.reject(H)}},[se]),activate:c.useCallback(function(j,Y){try{return N.current=!0,Promise.resolve(Promise.all([_e.current.activate(),ke.current.activate(),Ie.current.activate()])).then(function(){})}catch(H){return Promise.reject(H)}},[Ie,ke,_e]),deactivate:c.useCallback(function(){try{return _e.current.deactivate(),ke.current.deactivate(),Ie.current.deactivate(),N.current=!1,Promise.resolve()}catch(j){return Promise.reject(j)}},[Ie,ke,_e]),openImmediately:c.useCallback(function(){try{return ue.current=ut.current,Promise.resolve(se({y:ut.current,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:!0})).then(function(){})}catch(j){return Promise.reject(j)}},[se]),openSmoothly:c.useCallback(function(){try{return Promise.resolve(se({y:0,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:!0})).then(function(){return ue.current=ut.current,Promise.resolve(se({y:ut.current,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:be.current})).then(function(){})})}catch(j){return Promise.reject(j)}},[se,be]),snapSmoothly:c.useCallback(function(j,Y){try{var H=bt.current(j.y);return ue.current=H,u.current=H,Promise.resolve(se({y:H,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:Ge.current,immediate:be.current,config:{velocity:j.velocity}})).then(function(){})}catch(fe){return Promise.reject(fe)}},[se,u,be]),resizeSmoothly:c.useCallback(function(){try{var j=bt.current(ue.current);return ue.current=j,u.current=j,Promise.resolve(se({y:j,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:Ge.current,immediate:xe.current!=="element"||be.current})).then(function(){})}catch(Y){return Promise.reject(Y)}},[se,u,be]),closeSmoothly:c.useCallback(function(j,Y){try{return se({minSnap:ue.current,immediate:!0}),ue.current=0,Promise.resolve(se({y:0,maxHeight:q.current,maxSnap:ze.current,immediate:be.current})).then(function(){return Promise.resolve(se({ready:0,immediate:!0})).then(function(){})})}catch(H){return Promise.reject(H)}},[se,be])}}),uo=Vn[0],Bt=Vn[1];c.useEffect(function(){B&&Bt(a?"OPEN":"CLOSE")},[a,Bt,B]),Ni(function(){(re||We||ie)&&Bt("RESIZE")},[re,We,ie,Bt]),c.useEffect(function(){return function(){_e.current.deactivate(),ke.current.deactivate(),Ie.current.deactivate()}},[Ie,ke,_e]),c.useImperativeHandle(e,function(){return{snapTo:function(j,Y){var H=Y===void 0?{}:Y,fe=H.velocity,Ne=fe===void 0?1:fe,Le=H.source,Be=Le===void 0?"custom":Le;Bt("SNAP",{payload:{y:bt.current(j),velocity:Ne,source:Be}})},get height(){return ue.current}}},[Bt]),c.useEffect(function(){var j=pe.current,Y=function(fe){Ve.current&&fe.preventDefault()},H=function(fe){j.scrollTop<0&&(requestAnimationFrame(function(){j.style.overflow="hidden",j.scrollTop=0,j.style.removeProperty("overflow")}),fe.preventDefault())};return M&&(j.addEventListener("scroll",Y),j.addEventListener("touchmove",Y),j.addEventListener("touchstart",H)),function(){j.removeEventListener("scroll",Y),j.removeEventListener("touchmove",Y),j.removeEventListener("touchstart",H)}},[M,pe]);var sn=oL(function(j){var Y=j.args,H=(Y=Y===void 0?[]:Y)[0],fe=(H=H===void 0?{}:H).closeOnTap,Ne=fe!==void 0&&fe,Le=H.isContentDragging,Be=Le!==void 0&&Le,Re=j.cancel,$e=j.direction[1],ae=j.down,ge=j.first,pt=j.last,an=j.memo,ct=an===void 0?te.y.getValue():an,Ye=j.tap,wt=j.velocity,St=-1*j.movement[1];if(!N.current)return Re(),ct;if(d&&Ne&&Ye)return Re(),setTimeout(function(){return d()},0),ct;if(Ye)return ct;var tt=ct+St,Zt=St*wt,Ft=Math.max(Ge.current,Math.min(ze.current,tt+2*Zt));if(!ae&&d&&$e>0&&tt+Zt<Ge.current/2)return Re(),d(),ct;var Lt=ae?d||Ge.current!==ze.current?Ai(tt,d?0:Ge.current,ze.current,.55):tt<Ge.current?Ai(tt,Ge.current,2*ze.current,.55):Ai(tt,Ge.current/2,ze.current,.55):Ft;return M&&Be?(Lt>=ze.current&&(Lt=ze.current),ct===ze.current&&pe.current.scrollTop>0&&(Lt=ze.current),Ve.current=Lt<ze.current):Ve.current=!1,ge&&Bt("DRAG"),pt?(Bt("SNAP",{payload:{y:Lt,velocity:wt>.05?wt:1,source:"dragging"}}),ct):(ee({y:Lt,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:Ge.current,immediate:!0,config:{velocity:wt}}),ct)},{filterTaps:!0});if(Number.isNaN(ze.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(Ge.current))throw new TypeError("minSnapRef is NaN!!");var co=function(j){var Y,H=j.spring,fe=Sr([H.y,H.maxHeight],function(ae,ge){return Math.round(mi(ge-ae,0,16))+"px"}),Ne=Sr([H.y,H.minSnap,H.maxSnap],function(ae,ge,pt){return mi(ae,ge,pt)+"px"}),Le=Sr([H.y,H.minSnap,H.maxSnap],function(ae,ge,pt){return ae<ge?ge-ae+"px":ae>pt?pt-ae+"px":"0px"}),Be=Sr([H.y,H.maxSnap],function(ae,ge){return ae>=ge?Math.ceil(ae-ge):0}),Re=Sr([H.y,H.minSnap],function(ae,ge){if(!ge)return 0;var pt=Math.max(ge/2-45,0);return mi((ae-pt)*(1/(Math.min(ge/2+45,ge)-pt)+0),0,1)}),$e=Sr([H.y,H.minSnap],function(ae,ge){return ge?mi(ae/ge,0,1):0});return(Y={})["--rsbs-content-opacity"]=Re,Y["--rsbs-backdrop-opacity"]=$e,Y["--rsbs-antigap-scale-y"]=Be,Y["--rsbs-overlay-translate-y"]=Le,Y["--rsbs-overlay-rounded"]=fe,Y["--rsbs-overlay-h"]=Ne,Y}({spring:te});return c.createElement(CS.div,ht({},T,{"data-rsbs-root":!0,"data-rsbs-state":sC.find(uo.matches),"data-rsbs-is-blocking":S,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!o,className:i,ref:A,style:ht({},co,x,{opacity:te.ready})}),r,S&&c.createElement("div",ht({key:"backdrop","data-rsbs-backdrop":!0},sn({closeOnTap:!0}))),c.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:De,onKeyDown:function(j){j.key==="Escape"&&(j.stopPropagation(),d&&d())}},s!==!1&&c.createElement("div",ht({key:"header","data-rsbs-header":!0,ref:G},sn()),s),c.createElement("div",ht({key:"scroll","data-rsbs-scroll":!0,ref:pe},M?sn({isContentDragging:!0}):{}),c.createElement("div",{"data-rsbs-content":!0,ref:Pe},n)),o&&c.createElement("div",ht({key:"footer",ref:Ae,"data-rsbs-footer":!0},sn()),o)))}),sC=["closed","opening","open","closing","dragging","snapping","resizing"];function aC(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function lC(t){return t.minHeight}var uC=["onSpringStart","onSpringEnd","skipInitialTransition"],dp=c.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,o=Yo(t,uC),s=c.useState(!1),a=s[0],l=s[1],u=c.useRef(),f=c.useRef(null),d=c.useRef(i&&o.open?"OPEN":"CLOSED");Ni(function(){if(o.open)return cancelAnimationFrame(u.current),l(!0),function(){d.current="CLOSED"}},[o.open]);var h=c.useCallback(function(y){return Promise.resolve(n==null?void 0:n(y)).then(function(){y.type==="OPEN"&&cancelAnimationFrame(u.current)})},[n]),v=c.useCallback(function(y){return Promise.resolve(r==null?void 0:r(y)).then(function(){y.type==="CLOSE"&&(u.current=requestAnimationFrame(function(){return l(!1)}))})},[r]);return a?c.createElement(R1,{"data-rsbs-portal":!0},c.createElement(oC,ht({},o,{lastSnapRef:f,ref:e,initialState:d.current,onSpringStart:h,onSpringEnd:v}))):null});const hp=28,cC="MapGoogle-module__root__Vi-sMl",fC="MapGoogle-module__mapContainer__OCCTIX",dC="MapGoogle-module__balloon__4UVhuT",hC="MapGoogle-module__details__4osNXn",pC="MapGoogle-module__cluster__5qmRds",gC="MapGoogle-module__overlay__g-nEoT",vC="MapGoogle-module__mapControl__mzyTwr",mC="MapGoogle-module__geolocationControl__1exHgA",yC="MapGoogle-module__bottomSheet__avcBmY",bC="MapGoogle-module__locationViewContent__xwLeDh",wC="MapGoogle-module__locationViewHeader__maBLv0",SC="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",LC="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",CC="MapGoogle-module__sheetSubmit__rPQG26",it={root:cC,mapContainer:fC,balloon:dC,details:hC,cluster:pC,overlay:gC,mapControl:vC,geolocationControl:mC,bottomSheet:yC,locationViewContent:bC,locationViewHeader:wC,deliveryDetailsViewContent:SC,deliveryDetailsViewHeader:LC,sheetSubmit:CC},pp=({children:t,hideFooter:e,minSnapHeight:n,onSubmitClick:r,open:i,submitDisabled:o,submitLoading:s,...a})=>E.jsx(dp,{expandOnContentDrag:!0,open:i,initialFocusRef:!1,defaultSnap:({snapPoints:l})=>Math.min(...l),blocking:!1,snapPoints:({footerHeight:l,headerHeight:u,maxHeight:f,minHeight:d})=>[n==null?d:u+l+n,f-hp],footer:e?null:E.jsx(Nt,{disabled:o,loading:s,variant:"primary",className:it.sheetSubmit,onClick:r,children:E.jsx(er,{keyName:"choose",ns:"common"})}),sibling:E.jsx("div",{role:"presentation","data-rsbs-backdrop":"true",onClick:l=>{var u;l.stopPropagation(),l.preventDefault(),(u=a.onDismiss)==null||u.call(a)}}),children:E.jsx("div",{className:it.bottomSheet,children:t})}),pf="#000",EC={header:it.locationViewHeader,content:it.locationViewContent},xC=({clusterer:t,hideDetails:e,onPointClick:n,onPointSelected:r,point:i,selectedPoint:o,setOpenDetails:s})=>{const a=lo("screenSm"),{iconType:l,palette:u,skipPointInfo:f}=lt(),{setLMSData:d,setLoading:h}=Ps(),{data:v,isLoading:y,refetch:g}=E1(i.code);c.useEffect(()=>{const T=v==null?void 0:v.results[0];T&&d(T)},[v,y,d]),c.useEffect(()=>{h(y)},[y,h]);const L=(u==null?void 0:u.primary)||"#fc0",w=l==="omni-llama"?yi.PinLlama:yi.PinOmnic,[S,m]=c.useState(null),_=()=>{if(g(),f){n==null||n(i);return}s==null||s(!1),r==null||r(i)},x=()=>{r==null||r(null)},p=()=>{s==null||s(!0),r==null||r(i)},b=()=>{n==null||n(i),s==null||s(!1),r==null||r(null)},C=(o==null?void 0:o.uid)===i.uid,P=gh({isSelectedPoint:C}),O=c.useMemo(()=>{let T;switch(!0){case(i.type===30&&!C):{T=xr(w,L,pf);break}case(i.type!==30&&!C):{T=xr(yi.PinPvz,"--owl-color-grey-80");break}case(i.type===30&&C):{T=xr(w,pf,L);break}case(i.type!==30&&C):{T=xr(yi.PinPvz,"--owl-color-black");break}}return gn(T,"Icon url is not defined"),{url:_l(T)}},[C,L,w,i.type]),R=c.useMemo(()=>({lat:i.location.latitude,lng:i.location.longitude}),[i.location.latitude,i.location.longitude]),M=C&&P&&!!(S!=null&&S.getVisible());return E.jsxs(Td,{noClustererRedraw:!0,icon:O,position:R,clusterer:t,options:ph,onLoad:m,onClick:_,children:[a&&E.jsx(pp,{minSnapHeight:300,open:M,onDismiss:x,onSubmitClick:b,children:E.jsx(nh,{hideActions:!0,classes:EC,location:i,onClose:x})}),M&&!a&&E.jsx(Bd,{children:E.jsx(Sb,{...i,hideDetails:e,className:it.balloon,onCloseClick:x,onSubmit:b,onDetails:p})})]},i.uid)},_C=({hideDetails:t,onOpenDetails:e,onPointClick:n,onPointSelected:r,points:i,selectedPoint:o})=>E.jsx(ry,{clusterClass:it.cluster,onClusteringEnd:()=>{setTimeout(()=>{const s=document.getElementsByClassName(it.cluster);for(const a of s)a.addEventListener("touchstart",Ca,{passive:!0})},100)},onUnmount:()=>{const s=document.getElementsByClassName(it.cluster);for(const a of s)a.removeEventListener("touchstart",Ca)},children:s=>E.jsx(E.Fragment,{children:i.map(a=>E.jsx(xC,{point:a,clusterer:s,hideDetails:t,selectedPoint:o,setOpenDetails:e,onPointClick:n,onPointSelected:r},a.uid))})}),OC=c.memo(_C),MC=({onOpenDetails:t,onPointClick:e,onPointSelected:n})=>{const{hideDetails:r,locale:i}=lt(),o=dr(tm),s=vn(u=>u.location),a=nn(Ed),l=JSON.stringify([o.length,i,a==null?void 0:a.place_id]);return E.jsx(OC,{points:o,hideDetails:r,selectedPoint:s,onOpenDetails:t,onPointClick:e,onPointSelected:n},l)},PC=c.memo(MC),gp=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},Z.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),Z.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M31.003 28V17.766a3 3 0 0 0-1.579-2.643l-7.003-3.765a3 3 0 0 0-2.842 0l-7.003 3.765a3 3 0 0 0-1.58 2.643V28a3 3 0 0 0 3 3h14.008a3 3 0 0 0 3-3Zm-5.919 1h2.92a1 1 0 0 0 1-1V17.766a1 1 0 0 0-.527-.881l-7.003-3.766a1 1 0 0 0-.948 0l-7.003 3.766a1 1 0 0 0-.527.88v10.237a1 1 0 0 0 1 1h2.92a2.513 2.513 0 0 1-.05-.5v-7.606a2.5 2.5 0 0 1 2.5-2.5h3.268a2.5 2.5 0 0 1 2.5 2.5V28.5c0 .171-.017.338-.05.5Zm-2.426 0a.5.5 0 0 0 .476-.499v-7.606a.5.5 0 0 0-.5-.5h-3.269a.5.5 0 0 0-.5.5V28.5a.5.5 0 0 0 .476.5h3.317Z",clipRule:"evenodd"}),Z.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),kC="DeliveryBalloon-module__root__Nu90iy",RC="DeliveryBalloon-module__details__eqUTaI",TC="DeliveryBalloon-module__header__JVdyxN",AC="DeliveryBalloon-module__title__-zKKCt",DC="DeliveryBalloon-module__description__no5-ki",IC="DeliveryBalloon-module__actions__C-N0H-",jC="DeliveryBalloon-module__errorVariant__e6uhZl",NC="DeliveryBalloon-module__logo__62gC5h",Ln={root:kC,details:RC,header:TC,title:AC,description:DC,actions:IC,errorVariant:jC,logo:NC},BC=({SSR:t,address:e,className:n,hasCloseButton:r,hideDetails:i,onClose:o,onDetails:s,variant:a})=>{const l=a==="error",u=a==="default",f=t?"{ courier_balloon.title }":E.jsx(er,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":E.jsx(er,{keyName:"error_title",ns:"courier_balloon"}),h=t?"{ courier_balloon.error_description }":E.jsx(er,{keyName:"error_description",ns:"courier_balloon"});return E.jsxs("div",{className:Se(Ln.root,n,Ln[`${a}Variant`]),children:[E.jsxs("div",{className:Ln.header,children:[E.jsx(gp,{className:Ln.logo}),E.jsx("span",{className:Ln.title,children:l?d:f}),r&&E.jsx(ei,{onClick:o})]}),E.jsx("div",{className:Ln.description,children:l?h:e||"{{ properties.address }}"}),u&&!i&&E.jsx("div",{className:Ln.actions,children:E.jsx(Nt,{id:If,as:"button",variant:"primary",className:Ln.details,onClick:s,children:t?"{ details }":E.jsx(er,{keyName:"details",ns:"common"})})})]})},FC="Chip-module__root__zsoSyP",UC="Chip-module__active__BlTSFB",gf={root:FC,active:UC},vf=({active:t,children:e,className:n,...r})=>E.jsx("div",{...r,className:Se(gf.root,n,{[gf.active]:t}),children:e}),VC="TextArea-module__root__8YFknR",zC={root:VC},mf=c.forwardRef(({className:t,inputRef:e,onBlur:n,onChange:r,onFocus:i,...o},s)=>{const a=c.useRef(null);c.useImperativeHandle(s,()=>({focus:()=>{var u,f;(u=a.current)==null||u.focus(),i&&i({target:{value:(f=a.current)==null?void 0:f.value}})},blur:()=>{var u,f;(u=a.current)==null||u.blur(),n&&n({target:{value:(f=a.current)==null?void 0:f.value}})},setValue:u=>{r&&r({target:{value:u}}),a.current&&(a.current.value=u)}}),[n,r,i]);const l=mp(e,a);return E.jsx("textarea",{...o,ref:l,className:Se(zC.root,t),onBlur:n,onFocus:i,onChange:r})}),$C=({hideDeliveryTime:t,set:e})=>(n,r)=>{let i={...n};switch(r.type){case"SET_COMMENT":{i={...n,comment:r.payload};break}case"SET_DELIVERY_TIME":{i={...n,delivery_time:r.payload};break}case"SET_APARTMENT_NUMBER":{i={...n,apartment_number:r.payload};break}}return i.meta={...i.meta,valid:(t||!!i.delivery_time)&&!!i.apartment_number},e==null||e(i),i},HC="DeliveryDetailsView-module__title__azeoUr",WC="DeliveryDetailsView-module__logo__4zZtpM",GC="DeliveryDetailsView-module__header__oDE9He",ZC="DeliveryDetailsView-module__content__6P27SY",qC="DeliveryDetailsView-module__section__2M3Qip",KC="DeliveryDetailsView-module__chips__KmYgha",QC="DeliveryDetailsView-module__actions__43XZ-V",JC="DeliveryDetailsView-module__submit__58LKBw",XC="DeliveryDetailsView-module__actionsHidden__SW-67b",YC="DeliveryDetailsView-module__commentSection__GlX1A2",eE="DeliveryDetailsView-module__comment__2pGG6h",Ct={title:HC,logo:WC,header:GC,content:ZC,section:qC,chips:KC,actions:QC,submit:JC,actionsHidden:XC,commentSection:YC,comment:eE},tE=c.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:o},s)=>{var p;const{hideDeliveryTime:a,inputs:l,locale:u}=lt(),{t:f}=on(["details_modal","courier_balloon","common"]),d=c.useMemo(()=>$C({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=c.useState(!1),[y,g]=c.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),L=c.useCallback(async()=>{v(!0);try{gn(n.address,"Address is required");const b=await Tp({address:n.address,algorithm:10,service:10,language:u||jf});if(!hd(b))return;const C=b==null?void 0:b.data.data,P={...y,address:C};return o==null||o(P),P}finally{v(!1)}},[u,n.address,o,y]);c.useImperativeHandle(s,()=>({submit:L}),[L]);const w=b=>()=>{g({payload:b,type:"SET_DELIVERY_TIME"})},S=b=>{g({payload:b.target.value,type:"SET_APARTMENT_NUMBER"})},m=b=>{g({payload:b.target.value,type:"SET_COMMENT"})},_=ws(l==null?void 0:l.apartment),x=ws(l==null?void 0:l.comment);return E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:Se(Ct.header,t==null?void 0:t.header),children:[E.jsx(ei,{onClick:i}),E.jsxs("div",{className:Ct.title,children:[E.jsx(gp,{className:Ct.logo}),E.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),E.jsxs("div",{className:Se(Ct.content,t==null?void 0:t.content),children:[E.jsxs("section",{className:Ct.section,children:[E.jsxs("span",{children:[f("address"),":"]}),E.jsx("p",{children:n.address})]}),!a&&E.jsxs("section",{className:Ct.section,children:[E.jsxs("span",{children:[f("delivery_time"),":"]}),E.jsxs("div",{className:Ct.chips,children:[E.jsx(vf,{active:y.delivery_time==="8:00-13:00",onClick:w("8:00-13:00"),children:"8:00 - 13:00"}),E.jsx(vf,{active:y.delivery_time==="14:00-22:00",onClick:w("14:00-22:00"),children:"14:00 - 22:00"})]})]}),E.jsxs("section",{className:Ct.section,children:[E.jsxs("span",{children:[f("apartment_number"),":"]}),E.jsx(mf,{..._,rows:1,onChange:S})]}),E.jsxs("section",{className:Se(Ct.section,Ct.commentSection),children:[E.jsxs("span",{children:[f("comment"),":"]}),E.jsx(mf,{...x,className:Ct.comment,onChange:m})]})]}),E.jsx("div",{className:Se(Ct.actions,{[Ct.actionsHidden]:e}),children:E.jsx(Nt,{loading:h,disabled:!((p=y.meta)!=null&&p.valid)||h,variant:"primary",className:Ct.submit,onClick:L,children:f("choose",{ns:"common"})})})]})}),vp=c.memo(tE),nE={header:it.deliveryDetailsViewHeader,content:it.deliveryDetailsViewContent},rE=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:o})=>{const s=gh({isSelectedPoint:!0}),a=c.useRef(null),[l,u]=c.useState(!1),[f,d]=c.useState({...r,comment:"",delivery_time:"",apartment_number:""});c.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const[h,v]=c.useState(null),y=lo("screenSm"),g=c.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),L=()=>{o==null||o(!0)},w=()=>{i==null||i(null)},S=c.useMemo(()=>({url:_l(xr(yi.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...$p)}),[]),m=async()=>{var b;try{u(!0);const C=await((b=a.current)==null?void 0:b.submit());if(!C)return;n==null||n(C),o==null||o(!1),i==null||i(null)}finally{u(!1)}},_=E.jsx(BC,{...f,hideDetails:e,hasCloseButton:y,variant:f.address?"default":"error",className:it.balloon,onDetails:L,onClose:w}),x=s&&!!(h!=null&&h.getVisible()),p=t?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return E.jsxs(Td,{noClustererRedraw:!0,icon:S,position:g,options:ph,onLoad:v,children:[y&&E.jsxs(pp,{minSnapHeight:f.address?200:void 0,submitDisabled:!p||l,submitLoading:l,hideFooter:!f.address,open:x,onDismiss:w,onSubmitClick:m,children:[f.address&&E.jsx(vp,{ref:a,hideActions:!0,classes:nE,location:r,onChange:d,onClose:w}),!f.address&&_]}),!y&&x&&E.jsx(Bd,{onCloseClick:w,children:_})]})},iE=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,mapTheme:o,palette:s}=lt(),a=s==null?void 0:s.primary;function l(){switch(o){case"omnic":return x1;case"omnic-light":return _1(a);default:return}}const u=l(),f=c.useMemo(()=>{var h,v;return{lat:((h=i==null?void 0:i.center)==null?void 0:h[0])??ga[0],lng:((v=i==null?void 0:i.center)==null?void 0:v[1])??ga[1]}},[i==null?void 0:i.center]),d=c.useCallback(async h=>{const{latLng:v}=h;if(!v||r)return;Oe.getState().setDetailsOpen(!1),vn.getState().setSelectedLocation(null);const y=[v.lat(),v.lng()];console.debug("[OmnicLocationsWidget::mapClick]",y);try{await nn.getState().setPlaceAndPoint(y)}catch{Mt.getState().setDeliverPoint({address:null,coords:y})}},[r]);return E.jsx(Bm,{zoom:i==null?void 0:i.initialZoom,center:f,mapContainerClassName:Se(it.root,e),options:{styles:u,...O1},onClick:d,...n,children:t})},oE=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},Z.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),Z.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),Z.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),Z.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),Z.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),sE=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(it.mapControl),n.classList.add(it.mapControl),e.innerHTML="+",n.innerHTML="—",t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(n),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r+1)}),n.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r-1)})},aE=t=>{const e=document.createElement("div");e.classList.add(it.mapControl),e.classList.add(it.geolocationControl),e.innerHTML=Ap.renderToString(E.jsx(oE,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{xl(async n=>{const{latitude:r,longitude:i}=n.coords,o=[r,i];await nn.getState().setPlaceAndPoint(o)})})},lE=({className:t})=>{const e=Fn(),n=Oe($f),r=Oe(Eg),i=dr(gd),o=Mt(ml),{lmsData:s}=Ps(),{disableGeolocation:a,hideDeliveryTime:l,hideDetails:u,hideMapControls:f,onPointClick:d}=lt(),h=c.useCallback(S=>{console.debug("[OmnicLocationsWidget::loadMap]",S),Oe.getState().setMap(S),f||(sE(S),a||aE(S))},[a,f]),v=c.useCallback(S=>{const m=s==null?void 0:s.location.what3words,_=m!=null&&m.id?m:void 0;d==null||d(S,_)},[d,s]),y=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),Oe.getState().setMap(null)},[]),g=c.useCallback(()=>{if(!n)return;const S=n==null?void 0:n.getBounds();S&&(console.debug("[OmnicLocationsWidget::changeBounds]",S),dr.getState().loadNext([[S.getSouthWest().lat(),S.getNorthEast().lat()],[S.getSouthWest().lng(),S.getNorthEast().lng()]],e))},[e,n]),L=c.useCallback(async S=>{if(Mt.getState().setDeliverPoint(null),vn.getState().setSelectedLocation(S),!S)return;const m=[S.location.latitude,S.location.longitude];console.debug("[OmnicLocationsWidget::selectPoint]",m),await nn.getState().setPlace(m)},[]),w=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]);return E.jsxs("div",{className:Se(it.mapContainer,t),children:[E.jsxs(iE,{onIdle:g,onLoad:h,onUnmount:y,onTilesLoaded:w,children:[o&&E.jsx(rE,{hideDeliveryTime:l,hideDetails:u,point:o,setOpenDetails:Oe.getState().setDetailsOpen,setDeliveryPoint:Mt.getState().setDeliverPoint,onPointClick:v}),E.jsx(PC,{onPointClick:v,onOpenDetails:Oe.getState().setDetailsOpen,onPointSelected:L})]}),(i||r)&&E.jsx(xd,{className:it.overlay,children:E.jsx(os,{})})]})},uE=c.memo(lE),cE=t=>({google:uE})[t];function mp(...t){return c.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const ws=t=>{const e=c.useCallback(()=>{var n;(n=t==null?void 0:t.onClick)==null||n.call(t,t.name)},[t]);return{ref:t==null?void 0:t.ref,name:t==null?void 0:t.name,onClick:e}},fE=()=>{throw new Error("useMediaQuery is a client-only hook")};function dE(t){const e=c.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return c.useSyncExternalStore(e,n,fE)}const hE="768px",pE="1024px",gE="1280px",vE="1536px",mE={screenSm:hE,screenMd:pE,screenLg:gE,screenXl:vE};function lo(t){return dE(`(max-width: calc(${mE[t]} - 1px))`)}const yE=(t,e,n)=>{const{disableGeolocation:r}=n??{},i=Oe($f);c.useEffect(()=>{i&&(console.debug("[OmnicWidgetLocations::setMapLoaded]",i),Oe.getState().setLoaded())},[i]);const o=t[0],s=t[1];c.useEffect(()=>{if(!i)return;const a=[o,s],l=async()=>{console.debug("[OmnicWidgetLocations::setFallbackCenter]",a),nn.getState().setPlace(a,[],"country")};if(r){l();return}xl(async u=>{const{latitude:f,longitude:d}=u.coords,h=[f,d];console.debug("[OmnicWidgetLocations::setGeoPosition]",h),await nn.getState().setPlace(h,[],"country")},()=>l())},[o,s,i,e,r])},yp=z0().use(P0()).use(w0()).init({language:"en",defaultNs:"common",ns:["common","courier_balloon","current_location","details_modal","header","location_aside","location_selector","receive_filter","send_filter","type_filter"],apiUrl:"https://tms.omnic.solutions",apiKey:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc"}),bE=t=>{c.useEffect(()=>{t&&(yp.changeLanguage(t),rs.setLanguage(t))},[t])},wE=t=>{c.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&io(`--owl-color-${n}`,r)}}},[t])},SE=t=>{c.useEffect(()=>{t&&t!==void 0&&io("--owl-button-radius",`${t}px`)},[t])},LE=t=>{c.useEffect(()=>{t&&t!==void 0&&io("--owl-font",t)},[t])},CE={open:!1},EE=t=>t.open,Xn=mn(t=>({...CE,toggle(e){t(n=>({open:e??!n.open}))}})),xE=t=>{const e=t==="selector";c.useEffect(()=>{e&&Xn.getState().toggle(!0)},[e])},_E=({locale:t})=>{const[e,n]=c.useState(!1);return c.useEffect(()=>{n(!1)},[t]),c.useEffect(()=>{e||n(!0)},[e]),console.debug("[OmnicWidgetLocations::remount]",{locale:t,mounted:e}),e},OE=t=>{c.useEffect(()=>{t==="sharp"&&io("--owl-radius","0")},[t])},ME=({children:t})=>{const{cornersVariant:e,font:n,locale:r,palette:i,radius:o,startScreen:s}=lt();return LE(n),bE(r),wE(i),SE(o),xE(s),OE(e),E.jsx(E.Fragment,{children:t})},PE=({children:t})=>{const{disableGeolocation:e,map:n}=lt();return gn(n==null?void 0:n.center,"Map center is required"),gn(n==null?void 0:n.initialZoom,"Map initial zoom is required"),yE(n.center,n.initialZoom,{disableGeolocation:e}),E.jsx(E.Fragment,{children:t})},kE=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},Z.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 11.777C24 4.052 17.606 0 12 0S0 4.052 0 11.777C0 16.915 3.994 22.334 12 28c8.006-5.666 12-11.085 12-16.224ZM12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",clipRule:"evenodd"})),RE=()=>{Xn.getState().toggle(!0),Oe.getState().setDetailsOpen(!1),Mt.getState().setDeliverPoint(null),vn.getState().setSelectedLocation(null)},TE="CurrentLocation-module__root__AeQCGT",AE="CurrentLocation-module__icon__459m9q",DE="CurrentLocation-module__text__w-9v28",ca={root:TE,icon:AE,text:DE},bp=({className:t})=>{const{t:e}=on("current_location"),n=nn(Ed),r=nn(Sm);return E.jsxs("div",{role:"presentation",className:Se(ca.root,t),onClick:RE,children:[E.jsx(kE,{className:ca.icon}),E.jsxs("span",{className:ca.text,children:[!n&&e("choose_from_map"),n&&`${(r==null?void 0:r.long_name)??n.formatted_address}`]})]})},IE=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},Z.createElement("path",{fill:"currentcolor",d:"M6.698 32a6.579 6.579 0 0 1-3.35-.889 6.718 6.718 0 0 1-2.443-2.4A6.285 6.285 0 0 1 0 25.422V6.578c0-1.215.302-2.311.905-3.29A6.718 6.718 0 0 1 3.35.889 6.579 6.579 0 0 1 6.698 0h19.188c1.207 0 2.308.296 3.304.889a6.72 6.72 0 0 1 2.444 2.4c.633.978.95 2.074.95 3.289v18.844a6.061 6.061 0 0 1-.95 3.29 6.72 6.72 0 0 1-2.444 2.4c-.996.592-2.097.888-3.304.888H6.698Zm.317-6.933h18.464V6.933H7.015v18.134ZM37.568 32V0h7.24l11.043 12.933L66.848 0h7.287v32h-7.06V10.533L55.85 23.69 44.582 10.578V32h-7.014Zm41.985 0V0h7.241l18.238 21.333V0h7.105v32h-7.241L86.568 10.578V32h-7.015Zm36.523 0V0H123v32h-6.924Z"})),jE=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:192,height:20,fill:"none",viewBox:"0 0 192 20",...t},Z.createElement("path",{fill:"#000",d:"M4.1 20a3.966 3.966 0 0 1-2.05-.555 4.15 4.15 0 0 1-1.496-1.498A3.982 3.982 0 0 1 0 15.895V4.133c0-.758.185-1.442.554-2.052A4.15 4.15 0 0 1 2.05.583 3.966 3.966 0 0 1 4.1.028h11.743c.738 0 1.412.185 2.022.555A4.15 4.15 0 0 1 19.36 2.08c.388.61.582 1.294.582 2.052v11.762a3.83 3.83 0 0 1-.582 2.052 4.15 4.15 0 0 1-1.495 1.498c-.61.37-1.284.555-2.022.555H4.099Zm.193-4.327h11.3V4.355h-11.3v11.318ZM22.992 20V.028h4.432L34.182 8.1l6.73-8.072h4.46V20H41.05V6.602l-6.87 8.21-6.896-8.182V20h-4.293Zm25.696 0V.028h4.431l11.162 13.315V.028h4.348V20h-4.431L52.98 6.63V20h-4.294Zm22.352 0V.028h4.238V20H71.04Zm14.963 0V0h4.293v15.673h12.554V20H86.003Zm18.489 0V0h4.293v15.673h12.554V20h-16.847Zm18.717 0V4.133c0-.758.185-1.442.554-2.052a4.156 4.156 0 0 1 1.496-1.498 3.966 3.966 0 0 1 2.049-.555h11.716c.757 0 1.441.185 2.05.555.628.37 1.126.869 1.495 1.498.388.61.582 1.294.582 2.052V20h-4.348v-6.435h-11.301V20h-4.293Zm4.293-10.763h11.301V4.355h-11.301v4.882ZM146.307 20V.028h4.432l6.758 8.072 6.73-8.072h4.459V20h-4.32V6.602l-6.869 8.21L150.6 6.63V20h-4.293Zm25.751 0V4.133c0-.758.185-1.442.554-2.052a4.148 4.148 0 0 1 1.496-1.498 3.966 3.966 0 0 1 2.049-.555h11.716c.757 0 1.44.185 2.05.555.628.37 1.126.869 1.496 1.498A3.75 3.75 0 0 1 192 4.133V20h-4.348v-6.435h-11.301V20h-4.293Zm4.293-10.763h11.301V4.355h-11.301v4.882Z"})),NE="Header-module__root__Pe4MYp",BE="Header-module__nav__wtnkmT",FE="Header-module__navItem__-Fy63Z",UE="Header-module__logo__xO2bWO",xi={root:NE,nav:BE,navItem:FE,logo:UE},VE={llama:jE,default:IE},zE=()=>{const{hideLogo:t,logo:e="default"}=lt();if(t)return null;const n=VE[e];return E.jsx("div",{className:xi.logo,children:E.jsx(n,{})})},$E=({className:t})=>{const{t:e}=on("header"),{disableDelivery:n}=lt(),r=Oe(wg),i=Mt(ml);c.useEffect(()=>{i?Oe.getState().setMode("location_delivery"):Oe.getState().setMode("self_pickup")},[i]);const o=()=>{Mt.getState().setDeliverPoint(null),Oe.getState().setMode("self_pickup")},s=()=>{Mt.getState().setDeliverPoint(null),Oe.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return E.jsxs("div",{className:Se(xi.root,t),children:[E.jsx(zE,{}),E.jsxs("nav",{className:xi.nav,children:[!n&&E.jsx(Nt,{as:"link",className:xi.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&E.jsx(Nt,{as:"link",className:xi.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),E.jsx(bp,{})]})]})},HE=c.memo($E),WE={open:!1},Qr=mn(t=>({...WE,toggle(e){Oe.getState().setDetailsOpen(!1),Mt.getState().setDeliverPoint(null),vn.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),GE="Layout-module__root__qzPL-f",ZE="Layout-module__headerHidden__JEN-d0",qE="Layout-module__sidebarHidden__x017O3",KE="Layout-module__sidebarOpen__IZnIjs",Bo={root:GE,headerHidden:ZE,sidebarHidden:qE,sidebarOpen:KE},QE=({children:t})=>{const{hideFilters:e,hideHeader:n}=lt(),r=Qr(i=>i.open);return E.jsx("div",{className:Se(Bo.root,{[Bo.sidebarOpen]:r,[Bo.headerHidden]:n,[Bo.sidebarHidden]:e}),children:t})},Wl=()=>E.jsx(xd,{children:E.jsx(os,{})}),JE=({children:t})=>{const e=dr(nm);return dr(gd)&&!e?E.jsx(Wl,{}):E.jsx(E.Fragment,{children:t})};var wp={},Is={},Sp={exports:{}},XE="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",YE=XE,ex=YE;function Lp(){}function Cp(){}Cp.resetWarningCache=Lp;var tx=function(){function t(r,i,o,s,a,l){if(l!==ex){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Cp,resetWarningCache:Lp};return n.PropTypes=n,n};Sp.exports=tx();var nx=Sp.exports,js={},Jr={};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.loadGoogleMapScript=Jr.isBrowser=void 0;var Ep=typeof window<"u"&&window.document;Jr.isBrowser=Ep;var rx=function(e,n){if(!Ep||typeof google<"u"&&google.maps&&google.maps.api)return Promise.resolve();var r=document.querySelectorAll('script[src*="'.concat(e,'"]'));if(r&&r.length)return new Promise(function(s){if(typeof google<"u")return s();r[0].addEventListener("load",function(){return s()})});var i=new URL(n);i.searchParams.set("callback","__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__");var o=document.createElement("script");return o.src=i.toString(),new Promise(function(s){window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__=s,document.body.appendChild(o)})};Jr.loadGoogleMapScript=rx;var Ns={};Object.defineProperty(Ns,"__esModule",{value:!0});Ns.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var ix="https://maps.googleapis.com/maps/api/js";Ns.GOOGLE_MAP_SCRIPT_BASE_URL=ix;function es(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?es=function(n){return typeof n}:es=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},es(t)}Object.defineProperty(js,"__esModule",{value:!0});js.default=cx;var Et=sx(c),fa=Jr,ox=Ns;function xp(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(xp=function(i){return i?n:e})(t)}function sx(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||es(t)!=="object"&&typeof t!="function")return{default:t};var n=xp(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function yf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function bf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?yf(Object(n),!0).forEach(function(r){ax(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ax(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lx(t,e){if(t==null)return{};var n=ux(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ux(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function cx(t){var e=t.ref,n=t.onPlaceSelected,r=t.apiKey,i=t.libraries,o=i===void 0?"places":i,s=t.inputAutocompleteValue,a=s===void 0?"new-password":s,l=t.options;l=l===void 0?{}:l;var u=l.types,f=u===void 0?["(cities)"]:u,d=l.componentRestrictions,h=l.fields,v=h===void 0?["address_components","geometry.location","place_id","formatted_address"]:h,y=l.bounds,g=lx(l,["types","componentRestrictions","fields","bounds"]),L=t.googleMapsScriptBaseUrl,w=L===void 0?ox.GOOGLE_MAP_SCRIPT_BASE_URL:L,S=t.language,m=(0,Et.useRef)(null),_=(0,Et.useRef)(null),x=(0,Et.useRef)(null),p=(0,Et.useRef)(null),b=S?"&language=".concat(S):"",C="".concat(w,"?libraries=").concat(o,"&key=").concat(r).concat(b),P=(0,Et.useCallback)(function(){return(0,fa.loadGoogleMapScript)(w,C)},[w,C]);return(0,Et.useEffect)(function(){var O=bf(bf({},g),{},{fields:v,types:f,bounds:y});if(d&&(O.componentRestrictions=d),!(x.current||!m.current||!fa.isBrowser)){e&&!e.current&&(e.current=m.current);var R=function(){var T;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((T=google.maps)!==null&&T!==void 0&&T.places))return console.error("Google maps places API must be loaded.");if(!m.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");x.current=new google.maps.places.Autocomplete(m.current,O),x.current&&(_.current=x.current.addListener("place_changed",function(){n&&x&&x.current&&n(x.current.getPlace(),m.current,x.current)}))};return r?P().then(function(){return R()}):R(),function(){return _.current?_.current.remove():void 0}}},[]),(0,Et.useEffect)(function(){var O;!(Et.default!==null&&Et.default!==void 0&&(O=Et.default.version)!==null&&O!==void 0&&O.startsWith("18"))&&fa.isBrowser&&window.MutationObserver&&m.current&&m.current instanceof HTMLInputElement&&(p.current=new MutationObserver(function(){p.current.disconnect(),m.current&&(m.current.autocomplete=a)}),p.current.observe(m.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,Et.useEffect)(function(){x.current&&x.current.setFields(v)},[v]),(0,Et.useEffect)(function(){x.current&&x.current.setBounds(y)},[y]),(0,Et.useEffect)(function(){x.current&&x.current.setComponentRestrictions(d)},[d]),(0,Et.useEffect)(function(){x.current&&x.current.setOptions(g)},[g]),{ref:m,autocompleteRef:x}}function ts(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ts=function(n){return typeof n}:ts=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ts(t)}Object.defineProperty(Is,"__esModule",{value:!0});Is.default=void 0;var gl=dx(c),Qe=_p(nx),fx=_p(js);function _p(t){return t&&t.__esModule?t:{default:t}}function Op(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Op=function(i){return i?n:e})(t)}function dx(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||ts(t)!=="object"&&typeof t!="function")return{default:t};var n=Op(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Ss(){return Ss=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ss.apply(this,arguments)}function hx(t,e){if(t==null)return{};var n=px(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function px(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Mp(t){var e=t.onPlaceSelected,n=t.apiKey,r=t.libraries,i=t.inputAutocompleteValue,o=t.options,s=t.googleMapsScriptBaseUrl,a=t.refProp,l=t.language,u=hx(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,fx.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return gl.default.createElement("input",Ss({ref:d},u))}Mp.propTypes={apiKey:Qe.default.string,libraries:Qe.default.arrayOf(Qe.default.string),ref:Qe.default.oneOfType([Qe.default.func,Qe.default.shape({current:Qe.default.any})]),googleMapsScriptBaseUrl:Qe.default.string,onPlaceSelected:Qe.default.func,inputAutocompleteValue:Qe.default.string,options:Qe.default.shape({componentRestrictions:Qe.default.object,bounds:Qe.default.object,location:Qe.default.object,offset:Qe.default.number,origin:Qe.default.object,radius:Qe.default.number,sessionToken:Qe.default.object,types:Qe.default.arrayOf(Qe.default.string)}),language:Qe.default.string};var gx=(0,gl.forwardRef)(function(t,e){return gl.default.createElement(Mp,Ss({},t,{refProp:e}))});Is.default=gx;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"usePlacesWidget",{enumerable:!0,get:function(){return n.default}});var e=r(Is),n=r(js);function r(i){return i&&i.__esModule?i:{default:i}}})(wp);var Pp=wp;const vx="Aside-module__root__EotK2f",mx="Aside-module__open__Zwmbs5",yx="Aside-module__overlay__slLdHF",bx="Aside-module__container__28P4wq",Fo={root:vx,open:mx,overlay:yx,container:bx},wx=({children:t,className:e,open:n})=>E.jsxs("div",{className:Se(Fo.root,e,{[Fo.open]:n}),children:[E.jsx("div",{className:Fo.overlay}),E.jsx("div",{className:Fo.container,children:t})]}),Sx="Input-module__locationSearchRoot__svh-f9",Lx="Input-module__endAdornment__m40K5R",Cx="Input-module__input__505b7i",Ex="Input-module__startAdornment__D-sJ0N",xx="Input-module__locationSearchInput__2YK1MG",_x="Input-module__label__gmqtsf",Ox="Input-module__inputContainer__vubIa-",Cr={locationSearchRoot:Sx,endAdornment:Lx,input:Cx,startAdornment:Ex,locationSearchInput:xx,label:_x,inputContainer:Ox},kp=c.forwardRef(({className:t,endAdornment:e,inputRef:n,label:r,onBlur:i,onChange:o,startAdornment:s,...a},l)=>{const u=c.useId(),f=c.useRef(null);c.useImperativeHandle(l,()=>({focus:()=>{var h;(h=f.current)==null||h.focus()},blur:()=>{var h;(h=f.current)==null||h.blur()},setValue:h=>{if(o){o({target:{value:h}});return}if(i){i({target:{value:h}});return}f.current&&(f.current.value=h)}}),[i,o]);const d=mp(n,f);return E.jsxs("label",{htmlFor:a.id??u,className:Se(Cr.locationSearchRoot,t),children:[r&&E.jsx("span",{className:Cr.label,children:r}),E.jsxs("div",{className:Cr.inputContainer,children:[s&&E.jsx("div",{className:Cr.startAdornment,children:s}),E.jsx("input",{...a,ref:d,id:a.id??u,className:Cr.locationSearchInput,onChange:o,onBlur:i}),e&&E.jsx("div",{className:Cr.endAdornment,children:e})]})]})}),Mx="LocationAside-module__submit__CSKcqi",Px="LocationAside-module__container__S1NejR",kx="LocationAside-module__selector__hl74ke",Rx="LocationAside-module__label__0Zk8at",Tx="LocationAside-module__header__N1wgyn",Ax="LocationAside-module__close__VsE88z",Uo={submit:Mx,container:Px,selector:kx,label:Rx,header:Tx,close:Ax},Dx=c.forwardRef((t,e)=>{const{t:n}=on(["location_aside","common"]),r=Xn(EE),{country:i,hideCloseButtonOnLocationScreen:o,inputs:s,onCloseLocationSelector:a,onLocationSelect:l}=lt(),u=c.useRef(null),[f,d]=c.useState("");c.useImperativeHandle(e,()=>({open:()=>Xn.getState().toggle(!0),close:()=>Xn.getState().toggle(!1)}),[]);const h=async S=>{Xn.getState().toggle(!1),await nn.getState().setPlace(S),l==null||l(S),S!=null&&S.formatted_address&&d(S==null?void 0:S.formatted_address)},v=()=>{Xn.getState().toggle(!1),a==null||a()},y=i?{componentRestrictions:{country:i}}:void 0,g=S=>{d(S.target.value)},{ref:L}=Pp.usePlacesWidget({libraries:["places"],options:y,onPlaceSelected:h,apiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",inputAutocompleteValue:f}),w=ws(s==null?void 0:s.city);return E.jsx(wx,{open:r,children:E.jsx("div",{ref:u,className:Uo.container,children:E.jsxs("div",{className:Uo.selector,children:[E.jsxs("div",{className:Uo.header,children:[E.jsx("div",{className:Uo.label,children:n("choose_city")}),!o&&E.jsx(ei,{position:"relative",onClick:v})]}),E.jsx(kp,{...w,inputRef:L,value:f,placeholder:n("placeholder"),onChange:g})]})})})}),Ix=c.memo(Dx),jx=({children:t})=>{const{locale:e}=lt(),{isLoaded:n}=Rd({language:e,libraries:Wp,googleMapsApiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA"});return n?E.jsx(E.Fragment,{children:t}):E.jsx(Wl,{})},Nx=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},Z.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M14.617 16.032a9 9 0 1 1 1.414-1.414l3.676 3.675a1 1 0 0 1-1.414 1.414l-3.676-3.675ZM2 9a7 7 0 1 1 12.04 4.858 1.005 1.005 0 0 0-.182.182A7 7 0 0 1 2 9Z",clipRule:"evenodd"})),Bx=({className:t})=>{const{t:e}=on("location_selector"),{country:n,inputs:r,onLocationSelect:i}=lt(),[o,s]=c.useState(""),[a,l]=c.useState(!1),u=[],f=n?{componentRestrictions:{country:n},types:u}:{types:u},d=async S=>{await nn.getState().setPlaceAndPoint(S,{ignoreSelection:!0}),i==null||i(S)},{ref:h}=Pp.usePlacesWidget({libraries:["places"],options:f,onPlaceSelected:d,inputAutocompleteValue:o}),v=S=>{a&&Oe.getState().setBlurred(!!S.target.value),s(S.target.value)},y=()=>{o&&Oe.getState().setBlurred(!0),Oe.getState().setDetailsOpen(!1),Mt.getState().setDeliverPoint(null),vn.getState().setSelectedLocation(null),l(!0)},g=()=>{Oe.getState().setBlurred(!1),l(!1)},L=S=>{S.key==="Enter"&&S.preventDefault()},w=ws(r==null?void 0:r.address);return E.jsx(kp,{...w,inputRef:h,value:o,className:t,endAdornment:E.jsx(Nx,{}),placeholder:e("placeholder"),onChange:v,onFocus:y,onBlur:g,onKeyDown:L})},Fx=({className:t})=>Oe(Cg)?E.jsx(Bx,{className:t}):null,Ux=c.memo(Fx),Vx="DeliveryDetailsModal-module__root__qwKnjX",zx={root:Vx},$x=({className:t,location:e,onClose:n,onSubmit:r})=>E.jsx("div",{className:Se(zx.root,t),children:E.jsx(vp,{location:e,onClose:n,onSubmit:r})}),Hx="LocationDetailsModal-module__root__PyRnLM",Wx={root:Hx},Gx=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return E.jsx("div",{className:Se(Wx.root,t),children:E.jsx(nh,{location:e,onClose:n,onSubmit:i})})},Zx="MapContainer-module__root__1Os6Q-",qx="MapContainer-module__mapWrapper__Cwe7qC",Kx="MapContainer-module__wrapperBlurred__04NN2L",Qx="MapContainer-module__locationSelector__Pr1zS-",Jx="MapContainer-module__filterButton__CW3Qv7",Xx="MapContainer-module__sidebarOpen__lGMVrJ",Yx="MapContainer-module__filterIcon__T01XsJ",e2="MapContainer-module__details__gM8LWX",tn={root:Zx,mapWrapper:qx,wrapperBlurred:Kx,locationSelector:Qx,filterButton:Jx,sidebarOpen:Xx,filterIcon:Yx,details:e2},t2=()=>{const{onPointClick:t}=lt(),e=Oe(yl),n=vn(_g),r=Mt(ml),i=c.useCallback(()=>{Oe.getState().setDetailsOpen(!1)},[]),o=c.useCallback(s=>{t==null||t(s),Oe.getState().setDetailsOpen(!1),vn.getState().setSelectedLocation(null),Mt.getState().setDeliverPoint(null)},[t]);return E.jsxs(E.Fragment,{children:[(r==null?void 0:r.address)&&e&&E.jsx($x,{location:r,className:tn.details,onClose:i,onSubmit:o}),n&&e&&E.jsx(Gx,{location:n,className:tn.details,onClose:i,onSubmit:o})]})},n2=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},Z.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),Z.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,strokeWidth:1.5,d:"M32.093 10h13.814c1.151 0 2.093.91 2.093 2.02v2.223c0 .808-.523 1.818-1.047 2.324l-4.5 3.839c-.627.505-1.046 1.515-1.046 2.323v4.344c0 .607-.419 1.415-.942 1.718L39 29.7c-1.36.808-3.244-.101-3.244-1.717v-5.355c0-.707-.419-1.616-.837-2.121l-3.977-4.041c-.523-.506-.942-1.415-.942-2.02V12.12c0-1.21.942-2.12 2.093-2.12Z"})),r2=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},Z.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),Z.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.165 7h9.67c.806 0 1.465.636 1.465 1.414V9.97c0 .566-.366 1.273-.733 1.627l-3.15 2.687c-.44.353-.732 1.06-.732 1.627v3.04c0 .425-.293.99-.66 1.203L14 20.79c-.952.566-2.271-.07-2.271-1.202V15.84c0-.495-.293-1.132-.586-1.485l-2.784-2.83c-.366-.353-.659-.99-.659-1.413V8.485C7.7 7.636 8.36 7 9.165 7Z"})),i2=()=>{const t=Qr(i=>i.open),e=Qr(i=>i.toggle),n=lo("screenSm"),r=()=>{e(!0)};return E.jsxs("div",{role:"presentation",className:Se(tn.filterButton,{[tn.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&E.jsx(bp,{}),n?E.jsx(r2,{className:tn.filterIcon,onClick:r}):E.jsx(n2,{className:tn.filterIcon})]})},o2=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=lt(),i=Oe(Lg),o=Oe(yl);return E.jsxs("div",{className:Se(tn.root,e),children:[!r&&!o&&E.jsx(Ux,{className:tn.locationSelector}),!n&&E.jsx(i2,{}),E.jsx("div",{className:Se(tn.mapWrapper,{[tn.wrapperBlurred]:i}),children:t}),E.jsx(t2,{})]})},s2=c.memo(o2),a2="Separator-module__root__eQtZey",l2={root:a2},da=({className:t,...e})=>E.jsx("hr",{className:Se(l2.root,t),...e}),u2="Sidebar-module__root__4j1MA3",c2="Sidebar-module__closeButton__HLXy1c",f2="Sidebar-module__open__mqQXF6",d2="Sidebar-module__header__Afp6uz",h2="Sidebar-module__typeFilter__GN46u9",p2="Sidebar-module__separator__6I4QoJ",g2="Sidebar-module__withRightPadding__2u1Ina",v2="Sidebar-module__sheetContent__SaoncI",m2="Sidebar-module__doneButton__4aeaSD",hn={root:u2,closeButton:c2,open:f2,header:d2,typeFilter:h2,separator:p2,withRightPadding:g2,sheetContent:v2,doneButton:m2},y2=()=>{const{t}=on("common"),e=lo("screenSm"),n=Qr(i=>i.toggle),r=()=>{n(!1)};return E.jsxs("div",{className:hn.header,children:[e&&E.jsx("div",{role:"presentation",className:hn.doneButton,onClick:r,children:t("done")}),!e&&E.jsx(ei,{className:hn.closeButton,onClick:r})]})},b2="Radio-module__root__7ElY2W",w2="Radio-module__label__c-sYW3",wf={root:b2,label:w2},S2=({className:t,label:e,labelProps:n={},...r})=>{const i=c.useId(),{className:o,...s}=n;return E.jsxs("label",{htmlFor:i,className:Se(wf.label,o),...s,children:[E.jsx("input",{id:i,type:"radio",className:Se(wf.root,t),...r}),e]})},Rr=t=>E.jsx(S2,{...t,type:"checkbox"}),L2="RadioGroup-module__root__ewZw-x",C2="RadioGroup-module__body__k8BJAs",E2="RadioGroup-module__legend__tcfV7q",ha={root:L2,body:C2,legend:E2},Rp=({children:t,className:e,label:n,onChange:r,value:i,...o})=>E.jsxs("div",{className:Se(ha.root,e),...o,children:[n&&E.jsx("span",{className:ha.legend,children:n}),E.jsx("div",{className:ha.body,children:c.Children.map(t,s=>c.isValidElement(s)?c.cloneElement(s,{checked:!!(i!=null&&i[s.props.value]),onChange:a=>r==null?void 0:r({...i,[a.target.value]:a.target.checked})}):null)})]}),x2=({className:t,onChange:e})=>{const{t:n}=on("receive_filter"),r=Fn(kg);return E.jsxs(Rp,{value:r,label:n("title"),className:t,onChange:e,children:[E.jsx(Rr,{name:"receive",value:Wt.DressingRoom,label:n("dressing_room")}),E.jsx(Rr,{name:"receive",value:Wt.CheckOrder,label:n("check_order")}),E.jsx(Rr,{name:"receive",value:Wt.PayByCash,label:n("pay_by_cash")})]})},_2=c.memo(x2),O2=({className:t,onChange:e})=>{const{t:n}=on("send_filter"),r=Fn(Pg);return E.jsxs(Rp,{className:t,value:r,label:n("title"),onChange:e,children:[E.jsx(Rr,{name:"send",value:Gt.Return,label:n("sending_returns")}),E.jsx(Rr,{name:"send",value:Gt.Shipping,label:n("shipping")}),E.jsx(Rr,{name:"send",value:Gt.Payment,label:n("payment")})]})},M2=c.memo(O2),P2="TypeFilter-module__root__WH5EQV",k2="TypeFilter-module__button__f0mSfo",Vo={root:P2,button:k2},R2=({className:t,onChange:e,value:n})=>{const{t:r}=on("type_filter"),i=o=>()=>e==null?void 0:e(o);return E.jsxs("div",{className:Se(Vo.root,t),children:[E.jsx(Nt,{className:Vo.button,variant:n===dn.All?"primary":"secondary",onClick:i(dn.All),children:r("all")}),E.jsx(Nt,{className:Vo.button,variant:n===dn.PostOffice?"primary":"secondary",onClick:i(dn.PostOffice),children:r("post_office")}),E.jsx(Nt,{className:Vo.button,variant:n===dn.PickPoint?"primary":"secondary",onClick:i(dn.PickPoint),children:r("pick_point")})]})},T2=({className:t,onChange:e})=>{const n=Fn(Mg);return E.jsx(R2,{value:n,className:t,onChange:e})},A2=c.memo(T2),D2=({className:t})=>{const e=lo("screenSm"),n=Qr(l=>l.open),r=c.useCallback(l=>Fn.getState().setFilter({type:l}),[]),i=c.useCallback(l=>Fn.getState().setFilter({send:l}),[]),o=c.useCallback(l=>Fn.getState().setFilter({receive:l}),[]),s=c.useCallback(()=>Qr.getState().toggle(!1),[]),a=E.jsxs(E.Fragment,{children:[E.jsx(y2,{}),E.jsxs("div",{className:hn.withRightPadding,children:[E.jsx(A2,{className:hn.typeFilter,onChange:r}),E.jsx(da,{className:hn.separator}),E.jsx(_2,{onChange:o}),E.jsx(da,{}),E.jsx(M2,{onChange:i}),E.jsx(da,{})]})]});return e?E.jsx(dp,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-hp,onDismiss:s,children:E.jsx("div",{className:hn.sheetContent,children:a})}):E.jsx("div",{className:Se(hn.root,t,{[hn.open]:n}),children:a})},I2="App-module__map__Kf-2JS",j2="App-module__sidebar__ORIzGk",N2="App-module__header__bgP9DA",pa={map:I2,sidebar:j2,header:N2},B2=new r1,F2=({config:t,options:e})=>{const n=mm(t),{INN:r,hideFilters:i,hideHeader:o,locale:s,map:a}=n;gn(r,"INN is required"),ym(r,e),gn(a==null?void 0:a.provider,"Map provider is required");const l=cE(a.provider);rm();const u=_E({locale:s});return E.jsx(Ip,{baseColor:"#f3f3f3",highlightColor:"#ecebeb",children:E.jsx(l1,{client:B2,children:E.jsx(Nf.Provider,{value:n,children:E.jsx(PE,{children:E.jsx(ME,{children:E.jsx(H0,{tolgee:yp,fallback:E.jsx(Wl,{}),children:u&&E.jsx(jx,{children:E.jsx(JE,{children:E.jsxs(QE,{children:[!o&&E.jsx(HE,{className:pa.header}),!i&&E.jsx(D2,{className:pa.sidebar}),E.jsx(s2,{className:pa.map,children:E.jsx(l,{})}),E.jsx(Ix,{})]})})})})})})})})})},Tp=async t=>Fi.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}});exports.EReceiveFilter=Wt;exports.ESendFilter=Gt;exports.ETypeFilter=dn;exports.Widget=F2;exports.createPointsIterator=La;exports.fetchPointsRequest=Sa;exports.fromHoursMinutesToMinutes=Rg;exports.fromMinutesToHoursMinutes=Tg;exports.getAddressFormGeocode=xa;exports.getBoundsFromPoint=Ag;exports.getCurrentPosition=xl;exports.getNormalizedAddress=Tp;exports.getPropertyValue=pd;exports.isCoordinates=Ea;exports.isDeliveryPoint=Yv;exports.isHttpSuccess=hd;exports.isPlaceId=dd;exports.replaceSvgCurrentColor=xr;exports.setWidgetCSSProperty=io;exports.stopImmediatePropagation=Ca;exports.svgStringToBase64URL=_l;
|
|
152
|
+
*/function Qc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Jc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Qc(Object(n),!0).forEach(function(r){wL(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function wL(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Xc=function(){var t=[];return{activateTrap:function(n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var i=t.indexOf(n);i===-1||t.splice(i,1),t.push(n)},deactivateTrap:function(n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}}}(),SL=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},LL=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},CL=function(e){return e.key==="Tab"||e.keyCode===9},Yc=function(e){return setTimeout(e,0)},ef=function(e,n){var r=-1;return e.every(function(i,o){return n(i)?(r=o,!1):!0}),r},vi=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},To=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},EL=function(e,n){var r=(n==null?void 0:n.document)||document,i=Jc({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s,a=function(p,b,C){return p&&p[b]!==void 0?p[b]:i[C||b]},l=function(p){return o.containerGroups.findIndex(function(b){var C=b.container,P=b.tabbableNodes;return C.contains(p)||P.find(function(O){return O===p})})},u=function(p){var b=i[p];if(typeof b=="function"){for(var C=arguments.length,P=new Array(C>1?C-1:0),O=1;O<C;O++)P[O-1]=arguments[O];b=b.apply(void 0,P)}if(b===!0&&(b=void 0),!b){if(b===void 0||b===!1)return b;throw new Error("`".concat(p,"` was specified but was not a node, or did not return a node"))}var R=b;if(typeof b=="string"&&(R=r.querySelector(b),!R))throw new Error("`".concat(p,"` as selector refers to no known node"));return R},f=function(){var p=u("initialFocus");if(p===!1)return!1;if(p===void 0)if(l(r.activeElement)>=0)p=r.activeElement;else{var b=o.tabbableGroups[0],C=b&&b.firstTabbableNode;p=C||u("fallbackFocus")}if(!p)throw new Error("Your focus-trap needs to have at least one focusable element");return p},d=function(){if(o.containerGroups=o.containers.map(function(p){var b=mL(p,i.tabbableOptions),C=yL(p,i.tabbableOptions);return{container:p,tabbableNodes:b,focusableNodes:C,firstTabbableNode:b.length>0?b[0]:null,lastTabbableNode:b.length>0?b[b.length-1]:null,nextTabbableNode:function(O){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,M=C.findIndex(function(T){return T===O});if(!(M<0))return R?C.slice(M+1).find(function(T){return Ro(T,i.tabbableOptions)}):C.slice(0,M).reverse().find(function(T){return Ro(T,i.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(p){return p.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},h=function x(p){if(p!==!1&&p!==r.activeElement){if(!p||!p.focus){x(f());return}p.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=p,SL(p)&&p.select()}},v=function(p){var b=u("setReturnFocus",p);return b||(b===!1?!1:p)},y=function(p){var b=To(p);if(!(l(b)>=0)){if(vi(i.clickOutsideDeactivates,p)){s.deactivate({returnFocus:i.returnFocusOnDeactivate&&!sa(b,i.tabbableOptions)});return}vi(i.allowOutsideClick,p)||p.preventDefault()}},g=function(p){var b=To(p),C=l(b)>=0;C||b instanceof Document?C&&(o.mostRecentlyFocusedNode=b):(p.stopImmediatePropagation(),h(o.mostRecentlyFocusedNode||f()))},L=function(p){var b=To(p);d();var C=null;if(o.tabbableGroups.length>0){var P=l(b),O=P>=0?o.containerGroups[P]:void 0;if(P<0)p.shiftKey?C=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:C=o.tabbableGroups[0].firstTabbableNode;else if(p.shiftKey){var R=ef(o.tabbableGroups,function(N){var V=N.firstTabbableNode;return b===V});if(R<0&&(O.container===b||sa(b,i.tabbableOptions)&&!Ro(b,i.tabbableOptions)&&!O.nextTabbableNode(b,!1))&&(R=P),R>=0){var M=R===0?o.tabbableGroups.length-1:R-1,T=o.tabbableGroups[M];C=T.lastTabbableNode}}else{var I=ef(o.tabbableGroups,function(N){var V=N.lastTabbableNode;return b===V});if(I<0&&(O.container===b||sa(b,i.tabbableOptions)&&!Ro(b,i.tabbableOptions)&&!O.nextTabbableNode(b))&&(I=P),I>=0){var B=I===o.tabbableGroups.length-1?0:I+1,U=o.tabbableGroups[B];C=U.firstTabbableNode}}}else C=u("fallbackFocus");C&&(p.preventDefault(),h(C))},w=function(p){if(LL(p)&&vi(i.escapeDeactivates,p)!==!1){p.preventDefault(),s.deactivate();return}if(CL(p)){L(p);return}},S=function(p){var b=To(p);l(b)>=0||vi(i.clickOutsideDeactivates,p)||vi(i.allowOutsideClick,p)||(p.preventDefault(),p.stopImmediatePropagation())},m=function(){if(o.active)return Xc.activateTrap(s),o.delayInitialFocusTimer=i.delayInitialFocus?Yc(function(){h(f())}):h(f()),r.addEventListener("focusin",g,!0),r.addEventListener("mousedown",y,{capture:!0,passive:!1}),r.addEventListener("touchstart",y,{capture:!0,passive:!1}),r.addEventListener("click",S,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},_=function(){if(o.active)return r.removeEventListener("focusin",g,!0),r.removeEventListener("mousedown",y,!0),r.removeEventListener("touchstart",y,!0),r.removeEventListener("click",S,!0),r.removeEventListener("keydown",w,!0),s};return s={get active(){return o.active},get paused(){return o.paused},activate:function(p){if(o.active)return this;var b=a(p,"onActivate"),C=a(p,"onPostActivate"),P=a(p,"checkCanFocusTrap");P||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,b&&b();var O=function(){P&&d(),m(),C&&C()};return P?(P(o.containers.concat()).then(O,O),this):(O(),this)},deactivate:function(p){if(!o.active)return this;var b=Jc({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},p);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,_(),o.active=!1,o.paused=!1,Xc.deactivateTrap(s);var C=a(b,"onDeactivate"),P=a(b,"onPostDeactivate"),O=a(b,"checkCanReturnFocus"),R=a(b,"returnFocus","returnFocusOnDeactivate");C&&C();var M=function(){Yc(function(){R&&h(v(o.nodeFocusedBeforeActivation)),P&&P()})};return R&&O?(O(v(o.nodeFocusedBeforeActivation)).then(M,M),this):(M(),this)},pause:function(){return o.paused||!o.active?this:(o.paused=!0,_(),this)},unpause:function(){return!o.paused||!o.active?this:(o.paused=!1,d(),m(),this)},updateContainerElements:function(p){var b=[].concat(p).filter(Boolean);return o.containers=b.map(function(C){return typeof C=="string"?r.querySelector(C):C}),o.active&&d(),this}},s.updateContainerElements(e),s};function xL(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}else return Array.from(t)}var $l=!1;if(typeof window<"u"){var tf={get passive(){$l=!0}};window.addEventListener("testPassive",null,tf),window.removeEventListener("testPassive",null,tf)}var np=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),Bn=[],ys=!1,rp=-1,Di=void 0,Ii=void 0,ip=function(e){return Bn.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},bs=function(e){var n=e||window.event;return ip(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},_L=function(e){if(Ii===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(Ii=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}Di===void 0&&(Di=document.body.style.overflow,document.body.style.overflow="hidden")},OL=function(){Ii!==void 0&&(document.body.style.paddingRight=Ii,Ii=void 0),Di!==void 0&&(document.body.style.overflow=Di,Di=void 0)},ML=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},PL=function(e,n){var r=e.targetTouches[0].clientY-rp;return ip(e.target)?!1:n&&n.scrollTop===0&&r>0||ML(n)&&r<0?bs(e):(e.stopPropagation(),!0)},kL=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!Bn.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};Bn=[].concat(xL(Bn),[r]),np?(e.ontouchstart=function(i){i.targetTouches.length===1&&(rp=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&PL(i,e)},ys||(document.addEventListener("touchmove",bs,$l?{passive:!1}:void 0),ys=!0)):_L(n)}},RL=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}Bn=Bn.filter(function(n){return n.targetElement!==e}),np?(e.ontouchstart=null,e.ontouchmove=null,ys&&Bn.length===0&&(document.removeEventListener("touchmove",bs,$l?{passive:!1}:void 0),ys=!1)):Bn.length||OL()},cr=[],TL=function(){return cr.some(function(t){return t.activeTargets.length>0})},AL=function(){return cr.some(function(t){return t.skippedTargets.length>0})},nf="ResizeObserver loop completed with undelivered notifications.",DL=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:nf}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=nf),window.dispatchEvent(t)},Hi;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Hi||(Hi={}));var fr=function(t){return Object.freeze(t)},IL=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,fr(this)}return t}(),op=function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,fr(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,u=e.height;return{x:n,y:r,top:i,right:o,bottom:s,left:a,width:l,height:u}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Hl=function(t){return t instanceof SVGElement&&"getBBox"in t},sp=function(t){if(Hl(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||t.getClientRects().length)},rf=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},jL=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ji=typeof window<"u"?window:{},Ao=new WeakMap,of=/auto|scroll/,NL=/^tb|vertical/,BL=/msie|trident/i.test(ji.navigator&&ji.navigator.userAgent),Kt=function(t){return parseFloat(t||"0")},kr=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new IL((n?e:t)||0,(n?t:e)||0)},sf=fr({devicePixelContentBoxSize:kr(),borderBoxSize:kr(),contentBoxSize:kr(),contentRect:new op(0,0,0,0)}),ap=function(t,e){if(e===void 0&&(e=!1),Ao.has(t)&&!e)return Ao.get(t);if(sp(t))return Ao.set(t,sf),sf;var n=getComputedStyle(t),r=Hl(t)&&t.ownerSVGElement&&t.getBBox(),i=!BL&&n.boxSizing==="border-box",o=NL.test(n.writingMode||""),s=!r&&of.test(n.overflowY||""),a=!r&&of.test(n.overflowX||""),l=r?0:Kt(n.paddingTop),u=r?0:Kt(n.paddingRight),f=r?0:Kt(n.paddingBottom),d=r?0:Kt(n.paddingLeft),h=r?0:Kt(n.borderTopWidth),v=r?0:Kt(n.borderRightWidth),y=r?0:Kt(n.borderBottomWidth),g=r?0:Kt(n.borderLeftWidth),L=d+u,w=l+f,S=g+v,m=h+y,_=a?t.offsetHeight-m-t.clientHeight:0,x=s?t.offsetWidth-S-t.clientWidth:0,p=i?L+S:0,b=i?w+m:0,C=r?r.width:Kt(n.width)-p-x,P=r?r.height:Kt(n.height)-b-_,O=C+L+x+S,R=P+w+_+m,M=fr({devicePixelContentBoxSize:kr(Math.round(C*devicePixelRatio),Math.round(P*devicePixelRatio),o),borderBoxSize:kr(O,R,o),contentBoxSize:kr(C,P,o),contentRect:new op(d,l,C,P)});return Ao.set(t,M),M},lp=function(t,e,n){var r=ap(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case Hi.DEVICE_PIXEL_CONTENT_BOX:return s;case Hi.BORDER_BOX:return i;default:return o}},FL=function(){function t(e){var n=ap(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=fr([n.borderBoxSize]),this.contentBoxSize=fr([n.contentBoxSize]),this.devicePixelContentBoxSize=fr([n.devicePixelContentBoxSize])}return t}(),up=function(t){if(sp(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},UL=function(){var t=1/0,e=[];cr.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(u){var f=new FL(u.target),d=up(u.target);a.push(f),u.lastReportedSize=lp(u.target,u.observedBox),d<t&&(t=d)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},af=function(t){cr.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(up(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},VL=function(){var t=0;for(af(t);TL();)t=UL(),af(t);return AL()&&DL(),t>0},aa,cp=[],zL=function(){return cp.splice(0).forEach(function(t){return t()})},$L=function(t){if(!aa){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return zL()}).observe(n,r),aa=function(){n.textContent="".concat(e?e--:e++)}}cp.push(t),aa()},HL=function(t){$L(function(){requestAnimationFrame(t)})},Xo=0,WL=function(){return!!Xo},GL=250,ZL={attributes:!0,characterData:!0,childList:!0,subtree:!0},lf=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],uf=function(t){return t===void 0&&(t=0),Date.now()+t},la=!1,qL=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=GL),!la){la=!0;var r=uf(e);HL(function(){var i=!1;try{i=VL()}finally{if(la=!1,e=r-uf(),!WL())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,ZL)};document.body?n():ji.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),lf.forEach(function(n){return ji.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),lf.forEach(function(n){return ji.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),pl=new qL,cf=function(t){!Xo&&t>0&&pl.start(),Xo+=t,!Xo&&pl.stop()},KL=function(t){return!Hl(t)&&!jL(t)&&getComputedStyle(t).display==="inline"},QL=function(){function t(e,n){this.target=e,this.observedBox=n||Hi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=lp(this.target,this.observedBox,!0);return KL(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),JL=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Do=new WeakMap,ff=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Io=function(){function t(){}return t.connect=function(e,n){var r=new JL(e,n);Do.set(e,r)},t.observe=function(e,n,r){var i=Do.get(e),o=i.observationTargets.length===0;ff(i.observationTargets,n)<0&&(o&&cr.push(i),i.observationTargets.push(new QL(n,r&&r.box)),cf(1),pl.schedule())},t.unobserve=function(e,n){var r=Do.get(e),i=ff(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&cr.splice(cr.indexOf(r),1),r.observationTargets.splice(i,1),cf(-1))},t.disconnect=function(e){var n=this,r=Do.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),XL=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Io.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!rf(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Io.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!rf(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Io.unobserve(this,e)},t.prototype.disconnect=function(){Io.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function ht(){return ht=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ht.apply(this,arguments)}function Yo(t,e){if(t==null)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)e.indexOf(n=o[r])>=0||(i[n]=t[n]);return i}var Ni=typeof window<"u"?c.useLayoutEffect:c.useEffect;function mi(t,e,n){return e=(e=+e)==e?e:0,n=(n=+n)==n?n:0,(t=+t)==t&&(t=(t=t<=n?t:n)>=e?t:e),t}function jo(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var YL={box:"border-box"};function ua(t,e){var n=e.label,r=e.enabled,i=e.resizeSourceRef,o=c.useState(0),s=o[0],a=o[1];c.useDebugValue(n+": "+s);var l=c.useCallback(function(u){a(u[0].borderBoxSize[0].blockSize),i.current="element"},[i]);return Ni(function(){if(t.current&&r){var u=new XL(l);return u.observe(t.current,YL),function(){u.disconnect()}}},[t,l,r]),r?s:0}function ft(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var df={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},hf={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},eC=_w({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:ht({},df,hf)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:ht({},df,hf)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:ht({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[Ow({y:function(t,e){return e.payload.y},velocity:function(t,e){return e.payload.velocity},snapSource:function(t,e){var n=e.payload.source;return n===void 0?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(t,e){},onSnapCancel:function(t,e){},onResizeCancel:function(t,e){},onCloseCancel:function(t,e){},onOpenEnd:function(t,e){},onSnapEnd:function(t,e){},onRezizeEnd:function(t,e){}},services:{onSnapStart:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(ft()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(ft()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),tC=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],nC=["velocity"],rC=["onRest","config"],fp=Yw.default,iC=fp.tension,No=fp.friction,oC=c.forwardRef(function(t,e){var n=t.children,r=t.sibling,i=t.className,o=t.footer,s=t.header,a=t.open,l=t.initialState,u=t.lastSnapRef,f=t.initialFocusRef,d=t.onDismiss,h=t.maxHeight,v=t.defaultSnap,y=v===void 0?aC:v,g=t.snapPoints,L=g===void 0?lC:g,w=t.blocking,S=w===void 0||w,m=t.scrollLocking,_=m===void 0||m,x=t.style,p=t.onSpringStart,b=t.onSpringCancel,C=t.onSpringEnd,P=t.reserveScrollBarGap,O=P===void 0?S:P,R=t.expandOnContentDrag,M=R!==void 0&&R,T=Yo(t,tC),I=function(){var j=c.useState(!1),Y=j[0],H=j[1],fe=c.useState({}),Ne=fe[0],Le=fe[1],Be=c.useCallback(function(Re){return Le(function($e){var ae;return ht({},$e,((ae={})[Re]=!1,ae))}),function(){Le(function($e){var ae;return ht({},$e,((ae={})[Re]=!0,ae))})}},[]);return c.useEffect(function(){var Re=Object.values(Ne);Re.length!==0&&Re.every(Boolean)&&H(!0)},[Ne]),{ready:Y,registerReady:Be}}(),B=I.ready,U=I.registerReady,N=c.useRef(!1),V=c.useRef(p),X=c.useRef(b),W=c.useRef(C);c.useEffect(function(){V.current=p,X.current=b,W.current=C},[b,p,C]);var z,Q,oe=iS(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),te=oe[0],ee=oe[1],A=c.useRef(null),pe=c.useRef(null),Pe=c.useRef(null),G=c.useRef(null),Ae=c.useRef(null),De=c.useRef(null),ue=c.useRef(0),xe=c.useRef(),Ve=c.useRef(!1),be=(z=c.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),Q=c.useRef(z==null?void 0:z.matches),c.useDebugValue(Q.current?"reduce":"no-preference"),c.useEffect(function(){var j=function(Y){Q.current=Y.matches};return z==null||z.addListener(j),function(){return z==null?void 0:z.removeListener(j)}},[z]),Q),_e=function(j){var Y=j.targetRef,H=j.enabled,fe=j.reserveScrollBarGap,Ne=c.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return c.useDebugValue(H?"Enabled":"Disabled"),c.useEffect(function(){if(!H)return Ne.current.deactivate(),void(Ne.current={activate:function(){},deactivate:function(){}});var Le=Y.current,Be=!1;Ne.current={activate:function(){Be||(Be=!0,kL(Le,{allowTouchMove:function(Re){return Re.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:fe}))},deactivate:function(){Be&&(Be=!1,RL(Le))}}},[H,Y,fe]),Ne}({targetRef:pe,enabled:B&&_,reserveScrollBarGap:O}),Ie=function(j){var Y=j.targetRef,H=j.enabled,fe=c.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return c.useDebugValue(H?"Enabled":"Disabled"),c.useEffect(function(){if(!H)return fe.current.deactivate(),void(fe.current={activate:function(){},deactivate:function(){}});var Ne=Y.current,Le=!1,Be=[],Re=[];fe.current={activate:function(){if(!Le){Le=!0;var $e=Ne.parentNode;document.querySelectorAll("body > *").forEach(function(ae){if(ae!==$e){var ge=ae.getAttribute("aria-hidden");ge!==null&&ge!=="false"||(Be.push(ge),Re.push(ae),ae.setAttribute("aria-hidden","true"))}})}},deactivate:function(){Le&&(Le=!1,Re.forEach(function($e,ae){var ge=Be[ae];ge===null?$e.removeAttribute("aria-hidden"):$e.setAttribute("aria-hidden",ge)}),Be=[],Re=[])}}},[Y,H]),fe}({targetRef:A,enabled:B&&S}),ke=function(j){var Y=j.targetRef,H=j.fallbackRef,fe=j.initialFocusRef,Ne=j.enabled,Le=c.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return c.useDebugValue(Ne?"Enabled":"Disabled"),c.useEffect(function(){if(!Ne)return Le.current.deactivate(),void(Le.current={activate:function(){},deactivate:function(){}});var Be=H.current,Re=EL(Y.current,{onActivate:void 0,initialFocus:fe?function(){return(fe==null?void 0:fe.current)||Be}:void 0,fallbackFocus:Be,escapeDeactivates:!1,clickOutsideDeactivates:!1}),$e=!1;Le.current={activate:function(){try{return $e?Promise.resolve():($e=!0,Promise.resolve(Re.activate()).then(function(){return Promise.resolve(new Promise(function(ae){return setTimeout(function(){return ae(void 0)},0)})).then(function(){})}))}catch(ae){return Promise.reject(ae)}},deactivate:function(){$e&&($e=!1,Re.deactivate())}}},[Ne,H,fe,Y]),Le}({targetRef:A,fallbackRef:De,initialFocusRef:f||void 0,enabled:B&&S&&f!==!1}),je=function(j){var Y=j.getSnapPoints,H=j.heightRef,fe=j.lastSnapRef,Ne=j.ready,Le=function(Ye){var wt=Ye.contentRef,St=Ye.controlledMaxHeight,tt=Ye.footerEnabled,Zt=Ye.footerRef,Ft=Ye.headerEnabled,Lt=Ye.headerRef,yn=Ye.registerReady,ln=Ye.resizeSourceRef,ni=c.useMemo(function(){return yn("contentHeight")},[yn]),ri=function(bn,$n,Hn){var Wn=c.useMemo(function(){return $n("maxHeight")},[$n]),Gn=c.useState(function(){return jo(bn)||typeof window<"u"?window.innerHeight:0}),si=Gn[0],ai=Gn[1],wn=si>0,ne=c.useRef(0);return c.useDebugValue(bn?"controlled":"auto"),c.useEffect(function(){wn&&Wn()},[wn,Wn]),Ni(function(){if(bn)return ai(jo(bn)),void(Hn.current="maxheightprop");var Gl=function(){ne.current||(ne.current=requestAnimationFrame(function(){ai(window.innerHeight),Hn.current="window",ne.current=0}))};return window.addEventListener("resize",Gl),ai(window.innerHeight),Hn.current="window",Wn(),function(){window.removeEventListener("resize",Gl),cancelAnimationFrame(ne.current)}},[bn,Wn,Hn]),si}(St,yn,ln),gr=ua(Lt,{label:"headerHeight",enabled:Ft,resizeSourceRef:ln}),ii=ua(wt,{label:"contentHeight",enabled:!0,resizeSourceRef:ln}),vr=ua(Zt,{label:"footerHeight",enabled:tt,resizeSourceRef:ln}),zn=Math.min(ri-gr-vr,ii)+gr+vr;c.useDebugValue("minHeight: "+zn);var oi=ii>0;return c.useEffect(function(){oi&&ni()},[oi,ni]),{maxHeight:ri,minHeight:zn,headerHeight:gr,footerHeight:vr}}({contentRef:j.contentRef,controlledMaxHeight:j.controlledMaxHeight,footerEnabled:j.footerEnabled,footerRef:j.footerRef,headerEnabled:j.headerEnabled,headerRef:j.headerRef,registerReady:j.registerReady,resizeSourceRef:j.resizeSourceRef}),Be=Le.maxHeight,Re=Le.minHeight,$e=Le.headerHeight,ae=Le.footerHeight,ge=function(Ye,wt){var St=[].concat(Ye).map(jo).reduce(function(Lt,yn){return Lt.add(mi(yn,0,wt)),Lt},new Set),tt=Array.from(St),Zt=Math.min.apply(Math,tt);if(Number.isNaN(Zt))throw new TypeError("minSnap is NaN");var Ft=Math.max.apply(Math,tt);if(Number.isNaN(Ft))throw new TypeError("maxSnap is NaN");return{snapPoints:tt,minSnap:Zt,maxSnap:Ft}}(Ne?Y({height:H.current,footerHeight:ae,headerHeight:$e,minHeight:Re,maxHeight:Be}):[0],Be),pt=ge.snapPoints,an=ge.minSnap,ct=ge.maxSnap;return c.useDebugValue("minSnap: "+an+", maxSnap:"+ct),{minSnap:an,maxSnap:ct,findSnap:function(Ye){var wt=jo(typeof Ye=="function"?Ye({footerHeight:ae,headerHeight:$e,height:H.current,minHeight:Re,maxHeight:Be,snapPoints:pt,lastSnap:fe.current}):Ye);return pt.reduce(function(St,tt){return Math.abs(tt-wt)<Math.abs(St-wt)?tt:St},an)},maxHeight:Be}}({contentRef:Pe,controlledMaxHeight:h,footerEnabled:!!o,footerRef:Ae,getSnapPoints:L,headerEnabled:s!==!1,headerRef:G,heightRef:ue,lastSnapRef:u,ready:B,registerReady:U,resizeSourceRef:xe}),ie=je.minSnap,We=je.maxSnap,re=je.maxHeight,et=je.findSnap,q=c.useRef(re),Ge=c.useRef(ie),ze=c.useRef(We),bt=c.useRef(et),ut=c.useRef(0);Ni(function(){q.current=re,ze.current=We,Ge.current=ie,bt.current=et,ut.current=et(y)},[et,y,re,We,ie]);var se=c.useCallback(function(j){var Y=j.onRest,H=j.config,fe=(H=H===void 0?{}:H).velocity,Ne=fe===void 0?1:fe,Le=Yo(H,nC),Be=Yo(j,rC);return new Promise(function(Re){return ee(ht({},Be,{config:ht({velocity:Ne},Le,{mass:1,tension:iC,friction:Math.max(No,No+(No-No*Ne))}),onRest:function(){var $e=[].slice.call(arguments);Re.apply(void 0,$e),Y==null||Y.apply(void 0,$e)}}))})},[ee]),Vn=jw(eC,{devTools:!1,actions:{onOpenCancel:c.useCallback(function(){return X.current==null?void 0:X.current({type:"OPEN"})},[]),onSnapCancel:c.useCallback(function(j){return X.current==null?void 0:X.current({type:"SNAP",source:j.snapSource})},[]),onCloseCancel:c.useCallback(function(){return X.current==null?void 0:X.current({type:"CLOSE"})},[]),onResizeCancel:c.useCallback(function(){return X.current==null?void 0:X.current({type:"RESIZE",source:xe.current})},[]),onOpenEnd:c.useCallback(function(){return W.current==null?void 0:W.current({type:"OPEN"})},[]),onSnapEnd:c.useCallback(function(j,Y){return W.current==null?void 0:W.current({type:"SNAP",source:j.snapSource})},[]),onResizeEnd:c.useCallback(function(){return W.current==null?void 0:W.current({type:"RESIZE",source:xe.current})},[])},context:{initialState:l},services:{onSnapStart:c.useCallback(function(j,Y){try{return Promise.resolve(V.current==null?void 0:V.current({type:"SNAP",source:Y.payload.source||"custom"}))}catch(H){return Promise.reject(H)}},[]),onOpenStart:c.useCallback(function(){try{return Promise.resolve(V.current==null?void 0:V.current({type:"OPEN"}))}catch(j){return Promise.reject(j)}},[]),onCloseStart:c.useCallback(function(){try{return Promise.resolve(V.current==null?void 0:V.current({type:"CLOSE"}))}catch(j){return Promise.reject(j)}},[]),onResizeStart:c.useCallback(function(){try{return Promise.resolve(V.current==null?void 0:V.current({type:"RESIZE",source:xe.current}))}catch(j){return Promise.reject(j)}},[]),onSnapEnd:c.useCallback(function(j,Y){try{return Promise.resolve(W.current==null?void 0:W.current({type:"SNAP",source:j.snapSource}))}catch(H){return Promise.reject(H)}},[]),onOpenEnd:c.useCallback(function(){try{return Promise.resolve(W.current==null?void 0:W.current({type:"OPEN"}))}catch(j){return Promise.reject(j)}},[]),onCloseEnd:c.useCallback(function(){try{return Promise.resolve(W.current==null?void 0:W.current({type:"CLOSE"}))}catch(j){return Promise.reject(j)}},[]),onResizeEnd:c.useCallback(function(){try{return Promise.resolve(W.current==null?void 0:W.current({type:"RESIZE",source:xe.current}))}catch(j){return Promise.reject(j)}},[]),renderVisuallyHidden:c.useCallback(function(j,Y){try{return Promise.resolve(se({y:ut.current,ready:0,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:!0})).then(function(){})}catch(H){return Promise.reject(H)}},[se]),activate:c.useCallback(function(j,Y){try{return N.current=!0,Promise.resolve(Promise.all([_e.current.activate(),ke.current.activate(),Ie.current.activate()])).then(function(){})}catch(H){return Promise.reject(H)}},[Ie,ke,_e]),deactivate:c.useCallback(function(){try{return _e.current.deactivate(),ke.current.deactivate(),Ie.current.deactivate(),N.current=!1,Promise.resolve()}catch(j){return Promise.reject(j)}},[Ie,ke,_e]),openImmediately:c.useCallback(function(){try{return ue.current=ut.current,Promise.resolve(se({y:ut.current,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:!0})).then(function(){})}catch(j){return Promise.reject(j)}},[se]),openSmoothly:c.useCallback(function(){try{return Promise.resolve(se({y:0,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:!0})).then(function(){return ue.current=ut.current,Promise.resolve(se({y:ut.current,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:ut.current,immediate:be.current})).then(function(){})})}catch(j){return Promise.reject(j)}},[se,be]),snapSmoothly:c.useCallback(function(j,Y){try{var H=bt.current(j.y);return ue.current=H,u.current=H,Promise.resolve(se({y:H,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:Ge.current,immediate:be.current,config:{velocity:j.velocity}})).then(function(){})}catch(fe){return Promise.reject(fe)}},[se,u,be]),resizeSmoothly:c.useCallback(function(){try{var j=bt.current(ue.current);return ue.current=j,u.current=j,Promise.resolve(se({y:j,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:Ge.current,immediate:xe.current!=="element"||be.current})).then(function(){})}catch(Y){return Promise.reject(Y)}},[se,u,be]),closeSmoothly:c.useCallback(function(j,Y){try{return se({minSnap:ue.current,immediate:!0}),ue.current=0,Promise.resolve(se({y:0,maxHeight:q.current,maxSnap:ze.current,immediate:be.current})).then(function(){return Promise.resolve(se({ready:0,immediate:!0})).then(function(){})})}catch(H){return Promise.reject(H)}},[se,be])}}),uo=Vn[0],Bt=Vn[1];c.useEffect(function(){B&&Bt(a?"OPEN":"CLOSE")},[a,Bt,B]),Ni(function(){(re||We||ie)&&Bt("RESIZE")},[re,We,ie,Bt]),c.useEffect(function(){return function(){_e.current.deactivate(),ke.current.deactivate(),Ie.current.deactivate()}},[Ie,ke,_e]),c.useImperativeHandle(e,function(){return{snapTo:function(j,Y){var H=Y===void 0?{}:Y,fe=H.velocity,Ne=fe===void 0?1:fe,Le=H.source,Be=Le===void 0?"custom":Le;Bt("SNAP",{payload:{y:bt.current(j),velocity:Ne,source:Be}})},get height(){return ue.current}}},[Bt]),c.useEffect(function(){var j=pe.current,Y=function(fe){Ve.current&&fe.preventDefault()},H=function(fe){j.scrollTop<0&&(requestAnimationFrame(function(){j.style.overflow="hidden",j.scrollTop=0,j.style.removeProperty("overflow")}),fe.preventDefault())};return M&&(j.addEventListener("scroll",Y),j.addEventListener("touchmove",Y),j.addEventListener("touchstart",H)),function(){j.removeEventListener("scroll",Y),j.removeEventListener("touchmove",Y),j.removeEventListener("touchstart",H)}},[M,pe]);var sn=oL(function(j){var Y=j.args,H=(Y=Y===void 0?[]:Y)[0],fe=(H=H===void 0?{}:H).closeOnTap,Ne=fe!==void 0&&fe,Le=H.isContentDragging,Be=Le!==void 0&&Le,Re=j.cancel,$e=j.direction[1],ae=j.down,ge=j.first,pt=j.last,an=j.memo,ct=an===void 0?te.y.getValue():an,Ye=j.tap,wt=j.velocity,St=-1*j.movement[1];if(!N.current)return Re(),ct;if(d&&Ne&&Ye)return Re(),setTimeout(function(){return d()},0),ct;if(Ye)return ct;var tt=ct+St,Zt=St*wt,Ft=Math.max(Ge.current,Math.min(ze.current,tt+2*Zt));if(!ae&&d&&$e>0&&tt+Zt<Ge.current/2)return Re(),d(),ct;var Lt=ae?d||Ge.current!==ze.current?Ai(tt,d?0:Ge.current,ze.current,.55):tt<Ge.current?Ai(tt,Ge.current,2*ze.current,.55):Ai(tt,Ge.current/2,ze.current,.55):Ft;return M&&Be?(Lt>=ze.current&&(Lt=ze.current),ct===ze.current&&pe.current.scrollTop>0&&(Lt=ze.current),Ve.current=Lt<ze.current):Ve.current=!1,ge&&Bt("DRAG"),pt?(Bt("SNAP",{payload:{y:Lt,velocity:wt>.05?wt:1,source:"dragging"}}),ct):(ee({y:Lt,ready:1,maxHeight:q.current,maxSnap:ze.current,minSnap:Ge.current,immediate:!0,config:{velocity:wt}}),ct)},{filterTaps:!0});if(Number.isNaN(ze.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(Ge.current))throw new TypeError("minSnapRef is NaN!!");var co=function(j){var Y,H=j.spring,fe=Sr([H.y,H.maxHeight],function(ae,ge){return Math.round(mi(ge-ae,0,16))+"px"}),Ne=Sr([H.y,H.minSnap,H.maxSnap],function(ae,ge,pt){return mi(ae,ge,pt)+"px"}),Le=Sr([H.y,H.minSnap,H.maxSnap],function(ae,ge,pt){return ae<ge?ge-ae+"px":ae>pt?pt-ae+"px":"0px"}),Be=Sr([H.y,H.maxSnap],function(ae,ge){return ae>=ge?Math.ceil(ae-ge):0}),Re=Sr([H.y,H.minSnap],function(ae,ge){if(!ge)return 0;var pt=Math.max(ge/2-45,0);return mi((ae-pt)*(1/(Math.min(ge/2+45,ge)-pt)+0),0,1)}),$e=Sr([H.y,H.minSnap],function(ae,ge){return ge?mi(ae/ge,0,1):0});return(Y={})["--rsbs-content-opacity"]=Re,Y["--rsbs-backdrop-opacity"]=$e,Y["--rsbs-antigap-scale-y"]=Be,Y["--rsbs-overlay-translate-y"]=Le,Y["--rsbs-overlay-rounded"]=fe,Y["--rsbs-overlay-h"]=Ne,Y}({spring:te});return c.createElement(CS.div,ht({},T,{"data-rsbs-root":!0,"data-rsbs-state":sC.find(uo.matches),"data-rsbs-is-blocking":S,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!o,className:i,ref:A,style:ht({},co,x,{opacity:te.ready})}),r,S&&c.createElement("div",ht({key:"backdrop","data-rsbs-backdrop":!0},sn({closeOnTap:!0}))),c.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:De,onKeyDown:function(j){j.key==="Escape"&&(j.stopPropagation(),d&&d())}},s!==!1&&c.createElement("div",ht({key:"header","data-rsbs-header":!0,ref:G},sn()),s),c.createElement("div",ht({key:"scroll","data-rsbs-scroll":!0,ref:pe},M?sn({isContentDragging:!0}):{}),c.createElement("div",{"data-rsbs-content":!0,ref:Pe},n)),o&&c.createElement("div",ht({key:"footer",ref:Ae,"data-rsbs-footer":!0},sn()),o)))}),sC=["closed","opening","open","closing","dragging","snapping","resizing"];function aC(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function lC(t){return t.minHeight}var uC=["onSpringStart","onSpringEnd","skipInitialTransition"],dp=c.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,o=Yo(t,uC),s=c.useState(!1),a=s[0],l=s[1],u=c.useRef(),f=c.useRef(null),d=c.useRef(i&&o.open?"OPEN":"CLOSED");Ni(function(){if(o.open)return cancelAnimationFrame(u.current),l(!0),function(){d.current="CLOSED"}},[o.open]);var h=c.useCallback(function(y){return Promise.resolve(n==null?void 0:n(y)).then(function(){y.type==="OPEN"&&cancelAnimationFrame(u.current)})},[n]),v=c.useCallback(function(y){return Promise.resolve(r==null?void 0:r(y)).then(function(){y.type==="CLOSE"&&(u.current=requestAnimationFrame(function(){return l(!1)}))})},[r]);return a?c.createElement(R1,{"data-rsbs-portal":!0},c.createElement(oC,ht({},o,{lastSnapRef:f,ref:e,initialState:d.current,onSpringStart:h,onSpringEnd:v}))):null});const hp=28,cC="MapGoogle-module__root__Vi-sMl",fC="MapGoogle-module__mapContainer__OCCTIX",dC="MapGoogle-module__balloon__4UVhuT",hC="MapGoogle-module__details__4osNXn",pC="MapGoogle-module__cluster__5qmRds",gC="MapGoogle-module__overlay__g-nEoT",vC="MapGoogle-module__mapControl__mzyTwr",mC="MapGoogle-module__geolocationControl__1exHgA",yC="MapGoogle-module__bottomSheet__avcBmY",bC="MapGoogle-module__locationViewContent__xwLeDh",wC="MapGoogle-module__locationViewHeader__maBLv0",SC="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",LC="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",CC="MapGoogle-module__sheetSubmit__rPQG26",it={root:cC,mapContainer:fC,balloon:dC,details:hC,cluster:pC,overlay:gC,mapControl:vC,geolocationControl:mC,bottomSheet:yC,locationViewContent:bC,locationViewHeader:wC,deliveryDetailsViewContent:SC,deliveryDetailsViewHeader:LC,sheetSubmit:CC},pp=c.memo(({children:t,hideFooter:e,minSnapHeight:n,onSubmitClick:r,open:i,submitDisabled:o,submitLoading:s,...a})=>{const[l,u]=c.useState(!1);return c.useEffect(()=>{let f;return i?f=setTimeout(()=>{u(i)},400):u(i),()=>{clearTimeout(f)}},[i]),E.jsx(dp,{expandOnContentDrag:!0,open:l,initialFocusRef:!1,defaultSnap:({snapPoints:f})=>Math.min(...f),blocking:!1,snapPoints:({footerHeight:f,headerHeight:d,maxHeight:h,minHeight:v})=>[n==null?v:d+f+n,h-hp],footer:e?null:E.jsx(Nt,{disabled:o,loading:s,variant:"primary",className:it.sheetSubmit,onClick:r,children:E.jsx(er,{keyName:"choose",ns:"common"})}),sibling:E.jsx("div",{role:"presentation","data-rsbs-backdrop":"true",onClick:f=>{var d;f.stopPropagation(),f.preventDefault(),(d=a.onDismiss)==null||d.call(a)}}),children:E.jsx("div",{className:it.bottomSheet,children:t})})}),pf="#000",EC={header:it.locationViewHeader,content:it.locationViewContent},xC=({clusterer:t,hideDetails:e,onPointClick:n,onPointSelected:r,point:i,selectedPoint:o,setOpenDetails:s})=>{const a=lo("screenSm"),{iconType:l,palette:u,skipPointInfo:f}=lt(),{setLMSData:d,setLoading:h}=Ps(),{data:v,isLoading:y,refetch:g}=E1(i.code);c.useEffect(()=>{const T=v==null?void 0:v.results[0];T&&d(T)},[v,y,d]),c.useEffect(()=>{h(y)},[y,h]);const L=(u==null?void 0:u.primary)||"#fc0",w=l==="omni-llama"?yi.PinLlama:yi.PinOmnic,[S,m]=c.useState(null),_=()=>{if(g(),f){n==null||n(i);return}s==null||s(!1),r==null||r(i)},x=()=>{r==null||r(null)},p=()=>{s==null||s(!0),r==null||r(i)},b=()=>{n==null||n(i),s==null||s(!1),r==null||r(null)},C=(o==null?void 0:o.uid)===i.uid,P=gh({isSelectedPoint:C}),O=c.useMemo(()=>{let T;switch(!0){case(i.type===30&&!C):{T=xr(w,L,pf);break}case(i.type!==30&&!C):{T=xr(yi.PinPvz,"--owl-color-grey-80");break}case(i.type===30&&C):{T=xr(w,pf,L);break}case(i.type!==30&&C):{T=xr(yi.PinPvz,"--owl-color-black");break}}return gn(T,"Icon url is not defined"),{url:_l(T)}},[C,L,w,i.type]),R=c.useMemo(()=>({lat:i.location.latitude,lng:i.location.longitude}),[i.location.latitude,i.location.longitude]),M=C&&P&&!!(S!=null&&S.getVisible());return E.jsxs(Td,{noClustererRedraw:!0,icon:O,position:R,clusterer:t,options:ph,onLoad:m,onClick:_,children:[a&&E.jsx(pp,{minSnapHeight:300,open:M,onDismiss:x,onSubmitClick:b,children:E.jsx(nh,{hideActions:!0,classes:EC,location:i,onClose:x})}),M&&!a&&E.jsx(Bd,{children:E.jsx(Sb,{...i,hideDetails:e,className:it.balloon,onCloseClick:x,onSubmit:b,onDetails:p})})]},i.uid)},_C=({hideDetails:t,onOpenDetails:e,onPointClick:n,onPointSelected:r,points:i,selectedPoint:o})=>E.jsx(ry,{clusterClass:it.cluster,onClusteringEnd:()=>{setTimeout(()=>{const s=document.getElementsByClassName(it.cluster);for(const a of s)a.addEventListener("touchstart",Ca,{passive:!0})},100)},onUnmount:()=>{const s=document.getElementsByClassName(it.cluster);for(const a of s)a.removeEventListener("touchstart",Ca)},children:s=>E.jsx(E.Fragment,{children:i.map(a=>E.jsx(xC,{point:a,clusterer:s,hideDetails:t,selectedPoint:o,setOpenDetails:e,onPointClick:n,onPointSelected:r},a.uid))})}),OC=c.memo(_C),MC=({onOpenDetails:t,onPointClick:e,onPointSelected:n})=>{const{hideDetails:r,locale:i}=lt(),o=dr(tm),s=vn(u=>u.location),a=nn(Ed),l=JSON.stringify([o.length,i,a==null?void 0:a.place_id]);return E.jsx(OC,{points:o,hideDetails:r,selectedPoint:s,onOpenDetails:t,onPointClick:e,onPointSelected:n},l)},PC=c.memo(MC),gp=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},Z.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),Z.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M31.003 28V17.766a3 3 0 0 0-1.579-2.643l-7.003-3.765a3 3 0 0 0-2.842 0l-7.003 3.765a3 3 0 0 0-1.58 2.643V28a3 3 0 0 0 3 3h14.008a3 3 0 0 0 3-3Zm-5.919 1h2.92a1 1 0 0 0 1-1V17.766a1 1 0 0 0-.527-.881l-7.003-3.766a1 1 0 0 0-.948 0l-7.003 3.766a1 1 0 0 0-.527.88v10.237a1 1 0 0 0 1 1h2.92a2.513 2.513 0 0 1-.05-.5v-7.606a2.5 2.5 0 0 1 2.5-2.5h3.268a2.5 2.5 0 0 1 2.5 2.5V28.5c0 .171-.017.338-.05.5Zm-2.426 0a.5.5 0 0 0 .476-.499v-7.606a.5.5 0 0 0-.5-.5h-3.269a.5.5 0 0 0-.5.5V28.5a.5.5 0 0 0 .476.5h3.317Z",clipRule:"evenodd"}),Z.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),kC="DeliveryBalloon-module__root__Nu90iy",RC="DeliveryBalloon-module__details__eqUTaI",TC="DeliveryBalloon-module__header__JVdyxN",AC="DeliveryBalloon-module__title__-zKKCt",DC="DeliveryBalloon-module__description__no5-ki",IC="DeliveryBalloon-module__actions__C-N0H-",jC="DeliveryBalloon-module__errorVariant__e6uhZl",NC="DeliveryBalloon-module__logo__62gC5h",Ln={root:kC,details:RC,header:TC,title:AC,description:DC,actions:IC,errorVariant:jC,logo:NC},BC=({SSR:t,address:e,className:n,hasCloseButton:r,hideDetails:i,onClose:o,onDetails:s,variant:a})=>{const l=a==="error",u=a==="default",f=t?"{ courier_balloon.title }":E.jsx(er,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":E.jsx(er,{keyName:"error_title",ns:"courier_balloon"}),h=t?"{ courier_balloon.error_description }":E.jsx(er,{keyName:"error_description",ns:"courier_balloon"});return E.jsxs("div",{className:Se(Ln.root,n,Ln[`${a}Variant`]),children:[E.jsxs("div",{className:Ln.header,children:[E.jsx(gp,{className:Ln.logo}),E.jsx("span",{className:Ln.title,children:l?d:f}),r&&E.jsx(ei,{onClick:o})]}),E.jsx("div",{className:Ln.description,children:l?h:e||"{{ properties.address }}"}),u&&!i&&E.jsx("div",{className:Ln.actions,children:E.jsx(Nt,{id:If,as:"button",variant:"primary",className:Ln.details,onClick:s,children:t?"{ details }":E.jsx(er,{keyName:"details",ns:"common"})})})]})},FC="Chip-module__root__zsoSyP",UC="Chip-module__active__BlTSFB",gf={root:FC,active:UC},vf=({active:t,children:e,className:n,...r})=>E.jsx("div",{...r,className:Se(gf.root,n,{[gf.active]:t}),children:e}),VC="TextArea-module__root__8YFknR",zC={root:VC},mf=c.forwardRef(({className:t,inputRef:e,onBlur:n,onChange:r,onFocus:i,...o},s)=>{const a=c.useRef(null);c.useImperativeHandle(s,()=>({focus:()=>{var u,f;(u=a.current)==null||u.focus(),i&&i({target:{value:(f=a.current)==null?void 0:f.value}})},blur:()=>{var u,f;(u=a.current)==null||u.blur(),n&&n({target:{value:(f=a.current)==null?void 0:f.value}})},setValue:u=>{r&&r({target:{value:u}}),a.current&&(a.current.value=u)}}),[n,r,i]);const l=mp(e,a);return E.jsx("textarea",{...o,ref:l,className:Se(zC.root,t),onBlur:n,onFocus:i,onChange:r})}),$C=({hideDeliveryTime:t,set:e})=>(n,r)=>{let i={...n};switch(r.type){case"SET_COMMENT":{i={...n,comment:r.payload};break}case"SET_DELIVERY_TIME":{i={...n,delivery_time:r.payload};break}case"SET_APARTMENT_NUMBER":{i={...n,apartment_number:r.payload};break}}return i.meta={...i.meta,valid:(t||!!i.delivery_time)&&!!i.apartment_number},e==null||e(i),i},HC="DeliveryDetailsView-module__title__azeoUr",WC="DeliveryDetailsView-module__logo__4zZtpM",GC="DeliveryDetailsView-module__header__oDE9He",ZC="DeliveryDetailsView-module__content__6P27SY",qC="DeliveryDetailsView-module__section__2M3Qip",KC="DeliveryDetailsView-module__chips__KmYgha",QC="DeliveryDetailsView-module__actions__43XZ-V",JC="DeliveryDetailsView-module__submit__58LKBw",XC="DeliveryDetailsView-module__actionsHidden__SW-67b",YC="DeliveryDetailsView-module__commentSection__GlX1A2",eE="DeliveryDetailsView-module__comment__2pGG6h",Ct={title:HC,logo:WC,header:GC,content:ZC,section:qC,chips:KC,actions:QC,submit:JC,actionsHidden:XC,commentSection:YC,comment:eE},tE=c.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:o},s)=>{var p;const{hideDeliveryTime:a,inputs:l,locale:u}=lt(),{t:f}=on(["details_modal","courier_balloon","common"]),d=c.useMemo(()=>$C({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=c.useState(!1),[y,g]=c.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),L=c.useCallback(async()=>{v(!0);try{gn(n.address,"Address is required");const b=await Tp({address:n.address,algorithm:10,service:10,language:u||jf});if(!hd(b))return;const C=b==null?void 0:b.data.data,P={...y,address:C};return o==null||o(P),P}finally{v(!1)}},[u,n.address,o,y]);c.useImperativeHandle(s,()=>({submit:L}),[L]);const w=b=>()=>{g({payload:b,type:"SET_DELIVERY_TIME"})},S=b=>{g({payload:b.target.value,type:"SET_APARTMENT_NUMBER"})},m=b=>{g({payload:b.target.value,type:"SET_COMMENT"})},_=ws(l==null?void 0:l.apartment),x=ws(l==null?void 0:l.comment);return E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:Se(Ct.header,t==null?void 0:t.header),children:[E.jsx(ei,{onClick:i}),E.jsxs("div",{className:Ct.title,children:[E.jsx(gp,{className:Ct.logo}),E.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),E.jsxs("div",{className:Se(Ct.content,t==null?void 0:t.content),children:[E.jsxs("section",{className:Ct.section,children:[E.jsxs("span",{children:[f("address"),":"]}),E.jsx("p",{children:n.address})]}),!a&&E.jsxs("section",{className:Ct.section,children:[E.jsxs("span",{children:[f("delivery_time"),":"]}),E.jsxs("div",{className:Ct.chips,children:[E.jsx(vf,{active:y.delivery_time==="8:00-13:00",onClick:w("8:00-13:00"),children:"8:00 - 13:00"}),E.jsx(vf,{active:y.delivery_time==="14:00-22:00",onClick:w("14:00-22:00"),children:"14:00 - 22:00"})]})]}),E.jsxs("section",{className:Ct.section,children:[E.jsxs("span",{children:[f("apartment_number"),":"]}),E.jsx(mf,{..._,rows:1,onChange:S})]}),E.jsxs("section",{className:Se(Ct.section,Ct.commentSection),children:[E.jsxs("span",{children:[f("comment"),":"]}),E.jsx(mf,{...x,className:Ct.comment,onChange:m})]})]}),E.jsx("div",{className:Se(Ct.actions,{[Ct.actionsHidden]:e}),children:E.jsx(Nt,{loading:h,disabled:!((p=y.meta)!=null&&p.valid)||h,variant:"primary",className:Ct.submit,onClick:L,children:f("choose",{ns:"common"})})})]})}),vp=c.memo(tE),nE={header:it.deliveryDetailsViewHeader,content:it.deliveryDetailsViewContent},rE=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:o})=>{const s=gh({isSelectedPoint:!0}),a=c.useRef(null),[l,u]=c.useState(!1),[f,d]=c.useState({...r,comment:"",delivery_time:"",apartment_number:""});c.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const[h,v]=c.useState(null),y=lo("screenSm"),g=c.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),L=()=>{o==null||o(!0)},w=()=>{i==null||i(null)},S=c.useMemo(()=>({url:_l(xr(yi.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...$p)}),[]),m=async()=>{var b;try{u(!0);const C=await((b=a.current)==null?void 0:b.submit());if(!C)return;n==null||n(C),o==null||o(!1),i==null||i(null)}finally{u(!1)}},_=E.jsx(BC,{...f,hideDetails:e,hasCloseButton:y,variant:f.address?"default":"error",className:it.balloon,onDetails:L,onClose:w}),x=s&&!!(h!=null&&h.getVisible()),p=t?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return E.jsxs(Td,{noClustererRedraw:!0,icon:S,position:g,options:ph,onLoad:v,children:[y&&E.jsxs(pp,{minSnapHeight:f.address?200:void 0,submitDisabled:!p||l,submitLoading:l,hideFooter:!f.address,open:x,onDismiss:w,onSubmitClick:m,children:[f.address&&E.jsx(vp,{ref:a,hideActions:!0,classes:nE,location:r,onChange:d,onClose:w}),!f.address&&_]}),!y&&x&&E.jsx(Bd,{onCloseClick:w,children:_})]})},iE=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,mapTheme:o,palette:s}=lt(),a=s==null?void 0:s.primary;function l(){switch(o){case"omnic":return x1;case"omnic-light":return _1(a);default:return}}const u=l(),f=c.useMemo(()=>{var h,v;return{lat:((h=i==null?void 0:i.center)==null?void 0:h[0])??ga[0],lng:((v=i==null?void 0:i.center)==null?void 0:v[1])??ga[1]}},[i==null?void 0:i.center]),d=c.useCallback(async h=>{const{latLng:v}=h;if(!v||r)return;Oe.getState().setDetailsOpen(!1),vn.getState().setSelectedLocation(null);const y=[v.lat(),v.lng()];console.debug("[OmnicLocationsWidget::mapClick]",y);try{await nn.getState().setPlaceAndPoint(y)}catch{Mt.getState().setDeliverPoint({address:null,coords:y})}},[r]);return E.jsx(Bm,{zoom:i==null?void 0:i.initialZoom,center:f,mapContainerClassName:Se(it.root,e),options:{styles:u,...O1},onClick:d,...n,children:t})},oE=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},Z.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),Z.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),Z.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),Z.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),Z.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),sE=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(it.mapControl),n.classList.add(it.mapControl),e.innerHTML="+",n.innerHTML="—",t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(n),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r+1)}),n.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r-1)})},aE=t=>{const e=document.createElement("div");e.classList.add(it.mapControl),e.classList.add(it.geolocationControl),e.innerHTML=Ap.renderToString(E.jsx(oE,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{xl(async n=>{const{latitude:r,longitude:i}=n.coords,o=[r,i];await nn.getState().setPlaceAndPoint(o)})})},lE=({className:t})=>{const e=Fn(),n=Oe($f),r=Oe(Eg),i=dr(gd),o=Mt(ml),{lmsData:s}=Ps(),{disableGeolocation:a,hideDeliveryTime:l,hideDetails:u,hideMapControls:f,onPointClick:d}=lt(),h=c.useCallback(S=>{console.debug("[OmnicLocationsWidget::loadMap]",S),Oe.getState().setMap(S),f||(sE(S),a||aE(S))},[a,f]),v=c.useCallback(S=>{const m=s==null?void 0:s.location.what3words,_=m!=null&&m.id?m:void 0;d==null||d(S,_)},[d,s]),y=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),Oe.getState().setMap(null)},[]),g=c.useCallback(()=>{if(!n)return;const S=n==null?void 0:n.getBounds();S&&(console.debug("[OmnicLocationsWidget::changeBounds]",S),dr.getState().loadNext([[S.getSouthWest().lat(),S.getNorthEast().lat()],[S.getSouthWest().lng(),S.getNorthEast().lng()]],e))},[e,n]),L=c.useCallback(async S=>{if(Mt.getState().setDeliverPoint(null),vn.getState().setSelectedLocation(S),!S)return;const m=[S.location.latitude,S.location.longitude];console.debug("[OmnicLocationsWidget::selectPoint]",m),await nn.getState().setPlace(m)},[]),w=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]);return E.jsxs("div",{className:Se(it.mapContainer,t),children:[E.jsxs(iE,{onIdle:g,onLoad:h,onUnmount:y,onTilesLoaded:w,children:[o&&E.jsx(rE,{hideDeliveryTime:l,hideDetails:u,point:o,setOpenDetails:Oe.getState().setDetailsOpen,setDeliveryPoint:Mt.getState().setDeliverPoint,onPointClick:v}),E.jsx(PC,{onPointClick:v,onOpenDetails:Oe.getState().setDetailsOpen,onPointSelected:L})]}),(i||r)&&E.jsx(xd,{className:it.overlay,children:E.jsx(os,{})})]})},uE=c.memo(lE),cE=t=>({google:uE})[t];function mp(...t){return c.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const ws=t=>{const e=c.useCallback(()=>{var n;(n=t==null?void 0:t.onClick)==null||n.call(t,t.name)},[t]);return{ref:t==null?void 0:t.ref,name:t==null?void 0:t.name,onClick:e}},fE=()=>{throw new Error("useMediaQuery is a client-only hook")};function dE(t){const e=c.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return c.useSyncExternalStore(e,n,fE)}const hE="768px",pE="1024px",gE="1280px",vE="1536px",mE={screenSm:hE,screenMd:pE,screenLg:gE,screenXl:vE};function lo(t){return dE(`(max-width: calc(${mE[t]} - 1px))`)}const yE=(t,e,n)=>{const{disableGeolocation:r}=n??{},i=Oe($f);c.useEffect(()=>{i&&(console.debug("[OmnicWidgetLocations::setMapLoaded]",i),Oe.getState().setLoaded())},[i]);const o=t[0],s=t[1];c.useEffect(()=>{if(!i)return;const a=[o,s],l=async()=>{console.debug("[OmnicWidgetLocations::setFallbackCenter]",a),nn.getState().setPlace(a,[],"country")};if(r){l();return}xl(async u=>{const{latitude:f,longitude:d}=u.coords,h=[f,d];console.debug("[OmnicWidgetLocations::setGeoPosition]",h),await nn.getState().setPlace(h,[],"country")},()=>l())},[o,s,i,e,r])},yp=z0().use(P0()).use(w0()).init({language:"en",defaultNs:"common",ns:["common","courier_balloon","current_location","details_modal","header","location_aside","location_selector","receive_filter","send_filter","type_filter"],apiUrl:"https://tms.omnic.solutions",apiKey:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc"}),bE=t=>{c.useEffect(()=>{t&&(yp.changeLanguage(t),rs.setLanguage(t))},[t])},wE=t=>{c.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&io(`--owl-color-${n}`,r)}}},[t])},SE=t=>{c.useEffect(()=>{t&&t!==void 0&&io("--owl-button-radius",`${t}px`)},[t])},LE=t=>{c.useEffect(()=>{t&&t!==void 0&&io("--owl-font",t)},[t])},CE={open:!1},EE=t=>t.open,Xn=mn(t=>({...CE,toggle(e){t(n=>({open:e??!n.open}))}})),xE=t=>{const e=t==="selector";c.useEffect(()=>{e&&Xn.getState().toggle(!0)},[e])},_E=({locale:t})=>{const[e,n]=c.useState(!1);return c.useEffect(()=>{n(!1)},[t]),c.useEffect(()=>{e||n(!0)},[e]),console.debug("[OmnicWidgetLocations::remount]",{locale:t,mounted:e}),e},OE=t=>{c.useEffect(()=>{t==="sharp"&&io("--owl-radius","0")},[t])},ME=({children:t})=>{const{cornersVariant:e,font:n,locale:r,palette:i,radius:o,startScreen:s}=lt();return LE(n),bE(r),wE(i),SE(o),xE(s),OE(e),E.jsx(E.Fragment,{children:t})},PE=({children:t})=>{const{disableGeolocation:e,map:n}=lt();return gn(n==null?void 0:n.center,"Map center is required"),gn(n==null?void 0:n.initialZoom,"Map initial zoom is required"),yE(n.center,n.initialZoom,{disableGeolocation:e}),E.jsx(E.Fragment,{children:t})},kE=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},Z.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 11.777C24 4.052 17.606 0 12 0S0 4.052 0 11.777C0 16.915 3.994 22.334 12 28c8.006-5.666 12-11.085 12-16.224ZM12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",clipRule:"evenodd"})),RE=()=>{Xn.getState().toggle(!0),Oe.getState().setDetailsOpen(!1),Mt.getState().setDeliverPoint(null),vn.getState().setSelectedLocation(null)},TE="CurrentLocation-module__root__AeQCGT",AE="CurrentLocation-module__icon__459m9q",DE="CurrentLocation-module__text__w-9v28",ca={root:TE,icon:AE,text:DE},bp=({className:t})=>{const{t:e}=on("current_location"),n=nn(Ed),r=nn(Sm);return E.jsxs("div",{role:"presentation",className:Se(ca.root,t),onClick:RE,children:[E.jsx(kE,{className:ca.icon}),E.jsxs("span",{className:ca.text,children:[!n&&e("choose_from_map"),n&&`${(r==null?void 0:r.long_name)??n.formatted_address}`]})]})},IE=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},Z.createElement("path",{fill:"currentcolor",d:"M6.698 32a6.579 6.579 0 0 1-3.35-.889 6.718 6.718 0 0 1-2.443-2.4A6.285 6.285 0 0 1 0 25.422V6.578c0-1.215.302-2.311.905-3.29A6.718 6.718 0 0 1 3.35.889 6.579 6.579 0 0 1 6.698 0h19.188c1.207 0 2.308.296 3.304.889a6.72 6.72 0 0 1 2.444 2.4c.633.978.95 2.074.95 3.289v18.844a6.061 6.061 0 0 1-.95 3.29 6.72 6.72 0 0 1-2.444 2.4c-.996.592-2.097.888-3.304.888H6.698Zm.317-6.933h18.464V6.933H7.015v18.134ZM37.568 32V0h7.24l11.043 12.933L66.848 0h7.287v32h-7.06V10.533L55.85 23.69 44.582 10.578V32h-7.014Zm41.985 0V0h7.241l18.238 21.333V0h7.105v32h-7.241L86.568 10.578V32h-7.015Zm36.523 0V0H123v32h-6.924Z"})),jE=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:192,height:20,fill:"none",viewBox:"0 0 192 20",...t},Z.createElement("path",{fill:"#000",d:"M4.1 20a3.966 3.966 0 0 1-2.05-.555 4.15 4.15 0 0 1-1.496-1.498A3.982 3.982 0 0 1 0 15.895V4.133c0-.758.185-1.442.554-2.052A4.15 4.15 0 0 1 2.05.583 3.966 3.966 0 0 1 4.1.028h11.743c.738 0 1.412.185 2.022.555A4.15 4.15 0 0 1 19.36 2.08c.388.61.582 1.294.582 2.052v11.762a3.83 3.83 0 0 1-.582 2.052 4.15 4.15 0 0 1-1.495 1.498c-.61.37-1.284.555-2.022.555H4.099Zm.193-4.327h11.3V4.355h-11.3v11.318ZM22.992 20V.028h4.432L34.182 8.1l6.73-8.072h4.46V20H41.05V6.602l-6.87 8.21-6.896-8.182V20h-4.293Zm25.696 0V.028h4.431l11.162 13.315V.028h4.348V20h-4.431L52.98 6.63V20h-4.294Zm22.352 0V.028h4.238V20H71.04Zm14.963 0V0h4.293v15.673h12.554V20H86.003Zm18.489 0V0h4.293v15.673h12.554V20h-16.847Zm18.717 0V4.133c0-.758.185-1.442.554-2.052a4.156 4.156 0 0 1 1.496-1.498 3.966 3.966 0 0 1 2.049-.555h11.716c.757 0 1.441.185 2.05.555.628.37 1.126.869 1.495 1.498.388.61.582 1.294.582 2.052V20h-4.348v-6.435h-11.301V20h-4.293Zm4.293-10.763h11.301V4.355h-11.301v4.882ZM146.307 20V.028h4.432l6.758 8.072 6.73-8.072h4.459V20h-4.32V6.602l-6.869 8.21L150.6 6.63V20h-4.293Zm25.751 0V4.133c0-.758.185-1.442.554-2.052a4.148 4.148 0 0 1 1.496-1.498 3.966 3.966 0 0 1 2.049-.555h11.716c.757 0 1.44.185 2.05.555.628.37 1.126.869 1.496 1.498A3.75 3.75 0 0 1 192 4.133V20h-4.348v-6.435h-11.301V20h-4.293Zm4.293-10.763h11.301V4.355h-11.301v4.882Z"})),NE="Header-module__root__Pe4MYp",BE="Header-module__nav__wtnkmT",FE="Header-module__navItem__-Fy63Z",UE="Header-module__logo__xO2bWO",xi={root:NE,nav:BE,navItem:FE,logo:UE},VE={llama:jE,default:IE},zE=()=>{const{hideLogo:t,logo:e="default"}=lt();if(t)return null;const n=VE[e];return E.jsx("div",{className:xi.logo,children:E.jsx(n,{})})},$E=({className:t})=>{const{t:e}=on("header"),{disableDelivery:n}=lt(),r=Oe(wg),i=Mt(ml);c.useEffect(()=>{i?Oe.getState().setMode("location_delivery"):Oe.getState().setMode("self_pickup")},[i]);const o=()=>{Mt.getState().setDeliverPoint(null),Oe.getState().setMode("self_pickup")},s=()=>{Mt.getState().setDeliverPoint(null),Oe.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return E.jsxs("div",{className:Se(xi.root,t),children:[E.jsx(zE,{}),E.jsxs("nav",{className:xi.nav,children:[!n&&E.jsx(Nt,{as:"link",className:xi.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&E.jsx(Nt,{as:"link",className:xi.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),E.jsx(bp,{})]})]})},HE=c.memo($E),WE={open:!1},Qr=mn(t=>({...WE,toggle(e){Oe.getState().setDetailsOpen(!1),Mt.getState().setDeliverPoint(null),vn.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),GE="Layout-module__root__qzPL-f",ZE="Layout-module__headerHidden__JEN-d0",qE="Layout-module__sidebarHidden__x017O3",KE="Layout-module__sidebarOpen__IZnIjs",Bo={root:GE,headerHidden:ZE,sidebarHidden:qE,sidebarOpen:KE},QE=({children:t})=>{const{hideFilters:e,hideHeader:n}=lt(),r=Qr(i=>i.open);return E.jsx("div",{className:Se(Bo.root,{[Bo.sidebarOpen]:r,[Bo.headerHidden]:n,[Bo.sidebarHidden]:e}),children:t})},Wl=()=>E.jsx(xd,{children:E.jsx(os,{})}),JE=({children:t})=>{const e=dr(nm);return dr(gd)&&!e?E.jsx(Wl,{}):E.jsx(E.Fragment,{children:t})};var wp={},Is={},Sp={exports:{}},XE="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",YE=XE,ex=YE;function Lp(){}function Cp(){}Cp.resetWarningCache=Lp;var tx=function(){function t(r,i,o,s,a,l){if(l!==ex){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Cp,resetWarningCache:Lp};return n.PropTypes=n,n};Sp.exports=tx();var nx=Sp.exports,js={},Jr={};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.loadGoogleMapScript=Jr.isBrowser=void 0;var Ep=typeof window<"u"&&window.document;Jr.isBrowser=Ep;var rx=function(e,n){if(!Ep||typeof google<"u"&&google.maps&&google.maps.api)return Promise.resolve();var r=document.querySelectorAll('script[src*="'.concat(e,'"]'));if(r&&r.length)return new Promise(function(s){if(typeof google<"u")return s();r[0].addEventListener("load",function(){return s()})});var i=new URL(n);i.searchParams.set("callback","__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__");var o=document.createElement("script");return o.src=i.toString(),new Promise(function(s){window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__=s,document.body.appendChild(o)})};Jr.loadGoogleMapScript=rx;var Ns={};Object.defineProperty(Ns,"__esModule",{value:!0});Ns.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var ix="https://maps.googleapis.com/maps/api/js";Ns.GOOGLE_MAP_SCRIPT_BASE_URL=ix;function es(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?es=function(n){return typeof n}:es=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},es(t)}Object.defineProperty(js,"__esModule",{value:!0});js.default=cx;var Et=sx(c),fa=Jr,ox=Ns;function xp(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(xp=function(i){return i?n:e})(t)}function sx(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||es(t)!=="object"&&typeof t!="function")return{default:t};var n=xp(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function yf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function bf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?yf(Object(n),!0).forEach(function(r){ax(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ax(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lx(t,e){if(t==null)return{};var n=ux(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ux(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function cx(t){var e=t.ref,n=t.onPlaceSelected,r=t.apiKey,i=t.libraries,o=i===void 0?"places":i,s=t.inputAutocompleteValue,a=s===void 0?"new-password":s,l=t.options;l=l===void 0?{}:l;var u=l.types,f=u===void 0?["(cities)"]:u,d=l.componentRestrictions,h=l.fields,v=h===void 0?["address_components","geometry.location","place_id","formatted_address"]:h,y=l.bounds,g=lx(l,["types","componentRestrictions","fields","bounds"]),L=t.googleMapsScriptBaseUrl,w=L===void 0?ox.GOOGLE_MAP_SCRIPT_BASE_URL:L,S=t.language,m=(0,Et.useRef)(null),_=(0,Et.useRef)(null),x=(0,Et.useRef)(null),p=(0,Et.useRef)(null),b=S?"&language=".concat(S):"",C="".concat(w,"?libraries=").concat(o,"&key=").concat(r).concat(b),P=(0,Et.useCallback)(function(){return(0,fa.loadGoogleMapScript)(w,C)},[w,C]);return(0,Et.useEffect)(function(){var O=bf(bf({},g),{},{fields:v,types:f,bounds:y});if(d&&(O.componentRestrictions=d),!(x.current||!m.current||!fa.isBrowser)){e&&!e.current&&(e.current=m.current);var R=function(){var T;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((T=google.maps)!==null&&T!==void 0&&T.places))return console.error("Google maps places API must be loaded.");if(!m.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");x.current=new google.maps.places.Autocomplete(m.current,O),x.current&&(_.current=x.current.addListener("place_changed",function(){n&&x&&x.current&&n(x.current.getPlace(),m.current,x.current)}))};return r?P().then(function(){return R()}):R(),function(){return _.current?_.current.remove():void 0}}},[]),(0,Et.useEffect)(function(){var O;!(Et.default!==null&&Et.default!==void 0&&(O=Et.default.version)!==null&&O!==void 0&&O.startsWith("18"))&&fa.isBrowser&&window.MutationObserver&&m.current&&m.current instanceof HTMLInputElement&&(p.current=new MutationObserver(function(){p.current.disconnect(),m.current&&(m.current.autocomplete=a)}),p.current.observe(m.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,Et.useEffect)(function(){x.current&&x.current.setFields(v)},[v]),(0,Et.useEffect)(function(){x.current&&x.current.setBounds(y)},[y]),(0,Et.useEffect)(function(){x.current&&x.current.setComponentRestrictions(d)},[d]),(0,Et.useEffect)(function(){x.current&&x.current.setOptions(g)},[g]),{ref:m,autocompleteRef:x}}function ts(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ts=function(n){return typeof n}:ts=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ts(t)}Object.defineProperty(Is,"__esModule",{value:!0});Is.default=void 0;var gl=dx(c),Qe=_p(nx),fx=_p(js);function _p(t){return t&&t.__esModule?t:{default:t}}function Op(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Op=function(i){return i?n:e})(t)}function dx(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||ts(t)!=="object"&&typeof t!="function")return{default:t};var n=Op(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Ss(){return Ss=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ss.apply(this,arguments)}function hx(t,e){if(t==null)return{};var n=px(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function px(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Mp(t){var e=t.onPlaceSelected,n=t.apiKey,r=t.libraries,i=t.inputAutocompleteValue,o=t.options,s=t.googleMapsScriptBaseUrl,a=t.refProp,l=t.language,u=hx(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,fx.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return gl.default.createElement("input",Ss({ref:d},u))}Mp.propTypes={apiKey:Qe.default.string,libraries:Qe.default.arrayOf(Qe.default.string),ref:Qe.default.oneOfType([Qe.default.func,Qe.default.shape({current:Qe.default.any})]),googleMapsScriptBaseUrl:Qe.default.string,onPlaceSelected:Qe.default.func,inputAutocompleteValue:Qe.default.string,options:Qe.default.shape({componentRestrictions:Qe.default.object,bounds:Qe.default.object,location:Qe.default.object,offset:Qe.default.number,origin:Qe.default.object,radius:Qe.default.number,sessionToken:Qe.default.object,types:Qe.default.arrayOf(Qe.default.string)}),language:Qe.default.string};var gx=(0,gl.forwardRef)(function(t,e){return gl.default.createElement(Mp,Ss({},t,{refProp:e}))});Is.default=gx;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"usePlacesWidget",{enumerable:!0,get:function(){return n.default}});var e=r(Is),n=r(js);function r(i){return i&&i.__esModule?i:{default:i}}})(wp);var Pp=wp;const vx="Aside-module__root__EotK2f",mx="Aside-module__open__Zwmbs5",yx="Aside-module__overlay__slLdHF",bx="Aside-module__container__28P4wq",Fo={root:vx,open:mx,overlay:yx,container:bx},wx=({children:t,className:e,open:n})=>E.jsxs("div",{className:Se(Fo.root,e,{[Fo.open]:n}),children:[E.jsx("div",{className:Fo.overlay}),E.jsx("div",{className:Fo.container,children:t})]}),Sx="Input-module__locationSearchRoot__svh-f9",Lx="Input-module__endAdornment__m40K5R",Cx="Input-module__input__505b7i",Ex="Input-module__startAdornment__D-sJ0N",xx="Input-module__locationSearchInput__2YK1MG",_x="Input-module__label__gmqtsf",Ox="Input-module__inputContainer__vubIa-",Cr={locationSearchRoot:Sx,endAdornment:Lx,input:Cx,startAdornment:Ex,locationSearchInput:xx,label:_x,inputContainer:Ox},kp=c.forwardRef(({className:t,endAdornment:e,inputRef:n,label:r,onBlur:i,onChange:o,startAdornment:s,...a},l)=>{const u=c.useId(),f=c.useRef(null);c.useImperativeHandle(l,()=>({focus:()=>{var h;(h=f.current)==null||h.focus()},blur:()=>{var h;(h=f.current)==null||h.blur()},setValue:h=>{if(o){o({target:{value:h}});return}if(i){i({target:{value:h}});return}f.current&&(f.current.value=h)}}),[i,o]);const d=mp(n,f);return E.jsxs("label",{htmlFor:a.id??u,className:Se(Cr.locationSearchRoot,t),children:[r&&E.jsx("span",{className:Cr.label,children:r}),E.jsxs("div",{className:Cr.inputContainer,children:[s&&E.jsx("div",{className:Cr.startAdornment,children:s}),E.jsx("input",{...a,ref:d,id:a.id??u,className:Cr.locationSearchInput,onChange:o,onBlur:i}),e&&E.jsx("div",{className:Cr.endAdornment,children:e})]})]})}),Mx="LocationAside-module__submit__CSKcqi",Px="LocationAside-module__container__S1NejR",kx="LocationAside-module__selector__hl74ke",Rx="LocationAside-module__label__0Zk8at",Tx="LocationAside-module__header__N1wgyn",Ax="LocationAside-module__close__VsE88z",Uo={submit:Mx,container:Px,selector:kx,label:Rx,header:Tx,close:Ax},Dx=c.forwardRef((t,e)=>{const{t:n}=on(["location_aside","common"]),r=Xn(EE),{country:i,hideCloseButtonOnLocationScreen:o,inputs:s,onCloseLocationSelector:a,onLocationSelect:l}=lt(),u=c.useRef(null),[f,d]=c.useState("");c.useImperativeHandle(e,()=>({open:()=>Xn.getState().toggle(!0),close:()=>Xn.getState().toggle(!1)}),[]);const h=async S=>{Xn.getState().toggle(!1),await nn.getState().setPlace(S),l==null||l(S),S!=null&&S.formatted_address&&d(S==null?void 0:S.formatted_address)},v=()=>{Xn.getState().toggle(!1),a==null||a()},y=i?{componentRestrictions:{country:i}}:void 0,g=S=>{d(S.target.value)},{ref:L}=Pp.usePlacesWidget({libraries:["places"],options:y,onPlaceSelected:h,apiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",inputAutocompleteValue:f}),w=ws(s==null?void 0:s.city);return E.jsx(wx,{open:r,children:E.jsx("div",{ref:u,className:Uo.container,children:E.jsxs("div",{className:Uo.selector,children:[E.jsxs("div",{className:Uo.header,children:[E.jsx("div",{className:Uo.label,children:n("choose_city")}),!o&&E.jsx(ei,{position:"relative",onClick:v})]}),E.jsx(kp,{...w,inputRef:L,value:f,placeholder:n("placeholder"),onChange:g})]})})})}),Ix=c.memo(Dx),jx=({children:t})=>{const{locale:e}=lt(),{isLoaded:n}=Rd({language:e,libraries:Wp,googleMapsApiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA"});return n?E.jsx(E.Fragment,{children:t}):E.jsx(Wl,{})},Nx=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},Z.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M14.617 16.032a9 9 0 1 1 1.414-1.414l3.676 3.675a1 1 0 0 1-1.414 1.414l-3.676-3.675ZM2 9a7 7 0 1 1 12.04 4.858 1.005 1.005 0 0 0-.182.182A7 7 0 0 1 2 9Z",clipRule:"evenodd"})),Bx=({className:t})=>{const{t:e}=on("location_selector"),{country:n,inputs:r,onLocationSelect:i}=lt(),[o,s]=c.useState(""),[a,l]=c.useState(!1),u=[],f=n?{componentRestrictions:{country:n},types:u}:{types:u},d=async S=>{await nn.getState().setPlaceAndPoint(S,{ignoreSelection:!0}),i==null||i(S)},{ref:h}=Pp.usePlacesWidget({libraries:["places"],options:f,onPlaceSelected:d,inputAutocompleteValue:o}),v=S=>{a&&Oe.getState().setBlurred(!!S.target.value),s(S.target.value)},y=()=>{o&&Oe.getState().setBlurred(!0),Oe.getState().setDetailsOpen(!1),Mt.getState().setDeliverPoint(null),vn.getState().setSelectedLocation(null),l(!0)},g=()=>{Oe.getState().setBlurred(!1),l(!1)},L=S=>{S.key==="Enter"&&S.preventDefault()},w=ws(r==null?void 0:r.address);return E.jsx(kp,{...w,inputRef:h,value:o,className:t,endAdornment:E.jsx(Nx,{}),placeholder:e("placeholder"),onChange:v,onFocus:y,onBlur:g,onKeyDown:L})},Fx=({className:t})=>Oe(Cg)?E.jsx(Bx,{className:t}):null,Ux=c.memo(Fx),Vx="DeliveryDetailsModal-module__root__qwKnjX",zx={root:Vx},$x=({className:t,location:e,onClose:n,onSubmit:r})=>E.jsx("div",{className:Se(zx.root,t),children:E.jsx(vp,{location:e,onClose:n,onSubmit:r})}),Hx="LocationDetailsModal-module__root__PyRnLM",Wx={root:Hx},Gx=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return E.jsx("div",{className:Se(Wx.root,t),children:E.jsx(nh,{location:e,onClose:n,onSubmit:i})})},Zx="MapContainer-module__root__1Os6Q-",qx="MapContainer-module__mapWrapper__Cwe7qC",Kx="MapContainer-module__wrapperBlurred__04NN2L",Qx="MapContainer-module__locationSelector__Pr1zS-",Jx="MapContainer-module__filterButton__CW3Qv7",Xx="MapContainer-module__sidebarOpen__lGMVrJ",Yx="MapContainer-module__filterIcon__T01XsJ",e2="MapContainer-module__details__gM8LWX",tn={root:Zx,mapWrapper:qx,wrapperBlurred:Kx,locationSelector:Qx,filterButton:Jx,sidebarOpen:Xx,filterIcon:Yx,details:e2},t2=()=>{const{onPointClick:t}=lt(),e=Oe(yl),n=vn(_g),r=Mt(ml),i=c.useCallback(()=>{Oe.getState().setDetailsOpen(!1)},[]),o=c.useCallback(s=>{t==null||t(s),Oe.getState().setDetailsOpen(!1),vn.getState().setSelectedLocation(null),Mt.getState().setDeliverPoint(null)},[t]);return E.jsxs(E.Fragment,{children:[(r==null?void 0:r.address)&&e&&E.jsx($x,{location:r,className:tn.details,onClose:i,onSubmit:o}),n&&e&&E.jsx(Gx,{location:n,className:tn.details,onClose:i,onSubmit:o})]})},n2=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},Z.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),Z.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,strokeWidth:1.5,d:"M32.093 10h13.814c1.151 0 2.093.91 2.093 2.02v2.223c0 .808-.523 1.818-1.047 2.324l-4.5 3.839c-.627.505-1.046 1.515-1.046 2.323v4.344c0 .607-.419 1.415-.942 1.718L39 29.7c-1.36.808-3.244-.101-3.244-1.717v-5.355c0-.707-.419-1.616-.837-2.121l-3.977-4.041c-.523-.506-.942-1.415-.942-2.02V12.12c0-1.21.942-2.12 2.093-2.12Z"})),r2=t=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},Z.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),Z.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.165 7h9.67c.806 0 1.465.636 1.465 1.414V9.97c0 .566-.366 1.273-.733 1.627l-3.15 2.687c-.44.353-.732 1.06-.732 1.627v3.04c0 .425-.293.99-.66 1.203L14 20.79c-.952.566-2.271-.07-2.271-1.202V15.84c0-.495-.293-1.132-.586-1.485l-2.784-2.83c-.366-.353-.659-.99-.659-1.413V8.485C7.7 7.636 8.36 7 9.165 7Z"})),i2=()=>{const t=Qr(i=>i.open),e=Qr(i=>i.toggle),n=lo("screenSm"),r=()=>{e(!0)};return E.jsxs("div",{role:"presentation",className:Se(tn.filterButton,{[tn.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&E.jsx(bp,{}),n?E.jsx(r2,{className:tn.filterIcon,onClick:r}):E.jsx(n2,{className:tn.filterIcon})]})},o2=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=lt(),i=Oe(Lg),o=Oe(yl);return E.jsxs("div",{className:Se(tn.root,e),children:[!r&&!o&&E.jsx(Ux,{className:tn.locationSelector}),!n&&E.jsx(i2,{}),E.jsx("div",{className:Se(tn.mapWrapper,{[tn.wrapperBlurred]:i}),children:t}),E.jsx(t2,{})]})},s2=c.memo(o2),a2="Separator-module__root__eQtZey",l2={root:a2},da=({className:t,...e})=>E.jsx("hr",{className:Se(l2.root,t),...e}),u2="Sidebar-module__root__4j1MA3",c2="Sidebar-module__closeButton__HLXy1c",f2="Sidebar-module__open__mqQXF6",d2="Sidebar-module__header__Afp6uz",h2="Sidebar-module__typeFilter__GN46u9",p2="Sidebar-module__separator__6I4QoJ",g2="Sidebar-module__withRightPadding__2u1Ina",v2="Sidebar-module__sheetContent__SaoncI",m2="Sidebar-module__doneButton__4aeaSD",hn={root:u2,closeButton:c2,open:f2,header:d2,typeFilter:h2,separator:p2,withRightPadding:g2,sheetContent:v2,doneButton:m2},y2=()=>{const{t}=on("common"),e=lo("screenSm"),n=Qr(i=>i.toggle),r=()=>{n(!1)};return E.jsxs("div",{className:hn.header,children:[e&&E.jsx("div",{role:"presentation",className:hn.doneButton,onClick:r,children:t("done")}),!e&&E.jsx(ei,{className:hn.closeButton,onClick:r})]})},b2="Radio-module__root__7ElY2W",w2="Radio-module__label__c-sYW3",wf={root:b2,label:w2},S2=({className:t,label:e,labelProps:n={},...r})=>{const i=c.useId(),{className:o,...s}=n;return E.jsxs("label",{htmlFor:i,className:Se(wf.label,o),...s,children:[E.jsx("input",{id:i,type:"radio",className:Se(wf.root,t),...r}),e]})},Rr=t=>E.jsx(S2,{...t,type:"checkbox"}),L2="RadioGroup-module__root__ewZw-x",C2="RadioGroup-module__body__k8BJAs",E2="RadioGroup-module__legend__tcfV7q",ha={root:L2,body:C2,legend:E2},Rp=({children:t,className:e,label:n,onChange:r,value:i,...o})=>E.jsxs("div",{className:Se(ha.root,e),...o,children:[n&&E.jsx("span",{className:ha.legend,children:n}),E.jsx("div",{className:ha.body,children:c.Children.map(t,s=>c.isValidElement(s)?c.cloneElement(s,{checked:!!(i!=null&&i[s.props.value]),onChange:a=>r==null?void 0:r({...i,[a.target.value]:a.target.checked})}):null)})]}),x2=({className:t,onChange:e})=>{const{t:n}=on("receive_filter"),r=Fn(kg);return E.jsxs(Rp,{value:r,label:n("title"),className:t,onChange:e,children:[E.jsx(Rr,{name:"receive",value:Wt.DressingRoom,label:n("dressing_room")}),E.jsx(Rr,{name:"receive",value:Wt.CheckOrder,label:n("check_order")}),E.jsx(Rr,{name:"receive",value:Wt.PayByCash,label:n("pay_by_cash")})]})},_2=c.memo(x2),O2=({className:t,onChange:e})=>{const{t:n}=on("send_filter"),r=Fn(Pg);return E.jsxs(Rp,{className:t,value:r,label:n("title"),onChange:e,children:[E.jsx(Rr,{name:"send",value:Gt.Return,label:n("sending_returns")}),E.jsx(Rr,{name:"send",value:Gt.Shipping,label:n("shipping")}),E.jsx(Rr,{name:"send",value:Gt.Payment,label:n("payment")})]})},M2=c.memo(O2),P2="TypeFilter-module__root__WH5EQV",k2="TypeFilter-module__button__f0mSfo",Vo={root:P2,button:k2},R2=({className:t,onChange:e,value:n})=>{const{t:r}=on("type_filter"),i=o=>()=>e==null?void 0:e(o);return E.jsxs("div",{className:Se(Vo.root,t),children:[E.jsx(Nt,{className:Vo.button,variant:n===dn.All?"primary":"secondary",onClick:i(dn.All),children:r("all")}),E.jsx(Nt,{className:Vo.button,variant:n===dn.PostOffice?"primary":"secondary",onClick:i(dn.PostOffice),children:r("post_office")}),E.jsx(Nt,{className:Vo.button,variant:n===dn.PickPoint?"primary":"secondary",onClick:i(dn.PickPoint),children:r("pick_point")})]})},T2=({className:t,onChange:e})=>{const n=Fn(Mg);return E.jsx(R2,{value:n,className:t,onChange:e})},A2=c.memo(T2),D2=({className:t})=>{const e=lo("screenSm"),n=Qr(l=>l.open),r=c.useCallback(l=>Fn.getState().setFilter({type:l}),[]),i=c.useCallback(l=>Fn.getState().setFilter({send:l}),[]),o=c.useCallback(l=>Fn.getState().setFilter({receive:l}),[]),s=c.useCallback(()=>Qr.getState().toggle(!1),[]),a=E.jsxs(E.Fragment,{children:[E.jsx(y2,{}),E.jsxs("div",{className:hn.withRightPadding,children:[E.jsx(A2,{className:hn.typeFilter,onChange:r}),E.jsx(da,{className:hn.separator}),E.jsx(_2,{onChange:o}),E.jsx(da,{}),E.jsx(M2,{onChange:i}),E.jsx(da,{})]})]});return e?E.jsx(dp,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-hp,onDismiss:s,children:E.jsx("div",{className:hn.sheetContent,children:a})}):E.jsx("div",{className:Se(hn.root,t,{[hn.open]:n}),children:a})},I2="App-module__map__Kf-2JS",j2="App-module__sidebar__ORIzGk",N2="App-module__header__bgP9DA",pa={map:I2,sidebar:j2,header:N2},B2=new r1,F2=({config:t,options:e})=>{const n=mm(t),{INN:r,hideFilters:i,hideHeader:o,locale:s,map:a}=n;gn(r,"INN is required"),ym(r,e),gn(a==null?void 0:a.provider,"Map provider is required");const l=cE(a.provider);rm();const u=_E({locale:s});return E.jsx(Ip,{baseColor:"#f3f3f3",highlightColor:"#ecebeb",children:E.jsx(l1,{client:B2,children:E.jsx(Nf.Provider,{value:n,children:E.jsx(PE,{children:E.jsx(ME,{children:E.jsx(H0,{tolgee:yp,fallback:E.jsx(Wl,{}),children:u&&E.jsx(jx,{children:E.jsx(JE,{children:E.jsxs(QE,{children:[!o&&E.jsx(HE,{className:pa.header}),!i&&E.jsx(D2,{className:pa.sidebar}),E.jsx(s2,{className:pa.map,children:E.jsx(l,{})}),E.jsx(Ix,{})]})})})})})})})})})},Tp=async t=>Fi.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}});exports.EReceiveFilter=Wt;exports.ESendFilter=Gt;exports.ETypeFilter=dn;exports.Widget=F2;exports.createPointsIterator=La;exports.fetchPointsRequest=Sa;exports.fromHoursMinutesToMinutes=Rg;exports.fromMinutesToHoursMinutes=Tg;exports.getAddressFormGeocode=xa;exports.getBoundsFromPoint=Ag;exports.getCurrentPosition=xl;exports.getNormalizedAddress=Tp;exports.getPropertyValue=pd;exports.isCoordinates=Ea;exports.isDeliveryPoint=Yv;exports.isHttpSuccess=hd;exports.isPlaceId=dd;exports.replaceSvgCurrentColor=xr;exports.setWidgetCSSProperty=io;exports.stopImmediatePropagation=Ca;exports.svgStringToBase64URL=_l;
|