1import{S as s,i as t,s as e,e as r,a,t as o,c as n,b as l,d as p,f,g as m,h as i,j as u,k as c,m as g,l as $}from"./client.351d8fc2.js";import{C as x,F as y}from"./ColumnLayout.410213df.js";import{g as d,q as j}from"./startWith.8b322780.js";import{f as h,l as q}from"./_prefs.4956240e.js";import"./Icon.535f639e.js";import"./Settings.97ea63ac.js";import"./faHome.5f8a1c1c.js";import"./faStar.9730d0d5.js";import"./faEye.7cd2d1df.js";import"./_auth.72c3c46a.js";function w(s){let t,e;return t=new x({props:{slugstr:s[3],posts:s[0],res:s[1],after:s[2],params:s[5].query,mode:"gettyimages"}}),{c(){u(t.$$.fragment)},l(s){c(t.$$.fragment,s)},m(s,r){g(t,s,r),e=!0},p(s,e){const r={};8&e&&(r.slugstr=s[3]),1&e&&(r.posts=s[0]),2&e&&(r.res=s[1]),4&e&&(r.after=s[2]),32&e&&(r.params=s[5].query),t.$set(r)},i(s){e||(l(t.$$.fragment,s),e=!0)},o(s){o(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function S(s){let t,e;return t=new y({props:{slugstr:s[3],posts:s[0],res:s[1],after:s[2],params:s[5].query,mode:"gettyimages"}}),{c(){u(t.$$.fragment)},l(s){c(t.$$.fragment,s)},m(s,r){g(t,s,r),e=!0},p(s,e){const r={};8&e&&(r.slugstr=s[3]),1&e&&(r.posts=s[0]),2&e&&(r.res=s[1]),4&e&&(r.after=s[2]),32&e&&(r.params=s[5].query),t.$set(r)},i(s){e||(l(t.$$.fragment,s),e=!0)},o(s){o(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function C(s){let t,e,f,m;const u=[S,w],c=[];function g(s,t){return 0==s[4]?0:1}return t=g(s),e=c[t]=u[t](s),{c(){e.c(),f=r()},l(s){e.l(s),f=r()},m(s,e){c[t].m(s,e),a(s,f,e),m=!0},p(s,[r]){let a=t;t=g(s),t===a?c[t].p(s,r):(i(),o(c[a],1,1,()=>{c[a]=null}),n(),e=c[t],e?e.p(s,r):(e=c[t]=u[t](s),e.c()),l(e,1),e.m(f.parentNode,f))},i(s){m||(l(e),m=!0)},o(s){o(e),m=!1},d(s){c[t].d(s),s&&p(f)}}}async function L({path:s,params:t,query:e}){if("undefined"==typeof window)return;console.log(s);let r=s.substring(1).replace(/\/$/,"").replace(/%20/g,"").replace(/gfycat.com\//,"").replace(/collections\//,""),[a,o]=r.split("/");console.log(a,o,s);let{posts:n,res:l,after:p}=await d(`/api/gettyimages.com/photos?${j(e)}`);return console.log("xxxxxxxxxxxxx--"),console.log(n),{posts:n,after:p,res:l,slugstr:r}}function b(s,t,e){let r,a,o;f(s,h,s=>e(7,r=s)),f(s,q,s=>e(4,a=s));const{page:n}=m();f(s,n,s=>e(5,o=s)),h.useLocalStorage({}),q.useLocalStorage(0);let{posts:l=[]}=t,{res:p}=t,{after:i}=t,{slugstr:u}=t;for(let s of l)s.favorite=!!r[s.url];return s.$$set=s=>{"posts"in s&&e(0,l=s.posts),"res"in s&&e(1,p=s.res),"after"in s&&e(2,i=s.after),"slugstr"in s&&e(3,u=s.slugstr)},[l,p,i,u,a,o,n]}class E extends s{constructor(s){super(),t(this,s,b,C,e,{posts:0,res:1,after:2,slugstr:3})}}export{E as default,L as preload};
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.