@postnord/pn-marketweb-components 2.0.68 → 2.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,7 +36,11 @@ let PnBonusProgressbar = class {
36
36
  if (!this.max) {
37
37
  if (this.levelValues && this.levelValues.length > 0) {
38
38
  const newMax = this.levelValues.slice(-1)[0];
39
- this.max = Math.floor(newMax * 1.05);
39
+ let modifier = 1.05;
40
+ if (this.value > newMax) {
41
+ modifier = 1.2;
42
+ }
43
+ this.max = Math.floor(newMax * modifier); // This sets the max value which all levels are relative to
40
44
  }
41
45
  }
42
46
  // if (!this.min) {
@@ -63,7 +67,12 @@ let PnBonusProgressbar = class {
63
67
  if (this.progresspercentage > 100) {
64
68
  this.progresspercentage = 100;
65
69
  const newMax = this.levelValues.slice(-1)[0];
66
- this.max = Math.floor(newMax * 1.05);
70
+ let modifier = 1.05;
71
+ if (this.value > newMax) {
72
+ modifier = 1.2;
73
+ }
74
+ this.max = Math.floor(newMax * modifier); // This sets the max value which all levels are relative to
75
+ // this.max = Math.floor(newMax * 1.20);
67
76
  }
68
77
  }
69
78
  iconColor() {
@@ -28,7 +28,11 @@ export class PnBonusProgressbar {
28
28
  if (!this.max) {
29
29
  if (this.levelValues && this.levelValues.length > 0) {
30
30
  const newMax = this.levelValues.slice(-1)[0];
31
- this.max = Math.floor(newMax * 1.05);
31
+ let modifier = 1.05;
32
+ if (this.value > newMax) {
33
+ modifier = 1.2;
34
+ }
35
+ this.max = Math.floor(newMax * modifier); // This sets the max value which all levels are relative to
32
36
  }
33
37
  }
34
38
  // if (!this.min) {
@@ -55,7 +59,12 @@ export class PnBonusProgressbar {
55
59
  if (this.progresspercentage > 100) {
56
60
  this.progresspercentage = 100;
57
61
  const newMax = this.levelValues.slice(-1)[0];
58
- this.max = Math.floor(newMax * 1.05);
62
+ let modifier = 1.05;
63
+ if (this.value > newMax) {
64
+ modifier = 1.2;
65
+ }
66
+ this.max = Math.floor(newMax * modifier); // This sets the max value which all levels are relative to
67
+ // this.max = Math.floor(newMax * 1.20);
59
68
  }
60
69
  }
61
70
  iconColor() {
@@ -11,6 +11,23 @@ export default {
11
11
  const Template = ({ ...args }) => {
12
12
  return `
13
13
  <div style="width:380px;margin-bottom:3em;">
14
+
15
+
16
+ <pn-bonus-progressbar value="970132"
17
+ icon="stamp"
18
+ theme="red"
19
+ bonuspercentage="17%"
20
+ heading="Din rabatt p&#229; Varor"
21
+ sumtext="Nuvarande summa: 970132 SEK">
22
+ <pn-bonus-progressbar-level value="0" bonuspercentage="14%"></pn-bonus-progressbar-level>
23
+ <pn-bonus-progressbar-level value="15001" bonuspercentage="15%"></pn-bonus-progressbar-level>
24
+ <pn-bonus-progressbar-level value="35001" bonuspercentage="15.5%"></pn-bonus-progressbar-level>
25
+ <pn-bonus-progressbar-level value="70001" bonuspercentage="16%"></pn-bonus-progressbar-level>
26
+ <pn-bonus-progressbar-level value="105001" bonuspercentage="17%"></pn-bonus-progressbar-level>
27
+
28
+ </pn-bonus-progressbar>
29
+ </div>
30
+ <div style="width:380px;margin-bottom:3em;">
14
31
  <pn-bonus-progressbar value="268905"
15
32
  icon="stamp"
16
33
  theme="blue"
@@ -34,7 +34,11 @@ let PnBonusProgressbar$1 = class extends HTMLElement {
34
34
  if (!this.max) {
35
35
  if (this.levelValues && this.levelValues.length > 0) {
36
36
  const newMax = this.levelValues.slice(-1)[0];
37
- this.max = Math.floor(newMax * 1.05);
37
+ let modifier = 1.05;
38
+ if (this.value > newMax) {
39
+ modifier = 1.2;
40
+ }
41
+ this.max = Math.floor(newMax * modifier); // This sets the max value which all levels are relative to
38
42
  }
39
43
  }
40
44
  // if (!this.min) {
@@ -61,7 +65,12 @@ let PnBonusProgressbar$1 = class extends HTMLElement {
61
65
  if (this.progresspercentage > 100) {
62
66
  this.progresspercentage = 100;
63
67
  const newMax = this.levelValues.slice(-1)[0];
64
- this.max = Math.floor(newMax * 1.05);
68
+ let modifier = 1.05;
69
+ if (this.value > newMax) {
70
+ modifier = 1.2;
71
+ }
72
+ this.max = Math.floor(newMax * modifier); // This sets the max value which all levels are relative to
73
+ // this.max = Math.floor(newMax * 1.20);
65
74
  }
66
75
  }
67
76
  iconColor() {
@@ -32,7 +32,11 @@ let PnBonusProgressbar = class {
32
32
  if (!this.max) {
33
33
  if (this.levelValues && this.levelValues.length > 0) {
34
34
  const newMax = this.levelValues.slice(-1)[0];
35
- this.max = Math.floor(newMax * 1.05);
35
+ let modifier = 1.05;
36
+ if (this.value > newMax) {
37
+ modifier = 1.2;
38
+ }
39
+ this.max = Math.floor(newMax * modifier); // This sets the max value which all levels are relative to
36
40
  }
37
41
  }
38
42
  // if (!this.min) {
@@ -59,7 +63,12 @@ let PnBonusProgressbar = class {
59
63
  if (this.progresspercentage > 100) {
60
64
  this.progresspercentage = 100;
61
65
  const newMax = this.levelValues.slice(-1)[0];
62
- this.max = Math.floor(newMax * 1.05);
66
+ let modifier = 1.05;
67
+ if (this.value > newMax) {
68
+ modifier = 1.2;
69
+ }
70
+ this.max = Math.floor(newMax * modifier); // This sets the max value which all levels are relative to
71
+ // this.max = Math.floor(newMax * 1.20);
63
72
  }
64
73
  }
65
74
  iconColor() {
@@ -1 +1 @@
1
- import{r as registerInstance,h,a as Host,g as getElement}from"./index-5397620b.js";var pnBonusProgressbarCss="pn-bonus-progressbar{width:100%}.bonusprogressbar-top{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:1.6rem}.bonusprogressbar-top-icon{border-radius:100%;height:5rem;width:5rem;padding:1rem;display:-ms-inline-flexbox;display:inline-flex;margin-right:1em;margin-left:0.5em;background-color:#E0F8FF}[theme=red] .bonusprogressbar-top-icon{background-color:#FBC2C1}.bonusprogressbar-top-icon pn-icon svg{width:100%;height:100%}.bonusprogressbar-sumtext{margin-top:0.4rem;font-size:1.3rem;color:#5E554A}.bonusprogressbar-top-percentage{margin-left:auto;padding:0.5em}.bonusprogressbar-wrapper{position:relative;display:-ms-flexbox;display:flex;min-height:5em;-ms-flex-align:center;align-items:center}.bonusprogressbar-currentlevel{position:absolute}.bonusprogressbar-progress[value]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:1.7rem;border:0.1rem solid #00A0D6;border-radius:1.7rem;padding:0;margin:0;overflow:hidden}[theme=red] .bonusprogressbar-progress[value]{border-color:#F06365}.bonusprogressbar-progress[value]::-webkit-progress-bar{border:0;border-radius:1.7rem;margin:0;padding:0;background:#E0F8FF}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-bar{background:#FDEFEE}.bonusprogressbar-progress[value]::-webkit-progress-value{margin:0;padding:0;border-radius:1.7rem;background:#00A0D6}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-value{background:#F06365}";var PnBonusProgressbar=function(){function e(e){registerInstance(this,e);this.icon=null;this.heading="";this.sumtext=null;this.theme="blue";this.bonuspercentage="0%";this.currency="kr";this.value=0;this.min=0;this.max=0;this.valuepercentage=0;this.progresspercentage=0;this.levelValues=[];this.currentLevelAdjustedValue=0}e.prototype.componentWillLoad=function(){this.setInitialValues();this.setValuePercentage()};e.prototype.setInitialValues=function(){var e=Array.from(this.hostElement.querySelectorAll("pn-bonus-progressbar-level:not([current])"));this.currentLevelAdjustedValue=this.value;this.levelValues=e.map((function(e){return parseInt(e.getAttribute("value"),10)}));if(!this.max){if(this.levelValues&&this.levelValues.length>0){var r=this.levelValues.slice(-1)[0];this.max=Math.floor(r*1.05)}}if(this.value>this.max){this.currentLevelAdjustedValue=100}};e.prototype.setValuePercentage=function(){this.valuepercentage=this.value/this.max*100;this.progresspercentage=(this.value-this.min)/(this.max-this.min)*100;if(this.progresspercentage<0){if(this.levelValues&&this.levelValues.length&&this.levelValues[0]<this.value){this.min=Math.floor(this.levelValues[0]*.95)}else{this.min=Math.floor(this.value*.95)}}if(this.progresspercentage>100){this.progresspercentage=100;var e=this.levelValues.slice(-1)[0];this.max=Math.floor(e*1.05)}};e.prototype.iconColor=function(){switch(this.theme){case"red":return"coral700";case"blue":default:return"blue700"}};e.prototype.render=function(){return h(Host,null,h("div",{class:"bonusprogressbar-top"},this.icon?h("div",{class:"bonusprogressbar-top-icon"},h("pn-icon",{symbol:this.icon,small:"false",color:this.iconColor()})):{},h("div",{class:"bonusprogressbar-top-heading"},h("h4",{class:"bonusprogressbar-top-headline"},this.heading),this.sumtext?h("div",{class:"bonusprogressbar-sumtext"},this.sumtext):null),h("strong",{class:"bonusprogressbar-top-percentage"},this.bonuspercentage)),h("div",{class:"bonusprogressbar-wrapper"},h("progress",{class:"bonusprogressbar-progress",value:this.progresspercentage,max:"100"}),h("pn-bonus-progressbar-level",{current:true,value:this.value,visualpercentage:this.currentLevelAdjustedValue,bonuspercentage:this.bonuspercentage}),h("slot",null)))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{currentLevelAdjustedValue:["setValuePercentage"],value:["setValuePercentage"],min:["setValuePercentage"],max:["setValuePercentage"]}},enumerable:false,configurable:true});return e}();PnBonusProgressbar.style=pnBonusProgressbarCss;export{PnBonusProgressbar as pn_bonus_progressbar};
1
+ import{r as registerInstance,h,a as Host,g as getElement}from"./index-5397620b.js";var pnBonusProgressbarCss="pn-bonus-progressbar{width:100%}.bonusprogressbar-top{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:1.6rem}.bonusprogressbar-top-icon{border-radius:100%;height:5rem;width:5rem;padding:1rem;display:-ms-inline-flexbox;display:inline-flex;margin-right:1em;margin-left:0.5em;background-color:#E0F8FF}[theme=red] .bonusprogressbar-top-icon{background-color:#FBC2C1}.bonusprogressbar-top-icon pn-icon svg{width:100%;height:100%}.bonusprogressbar-sumtext{margin-top:0.4rem;font-size:1.3rem;color:#5E554A}.bonusprogressbar-top-percentage{margin-left:auto;padding:0.5em}.bonusprogressbar-wrapper{position:relative;display:-ms-flexbox;display:flex;min-height:5em;-ms-flex-align:center;align-items:center}.bonusprogressbar-currentlevel{position:absolute}.bonusprogressbar-progress[value]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:1.7rem;border:0.1rem solid #00A0D6;border-radius:1.7rem;padding:0;margin:0;overflow:hidden}[theme=red] .bonusprogressbar-progress[value]{border-color:#F06365}.bonusprogressbar-progress[value]::-webkit-progress-bar{border:0;border-radius:1.7rem;margin:0;padding:0;background:#E0F8FF}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-bar{background:#FDEFEE}.bonusprogressbar-progress[value]::-webkit-progress-value{margin:0;padding:0;border-radius:1.7rem;background:#00A0D6}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-value{background:#F06365}";var PnBonusProgressbar=function(){function e(e){registerInstance(this,e);this.icon=null;this.heading="";this.sumtext=null;this.theme="blue";this.bonuspercentage="0%";this.currency="kr";this.value=0;this.min=0;this.max=0;this.valuepercentage=0;this.progresspercentage=0;this.levelValues=[];this.currentLevelAdjustedValue=0}e.prototype.componentWillLoad=function(){this.setInitialValues();this.setValuePercentage()};e.prototype.setInitialValues=function(){var e=Array.from(this.hostElement.querySelectorAll("pn-bonus-progressbar-level:not([current])"));this.currentLevelAdjustedValue=this.value;this.levelValues=e.map((function(e){return parseInt(e.getAttribute("value"),10)}));if(!this.max){if(this.levelValues&&this.levelValues.length>0){var r=this.levelValues.slice(-1)[0];var s=1.05;if(this.value>r){s=1.2}this.max=Math.floor(r*s)}}if(this.value>this.max){this.currentLevelAdjustedValue=100}};e.prototype.setValuePercentage=function(){this.valuepercentage=this.value/this.max*100;this.progresspercentage=(this.value-this.min)/(this.max-this.min)*100;if(this.progresspercentage<0){if(this.levelValues&&this.levelValues.length&&this.levelValues[0]<this.value){this.min=Math.floor(this.levelValues[0]*.95)}else{this.min=Math.floor(this.value*.95)}}if(this.progresspercentage>100){this.progresspercentage=100;var e=this.levelValues.slice(-1)[0];var r=1.05;if(this.value>e){r=1.2}this.max=Math.floor(e*r)}};e.prototype.iconColor=function(){switch(this.theme){case"red":return"coral700";case"blue":default:return"blue700"}};e.prototype.render=function(){return h(Host,null,h("div",{class:"bonusprogressbar-top"},this.icon?h("div",{class:"bonusprogressbar-top-icon"},h("pn-icon",{symbol:this.icon,small:"false",color:this.iconColor()})):{},h("div",{class:"bonusprogressbar-top-heading"},h("h4",{class:"bonusprogressbar-top-headline"},this.heading),this.sumtext?h("div",{class:"bonusprogressbar-sumtext"},this.sumtext):null),h("strong",{class:"bonusprogressbar-top-percentage"},this.bonuspercentage)),h("div",{class:"bonusprogressbar-wrapper"},h("progress",{class:"bonusprogressbar-progress",value:this.progresspercentage,max:"100"}),h("pn-bonus-progressbar-level",{current:true,value:this.value,visualpercentage:this.currentLevelAdjustedValue,bonuspercentage:this.bonuspercentage}),h("slot",null)))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{currentLevelAdjustedValue:["setValuePercentage"],value:["setValuePercentage"],min:["setValuePercentage"],max:["setValuePercentage"]}},enumerable:false,configurable:true});return e}();PnBonusProgressbar.style=pnBonusProgressbarCss;export{PnBonusProgressbar as pn_bonus_progressbar};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postnord/pn-marketweb-components",
3
- "version": "2.0.68",
3
+ "version": "2.0.71",
4
4
  "description": "PostNord Market Websites Components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -0,0 +1 @@
1
+ import{r as s,h as e,a as r,g as t}from"./p-58e8d7d5.js";let o=class{constructor(e){s(this,e),this.icon=null,this.heading="",this.sumtext=null,this.theme="blue",this.bonuspercentage="0%",this.currency="kr",this.value=0,this.min=0,this.max=0,this.valuepercentage=0,this.progresspercentage=0,this.levelValues=[],this.currentLevelAdjustedValue=0}componentWillLoad(){this.setInitialValues(),this.setValuePercentage()}setInitialValues(){const s=Array.from(this.hostElement.querySelectorAll("pn-bonus-progressbar-level:not([current])"));if(this.currentLevelAdjustedValue=this.value,this.levelValues=s.map((s=>parseInt(s.getAttribute("value"),10))),!this.max&&this.levelValues&&this.levelValues.length>0){const s=this.levelValues.slice(-1)[0];let e=1.05;this.value>s&&(e=1.2),this.max=Math.floor(s*e)}this.value>this.max&&(this.currentLevelAdjustedValue=100)}setValuePercentage(){if(this.valuepercentage=this.value/this.max*100,this.progresspercentage=(this.value-this.min)/(this.max-this.min)*100,this.progresspercentage<0&&(this.min=this.levelValues&&this.levelValues.length&&this.levelValues[0]<this.value?Math.floor(.95*this.levelValues[0]):Math.floor(.95*this.value)),this.progresspercentage>100){this.progresspercentage=100;const s=this.levelValues.slice(-1)[0];let e=1.05;this.value>s&&(e=1.2),this.max=Math.floor(s*e)}}iconColor(){switch(this.theme){case"red":return"coral700";case"blue":default:return"blue700"}}render(){return e(r,null,e("div",{class:"bonusprogressbar-top"},this.icon?e("div",{class:"bonusprogressbar-top-icon"},e("pn-icon",{symbol:this.icon,small:"false",color:this.iconColor()})):{},e("div",{class:"bonusprogressbar-top-heading"},e("h4",{class:"bonusprogressbar-top-headline"},this.heading),this.sumtext?e("div",{class:"bonusprogressbar-sumtext"},this.sumtext):null),e("strong",{class:"bonusprogressbar-top-percentage"},this.bonuspercentage)),e("div",{class:"bonusprogressbar-wrapper"},e("progress",{class:"bonusprogressbar-progress",value:this.progresspercentage,max:"100"}),e("pn-bonus-progressbar-level",{current:!0,value:this.value,visualpercentage:this.currentLevelAdjustedValue,bonuspercentage:this.bonuspercentage}),e("slot",null)))}get hostElement(){return t(this)}static get watchers(){return{currentLevelAdjustedValue:["setValuePercentage"],value:["setValuePercentage"],min:["setValuePercentage"],max:["setValuePercentage"]}}};o.style="pn-bonus-progressbar{width:100%}.bonusprogressbar-top{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:1.6rem}.bonusprogressbar-top-icon{border-radius:100%;height:5rem;width:5rem;padding:1rem;display:-ms-inline-flexbox;display:inline-flex;margin-right:1em;margin-left:0.5em;background-color:#E0F8FF}[theme=red] .bonusprogressbar-top-icon{background-color:#FBC2C1}.bonusprogressbar-top-icon pn-icon svg{width:100%;height:100%}.bonusprogressbar-sumtext{margin-top:0.4rem;font-size:1.3rem;color:#5E554A}.bonusprogressbar-top-percentage{margin-left:auto;padding:0.5em}.bonusprogressbar-wrapper{position:relative;display:-ms-flexbox;display:flex;min-height:5em;-ms-flex-align:center;align-items:center}.bonusprogressbar-currentlevel{position:absolute}.bonusprogressbar-progress[value]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:1.7rem;border:0.1rem solid #00A0D6;border-radius:1.7rem;padding:0;margin:0;overflow:hidden}[theme=red] .bonusprogressbar-progress[value]{border-color:#F06365}.bonusprogressbar-progress[value]::-webkit-progress-bar{border:0;border-radius:1.7rem;margin:0;padding:0;background:#E0F8FF}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-bar{background:#FDEFEE}.bonusprogressbar-progress[value]::-webkit-progress-value{margin:0;padding:0;border-radius:1.7rem;background:#00A0D6}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-value{background:#F06365}";export{o as pn_bonus_progressbar}
@@ -1 +1 @@
1
- System.register(["./p-36654f2a.system.js"],(function(){"use strict";var e,n,t,a,i,s;return{setters:[function(r){e=r.d;n=r.N;t=r.w;a=r.p;i=r.H;s=r.b}],execute:function(){var r=function(){{o(i.prototype)}var s=Array.from(e.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(n,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===n}));var r={};if("onbeforeload"in s&&!history.scrollRestoration){return{then:function(){}}}{r.resourcesUrl=new URL(".",new URL(s.getAttribute("data-resources-url")||s.src,t.location.href)).href}return a(r)};var o=function(e){var n=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return n.call(this,e)}var t=n.call(this,false);var a=this.childNodes;if(e){for(var i=0;i<a.length;i++){if(a[i].nodeType!==2){t.appendChild(a[i].cloneNode(true))}}}return t}};r().then((function(e){return s([["p-9861b726.system",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],environment:[1537],userToken:[1,"user-token"],userFullname:[1,"user-fullname"],userLoggedin:[516,"user-loggedin"],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],showProfileSelection:[1540,"show-profile-selection"],siteDomainInUrls:[4,"site-domain-in-urls"],AutocompleteEndpoint:[1,"autocomplete-endpoint"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-bc22baf1.system",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-8144bcbc.system",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["p-fecc53bb.system",[[4,"pn-product-pricelist",{source:[1],language:[1025],market:[1025],productid:[1],filteredItems:[32],sourceData:[32],gotData:[32],loading:[32],postagetype:[32],weight:[32],weightvalue:[32]}]]],["p-723b9901.system",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[32]}]]],["p-7422abda.system",[[4,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-725ada5f.system",[[4,"pn-bonus-progressbar",{icon:[1],heading:[1],sumtext:[513],theme:[513],bonuspercentage:[1],currency:[513],value:[1538],min:[1538],max:[1538],valuepercentage:[32],progresspercentage:[32],levelValues:[32],currentLevelAdjustedValue:[32]}]]],["p-2da8e5e8.system",[[0,"pn-pex-pricefinder",{language:[1],currency:[1],apiUrl:[1,"api-url"],i18n:[32],fromzip:[32],tozip:[32],weight:[32],when:[32],response:[32]},[[0,"language","setLanguage"]]]]],["p-4f67721e.system",[[4,"pn-customernumber-selector",{language:[1537],open:[1540],heading:[1],description:[1],i18n:[32]}]]],["p-e6fa11ad.system",[[4,"pn-customernumber-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-2718b89a.system",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-80dce81e.system",[[1,"pn-marketweb-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],list:[1],value:[1],label:[1],loading:[4],button:[1],light:[4],suggestionObserver:[32],hasClonedInput:[32],listSuggestion:[32]},[[0,"input","inputHandler"]]]]],["p-290d5824.system",[[4,"pn-product-tile"]]],["p-74d35edf.system",[[4,"pn-profile-modal",{heading:[1],continueCtaText:[1,"continue-cta-text"],choosenCompanyText:[1,"choosen-company-text"],toText:[1,"to-text"],chooseCustomerNumberText:[1,"choose-customer-number-text"],isLoading:[32]},[[0,"urlSelected","onUrlSelected"]]]]],["p-aa271997.system",[[4,"pn-profile-modal-customernumber",{url:[513],customernumber:[513],selected:[516]}]]],["p-7b9fb94f.system",[[4,"pn-profile-modal-profile",{heading:[513],description:[513],url:[513],selected:[1028],showCustomerNumbers:[516,"show-customer-numbers"],pleaseSelectText:[513,"please-select-text"],visible:[1540],identifier:[32]}]]],["p-58a57436.system",[[4,"pn-profile-modal-type",{typeid:[513],name:[1025],selected:[1028],selectedprofile:[1025]}]]],["p-450cbe76.system",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],heading:[1],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["p-93cecc43.system",[[0,"pn-profile-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-a247058b.system",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-885bc8d7.system",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["p-625fb7fb.system",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["p-b88337dd.system",[[4,"pn-sidenav-togglebutton",{label:[1],i18n:[32]}]]],["p-8117b79e.system",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-059e4c47.system",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["p-9edaf6b6.system",[[0,"pn-marketweb-input",{disabled:[4],error:[1],invalid:[4],helpertext:[1],label:[1],placeholder:[1],inputid:[1],name:[1],required:[4],type:[1025],autocomplete:[1],valid:[4],value:[1],maxlength:[1],min:[1],max:[1],step:[1],pattern:[1],showText:[32]}]]],["p-5b750c06.system",[[0,"pn-product-card-info",{rulle:[1],paket:[1],label:[1],text:[1]}],[0,"pn-product-card-price",{label:[1],amount:[1],currency:[1],note:[1],url:[1],service:[1],linkid:[1]}],[4,"pn-titletag",{icon:[1],color:[1537]}],[4,"pn-product-card"]]],["p-e4a4e68f.system",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],Usp1:[1,"usp-1"],Usp2:[1,"usp-2"],Usp3:[1,"usp-3"],description:[16],showMeasurement:[4,"show-measurement"],weightText:[32],linkId:[32],shopLabel:[32],shopUrl:[32],shopId:[32]}]]],["p-c2a4803f.system",[[4,"pn-site-footer",{url:[1],linktitle:[1]}],[4,"pn-site-footer-col"]]],["p-1ce871c5.system",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-fc1083d2.system",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["p-da7f1b66.system",[[0,"pn-marketweb-siteheader-login-links",{loginDialog:[1040],loginManager:[16],idNamespace:[1,"id-namespace"],loggedin:[516],username:[1]}],[0,"pn-marketweb-siteheader-login-profileselection",{loginDialog:[1040],loginManager:[16],endpoint:[1],loggedin:[4],idNamespace:[1,"id-namespace"],heading:[1],i18n:[16],currentProfile:[1040],profileoptions:[1040],user:[32],logoutLink:[32],userName:[32],userEmail:[32]}]]],["p-a921d3fd.system",[[0,"pn-product-tile-info",{label:[1],text:[1],icon:[1]}],[0,"pn-product-tile-price",{label:[1],amount:[1],currency:[1],url:[1]}]]],["p-e66a8bb8.system",[[0,"pn-marketweb-siteheader-login-linklist",{heading:[1],links:[16],idNamespace:[1,"id-namespace"],loginManager:[16]}]]],["p-d41f52cb.system",[[0,"pn-marketweb-siteheader-login",{endpoint:[1],token:[1],i18n:[16],emitEvents:[4,"emit-events"],loginDialog:[1040],fullname:[1],loggedin:[4],showProfileSelection:[1028,"show-profile-selection"],loginManager:[32],loginLinks:[32],toggleButtonText:[32],username:[32]}],[4,"pn-mainnav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],listCount:[32],alignment:[32]}],[4,"pn-language-selector",{value:[1537],selectedLanguageName:[32],options:[32],i18n:[32]}],[0,"pn-language-selector-option",{name:[1],code:[1],url:[1],selected:[4],currentLanguage:[1,"current-language"]}],[4,"pn-mainnav",{market:[1],language:[1],navigationId:[1,"navigation-id"],openMenu:[1028,"open-menu"],navLabel:[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{heading:[1],linkCount:[32]}],[0,"pn-marketweb-siteheader-search",{i18n:[8,"i-1-8n"],showOnlyLink:[1028,"show-only-link"],hideSearch:[1028,"hide-search"],language:[1537],search:[1040],primary:[4],autoCompleteOptions:[32]}],[4,"pn-site-selector",{buttontext:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]]],e)}))}}}));
1
+ System.register(["./p-36654f2a.system.js"],(function(){"use strict";var e,n,t,a,i,s;return{setters:[function(r){e=r.d;n=r.N;t=r.w;a=r.p;i=r.H;s=r.b}],execute:function(){var r=function(){{o(i.prototype)}var s=Array.from(e.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(n,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===n}));var r={};if("onbeforeload"in s&&!history.scrollRestoration){return{then:function(){}}}{r.resourcesUrl=new URL(".",new URL(s.getAttribute("data-resources-url")||s.src,t.location.href)).href}return a(r)};var o=function(e){var n=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return n.call(this,e)}var t=n.call(this,false);var a=this.childNodes;if(e){for(var i=0;i<a.length;i++){if(a[i].nodeType!==2){t.appendChild(a[i].cloneNode(true))}}}return t}};r().then((function(e){return s([["p-9861b726.system",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],environment:[1537],userToken:[1,"user-token"],userFullname:[1,"user-fullname"],userLoggedin:[516,"user-loggedin"],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],showProfileSelection:[1540,"show-profile-selection"],siteDomainInUrls:[4,"site-domain-in-urls"],AutocompleteEndpoint:[1,"autocomplete-endpoint"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-bc22baf1.system",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-8144bcbc.system",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["p-fecc53bb.system",[[4,"pn-product-pricelist",{source:[1],language:[1025],market:[1025],productid:[1],filteredItems:[32],sourceData:[32],gotData:[32],loading:[32],postagetype:[32],weight:[32],weightvalue:[32]}]]],["p-723b9901.system",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[32]}]]],["p-7422abda.system",[[4,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-6ad8fdad.system",[[4,"pn-bonus-progressbar",{icon:[1],heading:[1],sumtext:[513],theme:[513],bonuspercentage:[1],currency:[513],value:[1538],min:[1538],max:[1538],valuepercentage:[32],progresspercentage:[32],levelValues:[32],currentLevelAdjustedValue:[32]}]]],["p-2da8e5e8.system",[[0,"pn-pex-pricefinder",{language:[1],currency:[1],apiUrl:[1,"api-url"],i18n:[32],fromzip:[32],tozip:[32],weight:[32],when:[32],response:[32]},[[0,"language","setLanguage"]]]]],["p-4f67721e.system",[[4,"pn-customernumber-selector",{language:[1537],open:[1540],heading:[1],description:[1],i18n:[32]}]]],["p-e6fa11ad.system",[[4,"pn-customernumber-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-2718b89a.system",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-80dce81e.system",[[1,"pn-marketweb-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],list:[1],value:[1],label:[1],loading:[4],button:[1],light:[4],suggestionObserver:[32],hasClonedInput:[32],listSuggestion:[32]},[[0,"input","inputHandler"]]]]],["p-290d5824.system",[[4,"pn-product-tile"]]],["p-74d35edf.system",[[4,"pn-profile-modal",{heading:[1],continueCtaText:[1,"continue-cta-text"],choosenCompanyText:[1,"choosen-company-text"],toText:[1,"to-text"],chooseCustomerNumberText:[1,"choose-customer-number-text"],isLoading:[32]},[[0,"urlSelected","onUrlSelected"]]]]],["p-aa271997.system",[[4,"pn-profile-modal-customernumber",{url:[513],customernumber:[513],selected:[516]}]]],["p-7b9fb94f.system",[[4,"pn-profile-modal-profile",{heading:[513],description:[513],url:[513],selected:[1028],showCustomerNumbers:[516,"show-customer-numbers"],pleaseSelectText:[513,"please-select-text"],visible:[1540],identifier:[32]}]]],["p-58a57436.system",[[4,"pn-profile-modal-type",{typeid:[513],name:[1025],selected:[1028],selectedprofile:[1025]}]]],["p-450cbe76.system",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],heading:[1],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["p-93cecc43.system",[[0,"pn-profile-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-a247058b.system",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-885bc8d7.system",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["p-625fb7fb.system",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["p-b88337dd.system",[[4,"pn-sidenav-togglebutton",{label:[1],i18n:[32]}]]],["p-8117b79e.system",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-059e4c47.system",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["p-9edaf6b6.system",[[0,"pn-marketweb-input",{disabled:[4],error:[1],invalid:[4],helpertext:[1],label:[1],placeholder:[1],inputid:[1],name:[1],required:[4],type:[1025],autocomplete:[1],valid:[4],value:[1],maxlength:[1],min:[1],max:[1],step:[1],pattern:[1],showText:[32]}]]],["p-5b750c06.system",[[0,"pn-product-card-info",{rulle:[1],paket:[1],label:[1],text:[1]}],[0,"pn-product-card-price",{label:[1],amount:[1],currency:[1],note:[1],url:[1],service:[1],linkid:[1]}],[4,"pn-titletag",{icon:[1],color:[1537]}],[4,"pn-product-card"]]],["p-e4a4e68f.system",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],Usp1:[1,"usp-1"],Usp2:[1,"usp-2"],Usp3:[1,"usp-3"],description:[16],showMeasurement:[4,"show-measurement"],weightText:[32],linkId:[32],shopLabel:[32],shopUrl:[32],shopId:[32]}]]],["p-c2a4803f.system",[[4,"pn-site-footer",{url:[1],linktitle:[1]}],[4,"pn-site-footer-col"]]],["p-1ce871c5.system",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-fc1083d2.system",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["p-da7f1b66.system",[[0,"pn-marketweb-siteheader-login-links",{loginDialog:[1040],loginManager:[16],idNamespace:[1,"id-namespace"],loggedin:[516],username:[1]}],[0,"pn-marketweb-siteheader-login-profileselection",{loginDialog:[1040],loginManager:[16],endpoint:[1],loggedin:[4],idNamespace:[1,"id-namespace"],heading:[1],i18n:[16],currentProfile:[1040],profileoptions:[1040],user:[32],logoutLink:[32],userName:[32],userEmail:[32]}]]],["p-a921d3fd.system",[[0,"pn-product-tile-info",{label:[1],text:[1],icon:[1]}],[0,"pn-product-tile-price",{label:[1],amount:[1],currency:[1],url:[1]}]]],["p-e66a8bb8.system",[[0,"pn-marketweb-siteheader-login-linklist",{heading:[1],links:[16],idNamespace:[1,"id-namespace"],loginManager:[16]}]]],["p-d41f52cb.system",[[0,"pn-marketweb-siteheader-login",{endpoint:[1],token:[1],i18n:[16],emitEvents:[4,"emit-events"],loginDialog:[1040],fullname:[1],loggedin:[4],showProfileSelection:[1028,"show-profile-selection"],loginManager:[32],loginLinks:[32],toggleButtonText:[32],username:[32]}],[4,"pn-mainnav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],listCount:[32],alignment:[32]}],[4,"pn-language-selector",{value:[1537],selectedLanguageName:[32],options:[32],i18n:[32]}],[0,"pn-language-selector-option",{name:[1],code:[1],url:[1],selected:[4],currentLanguage:[1,"current-language"]}],[4,"pn-mainnav",{market:[1],language:[1],navigationId:[1,"navigation-id"],openMenu:[1028,"open-menu"],navLabel:[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{heading:[1],linkCount:[32]}],[0,"pn-marketweb-siteheader-search",{i18n:[8,"i-1-8n"],showOnlyLink:[1028,"show-only-link"],hideSearch:[1028,"hide-search"],language:[1537],search:[1040],primary:[4],autoCompleteOptions:[32]}],[4,"pn-site-selector",{buttontext:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]]],e)}))}}}));
@@ -1 +1 @@
1
- System.register(["./p-36654f2a.system.js"],(function(e){"use strict";var r,s,t,a;return{setters:[function(e){r=e.r;s=e.h;t=e.a;a=e.g}],execute:function(){var o="pn-bonus-progressbar{width:100%}.bonusprogressbar-top{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:1.6rem}.bonusprogressbar-top-icon{border-radius:100%;height:5rem;width:5rem;padding:1rem;display:-ms-inline-flexbox;display:inline-flex;margin-right:1em;margin-left:0.5em;background-color:#E0F8FF}[theme=red] .bonusprogressbar-top-icon{background-color:#FBC2C1}.bonusprogressbar-top-icon pn-icon svg{width:100%;height:100%}.bonusprogressbar-sumtext{margin-top:0.4rem;font-size:1.3rem;color:#5E554A}.bonusprogressbar-top-percentage{margin-left:auto;padding:0.5em}.bonusprogressbar-wrapper{position:relative;display:-ms-flexbox;display:flex;min-height:5em;-ms-flex-align:center;align-items:center}.bonusprogressbar-currentlevel{position:absolute}.bonusprogressbar-progress[value]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:1.7rem;border:0.1rem solid #00A0D6;border-radius:1.7rem;padding:0;margin:0;overflow:hidden}[theme=red] .bonusprogressbar-progress[value]{border-color:#F06365}.bonusprogressbar-progress[value]::-webkit-progress-bar{border:0;border-radius:1.7rem;margin:0;padding:0;background:#E0F8FF}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-bar{background:#FDEFEE}.bonusprogressbar-progress[value]::-webkit-progress-value{margin:0;padding:0;border-radius:1.7rem;background:#00A0D6}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-value{background:#F06365}";var n=e("pn_bonus_progressbar",function(){function e(e){r(this,e);this.icon=null;this.heading="";this.sumtext=null;this.theme="blue";this.bonuspercentage="0%";this.currency="kr";this.value=0;this.min=0;this.max=0;this.valuepercentage=0;this.progresspercentage=0;this.levelValues=[];this.currentLevelAdjustedValue=0}e.prototype.componentWillLoad=function(){this.setInitialValues();this.setValuePercentage()};e.prototype.setInitialValues=function(){var e=Array.from(this.hostElement.querySelectorAll("pn-bonus-progressbar-level:not([current])"));this.currentLevelAdjustedValue=this.value;this.levelValues=e.map((function(e){return parseInt(e.getAttribute("value"),10)}));if(!this.max){if(this.levelValues&&this.levelValues.length>0){var r=this.levelValues.slice(-1)[0];this.max=Math.floor(r*1.05)}}if(this.value>this.max){this.currentLevelAdjustedValue=100}};e.prototype.setValuePercentage=function(){this.valuepercentage=this.value/this.max*100;this.progresspercentage=(this.value-this.min)/(this.max-this.min)*100;if(this.progresspercentage<0){if(this.levelValues&&this.levelValues.length&&this.levelValues[0]<this.value){this.min=Math.floor(this.levelValues[0]*.95)}else{this.min=Math.floor(this.value*.95)}}if(this.progresspercentage>100){this.progresspercentage=100;var e=this.levelValues.slice(-1)[0];this.max=Math.floor(e*1.05)}};e.prototype.iconColor=function(){switch(this.theme){case"red":return"coral700";case"blue":default:return"blue700"}};e.prototype.render=function(){return s(t,null,s("div",{class:"bonusprogressbar-top"},this.icon?s("div",{class:"bonusprogressbar-top-icon"},s("pn-icon",{symbol:this.icon,small:"false",color:this.iconColor()})):{},s("div",{class:"bonusprogressbar-top-heading"},s("h4",{class:"bonusprogressbar-top-headline"},this.heading),this.sumtext?s("div",{class:"bonusprogressbar-sumtext"},this.sumtext):null),s("strong",{class:"bonusprogressbar-top-percentage"},this.bonuspercentage)),s("div",{class:"bonusprogressbar-wrapper"},s("progress",{class:"bonusprogressbar-progress",value:this.progresspercentage,max:"100"}),s("pn-bonus-progressbar-level",{current:true,value:this.value,visualpercentage:this.currentLevelAdjustedValue,bonuspercentage:this.bonuspercentage}),s("slot",null)))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{currentLevelAdjustedValue:["setValuePercentage"],value:["setValuePercentage"],min:["setValuePercentage"],max:["setValuePercentage"]}},enumerable:false,configurable:true});return e}());n.style=o}}}));
1
+ System.register(["./p-36654f2a.system.js"],(function(e){"use strict";var r,s,t,a;return{setters:[function(e){r=e.r;s=e.h;t=e.a;a=e.g}],execute:function(){var o="pn-bonus-progressbar{width:100%}.bonusprogressbar-top{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:1.6rem}.bonusprogressbar-top-icon{border-radius:100%;height:5rem;width:5rem;padding:1rem;display:-ms-inline-flexbox;display:inline-flex;margin-right:1em;margin-left:0.5em;background-color:#E0F8FF}[theme=red] .bonusprogressbar-top-icon{background-color:#FBC2C1}.bonusprogressbar-top-icon pn-icon svg{width:100%;height:100%}.bonusprogressbar-sumtext{margin-top:0.4rem;font-size:1.3rem;color:#5E554A}.bonusprogressbar-top-percentage{margin-left:auto;padding:0.5em}.bonusprogressbar-wrapper{position:relative;display:-ms-flexbox;display:flex;min-height:5em;-ms-flex-align:center;align-items:center}.bonusprogressbar-currentlevel{position:absolute}.bonusprogressbar-progress[value]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:1.7rem;border:0.1rem solid #00A0D6;border-radius:1.7rem;padding:0;margin:0;overflow:hidden}[theme=red] .bonusprogressbar-progress[value]{border-color:#F06365}.bonusprogressbar-progress[value]::-webkit-progress-bar{border:0;border-radius:1.7rem;margin:0;padding:0;background:#E0F8FF}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-bar{background:#FDEFEE}.bonusprogressbar-progress[value]::-webkit-progress-value{margin:0;padding:0;border-radius:1.7rem;background:#00A0D6}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-value{background:#F06365}";var n=e("pn_bonus_progressbar",function(){function e(e){r(this,e);this.icon=null;this.heading="";this.sumtext=null;this.theme="blue";this.bonuspercentage="0%";this.currency="kr";this.value=0;this.min=0;this.max=0;this.valuepercentage=0;this.progresspercentage=0;this.levelValues=[];this.currentLevelAdjustedValue=0}e.prototype.componentWillLoad=function(){this.setInitialValues();this.setValuePercentage()};e.prototype.setInitialValues=function(){var e=Array.from(this.hostElement.querySelectorAll("pn-bonus-progressbar-level:not([current])"));this.currentLevelAdjustedValue=this.value;this.levelValues=e.map((function(e){return parseInt(e.getAttribute("value"),10)}));if(!this.max){if(this.levelValues&&this.levelValues.length>0){var r=this.levelValues.slice(-1)[0];var s=1.05;if(this.value>r){s=1.2}this.max=Math.floor(r*s)}}if(this.value>this.max){this.currentLevelAdjustedValue=100}};e.prototype.setValuePercentage=function(){this.valuepercentage=this.value/this.max*100;this.progresspercentage=(this.value-this.min)/(this.max-this.min)*100;if(this.progresspercentage<0){if(this.levelValues&&this.levelValues.length&&this.levelValues[0]<this.value){this.min=Math.floor(this.levelValues[0]*.95)}else{this.min=Math.floor(this.value*.95)}}if(this.progresspercentage>100){this.progresspercentage=100;var e=this.levelValues.slice(-1)[0];var r=1.05;if(this.value>e){r=1.2}this.max=Math.floor(e*r)}};e.prototype.iconColor=function(){switch(this.theme){case"red":return"coral700";case"blue":default:return"blue700"}};e.prototype.render=function(){return s(t,null,s("div",{class:"bonusprogressbar-top"},this.icon?s("div",{class:"bonusprogressbar-top-icon"},s("pn-icon",{symbol:this.icon,small:"false",color:this.iconColor()})):{},s("div",{class:"bonusprogressbar-top-heading"},s("h4",{class:"bonusprogressbar-top-headline"},this.heading),this.sumtext?s("div",{class:"bonusprogressbar-sumtext"},this.sumtext):null),s("strong",{class:"bonusprogressbar-top-percentage"},this.bonuspercentage)),s("div",{class:"bonusprogressbar-wrapper"},s("progress",{class:"bonusprogressbar-progress",value:this.progresspercentage,max:"100"}),s("pn-bonus-progressbar-level",{current:true,value:this.value,visualpercentage:this.currentLevelAdjustedValue,bonuspercentage:this.bonuspercentage}),s("slot",null)))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{currentLevelAdjustedValue:["setValuePercentage"],value:["setValuePercentage"],min:["setValuePercentage"],max:["setValuePercentage"]}},enumerable:false,configurable:true});return e}());n.style=o}}}));
@@ -1 +1 @@
1
- import{d as e,N as n,w as a,p as t,H as i,b as o}from"./p-58e8d7d5.js";const r=e=>{const n=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return n.call(this,e);const a=n.call(this,!1),t=this.childNodes;if(e)for(let n=0;n<t.length;n++)2!==t[n].nodeType&&a.appendChild(t[n].cloneNode(!0));return a}};(()=>{r(i.prototype);const o=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${n}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===n)),l={};return"onbeforeload"in o&&!history.scrollRestoration?{then(){}}:(l.resourcesUrl=new URL(".",new URL(o.getAttribute("data-resources-url")||o.src,a.location.href)).href,t(l))})().then((e=>o([["p-3071fac7",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],environment:[1537],userToken:[1,"user-token"],userFullname:[1,"user-fullname"],userLoggedin:[516,"user-loggedin"],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],showProfileSelection:[1540,"show-profile-selection"],siteDomainInUrls:[4,"site-domain-in-urls"],AutocompleteEndpoint:[1,"autocomplete-endpoint"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-513e3c62",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-774b7a9f",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["p-b32a8507",[[4,"pn-product-pricelist",{source:[1],language:[1025],market:[1025],productid:[1],filteredItems:[32],sourceData:[32],gotData:[32],loading:[32],postagetype:[32],weight:[32],weightvalue:[32]}]]],["p-17c4004f",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[32]}]]],["p-189ef99c",[[4,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-12d37783",[[4,"pn-bonus-progressbar",{icon:[1],heading:[1],sumtext:[513],theme:[513],bonuspercentage:[1],currency:[513],value:[1538],min:[1538],max:[1538],valuepercentage:[32],progresspercentage:[32],levelValues:[32],currentLevelAdjustedValue:[32]}]]],["p-381b3ec0",[[0,"pn-pex-pricefinder",{language:[1],currency:[1],apiUrl:[1,"api-url"],i18n:[32],fromzip:[32],tozip:[32],weight:[32],when:[32],response:[32]},[[0,"language","setLanguage"]]]]],["p-0796f9b2",[[4,"pn-customernumber-selector",{language:[1537],open:[1540],heading:[1],description:[1],i18n:[32]}]]],["p-e32dc098",[[4,"pn-customernumber-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-81d764a0",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-e9fe5c54",[[1,"pn-marketweb-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],list:[1],value:[1],label:[1],loading:[4],button:[1],light:[4],suggestionObserver:[32],hasClonedInput:[32],listSuggestion:[32]},[[0,"input","inputHandler"]]]]],["p-d0155ddf",[[4,"pn-product-tile"]]],["p-fc974bca",[[4,"pn-profile-modal",{heading:[1],continueCtaText:[1,"continue-cta-text"],choosenCompanyText:[1,"choosen-company-text"],toText:[1,"to-text"],chooseCustomerNumberText:[1,"choose-customer-number-text"],isLoading:[32]},[[0,"urlSelected","onUrlSelected"]]]]],["p-e9576f26",[[4,"pn-profile-modal-customernumber",{url:[513],customernumber:[513],selected:[516]}]]],["p-16c4bc50",[[4,"pn-profile-modal-profile",{heading:[513],description:[513],url:[513],selected:[1028],showCustomerNumbers:[516,"show-customer-numbers"],pleaseSelectText:[513,"please-select-text"],visible:[1540],identifier:[32]}]]],["p-fea72975",[[4,"pn-profile-modal-type",{typeid:[513],name:[1025],selected:[1028],selectedprofile:[1025]}]]],["p-bd22aaac",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],heading:[1],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["p-a7bb94a0",[[0,"pn-profile-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-88185835",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-227e1d46",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["p-f774e2cc",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["p-67380aa4",[[4,"pn-sidenav-togglebutton",{label:[1],i18n:[32]}]]],["p-61dbe832",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-e8d97347",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["p-996d8a6a",[[0,"pn-marketweb-input",{disabled:[4],error:[1],invalid:[4],helpertext:[1],label:[1],placeholder:[1],inputid:[1],name:[1],required:[4],type:[1025],autocomplete:[1],valid:[4],value:[1],maxlength:[1],min:[1],max:[1],step:[1],pattern:[1],showText:[32]}]]],["p-f1812fbb",[[0,"pn-product-card-info",{rulle:[1],paket:[1],label:[1],text:[1]}],[0,"pn-product-card-price",{label:[1],amount:[1],currency:[1],note:[1],url:[1],service:[1],linkid:[1]}],[4,"pn-titletag",{icon:[1],color:[1537]}],[4,"pn-product-card"]]],["p-3ae38e63",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],Usp1:[1,"usp-1"],Usp2:[1,"usp-2"],Usp3:[1,"usp-3"],description:[16],showMeasurement:[4,"show-measurement"],weightText:[32],linkId:[32],shopLabel:[32],shopUrl:[32],shopId:[32]}]]],["p-414dc33c",[[4,"pn-site-footer",{url:[1],linktitle:[1]}],[4,"pn-site-footer-col"]]],["p-15112837",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-715d1ef7",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["p-a6a2a32d",[[0,"pn-marketweb-siteheader-login-links",{loginDialog:[1040],loginManager:[16],idNamespace:[1,"id-namespace"],loggedin:[516],username:[1]}],[0,"pn-marketweb-siteheader-login-profileselection",{loginDialog:[1040],loginManager:[16],endpoint:[1],loggedin:[4],idNamespace:[1,"id-namespace"],heading:[1],i18n:[16],currentProfile:[1040],profileoptions:[1040],user:[32],logoutLink:[32],userName:[32],userEmail:[32]}]]],["p-8e146205",[[0,"pn-product-tile-info",{label:[1],text:[1],icon:[1]}],[0,"pn-product-tile-price",{label:[1],amount:[1],currency:[1],url:[1]}]]],["p-08411f5e",[[0,"pn-marketweb-siteheader-login-linklist",{heading:[1],links:[16],idNamespace:[1,"id-namespace"],loginManager:[16]}]]],["p-cd41da3d",[[0,"pn-marketweb-siteheader-login",{endpoint:[1],token:[1],i18n:[16],emitEvents:[4,"emit-events"],loginDialog:[1040],fullname:[1],loggedin:[4],showProfileSelection:[1028,"show-profile-selection"],loginManager:[32],loginLinks:[32],toggleButtonText:[32],username:[32]}],[4,"pn-mainnav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],listCount:[32],alignment:[32]}],[4,"pn-language-selector",{value:[1537],selectedLanguageName:[32],options:[32],i18n:[32]}],[0,"pn-language-selector-option",{name:[1],code:[1],url:[1],selected:[4],currentLanguage:[1,"current-language"]}],[4,"pn-mainnav",{market:[1],language:[1],navigationId:[1,"navigation-id"],openMenu:[1028,"open-menu"],navLabel:[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{heading:[1],linkCount:[32]}],[0,"pn-marketweb-siteheader-search",{i18n:[8,"i-1-8n"],showOnlyLink:[1028,"show-only-link"],hideSearch:[1028,"hide-search"],language:[1537],search:[1040],primary:[4],autoCompleteOptions:[32]}],[4,"pn-site-selector",{buttontext:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]]],e)));
1
+ import{d as e,N as n,w as a,p as t,H as i,b as o}from"./p-58e8d7d5.js";const r=e=>{const n=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return n.call(this,e);const a=n.call(this,!1),t=this.childNodes;if(e)for(let n=0;n<t.length;n++)2!==t[n].nodeType&&a.appendChild(t[n].cloneNode(!0));return a}};(()=>{r(i.prototype);const o=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${n}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===n)),l={};return"onbeforeload"in o&&!history.scrollRestoration?{then(){}}:(l.resourcesUrl=new URL(".",new URL(o.getAttribute("data-resources-url")||o.src,a.location.href)).href,t(l))})().then((e=>o([["p-3071fac7",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],environment:[1537],userToken:[1,"user-token"],userFullname:[1,"user-fullname"],userLoggedin:[516,"user-loggedin"],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],showProfileSelection:[1540,"show-profile-selection"],siteDomainInUrls:[4,"site-domain-in-urls"],AutocompleteEndpoint:[1,"autocomplete-endpoint"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-513e3c62",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-774b7a9f",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["p-b32a8507",[[4,"pn-product-pricelist",{source:[1],language:[1025],market:[1025],productid:[1],filteredItems:[32],sourceData:[32],gotData:[32],loading:[32],postagetype:[32],weight:[32],weightvalue:[32]}]]],["p-17c4004f",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[32]}]]],["p-189ef99c",[[4,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-58115ce6",[[4,"pn-bonus-progressbar",{icon:[1],heading:[1],sumtext:[513],theme:[513],bonuspercentage:[1],currency:[513],value:[1538],min:[1538],max:[1538],valuepercentage:[32],progresspercentage:[32],levelValues:[32],currentLevelAdjustedValue:[32]}]]],["p-381b3ec0",[[0,"pn-pex-pricefinder",{language:[1],currency:[1],apiUrl:[1,"api-url"],i18n:[32],fromzip:[32],tozip:[32],weight:[32],when:[32],response:[32]},[[0,"language","setLanguage"]]]]],["p-0796f9b2",[[4,"pn-customernumber-selector",{language:[1537],open:[1540],heading:[1],description:[1],i18n:[32]}]]],["p-e32dc098",[[4,"pn-customernumber-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-81d764a0",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-e9fe5c54",[[1,"pn-marketweb-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],list:[1],value:[1],label:[1],loading:[4],button:[1],light:[4],suggestionObserver:[32],hasClonedInput:[32],listSuggestion:[32]},[[0,"input","inputHandler"]]]]],["p-d0155ddf",[[4,"pn-product-tile"]]],["p-fc974bca",[[4,"pn-profile-modal",{heading:[1],continueCtaText:[1,"continue-cta-text"],choosenCompanyText:[1,"choosen-company-text"],toText:[1,"to-text"],chooseCustomerNumberText:[1,"choose-customer-number-text"],isLoading:[32]},[[0,"urlSelected","onUrlSelected"]]]]],["p-e9576f26",[[4,"pn-profile-modal-customernumber",{url:[513],customernumber:[513],selected:[516]}]]],["p-16c4bc50",[[4,"pn-profile-modal-profile",{heading:[513],description:[513],url:[513],selected:[1028],showCustomerNumbers:[516,"show-customer-numbers"],pleaseSelectText:[513,"please-select-text"],visible:[1540],identifier:[32]}]]],["p-fea72975",[[4,"pn-profile-modal-type",{typeid:[513],name:[1025],selected:[1028],selectedprofile:[1025]}]]],["p-bd22aaac",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],heading:[1],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["p-a7bb94a0",[[0,"pn-profile-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-88185835",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-227e1d46",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["p-f774e2cc",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["p-67380aa4",[[4,"pn-sidenav-togglebutton",{label:[1],i18n:[32]}]]],["p-61dbe832",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-e8d97347",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["p-996d8a6a",[[0,"pn-marketweb-input",{disabled:[4],error:[1],invalid:[4],helpertext:[1],label:[1],placeholder:[1],inputid:[1],name:[1],required:[4],type:[1025],autocomplete:[1],valid:[4],value:[1],maxlength:[1],min:[1],max:[1],step:[1],pattern:[1],showText:[32]}]]],["p-f1812fbb",[[0,"pn-product-card-info",{rulle:[1],paket:[1],label:[1],text:[1]}],[0,"pn-product-card-price",{label:[1],amount:[1],currency:[1],note:[1],url:[1],service:[1],linkid:[1]}],[4,"pn-titletag",{icon:[1],color:[1537]}],[4,"pn-product-card"]]],["p-3ae38e63",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],Usp1:[1,"usp-1"],Usp2:[1,"usp-2"],Usp3:[1,"usp-3"],description:[16],showMeasurement:[4,"show-measurement"],weightText:[32],linkId:[32],shopLabel:[32],shopUrl:[32],shopId:[32]}]]],["p-414dc33c",[[4,"pn-site-footer",{url:[1],linktitle:[1]}],[4,"pn-site-footer-col"]]],["p-15112837",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-715d1ef7",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["p-a6a2a32d",[[0,"pn-marketweb-siteheader-login-links",{loginDialog:[1040],loginManager:[16],idNamespace:[1,"id-namespace"],loggedin:[516],username:[1]}],[0,"pn-marketweb-siteheader-login-profileselection",{loginDialog:[1040],loginManager:[16],endpoint:[1],loggedin:[4],idNamespace:[1,"id-namespace"],heading:[1],i18n:[16],currentProfile:[1040],profileoptions:[1040],user:[32],logoutLink:[32],userName:[32],userEmail:[32]}]]],["p-8e146205",[[0,"pn-product-tile-info",{label:[1],text:[1],icon:[1]}],[0,"pn-product-tile-price",{label:[1],amount:[1],currency:[1],url:[1]}]]],["p-08411f5e",[[0,"pn-marketweb-siteheader-login-linklist",{heading:[1],links:[16],idNamespace:[1,"id-namespace"],loginManager:[16]}]]],["p-cd41da3d",[[0,"pn-marketweb-siteheader-login",{endpoint:[1],token:[1],i18n:[16],emitEvents:[4,"emit-events"],loginDialog:[1040],fullname:[1],loggedin:[4],showProfileSelection:[1028,"show-profile-selection"],loginManager:[32],loginLinks:[32],toggleButtonText:[32],username:[32]}],[4,"pn-mainnav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],listCount:[32],alignment:[32]}],[4,"pn-language-selector",{value:[1537],selectedLanguageName:[32],options:[32],i18n:[32]}],[0,"pn-language-selector-option",{name:[1],code:[1],url:[1],selected:[4],currentLanguage:[1,"current-language"]}],[4,"pn-mainnav",{market:[1],language:[1],navigationId:[1,"navigation-id"],openMenu:[1028,"open-menu"],navLabel:[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{heading:[1],linkCount:[32]}],[0,"pn-marketweb-siteheader-search",{i18n:[8,"i-1-8n"],showOnlyLink:[1028,"show-only-link"],hideSearch:[1028,"hide-search"],language:[1537],search:[1040],primary:[4],autoCompleteOptions:[32]}],[4,"pn-site-selector",{buttontext:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]]],e)));
@@ -7,10 +7,14 @@
7
7
 
8
8
  const header = document.createElement('pn-marketweb-siteheader');
9
9
  const footer = document.createElement('pn-marketweb-sitefooter');
10
+ let currentLanguage = document.querySelector('html').getAttribute("lang");
11
+ if (currentLanguage === "en-US" || currentLanguage === "en_US") {
12
+ currentLanguage = "en";
13
+ }
10
14
 
11
15
  [header, footer].forEach((comp) => {
12
16
  comp.setAttribute('market', 'dk');
13
- comp.setAttribute('language', 'da');
17
+ comp.setAttribute('language', currentLanguage);
14
18
  comp.setAttribute('site-domain-in-urls', 'true');
15
19
  comp.setAttribute('spa-mode', 'true');
16
20
  })
@@ -20,12 +24,12 @@
20
24
 
21
25
  const s = document.createElement('script');
22
26
  s.setAttribute("type", "module");
23
- s.setAttribute("src", "https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.68/umd/standalone-loader-salesforce.js");
27
+ s.setAttribute("src", "https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.71/umd/standalone-loader-salesforce.js");
24
28
  document.querySelector("head").appendChild(s);
25
29
 
26
30
  const style = document.createElement('link');
27
31
  style.setAttribute("rel", "stylesheet");
28
- style.setAttribute("href", "https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.68/umd/pn-marketweb-wrongrembase.css");
32
+ style.setAttribute("href", "https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.71/umd/pn-marketweb-wrongrembase.css");
29
33
  document.querySelector("head").appendChild(style);
30
34
 
31
35
 
@@ -43,7 +47,7 @@
43
47
  return;
44
48
  }
45
49
  queryParams.set("language", lang);
46
- const newUrl = window.location.origin + window.location.pathname + queryParams.toString();
50
+ let newUrl = window.location.origin + window.location.pathname + '?'+ queryParams.toString();
47
51
  if (newUrl.indexOf("/article/") !== -1) {
48
52
  if (lang === "en_US" && newUrl.indexOf("-da-") !== -1) {
49
53
  newUrl = newUrl.replace("-da-", "-en-");
@@ -52,6 +56,7 @@
52
56
  newUrl = newUrl.replace("-en-", "-da-");
53
57
  }
54
58
  }
59
+ // console.log('newUrl', newUrl)
55
60
  window.location.href = newUrl;
56
61
  });
57
62
  window["haslangchange"] = true;
@@ -38,6 +38,9 @@ margin-bottom:16px;
38
38
  pn-site-selector-item>div, pn-site-selector-item>a {
39
39
  padding:8px 0;
40
40
  }
41
+ .siteselector-item-description {
42
+ font-size: 12.8px;
43
+ }
41
44
  pn-marketweb-siteheader .siteheader-logocontainer {
42
45
  min-height:48px;
43
46
  }
@@ -59,14 +62,39 @@ padding:10px 0;
59
62
  margin-left:16px;
60
63
  }
61
64
  }
65
+ @media screen and (min-width: 48em) {
66
+ .siteheader-topright>pn-language-selector, .siteheader-topright>pn-marketweb-siteheader-login, .siteheader-topright>a {
67
+ margin-left: 10px;
68
+ }
69
+ }
70
+ .languageselector-title {
71
+ padding:8px 16px;
72
+ font-weight: bold;
73
+ }
74
+ .languageselector-button, .languageselector-link {
75
+ padding:11px 16px 11px 14px;
76
+ font-size:16px;
77
+ }
62
78
 
63
79
  pn-marketweb-siteheader-login {
64
80
  padding:10px 0;
65
81
  max-height:52px;
66
82
  }
83
+ pn-marketweb-siteheader-login-linklist li {
84
+ padding:8px 16px;
85
+ }
86
+
67
87
  pn-mainnav {
68
88
  min-height:51px;
69
89
  }
90
+ .mainnav-toggle>button {
91
+ border-radius:24px;
92
+ padding:6px 16px;
93
+ font-size:16px;
94
+ }
95
+ .mainnav-toggle>button pn-icon {
96
+ margin-left: 8px;
97
+ }
70
98
  @media screen and (min-width: 48em) {
71
99
  pn-mainnav>nav {
72
100
  top: 65px;
@@ -1 +0,0 @@
1
- import{r as s,h as e,a as r,g as t}from"./p-58e8d7d5.js";let o=class{constructor(e){s(this,e),this.icon=null,this.heading="",this.sumtext=null,this.theme="blue",this.bonuspercentage="0%",this.currency="kr",this.value=0,this.min=0,this.max=0,this.valuepercentage=0,this.progresspercentage=0,this.levelValues=[],this.currentLevelAdjustedValue=0}componentWillLoad(){this.setInitialValues(),this.setValuePercentage()}setInitialValues(){const s=Array.from(this.hostElement.querySelectorAll("pn-bonus-progressbar-level:not([current])"));if(this.currentLevelAdjustedValue=this.value,this.levelValues=s.map((s=>parseInt(s.getAttribute("value"),10))),!this.max&&this.levelValues&&this.levelValues.length>0){const s=this.levelValues.slice(-1)[0];this.max=Math.floor(1.05*s)}this.value>this.max&&(this.currentLevelAdjustedValue=100)}setValuePercentage(){if(this.valuepercentage=this.value/this.max*100,this.progresspercentage=(this.value-this.min)/(this.max-this.min)*100,this.progresspercentage<0&&(this.min=this.levelValues&&this.levelValues.length&&this.levelValues[0]<this.value?Math.floor(.95*this.levelValues[0]):Math.floor(.95*this.value)),this.progresspercentage>100){this.progresspercentage=100;const s=this.levelValues.slice(-1)[0];this.max=Math.floor(1.05*s)}}iconColor(){switch(this.theme){case"red":return"coral700";case"blue":default:return"blue700"}}render(){return e(r,null,e("div",{class:"bonusprogressbar-top"},this.icon?e("div",{class:"bonusprogressbar-top-icon"},e("pn-icon",{symbol:this.icon,small:"false",color:this.iconColor()})):{},e("div",{class:"bonusprogressbar-top-heading"},e("h4",{class:"bonusprogressbar-top-headline"},this.heading),this.sumtext?e("div",{class:"bonusprogressbar-sumtext"},this.sumtext):null),e("strong",{class:"bonusprogressbar-top-percentage"},this.bonuspercentage)),e("div",{class:"bonusprogressbar-wrapper"},e("progress",{class:"bonusprogressbar-progress",value:this.progresspercentage,max:"100"}),e("pn-bonus-progressbar-level",{current:!0,value:this.value,visualpercentage:this.currentLevelAdjustedValue,bonuspercentage:this.bonuspercentage}),e("slot",null)))}get hostElement(){return t(this)}static get watchers(){return{currentLevelAdjustedValue:["setValuePercentage"],value:["setValuePercentage"],min:["setValuePercentage"],max:["setValuePercentage"]}}};o.style="pn-bonus-progressbar{width:100%}.bonusprogressbar-top{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:1.6rem}.bonusprogressbar-top-icon{border-radius:100%;height:5rem;width:5rem;padding:1rem;display:-ms-inline-flexbox;display:inline-flex;margin-right:1em;margin-left:0.5em;background-color:#E0F8FF}[theme=red] .bonusprogressbar-top-icon{background-color:#FBC2C1}.bonusprogressbar-top-icon pn-icon svg{width:100%;height:100%}.bonusprogressbar-sumtext{margin-top:0.4rem;font-size:1.3rem;color:#5E554A}.bonusprogressbar-top-percentage{margin-left:auto;padding:0.5em}.bonusprogressbar-wrapper{position:relative;display:-ms-flexbox;display:flex;min-height:5em;-ms-flex-align:center;align-items:center}.bonusprogressbar-currentlevel{position:absolute}.bonusprogressbar-progress[value]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:1.7rem;border:0.1rem solid #00A0D6;border-radius:1.7rem;padding:0;margin:0;overflow:hidden}[theme=red] .bonusprogressbar-progress[value]{border-color:#F06365}.bonusprogressbar-progress[value]::-webkit-progress-bar{border:0;border-radius:1.7rem;margin:0;padding:0;background:#E0F8FF}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-bar{background:#FDEFEE}.bonusprogressbar-progress[value]::-webkit-progress-value{margin:0;padding:0;border-radius:1.7rem;background:#00A0D6}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-value{background:#F06365}";export{o as pn_bonus_progressbar}