PageSourceSearch

https://www.countryfile.com/3530.0a66d5b3f1635017.js

js countryfile.com collected 2026-09-24 09:00:54 UTC 9,922 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([[3530],{3530:(W,C,r)=>{r.r(C),r.d(C,{CouponModule:()=>X,component:()=>$});var d=r(467),O=r(9379),o=r(3953),_=r(1210);const T={couponValidAction:"purple://app/home/open"};var f=r(8251),R=r(20),s=r(610),E=r(6010),l=r(4404),u=r(9417),g=r(7240),h=r(6962),D=r(8909),m=r(177),v=r(6067);function N(n,c){1&n&&o.nrm(0,"div",13)}function I(n,c){if(1&n&&o.DNE(0,N,1,0,"div",13),2&n){const p=o.XpG();o.vxM(p.couponActivateLoading?0:-1)}}function A(n,c){1&n&&o.nrm(0,"storefront-spinner")}function x(n,c){if(1&n&&o.DNE(0,A,1,0,"storefront-spinner"),2&n){const p=o.XpG();o.vxM(p.couponActivateLoading?0:-1)}}function U(n,c){1&n&&o.nrm(0,"div",13)}function P(n,c){if(1&n&&o.DNE(0,U,1,0,"div",13),2&n){const p=o.XpG().$implicit,i=o.XpG();o.vxM(i.couponDeleteLoading===p?0:-1)}}function L(n,c){1&n&&o.nrm(0,"storefront-spinner")}function y(n,c){if(1&n&&o.DNE(0,L,1,0,"storefront-spinner"),2&n){const p=o.XpG().$implicit,i=o.XpG();o.vxM(i.couponDeleteLoading===p?0:-1)}}function S(n,c){if(1&n){const p=o.RV6();o.j41(0,"div",12)(1,"div",14),o.EFF(2),o.k0s(),o.j41(3,"div",15),o.bIt("click",function(t){const e=o.eBV(p).$implicit,a=o.XpG();return o.Njj(a.onDeactivateCoupon(e,t))}),o.nrm(4,"span",16),o.DNE(5,P,1,1)(6,y,1,1),o.k0s()()}if(2&n){const p=c.$implicit,i=o.XpG();o.R7$(2),o.JRh(p),o.R7$(3),o.vxM(i.domHelper.leanDom?5:6)}}function V(n,c){1&n&&o.nrm(0,"div",17)}function k(n,c){if(1&n&&o.DNE(0,V,1,0,"div",17),2&n){const p=o.XpG();o.vxM(p.couponsLoading?0:-1)}}function M(n,c){1&n&&o.nrm(0,"storefront-spinner",18)}function B(n,c){if(1&n&&o.DNE(0,M,1,0,"storefront-spinner",18),2&n){const p=o.XpG();o.vxM(p.couponsLoading?0:-1)}}let F=(()=>{var n;class c extends _.${constructor(){super(...arguments),this.store=(0,o.WQX)(f.B),this.dialog=(0,o.WQX)(R.o),this.purpleService=(0,o.WQX)(E.Wj),this.changeDetectorRef=(0,o.WQX)(o.gRc),this.defaultConfig=(0,O.A)({},T),this.couponsLoading=!0,this.couponActivateLoading=!1,this.couponDeleteLoading=null}ngOnInit(){super.ngOnInit(),this.purpleService.connectionState$.subscribe(i=>this.connection=i),this.loadCoupons()}onConfigChanges(){this.changeDetectorRef.markForCheck()}loadCoupons(){var i=this;return(0,d.A)(function*(){try{i.couponsLoading=!0,i.couponCodes=yield i.purpleService.getSubscriptionCodes()}catch(t){i.couponCodes=[]}i.couponsLoading=!1,i.changeDetectorRef.detectChanges()})()}onActivateCoupon(i){var t=this;return(0,d.A)(function*(){i.preventDefault(),t.couponActivateLoading=!0,t.couponCode.trim();try{yield t.purpleService.addSubscriptionCode(t.couponCode.toUpperCase()),t.store.dispatch((0,s.k4)({url:window.location.href,key:"SUBSCRIPTION_CODE_ACTIVATED",params:t.getTrackingParams()})),t.couponActivateLoading=!1,yield t.loadCoupons(),t.couponCode="",t.changeDetectorRef.detectChanges();try{yield t.dialog.confirm("COUPON_VALID_MESSAGE","COUPON_VALID_TITLE","COUPON_VALID_BUTTON_OK","COUPON_VALID_BUTTON_CANCEL");try{t.purpleService.openActionUrl(t.config.couponValidAction)}catch(e){}}catch(e){}}catch(e){t.couponActivateLoading=!1,t.changeDetectorRef.detectChanges(),e.code===l.ERROR_CODE.NETWORK?(t.store.dispatch((0,s.k4)({url:window.location.href,key:"SUBSCRIPTION_CODE_ACTIVATED_ERROR_OFFLINE",params:t.getTrackingParams()})),t.dialog.alert("ERROR_COUPON_OFFLINE","DIALOG_ERROR","ERROR_COUPON_OFFLINE_BUTTON")):e.code===l.ERROR_CODE.DUPLICATE_CODE?(t.store.dispatch((0,s.k4)({url:window.location.href,key:"SUBSCRIPTION_CODE_ACTIVATED_ERROR_EXISTS",params:t.getTrackingParams()})),t.dialog.alert("ERROR_COUPON_EXISTS","DIALOG_ERROR","ERROR_COUPON_EXISTS_BUTTON")):(t.store.dispatch((0,s.k4)({url:window.location.href,key:"SUBSCRIPTION_CODE_ACTIVATED_ERROR_INVALID",params:t.getTrackingParams()})),t.dialog.alert("ERROR_COUPON_INVALID","DIALOG_ERROR","ERROR_COUPON_INVALID_BUTTON"))}})()}onDeactivateCoupon(i,t){var e=this;return(0,d.A)(function*(){t.preventDefault();try{yield e.dialog.confirm({text:"COUPON_DEACTIVATE_MESSAGE",args:[i]},"COUPON_DEACTIVATE_TITLE","COUPON_DEACTIVATE_BUTTON_CONFIRM","COUPON_DEACTIVATE_BUTTON_CANCEL"),e.couponDeleteLoading=i;try{yield e.purpleService.removeSubscriptionCode(i.toUpperCase()),e.store.dispatch((0,s.k4)({url:window.location.href,key:"SUBSCRIPTION_CODE_DEACTIVATED",params:e.getTrackingParams()})),yield e.loadCoupons(),e.couponDeleteLoading=null,e.changeDetectorRef.detectChanges()}catch(a){e.couponDeleteLoading=null,e.changeDetectorRef.detectChanges(),a.code===l.ERROR_CODE.NETWORK?(e.store.dispatch((0,s.k4)({url:window.location.href,key:"SUBSCRIPTION_CODE_DEACTIVATED_ERROR_OFFLINE",params:e.getTrackingParams()})),e.dialog.alert("ERROR_COUPON_DEACTIVATE_OFFLINE","DIALOG_ERROR","ERROR_COUPON_DEACTIVATE_OFFLINE_BUTTON")):a.code===l.ERROR_CODE.UNKNOWN_CODE?(e.store.dispatch((0,s.k4)({url:window.location.href,key:"SUBSCRIPTION_CODE_DEACTIVATED_ERROR_UNKNOWN",params:e.getTrackingParams()})),e.dialog.alert("ERROR_COUPON_DEACTIVATE_UNKNOWN","DIALOG_ERROR","ERROR_COUPON_DEACTIVATE_UNKNOWN_BUTTON")):(e.store.dispatch((0,s.k4)({url:window.location.href,key:"SUBSCRIPTION_CODE_DEACTIVATED_ERROR",params:e.getTrackingParams()})),e.dialog.alert("ERROR_COUPON_DEACTIVATE","DIALOG_ERROR","ERROR_COUPON_DEACTIVATE_BUTTON"))}}catch(a){console.debug("coupon code will not deleted")}})()}onClickReset(i){this.couponCode="",this.changeDetectorRef.detectChanges()}getTrackingParams(){return{SUBSCRIPTION_CODE:this.couponCode}}}return(n=c).type="coupon",n.\u0275fac=(()=>{let p;return function(t){return(p||(p=o.xGo(n)))(t||n)}})(),n.\u0275cmp=o.VBU({type:n,selectors:[["storefront-coupon"]],standalone:!1,features:[o.Jv_([f.B]),o.Vt3],decls:21,vars:9,consts:[[1,"coupon-intro"],["storefrontTranslate","COUPON_TITLE"],["storefrontTranslate","COUPON_TEASER",1,"coupon-teaser"],[1,"coupon-container"],["storefrontTranslate","COUPON_CODE_TITLE",1,"coupon-code-title"],[1,"input"],["name","couponCode",3,"ngModelChange","ngModel","placeholder"],[1,"icon","icon-delete","reset-btn",3,"mousedown","touchstart"],[1,"coupon-submit",3,"click","disabled"],["storefrontTranslate","COUPON_SUBMIT_BUTTON"],[1,"coupons"],["storefrontTranslate","COUPON_ACTIVATED_TITLE",1,"coupon-activated-title"],[1,"activated-coupon"],[1,"pxp-spinner"],[1,"coupon-code"],[1,"coupon-delete",3,"click"],["storefrontTranslate","COUPON_DEACTIVATE_BUTTON"],[1,"pxp-spinner","coupons-spinner"],[1,"coupons-spinner"]],template:function(i,t){1&i&&(o.j41(0,"div",0),o.nrm(1,"h1",1)(2,"p",2),o.k0s(),o.j41(3,"div",3)(4,"form"),o.nrm(5,"p",4),o.j41(6,"div",5)(7,"input",6),o.nI1(8,"storefrontTranslate"),o.nI1(9,"async"),o.mxI("ngModelChange",function(a){return o.DH7(t.couponCode,a)||(t.couponCode=a),a}),o.k0s(),o.j41(10,"button",7),o.bIt("mousedown",function(a){return t.onClickReset(a)})("touchstart",function(a){return t.onClickReset(a)}),o.k0s()(),o.j41(11,"button",8),o.bIt("click",function(a){return t.onActivateCoupon(a)}),o.nrm(12,"span",9),o.DNE(13,I,1,1)(14,x,1,1),o.k0s()(),o.j41(15,"div",10),o.nrm(16,"p",11),o.Z7z(17,S,7,2,"div",12,o.fX1),o.DNE(19,k,1,1)(20,B,1,1),o.k0s()()),2&i&&(o.R7$(7),o.R50("ngModel",t.couponCode),o.Y8G("placeholder",o.bMT(9,7,o.bMT(8,5,"COUPON_CODE_PLACEHOLDER"))),o.R7$(4),o.Y8G("disabled",t.couponActivateLoading||!t.couponCode||!t.couponCode.length),o.R7$(2),o.vxM(t.domHelper.leanDom?13:14),o.R7$(4),o.Dyx(t.couponCodes),o.R7$(2),o.vxM(t.domHelper.leanDom?19:20))},dependencies:[u.qT,u.me,u.BC,u.cb,u.vS,u.cV,g.t,h.n,D.M,m.Jj,v.D],styles:["storefront-coupon,.pxp-coupon{display:block;padding:var(--couponPaddingVert) var(--couponPaddingHoriz)}
1storefront-coupon h1,.pxp-coupon h1{text-align:center}storefront-coupon h1,storefront-coupon p,storefront-coupon h3,storefront-coupon .input,.pxp-coupon h1,.pxp-coupon p,.pxp-coupon h3,.pxp-coupon .input{margin:var(--couponElementMarginVert) var(--couponElementMarginHoriz)}storefront-coupon form,.pxp-coupon form{display:flex;flex-direction:column}storefront-coupon form .input,.pxp-coupon form .input{position:relative}storefront-coupon form .input input,.pxp-coupon form .input input{width:100%}storefront-coupon form .input .reset-btn,.pxp-coupon form .input .reset-btn{position:absolute;top:0;right:0;display:flex;align-items:center;height:100%;z-index:1;padding:calc(var(--gutter) / 2);font-size:10px;cursor:pointer}storefront-coupon form .coupon-submit,.pxp-coupon form .coupon-submit{position:relative;width:100%;display:flex;align-items:center;justify-content:center;transition:all .3s ease-in-out;-webkit-transition:all .3s ease-in-out}storefront-coupon form button,.pxp-coupon form button{background-color:var(--primaryColor);color:#fff;cursor:pointer}storefront-coupon form button[disabled],.pxp-coupon form button[disabled]{opacity:.5}storefront-coupon .coupons,.pxp-coupon .coupons{position:relative;display:flex;flex-direction:column;justify-content:center}storefront-coupon .coupons .activated-coupon,.pxp-coupon .coupons .activated-coupon{display:flex;justify-content:space-between}storefront-coupon .coupons .activated-coupon .coupon-delete,.pxp-coupon .coupons .activated-coupon .coupon-delete{position:relative;display:flex;align-items:center;justify-content:center;transition:all .3s ease-in-out;-webkit-transition:all .3s ease-in-out}storefront-coupon .coupons storefront-spinner.coupons-spinner,storefront-coupon .coupons .pxp-spinner.coupons-spinner,.pxp-coupon .coupons storefront-spinner.coupons-spinner,.pxp-coupon .coupons .pxp-spinner.coupons-spinner{height:80px;position:relative}storefront-coupon storefront-spinner,storefront-coupon .pxp-spinner,.pxp-coupon storefront-spinner,.pxp-coupon .pxp-spinner{position:absolute;display:flex;align-items:center;justify-content:center;width:100%;height:100%;top:0;left:0;padding:8px}\n"],encapsulation:2}),c})();var b=r(6215),G=r(6483),j=r(1605);let X=(()=>{var n;class c{}return(n=c).\u0275fac=function(i){return new(i||n)},n.\u0275mod=o.$C({type:n}),n.\u0275inj=o.G2t({imports:[m.MD,u.YN,b.O,G.h,j.P]}),c})();const $=F}}]);

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.