@inploi/plugin-job-search 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.js +9 -9
- package/cdn/style.css +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +202 -216
- package/dist/{map-5c3321dc.js → map-3c7573d5.js} +4 -3
- package/dist/{map-daa19df8.cjs → map-fed54f04.cjs} +2 -2
- package/dist/style.css +1 -1
- package/dist/{utils-c8729cb9.js → utils-6629b508.js} +12 -9
- package/dist/{utils-63e032a6.cjs → utils-8c0de991.cjs} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
|
@@ -57,4 +57,4 @@ ${n.concat(n).join(`
|
|
|
57
57
|
`)},Zo=function(){var e=parseInt(document.body.getAttribute(mt)||"0",10);return isFinite(e)?e:0},yu=function(){D(function(){return document.body.setAttribute(mt,(Zo()+1).toString()),function(){var e=Zo()-1;e<=0?document.body.removeAttribute(mt):document.body.setAttribute(mt,e.toString())}},[])},bu=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;yu();var i=ee(function(){return vu(o)},[o]);return O(_u,{styles:mu(i,!t,o,n?"":"!important")})},Sr=!1;if(typeof window<"u")try{var nn=Object.defineProperty({},"passive",{get:function(){return Sr=!0,!0}});window.addEventListener("test",nn,nn),window.removeEventListener("test",nn,nn)}catch{Sr=!1}var ft=Sr?{passive:!1}:!1,wu=function(e){return e.tagName==="TEXTAREA"},Ia=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!wu(e)&&n[t]==="visible")},xu=function(e){return Ia(e,"overflowY")},Eu=function(e){return Ia(e,"overflowX")},Xo=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=Ma(e,n);if(r){var o=Fa(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},$u=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Su=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ma=function(e,t){return e==="v"?xu(t):Eu(t)},Fa=function(e,t){return e==="v"?$u(t):Su(t)},Cu=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ou=function(e,t,n,r,o){var i=Cu(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),u=!1,d=a>0,c=0,h=0;do{var f=Fa(e,s),g=f[0],p=f[1],b=f[2],v=p-b-i*g;(g||v)&&Ma(e,s)&&(c+=v,h+=g),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(o&&c===0||!o&&a>c)||!d&&(o&&h===0||!o&&-a>h))&&(u=!0),u},rn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Jo=function(e){return[e.deltaX,e.deltaY]},Qo=function(e){return e&&"current"in e?e.current:e},Au=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Pu=function(e){return`
|
|
58
58
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
59
59
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
60
|
-
`)},Tu=0,pt=[];function Ru(e){var t=P([]),n=P([0,0]),r=P(),o=T(Tu++)[0],i=T(function(){return La()})[0],a=P(e);D(function(){a.current=e},[e]),D(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=Jl([e.lockRef.current],(e.shards||[]).map(Qo),!0).filter(Boolean);return p.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=K(function(p,b){if("touches"in p&&p.touches.length===2)return!a.current.allowPinchZoom;var v=rn(p),m=n.current,w="deltaX"in p?p.deltaX:m[0]-v[0],y="deltaY"in p?p.deltaY:m[1]-v[1],x,E=p.target,S=Math.abs(w)>Math.abs(y)?"h":"v";if("touches"in p&&S==="h"&&E.type==="range")return!1;var $=Xo(S,E);if(!$)return!0;if($?x=S:(x=S==="v"?"h":"v",$=Xo(S,E)),!$)return!1;if(!r.current&&"changedTouches"in p&&(w||y)&&(r.current=x),!x)return!0;var C=r.current||x;return Ou(C,b,p,C==="h"?w:y,!0)},[]),l=K(function(p){var b=p;if(!(!pt.length||pt[pt.length-1]!==i)){var v="deltaY"in b?Jo(b):rn(b),m=t.current.filter(function(x){return x.name===b.type&&x.target===b.target&&Au(x.delta,v)})[0];if(m&&m.should){b.cancelable&&b.preventDefault();return}if(!m){var w=(a.current.shards||[]).map(Qo).filter(Boolean).filter(function(x){return x.contains(b.target)}),y=w.length>0?s(b,w[0]):!a.current.noIsolation;y&&b.cancelable&&b.preventDefault()}}},[]),u=K(function(p,b,v,m){var w={name:p,delta:b,target:v,should:m};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(y){return y!==w})},1)},[]),d=K(function(p){n.current=rn(p),r.current=void 0},[]),c=K(function(p){u(p.type,Jo(p),p.target,s(p,e.lockRef.current))},[]),h=K(function(p){u(p.type,rn(p),p.target,s(p,e.lockRef.current))},[]);D(function(){return pt.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,ft),document.addEventListener("touchmove",l,ft),document.addEventListener("touchstart",d,ft),function(){pt=pt.filter(function(p){return p!==i}),document.removeEventListener("wheel",l,ft),document.removeEventListener("touchmove",l,ft),document.removeEventListener("touchstart",d,ft)}},[]);var f=e.removeScrollBar,g=e.inert;return O(L,null,g?O(i,{styles:Pu(o)}):null,f?O(bu,{gapMode:"margin"}):null)}const ku=su(Na,Ru);var ja=z(function(e,t){return O(An,ye({},e,{ref:t,sideCar:ku}))});ja.classNames=An.classNames;const Va=ja;var Du=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ht=new WeakMap,on=new WeakMap,an={},or=0,Wa=function(e){return e&&(e.host||Wa(e.parentNode))},Nu=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Wa(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Lu=function(e,t,n,r){var o=Nu(t,Array.isArray(e)?e:[e]);an[n]||(an[n]=new WeakMap);var i=an[n],a=[],s=new Set,l=new Set(o),u=function(c){!c||s.has(c)||(s.add(c),u(c.parentNode))};o.forEach(u);var d=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(s.has(h))d(h);else try{var f=h.getAttribute(r),g=f!==null&&f!=="false",p=(ht.get(h)||0)+1,b=(i.get(h)||0)+1;ht.set(h,p),i.set(h,b),a.push(h),p===1&&g&&on.set(h,!0),b===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",h,v)}})};return d(t),s.clear(),or++,function(){a.forEach(function(c){var h=ht.get(c)-1,f=i.get(c)-1;ht.set(c,h),i.set(c,f),h||(on.has(c)||c.removeAttribute(r),on.delete(c)),f||c.removeAttribute(n)}),or--,or||(ht=new WeakMap,ht=new WeakMap,on=new WeakMap,an={})}},Ha=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Du(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Lu(r,o,n,"aria-hidden")):function(){return null}};const Ua="Dialog",[Ba,Zp]=qr(Ua),[Iu,tt]=Ba(Ua),Mu=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=P(null),l=P(null),[u=!1,d]=Sa({prop:r,defaultProp:o,onChange:i});return O(Iu,{scope:t,triggerRef:s,contentRef:l,contentId:dn(),titleId:dn(),descriptionId:dn(),open:u,onOpenChange:d,onOpenToggle:K(()=>d(c=>!c),[d]),modal:a},n)},Fu="DialogTrigger",ju=z((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(Fu,n),i=Se(t,o.triggerRef);return O(et.button,B({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Gr(o.open)},r,{ref:i,onClick:fe(e.onClick,o.onOpenToggle)}))}),za="DialogPortal",[Vu,Ka]=Ba(za,{forceMount:void 0}),Wu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=tt(za,t);return O(Vu,{scope:t,forceMount:n},xe.map(r,a=>O(Ot,{present:n||i.open},O(Ta,{asChild:!0,container:o},a))))},Cr="DialogOverlay",Hu=z((e,t)=>{const n=Ka(Cr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=tt(Cr,e.__scopeDialog);return i.modal?O(Ot,{present:r||i.open},O(Uu,B({},o,{ref:t}))):null}),Uu=z((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(Cr,n);return O(Va,{as:On,allowPinchZoom:!0,shards:[o.contentRef]},O(et.div,B({"data-state":Gr(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),jt="DialogContent",Bu=z((e,t)=>{const n=Ka(jt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=tt(jt,e.__scopeDialog);return O(Ot,{present:r||i.open},i.modal?O(zu,B({},o,{ref:t})):O(Ku,B({},o,{ref:t})))}),zu=z((e,t)=>{const n=tt(jt,e.__scopeDialog),r=P(null),o=Se(t,n.contentRef,r);return D(()=>{const i=r.current;if(i)return Ha(i)},[]),O(qa,B({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:fe(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:fe(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:fe(e.onFocusOutside,i=>i.preventDefault())}))}),Ku=z((e,t)=>{const n=tt(jt,e.__scopeDialog),r=P(!1),o=P(!1);return O(qa,B({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),qa=z((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=tt(jt,n),l=P(null),u=Se(t,l);return Ra(),O(L,null,O(Aa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},O(Ca,B({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Gr(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function Gr(e){return e?"open":"closed"}const qu=Mu,Gu=ju,Yu=Wu,Zu=Hu,Xu=Bu,Ju=["top","right","bottom","left"],we=Math.min,ie=Math.max,yn=Math.round,sn=Math.floor,Ge=e=>({x:e,y:e}),Qu={left:"right",right:"left",bottom:"top",top:"bottom"},ed={start:"end",end:"start"};function Or(e,t,n){return ie(e,we(t,n))}function Me(e,t){return typeof e=="function"?e(t):e}function Fe(e){return e.split("-")[0]}function At(e){return e.split("-")[1]}function Yr(e){return e==="x"?"y":"x"}function Zr(e){return e==="y"?"height":"width"}function Ye(e){return["top","bottom"].includes(Fe(e))?"y":"x"}function Xr(e){return Yr(Ye(e))}function td(e,t,n){n===void 0&&(n=!1);const r=At(e),o=Xr(e),i=Zr(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=bn(a)),[a,bn(a)]}function nd(e){const t=bn(e);return[Ar(e),t,Ar(t)]}function Ar(e){return e.replace(/start|end/g,t=>ed[t])}function rd(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function od(e,t,n,r){const o=At(e);let i=rd(Fe(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ar)))),i}function bn(e){return e.replace(/left|right|bottom|top/g,t=>Qu[t])}function id(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ga(e){return typeof e!="number"?id(e):{top:e,right:e,bottom:e,left:e}}function wn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ei(e,t,n){let{reference:r,floating:o}=e;const i=Ye(t),a=Xr(t),s=Zr(a),l=Fe(t),u=i==="y",d=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:d,y:r.y-o.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:c};break;case"left":f={x:r.x-o.width,y:c};break;default:f={x:r.x,y:r.y}}switch(At(t)){case"start":f[a]-=h*(n&&u?-1:1);break;case"end":f[a]+=h*(n&&u?-1:1);break}return f}const ad=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:c}=ei(u,r,l),h=r,f={},g=0;for(let p=0;p<s.length;p++){const{name:b,fn:v}=s[p],{x:m,y:w,data:y,reset:x}=await v({x:d,y:c,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:u,platform:a,elements:{reference:e,floating:t}});d=m??d,c=w??c,f={...f,[b]:{...f[b],...y}},x&&g<=50&&(g++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(u=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:d,y:c}=ei(u,h,l)),p=-1)}return{x:d,y:c,placement:h,strategy:o,middlewareData:f}};async function Vt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:h=!1,padding:f=0}=Me(t,e),g=Ga(f),b=s[h?c==="floating"?"reference":"floating":c],v=wn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:l})),m=c==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),y=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},x=wn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:m,offsetParent:w,strategy:l}):m);return{top:(v.top-x.top+g.top)/y.y,bottom:(x.bottom-v.bottom+g.bottom)/y.y,left:(v.left-x.left+g.left)/y.x,right:(x.right-v.right+g.right)/y.x}}const sd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:d=0}=Me(e,t)||{};if(u==null)return{};const c=Ga(d),h={x:n,y:r},f=Xr(o),g=Zr(f),p=await a.getDimensions(u),b=f==="y",v=b?"top":"left",m=b?"bottom":"right",w=b?"clientHeight":"clientWidth",y=i.reference[g]+i.reference[f]-h[f]-i.floating[g],x=h[f]-i.reference[f],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let S=E?E[w]:0;(!S||!await(a.isElement==null?void 0:a.isElement(E)))&&(S=s.floating[w]||i.floating[g]);const $=y/2-x/2,C=S/2-p[g]/2-1,A=we(c[v],C),R=we(c[m],C),M=A,F=S-p[g]-R,k=S/2-p[g]/2+$,G=Or(M,k,F),J=!l.arrow&&At(o)!=null&&k!==G&&i.reference[g]/2-(k<M?A:R)-p[g]/2<0,I=J?k<M?k-M:k-F:0;return{[f]:h[f]+I,data:{[f]:G,centerOffset:k-G-I,...J&&{alignmentOffset:I}},reset:J}}}),cd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...b}=Me(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Fe(o),m=Ye(s),w=Fe(s)===s,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=h||(w||!p?[bn(s)]:nd(s)),E=g!=="none";!h&&E&&x.push(...od(s,p,g,y));const S=[s,...x],$=await Vt(t,b),C=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&C.push($[v]),c){const k=td(o,a,y);C.push($[k[0]],$[k[1]])}if(A=[...A,{placement:o,overflows:C}],!C.every(k=>k<=0)){var R,M;const k=(((R=i.flip)==null?void 0:R.index)||0)+1,G=S[k];if(G)return{data:{index:k,overflows:A},reset:{placement:G}};let J=(M=A.filter(I=>I.overflows[0]<=0).sort((I,q)=>I.overflows[1]-q.overflows[1])[0])==null?void 0:M.placement;if(!J)switch(f){case"bestFit":{var F;const I=(F=A.filter(q=>{if(E){const Y=Ye(q.placement);return Y===m||Y==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(Y=>Y>0).reduce((Y,Rt)=>Y+Rt,0)]).sort((q,Y)=>q[1]-Y[1])[0])==null?void 0:F[0];I&&(J=I);break}case"initialPlacement":J=s;break}if(o!==J)return{reset:{placement:J}}}return{}}}};function ti(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ni(e){return Ju.some(t=>e[t]>=0)}const ld=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Me(e,t);switch(r){case"referenceHidden":{const i=await Vt(t,{...o,elementContext:"reference"}),a=ti(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ni(a)}}}case"escaped":{const i=await Vt(t,{...o,altBoundary:!0}),a=ti(i,n.floating);return{data:{escapedOffsets:a,escaped:ni(a)}}}default:return{}}}}};async function ud(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Fe(n),s=At(n),l=Ye(n)==="y",u=["left","top"].includes(a)?-1:1,d=i&&l?-1:1,c=Me(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:g}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...c};return s&&typeof g=="number"&&(f=s==="end"?g*-1:g),l?{x:f*d,y:h*u}:{x:h*u,y:f*d}}const dd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await ud(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},fd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:v,y:m}=b;return{x:v,y:m}}},...l}=Me(e,t),u={x:n,y:r},d=await Vt(t,l),c=Ye(Fe(o)),h=Yr(c);let f=u[h],g=u[c];if(i){const b=h==="y"?"top":"left",v=h==="y"?"bottom":"right",m=f+d[b],w=f-d[v];f=Or(m,f,w)}if(a){const b=c==="y"?"top":"left",v=c==="y"?"bottom":"right",m=g+d[b],w=g-d[v];g=Or(m,g,w)}const p=s.fn({...t,[h]:f,[c]:g});return{...p,data:{x:p.x-n,y:p.y-r}}}}},pd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=Me(e,t),d={x:n,y:r},c=Ye(o),h=Yr(c);let f=d[h],g=d[c];const p=Me(s,t),b=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const w=h==="y"?"height":"width",y=i.reference[h]-i.floating[w]+b.mainAxis,x=i.reference[h]+i.reference[w]-b.mainAxis;f<y?f=y:f>x&&(f=x)}if(u){var v,m;const w=h==="y"?"width":"height",y=["top","left"].includes(Fe(o)),x=i.reference[c]-i.floating[w]+(y&&((v=a.offset)==null?void 0:v[c])||0)+(y?0:b.crossAxis),E=i.reference[c]+i.reference[w]+(y?0:((m=a.offset)==null?void 0:m[c])||0)-(y?b.crossAxis:0);g<x?g=x:g>E&&(g=E)}return{[h]:f,[c]:g}}}},hd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Me(e,t),l=await Vt(t,s),u=Fe(n),d=At(n),c=Ye(n)==="y",{width:h,height:f}=r.floating;let g,p;u==="top"||u==="bottom"?(g=u,p=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(p=u,g=d==="end"?"top":"bottom");const b=f-l.top-l.bottom,v=h-l.left-l.right,m=we(f-l[g],b),w=we(h-l[p],v),y=!t.middlewareData.shift;let x=m,E=w;if(c?E=d||y?we(w,v):v:x=d||y?we(m,b):b,y&&!d){const $=ie(l.left,0),C=ie(l.right,0),A=ie(l.top,0),R=ie(l.bottom,0);c?E=h-2*($!==0||C!==0?$+C:ie(l.left,l.right)):x=f-2*(A!==0||R!==0?A+R:ie(l.top,l.bottom))}await a({...t,availableWidth:E,availableHeight:x});const S=await o.getDimensions(i.floating);return h!==S.width||f!==S.height?{reset:{rects:!0}}:{}}}};function Pt(e){return Ya(e)?(e.nodeName||"").toLowerCase():"#document"}function ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ve(e){var t;return(t=(Ya(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ya(e){return e instanceof Node||e instanceof ae(e).Node}function pe(e){return e instanceof Element||e instanceof ae(e).Element}function Ee(e){return e instanceof HTMLElement||e instanceof ae(e).HTMLElement}function ri(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ae(e).ShadowRoot}function Gt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=he(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function gd(e){return["table","td","th"].includes(Pt(e))}function Pn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Jr(e){const t=Qr(),n=pe(e)?he(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function vd(e){let t=Ze(e);for(;Ee(t)&&!$t(t);){if(Jr(t))return t;if(Pn(t))return null;t=Ze(t)}return null}function Qr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function $t(e){return["html","body","#document"].includes(Pt(e))}function he(e){return ae(e).getComputedStyle(e)}function Tn(e){return pe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ze(e){if(Pt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ri(e)&&e.host||Ve(e);return ri(t)?t.host:t}function Za(e){const t=Ze(e);return $t(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ee(t)&&Gt(t)?t:Za(t)}function Wt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Za(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=ae(o);if(i){const s=Pr(a);return t.concat(a,a.visualViewport||[],Gt(o)?o:[],s&&n?Wt(s):[])}return t.concat(o,Wt(o,[],n))}function Pr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xa(e){const t=he(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ee(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=yn(n)!==i||yn(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function eo(e){return pe(e)?e:e.contextElement}function yt(e){const t=eo(e);if(!Ee(t))return Ge(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Xa(t);let a=(i?yn(n.width):n.width)/r,s=(i?yn(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const _d=Ge(0);function Ja(e){const t=ae(e);return!Qr()||!t.visualViewport?_d:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function md(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ae(e)?!1:t}function lt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=eo(e);let a=Ge(1);t&&(r?pe(r)&&(a=yt(r)):a=yt(e));const s=md(i,n,r)?Ja(i):Ge(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,d=o.width/a.x,c=o.height/a.y;if(i){const h=ae(i),f=r&&pe(r)?ae(r):r;let g=h,p=Pr(g);for(;p&&r&&f!==g;){const b=yt(p),v=p.getBoundingClientRect(),m=he(p),w=v.left+(p.clientLeft+parseFloat(m.paddingLeft))*b.x,y=v.top+(p.clientTop+parseFloat(m.paddingTop))*b.y;l*=b.x,u*=b.y,d*=b.x,c*=b.y,l+=w,u+=y,g=ae(p),p=Pr(g)}}return wn({width:d,height:c,x:l,y:u})}function yd(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Ve(r),s=t?Pn(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Ge(1);const d=Ge(0),c=Ee(r);if((c||!c&&!i)&&((Pt(r)!=="body"||Gt(a))&&(l=Tn(r)),Ee(r))){const h=lt(r);u=yt(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x,y:n.y*u.y-l.scrollTop*u.y+d.y}}function bd(e){return Array.from(e.getClientRects())}function Qa(e){return lt(Ve(e)).left+Tn(e).scrollLeft}function wd(e){const t=Ve(e),n=Tn(e),r=e.ownerDocument.body,o=ie(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ie(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Qa(e);const s=-n.scrollTop;return he(r).direction==="rtl"&&(a+=ie(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function xd(e,t){const n=ae(e),r=Ve(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const u=Qr();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function Ed(e,t){const n=lt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ee(e)?yt(e):Ge(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:a,height:s,x:l,y:u}}function oi(e,t,n){let r;if(t==="viewport")r=xd(e,n);else if(t==="document")r=wd(Ve(e));else if(pe(t))r=Ed(t,n);else{const o=Ja(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return wn(r)}function es(e,t){const n=Ze(e);return n===t||!pe(n)||$t(n)?!1:he(n).position==="fixed"||es(n,t)}function $d(e,t){const n=t.get(e);if(n)return n;let r=Wt(e,[],!1).filter(s=>pe(s)&&Pt(s)!=="body"),o=null;const i=he(e).position==="fixed";let a=i?Ze(e):e;for(;pe(a)&&!$t(a);){const s=he(a),l=Jr(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Gt(a)&&!l&&es(e,a))?r=r.filter(d=>d!==a):o=s,a=Ze(a)}return t.set(e,r),r}function Sd(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Pn(t)?[]:$d(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,d)=>{const c=oi(t,d,o);return u.top=ie(c.top,u.top),u.right=we(c.right,u.right),u.bottom=we(c.bottom,u.bottom),u.left=ie(c.left,u.left),u},oi(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Cd(e){const{width:t,height:n}=Xa(e);return{width:t,height:n}}function Od(e,t,n){const r=Ee(t),o=Ve(t),i=n==="fixed",a=lt(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Ge(0);if(r||!r&&!i)if((Pt(t)!=="body"||Gt(o))&&(s=Tn(t)),r){const c=lt(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=Qa(o));const u=a.left+s.scrollLeft-l.x,d=a.top+s.scrollTop-l.y;return{x:u,y:d,width:a.width,height:a.height}}function ir(e){return he(e).position==="static"}function ii(e,t){return!Ee(e)||he(e).position==="fixed"?null:t?t(e):e.offsetParent}function ts(e,t){const n=ae(e);if(Pn(e))return n;if(!Ee(e)){let o=Ze(e);for(;o&&!$t(o);){if(pe(o)&&!ir(o))return o;o=Ze(o)}return n}let r=ii(e,t);for(;r&&gd(r)&&ir(r);)r=ii(r,t);return r&&$t(r)&&ir(r)&&!Jr(r)?n:r||vd(e)||n}const Ad=async function(e){const t=this.getOffsetParent||ts,n=this.getDimensions,r=await n(e.floating);return{reference:Od(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Pd(e){return he(e).direction==="rtl"}const Td={convertOffsetParentRelativeRectToViewportRelativeRect:yd,getDocumentElement:Ve,getClippingRect:Sd,getOffsetParent:ts,getElementRects:Ad,getClientRects:bd,getDimensions:Cd,getScale:yt,isElement:pe,isRTL:Pd};function Rd(e,t){let n=null,r;const o=Ve(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:u,top:d,width:c,height:h}=e.getBoundingClientRect();if(s||t(),!c||!h)return;const f=sn(d),g=sn(o.clientWidth-(u+c)),p=sn(o.clientHeight-(d+h)),b=sn(u),m={rootMargin:-f+"px "+-g+"px "+-p+"px "+-b+"px",threshold:ie(0,we(1,l))||1};let w=!0;function y(x){const E=x[0].intersectionRatio;if(E!==l){if(!w)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(y,{...m,root:o.ownerDocument})}catch{n=new IntersectionObserver(y,m)}n.observe(e)}return a(!0),i}function kd(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=eo(e),d=o||i?[...u?Wt(u):[],...Wt(t)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const c=u&&s?Rd(u,n):null;let h=-1,f=null;a&&(f=new ResizeObserver(v=>{let[m]=v;m&&m.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),u&&!l&&f.observe(u),f.observe(t));let g,p=l?lt(e):null;l&&b();function b(){const v=lt(e);p&&(v.x!==p.x||v.y!==p.y||v.width!==p.width||v.height!==p.height)&&n(),p=v,g=requestAnimationFrame(b)}return n(),()=>{var v;d.forEach(m=>{o&&m.removeEventListener("scroll",n),i&&m.removeEventListener("resize",n)}),c==null||c(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(g)}}const Dd=dd,Nd=fd,Ld=cd,Id=hd,Md=ld,ai=sd,Fd=pd,jd=(e,t,n)=>{const r=new Map,o={platform:Td,...n},i={...o.platform,_c:r};return ad(e,t,{...o,platform:i})};var hn=typeof document<"u"?je:D;function xn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!xn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ns(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function si(e,t){const n=ns(e);return Math.round(t*n)/n}function ci(e){const t=P(e);return hn(()=>{t.current=e}),t}function Vd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[d,c]=T({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=T(r);xn(h,r)||f(r);const[g,p]=T(null),[b,v]=T(null),m=K(I=>{I!==E.current&&(E.current=I,p(I))},[]),w=K(I=>{I!==S.current&&(S.current=I,v(I))},[]),y=i||g,x=a||b,E=P(null),S=P(null),$=P(d),C=l!=null,A=ci(l),R=ci(o),M=K(()=>{if(!E.current||!S.current)return;const I={placement:t,strategy:n,middleware:h};R.current&&(I.platform=R.current),jd(E.current,S.current,I).then(q=>{const Y={...q,isPositioned:!0};F.current&&!xn($.current,Y)&&($.current=Y,Kt(()=>{c(Y)}))})},[h,t,n,R]);hn(()=>{u===!1&&$.current.isPositioned&&($.current.isPositioned=!1,c(I=>({...I,isPositioned:!1})))},[u]);const F=P(!1);hn(()=>(F.current=!0,()=>{F.current=!1}),[]),hn(()=>{if(y&&(E.current=y),x&&(S.current=x),y&&x){if(A.current)return A.current(y,x,M);M()}},[y,x,M,A,C]);const k=ee(()=>({reference:E,floating:S,setReference:m,setFloating:w}),[m,w]),G=ee(()=>({reference:y,floating:x}),[y,x]),J=ee(()=>{const I={position:n,left:0,top:0};if(!G.floating)return I;const q=si(G.floating,d.x),Y=si(G.floating,d.y);return s?{...I,transform:"translate("+q+"px, "+Y+"px)",...ns(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:Y}},[n,s,G.floating,d.x,d.y]);return ee(()=>({...d,update:M,refs:k,elements:G,floatingStyles:J}),[d,M,k,G,J])}const Wd=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ai({element:r.current,padding:o}).fn(n):{}:r?ai({element:r,padding:o}).fn(n):{}}}},Hd=(e,t)=>({...Dd(e),options:[e,t]}),Ud=(e,t)=>({...Nd(e),options:[e,t]}),Bd=(e,t)=>({...Fd(e),options:[e,t]}),zd=(e,t)=>({...Ld(e),options:[e,t]}),Kd=(e,t)=>({...Id(e),options:[e,t]}),qd=(e,t)=>({...Md(e),options:[e,t]}),Gd=(e,t)=>({...Wd(e),options:[e,t]});function Yd(e){const[t,n]=T(void 0);return Et(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const rs="Popper",[os,is]=qr(rs),[Zd,as]=os(rs),Xd=e=>{const{__scopePopper:t,children:n}=e,[r,o]=T(null);return O(Zd,{scope:t,anchor:r,onAnchorChange:o},n)},Jd="PopperAnchor",Qd=z((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=as(Jd,n),a=P(null),s=Se(t,a);return D(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:O(et.div,B({},o,{ref:s}))}),ss="PopperContent",[ef,Xp]=os(ss),tf=z((e,t)=>{var n,r,o,i,a,s,l,u;const{__scopePopper:d,side:c="bottom",sideOffset:h=0,align:f="center",alignOffset:g=0,arrowPadding:p=0,avoidCollisions:b=!0,collisionBoundary:v=[],collisionPadding:m=0,sticky:w="partial",hideWhenDetached:y=!1,updatePositionStrategy:x="optimized",onPlaced:E,...S}=e,$=as(ss,d),[C,A]=T(null),R=Se(t,H=>A(H)),[M,F]=T(null),k=Yd(M),G=(n=k==null?void 0:k.width)!==null&&n!==void 0?n:0,J=(r=k==null?void 0:k.height)!==null&&r!==void 0?r:0,I=c+(f!=="center"?"-"+f:""),q=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},Y=Array.isArray(v)?v:[v],Rt=Y.length>0,ue={padding:q,boundary:Y.filter(nf),altBoundary:Rt},{refs:We,floatingStyles:nt,placement:Yt,isPositioned:Ce,middlewareData:Oe}=Vd({strategy:"fixed",placement:I,whileElementsMounted:(...H)=>kd(...H,{animationFrame:x==="always"}),elements:{reference:$.anchor},middleware:[Hd({mainAxis:h+J,alignmentAxis:g}),b&&Ud({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?Bd():void 0,...ue}),b&&zd({...ue}),Kd({...ue,apply:({elements:H,rects:oe,availableWidth:He,availableHeight:Z})=>{const{width:te,height:de}=oe.reference,ot=H.floating.style;ot.setProperty("--radix-popper-available-width",`${He}px`),ot.setProperty("--radix-popper-available-height",`${Z}px`),ot.setProperty("--radix-popper-anchor-width",`${te}px`),ot.setProperty("--radix-popper-anchor-height",`${de}px`)}}),M&&Gd({element:M,padding:p}),rf({arrowWidth:G,arrowHeight:J}),y&&qd({strategy:"referenceHidden",...ue})]}),[kt,kn]=cs(Yt),dt=qe(E);Et(()=>{Ce&&(dt==null||dt())},[Ce,dt]);const rt=(o=Oe.arrow)===null||o===void 0?void 0:o.x,Zt=(i=Oe.arrow)===null||i===void 0?void 0:i.y,V=((a=Oe.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[W,Q]=T();return Et(()=>{C&&Q(window.getComputedStyle(C).zIndex)},[C]),O("div",{ref:We.setFloating,"data-radix-popper-content-wrapper":"",style:{...nt,transform:Ce?nt.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(s=Oe.transformOrigin)===null||s===void 0?void 0:s.x,(l=Oe.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},O(ef,{scope:d,placedSide:kt,onArrowChange:F,arrowX:rt,arrowY:Zt,shouldHideArrow:V},O(et.div,B({"data-side":kt,"data-align":kn},S,{ref:R,style:{...S.style,animation:Ce?void 0:"none",opacity:(u=Oe.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function nf(e){return e!==null}const rf=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,c=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,h=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[g,p]=cs(s),b={start:"0%",center:"50%",end:"100%"}[p],v=((r=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+h/2,m=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+f/2;let w="",y="";return g==="bottom"?(w=c?b:`${v}px`,y=`${-f}px`):g==="top"?(w=c?b:`${v}px`,y=`${l.floating.height+f}px`):g==="right"?(w=`${-f}px`,y=c?b:`${m}px`):g==="left"&&(w=`${l.floating.width+f}px`,y=c?b:`${m}px`),{data:{x:w,y}}}});function cs(e){const[t,n="center"]=e.split("-");return[t,n]}const of=Xd,af=Qd,sf=tf,ls="Popover",[us,Jp]=qr(ls,[is]),to=is(),[cf,Tt]=us(ls),lf=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=to(t),l=P(null),[u,d]=T(!1),[c=!1,h]=Sa({prop:r,defaultProp:o,onChange:i});return O(of,s,O(cf,{scope:t,contentId:dn(),triggerRef:l,open:c,onOpenChange:h,onOpenToggle:K(()=>h(f=>!f),[h]),hasCustomAnchor:u,onCustomAnchorAdd:K(()=>d(!0),[]),onCustomAnchorRemove:K(()=>d(!1),[]),modal:a},n))},uf="PopoverTrigger",df=z((e,t)=>{const{__scopePopover:n,...r}=e,o=Tt(uf,n),i=to(n),a=Se(t,o.triggerRef),s=O(et.button,B({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ps(o.open)},r,{ref:a,onClick:fe(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?s:O(af,B({asChild:!0},i),s)}),ds="PopoverPortal",[ff,pf]=us(ds,{forceMount:void 0}),hf=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=Tt(ds,t);return O(ff,{scope:t,forceMount:n},O(Ot,{present:n||i.open},O(Ta,{asChild:!0,container:o},r)))},Ht="PopoverContent",gf=z((e,t)=>{const n=pf(Ht,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Tt(Ht,e.__scopePopover);return O(Ot,{present:r||i.open},i.modal?O(vf,B({},o,{ref:t})):O(_f,B({},o,{ref:t})))}),vf=z((e,t)=>{const n=Tt(Ht,e.__scopePopover),r=P(null),o=Se(t,r),i=P(!1);return D(()=>{const a=r.current;if(a)return Ha(a)},[]),O(Va,{as:On,allowPinchZoom:!0},O(fs,B({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:fe(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),i.current||(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:fe(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,u=s.button===2||l;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:fe(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})))}),_f=z((e,t)=>{const n=Tt(Ht,e.__scopePopover),r=P(!1),o=P(!1);return O(fs,B({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),fs=z((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...c}=e,h=Tt(Ht,n),f=to(n);return Ra(),O(Aa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},O(Ca,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1)},O(sf,B({"data-state":ps(h.open),role:"dialog",id:h.contentId},f,c,{ref:t,style:{...c.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function ps(e){return e?"open":"closed"}const mf=lf,yf=df,bf=hf,wf=gf,no=$e({base:"block fr font-style-tag font-family-tag font-weight-tag",variants:{variant:{neutralWeak:"text-tag-neutral-weak-copy bg-tag-neutral-weak-bg border-solid border-px border-tag-neutral-weak-stroke",neutralStrong:"text-tag-neutral-strong-copy bg-tag-neutral-strong-bg border-solid border-px border-tag-neutral-strong-stroke",accentStrong:"text-tag-accent-strong-copy bg-tag-accent-strong-bg border-solid border-px border-tag-accent-strong-stroke",monetaryWeak:"text-tag-monetary-weak-copy bg-tag-monetary-weak-bg border-solid border-px border-tag-monetary-weak-stroke"},interactive:{true:"ease-expo-out rounded-interactive transition-all duration-snappy",false:"rounded-tag"},size:{xs:"px-2 py-0.5 text-style-tag",sm:"px-3 py-1.5 text-style-tag",lg:"px-5 py-2.5 text-style-tag",unsized:""},disabled:{true:"opacity-25 pointer-events-none",false:""}},compoundVariants:[{disabled:!1,interactive:!0,class:"cursor-pointer active:scale-[0.975]"}],defaultVariants:{variant:"neutralWeak",size:"sm",disabled:!1,interactive:!1}}),Rn=$e({base:"fr bg-lowest caret-accent-11 selection:bg-accent-4 selection:text-accent-12 placeholder:text-copy-neutral placeholder:opacity-30 ring-width-section ease-expo-out duration-snappy transition-all disabled:opacity-50 rounded-input font-style-input text-style-input font-weight-input",variants:{hasValue:{false:"text-copy-neutral ring-job-card-stroke",true:"text-interactive-accent-text ring-job-card-stroke"},size:{md:"py-2 px-4",unsized:""}},defaultVariants:{size:"md",hasValue:!1}}),hs=$e({base:"gutter-stable group/filter flex-col p-2 bg-app flex max-w-full overflow-y-auto items-stretch max-h-[60svh]",variants:{ring:{default:"border-b-px border-neutral-4",unset:""}},defaultVariants:{ring:"default"}}),gs=$e({base:"max-w-full origin-top group/tag ease-expo-out transition-all duration-snappy",variants:{type:{pill:"",line:"[&:not(:last-child)]:border-b-px border-neutral-2 has-[[data-current-value=true]]:border-b-accent-3"}}}),vs=$e({base:"cursor-pointer flex fr gap-2 font-style-tag pointer-fine:group-[&:first-child]/filter:group-[&:first-child]/tag:rounded-t-tag py-2.5 px-2.5 font-family-tag font-weight-tag text-style-tag focus:relative w-full justify-between",variants:{active:{true:"bg-accent-2 text-accent-11",false:"text-neutral-11"},disabled:{true:"opacity-25 pointer-events-none",false:""}},compoundVariants:[{disabled:!1,active:!1,class:"hover:bg-neutral-2"}],defaultVariants:{disabled:!1,active:!1}}),xf=$e({base:"rounded-job-tag inline-block px-1 border-solid border-px ease-expo-out transition-all duration-snappy",variants:{colorScheme:{accentStrong:"text-accent-11 bg-accent-4 border-tag-accent-strong-stroke",neutralStrong:"text-neutral-11 bg-neutral-2 border-tag-neutral-strong-stroke"}}}),Ef=({children:e,colorScheme:t})=>_("span",{class:xf({colorScheme:t}),children:_("span",{class:"block w-[3ch] text-center tabular-nums",children:e})}),$f=(e,t)=>{const n=e.indexOf(t);return n===-1?[...e,t]:e.filter((r,o)=>o!==n)},li=e=>{var n;const t=Number((n=e.match(/\d/g))==null?void 0:n.join(""));return Number.isNaN(t)?0:t},Sf=(e,t={by:"results-count",order:"descending"})=>{const n=[...e];switch(t.by){case"results-count":n.sort((r,o)=>r.jobs-o.jobs);break;case"alphabetically":n.sort((r,o)=>r.label.localeCompare(o.label));break;case"numerically":n.sort((r,o)=>{const i=li(r.value),a=li(o.value);return i-a});break}return t.order==="descending"&&n.reverse(),n},Cf=(e,t)=>{if(e===null)return!1;const n=e[t.value];return n===void 0?!0:n===0},Of=(e,t)=>{const n=r=>r>99?"99+":r.toString();return n(e===null?t.jobs:e[t.value]??0)},Af=({value:e,property:t,useQuery:n,isMobile:r,onValueChange:o,unfilteredQuery:i,onClose:a})=>{const{t:s}=Qe(),l=Fr(n()),u=ee(()=>{switch(l.queryState){case"error":case"idle":case"loading":return null;case"loaded":case"revalidating":{const g=l.data[t.key]??[];return Object.fromEntries(g.map(p=>[p.value,p.jobs]))}default:cn(l)}},[l,t.key]),d=_s(e),c=d.length>0,[h,f]=T();return l.queryState==="error"?_(pr,{error:new Error(s("filters_loading_error"),{cause:l.error}),resetError:()=>l.swr.mutate()}):_("div",{class:"theme-fill:bg-neutral-1 flex min-h-0 w-full flex-col",children:[t.searchable&&_("div",{class:"border-b-px border-neutral-4",children:_("input",{type:"search",class:"theme-fill:bg-neutral-2 theme-stroke:bg-neutral-1 theme-fill:focus:bg-neutral-1 theme-stroke:focus:bg-lowest focus:ring-px focus:ring-neutral-6 pointer-fine:theme-soft:rounded-t-lg pointer-fine:theme-rounded:rounded-t-lg caret-accent-11 selection:bg-accent-4 selection:text-accent-12 placeholder:text-copy-neutral ease-expo-out duration-snappy font-style-input text-style-input font-weight-input bg-transparent px-4 py-2.5 outline-none transition-all placeholder:opacity-30 disabled:opacity-50",value:h,onInput:g=>f(g.currentTarget.value),placeholder:s("type_to_search")})}),(()=>{switch(i.queryState){case"error":return _(pr,{error:new Error(s("filters_loading_error"),{cause:i.error}),resetError:()=>i.swr.mutate()});case"idle":case"loading":return _("div",{class:"flex px-4",children:_("div",{"aria-hidden":!0,class:no({size:"lg",variant:"neutralStrong",interactive:!0,class:"animate-skeleton cursor-default opacity-20 active:-scale-100"}),children:_("span",{class:"inline-block w-[10ch]"})})});case"revalidating":case"loaded":{const g=i.data[t.key]??[],p=h&&h.length>1?g.filter(m=>m.label.toLowerCase().includes(h.toLowerCase())):g,b=[];for(const m of p){if(m.label.length<1)continue;const w={...m,results:Of(u,m),disabled:Cf(u,m)};switch(t.results){case"only-available":w.disabled===!1&&b.push(w);break;default:b.push(w)}}return b.find(m=>!m.disabled)?_("ul",{class:hs(),children:Sf(b,t.sortSuggestions).map(m=>{const w=d.includes(m.value);return _("li",{class:gs({type:"line"}),children:_("button",{type:"button",disabled:m.disabled,"data-filter":!0,"data-current-value":w?"true":void 0,onClick:()=>{switch(e.select){case"many":{const y=$f(d,m.value);o({select:"many",value:y});break}case"one":o({select:"one",value:m.value});break;default:cn(e)}},class:vs({active:w,disabled:m.disabled}),children:[_("span",{class:"max-w-full truncate",children:m.label})," ",_(Ef,{colorScheme:w?"accentStrong":"neutralStrong",children:m.results})]})},m.value)})}):_("p",{class:"font-style-tag text-style-tag font-weight-tag w-full px-4 pb-1 pt-4 text-center",children:s("no_filter_options_available")})}default:cn(i)}})(),_("footer",{class:"flex justify-end p-2",children:[_("div",{class:"flex-1",children:c&&_("button",{type:"button",class:xt({variant:"neutral",icon:"left"}),onClick:()=>{o(void 0)},children:[_(Le,{"aria-hidden":!0,name:"x"})," ",s("clear")]})}),e.select==="many"&&r&&_("div",{class:"flex items-center overflow-hidden",children:_("p",{class:"theme-light:text-neutral-11 theme-dark:text-neutral-12 font-style-default text-style-tag font-weight-default flex-grow select-none truncate text-center",children:[d.length," ",s("selected")]})}),_("div",{class:"flex-1",children:_("button",{type:"button",class:xt({variant:c?"accent":"neutral",class:"ml-auto"}),onClick:a,children:s(c?"done":"close")},c?"done":"close")})]})]})},ui=8,di={contract_type:"clock",title:"magnifier",city:"mapPin",town:"mapPin",country:"mapPin",company_name:"briefcase",category:"briefcase",pay:"pay",pay_currency:"pay",pay_mask:"pay",pay_display:"pay",pay_max:"pay",pay_min:"pay",pay_type:"pay"},fi=$e({base:"theme-fill:fr theme-fill:bg-neutral-2 theme-fill:hover:bg-neutral-3 theme-stroke:fr theme-stroke:hover:fr theme-stroke:ring-px theme-stroke:bg-lowest theme-stroke:ring-neutral-4 theme-stroke:hover:ring-neutral-6 group relative flex cursor-pointer select-none items-center gap-1.5 py-2.5 pl-3.5 pr-3 font-style-filter font-family-filter font-weight-filter text-style-filter duration-snappy outline-none ijs-filter flex-shrink-0 min-w-0 theme-rounded:rounded-md theme-soft:rounded-sm transition-all ease-expo-out active:scale-[0.975] origin-[50%_1.75rem]",variants:{state:{default:"text-copy-neutral-lowcontrast hover:text-copy-neutral",active:"text-copy-neutral"}}}),pi=$e({base:"bg-lowest isolate z-50 flex flex-col overflow-hidden ring-neutral-4 ring-px",variants:{mode:{mobile:"fixed bottom-0 w-full max-h-[80svh] rounded-t-section animate-slide-out-bottom",desktop:"min-w-64 max-w-xs max-h-[--radix-popover-content-available-height] rounded-section animate-slideDownFade data-[side=top]:animate-slideUpFade shadow-lg"}}}),_s=e=>typeof e.value=="string"?[e.value]:e.value??[],Pf=({selectedValues:e})=>{const t=e.length;return t===0?null:_("span",{"aria-label":"Current value",class:"animate-appear-tag text-style-job-card-info font-style-tag font-family-tag font-weight-tag text-tag-accent-strong-copy bg-tag-accent-strong-bg min-w-6 min-h-6 absolute -right-1 -top-1 inline-flex items-center justify-center rounded-[999px] px-2 tabular-nums",children:t},t)},Tf=({active:e,value:t,onActiveChange:n,property:r,onValueChange:o,unfilteredQuery:i,useQuery:a,theme:s,widgetId:l})=>{const u=Os(r.key,di)?di[r.key]:void 0,d=r.icon??u??"filter",c=_s(t),h=c.length>0,f=qi("(pointer: coarse)"),g=_(L,{children:[_(Le,{"aria-hidden":!0,class:"flex-none",name:d}),_("span",{class:"truncate",children:r.label}),_(Le,{"aria-hidden":!0,class:"text-neutral-8 flex-none rotate-90 transition-transform group-data-[state=open]:-rotate-90",name:"chevron-right"}),_(Pf,{selectedValues:c})]}),p=_(Af,{useQuery:a,onClose:()=>n(!1),onValueChange:o,unfilteredQuery:i,property:r,value:t,isMobile:f});return f?_(qu,{open:e,onOpenChange:n,children:[_(Gu,{"data-filter-key":r.key,"aria-label":r.label,"aria-selected":e?"true":void 0,class:fi({state:e||h?"active":"default"}),onTouchStart:Rf,children:g}),_(Yu,{children:_("div",{class:"inploi-job-search","data-widget-id":l,children:[_(Zu,{class:"animate-fade-in fixed inset-0 z-50 bg-[#0009]"}),_(Xu,{class:pi({mode:"mobile",class:gr(s)}),children:[_("header",{class:"theme-fill:bg-neutral-1 text-neutral-12 border-b-px border-neutral-4 flex cursor-default items-center gap-2 p-4",children:[_(Le,{name:d,class:"flex-none"}),_("p",{class:"font-style-filter font-weight-filter text-style-filter truncate",children:r.label})]}),p]})]})})]}):_(mf,{open:e,onOpenChange:b=>n(b),modal:f,children:[_(yf,{"data-filter-key":r.key,"aria-label":r.label,"aria-selected":e?"true":void 0,class:fi({state:e||h?"active":"default"}),children:g}),_(bf,{children:_("div",{class:"inploi-job-search","data-widget-id":l,children:_(wf,{side:"bottom",sideOffset:ui,align:"center",collisionPadding:ui,class:pi({mode:"desktop",class:gr(s)}),children:p})})})]})};function Rf(){}function kf(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ro=kf,Df=typeof Lt=="object"&&Lt&&Lt.Object===Object&&Lt,Nf=Df,Lf=Nf,If=typeof self=="object"&&self&&self.Object===Object&&self,Mf=Lf||If||Function("return this")(),oo=Mf,Ff=oo,jf=function(){return Ff.Date.now()},Vf=jf,Wf=/\s/;function Hf(e){for(var t=e.length;t--&&Wf.test(e.charAt(t)););return t}var Uf=Hf,Bf=Uf,zf=/^\s+/;function Kf(e){return e&&e.slice(0,Bf(e)+1).replace(zf,"")}var qf=Kf,Gf=oo,Yf=Gf.Symbol,io=Yf,hi=io,ms=Object.prototype,Zf=ms.hasOwnProperty,Xf=ms.toString,Nt=hi?hi.toStringTag:void 0;function Jf(e){var t=Zf.call(e,Nt),n=e[Nt];try{e[Nt]=void 0;var r=!0}catch{}var o=Xf.call(e);return r&&(t?e[Nt]=n:delete e[Nt]),o}var Qf=Jf,ep=Object.prototype,tp=ep.toString;function np(e){return tp.call(e)}var rp=np,gi=io,op=Qf,ip=rp,ap="[object Null]",sp="[object Undefined]",vi=gi?gi.toStringTag:void 0;function cp(e){return e==null?e===void 0?sp:ap:vi&&vi in Object(e)?op(e):ip(e)}var ys=cp;function lp(e){return e!=null&&typeof e=="object"}var up=lp,dp=ys,fp=up,pp="[object Symbol]";function hp(e){return typeof e=="symbol"||fp(e)&&dp(e)==pp}var bs=hp,gp=qf,_i=ro,vp=bs,mi=0/0,_p=/^[-+]0x[0-9a-f]+$/i,mp=/^0b[01]+$/i,yp=/^0o[0-7]+$/i,bp=parseInt;function wp(e){if(typeof e=="number")return e;if(vp(e))return mi;if(_i(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=_i(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=gp(e);var n=mp.test(e);return n||yp.test(e)?bp(e.slice(2),n?2:8):_p.test(e)?mi:+e}var xp=wp,Ep=ro,ar=Vf,yi=xp,$p="Expected a function",Sp=Math.max,Cp=Math.min;function Op(e,t,n){var r,o,i,a,s,l,u=0,d=!1,c=!1,h=!0;if(typeof e!="function")throw new TypeError($p);t=yi(t)||0,Ep(n)&&(d=!!n.leading,c="maxWait"in n,i=c?Sp(yi(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function f(E){var S=r,$=o;return r=o=void 0,u=E,a=e.apply($,S),a}function g(E){return u=E,s=setTimeout(v,t),d?f(E):a}function p(E){var S=E-l,$=E-u,C=t-S;return c?Cp(C,i-$):C}function b(E){var S=E-l,$=E-u;return l===void 0||S>=t||S<0||c&&$>=i}function v(){var E=ar();if(b(E))return m(E);s=setTimeout(v,p(E))}function m(E){return s=void 0,h&&r?f(E):(r=o=void 0,a)}function w(){s!==void 0&&clearTimeout(s),u=0,r=l=o=s=void 0}function y(){return s===void 0?a:m(ar())}function x(){var E=ar(),S=b(E);if(r=arguments,o=this,l=E,S){if(s===void 0)return g(l);if(c)return clearTimeout(s),s=setTimeout(v,t),f(l)}return s===void 0&&(s=setTimeout(v,t)),a}return x.cancel=w,x.flush=y,x}var Ap=Op;const Pp=ha(Ap),Tp=(e,t)=>{const n=structuredClone(e);return n.forEach(r=>{if(t.has(r.key)){const o=t.get(r.key);if(!o)return;r.defaultValue=o.includes(",")?o.split(","):o}}),n},Rp=e=>{const t=e.get("lat"),n=e.get("lng"),r=e.get("radius");return{type:"provided",coords:t&&n?{lat:Number(t),lng:Number(n)}:void 0,radius:r?Number(r):Tr(xs)}},ws=(e,t=1e3)=>{const[n,r]=T(e),o=ee(()=>Pp(i=>r(i),t),[t]);return D(()=>{o(e)},[e,o]),n},kp=z(({disabled:e,error:t,name:n,inputPlaceholder:r,items:o,onItemSelect:i,onQueryChange:a,onBlur:s,onFocus:l,inputProps:u,menuProps:d,query:c},h)=>{const[f,g]=T(!1),[p,b]=T(),{t:v}=Qe(),m=P();D(()=>{var y;b((y=o[0])==null?void 0:y.id)},[o]);const w=y=>{i(y),g(!1)};return _("div",{class:"relative h-full",children:[_("input",{name:n,ref:h,disabled:e,"data-active":f?"true":void 0,"aria-controls":`ijs-${n}-menu`,placeholder:r,class:Rn({size:"md"}),onFocus:()=>{l==null||l(),g(!0)},onBlur:()=>{m.current=window.setTimeout(()=>{s==null||s(),g(!1)},100)},value:c,onChange:y=>a(y.currentTarget.value),onKeyDown:y=>{switch(g(!0),y.key){case"ArrowDown":case"ArrowUp":{const x=y.key==="ArrowDown"?1:-1;y.preventDefault();const E=o.findIndex($=>$.id===p);if(E===-1)return;const S=o[E+x]??o[y.key==="ArrowDown"?0:o.length-1];if(!S)return;b(S.id);break}case"Enter":{if(y.preventDefault(),!p)return;i(p)}}},...u}),!t&&f&&!e&&o.length>0?_("ul",{className:hs({ring:"unset",className:"ring-width-section rounded-input ring-job-card-stroke absolute left-0 right-0 top-12 z-50 w-full shadow-sm"}),id:`ijs-${n}-menu`,onMouseDown:()=>{m.current&&clearTimeout(m.current)},...d,children:t?_("div",{role:"alert",children:v("geo_suggestions_error")}):o.map(y=>_("li",{class:gs({type:"line",className:"group/tag"}),children:_("button",{type:"button",onMouseEnter:()=>b(y.id),class:vs({active:y.id===p,className:"line-clamp-1 overflow-hidden truncate"}),onClick:()=>w(y.id),onKeyDown:x=>{x.key==="Enter"&&w(y.id)},children:y.label})},y.id))}):null]})}),Dp=(e={})=>new Promise((t,n)=>{var r,o;if((r=e.signal)!=null&&r.aborted){n(new DOMException("Aborted","AbortError"));return}navigator.geolocation.getCurrentPosition(i=>t(i.coords),i=>n(i),e),(o=e.signal)==null||o.addEventListener("abort",()=>{n(new DOMException("Aborted","AbortError"))},{once:!0})}),Np={1:"geo_error_permission_denied",2:"geo_error_position_unavailable",3:"geo_error_timeout"},bi=typeof window<"u"&&"geolocation"in navigator&&window.isSecureContext,Lp=({onLocate:e,onError:t,signal:n})=>{const[r,o]=T("idle"),[i,a]=T(null),{t:s}=Qe(),l=u=>{o("idle"),a(u),e(u)};return _("button",{"aria-label":s(r==="loading"?"geo_locating":"geo_my_location"),type:"button",onClick:()=>{if(bi){if(o("loading"),i)return l(i);Dp({signal:n}).then(u=>{const d={lat:u.latitude,lng:u.longitude};l(d)}).catch(u=>{if(u instanceof DOMException&&u.name==="AbortError")return o("idle");o("error");const d=Np[u.code];if(!d)return;const c=s(d);t(c)})}},"data-state":r,class:xt({variant:"accent",size:"lg",icon:"only",className:"data-[state=loading]:animate-pulse"}),disabled:!bi||r==="error",children:_(Le,{name:"target-location"})})},Ip="https://api.mapbox.com/search/geocode/v6/forward",Mp="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Fp=e=>atob(e).split("").reverse().join(""),jp=ce({features:$n(De(ce({properties:ce({mapbox_id:j(),place_formatted:Te(j()),name_preferred:Te(j(),"Untitled location"),coordinates:De(ce({latitude:be(),longitude:be()}),({latitude:e,longitude:t})=>({lat:e,lng:t}))})}),e=>e.properties))}),Vp=(e,t)=>Array.from(new Map(e.map(n=>[typeof t=="function"?t(n):n[t],n])).values()),Wp=async e=>{if(!e)return[];const t=new URL(Ip);t.searchParams.set("q",e),t.searchParams.set("proximity","ip"),t.searchParams.set("access_token",Fp(Mp));const n=await fetch(t);if(!n.ok)throw new Error("Failed to get address details");const r=Ir(jp,await n.json());if(r.success===!1)throw console.error(r.issues),new Error("Invalid data");const{features:o}=r.output;return Vp(o,i=>i.name_preferred+i.place_formatted)},Hp=({onSelect:e,onValueChange:t,coords:n,radius:r,onError:o})=>{const{t:i}=Qe(),[a,s]=T(""),[l,u]=T(),d=ws(a,500),[c,h]=T(new AbortController),f=Ea(d,Wp,{keepPreviousData:!1,revalidateIfStale:!1,revalidateOnFocus:!1}),{data:g,queryState:p,error:b}=Fr(f),[v,m]=T("view"),w=P(null);return D(()=>{if(v==="edit"){if(!w.current)return;w.current.focus()}},[v]),_("div",{class:"relative flex-1",children:[v==="view"&&n?_("button",{"aria-label":i("geo_search_placeholder"),type:"button",class:Rn({size:"unsized",className:"flex h-10 w-full cursor-text items-stretch px-1 py-1"}),onClick:()=>{m("edit")},children:_("div",{class:no({size:"sm",variant:"accentStrong",interactive:!0,class:"truncate"}),children:l??i("location_provided")})}):_(kp,{ref:w,error:b,query:a,name:"location-search",onQueryChange:s,onFocus:()=>{c.abort(),h(new AbortController)},onBlur:()=>{m("view"),s("")},onItemSelect:y=>{if(p!=="loaded")return;const x=g.find(E=>E.mapbox_id===y);x&&(e(x.coordinates),m("view"),u(x.name_preferred))},inputPlaceholder:i("geo_search_placeholder"),items:(g==null?void 0:g.map(y=>({id:y.mapbox_id,label:_("div",{class:"flex min-w-0 max-w-full gap-2 overflow-hidden",children:[_("strong",{class:"truncate",children:y.name_preferred})," ",_("span",{class:"flex-1 truncate opacity-50",children:y.place_formatted})]})})))??[]}),_("div",{class:"absolute bottom-0 right-0 top-0 flex items-center",children:!a&&!n?_(Lp,{onLocate:y=>{m("view"),u(i("geo_my_location")),t({type:"provided",coords:y,radius:r})},onError:o,signal:c.signal}):_("button",{type:"button","aria-label":i("geo_clear_search"),onClick:()=>{s(""),u(void 0),t({radius:r,type:"provided"}),m("edit"),w.current&&(w.current.value="",w.current.focus())},class:xt({variant:"neutral",size:"lg",icon:"only"}),children:_(Le,{name:"x"})})})]})},Up=[.25,.5,1,3,5,10,15,20,30,40],xs=20,Tr=e=>e*1609.34,Bp=new Intl.NumberFormat(void 0,{style:"unit",unit:"mile",unitDisplay:"long",maximumFractionDigits:1,trailingZeroDisplay:"stripIfInteger"}),zp=De(ce({type:Pe("provided"),lat:Te(De(j(),e=>Number(e))),lng:Te(De(j(),e=>Number(e))),radius:De(j(),e=>Number(e))}),e=>({radius:e.radius,type:e.type,coords:e.lat&&e.lng?{lat:e.lat,lng:e.lng}:void 0})),Kp=({value:e,onValueChange:t,logger:n})=>{const{t:r}=Qe(),o=Vr(),i=(e==null?void 0:e.type)==="provided"?e.radius:Tr(xs),[a,s]=T();return _("div",{class:"flex flex-col gap-2",children:[_("form",{onChange:l=>{const u=new FormData(l.currentTarget),d=Ir(zp,Object.fromEntries(u.entries()));if(!d.success){n.error(d.issues),s(d.issues[0].message);return}t(d.output)},class:"flex flex-col gap-2 md:flex-row",children:[_("input",{type:"hidden",name:"type",value:"provided"}),(e==null?void 0:e.type)==="provided"&&e.coords?_(L,{children:[_("input",{type:"hidden",name:"lat",value:e.coords.lat}),_("input",{type:"hidden",name:"lng",value:e.coords.lng})]}):null,_(Hp,{coords:(e==null?void 0:e.type)==="provided"?e.coords:void 0,radius:i,onValueChange:t,onSelect:l=>{s(void 0),t({type:"provided",radius:i,coords:l})},onError:s}),_("div",{class:"relative",children:[_("label",{class:"sr-only",for:o,children:r("geo_range_label")}),_("select",{id:o,name:"radius",class:Rn({size:"unsized",className:"w-full appearance-none truncate py-2 pl-3 pr-10"}),value:i,onChange:l=>{s(void 0),t({type:"provided",coords:(e==null?void 0:e.type)==="provided"?e.coords:void 0,radius:Number(l.currentTarget.value)})},children:Up.map(l=>_("option",{value:Tr(l),class:"truncate",children:Bp.format(l)},l))}),_("div",{class:"text-copy-neutral-lowcontrast pointer-events-none absolute bottom-0 right-0 top-0 flex w-10 items-center justify-center",children:_(Le,{name:"chevron-right",class:"h-6 w-6 rotate-90"})})]})]}),a?_("div",{role:"alert",class:"text-pretty text-copy-neutral font-style-tag font-weight-tag text-style-tag flex gap-1",children:[_(Le,{name:"warning",class:"animate-appear-tag size-[1lh] flex-none"}),a]}):null]})};exports.D=_t;exports.D$1=bt;exports.E=Dr;exports.ErrorBoundary=xc;exports.ErrorView=pr;exports.F=ee;exports.Filter=Tf;exports.GeoSearch=Kp;exports.Icon=Le;exports.IconSpritesheet=$c;exports.JOB_SEARCH_WIDGET_ID=ec;exports.M=Hr;exports.PAGE_SIZE=ji;exports.SWR_SETTINGS=dc;exports.T=K;exports.TranslationProvider=mc;exports.UnstyledErrorView=wc;exports._=P;exports._Symbol=io;exports._baseGetTag=ys;exports._root=oo;exports.btnClass=xt;exports.clsx=Hi;exports.commonjsGlobal=Lt;exports.createTFunction=yc;exports.cva=$e;exports.exhaustive=cn;exports.generateColorThemeCss=Nc;exports.getAvailableFilters=sc;exports.getDefaultExportFromCjs=ha;exports.getGeolocationFromSearchParams=Rp;exports.getJobSearchMapResults=uc;exports.getJobSearchResults=cc;exports.getQueryState=Fr;exports.getStatefulPropertiesFromSearchParams=Tp;exports.getThemeVariants=gr;exports.h=T;exports.inputClass=Rn;exports.invariant=Cs;exports.isObject_1=ro;exports.isSymbol_1=bs;exports.k=L;exports.o=_;exports.p=D;exports.tagClass=no;exports.useDebouncedValue=ws;exports.useMediaQuery=qi;exports.useSWR=Ea;exports.useTranslation=Qe;exports.useViewTracking=Sc;exports.y=O;
|
|
60
|
+
`)},Tu=0,pt=[];function Ru(e){var t=P([]),n=P([0,0]),r=P(),o=T(Tu++)[0],i=T(function(){return La()})[0],a=P(e);D(function(){a.current=e},[e]),D(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=Jl([e.lockRef.current],(e.shards||[]).map(Qo),!0).filter(Boolean);return p.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=K(function(p,b){if("touches"in p&&p.touches.length===2)return!a.current.allowPinchZoom;var v=rn(p),m=n.current,w="deltaX"in p?p.deltaX:m[0]-v[0],y="deltaY"in p?p.deltaY:m[1]-v[1],x,E=p.target,S=Math.abs(w)>Math.abs(y)?"h":"v";if("touches"in p&&S==="h"&&E.type==="range")return!1;var $=Xo(S,E);if(!$)return!0;if($?x=S:(x=S==="v"?"h":"v",$=Xo(S,E)),!$)return!1;if(!r.current&&"changedTouches"in p&&(w||y)&&(r.current=x),!x)return!0;var C=r.current||x;return Ou(C,b,p,C==="h"?w:y,!0)},[]),l=K(function(p){var b=p;if(!(!pt.length||pt[pt.length-1]!==i)){var v="deltaY"in b?Jo(b):rn(b),m=t.current.filter(function(x){return x.name===b.type&&x.target===b.target&&Au(x.delta,v)})[0];if(m&&m.should){b.cancelable&&b.preventDefault();return}if(!m){var w=(a.current.shards||[]).map(Qo).filter(Boolean).filter(function(x){return x.contains(b.target)}),y=w.length>0?s(b,w[0]):!a.current.noIsolation;y&&b.cancelable&&b.preventDefault()}}},[]),u=K(function(p,b,v,m){var w={name:p,delta:b,target:v,should:m};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(y){return y!==w})},1)},[]),d=K(function(p){n.current=rn(p),r.current=void 0},[]),c=K(function(p){u(p.type,Jo(p),p.target,s(p,e.lockRef.current))},[]),h=K(function(p){u(p.type,rn(p),p.target,s(p,e.lockRef.current))},[]);D(function(){return pt.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,ft),document.addEventListener("touchmove",l,ft),document.addEventListener("touchstart",d,ft),function(){pt=pt.filter(function(p){return p!==i}),document.removeEventListener("wheel",l,ft),document.removeEventListener("touchmove",l,ft),document.removeEventListener("touchstart",d,ft)}},[]);var f=e.removeScrollBar,g=e.inert;return O(L,null,g?O(i,{styles:Pu(o)}):null,f?O(bu,{gapMode:"margin"}):null)}const ku=su(Na,Ru);var ja=z(function(e,t){return O(An,ye({},e,{ref:t,sideCar:ku}))});ja.classNames=An.classNames;const Va=ja;var Du=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ht=new WeakMap,on=new WeakMap,an={},or=0,Wa=function(e){return e&&(e.host||Wa(e.parentNode))},Nu=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Wa(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Lu=function(e,t,n,r){var o=Nu(t,Array.isArray(e)?e:[e]);an[n]||(an[n]=new WeakMap);var i=an[n],a=[],s=new Set,l=new Set(o),u=function(c){!c||s.has(c)||(s.add(c),u(c.parentNode))};o.forEach(u);var d=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(s.has(h))d(h);else try{var f=h.getAttribute(r),g=f!==null&&f!=="false",p=(ht.get(h)||0)+1,b=(i.get(h)||0)+1;ht.set(h,p),i.set(h,b),a.push(h),p===1&&g&&on.set(h,!0),b===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",h,v)}})};return d(t),s.clear(),or++,function(){a.forEach(function(c){var h=ht.get(c)-1,f=i.get(c)-1;ht.set(c,h),i.set(c,f),h||(on.has(c)||c.removeAttribute(r),on.delete(c)),f||c.removeAttribute(n)}),or--,or||(ht=new WeakMap,ht=new WeakMap,on=new WeakMap,an={})}},Ha=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Du(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Lu(r,o,n,"aria-hidden")):function(){return null}};const Ua="Dialog",[Ba,Zp]=qr(Ua),[Iu,tt]=Ba(Ua),Mu=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=P(null),l=P(null),[u=!1,d]=Sa({prop:r,defaultProp:o,onChange:i});return O(Iu,{scope:t,triggerRef:s,contentRef:l,contentId:dn(),titleId:dn(),descriptionId:dn(),open:u,onOpenChange:d,onOpenToggle:K(()=>d(c=>!c),[d]),modal:a},n)},Fu="DialogTrigger",ju=z((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(Fu,n),i=Se(t,o.triggerRef);return O(et.button,B({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Gr(o.open)},r,{ref:i,onClick:fe(e.onClick,o.onOpenToggle)}))}),za="DialogPortal",[Vu,Ka]=Ba(za,{forceMount:void 0}),Wu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=tt(za,t);return O(Vu,{scope:t,forceMount:n},xe.map(r,a=>O(Ot,{present:n||i.open},O(Ta,{asChild:!0,container:o},a))))},Cr="DialogOverlay",Hu=z((e,t)=>{const n=Ka(Cr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=tt(Cr,e.__scopeDialog);return i.modal?O(Ot,{present:r||i.open},O(Uu,B({},o,{ref:t}))):null}),Uu=z((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(Cr,n);return O(Va,{as:On,allowPinchZoom:!0,shards:[o.contentRef]},O(et.div,B({"data-state":Gr(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),jt="DialogContent",Bu=z((e,t)=>{const n=Ka(jt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=tt(jt,e.__scopeDialog);return O(Ot,{present:r||i.open},i.modal?O(zu,B({},o,{ref:t})):O(Ku,B({},o,{ref:t})))}),zu=z((e,t)=>{const n=tt(jt,e.__scopeDialog),r=P(null),o=Se(t,n.contentRef,r);return D(()=>{const i=r.current;if(i)return Ha(i)},[]),O(qa,B({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:fe(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:fe(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:fe(e.onFocusOutside,i=>i.preventDefault())}))}),Ku=z((e,t)=>{const n=tt(jt,e.__scopeDialog),r=P(!1),o=P(!1);return O(qa,B({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),qa=z((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=tt(jt,n),l=P(null),u=Se(t,l);return Ra(),O(L,null,O(Aa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},O(Ca,B({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Gr(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function Gr(e){return e?"open":"closed"}const qu=Mu,Gu=ju,Yu=Wu,Zu=Hu,Xu=Bu,Ju=["top","right","bottom","left"],we=Math.min,ie=Math.max,yn=Math.round,sn=Math.floor,Ge=e=>({x:e,y:e}),Qu={left:"right",right:"left",bottom:"top",top:"bottom"},ed={start:"end",end:"start"};function Or(e,t,n){return ie(e,we(t,n))}function Me(e,t){return typeof e=="function"?e(t):e}function Fe(e){return e.split("-")[0]}function At(e){return e.split("-")[1]}function Yr(e){return e==="x"?"y":"x"}function Zr(e){return e==="y"?"height":"width"}function Ye(e){return["top","bottom"].includes(Fe(e))?"y":"x"}function Xr(e){return Yr(Ye(e))}function td(e,t,n){n===void 0&&(n=!1);const r=At(e),o=Xr(e),i=Zr(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=bn(a)),[a,bn(a)]}function nd(e){const t=bn(e);return[Ar(e),t,Ar(t)]}function Ar(e){return e.replace(/start|end/g,t=>ed[t])}function rd(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function od(e,t,n,r){const o=At(e);let i=rd(Fe(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ar)))),i}function bn(e){return e.replace(/left|right|bottom|top/g,t=>Qu[t])}function id(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ga(e){return typeof e!="number"?id(e):{top:e,right:e,bottom:e,left:e}}function wn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ei(e,t,n){let{reference:r,floating:o}=e;const i=Ye(t),a=Xr(t),s=Zr(a),l=Fe(t),u=i==="y",d=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:d,y:r.y-o.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:c};break;case"left":f={x:r.x-o.width,y:c};break;default:f={x:r.x,y:r.y}}switch(At(t)){case"start":f[a]-=h*(n&&u?-1:1);break;case"end":f[a]+=h*(n&&u?-1:1);break}return f}const ad=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:c}=ei(u,r,l),h=r,f={},g=0;for(let p=0;p<s.length;p++){const{name:b,fn:v}=s[p],{x:m,y:w,data:y,reset:x}=await v({x:d,y:c,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:u,platform:a,elements:{reference:e,floating:t}});d=m??d,c=w??c,f={...f,[b]:{...f[b],...y}},x&&g<=50&&(g++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(u=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:d,y:c}=ei(u,h,l)),p=-1)}return{x:d,y:c,placement:h,strategy:o,middlewareData:f}};async function Vt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:h=!1,padding:f=0}=Me(t,e),g=Ga(f),b=s[h?c==="floating"?"reference":"floating":c],v=wn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:l})),m=c==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),y=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},x=wn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:m,offsetParent:w,strategy:l}):m);return{top:(v.top-x.top+g.top)/y.y,bottom:(x.bottom-v.bottom+g.bottom)/y.y,left:(v.left-x.left+g.left)/y.x,right:(x.right-v.right+g.right)/y.x}}const sd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:d=0}=Me(e,t)||{};if(u==null)return{};const c=Ga(d),h={x:n,y:r},f=Xr(o),g=Zr(f),p=await a.getDimensions(u),b=f==="y",v=b?"top":"left",m=b?"bottom":"right",w=b?"clientHeight":"clientWidth",y=i.reference[g]+i.reference[f]-h[f]-i.floating[g],x=h[f]-i.reference[f],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let S=E?E[w]:0;(!S||!await(a.isElement==null?void 0:a.isElement(E)))&&(S=s.floating[w]||i.floating[g]);const $=y/2-x/2,C=S/2-p[g]/2-1,A=we(c[v],C),R=we(c[m],C),M=A,F=S-p[g]-R,k=S/2-p[g]/2+$,G=Or(M,k,F),J=!l.arrow&&At(o)!=null&&k!==G&&i.reference[g]/2-(k<M?A:R)-p[g]/2<0,I=J?k<M?k-M:k-F:0;return{[f]:h[f]+I,data:{[f]:G,centerOffset:k-G-I,...J&&{alignmentOffset:I}},reset:J}}}),cd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...b}=Me(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Fe(o),m=Ye(s),w=Fe(s)===s,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=h||(w||!p?[bn(s)]:nd(s)),E=g!=="none";!h&&E&&x.push(...od(s,p,g,y));const S=[s,...x],$=await Vt(t,b),C=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&C.push($[v]),c){const k=td(o,a,y);C.push($[k[0]],$[k[1]])}if(A=[...A,{placement:o,overflows:C}],!C.every(k=>k<=0)){var R,M;const k=(((R=i.flip)==null?void 0:R.index)||0)+1,G=S[k];if(G)return{data:{index:k,overflows:A},reset:{placement:G}};let J=(M=A.filter(I=>I.overflows[0]<=0).sort((I,q)=>I.overflows[1]-q.overflows[1])[0])==null?void 0:M.placement;if(!J)switch(f){case"bestFit":{var F;const I=(F=A.filter(q=>{if(E){const Y=Ye(q.placement);return Y===m||Y==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(Y=>Y>0).reduce((Y,Rt)=>Y+Rt,0)]).sort((q,Y)=>q[1]-Y[1])[0])==null?void 0:F[0];I&&(J=I);break}case"initialPlacement":J=s;break}if(o!==J)return{reset:{placement:J}}}return{}}}};function ti(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ni(e){return Ju.some(t=>e[t]>=0)}const ld=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Me(e,t);switch(r){case"referenceHidden":{const i=await Vt(t,{...o,elementContext:"reference"}),a=ti(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ni(a)}}}case"escaped":{const i=await Vt(t,{...o,altBoundary:!0}),a=ti(i,n.floating);return{data:{escapedOffsets:a,escaped:ni(a)}}}default:return{}}}}};async function ud(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Fe(n),s=At(n),l=Ye(n)==="y",u=["left","top"].includes(a)?-1:1,d=i&&l?-1:1,c=Me(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:g}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...c};return s&&typeof g=="number"&&(f=s==="end"?g*-1:g),l?{x:f*d,y:h*u}:{x:h*u,y:f*d}}const dd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await ud(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},fd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:v,y:m}=b;return{x:v,y:m}}},...l}=Me(e,t),u={x:n,y:r},d=await Vt(t,l),c=Ye(Fe(o)),h=Yr(c);let f=u[h],g=u[c];if(i){const b=h==="y"?"top":"left",v=h==="y"?"bottom":"right",m=f+d[b],w=f-d[v];f=Or(m,f,w)}if(a){const b=c==="y"?"top":"left",v=c==="y"?"bottom":"right",m=g+d[b],w=g-d[v];g=Or(m,g,w)}const p=s.fn({...t,[h]:f,[c]:g});return{...p,data:{x:p.x-n,y:p.y-r}}}}},pd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=Me(e,t),d={x:n,y:r},c=Ye(o),h=Yr(c);let f=d[h],g=d[c];const p=Me(s,t),b=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const w=h==="y"?"height":"width",y=i.reference[h]-i.floating[w]+b.mainAxis,x=i.reference[h]+i.reference[w]-b.mainAxis;f<y?f=y:f>x&&(f=x)}if(u){var v,m;const w=h==="y"?"width":"height",y=["top","left"].includes(Fe(o)),x=i.reference[c]-i.floating[w]+(y&&((v=a.offset)==null?void 0:v[c])||0)+(y?0:b.crossAxis),E=i.reference[c]+i.reference[w]+(y?0:((m=a.offset)==null?void 0:m[c])||0)-(y?b.crossAxis:0);g<x?g=x:g>E&&(g=E)}return{[h]:f,[c]:g}}}},hd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Me(e,t),l=await Vt(t,s),u=Fe(n),d=At(n),c=Ye(n)==="y",{width:h,height:f}=r.floating;let g,p;u==="top"||u==="bottom"?(g=u,p=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(p=u,g=d==="end"?"top":"bottom");const b=f-l.top-l.bottom,v=h-l.left-l.right,m=we(f-l[g],b),w=we(h-l[p],v),y=!t.middlewareData.shift;let x=m,E=w;if(c?E=d||y?we(w,v):v:x=d||y?we(m,b):b,y&&!d){const $=ie(l.left,0),C=ie(l.right,0),A=ie(l.top,0),R=ie(l.bottom,0);c?E=h-2*($!==0||C!==0?$+C:ie(l.left,l.right)):x=f-2*(A!==0||R!==0?A+R:ie(l.top,l.bottom))}await a({...t,availableWidth:E,availableHeight:x});const S=await o.getDimensions(i.floating);return h!==S.width||f!==S.height?{reset:{rects:!0}}:{}}}};function Pt(e){return Ya(e)?(e.nodeName||"").toLowerCase():"#document"}function ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ve(e){var t;return(t=(Ya(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ya(e){return e instanceof Node||e instanceof ae(e).Node}function pe(e){return e instanceof Element||e instanceof ae(e).Element}function Ee(e){return e instanceof HTMLElement||e instanceof ae(e).HTMLElement}function ri(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ae(e).ShadowRoot}function Gt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=he(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function gd(e){return["table","td","th"].includes(Pt(e))}function Pn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Jr(e){const t=Qr(),n=pe(e)?he(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function vd(e){let t=Ze(e);for(;Ee(t)&&!$t(t);){if(Jr(t))return t;if(Pn(t))return null;t=Ze(t)}return null}function Qr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function $t(e){return["html","body","#document"].includes(Pt(e))}function he(e){return ae(e).getComputedStyle(e)}function Tn(e){return pe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ze(e){if(Pt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ri(e)&&e.host||Ve(e);return ri(t)?t.host:t}function Za(e){const t=Ze(e);return $t(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ee(t)&&Gt(t)?t:Za(t)}function Wt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Za(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=ae(o);if(i){const s=Pr(a);return t.concat(a,a.visualViewport||[],Gt(o)?o:[],s&&n?Wt(s):[])}return t.concat(o,Wt(o,[],n))}function Pr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xa(e){const t=he(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ee(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=yn(n)!==i||yn(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function eo(e){return pe(e)?e:e.contextElement}function yt(e){const t=eo(e);if(!Ee(t))return Ge(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Xa(t);let a=(i?yn(n.width):n.width)/r,s=(i?yn(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const _d=Ge(0);function Ja(e){const t=ae(e);return!Qr()||!t.visualViewport?_d:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function md(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ae(e)?!1:t}function lt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=eo(e);let a=Ge(1);t&&(r?pe(r)&&(a=yt(r)):a=yt(e));const s=md(i,n,r)?Ja(i):Ge(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,d=o.width/a.x,c=o.height/a.y;if(i){const h=ae(i),f=r&&pe(r)?ae(r):r;let g=h,p=Pr(g);for(;p&&r&&f!==g;){const b=yt(p),v=p.getBoundingClientRect(),m=he(p),w=v.left+(p.clientLeft+parseFloat(m.paddingLeft))*b.x,y=v.top+(p.clientTop+parseFloat(m.paddingTop))*b.y;l*=b.x,u*=b.y,d*=b.x,c*=b.y,l+=w,u+=y,g=ae(p),p=Pr(g)}}return wn({width:d,height:c,x:l,y:u})}function yd(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Ve(r),s=t?Pn(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Ge(1);const d=Ge(0),c=Ee(r);if((c||!c&&!i)&&((Pt(r)!=="body"||Gt(a))&&(l=Tn(r)),Ee(r))){const h=lt(r);u=yt(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x,y:n.y*u.y-l.scrollTop*u.y+d.y}}function bd(e){return Array.from(e.getClientRects())}function Qa(e){return lt(Ve(e)).left+Tn(e).scrollLeft}function wd(e){const t=Ve(e),n=Tn(e),r=e.ownerDocument.body,o=ie(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ie(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Qa(e);const s=-n.scrollTop;return he(r).direction==="rtl"&&(a+=ie(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function xd(e,t){const n=ae(e),r=Ve(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const u=Qr();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function Ed(e,t){const n=lt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ee(e)?yt(e):Ge(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:a,height:s,x:l,y:u}}function oi(e,t,n){let r;if(t==="viewport")r=xd(e,n);else if(t==="document")r=wd(Ve(e));else if(pe(t))r=Ed(t,n);else{const o=Ja(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return wn(r)}function es(e,t){const n=Ze(e);return n===t||!pe(n)||$t(n)?!1:he(n).position==="fixed"||es(n,t)}function $d(e,t){const n=t.get(e);if(n)return n;let r=Wt(e,[],!1).filter(s=>pe(s)&&Pt(s)!=="body"),o=null;const i=he(e).position==="fixed";let a=i?Ze(e):e;for(;pe(a)&&!$t(a);){const s=he(a),l=Jr(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Gt(a)&&!l&&es(e,a))?r=r.filter(d=>d!==a):o=s,a=Ze(a)}return t.set(e,r),r}function Sd(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Pn(t)?[]:$d(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,d)=>{const c=oi(t,d,o);return u.top=ie(c.top,u.top),u.right=we(c.right,u.right),u.bottom=we(c.bottom,u.bottom),u.left=ie(c.left,u.left),u},oi(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Cd(e){const{width:t,height:n}=Xa(e);return{width:t,height:n}}function Od(e,t,n){const r=Ee(t),o=Ve(t),i=n==="fixed",a=lt(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Ge(0);if(r||!r&&!i)if((Pt(t)!=="body"||Gt(o))&&(s=Tn(t)),r){const c=lt(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=Qa(o));const u=a.left+s.scrollLeft-l.x,d=a.top+s.scrollTop-l.y;return{x:u,y:d,width:a.width,height:a.height}}function ir(e){return he(e).position==="static"}function ii(e,t){return!Ee(e)||he(e).position==="fixed"?null:t?t(e):e.offsetParent}function ts(e,t){const n=ae(e);if(Pn(e))return n;if(!Ee(e)){let o=Ze(e);for(;o&&!$t(o);){if(pe(o)&&!ir(o))return o;o=Ze(o)}return n}let r=ii(e,t);for(;r&&gd(r)&&ir(r);)r=ii(r,t);return r&&$t(r)&&ir(r)&&!Jr(r)?n:r||vd(e)||n}const Ad=async function(e){const t=this.getOffsetParent||ts,n=this.getDimensions,r=await n(e.floating);return{reference:Od(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Pd(e){return he(e).direction==="rtl"}const Td={convertOffsetParentRelativeRectToViewportRelativeRect:yd,getDocumentElement:Ve,getClippingRect:Sd,getOffsetParent:ts,getElementRects:Ad,getClientRects:bd,getDimensions:Cd,getScale:yt,isElement:pe,isRTL:Pd};function Rd(e,t){let n=null,r;const o=Ve(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:u,top:d,width:c,height:h}=e.getBoundingClientRect();if(s||t(),!c||!h)return;const f=sn(d),g=sn(o.clientWidth-(u+c)),p=sn(o.clientHeight-(d+h)),b=sn(u),m={rootMargin:-f+"px "+-g+"px "+-p+"px "+-b+"px",threshold:ie(0,we(1,l))||1};let w=!0;function y(x){const E=x[0].intersectionRatio;if(E!==l){if(!w)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(y,{...m,root:o.ownerDocument})}catch{n=new IntersectionObserver(y,m)}n.observe(e)}return a(!0),i}function kd(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=eo(e),d=o||i?[...u?Wt(u):[],...Wt(t)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const c=u&&s?Rd(u,n):null;let h=-1,f=null;a&&(f=new ResizeObserver(v=>{let[m]=v;m&&m.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),u&&!l&&f.observe(u),f.observe(t));let g,p=l?lt(e):null;l&&b();function b(){const v=lt(e);p&&(v.x!==p.x||v.y!==p.y||v.width!==p.width||v.height!==p.height)&&n(),p=v,g=requestAnimationFrame(b)}return n(),()=>{var v;d.forEach(m=>{o&&m.removeEventListener("scroll",n),i&&m.removeEventListener("resize",n)}),c==null||c(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(g)}}const Dd=dd,Nd=fd,Ld=cd,Id=hd,Md=ld,ai=sd,Fd=pd,jd=(e,t,n)=>{const r=new Map,o={platform:Td,...n},i={...o.platform,_c:r};return ad(e,t,{...o,platform:i})};var hn=typeof document<"u"?je:D;function xn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!xn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ns(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function si(e,t){const n=ns(e);return Math.round(t*n)/n}function ci(e){const t=P(e);return hn(()=>{t.current=e}),t}function Vd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[d,c]=T({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=T(r);xn(h,r)||f(r);const[g,p]=T(null),[b,v]=T(null),m=K(I=>{I!==E.current&&(E.current=I,p(I))},[]),w=K(I=>{I!==S.current&&(S.current=I,v(I))},[]),y=i||g,x=a||b,E=P(null),S=P(null),$=P(d),C=l!=null,A=ci(l),R=ci(o),M=K(()=>{if(!E.current||!S.current)return;const I={placement:t,strategy:n,middleware:h};R.current&&(I.platform=R.current),jd(E.current,S.current,I).then(q=>{const Y={...q,isPositioned:!0};F.current&&!xn($.current,Y)&&($.current=Y,Kt(()=>{c(Y)}))})},[h,t,n,R]);hn(()=>{u===!1&&$.current.isPositioned&&($.current.isPositioned=!1,c(I=>({...I,isPositioned:!1})))},[u]);const F=P(!1);hn(()=>(F.current=!0,()=>{F.current=!1}),[]),hn(()=>{if(y&&(E.current=y),x&&(S.current=x),y&&x){if(A.current)return A.current(y,x,M);M()}},[y,x,M,A,C]);const k=ee(()=>({reference:E,floating:S,setReference:m,setFloating:w}),[m,w]),G=ee(()=>({reference:y,floating:x}),[y,x]),J=ee(()=>{const I={position:n,left:0,top:0};if(!G.floating)return I;const q=si(G.floating,d.x),Y=si(G.floating,d.y);return s?{...I,transform:"translate("+q+"px, "+Y+"px)",...ns(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:Y}},[n,s,G.floating,d.x,d.y]);return ee(()=>({...d,update:M,refs:k,elements:G,floatingStyles:J}),[d,M,k,G,J])}const Wd=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ai({element:r.current,padding:o}).fn(n):{}:r?ai({element:r,padding:o}).fn(n):{}}}},Hd=(e,t)=>({...Dd(e),options:[e,t]}),Ud=(e,t)=>({...Nd(e),options:[e,t]}),Bd=(e,t)=>({...Fd(e),options:[e,t]}),zd=(e,t)=>({...Ld(e),options:[e,t]}),Kd=(e,t)=>({...Id(e),options:[e,t]}),qd=(e,t)=>({...Md(e),options:[e,t]}),Gd=(e,t)=>({...Wd(e),options:[e,t]});function Yd(e){const[t,n]=T(void 0);return Et(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const rs="Popper",[os,is]=qr(rs),[Zd,as]=os(rs),Xd=e=>{const{__scopePopper:t,children:n}=e,[r,o]=T(null);return O(Zd,{scope:t,anchor:r,onAnchorChange:o},n)},Jd="PopperAnchor",Qd=z((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=as(Jd,n),a=P(null),s=Se(t,a);return D(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:O(et.div,B({},o,{ref:s}))}),ss="PopperContent",[ef,Xp]=os(ss),tf=z((e,t)=>{var n,r,o,i,a,s,l,u;const{__scopePopper:d,side:c="bottom",sideOffset:h=0,align:f="center",alignOffset:g=0,arrowPadding:p=0,avoidCollisions:b=!0,collisionBoundary:v=[],collisionPadding:m=0,sticky:w="partial",hideWhenDetached:y=!1,updatePositionStrategy:x="optimized",onPlaced:E,...S}=e,$=as(ss,d),[C,A]=T(null),R=Se(t,H=>A(H)),[M,F]=T(null),k=Yd(M),G=(n=k==null?void 0:k.width)!==null&&n!==void 0?n:0,J=(r=k==null?void 0:k.height)!==null&&r!==void 0?r:0,I=c+(f!=="center"?"-"+f:""),q=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},Y=Array.isArray(v)?v:[v],Rt=Y.length>0,ue={padding:q,boundary:Y.filter(nf),altBoundary:Rt},{refs:We,floatingStyles:nt,placement:Yt,isPositioned:Ce,middlewareData:Oe}=Vd({strategy:"fixed",placement:I,whileElementsMounted:(...H)=>kd(...H,{animationFrame:x==="always"}),elements:{reference:$.anchor},middleware:[Hd({mainAxis:h+J,alignmentAxis:g}),b&&Ud({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?Bd():void 0,...ue}),b&&zd({...ue}),Kd({...ue,apply:({elements:H,rects:oe,availableWidth:He,availableHeight:Z})=>{const{width:te,height:de}=oe.reference,ot=H.floating.style;ot.setProperty("--radix-popper-available-width",`${He}px`),ot.setProperty("--radix-popper-available-height",`${Z}px`),ot.setProperty("--radix-popper-anchor-width",`${te}px`),ot.setProperty("--radix-popper-anchor-height",`${de}px`)}}),M&&Gd({element:M,padding:p}),rf({arrowWidth:G,arrowHeight:J}),y&&qd({strategy:"referenceHidden",...ue})]}),[kt,kn]=cs(Yt),dt=qe(E);Et(()=>{Ce&&(dt==null||dt())},[Ce,dt]);const rt=(o=Oe.arrow)===null||o===void 0?void 0:o.x,Zt=(i=Oe.arrow)===null||i===void 0?void 0:i.y,V=((a=Oe.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[W,Q]=T();return Et(()=>{C&&Q(window.getComputedStyle(C).zIndex)},[C]),O("div",{ref:We.setFloating,"data-radix-popper-content-wrapper":"",style:{...nt,transform:Ce?nt.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(s=Oe.transformOrigin)===null||s===void 0?void 0:s.x,(l=Oe.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},O(ef,{scope:d,placedSide:kt,onArrowChange:F,arrowX:rt,arrowY:Zt,shouldHideArrow:V},O(et.div,B({"data-side":kt,"data-align":kn},S,{ref:R,style:{...S.style,animation:Ce?void 0:"none",opacity:(u=Oe.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function nf(e){return e!==null}const rf=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,c=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,h=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[g,p]=cs(s),b={start:"0%",center:"50%",end:"100%"}[p],v=((r=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+h/2,m=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+f/2;let w="",y="";return g==="bottom"?(w=c?b:`${v}px`,y=`${-f}px`):g==="top"?(w=c?b:`${v}px`,y=`${l.floating.height+f}px`):g==="right"?(w=`${-f}px`,y=c?b:`${m}px`):g==="left"&&(w=`${l.floating.width+f}px`,y=c?b:`${m}px`),{data:{x:w,y}}}});function cs(e){const[t,n="center"]=e.split("-");return[t,n]}const of=Xd,af=Qd,sf=tf,ls="Popover",[us,Jp]=qr(ls,[is]),to=is(),[cf,Tt]=us(ls),lf=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=to(t),l=P(null),[u,d]=T(!1),[c=!1,h]=Sa({prop:r,defaultProp:o,onChange:i});return O(of,s,O(cf,{scope:t,contentId:dn(),triggerRef:l,open:c,onOpenChange:h,onOpenToggle:K(()=>h(f=>!f),[h]),hasCustomAnchor:u,onCustomAnchorAdd:K(()=>d(!0),[]),onCustomAnchorRemove:K(()=>d(!1),[]),modal:a},n))},uf="PopoverTrigger",df=z((e,t)=>{const{__scopePopover:n,...r}=e,o=Tt(uf,n),i=to(n),a=Se(t,o.triggerRef),s=O(et.button,B({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ps(o.open)},r,{ref:a,onClick:fe(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?s:O(af,B({asChild:!0},i),s)}),ds="PopoverPortal",[ff,pf]=us(ds,{forceMount:void 0}),hf=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=Tt(ds,t);return O(ff,{scope:t,forceMount:n},O(Ot,{present:n||i.open},O(Ta,{asChild:!0,container:o},r)))},Ht="PopoverContent",gf=z((e,t)=>{const n=pf(Ht,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Tt(Ht,e.__scopePopover);return O(Ot,{present:r||i.open},i.modal?O(vf,B({},o,{ref:t})):O(_f,B({},o,{ref:t})))}),vf=z((e,t)=>{const n=Tt(Ht,e.__scopePopover),r=P(null),o=Se(t,r),i=P(!1);return D(()=>{const a=r.current;if(a)return Ha(a)},[]),O(Va,{as:On,allowPinchZoom:!0},O(fs,B({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:fe(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),i.current||(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:fe(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,u=s.button===2||l;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:fe(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})))}),_f=z((e,t)=>{const n=Tt(Ht,e.__scopePopover),r=P(!1),o=P(!1);return O(fs,B({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),fs=z((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...c}=e,h=Tt(Ht,n),f=to(n);return Ra(),O(Aa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},O(Ca,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1)},O(sf,B({"data-state":ps(h.open),role:"dialog",id:h.contentId},f,c,{ref:t,style:{...c.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function ps(e){return e?"open":"closed"}const mf=lf,yf=df,bf=hf,wf=gf,no=$e({base:"block fr font-style-tag font-family-tag font-weight-tag",variants:{variant:{neutralWeak:"text-tag-neutral-weak-copy bg-tag-neutral-weak-bg border-solid border-px border-tag-neutral-weak-stroke",neutralStrong:"text-tag-neutral-strong-copy bg-tag-neutral-strong-bg border-solid border-px border-tag-neutral-strong-stroke",accentStrong:"text-tag-accent-strong-copy bg-tag-accent-strong-bg border-solid border-px border-tag-accent-strong-stroke",monetaryWeak:"text-tag-monetary-weak-copy bg-tag-monetary-weak-bg border-solid border-px border-tag-monetary-weak-stroke"},interactive:{true:"ease-expo-out rounded-interactive transition-all duration-snappy",false:"rounded-tag"},size:{xs:"px-2 py-0.5 text-style-tag",sm:"px-3 py-1.5 text-style-tag",lg:"px-5 py-2.5 text-style-tag",unsized:""},disabled:{true:"opacity-25 pointer-events-none",false:""}},compoundVariants:[{disabled:!1,interactive:!0,class:"cursor-pointer active:scale-[0.975]"}],defaultVariants:{variant:"neutralWeak",size:"sm",disabled:!1,interactive:!1}}),Rn=$e({base:"fr bg-lowest caret-accent-11 selection:bg-accent-4 selection:text-accent-12 placeholder:text-copy-neutral placeholder:opacity-30 ring-width-section ease-expo-out duration-snappy transition-all disabled:opacity-50 rounded-input font-style-input text-style-input font-weight-input",variants:{hasValue:{false:"text-copy-neutral ring-job-card-stroke",true:"text-interactive-accent-text ring-job-card-stroke"},size:{md:"py-2 px-4",unsized:""}},defaultVariants:{size:"md",hasValue:!1}}),hs=$e({base:"flex-1 gutter-stable group/filter flex-col p-2 bg-app flex max-w-full overflow-y-auto items-stretch",variants:{ring:{default:"border-b-px border-neutral-4",unset:""}},defaultVariants:{ring:"default"}}),gs=$e({base:"max-w-full origin-top group/tag ease-expo-out transition-all duration-snappy",variants:{type:{pill:"",line:"[&:not(:last-child)]:border-b-px border-neutral-2 has-[[data-current-value=true]]:border-b-accent-3"}}}),vs=$e({base:"cursor-pointer flex fr gap-2 font-style-tag pointer-fine:group-[&:first-child]/filter:group-[&:first-child]/tag:rounded-t-tag py-2.5 px-2.5 font-family-tag font-weight-tag text-style-tag focus:relative w-full justify-between",variants:{active:{true:"bg-accent-2 text-accent-11",false:"text-neutral-11"},disabled:{true:"opacity-25 pointer-events-none",false:""}},compoundVariants:[{disabled:!1,active:!1,class:"hover:bg-neutral-2"}],defaultVariants:{disabled:!1,active:!1}}),xf=$e({base:"rounded-job-tag inline-block px-1 border-solid border-px ease-expo-out transition-all duration-snappy",variants:{colorScheme:{accentStrong:"text-accent-11 bg-accent-4 border-tag-accent-strong-stroke",neutralStrong:"text-neutral-11 bg-neutral-2 border-tag-neutral-strong-stroke"}}}),Ef=({children:e,colorScheme:t})=>_("span",{class:xf({colorScheme:t}),children:_("span",{class:"block w-[3ch] text-center tabular-nums",children:e})}),$f=(e,t)=>{const n=e.indexOf(t);return n===-1?[...e,t]:e.filter((r,o)=>o!==n)},li=e=>{var n;const t=Number((n=e.match(/\d/g))==null?void 0:n.join(""));return Number.isNaN(t)?0:t},Sf=(e,t={by:"results-count",order:"descending"})=>{const n=[...e];switch(t.by){case"results-count":n.sort((r,o)=>r.jobs-o.jobs);break;case"alphabetically":n.sort((r,o)=>r.label.localeCompare(o.label));break;case"numerically":n.sort((r,o)=>{const i=li(r.value),a=li(o.value);return i-a});break}return t.order==="descending"&&n.reverse(),n},Cf=(e,t)=>{if(e===null)return!1;const n=e[t.value];return n===void 0?!0:n===0},Of=(e,t)=>{const n=r=>r>99?"99+":r.toString();return n(e===null?t.jobs:e[t.value]??0)},Af=({value:e,property:t,useQuery:n,isMobile:r,onValueChange:o,unfilteredQuery:i,onClose:a})=>{const{t:s}=Qe(),l=Fr(n()),u=ee(()=>{switch(l.queryState){case"error":case"idle":case"loading":return null;case"loaded":case"revalidating":{const g=l.data[t.key]??[];return Object.fromEntries(g.map(p=>[p.value,p.jobs]))}default:cn(l)}},[l,t.key]),d=_s(e),c=d.length>0,[h,f]=T();return l.queryState==="error"?_(pr,{error:new Error(s("filters_loading_error"),{cause:l.error}),resetError:()=>l.swr.mutate()}):_("div",{class:"theme-fill:bg-neutral-1 flex min-h-0 w-full flex-1 flex-col",children:[t.searchable&&_("div",{class:"border-b-px border-neutral-4",children:_("input",{type:"search",class:"theme-fill:bg-neutral-2 theme-stroke:bg-neutral-1 theme-fill:focus:bg-neutral-1 theme-stroke:focus:bg-lowest focus:ring-px focus:ring-neutral-6 pointer-fine:theme-soft:rounded-t-lg pointer-fine:theme-rounded:rounded-t-lg caret-accent-11 selection:bg-accent-4 selection:text-accent-12 placeholder:text-copy-neutral ease-expo-out duration-snappy font-style-input text-style-input font-weight-input bg-transparent px-4 py-2.5 outline-none transition-all placeholder:opacity-30 disabled:opacity-50",value:h,onInput:g=>f(g.currentTarget.value),placeholder:s("type_to_search")})}),(()=>{switch(i.queryState){case"error":return _(pr,{error:new Error(s("filters_loading_error"),{cause:i.error}),class:"flex-1",resetError:()=>i.swr.mutate()});case"idle":case"loading":return _("div",{class:"flex px-4",children:_("div",{"aria-hidden":!0,class:no({size:"lg",variant:"neutralStrong",interactive:!0,class:"animate-skeleton flex-1 cursor-default opacity-20 active:-scale-100"}),children:_("span",{class:"inline-block w-[10ch]"})})});case"revalidating":case"loaded":{const g=i.data[t.key]??[],p=h&&h.length>1?g.filter(m=>m.label.toLowerCase().includes(h.toLowerCase())):g,b=[];for(const m of p){if(m.label.length<1)continue;const w={...m,results:Of(u,m),disabled:Cf(u,m)};switch(t.results){case"only-available":w.disabled===!1&&b.push(w);break;default:b.push(w)}}return b.find(m=>!m.disabled)?_("ul",{class:hs(),children:Sf(b,t.sortSuggestions).map(m=>{const w=d.includes(m.value);return _("li",{class:gs({type:"line"}),children:_("button",{type:"button",disabled:m.disabled,"data-filter":!0,"data-current-value":w?"true":void 0,onClick:()=>{switch(e.select){case"many":{const y=$f(d,m.value);o({select:"many",value:y});break}case"one":o({select:"one",value:m.value});break;default:cn(e)}},class:vs({active:w,disabled:m.disabled}),children:[_("span",{class:"max-w-full truncate",children:m.label})," ",_(Ef,{colorScheme:w?"accentStrong":"neutralStrong",children:m.results})]})},m.value)})}):_("p",{class:"font-style-tag text-style-tag font-weight-tag w-full flex-1 px-4 pb-1 pt-4 text-center",children:s("no_filter_options_available")})}default:cn(i)}})(),_("footer",{class:"flex flex-none justify-end p-2",children:[_("div",{class:"flex-1",children:c&&_("button",{type:"button",class:xt({variant:"neutral",icon:"left"}),onClick:()=>{o(void 0)},children:[_(Le,{"aria-hidden":!0,name:"x"})," ",s("clear")]})}),e.select==="many"&&r&&_("div",{class:"flex items-center overflow-hidden",children:_("p",{class:"theme-light:text-neutral-11 theme-dark:text-neutral-12 font-style-default text-style-tag font-weight-default flex-grow select-none truncate text-center",children:[d.length," ",s("selected")]})}),_("div",{class:"flex-1",children:_("button",{type:"button",class:xt({variant:c?"accent":"neutral",class:"ml-auto"}),onClick:a,children:s(c?"done":"close")},c?"done":"close")})]})]})},ui=8,di={contract_type:"clock",title:"magnifier",city:"mapPin",town:"mapPin",country:"mapPin",company_name:"briefcase",category:"briefcase",pay:"pay",pay_currency:"pay",pay_mask:"pay",pay_display:"pay",pay_max:"pay",pay_min:"pay",pay_type:"pay"},fi=$e({base:"theme-fill:fr theme-fill:bg-neutral-2 theme-fill:hover:bg-neutral-3 theme-stroke:fr theme-stroke:hover:fr theme-stroke:ring-px theme-stroke:bg-lowest theme-stroke:ring-neutral-4 theme-stroke:hover:ring-neutral-6 group relative flex cursor-pointer select-none items-center gap-1.5 py-2.5 pl-3.5 pr-3 font-style-filter font-family-filter font-weight-filter text-style-filter duration-snappy outline-none ijs-filter flex-shrink-0 min-w-0 theme-rounded:rounded-md theme-soft:rounded-sm transition-all ease-expo-out active:scale-[0.975] origin-[50%_1.75rem]",variants:{state:{default:"text-copy-neutral-lowcontrast hover:text-copy-neutral",active:"text-copy-neutral"}}}),pi=$e({base:"bg-lowest isolate z-50 flex flex-col overflow-hidden ring-neutral-4 ring-px",variants:{mode:{mobile:"fixed bottom-0 w-full h-[80svh] rounded-t-section animate-slide-out-bottom pb-[env(safe-area-inset-bottom)]",desktop:"min-w-64 max-w-xs max-h-[--radix-popover-content-available-height] rounded-section animate-slideDownFade data-[side=top]:animate-slideUpFade shadow-lg"}}}),_s=e=>typeof e.value=="string"?[e.value]:e.value??[],Pf=({selectedValues:e})=>{const t=e.length;return t===0?null:_("span",{"aria-label":"Current value",class:"animate-appear-tag text-style-job-card-info font-style-tag font-family-tag font-weight-tag text-tag-accent-strong-copy bg-tag-accent-strong-bg min-w-6 min-h-6 absolute -right-1 -top-1 inline-flex items-center justify-center rounded-[999px] px-2 tabular-nums",children:t},t)},Tf=({active:e,value:t,onActiveChange:n,property:r,onValueChange:o,unfilteredQuery:i,useQuery:a,theme:s,widgetId:l})=>{const u=Os(r.key,di)?di[r.key]:void 0,d=r.icon??u??"filter",c=_s(t),h=c.length>0,f=qi("(pointer: coarse)"),g=_(L,{children:[_("div",{class:"flex min-w-0 flex-1 items-center gap-1.5",children:[_(Le,{"aria-hidden":!0,class:"flex-none",name:d}),_("span",{class:"truncate",children:r.label})]}),_(Le,{"aria-hidden":!0,class:"text-neutral-8 flex-shrink-0 rotate-90 transition-transform group-data-[state=open]:-rotate-90",name:"chevron-right"}),_(Pf,{selectedValues:c})]}),p=_(Af,{useQuery:a,onClose:()=>n(!1),onValueChange:o,unfilteredQuery:i,property:r,value:t,isMobile:f});return f?_(qu,{open:e,onOpenChange:n,children:[_(Gu,{"data-filter-key":r.key,"aria-label":r.label,"aria-selected":e?"true":void 0,class:fi({state:e||h?"active":"default"}),onTouchStart:Rf,children:g}),_(Yu,{children:_("div",{class:"inploi-job-search","data-widget-id":l,children:[_(Zu,{class:"animate-fade-in fixed inset-0 z-50 bg-[#0009]"}),_(Xu,{class:pi({mode:"mobile",class:gr(s)}),children:[_("header",{class:"theme-fill:bg-neutral-1 text-neutral-12 border-b-px border-neutral-4 flex cursor-default items-center gap-2 p-4",children:[_(Le,{name:d,class:"flex-none"}),_("p",{class:"font-style-filter font-weight-filter text-style-filter truncate",children:r.label})]}),p]})]})})]}):_(mf,{open:e,onOpenChange:b=>n(b),modal:f,children:[_(yf,{"data-filter-key":r.key,"aria-label":r.label,"aria-selected":e?"true":void 0,class:fi({state:e||h?"active":"default"}),children:g}),_(bf,{children:_("div",{class:"inploi-job-search","data-widget-id":l,children:_(wf,{side:"bottom",sideOffset:ui,align:"center",collisionPadding:ui,class:pi({mode:"desktop",class:gr(s)}),children:p})})})]})};function Rf(){}function kf(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ro=kf,Df=typeof Lt=="object"&&Lt&&Lt.Object===Object&&Lt,Nf=Df,Lf=Nf,If=typeof self=="object"&&self&&self.Object===Object&&self,Mf=Lf||If||Function("return this")(),oo=Mf,Ff=oo,jf=function(){return Ff.Date.now()},Vf=jf,Wf=/\s/;function Hf(e){for(var t=e.length;t--&&Wf.test(e.charAt(t)););return t}var Uf=Hf,Bf=Uf,zf=/^\s+/;function Kf(e){return e&&e.slice(0,Bf(e)+1).replace(zf,"")}var qf=Kf,Gf=oo,Yf=Gf.Symbol,io=Yf,hi=io,ms=Object.prototype,Zf=ms.hasOwnProperty,Xf=ms.toString,Nt=hi?hi.toStringTag:void 0;function Jf(e){var t=Zf.call(e,Nt),n=e[Nt];try{e[Nt]=void 0;var r=!0}catch{}var o=Xf.call(e);return r&&(t?e[Nt]=n:delete e[Nt]),o}var Qf=Jf,ep=Object.prototype,tp=ep.toString;function np(e){return tp.call(e)}var rp=np,gi=io,op=Qf,ip=rp,ap="[object Null]",sp="[object Undefined]",vi=gi?gi.toStringTag:void 0;function cp(e){return e==null?e===void 0?sp:ap:vi&&vi in Object(e)?op(e):ip(e)}var ys=cp;function lp(e){return e!=null&&typeof e=="object"}var up=lp,dp=ys,fp=up,pp="[object Symbol]";function hp(e){return typeof e=="symbol"||fp(e)&&dp(e)==pp}var bs=hp,gp=qf,_i=ro,vp=bs,mi=0/0,_p=/^[-+]0x[0-9a-f]+$/i,mp=/^0b[01]+$/i,yp=/^0o[0-7]+$/i,bp=parseInt;function wp(e){if(typeof e=="number")return e;if(vp(e))return mi;if(_i(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=_i(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=gp(e);var n=mp.test(e);return n||yp.test(e)?bp(e.slice(2),n?2:8):_p.test(e)?mi:+e}var xp=wp,Ep=ro,ar=Vf,yi=xp,$p="Expected a function",Sp=Math.max,Cp=Math.min;function Op(e,t,n){var r,o,i,a,s,l,u=0,d=!1,c=!1,h=!0;if(typeof e!="function")throw new TypeError($p);t=yi(t)||0,Ep(n)&&(d=!!n.leading,c="maxWait"in n,i=c?Sp(yi(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function f(E){var S=r,$=o;return r=o=void 0,u=E,a=e.apply($,S),a}function g(E){return u=E,s=setTimeout(v,t),d?f(E):a}function p(E){var S=E-l,$=E-u,C=t-S;return c?Cp(C,i-$):C}function b(E){var S=E-l,$=E-u;return l===void 0||S>=t||S<0||c&&$>=i}function v(){var E=ar();if(b(E))return m(E);s=setTimeout(v,p(E))}function m(E){return s=void 0,h&&r?f(E):(r=o=void 0,a)}function w(){s!==void 0&&clearTimeout(s),u=0,r=l=o=s=void 0}function y(){return s===void 0?a:m(ar())}function x(){var E=ar(),S=b(E);if(r=arguments,o=this,l=E,S){if(s===void 0)return g(l);if(c)return clearTimeout(s),s=setTimeout(v,t),f(l)}return s===void 0&&(s=setTimeout(v,t)),a}return x.cancel=w,x.flush=y,x}var Ap=Op;const Pp=ha(Ap),Tp=(e,t)=>{const n=structuredClone(e);return n.forEach(r=>{if(t.has(r.key)){const o=t.get(r.key);if(!o)return;r.defaultValue=o.includes(",")?o.split(","):o}}),n},Rp=e=>{const t=e.get("lat"),n=e.get("lng"),r=e.get("radius");return{type:"provided",coords:t&&n?{lat:Number(t),lng:Number(n)}:void 0,radius:r?Number(r):Tr(xs)}},ws=(e,t=1e3)=>{const[n,r]=T(e),o=ee(()=>Pp(i=>r(i),t),[t]);return D(()=>{o(e)},[e,o]),n},kp=z(({disabled:e,error:t,name:n,inputPlaceholder:r,items:o,onItemSelect:i,onQueryChange:a,onBlur:s,onFocus:l,inputProps:u,menuProps:d,query:c},h)=>{const[f,g]=T(!1),[p,b]=T(),{t:v}=Qe(),m=P();D(()=>{var y;b((y=o[0])==null?void 0:y.id)},[o]);const w=y=>{i(y),g(!1)};return _("div",{class:"relative h-full",children:[_("input",{name:n,ref:h,disabled:e,"data-active":f?"true":void 0,"aria-controls":`ijs-${n}-menu`,placeholder:r,class:Rn({size:"md"}),onFocus:()=>{l==null||l(),g(!0)},onBlur:()=>{m.current=window.setTimeout(()=>{s==null||s(),g(!1)},100)},value:c,onChange:y=>a(y.currentTarget.value),onKeyDown:y=>{switch(g(!0),y.key){case"ArrowDown":case"ArrowUp":{const x=y.key==="ArrowDown"?1:-1;y.preventDefault();const E=o.findIndex($=>$.id===p);if(E===-1)return;const S=o[E+x]??o[y.key==="ArrowDown"?0:o.length-1];if(!S)return;b(S.id);break}case"Enter":{if(y.preventDefault(),!p)return;i(p)}}},...u}),!t&&f&&!e&&o.length>0?_("ul",{className:hs({ring:"unset",className:"ring-width-section rounded-input ring-job-card-stroke absolute left-0 right-0 top-12 z-50 w-full shadow-sm"}),id:`ijs-${n}-menu`,onMouseDown:()=>{m.current&&clearTimeout(m.current)},...d,children:t?_("div",{role:"alert",children:v("geo_suggestions_error")}):o.map(y=>_("li",{class:gs({type:"line",className:"group/tag"}),children:_("button",{type:"button",onMouseEnter:()=>b(y.id),class:vs({active:y.id===p,className:"line-clamp-1 overflow-hidden truncate"}),onClick:()=>w(y.id),onKeyDown:x=>{x.key==="Enter"&&w(y.id)},children:y.label})},y.id))}):null]})}),Dp=(e={})=>new Promise((t,n)=>{var r,o;if((r=e.signal)!=null&&r.aborted){n(new DOMException("Aborted","AbortError"));return}navigator.geolocation.getCurrentPosition(i=>t(i.coords),i=>n(i),e),(o=e.signal)==null||o.addEventListener("abort",()=>{n(new DOMException("Aborted","AbortError"))},{once:!0})}),Np={1:"geo_error_permission_denied",2:"geo_error_position_unavailable",3:"geo_error_timeout"},bi=typeof window<"u"&&"geolocation"in navigator&&window.isSecureContext,Lp=({onLocate:e,onError:t,signal:n})=>{const[r,o]=T("idle"),[i,a]=T(null),{t:s}=Qe(),l=u=>{o("idle"),a(u),e(u)};return _("button",{"aria-label":s(r==="loading"?"geo_locating":"geo_my_location"),type:"button",onClick:()=>{if(bi){if(o("loading"),i)return l(i);Dp({signal:n}).then(u=>{const d={lat:u.latitude,lng:u.longitude};l(d)}).catch(u=>{if(u instanceof DOMException&&u.name==="AbortError")return o("idle");o("error");const d=Np[u.code];if(!d)return;const c=s(d);t(c)})}},"data-state":r,class:xt({variant:"accent",size:"lg",icon:"only",className:"data-[state=loading]:animate-pulse"}),disabled:!bi||r==="error",children:_(Le,{name:"target-location"})})},Ip="https://api.mapbox.com/search/geocode/v6/forward",Mp="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Fp=e=>atob(e).split("").reverse().join(""),jp=ce({features:$n(De(ce({properties:ce({mapbox_id:j(),place_formatted:Te(j()),name_preferred:Te(j(),"Untitled location"),coordinates:De(ce({latitude:be(),longitude:be()}),({latitude:e,longitude:t})=>({lat:e,lng:t}))})}),e=>e.properties))}),Vp=(e,t)=>Array.from(new Map(e.map(n=>[typeof t=="function"?t(n):n[t],n])).values()),Wp=async e=>{if(!e)return[];const t=new URL(Ip);t.searchParams.set("q",e),t.searchParams.set("proximity","ip"),t.searchParams.set("access_token",Fp(Mp));const n=await fetch(t);if(!n.ok)throw new Error("Failed to get address details");const r=Ir(jp,await n.json());if(r.success===!1)throw console.error(r.issues),new Error("Invalid data");const{features:o}=r.output;return Vp(o,i=>i.name_preferred+i.place_formatted)},Hp=({onSelect:e,onValueChange:t,coords:n,radius:r,onError:o})=>{const{t:i}=Qe(),[a,s]=T(""),[l,u]=T(),d=ws(a,500),[c,h]=T(new AbortController),f=Ea(d,Wp,{keepPreviousData:!1,revalidateIfStale:!1,revalidateOnFocus:!1}),{data:g,queryState:p,error:b}=Fr(f),[v,m]=T("view"),w=P(null);return D(()=>{if(v==="edit"){if(!w.current)return;w.current.focus()}},[v]),_("div",{class:"relative flex-1",children:[v==="view"&&n?_("button",{"aria-label":i("geo_search_placeholder"),type:"button",class:Rn({size:"unsized",className:"flex h-10 w-full cursor-text items-stretch px-1 py-1"}),onClick:()=>{m("edit")},children:_("div",{class:no({size:"sm",variant:"accentStrong",interactive:!0,class:"truncate"}),children:l??i("location_provided")})}):_(kp,{ref:w,error:b,query:a,name:"location-search",onQueryChange:s,onFocus:()=>{c.abort(),h(new AbortController)},onBlur:()=>{m("view"),s("")},onItemSelect:y=>{if(p!=="loaded")return;const x=g.find(E=>E.mapbox_id===y);x&&(e(x.coordinates),m("view"),u(x.name_preferred))},inputPlaceholder:i("geo_search_placeholder"),items:(g==null?void 0:g.map(y=>({id:y.mapbox_id,label:_("div",{class:"flex min-w-0 max-w-full gap-2 overflow-hidden",children:[_("strong",{class:"truncate",children:y.name_preferred})," ",_("span",{class:"flex-1 truncate opacity-50",children:y.place_formatted})]})})))??[]}),_("div",{class:"absolute bottom-0 right-0 top-0 flex items-center",children:!a&&!n?_(Lp,{onLocate:y=>{m("view"),u(i("geo_my_location")),t({type:"provided",coords:y,radius:r})},onError:o,signal:c.signal}):_("button",{type:"button","aria-label":i("geo_clear_search"),onClick:()=>{s(""),u(void 0),t({radius:r,type:"provided"}),m("edit"),w.current&&(w.current.value="",w.current.focus())},class:xt({variant:"neutral",size:"lg",icon:"only"}),children:_(Le,{name:"x"})})})]})},Up=[.25,.5,1,3,5,10,15,20,30,40],xs=20,Tr=e=>e*1609.34,Bp=new Intl.NumberFormat(void 0,{style:"unit",unit:"mile",unitDisplay:"long",maximumFractionDigits:1,trailingZeroDisplay:"stripIfInteger"}),zp=De(ce({type:Pe("provided"),lat:Te(De(j(),e=>Number(e))),lng:Te(De(j(),e=>Number(e))),radius:De(j(),e=>Number(e))}),e=>({radius:e.radius,type:e.type,coords:e.lat&&e.lng?{lat:e.lat,lng:e.lng}:void 0})),Kp=({value:e,onValueChange:t,logger:n})=>{const{t:r}=Qe(),o=Vr(),i=(e==null?void 0:e.type)==="provided"?e.radius:Tr(xs),[a,s]=T();return _("div",{class:"flex flex-col gap-2",children:[_("form",{onChange:l=>{const u=new FormData(l.currentTarget),d=Ir(zp,Object.fromEntries(u.entries()));if(!d.success){n.error(d.issues),s(d.issues[0].message);return}t(d.output)},class:"flex flex-col gap-2 md:flex-row",children:[_("input",{type:"hidden",name:"type",value:"provided"}),(e==null?void 0:e.type)==="provided"&&e.coords?_(L,{children:[_("input",{type:"hidden",name:"lat",value:e.coords.lat}),_("input",{type:"hidden",name:"lng",value:e.coords.lng})]}):null,_(Hp,{coords:(e==null?void 0:e.type)==="provided"?e.coords:void 0,radius:i,onValueChange:t,onSelect:l=>{s(void 0),t({type:"provided",radius:i,coords:l})},onError:s}),_("div",{class:"relative",children:[_("label",{class:"sr-only",for:o,children:r("geo_range_label")}),_("select",{id:o,name:"radius",class:Rn({size:"unsized",className:"w-full appearance-none truncate py-2 pl-3 pr-10"}),value:i,onChange:l=>{s(void 0),t({type:"provided",coords:(e==null?void 0:e.type)==="provided"?e.coords:void 0,radius:Number(l.currentTarget.value)})},children:Up.map(l=>_("option",{value:Tr(l),class:"truncate",children:Bp.format(l)},l))}),_("div",{class:"text-copy-neutral-lowcontrast pointer-events-none absolute bottom-0 right-0 top-0 flex w-10 items-center justify-center",children:_(Le,{name:"chevron-right",class:"h-6 w-6 rotate-90"})})]})]}),a?_("div",{role:"alert",class:"text-pretty text-copy-neutral font-style-tag font-weight-tag text-style-tag flex gap-1",children:[_(Le,{name:"warning",class:"animate-appear-tag size-[1lh] flex-none"}),a]}):null]})};exports.D=_t;exports.D$1=bt;exports.E=Dr;exports.ErrorBoundary=xc;exports.ErrorView=pr;exports.F=ee;exports.Filter=Tf;exports.GeoSearch=Kp;exports.Icon=Le;exports.IconSpritesheet=$c;exports.JOB_SEARCH_WIDGET_ID=ec;exports.M=Hr;exports.PAGE_SIZE=ji;exports.SWR_SETTINGS=dc;exports.T=K;exports.TranslationProvider=mc;exports.UnstyledErrorView=wc;exports._=P;exports._Symbol=io;exports._baseGetTag=ys;exports._root=oo;exports.btnClass=xt;exports.clsx=Hi;exports.commonjsGlobal=Lt;exports.createTFunction=yc;exports.cva=$e;exports.exhaustive=cn;exports.generateColorThemeCss=Nc;exports.getAvailableFilters=sc;exports.getDefaultExportFromCjs=ha;exports.getGeolocationFromSearchParams=Rp;exports.getJobSearchMapResults=uc;exports.getJobSearchResults=cc;exports.getQueryState=Fr;exports.getStatefulPropertiesFromSearchParams=Tp;exports.getThemeVariants=gr;exports.h=T;exports.inputClass=Rn;exports.invariant=Cs;exports.isObject_1=ro;exports.isSymbol_1=bs;exports.k=L;exports.o=_;exports.p=D;exports.tagClass=no;exports.useDebouncedValue=ws;exports.useMediaQuery=qi;exports.useSWR=Ea;exports.useTranslation=Qe;exports.useViewTracking=Sc;exports.y=O;
|
package/dist/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils-8c0de991.cjs");exports.getGeolocationFromSearchParams=e.getGeolocationFromSearchParams;exports.getStatefulPropertiesFromSearchParams=e.getStatefulPropertiesFromSearchParams;
|
package/dist/utils.js
CHANGED