@inploi/plugin-job-search 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{map-9c517e65.js → map-11ff91b0.js} +1 -1
- package/dist/{map-65730508.cjs → map-8c923ca7.cjs} +1 -1
- package/dist/{utils-7ca39932.js → utils-1d2f30cf.js} +2 -2
- package/dist/{utils-0070abd5.cjs → utils-726d5029.cjs} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/package.json +3 -3
|
@@ -6708,7 +6708,7 @@ const ih = /* @__PURE__ */ Ya(oh), no = "|", ah = (e, t) => {
|
|
|
6708
6708
|
break;
|
|
6709
6709
|
}
|
|
6710
6710
|
case "many":
|
|
6711
|
-
o.includes(no) ? r.defaultValue = o.split(no) :
|
|
6711
|
+
o.includes(no) ? r.defaultValue = o.split(no) : r.defaultValue = o;
|
|
6712
6712
|
}
|
|
6713
6713
|
}
|
|
6714
6714
|
}), n;
|
|
@@ -7946,7 +7946,7 @@ const Pm = /* @__PURE__ */ Ya(km), zt = ({ chars: e }) => /* @__PURE__ */ u(
|
|
|
7946
7946
|
default:
|
|
7947
7947
|
wt(y);
|
|
7948
7948
|
}
|
|
7949
|
-
}, jm = po(() => import("./map-
|
|
7949
|
+
}, jm = po(() => import("./map-11ff91b0.js").then((e) => e.Map)), Fm = ({
|
|
7950
7950
|
state: e,
|
|
7951
7951
|
apiClient: t,
|
|
7952
7952
|
logger: n,
|
|
@@ -57,4 +57,4 @@ ${n.concat(n).join(`
|
|
|
57
57
|
`)},xi=function(){var e=parseInt(document.body.getAttribute($t)||"0",10);return isFinite(e)?e:0},td=function(){I(function(){return document.body.setAttribute($t,(xi()+1).toString()),function(){var e=xi()-1;e<=0?document.body.removeAttribute($t):document.body.setAttribute($t,e.toString())}},[])},nd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;td();var i=ee(function(){return Xu(o)},[o]);return O(Qu,{styles:ed(i,!t,o,n?"":"!important")})},Zr=!1;if(typeof window<"u")try{var vn=Object.defineProperty({},"passive",{get:function(){return Zr=!0,!0}});window.addEventListener("test",vn,vn),window.removeEventListener("test",vn,vn)}catch{Zr=!1}var vt=Zr?{passive:!1}:!1,rd=function(e){return e.tagName==="TEXTAREA"},ms=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!rd(e)&&n[t]==="visible")},od=function(e){return ms(e,"overflowY")},id=function(e){return ms(e,"overflowX")},$i=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=_s(e,n);if(r){var o=ys(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},ad=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},sd=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},_s=function(e,t){return e==="v"?od(t):id(t)},ys=function(e,t){return e==="v"?ad(t):sd(t)},cd=function(e,t){return e==="h"&&t==="rtl"?-1:1},ld=function(e,t,n,r,o){var i=cd(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),d=!1,f=a>0,c=0,p=0;do{var h=ys(e,s),v=h[0],g=h[1],y=h[2],m=g-y-i*v;(v||m)&&_s(e,s)&&(c+=m,p+=v),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&(o&&c===0||!o&&a>c)||!f&&(o&&p===0||!o&&-a>p))&&(d=!0),d},mn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ei=function(e){return[e.deltaX,e.deltaY]},Ci=function(e){return e&&"current"in e?e.current:e},ud=function(e,t){return e[0]===t[0]&&e[1]===t[1]},dd=function(e){return`
|
|
58
58
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
59
59
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
60
|
-
`)},fd=0,mt=[];function pd(e){var t=D([]),n=D([0,0]),r=D(),o=P(fd++)[0],i=P(function(){return vs()})[0],a=D(e);I(function(){a.current=e},[e]),I(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=Nu([e.lockRef.current],(e.shards||[]).map(Ci),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=j(function(g,y){if("touches"in g&&g.touches.length===2)return!a.current.allowPinchZoom;var m=mn(g),_=n.current,w="deltaX"in g?g.deltaX:_[0]-m[0],b="deltaY"in g?g.deltaY:_[1]-m[1],x,$=g.target,C=Math.abs(w)>Math.abs(b)?"h":"v";if("touches"in g&&C==="h"&&$.type==="range")return!1;var E=$i(C,$);if(!E)return!0;if(E?x=C:(x=C==="v"?"h":"v",E=$i(C,$)),!E)return!1;if(!r.current&&"changedTouches"in g&&(w||b)&&(r.current=x),!x)return!0;var S=r.current||x;return ld(S,y,g,S==="h"?w:b,!0)},[]),l=j(function(g){var y=g;if(!(!mt.length||mt[mt.length-1]!==i)){var m="deltaY"in y?Ei(y):mn(y),_=t.current.filter(function(x){return x.name===y.type&&x.target===y.target&&ud(x.delta,m)})[0];if(_&&_.should){y.cancelable&&y.preventDefault();return}if(!_){var w=(a.current.shards||[]).map(Ci).filter(Boolean).filter(function(x){return x.contains(y.target)}),b=w.length>0?s(y,w[0]):!a.current.noIsolation;b&&y.cancelable&&y.preventDefault()}}},[]),d=j(function(g,y,m,_){var w={name:g,delta:y,target:m,should:_};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(b){return b!==w})},1)},[]),f=j(function(g){n.current=mn(g),r.current=void 0},[]),c=j(function(g){d(g.type,Ei(g),g.target,s(g,e.lockRef.current))},[]),p=j(function(g){d(g.type,mn(g),g.target,s(g,e.lockRef.current))},[]);I(function(){return mt.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,vt),document.addEventListener("touchmove",l,vt),document.addEventListener("touchstart",f,vt),function(){mt=mt.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,vt),document.removeEventListener("touchmove",l,vt),document.removeEventListener("touchstart",f,vt)}},[]);var h=e.removeScrollBar,v=e.inert;return O(L,null,v?O(i,{styles:dd(o)}):null,h?O(nd,{gapMode:"margin"}):null)}const hd=Wu(gs,pd);var bs=q(function(e,t){return O(Bn,xe({},e,{ref:t,sideCar:hd}))});bs.classNames=Bn.classNames;const ws=bs;var gd=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_t=new WeakMap,_n=new WeakMap,yn={},Sr=0,xs=function(e){return e&&(e.host||xs(e.parentNode))},vd=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=xs(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})},md=function(e,t,n,r){var o=vd(t,Array.isArray(e)?e:[e]);yn[n]||(yn[n]=new WeakMap);var i=yn[n],a=[],s=new Set,l=new Set(o),d=function(c){!c||s.has(c)||(s.add(c),d(c.parentNode))};o.forEach(d);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(s.has(p))f(p);else try{var h=p.getAttribute(r),v=h!==null&&h!=="false",g=(_t.get(p)||0)+1,y=(i.get(p)||0)+1;_t.set(p,g),i.set(p,y),a.push(p),g===1&&v&&_n.set(p,!0),y===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",p,m)}})};return f(t),s.clear(),Sr++,function(){a.forEach(function(c){var p=_t.get(c)-1,h=i.get(c)-1;_t.set(c,p),i.set(c,h),p||(_n.has(c)||c.removeAttribute(r),_n.delete(c)),h||c.removeAttribute(n)}),Sr--,Sr||(_t=new WeakMap,_t=new WeakMap,_n=new WeakMap,yn={})}},$s=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||gd(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),md(r,o,n,"aria-hidden")):function(){return null}};const Es="Dialog",[Cs,t_]=yo(Es),[_d,rt]=Cs(Es),yd=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=D(null),l=D(null),[d=!1,f]=as({prop:r,defaultProp:o,onChange:i});return O(_d,{scope:t,triggerRef:s,contentRef:l,contentId:$n(),titleId:$n(),descriptionId:$n(),open:d,onOpenChange:f,onOpenToggle:j(()=>f(c=>!c),[f]),modal:a},n)},bd="DialogTrigger",wd=q((e,t)=>{const{__scopeDialog:n,...r}=e,o=rt(bd,n),i=Oe(t,o.triggerRef);return O(nt.button,B({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":bo(o.open)},r,{ref:i,onClick:ge(e.onClick,o.onOpenToggle)}))}),Ss="DialogPortal",[xd,Os]=Cs(Ss,{forceMount:void 0}),$d=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=rt(Ss,t);return O(xd,{scope:t,forceMount:n},Ce.map(r,a=>O(Rt,{present:n||i.open},O(ds,{asChild:!0,container:o},a))))},Jr="DialogOverlay",Ed=q((e,t)=>{const n=Os(Jr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=rt(Jr,e.__scopeDialog);return i.modal?O(Rt,{present:r||i.open},O(Cd,B({},o,{ref:t}))):null}),Cd=q((e,t)=>{const{__scopeDialog:n,...r}=e,o=rt(Jr,n);return O(ws,{as:zn,allowPinchZoom:!0,shards:[o.contentRef]},O(nt.div,B({"data-state":bo(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Zt="DialogContent",Sd=q((e,t)=>{const n=Os(Zt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=rt(Zt,e.__scopeDialog);return O(Rt,{present:r||i.open},i.modal?O(Od,B({},o,{ref:t})):O(Ad,B({},o,{ref:t})))}),Od=q((e,t)=>{const n=rt(Zt,e.__scopeDialog),r=D(null),o=Oe(t,n.contentRef,r);return I(()=>{const i=r.current;if(i)return $s(i)},[]),O(As,B({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ge(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:ge(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:ge(e.onFocusOutside,i=>i.preventDefault())}))}),Ad=q((e,t)=>{const n=rt(Zt,e.__scopeDialog),r=D(!1),o=D(!1);return O(As,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()}}))}),As=q((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=rt(Zt,n),l=D(null),d=Oe(t,l);return fs(),O(L,null,O(ls,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},O(ss,B({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":bo(s.open)},a,{ref:d,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function bo(e){return e?"open":"closed"}const Td=yd,kd=wd,Pd=$d,Rd=Ed,Dd=Sd,Nd=["top","right","bottom","left"],Ee=Math.min,se=Math.max,Dn=Math.round,bn=Math.floor,Je=e=>({x:e,y:e}),Id={left:"right",right:"left",bottom:"top",top:"bottom"},Ld={start:"end",end:"start"};function Xr(e,t,n){return se(e,Ee(t,n))}function Ve(e,t){return typeof e=="function"?e(t):e}function He(e){return e.split("-")[0]}function Dt(e){return e.split("-")[1]}function wo(e){return e==="x"?"y":"x"}function xo(e){return e==="y"?"height":"width"}function Xe(e){return["top","bottom"].includes(He(e))?"y":"x"}function $o(e){return wo(Xe(e))}function Md(e,t,n){n===void 0&&(n=!1);const r=Dt(e),o=$o(e),i=xo(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Nn(a)),[a,Nn(a)]}function Fd(e){const t=Nn(e);return[Qr(e),t,Qr(t)]}function Qr(e){return e.replace(/start|end/g,t=>Ld[t])}function jd(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 Vd(e,t,n,r){const o=Dt(e);let i=jd(He(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Qr)))),i}function Nn(e){return e.replace(/left|right|bottom|top/g,t=>Id[t])}function Hd(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ts(e){return typeof e!="number"?Hd(e):{top:e,right:e,bottom:e,left:e}}function In(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 Si(e,t,n){let{reference:r,floating:o}=e;const i=Xe(t),a=$o(t),s=xo(a),l=He(t),d=i==="y",f=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(l){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:c};break;case"left":h={x:r.x-o.width,y:c};break;default:h={x:r.x,y:r.y}}switch(Dt(t)){case"start":h[a]-=p*(n&&d?-1:1);break;case"end":h[a]+=p*(n&&d?-1:1);break}return h}const Ud=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 d=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:c}=Si(d,r,l),p=r,h={},v=0;for(let g=0;g<s.length;g++){const{name:y,fn:m}=s[g],{x:_,y:w,data:b,reset:x}=await m({x:f,y:c,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:d,platform:a,elements:{reference:e,floating:t}});f=_??f,c=w??c,h={...h,[y]:{...h[y],...b}},x&&v<=50&&(v++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(d=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:f,y:c}=Si(d,p,l)),g=-1)}return{x:f,y:c,placement:p,strategy:o,middlewareData:h}};async function Jt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:p=!1,padding:h=0}=Ve(t,e),v=Ts(h),y=s[p?c==="floating"?"reference":"floating":c],m=In(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:d,rootBoundary:f,strategy:l})),_=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)),b=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=In(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:w,strategy:l}):_);return{top:(m.top-x.top+v.top)/b.y,bottom:(x.bottom-m.bottom+v.bottom)/b.y,left:(m.left-x.left+v.left)/b.x,right:(x.right-m.right+v.right)/b.x}}const Wd=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:d,padding:f=0}=Ve(e,t)||{};if(d==null)return{};const c=Ts(f),p={x:n,y:r},h=$o(o),v=xo(h),g=await a.getDimensions(d),y=h==="y",m=y?"top":"left",_=y?"bottom":"right",w=y?"clientHeight":"clientWidth",b=i.reference[v]+i.reference[h]-p[h]-i.floating[v],x=p[h]-i.reference[h],$=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let C=$?$[w]:0;(!C||!await(a.isElement==null?void 0:a.isElement($)))&&(C=s.floating[w]||i.floating[v]);const E=b/2-x/2,S=C/2-g[v]/2-1,A=Ee(c[m],S),T=Ee(c[_],S),k=A,R=C-g[v]-T,N=C/2-g[v]/2+E,K=Xr(k,N,R),Y=!l.arrow&&Dt(o)!=null&&N!==K&&i.reference[v]/2-(N<k?A:T)-g[v]/2<0,F=Y?N<k?N-k:N-R:0;return{[h]:p[h]+F,data:{[h]:K,centerOffset:N-K-F,...Y&&{alignmentOffset:F}},reset:Y}}}),zd=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:d}=t,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...y}=Ve(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const m=He(o),_=Xe(s),w=He(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(d.floating)),x=p||(w||!g?[Nn(s)]:Fd(s)),$=v!=="none";!p&&$&&x.push(...Vd(s,g,v,b));const C=[s,...x],E=await Jt(t,y),S=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&S.push(E[m]),c){const N=Md(o,a,b);S.push(E[N[0]],E[N[1]])}if(A=[...A,{placement:o,overflows:S}],!S.every(N=>N<=0)){var T,k;const N=(((T=i.flip)==null?void 0:T.index)||0)+1,K=C[N];if(K)return{data:{index:N,overflows:A},reset:{placement:K}};let Y=(k=A.filter(F=>F.overflows[0]<=0).sort((F,G)=>F.overflows[1]-G.overflows[1])[0])==null?void 0:k.placement;if(!Y)switch(h){case"bestFit":{var R;const F=(R=A.filter(G=>{if($){const Z=Xe(G.placement);return Z===_||Z==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(Z=>Z>0).reduce((Z,jt)=>Z+jt,0)]).sort((G,Z)=>G[1]-Z[1])[0])==null?void 0:R[0];F&&(Y=F);break}case"initialPlacement":Y=s;break}if(o!==Y)return{reset:{placement:Y}}}return{}}}};function Oi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ai(e){return Nd.some(t=>e[t]>=0)}const Bd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ve(e,t);switch(r){case"referenceHidden":{const i=await Jt(t,{...o,elementContext:"reference"}),a=Oi(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Ai(a)}}}case"escaped":{const i=await Jt(t,{...o,altBoundary:!0}),a=Oi(i,n.floating);return{data:{escapedOffsets:a,escaped:Ai(a)}}}default:return{}}}}};async function qd(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=He(n),s=Dt(n),l=Xe(n)==="y",d=["left","top"].includes(a)?-1:1,f=i&&l?-1:1,c=Ve(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:v}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...c};return s&&typeof v=="number"&&(h=s==="end"?v*-1:v),l?{x:h*f,y:p*d}:{x:p*d,y:h*f}}const Kd=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 qd(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}}}}},Gd=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:y=>{let{x:m,y:_}=y;return{x:m,y:_}}},...l}=Ve(e,t),d={x:n,y:r},f=await Jt(t,l),c=Xe(He(o)),p=wo(c);let h=d[p],v=d[c];if(i){const y=p==="y"?"top":"left",m=p==="y"?"bottom":"right",_=h+f[y],w=h-f[m];h=Xr(_,h,w)}if(a){const y=c==="y"?"top":"left",m=c==="y"?"bottom":"right",_=v+f[y],w=v-f[m];v=Xr(_,v,w)}const g=s.fn({...t,[p]:h,[c]:v});return{...g,data:{x:g.x-n,y:g.y-r}}}}},Yd=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:d=!0}=Ve(e,t),f={x:n,y:r},c=Xe(o),p=wo(c);let h=f[p],v=f[c];const g=Ve(s,t),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const w=p==="y"?"height":"width",b=i.reference[p]-i.floating[w]+y.mainAxis,x=i.reference[p]+i.reference[w]-y.mainAxis;h<b?h=b:h>x&&(h=x)}if(d){var m,_;const w=p==="y"?"width":"height",b=["top","left"].includes(He(o)),x=i.reference[c]-i.floating[w]+(b&&((m=a.offset)==null?void 0:m[c])||0)+(b?0:y.crossAxis),$=i.reference[c]+i.reference[w]+(b?0:((_=a.offset)==null?void 0:_[c])||0)-(b?y.crossAxis:0);v<x?v=x:v>$&&(v=$)}return{[p]:h,[c]:v}}}},Zd=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}=Ve(e,t),l=await Jt(t,s),d=He(n),f=Dt(n),c=Xe(n)==="y",{width:p,height:h}=r.floating;let v,g;d==="top"||d==="bottom"?(v=d,g=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=d,v=f==="end"?"top":"bottom");const y=h-l.top-l.bottom,m=p-l.left-l.right,_=Ee(h-l[v],y),w=Ee(p-l[g],m),b=!t.middlewareData.shift;let x=_,$=w;if(c?$=f||b?Ee(w,m):m:x=f||b?Ee(_,y):y,b&&!f){const E=se(l.left,0),S=se(l.right,0),A=se(l.top,0),T=se(l.bottom,0);c?$=p-2*(E!==0||S!==0?E+S:se(l.left,l.right)):x=h-2*(A!==0||T!==0?A+T:se(l.top,l.bottom))}await a({...t,availableWidth:$,availableHeight:x});const C=await o.getDimensions(i.floating);return p!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function Nt(e){return ks(e)?(e.nodeName||"").toLowerCase():"#document"}function ce(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function We(e){var t;return(t=(ks(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ks(e){return e instanceof Node||e instanceof ce(e).Node}function ve(e){return e instanceof Element||e instanceof ce(e).Element}function Se(e){return e instanceof HTMLElement||e instanceof ce(e).HTMLElement}function Ti(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ce(e).ShadowRoot}function sn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=me(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Jd(e){return["table","td","th"].includes(Nt(e))}function qn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Eo(e){const t=Co(),n=ve(e)?me(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 Xd(e){let t=Qe(e);for(;Se(t)&&!Tt(t);){if(Eo(t))return t;if(qn(t))return null;t=Qe(t)}return null}function Co(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Tt(e){return["html","body","#document"].includes(Nt(e))}function me(e){return ce(e).getComputedStyle(e)}function Kn(e){return ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qe(e){if(Nt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ti(e)&&e.host||We(e);return Ti(t)?t.host:t}function Ps(e){const t=Qe(e);return Tt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Se(t)&&sn(t)?t:Ps(t)}function Xt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ps(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=ce(o);if(i){const s=eo(a);return t.concat(a,a.visualViewport||[],sn(o)?o:[],s&&n?Xt(s):[])}return t.concat(o,Xt(o,[],n))}function eo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Rs(e){const t=me(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Se(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Dn(n)!==i||Dn(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function So(e){return ve(e)?e:e.contextElement}function Et(e){const t=So(e);if(!Se(t))return Je(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Rs(t);let a=(i?Dn(n.width):n.width)/r,s=(i?Dn(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Qd=Je(0);function Ds(e){const t=ce(e);return!Co()||!t.visualViewport?Qd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ef(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ce(e)?!1:t}function pt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=So(e);let a=Je(1);t&&(r?ve(r)&&(a=Et(r)):a=Et(e));const s=ef(i,n,r)?Ds(i):Je(0);let l=(o.left+s.x)/a.x,d=(o.top+s.y)/a.y,f=o.width/a.x,c=o.height/a.y;if(i){const p=ce(i),h=r&&ve(r)?ce(r):r;let v=p,g=eo(v);for(;g&&r&&h!==v;){const y=Et(g),m=g.getBoundingClientRect(),_=me(g),w=m.left+(g.clientLeft+parseFloat(_.paddingLeft))*y.x,b=m.top+(g.clientTop+parseFloat(_.paddingTop))*y.y;l*=y.x,d*=y.y,f*=y.x,c*=y.y,l+=w,d+=b,v=ce(g),g=eo(v)}}return In({width:f,height:c,x:l,y:d})}function tf(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=We(r),s=t?qn(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},d=Je(1);const f=Je(0),c=Se(r);if((c||!c&&!i)&&((Nt(r)!=="body"||sn(a))&&(l=Kn(r)),Se(r))){const p=pt(r);d=Et(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+f.x,y:n.y*d.y-l.scrollTop*d.y+f.y}}function nf(e){return Array.from(e.getClientRects())}function Ns(e){return pt(We(e)).left+Kn(e).scrollLeft}function rf(e){const t=We(e),n=Kn(e),r=e.ownerDocument.body,o=se(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=se(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ns(e);const s=-n.scrollTop;return me(r).direction==="rtl"&&(a+=se(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function of(e,t){const n=ce(e),r=We(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const d=Co();(!d||d&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function af(e,t){const n=pt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Se(e)?Et(e):Je(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,d=r*i.y;return{width:a,height:s,x:l,y:d}}function ki(e,t,n){let r;if(t==="viewport")r=of(e,n);else if(t==="document")r=rf(We(e));else if(ve(t))r=af(t,n);else{const o=Ds(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return In(r)}function Is(e,t){const n=Qe(e);return n===t||!ve(n)||Tt(n)?!1:me(n).position==="fixed"||Is(n,t)}function sf(e,t){const n=t.get(e);if(n)return n;let r=Xt(e,[],!1).filter(s=>ve(s)&&Nt(s)!=="body"),o=null;const i=me(e).position==="fixed";let a=i?Qe(e):e;for(;ve(a)&&!Tt(a);){const s=me(a),l=Eo(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||sn(a)&&!l&&Is(e,a))?r=r.filter(f=>f!==a):o=s,a=Qe(a)}return t.set(e,r),r}function cf(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?qn(t)?[]:sf(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((d,f)=>{const c=ki(t,f,o);return d.top=se(c.top,d.top),d.right=Ee(c.right,d.right),d.bottom=Ee(c.bottom,d.bottom),d.left=se(c.left,d.left),d},ki(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function lf(e){const{width:t,height:n}=Rs(e);return{width:t,height:n}}function uf(e,t,n){const r=Se(t),o=We(t),i=n==="fixed",a=pt(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Je(0);if(r||!r&&!i)if((Nt(t)!=="body"||sn(o))&&(s=Kn(t)),r){const c=pt(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=Ns(o));const d=a.left+s.scrollLeft-l.x,f=a.top+s.scrollTop-l.y;return{x:d,y:f,width:a.width,height:a.height}}function Or(e){return me(e).position==="static"}function Pi(e,t){return!Se(e)||me(e).position==="fixed"?null:t?t(e):e.offsetParent}function Ls(e,t){const n=ce(e);if(qn(e))return n;if(!Se(e)){let o=Qe(e);for(;o&&!Tt(o);){if(ve(o)&&!Or(o))return o;o=Qe(o)}return n}let r=Pi(e,t);for(;r&&Jd(r)&&Or(r);)r=Pi(r,t);return r&&Tt(r)&&Or(r)&&!Eo(r)?n:r||Xd(e)||n}const df=async function(e){const t=this.getOffsetParent||Ls,n=this.getDimensions,r=await n(e.floating);return{reference:uf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ff(e){return me(e).direction==="rtl"}const pf={convertOffsetParentRelativeRectToViewportRelativeRect:tf,getDocumentElement:We,getClippingRect:cf,getOffsetParent:Ls,getElementRects:df,getClientRects:nf,getDimensions:lf,getScale:Et,isElement:ve,isRTL:ff};function hf(e,t){let n=null,r;const o=We(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:d,top:f,width:c,height:p}=e.getBoundingClientRect();if(s||t(),!c||!p)return;const h=bn(f),v=bn(o.clientWidth-(d+c)),g=bn(o.clientHeight-(f+p)),y=bn(d),_={rootMargin:-h+"px "+-v+"px "+-g+"px "+-y+"px",threshold:se(0,Ee(1,l))||1};let w=!0;function b(x){const $=x[0].intersectionRatio;if($!==l){if(!w)return a();$?a(!1,$):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(b,{..._,root:o.ownerDocument})}catch{n=new IntersectionObserver(b,_)}n.observe(e)}return a(!0),i}function gf(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,d=So(e),f=o||i?[...d?Xt(d):[],...Xt(t)]:[];f.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const c=d&&s?hf(d,n):null;let p=-1,h=null;a&&(h=new ResizeObserver(m=>{let[_]=m;_&&_.target===d&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),d&&!l&&h.observe(d),h.observe(t));let v,g=l?pt(e):null;l&&y();function y(){const m=pt(e);g&&(m.x!==g.x||m.y!==g.y||m.width!==g.width||m.height!==g.height)&&n(),g=m,v=requestAnimationFrame(y)}return n(),()=>{var m;f.forEach(_=>{o&&_.removeEventListener("scroll",n),i&&_.removeEventListener("resize",n)}),c==null||c(),(m=h)==null||m.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const vf=Kd,mf=Gd,_f=zd,yf=Zd,bf=Bd,Ri=Wd,wf=Yd,xf=(e,t,n)=>{const r=new Map,o={platform:pf,...n},i={...o.platform,_c:r};return Ud(e,t,{...o,platform:i})};var Sn=typeof document<"u"?Ue:I;function Ln(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(!Ln(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)&&!Ln(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ms(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Di(e,t){const n=Ms(e);return Math.round(t*n)/n}function Ni(e){const t=D(e);return Sn(()=>{t.current=e}),t}function $f(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:d}=e,[f,c]=P({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=P(r);Ln(p,r)||h(r);const[v,g]=P(null),[y,m]=P(null),_=j(F=>{F!==$.current&&($.current=F,g(F))},[]),w=j(F=>{F!==C.current&&(C.current=F,m(F))},[]),b=i||v,x=a||y,$=D(null),C=D(null),E=D(f),S=l!=null,A=Ni(l),T=Ni(o),k=j(()=>{if(!$.current||!C.current)return;const F={placement:t,strategy:n,middleware:p};T.current&&(F.platform=T.current),xf($.current,C.current,F).then(G=>{const Z={...G,isPositioned:!0};R.current&&!Ln(E.current,Z)&&(E.current=Z,on(()=>{c(Z)}))})},[p,t,n,T]);Sn(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,c(F=>({...F,isPositioned:!1})))},[d]);const R=D(!1);Sn(()=>(R.current=!0,()=>{R.current=!1}),[]),Sn(()=>{if(b&&($.current=b),x&&(C.current=x),b&&x){if(A.current)return A.current(b,x,k);k()}},[b,x,k,A,S]);const N=ee(()=>({reference:$,floating:C,setReference:_,setFloating:w}),[_,w]),K=ee(()=>({reference:b,floating:x}),[b,x]),Y=ee(()=>{const F={position:n,left:0,top:0};if(!K.floating)return F;const G=Di(K.floating,f.x),Z=Di(K.floating,f.y);return s?{...F,transform:"translate("+G+"px, "+Z+"px)",...Ms(K.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:Z}},[n,s,K.floating,f.x,f.y]);return ee(()=>({...f,update:k,refs:N,elements:K,floatingStyles:Y}),[f,k,N,K,Y])}const Ef=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?Ri({element:r.current,padding:o}).fn(n):{}:r?Ri({element:r,padding:o}).fn(n):{}}}},Cf=(e,t)=>({...vf(e),options:[e,t]}),Sf=(e,t)=>({...mf(e),options:[e,t]}),Of=(e,t)=>({...wf(e),options:[e,t]}),Af=(e,t)=>({..._f(e),options:[e,t]}),Tf=(e,t)=>({...yf(e),options:[e,t]}),kf=(e,t)=>({...bf(e),options:[e,t]}),Pf=(e,t)=>({...Ef(e),options:[e,t]});function Rf(e){const[t,n]=P(void 0);return At(()=>{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,d=Array.isArray(l)?l[0]:l;a=d.inlineSize,s=d.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 Fs="Popper",[js,Vs]=yo(Fs),[Df,Hs]=js(Fs),Nf=e=>{const{__scopePopper:t,children:n}=e,[r,o]=P(null);return O(Df,{scope:t,anchor:r,onAnchorChange:o},n)},If="PopperAnchor",Lf=q((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Hs(If,n),a=D(null),s=Oe(t,a);return I(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:O(nt.div,B({},o,{ref:s}))}),Us="PopperContent",[Mf,n_]=js(Us),Ff=q((e,t)=>{var n,r,o,i,a,s,l,d;const{__scopePopper:f,side:c="bottom",sideOffset:p=0,align:h="center",alignOffset:v=0,arrowPadding:g=0,avoidCollisions:y=!0,collisionBoundary:m=[],collisionPadding:_=0,sticky:w="partial",hideWhenDetached:b=!1,updatePositionStrategy:x="optimized",onPlaced:$,...C}=e,E=Hs(Us,f),[S,A]=P(null),T=Oe(t,W=>A(W)),[k,R]=P(null),N=Rf(k),K=(n=N==null?void 0:N.width)!==null&&n!==void 0?n:0,Y=(r=N==null?void 0:N.height)!==null&&r!==void 0?r:0,F=c+(h!=="center"?"-"+h:""),G=typeof _=="number"?_:{top:0,right:0,bottom:0,left:0,..._},Z=Array.isArray(m)?m:[m],jt=Z.length>0,pe={padding:G,boundary:Z.filter(jf),altBoundary:jt},{refs:ze,floatingStyles:ot,placement:ln,isPositioned:Ae,middlewareData:Te}=$f({strategy:"fixed",placement:F,whileElementsMounted:(...W)=>gf(...W,{animationFrame:x==="always"}),elements:{reference:E.anchor},middleware:[Cf({mainAxis:p+Y,alignmentAxis:v}),y&&Sf({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?Of():void 0,...pe}),y&&Af({...pe}),Tf({...pe,apply:({elements:W,rects:ae,availableWidth:Be,availableHeight:X})=>{const{width:re,height:he}=ae.reference,at=W.floating.style;at.setProperty("--radix-popper-available-width",`${Be}px`),at.setProperty("--radix-popper-available-height",`${X}px`),at.setProperty("--radix-popper-anchor-width",`${re}px`),at.setProperty("--radix-popper-anchor-height",`${he}px`)}}),k&&Pf({element:k,padding:g}),Vf({arrowWidth:K,arrowHeight:Y}),b&&kf({strategy:"referenceHidden",...pe})]}),[Vt,er]=Ws(ln),gt=Ze($);At(()=>{Ae&&(gt==null||gt())},[Ae,gt]);const it=(o=Te.arrow)===null||o===void 0?void 0:o.x,un=(i=Te.arrow)===null||i===void 0?void 0:i.y,H=((a=Te.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[U,te]=P();return At(()=>{S&&te(window.getComputedStyle(S).zIndex)},[S]),O("div",{ref:ze.setFloating,"data-radix-popper-content-wrapper":"",style:{...ot,transform:Ae?ot.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(s=Te.transformOrigin)===null||s===void 0?void 0:s.x,(l=Te.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},O(Mf,{scope:f,placedSide:Vt,onArrowChange:R,arrowX:it,arrowY:un,shouldHideArrow:H},O(nt.div,B({"data-side":Vt,"data-align":er},C,{ref:T,style:{...C.style,animation:Ae?void 0:"none",opacity:(d=Te.hide)!==null&&d!==void 0&&d.referenceHidden?0:void 0}}))))});function jf(e){return e!==null}const Vf=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:l,middlewareData:d}=t,c=((n=d.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,p=c?0:e.arrowWidth,h=c?0:e.arrowHeight,[v,g]=Ws(s),y={start:"0%",center:"50%",end:"100%"}[g],m=((r=(o=d.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+p/2,_=((i=(a=d.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let w="",b="";return v==="bottom"?(w=c?y:`${m}px`,b=`${-h}px`):v==="top"?(w=c?y:`${m}px`,b=`${l.floating.height+h}px`):v==="right"?(w=`${-h}px`,b=c?y:`${_}px`):v==="left"&&(w=`${l.floating.width+h}px`,b=c?y:`${_}px`),{data:{x:w,y:b}}}});function Ws(e){const[t,n="center"]=e.split("-");return[t,n]}const Hf=Nf,Uf=Lf,Wf=Ff,zs="Popover",[Bs,r_]=yo(zs,[Vs]),Oo=Vs(),[zf,It]=Bs(zs),Bf=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=Oo(t),l=D(null),[d,f]=P(!1),[c=!1,p]=as({prop:r,defaultProp:o,onChange:i});return O(Hf,s,O(zf,{scope:t,contentId:$n(),triggerRef:l,open:c,onOpenChange:p,onOpenToggle:j(()=>p(h=>!h),[p]),hasCustomAnchor:d,onCustomAnchorAdd:j(()=>f(!0),[]),onCustomAnchorRemove:j(()=>f(!1),[]),modal:a},n))},qf="PopoverTrigger",Kf=q((e,t)=>{const{__scopePopover:n,...r}=e,o=It(qf,n),i=Oo(n),a=Oe(t,o.triggerRef),s=O(nt.button,B({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Gs(o.open)},r,{ref:a,onClick:ge(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?s:O(Uf,B({asChild:!0},i),s)}),qs="PopoverPortal",[Gf,Yf]=Bs(qs,{forceMount:void 0}),Zf=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=It(qs,t);return O(Gf,{scope:t,forceMount:n},O(Rt,{present:n||i.open},O(ds,{asChild:!0,container:o},r)))},Qt="PopoverContent",Jf=q((e,t)=>{const n=Yf(Qt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=It(Qt,e.__scopePopover);return O(Rt,{present:r||i.open},i.modal?O(Xf,B({},o,{ref:t})):O(Qf,B({},o,{ref:t})))}),Xf=q((e,t)=>{const n=It(Qt,e.__scopePopover),r=D(null),o=Oe(t,r),i=D(!1);return I(()=>{const a=r.current;if(a)return $s(a)},[]),O(ws,{as:zn,allowPinchZoom:!0},O(Ks,B({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ge(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),i.current||(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:ge(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,d=s.button===2||l;i.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:ge(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})))}),Qf=q((e,t)=>{const n=It(Qt,e.__scopePopover),r=D(!1),o=D(!1);return O(Ks,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()}}))}),Ks=q((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:f,...c}=e,p=It(Qt,n),h=Oo(n);return fs(),O(ls,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},O(ss,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>p.onOpenChange(!1)},O(Wf,B({"data-state":Gs(p.open),role:"dialog",id:p.contentId},h,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 Gs(e){return e?"open":"closed"}const ep=Bf,tp=Kf,np=Zf,rp=Jf,lt=fe({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}}),cn=fe({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}}),Ys=fe({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"}}),Zs=fe({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"}}}),Js=fe({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}}),op=fe({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"}}}),ip=({children:e,colorScheme:t})=>u("span",{class:op({colorScheme:t}),children:u("span",{class:"block w-[3ch] text-center tabular-nums",children:e})}),ap=(e,t)=>{const n=e.indexOf(t);return n===-1?[...e,t]:e.filter((r,o)=>o!==n)},Ii=e=>{var n;const t=Number((n=e.match(/\d/g))==null?void 0:n.join(""));return Number.isNaN(t)?0:t},sp=(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=Ii(r.value),a=Ii(o.value);return i-a});break}return t.order==="descending"&&n.reverse(),n},cp=(e,t)=>{if(e===null)return!1;const n=e[t.value];return n===void 0?!0:n===0},lp=(e,t)=>{const n=r=>r>99?"99+":r.toString();return n(e===null?t.jobs:e[t.value]??0)},up=({value:e,property:t,useQuery:n,isMobile:r,onValueChange:o,unfilteredQuery:i,onClose:a})=>{const{t:s}=ne(),l=rn(n()),d=ee(()=>{switch(l.queryState){case"error":case"idle":case"loading":return null;case"loaded":case"revalidating":{const v=l.data[t.key]??[];return Object.fromEntries(v.map(g=>[g.value,g.jobs]))}default:bt(l)}},[l,t.key]),f=Xs(e),c=f.length>0,[p,h]=P();return l.queryState==="error"?u(je,{error:new Error(s("filters_loading_error"),{cause:l.error}),resetError:()=>l.swr.mutate()}):u("div",{class:"theme-fill:bg-neutral-1 flex min-h-0 w-full flex-1 flex-col",children:[t.searchable&&u("div",{class:"border-b-px border-neutral-4",children:u("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:p,onInput:v=>h(v.currentTarget.value),placeholder:s("type_to_search")})}),(()=>{switch(i.queryState){case"error":return u(je,{error:new Error(s("filters_loading_error"),{cause:i.error}),class:"flex-1",resetError:()=>i.swr.mutate()});case"idle":case"loading":return u("div",{class:"flex px-4",children:u("div",{"aria-hidden":!0,class:lt({size:"lg",variant:"neutralStrong",interactive:!0,class:"animate-skeleton flex-1 cursor-default opacity-20 active:-scale-100"}),children:u("span",{class:"inline-block w-[10ch]"})})});case"revalidating":case"loaded":{const v=i.data[t.key]??[],g=p&&p.length>1?v.filter(_=>_.label.toLowerCase().includes(p.toLowerCase())):v,y=[];for(const _ of g){if(_.label.length<1)continue;const w={..._,results:lp(d,_),disabled:cp(d,_)};switch(t.results){case"only-available":w.disabled===!1&&y.push(w);break;default:y.push(w)}}return y.find(_=>!_.disabled)?u("ul",{class:Ys(),children:sp(y,t.sortSuggestions).map(_=>{const w=f.includes(_.value);return u("li",{class:Zs({type:"line"}),children:u("button",{type:"button",disabled:_.disabled,"data-filter":!0,"data-current-value":w?"true":void 0,onClick:()=>{switch(e.select){case"many":{const b=ap(f,_.value);o({select:"many",value:b});break}case"one":o({select:"one",value:w?void 0:_.value});break;default:bt(e)}},class:Js({active:w,disabled:_.disabled}),children:[u("span",{class:"max-w-full truncate",children:_.label})," ",u(ip,{colorScheme:w?"accentStrong":"neutralStrong",children:_.results})]})},_.value)})}):u("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:bt(i)}})(),u("footer",{class:"flex flex-none justify-end p-2",children:[u("div",{class:"flex-1",children:c&&u("button",{type:"button",class:Fe({variant:"neutral",icon:"left"}),onClick:()=>{o(void 0)},children:[u(J,{"aria-hidden":!0,name:"x"})," ",s("clear")]})}),e.select==="many"&&r&&u("div",{class:"flex items-center overflow-hidden",children:u("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:[f.length," ",s("selected")]})}),u("div",{class:"flex-1",children:u("button",{type:"button",class:Fe({variant:c?"accent":"neutral",class:"ml-auto"}),onClick:a,children:s(c?"done":"close")},c?"done":"close")})]})]})},Li=8,Mi={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=fe({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"}}}),ji=fe({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"}}}),Xs=e=>typeof e.value=="string"?[e.value]:e.value??[],dp=({selectedValues:e})=>{const t=e.length;return t===0?null:u("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)},fp=({active:e,value:t,onActiveChange:n,property:r,onValueChange:o,unfilteredQuery:i,useQuery:a,theme:s,widgetId:l})=>{const d=pc(r.key,Mi)?Mi[r.key]:void 0,f=r.icon??d??"filter",c=Xs(t),p=c.length>0,h=ka("(pointer: coarse)"),v=u(L,{children:[u("div",{class:"flex min-w-0 flex-1 items-center gap-1.5",children:[u(J,{"aria-hidden":!0,class:"flex-none",name:f}),u("span",{class:"truncate",children:r.label})]}),u(J,{"aria-hidden":!0,class:"text-neutral-8 flex-shrink-0 rotate-90 transition-transform group-data-[state=open]:-rotate-90",name:"chevron-right"}),u(dp,{selectedValues:c})]}),g=u(up,{useQuery:a,onClose:()=>n(!1),onValueChange:o,unfilteredQuery:i,property:r,value:t,isMobile:h});return h?u(Td,{open:e,onOpenChange:n,children:[u(kd,{"data-filter-key":r.key,"aria-label":r.label,"aria-selected":e?"true":void 0,class:Fi({state:e||p?"active":"default"}),onTouchStart:pp,children:v}),u(Pd,{children:u("div",{class:"inploi-job-search","data-widget-id":l,children:[u(Rd,{class:"animate-fade-in fixed inset-0 z-50 bg-[#0009]"}),u(Dd,{class:ji({mode:"mobile",class:jr(s)}),children:[u("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:[u(J,{name:f,class:"flex-none"}),u("p",{class:"font-style-filter font-weight-filter text-style-filter truncate",children:r.label})]}),g]})]})})]}):u(ep,{open:e,onOpenChange:y=>n(y),modal:h,children:[u(tp,{"data-filter-key":r.key,"aria-label":r.label,"aria-selected":e?"true":void 0,class:Fi({state:e||p?"active":"default"}),children:v}),u(np,{children:u("div",{class:"inploi-job-search","data-widget-id":l,children:u(rp,{side:"bottom",sideOffset:Li,align:"center",collisionPadding:Li,class:ji({mode:"desktop",class:jr(s)}),children:g})})})]})};function pp(){}const hp=(e,t)=>{var n,r,o;switch(t.select){case"many":(n=t.value)==null||n.forEach(i=>{var a,s;switch(e.select){case"many":(a=e.value)!=null&&a.includes(i)||(s=e.value)==null||s.push(i);break;case"one":e.value=i}});break;case"one":if(!t.value)break;switch(e.select){case"many":(r=e.value)!=null&&r.includes(t.value)||(o=e.value)==null||o.push(t.value);break;case"one":e.value=t.value}break}},gp=({value:e,activeKey:t})=>{switch(e==null?void 0:e.select){case void 0:return{newValue:void 0,newActiveKey:t};case"one":case"many":return{newValue:e,newActiveKey:t};default:bt(e)}},vp=({properties:e,state:t,onFilterValueChange:n,onResetFilters:r,apiClient:o,logger:i,theme:a,alerts:s,widgetId:l})=>{const{t:d}=ne(),[f,c]=P(void 0),p=ee(()=>({filters:Fn(e,"value"),mode:t.mode,query:"",geo:void 0,page:1,view:"list"}),[e,t.mode]),h=rn(Yt(Kr({state:p,baseKey:"filters"}),()=>Uo({apiClient:o,logger:i,state:p}),Pn)),v=j(g=>()=>{const y={...t,filters:{...t.filters,[g]:p.filters[g]}};return Yt(Kr({state:y,baseKey:"filters"}),()=>Uo({apiClient:o,logger:i,state:y}),Pn)},[o,p.filters,i,t]);return h.queryState==="error"?u(je,{error:new Error(d("filters_loading_error"),{cause:h.error}),resetError:()=>h.swr.mutate()}):u("div",{class:"ijs-filters-section flex w-full flex-col items-stretch justify-center gap-2 overflow-auto px-4 py-2 md:flex-row md:flex-wrap md:items-center",children:[e.filter(g=>g.hidden!==!0).map(g=>{const y=f===g.key,m=t.filters[g.key]??{select:g.select,value:void 0},_=p.filters[g.key];_&&hp(m,_);const w=$=>{const{newActiveKey:C,newValue:E}=gp({property:g,activeKey:f,value:$??_,properties:e,appliedFilters:t.filters});return c(C),n(g.key,E)},b=$=>c($?g.key:void 0),x=v(g.key);return u(qt,{Fallback:je,children:u(fp,{unfilteredQuery:h,active:y,property:g,onActiveChange:b,value:m,useQuery:x,onValueChange:w,theme:a,widgetId:l})},g.key)}),u("button",{type:"button",class:Fe({variant:"neutral"}),onClick:r,children:d("reset")}),s?u("div",{id:"inploi-job-alerts",class:"min-h-[36px]"}):null]})};function mp(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Gn=mp,_p=typeof Wt=="object"&&Wt&&Wt.Object===Object&&Wt,yp=_p,bp=yp,wp=typeof self=="object"&&self&&self.Object===Object&&self,xp=bp||wp||Function("return this")(),Yn=xp,$p=Yn,Ep=function(){return $p.Date.now()},Cp=Ep,Sp=/\s/;function Op(e){for(var t=e.length;t--&&Sp.test(e.charAt(t)););return t}var Ap=Op,Tp=Ap,kp=/^\s+/;function Pp(e){return e&&e.slice(0,Tp(e)+1).replace(kp,"")}var Rp=Pp,Dp=Yn,Np=Dp.Symbol,Ao=Np,Vi=Ao,Qs=Object.prototype,Ip=Qs.hasOwnProperty,Lp=Qs.toString,Ut=Vi?Vi.toStringTag:void 0;function Mp(e){var t=Ip.call(e,Ut),n=e[Ut];try{e[Ut]=void 0;var r=!0}catch{}var o=Lp.call(e);return r&&(t?e[Ut]=n:delete e[Ut]),o}var Fp=Mp,jp=Object.prototype,Vp=jp.toString;function Hp(e){return Vp.call(e)}var Up=Hp,Hi=Ao,Wp=Fp,zp=Up,Bp="[object Null]",qp="[object Undefined]",Ui=Hi?Hi.toStringTag:void 0;function Kp(e){return e==null?e===void 0?qp:Bp:Ui&&Ui in Object(e)?Wp(e):zp(e)}var ec=Kp;function Gp(e){return e!=null&&typeof e=="object"}var Yp=Gp,Zp=ec,Jp=Yp,Xp="[object Symbol]";function Qp(e){return typeof e=="symbol"||Jp(e)&&Zp(e)==Xp}var Zn=Qp,eh=Rp,Wi=Gn,th=Zn,zi=0/0,nh=/^[-+]0x[0-9a-f]+$/i,rh=/^0b[01]+$/i,oh=/^0o[0-7]+$/i,ih=parseInt;function ah(e){if(typeof e=="number")return e;if(th(e))return zi;if(Wi(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Wi(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=eh(e);var n=rh.test(e);return n||oh.test(e)?ih(e.slice(2),n?2:8):nh.test(e)?zi:+e}var sh=ah,ch=Gn,Ar=Cp,Bi=sh,lh="Expected a function",uh=Math.max,dh=Math.min;function fh(e,t,n){var r,o,i,a,s,l,d=0,f=!1,c=!1,p=!0;if(typeof e!="function")throw new TypeError(lh);t=Bi(t)||0,ch(n)&&(f=!!n.leading,c="maxWait"in n,i=c?uh(Bi(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p);function h($){var C=r,E=o;return r=o=void 0,d=$,a=e.apply(E,C),a}function v($){return d=$,s=setTimeout(m,t),f?h($):a}function g($){var C=$-l,E=$-d,S=t-C;return c?dh(S,i-E):S}function y($){var C=$-l,E=$-d;return l===void 0||C>=t||C<0||c&&E>=i}function m(){var $=Ar();if(y($))return _($);s=setTimeout(m,g($))}function _($){return s=void 0,p&&r?h($):(r=o=void 0,a)}function w(){s!==void 0&&clearTimeout(s),d=0,r=l=o=s=void 0}function b(){return s===void 0?a:_(Ar())}function x(){var $=Ar(),C=y($);if(r=arguments,o=this,l=$,C){if(s===void 0)return v(l);if(c)return clearTimeout(s),s=setTimeout(m,t),h(l)}return s===void 0&&(s=setTimeout(m,t)),a}return x.cancel=w,x.flush=b,x}var ph=fh;const hh=vo(ph),to="|",tc=(e,t)=>{const n=structuredClone(e);return n.forEach(r=>{if(t.has(r.key)){const o=t.get(r.key);if(!o)return;switch(r.select){case"one":{r.defaultValue=o;break}case"many":o.includes(to)?r.defaultValue=o.split(to):o.includes(",")?r.defaultValue=o.split(","):r.defaultValue=o}}}),n},nc=e=>{const t=e.get("mode");return t==="vector"||t==="query"?t:"query"},rc=e=>{const t=e.get("view");return t==="list"||t==="map"?t:"list"},gh=({searchParams:e})=>({properties:t})=>({filters:Fn(tc(t,e),"defaultValue"),mode:nc(e),page:On(e.get("page"))??1,view:rc(e),query:e.get("query")??""}),vh=(e,t)=>{var n,r;if(e.filters!==void 0){const o=Hn({filters:e.filters,query:"",mode:e.mode??"query",page:e.page??1,view:e.view??"list"});for(const[i,a]of Object.entries(o))if(i!=="geolocation"){if(a==null){t.delete(i);continue}Array.isArray(a)?a.length===0?t.delete(i):t.set(i,a.join(to)):typeof a=="string"&&t.set(i,a)}}"geo"in e&&(((n=e.geo)==null?void 0:n.type)==="provided"?(e.geo.coords?(t.set("lat",e.geo.coords.lat.toString()),t.set("lng",e.geo.coords.lng.toString())):(t.delete("lat"),t.delete("lng")),t.set("radius",e.geo.radius.toString())):((r=e.geo)==null||r.type,t.delete("lat"),t.delete("lng"),t.delete("radius"))),"query"in e&&(e.query?t.set("query",e.query):t.delete("query")),"page"in e&&(e.page&&e.page>1?t.set("page",e.page.toString()):t.delete("page")),"view"in e&&(e.view?t.set("view",e.view):t.delete("view"))},On=e=>{if(!e)return;const t=Number(e);if(!Number.isNaN(t))return t},mh=e=>{const t=e.get("lat"),n=e.get("lng"),r=e.get("radius");if(!t&&!n||!t||!n)return;const o=On(t),i=On(n),a=On(r)??Mn(no);if(!(o===void 0||i===void 0))return{type:"provided",coords:{lat:o,lng:i},radius:Number.isNaN(a)?Mn(no):a}},oc=(e,t=1e3)=>{const[n,r]=P(e),o=ee(()=>hh(i=>r(i),t),[t]);return I(()=>{o(e)},[e,o]),n},_h=q(({disabled:e,error:t,name:n,inputPlaceholder:r,items:o,onItemSelect:i,onQueryChange:a,onBlur:s,onFocus:l,inputProps:d,menuProps:f,query:c},p)=>{const[h,v]=P(!1),[g,y]=P(),{t:m}=ne(),_=D();I(()=>{var b;y((b=o[0])==null?void 0:b.id)},[o]);const w=b=>{i(b),v(!1)};return u("div",{class:"relative h-full",children:[u("input",{name:n,ref:p,disabled:e,"data-active":h?"true":void 0,"aria-controls":`ijs-${n}-menu`,placeholder:r,class:cn({size:"md"}),onFocus:()=>{l==null||l(),v(!0)},onBlur:()=>{_.current=window.setTimeout(()=>{s==null||s(),v(!1)},100)},value:c,onChange:b=>a(b.currentTarget.value),onKeyDown:b=>{switch(v(!0),b.key){case"ArrowDown":case"ArrowUp":{const x=b.key==="ArrowDown"?1:-1;b.preventDefault();const $=o.findIndex(E=>E.id===g);if($===-1)return;const C=o[$+x]??o[b.key==="ArrowDown"?0:o.length-1];if(!C)return;y(C.id);break}case"Enter":{if(b.preventDefault(),!g)return;i(g)}}},...d}),!t&&h&&!e&&o.length>0?u("ul",{className:Ys({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:()=>{_.current&&clearTimeout(_.current)},...f,children:t?u("div",{role:"alert",children:m("geo_suggestions_error")}):o.map(b=>u("li",{class:Zs({type:"line",className:"group/tag"}),children:u("button",{type:"button",onMouseEnter:()=>y(b.id),class:Js({active:b.id===g,className:"line-clamp-1 overflow-hidden truncate"}),onClick:()=>w(b.id),onKeyDown:x=>{x.key==="Enter"&&w(b.id)},children:b.label})},b.id))}):null]})}),yh=(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})}),bh={1:"geo_error_permission_denied",2:"geo_error_position_unavailable",3:"geo_error_timeout"},qi=typeof window<"u"&&"geolocation"in navigator&&window.isSecureContext,wh=({onLocate:e,onError:t,signal:n})=>{const[r,o]=P("idle"),[i,a]=P(null),{t:s}=ne(),l=d=>{o("idle"),a(d),e(d)};return u("button",{"aria-label":s(r==="loading"?"geo_locating":"geo_my_location"),type:"button",onClick:()=>{if(qi){if(o("loading"),i)return l(i);yh({signal:n}).then(d=>{const f={lat:d.latitude,lng:d.longitude};l(f)}).catch(d=>{if(d instanceof DOMException&&d.name==="AbortError")return o("idle");o("error");const f=bh[d.code];if(!f)return;const c=s(f);t(c)})}},"data-state":r,class:Fe({variant:"accent",size:"lg",icon:"only",className:"data-[state=loading]:animate-pulse"}),disabled:!qi||r==="error",children:u(J,{name:"target-location"})})},xh="https://api.mapbox.com/search/geocode/v6/forward",$h="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Eh=e=>atob(e).split("").reverse().join(""),Ch=ue({features:Vn(Ie(ue({properties:ue({mapbox_id:V(),place_formatted:Re(V()),name_preferred:Re(V(),"Untitled location"),coordinates:Ie(ue({latitude:$e(),longitude:$e()}),({latitude:e,longitude:t})=>({lat:e,lng:t}))})}),e=>e.properties))}),Sh=(e,t)=>Array.from(new Map(e.map(n=>[typeof t=="function"?t(n):n[t],n])).values()),Oh=async e=>{if(!e)return[];const t=new URL(xh);t.searchParams.set("q",e),t.searchParams.set("proximity","ip"),t.searchParams.set("access_token",Eh($h));const n=await fetch(t);if(!n.ok)throw new Error("Failed to get address details");const r=co(Ch,await n.json());if(r.success===!1)throw console.error(r.issues),new Error("Invalid data");const{features:o}=r.output;return Sh(o,i=>i.name_preferred+i.place_formatted)},Ah=({onSelect:e,onValueChange:t,coords:n,radius:r,onError:o})=>{const{t:i}=ne(),[a,s]=P(""),[l,d]=P(),f=oc(a,500),[c,p]=P(new AbortController),h=Yt(f,Oh,{keepPreviousData:!1,revalidateIfStale:!1,revalidateOnFocus:!1}),{data:v,queryState:g,error:y}=rn(h),[m,_]=P("view"),w=D(null);return I(()=>{if(m==="edit"){if(!w.current)return;w.current.focus()}},[m]),u("div",{class:"relative flex-1",children:[m==="view"&&n?u("button",{"aria-label":i("geo_search_placeholder"),type:"button",class:cn({size:"unsized",className:"flex h-10 w-full cursor-text items-stretch px-1 py-1"}),onClick:()=>{_("edit")},children:u("div",{class:lt({size:"sm",variant:"accentStrong",interactive:!0,class:"truncate"}),children:l??i("location_provided")})}):u(_h,{ref:w,error:y,query:a,name:"location-search",onQueryChange:s,onFocus:()=>{c.abort(),p(new AbortController)},onBlur:()=>{_("view"),s("")},onItemSelect:b=>{if(g!=="loaded")return;const x=v.find($=>$.mapbox_id===b);x&&(e(x.coordinates),_("view"),d(x.name_preferred))},inputPlaceholder:i("geo_search_placeholder"),items:(v==null?void 0:v.map(b=>({id:b.mapbox_id,label:u("div",{class:"flex min-w-0 max-w-full gap-2 overflow-hidden",children:[u("strong",{class:"truncate",children:b.name_preferred})," ",u("span",{class:"flex-1 truncate opacity-50",children:b.place_formatted})]})})))??[]}),u("div",{class:"absolute bottom-0 right-0 top-0 flex items-center",children:!a&&!n?u(wh,{onLocate:b=>{_("view"),d(i("geo_my_location")),t({type:"provided",coords:b,radius:r})},onError:o,signal:c.signal}):u("button",{type:"button","aria-label":i("geo_clear_search"),onClick:()=>{s(""),d(void 0),t({radius:r,type:"provided"}),_("edit"),w.current&&(w.current.value="",w.current.focus())},class:Fe({variant:"neutral",size:"lg",icon:"only"}),children:u(J,{name:"x"})})})]})},Th=[.25,.5,1,3,5,10,15,20,30,40],no=20,Mn=e=>e*1609.34,kh=new Intl.NumberFormat(void 0,{style:"unit",unit:"mile",unitDisplay:"long",maximumFractionDigits:1,trailingZeroDisplay:"stripIfInteger"}),Ph=Ie(ue({type:Pe("provided"),lat:Re(Ie(V(),e=>Number(e))),lng:Re(Ie(V(),e=>Number(e))),radius:Ie(V(),e=>Number(e))}),e=>({radius:e.radius,type:e.type,coords:e.lat&&e.lng?{lat:e.lat,lng:e.lng}:void 0})),Rh=({value:e,onValueChange:t,logger:n})=>{const{t:r}=ne(),o=uo(),i=(e==null?void 0:e.type)==="provided"?e.radius:Mn(no),[a,s]=P();return u("div",{class:"flex flex-col gap-2",children:[u("form",{onChange:l=>{const d=new FormData(l.currentTarget),f=co(Ph,Object.fromEntries(d.entries()));if(!f.success){n.error(f.issues),s(f.issues[0].message);return}t(f.output)},class:"flex flex-col gap-2 md:flex-row",children:[u("input",{type:"hidden",name:"type",value:"provided"}),(e==null?void 0:e.type)==="provided"&&e.coords?u(L,{children:[u("input",{type:"hidden",name:"lat",value:e.coords.lat}),u("input",{type:"hidden",name:"lng",value:e.coords.lng})]}):null,u(Ah,{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}),u("div",{class:"relative",children:[u("label",{class:"sr-only",for:o,children:r("geo_range_label")}),u("select",{id:o,name:"radius",class:cn({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:Th.map(l=>u("option",{value:Mn(l),class:"truncate",children:kh.format(l)},l))}),u("div",{class:"text-copy-neutral-lowcontrast pointer-events-none absolute bottom-0 right-0 top-0 flex w-10 items-center justify-center",children:u(J,{name:"chevron-right",class:"h-6 w-6 rotate-90"})})]})]}),a?u("div",{role:"alert",class:"text-pretty text-copy-neutral font-style-tag font-weight-tag text-style-tag flex gap-1",children:[u(J,{name:"warning",class:"animate-appear-tag size-[1lh] flex-none"}),a]}):null]})},Dh=2,Nh=({value:e,onValueChange:t})=>{const[n,r]=P(e??""),o=n!==""&&n===e,{t:i}=ne();return I(()=>{let a=n.trim();if(a.length<=Dh&&(a=null),a===null){t("");return}const s=setTimeout(()=>{t(a)},300);return()=>clearTimeout(s)},[n,t]),u("div",{class:"flex flex-col gap-3",children:u("div",{class:"relative",children:[u("label",{class:"absolute left-0 flex h-full items-center px-2",for:"ijs-keyword",children:[u(J,{"aria-hidden":!0,title:"Search by keyword",name:"magnifierSimple",class:St({"text-copy-neutral-icon":!o,"text-copy-accent-icon":o})}),u("span",{class:"sr-only",children:"Keyword"})]}),u("input",{autoComplete:"off",autocomplete:"off",name:"keyword",id:"ijs-keyword",type:"search",class:cn({hasValue:o,size:"unsized",class:"peer py-2 pl-10 pr-4"}),placeholder:i("type_to_search_jobs"),value:n,onChange:a=>{r(a.currentTarget.value)}}),u("button",{type:"button",class:Fe({variant:"neutral",size:"lg",position:"absolute",class:"bottom-0 right-0 top-0 h-full peer-placeholder-shown:hidden",icon:"only"}),onClick:()=>{r("")},children:u(J,{name:"x"})})]})})},Ih=({intervalMs:e,strings:t,class:n})=>{const[r,o]=P(0),[i,a]=P(!0),s=[...t,t[0]];return I(()=>{r===s.length&&(a(!1),o(0));const l=setTimeout(()=>{a(!0),o(d=>d+1)},e);return()=>clearTimeout(l)},[r,s.length,e]),u("div",{className:St("relative h-full w-full overflow-hidden",n),children:u("div",{className:St("absolute w-full",{"transition-transform duration-500 ease-in-out":i}),style:{height:`${100*s.length}%`,transform:`translateY(-${r*(100/s.length)}%)`},children:s.map((l,d)=>u("div",{className:"flex items-center whitespace-nowrap",style:{height:`${100/s.length}%`},children:l},d))})})},Lh=(e,t)=>{I(()=>{const n=r=>{document.activeElement===e.current&&t(r)};return document.addEventListener("selectionchange",n),()=>document.removeEventListener("selectionchange",n)},[e,t])},Ki=3,Mh=({value:e,onValueChange:t,options:n})=>{const[r,o]=P(e??""),i=r.trim(),a=i!==""&&i===e,{t:s}=ne(),l=i.split(""),[d,f]=P(0),c=D(null);return Lh(c,p=>{p.target instanceof HTMLInputElement&&f(p.target.scrollLeft)}),I(()=>{let p=r.trim();if(p.length<=Ki&&(p=null),p===null){t("");return}const h=setTimeout(()=>{t(p.trim())},1e3);return()=>clearTimeout(h)},[r,t]),u("div",{class:"mb-2 flex flex-col gap-2",children:[u("div",{class:"relative",children:[u("label",{class:"absolute left-0 flex h-full items-center px-2",for:"ijs-keyword",children:[u(J,{"aria-hidden":!0,title:"Search by keyword",name:"ai",class:St("duration-snappy transition-transform",{"text-copy-neutral-icon scale-90":!a,"text-copy-accent-icon":a})}),u("span",{class:"sr-only",children:"Keyword"})]}),u("input",{ref:c,autoComplete:"off",autocomplete:"off",name:"keyword",id:"ijs-keyword",type:"text",placeholder:n!=null&&n.suggestions?n.suggestions.join(", "):" ",class:cn({hasValue:a,size:"unsized",class:"peer px-10 py-2 tracking-tight !text-transparent placeholder:!text-transparent"}),style:{fontKerning:"none"},value:r,onChange:p=>{const h=p.currentTarget.value.trim();o(h)},onKeyDown:p=>{if(p.key==="Enter"){if(p.currentTarget.value.trim().length<=Ki)return;p.preventDefault(),t(r)}}}),u("div",{"data-synced":a,class:"font-weight-input text-copy-neutral group pointer-events-none absolute inset-x-10 inset-y-0 flex overflow-hidden tracking-tight peer-placeholder-shown:right-0",children:i.length>0?u("div",{"aria-hidden":!0,class:"flex items-center whitespace-nowrap",style:{transform:`translateX(${-d}px)`},children:l.map((p,h)=>u("span",{style:{animationDelay:`${h*300/l.length}ms`},class:"group-data-[synced=true]:animate-ai-letter inline-block",children:p===" "?" ":p},i+h))}):n!=null&&n.suggestions?u(Ih,{intervalMs:2e3,strings:n.suggestions,class:"opacity-30","aria-hidden":!0}):null}),u("button",{type:"button",class:Fe({variant:"neutral",size:"lg",position:"absolute",class:"bottom-0 right-0 top-0 h-full peer-placeholder-shown:hidden",icon:"only"}),onClick:()=>{o(""),t("")},children:u(J,{name:"x"})})]}),u("p",{class:"font-family-default text-balance font-style-default text-style-job-card-info text-copy-neutral-lowcontrast",children:s("ai_disclaimer")})]})};var Fh=Array.isArray,To=Fh,jh=To,Vh=Zn,Hh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Uh=/^\w*$/;function Wh(e,t){if(jh(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Vh(e)?!0:Uh.test(e)||!Hh.test(e)||t!=null&&e in Object(t)}var zh=Wh,Bh=ec,qh=Gn,Kh="[object AsyncFunction]",Gh="[object Function]",Yh="[object GeneratorFunction]",Zh="[object Proxy]";function Jh(e){if(!qh(e))return!1;var t=Bh(e);return t==Gh||t==Yh||t==Kh||t==Zh}var Xh=Jh,Qh=Yn,eg=Qh["__core-js_shared__"],tg=eg,Tr=tg,Gi=function(){var e=/[^.]+$/.exec(Tr&&Tr.keys&&Tr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ng(e){return!!Gi&&Gi in e}var rg=ng,og=Function.prototype,ig=og.toString;function ag(e){if(e!=null){try{return ig.call(e)}catch{}try{return e+""}catch{}}return""}var sg=ag,cg=Xh,lg=rg,ug=Gn,dg=sg,fg=/[\\^$.*+?()[\]{}|]/g,pg=/^\[object .+?Constructor\]$/,hg=Function.prototype,gg=Object.prototype,vg=hg.toString,mg=gg.hasOwnProperty,_g=RegExp("^"+vg.call(mg).replace(fg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function yg(e){if(!ug(e)||lg(e))return!1;var t=cg(e)?_g:pg;return t.test(dg(e))}var bg=yg;function wg(e,t){return e==null?void 0:e[t]}var xg=wg,$g=bg,Eg=xg;function Cg(e,t){var n=Eg(e,t);return $g(n)?n:void 0}var ic=Cg,Sg=ic,Og=Sg(Object,"create"),Jn=Og,Yi=Jn;function Ag(){this.__data__=Yi?Yi(null):{},this.size=0}var Tg=Ag;function kg(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Pg=kg,Rg=Jn,Dg="__lodash_hash_undefined__",Ng=Object.prototype,Ig=Ng.hasOwnProperty;function Lg(e){var t=this.__data__;if(Rg){var n=t[e];return n===Dg?void 0:n}return Ig.call(t,e)?t[e]:void 0}var Mg=Lg,Fg=Jn,jg=Object.prototype,Vg=jg.hasOwnProperty;function Hg(e){var t=this.__data__;return Fg?t[e]!==void 0:Vg.call(t,e)}var Ug=Hg,Wg=Jn,zg="__lodash_hash_undefined__";function Bg(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Wg&&t===void 0?zg:t,this}var qg=Bg,Kg=Tg,Gg=Pg,Yg=Mg,Zg=Ug,Jg=qg;function Lt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Lt.prototype.clear=Kg;Lt.prototype.delete=Gg;Lt.prototype.get=Yg;Lt.prototype.has=Zg;Lt.prototype.set=Jg;var Xg=Lt;function Qg(){this.__data__=[],this.size=0}var ev=Qg;function tv(e,t){return e===t||e!==e&&t!==t}var nv=tv,rv=nv;function ov(e,t){for(var n=e.length;n--;)if(rv(e[n][0],t))return n;return-1}var Xn=ov,iv=Xn,av=Array.prototype,sv=av.splice;function cv(e){var t=this.__data__,n=iv(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():sv.call(t,n,1),--this.size,!0}var lv=cv,uv=Xn;function dv(e){var t=this.__data__,n=uv(t,e);return n<0?void 0:t[n][1]}var fv=dv,pv=Xn;function hv(e){return pv(this.__data__,e)>-1}var gv=hv,vv=Xn;function mv(e,t){var n=this.__data__,r=vv(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var _v=mv,yv=ev,bv=lv,wv=fv,xv=gv,$v=_v;function Mt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Mt.prototype.clear=yv;Mt.prototype.delete=bv;Mt.prototype.get=wv;Mt.prototype.has=xv;Mt.prototype.set=$v;var Ev=Mt,Cv=ic,Sv=Yn,Ov=Cv(Sv,"Map"),Av=Ov,Zi=Xg,Tv=Ev,kv=Av;function Pv(){this.size=0,this.__data__={hash:new Zi,map:new(kv||Tv),string:new Zi}}var Rv=Pv;function Dv(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Nv=Dv,Iv=Nv;function Lv(e,t){var n=e.__data__;return Iv(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Qn=Lv,Mv=Qn;function Fv(e){var t=Mv(this,e).delete(e);return this.size-=t?1:0,t}var jv=Fv,Vv=Qn;function Hv(e){return Vv(this,e).get(e)}var Uv=Hv,Wv=Qn;function zv(e){return Wv(this,e).has(e)}var Bv=zv,qv=Qn;function Kv(e,t){var n=qv(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Gv=Kv,Yv=Rv,Zv=jv,Jv=Uv,Xv=Bv,Qv=Gv;function Ft(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ft.prototype.clear=Yv;Ft.prototype.delete=Zv;Ft.prototype.get=Jv;Ft.prototype.has=Xv;Ft.prototype.set=Qv;var em=Ft,ac=em,tm="Expected a function";function ko(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(tm);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ko.Cache||ac),n}ko.Cache=ac;var nm=ko,rm=nm,om=500;function im(e){var t=rm(e,function(r){return n.size===om&&n.clear(),r}),n=t.cache;return t}var am=im,sm=am,cm=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lm=/\\(\\)?/g,um=sm(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(cm,function(n,r,o,i){t.push(o?i.replace(lm,"$1"):r||n)}),t}),dm=um;function fm(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var pm=fm,Ji=Ao,hm=pm,gm=To,vm=Zn,mm=1/0,Xi=Ji?Ji.prototype:void 0,Qi=Xi?Xi.toString:void 0;function sc(e){if(typeof e=="string")return e;if(gm(e))return hm(e,sc)+"";if(vm(e))return Qi?Qi.call(e):"";var t=e+"";return t=="0"&&1/e==-mm?"-0":t}var _m=sc,ym=_m;function bm(e){return e==null?"":ym(e)}var wm=bm,xm=To,$m=zh,Em=dm,Cm=wm;function Sm(e,t){return xm(e)?e:$m(e,t)?[e]:Em(Cm(e))}var Om=Sm,Am=Zn,Tm=1/0;function km(e){if(typeof e=="string"||Am(e))return e;var t=e+"";return t=="0"&&1/e==-Tm?"-0":t}var Pm=km,Rm=Om,Dm=Pm;function Nm(e,t){t=Rm(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Dm(t[n++])];return n&&n==r?e:void 0}var Im=Nm,Lm=Im;function Mm(e,t,n){var r=e==null?void 0:Lm(e,t);return r===void 0?n:r}var Fm=Mm;const jm=vo(Fm),Bt=({chars:e})=>u("span",{style:{width:e+"ch"},class:"rounded-job-tag block h-[1lh] min-h-[1em] bg-[currentColor] opacity-25"}),cc=fe({base:"ijs-job relative rounded-job-card bg-job-card-bg ring-width-job-card ring-job-card-stroke flex gap-4 fr ease-expo-out min-w-0 p-4 transition-all duration-medium",variants:{interactive:{true:"active:bg-job-card-bg-active active:ring-job-card-stroke-active hover:bg-job-card-bg-active hover:ring-job-card-stroke-active active:scale-[0.975]",false:"animate-skeleton"}},defaultVariants:{interactive:!0}}),Vm=fe({base:"font-style-job-heading font-weight-job-heading text-copy-neutral font-family-job-heading text-pretty",variants:{size:{sm:"text-style-filter",default:"text-style-job-heading"}},defaultVariants:{size:"default"}}),kr=({job:e,property:t})=>{if(!t)return null;const n=jm(e.raw,t.key);return t.transform?t.transform(n):n},Hm=({job:e,config:t="hidden"})=>t==="hidden"?null:u("div",{class:"rounded-logo h-12 flex-none overflow-hidden",style:{aspectRatio:t.replace(":","/")},children:e.company.logo?u("img",{src:e.company.logo,alt:e.company.name,class:"h-full w-full select-none object-contain [-webkit-user-drag:none]"}):null}),ea=e=>Array.isArray(e)?e:[e],Um=1e3*60*60*24,lc=({job:e,config:t,onJobClick:n,size:r})=>{var h,v,g;const{t:o}=ne(),i=t.subheading?kr({job:e,property:t.subheading}):null,a=t.infoTags.flatMap(y=>ea(kr({job:e,property:y}))).filter(Boolean),s=ea((h=t.overrides)!=null&&h.salary?kr({job:e,property:t.overrides.salary}):e.pay).filter(Boolean),l=t.postedDate??"show",d=(v=t.overrides)!=null&&v.baseUrl?t.overrides.baseUrl(e.id.toString()):e.href,f=t.newUnderDays??7,c=e.createdAt?new Date(e.createdAt).getTime()>Date.now()-f*Um:!1,p=y=>{var m,_;n==null||n(e),(_=(m=t.overrides)==null?void 0:m.onClick)==null||_.call(m,y)};return u("a",{onMouseEnter:(g=t.overrides)==null?void 0:g.onMouseEnter,onClick:p,href:d,target:t.openJob==="redirect-new-tab"?"_blank":void 0,class:cc(),children:[u("div",{class:"flex min-w-0 flex-1 flex-col gap-4",children:[u("div",{class:"gap-logo flex items-center",children:[u(Hm,{job:e,config:r!=="sm"?t.logo:void 0}),u("div",{class:"flex flex-col items-start gap-1",children:[u("div",{class:"order-2 flex flex-col gap-1",children:[e.match?u("p",{class:"text-style-job-card text-tag-accent-strong-bg flex items-center ",children:[u(J,{name:"ai",class:"size-4 inline-block"}),u("span",{children:e.match})]}):null,u("p",{class:Vm({size:r}),children:[e.title.trim(),c&&l!=="hide"&&u(L,{children:[" ",u("span",{"aria-hidden":!0,class:"ring-px ring-tag-accent-strong-bg rounded-job-card text-tag-accent-strong-bg font-weight-tag not-sr-only order-1 inline-block px-2 py-1 align-middle text-[10px] leading-none",children:o("new")})]})]}),i?u("p",{class:"text-style-job-card text-copy-neutral-lowcontrast",children:i}):null]}),l==="show"?u("p",{class:"text-style-job-card-info text-copy-job-info order-1",children:[o("posted")," ",e.relativePostedDate]}):null]})]}),u("div",{class:"flex min-w-0 flex-col items-start gap-2",children:[u("div",{class:"flex min-w-0 max-w-full flex-wrap items-center gap-2",children:s.map((y,m)=>u("span",{class:lt({variant:"monetaryWeak",size:"xs"}),children:y},m))}),a.length>0&&u("ul",{class:"flex min-w-0 max-w-full flex-wrap items-center gap-2",children:a.map(y=>u("li",{class:lt({size:"xs",class:"max-w-full truncate"}),children:y},y))})]})]}),r==="sm"?u("div",{"aria-hidden":!0,class:"absolute right-1 top-1/2 -translate-y-1/2 transform",children:u(J,{name:"chevron-right",class:"size-5 text-copy-neutral-icon"})}):u("div",{"aria-hidden":!0,class:"flex items-center",children:u(J,{name:"chevron-right",class:"text-copy-neutral-icon"})})]})},Po=({config:e,animationDelay:t,seed:n})=>{const r=e.logo??"hidden",o=e.postedDate??"show";return u("div",{"aria-hidden":!0,style:{animationDelay:t+"s"},class:cc({interactive:!1}),children:[u("div",{class:"flex flex-1 flex-col gap-4",children:[u("div",{class:"flex items-center gap-4",children:[r==="hidden"?null:u("div",{class:"rounded-logo bg-copy-neutral h-12 opacity-25",style:{aspectRatio:r.replace(":","/")}}),u("div",{class:"flex flex-col items-start gap-1",children:[o==="show"?u("p",{class:"text-style-job-card-info text-copy-job-info",children:u(Bt,{chars:12})}):null,u("div",{class:"flex flex-col gap-1",children:[u("p",{class:"text-style-job-heading font-style-job-heading font-weight-job-heading text-copy-neutral font-family-job-heading",children:u(Bt,{chars:13+(n+5)*n%7})}),e.subheading!==null?u("p",{class:"text-style-job-card text-copy-neutral-lowcontrast",children:u(Bt,{chars:7+n*n%3})}):null]})]})]}),u("div",{class:"flex flex-col items-start gap-2",children:[n%2===0&&u("span",{class:lt({variant:"neutralWeak",size:"xs",class:"h-[1lh] min-h-[1em] w-[10ch]"})}),u("div",{class:"flex items-center gap-2",children:[u("span",{class:lt({variant:"neutralWeak",size:"xs",class:"h-[1lh] min-h-[1em] w-[6ch]"})}),u("span",{class:lt({variant:"neutralWeak",size:"xs",class:"h-[1lh] min-h-[1em] w-[8ch]"})})]})]})]}),u("div",{"aria-hidden":!0,class:"flex items-center",children:u(J,{name:"chevron-right",class:"text-copy-neutral-icon"})})]})},Wm=({state:e,fetchNextPage:t,config:n,remainingItems:r})=>{const{t:o}=ne(),i=Math.min(ct,r);return e==="revalidating"?u("ul",{class:"flex flex-col gap-3","aria-hidden":!0,children:Array.from({length:ct}).map((a,s)=>u("li",{children:u(Po,{seed:s,animationDelay:(s-4)*.1,config:n})},s))}):u("button",{type:"button",class:Fe({variant:"neutral",class:"w-full max-w-[45rem] self-center py-2"}),onClick:t,children:[o("load_more_count",{count:i})," ",o("of_remaining_count",{count:r})]})},zm=({state:e,apiClient:t,logger:n,jobCardConfig:r,initialData:o,onResultsUpdate:i,onJobClick:a,onPaginate:s,mode:l,afterResults:d})=>u(L,{children:Array.from({length:e.page}).map((f,c)=>{const p=c===e.page-1;return u(qt,{Fallback:je,children:u(Bm,{state:e,apiClient:t,logger:n,page:c+1,isFirst:c===0,isLast:p,fetchNextPage:()=>{s(e.page+1)},jobCardConfig:r,initialData:o,onResultsUpdate:i,onJobClick:a,mode:l,afterResults:d},c)},c)})}),ta=({page:e})=>{const{t}=ne();return u("div",{"aria-hidden":!0,class:"text-copy-neutral-lowcontrast mx-auto flex w-full max-w-[45rem] gap-2 py-4",onClick:n=>{n.preventDefault()},children:[u("span",{class:"bg-wavy bg-neutral-3 flex-1 opacity-10"}),u("span",{class:"text-style-tag justify-center text-center",children:[t("page")," ",e]}),u("span",{class:"bg-wavy bg-neutral-3 flex-1 opacity-10"})]})},Bm=({state:e,apiClient:t,logger:n,page:r,isFirst:o,isLast:i,fetchNextPage:a,jobCardConfig:s,initialData:l,onResultsUpdate:d,onJobClick:f,afterResults:c})=>{const{t:p}=ne(),h=r===1?l:void 0,{data:v,error:g,queryState:y,swr:m}=rn(Yt(Kr({state:e,baseKey:r.toString()}),()=>Ea({apiClient:t,logger:n,state:e,page:r,t:p}),{...Pn,fallbackData:h}));switch(I(()=>{v&&o&&d&&d({totalCount:v.pagination.total})},[v,o,d]),y){case"idle":return null;case"loading":return u(L,{children:[o?u("div",{class:"flex w-full max-w-[45rem] items-center gap-2 self-center",children:[u("div",{class:"flex-1"}),u("p",{class:"animate-skeleton text-copy-neutral-lowcontrast text-style-tag m-0 justify-center p-0 text-center",children:u(Bt,{chars:8})}),u("div",{class:"flex flex-1 justify-end",children:c})]}):u(ta,{page:r}),u("ul",{class:"flex w-full max-w-[45rem] flex-col gap-3 self-center","aria-hidden":!0,children:Array.from({length:ct}).map((_,w)=>u("li",{children:u(Po,{seed:w,animationDelay:(w-ct)*.1,config:s})},w))})]});case"error":return u(je,{error:new Error(p("jobs_loading_error"),{cause:g}),resetError:()=>m.mutate()});case"revalidating":case"loaded":{if(oa(v.pagination.current_page===r,"Received wrong page from server"),v.pagination.total===0)return u("div",{class:"mx-auto flex flex-col items-center gap-2 px-2 py-4 text-center",children:[u(J,{"aria-hidden":!0,name:"magnifier",class:"text-copy-neutral-lowcontrast"}),u("div",{class:"flex flex-col items-center gap-1",children:[u("p",{class:"text-copy-neutral text-style-job-heading",children:p("no_jobs_found")}),u("p",{class:"text-copy-neutral-lowcontrast text-style-tag [text-wrap:pretty]",children:p("no_jobs_found_description")})]})]});const _=v.pagination.last_page!==v.pagination.current_page,w=r*ct,b=Math.max(v.pagination.total-w,0),x=$=>{f($,r)};return u(L,{children:[o?u("div",{class:"flex w-full max-w-[45rem] items-center gap-2 self-center",children:[u("div",{class:"flex-1"}),u("p",{class:"text-copy-neutral-lowcontrast text-style-tag m-0 justify-center p-0 text-center",children:p("jobs_found",{count:v.pagination.total})}),u("div",{class:"flex flex-1 justify-end",children:c})]}):u(ta,{page:r}),u("ul",{"aria-label":`Page ${r}`,class:"flex w-full max-w-[45rem] flex-col gap-3 self-center",children:v.results.map($=>u("li",{class:"ease-expo-out duration-slow transition-opacity",style:{opacity:y==="revalidating"?.33:1},children:u(lc,{job:$,onJobClick:x,config:s})},$.id))}),_&&i&&u(Wm,{state:y,fetchNextPage:a,config:s,remainingItems:b})]})}default:bt(y)}},qm=po(()=>Promise.resolve().then(()=>require("./map-65730508.cjs")).then(e=>e.Map)),Km=({state:e,apiClient:t,logger:n,mapConfig:r,onGeoChange:o,afterResults:i,onJobClick:a,jobCardConfig:s})=>{var g,y;const{t:l}=ne(),[d,f]=P(new AbortController),c=ka("(max-width: 767px)"),p=j(m=>{o(m),d.abort(),f(new AbortController)},[o,d]),h=rn(Yt(["map",e],()=>Gc({apiClient:t,logger:n,state:e,t:l,signal:d.signal}),Pn));if(h.queryState==="error")return u(je,{error:new Error(l("jobs_loading_error"),{cause:h.error}),resetError:()=>h.swr.mutate()});const v=h.queryState==="loaded"||h.queryState==="revalidating";return u(L,{children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"flex-1"}),u("p",{class:"text-copy-neutral-lowcontrast text-style-tag m-0 justify-center p-0 text-center",children:v?h.data.results.length!==0&&l("map_jobs_showing",{count:h.data.results.length}):u("div",{class:"animate-skeleton",children:u(Bt,{chars:8})})}),u("div",{class:"flex flex-1 justify-end",children:i})]}),u("div",{class:"theme-fill:bg-neutral-2 theme-stroke:bg-lowest ring-px theme-fill:ring-neutral-3 theme-stroke:ring-neutral-3 theme-soft:rounded-lg theme-rounded:rounded-xl relative flex h-auto flex-col items-stretch overflow-hidden md:h-[70svh] md:flex-row",children:[u("div",{class:"md:min-w-80 aspect-square flex-1 md:order-2 md:aspect-auto",children:v?u(xt,{fallback:u("div",{class:"animate-skeleton bg-neutral-6 h-full w-full"}),children:u(qm,{config:r,mapData:h,autoFit:((g=e.geo)==null?void 0:g.type)!=="bounds",onBoundsChange:p})}):u("div",{class:"animate-skeleton bg-neutral-6 h-full w-full"})}),u("ul",{class:"flex h-full w-full snap-x snap-proximity scroll-px-4 gap-3 overflow-auto p-4 md:order-1 md:max-w-xl md:flex-col",children:[((y=h.data)==null?void 0:y.results.length)===0?u("div",{class:"mx-auto flex h-full w-full flex-col items-center justify-center gap-2 text-center",children:[u(J,{"aria-hidden":!0,name:"magnifier",class:"text-copy-neutral-lowcontrast"}),u("div",{class:"flex flex-col items-center gap-1",children:[u("p",{class:"text-copy-neutral text-style-job-heading",children:l("no_jobs_found")}),u("p",{class:"text-copy-neutral-lowcontrast text-style-tag [text-wrap:pretty]",children:l("no_jobs_found_description")})]})]}):null,v?h.data.results.map(m=>u("li",{class:"ease-expo-out duration-slow min-w-[calc(100%-1rem)] snap-start transition-opacity",style:{opacity:h.queryState==="revalidating"?.33:1},children:u(lc,{job:m,onJobClick:_=>a(_,1),config:s,size:c?"sm":void 0})},m.id)):Array.from({length:6}).map((m,_)=>u("li",{children:u(Po,{seed:_,animationDelay:(_-6)*.1,config:s})},_))]})]})]})},na=fe({base:"flex items-center justify-center cursor-pointer text-style-tag rounded-interactive active:scale-95 transition-all duration-snappy pl-2 pr-2.5 py-1.5 gap-1",variants:{active:{true:"bg-lowest text-neutral-12 shadow-sm animate-appear-tag",false:"text-neutral-10 hover:text-neutral-12"}},defaultVariants:{active:!1}}),Gm=({value:e,onValueChange:t})=>{const{t:n}=ne();return u("div",{class:"bg-neutral-3 rounded-interactive ring-neutral-3 mr-[3px] inline-flex ring-[3px]",children:[u("button",{type:"button","aria-pressed":e==="list",class:na({active:e==="list"}),onClick:()=>t("list"),children:[u(J,{name:"list",class:"size-5"}),u("span",{children:n("list")})]}),u("button",{type:"button","aria-pressed":e==="map",class:na({active:e==="map"}),onClick:()=>t("map"),children:[u(J,{name:"map",class:"size-5"}),u("span",{children:n("map")})]})]})},Ym=e=>{const t=e.state.view,n=e.mapConfig&&e.mapConfig.enabled?u(Gm,{value:t,onValueChange:e.onViewChange}):null;return t==="list"?u(zm,{afterResults:n,...e}):u(Km,{...e,afterResults:n})},Fn=(e,t="value")=>e.reduce((n,r)=>{switch(r.select){case"one":{const o=r.value??r[t],i=typeof o=="string"?o:o==null?void 0:o[0];n[r.key]={select:r.select,value:i};break}case"many":{const o=r.value??r[t],i=typeof o=="string"?[o]:Array.isArray(o)?o:[];n[r.key]={select:r.select,value:i};break}default:bt(r.select)}return n},{}),Pr=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>{const r=n==null?void 0:n.value;return[t,Array.isArray(r)?r:r?[r]:[]]}).filter(([,t])=>t!==void 0&&t.length>0)),ra=e=>(e==null?void 0:e.type)==="bounds"?void 0:e,Zm=({apiClient:e,logger:t,properties:n,analytics:r,initialData:o,onStateChange:i,params:a})=>{var C,E,S,A;const{t:s}=ne(),l=D(null),d=ee(()=>Fn(n,"defaultValue"),[n]),[f,c]=P(!0),[p,h]=P(()=>typeof a.initialState=="function"?a.initialState(a):a.initialState),[v,g]=P(0),{onJobClick:y,analyticsPaginate:m}=Jm({appRef:l,analytics:r,state:p,hasInteracted:!f,totalCount:v,defaultFilters:d}),_=j(T=>{h(k=>{if(k.page===T)return k;const R={...k,page:T};return i==null||i(R),R}),m(T)},[m,i]),w=j(T=>{h(k=>{const R={...k,view:T};return i==null||i(R),R})},[i]),b=j(T=>{h(k=>{if(!k.query&&!T||k.query===T)return k;c(!1);const R=ra(k.geo),N={...k,query:T,geo:R,page:1};return i==null||i(N),N})},[i]),x=j(T=>{c(!1),h(k=>{const R={...k,geo:T};return i==null||i(R),R})},[i]),$=j(()=>{h(T=>{const k={...T,filters:Fn(n,"defaultValue"),query:"",geo:void 0,page:1};return i==null||i(k),k})},[i,n]);return u("div",{ref:l,class:St("ijs-app font-family-default font-weight-default font-style-default flex min-h-screen flex-col gap-4",{"reduce-motion":(C=a.theme.accessibility)==null?void 0:C.reducedMotion},jr(a.theme)),children:[u(qt,{Fallback:je,children:u("div",{class:"flex flex-col gap-2",children:[u("div",{class:"px-4",children:u("div",{class:"bg-section-strong-bg ring-section-weak-stroke rounded-section ring-px lg:ring-width-section flex flex-col gap-4 p-4 md:flex-row",children:[u("section",{class:"flex flex-1 flex-col gap-1",children:[u("p",{class:"text-style-filter text-copy-neutral font-style-filter font-weight-filter",children:s("search_label")}),(E=a.naturalLanguageSearch)!=null&&E.enabled?u(Mh,{value:p.query,onValueChange:b,options:a.naturalLanguageSearch}):a.enableKeywordSearch?u(Nh,{value:p.query,onValueChange:b}):null]}),(S=a.geolocation)!=null&&S.enabled?u("section",{class:"flex flex-1 flex-col gap-1",children:[u("p",{class:"text-style-filter text-copy-neutral font-style-filter font-weight-filter",children:s("geo_label")}),u(Rh,{value:p.geo,onValueChange:T=>{c(!1),h(k=>{const R={...k,geo:T,page:1};return i==null||i(R),R}),m(1)},logger:t})]}):null]})}),u(vp,{state:p,onFilterValueChange:(T,k)=>{c(!1),h(R=>{const N={...R.filters,[T]:k},K=ra(R.geo),Y={...R,filters:N,geo:K,page:1};return i==null||i(Y),Y}),m(1)},onResetFilters:$,properties:n,logger:t,apiClient:e,alerts:a.alerts,theme:a.theme,widgetId:a.widgetId})]})}),u("section",{class:"flex flex-col gap-4 overflow-hidden px-4 py-4",children:[u(qt,{Fallback:je,children:u(Ym,{state:p,logger:t,apiClient:e,jobCardConfig:a.jobCard,mapConfig:a.map,initialData:f?o==null?void 0:o.jobs:void 0,onResultsUpdate:T=>{g(T.totalCount)},onJobClick:y,onPaginate:_,mode:(A=a.naturalLanguageSearch)!=null&&A.enabled?"vector":"query",onGeoChange:x,onViewChange:w})}),a.feedback?u("div",{class:"flex flex-wrap items-center justify-center gap-2",children:[u("p",{class:"font-family-default text-balance font-style-default text-style-job-card-info text-copy-neutral-lowcontrast",children:s("feedback")}),u("div",{"data-widget":"inploi-feedback","data-key":"job-search"})]}):null]})]})},Jm=({appRef:e,analytics:t,state:n,defaultFilters:r,totalCount:o,hasInteracted:i})=>{const a=j((d=1)=>({query:n.query,mode:n.mode,filters:Pr(n.filters),default_filters:Pr(r),total_count:o,page_size:ct,page:d}),[n.query,n.mode,n.filters,r,o]);return sl(e,{minViewTime:2e3,onView:()=>{t.log({event:"VIEW_SEARCH",properties:a()})}}),I(()=>{const d=window.setTimeout(()=>{i&&(!n.query&&!Object.keys(Pr(n.filters)).length||o!==0&&t.log({event:"SEARCH_SETTLE",properties:a()}))},5e3);return()=>{clearTimeout(d)}},[t,i,a,o,n.query,n.filters]),{onJobClick:(d,f)=>{t.log({event:"SEARCH_JOB_CLICK",properties:{job_id:d.id,...a(f)}})},analyticsPaginate:d=>{t.log({event:"SEARCH_PAGINATE",properties:a(d)})}}};exports.D=Ct;exports.E=io;exports.ErrorBoundary=qt;exports.IconSpritesheet=al;exports.JOB_SEARCH_WIDGET_ID=Vc;exports.JobSearch=Zm;exports.TranslationProvider=tl;exports.UnstyledErrorView=ol;exports._=D;exports.commonjsGlobal=Wt;exports.createTFunction=nl;exports.generateColorThemeCss=vl;exports.getDefaultExportFromCjs=vo;exports.getGeolocationFromSearchParams=mh;exports.getJobSearchResults=Ea;exports.getModeFromSearchParams=nc;exports.getStatefulPropertiesFromSearchParams=tc;exports.getViewFromSearchParams=rc;exports.getWidgetStateFromSearchParams=gh;exports.h=P;exports.invariant=oa;exports.k=L;exports.o=u;exports.p=I;exports.setWidgetStateToSearchParams=vh;exports.useDebouncedValue=oc;exports.useTranslation=ne;exports.y=O;
|
|
60
|
+
`)},fd=0,mt=[];function pd(e){var t=D([]),n=D([0,0]),r=D(),o=P(fd++)[0],i=P(function(){return vs()})[0],a=D(e);I(function(){a.current=e},[e]),I(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=Nu([e.lockRef.current],(e.shards||[]).map(Ci),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=j(function(g,y){if("touches"in g&&g.touches.length===2)return!a.current.allowPinchZoom;var m=mn(g),_=n.current,w="deltaX"in g?g.deltaX:_[0]-m[0],b="deltaY"in g?g.deltaY:_[1]-m[1],x,$=g.target,C=Math.abs(w)>Math.abs(b)?"h":"v";if("touches"in g&&C==="h"&&$.type==="range")return!1;var E=$i(C,$);if(!E)return!0;if(E?x=C:(x=C==="v"?"h":"v",E=$i(C,$)),!E)return!1;if(!r.current&&"changedTouches"in g&&(w||b)&&(r.current=x),!x)return!0;var S=r.current||x;return ld(S,y,g,S==="h"?w:b,!0)},[]),l=j(function(g){var y=g;if(!(!mt.length||mt[mt.length-1]!==i)){var m="deltaY"in y?Ei(y):mn(y),_=t.current.filter(function(x){return x.name===y.type&&x.target===y.target&&ud(x.delta,m)})[0];if(_&&_.should){y.cancelable&&y.preventDefault();return}if(!_){var w=(a.current.shards||[]).map(Ci).filter(Boolean).filter(function(x){return x.contains(y.target)}),b=w.length>0?s(y,w[0]):!a.current.noIsolation;b&&y.cancelable&&y.preventDefault()}}},[]),d=j(function(g,y,m,_){var w={name:g,delta:y,target:m,should:_};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(b){return b!==w})},1)},[]),f=j(function(g){n.current=mn(g),r.current=void 0},[]),c=j(function(g){d(g.type,Ei(g),g.target,s(g,e.lockRef.current))},[]),p=j(function(g){d(g.type,mn(g),g.target,s(g,e.lockRef.current))},[]);I(function(){return mt.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,vt),document.addEventListener("touchmove",l,vt),document.addEventListener("touchstart",f,vt),function(){mt=mt.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,vt),document.removeEventListener("touchmove",l,vt),document.removeEventListener("touchstart",f,vt)}},[]);var h=e.removeScrollBar,v=e.inert;return O(L,null,v?O(i,{styles:dd(o)}):null,h?O(nd,{gapMode:"margin"}):null)}const hd=Wu(gs,pd);var bs=q(function(e,t){return O(Bn,xe({},e,{ref:t,sideCar:hd}))});bs.classNames=Bn.classNames;const ws=bs;var gd=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_t=new WeakMap,_n=new WeakMap,yn={},Sr=0,xs=function(e){return e&&(e.host||xs(e.parentNode))},vd=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=xs(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})},md=function(e,t,n,r){var o=vd(t,Array.isArray(e)?e:[e]);yn[n]||(yn[n]=new WeakMap);var i=yn[n],a=[],s=new Set,l=new Set(o),d=function(c){!c||s.has(c)||(s.add(c),d(c.parentNode))};o.forEach(d);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(s.has(p))f(p);else try{var h=p.getAttribute(r),v=h!==null&&h!=="false",g=(_t.get(p)||0)+1,y=(i.get(p)||0)+1;_t.set(p,g),i.set(p,y),a.push(p),g===1&&v&&_n.set(p,!0),y===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",p,m)}})};return f(t),s.clear(),Sr++,function(){a.forEach(function(c){var p=_t.get(c)-1,h=i.get(c)-1;_t.set(c,p),i.set(c,h),p||(_n.has(c)||c.removeAttribute(r),_n.delete(c)),h||c.removeAttribute(n)}),Sr--,Sr||(_t=new WeakMap,_t=new WeakMap,_n=new WeakMap,yn={})}},$s=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||gd(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),md(r,o,n,"aria-hidden")):function(){return null}};const Es="Dialog",[Cs,t_]=yo(Es),[_d,rt]=Cs(Es),yd=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=D(null),l=D(null),[d=!1,f]=as({prop:r,defaultProp:o,onChange:i});return O(_d,{scope:t,triggerRef:s,contentRef:l,contentId:$n(),titleId:$n(),descriptionId:$n(),open:d,onOpenChange:f,onOpenToggle:j(()=>f(c=>!c),[f]),modal:a},n)},bd="DialogTrigger",wd=q((e,t)=>{const{__scopeDialog:n,...r}=e,o=rt(bd,n),i=Oe(t,o.triggerRef);return O(nt.button,B({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":bo(o.open)},r,{ref:i,onClick:ge(e.onClick,o.onOpenToggle)}))}),Ss="DialogPortal",[xd,Os]=Cs(Ss,{forceMount:void 0}),$d=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=rt(Ss,t);return O(xd,{scope:t,forceMount:n},Ce.map(r,a=>O(Rt,{present:n||i.open},O(ds,{asChild:!0,container:o},a))))},Jr="DialogOverlay",Ed=q((e,t)=>{const n=Os(Jr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=rt(Jr,e.__scopeDialog);return i.modal?O(Rt,{present:r||i.open},O(Cd,B({},o,{ref:t}))):null}),Cd=q((e,t)=>{const{__scopeDialog:n,...r}=e,o=rt(Jr,n);return O(ws,{as:zn,allowPinchZoom:!0,shards:[o.contentRef]},O(nt.div,B({"data-state":bo(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Zt="DialogContent",Sd=q((e,t)=>{const n=Os(Zt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=rt(Zt,e.__scopeDialog);return O(Rt,{present:r||i.open},i.modal?O(Od,B({},o,{ref:t})):O(Ad,B({},o,{ref:t})))}),Od=q((e,t)=>{const n=rt(Zt,e.__scopeDialog),r=D(null),o=Oe(t,n.contentRef,r);return I(()=>{const i=r.current;if(i)return $s(i)},[]),O(As,B({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ge(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:ge(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:ge(e.onFocusOutside,i=>i.preventDefault())}))}),Ad=q((e,t)=>{const n=rt(Zt,e.__scopeDialog),r=D(!1),o=D(!1);return O(As,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()}}))}),As=q((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=rt(Zt,n),l=D(null),d=Oe(t,l);return fs(),O(L,null,O(ls,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},O(ss,B({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":bo(s.open)},a,{ref:d,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function bo(e){return e?"open":"closed"}const Td=yd,kd=wd,Pd=$d,Rd=Ed,Dd=Sd,Nd=["top","right","bottom","left"],Ee=Math.min,se=Math.max,Dn=Math.round,bn=Math.floor,Je=e=>({x:e,y:e}),Id={left:"right",right:"left",bottom:"top",top:"bottom"},Ld={start:"end",end:"start"};function Xr(e,t,n){return se(e,Ee(t,n))}function Ve(e,t){return typeof e=="function"?e(t):e}function He(e){return e.split("-")[0]}function Dt(e){return e.split("-")[1]}function wo(e){return e==="x"?"y":"x"}function xo(e){return e==="y"?"height":"width"}function Xe(e){return["top","bottom"].includes(He(e))?"y":"x"}function $o(e){return wo(Xe(e))}function Md(e,t,n){n===void 0&&(n=!1);const r=Dt(e),o=$o(e),i=xo(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Nn(a)),[a,Nn(a)]}function Fd(e){const t=Nn(e);return[Qr(e),t,Qr(t)]}function Qr(e){return e.replace(/start|end/g,t=>Ld[t])}function jd(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 Vd(e,t,n,r){const o=Dt(e);let i=jd(He(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Qr)))),i}function Nn(e){return e.replace(/left|right|bottom|top/g,t=>Id[t])}function Hd(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ts(e){return typeof e!="number"?Hd(e):{top:e,right:e,bottom:e,left:e}}function In(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 Si(e,t,n){let{reference:r,floating:o}=e;const i=Xe(t),a=$o(t),s=xo(a),l=He(t),d=i==="y",f=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(l){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:c};break;case"left":h={x:r.x-o.width,y:c};break;default:h={x:r.x,y:r.y}}switch(Dt(t)){case"start":h[a]-=p*(n&&d?-1:1);break;case"end":h[a]+=p*(n&&d?-1:1);break}return h}const Ud=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 d=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:c}=Si(d,r,l),p=r,h={},v=0;for(let g=0;g<s.length;g++){const{name:y,fn:m}=s[g],{x:_,y:w,data:b,reset:x}=await m({x:f,y:c,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:d,platform:a,elements:{reference:e,floating:t}});f=_??f,c=w??c,h={...h,[y]:{...h[y],...b}},x&&v<=50&&(v++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(d=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:f,y:c}=Si(d,p,l)),g=-1)}return{x:f,y:c,placement:p,strategy:o,middlewareData:h}};async function Jt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:p=!1,padding:h=0}=Ve(t,e),v=Ts(h),y=s[p?c==="floating"?"reference":"floating":c],m=In(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:d,rootBoundary:f,strategy:l})),_=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)),b=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=In(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:w,strategy:l}):_);return{top:(m.top-x.top+v.top)/b.y,bottom:(x.bottom-m.bottom+v.bottom)/b.y,left:(m.left-x.left+v.left)/b.x,right:(x.right-m.right+v.right)/b.x}}const Wd=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:d,padding:f=0}=Ve(e,t)||{};if(d==null)return{};const c=Ts(f),p={x:n,y:r},h=$o(o),v=xo(h),g=await a.getDimensions(d),y=h==="y",m=y?"top":"left",_=y?"bottom":"right",w=y?"clientHeight":"clientWidth",b=i.reference[v]+i.reference[h]-p[h]-i.floating[v],x=p[h]-i.reference[h],$=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let C=$?$[w]:0;(!C||!await(a.isElement==null?void 0:a.isElement($)))&&(C=s.floating[w]||i.floating[v]);const E=b/2-x/2,S=C/2-g[v]/2-1,A=Ee(c[m],S),T=Ee(c[_],S),k=A,R=C-g[v]-T,N=C/2-g[v]/2+E,K=Xr(k,N,R),Y=!l.arrow&&Dt(o)!=null&&N!==K&&i.reference[v]/2-(N<k?A:T)-g[v]/2<0,F=Y?N<k?N-k:N-R:0;return{[h]:p[h]+F,data:{[h]:K,centerOffset:N-K-F,...Y&&{alignmentOffset:F}},reset:Y}}}),zd=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:d}=t,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...y}=Ve(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const m=He(o),_=Xe(s),w=He(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(d.floating)),x=p||(w||!g?[Nn(s)]:Fd(s)),$=v!=="none";!p&&$&&x.push(...Vd(s,g,v,b));const C=[s,...x],E=await Jt(t,y),S=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&S.push(E[m]),c){const N=Md(o,a,b);S.push(E[N[0]],E[N[1]])}if(A=[...A,{placement:o,overflows:S}],!S.every(N=>N<=0)){var T,k;const N=(((T=i.flip)==null?void 0:T.index)||0)+1,K=C[N];if(K)return{data:{index:N,overflows:A},reset:{placement:K}};let Y=(k=A.filter(F=>F.overflows[0]<=0).sort((F,G)=>F.overflows[1]-G.overflows[1])[0])==null?void 0:k.placement;if(!Y)switch(h){case"bestFit":{var R;const F=(R=A.filter(G=>{if($){const Z=Xe(G.placement);return Z===_||Z==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(Z=>Z>0).reduce((Z,jt)=>Z+jt,0)]).sort((G,Z)=>G[1]-Z[1])[0])==null?void 0:R[0];F&&(Y=F);break}case"initialPlacement":Y=s;break}if(o!==Y)return{reset:{placement:Y}}}return{}}}};function Oi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ai(e){return Nd.some(t=>e[t]>=0)}const Bd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ve(e,t);switch(r){case"referenceHidden":{const i=await Jt(t,{...o,elementContext:"reference"}),a=Oi(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Ai(a)}}}case"escaped":{const i=await Jt(t,{...o,altBoundary:!0}),a=Oi(i,n.floating);return{data:{escapedOffsets:a,escaped:Ai(a)}}}default:return{}}}}};async function qd(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=He(n),s=Dt(n),l=Xe(n)==="y",d=["left","top"].includes(a)?-1:1,f=i&&l?-1:1,c=Ve(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:v}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...c};return s&&typeof v=="number"&&(h=s==="end"?v*-1:v),l?{x:h*f,y:p*d}:{x:p*d,y:h*f}}const Kd=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 qd(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}}}}},Gd=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:y=>{let{x:m,y:_}=y;return{x:m,y:_}}},...l}=Ve(e,t),d={x:n,y:r},f=await Jt(t,l),c=Xe(He(o)),p=wo(c);let h=d[p],v=d[c];if(i){const y=p==="y"?"top":"left",m=p==="y"?"bottom":"right",_=h+f[y],w=h-f[m];h=Xr(_,h,w)}if(a){const y=c==="y"?"top":"left",m=c==="y"?"bottom":"right",_=v+f[y],w=v-f[m];v=Xr(_,v,w)}const g=s.fn({...t,[p]:h,[c]:v});return{...g,data:{x:g.x-n,y:g.y-r}}}}},Yd=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:d=!0}=Ve(e,t),f={x:n,y:r},c=Xe(o),p=wo(c);let h=f[p],v=f[c];const g=Ve(s,t),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const w=p==="y"?"height":"width",b=i.reference[p]-i.floating[w]+y.mainAxis,x=i.reference[p]+i.reference[w]-y.mainAxis;h<b?h=b:h>x&&(h=x)}if(d){var m,_;const w=p==="y"?"width":"height",b=["top","left"].includes(He(o)),x=i.reference[c]-i.floating[w]+(b&&((m=a.offset)==null?void 0:m[c])||0)+(b?0:y.crossAxis),$=i.reference[c]+i.reference[w]+(b?0:((_=a.offset)==null?void 0:_[c])||0)-(b?y.crossAxis:0);v<x?v=x:v>$&&(v=$)}return{[p]:h,[c]:v}}}},Zd=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}=Ve(e,t),l=await Jt(t,s),d=He(n),f=Dt(n),c=Xe(n)==="y",{width:p,height:h}=r.floating;let v,g;d==="top"||d==="bottom"?(v=d,g=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=d,v=f==="end"?"top":"bottom");const y=h-l.top-l.bottom,m=p-l.left-l.right,_=Ee(h-l[v],y),w=Ee(p-l[g],m),b=!t.middlewareData.shift;let x=_,$=w;if(c?$=f||b?Ee(w,m):m:x=f||b?Ee(_,y):y,b&&!f){const E=se(l.left,0),S=se(l.right,0),A=se(l.top,0),T=se(l.bottom,0);c?$=p-2*(E!==0||S!==0?E+S:se(l.left,l.right)):x=h-2*(A!==0||T!==0?A+T:se(l.top,l.bottom))}await a({...t,availableWidth:$,availableHeight:x});const C=await o.getDimensions(i.floating);return p!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function Nt(e){return ks(e)?(e.nodeName||"").toLowerCase():"#document"}function ce(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function We(e){var t;return(t=(ks(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ks(e){return e instanceof Node||e instanceof ce(e).Node}function ve(e){return e instanceof Element||e instanceof ce(e).Element}function Se(e){return e instanceof HTMLElement||e instanceof ce(e).HTMLElement}function Ti(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ce(e).ShadowRoot}function sn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=me(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Jd(e){return["table","td","th"].includes(Nt(e))}function qn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Eo(e){const t=Co(),n=ve(e)?me(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 Xd(e){let t=Qe(e);for(;Se(t)&&!Tt(t);){if(Eo(t))return t;if(qn(t))return null;t=Qe(t)}return null}function Co(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Tt(e){return["html","body","#document"].includes(Nt(e))}function me(e){return ce(e).getComputedStyle(e)}function Kn(e){return ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qe(e){if(Nt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ti(e)&&e.host||We(e);return Ti(t)?t.host:t}function Ps(e){const t=Qe(e);return Tt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Se(t)&&sn(t)?t:Ps(t)}function Xt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ps(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=ce(o);if(i){const s=eo(a);return t.concat(a,a.visualViewport||[],sn(o)?o:[],s&&n?Xt(s):[])}return t.concat(o,Xt(o,[],n))}function eo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Rs(e){const t=me(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Se(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Dn(n)!==i||Dn(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function So(e){return ve(e)?e:e.contextElement}function Et(e){const t=So(e);if(!Se(t))return Je(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Rs(t);let a=(i?Dn(n.width):n.width)/r,s=(i?Dn(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Qd=Je(0);function Ds(e){const t=ce(e);return!Co()||!t.visualViewport?Qd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ef(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ce(e)?!1:t}function pt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=So(e);let a=Je(1);t&&(r?ve(r)&&(a=Et(r)):a=Et(e));const s=ef(i,n,r)?Ds(i):Je(0);let l=(o.left+s.x)/a.x,d=(o.top+s.y)/a.y,f=o.width/a.x,c=o.height/a.y;if(i){const p=ce(i),h=r&&ve(r)?ce(r):r;let v=p,g=eo(v);for(;g&&r&&h!==v;){const y=Et(g),m=g.getBoundingClientRect(),_=me(g),w=m.left+(g.clientLeft+parseFloat(_.paddingLeft))*y.x,b=m.top+(g.clientTop+parseFloat(_.paddingTop))*y.y;l*=y.x,d*=y.y,f*=y.x,c*=y.y,l+=w,d+=b,v=ce(g),g=eo(v)}}return In({width:f,height:c,x:l,y:d})}function tf(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=We(r),s=t?qn(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},d=Je(1);const f=Je(0),c=Se(r);if((c||!c&&!i)&&((Nt(r)!=="body"||sn(a))&&(l=Kn(r)),Se(r))){const p=pt(r);d=Et(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+f.x,y:n.y*d.y-l.scrollTop*d.y+f.y}}function nf(e){return Array.from(e.getClientRects())}function Ns(e){return pt(We(e)).left+Kn(e).scrollLeft}function rf(e){const t=We(e),n=Kn(e),r=e.ownerDocument.body,o=se(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=se(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ns(e);const s=-n.scrollTop;return me(r).direction==="rtl"&&(a+=se(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function of(e,t){const n=ce(e),r=We(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const d=Co();(!d||d&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function af(e,t){const n=pt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Se(e)?Et(e):Je(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,d=r*i.y;return{width:a,height:s,x:l,y:d}}function ki(e,t,n){let r;if(t==="viewport")r=of(e,n);else if(t==="document")r=rf(We(e));else if(ve(t))r=af(t,n);else{const o=Ds(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return In(r)}function Is(e,t){const n=Qe(e);return n===t||!ve(n)||Tt(n)?!1:me(n).position==="fixed"||Is(n,t)}function sf(e,t){const n=t.get(e);if(n)return n;let r=Xt(e,[],!1).filter(s=>ve(s)&&Nt(s)!=="body"),o=null;const i=me(e).position==="fixed";let a=i?Qe(e):e;for(;ve(a)&&!Tt(a);){const s=me(a),l=Eo(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||sn(a)&&!l&&Is(e,a))?r=r.filter(f=>f!==a):o=s,a=Qe(a)}return t.set(e,r),r}function cf(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?qn(t)?[]:sf(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((d,f)=>{const c=ki(t,f,o);return d.top=se(c.top,d.top),d.right=Ee(c.right,d.right),d.bottom=Ee(c.bottom,d.bottom),d.left=se(c.left,d.left),d},ki(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function lf(e){const{width:t,height:n}=Rs(e);return{width:t,height:n}}function uf(e,t,n){const r=Se(t),o=We(t),i=n==="fixed",a=pt(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Je(0);if(r||!r&&!i)if((Nt(t)!=="body"||sn(o))&&(s=Kn(t)),r){const c=pt(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=Ns(o));const d=a.left+s.scrollLeft-l.x,f=a.top+s.scrollTop-l.y;return{x:d,y:f,width:a.width,height:a.height}}function Or(e){return me(e).position==="static"}function Pi(e,t){return!Se(e)||me(e).position==="fixed"?null:t?t(e):e.offsetParent}function Ls(e,t){const n=ce(e);if(qn(e))return n;if(!Se(e)){let o=Qe(e);for(;o&&!Tt(o);){if(ve(o)&&!Or(o))return o;o=Qe(o)}return n}let r=Pi(e,t);for(;r&&Jd(r)&&Or(r);)r=Pi(r,t);return r&&Tt(r)&&Or(r)&&!Eo(r)?n:r||Xd(e)||n}const df=async function(e){const t=this.getOffsetParent||Ls,n=this.getDimensions,r=await n(e.floating);return{reference:uf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ff(e){return me(e).direction==="rtl"}const pf={convertOffsetParentRelativeRectToViewportRelativeRect:tf,getDocumentElement:We,getClippingRect:cf,getOffsetParent:Ls,getElementRects:df,getClientRects:nf,getDimensions:lf,getScale:Et,isElement:ve,isRTL:ff};function hf(e,t){let n=null,r;const o=We(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:d,top:f,width:c,height:p}=e.getBoundingClientRect();if(s||t(),!c||!p)return;const h=bn(f),v=bn(o.clientWidth-(d+c)),g=bn(o.clientHeight-(f+p)),y=bn(d),_={rootMargin:-h+"px "+-v+"px "+-g+"px "+-y+"px",threshold:se(0,Ee(1,l))||1};let w=!0;function b(x){const $=x[0].intersectionRatio;if($!==l){if(!w)return a();$?a(!1,$):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(b,{..._,root:o.ownerDocument})}catch{n=new IntersectionObserver(b,_)}n.observe(e)}return a(!0),i}function gf(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,d=So(e),f=o||i?[...d?Xt(d):[],...Xt(t)]:[];f.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const c=d&&s?hf(d,n):null;let p=-1,h=null;a&&(h=new ResizeObserver(m=>{let[_]=m;_&&_.target===d&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),d&&!l&&h.observe(d),h.observe(t));let v,g=l?pt(e):null;l&&y();function y(){const m=pt(e);g&&(m.x!==g.x||m.y!==g.y||m.width!==g.width||m.height!==g.height)&&n(),g=m,v=requestAnimationFrame(y)}return n(),()=>{var m;f.forEach(_=>{o&&_.removeEventListener("scroll",n),i&&_.removeEventListener("resize",n)}),c==null||c(),(m=h)==null||m.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const vf=Kd,mf=Gd,_f=zd,yf=Zd,bf=Bd,Ri=Wd,wf=Yd,xf=(e,t,n)=>{const r=new Map,o={platform:pf,...n},i={...o.platform,_c:r};return Ud(e,t,{...o,platform:i})};var Sn=typeof document<"u"?Ue:I;function Ln(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(!Ln(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)&&!Ln(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ms(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Di(e,t){const n=Ms(e);return Math.round(t*n)/n}function Ni(e){const t=D(e);return Sn(()=>{t.current=e}),t}function $f(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:d}=e,[f,c]=P({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=P(r);Ln(p,r)||h(r);const[v,g]=P(null),[y,m]=P(null),_=j(F=>{F!==$.current&&($.current=F,g(F))},[]),w=j(F=>{F!==C.current&&(C.current=F,m(F))},[]),b=i||v,x=a||y,$=D(null),C=D(null),E=D(f),S=l!=null,A=Ni(l),T=Ni(o),k=j(()=>{if(!$.current||!C.current)return;const F={placement:t,strategy:n,middleware:p};T.current&&(F.platform=T.current),xf($.current,C.current,F).then(G=>{const Z={...G,isPositioned:!0};R.current&&!Ln(E.current,Z)&&(E.current=Z,on(()=>{c(Z)}))})},[p,t,n,T]);Sn(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,c(F=>({...F,isPositioned:!1})))},[d]);const R=D(!1);Sn(()=>(R.current=!0,()=>{R.current=!1}),[]),Sn(()=>{if(b&&($.current=b),x&&(C.current=x),b&&x){if(A.current)return A.current(b,x,k);k()}},[b,x,k,A,S]);const N=ee(()=>({reference:$,floating:C,setReference:_,setFloating:w}),[_,w]),K=ee(()=>({reference:b,floating:x}),[b,x]),Y=ee(()=>{const F={position:n,left:0,top:0};if(!K.floating)return F;const G=Di(K.floating,f.x),Z=Di(K.floating,f.y);return s?{...F,transform:"translate("+G+"px, "+Z+"px)",...Ms(K.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:Z}},[n,s,K.floating,f.x,f.y]);return ee(()=>({...f,update:k,refs:N,elements:K,floatingStyles:Y}),[f,k,N,K,Y])}const Ef=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?Ri({element:r.current,padding:o}).fn(n):{}:r?Ri({element:r,padding:o}).fn(n):{}}}},Cf=(e,t)=>({...vf(e),options:[e,t]}),Sf=(e,t)=>({...mf(e),options:[e,t]}),Of=(e,t)=>({...wf(e),options:[e,t]}),Af=(e,t)=>({..._f(e),options:[e,t]}),Tf=(e,t)=>({...yf(e),options:[e,t]}),kf=(e,t)=>({...bf(e),options:[e,t]}),Pf=(e,t)=>({...Ef(e),options:[e,t]});function Rf(e){const[t,n]=P(void 0);return At(()=>{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,d=Array.isArray(l)?l[0]:l;a=d.inlineSize,s=d.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 Fs="Popper",[js,Vs]=yo(Fs),[Df,Hs]=js(Fs),Nf=e=>{const{__scopePopper:t,children:n}=e,[r,o]=P(null);return O(Df,{scope:t,anchor:r,onAnchorChange:o},n)},If="PopperAnchor",Lf=q((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Hs(If,n),a=D(null),s=Oe(t,a);return I(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:O(nt.div,B({},o,{ref:s}))}),Us="PopperContent",[Mf,n_]=js(Us),Ff=q((e,t)=>{var n,r,o,i,a,s,l,d;const{__scopePopper:f,side:c="bottom",sideOffset:p=0,align:h="center",alignOffset:v=0,arrowPadding:g=0,avoidCollisions:y=!0,collisionBoundary:m=[],collisionPadding:_=0,sticky:w="partial",hideWhenDetached:b=!1,updatePositionStrategy:x="optimized",onPlaced:$,...C}=e,E=Hs(Us,f),[S,A]=P(null),T=Oe(t,W=>A(W)),[k,R]=P(null),N=Rf(k),K=(n=N==null?void 0:N.width)!==null&&n!==void 0?n:0,Y=(r=N==null?void 0:N.height)!==null&&r!==void 0?r:0,F=c+(h!=="center"?"-"+h:""),G=typeof _=="number"?_:{top:0,right:0,bottom:0,left:0,..._},Z=Array.isArray(m)?m:[m],jt=Z.length>0,pe={padding:G,boundary:Z.filter(jf),altBoundary:jt},{refs:ze,floatingStyles:ot,placement:ln,isPositioned:Ae,middlewareData:Te}=$f({strategy:"fixed",placement:F,whileElementsMounted:(...W)=>gf(...W,{animationFrame:x==="always"}),elements:{reference:E.anchor},middleware:[Cf({mainAxis:p+Y,alignmentAxis:v}),y&&Sf({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?Of():void 0,...pe}),y&&Af({...pe}),Tf({...pe,apply:({elements:W,rects:ae,availableWidth:Be,availableHeight:X})=>{const{width:re,height:he}=ae.reference,at=W.floating.style;at.setProperty("--radix-popper-available-width",`${Be}px`),at.setProperty("--radix-popper-available-height",`${X}px`),at.setProperty("--radix-popper-anchor-width",`${re}px`),at.setProperty("--radix-popper-anchor-height",`${he}px`)}}),k&&Pf({element:k,padding:g}),Vf({arrowWidth:K,arrowHeight:Y}),b&&kf({strategy:"referenceHidden",...pe})]}),[Vt,er]=Ws(ln),gt=Ze($);At(()=>{Ae&&(gt==null||gt())},[Ae,gt]);const it=(o=Te.arrow)===null||o===void 0?void 0:o.x,un=(i=Te.arrow)===null||i===void 0?void 0:i.y,H=((a=Te.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[U,te]=P();return At(()=>{S&&te(window.getComputedStyle(S).zIndex)},[S]),O("div",{ref:ze.setFloating,"data-radix-popper-content-wrapper":"",style:{...ot,transform:Ae?ot.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(s=Te.transformOrigin)===null||s===void 0?void 0:s.x,(l=Te.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},O(Mf,{scope:f,placedSide:Vt,onArrowChange:R,arrowX:it,arrowY:un,shouldHideArrow:H},O(nt.div,B({"data-side":Vt,"data-align":er},C,{ref:T,style:{...C.style,animation:Ae?void 0:"none",opacity:(d=Te.hide)!==null&&d!==void 0&&d.referenceHidden?0:void 0}}))))});function jf(e){return e!==null}const Vf=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:l,middlewareData:d}=t,c=((n=d.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,p=c?0:e.arrowWidth,h=c?0:e.arrowHeight,[v,g]=Ws(s),y={start:"0%",center:"50%",end:"100%"}[g],m=((r=(o=d.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+p/2,_=((i=(a=d.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let w="",b="";return v==="bottom"?(w=c?y:`${m}px`,b=`${-h}px`):v==="top"?(w=c?y:`${m}px`,b=`${l.floating.height+h}px`):v==="right"?(w=`${-h}px`,b=c?y:`${_}px`):v==="left"&&(w=`${l.floating.width+h}px`,b=c?y:`${_}px`),{data:{x:w,y:b}}}});function Ws(e){const[t,n="center"]=e.split("-");return[t,n]}const Hf=Nf,Uf=Lf,Wf=Ff,zs="Popover",[Bs,r_]=yo(zs,[Vs]),Oo=Vs(),[zf,It]=Bs(zs),Bf=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=Oo(t),l=D(null),[d,f]=P(!1),[c=!1,p]=as({prop:r,defaultProp:o,onChange:i});return O(Hf,s,O(zf,{scope:t,contentId:$n(),triggerRef:l,open:c,onOpenChange:p,onOpenToggle:j(()=>p(h=>!h),[p]),hasCustomAnchor:d,onCustomAnchorAdd:j(()=>f(!0),[]),onCustomAnchorRemove:j(()=>f(!1),[]),modal:a},n))},qf="PopoverTrigger",Kf=q((e,t)=>{const{__scopePopover:n,...r}=e,o=It(qf,n),i=Oo(n),a=Oe(t,o.triggerRef),s=O(nt.button,B({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Gs(o.open)},r,{ref:a,onClick:ge(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?s:O(Uf,B({asChild:!0},i),s)}),qs="PopoverPortal",[Gf,Yf]=Bs(qs,{forceMount:void 0}),Zf=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=It(qs,t);return O(Gf,{scope:t,forceMount:n},O(Rt,{present:n||i.open},O(ds,{asChild:!0,container:o},r)))},Qt="PopoverContent",Jf=q((e,t)=>{const n=Yf(Qt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=It(Qt,e.__scopePopover);return O(Rt,{present:r||i.open},i.modal?O(Xf,B({},o,{ref:t})):O(Qf,B({},o,{ref:t})))}),Xf=q((e,t)=>{const n=It(Qt,e.__scopePopover),r=D(null),o=Oe(t,r),i=D(!1);return I(()=>{const a=r.current;if(a)return $s(a)},[]),O(ws,{as:zn,allowPinchZoom:!0},O(Ks,B({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ge(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),i.current||(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:ge(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,d=s.button===2||l;i.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:ge(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})))}),Qf=q((e,t)=>{const n=It(Qt,e.__scopePopover),r=D(!1),o=D(!1);return O(Ks,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()}}))}),Ks=q((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:f,...c}=e,p=It(Qt,n),h=Oo(n);return fs(),O(ls,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},O(ss,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>p.onOpenChange(!1)},O(Wf,B({"data-state":Gs(p.open),role:"dialog",id:p.contentId},h,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 Gs(e){return e?"open":"closed"}const ep=Bf,tp=Kf,np=Zf,rp=Jf,lt=fe({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}}),cn=fe({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}}),Ys=fe({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"}}),Zs=fe({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"}}}),Js=fe({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}}),op=fe({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"}}}),ip=({children:e,colorScheme:t})=>u("span",{class:op({colorScheme:t}),children:u("span",{class:"block w-[3ch] text-center tabular-nums",children:e})}),ap=(e,t)=>{const n=e.indexOf(t);return n===-1?[...e,t]:e.filter((r,o)=>o!==n)},Ii=e=>{var n;const t=Number((n=e.match(/\d/g))==null?void 0:n.join(""));return Number.isNaN(t)?0:t},sp=(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=Ii(r.value),a=Ii(o.value);return i-a});break}return t.order==="descending"&&n.reverse(),n},cp=(e,t)=>{if(e===null)return!1;const n=e[t.value];return n===void 0?!0:n===0},lp=(e,t)=>{const n=r=>r>99?"99+":r.toString();return n(e===null?t.jobs:e[t.value]??0)},up=({value:e,property:t,useQuery:n,isMobile:r,onValueChange:o,unfilteredQuery:i,onClose:a})=>{const{t:s}=ne(),l=rn(n()),d=ee(()=>{switch(l.queryState){case"error":case"idle":case"loading":return null;case"loaded":case"revalidating":{const v=l.data[t.key]??[];return Object.fromEntries(v.map(g=>[g.value,g.jobs]))}default:bt(l)}},[l,t.key]),f=Xs(e),c=f.length>0,[p,h]=P();return l.queryState==="error"?u(je,{error:new Error(s("filters_loading_error"),{cause:l.error}),resetError:()=>l.swr.mutate()}):u("div",{class:"theme-fill:bg-neutral-1 flex min-h-0 w-full flex-1 flex-col",children:[t.searchable&&u("div",{class:"border-b-px border-neutral-4",children:u("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:p,onInput:v=>h(v.currentTarget.value),placeholder:s("type_to_search")})}),(()=>{switch(i.queryState){case"error":return u(je,{error:new Error(s("filters_loading_error"),{cause:i.error}),class:"flex-1",resetError:()=>i.swr.mutate()});case"idle":case"loading":return u("div",{class:"flex px-4",children:u("div",{"aria-hidden":!0,class:lt({size:"lg",variant:"neutralStrong",interactive:!0,class:"animate-skeleton flex-1 cursor-default opacity-20 active:-scale-100"}),children:u("span",{class:"inline-block w-[10ch]"})})});case"revalidating":case"loaded":{const v=i.data[t.key]??[],g=p&&p.length>1?v.filter(_=>_.label.toLowerCase().includes(p.toLowerCase())):v,y=[];for(const _ of g){if(_.label.length<1)continue;const w={..._,results:lp(d,_),disabled:cp(d,_)};switch(t.results){case"only-available":w.disabled===!1&&y.push(w);break;default:y.push(w)}}return y.find(_=>!_.disabled)?u("ul",{class:Ys(),children:sp(y,t.sortSuggestions).map(_=>{const w=f.includes(_.value);return u("li",{class:Zs({type:"line"}),children:u("button",{type:"button",disabled:_.disabled,"data-filter":!0,"data-current-value":w?"true":void 0,onClick:()=>{switch(e.select){case"many":{const b=ap(f,_.value);o({select:"many",value:b});break}case"one":o({select:"one",value:w?void 0:_.value});break;default:bt(e)}},class:Js({active:w,disabled:_.disabled}),children:[u("span",{class:"max-w-full truncate",children:_.label})," ",u(ip,{colorScheme:w?"accentStrong":"neutralStrong",children:_.results})]})},_.value)})}):u("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:bt(i)}})(),u("footer",{class:"flex flex-none justify-end p-2",children:[u("div",{class:"flex-1",children:c&&u("button",{type:"button",class:Fe({variant:"neutral",icon:"left"}),onClick:()=>{o(void 0)},children:[u(J,{"aria-hidden":!0,name:"x"})," ",s("clear")]})}),e.select==="many"&&r&&u("div",{class:"flex items-center overflow-hidden",children:u("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:[f.length," ",s("selected")]})}),u("div",{class:"flex-1",children:u("button",{type:"button",class:Fe({variant:c?"accent":"neutral",class:"ml-auto"}),onClick:a,children:s(c?"done":"close")},c?"done":"close")})]})]})},Li=8,Mi={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=fe({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"}}}),ji=fe({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"}}}),Xs=e=>typeof e.value=="string"?[e.value]:e.value??[],dp=({selectedValues:e})=>{const t=e.length;return t===0?null:u("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)},fp=({active:e,value:t,onActiveChange:n,property:r,onValueChange:o,unfilteredQuery:i,useQuery:a,theme:s,widgetId:l})=>{const d=pc(r.key,Mi)?Mi[r.key]:void 0,f=r.icon??d??"filter",c=Xs(t),p=c.length>0,h=ka("(pointer: coarse)"),v=u(L,{children:[u("div",{class:"flex min-w-0 flex-1 items-center gap-1.5",children:[u(J,{"aria-hidden":!0,class:"flex-none",name:f}),u("span",{class:"truncate",children:r.label})]}),u(J,{"aria-hidden":!0,class:"text-neutral-8 flex-shrink-0 rotate-90 transition-transform group-data-[state=open]:-rotate-90",name:"chevron-right"}),u(dp,{selectedValues:c})]}),g=u(up,{useQuery:a,onClose:()=>n(!1),onValueChange:o,unfilteredQuery:i,property:r,value:t,isMobile:h});return h?u(Td,{open:e,onOpenChange:n,children:[u(kd,{"data-filter-key":r.key,"aria-label":r.label,"aria-selected":e?"true":void 0,class:Fi({state:e||p?"active":"default"}),onTouchStart:pp,children:v}),u(Pd,{children:u("div",{class:"inploi-job-search","data-widget-id":l,children:[u(Rd,{class:"animate-fade-in fixed inset-0 z-50 bg-[#0009]"}),u(Dd,{class:ji({mode:"mobile",class:jr(s)}),children:[u("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:[u(J,{name:f,class:"flex-none"}),u("p",{class:"font-style-filter font-weight-filter text-style-filter truncate",children:r.label})]}),g]})]})})]}):u(ep,{open:e,onOpenChange:y=>n(y),modal:h,children:[u(tp,{"data-filter-key":r.key,"aria-label":r.label,"aria-selected":e?"true":void 0,class:Fi({state:e||p?"active":"default"}),children:v}),u(np,{children:u("div",{class:"inploi-job-search","data-widget-id":l,children:u(rp,{side:"bottom",sideOffset:Li,align:"center",collisionPadding:Li,class:ji({mode:"desktop",class:jr(s)}),children:g})})})]})};function pp(){}const hp=(e,t)=>{var n,r,o;switch(t.select){case"many":(n=t.value)==null||n.forEach(i=>{var a,s;switch(e.select){case"many":(a=e.value)!=null&&a.includes(i)||(s=e.value)==null||s.push(i);break;case"one":e.value=i}});break;case"one":if(!t.value)break;switch(e.select){case"many":(r=e.value)!=null&&r.includes(t.value)||(o=e.value)==null||o.push(t.value);break;case"one":e.value=t.value}break}},gp=({value:e,activeKey:t})=>{switch(e==null?void 0:e.select){case void 0:return{newValue:void 0,newActiveKey:t};case"one":case"many":return{newValue:e,newActiveKey:t};default:bt(e)}},vp=({properties:e,state:t,onFilterValueChange:n,onResetFilters:r,apiClient:o,logger:i,theme:a,alerts:s,widgetId:l})=>{const{t:d}=ne(),[f,c]=P(void 0),p=ee(()=>({filters:Fn(e,"value"),mode:t.mode,query:"",geo:void 0,page:1,view:"list"}),[e,t.mode]),h=rn(Yt(Kr({state:p,baseKey:"filters"}),()=>Uo({apiClient:o,logger:i,state:p}),Pn)),v=j(g=>()=>{const y={...t,filters:{...t.filters,[g]:p.filters[g]}};return Yt(Kr({state:y,baseKey:"filters"}),()=>Uo({apiClient:o,logger:i,state:y}),Pn)},[o,p.filters,i,t]);return h.queryState==="error"?u(je,{error:new Error(d("filters_loading_error"),{cause:h.error}),resetError:()=>h.swr.mutate()}):u("div",{class:"ijs-filters-section flex w-full flex-col items-stretch justify-center gap-2 overflow-auto px-4 py-2 md:flex-row md:flex-wrap md:items-center",children:[e.filter(g=>g.hidden!==!0).map(g=>{const y=f===g.key,m=t.filters[g.key]??{select:g.select,value:void 0},_=p.filters[g.key];_&&hp(m,_);const w=$=>{const{newActiveKey:C,newValue:E}=gp({property:g,activeKey:f,value:$??_,properties:e,appliedFilters:t.filters});return c(C),n(g.key,E)},b=$=>c($?g.key:void 0),x=v(g.key);return u(qt,{Fallback:je,children:u(fp,{unfilteredQuery:h,active:y,property:g,onActiveChange:b,value:m,useQuery:x,onValueChange:w,theme:a,widgetId:l})},g.key)}),u("button",{type:"button",class:Fe({variant:"neutral"}),onClick:r,children:d("reset")}),s?u("div",{id:"inploi-job-alerts",class:"min-h-[36px]"}):null]})};function mp(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Gn=mp,_p=typeof Wt=="object"&&Wt&&Wt.Object===Object&&Wt,yp=_p,bp=yp,wp=typeof self=="object"&&self&&self.Object===Object&&self,xp=bp||wp||Function("return this")(),Yn=xp,$p=Yn,Ep=function(){return $p.Date.now()},Cp=Ep,Sp=/\s/;function Op(e){for(var t=e.length;t--&&Sp.test(e.charAt(t)););return t}var Ap=Op,Tp=Ap,kp=/^\s+/;function Pp(e){return e&&e.slice(0,Tp(e)+1).replace(kp,"")}var Rp=Pp,Dp=Yn,Np=Dp.Symbol,Ao=Np,Vi=Ao,Qs=Object.prototype,Ip=Qs.hasOwnProperty,Lp=Qs.toString,Ut=Vi?Vi.toStringTag:void 0;function Mp(e){var t=Ip.call(e,Ut),n=e[Ut];try{e[Ut]=void 0;var r=!0}catch{}var o=Lp.call(e);return r&&(t?e[Ut]=n:delete e[Ut]),o}var Fp=Mp,jp=Object.prototype,Vp=jp.toString;function Hp(e){return Vp.call(e)}var Up=Hp,Hi=Ao,Wp=Fp,zp=Up,Bp="[object Null]",qp="[object Undefined]",Ui=Hi?Hi.toStringTag:void 0;function Kp(e){return e==null?e===void 0?qp:Bp:Ui&&Ui in Object(e)?Wp(e):zp(e)}var ec=Kp;function Gp(e){return e!=null&&typeof e=="object"}var Yp=Gp,Zp=ec,Jp=Yp,Xp="[object Symbol]";function Qp(e){return typeof e=="symbol"||Jp(e)&&Zp(e)==Xp}var Zn=Qp,eh=Rp,Wi=Gn,th=Zn,zi=0/0,nh=/^[-+]0x[0-9a-f]+$/i,rh=/^0b[01]+$/i,oh=/^0o[0-7]+$/i,ih=parseInt;function ah(e){if(typeof e=="number")return e;if(th(e))return zi;if(Wi(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Wi(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=eh(e);var n=rh.test(e);return n||oh.test(e)?ih(e.slice(2),n?2:8):nh.test(e)?zi:+e}var sh=ah,ch=Gn,Ar=Cp,Bi=sh,lh="Expected a function",uh=Math.max,dh=Math.min;function fh(e,t,n){var r,o,i,a,s,l,d=0,f=!1,c=!1,p=!0;if(typeof e!="function")throw new TypeError(lh);t=Bi(t)||0,ch(n)&&(f=!!n.leading,c="maxWait"in n,i=c?uh(Bi(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p);function h($){var C=r,E=o;return r=o=void 0,d=$,a=e.apply(E,C),a}function v($){return d=$,s=setTimeout(m,t),f?h($):a}function g($){var C=$-l,E=$-d,S=t-C;return c?dh(S,i-E):S}function y($){var C=$-l,E=$-d;return l===void 0||C>=t||C<0||c&&E>=i}function m(){var $=Ar();if(y($))return _($);s=setTimeout(m,g($))}function _($){return s=void 0,p&&r?h($):(r=o=void 0,a)}function w(){s!==void 0&&clearTimeout(s),d=0,r=l=o=s=void 0}function b(){return s===void 0?a:_(Ar())}function x(){var $=Ar(),C=y($);if(r=arguments,o=this,l=$,C){if(s===void 0)return v(l);if(c)return clearTimeout(s),s=setTimeout(m,t),h(l)}return s===void 0&&(s=setTimeout(m,t)),a}return x.cancel=w,x.flush=b,x}var ph=fh;const hh=vo(ph),to="|",tc=(e,t)=>{const n=structuredClone(e);return n.forEach(r=>{if(t.has(r.key)){const o=t.get(r.key);if(!o)return;switch(r.select){case"one":{r.defaultValue=o;break}case"many":o.includes(to)?r.defaultValue=o.split(to):r.defaultValue=o}}}),n},nc=e=>{const t=e.get("mode");return t==="vector"||t==="query"?t:"query"},rc=e=>{const t=e.get("view");return t==="list"||t==="map"?t:"list"},gh=({searchParams:e})=>({properties:t})=>({filters:Fn(tc(t,e),"defaultValue"),mode:nc(e),page:On(e.get("page"))??1,view:rc(e),query:e.get("query")??""}),vh=(e,t)=>{var n,r;if(e.filters!==void 0){const o=Hn({filters:e.filters,query:"",mode:e.mode??"query",page:e.page??1,view:e.view??"list"});for(const[i,a]of Object.entries(o))if(i!=="geolocation"){if(a==null){t.delete(i);continue}Array.isArray(a)?a.length===0?t.delete(i):t.set(i,a.join(to)):typeof a=="string"&&t.set(i,a)}}"geo"in e&&(((n=e.geo)==null?void 0:n.type)==="provided"?(e.geo.coords?(t.set("lat",e.geo.coords.lat.toString()),t.set("lng",e.geo.coords.lng.toString())):(t.delete("lat"),t.delete("lng")),t.set("radius",e.geo.radius.toString())):((r=e.geo)==null||r.type,t.delete("lat"),t.delete("lng"),t.delete("radius"))),"query"in e&&(e.query?t.set("query",e.query):t.delete("query")),"page"in e&&(e.page&&e.page>1?t.set("page",e.page.toString()):t.delete("page")),"view"in e&&(e.view?t.set("view",e.view):t.delete("view"))},On=e=>{if(!e)return;const t=Number(e);if(!Number.isNaN(t))return t},mh=e=>{const t=e.get("lat"),n=e.get("lng"),r=e.get("radius");if(!t&&!n||!t||!n)return;const o=On(t),i=On(n),a=On(r)??Mn(no);if(!(o===void 0||i===void 0))return{type:"provided",coords:{lat:o,lng:i},radius:Number.isNaN(a)?Mn(no):a}},oc=(e,t=1e3)=>{const[n,r]=P(e),o=ee(()=>hh(i=>r(i),t),[t]);return I(()=>{o(e)},[e,o]),n},_h=q(({disabled:e,error:t,name:n,inputPlaceholder:r,items:o,onItemSelect:i,onQueryChange:a,onBlur:s,onFocus:l,inputProps:d,menuProps:f,query:c},p)=>{const[h,v]=P(!1),[g,y]=P(),{t:m}=ne(),_=D();I(()=>{var b;y((b=o[0])==null?void 0:b.id)},[o]);const w=b=>{i(b),v(!1)};return u("div",{class:"relative h-full",children:[u("input",{name:n,ref:p,disabled:e,"data-active":h?"true":void 0,"aria-controls":`ijs-${n}-menu`,placeholder:r,class:cn({size:"md"}),onFocus:()=>{l==null||l(),v(!0)},onBlur:()=>{_.current=window.setTimeout(()=>{s==null||s(),v(!1)},100)},value:c,onChange:b=>a(b.currentTarget.value),onKeyDown:b=>{switch(v(!0),b.key){case"ArrowDown":case"ArrowUp":{const x=b.key==="ArrowDown"?1:-1;b.preventDefault();const $=o.findIndex(E=>E.id===g);if($===-1)return;const C=o[$+x]??o[b.key==="ArrowDown"?0:o.length-1];if(!C)return;y(C.id);break}case"Enter":{if(b.preventDefault(),!g)return;i(g)}}},...d}),!t&&h&&!e&&o.length>0?u("ul",{className:Ys({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:()=>{_.current&&clearTimeout(_.current)},...f,children:t?u("div",{role:"alert",children:m("geo_suggestions_error")}):o.map(b=>u("li",{class:Zs({type:"line",className:"group/tag"}),children:u("button",{type:"button",onMouseEnter:()=>y(b.id),class:Js({active:b.id===g,className:"line-clamp-1 overflow-hidden truncate"}),onClick:()=>w(b.id),onKeyDown:x=>{x.key==="Enter"&&w(b.id)},children:b.label})},b.id))}):null]})}),yh=(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})}),bh={1:"geo_error_permission_denied",2:"geo_error_position_unavailable",3:"geo_error_timeout"},qi=typeof window<"u"&&"geolocation"in navigator&&window.isSecureContext,wh=({onLocate:e,onError:t,signal:n})=>{const[r,o]=P("idle"),[i,a]=P(null),{t:s}=ne(),l=d=>{o("idle"),a(d),e(d)};return u("button",{"aria-label":s(r==="loading"?"geo_locating":"geo_my_location"),type:"button",onClick:()=>{if(qi){if(o("loading"),i)return l(i);yh({signal:n}).then(d=>{const f={lat:d.latitude,lng:d.longitude};l(f)}).catch(d=>{if(d instanceof DOMException&&d.name==="AbortError")return o("idle");o("error");const f=bh[d.code];if(!f)return;const c=s(f);t(c)})}},"data-state":r,class:Fe({variant:"accent",size:"lg",icon:"only",className:"data-[state=loading]:animate-pulse"}),disabled:!qi||r==="error",children:u(J,{name:"target-location"})})},xh="https://api.mapbox.com/search/geocode/v6/forward",$h="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Eh=e=>atob(e).split("").reverse().join(""),Ch=ue({features:Vn(Ie(ue({properties:ue({mapbox_id:V(),place_formatted:Re(V()),name_preferred:Re(V(),"Untitled location"),coordinates:Ie(ue({latitude:$e(),longitude:$e()}),({latitude:e,longitude:t})=>({lat:e,lng:t}))})}),e=>e.properties))}),Sh=(e,t)=>Array.from(new Map(e.map(n=>[typeof t=="function"?t(n):n[t],n])).values()),Oh=async e=>{if(!e)return[];const t=new URL(xh);t.searchParams.set("q",e),t.searchParams.set("proximity","ip"),t.searchParams.set("access_token",Eh($h));const n=await fetch(t);if(!n.ok)throw new Error("Failed to get address details");const r=co(Ch,await n.json());if(r.success===!1)throw console.error(r.issues),new Error("Invalid data");const{features:o}=r.output;return Sh(o,i=>i.name_preferred+i.place_formatted)},Ah=({onSelect:e,onValueChange:t,coords:n,radius:r,onError:o})=>{const{t:i}=ne(),[a,s]=P(""),[l,d]=P(),f=oc(a,500),[c,p]=P(new AbortController),h=Yt(f,Oh,{keepPreviousData:!1,revalidateIfStale:!1,revalidateOnFocus:!1}),{data:v,queryState:g,error:y}=rn(h),[m,_]=P("view"),w=D(null);return I(()=>{if(m==="edit"){if(!w.current)return;w.current.focus()}},[m]),u("div",{class:"relative flex-1",children:[m==="view"&&n?u("button",{"aria-label":i("geo_search_placeholder"),type:"button",class:cn({size:"unsized",className:"flex h-10 w-full cursor-text items-stretch px-1 py-1"}),onClick:()=>{_("edit")},children:u("div",{class:lt({size:"sm",variant:"accentStrong",interactive:!0,class:"truncate"}),children:l??i("location_provided")})}):u(_h,{ref:w,error:y,query:a,name:"location-search",onQueryChange:s,onFocus:()=>{c.abort(),p(new AbortController)},onBlur:()=>{_("view"),s("")},onItemSelect:b=>{if(g!=="loaded")return;const x=v.find($=>$.mapbox_id===b);x&&(e(x.coordinates),_("view"),d(x.name_preferred))},inputPlaceholder:i("geo_search_placeholder"),items:(v==null?void 0:v.map(b=>({id:b.mapbox_id,label:u("div",{class:"flex min-w-0 max-w-full gap-2 overflow-hidden",children:[u("strong",{class:"truncate",children:b.name_preferred})," ",u("span",{class:"flex-1 truncate opacity-50",children:b.place_formatted})]})})))??[]}),u("div",{class:"absolute bottom-0 right-0 top-0 flex items-center",children:!a&&!n?u(wh,{onLocate:b=>{_("view"),d(i("geo_my_location")),t({type:"provided",coords:b,radius:r})},onError:o,signal:c.signal}):u("button",{type:"button","aria-label":i("geo_clear_search"),onClick:()=>{s(""),d(void 0),t({radius:r,type:"provided"}),_("edit"),w.current&&(w.current.value="",w.current.focus())},class:Fe({variant:"neutral",size:"lg",icon:"only"}),children:u(J,{name:"x"})})})]})},Th=[.25,.5,1,3,5,10,15,20,30,40],no=20,Mn=e=>e*1609.34,kh=new Intl.NumberFormat(void 0,{style:"unit",unit:"mile",unitDisplay:"long",maximumFractionDigits:1,trailingZeroDisplay:"stripIfInteger"}),Ph=Ie(ue({type:Pe("provided"),lat:Re(Ie(V(),e=>Number(e))),lng:Re(Ie(V(),e=>Number(e))),radius:Ie(V(),e=>Number(e))}),e=>({radius:e.radius,type:e.type,coords:e.lat&&e.lng?{lat:e.lat,lng:e.lng}:void 0})),Rh=({value:e,onValueChange:t,logger:n})=>{const{t:r}=ne(),o=uo(),i=(e==null?void 0:e.type)==="provided"?e.radius:Mn(no),[a,s]=P();return u("div",{class:"flex flex-col gap-2",children:[u("form",{onChange:l=>{const d=new FormData(l.currentTarget),f=co(Ph,Object.fromEntries(d.entries()));if(!f.success){n.error(f.issues),s(f.issues[0].message);return}t(f.output)},class:"flex flex-col gap-2 md:flex-row",children:[u("input",{type:"hidden",name:"type",value:"provided"}),(e==null?void 0:e.type)==="provided"&&e.coords?u(L,{children:[u("input",{type:"hidden",name:"lat",value:e.coords.lat}),u("input",{type:"hidden",name:"lng",value:e.coords.lng})]}):null,u(Ah,{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}),u("div",{class:"relative",children:[u("label",{class:"sr-only",for:o,children:r("geo_range_label")}),u("select",{id:o,name:"radius",class:cn({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:Th.map(l=>u("option",{value:Mn(l),class:"truncate",children:kh.format(l)},l))}),u("div",{class:"text-copy-neutral-lowcontrast pointer-events-none absolute bottom-0 right-0 top-0 flex w-10 items-center justify-center",children:u(J,{name:"chevron-right",class:"h-6 w-6 rotate-90"})})]})]}),a?u("div",{role:"alert",class:"text-pretty text-copy-neutral font-style-tag font-weight-tag text-style-tag flex gap-1",children:[u(J,{name:"warning",class:"animate-appear-tag size-[1lh] flex-none"}),a]}):null]})},Dh=2,Nh=({value:e,onValueChange:t})=>{const[n,r]=P(e??""),o=n!==""&&n===e,{t:i}=ne();return I(()=>{let a=n.trim();if(a.length<=Dh&&(a=null),a===null){t("");return}const s=setTimeout(()=>{t(a)},300);return()=>clearTimeout(s)},[n,t]),u("div",{class:"flex flex-col gap-3",children:u("div",{class:"relative",children:[u("label",{class:"absolute left-0 flex h-full items-center px-2",for:"ijs-keyword",children:[u(J,{"aria-hidden":!0,title:"Search by keyword",name:"magnifierSimple",class:St({"text-copy-neutral-icon":!o,"text-copy-accent-icon":o})}),u("span",{class:"sr-only",children:"Keyword"})]}),u("input",{autoComplete:"off",autocomplete:"off",name:"keyword",id:"ijs-keyword",type:"search",class:cn({hasValue:o,size:"unsized",class:"peer py-2 pl-10 pr-4"}),placeholder:i("type_to_search_jobs"),value:n,onChange:a=>{r(a.currentTarget.value)}}),u("button",{type:"button",class:Fe({variant:"neutral",size:"lg",position:"absolute",class:"bottom-0 right-0 top-0 h-full peer-placeholder-shown:hidden",icon:"only"}),onClick:()=>{r("")},children:u(J,{name:"x"})})]})})},Ih=({intervalMs:e,strings:t,class:n})=>{const[r,o]=P(0),[i,a]=P(!0),s=[...t,t[0]];return I(()=>{r===s.length&&(a(!1),o(0));const l=setTimeout(()=>{a(!0),o(d=>d+1)},e);return()=>clearTimeout(l)},[r,s.length,e]),u("div",{className:St("relative h-full w-full overflow-hidden",n),children:u("div",{className:St("absolute w-full",{"transition-transform duration-500 ease-in-out":i}),style:{height:`${100*s.length}%`,transform:`translateY(-${r*(100/s.length)}%)`},children:s.map((l,d)=>u("div",{className:"flex items-center whitespace-nowrap",style:{height:`${100/s.length}%`},children:l},d))})})},Lh=(e,t)=>{I(()=>{const n=r=>{document.activeElement===e.current&&t(r)};return document.addEventListener("selectionchange",n),()=>document.removeEventListener("selectionchange",n)},[e,t])},Ki=3,Mh=({value:e,onValueChange:t,options:n})=>{const[r,o]=P(e??""),i=r.trim(),a=i!==""&&i===e,{t:s}=ne(),l=i.split(""),[d,f]=P(0),c=D(null);return Lh(c,p=>{p.target instanceof HTMLInputElement&&f(p.target.scrollLeft)}),I(()=>{let p=r.trim();if(p.length<=Ki&&(p=null),p===null){t("");return}const h=setTimeout(()=>{t(p.trim())},1e3);return()=>clearTimeout(h)},[r,t]),u("div",{class:"mb-2 flex flex-col gap-2",children:[u("div",{class:"relative",children:[u("label",{class:"absolute left-0 flex h-full items-center px-2",for:"ijs-keyword",children:[u(J,{"aria-hidden":!0,title:"Search by keyword",name:"ai",class:St("duration-snappy transition-transform",{"text-copy-neutral-icon scale-90":!a,"text-copy-accent-icon":a})}),u("span",{class:"sr-only",children:"Keyword"})]}),u("input",{ref:c,autoComplete:"off",autocomplete:"off",name:"keyword",id:"ijs-keyword",type:"text",placeholder:n!=null&&n.suggestions?n.suggestions.join(", "):" ",class:cn({hasValue:a,size:"unsized",class:"peer px-10 py-2 tracking-tight !text-transparent placeholder:!text-transparent"}),style:{fontKerning:"none"},value:r,onChange:p=>{const h=p.currentTarget.value.trim();o(h)},onKeyDown:p=>{if(p.key==="Enter"){if(p.currentTarget.value.trim().length<=Ki)return;p.preventDefault(),t(r)}}}),u("div",{"data-synced":a,class:"font-weight-input text-copy-neutral group pointer-events-none absolute inset-x-10 inset-y-0 flex overflow-hidden tracking-tight peer-placeholder-shown:right-0",children:i.length>0?u("div",{"aria-hidden":!0,class:"flex items-center whitespace-nowrap",style:{transform:`translateX(${-d}px)`},children:l.map((p,h)=>u("span",{style:{animationDelay:`${h*300/l.length}ms`},class:"group-data-[synced=true]:animate-ai-letter inline-block",children:p===" "?" ":p},i+h))}):n!=null&&n.suggestions?u(Ih,{intervalMs:2e3,strings:n.suggestions,class:"opacity-30","aria-hidden":!0}):null}),u("button",{type:"button",class:Fe({variant:"neutral",size:"lg",position:"absolute",class:"bottom-0 right-0 top-0 h-full peer-placeholder-shown:hidden",icon:"only"}),onClick:()=>{o(""),t("")},children:u(J,{name:"x"})})]}),u("p",{class:"font-family-default text-balance font-style-default text-style-job-card-info text-copy-neutral-lowcontrast",children:s("ai_disclaimer")})]})};var Fh=Array.isArray,To=Fh,jh=To,Vh=Zn,Hh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Uh=/^\w*$/;function Wh(e,t){if(jh(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Vh(e)?!0:Uh.test(e)||!Hh.test(e)||t!=null&&e in Object(t)}var zh=Wh,Bh=ec,qh=Gn,Kh="[object AsyncFunction]",Gh="[object Function]",Yh="[object GeneratorFunction]",Zh="[object Proxy]";function Jh(e){if(!qh(e))return!1;var t=Bh(e);return t==Gh||t==Yh||t==Kh||t==Zh}var Xh=Jh,Qh=Yn,eg=Qh["__core-js_shared__"],tg=eg,Tr=tg,Gi=function(){var e=/[^.]+$/.exec(Tr&&Tr.keys&&Tr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ng(e){return!!Gi&&Gi in e}var rg=ng,og=Function.prototype,ig=og.toString;function ag(e){if(e!=null){try{return ig.call(e)}catch{}try{return e+""}catch{}}return""}var sg=ag,cg=Xh,lg=rg,ug=Gn,dg=sg,fg=/[\\^$.*+?()[\]{}|]/g,pg=/^\[object .+?Constructor\]$/,hg=Function.prototype,gg=Object.prototype,vg=hg.toString,mg=gg.hasOwnProperty,_g=RegExp("^"+vg.call(mg).replace(fg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function yg(e){if(!ug(e)||lg(e))return!1;var t=cg(e)?_g:pg;return t.test(dg(e))}var bg=yg;function wg(e,t){return e==null?void 0:e[t]}var xg=wg,$g=bg,Eg=xg;function Cg(e,t){var n=Eg(e,t);return $g(n)?n:void 0}var ic=Cg,Sg=ic,Og=Sg(Object,"create"),Jn=Og,Yi=Jn;function Ag(){this.__data__=Yi?Yi(null):{},this.size=0}var Tg=Ag;function kg(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Pg=kg,Rg=Jn,Dg="__lodash_hash_undefined__",Ng=Object.prototype,Ig=Ng.hasOwnProperty;function Lg(e){var t=this.__data__;if(Rg){var n=t[e];return n===Dg?void 0:n}return Ig.call(t,e)?t[e]:void 0}var Mg=Lg,Fg=Jn,jg=Object.prototype,Vg=jg.hasOwnProperty;function Hg(e){var t=this.__data__;return Fg?t[e]!==void 0:Vg.call(t,e)}var Ug=Hg,Wg=Jn,zg="__lodash_hash_undefined__";function Bg(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Wg&&t===void 0?zg:t,this}var qg=Bg,Kg=Tg,Gg=Pg,Yg=Mg,Zg=Ug,Jg=qg;function Lt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Lt.prototype.clear=Kg;Lt.prototype.delete=Gg;Lt.prototype.get=Yg;Lt.prototype.has=Zg;Lt.prototype.set=Jg;var Xg=Lt;function Qg(){this.__data__=[],this.size=0}var ev=Qg;function tv(e,t){return e===t||e!==e&&t!==t}var nv=tv,rv=nv;function ov(e,t){for(var n=e.length;n--;)if(rv(e[n][0],t))return n;return-1}var Xn=ov,iv=Xn,av=Array.prototype,sv=av.splice;function cv(e){var t=this.__data__,n=iv(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():sv.call(t,n,1),--this.size,!0}var lv=cv,uv=Xn;function dv(e){var t=this.__data__,n=uv(t,e);return n<0?void 0:t[n][1]}var fv=dv,pv=Xn;function hv(e){return pv(this.__data__,e)>-1}var gv=hv,vv=Xn;function mv(e,t){var n=this.__data__,r=vv(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var _v=mv,yv=ev,bv=lv,wv=fv,xv=gv,$v=_v;function Mt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Mt.prototype.clear=yv;Mt.prototype.delete=bv;Mt.prototype.get=wv;Mt.prototype.has=xv;Mt.prototype.set=$v;var Ev=Mt,Cv=ic,Sv=Yn,Ov=Cv(Sv,"Map"),Av=Ov,Zi=Xg,Tv=Ev,kv=Av;function Pv(){this.size=0,this.__data__={hash:new Zi,map:new(kv||Tv),string:new Zi}}var Rv=Pv;function Dv(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Nv=Dv,Iv=Nv;function Lv(e,t){var n=e.__data__;return Iv(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Qn=Lv,Mv=Qn;function Fv(e){var t=Mv(this,e).delete(e);return this.size-=t?1:0,t}var jv=Fv,Vv=Qn;function Hv(e){return Vv(this,e).get(e)}var Uv=Hv,Wv=Qn;function zv(e){return Wv(this,e).has(e)}var Bv=zv,qv=Qn;function Kv(e,t){var n=qv(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Gv=Kv,Yv=Rv,Zv=jv,Jv=Uv,Xv=Bv,Qv=Gv;function Ft(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ft.prototype.clear=Yv;Ft.prototype.delete=Zv;Ft.prototype.get=Jv;Ft.prototype.has=Xv;Ft.prototype.set=Qv;var em=Ft,ac=em,tm="Expected a function";function ko(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(tm);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ko.Cache||ac),n}ko.Cache=ac;var nm=ko,rm=nm,om=500;function im(e){var t=rm(e,function(r){return n.size===om&&n.clear(),r}),n=t.cache;return t}var am=im,sm=am,cm=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lm=/\\(\\)?/g,um=sm(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(cm,function(n,r,o,i){t.push(o?i.replace(lm,"$1"):r||n)}),t}),dm=um;function fm(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var pm=fm,Ji=Ao,hm=pm,gm=To,vm=Zn,mm=1/0,Xi=Ji?Ji.prototype:void 0,Qi=Xi?Xi.toString:void 0;function sc(e){if(typeof e=="string")return e;if(gm(e))return hm(e,sc)+"";if(vm(e))return Qi?Qi.call(e):"";var t=e+"";return t=="0"&&1/e==-mm?"-0":t}var _m=sc,ym=_m;function bm(e){return e==null?"":ym(e)}var wm=bm,xm=To,$m=zh,Em=dm,Cm=wm;function Sm(e,t){return xm(e)?e:$m(e,t)?[e]:Em(Cm(e))}var Om=Sm,Am=Zn,Tm=1/0;function km(e){if(typeof e=="string"||Am(e))return e;var t=e+"";return t=="0"&&1/e==-Tm?"-0":t}var Pm=km,Rm=Om,Dm=Pm;function Nm(e,t){t=Rm(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Dm(t[n++])];return n&&n==r?e:void 0}var Im=Nm,Lm=Im;function Mm(e,t,n){var r=e==null?void 0:Lm(e,t);return r===void 0?n:r}var Fm=Mm;const jm=vo(Fm),Bt=({chars:e})=>u("span",{style:{width:e+"ch"},class:"rounded-job-tag block h-[1lh] min-h-[1em] bg-[currentColor] opacity-25"}),cc=fe({base:"ijs-job relative rounded-job-card bg-job-card-bg ring-width-job-card ring-job-card-stroke flex gap-4 fr ease-expo-out min-w-0 p-4 transition-all duration-medium",variants:{interactive:{true:"active:bg-job-card-bg-active active:ring-job-card-stroke-active hover:bg-job-card-bg-active hover:ring-job-card-stroke-active active:scale-[0.975]",false:"animate-skeleton"}},defaultVariants:{interactive:!0}}),Vm=fe({base:"font-style-job-heading font-weight-job-heading text-copy-neutral font-family-job-heading text-pretty",variants:{size:{sm:"text-style-filter",default:"text-style-job-heading"}},defaultVariants:{size:"default"}}),kr=({job:e,property:t})=>{if(!t)return null;const n=jm(e.raw,t.key);return t.transform?t.transform(n):n},Hm=({job:e,config:t="hidden"})=>t==="hidden"?null:u("div",{class:"rounded-logo h-12 flex-none overflow-hidden",style:{aspectRatio:t.replace(":","/")},children:e.company.logo?u("img",{src:e.company.logo,alt:e.company.name,class:"h-full w-full select-none object-contain [-webkit-user-drag:none]"}):null}),ea=e=>Array.isArray(e)?e:[e],Um=1e3*60*60*24,lc=({job:e,config:t,onJobClick:n,size:r})=>{var h,v,g;const{t:o}=ne(),i=t.subheading?kr({job:e,property:t.subheading}):null,a=t.infoTags.flatMap(y=>ea(kr({job:e,property:y}))).filter(Boolean),s=ea((h=t.overrides)!=null&&h.salary?kr({job:e,property:t.overrides.salary}):e.pay).filter(Boolean),l=t.postedDate??"show",d=(v=t.overrides)!=null&&v.baseUrl?t.overrides.baseUrl(e.id.toString()):e.href,f=t.newUnderDays??7,c=e.createdAt?new Date(e.createdAt).getTime()>Date.now()-f*Um:!1,p=y=>{var m,_;n==null||n(e),(_=(m=t.overrides)==null?void 0:m.onClick)==null||_.call(m,y)};return u("a",{onMouseEnter:(g=t.overrides)==null?void 0:g.onMouseEnter,onClick:p,href:d,target:t.openJob==="redirect-new-tab"?"_blank":void 0,class:cc(),children:[u("div",{class:"flex min-w-0 flex-1 flex-col gap-4",children:[u("div",{class:"gap-logo flex items-center",children:[u(Hm,{job:e,config:r!=="sm"?t.logo:void 0}),u("div",{class:"flex flex-col items-start gap-1",children:[u("div",{class:"order-2 flex flex-col gap-1",children:[e.match?u("p",{class:"text-style-job-card text-tag-accent-strong-bg flex items-center ",children:[u(J,{name:"ai",class:"size-4 inline-block"}),u("span",{children:e.match})]}):null,u("p",{class:Vm({size:r}),children:[e.title.trim(),c&&l!=="hide"&&u(L,{children:[" ",u("span",{"aria-hidden":!0,class:"ring-px ring-tag-accent-strong-bg rounded-job-card text-tag-accent-strong-bg font-weight-tag not-sr-only order-1 inline-block px-2 py-1 align-middle text-[10px] leading-none",children:o("new")})]})]}),i?u("p",{class:"text-style-job-card text-copy-neutral-lowcontrast",children:i}):null]}),l==="show"?u("p",{class:"text-style-job-card-info text-copy-job-info order-1",children:[o("posted")," ",e.relativePostedDate]}):null]})]}),u("div",{class:"flex min-w-0 flex-col items-start gap-2",children:[u("div",{class:"flex min-w-0 max-w-full flex-wrap items-center gap-2",children:s.map((y,m)=>u("span",{class:lt({variant:"monetaryWeak",size:"xs"}),children:y},m))}),a.length>0&&u("ul",{class:"flex min-w-0 max-w-full flex-wrap items-center gap-2",children:a.map(y=>u("li",{class:lt({size:"xs",class:"max-w-full truncate"}),children:y},y))})]})]}),r==="sm"?u("div",{"aria-hidden":!0,class:"absolute right-1 top-1/2 -translate-y-1/2 transform",children:u(J,{name:"chevron-right",class:"size-5 text-copy-neutral-icon"})}):u("div",{"aria-hidden":!0,class:"flex items-center",children:u(J,{name:"chevron-right",class:"text-copy-neutral-icon"})})]})},Po=({config:e,animationDelay:t,seed:n})=>{const r=e.logo??"hidden",o=e.postedDate??"show";return u("div",{"aria-hidden":!0,style:{animationDelay:t+"s"},class:cc({interactive:!1}),children:[u("div",{class:"flex flex-1 flex-col gap-4",children:[u("div",{class:"flex items-center gap-4",children:[r==="hidden"?null:u("div",{class:"rounded-logo bg-copy-neutral h-12 opacity-25",style:{aspectRatio:r.replace(":","/")}}),u("div",{class:"flex flex-col items-start gap-1",children:[o==="show"?u("p",{class:"text-style-job-card-info text-copy-job-info",children:u(Bt,{chars:12})}):null,u("div",{class:"flex flex-col gap-1",children:[u("p",{class:"text-style-job-heading font-style-job-heading font-weight-job-heading text-copy-neutral font-family-job-heading",children:u(Bt,{chars:13+(n+5)*n%7})}),e.subheading!==null?u("p",{class:"text-style-job-card text-copy-neutral-lowcontrast",children:u(Bt,{chars:7+n*n%3})}):null]})]})]}),u("div",{class:"flex flex-col items-start gap-2",children:[n%2===0&&u("span",{class:lt({variant:"neutralWeak",size:"xs",class:"h-[1lh] min-h-[1em] w-[10ch]"})}),u("div",{class:"flex items-center gap-2",children:[u("span",{class:lt({variant:"neutralWeak",size:"xs",class:"h-[1lh] min-h-[1em] w-[6ch]"})}),u("span",{class:lt({variant:"neutralWeak",size:"xs",class:"h-[1lh] min-h-[1em] w-[8ch]"})})]})]})]}),u("div",{"aria-hidden":!0,class:"flex items-center",children:u(J,{name:"chevron-right",class:"text-copy-neutral-icon"})})]})},Wm=({state:e,fetchNextPage:t,config:n,remainingItems:r})=>{const{t:o}=ne(),i=Math.min(ct,r);return e==="revalidating"?u("ul",{class:"flex flex-col gap-3","aria-hidden":!0,children:Array.from({length:ct}).map((a,s)=>u("li",{children:u(Po,{seed:s,animationDelay:(s-4)*.1,config:n})},s))}):u("button",{type:"button",class:Fe({variant:"neutral",class:"w-full max-w-[45rem] self-center py-2"}),onClick:t,children:[o("load_more_count",{count:i})," ",o("of_remaining_count",{count:r})]})},zm=({state:e,apiClient:t,logger:n,jobCardConfig:r,initialData:o,onResultsUpdate:i,onJobClick:a,onPaginate:s,mode:l,afterResults:d})=>u(L,{children:Array.from({length:e.page}).map((f,c)=>{const p=c===e.page-1;return u(qt,{Fallback:je,children:u(Bm,{state:e,apiClient:t,logger:n,page:c+1,isFirst:c===0,isLast:p,fetchNextPage:()=>{s(e.page+1)},jobCardConfig:r,initialData:o,onResultsUpdate:i,onJobClick:a,mode:l,afterResults:d},c)},c)})}),ta=({page:e})=>{const{t}=ne();return u("div",{"aria-hidden":!0,class:"text-copy-neutral-lowcontrast mx-auto flex w-full max-w-[45rem] gap-2 py-4",onClick:n=>{n.preventDefault()},children:[u("span",{class:"bg-wavy bg-neutral-3 flex-1 opacity-10"}),u("span",{class:"text-style-tag justify-center text-center",children:[t("page")," ",e]}),u("span",{class:"bg-wavy bg-neutral-3 flex-1 opacity-10"})]})},Bm=({state:e,apiClient:t,logger:n,page:r,isFirst:o,isLast:i,fetchNextPage:a,jobCardConfig:s,initialData:l,onResultsUpdate:d,onJobClick:f,afterResults:c})=>{const{t:p}=ne(),h=r===1?l:void 0,{data:v,error:g,queryState:y,swr:m}=rn(Yt(Kr({state:e,baseKey:r.toString()}),()=>Ea({apiClient:t,logger:n,state:e,page:r,t:p}),{...Pn,fallbackData:h}));switch(I(()=>{v&&o&&d&&d({totalCount:v.pagination.total})},[v,o,d]),y){case"idle":return null;case"loading":return u(L,{children:[o?u("div",{class:"flex w-full max-w-[45rem] items-center gap-2 self-center",children:[u("div",{class:"flex-1"}),u("p",{class:"animate-skeleton text-copy-neutral-lowcontrast text-style-tag m-0 justify-center p-0 text-center",children:u(Bt,{chars:8})}),u("div",{class:"flex flex-1 justify-end",children:c})]}):u(ta,{page:r}),u("ul",{class:"flex w-full max-w-[45rem] flex-col gap-3 self-center","aria-hidden":!0,children:Array.from({length:ct}).map((_,w)=>u("li",{children:u(Po,{seed:w,animationDelay:(w-ct)*.1,config:s})},w))})]});case"error":return u(je,{error:new Error(p("jobs_loading_error"),{cause:g}),resetError:()=>m.mutate()});case"revalidating":case"loaded":{if(oa(v.pagination.current_page===r,"Received wrong page from server"),v.pagination.total===0)return u("div",{class:"mx-auto flex flex-col items-center gap-2 px-2 py-4 text-center",children:[u(J,{"aria-hidden":!0,name:"magnifier",class:"text-copy-neutral-lowcontrast"}),u("div",{class:"flex flex-col items-center gap-1",children:[u("p",{class:"text-copy-neutral text-style-job-heading",children:p("no_jobs_found")}),u("p",{class:"text-copy-neutral-lowcontrast text-style-tag [text-wrap:pretty]",children:p("no_jobs_found_description")})]})]});const _=v.pagination.last_page!==v.pagination.current_page,w=r*ct,b=Math.max(v.pagination.total-w,0),x=$=>{f($,r)};return u(L,{children:[o?u("div",{class:"flex w-full max-w-[45rem] items-center gap-2 self-center",children:[u("div",{class:"flex-1"}),u("p",{class:"text-copy-neutral-lowcontrast text-style-tag m-0 justify-center p-0 text-center",children:p("jobs_found",{count:v.pagination.total})}),u("div",{class:"flex flex-1 justify-end",children:c})]}):u(ta,{page:r}),u("ul",{"aria-label":`Page ${r}`,class:"flex w-full max-w-[45rem] flex-col gap-3 self-center",children:v.results.map($=>u("li",{class:"ease-expo-out duration-slow transition-opacity",style:{opacity:y==="revalidating"?.33:1},children:u(lc,{job:$,onJobClick:x,config:s})},$.id))}),_&&i&&u(Wm,{state:y,fetchNextPage:a,config:s,remainingItems:b})]})}default:bt(y)}},qm=po(()=>Promise.resolve().then(()=>require("./map-8c923ca7.cjs")).then(e=>e.Map)),Km=({state:e,apiClient:t,logger:n,mapConfig:r,onGeoChange:o,afterResults:i,onJobClick:a,jobCardConfig:s})=>{var g,y;const{t:l}=ne(),[d,f]=P(new AbortController),c=ka("(max-width: 767px)"),p=j(m=>{o(m),d.abort(),f(new AbortController)},[o,d]),h=rn(Yt(["map",e],()=>Gc({apiClient:t,logger:n,state:e,t:l,signal:d.signal}),Pn));if(h.queryState==="error")return u(je,{error:new Error(l("jobs_loading_error"),{cause:h.error}),resetError:()=>h.swr.mutate()});const v=h.queryState==="loaded"||h.queryState==="revalidating";return u(L,{children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"flex-1"}),u("p",{class:"text-copy-neutral-lowcontrast text-style-tag m-0 justify-center p-0 text-center",children:v?h.data.results.length!==0&&l("map_jobs_showing",{count:h.data.results.length}):u("div",{class:"animate-skeleton",children:u(Bt,{chars:8})})}),u("div",{class:"flex flex-1 justify-end",children:i})]}),u("div",{class:"theme-fill:bg-neutral-2 theme-stroke:bg-lowest ring-px theme-fill:ring-neutral-3 theme-stroke:ring-neutral-3 theme-soft:rounded-lg theme-rounded:rounded-xl relative flex h-auto flex-col items-stretch overflow-hidden md:h-[70svh] md:flex-row",children:[u("div",{class:"md:min-w-80 aspect-square flex-1 md:order-2 md:aspect-auto",children:v?u(xt,{fallback:u("div",{class:"animate-skeleton bg-neutral-6 h-full w-full"}),children:u(qm,{config:r,mapData:h,autoFit:((g=e.geo)==null?void 0:g.type)!=="bounds",onBoundsChange:p})}):u("div",{class:"animate-skeleton bg-neutral-6 h-full w-full"})}),u("ul",{class:"flex h-full w-full snap-x snap-proximity scroll-px-4 gap-3 overflow-auto p-4 md:order-1 md:max-w-xl md:flex-col",children:[((y=h.data)==null?void 0:y.results.length)===0?u("div",{class:"mx-auto flex h-full w-full flex-col items-center justify-center gap-2 text-center",children:[u(J,{"aria-hidden":!0,name:"magnifier",class:"text-copy-neutral-lowcontrast"}),u("div",{class:"flex flex-col items-center gap-1",children:[u("p",{class:"text-copy-neutral text-style-job-heading",children:l("no_jobs_found")}),u("p",{class:"text-copy-neutral-lowcontrast text-style-tag [text-wrap:pretty]",children:l("no_jobs_found_description")})]})]}):null,v?h.data.results.map(m=>u("li",{class:"ease-expo-out duration-slow min-w-[calc(100%-1rem)] snap-start transition-opacity",style:{opacity:h.queryState==="revalidating"?.33:1},children:u(lc,{job:m,onJobClick:_=>a(_,1),config:s,size:c?"sm":void 0})},m.id)):Array.from({length:6}).map((m,_)=>u("li",{children:u(Po,{seed:_,animationDelay:(_-6)*.1,config:s})},_))]})]})]})},na=fe({base:"flex items-center justify-center cursor-pointer text-style-tag rounded-interactive active:scale-95 transition-all duration-snappy pl-2 pr-2.5 py-1.5 gap-1",variants:{active:{true:"bg-lowest text-neutral-12 shadow-sm animate-appear-tag",false:"text-neutral-10 hover:text-neutral-12"}},defaultVariants:{active:!1}}),Gm=({value:e,onValueChange:t})=>{const{t:n}=ne();return u("div",{class:"bg-neutral-3 rounded-interactive ring-neutral-3 mr-[3px] inline-flex ring-[3px]",children:[u("button",{type:"button","aria-pressed":e==="list",class:na({active:e==="list"}),onClick:()=>t("list"),children:[u(J,{name:"list",class:"size-5"}),u("span",{children:n("list")})]}),u("button",{type:"button","aria-pressed":e==="map",class:na({active:e==="map"}),onClick:()=>t("map"),children:[u(J,{name:"map",class:"size-5"}),u("span",{children:n("map")})]})]})},Ym=e=>{const t=e.state.view,n=e.mapConfig&&e.mapConfig.enabled?u(Gm,{value:t,onValueChange:e.onViewChange}):null;return t==="list"?u(zm,{afterResults:n,...e}):u(Km,{...e,afterResults:n})},Fn=(e,t="value")=>e.reduce((n,r)=>{switch(r.select){case"one":{const o=r.value??r[t],i=typeof o=="string"?o:o==null?void 0:o[0];n[r.key]={select:r.select,value:i};break}case"many":{const o=r.value??r[t],i=typeof o=="string"?[o]:Array.isArray(o)?o:[];n[r.key]={select:r.select,value:i};break}default:bt(r.select)}return n},{}),Pr=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>{const r=n==null?void 0:n.value;return[t,Array.isArray(r)?r:r?[r]:[]]}).filter(([,t])=>t!==void 0&&t.length>0)),ra=e=>(e==null?void 0:e.type)==="bounds"?void 0:e,Zm=({apiClient:e,logger:t,properties:n,analytics:r,initialData:o,onStateChange:i,params:a})=>{var C,E,S,A;const{t:s}=ne(),l=D(null),d=ee(()=>Fn(n,"defaultValue"),[n]),[f,c]=P(!0),[p,h]=P(()=>typeof a.initialState=="function"?a.initialState(a):a.initialState),[v,g]=P(0),{onJobClick:y,analyticsPaginate:m}=Jm({appRef:l,analytics:r,state:p,hasInteracted:!f,totalCount:v,defaultFilters:d}),_=j(T=>{h(k=>{if(k.page===T)return k;const R={...k,page:T};return i==null||i(R),R}),m(T)},[m,i]),w=j(T=>{h(k=>{const R={...k,view:T};return i==null||i(R),R})},[i]),b=j(T=>{h(k=>{if(!k.query&&!T||k.query===T)return k;c(!1);const R=ra(k.geo),N={...k,query:T,geo:R,page:1};return i==null||i(N),N})},[i]),x=j(T=>{c(!1),h(k=>{const R={...k,geo:T};return i==null||i(R),R})},[i]),$=j(()=>{h(T=>{const k={...T,filters:Fn(n,"defaultValue"),query:"",geo:void 0,page:1};return i==null||i(k),k})},[i,n]);return u("div",{ref:l,class:St("ijs-app font-family-default font-weight-default font-style-default flex min-h-screen flex-col gap-4",{"reduce-motion":(C=a.theme.accessibility)==null?void 0:C.reducedMotion},jr(a.theme)),children:[u(qt,{Fallback:je,children:u("div",{class:"flex flex-col gap-2",children:[u("div",{class:"px-4",children:u("div",{class:"bg-section-strong-bg ring-section-weak-stroke rounded-section ring-px lg:ring-width-section flex flex-col gap-4 p-4 md:flex-row",children:[u("section",{class:"flex flex-1 flex-col gap-1",children:[u("p",{class:"text-style-filter text-copy-neutral font-style-filter font-weight-filter",children:s("search_label")}),(E=a.naturalLanguageSearch)!=null&&E.enabled?u(Mh,{value:p.query,onValueChange:b,options:a.naturalLanguageSearch}):a.enableKeywordSearch?u(Nh,{value:p.query,onValueChange:b}):null]}),(S=a.geolocation)!=null&&S.enabled?u("section",{class:"flex flex-1 flex-col gap-1",children:[u("p",{class:"text-style-filter text-copy-neutral font-style-filter font-weight-filter",children:s("geo_label")}),u(Rh,{value:p.geo,onValueChange:T=>{c(!1),h(k=>{const R={...k,geo:T,page:1};return i==null||i(R),R}),m(1)},logger:t})]}):null]})}),u(vp,{state:p,onFilterValueChange:(T,k)=>{c(!1),h(R=>{const N={...R.filters,[T]:k},K=ra(R.geo),Y={...R,filters:N,geo:K,page:1};return i==null||i(Y),Y}),m(1)},onResetFilters:$,properties:n,logger:t,apiClient:e,alerts:a.alerts,theme:a.theme,widgetId:a.widgetId})]})}),u("section",{class:"flex flex-col gap-4 overflow-hidden px-4 py-4",children:[u(qt,{Fallback:je,children:u(Ym,{state:p,logger:t,apiClient:e,jobCardConfig:a.jobCard,mapConfig:a.map,initialData:f?o==null?void 0:o.jobs:void 0,onResultsUpdate:T=>{g(T.totalCount)},onJobClick:y,onPaginate:_,mode:(A=a.naturalLanguageSearch)!=null&&A.enabled?"vector":"query",onGeoChange:x,onViewChange:w})}),a.feedback?u("div",{class:"flex flex-wrap items-center justify-center gap-2",children:[u("p",{class:"font-family-default text-balance font-style-default text-style-job-card-info text-copy-neutral-lowcontrast",children:s("feedback")}),u("div",{"data-widget":"inploi-feedback","data-key":"job-search"})]}):null]})]})},Jm=({appRef:e,analytics:t,state:n,defaultFilters:r,totalCount:o,hasInteracted:i})=>{const a=j((d=1)=>({query:n.query,mode:n.mode,filters:Pr(n.filters),default_filters:Pr(r),total_count:o,page_size:ct,page:d}),[n.query,n.mode,n.filters,r,o]);return sl(e,{minViewTime:2e3,onView:()=>{t.log({event:"VIEW_SEARCH",properties:a()})}}),I(()=>{const d=window.setTimeout(()=>{i&&(!n.query&&!Object.keys(Pr(n.filters)).length||o!==0&&t.log({event:"SEARCH_SETTLE",properties:a()}))},5e3);return()=>{clearTimeout(d)}},[t,i,a,o,n.query,n.filters]),{onJobClick:(d,f)=>{t.log({event:"SEARCH_JOB_CLICK",properties:{job_id:d.id,...a(f)}})},analyticsPaginate:d=>{t.log({event:"SEARCH_PAGINATE",properties:a(d)})}}};exports.D=Ct;exports.E=io;exports.ErrorBoundary=qt;exports.IconSpritesheet=al;exports.JOB_SEARCH_WIDGET_ID=Vc;exports.JobSearch=Zm;exports.TranslationProvider=tl;exports.UnstyledErrorView=ol;exports._=D;exports.commonjsGlobal=Wt;exports.createTFunction=nl;exports.generateColorThemeCss=vl;exports.getDefaultExportFromCjs=vo;exports.getGeolocationFromSearchParams=mh;exports.getJobSearchResults=Ea;exports.getModeFromSearchParams=nc;exports.getStatefulPropertiesFromSearchParams=tc;exports.getViewFromSearchParams=rc;exports.getWidgetStateFromSearchParams=gh;exports.h=P;exports.invariant=oa;exports.k=L;exports.o=u;exports.p=I;exports.setWidgetStateToSearchParams=vh;exports.useDebouncedValue=oc;exports.useTranslation=ne;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-726d5029.cjs");exports.getGeolocationFromSearchParams=e.getGeolocationFromSearchParams;exports.getModeFromSearchParams=e.getModeFromSearchParams;exports.getStatefulPropertiesFromSearchParams=e.getStatefulPropertiesFromSearchParams;exports.getViewFromSearchParams=e.getViewFromSearchParams;exports.getWidgetStateFromSearchParams=e.getWidgetStateFromSearchParams;exports.setWidgetStateToSearchParams=e.setWidgetStateToSearchParams;exports.useDebouncedValue=e.useDebouncedValue;
|
package/dist/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inploi/plugin-job-search",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/plugin-job-search.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"vite-plugin-dts": "^3.9.1",
|
|
67
67
|
"vite-tsconfig-paths": "^4.3.2",
|
|
68
68
|
"@inploi/core": "1.16.0",
|
|
69
|
-
"@inploi/design-tokens": "0.2.1",
|
|
70
69
|
"@inploi/i18n": "0.1.2",
|
|
71
|
-
"eslint-config-custom": "0.1.0"
|
|
70
|
+
"eslint-config-custom": "0.1.0",
|
|
71
|
+
"@inploi/design-tokens": "0.2.1"
|
|
72
72
|
},
|
|
73
73
|
"msw": {
|
|
74
74
|
"workerDirectory": [
|