PageSourceSearch

https://www.rachelbotsman.com/_next/static/chunks/1329.841843c468ef23c2.js

js rachelbotsman.com collected 2026-10-02 08:42:09 UTC 80,463 bytes, 87 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1329],{3818:(e,t,n)=>{n.d(t,{C:()=>l,w:()=>c});var r=n(95155),i=n(43377),o=n(51616),a=n(12115),s=n(66201);function l(e){let t,n,l,c,u=(0,i.c)(9),{children:d,setDisplayedDocument:f,documentId:p}=e;u[0]!==f?(t=e=>f(t=>o(t,e)?t:e),u[0]=f,u[1]=t):t=u[1];let m=t;return u[2]!==p||u[3]!==f?(n=()=>{if(p)return;let e=setTimeout(()=>f(null));return()=>clearTimeout(e)},l=[p,f],u[2]=p,u[3]=f,u[4]=n,u[5]=l):(n=u[4],l=u[5]),(0,a.useEffect)(n,l),u[6]!==d||u[7]!==m?(c=(0,r.jsx)(s.Af.Provider,{value:m,children:d}),u[6]=d,u[7]=m,u[8]=c):c=u[8],c}function c(){return(0,a.useContext)(s.Af)}},6814:(e,t,n)=>{n.d(t,{C:()=>p,Hf:()=>_,IM:()=>b,Jt:()=>c,KT:()=>function e(t,n,r=[]){if(null!==t&&Array.isArray(t))return t.map((t,i)=>{if(E(t)){let o=t._key;if("string"==typeof o)return e(t,n,r.concat({_key:o,_index:i}))}return e(t,n,r.concat(i))});if(E(t)){if("block"===t._type||"span"===t._type){let i={...t};return"block"===t._type?i.children=e(t.children,n,r.concat("children")):"span"===t._type&&(i.text=e(t.text,n,r.concat("text"))),i}return Object.fromEntries(Object.entries(t).map(([t,i])=>[t,e(i,n,r.concat(t))]))}return n(t,r)},T4:()=>v,ct:()=>x,dI:()=>u,fO:()=>S,iz:()=>k});let r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/_key\s*==\s*['"](.*)['"]/,o=/^\d*:\d*$/;function a(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function s(e){return"string"==typeof e?i.test(e.trim()):"object"==typeof e&&"_key"in e}function l(e){if("string"==typeof e&&o.test(e))return!0;if(!Array.isArray(e)||2!==e.length)return!1;let[t,n]=e;return("number"==typeof t||""===t)&&("number"==typeof n||""===n)}function c(e,t,n){let r="string"==typeof t?d(t):t;if(!Array.isArray(r))throw Error("Path must be an array or a string");let i=e;for(let e=0;e<r.length;e++){let t=r[e];if(a(t)){if(!Array.isArray(i))return n;i=i[t]}if(s(t)){if(!Array.isArray(i))return n;i=i.find(e=>e._key===t._key)}if("string"==typeof t&&(i="object"==typeof i&&null!==i?i[t]:void 0),typeof i>"u")return n}return i}function u(e){if(!Array.isArray(e))throw Error("Path is not an array");return e.reduce((e,t,n)=>{let r=typeof t;if("number"===r)return`${e}[${t}]`;if("string"===r)return`${e}${0===n?"":"."}${t}`;if(s(t)&&t._key)return`${e}[_key=="${t._key}"]`;if(Array.isArray(t)){let[n,r]=t;return`${e}[${n}:${r}]`}throw Error(`Unsupported path segment \`${JSON.stringify(t)}\``)},"")}function d(e){if("string"!=typeof e)throw Error("Path is not a string");let t=e.match(r);if(!t)throw Error("Invalid path string");return t.map(f)}function f(e){return a(e)?Number(e.replace(/[^\d]/g,"")):s(e)?{_key:e.match(i)[1]}:l(e)?function(e){let[t,n]=e.split(":").map(e=>""===e?e:Number(e));return[t,n]}(e):e}var p=Object.freeze({__proto__:null,fromString:d,get:c,isIndexSegment:a,isIndexTuple:l,isKeySegment:s,reKeySegment:i,toString:u});let m="drafts.",h="versions.";function y(e){return e.startsWith(m)}function g(e){return e.startsWith(h)}function v(e){return g(e)?m+b(e):y(e)?e:m+e}function x(e,t){if("drafts"===t||"published"===t)throw Error('Version can not be "published" or "drafts"');return`${h}${t}.${b(e)}`}function b(e){return g(e)?e.split(".").slice(2).join("."):y(e)?e.slice(m.length):e}let w={"\f":"\\f","\n":"\\n","\r":"\\r","	":"\\t","'":"\\'","\\":"\\\\"},j={"\\f":"\f","\\n":`
2`,"\\r":"\r","\\t":"	","\\'":"'","\\\\":"\\"};function _(e){let t,n=[],r=/\['(.*?)'\]|\[(\d+)\]|\[\?\(@\._key=='(.*?)'\)\]/g;for(;null!==(t=r.exec(e));){if(void 0!==t[1]){let e=t[1].replace(/\\(\\|f|n|r|t|')/g,e=>j[e]);n.push(e);continue}if(void 0!==t[2]){n.push(parseInt(t[2],10));continue}if(void 0!==t[3]){let e=t[3].replace(/\\(\\')/g,e=>j[e]);n.push({_key:e,_index:-1});continue}}return n}function S(e,t){var n;if(!t?.mappings)return;let r=(n=e.map(e=>{if("string"==typeof e||"number"==typeof e)return e;if(-1!==e._index)return e._index;throw Error(`invalid segment:${JSON.stringify(e)}`)}),`$${n.map(e=>"string"==typeof e?`['${e.replace(/[\f\n\r\t'\\]/g,e=>w[e])}']`:"number"==typeof e?`[${e}]`:""!==e._key?`[?(@._key=='${e._key.replace(/['\\]/g,e=>w[e])}')]`:`[${e._index}]`).join("")}`);
2if(void 0!==t.mappings[r])return{mapping:t.mappings[r],matchedPath:r,pathSuffix:""};let i=Object.entries(t.mappings).filter(([e])=>r.startsWith(e)).sort(([e],[t])=>t.length-e.length);if(0==i.length)return;let[o,a]=i[0],s=r.substring(o.length);return{mapping:a,matchedPath:o,pathSuffix:s}}function E(e){return"object"==typeof e&&null!==e}function k(e){let{baseUrl:t,workspace:n="default",tool:r="default",id:i,type:o,path:a,projectId:s,dataset:l}=e;if(!t)throw Error("baseUrl is required");if(!a)throw Error("path is required");if(!i)throw Error("id is required");if("/"!==t&&t.endsWith("/"))throw Error("baseUrl must not end with a slash");let c="default"===n?void 0:n,d="default"===r?void 0:r,f=b(i),p=Array.isArray(a)?u(a.map(e=>{if("string"==typeof e||"number"==typeof e)return e;if(""!==e._key)return{_key:e._key};if(-1!==e._index)return e._index;throw Error(`invalid segment:${JSON.stringify(e)}`)})):a,m=new URLSearchParams({baseUrl:t,id:f,type:o,path:p});if(c&&m.set("workspace",c),d&&m.set("tool",d),s&&m.set("projectId",s),l&&m.set("dataset",l),y(i)||g(i)){if(g(i)){let e=function(e){if(!g(e))return;let[t,n,...r]=e.split(".");return n}(i);m.set("perspective",e)}}else m.set("perspective","published");let h=["/"===t?"":t];c&&h.push(c);let v=["mode=presentation",`id=${f}`,`type=${o}`,`path=${encodeURIComponent(p)}`];return d&&v.push(`tool=${d}`),h.push("intent","edit",`${v.join(";")}?${m}`),h.join("/")}},51329:(e,t,n)=>{let r;n.r(t),n.d(t,{default:()=>tO});var i=n(95155),o=n(43377),a=n(63340),s=n(83060),l=n(24323),c=n(90621),u=n(12115),d=n(54557),f=n(50152),p=n(6814),m=n(25356),h=n(67192),y=n(71286),g=n(44987),v=n(46295),x=n(66201),b=n(90330),w=n(47242),j=n(30994),_=n(3818);let S={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},E=new Uint8Array(16),k=[];for(let e=0;e<256;++e)k.push((e+256).toString(16).slice(1));let P=function(e,t,n){if(S.randomUUID&&!t&&!e)return S.randomUUID();let i=(e=e||{}).random??e.rng?.()??function(){if(!r){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(E)}();if(i.length<16)throw Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){if((n=n||0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=i[e];return t}return function(e,t=0){return(k[e[t+0]]+k[e[t+1]]+k[e[t+2]]+k[e[t+3]]+"-"+k[e[t+4]]+k[e[t+5]]+"-"+k[e[t+6]]+k[e[t+7]]+"-"+k[e[t+8]]+k[e[t+9]]+"-"+k[e[t+10]]+k[e[t+11]]+k[e[t+12]]+k[e[t+13]]+k[e[t+14]]+k[e[t+15]]).toLowerCase()}(i)};var C=n(19582),$=n(60760),R=n(51508),A=n(95500),I=n(82885);function z(e){let{children:t,isValidProp:n,...r}=e;n&&(0,A.D)(n),(r={...(0,u.useContext)(R.Q),...r}).isStatic=(0,I.M)(()=>r.isStatic);let o=(0,u.useMemo)(()=>r,[JSON.stringify(r.transition),r.transformPagePoint,r.reducedMotion]);return(0,i.jsx)(R.Q.Provider,{value:o,children:t})}var T=n(47650),O=n(51408);function M(){if("u">typeof crypto){let e=new Uint8Array(16);crypto.getRandomValues(e);let t="";for(let n=0;n<e.length;n++)t+=e[n].toString(16).padStart(2,"0");return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/[=]+$/,"")}return Math.random().toString(36).slice(2)}async function U(e,t,n,r){let i=e.withConfig({apiVersion:a.XV}),o=M(),s=i.patch(a.YL).set({secret:o,studioUrl:n,userId:r});return await i.transaction().createIfNotExists({_id:a.YL,_type:a.dR,source:t,studioUrl:n,userId:r}).patch(s).commit({tag:a.Tc}),{secret:o}}async function L(e,t,n,r){let i=e.withConfig({apiVersion:a.XV}),o=i.patch(a.YL).set({secret:null,studioUrl:n,userId:r});await i.transaction().createIfNotExists({_id:a.YL,_type:a.dR,source:t,studioUrl:n,userId:r}).patch(o).commit({tag:a.Tc})}var Y=n(63296),N=n(51616);function W(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function B(e){return e&&e.sensitive?"":"i"}var D=n(29206);async function V(e,t,n,r,i=(0,c.A)()){let o=e.withConfig({apiVersion:a.XV});try{let e=new Date(Date.now()+1e3*a.eZ),s=`drafts.${i}`,l=M(),c=o.patch(s).set({secret:l,source:t,studioUrl:n,userId:r});return await o.transaction().createOrReplace({_id:s,_type:a.uf}).patch(c).commit({tag:a.Tc}),{secret:l,expiresAt:e}}finally{try{await o.delete({query:a.W_})}catch(e){console.error("Failed to delete expired secrets",e)}}}let F=e=>
2"object"==typeof e&&"function"==typeof e.then,Z=[],J=(e,t,n)=>(function(e,t=null,n=!1,r={}){for(let i of(null===t&&(t=[e]),Z))if(function(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;let r=e.length;if(t.length!==r)return!1;for(let i=0;i<r;i++)if(!n(e[i],t[i]))return!1;return!0}(t,i.keys,i.equal)){if(n)return;if(Object.prototype.hasOwnProperty.call(i,"error"))throw i.error;if(Object.prototype.hasOwnProperty.call(i,"response"))return r.lifespan&&r.lifespan>0&&(i.timeout&&clearTimeout(i.timeout),i.timeout=setTimeout(i.remove,r.lifespan)),i.response;if(!n)throw i.promise}let i={keys:t,equal:r.equal,remove:()=>{let e=Z.indexOf(i);-1!==e&&Z.splice(e,1)},promise:(F(e)?e:e(...t)).then(e=>{i.response=e,r.lifespan&&r.lifespan>0&&(i.timeout=setTimeout(i.remove,r.lifespan))}).catch(e=>i.error=e)};if(Z.push(i),!n)throw i.promise})(e,t,!1,n);var H=(0,u.memo)(e=>{let t,n,r=(0,o.c)(3),{comlink:i}=e;return r[0]!==i?(t=()=>i.on("visual-editing/features",K),n=[i],r[0]=i,r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,u.useEffect)(t,n),null});function K(){return{features:{optimistic:!0}}}function q(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(e,r)},t)}}let X=function(e){let t,n,r,a,s,l,c,d,f=(0,o.c)(14),{comlink:p,children:m}=e;f[0]===Symbol.for("react.memo_cache_sentinel")?(t={},f[0]=t):t=f[0];let h=(0,u.useRef)(t);f[1]!==p?(n=()=>p?.on("visual-editing/shared-state",()=>({state:h.current})),r=[p],f[1]=p,f[2]=n,f[3]=r):(n=f[2],r=f[3]),(0,u.useEffect)(n,r),f[4]!==p?(a=(e,t)=>{h.current[e]=t,p?.post("presentation/shared-state",{key:e,value:t})},f[4]=p,f[5]=a):a=f[5];let y=a;f[6]!==p?(s=e=>{p?.post("presentation/shared-state",{key:e}),delete h.current[e]},f[6]=p,f[7]=s):s=f[7];let g=s;return f[8]!==g||f[9]!==y?(c={removeValue:g,setValue:y},f[8]=g,f[9]=y,f[10]=c):c=f[10],l=c,f[11]!==m||f[12]!==l?(d=(0,i.jsx)(x.En.Provider,{value:l,children:m}),f[11]=m,f[12]=l,f[13]=d):d=f[13],d},G=g.I4.div`
3  overflow: hidden;
4  flex-basis: 0;
5  flex-shrink: 1;
6`,Q=function(e){let t,n,r,a,s=(0,o.c)(15),{children:l,defaultSize:c,id:d,minWidth:f,maxWidth:p,order:m}=e,h=void 0===c?null:c,y=void 0===m?0:m,g=(0,u.useContext)(x.Tf);if(null===g)throw Error("Panel components must be rendered within a PanelGroup container");let{getPanelStyle:v,registerElement:b,unregisterElement:w}=g;s[0]!==v||s[1]!==d?(t=v(d),s[0]=v,s[1]=d,s[2]=t):t=s[2];let j=t;return s[3]!==h||s[4]!==d||s[5]!==p||s[6]!==f||s[7]!==y||s[8]!==b||s[9]!==w?(n=()=>(b(d,{id:d,type:"panel",defaultSize:h,maxWidth:p??null,minWidth:f??0,order:y}),()=>{w(d)}),r=[d,h,y,p,f,b,w],s[3]=h,s[4]=d,s[5]=p,s[6]=f,s[7]=y,s[8]=b,s[9]=w,s[10]=n,s[11]=r):(n=s[10],r=s[11]),(0,u.useLayoutEffect)(n,r),s[12]!==l||s[13]!==j?(a=(0,i.jsx)(G,{style:j,children:l}),s[12]=l,s[13]=j,s[14]=a):a=s[14],a},ee="presentation/panels",et=()=>JSON.parse(localStorage.getItem(ee)||"{}"),en=e=>{localStorage.setItem(ee,JSON.stringify(e))},er=e=>e.map(e=>[e.id,e.order].join(":")).join(",");function ei(e,t){let n=et(),r=er(e);en({...n,[r]:t})}function eo(e){let t=et(),n=er(e);return Array.isArray(t[n])&&t[n].some(ea)?void 0:t[n]}function ea(e){return null===e}
6function es(e,t,n){let{maxWidth:r,minWidth:i}=e;return Math.min(null==r?100:r/n*100,Math.max(i/n*100,t))}function el(e,t,n=0,r=null){return e.clientX-(r||t.getBoundingClientRect()).left-n}function ec(e){return"panel"===e.type}function eu(e){return"resizer"===e.type}function ed(e){return Array.from(e.values()).sort(({order:e},{order:t})=>null==e&&null==t?0:null==e?-1:null==t?1:e-t)}function ef(e,t,n){let r=t.reduce((e,t)=>e+t,0),i=[...t].map(e=>e/r*100),o=0;for(let t=0;t<e.length;t++){let r=e[t],a=i[t],s=es(r,a,n);a!=s&&(o+=a-s,i[t]=s)}if("0.000"!==o.toFixed(3))for(let t=0;t<e.length;t++){let{maxWidth:r,minWidth:a}=e[t];a=a/n*100,null!=r&&(r=r/n*100);let s=Math.min(r??100,Math.max(a,i[t]+o));if(s!==i[t]&&(o-=s-i[t],i[t]=s,"0.000"===Math.abs(o).toFixed(3)))break}return i}let ep=g.I4.div`
7  display: flex;
8  flex-direction: row;
9  height: 100%;
10  overflow: hidden;
11  width: 100%;
12`,em=function(e){let t,n,r,a,s,l,c,d,f,p,m,h,y,g,v,b,w,j,_,S,E,k,P,C,$=(0,o.c)(46),{children:R}=e,A=(0,u.useRef)(null);$[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Map,$[0]=t):t=$[0];let[I,z]=(0,u.useState)(t);$[1]!==I?(r=ed(I).filter(ec),$[1]=I,$[2]=r):r=$[2],n=r,$[3]===Symbol.for("react.memo_cache_sentinel")?(a=[],$[3]=a):a=$[3];let[T,O]=(0,u.useState)(a),[M,U]=(0,u.useState)(null);$[4]!==I||$[5]!==n||$[6]!==T?(s={elements:I,panels:n,widths:T},$[4]=I,$[5]=n,$[6]=T,$[7]=s):s=$[7];let L=(0,u.useRef)(s);$[8]!==M||$[9]!==n||$[10]!==T?(l=e=>({flexGrow:function(e,t,n){if(1===e.length)return"100";let r=n[e.findIndex(e=>e.id===t)];return null==r?"0":r.toPrecision(10)}(n,e,T),pointerEvents:null===M?void 0:"none"}),$[8]=M,$[9]=n,$[10]=T,$[11]=l):l=$[11];let Y=l;$[12]===Symbol.for("react.memo_cache_sentinel")?(c=(e,t)=>{z(n=>{if(n.has(e))return n;let r=new Map(n);return r.set(e,t),r})},$[12]=c):c=$[12];let N=c;$[13]===Symbol.for("react.memo_cache_sentinel")?(d=e=>{z(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},$[13]=d):d=$[13];let W=d;$[14]===Symbol.for("react.memo_cache_sentinel")?(f={containerWidth:window.innerWidth,dragOffset:0,panelAfter:null,panelBefore:null,resizerIndex:-1,resizerRect:null,startX:0,widths:[]},$[14]=f):f=$[14];let B=(0,u.useRef)(f);$[15]!==I?(p=(e,t)=>{let n=ed(I),r=n.findIndex(t=>t.id===e),i=I.get(e);if(!i||!eu(i))return;let o=i.el.current;o&&(B.current={resizerIndex:r,panelBefore:n.reduce((e,t,n)=>ec(t)&&n<r?t:e,null),panelAfter:n.reduce((e,t,n)=>null===e&&ec(t)&&n>r?t:e,null),containerWidth:window.innerWidth,startX:t.pageX,dragOffset:el(t,o),resizerRect:o.getBoundingClientRect(),widths:L.current.widths},U(e))},$[15]=I,$[16]=p):p=$[16];let D=p;$[17]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{U(null)},$[17]=m):m=$[17];let V=m;$[18]!==I?(h=(e,t)=>{t.preventDefault(),t.stopPropagation();let{containerWidth:n,dragOffset:r,panelBefore:i,panelAfter:o,resizerRect:a}=B.current;if(null==i||null==o)return;let s=I.get(e);if(!s||!eu(s))return;let l=s.el.current;if(!l)return;let c=el(t,l,r,a);if(0===c)return;let{widths:u}=L.current,d=function(e,t,n,r,i,o){let{panels:a,widths:s}=i,{widths:l}=o,c=l||s,u=[...c];{let i=e<0?r:n,o=c[a.findIndex(e=>e.id===i.id)],s=es(i,o+Math.abs(e),t);if(o===s)return c;e=e<0?o-s:s-o}let d=0,f=e<0?n:r,p=a.findIndex(e=>e.id===f.id);for(;;){let n=a[p],r=c[p],i=es(n,r-(Math.abs(e)-Math.abs(d)),t);if(r!==i&&(d+=r-i,u[p]=i,d.toPrecision(10).localeCompare(Math.abs(e).toPrecision(10),void 0,{numeric:!0})>=0))break;if(e<0){if(--p<0)break}else if(++p>=a.length)break}return 0===d?c:(f=e<0?r:n,u[p=a.findIndex(e=>e.id===f.id)]=c[p]+d,u)}(c/A.current.getBoundingClientRect().width*100,n,i,o,L.current,B.current);u.some((e,t)=>e!==d[t])&&O(d)},$[18]=I,$[19]=h):h=$[19];let F=h;$[20]!==I||$[21]!==n||$[22]!==T?(y=()=>{L.current.elements=I,L.current.panels=n,L.current.widths=T},g=[I,n,T],$[20]=I,$[21]=n,$[22]=T,$[23]=y,$[24]=g):(y=$[23],g=$[24]),(0,u.useLayoutEffect)(y,g);let Z=function(){let e,t=(0,o.c)(1);if(t[0]===Symbol.for("react.memo_cache_sentinel")){let n=q(ei,100);e={get:eo,set:ei,setDebounced:n},t[0]=e}else e=t[0];return e}();return $[25]!==n||$[26]!==Z?(v=()=>{let{widths:e}=L.current;if(e.length===n.length)return;let t=Z.get(n);if(t){O(ef(n,t,window.innerWidth));return}O(function(e){let t=e.length,n=100,r=e.map(e=>e.defaultSize?(n-=e.defaultSize,t-=1,e.defaultSize):null),i=n/t;return r.map(e=>null===e?i:e)}(n))},b=[Z,n],$[25]=n,$[26]=Z,$[27]=v,$[28]=b):(v=$[27],b=$[28]),(0,u.useLayoutEffect)(v,b),$[29]!==n||$[30]!==Z||$[31]!==T?(w=()=>{T.length&&Z.setDebounced(n,T)},j=[Z,n,T],$[29]=n,$[30]=Z,$[31]=T,$[32]=w,$[33]=j):(w=$[32],j=$[33]),(0,u.useEffect)(w,j),$[34]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{let e=new ResizeObserver(()=>{let{panels:e,widths:t}=L.current,n=ef(e,t,window.innerWidth);t.some((e,t)=>e!==n[t])&&O(n)});return e.observe(A.current),()=>{e.disconnect()}},S=[],$[34]=_,$[35]=S):(_=$[34],S=$[35]),(0,u.useLayoutEffect)(_,S),$[36]!==M||$[37]!==F||$[38]!==Y||$[39]!==D?(k={activeResizer:M,drag:F,getPanelStyle:Y,registerElement:N,startDragging:D,stopDragging:V,unregisterElement:W},$[36]=M,$[37]=F,$[38]=Y,$[39]=D,$[40]=k):k=$[40],E=k,$[41]!==R?(P=(0,i.jsx)(ep,{ref:A,children:R}),$[41]=R,$[42]=P):P=$[42],$[43]!==E||$[44]!==P?(C=(0,i.jsx)(x.Tf.Provider,{value:E,children:P}),$[43]=E,$[44]=P,$[45]=C):C=$[45],C};function eh(e){let t,n,r,a,l,c,u,p,m,h,y,g,v,x,b,w,_=(0,o.c)(37);_[0]!==e?({children:t,message:n,onRetry:a,onContinueAnyway:r,...l}=e,_[0]=e,_[1]=t,_[2]=n,_[3]=r,_[4]=a,_[5]=l):(t=_[1],n=_[2],r=_[3],a=_[4],l=_[5]);let{t:S}=(0,d.Bdt)(f.Yi);_[6]!==S?(c=S("error-card.retry-button.text"),_[6]=S,_[7]=c):c=_[7],_[8]!==a||_[9]!==c?(u=(0,i.jsx)(j.$n,{mode:"ghost",onClick:a,text:c}
12),_[8]=a,_[9]=c,_[10]=u):u=_[10];let E=u;_[11]!==S?(p=S("error-card.continue-button.text"),_[11]=S,_[12]=p):p=_[12],_[13]!==r||_[14]!==p?(m=(0,i.jsx)(j.$n,{mode:"ghost",tone:"critical",onClick:r,text:p}),_[13]=r,_[14]=p,_[15]=m):m=_[15];let k=m;return _[16]!==S?(h=S("error-card.title"),_[16]=S,_[17]=h):h=_[17],_[18]!==h?(y=(0,i.jsx)(s.EY,{size:1,weight:"semibold",children:h}),_[18]=h,_[19]=y):y=_[19],_[20]!==n?(g=(0,i.jsx)(s.EY,{muted:!0,size:1,children:n}),_[20]=n,_[21]=g):g=_[21],_[22]!==y||_[23]!==g?(v=(0,i.jsxs)(s.BJ,{space:3,children:[y,g]}),_[22]=y,_[23]=g,_[24]=v):v=_[24],_[25]!==k||_[26]!==r||_[27]!==a||_[28]!==E?(x=a&&r?(0,i.jsxs)(s.cV,{space:2,children:[E,k]}):a?(0,i.jsx)(s.az,{children:E}):r?(0,i.jsx)(s.az,{children:k}):null,_[25]=k,_[26]=r,_[27]=a,_[28]=E,_[29]=x):x=_[29],_[30]!==t||_[31]!==v||_[32]!==x?(b=(0,i.jsx)(s.so,{align:"center",height:"fill",justify:"center",children:(0,i.jsx)(s.mc,{padding:4,sizing:"border",width:0,children:(0,i.jsxs)(s.BJ,{space:4,children:[v,t,x]})})}),_[30]=t,_[31]=v,_[32]=x,_[33]=b):b=_[33],_[34]!==l||_[35]!==b?(w=(0,i.jsx)(s.Zp,{height:"fill",...l,children:b}),_[34]=l,_[35]=b,_[36]=w):w=_[36],w}let ey=(0,u.forwardRef)(function(e,t){let n,r,a,s,l,c=(0,o.c)(11);return c[0]!==e?({searchParams:r,...n}=e,c[0]=e,c[1]=n,c[2]=r):(n=c[1],r=c[2]),c[3]!==r?(a=Object.entries(r),c[3]=r,c[4]=a):a=c[4],c[5]!==a?(s={type:void 0,_searchParams:a},c[5]=a,c[6]=s):s=c[6],c[7]!==t||c[8]!==n||c[9]!==s?(l=(0,i.jsx)(y.s8,{...n,ref:t,state:s,title:void 0}),c[7]=t,c[8]=n,c[9]=s,c[10]=l):l=c[10],l}),eg=(0,u.forwardRef)(function(e,t){let n,r,a,s,l,c,u,d=(0,o.c)(15);if(d[0]!==e){let{documentId:t,documentType:i,parentRefPath:o,template:l,searchParams:c,...u}=e;n=t,r=i,s=c,a=u,d[0]=e,d[1]=n,d[2]=r,d[3]=a,d[4]=s}else n=d[1],r=d[2],a=d[3],s=d[4];return d[5]!==s?(l=Object.entries(s),d[5]=s,d[6]=l):l=d[6],d[7]!==n||d[8]!==r||d[9]!==l?(c={id:n,type:r,_searchParams:l},d[7]=n,d[8]=r,d[9]=l,d[10]=c):c=d[10],d[11]!==t||d[12]!==a||d[13]!==c?(u=(0,i.jsx)(y.s8,{...a,ref:t,state:c,title:void 0}),d[11]=t,d[12]=a,d[13]=c,d[14]=u):u=d[14],u});function ev(e){let t,n,r,a,s,l,c,u,f,p,m,h=(0,o.c)(26),{children:g,onStructureParams:v,structureParams:b,searchParams:w,refs:j}=e,{state:_,resolvePathFromState:S}=(0,y.rd)();h[0]!==_._searchParams?(t=Object.fromEntries(_._searchParams||[]),h[0]=_._searchParams,h[1]=t):t=h[1];let E=(0,d.$6H)(t);h[2]!==S||h[3]!==E||h[4]!==_?(n=e=>{let t=S(_),n=function(e){let t=["comment","inspect","instruction","pathKey","rev","since","template","view"];return function(e={}){let t=Object.entries(e).map(([e,t])=>`${e}=${t}`).join("&");return t.length?`?${t}`:""}(Object.entries(e).filter(([e])=>t.includes(e)).reduce((e,[t,n])=>null==n?e:{...e,[t]:n},{}))}({...E,...e});return`${t}${n}`},h[2]=S,h[3]=E,h[4]=_,h[5]=n):n=h[5];let k=n;return h[6]===Symbol.for("react.memo_cache_sentinel")?(a={},h[6]=a):a=h[6],h[7]===Symbol.for("react.memo_cache_sentinel")?(s=[],h[7]=s):s=h[7],h[8]!==j||h[9]!==w?(l=e=>{let{childId:t,...n}=e,r=j?.find(e=>e._id===t||d.IMx(e._id)===t);return r?(0,i.jsx)(y.s8,{...n,state:{id:t,type:r._type,_searchParams:Object.entries(w)}}):(0,i.jsx)("div",{...n})},h[8]=j,h[9]=w,h[10]=l):l=h[10],h[11]!==w?(c=e=>(0,i.jsx)(ey,{...e,searchParams:w}),u=e=>(0,i.jsx)(eg,{...e,searchParams:w}),h[11]=w,h[12]=c,h[13]=u):(c=h[12],u=h[13]),h[14]!==v?(f=e=>{v({...e,inspect:e.inspect??void 0})},h[14]=v,h[15]=f):f=h[15],h[16]!==k||h[17]!==b||h[18]!==l||h[19]!==c||h[20]!==u||h[21]!==f?(p={index:0,groupIndex:0,siblingIndex:0,payload:a,params:b,hasGroupSiblings:!1,groupLength:1,routerPanesState:s,ChildLink:l,BackLink:c,ReferenceChildLink:u,ParameterizedLink:eP,closeCurrentAndAfter:ek,handleEditReference:eE,replaceCurrent:eS,closeCurrent:e_,duplicateCurrent:ej,setView:ew,setParams:f,setPayload:eb,navigateIntent:ex,createPathWithParams:k},h[16]=k,h[17]=b,h[18]=l,h[19]=c,h[20]=u,h[21]=f,h[22]=p):p=h[22],r=p,h[23]!==g||h[24]!==r?(m=(0,i.jsx)(x.l4.Provider,{value:r,children:g}),h[23]=g,h[24]=r,h[25]=m):m=h[25],m}function ex(e,t,n){console.warn("navigateIntent",e,t,n)}function eb(e){console.warn("setPayload",e)}
12function ew(e){console.warn("setView",e)}function ej(e){console.warn("duplicateCurrent",e)}function e_(){console.warn("closeCurrent")}function eS(e){console.warn("replaceCurrent",e)}function eE(e){console.warn("handleEditReference",e)}function ek(){console.warn("closeCurrentAndAfter")}function eP(){throw Error("ParameterizedLink not implemented")}let eC=(0,g.I4)(w.PaneLayout)`
13  height: 100%;
14`,e$=(0,g.I4)(s.so)`
15  & > div {
16    min-width: none !important;
17    max-width: none !important;
18  }
19`,eR=(0,g.I4)(s.Cy)`
20  white-space: pre-wrap;
21`;function eA(e){let t,n,r,a,l,c,p,m,h,y,g,v=(0,o.c)(33),{mainDocumentState:x,onStructureParams:b,searchParams:_,refs:S}=e,{t:E}=(0,d.Bdt)(f.Yi),{devMode:k}=(0,f.Qe)();if(v[0]!==x?.document?._id||v[1]!==S){let e;v[3]!==x?.document?._id?(e=e=>(0,d.IMx)(e._id)!==x?.document?._id,v[3]=x?.document?._id,v[4]=e):e=v[4],n=S.filter(e).map(ez),v[0]=x?.document?._id,v[1]=S,v[2]=n}else n=v[2];t=n,v[5]!==t?(a={filter:"_id in $ids",params:{ids:t}},v[5]=t,v[6]=a):a=v[6],v[7]!==E?(l=E("document-list-pane.document-list.title"),v[7]=E,v[8]=l):l=v[8],v[9]!==a||v[10]!==l?(c={id:"$root",options:a,schemaTypeName:"",title:l,type:"documentList"},v[9]=a,v[10]=l,v[11]=c):c=v[11],r=c;let[P,C]=(0,u.useState)(null);v[12]===Symbol.for("react.memo_cache_sentinel")?(p=()=>C(null),v[12]=p):p=v[12];let $=p,[R]=(0,u.useState)(eI);if(v[13]===Symbol.for("react.memo_cache_sentinel")?(m=()=>C(null),v[13]=m):m=v[13],v[14]!==S?(h=[S],v[14]=S,v[15]=h):h=v[15],(0,u.useEffect)(m,h),P){let e,t,n;return v[16]!==E?(e=E("document-list-pane.error.text"),v[16]=E,v[17]=e):e=v[17],v[18]!==k||v[19]!==P||v[20]!==E?(t=k&&(0,i.jsx)(s.Zp,{overflow:"auto",padding:3,radius:2,tone:"critical",children:(0,i.jsxs)(s.BJ,{space:3,children:[(0,i.jsx)(s.JU,{muted:!0,size:0,children:E("presentation-error.label")}),(0,i.jsx)(eR,{size:1,children:P.error.message})]})}),v[18]=k,v[19]=P,v[20]=E,v[21]=t):t=v[21],v[22]!==t||v[23]!==e?(n=(0,i.jsx)(eh,{flex:1,message:e,onRetry:$,children:t}),v[22]=t,v[23]=e,v[24]=n):n=v[24],n}return v[25]!==r?(y=(0,i.jsx)(e$,{direction:"column",flex:1,children:(0,i.jsx)(w.PaneContainer,{index:0,itemId:"$root",pane:r,paneKey:"$root"})}),v[25]=r,v[26]=y):y=v[26],v[27]!==b||v[28]!==S||v[29]!==_||v[30]!==R||v[31]!==y?(g=(0,i.jsx)(j.tH,{onCatch:C,children:(0,i.jsx)(eC,{children:(0,i.jsx)(w.StructureToolProvider,{children:(0,i.jsx)(ev,{onStructureParams:b,structureParams:R,searchParams:_,refs:S,children:y})})})}),v[27]=b,v[28]=S,v[29]=_,v[30]=R,v[31]=y,v[32]=g):g=v[32],g}function eI(){return{}}function ez(e){return(0,d.IMx)(e._id)}let eT=(0,g.I4)(s.Cy)`
22  white-space: pre-wrap;
23`;function eO(e){let t,n,r,a,l,c,p,m,h,g,v,x=(0,o.c)(35),{documentId:b,documentType:_,onFocusPath:S,onStructureParams:E,searchParams:k,structureParams:P}=e,{template:C,templateParams:$}=P,{t:R}=(0,d.Bdt)(f.Yi),{devMode:A}=(0,f.Qe)();x[0]!==$?(n=(0,y.fA)($),x[0]=$,x[1]=n):n=x[1],x[2]!==b||x[3]!==_||x[4]!==n||x[5]!==C?(r={id:b,type:_,template:C,templateParameters:n},x[2]=b,x[3]=_,x[4]=n,x[5]=C,x[6]=r):r=x[6],x[7]!==b||x[8]!==r?(a={id:b,options:r,title:"",type:"document"},x[7]=b,x[8]=r,x[9]=a):a=x[9],t=a;let[I,z]=(0,u.useState)(null);x[10]===Symbol.for("react.memo_cache_sentinel")?(l=()=>z(null),x[10]=l):l=x[10];let T=l;if(x[11]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{z(null)},x[11]=c):c=x[11],x[12]!==b||x[13]!==_||x[14]!==P?(p=[b,_,P],x[12]=b,x[13]=_,x[14]=P,x[15]=p):p=x[15],(0,u.useEffect)(c,p),I){let e,t,n;return x[16]!==R?(e=R("document-pane.error.text"),x[16]=R,x[17]=e):e=x[17],x[18]!==A||x[19]!==I||x[20]!==R?(t=A&&(0,i.jsx)(s.Zp,{overflow:"auto",padding:3,radius:2,tone:"critical",children:(0,i.jsxs)(s.BJ,{space:3,children:[(0,i.jsx)(s.JU,{muted:!0,size:0,children:R("presentation-error.label")}),(0,i.jsx)(eT,{size:1,children:I.error.message})]})}),x[18]=A,x[19]=I,x[20]=R,x[21]=t):t=x[21],x[22]!==e||x[23]!==t?(n=(0,i.jsx)(eh,{flex:1,message:e,onRetry:T,children:t}),x[22]=e,x[23]=t,x[24]=n):n=x[24],n}return x[25]===Symbol.for("react.memo_cache_sentinel")?(m={height:"100%"},x[25]=m):m=x[25],x[26]===Symbol.for("react.memo_cache_sentinel")?(h=(0,i.jsx)(f.gu,{}),x[26]=h):h=x[26],x[27]!==S||x[28]!==t?(g=(0,i.jsx)(u.Suspense,{fallback:h,children:(0,i.jsx)(w.DocumentPane,{paneKey:"document",index:1,itemId:"document",pane:t,onFocusPath:S})}),x[27]=S,x[28]=t,x[29]=g):g=x[29],x[30]!==E||x[31]!==k||x[32]!==P||x[33]!==g?(v=(0,i.jsx)(j.tH,{onCatch:z,children:(0,i.jsx)(w.PaneLayout,{style:m,children:(0,i.jsx)(ev,{searchParams:k,onStructureParam
23s:E,structureParams:P,children:g})})}),x[30]=E,x[31]=k,x[32]=P,x[33]=g,x[34]=v):v=x[34],v}function eM(e){let t,n=(0,o.c)(7),{documentId:r,documentType:a,onFocusPath:s,onStructureParams:l,searchParams:c,structureParams:u}=e;return n[0]!==r||n[1]!==a||n[2]!==s||n[3]!==l||n[4]!==c||n[5]!==u?(t=(0,i.jsx)(w.StructureToolProvider,{children:(0,i.jsx)(eO,{documentId:r,documentType:a,onFocusPath:s,onStructureParams:l,searchParams:c,structureParams:u})}),n[0]=r,n[1]=a,n[2]=s,n[3]=l,n[4]=c,n[5]=u,n[6]=t):t=n[6],t}function eU(e){let t,n,r,a,l,c,p,m=(0,o.c)(39),{documentId:h,documentType:g,mainDocumentState:v,onFocusPath:x,onStructureParams:w,refs:j,searchParams:_,structureParams:S}=e,{t:E}=(0,d.Bdt)(f.Yi),k=(0,d.pDY)();m[0]!==v?.document?._id||m[1]!==v?.document?._type||m[2]!==_?(t=e=>(0,i.jsx)(y.s8,{...e,state:{id:v?.document?._id,type:v?.document?._type,_searchParams:Object.entries(_)}}),m[0]=v?.document?._id,m[1]=v?.document?._type,m[2]=_,m[3]=t):t=m[3];let P=t;m[4]!==v?.document?._type||m[5]!==k?(r=k.get(v?.document?._type||"shoe"),m[4]=v?.document?._type,m[5]=k,m[6]=r):r=m[6],n=r;let C=function(e,t){let n,r,i,a=(0,o.c)(6),s=(0,d.yKO)();a[0]===Symbol.for("react.memo_cache_sentinel")?(n={},a[0]=n):n=a[0];let[l,c]=(0,u.useState)(n);return a[1]!==e||a[2]!==s||a[3]!==t?(r=()=>{if(!t)return;let n=(0,d.TU6)(s,t,e,"").subscribe(e=>{c(e)});return()=>{n?.unsubscribe()}},i=[s,t,e],a[1]=e,a[2]=s,a[3]=t,a[4]=r,a[5]=i):(r=a[4],i=a[5]),(0,u.useEffect)(r,i),l}(v?.document?._id||"",n);e:{let e,t,r,o;if(!v?.document){a=null;break e}let l=v.document;m[7]!==C.draft||m[8]!==C.published||m[9]!==l?(e=(0,d.ADU)({value:l,published:C.published,draft:C.draft}),m[7]=C.draft,m[8]=C.published,m[9]=l,m[10]=e):e=m[10],m[11]!==E?(t=E("main-document.label"),m[11]=E,m[12]=t):t=m[12],m[13]!==t?(r=(0,i.jsx)(s.Zp,{padding:1,radius:2,shadow:1,children:(0,i.jsx)(s.EY,{muted:!0,size:0,weight:"medium",children:t})}),m[13]=t,m[14]=r):r=m[14],m[15]!==n||m[16]!==e||m[17]!==r?(o=(0,i.jsx)(d.m6P,{...e,schemaType:n,status:r}),m[15]=n,m[16]=e,m[17]=r,m[18]=o):o=m[18],a=o}let $=a;if(h&&g){let e;return m[19]!==h||m[20]!==g||m[21]!==x||m[22]!==w||m[23]!==_||m[24]!==S?(e=(0,i.jsx)(eM,{documentId:h,documentType:g,onFocusPath:x,onStructureParams:w,searchParams:_,structureParams:S}),m[19]=h,m[20]=g,m[21]=x,m[22]=w,m[23]=_,m[24]=S,m[25]=e):e=m[25],e}return m[26]!==P||m[27]!==v||m[28]!==$||m[29]!==E?(l=v&&(0,i.jsx)(s.Zp,{padding:3,tone:v.document?"inherit":"caution",children:v.document?(0,i.jsx)(d.Ns2,{__unstable_focusRing:!0,as:P,"data-as":"a",radius:2,sizing:"border",tone:"inherit",children:$}):(0,i.jsx)(s.Zp,{padding:2,radius:2,tone:"inherit",children:(0,i.jsxs)(s.so,{gap:3,children:[(0,i.jsx)(s.az,{flex:"none",children:(0,i.jsx)(s.EY,{size:1,children:(0,i.jsx)(b.sAQ,{})})}),(0,i.jsx)(s.az,{flex:1,children:(0,i.jsx)(s.EY,{size:1,children:(0,i.jsx)(d.HTc,{t:E,i18nKey:"main-document.missing.text",components:{Code:"code"},values:{path:v.path}})})})]})})}),m[26]=P,m[27]=v,m[28]=$,m[29]=E,m[30]=l):l=m[30],m[31]!==v||m[32]!==w||m[33]!==j||m[34]!==_?(c=(0,i.jsx)(eA,{mainDocumentState:v,onStructureParams:w,searchParams:_,refs:j}),m[31]=v,m[32]=w,m[33]=j,m[34]=_,m[35]=c):c=m[35],m[36]!==l||m[37]!==c?(p=(0,i.jsxs)(s.so,{direction:"column",flex:1,height:"fill",children:[l,c]}),m[36]=l,m[37]=c,m[38]=p):p=m[38],p}let eL=g.I4.div`
24  position: relative;
25`,eY=g.I4.div`
26  position: absolute;
27  top: 0;
28  bottom: 0;
29  left: -5px;
30  width: 9px;
31  z-index: 10;
32  cursor: ${({$disabled:e})=>e?"auto":"ew-resize"};
33
34  /* Border */
35  & > span:nth-child(1) {
36    display: block;
37    border-left: 1px solid var(--card-border-color);
38    position: absolute;
39    top: 0;
40    left: 4px;
41    bottom: 0;
42    transition: opacity 200ms;
43  }
44
45  ${({$disabled:e})=>!e&&`
46    /* Hover effect */
47    & > span:nth-child(2) {
48      display: block;
49      position: absolute;
50      top: 0;
51      left: 0;
52      width: 9px;
53      bottom: 0;
54      background-color: var(--card-border-color);
55      opacity: 0;
56      transition: opacity 150ms;
57    }
58
59    @media (hover: hover) {
60      &:hover > span:nth-child(2) {
61        opacity: 0.2;
62      }
63    }
64  `}
65`,eN=function(e){let t,n,r,a,s,l,c,d,f,p,m,h=(0,o.c)(27),{id:y,order:g,disabled:v}=e,b=void 0!==v&&v,w=(0,u.useRef)(null),j=(0,u.useContext)(x.Tf);if(null===j)throw Error("Panel components must be rendered within a PanelGroup container");let _=function(e){let t,n=(0,o.c)(2);n[0]!==e?(t=()=>e||P(),n[0]=e,n[1]=t):t=n[1];let[r]=(0,u.useState)(t);return r}(y),{activeResizer:S,drag:E,startDragging:k,stopDragging:C,registerElement:$,unregisterElement:R}=j,A=S===_;if(null===j)throw Error("Panel components must be rendered within a PanelGroup container");h[0]!==_||h[1]!==k?(t=e=>{k(_,e.nativeEvent)},h[0]=_,h[1]=k,h[2]=t):t=h[2];let I=t;h[3]!==E||h[4]!==_?(n=e=>{E(_,e)},h[3]=E,h[4]=_,h[5]=n):n=h[5];let z=n;h[6]!==C?(r=()=>{w.current.blur(),C()},h[6]=C,h[7]=r):r=h[7];let T=r;return h[8]!==b||h[9]!==A||h[10]!==z||h[11]!==T?(a=()=>
65{if(!A||b)return;let e=function(){let e=document.body.style,t=document.documentElement.style,{cursor:n}=t,{userSelect:r}=e;return t.cursor="ew-resize",e.userSelect="none",()=>{n?t.cursor=n:t.removeProperty("cursor"),r?e.userSelect=r:e.removeProperty("user-select")}}();return window.addEventListener("mousemove",z),window.addEventListener("mouseup",T),window.addEventListener("contextmenu",T),()=>{e(),window.removeEventListener("mousemove",z),window.removeEventListener("mouseup",T),window.removeEventListener("contextmenu",T)}},s=[b,A,z,T],h[8]=b,h[9]=A,h[10]=z,h[11]=T,h[12]=a,h[13]=s):(a=h[12],s=h[13]),(0,u.useEffect)(a,s),h[14]!==_||h[15]!==g||h[16]!==$||h[17]!==R?(l=()=>($(_,{id:_,order:g,type:"resizer",el:w}),()=>{R(_)}),c=[_,g,$,R],h[14]=_,h[15]=g,h[16]=$,h[17]=R,h[18]=l,h[19]=c):(l=h[18],c=h[19]),(0,u.useLayoutEffect)(l,c),h[20]===Symbol.for("react.memo_cache_sentinel")?(f=(0,i.jsx)("span",{}),d=(0,i.jsx)("span",{}),h[20]=d,h[21]=f):(d=h[20],f=h[21]),h[22]!==b?(p=(0,i.jsxs)(eY,{$disabled:b,children:[f,d]}),h[22]=b,h[23]=p):p=h[23],h[24]!==I||h[25]!==p?(m=(0,i.jsx)(eL,{onMouseDown:I,ref:w,children:p}),h[24]=I,h[25]=p,h[26]=m):m=h[26],m},eW=e=>{let t,n,r,a=(0,o.c)(8),{documentId:s,setDisplayedDocument:l,getCommentIntent:c}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)(eN,{order:4}),a[0]=t):t=a[0],a[1]!==c||a[2]!==e.children?(n=(0,i.jsx)(d.S4U,{getIntent:c,children:e.children}),a[1]=c,a[2]=e.children,a[3]=n):n=a[3],a[4]!==s||a[5]!==l||a[6]!==n?(r=(0,i.jsxs)(i.Fragment,{children:[t,(0,i.jsx)(Q,{id:"content",minWidth:325,order:5,children:(0,i.jsx)(_.C,{documentId:s,setDisplayedDocument:l,children:n})})]}),a[4]=s,a[5]=l,a[6]=n,a[7]=r):r=a[7],r},eB=e=>{let t,n,r=(0,o.c)(14),{documentId:a,documentsOnPage:s,documentType:l,getCommentIntent:c,mainDocumentState:u,onFocusPath:d,onStructureParams:f,searchParams:p,setDisplayedDocument:m,structureParams:h}=e;return r[0]!==a||r[1]!==l||r[2]!==s||r[3]!==u||r[4]!==d||r[5]!==f||r[6]!==p||r[7]!==h?(t=(0,i.jsx)(eU,{documentId:a,documentType:l,mainDocumentState:u,onFocusPath:d,onStructureParams:f,refs:s,searchParams:p,structureParams:h}),r[0]=a,r[1]=l,r[2]=s,r[3]=u,r[4]=d,r[5]=f,r[6]=p,r[7]=h,r[8]=t):t=r[8],r[9]!==a||r[10]!==c||r[11]!==m||r[12]!==t?(n=(0,i.jsx)(eW,{documentId:a,getCommentIntent:c,setDisplayedDocument:m,children:t}),r[9]=a,r[10]=c,r[11]=m,r[12]=t,r[13]=n):n=r[13],n},eD=function(e){let t,n,r=(0,o.c)(5),{children:a,navigate:s}=e;r[0]!==s?(t=(e,t)=>{s((void 0===t?void 0:t)||{},e?{preview:e}:{})},r[0]=s,r[1]=t):t=r[1];let l=t;return r[2]!==a||r[3]!==l?(n=(0,i.jsx)(x.iY.Provider,{value:l,children:a}),r[2]=a,r[3]=l,r[4]=n):n=r[4],n};function eV(e){return!e}let eF=(0,u.memo)(function(e){let t,n,r,a,s=(0,o.c)(11),{minWidth:l,maxWidth:c,component:u}=e,d=null!=l&&null!=c&&l===c;return s[0]!==u?(t=(0,i.jsx)(u,{}),s[0]=u,s[1]=t):t=s[1],s[2]!==c||s[3]!==l||s[4]!==t?(n=(0,i.jsx)(Q,{id:"navigator",minWidth:l,maxWidth:c,order:1,children:t}),s[2]=c,s[3]=l,s[4]=t,s[5]=n):n=s[5],s[6]!==d?(r=(0,i.jsx)(eN,{order:2,disabled:d}),s[6]=d,s[7]=r):r=s[7],s[8]!==n||s[9]!==r?(a=(0,i.jsxs)(i.Fragment,{children:[n,r]}),s[8]=n,s[9]=r,s[10]=a):a=s[10],a}),eZ=function(e){let t,n=(0,o.c)(3),{children:r,params:a}=e;return n[0]!==r||n[1]!==a?(t=(0,i.jsx)(x.ix.Provider,{value:a,children:r}),n[0]=r,n[1]=a,n[2]=t):t=n[2],t},eJ=function(e){let t,n,r,a=(0,o.c)(10),{children:s,devMode:l,name:c,navigate:u,params:d,searchParams:f,structureParams:p}=e;return a[0]!==l||a[1]!==c||a[2]!==u||a[3]!==d||a[4]!==f||a[5]!==p?(n={devMode:l,name:c,navigate:u,params:d,searchParams:f,structureParams:p},a[0]=l,a[1]=c,a[2]=u,a[3]=d,a[4]=f,a[5]=p,a[6]=n):n=a[6],t=n,a[7]!==s||a[8]!==t?(r=(0,i.jsx)(x.SM.Provider,{value:t,children:s}),a[7]=s,a[8]=t,a[9]=r):r=a[9],r};function eH(e){return Array.isArray(e)?e.join(","):e}let eK=C.P.create(g.I4.iframe`
66  box-shadow: 0 0 0 1px var(--card-border-color);
67  border: 0;
68  max-height: 100%;
69  width: 100%;
70  view-transition-class: presentation-tool-iframe;
71`),eq=(0,g.I4)(s.az)`
72  position: absolute;
73  inset: 0;
74  background: transparent;
75`,eX=(0,u.forwardRef)(function(e,t){let n,r,a,s,l=(0,o.c)(16),{animate:c,initial:d,onLoad:f,preventClick:p,src:m,variants:h,style:y}=e,g=`presentation-tool-iframe-${(0,u.useId)().replace(/[^a-zA-Z0-9-_]/g,"_")}`;return l[0]!==y||l[1]!==g?(n={...y,viewTransitionName:g},l[0]=y,l[1]=g,l[2]=n):n=l[2],l[3]!==c||l[4]!==d||l[5]!==f||l[6]!==t||l[7]!==m||l[8]!==n||l[9]!==h?(r=(0,i.jsx)(eK,{style:n,animate:c,initial:d,onLoad:f,ref:t,src:m,variants:h}),l[3]=c,l[4]=d,l[5]=f,l[6]=t,l[7]=m,l[8]=n,l[9]=h,l[10]=r):r=l[10],l[11]!==p?(a=p&&(0,i.jsx)(eq,{}),l[11]=p,l[12]=a):a=l[12],l[13]!==r||l[14]!==a?(s=(0,i.jsxs)(i.Fragment,{children:[r,a]}),l[13]=r,l[14]=a,l[15]=s):s=l[15],s});function eG(e){let t,n,r,a,l,c,u,p=(0,o.c)(16),{openPopup:m,previewLocationOrigin:h,previewLocationRoute:y}=e,{t:g}=(0,d.Bdt)(f.Yi);p[0]!==m?(t=e=>{e.preventDefault(),m(e.currentTarget.href)},p[0]=m,p[1]=t):t=p[1];let v=t;p[2]!==g?(n=g("share-url.menu-item.open.text"),p[2]=g,p[3]=n):n=p[3],p[4]!==n?(r=(0,i.jsx)(s.EY,{size:1,children:n}),p[4]=n,p[5]=r):r=p[5],p[6]===Symbol.for("react.memo_cache_sentinel")?(a=["bottom-start"],p[6]=a):a=p[6],p[7]!==g?(l=g("share-url.menu-item.open.text"),p[7]=g,p[8]=l):l=p[8];let x=`${h}${y}`;return p[9]!==v||p[10]!==l||p[11]!==x?(c=(0,i.jsx)(j.$n,{as:"a","aria-label":l,icon:b.ZPM,mode:"bleed",href:x,rel:"opener",target:"_blank",tooltipProps:null,onClick:v}),p[9]=v,p[10]=l,p[11]=x,p[12]=c):c=p[12],p[13]!==r||p[14]!==c?(u=(0,i.jsx)(j.m_,{animate:!0,content:r,fallbackPlacements:a,placement:"bottom",portal:!0,children:c}),p[13]=r,p[14]=c,p[15]=u):u=p[15],u}let eQ=function(e){let t,n,r,a,l,c,p,m,h,y,g=(0,o.c)(27),{fontSize:v,onCh
75ange:x,origin:w,padding:j,prefix:_,suffix:S,value:E}=e,k=void 0===v?1:v,P=void 0===j?3:j,{t:C}=(0,d.Bdt)(f.Yi),{basePath:$}=d.VrO()?.activeWorkspace||{},R=void 0===$?"/":$,A=(0,u.useRef)(null),[I,z]=(0,u.useState)(void 0),[T,O]=(0,u.useState)(void 0);g[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{z(e.currentTarget.value)},g[0]=t):t=g[0];let M=t;g[1]!==R||g[2]!==x||g[3]!==w||g[4]!==I||g[5]!==C?(n=e=>{if("Enter"===e.key){if(void 0===I)return;let e=I.startsWith("/")||""===I?`${w}${I}`:I;if(!e.startsWith(`${w}/`)&&e!==w){O(C("preview-location-input.error",{origin:w,context:"missing-origin"}));return}if(!w&&(e.startsWith(`${R}/`)||e===R)){O(C("preview-location-input.error",{basePath:R,context:"same-base-path"}));return}let t=e===w?`${w}/`:e;O(void 0),z(void 0),x(t.slice(w.length)),A.current?.blur()}"Escape"===e.key&&(O(void 0),z(void 0))},g[1]=R,g[2]=x,g[3]=w,g[4]=I,g[5]=C,g[6]=n):n=g[6];let U=n;g[7]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{O(void 0),z(void 0)},g[7]=r):r=g[7];let L=r;g[8]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{O(void 0),z(void 0)},g[8]=a):a=g[8],g[9]!==w||g[10]!==E?(l=[w,E],g[9]=w,g[10]=E,g[11]=l):l=g[11],(0,u.useEffect)(a,l),g[12]===Symbol.for("react.memo_cache_sentinel")?(p={icon:b.NAP},g[12]=p):p=g[12],c=p;let Y=T?c:void 0;g[13]!==w||g[14]!==E?(m=()=>{O(void 0),z(w+E)},g[13]=w,g[14]=E,g[15]=m):m=g[15],g[16]===Symbol.for("react.memo_cache_sentinel")?(h={zIndex:1},g[16]=h):h=g[16];let N=void 0===I?`${w}${E}`:I;return g[17]!==T||g[18]!==k||g[19]!==U||g[20]!==P||g[21]!==_||g[22]!==S||g[23]!==Y||g[24]!==m||g[25]!==N?(y=(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(s.ks,{clearButton:Y,customValidity:T,fontSize:k,onBlur:L,onClear:m,onChange:M,onKeyDownCapture:U,padding:P,prefix:_,style:h,radius:2,ref:A,space:P,suffix:S,value:N})}),g[17]=T,g[18]=k,g[19]=U,g[20]=P,g[21]=_,g[22]=S,g[23]=Y,g[24]=m,g[25]=N,g[26]=y):y=g[26],y},e0=(0,u.lazy)(()=>n.e(8634).then(n.bind(n,98634))),e1=(0,g.I4)(O.jM)`
76  position: absolute;
77  top: 50%;
78  left: 50%;
79  transform: translate(-50%, -50%);
80  height: ${24}px;
81  width: ${24}px;
82`,e2=C.P.create(s.y$),e3=C.P.create(s.EY),e4=C.P.create(e1),e5=(0,u.memo)(function(e){let{canToggleSharePreviewAccess:t,canUseSharedPreviewAccess:n,initialUrl:r,previewLocationRoute:o,perspective:c}=e,{t:p}=(0,d.Bdt)(f.Yi),{push:m}=(0,l.dj)(),h=(0,d.tH7)({apiVersion:f.mG}),y=(0,d.iZK)(),[g,v]=(0,u.useState)(!0),[x,w]=(0,u.useState)(!1),[_,S]=(0,u.useState)(!1),[E,k]=(0,u.useState)(null),P=x||_||g,C=(0,u.useMemo)(()=>E?function(e,t,n,r){let i=new URL(e),{searchParams:o}=i;return t&&(o.set(a.Vm,t),o.set(a.Zm,n)),o.set(a.Pd,r),i}(r,E,o,eH(c)):null,[r,c,o,E]),[R,A]=(0,u.useState)(null);if(R)throw R;let I=(0,u.useCallback)(()=>{m({closable:!0,status:"warning",title:p("share-preview-menu.error_toggle-sharing",{context:"toggle-sharing"})})},[m,p]),z=(0,u.useCallback)(async()=>{try{S(!0),await L(h,"@sanity/presentation",typeof window>"u"?"":location.href,y?.id),k(null)}catch(e){A(e)}finally{S(!1)}},[h,y?.id]),T=(0,u.useCallback)(async()=>{try{w(!0);let e=await U(h,"@sanity/presentation",typeof window>"u"?"":location.href,y?.id);k(e.secret)}catch(e){A(e)}finally{w(!1)}},[h,y?.id]),O=(0,u.useCallback)(()=>{try{if(!C)throw Error("No URL to copy");navigator.clipboard.writeText(C.toString()),m({closable:!0,status:"success",title:p("share-url.clipboard.status",{context:"success"})})}catch(e){A(e)}},[m,p,C]);return(0,u.useEffect)(()=>{let e=new AbortController,t=[];async function n(e,n){let{result:r,syncTags:i}=await h.fetch(a._g,{},{filterResponse:!1,lastLiveEventId:e,tag:"presentation.fetch-shared-access-secret"});Array.isArray(i)&&(t=i),n.aborted||k(r)}let r=h.live.events().subscribe({next:r=>{"message"===r.type&&(e.abort(),e=new AbortController,r.tags.some(e=>t.includes(e))&&n(r.id,e.signal))},error:A});return n(null,e.signal).finally(()=>v(!1)),()=>{r.unsubscribe(),e.abort()}},[h]),(0,i.jsx)(j.IU,{button:(0,i.jsx)(j.$n,{"aria-label":p("preview-frame.share-button.aria-label"),icon:b.liv,mode:"bleed",tooltipProps:null}),id:"share-menu",menu:(0,i.jsx)(s.W1,{style:{maxWidth:248},padding:n?void 0:0,children:n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("label",{style:{cursor:"pointer"},children:(0,i.jsxs)(s.xA,{columns:2,rows:2,gapX:3,gapY:1,style:{justifyContent:"center",alignItems:"center",gridTemplateColumns:"min-content 1fr",gridTemplateRows:"min-content"},paddingTop:3,paddingX:3,children:[(0,i.jsx)(j.m_,{animate:!0,content:(0,i.jsx)(s.EY,{size:1,children:p("share-preview-menu.toggle-button.tooltip",{context:C?"disable":"enable"})}),fallbackPlacements:["bottom-start"],placement:"bottom",portal:!0,children:(0,i.jsx)(s.dO,{checked:x||null!==C&&!_,readOnly:x||_,indeterminate:g,onChange:t?C?z:T:I})}),(0,i.jsx)(s.EY,{size:1,weight:"medium",children:p("share-preview-menu.toggle-button.label",{context:"first-line"})}),(0,i.jsx)("span",{}),(0,i.jsx)(s.EY,{muted:!0,size:1,children:p("share-preview-menu.toggle-button.label",{context:"second-line"})})]})}),(0,i.jsx)(s.az,{padding:3,paddingTop:2,children:(0,i.jsxs)(s.BJ,{space:3,children:[(0,i.jsx)(s.Zp,{tone:P||!C?"transparent":void 0,style:{position:"relative",aspectRatio:"1 / 1",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)($.N,{children:P?(0,i.jsx)(e2,{muted:!0,initial:{opacity:0}
82,animate:{opacity:1},exit:{opacity:0}}):C?(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(u.Suspense,{fallback:(0,i.jsx)(s.y$,{}),children:[(0,i.jsx)(e0,{title:p("share-preview-menu.qr-code.title",{url:C.toString()}),value:C.toString(),size:224,color:"var(--card-fg-color)",logoSize:40}),(0,i.jsx)(e4,{initial:{opacity:-.5},animate:{opacity:1.5},exit:{opacity:0}})]})}):(0,i.jsx)(e3,{muted:!0,size:1,style:{maxWidth:"100px",textWrap:"pretty",textAlign:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:p("share-preview-menu.qr-code.placeholder")})})}),(0,i.jsx)(s.EY,{muted:!0,size:1,children:p("share-preview-menu.qr-code.instructions")})]})}),(0,i.jsx)(s.Nj,{}),(0,i.jsx)(j.Dr,{disabled:!C||_,icon:b.TdU,onClick:O,text:p("share-preview-menu.copy-url.text")})]}):(0,i.jsx)(s.Zp,{padding:2,tone:"caution",radius:3,children:(0,i.jsx)(s.EY,{style:{textWrap:"pretty"},children:p("share-preview-menu.error",{context:"missing-grants"})})})}),popover:{constrainSize:!0,placement:"bottom",portal:!0}})});e5.displayName="Memo(SharePreviewMenu)";let e6=e=>{let t,n,r,l,c,u,p,m,h,y,g,v,x,w,_,S,E,k,P,C,$,R,A,I,z,T,O,M,U,L,Y,N,W,B,D,V,F=(0,o.c)(97),{canSharePreviewAccess:Z,canToggleSharePreviewAccess:J,canUseSharedPreviewAccess:H,dispatch:K,iframe:q,iframeRef:X,initialUrl:G,navigatorEnabled:Q,onPathChange:ee,onRefresh:et,openPopup:en,overlaysConnection:er,perspective:ei,previewUrl:eo,setViewport:ea,targetOrigin:es,toggleNavigator:el,toggleOverlay:ec,viewport:eu,visualEditing:ed}=e,{overlaysEnabled:ef}=ed,{t:ep}=(0,d.Bdt)(f.Yi);F[0]!==ea||F[1]!==eu?(t=()=>ea("desktop"===eu?"mobile":"desktop"),F[0]=ea,F[1]=eu,F[2]=t):t=F[2];let em=t;n=es===location.origin?"":es,F[3]!==K||F[4]!==X.current||F[5]!==et||F[6]!==eo||F[7]!==es?(r=()=>{et(()=>{X.current&&(K({type:f.my}),Object.assign(X.current,{src:`${es}${eo||"/"}`}))})},F[3]=K,F[4]=X.current,F[5]=et,F[6]=eo,F[7]=es,F[8]=r):r=F[8];let eh=r,{pathname:ey,search:eg}=function(e){let t=new URL(e),{searchParams:n}=t;return n.delete(a.Zm),n.delete(a.Vm),n.delete(a.Pd),n.delete(a.tt),n.delete(a.c4),t}(new URL(eo||"/",es));l=`${ey}${eg}`,F[9]===Symbol.for("react.memo_cache_sentinel")?(c={width:"100%"},F[9]=c):c=F[9],F[10]!==Q||F[11]!==ep||F[12]!==el?(u=el&&(0,i.jsx)(j.$n,{"aria-label":ep("preview-frame.navigator.toggle-button.aria-label"),icon:b.lC2,mode:"bleed",onClick:el,selected:Q,tooltipProps:{content:(0,i.jsx)(s.EY,{size:1,children:ep("preview-frame.navigator.toggle-button.tooltip")}),fallbackPlacements:["bottom-start"],placement:"bottom"}}),F[10]=Q,F[11]=ep,F[12]=el,F[13]=u):u=F[13],F[14]===Symbol.for("react.memo_cache_sentinel")?(p={whiteSpace:"nowrap"},F[14]=p):p=F[14];let ev=ef?"disable":"enable";F[15]!==ep||F[16]!==ev?(m=ep("preview-frame.overlay.toggle-button.tooltip",{context:ev}),F[15]=ep,F[16]=ev,F[17]=m):m=F[17],F[18]!==m?(h=(0,i.jsx)(s.az,{padding:1,children:(0,i.jsx)(s.EY,{size:1,children:m})}),F[18]=m,F[19]=h):h=F[19],F[20]===Symbol.for("react.memo_cache_sentinel")?(y=(0,i.jsx)(s.az,{paddingY:1,children:(0,i.jsx)(s.qW,{keys:["Alt"],style:{marginTop:-4,marginBottom:-4}})}),F[20]=y):y=F[20],F[21]!==h?(g=(0,i.jsxs)(s.so,{align:"center",style:p,children:[h,y]}),F[21]=h,F[22]=g):g=F[22],F[23]===Symbol.for("react.memo_cache_sentinel")?(v=["bottom-start"],F[23]=v):v=F[23],F[24]===Symbol.for("react.memo_cache_sentinel")?(x={lineHeight:0,borderRadius:999,userSelect:"none"},F[24]=x):x=F[24];let ex=ef?"transparent":void 0;F[25]===Symbol.for("react.memo_cache_sentinel")?(w={margin:-4},F[25]=w):w=F[25];let eb="loading"===q.status||"connected"!==er;F[26]!==ef||F[27]!==eb||F[28]!==ec?(_=(0,i.jsx)("div",{style:w,children:(0,i.jsx)(s.dO,{checked:ef,onChange:ec,disabled:eb})}),F[26]=ef,F[27]=eb,F[28]=ec,F[29]=_):_=F[29];let ew=!ef;F[30]!==ep?(S=ep("preview-frame.overlay.toggle-button.text"),F[30]=ep,F[31]=S):S=F[31],F[32]!==ew||F[33]!==S?(E=(0,i.jsx)(s.az,{children:(0,i.jsx)(s.EY,{muted:ew,size:1,weight:"medium",children:S})}),F[32]=ew,F[33]=S,F[34]=E):E=F[34],F[35]!==_||F[36]!==E?(k=(0,i.jsxs)(s.so,{align:"center",gap:3,children:[_,E]}),F[35]=_,F[36]=E,F[37]=k):k=F[37],F[38]!==ex||F[39]!==k?(P=(0,i.jsx)(s.Zp,{as:"label",flex:"none",padding:3,marginX:1,style:x,tone:ex,children:k}),F[38]=ex,F[39]=k,F[40]=P):P=F[40],F[41]!==g||F[42]!==P?(C=(0,i.jsx)(j.m_,{animate:!0,content:g,fallbackPlacements:v,placement:"bottom",portal:!0,children:P}),F[41]=g,F[42]=P,F[43]=C):C=F[43],F[44]!==q.status||F[45]!==ep?($="loaded"===q.status?ep("preview-frame.refresh-button.tooltip"):ep("preview-frame.status",{context:q.status}),F[44]=q.status,F[45]=ep,F[46]=$):$=F[46],F[47]!==$?(R=(0,i.jsx)(s.EY,{size:1,children:$}),F[47]=$,F[48]=R):R=F[48],F[49]===Symbol.for("react.memo_cache_sentinel")?(A=["bottom-end"],F[49]=A):A=F[49],F[50]!==ep?(I=ep("preview-frame.refresh-button.aria-label"),F[50]=ep,F[51]=I):I=F[51];let ej="reloading"===q.status||"refreshing"===q.status;F[52]!==eh||F[53]!==I||F[54]!==ej?(z=(0,i.jsx)(j.$n,{"aria-label":I,icon:b.fNY,mode:"bleed",loading:ej,onClick:eh,tooltipProps:null}),F[52]=eh,F[53]=I,F[54]=ej,F[55]=z):z=F[55],F[56]!==R||F[57]!==z?(T=(0,i.jsx)(s.az,{padding:1,children:(0,i.jsx)(j.m_,{animate:!0,content:R,fallbackPlacements:A,placement:"bottom",portal:!0,children:z})}),F[56]=R,F[57]=z,F[58]=T):T=F[58],F[59]!==en||F[60]!==n||F[61]!==l?(O=(0,i.jsx)(s.az,{padding:1,children:(0,i.jsx)(eG,{openPopup:en,previewLocationOrigin:n,previewLocationRoute:l})}),F[59]=en,F[60]=n,F[61]=l,F[62]=O):O=F[62],F[63]!==ee||F[64]!==n||F[65]!==l||F[66]!==T||F[67]!==O?(M=(0,i.jsx)(s.az,{flex:1,children:(0,i.jsx)(eQ,{prefix:T,onChange:ee,origin:n,suffix:O,value:l})}),F[63]=ee,F[64]=n,F[65]=l,F[66]=T,F[67]=O,F[68]=M):M=F[68];let e_="desktop"===eu?"narrow":"full";F[69]!==ep||F[70]!==e_?(U=ep("preview-frame.viewport-button.tooltip",{context:e_}),F[69]=ep,F[70]=e_,F[71]=U):U=F[71],F[72]!==U?(L=(0,i.jsx)(s.EY,{size:1,children:U}),F[72]=U,F[73]=L):L=F[73],F[74]===Symbol.for("react.memo_cache_sentinel")?(Y=["bottom-start"],F[74]=Y):Y=F[74],F[75]!==ep?(N=ep("preview-frame.viewport-button.aria-label"),F[75]=ep,F[76]=N):N=F[76];let eS="desktop"===eu?b.Ck_:b.eZO;return F[77]!==N||F[78]!==eS||F[79]!==em?(W=(0,i.jsx)(j.$n,{"aria-label":N,icon:eS,mode:"bleed",onClick:em,tooltipProps:null}),F[77]=N,F[78]=eS,F[79]=em,F[80]=W):W=F[80],F[81]!==L||F[82]!==W?(B=(0,i.jsx)(s.so,{align:"center",flex:"none",gap:1,children:(0,i.jsx)(j.m_,{animate:!0,content:L,fallbackPlacements:Y,placement:"bottom",portal:!0,children:W})}),F[81]=L,F[82]=W,F[83]=B):B=F[83],F[84]!==Z||F[85]!==J||F[86]!==H||F[87]!==G||F[88]!==ei||F[89]!==l?
82(D=Z&&(0,i.jsx)(s.so,{align:"center",flex:"none",gap:1,children:(0,i.jsx)(e5,{canToggleSharePreviewAccess:J,canUseSharedPreviewAccess:H,previewLocationRoute:l,initialUrl:G,perspective:ei})}),F[84]=Z,F[85]=J,F[86]=H,F[87]=G,F[88]=ei,F[89]=l,F[90]=D):D=F[90],F[91]!==C||F[92]!==M||F[93]!==B||F[94]!==D||F[95]!==u?(V=(0,i.jsxs)(s.so,{align:"center",gap:1,paddingX:1,style:c,children:[u,C,M,B,D]}),F[91]=C,F[92]=M,F[93]=B,F[94]=D,F[95]=u,F[96]=V):V=F[96],V};function e8(e){let t,n,r,a,l=(0,o.c)(7),c=e7,u=e.options?.component;l[0]!==u||l[1]!==e?(t=u?(0,i.jsx)(u,{...e,renderDefault:c}):c(e),l[0]=u,l[1]=e,l[2]=t):t=l[2];let d=t;return l[3]===Symbol.for("react.memo_cache_sentinel")?(n={position:"relative"},l[3]=n):n=l[3],l[4]===Symbol.for("react.memo_cache_sentinel")?(r={minHeight:0},l[4]=r):r=l[4],l[5]!==d?(a=(0,i.jsx)(s.Zp,{flex:"none",padding:2,borderBottom:!0,style:n,children:(0,i.jsx)(s.so,{align:"center",style:r,children:d})}),l[5]=d,l[6]=a):a=l[6],a}function e7(e){return(0,i.jsx)(e6,{...e})}let e9=C.P.create(s.so),te=(0,u.memo)((0,u.forwardRef)(function(e,t){let{dispatch:n,iframe:r,header:l,initialUrl:c,loadersConnection:p,overlaysConnection:m,perspective:h,viewport:y,vercelProtectionBypass:g}=e,[v,x]=(0,u.useState)(null),b=eH(null===v?h:v),w=(0,u.useMemo)(()=>{let e=new URL(c);return e.searchParams.get(a.Pd)||e.searchParams.set(a.Pd,b),(g||e.searchParams.get(a.tt))&&e.searchParams.set(a.c4,"samesitenone"),g&&!e.searchParams.get(a.tt)&&e.searchParams.set(a.tt,g),e},[c,b,g]);(0,u.useEffect)(()=>{"connected"===p&&x(e=>null===e?h:e)},[p,h]);let{t:_}=(0,d.Bdt)(f.Yi),{devMode:S}=(0,f.Qe)(),E=(0,s.jt)(),k=(0,u.useRef)(null),P=function(e){let t,n=(0,o.c)(2);return n[0]!==e?(t=()=>(0,i.jsx)(e8,{...e}),n[0]=e,n[1]=t):t=n[1],t}({...e,iframeRef:k,options:l});(0,u.useImperativeHandle)(t,()=>k.current);let C="loading"===r.status||"reloading"===r.status,[R,A]=(0,u.useState)(!1),I="refreshing"===r.status,[O,M]=(0,u.useState)(!1),U=C||I||"connecting"===m,L=(0,u.useCallback)(()=>{k.current&&(k.current.src=w.toString(),n({type:f.my}))},[n,w]),Y=(0,u.useCallback)(()=>{W(!0)},[]),[N,W]=(0,u.useState)(!1),[B,D]=(0,u.useState)(!1);(0,u.useEffect)(()=>{if(!(C||I)&&("connecting"===m||"reconnecting"===m)){let e=setTimeout(()=>{D(!0)},5e3);return()=>clearTimeout(e)}},[m,C,I]),(0,u.useEffect)(()=>{if(!(C||I||!B)){if("connected"===m&&(M(!1),D(!1),A(!1),W(!1)),"connecting"===m){let e=setTimeout(()=>{A(!0),console.error("Unable to connect to visual editing. Make sure you've setup '@sanity/visual-editing' correctly")},f.Cw);return()=>clearTimeout(e)}if("reconnecting"===m){let e=setTimeout(()=>{A(!0),M(!0)},f.Cw);return()=>clearTimeout(e)}}},[C,m,I,B]);let V=(0,u.useCallback)(()=>{n({type:f.cr})},[n]);(0,u.useEffect)(()=>{if(!k.current)return;let e=k.current;function t(){e===document.activeElement&&e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0,cancelable:!0}))}return window.addEventListener("blur",t),()=>{window.removeEventListener("blur",t)}},[]);let F=(0,u.useMemo)(()=>(C||"connecting"===m&&"refreshing"!==r.status)&&!N,[N,r.status,C,m]),Z=(0,u.useSyncExternalStore)((0,u.useCallback)(()=>()=>{},[]),()=>CSS.supports("(view-transition-name: test)")),J=(0,u.useMemo)(()=>[F?"background":"active",C?"reloading":"idle",Z?"":y,B&&!N?"timedOut":""],[Z,N,C,F,B,y]),[H,K]=(0,u.useState)(y),[q,X]=(0,u.useState)(ti[y]);return(0,u.useEffect)(()=>{if(Z&&y!==H){let e=()=>{K(y),X(ti[y])};!E&&"startViewTransition"in document&&"function"==typeof document.startViewTransition?document.startViewTransition(()=>(0,T.flushSync)(()=>e())):e()}},[Z,E,H,y]),(0,i.jsx)(z,{transition:E?{duration:0}:void 0,children:(0,i.jsxs)(j.vE,{children:[(0,i.jsx)(P,{}),(0,i.jsx)(s.Zp,{flex:1,tone:"transparent",children:(0,i.jsxs)(s.so,{align:"center",height:"fill",justify:"center",padding:2*((Z?H:y)!=="desktop"),sizing:"border",style:{position:"relative",cursor:U?"wait":void 0},children:[(0,i.jsx)($.N,{children:O||C||I||!B||N?(C||"connecting"===m&&"refreshing"!==r.status)&&!N?(0,i.jsx)(e9,{initial:"initial",animate:"animate",exit:"exit",variants:tn,justify:"center",align:"center",style:{inset:"0",position:"absolute"},children:(0,i.jsxs)(s.so,{style:{...tt[y]},justify:"center",align:"center",direction:"column",gap:4,children:[(0,i.jsx)(s.y$,{muted:!0}
82),(0,i.jsx)(s.EY,{muted:!0,size:1,children:_("preview-frame.status",{context:"loading"})})]})}):O&&!N?(0,i.jsx)(e9,{initial:"initial",animate:"animate",exit:"exit",variants:tr,justify:"center",align:"center",style:{background:"var(--card-bg-color)",inset:"0",position:"absolute"},children:(0,i.jsx)(eh,{flex:1,message:_("preview-frame.connection.error.text"),onRetry:L,onContinueAnyway:Y,children:S&&(0,i.jsxs)(i.Fragment,{children:["connected"!==m&&(0,i.jsx)(s.Zp,{padding:3,radius:2,tone:"critical",children:(0,i.jsxs)(s.BJ,{space:3,children:[(0,i.jsx)(s.JU,{muted:!0,size:0,children:_("preview-frame.overlay.connection-status.label")}),(0,i.jsx)(s.Cy,{size:1,children:_("channel.status",{context:m})})]})}),"connected"!==p&&(0,i.jsx)(s.Zp,{padding:3,radius:2,tone:"critical",children:(0,i.jsxs)(s.BJ,{space:3,children:[(0,i.jsx)(s.JU,{muted:!0,size:0,children:_("preview-frame.loader.connection-status.label")}),(0,i.jsx)(s.Cy,{size:1,children:_("channel.status",{context:p})})]})})]})})}):null:(0,i.jsx)(e9,{initial:"initial",animate:"animate",exit:"exit",variants:tn,justify:"center",align:"center",style:{inset:"0",position:"absolute",backdropFilter:R?"blur(16px) saturate(0.5) grayscale(0.5)":"blur(2px)",transition:"backdrop-filter 0.2s ease-in-out",WebkitBackdropFilter:R?"blur(16px) saturate(0.5) grayscale(0.5)":"blur(2px)",WebkitTransition:"-webkit-backdrop-filter 0.2s ease-in-out",zIndex:1},children:(0,i.jsxs)(s.so,{style:{...tt[y]},justify:"center",align:"center",direction:"column",gap:4,children:[R&&(0,i.jsx)(j.$n,{disabled:!0,mode:"ghost",text:_("preview-frame.continue-button.text"),style:{opacity:0}}),(0,i.jsx)(s.Zp,{radius:2,tone:R?"caution":"inherit",padding:4,shadow:1,children:(0,i.jsxs)(s.so,{justify:"center",align:"center",direction:"column",gap:4,children:[(0,i.jsx)(s.y$,{muted:!0}),(0,i.jsx)(s.EY,{muted:!0,size:1,children:_("preview-frame.status",R?{context:"timeout"}:{context:"connecting"})})]})}),R&&(0,i.jsx)(j.$n,{tone:"critical",onClick:Y,text:_("preview-frame.continue-button.text")})]})})}),(0,i.jsx)(eX,{animate:J,initial:["background"],onLoad:V,preventClick:F,ref:k,src:w.toString(),style:q,variants:ti})]})})]})})}));te.displayName="Memo(ForwardRef(Preview))";let tt={desktop:{width:"100%",height:"100%"},mobile:{width:375,height:650}},tn={initial:{opacity:1},animate:{opacity:[0,0,1]},exit:{opacity:[1,0,0]}},tr={initial:{opacity:1},animate:{opacity:[0,0,1]},exit:{opacity:[1,0,0]}},ti={desktop:{...tt.desktop,boxShadow:"0 0 0 0px var(--card-border-color)"},mobile:{...tt.mobile,boxShadow:"0 0 0 1px var(--card-border-color)"},background:{opacity:0,scale:1},idle:{scale:1},reloading:{scale:[1,1,1,.98]},active:{opacity:[0,0,1],scale:1},timedOut:{opacity:[0,0,1]}},to=function(){let e=!1;return(...t)=>{e||(console.warn(...t),e=!0)}}();function ta(e,t){return e instanceof Function?e(t):e}function ts(e){let[t]=e;return"preview"===t}let tl=(0,D.FsL)((0,D.YjP)(),(0,D.BpQ)(1)),tc=(0,D.lqM)(tl);(0,D.Ikc)({baseUrl:tl,dataset:tc,id:tl,path:tl,projectId:tc,tool:tc,type:tc,workspace:tc});let tu=/^([\w-]+):(0|[1-9][0-9]*)$/,td=/^([\w-]+):([0-9]+),([0-9]+)$/,tf=/^([\w-]+):([\w-]+)$/,tp=(0,D.FsL)((0,D.YjP)(),(0,D.BpQ)(1));function tm(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e&&""!==e&&null!==e))}(0,D.Ikc)({origin:tp,href:tp,data:(0,D.lqM)((0,D.g1P)((0,D.YjP)(),(0,D.L5J)()))});let th=e=>{let t,n,r,i,a,s,l=(0,o.c)(10),[c,d]=(0,u.useState)(ty);l[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{let t=window.open(e,"_blank");t&&d(e=>new Set(e).add(t))},l[0]=t):t=l[0];let p=t;return l[1]!==e||l[2]!==c?(n=()=>{let t=[];if(c.size&&e)for(let n of c)n&&"closed"in n&&!n.closed&&t.push(e.addTarget(n));return()=>{t.forEach(tg)}},r=[e,c],l[1]=e,l[2]=c,l[3]=n,l[4]=r):(n=l[3],r=l[4]),(0,u.useEffect)(n,r),l[5]!==c?(i=()=>{if(c.size){let e=setInterval(()=>{let e=new Set;for(let t of c)t&&"closed"in t&&t.closed&&e.add(t);e.size&&d(t=>{let n=new Set(t);for(let t of e)n.delete(t);return n})},f.M);return()=>{clearInterval(e)}}},a=[c],l[5]=c,l[6]=i,l[7]=a):(i=l[6],a=l[7]),(0,u.useEffect)(i,a),l[8]!==c?(s={popups:c,open:p},l[8]=c,l[9]=s):s=l[9],s};function ty(){return new Set}function tg(e){return e()}let tv=Symbol("sanity/presentation/resolveUUID");function tx(){let e,t,n,r,i=(0,o.c)(4);i[0]===Symbol.for("react.memo_cache_sentinel")?(e=new Map,i[0]=e):e=i[0];let[a,s]=(0,u.useState)(e);e:{let e=Array.from(a.values());if(e.find(tj)){t="connected";break e}let n=e.filter(tw);if(n.length){t=n.some(tb)?"connecting":"reconnecting";break e}t="idle"}let l=t;i[1]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{s(t=>{let n=new Map(t);if("disconnected"===e.status)n.delete(e.connection);else{let t=n.get(e.connection)?.hasConnected||"connected"===e.status,r="handshaking"===e.status?"connecting":e.status;n.set(e.connection,{status:r,hasConnected:t})}return n})},i[1]=n):n=i[1];let c=n;return i[2]!==l?(r=[l,c],i[2]=l,i[3]=r):r=i[3],r}function tb(e){let{hasConnected:t}=e;return!t}function tw(e){let{status:t}=e;return"connecting"===t}function tj(e){let{status:t}=e;return"connected"===t}let t_=(0,u.lazy)(()=>n.e(8691).then(n.bind(n,78691))),tS=(0,u.lazy)(()=>n.e(1699).then(n.bind(n,11699))),tE=(0,u.lazy)(()=>n.e(42).then(n.bind(n,80042))),tk=(0,u.lazy)(()=>n.e(4631).then(n.bind(n,64631))),tP=(0,u.lazy)(()=>n.e(8408).then(n.bind(n,48408))),tC=(0,u.lazy)(()=>n.e(2976).then(n.bind(n,2976))),t$=(0,u.lazy)(()=>n.e(404).then(n.bind(n,10404))),tR=(0,g.I4)(s.so)`
83  overflow-x: auto;
84`;function tA(e){let{canCreateUrlPreviewSecrets:t,canToggleSharePreviewAccess:n,canUseSharedPreviewAccess:r,tool:l,vercelProtectionBypass:c}=e,g=l.options?.components,x=l.options?.previewUrl,b=l.name||f.P5,{unstable_navigator:w,unstable_header:j}=g||{},{navigate:_,state:S}=(0,y.rd)(),E=(0,d.$6H)(Object.fromEntries(S._searchParams||[])),{perspectiveStack:k,selectedPerspectiveName:P="drafts",selectedReleaseId:C}=(0,d.QO2)(),$=C?k:P,R=function(e,t,n,r,i){let s=(0,d.tH7)({apiVersion:f.mG}),l=(0,d.VrO)(),c=l?.activeWorkspace?.basePath||"/",p=function(e,t,n,r){let i,a,s,l,c,f=(0,o.c)(12);f[0]!==r?(i=()=>r||"",f[0]=r,f[1]=i):i=f[1];let[p,m]=(0,u.useState)(i),h=(0,u.useRef)(0);f[2]!==p||f[3]!==r?(a=()=>
84{if(p&&r)return window.clearTimeout(h.current),()=>{h.current=window.setTimeout(()=>{m("")},100)}},s=[p,r],f[2]=p,f[3]=r,f[4]=a,f[5]=s):(a=f[4],s=f[5]),(0,u.useEffect)(a,s);let y=(0,d.iZK)(),g=y?.id;return f[6]!==t||f[7]!==p||f[8]!==g||f[9]!==e||f[10]!==n?(c=["sanity/presentation",t,n,e,g,tv,p],f[6]=t,f[7]=p,f[8]=g,f[9]=e,f[10]=n,f[11]=c):c=f[11],c}(t,c,l?.activeWorkspace?.name||"default",r),m=function(e,t){let n,r,i,a,s=(0,o.c)(10);s[0]===Symbol.for("react.memo_cache_sentinel")?(n={apiVersion:f.mG},s[0]=n):n=s[0];let l=(0,d.tH7)(n),c=(0,d.iZK)(),[p,m]=(0,u.useState)("");s[1]!==l||s[2]!==c?.id||s[3]!==t||s[4]!==e||s[5]!==p?(r=e?J(async()=>await V(l,"@sanity/presentation",typeof window>"u"?"":location.href,c?.id),[...t,p]):null,s[1]=l,s[2]=c?.id,s[3]=t,s[4]=e,s[5]=p,s[6]=r):r=s[6];let h=r;return s[7]!==h?(i=()=>{if(!h)return;let e=setTimeout(()=>{(0,u.startTransition)(()=>m(h.expiresAt.toString()))},h.expiresAt.getTime()-Date.now());return()=>clearTimeout(e)},a=[h],s[7]=h,s[8]=i,s[9]=a):(i=s[8],a=s[9]),(0,u.useEffect)(i,a),h?.secret||null}(i&&"object"==typeof e||"function"==typeof e,p);return J(async()=>{if("string"==typeof e){let t=new URL(e,location.origin),n=t;try{if(r){let e=new URL(r,t);e.origin===t.origin&&(n=e)}}catch{}return location.origin===n.origin&&(n.pathname.startsWith(`${c}/`)||n.pathname===c)?t:n}let t=await ("object"==typeof e?function(e){let{draftMode:t,previewMode:n,origin:r=typeof location>"u"?"https://localhost":location.origin}=e,i=n?.enable||t?.enable,{preview:o="/"}=e,s=new URL(o,r),l=i?new URL(i,r):void 0;return async t=>{try{if(t.previewSearchParam){let e=new URL(t.previewSearchParam,s);e.origin===s.origin&&(o=`${e.pathname}${e.search}`)}}catch{}"u">typeof location&&location.origin===s.origin&&t.studioBasePath&&(o.startsWith(`${t.studioBasePath}/`)||o===t.studioBasePath)&&(o=e.preview||"/");let n=new URL(o,s);if(l){let e=new URL(l),{searchParams:r}=e;return r.set(a.Vm,t.previewUrlSecret),r.set(a.Pd,t.studioPreviewPerspective),n.pathname!==e.pathname&&r.set(a.Zm,`${n.pathname}${n.search}`),e.toString()}return n.toString()}}(e):e)({client:s,previewUrlSecret:m,studioPreviewPerspective:eH(n),previewSearchParam:r,studioBasePath:c});return new URL(t,location.origin)},[...p,m])}(x||"/",b,$,E.preview||null,t),A=(0,u.useMemo)(()=>x&&"object"==typeof x&&"draftMode"in x&&x.draftMode?(console.warn("previewUrl.draftMode is deprecated, use previewUrl.previewMode instead"),!1!==x.draftMode.shareAccess):!!x&&"object"==typeof x&&"previewMode"in x&&!!x.previewMode&&!1!==x.previewMode.shareAccess,[x]),[I]=(0,u.useState)(()=>{let e=l.options?.devMode;return"function"==typeof e?e():"boolean"==typeof e?e:"u">typeof window&&"localhost"===window.location.hostname}),z=(0,u.useMemo)(()=>R.origin,[R.origin]),T=(0,u.useRef)(null),[O,M]=(0,u.useState)(),[U,L]=(0,u.useState)(null),D=(0,u.useRef)({title:void 0,url:void 0}),{navigate:F,navigationHistory:Z,params:K,searchParams:G,structureParams:ee}=function({initialPreviewUrl:e,routerNavigate:t,routerState:n,routerSearchParams:r,frameStateRef:i}){let o=(0,u.useMemo)(()=>{let{id:t,path:i,type:o}={id:function(e){if(void 0===e)return;let t=decodeURIComponent(e)?.split(".");return"drafts"===t[0]&&t.shift(),t.join(".")}(n.id),path:function(e){if(void 0!==e)return p.C.toString(function(e){let t=[];for(let n of e.split(".")){let e=tu.exec(n);if(e){t.push(e[1],Number(e[2]));continue}let r=td.exec(n);if(r){t.push(r[1],[Number(r[2]),Number(r[3])]);continue}let i=tf.exec(n);if(i){t.push(i[1],{_key:i[2]});continue}t.push(n)}return t}(decodeURIComponent(e)))}(n.path),type:n.type};return{id:t,type:o,path:i,preview:r.preview||`${e.pathname}${e.search}`,perspective:r.perspective,viewport:r.viewport,inspect:r.inspect,rev:r.rev,since:r.since,template:r.template,templateParams:r.templateParams,view:r.view,pathKey:r.pathKey,instruction:r.instruction,comment:r.comment,changesInspectorTab:r.changesInspectorTab}},[n,r,e]),a=(0,u.useMemo)(()=>tm({inspect:o.inspect,path:o.path,rev:o.rev,since:o.since,template:o.template,templateParams:o.templateParams,view:o.view,pathKey:o.pathKey,instruction:o.instruction,comment:o.comment,changesInspectorTab:o.changesInspectorTab}),[o.changesInspectorTab,o.comment,o.inspect,o.instruction,o.path,o.pathKey,o.rev,o.since,o.template,o.templateParams,o.view]),s=(0,u.useMemo)(()=>tm({perspective:o.perspective,preview:o.preview,viewport:o.viewport}),[o.perspective,o.preview,o.viewport]),l=(0,u.useRef)(n);(0,u.useEffect)(()=>{l.current=n},[n]);let[c,f]=(0,u.useState)([n]);return{navigate:(0,u.useCallback)((e,n={},r)=>
84{e.id&&(e.id=(0,d.IMx)(e.id));let{_searchParams:o,...a}=l.current,s=(o||[]).reduce((e,[t,n])=>(e[t]=n,e),{}),c=tm({...a,...e}),u=tm({...s,...n});a.id!==c.id&&(delete u.template,delete u.templateParams),c._searchParams=Object.entries(u).reduce((e,[t,n])=>[...e,[t,n]],[]);let p=r??u.preview===i.current.url;f(e=>[...e,c]),t(c,{replace:p})},[t,i]),navigationHistory:c,params:o,searchParams:s,structureParams:a}}({initialPreviewUrl:R,routerNavigate:_,routerState:S,routerSearchParams:E,frameStateRef:D}),et=(0,u.useMemo)(()=>q(F,50),[F]),[en,er]=(0,u.useReducer)(f.dL,{},f.xe),ei=(0,u.useMemo)(()=>K.viewport?"mobile":"desktop",[K.viewport]),[eo,ea]=function(e,t){(0,Y.x_)(e);let[n,r]=(0,u.useState)({}),[i,o]=(0,u.useState)({}),a=(0,u.useRef)(""),s=(0,u.useCallback)((e,n,i=[])=>{let s=i.filter(e=>"_projectId"in e&&e._projectId?(to("Cross dataset references are not supported yet, ignoring source document",e),!1):e);("published"===n?r:o)(n=>{let r={};for(let e of s)r[e._id]=e;return a.current!==t.current.url?(a.current=t.current.url,{[e]:r}):N(n[e],r)?n:{...n,[e]:r}})},[t]);return[(0,u.useMemo)(()=>Object.values(Object.values("published"===e?n:i).reduce((e,t)=>(Object.values(t).forEach(t=>{e[t._id]=t}),e),{})),[e,i,n]),s]}($,D),es=(0,d.M91)(),el=(0,d.EL1)(),ec=function(e){let t,n,r,i,a,s,l=(0,o.c)(20),{navigate:c,navigationHistory:p,path:m,previewUrl:h,resolvers:g}=e;l[0]!==g?(t=void 0===g?[]:g,l[0]=g,l[1]=t):t=l[1];let x=t,{state:b}=(0,y.rd)();l[2]===Symbol.for("react.memo_cache_sentinel")?(n={apiVersion:f.mG},l[2]=n):n=l[2];let w=(0,d.tH7)(n);l[3]!==m||l[4]!==b?(r=m||b._searchParams?.find(ts)?.[1]||"",l[3]=m,l[4]=b,l[5]=r):r=l[5];let j=r,[_,S]=(0,u.useState)(void 0),E=(0,u.useRef)(void 0);l[6]!==c||l[7]!==p?(i=(e,t)=>{e&&E.current===e._id||(S({document:e,path:t.pathname}),E.current=e?._id,p.at(-1)?.id===p.at(-2)?.id&&c?.({id:e?._id,type:e?._type}))},l[6]=c,l[7]=p,l[8]=i):i=l[8];let k=(0,v.J)(i);return l[9]!==w||l[10]!==k||l[11]!==h||l[12]!==j||l[13]!==x?(a=()=>{let e=new URL(j,"string"==typeof h?h:"object"==typeof h&&h?.origin||location.origin);if(x.length){let r;for(let t of x){let n=function(e,t){for(e of Array.isArray(e)?e:[e]){let n,r=e;if("string"==typeof e)try{let t=new URL(e);n=t.origin,r=t.pathname}catch{}if(!(n&&t.origin!==n))try{let e=(function(e,t){var n=[];return function(e,t,n){void 0===n&&(n={});var r=n.decode,i=void 0===r?function(e){return e}:r;return function(n){var r=e.exec(n);if(!r)return!1;for(var o=r[0],a=r.index,s=Object.create(null),l=1;l<r.length;l++)!function(e){if(void 0!==r[e]){var n=t[e-1];"*"===n.modifier||"+"===n.modifier?s[n.name]=r[e].split(n.prefix+n.suffix).map(function(e){return i(e,n)}):s[n.name]=i(r[e],n)}}(l);return{path:o,index:a,params:s}}}(function e(t,n,r){if(t instanceof RegExp){var i;if(!n)return t;for(var o=/\((?:\?<(.*?)>)?(?!\?)/g,a=0,s=o.exec(t.source);s;)n.push({name:s[1]||a++,prefix:"",suffix:"",modifier:"",pattern:""}),s=o.exec(t.source);return t}return Array.isArray(t)?(i=t.map(function(t){return e(t,n,r).source}),new RegExp("(?:".concat(i.join("|"),")"),B(r))):function(e,t,n){void 0===n&&(n={});for(var r=n.strict,i=void 0!==r&&r,o=n.start,a=n.end,s=n.encode,l=void 0===s?function(e){return e}:s,c=n.delimiter,u=n.endsWith,d="[".concat(W(void 0===u?"":u),"]|$"),f="[".concat(W(void 0===c?"/#?":c),"]"),p=void 0===o||o?"^":"",m=0;m<e.length;m++){var h=e[m];if("string"==typeof h)p+=W(l(h));else{var y=W(l(h.prefix)),g=W(l(h.suffix));if(h.pattern)if(t&&t.push(h),y||g)if("+"===h.modifier||"*"===h.modifier){var v="*"===h.modifier?"?":"";p+="(?:".concat(y,"((?:").concat(h.pattern,")(?:").concat(g).concat(y,"(?:").concat(h.pattern,"))*)").concat(g,")").concat(v)}else p+="(?:".concat(y,"(").concat(h.pattern,")").concat(g,")").concat(h.modifier);else{if("+"===h.modifier||"*"===h.modifier)throw TypeError('Can not repeat "'.concat(h.name,'" without a prefix and suffix'));p+="(".concat(h.pattern,")").concat(h.modifier)}else p+="(?:".concat(y).concat(g,")").concat(h.modifier)}}if(void 0===a||a)i||(p+="".concat(f,"?")),p+=n.endsWith?"(?=".concat(d,")"):"$";else{var x=e[e.length-1],b="string"==typeof x?f.indexOf(x[x.length-1])>-1:void 0===x;i||(p+="(?:".concat(f,"(?=").concat(d,"))?")),b||(p+="(?=".concat(f,"|").concat(d,")"))}return new RegExp(p,B(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"===r||"+"===r||"?"===r){t.push({type:"MODIFIER",index:n,value:e[n++]});continue}if("\\"===r){t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});continue}if("{"===r){t.push({type:"OPEN",index:n,value:e[n++]});continue}if("}"===r){t.push({type:"CLOSE",index:n,value:e[n++]});continue}if(":"===r){for(var i="",o=n+1;o<e.length;){var a=e.charCodeAt(o);if(a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||95===a){i+=e[o++];continue}break}if(!i)throw TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:i}),n=o;continue}if("("===r){var s=1,l="",o=n+1;if("?"===e[o])throw TypeError('Pattern cannot start with "?" at '.concat(o));for(;o<e.length;){if("\\"===e[o]){l+=e[o++]+e[o++];continue}if(")"===e[o]){if(0==--s){o++;break}}else if("("===e[o]&&(s++,"?"!==e[o+1]))throw TypeError("Capturing groups are not allowed at ".concat(o));l+=e[o++]}if(s)throw TypeError("Unbalanced pattern at ".concat(n));if(!l)throw TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:l}),n=o;continue}t.push({type:"CHAR",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,i=void 0===r?"./":r,o=t.delimiter,a=void 0===o?"/#?":o,s=[],l=0,c=0,u="",d=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},f=function(e){var t=d(e);if(void 0!==t)return t;var r=n[c],i=r.type,o=r.index;throw TypeError("Unexpected ".concat(i," at ").concat(o,", expected ").concat(e))},p=function(){for(var e,t="";e=d("CHAR")||d("ESCAPED_CHAR");)t+=e;return t},m=function(e){for(var t=0;t<a.length;t++){var n=a[t];if(e.indexOf(n)>-1)return!0}return!1},h=function(e){var t=s[s.length-1],n=e||(t&&"string"==typeof t?t:"");
84if(t&&!n)throw TypeError('Must have text between two parameters, missing text after "'.concat(t.name,'"'));return!n||m(n)?"[^".concat(W(a),"]+?"):"(?:(?!".concat(W(n),")[^").concat(W(a),"])+?")};c<n.length;){var y=d("CHAR"),g=d("NAME"),v=d("PATTERN");if(g||v){var x=y||"";-1===i.indexOf(x)&&(u+=x,x=""),u&&(s.push(u),u=""),s.push({name:g||l++,prefix:x,suffix:"",pattern:v||h(x),modifier:d("MODIFIER")||""});continue}var b=y||d("ESCAPED_CHAR");if(b){u+=b;continue}if(u&&(s.push(u),u=""),d("OPEN")){var x=p(),w=d("NAME")||"",j=d("PATTERN")||"",_=p();f("CLOSE"),s.push({name:w||(j?l++:""),pattern:w&&!j?h(x):j,prefix:x,suffix:_,modifier:d("MODIFIER")||""});continue}f("END")}return s}(t,r),n,r)}(e,n,t),n,t)})(r,{decode:decodeURIComponent})(t.pathname);if(e){let{params:t,path:r}=e;return{origin:n,params:t,path:r}}}catch{throw Error(`"${e}" is not a valid route pattern`)}}}(t.route,e);if(n){r={context:n,resolver:t};break}}if(r){var t,n;let i=function(e,t){if(e.resolve){let n=e.resolve(t)?.filter;return n?`// groq
85*[${n}][0]{_id, _type}`:void 0}return"type"in e?`// groq
86*[_type == "${e.type}"][0]{_id, _type}`:`// groq
87*[${ta(e.filter,t)}][0]{_id, _type}`}(r.resolver,r.context),o=(t=r.resolver,n=r.context,t.resolve?t.resolve(n)?.params??n.params:"type"in t?{}:ta(t.params,n)??n.params);if(i){let t=new AbortController,n={perspective:"drafts",signal:t.signal};return w.fetch(i,o,n).then(t=>k(t,e)).catch(t=>{t instanceof Error&&"AbortError"===t.name||(S({document:void 0,path:e.pathname}),E.current=void 0)}),()=>{t.abort()}}}}S(void 0),E.current=void 0},l[9]=w,l[10]=k,l[11]=h,l[12]=j,l[13]=x,l[14]=a):a=l[14],l[15]!==w||l[16]!==h||l[17]!==j||l[18]!==x?(s=[w,h,j,x],l[15]=w,l[16]=h,l[17]=j,l[18]=x,l[19]=s):s=l[19],(0,u.useEffect)(a,s),_}({navigate:F,navigationHistory:Z,path:K.preview,previewUrl:l.options?.previewUrl,resolvers:l.options?.resolve?.mainDocuments}),[eu,ed]=tx(),[ef,ep]=tx(),[eh,ey]=tx(),{open:eg}=th(O),ev="loading"===en.iframe.status;(0,u.useEffect)(()=>{let e=T.current?.contentWindow;if(!e||ev)return;let t=(0,m.dK)({targetOrigin:z});return t.addTarget(e),M(t),()=>{t.destroy(),M(void 0)}},[z,ev]);let ex=(0,v.J)((e,t,n)=>et(e,t,n));(0,u.useEffect)(()=>{if(!O)return;let e=O.createChannel({name:"presentation",heartbeat:!0,connectTo:"visual-editing"},(0,m.e3)().provide({actors:(0,h.jF)()}));e.on("visual-editing/focus",e=>{"id"in e&&ex({type:e.type,id:e.id,path:e.path})}),e.on("visual-editing/navigate",e=>{let{title:t,url:n}=e;if(D.current.url!==n)try{let[e,t]=n.split("?"),r=new URLSearchParams(t);r.delete(a.tt),r.delete(a.c4),ex({},{preview:`${e}${r.size>0?"?":""}${r}`})}catch{ex({},{preview:n})}D.current={title:t,url:n}}),e.on("visual-editing/meta",e=>{D.current.title=e.title}),e.on("visual-editing/toggle",e=>{er({type:f.u5,enabled:e.enabled})}),e.on("visual-editing/documents",e=>{ea("visual-editing",e.perspective,e.documents)}),e.on("visual-editing/refreshing",e=>{"manual"===e.source?clearTimeout(eA.current):"mutation"===e.source&&er({type:f.iY})}),e.on("visual-editing/refreshed",()=>{er({type:f.cr})}),e.onStatus(ed);let t=e.start();return L(e),()=>{t(),L(null)}},[O,ea,ed,z]),(0,u.useEffect)(()=>{if(!O)return;let e=O.createChannel({name:"presentation",connectTo:"preview-kit",heartbeat:!0},(0,m.e3)().provide({actors:(0,h.jF)()}));return e.onStatus(ey),e.on("preview-kit/documents",e=>{e.projectId===es&&e.dataset===el&&ea("preview-kit",e.perspective,e.documents)}),e.start()},[O,el,es,ea,ey,z]);let eb=(0,u.useCallback)(e=>{et({path:p.C.toString(e)},{},!0)},[et]),ew=(0,u.useCallback)(e=>{let t=new URL(e,R.origin),n=t.pathname+t.search;t.origin===R.origin&&n!==K.preview&&et({},{preview:n})},[R,K,et]),ej=(0,u.useCallback)(e=>{et({},e)},[et]);(0,u.useEffect)(()=>{K.id&&K.path?U?.post("presentation/focus",{id:K.id,path:K.path}):U?.post("presentation/blur")},[K.id,K.path,U]),(0,u.useEffect)(()=>{D.current.url&&K.preview&&D.current.url!==K.preview&&(D.current.url=K.preview,"connected"!==eu&&T.current?T.current.src=`${z}${K.preview}`:U?.post("presentation/navigate",{url:K.preview,type:"replace"}))},[eu,z,K.preview,U]);let e_=(0,u.useCallback)(()=>U?.post("presentation/toggle-overlay"),[U]),[eS,eE]=(0,u.useState)(null);(0,u.useEffect)(()=>{let e=e=>{tI(e)&&e_()},t=e=>{var t,n;tI(e)&&e_(),t=["mod","\\"],n=e,t.every(e=>tz[e]?n[tz[e]]:n.key===e.toUpperCase())&&e_()};return window.addEventListener("keydown",t),window.addEventListener("keyup",e),()=>{window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}},[e_]);let[ek,eP]=(0,u.useState)(null),[{navigatorEnabled:eC,toggleNavigator:e$},eR]=function(e){let t,n,r,a,s=(0,o.c)(11),{unstable_navigator:l}=e,c=!!l?.component,[d,f]=function(e,t){let n,r,i,a,s=(0,o.c)(9);s[0]!==t||s[1]!==e?(n=()=>JSON.parse(localStorage.getItem(e)??JSON.stringify(t)),s[0]=t,s[1]=e,s[2]=n):n=s[2];let[l,c]=(0,u.useState)(n);return s[3]!==e||s[4]!==l?(r=()=>{localStorage.setItem(e,JSON.stringify(l))},i=[e,l],s[3]=e,s[4]=l,s[5]=r,s[6]=i):(r=s[5],i=s[6]),(0,u.useEffect)(r,i),s[7]!==l?(a=[l,c],s[7]=l,s[8]=a):a=s[8],a}("presentation/navigator",c),p=!!c&&d;e:{let e;if(!c){t=void 0;break e}s[0]!==f?(e=()=>f(eV),s[0]=f,s[1]=e):e=s[1],t=e}let m=t;s[2]!==p||s[3]!==l?(n=function(){return(0,i.jsx)(i.Fragment,{children:p&&(0,i.jsx)(eF,{...l})})},s[2]=p,s[3]=l,s[4]=n):n=s[4];let h=n;return s[5]!==p||s[6]!==m?(r={navigatorEnabled:p,toggleNavigator:m},s[5]=p,s[6]=m,s[7]=r):r=s[7],s[8]!==h||s[9]!==r?(a=[r,h],s[8]=h,s[9]=r,s[10]=a):a=s[10],a}({unstable_navigator:w}),eA=(0,u.useRef)(void 0),eI=(0,u.useCallback)(e=>{if(er({type:f.iY}
87),U){eA.current=window.setTimeout(e,300),U.post("presentation/refresh",{source:"manual",livePreviewEnabled:"connected"===eh||"connected"===ef});return}e()},[ef,eh,U]),ez=(0,d.hA9)(),eT=(0,u.useCallback)(({id:e,type:t,path:n})=>{if(D.current.url)return{title:D.current.title||D.current.url,name:"edit",params:{id:e,path:n,type:t,inspect:d.nHq,workspace:ez.name,mode:f.cc,preview:K.preview}}},[K.preview,ez.name]),eO=(0,u.useCallback)(e=>{et({},{viewport:"desktop"===e?void 0:"mobile"},!0)},[et]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eJ,{devMode:I,name:b,navigate:et,params:K,searchParams:G,structureParams:ee,children:(0,i.jsx)(eD,{navigate:et,children:(0,i.jsx)(eZ,{params:K,children:(0,i.jsx)(X,{comlink:U,children:(0,i.jsx)(tR,{height:"fill",children:(0,i.jsxs)(em,{children:[(0,i.jsx)(eR,{}),(0,i.jsx)(Q,{id:"preview",minWidth:325,defaultSize:eC?50:75,order:3,children:(0,i.jsx)(s.so,{direction:"column",flex:1,height:"fill",ref:eP,children:(0,i.jsx)(s.EZ,{element:ek,children:(0,i.jsx)(te,{canSharePreviewAccess:A,canToggleSharePreviewAccess:n,canUseSharedPreviewAccess:r,dispatch:er,header:j,iframe:en.iframe,initialUrl:R,loadersConnection:ef,navigatorEnabled:eC,onPathChange:ew,onRefresh:eI,openPopup:eg,overlaysConnection:eu,previewUrl:K.preview,perspective:$,ref:T,setViewport:eO,targetOrigin:z,toggleNavigator:e$,toggleOverlay:e_,viewport:ei,visualEditing:en.visualEditing,vercelProtectionBypass:c},z)})})}),(0,i.jsx)(eB,{documentId:K.id,documentsOnPage:eo,documentType:K.type,getCommentIntent:eT,mainDocumentState:ec,onFocusPath:eb,onStructureParams:ej,searchParams:G,setDisplayedDocument:eE,structureParams:ee})]})})})})})}),(0,i.jsxs)(u.Suspense,{children:[O&&(0,i.jsx)(t_,{controller:O,perspective:$,liveDocument:eS,onDocumentsOnPage:ea,onLoadersConnection:ep}),U&&K.id&&K.type&&(0,i.jsx)(tE,{comlink:U,id:K.id,type:K.type,loadersConnection:ef,previewKitConnection:eh}),U&&(0,i.jsx)(tC,{comlink:U,perspective:$}),U&&eo.length>0&&(0,i.jsx)(tP,{comlink:U,perspective:$,refs:eo}),U&&(0,i.jsx)(tS,{comlink:U,perspective:$}),U&&(0,i.jsx)(H,{comlink:U}),U&&(0,i.jsx)(tk,{comlink:U,perspective:$}),U&&(0,i.jsx)(t$,{comlink:U})]})]})}function tI(e){return"Alt"===e.key}let tz={alt:"altKey",ctrl:"ctrlKey",mod:"u">typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform)?"metaKey":"ctrlKey",shift:"shiftKey"};function tT(){return"ready"}function tO(e){let t,n,r,s,p,m=(0,o.c)(17),{t:h}=(0,d.Bdt)(f.Yi),{previewUrl:y}=e.tool.options??{},{push:g}=(0,l.dj)(),v="object"==typeof y||"function"==typeof y,x=(0,d.E9)(),[b,w]=(0,u.useState)(null),[j,_]=(0,u.useState)(null),[S,E]=(0,u.useState)(null),[k,P]=(0,u.useState)(null);m[0]!==x||m[1]!==v?(t=()=>{if(!v)return;let e=x.checkDocumentPermission("create",{_id:a.YL,_type:a.dR}).subscribe(w),t=x.checkDocumentPermission("update",{_id:a.YL,_type:a.dR}).subscribe(_),n=x.checkDocumentPermission("read",{_id:a.YL,_type:a.dR}).subscribe(E),r=x.checkDocumentPermission("create",{_id:`drafts.${(0,c.A)()}`,_type:a.uf}).subscribe(P);return()=>{e.unsubscribe(),t.unsubscribe(),n.unsubscribe(),r.unsubscribe()}},n=[x,v],m[0]=x,m[1]=v,m[2]=t,m[3]=n):(t=m[2],n=m[3]),(0,u.useEffect)(t,n);let C=k?.granted;m[4]!==C||m[5]!==g||m[6]!==h||m[7]!==v?(r=()=>{if(!v||!1!==C)return;let e=requestAnimationFrame(()=>g({closable:!0,status:"error",duration:3e4,title:h("preview-url-secret.missing-grants")}));return()=>cancelAnimationFrame(e)},s=[C,g,h,v],m[4]=C,m[5]=g,m[6]=h,m[7]=v,m[8]=r,m[9]=s):(r=m[8],s=m[9]),(0,u.useEffect)(r,s);let[$,R]=function(){let e,t,n,r,i=(0,o.c)(7);i[0]===Symbol.for("react.memo_cache_sentinel")?(e={apiVersion:f.mG},i[0]=e):e=i[0];let s=(0,d.tH7)(e),[l,c]=(0,u.useReducer)(tT,"loading"),[p,m]=(0,u.useState)(null);return i[1]!==s?(t=()=>{let e=function(e,t){let n=new AbortController,r=[];async function i(n,i){let{result:o,syncTags:s}=await e.fetch(a.lj,{},{filterResponse:!1,lastLiveEventId:n,tag:"preview-url-secret.fetch-vercel-bypass-protection-secret"});Array.isArray(s)&&(r=s),i.aborted||t(o)}let o=e.live.events().subscribe({next:e=>{"message"===e.type&&(n.abort(),n=new AbortController,e.tags.some(e=>r.includes(e))&&i(e.id,n.signal))},error:e=>console.error(e)});return i(null,n.signal),()=>{o.unsubscribe(),n.abort()}}(s,e=>{m(e),c()});return()=>e()},n=[s],i[1]=s,i[2]=t,i[3]=n):(t=i[2],n=i[3]),(0,u.useEffect)(t,n),i[4]!==l||i[5]!==p?(r=[p,l],i[4]=l,i[5]=p,i[6]=r):r=i[6],r}();if("loading"===R||v&&(!b||typeof b.granted>"u"||!j||typeof j.granted>"u"||!k||!S||typeof S.granted>"u"||typeof k.granted>"u")){let e;return m[10]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)(f.gu,{}),m[10]=e):e=m[10],e}let A=!0===C,I=b?.granted===!0&&j?.granted===!0,z=S?.granted===!0;return m[11]!==e||m[12]!==A||m[13]!==I||m[14]!==z||m[15]!==$?(p=(0,i.jsx)(tA,{...e,vercelProtectionBypass:$,canCreateUrlPreviewSecrets:A,canToggleSharePreviewAccess:I,canUseSharedPreviewAccess:z}),m[11]=e,m[12]=A,m[13]=I,m[14]=z,m[15]=$,m[16]=p):p=m[16],p}},51616:e=>{e.exports=function e(t,n){if(t===n)return!0;
vendor: 652 bytes, line 87
87if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){var r,i,o,a=o[i];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}}}]);

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