PageSourceSearch

https://pika.style/_next/static/chunks/1958-0fa012ac0fe37642.js

js pika.style collected 2026-09-25 18:39:59 UTC 17,326 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1958],{21958:(e,r,a)=>{a.d(r,{A:()=>q});var s=a(75038),t=a(76430),i=a(19977),n=a(83390),l=a(88061),c=a(1348),d=a(89934),o=a(3028),h=a(59233),x=a(60563),m=a(8557),p=a(22047),g=a(84506),u=a(9677),f=a(3511),j=a(52570),y=a(41075),v=a(90026),b=a(38502),w=a(58454),k=a(71623),N=a(58742),S=a(15212),C=a(33825),A=a(17260);let $=({selected:e,icon:r,title:a,hint:t})=>(0,s.jsxs)("span",{className:"flex items-center gap-2 min-w-[200px]",children:[e?(0,s.jsx)(S.A,{size:14}):(0,s.jsx)("span",{className:"w-[14px]"}),r,(0,s.jsx)("span",{className:"truncate max-w-[180px]",children:a}),t?(0,s.jsx)("span",{className:"ml-auto pl-3 text-xs opacity-50",children:t}):null]});function P(){let{c_Teams:e,c_Workspace:r,c_SwitchWorkspace:a,c_Entitlements:i}=(0,t.useContext)(w.A),l=(e||[]).filter(e=>e.projects?.length||"owner"===e.role);if(!l.length)return null;let c=r?.projectId,d=i?.personalPlan&&"free"!==i.personalPlan||l.some(e=>e.active&&"owner"===e.role),o=async(e,r)=>{String(e||"")!==String(c||"")&&(await a(e),N.oR.success(`Switched to ${r}`))},h=[{title:(0,s.jsx)($,{selected:!c,icon:(0,s.jsx)(C.A,{size:14,className:"opacity-60"}),title:"Personal",hint:d?"Pro":"Free"}),onClick:()=>o(null,"Personal")}];for(let e of l){for(let r of(h.push({title:"div",as:"divider"}),h.push({title:(0,s.jsxs)("span",{className:"text-xs uppercase tracking-wide opacity-50",children:[e.name,e.active?"":" \xb7 inactive"]}),disabled:!0}),e.projects||[]))h.push({title:(0,s.jsx)($,{selected:String(r.id)===String(c),icon:(0,s.jsx)(A.A,{size:14,className:"opacity-60"}),title:r.name,hint:e.active?"Pro":null}),onClick:()=>o(r.id,r.name)});"owner"!==e.role||e.projects?.length||h.push({title:(0,s.jsx)("span",{className:"pl-[22px] opacity-70",children:"+ Create a project"}),as:"a",href:`/user/settings/team/projects?team=${e.id}`})}return h.push({title:"div",as:"divider"}),h.push({title:(0,s.jsx)("span",{className:"pl-[22px]",children:"Manage team"}),as:"a",href:"/user/settings/team"}),(0,s.jsx)(n.ms,{align:"start",items:h,trigger:(0,s.jsxs)("button",{className:(0,k.A)("ml-2 flex items-center gap-2 h-8 pl-2 pr-1.5 rounded-lg text-sm max-w-[220px]","hover:bg-gray-100 dark:hover:bg-gray-800 dark:text-gray-200"),"aria-label":"Switch workspace",children:[c?(0,s.jsx)(A.A,{size:15,className:"opacity-60 shrink-0"}):(0,s.jsx)(C.A,{size:15,className:"opacity-60 shrink-0"}),(0,s.jsx)("span",{className:"truncate font-medium",children:c?r.projectName:"Personal"}),(0,s.jsx)(y.A,{size:12,className:"opacity-50 shrink-0"})]})})}var z=a(18070),E=a(76598),_=a(92376),L=a(4663),R=a(63874),I=a(45609),T=a.n(I),D=a(81394),O=a.n(D),M=a(72651);let U="pika:billing-migration:dismissed-until",V="pika:billing-migration:status";function B(){let{c_Session:e,c_StripeSub:r,c_ActiveSubscription:a}=(0,t.useContext)(w.A),[i,n]=(0,t.useState)(null),[l,c]=(0,t.useState)(!0),[d,o]=(0,t.useState)(!1),h=r?.customer,x=a?.stripe_account==="uk",m=null!=r;if((0,t.useEffect)(()=>{if(!e?.id||!m||!h||x||(()=>{try{return Number(window.localStorage.getItem(U)||0)}catch(e){return 0}})()>Date.now())return;let r=(e=>{try{let r=window.sessionStorage.getItem(V);if(!r)return null;let a=JSON.parse(r);if(a.userId!==e||a.until<Date.now())return null;return a.status}catch(e){return null}})(e.id);if(r){n(r),c(!r.needsMigration);return}let a=!1;return fetch("/api/stripe/migration-status",{credentials:"same-origin"}).then(e=>e.ok?e.json():null).then(r=>{if(!a&&r){var s=e.id;try{window.sessionStorage.setItem(V,JSON.stringify({userId:s,status:r,until:Date.now()+9e5}))}catch(e){}n(r),c(!r.needsMigration)}}).catch(()=>{}),()=>{a=!0}},[e?.id,m,h,x]),l||!i?.legacy)return null;let{legacy:p}=i,g=new Date(p.periodEndISO).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),u="year"===p.interval?"yearly":"monthly",f=async()=>{o(!0);try{let e=await (0,M.SV)({url:"/api/stripe/create-customer",body:{}});if(!e?.id)throw Error("No customer");let r=await (0,M.SV)({url:"/api/stripe/create-checkout-session",body:{customer:e.id,isYearly:"year"===p.interval,clientReferenceId:(0,M.Ii)()}});if(r?.alreadySubscribed){try{window.sessionStorage.removeItem(V)}catch(e){}c(!0),o(!1);return}if(!r?.url)throw Error(r?.error||"No checkout URL");
1window.location.assign(r.url)}catch(e){console.error("migration checkout error",e),N.oR.error("Could not start the switch, please try again or email [email protected]"),o(!1)}};return(0,s.jsx)("div",{className:"w-full bg-amber-50 dark:bg-amber-950/40 border-b border-amber-200 dark:border-amber-900 text-amber-950 dark:text-amber-100 font-inter text-[0.85rem]",children:(0,s.jsxs)("div",{className:"max-w-[1280px] mx-auto px-4 py-2 flex flex-col md:flex-row md:items-center gap-2 md:gap-4",children:[(0,s.jsxs)("p",{className:"flex-1 leading-snug",children:[(0,s.jsx)("strong",{children:"Rishi here, founder of Pika."})," We're moving Pika under our registered company, DaSkrad Ltd. Billing moves with it, so you'll need to set up payment once more. Your ",u," Pro plan runs until ",g,". Nothing is charged today, the first payment lands on ",g,"."]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,s.jsx)("button",{type:"button",onClick:f,disabled:d,className:"px-3 py-1.5 rounded-lg bg-amber-600 hover:bg-amber-700 text-white font-medium disabled:opacity-60",children:d?"Opening…":"Set up payment"}),(0,s.jsx)("button",{type:"button",onClick:()=>{var e=Date.now()+2592e5;try{window.localStorage.setItem(U,String(e))}catch(e){}c(!0)},className:"px-2 py-1.5 rounded-lg hover:bg-amber-100 dark:hover:bg-amber-900/60","aria-label":"Remind me later",children:"Later"})]})]})})}let F=()=>{let{c_Session:e,c_Teams:r}=(0,t.useContext)(w.A);return(0,s.jsx)("div",{className:"dark:bg-gray-900 h-full pt-4 pb-2 px-2",children:(0,s.jsxs)("div",{className:"flex flex-col gap-6 px-3 py-4 text-base",children:[e?(0,s.jsxs)("div",{children:[(0,s.jsx)(J,{children:"Your account"}),(0,s.jsxs)("div",{className:"-ml-3 flex flex-col gap-1",children:[(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/user/dashboard",children:"Dashboard"}),(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/user/library",children:"Library"}),(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/user/settings",children:"Settings"}),r?.length?(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/user/settings/team",children:"Team"}):null]})]}):null,(0,s.jsxs)("div",{children:[(0,s.jsx)(J,{children:"Pika Editor"}),(0,s.jsxs)("div",{className:"-ml-3 flex flex-col gap-1",children:[(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/templates/screenshot-editor",children:"Screenshot Editor"}),(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/templates/tweet-image",children:"Tweet Screenshot"}),(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/templates/code-image",children:"Code Screenshot"}),(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/templates",children:"View all →"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(J,{children:"Apps"}),(0,s.jsxs)("div",{className:"-ml-3 flex flex-col gap-1",children:[(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/tools/browser-extensions",children:"Chrome Extension"}),(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/tools/vscode-extension",children:"VSCode Extension"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(J,{children:"Links"}),(0,s.jsxs)("div",{className:"-ml-3 flex flex-col gap-1",children:[(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/blog",children:"Blog"}),(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/products/embed",children:"Pika Embed"}),(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/pricing",children:"Pricing"})]})]})]})})},J=({children:e})=>(0,s.jsx)("h3",{className:"uppercase text-xs mb-2 font-semibold tracking-[1px] opacity-40",children:e}),K=()=>(0,s.jsx)("div",{className:"bg-white dark:bg-gray-900 dark:border-gray-800 rounded-[7px] border border-gray-200 text-black dark:text-white text-sm",children:(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4 p-3",children:[(0,s.jsx)("div",{className:"flex items-center justify-center flex-col group rounded-lg dark:bg-gray-800/40 bg-gray-100",children:(0,s.jsxs)(T(),{href:"/templates/screenshot-editor",className:"px-7 w-full h-full flex items-center justify-center flex-col",children:[(0,s.jsxs)("div",{className:"grid grid-cols-3 border border-gray-200 dark:bg-gray-800 dark:border-gray-700 dark:divide-gray-700 rounded-lg divide-x divide-y divide-gray-100 text-center text-gray-400 mb-3 backdrop-blur-lg shadow-[0_0_24px_rgba(0,0,0,0.1)] bg-transparent relative max-w-[300px] w-full opacity-70 dark:opacity-40",children:[(0,s.jsx)("div",{className:"flex justify-center p-1",children:(0,s.jsx)(c.A,{size:20})}),(0,s.jsx)("div",{className:"flex justify-center p-1",children:(0,s.jsx)(d.A,{size:20})}),(0,s.jsx)("div",{className:"flex justify-center p-1",children:(0,s.jsx)(o.A,{size:20})}),(0,s.jsx)("div",{className:"flex justify-center p-1",children:(0,s.jsx)(h.A,{size:20})}),(0,s.jsx)("div",{className:"flex justify-center p-1",children:(0,s.jsx)(x.A,{size:20})}),(0,s.jsx)("div",{className:"flex justify-center p-1",children:(0,s.jsx)(m.A,{size:20})})]}),(0,s.jsx)("div",{className:"mt-5 mb-2 group-hover:underline underline-offset-[3px] flex items-center",children:"Open Screenshot Editor"}),(0,s.jsxs)("div",{className:"text-xs text-center ",children:[(0,s.jsx)("span",{className:"opacity-50",children:"Keyboard shortcut: "})," ",(0,s.jsx)(n.iM,{children:"/"})]})]})}),(0,s.jsxs)("div",{className:"flex flex-col gap-6 px-3 py-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(J,{children:"Popular Templates"}),(0,s.jsxs)("div",{className:"-ml-3 flex flex-col gap-1",children:[(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/templates/tweet-image",children:"Tweet Screenshot"}),(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/templates/code-image",children:"Code Screenshot"}),(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/templates",children:"View all →"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(J,{children:"Apps"}),(0,s.jsxs)("div",{className:"-ml-3 flex flex-col gap-1",children:[(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/tools/browser-extensions",children:"Chrome Extension"}),(0,s.jsx)(n.$n,{as:"a",variant:"ternary",href:"/tools/vscode-extension",children:"VSCode Extension"})]})]})]})]})}),Y=()=>{let e=[{key:"blog",title:"Blog",href:"/blog",as:"a",more:"Useful tips and articles for creators",icon:(0,s.jsx)(p.A,{})},{key:"new",title:"What's new",href:"/whats-new",more:"All the new and shiny stuff in Pika",as:"a",icon:(0,s.jsx)(g.A,{})},{icon:(0,s.jsx)(u.A,{}),more:"Earn 30% commission on every sale you refer",title:(0,s.jsx)("div",{className:"relative",children:"Join Affiliate program"}),as:"a",hide:!1,href:"/affiliates",newTab:!1},{icon:(0,s.jsx)(c.A,{}),title:"Advertise on Pika",more:"Reach thousands of creators and developers",as:"a",hide:!1,href:"/partner",newTab:!1},{key:"slack",title:"Slack Community",more:"Ask questions, connect with other users",href:"https://join.slack.com/t/pikastyle/shared_invite/zt-2282cn25v-IXbI572AxoXznUSaNpBm0g",as:"a",newTab:!0,icon:(0,s.jsx)(f.A,{})},{key:"contact",title:"Contact Us",more:"Reach out to us with your queries or feedback",href:"/contact",as:"a",newTab:!0,icon:(0,s.jsx)(j.A,{})}];return(0,s.jsx)("div",{className:"bg-white dark:bg-gray-900 dark:border-gray-800 rounded-[7px] border border-gray-200 text-black dark:text-gray-300 text-sm",children:(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2 px-3 py-3 max-w-[480px]",children:e?.map(e=>(0,s.jsx)("div",{className:"w-full",children:(0,s.jsxs)(T(),{href:e?.href,className:"w-full px-4 py-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800/40 flex gap-2",children:[(0,s.jsx)("div",{className:"text-xl pt-1 opacity-60",children:e?.icon}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"font-inter",children:e?.title}),(0,s.jsx)("p",{className:"mt-px opacity-50",children:e?.more})]})]})},e?.title))})})};function q({disableSticky:e}){let{c_Session:r,c_OpenResetPasswordModal:a,c_OpenLoginOrSignupModal:c,c_OpenSettings:d,isPro:o,c_SetShowCommandCentre:h,c_StripeSub:x,c_Teams:m,c_Entitlements:p}=(0,t.useContext)(w.A),g=(0,_.useRouter)(),{scrollY:u}=(0,L.L)(),[f,j]=(0,t.useState)(),[S,C]=(0,t.useState)(!1),A=g?.pathname?.includes("templates/");return(0,R.L)(u,"change",e=>{j(e)}),(0,E.vC)("slash",e=>
1{"/"===e.key&&(e.preventDefault(),g.push("/templates/screenshot-editor"))}),(0,E.vC)("meta+period, ctrl+period",e=>{"."===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())}),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(B,{}),(0,s.jsx)("header",{className:(0,k.A)("w-full bg-white/80 backdrop-blur-xl border-b dark:bg-[#111]/80 border-gray-200/60 dark:border-gray-800 z-101 duration-300 font-inter text-[0.9rem]",e?"":"sticky top-0",A&&f>30&&f<800?"opacity-0 translate-y-[-60px]":"opacity-100"),children:(0,s.jsx)(n.mc,{width:"1280px",className:"h-[52px] flex items-center",children:(0,s.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-[minmax(120px,1fr)_auto_minmax(120px,1fr)] w-full",children:[(0,s.jsxs)("div",{className:"flex items-center min-w-0",children:[(0,s.jsx)(T(),{href:r?"/user/dashboard":"/",className:"shrink-0",children:(0,s.jsx)(O(),{width:"32",height:"32",src:"/icons/pika-filled-squared-120.png",alt:"Pika Logo"})}),r?(0,s.jsx)(P,{}):null]}),(0,s.jsxs)("div",{className:"hidden md:flex items-center justify-center gap-2 lg:gap-3 whitespace-nowrap text-sm",children:[r?(0,s.jsx)(n.$n,{variant:"ternary",as:"a",href:"/user/dashboard",active:g.pathname.includes("/dashboard"),children:"Dashboard"}):"",(0,s.jsx)(n.m_,{text:(0,s.jsx)(K,{}),noSpacing:!0,arrowClass:"fill-gray-300/80 dark:fill-gray-800",children:(0,s.jsxs)(n.$n,{variant:"ternary",as:"a",href:"/templates/screenshot-editor",children:["Screenshot Editor",(0,s.jsx)(y.A,{size:12,className:"ml-1"})]})}),r?(0,s.jsx)(n.$n,{variant:"ternary",as:"a",href:"/user/library",active:g.pathname.includes("/library"),children:"Library"}):"",o?"":!1===r?(0,s.jsx)(n.$n,{variant:"ternary",as:"a",href:"/products/embed",children:"Pika Embed"}
1):"",o?"":!1===r?(0,s.jsx)(n.m_,{text:(0,s.jsx)(Y,{}),noSpacing:!0,arrowClass:"fill-gray-300/80 dark:fill-gray-800",triggerClass:"hidden lg:flex",children:(0,s.jsxs)(n.$n,{variant:"ternary",children:["Resources",(0,s.jsx)(y.A,{size:12,className:"ml-1"})]})}):"",r?(0,s.jsx)(n.$n,{variant:"ternary",as:"a",href:"/user/settings",active:g.pathname.startsWith("/user/settings"),children:"Settings"}):"",(0,s.jsx)(n.$n,{variant:"ternary",as:"a",href:"/pricing",active:"/pricing"===g.pathname,children:"Pricing"})]}),(0,s.jsx)("div",{className:"hidden md:flex items-center justify-end whitespace-nowrap",children:r?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(n.ms,{align:"right",trigger:(0,s.jsxs)(n.$n,{className:"relative flex items-center content-start leading-none dark:text-white group ml-2",children:[(0,s.jsx)("div",{className:"w-6 h-6 p-[6px] mr-2 text-white rounded-full md:w-7 md:h-7 bg-linear-to-br from-pink-700 to-red-400 flex items-center justify-center leading-none relative",children:o?(0,s.jsx)(n.m_,{text:"Your Pro plan is active",children:(0,s.jsx)("span",{className:"flex text-pink-200",children:(0,s.jsx)(v.A,{size:14,weight:"bold"})})}):""}),(0,s.jsx)("span",{className:"opacity-70 group-hover:opacity-100",children:r?.user_metadata?.name||r?.user_metadata?.first_name}),(0,s.jsx)("span",{className:"relative w-5 h-5 mt-px ml-px opacity-40 group-hover:opacity-100",children:l.zL})]}),items:[{title:(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[r?.email,o&&x?.planType?(0,s.jsx)("div",{className:"text-xs bg-linear-to-br from-purple-600 to-blue-700 text-white font-semibold py-px px-2 rounded-md capitalize",children:"Pro"}):""]}),disabled:!0,onClick:()=>{},className:"opacity-70"},{title:"div-1",as:"divider"},{title:"Settings",onClick:()=>d()},{title:m?.length?"Team":"Create a team",onClick:()=>d("team"),hide:!m?.length&&!(0,z.iJ)()},{title:"Change Password",onClick:()=>a(),hide:!r},{title:"Upgrade to Pro",onClick:()=>g.push("/pricing"),hide:p?p.personalPro:o},{title:"Logout",onClick:async()=>{let e=N.oR.loading("Logging you out"),r=(0,i.U)(),{error:a}=await r.auth.signOut();a?N.oR.error("Something went wrong while logging you out.",{id:e}):N.oR.success("Logged out successfully",{id:e})},type:"div"},{title:"div-2",as:"divider"},{title:(0,s.jsxs)(s.Fragment,{children:["Command Menu",(0,s.jsx)(n.iM,{className:"ml-2",children:"⌘"}),(0,s.jsx)(n.iM,{className:"ml-1",children:"K"})]}),onClick:()=>{setTimeout(()=>{h(!0)},100)}},{title:"Review Onboarding",hide:!1,as:"a",href:"/user/onboarding"}]})}):null===r?(0,s.jsx)(n.EA,{className:"h-7 w-28 rounded-full"}):(0,s.jsxs)("div",{className:"flex gap-4 items-center border-gray-200 dark:border-gray-700 pl-4",children:[(0,s.jsx)(n.$n,{variant:"ternary",onClick:()=>{c({type:"Login"})},children:"Login"}),(0,s.jsx)(n.$n,{variant:"primary",className:"font-semibold py-px! px-2! rounded-lg",as:"a",href:"/pricing",children:(0,s.jsx)("span",{className:"opacity-90 group-hover:opacity-100",children:"Signup"})})]})}),(0,s.jsx)("div",{className:"flex md:hidden ml-auto text-right",children:(0,s.jsx)(n.Tr,{trigger:(0,s.jsx)("button",{onClick:()=>C(!S),children:(0,s.jsx)(b.A,{className:"text-2xl opacity-60",weight:"thin"})}),open:S,onOpenChange:C,content:(0,s.jsx)(F,{}),className:"bg-white"})})]})})})]})}}}]);

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.