PageSourceSearch

https://www.tax-free.no/chunk-KJKIPU3Z.js

js tax-free.no collected 2026-10-06 15:04:39 UTC 9,529 bytes, 1 lines download raw bytes

1import{a as Q}from"./chunk-6NEIA7KQ.js";import{d as Z}from"./chunk-CNBMOLNM.js";import{B as V,G as X}from"./chunk-SU7S3GV3.js";import{a as rt}from"./chunk-4Z5MUJO3.js";import{$e as O,Ad as c,D as F,F as j,Fd as k,J as D,L as p,Of as P,Re as $,S as T,Sf as d,Uf as M,V as g,Vg as B,Z as v,a as x,ca as w,ga as o,he as q,ie as R,jf as I,ka as L,lf as H,ma as f,o as E,ph as Y,qa as S,rh as J,se as G,sg as z,tf as K,u as l,ua as n,uf as N,v as m,we as _}from"./chunk-PMSJWPYZ.js";import{h as it}from"./chunk-NIF3MU5U.js";var u=class extends K{event;wishList},tt=class extends u{},U=class extends u{},y=class extends u{},C=class extends u{shareType},b=class extends u{};var A=it(rt());var et=(()=>{class h{actions$=n(q);http=n(k);occEndpoints=n(H);logger=n(O);contextChange$=this.actions$.pipe(R(I.CURRENCY_CHANGE,I.LANGUAGE_CHANGE));get(t,e){let s=new c({"Content-Type":"application/json"}),i=this.occEndpoints.buildUrl(`/users/${t}/wishlists/${e}`,{queryParams:{fields:"DEFAULT"}});return this.http.get(i,{headers:s}).pipe(p(r=>{throw d(r,this.logger)}),P(this.contextChange$))}getLists(t){let e=new c({"Content-Type":"application/json"}),s=this.occEndpoints.buildUrl(`/users/${t}/wishlists`,{queryParams:{fields:"DEFAULT"}});return this.http.get(s,{headers:e}).pipe(p(i=>{throw d(i,this.logger)}),l(i=>i.wishlists??[]),P(this.contextChange$))}getListsForProduct(t,e){let s=new c({"Content-Type":"application/json"}),i=this.occEndpoints.buildUrl(`/users/${t}/wishlists`,{queryParams:{product:e,fields:"DEFAULT"}});return this.http.get(i,{headers:s}).pipe(p(r=>{throw d(r,this.logger)}),l(r=>r.wishlists??[]))}create(t,e){let s=new c({"Content-Type":"application/json"}),i=this.occEndpoints.buildUrl(`/users/${t}/wishlists`,{queryParams:{fields:"DEFAULT"}}),r={name:e};return this.http.post(i,r,{headers:s}).pipe(p(a=>{throw d(a,this.logger)}))}merge(t,e){let s=new c({"Content-Type":"application/json"}),i=this.occEndpoints.buildUrl(`/users/${t}/wishlists`,{queryParams:{fields:"DEFAULT",id:e}});return this.http.post(i,{},{headers:s}).pipe(p(r=>{throw d(r,this.logger)}))}rename(t,e,s){let i=new c({"Content-Type":"application/json"}),r=this.occEndpoints.buildUrl(`/users/${t}/wishlists/${s}`,{queryParams:{fields:"DEFAULT"}}),a={name:e};return this.http.patch(r,a,{headers:i}).pipe(p(W=>{throw d(W,this.logger)}))}move(t,e,s,i){let r=new c({"Content-Type":"application/json"}),a=this.occEndpoints.buildUrl(`/users/${t}/wishlists/${e}/move/${s}`,{queryParams:{fields:"DEFAULT"}}),W={products:i};return this.http.post(a,W,{headers:r}).pipe(p(st=>{throw d(st,this.logger)}))}remove(t,e){let s=new c({"Content-Type":"application/json"}),i=this.occEndpoints.buildUrl(`/users/${t}/wishlists/${e}`,{queryParams:{fields:"DEFAULT"}});return this.http.delete(i,{headers:s}).pipe(p(r=>{throw d(r,this.logger)}))}update(t,e,s){let i=new c({"Content-Type":"application/json"}),r=this.occEndpoints.buildUrl(`/users/${t}/wishlists/${e}`,{queryParams:{fields:"DEFAULT"}});return this.http.patch(r,s,{headers:i}).pipe(p(a=>{throw d(a,this.logger)}))}addProducts(t,e,s){let i=new c({"Content-Type":"application/json"}),r=this.occEndpoints.buildUrl(`/users/${t}/wishlists/${e}/entries`,{queryParams:{fields:B.Fields.DEFAULT}});return this.http.put(r,{products:s},{headers:i}).pipe(p(a=>{throw d(a,this.logger)}))}deleteProduct(t,e,s){let i=new c({"Content-Type":"application/json"}),r=this.occEndpoints.buildUrl(`/users/${t}/wishlists/${e}/entries/${s}`,{queryParams:{fields:"DEFAULT"}});return this.http.delete(r,{headers:i}).pipe(p(a=>{throw d(a,this.logger)}))}addWishListToCart(t,e,s){let i=new c({"Content-Type":"application/json"}),r=this.occEndpoints.buildUrl(`/users/${t}/carts/${e}/wishlists/${s}`,{queryParams:{fields:"DEFAULT"}});return this.http.post(r,{headers:i}).pipe(p(a=>{throw d(a,this.logger)}))}share(t,e,s){let i=new c({"Content-Type":"application/json"}),r=this.occEndpoints.buildUrl(`/users/${t}/wishlists/${e}/share`,{queryParams:{fields:"DEFAULT"}});return this.http.post(r,s,{headers:i}).pipe(p(a=>{throw d(a,this.logger)}))}static \u0275fac=function(e){return new(e||h)};static \u0275prov=S({token:h,factory:h.\u0275fac,providedIn:"root"})}return h})();var At=(()=>{class h{activatedRoute=n(G);activeCartService=n(X);cmsService=n(Y);eventService=n(N);multiCartService=n(V);routingService=n(z);userIdService=n(M);wishListAdapter=n(et);translationService=n(J);localStorageService=n(Q);router=n(_);
1storedWishListKey="selected-wishlist";wishListLastUpdateKey="wishlist-last-update";lastUpdate$=this.localStorageService.getItem$(this.wishListLastUpdateKey);storedWishList$=this.localStorageService.getItem$(this.storedWishListKey);routerWishlistId$=this.activatedRoute.queryParamMap.pipe(l(t=>t.get("wishListId")),g());selectedWishListId$=m([this.routerWishlistId$,this.storedWishList$]).pipe(l(([t,e])=>t||e),g());sharedWishList$=this.routingService.getPageContext().pipe(o(t=>this.cmsService.getPageState(t)),o(t=>this.get(t.pageContextCode)),w({bufferSize:1,refCount:!0}));wishLists$=F(this.userIdService.getUserId().pipe(g()),this.lastUpdate$.pipe(f(this.userIdService.getUserId()),l(([,t])=>t))).pipe(D(1),o(t=>t?t===$?this.getAnonymousWishList$():this.wishListAdapter.getLists(t):E([])),w({bufferSize:1,refCount:!0}));selectedWishList$=m([this.selectedWishListId$,this.getLists()]).pipe(l(([t,e])=>t?e.find(s=>s.id===t):(0,A.head)(e)),g(),w({bufferSize:1,refCount:!0}));subscription=new x;creationDisabled$=m([this.wishLists$,this.userIdService.getUserId()]).pipe(l(([t,e])=>e===$&&t.length>0),g());constructor(){this.subscription.add(this.selectedWishListId$.subscribe(t=>this.selectWishList(t))),this.subscription.add(this.wishLists$.pipe(f(this.selectedWishListId$)).subscribe(([t,e])=>{!e&&t.length&&this.selectWishList((0,A.head)(t).id)})),this.subscription.add(this.wishLists$.pipe(f(this.routerWishlistId$)).subscribe(([t,e])=>{e&&t.length&&!t.some(s=>s.id===e)&&this.selectWishList((0,A.head)(t).id)}))}ngOnDestroy(){this.subscription.unsubscribe()}getAnonymousWishList$(){return this.selectedWishListId$.pipe(o(t=>t?this.get(t).pipe(l(e=>[e])):E([])))}triggerRefresh(){this.localStorageService.setItem(this.wishListLastUpdateKey,new Date().getTime().toString())}storeWishList(t){t?this.localStorageService.setItem(this.storedWishListKey,t):this.localStorageService.removeItem(this.storedWishListKey)}clearStoreWishList(){this.storeWishList(null),this.selectWishList(null)}selectWishList(t){this.userIdService.takeUserId().pipe(v()).subscribe(e=>{this.storeWishList(e===$?t:null)}),t&&this.routerWishlistId$.pipe(v()).subscribe(e=>{e&&e!==t&&this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{wishListId:t},queryParamsHandling:"merge"})})}getSelectedWishList(){return this.selectedWishList$}getSharedWishList(){return this.sharedWishList$}get(t){return this.userIdService.takeUserId().pipe(o(e=>this.wishListAdapter.get(e,t)))}getLists(){return this.wishLists$}getListsForProduct(t){return this.withDefaultTranslations$(this.userIdService.takeUserId().pipe(o(e=>this.wishListAdapter.getListsForProduct(e,t))))}create(t){return this.userIdService.takeUserId().pipe(o(e=>this.wishListAdapter.create(e,t)),L(e=>{this.selectWishList(e.id),this.sendGtmWishListCreationEvent(e)}))}rename(t,e){return this.userIdService.takeUserId().pipe(o(s=>this.wishListAdapter.rename(s,t,e)))}move(t,e,s){return this.userIdService.takeUserId().pipe(o(i=>this.wishListAdapter.move(i,t,e,s)))}merge(t){return this.userIdService.takeUserId().pipe(o(e=>this.wishListAdapter.merge(e,t)))}remove(t){return this.userIdService.takeUserId().pipe(o(e=>this.wishListAdapter.remove(e,t)),L(()=>this.sendGtmWishListRemoveEvent(t)))}update(t,e){return this.userIdService.takeUserId().pipe(T(1),o(s=>this.wishListAdapter.update(s,t,e)))}addProducts(t,e){return this.userIdService.takeUserId().pipe(o(s=>this.wishListAdapter.addProducts(s,t,e)))}deleteProduct(t,e){return this.userIdService.takeUserId().pipe(o(s=>this.wishListAdapter.deleteProduct(s,t,e)))}deleteProducts(t,e){return m(e.map(s=>this.deleteProduct(t,s)))}addWishListToCart(t){return m([this.userIdService.takeUserId(),this.activeCartService.getActiveCartId()]).pipe(T(1),o(([e,s])=>s?this.wishListAdapter.addWishListToCart(e,s,t):this.multiCartService.createCart({userId:e,extraData:{active:!0}}).pipe(l(i=>Z(i,e)),j(i=>!!i),o(i=>this.wishListAdapter.addWishListToCart(e,i,t)))),L(()=>this.sendGtmAddWishListToCartEvent(t)))}shareWishList(t,e){return this.userIdService.takeUserId().pipe(o(s=>this.wishListAdapter.share(s,t,e)),L(()=>this.sendGtmShareWishListEvent(t,e.type)))}checkAnonymousWishListAndMerge(){this.selectedWishListId$.pipe(v()).subscribe(t=>
1{t&&this.merge(t).pipe(v()).subscribe(()=>{this.clearStoreWishList(),this.triggerRefresh()})})}sendGtmWishListCreationEvent(t){this.eventService.dispatch({event:"wishList_creation",wishList:{id:t.id}},U)}sendGtmWishListRemoveEvent(t){this.eventService.dispatch({event:"wishList_remove",wishList:{id:t}},y)}sendGtmAddWishListToCartEvent(t){this.eventService.dispatch({event:"wishList_addToCart",wishList:{id:t}},b)}sendGtmShareWishListEvent(t,e){this.eventService.dispatch({event:"wishList_share",wishList:{id:t},shareType:e},C)}withDefaultTranslations$(t){return t.pipe(o(e=>this.translationService.translate("wish_list.wish_list_default_name").pipe(l(s=>e.map(i=>i.defaultWishList?Object.assign(i,{name:s}):i)))))}static \u0275fac=function(e){return new(e||h)};static \u0275prov=S({token:h,factory:h.\u0275fac,providedIn:"root"})}return h})();export{u as a,tt as b,U as c,y as d,C as e,b as f,At as g};

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.