PageSourceSearch

https://www.bordeaux.com/app/plugins/bordeaux-mapping/build/index.js?v=259718f2c1d68e5cdb1d

js bordeaux.com collected 2026-09-24 18:45:50 UTC 344,683 bytes, 1 lines download raw bytes

1(()=>{"use strict";var e,t,n,i,s={},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={exports:{}};return s[e].call(n.exports,n,n.exports,o),n.exports}o.m=s,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,i){if(1&i&&(n=this(n)),8&i)return n;if("object"==typeof n&&n){if(4&i&&n.__esModule)return n;if(16&i&&"function"==typeof n.then)return n}var s=Object.create(null);o.r(s);var r={};e=e||[null,t({}),t([]),t(t)];for(var a=2&i&&n;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>r[e]=()=>n[e]);return r.default=()=>n,o.d(s,r),s},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,n)=>(o.f[n](e,t),t),[])),o.u=e=>e+".js?v=1062d2b73ad02e7ec8d6",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},i="bordeaux-mapping:",o.l=(e,t,s,r)=>{if(n[e])n[e].push(t);else{var a,l;if(void 0!==s)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==i+s){a=u;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",o.nc&&a.setAttribute("nonce",o.nc),a.setAttribute("data-webpack",i+s),a.src=e),n[e]=[t];var h=(t,i)=>{a.onerror=a.onload=null,clearTimeout(p);var s=n[e];if(delete n[e],a.parentNode&&a.parentNode.removeChild(a),s&&s.forEach(e=>e(i)),t)return t(i)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),l&&document.head.appendChild(a)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=n[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={57:0};o.f.j=(t,n)=>{var i=o.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{var s=new Promise((n,s)=>i=e[t]=[n,s]);n.push(i[2]=s);var r=o.p+o.u(t),a=new Error;o.l(r,n=>{if(o.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var s=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+s+": "+r+")",a.name="ChunkLoadError",a.type=s,a.request=r,i[1](a)}},"chunk-"+t,t)}};var t=(t,n)=>{var i,s,[r,a,l]=n,c=0;if(r.some(t=>0!==e[t])){for(i in a)o.o(a,i)&&(o.m[i]=a[i]);l&&l(o)}for(t&&t(n);c<r.length;c++)s=r[c],o.o(e,s)&&e[s]&&e[s][0](),e[s]=0},n=globalThis.webpackChunkbordeaux_mapping=globalThis.webpackChunkbordeaux_mapping||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();const a=window.wp.domReady;var l=o.n(a);const c=window.wp.element,d=(window.wp.i18n,window.React);var u=o.n(d);const h=d.createContext(null);function p(){const e=(0,d.useContext)(h)?.maps,t=(0,d.useContext)(j);return(0,d.useMemo)(()=>({...e,current:t?.map}),[e,t])}function m(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!m(e[n],t[n]))return!1;return!0}if(Array.isArray(t))return!1;if("object"==typeof e&&"object"==typeof t){const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const i of n){if(!t.hasOwnProperty(i))return!1;if(!m(e[i],t[i]))return!1}return!0}return!1}function f(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function g(e,t){const n=t.viewState||t,i={};if("longitude"in n&&"latitude"in n&&(n.longitude!==e.center.lng||n.latitude!==e.center.lat)){const t=e.center.constructor;i.center=new t(n.longitude,n.latitude)}return"zoom"in n&&n.zoom!==e.zoom&&(i.zoom=n.zoom),"bearing"in n&&n.bearing!==e.bearing&&(i.bearing=n.bearing),"pitch"in n&&n.pitch!==e.pitch&&(i.pitch=n.pitch),n.padding&&e.padding&&!m(n.padding,e.padding)&&(i.padding=n.padding),i}const y=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function v(e){if(!e)return null;if("string"==typeof e)return e;
1if("toJS"in e&&(e=e.toJS()),!e.layers)return e;const t={};for(const n of e.layers)t[n.id]=n;const n=e.layers.map(e=>{let n=null;"interactive"in e&&(n=Object.assign({},e),delete n.interactive);const i=t[e.ref];if(i){n=n||Object.assign({},e),delete n.ref;for(const e of y)e in i&&(n[e]=i[e])}return n||e});return{...e,layers:n}}const x={version:8,sources:{},layers:[]},w={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},b={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},S={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},T=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],E=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class M{constructor(e,t,n){this._map=null,this._internalUpdate=!1,this._hoveredFeatures=null,this._propsedCameraUpdate=null,this._styleComponents={},this._onEvent=e=>{const t=this.props[S[e.type]];t?t(e):"error"===e.type&&console.error(e.error)},this._onCameraEvent=e=>{if(this._internalUpdate)return;e.viewState=this._propsedCameraUpdate||f(this._map.transform);const t=this.props[b[e.type]];t&&t(e)},this._onCameraUpdate=e=>this._internalUpdate?e:(this._propsedCameraUpdate=f(e),g(e,this.props)),this._onPointerEvent=e=>{"mousemove"!==e.type&&"mouseout"!==e.type||this._updateHover(e);const t=this.props[w[e.type]];t&&(this.props.interactiveLayerIds&&"mouseover"!==e.type&&"mouseout"!==e.type&&(e.features=this._hoveredFeatures||this._queryRenderedFeatures(e.point)),t(e),delete e.features)},this._MapClass=e,this.props=t,this._initialize(n)}get map(){return this._map}setProps(e){const t=this.props;this.props=e;const n=this._updateSettings(e,t),i=this._updateSize(e),s=this._updateViewState(e);this._updateStyle(e,t),this._updateStyleComponents(e),this._updateHandlers(e,t),(n||i||s&&!this._map.isMoving())&&this.redraw()}static reuse(e,t){const n=M.savedMaps.pop();if(!n)return null;const i=n.map,s=i.getContainer();for(t.className=s.className;s.childNodes.length>0;)t.appendChild(s.childNodes[0]);i._container=t;const r=i._resizeObserver;r&&(r.disconnect(),r.observe(t)),n.setProps({...e,styleDiffing:!1}),i.resize();const{initialViewState:o}=e;return o&&(o.bounds?i.fitBounds(o.bounds,{...o.fitBoundsOptions,duration:0}):n._updateViewState(o)),i.isStyleLoaded()?i.fire("load"):i.once("style.load",()=>i.fire("load")),i._update(),n}_initialize(e){const{props:t}=this,{mapStyle:n=x}=t,i={...t,...t.initialViewState,container:e,style:v(n)},s=i.initialViewState||i.viewState||i;if(Object.assign(i,{center:[s.longitude||0,s.latitude||0],zoom:s.zoom||0,pitch:s.pitch||0,bearing:s.bearing||0}),t.gl){const e=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=e,t.gl)}const r=new this._MapClass(i);s.padding&&r.setPadding(s.padding),t.cursor&&(r.getCanvas().style.cursor=t.cursor),r.transformCameraUpdate=this._onCameraUpdate,r.on("style.load",()=>{this._styleComponents={light:r.getLight(),sky:r.getSky(),projection:r.getProjection?.(),terrain:r.getTerrain()},this._updateStyleComponents(this.props)}),r.on("sourcedata",()=>{this._updateStyleComponents(this.props)});for(const e in w)r.on(e,this._onPointerEvent);for(const e in b)r.on(e,this._onCameraEvent);for(const e in S)r.on(e,this._onEvent);this._map=r}recycle(){const e=this.map.getContainer().querySelector("[mapboxgl-children]");e?.remove(),M.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const e=this._map;e.style&&(e._frame&&(e._frame.cancel(),e._frame=null),e._render())}_updateSize(e){const{viewState:t}=e;if(t){const e=this._map;if(t.width!==e.transform.width||t.height!==e.transform.height)return e.resize(),!0}return!1}_updateViewState(e){const t=this._map,n=t.transform;if(!t.isMoving()){const i=g(n,e);if(Object.keys(i).length>0)return this._internalUpdate=!0,t.jumpTo(i),this._internalUpdate=!1,!0}return!1}_updateSettings(e,t){const n=this._map;let i=!1;for(const s of T)if(s in e&&!m(e[s],t[s])){i=!0;const t=n[`set${s[0].toUpperCase()}${s.slice(1)}`];t?.call(n,e[s])}return i}_updateStyle(e,t){if(e.cursor!==t.cursor&&(this._map.getCanvas().style.cursor=e.cursor||""),e.mapStyle!==t.mapStyle){const{mapStyle:t=x,styleDiffing:n=!0}=e,i={diff:n};"localIdeographFontFamily"in e&&(i.localIdeographFontFamily=e.localIdeographFontFamily),this._map.setStyle(v(t),i)}}_updateStyleComponents({light:e,projection:t,sky:n,terrain:i}){const s=this._map,r=this._styleComponents;
1s.style._loaded&&(e&&!m(e,r.light)&&(r.light=e,s.setLight(e)),t&&!m(t,r.projection)&&t!==r.projection?.type&&(r.projection="string"==typeof t?{type:t}:t,s.setProjection?.(r.projection)),n&&!m(n,r.sky)&&(r.sky=n,s.setSky(n)),void 0===i||m(i,r.terrain)||i&&!s.getSource(i.source)||(r.terrain=i,s.setTerrain(i)))}_updateHandlers(e,t){const n=this._map;for(const i of E){const s=e[i]??!0;m(s,t[i]??!0)||(s?n[i].enable(s):n[i].disable())}}_queryRenderedFeatures(e){const t=this._map,{interactiveLayerIds:n=[]}=this.props;try{return t.queryRenderedFeatures(e,{layers:n.filter(t.getLayer.bind(t))})}catch{return[]}}_updateHover(e){const{props:t}=this;if(t.interactiveLayerIds&&(t.onMouseMove||t.onMouseEnter||t.onMouseLeave)){const t=e.type,n=this._hoveredFeatures?.length>0,i=this._queryRenderedFeatures(e.point),s=i.length>0;!s&&n&&(e.type="mouseleave",this._onPointerEvent(e)),this._hoveredFeatures=i,s&&!n&&(e.type="mouseenter",this._onPointerEvent(e)),e.type=t}else this._hoveredFeatures=null}}M.savedMaps=[];const C=M,P=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];const _="undefined"!=typeof document?d.useLayoutEffect:d.useEffect,j=d.createContext(null),k=d.forwardRef(function(e,t){const n=(0,d.useContext)(h),[i,s]=(0,d.useState)(null),r=(0,d.useRef)(),{current:a}=(0,d.useRef)({mapLib:null,map:null});(0,d.useEffect)(()=>{const t=e.mapLib;let i,l=!0;return Promise.resolve(t||o.e(443).then(o.t.bind(o,443,19))).then(t=>{if(!l)return;if(!t)throw new Error("Invalid mapLib");const o="Map"in t?t:t.default;if(!o.Map)throw new Error("Invalid mapLib");!function(e,t){const{RTLTextPlugin:n,maxParallelImageRequests:i,workerCount:s,workerUrl:r}=t;if(n&&e.getRTLTextPluginStatus&&"unavailable"===e.getRTLTextPluginStatus()){const{pluginUrl:t,lazy:i=!0}="string"==typeof n?{pluginUrl:n}:n;e.setRTLTextPlugin(t,e=>{e&&console.error(e)},i)}void 0!==i&&e.setMaxParallelImageRequests(i),void 0!==s&&e.setWorkerCount(s),void 0!==r&&e.setWorkerUrl(r)}(o,e),e.reuseMaps&&(i=C.reuse(e,r.current)),i||(i=new C(o.Map,e,r.current)),a.map=function(e){if(!e)return null;const t=e.map,n={getMap:()=>t};for(const e of function(e){const t=new Set;let n=e;for(;n;){for(const i of Object.getOwnPropertyNames(n))"_"!==i[0]&&"function"==typeof e[i]&&"fire"!==i&&"setEventedParent"!==i&&t.add(i);n=Object.getPrototypeOf(n)}return Array.from(t)}(t))e in n||P.includes(e)||(n[e]=t[e].bind(t));return n}(i),a.mapLib=o,s(i),n?.onMapMount(a.map,e.id)}).catch(t=>{const{onError:n}=e;n?n({type:"error",target:null,originalEvent:null,error:t}):console.error(t)}),()=>{l=!1,i&&(n?.onMapUnmount(e.id),e.reuseMaps?i.recycle():i.destroy())}},[]),_(()=>{i&&i.setProps(e)}),(0,d.useImperativeHandle)(t,()=>a.map,[i]);const l=(0,d.useMemo)(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]);return d.createElement("div",{id:e.id,ref:r,style:l},i&&d.createElement(j.Provider,{value:a},d.createElement("div",{"mapboxgl-children":"",style:{height:"100%"}},e.children)))}),A=window.ReactDOM,L=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function N(e,t){if(!e||!t)return;const n=e.style;for(const e in t){const i=t[e];Number.isFinite(i)&&!L.test(e)?n[e]=`${i}px`:n[e]=i}}function R(e,t){if(e===t)return null;const n=I(e),i=I(t),s=[];for(const e of i)n.has(e)||s.push(e);for(const e of n)i.has(e)||s.push(e);return 0===s.length?null:s}function I(e){return new Set(e?e.trim().split(/\s+/):[])}const V=(0,d.memo)((0,d.forwardRef)((e,t)=>{const{map:n,mapLib:i}=(0,d.useContext)(j),s=(0,d.useRef)({props:e}),r=(0,d.useMemo)(()=>{let t=!1;d.Children.forEach(e.children,e=>{e&&(t=!0)});const n={...e,element:t?document.createElement("div"):void 0},o=new i.Marker(n);return o.setLngLat([e.longitude,e.latitude]),o.getElement().addEventListener("click",e=>{s.current.props.onClick?.({type:"click",target:o,originalEvent:e})}),o.on("dragstart",e=>{const t=e;t.lngLat=r.getLngLat(),s.current.props.onDragStart?.(t)}),o.on("drag",e=>{const t=e;t.lngLat=r.getLngLat(),s.current.props.onDrag?.(t)}),o.on("dragend",e=>{const t=e;t.lngLat=r.getLngLat(),s.current.props.onDragEnd?.(t)}),o},[]);(0,d.useEffect)(()=>(r.addTo(n.getMap()),()=>{r.remove()}),[]);const{longitude:o,latitude:a,offset:l,style:c,draggable:u=!1,popup:h=null,rotation:p=0,rotationAlignment:m="auto",pitchAlignment:f="auto"}=e;(0,d.useEffect)(()=>{N(r.getElement(),c)},[c]),(0,d.useImperativeHandle)(t,()=>r,[]);const g=s.current.props;r.getLngLat().lng===o&&r.getLngLat().lat===a||r.setLngLat([o,a]),l&&!function(e,t){const n=Array.isArray(e)?e[0]:e?e.x:0,i=Array.isArray(e)?e[1]:e?e.y:0,s=Array.isArray(t)?t[0]:t?t.x:0,r=Array.isArray(t)?t[1]:t?t.y:0;return n===s&&i===r}(r.getOffset(),l)&&r.setOffset(l),r.isDraggable()!==u&&r.setDraggable(u),r.getRotation()!==p&&r.setRotation(p),r.getRotationAlignment()!==m&&r.setRotationAlignment(m),r.getPitchAlignment()!==f&&r.setPitchAlignment(f),r.getPopup()!==h&&r.setPopup(h);const y=R(g.className,e.className);if(y)for(const e of y)r.toggleClassName(e);return s.current.props=e,(0,A.createPortal)(e.children,r.getElement())}
1));function D(e,t,n,i){const s=(0,d.useContext)(j),r=(0,d.useMemo)(()=>e(s),[]);return(0,d.useEffect)(()=>{const e=i||n||t,o="function"==typeof t&&"function"==typeof n?t:null,a="function"==typeof n?n:"function"==typeof t?t:null,{map:l}=s;return l.hasControl(r)||(l.addControl(r,e?.position),o&&o(s)),()=>{a&&a(s),l.hasControl(r)&&l.removeControl(r)}},[]),r}function O(e,t){if(!e)throw new Error(t)}(0,d.memo)((0,d.forwardRef)((e,t)=>{const{map:n,mapLib:i}=(0,d.useContext)(j),s=(0,d.useMemo)(()=>document.createElement("div"),[]),r=(0,d.useRef)({props:e}),o=(0,d.useMemo)(()=>{const t={...e},n=new i.Popup(t);return n.setLngLat([e.longitude,e.latitude]),n.once("open",e=>{r.current.props.onOpen?.(e)}),n},[]);if((0,d.useEffect)(()=>{const e=e=>{r.current.props.onClose?.(e)};return o.on("close",e),o.setDOMContent(s).addTo(n.getMap()),()=>{o.off("close",e),o.isOpen()&&o.remove()}},[]),(0,d.useEffect)(()=>{N(o.getElement(),e.style)},[e.style]),(0,d.useImperativeHandle)(t,()=>o,[]),o.isOpen()){const t=r.current.props;o.getLngLat().lng===e.longitude&&o.getLngLat().lat===e.latitude||o.setLngLat([e.longitude,e.latitude]),e.offset&&!m(t.offset,e.offset)&&o.setOffset(e.offset),t.anchor===e.anchor&&t.maxWidth===e.maxWidth||(o.options.anchor=e.anchor,o.setMaxWidth(e.maxWidth));const n=R(t.className,e.className);if(n)for(const e of n)o.toggleClassName(e);r.current.props=e}return(0,A.createPortal)(e.children,s)})),(0,d.memo)(function(e){const t=D(({mapLib:t})=>new t.AttributionControl(e),{position:e.position});return(0,d.useEffect)(()=>{N(t._container,e.style)},[e.style]),null}),(0,d.memo)(function(e){const t=D(({mapLib:t})=>new t.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return(0,d.useEffect)(()=>{N(t._controlContainer,e.style)},[e.style]),null}),(0,d.memo)((0,d.forwardRef)(function(e,t){const n=(0,d.useRef)({props:e}),i=D(({mapLib:t})=>{const i=new t.GeolocateControl(e),s=i._setupUI;return i._setupUI=()=>{i._container.hasChildNodes()||s()},i.on("geolocate",e=>{n.current.props.onGeolocate?.(e)}),i.on("error",e=>{n.current.props.onError?.(e)}),i.on("outofmaxbounds",e=>{n.current.props.onOutOfMaxBounds?.(e)}),i.on("trackuserlocationstart",e=>{n.current.props.onTrackUserLocationStart?.(e)}),i.on("trackuserlocationend",e=>{n.current.props.onTrackUserLocationEnd?.(e)}),i},{position:e.position});return n.current.props=e,(0,d.useImperativeHandle)(t,()=>i,[]),(0,d.useEffect)(()=>{N(i._container,e.style)},[e.style]),null})),(0,d.memo)(function(e){const t=D(({mapLib:t})=>new t.NavigationControl(e),{position:e.position});return(0,d.useEffect)(()=>{N(t._container,e.style)},[e.style]),null}),(0,d.memo)(function(e){const t=D(({mapLib:t})=>new t.ScaleControl(e),{position:e.position}),n=(0,d.useRef)(e),i=n.current;n.current=e;const{style:s}=e;return void 0!==e.maxWidth&&e.maxWidth!==i.maxWidth&&(t.options.maxWidth=e.maxWidth),void 0!==e.unit&&e.unit!==i.unit&&t.setUnit(e.unit),(0,d.useEffect)(()=>{N(t._container,s)},[s]),null}),(0,d.memo)(function(e){const t=D(({mapLib:t})=>new t.TerrainControl(e),{position:e.position});return(0,d.useEffect)(()=>{N(t._container,e.style)},[e.style]),null}),(0,d.memo)(function(e){const t=D(({mapLib:t})=>new t.LogoControl(e),{position:e.position});return(0,d.useEffect)(()=>{N(t._container,e.style)},[e.style]),null});let F=0;function B(e){const t=(0,d.useContext)(j).map.getMap(),n=(0,d.useRef)(e),[,i]=(0,d.useState)(0),s=(0,d.useMemo)(()=>e.id||"jsx-source-"+F++,[]);(0,d.useEffect)(()=>{if(t){const e=()=>setTimeout(()=>i(e=>e+1),0);return t.on("styledata",e),e(),()=>{if(t.off("styledata",e),t.style&&t.style._loaded&&t.getSource(s)){const e=t.getStyle()?.layers;if(e)for(const n of e)n.source===s&&t.removeLayer(n.id);t.removeSource(s)}}}},[t]);let r=t&&t.style&&t.getSource(s);return r?function(e,t,n){O(t.id===n.id,"source id changed"),O(t.type===n.type,"source type changed");let i="",s=0;for(const e in t)"children"===e||"id"===e||m(n[e],t[e])||(i=e,s++);if(!s)return;const r=t.type;if("geojson"===r)e.setData(t.data);else if("image"===r)e.updateImage({url:t.url,coordinates:t.coordinates});else switch(i){case"coordinates":e.setCoordinates?.(t.coordinates);break;case"url":e.setUrl?.(t.url);break;case"tiles":e.setTiles?.(t.tiles);break;default:console.warn(`Unable to update <Source> prop: ${i}`)}}(r,e,n.current):r=function(e,t,n){if(e.style&&e.style._loaded){const i={...n};return delete i.id,delete i.children,e.addSource(t,i),e.getSource(t)}return null}(t,s,e),n.current=e,r&&d.Children.map(e.children,e=>e&&(0,d.cloneElement)(e,{source:s}))||null}let z=0;function $(e){const t=(0,d.useContext)(j).map.getMap(),n=(0,d.useRef)(e),[,i]=(0,d.useState)(0),s=(0,d.useMemo)(()=>e.id||"jsx-layer-"+z++,[]);if((0,d.useEffect)(()=>
1{if(t){const e=()=>i(e=>e+1);return t.on("styledata",e),e(),()=>{t.off("styledata",e),t.style&&t.style._loaded&&t.getLayer(s)&&t.removeLayer(s)}}},[t]),t&&t.style&&t.getLayer(s))try{!function(e,t,n,i){if(O(n.id===i.id,"layer id changed"),O(n.type===i.type,"layer type changed"),"custom"===n.type||"custom"===i.type)return;const{layout:s={},paint:r={},filter:o,minzoom:a,maxzoom:l,beforeId:c}=n;if(c!==i.beforeId&&e.moveLayer(t,c),s!==i.layout){const n=i.layout||{};for(const i in s)m(s[i],n[i])||e.setLayoutProperty(t,i,s[i]);for(const i in n)s.hasOwnProperty(i)||e.setLayoutProperty(t,i,void 0)}if(r!==i.paint){const n=i.paint||{};for(const i in r)m(r[i],n[i])||e.setPaintProperty(t,i,r[i]);for(const i in n)r.hasOwnProperty(i)||e.setPaintProperty(t,i,void 0)}m(o,i.filter)||e.setFilter(t,o),a===i.minzoom&&l===i.maxzoom||e.setLayerZoomRange(t,a,l)}(t,s,e,n.current)}catch(e){console.warn(e)}else!function(e,t,n){if(e.style&&e.style._loaded&&(!("source"in n)||e.getSource(n.source))){const i={...n,id:t};delete i.beforeId,e.addLayer(i,n.beforeId)}}(t,s,e);return n.current=e,null}const H={longitude:-.504047,latitude:44.925,zoom:8,zoomLevelShowDesignations:9,zoomLevelHideTerritories:11.5,zoomLevelFocusOnDesignation:11},W=window.bordeauxMapping?.baseUrl||"http://localhost",U=W+"/wp-json/",G=async e=>{const t=await fetch(U+e);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return{data:await t.json(),headers:t.headers}},q=async(e,t=null,n="")=>{var i;if(t){var s;const n=await G(`wp/v2/${e}/${t}`);return null!==(s=n.data)&&void 0!==s?s:n}const r=await G(`wp/v2/${e}?per_page=100&page=1${n}`),o=null!==(i=r.data)&&void 0!==i?i:r,a=parseInt(r.headers.get("X-WP-TotalPages"),10);if(a<=1)return o;const l=[];for(let t=2;t<=a;t++)l.push(G(`wp/v2/${e}?per_page=100&page=${t}`));const c=await Promise.all(l);return[...o,...c.flatMap(e=>{var t;return null!==(t=e.data)&&void 0!==t?t:e})]},Z=window.ReactJSXRuntime,Y=(0,d.createContext)();let X=null;const K=()=>"undefined"!=typeof document&&document.fonts?.load?(X||(X=document.fonts.load('400 1em "Edo SZ"',"Bordeaux").catch(e=>{console.warn("Unable to preload Edo SZ:",e)})),X):Promise.resolve(),J=({children:e})=>{const[t,n]=(0,d.useState)(null),[i,s]=(0,d.useState)(null),[r,o]=(0,d.useState)(null),[a,l]=(0,d.useState)(null),[c,u]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{K()},[]),(0,Z.jsx)(Y.Provider,{value:{content:t,updatePost:async(e,t,i=null)=>{if(e&&t){if(s(t),"operation"===e&&i?.operationData)return void n({type:"operation",id:t,operation:i.operationData});u(!0);const r=K();if("activity"===e)try{const e=await(async e=>{var t;const n=await G(`bordeaux/v1/activity-panel/${e}`);return null!==(t=n.data)&&void 0!==t?t:n})(t);await r,n(e)}catch(i){const s=await q(e,t);await r,n(s)}else{const i=await q(e,t);await r,n(i)}u(!1)}else n(null),s(null)},color:r,linkedPost:a,post:i,loading:c,setLoading:u},children:e})},Q=()=>(0,d.useContext)(Y),ee=(0,d.createContext)(),te=({children:e,defaultFilters:t={}})=>{const[n,i]=(0,d.useState)(t),s=(0,d.useCallback)((e,t)=>Array.isArray(e?.[t])?e[t]:[],[]),r=(0,d.useCallback)((e,t)=>{i(n=>{const i=Array.isArray(n[e])?n[e]:[];return i.includes(t)?n:{...n,[e]:[...i,t]}})},[]),o=(0,d.useCallback)((e,t,n)=>{i(i=>{const s=Array.isArray(i[e])?i[e]:[];if(!s.includes(t))return i;const r=[...new Set(s.map(e=>e===t?n:e))];return{...i,[e]:r}})},[]),a=(0,d.useCallback)((e,t)=>{i(n=>{if(!Array.isArray(n[e]))return n;const i=n[e].filter(e=>e!==t);if(0===i.length){const{[e]:t,...i}=n;return i}return{...n,[e]:i}})},[]),l=(0,d.useCallback)(e=>{i(t=>{const{[e]:n,...i}=t;return i})},[]),c=(0,d.useCallback)(()=>{i({})},[]),u=(0,d.useCallback)((e,t)=>{i(n=>{const i=Array.isArray(n[e])?n[e]:[];return i.includes(t)?{...n,[e]:i.filter(e=>e!==t)}:{...n,[e]:[...i,t]}})},[]),h=(0,d.useCallback)((e,t)=>{i(n=>{if(null==t||""===t||!1===t){if(!(e in n))return n;const{[e]:t,...i}=n;return i}return{...n,[e]:t}})},[]),p={filters:n,normalizeArrayFilter:s,addFilter:r,updateFilterValue:o,removeFilterValue:a,removeFilterCategory:l,clearFilters:c,toggleFilter:u,setScalarFilter:h,replaceFilters:(0,d.useCallback)(e=>{i(e||{})},[])};return(0,Z.jsx)(ee.Provider,{value:p,children:e})},ne=()=>{const e=(0,d.useContext)(ee);if(!e)throw new Error("useFilters must be used within a FiltersProvider");return e}
1,ie={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},se=()=>Object.keys(ie).reduce((e,t)=>(e[t]=window.matchMedia(`(min-width: ${ie[t]}px)`),e),{});function re(){const[e,t]=(0,d.useState)(()=>{if("undefined"==typeof window)return{isSm:!1,isMd:!1,isLg:!1,isXl:!1,is2Xl:!1};const e=se(),t={};for(const n in e)t[`is${n.charAt(0).toUpperCase()+n.slice(1)}`]=e[n].matches;return t});return(0,d.useEffect)(()=>{if("undefined"==typeof window)return;const e=se(),n=()=>{const n={};for(const t in e)n[`is${t.charAt(0).toUpperCase()+t.slice(1)}`]=e[t].matches;t(n)};for(const t in e)e[t].addEventListener("change",n);return n(),()=>{for(const t in e)e[t].removeEventListener("change",n)}},[]),e}const oe=(0,d.createContext)(),ae="bordeauxMappingSelectionOpen",le="map_post_id",ce=({children:e,fullPage:t,displayFilters:n,defaultTab:i,activityMapMode:s="",displayCaption:r,defaultFilters:o={},postTypes:a=[],data:l={areas:[],markers:[]}})=>{const{updatePost:c,post:u}=Q(),{removeFilterCategory:h,replaceFilters:p,filters:m}=ne(),{isMd:f}=re(),[g,y]=(0,d.useState)([]),{areas:v,markers:x,lang:w}=l,b=x.length<=3&&!t,S=Boolean(m?.around_me||m?.city_code),[T,E]=(0,d.useState)({zoom:H.zoom}),[M,C]=(0,d.useState)(null),[P,_]=(0,d.useState)(null),[j,k]=(0,d.useState)([]),A=(0,d.useRef)(!1),L=(0,d.useRef)(null),N=(0,d.useRef)(!1),R=(0,d.useRef)(null),I=("addresses"===i||"vineyard"===i)&&["designation","territory","activity"].every(e=>a.includes(e)),V=Boolean(t&&n&&I),D=(0,d.useCallback)(e=>{k(t=>t.includes(e)?t:[...t,e])},[]),O=(0,d.useCallback)(e=>{try{return JSON.parse(JSON.stringify(e||{}))}catch(t){return{...e||{}}}},[]),F=(0,d.useCallback)((e=m)=>{const t=O(e);if(delete t.designation,delete t.territory,I){const e="addresses"===t.tab||"vineyard"===t.tab?t.tab:"addresses"===i?"addresses":"vineyard";t.tab=e,t.type="addresses"===e?a.includes("address")?["activity","address","activity-zone"]:["activity","activity-zone"]:["designation","territory"]}else Array.isArray(o?.type)&&o.type.length>0?t.type=[...o.type]:delete t.type;return t},[O,o,i,m,I,a]),B=(0,d.useCallback)(e=>{var t;const n=null!==(t=e?.post_id)&&void 0!==t?t:e?.id,i=Number(n);return Number.isFinite(i)?i:null},[]),z=(0,d.useCallback)(e=>{if("undefined"==typeof window)return"";const t=new URL(window.location.href);return t.searchParams.set(le,String(e)),t.href},[]),$=(0,d.useCallback)(()=>{if("undefined"==typeof window)return"";const e=new URL(window.location.href);return e.searchParams.delete(le),e.href},[]),W=(0,d.useCallback)(()=>{if("undefined"==typeof window)return;const e=window.history.state&&"object"==typeof window.history.state?window.history.state:{};window.history.replaceState({...e,[ae]:!1},"",$())},[$]),U=(0,d.useMemo)(()=>({address:["address","operation"],bordeaux_local:["address","operation"],wish:["activity","address"],search:["activity","address"],destination:["activity","address","activity-zone"],language:["activity"],audio_guide:["activity"],open_now:["activity"],handicap_auditif:["activity"],handicap_mental:["activity"],handicap_moteur:["activity"],handicap_visuel:["activity"],animals:["activity"],family:["activity"],grand_cru:["activity"],label:["activity"],color:["designation"],designation:["designation"],designation_mode:["designation","territory"]}),[]),G=(0,d.useMemo)(()=>new Set(["language","destination","audio_guide","open_now","handicap_auditif","handicap_mental","handicap_moteur","handicap_visuel","animals","family","grand_cru","label"]),[]),q=(0,d.useCallback)((e,t=m)=>{if(!Array.isArray(e)||0===e.length||!t)return e;const n=Object.entries(t).filter(([,e])=>Array.isArray(e)&&e.length>0);if(0===n.length)return e;const i=Number(t?.city_lat),s=Number(t?.city_lng),r=Number(t?.radius),o=(t?.around_me||t?.city_code)&&Number.isFinite(i)&&Number.isFinite(s)&&Number.isFinite(r)&&r>0;return e.filter(e=>{const t=Array.isArray(e.filterData)?e.filterData:[],a=String(e?.type||"");if(!n.every(([e,n])=>{const i=U[e];if(Array.isArray(i)&&i.length>0&&!i.includes(a))return!G.has(e);const s=t.filter(t=>t?.key===e);return 0!==s.length&&s.some(e=>{const t=e?.value;return(Array.isArray(t)?t:[t]).some(e=>n.includes(e))})}))return!1;if(!o||!["activity","address","operation"].includes(a))return!0;const l=Number(e?.lat),c=Number(e?.lng);return!(!Number.isFinite(l)||!Number.isFinite(c))&&((e,t,n,i)=>{const s=e=>e*Math.PI/180,r=s(n-e),o=s(i-t),a=Math.sin(r/2)*Math.sin(r/2)+Math.cos(s(e))*Math.cos(s(n))*Math.sin(o/2)*Math.sin(o/2);return 2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))*6371})(i,s,l,c)<=r})},[m,U,G]);(0,d.useEffect)(()=>{const e=q(x).filter(e=>e.cluster).map(e=>{const t=B(e);return{type:"Feature",properties:{id:null!=t?t:e.id,marker:e,cluster:e.cluster},geometry:{type:"Point",coordinates:[e.lng,e.lat]}}});y(e)},[x,m,q,B]);const Y=(e,t)=>
1{E(n=>({...n,[e]:t}))},X=(0,d.useCallback)((e,t,n)=>{C(t)},[]),K=(0,d.useCallback)((e,t,n)=>{C(null)},[]),J=(0,d.useCallback)(()=>{if(!t)return null;if(!P?.getContainer||"undefined"==typeof window)return null;const e=P.getContainer();if(!e)return null;const n=e.getBoundingClientRect();if(!n||n.width<=0||n.height<=0)return null;const i=e.closest(".block-mapping, .rss-content, .rss-footer, .mapping-unified-sheet-scope")||document.body,s=Array.from(i.querySelectorAll(".filters-section"));if(0===s.length)return null;const r={top:0,right:0,bottom:0,left:0};return s.forEach(e=>{const t=window.getComputedStyle(e);if("none"===t.display||"hidden"===t.visibility||Number.parseFloat(t.opacity||"1")<.05)return;const i=e.getBoundingClientRect();if(!i||i.width<=0||i.height<=0)return;const s=Math.max(n.left,i.left),o=Math.min(n.right,i.right),a=Math.max(n.top,i.top),l=o-s,c=Math.min(n.bottom,i.bottom)-a,d=n.left+n.width/2,u=n.top+n.height/2,h=i.left+i.width/2,p=i.top+i.height/2;if(f&&(e.classList.contains("mapping-unified-filters")||e.classList.contains("address-only-map-shortcuts"))&&l<.9*n.width&&l>0&&h<=d){const e=Math.max(0,s-n.left),t=Math.max(0,l-e);r.left=Math.max(r.left,t)}if(l<=0||c<=0)return;const m=l>=.5*n.width,g=c>=.35*n.height;m&&c>40&&(p<u?r.top=Math.max(r.top,c):r.bottom=Math.max(r.bottom,c)),g&&l>40&&(h<d?r.left=Math.max(r.left,l):r.right=Math.max(r.right,l))}),r},[t,f,P]),ee=(0,d.useCallback)(()=>{if(!t)return{top:0,right:0,bottom:0,left:0};const e=J(),n={top:0,right:0,bottom:0,left:f&&V?432:0};return e&&(e.top>0||e.right>0||e.bottom>0||e.left>0)?e:n},[t,V,f,J]),te=(0,d.useCallback)(e=>{if(!P)return!1;const t=P.getMap?P.getMap():P;if(!t||"function"!=typeof e)return!1;const n="function"!=typeof t.loaded||t.loaded(),i="function"!=typeof t.isStyleLoaded||t.isStyleLoaded();if(n&&i)return e(),!0;if("function"!=typeof t.once)return e(),!0;const s=()=>{t.off?.("idle",s),t.off?.("load",s),e()};return n?(t.once("idle",s),!1):(t.once("load",s),!1)},[P]),ie=(0,d.useCallback)(()=>{if(!t)return{top:0,right:0,bottom:0,left:0};const e=J()||{top:0,right:0,bottom:0,left:0};return f?{top:e.top,right:e.right,bottom:e.bottom,left:Math.max(e.left,532)}:{top:e.top,right:e.right,bottom:Math.max(e.bottom,200),left:e.left}},[t,f,J]),se=(0,d.useCallback)(e=>{if(!P?.setPadding)return;const t={top:Number(e?.top)||0,right:Number(e?.right)||0,bottom:Number(e?.bottom)||0,left:Number(e?.left)||0},n=P.getContainer?.();if(!n||"function"!=typeof P.getPadding||"function"!=typeof P.unproject||"function"!=typeof P.easeTo)return void P.setPadding(t);const i=n.getBoundingClientRect?.(),s=Number(i?.width)||Number(n.clientWidth)||0,r=Number(i?.height)||Number(n.clientHeight)||0;if(!(s>0&&r>0))return void P.setPadding(t);const o=P.getPadding(),a=e=>({x:(e.left+s-e.right)/2,y:(e.top+r-e.bottom)/2}),l=a({top:Number(o?.top)||0,right:Number(o?.right)||0,bottom:Number(o?.bottom)||0,left:Number(o?.left)||0}),c=a(t);P.setPadding(t);const d=[c.x+(c.x-l.x),c.y+(c.y-l.y)],u=P.unproject(d);u&&P.easeTo({center:[u.lng,u.lat],duration:0,essential:!0})},[P]),ce=(0,d.useCallback)(()=>{N.current=!1,R.current&&(clearTimeout(R.current),R.current=null),p(F(m)),c(null),W(),se(ee())},[m,ee,F,p,W,se,c]),de=(0,d.useCallback)(()=>{"undefined"!=typeof window&&window.history.state&&!0===window.history.state[ae]?window.history.back():ce()},[ce]);(0,d.useEffect)(()=>{if("undefined"==typeof window)return;const e=window.history.state&&"object"==typeof window.history.state?window.history.state:{};void 0===e[ae]&&window.history.replaceState({...e,[ae]:!1},"",window.location.href)},[]),(0,d.useEffect)(()=>{if("undefined"==typeof window||!u)return;const e=L.current||u;if(L.current=null,A.current)return void(A.current=!1);const t=window.history.state&&"object"==typeof window.history.state?window.history.state:{},n=z(e),i={...t,[ae]:!0};!0!==t[ae]?window.history.pushState(i,"",n):window.history.replaceState(i,"",n)},[z,u]),(0,d.useEffect)(()=>{if("undefined"==typeof window)return;const e=e=>{!1===(e?.state&&"object"==typeof e.state?e.state:{})[ae]&&u&&ce()};return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}},[ce,u]),(0,d.useEffect)(()=>
1{P?.setPadding&&(u||S||N.current||P.setPadding(ee()))},[P,u,S,ee]),(0,d.useEffect)(()=>{if(!P?.setPadding||!P?.getContainer)return;if(u)return;if("undefined"==typeof window)return;if(S)return;if(N.current)return;const e=P.getContainer();if(!e)return;const t=e.closest(".block-mapping, .rss-content, .rss-footer, .mapping-unified-sheet-scope")||document.body,n=Array.from(t.querySelectorAll(".filters-section"));let i=null;const s=()=>{N.current||(i&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>{N.current||P.setPadding(ee())}))};if("undefined"!=typeof ResizeObserver){const t=new ResizeObserver(s);return t.observe(e),n.forEach(e=>t.observe(e)),window.addEventListener("resize",s),()=>{t.disconnect(),window.removeEventListener("resize",s),i&&cancelAnimationFrame(i)}}return window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s),i&&cancelAnimationFrame(i)}},[P,u,S,ee]),(0,d.useEffect)(()=>{u&&(N.current=!1,R.current&&(clearTimeout(R.current),R.current=null))},[u]);const ue=(0,d.useCallback)(({lat:e,lng:t,radiusKm:n=null})=>{const i=Number(e),s=Number(t),r=Number(n);P&&Number.isFinite(i)&&Number.isFinite(s)&&te(()=>{if(c(null),P.setPadding?.({top:0,right:0,bottom:0,left:0}),P.resize?.(),Number.isFinite(r)&&r>0){const t=r/111.32,n=Math.cos(i*Math.PI/180),o=Math.abs(n)>1e-4?r/(111.32*Math.abs(n)):t,a=Number.isFinite(o)&&o>0?o:t,l=[[s-a,i-t],[s+a,i+t]];try{if(P.cameraForBounds){var e;const t=P.cameraForBounds(l,{maxZoom:11});return void P.easeTo({center:t?.center,zoom:null!==(e=t?.zoom)&&void 0!==e?e:11,duration:800,essential:!0})}return void P.fitBounds(l,{duration:800,essential:!0,maxZoom:11})}catch(e){}}P.flyTo({center:[s,i],zoom:10,duration:800,essential:!0})})},[P,te,c]),he=(0,d.useCallback)((e,t={})=>{if(console.log("mapItem",e),!P)return;const{lat:n,lng:i,post_id:s,id:r,zoomFocus:o,type:a}=e,l=null!=s?s:r;if(!l)return;!1===t.pushHistory&&(A.current=!0),L.current=l,N.current=!0,R.current&&clearTimeout(R.current),R.current=setTimeout(()=>{N.current=!1,R.current=null},500),c(a,l,e);const d=ie();if(P.setPadding(d),!Number.isFinite(Number(n))||!Number.isFinite(Number(i)))return;const u={center:[i,n],duration:800,essential:!0};Number.isFinite(Number(o))&&(u.zoom=Number(o)),P.flyTo(u)},[ie,P,c]),pe=(0,d.useRef)(!1),me=(0,d.useRef)(!1);(0,d.useEffect)(()=>{if(!t)return;if(pe.current)return;const e=new URLSearchParams(window.location.search).get("map_post_id");if(!e)return;const n=parseInt(e,10);if(!Number.isFinite(n)||n<=0)return;if(!P)return;if(!Array.isArray(v)||!Array.isArray(x))return;const i=v.find(e=>B(e)===n),s=x.find(e=>B(e)===n),r=i||s;r&&(he(r,{pushHistory:!1}),pe.current=!0)},[t,P,v,x,he,B]),(0,d.useEffect)(()=>{if(!Array.isArray(a)||!a.includes("operation"))return;if(me.current)return;if(!P)return;if(new URLSearchParams(window.location.search).get("map_post_id"))return;const e=q(x).filter(e=>{const t=Number(e?.lat),n=Number(e?.lng);return Number.isFinite(t)&&Number.isFinite(n)});if(e.length<2)return void(me.current=!0);let t=1/0,n=-1/0,i=1/0,s=-1/0;if(e.forEach(e=>{const r=Number(e.lat),o=Number(e.lng);r<t&&(t=r),r>n&&(n=r),o<i&&(i=o),o>s&&(s=o)}),![t,n,i,s].every(Number.isFinite))return;if(0===Math.abs(n-t)&&0===Math.abs(s-i))return void(me.current=!0);const r={top:14,right:14,bottom:14,left:14},o=()=>{try{P.fitBounds([[i,t],[s,n]],{padding:r,duration:0,maxZoom:14});const e=P.getZoom?.();Number.isFinite(e)&&P.setMinZoom?.(e),me.current=!0}catch(e){}};o(),me.current||(requestAnimationFrame(o),setTimeout(o,60))},[a,P,x,q,t]);const fe=(0,d.useCallback)(()=>{},[c,h,P]),ge=(0,d.useCallback)((e,t)=>{t&&(he(t),((e,t)=>{const n=((e,t)=>new CustomEvent(e,{detail:t}))(`bordeaux-mapping:${e}`,t);(e=>{window.dispatchEvent(e)})(n)})("post-click",{post:t}))},[he]),ye=e=>{E(t=>({...t,zoom:e.target.getZoom()}))},ve=e=>{const t=e?.target?.getCenter?.();E(e=>{var n,i,s,r;return{...e,centerLat:null!==(n=null!==(i=t?.lat)&&void 0!==i?i:e.centerLat)&&void 0!==n?n:null,centerLng:null!==(s=null!==(r=t?.lng)&&void 0!==r?r:e.centerLng)&&void 0!==s?s:null}})},xe=(0,d.useMemo)(()=>({mapping:T,setMapping:E,updateMapping:Y,onClick:ge,onMapClick:fe,mapRef:P,setMapRef:_,handleZoom:ye,handleMoveEnd:ve,onMouseEnter:X,onMouseLeave:K,handlePostClick:he,closeActiveSelection:de,focusOnLocationSearch:ue,hoveredAreaId:M,setHoveredAreaId:C,interactiveLayers:j,addInteractiveLayer:D,fullPage:t,activityMapMode:s,displayFilters:n,displayCaption:r,getBasePadding:ee,getFocusedPadding:ie,hasActiveLocationSearch:S,allAreas:v,allMarkers:x,areas:q(v),markers:q(x),points:g,filterPosts:q,isFocus:b,lang:w,postTypes:a}),[T,P,M,ge,X,K,fe,he,de,ue,ve,j,D,t,s,n,r,ee,ie,S,v,x,g,q,b,w,a]);return(0,Z.jsx)(oe.Provider,{value:xe,children:e})},de=()=>{const e=(0,d.useContext)(oe);if(!e)throw new Error("useMapping must be used within a MappingProvider");return e},ue=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array
vendor: 5,380 bytes, line 1
1];class he{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,n]=new Uint8Array(e,0,2);if(219!==t)throw new Error("Data does not appear to be in a KDBush format.");const i=n>>4;if(1!==i)throw new Error(`Got v${i} data when expected v1.`);const s=ue[15&n];if(!s)throw new Error("Unrecognized array type.");const[r]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new he(o,r,s,e)}constructor(e,t=64,n=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const s=ue.indexOf(this.ArrayType),r=2*e*this.ArrayType.BYTES_PER_ELEMENT,o=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-o%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${n}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+a,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+r+o+a),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+a,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+s]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=t,n}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return pe(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,n,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:r,nodeSize:o}=this,a=[0,s.length-1,0],l=[];for(;a.length;){const c=a.pop()||0,d=a.pop()||0,u=a.pop()||0;if(d-u<=o){for(let o=u;o<=d;o++){const a=r[2*o],c=r[2*o+1];a>=e&&a<=n&&c>=t&&c<=i&&l.push(s[o])}continue}const h=u+d>>1,p=r[2*h],m=r[2*h+1];p>=e&&p<=n&&m>=t&&m<=i&&l.push(s[h]),(0===c?e<=p:t<=m)&&(a.push(u),a.push(h-1),a.push(1-c)),(0===c?n>=p:i>=m)&&(a.push(h+1),a.push(d),a.push(1-c))}return l}within(e,t,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:s,nodeSize:r}=this,o=[0,i.length-1,0],a=[],l=n*n;for(;o.length;){const c=o.pop()||0,d=o.pop()||0,u=o.pop()||0;if(d-u<=r){for(let n=u;n<=d;n++)ye(s[2*n],s[2*n+1],e,t)<=l&&a.push(i[n]);continue}const h=u+d>>1,p=s[2*h],m=s[2*h+1];ye(p,m,e,t)<=l&&a.push(i[h]),(0===c?e-n<=p:t-n<=m)&&(o.push(u),o.push(h-1),o.push(1-c)),(0===c?e+n>=p:t+n>=m)&&(o.push(h+1),o.push(d),o.push(1-c))}return a}}function pe(e,t,n,i,s,r){if(s-i<=n)return;const o=i+s>>1;me(e,t,o,i,s,r),pe(e,t,n,i,o-1,1-r),pe(e,t,n,o+1,s,1-r)}function me(e,t,n,i,s,r){for(;s>i;){if(s-i>600){const o=s-i+1,a=n-i+1,l=Math.log(o),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(o-c)/o)*(a-o/2<0?-1:1);me(e,t,n,Math.max(i,Math.floor(n-a*c/o+d)),Math.min(s,Math.floor(n+(o-a)*c/o+d)),r)}const o=t[2*n+r];let a=i,l=s;for(fe(e,t,i,n),t[2*s+r]>o&&fe(e,t,i,s);a<l;){for(fe(e,t,a,l),a++,l--;t[2*a+r]<o;)a++;for(;t[2*l+r]>o;)l--}t[2*i+r]===o?fe(e,t,i,l):(l++,fe(e,t,l,s)),l<=n&&(i=l+1),n<=l&&(s=l-1)}}function fe(e,t,n,i){ge(e,n,i),ge(t,2*n,2*i),ge(t,2*n+1,2*i+1)}function ge(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function ye(e,t,n,i){const s=e-n,r=t-i;return s*s+r*r}const ve={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},xe=Math.fround||(we=new Float32Array(1),e=>(we[0]=+e,we[0]));var we;class be{constructor(e){this.options=Object.assign(Object.create(ve),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:n,maxZoom:i}=this.options;t&&console.time("total time");const s=`prepare ${e.length} points`;t&&console.time(s),this.points=e;const r=[];for(let t=0;t<e.length;t++){const n=e[t];if(!n.geometry)continue;const[i,s]=n.geometry.coordinates,o=xe(Ee(i)),a=xe(Me(s));r.push(o,a,1/0,t,-1,1),this.options.reduce&&r.push(0)}let o=this.trees[i+1]=this._createTree(r);t&&console.timeEnd(s);for(let e=i;e>=n;e--){const n=+Date.now();o=this.trees[e]=this._createTree(this._cluster(o,e)),t&&console.log("z%d: %d clusters in %dms",e,o.numItems,+Date.now()-n)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let n=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let s=180===e[2]?180:((e[2]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,s=180;else if(n>s){const e=this.getClusters([n,i,180,r],t),o=this.getClusters([-180,i,s,r],t);return e.concat(o)}const o=this.trees[this._limitZoom(t)],a=o.range(Ee(n),Me(r),Ee(s),Me(i)),l=o.data,c=[];for(const e of a){const t=this.stride*e;c.push(l[t+5]>1?Se(l,t,this.clusterProps):this.points[l[t+3]])}return c}getChildren(e){const t=this._getOriginId(e),n=this._getOriginZoom(e),i="No cluster with the specified id.",s=this.trees[n];if(!s)throw new Error(i);const r=s.data;if(t*this.stride>=r.length)throw new Error(i);const o=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=r[t*this.stride],l=r[t*this.stride+1],c=s.within(a,l,o),d=[];for(const t of c){const n=t*this.stride;r[n+4]===e&&d.push(r[n+5]>1?Se(r,n,this.clusterProps):this.points[r[n+3]])}if(0===d.length)throw new Error(i);return d}
1getLeaves(e,t,n){t=t||10,n=n||0;const i=[];return this._appendLeaves(i,e,t,n,0),i}getTile(e,t,n){const i=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:r,radius:o}=this.options,a=o/r,l=(n-a)/s,c=(n+1+a)/s,d={features:[]};return this._addTileFeatures(i.range((t-a)/s,l,(t+1+a)/s,c),i.data,t,n,s,d),0===t&&this._addTileFeatures(i.range(1-a/s,l,1,c),i.data,s,n,s,d),t===s-1&&this._addTileFeatures(i.range(0,l,a/s,c),i.data,-1,n,s,d),d.features.length?d:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,i,s){const r=this.getChildren(t);for(const t of r){const r=t.properties;if(r&&r.cluster?s+r.point_count<=i?s+=r.point_count:s=this._appendLeaves(e,r.cluster_id,n,i,s):s<i?s++:e.push(t),e.length===n)break}return s}_createTree(e){const t=new he(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let n=0;n<e.length;n+=this.stride)t.add(e[n],e[n+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,n,i,s,r){for(const o of e){const e=o*this.stride,a=t[e+5]>1;let l,c,d;if(a)l=Te(t,e,this.clusterProps),c=t[e],d=t[e+1];else{const n=this.points[t[e+3]];l=n.properties;const[i,s]=n.geometry.coordinates;c=Ee(i),d=Me(s)}const u={type:1,geometry:[[Math.round(this.options.extent*(c*s-n)),Math.round(this.options.extent*(d*s-i))]],tags:l};let h;h=a||this.options.generateId?t[e+3]:this.points[t[e+3]].id,void 0!==h&&(u.id=h),r.features.push(u)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:n,extent:i,reduce:s,minPoints:r}=this.options,o=n/(i*Math.pow(2,t)),a=e.data,l=[],c=this.stride;for(let n=0;n<a.length;n+=c){if(a[n+2]<=t)continue;a[n+2]=t;const i=a[n],d=a[n+1],u=e.within(a[n],a[n+1],o),h=a[n+5];let p=h;for(const e of u){const n=e*c;a[n+2]>t&&(p+=a[n+5])}if(p>h&&p>=r){let e,r=i*h,o=d*h,m=-1;const f=(n/c<<5)+(t+1)+this.points.length;for(const i of u){const l=i*c;if(a[l+2]<=t)continue;a[l+2]=t;const d=a[l+5];r+=a[l]*d,o+=a[l+1]*d,a[l+4]=f,s&&(e||(e=this._map(a,n,!0),m=this.clusterProps.length,this.clusterProps.push(e)),s(e,this._map(a,l)))}a[n+4]=f,l.push(r/p,o/p,1/0,f,-1,p),s&&l.push(m)}else{for(let e=0;e<c;e++)l.push(a[n+e]);if(p>1)for(const e of u){const n=e*c;if(!(a[n+2]<=t)){a[n+2]=t;for(let e=0;e<c;e++)l.push(a[n+e])}}}}return l}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,n){if(e[t+5]>1){const i=this.clusterProps[e[t+6]];return n?Object.assign({},i):i}const i=this.points[e[t+3]].properties,s=this.options.map(i);return n&&s===i?Object.assign({},s):s}}function Se(e,t,n){return{type:"Feature",id:e[t+3],properties:Te(e,t,n),geometry:{type:"Point",coordinates:[(i=e[t],360*(i-.5)),Ce(e[t+1])]}};var i}function Te(e,t,n){const i=e[t+5],s=i>=1e4?`${Math.round(i/1e3)}k`:i>=1e3?Math.round(i/100)/10+"k":i,r=e[t+6],o=-1===r?{}:Object.assign({},n[r]);return Object.assign(o,{cluster:!0,cluster_id:e[t+3],point_count:i,point_count_abbreviated:s})}function Ee(e){return e/360+.5}function Me(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Ce(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}var Pe=Object.prototype.hasOwnProperty;function _e(e,t,n){for(n of e.keys())if(je(n,t))return n}function je(e,t){var n,i,s;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((i=e.length)===t.length)for(;i--&&je(e[i],t[i]););return-1===i}if(n===Set){if(e.size!==t.size)return!1;for(i of e){if((s=i)&&"object"==typeof s&&!(s=_e(t,s)))return!1;if(!t.has(s))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(i of e){if((s=i[0])&&"object"==typeof s&&!(s=_e(t,s)))return!1;if(!je(i[1],t.get(s)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((i=e.byteLength)===t.byteLength)for(;i--&&e.getInt8(i)===t.getInt8(i););return-1===i}if(ArrayBuffer.isView(e)){if((i=e.byteLength)===t.byteLength)for(;i--&&e[i]===t[i];);return-1===i}if(!n||"object"==typeof e){for(n in i=0,e){if(Pe.call(e,n)&&++i&&!Pe.call(t,n))return!1;if(!(n in t)||!je(e[n],t[n]))return!1}return Object.keys(t).length===i}}return e!=e&&t!=t}const ke=function(e){var t,n,i,s,r,o=e.points,a=e.bounds,l=e.zoom,c=e.options,u=e.disableRefresh,h=(0,d.useRef)(),p=(0,d.useRef)(),m=(0,d.useState)([]),f=m[0],g=m[1],y=Math.round(l);return t=function(){!0!==u&&(h.current&&je(p.current,o)&&je(h.current.options,c)||(h.current=ne
1w be(c),h.current.load(o)),a&&g(h.current.getClusters(a,y)),p.current=o)},n=[o,a,y,c,u],d.useEffect(t,(i=n,s=d.useRef(i),r=d.useRef(0),je(i,s.current)||(s.current=i,r.current+=1),d.useMemo(function(){return s.current},[r.current]))),{clusters:f,supercluster:h.current}},Ae=function(e){const[t,n]=(0,d.useState)(null);return(0,d.useEffect)(()=>{(async()=>{const t=await(async e=>{const t=await fetch(`${W}/app/themes/bordeaux/src/geojson/${e}`);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return await t.json()})(e);n(null!=t?t:null)})()},[e]),t},Le=function(e){var t,n,i,s,r;return(0,Z.jsx)(V,{id:e.id,longitude:null!==(t=e.lng)&&void 0!==t?t:0,latitude:null!==(n=e.lat)&&void 0!==n?n:0,anchor:"center",children:(0,Z.jsxs)("div",{onClick:t=>e.onClick(t),onMouseEnter:t=>e.onMouseEnter(t),onMouseLeave:t=>e.onMouseLeave(t),className:"text-stroke white",style:{fontSize:(null!==(i=e?.fontSize)&&void 0!==i?i:12)+"px",fontWeight:500,textAlign:"left",fontFamily:"Syne",cursor:"pointer",maxWidth:"200px"},children:[(0,Z.jsx)("span",{style:{textTransform:""},children:null!==(s=e.text)&&void 0!==s?s:""}),(0,Z.jsx)("div",{style:{fontSize:"14px",fontWeight:400,marginTop:"-0.2em",lineHeight:"1em"},children:null!==(r=e.captionText)&&void 0!==r?r:""})]})})},Ne=(e,t)=>{const{mapRef:n,handlePostClick:i,setHoveredAreaId:s}=de(),{addFilter:r}=ne();return{area:e,onClick:()=>{"territory"===e.type&&(i(e),279!==e.post_id&&6339!==e.post_id&&r("territory",e.post_id))},onMouseEnter:()=>{s(e.id)},onMouseLeave:()=>{s(null)}}},Re=function({areas:e,veynardIsHighlighted:t}){return(0,Z.jsx)(Z.Fragment,{children:e.map(n=>(0,Z.jsx)(Ie,{area:n,isHighlight:1===e.length,veynardIsHighlighted:t},n.id))})},Ie=({area:e,veynardIsHighlighted:t,isHighlight:n})=>{var i,s,r;const{mapping:o,hoveredAreaId:a,addInteractiveLayer:l,fullPage:c,displayCaption:u,isFocus:h}=de(),{filters:m}=ne(),{post:f}=Q(),g=p(),{isMd:y}=re();console.log("area",e);const{onClick:v,onMouseEnter:x,onMouseLeave:w}=Ne(e),b=Ae(e.geojson),S=Number(f)===Number(e?.post_id),T=a===e?.post_id||n||S,E=Array.isArray(m?.color)?m.color:[],M=Array.isArray(m?.territory)?m.territory:[],C=E.length>0,P="territory"===e?.type,_="designation"===e?.type,j=M.includes(e?.post_id);let k=T?.8:null!==(i=e.opacity)&&void 0!==i?i:.5,A=T?e.highlightColor:e.backgroundColor,L="#000",N=1,R=[2,4];C&&P&&(A=e.backgroundColor,k=T?.34:j?.24:.14,L="#6B7280",N=j?1.25:1,R=[2,5]),C&&_&&(A=e.highlightColor||e.backgroundColor,k=T?.75:.42,L="#111827",N=T?1.5:1.1,R=[2,4]);const I=null!==(s=g?.current?.getZoom?.())&&void 0!==s?s:0,V=S||h||I>=e.zoomIn&&I<=e.zoomOut;return t&&(A="#da736c"),(0,d.useEffect)(()=>
1{l("area-fill-"+e.id),l("text-area-"+e.id)},[e.id,l]),V&&(0,Z.jsxs)(Z.Fragment,{children:[b&&(0,Z.jsxs)(B,{id:`area-${e.id}`,type:"geojson",data:b,children:[(0,Z.jsx)($,{id:`area-fill-${e.id}`,type:"fill",paint:{"fill-color":A,"fill-opacity":k}}),(0,Z.jsx)($,{id:`area-line-${e.id}`,type:"line",paint:{"line-color":L,"line-width":N,"line-dasharray":R}})]}),e.text&&(0,Z.jsx)(Z.Fragment,{children:e.displayTitle&&(0,Z.jsx)(Le,{id:`text-area-${e?.id}`,onClick:v,onMouseEnter:x,onMouseLeave:w,lng:e.lng,lat:e.lat,text:e.text,captionText:null!==(r=e.captionText)&&void 0!==r?r:"",fontSize:"18"})})]})},Ve=new Map;function De(e){return String(e||"").replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,"")}function Oe({iconName:e,iconInstanceId:t}){const n=function(e,t){if(!e)return"";const n=bordeauxMapping?.activityIconRegistry||{},i=n?.[e]||null,s="svg"===i?.type&&"string"==typeof i?.value?i.value.trim():"";if(!s)return"";const r=`${e}:${t}`;if(Ve.has(r))return Ve.get(r);const o=s.replace(/stroke=(['"])black\1/g,"stroke=$1currentColor$1").replace(/fill=(['"])black\1/g,"fill=$1currentColor$1").replace(/currentColor/g,"white"),a=De(`${e}-${t||"pin"}`),l=new Map;let c=o.replace(/\sid=(['"])([^'"]+)\1/g,(e,t,n)=>{const i=`${a}-${De(n)}`;return l.set(n,i),` id=${t}${i}${t}`});return l.forEach((e,t)=>{const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");c=c.replace(new RegExp(`url\\(#${n}\\)`,"g"),`url(#${e})`).replace(new RegExp(`(['"])#${n}\\1`,"g"),`$1#${e}$1`)}),Ve.set(r,c),c}(e,t),i=bordeauxMapping?.activityIconRegistry||{},s=i?.[e]||null,r=n||"url"!==s?.type?"":s.value;return(n||r)&&(0,Z.jsx)("div",{className:"pin-icon",style:{color:"white"},children:n?(0,Z.jsx)("span",{className:"pin-icon-svg",dangerouslySetInnerHTML:{__html:n}}):(0,Z.jsx)("img",{src:r,alt:e})})}const Fe=function({id:e,lng:t,lat:n,text:i,fontSize:s,onClick:r,onMouseEnter:o,onMouseLeave:a,iconName:l,color:c,secondaryColors:d=[],showText:u=!0}){return(0,Z.jsx)(V,{id:e,longitude:t,latitude:n,anchor:"bottom-left",children:(0,Z.jsxs)("div",{className:"pin-text",id:e,style:{fontSize:s,cursor:"pointer",userSelect:"none"},onClick:r,onMouseEnter:o,onMouseLeave:a,children:[(0,Z.jsxs)("div",{className:"pin",children:[(0,Z.jsx)("div",{className:"pin-icon-background"}),l&&(0,Z.jsx)("div",{className:"pin-icon-wrapper",style:{backgroundColor:c},children:(0,Z.jsx)(Oe,{iconName:l,iconInstanceId:e})}),d.length>0&&(0,Z.jsx)("div",{className:"pin-wish-badge","aria-hidden":"true",children:d.map((t,n)=>(0,Z.jsx)("span",{className:"pin-wish-badge__dot",style:{backgroundColor:t}},`${e}-wish-${n}`))})]}),u&&(0,Z.jsx)("span",{className:"text-stroke",style:{"--color":"white",color:c},dangerouslySetInnerHTML:{__html:i}})]})})},Be="wish-colors",ze={dormir:"var(--mapping-wish-color-dormir)",manger:"var(--mapping-wish-color-manger)",saventurer:"var(--mapping-wish-color-saventurer)",deguster:"var(--mapping-wish-color-deguster)",visiter:"var(--mapping-wish-color-visiter)"},$e=()=>({...ze,...window.bordeauxMapping?.addressTabFilterSpec?.wish_colors||{}}),He=()=>{const e=Array.isArray(window.bordeauxMapping?.addressTabFilterSpec?.wish_choices)?window.bordeauxMapping.addressTabFilterSpec.wish_choices.map(e=>String(e?.value||"").trim()).filter(Boolean):[];return Array.from(new Set([...e,...Object.keys(ze)]))},We=function({markers:e}){const{activityMapMode:t}=de(),{filters:n}=ne(),i=Array.isArray(n?.wish)?String(n.wish[0]||"").trim():"",s=(0,d.useMemo)(()=>$e(),[]),r=(0,d.useMemo)(()=>He(),[]),o=(0,d.useMemo)(()=>r.reduce((e,t,n)=>(e[t]=n,e),{}),[r]);return(0,Z.jsx)("div",{children:e.map(e=>(0,Z.jsx)(Ue,{marker:e,activityMapMode:t,selectedWish:i,wishColorMap:s,wishRankMap:o},e.id))})},Ue=({marker:e,activityMapMode:t,selectedWish:n,wishColorMap:i,wishRankMap:s})=>{var r,o;const a=p(),{activityMapMode:l}=de(),{filters:c}=ne(),{onClick:u,onMouseEnter:h,onMouseLeave:m}=(e=>{const{setHoveredAreaId:t,handlePostClick:n}=de(),{addFilter:i,removeFilterCategory:s,removeFilter:r}=ne();return{marker:e,onClick:()=>{"designation"===e.type&&(n(e),s("territory"),s("designation"),s("type"),i("designation",e?.post_id),i("type","designation"),s("territory")),"address"!==e.type&&"operation"!==e.type&&"activity"!==e.type||(n(e),console.log("Address marker clicked:",e))},onMouseEnter:()=>{"designation"===e.type&&t(e.post_id)},onMouseLeave:()=>{"designation"===e.type&&t(null)}}})(e),{addInteractiveLayer:f,isFocus:g}=de(),y=Array.isArray(c?.wish)?String(c.wish[0]||"").trim():"",v=(0,d.useMemo)(()=>$e(),[]),x=(0,d.useMemo)(()=>He(),[]),w=(0,d.useMemo)(()=>
1x.reduce((e,t,n)=>(e[t]=n,e),{}),[x]),b="string"==typeof t&&""!==t?t:l,S="string"==typeof n?n:y,T=i||v,E=s||w,M=g||a?.current?.getZoom()>=e.zoomIn,C=(({marker:e,activityMapMode:t,selectedWish:n,wishColorMap:i,wishRankMap:s})=>{if(t!==Be||"activity"!==e?.type)return null;const r=(o=e?.wishValues,Array.from(new Set((Array.isArray(o)?o:[]).map(e=>String(e||"").trim()).filter(Boolean))));var o;const a=String(e?.primaryWish||"").trim()||r[0]||"";if(""===a&&0===r.length)return null;const l=n||a,c=i[l]||"";return""===c?null:{color:c,secondaryColors:r.filter(e=>e!==l&&i[e]).sort((e,t)=>{var n,i;return(null!==(n=s[e])&&void 0!==n?n:Number.MAX_SAFE_INTEGER)-(null!==(i=s[t])&&void 0!==i?i:Number.MAX_SAFE_INTEGER)}).map(e=>i[e])}})({marker:e,activityMapMode:b,selectedWish:S,wishColorMap:T,wishRankMap:E}),P=C?.color||e.iconColor||"#000",_=C?.secondaryColors||[];return(0,d.useEffect)(()=>{f(`pin-marker-${e.id}`)},[e.id,e,M,f]),M&&(0,Z.jsx)(Fe,{id:`pin-marker-${e.id}`,lng:null!==(r=e.lng)&&void 0!==r?r:0,lat:null!==(o=e.lat)&&void 0!==o?o:0,text:e.text||"",fontSize:14,color:P,iconName:e.iconName||"",secondaryColors:_,onClick:u,onMouseEnter:h,onMouseLeave:m,showText:g||a?.current?.getZoom()>=e.showTextZoom})},Ge=function({id:e,cluster:t,supercluster:n}){const{mapRef:i,addInteractiveLayer:s}=de(),{geometry:r,properties:o}=t,[a,l]=r.coordinates,c=o.point_count;return(0,d.useEffect)(()=>{s(`cluster-marker-${e}`)},[e,s]),(0,Z.jsx)(V,{id:e,longitude:a,latitude:l,children:(0,Z.jsx)("div",{className:"cluster-marker",onClick:()=>{const e=Math.min(n.getClusterExpansionZoom(o.cluster_id),20);i.flyTo({center:[a,l],zoom:e,duration:500})},children:c>99?"99+":c})})},qe=function(e){const{mapRef:t}=de(),{areas:n,points:i,markers:s}=de(),{clusters:r,supercluster:o}=ke({points:null!=i?i:[],bounds:t?t.getBounds().toArray().flat():null,zoom:t?Math.floor(t.getZoom()):0,options:{radius:75,maxZoom:14}});return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Re,{areas:n,veynardIsHighlighted:e.veynardIsHighlighted}),(0,Z.jsx)(We,{markers:s.filter(e=>!e.cluster)}),r.map(e=>e.properties.cluster&&e.properties.point_count>1?(0,Z.jsx)(Ge,{id:e.id,cluster:e,supercluster:o},`cluster-${e.id}`):(0,Z.jsx)(Ue,{marker:e.properties.marker},`marker-${e.properties.id}`))]})},Ze=function(e){var t,n,i,s;const{onMapClick:r,handleZoom:o,handleMoveEnd:a,setMapRef:l,interactiveLayers:d,lang:u}=de(),h=(0,c.useRef)(!1),p=(0,c.useRef)(null),m={...H};null!==e.initialZoom&&(m.zoom=e.initialZoom),null!==e.initialCenterLat&&null!==e.initialCenterLng&&(m.latitude=e.initialCenterLat,m.longitude=e.initialCenterLng);const f=e.fullPage?void 0:{top:0,bottom:0,left:0,right:50},g="operation"===e.postType||Array.isArray(e.postTypes)&&e.postTypes.includes("operation")?Number.isFinite(e.initialZoom)?e.initialZoom:0:6,y=e=>"string"==typeof e&&/^name(?::|_|$)/.test(e),v=(e,t)=>{const n=((e,t)=>{const n=[...{fr:["name:fr","name_fr","name"],en:["name_en","name:en","name"],ja:["name:ja","name_ja","name"]}[e]||[],t,"name","name_en","name:en","name_int"];return Array.from(new Set(n.filter(Boolean)))})(e,t);return["coalesce",...n.map(e=>["get",e])]},x=(e,t)=>{if(!t)return e;if(e&&"object"==typeof e&&Array.isArray(e.stops))return e;if(Array.isArray(e))return"get"===e[0]&&y(e[1])?v(t,e[1]):e.map(e=>x(e,t));if(e&&"object"==typeof e){let n=!1;const i={};return Object.entries(e).forEach(([e,s])=>{const r=x(s,t);r!==s&&(n=!0),i[e]=r}),n?i:e}return"string"==typeof e?((e,t)=>{if("string"!=typeof e||!e.startsWith("{")||!e.endsWith("}"))return e;const n=e.slice(1,-1);return y(n)?v(t,n):e})(e,t):e},w=e=>{const t=(u||"").toLowerCase(),n=t.startsWith("fr")?"fr":t.startsWith("ja")||t.startsWith("jp")?"ja":t.startsWith("en")?"en":null;if(!n)return h.current=!1,void(p.current=null);if(!e?.getStyle||!e?.setLayoutProperty)return;if(h.current&&p.current===n)return;const i=e.getStyle();(i?.layers||[]).forEach(t=>{if("symbol"!==t?.type)return;const i=t?.layout?.["text-field"];if(void 0===i)return;const s=x(i,n);if(JSON.stringify(s)!==JSON.stringify(i))try{e.setLayoutProperty(t.id,"text-field",s)}catch(e){}}),h.current=!0,p.current=n};return(0,Z.jsx)("div",{className:"map",style:{width:e.width,height:e.height},children:(0,Z.jsxs)(k,{initialViewState:m,style:{width:e.width,height:e.height},mapStyle:"https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",onClick:e=>{const{features:t}=e;0===t.length&&r()},onZoom:o,onMoveEnd:a,onLoad:e=>{w(e?.target)},onStyleData:e=>{w(e?.target)},ref:l,interactiveLayerIds:d,interactive:e.interactive,minZoom:g,padding:f,children:[(0,Z.jsx)(qe,{veynardIsHighlighted:e.veynardIsHighlighted,postId:null!==(t=e.postId)&&void 0!==t?t:null,postType:null!==(n=e.postType)&&void 0!==n?n:null,postTypes:null!==(i=e.postTypes)&&void 0!==i?i:[],fullPage:null!==(s=e.fullPage)&&void 0!==s&&s}),e.children]})})},Ye=function({post:e}){return e?(0,Z.jsx)("a",{href:e?.link,target:"_blank",rel:"noreferrer",children:e?.title?.rendered}):"..."},Xe=function({taxonomy:e}){return(0,Z.jsx)("div",{className:"flex gap-2 items-center justify-end",children:null===e?"...":(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{className:`chip chip-color ${e?e.slug:""}`}),(0,Z.jsx)("div",{children:e?e.name:""})]})})},Ke=e=>e.replace(/{(.*?)}/g,'<span class="has-custom-font font-edo">$1</span>'),Je=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qe=(()=>new Set(Je))(),et=e=>180*e/Math.PI,tt=e=>{const t=et(Math.atan2(e[1],e[0]));return it(t)},nt={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:tt,rotateZ:tt,skewX:e=>et(Math.atan(e[1])),skewY:e=>et(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},it=e=>((e%=360)<0&&(e+=360),e),st=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),rt=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ot={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:st,scaleY:rt,scale:e=>(st(e)+rt(e))/2,rotateX:e=>it(et(Math.atan2(e[6],e[5]))),rotateY:e=>it(et(Math.atan2(-e[2],e[0]))),rotateZ:tt,rotate:tt,skewX:e=>et(Math.atan(e[4])),skewY:e=>et(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function at(e){return e.includes("scale")?1:0}function lt(e,t){if(!e||"none"===e)return at(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=ot,s=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=nt,s=t}if(!s)return at(t);const r=i[t],o=s[1].split(",").map(ct);return"function"==typeof r?r(o):o[r]}function ct(e){return parseFloat(e.trim())}const dt=e=>t=>"string"==typeof t&&t.startsWith(e),ut=dt("--"),ht=dt("var(--"),pt=e=>!!ht(e)&&mt.test(e.split("/*")[0].trim()),mt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ft({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}const gt=(e,t,n)=>e+(t-e)*n;function yt(e){return void 0===e||1===e}function vt({scale:e,scaleX:t,scaleY:n}){return!yt(e)||!yt(t)||!yt(n)}function xt(e){return vt(e)||wt(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function wt(e){return bt(e.x)||bt(e.y)}function bt(e){return e&&"0%"!==e}function St(e,t,n){return n+t*(e-n)}function Tt(e,t,n,i,s){return void 0!==s&&(e=St(e,s,i)),St(e,n,i)+t}function Et(e,t=0,n=1,i,s){e.min=Tt(e.min,t,n,i,s),e.max=Tt(e.max,t,n,i,s)}function Mt(e,{x:t,y:n}){Et(e.x,t.translate,t.scale,t.originPoint),Et(e.y,n.translate,n.scale,n.originPoint)}const Ct=.999999999999,Pt=1.0000000000001;function _t(e,t){e.min=e.min+t,e.max=e.max+t}function jt(e,t,n,i,s=.5){Et(e,t,n,gt(e.min,e.max,s),i)}function kt(e,t){jt(e.x,t.x,t.scaleX,t.scale,t.originX),jt(e.y,t.y,t.scaleY,t.scale,t.originY)}function At(e,t){return ft(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(e.getBoundingClientRect(),t))}const Lt=new Set(["width","height","top","left","right","bottom",...Je]),Nt=(e,t,n
1)=>n>t?t:n<e?e:n,Rt={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},It={...Rt,transform:e=>Nt(0,1,e)},Vt={...Rt,default:1},Dt=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Ot=Dt("deg"),Ft=Dt("%"),Bt=Dt("px"),zt=Dt("vh"),$t=Dt("vw"),Ht=(()=>({...Ft,parse:e=>Ft.parse(e)/100,transform:e=>Ft.transform(100*e)}))(),Wt=e=>t=>t.test(e),Ut=[Rt,Bt,Ft,Ot,$t,zt,{test:e=>"auto"===e,parse:e=>e}],Gt=e=>Ut.find(Wt(e));let qt=()=>{};const Zt=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Yt=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Xt(e,t,n=1){const[i,s]=function(e){const t=Yt.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}(e);if(!i)return;const r=window.getComputedStyle(t).getPropertyValue(i);if(r){const e=r.trim();return Zt(e)?parseFloat(e):e}return pt(s)?Xt(s,t,n+1):s}const Kt=e=>e===Rt||e===Bt,Jt=new Set(["x","y","z"]),Qt=Je.filter(e=>!Jt.has(e)),en={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>lt(t,"x"),y:(e,{transform:t})=>lt(t,"y")};en.translateX=en.x,en.translateY=en.y;const tn=e=>e,nn={},sn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],rn={value:null,addProjectionMetrics:null};function on(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=sn.reduce((e,n)=>(e[n]=function(e,t){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(t){o.has(t)&&(d.schedule(t),e()),l++,t(a)}const d={schedule:(e,t=!1,r=!1)=>{const a=r&&s?n:i;return t&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{i.delete(e),o.delete(e)},process:e=>
1{a=e,s?r=!0:(s=!0,[n,i]=[i,n],n.forEach(c),t&&rn.value&&rn.value.frameloop[t].push(l),l=0,n.clear(),s=!1,r&&(r=!1,d.process(e)))}};return d}(r,t?n:void 0),e),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:p,postRender:m}=o,f=()=>{const r=nn.useManualTiming?s.timestamp:performance.now();n=!1,nn.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(r-s.timestamp,40),1)),s.timestamp=r,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),d.process(s),u.process(s),h.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(f))};return{schedule:sn.reduce((t,r)=>{const a=o[r];return t[r]=(t,r=!1,o=!1)=>(n||(n=!0,i=!0,s.isProcessing||e(f)),a.schedule(t,r,o)),t},{}),cancel:e=>{for(let t=0;t<sn.length;t++)o[sn[t]].cancel(e)},state:s,steps:o}}const{schedule:an,cancel:ln,state:cn,steps:dn}=on("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:tn,!0),un=new Set;let hn=!1,pn=!1,mn=!1;function fn(){if(pn){const e=Array.from(un).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return Qt.forEach(n=>{const i=e.getValue(n);void 0!==i&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}pn=!1,hn=!1,un.forEach(e=>e.complete(mn)),un.clear()}function gn(){un.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(pn=!0)})}class yn{constructor(e,t,n,i,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=i,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(un.add(this),hn||(hn=!0,an.read(gn),an.resolveKeyframes(fn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:i}=this;if(null===e[0]){const s=i?.get(),r=e[e.length-1];if(void 0!==s)e[0]=s;else if(n&&t){const i=n.readValue(t,r);null!=i&&(e[0]=i)}void 0===e[0]&&(e[0]=r),i&&void 0===s&&i.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),un.delete(this)}cancel(){"scheduled"===this.state&&(un.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const vn=e=>/^0[^.\s]+$/u.test(e);function xn(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||vn(e)}const wn=e=>Math.round(1e5*e)/1e5,bn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Sn=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Tn=(e,t)=>n=>Boolean("string"==typeof n&&Sn.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),En=(e,t,n)=>i=>{if("string"!=typeof i)return i;const[s,r,o,a]=i.match(bn);return{[e]:parseFloat(s),[t]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Mn={...Rt,transform:e=>Math.round((e=>Nt(0,255,e))(e))},Cn={test:Tn("rgb","red"),parse:En("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+Mn.transform(e)+", "+Mn.transform(t)+", "+Mn.transform(n)+", "+wn(It.transform(i))+")"},Pn={test:Tn("#"),parse:function(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:Cn.transform},jn={test:Tn("hsl","hue"),parse:En("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+Ft.transform(wn(t))+", "+Ft.transform(wn(n))+", "+wn(It.transform(i))+")"},kn={test:e=>Cn.test(e)||Pn.test(e)||jn.test(e),parse:e=>Cn.test(e)?Cn.parse(e):jn.test(e)?jn.parse(e):Pn.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Cn.transform(e):jn.transform(e),getAnimatableNone:e=>{const t=kn.parse(e);return t.alpha=0,kn.transform(t)}},An=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Ln="number",Nn="color",Rn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function In(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const o=t.replace(Rn,e=>(kn.test(e)?(i.color.push(r),s.push(Nn),n.push(kn.parse(e))):e.startsWith("var(")?(i.var.push(r),s.push("var"),n.push(e)):(i.number.push(r),s.push(Ln),n.push(parseFloat(e))),++r,"${}")).split("${}");return{values:n,split:o,indexes:i,types:s}}function Vn(e){return In(e).values}function Dn(e){const{split:t,types:n}=In(e),i=t.length;return e=>{let s="";for(let r=0;r<i;r++)if(s+=t[r],void 0!==e[r]){const t=n[r];s+=t===Ln?wn(e[r]):t===Nn?kn.transform(e[r]):e[r]}return s}}
1const On=e=>"number"==typeof e?0:kn.test(e)?kn.getAnimatableNone(e):e,Fn={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(bn)?.length||0)+(e.match(An)?.length||0)>0},parse:Vn,createTransformer:Dn,getAnimatableNone:function(e){const t=Vn(e);return Dn(e)(t.map(On))}},Bn=new Set(["brightness","contrast","saturate","opacity"]);function zn(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[i]=n.match(bn)||[];if(!i)return e;const s=n.replace(i,"");let r=Bn.has(t)?1:0;return i!==n&&(r*=100),t+"("+r+s+")"}const $n=/\b([a-z-]*)\(.*?\)/gu,Hn={...Fn,getAnimatableNone:e=>{const t=e.match($n);return t?t.map(zn).join(" "):e}},Wn={...Rt,transform:Math.round},Un={borderWidth:Bt,borderTopWidth:Bt,borderRightWidth:Bt,borderBottomWidth:Bt,borderLeftWidth:Bt,borderRadius:Bt,radius:Bt,borderTopLeftRadius:Bt,borderTopRightRadius:Bt,borderBottomRightRadius:Bt,borderBottomLeftRadius:Bt,width:Bt,maxWidth:Bt,height:Bt,maxHeight:Bt,top:Bt,right:Bt,bottom:Bt,left:Bt,padding:Bt,paddingTop:Bt,paddingRight:Bt,paddingBottom:Bt,paddingLeft:Bt,margin:Bt,marginTop:Bt,marginRight:Bt,marginBottom:Bt,marginLeft:Bt,backgroundPositionX:Bt,backgroundPositionY:Bt,rotate:Ot,rotateX:Ot,rotateY:Ot,rotateZ:Ot,scale:Vt,scaleX:Vt,scaleY:Vt,scaleZ:Vt,skew:Ot,skewX:Ot,skewY:Ot,distance:Bt,translateX:Bt,translateY:Bt,translateZ:Bt,x:Bt,y:Bt,z:Bt,perspective:Bt,transformPerspective:Bt,opacity:It,originX:Ht,originY:Ht,originZ:Bt,zIndex:Wn,fillOpacity:It,strokeOpacity:It,numOctaves:Wn},Gn={...Un,color:kn,backgroundColor:kn,outlineColor:kn,fill:kn,stroke:kn,borderColor:kn,borderTopColor:kn,borderRightColor:kn,borderBottomColor:kn,borderLeftColor:kn,filter:Hn,WebkitFilter:Hn},qn=e=>Gn[e];function Zn(e,t){let n=qn(e);return n!==Hn&&(n=Fn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Yn=new Set(["auto","none","0"]);class Xn extends yn{constructor(e,t,n,i,s){super(e,t,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let i=e[n];if("string"==typeof i&&(i=i.trim(),pt(i))){const s=Xt(i,t.current);void 0!==s&&(e[n]=s),n===e.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Lt.has(n)||2!==e.length)return;const[i,s]=e,r=Gt(i),o=Gt(s);if(r!==o)if(Kt(r)&&Kt(o))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else en[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||xn(e[t]))&&n.push(t);n.length&&function(e,t,n){let i,s=0;for(;s<e.length&&!i;){const t=e[s];"string"==typeof t&&!Yn.has(t)&&In(t).values.length&&(i=e[s]),s++}if(i&&n)for(const s of t)e[s]=Zn(n,i)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=en[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const i=t[t.length-1];void 0!==i&&e.getValue(n,i).jump(i,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const i=e.getValue(t);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,r=n[s];n[s]=en[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEac
1h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const Kn=e=>Boolean(e&&e.getVelocity);let Jn;function Qn(){Jn=void 0}const ei={now:()=>(void 0===Jn&&ei.set(cn.isProcessing||nn.useManualTiming?cn.timestamp:performance.now()),Jn),set:e=>{Jn=e,queueMicrotask(Qn)}};function ti(e,t){-1===e.indexOf(t)&&e.push(t)}function ni(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class ii{constructor(){this.subscriptions=[]}add(e){return ti(this.subscriptions,e),()=>ni(this.subscriptions,e)}notify(e,t,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](e,t,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function si(e,t){return t?e*(1e3/t):0}const ri={current:void 0};class oi{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=ei.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=ei.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new ii);const n=this.events[e].add(t);return"change"===e?()=>{n(),an.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return ri.current&&ri.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=ei.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return si(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ai(e,t){return new oi(e,t)}const li=[...Ut,kn,Fn],{schedule:ci,cancel:di}=on(queueMicrotask,!1),ui={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},hi={};for(const e in ui)hi[e]={isEnabled:t=>ui[e].some(e=>!!t[e])};const pi=()=>({x:{min:0,max:0},y:{min:0,max:0}}),mi="undefined"!=typeof window,fi={current:null},gi={current:!1};function yi(){if(gi.current=!0,mi)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fi.current=e.matches;e.addEventListener("change",t),t()}else fi.current=!1}const vi=new WeakMap;function xi(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function wi(e){return"string"==typeof e||Array.isArray(e)}const bi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Si=["initial",...bi];function Ti(e){return xi(e.animate)||Si.some(t=>wi(e[t]))}function Ei(e){return Boolean(Ti(e)||e.variants)}function Mi(e){const t=[{},{}];
vendor: 5,405 bytes, line 1
1return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Ci(e,t,n,i){if("function"==typeof t){const[s,r]=Mi(i);t=t(void 0!==n?n:e.custom,s,r)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[s,r]=Mi(i);t=t(void 0!==n?n:e.custom,s,r)}return t}const Pi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class _i{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=yn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=ei.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,an.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=r;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=Ti(t),this.isVariantNode=Ei(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==a[e]&&Kn(t)&&t.set(a[e])}}mount(e){this.current=e,vi.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),gi.current||yi(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||fi.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ln(this.notifyUpdate),ln(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Qe.has(e);n&&this.onBindTransform&&this.onBindTransform();const i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&an.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),s&&s(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in hi){const t=hi[e];if(!t)continue;const{isEnabled:n,Feature:i}=t;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Pi.length;t++){const n=Pi[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=e["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(e,t,n){for(const i in t){const s=t[i],r=n[i];if(Kn(s))e.addValue(i,s);else if(Kn(r))e.addValue(i,ai(s,{owner:e}));else if(r!==s)if(e.hasValue(i)){const t=e.getValue(i);!0===t.liveStyle?t.jump(s):t.hasAnimated||t.set(s)}else{const t=e.getStaticValue(i);e.addValue(i,ai(void 0!==t?t:s,{owner:e}))}}for(const i in n)void 0===t[i]&&e.removeValue(i);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}
vendor: 5,103 bytes, line 1
1addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=ai(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var i;return null!=n&&("string"==typeof n&&(Zt(n)||vn(n))?n=parseFloat(n):(i=n,!li.find(Wt(i))&&Fn.test(t)&&(n=Zn(e,t))),this.setBaseTarget(e,Kn(n)?n.get():n)),Kn(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const i=Ci(this.props,t,this.presenceContext?.custom);i&&(n=i[e])}if(t&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||Kn(i)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new ii),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){ci.render(this.render)}}class ji extends _i{constructor(){super(...arguments),this.KeyframeResolver=Xn}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Kn(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}const ki=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Ai={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Li=Je.length;function Ni(e,t,n){const{style:i,vars:s,transformOrigin:r}=e;let o=!1,a=!1;for(const e in t){const n=t[e];if(Qe.has(e))o=!0;else if(ut(e))s[e]=n;else{const t=ki(n,Un[e]);e.startsWith("origin")?(a=!0,r[e]=t):i[e]=t}}if(t.transform||(o||n?i.transform=function(e,t,n){let i="",s=!0;for(let r=0;r<Li;r++){const o=Je[r],a=e[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const e=ki(a,Un[o]);l||(s=!1,i+=`${Ai[o]||o}(${e}) `),n&&(t[o]=e)}}return i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=r;i.transformOrigin=`${e} ${t} ${n}`}}function Ri(e,{style:t,vars:n},i,s){const r=e.style;let o;for(o in t)r[o]=t[o];for(o in s?.applyProjectionStyles(r,i),n)r.setProperty(o,n[o])}function Ii(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Vi={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Bt.test(e))return e;e=parseFloat(e)}return`${Ii(e,t.target.x)}% ${Ii(e,t.target.y)}%`}},Di={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=Fn.parse(e);if(s.length>5)return i;const r=Fn.createTransformer(e),o="number"!=typeof s[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const c=gt(a,l,.5);return"number"==typeof s[2+o]&&(s[2+o]/=c),"number"==typeof s[3+o]&&(s[3+o]/=c),r(s)}},Oi={borderRadius:{...Vi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vi,borderTopRightRadius:Vi,borderBottomLeftRadius:Vi,borderBottomRightRadius:Vi,boxShadow:Di};function Fi(e,{layout:t,layoutId:n}){return Qe.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Oi[e]||"opacity"===e)}function Bi(e,t,n){const{style:i}=e,s={};for(const r in i)(Kn(i[r])||t.style&&Kn(t.style[r])||Fi(r,e)||void 0!==n?.getValue(r)?.liveStyle)&&(s[r]=i[r]);return s}class zi extends ji{constructor(){super(...arguments),this.type="html",this.renderInstance=Ri}readValueFromInstance(e,t){if(Qe.has(t))return this.projection?.isProjecting?at(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return lt(n,t)})(e,t);{const i=(n=e,window.getComputedStyle(n)),s=(ut(t)?i.getPropertyValue(t):i[t])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return At(e,t)}build(e,t,n){Ni(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Bi(e,t,n)}}const $i=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Hi={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wi={offset:"strokeDashoffset",array:"strokeDasharray"};function Ui(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},l,c,d){if(Ni(e,a,c),l)return void(e.style.viewBox&&(e.attrs.viewB
1ox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:u,style:h}=e;u.transform&&(h.transform=u.transform,delete u.transform),(h.transform||u.transformOrigin)&&(h.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),h.transform&&(h.transformBox=d?.transformBox??"fill-box",delete u.transformBox),void 0!==t&&(u.x=t),void 0!==n&&(u.y=n),void 0!==i&&(u.scale=i),void 0!==s&&function(e,t,n=1,i=0,s=!0){e.pathLength=1;const r=s?Hi:Wi;e[r.offset]=Bt.transform(-i);const o=Bt.transform(t),a=Bt.transform(n);e[r.array]=`${o} ${a}`}(u,s,r,o,!1)}const Gi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),qi=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Zi(e,t,n){const i=Bi(e,t,n);for(const n in e)(Kn(e[n])||Kn(t[n]))&&(i[-1!==Je.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return i}class Yi extends ji{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=pi}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Qe.has(t)){const e=qn(t);return e&&e.default||0}return t=Gi.has(t)?t:$i(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Zi(e,t,n)}
1build(e,t,n){Ui(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,i){!function(e,t,n,i){Ri(e,t,void 0,i);for(const n in t.attrs)e.setAttribute(Gi.has(n)?n:$i(n),t.attrs[n])}(e,t,0,i)}mount(e){this.isSVGTag=qi(e.tagName),super.mount(e)}}const Xi=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ki(e){return"string"==typeof e&&!e.includes("-")&&!!(Xi.indexOf(e)>-1||/[A-Z]/u.test(e))}const Ji=(e,t)=>Ki(e)?new Yi(t):new zi(t,{allowProjection:e!==d.Fragment}),Qi=(0,d.createContext)({}),es=(0,d.createContext)({strict:!1}),ts=(0,d.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),ns=(0,d.createContext)({});function is(e){return Array.isArray(e)?e.join(" "):e}function ss(e,t,n){for(const i in t)Kn(t[i])||Fi(i,n)||(e[i]=t[i])}function rs(e,t){const n={},i=function(e,t){const n={};return ss(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,d.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Ni(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}function os(e,t,n,i){const s=(0,d.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Ui(n,t,qi(i),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};ss(t,e.style,e),s.style={...t,...s.style}}return s}const as=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ls(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||as.has(e)}let cs=e=>!ls(e);try{"function"==typeof(ds=require("@emotion/is-prop-valid").default)&&(cs=e=>e.startsWith("on")?!ls(e):ds(e))}catch{}var ds;function us(e,t,n,{latestValues:i},s,r=!1){const o=(Ki(e)?os:rs)(t,i,s,e),a=function(e,t,n){const i={};for(const s in e)"values"===s&&"object"==typeof e.values||(cs(s)||!0===n&&ls(s)||!t&&!ls(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}(t,"string"==typeof e,r),l=e!==d.Fragment?{...a,...o,ref:n}:{},{children:c}=t,u=(0,d.useMemo)(()=>Kn(c)?c.get():c,[c]);return(0,d.createElement)(e,{...l,children:u})}const hs=(0,d.createContext)(null);function ps(e){const t=(0,d.useRef)(null);return null===t.current&&(t.current=e()),t.current}function ms(e){return Kn(e)?e.get():e}function fs(e,t,n,i){const s={},r=i(e,{});for(const e in r)s[e]=ms(r[e]);let{initial:o,animate:a}=e;const l=Ti(e),c=Ei(e);t&&c&&!l&&!1!==e.inherit&&(void 0===o&&(o=t.initial),void 0===a&&(a=t.animate));let d=!!n&&!1===n.initial;d=d||!1===o;const u=d?a:o;if(u&&"boolean"!=typeof u&&!xi(u)){const t=Array.isArray(u)?u:[u];for(let n=0;n<t.length;n++){const i=Ci(e,t[n]);if(i){const{transitionEnd:e,transition:t,...n}=i;for(const e in n){let t=n[e];Array.isArray(t)&&(t=t[d?t.length-1:0]),null!==t&&(s[e]=t)}for(const t in e)s[t]=e[t]}}}return s}const gs=e=>(t,n)=>{const i=(0,d.useContext)(ns),s=(0,d.useContext)(hs),r=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:fs(n,i,s,e),renderState:t()}}(e,t,i,s);return n?r():ps(r)},ys=gs({scrapeMotionValuesFromProps:Bi,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})}),vs=gs({scrapeMotionValuesFromProps:Zi,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}})}),xs=Symbol.for("motionComponentSymbol");function ws(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function bs(e,t,n){return(0,d.useCallback)(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),n&&("function"==typeof n?n(i):ws(n)&&(n.current=i))},[t])}const Ss="data-"+$i("framerAppearId"),Ts=(0,d.createContext)({}),Es=mi?d.useLayoutEffect:d.useEffect;function Ms(e,t,n,i,s){const{visualElement:r}=(0,d.useContext)(ns),o=(0,d.useContext)(es),a=(0,d.useContext)(hs),l=(0,d.useContext)(ts).reducedMotion,c=(0,d.useRef)(null);i=i||o.renderer,!c.current&&i&&(c.current=i(e,{visualState:t,parent:r,props:n,presenceContext:a,blockInitialAnimation:!!a&&!1===a.initial,reducedMotionConfig:l}));const u=c.current,h=(0,d.useContext)(Ts);!u||u.projection||!s||"html"!==u.type&&"svg"!==u.type||function(e,t,n,i){const{layoutId:s,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Cs(e.parent)),e.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:Boolean(o)||a&&ws(a),visualElement:e,animationType:"string"==typeof r?r:"both",initialPromotionConfig:i,crossfade:d,layoutScroll:l,layoutRoot:c})}(c.current,n,s,h);const p=(0,d.useRef)(!1);(0,d.useInsertionEffect)(()=>{u&&p.current&&u.update(n,a)});const m=n[Ss],f=(0,d.useRef)(Boolean(m)&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return Es(()=>{u&&(p.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),f.current&&u.animationState&&u.animationState.animateChanges())}),(0,d.useEffect)(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}
1),f.current=!1),u.enteringChildren=void 0)}),u}function Cs(e){if(e)return!1!==e.options.allowProjection?e.projection:Cs(e.parent)}function Ps(e,{forwardMotionProps:t=!1}={},n,i){n&&function(e){for(const t in e)hi[t]={...hi[t],...e[t]}}(n);const s=Ki(e)?vs:ys;function r(n,r){let o;const a={...(0,d.useContext)(ts),...n,layoutId:_s(n)},{isStatic:l}=a,c=function(e){const{initial:t,animate:n}=function(e,t){if(Ti(e)){const{initial:t,animate:n}=e;return{initial:!1===t||wi(t)?t:void 0,animate:wi(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,d.useContext)(ns));return(0,d.useMemo)(()=>({initial:t,animate:n}),[is(t),is(n)])}(n),u=s(n,l);if(!l&&mi){(0,d.useContext)(es).strict;const t=function(e){const{drag:t,layout:n}=hi;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(a);o=t.MeasureLayout,c.visualElement=Ms(e,u,a,i,t.ProjectionNode)}return(0,Z.jsxs)(ns.Provider,{value:c,children:[o&&c.visualElement?(0,Z.jsx)(o,{visualElement:c.visualElement,...a}):null,us(e,n,bs(u,c.visualElement,r),u,l,t)]})}r.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const o=(0,d.forwardRef)(r);return o[xs]=e,o}function _s({layoutId:e}){const t=(0,d.useContext)(Qi).id;return t&&void 0!==e?t+"-"+e:e}function js(e,t){if("undefined"==typeof Proxy)return Ps;const n=new Map,i=(n,i)=>Ps(n,i,e,t);return new Proxy((e,t)=>i(e,t),{get:(s,r)=>"create"===r?i:(n.has(r)||n.set(r,Ps(r,void 0,e,t)),n.get(r))})}function ks(e,t,n){const i=e.getProps();return Ci(i,t,void 0!==n?n:i.custom,e)}function As(e,t){return e?.[t]??e?.default??e}const Ls=e=>Array.isArray(e);function Ns(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ai(n))}function Rs(e){return Ls(e)?e[e.length-1]||0:e}function Is(e,t){const n=e.getValue("willChange");if(i=n,Boolean(Kn(i)&&i.add))return n.add(t);if(!n&&nn.WillChange){const n=new nn.WillChange("auto");e.addValue("willChange",n),n.add(t)}var i}function Vs(e){return e.props[Ss]}function Ds(e){e.duration=0,e.type="keyframes"}const Os=(e,t)=>n=>t(e(n)),Fs=(...e)=>e.reduce(Os),Bs=e=>1e3*e,zs=e=>e/1e3,$s={layout:0,mainThread:0,waapi:0};function Hs(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ws(e,t){return n=>n>0?t:e}const Us=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},Gs=[Pn,Cn,jn];function qs(e){const t=(n=e,Gs.find(e=>e.test(n)));var n;if(Boolean(t),!Boolean(t))return!1;let i=t.parse(e);return t===jn&&(i=function({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,n/=100;let s=0,r=0,o=0;if(t/=100){const i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;s=Hs(a,i,e+1/3),r=Hs(a,i,e),o=Hs(a,i,e-1/3)}else s=r=o=n;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*o),alpha:i}}(i)),i}const Zs=(e,t)=>{const n=qs(e),i=qs(t);if(!n||!i)return Ws(e,t);const s={...n};return e=>(s.red=Us(n.red,i.red,e),s.green=Us(n.green,i.green,e),s.blue=Us(n.blue,i.blue,e),s.alpha=gt(n.alpha,i.alpha,e),Cn.transform(s))},Ys=new Set(["none","hidden"]);function Xs(e,t){return n=>gt(e,t,n)}function Ks(e){return"number"==typeof e?Xs:"string"==typeof e?pt(e)?Ws:kn.test(e)?Zs:er:Array.isArray(e)?Js:"object"==typeof e?kn.test(e)?Zs:Qs:Ws}function Js(e,t){const n=[...e],i=n.length,s=e.map((e,n)=>Ks(e)(e,t[n]));return e=>{for(let t=0;t<i;t++)n[t]=s[t](e);return n}}function Qs(e,t){const n={...e,...t},i={};for(const s in n)void 0!==e[s]&&void 0!==t[s]&&(i[s]=Ks(e[s])(e[s],t[s]));return e=>{for(const t in i)n[t]=i[t](e);return n}}const er=(e,t)=>{const n=Fn.createTransformer(t),i=In(e),s=In(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Ys.has(e)&&!s.values.length||Ys.has(t)&&!i.values.length?function(e,t){return Ys.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Fs(Js(function(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const r=t.types[s],o=e.indexes[r][i[r]],a=e.values[o]??0;n[s]=a,i[r]++}return n}(i,s),s.values),n):Ws(e,t)};function tr(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?gt(e,t,n):Ks(e)(e,t)}const nr=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>an.update(t,e),stop:()=>ln(t),now:()=>cn.isProcessing?cn.timestamp:ei.now()}},ir=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let t=0;t<s;t++)i+=Math.round(1e4*e(t/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},sr=2e4;function rr(e){let t=0,n=e.next(t);for(;!n.done&&t<sr;)t+=50,n=e.next(t);return t>=sr?1/0:t}function or(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(rr(i),sr);return{type:"keyframes",ease:e=>i.next(s*e).value/t,duration:zs(s)}}function ar(e,t,n){const i=Math.max(t-5,0);return si(n-e(i),t-i)}const lr=.01,cr=2,dr=.005,ur=.5;const hr=12;function pr(e,t){return e*Math.sqrt(1-t*t)}const mr=["duration","bounce"],fr=["stiffness","damping","mass"];function gr(e,t){return t.some(t=>void 0!==e[t])}function yr(e=.3,t=.3){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!gr(e,fr)&&gr(e,mr))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,r=2*Nt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:1,stiffness:s,damping:r}}else{const n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:i=1}){let s,r;Bs(10);let o=1-t;o=Nt(.05,1,o),e=Nt(.01,10,zs(e)),o<1?(s=t=>{const i=t*o,s=i*e;return.001-(i-n)/pr(t,o)*Math.exp(-s)},r=t=>{const i=t*o*e,r=i*n+n,a=Math.pow(o,2)*Math.pow(t,2)*e,l=Math.exp(-i),c=pr(Math.pow(t,2),o);return(.001-s(t)>0?-1:1)*((r-a)*l)/c}):(s=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,r=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let i=n;for(let n=1;n<hr;n++)i-=e(i)/t(i);return i}(s,r,5/e);if(e=Bs(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*i;return{stiffness:t,damping:2*o*Math.sqrt(i*t),duration:e}}}(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...n,velocity:-zs(n.velocity||0)}),m=h||0,f=c/(2*Math.sqrt(l*d)),g=o-r,y=zs(Math.sqrt(l/d)),v=Math.abs(g)<5;let x;if(i||(i=v?lr:cr),s||(s=v?dr:ur),f<1){const e=pr(y,f);x=t=>{const n=Math.exp(-f*y*t);return o-n*((m+f*y*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===f)x=e=>o-Math.exp(-y*e)*(g+(m+y*g)*e);else{const e=y*Math.sqrt(f*f-1);x=t=>{const n=Math.exp(-f*y*t),i=Math.min(e*t,300);return o-n*((m+f*y*g)*Math.sinh(i)+e*g*Math.cosh(i))/e}}const w={calculatedDuration:p&&u||null,next:e=>{const t=x(e);if(p)a.done=e>=u;else{let n=0===e?m:0;f<1&&(n=0===e?Bs(m):ar(x,e,t));const r=Math.abs(n)<=i,l=Math.abs(o-t)<=s;a.done=r&&l}return a.value=a.done?o:t,a},toString:()=>{const e=Math.min(rr(w),sr),t=ir(t=>w.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return w}function vr({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=e[0],h={done:!1,value:u},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let m=n*t;const f=u+m,g=void 0===o?f:o(f);g!==f&&(m=g-u);const y=e=>-m*Math.exp(-e/i),v=e=>g+y(e),x=e=>{const t=y(e),n=v(e);h.done=Math.abs(t)<=c,h.value=h.done?g:n};let w,b;const S=e=>{var t;t=h.value,(void 0!==a&&t<a||void 0!==l&&t>l)&&(w=e,b=yr({keyframes:[h.value,p(h.value)],velocity:ar(v,e,h.value),damping:s,stiffness:r,restDelta:c,restSpeed:d}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return b||void 0!==w||(t=!0,x(e),S(e)),void 0!==w&&e>=w?b.next(e-w):(!t&&x(e),h)}}}yr.applyToOptions=e=>{const t=or(e,100,yr);return e.ease=t.ease,e.duration=Bs(t.duration),e.type="keyframes",e};
1const xr=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function wr(e,t,n,i){if(e===t&&n===i)return tn;return s=>0===s||1===s?s:xr(function(e,t,n,i,s){let r,o,a=0;do{o=t+(n-t)/2,r=xr(o,i,s)-e,r>0?n=o:t=o}while(Math.abs(r)>1e-7&&++a<12);return o}(s,0,1,e,n),t,i)}const br=wr(.42,0,1,1),Sr=wr(0,0,.58,1),Tr=wr(.42,0,.58,1),Er=e=>Array.isArray(e)&&"number"!=typeof e[0],Mr=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Cr=e=>t=>1-e(1-t),Pr=wr(.33,1.53,.69,.99),_r=Cr(Pr),jr=Mr(_r),kr=e=>(e*=2)<1?.5*_r(e):.5*(2-Math.pow(2,-10*(e-1))),Ar=e=>1-Math.sin(Math.acos(e)),Lr=Cr(Ar),Nr=Mr(Ar),Rr=e=>Array.isArray(e)&&"number"==typeof e[0],Ir={linear:tn,easeIn:br,easeInOut:Tr,easeOut:Sr,circIn:Ar,circInOut:Nr,circOut:Lr,backIn:_r,backInOut:jr,backOut:Pr,anticipate:kr},Vr=e=>{if(Rr(e)){e.length;const[t,n,i,s]=e;return wr(t,n,i,s)}return"string"==typeof e?Ir[e]:e},Dr=(e,t,n)=>{const i=t-e;return 0===i?1:(n-e)/i};function Or(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const r=e.length;if(t.length,1===r)return()=>t[0];if(2===r&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const i=[],s=n||nn.mix||tr,r=e.length-1;for(let n=0;n<r;n++){let r=s(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||tn:t;r=Fs(e,r)}i.push(r)}return i}(t,i,s),l=a.length,c=n=>{if(o&&n<e[0])return t[0];let i=0;if(l>1)for(;i<e.length-2&&!(n<e[i+1]);i++);const s=Dr(e[i],e[i+1],n);return a[i](s)};return n?t=>c(Nt(e[0],e[r-1],t)):c}function Fr(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=Dr(0,t,i);e.push(gt(n,1,s))}}function Br(e){const t=[0];return Fr(t,e.length-1),t}function zr({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=Er(i)?i.map(Vr):Vr(i),r={done:!1,value:t[0]},o=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:Br(t),e),a=Or(o,t,{ease:Array.isArray(s)?s:(l=t,c=s,l.map(()=>c||Tr).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(r.value=a(t),r.done=t>=e,r)}}const $r=e=>null!==e;function Hr(e,{repeat:t,repeatType:n="loop"},i,s=1){const r=e.filter($r),o=s<0||t&&"loop"!==n&&t%2==1?0:r.length-1;return o&&void 0!==i?i:r[o]}const Wr={decay:vr,inertia:vr,tween:zr,keyframes:zr,spring:yr};function Ur(e){"string"==typeof e.type&&(e.type=Wr[e.type])}class Gr{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const qr=e=>e/100;class Zr extends Gr{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==ei.now()&&this.tick(ei.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},$s.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;Ur(e);const{type:t=zr,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:r=0}=e;let{keyframes:o}=e;const a=t||zr;a!==zr&&"number"!=typeof o[0]&&(this.mixKeyframes=Fs(qr,tr(o[0],o[1])),o=[0,100]);const l=a({...e,keyframes:o});"mirror"===s&&(this.mirroredGenerator=a({...e,keyframes:[...o].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=rr(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:r,resolvedDuration:o,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:d,repeatType:u,repeatDelay:h,type:p,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let v=this.currentTime,x=n;if(d){const e=Math.min(this.currentTime,i)/o;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,d+1),Boolean(t%2)&&("reverse"===u?(n=1-n,h&&(n-=h
1/o)):"mirror"===u&&(x=r)),v=Nt(0,1,n)*o}const w=y?{done:!1,value:c[0]}:x.next(v);s&&(w.value=s(w.value));let{done:b}=w;y||null===a||(b=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return S&&p!==vr&&(w.value=Hr(c,this.options,f,this.speed)),m&&m(w.value),S&&this.finish(),w}then(e,t){return this.finished.then(e,t)}get duration(){return zs(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+zs(e)}get time(){return zs(this.currentTime)}set time(e){e=Bs(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(ei.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=zs(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=nr,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ei.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,$s.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Yr(e){let t;return()=>(void 0===t&&(t=e()),t)}const Xr=Yr(()=>void 0!==window.ScrollTimeline),Kr={};function Jr(e,t){const n=Yr(e);return()=>Kr[t]??n()}const Qr=Jr(()=>{try{document.createElement("div").animate({opacity:0}
1,{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),eo=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,to={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:eo([0,.65,.55,1]),circOut:eo([.55,0,1,.45]),backIn:eo([.31,.01,.66,-.59]),backOut:eo([.33,1.53,.69,.99])};function no(e,t){return e?"function"==typeof e?Qr()?ir(e,t):"ease-out":Rr(e)?eo(e):Array.isArray(e)?e.map(e=>no(e,t)||to.easeOut):to[e]:void 0}function io(e,t,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const d={[t]:n};l&&(d.offset=l);const u=no(a,s);Array.isArray(u)&&(d.easing=u),rn.value&&$s.waapi++;const h={delay:i,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"};c&&(h.pseudoElement=c);const p=e.animate(d,h);return rn.value&&p.finished.finally(()=>{$s.waapi--}),p}function so(e){return"function"==typeof e&&"applyToOptions"in e}class ro extends Gr{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:n,keyframes:i,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:o,onComplete:a}=e;this.isPseudoElement=Boolean(s),this.allowFlatten=r,this.options=e,e.type;const l=function({type:e,...t}){return so(e)&&Qr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=io(t,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const e=Hr(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}(t,n,e),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return zs(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+zs(e)}get time(){return zs(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Bs(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Xr()?(this.animation.timeline=e,tn):t(this)}}const oo={anticipate:kr,backInOut:jr,circInOut:Nr};class ao extends ro{constructor(e){var t;"string"==typeof(t=e).ease&&t.ease in oo&&(t.ease=oo[t.ease]),Ur(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:i,element:s,...r}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const o=new Zr({...r,autoplay:!1}),a=Bs(this.finishedTime??this.time);t.setWithVelocity(o.sample(a-10).value,o.sample(a).value,10),o.stop()}}const lo=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!Fn.test(e)&&"0"!==e||e.startsWith("url("))),co=new Set(["opacity","clipPath","filter","transform"]),uo=Yr(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class ho extends Gr{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:r="loop",keyframes:o,name:a,motionValue:l,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ei.now();const u={autoplay:e,delay:t,type:n,repeat:i,repeatDelay:s,repeatType:r,name:a,motionValue:l,element:c,...d},h=c?.KeyframeResolver||yn;this.keyframeResolver=new h(o,(e,t,n)=>this.onKeyframesResolved(e,t,u,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,i){this.keyframeResolver=void 0;const{name:s,type:r,velocity:o,delay:a,isHandoff:l,onUpdate:c}=n;this.resolvedAt=ei.now(),function(e,t,n,i){const s=e[0];if(null===s)return!1;if("display"===t||"visibility"===t)return!0;const r=e[e.length-1],o=lo(s,t),a=lo(r,t);return!(!o||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||so(n))&&i)}(e,s,r,o)||(!nn.instantAnimations&&a||c?.(Hr(e,n,t)),e[0]=e[e.length-1],Ds(n),n.repeat=0);const d={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},u=!l&&function(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:r,type:o}=e,a=t?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return uo()&&n&&co.has(n)&&("transform"!==n||!c)&&!l&&!i&&"mirror"!==s&&0!==r&&"inertia"!==o}(d)?new ao({...d,element:d.motionValue.owner.current}):new Zr(d);u.finished.then(()=>this.notifyFinished()).catch(tn),this.pendingTimeline&&(this.stopTimeline=u.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=u}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),mn=!0,gn(),fn(),mn=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const po=e=>null!==e,mo={type:"spring",stiffness:500,damping:25,restSpeed:10},fo={type:"keyframes",duration:.8},go={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},yo=(e,t,n,i={},s,r)=>o=>{const a=As(i,e)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=Bs(l);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:r?void 0:s};(function({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:
1o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length})(a)||Object.assign(d,((e,{keyframes:t})=>t.length>2?fo:Qe.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:mo:go)(e,d)),d.duration&&(d.duration=Bs(d.duration)),d.repeatDelay&&(d.repeatDelay=Bs(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let u=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(Ds(d),0===d.delay&&(u=!0)),(nn.instantAnimations||nn.skipAnimations)&&(u=!0,Ds(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,u&&!r&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:n="loop"},i){const s=e.filter(po),r=t&&"loop"!==n&&t%2==1?0:s.length-1;return r&&void 0!==i?i:s[r]}(d.keyframes,a);if(void 0!==e)return void an.update(()=>{d.onUpdate(e),d.onComplete()})}return a.isSync?new Zr(d):new ho(d)};function vo({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,i}function xo(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r=e.getDefaultTransition(),transitionEnd:o,...a}=t;i&&(r=i);const l=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const t in a){const i=e.getValue(t,e.latestValues[t]??null),s=a[t];if(void 0===s||c&&vo(c,t))continue;const o={delay:n,...As(r||{},t)},d=i.get();if(void 0!==d&&!i.isAnimating&&!Array.isArray(s)&&s===d&&!o.velocity)continue;let u=!1;if(window.MotionHandoffAnimation){const n=Vs(e);if(n){const e=window.MotionHandoffAnimation(n,t,an);null!==e&&(o.startTime=e,u=!0)}}Is(e,t),i.start(yo(t,i,s,e.shouldReduceMotion&&Lt.has(t)?{type:!1}:o,e,u));const h=i.animation;h&&l.push(h)}return o&&Promise.all(l).then(()=>{an.update(()=>{o&&function(e,t){const n=ks(e,t);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const t in r)Ns(e,t,Rs(r[t]))}(e,o)})}),l}function wo(e,t,n,i=0,s=1){const r=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,a=(o-1)*i;return"function"==typeof n?n(r,o):1===s?r*i:a-r*i}function bo(e,t,n={}){const i=ks(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(xo(e,i,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=s;return function(e,t,n=0,i=0,s=0,r=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(bo(l,t,{...o,delay:n+("function"==typeof i?0:i)+wo(e.variantChildren,l,i,s,r)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}(e,t,i,r,o,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[e,t]="beforeChildren"===a?[r,o]:[o,r];return e().then(()=>t())}return Promise.all([r(),o(n.delay)])}function So(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const To=Si.length;function Eo(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Eo(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<To;n++){const i=Si[n],s=e.props[i];(wi(s)||!1===s)&&(t[i]=s)}return t}const Mo=[...bi].reverse(),Co=bi.length;function Po(e){let t=function(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let i;if(e.notify("AnimationStart",t),Array.isArray(t)){const s=t.map(t=>bo(e,t,n));i=Promise.all(s)}else if("string"==typeof t)i=bo(e,t,n);else{const s="function"==typeof t?ks(e,t,n.custom):t;i=Promise.all(xo(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}(e),n=ko(),i=!0;const s=t=>(n,i)=>{const s=ks(e,i,"exit"===t?e.presenceContext?.custom:void 0);if(s){const{transition:e,transitionEnd:t,...i}=s;n={...n,...i,...t}}return n};function r(r){const{props:o}=e,a=Eo(e.parent)||{},l=[],c=new Set;let d={},u=1/0;for(let t=0;t<Co;t++){const h=Mo[t],p=n[h],m=void 0!==o[h]?o[h]:a[h],f=wi(m),g=h===r?p.isActive:null;!1===g&&(u=t);let y=m===a[h]&&m!==o[h]&&f;if(y&&i&&e.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...d},!p.isActive&&null===g||!m&&!p.prevProp||xi(m)||"boolean"==typeof m)continue;const v=_o(p.prevProp,m);let x=v||h===r&&p.isActive&&!y&&f||t>u&&f,w=!1;const b=Array.isArray(m)?m:[m];let S=b.reduce(s(h),{});!1===g&&(S={});const{prevResolvedValues:T={}}=p,E={...T,...S},M=t=>{x=!0,c.has(t)&&(w=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in E){const t=S[e],n=T[e];
vendor: 4,424 bytes, line 1
1if(d.hasOwnProperty(e))continue;let i=!1;i=Ls(t)&&Ls(n)?!So(t,n):t!==n,i?null!=t?M(e):c.add(e):void 0!==t&&c.has(e)?M(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(d={...d,...S}),i&&e.blockInitialAnimation&&(x=!1);const C=y&&v;x&&(!C||w)&&l.push(...b.map(t=>{const n={type:h};if("string"==typeof t&&i&&!C&&e.manuallyAnimateOnMount&&e.parent){const{parent:i}=e,s=ks(i,t);if(i.enteringChildren&&s){const{delayChildren:t}=s.transition||{};n.delay=wo(i.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){const t={};if("boolean"!=typeof o.initial){const n=ks(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{const i=e.getBaseTarget(n),s=e.getValue(n);s&&(s.liveStyle=!0),t[n]=i??null}),l.push({animation:t})}let h=Boolean(l.length);return!i||!1!==o.initial&&o.initial!==o.animate||e.manuallyAnimateOnMount||(h=!1),i=!1,h?t(l):Promise.resolve()}return{animateChanges:r,setActive:function(t,i){if(n[t].isActive===i)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,i)),n[t].isActive=i;const s=r(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=ko()}}}function _o(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!So(t,e)}function jo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ko(){return{animate:jo(!0),whileInView:jo(),whileHover:jo(),whileTap:jo(),whileDrag:jo(),whileFocus:jo(),exit:jo()}}class Ao{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Lo=0;const No={animation:{Feature:class extends Ao{constructor(e){super(e),e.animationState||(e.animationState=Po(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();xi(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Ao{constructor(){super(...arguments),this.id=Lo++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}},Ro={x:!1,y:!1};function Io(){return Ro.x||Ro.y}function Vo(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const Do=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function Oo(e){return{point:{x:e.pageX,y:e.pageY}}}function Fo(e,t,n,i){return Vo(e,t,(e=>t=>Do(t)&&e(t,Oo(t)))(n),i)}function Bo(e){return e.max-e.min}function zo(e,t,n,i=.5){e.origin=i,e.originPoint=gt(t.min,t.max,e.origin),e.scale=Bo(n)/Bo(t),e.translate=gt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function $o(e,t,n,i){zo(e.x,t.x,n.x,i?i.originX:void 0),zo(e.y,t.y,n.y,i?i.originY:void 0)}function Ho(e,t,n){e.min=n.min+t.min,e.max=e.min+Bo(t)}function Wo(e,t,n){e.min=t.min-n.min,e.max=e.min+Bo(t)}function Uo(e,t,n){Wo(e.x,t.x,n.x),Wo(e.y,t.y,n.y)}function Go(e){return[e("x"),e("y")]}const qo=({current:e})=>e?e.ownerDocument.defaultView:null,Zo=(e,t)=>Math.abs(e-t);class Yo{constructor(e,t,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Jo(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Zo(e.x,t.x),i=Zo(e.y,t.y);return Math.sqrt(n**2+i**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:i}=e,{timestamp:s}=cn;this.history.push({...i,timestamp:s});const{onStart:r,onMove:o}=this.handlers;t||(r&&r(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>
vendor: 6,888 bytes, line 1
1{this.lastMoveEvent=e,this.lastMoveEventInfo=Xo(t,this.transformPagePoint),an.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const r=Jo("pointercancel"===e.type?this.lastMoveEventInfo:Xo(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,r),i&&i(e,r)},!Do(e))return;this.dragSnapToOrigin=s,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=r,this.contextWindow=i||window;const o=Xo(Oo(e),this.transformPagePoint),{point:a}=o,{timestamp:l}=cn;this.history=[{...a,timestamp:l}];const{onSessionStart:c}=t;c&&c(e,Jo(o,this.history)),this.removeListeners=Fs(Fo(this.contextWindow,"pointermove",this.handlePointerMove),Fo(this.contextWindow,"pointerup",this.handlePointerUp),Fo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ln(this.updatePoint)}}function Xo(e,t){return t?{point:t(e.point)}:e}function Ko(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jo({point:e},t){return{point:e,delta:Ko(e,ea(t)),offset:Ko(e,Qo(t)),velocity:ta(t,.1)}}function Qo(e){return e[0]}function ea(e){return e[e.length-1]}function ta(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=ea(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>Bs(t)));)n--;if(!i)return{x:0,y:0};const r=zs(s.timestamp-i.timestamp);if(0===r)return{x:0,y:0};const o={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function na(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function ia(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}const sa=.35;function ra(e,t,n){return{min:oa(e,t),max:oa(e,n)}}function oa(e,t){return"number"==typeof e?e:e[t]||0}const aa=new WeakMap;class la{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;const{dragSnapToOrigin:s}=this.getProps();this.panSession=new Yo(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Oo(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(r=n)||"y"===r?Ro[r]?null:(Ro[r]=!0,()=>{Ro[r]=!1}):Ro.x||Ro.y?null:(Ro.x=Ro.y=!0,()=>{Ro.x=Ro.y=!1}),!this.openDragLock))return;var r;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Go(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Ft.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[e];i&&(t=Bo(i)*(parseFloat(t)/100))}}this.originPoint[e]=t}),s&&an.postRender(()=>s(e,t)),Is(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:r}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:o}=t;if(i&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(o),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",t.point,o),this.updateAxis("y",t.point,o),this.visualElement.render(),r&&r(e,t)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>Go(e=>"paused"===this.getAnimationState(e)&&this.getAxisMotionValue(e).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,distanceThreshold:n,contextWindow:qo(this.visualElement)})}stop(e,t){const n=e||this.latestPointerEvent,i=t||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!n)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&an.postRender(()=>o(n,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:i}=this.getProps();if(!n||!ca(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let r=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(r=function(e,{min:t,max:n},i){return void 0!==t&&e<t?e=i?gt(t,e,i.min):Math.max(e,t):void 0!==n&&e>n&&(e=i?gt(n,e,i.max):Math.min(e,n)),e}(r,this.constraints[e],this.elastic[e])),s.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&ws(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:i,right:s}){return{x:na(e.x,n,s),y:na(e.y,t,i)}}(n.layoutBox,e),this.elastic=function(e=sa){return!1===e?e=0:!0===e&&(e=sa),{x:ra(e,"left","right"),y:ra(e,"top","bottom")}}(t),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Go(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!ws(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(e,t,n){const i=At(e,n),{scroll:s}=t;return s&&(_t(i.x,s.offset.x),_t(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let r=function(e,t){return{x:ia(e.x,t.x),y:ia(e.y,t.y)}}(i.layout.layoutBox,s);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(r));this.hasMutatedConstraints=!!e,e&&(r=ft(e))}return r}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:r,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{},l=Go(o=>
1{if(!ca(o,t,this.currentDirection))return;let l=a&&a[o]||{};r&&(l={min:0,max:0});const c=i?200:1e6,d=i?40:1e7,u={type:"inertia",velocity:n?e[o]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(o,u)});return Promise.all(l).then(o)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return Is(this.visualElement,e),n.start(yo(e,n,0,t,this.visualElement,!1))}stopAnimation(){Go(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Go(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Go(t=>{const{drag:n}=this.getProps();if(!ca(t,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(t);if(i&&i.layout){const{min:n,max:r}=i.layout.layoutBox[t];s.set(e[t]-gt(n,r,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!ws(t)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Go(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();i[e]=function(e,t){let n=.5;const i=Bo(e),s=Bo(t);return s>i?n=Dr(t.min,t.max-i,e.min):i>s&&(n=Dr(e.min,e.max-s,t.min)),Nt(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Go(t=>{if(!ca(t,e,null))return;const n=this.getAxisMotionValue(t),{min:s,max:r}=this.constraints[t];n.set(gt(s,r,i[t]))})}addListeners(){if(!this.visualElement.current)return;aa.set(this.visualElement,this);const e=Fo(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();ws(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),an.read(t);const s=Vo(window,"resize",()=>this.scalePositionWithinConstraints()),r=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Go(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{s(),e(),i(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:r=sa,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:r,dragMomentum:o}}}function ca(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const da=e=>(t,n)=>{e&&an.postRender(()=>e(t,n))},ua={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let ha=!1;class pa extends d.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=e;s&&(t.group&&t.group.add(s),n&&n.register&&i&&n.register(s),ha&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ua.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:i,isPresent:s}=this.props,{projection:r}=n;return r?(r.isPresent=s,ha=!0,i||e.layoutDependency!==t||void 0===t||e.isPresent!==s?r.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?r.promote():r.relegate()||an.postRender(()=>{const e=r.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),ci.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:i}=e;ha=!0,i&&(i.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ma(e){const[t,n]=function(e=!0){const t=(0,d.useContext)(hs);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,r=(0,d.useId)();(0,d.useEffect)(()=>
1{if(e)return s(r)},[e]);const o=(0,d.useCallback)(()=>e&&i&&i(r),[r,i,e]);return!n&&i?[!1,o]:[!0]}(),i=(0,d.useContext)(Qi);return(0,Z.jsx)(pa,{...e,layoutGroup:i,switchLayoutGroup:(0,d.useContext)(Ts),isPresent:t,safeToRemove:n})}function fa(e){return"object"==typeof e&&null!==e}function ga(e){return fa(e)&&"ownerSVGElement"in e}function ya(e){return ga(e)&&"svg"===e.tagName}function va(e,t,n){const i=Kn(e)?e:ai(e);return i.start(yo("",i,t,n)),i.animation}const xa=(e,t)=>e.depth-t.depth;class wa{constructor(){this.children=[],this.isDirty=!1}add(e){ti(this.children,e),this.isDirty=!0}remove(e){ni(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(xa),this.isDirty=!1,this.children.forEach(e)}}const ba=["TopLeft","TopRight","BottomLeft","BottomRight"],Sa=ba.length,Ta=e=>"string"==typeof e?parseFloat(e):e,Ea=e=>"number"==typeof e||Bt.test(e);function Ma(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Ca=_a(0,.5,Lr),Pa=_a(.5,.95,tn);function _a(e,t,n){return i=>i<e?0:i>t?1:n(Dr(e,t,i))}function ja(e,t){e.min=t.min,e.max=t.max}function ka(e,t){ja(e.x,t.x),ja(e.y,t.y)}function Aa(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function La(e,t,n,i,s){return e=St(e-=t,1/n,i),void 0!==s&&(e=St(e,1/s,i)),e}function Na(e,t,[n,i,s],r,o){!function(e,t=0,n=1,i=.5,s,r=e,o=e){if(Ft.test(t)&&(t=parseFloat(t),t=gt(o.min,o.max,t/100)-o.min),"number"!=typeof t)return;let a=gt(r.min,r.max,i);e===r&&(a-=t),e.min=La(e.min,t,n,a,s),e.max=La(e.max,t,n,a,s)}(e,t[n],t[i],t[s],t.scale,r,o)}const Ra=["x","scaleX","originX"],Ia=["y","scaleY","originY"];function Va(e,t,n,i){Na(e.x,t,Ra,n?n.x:void 0,i?i.x:void 0),Na(e.y,t,Ia,n?n.y:void 0,i?i.y:void 0)}function Da(e){return 0===e.translate&&1===e.scale}function Oa(e){return Da(e.x)&&Da(e.y)}function Fa(e,t){return e.min===t.min&&e.max===t.max}function Ba(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function za(e,t){return Ba(e.x,t.x)&&Ba(e.y,t.y)}function $a(e){return Bo(e.x)/Bo(e.y)}function Ha(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Wa{constructor(){this.members=[]}add(e){ti(this.members,e),e.scheduleRender()}remove(e){if(ni(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Ua={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Ga=["","X","Y","Z"];let qa=0;function Za(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Ya(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Vs(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",an,!(t||i))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Ya(i)}function Xa({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(e={},n=t?.()){this.id=qa++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,rn.value&&(Ua.nodes=Ua.calculatedTargetDeltas=Ua.calculatedProjections=0),this.nodes.forEac
vendor: 4,099 bytes, line 1
1h(Qa),this.nodes.forEach(ol),this.nodes.forEach(al),this.nodes.forEach(el),rn.addProjectionMetrics&&rn.addProjectionMetrics(Ua)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new wa)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ii),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=ga(t)&&!ya(t),this.instance=t;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),e){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;an.read(()=>{i=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==i&&(i=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=ei.now(),i=({timestamp:s})=>{const r=s-n;r>=t&&(ln(i),e(r-t))};return an.setup(i,!0),()=>ln(i)}(s,250),ua.hasAnimatedSinceResize&&(ua.hasAnimatedSinceResize=!1,this.nodes.forEach(rl)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||s.getDefaultTransition()||pl,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!za(this.targetLayout,i),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...As(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c)}else t||rl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ln(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ll),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ya(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(nl);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(il);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEac
1h(sl),this.nodes.forEach(Ka),this.nodes.forEach(Ja)):this.nodes.forEach(il),this.clearAllSnapshots();const e=ei.now();cn.delta=Nt(0,1e3/60,e-cn.timestamp),cn.timestamp=e,cn.isProcessing=!0,dn.update.process(cn),dn.preRender.process(cn),dn.render.process(cn),cn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ci.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tl),this.sharedNodes.forEach(cl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,an.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){an.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Bo(this.snapshot.measuredBox.x)||Bo(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=i(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!s)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Oa(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,r=i!==this.prevTransformTemplateValue;e&&this.instance&&(t||xt(this.latestValues)||r)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var i;return e&&(n=this.removeTransform(n)),gl((i=n).x),gl(i.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!this.scroll?.wasRoot&&!this.path.some(vl)){const{scroll:e}=this.root;e&&(_t(t.x,e.offset.x),_t(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(ka(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:r}=i;i!==this.root&&s&&r.layoutScroll&&(s.wasRoot&&ka(t,e),_t(t.x,s.offset.x),_t(t.y,s.offset.y))}return t}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};ka(n,e);for(let e=0;e<this.path.length;e++){const i=this.path[e];!t&&i.options.layoutScroll&&i.scroll&&i!==i.root&&kt(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),xt(i.latestValues)&&kt(n,i.latestValues)}return xt(this.latestValues)&&kt(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};ka(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!xt(n.latestValues))continue;vt(n.latestValues)&&n.updateSnapshot();const i=pi();ka(i,n.measurePageBox()),Va(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return xt(this.latestValues)&&Va(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==cn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.
vendor: 14,092 bytes, line 1
1isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(!this.layout||!i&&!s)return;this.resolvedRelativeTargetAt=cn.timestamp;const r=this.getClosestProjectingParent();var o,a,l;r&&this.linkedParentVersion!==r.layoutVersion&&!r.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(r&&r.layout?this.createRelativeTarget(r,this.layout.layoutBox,r.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,a=this.relativeTarget,l=this.relativeParent.target,Ho(o.x,a.x,l.x),Ho(o.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ka(this.target,this.layout.layoutBox),Mt(this.target,this.targetDelta)):ka(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,r&&Boolean(r.resumingFrom)===Boolean(this.resumingFrom)&&!r.options.layoutScroll&&r.target&&1!==this.animationProgress?this.createRelativeTarget(r,this.target,r.target):this.relativeParent=this.relativeTarget=void 0),rn.value&&Ua.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!vt(this.parent.latestValues)&&!wt(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Uo(this.relativeTargetOrigin,t,n),ka(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===cn.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;ka(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,o=this.treeScale.y;!function(e,t,n,i=!1){const s=n.length;if(!s)return;let r,o;t.x=t.y=1;for(let a=0;a<s;a++){r=n[a],o=r.projectionDelta;const{visualElement:s}=r.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&kt(e,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Mt(e,o)),i&&xt(r.latestValues)&&kt(e,r.latestValues))}t.x<Pt&&t.x>Ct&&(t.x=1),t.y<Pt&&t.y>Ct&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=e;a?(this.projectionDelta&&this.prevProjectionDelta?(Aa(this.prevProjectionDelta.x,this.projectionDelta.x),Aa(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),$o(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===r&&this.treeScale.y===o&&Ha(this.projectionDelta.x,this.prevProjectionDelta.x)&&Ha(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),rn.value&&Ua.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const o={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,d=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(hl));let u;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,h,p,m,f,g;dl(r.x,e.x,n),dl(r.y,e.y,n),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Uo(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=o,g=n,ul(p.x,m.x,f.x,g),ul(p.y,m.y,f.y,g),u&&(l=this.relativeTarget,h=u,Fa(l.x,h.x)&&Fa(l.y,h.y))&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),ka(u,this.relativeTarget)),a&&(this.animationValues=s,function(e,t,n,i,s,r){s?(e.opacity=gt(0,n.opacity??1,Ca(i)),e.opacityExit=gt(t.opacity??1,0,Pa(i))):r&&(e.opacity=gt(t.opacity??1,n.opacity??1,i));for(let s=0;s<Sa;s++){const r=`border${ba[s]}Radius`;let o=Ma(t,r),a=Ma(n,r);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||Ea(o)===Ea(a)?(e[r]=Math.max(gt(Ta(o),Ta(a),i),0),(Ft.test(a)||Ft.test(o))&&(e[r]+="%")):e[r]=a)}(t.rotate||n.rotate)&&(e.rotate=gt(t.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ln(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=an.update(()=>{ua.hasAnimatedSinceResize=!0,$s.layout++,this.motionValue||(this.motionValue=ai(0)),this.currentAnimation=va(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{$s.layout--},onComplete:()=>{$s.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:i,latestValues:s}=e;if(t&&n&&i){if(this!==e&&this.layout&&i&&yl(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Bo(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const i=Bo(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+i}ka(t,n),kt(t,s),$o(this.projectionDeltaWithTransform,this.layoutCorrected,t,s)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Wa),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const i={};n.z&&Za("z",e,i,this.animationValues);for(let t=0;t<Ga.length;t++)Za(`rotate${Ga[t]}`,e,i,this.animationValues),Za(`skew${Ga[t]}`,e,i,this.animationValues);e.render();for(const t in i)e.setStaticValue(t,i[t]),this.animationValues&&(this.animationValues[t]=i[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=ms(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=ms(t?.pointerEvents)||""),void(this.hasProjected&&!xt(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let r=function(e,t,n){let i="";const s=e.x.translate/t.x,r=e.y.translate/t.y,o=n?.z||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),1===t.x&&1===t.y||(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:s,rotateY:r,skewX:o,skewY:a}=n;e&&(i=`perspective(${e}px) ${i}`),t&&(i+=`rotate(${t}deg) `),s&&(i+=`rotateX(${s}deg) `),r&&(i+=`rotateY(${r}deg) `),o&&(i+=`skewX(${o}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,s);n&&(r=n(s,r)),e.transform=r;const{x:o,y:a}=this.projectionDelta;e.transformOrigin=`${100*o.origin}% ${100*a.origin}% 0`,i.animationValues?e.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:e.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const t in Oi){if(void 0===s[t])continue;const{correct:n,applyTo:o,isCSSVariable:a}=Oi[t],l="none"===r?s[t]:n(s[t],i);if(o){const t=o.length;for(let n=0;n<t;n++)e[o[n]]=l}else a?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=i===this?ms(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(nl),this.root.sharedNodes.clear()}}}function Ka(e){e.updateLayout()}function Ja(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:s}=e.options,r=t.source!==e.layout.source;"size"===s?Go(e=>{const i=r?t.measuredBox[e]:t.layoutBox[e],s=Bo(i);i.min=n[e].min,i.max=i.min+s}):yl(s,t.layoutBox,n)&&Go(i=>{const s=r?t.measuredBox[i]:t.layoutBox[i],o=Bo(n[i]);s.max=s.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[i].max=e.relativeTarget[i].min+o)});const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};$o(o,n,t.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};r?$o(a,e.applyTransform(i,!0),t.measuredBox):$o(a,n,t.layoutBox);const l=!Oa(o);let c=!1;if(!e.resumeFrom){const i=e.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:r}=i;if(s&&r){const o={x:{min:0,max:0},y:{min:0,max:0}};Uo(o,t.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Uo(a,n,r.layoutBox),za(o,a)||(c=!0),i.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=o,e.relativeParent=i)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Qa(e){rn.value&&Ua.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function el(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function tl(e){e.clearSnapshot()}function nl(e){e.clearMeasurements()}function il(e){e.isLayoutDirty=!1}function sl(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function rl(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ol(e){e.resolveTargetDelta()}function al(e){e.calcProjection()}
vendor: 5,380 bytes, line 1
1function ll(e){e.resetSkewAndRotation()}function cl(e){e.removeLeadSnapshot()}function dl(e,t,n){e.translate=gt(t.translate,0,n),e.scale=gt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ul(e,t,n,i){e.min=gt(t.min,n.min,i),e.max=gt(t.max,n.max,i)}function hl(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const pl={duration:.45,ease:[.4,0,.1,1]},ml=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),fl=ml("applewebkit/")&&!ml("chrome/")?Math.round:tn;function gl(e){e.min=fl(e.min),e.max=fl(e.max)}function yl(e,t,n){return"position"===e||"preserve-aspect"===e&&(i=$a(t),s=$a(n),!(Math.abs(i-s)<=.2));var i,s}function vl(e){return e!==e.root&&e.scroll?.wasRoot}const xl=Xa({attachResizeListener:(e,t)=>Vo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),wl={current:void 0},bl=Xa({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!wl.current){const e=new xl({});e.mount(window),e.setOptions({layoutScroll:!0}),wl.current=e}return wl.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Sl={pan:{Feature:class extends Ao{constructor(){super(...arguments),this.removePointerDownListener=tn}onPointerDown(e){this.session=new Yo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:qo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:da(e),onStart:da(t),onMove:n,onEnd:(e,t)=>{delete this.session,i&&an.postRender(()=>i(e,t))}}}mount(){this.removePointerDownListener=Fo(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Ao{constructor(e){super(e),this.removeGroupControls=tn,this.removeListeners=tn,this.controls=new la(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tn}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:bl,MeasureLayout:ma}};function Tl(e,t,n){if(e instanceof EventTarget)return[e];if("string"==typeof e){let i=document;t&&(i=t.current);const s=n?.[e]??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function El(e,t){const n=Tl(e),i=new AbortController;return[n,{passive:!0,...t,signal:i.signal},()=>i.abort()]}function Ml(e){return!("touch"===e.pointerType||Io())}function Cl(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&an.postRender(()=>s(t,Oo(t)))}const Pl=(e,t)=>!!t&&(e===t||Pl(e,t.parentElement)),_l=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),jl=new WeakSet;function kl(e){return t=>{"Enter"===t.key&&e(t)}}function Al(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Ll(e){return Do(e)&&!Io()}function Nl(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&an.postRender(()=>s(t,Oo(t)))}const Rl=new WeakMap,Il=new WeakMap,Vl=e=>{const t=Rl.get(e.target);t&&t(e)},Dl=e=>{e.forEach(Vl)};const Ol={some:0,all:1},Fl=js({...No,inView:{Feature:class extends Ao{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:i="some",once:s}=e,r={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Ol[i]};return function(e,t,n){const i=function({root:e,...t}){const n=e||document;Il.has(n)||Il.set(n,{});const i=Il.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(Dl,{root:e,...t})),i[s]}(t);return Rl.set(e,n),i.observe(e),()=>{Rl.delete(e),i.unobserve(e)}}(this.node.current,r,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,s&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),r=t?n:i;r&&r(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Ao{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[i,s,r]=El(e,n),o=e=>{const i=e.currentTarget;if(!Ll(e))return;jl.add(i);const r=t(i,e),o=(e,t)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),jl.has(i)&&jl.delete(i),Ll(e)&&"function"==typeof r&&r(e,{success:t})},a=e=>{o(e,i===window||i===document||n.useGlobalTarget||Pl(i,e.target))},l=e=>{o(e,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};
1return i.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",o,s),fa(t=e)&&"offsetHeight"in t&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const i=kl(()=>{if(jl.has(n))return;Al(n,"down");const e=kl(()=>{Al(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Al(n,"cancel"),t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)})(e,s)),function(e){return _l.has(e.tagName)||-1!==e.tabIndex}(e)||e.hasAttribute("tabindex")||(e.tabIndex=0))}),r}(e,(e,t)=>(Nl(this.node,t,"Start"),(e,{success:t})=>Nl(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Ao{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Fs(Vo(this.node.current,"focus",()=>this.onFocus()),Vo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Ao{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[i,s,r]=El(e,n),o=e=>{if(!Ml(e))return;const{target:n}=e,i=t(n,e);if("function"!=typeof i||!n)return;const r=e=>{Ml(e)&&(i(e),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,s)};return i.forEach(e=>{e.addEventListener("pointerenter",o,s)}),r}(e,(e,t)=>(Cl(this.node,t,"Start"),e=>Cl(this.node,e,"End"))))}unmount(){}}},...Sl,layout:{ProjectionNode:bl,MeasureLayout:ma}},Ji);function Bl(...e){const t=!Array.isArray(e[0]),n=t?0:-1,i=e[0+n],s=Or(e[1+n],e[2+n],e[3+n]);return t?s(i):s}function zl(e){const t=ps(()=>ai(e)),{isStatic:n}=(0,d.useContext)(ts);if(n){const[,n]=(0,d.useState)(e);(0,d.useEffect)(()=>t.on("change",n),[])}return t}function $l(e,t){const n=zl(t()),i=()=>n.set(t());return i(),Es(()=>{const t=()=>an.preRender(i,!1,!0),n=e.map(e=>e.on("change",t));return()=>{n.forEach(e=>e()),ln(i)}}),n}function Hl(e,t,n,i){if("function"==typeof e)return function(e){ri.current=[],e();const t=$l(ri.current,e);return ri.current=void 0,t}(e);const s="function"==typeof t?t:Bl(t,n,i);return Array.isArray(e)?Wl(e,s):Wl([e],([e])=>s(e))}function Wl(e,t){const n=ps(()=>[]);return $l(e,()=>{n.length=0;const i=e.length;for(let t=0;t<i;t++)n[t]=e[t].get();return t(n)})}function Ul(){!gi.current&&yi();const[e]=(0,d.useState)(fi.current);return e}class Gl{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){const t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return ql(this.animations,"duration")}get iterationDuration(){return ql(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function ql(e,t){let n=0;for(let i=0;i<e.length;i++){const s=e[i][t];null!==s&&s>n&&(n=s)}return n}class Zl extends Gl{then(e,t){return this.finished.finally(e).then(()=>{})}}function Yl(e,t){return Er(e)?e[((e,t,n)=>{const i=t-0;return((n-0)%i+i)%i+0})(0,e.length,t)]:e}function Xl(e){return"object"==typeof e&&!Array.isArray(e)}function Kl(e,t,n,i){return"string"==typeof e&&Xl(t)?Tl(e,n,i):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function Jl(e,t,n){return e*(t+1)}function Ql(e,t,n,i){return"number"==typeof t?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):"<"===t?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):i.get(t)??e}function ec(e,t,n,i,s,r){!function(e,t,n){for(let i=0;i<e.length;i++){const s=e[i];s.at>t&&s.at<n&&(ni(e,s),i--)}}(e,s,r);for(let o=0;o<t.length;
1o++)e.push({value:t[o],at:gt(s,r,i[o]),easing:Yl(n,o)})}function tc(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function nc(e,t){return e.at===t.at?null===e.value?1:null===t.value?-1:0:e.at-t.at}function ic(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function sc(e,t){return t[e]||(t[e]=[]),t[e]}function rc(e){return Array.isArray(e)?e:[e]}function oc(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const ac=e=>"number"==typeof e,lc=e=>e.every(ac);class cc extends _i{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,t){if(function(e,t){return e in t}(t,e)){const n=e[t];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}}function dc(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ga(e)&&!ya(e)?new Yi(t):new zi(t);n.mount(e),vi.set(e,n)}function uc(e){const t=new cc({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),vi.set(e,t)}function hc(e,t,n,i){const s=[];if(function(e,t){return Kn(e)||"number"==typeof e||"string"==typeof e&&!Xl(t)}(e,t))s.push(va(e,Xl(t)&&t.default||t,n&&n.default||n));else{const r=Kl(e,t,i),o=r.length;Boolean(o);for(let e=0;e<o;e++){const i=r[e];qt();const a=i instanceof Element?dc:uc;vi.has(i)||a(i);const l=vi.get(i),c={...n};"delay"in c&&"function"==typeof c.delay&&(c.delay=c.delay(e,o)),s.push(...xo(l,{...t,transition:c},{}))}}return s}const pc=function(e,t,n){let i,s=[];if(r=e,Array.isArray(r)&&r.some(Array.isArray))s=function(e,t,n){const i=[],s=function(e,{defaultTransition:t={},...n}={},i,s){const r=t.duration||.3,o=new Map,a=new Map,l={},c=new Map;let d=0,u=0,h=0;for(let n=0;n<e.length;n++){const o=e[n];if("string"==typeof o){c.set(o,u);continue}if(!Array.isArray(o)){c.set(o.name,Ql(u,o.at,d,c));continue}let[p,m,f={}]=o;void 0!==f.at&&(u=Ql(u,f.at,d,c));let g=0;const y=(e,n,i,o=0,a=0)=>{const l=rc(e),{delay:c=0,times:d=Br(l),type:p="keyframes",repeat:m,repeatType:f,repeatDelay:y=0,...v}=n;let{ease:x=t.ease||"easeOut",duration:w}=n;const b="function"==typeof c?c(o,a):c,S=l.length,T=so(p)?p:s?.[p||"keyframes"];if(S<=2&&T){let e=100;if(2===S&&lc(l)){const t=l[1]-l[0];e=Math.abs(t)}const t={...v};void 0!==w&&(t.duration=Bs(w));const n=or(t,e,T);x=n.ease,w=n.duration}w??(w=r);const E=u+b;1===d.length&&0===d[0]&&(d[1]=1);const M=d.length-l.length;if(M>0&&Fr(d,M),1===l.length&&l.unshift(null),m){w=Jl(w,m);const e=[...l],t=[...d];x=Array.isArray(x)?[...x]:[x];const n=[...x];for(let i=0;i<m;i++){l.push(...e);for(let s=0;s<e.length;s++)d.push(t[s]+(i+1)),x.push(0===s?"linear":Yl(n,s-1))}tc(d,m)}const C=E+w;ec(i,l,x,d,E,C),g=Math.max(b+w,g),h=Math.max(C,h)};if(Kn(p))y(m,f,sc("default",ic(p,a)));else{const e=Kl(p,m,i,l),t=e.length;for(let n=0;n<t;n++){const i=ic(e[n],a);for(const e in m)y(m[e],oc(f,e),sc(e,i),n,t)}}d=u,u+=g}return a.forEach((e,i)=>{for(const s in e){const r=e[s];r.sort(nc);const a=[],l=[],c=[];for(let e=0;e<r.length;e++){const{at:t,value:n,easing:i}=r[e];a.push(n),l.push(Dr(0,h,t)),c.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),o.has(i)||o.set(i,{keyframes:{},transition:{}});const d=o.get(i);d.keyframes[s]=a,d.transition[s]={...t,duration:h,ease:c,times:l,...n}}}),o}(e,t,n,{spring:yr});return s.forEach(({keyframes:e,transition:t},n)=>{i.push(...hc(n,e,t))}),i}(e,t,mc);else{const{onComplete:r,...o}=n||{};"function"==typeof r&&(i=r),s=hc(e,t,o,mc)}var r;const o=new Zl(s);return i&&o.finished.then(i),o};var mc;function fc(e,t){let n;return(...i)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...i),t)}}function gc({debounce:e,scroll:t,polyfill:n,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){const s=n||("undefined"==typeof window?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[r,o]=(0,d.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}
1),a=(0,d.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:r,orientationHandler:null}),l=e?"number"==typeof e?e:e.scroll:null,c=e?"number"==typeof e?e:e.resize:null,u=(0,d.useRef)(!1);(0,d.useEffect)(()=>(u.current=!0,()=>{u.current=!1}));const[h,p,m]=(0,d.useMemo)(()=>{const e=()=>{if(!a.current.element)return;const{left:e,top:t,width:n,height:s,bottom:r,right:l,x:c,y:d}=a.current.element.getBoundingClientRect(),h={left:e,top:t,width:n,height:s,bottom:r,right:l,x:c,y:d};a.current.element instanceof HTMLElement&&i&&(h.height=a.current.element.offsetHeight,h.width=a.current.element.offsetWidth),Object.freeze(h),u.current&&!xc(a.current.lastBounds,h)&&o(a.current.lastBounds=h)};return[e,c?fc(e,c):e,l?fc(e,l):e]},[o,i,l,c]);function f(){a.current.scrollContainers&&(a.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",m,!0)),a.current.scrollContainers=null),a.current.resizeObserver&&(a.current.resizeObserver.disconnect(),a.current.resizeObserver=null),a.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",a.current.orientationHandler))}function g(){a.current.element&&(a.current.resizeObserver=new s(m),a.current.resizeObserver.observe(a.current.element),t&&a.current.scrollContainers&&a.current.scrollContainers.forEach(e=>e.addEventListener("scroll",m,{capture:!0,passive:!0})),a.current.orientationHandler=()=>{m()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",a.current.orientationHandler))}return function(e,t){(0,d.useEffect)(()=>{if(t){const t=e;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",t,!0)}}},[e,t])}(m,!!t),function(e){(0,d.useEffect)(()=>{const t=e;return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e])}(p),(0,d.useEffect)(()=>{f(),g()},[t,m,p]),(0,d.useEffect)(()=>f,[]),[e=>{!e||e===a.current.element||(f(),a.current.element=e,a.current.scrollContainers=yc(e),g())},r,h]}function yc(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:i,overflowY:s}=window.getComputedStyle(e);return[n,i,s].some(e=>"auto"===e||"scroll"===e)&&t.push(e),[...t,...yc(e.parentElement)]}const vc=["x","y","top","bottom","left","right","width","height"],xc=(e,t)=>vc.every(n=>e[n]===t[n]);var wc=(0,d.createContext)(void 0);function bc(){const e=(0,d.useContext)(wc);if(!e)throw new Error("Sheet context error");return e}var Sc={base:{position:"fixed",top:0,bottom:0,left:0,right:0,overflow:"hidden",pointerEvents:"none"},decorative:{}},Tc={base:{zIndex:1,position:"fixed",top:0,left:0,width:"100%",height:"100%",touchAction:"none",userSelect:"none"},decorative:{backgroundColor:"rgba(0, 0, 0, 0.2)",border:"none",WebkitTapHighlightColor:"transparent"}},Ec={base:{zIndex:2,position:"absolute",left:0,bottom:0,width:"100%",pointerEvents:"auto",display:"flex",flexDirection:"column"},decorative:{backgroundColor:"#fff",borderTopRightRadius:"8px",borderTopLeftRadius:"8px",boxShadow:"0px -2px 16px rgba(0, 0, 0, 0.3)"}},Mc={base:{width:"100%"},decorative:{}},Cc={base:{width:"100%",position:"relative"},decorative:{height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}},Pc={base:{display:"flex"},decorative:{}},_c={base:{display:"inline-block"},decorative:{width:"18px",height:"4px",borderRadius:"99px",backgroundColor:"#ddd"}},jc={base:{minHeight:"0px",position:"relative",flexGrow:1,display:"flex",flexDirection:"column"},decorative:{}},kc={base:{height:"100%",overflowY:"auto",overscrollBehaviorY:"none"},decorative:{}},Ac="calc(100% - env(safe-area-inset-top) - 34px)",Lc="undefined"==typeof window,Nc={ease:"easeOut",duration:.2},Rc={ease:"linear",duration:.01};function Ic(e,t){return t?e.base:{...e.base,...e.decorative}}function Vc(e){return t=>
1{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})}}function Dc(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function Oc(e){let t=null;return()=>(null==t&&(t=e()),t)}var Fc=Oc(function(){return Dc(/^Mac/i)}),Bc=Oc(function(){return Dc(/^iPhone/i)}),zc=Oc(function(){return Dc(/^iPad/i)||Fc()&&navigator.maxTouchPoints>1}),$c=Oc(function(){return Bc()||zc()}),Hc=(0,d.forwardRef)(({style:e,className:t="",unstyled:n,...i},s)=>{const r=bc(),o=!!(a=i).onClick||!!a.onTap;var a;const l=o?Fl.button:Fl.div,c=o?"auto":"none",u=n??r.unstyled,h={...Ic(Tc,u),...e,pointerEvents:c};return d.createElement(l,{...i,ref:s,className:`react-modal-sheet-backdrop ${t}`,style:h,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:1}})});Hc.displayName="SheetBackdrop";var Wc=(0,d.forwardRef)(({children:e,style:t,className:n="",unstyled:i,...s},r)=>{const o=bc(),a=i??o.unstyled,l={...Ic(Ec,a),...t,y:o.y};return"default"===o.detent&&(l.height=Ac),"full"===o.detent&&(l.height="100%",l.maxHeight="100%"),"content"===o.detent&&(l.height="auto",l.maxHeight=Ac),d.createElement(Fl.div,{...s,ref:Vc([r,o.sheetRef,o.sheetBoundsRef]),className:`react-modal-sheet-container ${n}`,style:l},e)});Wc.displayName="SheetContainer";var Uc={bottom:0,top:0,left:0,right:0};function Gc(){return{ref:(0,d.useRef)(null),onMeasure:(0,d.useCallback)(()=>Uc,[])}}var qc=(0,d.forwardRef)(({disableScroll:e,disableDrag:t,children:n,style:i,className:s="",scrollClassName:r="",scrollStyle:o,scrollRef:a=null,unstyled:l,...c},u)=>{const h=bc(),p=Gc(),m=function(e={}){const{debounceDelay:t=32,isEnabled:n=!0}=e,[i,s]=(0,d.useState)(null),[r,o]=(0,d.useState)(void 0);return(0,d.useEffect)(()=>{if(!i||!n)return;let e=null;function s(e){const{scrollTop:t,scrollHeight:n,clientHeight:i}=e;if(!(n>i))return void(r&&o(void 0));const s=t<=0,a=Math.ceil(n)-Math.ceil(t)===Math.ceil(i);let l;l=s?"top":a?"bottom":"middle",l!==r&&o(l)}function a(n){if(n.currentTarget instanceof HTMLElement){const i=n.currentTarget;e&&clearTimeout(e),0===t?s(i):e=setTimeout(()=>s(i),t)}}function l(e){e.currentTarget instanceof HTMLElement&&s(e.currentTarget)}return s(i),i.addEventListener("scroll",a),i.addEventListener("touchstart",l),()=>{e&&clearTimeout(e),i.removeEventListener("scroll",a),i.removeEventListener("touchstart",l)}},[i,n]),{scrollRef:e=>s(e),scrollPosition:r}}(),f="function"==typeof e?e({scrollPosition:m.scrollPosition,currentSnap:h.currentSnap}):Boolean(e),g=!f&&m.scrollPosition&&"top"!==m.scrollPosition,y=("function"==typeof t?t({scrollPosition:m.scrollPosition,currentSnap:h.currentSnap}):Boolean(t))||g||h.disableDrag||h.disableDrag?void 0:h.dragProps,v=l??h.unstyled,x={...Ic(jc,v),...i},w=Ic(kc,v);return h.avoidKeyboard&&(w.paddingBottom="env(keyboard-inset-height, var(--keyboard-inset-height, 0px))"),f&&(w.overflowY="hidden"),d.createElement(Fl.div,{...c,ref:Vc([u,p.ref]),className:`react-modal-sheet-content ${s}`,style:x,...y,dragConstraints:p.ref,onMeasureDragConstraints:p.onMeasure},d.createElement(Fl.div,{ref:Vc([m.scrollRef,a]),style:{...w,...o},className:`react-modal-sheet-content-scroller ${r}`},n))});function Zc({style:e,className:t="",unstyled:n,...i}){const s=bc(),r=Hl(s.indicatorRotation,e=>`translateX(2px) rotate(${e}deg)`),o=Hl(s.indicatorRotation,e=>`translateX(-2px) rotate(${-1*e}deg)`),a=n??s.unstyled,l={...Ic(Pc,a),...e},c=Ic(_c,a);return d.createElement("div",{className:`react-modal-sheet-drag-indicator-container ${t}`,style:l,...i},d.createElement(Fl.span,{className:"react-modal-sheet-drag-indicator",style:{...c,transform:r}}),d.createElement(Fl.span,{className:"react-modal-sheet-drag-indicator",style:{...c,transform:o}}))}qc.displayName="SheetContent";var Yc=(0,d.forwardRef)(({children:e,style:t,disableDrag:n,unstyled:i,className:s="",...r},o)=>{const a=bc(),l=Gc(),c=n||a.disableDrag?void 0:a.dragProps,u=i??a.unstyled,h={...Ic(Mc,u),...t},p=Ic(Cc,u);return d.createElement(Fl.div,{...r,ref:Vc([o,l.ref]),style:h,className:`react-modal-sheet-header-container ${s}`,...c,dragConstraints:l.ref,onMeasureDragConstraints:l.onMeasure},e||d.createElement("div",{className:"react-modal-sheet-header",style:p},d.createElement(Zc,null)))});Yc.displayName="SheetHeader";var Xc=Lc?d.useEffect:d.useLayoutEffect;function Kc(e,t){const n=e.getPropertyValue(t).replace("px","").trim();return parseInt(n,10)||0}
1function Jc(e){const t=document.querySelector(`#${e}`),n=document.querySelector("body");t&&(n.style.removeProperty("background-color"),t.style.removeProperty("overflow"),t.style.removeProperty("transition-timing-function"),t.style.removeProperty("transition-property"),t.style.removeProperty("transition-duration"),t.style.removeProperty("transform-origin"),t.style.removeProperty("transform"),t.style.removeProperty("border-top-right-radius"),t.style.removeProperty("border-top-left-radius"))}function Qc(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}var ed="undefined"!=typeof document&&window.visualViewport;function td(e,t){if(!e)return!1;const n=window.getComputedStyle(e);let i=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return i&&t&&(i=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),i}function nd(e,t){let n=e;for(td(n,t)&&(n=n.parentElement);n&&!td(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}var id,sd=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),rd=0;function od(e,t,n){const i=e.style[t];return e.style[t]=n,()=>{e.style[t]=i}}function ad(e,t,n,i){return e.addEventListener(t,n,i),()=>{e.removeEventListener(t,n,i)}}function ld(e){const t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){const t=nd(e);if(t!==document.documentElement&&t!==document.body&&t!==e){const n=t.getBoundingClientRect().top,i=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=i-n)}e=t.parentElement}}function cd(e){return e instanceof HTMLInputElement&&!sd.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function dd(e){const t=(0,d.useRef)(void 0);return Xc(()=>{t.current=e}),(0,d.useCallback)((...e)=>{const n=t.current;return null==n?void 0:n(...e)},[])}var ud=(0,d.forwardRef)(({avoidKeyboard:e=!0,children:t,className:n="",detent:i="default",disableDismiss:s=!1,disableDrag:r=!1,disableScrollLocking:o=!1,dragCloseThreshold:a=.6,dragVelocityThreshold:l=500,initialSnap:c,isOpen:u,modalEffectRootId:h,modalEffectThreshold:p,mountPoint:m,prefersReducedMotion:f=!1,snapPoints:g,style:y,tweenConfig:v=Nc,unstyled:x=!1,onOpenStart:w,onOpenEnd:b,onClose:S,onCloseStart:T,onCloseEnd:E,onSnap:M,onDrag:C,onDragStart:P,onDragEnd:_,...j},k)=>{const[L,N]=gc(),R=(0,d.useRef)(null),I=Math.round(N.height),[V,D]=(0,d.useState)(c),O=g&&I>0?function({snapPointsProp:e,sheetHeight:t}){if(0!==e[0]&&(console.error(`First snap point should be 0 to ensure the sheet can be fully closed. Got: [${e.join(", ")}]`),e.unshift(0)),1!==e[e.length-1]&&(console.error(`Last snap point should be 1 to ensure the sheet can be fully opened. Got: [${e.join(", ")}]`),e.push(1)),t<=0)return console.error(`Sheet height is ${t}, cannot compute snap points. Make sure the sheet is mounted and has a valid height.`),[];const n=e.map(e=>e>0&&e<=1?Math.round(e*t):e<0?t+e:e);return console.assert(function(e){for(let t=0;t<e.length;t++)if(e[t+1]<e[t])return!1;return!0}(n),`Snap points need to be in ascending order got: [${e.join(", ")}]`),n.forEach(e=>{(e<0||e>t)&&console.warn(`Snap point ${e} is outside of the sheet height ${t}. This can cause unexpected behavior. Consider adjusting your snap points.`)}),n.includes(t)||(console.warn("Snap points do not include the sheet height.Please include `1` as the last snap point or it will be included automatically.This is to ensure the sheet can be fully opened."),n.push(t)),n.map((e,n)=>({snapIndex:n,snapValue:e,snapValueY:t-e}))}({sheetHeight:I,snapPointsProp:g}):[],{windowHeight:F}=function(){const[e,t]=(0,d.useState)(()=>({windowHeight:Lc?0:window.innerHeight,windowWidth:Lc?0:window.innerWidth}));return Xc(()=>{function e(){t({windowHeight:window.innerHeight,windowWidth:window.innerWidth})}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),e}(),B=I>0?I:F,z=zl(B),$=Hl(z,e=>Math.max(I-e,0)),H=zl(0),W=Ul(),U={type:"tween",...Boolean(f||W)?Rc:v},G=function(e={}){const{containerRef:t,isEnabled:n=!0,debounceDelay:i=100,includeContentEditable:s=!0,visualVie
1wportThreshold:r=100}=e,[o,a]=(0,d.useState)({isVisible:!1,height:0}),l=(0,d.useRef)(null),c=(0,d.useRef)(null),u=dd(e=>"INPUT"===(null==e?void 0:e.tagName)||"TEXTAREA"===(null==e?void 0:e.tagName)||s&&e instanceof HTMLElement&&e.isContentEditable);return(0,d.useEffect)(()=>{if(!n)return;const e=window.visualViewport,s=navigator.virtualKeyboard;function o(e){const n=(null==t?void 0:t.current)||document.documentElement;window.isSecureContext?n.style.setProperty("--keyboard-inset-height",`env(keyboard-inset-height, ${e}px)`):n.style.setProperty("--keyboard-inset-height",`${e}px`)}function d(e){e.target instanceof HTMLElement&&u(e.target)&&(l.current=e.target,p())}function h(){l.current=null,p()}function p(){c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{const t=l.current;if(!u(t))return o(0),void a({isVisible:!1,height:0});if(e){const t=window.innerHeight-e.height;t>r?(o(t),a({isVisible:!0,height:t})):(o(0),a({isVisible:!1,height:0}))}},i)}window.addEventListener("focusin",d),window.addEventListener("focusout",h),e&&(e.addEventListener("resize",p),e.addEventListener("scroll",p));let m=!1;return s&&(m=s.overlaysContent,s.overlaysContent=!0),()=>{window.removeEventListener("focusin",d),window.removeEventListener("focusout",h),e&&(e.removeEventListener("resize",p),e.removeEventListener("scroll",p)),s&&(s.overlaysContent=m),c.current&&clearTimeout(c.current)}},[i,s,n,r]),{keyboardHeight:o.height,isKeyboardOpen:o.isVisible}}({isEnabled:u&&e,containerRef:R}),q=G.isKeyboardOpen||r,Z=Hl(z,e=>e+2>=B?-1:(null==y?void 0:y.zIndex)??9999),Y=Hl(z,e=>e+2>=B?"hidden":"visible"),X=dd(e=>{D(e),null==M||M(e)}),K=dd(e=>g&&O?e<0||e>=O.length?(console.warn(`Invalid snap index ${e}. Snap points are: [${g.join(", ")}] and their computed values are: [${O.map(e=>e.snapValue).join(", ")}]`),null):O[e]:null),J=dd(async e=>{if(!g)return void console.warn("Snapping is not possible without `snapPoints` prop.");const t=K(e);null!==t?0!==e?await pc(z,t.snapValueY,{...U,onComplete:()=>X(e)}):S():console.warn(`Invalid snap index ${e}.`)}),Q=dd(()=>{const e=document.activeElement;e&&R.current&&("INPUT"===e.tagName||"TEXTAREA"===e.tagName)&&R.current.contains(e)&&e.blur()}),ee=dd((e,t)=>{null==C||C(e,t);const n=z.get(),i=z.getVelocity();i>0&&H.set(10),i<0&&H.set(-10),z.set(Math.max(n+t.delta.y,0))}),te=dd((e,t)=>{Q(),null==P||P(e,t)}),ne=dd((e,t)=>{Q(),null==_||_(e,t);const n=z.get();let i=0;const r=void 0!==V?K(V):null;if(r){const e=t.offset.y>0?"down":"up",o=t.velocity.y>0?"down":"up";let a;if(a=Math.abs(t.velocity.y)>l?function({dragDirection:e,snapPoints:t}){const n=t[0],i=t[t.length-1];return"down"===e?{yTo:n.snapValueY,snapIndex:n.snapIndex}:{yTo:i.snapValueY,snapIndex:i.snapIndex}}({snapPoints:O,dragDirection:o}):function({currentSnapPoint:e,currentY:t,dragDirection:n,snapPoints:i,velocity:s}){const r=function({snapPoints:e,currentY:t}){return e.reduce((e,n)=>Math.abs(n.snapValueY-t)<Math.abs(e.snapValueY-t)?n:e)}({snapPoints:i,currentY:t});if(Math.abs(s)<20)return{yTo:r.snapValueY,snapIndex:r.snapIndex};const o=function({y:e,snapPoints:t,dragDirection:n}){return"down"===n?t.slice().reverse().find(t=>t.snapValueY>e):t.find(t=>t.snapValueY<e)}({y:t,snapPoints:i,dragDirection:n});return o?{yTo:o.snapValueY,snapIndex:o.snapIndex}:{yTo:e.snapValueY,snapIndex:e.snapIndex}}({currentSnapPoint:r,currentY:n,dragDirection:e,snapPoints:O,velocity:t.velocity.y}),i=a.yTo,s&&i+1>=I){const e=O.find(e=>e.snapValue>0);e?(i=e.snapValueY,X(e.snapIndex)):i=n}else void 0!==a.snapIndex&&X(a.snapIndex)}else(t.velocity.y>l||n>I*a)&&(i=s?0:B);pc(z,i,U),i+1>=I&&!s&&S(),H.set(0)});(0,d.useImperativeHandle)(k,()=>({y:z,yInverted:$,height:I,snapTo:J})),function({y:e,detent:t,rootId:n,sheetHeight:i,snapPoints:s,startThreshold:r}){const o=function(){const[e]=(0,d.useState)(()=>{const e={top:0,left:0,right:0,bottom:0};if(Lc)return e;const t=document.querySelector(":root");if(!t)return e;t.style.setProperty("--rms-sat","env(safe-area-inset-top)"),t.style.setProperty("--rms-sal","env(safe-area-inset-left)"),t.style.setProperty("--rms-sar","env(safe-area-inset-right)"),t.style.setProperty("--rms-sab","env(safe-area-inset-bottom)");const n=getComputedStyle(t),i=Kc(n,"--rms-sat"),s=Kc(n,"--rms-sal"),r=Kc(n,"--rms-sar"),o=Kc(n,"--rms-sab");return t.style.removeProperty("--rms-sat"),t.style.removeProperty("--rms-sal"),t.style.removeProperty("--rms-sar"),t.style.removeProperty("--rms-sab"),{top:i,left:s,right:r,bottom:o}});return e}().top;let a=n;a&&"full"===t&&(console.warn('Using "full" detent with modal effect is not supported.'),a=void 0),Xc(()=>()=>{a&&Jc(a)},[]),Xc(()=>
1{if(!a)return;const t=document.querySelector(`#${a}`);if(!t)return;const n=e.on("animationStart",()=>{!function(e){const t=document.querySelector(`#${e}`),n=document.querySelector("body");t&&(n.style.backgroundColor="#000",t.style.overflow="hidden",t.style.transitionTimingFunction="cubic-bezier(0.32, 0.72, 0, 1)",t.style.transitionProperty="transform, border-radius",t.style.transitionDuration="0.5s",t.style.transformOrigin="center top")}(a)}),l=e.on("change",e=>{if(!t)return;let n=Math.max(0,1-e/i);const a=s.length>1?s[s.length-2]:void 0;if(void 0!==a){const t=a.snapValueY;n=e<=t?(t-e)/t:0}if(void 0!==r){const t=i-Math.min(Math.floor(r*i),i);n=e<=t?(t-e)/t:0}n=Math.max(0,Math.min(1,n));const l=window.innerWidth,c=Bl(n,[0,1],[0,24+o]),d=Bl(n,[0,1],[1,(l-16)/l]),u=Bl(n,[0,1],[0,10]);t.style.transform=`scale(${d}) translate3d(0, ${c}px, 0)`,t.style.borderTopRightRadius=`${u}px`,t.style.borderTopLeftRadius=`${u}px`});function c(){e.get()-5>=i&&Jc(a)}const d=e.on("animationComplete",c),u=e.on("animationCancel",c);return()=>{n(),l(),d(),u()}},[e,a,o,r,i])}({y:z,detent:i,sheetHeight:I,snapPoints:O,rootId:h,startThreshold:p}),function(e={}){const{isDisabled:t}=e;Xc(()=>{if(!t)return 1===++rd&&(id=$c()?function(){let e,t=0;const n=window.pageXOffset,i=window.pageYOffset,s=Qc(od(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"),od(document.documentElement,"overflow","hidden"),od(document.body,"marginTop",`-${i}px`));window.scrollTo(0,0);const r=Qc(ad(document,"touchstart",n=>{var i;const s=null==(i=n.composedPath())?void 0:i[0];e=nd(s,!0),e===document.documentElement&&e===document.body||(t=n.changedTouches[0].pageY)},{passive:!1,capture:!0}),ad(document,"touchmove",n=>{if(void 0===e)return;if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();const i=n.changedTouches[0].pageY,s=e.scrollTop,r=e.scrollHeight-e.clientHeight;0!==r&&((s<=0&&i>t||s>=r&&i<t)&&n.preventDefault(),t=i)},{passive:!1,capture:!0}),ad(document,"touchend",e=>{var t;const n=null==(t=e.composedPath())?void 0:t[0];cd(n)&&n!==document.activeElement&&(e.preventDefault(),n.style.transform="translateY(-2000px)",n.focus(),requestAnimationFrame(()=>{n.style.transform=""}))},{passive:!1,capture:!0}),ad(document,"focus",e=>{var t;const n=null==(t=e.composedPath())?void 0:t[0];cd(n)&&(n.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{n.style.transform="",ed&&(ed.height<window.innerHeight?requestAnimationFrame(()=>{ld(n)}):ed.addEventListener("resize",()=>ld(n),{once:!0}))}))},!0),ad(window,"scroll",()=>{window.scrollTo(0,0)}));return()=>{s(),r(),window.scrollTo(n,i)}}():Qc(od(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"),od(document.documentElement,"overflow","hidden"))),()=>{0===--rd&&(null==id||id())}},[t])}({isDisabled:o||!u});const ie=function({isOpen:e,onClosed:t,onOpening:n,onOpen:i,onClosing:s}){const[r,o]=(0,d.useState)(e?"opening":"closed"),a=dd(()=>null==t?void 0:t()),l=dd(()=>null==n?void 0:n()),c=dd(()=>null==i?void 0:i()),u=dd(()=>null==s?void 0:s());return(0,d.useEffect)(()=>{e&&"closed"===r?o("opening"):e||"open"!==r&&"opening"!==r||o("closing")},[e,r]),(0,d.useEffect)(()=>{(async function(){switch(r){case"closed":await(null==a?void 0:a());break;case"opening":await(null==l?void 0:l()),o("open");break;case"open":await(null==c?void 0:c());break;case"closing":await(null==u?void 0:u()),o("closed")}})().catch(e=>{console.error("Internal sheet state error:",e)})},[r]),r}({isOpen:u,onOpen:async()=>{null==w||w(),await function(e,t=50,n=20){return new Promise(i=>{let s=0;const r=setInterval(()=>{const t=document.getElementsByClassName(e)[0];s++,(t||s>=n)&&(clearInterval(r),i(t))},t)})}("react-modal-sheet-container");const e=void 0!==c?K(c):null,t=(null==e?void 0:e.snapValueY)??0;await pc(z,t,U),void 0!==c&&X(c),null==b||b()},onClosing:async()=>{null==T||T(),await pc(z,B,U),null==E||E()}}),se={currentSnap:V,detent:i,disableDrag:q,dragProps:{drag:"y",dragElastic:0,dragMomentum:!1,dragPropagation:!1,onDrag:ee,onDragStart:te,onDragEnd:ne},indicatorRotation:H,avoidKeyboard:e,sheetBoundsRef:L,sheetRef:R,unstyled:x,y:z},re=d.createElement(wc.Provider,{value:se},d.createElement(Fl.div,{...j,ref:k,"data-sheet-state":ie,className:`react-modal-sheet-root ${n}`,style:{...Ic(Sc,x),zIndex:Z,visibility:Y,...y}},"closed"!==ie?t:null));return Lc?re:(0,A.createPortal)(re,m??document.body)});ud.displayName="Sheet";var hd=Object.assign(ud,{Container:Wc,Header:Yc,DragIndicator:Zc,Content:qc,Backdrop:Hc});const pd=[0,200,1],md=pd.length-1;function fd({open:e,onClose:t,children:n}){return(0,d.useRef)(),(0,Z.jsxs)(hd,{isOpen:e,onClose:t,initialSnap:md,snapPoints:pd,detent:"content",children:[(0,Z.jsxs)(hd.Container,{children:[(0,Z.jsx)(hd.Header,{}),(0,Z.jsx)(hd.Content,{disableDrag:!0,disableScroll:e=>e.currentSnap!==md,children:(0,Z.jsxs)("div",{className:"rss-content",children:[(0,Z.jsx)("button",{type:"button",className:"close-button","aria-label":"Fermer le panneau",onClick:t}),n]})})]}),(0,Z.jsx)(hd.Backdrop,{onTap:t})]})}const gd=function(){return(0,Z.jsx)("div",{className:"loader",children:(0,Z.jsx)("div",{className:"spinner"})})};function yd(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function vd(e={},t={}){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(e=>
vendor: 39,076 bytes, line 1
1n.indexOf(e)<0).forEach(n=>{void 0===e[n]?e[n]=t[n]:yd(t[n])&&yd(e[n])&&Object.keys(t[n]).length>0&&vd(e[n],t[n])})}const xd={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function wd(){const e="undefined"!=typeof document?document:{};return vd(e,xd),e}const bd={document:xd,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function Sd(){const e="undefined"!=typeof window?window:{};return vd(e,bd),e}function Td(e,t=0){return setTimeout(e,t)}function Ed(){return Date.now()}function Md(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function Cd(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function Pd(...e){const t=Object(e[0]),n=["__proto__","constructor","prototype"];for(let i=1;i<e.length;i+=1){const s=e[i];if(null!=s&&!Cd(s)){const e=Object.keys(Object(s)).filter(e=>n.indexOf(e)<0);for(let n=0,i=e.length;n<i;n+=1){const i=e[n],r=Object.getOwnPropertyDescriptor(s,i);void 0!==r&&r.enumerable&&(Md(t[i])&&Md(s[i])?s[i].__swiper__?t[i]=s[i]:Pd(t[i],s[i]):!Md(t[i])&&Md(s[i])?(t[i]={},s[i].__swiper__?t[i]=s[i]:Pd(t[i],s[i])):t[i]=s[i])}}}return t}function _d(e,t,n){e.style.setProperty(t,n)}function jd({swiper:e,targetPosition:t,side:n}){const i=Sd(),s=-e.translate;let r,o=null;const a=e.params.speed;e.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(e.cssModeFrameID);const l=t>s?"next":"prev",c=(e,t)=>"next"===l&&e>=t||"prev"===l&&e<=t,d=()=>{r=(new Date).getTime(),null===o&&(o=r);const l=Math.max(Math.min((r-o)/a,1),0),u=.5-Math.cos(l*Math.PI)/2;let h=s+u*(t-s);if(c(h,t)&&(h=t),e.wrapperEl.scrollTo({[n]:h}),c(h,t))return e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[n]:h})}),void i.cancelAnimationFrame(e.cssModeFrameID);e.cssModeFrameID=i.requestAnimationFrame(d)};d()}function kd(e,t=""){const n=Sd(),i=[...e.children];return n.HTMLSlotElement&&e instanceof HTMLSlotElement&&i.push(...e.assignedElements()),t?i.filter(e=>e.matches(t)):i}function Ad(e){try{return void console.warn(e)}catch(e){}}function Ld(e,t=[]){const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:function(e=""){return e.trim().split(" ").filter(e=>!!e.trim())}(t)),n}function Nd(e,t){return Sd().getComputedStyle(e,null).getPropertyValue(t)}function Rd(e){let t,n=e;if(n){for(t=0;null!==(n=n.previousSibling);)1===n.nodeType&&(t+=1);return t}}function Id(e,t,n){const i=Sd();return n?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}function Vd(e,t=""){"undefined"!=typeof trustedTypes?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:e=>e}).createHTML(t):e.innerHTML=t}let Dd,Od,Fd;function Bd(){return Dd||(Dd=function(){const e=Sd(),t=wd();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),Dd}function zd(e={}){return Od||(Od=function({userAgent:e}={}){const t=Bd(),n=Sd(),i=n.navigator.platform,s=e||n.navigator.userAgent,r={ios:!1,android:!1},o=n.screen.width,a=n.screen.height,l=s.match(/(Android);?[\s\/]+([\d.]+)?/);let c=s.match(/(iPad)(?!\1).*OS\s([\d_]+)/);const d=s.match(/(iPod)(.*OS\s([\d_]+))?/),u=!c&&s.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h="Win32"===i;let p="MacIntel"===i;return!c&&p&&t.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${o}x${a}`)>=0&&(c=s.match(/(Version)\/([\d.]+)/),c||(c=[0,1,"13_0_0"]),p=!1),l&&!h&&(r.os="android",r.android=!0),(c||u||d)&&(r.os="ios",r.ios=!0),r}(e)),Od}function $d(){return Fd||(Fd=function(){const e=Sd(),t=zd();let n=!1;function i(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(i()){const t=String(e.navigator.userAgent);if(t.includes("Version/")){const[e,i]=t.split("Version/")[1].split(" ")[0].split(".").map(e=>Number(e));n=e<16||16===e&&i<2}}const s=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),r=i();return{isSafari:n||r,needPerspectiveFix:n,need3dFix:r||s&&t.ios,isWebView:s}}()),Fd}var Hd={on(e,t,n){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;const s=n?"unshift":"push";return e.split(" ").forEach(e=>{i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][s](t)}),i},once(e,t,n){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;function s(...n){i.off(e,s),s.__emitterProxy&&delete s.__emitterProxy,t.apply(i,n)}return s.__emitterProxy=t,i.on(e,s,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof e)return n;const i=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[i](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed?n:n.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach((i,s)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&n.eventsListeners[e].splice(s,1)})}),n):n},emit(...e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsListeners)return t;let n,i,s;return"string"==typeof e[0]||Array.isArray(e[0])?(n=e[0],i=e.slice(1,e.length),s=t):(n=e[0].events,i=e[0].data,s=e[0].context||t),i.unshift(s),(Array.isArray(n)?n:n.split(" ")).forEach(e=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach(t=>{t.apply(s,[e,...i])}),t.eventsListeners&&t.eventsListeners[e]&&t.eventsListeners[e].forEach(e=>{e.apply(s,i)})}),t}};const Wd=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)},Ud=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)},Gd=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(n){let t=n.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(n.shadowRoot?t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{n.shadowRoot&&(t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())})),t&&t.remove()}},qd=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},Zd=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const i="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),s=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const n=s,r=[n-t];return r.push(...Array.from({length:t}).map((e,t)=>n+i+t)),void e.slides.forEach((t,n)=>{r.includes(t.column)&&qd(e,n)})}const r=s+i-1;if(e.params.rewind||e.params.loop)for(let i=s-t;i<=r+t;i+=1){const t=(i%n+n)%n;(t<s||t>r)&&qd(e,t)}else for(let i=Math.max(s-t,0);i<=Math.min(r+t,n-1);i+=1)i!==s&&(i>r||i<s)&&qd(e,i)};var Yd={updateSize:function(){const e=this;let t,n;const i=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:i.clientWidth,n=void 0!==e.params.height&&null!==e.params.height?e.params.height:i.clientHeight,0===t&&e.isHorizontal()||0===n&&e.isVertical()||(t=t-parseInt(Nd(i,"padding-left")||0,10)-parseInt(Nd(i,"padding-right")||0,10),n=n-parseInt(Nd(i,"padding-top")||0,10)-parseInt(Nd(i,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))},updateSlides:function(){const e=this;function t(t,n){return parseFloat(t.getPropertyValue(e.getDirectionLabel(n))||0)}const n=e.params,{wrapperEl:i,slidesEl:s,rtlTranslate:r,wrongRTL:o}=e,a=e.virtual&&n.virtual.enabled,l=a?e.virtual.slides.length:e.slides.length,c=kd(s,`.${e.params.slideClass}, swiper-slide`),d=a?e.virtual.slides.length:c.length;let u=[];const h=[],p=[];let m=n.slidesOffsetBefore;"function"==typeof m&&(m=n.slidesOffsetBefore.call(e));let f=n.slidesOffsetAfter;"function"==typeof f&&(f=n.slidesOffsetAfter.call(e));const g=e.snapGrid.length,y=e.slidesGrid.length,v=e.size-m-f;let x=n.spaceBetween,w=-m,b=0,S=0;if(void 0===v)return;"string"==typeof x&&x.indexOf("%")>=0?x=parseFloat(x.replace("%",""))/100*v:"string"==typeof x&&(x=parseFloat(x)),e.virtualSize=-x-m-f,c.forEach(e=>{r?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(_d(i,"--swiper-centered-offset-before",""),_d(i,"--swiper-centered-offset-after",""));const T=n.grid&&n.grid.rows>1&&e.grid;let E;T?e.grid.initSlides(c):e.grid&&e.grid.unsetSlides();const M="auto"===n.slidesPerView&&n.breakpoints&&Object.keys(n.breakpoints).filter(e=>void 0!==n.breakpoints[e].slidesPerView).length>0;for(let i=0;i<d;i+=1){E=0;const s=c[i];if(!s||(T&&e.grid.updateSlide(i,s,c),"none"!==Nd(s,"display"))){if(a&&"auto"===n.slidesPerView)n.virtual.slidesPerViewAutoSlideSize&&(E=n.virtual.slidesPerViewAutoSlideSize),E&&s&&(n.roundLengths&&(E=Math.floor(E)),s.style[e.getDirectionLabel("width")]=`${E}px`);else if("auto"===n.slidesPerView){M&&(s.style[e.getDirectionLabel("width")]="");const i=getComputedStyle(s),r=s.style.transform,o=s.style.webkitTransform;if(r&&(s.style.transform="none"),o&&(s.style.webkitTransform="none"),n.roundLengths)E=e.isHorizontal()?Id(s,"width",!0):Id(s,"height",!0);else{const e=t(i,"width"),n=t(i,"padding-left"),r=t(i,"padding-right"),o=t(i,"margin-left"),a=t(i,"margin-right"),l=i.getPropertyValue("box-sizing");if(l&&"border-box"===l)E=e+o+a;else{const{clientWidth:t,offsetWidth:i}=s;E=e+n+r+o+a+(i-t)}}r&&(s.style.transform=r),o&&(s.style.webkitTransform=o),n.roundLengths&&(E=Math.floor(E))}else E=(v-(n.slidesPerView-1)*x)/n.slidesPerView,n.roundLengths&&(E=Math.floor(E)),s&&(s.style[e.getDirectionLabel("width")]=`${E}px`);s&&(s.swiperSlideSize=E),p.push(E),n.centeredSlides?(w=w+E/2+b/2+x,0===b&&0!==i&&(w=w-v/2-x),0===i&&(w=w-v/2-x),Math.abs(w)<.001&&(w=0),n.roundLengths&&(w=Math.floor(w)),S%n.slidesPerGroup===0&&u.push(w),h.push(w)):(n.roundLengths&&(w=Math.floor(w)),(S-Math.min(e.params.slidesPerGroupSkip,S))%e.params.slidesPerGroup===0&&u.push(w),h.push(w),w=w+E+x),e.virtualSize+=E+x,b=E,S+=1}}if(e.virtualSize=Math.max(e.virtualSize,v)+f,r&&o&&("slide"===n.effect||"coverflow"===n.effect)&&(i.style.width=`${e.virtualSize+x}px`),n.setWrapperSize&&(i.style[e.getDirectionLabel("width")]=`${e.virtualSize+x}px`),T&&e.grid.updateWrapperSize(E,u),!n.centeredSlides){const t=[];for(let i=0;i<u.length;i+=1){let s=u[i];n.roundLengths&&(s=Math.floor(s)),u[i]<=e.virtualSize-v&&t.push(s)}u=t,Math.floor(e.virtualSize-v)-Math.floor(u[u.length-1])>1&&u.push(e.virtualSize-v)}if(a&&n.loop){const t=p[0]+x;if(n.slidesPerGroup>1){const i=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),s=t*n.slidesPerGroup;for(let e=0;e<i;e+=1)u.push(u[u.length-1]+s)}for(let i=0;i<e.virtual.slidesBefore+e.virtual.slidesAfter;i+=1)1===n.slidesPerGroup&&u.push(u[u.length-1]+t),h.push(h[h.length-1]+t),e.virtualSize+=t}if(0===u.length&&(u=[0]),0!==x){const t=e.isHorizontal()&&r?"marginLeft":e.getDirectionLabel("marginRight");c.filter((e,t)=>!(n.cssMode&&!n.loop)||t!==c.length-1).forEach(e=>{e.style[t]=`${x}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let e=0;p.forEach(t=>{e+=t+(x||0)}),e-=x;const t=e>v?e-v:0;u=u.map(e=>e<=0?-m:e>t?t+f:e)}if(n.centerInsufficientSlides){let e=0;p.forEach(t=>{e+=t+(x||0)}),e-=x;const t=(m||0)+(f||0);if(e+t<v){const n=(v-e-t)/2;u.forEach((e,t)=>{u[t]=e-n}),h.forEach((e,t)=>{h[t]=e+n})}}if(Object.assign(e,{slides:c,snapGrid:u,slidesGrid:h,slidesSizesGrid:p}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){_d(i,"--swiper-centered-offset-before",-u[0]+"px"),_d(i,"--swiper-centered-offset-after",e.size/2-p[p.length-1]/2+"px");const t=-e.snapGrid[0],n=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+t),e.slidesGrid=e.slidesGrid.map(e=>e+n)}if(d!==l&&e.emit("slidesLengthChange"),u.length!==g&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==y&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(a||n.cssMode||"slide"!==n.effect&&"fade"!==n.effect)){const t=`${n.containerModifierClass}backface-hidden`,i=e.el.classList.contains(t);d<=n.maxBackfaceHiddenSlides?i||e.el.classList.add(t):i&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,n=[],i=t.virtual&&t.params.virtual.enabled;let s,r=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const o=e=>i?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(e=>{n.push(e)});else for(s=0;s<Math.ceil(t.params.slidesPerView);s+=1){const e=t.activeIndex+s;if(e>t.slides.length&&!i)break;n.push(o(e))}else n.push(o(t.activeIndex));for(s=0;s<n.length;s+=1)if(void 0!==n[s]){const e=n[s].offsetHeight;r=e>r?e:r}(r||0===r)&&(t.wrapperEl.style.height=`${r}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let i=0;i<t.length;i+=1)t[i].swiperSlideOffset=(e.isHorizontal()?t[i].offsetLeft:t[i].offsetTop)-n-e.cssOverflowAdjustment()},updateSlidesProgress:function(e=this&&this.translate||0){const t=this,n=t.params,{slides:i,rtlTranslate:s,snapGrid:r}=t;if(0===i.length)return;void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();let o=-e;s&&(o=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let a=n.spaceBetween;"string"==typeof a&&a.indexOf("%")>=0?a=parseFloat(a.replace("%",""))/100*t.size:"string"==typeof a&&(a=parseFloat(a));for(let e=0;e<i.length;e+=1){const l=i[e];let c=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(c-=i[0].swiperSlideOffset);const d=(o+(n.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+a),u=(o-r[0]+(n.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+a),h=-(o-c),p=h+t.slidesSizesGrid[e],m=h>=0&&h<=t.size-t.slidesSizesGrid[e],f=h>=0&&h<t.size-1||p>1&&p<=t.size||h<=0&&p>=t.size;f&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e)),Wd(l,f,n.slideVisibleClass),Wd(l,m,n.slideFullyVisibleClass),l.progress=s?-d:d,l.originalProgress=s?-u:u}},updateProgress:function(e){const t=this;if(void 0===e){const n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}const n=t.params,i=t.maxTranslate()-t.minTranslate();let{progress:s,isBeginning:r,isEnd:o,progressLoop:a}=t;const l=r,c=o;if(0===i)s=0,r=!0,o=!0;else{s=(e-t.minTranslate())/i;const n=Math.abs(e-t.minTranslate())<1,a=Math.abs(e-t.maxTranslate())<1;r=n||s<=0,o=a||s>=1,n&&(s=0),a&&(s=1)}if(n.loop){const n=t.getSlideIndexByData(0),i=t.getSlideIndexByData(t.slides.length-1),s=t.slidesGrid[n],r=t.slidesGrid[i],o=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);a=l>=s?(l-s)/o:(l+o-r)/o,a>1&&(a-=1)}Object.assign(t,{progress:s,progressLoop:a,isBeginning:r,isEnd:o}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),r&&!l&&t.emit("reachBeginning toEdge"),o&&!c&&t.emit("reachEnd toEdge"),(l&&!r||c&&!o)&&t.emit("fromEdge"),t.emit("progress",s)},updateSlidesClasses:function(){const e=this,{slides:t,params:n,slidesEl:i,activeIndex:s}=e,r=e.virtual&&n.virtual.enabled,o=e.grid&&n.grid&&n.grid.rows>1,a=e=>kd(i,`.${n.slideClass}${e}, swiper-slide${e}`)[0];let l,c,d;if(r)if(n.loop){let t=s-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),l=a(`[data-swiper-slide-index="${t}"]`)}else l=a(`[data-swiper-slide-index="${s}"]`);else o?(l=t.find(e=>e.column===s),d=t.find(e=>e.column===s+1),c=t.find(e=>e.column===s-1)):l=t[s];l&&(o||(d=function(e,t){const n=[];for(;e.nextElementSibling;){const i=e.nextElementSibling;t?i.matches(t)&&n.push(i):n.push(i),e=i}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!d&&(d=t[0]),c=function(e,t){const n=[];for(;e.previousElementSibling;){const i=e.previousElementSibling;t?i.matches(t)&&n.push(i):n.push(i),e=i}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&0===!c&&(c=t[t.length-1]))),t.forEach(e=>{Ud(e,e===l,n.slideActiveClass),Ud(e,e===d,n.slideNextClass),Ud(e,e===c,n.slidePrevClass)}),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:i,params:s,activeIndex:r,realIndex:o,snapIndex:a}=t;let l,c=e;const d=e=>{let n=e-t.virtual.slidesBefore;return n<0&&(n=t.virtual.slides.length+n),n>=t.virtual.slides.length&&(n-=t.virtual.slides.length),n};if(void 0===c&&(c=function(e){const{slidesGrid:t,params:n}=e,i=e.rtlTranslate?e.translate:-e.translate;let s;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?i>=t[e]&&i<t[e+1]-(t[e+1]-t[e])/2?s=e:i>=t[e]&&i<t[e+1]&&(s=e+1):i>=t[e]&&(s=e);return n.normalizeSlideIndex&&(s<0||void 0===s)&&(s=0),s}(t)),i.indexOf(n)>=0)l=i.indexOf(n);else{const e=Math.min(s.slidesPerGroupSkip,c);l=e+Math.floor((c-e)/s.slidesPerGroup)}if(l>=i.length&&(l=i.length-1),c===r&&!t.params.loop)return void(l!==a&&(t.snapIndex=l,t.emit("snapIndexChange")));if(c===r&&t.params.loop&&t.virtual&&t.params.virtual.enabled)return void(t.realIndex=d(c));const u=t.grid&&s.grid&&s.grid.rows>1;let h;if(t.virtual&&s.virtual.enabled&&s.loop)h=d(c);else if(u){const e=t.slides.find(e=>e.column===c);let n=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(n)&&(n=Math.max(t.slides.indexOf(e),0)),h=Math.floor(n/s.grid.rows)}else if(t.slides[c]){const e=t.slides[c].getAttribute("data-swiper-slide-index");h=e?parseInt(e,10):c}else h=c;Object.assign(t,{previousSnapIndex:a,snapIndex:l,previousRealIndex:o,realIndex:h,previousIndex:r,activeIndex:c}),t.initialized&&Zd(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(o!==h&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const n=this,i=n.params;let s=e.closest(`.${i.slideClass}, swiper-slide`);!s&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(e=>{!s&&e.matches&&e.matches(`.${i.slideClass}, swiper-slide`)&&(s=e)});let r,o=!1;if(s)for(let e=0;e<n.slides.length;e+=1)if(n.slides[e]===s){o=!0,r=e;break}if(!s||!o)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=s,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(s.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=r,i.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}},Xd={getTranslate:function(e=(this.isHorizontal()?"x":"y")){const{params:t,rtlTranslate:n,translate:i,wrapperEl:s}=this;if(t.virtualTranslate)return n?-i:i;if(t.cssMode)return i;let r=function(e,t="x"){const n=Sd();let i,s,r;const o=function(e){const t=Sd();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}(e);return n.WebKitCSSMatrix?(s=o.transform||o.webkitTransform,s.split(",").length>6&&(s=s.split(", ").map(e=>e.replace(",",".")).join(", ")),r=new n.WebKitCSSMatrix("none"===s?"":s)):(r=o.MozTransform||o.OTransform||o.MsTransform||o.msTransform||o.transform||o.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),i=r.toString().split(",")),"x"===t&&(s=n.WebKitCSSMatrix?r.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(s=n.WebKitCSSMatrix?r.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),s||0}(s,e);return r+=this.cssOverflowAdjustment(),n&&(r=-r),r||0},setTranslate:function(e,t){const n=this,{rtlTranslate:i,params:s,wrapperEl:r,progress:o}=n;let a,l=0,c=0;n.isHorizontal()?l=i?-e:e:c=e,s.roundLengths&&(l=Math.floor(l),c=Math.floor(c)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:c,s.cssMode?r[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-c:s.virtualTranslate||(n.isHorizontal()?l-=n.cssOverflowAdjustment():c-=n.cssOverflowAdjustment(),r.style.transform=`translate3d(${l}px, ${c}px, 0px)`);const d=n.maxTranslate()-n.minTranslate();a=0===d?0:(e-n.minTranslate())/d,a!==o&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e=0,t=this.params.speed,n=!0,i=!0,s){const r=this,{params:o,wrapperEl:a}=r;if(r.animating&&o.preventInteractionOnTransition)return!1;const l=r.minTranslate(),c=r.maxTranslate();let d;if(d=i&&e>l?l:i&&e<c?c:e,r.updateProgress(d),o.cssMode){const e=r.isHorizontal();if(0===t)a[e?"scrollLeft":"scrollTop"]=-d;else{if(!r.support.smoothScroll)return jd({swiper:r,targetPosition:-d,side:e?"left":"top"}),!0;a.scrollTo({[e?"left":"top"]:-d,behavior:"smooth"})}return!0}return 0===t?(r.setTransition(0),r.setTranslate(d),n&&(r.emit("beforeTransitionStart",t,s),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(d),n&&(r.emit("beforeTransitionStart",t,s),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,r.animating=!1,n&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}};function Kd({swiper:e,runCallbacks:t,direction:n,step:i}){const{activeIndex:s,previousIndex:r}=e;let o=n;o||(o=s>r?"next":s<r?"prev":"reset"),e.emit(`transition${i}`),t&&"reset"===o?e.emit(`slideResetTransition${i}`):t&&s!==r&&(e.emit(`slideChangeTransition${i}`),"next"===o?e.emit(`slideNextTransition${i}`):e.emit(`slidePrevTransition${i}`))}var Jd={slideTo:function(e=0,t,n=!0,i,s){"string"==typeof e&&(e=parseInt(e,10));const r=this;let o=e;o<0&&(o=0);const{params:a,snapGrid:l,slidesGrid:c,previousIndex:d,activeIndex:u,rtlTranslate:h,wrapperEl:p,enabled:m}=r;if(!m&&!i&&!s||r.destroyed||r.animating&&a.preventInteractionOnTransition)return!1;void 0===t&&(t=r.params.speed);const f=Math.min(r.params.slidesPerGroupSkip,o);let g=f+Math.floor((o-f)/r.params.slidesPerGroup);g>=l.length&&(g=l.length-1);const y=-l[g];if(a.normalizeSlideIndex)for(let e=0;e<c.length;e+=1){const t=-Math.floor(100*y),n=Math.floor(100*c[e]),i=Math.floor(100*c[e+1]);void 0!==c[e+1]?t>=n&&t<i-(i-n)/2?o=e:t>=n&&t<i&&(o=e+1):t>=n&&(o=e)}if(r.initialized&&o!==u){if(!r.allowSlideNext&&(h?y>r.translate&&y>r.minTranslate():y<r.translate&&y<r.minTranslate()))return!1;if(!r.allowSlidePrev&&y>r.translate&&y>r.maxTranslate()&&(u||0)!==o)return!1}let v;o!==(d||0)&&n&&r.emit("beforeSlideChangeStart"),r.updateProgress(y),v=o>u?"next":o<u?"prev":"reset";const x=r.virtual&&r.params.virtual.enabled;if((!x||!s)&&(h&&-y===r.translate||!h&&y===r.translate))return r.updateActiveIndex(o),a.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==a.effect&&r.setTranslate(y),"reset"!==v&&(r.transitionStart(n,v),r.transitionEnd(n,v)),!1;if(a.cssMode){const e=r.isHorizontal(),n=h?y:-y;if(0===t)x&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),x&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{p[e?"scrollLeft":"scrollTop"]=n})):p[e?"scrollLeft":"scrollTop"]=n,x&&requestAnimationFrame(()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1});else{if(!r.support.smoothScroll)return jd({swiper:r,targetPosition:n,side:e?"left":"top"}),!0;p.scrollTo({[e?"left":"top"]:n,behavior:"smooth"})}return!0}const w=$d().isSafari;return x&&!s&&w&&r.isElement&&r.virtual.update(!1,!1,o),r.setTransition(t),r.setTranslate(y),r.updateActiveIndex(o),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,i),r.transitionStart(n,v),0===t?r.transitionEnd(n,v):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(n,v))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e=0,t,n=!0,i){"string"==typeof e&&(e=parseInt(e,10));const s=this;if(s.destroyed)return;void 0===t&&(t=s.params.speed);const r=s.grid&&s.params.grid&&s.params.grid.rows>1;let o=e;if(s.params.loop)if(s.virtual&&s.params.virtual.enabled)o+=s.virtual.slidesBefore;else{let e;if(r){const t=o*s.params.grid.rows;e=s.slides.find(e=>1*e.getAttribute("data-swiper-slide-index")===t).column}else e=s.getSlideIndexByData(o);const t=r?Math.ceil(s.slides.length/s.params.grid.rows):s.slides.length,{centeredSlides:n,slidesOffsetBefore:a,slidesOffsetAfter:l}=s.params,c=n||!!a||!!l;let d=s.params.slidesPerView;"auto"===d?d=s.slidesPerViewDynamic():(d=Math.ceil(parseFloat(s.params.slidesPerView,10)),c&&d%2==0&&(d+=1));let u=t-e<d;if(c&&(u=u||e<Math.ceil(d/2)),i&&c&&"auto"!==s.params.slidesPerView&&!r&&(u=!1),u){const n=c?e<s.activeIndex?"prev":"next":e-s.activeIndex-1<s.params.slidesPerView?"next":"prev";s.loopFix({direction:n,slideTo:!0,activeSlideIndex:"next"===n?e+1:e-t+1,slideRealIndex:"next"===n?s.realIndex:void 0})}if(r){const e=o*s.params.grid.rows;o=s.slides.find(t=>1*t.getAttribute("data-swiper-slide-index")===e).column}else o=s.getSlideIndexByData(o)}return requestAnimationFrame(()=>{s.slideTo(o,t,n,i)}),s},slideNext:function(e,t=!0,n){const i=this,{enabled:s,params:r,animating:o}=i;if(!s||i.destroyed)return i;void 0===e&&(e=i.params.speed);let a=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(a=Math.max(i.slidesPerViewDynamic("current",!0),1));const l=i.activeIndex<r.slidesPerGroupSkip?1:a,c=i.virtual&&r.virtual.enabled;if(r.loop){if(o&&!c&&r.loopPreventsSliding)return!1;if(i.loopFix({direction:"next"}),i._clientLeft=i.wrapperEl.clientLeft,i.activeIndex===i.slides.length-1&&r.cssMode)return requestAnimationFrame(()=>{i.slideTo(i.activeIndex+l,e,t,n)}),!0}return r.rewind&&i.isEnd?i.slideTo(0,e,t,n):i.slideTo(i.activeIndex+l,e,t,n)},slidePrev:function(e,t=!0,n){const i=this,{params:s,snapGrid:r,slidesGrid:o,rtlTranslate:a,enabled:l,animating:c}=i;if(!l||i.destroyed)return i;void 0===e&&(e=i.params.speed);const d=i.virtual&&s.virtual.enabled;if(s.loop){if(c&&!d&&s.loopPreventsSliding)return!1;i.loopFix({direction:"prev"}),i._clientLeft=i.wrapperEl.clientLeft}function u(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const h=u(a?i.translate:-i.translate),p=r.map(e=>u(e)),m=s.freeMode&&s.freeMode.enabled;let f=r[p.indexOf(h)-1];if(void 0===f&&(s.cssMode||m)){let e;r.forEach((t,n)=>{h>=t&&(e=n)}),void 0!==e&&(f=m?r[e]:r[e>0?e-1:e])}let g=0;if(void 0!==f&&(g=o.indexOf(f),g<0&&(g=i.activeIndex-1),"auto"===s.slidesPerView&&1===s.slidesPerGroup&&s.slidesPerGroupAuto&&(g=g-i.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),s.rewind&&i.isBeginning){const s=i.params.virtual&&i.params.virtual.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1;return i.slideTo(s,e,t,n)}return s.loop&&0===i.activeIndex&&s.cssMode?(requestAnimationFrame(()=>{i.slideTo(g,e,t,n)}),!0):i.slideTo(g,e,t,n)},slideReset:function(e,t=!0,n){const i=this;if(!i.destroyed)return void 0===e&&(e=i.params.speed),i.slideTo(i.activeIndex,e,t,n)},slideToClosest:function(e,t=!0,n,i=.5){const s=this;if(s.destroyed)return;void 0===e&&(e=s.params.speed);let r=s.activeIndex;const o=Math.min(s.params.slidesPerGroupSkip,r),a=o+Math.floor((r-o)/s.params.slidesPerGroup),l=s.rtlTranslate?s.translate:-s.translate;if(l>=s.snapGrid[a]){const e=s.snapGrid[a];l-e>(s.snapGrid[a+1]-e)*i&&(r+=s.params.slidesPerGroup)}else{const e=s.snapGrid[a-1];l-e<=(s.snapGrid[a]-e)*i&&(r-=s.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,s.slidesGrid.length-1),s.slideTo(r,e,t,n)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,i="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let s,r=e.getSlideIndexWhenGrid(e.clickedIndex);const o=e.isElement?"swiper-slide":`.${t.slideClass}`,a=e.grid&&e.params.grid&&e.params.grid.rows>1;if(t.loop){if(e.animating)return;s=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?e.slideToLoop(s):r>(a?(e.slides.length-i)/2-(e.params.grid.rows-1):e.slides.length-i)?(e.loopFix(),r=e.getSlideIndex(kd(n,`${o}[data-swiper-slide-index="${s}"]`)[0]),Td(()=>{e.slideTo(r)})):e.slideTo(r)}else e.slideTo(r)}},Qd={loopCreate:function(e,t){const n=this,{params:i,slidesEl:s}=n;if(!i.loop||n.virtual&&n.params.virtual.enabled)return;const r=()=>{kd(s,`.${i.slideClass}, swiper-slide`).forEach((e,t)=>{e.setAttribute("data-swiper-slide-index",t)})},o=n.grid&&i.grid&&i.grid.rows>1;i.loopAddBlankSlides&&(i.slidesPerGroup>1||o)&&(()=>{const e=kd(s,`.${i.slideBlankClass}`);e.forEach(e=>{e.remove()}),e.length>0&&(n.recalcSlides(),n.updateSlides())})();const a=i.slidesPerGroup*(o?i.grid.rows:1),l=n.slides.length%a!==0,c=o&&n.slides.length%i.grid.rows!==0,d=e=>{for(let t=0;t<e;t+=1){const e=n.isElement?Ld("swiper-slide",[i.slideBlankClass]):Ld("div",[i.slideClass,i.slideBlankClass]);n.slidesEl.append(e)}};l?(i.loopAddBlankSlides?(d(a-n.slides.length%a),n.recalcSlides(),n.updateSlides()):Ad("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"),r()):c?(i.loopAddBlankSlides?(d(i.grid.rows-n.slides.length%i.grid.rows),n.recalcSlides(),n.updateSlides()):Ad("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"),r()):r();const u=i.centeredSlides||!!i.slidesOffsetBefore||!!i.slidesOffsetAfter;n.loopFix({slideRealIndex:e,direction:u?void 0:"next",initial:t})},loopFix:function({slideRealIndex:e,slideTo:t=!0,direction:n,setTranslate:i,activeSlideIndex:s,initial:r,byController:o,byMousewheel:a}={}){const l=this;if(!l.params.loop)return;l.emit("beforeLoopFix");const{slides:c,allowSlidePrev:d,allowSlideNext:u,slidesEl:h,params:p}=l,{centeredSlides:m,slidesOffsetBefore:f,slidesOffsetAfter:g,initialSlide:y}=p,v=m||!!f||!!g;if(l.allowSlidePrev=!0,l.allowSlideNext=!0,l.virtual&&p.virtual.enabled)return t&&(v||0!==l.snapIndex?v&&l.snapIndex<p.slidesPerView?l.slideTo(l.virtual.slides.length+l.snapIndex,0,!1,!0):l.snapIndex===l.snapGrid.length-1&&l.slideTo(l.virtual.slidesBefore,0,!1,!0):l.slideTo(l.virtual.slides.length,0,!1,!0)),l.allowSlidePrev=d,l.allowSlideNext=u,void l.emit("loopFix");let x=p.slidesPerView;"auto"===x?x=l.slidesPerViewDynamic():(x=Math.ceil(parseFloat(p.slidesPerView,10)),v&&x%2==0&&(x+=1));const w=p.slidesPerGroupAuto?x:p.slidesPerGroup;let b=v?Math.max(w,Math.ceil(x/2)):w;b%w!==0&&(b+=w-b%w),b+=p.loopAdditionalSlides,l.loopedSlides=b;const S=l.grid&&p.grid&&p.grid.rows>1;c.length<x+b||"cards"===l.params.effect&&c.length<x+2*b?Ad("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):S&&"row"===p.grid.fill&&Ad("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const T=[],E=[],M=S?Math.ceil(c.length/p.grid.rows):c.length,C=r&&M-y<x&&!v;let P=C?y:l.activeIndex;void 0===s?s=l.getSlideIndex(c.find(e=>e.classList.contains(p.slideActiveClass))):P=s;const _="next"===n||!n,j="prev"===n||!n;let k=0,A=0;const L=(S?c[s].column:s)+(v&&void 0===i?-x/2+.5:0);if(L<b){k=Math.max(b-L,w);for(let e=0;e<b-L;e+=1){const t=e-Math.floor(e/M)*M;if(S){const e=M-t-1;for(let t=c.length-1;t>=0;t-=1)c[t].column===e&&T.push(t)}else T.push(M-t-1)}}else if(L+x>M-b){A=Math.max(L-(M-2*b),w),C&&(A=Math.max(A,x-M+y+1));for(let e=0;e<A;e+=1){const t=e-Math.floor(e/M)*M;S?c.forEach((e,n)=>{e.column===t&&E.push(n)}):E.push(t)}}if(l.__preventObserver__=!0,requestAnimationFrame(()=>{l.__preventObserver__=!1}),"cards"===l.params.effect&&c.length<x+2*b&&(E.includes(s)&&E.splice(E.indexOf(s),1),T.includes(s)&&T.splice(T.indexOf(s),1)),j&&T.forEach(e=>{c[e].swiperLoopMoveDOM=!0,h.prepend(c[e]),c[e].swiperLoopMoveDOM=!1}),_&&E.forEach(e=>{c[e].swiperLoopMoveDOM=!0,h.append(c[e]),c[e].swiperLoopMoveDOM=!1}),l.recalcSlides(),"auto"===p.slidesPerView?l.updateSlides():S&&(T.length>0&&j||E.length>0&&_)&&l.slides.forEach((e,t)=>{l.grid.updateSlide(t,e,l.slides)}),p.watchSlidesProgress&&l.updateSlidesOffset(),t)if(T.length>0&&j){if(void 0===e){const e=l.slidesGrid[P],t=l.slidesGrid[P+k]-e;a?l.setTranslate(l.translate-t):(l.slideTo(P+Math.ceil(k),0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-t,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-t))}else if(i){const e=S?T.length/p.grid.rows:T.length;l.slideTo(l.activeIndex+e,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(E.length>0&&_)if(void 0===e){const e=l.slidesGrid[P],t=l.slidesGrid[P-A]-e;a?l.setTranslate(l.translate-t):(l.slideTo(P-A,0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-t,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-t))}else{const e=S?E.length/p.grid.rows:E.length;l.slideTo(l.activeIndex-e,0,!1,!0)}if(l.allowSlidePrev=d,l.allowSlideNext=u,l.controller&&l.controller.control&&!o){const r={slideRealIndex:e,direction:n,setTranslate:i,activeSlideIndex:s,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach(e=>{!e.destroyed&&e.params.loop&&e.loopFix({...r,slideTo:e.params.slidesPerView===p.slidesPerView&&t})}):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...r,slideTo:l.controller.control.params.slidesPerView===p.slidesPerView&&t})}l.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||!n||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const i=[];e.slides.forEach(e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;i[t]=e}),e.slides.forEach(e=>{e.removeAttribute("data-swiper-slide-index")}),i.forEach(e=>{n.append(e)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function eu(e,t,n){const i=Sd(),{params:s}=e,r=s.edgeSwipeDetection,o=s.edgeSwipeThreshold;return!r||!(n<=o||n>=i.innerWidth-o)||"prevent"===r&&(t.preventDefault(),!0)}function tu(e){const t=this,n=wd();let i=e;i.originalEvent&&(i=i.originalEvent);const s=t.touchEventsData;if("pointerdown"===i.type){if(null!==s.pointerId&&s.pointerId!==i.pointerId)return;s.pointerId=i.pointerId}else"touchstart"===i.type&&1===i.targetTouches.length&&(s.touchId=i.targetTouches[0].identifier);if("touchstart"===i.type)return void eu(t,i,i.targetTouches[0].pageX);const{params:r,touches:o,enabled:a}=t;if(!a)return;if(!r.simulateTouch&&"mouse"===i.pointerType)return;if(t.animating&&r.preventInteractionOnTransition)return;!t.animating&&r.cssMode&&r.loop&&t.loopFix();let l=i.target;if("wrapper"===r.touchEventsTarget&&!function(e,t){const n=Sd();let i=t.contains(e);return!i&&n.HTMLSlotElement&&t instanceof HTMLSlotElement&&(i=[...t.assignedElements()].includes(e),i||(i=function(e,t){const n=[t];for(;n.length>0;){const t=n.shift();if(e===t)return!0;n.push(...t.children,...t.shadowRoot?t.shadowRoot.children:[],...t.assignedElements?t.assignedElements():[])}}(e,t))),i}(l,t.wrapperEl))return;if("which"in i&&3===i.which)return;if("button"in i&&i.button>0)return;if(s.isTouched&&s.isMoved)return;const c=!!r.noSwipingClass&&""!==r.noSwipingClass,d=i.composedPath?i.composedPath():i.path;c&&i.target&&i.target.shadowRoot&&d&&(l=d[0]);const u=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,h=!(!i.target||!i.target.shadowRoot);if(r.noSwiping&&(h?function(e,t=this){return function t(n){if(!n||n===wd()||n===Sd())return null;n.assignedSlot&&(n=n.assignedSlot);const i=n.closest(e);return i||n.getRootNode?i||t(n.getRootNode().host):null}(t)}(u,l):l.closest(u)))return void(t.allowClick=!0);if(r.swipeHandler&&!l.closest(r.swipeHandler))return;o.currentX=i.pageX,o.currentY=i.pageY;const p=o.currentX,m=o.currentY;if(!eu(t,i,p))return;Object.assign(s,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=p,o.startY=m,s.touchStartTime=Ed(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(s.allowThresholdMove=!1);let f=!0;l.matches(s.focusableElements)&&(f=!1,"SELECT"===l.nodeName&&(s.isTouched=!1)),n.activeElement&&n.activeElement.matches(s.focusableElements)&&n.activeElement!==l&&("mouse"===i.pointerType||"mouse"!==i.pointerType&&!l.matches(s.focusableElements))&&n.activeElement.blur();const g=f&&t.allowTouchMove&&r.touchStartPreventDefault;!r.touchStartForcePreventDefault&&!g||l.isContentEditable||i.preventDefault(),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.animating&&!r.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",i)}function nu(e){const t=wd(),n=this,i=n.touchEventsData,{params:s,touches:r,rtlTranslate:o,enabled:a}=n;if(!a)return;if(!s.simulateTouch&&"mouse"===e.pointerType)return;let l,c=e;if(c.originalEvent&&(c=c.originalEvent),"pointermove"===c.type){if(null!==i.touchId)return;if(c.pointerId!==i.pointerId)return}if("touchmove"===c.type){if(l=[...c.changedTouches].find(e=>e.identifier===i.touchId),!l||l.identifier!==i.touchId)return}else l=c;if(!i.isTouched)return void(i.startMoving&&i.isScrolling&&n.emit("touchMoveOpposite",c));const d=l.pageX,u=l.pageY;if(c.preventedByNestedSwiper)return r.startX=d,void(r.startY=u);
vendor: 4,545 bytes, line 1
1if(!n.allowTouchMove)return c.target.matches(i.focusableElements)||(n.allowClick=!1),void(i.isTouched&&(Object.assign(r,{startX:d,startY:u,currentX:d,currentY:u}),i.touchStartTime=Ed()));if(s.touchReleaseOnEdges&&!s.loop)if(n.isVertical()){if(u<r.startY&&n.translate<=n.maxTranslate()||u>r.startY&&n.translate>=n.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else{if(o&&(d>r.startX&&-n.translate<=n.maxTranslate()||d<r.startX&&-n.translate>=n.minTranslate()))return;if(!o&&(d<r.startX&&n.translate<=n.maxTranslate()||d>r.startX&&n.translate>=n.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(i.focusableElements)&&t.activeElement!==c.target&&"mouse"!==c.pointerType&&t.activeElement.blur(),t.activeElement&&c.target===t.activeElement&&c.target.matches(i.focusableElements))return i.isMoved=!0,void(n.allowClick=!1);i.allowTouchCallbacks&&n.emit("touchMove",c),r.previousX=r.currentX,r.previousY=r.currentY,r.currentX=d,r.currentY=u;const h=r.currentX-r.startX,p=r.currentY-r.startY;if(n.params.threshold&&Math.sqrt(h**2+p**2)<n.params.threshold)return;if(void 0===i.isScrolling){let e;n.isHorizontal()&&r.currentY===r.startY||n.isVertical()&&r.currentX===r.startX?i.isScrolling=!1:h*h+p*p>=25&&(e=180*Math.atan2(Math.abs(p),Math.abs(h))/Math.PI,i.isScrolling=n.isHorizontal()?e>s.touchAngle:90-e>s.touchAngle)}if(i.isScrolling&&n.emit("touchMoveOpposite",c),void 0===i.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(i.startMoving=!0)),i.isScrolling||"touchmove"===c.type&&i.preventTouchMoveFromPointerMove)return void(i.isTouched=!1);if(!i.startMoving)return;n.allowClick=!1,!s.cssMode&&c.cancelable&&c.preventDefault(),s.touchMoveStopPropagation&&!s.nested&&c.stopPropagation();let m=n.isHorizontal()?h:p,f=n.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;s.oneWayMovement&&(m=Math.abs(m)*(o?1:-1),f=Math.abs(f)*(o?1:-1)),r.diff=m,m*=s.touchRatio,o&&(m=-m,f=-f);const g=n.touchesDirection;n.swipeDirection=m>0?"prev":"next",n.touchesDirection=f>0?"prev":"next";const y=n.params.loop&&!s.cssMode,v="next"===n.touchesDirection&&n.allowSlideNext||"prev"===n.touchesDirection&&n.allowSlidePrev;if(!i.isMoved){if(y&&v&&n.loopFix({direction:n.swipeDirection}),i.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(e)}i.allowMomentumBounce=!1,!s.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",c)}if((new Date).getTime(),!1!==s._loopSwapReset&&i.isMoved&&i.allowThresholdMove&&g!==n.touchesDirection&&y&&v&&Math.abs(m)>=1)return Object.assign(r,{startX:d,startY:u,currentX:d,currentY:u,startTranslate:i.currentTranslate}),i.loopSwapReset=!0,void(i.startTranslate=i.currentTranslate);n.emit("sliderMove",c),i.isMoved=!0,i.currentTranslate=m+i.startTranslate;let x=!0,w=s.resistanceRatio;if(s.touchReleaseOnEdges&&(w=0),m>0?(y&&v&&i.allowThresholdMove&&i.currentTranslate>(s.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-("auto"!==s.slidesPerView&&n.slides.length-s.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),i.currentTranslate>n.minTranslate()&&(x=!1,s.resistance&&(i.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+i.startTranslate+m)**w))):m<0&&(y&&v&&i.allowThresholdMove&&i.currentTranslate<(s.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+("auto"!==s.slidesPerView&&n.slides.length-s.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-("auto"===s.slidesPerView?n.slidesPerViewDynamic():Math.ceil(parseFloat(s.slidesPerView,10)))}),i.currentTranslate<n.maxTranslate()&&(x=!1,s.resistance&&(i.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-i.startTranslate-m)**w))),x&&(c.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),n.allowSlidePrev||n.allowSlideNext||(i.currentTranslate=i.startTranslate),s.threshold>0){if(!(Math.abs(m)>s.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);
vendor: 4,877 bytes, line 1
1if(!i.allowThresholdMove)return i.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,i.currentTranslate=i.startTranslate,void(r.diff=n.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}s.followFinger&&!s.cssMode&&((s.freeMode&&s.freeMode.enabled&&n.freeMode||s.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),s.freeMode&&s.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(i.currentTranslate),n.setTranslate(i.currentTranslate))}function iu(e){const t=this,n=t.touchEventsData;let i,s=e;if(s.originalEvent&&(s=s.originalEvent),"touchend"===s.type||"touchcancel"===s.type){if(i=[...s.changedTouches].find(e=>e.identifier===n.touchId),!i||i.identifier!==n.touchId)return}else{if(null!==n.touchId)return;if(s.pointerId!==n.pointerId)return;i=s}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(s.type)&&(!["pointercancel","contextmenu"].includes(s.type)||!t.browser.isSafari&&!t.browser.isWebView))return;n.pointerId=null,n.touchId=null;const{params:r,touches:o,rtlTranslate:a,slidesGrid:l,enabled:c}=t;if(!c)return;if(!r.simulateTouch&&"mouse"===s.pointerType)return;if(n.allowTouchCallbacks&&t.emit("touchEnd",s),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&r.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);r.grabCursor&&n.isMoved&&n.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const d=Ed(),u=d-n.touchStartTime;if(t.allowClick){const e=s.path||s.composedPath&&s.composedPath();t.updateClickedSlide(e&&e[0]||s.target,e),t.emit("tap click",s),u<300&&d-n.lastClickTime<300&&t.emit("doubleTap doubleClick",s)}if(n.lastClickTime=Ed(),Td(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||0===o.diff&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);let h;if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,h=r.followFinger?a?t.translate:-t.translate:-n.currentTranslate,r.cssMode)return;if(r.freeMode&&r.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:h});const p=h>=-t.maxTranslate()&&!t.params.loop;let m=0,f=t.slidesSizesGrid[0];for(let e=0;e<l.length;e+=e<r.slidesPerGroupSkip?1:r.slidesPerGroup){const t=e<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;void 0!==l[e+t]?(p||h>=l[e]&&h<l[e+t])&&(m=e,f=l[e+t]-l[e]):(p||h>=l[e])&&(m=e,f=l[l.length-1]-l[l.length-2])}let g=null,y=null;r.rewind&&(t.isBeginning?y=r.virtual&&r.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(g=0));const v=(h-l[m])/f,x=m<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(u>r.longSwipesMs){if(!r.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(v>=r.longSwipesRatio?t.slideTo(r.rewind&&t.isEnd?g:m+x):t.slideTo(m)),"prev"===t.swipeDirection&&(v>1-r.longSwipesRatio?t.slideTo(m+x):null!==y&&v<0&&Math.abs(v)>r.longSwipesRatio?t.slideTo(y):t.slideTo(m))}else{if(!r.shortSwipes)return void t.slideTo(t.activeIndex);!t.navigation||s.target!==t.navigation.nextEl&&s.target!==t.navigation.prevEl?("next"===t.swipeDirection&&t.slideTo(null!==g?g:m+x),"prev"===t.swipeDirection&&t.slideTo(null!==y?y:m)):s.target===t.navigation.nextEl?t.slideTo(m+x):t.slideTo(m)}}function su(){const e=this,{params:t,el:n}=e;if(n&&0===n.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:i,allowSlidePrev:s,snapGrid:r}=e,o=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const a=o&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||a?e.params.loop&&!o?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=s,e.allowSlideNext=i,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}function ru(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function ou(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:i}=e;if(!i)return;let s;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const r=e.maxTranslate()-e.minTranslate();s=0===r?0:(e.translate-e.minTranslate())/r,s!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function au(e){const t=this;Gd(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update(
vendor: 17,588 bytes, line 1
1)}function lu(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const cu=(e,t)=>{const n=wd(),{params:i,el:s,wrapperEl:r,device:o}=e,a=!!i.nested,l="on"===t?"addEventListener":"removeEventListener",c=t;s&&"string"!=typeof s&&(n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:a}),s[l]("touchstart",e.onTouchStart,{passive:!1}),s[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:a}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:a}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(i.preventClicks||i.preventClicksPropagation)&&s[l]("click",e.onClick,!0),i.cssMode&&r[l]("scroll",e.onScroll),i.updateOnWindowResize?e[c](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",su,!0):e[c]("observerUpdate",su,!0),s[l]("load",e.onLoad,{capture:!0}))},du=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var uu={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function hu(e,t){return function(n={}){const i=Object.keys(n)[0],s=n[i];"object"==typeof s&&null!==s?(!0===e[i]&&(e[i]={enabled:!0}),"navigation"===i&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),i in e&&"enabled"in s?("object"!=typeof e[i]||"enabled"in e[i]||(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),Pd(t,n)):Pd(t,n)):Pd(t,n)}}const pu={eventsEmitter:Hd,update:Yd,translate:Xd,transition:{setTransition:function(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=0===e?"0ms":""),n.emit("setTransition",e,t)},transitionStart:function(e=!0,t){const n=this,{params:i}=n;i.cssMode||(i.autoHeight&&n.updateAutoHeight(),Kd({swiper:n,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e=!0,t){const n=this,{params:i}=n;n.animating=!1,i.cssMode||(n.setTransition(0),Kd({swiper:n,runCallbacks:e,direction:t,step:"End"}))}},slide:Jd,loop:Qd,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}},events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=tu.bind(e),e.onTouchMove=nu.bind(e),e.onTouchEnd=iu.bind(e),e.onDocumentTouchStart=lu.bind(e),t.cssMode&&(e.onScroll=ou.bind(e)),e.onClick=ru.bind(e),e.onLoad=au.bind(e),cu(e,"on")},detachEvents:function(){cu(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{realIndex:t,initialized:n,params:i,el:s}=e,r=i.breakpoints;if(!r||r&&0===Object.keys(r).length)return;const o=wd(),a="window"!==i.breakpointsBase&&i.breakpointsBase?"container":i.breakpointsBase,l=["window","container"].includes(i.breakpointsBase)||!i.breakpointsBase?e.el:o.querySelector(i.breakpointsBase),c=e.getBreakpoint(r,a,l);if(!c||e.currentBreakpoint===c)return;const d=(c in r?r[c]:void 0)||e.originalParams,u=du(e,i),h=du(e,d),p=e.params.grabCursor,m=d.grabCursor,f=i.enabled;u&&!h?(s.classList.remove(`${i.containerModifierClass}grid`,`${i.containerModifierClass}grid-column`),e.emitContainerClasses()):!u&&h&&(s.classList.add(`${i.containerModifierClass}grid`),(d.grid.fill&&"column"===d.grid.fill||!d.grid.fill&&"column"===i.grid.fill)&&s.classList.add(`${i.containerModifierClass}grid-column`),e.emitContainerClasses()),p&&!m?e.unsetGrabCursor():!p&&m&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(t=>{if(void 0===d[t])return;const n=i[t]&&i[t].enabled,s=d[t]&&d[t].enabled;n&&!s&&e[t].disable(),!n&&s&&e[t].enable()});const g=d.direction&&d.direction!==i.direction,y=i.loop&&(d.slidesPerView!==i.slidesPerView||g),v=i.loop;g&&n&&e.changeDirection(),Pd(e.params,d);const x=e.params.enabled,w=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),f&&!x?e.disable():!f&&x&&e.enable(),e.currentBreakpoint=c,e.emit("_beforeBreakpoint",d),n&&(y?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!v&&w?(e.loopCreate(t),e.updateSlides()):v&&!w&&e.loopDestroy()),e.emit("breakpoint",d)},getBreakpoint:function(e,t="window",n){if(!e||"container"===t&&!n)return;let i=!1;const s=Sd(),r="window"===t?s.innerHeight:n.clientHeight,o=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}});o.sort((e,t)=>parseInt(e.value,10)-parseInt(t.value,10));for(let e=0;e<o.length;e+=1){const{point:r,value:a}=o[e];"window"===t?s.matchMedia(`(min-width: ${a}px)`).matches&&(i=r):a<=n.clientWidth&&(i=r)}return i||"max"}},checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:i}=n;if(i){const t=e.slides.length-1,n=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*i;e.isLocked=e.size>n}else e.isLocked=1===e.snapGrid.length;!0===n.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===n.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const e=this,{classNames:t,params:n,rtl:i,el:s,device:r}=e,o=function(e,t){const n=[];return e.forEach(e=>{"object"==typeof e?Object.keys(e).forEach(i=>{e[i]&&n.push(t+i)}):"string"==typeof e&&n.push(t+e)}),n}(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:i},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&"column"===n.grid.fill},{android:r.android},{ios:r.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...o),s.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}}},mu={};class fu{constructor(...e){let t,n;1===e.length&&e[0].constructor&&"Object"===Object.prototype.toString.call(e[0]).slice(8,-1)?n=e[0]:[t,n]=e,n||(n={}),n=Pd({},n),t&&!n.el&&(n.el=t);const i=wd();if(n.el&&"string"==typeof n.el&&i.querySelectorAll(n.el).length>1){const e=[];return i.querySelectorAll(n.el).forEach(t=>{const i=Pd({},n,{el:t});e.push(new fu(i))}),e}const s=this;s.__swiper__=!0,s.support=Bd(),s.device=zd({userAgent:n.userAgent}),s.browser=$d(),s.eventsListeners={},s.eventsAnyListeners=[],s.modules=[...s.__modules__],n.modules&&Array.isArray(n.modules)&&s.modules.push(...n.modules);const r={};s.modules.forEach(e=>{e({params:n,swiper:s,extendParams:hu(n,r),on:s.on.bind(s),once:s.once.bind(s),off:s.off.bind(s),emit:s.emit.bind(s)})});const o=Pd({},uu,r);return s.params=Pd({},o,mu,n),s.originalParams=Pd({},s.params),s.passedParams=Pd({},n),s.params&&s.params.on&&Object.keys(s.params.on).forEach(e=>{s.on(e,s.params.on[e])}),s.params&&s.params.onAny&&s.onAny(s.params.onAny),Object.assign(s,{enabled:s.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===s.params.direction,isVertical:()=>"vertical"===s.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:s.params.allowSlideNext,allowSlidePrev:s.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:s.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:s.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),s.emit("_swiper"),s.params.init&&s.init(),s}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:n}=this,i=Rd(kd(t,`.${n.slideClass}, swiper-slide`)[0]);return Rd(e)-i}getSlideIndexByData(e){return this.getSlideIndex(this.slides.find(t=>1*t.getAttribute("data-swiper-slide-index")===e))}getSlideIndexWhenGrid(e){return this.grid&&this.params.grid&&this.params.grid.rows>1&&("column"===this.params.grid.fill?e=Math.floor(e/this.params.grid.rows):"row"===this.params.grid.fill&&(e%=Math.ceil(this.slides.length/this.params.grid.rows))),e}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=kd(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const i=n.minTranslate(),s=(n.maxTranslate()-i)*e+i;n.translateTo(s,void 0===t?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter(t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter(e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach(n=>{const i=e.getSlideClasses(n);t.push({slideEl:n,classNames:i}),e.emit("_slideClass",n,i)}),e.emit("_slideClasses",t)}slidesPerViewDynamic(e="current",t=!1){const{params:n,slides:i,slidesGrid:s,slidesSizesGrid:r,size:o,activeIndex:a}=this;let l=1;if("number"==typeof n.slidesPerView)return n.slidesPerView;if(n.centeredSlides){let e,t=i[a]?Math.ceil(i[a].swiperSlideSize):0;for(let n=a+1;n<i.length;n+=1)i[n]&&!e&&(t+=Math.ceil(i[n].swiperSlideSize),l+=1,t>o&&(e=!0));for(let n=a-1;n>=0;n-=1)i[n]&&!e&&(t+=i[n].swiperSlideSize,l+=1,t>o&&(e=!0))}else if("current"===e)for(let e=a+1;e<i.length;e+=1)(t?s[e]+r[e]-s[a]<o:s[e]-s[a]<o)&&(l+=1);else for(let e=a-1;e>=0;e-=1)s[a]-s[e]<o&&(l+=1);return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;function i(){const t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}let s;if(n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach(t=>{t.complete&&Gd(e,t)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),n.freeMode&&n.freeMode.enabled&&!n.cssMode)i(),n.autoHeight&&e.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const t=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;s=e.slideTo(t.length-1,0,!1,!0)}else s=e.slideTo(e.activeIndex,0,!1,!0);s||i()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t=!0){const n=this,i=n.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(n.el.classList.remove(`${n.params.containerModifierClass}${i}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach(t=>{"vertical"===e?t.style.width="":t.style.height=""}),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let n=e||t.params.el;if("string"==typeof n&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const i=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let s=n&&n.shadowRoot&&n.shadowRoot.querySelector?n.shadowRoot.querySelector(i()):kd(n,i())[0];return!s&&t.params.createElements&&(s=Ld("div",t.params.wrapperClass),n.append(s),kd(n,`.${t.params.slideClass}`).forEach(e=>{s.append(e)})),Object.assign(t,{el:n,wrapperEl:s,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:s,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:"rtl"===n.dir.toLowerCase()||"rtl"===Nd(n,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===n.dir.toLowerCase()||"rtl"===Nd(n,"direction")),wrongRTL:"-webkit-box"===Nd(s,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents();const n=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&n.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach(e=>{e.complete?Gd(t,e):e.addEventListener("load",e=>{Gd(t,e.target)})}),Zd(t),t.initialized=!0,Zd(t),t.emit("init"),t.emit("afterInit"),t}destroy(e=!0,t=!0){const n=this,{params:i,el:s,wrapperEl:r,slides:o}=n;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),i.loop&&n.loopDestroy(),t&&(n.removeClasses(),s&&"string"!=typeof s&&s.removeAttribute("style"),r&&r.removeAttribute("style"),o&&o.length&&o.forEach(e=>{e.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")})),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(e=>{n.off(e)}),!1!==e&&(n.el&&"string"!=typeof n.el&&(n.el.swiper=null),function(e){const t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})}(n)),n.destroyed=!0),null}static extendDefaults(e){Pd(mu,e)}static get extendedDefaults(){return mu}static get defaults(){return uu}static installModule(e){fu.prototype.__modules__||(fu.prototype.__modules__=[]);const t=fu.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach(e=>fu.installModule(e)),fu):(fu.installModule(e),fu)}}Object.keys(pu).forEach(e=>
1{Object.keys(pu[e]).forEach(t=>{fu.prototype[t]=pu[e][t]})}),fu.use([function({swiper:e,on:t,emit:n}){const i=Sd();let s=null,r=null;const o=()=>{e&&!e.destroyed&&e.initialized&&(n("beforeResize"),n("resize"))},a=()=>{e&&!e.destroyed&&e.initialized&&n("orientationchange")};t("init",()=>{e.params.resizeObserver&&void 0!==i.ResizeObserver?e&&!e.destroyed&&e.initialized&&(s=new ResizeObserver(t=>{r=i.requestAnimationFrame(()=>{const{width:n,height:i}=e;let s=n,r=i;t.forEach(({contentBoxSize:t,contentRect:n,target:i})=>{i&&i!==e.el||(s=n?n.width:(t[0]||t).inlineSize,r=n?n.height:(t[0]||t).blockSize)}),s===n&&r===i||o()})}),s.observe(e.el)):(i.addEventListener("resize",o),i.addEventListener("orientationchange",a))}),t("destroy",()=>{r&&i.cancelAnimationFrame(r),s&&s.unobserve&&e.el&&(s.unobserve(e.el),s=null),i.removeEventListener("resize",o),i.removeEventListener("orientationchange",a)})},function({swiper:e,extendParams:t,on:n,emit:i}){const s=[],r=Sd(),o=(t,n={})=>{const o=new(r.MutationObserver||r.WebkitMutationObserver)(t=>{if(e.__preventObserver__)return;if(1===t.length)return void i("observerUpdate",t[0]);const n=function(){i("observerUpdate",t[0])};r.requestAnimationFrame?r.requestAnimationFrame(n):r.setTimeout(n,0)});o.observe(t,{attributes:void 0===n.attributes||n.attributes,childList:e.isElement||(void 0===n.childList||n).childList,characterData:void 0===n.characterData||n.characterData}),s.push(o)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",()=>{if(e.params.observer){if(e.params.observeParents){const t=function(e){const t=[];let n=e.parentElement;for(;n;)t.push(n),n=n.parentElement;return t}(e.hostEl);for(let e=0;e<t.length;e+=1)o(t[e])}o(e.hostEl,{childList:e.params.observeSlideChildren}),o(e.wrapperEl,{attributes:!1})}}),n("destroy",()=>{s.forEach(e=>{e.disconnect()}),s.splice(0,s.length)})}]);const gu=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function yu(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)&&!e.__swiper__}function vu(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(e=>n.indexOf(e)<0).forEach(n=>{void 0===e[n]?e[n]=t[n]:yu(t[n])&&yu(e[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?e[n]=t[n]:vu(e[n],t[n]):e[n]=t[n]})}function xu(e={}){return e.navigation&&void 0===e.navigation.nextEl&&void 0===e.navigation.prevEl}function wu(e={}){return e.pagination&&void 0===e.pagination.el}function bu(e={}){return e.scrollbar&&void 0===e.scrollbar.el}function Su(e=""){const t=e.split(" ").map(e=>e.trim()).filter(e=>!!e),n=[];
1return t.forEach(e=>{n.indexOf(e)<0&&n.push(e)}),n.join(" ")}function Tu(e=""){return e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function Eu(){return Eu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Eu.apply(this,arguments)}function Mu(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function Cu(e){const t=[];return d.Children.toArray(e).forEach(e=>{Mu(e)?t.push(e):e.props&&e.props.children&&Cu(e.props.children).forEach(e=>t.push(e))}),t}function Pu(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return d.Children.toArray(e).forEach(e=>{if(Mu(e))t.push(e);else if(e.props&&e.props.slot&&n[e.props.slot])n[e.props.slot].push(e);else if(e.props&&e.props.children){const i=Cu(e.props.children);i.length>0?i.forEach(e=>t.push(e)):n["container-end"].push(e)}else n["container-end"].push(e)}),{slides:t,slots:n}}function _u(e,t){return"undefined"==typeof window?(0,d.useEffect)(e,t):(0,d.useLayoutEffect)(e,t)}const ju=(0,d.createContext)(null),ku=(0,d.createContext)(null),Au=(0,d.forwardRef)(({className:e,tag:t="div",wrapperTag:n="div",children:i,onSwiper:s,...r}={},o)=>{let a=!1;const[l,c]=(0,d.useState)("swiper"),[u,h]=(0,d.useState)(null),[p,m]=(0,d.useState)(!1),f=(0,d.useRef)(!1),g=(0,d.useRef)(null),y=(0,d.useRef)(null),v=(0,d.useRef)(null),x=(0,d.useRef)(null),w=(0,d.useRef)(null),b=(0,d.useRef)(null),S=(0,d.useRef)(null),T=(0,d.useRef)(null),{params:E,passedParams:M,rest:C,events:P}=function(e={},t=!0){const n={on:{}},i={},s={};vu(n,uu),n._emitClasses=!0,n.init=!1;const r={},o=gu.map(e=>e.replace(/_/,"")),a=Object.assign({},e);return Object.keys(a).forEach(a=>{void 0!==e[a]&&(o.indexOf(a)>=0?yu(e[a])?(n[a]={},s[a]={},vu(n[a],e[a]),vu(s[a],e[a])):(n[a]=e[a],s[a]=e[a]):0===a.search(/on[A-Z]/)&&"function"==typeof e[a]?t?i[`${a[2].toLowerCase()}${a.substr(3)}`]=e[a]:n.on[`${a[2].toLowerCase()}${a.substr(3)}`]=e[a]:r[a]=e[a])}),["navigation","pagination","scrollbar"].forEach(e=>{!0===n[e]&&(n[e]={}),!1===n[e]&&delete n[e]}),{params:n,passedParams:s,rest:r,events:i}}(r),{slides:_,slots:j}=Pu(i),k=()=>{m(!p)};Object.assign(E.on,{_containerClasses(e,t){c(t)}});const A=()=>{Object.assign(E.on,P),a=!0;const e={...E};if(delete e.wrapperClass,y.current=new fu(e),y.current.virtual&&y.current.params.virtual.enabled){y.current.virtual.slides=_;const e={cache:!1,slides:_,renderExternal:h,renderExternalUpdate:!1};vu(y.current.params.virtual,e),vu(y.current.originalParams.virtual,e)}};return g.current||A(),y.current&&y.current.on("_beforeBreakpoint",k),(0,d.useEffect)(()=>()=>{y.current&&y.current.off("_beforeBreakpoint",k)}),(0,d.useEffect)(()=>{!f.current&&y.current&&(y.current.emitSlidesClasses(),f.current=!0)}),_u(()=>{if(o&&(o.current=g.current),g.current)return y.current.destroyed&&A(),function({el:e,nextEl:t,prevEl:n,paginationEl:i,scrollbarEl:s,swiper:r}
1,o){xu(o)&&t&&n&&(r.params.navigation.nextEl=t,r.originalParams.navigation.nextEl=t,r.params.navigation.prevEl=n,r.originalParams.navigation.prevEl=n),wu(o)&&i&&(r.params.pagination.el=i,r.originalParams.pagination.el=i),bu(o)&&s&&(r.params.scrollbar.el=s,r.originalParams.scrollbar.el=s),r.init(e)}({el:g.current,nextEl:w.current,prevEl:b.current,paginationEl:S.current,scrollbarEl:T.current,swiper:y.current},E),s&&!y.current.destroyed&&s(y.current),()=>{y.current&&!y.current.destroyed&&y.current.destroy(!0,!1)}},[]),_u(()=>{!a&&P&&y.current&&Object.keys(P).forEach(e=>{y.current.on(e,P[e])});const e=function(e,t,n,i,s){const r=[];if(!t)return r;const o=e=>{r.indexOf(e)<0&&r.push(e)};if(n&&i){const e=i.map(s),t=n.map(s);e.join("")!==t.join("")&&o("children"),i.length!==n.length&&o("children")}return gu.filter(e=>"_"===e[0]).map(e=>e.replace(/_/,"")).forEach(n=>{if(n in e&&n in t)if(yu(e[n])&&yu(t[n])){const i=Object.keys(e[n]),s=Object.keys(t[n]);i.length!==s.length?o(n):(i.forEach(i=>{e[n][i]!==t[n][i]&&o(n)}),s.forEach(i=>{e[n][i]!==t[n][i]&&o(n)}))}else e[n]!==t[n]&&o(n)}),r}(M,v.current,_,x.current,e=>e.key);return v.current=M,x.current=_,e.length&&y.current&&!y.current.destroyed&&function({swiper:e,slides:t,passedParams:n,changedParams:i,nextEl:s,prevEl:r,scrollbarEl:o,paginationEl:a}){const l=i.filter(e=>"children"!==e&&"direction"!==e&&"wrapperClass"!==e),{params:c,pagination:d,navigation:u,scrollbar:h,virtual:p,thumbs:m}=e;let f,g,y,v,x,w,b,S;i.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&!n.thumbs.swiper.destroyed&&c.thumbs&&(!c.thumbs.swiper||c.thumbs.swiper.destroyed)&&(f=!0),i.includes("controller")&&n.controller&&n.controller.control&&c.controller&&!c.controller.control&&(g=!0),i.includes("pagination")&&n.pagination&&(n.pagination.el||a)&&(c.pagination||!1===c.pagination)&&d&&!d.el&&(y=!0),i.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||o)&&(c.scrollbar||!1===c.scrollbar)&&h&&!h.el&&(v=!0),i.includes("navigation")&&n.navigation&&(n.navigation.prevEl||r)&&(n.navigation.nextEl||s)&&(c.navigation||!1===c.navigation)&&u&&!u.prevEl&&!u.nextEl&&(x=!0);const T=t=>{e[t]&&(e[t].destroy(),"navigation"===t?(e.isElement&&(e[t].prevEl.remove(),e[t].nextEl.remove()),c[t].prevEl=void 0,c[t].nextEl=void 0,e[t].prevEl=void 0,e[t].nextEl=void 0):(e.isElement&&e[t].el.remove(),c[t].el=void 0,e[t].el=void 0))};i.includes("loop")&&e.isElement&&(c.loop&&!n.loop?w=!0:!c.loop&&n.loop?b=!0:S=!0),l.forEach(e=>{if(yu(c[e])&&yu(n[e]))Object.assign(c[e],n[e]),"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e||!("enabled"in n[e])||n[e].enabled||T(e);else{const t=n[e];!0!==t&&!1!==t||"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e?c[e]=n[e]:!1===t&&T(e)}}),l.includes("controller")&&!g&&e.controller&&e.controller.control&&c.controller&&c.controller.control&&(e.controller.control=c.controller.control),i.includes("children")&&t&&p&&c.virtual.enabled?(p.slides=t,p.update(!0)):i.includes("virtual")&&p&&c.virtual.enabled&&(t&&(p.slides=t),p.update(!0)),i.includes("children")&&t&&c.loop&&(S=!0),f&&m.init()&&m.update(!0),g&&(e.controller.control=c.controller.control),y&&(!e.isElement||a&&"string"!=typeof a||((a=document.createElement("div")).classList.add("swiper-pagination"),a.part.add("pagination"),e.el.appendChild(a)),a&&(c.pagination.el=a),d.init(),d.render(),d.update()),v&&(!e.isElement||o&&"string"!=typeof o||((o=document.createElement("div")).classList.add("swiper-scrollbar"),o.part.add("scrollbar"),e.el.appendChild(o)),o&&(c.scrollbar.el=o),h.init(),h.updateSize(),h.setTranslate()),x&&(e.isElement&&(s&&"string"!=typeof s||((s=document.createElement("div")).classList.add("swiper-button-next"),Vd(s,e.navigation.arrowSvg),s.part.add("button-next"),e.el.appendChild(s)),r&&"string"!=typeof r||((r=document.createElement("div")).classList.add("swiper-button-prev"),Vd(r,e.navigation.arrowSvg),r.part.add("button-prev"),e.el.appendChild(r))),s&&(c.navigation.nextEl=s),r&&(c.navigation.prevEl=r),u.init(),u.update()),i.includes("allowSlideNext")&&(e.allowSlideNext=n.allowSlideNext),i.includes("allowSlidePrev")&&(e.allowSlidePrev=n.allowSlidePrev),i.includes("direction")&&e.changeDirection(n.direction,!1),(w||S)&&e.loopDestroy(),(b||S)&&e.loopCreate(),e.update(
1)}({swiper:y.current,slides:_,passedParams:M,changedParams:e,nextEl:w.current,prevEl:b.current,scrollbarEl:T.current,paginationEl:S.current}),()=>{P&&y.current&&Object.keys(P).forEach(e=>{y.current.off(e,P[e])})}}),_u(()=>{var e;!(e=y.current)||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.emit("_virtualUpdated"),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())},[u]),d.createElement(t,Eu({ref:g,className:Su(`${l}${e?` ${e}`:""}`)},C),d.createElement(ku.Provider,{value:y.current},j["container-start"],d.createElement(n,{className:Tu(E.wrapperClass)},j["wrapper-start"],E.virtual?function(e,t,n){if(!n)return null;const i=e=>{let n=e;return e<0?n=t.length+e:n>=t.length&&(n-=t.length),n},s=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:r,to:o}=n,a=e.params.loop?-t.length:0,l=e.params.loop?2*t.length:t.length,c=[];for(let e=a;e<l;e+=1)e>=r&&e<=o&&c.push(t[i(e)]);return c.map((t,n)=>d.cloneElement(t,{swiper:e,style:s,key:t.props.virtualIndex||t.key||`slide-${n}`}))}(y.current,_,u):_.map((e,t)=>d.cloneElement(e,{swiper:y.current,swiperSlideIndex:t})),j["wrapper-end"]),xu(E)&&d.createElement(d.Fragment,null,d.createElement("div",{ref:b,className:"swiper-button-prev"}),d.createElement("div",{ref:w,className:"swiper-button-next"})),bu(E)&&d.createElement("div",{ref:T,className:"swiper-scrollbar"}),wu(E)&&d.createElement("div",{ref:S,className:"swiper-pagination"}),j["container-end"]))});Au.displayName="Swiper";const Lu=(0,d.forwardRef)(({tag:e="div",children:t,className:n="",swiper:i,zoom:s,lazy:r,virtualIndex:o,swiperSlideIndex:a,...l}={},c)=>{const u=(0,d.useRef)(null),[h,p]=(0,d.useState)("swiper-slide"),[m,f]=(0,d.useState)(!1);function g(e,t,n){t===u.current&&p(n)}_u(()=>{if(void 0!==a&&(u.current.swiperSlideIndex=a),c&&(c.current=u.current),u.current&&i){if(!i.destroyed)return i.on("_slideClass",g),()=>{i&&i.off("_slideClass",g)};"swiper-slide"!==h&&p("swiper-slide")}}),_u(()=>{i&&u.current&&!i.destroyed&&p(i.getSlideClasses(u.current))},[i]);const y={isActive:h.indexOf("swiper-slide-active")>=0,isVisible:h.indexOf("swiper-slide-visible")>=0,isPrev:h.indexOf("swiper-slide-prev")>=0,isNext:h.indexOf("swiper-slide-next")>=0},v=()=>"function"==typeof t?t(y):t;return d.createElement(e,Eu({ref:u,className:Su(`${h}${n?` ${n}`:""}`),"data-swiper-slide-index":o,onLoad:()=>{f(!0)}},l),s&&d.createElement(ju.Provider,{value:y},d.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":"number"==typeof s?s:void 0},v(),r&&!m&&d.createElement("div",{className:"swiper-lazy-preloader"}))),!s&&d.createElement(ju.Provider,{value:y},v(),r&&!m&&d.createElement("div",{className:"swiper-lazy-preloader"})))});Lu.displayName="SwiperSlide";const Nu=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ru=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),Iu=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var Vu={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Du=(0,d.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:s="",children:r,iconNode:o,...a},l)=>(0,d.createElement)("svg",{ref:l,...Vu,width:t,height:t,stroke:e,strokeWidth:i?24*Number(n)/Number(t):n,className:Ru("lucide",s),...!r&&!Iu(a)&&{"aria-hidden":"true"},...a},[...o.map(([e,t])=>(0,d.createElement)(e,t)),...Array.isArray(r)?r:[r]])),Ou=(e,t)=>{const n=(0,d.forwardRef)(({className:n,...i},s)=>{return(0,d.createElement)(Du,{ref:s,iconNode:t,className:Ru(`lucide-${r=Nu(e),r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...i});var r});return n.displayName=Nu(e),n},Fu=Ou("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),Bu=Ou("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),zu=(0,Z.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,Z.jsx)("mask",{id:"mapping-back-button-mask",fill:"white",children:(0,Z.jsx)("path",{d:"M14.3337 8.33268H6.22033L9.94699 4.60602L9.00033 3.66602L3.66699 8.99935L9.00033 14.3327L9.94033 13.3927L6.22033 9.66602H14.3337V8.33268Z"})}),(0,Z.jsx)("path",{d:"M14.3337 8.33268H6.22033L9.94699 4.60602L9.00033 3.66602L3.66699 8.99935L9.00033 14.3327L9.94033 13.3927L6.22033 9.66602H14.3337V8.33268Z",fill:"black"}),(0,Z.jsx)("path",{d:"M14.3337 8.33268H15.8337V6.83268H14.3337V8.33268ZM6.22033 8.33268L5.15967 7.27202L2.599 9.83268H6.22033V8.33268ZM9.94699 4.60602L11.0077 5.66668L12.0721 4.60226L11.0039 3.54161L9.94699 4.60602ZM9.00033 3.66602L10.0572 2.60161L8.99658 1.54844L7.93966 2.60536L9.00033 3.66602ZM3.66699 8.99935L2.60633 7.93869L1.54567 8.99935L2.60633 10.06L3.66699 8.99935ZM9.00033 14.3327L7.93966 15.3933L9.00033 16.454L10.061 15.3933L9.00033 14.3327ZM9.94033 13.3927L11.001 14.4533L12.0607 13.3936L11.0019 12.333L9.94033 13.3927ZM6.22033 9.66602V8.16602H2.60359L5.15872 10.7257L6.22033 9.66602ZM14.3337 9.66602V11.166H15.8337V9.66602H14.3337ZM14.3337 8.33268V6.83268H6.22033V8.33268V9.83268H14.3337V8.33268ZM6.22033 8.33268L7.28099 9.39334L11.0077 5.66668L9.94699 4.60602L8.88633 3.54536L5.15967 7.27202L6.22033 8.33268ZM9.94699 4.60602L11.0039 3.54161L10.0572 2.60161L9.00033 3.66602L7.94342 4.73042L8.89009 5.67042L9.94699 4.60602ZM9.00033 3.66602L7.93966 2.60536L2.60633 7.93869L3.66699 8.99935L4.72765 10.06L10.061 4.72668L9.00033 3.66602ZM3.66699 8.99935L2.60633 10.06L
17.93966 15.3933L9.00033 14.3327L10.061 13.272L4.72765 7.93869L3.66699 8.99935ZM9.00033 14.3327L10.061 15.3933L11.001 14.4533L9.94033 13.3927L8.87966 12.332L7.93966 13.272L9.00033 14.3327ZM9.94033 13.3927L11.0019 12.333L7.28193 8.60631L6.22033 9.66602L5.15872 10.7257L8.87872 14.4524L9.94033 13.3927ZM6.22033 9.66602V11.166H14.3337V9.66602V8.16602H6.22033V9.66602ZM14.3337 9.66602H15.8337V8.33268H14.3337H12.8337V9.66602H14.3337Z",fill:"#404040",mask:"url(#mapping-back-button-mask)"})]}),$u=function(){const{content:e,loading:t,post:n}=Q(),{mapRef:i,getBasePadding:s,closeActiveSelection:r}=de(),{isMd:o}=re(),a=window.bordeauxMapping?.translations||{},[l,c]=(0,d.useState)(["bordeaux-mapping-content","wp-block-content"]),[u,h]=(0,d.useState)(!1);(0,d.useRef)(i),(0,d.useEffect)(()=>{c(u?e=>[...e,"opened"]:e=>e.filter(e=>"opened"!==e))},[u]),(0,d.useEffect)(()=>{h(!!n)},[n]);const{updatePost:p}=Q(),m=()=>{"function"!=typeof r?(p(null),h(!1),i?.setPadding&&i.setPadding(s())):r()};return(0,Z.jsxs)(Z.Fragment,{children:[!o&&(0,Z.jsx)(fd,{open:u,onClose:()=>{h(!1),m()},children:(0,Z.jsx)("div",{className:"bordeaux-mapping-content bordeaux-mapping-content-mobile wp-block-content opened",children:t?(0,Z.jsx)(gd,{}):(0,Z.jsxs)(Z.Fragment,{children:["designation"===e?.type&&e&&(0,Z.jsx)(qu,{}),"territory"===e?.type&&e&&(0,Z.jsx)(Yu,{}),"address"===e?.type&&e&&(0,Z.jsx)(Hu,{}),"activity"===e?.type&&e&&(0,Z.jsx)(Gu,{}),"operation"===e?.type&&e&&(0,Z.jsx)(sh,{})]})})}),o&&(0,Z.jsx)("div",{className:l.join(" "),children:t?(0,Z.jsx)(gd,{}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)("div",{className:"mapping-content-back",children:[(0,Z.jsxs)("button",{type:"button",className:"mapping-content-back__button btn breadcrumb-btn",onClick:m,children:[zu,(0,Z.jsx)("span",{children:a.back||"Back"})]}),"activity"===e?.type&&e?.link&&(0,Z.jsx)("a",{className:"mapping-content-back__single-link btn breadcrumb-btn",href:e.link,children:(0,Z.jsx)("span",{children:a.view_sheet||"Voir la fiche"})})]}),"designation"===e?.type&&e&&(0,Z.jsx)(qu,{}),"territory"===e?.type&&e&&(0,Z.jsx)(Yu,{}),"address"===e?.type&&e&&(0,Z.jsx)(Hu,{}),"activity"===e?.type&&e&&(0,Z.jsx)(Gu,{}),"operation"===e?.type&&e&&(0,Z.jsx)(sh,{})]})})]})},Hu=()=>{var e,t;const{content:n}=Q(),i=window.bordeauxMapping?.translations||{},s=Array.isArray(n?.meta?.related_content_cards)?n.meta.related_content_cards:[];let r,o="";"Caviste"===n?.acf?.establishment_type&&(o=window.bordeauxMapping.baseUrl+"/app/themes/bordeaux/src/images/large-Sticker_caviste.jpg"),"Restaurant"===n?.acf?.establishment_type&&(o=window.bordeauxMapping.baseUrl+"/app/themes/bordeaux/src/images/large-Sticker_restaurant.jpg"),"Oyster_farm"===n?.acf?.establishment_type&&(o=window.bordeauxMapping.baseUrl+"/app/themes/bordeaux/src/images/large-Sticker_cabane.jpg");const a=null!==(e=n.acf.total_bordeaux_wines)&&void 0!==e?e:0,l=null!==(t=n.acf.total_wines)&&void 0!==t?t:0;return r=a/l>=.75?3:a/l>=.5?2:1,(0,Z.jsx)("div",{className:"address-content",children:(0,Z.jsxs)("section",{children:[(0,Z.jsx)("div",{className:"vignette",children:(0,Z.jsx)("img",{src:o,alt:n?.acf?.establishment_type})}),(0,Z.jsx)("div",{className:"title",children:(0,Z.jsxs)("div",{children:[(0,Z.jsxs)("div",{className:"label",children:["Caviste"===n?.acf?.establishment_type?i.caviste:"","Restaurant"===n?.acf?.establishment_type?i.restaurant:"","Oyster_farm"===n?.acf?.establishment_type?i.oyster_farm:""]}),(0,Z.jsx)("h2",{children:(0,Z.jsx)(c.RawHTML,{children:n?.title?.rendered})})]})}),(0,Z.jsx)("h3",{children:i.where_is_it}),(0,Z.jsxs)("p",{children:[n?.acf?.address_street,(0,Z.jsx)("br",{}),n?.acf?.postal_code," ",n?.acf?.city," ",(0,Z.jsx)("br",{}),i.phone," ",(0,Z.jsx)("a",{href:`tel:${n?.acf?.phone}`,children:n?.acf?.phone}),(0,Z.jsx)("br",{}),i.email," ",(0,Z.jsx)("a",{href:`mailto:${n?.acf?.email}`,children:n?.acf?.email}),(0,Z.jsx)("br",{}),i.website," ",(0,Z.jsx)("a",{href:`${n?.acf?.website}`,children:n?.acf?.website}),(0,Z.jsx)("br",{}),n?.acf?.facebook_url&&(0,Z.jsx)("a",{href:n?.acf?.facebook_url,target:"_blank",rel:"noopener noreferrer",children:"Facebook"})," ",(0,Z.jsx)("br",{}),n?.acf?.instagram_url&&(0,Z.jsx)("a",{href:n?.acf?.instagram_url,target:"_blank",rel:"noopener noreferrer",children:"Instagram"})]}
1),n?.acf?.year_round_hours&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("h3",{children:i.is_it_open}),(0,Z.jsxs)("p",{children:[n?.acf?.year_round_hours?(0,Z.jsx)(c.RawHTML,{children:n?.acf?.year_round_hours}):i.info_not_available,(0,Z.jsx)("br",{})]})]}),"Restaurant"===n?.acf?.establishment_type&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("h3",{children:i.is_bordeaux_local}),(0,Z.jsx)("h4",{children:i.bordeaux_wines_side}),(0,Z.jsxs)("div",{className:"wine-carte",children:[(0,Z.jsx)("img",{src:window.bordeauxMapping.baseUrl+"/app/themes/bordeaux/src/images/wine_level"+r+".svg",alt:"Carte des vins de Bordeaux"}),1===r&&(0,Z.jsx)("p",{children:i.nice_wine_list}),2===r&&(0,Z.jsx)("p",{children:i.very_nice_wine_list}),3===r&&(0,Z.jsx)("p",{children:i.excellent_wine_list})]}),(0,Z.jsx)("h4",{children:i.nouvelle_aquitaine_products_side}),n?.acf?.nouvelle_aquitaine_products?(0,Z.jsx)(c.RawHTML,{children:n?.acf?.nouvelle_aquitaine_products}):i.info_not_available]}),s.length>0&&(0,Z.jsx)(Uu,{items:s,title:i.go_further||Wu()})]})})},Wu=()=>{const e="undefined"!=typeof document?String(document.documentElement?.lang||"").toLowerCase():"";return e.startsWith("fr")?'ALLER<br><span class="has-custom-font font-edo">Plus loin</span>':e.startsWith("ja")?'さらに<br><span class="has-custom-font font-edo">読む</span>':'GO<br><span class="has-custom-font font-edo">Further</span>'},Uu=({items:e,title:t})=>(0,Z.jsxs)("div",{className:"related-articles",children:[(0,Z.jsx)("h3",{className:"related-articles-title",children:(0,Z.jsx)(c.RawHTML,{children:t})}),(0,Z.jsx)("div",{className:"related-articles-list wp-block-query",children:e.map(e=>{const t=Boolean(e?.image_url);return(0,Z.jsxs)("a",{className:"card-product card-article wp-block-post",href:e?.link,target:"_self",children:[t&&(0,Z.jsx)("div",{className:"product-image wp-block-post-featured-image",children:(0,Z.jsx)("img",{src:e.image_url,alt:e?.image_alt||e?.title||""})}),(0,Z.jsx)("div",{className:"product-info wp-block-group",children:(0,Z.jsx)("h4",{className:"wp-block-post-title has-m-font-size",children:e?.title})})]},e?.id||e?.link)})})]}),Gu=()=>{const{content:e}=Q(),t=(0,d.useRef)(null),n="string"==typeof e?.title?e.title:e?.title?.rendered;if((0,d.useEffect)(()=>{e?.html&&t.current&&"function"==typeof window.bordeauxInitActivityDetailPanel&&window.bordeauxInitActivityDetailPanel(t.current)},[e?.html]),e?.html)return(0,Z.jsx)("div",{className:"address-content activity-content activity-content--shared",children:(0,Z.jsx)("section",{ref:t,className:"activity-content__shared",children:(0,Z.jsxs)("div",{className:"activity-detail-panel",children:[n&&(0,Z.jsx)("h2",{className:"activity-content__title",children:(0,Z.jsx)(c.RawHTML,{children:n})}),(0,Z.jsx)(c.RawHTML,{children:e.html})]})})});const i=Array.isArray(e?.activity_kind)?e.activity_kind.map(e=>e?.name).filter(Boolean):[],s="string"==typeof e?.acf?.sirtaqui_activity_kind_labels?e.acf.sirtaqui_activity_kind_labels.split(/\r?\n/).map(e=>e.trim()).filter(Boolean):[],r=i.length>0?i:s,o=[e?.acf?.sirtaqui_address_1,e?.acf?.sirtaqui_address_1_suite,e?.acf?.sirtaqui_address_2,e?.acf?.sirtaqui_address_3,[e?.acf?.sirtaqui_postal_code,e?.acf?.sirtaqui_commune].filter(Boolean).join(" ").trim()].filter(e=>"string"==typeof e&&""!==e.trim()),a=e?.acf?.sirtaqui_phone,l=e?.acf?.sirtaqui_email,u=e?.acf?.sirtaqui_website_url,h=e?.acf?.sirtaqui_booking_url;return(0,Z.jsx)("div",{className:"address-content activity-content",children:(0,Z.jsxs)("section",{children:[(0,Z.jsx)("div",{className:"title",children:(0,Z.jsxs)("div",{children:[r.length>0&&(0,Z.jsx)("div",{className:"label",children:r.join(" · ")}),(0,Z.jsx)("h2",{children:(0,Z.jsx)(c.RawHTML,{children:e?.title?.rendered})})]})}),e?.acf?.sirtaqui_description&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("h3",{children:"Description"}),(0,Z.jsx)("p",{children:(0,Z.jsx)(c.RawHTML,{children:e.acf.sirtaqui_description})})]}),o.length>0&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("h3",{children:"Adresse"}),(0,Z.jsx)("p",{children:o.map((e,t)=>(0,Z.jsxs)("span",{children:[e,(0,Z.jsx)("br",{})]},`activity-address-${t}`))})]}),(a||l||u||h)&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("h3",{children:"Contact"}),(0,Z.jsxs)("p",{children:[a&&(0,Z.jsxs)(Z.Fragment,{children:["Tel: ",(0,Z.jsx)("a",{href:`tel:${a}`,children:a}),(0,Z.jsx)("br",{})]}),l&&(0,Z.jsxs)(Z.Fragment,{children:["Email: ",(0,Z.jsx)("a",{href:`mailto:${l}`,children:l}),(0,Z.jsx)("br",{})]}),u&&(0,Z.jsxs)(Z.Fragment,{children:["Site: ",(0,Z.jsx)("a",{href:u,target:"_blank",rel:"noopener noreferrer",children:u}),(0,Z.jsx)("br",{})]}),h&&(0,Z.jsxs)(Z.Fragment,{children:["Reservation: ",(0,Z.jsx)("a",{href:h,target:"_blank",rel:"noopener noreferrer",children:h}),(0,Z.jsx)("br",{})]})]})]}),e?.link&&(0,Z.jsx)("p",{children:(0,Z.jsx)("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",children:"Voir la fiche"})})]})})},qu=()=>{const{content:e,color:t,linkedPost:n}=Q(),i=window.bordeauxMapping?.translations||{},[s,r]=(0,d.useState)(null),[o,a]=(0,d.useState)(!0),[l,u]=(0,d.useState)(!1);return console.log("Rendering DesignationContent",e,n),(0,Z.jsxs)("div",{className:"designation-content",children:[(0,Z.jsxs)("section",{children:[(0,Z.jsxs)("div",{className:"title",children:[(0,Z.jsxs)("h1",{className:"wp-block-heading",children:[i.aop," ",(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{className:"has-custom-font font-edo",children:e?.title?.rendered})]}),(0,Z.jsx)(Ku,{audioUrl:e?.meta?._bordeaux_ai_pronounciation_url})]}),(0,Z.jsx)("div",{className:"description",children:e&&(0,Z.jsx)(c.RawHTML,{children:e?.acf.content?.description})}),(0,Z.jsx)("div",{className:"informations",children:(0,Z.jsxs)("ul",{children:[e?.wine_color&&e.wine_color.length>0&&(0,Z.jsxs)("li",{className:"information-item",children:[(0,Z.jsx)("div",{className:"label",children:i.color}),(0,Z.jsx)("div",{className:"value flex gap-3 items-center justify-end",children:e.wine_color.length>0&&e.wine_color.map((e,t)=>(0,Z.jsx)(Xe,{taxonomy:e},t))})]}),e?.acf.content.territory&&(0,Z.jsxs)("li",{className:"information-item",children:[(0,Z.jsx)("div",{className:"label",children:i.territory}),(0,Z.jsx)("div",{className:"value",children:(0,Z.jsx)(Ye,{post:n})})]}),e?.acf.content.area&&(0,Z.jsxs)("li",{className:"information-item",children:[(0,Z.jsx)("div",{className:"label",children:i.surface}),(0,Z.jsx)("div",{className:"value",children:e?.acf.content.area})]}),e?.acf.content.winegrowers&&(0,Z.jsxs)("li",{className:"information-item",children:[(0,Z.jsx)("div",{className:"label",children:i.winegrowers_count}),(0,Z.jsx)("div",{className:"value",children:e?.acf.content.winegrowers})]}),e?.acf.content.links&&(0,Z.jsxs)("li",{className:"information-item",children:[(0,Z.jsx)("div",{className:"label",children:i.site}),(0,Z.jsx)("div",{className:"value",children:(0,Z.jsx)("div",{className:"links",children:e?.acf.content.links.map((e,t)=>(0,Z.jsx)("a",{href:e.link.url,target:e.link.target,rel:"noopener noreferrer link",children:e.link.title},t))})})]})]})}),(0,Z.jsx)("div",{className:"introduction",children:e&&(0,Z.jsx)(c.RawHTML,{children:Ke(e?.acf.content.introduction)})}),(0,Z.jsx)("div",{className:"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex",children:(0,Z.jsx)("div",{className:"wp-block-button",children:(0,Z.jsx)("a",{href:e?.link,className:"wp-block-button__link wp-element-button",children:i.see_detailed_sheet})})})]}),(0,Z.jsx)("section",{className:"products",children:(0,Z.jsxs)("div",{className:"products",children:[(0,Z.jsxs)("div",{className:"title",children:[(0,Z.jsxs)("h3",{children:[i.selection_of," ",(0,Z.jsx)("span",{className:"has-custom-font font-edo",children:e?.meta?.territory?.post_title})]}
1),(0,Z.jsx)(Zu,{swiperRef:s,isBeginning:o,isEnd:l})]}),(0,Z.jsx)(Au,{slidesPerView:"auto",spaceBetween:20,className:"products-list",onSwiper:e=>{r(e)},onSlideChange:e=>{a(e.isBeginning),u(e.isEnd)},children:(0,Z.jsx)("div",{className:"products-list",children:e.meta.wine_selection.map((e,t)=>(0,Z.jsx)(Lu,{children:(0,Z.jsxs)("div",{className:"card-product",style:{cursor:"pointer"},onClick:()=>{window.location.href=e?.guid},children:[(0,Z.jsx)("div",{className:"product-image",style:{backgroundImage:`url(${e.background_image})`},children:(0,Z.jsx)("img",{src:e?.bottle_image?.url,alt:e?.post_title})}),(0,Z.jsxs)("div",{className:"product-info",children:[(0,Z.jsx)("p",{className:"territory",children:e?.territory}),(0,Z.jsx)("h3",{className:"wp-block-post-title has-m-font-size",children:(0,Z.jsx)("a",{href:e?.link,target:"_self",children:e?.post_title})}),(0,Z.jsx)("p",{className:"price",children:e?.price})]})]},t)},t))})})]})}),(0,Z.jsxs)("section",{className:"see-more",children:[(0,Z.jsxs)("h3",{children:[i.want_to_know_more," ",(0,Z.jsx)("span",{className:"has-custom-font font-edo",children:e?.title?.rendered})]}),(0,Z.jsx)("div",{className:"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex",children:(0,Z.jsx)("div",{className:"wp-block-button",children:(0,Z.jsx)("a",{href:e?.link,className:"wp-block-button__link wp-element-button",children:i.see_detailed_sheet})})})]})]})},Zu=({swiperRef:e,isBeginning:t,isEnd:n})=>{const i=null!=e?e:null;return(0,Z.jsxs)("div",{className:"slider-controls",children:[(0,Z.jsx)("button",{type:"button",className:`slider-control prev ${t&&"disabled"}`,onClick:()=>i?.slidePrev(),children:(0,Z.jsx)(Fu,{})}),(0,Z.jsx)("button",{type:"button",className:`slider-control next ${n&&"disabled"}`,onClick:()=>i?.slideNext(),children:(0,Z.jsx)(Bu,{})})]})},Yu=()=>{const{content:e}=Q(),t=window.bordeauxMapping?.translations||{};return console.log("Rendering TerritoryContent",e),(0,Z.jsx)("div",{className:"territory-content",children:(0,Z.jsxs)("section",{children:[(0,Z.jsx)("span",{className:"label",children:t.territory}),(0,Z.jsx)("div",{className:"title",children:(0,Z.jsx)("h2",{className:"wp-block-heading",children:e?.title?.rendered})}),(0,Z.jsx)("div",{className:"description",children:e&&(0,Z.jsx)(Ju,{content:e?.acf.content?.introduction,length:200})}),(0,Z.jsx)("h3",{children:t.the_appellations}),e?.designations&&e.designations.length>0&&(0,Z.jsx)("div",{className:"designations",children:e.designations.map(e=>(0,Z.jsx)(Xu,{designation:e},e.id))})]})})},Xu=({designation:e})=>{const{setLoading:t}=Q(),{handlePostClick:n,updatePost:i}=de(),{areas:s}=de();return console.log("Rendering DesignationCard",e),(0,Z.jsxs)("div",{className:"designation-card",onClick:async()=>{console.log("Clicked on designation card:",e);const t=s.find(t=>t.post_id===e.id);console.log("Found area for designation:",t,t.ID,e.id),n(t)},children:[(0,Z.jsx)("div",{className:"thumbnail",children:(0,Z.jsx)("img",{src:e?.featured_image_url,alt:e?.post_title})}),(0,Z.jsx)("div",{className:"title",children:(0,Z.jsx)("h5",{children:e?.post_title})})]})},Ku=({audioUrl:e})=>{const[t,n]=(0,d.useState)(!1),i=(0,d.useRef)(null);return(0,d.useEffect)(()=>{n(!1),i.current=new Audio(e)},[e]),(0,Z.jsxs)("div",{className:"block block-post-title-pronounciation "+(t?"playing":""),onClick:()=>{i.current&&(t?(i.current.pause(),i.current.currentTime=0,n(!1)):(i.current.play(),n(!0),i.current.onended=()=>{n(!1)}))},children:[(0,Z.jsx)("div",{className:"play-button",children:(0,Z.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"11",viewBox:"0 0 15 11",fill:"none",children:(0,Z.jsx)("path",{d:"M9.77669 3.10327C10.4016 3.72836 10.7526 4.57606 10.7526 5.45994C10.7526 6.34382 10.4016 7.19151 9.77669 7.8166M12.1299 0.75C13.3797 2.00018 14.0818 3.69557 14.0818 5.46333C14.0818 7.23109 13.3797 8.92648 12.1299 10.1767M6.75 0.796631L3.41667 3.4633H0.75V7.4633H3.41667L6.75 10.13V0.796631Z",stroke:"#404040","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})}),(0,Z.jsx)("div",{className:"pause-button",children:(0,Z.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-pause-icon lucide-pause",children:[(0,Z.jsx)("rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}),(0,Z.jsx)("rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"})]})})]})},Ju=({content:e,length:t})=>{const[n,i]=(0,d.useState)(!1),s=window.bordeauxMapping?.translations||{};return(0,Z.jsx)("div",{className:"excerpt-expandable "+(n?"expanded":""),children:(0,Z.jsxs)("div",{className:"excerpt-content",children:[(0,Z.jsx)(c.RawHTML,{children:n?e:e.slice(0,t)+(e.length>t?"...":"")}),(0,Z.jsx)("span",{className:"see-more",onClick:()=>{i(!n)},children:!n&&s.see_more})]})})},Qu=e=>Array.isArray(e)?e.map(e=>
1String(e).trim()).filter(Boolean):"string"==typeof e?e.split("|").map(e=>e.trim()).filter(Boolean):[],eh=e=>{const t=String(e||"").trim();if(!t)return"";if(/^\d{4}-\d{2}-\d{2}$/.test(t)){const[e,n,i]=t.split("-").map(Number),s=new Date(e,n-1,i);if(!Number.isNaN(s.getTime())){const e=document.documentElement.lang||navigator.language||"en";return new Intl.DateTimeFormat(e,{day:"numeric",month:"long",year:"numeric"}).format(s)}}return t},th={marginTop:0},nh={maxWidth:"50%",textAlign:"right",marginLeft:"auto",overflowWrap:"anywhere"},ih=({label:e,children:t})=>t?(0,Z.jsxs)("li",{className:"information-item",children:[(0,Z.jsx)("div",{className:"label",style:th,children:e}),(0,Z.jsx)("div",{className:"value",style:nh,children:t})]}):null,sh=()=>{const{content:e}=Q(),t=e?.operation||{},n=window.bordeauxMapping?.translations||{},i={Caviste:n.caviste||"Wine merchant",Restaurant:n.restaurant||"Restaurant",Oyster_farm:n.oyster_farm||"Oyster farmer"},s=(t?.animation_location_name||"").trim()||t?.animation_location_name||t?.title||"",r="GMS"===t?.establishment_type?"":i[t?.establishment_type]||t?.establishment_type||"",o=Qu(t?.animation_days).map(eh).filter(Boolean).join(",\n"),a=(t?.animation_details||"").trim(),l=Qu(t?.operators),c=Qu(t?.references),d=Boolean(t?.operation_name||t?.animation_location_name||t?.enseigne||t?.address_street||t?.postal_code||t?.city||t?.country||r||o||a||l.length||c.length||t?.website||t?.facebook_url||t?.instagram_url);return(0,Z.jsx)("div",{className:"address-content operation-content",children:(0,Z.jsxs)("section",{children:[(0,Z.jsx)("div",{className:"title",children:(0,Z.jsxs)("div",{children:[r&&(0,Z.jsx)("div",{className:"label",children:r}),(0,Z.jsx)("h2",{children:s})]})}),d&&(0,Z.jsx)("div",{className:"informations",children:(0,Z.jsxs)("ul",{children:[(0,Z.jsx)(ih,{label:n.operation_session||"Session",children:t?.operation_name}),(0,Z.jsx)(ih,{label:n.operation_location||"Venue",children:t?.animation_location_name}),(0,Z.jsx)(ih,{label:n.operation_store||"Retailer",children:t?.enseigne}),"GMS"!==t?.establishment_type&&(0,Z.jsx)(ih,{label:n.operation_channel||"Channel",children:i[t?.establishment_type]||t?.establishment_type}),(0,Z.jsx)(ih,{label:n.operation_address||"Address",children:t?.address_street}),(0,Z.jsx)(ih,{label:n.operation_postal_code||"Postcode",children:t?.postal_code}),(0,Z.jsx)(ih,{label:n.operation_city||"City",children:t?.city}),(0,Z.jsx)(ih,{label:n.operation_country||"Country",children:t?.country}),(0,Z.jsx)(ih,{label:n.operation_animation_days||"Event dates",children:o?(0,Z.jsx)("span",{style:{whiteSpace:"pre-line"},children:o}):null}),(0,Z.jsx)(ih,{label:n.operation_details||"Details",children:a?(0,Z.jsx)("span",{style:{whiteSpace:"pre-line"},children:a}):null}),(0,Z.jsx)(ih,{label:n.operation_operators||"Operators",children:l.join(", ")}),(0,Z.jsx)(ih,{label:n.operation_references||"References",children:c.join(", ")}),(0,Z.jsx)(ih,{label:n.operation_website||"Website",children:t?.website?(0,Z.jsx)("div",{className:"links",children:(0,Z.jsx)("a",{href:t.website,target:"_blank",rel:"noopener noreferrer link",children:t.website})}):null}),(0,Z.jsx)(ih,{label:"Facebook",children:t?.facebook_url?(0,Z.jsx)("div",{className:"links",children:(0,Z.jsx)("a",{href:t.facebook_url,target:"_blank",rel:"noopener noreferrer link",children:t.facebook_url})}):null}),(0,Z.jsx)(ih,{label:"Instagram",children:t?.instagram_url?(0,Z.jsx)("div",{className:"links",children:(0,Z.jsx)("a",{href:t.instagram_url,target:"_blank",rel:"noopener noreferrer link",children:t.instagram_url})}):null})]})})]})})},rh=Ou("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),oh=function({ctaType:e,link:t}){const n=window.bordeauxMapping?.translations||{};return(0,Z.jsx)("div",{className:`cta ${e}`,children:(0,Z.jsxs)("button",{className:`cta-button maximize ${e}`,onClick:()=>{window.location.href=t},children:["with_text"===e&&(n.open_map||"Ouvrir la carte")," ",(0,Z.jsx)(rh,{color:"white"})]})})},ah=function({onMouseEnter:e,onMouseLeave:t}){const{areas:n}=de(),{filters:i}=ne(),s=6339,r=11484,o=n.find(e=>279===e.post_id||e.post_id===s||e.post_id===r),{onClick:a}=Ne(o),[l,c]=(0,d.useState)(null),u="addresses"===i?.tab?"addresses":"vineyard",h=l?.name||"";return(0,d.useEffect)(()=>
1{if(n.length>0){const e=n.find(e=>279===e.post_id||e.post_id===s||e.post_id===r);c(e)}},[n,279,s,r]),l&&"vineyard"===u?(0,Z.jsxs)("div",{className:"vignette-veynard",onClick:()=>a(),onMouseEnter:e,onMouseLeave:t,children:[(0,Z.jsx)("img",{src:bordeauxMapping.baseUrl+"/app/themes/bordeaux/src/images/vignette_veynard_card.png",alt:h||"Veynard"}),(0,Z.jsx)("div",{className:"vignette-veynard__overlay"}),(0,Z.jsx)("div",{className:"vignette-veynard__content",children:(0,Z.jsx)("div",{className:"vignette-veynard__title",children:h})})]}):null},lh=Ou("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]),ch=Ou("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),dh={"audio-guide":{key:"audio_guide",value:"audio-guide"},"open-now":{key:"open_now",value:"open-now"},"handicap-auditif":{key:"handicap_auditif",value:"handicap-auditif"},"handicap-mental":{key:"handicap_mental",value:"handicap-mental"},"handicap-moteur":{key:"handicap_moteur",value:"handicap-moteur"},"handicap-visuel":{key:"handicap_visuel",value:"handicap-visuel"},animals:{key:"animals",value:"accepted"},family:{key:"family",value:"family"},"grand-cru":{key:"grand_cru",value:"grand-cru"}},uh="https://geo.api.gouv.fr/communes",hh=new Map,ph=e=>String(e||"").trim().toLowerCase(),mh=e=>{const t=e?.centre?.coordinates;if(!Array.isArray(t)||t.length<2)return null;const n=Array.isArray(e?.codesPostaux)&&e.codesPostaux.length>0?e.codesPostaux[0]:"";return{code:e.code,name:e.nom,label:n?`${e.nom} (${n})`:e.nom,lat:t[1],lng:t[0]}},{useId:fh}=u(),gh=["chateaux-viticoles"],yh=["chateaux-viticoles","caves-bars-vins"],vh=["chateaux-viticoles"],xh={"blanc-doux":"#F4B23C","sweet-white-wine":"#F4B23C","blanc-liquoreux":"#F4B23C","blanc-sec":"#CDD85A","dry-white-wine":"#CDD85A",clairet:"#F4BBCB",cremant:"#E7C889",rosé:"#E7A7B9",rose:"#E7A7B9","rose-wine":"#E7A7B9",rouge:"#E50041","red-wine":"#E50041"},wh=new Map,bh=()=>window.bordeauxMapping?.activityIconRegistry||{},Sh=e=>{if(!e)return"";const t=bh()?.[e];if(!t)return"";if("url"===t.type)return t.value||"";if("svg"!==t.type||"string"!=typeof t.value)return"";if(!wh.has(e)){const n=t.value.trim();wh.set(e,`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(n)}`)}return wh.get(e)||""};function Th({iconName:e,alt:t,className:n=""}){const i=Sh(e);return i?(0,Z.jsx)("img",{src:i,alt:t,className:n}):null}function Eh({iconName:e,color:t,alt:n}){const i=Sh(e);return(0,Z.jsxs)("svg",{width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,Z.jsx)("circle",{cx:"18",cy:"18",r:"18",fill:t}),i?(0,Z.jsx)("image",{x:"9",y:"9",width:"18",height:"18",href:i,"aria-label":n}):null]})}const Mh=(e,{hasAddressType:t=!0}={})=>({tab:e,type:"addresses"===e?t?["activity","address","activity-zone"]:["activity","activity-zone"]:["designation","territory"]}),Ch=e=>{const t=[e?.slug,e?.name,e?.title?.rendered].filter(Boolean).map(e=>String(e).trim().toLowerCase());for(const e of t)if(xh[e])return xh[e];return"#A3A3A3"};function Ph({path:e,viewBox:t="0 0 24 24",width:n=24,height:i=24,strokeWidth:s=4}){const r=fh().replace(/:/g,"");return(0,Z.jsxs)("svg",{width:n,height:i,viewBox:t,fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,Z.jsx)("mask",{id:r,fill:"white",children:(0,Z.jsx)("path",{d:e})}),(0,Z.jsx)("path",{d:e,fill:"currentColor",stroke:"currentColor",strokeWidth:s,mask:`url(#${r})`})]})}function _h(){return(0,Z.jsx)(Ph,{path:"M6 3V9C6 11.97 8.16 14.43 11 14.91V19H8V21H16V19H13V14.91C15.84 14.43 18 11.97 18 9V3H6ZM16 8H8V5H16V8Z"})}function jh(){return(0,Z.jsx)(Ph,{path:"M12 12C10.9 12 10 11.1 10 10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 11.1 13.1 12 12 12ZM18 10.2C18 6.57 15.35 4 12 4C8.65 4 6 6.57 6 10.2C6 12.54 7.95 15.64 12 19.34C16.05 15.64 18 12.54 18 10.2ZM12 2C16.2 2 20 5.22 20 10.2C20 13.52 17.33 17.45 12 22C6.67 17.45 4 13.52 4 10.2C4 5.22 7.8 2 12 2Z"})}function kh(){return(0,Z.jsx)(Ph,{path:"M7.00506 6H17.0051L11.9951 12.3L7.00506 6ZM4.25506 5.61C6.27506 8.2 10.0051 13 10.0051 13V19C10.0051 19.55 10.4551 20 11.0051 20H13.0051C13.5551 20 14.0051 19.55 14.0051 19V13C14.0051 13 17.7251 8.2 19.7451 5.61C20.2551 4.95 19.7851 4 18.9551 4H5.04506C4.21506 4 3.74506 4.95 4.25506 5.61Z"})}function Ah(){return(0,Z.jsx)(Ph,{path:"M4.25 10.5C3.42 10.5 2.75 11.17 2.75 12C2.75 12.83 3.42 13.5 4.25 13.5C5.08 13.5 5.75 12.83 5.75 12C5.75 11.17 5.08 10.5 4.25 10.5ZM4.25 4.5C3.42 4.5 2.75 5.17 2.75 6C2.75 6.83 3.42 7.5 4.25 7.5C5.08 7.5 5.75 6.83 5.75 6C5.75 5.17 5.08 4.5 4.25 4.5ZM4.25 16.5C3.42 16.5 2.75 17.18 2.75 18C2.75 18.82 3.43 19.5 4.25 19.5C5.07 19.5 5.75 18.82 5.75 18C5.75 17.18 5.08 16.5 4.25 16.5ZM7.25 19H21.25V17H7.25V19ZM7.25 13H21.25V11H7.25V13ZM7.25 5V7H21.25V5H7.25Z"})}function Lh({defaultTab:e,postTypes:t=[]}){const n=((e={})=>({allFilters:e.all_filters||"Tous les filtres",ourAddresses:e.our_addresses||"Nos adresses",ourVineyard:e.our_vineyard||"
1Notre vignoble",mobileAddresses:e.our_addresses||"Nos 6 destinations",mobileVineyard:e.vineyard||"Vignoble",appellations:e.appellations||"Appellations",colors:e.colors||"Couleurs",territories:e.territoires||"Territoires",list:e.list||"Liste",filter:e.filter||"Filtrer",close:e.close||"Fermer",clear:e.clear||"Effacer",applyFilters:e.apply_filters||"Filtrer ma recherche",wishes:e.wishes||"Je souhaite",search:e.search_label||"Je recherche",location:e.location||"Localisation",otherFilters:e.other_filters||"Autres filtres",languages:e.languages||"Langues parlees",aroundMe:e.around_me||"Autour de moi",withinRadius:e.within_radius||"Dans un rayon de",locationPlaceholder:e.location_placeholder||"Une commune, une ville..."}))(window.bordeauxMapping?.translations||{}),i=window.bordeauxMapping?.activityFilterIcons||{},s=window.bordeauxMapping?.addressTabFilterSpec||{},r=window.bordeauxMapping?.addressListUrl||"",{filters:o,normalizeArrayFilter:a,toggleFilter:l,setScalarFilter:c,replaceFilters:u}=ne(),{lang:h,mapRef:p,getBasePadding:m,allMarkers:f,filterPosts:g,focusOnLocationSearch:y,activityMapMode:v}=de(),{updatePost:x,post:w}=Q(),{isMd:b}=re(),[S,T]=(0,d.useState)(!1),[E,M]=(0,d.useState)([]),[C,P]=(0,d.useState)([]),[_,j]=(0,d.useState)(""),[k,L]=(0,d.useState)([]),[N,R]=(0,d.useState)(!1),I=(0,d.useRef)(null),V=Array.isArray(t)&&t.includes("address"),D="addresses"===e?"addresses":"vineyard",O="addresses"===o?.tab?"addresses":"vineyard"===o?.tab?"vineyard":D,F=s?.location||{},B=Number(F.default_radius)||10,z=Number(F.min_radius)||10,$=Number(F.max_radius)||50,H=Number(F.step)||5,W=Boolean(o?.around_me||o?.city_code),U=Number(o?.radiu
1s)>0?Number(o.radius):B,G=a(o,"wish"),Y=a(o,"search"),X=a(o,"destination"),K=(a(o,"type"),a(o,"language")),J=o?.around_me?n.aroundMe:o?.city_name||"",[ee,te]=(0,d.useState)(!0),[ie,se]=(0,d.useState)(K.length>0),oe=(0,d.useMemo)(()=>((e,t={})=>{if(!e)return"";const n=new URL(e,window.location.origin);Array.from(n.searchParams.keys()).forEach(e=>{("af"===e||e.startsWith("af-"))&&n.searchParams.delete(e)});let i=!1;const s=(e,t)=>{null!=t&&""!==t&&!1!==t&&(n.searchParams.append(e,String(t)),i=!0)},r=(e,t)=>{Array.isArray(t)&&t.map(e=>String(e||"").trim()).filter(Boolean).forEach(t=>s(e,t))};return r("af-wish[]",t?.wish),r("af-search[]",t?.search),r("af-language[]",t?.language),Array.isArray(t?.search)&&t.search.includes("balades")||r("af-territory[]",t?.destination),Object.entries(dh).forEach(([e,n])=>{(Array.isArray(t?.[n.key])?t[n.key]:[]).includes(n.value)&&s("af-other[]",e)}),t?.around_me&&s("af-around-me","1"),s("af-city-code",t?.city_code),s("af-city-name",t?.city_name),s("af-city-lat",t?.city_lat),s("af-city-lng",t?.city_lng),s("af-radius",t?.radius),i&&n.searchParams.set("af","1"),n.toString()})(r,o),[r,o]),ae=(0,d.useMemo)(()=>$e(),[]),le=v===Be;(0,d.useEffect)(()=>{o?.tab||u(Mh(D,{hasAddressType:V}))},[o?.tab,V,D,u]),(0,d.useEffect)(()=>{var e,t;if(b)return;const n=document.getElementById("scrolltop"),i=document.querySelector(".btn-scrolltop"),s=null!==(e=n?.style.display)&&void 0!==e?e:"",r=null!==(t=i?.style.display)&&void 0!==t?t:"";return n&&(n.style.display="none"),i&&(i.style.display="none"),()=>{n&&(n.style.display=s),i&&(i.style.display=r)}},[b]),(0,d.useEffect)(()=>{if(b)return;const e=document.body.style.overflow,t=document.body.style.overscrollBehavior;return S?(document.body.style.overflow="hidden",document.body.style.overscrollBehavior="none"):(document.body.style.overflow=e,document.body.style.overscrollBehavior=t),()=>{document.body.style.overflow=e,document.body.style.overscrollBehavior=t}},[b,S]),(0,d.useEffect)(()=>{let e=!0;return async function(){const[t,n]=await Promise.all([q("territory",null,`&_fields=id,title&lang=${h}`),q("wine-color",null,`&lang=${h}`)]);e&&(M(Array.isArray(t)?t:[]),P(Array.isArray(n)?n:[]))}().catch(()=>{e&&(M([]),P([]))}),()=>{e=!1}},[h]),(0,d.useEffect)(()=>{j(J)},[J]),(0,d.useEffect)(()=>{K.length>0&&se(!0)},[K.length]);const ce=(0,d.useMemo)(()=>{const e=[],t=new Set;return[...Array.isArray(s?.search_sections)?s.search_sections.filter(e=>"destinations"!==String(e?.key||"")).flatMap(e=>Array.isArray(e?.choices)?e.choices:[]):[],...Array.isArray(s?.search_choices)?s.search_choices:Object.values(s?.search_choice_map||{})].forEach(n=>{const i=String(n?.value||"").trim();!i||i.startsWith("destination-")||t.has(i)||(t.add(i),e.push(n))}),e},[s]),ue=(0,d.useMemo)(()=>{if(0===G.length)return new Set(ce.map(e=>e.value).filter(Boolean));const e=new Set;return G.forEach(t=>{(s?.search_visibility?.[t]||[]).forEach(t=>e.add(t))}),e},[ce,s,G]),he=(0,d.useMemo)(()=>ce.filter(e=>ue.has(e.value)),[ce,ue]),pe=(0,d.useMemo)(()=>Y.length>0?Y.some(e=>gh.includes(e)):0===G.length||gh.some(e=>ue.has(e)),[Y,ue,G]),me=(0,d.useMemo)(()=>Y.length>0?Y.some(e=>yh.includes(e)):0===G.length||G.includes("deguster"),[Y,G]),fe=(0,d.useMemo)(()=>Y.length>0?Y.some(e=>vh.includes(e)):0===G.length||G.includes("deguster"),[Y,G]),ge=(0,d.useMemo)(()=>{const e=new Set(s?.default_other_choices||[]);return G.forEach(t=>{(s?.other_visibility?.[t]||[]).forEach(t=>e.add(t))}),e},[s,G]),ye=(0,d.useMemo)(()=>(s?.other_choices||[]).filter(e=>ge.has(e.value)),[s,ge]),ve=!Y.includes("balades"),xe=(0,d.useMemo)(()=>ve&&"addresses"===O&&Array.isArray(s?.territory_choices)?s.territory_choices:[],[O,ve,s]),we=(0,d.useMemo)(()=>{if("addresses"!==O)return[];const e={...o||{}};delete e.language;const t=g(f||[],e),n=new Set;t.forEach(e=>{"activity"===String(e?.type||"")&&(Array.isArray(e?.filterData)?e.filterData:[]).forEach(e=>{"language"===e?.key&&(Array.isArray(e?.value)?e.value:[e?.value]).map(e=>String(e||"").trim()).filter(Boolean).forEach(e=>n.add(e))})});const i=(Array.isArray(s?.language_choices)?s.language_choices:[]).filter(e=>n.has(e.value));
1return n.forEach(e=>{i.some(t=>t.value===e)||i.push({value:e,label:e.replace(/-/g," ").replace(/\b\w/g,e=>e.toUpperCase())})}),i},[O,f,g,o,s]),be=_.trim(),Se=String(o?.city_name||"").trim(),Te=be.length>=2&&be!==Se,Ee=Boolean(o?.city_code&&o?.city_name&&o?.city_lat&&o?.city_lng&&!o?.around_me),Me="addresses"===O&&!o?.around_me&&(N||k.length>0||Te);(0,d.useEffect)(()=>{if("addresses"!==O)return;const e={...o};let t=!1;const n=Y.filter(e=>ue.has(e));if(n.length!==Y.length&&(t=!0,n.length>0?e.search=n:delete e.search),Object.entries(dh).forEach(([n,i])=>{if(ge.has(n))return;const s=a(o,i.key),r=s.filter(e=>e!==i.value);r.length!==s.length&&(t=!0,r.length>0?e[i.key]=r:delete e[i.key])}),n.length>0?!n.some(e=>gh.includes(e)):G.length>0&&!gh.some(e=>ue.has(e))){const n=a(o,"open_now"),i=n.filter(e=>"open-now"!==e);i.length!==n.length&&(t=!0,i.length>0?e.open_now=i:delete e.open_now)}if(!me){const n=a(o,"family"),i=n.filter(e=>"family"!==e);i.length!==n.length&&(t=!0,i.length>0?e.family=i:delete e.family)}if(!fe){const n=a(o,"grand_cru"),i=n.filter(e=>"grand-cru"!==e);i.length!==n.length&&(t=!0,i.length>0?e.grand_cru=i:delete e.grand_cru)}!ve&&X.length>0&&(t=!0,delete e.destination),t&&u(e)},[O,X.length,ve,me,o,fe,a,u,Y,ge,ue]),(0,d.useEffect)(()=>{if("addresses"!==O)return R(!1),void L([]);const e=_.trim(),t=String(o?.city_name||"").trim();if(o?.around_me||e.length<2||e===t)return R(!1),void L([]);const n=new AbortController,i=window.setTimeout(async()=>{try{R(!0);const t=await(async({query:e,endpoint:t=uh,signal:n,departmentCode:i="33",limit:s=6}={})=>{const r=(({query:e,endpoint:t,departmentCode:n,limit:i})=>[ph(e),t||uh,n||"33",String(i||6)].join("::"))({query:e,endpoint:t,departmentCode:i,limit:s});if(hh.has(r))return hh.get(r);const o=new URL(t||uh);o.searchParams.set("nom",String(e||"")),o.searchParams.set("codeDepartement",i),o.searchParams.set("boost","population"),o.searchParams.set("limit",String(s)),o.searchParams.set("fields","nom,code,codesPostaux,centre");const a=await fetch(o.toString(),{signal:n});if(!a.ok)throw new Error(`Geo API request failed with ${a.status}`);const l=await a.json(),c=Array.isArray(l)?l.filter(e=>((e,t)=>{const n=String(e?.code||""),i=Array.isArray(e?.codesPostaux)?e.codesPostaux:[];return n.startsWith(t)||i.some(e=>String(e).startsWith(t))})(e,i)).map(mh).filter(Boolean):[];return hh.set(r,c),c})({query:e,endpoint:window.bordeauxMapping?.geoEndpoint||uh,signal:n.signal});L(t)}catch(e){"AbortError"!==e.name&&L([])}finally{R(!1)}},250);return()=>{n.abort(),clearTimeout(i)}},[O,o?.around_me,o?.city_name,_]),(0,d.useEffect)(()=>{const e=e=>{I.current&&!I.current.contains(e.target)&&L([])};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);const Ce=e=>{e!==O&&((e=>{u(Mh(e,{hasAddressType:V})),x(null),p?.setPadding&&p.setPadding(m())})(e),T(!1))},Pe=(e,t)=>a(o,e).includes(t),_e=()=>{const e={};return Object.entries(o||{}).forEach(([t,n])=>{e[t]=Array.isArray(n)?[...n]:n}),e},je=async()=>{try{const e=await new Promise((e,t)=>{navigator.geolocation?navigator.geolocation.getCurrentPosition(e,t,{enableHighAccuracy:!1,timeout:1e4,maximumAge:3e5}):t(new Error("Geolocation is not supported."))}),t=String(U||B);j(n.aroundMe),L([]),c("around_me","1"),c("city_code",null),c("city_name",n.aroundMe),c("city_lat",`${e.coords.latitude}`),c("city_lng",`${e.coords.longitude}`),c("radius",t),y({lat:e.coords.latitude,lng:e.coords.longitude,radiusKm:Number(t)})}catch(e){console.warn("Unable to get current position for map filters.",e)}},ke=e=>{const t=e.target.value;j(t),(o?.around_me||t.trim()!==String(o?.city_name||"").trim())&&((({preserveInput:e=!1}={})=>{e||j(""),L([]),c("around_me",null),c("city_code",null),c("city_name",null),c("city_lat",null),c("city_lng",null),c("radius",null)})({preserveInput:!0}),j(t))},Ae=e=>{const t=bh()?.[e];if("svg"===t?.type&&"string"==typeof t.value&&t.value.trim())return(0,Z.jsx)("span",{"aria-hidden":"true",dangerouslySetInnerHTML:{__html:t.value.trim()}});if("url"===t?.type&&t.value)return(0,Z.jsx)("img",{src:t.value,alt:"",className:"activity-filters-icon-image",loading:"lazy",decoding:"async"});const n=i?.[e];return n?(0,Z.jsx)("span",{"aria-hidden":"true",dangerouslySetInnerHTML:{__html:n}}):null},Le=({filterKey:e,choiceValue:t,label:n,iconKey:i=null,toggle:s=null,disabled:r=!1})=>{const c=Pe(e,t),d=i?Ae(i):null,h="wish"===e&&ae[t]||"",p=le&&"wish"===e&&""!==h,m=s||(()=>{"wish"!==e?l(e,t):((e,t)=>{const n=_e();a(o,e).includes(t)?delete n[e]:n[e]=[t],u(n)})(e,t)});return(0,Z.jsxs)("label",{className:"activity-filters-choice"+(r?" is-disabled":""),onClick:e=>{e.preventDefault(),r||m()},children:[(0,Z.jsx)("input",{className:"activity-filters-input",type:"checkbox",checked:c,readOnly:!0,disabled:r}),(0,Z.jsxs)("span",{className:"activity-filters-pill"+(c?" is-active":""),children:[p?(0,Z.jsx)("span",{className:"activity-filters-pill__wish-dot","aria-hidden":"true",style:{backgroundColor:h}}):d&&(0,Z.jsx)("span",{className:"activity-filters-pill__icon",children:d}),(0,Z.jsx)("span",{className:"activity-filters-pill__label",children:n})]})]},t)};(0,d.useEffect)(()=>
1{if(G.length<=1)return;const e=_e();e.wish=[G[0]],u(e)},[G,u]);const Ne=()=>(0,Z.jsx)(Z.Fragment,{children:"vineyard"===O?(0,Z.jsxs)("div",{className:"mapping-unified-vineyard-tab",children:[(0,Z.jsxs)("div",{className:"mapping-unified-section",children:[(0,Z.jsx)("div",{className:"mapping-unified-section__header",children:(0,Z.jsx)("h3",{children:n.colors})}),(0,Z.jsx)("div",{className:"mapping-unified-pill-grid",children:C.map(e=>{const t=Pe("color",e.id);return(0,Z.jsxs)("button",{type:"button",className:"mapping-unified-pill"+(t?" is-active":""),onClick:()=>l("color",e.id),children:[(0,Z.jsx)("span",{className:"mapping-unified-color-dot","aria-hidden":"true",style:{backgroundColor:Ch(e)}}),(0,Z.jsx)("span",{children:e?.name||e?.slug||e.id})]},String(e.id))})})]}),(0,Z.jsxs)("div",{className:"mapping-unified-section",children:[(0,Z.jsx)("div",{className:"mapping-unified-section__header",children:(0,Z.jsx)("h3",{children:n.territories})}),(0,Z.jsx)("div",{className:"mapping-unified-pill-grid",children:E.map(e=>{const t=e?.title?.rendered||e?.name||e?.slug||e?.id,n=Pe("territory",e.id);return(0,Z.jsx)("button",{type:"button",className:"mapping-unified-pill mapping-unified-pill--territory"+(n?" is-active":""),onClick:()=>l("territory",e.id),children:(0,Z.jsx)("span",{className:"mapping-unified-pill__text",dangerouslySetInnerHTML:{__html:t}})},String(e.id))})})]})]}):(0,Z.jsx)("div",{className:"wp-block-skouerr-theme-activity-filters mapping-unified-address-tab",children:(0,Z.jsxs)("div",{className:"activity-filters-content",children:[(0,Z.jsxs)("section",{className:"activity-filters-section activity-filters-section--wishes",children:[(0,Z.jsx)("div",{className:"activity-filters-section__header",children:(0,Z.jsx)("h3",{className:"activity-filters-section__title",children:`${n.wishes} :`})}),(0,Z.jsx)("div",{className:"activity-filters-pills",children:(s?.wish_choices||[]).map(e=>Le({filterKey:"wish",choiceValue:e.value,label:e.label,iconKey:s?.wish_icon_map?.[e.value]||e.value}))})]}),he.length>0&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{className:"activity-filters-divider","aria-hidden":"true"}),(0,Z.jsxs)("section",{className:"activity-filters-section activity-filters-section--search",children:[(0,Z.jsx)("div",{className:"activity-filters-section__header",children:(0,Z.jsx)("h3",{className:"activity-filters-section__title",children:`${n.search} :`})}),(0,Z.jsx)("div",{className:"activity-filters-pills",children:he.map(e=>Le({filterKey:"search",choiceValue:e.value,label:e.label,iconKey:s?.search_icon_map?.[e.value]||e.value}))})]})]}),(0,Z.jsxs)("section",{className:"activity-filters-section activity-filters-section--location",children:[(0,Z.jsx)("div",{className:"activity-filters-section__header",children:(0,Z.jsx)("h3",{className:"activity-filters-section__title",children:`${n.location} :`})}),(0,Z.jsxs)("div",{className:"activity-filters-location",ref:I,children:[(0,Z.jsxs)("div",{className:"activity-filters-location__search",children:[(0,Z.jsxs)("label",{className:"activity-filters-location__control",children:[(0,Z.jsx)("input",{type:"search",value:_,placeholder:n.locationPlaceholder,onChange:ke,className:"activity-filters-location__input",autoComplete:"off"}),(0,Z.jsx)("span",{className:"activity-filters-location__icon",children:Ae("search")})]}),(0,Z.jsx)("div",{className:"activity-filters-location__results",hidden:!Me,children:!N&&k.map(e=>(0,Z.jsx)("button",{type:"button",className:"activity-filters-location__result",onClick:()=>(e=>{const t=String(U||B);j(e.name),L([]),c("around_me",null),c("city_code",e.code),c("city_name",e.name),c("city_lat",`${e.lat}`),c("city_lng",`${e.lng}`),c("radius",t),y({lat:e.lat,lng:e.lng,radiusKm:Number(t)})})(e),children:(0,Z.jsx)("span",{className:"activity-filters-location__result-label",children:e.label})},e.code))})]}),(!Ee||xe.length>0)&&(0,Z.jsxs)("div",{className:"activity-filters-location__quick-actions",children:[!Ee&&(0,Z.jsxs)("button",{type:"button",className:"activity-filters-location__around-me"+(o?.around_me?" is-active":""),onClick:je,"aria-pressed":o?.around_me?"true":"false",children:[(0,Z.jsx)("span",{className:"activity-filters-location__around-me-icon",children:Ae("around-me")}),(0,Z.jsx)("span",{className:"activity-filters-location__around-me-label",children:n.aroundMe})]}),xe.length>0&&(0,Z.jsx)("div",{className:"activity-filters-location__destinations",children:xe.map(e=>Le({filterKey:"destination",choiceValue:e.value,label:e.label,iconKey:"location"}))})]}),(0,Z.jsxs)("div",{className:"activity-filters-location__radius"+(W?"":" is-disabled"),hidden:!W,children:[(0,Z.jsxs)("div",{className:"activity-filters-location__radius-header",children:[(0,Z.jsx)("span",{children:n.withinRadius}),(0,Z.jsxs)("strong",{children:[U," km"]})]}),(0,Z.jsx)("input",{type:"range",min:z,max:$,step:H,value:U,disabled:!W,className:"activity-filters-location__range",onCh
1ange:e=>c("radius",e.target.value),style:{"--af-range-progress":(U-z)/Math.max($-z,1)*100+"%"}})]})]})]}),(0,Z.jsx)("div",{className:"activity-filters-divider","aria-hidden":"true"}),(0,Z.jsxs)("section",{className:"activity-filters-section activity-filters-section--accordion"+(ee?" is-open":""),children:[(0,Z.jsx)("div",{className:"activity-filters-section__header",children:(0,Z.jsxs)("button",{type:"button",className:"activity-filters-accordion__toggle","aria-expanded":ee,onClick:()=>te(e=>!e),children:[(0,Z.jsx)("span",{className:"activity-filters-section__title",children:n.otherFilters}),(0,Z.jsx)("span",{className:"activity-filters-accordion__icon",children:Ae("chevron")})]})}),(0,Z.jsx)("div",{className:"activity-filters-accordion__panel",hidden:!ee,children:(0,Z.jsx)("div",{className:"activity-filters-pills",children:ye.map(e=>{const t=dh[e.value]||{key:e.value,value:e.value},n="open-now"===e.value,i="family"===e.value,s="grand-cru"===e.value;return Le({filterKey:t.key,choiceValue:t.value,label:e.label,iconKey:e.value,toggle:()=>(e=>{const t=dh[e]||{key:e,value:e};l(t.key,t.value)})(e.value),disabled:n&&!pe||i&&!me||s&&!fe})})})})]}),we.length>0&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{className:"activity-filters-divider","aria-hidden":"true"}),(0,Z.jsxs)("section",{className:"activity-filters-section activity-filters-section--accordion"+(ie?" is-open":""),children:[(0,Z.jsx)("div",{className:"activity-filters-section__header",children:(0,Z.jsxs)("button",{type:"button",className:"activity-filters-accordion__toggle","aria-expanded":ie,onClick:()=>se(e=>!e),children:[(0,Z.jsx)("span",{className:"activity-filters-section__title",children:n.languages}),(0,Z.jsx)("span",{className:"activity-filters-accordion__icon",children:Ae("chevron")})]})}),(0,Z.jsx)("div",{className:"activity-filters-accordion__panel",hidden:!ie,children:(0,Z.jsx)("div",{className:"activity-filters-pills",children:we.map(e=>Le({filterKey:"language",choiceValue:e.value,label:e.label}))})})]})]})]})})});return(0,Z.jsx)("div",{className:"filters-section mapping-unified-filters"+(b&&w?" is-panel-hidden":""),children:b?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)("div",{className:"mapping-unified-sidebar__tabs "+("addresses"===O?"is-addresses-active":"is-vineyard-active"),children:[(0,Z.jsx)("button",{type:"button",className:"mapping-unified-tab"+("vineyard"===O?" is-active":""),onClick:()=>Ce("vineyard"),children:n.ourVineyard}),(0,Z.jsx)("button",{type:"button",className:"mapping-unified-tab"+("addresses"===O?" is-active":""),onClick:()=>Ce("addresses"),children:n.ourAddresses})]}),(0,Z.jsxs)("div",{className:"mapping-unified-sidebar__body",children:[(0,Z.jsxs)("div",{className:"mapping-unified-panel__header",children:[(0,Z.jsx)("h2",{children:n.filter}),"addresses"===O&&oe?(0,Z.jsxs)("a",{className:"mapping-unified-quick-action",href:oe,children:[(0,Z.jsx)(lh,{size:16,strokeWidth:2}),(0,Z.jsx)("span",{children:n.list})]}):null]}),Ne()]})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{className:"mapping-unified-mobile-bar",children:(0,Z.jsxs)("div",{className:"mapping-unified-mobile-bar__tabs "+("addresses"===O?"is-addresses-active":"is-vineyard-active"),children:[(0,Z.jsxs)("button",{type:"button",className:"mapping-unified-tab"+("vineyard"===O?" is-active":""),onClick:()=>Ce("vineyard"),children:[(0,Z.jsx)("span",{className:"mapping-unified-mobile-tab__icon","aria-hidden":"true",children:(0,Z.jsx)(_h,{})}),(0,Z.jsx)("span",{children:n.mobileVineyard})]}),(0,Z.jsxs)("button",{type:"button",className:"mapping-unified-tab"+("addresses"===O?" is-active":""),onClick:()=>Ce("addresses"),children:[(0,Z.jsx)("span",{className:"mapping-unified-mobile-tab__icon","aria-hidden":"true",children:(0,Z.jsx)(jh,{})}),(0,Z.jsx)("span",{children:n.mobileAddresses})]})]})}),!S&&(()=>{const e="addresses"===O&&oe;return(0,Z.jsx)("div",{className:"mapping-unified-mobile-floating-actions",children:(0,Z.jsxs)("div",{className:"mapping-unified-mobile-floating-actions__buttons",children:[(0,Z.jsx)("button",{type:"button",className:"mapping-unified-mobile-fab",onClick:()=>T(!0),"aria-label":n.filter,children:(0,Z.jsx)(kh,{})}),e&&(0,Z.jsx)("a",{className:"mapping-unified-mobile-fab",href:oe,"aria-label":n.list,children:(0,Z.jsx)(Ah,{})})]})})})(),S&&"undefined"!=typeof document&&(0,A.createPortal)((0,Z.jsx)("div",{className:"mapping-unified-sheet-scope",children:(0,Z.jsxs)("div",{className:"mapping-unified-sheet-portal",children:[(0,Z.jsx)("button",{type:"button",className:"mapping-unified-sheet__backdrop",onClick:()=>T(!1),"aria-label":n.close}),(0,Z.jsxs)("div",{className:"mapping-unified-sheet",role:"dialog","aria-modal":"true","aria-label":n.allFilters,children:[(0,Z.jsxs)("div",{className:"mapping-unified-sheet__header",children:[(0,Z.jsx)("h3",{children:n.allFilters}),(0,Z.jsx)("button",{type:"button",className:"mapping-unified-sheet__close",onClick:()=>T(!1),children:(0,Z.jsx)(ch,{size:18,strokeWidth:2})})]}),(0,Z.jsx)("div",{className:"mapping-unified-sheet__body",children:Ne()}),(0,Z.jsxs)("div",{className:"mapping-unified-sheet__footer",children:[(0,Z.jsx)("button",{type:"button",className:"mapping-unified-sheet__clear",onClick:()=>{u(Mh(O,{hasAddressType:V}))},children:n.clear}),(0,Z.jsx)("button",{type:"button",className:"mapping-unified-sheet__apply",onClick:()=>T(!1),children:n.applyFilters})]})]})]})}),document.body)]})})}function Nh({postTypes:e}){const{markers:t,allMarkers:n}=de(),i=Array.isArray(n)?n:t,s=e.includes("operation"),r=Array.from(new Set((i||[]).filter(e=>"operation"===e?.type).map(e=>
1e?.filterData?.find(e=>"address"===e?.key)?.value).filter(Boolean)));return(0,Z.jsxs)(Z.Fragment,{children:[!s&&[{key:"restaurants",label:"restaurants",color:"#F8AD26",pairs:[{name:"activity_kind",value:"restaurants"},{name:"address",value:"Restaurant"}],matchAny:!0,requiredTypes:["activity","address"]},{key:"cabanes-ostreicoles",label:"cabanes ostreicoles",color:"#35AF7C",pairs:[{name:"activity_kind",value:"cabanes-ostreicoles"},{name:"address",value:"Oyster_farm"}],matchAny:!0,requiredTypes:["activity","address"]},{key:"caves",label:"caves",color:"#F66F8C",pairs:[{name:"activity_kind",value:"caves"},{name:"address",value:"Caviste"}],matchAny:!0,requiredTypes:["activity","address"]}].map(e=>(0,Z.jsx)(Vh,{pairs:e.pairs,backgroundColor:e.color,label:e.label,isIconOnly:!0,matchAny:e.matchAny,requiredTypes:e.requiredTypes,children:(0,Z.jsx)(Dh,{kind:e.key})},e.key)),s&&(0,Z.jsx)(Z.Fragment,{children:r.map(e=>"Restaurant"===e?(0,Z.jsx)(Ih,{name:"address",value:"Restaurant",backgroundColor:"#F8AD26",children:(0,Z.jsx)(Th,{iconName:"picto-restaurant",alt:"restaurant"})},e):"Caviste"===e?(0,Z.jsx)(Ih,{name:"address",value:"Caviste",backgroundColor:"#F66F8C",children:(0,Z.jsx)(Th,{iconName:"picto-caviste",alt:"caviste"})},e):"Oyster_farm"===e?(0,Z.jsx)(Ih,{name:"address",value:"Oyster_farm",backgroundColor:"#35AF7C",children:(0,Z.jsx)(Th,{iconName:"picto-oyster",alt:"oyster"})},e):null)})]})}function Rh(){const e=window.bordeauxMapping?.translations||{},{filters:t,toggleFilter:n}=ne(),i=[{value:"Restaurant",iconName:"picto-restaurant",label:e.restaurants||"Restaurants"},{value:"Caviste",iconName:"picto-caviste",label:e.caves||"Caves"},{value:"Oyster_farm",iconName:"picto-oyster",label:e.oyster_farms||"Ostréiculteurs"}];return(0,Z.jsx)("div",{className:"wp-block-skouerr-theme-activity-filters mapping-unified-address-tab address-only-map-shortcuts",children:(0,Z.jsx)("div",{className:"activity-filters-content",children:(0,Z.jsxs)("section",{className:"activity-filters-section activity-filters-section--wishes",children:[(0,Z.jsx)("div",{className:"activity-filters-section__header",children:(0,Z.jsx)("h3",{className:"activity-filters-section__title",children:e.filter||"Filtrer"})}),(0,Z.jsx)("div",{className:"activity-filters-pills",children:i.map(e=>{const i=Array.isArray(t.address)&&t.address.includes(e.value);return(0,Z.jsxs)("label",{className:"activity-filters-choice",onClick:t=>{t.preventDefault(),n("address",e.value)},children:[(0,Z.jsx)("input",{className:"activity-filters-input",type:"checkbox",checked:i,readOnly:!0}),(0,Z.jsxs)("span",{className:"activity-filters-pill"+(i?" is-active":""),children:[(0,Z.jsx)("span",{className:"activity-filters-pill__icon address-only-map-shortcuts__icon","aria-hidden":"true",children:(0,Z.jsx)(Th,{iconName:e.iconName,alt:"",className:"address-only-map-shortcuts__icon-image"})}),(0,Z.jsx)("span",{className:"activity-filters-pill__label",children:e.label})]})]},e.value)})})]})})})}function Ih({name:e,value:t,children:n,backgroundColor:i,isLarge:s}){const[r,o]=(0,d.useState)(!1),{toggleFilter:a,filters:l}=ne();return(0,d.useEffect)(()=>{l[e]?.includes(t)?o(!0):o(!1)},[l]),(0,Z.jsx)("div",{className:"filter-shortcut"+(s?" large":"")+(r?" active":""),style:{backgroundColor:r?i:"#A3A3A3"},onClick:()=>{o(!r),a(e,t)},children:n})}function Vh({pairs:e,children:t,backgroundColor:n,isLarge:i,label:s,isIconOnly:r=!1,matchAny:o=!1,requiredTypes:a=[]}){const{toggleFilter:l,filters:c}=ne(),d=e.map(({name:e,value:t})=>Array.isArray(c[e])&&c[e].includes(t)),h=e.length>0&&(o?d.some(Boolean):d.every(Boolean)),p=h?n:"#A3A3A3",m=u().isValidElement(t)?u().cloneElement(t,{isActive:h}):t;return(0,Z.jsx)("div",{className:"filter-shortcut"+(r?" activity-shortcut":"")+(i?" large":"")+(h?" active":""),style:{backgroundColor:p},onClick:()=>{h?e.forEach(({name:e,value:t})=>{Array.isArray(c[e])&&c[e].includes(t)&&l(e,t)}):(e.forEach(({name:e,value:t})=>{Array.isArray(c[e])&&c[e].includes(t)||l(e,t)}),a.forEach(e=>{Array.isArray(c.type)&&c.type.includes(e)||l("type",e)}))},title:s,"aria-label":s,children:m})}function Dh({kind:e,isActive:t=!1}){const n=t&&{restaurants:"#F8AD26","cabanes-ostreicoles":"#35AF7C",caves:"#F66F8C"}[e]||"#A3A3A3";return(0,Z.jsx)(Eh,{iconName:{restaurants:"picto-restaurant","cabanes-ostreicoles":"picto-oyster",caves:"picto-caviste"}[e]||"",color:n,alt:e})}const Oh=function({postTypes:e,defaultTab:t=null}){const n=Array.isArray(e)&&1===e.length&&e.includes("address");return((e=[],t=null)=>("addresses"===t||"vineyard"===t)&&["designation","territory","activity"].every(t=>e.includes(t)))(e,t)?(0,Z.jsx)(Lh,{defaultTab:t,postTypes:e}):n?(0,Z.jsx)("div",{className:"filters-section",children:(0,Z.jsx)("div",{className:"filters",children:(0,Z.jsx)(Rh,{})})}):(0,Z.jsx)("div",{className:"filters-section",children:(0,Z.jsx)("div",{className:"filters",children:(0,Z.jsx)(Nh,{postTypes:e})})})},Fh=function({title:e}){const t=((window.bordeauxMapping?.translations||{}).variety_caption||"Encépagement du %title% dans le vignoble").replace("%title%",e||"");return(0,Z.jsxs)("div",{className:"variety-caption",children:[(0,Z.jsx)("h2",{children:t}),(0,Z.jsxs)("div",{children:[(0,Z.jsx)("div",{className:"percent"}),(0,Z.jsxs)("div",{className:"scale",children:[(0,Z.jsx)("div",{children:"0%"}),(0,Z.jsx)("div",{children:"100%"})]})]})]})},Bh=function(e){var t,n,i,s,r,o,a,l,c,u,h,p,m,f,g,y;const[v,x]=(0,d.useState)(!1);return console.log("Rendering BordeauxMapping with props:",e),(0,Z.jsx)(te,{defaultFilters:null!==(t=e.defaultFilters)&&void 0!==t?t:{}
1,children:(0,Z.jsx)(J,{...e,children:(0,Z.jsxs)(ce,{...e,defaultFilters:null!==(n=e.defaultFilters)&&void 0!==n?n:{},children:[e.cta&&(0,Z.jsx)(oh,{ctaType:e.ctaType,link:e.mapLink}),e?.displayFilters&&(0,Z.jsx)(Oh,{postTypes:null!==(i=e.postTypes)&&void 0!==i?i:[],defaultTab:null!==(s=e.defaultTab)&&void 0!==s?s:null}),(0,Z.jsx)(Ze,{width:null!==(r=e.width)&&void 0!==r?r:"100%",height:null!==(o=e.height)&&void 0!==o?o:"800px",veynardIsHighlighted:v,interactive:e.interactive,postId:null!==(a=e.postId)&&void 0!==a?a:null,postType:null!==(l=e.postType)&&void 0!==l?l:null,postTypes:null!==(c=e.postTypes)&&void 0!==c?c:[],initialZoom:null!==(u=e.initialZoom)&&void 0!==u?u:null,initialCenterLat:null!==(h=e.initialCenterLat)&&void 0!==h?h:null,initialCenterLng:null!==(p=e.initialCenterLng)&&void 0!==p?p:null,fullPage:null!==(m=e.fullPage)&&void 0!==m&&m}),!e.interactive&&(0,Z.jsx)("div",{className:"map-overlay"}),e.fullPage&&(0,Z.jsx)($u,{}),e.fullPage&&(0,Z.jsx)(ah,{onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),postId:null!==(f=e.postId)&&void 0!==f?f:null,postType:null!==(g=e.postType)&&void 0!==g?g:null,postTypes:null!==(y=e.postTypes)&&void 0!==y?y:[]}),e?.postTypes?.includes("variety")&&(0,Z.jsx)(Fh,{title:e.data.post.title})]})})})};l()(()=>{document.querySelectorAll(".block-mapping").forEach(e=>{const t=(0,c.createRoot)(e),n=[];if(e.getAttribute("data-territory")&&(n.defaultTerritory=parseInt(e.getAttribute("data-territory"))),e.getAttribute("data-designation")&&(n.defaultDesignation=parseInt(e.getAttribute("data-designation"))),e.getAttribute("data-post-id")&&(n.postId=parseInt(e.getAttribute("data-post-id"))),e.getAttribute("data-post-type")&&(n.postType=e.getAttribute("data-post-type")),e.getAttribute("data-post-types")&&(n.postTypes=e.getAttribute("data-post-types").split(",")),e.getAttribute("data-initial-zoom")&&(n.initialZoom=parseFloat(e.getAttribute("data-initial-zoom"))),e.getAttribute("data-center-lat")&&(n.initialCenterLat=parseFloat(e.getAttribute("data-center-lat"))),e.getAttribute("data-center-lng")&&(n.initialCenterLng=parseFloat(e.getAttribute("data-center-lng"))),"true"===e.getAttribute("data-interactive")?n.interactive=!0:n.interactive=!1,e.getAttribute("data-height"))if("100%"===e.getAttribute("data-height")){const t=e.parentElement.parentElement.offsetHeight;n.height=t+"px"}else n.height=e.getAttribute("data-height");if(e.getAttribute("data-width")&&(n.width=e.getAttribute("data-width")),"true"===e.getAttribute("data-full-page")?(n.height="calc(100svh - 80px)",n.width="100vw",n.fullPage=!0):window.innerWidth<=768&&(n.height="200px",n.width="300px"),e.getAttribute("data-cta")&&(n.cta=!0,n.ctaType=e.getAttribute("data-cta")),"true"===e.getAttribute("data-display-addresses")&&(n.displayAddresses=!0),"true"===e.getAttribute("data-display-filters")&&(n.displayFilters=!0),"true"===e.getAttribute("data-display-caption")?n.displayCaption=!0:n.displayCaption=!1,e.getAttribute("data-block-data")){const t=e.getAttribute("data-block-data");n.data=window[t]}e.getAttribute("data-map-link")&&(n.mapLink=e.getAttribute("data-map-link")),e.getAttribute("data-default-tab")&&(n.defaultTab=e.getAttribute("data-default-tab")),e.getAttribute("data-activity-map-mode")&&(n.activityMapMode=e.getAttribute("data-activity-map-mode"));const i=((e,t={})=>{if(!e)return t;try{return JSON.parse(e)}catch(e){return t}})(e.getAttribute("data-default-filters"),{}),s={},r=n.postTypes?.includes("address"),o=("addresses"===n.defaultTab||"vineyard"===n.defaultTab)&&n.postTypes?.includes("designation")&&n.postTypes?.includes("territory")&&n.postTypes?.includes("activity");if(o&&(s.tab=n.defaultTab,s.type="addresses"===n.defaultTab?r?["activity","address","activity-zone"]:["activity","activity-zone"]:["designation","territory"]),!o&&n.postTypes?.includes("operation")){const e=["Caviste","Restaurant","Oyster_farm"],t=Array.from(new Set((n.data?.markers||[]).filter(e=>"operation"===e?.type).map(e=>e?.filterData?.find(e=>"address"===e?.key)?.value).filter(t=>t&&e.includes(t))));s.address=t}if(!o&&n.postTypes?.includes("activity")){const e=["restaurants","caves","cabanes-ostreicoles"],t=Array.from(new Set((n.data?.markers||[]).filter(e=>"activity"===e?.type).flatMap(e=>
1{const t=e?.filterData?.find(e=>"activity_kind"===e?.key);return t?Array.isArray(t.value)?t.value:[t.value]:[]}).filter(t=>t&&e.includes(t))));s.activity_kind=t}o||(s.type=n.postTypes);const a={...s,...i};!o||"addresses"!==a.tab&&"vineyard"!==a.tab||(a.type="addresses"===a.tab?r?["activity","address","activity-zone"]:["activity","activity-zone"]:["designation","territory"]),n.defaultFilters=a,console.log("Final attributes for BordeauxMapping:",n),t.render((0,Z.jsx)(Bh,{...n}))})})})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.