@tickernelz/paperclip-pro-server 2026.925.1 → 2026.926.0
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/build-info.json +1 -1
- package/dist/redaction.js +1 -1
- package/dist/redaction.js.map +1 -1
- package/dist/routes/access.d.ts.map +1 -1
- package/dist/routes/access.js +37 -13
- package/dist/routes/access.js.map +1 -1
- package/dist/routes/adapters.d.ts.map +1 -1
- package/dist/routes/adapters.js +14 -22
- package/dist/routes/adapters.js.map +1 -1
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/agents.js +48 -16
- package/dist/routes/agents.js.map +1 -1
- package/dist/routes/approvals.d.ts.map +1 -1
- package/dist/routes/approvals.js +28 -10
- package/dist/routes/approvals.js.map +1 -1
- package/dist/routes/costs.d.ts.map +1 -1
- package/dist/routes/costs.js +6 -2
- package/dist/routes/costs.js.map +1 -1
- package/dist/routes/issues.d.ts.map +1 -1
- package/dist/routes/issues.js +80 -1
- package/dist/routes/issues.js.map +1 -1
- package/dist/routes/openapi.d.ts.map +1 -1
- package/dist/routes/openapi.js +32 -1
- package/dist/routes/openapi.js.map +1 -1
- package/dist/services/adapter-config-schema.d.ts +11 -0
- package/dist/services/adapter-config-schema.d.ts.map +1 -0
- package/dist/services/adapter-config-schema.js +23 -0
- package/dist/services/adapter-config-schema.js.map +1 -0
- package/dist/services/heartbeat.d.ts +4 -4
- package/dist/services/heartbeat.d.ts.map +1 -1
- package/dist/services/heartbeat.js +113 -9
- package/dist/services/heartbeat.js.map +1 -1
- package/dist/services/issue-run-model-override.d.ts +31 -0
- package/dist/services/issue-run-model-override.d.ts.map +1 -0
- package/dist/services/issue-run-model-override.js +171 -0
- package/dist/services/issue-run-model-override.js.map +1 -0
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/crypto.d.ts +2 -2
- package/node_modules/@types/node/dgram.d.ts +1 -1
- package/node_modules/@types/node/package.json +2 -2
- package/package.json +20 -20
- package/ui-dist/assets/{AgentAvatar-BR1Z_L_Z.js → AgentAvatar-CWNp7Eqe.js} +1 -1
- package/ui-dist/assets/{AgentIdentity-BgihkjQU.js → AgentIdentity-Bqzrcghn.js} +1 -1
- package/ui-dist/assets/{Agents.production-CSsrqqG3.js → Agents.production-Cs7mMvAL.js} +2 -2
- package/ui-dist/assets/{CompanyActivity.production-C3D5uiX9.js → CompanyActivity.production-4bljbHSU.js} +1 -1
- package/ui-dist/assets/{CompanyExport-CrTwKkGN.js → CompanyExport-CBh7R3lQ.js} +1 -1
- package/ui-dist/assets/{CompanySkills.production-22PSRfdH.js → CompanySkills.production-DEleeGzs.js} +1 -1
- package/ui-dist/assets/{Costs.production-hPGllSho.js → Costs.production-Dm5j2nxX.js} +1 -1
- package/ui-dist/assets/{EmptyState-DOb3I5aU.js → EmptyState-D62UDLDa.js} +1 -1
- package/ui-dist/assets/{MarkdownBody-AdwNLx7A.js → MarkdownBody-DfGkmx3G.js} +1 -1
- package/ui-dist/assets/{MarkdownEditor-B3NYD32f.js → MarkdownEditor-ZwstkvWb.js} +1 -1
- package/ui-dist/assets/{OrgChart.production-yz5AfR-F.js → OrgChart.production-BWKofGdO.js} +1 -1
- package/ui-dist/assets/{PageSkeleton-C-C3Xlc_.js → PageSkeleton-C0pPO_Gb.js} +1 -1
- package/ui-dist/assets/{RoutineDetail.production-BJLGGgbv.js → RoutineDetail.production-_auZa0K9.js} +1 -1
- package/ui-dist/assets/RoutineRunVariablesDialog-CUcwhS7L.js +5 -0
- package/ui-dist/assets/{Routines.production-BLDTlRLI.js → Routines.production-D8R6Ujt6.js} +1 -1
- package/ui-dist/assets/{SidebarContext-9UFQ2Pex.js → SidebarContext-B3vvFvTk.js} +1 -1
- package/ui-dist/assets/{StatusIcon-DMDp_WJw.js → StatusIcon-BYqGFWup.js} +1 -1
- package/ui-dist/assets/{agents-DrLpWAcm.js → agents-CNina7HI.js} +1 -1
- package/ui-dist/assets/{badge-BLr1M3ne.js → badge-CW7lQ_Zd.js} +1 -1
- package/ui-dist/assets/{bot-CET4VfU-.js → bot-DIsSOxfs.js} +1 -1
- package/ui-dist/assets/{button-DCI8NFig.js → button-BYQHEF4e.js} +1 -1
- package/ui-dist/assets/{card-BD8MkPAL.js → card-CFXZOYds.js} +1 -1
- package/ui-dist/assets/{check-C6myARng.js → check-Cniv3It0.js} +1 -1
- package/ui-dist/assets/{checkbox-CmYq-YMP.js → checkbox-MLVUJCCS.js} +1 -1
- package/ui-dist/assets/{chevron-down-D2wNtbQf.js → chevron-down-Dq0fsCvv.js} +1 -1
- package/ui-dist/assets/{chevron-right-CU6xIk8W.js → chevron-right-C4o2Lqna.js} +1 -1
- package/ui-dist/assets/{clipboard-BZT4l65i.js → clipboard-CfEDu5my.js} +1 -1
- package/ui-dist/assets/{company-members-C1IoXITE.js → company-members-tdITTHFY.js} +1 -1
- package/ui-dist/assets/createLucideIcon-CINAT48M.js +92 -0
- package/ui-dist/assets/{definition-P7Pcik2r.js → definition-B5Yyiufk.js} +1 -1
- package/ui-dist/assets/{dist-Cc3Bt6H4.js → dist-DCpDFPbp.js} +1 -1
- package/ui-dist/assets/{dist-B3Uu-urE.js → dist-bQQ2HFhw.js} +1 -1
- package/ui-dist/assets/{environments-Cd-g_MmN.js → environments-awDXeIDD.js} +1 -1
- package/ui-dist/assets/{external-link-BKz-OKDG.js → external-link-3uv6Ak2X.js} +1 -1
- package/ui-dist/assets/{file-text-DXa-cUrm.js → file-text-DWMD8a2i.js} +1 -1
- package/ui-dist/assets/{health-Dc13TJNg.js → health-DY_y3c9e.js} +1 -1
- package/ui-dist/assets/{heartbeats-CY77VTM_.js → heartbeats-BQipXQOf.js} +1 -1
- package/ui-dist/assets/index-BAoNTaz4.css +1 -0
- package/ui-dist/assets/{index-CsQMjEpO.js → index-N4w1Oco1.js} +158 -158
- package/ui-dist/assets/{input-BkGpMopE.js → input-B7ODc-rR.js} +1 -1
- package/ui-dist/assets/label-BnqmTeef.js +5 -0
- package/ui-dist/assets/{loader-circle-DwlcG9aS.js → loader-circle-DA6xS_rG.js} +1 -1
- package/ui-dist/assets/{mention-chips-pBjlxGok.js → mention-chips-r4UB4Eiw.js} +1 -1
- package/ui-dist/assets/{octagon-alert-CTp78pR9.js → octagon-alert-DsI0y-RL.js} +1 -1
- package/ui-dist/assets/{rotate-ccw-BhopZISX.js → rotate-ccw-D6pz3VoJ.js} +1 -1
- package/ui-dist/assets/{router-BxwR1PwE.js → router-DcMYq5w_.js} +4 -4
- package/ui-dist/assets/{save-D5KpMLil.js → save-CvrYa2yq.js} +1 -1
- package/ui-dist/assets/{select-BqqjvKLd.js → select-CV7s_3g2.js} +1 -1
- package/ui-dist/assets/{sheet-Z4n6AEBA.js → sheet-CrBXG9pk.js} +1 -1
- package/ui-dist/assets/{skeleton-BxD7FB8M.js → skeleton-efW_R0t3.js} +1 -1
- package/ui-dist/assets/{tabs-Dqn3cNzC.js → tabs-4RdauNv3.js} +1 -1
- package/ui-dist/assets/{triangle-alert-DOta-xfM.js → triangle-alert-DQUol3t5.js} +1 -1
- package/ui-dist/assets/{use-adapter-capabilities-0-4PhK9y.js → use-adapter-capabilities-pFfW1mOk.js} +1 -1
- package/ui-dist/assets/{useHiddenSettings-D9d6LOsg.js → useHiddenSettings-b1eurTXV.js} +1 -1
- package/ui-dist/assets/{zap-gf6Ev631.js → zap-CKzX0hdL.js} +1 -1
- package/ui-dist/index.html +46 -46
- package/ui-dist/sw.js +1 -1
- package/ui-dist/assets/RoutineRunVariablesDialog-BkLLbP3a.js +0 -5
- package/ui-dist/assets/createLucideIcon-D-iIM3hK.js +0 -92
- package/ui-dist/assets/index-CWuperHN.css +0 -1
- package/ui-dist/assets/label-C-aWneNy.js +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var Cn=Object.defineProperty;var o=(e,t)=>Cn(e,"name",{value:t,configurable:!0});import{i as bt}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as kn,Hn as $n,Lr as Pn,Pr as Ln,S as Be,U as An,Xn as p,Y as ie,Yn as Dn,nr as _n,t as Re}from"./createLucideIcon-D-iIM3hK.js";import{t as Tn}from"./preload-helper-CceJXRIF.js";import{A as On,C as Nn,D as Un,E as Mn,M as jn,N as Fn,O as Bn,P as Hn,S as Wn,T as qn,_ as zn,a as Qn,b as Jn,c as Kn,d as Vn,f as Yn,g as Gn,h as Xn,i as Zn,j as er,k as tr,l as nr,m as rr,n as or,o as ar,p as sr,r as ir,s as ur,t as lr,u as cr,v as dr,w as fr,x as mr,y as hr}from"./zap-gf6Ev631.js";import{a as pr,c as gr,n as yr,r as vr}from"./agents-DrLpWAcm.js";import{i as wr}from"./EmptyState-DOb3I5aU.js";var u=bt(Pn(),1),He=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ct=/^[\\/]{2}/;function Ir(e,t){return t+e.replace(/\\/g,"/")}o(Ir,"normalizeProtocolRelativeUrl");var et="popstate";function tt(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}o(tt,"isLocation");function Rr(e={}){function t(r,a){let s=a.state?.masked,{pathname:i,search:l,hash:c}=s||r.location;return _e("",{pathname:i,search:l,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default",s?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}o(t,"createBrowserLocation");function n(r,a){return typeof a=="string"?a:oe(a)}return o(n,"createBrowserHref"),xr(t,n,null,e)}o(Rr,"createBrowserHistory");function C(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}o(C,"invariant");function D(e,t){if(!e)try{throw new Error(t)}catch{}}o(D,"warning");function Sr(){return Math.random().toString(36).substring(2,10)}o(Sr,"createKey");function nt(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}o(nt,"getHistoryState");function _e(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Y(t):t,state:n,key:t&&t.key||r||Sr(),mask:a}}o(_e,"createLocation");function oe({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}o(oe,"createPath");function Y(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}o(Y,"parsePath");function xr(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:s=!1}=r,i=a.history,l="POP",c=null,d=m();d==null&&(d=0,i.replaceState({...i.state,idx:d},""));function m(){return(i.state||{idx:null}).idx}o(m,"getIndex");function f(){l="POP";let h=m(),I=h==null?null:h-d;d=h,c&&c({action:l,location:y.location,delta:I})}o(f,"handlePop");function g(h,I){l="PUSH";let R=tt(h)?h:_e(y.location,h,I);n&&n(R,h),d=m()+1;let S=nt(R,d),k=y.createHref(R.mask||R);try{i.pushState(S,"",k)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;a.location.assign(k)}s&&c&&c({action:l,location:y.location,delta:1})}o(g,"push");function v(h,I){l="REPLACE";let R=tt(h)?h:_e(y.location,h,I);n&&n(R,h),d=m();let S=nt(R,d),k=y.createHref(R.mask||R);i.replaceState(S,"",k),s&&c&&c({action:l,location:y.location,delta:0})}o(v,"replace2");function w(h){return Er(a,h)}o(w,"createURL");let y={get action(){return l},get location(){return e(a,i)},listen(h){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(et,f),c=h,()=>{a.removeEventListener(et,f),c=null}},createHref(h){return t(a,h)},createURL:w,encodeLocation(h){let I=w(h);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:g,replace:v,go(h){return i.go(h)}};return y}o(xr,"getUrlBasedHistory");function Er(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),C(r,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:oe(t);return a=a.replace(/ $/,"%20"),!n&&Ct.test(a)&&(a=r+a),new URL(a,r)}o(Er,"createBrowserURLImpl");var br;br=new WeakMap;function kt(e,t,n="/"){return $t(e,t,n,!1)}o(kt,"matchRoutes");function $t(e,t,n,r,a){let s=B((typeof t=="string"?Y(t):t).pathname||"/",n);if(s==null)return null;let i=a??kr(e),l=null,c=Mr(s);for(let d=0;l==null&&d<i.length;++d)l=Ur(i[d],c,r);return l}o($t,"matchRoutesImpl");function Cr(e,t){let{route:n,pathname:r,params:a}=e;return{id:n.id,pathname:r,params:a,data:t[n.id],loaderData:t[n.id],handle:n.handle}}o(Cr,"convertRouteMatchToUiMatch");function kr(e){let t=Pt(e);return $r(t),t}o(kr,"flattenAndRankRoutes");function Pt(e,t=[],n=[],r="",a=!1){let s=o((i,l,c=a,d)=>{let m={relativePath:d===void 0?i.path||"":d,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&c)return;C(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let f=U([r,m.relativePath]),g=n.concat(m);i.children&&i.children.length>0&&(C(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),Pt(i.children,t,g,f,c)),!(i.path==null&&!i.index)&&t.push({path:f,score:Or(f,i.index),routesMeta:g.map((v,w)=>{let[y,h]=Dt(v.relativePath,v.caseSensitive,w===g.length-1);return{...v,matcher:y,compiledParams:h}})})},"flattenRoute");return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))s(i,l);else for(let c of Lt(i.path))s(i,l,!0,c)}),t}o(Pt,"flattenRoutes");function Lt(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return a?[s,""]:[s];let i=Lt(r.join("/")),l=[];return l.push(...i.map(c=>c===""?s:[s,c].join("/"))),a&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}o(Lt,"explodeOptionalSegments");function $r(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Nr(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}o($r,"rankRouteBranches");var Pr=/^:[\w-]+$/,Lr=3,Ar=2,Dr=1,_r=10,Tr=-2,rt=o(e=>e==="*","isSplat");function Or(e,t){let n=e.split("/"),r=n.length;return n.some(rt)&&(r+=Tr),t&&(r+=Ar),n.filter(a=>!rt(a)).reduce((a,s)=>a+(Pr.test(s)?Lr:s===""?Dr:_r),r)}o(Or,"computeScore");function Nr(e,t){return e.length===t.length&&e.slice(0,-1).every((n,r)=>n===t[r])?e[e.length-1]-t[t.length-1]:0}o(Nr,"compareIndexes");function Ur(e,t,n=!1){let{routesMeta:r}=e,a={},s="/",i=[];for(let l=0;l<r.length;++l){let c=r[l],d=l===r.length-1,m=s==="/"?t:t.slice(s.length)||"/",f={path:c.relativePath,caseSensitive:c.caseSensitive,end:d},g=c.matcher&&c.compiledParams?At(f,m,c.matcher,c.compiledParams):ge(f,m),v=c.route;if(!g&&d&&n&&!r[r.length-1].route.index&&(g=ge({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},m)),!g)return null;Object.assign(a,g.params),i.push({params:a,pathname:U([s,g.pathname]),pathnameBase:Br(U([s,g.pathnameBase])),route:v}),g.pathnameBase!=="/"&&(s=U([s,g.pathnameBase]))}return i}o(Ur,"matchRouteBranch");function ge(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Dt(e.path,e.caseSensitive,e.end);return At(e,t,n,r)}o(ge,"matchPath");function At(e,t,n,r){let a=t.match(n);if(!a)return null;let s=a[0],i=s.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce((c,{paramName:d,isOptional:m},f)=>{if(d==="*"){let v=l[f]||"";i=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const g=l[f];return m&&!g?c[d]=void 0:c[d]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:i,pattern:e}}o(At,"matchPathImpl");function Dt(e,t=!1,n=!0){D(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,i,l,c,d)=>{if(r.push({paramName:i,isOptional:l!=null}),l){let m=d.charAt(c+s.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}o(Dt,"compilePath");function Mr(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return D(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}o(Mr,"decodePath");function B(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}o(B,"stripBasename");function jr(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Y(e):e,s;return n?(n=_t(n),n.startsWith("/")?s=ot(n.substring(1),"/"):s=ot(n,t)):s=t,{pathname:s,search:Hr(r),hash:Wr(a)}}o(jr,"resolvePath");function ot(e,t){let n=ye(t).split("/");return e.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}o(ot,"resolvePathname");function Le(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}o(Le,"getInvalidPathError");function Fr(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}o(Fr,"getPathContributingMatches");function We(e){let t=Fr(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}o(We,"getResolveToMatches");function Se(e,t,n,r=!1){let a;typeof e=="string"?a=Y(e):(a={...e},C(!a.pathname||!a.pathname.includes("?"),Le("?","pathname","search",a)),C(!a.pathname||!a.pathname.includes("#"),Le("#","pathname","hash",a)),C(!a.search||!a.search.includes("#"),Le("#","search","hash",a)));let s=e===""||a.pathname==="",i=s?"/":a.pathname,l;if(i==null)l=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let g=i.split("/");for(;g[0]==="..";)g.shift(),f-=1;a.pathname=g.join("/")}l=f>=0?t[f]:"/"}let c=jr(a,l),d=i&&i!=="/"&&i.endsWith("/"),m=(s||i===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||m)&&(c.pathname+="/"),c}o(Se,"resolveTo$1");var _t=o(e=>e.replace(/[\\/]{2,}/g,"/"),"removeDoubleSlashes"),U=o(e=>_t(e.join("/")),"joinPaths"),ye=o(e=>e.replace(/\/+$/,""),"removeTrailingSlash"),Br=o(e=>ye(e).replace(/^\/*/,"/"),"normalizePathname"),Hr=o(e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,"normalizeSearch"),Wr=o(e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,"normalizeHash"),qr=class{static{o(this,"ErrorResponseImpl")}constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Tt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}o(Tt,"isRouteErrorResponse");function zr(e){return U(e.map(t=>t.route.path).filter(Boolean))||"/"}o(zr,"getRoutePattern");var Ot=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Nt(e,t){let n=e;if(typeof n!="string"||!He.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(Ot)try{let s=new URL(window.location.href),i=Ct.test(n)?new URL(Ir(n,s.protocol)):new URL(n),l=B(i.pathname,t);i.origin===s.origin&&l!=null?n=l+i.search+i.hash:a=!0}catch{D(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}o(Nt,"parseToInfo");var ys=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),Ut=["POST","PUT","PATCH","DELETE"],vs=new Set(Ut),Qr=["GET",...Ut],ws=new Set(Qr),Jr,Kr,Vr,Yr;Jr=new WeakMap;Kr=new WeakMap;Vr=new WeakMap;Yr=new WeakMap;var Gr=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Xr(e){try{return Gr.includes(new URL(e).protocol)}catch{return!1}}o(Xr,"hasInvalidProtocol");var G=u.createContext(null);G.displayName="DataRouter";var ue=u.createContext(null);ue.displayName="DataRouterState";var Mt=u.createContext(!1);function jt(){return u.useContext(Mt)}o(jt,"useIsRSCRouterContext");var Ft=u.createContext({isTransitioning:!1});Ft.displayName="ViewTransition";var Zr=u.createContext(new Map);Zr.displayName="Fetchers";var Te=u.createContext(null);Te.displayName="Await";var L=u.createContext(null);L.displayName="Navigation";var X=u.createContext(null);X.displayName="Location";var O=u.createContext({outlet:null,matches:[],isDataRoute:!1});O.displayName="Route";var qe=u.createContext(null);qe.displayName="RouteError";var Bt="REACT_ROUTER_ERROR",eo="REDIRECT",to="ROUTE_ERROR_RESPONSE";function no(e){if(e.startsWith(`${Bt}:${eo}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}o(no,"decodeRedirectErrorDigest");function ro(e){if(e.startsWith(`${Bt}:${to}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new qr(t.status,t.statusText,t.data)}catch{}}o(ro,"decodeRouteErrorResponseDigest");function oo(e,{relative:t}={}){C(Z(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=u.useContext(L),{hash:a,pathname:s,search:i}=le(e,{relative:t}),l=s;return n!=="/"&&(l=s==="/"?n:U([n,s])),r.createHref({pathname:l,search:i,hash:a})}o(oo,"useHref");function Z(){return u.useContext(X)!=null}o(Z,"useInRouterContext");function _(){return C(Z(),"useLocation() may be used only in the context of a <Router> component."),u.useContext(X).location}o(_,"useLocation");function Is(){return u.useContext(X).navigationType}o(Is,"useNavigationType");var Ht="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Wt(e){u.useContext(L).static||u.useLayoutEffect(e)}o(Wt,"useIsomorphicLayoutEffect");function xe(){let{isDataRoute:e}=u.useContext(O);return e?Ro():ao()}o(xe,"useNavigate$1");function ao(){C(Z(),"useNavigate() may be used only in the context of a <Router> component.");let e=u.useContext(G),{basename:t,navigator:n}=u.useContext(L),{matches:r}=u.useContext(O),{pathname:a}=_(),s=JSON.stringify(We(r)),i=u.useRef(!1);return Wt(()=>{i.current=!0}),u.useCallback((l,c={})=>{if(D(i.current,Ht),!i.current)return;if(typeof l=="number"){n.go(l);return}let d=Se(l,JSON.parse(s),a,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:U([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,s,a,e])}o(ao,"useNavigateUnstable");var so=u.createContext(null);function io(e){let t=u.useContext(O).outlet;return u.useMemo(()=>t&&u.createElement(so.Provider,{value:e},t),[t,e])}o(io,"useOutlet");function uo(){let{matches:e}=u.useContext(O);return e[e.length-1]?.params??{}}o(uo,"useParams");function le(e,{relative:t}={}){let{matches:n}=u.useContext(O),{pathname:r}=_(),a=JSON.stringify(We(n));return u.useMemo(()=>Se(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}o(le,"useResolvedPath");function lo(e,t){return qt(e,t)}o(lo,"useRoutes");function qt(e,t,n){C(Z(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=u.useContext(L),{matches:a}=u.useContext(O),s=a[a.length-1],i=s?s.params:{},l=s?s.pathname:"/",c=s?s.pathnameBase:"/",d=s&&s.route;{let h=d&&d.path||"";Jt(l,!d||h.endsWith("*")||h.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${h}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
1
|
+
var Cn=Object.defineProperty;var o=(e,t)=>Cn(e,"name",{value:t,configurable:!0});import{i as bt}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as kn,Hn as $n,Lr as Pn,Pr as Ln,S as Be,U as An,Xn as p,Y as ie,Yn as Dn,nr as _n,t as Re}from"./createLucideIcon-CINAT48M.js";import{t as Tn}from"./preload-helper-CceJXRIF.js";import{A as On,C as Nn,D as Mn,E as Un,M as jn,N as Fn,O as Bn,P as Hn,S as Wn,T as qn,_ as zn,a as Qn,b as Jn,c as Kn,d as Vn,f as Yn,g as Gn,h as Xn,i as Zn,j as er,k as tr,l as nr,m as rr,n as or,o as ar,p as sr,r as ir,s as ur,t as lr,u as cr,v as dr,w as fr,x as mr,y as hr}from"./zap-CKzX0hdL.js";import{a as pr,c as gr,n as yr,r as vr}from"./agents-CNina7HI.js";import{i as wr}from"./EmptyState-D62UDLDa.js";var u=bt(Pn(),1),He=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ct=/^[\\/]{2}/;function Ir(e,t){return t+e.replace(/\\/g,"/")}o(Ir,"normalizeProtocolRelativeUrl");var et="popstate";function tt(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}o(tt,"isLocation");function Rr(e={}){function t(r,a){let s=a.state?.masked,{pathname:i,search:l,hash:c}=s||r.location;return _e("",{pathname:i,search:l,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default",s?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}o(t,"createBrowserLocation");function n(r,a){return typeof a=="string"?a:oe(a)}return o(n,"createBrowserHref"),xr(t,n,null,e)}o(Rr,"createBrowserHistory");function C(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}o(C,"invariant");function D(e,t){if(!e)try{throw new Error(t)}catch{}}o(D,"warning");function Sr(){return Math.random().toString(36).substring(2,10)}o(Sr,"createKey");function nt(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}o(nt,"getHistoryState");function _e(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Y(t):t,state:n,key:t&&t.key||r||Sr(),mask:a}}o(_e,"createLocation");function oe({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}o(oe,"createPath");function Y(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}o(Y,"parsePath");function xr(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:s=!1}=r,i=a.history,l="POP",c=null,d=m();d==null&&(d=0,i.replaceState({...i.state,idx:d},""));function m(){return(i.state||{idx:null}).idx}o(m,"getIndex");function f(){l="POP";let h=m(),I=h==null?null:h-d;d=h,c&&c({action:l,location:y.location,delta:I})}o(f,"handlePop");function g(h,I){l="PUSH";let R=tt(h)?h:_e(y.location,h,I);n&&n(R,h),d=m()+1;let S=nt(R,d),k=y.createHref(R.mask||R);try{i.pushState(S,"",k)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;a.location.assign(k)}s&&c&&c({action:l,location:y.location,delta:1})}o(g,"push");function v(h,I){l="REPLACE";let R=tt(h)?h:_e(y.location,h,I);n&&n(R,h),d=m();let S=nt(R,d),k=y.createHref(R.mask||R);i.replaceState(S,"",k),s&&c&&c({action:l,location:y.location,delta:0})}o(v,"replace2");function w(h){return Er(a,h)}o(w,"createURL");let y={get action(){return l},get location(){return e(a,i)},listen(h){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(et,f),c=h,()=>{a.removeEventListener(et,f),c=null}},createHref(h){return t(a,h)},createURL:w,encodeLocation(h){let I=w(h);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:g,replace:v,go(h){return i.go(h)}};return y}o(xr,"getUrlBasedHistory");function Er(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),C(r,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:oe(t);return a=a.replace(/ $/,"%20"),!n&&Ct.test(a)&&(a=r+a),new URL(a,r)}o(Er,"createBrowserURLImpl");var br;br=new WeakMap;function kt(e,t,n="/"){return $t(e,t,n,!1)}o(kt,"matchRoutes");function $t(e,t,n,r,a){let s=B((typeof t=="string"?Y(t):t).pathname||"/",n);if(s==null)return null;let i=a??kr(e),l=null,c=Ur(s);for(let d=0;l==null&&d<i.length;++d)l=Mr(i[d],c,r);return l}o($t,"matchRoutesImpl");function Cr(e,t){let{route:n,pathname:r,params:a}=e;return{id:n.id,pathname:r,params:a,data:t[n.id],loaderData:t[n.id],handle:n.handle}}o(Cr,"convertRouteMatchToUiMatch");function kr(e){let t=Pt(e);return $r(t),t}o(kr,"flattenAndRankRoutes");function Pt(e,t=[],n=[],r="",a=!1){let s=o((i,l,c=a,d)=>{let m={relativePath:d===void 0?i.path||"":d,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&c)return;C(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let f=M([r,m.relativePath]),g=n.concat(m);i.children&&i.children.length>0&&(C(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),Pt(i.children,t,g,f,c)),!(i.path==null&&!i.index)&&t.push({path:f,score:Or(f,i.index),routesMeta:g.map((v,w)=>{let[y,h]=Dt(v.relativePath,v.caseSensitive,w===g.length-1);return{...v,matcher:y,compiledParams:h}})})},"flattenRoute");return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))s(i,l);else for(let c of Lt(i.path))s(i,l,!0,c)}),t}o(Pt,"flattenRoutes");function Lt(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return a?[s,""]:[s];let i=Lt(r.join("/")),l=[];return l.push(...i.map(c=>c===""?s:[s,c].join("/"))),a&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}o(Lt,"explodeOptionalSegments");function $r(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Nr(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}o($r,"rankRouteBranches");var Pr=/^:[\w-]+$/,Lr=3,Ar=2,Dr=1,_r=10,Tr=-2,rt=o(e=>e==="*","isSplat");function Or(e,t){let n=e.split("/"),r=n.length;return n.some(rt)&&(r+=Tr),t&&(r+=Ar),n.filter(a=>!rt(a)).reduce((a,s)=>a+(Pr.test(s)?Lr:s===""?Dr:_r),r)}o(Or,"computeScore");function Nr(e,t){return e.length===t.length&&e.slice(0,-1).every((n,r)=>n===t[r])?e[e.length-1]-t[t.length-1]:0}o(Nr,"compareIndexes");function Mr(e,t,n=!1){let{routesMeta:r}=e,a={},s="/",i=[];for(let l=0;l<r.length;++l){let c=r[l],d=l===r.length-1,m=s==="/"?t:t.slice(s.length)||"/",f={path:c.relativePath,caseSensitive:c.caseSensitive,end:d},g=c.matcher&&c.compiledParams?At(f,m,c.matcher,c.compiledParams):ge(f,m),v=c.route;if(!g&&d&&n&&!r[r.length-1].route.index&&(g=ge({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},m)),!g)return null;Object.assign(a,g.params),i.push({params:a,pathname:M([s,g.pathname]),pathnameBase:Br(M([s,g.pathnameBase])),route:v}),g.pathnameBase!=="/"&&(s=M([s,g.pathnameBase]))}return i}o(Mr,"matchRouteBranch");function ge(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Dt(e.path,e.caseSensitive,e.end);return At(e,t,n,r)}o(ge,"matchPath");function At(e,t,n,r){let a=t.match(n);if(!a)return null;let s=a[0],i=s.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce((c,{paramName:d,isOptional:m},f)=>{if(d==="*"){let v=l[f]||"";i=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const g=l[f];return m&&!g?c[d]=void 0:c[d]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:i,pattern:e}}o(At,"matchPathImpl");function Dt(e,t=!1,n=!0){D(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,i,l,c,d)=>{if(r.push({paramName:i,isOptional:l!=null}),l){let m=d.charAt(c+s.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}o(Dt,"compilePath");function Ur(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return D(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}o(Ur,"decodePath");function B(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}o(B,"stripBasename");function jr(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Y(e):e,s;return n?(n=_t(n),n.startsWith("/")?s=ot(n.substring(1),"/"):s=ot(n,t)):s=t,{pathname:s,search:Hr(r),hash:Wr(a)}}o(jr,"resolvePath");function ot(e,t){let n=ye(t).split("/");return e.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}o(ot,"resolvePathname");function Le(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}o(Le,"getInvalidPathError");function Fr(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}o(Fr,"getPathContributingMatches");function We(e){let t=Fr(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}o(We,"getResolveToMatches");function Se(e,t,n,r=!1){let a;typeof e=="string"?a=Y(e):(a={...e},C(!a.pathname||!a.pathname.includes("?"),Le("?","pathname","search",a)),C(!a.pathname||!a.pathname.includes("#"),Le("#","pathname","hash",a)),C(!a.search||!a.search.includes("#"),Le("#","search","hash",a)));let s=e===""||a.pathname==="",i=s?"/":a.pathname,l;if(i==null)l=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let g=i.split("/");for(;g[0]==="..";)g.shift(),f-=1;a.pathname=g.join("/")}l=f>=0?t[f]:"/"}let c=jr(a,l),d=i&&i!=="/"&&i.endsWith("/"),m=(s||i===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||m)&&(c.pathname+="/"),c}o(Se,"resolveTo$1");var _t=o(e=>e.replace(/[\\/]{2,}/g,"/"),"removeDoubleSlashes"),M=o(e=>_t(e.join("/")),"joinPaths"),ye=o(e=>e.replace(/\/+$/,""),"removeTrailingSlash"),Br=o(e=>ye(e).replace(/^\/*/,"/"),"normalizePathname"),Hr=o(e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,"normalizeSearch"),Wr=o(e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,"normalizeHash"),qr=class{static{o(this,"ErrorResponseImpl")}constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Tt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}o(Tt,"isRouteErrorResponse");function zr(e){return M(e.map(t=>t.route.path).filter(Boolean))||"/"}o(zr,"getRoutePattern");var Ot=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Nt(e,t){let n=e;if(typeof n!="string"||!He.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(Ot)try{let s=new URL(window.location.href),i=Ct.test(n)?new URL(Ir(n,s.protocol)):new URL(n),l=B(i.pathname,t);i.origin===s.origin&&l!=null?n=l+i.search+i.hash:a=!0}catch{D(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}o(Nt,"parseToInfo");var ys=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),Mt=["POST","PUT","PATCH","DELETE"],vs=new Set(Mt),Qr=["GET",...Mt],ws=new Set(Qr),Jr,Kr,Vr,Yr;Jr=new WeakMap;Kr=new WeakMap;Vr=new WeakMap;Yr=new WeakMap;var Gr=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Xr(e){try{return Gr.includes(new URL(e).protocol)}catch{return!1}}o(Xr,"hasInvalidProtocol");var G=u.createContext(null);G.displayName="DataRouter";var ue=u.createContext(null);ue.displayName="DataRouterState";var Ut=u.createContext(!1);function jt(){return u.useContext(Ut)}o(jt,"useIsRSCRouterContext");var Ft=u.createContext({isTransitioning:!1});Ft.displayName="ViewTransition";var Zr=u.createContext(new Map);Zr.displayName="Fetchers";var Te=u.createContext(null);Te.displayName="Await";var L=u.createContext(null);L.displayName="Navigation";var X=u.createContext(null);X.displayName="Location";var O=u.createContext({outlet:null,matches:[],isDataRoute:!1});O.displayName="Route";var qe=u.createContext(null);qe.displayName="RouteError";var Bt="REACT_ROUTER_ERROR",eo="REDIRECT",to="ROUTE_ERROR_RESPONSE";function no(e){if(e.startsWith(`${Bt}:${eo}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}o(no,"decodeRedirectErrorDigest");function ro(e){if(e.startsWith(`${Bt}:${to}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new qr(t.status,t.statusText,t.data)}catch{}}o(ro,"decodeRouteErrorResponseDigest");function oo(e,{relative:t}={}){C(Z(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=u.useContext(L),{hash:a,pathname:s,search:i}=le(e,{relative:t}),l=s;return n!=="/"&&(l=s==="/"?n:M([n,s])),r.createHref({pathname:l,search:i,hash:a})}o(oo,"useHref");function Z(){return u.useContext(X)!=null}o(Z,"useInRouterContext");function _(){return C(Z(),"useLocation() may be used only in the context of a <Router> component."),u.useContext(X).location}o(_,"useLocation");function Is(){return u.useContext(X).navigationType}o(Is,"useNavigationType");var Ht="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Wt(e){u.useContext(L).static||u.useLayoutEffect(e)}o(Wt,"useIsomorphicLayoutEffect");function xe(){let{isDataRoute:e}=u.useContext(O);return e?Ro():ao()}o(xe,"useNavigate$1");function ao(){C(Z(),"useNavigate() may be used only in the context of a <Router> component.");let e=u.useContext(G),{basename:t,navigator:n}=u.useContext(L),{matches:r}=u.useContext(O),{pathname:a}=_(),s=JSON.stringify(We(r)),i=u.useRef(!1);return Wt(()=>{i.current=!0}),u.useCallback((l,c={})=>{if(D(i.current,Ht),!i.current)return;if(typeof l=="number"){n.go(l);return}let d=Se(l,JSON.parse(s),a,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:M([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,s,a,e])}o(ao,"useNavigateUnstable");var so=u.createContext(null);function io(e){let t=u.useContext(O).outlet;return u.useMemo(()=>t&&u.createElement(so.Provider,{value:e},t),[t,e])}o(io,"useOutlet");function uo(){let{matches:e}=u.useContext(O);return e[e.length-1]?.params??{}}o(uo,"useParams");function le(e,{relative:t}={}){let{matches:n}=u.useContext(O),{pathname:r}=_(),a=JSON.stringify(We(n));return u.useMemo(()=>Se(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}o(le,"useResolvedPath");function lo(e,t){return qt(e,t)}o(lo,"useRoutes");function qt(e,t,n){C(Z(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=u.useContext(L),{matches:a}=u.useContext(O),s=a[a.length-1],i=s?s.params:{},l=s?s.pathname:"/",c=s?s.pathnameBase:"/",d=s&&s.route;{let h=d&&d.path||"";Jt(l,!d||h.endsWith("*")||h.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${h}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
2
2
|
|
|
3
|
-
Please change the parent <Route path="${h}"> to <Route path="${h==="/"?"*":`${h}/*`}">.`)}let m=_(),f;if(t){let h=typeof t=="string"?Y(t):t;C(c==="/"||h.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${h.pathname}" was given in the \`location\` prop.`),f=h}else f=m;let g=f.pathname||"/",v=g;if(c!=="/"){let h=c.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(h.length).join("/")}let w=n&&n.state.matches.length?n.state.matches.map(h=>Object.assign(h,{route:n.manifest[h.route.id]||h.route})):kt(e,{pathname:v});D(d||w!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),D(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=po(w&&w.map(h=>Object.assign({},h,{params:Object.assign({},i,h.params),pathname:U([c,r.encodeLocation?r.encodeLocation(h.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?c:U([c,r.encodeLocation?r.encodeLocation(h.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathnameBase])})),a,n);return t&&y?u.createElement(X.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...f},navigationType:"POP"}},y):y}o(qt,"useRoutesImpl");function co(){let e=Io(),t=Tt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},i=null;return i=u.createElement(u.Fragment,null,u.createElement("p",null,"💿 Hey developer 👋"),u.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",u.createElement("code",{style:s},"ErrorBoundary")," or"," ",u.createElement("code",{style:s},"errorElement")," prop on your route.")),u.createElement(u.Fragment,null,u.createElement("h2",null,"Unexpected Application Error!"),u.createElement("h3",{style:{fontStyle:"italic"}},t),n?u.createElement("pre",{style:a},n):null,i)}o(co,"DefaultErrorComponent");var fo=u.createElement(co,null),zt=class extends u.Component{static{o(this,"RenderErrorBoundary")}constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=ro(e.digest);n&&(e=n)}let t=e!==void 0?u.createElement(O.Provider,{value:this.props.routeContext},u.createElement(qe.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?u.createElement(mo,{error:e},t):t}};zt.contextType=Mt;var Ae=new WeakMap;function mo({children:e,error:t}){let{basename:n}=u.useContext(L);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=no(t.digest);if(r){let a=Ae.get(t);if(a)throw a;let s=Nt(r.location,n),i=s.absoluteURL||s.to;if(Xr(i))throw new Error("Invalid redirect location");if(Ot&&!Ae.get(t))if(s.isExternal||r.reloadDocument)window.location.href=i;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw Ae.set(t,l),l}return u.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i}`})}}return e}o(mo,"RSCErrorHandler");function ho({routeContext:e,match:t,children:n}){let r=u.useContext(G);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),u.createElement(O.Provider,{value:e},n)}o(ho,"RenderedRoute");function po(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,s=r?.errors;if(s!=null){let m=a.findIndex(f=>f.route.id&&s?.[f.route.id]!==void 0);C(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,m+1))}let i=!1,l=-1;if(n&&r){i=r.renderFallback;for(let m=0;m<a.length;m++){let f=a[m];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(l=m),f.route.id){let{loaderData:g,errors:v}=r,w=f.route.loader&&!g.hasOwnProperty(f.route.id)&&(!v||v[f.route.id]===void 0);if(f.route.lazy||w){n.isStatic&&(i=!0),l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}}let c=n?.onError,d=r&&c?(m,f)=>{c(m,{location:r.location,params:r.matches?.[0]?.params??{},pattern:zr(r.matches),errorInfo:f})}:void 0;return a.reduceRight((m,f,g)=>{let v,w=!1,y=null,h=null;r&&(v=s&&f.route.id?s[f.route.id]:void 0,y=f.route.errorElement||fo,i&&(l<0&&g===0?(Jt("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,h=null):l===g&&(w=!0,h=f.route.hydrateFallbackElement||null)));let I=t.concat(a.slice(0,g+1)),R=o(()=>{let S;return v?S=y:w?S=h:f.route.Component?S=u.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=m,u.createElement(ho,{match:f,routeContext:{outlet:m,matches:I,isDataRoute:r!=null},children:S})},"getChildren");return r&&(f.route.ErrorBoundary||f.route.errorElement||g===0)?u.createElement(zt,{location:r.location,revalidation:r.revalidation,component:y,error:v,children:R(),routeContext:{outlet:null,matches:I,isDataRoute:!0},onError:d}):R()},null)}o(po,"_renderMatches");function ze(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}o(ze,"getDataRouterConsoleError");function go(e){let t=u.useContext(G);return C(t,ze(e)),t}o(go,"useDataRouterContext");function Qe(e){let t=u.useContext(ue);return C(t,ze(e)),t}o(Qe,"useDataRouterState");function yo(e){let t=u.useContext(O);return C(t,ze(e)),t}o(yo,"useRouteContext");function Je(e){let t=yo(e),n=t.matches[t.matches.length-1];return C(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}o(Je,"useCurrentRouteId");function vo(){return Je("useRouteId")}o(vo,"useRouteId");function wo(){let e=Qe("useNavigation");return u.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}o(wo,"useNavigation");function Qt(){let{matches:e,loaderData:t}=Qe("useMatches");return u.useMemo(()=>e.map(n=>Cr(n,t)),[e,t])}o(Qt,"useMatches");function Io(){let e=u.useContext(qe),t=Qe("useRouteError"),n=Je("useRouteError");return e!==void 0?e:t.errors?.[n]}o(Io,"useRouteError");function Ro(){let{router:e}=go("useNavigate"),t=Je("useNavigate"),n=u.useRef(!1);return Wt(()=>{n.current=!0}),u.useCallback(async(r,a={})=>{D(n.current,Ht),n.current&&(typeof r=="number"?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...a}))},[e,t])}o(Ro,"useNavigateStable");var at={};function Jt(e,t,n){!t&&!at[e]&&(at[e]=!0,D(!1,n))}o(Jt,"warningOnce");var st={};function So(e,t){!e&&!st[t]&&(st[t]=!0)}o(So,"warnOnce");var Rs=u.memo(xo);function xo({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:s}){return qt(e,void 0,{manifest:t,state:r,isStatic:a,onError:s,future:n})}o(xo,"DataRoutes2");function Eo({to:e,replace:t,state:n,relative:r}){C(Z(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=u.useContext(L);D(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=u.useContext(O),{pathname:i}=_(),l=xe(),c=Se(e,We(s),i,r==="path"),d=JSON.stringify(c);return u.useEffect(()=>{l(JSON.parse(d),{replace:t,state:n,relative:r})},[l,d,r,t,n]),null}o(Eo,"Navigate$1");function Ss(e){return io(e.context)}o(Ss,"Outlet");function bo(e){C(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}o(bo,"Route");function Kt({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:s=!1,useTransitions:i}){C(!Z(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=u.useMemo(()=>({basename:l,navigator:a,static:s,useTransitions:i,future:{}}),[l,a,s,i]);typeof n=="string"&&(n=Y(n));let{pathname:d="/",search:m="",hash:f="",state:g=null,key:v="default",mask:w}=n,y=u.useMemo(()=>{let h=B(d,l);return h==null?null:{location:{pathname:h,search:m,hash:f,state:g,key:v,mask:w},navigationType:r}},[l,d,m,f,g,v,r,w]);return D(y!=null,`<Router basename="${l}"> is not able to match the URL "${d}${m}${f}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:u.createElement(L.Provider,{value:c},u.createElement(X.Provider,{children:t,value:y}))}o(Kt,"Router");function xs({children:e,location:t}){return lo(Oe(e),t)}o(xs,"Routes");var Es=class extends u.Component{static{o(this,"AwaitErrorBoundary")}constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){let{children:e,errorElement:t,resolve:n}=this.props,r=null,a=0;if(!(n instanceof Promise))a=1,r=Promise.resolve(),Object.defineProperty(r,"_tracked",{get:o(()=>!0,"get")}),Object.defineProperty(r,"_data",{get:o(()=>n,"get")});else if(this.state.error){a=2;let s=this.state.error;r=Promise.reject().catch(()=>{}),Object.defineProperty(r,"_tracked",{get:o(()=>!0,"get")}),Object.defineProperty(r,"_error",{get:o(()=>s,"get")})}else n._tracked?(r=n,a="_error"in r?2:"_data"in r?1:0):(a=0,Object.defineProperty(n,"_tracked",{get:o(()=>!0,"get")}),r=n.then(s=>Object.defineProperty(n,"_data",{get:o(()=>s,"get")}),s=>{this.props.onError?.(s),Object.defineProperty(n,"_error",{get:o(()=>s,"get")})}));if(a===2&&!t)throw r._error;if(a===2)return u.createElement(Te.Provider,{value:r,children:t});if(a===1)return u.createElement(Te.Provider,{value:r,children:e});throw r}};function Oe(e,t=[]){let n=[];return u.Children.forEach(e,(r,a)=>{if(!u.isValidElement(r))return;let s=[...t,a];if(r.type===u.Fragment){n.push.apply(n,Oe(r.props.children,s));return}C(r.type===bo,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),C(!r.props.index||!r.props.children,"An index route cannot have child routes.");let i={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=Oe(r.props.children,s)),n.push(i)}),n}o(Oe,"createRoutesFromChildren");var he="get",pe="application/x-www-form-urlencoded";function Ee(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}o(Ee,"isHtmlElement");function Co(e){return Ee(e)&&e.tagName.toLowerCase()==="button"}o(Co,"isButtonElement");function ko(e){return Ee(e)&&e.tagName.toLowerCase()==="form"}o(ko,"isFormElement");function $o(e){return Ee(e)&&e.tagName.toLowerCase()==="input"}o($o,"isInputElement");function Po(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}o(Po,"isModifiedEvent");function Lo(e,t){return e.button===0&&(!t||t==="_self")&&!Po(e)}o(Lo,"shouldProcessLinkClick");function Ne(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}o(Ne,"createSearchParams");function Ao(e,t){let n=Ne(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(s=>{n.append(a,s)})}),n}o(Ao,"getSearchParamsForLocation");var fe=null;function Do(){if(fe===null)try{new FormData(document.createElement("form"),0),fe=!1}catch{fe=!0}return fe}o(Do,"isFormDataSubmitterSupported");var _o=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function De(e){return e!=null&&!_o.has(e)?(D(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${pe}"`),null):e}o(De,"getFormEncType");function To(e,t){let n,r,a,s,i;if(ko(e)){let l=e.getAttribute("action");r=l?B(l,t):null,n=e.getAttribute("method")||he,a=De(e.getAttribute("enctype"))||pe,s=new FormData(e)}else if(Co(e)||$o(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(r=c?B(c,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||he,a=De(e.getAttribute("formenctype"))||De(l.getAttribute("enctype"))||pe,s=new FormData(l,e),!Do()){let{name:d,type:m,value:f}=e;if(m==="image"){let g=d?`${d}.`:"";s.append(`${g}x`,"0"),s.append(`${g}y`,"0")}else d&&s.append(d,f)}}else{if(Ee(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=he,r=null,a=pe,i=e}return s&&a==="text/plain"&&(i=s,s=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:s,body:i}}o(To,"getFormSubmissionInfo");var bs=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),Oo={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},No=/[&><\u2028\u2029]/g;function it(e){return e.replace(No,t=>Oo[t])}o(it,"escapeHtml");function be(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}o(be,"invariant2");function Vt(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&B(a.pathname,t)==="/"?a.pathname=`${ye(t)}/_root.${r}`:a.pathname=`${ye(a.pathname)}.${r}`,a}o(Vt,"singleFetchUrl");async function Uo(e,t){if(e.id in t)return t[e.id];try{let n=await Tn(()=>import(e.module),[]);return t[e.id]=n,n}catch{return window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}o(Uo,"loadRouteModule");function Mo(e){return e!=null&&typeof e.page=="string"}o(Mo,"isPageLinkDescriptor");function jo(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}o(jo,"isHtmlLinkDescriptor");async function Fo(e,t,n){return Wo((await Promise.all(e.map(async r=>{let a=t.routes[r.route.id];if(a){let s=await Uo(a,n);return s.links?s.links():[]}return[]}))).flat(1).filter(jo).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}o(Fo,"getKeyedPrefetchLinks");function ut(e,t,n,r,a,s){let i=o((c,d)=>n[d]?c.route.id!==n[d].route.id:!0,"isNew"),l=o((c,d)=>n[d].pathname!==c.pathname||n[d].route.path?.endsWith("*")&&n[d].params["*"]!==c.params["*"],"matchPathChanged");return s==="assets"?t.filter((c,d)=>i(c,d)||l(c,d)):s==="data"?t.filter((c,d)=>{let m=r.routes[c.route.id];if(!m||!m.hasLoader)return!1;if(i(c,d)||l(c,d))return!0;if(c.route.shouldRevalidate){let f=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}o(ut,"getNewMatchesForLinks");function Yt(e,t,{includeHydrateFallback:n}={}){return Bo(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}o(Yt,"getModuleLinkHrefs");function Bo(e){return[...new Set(e)]}o(Bo,"dedupeHrefs");function Ho(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}o(Ho,"sortKeys");function Wo(e,t){let n=new Set,r=new Set(t);return e.reduce((a,s)=>{if(t&&!Mo(s)&&s.as==="script"&&s.href&&r.has(s.href))return a;let i=JSON.stringify(Ho(s));return n.has(i)||(n.add(i),a.push({key:i,link:s})),a},[])}o(Wo,"dedupeLinkDescriptors");function qo(e,t){return e.mode==="lazy"&&t===!0}o(qo,"isFogOfWarEnabled");function zo({sri:e,...t},n){let r=new Set(n.state.matches.map(l=>l.route.id)),a=n.state.location.pathname.split("/").filter(Boolean),s=["/"];for(a.pop();a.length>0;)s.push(`/${a.join("/")}`),a.pop();s.forEach(l=>{let c=$t(n.routes,l,n.basename||"/",!1,n.branches);c&&c.forEach(d=>r.add(d.route.id))});let i=[...r].reduce((l,c)=>Object.assign(l,{[c]:t.routes[c]}),{});return{...t,routes:i,sri:e?!0:void 0}}o(zo,"getPartialManifest");function Ce(){let e=u.useContext(G);return be(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}o(Ce,"useDataRouterContext2");function Gt(){let e=u.useContext(ue);return be(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}o(Gt,"useDataRouterStateContext");var ke=u.createContext(void 0);ke.displayName="FrameworkContext";function z(){let e=u.useContext(ke);return be(e,"You must render this element inside a <HydratedRouter> element"),e}o(z,"useFrameworkContext");function Qo(e,t){let n=u.useContext(ke),[r,a]=u.useState(!1),[s,i]=u.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:d,onMouseLeave:m,onTouchStart:f}=t,g=u.useRef(null);u.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let y=o(I=>{I.forEach(R=>{i(R.isIntersecting)})},"callback"),h=new IntersectionObserver(y,{threshold:.5});return g.current&&h.observe(g.current),()=>{h.disconnect()}}},[e]),u.useEffect(()=>{if(r){let y=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(y)}}},[r]);let v=o(()=>{a(!0)},"setIntent"),w=o(()=>{a(!1),i(!1)},"cancelIntent");return n?e!=="intent"?[s,g,{}]:[s,g,{onFocus:ne(l,v),onBlur:ne(c,w),onMouseEnter:ne(d,v),onMouseLeave:ne(m,w),onTouchStart:ne(f,v)}]:[!1,g,{}]}o(Qo,"usePrefetchBehavior");function ne(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}o(ne,"composeEventHandlers");function Jo(e,t,n){if(n&&!ve)return[e[0]];if(t){let r=e.findIndex(a=>t[a.route.id]!==void 0);return e.slice(0,r+1)}return e}o(Jo,"getActiveMatches");function Ko({page:e,...t}){let n=jt(),{nonce:r}=z(),{router:a}=Ce(),s=u.useMemo(()=>kt(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?(t.nonce==null&&r&&(t={...t,nonce:r}),n?u.createElement(Yo,{page:e,matches:s,...t}):u.createElement(Go,{page:e,matches:s,...t})):null}o(Ko,"PrefetchPageLinks");function Vo(e){let{manifest:t,routeModules:n}=z(),[r,a]=u.useState([]);return u.useEffect(()=>{let s=!1;return Fo(e,t,n).then(i=>{s||a(i)}),()=>{s=!0}},[e,t,n]),r}o(Vo,"useKeyedPrefetchLinks");function Yo({page:e,matches:t,...n}){let r=_(),{future:a}=z(),{basename:s}=Ce(),i=u.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let l=Vt(e,s,a.v8_trailingSlashAwareDataRequests,"rsc"),c=!1,d=[];for(let m of t)typeof m.route.shouldRevalidate=="function"?c=!0:d.push(m.route.id);return c&&d.length>0&&l.searchParams.set("_routes",d.join(",")),[l.pathname+l.search]},[s,a.v8_trailingSlashAwareDataRequests,e,r,t]);return u.createElement(u.Fragment,null,i.map(l=>u.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...n})))}o(Yo,"RSCPrefetchPageLinksImpl");function Go({page:e,matches:t,...n}){let r=_(),{future:a,manifest:s,routeModules:i}=z(),{basename:l}=Ce(),{loaderData:c,matches:d}=Gt(),m=u.useMemo(()=>ut(e,t,d,s,r,"data"),[e,t,d,s,r]),f=u.useMemo(()=>ut(e,t,d,s,r,"assets"),[e,t,d,s,r]),g=u.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let y=new Set,h=!1;if(t.forEach(R=>{let S=s.routes[R.route.id];!S||!S.hasLoader||(!m.some(k=>k.route.id===R.route.id)&&R.route.id in c&&i[R.route.id]?.shouldRevalidate||S.hasClientLoader?h=!0:y.add(R.route.id))}),y.size===0)return[];let I=Vt(e,l,a.v8_trailingSlashAwareDataRequests,"data");return h&&y.size>0&&I.searchParams.set("_routes",t.filter(R=>y.has(R.route.id)).map(R=>R.route.id).join(",")),[I.pathname+I.search]},[l,a.v8_trailingSlashAwareDataRequests,c,r,s,m,t,e,i]),v=u.useMemo(()=>Yt(f,s),[f,s]),w=Vo(f);return u.createElement(u.Fragment,null,g.map(y=>u.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...n})),v.map(y=>u.createElement("link",{key:y,rel:"modulepreload",href:y,...n})),w.map(({key:y,link:h})=>u.createElement("link",{key:y,nonce:n.nonce,...h,crossOrigin:h.crossOrigin??n.crossOrigin})))}o(Go,"PrefetchPageLinksImpl");var ve=!1;function Xo(){ve=!0}o(Xo,"setIsHydrated");function Zo(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:a,routeDiscovery:s,ssr:i,nonce:l}=z(),{router:c,static:d,staticContext:m}=Ce(),{matches:f}=Gt(),g=jt(),v=qo(s,i);e.nonce==null&&l&&(e={...e,nonce:l}),a&&(a.didRenderScripts=!0);let w=Jo(f,null,r);u.useEffect(()=>{Xo()},[]);let y=u.useMemo(()=>{if(g)return null;let R=m?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",S=d?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${v?"":`import ${JSON.stringify(t.url)}`};
|
|
4
|
-
${w.map((k,E)=>{let $=`route${E}`,A=t.routes[k.route.id];be(A,`Route ${k.route.id} not found in manifest`);let{clientActionModule:N,clientLoaderModule:P,clientMiddlewareModule:
|
|
3
|
+
Please change the parent <Route path="${h}"> to <Route path="${h==="/"?"*":`${h}/*`}">.`)}let m=_(),f;if(t){let h=typeof t=="string"?Y(t):t;C(c==="/"||h.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${h.pathname}" was given in the \`location\` prop.`),f=h}else f=m;let g=f.pathname||"/",v=g;if(c!=="/"){let h=c.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(h.length).join("/")}let w=n&&n.state.matches.length?n.state.matches.map(h=>Object.assign(h,{route:n.manifest[h.route.id]||h.route})):kt(e,{pathname:v});D(d||w!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),D(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=po(w&&w.map(h=>Object.assign({},h,{params:Object.assign({},i,h.params),pathname:M([c,r.encodeLocation?r.encodeLocation(h.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?c:M([c,r.encodeLocation?r.encodeLocation(h.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathnameBase])})),a,n);return t&&y?u.createElement(X.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...f},navigationType:"POP"}},y):y}o(qt,"useRoutesImpl");function co(){let e=Io(),t=Tt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},i=null;return i=u.createElement(u.Fragment,null,u.createElement("p",null,"💿 Hey developer 👋"),u.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",u.createElement("code",{style:s},"ErrorBoundary")," or"," ",u.createElement("code",{style:s},"errorElement")," prop on your route.")),u.createElement(u.Fragment,null,u.createElement("h2",null,"Unexpected Application Error!"),u.createElement("h3",{style:{fontStyle:"italic"}},t),n?u.createElement("pre",{style:a},n):null,i)}o(co,"DefaultErrorComponent");var fo=u.createElement(co,null),zt=class extends u.Component{static{o(this,"RenderErrorBoundary")}constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=ro(e.digest);n&&(e=n)}let t=e!==void 0?u.createElement(O.Provider,{value:this.props.routeContext},u.createElement(qe.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?u.createElement(mo,{error:e},t):t}};zt.contextType=Ut;var Ae=new WeakMap;function mo({children:e,error:t}){let{basename:n}=u.useContext(L);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=no(t.digest);if(r){let a=Ae.get(t);if(a)throw a;let s=Nt(r.location,n),i=s.absoluteURL||s.to;if(Xr(i))throw new Error("Invalid redirect location");if(Ot&&!Ae.get(t))if(s.isExternal||r.reloadDocument)window.location.href=i;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw Ae.set(t,l),l}return u.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i}`})}}return e}o(mo,"RSCErrorHandler");function ho({routeContext:e,match:t,children:n}){let r=u.useContext(G);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),u.createElement(O.Provider,{value:e},n)}o(ho,"RenderedRoute");function po(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,s=r?.errors;if(s!=null){let m=a.findIndex(f=>f.route.id&&s?.[f.route.id]!==void 0);C(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,m+1))}let i=!1,l=-1;if(n&&r){i=r.renderFallback;for(let m=0;m<a.length;m++){let f=a[m];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(l=m),f.route.id){let{loaderData:g,errors:v}=r,w=f.route.loader&&!g.hasOwnProperty(f.route.id)&&(!v||v[f.route.id]===void 0);if(f.route.lazy||w){n.isStatic&&(i=!0),l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}}let c=n?.onError,d=r&&c?(m,f)=>{c(m,{location:r.location,params:r.matches?.[0]?.params??{},pattern:zr(r.matches),errorInfo:f})}:void 0;return a.reduceRight((m,f,g)=>{let v,w=!1,y=null,h=null;r&&(v=s&&f.route.id?s[f.route.id]:void 0,y=f.route.errorElement||fo,i&&(l<0&&g===0?(Jt("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,h=null):l===g&&(w=!0,h=f.route.hydrateFallbackElement||null)));let I=t.concat(a.slice(0,g+1)),R=o(()=>{let S;return v?S=y:w?S=h:f.route.Component?S=u.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=m,u.createElement(ho,{match:f,routeContext:{outlet:m,matches:I,isDataRoute:r!=null},children:S})},"getChildren");return r&&(f.route.ErrorBoundary||f.route.errorElement||g===0)?u.createElement(zt,{location:r.location,revalidation:r.revalidation,component:y,error:v,children:R(),routeContext:{outlet:null,matches:I,isDataRoute:!0},onError:d}):R()},null)}o(po,"_renderMatches");function ze(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}o(ze,"getDataRouterConsoleError");function go(e){let t=u.useContext(G);return C(t,ze(e)),t}o(go,"useDataRouterContext");function Qe(e){let t=u.useContext(ue);return C(t,ze(e)),t}o(Qe,"useDataRouterState");function yo(e){let t=u.useContext(O);return C(t,ze(e)),t}o(yo,"useRouteContext");function Je(e){let t=yo(e),n=t.matches[t.matches.length-1];return C(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}o(Je,"useCurrentRouteId");function vo(){return Je("useRouteId")}o(vo,"useRouteId");function wo(){let e=Qe("useNavigation");return u.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}o(wo,"useNavigation");function Qt(){let{matches:e,loaderData:t}=Qe("useMatches");return u.useMemo(()=>e.map(n=>Cr(n,t)),[e,t])}o(Qt,"useMatches");function Io(){let e=u.useContext(qe),t=Qe("useRouteError"),n=Je("useRouteError");return e!==void 0?e:t.errors?.[n]}o(Io,"useRouteError");function Ro(){let{router:e}=go("useNavigate"),t=Je("useNavigate"),n=u.useRef(!1);return Wt(()=>{n.current=!0}),u.useCallback(async(r,a={})=>{D(n.current,Ht),n.current&&(typeof r=="number"?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...a}))},[e,t])}o(Ro,"useNavigateStable");var at={};function Jt(e,t,n){!t&&!at[e]&&(at[e]=!0,D(!1,n))}o(Jt,"warningOnce");var st={};function So(e,t){!e&&!st[t]&&(st[t]=!0)}o(So,"warnOnce");var Rs=u.memo(xo);function xo({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:s}){return qt(e,void 0,{manifest:t,state:r,isStatic:a,onError:s,future:n})}o(xo,"DataRoutes2");function Eo({to:e,replace:t,state:n,relative:r}){C(Z(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=u.useContext(L);D(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=u.useContext(O),{pathname:i}=_(),l=xe(),c=Se(e,We(s),i,r==="path"),d=JSON.stringify(c);return u.useEffect(()=>{l(JSON.parse(d),{replace:t,state:n,relative:r})},[l,d,r,t,n]),null}o(Eo,"Navigate$1");function Ss(e){return io(e.context)}o(Ss,"Outlet");function bo(e){C(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}o(bo,"Route");function Kt({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:s=!1,useTransitions:i}){C(!Z(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=u.useMemo(()=>({basename:l,navigator:a,static:s,useTransitions:i,future:{}}),[l,a,s,i]);typeof n=="string"&&(n=Y(n));let{pathname:d="/",search:m="",hash:f="",state:g=null,key:v="default",mask:w}=n,y=u.useMemo(()=>{let h=B(d,l);return h==null?null:{location:{pathname:h,search:m,hash:f,state:g,key:v,mask:w},navigationType:r}},[l,d,m,f,g,v,r,w]);return D(y!=null,`<Router basename="${l}"> is not able to match the URL "${d}${m}${f}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:u.createElement(L.Provider,{value:c},u.createElement(X.Provider,{children:t,value:y}))}o(Kt,"Router");function xs({children:e,location:t}){return lo(Oe(e),t)}o(xs,"Routes");var Es=class extends u.Component{static{o(this,"AwaitErrorBoundary")}constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){let{children:e,errorElement:t,resolve:n}=this.props,r=null,a=0;if(!(n instanceof Promise))a=1,r=Promise.resolve(),Object.defineProperty(r,"_tracked",{get:o(()=>!0,"get")}),Object.defineProperty(r,"_data",{get:o(()=>n,"get")});else if(this.state.error){a=2;let s=this.state.error;r=Promise.reject().catch(()=>{}),Object.defineProperty(r,"_tracked",{get:o(()=>!0,"get")}),Object.defineProperty(r,"_error",{get:o(()=>s,"get")})}else n._tracked?(r=n,a="_error"in r?2:"_data"in r?1:0):(a=0,Object.defineProperty(n,"_tracked",{get:o(()=>!0,"get")}),r=n.then(s=>Object.defineProperty(n,"_data",{get:o(()=>s,"get")}),s=>{this.props.onError?.(s),Object.defineProperty(n,"_error",{get:o(()=>s,"get")})}));if(a===2&&!t)throw r._error;if(a===2)return u.createElement(Te.Provider,{value:r,children:t});if(a===1)return u.createElement(Te.Provider,{value:r,children:e});throw r}};function Oe(e,t=[]){let n=[];return u.Children.forEach(e,(r,a)=>{if(!u.isValidElement(r))return;let s=[...t,a];if(r.type===u.Fragment){n.push.apply(n,Oe(r.props.children,s));return}C(r.type===bo,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),C(!r.props.index||!r.props.children,"An index route cannot have child routes.");let i={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=Oe(r.props.children,s)),n.push(i)}),n}o(Oe,"createRoutesFromChildren");var he="get",pe="application/x-www-form-urlencoded";function Ee(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}o(Ee,"isHtmlElement");function Co(e){return Ee(e)&&e.tagName.toLowerCase()==="button"}o(Co,"isButtonElement");function ko(e){return Ee(e)&&e.tagName.toLowerCase()==="form"}o(ko,"isFormElement");function $o(e){return Ee(e)&&e.tagName.toLowerCase()==="input"}o($o,"isInputElement");function Po(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}o(Po,"isModifiedEvent");function Lo(e,t){return e.button===0&&(!t||t==="_self")&&!Po(e)}o(Lo,"shouldProcessLinkClick");function Ne(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}o(Ne,"createSearchParams");function Ao(e,t){let n=Ne(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(s=>{n.append(a,s)})}),n}o(Ao,"getSearchParamsForLocation");var fe=null;function Do(){if(fe===null)try{new FormData(document.createElement("form"),0),fe=!1}catch{fe=!0}return fe}o(Do,"isFormDataSubmitterSupported");var _o=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function De(e){return e!=null&&!_o.has(e)?(D(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${pe}"`),null):e}o(De,"getFormEncType");function To(e,t){let n,r,a,s,i;if(ko(e)){let l=e.getAttribute("action");r=l?B(l,t):null,n=e.getAttribute("method")||he,a=De(e.getAttribute("enctype"))||pe,s=new FormData(e)}else if(Co(e)||$o(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(r=c?B(c,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||he,a=De(e.getAttribute("formenctype"))||De(l.getAttribute("enctype"))||pe,s=new FormData(l,e),!Do()){let{name:d,type:m,value:f}=e;if(m==="image"){let g=d?`${d}.`:"";s.append(`${g}x`,"0"),s.append(`${g}y`,"0")}else d&&s.append(d,f)}}else{if(Ee(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=he,r=null,a=pe,i=e}return s&&a==="text/plain"&&(i=s,s=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:s,body:i}}o(To,"getFormSubmissionInfo");var bs=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),Oo={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},No=/[&><\u2028\u2029]/g;function it(e){return e.replace(No,t=>Oo[t])}o(it,"escapeHtml");function be(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}o(be,"invariant2");function Vt(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&B(a.pathname,t)==="/"?a.pathname=`${ye(t)}/_root.${r}`:a.pathname=`${ye(a.pathname)}.${r}`,a}o(Vt,"singleFetchUrl");async function Mo(e,t){if(e.id in t)return t[e.id];try{let n=await Tn(()=>import(e.module),[]);return t[e.id]=n,n}catch{return window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}o(Mo,"loadRouteModule");function Uo(e){return e!=null&&typeof e.page=="string"}o(Uo,"isPageLinkDescriptor");function jo(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}o(jo,"isHtmlLinkDescriptor");async function Fo(e,t,n){return Wo((await Promise.all(e.map(async r=>{let a=t.routes[r.route.id];if(a){let s=await Mo(a,n);return s.links?s.links():[]}return[]}))).flat(1).filter(jo).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}o(Fo,"getKeyedPrefetchLinks");function ut(e,t,n,r,a,s){let i=o((c,d)=>n[d]?c.route.id!==n[d].route.id:!0,"isNew"),l=o((c,d)=>n[d].pathname!==c.pathname||n[d].route.path?.endsWith("*")&&n[d].params["*"]!==c.params["*"],"matchPathChanged");return s==="assets"?t.filter((c,d)=>i(c,d)||l(c,d)):s==="data"?t.filter((c,d)=>{let m=r.routes[c.route.id];if(!m||!m.hasLoader)return!1;if(i(c,d)||l(c,d))return!0;if(c.route.shouldRevalidate){let f=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}o(ut,"getNewMatchesForLinks");function Yt(e,t,{includeHydrateFallback:n}={}){return Bo(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}o(Yt,"getModuleLinkHrefs");function Bo(e){return[...new Set(e)]}o(Bo,"dedupeHrefs");function Ho(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}o(Ho,"sortKeys");function Wo(e,t){let n=new Set,r=new Set(t);return e.reduce((a,s)=>{if(t&&!Uo(s)&&s.as==="script"&&s.href&&r.has(s.href))return a;let i=JSON.stringify(Ho(s));return n.has(i)||(n.add(i),a.push({key:i,link:s})),a},[])}o(Wo,"dedupeLinkDescriptors");function qo(e,t){return e.mode==="lazy"&&t===!0}o(qo,"isFogOfWarEnabled");function zo({sri:e,...t},n){let r=new Set(n.state.matches.map(l=>l.route.id)),a=n.state.location.pathname.split("/").filter(Boolean),s=["/"];for(a.pop();a.length>0;)s.push(`/${a.join("/")}`),a.pop();s.forEach(l=>{let c=$t(n.routes,l,n.basename||"/",!1,n.branches);c&&c.forEach(d=>r.add(d.route.id))});let i=[...r].reduce((l,c)=>Object.assign(l,{[c]:t.routes[c]}),{});return{...t,routes:i,sri:e?!0:void 0}}o(zo,"getPartialManifest");function Ce(){let e=u.useContext(G);return be(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}o(Ce,"useDataRouterContext2");function Gt(){let e=u.useContext(ue);return be(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}o(Gt,"useDataRouterStateContext");var ke=u.createContext(void 0);ke.displayName="FrameworkContext";function z(){let e=u.useContext(ke);return be(e,"You must render this element inside a <HydratedRouter> element"),e}o(z,"useFrameworkContext");function Qo(e,t){let n=u.useContext(ke),[r,a]=u.useState(!1),[s,i]=u.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:d,onMouseLeave:m,onTouchStart:f}=t,g=u.useRef(null);u.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let y=o(I=>{I.forEach(R=>{i(R.isIntersecting)})},"callback"),h=new IntersectionObserver(y,{threshold:.5});return g.current&&h.observe(g.current),()=>{h.disconnect()}}},[e]),u.useEffect(()=>{if(r){let y=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(y)}}},[r]);let v=o(()=>{a(!0)},"setIntent"),w=o(()=>{a(!1),i(!1)},"cancelIntent");return n?e!=="intent"?[s,g,{}]:[s,g,{onFocus:ne(l,v),onBlur:ne(c,w),onMouseEnter:ne(d,v),onMouseLeave:ne(m,w),onTouchStart:ne(f,v)}]:[!1,g,{}]}o(Qo,"usePrefetchBehavior");function ne(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}o(ne,"composeEventHandlers");function Jo(e,t,n){if(n&&!ve)return[e[0]];if(t){let r=e.findIndex(a=>t[a.route.id]!==void 0);return e.slice(0,r+1)}return e}o(Jo,"getActiveMatches");function Ko({page:e,...t}){let n=jt(),{nonce:r}=z(),{router:a}=Ce(),s=u.useMemo(()=>kt(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?(t.nonce==null&&r&&(t={...t,nonce:r}),n?u.createElement(Yo,{page:e,matches:s,...t}):u.createElement(Go,{page:e,matches:s,...t})):null}o(Ko,"PrefetchPageLinks");function Vo(e){let{manifest:t,routeModules:n}=z(),[r,a]=u.useState([]);return u.useEffect(()=>{let s=!1;return Fo(e,t,n).then(i=>{s||a(i)}),()=>{s=!0}},[e,t,n]),r}o(Vo,"useKeyedPrefetchLinks");function Yo({page:e,matches:t,...n}){let r=_(),{future:a}=z(),{basename:s}=Ce(),i=u.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let l=Vt(e,s,a.v8_trailingSlashAwareDataRequests,"rsc"),c=!1,d=[];for(let m of t)typeof m.route.shouldRevalidate=="function"?c=!0:d.push(m.route.id);return c&&d.length>0&&l.searchParams.set("_routes",d.join(",")),[l.pathname+l.search]},[s,a.v8_trailingSlashAwareDataRequests,e,r,t]);return u.createElement(u.Fragment,null,i.map(l=>u.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...n})))}o(Yo,"RSCPrefetchPageLinksImpl");function Go({page:e,matches:t,...n}){let r=_(),{future:a,manifest:s,routeModules:i}=z(),{basename:l}=Ce(),{loaderData:c,matches:d}=Gt(),m=u.useMemo(()=>ut(e,t,d,s,r,"data"),[e,t,d,s,r]),f=u.useMemo(()=>ut(e,t,d,s,r,"assets"),[e,t,d,s,r]),g=u.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let y=new Set,h=!1;if(t.forEach(R=>{let S=s.routes[R.route.id];!S||!S.hasLoader||(!m.some(k=>k.route.id===R.route.id)&&R.route.id in c&&i[R.route.id]?.shouldRevalidate||S.hasClientLoader?h=!0:y.add(R.route.id))}),y.size===0)return[];let I=Vt(e,l,a.v8_trailingSlashAwareDataRequests,"data");return h&&y.size>0&&I.searchParams.set("_routes",t.filter(R=>y.has(R.route.id)).map(R=>R.route.id).join(",")),[I.pathname+I.search]},[l,a.v8_trailingSlashAwareDataRequests,c,r,s,m,t,e,i]),v=u.useMemo(()=>Yt(f,s),[f,s]),w=Vo(f);return u.createElement(u.Fragment,null,g.map(y=>u.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...n})),v.map(y=>u.createElement("link",{key:y,rel:"modulepreload",href:y,...n})),w.map(({key:y,link:h})=>u.createElement("link",{key:y,nonce:n.nonce,...h,crossOrigin:h.crossOrigin??n.crossOrigin})))}o(Go,"PrefetchPageLinksImpl");var ve=!1;function Xo(){ve=!0}o(Xo,"setIsHydrated");function Zo(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:a,routeDiscovery:s,ssr:i,nonce:l}=z(),{router:c,static:d,staticContext:m}=Ce(),{matches:f}=Gt(),g=jt(),v=qo(s,i);e.nonce==null&&l&&(e={...e,nonce:l}),a&&(a.didRenderScripts=!0);let w=Jo(f,null,r);u.useEffect(()=>{Xo()},[]);let y=u.useMemo(()=>{if(g)return null;let R=m?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",S=d?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${v?"":`import ${JSON.stringify(t.url)}`};
|
|
4
|
+
${w.map((k,E)=>{let $=`route${E}`,A=t.routes[k.route.id];be(A,`Route ${k.route.id} not found in manifest`);let{clientActionModule:N,clientLoaderModule:P,clientMiddlewareModule:U,hydrateFallbackModule:Q,module:T}=A,H=[...N?[{module:N,varName:`${$}_clientAction`}]:[],...P?[{module:P,varName:`${$}_clientLoader`}]:[],...U?[{module:U,varName:`${$}_clientMiddleware`}]:[],...Q?[{module:Q,varName:`${$}_HydrateFallback`}]:[],{module:T,varName:`${$}_main`}];return H.length===1?`import * as ${$} from ${JSON.stringify(T)};`:[H.map(j=>`import * as ${j.varName} from "${j.module}";`).join(`
|
|
5
5
|
`),`const ${$} = {${H.map(j=>`...${j.varName}`).join(",")}};`].join(`
|
|
6
6
|
`)}).join(`
|
|
7
7
|
`)}
|
|
@@ -12,4 +12,4 @@ import(${JSON.stringify(t.entry.module)});`:" ";return u.createElement(u.Fragmen
|
|
|
12
12
|
console.log(
|
|
13
13
|
"💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
|
|
14
14
|
);
|
|
15
|
-
`}});if(Tt(e))return u.createElement(lt,{title:"Unhandled Thrown Response!"},u.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let a;if(e instanceof Error)a=e;else{let s=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);a=new Error(s)}return u.createElement(lt,{title:"Application Error!",isOutsideRemixApp:t},u.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),u.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},a.stack),r)}o(ta,"RemixRootDefaultErrorBoundary");function lt({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:a}=z();return a.root?.Layout&&!n?r:u.createElement("html",{lang:"en"},u.createElement("head",null,u.createElement("meta",{charSet:"utf-8"}),u.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),u.createElement("title",null,e)),u.createElement("body",null,u.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},r,t?u.createElement(Zo,null):null)))}o(lt,"BoundaryShell");var na=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{na&&(window.__reactRouterVersion="7.18.2")}catch{}function ks({basename:e,children:t,useTransitions:n,window:r}){let a=u.useRef();a.current==null&&(a.current=Rr({window:r,v5Compat:!0}));let s=a.current,[i,l]=u.useState({action:s.action,location:s.location}),c=u.useCallback(d=>{n===!1?l(d):u.startTransition(()=>l(d))},[n]);return u.useLayoutEffect(()=>s.listen(c),[s,c]),u.createElement(Kt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:s,useTransitions:n})}o(ks,"BrowserRouter");function ra({basename:e,children:t,history:n,useTransitions:r}){let[a,s]=u.useState({action:n.action,location:n.location}),i=u.useCallback(l=>{r===!1?s(l):u.startTransition(()=>s(l))},[r]);return u.useLayoutEffect(()=>n.listen(i),[n,i]),u.createElement(Kt,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:n,useTransitions:r})}o(ra,"HistoryRouter");ra.displayName="unstable_HistoryRouter";var ce=u.forwardRef(o(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:s,replace:i,mask:l,state:c,target:d,to:m,preventScrollReset:f,viewTransition:g,defaultShouldRevalidate:v,...w},y){let{basename:h,navigator:I,useTransitions:R}=u.useContext(L),S=typeof m=="string"&&He.test(m),k=Nt(m,h);m=k.to;let E=oo(m,{relative:a}),$=_(),A=null;if(l){let F=Se(l,[],$.mask?$.mask.pathname:"/",!0);h!=="/"&&(F.pathname=F.pathname==="/"?h:U([h,F.pathname])),A=I.createHref(F)}let[N,P,M]=Qo(r,w),Q=ia(m,{replace:i,mask:l,state:c,target:d,preventScrollReset:f,relative:a,viewTransition:g,defaultShouldRevalidate:v,useTransitions:R});function T(F){t&&t(F),F.defaultPrevented||Q(F)}o(T,"handleClick");let H=!(k.isExternal||s),j=u.createElement("a",{...w,...M,href:(H?A:void 0)||k.absoluteURL||E,onClick:H?T:t,ref:ea(y,P),target:d,"data-discover":!S&&n==="render"?"true":void 0});return N&&!S?u.createElement(u.Fragment,null,j,u.createElement(Ko,{page:E})):j},"LinkWithRef"));ce.displayName="Link";var Xt=u.forwardRef(o(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:s,to:i,viewTransition:l,children:c,...d},m){let f=le(i,{relative:d.relative}),g=_(),v=u.useContext(ue),{navigator:w,basename:y}=u.useContext(L),h=v!=null&&ha(f)&&l===!0,I=w.encodeLocation?w.encodeLocation(f).pathname:f.pathname,R=g.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(R=R.toLowerCase(),S=S?S.toLowerCase():null,I=I.toLowerCase()),S&&y&&(S=B(S,y)||S);const k=I!=="/"&&I.endsWith("/")?I.length-1:I.length;let E=R===I||!a&&R.startsWith(I)&&R.charAt(k)==="/",$=S!=null&&(S===I||!a&&S.startsWith(I)&&S.charAt(I.length)==="/"),A={isActive:E,isPending:$,isTransitioning:h},N=E?t:void 0,P;typeof r=="function"?P=r(A):P=[r,E?"active":null,$?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let M=typeof s=="function"?s(A):s;return u.createElement(ce,{...d,"aria-current":N,className:P,ref:m,style:M,to:i,viewTransition:l},typeof c=="function"?c(A):c)},"NavLinkWithRef"));Xt.displayName="NavLink";var oa=u.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:s,method:i=he,action:l,onSubmit:c,relative:d,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:g,...v},w)=>{let{useTransitions:y}=u.useContext(L),h=ca(),I=da(l,{relative:d}),R=i.toLowerCase()==="get"?"get":"post",S=typeof l=="string"&&He.test(l),k=o(E=>{if(c&&c(E),E.defaultPrevented)return;E.preventDefault();let $=E.nativeEvent.submitter,A=$?.getAttribute("formmethod")||i,N=o(()=>h($||E.currentTarget,{fetcherKey:t,method:A,navigate:n,replace:a,state:s,relative:d,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:g}),"doSubmit");y&&n!==!1?u.startTransition(()=>N()):N()},"submitHandler");return u.createElement("form",{ref:w,method:R,action:I,onSubmit:r?c:k,...v,"data-discover":!S&&e==="render"?"true":void 0})});oa.displayName="Form";function aa({getKey:e,storageKey:t,...n}){let r=u.useContext(ke),{basename:a}=u.useContext(L),s=_(),i=Qt();fa({getKey:e,storageKey:t});let l=u.useMemo(()=>{if(!r||!e)return null;let d=Me(s,i,a,e);return d!==s.key?d:null},[]);if(!r||r.isSpaMode)return null;let c=((d,m)=>{if(!window.history.state||!window.history.state.key){let f=Math.random().toString(32).slice(2);window.history.replaceState({key:f},"")}try{let f=JSON.parse(sessionStorage.getItem(d)||"{}")[m||window.history.state.key];typeof f=="number"&&window.scrollTo(0,f)}catch{sessionStorage.removeItem(d)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),u.createElement("script",{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${it(JSON.stringify(t||Ue))}, ${it(JSON.stringify(l))})`}})}o(aa,"ScrollRestoration");aa.displayName="ScrollRestoration";function Zt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}o(Zt,"getDataRouterConsoleError2");function Ke(e){let t=u.useContext(G);return C(t,Zt(e)),t}o(Ke,"useDataRouterContext3");function sa(e){let t=u.useContext(ue);return C(t,Zt(e)),t}o(sa,"useDataRouterState2");function ia(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:s,relative:i,viewTransition:l,defaultShouldRevalidate:c,useTransitions:d}={}){let m=xe(),f=_(),g=le(e,{relative:i});return u.useCallback(v=>{if(Lo(v,t)){v.preventDefault();let w=n!==void 0?n:oe(f)===oe(g),y=o(()=>m(e,{replace:w,mask:r,state:a,preventScrollReset:s,relative:i,viewTransition:l,defaultShouldRevalidate:c}),"doNavigate");d?u.startTransition(()=>y()):y()}},[f,m,g,n,r,a,t,e,s,i,l,c,d])}o(ia,"useLinkClickHandler");function $s(e){D(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=u.useRef(Ne(e)),n=u.useRef(!1),r=_(),a=u.useMemo(()=>Ao(r.search,n.current?null:t.current),[r.search]),s=xe();return[a,u.useCallback((i,l)=>{const c=Ne(typeof i=="function"?i(new URLSearchParams(a)):i);n.current=!0,s("?"+c,l)},[s,a])]}o($s,"useSearchParams");var ua=0,la=o(()=>`__${String(++ua)}__`,"getUniqueFetcherId");function ca(){let{router:e}=Ke("useSubmit"),{basename:t}=u.useContext(L),n=vo(),r=e.fetch,a=e.navigate;return u.useCallback(async(s,i={})=>{let{action:l,method:c,encType:d,formData:m,body:f}=To(s,t);if(i.navigate===!1){let g=i.fetcherKey||la();await r(g,n,i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:m,body:f,formMethod:i.method||c,formEncType:i.encType||d,flushSync:i.flushSync})}else await a(i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:m,body:f,formMethod:i.method||c,formEncType:i.encType||d,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[r,a,t,n])}o(ca,"useSubmit");function da(e,{relative:t}={}){let{basename:n}=u.useContext(L),r=u.useContext(O);C(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),s={...le(e||".",{relative:t})},i=_();if(e==null){s.search=i.search;let l=new URLSearchParams(s.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(m=>m).forEach(m=>l.append("index",m));let d=l.toString();s.search=d?`?${d}`:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:U([n,s.pathname])),oe(s)}o(da,"useFormAction");var Ue="react-router-scroll-positions",me={};function Me(e,t,n,r){let a=null;return r&&(n!=="/"?a=r({...e,pathname:B(e.pathname,n)||e.pathname},t):a=r(e,t)),a==null&&(a=e.key),a}o(Me,"getScrollRestorationKey");function fa({getKey:e,storageKey:t}={}){let{router:n}=Ke("useScrollRestoration"),{restoreScrollPosition:r,preventScrollReset:a}=sa("useScrollRestoration"),{basename:s}=u.useContext(L),i=_(),l=Qt(),c=wo();u.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),ma(u.useCallback(()=>{if(c.state==="idle"){let d=Me(i,l,s,e);me[d]=window.scrollY}try{sessionStorage.setItem(t||Ue,JSON.stringify(me))}catch(d){D(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${d}).`)}window.history.scrollRestoration="auto"},[c.state,e,s,i,l,t])),typeof document<"u"&&(u.useLayoutEffect(()=>{try{let d=sessionStorage.getItem(t||Ue);d&&(me=JSON.parse(d))}catch{}},[t]),u.useLayoutEffect(()=>{let d=n?.enableScrollRestoration(me,()=>window.scrollY,e?(m,f)=>Me(m,f,s,e):void 0);return()=>d&&d()},[n,s,e]),u.useLayoutEffect(()=>{if(r!==!1){if(typeof r=="number"){window.scrollTo(0,r);return}try{if(i.hash){let d=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(d){d.scrollIntoView();return}}}catch{D(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}a!==!0&&window.scrollTo(0,0)}},[i,r,a]))}o(fa,"useScrollRestoration");function Ps(e,t){let{capture:n}=t||{};u.useEffect(()=>{let r=n!=null?{capture:n}:void 0;return window.addEventListener("beforeunload",e,r),()=>{window.removeEventListener("beforeunload",e,r)}},[e,n])}o(Ps,"useBeforeUnload");function ma(e,t){let{capture:n}=t||{};u.useEffect(()=>{let r=n!=null?{capture:n}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,n])}o(ma,"usePageHide");function ha(e,{relative:t}={}){let n=u.useContext(Ft);C(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ke("useViewTransitionState"),a=le(e,{relative:t});if(!n.isTransitioning)return!1;let s=B(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=B(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ge(a.pathname,i)!=null||ge(a.pathname,s)!=null}o(ha,"useViewTransitionState");var ct=60,je=3600,we=24*je,dt=7*we,ft=30*we;function pa(e){const t=Date.now(),n=new Date(e).getTime(),r=Math.round((t-n)/1e3);return r<ct?"just now":r<je?`${Math.floor(r/ct)}m ago`:r<we?`${Math.floor(r/je)}h ago`:r<dt?`${Math.floor(r/we)}d ago`:r<ft?`${Math.floor(r/dt)}w ago`:`${Math.floor(r/ft)}mo ago`}o(pa,"timeAgo");var en="from",tn="fromHref",nn="paperclip:issue-detail-breadcrumb:";function rn(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.label=="string"&&typeof t.href=="string"}o(rn,"isIssueDetailBreadcrumb");function on(e){return e==="issues"||e==="inbox"}o(on,"isIssueDetailSource");function an(e){if(typeof e!="object"||e===null)return!1;const t=e,n=t.originKind===void 0||typeof t.originKind=="string",r=t.originId===void 0||t.originId===null||typeof t.originId=="string",a=t.blockerAttention===void 0||typeof t.blockerAttention=="object"&&t.blockerAttention!==null;return typeof t.id=="string"&&(t.identifier===null||typeof t.identifier=="string")&&typeof t.title=="string"&&typeof t.status=="string"&&a&&typeof t.priority=="string"&&(t.projectId===null||typeof t.projectId=="string")&&(t.projectName===null||typeof t.projectName=="string")&&n&&r}o(an,"isIssueDetailHeaderSeed");function ga(e){return{id:e.id,identifier:e.identifier??null,title:e.title,status:e.status,blockerAttention:e.blockerAttention,priority:e.priority,projectId:e.projectId??null,projectName:e.project?.name??null,originKind:e.originKind,originId:e.originId??null}}o(ga,"createIssueDetailHeaderSeed");function sn(e,t){const n=ga(t);return typeof e!="object"||e===null?{issueDetailHeaderSeed:n}:{...e,issueDetailHeaderSeed:n}}o(sn,"withIssueDetailHeaderSeed");function ya(e){if(typeof e!="object"||e===null)return null;const t=e.issueDetailHeaderSeed;return an(t)?t:null}o(ya,"readIssueDetailHeaderSeed");function va(e){if(!e)return null;const t=new URLSearchParams(e).get(en);return on(t)?t:null}o(va,"readIssueDetailSourceFromSearch");function wa(e){if(!e)return null;const t=new URLSearchParams(e).get(tn);return t&&t.startsWith("/")?t:null}o(wa,"readIssueDetailBreadcrumbHrefFromSearch");function un(e,t){return on(e?.issueDetailSource)?e.issueDetailSource:t?t.label==="Inbox"||t.href.includes("/inbox")?"inbox":t.label==="Tasks"||t.href.includes("/issues")?"issues":null:null}o(un,"inferIssueDetailSource");function mt(e){return e==="inbox"?{label:"Inbox",href:"/inbox"}:{label:"Tasks",href:"/issues"}}o(mt,"breadcrumbForSource");function Ls(e,t,n){return{issueDetailBreadcrumb:{label:e,href:t},issueDetailSource:n}}o(Ls,"createIssueDetailLocationState");function As(e){return typeof e!="object"||e===null?{issueDetailInboxQuickArchiveArmed:!0}:{...e,issueDetailInboxQuickArchiveArmed:!0}}o(As,"armIssueDetailInboxQuickArchive");function Ia(e){if(typeof window>"u"||!window.sessionStorage)return null;const t=window.sessionStorage.getItem(`${nn}${e}`);if(!t)return null;try{const n=JSON.parse(t),r=rn(n.issueDetailBreadcrumb)?n.issueDetailBreadcrumb:null,a=un(n,r);if(!r||!a)return null;const s=an(n.issueDetailHeaderSeed)?n.issueDetailHeaderSeed:void 0;return{issueDetailBreadcrumb:r,issueDetailSource:a,issueDetailInboxQuickArchiveArmed:n.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:s}}catch{return null}}o(Ia,"readStoredIssueDetailLocationState");function ln(e,t){if(typeof e=="object"&&e!==null){const a=e.issueDetailBreadcrumb;if(rn(a)){const s=un(e,a);if(!s)return null;const i=ya(e)??void 0;return{issueDetailBreadcrumb:a,issueDetailSource:s,issueDetailInboxQuickArchiveArmed:e.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:i}}}const n=va(t),r=wa(t);return n?{issueDetailBreadcrumb:r?{...mt(n),href:r}:mt(n),issueDetailSource:n,issueDetailInboxQuickArchiveArmed:!1}:null}o(ln,"normalizeIssueDetailLocationState");function Ds(e,t,n){if(typeof window>"u"||!window.sessionStorage)return;const r=ln(t,n);r&&window.sessionStorage.setItem(`${nn}${e}`,JSON.stringify(r))}o(Ds,"rememberIssueDetailLocationState");function Ra(e){return`/issues/${e}`}o(Ra,"createIssueDetailPath");function _s(e){if(!e)return!1;const t=new URLSearchParams(e);return t.has(en)||t.has(tn)}o(_s,"hasLegacyIssueDetailQuery");function Sa(e,t,n){const r=ln(t,n);return r||(e?Ia(e):null)}o(Sa,"readIssueDetailLocationState");function Ts(e,t,n){return Sa(e,t,n)?.issueDetailBreadcrumb??null}o(Ts,"readIssueDetailBreadcrumb");var ht=class extends Error{static{o(this,"CommentSubmissionUnknownError")}constructor(){super("We couldn’t confirm whether this comment was saved. Review the conversation before starting another draft."),this.name="CommentSubmissionUnknownError"}};function pt(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e,n=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;return typeof t.id=="string"&&n.test(t.id)&&typeof t.issueId=="string"&&n.test(t.issueId)&&typeof t.body=="string"}o(pt,"hasCommentReceipt");async function gt(e,t){try{const n=await e;if(!t(n))throw new ht;return n}catch(n){throw n instanceof Dn&&n.status<500?n:new ht}}o(gt,"confirmedCommentResponse");function yt(e){const t=new URLSearchParams;return e?.attention&&t.set("attention",e.attention),e?.status&&t.set("status",e.status),e?.projectId&&t.set("projectId",e.projectId),e?.parentId&&t.set("parentId",e.parentId),e?.assigneeAgentId&&t.set("assigneeAgentId",e.assigneeAgentId),e?.participantAgentId&&t.set("participantAgentId",e.participantAgentId),e?.assigneeUserId&&t.set("assigneeUserId",e.assigneeUserId),e?.touchedByUserId&&t.set("touchedByUserId",e.touchedByUserId),e?.inboxArchivedByUserId&&t.set("inboxArchivedByUserId",e.inboxArchivedByUserId),e?.unreadForUserId&&t.set("unreadForUserId",e.unreadForUserId),e?.labelId&&t.set("labelId",e.labelId),e?.workspaceId&&t.set("workspaceId",e.workspaceId),e?.executionWorkspaceId&&t.set("executionWorkspaceId",e.executionWorkspaceId),e?.originKind&&t.set("originKind",e.originKind),e?.originKindPrefix&&t.set("originKindPrefix",e.originKindPrefix),e?.originId&&t.set("originId",e.originId),e?.descendantOf&&t.set("descendantOf",e.descendantOf),e?.createdFromIssueId&&t.set("createdFromIssueId",e.createdFromIssueId),e?.includeRoutineExecutions&&t.set("includeRoutineExecutions","true"),e?.includeBlockedBy&&t.set("includeBlockedBy","true"),e?.includeBlockedInboxAttention&&t.set("includeBlockedInboxAttention","true"),e?.includeLiveDescendantSummary&&t.set("includeLiveDescendantSummary","true"),e?.hasPlanDocument!==void 0&&t.set("hasPlanDocument",e.hasPlanDocument?"true":"false"),e?.q&&t.set("q",e.q),e?.limit&&t.set("limit",String(e.limit)),e?.offset!==void 0&&t.set("offset",String(e.offset)),e?.sortField&&t.set("sortField",e.sortField),e?.sortDir&&t.set("sortDir",e.sortDir),e?.afterId&&t.set("afterId",e.afterId),t}o(yt,"issueListSearchParams");var K={listAll:o(async(e,t,n)=>{const a=new Map;let s;for(;;){const i=await K.list(e,{...t,limit:500,sortField:"id",sortDir:"asc",afterId:s},n);for(const l of i)a.set(l.id,l);if(i.length<500)return[...a.values()];s=i[i.length-1].id}},"listAll"),list:o((e,t,n)=>{const r=yt(t).toString(),a=`/companies/${e}/issues${r?`?${r}`:""}`;return n?p.get(a,n):p.get(a)},"list"),listCompact:o((e,t,n)=>{const r=yt(t);r.set("view","compact");const a=`/companies/${e}/issues?${r.toString()}`;return n?p.get(a,n):p.get(a)},"listCompact"),count:o((e,t)=>{const n=new URLSearchParams;return n.set("attention",t.attention),t.status&&n.set("status",t.status),t.assigneeAgentId&&n.set("assigneeAgentId",t.assigneeAgentId),t.assigneeUserId&&n.set("assigneeUserId",t.assigneeUserId),t.projectId&&n.set("projectId",t.projectId),t.labelId&&n.set("labelId",t.labelId),t.q&&n.set("q",t.q),p.get(`/companies/${e}/issues/count?${n.toString()}`)},"count"),listLabels:o(e=>p.get(`/companies/${e}/labels`),"listLabels"),createLabel:o((e,t)=>p.post(`/companies/${e}/labels`,t),"createLabel"),deleteLabel:o(e=>p.delete(`/labels/${e}`),"deleteLabel"),get:o((e,t)=>t?p.get(`/issues/${e}`,t):p.get(`/issues/${e}`),"get"),getRunnerGoal:o((e,t)=>{const n=t?`?agentId=${encodeURIComponent(t)}`:"";return p.get(`/issues/${e}/runner-goal${n}`)},"getRunnerGoal"),actOnRunnerGoal:o((e,t)=>p.post(`/issues/${e}/runner-goal/actions`,t),"actOnRunnerGoal"),getWatchdog:o(e=>p.get(`/issues/${e}/watchdog`),"getWatchdog"),upsertWatchdog:o((e,t)=>p.put(`/issues/${e}/watchdog`,t),"upsertWatchdog"),deleteWatchdog:o(e=>p.delete(`/issues/${e}/watchdog`),"deleteWatchdog"),markRead:o(e=>p.post(`/issues/${e}/read`,{}),"markRead"),markUnread:o(e=>p.delete(`/issues/${e}/read`),"markUnread"),archiveFromInbox:o(e=>p.post(`/issues/${e}/inbox-archive`,{}),"archiveFromInbox"),unarchiveFromInbox:o(e=>p.delete(`/issues/${e}/inbox-archive`),"unarchiveFromInbox"),create:o((e,t)=>p.post(`/companies/${e}/issues`,t),"create"),update:o((e,t)=>{const n=p.patch(`/issues/${e}`,t);return typeof t.comment=="string"?gt(n,r=>pt(r?.comment)):n},"update"),decideStalledReview:o((e,t)=>p.post(`/issues/${e}/stalled-review-decision`,t),"decideStalledReview"),resolveRecoveryAction:o((e,t)=>p.post(`/issues/${e}/recovery-actions/resolve`,t),"resolveRecoveryAction"),previewTreeControl:o((e,t)=>p.post(`/issues/${e}/tree-control/preview`,t),"previewTreeControl"),createTreeHold:o((e,t)=>p.post(`/issues/${e}/tree-holds`,t),"createTreeHold"),getTreeHold:o((e,t)=>p.get(`/issues/${e}/tree-holds/${t}`),"getTreeHold"),listTreeHolds:o((e,t)=>{const n=new URLSearchParams;t?.status&&n.set("status",t.status),t?.mode&&n.set("mode",t.mode),t?.includeMembers&&n.set("includeMembers","true");const r=n.toString();return p.get(`/issues/${e}/tree-holds${r?`?${r}`:""}`)},"listTreeHolds"),getTreeControlState:o(e=>p.get(`/issues/${e}/tree-control/state`),"getTreeControlState"),releaseTreeHold:o((e,t,n)=>p.post(`/issues/${e}/tree-holds/${t}/release`,n),"releaseTreeHold"),checkMonitorNow:o(e=>p.post(`/issues/${e}/monitor/check-now`,{}),"checkMonitorNow"),retryScheduledRetryNow:o(e=>p.post(`/issues/${e}/scheduled-retry/retry-now`,{}),"retryScheduledRetryNow"),remove:o(e=>p.delete(`/issues/${e}`),"remove"),checkout:o((e,t)=>p.post(`/issues/${e}/checkout`,{agentId:t,expectedStatuses:["todo","backlog","blocked","in_review"]}),"checkout"),release:o(e=>p.post(`/issues/${e}/release`,{}),"release"),listComments:o((e,t)=>{const n=new URLSearchParams;t?.after&&n.set("after",t.after),t?.order&&n.set("order",t.order),t?.limit&&n.set("limit",String(t.limit));const r=n.toString();return p.get(`/issues/${e}/comments${r?`?${r}`:""}`)},"listComments"),getQueuedComments:o(e=>p.get(`/issues/${e}/queued-comments`),"getQueuedComments"),editQueuedComment:o((e,t,n)=>p.patch(`/issues/${e}/queued-comments/${t}`,n),"editQueuedComment"),reorderQueuedComments:o((e,t)=>p.put(`/issues/${e}/queued-comments/order`,t),"reorderQueuedComments"),interruptQueuedComments:o((e,t)=>p.post(`/issues/${e}/queued-comments/interrupt`,t),"interruptQueuedComments"),interruptLatestQueuedComments:o(async(e,t)=>{const n=await K.getQueuedComments(e);if(!n.queueId||n.targetRunId&&n.targetRunId!==t)throw new Error("The queued messages changed. Refresh and try again.");return K.interruptQueuedComments(e,{queueId:n.queueId,revision:n.revision,targetRunId:n.targetRunId})},"interruptLatestQueuedComments"),steerQueuedComment:o((e,t,n)=>p.post(`/issues/${e}/queued-comments/${t}/steer`,n),"steerQueuedComment"),discardQueuedComment:o((e,t,n)=>p.delete(`/issues/${e}/queued-comments/${t}`,n),"discardQueuedComment"),listInteractions:o(e=>p.get(`/issues/${e}/interactions`),"listInteractions"),listAcceptedPlanDecompositions:o(e=>p.get(`/issues/${e}/accepted-plan-decompositions`),"listAcceptedPlanDecompositions"),createInteraction:o((e,t)=>p.post(`/issues/${e}/interactions`,t),"createInteraction"),acceptInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/accept`,n??{}),"acceptInteraction"),rejectInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/reject`,n?{reason:n}:{}),"rejectInteraction"),cancelInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/cancel`,n?{reason:n}:{}),"cancelInteraction"),skipInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/skip`,n?{reason:n}:{}),"skipInteraction"),respondToInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/respond`,n),"respondToInteraction"),submitInteractionVerdicts:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/verdicts`,{verdicts:n}),"submitInteractionVerdicts"),getComment:o((e,t)=>p.get(`/issues/${e}/comments/${t}`),"getComment"),listFeedbackVotes:o(e=>p.get(`/issues/${e}/feedback-votes`),"listFeedbackVotes"),getCostSummary:o((e,t={})=>{const n=t.excludeRoot?"?excludeRoot=true":"";return p.get(`/issues/${e}/cost-summary${n}`)},"getCostSummary"),listFeedbackTraces:o((e,t)=>{const n=new URLSearchParams;for(const[a,s]of Object.entries(t??{}))s!==void 0&&n.set(a,String(s));const r=n.toString();return p.get(`/issues/${e}/feedback-traces${r?`?${r}`:""}`)},"listFeedbackTraces"),upsertFeedbackVote:o((e,t)=>p.post(`/issues/${e}/feedback-votes`,t),"upsertFeedbackVote"),addComment:o((e,t,n,r,a,s)=>gt(p.post(`/issues/${e}/comments`,{body:t,...s?{clientRequestId:s}:{},...n===void 0?{}:{reopen:n},...r===void 0?{}:{interrupt:r},...a?.length?{attachmentIds:a}:{}}),pt),"addComment"),cancelComment:o((e,t)=>p.delete(`/issues/${e}/comments/${t}?mode=cancel`),"cancelComment"),deleteComment:o((e,t)=>p.delete(`/issues/${e}/comments/${t}`),"deleteComment"),listDocuments:o((e,t)=>p.get(`/issues/${e}/documents${t?.includeSystem?"?includeSystem=true":""}`),"listDocuments"),getDocument:o((e,t)=>p.get(`/issues/${e}/documents/${encodeURIComponent(t)}`),"getDocument"),getDocumentPdf:o((e,t)=>p.getBlob(`/issues/${e}/documents/${encodeURIComponent(t)}/pdf`),"getDocumentPdf"),upsertDocument:o((e,t,n)=>p.put(`/issues/${e}/documents/${encodeURIComponent(t)}`,n),"upsertDocument"),lockDocument:o((e,t)=>p.post(`/issues/${e}/documents/${encodeURIComponent(t)}/lock`,{}),"lockDocument"),unlockDocument:o((e,t)=>p.post(`/issues/${e}/documents/${encodeURIComponent(t)}/unlock`,{}),"unlockDocument"),listDocumentRevisions:o((e,t)=>p.get(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions`),"listDocumentRevisions"),restoreDocumentRevision:o((e,t,n)=>p.post(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions/${n}/restore`,{}),"restoreDocumentRevision"),deleteDocument:o((e,t)=>p.delete(`/issues/${e}/documents/${encodeURIComponent(t)}`),"deleteDocument"),listAttachments:o(e=>p.get(`/issues/${e}/attachments`),"listAttachments"),uploadAttachment:o((e,t,n,r)=>{const a=new FormData;return a.append("file",n),r&&a.append("issueCommentId",r),p.postForm(`/companies/${e}/issues/${t}/attachments`,a)},"uploadAttachment"),deleteAttachment:o(e=>p.delete(`/attachments/${e}`),"deleteAttachment"),listApprovals:o(e=>p.get(`/issues/${e}/approvals`),"listApprovals"),linkApproval:o((e,t)=>p.post(`/issues/${e}/approvals`,{approvalId:t}),"linkApproval"),unlinkApproval:o((e,t)=>p.delete(`/issues/${e}/approvals/${t}`),"unlinkApproval"),listWorkProducts:o((e,t)=>p.get(`/issues/${e}/work-products${t?.refreshPullRequests?"?refreshPullRequests=true":""}`),"listWorkProducts"),ensureWorkProductReviewDocument:o((e,t)=>p.post(`/issues/${e}/work-products/${t}/review-document`,{}),"ensureWorkProductReviewDocument"),createWorkProduct:o((e,t)=>p.post(`/issues/${e}/work-products`,t),"createWorkProduct"),updateWorkProduct:o((e,t)=>p.patch(`/work-products/${e}`,t),"updateWorkProduct"),deleteWorkProduct:o(e=>p.delete(`/work-products/${e}`),"deleteWorkProduct")};function V(e){return new Date(e).getTime()}o(V,"toTimestamp");function xa(){const e=globalThis.crypto?.randomUUID?.();return e?`optimistic-${e}`:`optimistic-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}o(xa,"createOptimisticCommentId");function Ve(e){return[...e].sort((t,n)=>{const r=V(t.createdAt)-V(n.createdAt);return r!==0?r:t.id.localeCompare(n.id)})}o(Ve,"sortIssueComments");function vt(e){return Ve(e).reverse()}o(vt,"sortIssueCommentsDesc");function Os(e){const t=new Date,n=xa();return{id:n,clientId:n,companyId:e.companyId,issueId:e.issueId,authorType:"user",authorAgentId:null,authorUserId:e.authorUserId,body:e.body,presentation:null,metadata:null,clientStatus:e.clientStatus??"pending",queueTargetRunId:e.queueTargetRunId??null,createdAt:t,updatedAt:t}}o(Os,"createOptimisticIssueComment");function Ns(e){return e.runId||e.interruptedRunId||e.comment.id&&(e.comment.id===e.activeRunWakeCommentId||e.comment.id===e.activeRunCommentId)||e.comment.authorAgentId&&e.activeRunAgentId&&e.comment.authorAgentId===e.activeRunAgentId?!1:e.comment.clientStatus==="queued"?!0:e.activeRunStartedAt?V(e.comment.createdAt)>=V(e.activeRunStartedAt):!1}o(Ns,"isQueuedIssueComment");function Us(e,t){const n=t.queuedTargetRunId??null;return!n||!t.targetRunIsLive||t.runningRunId&&t.runningRunId!==n?e:{...e,clientStatus:"queued",queueState:"queued",queueTargetRunId:n}}o(Us,"applyLocalQueuedIssueCommentState");function Ms(e,t){const n=e??[],r=[...n],a=new Set(r.map(i=>i.id)),s=new Set;for(const i of t){if(a.has(i.id))continue;const l=n.find(c=>!s.has(c.id)&&c.issueId===i.issueId&&c.authorType===i.authorType&&c.authorUserId===i.authorUserId&&c.body===i.body&&Math.abs(V(c.createdAt)-V(i.createdAt))<=6e4);if(l){s.add(l.id);const c={...l,clientId:i.clientId};r[r.findIndex(d=>d.id===l.id)]=c;continue}r.push(i)}return Ve(r)}o(Ms,"mergeIssueComments");function js(e,t){const n=e.findIndex(r=>r.clientId===t);return n===-1?{comments:e,comment:null}:{comments:e.filter(r=>r.clientId!==t),comment:e[n]??null}}o(js,"takeOptimisticIssueComment");function Fs(e){return Ve((e??[]).flatMap(t=>t))}o(Fs,"flattenIssueCommentPages");function Ea(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}o(Ea,"getNextIssueCommentPageParam");function wt(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}o(wt,"getNextPageCursor");async function Bs(e){const t=(e.pages??[]).map(i=>[...i]),n=e.pageParams?[...e.pageParams].slice(0,t.length):t.map(()=>null);for(;n.length<t.length;)n.push(null);if(e.pageSize<=0)return{pages:t,pageParams:n};let r=wt(t[t.length-1],e.pageSize);const a=Math.max(0,e.maxPages??Number.POSITIVE_INFINITY),s=new Set;for(;r&&!s.has(r)&&s.size<a;){s.add(r);const i=[...await e.fetchPage(r)];t.push(i),n.push(r),r=wt(i,e.pageSize)}return{pages:t,pageParams:n}}o(Bs,"loadRemainingIssueCommentPages");function Hs(e){return e.activeDetailTab!=="chat"||!e.hasOlderComments||e.initialPageLoading||e.olderPageLoading||e.loadedCommentCount===0?!1:e.loadedCommentCount<e.autoLoadLimit}o(Hs,"shouldAutoloadOlderIssueComments");function Ws(e,t){if(!e)return e;const n={...e};return t.reopen===!0&&(e.status==="done"||e.status==="cancelled"||e.status==="blocked")&&(n.status="todo"),t.reassignment&&(n.assigneeAgentId=t.reassignment.assigneeAgentId,n.assigneeUserId=t.reassignment.assigneeUserId),n}o(Ws,"applyOptimisticIssueCommentUpdate");function ba(e,t){if(!e)return e;const n={...e,updatedAt:new Date},r=o(s=>Object.prototype.hasOwnProperty.call(t,s),"hasOwn"),a=o(s=>{r(s)&&(n[s]=t[s])},"assign");if(a("status"),a("priority"),a("assigneeAgentId"),a("assigneeUserId"),a("projectId"),a("parentId"),a("projectWorkspaceId"),a("executionWorkspaceId"),a("executionWorkspacePreference"),a("executionWorkspaceSettings"),a("hiddenAt"),r("labelIds")&&Array.isArray(t.labelIds)){const s=t.labelIds.filter(i=>typeof i=="string");n.labelIds=s,e.labels&&(n.labels=e.labels.filter(i=>s.includes(i.id)))}if(r("blockedByIssueIds")&&Array.isArray(t.blockedByIssueIds)&&e.blockedBy){const s=new Set(t.blockedByIssueIds.filter(i=>typeof i=="string"));n.blockedBy=e.blockedBy.filter(i=>s.has(i.id))}return r("projectId")&&(n.project=e.project?.id===n.projectId?e.project:null),r("parentId")&&(n.ancestors=void 0),r("executionWorkspaceId")&&(n.currentExecutionWorkspace=e.currentExecutionWorkspace?.id===n.executionWorkspaceId?e.currentExecutionWorkspace:null),n}o(ba,"applyOptimisticIssueFieldUpdate");function Ca(e,t){const n=t instanceof Set?t:new Set(t);return n.has(e.id)||!!e.identifier&&n.has(e.identifier)}o(Ca,"matchesIssueRef$1");function qs(e,t,n){if(!e)return e;let r=!1;const a=e.map(s=>Ca(s,t)?(r=!0,ba(s,n)??s):s);return r?a:e}o(qs,"applyOptimisticIssueFieldUpdateToCollection");function zs(e,t){if(!e||e.length===0)return[[t]];const n=e.map(r=>[...r]);for(let r=0;r<n.length;r+=1){const a=n[r].findIndex(s=>s.id===t.id);if(a!==-1)return n[r][a]=t,n[r]=vt(n[r]),n}return n[0]=vt([...n[0],t]),n}o(zs,"upsertIssueCommentInPages");function Qs(e,t){return!e||e.length===0?[]:e.map(n=>n.filter(r=>r.id!==t)).filter(n=>n.length>0)}o(Qs,"removeIssueCommentFromPages");var ka=["issues","detail"],cn=6e4,$a=3e4;function re(e){return typeof e=="string"&&e.length>0}o(re,"isNonEmptyString");function dn(e,t){const n=new Set;return re(e)&&n.add(e),re(t?.id)&&n.add(t.id),re(t?.identifier)&&n.add(t.identifier),Array.from(n)}o(dn,"collectIssueRefs");function Pa(e,t){const n=t instanceof Set?t:new Set(t);return n.has(e.id)||!!e.identifier&&n.has(e.identifier)}o(Pa,"matchesIssueRef");function Ie(e){if(typeof e!="object"||e===null)return!1;const t=e;return re(t.id)&&re(t.companyId)&&typeof t.title=="string"&&typeof t.status=="string"&&typeof t.workMode=="string"&&typeof t.priority=="string"&&(t.projectId===null||typeof t.projectId=="string")&&(t.parentId===null||typeof t.parentId=="string")&&(t.identifier===null||typeof t.identifier=="string")&&(t.description===null||typeof t.description=="string")&&(t.assigneeAgentId===null||typeof t.assigneeAgentId=="string")&&(t.assigneeUserId===null||typeof t.assigneeUserId=="string")&&(t.executionRunId===null||typeof t.executionRunId=="string")&&(t.issueNumber===null||typeof t.issueNumber=="number")&&typeof t.requestDepth=="number"&&t.createdAt!=null&&t.updatedAt!=null}o(Ie,"isCompleteIssueSnapshot");function It(e,t){return e?{...e,...t}:t}o(It,"mergeIssueSnapshots");function fn(e,t,n){const r=dn(t,n);for(const a of r){const s=e.getQueryData(ie.issues.detail(a));if(Ie(s))return s}return e.getQueriesData({queryKey:ka}).map(([,a])=>a).find(a=>Ie(a)&&Pa(a,r))}o(fn,"getCachedIssueDetail");function mn(e,t,n){if(!Ie(t))return t;const r=dn(n?.issueRef,t),a=It(fn(e,n?.issueRef,t),t);for(const s of r)e.setQueryData(ie.issues.detail(s),i=>It(i,a));return a}o(mn,"seedIssueDetailCache");async function hn(e,t,n){return mn(e,n?await K.get(t,n):await K.get(t),{issueRef:t})}o(hn,"fetchIssueDetail");function La(e,t,n){return{queryKey:ie.issues.detail(t),queryFn:o(({signal:r})=>hn(e,t,{signal:r}),"queryFn"),placeholderData:fn(e,t,n?.placeholderIssue??void 0)}}o(La,"getIssueDetailQueryOptions");function Aa(e,t,n){return Ie(n?.issue)&&mn(e,n.issue,{issueRef:t}),e.prefetchQuery({queryKey:ie.issues.detail(t),queryFn:o(()=>hn(e,t),"queryFn"),staleTime:cn})}o(Aa,"prefetchIssueDetail");function Da(e,t){return e.prefetchInfiniteQuery({queryKey:ie.issues.comments(t),queryFn:o(({pageParam:n})=>K.listComments(t,{order:"desc",limit:50,...n?{after:n}:{}}),"queryFn"),initialPageParam:null,getNextPageParam:o(n=>Ea(n,50),"getNextPageParam"),staleTime:$a,pages:1})}o(Da,"prefetchIssueComments");function _a(e,t,n){return Promise.all([Aa(e,t,n),Da(e,t)])}o(_a,"prefetchIssueDetailForNavigation");var Ta=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Oa=Re("box",Ta),Na=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],Ua=Re("briefcase",Na),Ma=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]],ja=Re("compass",Ma),Fa=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Ba=Re("layers",Fa),Rt={folder:yr,rocket:cr,code:On,terminal:ir,database:Mn,globe:mr,package:sr,boxes:Fn,box:Oa,layers:Ba,briefcase:Ua,compass:ja,target:Qn,flame:fr,zap:lr,star:ar,bug:er,wrench:or,hammer:Jn,lightbulb:zn,sparkles:ur,shield:Kn,lock:Gn,search:nr,cog:tr,brain:jn,cpu:Bn,"git-branch":Wn,"file-code":qn,puzzle:Yn,gem:Nn,atom:Hn,heart:hr,mail:Xn,"message-square":rr,crown:Un,radar:Vn,telescope:Zn,hexagon:dr},Ha="folder";function Wa(e){return e&&$n.includes(e)?Rt[e]:Rt[Ha]}o(Wa,"getProjectIcon");var x=bt(kn(),1),qa={xs:{box:"h-4 w-4 rounded-sm",icon:"h-2.5 w-2.5"},sm:{box:"h-6 w-6 rounded-md",icon:"h-3.5 w-3.5"},md:{box:"h-7 w-7 rounded-lg",icon:"h-4 w-4"},lg:{box:"h-9 w-9 rounded-lg",icon:"h-5 w-5"}};function za({color:e,icon:t,size:n="md",className:r}){const a=qa[n],s=!!e,i=Wa(t);return(0,x.jsx)("span",{"aria-hidden":!0,className:Be("inline-flex shrink-0 items-center justify-center",a.box,s?"text-white":"bg-muted text-muted-foreground",r),style:s?{backgroundColor:e??void 0}:void 0,children:(0,x.jsx)(i,{className:a.icon})})}o(za,"ProjectTile");var ae=null,Fe=new Set;function pn(){for(const e of Fe)e()}o(pn,"emitQuicklookChange");function St(e){ae!==e&&(ae=e,pn())}o(St,"openQuicklookId");function xt(e){ae===e&&(ae=null,pn())}o(xt,"closeQuicklookId");function Qa(e){return Fe.add(e),()=>{Fe.delete(e)}}o(Qa,"subscribeQuicklook");function Ja(e){return u.useSyncExternalStore(Qa,()=>ae===e,()=>!1)}o(Ja,"useIsQuicklookOpen");var Ka=120,Va=13,Ya="w-72 p-3";function Ga(e="start"){return e==="start"?-13:e==="end"?Va:0}o(Ga,"quicklookAlignOffset");function Xa(e){if(!e)return null;const t=e.replace(/!\[[^\]]*]\([^)]+\)/g," ").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[#>*_`~-]+/g," ").replace(/\s+/g," ").trim();return t?t.length>180?`${t.slice(0,177).trimEnd()}...`:t:null}o(Xa,"summarizeIssueDescription");function Za({className:e}){return(0,x.jsx)("span",{className:Be("text-xs",e),"aria-hidden":!0,children:"·"})}o(Za,"QuicklookSeparator");function es(e){const t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}o(es,"statusLabel");function ts({issue:e,linkTo:t,linkState:n,compact:r=!1}){const a=(0,u.useMemo)(()=>Xa(e.description),[e.description]),s=e.project?.name;return(0,x.jsxs)("div",{className:Be("space-y-2",r&&"space-y-1.5"),children:[(0,x.jsxs)("div",{className:"flex items-center gap-1",children:[(0,x.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1",children:[(0,x.jsx)(wr,{status:e.status,size:"md",title:es(e.status)}),(0,x.jsx)("span",{className:"shrink-0 font-mono text-(length:--text-micro) text-muted-foreground",children:e.identifier??e.id.slice(0,8)}),s?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Za,{className:"shrink-0 text-muted-foreground"}),(0,x.jsxs)("span",{className:"flex min-w-0 max-w-(--sz-12rem) flex-1 items-center gap-1 text-(length:--text-micro) text-muted-foreground",title:s,"data-testid":"quicklook-project",children:[(0,x.jsx)(za,{size:"xs"}),(0,x.jsx)("span",{className:"truncate",children:s})]})]}):null]}),(0,x.jsx)("span",{className:"shrink-0 text-(length:--text-micro) text-muted-foreground",children:pa(new Date(e.updatedAt))})]}),(0,x.jsx)(ce,{to:t,state:n??sn(null,e),className:"block text-sm font-medium leading-snug hover:underline line-clamp-2",children:e.title}),a?(0,x.jsx)("p",{className:"text-xs leading-5 text-muted-foreground [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:4] overflow-hidden",children:a}):null]})}o(ts,"IssueQuicklookCard");var ns=u.forwardRef(o(function({issuePathId:t,to:n,children:r,className:a,state:s,disableIssueQuicklook:i=!1,issuePrefetch:l=null,issueQuicklookSide:c="top",issueQuicklookAlign:d="start",onClick:m,onClickCapture:f,onMouseEnter:g,onFocus:v,onBlur:w,onTouchStart:y,...h},I){const R=Ln(),S=u.useMemo(()=>Symbol("issue-quicklook"),[]),k=Ja(S),E=u.useRef(null),$=u.useRef(null),A=u.useRef(null),N=u.useCallback(b=>{$.current=b,typeof I=="function"?I(b):I&&(I.current=b)},[I]),P=u.useCallback(()=>{E.current&&(clearTimeout(E.current),E.current=null)},[]),M=u.useCallback(()=>{P(),St(S)},[P,S]),Q=u.useCallback(()=>{P(),E.current=setTimeout(()=>{E.current=null,St(S)},Ka)},[P,S]),T=u.useCallback(()=>{P(),xt(S)},[P,S]);u.useEffect(()=>()=>{P(),xt(S)},[P,S]),u.useEffect(()=>{if(!k)return;const b=12,Xe=o((q,te,J)=>{if(!q)return!1;const W=q.getBoundingClientRect();return te>=W.left-b&&te<=W.right+b&&J>=W.top-b&&J<=W.bottom+b},"nearBox"),bn=o((q,te)=>{const J=$.current,W=A.current;if(J?.matches(":hover")||W?.matches(":hover")||Xe(J,q,te)||Xe(W,q,te))return!0;const Pe=document.activeElement;return J===Pe||!!W&&!!Pe&&W.contains(Pe)},"stillEngaged"),Ze=o(q=>{bn(q.clientX,q.clientY)||T()},"onPointerMove");return document.addEventListener("pointermove",Ze,{passive:!0}),()=>document.removeEventListener("pointermove",Ze)},[k,T]);const H=l?sn(s,l):s,{data:j,isLoading:F}=_n({...La(R,t,{placeholderIssue:l??void 0}),enabled:k,staleTime:cn}),En=Ra(t),ee=u.useCallback(()=>{_a(R,t,{issue:l})},[t,l,R]),Ge=(0,x.jsx)(ce,{ref:N,to:n,state:H,className:a,onMouseEnter:o(b=>{ee(),g?.(b)},"onMouseEnter"),onFocus:o(b=>{ee(),M(),v?.(b)},"onFocus"),onBlur:o(b=>{setTimeout(()=>T(),0),w?.(b)},"onBlur"),onTouchStart:o(b=>{ee(),y?.(b)},"onTouchStart"),onClickCapture:o(b=>{ee(),f?.(b)},"onClickCapture"),onClick:o(b=>{T(),m?.(b)},"onClick"),...h,children:r});return i?Ge:(0,x.jsxs)(vr,{open:k,onOpenChange:o(b=>b?M():T(),"onOpenChange"),children:[(0,x.jsx)(gr,{asChild:!0,onMouseEnter:o(()=>{ee(),Q()},"onMouseEnter"),onMouseLeave:T,children:Ge}),(0,x.jsx)(pr,{ref:A,"data-quicklook":!0,className:Ya,side:c,align:d,alignOffset:Ga(d),onMouseEnter:M,onMouseLeave:T,onOpenAutoFocus:o(b=>b.preventDefault(),"onOpenAutoFocus"),onCloseAutoFocus:o(b=>b.preventDefault(),"onCloseAutoFocus"),children:j?(0,x.jsx)(ts,{issue:j,linkTo:En,linkState:H,compact:!0}):(0,x.jsxs)("div",{className:"space-y-2",children:[(0,x.jsx)("div",{className:"h-4 w-24 rounded bg-accent/50"}),(0,x.jsx)("div",{className:"h-4 w-full rounded bg-accent/40"}),(0,x.jsx)("div",{className:"h-4 w-3/4 rounded bg-accent/30"}),F?null:(0,x.jsx)("p",{className:"text-xs text-muted-foreground",children:"Unable to load task preview."})]})})]})},"IssueLinkQuicklookImpl")),gn=new Set(["dashboard","companies","company","skills","teams-catalog","org","agents","chats","apps","projects","workspaces","execution-workspaces","issues","tasks","routines","goals","artifacts","tools","approvals","costs","usage","activity","audit","decisions","inbox","board-chat","artifacts","u","design-guide","search","settings","timeline"]),Ye=new Set(["auth","invite","board-claim","cli-auth","docs","instance"]);function se(e){return e.trim().toUpperCase()}o(se,"normalizeCompanyPrefix");function yn(e){const t=e.match(/^([^?#]*)(\?[^#]*)?(#.*)?$/);return{pathname:t?.[1]??e,search:t?.[2]??"",hash:t?.[3]??""}}o(yn,"splitPath");function rs(e){return e.split("/").filter(Boolean)[0]??null}o(rs,"getRootSegment");function os(e){if(e==="/")return!0;const t=rs(e);return t?Ye.has(t.toLowerCase()):!0}o(os,"isGlobalPath");function vn(e){const t=e.split("/").filter(Boolean);if(t.length===0)return null;const n=t[0].toLowerCase();return Ye.has(n)||gn.has(n)?null:se(t[0])}o(vn,"extractCompanyPrefixFromPath");function Et(e,t){const{pathname:n,search:r,hash:a}=yn(e);if(!n.startsWith("/")||os(n)||!t)return e;const s=se(t);return vn(n)?e:`/${s}${n}${r}${a}`}o(Et,"applyCompanyPrefix");function as(e,...t){const n=["cases",...t].filter(Boolean).join("/");return e?`/${se(e)}/${n}`:`/${n}`}o(as,"caseHref");function Js(e){const{pathname:t,search:n,hash:r}=yn(e),a=t.split("/").filter(Boolean);if(a.length>=2){const s=a[1].toLowerCase();if(!Ye.has(a[0].toLowerCase())&&gn.has(s))return`/${a.slice(1).join("/")}${n}${r}`}return`${t}${n}${r}`}o(Js,"toCompanyRelativePath");var wn=/^[A-Z][A-Z0-9]*-\d+$/i,ss=/^issue:\/\/:?([^?#\s]+)(?:[?#].*)?$/i,is=/issue:\/\/:?[^\s<>()]+|https?:\/\/[^\s<>()]+|\/(?:[^\s<>()/]+\/)*issues\/[A-Z][A-Z0-9]*-\d+(?=$|[\s<>)\],.;!?:])|\b[A-Z][A-Z0-9]*-\d+\b/gi;function In(e){if(!e)return null;const t=e.trim();if(!t||/^https?:\/\//i.test(t))return null;const n=t.split("/").filter(Boolean),r=n.findIndex(s=>s==="issues");if(r===-1||r===n.length-1)return null;const a=decodeURIComponent(n[r+1]??"");return!a||a.startsWith(":")?null:wn.test(a)?a.toUpperCase():a}o(In,"parseIssuePathIdFromPath");function Rn(e,t){if(!e)return null;const n=e.trim(),r=n.match(ss);if(r?.[1]){const i=decodeURIComponent(r[1]);return{issuePathId:i,href:`/issues/${encodeURIComponent(i)}`}}const a=In(e);if(a)return{issuePathId:a,href:`/issues/${encodeURIComponent(a)}`};if(!wn.test(n))return null;const s=n.toUpperCase();if(t&&t.size>0){const i=s.split("-")[0];if(!i||!t.has(i))return null}return{issuePathId:s,href:`/issues/${encodeURIComponent(s)}`}}o(Rn,"parseIssueReferenceFromHref");function us(e){let t=e,n="";for(;t.length>0;){const r=t.at(-1);if(!r||!/[),.;!?:\]]/.test(r))break;if(r===")"){const a=(t.match(/\(/g)??[]).length;if((t.match(/\)/g)??[]).length<=a)break}if(r==="]"){const a=(t.match(/\[/g)??[]).length;if((t.match(/\]/g)??[]).length<=a)break}n=`${r}${n}`,t=t.slice(0,-1)}return{core:t,trailing:n}}o(us,"splitTrailingPunctuation");function Sn(e,t,n="text"){return{type:"link",url:t,children:[{type:n,value:e}]}}o(Sn,"createIssueLinkNode");function ls(e,t){const n=[];let r=0,a=!1;for(const s of e.matchAll(is)){const i=s[0];if(!i)continue;const l=s.index??0,c=l+i.length,{core:d,trailing:m}=us(i),f=Rn(d,t);f&&(a=!0,l>r&&n.push({type:"text",value:e.slice(r,l)}),n.push(Sn(d,f.href)),m&&n.push({type:"text",value:m}),r=c)}return a?(r<e.length&&n.push({type:"text",value:e.slice(r)}),n):null}o(ls,"linkifyIssueReferencesInText");function xn(e,t){if(!Array.isArray(e.children)||e.children.length===0||e.type==="link"||e.type==="linkReference"||e.type==="code"||e.type==="definition"||e.type==="html")return;const n=[];for(const r of e.children){if(r.type==="inlineCode"&&typeof r.value=="string"){const a=Rn(r.value,t);if(a){n.push(Sn(r.value,a.href,"inlineCode"));continue}}if(r.type==="text"&&typeof r.value=="string"){const a=ls(r.value,t);if(a){n.push(...a);continue}}xn(r,t),n.push(r)}e.children=n}o(xn,"rewriteMarkdownTree");function Ks(e){const t=e?.knownPrefixes&&e.knownPrefixes.length>0?new Set(e.knownPrefixes.map(n=>n.toUpperCase())):void 0;return n=>{xn(n,t)}}o(Ks,"remarkLinkIssueReferences");function $e(e,t){if(typeof e=="string")return Et(e,t);if(e.pathname&&e.pathname.startsWith("/")){const n=Et(e.pathname,t);if(n!==e.pathname)return{...e,pathname:n}}return e}o($e,"resolveTo");function de(){const{selectedCompany:e}=An(),t=uo(),n=_();if(t.companyPrefix)return se(t.companyPrefix);const r=vn(n.pathname);return r||(e?se(e.issuePrefix):null)}o(de,"useActiveCompanyPrefix");function Vs(){const e=de();return u.useCallback((...t)=>as(e,...t),[e])}o(Vs,"useCaseHref");var Ys=u.forwardRef(o(function({to:t,disableIssueQuicklook:n=!1,issuePrefetch:r=null,issueQuicklookSide:a,issueQuicklookAlign:s,...i},l){const c=$e(t,de()),d=In(typeof c=="string"?c:c.pathname);return d?(0,x.jsx)(ns,{ref:l,to:c,issuePathId:d,disableIssueQuicklook:n,issuePrefetch:r,issueQuicklookSide:a,issueQuicklookAlign:s,...i}):(0,x.jsx)(ce,{ref:l,to:c,...i})},"CompanyLink")),Gs=u.forwardRef(o(function({to:t,...n},r){const a=de();return(0,x.jsx)(Xt,{ref:r,to:$e(t,a),...n})},"CompanyNavLink"));function Xs({to:e,...t}){const n=de();return(0,x.jsx)(Eo,{to:$e(e,n),...t})}o(Xs,"Navigate");function Zs(){const e=xe(),t=de();return u.useCallback(((n,r)=>{if(typeof n=="number"){e(n);return}e($e(n,t),r)}),[e,t])}o(Zs,"useNavigate");export{ce as $,Fs as A,K as B,La as C,ba as D,Ws as E,Ms as F,_s as G,As as H,Qs as I,Sa as J,Ts as K,Hs as L,Ns as M,Bs as N,qs as O,Ca as P,ks as Q,js as R,Oa as S,Us as T,Ls as U,ht as V,Ra as W,sn as X,Ds as Y,pa as Z,Ga as _,Vs as a,xe as at,Ba as b,Ks as c,$s as ct,os as d,Ss as et,se as f,Ya as g,ts as h,de as i,_ as it,Ea as j,Os as k,Et as l,ns as m,Gs as n,xs as nt,Zs as o,Is as ot,Js as p,ya as q,Xs as r,Ps as rt,Rn as s,uo as st,Ys as t,bo as tt,vn as u,za as v,_a as w,ja as x,Rt as y,zs as z};
|
|
15
|
+
`}});if(Tt(e))return u.createElement(lt,{title:"Unhandled Thrown Response!"},u.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let a;if(e instanceof Error)a=e;else{let s=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);a=new Error(s)}return u.createElement(lt,{title:"Application Error!",isOutsideRemixApp:t},u.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),u.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},a.stack),r)}o(ta,"RemixRootDefaultErrorBoundary");function lt({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:a}=z();return a.root?.Layout&&!n?r:u.createElement("html",{lang:"en"},u.createElement("head",null,u.createElement("meta",{charSet:"utf-8"}),u.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),u.createElement("title",null,e)),u.createElement("body",null,u.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},r,t?u.createElement(Zo,null):null)))}o(lt,"BoundaryShell");var na=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{na&&(window.__reactRouterVersion="7.18.2")}catch{}function ks({basename:e,children:t,useTransitions:n,window:r}){let a=u.useRef();a.current==null&&(a.current=Rr({window:r,v5Compat:!0}));let s=a.current,[i,l]=u.useState({action:s.action,location:s.location}),c=u.useCallback(d=>{n===!1?l(d):u.startTransition(()=>l(d))},[n]);return u.useLayoutEffect(()=>s.listen(c),[s,c]),u.createElement(Kt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:s,useTransitions:n})}o(ks,"BrowserRouter");function ra({basename:e,children:t,history:n,useTransitions:r}){let[a,s]=u.useState({action:n.action,location:n.location}),i=u.useCallback(l=>{r===!1?s(l):u.startTransition(()=>s(l))},[r]);return u.useLayoutEffect(()=>n.listen(i),[n,i]),u.createElement(Kt,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:n,useTransitions:r})}o(ra,"HistoryRouter");ra.displayName="unstable_HistoryRouter";var ce=u.forwardRef(o(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:s,replace:i,mask:l,state:c,target:d,to:m,preventScrollReset:f,viewTransition:g,defaultShouldRevalidate:v,...w},y){let{basename:h,navigator:I,useTransitions:R}=u.useContext(L),S=typeof m=="string"&&He.test(m),k=Nt(m,h);m=k.to;let E=oo(m,{relative:a}),$=_(),A=null;if(l){let F=Se(l,[],$.mask?$.mask.pathname:"/",!0);h!=="/"&&(F.pathname=F.pathname==="/"?h:M([h,F.pathname])),A=I.createHref(F)}let[N,P,U]=Qo(r,w),Q=ia(m,{replace:i,mask:l,state:c,target:d,preventScrollReset:f,relative:a,viewTransition:g,defaultShouldRevalidate:v,useTransitions:R});function T(F){t&&t(F),F.defaultPrevented||Q(F)}o(T,"handleClick");let H=!(k.isExternal||s),j=u.createElement("a",{...w,...U,href:(H?A:void 0)||k.absoluteURL||E,onClick:H?T:t,ref:ea(y,P),target:d,"data-discover":!S&&n==="render"?"true":void 0});return N&&!S?u.createElement(u.Fragment,null,j,u.createElement(Ko,{page:E})):j},"LinkWithRef"));ce.displayName="Link";var Xt=u.forwardRef(o(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:s,to:i,viewTransition:l,children:c,...d},m){let f=le(i,{relative:d.relative}),g=_(),v=u.useContext(ue),{navigator:w,basename:y}=u.useContext(L),h=v!=null&&ha(f)&&l===!0,I=w.encodeLocation?w.encodeLocation(f).pathname:f.pathname,R=g.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(R=R.toLowerCase(),S=S?S.toLowerCase():null,I=I.toLowerCase()),S&&y&&(S=B(S,y)||S);const k=I!=="/"&&I.endsWith("/")?I.length-1:I.length;let E=R===I||!a&&R.startsWith(I)&&R.charAt(k)==="/",$=S!=null&&(S===I||!a&&S.startsWith(I)&&S.charAt(I.length)==="/"),A={isActive:E,isPending:$,isTransitioning:h},N=E?t:void 0,P;typeof r=="function"?P=r(A):P=[r,E?"active":null,$?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let U=typeof s=="function"?s(A):s;return u.createElement(ce,{...d,"aria-current":N,className:P,ref:m,style:U,to:i,viewTransition:l},typeof c=="function"?c(A):c)},"NavLinkWithRef"));Xt.displayName="NavLink";var oa=u.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:s,method:i=he,action:l,onSubmit:c,relative:d,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:g,...v},w)=>{let{useTransitions:y}=u.useContext(L),h=ca(),I=da(l,{relative:d}),R=i.toLowerCase()==="get"?"get":"post",S=typeof l=="string"&&He.test(l),k=o(E=>{if(c&&c(E),E.defaultPrevented)return;E.preventDefault();let $=E.nativeEvent.submitter,A=$?.getAttribute("formmethod")||i,N=o(()=>h($||E.currentTarget,{fetcherKey:t,method:A,navigate:n,replace:a,state:s,relative:d,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:g}),"doSubmit");y&&n!==!1?u.startTransition(()=>N()):N()},"submitHandler");return u.createElement("form",{ref:w,method:R,action:I,onSubmit:r?c:k,...v,"data-discover":!S&&e==="render"?"true":void 0})});oa.displayName="Form";function aa({getKey:e,storageKey:t,...n}){let r=u.useContext(ke),{basename:a}=u.useContext(L),s=_(),i=Qt();fa({getKey:e,storageKey:t});let l=u.useMemo(()=>{if(!r||!e)return null;let d=Ue(s,i,a,e);return d!==s.key?d:null},[]);if(!r||r.isSpaMode)return null;let c=((d,m)=>{if(!window.history.state||!window.history.state.key){let f=Math.random().toString(32).slice(2);window.history.replaceState({key:f},"")}try{let f=JSON.parse(sessionStorage.getItem(d)||"{}")[m||window.history.state.key];typeof f=="number"&&window.scrollTo(0,f)}catch{sessionStorage.removeItem(d)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),u.createElement("script",{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${it(JSON.stringify(t||Me))}, ${it(JSON.stringify(l))})`}})}o(aa,"ScrollRestoration");aa.displayName="ScrollRestoration";function Zt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}o(Zt,"getDataRouterConsoleError2");function Ke(e){let t=u.useContext(G);return C(t,Zt(e)),t}o(Ke,"useDataRouterContext3");function sa(e){let t=u.useContext(ue);return C(t,Zt(e)),t}o(sa,"useDataRouterState2");function ia(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:s,relative:i,viewTransition:l,defaultShouldRevalidate:c,useTransitions:d}={}){let m=xe(),f=_(),g=le(e,{relative:i});return u.useCallback(v=>{if(Lo(v,t)){v.preventDefault();let w=n!==void 0?n:oe(f)===oe(g),y=o(()=>m(e,{replace:w,mask:r,state:a,preventScrollReset:s,relative:i,viewTransition:l,defaultShouldRevalidate:c}),"doNavigate");d?u.startTransition(()=>y()):y()}},[f,m,g,n,r,a,t,e,s,i,l,c,d])}o(ia,"useLinkClickHandler");function $s(e){D(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=u.useRef(Ne(e)),n=u.useRef(!1),r=_(),a=u.useMemo(()=>Ao(r.search,n.current?null:t.current),[r.search]),s=xe();return[a,u.useCallback((i,l)=>{const c=Ne(typeof i=="function"?i(new URLSearchParams(a)):i);n.current=!0,s("?"+c,l)},[s,a])]}o($s,"useSearchParams");var ua=0,la=o(()=>`__${String(++ua)}__`,"getUniqueFetcherId");function ca(){let{router:e}=Ke("useSubmit"),{basename:t}=u.useContext(L),n=vo(),r=e.fetch,a=e.navigate;return u.useCallback(async(s,i={})=>{let{action:l,method:c,encType:d,formData:m,body:f}=To(s,t);if(i.navigate===!1){let g=i.fetcherKey||la();await r(g,n,i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:m,body:f,formMethod:i.method||c,formEncType:i.encType||d,flushSync:i.flushSync})}else await a(i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:m,body:f,formMethod:i.method||c,formEncType:i.encType||d,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[r,a,t,n])}o(ca,"useSubmit");function da(e,{relative:t}={}){let{basename:n}=u.useContext(L),r=u.useContext(O);C(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),s={...le(e||".",{relative:t})},i=_();if(e==null){s.search=i.search;let l=new URLSearchParams(s.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(m=>m).forEach(m=>l.append("index",m));let d=l.toString();s.search=d?`?${d}`:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:M([n,s.pathname])),oe(s)}o(da,"useFormAction");var Me="react-router-scroll-positions",me={};function Ue(e,t,n,r){let a=null;return r&&(n!=="/"?a=r({...e,pathname:B(e.pathname,n)||e.pathname},t):a=r(e,t)),a==null&&(a=e.key),a}o(Ue,"getScrollRestorationKey");function fa({getKey:e,storageKey:t}={}){let{router:n}=Ke("useScrollRestoration"),{restoreScrollPosition:r,preventScrollReset:a}=sa("useScrollRestoration"),{basename:s}=u.useContext(L),i=_(),l=Qt(),c=wo();u.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),ma(u.useCallback(()=>{if(c.state==="idle"){let d=Ue(i,l,s,e);me[d]=window.scrollY}try{sessionStorage.setItem(t||Me,JSON.stringify(me))}catch(d){D(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${d}).`)}window.history.scrollRestoration="auto"},[c.state,e,s,i,l,t])),typeof document<"u"&&(u.useLayoutEffect(()=>{try{let d=sessionStorage.getItem(t||Me);d&&(me=JSON.parse(d))}catch{}},[t]),u.useLayoutEffect(()=>{let d=n?.enableScrollRestoration(me,()=>window.scrollY,e?(m,f)=>Ue(m,f,s,e):void 0);return()=>d&&d()},[n,s,e]),u.useLayoutEffect(()=>{if(r!==!1){if(typeof r=="number"){window.scrollTo(0,r);return}try{if(i.hash){let d=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(d){d.scrollIntoView();return}}}catch{D(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}a!==!0&&window.scrollTo(0,0)}},[i,r,a]))}o(fa,"useScrollRestoration");function Ps(e,t){let{capture:n}=t||{};u.useEffect(()=>{let r=n!=null?{capture:n}:void 0;return window.addEventListener("beforeunload",e,r),()=>{window.removeEventListener("beforeunload",e,r)}},[e,n])}o(Ps,"useBeforeUnload");function ma(e,t){let{capture:n}=t||{};u.useEffect(()=>{let r=n!=null?{capture:n}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,n])}o(ma,"usePageHide");function ha(e,{relative:t}={}){let n=u.useContext(Ft);C(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ke("useViewTransitionState"),a=le(e,{relative:t});if(!n.isTransitioning)return!1;let s=B(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=B(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ge(a.pathname,i)!=null||ge(a.pathname,s)!=null}o(ha,"useViewTransitionState");var ct=60,je=3600,we=24*je,dt=7*we,ft=30*we;function pa(e){const t=Date.now(),n=new Date(e).getTime(),r=Math.round((t-n)/1e3);return r<ct?"just now":r<je?`${Math.floor(r/ct)}m ago`:r<we?`${Math.floor(r/je)}h ago`:r<dt?`${Math.floor(r/we)}d ago`:r<ft?`${Math.floor(r/dt)}w ago`:`${Math.floor(r/ft)}mo ago`}o(pa,"timeAgo");var en="from",tn="fromHref",nn="paperclip:issue-detail-breadcrumb:";function rn(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.label=="string"&&typeof t.href=="string"}o(rn,"isIssueDetailBreadcrumb");function on(e){return e==="issues"||e==="inbox"}o(on,"isIssueDetailSource");function an(e){if(typeof e!="object"||e===null)return!1;const t=e,n=t.originKind===void 0||typeof t.originKind=="string",r=t.originId===void 0||t.originId===null||typeof t.originId=="string",a=t.blockerAttention===void 0||typeof t.blockerAttention=="object"&&t.blockerAttention!==null;return typeof t.id=="string"&&(t.identifier===null||typeof t.identifier=="string")&&typeof t.title=="string"&&typeof t.status=="string"&&a&&typeof t.priority=="string"&&(t.projectId===null||typeof t.projectId=="string")&&(t.projectName===null||typeof t.projectName=="string")&&n&&r}o(an,"isIssueDetailHeaderSeed");function ga(e){return{id:e.id,identifier:e.identifier??null,title:e.title,status:e.status,blockerAttention:e.blockerAttention,priority:e.priority,projectId:e.projectId??null,projectName:e.project?.name??null,originKind:e.originKind,originId:e.originId??null}}o(ga,"createIssueDetailHeaderSeed");function sn(e,t){const n=ga(t);return typeof e!="object"||e===null?{issueDetailHeaderSeed:n}:{...e,issueDetailHeaderSeed:n}}o(sn,"withIssueDetailHeaderSeed");function ya(e){if(typeof e!="object"||e===null)return null;const t=e.issueDetailHeaderSeed;return an(t)?t:null}o(ya,"readIssueDetailHeaderSeed");function va(e){if(!e)return null;const t=new URLSearchParams(e).get(en);return on(t)?t:null}o(va,"readIssueDetailSourceFromSearch");function wa(e){if(!e)return null;const t=new URLSearchParams(e).get(tn);return t&&t.startsWith("/")?t:null}o(wa,"readIssueDetailBreadcrumbHrefFromSearch");function un(e,t){return on(e?.issueDetailSource)?e.issueDetailSource:t?t.label==="Inbox"||t.href.includes("/inbox")?"inbox":t.label==="Tasks"||t.href.includes("/issues")?"issues":null:null}o(un,"inferIssueDetailSource");function mt(e){return e==="inbox"?{label:"Inbox",href:"/inbox"}:{label:"Tasks",href:"/issues"}}o(mt,"breadcrumbForSource");function Ls(e,t,n){return{issueDetailBreadcrumb:{label:e,href:t},issueDetailSource:n}}o(Ls,"createIssueDetailLocationState");function As(e){return typeof e!="object"||e===null?{issueDetailInboxQuickArchiveArmed:!0}:{...e,issueDetailInboxQuickArchiveArmed:!0}}o(As,"armIssueDetailInboxQuickArchive");function Ia(e){if(typeof window>"u"||!window.sessionStorage)return null;const t=window.sessionStorage.getItem(`${nn}${e}`);if(!t)return null;try{const n=JSON.parse(t),r=rn(n.issueDetailBreadcrumb)?n.issueDetailBreadcrumb:null,a=un(n,r);if(!r||!a)return null;const s=an(n.issueDetailHeaderSeed)?n.issueDetailHeaderSeed:void 0;return{issueDetailBreadcrumb:r,issueDetailSource:a,issueDetailInboxQuickArchiveArmed:n.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:s}}catch{return null}}o(Ia,"readStoredIssueDetailLocationState");function ln(e,t){if(typeof e=="object"&&e!==null){const a=e.issueDetailBreadcrumb;if(rn(a)){const s=un(e,a);if(!s)return null;const i=ya(e)??void 0;return{issueDetailBreadcrumb:a,issueDetailSource:s,issueDetailInboxQuickArchiveArmed:e.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:i}}}const n=va(t),r=wa(t);return n?{issueDetailBreadcrumb:r?{...mt(n),href:r}:mt(n),issueDetailSource:n,issueDetailInboxQuickArchiveArmed:!1}:null}o(ln,"normalizeIssueDetailLocationState");function Ds(e,t,n){if(typeof window>"u"||!window.sessionStorage)return;const r=ln(t,n);r&&window.sessionStorage.setItem(`${nn}${e}`,JSON.stringify(r))}o(Ds,"rememberIssueDetailLocationState");function Ra(e){return`/issues/${e}`}o(Ra,"createIssueDetailPath");function _s(e){if(!e)return!1;const t=new URLSearchParams(e);return t.has(en)||t.has(tn)}o(_s,"hasLegacyIssueDetailQuery");function Sa(e,t,n){const r=ln(t,n);return r||(e?Ia(e):null)}o(Sa,"readIssueDetailLocationState");function Ts(e,t,n){return Sa(e,t,n)?.issueDetailBreadcrumb??null}o(Ts,"readIssueDetailBreadcrumb");var ht=class extends Error{static{o(this,"CommentSubmissionUnknownError")}constructor(){super("We couldn’t confirm whether this comment was saved. Review the conversation before starting another draft."),this.name="CommentSubmissionUnknownError"}};function pt(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e,n=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;return typeof t.id=="string"&&n.test(t.id)&&typeof t.issueId=="string"&&n.test(t.issueId)&&typeof t.body=="string"}o(pt,"hasCommentReceipt");async function gt(e,t){try{const n=await e;if(!t(n))throw new ht;return n}catch(n){throw n instanceof Dn&&n.status<500?n:new ht}}o(gt,"confirmedCommentResponse");function yt(e){const t=new URLSearchParams;return e?.attention&&t.set("attention",e.attention),e?.status&&t.set("status",e.status),e?.projectId&&t.set("projectId",e.projectId),e?.parentId&&t.set("parentId",e.parentId),e?.assigneeAgentId&&t.set("assigneeAgentId",e.assigneeAgentId),e?.participantAgentId&&t.set("participantAgentId",e.participantAgentId),e?.assigneeUserId&&t.set("assigneeUserId",e.assigneeUserId),e?.touchedByUserId&&t.set("touchedByUserId",e.touchedByUserId),e?.inboxArchivedByUserId&&t.set("inboxArchivedByUserId",e.inboxArchivedByUserId),e?.unreadForUserId&&t.set("unreadForUserId",e.unreadForUserId),e?.labelId&&t.set("labelId",e.labelId),e?.workspaceId&&t.set("workspaceId",e.workspaceId),e?.executionWorkspaceId&&t.set("executionWorkspaceId",e.executionWorkspaceId),e?.originKind&&t.set("originKind",e.originKind),e?.originKindPrefix&&t.set("originKindPrefix",e.originKindPrefix),e?.originId&&t.set("originId",e.originId),e?.descendantOf&&t.set("descendantOf",e.descendantOf),e?.createdFromIssueId&&t.set("createdFromIssueId",e.createdFromIssueId),e?.includeRoutineExecutions&&t.set("includeRoutineExecutions","true"),e?.includeBlockedBy&&t.set("includeBlockedBy","true"),e?.includeBlockedInboxAttention&&t.set("includeBlockedInboxAttention","true"),e?.includeLiveDescendantSummary&&t.set("includeLiveDescendantSummary","true"),e?.hasPlanDocument!==void 0&&t.set("hasPlanDocument",e.hasPlanDocument?"true":"false"),e?.q&&t.set("q",e.q),e?.limit&&t.set("limit",String(e.limit)),e?.offset!==void 0&&t.set("offset",String(e.offset)),e?.sortField&&t.set("sortField",e.sortField),e?.sortDir&&t.set("sortDir",e.sortDir),e?.afterId&&t.set("afterId",e.afterId),t}o(yt,"issueListSearchParams");var K={listAll:o(async(e,t,n)=>{const a=new Map;let s;for(;;){const i=await K.list(e,{...t,limit:500,sortField:"id",sortDir:"asc",afterId:s},n);for(const l of i)a.set(l.id,l);if(i.length<500)return[...a.values()];s=i[i.length-1].id}},"listAll"),list:o((e,t,n)=>{const r=yt(t).toString(),a=`/companies/${e}/issues${r?`?${r}`:""}`;return n?p.get(a,n):p.get(a)},"list"),listCompact:o((e,t,n)=>{const r=yt(t);r.set("view","compact");const a=`/companies/${e}/issues?${r.toString()}`;return n?p.get(a,n):p.get(a)},"listCompact"),count:o((e,t)=>{const n=new URLSearchParams;return n.set("attention",t.attention),t.status&&n.set("status",t.status),t.assigneeAgentId&&n.set("assigneeAgentId",t.assigneeAgentId),t.assigneeUserId&&n.set("assigneeUserId",t.assigneeUserId),t.projectId&&n.set("projectId",t.projectId),t.labelId&&n.set("labelId",t.labelId),t.q&&n.set("q",t.q),p.get(`/companies/${e}/issues/count?${n.toString()}`)},"count"),listLabels:o(e=>p.get(`/companies/${e}/labels`),"listLabels"),createLabel:o((e,t)=>p.post(`/companies/${e}/labels`,t),"createLabel"),deleteLabel:o(e=>p.delete(`/labels/${e}`),"deleteLabel"),get:o((e,t)=>t?p.get(`/issues/${e}`,t):p.get(`/issues/${e}`),"get"),getRunnerGoal:o((e,t)=>{const n=t?`?agentId=${encodeURIComponent(t)}`:"";return p.get(`/issues/${e}/runner-goal${n}`)},"getRunnerGoal"),actOnRunnerGoal:o((e,t)=>p.post(`/issues/${e}/runner-goal/actions`,t),"actOnRunnerGoal"),getModelOverride:o(e=>p.get(`/issues/${e}/model-override`),"getModelOverride"),setModelOverride:o((e,t)=>p.put(`/issues/${e}/model-override`,t),"setModelOverride"),getWatchdog:o(e=>p.get(`/issues/${e}/watchdog`),"getWatchdog"),upsertWatchdog:o((e,t)=>p.put(`/issues/${e}/watchdog`,t),"upsertWatchdog"),deleteWatchdog:o(e=>p.delete(`/issues/${e}/watchdog`),"deleteWatchdog"),markRead:o(e=>p.post(`/issues/${e}/read`,{}),"markRead"),markUnread:o(e=>p.delete(`/issues/${e}/read`),"markUnread"),archiveFromInbox:o(e=>p.post(`/issues/${e}/inbox-archive`,{}),"archiveFromInbox"),unarchiveFromInbox:o(e=>p.delete(`/issues/${e}/inbox-archive`),"unarchiveFromInbox"),create:o((e,t)=>p.post(`/companies/${e}/issues`,t),"create"),update:o((e,t)=>{const n=p.patch(`/issues/${e}`,t);return typeof t.comment=="string"?gt(n,r=>pt(r?.comment)):n},"update"),decideStalledReview:o((e,t)=>p.post(`/issues/${e}/stalled-review-decision`,t),"decideStalledReview"),resolveRecoveryAction:o((e,t)=>p.post(`/issues/${e}/recovery-actions/resolve`,t),"resolveRecoveryAction"),previewTreeControl:o((e,t)=>p.post(`/issues/${e}/tree-control/preview`,t),"previewTreeControl"),createTreeHold:o((e,t)=>p.post(`/issues/${e}/tree-holds`,t),"createTreeHold"),getTreeHold:o((e,t)=>p.get(`/issues/${e}/tree-holds/${t}`),"getTreeHold"),listTreeHolds:o((e,t)=>{const n=new URLSearchParams;t?.status&&n.set("status",t.status),t?.mode&&n.set("mode",t.mode),t?.includeMembers&&n.set("includeMembers","true");const r=n.toString();return p.get(`/issues/${e}/tree-holds${r?`?${r}`:""}`)},"listTreeHolds"),getTreeControlState:o(e=>p.get(`/issues/${e}/tree-control/state`),"getTreeControlState"),releaseTreeHold:o((e,t,n)=>p.post(`/issues/${e}/tree-holds/${t}/release`,n),"releaseTreeHold"),checkMonitorNow:o(e=>p.post(`/issues/${e}/monitor/check-now`,{}),"checkMonitorNow"),retryScheduledRetryNow:o(e=>p.post(`/issues/${e}/scheduled-retry/retry-now`,{}),"retryScheduledRetryNow"),remove:o(e=>p.delete(`/issues/${e}`),"remove"),checkout:o((e,t)=>p.post(`/issues/${e}/checkout`,{agentId:t,expectedStatuses:["todo","backlog","blocked","in_review"]}),"checkout"),release:o(e=>p.post(`/issues/${e}/release`,{}),"release"),listComments:o((e,t)=>{const n=new URLSearchParams;t?.after&&n.set("after",t.after),t?.order&&n.set("order",t.order),t?.limit&&n.set("limit",String(t.limit));const r=n.toString();return p.get(`/issues/${e}/comments${r?`?${r}`:""}`)},"listComments"),getQueuedComments:o(e=>p.get(`/issues/${e}/queued-comments`),"getQueuedComments"),editQueuedComment:o((e,t,n)=>p.patch(`/issues/${e}/queued-comments/${t}`,n),"editQueuedComment"),reorderQueuedComments:o((e,t)=>p.put(`/issues/${e}/queued-comments/order`,t),"reorderQueuedComments"),interruptQueuedComments:o((e,t)=>p.post(`/issues/${e}/queued-comments/interrupt`,t),"interruptQueuedComments"),interruptLatestQueuedComments:o(async(e,t)=>{const n=await K.getQueuedComments(e);if(!n.queueId||n.targetRunId&&n.targetRunId!==t)throw new Error("The queued messages changed. Refresh and try again.");return K.interruptQueuedComments(e,{queueId:n.queueId,revision:n.revision,targetRunId:n.targetRunId})},"interruptLatestQueuedComments"),steerQueuedComment:o((e,t,n)=>p.post(`/issues/${e}/queued-comments/${t}/steer`,n),"steerQueuedComment"),discardQueuedComment:o((e,t,n)=>p.delete(`/issues/${e}/queued-comments/${t}`,n),"discardQueuedComment"),listInteractions:o(e=>p.get(`/issues/${e}/interactions`),"listInteractions"),listAcceptedPlanDecompositions:o(e=>p.get(`/issues/${e}/accepted-plan-decompositions`),"listAcceptedPlanDecompositions"),createInteraction:o((e,t)=>p.post(`/issues/${e}/interactions`,t),"createInteraction"),acceptInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/accept`,n??{}),"acceptInteraction"),rejectInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/reject`,n?{reason:n}:{}),"rejectInteraction"),cancelInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/cancel`,n?{reason:n}:{}),"cancelInteraction"),skipInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/skip`,n?{reason:n}:{}),"skipInteraction"),respondToInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/respond`,n),"respondToInteraction"),submitInteractionVerdicts:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/verdicts`,{verdicts:n}),"submitInteractionVerdicts"),getComment:o((e,t)=>p.get(`/issues/${e}/comments/${t}`),"getComment"),listFeedbackVotes:o(e=>p.get(`/issues/${e}/feedback-votes`),"listFeedbackVotes"),getCostSummary:o((e,t={})=>{const n=t.excludeRoot?"?excludeRoot=true":"";return p.get(`/issues/${e}/cost-summary${n}`)},"getCostSummary"),listFeedbackTraces:o((e,t)=>{const n=new URLSearchParams;for(const[a,s]of Object.entries(t??{}))s!==void 0&&n.set(a,String(s));const r=n.toString();return p.get(`/issues/${e}/feedback-traces${r?`?${r}`:""}`)},"listFeedbackTraces"),upsertFeedbackVote:o((e,t)=>p.post(`/issues/${e}/feedback-votes`,t),"upsertFeedbackVote"),addComment:o((e,t,n,r,a,s)=>gt(p.post(`/issues/${e}/comments`,{body:t,...s?{clientRequestId:s}:{},...n===void 0?{}:{reopen:n},...r===void 0?{}:{interrupt:r},...a?.length?{attachmentIds:a}:{}}),pt),"addComment"),cancelComment:o((e,t)=>p.delete(`/issues/${e}/comments/${t}?mode=cancel`),"cancelComment"),deleteComment:o((e,t)=>p.delete(`/issues/${e}/comments/${t}`),"deleteComment"),listDocuments:o((e,t)=>p.get(`/issues/${e}/documents${t?.includeSystem?"?includeSystem=true":""}`),"listDocuments"),getDocument:o((e,t)=>p.get(`/issues/${e}/documents/${encodeURIComponent(t)}`),"getDocument"),getDocumentPdf:o((e,t)=>p.getBlob(`/issues/${e}/documents/${encodeURIComponent(t)}/pdf`),"getDocumentPdf"),upsertDocument:o((e,t,n)=>p.put(`/issues/${e}/documents/${encodeURIComponent(t)}`,n),"upsertDocument"),lockDocument:o((e,t)=>p.post(`/issues/${e}/documents/${encodeURIComponent(t)}/lock`,{}),"lockDocument"),unlockDocument:o((e,t)=>p.post(`/issues/${e}/documents/${encodeURIComponent(t)}/unlock`,{}),"unlockDocument"),listDocumentRevisions:o((e,t)=>p.get(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions`),"listDocumentRevisions"),restoreDocumentRevision:o((e,t,n)=>p.post(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions/${n}/restore`,{}),"restoreDocumentRevision"),deleteDocument:o((e,t)=>p.delete(`/issues/${e}/documents/${encodeURIComponent(t)}`),"deleteDocument"),listAttachments:o(e=>p.get(`/issues/${e}/attachments`),"listAttachments"),uploadAttachment:o((e,t,n,r)=>{const a=new FormData;return a.append("file",n),r&&a.append("issueCommentId",r),p.postForm(`/companies/${e}/issues/${t}/attachments`,a)},"uploadAttachment"),deleteAttachment:o(e=>p.delete(`/attachments/${e}`),"deleteAttachment"),listApprovals:o(e=>p.get(`/issues/${e}/approvals`),"listApprovals"),linkApproval:o((e,t)=>p.post(`/issues/${e}/approvals`,{approvalId:t}),"linkApproval"),unlinkApproval:o((e,t)=>p.delete(`/issues/${e}/approvals/${t}`),"unlinkApproval"),listWorkProducts:o((e,t)=>p.get(`/issues/${e}/work-products${t?.refreshPullRequests?"?refreshPullRequests=true":""}`),"listWorkProducts"),ensureWorkProductReviewDocument:o((e,t)=>p.post(`/issues/${e}/work-products/${t}/review-document`,{}),"ensureWorkProductReviewDocument"),createWorkProduct:o((e,t)=>p.post(`/issues/${e}/work-products`,t),"createWorkProduct"),updateWorkProduct:o((e,t)=>p.patch(`/work-products/${e}`,t),"updateWorkProduct"),deleteWorkProduct:o(e=>p.delete(`/work-products/${e}`),"deleteWorkProduct")};function V(e){return new Date(e).getTime()}o(V,"toTimestamp");function xa(){const e=globalThis.crypto?.randomUUID?.();return e?`optimistic-${e}`:`optimistic-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}o(xa,"createOptimisticCommentId");function Ve(e){return[...e].sort((t,n)=>{const r=V(t.createdAt)-V(n.createdAt);return r!==0?r:t.id.localeCompare(n.id)})}o(Ve,"sortIssueComments");function vt(e){return Ve(e).reverse()}o(vt,"sortIssueCommentsDesc");function Os(e){const t=new Date,n=xa();return{id:n,clientId:n,companyId:e.companyId,issueId:e.issueId,authorType:"user",authorAgentId:null,authorUserId:e.authorUserId,body:e.body,presentation:null,metadata:null,clientStatus:e.clientStatus??"pending",queueTargetRunId:e.queueTargetRunId??null,createdAt:t,updatedAt:t}}o(Os,"createOptimisticIssueComment");function Ns(e){return e.runId||e.interruptedRunId||e.comment.id&&(e.comment.id===e.activeRunWakeCommentId||e.comment.id===e.activeRunCommentId)||e.comment.authorAgentId&&e.activeRunAgentId&&e.comment.authorAgentId===e.activeRunAgentId?!1:e.comment.clientStatus==="queued"?!0:e.activeRunStartedAt?V(e.comment.createdAt)>=V(e.activeRunStartedAt):!1}o(Ns,"isQueuedIssueComment");function Ms(e,t){const n=t.queuedTargetRunId??null;return!n||!t.targetRunIsLive||t.runningRunId&&t.runningRunId!==n?e:{...e,clientStatus:"queued",queueState:"queued",queueTargetRunId:n}}o(Ms,"applyLocalQueuedIssueCommentState");function Us(e,t){const n=e??[],r=[...n],a=new Set(r.map(i=>i.id)),s=new Set;for(const i of t){if(a.has(i.id))continue;const l=n.find(c=>!s.has(c.id)&&c.issueId===i.issueId&&c.authorType===i.authorType&&c.authorUserId===i.authorUserId&&c.body===i.body&&Math.abs(V(c.createdAt)-V(i.createdAt))<=6e4);if(l){s.add(l.id);const c={...l,clientId:i.clientId};r[r.findIndex(d=>d.id===l.id)]=c;continue}r.push(i)}return Ve(r)}o(Us,"mergeIssueComments");function js(e,t){const n=e.findIndex(r=>r.clientId===t);return n===-1?{comments:e,comment:null}:{comments:e.filter(r=>r.clientId!==t),comment:e[n]??null}}o(js,"takeOptimisticIssueComment");function Fs(e){return Ve((e??[]).flatMap(t=>t))}o(Fs,"flattenIssueCommentPages");function Ea(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}o(Ea,"getNextIssueCommentPageParam");function wt(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}o(wt,"getNextPageCursor");async function Bs(e){const t=(e.pages??[]).map(i=>[...i]),n=e.pageParams?[...e.pageParams].slice(0,t.length):t.map(()=>null);for(;n.length<t.length;)n.push(null);if(e.pageSize<=0)return{pages:t,pageParams:n};let r=wt(t[t.length-1],e.pageSize);const a=Math.max(0,e.maxPages??Number.POSITIVE_INFINITY),s=new Set;for(;r&&!s.has(r)&&s.size<a;){s.add(r);const i=[...await e.fetchPage(r)];t.push(i),n.push(r),r=wt(i,e.pageSize)}return{pages:t,pageParams:n}}o(Bs,"loadRemainingIssueCommentPages");function Hs(e){return e.activeDetailTab!=="chat"||!e.hasOlderComments||e.initialPageLoading||e.olderPageLoading||e.loadedCommentCount===0?!1:e.loadedCommentCount<e.autoLoadLimit}o(Hs,"shouldAutoloadOlderIssueComments");function Ws(e,t){if(!e)return e;const n={...e};return t.reopen===!0&&(e.status==="done"||e.status==="cancelled"||e.status==="blocked")&&(n.status="todo"),t.reassignment&&(n.assigneeAgentId=t.reassignment.assigneeAgentId,n.assigneeUserId=t.reassignment.assigneeUserId),n}o(Ws,"applyOptimisticIssueCommentUpdate");function ba(e,t){if(!e)return e;const n={...e,updatedAt:new Date},r=o(s=>Object.prototype.hasOwnProperty.call(t,s),"hasOwn"),a=o(s=>{r(s)&&(n[s]=t[s])},"assign");if(a("status"),a("priority"),a("assigneeAgentId"),a("assigneeUserId"),a("projectId"),a("parentId"),a("projectWorkspaceId"),a("executionWorkspaceId"),a("executionWorkspacePreference"),a("executionWorkspaceSettings"),a("hiddenAt"),r("labelIds")&&Array.isArray(t.labelIds)){const s=t.labelIds.filter(i=>typeof i=="string");n.labelIds=s,e.labels&&(n.labels=e.labels.filter(i=>s.includes(i.id)))}if(r("blockedByIssueIds")&&Array.isArray(t.blockedByIssueIds)&&e.blockedBy){const s=new Set(t.blockedByIssueIds.filter(i=>typeof i=="string"));n.blockedBy=e.blockedBy.filter(i=>s.has(i.id))}return r("projectId")&&(n.project=e.project?.id===n.projectId?e.project:null),r("parentId")&&(n.ancestors=void 0),r("executionWorkspaceId")&&(n.currentExecutionWorkspace=e.currentExecutionWorkspace?.id===n.executionWorkspaceId?e.currentExecutionWorkspace:null),n}o(ba,"applyOptimisticIssueFieldUpdate");function Ca(e,t){const n=t instanceof Set?t:new Set(t);return n.has(e.id)||!!e.identifier&&n.has(e.identifier)}o(Ca,"matchesIssueRef$1");function qs(e,t,n){if(!e)return e;let r=!1;const a=e.map(s=>Ca(s,t)?(r=!0,ba(s,n)??s):s);return r?a:e}o(qs,"applyOptimisticIssueFieldUpdateToCollection");function zs(e,t){if(!e||e.length===0)return[[t]];const n=e.map(r=>[...r]);for(let r=0;r<n.length;r+=1){const a=n[r].findIndex(s=>s.id===t.id);if(a!==-1)return n[r][a]=t,n[r]=vt(n[r]),n}return n[0]=vt([...n[0],t]),n}o(zs,"upsertIssueCommentInPages");function Qs(e,t){return!e||e.length===0?[]:e.map(n=>n.filter(r=>r.id!==t)).filter(n=>n.length>0)}o(Qs,"removeIssueCommentFromPages");var ka=["issues","detail"],cn=6e4,$a=3e4;function re(e){return typeof e=="string"&&e.length>0}o(re,"isNonEmptyString");function dn(e,t){const n=new Set;return re(e)&&n.add(e),re(t?.id)&&n.add(t.id),re(t?.identifier)&&n.add(t.identifier),Array.from(n)}o(dn,"collectIssueRefs");function Pa(e,t){const n=t instanceof Set?t:new Set(t);return n.has(e.id)||!!e.identifier&&n.has(e.identifier)}o(Pa,"matchesIssueRef");function Ie(e){if(typeof e!="object"||e===null)return!1;const t=e;return re(t.id)&&re(t.companyId)&&typeof t.title=="string"&&typeof t.status=="string"&&typeof t.workMode=="string"&&typeof t.priority=="string"&&(t.projectId===null||typeof t.projectId=="string")&&(t.parentId===null||typeof t.parentId=="string")&&(t.identifier===null||typeof t.identifier=="string")&&(t.description===null||typeof t.description=="string")&&(t.assigneeAgentId===null||typeof t.assigneeAgentId=="string")&&(t.assigneeUserId===null||typeof t.assigneeUserId=="string")&&(t.executionRunId===null||typeof t.executionRunId=="string")&&(t.issueNumber===null||typeof t.issueNumber=="number")&&typeof t.requestDepth=="number"&&t.createdAt!=null&&t.updatedAt!=null}o(Ie,"isCompleteIssueSnapshot");function It(e,t){return e?{...e,...t}:t}o(It,"mergeIssueSnapshots");function fn(e,t,n){const r=dn(t,n);for(const a of r){const s=e.getQueryData(ie.issues.detail(a));if(Ie(s))return s}return e.getQueriesData({queryKey:ka}).map(([,a])=>a).find(a=>Ie(a)&&Pa(a,r))}o(fn,"getCachedIssueDetail");function mn(e,t,n){if(!Ie(t))return t;const r=dn(n?.issueRef,t),a=It(fn(e,n?.issueRef,t),t);for(const s of r)e.setQueryData(ie.issues.detail(s),i=>It(i,a));return a}o(mn,"seedIssueDetailCache");async function hn(e,t,n){return mn(e,n?await K.get(t,n):await K.get(t),{issueRef:t})}o(hn,"fetchIssueDetail");function La(e,t,n){return{queryKey:ie.issues.detail(t),queryFn:o(({signal:r})=>hn(e,t,{signal:r}),"queryFn"),placeholderData:fn(e,t,n?.placeholderIssue??void 0)}}o(La,"getIssueDetailQueryOptions");function Aa(e,t,n){return Ie(n?.issue)&&mn(e,n.issue,{issueRef:t}),e.prefetchQuery({queryKey:ie.issues.detail(t),queryFn:o(()=>hn(e,t),"queryFn"),staleTime:cn})}o(Aa,"prefetchIssueDetail");function Da(e,t){return e.prefetchInfiniteQuery({queryKey:ie.issues.comments(t),queryFn:o(({pageParam:n})=>K.listComments(t,{order:"desc",limit:50,...n?{after:n}:{}}),"queryFn"),initialPageParam:null,getNextPageParam:o(n=>Ea(n,50),"getNextPageParam"),staleTime:$a,pages:1})}o(Da,"prefetchIssueComments");function _a(e,t,n){return Promise.all([Aa(e,t,n),Da(e,t)])}o(_a,"prefetchIssueDetailForNavigation");var Ta=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Oa=Re("box",Ta),Na=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],Ma=Re("briefcase",Na),Ua=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]],ja=Re("compass",Ua),Fa=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Ba=Re("layers",Fa),Rt={folder:yr,rocket:cr,code:On,terminal:ir,database:Un,globe:mr,package:sr,boxes:Fn,box:Oa,layers:Ba,briefcase:Ma,compass:ja,target:Qn,flame:fr,zap:lr,star:ar,bug:er,wrench:or,hammer:Jn,lightbulb:zn,sparkles:ur,shield:Kn,lock:Gn,search:nr,cog:tr,brain:jn,cpu:Bn,"git-branch":Wn,"file-code":qn,puzzle:Yn,gem:Nn,atom:Hn,heart:hr,mail:Xn,"message-square":rr,crown:Mn,radar:Vn,telescope:Zn,hexagon:dr},Ha="folder";function Wa(e){return e&&$n.includes(e)?Rt[e]:Rt[Ha]}o(Wa,"getProjectIcon");var x=bt(kn(),1),qa={xs:{box:"h-4 w-4 rounded-sm",icon:"h-2.5 w-2.5"},sm:{box:"h-6 w-6 rounded-md",icon:"h-3.5 w-3.5"},md:{box:"h-7 w-7 rounded-lg",icon:"h-4 w-4"},lg:{box:"h-9 w-9 rounded-lg",icon:"h-5 w-5"}};function za({color:e,icon:t,size:n="md",className:r}){const a=qa[n],s=!!e,i=Wa(t);return(0,x.jsx)("span",{"aria-hidden":!0,className:Be("inline-flex shrink-0 items-center justify-center",a.box,s?"text-white":"bg-muted text-muted-foreground",r),style:s?{backgroundColor:e??void 0}:void 0,children:(0,x.jsx)(i,{className:a.icon})})}o(za,"ProjectTile");var ae=null,Fe=new Set;function pn(){for(const e of Fe)e()}o(pn,"emitQuicklookChange");function St(e){ae!==e&&(ae=e,pn())}o(St,"openQuicklookId");function xt(e){ae===e&&(ae=null,pn())}o(xt,"closeQuicklookId");function Qa(e){return Fe.add(e),()=>{Fe.delete(e)}}o(Qa,"subscribeQuicklook");function Ja(e){return u.useSyncExternalStore(Qa,()=>ae===e,()=>!1)}o(Ja,"useIsQuicklookOpen");var Ka=120,Va=13,Ya="w-72 p-3";function Ga(e="start"){return e==="start"?-13:e==="end"?Va:0}o(Ga,"quicklookAlignOffset");function Xa(e){if(!e)return null;const t=e.replace(/!\[[^\]]*]\([^)]+\)/g," ").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[#>*_`~-]+/g," ").replace(/\s+/g," ").trim();return t?t.length>180?`${t.slice(0,177).trimEnd()}...`:t:null}o(Xa,"summarizeIssueDescription");function Za({className:e}){return(0,x.jsx)("span",{className:Be("text-xs",e),"aria-hidden":!0,children:"·"})}o(Za,"QuicklookSeparator");function es(e){const t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}o(es,"statusLabel");function ts({issue:e,linkTo:t,linkState:n,compact:r=!1}){const a=(0,u.useMemo)(()=>Xa(e.description),[e.description]),s=e.project?.name;return(0,x.jsxs)("div",{className:Be("space-y-2",r&&"space-y-1.5"),children:[(0,x.jsxs)("div",{className:"flex items-center gap-1",children:[(0,x.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1",children:[(0,x.jsx)(wr,{status:e.status,size:"md",title:es(e.status)}),(0,x.jsx)("span",{className:"shrink-0 font-mono text-(length:--text-micro) text-muted-foreground",children:e.identifier??e.id.slice(0,8)}),s?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Za,{className:"shrink-0 text-muted-foreground"}),(0,x.jsxs)("span",{className:"flex min-w-0 max-w-(--sz-12rem) flex-1 items-center gap-1 text-(length:--text-micro) text-muted-foreground",title:s,"data-testid":"quicklook-project",children:[(0,x.jsx)(za,{size:"xs"}),(0,x.jsx)("span",{className:"truncate",children:s})]})]}):null]}),(0,x.jsx)("span",{className:"shrink-0 text-(length:--text-micro) text-muted-foreground",children:pa(new Date(e.updatedAt))})]}),(0,x.jsx)(ce,{to:t,state:n??sn(null,e),className:"block text-sm font-medium leading-snug hover:underline line-clamp-2",children:e.title}),a?(0,x.jsx)("p",{className:"text-xs leading-5 text-muted-foreground [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:4] overflow-hidden",children:a}):null]})}o(ts,"IssueQuicklookCard");var ns=u.forwardRef(o(function({issuePathId:t,to:n,children:r,className:a,state:s,disableIssueQuicklook:i=!1,issuePrefetch:l=null,issueQuicklookSide:c="top",issueQuicklookAlign:d="start",onClick:m,onClickCapture:f,onMouseEnter:g,onFocus:v,onBlur:w,onTouchStart:y,...h},I){const R=Ln(),S=u.useMemo(()=>Symbol("issue-quicklook"),[]),k=Ja(S),E=u.useRef(null),$=u.useRef(null),A=u.useRef(null),N=u.useCallback(b=>{$.current=b,typeof I=="function"?I(b):I&&(I.current=b)},[I]),P=u.useCallback(()=>{E.current&&(clearTimeout(E.current),E.current=null)},[]),U=u.useCallback(()=>{P(),St(S)},[P,S]),Q=u.useCallback(()=>{P(),E.current=setTimeout(()=>{E.current=null,St(S)},Ka)},[P,S]),T=u.useCallback(()=>{P(),xt(S)},[P,S]);u.useEffect(()=>()=>{P(),xt(S)},[P,S]),u.useEffect(()=>{if(!k)return;const b=12,Xe=o((q,te,J)=>{if(!q)return!1;const W=q.getBoundingClientRect();return te>=W.left-b&&te<=W.right+b&&J>=W.top-b&&J<=W.bottom+b},"nearBox"),bn=o((q,te)=>{const J=$.current,W=A.current;if(J?.matches(":hover")||W?.matches(":hover")||Xe(J,q,te)||Xe(W,q,te))return!0;const Pe=document.activeElement;return J===Pe||!!W&&!!Pe&&W.contains(Pe)},"stillEngaged"),Ze=o(q=>{bn(q.clientX,q.clientY)||T()},"onPointerMove");return document.addEventListener("pointermove",Ze,{passive:!0}),()=>document.removeEventListener("pointermove",Ze)},[k,T]);const H=l?sn(s,l):s,{data:j,isLoading:F}=_n({...La(R,t,{placeholderIssue:l??void 0}),enabled:k,staleTime:cn}),En=Ra(t),ee=u.useCallback(()=>{_a(R,t,{issue:l})},[t,l,R]),Ge=(0,x.jsx)(ce,{ref:N,to:n,state:H,className:a,onMouseEnter:o(b=>{ee(),g?.(b)},"onMouseEnter"),onFocus:o(b=>{ee(),U(),v?.(b)},"onFocus"),onBlur:o(b=>{setTimeout(()=>T(),0),w?.(b)},"onBlur"),onTouchStart:o(b=>{ee(),y?.(b)},"onTouchStart"),onClickCapture:o(b=>{ee(),f?.(b)},"onClickCapture"),onClick:o(b=>{T(),m?.(b)},"onClick"),...h,children:r});return i?Ge:(0,x.jsxs)(vr,{open:k,onOpenChange:o(b=>b?U():T(),"onOpenChange"),children:[(0,x.jsx)(gr,{asChild:!0,onMouseEnter:o(()=>{ee(),Q()},"onMouseEnter"),onMouseLeave:T,children:Ge}),(0,x.jsx)(pr,{ref:A,"data-quicklook":!0,className:Ya,side:c,align:d,alignOffset:Ga(d),onMouseEnter:U,onMouseLeave:T,onOpenAutoFocus:o(b=>b.preventDefault(),"onOpenAutoFocus"),onCloseAutoFocus:o(b=>b.preventDefault(),"onCloseAutoFocus"),children:j?(0,x.jsx)(ts,{issue:j,linkTo:En,linkState:H,compact:!0}):(0,x.jsxs)("div",{className:"space-y-2",children:[(0,x.jsx)("div",{className:"h-4 w-24 rounded bg-accent/50"}),(0,x.jsx)("div",{className:"h-4 w-full rounded bg-accent/40"}),(0,x.jsx)("div",{className:"h-4 w-3/4 rounded bg-accent/30"}),F?null:(0,x.jsx)("p",{className:"text-xs text-muted-foreground",children:"Unable to load task preview."})]})})]})},"IssueLinkQuicklookImpl")),gn=new Set(["dashboard","companies","company","skills","teams-catalog","org","agents","chats","apps","projects","workspaces","execution-workspaces","issues","tasks","routines","goals","artifacts","tools","approvals","costs","usage","activity","audit","decisions","inbox","board-chat","artifacts","u","design-guide","search","settings","timeline"]),Ye=new Set(["auth","invite","board-claim","cli-auth","docs","instance"]);function se(e){return e.trim().toUpperCase()}o(se,"normalizeCompanyPrefix");function yn(e){const t=e.match(/^([^?#]*)(\?[^#]*)?(#.*)?$/);return{pathname:t?.[1]??e,search:t?.[2]??"",hash:t?.[3]??""}}o(yn,"splitPath");function rs(e){return e.split("/").filter(Boolean)[0]??null}o(rs,"getRootSegment");function os(e){if(e==="/")return!0;const t=rs(e);return t?Ye.has(t.toLowerCase()):!0}o(os,"isGlobalPath");function vn(e){const t=e.split("/").filter(Boolean);if(t.length===0)return null;const n=t[0].toLowerCase();return Ye.has(n)||gn.has(n)?null:se(t[0])}o(vn,"extractCompanyPrefixFromPath");function Et(e,t){const{pathname:n,search:r,hash:a}=yn(e);if(!n.startsWith("/")||os(n)||!t)return e;const s=se(t);return vn(n)?e:`/${s}${n}${r}${a}`}o(Et,"applyCompanyPrefix");function as(e,...t){const n=["cases",...t].filter(Boolean).join("/");return e?`/${se(e)}/${n}`:`/${n}`}o(as,"caseHref");function Js(e){const{pathname:t,search:n,hash:r}=yn(e),a=t.split("/").filter(Boolean);if(a.length>=2){const s=a[1].toLowerCase();if(!Ye.has(a[0].toLowerCase())&&gn.has(s))return`/${a.slice(1).join("/")}${n}${r}`}return`${t}${n}${r}`}o(Js,"toCompanyRelativePath");var wn=/^[A-Z][A-Z0-9]*-\d+$/i,ss=/^issue:\/\/:?([^?#\s]+)(?:[?#].*)?$/i,is=/issue:\/\/:?[^\s<>()]+|https?:\/\/[^\s<>()]+|\/(?:[^\s<>()/]+\/)*issues\/[A-Z][A-Z0-9]*-\d+(?=$|[\s<>)\],.;!?:])|\b[A-Z][A-Z0-9]*-\d+\b/gi;function In(e){if(!e)return null;const t=e.trim();if(!t||/^https?:\/\//i.test(t))return null;const n=t.split("/").filter(Boolean),r=n.findIndex(s=>s==="issues");if(r===-1||r===n.length-1)return null;const a=decodeURIComponent(n[r+1]??"");return!a||a.startsWith(":")?null:wn.test(a)?a.toUpperCase():a}o(In,"parseIssuePathIdFromPath");function Rn(e,t){if(!e)return null;const n=e.trim(),r=n.match(ss);if(r?.[1]){const i=decodeURIComponent(r[1]);return{issuePathId:i,href:`/issues/${encodeURIComponent(i)}`}}const a=In(e);if(a)return{issuePathId:a,href:`/issues/${encodeURIComponent(a)}`};if(!wn.test(n))return null;const s=n.toUpperCase();if(t&&t.size>0){const i=s.split("-")[0];if(!i||!t.has(i))return null}return{issuePathId:s,href:`/issues/${encodeURIComponent(s)}`}}o(Rn,"parseIssueReferenceFromHref");function us(e){let t=e,n="";for(;t.length>0;){const r=t.at(-1);if(!r||!/[),.;!?:\]]/.test(r))break;if(r===")"){const a=(t.match(/\(/g)??[]).length;if((t.match(/\)/g)??[]).length<=a)break}if(r==="]"){const a=(t.match(/\[/g)??[]).length;if((t.match(/\]/g)??[]).length<=a)break}n=`${r}${n}`,t=t.slice(0,-1)}return{core:t,trailing:n}}o(us,"splitTrailingPunctuation");function Sn(e,t,n="text"){return{type:"link",url:t,children:[{type:n,value:e}]}}o(Sn,"createIssueLinkNode");function ls(e,t){const n=[];let r=0,a=!1;for(const s of e.matchAll(is)){const i=s[0];if(!i)continue;const l=s.index??0,c=l+i.length,{core:d,trailing:m}=us(i),f=Rn(d,t);f&&(a=!0,l>r&&n.push({type:"text",value:e.slice(r,l)}),n.push(Sn(d,f.href)),m&&n.push({type:"text",value:m}),r=c)}return a?(r<e.length&&n.push({type:"text",value:e.slice(r)}),n):null}o(ls,"linkifyIssueReferencesInText");function xn(e,t){if(!Array.isArray(e.children)||e.children.length===0||e.type==="link"||e.type==="linkReference"||e.type==="code"||e.type==="definition"||e.type==="html")return;const n=[];for(const r of e.children){if(r.type==="inlineCode"&&typeof r.value=="string"){const a=Rn(r.value,t);if(a){n.push(Sn(r.value,a.href,"inlineCode"));continue}}if(r.type==="text"&&typeof r.value=="string"){const a=ls(r.value,t);if(a){n.push(...a);continue}}xn(r,t),n.push(r)}e.children=n}o(xn,"rewriteMarkdownTree");function Ks(e){const t=e?.knownPrefixes&&e.knownPrefixes.length>0?new Set(e.knownPrefixes.map(n=>n.toUpperCase())):void 0;return n=>{xn(n,t)}}o(Ks,"remarkLinkIssueReferences");function $e(e,t){if(typeof e=="string")return Et(e,t);if(e.pathname&&e.pathname.startsWith("/")){const n=Et(e.pathname,t);if(n!==e.pathname)return{...e,pathname:n}}return e}o($e,"resolveTo");function de(){const{selectedCompany:e}=An(),t=uo(),n=_();if(t.companyPrefix)return se(t.companyPrefix);const r=vn(n.pathname);return r||(e?se(e.issuePrefix):null)}o(de,"useActiveCompanyPrefix");function Vs(){const e=de();return u.useCallback((...t)=>as(e,...t),[e])}o(Vs,"useCaseHref");var Ys=u.forwardRef(o(function({to:t,disableIssueQuicklook:n=!1,issuePrefetch:r=null,issueQuicklookSide:a,issueQuicklookAlign:s,...i},l){const c=$e(t,de()),d=In(typeof c=="string"?c:c.pathname);return d?(0,x.jsx)(ns,{ref:l,to:c,issuePathId:d,disableIssueQuicklook:n,issuePrefetch:r,issueQuicklookSide:a,issueQuicklookAlign:s,...i}):(0,x.jsx)(ce,{ref:l,to:c,...i})},"CompanyLink")),Gs=u.forwardRef(o(function({to:t,...n},r){const a=de();return(0,x.jsx)(Xt,{ref:r,to:$e(t,a),...n})},"CompanyNavLink"));function Xs({to:e,...t}){const n=de();return(0,x.jsx)(Eo,{to:$e(e,n),...t})}o(Xs,"Navigate");function Zs(){const e=xe(),t=de();return u.useCallback(((n,r)=>{if(typeof n=="number"){e(n);return}e($e(n,t),r)}),[e,t])}o(Zs,"useNavigate");export{ce as $,Fs as A,K as B,La as C,ba as D,Ws as E,Us as F,_s as G,As as H,Qs as I,Sa as J,Ts as K,Hs as L,Ns as M,Bs as N,qs as O,Ca as P,ks as Q,js as R,Oa as S,Ms as T,Ls as U,ht as V,Ra as W,sn as X,Ds as Y,pa as Z,Ga as _,Vs as a,xe as at,Ba as b,Ks as c,$s as ct,os as d,Ss as et,se as f,Ya as g,ts as h,de as i,_ as it,Ea as j,Os as k,Et as l,ns as m,Gs as n,xs as nt,Zs as o,Is as ot,Js as p,ya as q,Xs as r,Ps as rt,Rn as s,uo as st,Ys as t,bo as tt,vn as u,za as v,_a as w,ja as x,Rt as y,zs as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as a}from"./createLucideIcon-
|
|
1
|
+
import{t as a}from"./createLucideIcon-CINAT48M.js";var e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],t=a("circle-alert",e),r=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],i=a("circle-question-mark",r),c=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],l=a("save",c);export{i as n,t as r,l as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var d=Object.defineProperty;var s=(t,a)=>d(t,"name",{value:a,configurable:!0});import{i as n}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as u,Lr as m,S as r,t as p}from"./createLucideIcon-
|
|
1
|
+
var d=Object.defineProperty;var s=(t,a)=>d(t,"name",{value:a,configurable:!0});import{i as n}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as u,Lr as m,S as r,t as p}from"./createLucideIcon-CINAT48M.js";import{a as x,c as f,d as g,f as h,h as v,i as S,l as b,m as j,n as w,o as y,p as _,r as z,s as N,t as $,u as k}from"./dist-DCpDFPbp.js";import{t as I}from"./check-Cniv3It0.js";import{t as i}from"./chevron-down-Dq0fsCvv.js";var C=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],B=p("chevron-up",C),F=n(m(),1),e=n(u(),1);function M({...t}){return(0,e.jsx)($,{"data-slot":"select",...t})}s(M,"Select");function P({...t}){return(0,e.jsx)(z,{"data-slot":"select-group",...t})}s(P,"SelectGroup");function A({...t}){return(0,e.jsx)(j,{"data-slot":"select-value",...t})}s(A,"SelectValue");function H({className:t,size:a="default",children:o,...l}){return(0,e.jsxs)(_,{"data-slot":"select-trigger","data-size":a,className:r("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-base md:text-sm whitespace-nowrap shadow-xs transition-(--tp-color-box-shadow) outline-none focus-visible:ring-(length:--rad-3) disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...l,children:[o,(0,e.jsx)(S,{asChild:!0,children:(0,e.jsx)(i,{className:"size-4 opacity-50"})})]})}s(H,"SelectTrigger");function J({className:t,children:a,position:o="item-aligned",align:l="center",...c}){return(0,e.jsx)(b,{children:(0,e.jsxs)(w,{"data-slot":"select-content",className:r("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-(--sz-8rem) origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,align:l,...c,children:[(0,e.jsx)(L,{}),(0,e.jsx)(v,{className:r("p-1",o==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"),children:a}),(0,e.jsx)(D,{})]})})}s(J,"SelectContent");function K({className:t,...a}){return(0,e.jsx)(f,{"data-slot":"select-label",className:r("text-muted-foreground px-2 py-1.5 text-xs",t),...a})}s(K,"SelectLabel");function O({className:t,children:a,...o}){return(0,e.jsxs)(x,{"data-slot":"select-item",className:r("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...o,children:[(0,e.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,e.jsx)(y,{children:(0,e.jsx)(I,{className:"size-4"})})}),(0,e.jsx)(N,{children:a})]})}s(O,"SelectItem");function Q({className:t,...a}){return(0,e.jsx)(h,{"data-slot":"select-separator",className:r("bg-border pointer-events-none -mx-1 my-1 h-px",t),...a})}s(Q,"SelectSeparator");function L({className:t,...a}){return(0,e.jsx)(g,{"data-slot":"select-scroll-up-button",className:r("flex cursor-default items-center justify-center py-1",t),...a,children:(0,e.jsx)(B,{className:"size-4"})})}s(L,"SelectScrollUpButton");function D({className:t,...a}){return(0,e.jsx)(k,{"data-slot":"select-scroll-down-button",className:r("flex cursor-default items-center justify-center py-1",t),...a,children:(0,e.jsx)(i,{className:"size-4"})})}s(D,"SelectScrollDownButton");export{K as a,A as c,O as i,B as l,J as n,Q as o,P as r,H as s,M as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var R=Object.defineProperty;var o=(t,e)=>R(t,"name",{value:e,configurable:!0});import{i as v}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as k,Lr as T,S as i,c as z,m as A,s as O,t as x}from"./createLucideIcon-
|
|
1
|
+
var R=Object.defineProperty;var o=(t,e)=>R(t,"name",{value:e,configurable:!0});import{i as v}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as k,Lr as T,S as i,c as z,m as A,s as O,t as x}from"./createLucideIcon-CINAT48M.js";import{Q as $}from"./mention-chips-r4UB4Eiw.js";import{C as h,E as j,S as _,T as y,b,v as S,w as C,x as w,y as f}from"./MarkdownEditor-ZwstkvWb.js";import{n as N}from"./button-BYQHEF4e.js";var c=v(T(),1),a=v(k(),1),M=Object.defineProperty,d=o((t,e)=>M(t,"name",{value:e,configurable:!0}),"__name"),[F,vt]=z("AlertDialog",[j]),g=j(),H=d(t=>{const{__scopeAlertDialog:e,...r}=t,l=g(e);return(0,a.jsx)(S,{...l,...r,modal:!0})},"AlertDialog"),L=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,n=g(l);return(0,a.jsx)(y,{...n,...s,ref:r})},"AlertDialogTrigger2"),"AlertDialogTrigger")),E=d(t=>{const{__scopeAlertDialog:e,...r}=t,l=g(e);return(0,a.jsx)(h,{...l,...r})},"AlertDialogPortal"),q=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,n=g(l);return(0,a.jsx)(_,{...n,...s,ref:r})},"AlertDialogOverlay2"),"AlertDialogOverlay")),[I,V]=F("AlertDialogContent"),Q=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,children:s,...n}=e,p=g(l),m=c.useRef(null),P=A(r,m),D=c.useRef(null);return(0,a.jsx)(I,{scope:l,cancelRef:D,children:(0,a.jsx)(b,{role:"alertdialog",...p,...n,ref:P,onOpenAutoFocus:O(n.onOpenAutoFocus,u=>{u.preventDefault(),D.current?.focus({preventScroll:!0})}),onPointerDownOutside:o(u=>u.preventDefault(),"onPointerDownOutside"),onInteractOutside:o(u=>u.preventDefault(),"onInteractOutside"),children:s})})},"AlertDialogContent2"),"AlertDialogContent")),X=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,n=g(l);return(0,a.jsx)(C,{...n,...s,ref:r})},"AlertDialogTitle2"),"AlertDialogTitle")),B=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,n=g(l);return(0,a.jsx)(w,{...n,...s,ref:r})},"AlertDialogDescription2"),"AlertDialogDescription")),G=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,n=g(l);return(0,a.jsx)(f,{...n,...s,ref:r})},"AlertDialogAction2"),"AlertDialogAction")),J="AlertDialogCancel",K=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,{cancelRef:n}=V(J,l),p=g(l),m=A(r,n);return(0,a.jsx)(f,{...p,...s,ref:m})},"AlertDialogCancel2"),"AlertDialogCancel")),U=H,W=L,Y=E,Z=q,tt=Q,et=G,at=K,ot=X,rt=B,lt=[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],At=x("folder-search",lt),st=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],ht=x("pencil",st),nt=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],jt=x("refresh-cw",nt);function _t({...t}){return(0,a.jsx)(U,{"data-slot":"alert-dialog",...t})}o(_t,"AlertDialog");function yt({...t}){return(0,a.jsx)(W,{"data-slot":"alert-dialog-trigger",...t})}o(yt,"AlertDialogTrigger");function it({...t}){return(0,a.jsx)(Y,{"data-slot":"alert-dialog-portal",...t})}o(it,"AlertDialogPortal");function ct({className:t,...e}){return(0,a.jsx)(Z,{"data-slot":"alert-dialog-overlay",className:i("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-50 bg-black/50 duration-100",t),...e})}o(ct,"AlertDialogOverlay");function bt({className:t,...e}){return(0,a.jsxs)(it,{children:[(0,a.jsx)(ct,{}),(0,a.jsx)(tt,{"data-slot":"alert-dialog-content",className:i("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-[0.97] data-[state=open]:zoom-in-[0.97] fixed top-(--sz-calc-26) md:top-(--pct-50) left-(--pct-50) z-50 grid w-full max-w-(--sz-calc-25) translate-x-(--pct-neg-50) translate-y-0 md:translate-y-(--pct-neg-50) gap-4 rounded-lg border p-6 shadow-lg duration-150 ease-(--e-cubic-bezier-0_16-1-0_3-1) outline-none sm:max-w-lg [&>*]:min-w-0",t),...e})]})}o(bt,"AlertDialogContent");function St({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-dialog-header",className:i("flex flex-col gap-2 text-center sm:text-left",t),...e})}o(St,"AlertDialogHeader");function Ct({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-dialog-footer",className:i("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}o(Ct,"AlertDialogFooter");function wt({className:t,...e}){return(0,a.jsx)(ot,{"data-slot":"alert-dialog-title",className:i("text-lg leading-none font-semibold",t),...e})}o(wt,"AlertDialogTitle");function Nt({className:t,...e}){return(0,a.jsx)(rt,{"data-slot":"alert-dialog-description",className:i("text-muted-foreground text-sm",t),...e})}o(Nt,"AlertDialogDescription");function Pt({className:t,...e}){return(0,a.jsx)(et,{"data-slot":"alert-dialog-action",className:i(N(),t),...e})}o(Pt,"AlertDialogAction");function Rt({className:t,...e}){return(0,a.jsx)(at,{"data-slot":"alert-dialog-cancel",className:i(N({variant:"outline"}),t),...e})}o(Rt,"AlertDialogCancel");function kt({...t}){return(0,a.jsx)(S,{"data-slot":"sheet",...t})}o(kt,"Sheet");function Tt({...t}){return(0,a.jsx)(y,{"data-slot":"sheet-trigger",...t})}o(Tt,"SheetTrigger");function zt({...t}){return(0,a.jsx)(f,{"data-slot":"sheet-close",...t})}o(zt,"SheetClose");function dt({...t}){return(0,a.jsx)(h,{"data-slot":"sheet-portal",...t})}o(dt,"SheetPortal");function gt({className:t,...e}){return(0,a.jsx)(_,{"data-slot":"sheet-overlay",className:i("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-50 bg-black/50",t),...e})}o(gt,"SheetOverlay");function Ot({className:t,children:e,side:r="right",showCloseButton:l=!0,...s}){return(0,a.jsxs)(dt,{children:[(0,a.jsx)(gt,{}),(0,a.jsxs)(b,{"data-slot":"sheet-content",className:i("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",r==="right"&&"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",r==="left"&&"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",r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...s,children:[e,l&&(0,a.jsxs)(f,{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,a.jsx)($,{className:"size-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}o(Ot,"SheetContent");function $t({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"sheet-header",className:i("flex flex-col gap-1.5 p-4",t),...e})}o($t,"SheetHeader");function Mt({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"sheet-footer",className:i("mt-auto flex flex-col gap-2 p-4",t),...e})}o(Mt,"SheetFooter");function Ft({className:t,...e}){return(0,a.jsx)(C,{"data-slot":"sheet-title",className:i("text-foreground font-semibold",t),...e})}o(Ft,"SheetTitle");function Ht({className:t,...e}){return(0,a.jsx)(w,{"data-slot":"sheet-description",className:i("text-muted-foreground text-sm",t),...e})}o(Ht,"SheetDescription");export{yt as _,Mt as a,At as b,Tt as c,Rt as d,bt as f,wt as g,St as h,Ht as i,_t as l,Ct as m,zt as n,$t as o,Nt as p,Ot as r,Ft as s,kt as t,Pt as u,jt as v,ht as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var o=Object.defineProperty;var e=(r,t)=>o(r,"name",{value:t,configurable:!0});import{i as s}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as a,S as n}from"./createLucideIcon-
|
|
1
|
+
var o=Object.defineProperty;var e=(r,t)=>o(r,"name",{value:t,configurable:!0});import{i as s}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as a,S as n}from"./createLucideIcon-CINAT48M.js";var i=s(a(),1);function c({className:r,...t}){return(0,i.jsx)("div",{"data-slot":"skeleton",className:n("bg-accent/75 rounded-md",r),...t})}e(c,"Skeleton");export{c as t};
|