@warp-ds/elements 1.2.0-next.6 → 1.2.0
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.
- package/dist/index.js +3124 -1301
- package/dist/packages/affix/index.js +8 -6
- package/dist/packages/affix/index.js.map +4 -4
- package/dist/packages/alert/index.js +9 -5
- package/dist/packages/alert/index.js.map +4 -4
- package/dist/packages/attention/index.js +15 -14
- package/dist/packages/attention/index.js.map +4 -4
- package/dist/packages/expandable/index.d.ts +10 -0
- package/dist/packages/expandable/index.js +53 -18
- package/dist/packages/expandable/index.js.map +4 -4
- package/dist/packages/expandable/locales/en/messages.d.mts +1 -0
- package/dist/packages/expandable/locales/fi/messages.d.mts +1 -0
- package/dist/packages/expandable/locales/nb/messages.d.mts +1 -0
- package/dist/packages/select/index.js +16 -15
- package/dist/packages/select/index.js.map +4 -4
- package/dist/packages/toast/index.js +21 -17
- package/dist/packages/toast/index.js.map +4 -4
- package/package.json +1 -1
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
var f=Object.defineProperty;var k=(a,l,c)=>l in a?f(a,l,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[l]=c;var $=(a,l,c)=>(k(a,typeof l!="symbol"?l+"":l,c),c);import m from"@warp-ds/elements-core";import{css as D,html as s}from"lit";var x={box:"group block relative break-words last-child:mb-0 p-16 rounded-8",bleed:"-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8",info:"i-bg-$color-box-info-background i-text-$color-box-info-text",neutral:"i-bg-$color-box-neutral-background i-text-$color-box-neutral-text",bordered:"border-2 i-border-$color-box-bordered-border i-bg-$color-box-bordered-background i-text-$color-box-bordered-text",infoClickable:"hover:i-bg-$color-box-info-background-hover active:i-bg-$color-box-info-background-hover",neutralClickable:"hover:i-bg-$color-box-neutral-background-hover active:i-bg-$color-box-neutral-background-hover",borderedClickable:"hover:i-bg-$color-box-bordered-background-hover active:i-bg-$color-box-bordered-background-hover hover:i-border-$color-box-bordered-border-hover active:i-border-$color-box-bordered-border-hover"};var y="focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block",Q={expandable:"will-change-height",expandableTitle:"font-bold i-text-$color-expandable-title-text",expandableBox:"i-bg-$color-expandable-background hover:i-bg-$color-expandable-background-hover py-0 px-0 "+x.box,expandableBleed:x.bleed,chevron:"inline-block align-middle i-text-$color-expandable-icon",chevronNonBox:"relative left-8",chevronBox:"absolute right-16",chevronTransform:"transform transition-transform transform-gpu ease-in-out",chevronExpand:"-rotate-180",chevronCollapse:"rotate-180",expansion:"overflow-hidden",expansionNotExpanded:"h-0 invisible",button:y+" hover:underline focus:underline",buttonBox:"w-full text-left relative inline-flex items-center "+x.box,paddingTop:"pt-0",title:"flex justify-between items-center",titleType:"h4"},d="font-bold focusable justify-center transition-colors ease-in-out",i={primary:"i-text-$color-button-primary-text hover:i-text-$color-button-primary-text i-bg-$color-button-primary-background hover:i-bg-$color-button-primary-background-hover active:i-bg-$color-button-primary-background-active",secondary:"i-text-$color-button-secondary-text hover:i-text-$color-button-secondary-text i-border-$color-button-secondary-border i-bg-$color-button-secondary-background hover:i-bg-$color-button-secondary-background-hover hover:i-border-$color-button-secondary-border-hover active:i-bg-$color-button-secondary-background-active",utility:"i-text-$color-button-utility-text hover:i-text-$color-button-utility-text i-bg-$color-button-utility-background i-border-$color-button-utility-border hover:i-bg-$color-button-utility-background hover:i-border-$color-button-utility-border-hover active:i-border-$color-button-utility-border-active",destructive:"i-bg-$color-button-negative-background i-text-$color-button-negative-text hover:i-text-$color-button-negative-text hover:i-bg-$color-button-negative-background-hover active:i-bg-$color-button-negative-background-active",pill:"i-text-$color-button-pill-icon hover:i-text-$color-button-pill-icon-hover active:i-text-$color-button-pill-icon-active i-bg-$color-button-pill-background hover:i-bg-$color-button-pill-background-hover active:i-bg-$color-button-pill-background-active",disabled:"i-text-$color-button-disabled-text i-bg-$color-button-disabled-background",quiet:"i-bg-$color-button-quiet-background i-text-$color-button-quiet-text hover:i-bg-$color-button-quiet-background-hover active:i-bg-$color-button-quiet-background-active",utilityQuiet:"i-text-$color-button-utility-quiet-text i-bg-$color-button-utility-quiet-background hover:i-bg-$color-button-utility-quiet-background-hover",negativeQuiet:"i-bg-$color-button-negative-quiet-background i-text-$color-button-negative-quiet-text hover:i-bg-$color-button-negative-quiet-background-hover active:i-bg-$color-button-negative-quiet-background-active",loading:"i-text-$color-button-loading-text i-bg-$color-button-loading-background",link:"i-text-$color-button-link-text"},t={primary:`border-0 rounded-8 ${d}`,secondary:`border-2 rounded-8 ${d}`,utility:`border rounded-4 ${d}`,negative:`border-0 rounded-8 ${d}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${d}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline ${i.link}`},r={xsmall:"py-6 px-16",small:"py-8 px-16",medium:"py-10 px-14",large:"py-12 px-16",utility:"py-[11px] px-[15px]",smallUtility:"py-[7px] px-[15px]",pill:"min-h-[44px] min-w-[44px]",pillSmall:"min-h-32 min-w-32",link:"p-0"},o={medium:"text-m leading-[24]",xsmall:"text-xs"},e={inProgress:`border-transparent animate-inprogress pointer-events-none ${i.loading}`,quiet:`border-0 rounded-8 ${d}`,utilityQuiet:`border-0 rounded-4 ${d}`,negativeQuiet:`border-0 rounded-8 ${d}`,isDisabled:`font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${i.disabled}`},L={secondary:`${r.medium} ${o.medium} ${t.secondary} ${i.secondary}`,secondaryHref:`${r.medium} ${o.medium} ${t.secondary} ${i.secondary}`,secondaryDisabled:`${r.medium} ${o.medium} ${t.secondary} ${e.isDisabled}`,secondarySmall:`${o.xsmall} ${r.xsmall} ${t.secondary} ${i.secondary}`,secondarySmallDisabled:`${o.xsmall} ${r.xsmall} ${t.secondary} ${e.isDisabled}`,secondaryQuiet:`${r.medium} ${o.medium} ${e.quiet} ${i.quiet}`,secondaryQuietDisabled:`${r.medium} ${o.medium} ${e.quiet} ${e.isDisabled}`,secondarySmallQuiet:`${o.xsmall} ${r.xsmall} ${e.quiet} ${i.quiet}`,secondarySmallQuietDisabled:`${o.xsmall} ${r.xsmall} ${e.quiet} ${e.isDisabled}`,secondaryLoading:`${r.medium} ${o.medium} ${t.secondary} ${e.inProgress}`,secondarySmallLoading:`${o.xsmall} ${r.xsmall} ${t.secondary} ${e.inProgress}`,secondarySmallQuietLoading:`${o.xsmall} ${r.xsmall} ${e.quiet} ${e.inProgress}`,secondaryQuietLoading:`${r.medium} ${o.medium} ${e.quiet} ${e.inProgress}`,primary:`${r.large} ${o.medium} ${t.primary} ${i.primary}`,primaryDisabled:`${r.large} ${o.medium} ${e.isDisabled} ${t.primary}`,primarySmall:`${r.small} ${o.xsmall} ${t.primary} ${i.primary}`,primarySmallDisabled:`${r.small} ${o.xsmall} ${e.isDisabled} ${t.primary} `,primaryQuiet:`${r.large} ${o.medium} ${e.quiet} ${i.quiet}`,primaryQuietDisabled:`${r.large} ${o.medium} ${e.quiet} ${e.isDisabled}`,primarySmallQuiet:`${r.small} ${o.xsmall} ${e.quiet} ${i.quiet}`,primarySmallQuietDisabled:`${r.small} ${o.xsmall} ${e.quiet} ${e.isDisabled}`,primaryLoading:`${r.large} ${o.medium} ${e.inProgress} ${t.primary}`,primarySmallLoading:`${r.small} ${o.xsmall} ${e.inProgress} ${t.primary}`,primarySmallQuietLoading:`${r.small} ${o.xsmall} ${e.quiet} ${e.inProgress} ${t.primary}`,primaryQuietLoading:`${r.large} ${o.medium} ${e.quiet} ${e.inProgress}`,utility:`${r.utility} ${o.medium} ${t.utility} ${i.utility}`,utilityDisabled:`${r.utility} ${o.medium} ${t.utility} ${e.isDisabled}`,utilityQuiet:`${r.large} ${o.medium} ${e.utilityQuiet} ${i.utilityQuiet}`,utilityQuietDisabled:`${r.large} ${o.medium} ${e.utilityQuiet} ${e.isDisabled}`,utilitySmall:`${r.smallUtility} ${o.xsmall} ${t.utility} ${i.utility}`,utilitySmallDisabled:`${r.smallUtility} ${o.xsmall} ${t.utility} ${e.isDisabled}`,utilitySmallQuiet:`${r.smallUtility} ${o.xsmall} ${e.utilityQuiet} ${i.utilityQuiet}`,utilitySmallQuietDisabled:`${r.smallUtility} ${o.xsmall} ${e.utilityQuiet} ${e.isDisabled}`,utilityLoading:`${r.large} ${o.medium} ${t.utility} ${e.inProgress}`,utilitySmallLoading:`${r.smallUtility} ${o.xsmall} ${t.utility} ${e.inProgress}`,utilityQuietLoading:`${r.large} ${o.medium} ${e.inProgress} ${e.utilityQuiet}`,utilitySmallQuietLoading:`${r.smallUtility} ${o.xsmall} ${e.inProgress} ${e.utilityQuiet}`,negative:`${r.large} ${o.medium} ${t.negative} ${i.destructive}`,negativeDisabled:`${r.large} ${o.medium} ${t.negative} ${e.isDisabled}`,negativeQuiet:`${r.large} ${o.medium} ${e.negativeQuiet} ${i.negativeQuiet}`,negativeQuietDisabled:`${r.large} ${o.medium} ${e.negativeQuiet}${e.isDisabled}`,negativeSmall:`${r.small} ${o.xsmall} ${t.negative} ${i.destructive}`,negativeSmallDisabled:`${r.small} ${o.xsmall} ${t.negative} ${e.isDisabled}`,negativeSmallQuiet:`${r.small} ${o.xsmall} ${e.negativeQuiet} ${i.negativeQuiet}`,negativeSmallQuietDisabled:`${r.small} ${o.xsmall} ${e.negativeQuiet} ${e.isDisabled}`,negativeLoading:`${r.large} ${o.medium} ${t.negative} ${e.inProgress}`,negativeSmallLoading:`${r.small} ${o.xsmall} ${e.inProgress} ${t.negative}`,negativeQuietLoading:`${r.large} ${o.medium} ${e.negativeQuiet} ${t.negative} ${e.inProgress}`,negativeSmallQuietLoading:`${r.small} ${o.xsmall} ${e.negativeQuiet} ${e.inProgress}`,pill:`${r.pill} ${o.medium} ${t.pill} ${i.pill}`,pillSmall:`${r.pillSmall} ${o.xsmall} ${t.pill} ${i.pill}`,pillLoading:`${r.pill} ${o.medium} ${t.pill} ${e.inProgress}`,pillSmallLoading:`${r.pillSmall} ${o.xsmall} ${t.pill} ${e.inProgress}`,link:`${r.link} ${o.medium} ${t.link}`,linkSmall:`${r.link} ${o.xsmall} ${t.link}`,linkAsButton:"inline-block hover:no-underline text-center",a11y:"sr-only",fullWidth:"w-full max-w-full",contentWidth:"max-w-max"};var B={transparentBg:'before:i-bg-$color-modal-backdrop-background before:content-[""] before:absolute before:top-0 before:bottom-0 before:left-0 before:right-0 before:opacity-25',backdrop:"fixed inset-0 flex sm:place-content-center sm:place-items-center items-end z-20 [--w-modal-max-height:80%] [--w-modal-width:640px]",modal:"pb-safe-[32] i-shadow-$shadow-modal max-h-[--w-modal-max-height] min-h-[--w-modal-min-height] w-[--w-modal-width] h-[--w-modal-height] relative transition-300 ease-in-out backface-hidden will-change-height rounded-8 mx-0 sm:mx-16 i-bg-$color-modal-background flex flex-col overflow-hidden outline-none space-y-16 pt-8 sm:pt-32 sm:pb-32 rounded-b-0 sm:rounded-b-8",content:"block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative",footer:"flex justify-end shrink-0 px-16 sm:px-32",transitionTitle:"transition-all duration-300",transitionTitleCenter:"justify-self-center",transitionTitleColSpan:"col-span-2",title:"-mt-4 sm:-mt-8 h-40 sm:h-48 grid gap-8 sm:gap-16 grid-cols-[auto_1fr_auto] items-center px-16 sm:px-32 border-b sm:border-b-0 shrink-0",titleText:"mb-0 h4 sm:h3",titleButton:`${o.medium} ${t.pill} ${i.pill} sm:min-h-[44px] sm:min-w-[44px] min-h-[32px] min-w-[32px]`,titleButtonLeft:"-ml-8 sm:-ml-12 justify-self-start",titleButtonRight:"-mr-8 sm:-mr-12 justify-self-end",titleButtonIcon:"h-16 w-16 sm:h-24 sm:w-24",titleButtonIconRotated:"transform rotate-90"},b={alert:"flex p-16 border border-l-4 rounded-4",willChangeHeight:"will-change-height",textWrapper:"last-child:mb-0 text-s",title:"text-s",icon:"w-16 mr-8 min-w-16",negative:"i-border-$color-alert-negative-subtle-border i-bg-$color-alert-negative-background i-text-$color-alert-negative-text i-border-l-$color-alert-negative-border",negativeIcon:"i-text-$color-alert-negative-icon",positive:"i-border-$color-alert-positive-subtle-border i-bg-$color-alert-positive-background i-text-$color-alert-positive-text i-border-l-$color-alert-positive-border",positiveIcon:"i-text-$color-alert-positive-icon",warning:"i-border-$color-alert-warning-subtle-border i-bg-$color-alert-warning-background i-text-$color-alert-warning-text i-border-l-$color-alert-warning-border",warningIcon:"i-text-$color-alert-warning-icon",info:"i-border-$color-alert-info-subtle-border i-bg-$color-alert-info-background i-text-$color-alert-info-text i-border-l-$color-alert-info-border",infoIcon:"i-text-$color-alert-info-icon"};var w={label:"antialiased block relative text-s font-bold pb-4 cursor-pointer i-text-$color-label-text",labelInvalid:"i-text-$color-label-text-negative",optional:"pl-8 font-normal text-s i-text-$color-label-optional-text"};var v="absolute top-0 bottom-0 flex justify-center items-center focusable focus:[--w-outline-offset:-2px] bg-transparent ",q={wrapper:v+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text"},T={wrapper:v+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text"};var C={toggle:"absolute inset-0 h-full w-full appearance-none cursor-pointer focusable focusable-inset",label:`px-12 ${w.label} py-8! cursor-pointer focusable focusable-inset`,buttonOrLink:"bg-transparent focusable",buttonOrLinkStretch:"inset-0 absolute"};var I={base:"border-2 relative flex items-start",tooltip:"i-bg-$color-tooltip-background i-border-$color-tooltip-background i-shadow-$shadow-tooltip i-text-$color-tooltip-text rounded-4 py-6 px-8",callout:"i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8",highlight:"i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8 drop-shadow-m",popover:"i-bg-$color-popover-background i-border-$color-popover-background i-text-$color-popover-paragraph-text rounded-8 p-16 drop-shadow-m",arrowBase:"absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",arrowDirectionLeft:"-left-[8px]",arrowDirectionRight:"-right-[8px]",arrowDirectionBottom:"-bottom-[8px]",arrowDirectionTop:"-top-[8px]",arrowTooltip:"i-bg-$color-tooltip-background i-border-$color-tooltip-background",arrowCallout:"i-bg-$color-callout-background i-border-$color-callout-border",arrowPopover:"i-bg-$color-popover-background i-border-$color-popover-background",arrowHighlight:"i-bg-$color-callout-background i-border-$color-callout-border",content:"last-child:mb-0",notCallout:"absolute z-50",closeBtn:`${o.medium} ${t.pill} ${i.pill} justify-self-end -mr-8 ml-8`};var p=function(){for(var a=[],l=arguments.length;l--;)a[l]=arguments[l];return a.reduce(function(c,n){return c.concat(typeof n=="string"?n:Array.isArray(n)?p.apply(void 0,n):typeof n=="object"&&n?Object.keys(n).map(function(h){return n[h]?h:""}):"")},[]).join(" ")};var u={negative:"negative",positive:"positive",warning:"warning",info:"info"},g=class extends m{constructor(){super(),this.show=!1,this.role="alert"}connectedCallback(){if(super.connectedCallback(),!this.variant||!u[this.variant])throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
|
|
2
|
-
|
|
1
|
+
var Ke=Object.defineProperty;var er=(e,r,t)=>r in e?Ke(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var X=(e,r,t)=>(er(e,typeof r!="symbol"?r+"":r,t),t);import Ye from"@warp-ds/elements-core";import{css as So,html as U}from"lit";var Y={box:"group block relative break-words last-child:mb-0 p-16 rounded-8",bleed:"-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8",info:"i-bg-$color-box-info-background i-text-$color-box-info-text",neutral:"i-bg-$color-box-neutral-background i-text-$color-box-neutral-text",bordered:"border-2 i-border-$color-box-bordered-border i-bg-$color-box-bordered-background i-text-$color-box-bordered-text",infoClickable:"hover:i-bg-$color-box-info-background-hover active:i-bg-$color-box-info-background-hover",neutralClickable:"hover:i-bg-$color-box-neutral-background-hover active:i-bg-$color-box-neutral-background-hover",borderedClickable:"hover:i-bg-$color-box-bordered-background-hover active:i-bg-$color-box-bordered-background-hover hover:i-border-$color-box-bordered-border-hover active:i-border-$color-box-bordered-border-hover"};var rr="focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block",To={expandable:"will-change-height",expandableTitle:"font-bold i-text-$color-expandable-title-text",expandableBox:"i-bg-$color-expandable-background hover:i-bg-$color-expandable-background-hover py-0 px-0 "+Y.box,expandableBleed:Y.bleed,chevron:"inline-block align-middle i-text-$color-expandable-icon",chevronNonBox:"relative left-8",chevronBox:"absolute right-16",chevronTransform:"transform transition-transform transform-gpu ease-in-out",chevronExpand:"-rotate-180",chevronCollapse:"rotate-180",expansion:"overflow-hidden",expansionNotExpanded:"h-0 invisible",button:rr+" hover:underline focus:underline",buttonBox:"w-full text-left relative inline-flex items-center "+Y.box,paddingTop:"pt-0",title:"flex justify-between items-center",titleType:"h4"},L="font-bold focusable justify-center transition-colors ease-in-out",$={primary:"i-text-$color-button-primary-text hover:i-text-$color-button-primary-text i-bg-$color-button-primary-background hover:i-bg-$color-button-primary-background-hover active:i-bg-$color-button-primary-background-active",secondary:"i-text-$color-button-secondary-text hover:i-text-$color-button-secondary-text i-border-$color-button-secondary-border i-bg-$color-button-secondary-background hover:i-bg-$color-button-secondary-background-hover hover:i-border-$color-button-secondary-border-hover active:i-bg-$color-button-secondary-background-active",utility:"i-text-$color-button-utility-text hover:i-text-$color-button-utility-text i-bg-$color-button-utility-background i-border-$color-button-utility-border hover:i-bg-$color-button-utility-background hover:i-border-$color-button-utility-border-hover active:i-border-$color-button-utility-border-active",destructive:"i-bg-$color-button-negative-background i-text-$color-button-negative-text hover:i-text-$color-button-negative-text hover:i-bg-$color-button-negative-background-hover active:i-bg-$color-button-negative-background-active",pill:"i-text-$color-button-pill-icon hover:i-text-$color-button-pill-icon-hover active:i-text-$color-button-pill-icon-active i-bg-$color-button-pill-background hover:i-bg-$color-button-pill-background-hover active:i-bg-$color-button-pill-background-active",disabled:"i-text-$color-button-disabled-text i-bg-$color-button-disabled-background",quiet:"i-bg-$color-button-quiet-background i-text-$color-button-quiet-text hover:i-bg-$color-button-quiet-background-hover active:i-bg-$color-button-quiet-background-active",utilityQuiet:"i-text-$color-button-utility-quiet-text i-bg-$color-button-utility-quiet-background hover:i-bg-$color-button-utility-quiet-background-hover",negativeQuiet:"i-bg-$color-button-negative-quiet-background i-text-$color-button-negative-quiet-text hover:i-bg-$color-button-negative-quiet-background-hover active:i-bg-$color-button-negative-quiet-background-active",loading:"i-text-$color-button-loading-text i-bg-$color-button-loading-background",link:"i-text-$color-button-link-text"},m={primary:`border-0 rounded-8 ${L}`,secondary:`border-2 rounded-8 ${L}`,utility:`border rounded-4 ${L}`,negative:`border-0 rounded-8 ${L}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${L}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline ${$.link}`},p={xsmall:"py-6 px-16",small:"py-8 px-16",medium:"py-10 px-14",large:"py-12 px-16",utility:"py-[11px] px-[15px]",smallUtility:"py-[7px] px-[15px]",pill:"min-h-[44px] min-w-[44px]",pillSmall:"min-h-32 min-w-32",link:"p-0"},b={medium:"text-m leading-[24]",xsmall:"text-xs"},u={inProgress:`border-transparent animate-inprogress pointer-events-none ${$.loading}`,quiet:`border-0 rounded-8 ${L}`,utilityQuiet:`border-0 rounded-4 ${L}`,negativeQuiet:`border-0 rounded-8 ${L}`,isDisabled:`font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${$.disabled}`},jo={secondary:`${p.medium} ${b.medium} ${m.secondary} ${$.secondary}`,secondaryHref:`${p.medium} ${b.medium} ${m.secondary} ${$.secondary}`,secondaryDisabled:`${p.medium} ${b.medium} ${m.secondary} ${u.isDisabled}`,secondarySmall:`${b.xsmall} ${p.xsmall} ${m.secondary} ${$.secondary}`,secondarySmallDisabled:`${b.xsmall} ${p.xsmall} ${m.secondary} ${u.isDisabled}`,secondaryQuiet:`${p.medium} ${b.medium} ${u.quiet} ${$.quiet}`,secondaryQuietDisabled:`${p.medium} ${b.medium} ${u.quiet} ${u.isDisabled}`,secondarySmallQuiet:`${b.xsmall} ${p.xsmall} ${u.quiet} ${$.quiet}`,secondarySmallQuietDisabled:`${b.xsmall} ${p.xsmall} ${u.quiet} ${u.isDisabled}`,secondaryLoading:`${p.medium} ${b.medium} ${m.secondary} ${u.inProgress}`,secondarySmallLoading:`${b.xsmall} ${p.xsmall} ${m.secondary} ${u.inProgress}`,secondarySmallQuietLoading:`${b.xsmall} ${p.xsmall} ${u.quiet} ${u.inProgress}`,secondaryQuietLoading:`${p.medium} ${b.medium} ${u.quiet} ${u.inProgress}`,primary:`${p.large} ${b.medium} ${m.primary} ${$.primary}`,primaryDisabled:`${p.large} ${b.medium} ${u.isDisabled} ${m.primary}`,primarySmall:`${p.small} ${b.xsmall} ${m.primary} ${$.primary}`,primarySmallDisabled:`${p.small} ${b.xsmall} ${u.isDisabled} ${m.primary} `,primaryQuiet:`${p.large} ${b.medium} ${u.quiet} ${$.quiet}`,primaryQuietDisabled:`${p.large} ${b.medium} ${u.quiet} ${u.isDisabled}`,primarySmallQuiet:`${p.small} ${b.xsmall} ${u.quiet} ${$.quiet}`,primarySmallQuietDisabled:`${p.small} ${b.xsmall} ${u.quiet} ${u.isDisabled}`,primaryLoading:`${p.large} ${b.medium} ${u.inProgress} ${m.primary}`,primarySmallLoading:`${p.small} ${b.xsmall} ${u.inProgress} ${m.primary}`,primarySmallQuietLoading:`${p.small} ${b.xsmall} ${u.quiet} ${u.inProgress} ${m.primary}`,primaryQuietLoading:`${p.large} ${b.medium} ${u.quiet} ${u.inProgress}`,utility:`${p.utility} ${b.medium} ${m.utility} ${$.utility}`,utilityDisabled:`${p.utility} ${b.medium} ${m.utility} ${u.isDisabled}`,utilityQuiet:`${p.large} ${b.medium} ${u.utilityQuiet} ${$.utilityQuiet}`,utilityQuietDisabled:`${p.large} ${b.medium} ${u.utilityQuiet} ${u.isDisabled}`,utilitySmall:`${p.smallUtility} ${b.xsmall} ${m.utility} ${$.utility}`,utilitySmallDisabled:`${p.smallUtility} ${b.xsmall} ${m.utility} ${u.isDisabled}`,utilitySmallQuiet:`${p.smallUtility} ${b.xsmall} ${u.utilityQuiet} ${$.utilityQuiet}`,utilitySmallQuietDisabled:`${p.smallUtility} ${b.xsmall} ${u.utilityQuiet} ${u.isDisabled}`,utilityLoading:`${p.large} ${b.medium} ${m.utility} ${u.inProgress}`,utilitySmallLoading:`${p.smallUtility} ${b.xsmall} ${m.utility} ${u.inProgress}`,utilityQuietLoading:`${p.large} ${b.medium} ${u.inProgress} ${u.utilityQuiet}`,utilitySmallQuietLoading:`${p.smallUtility} ${b.xsmall} ${u.inProgress} ${u.utilityQuiet}`,negative:`${p.large} ${b.medium} ${m.negative} ${$.destructive}`,negativeDisabled:`${p.large} ${b.medium} ${m.negative} ${u.isDisabled}`,negativeQuiet:`${p.large} ${b.medium} ${u.negativeQuiet} ${$.negativeQuiet}`,negativeQuietDisabled:`${p.large} ${b.medium} ${u.negativeQuiet}${u.isDisabled}`,negativeSmall:`${p.small} ${b.xsmall} ${m.negative} ${$.destructive}`,negativeSmallDisabled:`${p.small} ${b.xsmall} ${m.negative} ${u.isDisabled}`,negativeSmallQuiet:`${p.small} ${b.xsmall} ${u.negativeQuiet} ${$.negativeQuiet}`,negativeSmallQuietDisabled:`${p.small} ${b.xsmall} ${u.negativeQuiet} ${u.isDisabled}`,negativeLoading:`${p.large} ${b.medium} ${m.negative} ${u.inProgress}`,negativeSmallLoading:`${p.small} ${b.xsmall} ${u.inProgress} ${m.negative}`,negativeQuietLoading:`${p.large} ${b.medium} ${u.negativeQuiet} ${m.negative} ${u.inProgress}`,negativeSmallQuietLoading:`${p.small} ${b.xsmall} ${u.negativeQuiet} ${u.inProgress}`,pill:`${p.pill} ${b.medium} ${m.pill} ${$.pill}`,pillSmall:`${p.pillSmall} ${b.xsmall} ${m.pill} ${$.pill}`,pillLoading:`${p.pill} ${b.medium} ${m.pill} ${u.inProgress}`,pillSmallLoading:`${p.pillSmall} ${b.xsmall} ${m.pill} ${u.inProgress}`,link:`${p.link} ${b.medium} ${m.link}`,linkSmall:`${p.link} ${b.xsmall} ${m.link}`,linkAsButton:"inline-block hover:no-underline text-center",a11y:"sr-only",fullWidth:"w-full max-w-full",contentWidth:"max-w-max"};var Lo={transparentBg:'before:i-bg-$color-modal-backdrop-background before:content-[""] before:absolute before:top-0 before:bottom-0 before:left-0 before:right-0 before:opacity-25',backdrop:"fixed inset-0 flex sm:place-content-center sm:place-items-center items-end z-20 [--w-modal-max-height:80%] [--w-modal-width:640px]",modal:"pb-safe-[32] i-shadow-$shadow-modal max-h-[--w-modal-max-height] min-h-[--w-modal-min-height] w-[--w-modal-width] h-[--w-modal-height] relative transition-300 ease-in-out backface-hidden will-change-height rounded-8 mx-0 sm:mx-16 i-bg-$color-modal-background flex flex-col overflow-hidden outline-none space-y-16 pt-8 sm:pt-32 sm:pb-32 rounded-b-0 sm:rounded-b-8",content:"block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative",footer:"flex justify-end shrink-0 px-16 sm:px-32",transitionTitle:"transition-all duration-300",transitionTitleCenter:"justify-self-center",transitionTitleColSpan:"col-span-2",title:"-mt-4 sm:-mt-8 h-40 sm:h-48 grid gap-8 sm:gap-16 grid-cols-[auto_1fr_auto] items-center px-16 sm:px-32 border-b sm:border-b-0 shrink-0",titleText:"mb-0 h4 sm:h3",titleButton:`${b.medium} ${m.pill} ${$.pill} sm:min-h-[44px] sm:min-w-[44px] min-h-[32px] min-w-[32px]`,titleButtonLeft:"-ml-8 sm:-ml-12 justify-self-start",titleButtonRight:"-mr-8 sm:-mr-12 justify-self-end",titleButtonIcon:"h-16 w-16 sm:h-24 sm:w-24",titleButtonIconRotated:"transform rotate-90"},P={alert:"flex p-16 border border-l-4 rounded-4",willChangeHeight:"will-change-height",textWrapper:"last-child:mb-0 text-s",title:"text-s",icon:"w-16 mr-8 min-w-16",negative:"i-border-$color-alert-negative-subtle-border i-bg-$color-alert-negative-background i-text-$color-alert-negative-text i-border-l-$color-alert-negative-border",negativeIcon:"i-text-$color-alert-negative-icon",positive:"i-border-$color-alert-positive-subtle-border i-bg-$color-alert-positive-background i-text-$color-alert-positive-text i-border-l-$color-alert-positive-border",positiveIcon:"i-text-$color-alert-positive-icon",warning:"i-border-$color-alert-warning-subtle-border i-bg-$color-alert-warning-background i-text-$color-alert-warning-text i-border-l-$color-alert-warning-border",warningIcon:"i-text-$color-alert-warning-icon",info:"i-border-$color-alert-info-subtle-border i-bg-$color-alert-info-background i-text-$color-alert-info-text i-border-l-$color-alert-info-border",infoIcon:"i-text-$color-alert-info-icon"};var tr={label:"antialiased block relative text-s font-bold pb-4 cursor-pointer i-text-$color-label-text",labelInvalid:"i-text-$color-label-text-negative",optional:"pl-8 font-normal text-s i-text-$color-label-optional-text"};var ue="absolute top-0 bottom-0 flex justify-center items-center focusable focus:[--w-outline-offset:-2px] bg-transparent ",Co={wrapper:ue+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text"},Po={wrapper:ue+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text"};var Ao={toggle:"absolute inset-0 h-full w-full appearance-none cursor-pointer focusable focusable-inset",label:`px-12 ${tr.label} py-8! cursor-pointer focusable focusable-inset`,buttonOrLink:"bg-transparent focusable",buttonOrLinkStretch:"inset-0 absolute"};var Io={base:"border-2 relative flex items-start",tooltip:"i-bg-$color-tooltip-background i-border-$color-tooltip-background i-shadow-$shadow-tooltip i-text-$color-tooltip-text rounded-4 py-6 px-8",callout:"i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8",highlight:"i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8 drop-shadow-m",popover:"i-bg-$color-popover-background i-border-$color-popover-background i-text-$color-popover-paragraph-text rounded-8 p-16 drop-shadow-m",arrowBase:"absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",arrowDirectionLeft:"-left-[8px]",arrowDirectionRight:"-right-[8px]",arrowDirectionBottom:"-bottom-[8px]",arrowDirectionTop:"-top-[8px]",arrowTooltip:"i-bg-$color-tooltip-background i-border-$color-tooltip-background",arrowCallout:"i-bg-$color-callout-background i-border-$color-callout-border",arrowPopover:"i-bg-$color-popover-background i-border-$color-popover-background",arrowHighlight:"i-bg-$color-callout-background i-border-$color-callout-border",content:"last-child:mb-0",notCallout:"absolute z-50",closeBtn:`${b.medium} ${m.pill} ${$.pill} justify-self-end -mr-8 ml-8`};var Q=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return e.reduce(function(t,o){return t.concat(typeof o=="string"?o:Array.isArray(o)?Q.apply(void 0,o):typeof o=="object"&&o?Object.keys(o).map(function(n){return o[n]?n:""}):"")},[]).join(" ")};import{LitElement as gr}from"lit";import{unsafeStatic as pr,html as fr}from"lit/static-html.js";var or=Object.create,he=Object.defineProperty,ir=Object.getOwnPropertyDescriptor,lr=Object.getOwnPropertyNames,be=Object.getOwnPropertySymbols,ar=Object.getPrototypeOf,me=Object.prototype.hasOwnProperty,nr=Object.prototype.propertyIsEnumerable,sr=(e,r)=>{var t={};for(var o in e)me.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&be)for(var o of be(e))r.indexOf(o)<0&&nr.call(e,o)&&(t[o]=e[o]);return t},ve=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),cr=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of lr(r))!me.call(e,n)&&n!==t&&he(e,n,{get:()=>r[n],enumerable:!(o=ir(r,n))||o.enumerable});return e},dr=(e,r,t)=>(t=e!=null?or(ar(e)):{},cr(r||!e||!e.__esModule?he(t,"default",{value:e,enumerable:!0}):t,e)),ur=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorMessages=e.ErrorType=void 0;var r;(function(t){t.MalformedUnicode="MALFORMED_UNICODE",t.MalformedHexadecimal="MALFORMED_HEXADECIMAL",t.CodePointLimit="CODE_POINT_LIMIT",t.OctalDeprecation="OCTAL_DEPRECATION",t.EndOfString="END_OF_STRING"})(r=e.ErrorType||(e.ErrorType={})),e.errorMessages=new Map([[r.MalformedUnicode,"malformed Unicode character escape sequence"],[r.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[r.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[r.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[r.EndOfString,"malformed escape sequence at end of string"]])}),br=ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;var r=ur();Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return r.ErrorType}}),Object.defineProperty(e,"errorMessages",{enumerable:!0,get:function(){return r.errorMessages}});function t(a){return a.match(/[^a-f0-9]/i)?NaN:parseInt(a,16)}function o(a,c,g){let f=t(a);if(Number.isNaN(f)||g!==void 0&&g!==a.length)throw new SyntaxError(r.errorMessages.get(c));return f}function n(a){let c=o(a,r.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(c)}function i(a,c){let g=o(a,r.ErrorType.MalformedUnicode,4);if(c!==void 0){let f=o(c,r.ErrorType.MalformedUnicode,4);return String.fromCharCode(g,f)}return String.fromCharCode(g)}function l(a){return a.charAt(0)==="{"&&a.charAt(a.length-1)==="}"}function s(a){if(!l(a))throw new SyntaxError(r.errorMessages.get(r.ErrorType.MalformedUnicode));let c=a.slice(1,-1),g=o(c,r.ErrorType.MalformedUnicode);try{return String.fromCodePoint(g)}catch(f){throw f instanceof RangeError?new SyntaxError(r.errorMessages.get(r.ErrorType.CodePointLimit)):f}}function d(a,c=!1){if(c)throw new SyntaxError(r.errorMessages.get(r.ErrorType.OctalDeprecation));let g=parseInt(a,8);return String.fromCharCode(g)}var h=new Map([["b","\b"],["f","\f"],["n",`
|
|
2
|
+
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function v(a){return h.get(a)||a}var y=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function x(a,c=!1){return a.replace(y,function(g,f,k,_,O,C,E,w,D){if(f!==void 0)return"\\";if(k!==void 0)return n(k);if(_!==void 0)return s(_);if(O!==void 0)return i(O,C);if(E!==void 0)return i(E);if(w==="0")return"\0";if(w!==void 0)return d(w,!c);if(D!==void 0)return v(D);throw new SyntaxError(r.errorMessages.get(r.ErrorType.EndOfString))})}e.unraw=x,e.default=x}),hr=dr(br(),1),S=e=>typeof e=="string",mr=e=>typeof e=="function",ge=new Map;function re(e){return[...Array.isArray(e)?e:[e],"en"]}function $e(e,r,t){let o=re(e);return B(()=>H("date",o,t),()=>new Intl.DateTimeFormat(o,t)).format(S(r)?new Date(r):r)}function K(e,r,t){let o=re(e);return B(()=>H("number",o,t),()=>new Intl.NumberFormat(o,t)).format(r)}function pe(e,r,t,o){var n=o,{offset:i=0}=n,l=sr(n,["offset"]),s,d;let h=re(e),v=r?B(()=>H("plural-ordinal",h),()=>new Intl.PluralRules(h,{type:"ordinal"})):B(()=>H("plural-cardinal",h),()=>new Intl.PluralRules(h,{type:"cardinal"}));return(d=(s=l[t])!=null?s:l[v.select(t-i)])!=null?d:l.other}function B(e,r){let t=e(),o=ge.get(t);return o||(o=r(),ge.set(t,o)),o}function H(e,r,t){let o=r.join("-");return`${e}-${o}-${JSON.stringify(t)}`}var xe=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,vr=(e,r,t={})=>{r=r||e;let o=i=>S(i)?t[i]||{style:i}:i,n=(i,l)=>{let s=Object.keys(t).length?o("number"):{},d=K(r,i,s);return l.replace("#",d)};return{plural:(i,l)=>{let{offset:s=0}=l,d=pe(r,!1,i,l);return n(i-s,d)},selectordinal:(i,l)=>{let{offset:s=0}=l,d=pe(r,!0,i,l);return n(i-s,d)},select:(i,l)=>{var s;return(s=l[i])!=null?s:l.other},number:(i,l)=>K(r,i,o(l)),date:(i,l)=>$e(r,i,o(l)),undefined:i=>i}};function $r(e,r,t){return(o,n={})=>{let i=vr(r,t,n),l=d=>Array.isArray(d)?d.reduce((h,v)=>{if(S(v))return h+v;let[y,x,a]=v,c={};a!=null&&!S(a)?Object.keys(a).forEach(f=>{c[f]=l(a[f])}):c=a;let g=i[x](o[y],c);return g==null?h:h+g},""):d,s=l(e);return S(s)&&xe.test(s)?(0,hr.default)(s.trim()):S(s)?s.trim():s}}var xr=Object.defineProperty,yr=(e,r,t)=>r in e?xr(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,wr=(e,r,t)=>(yr(e,typeof r!="symbol"?r+"":r,t),t),kr=class{constructor(){wr(this,"_events",{})}on(e,r){return this._hasEvent(e)||(this._events[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){if(!this._hasEvent(e))return;let t=this._events[e].indexOf(r);~t&&this._events[e].splice(t,1)}emit(e,...r){this._hasEvent(e)&&this._events[e].map(t=>t.apply(this,r))}_hasEvent(e){return Array.isArray(this._events[e])}},_r=Object.defineProperty,Or=(e,r,t)=>r in e?_r(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,A=(e,r,t)=>(Or(e,typeof r!="symbol"?r+"":r,t),t),Er=class extends kr{constructor(e){super(),A(this,"_locale"),A(this,"_locales"),A(this,"_localeData"),A(this,"_messages"),A(this,"_missing"),A(this,"t",this._.bind(this)),this._messages={},this._localeData={},e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(e.locale!=null||e.locales!=null)&&this.activate(e.locale,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,r){this._localeData[e]==null?this._localeData[e]=r:Object.assign(this._localeData[e],r)}loadLocaleData(e,r){r!=null?this._loadLocaleData(e,r):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,r){this._messages[e]==null?this._messages[e]=r:Object.assign(this._messages[e],r)}load(e,r){r!=null?this._load(e,r):Object.keys(e).forEach(t=>this._load(t,e[t])),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:t}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r={},{message:t,formats:o}={}){S(e)||(r=e.values||r,t=e.message,e=e.id);let n=!this.messages[e],i=this._missing;if(i&&n)return mr(i)?i(this._locale,e):i;n&&this.emit("missing",{id:e,locale:this._locale});let l=this.messages[e]||t||e;return S(l)&&xe.test(l)?JSON.parse(`"${l}"`):S(l)?l:$r(l,this._locale,this._locales)(r,o)}date(e,r){return $e(this._locales||this._locale,e,r)}number(e,r){return K(this._locales||this._locale,e,r)}};function Dr(e={}){return new Er(e)}var ee=Dr(),Sr=JSON.parse('{"icon.title.alert-info":"Bl\xE5 sirkel med bokstaven \\"I\\""}'),Mr=JSON.parse('{"icon.title.alert-info":"Blue circle with the letter I"}'),Tr=JSON.parse('{"icon.title.alert-info":"Sininen ympyr\xE4, jonka sis\xE4ll\xE4 on i-kirjain"}'),jr=["en","nb","fi"],ye="en",fe=e=>jr.find(r=>e===r||e.toLowerCase().includes(r))||ye;function Lr(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return fe(e)}try{let e=document.documentElement.lang;return fe(e)}catch(e){return console.warn("could not detect locale, falling back to source locale",e),ye}}var Cr=(e,r,t,o)=>e==="nb"?t:e==="fi"?o:r,Pr=(e,r,t)=>{let o=Lr(),n=Cr(o,e,r,t);ee.load(o,n),ee.activate(o)};Pr(Mr,Sr,Tr);var Ar=class extends gr{render(){let e=ee.t({message:"Blue circle with the letter I",id:"icon.title.alert-info",comment:"Title for alert info icon"});return fr`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16">${pr(`<title>${e}</title>`)}<circle cx="8" cy="8" r="8" fill="currentColor"></circle><path fill="#fff" fill-rule="evenodd" d="M8 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2ZM7.25 12a.75.75 0 0 0 1.5 0V8a.75.75 0 0 0-1.5 0v4Z" clip-rule="evenodd"></path></svg>`}};customElements.get("w-icon-alert-info-16")||customElements.define("w-icon-alert-info-16",Ar);import{LitElement as Gr}from"lit";import{unsafeStatic as zr,html as Vr}from"lit/static-html.js";var Ir=Object.create,Ee=Object.defineProperty,Nr=Object.getOwnPropertyDescriptor,Fr=Object.getOwnPropertyNames,we=Object.getOwnPropertySymbols,Ur=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty,qr=Object.prototype.propertyIsEnumerable,Rr=(e,r)=>{var t={};for(var o in e)De.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&we)for(var o of we(e))r.indexOf(o)<0&&qr.call(e,o)&&(t[o]=e[o]);return t},Se=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Qr=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Fr(r))!De.call(e,n)&&n!==t&&Ee(e,n,{get:()=>r[n],enumerable:!(o=Nr(r,n))||o.enumerable});return e},Br=(e,r,t)=>(t=e!=null?Ir(Ur(e)):{},Qr(r||!e||!e.__esModule?Ee(t,"default",{value:e,enumerable:!0}):t,e)),Hr=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorMessages=e.ErrorType=void 0;var r;(function(t){t.MalformedUnicode="MALFORMED_UNICODE",t.MalformedHexadecimal="MALFORMED_HEXADECIMAL",t.CodePointLimit="CODE_POINT_LIMIT",t.OctalDeprecation="OCTAL_DEPRECATION",t.EndOfString="END_OF_STRING"})(r=e.ErrorType||(e.ErrorType={})),e.errorMessages=new Map([[r.MalformedUnicode,"malformed Unicode character escape sequence"],[r.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[r.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[r.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[r.EndOfString,"malformed escape sequence at end of string"]])}),Jr=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;var r=Hr();Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return r.ErrorType}}),Object.defineProperty(e,"errorMessages",{enumerable:!0,get:function(){return r.errorMessages}});function t(a){return a.match(/[^a-f0-9]/i)?NaN:parseInt(a,16)}function o(a,c,g){let f=t(a);if(Number.isNaN(f)||g!==void 0&&g!==a.length)throw new SyntaxError(r.errorMessages.get(c));return f}function n(a){let c=o(a,r.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(c)}function i(a,c){let g=o(a,r.ErrorType.MalformedUnicode,4);if(c!==void 0){let f=o(c,r.ErrorType.MalformedUnicode,4);return String.fromCharCode(g,f)}return String.fromCharCode(g)}function l(a){return a.charAt(0)==="{"&&a.charAt(a.length-1)==="}"}function s(a){if(!l(a))throw new SyntaxError(r.errorMessages.get(r.ErrorType.MalformedUnicode));let c=a.slice(1,-1),g=o(c,r.ErrorType.MalformedUnicode);try{return String.fromCodePoint(g)}catch(f){throw f instanceof RangeError?new SyntaxError(r.errorMessages.get(r.ErrorType.CodePointLimit)):f}}function d(a,c=!1){if(c)throw new SyntaxError(r.errorMessages.get(r.ErrorType.OctalDeprecation));let g=parseInt(a,8);return String.fromCharCode(g)}var h=new Map([["b","\b"],["f","\f"],["n",`
|
|
3
|
+
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function v(a){return h.get(a)||a}var y=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function x(a,c=!1){return a.replace(y,function(g,f,k,_,O,C,E,w,D){if(f!==void 0)return"\\";if(k!==void 0)return n(k);if(_!==void 0)return s(_);if(O!==void 0)return i(O,C);if(E!==void 0)return i(E);if(w==="0")return"\0";if(w!==void 0)return d(w,!c);if(D!==void 0)return v(D);throw new SyntaxError(r.errorMessages.get(r.ErrorType.EndOfString))})}e.unraw=x,e.default=x}),Wr=Br(Jr(),1),M=e=>typeof e=="string",Zr=e=>typeof e=="function",ke=new Map;function ie(e){return[...Array.isArray(e)?e:[e],"en"]}function Me(e,r,t){let o=ie(e);return J(()=>G("date",o,t),()=>new Intl.DateTimeFormat(o,t)).format(M(r)?new Date(r):r)}function te(e,r,t){let o=ie(e);return J(()=>G("number",o,t),()=>new Intl.NumberFormat(o,t)).format(r)}function _e(e,r,t,o){var n=o,{offset:i=0}=n,l=Rr(n,["offset"]),s,d;let h=ie(e),v=r?J(()=>G("plural-ordinal",h),()=>new Intl.PluralRules(h,{type:"ordinal"})):J(()=>G("plural-cardinal",h),()=>new Intl.PluralRules(h,{type:"cardinal"}));return(d=(s=l[t])!=null?s:l[v.select(t-i)])!=null?d:l.other}function J(e,r){let t=e(),o=ke.get(t);return o||(o=r(),ke.set(t,o)),o}function G(e,r,t){let o=r.join("-");return`${e}-${o}-${JSON.stringify(t)}`}var Te=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,Xr=(e,r,t={})=>{r=r||e;let o=i=>M(i)?t[i]||{style:i}:i,n=(i,l)=>{let s=Object.keys(t).length?o("number"):{},d=te(r,i,s);return l.replace("#",d)};return{plural:(i,l)=>{let{offset:s=0}=l,d=_e(r,!1,i,l);return n(i-s,d)},selectordinal:(i,l)=>{let{offset:s=0}=l,d=_e(r,!0,i,l);return n(i-s,d)},select:(i,l)=>{var s;return(s=l[i])!=null?s:l.other},number:(i,l)=>te(r,i,o(l)),date:(i,l)=>Me(r,i,o(l)),undefined:i=>i}};function Yr(e,r,t){return(o,n={})=>{let i=Xr(r,t,n),l=d=>Array.isArray(d)?d.reduce((h,v)=>{if(M(v))return h+v;let[y,x,a]=v,c={};a!=null&&!M(a)?Object.keys(a).forEach(f=>{c[f]=l(a[f])}):c=a;let g=i[x](o[y],c);return g==null?h:h+g},""):d,s=l(e);return M(s)&&Te.test(s)?(0,Wr.default)(s.trim()):M(s)?s.trim():s}}var Kr=Object.defineProperty,et=(e,r,t)=>r in e?Kr(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,rt=(e,r,t)=>(et(e,typeof r!="symbol"?r+"":r,t),t),tt=class{constructor(){rt(this,"_events",{})}on(e,r){return this._hasEvent(e)||(this._events[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){if(!this._hasEvent(e))return;let t=this._events[e].indexOf(r);~t&&this._events[e].splice(t,1)}emit(e,...r){this._hasEvent(e)&&this._events[e].map(t=>t.apply(this,r))}_hasEvent(e){return Array.isArray(this._events[e])}},ot=Object.defineProperty,it=(e,r,t)=>r in e?ot(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,I=(e,r,t)=>(it(e,typeof r!="symbol"?r+"":r,t),t),lt=class extends tt{constructor(e){super(),I(this,"_locale"),I(this,"_locales"),I(this,"_localeData"),I(this,"_messages"),I(this,"_missing"),I(this,"t",this._.bind(this)),this._messages={},this._localeData={},e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(e.locale!=null||e.locales!=null)&&this.activate(e.locale,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,r){this._localeData[e]==null?this._localeData[e]=r:Object.assign(this._localeData[e],r)}loadLocaleData(e,r){r!=null?this._loadLocaleData(e,r):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,r){this._messages[e]==null?this._messages[e]=r:Object.assign(this._messages[e],r)}load(e,r){r!=null?this._load(e,r):Object.keys(e).forEach(t=>this._load(t,e[t])),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:t}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r={},{message:t,formats:o}={}){M(e)||(r=e.values||r,t=e.message,e=e.id);let n=!this.messages[e],i=this._missing;if(i&&n)return Zr(i)?i(this._locale,e):i;n&&this.emit("missing",{id:e,locale:this._locale});let l=this.messages[e]||t||e;return M(l)&&Te.test(l)?JSON.parse(`"${l}"`):M(l)?l:Yr(l,this._locale,this._locales)(r,o)}date(e,r){return Me(this._locales||this._locale,e,r)}number(e,r){return te(this._locales||this._locale,e,r)}};function at(e={}){return new lt(e)}var oe=at(),nt=JSON.parse('{"icon.title.alert-warning":"Gul varseltrekant med utropstegn"}'),st=JSON.parse('{"icon.title.alert-warning":"Yellow warning triangle with exclamation point"}'),ct=JSON.parse('{"icon.title.alert-warning":"Keltainen varoituskolmio, jonka sis\xE4ll\xE4 on huutomerkki"}'),dt=["en","nb","fi"],je="en",Oe=e=>dt.find(r=>e===r||e.toLowerCase().includes(r))||je;function ut(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return Oe(e)}try{let e=document.documentElement.lang;return Oe(e)}catch(e){return console.warn("could not detect locale, falling back to source locale",e),je}}var bt=(e,r,t,o)=>e==="nb"?t:e==="fi"?o:r,gt=(e,r,t)=>{let o=ut(),n=bt(o,e,r,t);oe.load(o,n),oe.activate(o)};gt(st,nt,ct);var pt=class extends Gr{render(){let e=oe.t({message:"Yellow warning triangle with exclamation point",id:"icon.title.alert-warning",comment:"Title for alert warning icon"});return Vr`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16">${zr(`<title>${e}</title>`)}<path fill="currentColor" d="M.245 12.01 6.159 1.083c.782-1.445 2.9-1.445 3.682 0l5.914 10.925c.734 1.357-.271 2.991-1.84 2.991H2.084C.517 15-.49 13.366.246 12.01Z"></path><path fill="#fff" fill-rule="evenodd" d="M8 3.25a.75.75 0 0 1 .75.75v5a.75.75 0 0 1-1.5 0V4A.75.75 0 0 1 8 3.25Z" clip-rule="evenodd"></path><path fill="#fff" d="M8.8 11.8a.8.8 0 1 1-1.6 0 .8.8 0 0 1 1.6 0Z"></path></svg>`}};customElements.get("w-icon-alert-warning-16")||customElements.define("w-icon-alert-warning-16",pt);import{LitElement as Ot}from"lit";import{unsafeStatic as Et,html as Dt}from"lit/static-html.js";var ft=Object.create,Ie=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,mt=Object.getOwnPropertyNames,Le=Object.getOwnPropertySymbols,vt=Object.getPrototypeOf,Ne=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable,xt=(e,r)=>{var t={};for(var o in e)Ne.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&Le)for(var o of Le(e))r.indexOf(o)<0&&$t.call(e,o)&&(t[o]=e[o]);return t},Fe=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),yt=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of mt(r))!Ne.call(e,n)&&n!==t&&Ie(e,n,{get:()=>r[n],enumerable:!(o=ht(r,n))||o.enumerable});return e},wt=(e,r,t)=>(t=e!=null?ft(vt(e)):{},yt(r||!e||!e.__esModule?Ie(t,"default",{value:e,enumerable:!0}):t,e)),kt=Fe(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorMessages=e.ErrorType=void 0;var r;(function(t){t.MalformedUnicode="MALFORMED_UNICODE",t.MalformedHexadecimal="MALFORMED_HEXADECIMAL",t.CodePointLimit="CODE_POINT_LIMIT",t.OctalDeprecation="OCTAL_DEPRECATION",t.EndOfString="END_OF_STRING"})(r=e.ErrorType||(e.ErrorType={})),e.errorMessages=new Map([[r.MalformedUnicode,"malformed Unicode character escape sequence"],[r.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[r.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[r.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[r.EndOfString,"malformed escape sequence at end of string"]])}),_t=Fe(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;var r=kt();Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return r.ErrorType}}),Object.defineProperty(e,"errorMessages",{enumerable:!0,get:function(){return r.errorMessages}});function t(a){return a.match(/[^a-f0-9]/i)?NaN:parseInt(a,16)}function o(a,c,g){let f=t(a);if(Number.isNaN(f)||g!==void 0&&g!==a.length)throw new SyntaxError(r.errorMessages.get(c));return f}function n(a){let c=o(a,r.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(c)}function i(a,c){let g=o(a,r.ErrorType.MalformedUnicode,4);if(c!==void 0){let f=o(c,r.ErrorType.MalformedUnicode,4);return String.fromCharCode(g,f)}return String.fromCharCode(g)}function l(a){return a.charAt(0)==="{"&&a.charAt(a.length-1)==="}"}function s(a){if(!l(a))throw new SyntaxError(r.errorMessages.get(r.ErrorType.MalformedUnicode));let c=a.slice(1,-1),g=o(c,r.ErrorType.MalformedUnicode);try{return String.fromCodePoint(g)}catch(f){throw f instanceof RangeError?new SyntaxError(r.errorMessages.get(r.ErrorType.CodePointLimit)):f}}function d(a,c=!1){if(c)throw new SyntaxError(r.errorMessages.get(r.ErrorType.OctalDeprecation));let g=parseInt(a,8);return String.fromCharCode(g)}var h=new Map([["b","\b"],["f","\f"],["n",`
|
|
4
|
+
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function v(a){return h.get(a)||a}var y=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function x(a,c=!1){return a.replace(y,function(g,f,k,_,O,C,E,w,D){if(f!==void 0)return"\\";if(k!==void 0)return n(k);if(_!==void 0)return s(_);if(O!==void 0)return i(O,C);if(E!==void 0)return i(E);if(w==="0")return"\0";if(w!==void 0)return d(w,!c);if(D!==void 0)return v(D);throw new SyntaxError(r.errorMessages.get(r.ErrorType.EndOfString))})}e.unraw=x,e.default=x}),St=wt(_t(),1),T=e=>typeof e=="string",Mt=e=>typeof e=="function",Ce=new Map;function ne(e){return[...Array.isArray(e)?e:[e],"en"]}function Ue(e,r,t){let o=ne(e);return z(()=>V("date",o,t),()=>new Intl.DateTimeFormat(o,t)).format(T(r)?new Date(r):r)}function le(e,r,t){let o=ne(e);return z(()=>V("number",o,t),()=>new Intl.NumberFormat(o,t)).format(r)}function Pe(e,r,t,o){var n=o,{offset:i=0}=n,l=xt(n,["offset"]),s,d;let h=ne(e),v=r?z(()=>V("plural-ordinal",h),()=>new Intl.PluralRules(h,{type:"ordinal"})):z(()=>V("plural-cardinal",h),()=>new Intl.PluralRules(h,{type:"cardinal"}));return(d=(s=l[t])!=null?s:l[v.select(t-i)])!=null?d:l.other}function z(e,r){let t=e(),o=Ce.get(t);return o||(o=r(),Ce.set(t,o)),o}function V(e,r,t){let o=r.join("-");return`${e}-${o}-${JSON.stringify(t)}`}var qe=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,Tt=(e,r,t={})=>{r=r||e;let o=i=>T(i)?t[i]||{style:i}:i,n=(i,l)=>{let s=Object.keys(t).length?o("number"):{},d=le(r,i,s);return l.replace("#",d)};return{plural:(i,l)=>{let{offset:s=0}=l,d=Pe(r,!1,i,l);return n(i-s,d)},selectordinal:(i,l)=>{let{offset:s=0}=l,d=Pe(r,!0,i,l);return n(i-s,d)},select:(i,l)=>{var s;return(s=l[i])!=null?s:l.other},number:(i,l)=>le(r,i,o(l)),date:(i,l)=>Ue(r,i,o(l)),undefined:i=>i}};function jt(e,r,t){return(o,n={})=>{let i=Tt(r,t,n),l=d=>Array.isArray(d)?d.reduce((h,v)=>{if(T(v))return h+v;let[y,x,a]=v,c={};a!=null&&!T(a)?Object.keys(a).forEach(f=>{c[f]=l(a[f])}):c=a;let g=i[x](o[y],c);return g==null?h:h+g},""):d,s=l(e);return T(s)&&qe.test(s)?(0,St.default)(s.trim()):T(s)?s.trim():s}}var Lt=Object.defineProperty,Ct=(e,r,t)=>r in e?Lt(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Pt=(e,r,t)=>(Ct(e,typeof r!="symbol"?r+"":r,t),t),At=class{constructor(){Pt(this,"_events",{})}on(e,r){return this._hasEvent(e)||(this._events[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){if(!this._hasEvent(e))return;let t=this._events[e].indexOf(r);~t&&this._events[e].splice(t,1)}emit(e,...r){this._hasEvent(e)&&this._events[e].map(t=>t.apply(this,r))}_hasEvent(e){return Array.isArray(this._events[e])}},It=Object.defineProperty,Nt=(e,r,t)=>r in e?It(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,N=(e,r,t)=>(Nt(e,typeof r!="symbol"?r+"":r,t),t),Ft=class extends At{constructor(e){super(),N(this,"_locale"),N(this,"_locales"),N(this,"_localeData"),N(this,"_messages"),N(this,"_missing"),N(this,"t",this._.bind(this)),this._messages={},this._localeData={},e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(e.locale!=null||e.locales!=null)&&this.activate(e.locale,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,r){this._localeData[e]==null?this._localeData[e]=r:Object.assign(this._localeData[e],r)}loadLocaleData(e,r){r!=null?this._loadLocaleData(e,r):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,r){this._messages[e]==null?this._messages[e]=r:Object.assign(this._messages[e],r)}load(e,r){r!=null?this._load(e,r):Object.keys(e).forEach(t=>this._load(t,e[t])),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:t}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r={},{message:t,formats:o}={}){T(e)||(r=e.values||r,t=e.message,e=e.id);let n=!this.messages[e],i=this._missing;if(i&&n)return Mt(i)?i(this._locale,e):i;n&&this.emit("missing",{id:e,locale:this._locale});let l=this.messages[e]||t||e;return T(l)&&qe.test(l)?JSON.parse(`"${l}"`):T(l)?l:jt(l,this._locale,this._locales)(r,o)}date(e,r){return Ue(this._locales||this._locale,e,r)}number(e,r){return le(this._locales||this._locale,e,r)}};function Ut(e={}){return new Ft(e)}var ae=Ut(),qt=JSON.parse('{"icon.title.alert-error":"R\xF8d \xE5ttekant med hvitt utropstegn"}'),Rt=JSON.parse('{"icon.title.alert-error":"Red octagon with white exclamation point"}'),Qt=JSON.parse('{"icon.title.alert-error":"Punainen kahdeksankulmio, jonka sis\xE4ll\xE4 on valkoinen huutomerkki"}'),Bt=["en","nb","fi"],Re="en",Ae=e=>Bt.find(r=>e===r||e.toLowerCase().includes(r))||Re;function Ht(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return Ae(e)}try{let e=document.documentElement.lang;return Ae(e)}catch(e){return console.warn("could not detect locale, falling back to source locale",e),Re}}var Jt=(e,r,t,o)=>e==="nb"?t:e==="fi"?o:r,Gt=(e,r,t)=>{let o=Ht(),n=Jt(o,e,r,t);ae.load(o,n),ae.activate(o)};Gt(Rt,qt,Qt);var zt=class extends Ot{render(){let e=ae.t({message:"Red octagon with white exclamation point",id:"icon.title.alert-error",comment:"Title for alert error icon"});return Dt`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16">${Et(`<title>${e}</title>`)}<path fill="currentColor" d="M4.1.586A2 2 0 0 1 5.516 0h4.97A2 2 0 0 1 11.9.586L15.413 4.1A2 2 0 0 1 16 5.514v4.97a2 2 0 0 1-.586 1.415L11.9 15.413a2 2 0 0 1-1.415.586h-4.97a2 2 0 0 1-1.414-.586L.586 11.9A2 2 0 0 1 0 10.485v-4.97A2 2 0 0 1 .586 4.1L4.1.586Z"></path><path fill="#fff" fill-rule="evenodd" d="M8 3.25a.75.75 0 0 1 .75.75v5a.75.75 0 1 1-1.5 0V4A.75.75 0 0 1 8 3.25Z" clip-rule="evenodd"></path><path fill="#fff" d="M8.8 11.8a.8.8 0 1 1-1.6 0 .8.8 0 0 1 1.6 0Z"></path></svg>`}};customElements.get("w-icon-alert-error-16")||customElements.define("w-icon-alert-error-16",zt);import{LitElement as io}from"lit";import{unsafeStatic as lo,html as ao}from"lit/static-html.js";var Vt=Object.create,Ge=Object.defineProperty,Wt=Object.getOwnPropertyDescriptor,Zt=Object.getOwnPropertyNames,Qe=Object.getOwnPropertySymbols,Xt=Object.getPrototypeOf,ze=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable,Kt=(e,r)=>{var t={};for(var o in e)ze.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&Qe)for(var o of Qe(e))r.indexOf(o)<0&&Yt.call(e,o)&&(t[o]=e[o]);return t},Ve=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),eo=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Zt(r))!ze.call(e,n)&&n!==t&&Ge(e,n,{get:()=>r[n],enumerable:!(o=Wt(r,n))||o.enumerable});return e},ro=(e,r,t)=>(t=e!=null?Vt(Xt(e)):{},eo(r||!e||!e.__esModule?Ge(t,"default",{value:e,enumerable:!0}):t,e)),to=Ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorMessages=e.ErrorType=void 0;var r;(function(t){t.MalformedUnicode="MALFORMED_UNICODE",t.MalformedHexadecimal="MALFORMED_HEXADECIMAL",t.CodePointLimit="CODE_POINT_LIMIT",t.OctalDeprecation="OCTAL_DEPRECATION",t.EndOfString="END_OF_STRING"})(r=e.ErrorType||(e.ErrorType={})),e.errorMessages=new Map([[r.MalformedUnicode,"malformed Unicode character escape sequence"],[r.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[r.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[r.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[r.EndOfString,"malformed escape sequence at end of string"]])}),oo=Ve(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;var r=to();Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return r.ErrorType}}),Object.defineProperty(e,"errorMessages",{enumerable:!0,get:function(){return r.errorMessages}});function t(a){return a.match(/[^a-f0-9]/i)?NaN:parseInt(a,16)}function o(a,c,g){let f=t(a);if(Number.isNaN(f)||g!==void 0&&g!==a.length)throw new SyntaxError(r.errorMessages.get(c));return f}function n(a){let c=o(a,r.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(c)}function i(a,c){let g=o(a,r.ErrorType.MalformedUnicode,4);if(c!==void 0){let f=o(c,r.ErrorType.MalformedUnicode,4);return String.fromCharCode(g,f)}return String.fromCharCode(g)}function l(a){return a.charAt(0)==="{"&&a.charAt(a.length-1)==="}"}function s(a){if(!l(a))throw new SyntaxError(r.errorMessages.get(r.ErrorType.MalformedUnicode));let c=a.slice(1,-1),g=o(c,r.ErrorType.MalformedUnicode);try{return String.fromCodePoint(g)}catch(f){throw f instanceof RangeError?new SyntaxError(r.errorMessages.get(r.ErrorType.CodePointLimit)):f}}function d(a,c=!1){if(c)throw new SyntaxError(r.errorMessages.get(r.ErrorType.OctalDeprecation));let g=parseInt(a,8);return String.fromCharCode(g)}var h=new Map([["b","\b"],["f","\f"],["n",`
|
|
5
|
+
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function v(a){return h.get(a)||a}var y=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function x(a,c=!1){return a.replace(y,function(g,f,k,_,O,C,E,w,D){if(f!==void 0)return"\\";if(k!==void 0)return n(k);if(_!==void 0)return s(_);if(O!==void 0)return i(O,C);if(E!==void 0)return i(E);if(w==="0")return"\0";if(w!==void 0)return d(w,!c);if(D!==void 0)return v(D);throw new SyntaxError(r.errorMessages.get(r.ErrorType.EndOfString))})}e.unraw=x,e.default=x}),no=ro(oo(),1),j=e=>typeof e=="string",so=e=>typeof e=="function",Be=new Map;function de(e){return[...Array.isArray(e)?e:[e],"en"]}function We(e,r,t){let o=de(e);return W(()=>Z("date",o,t),()=>new Intl.DateTimeFormat(o,t)).format(j(r)?new Date(r):r)}function se(e,r,t){let o=de(e);return W(()=>Z("number",o,t),()=>new Intl.NumberFormat(o,t)).format(r)}function He(e,r,t,o){var n=o,{offset:i=0}=n,l=Kt(n,["offset"]),s,d;let h=de(e),v=r?W(()=>Z("plural-ordinal",h),()=>new Intl.PluralRules(h,{type:"ordinal"})):W(()=>Z("plural-cardinal",h),()=>new Intl.PluralRules(h,{type:"cardinal"}));return(d=(s=l[t])!=null?s:l[v.select(t-i)])!=null?d:l.other}function W(e,r){let t=e(),o=Be.get(t);return o||(o=r(),Be.set(t,o)),o}function Z(e,r,t){let o=r.join("-");return`${e}-${o}-${JSON.stringify(t)}`}var Ze=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,co=(e,r,t={})=>{r=r||e;let o=i=>j(i)?t[i]||{style:i}:i,n=(i,l)=>{let s=Object.keys(t).length?o("number"):{},d=se(r,i,s);return l.replace("#",d)};return{plural:(i,l)=>{let{offset:s=0}=l,d=He(r,!1,i,l);return n(i-s,d)},selectordinal:(i,l)=>{let{offset:s=0}=l,d=He(r,!0,i,l);return n(i-s,d)},select:(i,l)=>{var s;return(s=l[i])!=null?s:l.other},number:(i,l)=>se(r,i,o(l)),date:(i,l)=>We(r,i,o(l)),undefined:i=>i}};function uo(e,r,t){return(o,n={})=>{let i=co(r,t,n),l=d=>Array.isArray(d)?d.reduce((h,v)=>{if(j(v))return h+v;let[y,x,a]=v,c={};a!=null&&!j(a)?Object.keys(a).forEach(f=>{c[f]=l(a[f])}):c=a;let g=i[x](o[y],c);return g==null?h:h+g},""):d,s=l(e);return j(s)&&Ze.test(s)?(0,no.default)(s.trim()):j(s)?s.trim():s}}var bo=Object.defineProperty,go=(e,r,t)=>r in e?bo(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,po=(e,r,t)=>(go(e,typeof r!="symbol"?r+"":r,t),t),fo=class{constructor(){po(this,"_events",{})}on(e,r){return this._hasEvent(e)||(this._events[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){if(!this._hasEvent(e))return;let t=this._events[e].indexOf(r);~t&&this._events[e].splice(t,1)}emit(e,...r){this._hasEvent(e)&&this._events[e].map(t=>t.apply(this,r))}_hasEvent(e){return Array.isArray(this._events[e])}},ho=Object.defineProperty,mo=(e,r,t)=>r in e?ho(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,F=(e,r,t)=>(mo(e,typeof r!="symbol"?r+"":r,t),t),vo=class extends fo{constructor(e){super(),F(this,"_locale"),F(this,"_locales"),F(this,"_localeData"),F(this,"_messages"),F(this,"_missing"),F(this,"t",this._.bind(this)),this._messages={},this._localeData={},e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(e.locale!=null||e.locales!=null)&&this.activate(e.locale,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,r){this._localeData[e]==null?this._localeData[e]=r:Object.assign(this._localeData[e],r)}loadLocaleData(e,r){r!=null?this._loadLocaleData(e,r):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,r){this._messages[e]==null?this._messages[e]=r:Object.assign(this._messages[e],r)}load(e,r){r!=null?this._load(e,r):Object.keys(e).forEach(t=>this._load(t,e[t])),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:t}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r={},{message:t,formats:o}={}){j(e)||(r=e.values||r,t=e.message,e=e.id);let n=!this.messages[e],i=this._missing;if(i&&n)return so(i)?i(this._locale,e):i;n&&this.emit("missing",{id:e,locale:this._locale});let l=this.messages[e]||t||e;return j(l)&&Ze.test(l)?JSON.parse(`"${l}"`):j(l)?l:uo(l,this._locale,this._locales)(r,o)}date(e,r){return We(this._locales||this._locale,e,r)}number(e,r){return se(this._locales||this._locale,e,r)}};function $o(e={}){return new vo(e)}var ce=$o(),xo=JSON.parse('{"icon.title.alert-success":"Gr\xF8nn sirkel med sjekkmerke"}'),yo=JSON.parse('{"icon.title.alert-success":"Green circle with checkmark"}'),wo=JSON.parse('{"icon.title.alert-success":"Vihre\xE4 ympyr\xE4, jonka sis\xE4ll\xE4 on valintamerkki"}'),ko=["en","nb","fi"],Xe="en",Je=e=>ko.find(r=>e===r||e.toLowerCase().includes(r))||Xe;function _o(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return Je(e)}try{let e=document.documentElement.lang;return Je(e)}catch(e){return console.warn("could not detect locale, falling back to source locale",e),Xe}}var Oo=(e,r,t,o)=>e==="nb"?t:e==="fi"?o:r,Eo=(e,r,t)=>{let o=_o(),n=Oo(o,e,r,t);ce.load(o,n),ce.activate(o)};Eo(yo,xo,wo);var Do=class extends io{render(){let e=ce.t({message:"Green circle with checkmark",id:"icon.title.alert-success",comment:"Title for alert success icon"});return ao`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16">${lo(`<title>${e}</title>`)}<circle cx="8" cy="8" r="8" fill="currentColor" transform="rotate(180 8 8)"></circle><path fill="#fff" fill-rule="evenodd" d="M11.498 4.94a.75.75 0 0 1 .063 1.058l-4 4.5a.75.75 0 0 1-1.091.032l-2-2a.75.75 0 0 1 1.06-1.06l1.438 1.437 3.471-3.905a.75.75 0 0 1 1.06-.063Z" clip-rule="evenodd"></path></svg>`}};customElements.get("w-icon-alert-success-16")||customElements.define("w-icon-alert-success-16",Do);var q={negative:"negative",positive:"positive",warning:"warning",info:"info"},R=class extends Ye{constructor(){super(),this.show=!1,this.role="alert"}connectedCallback(){if(super.connectedCallback(),!this.variant||!q[this.variant])throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
|
|
6
|
+
negative, positive, warning, info.`)}get _wrapperClasses(){return Q({[P.alert]:!0,[P[this.variant]]:!0})}get _iconClasses(){let r=P[`${this.variant}Icon`];return Q({[P.icon]:!0,[r]:!0})}get _icon(){return this.variant===q.info?U`<w-icon-alert-info-16></w-icon-alert-info-16>`:this.variant===q.warning?U`<w-icon-alert-warning-16></w-icon-alert-warning-16>`:this.variant===q.negative?U`<w-icon-alert-error-16></w-icon-alert-error-16>`:this.variant===q.positive?U`<w-icon-alert-success-16></w-icon-alert-success-16>`:""}render(){return U`
|
|
3
7
|
<w-expand-transition ?show=${this.show}>
|
|
4
8
|
<div role=${this.role} class=${this._wrapperClasses}>
|
|
5
9
|
<div class=${this._iconClasses}>${this._icon}</div>
|
|
6
|
-
<div class=${
|
|
10
|
+
<div class=${P.textWrapper}>
|
|
7
11
|
<slot></slot>
|
|
8
12
|
</div>
|
|
9
13
|
</div>
|
|
10
14
|
</w-expand-transition>
|
|
11
|
-
`}}
|
|
15
|
+
`}};X(R,"properties",{variant:{type:String,reflect:!0},show:{type:Boolean,reflect:!0},role:{type:String,reflect:!0}}),X(R,"styles",[Ye.styles,So`
|
|
12
16
|
:host {
|
|
13
17
|
display: block;
|
|
14
18
|
}
|
|
@@ -18,5 +22,5 @@ negative, positive, warning, info.`)}get _wrapperClasses(){return p({[b.alert]:!
|
|
|
18
22
|
::slotted(:last-child) {
|
|
19
23
|
margin-bottom: 0px !important;
|
|
20
24
|
}
|
|
21
|
-
`]);customElements.get("w-alert")||customElements.define("w-alert",
|
|
25
|
+
`]);customElements.get("w-alert")||customElements.define("w-alert",R);export{R as WarpAlert};
|
|
22
26
|
//# sourceMappingURL=index.js.map
|