1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,699375,e=>{"use strict";var t=e.i(843476),n=e.i(500932),i=e.i(271645),a=e.i(981140),r=e.i(820783),o=e.i(30030),l=e.i(369340),s=e.i(999682),u=e.i(635804),c=e.i(248425),d="Switch",[m,f]=(0,o.createContextScope)(d),[p,h]=m(d),g=i.forwardRef((e,n)=>{let{__scopeSwitch:o,name:s,checked:u,defaultChecked:m,required:f,disabled:h,value:g="on",onCheckedChange:b,form:y,...v}=e,[C,S]=i.useState(null),T=(0,r.useComposedRefs)(n,e=>S(e)),P=i.useRef(!1),A=!C||y||!!C.closest("form"),[E,R]=(0,l.useControllableState)({prop:u,defaultProp:m??!1,onChange:b,caller:d});return(0,t.jsxs)(p,{scope:o,checked:E,disabled:h,children:[(0,t.jsx)(c.Primitive.button,{type:"button",role:"switch","aria-checked":E,"aria-required":f,"data-state":x(E),"data-disabled":h?"":void 0,disabled:h,value:g,...v,ref:T,onClick:(0,a.composeEventHandlers)(e.onClick,e=>{R(e=>!e),A&&(P.current=e.isPropagationStopped(),P.current||e.stopPropagation())})}),A&&(0,t.jsx)(w,{control:C,bubbles:!P.current,name:s,value:g,checked:E,required:f,disabled:h,form:y,style:{transform:"translateX(-100%)"}})]})});g.displayName=d;var b="SwitchThumb",y=i.forwardRef((e,n)=>{let{__scopeSwitch:i,...a}=e,r=h(b,i);return(0,t.jsx)(c.Primitive.span,{"data-state":x(r.checked),"data-disabled":r.disabled?"":void 0,...a,ref:n})});y.displayName=b;var w=i.forwardRef(({__scopeSwitch:e,control:n,checked:a,bubbles:o=!0,...l},c)=>{let d=i.useRef(null),m=(0,r.useComposedRefs)(d,c),f=(0,s.usePrevious)(a),p=(0,u.useSize)(n);return i.useEffect(()=>{let e=d.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(f!==a&&t){let n=new Event("click",{bubbles:o});t.call(e,a),e.dispatchEvent(n)}},[f,a,o]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a,...l,tabIndex:-1,ref:m,style:{...l.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function x(e){return e?"checked":"unchecked"}w.displayName="SwitchBubbleInput",e.s(["Root",0,g,"Switch",0,g,"SwitchThumb",0,y,"Thumb",0,y,"createSwitchScope",0,f],57287);var v=e.i(57287),v=v,C=e.i(975157);e.s(["Switch",0,function(e){let i,a,r,o,l,s=(0,n.c)(9);return s[0]!==e?({className:i,...a}=e,s[0]=e,s[1]=i,s[2]=a):(i=s[1],a=s[2]),s[3]!==i?(r=(0,C.cn)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-colors outline-none","focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:border-ring","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-foreground data-[state=unchecked]:bg-muted-foreground/25",i),s[3]=i,s[4]=r):r=s[4],s[5]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(v.Thumb,{"data-slot":"switch-thumb",className:(0,C.cn)("pointer-events-none block size-4 rounded-full bg-background shadow ring-0 transition-transform","data-[state=checked]:translate-x-[18px] data-[state=unchecked]:translate-x-0.5")}),s[5]=o):o=s[5],s[6]!==a||s[7]!==r?(l=(0,t.jsx)(v.Root,{"data-slot":"switch",className:r,...a,children:o}),s[6]=a,s[7]=r,s[8]=l):l=s[8],l}],699375)},484188,e=>{"use strict";var t=e.i(271645),n=e.i(209165);e.s(["useDataRoomFavorites",0,function(){let[e,i]=(0,t.useState)([]),[a,r]=(0,t.useState)(!1),[o,l]=(0,t.useState)(!1),s=(0,t.useRef)(0),u=(0,t.useCallback)(async()=>{let e=++s.current;r(!0),l(!1);try{let t=await (0,n.apiFetch)("/api/v1/data-rooms/favorites"),a=await t.json();return e===s.current&&i(a),a}catch{return e===s.current&&l(!0),[]}finally{e===s.current&&r(!1)}},[]),c=(0,t.useCallback)(async(e,t,i)=>{await (0,n.apiFetch)(`/api/v1/data-rooms/${e}/favorites`,{method:"POST",body:JSON.stringify({item_type:t,item_id:i})})},[]),d=(0,t.useCallback)(async(e,t,i)=>{await (0,n.apiFetch)(`/api/v1/data-rooms/${e}/favorites?item_type=${t}&item_id=${i}`,{method:"DELETE"})},[]),m=(0,t.useCallback)(async(e,t,n,i)=>{i?await d(e,t,n):await c(e,t,n),await u()},[c,d,u]);return{favorites:e,loading:a,error:o,fetchFavorites:u,addFavorite:c,removeFavorite:d,toggleFavorite:m}}])},593900,40807,e=>{"use strict";var t=e.i(500932),n=e.i(271645),i=e.i(209165),a=e.i(13080);let r="palette:notification-sound",o="palette:notification-sound-change",l={mac:[{frequency:659.25,start:0,duration:.14,type:"sine",gain:.9},{frequency:987.77,start:.12,duration:.18,type:"sine",gain:.72}],iphone:[{frequency:1046.5,start:0,duration:.1,type:"sine",gain:.82},{frequency:1318.51,start:.11,duration:.1,type:"sine",gain:.78},{frequency:1567.98,start:.22,duration:.16,type:"sine",gain:.7}],ping:[{frequency:880,start:0,duration:.16,type:"triangle",gain:.8}],pop:[{frequency:420,start:0,duration:.055,type:"square",gain:.45},{frequency:720,start:.045,duration:.07,type:"triangle",gain:.55}]},s=null;function u(e){return"string"==typeof e&&Object.prototype.hasOwnProperty.call(l,e)}function c(e){let t="number"==typeof e?e:Number(e);return Number.isFinite(t)?Math.min(1,Math.max(0,t)):.45}function d(){let e=function(){try{let e=window.localStorage.getItem(r);if(!e)return{};let t=JSON.parse(e);return t&&"object"==typeof t?t:{}}catch{return{}}}();return{enabled:"boolean"!=typeof e.enabled||e.enabled,tone:u(e.tone)?e.tone:"mac",volume:c(e.volume)}}async function m(e,t){let n,i=(n=window.AudioContext||window.webkitAudioContext)?s??=new n:null;if(!i)return;"suspended"===i.state&&await i.resume();let a=i.createGain();a.gain.setValueAtTime(Math.max(0,Math.min(1,t)),i.currentTime),a.connect(i.destination);let r=l[e],o=i.currentTime+.015,u=Math.max(...r.map(e=>e.start+e.duration))+.05;
1r.forEach(e=>{let t=i.createOscillator(),n=i.createGain(),r=o+e.start,l=r+e.duration;t.type=e.type??"sine",t.frequency.setValueAtTime(e.frequency,r),n.gain.setValueAtTime(1e-4,r),n.gain.exponentialRampToValueAtTime(e.gain??.75,r+.018),n.gain.exponentialRampToValueAtTime(1e-4,l),t.connect(n),n.connect(a),t.start(r),t.stop(l+.02)}),setTimeout(()=>a.disconnect(),Math.ceil(1e3*u))}function f(e){let t=d();t.enabled&&!(t.volume<=0)&&m(t.tone,t.volume).catch(()=>{})}e.s(["NOTIFICATION_SOUND_CHANGE_EVENT",0,o,"NOTIFICATION_SOUND_TONES",0,[{id:"mac",label:"Mac-style chime",description:"A clear two-note desktop chime."},{id:"iphone",label:"iPhone-style tri-tone",description:"A bright three-note alert."},{id:"ping",label:"Soft ping",description:"A light single-note notification."},{id:"pop",label:"Digital pop",description:"A short modern tap."}],"getNotificationSoundPreferences",0,d,"playNotificationSound",0,f,"previewNotificationSound",0,function(e=d()){e.volume<=0||m(e.tone,e.volume).catch(()=>{})},"setNotificationSoundPreferences",0,function(e){let t={...d(),...e};return t.tone=u(t.tone)?t.tone:"mac",t.volume=c(t.volume),window.localStorage.setItem(r,JSON.stringify(t)),window.dispatchEvent(new CustomEvent(o,{detail:t})),t}],40807);let p=null,h=null,g=null,b=0,y=new Set,w=new Set,x=new Set,v=new Set,C=new Map;function S(e){let t=C.get(e);return t||(t={notifications:null,unreadCount:null,unreadByApp:null,notificationsPromise:null,unreadCountPromise:null,unreadByAppPromise:null,refreshPromise:null,listeners:new Set,consumerCount:0,loading:!1,lastRefreshAt:0,reconcileTimer:null,reconnectReconcileTimer:null,visibilityHandler:null,streamRelease:null,streamHadError:!1},C.set(e,t)),t}function T(e){let t=C.get(e);t&&t.listeners.forEach(e=>e())}function P(e){let t=C.get(e);return{notifications:t?.notifications??[],unreadCount:t?.unreadCount??0,unreadByApp:t?.unreadByApp??{},loading:t?.loading??!1}}async function A(e,t=!1){let n=S(e);return n.notificationsPromise?n.notificationsPromise:!t&&n.notifications?n.notifications:(n.notificationsPromise=(0,i.apiFetch)("/api/v1/notifications/?limit=50").then(e=>e.ok?e.json():[]).then(e=>(n.notifications=e,e)).catch(()=>n.notifications??[]).finally(()=>{n.notificationsPromise=null}),n.notificationsPromise)}async function E(e,t=!1){let n=S(e);return n.unreadCountPromise?n.unreadCountPromise:t||null===n.unreadCount?(n.unreadCountPromise=(0,i.apiFetch)("/api/v1/notifications/unread-count").then(e=>e.ok?e.json():{count:0}).then(e=>{let t=Number(e.count??0);return n.unreadCount=t,t}).catch(()=>n.unreadCount??0).finally(()=>{n.unreadCountPromise=null}),n.unreadCountPromise):n.unreadCount}async function R(e,t=!1){let n=S(e);return n.unreadByAppPromise?n.unreadByAppPromise:t||null===n.unreadByApp?(n.unreadByAppPromise=(0,i.apiFetch)("/api/v1/notifications/unread-counts-by-app").then(e=>e.ok?e.json():{by_app:{}}).then(e=>{let t=e.by_app??{};return n.unreadByApp=t,t}).catch(()=>n.unreadByApp??{}).finally(()=>{n.unreadByAppPromise=null}),n.unreadByAppPromise):n.unreadByApp}async function N(e,t=!1){let n=S(e);return n.refreshPromise?n.refreshPromise:t||!n.notifications||null===n.unreadCount||null===n.unreadByApp||Date.now()-n.lastRefreshAt>6e4?(n.loading=null===n.notifications,T(e),n.refreshPromise=Promise.all([A(e,t),E(e,t),R(e,t)]).then(([e,t,i])=>{n.notifications=e,n.unreadCount=t,n.unreadByApp=i,n.lastRefreshAt=Date.now()}).finally(()=>{n.loading=!1,n.refreshPromise=null,T(e)}),n.refreshPromise):void 0}async function k(e,t){g=e;try{S(e).unreadCount=await E(e),T(e)}catch{return}finally{g===e&&(g=null)}if(b!==t||h!==e||0===y.size||p)return;let n=new EventSource(`${i.BASE}/api/v1/notifications/stream`,{withCredentials:!0});n.onopen=()=>y.forEach(e=>e.onOpen()),n.onerror=()=>y.forEach(e=>e.onError?.()),n.onmessage=e=>{try{let t=JSON.parse(e.data);if(!t||"connected"===t.type)return;y.forEach(e=>e.onEvent(t))}catch{}},p=n}function _(e){return e.target_app_id?e.target_app_id:e.action_route?.startsWith("/apps/")?e.action_route.replace("/apps/","").split("/",1)[0]||null:e.source_app_id}function M(e){return{...e,is_read:!0}}e.s(["useNotifications",0,function(e){let r,o,l,s,u,c,d,m,C,A,E,R,z,B=(0,t.c)(31),{user:j}=(0,a.useAuth)(),I=j?.organization_id??null;B[0]!==I?(r=()=>I?P(I):{notifications:[],unreadCount:0,unreadByApp:{},loading:!1},B[0]=I,B[1]=r):r=B[1];
1let[D,O]=(0,n.useState)(r),H=(0,n.useRef)(e?.onIncoming),F=(0,n.useRef)(e?.onNotification),W=!!e?.onIncoming,L=!!e?.onNotification;B[2]!==e?.onIncoming||B[3]!==e?.onNotification?(o=()=>{H.current=e?.onIncoming,F.current=e?.onNotification},B[2]=e?.onIncoming,B[3]=e?.onNotification,B[4]=o):o=B[4],(0,n.useEffect)(o),B[5]!==I?(l=()=>{let e,t;if(!I)return void O({notifications:[],unreadCount:0,unreadByApp:{},loading:!1});let n=()=>O(P(I));return n(),t=0===(e=S(I)).consumerCount,e.consumerCount+=1,e.listeners.add(n),t&&function(e){let t=S(e);if(!t.streamRelease&&!t.reconcileTimer){var n;N(e),n={onOpen:()=>{let n;t.streamHadError&&((n=S(e)).reconnectReconcileTimer&&clearTimeout(n.reconnectReconcileTimer),n.reconnectReconcileTimer=setTimeout(()=>{n.reconnectReconcileTimer=null,n.consumerCount>0&&N(e,!0)},1e3)),t.streamHadError=!1},onError:()=>{t.streamHadError=!0},onEvent:t=>{if((null==t.organization_id||t.organization_id===e||"org_invitation"===t.type)&&"number"==typeof t.id){let n=S(e);if(!n.notifications?.some(e=>e.id===t.id)){if(n.notifications=[t,...n.notifications??[]],!t.is_read){n.unreadCount=(n.unreadCount??0)+1;let e=_(t);e&&(n.unreadByApp={...n.unreadByApp??{},[e]:((n.unreadByApp??{})[e]??0)+1})}T(e),f(t),v.forEach(e=>e(t)),function(e){if(!function(e){if(w.has(e))return!1;if(w.add(e),w.size>500){let e=w.values().next().value;void 0!==e&&w.delete(e)}return!0}(e.id))return;let t=x.values().next().value;t?.(e)}(t)}}}},y.add(n),h!==e?(p?.close(),p=null,h=e,k(e,++b)):p||g===e||k(e,++b),t.streamRelease=()=>{y.delete(n),0===y.size&&(p?.close(),p=null,h=null,g=null,b+=1)},t.reconcileTimer=setInterval(()=>{("u"<typeof document||!document.hidden)&&N(e,!0)},3e5),"u">typeof document&&(t.visibilityHandler=()=>{!document.hidden&&Date.now()-t.lastRefreshAt>3e5&&N(e,!0)},document.addEventListener("visibilitychange",t.visibilityHandler))}}(I),()=>{let t;e.listeners.delete(n),e.consumerCount=Math.max(0,e.consumerCount-1),0===e.consumerCount&&(t=S(I),t.streamRelease?.(),t.streamRelease=null,t.reconcileTimer&&clearInterval(t.reconcileTimer),t.reconcileTimer=null,t.reconnectReconcileTimer&&clearTimeout(t.reconnectReconcileTimer),t.reconnectReconcileTimer=null,t.visibilityHandler&&"u">typeof document&&document.removeEventListener("visibilitychange",t.visibilityHandler),t.visibilityHandler=null,t.streamHadError=!1)}},s=[I],B[5]=I,B[6]=l,B[7]=s):(l=B[6],s=B[7]),(0,n.useEffect)(l,s),B[8]!==W?(u=()=>{if(W){var e;return e=e=>H.current?.(e),x.add(e),()=>{x.delete(e)}}},c=[W],B[8]=W,B[9]=u,B[10]=c):(u=B[9],c=B[10]),(0,n.useEffect)(u,c),B[11]!==L?(d=()=>{if(L){var e;return e=e=>F.current?.(e),v.add(e),()=>{v.delete(e)}}},m=[L],B[11]=L,B[12]=d,B[13]=m):(d=B[12],m=B[13]),(0,n.useEffect)(d,m),B[14]!==I?(C=async e=>{I&&await N(I,void 0!==e&&e)},B[14]=I,B[15]=C):C=B[15];let U=C;B[16]!==I?(A=async function(e){if(I&&(await (0,i.apiFetch)(`/api/v1/notifications/${e}/read`,{method:"PATCH"})).ok){let t=S(I),n=t.notifications?.find(t=>t.id===e),i=n?!n.is_read:(t.unreadCount??0)>0;if(t.notifications&&(t.notifications=t.notifications.map(t=>t.id===e?{...t,is_read:!0}:t)),i){t.unreadCount=Math.max(0,(t.unreadCount??0)-1);let e=n?_(n):null;if(e){let n={...t.unreadByApp??{},[e]:Math.max(0,((t.unreadByApp??{})[e]??0)-1)};0===n[e]&&delete n[e],t.unreadByApp=n}}T(I)}},B[16]=I,B[17]=A):A=B[17];let q=A;B[18]!==I?(E=async function(){if(I&&(await (0,i.apiFetch)("/api/v1/notifications/mark-all-read",{method:"POST"})).ok){let e=S(I);e.notifications&&(e.notifications=e.notifications.map(M)),e.unreadCount=0,e.unreadByApp={},T(I)}},B[18]=I,B[19]=E):E=B[19];let $=E;B[20]!==I?(R=async function(){!I||(await (0,i.apiFetch)("/api/v1/notifications/",{method:"DELETE"})).ok&&await N(I,!0)},B[20]=I,B[21]=R):R=B[21];let J=R;return B[22]!==J||B[23]!==$||B[24]!==q||B[25]!==U||B[26]!==D.loading||B[27]!==D.notifications||B[28]!==D.unreadByApp||B[29]!==D.unreadCount?(z={notifications:D.notifications,unreadCount:D.unreadCount,unreadByApp:D.unreadByApp,loading:D.loading,markRead:q,markAllRead:$,clearAll:J,refetch:U},B[22]=J,B[23]=$,B[24]=q,B[25]=U,B[26]=D.loading,B[27]=D.notifications,B[28]=D.unreadByApp,B[29]=D.unreadCount,B[30]=z):z=B[30],z}],593900)},540956,917344,980376,e=>{"use strict";var t=e.i(843476),n=e.i(500932),i=e.i(817389),a=e.i(587583),r=e.i(630233),o=e.i(259976),l=e.i(700224),s=e.i(209165),u=e.i(975157);
1let c={pending:{label:"Pending",icon:r.Clock,dot:"bg-amber-500",text:"text-amber-600 dark:text-amber-400",badge:"text-amber-700 bg-amber-500/10 border-amber-500/25 dark:text-amber-400"},in_progress:{label:"Running",icon:a.CircleNotch,dot:"bg-blue-500",text:"text-blue-600 dark:text-blue-400",badge:"text-blue-700 bg-blue-500/10 border-blue-500/25 dark:text-blue-400"},completed:{label:"Done",icon:i.CheckCircle,dot:"bg-emerald-500",text:"text-emerald-600 dark:text-emerald-400",badge:"text-emerald-700 bg-emerald-500/10 border-emerald-500/25 dark:text-emerald-400"},failed:{label:"Failed",icon:l.WarningCircle,dot:"bg-destructive",text:"text-destructive",badge:"text-destructive bg-destructive/10 border-destructive/25"},cancelled:{label:"Cancelled",icon:o.Prohibit,dot:"bg-muted-foreground/50",text:"text-muted-foreground",badge:"text-muted-foreground bg-muted border-border"}},d={low:{label:"LOW",className:"text-muted-foreground/70"},medium:{label:"MED",className:"text-muted-foreground"},high:{label:"HIGH",className:"text-foreground"},urgent:{label:"URGENT",className:"text-amber-600 dark:text-amber-400"},critical:{label:"CRITICAL",className:"text-destructive"}};async function m(e){let t=await (0,s.apiFetch)(e);return await t.json()}e.s(["PriorityTag",0,function(e){let i,a,r=(0,n.c)(5),{priority:o}=e,l=d[o]??d.medium;return r[0]!==l.className?(i=(0,u.cn)("text-[10px] font-medium tracking-widest",l.className),r[0]=l.className,r[1]=i):i=r[1],r[2]!==l.label||r[3]!==i?(a=(0,t.jsx)("span",{className:i,children:l.label}),r[2]=l.label,r[3]=i,r[4]=a):a=r[4],a},"STATUS_META",0,c,"STATUS_ORDER",0,["pending","in_progress","completed","failed","cancelled"],"StatusDot",0,function(e){let i,a,r,o,l,s=(0,n.c)(13),{status:d,className:m}=e,f=c[d]??c.pending;return s[0]!==m?(i=(0,u.cn)("relative inline-flex size-2 shrink-0",m),s[0]=m,s[1]=i):i=s[1],s[2]!==f.dot||s[3]!==d?(a="in_progress"===d&&(0,t.jsx)("span",{className:(0,u.cn)("absolute inline-flex h-full w-full animate-ping rounded-full opacity-60",f.dot)}),s[2]=f.dot,s[3]=d,s[4]=a):a=s[4],s[5]!==f.dot?(r=(0,u.cn)("relative inline-flex size-2 rounded-full",f.dot),s[5]=f.dot,s[6]=r):r=s[6],s[7]!==r?(o=(0,t.jsx)("span",{className:r}),s[7]=r,s[8]=o):o=s[8],s[9]!==i||s[10]!==a||s[11]!==o?(l=(0,t.jsxs)("span",{className:i,children:[a,o]}),s[9]=i,s[10]=a,s[11]=o,s[12]=l):l=s[12],l},"formatRelative",0,function(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let n=Math.floor(t/60);if(n<24)return`${n}h ago`;let i=Math.floor(n/24);return i<7?`${i}d ago`:new Date(e).toLocaleDateString([],{month:"short",day:"numeric"})},"readJson",0,m,"subscribeTaskStream",0,function(e){let t=new EventSource(`${s.BASE}/api/v1/tasks/stream`,{withCredentials:!0});return t.onmessage=t=>{let n={};try{n=JSON.parse(t.data)}catch{}"connected"!==n.type&&e(n)},()=>t.close()}],540956),e.s(["checkUrl",0,function(e,t){let n,i=(e??"").trim();if(!i)return{ok:!1,reason:"malformed",detail:""};try{n=new URL(i)}catch{return{ok:!1,reason:"malformed",detail:i.slice(0,80)}}return"https:"!==n.protocol?{ok:!1,reason:"scheme",detail:n.protocol.replace(":","")}:!function(e,t){if(null==t)return!0;let n=e.toLowerCase();return t.some(e=>{let t=String(e).trim().toLowerCase();if(!t)return!1;if(t.startsWith("*.")){let e=t.slice(2);return n===e||n.endsWith(`.${e}`)}return n===t})}(n.hostname,t)?{ok:!1,reason:"origin",detail:n.hostname}:{ok:!0,url:n.toString(),hostname:n.hostname}},"isSameHost",0,function(e){try{return new URL(e).hostname.toLowerCase()===window.location.hostname.toLowerCase()}catch{return!1}}],917344);var f=e.i(995926),p=e.i(964053);e.i(785269);var h=e.i(322831);function g(e){let i,a,r=(0,n.c)(4);return r[0]!==e?({...i}=e,r[0]=e,r[1]=i):i=r[1],r[2]!==i?(a=(0,t.jsx)(p.Dialog.Portal,{"data-slot":"sheet-portal",...i}),r[2]=i,r[3]=a):a=r[3],a}function b(e){let i,a,r,o,l=(0,n.c)(8);return l[0]!==e?({className:i,...a}=e,l[0]=e,l[1]=i,l[2]=a):(i=l[1],a=l[2]),l[3]!==i?(r=(0,u.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[2147483647] bg-black/50",i),l[3]=i,l[4]=r):r=l[4],l[5]!==a||l[6]!==r?(o=(0,t.jsx)(p.Dialog.Overlay,{"data-slot":"sheet-overlay",className:r,...a}),l[5]=a,l[6]=r,l[7]=o):o=l[7],o}e.s(["Sheet",0,function(e){let i,a,r=(0,n.c)(4);return r[0]!==e?({...i}=e,r[0]=e,r[1]=i):i=r[1],r[2]!==i?(a=(0,t.jsx)(p.Dialog.Root,{"data-slot":"sheet",...i}),r[2]=i,r[3]=a):a=r[3],a},"SheetContent",0,function(e){let i,a,r,o,l,s,c,d,m,y=(0,n.c)(21);y[0]!==e?({className:a,children:i,side:o,showCloseButton:l,...r}=e,y[0]=e,y[1]=i,y[2]=a,y[3]=r,y[4]=o,y[5]=l):(i=y[1],a=y[2],r=y[3],o=y[4],l=y[5]);let w=void 0===o?"right":o,x=void 0===l||l,{t:v}=(0,h.useTranslation)();y[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(b,{}),y[6]=s):s=y[6];let C="right"===w&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",S="left"===w&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",T="top"===w&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",P="bottom"===w&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";return y[7]!==a||y[8]!==C||y[9]!==S||y[10]!==T||y[11]!==P?(c=(0,u.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-[2147483647] flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",C,S,T,P,a),y[7]=a,y[8]=C,y[9]=S,y[10]=T,y[11]=P,y[
112]=c):c=y[12],y[13]!==x||y[14]!==v?(d=x&&(0,t.jsxs)(p.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,t.jsx)(f.XIcon,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:v("actions.close")})]}),y[13]=x,y[14]=v,y[15]=d):d=y[15],y[16]!==i||y[17]!==r||y[18]!==c||y[19]!==d?(m=(0,t.jsxs)(g,{children:[s,(0,t.jsxs)(p.Dialog.Content,{"data-slot":"sheet-content",className:c,...r,children:[i,d]})]}),y[16]=i,y[17]=r,y[18]=c,y[19]=d,y[20]=m):m=y[20],m},"SheetDescription",0,function(e){let i,a,r,o,l=(0,n.c)(8);return l[0]!==e?({className:i,...a}=e,l[0]=e,l[1]=i,l[2]=a):(i=l[1],a=l[2]),l[3]!==i?(r=(0,u.cn)("text-muted-foreground text-sm",i),l[3]=i,l[4]=r):r=l[4],l[5]!==a||l[6]!==r?(o=(0,t.jsx)(p.Dialog.Description,{"data-slot":"sheet-description",className:r,...a}),l[5]=a,l[6]=r,l[7]=o):o=l[7],o},"SheetFooter",0,function(e){let i,a,r,o,l=(0,n.c)(8);return l[0]!==e?({className:i,...a}=e,l[0]=e,l[1]=i,l[2]=a):(i=l[1],a=l[2]),l[3]!==i?(r=(0,u.cn)("mt-auto flex flex-col gap-2 p-4",i),l[3]=i,l[4]=r):r=l[4],l[5]!==a||l[6]!==r?(o=(0,t.jsx)("div",{"data-slot":"sheet-footer",className:r,...a}),l[5]=a,l[6]=r,l[7]=o):o=l[7],o},"SheetHeader",0,function(e){let i,a,r,o,l=(0,n.c)(8);return l[0]!==e?({className:i,...a}=e,l[0]=e,l[1]=i,l[2]=a):(i=l[1],a=l[2]),l[3]!==i?(r=(0,u.cn)("flex flex-col gap-1.5 p-4",i),l[3]=i,l[4]=r):r=l[4],l[5]!==a||l[6]!==r?(o=(0,t.jsx)("div",{"data-slot":"sheet-header",className:r,...a}),l[5]=a,l[6]=r,l[7]=o):o=l[7],o},"SheetTitle",0,function(e){let i,a,r,o,l=(0,n.c)(8);return l[0]!==e?({className:i,...a}=e,l[0]=e,l[1]=i,l[2]=a):(i=l[1],a=l[2]),l[3]!==i?(r=(0,u.cn)("text-foreground font-semibold",i),l[3]=i,l[4]=r):r=l[4],l[5]!==a||l[6]!==r?(o=(0,t.jsx)(p.Dialog.Title,{"data-slot":"sheet-title",className:r,...a}),l[5]=a,l[6]=r,l[7]=o):o=l[7],o}],980376)},813124,e=>{"use strict";var t=e.i(843476),n=e.i(500932),i=e.i(705800),a=e.i(271645),r=e.i(618566),o=e.i(234170),l=e.i(993540);function s(e){return e.map(u)}function u(e){return{...e,x:Math.min(e.x,window.innerWidth-100),y:Math.min(e.y,window.innerHeight-50)}}function c(e){return e.map(d)}function d(e){return{...e,minimized:!0}}function m(e,t){return e.zIndex>t.zIndex?e:t}function f(e){return!e.minimized}function p(e,t){return e.zIndex>t.zIndex?e:t}function h(e){return!e.minimized}e.s(["WindowManagerProvider",0,function(e){let u,d,g,b,y,w,x,v,C,S,T,P,A,E,R,N,k,_,M,z,B,j,I,D,O=(0,n.c)(50),{children:H}=e,F=(0,r.usePathname)(),W=(0,r.useRouter)(),L=(0,r.useSearchParams)(),U=(0,l.routeSearchFromParams)(L);O[0]===Symbol.for("react.memo_cache_sentinel")?(u=[],O[0]=u):u=O[0];let[q,$]=(0,a.useState)(u),[J,V]=(0,a.useState)(null);O[1]===Symbol.for("react.memo_cache_sentinel")?(d=[],O[1]=d):d=O[1];let G=(0,a.useRef)(d),K=(0,a.useRef)(null),X=(0,a.useRef)(5),Q=(0,a.useRef)(null);O[2]!==W?(g=e=>{e!==Q.current&&(Q.current=e,window.history.replaceState(null,"",e),window.dispatchEvent(new Event("palette:locationchange")),(0,a.startTransition)(()=>{W.replace(e,{scroll:!1})}))},O[2]=W,O[3]=g):g=O[3];let Y=g;O[4]!==J?(b=()=>{K.current=J},y=[J],O[4]=J,O[5]=b,O[6]=y):(b=O[5],y=O[6]),(0,a.useEffect)(b,y),O[7]!==q?(w=()=>{G.current=q},x=[q],O[7]=q,O[8]=w,O[9]=x):(w=O[8],x=O[9]),(0,a.useEffect)(w,x),O[10]!==U||O[11]!==F||O[12]!==Y?(v=()=>{let e=(0,i.retiredBuilderTarget)(F+U);e&&Y(e);let{route:t,subRoute:n,search:a}=(0,l.routeStateFromPathname)(F,U);"/dashboard"!==t&&"/"!==F&&$(e=>{let i=e.find(e=>e.route===t),r=X.current=X.current+1;if(i)return V(i.id),e.map(e=>e.id===i.id?{...e,subRoute:n,search:a,minimized:!1,zIndex:r}:e);let o=t.startsWith("/apps/")&&a.includes("preview_publish_id="),l=crypto.randomUUID(),s=Math.max(400,Math.round(window.innerWidth*(o?.82:.6))),u=Math.max(300,Math.round(window.innerHeight*(o?.76:.65))),c=Math.round((window.innerWidth-s)/2),d=o?58:Math.round((window.innerHeight-u)/2)-30;return V(l),[...e,{id:l,route:t,subRoute:n,search:a,x:c,y:d,width:s,height:u,zIndex:r,minimized:!1,mode:o?"free":"maximized"}]})},C=[F,U,Y],O[10]=U,O[11]=F,O[12]=Y,O[13]=v,O[14]=C):(v=O[13],C=O[14]),(0,a.useEffect)(v,C),O[15]!==Y?(S=(e,t)=>{let n=(0,i.retiredBuilderTarget)(e+(t??""));if(n){let i=n.indexOf("?"),a=(0,l.routeStateFromPathname)(i<0?n:n.slice(0,i),i<0?"":n.slice(i));e=a.route,t=a.subRoute+a.search}let a=G.current.find(t=>t.route===e);Y("/"===e?t??a?.subRoute??"/":e+(t??a?.subRoute??"")),$(n=>{let i=n.find(t=>t.route===e);if(i){let e=X.current=X.current+1;
1V(i.id);let a={...i,minimized:!1,zIndex:e,...void 0!==t?{subRoute:t}:{}};return n.map(e=>e.id===i.id?a:e)}let a=crypto.randomUUID(),r=n.length,o=Math.max(400,Math.round(.6*window.innerWidth)),l=Math.max(300,Math.round(.65*window.innerHeight)),s={id:a,route:e,subRoute:t??"",search:"",x:80+r%8*30,y:40+r%8*30,width:o,height:l,zIndex:X.current=X.current+1,minimized:!1,mode:"maximized"};return V(a),[...n,s]})},O[15]=Y,O[16]=S):S=O[16];let Z=S;O[17]!==Y?(T=e=>{let t=G.current.filter(t=>t.id!==e).filter(h),n=t.length>0?t.reduce(p):null;V(n?.id??null),$(t=>t.filter(t=>t.id!==e)),Y(n?(0,l.getFullPath)(n):"/dashboard")},O[17]=Y,O[18]=T):T=O[18];let ee=T;O[19]!==Y?(P=e=>{let t=X.current=X.current+1;V(e),$(n=>n.map(n=>{if(n.id!==e)return n;let i={...n,zIndex:t};return Y((0,l.getFullPath)(i)),i}))},O[19]=Y,O[20]=P):P=O[20];let et=P;O[21]!==Y?(A=e=>{$(t=>{let n=t.map(t=>t.id===e?{...t,minimized:!0}:t),i=n.filter(f);if(i.length>0){let e=i.reduce(m);V(e.id),Y((0,l.getFullPath)(e))}else V(null),Y("/dashboard");return n})},O[21]=Y,O[22]=A):A=O[22];let en=A;O[23]!==Y?(E=e=>{let t=X.current=X.current+1;V(e),$(n=>n.map(n=>{if(n.id!==e)return n;let i={...n,minimized:!1,zIndex:t};return Y((0,l.getFullPath)(i)),i}))},O[23]=Y,O[24]=E):E=O[24];let ei=E;O[25]!==Y?(R=()=>{$(c),V(null),Y("/dashboard")},O[25]=Y,O[26]=R):R=O[26];let ea=R;O[27]===Symbol.for("react.memo_cache_sentinel")?(N=(e,t,n)=>{$(i=>i.map(i=>i.id===e?{...i,x:t,y:n}:i))},O[27]=N):N=O[27];let er=N;O[28]===Symbol.for("react.memo_cache_sentinel")?(k=(e,t,n,i,a)=>{$(r=>r.map(r=>r.id===e?{...r,x:t,y:n,width:Math.max(400,i),height:Math.max(300,a)}:r))},O[28]=k):k=O[28];let eo=k;O[29]===Symbol.for("react.memo_cache_sentinel")?(_=(e,t)=>{$(n=>n.map(n=>{if(n.id!==e)return n;if("free"===t&&"free"!==n.mode){let e=Math.max(400,Math.round(.6*window.innerWidth)),i=Math.max(300,Math.round(.65*window.innerHeight));return{...n,mode:t,x:Math.round((window.innerWidth-e)/2),y:Math.round((window.innerHeight-i)/2)-30,width:e,height:i}}return{...n,mode:t}}))},O[29]=_):_=O[29];let el=_;O[30]!==Y?(M=(e,t)=>{$(n=>n.map(n=>{if(n.id!==e)return n;let i=(0,l.splitSubRoute)(t),a={...n,subRoute:i.subRoute,search:i.search||n.search};return K.current!==e||a.minimized||Y((0,l.getFullPath)(a)),a}))},O[30]=Y,O[31]=M):M=O[31];let es=M;O[32]!==q?(z=e=>q.some(t=>t.route===e),O[32]=q,O[33]=z):z=O[33];let eu=z;O[34]===Symbol.for("react.memo_cache_sentinel")?(B=()=>{let e=()=>{$(s)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},j=[],O[34]=B,O[35]=j):(B=O[34],j=O[35]),(0,a.useEffect)(B,j),O[36]!==ee||O[37]!==et||O[38]!==J||O[39]!==eu||O[40]!==ea||O[41]!==en||O[42]!==Z||O[43]!==ei||O[44]!==es||O[45]!==q?(I={windows:q,focusedWindowId:J,openWindow:Z,closeWindow:ee,focusWindow:et,minimizeWindow:en,restoreWindow:ei,minimizeAll:ea,updateWindowPosition:er,updateWindowSize:eo,setWindowMode:el,hasWindowForRoute:eu,updateWindowSubRoute:es},O[36]=ee,O[37]=et,O[38]=J,O[39]=eu,O[40]=ea,O[41]=en,O[42]=Z,O[43]=ei,O[44]=es,O[45]=q,O[46]=I):I=O[46];let ec=I;return O[47]!==ec||O[48]!==H?(D=(0,t.jsx)(o.WindowManagerCtx.Provider,{value:ec,children:H}),O[47]=ec,O[48]=H,O[49]=D):D=O[49],D},"useWindowManager",0,function(){let e=(0,a.useContext)(o.WindowManagerCtx);if(!e)throw Error("useWindowManager must be used within WindowManagerProvider");return e}])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.