!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a08e82-2a00-7f22-8527-2c0a2e754ade")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,993789,e=>{"use strict";var t=e.i(270401);let r=t.forwardRef(function({title:e,titleId:r,...n},i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":r},n),e?t.createElement("title",{id:r},e):null,t.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))});e.s(["ChevronRightIcon",0,r],993789)},621364,e=>{"use strict";var t=e.i(237425),r=e.i(397377),n=e.i(270401);function i(e,t,n){try{return e(t)}catch(e){return(0,r.l)("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":""),t,e,n),null}}function a(e){function t(t){if(void 0===t)return null;let r="";if(Array.isArray(t)){if(void 0===t[0])return null;r=t[0]}return"string"==typeof t&&(r=t),i(e.parse,r)}return{type:"single",eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide:r=>t(r)??e}},withOptions(e){return{...this,...e}}}}let s=a({parse:e=>e,serialize:String}),l=a({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)});a({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)}),a({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return(1&t.length?"0":"")+t}});let o=a({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String}),u=a({parse:e=>"true"===e.toLowerCase(),serialize:String});function c(e,t){return e.valueOf()===t.valueOf()}function p(e){return a({parse:t=>e.includes(t)?t:null,serialize:String})}function d(e){return"string"==typeof e||e instanceof URLSearchParams||e instanceof URL}a({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:c}),a({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:c}),a({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:c});let m=(0,t.r)(),g={};function f(e,i={}){let a=(0,n.useId)(),s=(0,r.i)(),l=(0,r.a)(),{history:o="replace",scroll:u=s?.scroll??!1,shallow:c=s?.shallow??!0,throttleMs:p=t.s.timeMs,limitUrlUpdates:d=s?.limitUrlUpdates,clearOnDefault:v=s?.clearOnDefault??!0,startTransition:S,urlKeys:O=g}=i,x=Object.keys(e).join(","),A=(0,n.useMemo)(()=>Object.fromEntries(Object.keys(e).map(e=>[e,O[e]??e])),[x,JSON.stringify(O)]),j=(0,r.r)(Object.values(A)),w=j.searchParams,b=(0,n.useRef)({}),C=(0,n.useMemo)(()=>Object.fromEntries(Object.keys(e).map(t=>[t,e[t].defaultValue??null])),[Object.values(e).map(({defaultValue:e})=>e).join(",")]),k=t.t.useQueuedQueries(Object.values(A)),[P,q]=(0,n.useState)(()=>h(e,O,w??new URLSearchParams,k).state),R=(0,n.useRef)(P);if((0,r.c)("[nuq+ %s `%s`] render - state: %O, iSP: %s",a,x,P,w),Object.keys(b.current).join("&")!==Object.values(A).join("&")){let{state:t,hasChanged:n}=h(e,O,w,k,b.current,R.current);n&&((0,r.c)("[nuq+ %s `%s`] State changed: %O",a,x,{state:t,initialSearchParams:w,queuedQueries:k,queryRef:b.current,stateRef:R.current}),R.current=t,q(t)),b.current=Object.fromEntries(Object.entries(A).map(([t,r])=>[r,e[t]?.type==="multi"?w?.getAll(r):w?.get(r)??null]))}(0,n.useEffect)(()=>{let{state:t,hasChanged:n}=h(e,O,w,k,b.current,R.current);n&&((0,r.c)("[nuq+ %s `%s`] State changed: %O",a,x,{state:t,initialSearchParams:w,queuedQueries:k,queryRef:b.current,stateRef:R.current}),R.current=t,q(t))},[Object.values(A).map(e=>`${e}=${w?.getAll(e)}`).join("&"),JSON.stringify(k)]),(0,n.useEffect)(()=>{let t=Object.keys(e).reduce((t,n)=>(t[n]=({state:t,query:i})=>{q(s=>{let{defaultValue:l}=e[n],o=A[n],u=t??l??null;return Object.is(s[n]??l??null,u)?((0,r.c)("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",a,x,o,t,l,R.current),s):(R.current={...R.current,[n]:u},b.current[o]=i,(0,r.c)("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",a,x,o,t,l,R.current),R.current)})},t),{});for(let n of Object.keys(e)){let e=A[n];(0,r.c)("[nuq+ %s `%s`] Subscribing to sync for `%s`",a,e,x),m.on(e,t[n])}return()=>{for(let n of Object.keys(e)){let e=A[n];(0,r.c)("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",a,e,x),m.off(e,t[n])}}},[x,A]);let I=(0,n.useCallback)((n,i={})=>{let s,g=Object.fromEntries(Object.keys(e).map(e=>[e,null])),f="function"==typeof n?n(y(R.current,C))??g:n??g;(0,r.c)("[nuq+ %s `%s`] setState: %O",a,x,f);let h=0,O=!1,w=[];for(let[n,a]of Object.entries(f)){let g=e[n],f=A[n];if(!g||void 0===a)continue;(i.clearOnDefault??g.clearOnDefault??v)&&null!==a&&void 0!==g.defaultValue&&(g.eq??((e,t)=>e===t))(a,g.defaultValue)&&(a=null);let y=null===a?null:(g.serialize??String)(a);m.emit(f,{state:a,query:y});let x={key:f,query:y,options:{history:i.history??g.history??o,shallow:i.shallow??g.shallow??c,scroll:i.scroll??g.scroll??u,startTransition:i.startTransition??g.startTransition??S}};if(i?.limitUrlUpdates?.method==="debounce"||d?.method==="debounce"||g.limitUrlUpdates?.method==="debounce"){!0===x.options.shallow&&console.warn((0,r.s)(422));let e=i?.limitUrlUpdates?.timeMs??d?.timeMs??g.limitUrlUpdates?.timeMs??t.s.timeMs,n=t.t.push(x,e,j,l);ht(e),O?t.n.flush(j,l):t.n.getPendingPromise(j));return s??b},[x,o,c,u,p,d?.method,d?.timeMs,S,A,j.updateUrl,j.getSearchParamsSnapshot,j.rateLimitFactor,l,C]);return[(0,n.useMemo)(()=>y(P,C),[P,C]),I]}function h(e,r,n,a,s,l){let o=!1,u=Object.entries(e).reduce((e,[u,c])=>{var p;let d=r?.[u]??u,m=a[d],g="multi"===c.type?[]:null,f=void 0===m?("multi"===c.type?n?.getAll(d):n?.get(d))??g:m;return s&&l&&((p=s[d]??g)===f||null!==p&&null!==f&&"string"!=typeof p&&"string"!=typeof f&&p.length===f.length&&p.every((e,t)=>e===f[t]))?e[u]=l[u]??null:(o=!0,e[u]=((0,t.i)(f)?null:i(c.parse,f,d))??null,s&&(s[d]=f)),e},{});if(!o){let t=Object.keys(e),r=Object.keys(l??{});o=t.length!==r.length||t.some(e=>!r.includes(e))}return{state:u,hasChanged:o}}function y(e,t){return Object.fromEntries(Object.keys(e).map(r=>[r,e[r]??t[r]??null]))}e.s(["createSerializer",0,function(e,{clearOnDefault:n=!0,urlKeys:i={},processUrlSearchParams:a}={}){return function(s,l={}){let[o,u]=d(s)?function(e){if("string"==typeof e){let[t="",...r]=e.split("?");return[t,new URLSearchParams(r.join("?"))]}return e instanceof URLSearchParams?["",new URLSearchParams(e)]:[e.origin+e.pathname,new URLSearchParams(e.searchParams)]}(s):["",new URLSearchParams],c=d(s)?l:s;if(null===c){for(let t in e){let e=i[t]??t;u.delete(e)}return a&&(u=a(u)),o+(0,r.o)(u)}for(let r in e){let a=e[r],s=c[r];if(!a||void 0===s)continue;let l=i[r]??r,o=void 0!==a.defaultValue&&null!==s&&(a.eq??((e,t)=>e===t))(s,a.defaultValue);null===s||(a.clearOnDefault??n??!0)&&o?u.delete(l):u=(0,t.a)(a.serialize(s),l,u)}return a&&(u=a(u)),o+(0,r.o)(u)}},"parseAsArrayOf",0,function(e,t=","){let r=e.eq??((e,t)=>e===t),n=encodeURIComponent(t);return a({parse:r=>""===r?[]:r.split(t).map((r,a)=>i(e.parse,r.replaceAll(n,t),`[${a}]`)).filter(e=>null!=e),serialize:r=>r.map(r=>(e.serialize?e.serialize(r):String(r)).replaceAll(t,n)).join(t),eq:(e,t)=>e===t||e.length===t.length&&e.every((e,n)=>r(e,t[n]))})},"parseAsBoolean",0,u,"parseAsFloat",0,o,"parseAsInteger",0,l,"parseAsJson",0,function(e){return a({parse:t=>{try{let r=JSON.parse(t);if("~standard"in e){let t=e["~standard"].validate(r);if(t instanceof Promise)throw Error("[nuqs] Only synchronous Standard Schemas are supported in parseAsJson.");return t.issues?null:t.value}return e(r)}catch{return null}},serialize:e=>JSON.stringify(e),eq:(e,t)=>e===t||JSON.stringify(e)===JSON.stringify(t)})},"parseAsNativeArrayOf",0,function(e){let t=e.eq??((e,t)=>e===t);return(function(e){function t(t){return void 0===t?null:i(e.parse,Array.isArray(t)?t:[t])}return{type:"multi",eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide:r=>t(r)??e}},withOptions(e){return{...this,...e}}}})({parse:t=>{let r=t.map((t,r)=>i(e.parse,t,`[${r}]`)).filter(e=>null!=e);return 0===r.length?null:r},serialize:t=>(Array.isArray(t)?t:[t]).flatMap(t=>{let r=e.serialize?.(t)??String(t);return"string"==typeof r?[r]:[...r]}),eq:(e,r)=>e===r||e.length===r.length&&e.every((e,n)=>t(e,r[n]))}).withDefault([])},"parseAsString",0,s,"parseAsStringEnum",0,function(e){return p(e)},"parseAsStringLiteral",0,p,"useQueryState",0,function(e,t={}){let{parse:r,type:i,serialize:a,eq:s,defaultValue:l,...o}=t,[{[e]:u},c]=f({[e]:{parse:r??(e=>e),type:i,serialize:a,eq:s,defaultValue:l}},o);return[u,(0,n.useCallback)((t,r={})=>c(r=>({[e]:"function"==typeof t?t(r[e]):t}),r),[e,c])]},"useQueryStates",0,f],621364)},847255,320319,952450,703298,604694,100274,517715,e=>{"use strict";e.i(81174);var t=e.i(217631);let r={CliAgent:"cli-agent",IdeExtension:"ide-extension",CloudAgent:"cloud-agent",ProgrammingApp:"programming-app",NativeAppBuilder:"native-app-builder",CreativeWriting:"creative-writing",VideoGen:"video-gen",ImageGen:"image-gen",AudioGen:"audio-gen",Roleplay:"roleplay",Game:"game",WritingAssistant:"writing-assistant",GeneralChat:"general-chat",PersonalAgent:"personal-agent",Legal:"legal"},n={Coding:"coding",Creative:"creative",Productivity:"productivity",Entertainment:"entertainment"},i={[r.CliAgent]:"CLI Agents",[r.IdeExtension]:"IDE Extensions",[r.CloudAgent]:"Cloud Agents",[r.ProgrammingApp]:"Programming App",[r.NativeAppBuilder]:"Native App Builders",[r.CreativeWriting]:"Creative Writing",[r.VideoGen]:"Video Generation",[r.ImageGen]:"Image Generation",[r.AudioGen]:"Audio Generation",[r.Roleplay]:"Roleplay",[r.Game]:"Game",[r.WritingAssistant]:"Writing Assistants",[r.GeneralChat]:"General Chat",[r.PersonalAgent]:"Personal Agents",[r.Legal]:"Legal"},a={[n.Coding]:"Coding Agents",[n.Creative]:"Creative",[n.Productivity]:"Productivity",[n.Entertainment]:"Entertainment"},s={[n.Coding]:[r.CliAgent,r.IdeExtension,r.CloudAgent,r.ProgrammingApp,r.NativeAppBuilder],[n.Creative]:[r.CreativeWriting,r.VideoGen,r.ImageGen,r.AudioGen],[n.Productivity]:[r.WritingAssistant,r.GeneralChat,r.PersonalAgent,r.Legal],[n.Entertainment]:[r.Roleplay,r.Game]},l=function(){let e={};for(let t of Object.values(n))for(let r of s[t])e[r]=t;return e}();function o(e){return i[e]}function u(e){return e.filter(e=>(0,t.isMember)(e,r))}e.s(["AppCategoryGroup",0,n,"CATEGORY_TO_GROUP",0,l,"filterValidCategories",0,u,"getCategoryDisplayName",0,o,"getCategoryGroupDisplayName",0,function(e){return a[e]}],847255);var c=e.i(222666),p=e.i(505962),d=e.i(452473);let m=(0,e.i(207298).cva)("",{variants:{variant:{divided:"marketplace-app-list-divided",spaced:"marketplace-app-list-spaced flex flex-col gap-0.5"}}});e.s(["MarketplaceAppList",0,function(e){let t,r,n=(0,p.c)(6),{variant:i,children:a,className:s}=e;return n[0]!==s||n[1]!==i?(t=(0,d.cn)(m({variant:i}),s),n[0]=s,n[1]=i,n[2]=t):t=n[2],n[3]!==a||n[4]!==t?(r=(0,c.jsx)("div",{"data-slot":"marketplace-app-list",className:t,children:a}),n[3]=a,n[4]=t,n[5]=r):r=n[5],r}],320319);var g=e.i(993789),f=e.i(143349),h=e.i(885840),y=e.i(837556),v=e.i(188363),S=e.i(779100),O=e.i(781656),x=e.i(370066),A=e.i(270401),j=e.i(936532),w=e.i(764043);e.i(406201);var b=e.i(806024);function C(e){let t=l[e],r=(0,j.getCategoryGroupColors)(t);return(0,c.jsx)("span",{className:(0,d.cn)("inline-flex items-center rounded-sm px-1 py-0.5 text-2xs leading-tight font-medium whitespace-nowrap",r.bg,r.text),children:o(e)},e)}function k(e){let t,r,n,i,a=(0,p.c)(10),{appAnalytics:s,sortBy:l}=e,o=void 0===l?"tokens":l,u=(0,S.useLocale)(),d="requests"===o?s.total_requests:s.total_tokens,m="requests"===o?"requests":"tokens";return a[0]!==u||a[1]!==d?(t=(0,x.formatNumber)(d,{locale:u,preset:"compact-rounded-thousands"})??"—",a[0]=u,a[1]=d,a[2]=t):t=a[2],a[3]!==t?(r=(0,c.jsx)("span",{className:"text-sm font-medium whitespace-nowrap",children:t}),a[3]=t,a[4]=r):r=a[4],a[5]!==m?(n=(0,c.jsx)("span",{className:"text-xs text-muted-foreground ml-1 hidden sm:inline",children:m}),a[5]=m,a[6]=n):n=a[6],a[7]!==r||a[8]!==n?(i=(0,c.jsxs)("div",{children:[r,n]}),a[7]=r,a[8]=n,a[9]=i):i=a[9],i}e.s(["MarketplaceAppRow",0,function(e){var t;let r,n,i,a,s,l,o,m,S,x,j,P,q,R,I,N,_,E,U,G,z,M,T=(0,p.c)(76),{appAnalytics:L,rank:D,showGrowth:B,growthPercent:F,sortBy:V,dotColor:W,showCategories:Q}=e,J=void 0===V?"tokens":V,{app:K}=L,[$,H]=(0,A.useState)(K);if(!$)return null;T[0]!==$?(r={name:function(e){if(e.title)return e.title;if(!URL.canParse(e.origin_url))return e.origin_url;let t=new URL(e.origin_url);return(0,O.removeTrailingSlash)(t.host+t.pathname)}(t=$),description:t.description},T[0]=$,T[1]=r):r=T[1];let Y=r,Z=$.favicon_url||$.main_url||$.origin_url||"";if(T[2]!==$||T[3]!==W||T[4]!==Y.description||T[5]!==Y.name||T[6]!==D||T[7]!==Q||T[8]!==Z){let e,t,r,p=Q?u($.categories):[];s="marketplace-app-row",l="marketplace-app",o="flex items-center hover:bg-muted/50 group transition",n=b.Link;let g=p.length>0?"items-start":"items-center";T[22]!==g?(P=(0,d.cn)("flex flex-1 min-w-0 gap-2 sm:gap-3 py-3 sm:py-3.5 px-2 sm:px-4",g,"cursor-pointer text-foreground"),T[22]=g,T[23]=P):P=T[23],T[24]!==$?(q=(0,f.getAppPath)($),T[24]=$,T[25]=q):q=T[25],T[26]===Symbol.for("react.memo_cache_sentinel")?(e=(0,d.cn)("flex h-9 items-center justify-end shrink-0","text-muted-foreground text-sm w-5 sm:w-6"),T[26]=e):e=T[26],T[27]!==D?(R=(0,c.jsxs)("span",{className:e,children:[D,"."]}),T[27]=D,T[28]=R):R=T[28],T[29]!==W?(i=W&&(0,c.jsx)("div",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:W}}),T[29]=W,T[30]=i):i=T[30],T[31]!==$.icon_class_name?(t=(0,d.cn)("size-full",$.icon_class_name),T[31]=$.icon_class_name,T[32]=t):t=T[32];let h=!!$.favicon_url;T[33]!==t||T[34]!==h||T[35]!==Z?(a=(0,c.jsx)(y.IconFrame,{variant:"app",className:"size-9",children:(0,c.jsx)(v.RemoteFavicon,{className:t,faviconFor:Z,hasCuratedFaviconUrl:h})}),T[33]=t,T[34]=h,T[35]=Z,T[36]=a):a=T[36],m="flex-1 min-w-0 overflow-hidden",T[37]!==Y.name?(S=(0,c.jsx)("div",{className:"flex items-center gap-1.5",children:(0,c.jsx)("span",{className:"font-medium text-xs truncate",children:Y.name})}),T[37]=Y.name,T[38]=S):S=T[38],T[39]!==$.origin_url||T[40]!==Y.description?(r=Y.description||(0,O.removeTrailingSlash)(new URL($.origin_url).host),T[39]=$.origin_url,T[40]=Y.description,T[41]=r):r=T[41],T[42]!==r?(x=(0,c.jsx)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground min-w-0",children:(0,c.jsx)("p",{className:"truncate",children:r})}),T[42]=r,T[43]=x):x=T[43],j=p.length>0&&(0,c.jsx)("div",{className:"flex flex-wrap items-center gap-1 mt-1",children:p.map(C)}),T[2]=$,T[3]=W,T[4]=Y.description,T[5]=Y.name,T[6]=D,T[7]=Q,T[8]=Z,T[9]=n,T[10]=i,T[11]=a,T[12]=s,T[13]=l,T[14]=o,T[15]=m,T[16]=S,T[17]=x,T[18]=j,T[19]=P,T[20]=q,T[21]=R}else n=T[9],i=T[10],a=T[11],s=T[12],l=T[13],o=T[14],m=T[15],S=T[16],x=T[17],j=T[18],P=T[19],q=T[20],R=T[21];return T[44]!==m||T[45]!==S||T[46]!==x||T[47]!==j?(I=(0,c.jsxs)("div",{className:m,children:[S,x,j]}),T[44]=m,T[45]=S,T[46]=x,T[47]=j,T[48]=I):I=T[48],T[49]!==F||T[50]!==B?(N=B&&void 0!==F&&(0,c.jsx)("span",{className:(0,d.cn)("text-xs font-medium",F>0?"text-positive":"text-negative"),title:(0,h.formatGrowthPercentTooltip)(F,"Change vs previous period"),children:(0,h.formatGrowthPercent)(F)}),T[49]=F,T[50]=B,T[51]=N):N=T[51],T[52]!==L||T[53]!==J?(_=(0,c.jsx)(k,{appAnalytics:L,sortBy:J}),T[52]=L,T[53]=J,T[54]=_):_=T[54],T[55]===Symbol.for("react.memo_cache_sentinel")?(E=(0,c.jsx)(g.ChevronRightIcon,{className:"w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity hidden sm:block"}),T[55]=E):E=T[55],T[56]!==N||T[57]!==_?(U=(0,c.jsxs)("div",{className:"text-right shrink-0 flex h-9 items-center gap-2 ml-auto",children:[N,_,E]}),T[56]=N,T[57]=_,T[58]=U):U=T[58],T[59]!==n||T[60]!==i||T[61]!==a||T[62]!==I||T[63]!==U||T[64]!==P||T[65]!==q||T[66]!==R?(G=(0,c.jsxs)(n,{className:P,href:q,children:[R,i,a,I,U]}),T[59]=n,T[60]=i,T[61]=a,T[62]=I,T[63]=U,T[64]=P,T[65]=q,T[66]=R,T[67]=G):G=T[67],T[68]!==$?(z=(0,c.jsx)(w.AdminAppEditButton,{app:$,onUpdate:H,className:"mr-2 sm:mr-4"}),T[68]=$,T[69]=z):z=T[69],T[70]!==s||T[71]!==l||T[72]!==o||T[73]!==G||T[74]!==z?(M=(0,c.jsxs)("div",{"data-slot":s,"data-ssr-content":l,className:o,children:[G,z]}),T[70]=s,T[71]=l,T[72]=o,T[73]=G,T[74]=z,T[75]=M):M=T[75],M}],952450);var P=e.i(553215),q=e.i(738286),R=e.i(252358),I=e.i(621364);Symbol("Input"),!function(){if(!("u"e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide:r=>t(r)??e}},withOptions(e){return{...this,...e}}}}function E(e,t){return e.valueOf()===t.valueOf()}function U(e){return _({parse:t=>e.includes(t)?t:null,serialize:String})}_({parse:e=>e,serialize:String}),_({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)}),_({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)}),_({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return(1&t.length?"0":"")+t}}),_({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String}),_({parse:e=>"true"===e.toLowerCase(),serialize:String}),_({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:E}),_({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:E}),_({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:E});let G=[j.GlobalRankingPeriod.Day,j.GlobalRankingPeriod.Week,j.GlobalRankingPeriod.Month],z=j.GlobalRankingPeriod.Day,M={sort:U(["tokens","requests"]).withDefault("tokens"),period:U(G).withDefault(z)};e.s(["appsSearchParamParsers",0,M],703298);let T=[["Today","day"],["This Week","week"],["This Month","month"]];function L(e){let r,n,i,a,s,l,o=(0,p.c)(12),{period:u,onChange:d}=e;o[0]===Symbol.for("react.memo_cache_sentinel")?(r=M.period.withOptions({history:"push"}),o[0]=r):r=o[0];let[,m]=(0,I.useQueryState)("period",r),g=(0,R.usePosthogClient)();o[1]!==d||o[2]!==g||o[3]!==m?(n=function(e){if(d){d(e),g.capture(P.PostHogEvent.ClickAppsCategoryTimeRange,{period:e});return}m(e),g.capture(P.PostHogEvent.ClickAppsCategoryTimeRange,{period:e})},o[1]=d,o[2]=g,o[3]=m,o[4]=n):n=o[4];let f=n;return o[5]!==f?(i=e=>{(0,t.isMember)(e,j.GlobalRankingPeriod)&&f(e)},o[5]=f,o[6]=i):i=o[6],o[7]===Symbol.for("react.memo_cache_sentinel")?(a=(0,c.jsx)(q.SelectTrigger,{className:"w-32 text-sm pl-4 pr-6",children:(0,c.jsx)(q.SelectValue,{})}),o[7]=a):a=o[7],o[8]===Symbol.for("react.memo_cache_sentinel")?(s=(0,c.jsx)(q.SelectContent,{children:T.map(D)}),o[8]=s):s=o[8],o[9]!==u||o[10]!==i?(l=(0,c.jsxs)(q.Select,{value:u,onValueChange:i,variant:"rounded",size:"compact",children:[a,s]}),o[9]=u,o[10]=i,o[11]=l):l=o[11],l}function D(e){let[t,r]=e;return(0,c.jsx)(q.SelectItem,{value:r,children:t},r)}e.s(["TimeRangeDropdown",0,function(e){let t,r=(0,p.c)(2);return r[0]!==e?(t=(0,c.jsx)(A.Suspense,{fallback:null,children:(0,c.jsx)(L,{...e})}),r[0]=e,r[1]=t):t=r[1],t}],604694);var B=e.i(399976),F=e.i(151960),V=e.i(626824),W=e.i(8842);let Q=(0,V.createQueryKeys)("appsMarketplace",{marketplace:()=>[],categoryPage:({group:e,subcategory:t,sortBy:r,period:n})=>[{group:e,subcategory:t,sortBy:r,period:n}],categoryChart:(e,t)=>[{group:e,subcategory:t}]});e.s(["categoryChartOptions",0,function(e,t){return(0,W.queryOptions)({queryKey:Q.categoryChart(e,t),queryFn:({signal:r})=>(0,F.fetchAPIQuery)((0,B.buildAPIRequestPath)("/api/frontend/v1/apps/marketplace/category-chart",{group:e,subcategory:t??void 0}),{signal:r})})},"categoryPageOptions",0,function(e){return(0,W.queryOptions)({queryKey:Q.categoryPage(e),queryFn:({signal:t})=>(0,F.fetchAPIQuery)((0,B.buildAPIRequestPath)("/api/frontend/v1/apps/marketplace/category",{group:e.group,subcategory:e.subcategory??void 0,sortBy:e.sortBy,period:e.period}),{signal:t})})},"marketplaceOptions",0,function(){return(0,W.queryOptions)({queryKey:Q.marketplace(),queryFn:({signal:e})=>(0,F.fetchAPIQuery)("/api/frontend/v1/apps/marketplace/marketplace",{signal:e})})}],100274),e.s(["APPS_CATEGORY_STATIC_CONTENT",0,"apps-category-rankings","APPS_MARKETPLACE_STATIC_CONTENT",0,"apps-marketplace"],517715)},143349,e=>{"use strict";e.s(["getAppPath",0,function(e){return e.slug?`/apps/${e.slug}`:`/apps/url/${encodeURIComponent(e.origin_url)}`}])},712621,e=>{"use strict";var t=e.i(222666),r=e.i(505962),n=e.i(452473),i=e.i(191379),a=e.i(379684);e.s(["ExternalLink",0,function(e){let s,l,o,u,c,p,d,m,g,f,h,y=(0,r.c)(24);y[0]!==e?({children:s,className:l,icon:o,iconPosition:c,showExternalIcon:p,...u}=e,y[0]=e,y[1]=s,y[2]=l,y[3]=o,y[4]=u,y[5]=c,y[6]=p):(s=y[1],l=y[2],o=y[3],u=y[4],c=y[5],p=y[6]);let v=void 0===c?"end":c,S=void 0!==p&&p;y[7]!==o||y[8]!==S?(d=o??(S?(0,t.jsx)(i.ArrowUpRight,{className:"inline size-3 align-[-1px]"}):null),y[7]=o,y[8]=S,y[9]=d):d=y[9];let O=d;return y[10]!==l?(m=(0,n.cn)(a.LINK_CLASSES,"text-xs cursor-pointer",l),y[10]=l,y[11]=m):m=y[11],y[12]!==v||y[13]!==O?(g="start"===v&&O&&(0,t.jsx)("span",{className:"mr-0.5 inline-flex",children:O}),y[12]=v,y[13]=O,y[14]=g):g=y[14],y[15]!==v||y[16]!==O?(f="end"===v&&O&&(0,t.jsx)("span",{className:"ml-0.5 inline-flex",children:O}),y[15]=v,y[16]=O,y[17]=f):f=y[17],y[18]!==s||y[19]!==u||y[20]!==m||y[21]!==g||y[22]!==f?(h=(0,t.jsxs)("a",{className:m,...u,children:[g,s,f]}),y[18]=s,y[19]=u,y[20]=m,y[21]=g,y[22]=f,y[23]=h):h=y[23],h}])}]); //# sourceMappingURL=0p2-y2txtxglm.js.map //# chunkId=01a08e82-2a00-7f22-8527-2c0a2e754ade