PageSourceSearch

https://learn.readle-app.com/src_app_components_settings-subscript…-subscription_module_ts.4940503c40adc6fb.js

js readle-app.com collected 2026-10-01 12:10:31 UTC 14,057 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([["src_app_components_settings-subscription-details_settings-subscription_module_ts"],{9657(W,_,u){u.d(_,{SettingsSubscriptionModule:()=>J});var g=u(79748),x=u(46264),R=u(89204),C=u(59888),D=u(20948),y=u(58222),P=u(34966),h=u(45312),m=u(21901),f=u(20777),v=u(86057),e=u(36124),T=u(61811),d=u(23123),I=u(50698);function L(n,p){if(1&n&&(e.j41(0,"ion-item",3)(1,"p",5),e.EFF(2),e.k0s()()),2&n){const i=e.XpG(2);e.R7$(2),e.JRh(i.getLabelTrailPrice())}}function M(n,p){if(1&n&&(e.j41(0,"ion-item",3)(1,"p",5),e.EFF(2),e.k0s()()),2&n){const i=e.XpG(2);e.R7$(2),e.JRh(i.getLabelTrailInfo())}}function w(n,p){if(1&n&&(e.j41(0,"ion-item",3)(1,"p",5),e.EFF(2),e.k0s()()),2&n){const i=e.XpG(2);e.R7$(2),e.SpI(" ",i.getLabelNextPayment()," ")}}function F(n,p){if(1&n&&(e.j41(0,"ion-item",3)(1,"p",5),e.EFF(2),e.k0s()()),2&n){const i=e.XpG(2);e.R7$(2),e.SpI(" ",i.getLabelNextPaymentDate()," ")}}function E(n,p){if(1&n&&(e.j41(0,"ion-item",3)(1,"p",5),e.EFF(2),e.k0s()()),2&n){const i=e.XpG(2);e.R7$(2),e.JRh(i.getLabelExpireInfo())}}function O(n,p){if(1&n&&(e.j41(0,"ion-list")(1,"ion-item",3)(2,"p"),e.EFF(3),e.k0s()(),e.DNE(4,L,3,1,"ion-item",4)(5,M,3,1,"ion-item",4)(6,w,3,1,"ion-item",4)(7,F,3,1,"ion-item",4)(8,E,3,1,"ion-item",4),e.k0s()),2&n){const i=e.XpG();e.R7$(3),e.Lme("",i.languageService.label.txt_settings_subscription_status_plan," ",i.subPlan),e.R7$(),e.Y8G("ngIf",i.trialStatus&&!(null!=i.subscription&&i.subscription.unsubscribeDetectedAt)&&!i.utilsService.isWebVersion),e.R7$(),e.Y8G("ngIf",i.trialStatus),e.R7$(),e.Y8G("ngIf",!("com.langster.universal.lifetime"===(null==i.subscription?null:i.subscription.productIdentifier)||"com.readle.lifetime"===(null==i.subscription?null:i.subscription.productIdentifier)||null!=i.subscription&&i.subscription.unsubscribeDetectedAt||i.trialStatus||i.utilsService.isWebVersion)),e.R7$(),e.Y8G("ngIf","com.langster.universal.lifetime"!==(null==i.subscription?null:i.subscription.product_identifier)&&"com.readle.lifetime"!==(null==i.subscription?null:i.subscription.product_identifier)&&!(null!=i.subscription&&i.subscription.unsubscribeDetectedAt)&&!i.trialStatus&&i.utilsService.isWebVersion),e.R7$(),e.Y8G("ngIf",(null==i.subscription?null:i.subscription.unsubscribeDetectedAt)&&!(null!=i.subscription&&i.subscription.productIdentifier.includes("lifetime")||null!=i.subscription&&null!=i.subscription.product_identifier&&i.subscription.product_identifier.includes("lifetime")))}}function G(n,p){if(1&n&&(e.j41(0,"div")(1,"ion-list")(2,"ion-item",3)(3,"p")(4,"b"),e.EFF(5),e.k0s(),e.EFF(6),e.k0s()()()()),2&n){const i=e.XpG();e.R7$(5),e.JRh(i.languageService.label.txt_settings_subscription_status_plan),e.R7$(),e.SpI(" ",i.languageService.label.txt_settings_subscription_status_plan_lifetime," ")}}function A(n,p){if(1&n&&(e.j41(0,"p",6),e.EFF(1),e.k0s()),2&n){const i=e.XpG();e.R7$(),e.SpI(" ",i.languageService.label.txt_settings_subscription_cancel_apple," ")}}function Y(n,p){if(1&n&&(e.j41(0,"p",6),e.EFF(1),e.k0s()),2&n){const i=e.XpG();e.R7$(),e.SpI(" ",i.languageService.label.txt_settings_subscription_cancel_google," ")}}let k=(()=>{var n;class p{constructor(t,s,a,r,o,l,b){this.authService=t,this.languageService=s,this.platform=a,this.customDate=r,this.utilsService=o,this.http=l,this.purchaseService=b,this.trialStatus=!1,this.getOfferings()}getOfferings(){f.P.getOfferings().then(t=>{this.offers=t,h.c.single?this.monthlyPackage=this.offers.all["premium.universal"].availablePackages.find(s=>"MONTHLY"===s.packageType):this.monthlyNowPackage=this.offers.all["premium.universal"].availablePackages.find(s=>"CUSTOM"===s.packageType),this.annualPackage=this.offers.all["premium.universal"].availablePackages.find(s=>"ANNUAL"===s.packageType),this.lifetimePackage=this.offers.all["premium.universal"].availablePackages.find(s=>"LIFETIME"===s.packageType),this.quarterlyPackage=this.offers.all["premium.universal"].availablePackages.find(s=>"THREE_MONTH"===s.packageType)}).catch(()=>{})}ngOnInit(){this.utilsService.isWebVersion?this.checkSubscriptionStatusWeb():this.checkSubscriptionStatusNative()}checkSubscriptionStatusNative(){var t;null!==(t=this.authService.user)&&void 0!==t&&t.stripeLifetimePurchase?this.activeProductSelection("com.langster.universal.lifetime"):f.P.getCustomerInfo().then(s=>{var a;this.subscription=s.customerInfo.entitlements.active.Premium,this.subscription.store&&("APP_STORE"===this.subscription.store||"MAC_APP_STORE"===this.subscription.store?this.purchaseService.userPurchaseShop="Apple":"PLAY_STORE"===this.subscription.store&&(this.purchaseService.userPurchaseShop="Google")),null!==(a=this.subscription)&&void 0!==a&&a.willRenew&&(this.subRe
1newalDate=this.subscription.expirationDate),("TRIAL"===this.subscription.periodType||"TRIAL"===JSON.stringify(s.customerInfo.entitlements.all.Premium.periodType))&&(this.trialStatus=!0),this.activeProductSelection(this.subscription.productIdentifier)})}checkSubscriptionStatusWeb(){var t=this;return(0,R.A)(function*(){t.http.get("https://api.revenuecat.com/v1/subscribers/".concat(yield t.authService.getUserID()),{headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(h.c.revenueCat.androidAPIKey)}}).subscribe(s=>{if(t.purchaseService.webRevenueCatData=s.subscriber,t.purchaseService.webRevenueCatData.entitlements.Premium){const b=t.purchaseService.webRevenueCatData.entitlements.Premium,c=b.product_identifier;if(["com.langster.universal.lifetime","com.readle.lifetime","com.hello.german.lifetime","com.hello.english.lifetime","com.hello.french.lifetime","com.hello.spanish.lifetime","com.hello.English.lifetime","com.hello.japanese.lifetime","com.hello.chinese.lifetime"].includes(c))t.subscription=b,!t.purchaseService.webRevenueCatData.non_subscriptions[c]||"app_store"!==t.purchaseService.webRevenueCatData.non_subscriptions[c][0].store.toLocaleLowerCase()&&"mac_app_store"!==t.purchaseService.webRevenueCatData.non_subscriptions[c][0].store.toLocaleLowerCase()?t.purchaseService.webRevenueCatData.non_subscriptions[c]&&"play_store"===t.purchaseService.webRevenueCatData.non_subscriptions[c][0].store.toLocaleLowerCase()&&(t.purchaseService.userPurchaseShop="Google"):t.purchaseService.userPurchaseShop="Apple";else{var a,r;const S=t.purchaseService.webRevenueCatData.entitlements.Premium;var o,l;t.subscription=S,"app_store"===t.purchaseService.webRevenueCatData.subscriptions[c].store.toLocaleLowerCase()||"mac_app_store"===t.purchaseService.webRevenueCatData.subscriptions[c].store.toLocaleLowerCase()?t.purchaseService.userPurchaseShop="Apple":"play_store"===t.purchaseService.webRevenueCatData.subscriptions[c].store.toLocaleLowerCase()&&(t.purchaseService.userPurchaseShop="Google"),("TRIAL"===t.purchaseService.webRevenueCatData.subscriptions[c].periodType||"TRIAL"===JSON.stringify(S.periodType))&&(t.trialStatus=!0),console.log(t.subscription,null===(a=t.purchaseService.webRevenueCatData.subscriptions[c])||void 0===a?void 0:a.unsubscribe_detected_at,t.subscription.expires_date),null!==(r=t.purchaseService.webRevenueCatData.subscriptions[c])&&void 0!==r&&r.unsubscribe_detected_at?(t.subscription.unsubscribeDetectedAt=null===(o=t.purchaseService.webRevenueCatData.subscriptions[c])||void 0===o?void 0:o.unsubscribe_detected_at,t.subscription.expirationDate=null===(l=t.purchaseService.webRevenueCatData.subscriptions[c])||void 0===l?void 0:l.expires_date):t.subRenewalDate=t.subscription.expires_date}t.activeProductSelection(c)}})})()}getLabelTrailInfo(){var t;let s=this.languageService.label.txt_settings_subscription_trial;const a=new Date(null===(t=this.subscription)||void 0===t?void 0:t.expirationDate).getTime()-(new Date).getTime(),r=Math.round(a/864e5);return s=s.replace("[days]",r.toString()),s}activeProductSelection(t){var s;if(t.includes("lifetime"))this.subPlan=this.languageService.label.txt_settings_subscription_status_plan_lifetime,this.activeProduct=v.Y.Lifetime,this.subPrice=null===(s=this.lifetimePackage)||void 0===s||null===(s=s.product)||void 0===s?void 0:s.priceString;else if(t.includes("monthly.now")){var a;this.subPlan=this.languageService.label.txt_settings_subscription_status_plan_monthly,this.activeProduct=v.Y.Monthly,this.subPrice=null===(a=this.monthlyNowPackage)||void 0===a||null===(a=a.product)||void 0===a?void 0:a.priceString}else if(t.includes("monthly")){var r;this.subPlan=this.languageService.label.txt_settings_subscription_status_plan_monthly,this.activeProduct=v.Y.Monthly,this.subPrice=null===(r=this.monthlyPackage)||void 0===r||null===(r=r.product)||void 0===r?void 0:r.priceString}else if(t.includes("yearly")){var o;this.subPlan=this.languageService.label.txt_settings_subscription_status_plan_yearly,this.activeProduct=v.Y.Yearly,this.subPrice=null===(o=this.annualPackage)||void 0===o||null===(o=o.product)||void 0===o?void 0:o.priceString}else if(t.includes("prod_T1SQtKZZjgxrFR")||t.includes("quarterly")){var l;this.subPlan=this.languageService.label.txt_settings_subscription_status_plan_quarterly,this.activeProduct=v.Y.Quarterly,this.subPrice=null===(l=this.quarterlyPackage)||void 0===l||null===(l=l.product)||void 0===l?void 0:l.priceString}}getLabelNextPaymentDate(){var t,s,a;
1if(!this.subRenewalDate)return;let r=this.languageService.label.txt_settings_subscription_renewal_web;if(this.subRenewalDate){var o;let l=new Date(this.subRenewalDate).toISOString();l=this.customDate.transform(l,"d MMMM y","UTC",this.languageService.target),r=null===(o=r)||void 0===o?void 0:o.replace("[date]",l)}return null!==(t=this.subscription)&&void 0!==t&&t.product_identifier.includes("monthly")&&(r=r.replace("[subscription]",this.languageService.label.txt_settings_subscription_status_plan_monthly)),null!==(s=this.subscription)&&void 0!==s&&s.product_identifier.includes("yearly")&&(r=r.replace("[subscription]",this.languageService.label.txt_settings_subscription_status_plan_yearly)),null!==(a=this.subscription)&&void 0!==a&&a.product_identifier.includes("quarterly")&&(r=r.replace("[subscription]",this.languageService.label.txt_settings_subscription_status_plan_quarterly)),r}getLabelNextPayment(){var t,s,a,r;let o=this.languageService.label.txt_settings_subscription_renewal;if(this.subRenewalDate){var l;let b=new Date(this.subRenewalDate).toISOString();b=this.customDate.transform(b,"d MMMM y","UTC",this.languageService.target),o=null===(l=o)||void 0===l?void 0:l.replace("[date]",b)}return o=null===(t=o)||void 0===t?void 0:t.replace("[price]",this.subPrice),null!==(s=this.subscription)&&void 0!==s&&s.productIdentifier.includes("monthly")&&(o=o.replace("[subscription]",this.languageService.label.txt_settings_subscription_status_plan_monthly)),null!==(a=this.subscription)&&void 0!==a&&a.productIdentifier.includes("yearly")&&(o=o.replace("[subscription]",this.languageService.label.txt_settings_subscription_status_plan_yearly)),null!==(r=this.subscription)&&void 0!==r&&r.product_identifier.includes("quarterly")&&(o=o.replace("[subscription]",this.languageService.label.txt_settings_subscription_status_plan_quarterly)),o}getLabelExpireInfo(){var t;let s=this.languageService.label.txt_settings_subscription_expires;if(null!==(t=this.subscription)&&void 0!==t&&t.expirationDate){var a,r;let o=new Date(null===(a=this.subscription)||void 0===a?void 0:a.expirationDate).toISOString();o=this.customDate.transform(o,"d MMMM y","UTC",this.languageService.target),s=null===(r=s)||void 0===r?void 0:r.replace("[date]",o)}return s}getLabelTrailPrice(){let t=this.languageService.label.txt_settings_subscription_trial_end_price;return t=t.replace("[price]",this.subPrice),t}}return(n=p).\u0275fac=function(t){return new(t||n)(e.rXU(C.u),e.rXU(D.g),e.rXU(T.OD),e.rXU(m.g),e.rXU(P.T),e.rXU(I.Qq),e.rXU(y.zZ))},n.\u0275cmp=e.VBU({type:n,selectors:[["settings-subscription-details"]],standalone:!1,decls:9,vars:5,consts:[[1,"settings-label"],[4,"ngIf"],["class","date-time cancellation",4,"ngIf"],["lines","none",1,"no-hover",2,"--border-radius","13px 13px 0px 0px"],["style","--border-radius: 13px 13px 0px 0px","lines","none","class","no-hover",4,"ngIf"],[1,"date-time"],[1,"date-time","cancellation"]],template:function(t,s){1&t&&(e.j41(0,"ion-content")(1,"div")(2,"div",0),e.EFF(3),e.k0s(),e.DNE(4,O,9,7,"ion-list",1)(5,G,7,2,"div",1),e.k0s(),e.j41(6,"div"),e.DNE(7,A,2,1,"p",2)(8,Y,2,1,"p",2),e.k0s()()),2&t&&(e.R7$(3),e.JRh(s.languageService.label.txt_settings_subscription_status),e.R7$(),e.Y8G("ngIf",s.subscription&&!(null!=s.authService.user&&s.authService.user.stripeLifetimePurchase)),e.R7$(),e.Y8G("ngIf",null==s.authService.user?null:s.authService.user.stripeLifetimePurchase),e.R7$(2),e.Y8G("ngIf","Apple"===s.purchaseService.userPurchaseShop),e.R7$(),e.Y8G("ngIf","Google"===s.purchaseService.userPurchaseShop))},dependencies:[g.bT,d.W9,d.uz,d.nf],styles:[".list-md[_ngcontent-%COMP%]{background:var(--readle-list-wrapper-background)}.list-md[_ngcontent-%COMP%]{background:var(--card-background)!important}ion-content[_ngcontent-%COMP%]{--background: var(--readle-content-background)}ion-list[_ngcontent-%COMP%]{border-radius:15px!important;margin:20px;background:var(--card-background);overflow:hidden!important}ion-item[_ngcontent-%COMP%]{--background: var(--card-background) !important;--color: var(--readle-font-color-main);--border-color: var(--readle-divider-color);overflow:hidden}.settings-label[_ngcontent-%COMP%]{color:var(--readle-font-color-main);margin-left:30px;margin-top:var(--ion-lg-spacing)}.no-hover[_ngcontent-%COMP%]{--background-hover: var(--background);--ripple-color: transparent !important}
1.date-time[_ngcontent-%COMP%]{color:var(--readle-font-color-light)}.cancellation[_ngcontent-%COMP%]{margin:20px 30px}"]}),p})();var X=u(41683),j=u(55553),U=u(66563);const N=[{path:"",component:k}];let J=(()=>{var n;class p{}return(n=p).\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.$C({type:n}),n.\u0275inj=U.G2t({providers:[m.g],imports:[g.MD,X.Y,j.h,d.bv,x.iI.forChild(N)]}),p})()}}]);
2//# sourceMappingURL=src_app_components_settings-subscription-details_settings-subscription_module_ts.4940503c40adc6fb.js.map

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.