PageSourceSearch

https://pinnora.ai/_next/static/chunks/0lh.a5zuch0_w.js?dpl=dpl_BKnPLrZZiUQDY1kK9jn6jhoV9ajL

js pinnora.ai collected 2026-10-04 11:15:51 UTC 39,707 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="edd3cfd0-abb1-473a-8a31-34bd365e9f0e")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56156,e=>{"use strict";var t=e.i(843476),r=e.i(647163);let n={default:"",ai:"text-violet-600/80 dark:text-violet-300/85",info:"text-sky-600/80 dark:text-sky-300/85",ok:"text-emerald-600/80 dark:text-emerald-300/85",warn:"text-amber-600/80 dark:text-amber-300/85",destructive:"text-rose-600/80 dark:text-rose-300/85"};e.s(["MetaLabel",0,function({children:e,bracket:i=!1,tone:s="default",className:a,...o}){return(0,t.jsx)("p",{"data-bracket":i?"":void 0,className:(0,r.cn)("meta-label",n[s],a),...o,children:e})}])},859978,e=>{"use strict";var t=e.i(271645);e.s(["useLeadingThrottle",0,function(e,r){let n=t.useRef(e);n.current=e;let i=t.useRef(0),s=t.useRef(null);return t.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),t.useCallback(()=>{let e=Date.now(),t=e-i.current;if(t>=r){i.current=e,n.current();return}s.current||(s.current=setTimeout(()=>{s.current=null,i.current=Date.now(),n.current()},r-t))},[r])}])},266027,869230,673664,427001,254440,469637,e=>{"use strict";let t;var r=e.i(175555),n=e.i(273911),i=e.i(540143),s=e.i(286491),a=e.i(915823),o=e.i(793803),l=e.i(619273),u=e.i(180166),c=class extends a.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=(0,o.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#n=void 0;#i=void 0;#s=void 0;#a;#o;#r;#t;#l;#u;#c;#d;#h;#p;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#n.addObserver(this),d(this.#n,this.options)?this.#g():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return h(this.#n,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return h(this.#n,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#m(),this.#b(),this.#n.removeObserver(this)}setOptions(e){let t=this.options,r=this.#n;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,l.resolveQueryBoolean)(this.options.enabled,this.#n))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#v(),this.#n.setOptions(this.options),t._defaulted&&!(0,l.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#n,observer:this});let n=this.hasListeners();n&&p(this.#n,r,this.options,t)&&this.#g(),this.updateResult(),n&&(this.#n!==r||(0,l.resolveQueryBoolean)(this.options.enabled,this.#n)!==(0,l.resolveQueryBoolean)(t.enabled,this.#n)||(0,l.resolveStaleTime)(this.options.staleTime,this.#n)!==(0,l.resolveStaleTime)(t.staleTime,this.#n))&&this.#S();let i=this.#I();n&&(this.#n!==r||(0,l.resolveQueryBoolean)(this.options.enabled,this.#n)!==(0,l.resolveQueryBoolean)(t.enabled,this.#n)||i!==this.#p)&&this.#R(i)}getOptimisticResult(e){var t,r;let n=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(n,e);return t=this,r=i,(0,l.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#s=i,this.#o=this.options,this.#a=this.#n.state),i}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#f.add(e)}getCurrentQuery(){return this.#n}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#g({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#g(e){this.#v();let t=this.#n.fetch(this.options,e);return e?.throwOnError||(t=t.catch(l.noop)),t}#S(){this.#m();let e=(0,l.resolveStaleTime)(this.options.staleTime,this.#n);if(n.environmentManager.isServer()||this.#s.isStale||!(0,l.isValidTimeout)(e))return;let t=(0,l.timeUntilStale)(this.#s.dataUpdatedAt,e);this.#d=u.timeoutManager.setTimeout(()=>{this.#s.isStale||this.updateResult()},t+1)}#I(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#n):this.options.refetchInterval)??!1}#R(e){this.#b(),this.#p=e,!n.environmentManager.isServer()&&!1!==(0,l.resolveQueryBoolean)(this.options.enabled,this.#n)&&(0,l.isValidTimeout)(this.#p)&&0!==this.#p&&(this.#h=u.timeoutManager.setInterval(()=>
2{(this.options.refetchIntervalInBackground||r.focusManager.isFocused())&&this.#g()},this.#p))}#y(){this.#S(),this.#R(this.#I())}#m(){void 0!==this.#d&&(u.timeoutManager.clearTimeout(this.#d),this.#d=void 0)}#b(){void 0!==this.#h&&(u.timeoutManager.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){let r,n=this.#n,i=this.options,a=this.#s,u=this.#a,c=this.#o,h=e!==n?e.state:this.#i,{state:g}=e,y={...g},m=!1;if(t._optimisticResults){let r=this.hasListeners(),a=!r&&d(e,t),o=r&&p(e,n,t,i);(a||o)&&(y={...y,...(0,s.fetchState)(g.data,e.options)}),"isRestoring"===t._optimisticResults&&(y.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:S}=y;r=y.data;let I=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===S){let e;a?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(e=a.data,I=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#c?.state.data,this.#c):t.placeholderData,void 0!==e&&(S="success",r=(0,l.replaceData)(a?.data,e,t),m=!0)}if(t.select&&void 0!==r&&!I)if(a&&r===u?.data&&t.select===this.#l)r=this.#u;else try{this.#l=t.select,r=t.select(r),r=(0,l.replaceData)(a?.data,r,t),this.#u=r,this.#t=null}catch(e){this.#t=e}this.#t&&(b=this.#t,r=this.#u,v=Date.now(),S="error");let R="fetching"===y.fetchStatus,T="pending"===S,C="error"===S,j=T&&R,A=void 0!==r,w={status:S,fetchStatus:y.fetchStatus,isPending:T,isSuccess:"success"===S,isError:C,isInitialLoading:j,isLoading:j,data:r,dataUpdatedAt:y.dataUpdatedAt,error:b,errorUpdatedAt:v,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:y.dataUpdateCount>h.dataUpdateCount||y.errorUpdateCount>h.errorUpdateCount,isFetching:R,isRefetching:R&&!T,isLoadingError:C&&!A,isPaused:"paused"===y.fetchStatus,isPlaceholderData:m,isRefetchError:C&&A,isStale:f(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==(0,l.resolveQueryBoolean)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==w.data,r="error"===w.status&&!t,i=e=>{r?e.reject(w.error):t&&e.resolve(w.data)},s=()=>{i(this.#r=w.promise=(0,o.pendingThenable)())},a=this.#r;switch(a.status){case"pending":e.queryHash===n.queryHash&&i(a);break;case"fulfilled":(r||w.data!==a.value)&&s();break;case"rejected":r&&w.error===a.reason||s()}}return w}updateResult(){let e=this.#s,t=this.createResult(this.#n,this.options);if(this.#a=this.#n.state,this.#o=this.options,void 0!==this.#a.data&&(this.#c=this.#n),(0,l.shallowEqualObjects)(t,e))return;this.#s=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#f.size)return!0;let n=new Set(r??this.#f);return this.options.throwOnError&&n.add("error"),Object.keys(this.#s).some(t=>this.#s[t]!==e[t]&&n.has(t))};this.#T({listeners:r()})}#v(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#n)return;let t=this.#n;this.#n=e,this.#i=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#T(e){i.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#s)}),this.#e.getQueryCache().notify({query:this.#n,type:"observerResultsUpdated"})})}};function d(e,t){return!1!==(0,l.resolveQueryBoolean)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==(0,l.resolveQueryBoolean)(t.retryOnMount,e))||void 0!==e.state.data&&h(e,t,t.refetchOnMount)}function h(e,t,r){if(!1!==(0,l.resolveQueryBoolean)(t.enabled,e)&&"static"!==(0,l.resolveStaleTime)(t.staleTime,e)){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&f(e,t)}return!1}function p(e,t,r,n){return(e!==t||!1===(0,l.resolveQueryBoolean)(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&f(e,r)}function f(e,t){return!1!==(0,l.resolveQueryBoolean)(t.enabled,e)&&e.isStaleByTime((0,l.resolveStaleTime)(t.staleTime,e))}e.s(["QueryObserver",0,c],869230),e.i(247167);var g=e.i(271645),y=e.i(912598);e.i(843476);var m=g.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),b=()=>g.useContext(m);e.s(["useQueryErrorResetBoundary",0,b],673664);var v=(e,t,r)=>{let n=r?.state.error&&"function"==typeof e.throwOnError?(0,l.shouldThrowError)(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&!t.isReset()&&(e.retryOn
2Mount=!1)},S=e=>{g.useEffect(()=>{e.clearReset()},[e])},I=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&void 0===e.data||(0,l.shouldThrowError)(r,[e.error,n]));e.s(["ensurePreventErrorBoundaryRetry",0,v,"getHasError",0,I,"useClearResetErrorBoundary",0,S],427001);var R=e.i(381384),T=e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}},C=(e,t)=>e.isLoading&&e.isFetching&&!t,j=(e,t)=>e?.suspense&&t.isPending,A=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function w(e,t,r){let s=(0,R.useIsRestoring)(),a=b(),o=(0,y.useQueryClient)(r),u=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(u);let c=o.getQueryCache().get(u.queryHash);u._optimisticResults=s?"isRestoring":"optimistic",T(u),v(u,a,c),S(a);let d=!o.getQueryCache().get(u.queryHash),[h]=g.useState(()=>new t(o,u)),p=h.getOptimisticResult(u),f=!s&&!1!==e.subscribed;if(g.useSyncExternalStore(g.useCallback(e=>{let t=f?h.subscribe(i.notifyManager.batchCalls(e)):l.noop;return h.updateResult(),t},[h,f]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),g.useEffect(()=>{h.setOptions(u)},[u,h]),j(u,p))throw A(u,h,a);if(I({result:p,errorResetBoundary:a,throwOnError:u.throwOnError,query:c,suspense:u.suspense}))throw p.error;if(o.getDefaultOptions().queries?._experimental_afterQuery?.(u,p),u.experimental_prefetchInRender&&!n.environmentManager.isServer()&&C(p,s)){let e=d?A(u,h,a):c?.promise;e?.catch(l.noop).finally(()=>{h.updateResult()})}return u.notifyOnChangeProps?p:h.trackResult(p)}e.s(["ensureSuspenseTimers",0,T,"fetchOptimistic",0,A,"shouldSuspend",0,j,"willFetch",0,C],254440),e.s(["useBaseQuery",0,w],469637),e.s(["useQuery",0,function(e,t){return w(e,c,t)}],266027)},588450,e=>{"use strict";var t=e.i(271645),r=e.i(794349),n=e.i(500977),i=e.i(676477),s=e.i(54446),a=e.i(931888),o=e.i(871403),l=e.i(54584),u=e.i(361463);e.s(["useCollapsibleRoot",0,function(e){let{open:c,defaultOpen:d,onOpenChange:h,disabled:p}=e,f=void 0!==c,[g,y]=(0,r.useControlled)({controlled:c,default:d,name:"Collapsible",state:"open"}),{mounted:m,setMounted:b,transitionStatus:v}=(0,u.useTransitionStatus)(g,!0,!0),[S,I]=t.useState(g),[{height:R,width:T},C]=t.useState({height:void 0,width:void 0}),j=(0,s.useBaseUiId)(),[A,w]=t.useState(),Q=A??j,[P,k]=t.useState(!1),[F,M]=t.useState(!1),E=t.useRef(null),O=t.useRef(null),q=t.useRef(null),U=t.useRef(null),x=(0,l.useAnimationsFinished)(U,!1),L=(0,i.useStableCallback)(e=>{let t=!g,r=(0,a.createChangeEventDetails)(o.REASONS.triggerPress,e.nativeEvent);if(h(t,r),r.isCanceled)return;let n=U.current;"css-animation"===O.current&&null!=n&&n.style.removeProperty("animation-name"),P||F||(null!=O.current&&"css-animation"!==O.current&&!m&&t&&b(!0),"css-animation"===O.current&&(!S&&t&&I(!0),!m&&t&&b(!0))),y(t),"none"===O.current&&m&&!t&&b(!1)});return(0,n.useIsoLayoutEffect)(()=>{f&&"none"===O.current&&!g&&b(!1)},[f,g,c,b]),t.useMemo(()=>({abortControllerRef:E,animationTypeRef:O,disabled:p,handleTrigger:L,height:R,mounted:m,open:g,panelId:Q,panelRef:U,runOnceAnimationsFinish:x,setDimensions:C,setHiddenUntilFound:k,setKeepMounted:M,setMounted:b,setOpen:y,setPanelIdState:w,setVisible:I,transitionDimensionRef:q,transitionStatus:v,visible:S,width:T}),[E,O,p,L,R,m,g,Q,U,x,C,k,M,b,y,I,q,v,S,T])}])},947914,e=>{"use strict";var t=e.i(367805),r=e.i(271645);let n=r.createContext(void 0);e.s(["CollapsibleRootContext",0,n,"useCollapsibleRootContext",0,function(){let e=r.useContext(n);if(void 0===e)throw Error((0,t.default)(15));return e}])},950195,200620,e=>{"use strict";var t,r,n=e.i(814060);let i=((t={}).open="data-open",t.closed="data-closed",t[t.startingStyle=n.TransitionStatusDataAttributes.startingStyle]="startingStyle",t[t.endingStyle=n.TransitionStatusDataAttributes.endingStyle]="endingStyle",t);e.s(["CollapsiblePanelDataAttributes",0,i],200620);let s=((r={}).panelOpen="data-panel-open",r),a={[i.open]:""},o={[i.closed]:""};e.s(["collapsibleOpenStateMapping",0,{open:e=>e?a:o},"triggerOpenStateMapping",0,{open:e=>e?{[s.panelOpen]:""}:null}],950195)},221697,e=>{"use strict";e.i(247167);var t,r=e.i(271645),n=e.i(760620),i=e.i(500977),s=e.i(676477),a=e.i(226292),o=e.i(294365),l=e.i(647135),u=e.i(931888),c=e.i(871403),d=e.i(200620);let h=((t={}).disabled="data-disabled",t.orientation="data-orientation",t);e.s(["useCollapsiblePanel",0,function(e){let{abortControllerRef:t,animationTypeRef:p,externalRef:f,height:g,hiddenUntilFound:y,keepMounted:m,id:b,mounted:v,onOpenChange:S,open:I,panelRef:R,runOnceAnimationsFinish:T,setDimensions:C,setMounted:j,setOpen:A,setVisible:w,transitionDimensionRef:Q,visible:P,width:k}=e,F=r.useRef(!1),M=r.useRef(null),E=r.useRef(I),O=r.useRef(I),q=(0,l.useAnimationFrame)(),U=r.useMemo(()=>
2"css-animation"===p.current?!P:!I&&!v,[I,v,P,p]),x=(0,s.useStableCallback)(e=>{if(!e)return;if(null==p.current||null==Q.current){let t=getComputedStyle(e),r="none"!==t.animationName&&""!==t.animationName,n="0s"!==t.transitionDuration&&""!==t.transitionDuration;r&&n||("none"===t.animationName&&"0s"!==t.transitionDuration?p.current="css-transition":"none"!==t.animationName&&"0s"===t.transitionDuration?p.current="css-animation":p.current="none"),"horizontal"===e.getAttribute(h.orientation)||t.transitionProperty.indexOf("width")>-1?Q.current="width":Q.current="height"}if("css-transition"!==p.current)return;(void 0===g||void 0===k)&&(C({height:e.scrollHeight,width:e.scrollWidth}),O.current&&e.style.setProperty("transition-duration","0s"));let t=-1,r=-1;return t=l.AnimationFrame.request(()=>{O.current=!1,r=l.AnimationFrame.request(()=>{setTimeout(()=>{e.style.removeProperty("transition-duration")})})}),()=>{l.AnimationFrame.cancel(t),l.AnimationFrame.cancel(r)}}),L=(0,a.useMergedRefs)(f,R,x);return(0,i.useIsoLayoutEffect)(()=>{if("css-transition"!==p.current)return;let e=R.current;if(!e)return;let r=-1;if(null!=t.current&&(t.current.abort(),t.current=null),I){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,"initial","important")}),O.current||m||e.setAttribute(d.CollapsiblePanelDataAttributes.startingStyle,""),C({height:e.scrollHeight,width:e.scrollWidth}),r=l.AnimationFrame.request(()=>{Object.entries(t).forEach(([t,r])=>{""===r?e.style.removeProperty(t):e.style.setProperty(t,r)})})}else{if(0===e.scrollHeight&&0===e.scrollWidth)return;C({height:e.scrollHeight,width:e.scrollWidth});let r=new AbortController;t.current=r;let n=r.signal,i=null,s=d.CollapsiblePanelDataAttributes.endingStyle;return(i=new MutationObserver(a=>{a.some(e=>"attributes"===e.type&&e.attributeName===s)&&(i?.disconnect(),i=null,T(()=>{C({height:0,width:0}),e.style.removeProperty("content-visibility"),j(!1),t.current===r&&(t.current=null)},n))})).observe(e,{attributes:!0,attributeFilter:[s]}),()=>{i?.disconnect(),q.cancel(),t.current===r&&(r.abort(),t.current=null)}}return()=>{l.AnimationFrame.cancel(r)}},[t,p,q,y,m,v,I,R,T,C,j]),(0,i.useIsoLayoutEffect)(()=>{if("css-animation"!==p.current)return;let e=R.current;e&&(M.current=e.style.animationName||M.current,e.style.setProperty("animation-name","none"),C({height:e.scrollHeight,width:e.scrollWidth}),E.current||F.current||e.style.removeProperty("animation-name"),I?(null!=t.current&&(t.current.abort(),t.current=null),j(!0),w(!0)):(t.current=new AbortController,T(()=>{j(!1),w(!1),t.current=null},t.current.signal)))},[t,p,I,R,T,C,j,w,P]),(0,o.useOnMount)(()=>{let e=l.AnimationFrame.request(()=>{E.current=!1});return()=>l.AnimationFrame.cancel(e)}),(0,i.useIsoLayoutEffect)(()=>{if(!y)return;let e=R.current;if(!e)return;let t=-1,r=-1;return I&&F.current&&(e.style.transitionDuration="0s",C({height:e.scrollHeight,width:e.scrollWidth}),t=l.AnimationFrame.request(()=>{F.current=!1,r=l.AnimationFrame.request(()=>{setTimeout(()=>{e.style.removeProperty("transition-duration")})})})),()=>{l.AnimationFrame.cancel(t),l.AnimationFrame.cancel(r)}},[y,I,R,C]),(0,i.useIsoLayoutEffect)(()=>{let e=R.current;e&&y&&U&&(e.setAttribute("hidden","until-found"),"css-transition"===p.current&&e.setAttribute(d.CollapsiblePanelDataAttributes.startingStyle,""))},[y,U,p,R]),r.useEffect(function(){let e=R.current;if(e)return(0,n.addEventListener)(e,"beforematch",function(e){F.current=!0,A(!0),S(!0,(0,u.createChangeEventDetails)(c.REASONS.none,e))})},[S,R,A]),r.useMemo(()=>({props:{hidden:U,id:b,ref:L}}),[U,b,L])}],221697)},111369,e=>{"use strict";var t,r=e.i(843476);e.s([],695723),e.i(695723),e.i(247167);var n=e.i(271645),i=e.i(676477),s=e.i(269095),a=e.i(588450),o=e.i(947914),l=e.i(950195),u=e.i(814060);let c={...l.collapsibleOpenStateMapping,...u.transitionStatusMapping},d=n.forwardRef(function(e,t){let{render:l,className:u,defaultOpen:d=!1,disabled:h=!1,onOpenChange:p,open:f,style:g,...y}=e,m=(0,i.useStableCallback)(p),b=(0,a.useCollapsibleRoot)({open:f,defaultOpen:d,onOpenChange:m,disabled:h}),v=n.useMemo(()=>({open:b.open,disabled:b.disabled,transitionStatus:b.transitionStatus}),[b.open,b.disabled,b.transitionStatus]),S=n.useMemo(()=>({...b,onOpenChange:m,state:v}),[b,m,v]),I=(0,s.useRenderElement)("div",e,{state:v,ref:t,props:y,stateAttributesMapping:c});return(0,r.jsx)(o.CollapsibleRootContext.Provider,{value:S,children:I})});var h=e.i(853402);let p={...l.triggerOpenStateMapping,...u.transitionStatusMapping},f=n.forwardRef(function(e,t){let{panelId:r,open:i,handleTrigger:a,state:l,disabled:u}=(0,o.useCollapsibleRootContext)(),{className:c,disabled:d=u,id:f,render:g,nativeButton:y=!0,style:m,...b}=e,{getButtonProps:v,buttonRef:S}=(0,h.useButton)({disabled:d,focusableWhenDisabled:!0,native:y}),I=n.useMemo(()=>({"aria-controls":i?r:void 0,"aria-expanded":i,onClick:a}),[r,i,a]);return(0,s.useRenderElement)("button",e,{state:l,ref:[t,S],props:[I,b,v],stateAttributesMapping:p})});var g=e.i(500977),y=e.i(221697);let m=((t={}).collapsiblePanelHeight="--collapsible-panel-height",t.collapsiblePanelWidth="--collapsible-panel-width",t);var b=e.i(223715);let v=n.forwardRef(function(e,t){let{className:r,hiddenUntilFound:i,keepMounted:a,render:l,id:u,style:d,...h}=e,{abortControllerRef:p,animationTypeRef:f,height:v,mounted:S,onOpenChange:I,open:R,panelId:T,panelRef:C,runOnceAnimationsFinish:j,setDimensions:A,setHiddenUntilFound:w,setKeepMounted:Q,setMounted:P,
2setPanelIdState:k,setOpen:F,setVisible:M,state:E,transitionDimensionRef:O,visible:q,width:U,transitionStatus:x}=(0,o.useCollapsibleRootContext)(),L=i??!1,D=a??!1;(0,g.useIsoLayoutEffect)(()=>{if(u)return k(u),()=>{k(void 0)}},[u,k]),(0,g.useIsoLayoutEffect)(()=>{w(L)},[w,L]),(0,g.useIsoLayoutEffect)(()=>{Q(D)},[Q,D]);let{props:W}=(0,y.useCollapsiblePanel)({abortControllerRef:p,animationTypeRef:f,externalRef:t,height:v,hiddenUntilFound:L,id:T,keepMounted:D,mounted:S,onOpenChange:I,open:R,panelRef:C,runOnceAnimationsFinish:j,setDimensions:A,setMounted:P,setOpen:F,setVisible:M,transitionDimensionRef:O,visible:q,width:U});(0,b.useOpenChangeComplete)({open:R&&"idle"===x,ref:C,onComplete(){R&&A({height:void 0,width:void 0})}});let B=n.useMemo(()=>({...E,transitionStatus:x}),[E,x]),K=(0,s.useRenderElement)("div",e,{state:B,ref:[t,C],props:[W,{style:{[m.collapsiblePanelHeight]:void 0===v?"auto":`${v}px`,[m.collapsiblePanelWidth]:void 0===U?"auto":`${U}px`}},h],stateAttributesMapping:c});return D||L||S?K:null});e.s(["Panel",0,v,"Root",0,d,"Trigger",0,f],14287);var S=e.i(14287),S=S;e.s(["Collapsible",0,function({...e}){return(0,r.jsx)(S.Root,{"data-slot":"collapsible",...e})},"CollapsibleContent",0,function({...e}){return(0,r.jsx)(S.Panel,{"data-slot":"collapsible-content",...e})},"CollapsibleTrigger",0,function({...e}){return(0,r.jsx)(S.Trigger,{"data-slot":"collapsible-trigger",...e})}],111369)},442178,723032,e=>{"use strict";var t=e.i(266027),r=e.i(95187);let n=(0,r.createServerReference)("402a451ca95fe9df34d14ea38a146cd224add733f4",r.callServer,void 0,r.findSourceMapURL,"getProjectPerformanceAction"),i=(0,r.createServerReference)("404bc724f42e777f2d2ce96e4bc4ee8380c0733ba7",r.callServer,void 0,r.findSourceMapURL,"listProjectAdAccountsAction"),s=(0,r.createServerReference)("402974ec7edb84d15b21d1c94035736436d74738b3",r.callServer,void 0,r.findSourceMapURL,"getAdRecommendationsAction"),a=(0,r.createServerReference)("402ba5d7ad3f657ee5380c1c060abb4484b89a91c5",r.callServer,void 0,r.findSourceMapURL,"searchMetaAdLibraryAction");e.s(["searchMetaAdLibraryAction",0,a],723032);var o=e.i(848458);let l={performance:(e,t,r,n,i)=>["ad-performance","rows",e,t,r,n??"",i??""],accounts:(e,t)=>["ad-performance","accounts",e,t],metaMarket:(e,t,r)=>["ad-performance","meta-market",e,t,r],recommendations:(e,t,r)=>["ad-performance","recommendations",e,t,r]};function u(e){return e?"string"==typeof e?e:e.toISOString():null}e.s(["performanceQueryKeys",0,l,"useAdRecommendations",0,function(e){return(0,t.useQuery)({queryKey:l.recommendations(e.orgSlug,e.projectId,e.deploymentId??""),queryFn:async()=>(0,o.traceClient)("useAdRecommendations","getAdRecommendations",async()=>{let t=await s({orgSlug:e.orgSlug,projectId:e.projectId,deploymentId:e.deploymentId});if(!t.ok)throw Error(t.error);return t.unavailable?{unavailable:!0,reason:t.reason,message:t.message}:{unavailable:!1,recommendations:t.recommendations,issues:t.issues}},["react-query","ad-performance"]),enabled:e.enabled&&null!=e.deploymentId&&e.orgSlug.length>0&&e.projectId.length>0,staleTime:3e5,refetchOnWindowFocus:!1,refetchInterval:!1,retry:1})},"useMetaMarketSearch",0,function(e){let r=(e.term??"").trim().slice(0,100);return(0,t.useQuery)({queryKey:l.metaMarket(e.orgSlug,e.projectId,r),queryFn:async()=>(0,o.traceClient)("useMetaMarketSearch","searchMetaAdLibrary",async()=>{let t=await a({orgSlug:e.orgSlug,projectId:e.projectId,searchTerms:r,countries:["EU"],adType:"ALL",activeStatus:"ACTIVE"});if(!t.ok)throw Error(t.error);return{configured:t.configured,ads:t.ads,nextCursor:t.nextCursor,apiError:t.error??null}},["react-query","ad-performance"]),enabled:(e.enabled??!0)&&r.length>0&&e.orgSlug.length>0&&e.projectId.length>0,staleTime:6e5,refetchOnWindowFocus:!1,refetchInterval:!1,retry:1})},"useProjectAdAccounts",0,function(e){return(0,t.useQuery)({queryKey:l.accounts(e.orgSlug,e.projectId),queryFn:async()=>(0,o.traceClient)("useProjectAdAccounts","listProjectAdAccounts",async()=>{let t=await i({orgSlug:e.orgSlug,projectId:e.projectId});if(!t.ok)throw Error(t.error);return t.accounts},["react-query","ad-performance"]),enabled:(e.enabled??!0)&&e.orgSlug.length>0&&e.projectId.length>0,staleTime:6e4,refetchOnWindowFocus:!1,refetchInterval:!1})},"useProjectPerformance",0,function(e){let r=e.granularity??"day",i=u(e.from),s=u(e.to);return(0,t.useQuery)({queryKey:l.performance(e.orgSlug,e.projectId,r,i,s),queryFn:async()=>(0,o.traceClient)("useProjectPerformance","getProjectPerformance",async()=>{let t=await n({orgSlug:e.orgSlug,projectId:e.projectId,granularity:r,...i?{from:i}:{},...s?{to:s}:{}});if(!t.ok)throw Error(t.error);return{rows:t.rows,totals:t.totals,granularity:t.granularity,canViewSpend:t.canViewSpend}},["react-query","ad-performance"]),enabled:(e.enabled??!0)&&e.orgSlug.length>0&&e.projectId.length>0,staleTime:6e4,refetchOnWindowFocus:!1,refetchInterval:!1})}],442178)},676361,e=>{"use strict";var t=e.i(95187);let r=(0,t.createServerReference)("700abda4cc1db0d161fd84c20e89821f77526338b4",t.callServer,void 0,t.findSourceMapURL,"signProjectStorageFileIdsAction");e.s(["signProjectStorageFileIdsAction",0,r])},733589,529528,897315,e=>{"use strict";var t=e.i(266027),r=e.i(95187);let n=(0,r.createServerReference)("40507e1a47e8542af774671035f2dd5fba05ea220c",r.callServer,void 0,r.findSourceMapURL,"discoverMetaPagesAction"),i=(0,r.createServerReference)("406bcfb65e77b5dc51cdccb2663e9f88b1a0f0764e",r.callServer,void 0,r.findSourceMapURL,"getMetaIdentityAction"),s=(0,r.createServerReference)("40c469a166941254e7edbfc22dd086a3590cf23bd2",r.callServer,void 0,r.findSourceMapURL,"listProjectAdsetsAction");e.s(["listProjectAdsetsAction",0,s],529528);let a=(0,r.createServerReference)("407767b115816570efd15d96dbc342075ae4e0022f",r.callServer,void 0,r.findSourceMapURL,"listProjectCampaignsAction"),o=(0,r.createServerReference)("40528036be6d227717332a1
25f08af6f94676964a58",r.callServer,void 0,r.findSourceMapURL,"listProjectMetaPagesAction"),l=(0,r.createServerReference)("40cfb598952b99b940c8553a3bdc0511292b1988db",r.callServer,void 0,r.findSourceMapURL,"listScheduleVendorTargetsAction");e.s(["listScheduleVendorTargetsAction",0,l],897315);let u=(0,r.createServerReference)("401d396a010adaf2540daaeb5ce3eef54fd33c2a23",r.callServer,void 0,r.findSourceMapURL,"listThreadsTargetsAction"),c=(0,r.createServerReference)("40263169429841c511f623d5b5293aeb5bf93a0b60",r.callServer,void 0,r.findSourceMapURL,"getVendorAssetContextAction"),d=(0,r.createServerReference)("408c604e0848fa4d66bcd5cd7ebfb5d14e48d51f41",r.callServer,void 0,r.findSourceMapURL,"listLinkedinAuthorsAction"),h=(0,r.createServerReference)("405306d746e882676db10260f02753d59b950105df",r.callServer,void 0,r.findSourceMapURL,"listPinterestBoardsAction");var p=e.i(848458);let f={metaIdentity:(e,t)=>["integrations","meta-identity",e,t],discoverAccounts:(e,t)=>["integrations","discover-accounts",e,t],discoverPages:(e,t,r)=>["integrations","discover-pages",e,t,r],campaigns:(e,t)=>["integrations","campaigns",e,t],adsets:(e,t,r)=>["integrations","adsets",e,t,r],metaPages:(e,t)=>["integrations","meta-pages",e,t],vendorTargets:(e,t)=>["integrations","vendor-targets",e,t],threadsTargets:(e,t)=>["integrations","threads-targets",e,t],pinterestBoards:(e,t)=>["integrations","pinterest-boards",e,t],linkedinAuthors:(e,t)=>["integrations","linkedin-authors",e,t],vendorAssetContext:(e,t,r)=>["integrations","vendor-asset-context",e,t,r],tiktokIdentities:(e,t,r)=>["integrations","tiktok-identities",e,t,r]};e.s(["integrationQueryKeys",0,f,"invalidateIntegrationQueries",0,function(e){e.invalidateQueries({queryKey:["integrations"]})},"useDiscoverMetaPages",0,function(e){return(0,t.useQuery)({queryKey:f.discoverPages(e.orgSlug,e.projectId,e.oauthTokenId??""),queryFn:async()=>(0,p.traceClient)("useDiscoverMetaPages","discoverMetaPages",async()=>{let t=await n({orgSlug:e.orgSlug,projectId:e.projectId,oauthTokenId:e.oauthTokenId});if(!t.ok)throw Error(t.error);return t.pages},["react-query","integrations"]),enabled:(e.enabled??!0)&&e.orgSlug.length>0&&e.projectId.length>0&&!!e.oauthTokenId,staleTime:3e5,refetchOnWindowFocus:!1,refetchInterval:!1})},"useLinkedinAuthors",0,function(e){return(0,t.useQuery)({queryKey:f.linkedinAuthors(e.orgSlug,e.projectId),queryFn:async()=>(0,p.traceClient)("useLinkedinAuthors","listLinkedinAuthors",async()=>{let t=await d({orgSlug:e.orgSlug,projectId:e.projectId});return t.ok?{authors:t.authors,note:t.note}:{authors:[{urn:null,label:"Personal profile"}],note:null}},["react-query","integrations"]),enabled:(e.enabled??!0)&&e.orgSlug.length>0&&e.projectId.length>0,staleTime:3e5,refetchOnWindowFocus:!1,refetchInterval:!1})},"useMetaIdentity",0,function(e){return(0,t.useQuery)({queryKey:f.metaIdentity(e.orgSlug,e.projectId),queryFn:async()=>(0,p.traceClient)("useMetaIdentity","getMetaIdentity",async()=>{let t=await i({orgSlug:e.orgSlug,projectId:e.projectId});return t.ok&&"identity"in t?t.identity:null},["react-query","integrations"]),enabled:(e.enabled??!0)&&e.orgSlug.length>0&&e.projectId.length>0,staleTime:3e5,refetchOnWindowFocus:!1,refetchInterval:!1})},"usePinterestBoards",0,function(e){return(0,t.useQuery)({queryKey:f.pinterestBoards(e.orgSlug,e.projectId),queryFn:async()=>(0,p.traceClient)("usePinterestBoards","listPinterestBoards",async()=>{let t=await h({orgSlug:e.orgSlug,projectId:e.projectId});return t.ok?{boards:t.boards,tier:t.tier}:{boards:[],tier:null}},["react-query","integrations"]),enabled:(e.enabled??!0)&&e.orgSlug.length>0&&e.projectId.length>0,staleTime:3e5,refetchOnWindowFocus:!1,refetchInterval:!1})},"useProjectAdsets",0,function(e){return(0,t.useQuery)({queryKey:f.adsets(e.orgSlug,e.projectId,e.campaignDbId),queryFn:async()=>(0,p.traceClient)("useProjectAdsets","listProjectAdsets",async()=>{let t=await s({orgSlug:e.orgSlug,projectId:e.projectId,campaignDbId:e.campaignDbId});return t.ok?t.adsets:[]},["react-query","integrations"]),enabled:(e.enabled??!0)&&e.orgSlug.length>0&&e.projectId.length>0&&e.campaignDbId.length>0,staleTime:6e4,refetchOnWindowFocus:!1,refetchInterval:!1})},"useProjectCampaigns",0,function(e){let r=e.platform??"meta";return(0,t.useQuery)({queryKey:[...f.campaigns(e.orgSlug,e.projectId),r],queryFn:async()=>(0,p.traceClient)("useProjectCampaigns","listProjectCampaigns",async()=>{let t=await a({orgSlug:e.orgSlug,projectId:e.projectId,platform:r});if(!t.ok)throw Error(t.error);return t.campaigns},["react-query","integrations"]),enabled:(e.enabled??!0)&&e.orgSlug.length>0&&e.projectId.length>0,staleTime:6e4,refetchOnWindowFocus:!1,refetchInterval:!1})},"useProjectMetaPagesList",0,function(e){return(0,t.useQuery)({queryKey:f.metaPages(e.orgSlug,e.projectId),queryFn:async()=>(0,p.traceClient)("useProjectMetaPagesList","listProjectMetaPages",async()=>{let t=await o({orgSlug:e.orgSlug,projectId:e.projectId});return t.ok?t.pages:[]},["react-query","integrations"]),enabled:(e.enabled??!0)&&e.orgSlug.length>0&&e.projectId.length>0,staleTime:6e4,refetchOnWindowFocus:!1,refetchInterval:!1})},"useScheduleVendorTargets",0,function(e){return(0,t.useQuery)({queryKey:f.vendorTargets(e.orgSlug,e.projectId),queryFn:async()=>
2(0,p.traceClient)("useScheduleVendorTargets","listScheduleVendorTargets",async()=>{let t=await l({orgSlug:e.orgSlug,projectId:e.projectId});return t.ok?t.vendors:[]},["react-query","integrations"]),enabled:(e.enabled??!0)&&e.orgSlug.length>0&&e.projectId.length>0,staleTime:6e4,refetchOnWindowFocus:!1,refetchInterval:!1})},"useThreadsTargets",0,function(e){return(0,t.useQuery)({queryKey:f.threadsTargets(e.orgSlug,e.projectId),queryFn:async()=>(0,p.traceClient)("useThreadsTargets","listThreadsTargets",async()=>{let t=await u({orgSlug:e.orgSlug,projectId:e.projectId});return t.ok?t.targets:[]},["react-query","integrations"]),enabled:(e.enabled??!0)&&e.orgSlug.length>0&&e.projectId.length>0,staleTime:6e4,refetchOnWindowFocus:!1,refetchInterval:!1})},"useVendorAssetContext",0,function(e){return(0,t.useQuery)({queryKey:f.vendorAssetContext(e.orgSlug,e.projectId,e.vendor),queryFn:async()=>(0,p.traceClient)("useVendorAssetContext",e.vendor,async()=>c({orgSlug:e.orgSlug,projectId:e.projectId,vendor:e.vendor}),["react-query","integrations"]),enabled:(e.enabled??!0)&&e.orgSlug.length>0&&e.projectId.length>0,staleTime:3e5,refetchOnWindowFocus:!1,refetchInterval:!1})}],733589)},419654,e=>{"use strict";var t=e.i(95187);let r=(0,t.createServerReference)("4083916867ce83bf8cde2911093a35344f95fb28b6",t.callServer,void 0,t.findSourceMapURL,"listCanvasArtifactsAction");e.s(["listCanvasArtifactsAction",0,r])},388504,e=>{"use strict";e.i(271645),e.i(859978),e.s(["canvasTilesQueryKey",0,function(e,t){return["workspace","v2CanvasTiles",e,t]}])},659928,641025,363800,e=>{"use strict";var t=e.i(271645),r=e.i(619273),n=e.i(266027),i=e.i(912598),s=e.i(419654),a=e.i(33202),o=e.i(388504),l=e.i(859978),u=e.i(676361);let c=new Map;async function d(e,t){let r=`${e}::${t}`,n=c.get(r);if(!n)return;c.delete(r),null!=n.timer&&clearTimeout(n.timer);let i=Array.from(n.pending.keys());if(0===i.length)return;let s=[];for(let e=0;e<i.length;e+=24)s.push(i.slice(e,e+24));try{let r=await Promise.all(s.map(r=>(0,u.signProjectStorageFileIdsAction)(e,t,r)));for(let e=0;e<s.length;e++){let t=s[e],i=r[e];t.forEach((e,t)=>{let r=n.pending.get(e);if(r)if(i.ok){let e={url:i.urls[t]??"",thumbnailUrl:i.thumbnailUrls?.[t]??""};for(let t of r)t.resolve(e)}else{let e={url:"",thumbnailUrl:""};for(let t of r)t.resolve(e)}})}}catch(t){let e=t instanceof Error?t:Error(String(t));for(let[,t]of n.pending)for(let r of t)r.reject(e)}}async function h(e,t,r){if(0===r.length)return{ok:!0,urls:[],thumbnailUrls:[]};let n=`${e}::${t}`,i=c.get(n);i||(i={pending:new Map,timer:null},c.set(n,i));let s=r.map(e=>new Promise((t,r)=>{let n=i.pending.get(e)??[];n.push({resolve:t,reject:r}),i.pending.set(e,n)}));null==i.timer&&(i.timer=setTimeout(()=>{d(e,t)},50));try{let e=await Promise.all(s);return{ok:!0,urls:e.map(e=>e.url),thumbnailUrls:e.map(e=>e.thumbnailUrl)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"Sign request failed."}}}function p(e){let t=e.preview??{};return"string"==typeof t.posterThumbUrl?t.posterThumbUrl:"string"==typeof t.posterUrl?t.posterUrl:"string"==typeof t.imageUrl&&t.imageUrl.startsWith("http")?t.imageUrl:"string"==typeof t.thumbnailUrl&&t.thumbnailUrl.startsWith("http")?t.thumbnailUrl:"string"==typeof t.videoThumbnailUrl&&t.videoThumbnailUrl.startsWith("http")?t.videoThumbnailUrl:null}function f(e){let t=e.preview??{},r=[],n=t.videoStorageFileId;"string"==typeof n&&n.length>0&&r.push(n);let i=t.imageStorageFileIds;if(Array.isArray(i))for(let e of i)"string"==typeof e&&e.length>0&&r.push(e);let s=t.videoSegmentFileIds;if(Array.isArray(s)){let e=s[0];"string"==typeof e&&e.length>0&&r.push(e)}let a=t.htmlStorageFileId;"string"==typeof a&&a.length>0&&r.push(a);let o=t.pdfStorageFileId;return"string"==typeof o&&o.length>0&&r.push(o),r}function g(e,t){for(let e of["operatorBrief","prompt","brief","userPrompt","subject","summary"]){let r=t[e];if("string"==typeof r&&r.trim().length>0)return r.trim().slice(0,220)}return"string"==typeof t.firstSubject?t.firstSubject:"string"==typeof t.firstHeadline?t.firstHeadline:"string"==typeof t.headline?t.headline:""}function y(e,t){return"string"==typeof t.title&&t.title.trim()?t.title.trim():"string"==typeof t.subject&&t.subject.trim()?t.subject.trim():"string"==typeof t.componentName&&t.componentName.trim()?t.componentName.trim():"string"==typeof t.name&&t.name.trim()?t.name.trim():"string"==typeof t.headline&&t.headline.trim()?t.headline.trim():null}function m(e){return"video"===e||"motion"===e||"ugc-talking-head"===e}e.s(["signStorageIdsBatched",0,h],641025),e.s(["collectStorageIds",0,f,"extractPreHoistedCoverUrl",0,p,"isVideoCoverKind",0,m,"pickSubjectFromPreview",0,g,"pickTitleFromPreview",0,y,"shortKindLabel",0,function(e,t){switch(e){case"image-deck":case"deck":return"Deck";case"static-ad":return"Paid Ad";case"ugc-talking-head":return"UGC Clip";case"ugc-script":return"UGC Script";case"landing-page":return"Landing";case"email-sequence":return"Sequence";case"script-long-form":return"Script";case"sales-letter":return"Sales Letter";case"blog-post":return"Blog";case"automation-blueprint":return"Workflow";case"image":return"Image";case"video":return"Video";
2case"motion":return"Motion";case"thumbnail":return"Thumbnail";case"banner":return"Banner";case"carousel":return"Carousel";case"story":return"Story";case"funnel":return"Funnel";case"email":return"Email";case"voiceover":return"Voiceover";case"jingle":return"Jingle";default:return t??e.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}}],363800);let b={tiles:(e,t)=>(0,o.canvasTilesQueryKey)(e,t),signed:(e,t)=>["calendar-library","signed","v2",e,t]};e.s(["calendarLibraryQueryKeys",0,b,"useCalendarLibrary",0,function(e,o,u){let c=(0,i.useQueryClient)(),d=Math.max(1,u?.window??24),v=(0,n.useQuery)({queryKey:b.tiles(e,o),queryFn:async()=>{let t=await (0,s.listCanvasArtifactsAction)({orgSlug:e,projectId:o});if(!t.ok)throw Error(t.error);return t.tiles},enabled:!!(e&&o),staleTime:6e4,refetchOnWindowFocus:!1}),S=(0,l.useLeadingThrottle)(()=>{c.invalidateQueries({queryKey:b.tiles(e,o)})},800);(0,t.useEffect)(()=>{if(e&&o)return(0,a.subscribeToProjectEvents)(e,o,e=>{if("surface_updated"===e.type){let t=e.payload?.surface;if("creative"!==t&&"schedule"!==t)return}S()},["module_runs","surface_updated"])},[e,o,S]);let I=(0,t.useMemo)(()=>(v.data??[]).filter(e=>{if(e.id.startsWith("phase:")||e.id.startsWith("module:"))return!1;let t=e.preview??{};return!0!==t.phaseSection&&!0!==t.placeholder}).sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()),[v.data]),R=(0,t.useMemo)(()=>I.slice(0,d),[I,d]),T=(0,t.useMemo)(()=>{let e=new Set;for(let t of I.slice(0,d+24))for(let r of f(t))e.add(r);return Array.from(e)},[I,d]),C=(0,t.useRef)(T);C.current=T;let j=T.join(","),{data:A}=(0,n.useQuery)({queryKey:b.signed(e,o),queryFn:async()=>{let t=C.current,r={},n={};if(0===t.length)return{urls:r,thumbnails:n};let i=await h(e,o,t);if(!i.ok)throw Error(i.error||"Failed to sign storage URLs");return t.forEach((e,t)=>{let s=i.urls[t];s&&(r[e]=s);let a=i.thumbnailUrls[t];a&&(n[e]=a)}),{urls:r,thumbnails:n}},enabled:T.length>0,staleTime:6e5,placeholderData:r.keepPreviousData,retry:3,retryDelay:e=>Math.min(1e3*2**e,8e3)}),w=(0,t.useRef)(j);return(0,t.useEffect)(()=>{w.current!==j&&(w.current=j,c.invalidateQueries({queryKey:b.signed(e,o)}))},[j,e,o,c]),{tiles:(0,t.useMemo)(()=>{let e=A?.urls??{},t=A?.thumbnails??{};return R.map(r=>{let n=r.preview??{},i=p(r),s=!1,a="string"==typeof n.htmlStorageFileId?n.htmlStorageFileId:null;if(!i)for(let n of f(r)){if(n===a)continue;let r=t[n];if(r){i=r,s=!0;break}let o=e[n];if(o){i=o;break}}return{id:r.id,kind:r.kind,createdAt:r.createdAt,capabilityStep:r.capabilityStep,title:y(r.kind,n),subject:g(r.kind,n),suggestedCaption:function(e){let t=e=>"string"==typeof e&&e.trim().length>0?e.trim():null,r=t(e.headline)??t(e.hook),n=t(e.caption)??t(e.primaryText)??t(e.bodyCopy)??t(e.bodyText)??t(e.scriptExcerpt),i=t(e.cta)??t(e.ctaLabel),s=[];for(let e of[r,n,i])e&&!s.includes(e)&&s.push(e);return 0===s.length?null:s.join("\n\n").slice(0,2200)}(n),primaryImageStorageFileId:function(e){let t=e.imageStorageFileIds;if(Array.isArray(t)&&"string"==typeof t[0]&&t[0])return t[0];for(let t of["thumbnailStorageFileId","posterStorageFileId","imageStorageFileId","storageFileId"]){let r=e[t];if("string"==typeof r&&r.length>0)return r}return null}(n),videoAspectRatio:"string"==typeof n.videoAspectRatio?n.videoAspectRatio:null,videoDurationSeconds:(()=>{for(let e of["videoTotalDurationSeconds","videoSeconds","durationSec"]){let t=n[e];if("number"==typeof t&&Number.isFinite(t)&&t>0)return t}return null})(),coverUrl:i,coverIsVideo:!!i&&!s&&m(r.kind),htmlUrl:a?e[a]??null:null}})},[R,A]),totalCount:I.length,loading:v.isLoading}}],659928)}]);
3
4//# debugId=edd3cfd0-abb1-473a-8a31-34bd365e9f0e

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.