@oslokommune/punkt-react 12.37.3 → 12.37.4

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.
@@ -23076,8 +23076,14 @@ let po = class extends Gr {
23076
23076
  disconnectedCallback() {
23077
23077
  super.disconnectedCallback(), this.removeEventListener("click", this.handleClick), this.removeEventListener("keydown", this.handleKeydown);
23078
23078
  }
23079
+ attributeChangedCallback(n, i, l) {
23080
+ super.attributeChangedCallback(n, i, l), n === "disabled" && l === "false" && (this.disabled = !1), (n === "isloading" || n === "isLoading") && l === "false" && (this.isLoading = !1);
23081
+ }
23082
+ firstUpdated(n) {
23083
+ super.firstUpdated(n), this.disabled === "false" && (this.disabled = !1), this.isLoading === "false" && (this.isLoading = !1);
23084
+ }
23079
23085
  updated(n) {
23080
- super.updated(n), this.setAttribute("role", "button"), this.internals.role = "button", this.disabled ? (this.getAttribute("tabindex") !== "-1" && this.setAttribute("tabindex", "-1"), this.getAttribute("aria-disabled") !== "true" && this.setAttribute("aria-disabled", "true")) : (this.getAttribute("tabindex") !== "0" && this.setAttribute("tabindex", "0"), this.getAttribute("aria-disabled") !== "false" && this.removeAttribute("aria-disabled")), this.isLoading ? this.getAttribute("aria-busy") !== "true" && this.setAttribute("aria-busy", "true") : this.hasAttribute("aria-busy") && this.removeAttribute("aria-busy"), this.updateElementClasses();
23086
+ super.updated(n), this.setAttribute("role", "button"), this.internals.role = "button", this.disabled === "false" && (this.disabled = !1), this.isLoading === "false" && (this.isLoading = !1), this.disabled ? (this.getAttribute("tabindex") !== "-1" && this.setAttribute("tabindex", "-1"), this.getAttribute("aria-disabled") !== "true" && this.setAttribute("aria-disabled", "true")) : (this.getAttribute("tabindex") !== "0" && this.setAttribute("tabindex", "0"), this.getAttribute("aria-disabled") !== "false" && this.removeAttribute("aria-disabled")), this.isLoading ? this.getAttribute("aria-busy") !== "true" && this.setAttribute("aria-busy", "true") : this.hasAttribute("aria-busy") && this.removeAttribute("aria-busy"), this.updateElementClasses();
23081
23087
  }
23082
23088
  // Render
23083
23089
  render() {
@@ -23105,7 +23111,7 @@ let po = class extends Gr {
23105
23111
  return;
23106
23112
  }
23107
23113
  if (this.type === "submit" && this.internals.form) {
23108
- this.internals.form.requestSubmit();
23114
+ this.internals.form.requestSubmit(this);
23109
23115
  return;
23110
23116
  }
23111
23117
  if (this.type === "reset" && this.internals.form) {
@@ -23151,16 +23157,16 @@ al([
23151
23157
  z({ type: String })
23152
23158
  ], po.prototype, "variant", 2);
23153
23159
  al([
23154
- z({ type: String, reflect: !0 })
23160
+ z({ type: String })
23155
23161
  ], po.prototype, "state", 2);
23156
23162
  al([
23157
23163
  z({ type: String, reflect: !0 })
23158
23164
  ], po.prototype, "type", 2);
23159
23165
  al([
23160
- z({ type: Boolean, reflect: !0 })
23166
+ z({ type: Boolean })
23161
23167
  ], po.prototype, "isLoading", 2);
23162
23168
  al([
23163
- z({ type: Boolean, reflect: !0 })
23169
+ z({ type: Boolean })
23164
23170
  ], po.prototype, "disabled", 2);
23165
23171
  po = al([
23166
23172
  cr("pkt-button")
@@ -414,7 +414,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
414
414
  ></pkt-icon
415
415
  ><span class="pkt-back-link__text">${this.text}</span></a
416
416
  >
417
- </nav>`}};Jy([z({type:String,reflect:!0})],Ch.prototype,"href",2),Jy([z({type:String,reflect:!0})],Ch.prototype,"text",2),Jy([z({type:String,reflect:!0})],Ch.prototype,"ariaLabel",2),Ch=Jy([dr("pkt-backlink")],Ch);var zP=Object.defineProperty,UP=Object.getOwnPropertyDescriptor,Ds=(r,n,i,l)=>{for(var c=l>1?void 0:l?UP(n,i):n,h=r.length-1,m;h>=0;h--)(m=r[h])&&(c=(l?m(n,i,c):m(c))||c);return l&&c&&zP(n,i,c),c};let qi=class extends Hr{constructor(){super(),this.internals=this.attachInternals(),this.defaultSlot=dn(),this.iconName="user",this.secondIconName="user",this.mode="light",this.size="medium",this.skin="primary",this.variant="label-only",this.state="normal",this.type="button",this.isLoading=!1,this.disabled=!1,this.slotController=new xa(this,this.defaultSlot),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeydown)}updated(n){super.updated(n),this.setAttribute("role","button"),this.internals.role="button",this.disabled?(this.getAttribute("tabindex")!=="-1"&&this.setAttribute("tabindex","-1"),this.getAttribute("aria-disabled")!=="true"&&this.setAttribute("aria-disabled","true")):(this.getAttribute("tabindex")!=="0"&&this.setAttribute("tabindex","0"),this.getAttribute("aria-disabled")!=="false"&&this.removeAttribute("aria-disabled")),this.isLoading?this.getAttribute("aria-busy")!=="true"&&this.setAttribute("aria-busy","true"):this.hasAttribute("aria-busy")&&this.removeAttribute("aria-busy"),this.updateElementClasses()}render(){return Se`
417
+ </nav>`}};Jy([z({type:String,reflect:!0})],Ch.prototype,"href",2),Jy([z({type:String,reflect:!0})],Ch.prototype,"text",2),Jy([z({type:String,reflect:!0})],Ch.prototype,"ariaLabel",2),Ch=Jy([dr("pkt-backlink")],Ch);var zP=Object.defineProperty,UP=Object.getOwnPropertyDescriptor,Ds=(r,n,i,l)=>{for(var c=l>1?void 0:l?UP(n,i):n,h=r.length-1,m;h>=0;h--)(m=r[h])&&(c=(l?m(n,i,c):m(c))||c);return l&&c&&zP(n,i,c),c};let qi=class extends Hr{constructor(){super(),this.internals=this.attachInternals(),this.defaultSlot=dn(),this.iconName="user",this.secondIconName="user",this.mode="light",this.size="medium",this.skin="primary",this.variant="label-only",this.state="normal",this.type="button",this.isLoading=!1,this.disabled=!1,this.slotController=new xa(this,this.defaultSlot),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeydown)}attributeChangedCallback(n,i,l){super.attributeChangedCallback(n,i,l),n==="disabled"&&l==="false"&&(this.disabled=!1),(n==="isloading"||n==="isLoading")&&l==="false"&&(this.isLoading=!1)}firstUpdated(n){super.firstUpdated(n),this.disabled==="false"&&(this.disabled=!1),this.isLoading==="false"&&(this.isLoading=!1)}updated(n){super.updated(n),this.setAttribute("role","button"),this.internals.role="button",this.disabled==="false"&&(this.disabled=!1),this.isLoading==="false"&&(this.isLoading=!1),this.disabled?(this.getAttribute("tabindex")!=="-1"&&this.setAttribute("tabindex","-1"),this.getAttribute("aria-disabled")!=="true"&&this.setAttribute("aria-disabled","true")):(this.getAttribute("tabindex")!=="0"&&this.setAttribute("tabindex","0"),this.getAttribute("aria-disabled")!=="false"&&this.removeAttribute("aria-disabled")),this.isLoading?this.getAttribute("aria-busy")!=="true"&&this.setAttribute("aria-busy","true"):this.hasAttribute("aria-busy")&&this.removeAttribute("aria-busy"),this.updateElementClasses()}render(){return Se`
418
418
  <div class="pkt-contents">
419
419
  ${this.isLoading?Se`<pkt-icon
420
420
  class="pkt-btn__icon pkt-btn__spinner"
@@ -425,7 +425,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
425
425
  <span class="pkt-btn__text" ${qt(this.defaultSlot)}></span>
426
426
  ${this.variant==="icons-right-and-left"?Se`<pkt-icon class="pkt-btn__icon" name=${this.secondIconName}></pkt-icon>`:tt}
427
427
  </div>
428
- `}updateElementClasses(){const n=new Set,i=this.getAttribute("class");n.add("pkt-btn"),i&&i.split(" ").forEach(l=>n.add(l)),this.size&&n.add(`pkt-btn--${this.size}`),this.skin&&n.add(`pkt-btn--${this.skin}`),this.variant&&n.add(`pkt-btn--${this.variant}`),this.color&&n.add(`pkt-btn--${this.color}`),this.isLoading&&n.add("pkt-btn--active"),this.state&&n.add(`pkt-btn--${this.state}`),this.disabled&&n.add("pkt-btn--disabled"),this.className=[...n].join(" ")}handleClick(n){if(this.disabled||this.isLoading){n.preventDefault(),n.stopImmediatePropagation();return}if(this.type==="submit"&&this.internals.form){this.internals.form.requestSubmit();return}if(this.type==="reset"&&this.internals.form){this.internals.form.reset();return}this.onClick&&typeof this.onClick=="function"&&this.onClick!==this.handleClick&&this.onClick(n),this.dispatchEvent(new CustomEvent("button-click",{bubbles:!0,composed:!0,detail:{originalEvent:n}}))}handleKeydown(n){if(!(this.disabled||this.isLoading)&&(n.key==="Enter"||n.key===" ")){n.preventDefault();const i=n.target;i&&i.click()}}};qi.formAssociated=!0,Ds([z({type:String})],qi.prototype,"iconName",2),Ds([z({type:String})],qi.prototype,"secondIconName",2),Ds([z({type:String})],qi.prototype,"mode",2),Ds([z({type:String})],qi.prototype,"size",2),Ds([z({type:String})],qi.prototype,"color",2),Ds([z({type:String})],qi.prototype,"skin",2),Ds([z({type:String})],qi.prototype,"variant",2),Ds([z({type:String,reflect:!0})],qi.prototype,"state",2),Ds([z({type:String,reflect:!0})],qi.prototype,"type",2),Ds([z({type:Boolean,reflect:!0})],qi.prototype,"isLoading",2),Ds([z({type:Boolean,reflect:!0})],qi.prototype,"disabled",2),qi=Ds([dr("pkt-button")],qi);const w1=6048e5,HP=864e5,VP=36e5,D1=Symbol.for("constructDateFrom");function ul(r,n){return typeof r=="function"?r(n):r&&typeof r=="object"&&D1 in r?r[D1](n):r instanceof Date?new r.constructor(n):new Date(n)}function ki(r,n){return ul(n||r,r)}function s0(r,n,i){const l=ki(r,void 0);return isNaN(n)?ul(r,NaN):(n&&l.setDate(l.getDate()+n),l)}function qP(r,n,i){return ul(r,+ki(r)+n)}function S1(r,n,i){return qP(r,n*VP)}let WP={};function Zy(){return WP}function Ag(r,n){var i,l,c,h;const m=Zy(),D=(n==null?void 0:n.weekStartsOn)??((l=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??m.weekStartsOn??((h=(c=m.locale)==null?void 0:c.options)==null?void 0:h.weekStartsOn)??0,C=ki(r,n==null?void 0:n.in),T=C.getDay(),$=(T<D?7:0)+T-D;return C.setDate(C.getDate()-$),C.setHours(0,0,0,0),C}function eb(r,n){return Ag(r,{...n,weekStartsOn:1})}function C1(r,n){const i=ki(r,void 0),l=i.getFullYear(),c=ul(i,0);c.setFullYear(l+1,0,4),c.setHours(0,0,0,0);const h=eb(c),m=ul(i,0);m.setFullYear(l,0,4),m.setHours(0,0,0,0);const D=eb(m);return i.getTime()>=h.getTime()?l+1:i.getTime()>=D.getTime()?l:l-1}function x1(r){const n=ki(r),i=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return i.setUTCFullYear(n.getFullYear()),+r-+i}function _1(r,...n){const i=ul.bind(null,n.find(l=>typeof l=="object"));return n.map(i)}function l0(r,n){const i=ki(r,void 0);return i.setHours(0,0,0,0),i}function YP(r,n,i){const[l,c]=_1(void 0,r,n),h=l0(l),m=l0(c),D=+h-x1(h),C=+m-x1(m);return Math.round((D-C)/HP)}function GP(r,n){const i=C1(r),l=ul(r,0);return l.setFullYear(i,0,4),l.setHours(0,0,0,0),eb(l)}function KP(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function QP(r){return!(!KP(r)&&typeof r!="number"||isNaN(+ki(r)))}function XP(r,n){const i=ki(r,void 0);return i.setHours(23,59,59,999),i}function JP(r,n){const[i,l]=_1(r,n.start,n.end);return{start:i,end:l}}function u0(r,n){const{start:i,end:l}=JP(void 0,r);let c=+i>+l;const h=c?+i:+l,m=c?l:i;m.setHours(0,0,0,0);let D=1;const C=[];for(;+m<=h;)C.push(ul(i,m)),m.setDate(m.getDate()+D),m.setHours(0,0,0,0);return c?C.reverse():C}function ZP(r,n){const i=ki(r,void 0);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}const eN={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},tN=(r,n,i)=>{let l;const c=eN[r];return typeof c=="string"?l=c:n===1?l=c.one:l=c.other.replace("{{count}}",n.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+l:l+" ago":l};function c0(r){return(n={})=>{const i=n.width?String(n.width):r.defaultWidth;return r.formats[i]||r.formats[r.defaultWidth]}}const nN={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},rN={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},aN={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},iN={date:c0({formats:nN,defaultWidth:"full"}),time:c0({formats:rN,defaultWidth:"full"}),dateTime:c0({formats:aN,defaultWidth:"full"})},oN={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},sN=(r,n,i,l)=>oN[r];function Fg(r){return(n,i)=>{const l=i!=null&&i.context?String(i.context):"standalone";let c;if(l==="formatting"&&r.formattingValues){const m=r.defaultFormattingWidth||r.defaultWidth,D=i!=null&&i.width?String(i.width):m;c=r.formattingValues[D]||r.formattingValues[m]}else{const m=r.defaultWidth,D=i!=null&&i.width?String(i.width):r.defaultWidth;c=r.values[D]||r.values[m]}const h=r.argumentCallback?r.argumentCallback(n):n;return c[h]}}const lN={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},uN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cN={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dN={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},fN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},pN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},hN=(r,n)=>{const i=Number(r),l=i%100;if(l>20||l<10)switch(l%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},mN={ordinalNumber:hN,era:Fg({values:lN,defaultWidth:"wide"}),quarter:Fg({values:uN,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Fg({values:cN,defaultWidth:"wide"}),day:Fg({values:dN,defaultWidth:"wide"}),dayPeriod:Fg({values:fN,defaultWidth:"wide",formattingValues:pN,defaultFormattingWidth:"wide"})};function $g(r){return(n,i={})=>{const l=i.width,c=l&&r.matchPatterns[l]||r.matchPatterns[r.defaultMatchWidth],h=n.match(c);if(!h)return null;const m=h[0],D=l&&r.parsePatterns[l]||r.parsePatterns[r.defaultParseWidth],C=Array.isArray(D)?vN(D,N=>N.test(m)):gN(D,N=>N.test(m));let T;T=r.valueCallback?r.valueCallback(C):C,T=i.valueCallback?i.valueCallback(T):T;const $=n.slice(m.length);return{value:T,rest:$}}}function gN(r,n){for(const i in r)if(Object.prototype.hasOwnProperty.call(r,i)&&n(r[i]))return i}function vN(r,n){for(let i=0;i<r.length;i++)if(n(r[i]))return i}function yN(r){return(n,i={})=>{const l=n.match(r.matchPattern);if(!l)return null;const c=l[0],h=n.match(r.parsePattern);if(!h)return null;let m=r.valueCallback?r.valueCallback(h[0]):h[0];m=i.valueCallback?i.valueCallback(m):m;const D=n.slice(c.length);return{value:m,rest:D}}}const bN=/^(\d+)(th|st|nd|rd)?/i,kN=/\d+/i,wN={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},DN={any:[/^b/i,/^(a|c)/i]},SN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},CN={any:[/1/i,/2/i,/3/i,/4/i]},xN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},_N={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},EN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},TN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},AN={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},FN={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},$N={ordinalNumber:yN({matchPattern:bN,parsePattern:kN,valueCallback:r=>parseInt(r,10)}),era:$g({matchPatterns:wN,defaultMatchWidth:"wide",parsePatterns:DN,defaultParseWidth:"any"}),quarter:$g({matchPatterns:SN,defaultMatchWidth:"wide",parsePatterns:CN,defaultParseWidth:"any",valueCallback:r=>r+1}),month:$g({matchPatterns:xN,defaultMatchWidth:"wide",parsePatterns:_N,defaultParseWidth:"any"}),day:$g({matchPatterns:EN,defaultMatchWidth:"wide",parsePatterns:TN,defaultParseWidth:"any"}),dayPeriod:$g({matchPatterns:AN,defaultMatchWidth:"any",parsePatterns:FN,defaultParseWidth:"any"})},PN={code:"en-US",formatDistance:tN,formatLong:iN,formatRelative:sN,localize:mN,match:$N,options:{weekStartsOn:0,firstWeekContainsDate:1}};function NN(r,n){const i=ki(r,void 0);return YP(i,ZP(i))+1}function ON(r,n){const i=ki(r,void 0),l=+eb(i)-+GP(i);return Math.round(l/w1)+1}function E1(r,n){var i,l,c,h;const m=ki(r,n==null?void 0:n.in),D=m.getFullYear(),C=Zy(),T=(n==null?void 0:n.firstWeekContainsDate)??((l=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??C.firstWeekContainsDate??((h=(c=C.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,$=ul((n==null?void 0:n.in)||r,0);$.setFullYear(D+1,0,T),$.setHours(0,0,0,0);const N=Ag($,n),O=ul((n==null?void 0:n.in)||r,0);O.setFullYear(D,0,T),O.setHours(0,0,0,0);const R=Ag(O,n);return+m>=+N?D+1:+m>=+R?D:D-1}function RN(r,n){var i,l,c,h;const m=Zy(),D=(n==null?void 0:n.firstWeekContainsDate)??((l=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??m.firstWeekContainsDate??((h=(c=m.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,C=E1(r,n),T=ul((n==null?void 0:n.in)||r,0);return T.setFullYear(C,0,D),T.setHours(0,0,0,0),Ag(T,n)}function T1(r,n){const i=ki(r,n==null?void 0:n.in),l=+Ag(i,n)-+RN(i,n);return Math.round(l/w1)+1}function ar(r,n){const i=r<0?"-":"",l=Math.abs(r).toString().padStart(n,"0");return i+l}const kd={y(r,n){const i=r.getFullYear(),l=i>0?i:1-i;return ar(n==="yy"?l%100:l,n.length)},M(r,n){const i=r.getMonth();return n==="M"?String(i+1):ar(i+1,2)},d(r,n){return ar(r.getDate(),n.length)},a(r,n){const i=r.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return i==="am"?"a.m.":"p.m."}},h(r,n){return ar(r.getHours()%12||12,n.length)},H(r,n){return ar(r.getHours(),n.length)},m(r,n){return ar(r.getMinutes(),n.length)},s(r,n){return ar(r.getSeconds(),n.length)},S(r,n){const i=n.length,l=r.getMilliseconds(),c=Math.trunc(l*Math.pow(10,i-3));return ar(c,n.length)}},xh={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},A1={G:function(r,n,i){const l=r.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return i.era(l,{width:"abbreviated"});case"GGGGG":return i.era(l,{width:"narrow"});case"GGGG":default:return i.era(l,{width:"wide"})}},y:function(r,n,i){if(n==="yo"){const l=r.getFullYear(),c=l>0?l:1-l;return i.ordinalNumber(c,{unit:"year"})}return kd.y(r,n)},Y:function(r,n,i,l){const c=E1(r,l),h=c>0?c:1-c;if(n==="YY"){const m=h%100;return ar(m,2)}return n==="Yo"?i.ordinalNumber(h,{unit:"year"}):ar(h,n.length)},R:function(r,n){const i=C1(r);return ar(i,n.length)},u:function(r,n){const i=r.getFullYear();return ar(i,n.length)},Q:function(r,n,i){const l=Math.ceil((r.getMonth()+1)/3);switch(n){case"Q":return String(l);case"QQ":return ar(l,2);case"Qo":return i.ordinalNumber(l,{unit:"quarter"});case"QQQ":return i.quarter(l,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(l,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(l,{width:"wide",context:"formatting"})}},q:function(r,n,i){const l=Math.ceil((r.getMonth()+1)/3);switch(n){case"q":return String(l);case"qq":return ar(l,2);case"qo":return i.ordinalNumber(l,{unit:"quarter"});case"qqq":return i.quarter(l,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(l,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(l,{width:"wide",context:"standalone"})}},M:function(r,n,i){const l=r.getMonth();switch(n){case"M":case"MM":return kd.M(r,n);case"Mo":return i.ordinalNumber(l+1,{unit:"month"});case"MMM":return i.month(l,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(l,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(l,{width:"wide",context:"formatting"})}},L:function(r,n,i){const l=r.getMonth();switch(n){case"L":return String(l+1);case"LL":return ar(l+1,2);case"Lo":return i.ordinalNumber(l+1,{unit:"month"});case"LLL":return i.month(l,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(l,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(l,{width:"wide",context:"standalone"})}},w:function(r,n,i,l){const c=T1(r,l);return n==="wo"?i.ordinalNumber(c,{unit:"week"}):ar(c,n.length)},I:function(r,n,i){const l=ON(r);return n==="Io"?i.ordinalNumber(l,{unit:"week"}):ar(l,n.length)},d:function(r,n,i){return n==="do"?i.ordinalNumber(r.getDate(),{unit:"date"}):kd.d(r,n)},D:function(r,n,i){const l=NN(r);return n==="Do"?i.ordinalNumber(l,{unit:"dayOfYear"}):ar(l,n.length)},E:function(r,n,i){const l=r.getDay();switch(n){case"E":case"EE":case"EEE":return i.day(l,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(l,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(l,{width:"short",context:"formatting"});case"EEEE":default:return i.day(l,{width:"wide",context:"formatting"})}},e:function(r,n,i,l){const c=r.getDay(),h=(c-l.weekStartsOn+8)%7||7;switch(n){case"e":return String(h);case"ee":return ar(h,2);case"eo":return i.ordinalNumber(h,{unit:"day"});case"eee":return i.day(c,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(c,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(c,{width:"short",context:"formatting"});case"eeee":default:return i.day(c,{width:"wide",context:"formatting"})}},c:function(r,n,i,l){const c=r.getDay(),h=(c-l.weekStartsOn+8)%7||7;switch(n){case"c":return String(h);case"cc":return ar(h,n.length);case"co":return i.ordinalNumber(h,{unit:"day"});case"ccc":return i.day(c,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(c,{width:"narrow",context:"standalone"});case"cccccc":return i.day(c,{width:"short",context:"standalone"});case"cccc":default:return i.day(c,{width:"wide",context:"standalone"})}},i:function(r,n,i){const l=r.getDay(),c=l===0?7:l;switch(n){case"i":return String(c);case"ii":return ar(c,n.length);case"io":return i.ordinalNumber(c,{unit:"day"});case"iii":return i.day(l,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(l,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(l,{width:"short",context:"formatting"});case"iiii":default:return i.day(l,{width:"wide",context:"formatting"})}},a:function(r,n,i){const l=r.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(r,n,i){const l=r.getHours();let c;switch(l===12?c=xh.noon:l===0?c=xh.midnight:c=l/12>=1?"pm":"am",n){case"b":case"bb":return i.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(c,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(c,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(c,{width:"wide",context:"formatting"})}},B:function(r,n,i){const l=r.getHours();let c;switch(l>=17?c=xh.evening:l>=12?c=xh.afternoon:l>=4?c=xh.morning:c=xh.night,n){case"B":case"BB":case"BBB":return i.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(c,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(c,{width:"wide",context:"formatting"})}},h:function(r,n,i){if(n==="ho"){let l=r.getHours()%12;return l===0&&(l=12),i.ordinalNumber(l,{unit:"hour"})}return kd.h(r,n)},H:function(r,n,i){return n==="Ho"?i.ordinalNumber(r.getHours(),{unit:"hour"}):kd.H(r,n)},K:function(r,n,i){const l=r.getHours()%12;return n==="Ko"?i.ordinalNumber(l,{unit:"hour"}):ar(l,n.length)},k:function(r,n,i){let l=r.getHours();return l===0&&(l=24),n==="ko"?i.ordinalNumber(l,{unit:"hour"}):ar(l,n.length)},m:function(r,n,i){return n==="mo"?i.ordinalNumber(r.getMinutes(),{unit:"minute"}):kd.m(r,n)},s:function(r,n,i){return n==="so"?i.ordinalNumber(r.getSeconds(),{unit:"second"}):kd.s(r,n)},S:function(r,n){return kd.S(r,n)},X:function(r,n,i){const l=r.getTimezoneOffset();if(l===0)return"Z";switch(n){case"X":return $1(l);case"XXXX":case"XX":return Lf(l);case"XXXXX":case"XXX":default:return Lf(l,":")}},x:function(r,n,i){const l=r.getTimezoneOffset();switch(n){case"x":return $1(l);case"xxxx":case"xx":return Lf(l);case"xxxxx":case"xxx":default:return Lf(l,":")}},O:function(r,n,i){const l=r.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+F1(l,":");case"OOOO":default:return"GMT"+Lf(l,":")}},z:function(r,n,i){const l=r.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+F1(l,":");case"zzzz":default:return"GMT"+Lf(l,":")}},t:function(r,n,i){const l=Math.trunc(+r/1e3);return ar(l,n.length)},T:function(r,n,i){return ar(+r,n.length)}};function F1(r,n=""){const i=r>0?"-":"+",l=Math.abs(r),c=Math.trunc(l/60),h=l%60;return h===0?i+String(c):i+String(c)+n+ar(h,2)}function $1(r,n){return r%60===0?(r>0?"-":"+")+ar(Math.abs(r)/60,2):Lf(r,n)}function Lf(r,n=""){const i=r>0?"-":"+",l=Math.abs(r),c=ar(Math.trunc(l/60),2),h=ar(l%60,2);return i+c+n+h}const P1=(r,n)=>{switch(r){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},N1=(r,n)=>{switch(r){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},LN=(r,n)=>{const i=r.match(/(P+)(p+)?/)||[],l=i[1],c=i[2];if(!c)return P1(r,n);let h;switch(l){case"P":h=n.dateTime({width:"short"});break;case"PP":h=n.dateTime({width:"medium"});break;case"PPP":h=n.dateTime({width:"long"});break;case"PPPP":default:h=n.dateTime({width:"full"});break}return h.replace("{{date}}",P1(l,n)).replace("{{time}}",N1(c,n))},BN={p:N1,P:LN},MN=/^D+$/,IN=/^Y+$/,jN=["D","DD","YY","YYYY"];function zN(r){return MN.test(r)}function UN(r){return IN.test(r)}function HN(r,n,i){const l=VN(r,n,i);if(console.warn(l),jN.includes(r))throw new RangeError(l)}function VN(r,n,i){const l=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${n}\`) for formatting ${l} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const qN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,WN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,YN=/^'([^]*?)'?$/,GN=/''/g,KN=/[a-zA-Z]/;function QN(r,n,i){var l,c,h,m;const D=Zy(),C=D.locale??PN,T=D.firstWeekContainsDate??((c=(l=D.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??1,$=D.weekStartsOn??((m=(h=D.locale)==null?void 0:h.options)==null?void 0:m.weekStartsOn)??0,N=ki(r,void 0);if(!QP(N))throw new RangeError("Invalid time value");let O=n.match(WN).map(I=>{const K=I[0];if(K==="p"||K==="P"){const Y=BN[K];return Y(I,C.formatLong)}return I}).join("").match(qN).map(I=>{if(I==="''")return{isToken:!1,value:"'"};const K=I[0];if(K==="'")return{isToken:!1,value:XN(I)};if(A1[K])return{isToken:!0,value:I};if(K.match(KN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+K+"`");return{isToken:!1,value:I}});C.localize.preprocessor&&(O=C.localize.preprocessor(N,O));const R={firstWeekContainsDate:T,weekStartsOn:$,locale:C};return O.map(I=>{if(!I.isToken)return I.value;const K=I.value;(UN(K)||zN(K))&&HN(K,n,String(r));const Y=A1[K[0]];return Y(N,K,C.localize,R)}).join("")}function XN(r){const n=r.match(YN);return n?n[1].replace(GN,"'"):r}function JN(r,n){const i=ki(r,void 0).getDay();return i===0?7:i}function ZN(r,n,i){const l=ki(r,void 0);return l.setHours(n),l}const O1={},Pg={};function Ng(r,n){try{const i=(O1[r]||(O1[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(n).split("GMT")[1]||"";return i in Pg?Pg[i]:R1(i,i.split(":"))}catch{if(r in Pg)return Pg[r];const i=r==null?void 0:r.match(e3);return i?R1(r,i.slice(1)):NaN}}const e3=/([+-]\d\d):?(\d\d)?/;function R1(r,n){const i=+n[0],l=+(n[1]||0);return Pg[r]=i>0?i*60+l:i*60-l}let Og=class Oy extends Date{constructor(...n){super(),n.length>1&&typeof n[n.length-1]=="string"&&(this.timeZone=n.pop()),this.internal=new Date,isNaN(Ng(this.timeZone,this))?this.setTime(NaN):n.length?typeof n[0]=="number"&&(n.length===1||n.length===2&&typeof n[1]!="number")?this.setTime(n[0]):typeof n[0]=="string"?this.setTime(+new Date(n[0])):n[0]instanceof Date?this.setTime(+n[0]):(this.setTime(+new Date(...n)),B1(this),d0(this)):this.setTime(Date.now())}static tz(n,...i){return i.length?new Oy(...i,n):new Oy(Date.now(),n)}withTimeZone(n){return new Oy(+this,n)}getTimezoneOffset(){return-Ng(this.timeZone,this)}setTime(n){return Date.prototype.setTime.apply(this,arguments),d0(this),+this}[Symbol.for("constructDateFrom")](n){return new Oy(+new Date(n),this.timeZone)}};const L1=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!L1.test(r))return;const n=r.replace(L1,"$1UTC");Og.prototype[n]&&(r.startsWith("get")?Og.prototype[r]=function(){return this.internal[n]()}:(Og.prototype[r]=function(){return Date.prototype[n].apply(this.internal,arguments),t3(this),+this},Og.prototype[n]=function(){return Date.prototype[n].apply(this,arguments),d0(this),+this}))});function d0(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function t3(r){Date.prototype.setFullYear.call(r,r.internal.getUTCFullYear(),r.internal.getUTCMonth(),r.internal.getUTCDate()),Date.prototype.setHours.call(r,r.internal.getUTCHours(),r.internal.getUTCMinutes(),r.internal.getUTCSeconds(),r.internal.getUTCMilliseconds()),B1(r)}function B1(r){const n=Ng(r.timeZone,r),i=new Date(+r);i.setUTCHours(i.getUTCHours()-1);const l=-new Date(+r).getTimezoneOffset(),c=-new Date(+i).getTimezoneOffset(),h=l-c,m=Date.prototype.getHours.apply(r)!==r.internal.getUTCHours();h&&m&&r.internal.setUTCMinutes(r.internal.getUTCMinutes()+h);const D=l-n;D&&Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+D);const C=Ng(r.timeZone,r),T=-new Date(+r).getTimezoneOffset()-C,$=C!==n,N=T-D;if($&&N){Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+N);const O=Ng(r.timeZone,r),R=C-O;R&&(r.internal.setUTCMinutes(r.internal.getUTCMinutes()+R),Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+R))}}let tb=class Ry extends Og{static tz(n,...i){return i.length?new Ry(...i,n):new Ry(Date.now(),n)}toISOString(){const[n,i,l]=this.tzComponents(),c=`${n}${i}:${l}`;return this.internal.toISOString().slice(0,-1)+c}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[n,i,l,c]=this.internal.toUTCString().split(" ");return`${n==null?void 0:n.slice(0,-1)} ${l} ${i} ${c}`}toTimeString(){const n=this.internal.toUTCString().split(" ")[4],[i,l,c]=this.tzComponents();return`${n} GMT${i}${l}${c} (${n3(this.timeZone,this)})`}toLocaleString(n,i){return Date.prototype.toLocaleString.call(this,n,{...i,timeZone:(i==null?void 0:i.timeZone)||this.timeZone})}toLocaleDateString(n,i){return Date.prototype.toLocaleDateString.call(this,n,{...i,timeZone:(i==null?void 0:i.timeZone)||this.timeZone})}toLocaleTimeString(n,i){return Date.prototype.toLocaleTimeString.call(this,n,{...i,timeZone:(i==null?void 0:i.timeZone)||this.timeZone})}tzComponents(){const n=this.getTimezoneOffset(),i=n>0?"-":"+",l=String(Math.floor(Math.abs(n)/60)).padStart(2,"0"),c=String(Math.abs(n)%60).padStart(2,"0");return[i,l,c]}withTimeZone(n){return new Ry(+this,n)}[Symbol.for("constructDateFrom")](n){return new Ry(+new Date(n),this.timeZone)}};function n3(r,n){return new Intl.DateTimeFormat("en-GB",{timeZone:r,timeZoneName:"long"}).format(n).slice(12)}window.pktTz=window.pktTz===void 0?"Europe/Oslo":window.pktTz;const Ha=r=>r.toISOString().split("T")[0],f0=r=>{if(!r)return null;const n=S1(new tb(r,window.pktTz),12);return isNaN(n.getTime())?null:n},M1=(r,n)=>{const i=Qr(r);return isNaN(i.getTime())?"":QN(i,n)},Qr=(r="",n)=>{const i=r===""||!r?new Date:r;return n?new tb(n==="end"?XP(i):l0(i),window.pktTz):ZN(new tb(i.toString(),window.pktTz),12)},wd=(r,n,i=1)=>S1(new tb(r,n,i,window.pktTz),12),r3=r=>new Intl.DateTimeFormat("no",{dateStyle:"full",timeZone:window.pktTz}).format(r),I1=r=>{if(Array.isArray(r))return r;if(typeof r=="string")return r.split(",")},a3=r=>r?new Date(r):null,i3=r=>{if(typeof r=="string")return r.split(",").map(n=>new Date(n));if(Array.isArray(r))return r.map(n=>new Date(n))},_h={csvToArray:I1,stringToDate:a3,stringsToDate:i3},o3={earliest:{default:null},latest:{default:null},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},maxMultiple:{default:4},range:{default:!1}},Bf={props:o3};var s3=Object.defineProperty,l3=Object.getOwnPropertyDescriptor,fr=(r,n,i,l)=>{for(var c=l>1?void 0:l?l3(n,i):n,h=r.length-1,m;h>=0;h--)(m=r[h])&&(c=(l?m(n,i,c):m(c))||c);return l&&c&&s3(n,i,c),c};let ir=class extends Hr{constructor(){super(...arguments),this.multiple=Bf.props.multiple.default,this.maxMultiple=Bf.props.maxMultiple.default,this.range=Bf.props.range.default,this.weeknumbers=Bf.props.weeknumbers.default,this.withcontrols=Bf.props.withcontrols.default,this.selected=[],this.earliest=Bf.props.earliest.default,this.latest=Bf.props.latest.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.dayStrings=this.strings.dates.daysShort,this.dayStringsLong=this.strings.dates.days,this.monthStrings=this.strings.dates.months,this.weekString=this.strings.dates.week,this.prevMonthString=this.strings.dates.prevMonth,this.nextMonthString=this.strings.dates.nextMonth,this._selected=[],this.year=0,this.month=0,this.week=0,this.rangeHovered=null,this.inRange={},this.focusedDate=null,this.selectableDates=[],this.currentmonthtouched=!1,this.tabIndexSet=0}connectedCallback(){super.connectedCallback()}disconnectedCallback(){this.removeEventListener("keydown",this.handleKeydown),super.disconnectedCallback()}attributeChangedCallback(n,i,l){n==="selected"&&l&&this.convertSelected(),super.attributeChangedCallback(n,i,l)}updated(n){super.updated(n),n.has("selected")&&this.convertSelected()}firstUpdated(n){this.addEventListener("keydown",this.handleKeydown)}convertSelected(){if(typeof this.selected=="string"&&(this.selected=this.selected.split(",")),this.selected.length===1&&this.selected[0]===""&&(this.selected=[]),this._selected=this.selected.map(n=>Qr(n)),this.range&&this.selected.length===2){const n=u0({start:Qr(this.selected[0]),end:Qr(this.selected[1])});if(this.inRange={},Array.isArray(n)&&n.length){const i={};for(let l=0;l<n.length;l++)i[Ha(n[l])]=this.isInRange(n[l]);this.inRange=i}}this.setCurrentMonth()}setCurrentMonth(){if(this.currentmonth===null&&!this.currentmonthtouched){this.currentmonthtouched=!0;return}this.selected.length&&this.selected[0]!==""?this.currentmonth=Qr(this.selected[this.selected.length-1]):this.currentmonth===null&&(this.currentmonth=Qr()),this.year=this.currentmonth.getFullYear(),this.month=this.currentmonth.getMonth()}handleKeydown(n){switch(n.key){case"ArrowLeft":this.handleArrowKey(n,-1);break;case"ArrowRight":this.handleArrowKey(n,1);break;case"ArrowUp":this.handleArrowKey(n,-7);break;case"ArrowDown":this.handleArrowKey(n,7);break}}handleArrowKey(n,i){var l,c,h;if(((l=n.target)==null?void 0:l.nodeName)==="INPUT"||((c=n.target)==null?void 0:c.nodeName)==="SELECT"||((h=n.target)==null?void 0:h.nodeName)==="BUTTON")return;n.preventDefault(),this.focusedDate||this.focusOnCurrentDate();const m=this.focusedDate?Qr(this.focusedDate):wd(this.year,this.month,1);let D=s0(m,i);if(D){let C=this.querySelector(`div[data-date="${Ha(D)}"]`);if(C instanceof HTMLDivElement){if(C.dataset.disabled){D=s0(D,i);let T=this.querySelector(`div[data-date="${Ha(D)}"]`);for(;T&&T instanceof HTMLDivElement&&T.dataset.disabled;)D=s0(D,i),T=this.querySelector(`div[data-date="${Ha(D)}"]`);C=T}C instanceof HTMLDivElement&&!C.dataset.disabled&&(this.focusedDate=Ha(D),C.focus())}}}render(){return Se`
428
+ `}updateElementClasses(){const n=new Set,i=this.getAttribute("class");n.add("pkt-btn"),i&&i.split(" ").forEach(l=>n.add(l)),this.size&&n.add(`pkt-btn--${this.size}`),this.skin&&n.add(`pkt-btn--${this.skin}`),this.variant&&n.add(`pkt-btn--${this.variant}`),this.color&&n.add(`pkt-btn--${this.color}`),this.isLoading&&n.add("pkt-btn--active"),this.state&&n.add(`pkt-btn--${this.state}`),this.disabled&&n.add("pkt-btn--disabled"),this.className=[...n].join(" ")}handleClick(n){if(this.disabled||this.isLoading){n.preventDefault(),n.stopImmediatePropagation();return}if(this.type==="submit"&&this.internals.form){this.internals.form.requestSubmit(this);return}if(this.type==="reset"&&this.internals.form){this.internals.form.reset();return}this.onClick&&typeof this.onClick=="function"&&this.onClick!==this.handleClick&&this.onClick(n),this.dispatchEvent(new CustomEvent("button-click",{bubbles:!0,composed:!0,detail:{originalEvent:n}}))}handleKeydown(n){if(!(this.disabled||this.isLoading)&&(n.key==="Enter"||n.key===" ")){n.preventDefault();const i=n.target;i&&i.click()}}};qi.formAssociated=!0,Ds([z({type:String})],qi.prototype,"iconName",2),Ds([z({type:String})],qi.prototype,"secondIconName",2),Ds([z({type:String})],qi.prototype,"mode",2),Ds([z({type:String})],qi.prototype,"size",2),Ds([z({type:String})],qi.prototype,"color",2),Ds([z({type:String})],qi.prototype,"skin",2),Ds([z({type:String})],qi.prototype,"variant",2),Ds([z({type:String})],qi.prototype,"state",2),Ds([z({type:String,reflect:!0})],qi.prototype,"type",2),Ds([z({type:Boolean})],qi.prototype,"isLoading",2),Ds([z({type:Boolean})],qi.prototype,"disabled",2),qi=Ds([dr("pkt-button")],qi);const w1=6048e5,HP=864e5,VP=36e5,D1=Symbol.for("constructDateFrom");function ul(r,n){return typeof r=="function"?r(n):r&&typeof r=="object"&&D1 in r?r[D1](n):r instanceof Date?new r.constructor(n):new Date(n)}function ki(r,n){return ul(n||r,r)}function s0(r,n,i){const l=ki(r,void 0);return isNaN(n)?ul(r,NaN):(n&&l.setDate(l.getDate()+n),l)}function qP(r,n,i){return ul(r,+ki(r)+n)}function S1(r,n,i){return qP(r,n*VP)}let WP={};function Zy(){return WP}function Ag(r,n){var i,l,c,h;const m=Zy(),D=(n==null?void 0:n.weekStartsOn)??((l=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??m.weekStartsOn??((h=(c=m.locale)==null?void 0:c.options)==null?void 0:h.weekStartsOn)??0,C=ki(r,n==null?void 0:n.in),T=C.getDay(),$=(T<D?7:0)+T-D;return C.setDate(C.getDate()-$),C.setHours(0,0,0,0),C}function eb(r,n){return Ag(r,{...n,weekStartsOn:1})}function C1(r,n){const i=ki(r,void 0),l=i.getFullYear(),c=ul(i,0);c.setFullYear(l+1,0,4),c.setHours(0,0,0,0);const h=eb(c),m=ul(i,0);m.setFullYear(l,0,4),m.setHours(0,0,0,0);const D=eb(m);return i.getTime()>=h.getTime()?l+1:i.getTime()>=D.getTime()?l:l-1}function x1(r){const n=ki(r),i=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return i.setUTCFullYear(n.getFullYear()),+r-+i}function _1(r,...n){const i=ul.bind(null,n.find(l=>typeof l=="object"));return n.map(i)}function l0(r,n){const i=ki(r,void 0);return i.setHours(0,0,0,0),i}function YP(r,n,i){const[l,c]=_1(void 0,r,n),h=l0(l),m=l0(c),D=+h-x1(h),C=+m-x1(m);return Math.round((D-C)/HP)}function GP(r,n){const i=C1(r),l=ul(r,0);return l.setFullYear(i,0,4),l.setHours(0,0,0,0),eb(l)}function KP(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function QP(r){return!(!KP(r)&&typeof r!="number"||isNaN(+ki(r)))}function XP(r,n){const i=ki(r,void 0);return i.setHours(23,59,59,999),i}function JP(r,n){const[i,l]=_1(r,n.start,n.end);return{start:i,end:l}}function u0(r,n){const{start:i,end:l}=JP(void 0,r);let c=+i>+l;const h=c?+i:+l,m=c?l:i;m.setHours(0,0,0,0);let D=1;const C=[];for(;+m<=h;)C.push(ul(i,m)),m.setDate(m.getDate()+D),m.setHours(0,0,0,0);return c?C.reverse():C}function ZP(r,n){const i=ki(r,void 0);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}const eN={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},tN=(r,n,i)=>{let l;const c=eN[r];return typeof c=="string"?l=c:n===1?l=c.one:l=c.other.replace("{{count}}",n.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+l:l+" ago":l};function c0(r){return(n={})=>{const i=n.width?String(n.width):r.defaultWidth;return r.formats[i]||r.formats[r.defaultWidth]}}const nN={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},rN={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},aN={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},iN={date:c0({formats:nN,defaultWidth:"full"}),time:c0({formats:rN,defaultWidth:"full"}),dateTime:c0({formats:aN,defaultWidth:"full"})},oN={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},sN=(r,n,i,l)=>oN[r];function Fg(r){return(n,i)=>{const l=i!=null&&i.context?String(i.context):"standalone";let c;if(l==="formatting"&&r.formattingValues){const m=r.defaultFormattingWidth||r.defaultWidth,D=i!=null&&i.width?String(i.width):m;c=r.formattingValues[D]||r.formattingValues[m]}else{const m=r.defaultWidth,D=i!=null&&i.width?String(i.width):r.defaultWidth;c=r.values[D]||r.values[m]}const h=r.argumentCallback?r.argumentCallback(n):n;return c[h]}}const lN={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},uN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cN={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dN={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},fN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},pN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},hN=(r,n)=>{const i=Number(r),l=i%100;if(l>20||l<10)switch(l%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},mN={ordinalNumber:hN,era:Fg({values:lN,defaultWidth:"wide"}),quarter:Fg({values:uN,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Fg({values:cN,defaultWidth:"wide"}),day:Fg({values:dN,defaultWidth:"wide"}),dayPeriod:Fg({values:fN,defaultWidth:"wide",formattingValues:pN,defaultFormattingWidth:"wide"})};function $g(r){return(n,i={})=>{const l=i.width,c=l&&r.matchPatterns[l]||r.matchPatterns[r.defaultMatchWidth],h=n.match(c);if(!h)return null;const m=h[0],D=l&&r.parsePatterns[l]||r.parsePatterns[r.defaultParseWidth],C=Array.isArray(D)?vN(D,N=>N.test(m)):gN(D,N=>N.test(m));let T;T=r.valueCallback?r.valueCallback(C):C,T=i.valueCallback?i.valueCallback(T):T;const $=n.slice(m.length);return{value:T,rest:$}}}function gN(r,n){for(const i in r)if(Object.prototype.hasOwnProperty.call(r,i)&&n(r[i]))return i}function vN(r,n){for(let i=0;i<r.length;i++)if(n(r[i]))return i}function yN(r){return(n,i={})=>{const l=n.match(r.matchPattern);if(!l)return null;const c=l[0],h=n.match(r.parsePattern);if(!h)return null;let m=r.valueCallback?r.valueCallback(h[0]):h[0];m=i.valueCallback?i.valueCallback(m):m;const D=n.slice(c.length);return{value:m,rest:D}}}const bN=/^(\d+)(th|st|nd|rd)?/i,kN=/\d+/i,wN={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},DN={any:[/^b/i,/^(a|c)/i]},SN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},CN={any:[/1/i,/2/i,/3/i,/4/i]},xN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},_N={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},EN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},TN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},AN={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},FN={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},$N={ordinalNumber:yN({matchPattern:bN,parsePattern:kN,valueCallback:r=>parseInt(r,10)}),era:$g({matchPatterns:wN,defaultMatchWidth:"wide",parsePatterns:DN,defaultParseWidth:"any"}),quarter:$g({matchPatterns:SN,defaultMatchWidth:"wide",parsePatterns:CN,defaultParseWidth:"any",valueCallback:r=>r+1}),month:$g({matchPatterns:xN,defaultMatchWidth:"wide",parsePatterns:_N,defaultParseWidth:"any"}),day:$g({matchPatterns:EN,defaultMatchWidth:"wide",parsePatterns:TN,defaultParseWidth:"any"}),dayPeriod:$g({matchPatterns:AN,defaultMatchWidth:"any",parsePatterns:FN,defaultParseWidth:"any"})},PN={code:"en-US",formatDistance:tN,formatLong:iN,formatRelative:sN,localize:mN,match:$N,options:{weekStartsOn:0,firstWeekContainsDate:1}};function NN(r,n){const i=ki(r,void 0);return YP(i,ZP(i))+1}function ON(r,n){const i=ki(r,void 0),l=+eb(i)-+GP(i);return Math.round(l/w1)+1}function E1(r,n){var i,l,c,h;const m=ki(r,n==null?void 0:n.in),D=m.getFullYear(),C=Zy(),T=(n==null?void 0:n.firstWeekContainsDate)??((l=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??C.firstWeekContainsDate??((h=(c=C.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,$=ul((n==null?void 0:n.in)||r,0);$.setFullYear(D+1,0,T),$.setHours(0,0,0,0);const N=Ag($,n),O=ul((n==null?void 0:n.in)||r,0);O.setFullYear(D,0,T),O.setHours(0,0,0,0);const R=Ag(O,n);return+m>=+N?D+1:+m>=+R?D:D-1}function RN(r,n){var i,l,c,h;const m=Zy(),D=(n==null?void 0:n.firstWeekContainsDate)??((l=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??m.firstWeekContainsDate??((h=(c=m.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,C=E1(r,n),T=ul((n==null?void 0:n.in)||r,0);return T.setFullYear(C,0,D),T.setHours(0,0,0,0),Ag(T,n)}function T1(r,n){const i=ki(r,n==null?void 0:n.in),l=+Ag(i,n)-+RN(i,n);return Math.round(l/w1)+1}function ar(r,n){const i=r<0?"-":"",l=Math.abs(r).toString().padStart(n,"0");return i+l}const kd={y(r,n){const i=r.getFullYear(),l=i>0?i:1-i;return ar(n==="yy"?l%100:l,n.length)},M(r,n){const i=r.getMonth();return n==="M"?String(i+1):ar(i+1,2)},d(r,n){return ar(r.getDate(),n.length)},a(r,n){const i=r.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return i==="am"?"a.m.":"p.m."}},h(r,n){return ar(r.getHours()%12||12,n.length)},H(r,n){return ar(r.getHours(),n.length)},m(r,n){return ar(r.getMinutes(),n.length)},s(r,n){return ar(r.getSeconds(),n.length)},S(r,n){const i=n.length,l=r.getMilliseconds(),c=Math.trunc(l*Math.pow(10,i-3));return ar(c,n.length)}},xh={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},A1={G:function(r,n,i){const l=r.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return i.era(l,{width:"abbreviated"});case"GGGGG":return i.era(l,{width:"narrow"});case"GGGG":default:return i.era(l,{width:"wide"})}},y:function(r,n,i){if(n==="yo"){const l=r.getFullYear(),c=l>0?l:1-l;return i.ordinalNumber(c,{unit:"year"})}return kd.y(r,n)},Y:function(r,n,i,l){const c=E1(r,l),h=c>0?c:1-c;if(n==="YY"){const m=h%100;return ar(m,2)}return n==="Yo"?i.ordinalNumber(h,{unit:"year"}):ar(h,n.length)},R:function(r,n){const i=C1(r);return ar(i,n.length)},u:function(r,n){const i=r.getFullYear();return ar(i,n.length)},Q:function(r,n,i){const l=Math.ceil((r.getMonth()+1)/3);switch(n){case"Q":return String(l);case"QQ":return ar(l,2);case"Qo":return i.ordinalNumber(l,{unit:"quarter"});case"QQQ":return i.quarter(l,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(l,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(l,{width:"wide",context:"formatting"})}},q:function(r,n,i){const l=Math.ceil((r.getMonth()+1)/3);switch(n){case"q":return String(l);case"qq":return ar(l,2);case"qo":return i.ordinalNumber(l,{unit:"quarter"});case"qqq":return i.quarter(l,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(l,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(l,{width:"wide",context:"standalone"})}},M:function(r,n,i){const l=r.getMonth();switch(n){case"M":case"MM":return kd.M(r,n);case"Mo":return i.ordinalNumber(l+1,{unit:"month"});case"MMM":return i.month(l,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(l,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(l,{width:"wide",context:"formatting"})}},L:function(r,n,i){const l=r.getMonth();switch(n){case"L":return String(l+1);case"LL":return ar(l+1,2);case"Lo":return i.ordinalNumber(l+1,{unit:"month"});case"LLL":return i.month(l,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(l,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(l,{width:"wide",context:"standalone"})}},w:function(r,n,i,l){const c=T1(r,l);return n==="wo"?i.ordinalNumber(c,{unit:"week"}):ar(c,n.length)},I:function(r,n,i){const l=ON(r);return n==="Io"?i.ordinalNumber(l,{unit:"week"}):ar(l,n.length)},d:function(r,n,i){return n==="do"?i.ordinalNumber(r.getDate(),{unit:"date"}):kd.d(r,n)},D:function(r,n,i){const l=NN(r);return n==="Do"?i.ordinalNumber(l,{unit:"dayOfYear"}):ar(l,n.length)},E:function(r,n,i){const l=r.getDay();switch(n){case"E":case"EE":case"EEE":return i.day(l,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(l,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(l,{width:"short",context:"formatting"});case"EEEE":default:return i.day(l,{width:"wide",context:"formatting"})}},e:function(r,n,i,l){const c=r.getDay(),h=(c-l.weekStartsOn+8)%7||7;switch(n){case"e":return String(h);case"ee":return ar(h,2);case"eo":return i.ordinalNumber(h,{unit:"day"});case"eee":return i.day(c,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(c,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(c,{width:"short",context:"formatting"});case"eeee":default:return i.day(c,{width:"wide",context:"formatting"})}},c:function(r,n,i,l){const c=r.getDay(),h=(c-l.weekStartsOn+8)%7||7;switch(n){case"c":return String(h);case"cc":return ar(h,n.length);case"co":return i.ordinalNumber(h,{unit:"day"});case"ccc":return i.day(c,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(c,{width:"narrow",context:"standalone"});case"cccccc":return i.day(c,{width:"short",context:"standalone"});case"cccc":default:return i.day(c,{width:"wide",context:"standalone"})}},i:function(r,n,i){const l=r.getDay(),c=l===0?7:l;switch(n){case"i":return String(c);case"ii":return ar(c,n.length);case"io":return i.ordinalNumber(c,{unit:"day"});case"iii":return i.day(l,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(l,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(l,{width:"short",context:"formatting"});case"iiii":default:return i.day(l,{width:"wide",context:"formatting"})}},a:function(r,n,i){const l=r.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(r,n,i){const l=r.getHours();let c;switch(l===12?c=xh.noon:l===0?c=xh.midnight:c=l/12>=1?"pm":"am",n){case"b":case"bb":return i.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(c,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(c,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(c,{width:"wide",context:"formatting"})}},B:function(r,n,i){const l=r.getHours();let c;switch(l>=17?c=xh.evening:l>=12?c=xh.afternoon:l>=4?c=xh.morning:c=xh.night,n){case"B":case"BB":case"BBB":return i.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(c,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(c,{width:"wide",context:"formatting"})}},h:function(r,n,i){if(n==="ho"){let l=r.getHours()%12;return l===0&&(l=12),i.ordinalNumber(l,{unit:"hour"})}return kd.h(r,n)},H:function(r,n,i){return n==="Ho"?i.ordinalNumber(r.getHours(),{unit:"hour"}):kd.H(r,n)},K:function(r,n,i){const l=r.getHours()%12;return n==="Ko"?i.ordinalNumber(l,{unit:"hour"}):ar(l,n.length)},k:function(r,n,i){let l=r.getHours();return l===0&&(l=24),n==="ko"?i.ordinalNumber(l,{unit:"hour"}):ar(l,n.length)},m:function(r,n,i){return n==="mo"?i.ordinalNumber(r.getMinutes(),{unit:"minute"}):kd.m(r,n)},s:function(r,n,i){return n==="so"?i.ordinalNumber(r.getSeconds(),{unit:"second"}):kd.s(r,n)},S:function(r,n){return kd.S(r,n)},X:function(r,n,i){const l=r.getTimezoneOffset();if(l===0)return"Z";switch(n){case"X":return $1(l);case"XXXX":case"XX":return Lf(l);case"XXXXX":case"XXX":default:return Lf(l,":")}},x:function(r,n,i){const l=r.getTimezoneOffset();switch(n){case"x":return $1(l);case"xxxx":case"xx":return Lf(l);case"xxxxx":case"xxx":default:return Lf(l,":")}},O:function(r,n,i){const l=r.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+F1(l,":");case"OOOO":default:return"GMT"+Lf(l,":")}},z:function(r,n,i){const l=r.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+F1(l,":");case"zzzz":default:return"GMT"+Lf(l,":")}},t:function(r,n,i){const l=Math.trunc(+r/1e3);return ar(l,n.length)},T:function(r,n,i){return ar(+r,n.length)}};function F1(r,n=""){const i=r>0?"-":"+",l=Math.abs(r),c=Math.trunc(l/60),h=l%60;return h===0?i+String(c):i+String(c)+n+ar(h,2)}function $1(r,n){return r%60===0?(r>0?"-":"+")+ar(Math.abs(r)/60,2):Lf(r,n)}function Lf(r,n=""){const i=r>0?"-":"+",l=Math.abs(r),c=ar(Math.trunc(l/60),2),h=ar(l%60,2);return i+c+n+h}const P1=(r,n)=>{switch(r){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},N1=(r,n)=>{switch(r){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},LN=(r,n)=>{const i=r.match(/(P+)(p+)?/)||[],l=i[1],c=i[2];if(!c)return P1(r,n);let h;switch(l){case"P":h=n.dateTime({width:"short"});break;case"PP":h=n.dateTime({width:"medium"});break;case"PPP":h=n.dateTime({width:"long"});break;case"PPPP":default:h=n.dateTime({width:"full"});break}return h.replace("{{date}}",P1(l,n)).replace("{{time}}",N1(c,n))},BN={p:N1,P:LN},MN=/^D+$/,IN=/^Y+$/,jN=["D","DD","YY","YYYY"];function zN(r){return MN.test(r)}function UN(r){return IN.test(r)}function HN(r,n,i){const l=VN(r,n,i);if(console.warn(l),jN.includes(r))throw new RangeError(l)}function VN(r,n,i){const l=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${n}\`) for formatting ${l} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const qN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,WN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,YN=/^'([^]*?)'?$/,GN=/''/g,KN=/[a-zA-Z]/;function QN(r,n,i){var l,c,h,m;const D=Zy(),C=D.locale??PN,T=D.firstWeekContainsDate??((c=(l=D.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??1,$=D.weekStartsOn??((m=(h=D.locale)==null?void 0:h.options)==null?void 0:m.weekStartsOn)??0,N=ki(r,void 0);if(!QP(N))throw new RangeError("Invalid time value");let O=n.match(WN).map(I=>{const K=I[0];if(K==="p"||K==="P"){const Y=BN[K];return Y(I,C.formatLong)}return I}).join("").match(qN).map(I=>{if(I==="''")return{isToken:!1,value:"'"};const K=I[0];if(K==="'")return{isToken:!1,value:XN(I)};if(A1[K])return{isToken:!0,value:I};if(K.match(KN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+K+"`");return{isToken:!1,value:I}});C.localize.preprocessor&&(O=C.localize.preprocessor(N,O));const R={firstWeekContainsDate:T,weekStartsOn:$,locale:C};return O.map(I=>{if(!I.isToken)return I.value;const K=I.value;(UN(K)||zN(K))&&HN(K,n,String(r));const Y=A1[K[0]];return Y(N,K,C.localize,R)}).join("")}function XN(r){const n=r.match(YN);return n?n[1].replace(GN,"'"):r}function JN(r,n){const i=ki(r,void 0).getDay();return i===0?7:i}function ZN(r,n,i){const l=ki(r,void 0);return l.setHours(n),l}const O1={},Pg={};function Ng(r,n){try{const i=(O1[r]||(O1[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(n).split("GMT")[1]||"";return i in Pg?Pg[i]:R1(i,i.split(":"))}catch{if(r in Pg)return Pg[r];const i=r==null?void 0:r.match(e3);return i?R1(r,i.slice(1)):NaN}}const e3=/([+-]\d\d):?(\d\d)?/;function R1(r,n){const i=+n[0],l=+(n[1]||0);return Pg[r]=i>0?i*60+l:i*60-l}let Og=class Oy extends Date{constructor(...n){super(),n.length>1&&typeof n[n.length-1]=="string"&&(this.timeZone=n.pop()),this.internal=new Date,isNaN(Ng(this.timeZone,this))?this.setTime(NaN):n.length?typeof n[0]=="number"&&(n.length===1||n.length===2&&typeof n[1]!="number")?this.setTime(n[0]):typeof n[0]=="string"?this.setTime(+new Date(n[0])):n[0]instanceof Date?this.setTime(+n[0]):(this.setTime(+new Date(...n)),B1(this),d0(this)):this.setTime(Date.now())}static tz(n,...i){return i.length?new Oy(...i,n):new Oy(Date.now(),n)}withTimeZone(n){return new Oy(+this,n)}getTimezoneOffset(){return-Ng(this.timeZone,this)}setTime(n){return Date.prototype.setTime.apply(this,arguments),d0(this),+this}[Symbol.for("constructDateFrom")](n){return new Oy(+new Date(n),this.timeZone)}};const L1=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!L1.test(r))return;const n=r.replace(L1,"$1UTC");Og.prototype[n]&&(r.startsWith("get")?Og.prototype[r]=function(){return this.internal[n]()}:(Og.prototype[r]=function(){return Date.prototype[n].apply(this.internal,arguments),t3(this),+this},Og.prototype[n]=function(){return Date.prototype[n].apply(this,arguments),d0(this),+this}))});function d0(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function t3(r){Date.prototype.setFullYear.call(r,r.internal.getUTCFullYear(),r.internal.getUTCMonth(),r.internal.getUTCDate()),Date.prototype.setHours.call(r,r.internal.getUTCHours(),r.internal.getUTCMinutes(),r.internal.getUTCSeconds(),r.internal.getUTCMilliseconds()),B1(r)}function B1(r){const n=Ng(r.timeZone,r),i=new Date(+r);i.setUTCHours(i.getUTCHours()-1);const l=-new Date(+r).getTimezoneOffset(),c=-new Date(+i).getTimezoneOffset(),h=l-c,m=Date.prototype.getHours.apply(r)!==r.internal.getUTCHours();h&&m&&r.internal.setUTCMinutes(r.internal.getUTCMinutes()+h);const D=l-n;D&&Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+D);const C=Ng(r.timeZone,r),T=-new Date(+r).getTimezoneOffset()-C,$=C!==n,N=T-D;if($&&N){Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+N);const O=Ng(r.timeZone,r),R=C-O;R&&(r.internal.setUTCMinutes(r.internal.getUTCMinutes()+R),Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+R))}}let tb=class Ry extends Og{static tz(n,...i){return i.length?new Ry(...i,n):new Ry(Date.now(),n)}toISOString(){const[n,i,l]=this.tzComponents(),c=`${n}${i}:${l}`;return this.internal.toISOString().slice(0,-1)+c}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[n,i,l,c]=this.internal.toUTCString().split(" ");return`${n==null?void 0:n.slice(0,-1)} ${l} ${i} ${c}`}toTimeString(){const n=this.internal.toUTCString().split(" ")[4],[i,l,c]=this.tzComponents();return`${n} GMT${i}${l}${c} (${n3(this.timeZone,this)})`}toLocaleString(n,i){return Date.prototype.toLocaleString.call(this,n,{...i,timeZone:(i==null?void 0:i.timeZone)||this.timeZone})}toLocaleDateString(n,i){return Date.prototype.toLocaleDateString.call(this,n,{...i,timeZone:(i==null?void 0:i.timeZone)||this.timeZone})}toLocaleTimeString(n,i){return Date.prototype.toLocaleTimeString.call(this,n,{...i,timeZone:(i==null?void 0:i.timeZone)||this.timeZone})}tzComponents(){const n=this.getTimezoneOffset(),i=n>0?"-":"+",l=String(Math.floor(Math.abs(n)/60)).padStart(2,"0"),c=String(Math.abs(n)%60).padStart(2,"0");return[i,l,c]}withTimeZone(n){return new Ry(+this,n)}[Symbol.for("constructDateFrom")](n){return new Ry(+new Date(n),this.timeZone)}};function n3(r,n){return new Intl.DateTimeFormat("en-GB",{timeZone:r,timeZoneName:"long"}).format(n).slice(12)}window.pktTz=window.pktTz===void 0?"Europe/Oslo":window.pktTz;const Ha=r=>r.toISOString().split("T")[0],f0=r=>{if(!r)return null;const n=S1(new tb(r,window.pktTz),12);return isNaN(n.getTime())?null:n},M1=(r,n)=>{const i=Qr(r);return isNaN(i.getTime())?"":QN(i,n)},Qr=(r="",n)=>{const i=r===""||!r?new Date:r;return n?new tb(n==="end"?XP(i):l0(i),window.pktTz):ZN(new tb(i.toString(),window.pktTz),12)},wd=(r,n,i=1)=>S1(new tb(r,n,i,window.pktTz),12),r3=r=>new Intl.DateTimeFormat("no",{dateStyle:"full",timeZone:window.pktTz}).format(r),I1=r=>{if(Array.isArray(r))return r;if(typeof r=="string")return r.split(",")},a3=r=>r?new Date(r):null,i3=r=>{if(typeof r=="string")return r.split(",").map(n=>new Date(n));if(Array.isArray(r))return r.map(n=>new Date(n))},_h={csvToArray:I1,stringToDate:a3,stringsToDate:i3},o3={earliest:{default:null},latest:{default:null},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},maxMultiple:{default:4},range:{default:!1}},Bf={props:o3};var s3=Object.defineProperty,l3=Object.getOwnPropertyDescriptor,fr=(r,n,i,l)=>{for(var c=l>1?void 0:l?l3(n,i):n,h=r.length-1,m;h>=0;h--)(m=r[h])&&(c=(l?m(n,i,c):m(c))||c);return l&&c&&s3(n,i,c),c};let ir=class extends Hr{constructor(){super(...arguments),this.multiple=Bf.props.multiple.default,this.maxMultiple=Bf.props.maxMultiple.default,this.range=Bf.props.range.default,this.weeknumbers=Bf.props.weeknumbers.default,this.withcontrols=Bf.props.withcontrols.default,this.selected=[],this.earliest=Bf.props.earliest.default,this.latest=Bf.props.latest.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.dayStrings=this.strings.dates.daysShort,this.dayStringsLong=this.strings.dates.days,this.monthStrings=this.strings.dates.months,this.weekString=this.strings.dates.week,this.prevMonthString=this.strings.dates.prevMonth,this.nextMonthString=this.strings.dates.nextMonth,this._selected=[],this.year=0,this.month=0,this.week=0,this.rangeHovered=null,this.inRange={},this.focusedDate=null,this.selectableDates=[],this.currentmonthtouched=!1,this.tabIndexSet=0}connectedCallback(){super.connectedCallback()}disconnectedCallback(){this.removeEventListener("keydown",this.handleKeydown),super.disconnectedCallback()}attributeChangedCallback(n,i,l){n==="selected"&&l&&this.convertSelected(),super.attributeChangedCallback(n,i,l)}updated(n){super.updated(n),n.has("selected")&&this.convertSelected()}firstUpdated(n){this.addEventListener("keydown",this.handleKeydown)}convertSelected(){if(typeof this.selected=="string"&&(this.selected=this.selected.split(",")),this.selected.length===1&&this.selected[0]===""&&(this.selected=[]),this._selected=this.selected.map(n=>Qr(n)),this.range&&this.selected.length===2){const n=u0({start:Qr(this.selected[0]),end:Qr(this.selected[1])});if(this.inRange={},Array.isArray(n)&&n.length){const i={};for(let l=0;l<n.length;l++)i[Ha(n[l])]=this.isInRange(n[l]);this.inRange=i}}this.setCurrentMonth()}setCurrentMonth(){if(this.currentmonth===null&&!this.currentmonthtouched){this.currentmonthtouched=!0;return}this.selected.length&&this.selected[0]!==""?this.currentmonth=Qr(this.selected[this.selected.length-1]):this.currentmonth===null&&(this.currentmonth=Qr()),this.year=this.currentmonth.getFullYear(),this.month=this.currentmonth.getMonth()}handleKeydown(n){switch(n.key){case"ArrowLeft":this.handleArrowKey(n,-1);break;case"ArrowRight":this.handleArrowKey(n,1);break;case"ArrowUp":this.handleArrowKey(n,-7);break;case"ArrowDown":this.handleArrowKey(n,7);break}}handleArrowKey(n,i){var l,c,h;if(((l=n.target)==null?void 0:l.nodeName)==="INPUT"||((c=n.target)==null?void 0:c.nodeName)==="SELECT"||((h=n.target)==null?void 0:h.nodeName)==="BUTTON")return;n.preventDefault(),this.focusedDate||this.focusOnCurrentDate();const m=this.focusedDate?Qr(this.focusedDate):wd(this.year,this.month,1);let D=s0(m,i);if(D){let C=this.querySelector(`div[data-date="${Ha(D)}"]`);if(C instanceof HTMLDivElement){if(C.dataset.disabled){D=s0(D,i);let T=this.querySelector(`div[data-date="${Ha(D)}"]`);for(;T&&T instanceof HTMLDivElement&&T.dataset.disabled;)D=s0(D,i),T=this.querySelector(`div[data-date="${Ha(D)}"]`);C=T}C instanceof HTMLDivElement&&!C.dataset.disabled&&(this.focusedDate=Ha(D),C.focus())}}}render(){return Se`
429
429
  <div
430
430
  class="pkt-calendar ${this.weeknumbers?"pkt-cal-weeknumbers":tt}"
431
431
  @focusout=${this.closeEvent}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-react",
3
- "version": "12.37.3",
3
+ "version": "12.37.4",
4
4
  "description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -38,7 +38,7 @@
38
38
  "dependencies": {
39
39
  "@lit-labs/ssr-dom-shim": "^1.2.1",
40
40
  "@lit/react": "^1.0.7",
41
- "@oslokommune/punkt-elements": "^12.37.3",
41
+ "@oslokommune/punkt-elements": "^12.37.4",
42
42
  "angular-html-parser": "^6.0.2",
43
43
  "html-format": "^1.1.7",
44
44
  "prettier": "^3.3.3",
@@ -112,5 +112,5 @@
112
112
  "url": "https://github.com/oslokommune/punkt/issues"
113
113
  },
114
114
  "license": "MIT",
115
- "gitHead": "0dd571723528af1b8f3a8ed2c2b95d50b4f46518"
115
+ "gitHead": "d3af62954c720832c6aa2d39cc43689ec548465b"
116
116
  }