PageSourceSearch

https://appstorespy.com/_next/static/chunks/pages/shoppingcart-74a3b0ed762ef347.js

js appstorespy.com collected 2026-10-01 14:03:57 UTC 5,888 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[671],{52242:function(n,o,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/shoppingcart",function(){return e(78541)}])},78541:function(n,o,e){"use strict";e.r(o),e.d(o,{__N_SSP:function(){return P}});var t=e(11010),r=e(72253),i=e(14932),u=e(24043),a=e(70655),l=e(35944),d=e(48192),c=e(52412),s=e(26062),v=e(90075),p=e(11163),_=e(67294),m=e(57834),f=e(43255),h=e(12436),w=e(64487),g=e(33299),P=!0;o.default=function(n){var o,e,P,b,y,E,S,N,k,C=n.query,O=n.products,T=n.defaultProductId,I=(0,p.useRouter)(),U=(0,h.T)(),D=(0,s.Z)("promotion"),R=(0,s.Z)("lastPromo"),x=(0,g.useSession)(),J=x.data,A="authenticated"===x.status,H=null==J?void 0:null===(b=J.user)||void 0===b?void 0:b.planNumber,L=(0,u._)((0,_.useState)(function(){return C.product?String(C.product):T}),2),V=L[0],X=L[1],Z=(0,u._)((0,_.useState)(O),2),q=Z[0],z=Z[1],B=(0,u._)((0,_.useState)({value:"",status:""}),2),F=B[0],K=B[1],Y=(0,u._)((0,_.useState)({}),2),j=Y[0],M=Y[1],Q=(0,m.zFy)().data,$=null!==(E=null==Q?void 0:Q.providers)&&void 0!==E?E:[],G=(0,u._)((0,_.useState)(function(){var n,o;return null!==(o=null==$?void 0:null===(n=$[0])||void 0===n?void 0:n.id)&&void 0!==o?o:"twocheckout"}),2),W=G[0],nn=G[1];(0,_.useEffect)(function(){(null==$?void 0:$.length)&&nn(function(n){return null!=n?n:$[0].id})},[null==$?void 0:$.length]);var no=(0,u._)((0,_.useState)(!1),2),ne=no[0],nt=no[1],nr=(null==q?void 0:q.find(function(n){return n.product===V}))||null,ni=(0,u._)((0,m.osd)({onError:function(){return U((0,f.V)({data:{alertKey:"commonError"}}))}}),1)[0],nu=(0,u._)((0,m.Va$)({onError:function(){U((0,f.V)({data:{alertKey:"commonError"}}))}}),1)[0],na=(o=(0,t._)(function(){var n,o,e,t,u;return(0,a.Jh)(this,function(a){switch(a.label){case 0:return t=(null===(n=q.find(function(n){return n.product===V}))||void 0===n?void 0:n.name)||"",X(u="YEAR"===nr.period?null===(o=q.find(function(n){return n.name===t&&"MONTH"===n.period}))||void 0===o?void 0:o.product:null===(e=q.find(function(n){return n.name===t&&"YEAR"===n.period}))||void 0===e?void 0:e.product),[4,I.replace({query:(0,i._)((0,r._)({},C),{product:u})})];case 1:return a.sent(),[2]}})}),function(){return o.apply(this,arguments)}),nl=(e=(0,t._)(function(){var n,o,e,t,u;return(0,a.Jh)(this,function(a){switch(a.label){case 0:return[4,ni({variables:{code:F.value}})];case 1:return z(null==(u=a.sent())?void 0:null===(o=u.data)||void 0===o?void 0:null===(n=o.pricesInfo)||void 0===n?void 0:n.prices),K((0,i._)((0,r._)({},F),{status:(null==u?void 0:null===(t=u.data)||void 0===t?void 0:null===(e=t.pricesInfo)||void 0===e?void 0:e.status)||""})),[2]}})}),function(){return e.apply(this,arguments)}),nd=(null==C?void 0:C.promotion_id)&&(null==C?void 0:C.promotion_name)?{promotion_name:null!==(S=null==C?void 0:C.promotion_name)&&void 0!==S?S:"",promotion_id:null!==(N=null==C?void 0:C.promotion_id)&&void 0!==N?N:""}:void 0,nc=(P=(0,t._)(function(){var n,o,e,t,r,i,u,l,c,s;return(0,a.Jh)(this,function(a){switch(a.label){case 0:if(n=R?JSON.parse(R):void 0,A)return[3,4];if("appstorespy"!==window.location.host.split(".")[0])return[3,1];return window.location.href="/sign_in?next=".concat(encodeURIComponent(window.location.href.replace(window.location.origin,""))),[3,3];case 1:return[4,I.push("/sign_in?next=".concat(encodeURIComponent(window.location.href.replace(window.location.origin,""))))];case 2:a.sent(),a.label=3;case 3:return[3,12];case 4:if(a.trys.push([4,11,,12]),!(H>(0,v.QF)(null==nr?void 0:nr.name)))return[3,6];return[4,I.push("/contact-us")];case 5:case 8:return a.sent(),[3,10];case 6:return[4,nu({variables:{coupon:F.value,period:null==nr?void 0:nr.period,product:null==nr?void 0:nr.name,provider:W,promotion:{id:null!==(t=null==nd?void 0:nd.promotion_id)&&void 0!==t?t:null==n?void 0:n.promotion_id,group:null!==(r=null==nd?void 0:nd.promotion_name)&&void 0!==r?r:null==n?void 0:n.promotion_name},tz:new Date().toString().split(" ")[5]||""}})];case 7:if((null===(e=(i=a.sent()).data)||void 0===e?void 0:null===(o=e.createPurchase)||void 0===o?void 0:o.__typename)!=="CreatePurchaseSuccess")return[3,9];return l=null===(u=i.data)||void 0===u?void 0:u.createPurchase.url,(0,d.X)("begin_checkout",j),!D&&nd&&(document.cookie="promotion=".concat(JSON.stringify(nd),";path=/;max-age=1800")),[4,I.push((null==J?void 0:J.user.providerUpgradeLink)||l)];case 9:w.Tb(Error("typename is not CreatePurchaseSuccess: ".concat(null===(s=i.data)||void 0===s?void 0:null===(c=s.createPurchase)||void 0===c?void 0:c.__typename))),a.label=10;case 10:return[3,12];case 11:return a.sent(),w.Tb({message:"proceedToCheckout fatal error"},{level:"fatal"}),[3,12];case 12:return[2]}})}),function(){return P.apply(this,arguments)});return(0,_.useEffect)(function(){var n,o,e,t=q.find(function(n){return n.product===V});"COUPON_APPLIED"===F.status&&t&&Object.assign(t,{coupon:F.value});var u={ecommerce:(0,i._)((0,r._)({currency:"USD",value:Number(null==t?void 0:t.amount)},nd),{items:[{item_id:t.product,item_name:t.name,item_variant:t.period,price:Number(t.amount),promotion_id:null!==(o=null==C?void 0:C.promotion_id)&&void 0!==o?o:"",promotion_name:null!==(e=null==C?void 0:C.promotion_name)&&void 0!==e?e:""}]})};(F.value&&"COUPON_APPLIED"===F.status||!F.value)&&(M(u),(0,d.X)("add_to_cart",u)),(null==J?void 0:null===(n=J.user)||void 0===n?void 0:n.providerUpgradeLink)&&nt(!0)},[V,F.status]),(0,l.tZ)(c.Z,{productId:V,productsData:q,productData:nr,isToken:!!(null==J?void 0:J.user.id),coupon:F,setCoupon:K,switchPeriodHandler:na,applyButtonHandler:nl,proceedToCheckoutButtonHandler:nc,analyticsVariant:ne,userPlanNumber:H,expires:null!==(k=null==J?void 0:null===(y=J.user)||void 0===y?void 0:y.expires)&&void 0!==k?k:null,isRecurring:C.recurring,provider:W,providers:$,setProvider:nn})}}},function(n){n.O(0,[1023,135,1873,7419,9038,2901,2412,9774,2888,179],function(){return n(n.s=52242)}),_N_E=n.O()}]);

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.