import{c as oe}from"./chunk-Y6J6CMIU.js";import{a}from"./chunk-U2PSGC6Y.js";import{$ as z,P as u,R as U,Z as $,_ as v,dc as Z,m as X}from"./chunk-U45OJP77.js";import{a as M}from"./chunk-L7MON56Q.js";import{a as J}from"./chunk-YG5GTJAS.js";import{l as te}from"./chunk-IVZXJNYX.js";import{d as k,e as R,f as ee}from"./chunk-DO6VS5PC.js";import{a as Ce}from"./chunk-OW53KNUD.js";import{b as j,c as D,d as K,h as N,i as q,l as Q,n as m}from"./chunk-MGYJOL7Z.js";import{D as W,s as A}from"./chunk-QYQ7WNYU.js";import{b as P}from"./chunk-W73LR43Y.js";import{a as Y,b as d,k as S}from"./chunk-GW55Q7ZA.js";import{Ba as H,Ea as G,J as C,La as p,O as I,P as w,Qa as s,Ra as h,Z as O,ba as F,eb as B,fa as _,g as Ne}from"./chunk-HC2G7LSI.js";var Re=function(e){return e.acquisition="acquisition",e.budget="produs cu buget",e.installment="installment",e.insurance="cu asigurare",e.others="cart item necunoscut",e.standard="standard",e.subscription="loyalty",e}(Re||{}),ce=function(e){return e.inStock="in stock",e.outOfStock="out of stock",e}(ce||{}),Te=function(e){return e.MIKRO_USER_CLICK="mikroUserClick",e}(Te||{}),Ee=function(e){return e.CHECKOUT_ERROR_EVENT_ACTION="type:error - checkout-user-notification",e}(Ee||{}),Pe=function(e){return e.CART_OPTIONS="Cart Options",e.CHECKOUT="Checkout",e.EMPTY_CART="Empty Cart",e.CHECKOUT_DELIVERY_OPTIONS="Checkout Delivery Options",e.CHECKOUT_DELIVERY_TABS="Checkout Delivery Tabs",e.CHECKOUT_PAYMENT_OPTIONS="Checkout Payment Options",e.LOGIN_POP_UP="Login Pop Up",e.PORT_IN_OPTIONS="Portin Options",e.PORT_IN_REVISION="Portin Revision",e.PRODUCT="Product",e.PRODUCT_SPECS="Product Specs",e.SCAN_AGREEMENT="Scan Agreement",e.SCAN_METHOD="Scan Method",e.SUBSCRIPTIONS="Subscriptions",e.VALIDATION="Validation",e.PRODUCT_COMPARE="Product Compare",e}(Pe||{}),Ae=function(e){return e.CHANGE_CATEGORY="Change Category",e.SORT_PRODUCTS="Sort Products",e.VIEW_MORE_PRODUCTS="View More Products",e.FREQUENT_SEARCHES="Frequent Searches",e.CHANGE_PRODUCT_COLOR="Change Product Color",e.FILTERED_PRODUCTS_PAGE="Filtered Products Page",e.FILTER_PRODUCTS_MENU="Filter Products Menu",e}(Ae||{}),f=function(e){return e.CHECKOUT="Checkout",e.CHECKOUT_GDPR="Checkout GDPR",e.HOME="HOME",e.LISTING="Listing",e.ORDERS_HISTORY="My Orders",e.PRODUCT_DETAIL="Product Detail",e.USER_PROFILE="User Profile",e.ONLINE_LEADS_CHECKOUT="Online Leads Checkout",e.CHECKOUT_SCAN_ID="Checkout Scan ID",e.ERROR_EVENTS="Error events",e.COMPARING="Comparing",e.CURRENCY="Currency",e.REVIEWS="Reviews - New Eshop",e}(f||{}),De=function(e){return e.AGREE_LOCATION="Agree To Location",e.AGREE_TRAFFIC="Agree To Traffic",e.AGREE_SERVICE_USAGE="Agree To Service Usage",e.AGREE_ORANGE_OFFERS="Agree To Orange Offers",e.AGREE_ORANGE_PARTNERS_OFFERS="Agree To Orange Partners Offers",e.AGREE_ORANGE_SURVEYS="Agree To Orange Surveys",e.AGREE_TO_ALL="Agree To All",e.DISAGREE_ALL="Don't Agree To All",e}(De||{}),ge=function(e){return e.CANCELED_TAB="Canceled Tab",e.DELIVERED_TAB="Delivered Tab",e.PROCESSING_TAB="Processing Tab",e.RETURNED_TAB="Returned Tab",e}(ge||{}),Ue=function(e){return e.EMAIL_LOGIN="Email - Login",e.PHONE_NUMBER="Phone Number",e.PORT_IN_DATA="Portin Data",e.CALL="Vreau s\u0103 fiu sunat",e.LEADS_PHONE_NUMBER="Numar de telefon",e.SCAN_ID_REVISION="Scan ID Revision",e.MODIFY_NUMBER="Modify Number",e}(Ue||{}),ye=function(e){return e.MY_APPROVED_REVIEWS_TAB="My Approved Reviews Tab",e.MY_PENDING_REVIEWS_TAB="My Pending Reviews Tab",e.MY_REJECTED_REVIEWS_TAB="My Rejected Reviews Tab",e.DELETE_REVIEW="Delete Review",e.CONFIRM_DELETE_REVIEW="Confirm Delete Review",e.QUIT_DELETE_REVIEW="Quit Delete Review",e.CLOSE_DELETE_REVIEW_POP_UP="Close Delete Review Pop Up",e.GO_TO_SHOP="Go to Shop",e}(ye||{}),Le=function(e){return e.CHANGE_CURRENCY="Change Currency",e.PRICE_OPTIONS="Price Options",e.NEW_COMBINATION_BANNER="New Combination Banner",e.PAYMENT_OPTION="Payment Option",e}(Le||{}),be=function(e){return e.SELECT_NUMBER="Select Number",e.NEW_SUBSCRIPTION="New Subscription",e.PREPAY_NEW_SUBSCRIPTION="Prepay New Subscription",e.RENEW_SUBSCRIPTION="Renew Subscription",e.STANDARD="Standard",e.SEE_SUBSCRIPTION_DETAILS="See Subscription Details",e.CLOSE_SUBSCRIPTION_DETAILS="Close Subscription Details",e.CHANGE_SUBSCRIPTION="Change Subscription",e.CLOSE_CHANGE_SUBSCRIPTION="Close Change Subscription",e.SEE_ROAMING="See Roaming",e.SEE_RATES="See Rates",e.SEE_SPEED="See Speed",e.PRODUCT_DETAIL_POP_UP="Product Detail Pop Up",e.PRODUCT_DETAIL_POP_UP_CLOSE_BUTTON="Product Detail Pop Up Close Button",e.PRODUCT_DETAIL_POP_UP_X_BUTTON="Product Detail Pop Up Close X",e.QUIT="Quit",e.CONFIRM="Confirm",e}(be||{}),y=function(e){return e.ZERO="0",e.CLICK="click",e}(y||{}),xe=function(e){return e.ACQUISITION="acquisition",e.LOYALTY="loyalty",e}(xe||{});var Ve=function(e){return e.addToCart="addToCart",e.add_to_wishlist="add_to_wishlist",e.checkout="checkout",e.data_loaded="data_loaded",e.mikroUserClick="mikroUserClick",e.productDetail="productDetail",e.productImpression="productImpression",e.productPurchase="productPurchase",e.removeFromCart="removeFromCart",e.remove_from_wishlist="remove_from_wishlist",e.visitorInteraction="visitorInteraction",e}(Ve||{}),we=function(e){return e.otyChange="Modificare Puncte Orange",e.phoneCreditChange="Modificare Phone Credit",e}(we||{});var Fe=[u.SetShipping,u.SetBilling,u.SetPayment];function c(e,o){return e.find(i=>i?.code===o)}function He(e){return B(e,()=>{let o=h(m),i=!1;return o.getWithSelector(oe()).pipe(_(1)).subscribe(t=>{i=t}),i})}function Ge(e){let o=e.items.some(t=>t?.product?.__typename==="SubscriptionOfferingSubResource"&&t.product.acq==="ACQUISITION_PORT_IN"&&t.product.portInDetails?.needOtpValidation),i=e.items.some(t=>t?.items?.some(r=>r?.product&&r.product.__typename==="SubscriptionOfferingSubResource"&&r.product.acq==="ACQUISITION_PORT_IN"&&r.product.portInDetails?.needOtpValidation));return o||i}function Be(e){let o=e.items.some(t=>t?.product?.__typename==="SubscriptionOfferingSubResource"&&t?.product?.acq==="ACQUISITION_PORT_IN"&&t.product.portInDetails?.hasUploadedInvoiceOrSimDoc===!1),i=e.items.some(t=>t?.items?.some(r=>r?.product&&r.product.__typename==="SubscriptionOfferingSubResource"&&r.product.acq==="ACQUISITION_PORT_IN"&&r.product.portInDetails?.hasUploadedInvoiceOrSimDoc===!1));return o||i}function ze(e){let o=[];return e?.__typename==="PendingCartResource"&&(e?.actions?.some(i=>i&&Fe.includes(i))||o.push(n.canNotPerformAtLeastOneShippingAction),e?.items?.length||o.push(n.emptyCart),e?.items.some(i=>i?.notifications?.length)&&e?.items.some(i=>i?.notifications?.find(t=>t&&t.duration!==$.Temporary))&&o.push(n.cartItemNotification),e?.items.some(i=>i?.items?i?.items.some(t=>t?.notifications?.find(r=>r&&r.code===re.portInNotEligible)):!1)&&o.push(n.cartItemNotification),e?.notifications?.some(i=>i.level===v.Error&&!Ye.includes(i?.code||"")&&i?.page!==z.Shipping)&&o.push(n.cartNotification)),o}function Ze(e,o,i){let t=[];return e?.__typename==="PendingCartResource"&&(!o?.hasPaymentCommitment&&e.actions.includes(u.HasPaymentCommitment)&&t.push(n.paymentCommitmentHasError),e.actions?.includes(u.CanPlaceOrder)||t.push(n.impersonatedUserCanPlaceOrder),e?.billing||t.push(n.billing),e?.payment||t.push(n.payment),!e?.shipping&&!e.actions.includes(u.IsFastOrder)&&!e.actions.includes(u.IsESimPrePayFlow)&&t.push(n.shipping),!e?.telewebInfo&&e.actions.includes(u.CanImpersonate)&&t.push(n.impersonation),c(e?.notifications,"MAX_VALUE_EXCEEDED")&&t.push(n.maxValueExceeded),c(e.notifications,"MISSING_CONTACT_PERSON_PHONE_NUMBER_FROM_SHIPPING")&&t.push(n.missingPhoneNumberFromDeliveryContactPerson),c(e?.notifications,"MISSING_UNIQUE_ID_PERSON")&&t.push(n.billingMissingUniqueId),c(e?.notifications,"CARD_PAYMENT_NOT_AVAILABLE_FOR_LOCKER")&&t.push(n.cardPaymentNotAvailableForLocker),e.newCustomerDetails?.isNCAFlow&&!e.newCustomerDetails.userDetails&&t.push(n.newCustomerDetailsIsNull),Ge(e)&&t.push(n.portInOtpNeedValidate),Be(e)&&t.push(n.portInNeedUploadDoc),i&&He(i)&&t.push(n.ppy2ppdOtpNeedValidate)),t}function Je(e){let o=[];return e?.__typename==="PendingCartResource"&&c(e?.notifications,U.ContactEmailNotValidated)&&o.push(n.contactEmailNotValidated),o}var Ye=["INSTALLMENT_LIMIT_REACHED","MAX_VALUE_EXCEEDED",U.ContactEmailNotValidated,"PORT_IN_OFI_ARIADNEXT_CNP_NOT_MATCHING"],re=function(e){return e.portInNotEligible="PORTIN_NOT_ELIGIBLE",e}(re||{}),n=function(e){return e.billing="billing",e.billingStreet="billingStreet",e.billingMissingUniqueId="billingMissingUniqueId",e.canNotPerformAtLeastOneShippingAction="canNotPerformAtLeastOneShippingAction",e.cartItemNotification="cartItemNotification",e.cartNotification="cartNotification",e.dontAcceptValidation="dontAcceptValidation",e.dontHaveOCRConsent="dontHaveOCRConsent",e.emptyCart="emptyCart",e.impersonatedUserCanPlaceOrder="impersonatedUserCanPlaceOrder",e.impersonation="impersonation",e.maxValueExceeded="maxValueExceeded",e.contactEmailNotValidated="CONTACT_EMAIL_NOT_VALIDATED",e.missingPhoneNumberFromDeliveryContactPerson="missingPhoneNumberFromDeliveryContactPerson",e.newCustomerDetailsIsNull="newCustomerDetailsIsNull",e.portInOtpNeedValidate="portInOtpNeedValidate",e.portInNeedUploadDoc="portInNeedUploadDoc",e.orderDetailsNotCompleted="orderDetailsNotCompleted",e.payment="payment",e.paymentCommitmentHasError="paymentCommitmentHasError",e.shipping="shipping",e.shippingStreet="shippingStreet",e.technicalErrors="technicalErrors",e.transportAndPaymentNotCompleted="transportAndPaymentNotCompleted",e.emailConfirmationNotCompleted="emailConfirmationNotCompleted",e.ppy2ppdOtpNeedValidate="ppy2ppdOtpNeedValidate",e.cardPaymentNotAvailableForLocker="cardPaymentNotAvailableForLocker",e}(n||{}),ie=e=>!!e&&/^\/adaugat-la-cos(\?.*)?$/.test(e),ne=e=>!!e&&/^\/adaugat-la-cos\/numar-telefon.*/.test(e);var ae=e=>!!e&&/^\/adaugat-la-cos\/scanare.*/.test(e),se=e=>!!e&&/^\/adaugat-la-cos\/transport-si-plata.*/.test(e);var Me=e=>!!e&&/^\/adaugat-la-cos\/plaseaza-comanda/.test(e),pe=e=>!!e&&/^\/adaugat-la-cos\/(comanda-scanare-validare|confirma-comanda|comanda-confirmata(\/[\d-]+)?(\/[\da-z-]+)?)(\?.*)?$/.test(e);var de=(()=>{let o=class o{constructor(t,r){this.storeSelector=t,this.router=r}resolve(t){return this.storeSelector.getWithSelector(N()).pipe(O(r=>!!r.me||!!r.error)).pipe(G(r=>{j(r.me)&&!D(r.me)&&r.me?.channel!==P.getChannel()&&this.router.navigate(["/canal-incorect"])})).pipe(_(1))}};o.\u0275fac=function(r){return new(r||o)(s(m),s(S))},o.\u0275prov=p({token:o,factory:o.\u0275fac,providedIn:"root"});let e=o;return e})();var fe=(()=>{let o=class o{constructor(t){this.storeSelector=t}canActivate(t,{url:r}){return this.storeSelector.getWithSelector(N()).pipe(O(K)).pipe(I(({me:l})=>{if(!D(l))throw Error("user has no impersonation rights");return!0})).pipe(_(1)).pipe(F(()=>(M(),C(!1))))}};o.\u0275fac=function(r){return new(r||o)(s(m))},o.\u0275prov=p({token:o,factory:o.\u0275fac,providedIn:"root"});let e=o;return e})();var le=(()=>{let o=class o{constructor(t,r){this.router=t,this.storeSelector=r}canActivate(){return this.storeSelector.getWithSelector(q()).pipe(I(t=>!t.ssoId||t.channel===P.getChannel()?(this.router.navigate(["/"]),!1):!0))}};o.\u0275fac=function(r){return new(r||o)(s(S),s(m))},o.\u0275prov=p({token:o,factory:o.\u0275fac});let e=o;return e})();var Ie=Object.entries(k).map(([e,o])=>({pathMatch:"full",path:`${o}-cat-${e}`,redirectTo:ee(parseInt(e,10),o).replace(/^\//,""),queryParamsHandling:"preserve"}));var Oe=Ne(Ce());var _e=(()=>{let o=class o{constructor(){this.store=h(A),this.storeSelector=h(m),this.identityApiService=h(J)}canActivate(t,{url:r}){let l=t.queryParams.fromStatic?t.queryParams.fromStatic:null;return w([this.store.select(Z),this.storeSelector.getWithSelector(N()).pipe(O(E=>E.status===W.success)),this.storeSelector.getWithSelector(Q),this.identityApiService.getAuthUrlToCurrentPage()]).pipe(H(([E,x,V,Se])=>!E.wasAskedToSignIn&&!x.me?.ssoId&&!V&&l==="true"?(Oe.default.set("redirect_cookie",r),window.open(`${Se}`,"_self"),C(!1)):(!E.wasAskedToSignIn&&x.me?.ssoId&&V&&this.store.dispatch(X()),C(!0))))}};o.\u0275fac=function(r){return new(r||o)},o.\u0275prov=p({token:o,factory:o.\u0275fac,providedIn:"root"});let e=o;return e})();function L(e){if(e.length){let i=e[0].path.match(/^(.+)-pd-(\d+)\b/);if(i)return{consumed:[e[0]],posParams:{productSlug:new d(i[1],{}),productId:new d(i[2],{})}}}return null}function he(e){if(e.length){let o=e[0].path,i=R[o];if(i)return{consumed:[e[0]],posParams:{categorySlug:new d(o,{}),categoryId:new d(i.toString(),{})}}}return null}function We(e){if(e.length){let o=e[0].path,i=R[o],t=e[1]?.path;if(i)return{consumed:[...e],posParams:{categorySlug:new d(o,{}),categoryId:new d(i.toString(),{}),brandFilter:new d(t,{})}}}return null}var je=[{path:a.Root,loadChildren:()=>import("./chunk-S4YH3V4A.js"),data:{revalidate:60}},{path:a.Impersonation,loadComponent:()=>import("./chunk-QZTR5DAT.js"),canActivate:[fe]},{path:a.Comparator,loadChildren:()=>import("./chunk-ZSASN2BM.js")},{path:a.OrderHistory,loadChildren:()=>import("./chunk-P6RYXR3R.js")},{path:a.Reviews,loadChildren:()=>import("./chunk-7MCRZLVJ.js")},{path:a.Favorites,data:{name:"favorite"},loadComponent:()=>import("./chunk-J4BPUSCL.js")},{path:"cos",redirectTo:a.Cart},{path:a.Cart,loadChildren:()=>import("./chunk-PF75YGFV.js"),data:{pageType:"cart"}},{matcher:L,canActivate:[_e],loadChildren:()=>import("./chunk-BIMTEVMO.js")},{path:a.Subscription,loadChildren:()=>import("./chunk-DPEYTIBC.js")},...Ie,{matcher:We,loadChildren:()=>import("./chunk-7HKCSIMX.js")},{path:a.MobileScanConfirmed,loadComponent:()=>import("./chunk-7TXJESKK.js")}],Wt=[{path:a.IncorrectChannel,canActivate:[le],loadComponent:()=>import("./chunk-CR23UKQA.js").then(e=>e)},{path:a.Root,resolve:{identity:de},children:je},{path:"**",loadComponent:()=>import("./chunk-G42RRYNW.js").then(e=>e)}];var b=window;b.dataLayer=b.dataLayer||[];var T=function(e){return e[e.DETAILS=0]="DETAILS",e[e.SCAN=1]="SCAN",e[e.TRANSPORT_AND_PAYMENT=2]="TRANSPORT_AND_PAYMENT",e[e.CONFIRMATION=3]="CONFIRMATION",e}(T||{}),Mt=(()=>{let o=class o{constructor(t,r){this.router=t,this.store=r}locate(){let r=this.router.parseUrl(this.router.url).root.children[Y],l="home";return this.router.url!=="/"&&r&&(l=this.identifyPage(r.segments)),l}track(t,r="Menu Tabs"){t==="Show"&&this.locate()==="checkout"&&(r="Checkout Delivery",t="Select Number"),this.locate()==="product"&&(t="Product Detail Top"),b.dataLayer.push({event:"mikroUserClick",event_action:r,event_category:"User Profile",event_label:t,event_value:y.ZERO})}identifyPage(t){return he(t)||t[0]&&t[0].path==="abonamente"?"listing":L(t)?"product":t[1]&&t[1].path==="transport-si-plata"?"checkout":this.router.url.substring(1)}identifyEventCategory(){return this.store.select(te).pipe(I(({params:t,url:r})=>R[t.categorySlug]||r.startsWith("/abonamente")?f.LISTING:r.match(/^(.+)-pd-(\d+)\b/)?f.PRODUCT_DETAIL:r.startsWith("/comenzile-mele")?f.ORDERS_HISTORY:r==="/"?f.HOME:f.HOME))}identifyCartStep(){if(ie(this.router.url)||ne(this.router.url))return T.DETAILS;if(pe(this.router.url))return T.CONFIRMATION;if(ae(this.router.url))return T.SCAN;if(se(this.router.url))return T.TRANSPORT_AND_PAYMENT}};o.\u0275fac=function(r){return new(r||o)(s(S),s(A))},o.\u0275prov=p({token:o,factory:o.\u0275fac,providedIn:"root"});let e=o;return e})();export{Re as a,ce as b,Te as c,Ee as d,Pe as e,Ae as f,f as g,De as h,ge as i,Ue as j,ye as k,Le as l,be as m,y as n,xe as o,Ve as p,we as q,ze as r,Ze as s,Je as t,n as u,ie as v,se as w,Me as x,pe as y,Wt as z,T as A,Mt as B};