PageSourceSearch

https://app.storika.ai/_next/static/chunks/6664-d9bcfc2f46fa5cc6.js?dpl=dpl_Eq3u4Z7V3psEbxcNjBbvsR1vVwdK

js storika.ai collected 2026-09-24 12:07:26 UTC 11,301 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6664],{4931:(t,e,n)=>{n.d(e,{l:()=>a});let a={me:t=>null==t?["me"]:["me",String(t)],subscriptionStatus:()=>["subscription-status"],myBrands:t=>null==t?["my-brands"]:["my-brands",String(t)],accountDeletionImpact:t=>null==t?["account-deletion-impact"]:["account-deletion-impact",String(t)]}},7927:(t,e,n)=>{n.d(e,{u:()=>a});let a={all:["organizations"],create:()=>[...a.all,"create"],members:t=>[...a.all,"members",t],assignableMembers:t=>[...a.all,"assignable-members",t],invitations:t=>[...a.all,"invitations",t],orgBrands:t=>[...a.all,"brands",t],memberBrandAccess:(t,e)=>[...a.all,"brand-access",t,e],brandSummary:t=>[...a.all,"brand-summary",t],allBrandsForStaff:()=>[...a.all,"all-brands-staff"],brandKnowledge:(t,e)=>[...a.all,"brand-knowledge",t,e],brandCompetitorSuggestions:(t,e,n)=>[...a.all,"brand-competitor-suggestions",t,e,n],brandProducts:(t,e)=>[...a.all,"brand-products",t,e],domainStatus:()=>[...a.all,"domain-status"],orgBrand:(t,e)=>[...a.all,"brand",t,e],brandEnrichmentStatus:(t,e,n)=>[...a.all,"brand-enrichment-status",t,e,n],myMemberships:()=>[...a.all,"my-memberships"],billingEmail:t=>[...a.all,"billing-email",t]}},10325:(t,e,n)=>{n.d(e,{U:()=>o,q:()=>s});let a="https://api.storika.ai";function r(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&"message"in t&&"string"==typeof t.message&&t.message.trim().length>0?t.message:"Request failed"}async function i(t){try{return await t.json()}catch(e){if(t.ok)throw e;return{}}}async function s(t){let e=await fetch(a+t,{method:"GET",headers:{"Content-Type":"application/json"}}),n=await i(e);if(!e.ok){var s,o;throw Error(r(n),{cause:{response:{status:e.status,statusText:e.statusText,data:n,retryAfter:null!=(o=null==(s=e.headers)?void 0:s.get("Retry-After"))?o:null}}})}return n}async function o(t,e){let n=await fetch(a+t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await i(n);if(!n.ok){var o,u;throw Error(r(s),{cause:{response:{status:n.status,statusText:n.statusText,data:s,retryAfter:null!=(u=null==(o=n.headers)?void 0:o.get("Retry-After"))?u:null}}})}return s}},36664:(t,e,n)=>{n.d(e,{$9:()=>m,EJ:()=>B,K7:()=>b,Pm:()=>z,VV:()=>h,aw:()=>y,dU:()=>q,g5:()=>p,if:()=>f,k3:()=>R,ms:()=>S,rK:()=>g,s1:()=>v,yD:()=>w});var a=n(4869),r=n(81562),i=n(27736);
1n(27541);var s=n(10141),o=n(73984);n(8972);var u=n(4931),c=n(7927),l=n(91618);let d={blocked:!1,autoOnboardingActive:!1},g=(t,e)=>{let n=(0,a.jE)(),i=new o.P;return(0,r.n)({mutationFn:t=>i.acceptInvitation(t),onSuccess:e=>{n.invalidateQueries({queryKey:c.u.all}),null==t||t(e)},onError:e})},h=t=>{let e=new o.P;return(0,i.I)({queryKey:["invite-lookup",t],queryFn:()=>e.lookupInvitation(t),enabled:!!t,staleTime:1/0,gcTime:3e5,refetchOnWindowFocus:!1,refetchOnMount:!1,retry:1})},p=()=>{let t=new o.P;return(0,r.n)({mutationFn:e=>{let{code:n}=e;return t.requestNewInvite(n)}})},m=()=>{let t=new o.P;return(0,r.n)({mutationFn:e=>{let{code:n}=e;return t.reRequestInvitation(n)}})},y=(t,e)=>{var n;let a=new o.P;return(0,i.I)({queryKey:c.u.orgBrands(t),queryFn:()=>a.listOrgBrands(t),enabled:(null==(n=null==e?void 0:e.enabled)||n)&&!!t})},b=t=>{var e;let n=new o.P;return(0,i.I)({queryKey:c.u.allBrandsForStaff(),queryFn:()=>n.listAllBrandsForStaff(),enabled:null!=(e=null==t?void 0:t.enabled)&&e})},q=(t,e)=>{let n=(0,a.jE)(),i=new o.P;return(0,r.n)({mutationFn:t=>{let{organizationId:e,data:n}=t;return Promise.resolve(i.createBrand(e,n)).catch(t=>{let e=(0,l.cC)(t);if(e)throw Object.assign(Error(e),{cause:t instanceof Error?t.cause:t});throw t})},onSuccess:(e,a)=>{n.invalidateQueries({queryKey:c.u.orgBrands(a.organizationId)}),function(t){t.invalidateQueries({queryKey:u.l.myBrands()}),t.invalidateQueries({queryKey:c.u.allBrandsForStaff()})}(n),null==t||t(e)},onError:e})},v=(t,e)=>{let n=new o.P;return(0,r.n)({mutationFn:t=>{let{organizationId:e,brandId:a,brandUrl:r,applyMode:i}=t;return n.submitBrandEnrichment(e,a,r,i)},onSuccess:e=>{null==t||t(e)},onError:e})},f=(t,e,n,a)=>{var r;let u=new o.P,l=(null==(r=null==a?void 0:a.enabled)||r)&&!!t&&!!e&&null!=n;return(0,i.I)({queryKey:c.u.brandEnrichmentStatus(t,e,null!=n?n:0),queryFn:()=>u.getBrandEnrichmentStatus(t,e,n),enabled:l,refetchInterval:t=>{var e;let n=null==(e=t.state.data)?void 0:e.status;return(null==n||n===s.AgentJobStatus.PENDING||n===s.AgentJobStatus.PROCESSING)&&5e3}})},w=()=>{let t=new o.P;return(0,i.I)({queryKey:c.u.domainStatus(),queryFn:async()=>{try{return await t.getDomainStatus()}catch(t){return d}}})},z=t=>{var e;let n=new o.P;return(0,i.I)({queryKey:c.u.myMemberships(),queryFn:()=>n.getMyMemberships(),enabled:null==(e=null==t?void 0:t.enabled)||e,staleTime:3e4})},R=(t,e)=>{let n=(0,a.jE)(),i=new o.P;return(0,r.n)({mutationFn:t=>i.leaveOrganization(t),onSuccess:()=>{n.invalidateQueries({queryKey:c.u.myMemberships()}),n.invalidateQueries({queryKey:u.l.me()}),null==t||t()},onError:e})},B=(t,e)=>{let n=new o.P;return(0,r.n)({mutationFn:t=>n.askAdminUpgrade(t),onSuccess:t,onError:e})},S=(t,e)=>{let n=new o.P;return(0,r.n)({mutationFn:()=>n.requestBrandAccess(),networkMode:"always",retry:!1,onSuccess:t,onError:e})}},73984:(t,e,n)=>{n.d(e,{P:()=>o,b:()=>s});var a=n(45855),r=n(91618),i=n(10325);class s extends Error{constructor(t){super("Could not record the access request.",{cause:t}),this.status=(0,r.Y3)(t),this.retryAfterSeconds=(0,a.AP)(t)}}class o extends a.Ay{async createOrganization(t){return this.httpRequired.post("/organizations",t)}async createOrganizationByAdmin(t){return this.httpRequired.post("/admin/organizations",t)}async closeOrganization(t,e){return this.httpRequired.post("/organizations/".concat(t,"/close"),{confirmationName:e})}async updateOrganization(t,e){return this.httpRequired.patch("/organizations/".concat(t),e)}async uploadOrganizationLogo(t,e){let n=new FormData;n.append("file",e,e.name);let a=await fetch("/api/proxy/organizations/".concat(t,"/logo"),{method:"POST",credentials:"include",body:n});if(!a.ok){let t="Logo upload failed with status: ".concat(a.status);try{t=(await a.json()).message||t}catch(t){}throw Error(t)}return a.json()}async deleteOrganizationLogo(t){return this.httpRequired.delete("/organizations/".concat(t,"/logo"))}async getBillingEmail(){return this.httpRequired.get("/organizations/billing-email")}async updateBillingEmail(t){return this.httpRequired.patch("/organizations/billing-email",{billingEmail:t})}async getAllOrganizations(t){let e=new URLSearchParams;(null==t?void 0:t.limit)!==void 0&&e.append("limit",t.limit.toString()),(null==t?void 0:t.offset)!==void 0&&e.append("offset",t.offset.toString()),(null==t?void 0:t.search)&&e.append("search",t.search);let n=e.toString();return this.httpRequired.get(n?"/organizations?".concat(n):"/organizations")}async getMyMemberships(){return this.httpRequired.get("/users/me/memberships")}async getActiveMembers(t){return this.httpRequired.get("/organizations/".concat(t,"/members"))}async getAssignableMembers(t){return this.httpRequired.get("/organizations/".concat(t,"/assignable-members"))}async getPendingInvitations(t){return this.httpRequired.get("/organizations/".concat(t,"/invitations"))}async updateMemberRole(t,e,n){return this.httpRequired.patch("/organizations/".concat(t,"/members/").concat(e),n)}async removeMember(t,e){return this.httpRequired.delete("/organizations/".concat(t,"/members/").concat(e))}async transferOwnership(t,e){return this.httpRequired.post("/organizations/".concat(t,"/members/").concat(e,"/transfer-ownership"))}async leaveOrganization(t){return this.httpRequired.delete("/organizations/".concat(t,"/members/me"))}async createInvitation(t,e){return this.httpRequired.post("/organizations/".concat(t,"/invitations"),e)}async acceptInvitation(t){return this.httpRequired.post("/invitations/accept",t)}async lookupInvitation(t){return(0,i.q)("/invitations/lookup/"+encodeURIComponent(t))}async requestNewInvite(t){return(0,i.U)("/invitations/request-new",{inviteCode:t})}async reRequestInvitation(t){return this.httpRequired.post("/invitations/re-request",{inviteCode:t})}async getDomainStatus(){return this.httpRequired.get("/organizations/domain-status")}async listOrgBrands(t){return this.httpRequired.get("/organizations/".concat(t,"/brands"))}async listAllBrandsForStaff(){return this.httpRequired.get("/admin/organizations/brands")}async getOrgBrand(t,e){return this.httpRequired.get("/organizations/".concat(t,"/brands/").concat(e))}
1async getBrandCompetitorSuggestions(t,e){return this.httpRequired.get("/organizations/".concat(t,"/brands/").concat(e,"/competitor-suggestions"))}async getBrandSummary(t){return this.httpRequired.get("/organizations/".concat(t,"/brands/summary"))}async createBrand(t,e){return this.httpRequired.post("/organizations/".concat(t,"/brands"),e)}async updateBrand(t,e,n){return this.httpRequired.patch("/organizations/".concat(t,"/brands/").concat(e),n)}async deleteBrand(t,e){await this.httpRequired.delete("/organizations/".concat(t,"/brands/").concat(e))}async getMemberBrandAccess(t,e){return this.httpRequired.get("/organizations/".concat(t,"/members/").concat(e,"/brand-access"))}async setMemberBrandAccess(t,e,n){return this.httpRequired.patch("/organizations/".concat(t,"/members/").concat(e,"/brand-access"),n)}async getBrandKnowledge(t,e){return this.httpRequired.get("/organizations/".concat(t,"/brands/").concat(e,"/knowledge"))}async submitBrandEnrichment(t,e,n,a){return this.httpRequired.post("/organizations/".concat(t,"/brands/").concat(e,"/enrich"),{...n?{brandUrl:n}:{},...a?{applyMode:a}:{}})}async resendInvitation(t,e){return this.httpRequired.post("/organizations/".concat(t,"/invitations/").concat(e,"/resend"),{})}async getBrandEnrichmentStatus(t,e,n){return this.httpRequired.get("/organizations/".concat(t,"/brands/").concat(e,"/enrich/").concat(n))}async updateBrandKnowledge(t,e,n){return this.httpRequired.patch("/organizations/".concat(t,"/brands/").concat(e,"/knowledge"),n)}async listBrandProducts(t,e){return this.httpRequired.get("/organizations/".concat(t,"/brands/").concat(e,"/products"))}async createBrandProduct(t,e,n){return this.httpRequired.post("/organizations/".concat(t,"/brands/").concat(e,"/products"),n)}async updateBrandProduct(t,e,n,a){return this.httpRequired.patch("/organizations/".concat(t,"/brands/").concat(e,"/products/").concat(n),a)}async deleteBrandProduct(t,e,n){await this.httpRequired.delete("/organizations/".concat(t,"/brands/").concat(e,"/products/").concat(n))}async bulkCreateBrandProducts(t,e,n){return this.httpRequired.post("/organizations/".concat(t,"/brands/").concat(e,"/products/bulk"),n)}
1async askAdminUpgrade(t){let e={};return null!=t.actionKey&&(e.actionKey=t.actionKey),null!=t.requiredTokens&&(e.requiredTokens=t.requiredTokens),this.httpRequired.post("/organizations/ask-admin-upgrade",e)}async requestBrandAccess(){try{let t=await this.httpRequired.post("/organizations/request-brand-access",{});if(!t||"object"!=typeof t||!("recipients"in t)||"number"!=typeof t.recipients||!("enqueued"in t)||"number"!=typeof t.enqueued||!Number.isSafeInteger(t.recipients)||t.recipients<0||!Number.isSafeInteger(t.enqueued)||t.enqueued<0||t.enqueued>t.recipients)throw Error("Invalid access request response");return{recipients:t.recipients,enqueued:t.enqueued}}catch(t){throw new s(t)}}}}}]);

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.